summaryrefslogtreecommitdiff
path: root/tools/node_modules
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2017-12-22 16:53:42 +0100
committerMichaël Zasso <targos@protonmail.com>2018-01-11 09:48:05 +0100
commit3dc30632755713179f345f4af024bd904c6162d0 (patch)
treef28c4f6dd6dfc5992edf301449d1a371d229755b /tools/node_modules
parenta2c7085dd4a8e60d1a47572aca8bb6fcb7a32f88 (diff)
downloadandroid-node-v8-3dc30632755713179f345f4af024bd904c6162d0.tar.gz
android-node-v8-3dc30632755713179f345f4af024bd904c6162d0.tar.bz2
android-node-v8-3dc30632755713179f345f4af024bd904c6162d0.zip
tools: move eslint from tools to tools/node_modules
This is required because we need to add the babel-eslint dependency and it has to be able to resolve "eslint". babel-eslint is required to support future ES features such as async iterators and import.meta. Refs: https://github.com/nodejs/node/pull/17755 PR-URL: https://github.com/nodejs/node/pull/17820 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Diffstat (limited to 'tools/node_modules')
-rw-r--r--tools/node_modules/eslint/LICENSE19
-rw-r--r--tools/node_modules/eslint/README.md254
-rwxr-xr-xtools/node_modules/eslint/bin/eslint.js75
-rw-r--r--tools/node_modules/eslint/conf/blank-script.json21
-rw-r--r--tools/node_modules/eslint/conf/category-list.json40
-rw-r--r--tools/node_modules/eslint/conf/config-schema.js70
-rw-r--r--tools/node_modules/eslint/conf/default-cli-options.js30
-rw-r--r--tools/node_modules/eslint/conf/default-config-options.js29
-rw-r--r--tools/node_modules/eslint/conf/environments.js231
-rw-r--r--tools/node_modules/eslint/conf/eslint-all.js31
-rwxr-xr-xtools/node_modules/eslint/conf/eslint-recommended.js271
-rw-r--r--tools/node_modules/eslint/conf/replacements.json22
-rw-r--r--tools/node_modules/eslint/lib/api.js16
-rw-r--r--tools/node_modules/eslint/lib/ast-utils.js1350
-rw-r--r--tools/node_modules/eslint/lib/cli-engine.js715
-rw-r--r--tools/node_modules/eslint/lib/cli.js219
-rw-r--r--tools/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js659
-rw-r--r--tools/node_modules/eslint/lib/code-path-analysis/code-path-segment.js245
-rw-r--r--tools/node_modules/eslint/lib/code-path-analysis/code-path-state.js1440
-rw-r--r--tools/node_modules/eslint/lib/code-path-analysis/code-path.js234
-rw-r--r--tools/node_modules/eslint/lib/code-path-analysis/debug-helpers.js200
-rw-r--r--tools/node_modules/eslint/lib/code-path-analysis/fork-context.js262
-rw-r--r--tools/node_modules/eslint/lib/code-path-analysis/id-generator.js46
-rw-r--r--tools/node_modules/eslint/lib/config.js365
-rw-r--r--tools/node_modules/eslint/lib/config/autoconfig.js359
-rw-r--r--tools/node_modules/eslint/lib/config/config-cache.js130
-rw-r--r--tools/node_modules/eslint/lib/config/config-file.js595
-rw-r--r--tools/node_modules/eslint/lib/config/config-initializer.js605
-rw-r--r--tools/node_modules/eslint/lib/config/config-ops.js383
-rw-r--r--tools/node_modules/eslint/lib/config/config-rule.js322
-rw-r--r--tools/node_modules/eslint/lib/config/config-validator.js244
-rw-r--r--tools/node_modules/eslint/lib/config/environments.js84
-rw-r--r--tools/node_modules/eslint/lib/config/plugins.js150
-rw-r--r--tools/node_modules/eslint/lib/file-finder.js145
-rw-r--r--tools/node_modules/eslint/lib/formatters/checkstyle.js60
-rw-r--r--tools/node_modules/eslint/lib/formatters/codeframe.js138
-rw-r--r--tools/node_modules/eslint/lib/formatters/compact.js60
-rw-r--r--tools/node_modules/eslint/lib/formatters/html-template-message.html8
-rw-r--r--tools/node_modules/eslint/lib/formatters/html-template-page.html115
-rw-r--r--tools/node_modules/eslint/lib/formatters/html-template-result.html6
-rw-r--r--tools/node_modules/eslint/lib/formatters/html.js127
-rw-r--r--tools/node_modules/eslint/lib/formatters/jslint-xml.js41
-rw-r--r--tools/node_modules/eslint/lib/formatters/json.js13
-rw-r--r--tools/node_modules/eslint/lib/formatters/junit.js70
-rw-r--r--tools/node_modules/eslint/lib/formatters/stylish.js100
-rw-r--r--tools/node_modules/eslint/lib/formatters/table.js150
-rw-r--r--tools/node_modules/eslint/lib/formatters/tap.js92
-rw-r--r--tools/node_modules/eslint/lib/formatters/unix.js58
-rw-r--r--tools/node_modules/eslint/lib/formatters/visualstudio.js63
-rw-r--r--tools/node_modules/eslint/lib/ignored-paths.js289
-rwxr-xr-xtools/node_modules/eslint/lib/linter.js1123
-rw-r--r--tools/node_modules/eslint/lib/load-rules.js50
-rw-r--r--tools/node_modules/eslint/lib/logging.js28
-rw-r--r--tools/node_modules/eslint/lib/options.js235
-rw-r--r--tools/node_modules/eslint/lib/report-translator.js274
-rw-r--r--tools/node_modules/eslint/lib/rules.js140
-rw-r--r--tools/node_modules/eslint/lib/rules/.eslintrc.yml3
-rw-r--r--tools/node_modules/eslint/lib/rules/accessor-pairs.js156
-rw-r--r--tools/node_modules/eslint/lib/rules/array-bracket-newline.js249
-rw-r--r--tools/node_modules/eslint/lib/rules/array-bracket-spacing.js229
-rw-r--r--tools/node_modules/eslint/lib/rules/array-callback-return.js232
-rw-r--r--tools/node_modules/eslint/lib/rules/array-element-newline.js230
-rw-r--r--tools/node_modules/eslint/lib/rules/arrow-body-style.js215
-rw-r--r--tools/node_modules/eslint/lib/rules/arrow-parens.js156
-rw-r--r--tools/node_modules/eslint/lib/rules/arrow-spacing.js149
-rw-r--r--tools/node_modules/eslint/lib/rules/block-scoped-var.js115
-rw-r--r--tools/node_modules/eslint/lib/rules/block-spacing.js137
-rw-r--r--tools/node_modules/eslint/lib/rules/brace-style.js182
-rw-r--r--tools/node_modules/eslint/lib/rules/callback-return.js175
-rw-r--r--tools/node_modules/eslint/lib/rules/camelcase.js143
-rw-r--r--tools/node_modules/eslint/lib/rules/capitalized-comments.js303
-rw-r--r--tools/node_modules/eslint/lib/rules/class-methods-use-this.js110
-rw-r--r--tools/node_modules/eslint/lib/rules/comma-dangle.js337
-rw-r--r--tools/node_modules/eslint/lib/rules/comma-spacing.js183
-rw-r--r--tools/node_modules/eslint/lib/rules/comma-style.js299
-rw-r--r--tools/node_modules/eslint/lib/rules/complexity.js168
-rw-r--r--tools/node_modules/eslint/lib/rules/computed-property-spacing.js176
-rw-r--r--tools/node_modules/eslint/lib/rules/consistent-return.js188
-rw-r--r--tools/node_modules/eslint/lib/rules/consistent-this.js143
-rw-r--r--tools/node_modules/eslint/lib/rules/constructor-super.js385
-rw-r--r--tools/node_modules/eslint/lib/rules/curly.js399
-rw-r--r--tools/node_modules/eslint/lib/rules/default-case.js90
-rw-r--r--tools/node_modules/eslint/lib/rules/dot-location.js88
-rw-r--r--tools/node_modules/eslint/lib/rules/dot-notation.js159
-rw-r--r--tools/node_modules/eslint/lib/rules/eol-last.js94
-rw-r--r--tools/node_modules/eslint/lib/rules/eqeqeq.js180
-rw-r--r--tools/node_modules/eslint/lib/rules/for-direction.js105
-rw-r--r--tools/node_modules/eslint/lib/rules/func-call-spacing.js159
-rw-r--r--tools/node_modules/eslint/lib/rules/func-name-matching.js193
-rw-r--r--tools/node_modules/eslint/lib/rules/func-names.js114
-rw-r--r--tools/node_modules/eslint/lib/rules/func-style.js89
-rw-r--r--tools/node_modules/eslint/lib/rules/function-paren-newline.js221
-rw-r--r--tools/node_modules/eslint/lib/rules/generator-star-spacing.js199
-rw-r--r--tools/node_modules/eslint/lib/rules/getter-return.js177
-rw-r--r--tools/node_modules/eslint/lib/rules/global-require.js75
-rw-r--r--tools/node_modules/eslint/lib/rules/guard-for-in.js42
-rw-r--r--tools/node_modules/eslint/lib/rules/handle-callback-err.js89
-rw-r--r--tools/node_modules/eslint/lib/rules/id-blacklist.js121
-rw-r--r--tools/node_modules/eslint/lib/rules/id-length.js116
-rw-r--r--tools/node_modules/eslint/lib/rules/id-match.js144
-rw-r--r--tools/node_modules/eslint/lib/rules/implicit-arrow-linebreak.js86
-rw-r--r--tools/node_modules/eslint/lib/rules/indent-legacy.js1137
-rw-r--r--tools/node_modules/eslint/lib/rules/indent.js1522
-rw-r--r--tools/node_modules/eslint/lib/rules/init-declarations.js137
-rw-r--r--tools/node_modules/eslint/lib/rules/jsx-quotes.js89
-rw-r--r--tools/node_modules/eslint/lib/rules/key-spacing.js641
-rw-r--r--tools/node_modules/eslint/lib/rules/keyword-spacing.js584
-rw-r--r--tools/node_modules/eslint/lib/rules/line-comment-position.js115
-rw-r--r--tools/node_modules/eslint/lib/rules/linebreak-style.js96
-rw-r--r--tools/node_modules/eslint/lib/rules/lines-around-comment.js397
-rw-r--r--tools/node_modules/eslint/lib/rules/lines-around-directive.js193
-rw-r--r--tools/node_modules/eslint/lib/rules/lines-between-class-members.js91
-rw-r--r--tools/node_modules/eslint/lib/rules/max-depth.js148
-rw-r--r--tools/node_modules/eslint/lib/rules/max-len.js365
-rw-r--r--tools/node_modules/eslint/lib/rules/max-lines.js144
-rw-r--r--tools/node_modules/eslint/lib/rules/max-nested-callbacks.js112
-rw-r--r--tools/node_modules/eslint/lib/rules/max-params.js96
-rw-r--r--tools/node_modules/eslint/lib/rules/max-statements-per-line.js194
-rw-r--r--tools/node_modules/eslint/lib/rules/max-statements.js170
-rw-r--r--tools/node_modules/eslint/lib/rules/multiline-comment-style.js294
-rw-r--r--tools/node_modules/eslint/lib/rules/multiline-ternary.js89
-rw-r--r--tools/node_modules/eslint/lib/rules/new-cap.js272
-rw-r--r--tools/node_modules/eslint/lib/rules/new-parens.js58
-rw-r--r--tools/node_modules/eslint/lib/rules/newline-after-var.js254
-rw-r--r--tools/node_modules/eslint/lib/rules/newline-before-return.js210
-rw-r--r--tools/node_modules/eslint/lib/rules/newline-per-chained-call.js103
-rw-r--r--tools/node_modules/eslint/lib/rules/no-alert.js123
-rw-r--r--tools/node_modules/eslint/lib/rules/no-array-constructor.js47
-rw-r--r--tools/node_modules/eslint/lib/rules/no-await-in-loop.js83
-rw-r--r--tools/node_modules/eslint/lib/rules/no-bitwise.js111
-rw-r--r--tools/node_modules/eslint/lib/rules/no-buffer-constructor.js37
-rw-r--r--tools/node_modules/eslint/lib/rules/no-caller.js39
-rw-r--r--tools/node_modules/eslint/lib/rules/no-case-declarations.js57
-rw-r--r--tools/node_modules/eslint/lib/rules/no-catch-shadow.js69
-rw-r--r--tools/node_modules/eslint/lib/rules/no-class-assign.js54
-rw-r--r--tools/node_modules/eslint/lib/rules/no-compare-neg-zero.js53
-rw-r--r--tools/node_modules/eslint/lib/rules/no-cond-assign.js139
-rw-r--r--tools/node_modules/eslint/lib/rules/no-confusing-arrow.js76
-rw-r--r--tools/node_modules/eslint/lib/rules/no-console.js131
-rw-r--r--tools/node_modules/eslint/lib/rules/no-const-assign.js47
-rw-r--r--tools/node_modules/eslint/lib/rules/no-constant-condition.js210
-rw-r--r--tools/node_modules/eslint/lib/rules/no-continue.js32
-rw-r--r--tools/node_modules/eslint/lib/rules/no-control-regex.js127
-rw-r--r--tools/node_modules/eslint/lib/rules/no-debugger.js43
-rw-r--r--tools/node_modules/eslint/lib/rules/no-delete-var.js35
-rw-r--r--tools/node_modules/eslint/lib/rules/no-div-regex.js38
-rw-r--r--tools/node_modules/eslint/lib/rules/no-dupe-args.js73
-rw-r--r--tools/node_modules/eslint/lib/rules/no-dupe-class-members.js109
-rw-r--r--tools/node_modules/eslint/lib/rules/no-dupe-keys.js135
-rw-r--r--tools/node_modules/eslint/lib/rules/no-duplicate-case.js43
-rw-r--r--tools/node_modules/eslint/lib/rules/no-duplicate-imports.js137
-rw-r--r--tools/node_modules/eslint/lib/rules/no-else-return.js276
-rw-r--r--tools/node_modules/eslint/lib/rules/no-empty-character-class.js57
-rw-r--r--tools/node_modules/eslint/lib/rules/no-empty-function.js160
-rw-r--r--tools/node_modules/eslint/lib/rules/no-empty-pattern.js36
-rw-r--r--tools/node_modules/eslint/lib/rules/no-empty.js78
-rw-r--r--tools/node_modules/eslint/lib/rules/no-eq-null.js39
-rw-r--r--tools/node_modules/eslint/lib/rules/no-eval.js308
-rw-r--r--tools/node_modules/eslint/lib/rules/no-ex-assign.js45
-rw-r--r--tools/node_modules/eslint/lib/rules/no-extend-native.js174
-rw-r--r--tools/node_modules/eslint/lib/rules/no-extra-bind.js145
-rw-r--r--tools/node_modules/eslint/lib/rules/no-extra-boolean-cast.js122
-rw-r--r--tools/node_modules/eslint/lib/rules/no-extra-label.js140
-rw-r--r--tools/node_modules/eslint/lib/rules/no-extra-parens.js745
-rw-r--r--tools/node_modules/eslint/lib/rules/no-extra-semi.js120
-rw-r--r--tools/node_modules/eslint/lib/rules/no-fallthrough.js135
-rw-r--r--tools/node_modules/eslint/lib/rules/no-floating-decimal.js64
-rw-r--r--tools/node_modules/eslint/lib/rules/no-func-assign.js63
-rw-r--r--tools/node_modules/eslint/lib/rules/no-global-assign.js85
-rw-r--r--tools/node_modules/eslint/lib/rules/no-implicit-coercion.js292
-rw-r--r--tools/node_modules/eslint/lib/rules/no-implicit-globals.js55
-rw-r--r--tools/node_modules/eslint/lib/rules/no-implied-eval.js161
-rw-r--r--tools/node_modules/eslint/lib/rules/no-inline-comments.js65
-rw-r--r--tools/node_modules/eslint/lib/rules/no-inner-declarations.js89
-rw-r--r--tools/node_modules/eslint/lib/rules/no-invalid-regexp.js106
-rw-r--r--tools/node_modules/eslint/lib/rules/no-invalid-this.js123
-rw-r--r--tools/node_modules/eslint/lib/rules/no-irregular-whitespace.js236
-rw-r--r--tools/node_modules/eslint/lib/rules/no-iterator.js38
-rw-r--r--tools/node_modules/eslint/lib/rules/no-label-var.js69
-rw-r--r--tools/node_modules/eslint/lib/rules/no-labels.js141
-rw-r--r--tools/node_modules/eslint/lib/rules/no-lone-blocks.js112
-rw-r--r--tools/node_modules/eslint/lib/rules/no-lonely-if.js83
-rw-r--r--tools/node_modules/eslint/lib/rules/no-loop-func.js201
-rw-r--r--tools/node_modules/eslint/lib/rules/no-magic-numbers.js149
-rw-r--r--tools/node_modules/eslint/lib/rules/no-mixed-operators.js209
-rw-r--r--tools/node_modules/eslint/lib/rules/no-mixed-requires.js220
-rw-r--r--tools/node_modules/eslint/lib/rules/no-mixed-spaces-and-tabs.js143
-rw-r--r--tools/node_modules/eslint/lib/rules/no-multi-assign.js41
-rw-r--r--tools/node_modules/eslint/lib/rules/no-multi-spaces.js130
-rw-r--r--tools/node_modules/eslint/lib/rules/no-multi-str.js55
-rw-r--r--tools/node_modules/eslint/lib/rules/no-multiple-empty-lines.js136
-rw-r--r--tools/node_modules/eslint/lib/rules/no-native-reassign.js89
-rw-r--r--tools/node_modules/eslint/lib/rules/no-negated-condition.js82
-rw-r--r--tools/node_modules/eslint/lib/rules/no-negated-in-lhs.js38
-rw-r--r--tools/node_modules/eslint/lib/rules/no-nested-ternary.js34
-rw-r--r--tools/node_modules/eslint/lib/rules/no-new-func.js45
-rw-r--r--tools/node_modules/eslint/lib/rules/no-new-object.js35
-rw-r--r--tools/node_modules/eslint/lib/rules/no-new-require.js35
-rw-r--r--tools/node_modules/eslint/lib/rules/no-new-symbol.js43
-rw-r--r--tools/node_modules/eslint/lib/rules/no-new-wrappers.js37
-rw-r--r--tools/node_modules/eslint/lib/rules/no-new.js33
-rw-r--r--tools/node_modules/eslint/lib/rules/no-obj-calls.js39
-rw-r--r--tools/node_modules/eslint/lib/rules/no-octal-escape.js47
-rw-r--r--tools/node_modules/eslint/lib/rules/no-octal.js35
-rw-r--r--tools/node_modules/eslint/lib/rules/no-param-reassign.js173
-rw-r--r--tools/node_modules/eslint/lib/rules/no-path-concat.js49
-rw-r--r--tools/node_modules/eslint/lib/rules/no-plusplus.js61
-rw-r--r--tools/node_modules/eslint/lib/rules/no-process-env.js39
-rw-r--r--tools/node_modules/eslint/lib/rules/no-process-exit.js35
-rw-r--r--tools/node_modules/eslint/lib/rules/no-proto.js38
-rw-r--r--tools/node_modules/eslint/lib/rules/no-prototype-builtins.js54
-rw-r--r--tools/node_modules/eslint/lib/rules/no-redeclare.js101
-rw-r--r--tools/node_modules/eslint/lib/rules/no-regex-spaces.js114
-rw-r--r--tools/node_modules/eslint/lib/rules/no-restricted-globals.js120
-rw-r--r--tools/node_modules/eslint/lib/rules/no-restricted-imports.js263
-rw-r--r--tools/node_modules/eslint/lib/rules/no-restricted-modules.js177
-rw-r--r--tools/node_modules/eslint/lib/rules/no-restricted-properties.js173
-rw-r--r--tools/node_modules/eslint/lib/rules/no-restricted-syntax.js62
-rw-r--r--tools/node_modules/eslint/lib/rules/no-return-assign.js71
-rw-r--r--tools/node_modules/eslint/lib/rules/no-return-await.js94
-rw-r--r--tools/node_modules/eslint/lib/rules/no-script-url.js41
-rw-r--r--tools/node_modules/eslint/lib/rules/no-self-assign.js214
-rw-r--r--tools/node_modules/eslint/lib/rules/no-self-compare.js53
-rw-r--r--tools/node_modules/eslint/lib/rules/no-sequences.js112
-rw-r--r--tools/node_modules/eslint/lib/rules/no-shadow-restricted-names.js69
-rw-r--r--tools/node_modules/eslint/lib/rules/no-shadow.js188
-rw-r--r--tools/node_modules/eslint/lib/rules/no-spaced-func.js75
-rw-r--r--tools/node_modules/eslint/lib/rules/no-sparse-arrays.js43
-rw-r--r--tools/node_modules/eslint/lib/rules/no-sync.js53
-rw-r--r--tools/node_modules/eslint/lib/rules/no-tabs.js47
-rw-r--r--tools/node_modules/eslint/lib/rules/no-template-curly-in-string.js37
-rw-r--r--tools/node_modules/eslint/lib/rules/no-ternary.js34
-rw-r--r--tools/node_modules/eslint/lib/rules/no-this-before-super.js299
-rw-r--r--tools/node_modules/eslint/lib/rules/no-throw-literal.js43
-rw-r--r--tools/node_modules/eslint/lib/rules/no-trailing-spaces.js169
-rw-r--r--tools/node_modules/eslint/lib/rules/no-undef-init.js63
-rw-r--r--tools/node_modules/eslint/lib/rules/no-undef.js71
-rw-r--r--tools/node_modules/eslint/lib/rules/no-undefined.js77
-rw-r--r--tools/node_modules/eslint/lib/rules/no-underscore-dangle.js203
-rw-r--r--tools/node_modules/eslint/lib/rules/no-unexpected-multiline.js98
-rw-r--r--tools/node_modules/eslint/lib/rules/no-unmodified-loop-condition.js366
-rw-r--r--tools/node_modules/eslint/lib/rules/no-unneeded-ternary.js155
-rw-r--r--tools/node_modules/eslint/lib/rules/no-unreachable.js212
-rw-r--r--tools/node_modules/eslint/lib/rules/no-unsafe-finally.js104
-rw-r--r--tools/node_modules/eslint/lib/rules/no-unsafe-negation.js80
-rw-r--r--tools/node_modules/eslint/lib/rules/no-unused-expressions.js126
-rw-r--r--tools/node_modules/eslint/lib/rules/no-unused-labels.js106
-rw-r--r--tools/node_modules/eslint/lib/rules/no-unused-vars.js647
-rw-r--r--tools/node_modules/eslint/lib/rules/no-use-before-define.js266
-rw-r--r--tools/node_modules/eslint/lib/rules/no-useless-call.js80
-rw-r--r--tools/node_modules/eslint/lib/rules/no-useless-computed-key.js75
-rw-r--r--tools/node_modules/eslint/lib/rules/no-useless-concat.js108
-rw-r--r--tools/node_modules/eslint/lib/rules/no-useless-constructor.js182
-rw-r--r--tools/node_modules/eslint/lib/rules/no-useless-escape.js223
-rw-r--r--tools/node_modules/eslint/lib/rules/no-useless-rename.js147
-rw-r--r--tools/node_modules/eslint/lib/rules/no-useless-return.js304
-rw-r--r--tools/node_modules/eslint/lib/rules/no-var.js328
-rw-r--r--tools/node_modules/eslint/lib/rules/no-void.js37
-rw-r--r--tools/node_modules/eslint/lib/rules/no-warning-comments.js139
-rw-r--r--tools/node_modules/eslint/lib/rules/no-whitespace-before-property.js94
-rw-r--r--tools/node_modules/eslint/lib/rules/no-with.js32
-rw-r--r--tools/node_modules/eslint/lib/rules/nonblock-statement-body-position.js114
-rw-r--r--tools/node_modules/eslint/lib/rules/object-curly-newline.js249
-rw-r--r--tools/node_modules/eslint/lib/rules/object-curly-spacing.js299
-rw-r--r--tools/node_modules/eslint/lib/rules/object-property-newline.js84
-rw-r--r--tools/node_modules/eslint/lib/rules/object-shorthand.js454
-rw-r--r--tools/node_modules/eslint/lib/rules/one-var-declaration-per-line.js86
-rw-r--r--tools/node_modules/eslint/lib/rules/one-var.js367
-rw-r--r--tools/node_modules/eslint/lib/rules/operator-assignment.js206
-rw-r--r--tools/node_modules/eslint/lib/rules/operator-linebreak.js252
-rw-r--r--tools/node_modules/eslint/lib/rules/padded-blocks.js256
-rw-r--r--tools/node_modules/eslint/lib/rules/padding-line-between-statements.js589
-rw-r--r--tools/node_modules/eslint/lib/rules/prefer-arrow-callback.js304
-rw-r--r--tools/node_modules/eslint/lib/rules/prefer-const.js321
-rw-r--r--tools/node_modules/eslint/lib/rules/prefer-destructuring.js217
-rw-r--r--tools/node_modules/eslint/lib/rules/prefer-numeric-literals.js112
-rw-r--r--tools/node_modules/eslint/lib/rules/prefer-promise-reject-errors.js124
-rw-r--r--tools/node_modules/eslint/lib/rules/prefer-reflect.js119
-rw-r--r--tools/node_modules/eslint/lib/rules/prefer-rest-params.js111
-rw-r--r--tools/node_modules/eslint/lib/rules/prefer-spread.js96
-rw-r--r--tools/node_modules/eslint/lib/rules/prefer-template.js232
-rw-r--r--tools/node_modules/eslint/lib/rules/quote-props.js298
-rw-r--r--tools/node_modules/eslint/lib/rules/quotes.js296
-rw-r--r--tools/node_modules/eslint/lib/rules/radix.js171
-rw-r--r--tools/node_modules/eslint/lib/rules/require-await.js95
-rw-r--r--tools/node_modules/eslint/lib/rules/require-jsdoc.js105
-rw-r--r--tools/node_modules/eslint/lib/rules/require-yield.js71
-rw-r--r--tools/node_modules/eslint/lib/rules/rest-spread-spacing.js107
-rw-r--r--tools/node_modules/eslint/lib/rules/semi-spacing.js211
-rw-r--r--tools/node_modules/eslint/lib/rules/semi-style.js143
-rw-r--r--tools/node_modules/eslint/lib/rules/semi.js325
-rw-r--r--tools/node_modules/eslint/lib/rules/sort-imports.js196
-rw-r--r--tools/node_modules/eslint/lib/rules/sort-keys.js157
-rw-r--r--tools/node_modules/eslint/lib/rules/sort-vars.js96
-rw-r--r--tools/node_modules/eslint/lib/rules/space-before-blocks.js148
-rw-r--r--tools/node_modules/eslint/lib/rules/space-before-function-paren.js142
-rw-r--r--tools/node_modules/eslint/lib/rules/space-in-parens.js274
-rw-r--r--tools/node_modules/eslint/lib/rules/space-infix-ops.js167
-rw-r--r--tools/node_modules/eslint/lib/rules/space-unary-ops.js319
-rw-r--r--tools/node_modules/eslint/lib/rules/spaced-comment.js375
-rw-r--r--tools/node_modules/eslint/lib/rules/strict.js277
-rw-r--r--tools/node_modules/eslint/lib/rules/switch-colon-spacing.js133
-rw-r--r--tools/node_modules/eslint/lib/rules/symbol-description.js66
-rw-r--r--tools/node_modules/eslint/lib/rules/template-curly-spacing.js121
-rwxr-xr-xtools/node_modules/eslint/lib/rules/template-tag-spacing.js77
-rw-r--r--tools/node_modules/eslint/lib/rules/unicode-bom.js66
-rw-r--r--tools/node_modules/eslint/lib/rules/use-isnan.js34
-rw-r--r--tools/node_modules/eslint/lib/rules/valid-jsdoc.js423
-rw-r--r--tools/node_modules/eslint/lib/rules/valid-typeof.js77
-rw-r--r--tools/node_modules/eslint/lib/rules/vars-on-top.js149
-rw-r--r--tools/node_modules/eslint/lib/rules/wrap-iife.js151
-rw-r--r--tools/node_modules/eslint/lib/rules/wrap-regex.js52
-rw-r--r--tools/node_modules/eslint/lib/rules/yield-star-spacing.js117
-rw-r--r--tools/node_modules/eslint/lib/rules/yoda.js310
-rw-r--r--tools/node_modules/eslint/lib/testers/rule-tester.js558
-rw-r--r--tools/node_modules/eslint/lib/timing.js141
-rw-r--r--tools/node_modules/eslint/lib/token-store/backward-token-comment-cursor.js57
-rw-r--r--tools/node_modules/eslint/lib/token-store/backward-token-cursor.js58
-rw-r--r--tools/node_modules/eslint/lib/token-store/cursor.js76
-rw-r--r--tools/node_modules/eslint/lib/token-store/cursors.js92
-rw-r--r--tools/node_modules/eslint/lib/token-store/decorative-cursor.js39
-rw-r--r--tools/node_modules/eslint/lib/token-store/filter-cursor.js43
-rw-r--r--tools/node_modules/eslint/lib/token-store/forward-token-comment-cursor.js57
-rw-r--r--tools/node_modules/eslint/lib/token-store/forward-token-cursor.js63
-rw-r--r--tools/node_modules/eslint/lib/token-store/index.js633
-rw-r--r--tools/node_modules/eslint/lib/token-store/limit-cursor.js40
-rw-r--r--tools/node_modules/eslint/lib/token-store/padded-token-cursor.js38
-rw-r--r--tools/node_modules/eslint/lib/token-store/skip-cursor.js42
-rw-r--r--tools/node_modules/eslint/lib/token-store/utils.js104
-rw-r--r--tools/node_modules/eslint/lib/util/ajv.js29
-rw-r--r--tools/node_modules/eslint/lib/util/apply-disable-directives.js160
-rw-r--r--tools/node_modules/eslint/lib/util/fix-tracker.js120
-rw-r--r--tools/node_modules/eslint/lib/util/glob-util.js182
-rw-r--r--tools/node_modules/eslint/lib/util/glob.js63
-rw-r--r--tools/node_modules/eslint/lib/util/hash.js35
-rw-r--r--tools/node_modules/eslint/lib/util/keywords.js67
-rw-r--r--tools/node_modules/eslint/lib/util/module-resolver.js85
-rw-r--r--tools/node_modules/eslint/lib/util/naming.js112
-rw-r--r--tools/node_modules/eslint/lib/util/node-event-generator.js308
-rw-r--r--tools/node_modules/eslint/lib/util/npm-util.js179
-rw-r--r--tools/node_modules/eslint/lib/util/path-util.js74
-rw-r--r--tools/node_modules/eslint/lib/util/patterns/letters.js36
-rw-r--r--tools/node_modules/eslint/lib/util/rule-fixer.js140
-rw-r--r--tools/node_modules/eslint/lib/util/safe-emitter.js54
-rw-r--r--tools/node_modules/eslint/lib/util/source-code-fixer.js152
-rw-r--r--tools/node_modules/eslint/lib/util/source-code-util.js109
-rw-r--r--tools/node_modules/eslint/lib/util/source-code.js472
-rw-r--r--tools/node_modules/eslint/lib/util/traverser.js45
-rw-r--r--tools/node_modules/eslint/lib/util/xml-escape.js34
-rw-r--r--tools/node_modules/eslint/messages/extend-config-missing.txt3
-rw-r--r--tools/node_modules/eslint/messages/no-config-found.txt7
-rw-r--r--tools/node_modules/eslint/messages/plugin-missing.txt9
-rw-r--r--tools/node_modules/eslint/messages/whitespace-found.txt3
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/LICENSE19
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/README.md64
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/index.js3
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/inject.js433
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/.tern-project6
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/AUTHORS59
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/LICENSE19
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/README.md407
-rwxr-xr-xtools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/bin/acorn65
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/bin/generate-identifier-regex.js55
-rwxr-xr-xtools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/bin/update_authors.sh6
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/.keep0
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn.es.js3112
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn.js3142
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn_loose.es.js1261
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn_loose.js1273
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/walk.es.js342
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/walk.js360
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/package.json250
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/rollup/config.bin.js15
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/rollup/config.loose.js20
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/rollup/config.main.js11
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/rollup/config.walk.js11
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/bin/acorn.js58
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/expression.js701
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/identifier.js82
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/index.js67
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/location.js26
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/locutil.js42
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/expression.js514
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/index.js50
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/parseutil.js1
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/state.js160
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/statement.js425
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/tokenize.js108
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/lval.js216
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/node.js50
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/options.js121
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/parseutil.js109
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/state.js104
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/statement.js654
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/tokencontext.js110
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/tokenize.js696
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/tokentype.js147
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/util.js9
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/walk/index.js342
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/whitespace.js13
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/package.json56
-rw-r--r--tools/node_modules/eslint/node_modules/acorn-jsx/xhtml.js255
-rw-r--r--tools/node_modules/eslint/node_modules/acorn/AUTHORS69
-rw-r--r--tools/node_modules/eslint/node_modules/acorn/LICENSE19
-rw-r--r--tools/node_modules/eslint/node_modules/acorn/README.md452
-rwxr-xr-xtools/node_modules/eslint/node_modules/acorn/bin/acorn69
-rw-r--r--tools/node_modules/eslint/node_modules/acorn/dist/.keep0
-rw-r--r--tools/node_modules/eslint/node_modules/acorn/dist/acorn.es.js3734
-rw-r--r--tools/node_modules/eslint/node_modules/acorn/dist/acorn.js3765
-rw-r--r--tools/node_modules/eslint/node_modules/acorn/dist/acorn_loose.es.js1390
-rw-r--r--tools/node_modules/eslint/node_modules/acorn/dist/acorn_loose.js1400
-rw-r--r--tools/node_modules/eslint/node_modules/acorn/dist/walk.es.js407
-rw-r--r--tools/node_modules/eslint/node_modules/acorn/dist/walk.js427
-rw-r--r--tools/node_modules/eslint/node_modules/acorn/package.json286
-rw-r--r--tools/node_modules/eslint/node_modules/ajv-keywords/LICENSE21
-rw-r--r--tools/node_modules/eslint/node_modules/ajv-keywords/README.md656
-rw-r--r--tools/node_modules/eslint/node_modules/ajv-keywords/index.js35
-rw-r--r--tools/node_modules/eslint/node_modules/ajv-keywords/keywords/_formatLimit.js90
-rw-r--r--tools/node_modules/eslint/node_modules/ajv-keywords/keywords/_util.js15
-rw-r--r--tools/node_modules/eslint/node_modules/ajv-keywords/keywords/deepProperties.js54
-rw-r--r--tools/node_modules/eslint/node_modules/ajv-keywords/keywords/deepRequired.js57
-rw-r--r--tools/node_modules/eslint/node_modules/ajv-keywords/keywords/dot/_formatLimit.jst116
-rw-r--r--tools/node_modules/eslint/node_modules/ajv-keywords/keywords/dot/patternRequired.jst33
-rw-r--r--tools/node_modules/eslint/node_modules/ajv-keywords/keywords/dot/switch.jst73
-rw-r--r--tools/node_modules/eslint/node_modules/ajv-keywords/keywords/dotjs/README.md3
-rw-r--r--tools/node_modules/eslint/node_modules/ajv-keywords/keywords/dotjs/_formatLimit.js176
-rw-r--r--tools/node_modules/eslint/node_modules/ajv-keywords/keywords/dotjs/patternRequired.js58
-rw-r--r--tools/node_modules/eslint/node_modules/ajv-keywords/keywords/dotjs/switch.js128
-rw-r--r--tools/node_modules/eslint/node_modules/ajv-keywords/keywords/dynamicDefaults.js68
-rw-r--r--tools/node_modules/eslint/node_modules/ajv-keywords/keywords/formatMaximum.js3
-rw-r--r--tools/node_modules/eslint/node_modules/ajv-keywords/keywords/formatMinimum.js3
-rw-r--r--tools/node_modules/eslint/node_modules/ajv-keywords/keywords/if.js21
-rw-r--r--tools/node_modules/eslint/node_modules/ajv-keywords/keywords/index.js19
-rw-r--r--tools/node_modules/eslint/node_modules/ajv-keywords/keywords/instanceof.js54
-rw-r--r--tools/node_modules/eslint/node_modules/ajv-keywords/keywords/patternRequired.js21
-rw-r--r--tools/node_modules/eslint/node_modules/ajv-keywords/keywords/prohibited.js25
-rw-r--r--tools/node_modules/eslint/node_modules/ajv-keywords/keywords/range.js36
-rw-r--r--tools/node_modules/eslint/node_modules/ajv-keywords/keywords/regexp.js36
-rw-r--r--tools/node_modules/eslint/node_modules/ajv-keywords/keywords/select.js79
-rw-r--r--tools/node_modules/eslint/node_modules/ajv-keywords/keywords/switch.js38
-rw-r--r--tools/node_modules/eslint/node_modules/ajv-keywords/keywords/typeof.js32
-rw-r--r--tools/node_modules/eslint/node_modules/ajv-keywords/keywords/uniqueItemProperties.js32
-rw-r--r--tools/node_modules/eslint/node_modules/ajv-keywords/package.json78
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/.tonic_example.js20
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/LICENSE22
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/README.md1327
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/dist/ajv.bundle.js7345
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/dist/ajv.min.js3
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/dist/ajv.min.js.map1
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/dist/nodent.min.js2
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/dist/regenerator.min.js2
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/$data.js49
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/ajv.d.ts328
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/ajv.js502
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/cache.js26
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/compile/_rules.js31
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/compile/async.js90
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/compile/equal.js3
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/compile/error_classes.js34
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/compile/formats.js135
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/compile/index.js380
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/compile/resolve.js271
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/compile/rules.js58
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/compile/schema_obj.js9
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/compile/ucs2length.js20
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/compile/util.js267
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dot/_limit.jst96
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dot/_limitItems.jst10
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dot/_limitLength.jst10
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dot/_limitProperties.jst10
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dot/allOf.jst34
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dot/anyOf.jst48
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dot/coerce.def61
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dot/const.jst11
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dot/contains.jst57
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dot/custom.jst191
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dot/defaults.def32
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dot/definitions.def199
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dot/dependencies.jst80
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dot/enum.jst30
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dot/errors.def194
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dot/format.jst106
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dot/items.jst100
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dot/missing.def39
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dot/multipleOf.jst20
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dot/not.jst43
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dot/oneOf.jst44
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dot/pattern.jst14
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dot/properties.jst327
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dot/propertyNames.jst54
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dot/ref.jst85
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dot/required.jst108
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dot/uniqueItems.jst38
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dot/validate.jst272
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dotjs/README.md3
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dotjs/_limit.js149
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dotjs/_limitItems.js76
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dotjs/_limitLength.js81
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dotjs/_limitProperties.js76
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dotjs/allOf.js43
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dotjs/anyOf.js73
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dotjs/const.js55
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dotjs/contains.js81
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dotjs/custom.js226
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dotjs/dependencies.js167
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dotjs/enum.js65
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dotjs/format.js149
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dotjs/items.js140
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dotjs/multipleOf.js76
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dotjs/not.js83
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dotjs/oneOf.js70
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dotjs/pattern.js74
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dotjs/properties.js468
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dotjs/propertyNames.js81
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dotjs/ref.js123
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dotjs/required.js268
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dotjs/uniqueItems.js71
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dotjs/validate.js458
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/keyword.js135
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/patternGroups.js36
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/refs/$data.json17
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/refs/json-schema-draft-04.json150
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/refs/json-schema-draft-06.json154
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/refs/json-schema-v5.json250
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/package.json131
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/scripts/.eslintrc.yml3
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/scripts/bundle.js61
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/scripts/compile-dots.js73
-rwxr-xr-xtools/node_modules/eslint/node_modules/ajv/scripts/info10
-rwxr-xr-xtools/node_modules/eslint/node_modules/ajv/scripts/prepare-tests9
-rwxr-xr-xtools/node_modules/eslint/node_modules/ajv/scripts/travis-gh-pages23
-rw-r--r--tools/node_modules/eslint/node_modules/ansi-escapes/index.js102
-rw-r--r--tools/node_modules/eslint/node_modules/ansi-escapes/license9
-rw-r--r--tools/node_modules/eslint/node_modules/ansi-escapes/package.json82
-rw-r--r--tools/node_modules/eslint/node_modules/ansi-escapes/readme.md174
-rw-r--r--tools/node_modules/eslint/node_modules/ansi-regex/index.js4
-rw-r--r--tools/node_modules/eslint/node_modules/ansi-regex/license21
-rw-r--r--tools/node_modules/eslint/node_modules/ansi-regex/package.json109
-rw-r--r--tools/node_modules/eslint/node_modules/ansi-regex/readme.md39
-rw-r--r--tools/node_modules/eslint/node_modules/ansi-styles/index.js65
-rw-r--r--tools/node_modules/eslint/node_modules/ansi-styles/license21
-rw-r--r--tools/node_modules/eslint/node_modules/ansi-styles/package.json90
-rw-r--r--tools/node_modules/eslint/node_modules/ansi-styles/readme.md86
-rw-r--r--tools/node_modules/eslint/node_modules/argparse/LICENSE21
-rw-r--r--tools/node_modules/eslint/node_modules/argparse/README.md253
-rw-r--r--tools/node_modules/eslint/node_modules/argparse/index.js3
-rw-r--r--tools/node_modules/eslint/node_modules/argparse/lib/action.js146
-rw-r--r--tools/node_modules/eslint/node_modules/argparse/lib/action/append.js53
-rw-r--r--tools/node_modules/eslint/node_modules/argparse/lib/action/append/constant.js47
-rw-r--r--tools/node_modules/eslint/node_modules/argparse/lib/action/count.js40
-rw-r--r--tools/node_modules/eslint/node_modules/argparse/lib/action/help.js47
-rw-r--r--tools/node_modules/eslint/node_modules/argparse/lib/action/store.js50
-rw-r--r--tools/node_modules/eslint/node_modules/argparse/lib/action/store/constant.js43
-rw-r--r--tools/node_modules/eslint/node_modules/argparse/lib/action/store/false.js27
-rw-r--r--tools/node_modules/eslint/node_modules/argparse/lib/action/store/true.js26
-rw-r--r--tools/node_modules/eslint/node_modules/argparse/lib/action/subparsers.js149
-rw-r--r--tools/node_modules/eslint/node_modules/argparse/lib/action/version.js47
-rw-r--r--tools/node_modules/eslint/node_modules/argparse/lib/action_container.js482
-rw-r--r--tools/node_modules/eslint/node_modules/argparse/lib/argparse.js14
-rw-r--r--tools/node_modules/eslint/node_modules/argparse/lib/argument/error.js50
-rw-r--r--tools/node_modules/eslint/node_modules/argparse/lib/argument/exclusive.js54
-rw-r--r--tools/node_modules/eslint/node_modules/argparse/lib/argument/group.js75
-rw-r--r--tools/node_modules/eslint/node_modules/argparse/lib/argument_parser.js1161
-rw-r--r--tools/node_modules/eslint/node_modules/argparse/lib/const.js21
-rw-r--r--tools/node_modules/eslint/node_modules/argparse/lib/help/added_formatters.js87
-rw-r--r--tools/node_modules/eslint/node_modules/argparse/lib/help/formatter.js795
-rw-r--r--tools/node_modules/eslint/node_modules/argparse/lib/namespace.js76
-rw-r--r--tools/node_modules/eslint/node_modules/argparse/lib/utils.js57
-rw-r--r--tools/node_modules/eslint/node_modules/argparse/package.json70
-rw-r--r--tools/node_modules/eslint/node_modules/array-union/index.js6
-rw-r--r--tools/node_modules/eslint/node_modules/array-union/license21
-rw-r--r--tools/node_modules/eslint/node_modules/array-union/package.json72
-rw-r--r--tools/node_modules/eslint/node_modules/array-union/readme.md28
-rw-r--r--tools/node_modules/eslint/node_modules/array-uniq/index.js62
-rw-r--r--tools/node_modules/eslint/node_modules/array-uniq/license21
-rw-r--r--tools/node_modules/eslint/node_modules/array-uniq/package.json69
-rw-r--r--tools/node_modules/eslint/node_modules/array-uniq/readme.md30
-rw-r--r--tools/node_modules/eslint/node_modules/arrify/index.js8
-rw-r--r--tools/node_modules/eslint/node_modules/arrify/license21
-rw-r--r--tools/node_modules/eslint/node_modules/arrify/package.json65
-rw-r--r--tools/node_modules/eslint/node_modules/arrify/readme.md36
-rw-r--r--tools/node_modules/eslint/node_modules/babel-code-frame/README.md60
-rw-r--r--tools/node_modules/eslint/node_modules/babel-code-frame/lib/index.js141
-rw-r--r--tools/node_modules/eslint/node_modules/babel-code-frame/node_modules/chalk/index.js116
-rw-r--r--tools/node_modules/eslint/node_modules/babel-code-frame/node_modules/chalk/license21
-rw-r--r--tools/node_modules/eslint/node_modules/babel-code-frame/node_modules/chalk/package.json114
-rw-r--r--tools/node_modules/eslint/node_modules/babel-code-frame/node_modules/chalk/readme.md213
-rw-r--r--tools/node_modules/eslint/node_modules/babel-code-frame/node_modules/strip-ansi/index.js6
-rw-r--r--tools/node_modules/eslint/node_modules/babel-code-frame/node_modules/strip-ansi/license21
-rw-r--r--tools/node_modules/eslint/node_modules/babel-code-frame/node_modules/strip-ansi/package.json101
-rw-r--r--tools/node_modules/eslint/node_modules/babel-code-frame/node_modules/strip-ansi/readme.md33
-rw-r--r--tools/node_modules/eslint/node_modules/babel-code-frame/package-lock.json66
-rw-r--r--tools/node_modules/eslint/node_modules/babel-code-frame/package.json52
-rw-r--r--tools/node_modules/eslint/node_modules/bail/LICENSE22
-rw-r--r--tools/node_modules/eslint/node_modules/bail/index.js9
-rw-r--r--tools/node_modules/eslint/node_modules/bail/package.json99
-rw-r--r--tools/node_modules/eslint/node_modules/bail/readme.md71
-rw-r--r--tools/node_modules/eslint/node_modules/balanced-match/LICENSE.md21
-rw-r--r--tools/node_modules/eslint/node_modules/balanced-match/README.md91
-rw-r--r--tools/node_modules/eslint/node_modules/balanced-match/index.js59
-rw-r--r--tools/node_modules/eslint/node_modules/balanced-match/package.json77
-rw-r--r--tools/node_modules/eslint/node_modules/brace-expansion/README.md123
-rw-r--r--tools/node_modules/eslint/node_modules/brace-expansion/index.js201
-rw-r--r--tools/node_modules/eslint/node_modules/brace-expansion/package.json75
-rw-r--r--tools/node_modules/eslint/node_modules/caller-path/index.js6
-rw-r--r--tools/node_modules/eslint/node_modules/caller-path/package.json73
-rw-r--r--tools/node_modules/eslint/node_modules/caller-path/readme.md36
-rw-r--r--tools/node_modules/eslint/node_modules/callsites/index.js8
-rw-r--r--tools/node_modules/eslint/node_modules/callsites/package.json68
-rw-r--r--tools/node_modules/eslint/node_modules/callsites/readme.md47
-rw-r--r--tools/node_modules/eslint/node_modules/chalk/index.js228
-rw-r--r--tools/node_modules/eslint/node_modules/chalk/license9
-rw-r--r--tools/node_modules/eslint/node_modules/chalk/node_modules/ansi-styles/index.js152
-rw-r--r--tools/node_modules/eslint/node_modules/chalk/node_modules/ansi-styles/license9
-rw-r--r--tools/node_modules/eslint/node_modules/chalk/node_modules/ansi-styles/package.json86
-rw-r--r--tools/node_modules/eslint/node_modules/chalk/node_modules/ansi-styles/readme.md147
-rw-r--r--tools/node_modules/eslint/node_modules/chalk/node_modules/supports-color/browser.js2
-rw-r--r--tools/node_modules/eslint/node_modules/chalk/node_modules/supports-color/index.js115
-rw-r--r--tools/node_modules/eslint/node_modules/chalk/node_modules/supports-color/license9
-rw-r--r--tools/node_modules/eslint/node_modules/chalk/node_modules/supports-color/package.json85
-rw-r--r--tools/node_modules/eslint/node_modules/chalk/node_modules/supports-color/readme.md66
-rw-r--r--tools/node_modules/eslint/node_modules/chalk/package.json103
-rw-r--r--tools/node_modules/eslint/node_modules/chalk/readme.md309
-rw-r--r--tools/node_modules/eslint/node_modules/chalk/templates.js128
-rw-r--r--tools/node_modules/eslint/node_modules/chalk/types/index.d.ts97
-rw-r--r--tools/node_modules/eslint/node_modules/character-entities-legacy/LICENSE22
-rw-r--r--tools/node_modules/eslint/node_modules/character-entities-legacy/index.json108
-rw-r--r--tools/node_modules/eslint/node_modules/character-entities-legacy/package.json97
-rw-r--r--tools/node_modules/eslint/node_modules/character-entities-legacy/readme.md61
-rw-r--r--tools/node_modules/eslint/node_modules/character-entities/LICENSE22
-rw-r--r--tools/node_modules/eslint/node_modules/character-entities/index.json2224
-rw-r--r--tools/node_modules/eslint/node_modules/character-entities/package.json97
-rw-r--r--tools/node_modules/eslint/node_modules/character-entities/readme.md58
-rw-r--r--tools/node_modules/eslint/node_modules/character-reference-invalid/LICENSE22
-rw-r--r--tools/node_modules/eslint/node_modules/character-reference-invalid/index.json30
-rw-r--r--tools/node_modules/eslint/node_modules/character-reference-invalid/package.json105
-rw-r--r--tools/node_modules/eslint/node_modules/character-reference-invalid/readme.md60
-rw-r--r--tools/node_modules/eslint/node_modules/chardet/LICENSE19
-rw-r--r--tools/node_modules/eslint/node_modules/chardet/README.md66
-rw-r--r--tools/node_modules/eslint/node_modules/chardet/encoding/iso2022.js141
-rw-r--r--tools/node_modules/eslint/node_modules/chardet/encoding/mbcs.js502
-rw-r--r--tools/node_modules/eslint/node_modules/chardet/encoding/sbcs.js907
-rw-r--r--tools/node_modules/eslint/node_modules/chardet/encoding/unicode.js112
-rw-r--r--tools/node_modules/eslint/node_modules/chardet/encoding/utf8.js84
-rw-r--r--tools/node_modules/eslint/node_modules/chardet/index.js117
-rw-r--r--tools/node_modules/eslint/node_modules/chardet/match.js6
-rw-r--r--tools/node_modules/eslint/node_modules/chardet/package.json71
-rwxr-xr-xtools/node_modules/eslint/node_modules/chardet/scripts/release16
-rw-r--r--tools/node_modules/eslint/node_modules/chardet/yarn.lock364
-rw-r--r--tools/node_modules/eslint/node_modules/circular-json/LICENSE.txt19
-rw-r--r--tools/node_modules/eslint/node_modules/circular-json/README.md135
-rw-r--r--tools/node_modules/eslint/node_modules/circular-json/build/circular-json.js2
-rw-r--r--tools/node_modules/eslint/node_modules/circular-json/build/circular-json.max.js189
-rw-r--r--tools/node_modules/eslint/node_modules/circular-json/build/circular-json.node.js185
-rw-r--r--tools/node_modules/eslint/node_modules/circular-json/package.json65
-rw-r--r--tools/node_modules/eslint/node_modules/circular-json/template/license.after2
-rw-r--r--tools/node_modules/eslint/node_modules/circular-json/template/license.before1
-rw-r--r--tools/node_modules/eslint/node_modules/cli-cursor/index.js39
-rw-r--r--tools/node_modules/eslint/node_modules/cli-cursor/license21
-rw-r--r--tools/node_modules/eslint/node_modules/cli-cursor/package.json78
-rw-r--r--tools/node_modules/eslint/node_modules/cli-cursor/readme.md45
-rw-r--r--tools/node_modules/eslint/node_modules/cli-width/LICENSE13
-rw-r--r--tools/node_modules/eslint/node_modules/cli-width/README.md72
-rw-r--r--tools/node_modules/eslint/node_modules/cli-width/index.js49
-rw-r--r--tools/node_modules/eslint/node_modules/cli-width/package.json59
-rw-r--r--tools/node_modules/eslint/node_modules/co/LICENSE22
-rw-r--r--tools/node_modules/eslint/node_modules/co/Readme.md212
-rw-r--r--tools/node_modules/eslint/node_modules/co/index.js237
-rw-r--r--tools/node_modules/eslint/node_modules/co/package.json66
-rw-r--r--tools/node_modules/eslint/node_modules/collapse-white-space/LICENSE22
-rw-r--r--tools/node_modules/eslint/node_modules/collapse-white-space/index.js8
-rw-r--r--tools/node_modules/eslint/node_modules/collapse-white-space/package.json94
-rw-r--r--tools/node_modules/eslint/node_modules/collapse-white-space/readme.md45
-rw-r--r--tools/node_modules/eslint/node_modules/color-convert/LICENSE21
-rw-r--r--tools/node_modules/eslint/node_modules/color-convert/README.md68
-rw-r--r--tools/node_modules/eslint/node_modules/color-convert/conversions.js861
-rw-r--r--tools/node_modules/eslint/node_modules/color-convert/index.js78
-rw-r--r--tools/node_modules/eslint/node_modules/color-convert/package.json81
-rw-r--r--tools/node_modules/eslint/node_modules/color-convert/route.js97
-rw-r--r--tools/node_modules/eslint/node_modules/color-name/.eslintrc.json43
-rw-r--r--tools/node_modules/eslint/node_modules/color-name/LICENSE8
-rw-r--r--tools/node_modules/eslint/node_modules/color-name/README.md11
-rw-r--r--tools/node_modules/eslint/node_modules/color-name/index.js152
-rw-r--r--tools/node_modules/eslint/node_modules/color-name/package.json53
-rw-r--r--tools/node_modules/eslint/node_modules/concat-map/LICENSE18
-rw-r--r--tools/node_modules/eslint/node_modules/concat-map/README.markdown62
-rw-r--r--tools/node_modules/eslint/node_modules/concat-map/index.js13
-rw-r--r--tools/node_modules/eslint/node_modules/concat-map/package.json88
-rw-r--r--tools/node_modules/eslint/node_modules/concat-stream/LICENSE24
-rw-r--r--tools/node_modules/eslint/node_modules/concat-stream/index.js143
-rw-r--r--tools/node_modules/eslint/node_modules/concat-stream/package.json83
-rw-r--r--tools/node_modules/eslint/node_modules/concat-stream/readme.md102
-rw-r--r--tools/node_modules/eslint/node_modules/core-util-is/LICENSE19
-rw-r--r--tools/node_modules/eslint/node_modules/core-util-is/README.md3
-rw-r--r--tools/node_modules/eslint/node_modules/core-util-is/float.patch604
-rw-r--r--tools/node_modules/eslint/node_modules/core-util-is/lib/util.js107
-rw-r--r--tools/node_modules/eslint/node_modules/core-util-is/package.json62
-rw-r--r--tools/node_modules/eslint/node_modules/cross-spawn/LICENSE19
-rw-r--r--tools/node_modules/eslint/node_modules/cross-spawn/README.md85
-rw-r--r--tools/node_modules/eslint/node_modules/cross-spawn/index.js59
-rw-r--r--tools/node_modules/eslint/node_modules/cross-spawn/lib/enoent.js73
-rw-r--r--tools/node_modules/eslint/node_modules/cross-spawn/lib/parse.js113
-rw-r--r--tools/node_modules/eslint/node_modules/cross-spawn/lib/util/escapeArgument.js30
-rw-r--r--tools/node_modules/eslint/node_modules/cross-spawn/lib/util/escapeCommand.js12
-rw-r--r--tools/node_modules/eslint/node_modules/cross-spawn/lib/util/hasEmptyArgumentBug.js18
-rw-r--r--tools/node_modules/eslint/node_modules/cross-spawn/lib/util/readShebang.js37
-rw-r--r--tools/node_modules/eslint/node_modules/cross-spawn/lib/util/resolveCommand.js31
-rw-r--r--tools/node_modules/eslint/node_modules/cross-spawn/package.json83
-rw-r--r--tools/node_modules/eslint/node_modules/debug/.coveralls.yml1
-rw-r--r--tools/node_modules/eslint/node_modules/debug/LICENSE19
-rw-r--r--tools/node_modules/eslint/node_modules/debug/Makefile58
-rw-r--r--tools/node_modules/eslint/node_modules/debug/Readme.md368
-rw-r--r--tools/node_modules/eslint/node_modules/debug/karma.conf.js70
-rw-r--r--tools/node_modules/eslint/node_modules/debug/node.js1
-rw-r--r--tools/node_modules/eslint/node_modules/debug/package.json82
-rw-r--r--tools/node_modules/eslint/node_modules/debug/src/browser.js195
-rw-r--r--tools/node_modules/eslint/node_modules/debug/src/debug.js225
-rw-r--r--tools/node_modules/eslint/node_modules/debug/src/index.js10
-rw-r--r--tools/node_modules/eslint/node_modules/debug/src/node.js186
-rw-r--r--tools/node_modules/eslint/node_modules/deep-is/LICENSE22
-rw-r--r--tools/node_modules/eslint/node_modules/deep-is/README.markdown70
-rw-r--r--tools/node_modules/eslint/node_modules/deep-is/index.js102
-rw-r--r--tools/node_modules/eslint/node_modules/deep-is/package.json90
-rw-r--r--tools/node_modules/eslint/node_modules/del/index.js73
-rw-r--r--tools/node_modules/eslint/node_modules/del/license21
-rw-r--r--tools/node_modules/eslint/node_modules/del/package.json93
-rw-r--r--tools/node_modules/eslint/node_modules/del/readme.md106
-rw-r--r--tools/node_modules/eslint/node_modules/doctrine/LICENSE177
-rw-r--r--tools/node_modules/eslint/node_modules/doctrine/LICENSE.closure-compiler202
-rw-r--r--tools/node_modules/eslint/node_modules/doctrine/LICENSE.esprima19
-rw-r--r--tools/node_modules/eslint/node_modules/doctrine/README.md164
-rw-r--r--tools/node_modules/eslint/node_modules/doctrine/lib/doctrine.js891
-rw-r--r--tools/node_modules/eslint/node_modules/doctrine/lib/typed.js1283
-rw-r--r--tools/node_modules/eslint/node_modules/doctrine/lib/utility.js35
-rw-r--r--tools/node_modules/eslint/node_modules/doctrine/package.json88
-rw-r--r--tools/node_modules/eslint/node_modules/escape-string-regexp/index.js11
-rw-r--r--tools/node_modules/eslint/node_modules/escape-string-regexp/license21
-rw-r--r--tools/node_modules/eslint/node_modules/escape-string-regexp/package.json83
-rw-r--r--tools/node_modules/eslint/node_modules/escape-string-regexp/readme.md27
-rw-r--r--tools/node_modules/eslint/node_modules/eslint-plugin-markdown/LICENSE21
-rw-r--r--tools/node_modules/eslint/node_modules/eslint-plugin-markdown/README.md140
-rw-r--r--tools/node_modules/eslint/node_modules/eslint-plugin-markdown/index.js8
-rw-r--r--tools/node_modules/eslint/node_modules/eslint-plugin-markdown/lib/index.js17
-rw-r--r--tools/node_modules/eslint/node_modules/eslint-plugin-markdown/lib/processor.js164
-rw-r--r--tools/node_modules/eslint/node_modules/eslint-plugin-markdown/package.json80
-rw-r--r--tools/node_modules/eslint/node_modules/eslint-scope/LICENSE23
-rw-r--r--tools/node_modules/eslint/node_modules/eslint-scope/README.md54
-rw-r--r--tools/node_modules/eslint/node_modules/eslint-scope/lib/definition.js86
-rw-r--r--tools/node_modules/eslint/node_modules/eslint-scope/lib/index.js165
-rw-r--r--tools/node_modules/eslint/node_modules/eslint-scope/lib/pattern-visitor.js152
-rw-r--r--tools/node_modules/eslint/node_modules/eslint-scope/lib/reference.js167
-rw-r--r--tools/node_modules/eslint/node_modules/eslint-scope/lib/referencer.js638
-rw-r--r--tools/node_modules/eslint/node_modules/eslint-scope/lib/scope-manager.js255
-rw-r--r--tools/node_modules/eslint/node_modules/eslint-scope/lib/scope.js722
-rw-r--r--tools/node_modules/eslint/node_modules/eslint-scope/lib/variable.js89
-rw-r--r--tools/node_modules/eslint/node_modules/eslint-scope/package.json74
-rw-r--r--tools/node_modules/eslint/node_modules/espree/LICENSE22
-rw-r--r--tools/node_modules/eslint/node_modules/espree/README.md155
-rw-r--r--tools/node_modules/eslint/node_modules/espree/espree.js799
-rw-r--r--tools/node_modules/eslint/node_modules/espree/lib/ast-node-types.js98
-rw-r--r--tools/node_modules/eslint/node_modules/espree/lib/comment-attachment.js175
-rw-r--r--tools/node_modules/eslint/node_modules/espree/lib/features.js32
-rw-r--r--tools/node_modules/eslint/node_modules/espree/lib/token-translator.js258
-rw-r--r--tools/node_modules/eslint/node_modules/espree/lib/visitor-keys.js127
-rw-r--r--tools/node_modules/eslint/node_modules/espree/package.json91
-rw-r--r--tools/node_modules/eslint/node_modules/esprima/LICENSE.BSD21
-rw-r--r--tools/node_modules/eslint/node_modules/esprima/README.md46
-rw-r--r--tools/node_modules/eslint/node_modules/esprima/bin/esparse.js139
-rw-r--r--tools/node_modules/eslint/node_modules/esprima/bin/esvalidate.js236
-rw-r--r--tools/node_modules/eslint/node_modules/esprima/dist/esprima.js6700
-rw-r--r--tools/node_modules/eslint/node_modules/esprima/package.json137
-rw-r--r--tools/node_modules/eslint/node_modules/esquery/README.md26
-rw-r--r--tools/node_modules/eslint/node_modules/esquery/esquery.js320
-rw-r--r--tools/node_modules/eslint/node_modules/esquery/license.txt24
-rw-r--r--tools/node_modules/eslint/node_modules/esquery/package.json72
-rw-r--r--tools/node_modules/eslint/node_modules/esquery/parser.js2595
-rw-r--r--tools/node_modules/eslint/node_modules/esrecurse/.babelrc3
-rw-r--r--tools/node_modules/eslint/node_modules/esrecurse/README.md170
-rw-r--r--tools/node_modules/eslint/node_modules/esrecurse/esrecurse.js135
-rw-r--r--tools/node_modules/eslint/node_modules/esrecurse/package-lock.json4322
-rwxr-xr-xtools/node_modules/eslint/node_modules/esrecurse/package.json81
-rw-r--r--tools/node_modules/eslint/node_modules/estraverse/.babelrc3
-rw-r--r--tools/node_modules/eslint/node_modules/estraverse/LICENSE.BSD19
-rw-r--r--tools/node_modules/eslint/node_modules/estraverse/estraverse.js849
-rw-r--r--tools/node_modules/eslint/node_modules/estraverse/package.json71
-rw-r--r--tools/node_modules/eslint/node_modules/esutils/LICENSE.BSD19
-rw-r--r--tools/node_modules/eslint/node_modules/esutils/README.md169
-rw-r--r--tools/node_modules/eslint/node_modules/esutils/lib/ast.js144
-rw-r--r--tools/node_modules/eslint/node_modules/esutils/lib/code.js135
-rw-r--r--tools/node_modules/eslint/node_modules/esutils/lib/keyword.js165
-rw-r--r--tools/node_modules/eslint/node_modules/esutils/lib/utils.js33
-rw-r--r--tools/node_modules/eslint/node_modules/esutils/package.json79
-rw-r--r--tools/node_modules/eslint/node_modules/extend/LICENSE23
-rw-r--r--tools/node_modules/eslint/node_modules/extend/README.md81
-rw-r--r--tools/node_modules/eslint/node_modules/extend/index.js86
-rw-r--r--tools/node_modules/eslint/node_modules/extend/package.json75
-rw-r--r--tools/node_modules/eslint/node_modules/external-editor/LICENSE21
-rw-r--r--tools/node_modules/eslint/node_modules/external-editor/README.md147
-rw-r--r--tools/node_modules/eslint/node_modules/external-editor/example_async.js40
-rw-r--r--tools/node_modules/eslint/node_modules/external-editor/example_sync.js34
-rw-r--r--tools/node_modules/eslint/node_modules/external-editor/main/errors/CreateFileError.js29
-rw-r--r--tools/node_modules/eslint/node_modules/external-editor/main/errors/LaunchEditorError.js29
-rw-r--r--tools/node_modules/eslint/node_modules/external-editor/main/errors/ReadFileError.js29
-rw-r--r--tools/node_modules/eslint/node_modules/external-editor/main/errors/RemoveFileError.js29
-rw-r--r--tools/node_modules/eslint/node_modules/external-editor/main/index.js219
-rw-r--r--tools/node_modules/eslint/node_modules/external-editor/package.json76
-rw-r--r--tools/node_modules/eslint/node_modules/fast-deep-equal/.eslintrc.yml25
-rw-r--r--tools/node_modules/eslint/node_modules/fast-deep-equal/LICENSE21
-rw-r--r--tools/node_modules/eslint/node_modules/fast-deep-equal/README.md55
-rw-r--r--tools/node_modules/eslint/node_modules/fast-deep-equal/index.js43
-rw-r--r--tools/node_modules/eslint/node_modules/fast-deep-equal/package.json78
-rw-r--r--tools/node_modules/eslint/node_modules/fast-json-stable-stringify/.eslintrc.yml26
-rw-r--r--tools/node_modules/eslint/node_modules/fast-json-stable-stringify/LICENSE18
-rw-r--r--tools/node_modules/eslint/node_modules/fast-json-stable-stringify/README.md119
-rw-r--r--tools/node_modules/eslint/node_modules/fast-json-stable-stringify/index.js59
-rw-r--r--tools/node_modules/eslint/node_modules/fast-json-stable-stringify/package.json78
-rw-r--r--tools/node_modules/eslint/node_modules/fast-levenshtein/LICENSE.md25
-rw-r--r--tools/node_modules/eslint/node_modules/fast-levenshtein/README.md104
-rw-r--r--tools/node_modules/eslint/node_modules/fast-levenshtein/levenshtein.js136
-rw-r--r--tools/node_modules/eslint/node_modules/fast-levenshtein/package.json72
-rw-r--r--tools/node_modules/eslint/node_modules/figures/index.js147
-rw-r--r--tools/node_modules/eslint/node_modules/figures/license21
-rw-r--r--tools/node_modules/eslint/node_modules/figures/package.json79
-rw-r--r--tools/node_modules/eslint/node_modules/figures/readme.md120
-rw-r--r--tools/node_modules/eslint/node_modules/file-entry-cache/LICENSE22
-rw-r--r--tools/node_modules/eslint/node_modules/file-entry-cache/README.md107
-rw-r--r--tools/node_modules/eslint/node_modules/file-entry-cache/cache.js216
-rw-r--r--tools/node_modules/eslint/node_modules/file-entry-cache/changelog.md74
-rw-r--r--tools/node_modules/eslint/node_modules/file-entry-cache/package.json116
-rw-r--r--tools/node_modules/eslint/node_modules/flat-cache/LICENSE22
-rw-r--r--tools/node_modules/eslint/node_modules/flat-cache/README.md73
-rw-r--r--tools/node_modules/eslint/node_modules/flat-cache/cache.js197
-rw-r--r--tools/node_modules/eslint/node_modules/flat-cache/changelog.md155
-rw-r--r--tools/node_modules/eslint/node_modules/flat-cache/package.json119
-rw-r--r--tools/node_modules/eslint/node_modules/flat-cache/utils.js39
-rw-r--r--tools/node_modules/eslint/node_modules/fs.realpath/LICENSE43
-rw-r--r--tools/node_modules/eslint/node_modules/fs.realpath/README.md33
-rw-r--r--tools/node_modules/eslint/node_modules/fs.realpath/index.js66
-rw-r--r--tools/node_modules/eslint/node_modules/fs.realpath/old.js303
-rw-r--r--tools/node_modules/eslint/node_modules/fs.realpath/package.json59
-rw-r--r--tools/node_modules/eslint/node_modules/function-bind/LICENSE20
-rw-r--r--tools/node_modules/eslint/node_modules/function-bind/README.md48
-rw-r--r--tools/node_modules/eslint/node_modules/function-bind/implementation.js52
-rw-r--r--tools/node_modules/eslint/node_modules/function-bind/index.js5
-rw-r--r--tools/node_modules/eslint/node_modules/function-bind/package.json94
-rw-r--r--tools/node_modules/eslint/node_modules/functional-red-black-tree/LICENSE22
-rw-r--r--tools/node_modules/eslint/node_modules/functional-red-black-tree/README.md237
-rw-r--r--tools/node_modules/eslint/node_modules/functional-red-black-tree/bench/test.js11
-rw-r--r--tools/node_modules/eslint/node_modules/functional-red-black-tree/package.json68
-rw-r--r--tools/node_modules/eslint/node_modules/functional-red-black-tree/rbtree.js996
-rw-r--r--tools/node_modules/eslint/node_modules/glob/LICENSE15
-rw-r--r--tools/node_modules/eslint/node_modules/glob/README.md368
-rw-r--r--tools/node_modules/eslint/node_modules/glob/changelog.md67
-rw-r--r--tools/node_modules/eslint/node_modules/glob/common.js240
-rw-r--r--tools/node_modules/eslint/node_modules/glob/glob.js790
-rw-r--r--tools/node_modules/eslint/node_modules/glob/package.json78
-rw-r--r--tools/node_modules/eslint/node_modules/glob/sync.js486
-rw-r--r--tools/node_modules/eslint/node_modules/globals/globals.json1455
-rw-r--r--tools/node_modules/eslint/node_modules/globals/index.js2
-rw-r--r--tools/node_modules/eslint/node_modules/globals/license9
-rw-r--r--tools/node_modules/eslint/node_modules/globals/package.json73
-rw-r--r--tools/node_modules/eslint/node_modules/globals/readme.md41
-rw-r--r--tools/node_modules/eslint/node_modules/globby/index.js65
-rw-r--r--tools/node_modules/eslint/node_modules/globby/license21
-rw-r--r--tools/node_modules/eslint/node_modules/globby/package.json102
-rw-r--r--tools/node_modules/eslint/node_modules/globby/readme.md82
-rw-r--r--tools/node_modules/eslint/node_modules/graceful-fs/LICENSE15
-rw-r--r--tools/node_modules/eslint/node_modules/graceful-fs/README.md133
-rw-r--r--tools/node_modules/eslint/node_modules/graceful-fs/fs.js21
-rw-r--r--tools/node_modules/eslint/node_modules/graceful-fs/graceful-fs.js262
-rw-r--r--tools/node_modules/eslint/node_modules/graceful-fs/legacy-streams.js118
-rw-r--r--tools/node_modules/eslint/node_modules/graceful-fs/package.json76
-rw-r--r--tools/node_modules/eslint/node_modules/graceful-fs/polyfills.js330
-rw-r--r--tools/node_modules/eslint/node_modules/has-ansi/index.js4
-rw-r--r--tools/node_modules/eslint/node_modules/has-ansi/license21
-rw-r--r--tools/node_modules/eslint/node_modules/has-ansi/package.json95
-rw-r--r--tools/node_modules/eslint/node_modules/has-ansi/readme.md36
-rw-r--r--tools/node_modules/eslint/node_modules/has-flag/index.js10
-rw-r--r--tools/node_modules/eslint/node_modules/has-flag/license21
-rw-r--r--tools/node_modules/eslint/node_modules/has-flag/package.json93
-rw-r--r--tools/node_modules/eslint/node_modules/has-flag/readme.md67
-rw-r--r--tools/node_modules/eslint/node_modules/has/LICENSE-MIT22
-rw-r--r--tools/node_modules/eslint/node_modules/has/README.mkd18
-rw-r--r--tools/node_modules/eslint/node_modules/has/package.json62
-rw-r--r--tools/node_modules/eslint/node_modules/has/src/index.js3
-rw-r--r--tools/node_modules/eslint/node_modules/iconv-lite/LICENSE21
-rw-r--r--tools/node_modules/eslint/node_modules/iconv-lite/README.md160
-rw-r--r--tools/node_modules/eslint/node_modules/iconv-lite/encodings/dbcs-codec.js555
-rw-r--r--tools/node_modules/eslint/node_modules/iconv-lite/encodings/dbcs-data.js176
-rw-r--r--tools/node_modules/eslint/node_modules/iconv-lite/encodings/index.js22
-rw-r--r--tools/node_modules/eslint/node_modules/iconv-lite/encodings/internal.js188
-rw-r--r--tools/node_modules/eslint/node_modules/iconv-lite/encodings/sbcs-codec.js73
-rw-r--r--tools/node_modules/eslint/node_modules/iconv-lite/encodings/sbcs-data-generated.js451
-rw-r--r--tools/node_modules/eslint/node_modules/iconv-lite/encodings/sbcs-data.js169
-rw-r--r--tools/node_modules/eslint/node_modules/iconv-lite/encodings/tables/big5-added.json122
-rw-r--r--tools/node_modules/eslint/node_modules/iconv-lite/encodings/tables/cp936.json264
-rw-r--r--tools/node_modules/eslint/node_modules/iconv-lite/encodings/tables/cp949.json273
-rw-r--r--tools/node_modules/eslint/node_modules/iconv-lite/encodings/tables/cp950.json177
-rw-r--r--tools/node_modules/eslint/node_modules/iconv-lite/encodings/tables/eucjp.json182
-rw-r--r--tools/node_modules/eslint/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json1
-rw-r--r--tools/node_modules/eslint/node_modules/iconv-lite/encodings/tables/gbk-added.json55
-rw-r--r--tools/node_modules/eslint/node_modules/iconv-lite/encodings/tables/shiftjis.json125
-rw-r--r--tools/node_modules/eslint/node_modules/iconv-lite/encodings/utf16.js177
-rw-r--r--tools/node_modules/eslint/node_modules/iconv-lite/encodings/utf7.js290
-rw-r--r--tools/node_modules/eslint/node_modules/iconv-lite/lib/bom-handling.js52
-rw-r--r--tools/node_modules/eslint/node_modules/iconv-lite/lib/extend-node.js215
-rw-r--r--tools/node_modules/eslint/node_modules/iconv-lite/lib/index.d.ts24
-rw-r--r--tools/node_modules/eslint/node_modules/iconv-lite/lib/index.js148
-rw-r--r--tools/node_modules/eslint/node_modules/iconv-lite/lib/streams.js121
-rw-r--r--tools/node_modules/eslint/node_modules/iconv-lite/package.json123
-rwxr-xr-xtools/node_modules/eslint/node_modules/ignore/README.md262
-rw-r--r--tools/node_modules/eslint/node_modules/ignore/ignore.js425
-rw-r--r--tools/node_modules/eslint/node_modules/ignore/index.d.ts41
-rw-r--r--tools/node_modules/eslint/node_modules/ignore/package.json82
-rw-r--r--tools/node_modules/eslint/node_modules/imurmurhash/README.md122
-rw-r--r--tools/node_modules/eslint/node_modules/imurmurhash/imurmurhash.js138
-rw-r--r--tools/node_modules/eslint/node_modules/imurmurhash/imurmurhash.min.js12
-rw-r--r--tools/node_modules/eslint/node_modules/imurmurhash/package.json63
-rw-r--r--tools/node_modules/eslint/node_modules/inflight/LICENSE15
-rw-r--r--tools/node_modules/eslint/node_modules/inflight/README.md37
-rw-r--r--tools/node_modules/eslint/node_modules/inflight/inflight.js54
-rw-r--r--tools/node_modules/eslint/node_modules/inflight/package.json58
-rw-r--r--tools/node_modules/eslint/node_modules/inherits/LICENSE16
-rw-r--r--tools/node_modules/eslint/node_modules/inherits/README.md42
-rw-r--r--tools/node_modules/eslint/node_modules/inherits/inherits.js7
-rw-r--r--tools/node_modules/eslint/node_modules/inherits/inherits_browser.js23
-rw-r--r--tools/node_modules/eslint/node_modules/inherits/package.json63
-rw-r--r--tools/node_modules/eslint/node_modules/inquirer/README.md386
-rw-r--r--tools/node_modules/eslint/node_modules/inquirer/lib/inquirer.js84
-rw-r--r--tools/node_modules/eslint/node_modules/inquirer/lib/objects/choice.js35
-rw-r--r--tools/node_modules/eslint/node_modules/inquirer/lib/objects/choices.js112
-rw-r--r--tools/node_modules/eslint/node_modules/inquirer/lib/objects/separator.js34
-rw-r--r--tools/node_modules/eslint/node_modules/inquirer/lib/prompts/base.js139
-rw-r--r--tools/node_modules/eslint/node_modules/inquirer/lib/prompts/checkbox.js236
-rw-r--r--tools/node_modules/eslint/node_modules/inquirer/lib/prompts/confirm.js106
-rw-r--r--tools/node_modules/eslint/node_modules/inquirer/lib/prompts/editor.js111
-rw-r--r--tools/node_modules/eslint/node_modules/inquirer/lib/prompts/expand.js260
-rw-r--r--tools/node_modules/eslint/node_modules/inquirer/lib/prompts/input.js104
-rw-r--r--tools/node_modules/eslint/node_modules/inquirer/lib/prompts/list.js184
-rw-r--r--tools/node_modules/eslint/node_modules/inquirer/lib/prompts/password.js115
-rw-r--r--tools/node_modules/eslint/node_modules/inquirer/lib/prompts/rawlist.js179
-rw-r--r--tools/node_modules/eslint/node_modules/inquirer/lib/ui/baseUI.js75
-rw-r--r--tools/node_modules/eslint/node_modules/inquirer/lib/ui/bottom-bar.js106
-rw-r--r--tools/node_modules/eslint/node_modules/inquirer/lib/ui/prompt.js115
-rw-r--r--tools/node_modules/eslint/node_modules/inquirer/lib/utils/events.js45
-rw-r--r--tools/node_modules/eslint/node_modules/inquirer/lib/utils/paginator.js38
-rw-r--r--tools/node_modules/eslint/node_modules/inquirer/lib/utils/readline.js51
-rw-r--r--tools/node_modules/eslint/node_modules/inquirer/lib/utils/screen-manager.js135
-rw-r--r--tools/node_modules/eslint/node_modules/inquirer/lib/utils/utils.js26
-rw-r--r--tools/node_modules/eslint/node_modules/inquirer/package.json94
-rw-r--r--tools/node_modules/eslint/node_modules/is-alphabetical/LICENSE22
-rw-r--r--tools/node_modules/eslint/node_modules/is-alphabetical/index.js13
-rw-r--r--tools/node_modules/eslint/node_modules/is-alphabetical/package.json103
-rw-r--r--tools/node_modules/eslint/node_modules/is-alphabetical/readme.md57
-rw-r--r--tools/node_modules/eslint/node_modules/is-alphanumerical/LICENSE22
-rw-r--r--tools/node_modules/eslint/node_modules/is-alphanumerical/index.js12
-rw-r--r--tools/node_modules/eslint/node_modules/is-alphanumerical/package.json104
-rw-r--r--tools/node_modules/eslint/node_modules/is-alphanumerical/readme.md58
-rw-r--r--tools/node_modules/eslint/node_modules/is-buffer/LICENSE21
-rw-r--r--tools/node_modules/eslint/node_modules/is-buffer/README.md53
-rw-r--r--tools/node_modules/eslint/node_modules/is-buffer/index.js21
-rw-r--r--tools/node_modules/eslint/node_modules/is-buffer/package.json77
-rw-r--r--tools/node_modules/eslint/node_modules/is-decimal/LICENSE22
-rw-r--r--tools/node_modules/eslint/node_modules/is-decimal/index.js12
-rw-r--r--tools/node_modules/eslint/node_modules/is-decimal/package.json101
-rw-r--r--tools/node_modules/eslint/node_modules/is-decimal/readme.md56
-rw-r--r--tools/node_modules/eslint/node_modules/is-fullwidth-code-point/index.js46
-rw-r--r--tools/node_modules/eslint/node_modules/is-fullwidth-code-point/license21
-rw-r--r--tools/node_modules/eslint/node_modules/is-fullwidth-code-point/package.json78
-rw-r--r--tools/node_modules/eslint/node_modules/is-fullwidth-code-point/readme.md39
-rw-r--r--tools/node_modules/eslint/node_modules/is-hexadecimal/LICENSE22
-rw-r--r--tools/node_modules/eslint/node_modules/is-hexadecimal/index.js14
-rw-r--r--tools/node_modules/eslint/node_modules/is-hexadecimal/package.json99
-rw-r--r--tools/node_modules/eslint/node_modules/is-hexadecimal/readme.md57
-rw-r--r--tools/node_modules/eslint/node_modules/is-path-cwd/index.js6
-rw-r--r--tools/node_modules/eslint/node_modules/is-path-cwd/package.json65
-rw-r--r--tools/node_modules/eslint/node_modules/is-path-cwd/readme.md28
-rw-r--r--tools/node_modules/eslint/node_modules/is-path-in-cwd/index.js6
-rw-r--r--tools/node_modules/eslint/node_modules/is-path-in-cwd/package.json70
-rw-r--r--tools/node_modules/eslint/node_modules/is-path-in-cwd/readme.md28
-rw-r--r--tools/node_modules/eslint/node_modules/is-path-inside/index.js14
-rw-r--r--tools/node_modules/eslint/node_modules/is-path-inside/package.json68
-rw-r--r--tools/node_modules/eslint/node_modules/is-path-inside/readme.md31
-rw-r--r--tools/node_modules/eslint/node_modules/is-plain-obj/index.js7
-rw-r--r--tools/node_modules/eslint/node_modules/is-plain-obj/license21
-rw-r--r--tools/node_modules/eslint/node_modules/is-plain-obj/package.json68
-rw-r--r--tools/node_modules/eslint/node_modules/is-plain-obj/readme.md35
-rw-r--r--tools/node_modules/eslint/node_modules/is-promise/LICENSE19
-rw-r--r--tools/node_modules/eslint/node_modules/is-promise/index.js5
-rw-r--r--tools/node_modules/eslint/node_modules/is-promise/package.json50
-rw-r--r--tools/node_modules/eslint/node_modules/is-promise/readme.md29
-rw-r--r--tools/node_modules/eslint/node_modules/is-resolvable/LICENSE20
-rwxr-xr-xtools/node_modules/eslint/node_modules/is-resolvable/README.md68
-rwxr-xr-xtools/node_modules/eslint/node_modules/is-resolvable/index.js26
-rw-r--r--tools/node_modules/eslint/node_modules/is-resolvable/package.json73
-rw-r--r--tools/node_modules/eslint/node_modules/is-whitespace-character/LICENSE22
-rw-r--r--tools/node_modules/eslint/node_modules/is-whitespace-character/index.js14
-rw-r--r--tools/node_modules/eslint/node_modules/is-whitespace-character/package.json101
-rw-r--r--tools/node_modules/eslint/node_modules/is-whitespace-character/readme.md61
-rw-r--r--tools/node_modules/eslint/node_modules/is-word-character/LICENSE22
-rw-r--r--tools/node_modules/eslint/node_modules/is-word-character/index.js14
-rw-r--r--tools/node_modules/eslint/node_modules/is-word-character/package.json99
-rw-r--r--tools/node_modules/eslint/node_modules/is-word-character/readme.md60
-rw-r--r--tools/node_modules/eslint/node_modules/isarray/Makefile6
-rw-r--r--tools/node_modules/eslint/node_modules/isarray/README.md60
-rw-r--r--tools/node_modules/eslint/node_modules/isarray/index.js5
-rw-r--r--tools/node_modules/eslint/node_modules/isarray/package.json73
-rw-r--r--tools/node_modules/eslint/node_modules/isexe/LICENSE15
-rw-r--r--tools/node_modules/eslint/node_modules/isexe/README.md51
-rw-r--r--tools/node_modules/eslint/node_modules/isexe/index.js57
-rw-r--r--tools/node_modules/eslint/node_modules/isexe/mode.js41
-rw-r--r--tools/node_modules/eslint/node_modules/isexe/package.json60
-rw-r--r--tools/node_modules/eslint/node_modules/isexe/windows.js42
-rw-r--r--tools/node_modules/eslint/node_modules/js-tokens/LICENSE21
-rw-r--r--tools/node_modules/eslint/node_modules/js-tokens/index.js23
-rw-r--r--tools/node_modules/eslint/node_modules/js-tokens/package.json64
-rw-r--r--tools/node_modules/eslint/node_modules/js-tokens/readme.md222
-rw-r--r--tools/node_modules/eslint/node_modules/js-yaml/LICENSE21
-rw-r--r--tools/node_modules/eslint/node_modules/js-yaml/README.md313
-rwxr-xr-xtools/node_modules/eslint/node_modules/js-yaml/bin/js-yaml.js132
-rw-r--r--tools/node_modules/eslint/node_modules/js-yaml/dist/js-yaml.js3902
-rw-r--r--tools/node_modules/eslint/node_modules/js-yaml/dist/js-yaml.min.js1
-rw-r--r--tools/node_modules/eslint/node_modules/js-yaml/index.js7
-rw-r--r--tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml.js39
-rw-r--r--tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/common.js59
-rw-r--r--tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/dumper.js819
-rw-r--r--tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/exception.js43
-rw-r--r--tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/loader.js1598
-rw-r--r--tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/mark.js76
-rw-r--r--tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/schema.js108
-rw-r--r--tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/schema/core.js18
-rw-r--r--tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/schema/default_full.js25
-rw-r--r--tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js28
-rw-r--r--tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js17
-rw-r--r--tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/schema/json.js25
-rw-r--r--tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type.js61
-rw-r--r--tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/binary.js138
-rw-r--r--tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/bool.js35
-rw-r--r--tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/float.js116
-rw-r--r--tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/int.js172
-rw-r--r--tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/js/function.js84
-rw-r--r--tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js60
-rw-r--r--tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js28
-rw-r--r--tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/map.js8
-rw-r--r--tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/merge.js12
-rw-r--r--tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/null.js34
-rw-r--r--tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/omap.js44
-rw-r--r--tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/pairs.js53
-rw-r--r--tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/seq.js8
-rw-r--r--tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/set.js29
-rw-r--r--tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/str.js8
-rw-r--r--tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/timestamp.js88
-rw-r--r--tools/node_modules/eslint/node_modules/js-yaml/package.json92
-rw-r--r--tools/node_modules/eslint/node_modules/json-schema-traverse/.eslintrc.yml27
-rw-r--r--tools/node_modules/eslint/node_modules/json-schema-traverse/LICENSE21
-rw-r--r--tools/node_modules/eslint/node_modules/json-schema-traverse/README.md69
-rw-r--r--tools/node_modules/eslint/node_modules/json-schema-traverse/index.js81
-rw-r--r--tools/node_modules/eslint/node_modules/json-schema-traverse/package.json70
-rw-r--r--tools/node_modules/eslint/node_modules/json-stable-stringify-without-jsonify/LICENSE18
-rw-r--r--tools/node_modules/eslint/node_modules/json-stable-stringify-without-jsonify/index.js82
-rw-r--r--tools/node_modules/eslint/node_modules/json-stable-stringify-without-jsonify/package.json72
-rw-r--r--tools/node_modules/eslint/node_modules/json-stable-stringify-without-jsonify/readme.markdown132
-rw-r--r--tools/node_modules/eslint/node_modules/levn/LICENSE22
-rw-r--r--tools/node_modules/eslint/node_modules/levn/README.md196
-rw-r--r--tools/node_modules/eslint/node_modules/levn/lib/cast.js298
-rw-r--r--tools/node_modules/eslint/node_modules/levn/lib/coerce.js285
-rw-r--r--tools/node_modules/eslint/node_modules/levn/lib/index.js22
-rw-r--r--tools/node_modules/eslint/node_modules/levn/lib/parse-string.js113
-rw-r--r--tools/node_modules/eslint/node_modules/levn/lib/parse.js102
-rw-r--r--tools/node_modules/eslint/node_modules/levn/package.json78
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/LICENSE47
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/README.md39
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_DataView.js7
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_Hash.js32
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_LazyWrapper.js28
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_ListCache.js32
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_LodashWrapper.js22
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_Map.js7
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_MapCache.js32
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_Promise.js7
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_Set.js7
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_SetCache.js27
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_Stack.js27
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_Symbol.js6
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_Uint8Array.js6
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_WeakMap.js7
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_addMapEntry.js15
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_addSetEntry.js15
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_apply.js21
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_arrayAggregator.js22
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_arrayEach.js22
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_arrayEachRight.js21
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_arrayEvery.js23
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_arrayFilter.js25
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_arrayIncludes.js17
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_arrayIncludesWith.js22
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_arrayLikeKeys.js49
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_arrayMap.js21
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_arrayPush.js20
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_arrayReduce.js26
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_arrayReduceRight.js24
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_arraySample.js15
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_arraySampleSize.js17
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_arrayShuffle.js15
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_arraySome.js23
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_asciiSize.js12
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_asciiToArray.js12
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_asciiWords.js15
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_assignMergeValue.js20
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_assignValue.js28
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_assocIndexOf.js21
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseAggregator.js21
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseAssign.js17
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseAssignIn.js17
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseAssignValue.js25
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseAt.js23
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseClamp.js22
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseClone.js153
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseConforms.js18
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseConformsTo.js27
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseCreate.js30
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseDelay.js21
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseDifference.js67
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseEach.js14
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseEachRight.js14
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseEvery.js21
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseExtremum.js32
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseFill.js32
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseFilter.js21
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseFindIndex.js24
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseFindKey.js23
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseFlatten.js38
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseFor.js16
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseForOwn.js16
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseForOwnRight.js16
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseForRight.js15
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseFunctions.js19
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseGet.js24
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseGetAllKeys.js20
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseGetTag.js28
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseGt.js14
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseHas.js19
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseHasIn.js13
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseInRange.js18
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseIndexOf.js20
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseIndexOfWith.js23
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseIntersection.js74
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseInverter.js21
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseInvoke.js24
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseIsArguments.js18
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseIsArrayBuffer.js17
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseIsDate.js18
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseIsEqual.js28
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseIsEqualDeep.js83
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseIsMap.js18
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseIsMatch.js62
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseIsNaN.js12
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseIsNative.js47
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseIsRegExp.js18
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseIsSet.js18
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseIsTypedArray.js60
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseIteratee.js31
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseKeys.js30
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseKeysIn.js33
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseLodash.js10
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseLt.js14
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseMap.js22
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseMatches.js22
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseMatchesProperty.js33
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseMean.js20
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseMerge.js41
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseMergeDeep.js93
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseNth.js20
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseOrderBy.js34
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_basePick.js19
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_basePickBy.js30
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseProperty.js14
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_basePropertyDeep.js16
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_basePropertyOf.js14
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_basePullAll.js51
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_basePullAt.js37
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseRandom.js18
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseRange.js28
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseReduce.js23
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseRepeat.js35
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseRest.js17
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseSample.js15
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseSampleSize.js18
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseSet.js47
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseSetData.js17
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseSetToString.js22
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseShuffle.js15
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseSlice.js31
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseSome.js22
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseSortBy.js21
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseSortedIndex.js42
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseSortedIndexBy.js64
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseSortedUniq.js30
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseSum.js24
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseTimes.js20
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseToNumber.js24
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseToPairs.js18
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseToString.js37
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseUnary.js14
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseUniq.js72
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseUnset.js20
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseUpdate.js18
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseValues.js19
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseWhile.js26
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseWrapperValue.js25
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseXor.js36
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_baseZipObject.js23
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_cacheHas.js13
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_castArrayLikeObject.js14
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_castFunction.js14
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_castPath.js21
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_castRest.js14
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_castSlice.js18
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_charsEndIndex.js19
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_charsStartIndex.js20
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_cloneArrayBuffer.js16
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_cloneBuffer.js35
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_cloneDataView.js16
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_cloneMap.js22
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_cloneRegExp.js17
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_cloneSet.js22
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_cloneSymbol.js18
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_cloneTypedArray.js16
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_compareAscending.js41
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_compareMultiple.js44
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_composeArgs.js39
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_composeArgsRight.js41
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_copyArray.js20
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_copyObject.js40
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_copySymbols.js16
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_copySymbolsIn.js16
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_coreJsData.js6
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_countHolders.js21
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_createAggregator.js23
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_createAssigner.js37
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_createBaseEach.js32
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_createBaseFor.js25
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_createBind.js28
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_createCaseFirst.js33
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_createCompounder.js24
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_createCtor.js37
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_createCurry.js46
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_createFind.js25
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_createFlow.js78
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_createHybrid.js92
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_createInverter.js17
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_createMathOperation.js38
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_createOver.js27
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_createPadding.js33
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_createPartial.js43
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_createRange.js30
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_createRecurry.js56
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_createRelationalOperation.js20
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_createRound.js33
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_createSet.js19
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_createToPairs.js30
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_createWrap.js106
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_customDefaultsAssignIn.js29
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_customDefaultsMerge.js28
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_customOmitClone.js16
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_deburrLetter.js71
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_defineProperty.js11
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_equalArrays.js83
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_equalByTag.js112
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_equalObjects.js89
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_escapeHtmlChar.js21
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_escapeStringChar.js22
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_flatRest.js16
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_freeGlobal.js4
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_getAllKeys.js16
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_getAllKeysIn.js17
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_getData.js15
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_getFuncName.js31
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_getHolder.js13
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_getMapData.js18
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_getMatchData.js24
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_getNative.js17
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_getPrototype.js6
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_getRawTag.js46
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_getSymbols.js30
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_getSymbolsIn.js25
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_getTag.js58
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_getValue.js13
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_getView.js33
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_getWrapDetails.js17
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_hasPath.js39
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_hasUnicode.js26
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_hasUnicodeWord.js15
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_hashClear.js15
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_hashDelete.js17
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_hashGet.js30
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_hashHas.js23
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_hashSet.js23
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_initCloneArray.js26
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_initCloneByTag.js80
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_initCloneObject.js18
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_insertWrapDetails.js23
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_isFlattenable.js20
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_isIndex.js22
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_isIterateeCall.js30
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_isKey.js29
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_isKeyable.js15
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_isLaziable.js28
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_isMaskable.js14
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_isMasked.js20
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_isPrototype.js18
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_isStrictComparable.js15
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_iteratorToArray.js18
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_lazyClone.js23
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_lazyReverse.js23
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_lazyValue.js69
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_listCacheClear.js13
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_listCacheDelete.js35
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_listCacheGet.js19
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_listCacheHas.js16
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_listCacheSet.js26
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_mapCacheClear.js21
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_mapCacheDelete.js18
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_mapCacheGet.js16
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_mapCacheHas.js16
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_mapCacheSet.js22
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_mapToArray.js18
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_matchesStrictComparable.js20
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_memoizeCapped.js26
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_mergeData.js90
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_metaMap.js6
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_nativeCreate.js6
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_nativeKeys.js6
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_nativeKeysIn.js20
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_nodeUtil.js22
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_objectToString.js22
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_overArg.js15
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_overRest.js36
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_parent.js16
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_reEscape.js4
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_reEvaluate.js4
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_reInterpolate.js4
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_realNames.js4
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_reorder.js29
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_replaceHolders.js29
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_root.js9
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_setCacheAdd.js19
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_setCacheHas.js14
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_setData.js20
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_setToArray.js18
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_setToPairs.js18
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_setToString.js14
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_setWrapToString.js21
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_shortOut.js37
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_shuffleSelf.js28
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_stackClear.js15
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_stackDelete.js18
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_stackGet.js14
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_stackHas.js14
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_stackSet.js34
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_strictIndexOf.js23
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_strictLastIndexOf.js21
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_stringSize.js18
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_stringToArray.js18
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_stringToPath.js28
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_toKey.js21
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_toSource.js26
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_unescapeHtmlChar.js21
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_unicodeSize.js44
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_unicodeToArray.js40
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_unicodeWords.js69
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_updateWrapDetails.js46
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/_wrapperClone.js23
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/add.js22
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/after.js42
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/array.js67
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/ary.js29
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/assign.js58
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/assignIn.js40
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/assignInWith.js38
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/assignWith.js37
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/at.js23
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/attempt.js35
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/before.js40
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/bind.js57
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/bindAll.js41
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/bindKey.js68
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/camelCase.js29
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/capitalize.js23
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/castArray.js44
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/ceil.js26
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/chain.js38
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/chunk.js50
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/clamp.js39
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/clone.js36
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/cloneDeep.js29
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/cloneDeepWith.js40
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/cloneWith.js42
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/collection.js30
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/commit.js33
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/compact.js31
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/concat.js43
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/cond.js60
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/conforms.js35
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/conformsTo.js32
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/constant.js26
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/core.js3836
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/core.min.js29
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/countBy.js40
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/create.js43
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/curry.js57
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/curryRight.js54
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/date.js3
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/debounce.js188
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/deburr.js45
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/defaultTo.js25
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/defaults.js32
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/defaultsDeep.js30
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/defer.js26
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/delay.js28
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/difference.js33
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/differenceBy.js44
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/differenceWith.js40
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/divide.js22
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/drop.js38
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/dropRight.js39
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/dropRightWhile.js45
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/dropWhile.js45
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/each.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/eachRight.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/endsWith.js43
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/entries.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/entriesIn.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/eq.js37
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/escape.js43
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/escapeRegExp.js32
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/every.js56
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/extend.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/extendWith.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fill.js45
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/filter.js48
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/find.js42
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/findIndex.js55
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/findKey.js44
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/findLast.js25
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/findLastIndex.js59
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/findLastKey.js44
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/first.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/flatMap.js29
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/flatMapDeep.js31
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/flatMapDepth.js31
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/flatten.js22
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/flattenDeep.js25
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/flattenDepth.js33
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/flip.js28
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/floor.js26
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/flow.js27
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/flowRight.js26
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/forEach.js41
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/forEachRight.js31
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/forIn.js39
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/forInRight.js37
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/forOwn.js36
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/forOwnRight.js34
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp.js2
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/F.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/T.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/__.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/_baseConvert.js568
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/_convertBrowser.js18
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/_falseOptions.js7
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/_mapping.js368
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/_util.js14
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/add.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/after.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/all.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/allPass.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/always.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/any.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/anyPass.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/apply.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/array.js2
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/ary.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/assign.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/assignAll.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/assignAllWith.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/assignIn.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/assignInAll.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/assignInAllWith.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/assignInWith.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/assignWith.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/assoc.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/assocPath.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/at.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/attempt.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/before.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/bind.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/bindAll.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/bindKey.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/camelCase.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/capitalize.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/castArray.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/ceil.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/chain.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/chunk.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/clamp.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/clone.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/cloneDeep.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/cloneDeepWith.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/cloneWith.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/collection.js2
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/commit.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/compact.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/complement.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/compose.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/concat.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/cond.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/conforms.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/conformsTo.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/constant.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/contains.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/convert.js18
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/countBy.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/create.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/curry.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/curryN.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/curryRight.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/curryRightN.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/date.js2
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/debounce.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/deburr.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/defaultTo.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/defaults.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/defaultsAll.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/defaultsDeep.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/defaultsDeepAll.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/defer.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/delay.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/difference.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/differenceBy.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/differenceWith.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/dissoc.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/dissocPath.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/divide.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/drop.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/dropLast.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/dropLastWhile.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/dropRight.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/dropRightWhile.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/dropWhile.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/each.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/eachRight.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/endsWith.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/entries.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/entriesIn.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/eq.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/equals.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/escape.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/escapeRegExp.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/every.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/extend.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/extendAll.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/extendAllWith.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/extendWith.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/fill.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/filter.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/find.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/findFrom.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/findIndex.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/findIndexFrom.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/findKey.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/findLast.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/findLastFrom.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/findLastIndex.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/findLastIndexFrom.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/findLastKey.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/first.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/flatMap.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/flatMapDeep.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/flatMapDepth.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/flatten.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/flattenDeep.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/flattenDepth.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/flip.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/floor.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/flow.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/flowRight.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/forEach.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/forEachRight.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/forIn.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/forInRight.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/forOwn.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/forOwnRight.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/fromPairs.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/function.js2
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/functions.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/functionsIn.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/get.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/getOr.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/groupBy.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/gt.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/gte.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/has.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/hasIn.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/head.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/identical.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/identity.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/inRange.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/includes.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/includesFrom.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/indexBy.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/indexOf.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/indexOfFrom.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/init.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/initial.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/intersection.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/intersectionBy.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/intersectionWith.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/invert.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/invertBy.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/invertObj.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/invoke.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/invokeArgs.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/invokeArgsMap.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/invokeMap.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/isArguments.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/isArray.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/isArrayBuffer.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/isArrayLike.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/isArrayLikeObject.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/isBoolean.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/isBuffer.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/isDate.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/isElement.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/isEmpty.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/isEqual.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/isEqualWith.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/isError.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/isFinite.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/isFunction.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/isInteger.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/isLength.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/isMap.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/isMatch.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/isMatchWith.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/isNaN.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/isNative.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/isNil.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/isNull.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/isNumber.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/isObject.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/isObjectLike.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/isPlainObject.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/isRegExp.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/isSafeInteger.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/isSet.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/isString.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/isSymbol.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/isTypedArray.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/isUndefined.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/isWeakMap.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/isWeakSet.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/iteratee.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/join.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/juxt.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/kebabCase.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/keyBy.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/keys.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/keysIn.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/lang.js2
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/last.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/lastIndexOf.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/lastIndexOfFrom.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/lowerCase.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/lowerFirst.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/lt.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/lte.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/map.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/mapKeys.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/mapValues.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/matches.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/matchesProperty.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/math.js2
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/max.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/maxBy.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/mean.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/meanBy.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/memoize.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/merge.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/mergeAll.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/mergeAllWith.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/mergeWith.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/method.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/methodOf.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/min.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/minBy.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/mixin.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/multiply.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/nAry.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/negate.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/next.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/noop.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/now.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/nth.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/nthArg.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/number.js2
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/object.js2
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/omit.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/omitAll.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/omitBy.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/once.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/orderBy.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/over.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/overArgs.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/overEvery.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/overSome.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/pad.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/padChars.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/padCharsEnd.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/padCharsStart.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/padEnd.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/padStart.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/parseInt.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/partial.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/partialRight.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/partition.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/path.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/pathEq.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/pathOr.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/paths.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/pick.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/pickAll.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/pickBy.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/pipe.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/placeholder.js6
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/plant.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/pluck.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/prop.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/propEq.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/propOr.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/property.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/propertyOf.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/props.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/pull.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/pullAll.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/pullAllBy.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/pullAllWith.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/pullAt.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/random.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/range.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/rangeRight.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/rangeStep.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/rangeStepRight.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/rearg.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/reduce.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/reduceRight.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/reject.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/remove.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/repeat.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/replace.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/rest.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/restFrom.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/result.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/reverse.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/round.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/sample.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/sampleSize.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/seq.js2
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/set.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/setWith.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/shuffle.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/size.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/slice.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/snakeCase.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/some.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/sortBy.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/sortedIndex.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/sortedIndexBy.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/sortedIndexOf.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/sortedLastIndex.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/sortedLastIndexBy.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/sortedLastIndexOf.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/sortedUniq.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/sortedUniqBy.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/split.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/spread.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/spreadFrom.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/startCase.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/startsWith.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/string.js2
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/stubArray.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/stubFalse.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/stubObject.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/stubString.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/stubTrue.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/subtract.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/sum.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/sumBy.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/symmetricDifference.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/symmetricDifferenceBy.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/symmetricDifferenceWith.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/tail.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/take.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/takeLast.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/takeLastWhile.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/takeRight.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/takeRightWhile.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/takeWhile.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/tap.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/template.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/templateSettings.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/throttle.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/thru.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/times.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/toArray.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/toFinite.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/toInteger.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/toIterator.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/toJSON.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/toLength.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/toLower.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/toNumber.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/toPairs.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/toPairsIn.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/toPath.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/toPlainObject.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/toSafeInteger.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/toString.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/toUpper.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/transform.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/trim.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/trimChars.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/trimCharsEnd.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/trimCharsStart.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/trimEnd.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/trimStart.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/truncate.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/unapply.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/unary.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/unescape.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/union.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/unionBy.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/unionWith.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/uniq.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/uniqBy.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/uniqWith.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/uniqueId.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/unnest.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/unset.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/unzip.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/unzipWith.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/update.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/updateWith.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/upperCase.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/upperFirst.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/useWith.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/util.js2
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/value.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/valueOf.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/values.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/valuesIn.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/where.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/whereEq.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/without.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/words.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/wrap.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/wrapperAt.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/wrapperChain.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/wrapperLodash.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/wrapperReverse.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/wrapperValue.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/xor.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/xorBy.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/xorWith.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/zip.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/zipAll.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/zipObj.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/zipObject.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/zipObjectDeep.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fp/zipWith.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/fromPairs.js28
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/function.js25
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/functions.js31
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/functionsIn.js31
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/get.js33
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/groupBy.js41
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/gt.js29
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/gte.js30
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/has.js35
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/hasIn.js34
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/head.js23
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/identity.js21
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/inRange.js55
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/includes.js53
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/index.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/indexOf.js42
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/initial.js22
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/intersection.js30
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/intersectionBy.js45
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/intersectionWith.js41
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/invert.js27
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/invertBy.js44
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/invoke.js24
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/invokeMap.js41
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/isArguments.js36
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/isArray.js26
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/isArrayBuffer.js27
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/isArrayLike.js33
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/isArrayLikeObject.js33
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/isBoolean.js29
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/isBuffer.js38
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/isDate.js27
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/isElement.js25
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/isEmpty.js77
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/isEqual.js35
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/isEqualWith.js41
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/isError.js36
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/isFinite.js36
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/isFunction.js37
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/isInteger.js33
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/isLength.js35
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/isMap.js27
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/isMatch.js36
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/isMatchWith.js41
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/isNaN.js38
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/isNative.js40
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/isNil.js25
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/isNull.js22
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/isNumber.js38
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/isObject.js31
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/isObjectLike.js29
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/isPlainObject.js62
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/isRegExp.js27
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/isSafeInteger.js37
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/isSet.js27
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/isString.js30
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/isSymbol.js29
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/isTypedArray.js27
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/isUndefined.js22
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/isWeakMap.js28
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/isWeakSet.js28
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/iteratee.js53
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/join.js26
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/kebabCase.js28
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/keyBy.js36
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/keys.js37
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/keysIn.js32
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/lang.js58
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/last.js20
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/lastIndexOf.js46
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/lodash.js17084
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/lodash.min.js136
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/lowerCase.js27
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/lowerFirst.js22
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/lt.js29
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/lte.js30
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/map.js53
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/mapKeys.js36
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/mapValues.js43
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/matches.js39
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/matchesProperty.js37
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/math.js17
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/max.js29
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/maxBy.js34
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/mean.js22
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/meanBy.js31
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/memoize.js73
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/merge.js39
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/mergeWith.js39
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/method.js34
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/methodOf.js33
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/min.js29
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/minBy.js34
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/mixin.js74
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/multiply.js22
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/negate.js40
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/next.js35
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/noop.js17
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/now.js23
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/nth.js29
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/nthArg.js32
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/number.js5
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/object.js49
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/omit.js57
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/omitBy.js29
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/once.js25
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/orderBy.js47
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/over.js24
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/overArgs.js61
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/overEvery.js30
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/overSome.js30
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/package.json68
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/pad.js49
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/padEnd.js39
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/padStart.js39
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/parseInt.js43
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/partial.js50
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/partialRight.js49
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/partition.js43
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/pick.js25
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/pickBy.js37
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/plant.js48
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/property.js32
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/propertyOf.js30
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/pull.js29
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/pullAll.js29
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/pullAllBy.js33
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/pullAllWith.js32
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/pullAt.js43
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/random.js82
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/range.js46
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/rangeRight.js41
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/rearg.js33
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/reduce.js51
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/reduceRight.js36
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/reject.js46
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/remove.js53
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/repeat.js37
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/replace.js29
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/rest.js40
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/result.js56
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/reverse.js34
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/round.js26
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/sample.js24
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/sampleSize.js37
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/seq.js16
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/set.js35
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/setWith.js32
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/shuffle.js25
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/size.js46
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/slice.js37
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/snakeCase.js28
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/some.js51
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/sortBy.js48
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/sortedIndex.js24
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/sortedIndexBy.js33
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/sortedIndexOf.js31
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/sortedLastIndex.js25
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/sortedLastIndexBy.js33
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/sortedLastIndexOf.js31
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/sortedUniq.js24
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/sortedUniqBy.js26
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/split.js52
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/spread.js63
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/startCase.js29
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/startsWith.js39
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/string.js33
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/stubArray.js23
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/stubFalse.js18
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/stubObject.js23
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/stubString.js18
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/stubTrue.js18
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/subtract.js22
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/sum.js24
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/sumBy.js33
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/tail.js22
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/take.js37
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/takeRight.js39
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/takeRightWhile.js45
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/takeWhile.js45
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/tap.js29
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/template.js238
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/templateSettings.js67
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/throttle.js69
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/thru.js28
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/times.js51
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/toArray.js58
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/toFinite.js42
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/toInteger.js36
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/toIterator.js23
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/toJSON.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/toLength.js38
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/toLower.js28
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/toNumber.js66
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/toPairs.js30
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/toPairsIn.js30
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/toPath.js33
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/toPlainObject.js32
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/toSafeInteger.js37
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/toString.js28
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/toUpper.js28
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/transform.js65
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/trim.js49
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/trimEnd.js43
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/trimStart.js43
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/truncate.js111
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/unary.js22
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/unescape.js34
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/union.js26
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/unionBy.js39
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/unionWith.js34
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/uniq.js25
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/uniqBy.js31
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/uniqWith.js28
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/uniqueId.js28
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/unset.js34
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/unzip.js45
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/unzipWith.js39
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/update.js35
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/updateWith.js33
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/upperCase.js27
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/upperFirst.js22
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/util.js34
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/value.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/valueOf.js1
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/values.js34
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/valuesIn.js32
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/without.js31
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/words.js35
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/wrap.js30
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/wrapperAt.js48
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/wrapperChain.js34
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/wrapperLodash.js147
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/wrapperReverse.js44
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/wrapperValue.js21
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/xor.js28
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/xorBy.js39
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/xorWith.js34
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/zip.js22
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/zipObject.js24
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/zipObjectDeep.js23
-rw-r--r--tools/node_modules/eslint/node_modules/lodash/zipWith.js32
-rw-r--r--tools/node_modules/eslint/node_modules/lru-cache/LICENSE15
-rw-r--r--tools/node_modules/eslint/node_modules/lru-cache/README.md152
-rw-r--r--tools/node_modules/eslint/node_modules/lru-cache/index.js467
-rw-r--r--tools/node_modules/eslint/node_modules/lru-cache/package.json68
-rw-r--r--tools/node_modules/eslint/node_modules/markdown-escapes/LICENSE22
-rw-r--r--tools/node_modules/eslint/node_modules/markdown-escapes/index.js57
-rw-r--r--tools/node_modules/eslint/node_modules/markdown-escapes/package.json99
-rw-r--r--tools/node_modules/eslint/node_modules/markdown-escapes/readme.md67
-rw-r--r--tools/node_modules/eslint/node_modules/mimic-fn/index.js7
-rw-r--r--tools/node_modules/eslint/node_modules/mimic-fn/license21
-rw-r--r--tools/node_modules/eslint/node_modules/mimic-fn/package.json75
-rw-r--r--tools/node_modules/eslint/node_modules/mimic-fn/readme.md66
-rw-r--r--tools/node_modules/eslint/node_modules/minimatch/LICENSE15
-rw-r--r--tools/node_modules/eslint/node_modules/minimatch/README.md209
-rw-r--r--tools/node_modules/eslint/node_modules/minimatch/minimatch.js923
-rw-r--r--tools/node_modules/eslint/node_modules/minimatch/package.json64
-rw-r--r--tools/node_modules/eslint/node_modules/minimist/LICENSE18
-rw-r--r--tools/node_modules/eslint/node_modules/minimist/index.js187
-rw-r--r--tools/node_modules/eslint/node_modules/minimist/package.json71
-rw-r--r--tools/node_modules/eslint/node_modules/minimist/readme.markdown73
-rw-r--r--tools/node_modules/eslint/node_modules/mkdirp/LICENSE21
-rwxr-xr-xtools/node_modules/eslint/node_modules/mkdirp/bin/cmd.js33
-rw-r--r--tools/node_modules/eslint/node_modules/mkdirp/bin/usage.txt12
-rw-r--r--tools/node_modules/eslint/node_modules/mkdirp/index.js98
-rw-r--r--tools/node_modules/eslint/node_modules/mkdirp/package.json63
-rw-r--r--tools/node_modules/eslint/node_modules/mkdirp/readme.markdown100
-rw-r--r--tools/node_modules/eslint/node_modules/ms/LICENSE.md21
-rw-r--r--tools/node_modules/eslint/node_modules/ms/README.md51
-rw-r--r--tools/node_modules/eslint/node_modules/ms/index.js152
-rw-r--r--tools/node_modules/eslint/node_modules/ms/package.json69
-rw-r--r--tools/node_modules/eslint/node_modules/mute-stream/.nyc_output/33508.json1
-rw-r--r--tools/node_modules/eslint/node_modules/mute-stream/.nyc_output/33510.json1
-rw-r--r--tools/node_modules/eslint/node_modules/mute-stream/LICENSE15
-rw-r--r--tools/node_modules/eslint/node_modules/mute-stream/README.md68
-rw-r--r--tools/node_modules/eslint/node_modules/mute-stream/mute.js145
-rw-r--r--tools/node_modules/eslint/node_modules/mute-stream/package.json59
-rw-r--r--tools/node_modules/eslint/node_modules/natural-compare/README.md125
-rw-r--r--tools/node_modules/eslint/node_modules/natural-compare/index.js57
-rw-r--r--tools/node_modules/eslint/node_modules/natural-compare/package.json73
-rw-r--r--tools/node_modules/eslint/node_modules/object-assign/index.js90
-rw-r--r--tools/node_modules/eslint/node_modules/object-assign/license21
-rw-r--r--tools/node_modules/eslint/node_modules/object-assign/package.json77
-rw-r--r--tools/node_modules/eslint/node_modules/object-assign/readme.md61
-rw-r--r--tools/node_modules/eslint/node_modules/once/LICENSE15
-rw-r--r--tools/node_modules/eslint/node_modules/once/README.md79
-rw-r--r--tools/node_modules/eslint/node_modules/once/once.js42
-rw-r--r--tools/node_modules/eslint/node_modules/once/package.json67
-rw-r--r--tools/node_modules/eslint/node_modules/onetime/index.js39
-rw-r--r--tools/node_modules/eslint/node_modules/onetime/license21
-rw-r--r--tools/node_modules/eslint/node_modules/onetime/package.json72
-rw-r--r--tools/node_modules/eslint/node_modules/onetime/readme.md65
-rw-r--r--tools/node_modules/eslint/node_modules/optionator/LICENSE22
-rw-r--r--tools/node_modules/eslint/node_modules/optionator/README.md236
-rw-r--r--tools/node_modules/eslint/node_modules/optionator/lib/help.js247
-rw-r--r--tools/node_modules/eslint/node_modules/optionator/lib/index.js465
-rw-r--r--tools/node_modules/eslint/node_modules/optionator/lib/util.js54
-rw-r--r--tools/node_modules/eslint/node_modules/optionator/package.json74
-rw-r--r--tools/node_modules/eslint/node_modules/os-tmpdir/index.js25
-rw-r--r--tools/node_modules/eslint/node_modules/os-tmpdir/license21
-rw-r--r--tools/node_modules/eslint/node_modules/os-tmpdir/package.json73
-rw-r--r--tools/node_modules/eslint/node_modules/os-tmpdir/readme.md32
-rw-r--r--tools/node_modules/eslint/node_modules/parse-entities/LICENSE22
-rw-r--r--tools/node_modules/eslint/node_modules/parse-entities/index.js473
-rw-r--r--tools/node_modules/eslint/node_modules/parse-entities/package.json113
-rw-r--r--tools/node_modules/eslint/node_modules/parse-entities/readme.md157
-rw-r--r--tools/node_modules/eslint/node_modules/path-is-absolute/index.js20
-rw-r--r--tools/node_modules/eslint/node_modules/path-is-absolute/license21
-rw-r--r--tools/node_modules/eslint/node_modules/path-is-absolute/package.json75
-rw-r--r--tools/node_modules/eslint/node_modules/path-is-absolute/readme.md59
-rw-r--r--tools/node_modules/eslint/node_modules/path-is-inside/LICENSE.txt47
-rw-r--r--tools/node_modules/eslint/node_modules/path-is-inside/lib/path-is-inside.js28
-rw-r--r--tools/node_modules/eslint/node_modules/path-is-inside/package.json64
-rw-r--r--tools/node_modules/eslint/node_modules/pify/index.js68
-rw-r--r--tools/node_modules/eslint/node_modules/pify/license21
-rw-r--r--tools/node_modules/eslint/node_modules/pify/package.json81
-rw-r--r--tools/node_modules/eslint/node_modules/pify/readme.md119
-rw-r--r--tools/node_modules/eslint/node_modules/pinkie-promise/index.js3
-rw-r--r--tools/node_modules/eslint/node_modules/pinkie-promise/license21
-rw-r--r--tools/node_modules/eslint/node_modules/pinkie-promise/package.json68
-rw-r--r--tools/node_modules/eslint/node_modules/pinkie-promise/readme.md28
-rw-r--r--tools/node_modules/eslint/node_modules/pinkie/index.js292
-rw-r--r--tools/node_modules/eslint/node_modules/pinkie/license21
-rw-r--r--tools/node_modules/eslint/node_modules/pinkie/package.json68
-rw-r--r--tools/node_modules/eslint/node_modules/pinkie/readme.md83
-rw-r--r--tools/node_modules/eslint/node_modules/pluralize/LICENSE21
-rw-r--r--tools/node_modules/eslint/node_modules/pluralize/Readme.md89
-rw-r--r--tools/node_modules/eslint/node_modules/pluralize/package.json71
-rw-r--r--tools/node_modules/eslint/node_modules/pluralize/pluralize.js490
-rw-r--r--tools/node_modules/eslint/node_modules/prelude-ls/LICENSE22
-rw-r--r--tools/node_modules/eslint/node_modules/prelude-ls/README.md15
-rw-r--r--tools/node_modules/eslint/node_modules/prelude-ls/lib/Func.js65
-rw-r--r--tools/node_modules/eslint/node_modules/prelude-ls/lib/List.js686
-rw-r--r--tools/node_modules/eslint/node_modules/prelude-ls/lib/Num.js130
-rw-r--r--tools/node_modules/eslint/node_modules/prelude-ls/lib/Obj.js154
-rw-r--r--tools/node_modules/eslint/node_modules/prelude-ls/lib/Str.js92
-rw-r--r--tools/node_modules/eslint/node_modules/prelude-ls/lib/index.js178
-rw-r--r--tools/node_modules/eslint/node_modules/prelude-ls/package.json84
-rw-r--r--tools/node_modules/eslint/node_modules/process-nextick-args/index.js43
-rw-r--r--tools/node_modules/eslint/node_modules/process-nextick-args/license.md19
-rw-r--r--tools/node_modules/eslint/node_modules/process-nextick-args/package.json47
-rw-r--r--tools/node_modules/eslint/node_modules/process-nextick-args/readme.md18
-rw-r--r--tools/node_modules/eslint/node_modules/progress/LICENSE22
-rw-r--r--tools/node_modules/eslint/node_modules/progress/Makefile8
-rw-r--r--tools/node_modules/eslint/node_modules/progress/Readme.md146
-rw-r--r--tools/node_modules/eslint/node_modules/progress/index.js1
-rw-r--r--tools/node_modules/eslint/node_modules/progress/lib/node-progress.js231
-rw-r--r--tools/node_modules/eslint/node_modules/progress/package.json66
-rw-r--r--tools/node_modules/eslint/node_modules/pseudomap/LICENSE15
-rw-r--r--tools/node_modules/eslint/node_modules/pseudomap/README.md60
-rw-r--r--tools/node_modules/eslint/node_modules/pseudomap/map.js9
-rw-r--r--tools/node_modules/eslint/node_modules/pseudomap/package.json54
-rw-r--r--tools/node_modules/eslint/node_modules/pseudomap/pseudomap.js113
-rw-r--r--tools/node_modules/eslint/node_modules/readable-stream/GOVERNANCE.md136
-rw-r--r--tools/node_modules/eslint/node_modules/readable-stream/LICENSE47
-rw-r--r--tools/node_modules/eslint/node_modules/readable-stream/README.md57
-rw-r--r--tools/node_modules/eslint/node_modules/readable-stream/duplex-browser.js1
-rw-r--r--tools/node_modules/eslint/node_modules/readable-stream/duplex.js1
-rw-r--r--tools/node_modules/eslint/node_modules/readable-stream/lib/_stream_duplex.js124
-rw-r--r--tools/node_modules/eslint/node_modules/readable-stream/lib/_stream_passthrough.js47
-rw-r--r--tools/node_modules/eslint/node_modules/readable-stream/lib/_stream_readable.js1007
-rw-r--r--tools/node_modules/eslint/node_modules/readable-stream/lib/_stream_transform.js214
-rw-r--r--tools/node_modules/eslint/node_modules/readable-stream/lib/_stream_writable.js664
-rw-r--r--tools/node_modules/eslint/node_modules/readable-stream/lib/internal/streams/BufferList.js74
-rw-r--r--tools/node_modules/eslint/node_modules/readable-stream/lib/internal/streams/destroy.js72
-rw-r--r--tools/node_modules/eslint/node_modules/readable-stream/lib/internal/streams/stream-browser.js1
-rw-r--r--tools/node_modules/eslint/node_modules/readable-stream/lib/internal/streams/stream.js1
-rw-r--r--tools/node_modules/eslint/node_modules/readable-stream/package.json83
-rw-r--r--tools/node_modules/eslint/node_modules/readable-stream/passthrough.js1
-rw-r--r--tools/node_modules/eslint/node_modules/readable-stream/readable-browser.js7
-rw-r--r--tools/node_modules/eslint/node_modules/readable-stream/readable.js19
-rw-r--r--tools/node_modules/eslint/node_modules/readable-stream/transform.js1
-rw-r--r--tools/node_modules/eslint/node_modules/readable-stream/writable-browser.js1
-rw-r--r--tools/node_modules/eslint/node_modules/readable-stream/writable.js8
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/index.js14
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/block-elements.json68
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/decode.js71
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/defaults.js21
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/locate/break.js25
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/locate/code-inline.js15
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/locate/delete.js15
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/locate/emphasis.js26
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/locate/escape.js15
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/locate/link.js24
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/locate/strong.js26
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/locate/tag.js15
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/locate/url.js34
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/parse.js53
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/parser.js162
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/set-options.js59
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/auto-link.js151
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/blockquote.js137
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/break.js51
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/code-fenced.js245
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/code-indented.js106
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/code-inline.js120
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/definition.js287
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/delete.js69
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/emphasis.js94
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/escape.js43
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/footnote-definition.js194
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/heading-atx.js150
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/heading-setext.js116
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/html-block.js103
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/html-inline.js63
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/link.js399
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/list.js494
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/newline.js55
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/paragraph.js130
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/reference.js219
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/strong.js93
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/table.js276
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/text.js67
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/thematic-break.js79
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/url.js153
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/yaml.js74
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/tokenizer.js451
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/unescape.js46
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/util/get-indentation.js46
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/util/html.js33
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/util/interrupt.js51
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/util/normalize.js29
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/lib/util/remove-indentation.js102
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/package.json86
-rw-r--r--tools/node_modules/eslint/node_modules/remark-parse/readme.md448
-rw-r--r--tools/node_modules/eslint/node_modules/repeat-string/LICENSE21
-rw-r--r--tools/node_modules/eslint/node_modules/repeat-string/README.md136
-rw-r--r--tools/node_modules/eslint/node_modules/repeat-string/index.js70
-rw-r--r--tools/node_modules/eslint/node_modules/repeat-string/package.json128
-rwxr-xr-xtools/node_modules/eslint/node_modules/replace-ext/LICENSE21
-rw-r--r--tools/node_modules/eslint/node_modules/replace-ext/README.md50
-rw-r--r--tools/node_modules/eslint/node_modules/replace-ext/index.js18
-rw-r--r--tools/node_modules/eslint/node_modules/replace-ext/package.json86
-rw-r--r--tools/node_modules/eslint/node_modules/require-uncached/index.js29
-rw-r--r--tools/node_modules/eslint/node_modules/require-uncached/license21
-rw-r--r--tools/node_modules/eslint/node_modules/require-uncached/package.json77
-rw-r--r--tools/node_modules/eslint/node_modules/require-uncached/readme.md47
-rw-r--r--tools/node_modules/eslint/node_modules/resolve-from/index.js19
-rw-r--r--tools/node_modules/eslint/node_modules/resolve-from/license21
-rw-r--r--tools/node_modules/eslint/node_modules/resolve-from/package.json66
-rw-r--r--tools/node_modules/eslint/node_modules/resolve-from/readme.md56
-rw-r--r--tools/node_modules/eslint/node_modules/restore-cursor/index.js9
-rw-r--r--tools/node_modules/eslint/node_modules/restore-cursor/license21
-rw-r--r--tools/node_modules/eslint/node_modules/restore-cursor/package.json76
-rw-r--r--tools/node_modules/eslint/node_modules/restore-cursor/readme.md25
-rw-r--r--tools/node_modules/eslint/node_modules/rimraf/LICENSE15
-rw-r--r--tools/node_modules/eslint/node_modules/rimraf/README.md101
-rwxr-xr-xtools/node_modules/eslint/node_modules/rimraf/bin.js50
-rw-r--r--tools/node_modules/eslint/node_modules/rimraf/package.json64
-rw-r--r--tools/node_modules/eslint/node_modules/rimraf/rimraf.js364
-rw-r--r--tools/node_modules/eslint/node_modules/run-async/LICENSE21
-rw-r--r--tools/node_modules/eslint/node_modules/run-async/README.md79
-rw-r--r--tools/node_modules/eslint/node_modules/run-async/index.js61
-rw-r--r--tools/node_modules/eslint/node_modules/run-async/package.json64
-rw-r--r--tools/node_modules/eslint/node_modules/rx-lite-aggregates/package.json67
-rw-r--r--tools/node_modules/eslint/node_modules/rx-lite-aggregates/readme.md85
-rw-r--r--tools/node_modules/eslint/node_modules/rx-lite-aggregates/rx.lite.aggregates.js1365
-rw-r--r--tools/node_modules/eslint/node_modules/rx-lite-aggregates/rx.lite.aggregates.map1
-rw-r--r--tools/node_modules/eslint/node_modules/rx-lite-aggregates/rx.lite.aggregates.min.js3
-rw-r--r--tools/node_modules/eslint/node_modules/rx-lite/package.json66
-rw-r--r--tools/node_modules/eslint/node_modules/rx-lite/readme.md173
-rw-r--r--tools/node_modules/eslint/node_modules/rx-lite/rx.lite.js7054
-rw-r--r--tools/node_modules/eslint/node_modules/rx-lite/rx.lite.map1
-rw-r--r--tools/node_modules/eslint/node_modules/rx-lite/rx.lite.min.js5
-rw-r--r--tools/node_modules/eslint/node_modules/safe-buffer/LICENSE21
-rw-r--r--tools/node_modules/eslint/node_modules/safe-buffer/README.md584
-rw-r--r--tools/node_modules/eslint/node_modules/safe-buffer/index.js62
-rw-r--r--tools/node_modules/eslint/node_modules/safe-buffer/package.json63
-rw-r--r--tools/node_modules/eslint/node_modules/semver/LICENSE15
-rw-r--r--tools/node_modules/eslint/node_modules/semver/README.md366
-rwxr-xr-xtools/node_modules/eslint/node_modules/semver/bin/semver133
-rw-r--r--tools/node_modules/eslint/node_modules/semver/package.json54
-rw-r--r--tools/node_modules/eslint/node_modules/semver/range.bnf16
-rw-r--r--tools/node_modules/eslint/node_modules/semver/semver.js1296
-rw-r--r--tools/node_modules/eslint/node_modules/shebang-command/index.js19
-rw-r--r--tools/node_modules/eslint/node_modules/shebang-command/license21
-rw-r--r--tools/node_modules/eslint/node_modules/shebang-command/package.json71
-rw-r--r--tools/node_modules/eslint/node_modules/shebang-command/readme.md39
-rw-r--r--tools/node_modules/eslint/node_modules/shebang-regex/index.js2
-rw-r--r--tools/node_modules/eslint/node_modules/shebang-regex/license21
-rw-r--r--tools/node_modules/eslint/node_modules/shebang-regex/package.json64
-rw-r--r--tools/node_modules/eslint/node_modules/shebang-regex/readme.md29
-rw-r--r--tools/node_modules/eslint/node_modules/signal-exit/LICENSE.txt16
-rw-r--r--tools/node_modules/eslint/node_modules/signal-exit/README.md40
-rw-r--r--tools/node_modules/eslint/node_modules/signal-exit/index.js157
-rw-r--r--tools/node_modules/eslint/node_modules/signal-exit/package.json66
-rw-r--r--tools/node_modules/eslint/node_modules/signal-exit/signals.js53
-rwxr-xr-xtools/node_modules/eslint/node_modules/slice-ansi/index.js88
-rw-r--r--tools/node_modules/eslint/node_modules/slice-ansi/license9
-rw-r--r--tools/node_modules/eslint/node_modules/slice-ansi/package.json85
-rwxr-xr-xtools/node_modules/eslint/node_modules/slice-ansi/readme.md64
-rw-r--r--tools/node_modules/eslint/node_modules/sprintf-js/LICENSE24
-rw-r--r--tools/node_modules/eslint/node_modules/sprintf-js/README.md88
-rw-r--r--tools/node_modules/eslint/node_modules/sprintf-js/dist/angular-sprintf.min.js4
-rw-r--r--tools/node_modules/eslint/node_modules/sprintf-js/dist/angular-sprintf.min.js.map1
-rw-r--r--tools/node_modules/eslint/node_modules/sprintf-js/dist/angular-sprintf.min.map1
-rw-r--r--tools/node_modules/eslint/node_modules/sprintf-js/dist/sprintf.min.js4
-rw-r--r--tools/node_modules/eslint/node_modules/sprintf-js/dist/sprintf.min.js.map1
-rw-r--r--tools/node_modules/eslint/node_modules/sprintf-js/dist/sprintf.min.map1
-rw-r--r--tools/node_modules/eslint/node_modules/sprintf-js/package.json54
-rw-r--r--tools/node_modules/eslint/node_modules/sprintf-js/src/angular-sprintf.js18
-rw-r--r--tools/node_modules/eslint/node_modules/sprintf-js/src/sprintf.js208
-rw-r--r--tools/node_modules/eslint/node_modules/state-toggle/LICENSE22
-rw-r--r--tools/node_modules/eslint/node_modules/state-toggle/history.md6
-rw-r--r--tools/node_modules/eslint/node_modules/state-toggle/index.js45
-rw-r--r--tools/node_modules/eslint/node_modules/state-toggle/package.json107
-rw-r--r--tools/node_modules/eslint/node_modules/state-toggle/readme.md83
-rw-r--r--tools/node_modules/eslint/node_modules/string-width/index.js36
-rw-r--r--tools/node_modules/eslint/node_modules/string-width/license9
-rw-r--r--tools/node_modules/eslint/node_modules/string-width/package.json88
-rw-r--r--tools/node_modules/eslint/node_modules/string-width/readme.md42
-rw-r--r--tools/node_modules/eslint/node_modules/string_decoder/LICENSE48
-rw-r--r--tools/node_modules/eslint/node_modules/string_decoder/README.md28
-rw-r--r--tools/node_modules/eslint/node_modules/string_decoder/lib/string_decoder.js272
-rw-r--r--tools/node_modules/eslint/node_modules/string_decoder/package.json56
-rw-r--r--tools/node_modules/eslint/node_modules/strip-ansi/index.js4
-rw-r--r--tools/node_modules/eslint/node_modules/strip-ansi/license9
-rw-r--r--tools/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/index.js10
-rw-r--r--tools/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/license9
-rw-r--r--tools/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/package.json85
-rw-r--r--tools/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/readme.md46
-rw-r--r--tools/node_modules/eslint/node_modules/strip-ansi/package.json86
-rw-r--r--tools/node_modules/eslint/node_modules/strip-ansi/readme.md39
-rw-r--r--tools/node_modules/eslint/node_modules/strip-json-comments/index.js70
-rw-r--r--tools/node_modules/eslint/node_modules/strip-json-comments/license21
-rw-r--r--tools/node_modules/eslint/node_modules/strip-json-comments/package.json74
-rw-r--r--tools/node_modules/eslint/node_modules/strip-json-comments/readme.md64
-rw-r--r--tools/node_modules/eslint/node_modules/supports-color/index.js50
-rw-r--r--tools/node_modules/eslint/node_modules/supports-color/license21
-rw-r--r--tools/node_modules/eslint/node_modules/supports-color/package.json89
-rw-r--r--tools/node_modules/eslint/node_modules/supports-color/readme.md36
-rw-r--r--tools/node_modules/eslint/node_modules/table/LICENSE24
-rw-r--r--tools/node_modules/eslint/node_modules/table/README.md671
-rw-r--r--tools/node_modules/eslint/node_modules/table/dist/alignString.js106
-rw-r--r--tools/node_modules/eslint/node_modules/table/dist/alignTableData.js34
-rw-r--r--tools/node_modules/eslint/node_modules/table/dist/calculateCellHeight.js47
-rw-r--r--tools/node_modules/eslint/node_modules/table/dist/calculateCellWidthIndex.js23
-rw-r--r--tools/node_modules/eslint/node_modules/table/dist/calculateMaximumColumnWidthIndex.js41
-rw-r--r--tools/node_modules/eslint/node_modules/table/dist/calculateRowHeightIndex.js48
-rw-r--r--tools/node_modules/eslint/node_modules/table/dist/createStream.js157
-rw-r--r--tools/node_modules/eslint/node_modules/table/dist/drawBorder.js104
-rw-r--r--tools/node_modules/eslint/node_modules/table/dist/drawRow.js21
-rw-r--r--tools/node_modules/eslint/node_modules/table/dist/drawTable.js63
-rw-r--r--tools/node_modules/eslint/node_modules/table/dist/getBorderCharacters.js126
-rw-r--r--tools/node_modules/eslint/node_modules/table/dist/index.js24
-rw-r--r--tools/node_modules/eslint/node_modules/table/dist/makeConfig.js99
-rw-r--r--tools/node_modules/eslint/node_modules/table/dist/makeStreamConfig.js107
-rw-r--r--tools/node_modules/eslint/node_modules/table/dist/mapDataUsingRowHeightIndex.js57
-rw-r--r--tools/node_modules/eslint/node_modules/table/dist/padTableData.js26
-rw-r--r--tools/node_modules/eslint/node_modules/table/dist/schemas/config.json114
-rw-r--r--tools/node_modules/eslint/node_modules/table/dist/schemas/streamConfig.json114
-rw-r--r--tools/node_modules/eslint/node_modules/table/dist/stringifyTableData.js17
-rw-r--r--tools/node_modules/eslint/node_modules/table/dist/table.js133
-rw-r--r--tools/node_modules/eslint/node_modules/table/dist/truncateTableData.js27
-rw-r--r--tools/node_modules/eslint/node_modules/table/dist/validateConfig.js753
-rw-r--r--tools/node_modules/eslint/node_modules/table/dist/validateStreamConfig.js740
-rw-r--r--tools/node_modules/eslint/node_modules/table/dist/validateTableData.js51
-rw-r--r--tools/node_modules/eslint/node_modules/table/dist/wrapString.js46
-rw-r--r--tools/node_modules/eslint/node_modules/table/dist/wrapWord.js56
-rw-r--r--tools/node_modules/eslint/node_modules/table/package.json97
-rw-r--r--tools/node_modules/eslint/node_modules/text-table/LICENSE18
-rw-r--r--tools/node_modules/eslint/node_modules/text-table/index.js86
-rw-r--r--tools/node_modules/eslint/node_modules/text-table/package.json73
-rw-r--r--tools/node_modules/eslint/node_modules/text-table/readme.markdown134
-rw-r--r--tools/node_modules/eslint/node_modules/through/LICENSE.APACHE215
-rw-r--r--tools/node_modules/eslint/node_modules/through/LICENSE.MIT24
-rw-r--r--tools/node_modules/eslint/node_modules/through/index.js108
-rw-r--r--tools/node_modules/eslint/node_modules/through/package.json68
-rw-r--r--tools/node_modules/eslint/node_modules/through/readme.markdown64
-rw-r--r--tools/node_modules/eslint/node_modules/trim-trailing-lines/LICENSE22
-rw-r--r--tools/node_modules/eslint/node_modules/trim-trailing-lines/index.js15
-rw-r--r--tools/node_modules/eslint/node_modules/trim-trailing-lines/package.json96
-rw-r--r--tools/node_modules/eslint/node_modules/trim-trailing-lines/readme.md55
-rw-r--r--tools/node_modules/eslint/node_modules/trim/Makefile7
-rw-r--r--tools/node_modules/eslint/node_modules/trim/Readme.md69
-rw-r--r--tools/node_modules/eslint/node_modules/trim/index.js14
-rw-r--r--tools/node_modules/eslint/node_modules/trim/package.json49
-rw-r--r--tools/node_modules/eslint/node_modules/trough/LICENSE21
-rw-r--r--tools/node_modules/eslint/node_modules/trough/index.js133
-rw-r--r--tools/node_modules/eslint/node_modules/trough/package.json100
-rw-r--r--tools/node_modules/eslint/node_modules/trough/readme.md305
-rw-r--r--tools/node_modules/eslint/node_modules/tryit/README.md56
-rw-r--r--tools/node_modules/eslint/node_modules/tryit/package.json59
-rw-r--r--tools/node_modules/eslint/node_modules/tryit/tryit.js14
-rw-r--r--tools/node_modules/eslint/node_modules/type-check/LICENSE22
-rw-r--r--tools/node_modules/eslint/node_modules/type-check/README.md210
-rw-r--r--tools/node_modules/eslint/node_modules/type-check/lib/check.js126
-rw-r--r--tools/node_modules/eslint/node_modules/type-check/lib/index.js16
-rw-r--r--tools/node_modules/eslint/node_modules/type-check/lib/parse-type.js196
-rw-r--r--tools/node_modules/eslint/node_modules/type-check/package.json71
-rw-r--r--tools/node_modules/eslint/node_modules/typedarray/LICENSE35
-rw-r--r--tools/node_modules/eslint/node_modules/typedarray/index.js630
-rw-r--r--tools/node_modules/eslint/node_modules/typedarray/package.json83
-rw-r--r--tools/node_modules/eslint/node_modules/typedarray/readme.markdown61
-rw-r--r--tools/node_modules/eslint/node_modules/unherit/LICENSE21
-rw-r--r--tools/node_modules/eslint/node_modules/unherit/index.js67
-rw-r--r--tools/node_modules/eslint/node_modules/unherit/package.json109
-rw-r--r--tools/node_modules/eslint/node_modules/unherit/readme.md66
-rw-r--r--tools/node_modules/eslint/node_modules/unified/LICENSE21
-rw-r--r--tools/node_modules/eslint/node_modules/unified/index.js460
-rw-r--r--tools/node_modules/eslint/node_modules/unified/package.json117
-rw-r--r--tools/node_modules/eslint/node_modules/unified/readme.md929
-rw-r--r--tools/node_modules/eslint/node_modules/unist-util-is/LICENSE22
-rw-r--r--tools/node_modules/eslint/node_modules/unist-util-is/index.js119
-rw-r--r--tools/node_modules/eslint/node_modules/unist-util-is/package.json105
-rw-r--r--tools/node_modules/eslint/node_modules/unist-util-is/readme.md120
-rw-r--r--tools/node_modules/eslint/node_modules/unist-util-remove-position/LICENSE22
-rw-r--r--tools/node_modules/eslint/node_modules/unist-util-remove-position/index.js19
-rw-r--r--tools/node_modules/eslint/node_modules/unist-util-remove-position/package.json103
-rw-r--r--tools/node_modules/eslint/node_modules/unist-util-remove-position/readme.md77
-rw-r--r--tools/node_modules/eslint/node_modules/unist-util-stringify-position/LICENSE22
-rw-r--r--tools/node_modules/eslint/node_modules/unist-util-stringify-position/index.js50
-rw-r--r--tools/node_modules/eslint/node_modules/unist-util-stringify-position/package.json103
-rw-r--r--tools/node_modules/eslint/node_modules/unist-util-stringify-position/readme.md85
-rw-r--r--tools/node_modules/eslint/node_modules/unist-util-visit/LICENSE22
-rw-r--r--tools/node_modules/eslint/node_modules/unist-util-visit/index.js55
-rw-r--r--tools/node_modules/eslint/node_modules/unist-util-visit/package.json116
-rw-r--r--tools/node_modules/eslint/node_modules/unist-util-visit/readme.md119
-rw-r--r--tools/node_modules/eslint/node_modules/util-deprecate/LICENSE24
-rw-r--r--tools/node_modules/eslint/node_modules/util-deprecate/README.md53
-rw-r--r--tools/node_modules/eslint/node_modules/util-deprecate/browser.js67
-rw-r--r--tools/node_modules/eslint/node_modules/util-deprecate/node.js6
-rw-r--r--tools/node_modules/eslint/node_modules/util-deprecate/package.json56
-rw-r--r--tools/node_modules/eslint/node_modules/vfile-location/LICENSE22
-rw-r--r--tools/node_modules/eslint/node_modules/vfile-location/index.js77
-rw-r--r--tools/node_modules/eslint/node_modules/vfile-location/package.json100
-rw-r--r--tools/node_modules/eslint/node_modules/vfile-location/readme.md72
-rw-r--r--tools/node_modules/eslint/node_modules/vfile-message/LICENSE22
-rw-r--r--tools/node_modules/eslint/node_modules/vfile-message/index.js94
-rw-r--r--tools/node_modules/eslint/node_modules/vfile-message/package.json99
-rw-r--r--tools/node_modules/eslint/node_modules/vfile-message/readme.md166
-rw-r--r--tools/node_modules/eslint/node_modules/vfile/LICENSE21
-rw-r--r--tools/node_modules/eslint/node_modules/vfile/core.js169
-rw-r--r--tools/node_modules/eslint/node_modules/vfile/index.js53
-rw-r--r--tools/node_modules/eslint/node_modules/vfile/package.json132
-rw-r--r--tools/node_modules/eslint/node_modules/vfile/readme.md285
-rw-r--r--tools/node_modules/eslint/node_modules/which/LICENSE15
-rw-r--r--tools/node_modules/eslint/node_modules/which/README.md51
-rwxr-xr-xtools/node_modules/eslint/node_modules/which/bin/which52
-rw-r--r--tools/node_modules/eslint/node_modules/which/package.json65
-rw-r--r--tools/node_modules/eslint/node_modules/which/which.js135
-rw-r--r--tools/node_modules/eslint/node_modules/wordwrap/LICENSE18
-rw-r--r--tools/node_modules/eslint/node_modules/wordwrap/README.markdown70
-rw-r--r--tools/node_modules/eslint/node_modules/wordwrap/index.js76
-rw-r--r--tools/node_modules/eslint/node_modules/wordwrap/package.json63
-rw-r--r--tools/node_modules/eslint/node_modules/wrappy/LICENSE15
-rw-r--r--tools/node_modules/eslint/node_modules/wrappy/README.md36
-rw-r--r--tools/node_modules/eslint/node_modules/wrappy/package.json59
-rw-r--r--tools/node_modules/eslint/node_modules/wrappy/wrappy.js33
-rw-r--r--tools/node_modules/eslint/node_modules/write/LICENSE21
-rw-r--r--tools/node_modules/eslint/node_modules/write/README.md101
-rw-r--r--tools/node_modules/eslint/node_modules/write/index.js93
-rw-r--r--tools/node_modules/eslint/node_modules/write/package.json74
-rw-r--r--tools/node_modules/eslint/node_modules/x-is-function/LICENSE21
-rw-r--r--tools/node_modules/eslint/node_modules/x-is-function/README.md41
-rw-r--r--tools/node_modules/eslint/node_modules/x-is-function/index.js3
-rw-r--r--tools/node_modules/eslint/node_modules/x-is-function/package.json46
-rw-r--r--tools/node_modules/eslint/node_modules/x-is-string/LICENCE19
-rw-r--r--tools/node_modules/eslint/node_modules/x-is-string/README.md46
-rw-r--r--tools/node_modules/eslint/node_modules/x-is-string/index.js7
-rw-r--r--tools/node_modules/eslint/node_modules/x-is-string/package.json86
-rw-r--r--tools/node_modules/eslint/node_modules/xtend/LICENCE19
-rw-r--r--tools/node_modules/eslint/node_modules/xtend/Makefile4
-rw-r--r--tools/node_modules/eslint/node_modules/xtend/README.md32
-rw-r--r--tools/node_modules/eslint/node_modules/xtend/immutable.js19
-rw-r--r--tools/node_modules/eslint/node_modules/xtend/mutable.js17
-rw-r--r--tools/node_modules/eslint/node_modules/xtend/package.json87
-rw-r--r--tools/node_modules/eslint/node_modules/yallist/LICENSE15
-rw-r--r--tools/node_modules/eslint/node_modules/yallist/README.md204
-rw-r--r--tools/node_modules/eslint/node_modules/yallist/iterator.js7
-rw-r--r--tools/node_modules/eslint/node_modules/yallist/package.json62
-rw-r--r--tools/node_modules/eslint/node_modules/yallist/yallist.js370
-rw-r--r--tools/node_modules/eslint/package.json161
2554 files changed, 276304 insertions, 0 deletions
diff --git a/tools/node_modules/eslint/LICENSE b/tools/node_modules/eslint/LICENSE
new file mode 100644
index 0000000000..7fe552a866
--- /dev/null
+++ b/tools/node_modules/eslint/LICENSE
@@ -0,0 +1,19 @@
+Copyright JS Foundation and other contributors, https://js.foundation
+
+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/tools/node_modules/eslint/README.md b/tools/node_modules/eslint/README.md
new file mode 100644
index 0000000000..5a23d6295d
--- /dev/null
+++ b/tools/node_modules/eslint/README.md
@@ -0,0 +1,254 @@
+[![NPM version][npm-image]][npm-url]
+[![build status][travis-image]][travis-url]
+[![Build status][appveyor-image]][appveyor-url]
+[![Test coverage][coveralls-image]][coveralls-url]
+[![Downloads][downloads-image]][downloads-url]
+[![Bountysource](https://www.bountysource.com/badge/tracker?tracker_id=282608)](https://www.bountysource.com/trackers/282608-eslint?utm_source=282608&utm_medium=shield&utm_campaign=TRACKER_BADGE)
+[![Join the chat at https://gitter.im/eslint/eslint](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/eslint/eslint?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Feslint%2Feslint.svg?type=shield)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Feslint%2Feslint?ref=badge_shield)
+
+# ESLint
+
+[Website](https://eslint.org) |
+[Configuring](https://eslint.org/docs/user-guide/configuring) |
+[Rules](https://eslint.org/docs/rules/) |
+[Contributing](https://eslint.org/docs/developer-guide/contributing) |
+[Reporting Bugs](https://eslint.org/docs/developer-guide/contributing/reporting-bugs) |
+[Code of Conduct](https://js.foundation/community/code-of-conduct) |
+[Twitter](https://twitter.com/geteslint) |
+[Mailing List](https://groups.google.com/group/eslint) |
+[Chat Room](https://gitter.im/eslint/eslint)
+
+ESLint is a tool for identifying and reporting on patterns found in ECMAScript/JavaScript code. In many ways, it is similar to JSLint and JSHint with a few exceptions:
+
+* ESLint uses [Espree](https://github.com/eslint/espree) for JavaScript parsing.
+* ESLint uses an AST to evaluate patterns in code.
+* ESLint is completely pluggable, every single rule is a plugin and you can add more at runtime.
+
+## Installation and Usage
+
+Prerequisites: [Node.js](https://nodejs.org/en/) (>=4.x), npm version 2+.
+
+There are two ways to install ESLint: globally and locally.
+
+### Local Installation and Usage
+
+If you want to include ESLint as part of your project's build system, we recommend installing it locally. You can do so using npm:
+
+```
+$ npm install eslint --save-dev
+```
+
+You should then setup a configuration file:
+
+```
+$ ./node_modules/.bin/eslint --init
+```
+
+After that, you can run ESLint on any file or directory like this:
+
+```
+$ ./node_modules/.bin/eslint yourfile.js
+```
+
+Any plugins or shareable configs that you use must also be installed locally to work with a locally-installed ESLint.
+
+### Global Installation and Usage
+
+If you want to make ESLint available to tools that run across all of your projects, we recommend installing ESLint globally. You can do so using npm:
+
+```
+$ npm install -g eslint
+```
+
+You should then setup a configuration file:
+
+```
+$ eslint --init
+```
+
+After that, you can run ESLint on any file or directory like this:
+
+```
+$ eslint yourfile.js
+```
+
+Any plugins or shareable configs that you use must also be installed globally to work with a globally-installed ESLint.
+
+**Note:** `eslint --init` is intended for setting up and configuring ESLint on a per-project basis and will perform a local installation of ESLint and its plugins in the directory in which it is run. If you prefer using a global installation of ESLint, any plugins used in your configuration must also be installed globally.
+
+## Configuration
+
+After running `eslint --init`, you'll have a `.eslintrc` file in your directory. In it, you'll see some rules configured like this:
+
+```json
+{
+ "rules": {
+ "semi": ["error", "always"],
+ "quotes": ["error", "double"]
+ }
+}
+```
+
+The names `"semi"` and `"quotes"` are the names of [rules](https://eslint.org/docs/rules) in ESLint. The first value is the error level of the rule and can be one of these values:
+
+* `"off"` or `0` - turn the rule off
+* `"warn"` or `1` - turn the rule on as a warning (doesn't affect exit code)
+* `"error"` or `2` - turn the rule on as an error (exit code will be 1)
+
+The three error levels allow you fine-grained control over how ESLint applies rules (for more configuration options and details, see the [configuration docs](https://eslint.org/docs/user-guide/configuring)).
+
+## Sponsors
+
+* Site search ([eslint.org](https://eslint.org)) is sponsored by [Algolia](https://www.algolia.com)
+
+## Team
+
+These folks keep the project moving and are resources for help.
+
+### Technical Steering Committee (TSC)
+
+* Nicholas C. Zakas ([@nzakas](https://github.com/nzakas))
+* Ilya Volodin ([@ilyavolodin](https://github.com/ilyavolodin))
+* Brandon Mills ([@btmills](https://github.com/btmills))
+* Gyandeep Singh ([@gyandeeps](https://github.com/gyandeeps))
+* Toru Nagashima ([@mysticatea](https://github.com/mysticatea))
+* Alberto Rodríguez ([@alberto](https://github.com/alberto))
+* Kai Cataldo ([@kaicataldo](https://github.com/kaicataldo))
+* Teddy Katz ([@not-an-aardvark](https://github.com/not-an-aardvark))
+* Kevin Partington ([@platinumazure](https://github.com/platinumazure))
+
+### Development Team
+
+* Mathias Schreck ([@lo1tuma](https://github.com/lo1tuma))
+* Jamund Ferguson ([@xjamundx](https://github.com/xjamundx))
+* Ian VanSchooten ([@ianvs](https://github.com/ianvs))
+* Burak Yiğit Kaya ([@byk](https://github.com/byk))
+* Michael Ficarra ([@michaelficarra](https://github.com/michaelficarra))
+* Mark Pedrotti ([@pedrottimark](https://github.com/pedrottimark))
+* Oleg Gaidarenko ([@markelog](https://github.com/markelog))
+* Mike Sherov ([@mikesherov](https://github.com/mikesherov))
+* Henry Zhu ([@hzoo](https://github.com/hzoo))
+* Marat Dulin ([@mdevils](https://github.com/mdevils))
+* Alexej Yaroshevich ([@zxqfox](https://github.com/zxqfox))
+* Vitor Balocco ([@vitorbal](https://github.com/vitorbal))
+* James Henry ([@JamesHenry](https://github.com/JamesHenry))
+* Reyad Attiyat ([@soda0289](https://github.com/soda0289))
+* 薛定谔的猫 ([@Aladdin-ADD](https://github.com/Aladdin-ADD))
+* Victor Hom ([@VictorHom](https://github.com/VictorHom))
+
+## Releases
+
+We have scheduled releases every two weeks on Friday or Saturday.
+
+## Code of Conduct
+
+ESLint adheres to the [JS Foundation Code of Conduct](https://js.foundation/community/code-of-conduct).
+
+## Filing Issues
+
+Before filing an issue, please be sure to read the guidelines for what you're reporting:
+
+* [Bug Report](https://eslint.org/docs/developer-guide/contributing/reporting-bugs)
+* [Propose a New Rule](https://eslint.org/docs/developer-guide/contributing/new-rules)
+* [Proposing a Rule Change](https://eslint.org/docs/developer-guide/contributing/rule-changes)
+* [Request a Change](https://eslint.org/docs/developer-guide/contributing/changes)
+
+## Semantic Versioning Policy
+
+ESLint follows [semantic versioning](http://semver.org). However, due to the nature of ESLint as a code quality tool, it's not always clear when a minor or major version bump occurs. To help clarify this for everyone, we've defined the following semantic versioning policy for ESLint:
+
+* Patch release (intended to not break your lint build)
+ * A bug fix in a rule that results in ESLint reporting fewer errors.
+ * A bug fix to the CLI or core (including formatters).
+ * Improvements to documentation.
+ * Non-user-facing changes such as refactoring code, adding, deleting, or modifying tests, and increasing test coverage.
+ * Re-releasing after a failed release (i.e., publishing a release that doesn't work for anyone).
+* Minor release (might break your lint build)
+ * A bug fix in a rule that results in ESLint reporting more errors.
+ * A new rule is created.
+ * A new option to an existing rule that does not result in ESLint reporting more errors by default.
+ * An existing rule is deprecated.
+ * A new CLI capability is created.
+ * New capabilities to the public API are added (new classes, new methods, new arguments to existing methods, etc.).
+ * A new formatter is created.
+* Major release (likely to break your lint build)
+ * `eslint:recommended` is updated.
+ * A new option to an existing rule that results in ESLint reporting more errors by default.
+ * An existing formatter is removed.
+ * Part of the public API is removed or changed in an incompatible way.
+
+According to our policy, any minor update may report more errors than the previous release (ex: from a bug fix). As such, we recommend using the tilde (`~`) in `package.json` e.g. `"eslint": "~3.1.0"` to guarantee the results of your builds.
+
+## License
+
+[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Feslint%2Feslint.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Feslint%2Feslint?ref=badge_large)
+
+## Frequently Asked Questions
+
+### How is ESLint different from JSHint?
+
+The most significant difference is that ESlint has pluggable linting rules. That means you can use the rules it comes with, or you can extend it with rules created by others or by yourself!
+
+### How does ESLint performance compare to JSHint?
+
+ESLint is slower than JSHint, usually 2-3x slower on a single file. This is because ESLint uses Espree to construct an AST before it can evaluate your code whereas JSHint evaluates your code as it's being parsed. The speed is also based on the number of rules you enable; the more rules you enable, the slower the process.
+
+Despite being slower, we believe that ESLint is fast enough to replace JSHint without causing significant pain.
+
+### I heard ESLint is going to replace JSCS?
+
+Yes. Since we are solving the same problems, ESLint and JSCS teams have decided to join forces and work together in the development of ESLint instead of competing with each other. You can read more about this in both [ESLint](https://eslint.org/blog/2016/04/welcoming-jscs-to-eslint) and [JSCS](https://medium.com/@markelog/jscs-end-of-the-line-bc9bf0b3fdb2#.u76sx334n) announcements.
+
+### So, should I stop using JSCS and start using ESLint?
+
+Maybe, depending on how much you need it. [JSCS has reached end of life](https://eslint.org/blog/2016/07/jscs-end-of-life), but if it is working for you then there is no reason to move yet. We are still working to smooth the transition. You can see our progress [here](https://github.com/eslint/eslint/milestones/JSCS%20Compatibility). We’ll announce when all of the changes necessary to support JSCS users in ESLint are complete and will start encouraging JSCS users to switch to ESLint at that time.
+
+If you are having issues with JSCS, you can try to move to ESLint. We are focusing our time and energy on JSCS compatibility issues.
+
+### Is ESLint just linting or does it also check style?
+
+ESLint does both traditional linting (looking for problematic patterns) and style checking (enforcement of conventions). You can use it for both.
+
+### Why can't ESLint find my plugins?
+
+ESLint can be [globally or locally installed](#installation-and-usage). If you install ESLint globally, your plugins must also be installed globally; if you install ESLint locally, your plugins must also be installed locally.
+
+If you are trying to run globally, make sure your plugins are installed globally (use `npm ls -g`).
+
+If you are trying to run locally:
+
+* Make sure your plugins (and ESLint) are both in your project's `package.json` as devDependencies (or dependencies, if your project uses ESLint at runtime).
+* Make sure you have run `npm install` and all your dependencies are installed.
+
+In all cases, make sure your plugins' peerDependencies have been installed as well. You can use `npm view eslint-plugin-myplugin peerDepencies` to see what peer dependencies `eslint-plugin-myplugin` has.
+
+### Does ESLint support JSX?
+
+Yes, ESLint natively supports parsing JSX syntax (this must be enabled in [configuration](https://eslint.org/docs/user-guide/configuring)). Please note that supporting JSX syntax *is not* the same as supporting React. React applies specific semantics to JSX syntax that ESLint doesn't recognize. We recommend using [eslint-plugin-react](https://www.npmjs.com/package/eslint-plugin-react) if you are using React and want React semantics.
+
+### What about ECMAScript 6 support?
+
+ESLint has full support for ECMAScript 6. By default, this support is off. You can enable ECMAScript 6 syntax and global variables through [configuration](https://eslint.org/docs/user-guide/configuring).
+
+### What about experimental features?
+
+ESLint doesn't natively support experimental ECMAScript language features. You can use [babel-eslint](https://github.com/babel/babel-eslint) to use any option available in Babel.
+
+Once a language feature has been adopted into the ECMAScript standard (stage 4 according to the [TC39 process](https://tc39.github.io/process-document/)), we will accept issues and pull requests related to the new feature, subject to our [contributing guidelines](https://eslint.org/docs/developer-guide/contributing). Until then, please use the appropriate parser and plugin(s) for your experimental feature.
+
+### Where to ask for help?
+
+Join our [Mailing List](https://groups.google.com/group/eslint) or [Chatroom](https://gitter.im/eslint/eslint)
+
+
+[npm-image]: https://img.shields.io/npm/v/eslint.svg?style=flat-square
+[npm-url]: https://www.npmjs.com/package/eslint
+[travis-image]: https://img.shields.io/travis/eslint/eslint/master.svg?style=flat-square
+[travis-url]: https://travis-ci.org/eslint/eslint
+[appveyor-image]: https://ci.appveyor.com/api/projects/status/iwxmiobcvbw3b0av/branch/master?svg=true
+[appveyor-url]: https://ci.appveyor.com/project/nzakas/eslint/branch/master
+[coveralls-image]: https://img.shields.io/coveralls/eslint/eslint/master.svg?style=flat-square
+[coveralls-url]: https://coveralls.io/r/eslint/eslint?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/eslint.svg?style=flat-square
+[downloads-url]: https://www.npmjs.com/package/eslint
diff --git a/tools/node_modules/eslint/bin/eslint.js b/tools/node_modules/eslint/bin/eslint.js
new file mode 100755
index 0000000000..1a298047ae
--- /dev/null
+++ b/tools/node_modules/eslint/bin/eslint.js
@@ -0,0 +1,75 @@
+#!/usr/bin/env node
+
+/**
+ * @fileoverview Main CLI that is run via the eslint command.
+ * @author Nicholas C. Zakas
+ */
+
+/* eslint no-console:off */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+const useStdIn = (process.argv.indexOf("--stdin") > -1),
+ init = (process.argv.indexOf("--init") > -1),
+ debug = (process.argv.indexOf("--debug") > -1);
+
+// must do this initialization *before* other requires in order to work
+if (debug) {
+ require("debug").enable("eslint:*,-eslint:code-path");
+}
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+// now we can safely include the other modules that use debug
+const concat = require("concat-stream"),
+ cli = require("../lib/cli"),
+ path = require("path"),
+ fs = require("fs");
+
+//------------------------------------------------------------------------------
+// Execution
+//------------------------------------------------------------------------------
+
+process.once("uncaughtException", err => {
+
+ // lazy load
+ const lodash = require("lodash");
+
+ if (typeof err.messageTemplate === "string" && err.messageTemplate.length > 0) {
+ const template = lodash.template(fs.readFileSync(path.resolve(__dirname, `../messages/${err.messageTemplate}.txt`), "utf-8"));
+ const pkg = require("../package.json");
+
+ console.error("\nOops! Something went wrong! :(");
+ console.error(`\nESLint: ${pkg.version}.\n${template(err.messageData || {})}`);
+ } else {
+
+ console.error(err.message);
+ console.error(err.stack);
+ }
+
+ process.exitCode = 1;
+});
+
+if (useStdIn) {
+ process.stdin.pipe(concat({ encoding: "string" }, text => {
+ process.exitCode = cli.execute(process.argv, text);
+ }));
+} else if (init) {
+ const configInit = require("../lib/config/config-initializer");
+
+ configInit.initializeConfig().then(() => {
+ process.exitCode = 0;
+ }).catch(err => {
+ process.exitCode = 1;
+ console.error(err.message);
+ console.error(err.stack);
+ });
+} else {
+ process.exitCode = cli.execute(process.argv);
+}
diff --git a/tools/node_modules/eslint/conf/blank-script.json b/tools/node_modules/eslint/conf/blank-script.json
new file mode 100644
index 0000000000..d7d7d37ba8
--- /dev/null
+++ b/tools/node_modules/eslint/conf/blank-script.json
@@ -0,0 +1,21 @@
+{
+ "type": "Program",
+ "body": [],
+ "sourceType": "script",
+ "range": [
+ 0,
+ 0
+ ],
+ "loc": {
+ "start": {
+ "line": 0,
+ "column": 0
+ },
+ "end": {
+ "line": 0,
+ "column": 0
+ }
+ },
+ "comments": [],
+ "tokens": []
+}
diff --git a/tools/node_modules/eslint/conf/category-list.json b/tools/node_modules/eslint/conf/category-list.json
new file mode 100644
index 0000000000..5427667b09
--- /dev/null
+++ b/tools/node_modules/eslint/conf/category-list.json
@@ -0,0 +1,40 @@
+{
+ "categories": [
+ { "name": "Possible Errors", "description": "These rules relate to possible syntax or logic errors in JavaScript code:" },
+ { "name": "Best Practices", "description": "These rules relate to better ways of doing things to help you avoid problems:" },
+ { "name": "Strict Mode", "description": "These rules relate to strict mode directives:" },
+ { "name": "Variables", "description": "These rules relate to variable declarations:" },
+ { "name": "Node.js and CommonJS", "description": "These rules relate to code running in Node.js, or in browsers with CommonJS:" },
+ { "name": "Stylistic Issues", "description": "These rules relate to style guidelines, and are therefore quite subjective:" },
+ { "name": "ECMAScript 6", "description": "These rules relate to ES6, also known as ES2015:" }
+ ],
+ "deprecated": {
+ "name": "Deprecated",
+ "description": "These rules have been deprecated in accordance with the [deprecation policy](/docs/user-guide/rule-deprecation), and replaced by newer rules:",
+ "rules": []
+ },
+ "removed": {
+ "name": "Removed",
+ "description": "These rules from older versions of ESLint (before the [deprecation policy](/docs/user-guide/rule-deprecation) existed) have been replaced by newer rules:",
+ "rules": [
+ { "removed": "generator-star", "replacedBy": ["generator-star-spacing"] },
+ { "removed": "global-strict", "replacedBy": ["strict"] },
+ { "removed": "no-arrow-condition", "replacedBy": ["no-confusing-arrow", "no-constant-condition"] },
+ { "removed": "no-comma-dangle", "replacedBy": ["comma-dangle"] },
+ { "removed": "no-empty-class", "replacedBy": ["no-empty-character-class"] },
+ { "removed": "no-empty-label", "replacedBy": ["no-labels"] },
+ { "removed": "no-extra-strict", "replacedBy": ["strict"] },
+ { "removed": "no-reserved-keys", "replacedBy": ["quote-props"] },
+ { "removed": "no-space-before-semi", "replacedBy": ["semi-spacing"] },
+ { "removed": "no-wrap-func", "replacedBy": ["no-extra-parens"] },
+ { "removed": "space-after-function-name", "replacedBy": ["space-before-function-paren"] },
+ { "removed": "space-after-keywords", "replacedBy": ["keyword-spacing"] },
+ { "removed": "space-before-function-parentheses", "replacedBy": ["space-before-function-paren"] },
+ { "removed": "space-before-keywords", "replacedBy": ["keyword-spacing"] },
+ { "removed": "space-in-brackets", "replacedBy": ["object-curly-spacing", "array-bracket-spacing"] },
+ { "removed": "space-return-throw-case", "replacedBy": ["keyword-spacing"] },
+ { "removed": "space-unary-word-ops", "replacedBy": ["space-unary-ops"] },
+ { "removed": "spaced-line-comment", "replacedBy": ["spaced-comment"] }
+ ]
+ }
+}
diff --git a/tools/node_modules/eslint/conf/config-schema.js b/tools/node_modules/eslint/conf/config-schema.js
new file mode 100644
index 0000000000..626e1d54c5
--- /dev/null
+++ b/tools/node_modules/eslint/conf/config-schema.js
@@ -0,0 +1,70 @@
+/**
+ * @fileoverview Defines a schema for configs.
+ * @author Sylvan Mably
+ */
+
+"use strict";
+
+const baseConfigProperties = {
+ env: { type: "object" },
+ globals: { type: "object" },
+ parser: { type: ["string", "null"] },
+ parserOptions: { type: "object" },
+ plugins: { type: "array" },
+ rules: { type: "object" },
+ settings: { type: "object" },
+
+ ecmaFeatures: { type: "object" } // deprecated; logs a warning when used
+};
+
+const overrideProperties = Object.assign(
+ {},
+ baseConfigProperties,
+ {
+ files: {
+ oneOf: [
+ { type: "string" },
+ {
+ type: "array",
+ items: { type: "string" },
+ minItems: 1
+ }
+ ]
+ },
+ excludedFiles: {
+ oneOf: [
+ { type: "string" },
+ {
+ type: "array",
+ items: { type: "string" }
+ }
+ ]
+ }
+ }
+);
+
+const topLevelConfigProperties = Object.assign(
+ {},
+ baseConfigProperties,
+ {
+ extends: { type: ["string", "array"] },
+ root: { type: "boolean" },
+ overrides: {
+ type: "array",
+ items: {
+ type: "object",
+ properties: overrideProperties,
+ required: ["files"],
+ additionalProperties: false
+ }
+ }
+ }
+);
+
+const configSchema = {
+ type: "object",
+ properties: topLevelConfigProperties,
+ additionalProperties: false
+};
+
+module.exports = configSchema;
diff --git a/tools/node_modules/eslint/conf/default-cli-options.js b/tools/node_modules/eslint/conf/default-cli-options.js
new file mode 100644
index 0000000000..7d46d46c52
--- /dev/null
+++ b/tools/node_modules/eslint/conf/default-cli-options.js
@@ -0,0 +1,30 @@
+/**
+ * @fileoverview Default CLIEngineOptions.
+ * @author Ian VanSchooten
+ */
+
+"use strict";
+
+module.exports = {
+ configFile: null,
+ baseConfig: false,
+ rulePaths: [],
+ useEslintrc: true,
+ envs: [],
+ globals: [],
+ extensions: [".js"],
+ ignore: true,
+ ignorePath: null,
+ cache: false,
+
+ /*
+ * in order to honor the cacheFile option if specified
+ * this option should not have a default value otherwise
+ * it will always be used
+ */
+ cacheLocation: "",
+ cacheFile: ".eslintcache",
+ fix: false,
+ allowInlineConfig: true,
+ reportUnusedDisableDirectives: false
+};
diff --git a/tools/node_modules/eslint/conf/default-config-options.js b/tools/node_modules/eslint/conf/default-config-options.js
new file mode 100644
index 0000000000..96fe25ce6f
--- /dev/null
+++ b/tools/node_modules/eslint/conf/default-config-options.js
@@ -0,0 +1,29 @@
+/**
+ * @fileoverview Default config options
+ * @author Teddy Katz
+ */
+
+"use strict";
+
+/**
+ * Freezes an object and all its nested properties
+ * @param {Object} obj The object to deeply freeze
+ * @returns {Object} `obj` after freezing it
+ */
+function deepFreeze(obj) {
+ if (obj === null || typeof obj !== "object") {
+ return obj;
+ }
+
+ Object.keys(obj).map(key => obj[key]).forEach(deepFreeze);
+ return Object.freeze(obj);
+}
+
+module.exports = deepFreeze({
+ env: {},
+ globals: {},
+ rules: {},
+ settings: {},
+ parser: "espree",
+ parserOptions: {}
+});
diff --git a/tools/node_modules/eslint/conf/environments.js b/tools/node_modules/eslint/conf/environments.js
new file mode 100644
index 0000000000..44f2e0dee5
--- /dev/null
+++ b/tools/node_modules/eslint/conf/environments.js
@@ -0,0 +1,231 @@
+/**
+ * @fileoverview Defines environment settings and globals.
+ * @author Elan Shanker
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const globals = require("globals");
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+module.exports = {
+ builtin: globals.es5,
+ browser: {
+
+ /*
+ * For backward compatibility.
+ * Remove those on the next major release.
+ */
+ globals: Object.assign(
+ {
+ AutocompleteErrorEvent: false,
+ CDATASection: false,
+ ClientRect: false,
+ ClientRectList: false,
+ CSSAnimation: false,
+ CSSTransition: false,
+ CSSUnknownRule: false,
+ CSSViewportRule: false,
+ Debug: false,
+ DocumentTimeline: false,
+ DOMSettableTokenList: false,
+ ElementTimeControl: false,
+ FederatedCredential: false,
+ FileError: false,
+ HTMLAppletElement: false,
+ HTMLBlockquoteElement: false,
+ HTMLIsIndexElement: false,
+ HTMLKeygenElement: false,
+ HTMLLayerElement: false,
+ IDBEnvironment: false,
+ InputMethodContext: false,
+ MediaKeyError: false,
+ MediaKeyEvent: false,
+ MediaKeys: false,
+ opera: false,
+ PasswordCredential: false,
+ ReadableByteStream: false,
+ SharedKeyframeList: false,
+ showModalDialog: false,
+ SiteBoundCredential: false,
+ SVGAltGlyphDefElement: false,
+ SVGAltGlyphElement: false,
+ SVGAltGlyphItemElement: false,
+ SVGAnimateColorElement: false,
+ SVGAnimatedPathData: false,
+ SVGAnimatedPoints: false,
+ SVGColor: false,
+ SVGColorProfileElement: false,
+ SVGColorProfileRule: false,
+ SVGCSSRule: false,
+ SVGCursorElement: false,
+ SVGDocument: false,
+ SVGElementInstance: false,
+ SVGElementInstanceList: false,
+ SVGEvent: false,
+ SVGExternalResourcesRequired: false,
+ SVGFilterPrimitiveStandardAttributes: false,
+ SVGFitToViewBox: false,
+ SVGFontElement: false,
+ SVGFontFaceElement: false,
+ SVGFontFaceFormatElement: false,
+ SVGFontFaceNameElement: false,
+ SVGFontFaceSrcElement: false,
+ SVGFontFaceUriElement: false,
+ SVGGlyphElement: false,
+ SVGGlyphRefElement: false,
+ SVGHKernElement: false,
+ SVGICCColor: false,
+ SVGLangSpace: false,
+ SVGLocatable: false,
+ SVGMissingGlyphElement: false,
+ SVGPaint: false,
+ SVGPathSeg: false,
+ SVGPathSegArcAbs: false,
+ SVGPathSegArcRel: false,
+ SVGPathSegClosePath: false,
+ SVGPathSegCurvetoCubicAbs: false,
+ SVGPathSegCurvetoCubicRel: false,
+ SVGPathSegCurvetoCubicSmoothAbs: false,
+ SVGPathSegCurvetoCubicSmoothRel: false,
+ SVGPathSegCurvetoQuadraticAbs: false,
+ SVGPathSegCurvetoQuadraticRel: false,
+ SVGPathSegCurvetoQuadraticSmoothAbs: false,
+ SVGPathSegCurvetoQuadraticSmoothRel: false,
+ SVGPathSegLinetoAbs: false,
+ SVGPathSegLinetoHorizontalAbs: false,
+ SVGPathSegLinetoHorizontalRel: false,
+ SVGPathSegLinetoRel: false,
+ SVGPathSegLinetoVerticalAbs: false,
+ SVGPathSegLinetoVerticalRel: false,
+ SVGPathSegList: false,
+ SVGPathSegMovetoAbs: false,
+ SVGPathSegMovetoRel: false,
+ SVGRenderingIntent: false,
+ SVGStylable: false,
+ SVGTests: false,
+ SVGTransformable: false,
+ SVGTRefElement: false,
+ SVGURIReference: false,
+ SVGViewSpec: false,
+ SVGVKernElement: false,
+ SVGZoomAndPan: false,
+ SVGZoomEvent: false,
+ TimeEvent: false,
+ XDomainRequest: false,
+ XMLHttpRequestProgressEvent: false,
+ XPathException: false,
+ XPathNamespace: false,
+ XPathNSResolver: false
+ },
+ globals.browser
+ )
+ },
+ node: {
+
+ /*
+ * For backward compatibility.
+ * Remove those on the next major release.
+ */
+ globals: Object.assign(
+ { arguments: false, GLOBAL: false, root: false },
+ globals.node
+ ),
+ parserOptions: {
+ ecmaFeatures: {
+ globalReturn: true
+ }
+ }
+ },
+ commonjs: {
+ globals: globals.commonjs,
+ parserOptions: {
+ ecmaFeatures: {
+ globalReturn: true
+ }
+ }
+ },
+ "shared-node-browser": {
+ globals: globals["shared-node-browser"]
+ },
+ worker: {
+ globals: globals.worker
+ },
+ amd: {
+ globals: globals.amd
+ },
+ mocha: {
+ globals: globals.mocha
+ },
+ jasmine: {
+ globals: globals.jasmine
+ },
+ jest: {
+
+ /*
+ * For backward compatibility.
+ * Remove those on the next major release.
+ */
+ globals: Object.assign(
+ { check: false, gen: false },
+ globals.jest
+ )
+ },
+ phantomjs: {
+ globals: globals.phantomjs
+ },
+ jquery: {
+ globals: globals.jquery
+ },
+ qunit: {
+ globals: globals.qunit
+ },
+ prototypejs: {
+ globals: globals.prototypejs
+ },
+ shelljs: {
+ globals: globals.shelljs
+ },
+ meteor: {
+ globals: globals.meteor
+ },
+ mongo: {
+ globals: globals.mongo
+ },
+ protractor: {
+ globals: globals.protractor
+ },
+ applescript: {
+ globals: globals.applescript
+ },
+ nashorn: {
+ globals: globals.nashorn
+ },
+ serviceworker: {
+ globals: globals.serviceworker
+ },
+ atomtest: {
+ globals: globals.atomtest
+ },
+ embertest: {
+ globals: globals.embertest
+ },
+ webextensions: {
+ globals: globals.webextensions
+ },
+ es6: {
+ globals: globals.es2015,
+ parserOptions: {
+ ecmaVersion: 6
+ }
+ },
+ greasemonkey: {
+ globals: globals.greasemonkey
+ }
+};
diff --git a/tools/node_modules/eslint/conf/eslint-all.js b/tools/node_modules/eslint/conf/eslint-all.js
new file mode 100644
index 0000000000..43db54fb71
--- /dev/null
+++ b/tools/node_modules/eslint/conf/eslint-all.js
@@ -0,0 +1,31 @@
+/**
+ * @fileoverview Config to enable all rules.
+ * @author Robert Fletcher
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const load = require("../lib/load-rules"),
+ Rules = require("../lib/rules");
+const rules = new Rules();
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+const enabledRules = Object.keys(load()).reduce((result, ruleId) => {
+ if (!rules.get(ruleId).meta.deprecated) {
+ result[ruleId] = "error";
+ }
+ return result;
+}, {});
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+module.exports = { rules: enabledRules };
diff --git a/tools/node_modules/eslint/conf/eslint-recommended.js b/tools/node_modules/eslint/conf/eslint-recommended.js
new file mode 100755
index 0000000000..0acee234a5
--- /dev/null
+++ b/tools/node_modules/eslint/conf/eslint-recommended.js
@@ -0,0 +1,271 @@
+/**
+ * @fileoverview Configuration applied when a user configuration extends from
+ * eslint:recommended.
+ * @author Nicholas C. Zakas
+ */
+
+"use strict";
+
+/* eslint sort-keys: ["error", "asc"] */
+
+module.exports = {
+ rules: {
+ "accessor-pairs": "off",
+ "array-bracket-newline": "off",
+ "array-bracket-spacing": "off",
+ "array-callback-return": "off",
+ "array-element-newline": "off",
+ "arrow-body-style": "off",
+ "arrow-parens": "off",
+ "arrow-spacing": "off",
+ "block-scoped-var": "off",
+ "block-spacing": "off",
+ "brace-style": "off",
+ "callback-return": "off",
+ camelcase: "off",
+ "capitalized-comments": "off",
+ "class-methods-use-this": "off",
+ "comma-dangle": "off",
+ "comma-spacing": "off",
+ "comma-style": "off",
+ complexity: "off",
+ "computed-property-spacing": "off",
+ "consistent-return": "off",
+ "consistent-this": "off",
+ "constructor-super": "error",
+ curly: "off",
+ "default-case": "off",
+ "dot-location": "off",
+ "dot-notation": "off",
+ "eol-last": "off",
+ eqeqeq: "off",
+ "for-direction": "off",
+ "func-call-spacing": "off",
+ "func-name-matching": "off",
+ "func-names": "off",
+ "func-style": "off",
+ "function-paren-newline": "off",
+ "generator-star-spacing": "off",
+ "getter-return": "off",
+ "global-require": "off",
+ "guard-for-in": "off",
+ "handle-callback-err": "off",
+ "id-blacklist": "off",
+ "id-length": "off",
+ "id-match": "off",
+ "implicit-arrow-linebreak": "off",
+ indent: "off",
+ "indent-legacy": "off",
+ "init-declarations": "off",
+ "jsx-quotes": "off",
+ "key-spacing": "off",
+ "keyword-spacing": "off",
+ "line-comment-position": "off",
+ "linebreak-style": "off",
+ "lines-around-comment": "off",
+ "lines-around-directive": "off",
+ "lines-between-class-members": "off",
+ "max-depth": "off",
+ "max-len": "off",
+ "max-lines": "off",
+ "max-nested-callbacks": "off",
+ "max-params": "off",
+ "max-statements": "off",
+ "max-statements-per-line": "off",
+ "multiline-comment-style": "off",
+ "multiline-ternary": "off",
+ "new-cap": "off",
+ "new-parens": "off",
+ "newline-after-var": "off",
+ "newline-before-return": "off",
+ "newline-per-chained-call": "off",
+ "no-alert": "off",
+ "no-array-constructor": "off",
+ "no-await-in-loop": "off",
+ "no-bitwise": "off",
+ "no-buffer-constructor": "off",
+ "no-caller": "off",
+ "no-case-declarations": "error",
+ "no-catch-shadow": "off",
+ "no-class-assign": "error",
+ "no-compare-neg-zero": "error",
+ "no-cond-assign": "error",
+ "no-confusing-arrow": "off",
+ "no-console": "error",
+ "no-const-assign": "error",
+ "no-constant-condition": "error",
+ "no-continue": "off",
+ "no-control-regex": "error",
+ "no-debugger": "error",
+ "no-delete-var": "error",
+ "no-div-regex": "off",
+ "no-dupe-args": "error",
+ "no-dupe-class-members": "error",
+ "no-dupe-keys": "error",
+ "no-duplicate-case": "error",
+ "no-duplicate-imports": "off",
+ "no-else-return": "off",
+ "no-empty": "error",
+ "no-empty-character-class": "error",
+ "no-empty-function": "off",
+ "no-empty-pattern": "error",
+ "no-eq-null": "off",
+ "no-eval": "off",
+ "no-ex-assign": "error",
+ "no-extend-native": "off",
+ "no-extra-bind": "off",
+ "no-extra-boolean-cast": "error",
+ "no-extra-label": "off",
+ "no-extra-parens": "off",
+ "no-extra-semi": "error",
+ "no-fallthrough": "error",
+ "no-floating-decimal": "off",
+ "no-func-assign": "error",
+ "no-global-assign": "error",
+ "no-implicit-coercion": "off",
+ "no-implicit-globals": "off",
+ "no-implied-eval": "off",
+ "no-inline-comments": "off",
+ "no-inner-declarations": "error",
+ "no-invalid-regexp": "error",
+ "no-invalid-this": "off",
+ "no-irregular-whitespace": "error",
+ "no-iterator": "off",
+ "no-label-var": "off",
+ "no-labels": "off",
+ "no-lone-blocks": "off",
+ "no-lonely-if": "off",
+ "no-loop-func": "off",
+ "no-magic-numbers": "off",
+ "no-mixed-operators": "off",
+ "no-mixed-requires": "off",
+ "no-mixed-spaces-and-tabs": "error",
+ "no-multi-assign": "off",
+ "no-multi-spaces": "off",
+ "no-multi-str": "off",
+ "no-multiple-empty-lines": "off",
+ "no-native-reassign": "off",
+ "no-negated-condition": "off",
+ "no-negated-in-lhs": "off",
+ "no-nested-ternary": "off",
+ "no-new": "off",
+ "no-new-func": "off",
+ "no-new-object": "off",
+ "no-new-require": "off",
+ "no-new-symbol": "error",
+ "no-new-wrappers": "off",
+ "no-obj-calls": "error",
+ "no-octal": "error",
+ "no-octal-escape": "off",
+ "no-param-reassign": "off",
+ "no-path-concat": "off",
+ "no-plusplus": "off",
+ "no-process-env": "off",
+ "no-process-exit": "off",
+ "no-proto": "off",
+ "no-prototype-builtins": "off",
+ "no-redeclare": "error",
+ "no-regex-spaces": "error",
+ "no-restricted-globals": "off",
+ "no-restricted-imports": "off",
+ "no-restricted-modules": "off",
+ "no-restricted-properties": "off",
+ "no-restricted-syntax": "off",
+ "no-return-assign": "off",
+ "no-return-await": "off",
+ "no-script-url": "off",
+ "no-self-assign": "error",
+ "no-self-compare": "off",
+ "no-sequences": "off",
+ "no-shadow": "off",
+ "no-shadow-restricted-names": "off",
+ "no-spaced-func": "off",
+ "no-sparse-arrays": "error",
+ "no-sync": "off",
+ "no-tabs": "off",
+ "no-template-curly-in-string": "off",
+ "no-ternary": "off",
+ "no-this-before-super": "error",
+ "no-throw-literal": "off",
+ "no-trailing-spaces": "off",
+ "no-undef": "error",
+ "no-undef-init": "off",
+ "no-undefined": "off",
+ "no-underscore-dangle": "off",
+ "no-unexpected-multiline": "error",
+ "no-unmodified-loop-condition": "off",
+ "no-unneeded-ternary": "off",
+ "no-unreachable": "error",
+ "no-unsafe-finally": "error",
+ "no-unsafe-negation": "error",
+ "no-unused-expressions": "off",
+ "no-unused-labels": "error",
+ "no-unused-vars": "error",
+ "no-use-before-define": "off",
+ "no-useless-call": "off",
+ "no-useless-computed-key": "off",
+ "no-useless-concat": "off",
+ "no-useless-constructor": "off",
+ "no-useless-escape": "error",
+ "no-useless-rename": "off",
+ "no-useless-return": "off",
+ "no-var": "off",
+ "no-void": "off",
+ "no-warning-comments": "off",
+ "no-whitespace-before-property": "off",
+ "no-with": "off",
+ "nonblock-statement-body-position": "off",
+ "object-curly-newline": "off",
+ "object-curly-spacing": "off",
+ "object-property-newline": "off",
+ "object-shorthand": "off",
+ "one-var": "off",
+ "one-var-declaration-per-line": "off",
+ "operator-assignment": "off",
+ "operator-linebreak": "off",
+ "padded-blocks": "off",
+ "padding-line-between-statements": "off",
+ "prefer-arrow-callback": "off",
+ "prefer-const": "off",
+ "prefer-destructuring": "off",
+ "prefer-numeric-literals": "off",
+ "prefer-promise-reject-errors": "off",
+ "prefer-reflect": "off",
+ "prefer-rest-params": "off",
+ "prefer-spread": "off",
+ "prefer-template": "off",
+ "quote-props": "off",
+ quotes: "off",
+ radix: "off",
+ "require-await": "off",
+ "require-jsdoc": "off",
+ "require-yield": "error",
+ "rest-spread-spacing": "off",
+ semi: "off",
+ "semi-spacing": "off",
+ "semi-style": "off",
+ "sort-imports": "off",
+ "sort-keys": "off",
+ "sort-vars": "off",
+ "space-before-blocks": "off",
+ "space-before-function-paren": "off",
+ "space-in-parens": "off",
+ "space-infix-ops": "off",
+ "space-unary-ops": "off",
+ "spaced-comment": "off",
+ strict: "off",
+ "switch-colon-spacing": "off",
+ "symbol-description": "off",
+ "template-curly-spacing": "off",
+ "template-tag-spacing": "off",
+ "unicode-bom": "off",
+ "use-isnan": "error",
+ "valid-jsdoc": "off",
+ "valid-typeof": "error",
+ "vars-on-top": "off",
+ "wrap-iife": "off",
+ "wrap-regex": "off",
+ "yield-star-spacing": "off",
+ yoda: "off"
+ }
+};
diff --git a/tools/node_modules/eslint/conf/replacements.json b/tools/node_modules/eslint/conf/replacements.json
new file mode 100644
index 0000000000..c047811e60
--- /dev/null
+++ b/tools/node_modules/eslint/conf/replacements.json
@@ -0,0 +1,22 @@
+{
+ "rules": {
+ "generator-star": ["generator-star-spacing"],
+ "global-strict": ["strict"],
+ "no-arrow-condition": ["no-confusing-arrow", "no-constant-condition"],
+ "no-comma-dangle": ["comma-dangle"],
+ "no-empty-class": ["no-empty-character-class"],
+ "no-empty-label": ["no-labels"],
+ "no-extra-strict": ["strict"],
+ "no-reserved-keys": ["quote-props"],
+ "no-space-before-semi": ["semi-spacing"],
+ "no-wrap-func": ["no-extra-parens"],
+ "space-after-function-name": ["space-before-function-paren"],
+ "space-after-keywords": ["keyword-spacing"],
+ "space-before-function-parentheses": ["space-before-function-paren"],
+ "space-before-keywords": ["keyword-spacing"],
+ "space-in-brackets": ["object-curly-spacing", "array-bracket-spacing", "computed-property-spacing"],
+ "space-return-throw-case": ["keyword-spacing"],
+ "space-unary-word-ops": ["space-unary-ops"],
+ "spaced-line-comment": ["spaced-comment"]
+ }
+}
diff --git a/tools/node_modules/eslint/lib/api.js b/tools/node_modules/eslint/lib/api.js
new file mode 100644
index 0000000000..0a0832a476
--- /dev/null
+++ b/tools/node_modules/eslint/lib/api.js
@@ -0,0 +1,16 @@
+/**
+ * @fileoverview Expose out ESLint and CLI to require.
+ * @author Ian Christian Myers
+ */
+
+"use strict";
+
+const Linter = require("./linter");
+
+module.exports = {
+ linter: new Linter(),
+ Linter,
+ CLIEngine: require("./cli-engine"),
+ RuleTester: require("./testers/rule-tester"),
+ SourceCode: require("./util/source-code")
+};
diff --git a/tools/node_modules/eslint/lib/ast-utils.js b/tools/node_modules/eslint/lib/ast-utils.js
new file mode 100644
index 0000000000..a186bdee54
--- /dev/null
+++ b/tools/node_modules/eslint/lib/ast-utils.js
@@ -0,0 +1,1350 @@
+/**
+ * @fileoverview Common utils for AST.
+ * @author Gyandeep Singh
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const esutils = require("esutils");
+const espree = require("espree");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+const anyFunctionPattern = /^(?:Function(?:Declaration|Expression)|ArrowFunctionExpression)$/;
+const anyLoopPattern = /^(?:DoWhile|For|ForIn|ForOf|While)Statement$/;
+const arrayOrTypedArrayPattern = /Array$/;
+const arrayMethodPattern = /^(?:every|filter|find|findIndex|forEach|map|some)$/;
+const bindOrCallOrApplyPattern = /^(?:bind|call|apply)$/;
+const breakableTypePattern = /^(?:(?:Do)?While|For(?:In|Of)?|Switch)Statement$/;
+const thisTagPattern = /^[\s*]*@this/m;
+
+
+const COMMENTS_IGNORE_PATTERN = /^\s*(?:eslint|jshint\s+|jslint\s+|istanbul\s+|globals?\s+|exported\s+|jscs)/;
+const LINEBREAKS = new Set(["\r\n", "\r", "\n", "\u2028", "\u2029"]);
+const LINEBREAK_MATCHER = /\r\n|[\r\n\u2028\u2029]/;
+const SHEBANG_MATCHER = /^#!([^\r\n]+)/;
+
+// A set of node types that can contain a list of statements
+const STATEMENT_LIST_PARENTS = new Set(["Program", "BlockStatement", "SwitchCase"]);
+
+/**
+ * Checks reference if is non initializer and writable.
+ * @param {Reference} reference - A reference to check.
+ * @param {int} index - The index of the reference in the references.
+ * @param {Reference[]} references - The array that the reference belongs to.
+ * @returns {boolean} Success/Failure
+ * @private
+ */
+function isModifyingReference(reference, index, references) {
+ const identifier = reference.identifier;
+
+ /*
+ * Destructuring assignments can have multiple default value, so
+ * possibly there are multiple writeable references for the same
+ * identifier.
+ */
+ const modifyingDifferentIdentifier = index === 0 ||
+ references[index - 1].identifier !== identifier;
+
+ return (identifier &&
+ reference.init === false &&
+ reference.isWrite() &&
+ modifyingDifferentIdentifier
+ );
+}
+
+/**
+ * Checks whether the given string starts with uppercase or not.
+ *
+ * @param {string} s - The string to check.
+ * @returns {boolean} `true` if the string starts with uppercase.
+ */
+function startsWithUpperCase(s) {
+ return s[0] !== s[0].toLocaleLowerCase();
+}
+
+/**
+ * Checks whether or not a node is a constructor.
+ * @param {ASTNode} node - A function node to check.
+ * @returns {boolean} Wehether or not a node is a constructor.
+ */
+function isES5Constructor(node) {
+ return (node.id && startsWithUpperCase(node.id.name));
+}
+
+/**
+ * Finds a function node from ancestors of a node.
+ * @param {ASTNode} node - A start node to find.
+ * @returns {Node|null} A found function node.
+ */
+function getUpperFunction(node) {
+ while (node) {
+ if (anyFunctionPattern.test(node.type)) {
+ return node;
+ }
+ node = node.parent;
+ }
+ return null;
+}
+
+/**
+ * Checks whether a given node is a function node or not.
+ * The following types are function nodes:
+ *
+ * - ArrowFunctionExpression
+ * - FunctionDeclaration
+ * - FunctionExpression
+ *
+ * @param {ASTNode|null} node - A node to check.
+ * @returns {boolean} `true` if the node is a function node.
+ */
+function isFunction(node) {
+ return Boolean(node && anyFunctionPattern.test(node.type));
+}
+
+/**
+ * Checks whether a given node is a loop node or not.
+ * The following types are loop nodes:
+ *
+ * - DoWhileStatement
+ * - ForInStatement
+ * - ForOfStatement
+ * - ForStatement
+ * - WhileStatement
+ *
+ * @param {ASTNode|null} node - A node to check.
+ * @returns {boolean} `true` if the node is a loop node.
+ */
+function isLoop(node) {
+ return Boolean(node && anyLoopPattern.test(node.type));
+}
+
+/**
+ * Checks whether the given node is in a loop or not.
+ *
+ * @param {ASTNode} node - The node to check.
+ * @returns {boolean} `true` if the node is in a loop.
+ */
+function isInLoop(node) {
+ while (node && !isFunction(node)) {
+ if (isLoop(node)) {
+ return true;
+ }
+
+ node = node.parent;
+ }
+
+ return false;
+}
+
+/**
+ * Checks whether or not a node is `null` or `undefined`.
+ * @param {ASTNode} node - A node to check.
+ * @returns {boolean} Whether or not the node is a `null` or `undefined`.
+ * @public
+ */
+function isNullOrUndefined(node) {
+ return (
+ module.exports.isNullLiteral(node) ||
+ (node.type === "Identifier" && node.name === "undefined") ||
+ (node.type === "UnaryExpression" && node.operator === "void")
+ );
+}
+
+/**
+ * Checks whether or not a node is callee.
+ * @param {ASTNode} node - A node to check.
+ * @returns {boolean} Whether or not the node is callee.
+ */
+function isCallee(node) {
+ return node.parent.type === "CallExpression" && node.parent.callee === node;
+}
+
+/**
+ * Checks whether or not a node is `Reflect.apply`.
+ * @param {ASTNode} node - A node to check.
+ * @returns {boolean} Whether or not the node is a `Reflect.apply`.
+ */
+function isReflectApply(node) {
+ return (
+ node.type === "MemberExpression" &&
+ node.object.type === "Identifier" &&
+ node.object.name === "Reflect" &&
+ node.property.type === "Identifier" &&
+ node.property.name === "apply" &&
+ node.computed === false
+ );
+}
+
+/**
+ * Checks whether or not a node is `Array.from`.
+ * @param {ASTNode} node - A node to check.
+ * @returns {boolean} Whether or not the node is a `Array.from`.
+ */
+function isArrayFromMethod(node) {
+ return (
+ node.type === "MemberExpression" &&
+ node.object.type === "Identifier" &&
+ arrayOrTypedArrayPattern.test(node.object.name) &&
+ node.property.type === "Identifier" &&
+ node.property.name === "from" &&
+ node.computed === false
+ );
+}
+
+/**
+ * Checks whether or not a node is a method which has `thisArg`.
+ * @param {ASTNode} node - A node to check.
+ * @returns {boolean} Whether or not the node is a method which has `thisArg`.
+ */
+function isMethodWhichHasThisArg(node) {
+ while (node) {
+ if (node.type === "Identifier") {
+ return arrayMethodPattern.test(node.name);
+ }
+ if (node.type === "MemberExpression" && !node.computed) {
+ node = node.property;
+ continue;
+ }
+
+ break;
+ }
+
+ return false;
+}
+
+/**
+ * Creates the negate function of the given function.
+ * @param {Function} f - The function to negate.
+ * @returns {Function} Negated function.
+ */
+function negate(f) {
+ return token => !f(token);
+}
+
+/**
+ * Checks whether or not a node has a `@this` tag in its comments.
+ * @param {ASTNode} node - A node to check.
+ * @param {SourceCode} sourceCode - A SourceCode instance to get comments.
+ * @returns {boolean} Whether or not the node has a `@this` tag in its comments.
+ */
+function hasJSDocThisTag(node, sourceCode) {
+ const jsdocComment = sourceCode.getJSDocComment(node);
+
+ if (jsdocComment && thisTagPattern.test(jsdocComment.value)) {
+ return true;
+ }
+
+ // Checks `@this` in its leading comments for callbacks,
+ // because callbacks don't have its JSDoc comment.
+ // e.g.
+ // sinon.test(/* @this sinon.Sandbox */function() { this.spy(); });
+ return sourceCode.getCommentsBefore(node).some(comment => thisTagPattern.test(comment.value));
+}
+
+/**
+ * Determines if a node is surrounded by parentheses.
+ * @param {SourceCode} sourceCode The ESLint source code object
+ * @param {ASTNode} node The node to be checked.
+ * @returns {boolean} True if the node is parenthesised.
+ * @private
+ */
+function isParenthesised(sourceCode, node) {
+ const previousToken = sourceCode.getTokenBefore(node),
+ nextToken = sourceCode.getTokenAfter(node);
+
+ return Boolean(previousToken && nextToken) &&
+ previousToken.value === "(" && previousToken.range[1] <= node.range[0] &&
+ nextToken.value === ")" && nextToken.range[0] >= node.range[1];
+}
+
+/**
+ * Checks if the given token is an arrow token or not.
+ *
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is an arrow token.
+ */
+function isArrowToken(token) {
+ return token.value === "=>" && token.type === "Punctuator";
+}
+
+/**
+ * Checks if the given token is a comma token or not.
+ *
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is a comma token.
+ */
+function isCommaToken(token) {
+ return token.value === "," && token.type === "Punctuator";
+}
+
+/**
+ * Checks if the given token is a semicolon token or not.
+ *
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is a semicolon token.
+ */
+function isSemicolonToken(token) {
+ return token.value === ";" && token.type === "Punctuator";
+}
+
+/**
+ * Checks if the given token is a colon token or not.
+ *
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is a colon token.
+ */
+function isColonToken(token) {
+ return token.value === ":" && token.type === "Punctuator";
+}
+
+/**
+ * Checks if the given token is an opening parenthesis token or not.
+ *
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is an opening parenthesis token.
+ */
+function isOpeningParenToken(token) {
+ return token.value === "(" && token.type === "Punctuator";
+}
+
+/**
+ * Checks if the given token is a closing parenthesis token or not.
+ *
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is a closing parenthesis token.
+ */
+function isClosingParenToken(token) {
+ return token.value === ")" && token.type === "Punctuator";
+}
+
+/**
+ * Checks if the given token is an opening square bracket token or not.
+ *
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is an opening square bracket token.
+ */
+function isOpeningBracketToken(token) {
+ return token.value === "[" && token.type === "Punctuator";
+}
+
+/**
+ * Checks if the given token is a closing square bracket token or not.
+ *
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is a closing square bracket token.
+ */
+function isClosingBracketToken(token) {
+ return token.value === "]" && token.type === "Punctuator";
+}
+
+/**
+ * Checks if the given token is an opening brace token or not.
+ *
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is an opening brace token.
+ */
+function isOpeningBraceToken(token) {
+ return token.value === "{" && token.type === "Punctuator";
+}
+
+/**
+ * Checks if the given token is a closing brace token or not.
+ *
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is a closing brace token.
+ */
+function isClosingBraceToken(token) {
+ return token.value === "}" && token.type === "Punctuator";
+}
+
+/**
+ * Checks if the given token is a comment token or not.
+ *
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is a comment token.
+ */
+function isCommentToken(token) {
+ return token.type === "Line" || token.type === "Block" || token.type === "Shebang";
+}
+
+/**
+ * Checks if the given token is a keyword token or not.
+ *
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is a keyword token.
+ */
+function isKeywordToken(token) {
+ return token.type === "Keyword";
+}
+
+/**
+ * Gets the `(` token of the given function node.
+ *
+ * @param {ASTNode} node - The function node to get.
+ * @param {SourceCode} sourceCode - The source code object to get tokens.
+ * @returns {Token} `(` token.
+ */
+function getOpeningParenOfParams(node, sourceCode) {
+ return node.id
+ ? sourceCode.getTokenAfter(node.id, isOpeningParenToken)
+ : sourceCode.getFirstToken(node, isOpeningParenToken);
+}
+
+/**
+ * Creates a version of the LINEBREAK_MATCHER regex with the global flag.
+ * Global regexes are mutable, so this needs to be a function instead of a constant.
+ * @returns {RegExp} A global regular expression that matches line terminators
+ */
+function createGlobalLinebreakMatcher() {
+ return new RegExp(LINEBREAK_MATCHER.source, "g");
+}
+
+/**
+ * Checks whether or not the tokens of two given nodes are same.
+ * @param {ASTNode} left - A node 1 to compare.
+ * @param {ASTNode} right - A node 2 to compare.
+ * @param {SourceCode} sourceCode - The ESLint source code object.
+ * @returns {boolean} the source code for the given node.
+ */
+function equalTokens(left, right, sourceCode) {
+ const tokensL = sourceCode.getTokens(left);
+ const tokensR = sourceCode.getTokens(right);
+
+ if (tokensL.length !== tokensR.length) {
+ return false;
+ }
+ for (let i = 0; i < tokensL.length; ++i) {
+ if (tokensL[i].type !== tokensR[i].type ||
+ tokensL[i].value !== tokensR[i].value
+ ) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+module.exports = {
+ COMMENTS_IGNORE_PATTERN,
+ LINEBREAKS,
+ LINEBREAK_MATCHER,
+ SHEBANG_MATCHER,
+ STATEMENT_LIST_PARENTS,
+
+ /**
+ * Determines whether two adjacent tokens are on the same line.
+ * @param {Object} left - The left token object.
+ * @param {Object} right - The right token object.
+ * @returns {boolean} Whether or not the tokens are on the same line.
+ * @public
+ */
+ isTokenOnSameLine(left, right) {
+ return left.loc.end.line === right.loc.start.line;
+ },
+
+ isNullOrUndefined,
+ isCallee,
+ isES5Constructor,
+ getUpperFunction,
+ isFunction,
+ isLoop,
+ isInLoop,
+ isArrayFromMethod,
+ isParenthesised,
+ createGlobalLinebreakMatcher,
+ equalTokens,
+
+ isArrowToken,
+ isClosingBraceToken,
+ isClosingBracketToken,
+ isClosingParenToken,
+ isColonToken,
+ isCommaToken,
+ isCommentToken,
+ isKeywordToken,
+ isNotClosingBraceToken: negate(isClosingBraceToken),
+ isNotClosingBracketToken: negate(isClosingBracketToken),
+ isNotClosingParenToken: negate(isClosingParenToken),
+ isNotColonToken: negate(isColonToken),
+ isNotCommaToken: negate(isCommaToken),
+ isNotOpeningBraceToken: negate(isOpeningBraceToken),
+ isNotOpeningBracketToken: negate(isOpeningBracketToken),
+ isNotOpeningParenToken: negate(isOpeningParenToken),
+ isNotSemicolonToken: negate(isSemicolonToken),
+ isOpeningBraceToken,
+ isOpeningBracketToken,
+ isOpeningParenToken,
+ isSemicolonToken,
+
+ /**
+ * Checks whether or not a given node is a string literal.
+ * @param {ASTNode} node - A node to check.
+ * @returns {boolean} `true` if the node is a string literal.
+ */
+ isStringLiteral(node) {
+ return (
+ (node.type === "Literal" && typeof node.value === "string") ||
+ node.type === "TemplateLiteral"
+ );
+ },
+
+ /**
+ * Checks whether a given node is a breakable statement or not.
+ * The node is breakable if the node is one of the following type:
+ *
+ * - DoWhileStatement
+ * - ForInStatement
+ * - ForOfStatement
+ * - ForStatement
+ * - SwitchStatement
+ * - WhileStatement
+ *
+ * @param {ASTNode} node - A node to check.
+ * @returns {boolean} `true` if the node is breakable.
+ */
+ isBreakableStatement(node) {
+ return breakableTypePattern.test(node.type);
+ },
+
+ /**
+ * Gets the label if the parent node of a given node is a LabeledStatement.
+ *
+ * @param {ASTNode} node - A node to get.
+ * @returns {string|null} The label or `null`.
+ */
+ getLabel(node) {
+ if (node.parent.type === "LabeledStatement") {
+ return node.parent.label.name;
+ }
+ return null;
+ },
+
+ /**
+ * Gets references which are non initializer and writable.
+ * @param {Reference[]} references - An array of references.
+ * @returns {Reference[]} An array of only references which are non initializer and writable.
+ * @public
+ */
+ getModifyingReferences(references) {
+ return references.filter(isModifyingReference);
+ },
+
+ /**
+ * Validate that a string passed in is surrounded by the specified character
+ * @param {string} val The text to check.
+ * @param {string} character The character to see if it's surrounded by.
+ * @returns {boolean} True if the text is surrounded by the character, false if not.
+ * @private
+ */
+ isSurroundedBy(val, character) {
+ return val[0] === character && val[val.length - 1] === character;
+ },
+
+ /**
+ * Returns whether the provided node is an ESLint directive comment or not
+ * @param {Line|Block} node The comment token to be checked
+ * @returns {boolean} `true` if the node is an ESLint directive comment
+ */
+ isDirectiveComment(node) {
+ const comment = node.value.trim();
+
+ return (
+ node.type === "Line" && comment.indexOf("eslint-") === 0 ||
+ node.type === "Block" && (
+ comment.indexOf("global ") === 0 ||
+ comment.indexOf("eslint ") === 0 ||
+ comment.indexOf("eslint-") === 0
+ )
+ );
+ },
+
+ /**
+ * Gets the trailing statement of a given node.
+ *
+ * if (code)
+ * consequent;
+ *
+ * When taking this `IfStatement`, returns `consequent;` statement.
+ *
+ * @param {ASTNode} A node to get.
+ * @returns {ASTNode|null} The trailing statement's node.
+ */
+ getTrailingStatement: esutils.ast.trailingStatement,
+
+ /**
+ * Finds the variable by a given name in a given scope and its upper scopes.
+ *
+ * @param {eslint-scope.Scope} initScope - A scope to start find.
+ * @param {string} name - A variable name to find.
+ * @returns {eslint-scope.Variable|null} A found variable or `null`.
+ */
+ getVariableByName(initScope, name) {
+ let scope = initScope;
+
+ while (scope) {
+ const variable = scope.set.get(name);
+
+ if (variable) {
+ return variable;
+ }
+
+ scope = scope.upper;
+ }
+
+ return null;
+ },
+
+ /**
+ * Checks whether or not a given function node is the default `this` binding.
+ *
+ * First, this checks the node:
+ *
+ * - The function name does not start with uppercase (it's a constructor).
+ * - The function does not have a JSDoc comment that has a @this tag.
+ *
+ * Next, this checks the location of the node.
+ * If the location is below, this judges `this` is valid.
+ *
+ * - The location is not on an object literal.
+ * - The location is not assigned to a variable which starts with an uppercase letter.
+ * - The location is not on an ES2015 class.
+ * - Its `bind`/`call`/`apply` method is not called directly.
+ * - The function is not a callback of array methods (such as `.forEach()`) if `thisArg` is given.
+ *
+ * @param {ASTNode} node - A function node to check.
+ * @param {SourceCode} sourceCode - A SourceCode instance to get comments.
+ * @returns {boolean} The function node is the default `this` binding.
+ */
+ isDefaultThisBinding(node, sourceCode) {
+ if (isES5Constructor(node) || hasJSDocThisTag(node, sourceCode)) {
+ return false;
+ }
+ const isAnonymous = node.id === null;
+
+ while (node) {
+ const parent = node.parent;
+
+ switch (parent.type) {
+
+ /*
+ * Looks up the destination.
+ * e.g., obj.foo = nativeFoo || function foo() { ... };
+ */
+ case "LogicalExpression":
+ case "ConditionalExpression":
+ node = parent;
+ break;
+
+ /*
+ * If the upper function is IIFE, checks the destination of the return value.
+ * e.g.
+ * obj.foo = (function() {
+ * // setup...
+ * return function foo() { ... };
+ * })();
+ * obj.foo = (() =>
+ * function foo() { ... }
+ * )();
+ */
+ case "ReturnStatement": {
+ const func = getUpperFunction(parent);
+
+ if (func === null || !isCallee(func)) {
+ return true;
+ }
+ node = func.parent;
+ break;
+ }
+ case "ArrowFunctionExpression":
+ if (node !== parent.body || !isCallee(parent)) {
+ return true;
+ }
+ node = parent.parent;
+ break;
+
+ /*
+ * e.g.
+ * var obj = { foo() { ... } };
+ * var obj = { foo: function() { ... } };
+ * class A { constructor() { ... } }
+ * class A { foo() { ... } }
+ * class A { get foo() { ... } }
+ * class A { set foo() { ... } }
+ * class A { static foo() { ... } }
+ */
+ case "Property":
+ case "MethodDefinition":
+ return parent.value !== node;
+
+ /*
+ * e.g.
+ * obj.foo = function foo() { ... };
+ * Foo = function() { ... };
+ * [obj.foo = function foo() { ... }] = a;
+ * [Foo = function() { ... }] = a;
+ */
+ case "AssignmentExpression":
+ case "AssignmentPattern":
+ if (parent.left.type === "MemberExpression") {
+ return false;
+ }
+ if (
+ isAnonymous &&
+ parent.left.type === "Identifier" &&
+ startsWithUpperCase(parent.left.name)
+ ) {
+ return false;
+ }
+ return true;
+
+ /*
+ * e.g.
+ * var Foo = function() { ... };
+ */
+ case "VariableDeclarator":
+ return !(
+ isAnonymous &&
+ parent.init === node &&
+ parent.id.type === "Identifier" &&
+ startsWithUpperCase(parent.id.name)
+ );
+
+ /*
+ * e.g.
+ * var foo = function foo() { ... }.bind(obj);
+ * (function foo() { ... }).call(obj);
+ * (function foo() { ... }).apply(obj, []);
+ */
+ case "MemberExpression":
+ return (
+ parent.object !== node ||
+ parent.property.type !== "Identifier" ||
+ !bindOrCallOrApplyPattern.test(parent.property.name) ||
+ !isCallee(parent) ||
+ parent.parent.arguments.length === 0 ||
+ isNullOrUndefined(parent.parent.arguments[0])
+ );
+
+ /*
+ * e.g.
+ * Reflect.apply(function() {}, obj, []);
+ * Array.from([], function() {}, obj);
+ * list.forEach(function() {}, obj);
+ */
+ case "CallExpression":
+ if (isReflectApply(parent.callee)) {
+ return (
+ parent.arguments.length !== 3 ||
+ parent.arguments[0] !== node ||
+ isNullOrUndefined(parent.arguments[1])
+ );
+ }
+ if (isArrayFromMethod(parent.callee)) {
+ return (
+ parent.arguments.length !== 3 ||
+ parent.arguments[1] !== node ||
+ isNullOrUndefined(parent.arguments[2])
+ );
+ }
+ if (isMethodWhichHasThisArg(parent.callee)) {
+ return (
+ parent.arguments.length !== 2 ||
+ parent.arguments[0] !== node ||
+ isNullOrUndefined(parent.arguments[1])
+ );
+ }
+ return true;
+
+ // Otherwise `this` is default.
+ default:
+ return true;
+ }
+ }
+
+ /* istanbul ignore next */
+ return true;
+ },
+
+ /**
+ * Get the precedence level based on the node type
+ * @param {ASTNode} node node to evaluate
+ * @returns {int} precedence level
+ * @private
+ */
+ getPrecedence(node) {
+ switch (node.type) {
+ case "SequenceExpression":
+ return 0;
+
+ case "AssignmentExpression":
+ case "ArrowFunctionExpression":
+ case "YieldExpression":
+ return 1;
+
+ case "ConditionalExpression":
+ return 3;
+
+ case "LogicalExpression":
+ switch (node.operator) {
+ case "||":
+ return 4;
+ case "&&":
+ return 5;
+
+ // no default
+ }
+
+ /* falls through */
+
+ case "BinaryExpression":
+
+ switch (node.operator) {
+ case "|":
+ return 6;
+ case "^":
+ return 7;
+ case "&":
+ return 8;
+ case "==":
+ case "!=":
+ case "===":
+ case "!==":
+ return 9;
+ case "<":
+ case "<=":
+ case ">":
+ case ">=":
+ case "in":
+ case "instanceof":
+ return 10;
+ case "<<":
+ case ">>":
+ case ">>>":
+ return 11;
+ case "+":
+ case "-":
+ return 12;
+ case "*":
+ case "/":
+ case "%":
+ return 13;
+ case "**":
+ return 15;
+
+ // no default
+ }
+
+ /* falls through */
+
+ case "UnaryExpression":
+ case "AwaitExpression":
+ return 16;
+
+ case "UpdateExpression":
+ return 17;
+
+ case "CallExpression":
+ return 18;
+
+ case "NewExpression":
+ return 19;
+
+ default:
+ return 20;
+ }
+ },
+
+ /**
+ * Checks whether the given node is an empty block node or not.
+ *
+ * @param {ASTNode|null} node - The node to check.
+ * @returns {boolean} `true` if the node is an empty block.
+ */
+ isEmptyBlock(node) {
+ return Boolean(node && node.type === "BlockStatement" && node.body.length === 0);
+ },
+
+ /**
+ * Checks whether the given node is an empty function node or not.
+ *
+ * @param {ASTNode|null} node - The node to check.
+ * @returns {boolean} `true` if the node is an empty function.
+ */
+ isEmptyFunction(node) {
+ return isFunction(node) && module.exports.isEmptyBlock(node.body);
+ },
+
+ /**
+ * Gets the property name of a given node.
+ * The node can be a MemberExpression, a Property, or a MethodDefinition.
+ *
+ * If the name is dynamic, this returns `null`.
+ *
+ * For examples:
+ *
+ * a.b // => "b"
+ * a["b"] // => "b"
+ * a['b'] // => "b"
+ * a[`b`] // => "b"
+ * a[100] // => "100"
+ * a[b] // => null
+ * a["a" + "b"] // => null
+ * a[tag`b`] // => null
+ * a[`${b}`] // => null
+ *
+ * let a = {b: 1} // => "b"
+ * let a = {["b"]: 1} // => "b"
+ * let a = {['b']: 1} // => "b"
+ * let a = {[`b`]: 1} // => "b"
+ * let a = {[100]: 1} // => "100"
+ * let a = {[b]: 1} // => null
+ * let a = {["a" + "b"]: 1} // => null
+ * let a = {[tag`b`]: 1} // => null
+ * let a = {[`${b}`]: 1} // => null
+ *
+ * @param {ASTNode} node - The node to get.
+ * @returns {string|null} The property name if static. Otherwise, null.
+ */
+ getStaticPropertyName(node) {
+ let prop;
+
+ switch (node && node.type) {
+ case "Property":
+ case "MethodDefinition":
+ prop = node.key;
+ break;
+
+ case "MemberExpression":
+ prop = node.property;
+ break;
+
+ // no default
+ }
+
+ switch (prop && prop.type) {
+ case "Literal":
+ return String(prop.value);
+
+ case "TemplateLiteral":
+ if (prop.expressions.length === 0 && prop.quasis.length === 1) {
+ return prop.quasis[0].value.cooked;
+ }
+ break;
+
+ case "Identifier":
+ if (!node.computed) {
+ return prop.name;
+ }
+ break;
+
+ // no default
+ }
+
+ return null;
+ },
+
+ /**
+ * Get directives from directive prologue of a Program or Function node.
+ * @param {ASTNode} node - The node to check.
+ * @returns {ASTNode[]} The directives found in the directive prologue.
+ */
+ getDirectivePrologue(node) {
+ const directives = [];
+
+ // Directive prologues only occur at the top of files or functions.
+ if (
+ node.type === "Program" ||
+ node.type === "FunctionDeclaration" ||
+ node.type === "FunctionExpression" ||
+
+ /*
+ * Do not check arrow functions with implicit return.
+ * `() => "use strict";` returns the string `"use strict"`.
+ */
+ (node.type === "ArrowFunctionExpression" && node.body.type === "BlockStatement")
+ ) {
+ const statements = node.type === "Program" ? node.body : node.body.body;
+
+ for (const statement of statements) {
+ if (
+ statement.type === "ExpressionStatement" &&
+ statement.expression.type === "Literal"
+ ) {
+ directives.push(statement);
+ } else {
+ break;
+ }
+ }
+ }
+
+ return directives;
+ },
+
+
+ /**
+ * Determines whether this node is a decimal integer literal. If a node is a decimal integer literal, a dot added
+ * after the node will be parsed as a decimal point, rather than a property-access dot.
+ * @param {ASTNode} node - The node to check.
+ * @returns {boolean} `true` if this node is a decimal integer.
+ * @example
+ *
+ * 5 // true
+ * 5. // false
+ * 5.0 // false
+ * 05 // false
+ * 0x5 // false
+ * 0b101 // false
+ * 0o5 // false
+ * 5e0 // false
+ * '5' // false
+ */
+ isDecimalInteger(node) {
+ return node.type === "Literal" && typeof node.value === "number" && /^(0|[1-9]\d*)$/.test(node.raw);
+ },
+
+ /**
+ * Gets the name and kind of the given function node.
+ *
+ * - `function foo() {}` .................... `function 'foo'`
+ * - `(function foo() {})` .................. `function 'foo'`
+ * - `(function() {})` ...................... `function`
+ * - `function* foo() {}` ................... `generator function 'foo'`
+ * - `(function* foo() {})` ................. `generator function 'foo'`
+ * - `(function*() {})` ..................... `generator function`
+ * - `() => {}` ............................. `arrow function`
+ * - `async () => {}` ....................... `async arrow function`
+ * - `({ foo: function foo() {} })` ......... `method 'foo'`
+ * - `({ foo: function() {} })` ............. `method 'foo'`
+ * - `({ ['foo']: function() {} })` ......... `method 'foo'`
+ * - `({ [foo]: function() {} })` ........... `method`
+ * - `({ foo() {} })` ....................... `method 'foo'`
+ * - `({ foo: function* foo() {} })` ........ `generator method 'foo'`
+ * - `({ foo: function*() {} })` ............ `generator method 'foo'`
+ * - `({ ['foo']: function*() {} })` ........ `generator method 'foo'`
+ * - `({ [foo]: function*() {} })` .......... `generator method`
+ * - `({ *foo() {} })` ...................... `generator method 'foo'`
+ * - `({ foo: async function foo() {} })` ... `async method 'foo'`
+ * - `({ foo: async function() {} })` ....... `async method 'foo'`
+ * - `({ ['foo']: async function() {} })` ... `async method 'foo'`
+ * - `({ [foo]: async function() {} })` ..... `async method`
+ * - `({ async foo() {} })` ................. `async method 'foo'`
+ * - `({ get foo() {} })` ................... `getter 'foo'`
+ * - `({ set foo(a) {} })` .................. `setter 'foo'`
+ * - `class A { constructor() {} }` ......... `constructor`
+ * - `class A { foo() {} }` ................. `method 'foo'`
+ * - `class A { *foo() {} }` ................ `generator method 'foo'`
+ * - `class A { async foo() {} }` ........... `async method 'foo'`
+ * - `class A { ['foo']() {} }` ............. `method 'foo'`
+ * - `class A { *['foo']() {} }` ............ `generator method 'foo'`
+ * - `class A { async ['foo']() {} }` ....... `async method 'foo'`
+ * - `class A { [foo]() {} }` ............... `method`
+ * - `class A { *[foo]() {} }` .............. `generator method`
+ * - `class A { async [foo]() {} }` ......... `async method`
+ * - `class A { get foo() {} }` ............. `getter 'foo'`
+ * - `class A { set foo(a) {} }` ............ `setter 'foo'`
+ * - `class A { static foo() {} }` .......... `static method 'foo'`
+ * - `class A { static *foo() {} }` ......... `static generator method 'foo'`
+ * - `class A { static async foo() {} }` .... `static async method 'foo'`
+ * - `class A { static get foo() {} }` ...... `static getter 'foo'`
+ * - `class A { static set foo(a) {} }` ..... `static setter 'foo'`
+ *
+ * @param {ASTNode} node - The function node to get.
+ * @returns {string} The name and kind of the function node.
+ */
+ getFunctionNameWithKind(node) {
+ const parent = node.parent;
+ const tokens = [];
+
+ if (parent.type === "MethodDefinition" && parent.static) {
+ tokens.push("static");
+ }
+ if (node.async) {
+ tokens.push("async");
+ }
+ if (node.generator) {
+ tokens.push("generator");
+ }
+
+ if (node.type === "ArrowFunctionExpression") {
+ tokens.push("arrow", "function");
+ } else if (parent.type === "Property" || parent.type === "MethodDefinition") {
+ if (parent.kind === "constructor") {
+ return "constructor";
+ }
+ if (parent.kind === "get") {
+ tokens.push("getter");
+ } else if (parent.kind === "set") {
+ tokens.push("setter");
+ } else {
+ tokens.push("method");
+ }
+ } else {
+ tokens.push("function");
+ }
+
+ if (node.id) {
+ tokens.push(`'${node.id.name}'`);
+ } else {
+ const name = module.exports.getStaticPropertyName(parent);
+
+ if (name) {
+ tokens.push(`'${name}'`);
+ }
+ }
+
+ return tokens.join(" ");
+ },
+
+ /**
+ * Gets the location of the given function node for reporting.
+ *
+ * - `function foo() {}`
+ * ^^^^^^^^^^^^
+ * - `(function foo() {})`
+ * ^^^^^^^^^^^^
+ * - `(function() {})`
+ * ^^^^^^^^
+ * - `function* foo() {}`
+ * ^^^^^^^^^^^^^
+ * - `(function* foo() {})`
+ * ^^^^^^^^^^^^^
+ * - `(function*() {})`
+ * ^^^^^^^^^
+ * - `() => {}`
+ * ^^
+ * - `async () => {}`
+ * ^^
+ * - `({ foo: function foo() {} })`
+ * ^^^^^^^^^^^^^^^^^
+ * - `({ foo: function() {} })`
+ * ^^^^^^^^^^^^^
+ * - `({ ['foo']: function() {} })`
+ * ^^^^^^^^^^^^^^^^^
+ * - `({ [foo]: function() {} })`
+ * ^^^^^^^^^^^^^^^
+ * - `({ foo() {} })`
+ * ^^^
+ * - `({ foo: function* foo() {} })`
+ * ^^^^^^^^^^^^^^^^^^
+ * - `({ foo: function*() {} })`
+ * ^^^^^^^^^^^^^^
+ * - `({ ['foo']: function*() {} })`
+ * ^^^^^^^^^^^^^^^^^^
+ * - `({ [foo]: function*() {} })`
+ * ^^^^^^^^^^^^^^^^
+ * - `({ *foo() {} })`
+ * ^^^^
+ * - `({ foo: async function foo() {} })`
+ * ^^^^^^^^^^^^^^^^^^^^^^^
+ * - `({ foo: async function() {} })`
+ * ^^^^^^^^^^^^^^^^^^^
+ * - `({ ['foo']: async function() {} })`
+ * ^^^^^^^^^^^^^^^^^^^^^^^
+ * - `({ [foo]: async function() {} })`
+ * ^^^^^^^^^^^^^^^^^^^^^
+ * - `({ async foo() {} })`
+ * ^^^^^^^^^
+ * - `({ get foo() {} })`
+ * ^^^^^^^
+ * - `({ set foo(a) {} })`
+ * ^^^^^^^
+ * - `class A { constructor() {} }`
+ * ^^^^^^^^^^^
+ * - `class A { foo() {} }`
+ * ^^^
+ * - `class A { *foo() {} }`
+ * ^^^^
+ * - `class A { async foo() {} }`
+ * ^^^^^^^^^
+ * - `class A { ['foo']() {} }`
+ * ^^^^^^^
+ * - `class A { *['foo']() {} }`
+ * ^^^^^^^^
+ * - `class A { async ['foo']() {} }`
+ * ^^^^^^^^^^^^^
+ * - `class A { [foo]() {} }`
+ * ^^^^^
+ * - `class A { *[foo]() {} }`
+ * ^^^^^^
+ * - `class A { async [foo]() {} }`
+ * ^^^^^^^^^^^
+ * - `class A { get foo() {} }`
+ * ^^^^^^^
+ * - `class A { set foo(a) {} }`
+ * ^^^^^^^
+ * - `class A { static foo() {} }`
+ * ^^^^^^^^^^
+ * - `class A { static *foo() {} }`
+ * ^^^^^^^^^^^
+ * - `class A { static async foo() {} }`
+ * ^^^^^^^^^^^^^^^^
+ * - `class A { static get foo() {} }`
+ * ^^^^^^^^^^^^^^
+ * - `class A { static set foo(a) {} }`
+ * ^^^^^^^^^^^^^^
+ *
+ * @param {ASTNode} node - The function node to get.
+ * @param {SourceCode} sourceCode - The source code object to get tokens.
+ * @returns {string} The location of the function node for reporting.
+ */
+ getFunctionHeadLoc(node, sourceCode) {
+ const parent = node.parent;
+ let start = null;
+ let end = null;
+
+ if (node.type === "ArrowFunctionExpression") {
+ const arrowToken = sourceCode.getTokenBefore(node.body, isArrowToken);
+
+ start = arrowToken.loc.start;
+ end = arrowToken.loc.end;
+ } else if (parent.type === "Property" || parent.type === "MethodDefinition") {
+ start = parent.loc.start;
+ end = getOpeningParenOfParams(node, sourceCode).loc.start;
+ } else {
+ start = node.loc.start;
+ end = getOpeningParenOfParams(node, sourceCode).loc.start;
+ }
+
+ return {
+ start: Object.assign({}, start),
+ end: Object.assign({}, end)
+ };
+ },
+
+ /**
+ * Gets the parenthesized text of a node. This is similar to sourceCode.getText(node), but it also includes any parentheses
+ * surrounding the node.
+ * @param {SourceCode} sourceCode The source code object
+ * @param {ASTNode} node An expression node
+ * @returns {string} The text representing the node, with all surrounding parentheses included
+ */
+ getParenthesisedText(sourceCode, node) {
+ let leftToken = sourceCode.getFirstToken(node);
+ let rightToken = sourceCode.getLastToken(node);
+
+ while (
+ sourceCode.getTokenBefore(leftToken) &&
+ sourceCode.getTokenBefore(leftToken).type === "Punctuator" &&
+ sourceCode.getTokenBefore(leftToken).value === "(" &&
+ sourceCode.getTokenAfter(rightToken) &&
+ sourceCode.getTokenAfter(rightToken).type === "Punctuator" &&
+ sourceCode.getTokenAfter(rightToken).value === ")"
+ ) {
+ leftToken = sourceCode.getTokenBefore(leftToken);
+ rightToken = sourceCode.getTokenAfter(rightToken);
+ }
+
+ return sourceCode.getText().slice(leftToken.range[0], rightToken.range[1]);
+ },
+
+ /*
+ * Determine if a node has a possiblity to be an Error object
+ * @param {ASTNode} node ASTNode to check
+ * @returns {boolean} True if there is a chance it contains an Error obj
+ */
+ couldBeError(node) {
+ switch (node.type) {
+ case "Identifier":
+ case "CallExpression":
+ case "NewExpression":
+ case "MemberExpression":
+ case "TaggedTemplateExpression":
+ case "YieldExpression":
+ case "AwaitExpression":
+ return true; // possibly an error object.
+
+ case "AssignmentExpression":
+ return module.exports.couldBeError(node.right);
+
+ case "SequenceExpression": {
+ const exprs = node.expressions;
+
+ return exprs.length !== 0 && module.exports.couldBeError(exprs[exprs.length - 1]);
+ }
+
+ case "LogicalExpression":
+ return module.exports.couldBeError(node.left) || module.exports.couldBeError(node.right);
+
+ case "ConditionalExpression":
+ return module.exports.couldBeError(node.consequent) || module.exports.couldBeError(node.alternate);
+
+ default:
+ return false;
+ }
+ },
+
+ /**
+ * Determines whether the given node is a `null` literal.
+ * @param {ASTNode} node The node to check
+ * @returns {boolean} `true` if the node is a `null` literal
+ */
+ isNullLiteral(node) {
+
+ /*
+ * Checking `node.value === null` does not guarantee that a literal is a null literal.
+ * When parsing values that cannot be represented in the current environment (e.g. unicode
+ * regexes in Node 4), `node.value` is set to `null` because it wouldn't be possible to
+ * set `node.value` to a unicode regex. To make sure a literal is actually `null`, check
+ * `node.regex` instead. Also see: https://github.com/eslint/eslint/issues/8020
+ */
+ return node.type === "Literal" && node.value === null && !node.regex;
+ },
+
+ /**
+ * Determines whether two tokens can safely be placed next to each other without merging into a single token
+ * @param {Token|string} leftValue The left token. If this is a string, it will be tokenized and the last token will be used.
+ * @param {Token|string} rightValue The right token. If this is a string, it will be tokenized and the first token will be used.
+ * @returns {boolean} If the tokens cannot be safely placed next to each other, returns `false`. If the tokens can be placed
+ * next to each other, behavior is undefined (although it should return `true` in most cases).
+ */
+ canTokensBeAdjacent(leftValue, rightValue) {
+ let leftToken;
+
+ if (typeof leftValue === "string") {
+ const leftTokens = espree.tokenize(leftValue, { ecmaVersion: 2015 });
+
+ leftToken = leftTokens[leftTokens.length - 1];
+ } else {
+ leftToken = leftValue;
+ }
+
+ const rightToken = typeof rightValue === "string" ? espree.tokenize(rightValue, { ecmaVersion: 2015 })[0] : rightValue;
+
+ if (leftToken.type === "Punctuator" || rightToken.type === "Punctuator") {
+ if (leftToken.type === "Punctuator" && rightToken.type === "Punctuator") {
+ const PLUS_TOKENS = new Set(["+", "++"]);
+ const MINUS_TOKENS = new Set(["-", "--"]);
+
+ return !(
+ PLUS_TOKENS.has(leftToken.value) && PLUS_TOKENS.has(rightToken.value) ||
+ MINUS_TOKENS.has(leftToken.value) && MINUS_TOKENS.has(rightToken.value)
+ );
+ }
+ return true;
+ }
+
+ if (
+ leftToken.type === "String" || rightToken.type === "String" ||
+ leftToken.type === "Template" || rightToken.type === "Template"
+ ) {
+ return true;
+ }
+
+ if (leftToken.type !== "Numeric" && rightToken.type === "Numeric" && rightToken.value.startsWith(".")) {
+ return true;
+ }
+
+ return false;
+ }
+};
diff --git a/tools/node_modules/eslint/lib/cli-engine.js b/tools/node_modules/eslint/lib/cli-engine.js
new file mode 100644
index 0000000000..55450fd633
--- /dev/null
+++ b/tools/node_modules/eslint/lib/cli-engine.js
@@ -0,0 +1,715 @@
+/**
+ * @fileoverview Main CLI object.
+ * @author Nicholas C. Zakas
+ */
+
+"use strict";
+
+/*
+ * The CLI object should *not* call process.exit() directly. It should only return
+ * exit codes. This allows other programs to use the CLI object and still control
+ * when the program exits.
+ */
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const fs = require("fs"),
+ path = require("path"),
+ defaultOptions = require("../conf/default-cli-options"),
+ Linter = require("./linter"),
+ IgnoredPaths = require("./ignored-paths"),
+ Config = require("./config"),
+ fileEntryCache = require("file-entry-cache"),
+ globUtil = require("./util/glob-util"),
+ validator = require("./config/config-validator"),
+ stringify = require("json-stable-stringify-without-jsonify"),
+ hash = require("./util/hash"),
+ ModuleResolver = require("./util/module-resolver"),
+ naming = require("./util/naming"),
+ pkg = require("../package.json");
+
+const debug = require("debug")("eslint:cli-engine");
+
+const resolver = new ModuleResolver();
+
+//------------------------------------------------------------------------------
+// Typedefs
+//------------------------------------------------------------------------------
+
+/**
+ * The options to configure a CLI engine with.
+ * @typedef {Object} CLIEngineOptions
+ * @property {boolean} allowInlineConfig Enable or disable inline configuration comments.
+ * @property {boolean|Object} baseConfig Base config object. True enables recommend rules and environments.
+ * @property {boolean} cache Enable result caching.
+ * @property {string} cacheLocation The cache file to use instead of .eslintcache.
+ * @property {string} configFile The configuration file to use.
+ * @property {string} cwd The value to use for the current working directory.
+ * @property {string[]} envs An array of environments to load.
+ * @property {string[]} extensions An array of file extensions to check.
+ * @property {boolean|Function} fix Execute in autofix mode. If a function, should return a boolean.
+ * @property {string[]} globals An array of global variables to declare.
+ * @property {boolean} ignore False disables use of .eslintignore.
+ * @property {string} ignorePath The ignore file to use instead of .eslintignore.
+ * @property {string} ignorePattern A glob pattern of files to ignore.
+ * @property {boolean} useEslintrc False disables looking for .eslintrc
+ * @property {string} parser The name of the parser to use.
+ * @property {Object} parserOptions An object of parserOption settings to use.
+ * @property {string[]} plugins An array of plugins to load.
+ * @property {Object<string,*>} rules An object of rules to use.
+ * @property {string[]} rulePaths An array of directories to load custom rules from.
+ * @property {boolean} reportUnusedDisableDirectives `true` adds reports for unused eslint-disable directives
+ */
+
+/**
+ * A linting warning or error.
+ * @typedef {Object} LintMessage
+ * @property {string} message The message to display to the user.
+ */
+
+/**
+ * A linting result.
+ * @typedef {Object} LintResult
+ * @property {string} filePath The path to the file that was linted.
+ * @property {LintMessage[]} messages All of the messages for the result.
+ * @property {number} errorCount Number of errors for the result.
+ * @property {number} warningCount Number of warnings for the result.
+ * @property {number} fixableErrorCount Number of fixable errors for the result.
+ * @property {number} fixableWarningCount Number of fixable warnings for the result.
+ * @property {string=} [source] The source code of the file that was linted.
+ * @property {string=} [output] The source code of the file that was linted, with as many fixes applied as possible.
+ */
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * It will calculate the error and warning count for collection of messages per file
+ * @param {Object[]} messages - Collection of messages
+ * @returns {Object} Contains the stats
+ * @private
+ */
+function calculateStatsPerFile(messages) {
+ return messages.reduce((stat, message) => {
+ if (message.fatal || message.severity === 2) {
+ stat.errorCount++;
+ if (message.fix) {
+ stat.fixableErrorCount++;
+ }
+ } else {
+ stat.warningCount++;
+ if (message.fix) {
+ stat.fixableWarningCount++;
+ }
+ }
+ return stat;
+ }, {
+ errorCount: 0,
+ warningCount: 0,
+ fixableErrorCount: 0,
+ fixableWarningCount: 0
+ });
+}
+
+/**
+ * It will calculate the error and warning count for collection of results from all files
+ * @param {Object[]} results - Collection of messages from all the files
+ * @returns {Object} Contains the stats
+ * @private
+ */
+function calculateStatsPerRun(results) {
+ return results.reduce((stat, result) => {
+ stat.errorCount += result.errorCount;
+ stat.warningCount += result.warningCount;
+ stat.fixableErrorCount += result.fixableErrorCount;
+ stat.fixableWarningCount += result.fixableWarningCount;
+ return stat;
+ }, {
+ errorCount: 0,
+ warningCount: 0,
+ fixableErrorCount: 0,
+ fixableWarningCount: 0
+ });
+}
+
+/**
+ * Processes an source code using ESLint.
+ * @param {string} text The source code to check.
+ * @param {Object} configHelper The configuration options for ESLint.
+ * @param {string} filename An optional string representing the texts filename.
+ * @param {boolean|Function} fix Indicates if fixes should be processed.
+ * @param {boolean} allowInlineConfig Allow/ignore comments that change config.
+ * @param {boolean} reportUnusedDisableDirectives Allow/ignore comments that change config.
+ * @param {Linter} linter Linter context
+ * @returns {LintResult} The results for linting on this text.
+ * @private
+ */
+function processText(text, configHelper, filename, fix, allowInlineConfig, reportUnusedDisableDirectives, linter) {
+ let filePath,
+ fileExtension,
+ processor;
+
+ if (filename) {
+ filePath = path.resolve(filename);
+ fileExtension = path.extname(filename);
+ }
+
+ filename = filename || "<text>";
+ debug(`Linting ${filename}`);
+ const config = configHelper.getConfig(filePath);
+
+ if (config.plugins) {
+ configHelper.plugins.loadAll(config.plugins);
+ }
+
+ const loadedPlugins = configHelper.plugins.getAll();
+
+ for (const plugin in loadedPlugins) {
+ if (loadedPlugins[plugin].processors && Object.keys(loadedPlugins[plugin].processors).indexOf(fileExtension) >= 0) {
+ processor = loadedPlugins[plugin].processors[fileExtension];
+ break;
+ }
+ }
+
+ const autofixingEnabled = typeof fix !== "undefined" && (!processor || processor.supportsAutofix);
+
+ const fixedResult = linter.verifyAndFix(text, config, {
+ filename,
+ allowInlineConfig,
+ reportUnusedDisableDirectives,
+ fix: !!autofixingEnabled && fix,
+ preprocess: processor && (rawText => processor.preprocess(rawText, filename)),
+ postprocess: processor && (problemLists => processor.postprocess(problemLists, filename))
+ });
+
+ const stats = calculateStatsPerFile(fixedResult.messages);
+
+ const result = {
+ filePath: filename,
+ messages: fixedResult.messages,
+ errorCount: stats.errorCount,
+ warningCount: stats.warningCount,
+ fixableErrorCount: stats.fixableErrorCount,
+ fixableWarningCount: stats.fixableWarningCount
+ };
+
+ if (fixedResult.fixed) {
+ result.output = fixedResult.output;
+ }
+
+ if (result.errorCount + result.warningCount > 0 && typeof result.output === "undefined") {
+ result.source = text;
+ }
+
+ return result;
+}
+
+/**
+ * Processes an individual file using ESLint. Files used here are known to
+ * exist, so no need to check that here.
+ * @param {string} filename The filename of the file being checked.
+ * @param {Object} configHelper The configuration options for ESLint.
+ * @param {Object} options The CLIEngine options object.
+ * @param {Linter} linter Linter context
+ * @returns {LintResult} The results for linting on this file.
+ * @private
+ */
+function processFile(filename, configHelper, options, linter) {
+
+ const text = fs.readFileSync(path.resolve(filename), "utf8"),
+ result = processText(
+ text,
+ configHelper,
+ filename,
+ options.fix,
+ options.allowInlineConfig,
+ options.reportUnusedDisableDirectives,
+ linter
+ );
+
+ return result;
+
+}
+
+/**
+ * Returns result with warning by ignore settings
+ * @param {string} filePath - File path of checked code
+ * @param {string} baseDir - Absolute path of base directory
+ * @returns {LintResult} Result with single warning
+ * @private
+ */
+function createIgnoreResult(filePath, baseDir) {
+ let message;
+ const isHidden = /^\./.test(path.basename(filePath));
+ const isInNodeModules = baseDir && path.relative(baseDir, filePath).startsWith("node_modules");
+ const isInBowerComponents = baseDir && path.relative(baseDir, filePath).startsWith("bower_components");
+
+ if (isHidden) {
+ message = "File ignored by default. Use a negated ignore pattern (like \"--ignore-pattern '!<relative/path/to/filename>'\") to override.";
+ } else if (isInNodeModules) {
+ message = "File ignored by default. Use \"--ignore-pattern '!node_modules/*'\" to override.";
+ } else if (isInBowerComponents) {
+ message = "File ignored by default. Use \"--ignore-pattern '!bower_components/*'\" to override.";
+ } else {
+ message = "File ignored because of a matching ignore pattern. Use \"--no-ignore\" to override.";
+ }
+
+ return {
+ filePath: path.resolve(filePath),
+ messages: [
+ {
+ fatal: false,
+ severity: 1,
+ message
+ }
+ ],
+ errorCount: 0,
+ warningCount: 1,
+ fixableErrorCount: 0,
+ fixableWarningCount: 0
+ };
+}
+
+
+/**
+ * Checks if the given message is an error message.
+ * @param {Object} message The message to check.
+ * @returns {boolean} Whether or not the message is an error message.
+ * @private
+ */
+function isErrorMessage(message) {
+ return message.severity === 2;
+}
+
+
+/**
+ * return the cacheFile to be used by eslint, based on whether the provided parameter is
+ * a directory or looks like a directory (ends in `path.sep`), in which case the file
+ * name will be the `cacheFile/.cache_hashOfCWD`
+ *
+ * if cacheFile points to a file or looks like a file then in will just use that file
+ *
+ * @param {string} cacheFile The name of file to be used to store the cache
+ * @param {string} cwd Current working directory
+ * @returns {string} the resolved path to the cache file
+ */
+function getCacheFile(cacheFile, cwd) {
+
+ /*
+ * make sure the path separators are normalized for the environment/os
+ * keeping the trailing path separator if present
+ */
+ cacheFile = path.normalize(cacheFile);
+
+ const resolvedCacheFile = path.resolve(cwd, cacheFile);
+ const looksLikeADirectory = cacheFile[cacheFile.length - 1] === path.sep;
+
+ /**
+ * return the name for the cache file in case the provided parameter is a directory
+ * @returns {string} the resolved path to the cacheFile
+ */
+ function getCacheFileForDirectory() {
+ return path.join(resolvedCacheFile, `.cache_${hash(cwd)}`);
+ }
+
+ let fileStats;
+
+ try {
+ fileStats = fs.lstatSync(resolvedCacheFile);
+ } catch (ex) {
+ fileStats = null;
+ }
+
+
+ /*
+ * in case the file exists we need to verify if the provided path
+ * is a directory or a file. If it is a directory we want to create a file
+ * inside that directory
+ */
+ if (fileStats) {
+
+ /*
+ * is a directory or is a file, but the original file the user provided
+ * looks like a directory but `path.resolve` removed the `last path.sep`
+ * so we need to still treat this like a directory
+ */
+ if (fileStats.isDirectory() || looksLikeADirectory) {
+ return getCacheFileForDirectory();
+ }
+
+ // is file so just use that file
+ return resolvedCacheFile;
+ }
+
+ /*
+ * here we known the file or directory doesn't exist,
+ * so we will try to infer if its a directory if it looks like a directory
+ * for the current operating system.
+ */
+
+ // if the last character passed is a path separator we assume is a directory
+ if (looksLikeADirectory) {
+ return getCacheFileForDirectory();
+ }
+
+ return resolvedCacheFile;
+}
+
+const configHashCache = new WeakMap();
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+class CLIEngine {
+
+ /**
+ * Creates a new instance of the core CLI engine.
+ * @param {CLIEngineOptions} options The options for this instance.
+ * @constructor
+ */
+ constructor(options) {
+
+ options = Object.assign(
+ Object.create(null),
+ defaultOptions,
+ { cwd: process.cwd() },
+ options
+ );
+
+ /**
+ * Stored options for this instance
+ * @type {Object}
+ */
+ this.options = options;
+ this.linter = new Linter();
+
+ if (options.cache) {
+ const cacheFile = getCacheFile(this.options.cacheLocation || this.options.cacheFile, this.options.cwd);
+
+ /**
+ * Cache used to avoid operating on files that haven't changed since the
+ * last successful execution (e.g., file passed linting with no errors and
+ * no warnings).
+ * @type {Object}
+ */
+ this._fileCache = fileEntryCache.create(cacheFile);
+ }
+
+ // load in additional rules
+ if (this.options.rulePaths) {
+ const cwd = this.options.cwd;
+
+ this.options.rulePaths.forEach(rulesdir => {
+ debug(`Loading rules from ${rulesdir}`);
+ this.linter.rules.load(rulesdir, cwd);
+ });
+ }
+
+ if (this.options.rules && Object.keys(this.options.rules).length) {
+ const loadedRules = this.linter.getRules();
+
+ Object.keys(this.options.rules).forEach(name => {
+ validator.validateRuleOptions(loadedRules.get(name), name, this.options.rules[name], "CLI");
+ });
+ }
+
+ this.config = new Config(this.options, this.linter);
+ }
+
+ /**
+ * Returns results that only contains errors.
+ * @param {LintResult[]} results The results to filter.
+ * @returns {LintResult[]} The filtered results.
+ */
+ static getErrorResults(results) {
+ const filtered = [];
+
+ results.forEach(result => {
+ const filteredMessages = result.messages.filter(isErrorMessage);
+
+ if (filteredMessages.length > 0) {
+ filtered.push(
+ Object.assign(result, {
+ messages: filteredMessages,
+ errorCount: filteredMessages.length,
+ warningCount: 0,
+ fixableErrorCount: result.fixableErrorCount,
+ fixableWarningCount: 0
+ })
+ );
+ }
+ });
+
+ return filtered;
+ }
+
+ /**
+ * Outputs fixes from the given results to files.
+ * @param {Object} report The report object created by CLIEngine.
+ * @returns {void}
+ */
+ static outputFixes(report) {
+ report.results.filter(result => result.hasOwnProperty("output")).forEach(result => {
+ fs.writeFileSync(result.filePath, result.output);
+ });
+ }
+
+
+ /**
+ * Add a plugin by passing its configuration
+ * @param {string} name Name of the plugin.
+ * @param {Object} pluginobject Plugin configuration object.
+ * @returns {void}
+ */
+ addPlugin(name, pluginobject) {
+ this.config.plugins.define(name, pluginobject);
+ }
+
+ /**
+ * Resolves the patterns passed into executeOnFiles() into glob-based patterns
+ * for easier handling.
+ * @param {string[]} patterns The file patterns passed on the command line.
+ * @returns {string[]} The equivalent glob patterns.
+ */
+ resolveFileGlobPatterns(patterns) {
+ return globUtil.resolveFileGlobPatterns(patterns, this.options);
+ }
+
+ /**
+ * Executes the current configuration on an array of file and directory names.
+ * @param {string[]} patterns An array of file and directory names.
+ * @returns {Object} The results for all files that were linted.
+ */
+ executeOnFiles(patterns) {
+ const options = this.options,
+ fileCache = this._fileCache,
+ configHelper = this.config;
+ const cacheFile = getCacheFile(this.options.cacheLocation || this.options.cacheFile, this.options.cwd);
+
+ if (!options.cache && fs.existsSync(cacheFile)) {
+ fs.unlinkSync(cacheFile);
+ }
+
+ /**
+ * Calculates the hash of the config file used to validate a given file
+ * @param {string} filename The path of the file to retrieve a config object for to calculate the hash
+ * @returns {string} the hash of the config
+ */
+ function hashOfConfigFor(filename) {
+ const config = configHelper.getConfig(filename);
+
+ if (!configHashCache.has(config)) {
+ configHashCache.set(config, hash(`${pkg.version}_${stringify(config)}`));
+ }
+
+ return configHashCache.get(config);
+ }
+
+ const startTime = Date.now();
+ const fileList = globUtil.listFilesToProcess(this.resolveFileGlobPatterns(patterns), options);
+ const results = fileList.map(fileInfo => {
+ if (fileInfo.ignored) {
+ return createIgnoreResult(fileInfo.filename, options.cwd);
+ }
+
+ if (options.cache) {
+
+ /*
+ * get the descriptor for this file
+ * with the metadata and the flag that determines if
+ * the file has changed
+ */
+ const descriptor = fileCache.getFileDescriptor(fileInfo.filename);
+ const hashOfConfig = hashOfConfigFor(fileInfo.filename);
+ const changed = descriptor.changed || descriptor.meta.hashOfConfig !== hashOfConfig;
+
+ if (!changed) {
+ debug(`Skipping file since hasn't changed: ${fileInfo.filename}`);
+
+ /*
+ * Add the the cached results (always will be 0 error and
+ * 0 warnings). We should not cache results for files that
+ * failed, in order to guarantee that next execution will
+ * process those files as well.
+ */
+ return descriptor.meta.results;
+ }
+ }
+
+ debug(`Processing ${fileInfo.filename}`);
+
+ return processFile(fileInfo.filename, configHelper, options, this.linter);
+ });
+
+ if (options.cache) {
+ results.forEach(result => {
+ if (result.messages.length) {
+
+ /*
+ * if a file contains errors or warnings we don't want to
+ * store the file in the cache so we can guarantee that
+ * next execution will also operate on this file
+ */
+ fileCache.removeEntry(result.filePath);
+ } else {
+
+ /*
+ * since the file passed we store the result here
+ * TODO: it might not be necessary to store the results list in the cache,
+ * since it should always be 0 errors/warnings
+ */
+ const descriptor = fileCache.getFileDescriptor(result.filePath);
+
+ descriptor.meta.hashOfConfig = hashOfConfigFor(result.filePath);
+ descriptor.meta.results = result;
+ }
+ });
+
+ // persist the cache to disk
+ fileCache.reconcile();
+ }
+
+ const stats = calculateStatsPerRun(results);
+
+ debug(`Linting complete in: ${Date.now() - startTime}ms`);
+
+ return {
+ results,
+ errorCount: stats.errorCount,
+ warningCount: stats.warningCount,
+ fixableErrorCount: stats.fixableErrorCount,
+ fixableWarningCount: stats.fixableWarningCount
+ };
+ }
+
+ /**
+ * Executes the current configuration on text.
+ * @param {string} text A string of JavaScript code to lint.
+ * @param {string} filename An optional string representing the texts filename.
+ * @param {boolean} warnIgnored Always warn when a file is ignored
+ * @returns {Object} The results for the linting.
+ */
+ executeOnText(text, filename, warnIgnored) {
+
+ const results = [],
+ options = this.options,
+ configHelper = this.config,
+ ignoredPaths = new IgnoredPaths(options);
+
+ // resolve filename based on options.cwd (for reporting, ignoredPaths also resolves)
+ if (filename && !path.isAbsolute(filename)) {
+ filename = path.resolve(options.cwd, filename);
+ }
+
+ if (filename && ignoredPaths.contains(filename)) {
+ if (warnIgnored) {
+ results.push(createIgnoreResult(filename, options.cwd));
+ }
+ } else {
+ results.push(
+ processText(
+ text,
+ configHelper,
+ filename,
+ options.fix,
+ options.allowInlineConfig,
+ options.reportUnusedDisableDirectives,
+ this.linter
+ )
+ );
+ }
+
+ const stats = calculateStatsPerRun(results);
+
+ return {
+ results,
+ errorCount: stats.errorCount,
+ warningCount: stats.warningCount,
+ fixableErrorCount: stats.fixableErrorCount,
+ fixableWarningCount: stats.fixableWarningCount
+ };
+ }
+
+ /**
+ * Returns a configuration object for the given file based on the CLI options.
+ * This is the same logic used by the ESLint CLI executable to determine
+ * configuration for each file it processes.
+ * @param {string} filePath The path of the file to retrieve a config object for.
+ * @returns {Object} A configuration object for the file.
+ */
+ getConfigForFile(filePath) {
+ const configHelper = this.config;
+
+ return configHelper.getConfig(filePath);
+ }
+
+ /**
+ * Checks if a given path is ignored by ESLint.
+ * @param {string} filePath The path of the file to check.
+ * @returns {boolean} Whether or not the given path is ignored.
+ */
+ isPathIgnored(filePath) {
+ const resolvedPath = path.resolve(this.options.cwd, filePath);
+ const ignoredPaths = new IgnoredPaths(this.options);
+
+ return ignoredPaths.contains(resolvedPath);
+ }
+
+ /**
+ * Returns the formatter representing the given format or null if no formatter
+ * with the given name can be found.
+ * @param {string} [format] The name of the format to load or the path to a
+ * custom formatter.
+ * @returns {Function} The formatter function or null if not found.
+ */
+ getFormatter(format) {
+
+
+ // default is stylish
+ format = format || "stylish";
+
+ // only strings are valid formatters
+ if (typeof format === "string") {
+
+ // replace \ with / for Windows compatibility
+ format = format.replace(/\\/g, "/");
+
+ const cwd = this.options ? this.options.cwd : process.cwd();
+ const namespace = naming.getNamespaceFromTerm(format);
+
+ let formatterPath;
+
+ // if there's a slash, then it's a file
+ if (!namespace && format.indexOf("/") > -1) {
+ formatterPath = path.resolve(cwd, format);
+ } else {
+ try {
+ const npmFormat = naming.normalizePackageName(format, "eslint-formatter");
+
+ formatterPath = resolver.resolve(npmFormat, `${cwd}/node_modules`);
+ } catch (e) {
+ formatterPath = `./formatters/${format}`;
+ }
+ }
+
+ try {
+ return require(formatterPath);
+ } catch (ex) {
+ ex.message = `There was a problem loading formatter: ${formatterPath}\nError: ${ex.message}`;
+ throw ex;
+ }
+
+ } else {
+ return null;
+ }
+ }
+}
+
+CLIEngine.version = pkg.version;
+CLIEngine.getFormatter = CLIEngine.prototype.getFormatter;
+
+module.exports = CLIEngine;
diff --git a/tools/node_modules/eslint/lib/cli.js b/tools/node_modules/eslint/lib/cli.js
new file mode 100644
index 0000000000..6a5482bf9a
--- /dev/null
+++ b/tools/node_modules/eslint/lib/cli.js
@@ -0,0 +1,219 @@
+/**
+ * @fileoverview Main CLI object.
+ * @author Nicholas C. Zakas
+ */
+
+"use strict";
+
+/*
+ * The CLI object should *not* call process.exit() directly. It should only return
+ * exit codes. This allows other programs to use the CLI object and still control
+ * when the program exits.
+ */
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const fs = require("fs"),
+ path = require("path"),
+ options = require("./options"),
+ CLIEngine = require("./cli-engine"),
+ mkdirp = require("mkdirp"),
+ log = require("./logging");
+
+const debug = require("debug")("eslint:cli");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Predicate function for whether or not to apply fixes in quiet mode.
+ * If a message is a warning, do not apply a fix.
+ * @param {LintResult} lintResult The lint result.
+ * @returns {boolean} True if the lint message is an error (and thus should be
+ * autofixed), false otherwise.
+ */
+function quietFixPredicate(lintResult) {
+ return lintResult.severity === 2;
+}
+
+/**
+ * Translates the CLI options into the options expected by the CLIEngine.
+ * @param {Object} cliOptions The CLI options to translate.
+ * @returns {CLIEngineOptions} The options object for the CLIEngine.
+ * @private
+ */
+function translateOptions(cliOptions) {
+ return {
+ envs: cliOptions.env,
+ extensions: cliOptions.ext,
+ rules: cliOptions.rule,
+ plugins: cliOptions.plugin,
+ globals: cliOptions.global,
+ ignore: cliOptions.ignore,
+ ignorePath: cliOptions.ignorePath,
+ ignorePattern: cliOptions.ignorePattern,
+ configFile: cliOptions.config,
+ rulePaths: cliOptions.rulesdir,
+ useEslintrc: cliOptions.eslintrc,
+ parser: cliOptions.parser,
+ parserOptions: cliOptions.parserOptions,
+ cache: cliOptions.cache,
+ cacheFile: cliOptions.cacheFile,
+ cacheLocation: cliOptions.cacheLocation,
+ fix: (cliOptions.fix || cliOptions.fixDryRun) && (cliOptions.quiet ? quietFixPredicate : true),
+ allowInlineConfig: cliOptions.inlineConfig,
+ reportUnusedDisableDirectives: cliOptions.reportUnusedDisableDirectives
+ };
+}
+
+/**
+ * Outputs the results of the linting.
+ * @param {CLIEngine} engine The CLIEngine to use.
+ * @param {LintResult[]} results The results to print.
+ * @param {string} format The name of the formatter to use or the path to the formatter.
+ * @param {string} outputFile The path for the output file.
+ * @returns {boolean} True if the printing succeeds, false if not.
+ * @private
+ */
+function printResults(engine, results, format, outputFile) {
+ let formatter;
+
+ try {
+ formatter = engine.getFormatter(format);
+ } catch (e) {
+ log.error(e.message);
+ return false;
+ }
+
+ const output = formatter(results);
+
+ if (output) {
+ if (outputFile) {
+ const filePath = path.resolve(process.cwd(), outputFile);
+
+ if (fs.existsSync(filePath) && fs.statSync(filePath).isDirectory()) {
+ log.error("Cannot write to output file path, it is a directory: %s", outputFile);
+ return false;
+ }
+
+ try {
+ mkdirp.sync(path.dirname(filePath));
+ fs.writeFileSync(filePath, output);
+ } catch (ex) {
+ log.error("There was a problem writing the output file:\n%s", ex);
+ return false;
+ }
+ } else {
+ log.info(output);
+ }
+ }
+
+ return true;
+
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+/**
+ * Encapsulates all CLI behavior for eslint. Makes it easier to test as well as
+ * for other Node.js programs to effectively run the CLI.
+ */
+const cli = {
+
+ /**
+ * Executes the CLI based on an array of arguments that is passed in.
+ * @param {string|Array|Object} args The arguments to process.
+ * @param {string} [text] The text to lint (used for TTY).
+ * @returns {int} The exit code for the operation.
+ */
+ execute(args, text) {
+
+ let currentOptions;
+
+ try {
+ currentOptions = options.parse(args);
+ } catch (error) {
+ log.error(error.message);
+ return 1;
+ }
+
+ const files = currentOptions._;
+
+ const useStdin = typeof text === "string";
+
+ if (currentOptions.version) { // version from package.json
+
+ log.info(`v${require("../package.json").version}`);
+
+ } else if (currentOptions.printConfig) {
+ if (files.length) {
+ log.error("The --print-config option must be used with exactly one file name.");
+ return 1;
+ }
+ if (useStdin) {
+ log.error("The --print-config option is not available for piped-in code.");
+ return 1;
+ }
+
+ const engine = new CLIEngine(translateOptions(currentOptions));
+
+ const fileConfig = engine.getConfigForFile(currentOptions.printConfig);
+
+ log.info(JSON.stringify(fileConfig, null, " "));
+ return 0;
+ } else if (currentOptions.help || (!files.length && !useStdin)) {
+
+ log.info(options.generateHelp());
+
+ } else {
+
+ debug(`Running on ${useStdin ? "text" : "files"}`);
+
+ if (currentOptions.fix && currentOptions.fixDryRun) {
+ log.error("The --fix option and the --fix-dry-run option cannot be used together.");
+ return 1;
+ }
+
+ if (useStdin && currentOptions.fix) {
+ log.error("The --fix option is not available for piped-in code; use --fix-dry-run instead.");
+ return 1;
+ }
+
+ const engine = new CLIEngine(translateOptions(currentOptions));
+
+ const report = useStdin ? engine.executeOnText(text, currentOptions.stdinFilename, true) : engine.executeOnFiles(files);
+
+ if (currentOptions.fix) {
+ debug("Fix mode enabled - applying fixes");
+ CLIEngine.outputFixes(report);
+ }
+
+ if (currentOptions.quiet) {
+ debug("Quiet mode enabled - filtering out warnings");
+ report.results = CLIEngine.getErrorResults(report.results);
+ }
+
+ if (printResults(engine, report.results, currentOptions.format, currentOptions.outputFile)) {
+ const tooManyWarnings = currentOptions.maxWarnings >= 0 && report.warningCount > currentOptions.maxWarnings;
+
+ if (!report.errorCount && tooManyWarnings) {
+ log.error("ESLint found too many warnings (maximum: %s).", currentOptions.maxWarnings);
+ }
+
+ return (report.errorCount || tooManyWarnings) ? 1 : 0;
+ }
+ return 1;
+
+
+ }
+
+ return 0;
+ }
+};
+
+module.exports = cli;
diff --git a/tools/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js b/tools/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js
new file mode 100644
index 0000000000..1a4f7870ba
--- /dev/null
+++ b/tools/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js
@@ -0,0 +1,659 @@
+/**
+ * @fileoverview A class of the code path analyzer.
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const assert = require("assert"),
+ CodePath = require("./code-path"),
+ CodePathSegment = require("./code-path-segment"),
+ IdGenerator = require("./id-generator"),
+ debug = require("./debug-helpers"),
+ astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Checks whether or not a given node is a `case` node (not `default` node).
+ *
+ * @param {ASTNode} node - A `SwitchCase` node to check.
+ * @returns {boolean} `true` if the node is a `case` node (not `default` node).
+ */
+function isCaseNode(node) {
+ return Boolean(node.test);
+}
+
+/**
+ * Checks whether or not a given logical expression node goes different path
+ * between the `true` case and the `false` case.
+ *
+ * @param {ASTNode} node - A node to check.
+ * @returns {boolean} `true` if the node is a test of a choice statement.
+ */
+function isForkingByTrueOrFalse(node) {
+ const parent = node.parent;
+
+ switch (parent.type) {
+ case "ConditionalExpression":
+ case "IfStatement":
+ case "WhileStatement":
+ case "DoWhileStatement":
+ case "ForStatement":
+ return parent.test === node;
+
+ case "LogicalExpression":
+ return true;
+
+ default:
+ return false;
+ }
+}
+
+/**
+ * Gets the boolean value of a given literal node.
+ *
+ * This is used to detect infinity loops (e.g. `while (true) {}`).
+ * Statements preceded by an infinity loop are unreachable if the loop didn't
+ * have any `break` statement.
+ *
+ * @param {ASTNode} node - A node to get.
+ * @returns {boolean|undefined} a boolean value if the node is a Literal node,
+ * otherwise `undefined`.
+ */
+function getBooleanValueIfSimpleConstant(node) {
+ if (node.type === "Literal") {
+ return Boolean(node.value);
+ }
+ return void 0;
+}
+
+/**
+ * Checks that a given identifier node is a reference or not.
+ *
+ * This is used to detect the first throwable node in a `try` block.
+ *
+ * @param {ASTNode} node - An Identifier node to check.
+ * @returns {boolean} `true` if the node is a reference.
+ */
+function isIdentifierReference(node) {
+ const parent = node.parent;
+
+ switch (parent.type) {
+ case "LabeledStatement":
+ case "BreakStatement":
+ case "ContinueStatement":
+ case "ArrayPattern":
+ case "RestElement":
+ case "ImportSpecifier":
+ case "ImportDefaultSpecifier":
+ case "ImportNamespaceSpecifier":
+ case "CatchClause":
+ return false;
+
+ case "FunctionDeclaration":
+ case "FunctionExpression":
+ case "ArrowFunctionExpression":
+ case "ClassDeclaration":
+ case "ClassExpression":
+ case "VariableDeclarator":
+ return parent.id !== node;
+
+ case "Property":
+ case "MethodDefinition":
+ return (
+ parent.key !== node ||
+ parent.computed ||
+ parent.shorthand
+ );
+
+ case "AssignmentPattern":
+ return parent.key !== node;
+
+ default:
+ return true;
+ }
+}
+
+/**
+ * Updates the current segment with the head segment.
+ * This is similar to local branches and tracking branches of git.
+ *
+ * To separate the current and the head is in order to not make useless segments.
+ *
+ * In this process, both "onCodePathSegmentStart" and "onCodePathSegmentEnd"
+ * events are fired.
+ *
+ * @param {CodePathAnalyzer} analyzer - The instance.
+ * @param {ASTNode} node - The current AST node.
+ * @returns {void}
+ */
+function forwardCurrentToHead(analyzer, node) {
+ const codePath = analyzer.codePath;
+ const state = CodePath.getState(codePath);
+ const currentSegments = state.currentSegments;
+ const headSegments = state.headSegments;
+ const end = Math.max(currentSegments.length, headSegments.length);
+ let i, currentSegment, headSegment;
+
+ // Fires leaving events.
+ for (i = 0; i < end; ++i) {
+ currentSegment = currentSegments[i];
+ headSegment = headSegments[i];
+
+ if (currentSegment !== headSegment && currentSegment) {
+ debug.dump(`onCodePathSegmentEnd ${currentSegment.id}`);
+
+ if (currentSegment.reachable) {
+ analyzer.emitter.emit(
+ "onCodePathSegmentEnd",
+ currentSegment,
+ node
+ );
+ }
+ }
+ }
+
+ // Update state.
+ state.currentSegments = headSegments;
+
+ // Fires entering events.
+ for (i = 0; i < end; ++i) {
+ currentSegment = currentSegments[i];
+ headSegment = headSegments[i];
+
+ if (currentSegment !== headSegment && headSegment) {
+ debug.dump(`onCodePathSegmentStart ${headSegment.id}`);
+
+ CodePathSegment.markUsed(headSegment);
+ if (headSegment.reachable) {
+ analyzer.emitter.emit(
+ "onCodePathSegmentStart",
+ headSegment,
+ node
+ );
+ }
+ }
+ }
+
+}
+
+/**
+ * Updates the current segment with empty.
+ * This is called at the last of functions or the program.
+ *
+ * @param {CodePathAnalyzer} analyzer - The instance.
+ * @param {ASTNode} node - The current AST node.
+ * @returns {void}
+ */
+function leaveFromCurrentSegment(analyzer, node) {
+ const state = CodePath.getState(analyzer.codePath);
+ const currentSegments = state.currentSegments;
+
+ for (let i = 0; i < currentSegments.length; ++i) {
+ const currentSegment = currentSegments[i];
+
+ debug.dump(`onCodePathSegmentEnd ${currentSegment.id}`);
+ if (currentSegment.reachable) {
+ analyzer.emitter.emit(
+ "onCodePathSegmentEnd",
+ currentSegment,
+ node
+ );
+ }
+ }
+
+ state.currentSegments = [];
+}
+
+/**
+ * Updates the code path due to the position of a given node in the parent node
+ * thereof.
+ *
+ * For example, if the node is `parent.consequent`, this creates a fork from the
+ * current path.
+ *
+ * @param {CodePathAnalyzer} analyzer - The instance.
+ * @param {ASTNode} node - The current AST node.
+ * @returns {void}
+ */
+function preprocess(analyzer, node) {
+ const codePath = analyzer.codePath;
+ const state = CodePath.getState(codePath);
+ const parent = node.parent;
+
+ switch (parent.type) {
+ case "LogicalExpression":
+ if (parent.right === node) {
+ state.makeLogicalRight();
+ }
+ break;
+
+ case "ConditionalExpression":
+ case "IfStatement":
+
+ /*
+ * Fork if this node is at `consequent`/`alternate`.
+ * `popForkContext()` exists at `IfStatement:exit` and
+ * `ConditionalExpression:exit`.
+ */
+ if (parent.consequent === node) {
+ state.makeIfConsequent();
+ } else if (parent.alternate === node) {
+ state.makeIfAlternate();
+ }
+ break;
+
+ case "SwitchCase":
+ if (parent.consequent[0] === node) {
+ state.makeSwitchCaseBody(false, !parent.test);
+ }
+ break;
+
+ case "TryStatement":
+ if (parent.handler === node) {
+ state.makeCatchBlock();
+ } else if (parent.finalizer === node) {
+ state.makeFinallyBlock();
+ }
+ break;
+
+ case "WhileStatement":
+ if (parent.test === node) {
+ state.makeWhileTest(getBooleanValueIfSimpleConstant(node));
+ } else {
+ assert(parent.body === node);
+ state.makeWhileBody();
+ }
+ break;
+
+ case "DoWhileStatement":
+ if (parent.body === node) {
+ state.makeDoWhileBody();
+ } else {
+ assert(parent.test === node);
+ state.makeDoWhileTest(getBooleanValueIfSimpleConstant(node));
+ }
+ break;
+
+ case "ForStatement":
+ if (parent.test === node) {
+ state.makeForTest(getBooleanValueIfSimpleConstant(node));
+ } else if (parent.update === node) {
+ state.makeForUpdate();
+ } else if (parent.body === node) {
+ state.makeForBody();
+ }
+ break;
+
+ case "ForInStatement":
+ case "ForOfStatement":
+ if (parent.left === node) {
+ state.makeForInOfLeft();
+ } else if (parent.right === node) {
+ state.makeForInOfRight();
+ } else {
+ assert(parent.body === node);
+ state.makeForInOfBody();
+ }
+ break;
+
+ case "AssignmentPattern":
+
+ /*
+ * Fork if this node is at `right`.
+ * `left` is executed always, so it uses the current path.
+ * `popForkContext()` exists at `AssignmentPattern:exit`.
+ */
+ if (parent.right === node) {
+ state.pushForkContext();
+ state.forkBypassPath();
+ state.forkPath();
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+/**
+ * Updates the code path due to the type of a given node in entering.
+ *
+ * @param {CodePathAnalyzer} analyzer - The instance.
+ * @param {ASTNode} node - The current AST node.
+ * @returns {void}
+ */
+function processCodePathToEnter(analyzer, node) {
+ let codePath = analyzer.codePath;
+ let state = codePath && CodePath.getState(codePath);
+ const parent = node.parent;
+
+ switch (node.type) {
+ case "Program":
+ case "FunctionDeclaration":
+ case "FunctionExpression":
+ case "ArrowFunctionExpression":
+ if (codePath) {
+
+ // Emits onCodePathSegmentStart events if updated.
+ forwardCurrentToHead(analyzer, node);
+ debug.dumpState(node, state, false);
+ }
+
+ // Create the code path of this scope.
+ codePath = analyzer.codePath = new CodePath(
+ analyzer.idGenerator.next(),
+ codePath,
+ analyzer.onLooped
+ );
+ state = CodePath.getState(codePath);
+
+ // Emits onCodePathStart events.
+ debug.dump(`onCodePathStart ${codePath.id}`);
+ analyzer.emitter.emit("onCodePathStart", codePath, node);
+ break;
+
+ case "LogicalExpression":
+ state.pushChoiceContext(node.operator, isForkingByTrueOrFalse(node));
+ break;
+
+ case "ConditionalExpression":
+ case "IfStatement":
+ state.pushChoiceContext("test", false);
+ break;
+
+ case "SwitchStatement":
+ state.pushSwitchContext(
+ node.cases.some(isCaseNode),
+ astUtils.getLabel(node)
+ );
+ break;
+
+ case "TryStatement":
+ state.pushTryContext(Boolean(node.finalizer));
+ break;
+
+ case "SwitchCase":
+
+ /*
+ * Fork if this node is after the 2st node in `cases`.
+ * It's similar to `else` blocks.
+ * The next `test` node is processed in this path.
+ */
+ if (parent.discriminant !== node && parent.cases[0] !== node) {
+ state.forkPath();
+ }
+ break;
+
+ case "WhileStatement":
+ case "DoWhileStatement":
+ case "ForStatement":
+ case "ForInStatement":
+ case "ForOfStatement":
+ state.pushLoopContext(node.type, astUtils.getLabel(node));
+ break;
+
+ case "LabeledStatement":
+ if (!astUtils.isBreakableStatement(node.body)) {
+ state.pushBreakContext(false, node.label.name);
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ // Emits onCodePathSegmentStart events if updated.
+ forwardCurrentToHead(analyzer, node);
+ debug.dumpState(node, state, false);
+}
+
+/**
+ * Updates the code path due to the type of a given node in leaving.
+ *
+ * @param {CodePathAnalyzer} analyzer - The instance.
+ * @param {ASTNode} node - The current AST node.
+ * @returns {void}
+ */
+function processCodePathToExit(analyzer, node) {
+ const codePath = analyzer.codePath;
+ const state = CodePath.getState(codePath);
+ let dontForward = false;
+
+ switch (node.type) {
+ case "IfStatement":
+ case "ConditionalExpression":
+ case "LogicalExpression":
+ state.popChoiceContext();
+ break;
+
+ case "SwitchStatement":
+ state.popSwitchContext();
+ break;
+
+ case "SwitchCase":
+
+ /*
+ * This is the same as the process at the 1st `consequent` node in
+ * `preprocess` function.
+ * Must do if this `consequent` is empty.
+ */
+ if (node.consequent.length === 0) {
+ state.makeSwitchCaseBody(true, !node.test);
+ }
+ if (state.forkContext.reachable) {
+ dontForward = true;
+ }
+ break;
+
+ case "TryStatement":
+ state.popTryContext();
+ break;
+
+ case "BreakStatement":
+ forwardCurrentToHead(analyzer, node);
+ state.makeBreak(node.label && node.label.name);
+ dontForward = true;
+ break;
+
+ case "ContinueStatement":
+ forwardCurrentToHead(analyzer, node);
+ state.makeContinue(node.label && node.label.name);
+ dontForward = true;
+ break;
+
+ case "ReturnStatement":
+ forwardCurrentToHead(analyzer, node);
+ state.makeReturn();
+ dontForward = true;
+ break;
+
+ case "ThrowStatement":
+ forwardCurrentToHead(analyzer, node);
+ state.makeThrow();
+ dontForward = true;
+ break;
+
+ case "Identifier":
+ if (isIdentifierReference(node)) {
+ state.makeFirstThrowablePathInTryBlock();
+ dontForward = true;
+ }
+ break;
+
+ case "CallExpression":
+ case "MemberExpression":
+ case "NewExpression":
+ state.makeFirstThrowablePathInTryBlock();
+ break;
+
+ case "WhileStatement":
+ case "DoWhileStatement":
+ case "ForStatement":
+ case "ForInStatement":
+ case "ForOfStatement":
+ state.popLoopContext();
+ break;
+
+ case "AssignmentPattern":
+ state.popForkContext();
+ break;
+
+ case "LabeledStatement":
+ if (!astUtils.isBreakableStatement(node.body)) {
+ state.popBreakContext();
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ // Emits onCodePathSegmentStart events if updated.
+ if (!dontForward) {
+ forwardCurrentToHead(analyzer, node);
+ }
+ debug.dumpState(node, state, true);
+}
+
+/**
+ * Updates the code path to finalize the current code path.
+ *
+ * @param {CodePathAnalyzer} analyzer - The instance.
+ * @param {ASTNode} node - The current AST node.
+ * @returns {void}
+ */
+function postprocess(analyzer, node) {
+ switch (node.type) {
+ case "Program":
+ case "FunctionDeclaration":
+ case "FunctionExpression":
+ case "ArrowFunctionExpression": {
+ let codePath = analyzer.codePath;
+
+ // Mark the current path as the final node.
+ CodePath.getState(codePath).makeFinal();
+
+ // Emits onCodePathSegmentEnd event of the current segments.
+ leaveFromCurrentSegment(analyzer, node);
+
+ // Emits onCodePathEnd event of this code path.
+ debug.dump(`onCodePathEnd ${codePath.id}`);
+ analyzer.emitter.emit("onCodePathEnd", codePath, node);
+ debug.dumpDot(codePath);
+
+ codePath = analyzer.codePath = analyzer.codePath.upper;
+ if (codePath) {
+ debug.dumpState(node, CodePath.getState(codePath), true);
+ }
+ break;
+ }
+
+ default:
+ break;
+ }
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+/**
+ * The class to analyze code paths.
+ * This class implements the EventGenerator interface.
+ */
+class CodePathAnalyzer {
+
+ /**
+ * @param {EventGenerator} eventGenerator - An event generator to wrap.
+ */
+ constructor(eventGenerator) {
+ this.original = eventGenerator;
+ this.emitter = eventGenerator.emitter;
+ this.codePath = null;
+ this.idGenerator = new IdGenerator("s");
+ this.currentNode = null;
+ this.onLooped = this.onLooped.bind(this);
+ }
+
+ /**
+ * Does the process to enter a given AST node.
+ * This updates state of analysis and calls `enterNode` of the wrapped.
+ *
+ * @param {ASTNode} node - A node which is entering.
+ * @returns {void}
+ */
+ enterNode(node) {
+ this.currentNode = node;
+
+ // Updates the code path due to node's position in its parent node.
+ if (node.parent) {
+ preprocess(this, node);
+ }
+
+ /*
+ * Updates the code path.
+ * And emits onCodePathStart/onCodePathSegmentStart events.
+ */
+ processCodePathToEnter(this, node);
+
+ // Emits node events.
+ this.original.enterNode(node);
+
+ this.currentNode = null;
+ }
+
+ /**
+ * Does the process to leave a given AST node.
+ * This updates state of analysis and calls `leaveNode` of the wrapped.
+ *
+ * @param {ASTNode} node - A node which is leaving.
+ * @returns {void}
+ */
+ leaveNode(node) {
+ this.currentNode = node;
+
+ /*
+ * Updates the code path.
+ * And emits onCodePathStart/onCodePathSegmentStart events.
+ */
+ processCodePathToExit(this, node);
+
+ // Emits node events.
+ this.original.leaveNode(node);
+
+ // Emits the last onCodePathStart/onCodePathSegmentStart events.
+ postprocess(this, node);
+
+ this.currentNode = null;
+ }
+
+ /**
+ * This is called on a code path looped.
+ * Then this raises a looped event.
+ *
+ * @param {CodePathSegment} fromSegment - A segment of prev.
+ * @param {CodePathSegment} toSegment - A segment of next.
+ * @returns {void}
+ */
+ onLooped(fromSegment, toSegment) {
+ if (fromSegment.reachable && toSegment.reachable) {
+ debug.dump(`onCodePathSegmentLoop ${fromSegment.id} -> ${toSegment.id}`);
+ this.emitter.emit(
+ "onCodePathSegmentLoop",
+ fromSegment,
+ toSegment,
+ this.currentNode
+ );
+ }
+ }
+}
+
+module.exports = CodePathAnalyzer;
diff --git a/tools/node_modules/eslint/lib/code-path-analysis/code-path-segment.js b/tools/node_modules/eslint/lib/code-path-analysis/code-path-segment.js
new file mode 100644
index 0000000000..8145f92801
--- /dev/null
+++ b/tools/node_modules/eslint/lib/code-path-analysis/code-path-segment.js
@@ -0,0 +1,245 @@
+/**
+ * @fileoverview A class of the code path segment.
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const debug = require("./debug-helpers");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Checks whether or not a given segment is reachable.
+ *
+ * @param {CodePathSegment} segment - A segment to check.
+ * @returns {boolean} `true` if the segment is reachable.
+ */
+function isReachable(segment) {
+ return segment.reachable;
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+/**
+ * A code path segment.
+ */
+class CodePathSegment {
+
+ /**
+ * @param {string} id - An identifier.
+ * @param {CodePathSegment[]} allPrevSegments - An array of the previous segments.
+ * This array includes unreachable segments.
+ * @param {boolean} reachable - A flag which shows this is reachable.
+ */
+ constructor(id, allPrevSegments, reachable) {
+
+ /**
+ * The identifier of this code path.
+ * Rules use it to store additional information of each rule.
+ * @type {string}
+ */
+ this.id = id;
+
+ /**
+ * An array of the next segments.
+ * @type {CodePathSegment[]}
+ */
+ this.nextSegments = [];
+
+ /**
+ * An array of the previous segments.
+ * @type {CodePathSegment[]}
+ */
+ this.prevSegments = allPrevSegments.filter(isReachable);
+
+ /**
+ * An array of the next segments.
+ * This array includes unreachable segments.
+ * @type {CodePathSegment[]}
+ */
+ this.allNextSegments = [];
+
+ /**
+ * An array of the previous segments.
+ * This array includes unreachable segments.
+ * @type {CodePathSegment[]}
+ */
+ this.allPrevSegments = allPrevSegments;
+
+ /**
+ * A flag which shows this is reachable.
+ * @type {boolean}
+ */
+ this.reachable = reachable;
+
+ // Internal data.
+ Object.defineProperty(this, "internal", {
+ value: {
+ used: false,
+ loopedPrevSegments: []
+ }
+ });
+
+ /* istanbul ignore if */
+ if (debug.enabled) {
+ this.internal.nodes = [];
+ this.internal.exitNodes = [];
+ }
+ }
+
+ /**
+ * Checks a given previous segment is coming from the end of a loop.
+ *
+ * @param {CodePathSegment} segment - A previous segment to check.
+ * @returns {boolean} `true` if the segment is coming from the end of a loop.
+ */
+ isLoopedPrevSegment(segment) {
+ return this.internal.loopedPrevSegments.indexOf(segment) !== -1;
+ }
+
+ /**
+ * Creates the root segment.
+ *
+ * @param {string} id - An identifier.
+ * @returns {CodePathSegment} The created segment.
+ */
+ static newRoot(id) {
+ return new CodePathSegment(id, [], true);
+ }
+
+ /**
+ * Creates a segment that follows given segments.
+ *
+ * @param {string} id - An identifier.
+ * @param {CodePathSegment[]} allPrevSegments - An array of the previous segments.
+ * @returns {CodePathSegment} The created segment.
+ */
+ static newNext(id, allPrevSegments) {
+ return new CodePathSegment(
+ id,
+ CodePathSegment.flattenUnusedSegments(allPrevSegments),
+ allPrevSegments.some(isReachable)
+ );
+ }
+
+ /**
+ * Creates an unreachable segment that follows given segments.
+ *
+ * @param {string} id - An identifier.
+ * @param {CodePathSegment[]} allPrevSegments - An array of the previous segments.
+ * @returns {CodePathSegment} The created segment.
+ */
+ static newUnreachable(id, allPrevSegments) {
+ const segment = new CodePathSegment(id, CodePathSegment.flattenUnusedSegments(allPrevSegments), false);
+
+ /*
+ * In `if (a) return a; foo();` case, the unreachable segment preceded by
+ * the return statement is not used but must not be remove.
+ */
+ CodePathSegment.markUsed(segment);
+
+ return segment;
+ }
+
+ /**
+ * Creates a segment that follows given segments.
+ * This factory method does not connect with `allPrevSegments`.
+ * But this inherits `reachable` flag.
+ *
+ * @param {string} id - An identifier.
+ * @param {CodePathSegment[]} allPrevSegments - An array of the previous segments.
+ * @returns {CodePathSegment} The created segment.
+ */
+ static newDisconnected(id, allPrevSegments) {
+ return new CodePathSegment(id, [], allPrevSegments.some(isReachable));
+ }
+
+ /**
+ * Makes a given segment being used.
+ *
+ * And this function registers the segment into the previous segments as a next.
+ *
+ * @param {CodePathSegment} segment - A segment to mark.
+ * @returns {void}
+ */
+ static markUsed(segment) {
+ if (segment.internal.used) {
+ return;
+ }
+ segment.internal.used = true;
+
+ let i;
+
+ if (segment.reachable) {
+ for (i = 0; i < segment.allPrevSegments.length; ++i) {
+ const prevSegment = segment.allPrevSegments[i];
+
+ prevSegment.allNextSegments.push(segment);
+ prevSegment.nextSegments.push(segment);
+ }
+ } else {
+ for (i = 0; i < segment.allPrevSegments.length; ++i) {
+ segment.allPrevSegments[i].allNextSegments.push(segment);
+ }
+ }
+ }
+
+ /**
+ * Marks a previous segment as looped.
+ *
+ * @param {CodePathSegment} segment - A segment.
+ * @param {CodePathSegment} prevSegment - A previous segment to mark.
+ * @returns {void}
+ */
+ static markPrevSegmentAsLooped(segment, prevSegment) {
+ segment.internal.loopedPrevSegments.push(prevSegment);
+ }
+
+ /**
+ * Replaces unused segments with the previous segments of each unused segment.
+ *
+ * @param {CodePathSegment[]} segments - An array of segments to replace.
+ * @returns {CodePathSegment[]} The replaced array.
+ */
+ static flattenUnusedSegments(segments) {
+ const done = Object.create(null);
+ const retv = [];
+
+ for (let i = 0; i < segments.length; ++i) {
+ const segment = segments[i];
+
+ // Ignores duplicated.
+ if (done[segment.id]) {
+ continue;
+ }
+
+ // Use previous segments if unused.
+ if (!segment.internal.used) {
+ for (let j = 0; j < segment.allPrevSegments.length; ++j) {
+ const prevSegment = segment.allPrevSegments[j];
+
+ if (!done[prevSegment.id]) {
+ done[prevSegment.id] = true;
+ retv.push(prevSegment);
+ }
+ }
+ } else {
+ done[segment.id] = true;
+ retv.push(segment);
+ }
+ }
+
+ return retv;
+ }
+}
+
+module.exports = CodePathSegment;
diff --git a/tools/node_modules/eslint/lib/code-path-analysis/code-path-state.js b/tools/node_modules/eslint/lib/code-path-analysis/code-path-state.js
new file mode 100644
index 0000000000..0c31e2072b
--- /dev/null
+++ b/tools/node_modules/eslint/lib/code-path-analysis/code-path-state.js
@@ -0,0 +1,1440 @@
+/**
+ * @fileoverview A class to manage state of generating a code path.
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const CodePathSegment = require("./code-path-segment"),
+ ForkContext = require("./fork-context");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Adds given segments into the `dest` array.
+ * If the `others` array does not includes the given segments, adds to the `all`
+ * array as well.
+ *
+ * This adds only reachable and used segments.
+ *
+ * @param {CodePathSegment[]} dest - A destination array (`returnedSegments` or `thrownSegments`).
+ * @param {CodePathSegment[]} others - Another destination array (`returnedSegments` or `thrownSegments`).
+ * @param {CodePathSegment[]} all - The unified destination array (`finalSegments`).
+ * @param {CodePathSegment[]} segments - Segments to add.
+ * @returns {void}
+ */
+function addToReturnedOrThrown(dest, others, all, segments) {
+ for (let i = 0; i < segments.length; ++i) {
+ const segment = segments[i];
+
+ dest.push(segment);
+ if (others.indexOf(segment) === -1) {
+ all.push(segment);
+ }
+ }
+}
+
+/**
+ * Gets a loop-context for a `continue` statement.
+ *
+ * @param {CodePathState} state - A state to get.
+ * @param {string} label - The label of a `continue` statement.
+ * @returns {LoopContext} A loop-context for a `continue` statement.
+ */
+function getContinueContext(state, label) {
+ if (!label) {
+ return state.loopContext;
+ }
+
+ let context = state.loopContext;
+
+ while (context) {
+ if (context.label === label) {
+ return context;
+ }
+ context = context.upper;
+ }
+
+ /* istanbul ignore next: foolproof (syntax error) */
+ return null;
+}
+
+/**
+ * Gets a context for a `break` statement.
+ *
+ * @param {CodePathState} state - A state to get.
+ * @param {string} label - The label of a `break` statement.
+ * @returns {LoopContext|SwitchContext} A context for a `break` statement.
+ */
+function getBreakContext(state, label) {
+ let context = state.breakContext;
+
+ while (context) {
+ if (label ? context.label === label : context.breakable) {
+ return context;
+ }
+ context = context.upper;
+ }
+
+ /* istanbul ignore next: foolproof (syntax error) */
+ return null;
+}
+
+/**
+ * Gets a context for a `return` statement.
+ *
+ * @param {CodePathState} state - A state to get.
+ * @returns {TryContext|CodePathState} A context for a `return` statement.
+ */
+function getReturnContext(state) {
+ let context = state.tryContext;
+
+ while (context) {
+ if (context.hasFinalizer && context.position !== "finally") {
+ return context;
+ }
+ context = context.upper;
+ }
+
+ return state;
+}
+
+/**
+ * Gets a context for a `throw` statement.
+ *
+ * @param {CodePathState} state - A state to get.
+ * @returns {TryContext|CodePathState} A context for a `throw` statement.
+ */
+function getThrowContext(state) {
+ let context = state.tryContext;
+
+ while (context) {
+ if (context.position === "try" ||
+ (context.hasFinalizer && context.position === "catch")
+ ) {
+ return context;
+ }
+ context = context.upper;
+ }
+
+ return state;
+}
+
+/**
+ * Removes a given element from a given array.
+ *
+ * @param {any[]} xs - An array to remove the specific element.
+ * @param {any} x - An element to be removed.
+ * @returns {void}
+ */
+function remove(xs, x) {
+ xs.splice(xs.indexOf(x), 1);
+}
+
+/**
+ * Disconnect given segments.
+ *
+ * This is used in a process for switch statements.
+ * If there is the "default" chunk before other cases, the order is different
+ * between node's and running's.
+ *
+ * @param {CodePathSegment[]} prevSegments - Forward segments to disconnect.
+ * @param {CodePathSegment[]} nextSegments - Backward segments to disconnect.
+ * @returns {void}
+ */
+function removeConnection(prevSegments, nextSegments) {
+ for (let i = 0; i < prevSegments.length; ++i) {
+ const prevSegment = prevSegments[i];
+ const nextSegment = nextSegments[i];
+
+ remove(prevSegment.nextSegments, nextSegment);
+ remove(prevSegment.allNextSegments, nextSegment);
+ remove(nextSegment.prevSegments, prevSegment);
+ remove(nextSegment.allPrevSegments, prevSegment);
+ }
+}
+
+/**
+ * Creates looping path.
+ *
+ * @param {CodePathState} state - The instance.
+ * @param {CodePathSegment[]} fromSegments - Segments which are source.
+ * @param {CodePathSegment[]} toSegments - Segments which are destination.
+ * @returns {void}
+ */
+function makeLooped(state, fromSegments, toSegments) {
+ fromSegments = CodePathSegment.flattenUnusedSegments(fromSegments);
+ toSegments = CodePathSegment.flattenUnusedSegments(toSegments);
+
+ const end = Math.min(fromSegments.length, toSegments.length);
+
+ for (let i = 0; i < end; ++i) {
+ const fromSegment = fromSegments[i];
+ const toSegment = toSegments[i];
+
+ if (toSegment.reachable) {
+ fromSegment.nextSegments.push(toSegment);
+ }
+ if (fromSegment.reachable) {
+ toSegment.prevSegments.push(fromSegment);
+ }
+ fromSegment.allNextSegments.push(toSegment);
+ toSegment.allPrevSegments.push(fromSegment);
+
+ if (toSegment.allPrevSegments.length >= 2) {
+ CodePathSegment.markPrevSegmentAsLooped(toSegment, fromSegment);
+ }
+
+ state.notifyLooped(fromSegment, toSegment);
+ }
+}
+
+/**
+ * Finalizes segments of `test` chunk of a ForStatement.
+ *
+ * - Adds `false` paths to paths which are leaving from the loop.
+ * - Sets `true` paths to paths which go to the body.
+ *
+ * @param {LoopContext} context - A loop context to modify.
+ * @param {ChoiceContext} choiceContext - A choice context of this loop.
+ * @param {CodePathSegment[]} head - The current head paths.
+ * @returns {void}
+ */
+function finalizeTestSegmentsOfFor(context, choiceContext, head) {
+ if (!choiceContext.processed) {
+ choiceContext.trueForkContext.add(head);
+ choiceContext.falseForkContext.add(head);
+ }
+
+ if (context.test !== true) {
+ context.brokenForkContext.addAll(choiceContext.falseForkContext);
+ }
+ context.endOfTestSegments = choiceContext.trueForkContext.makeNext(0, -1);
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+/**
+ * A class which manages state to analyze code paths.
+ */
+class CodePathState {
+
+ /**
+ * @param {IdGenerator} idGenerator - An id generator to generate id for code
+ * path segments.
+ * @param {Function} onLooped - A callback function to notify looping.
+ */
+ constructor(idGenerator, onLooped) {
+ this.idGenerator = idGenerator;
+ this.notifyLooped = onLooped;
+ this.forkContext = ForkContext.newRoot(idGenerator);
+ this.choiceContext = null;
+ this.switchContext = null;
+ this.tryContext = null;
+ this.loopContext = null;
+ this.breakContext = null;
+
+ this.currentSegments = [];
+ this.initialSegment = this.forkContext.head[0];
+
+ // returnedSegments and thrownSegments push elements into finalSegments also.
+ const final = this.finalSegments = [];
+ const returned = this.returnedForkContext = [];
+ const thrown = this.thrownForkContext = [];
+
+ returned.add = addToReturnedOrThrown.bind(null, returned, thrown, final);
+ thrown.add = addToReturnedOrThrown.bind(null, thrown, returned, final);
+ }
+
+ /**
+ * The head segments.
+ * @type {CodePathSegment[]}
+ */
+ get headSegments() {
+ return this.forkContext.head;
+ }
+
+ /**
+ * The parent forking context.
+ * This is used for the root of new forks.
+ * @type {ForkContext}
+ */
+ get parentForkContext() {
+ const current = this.forkContext;
+
+ return current && current.upper;
+ }
+
+ /**
+ * Creates and stacks new forking context.
+ *
+ * @param {boolean} forkLeavingPath - A flag which shows being in a
+ * "finally" block.
+ * @returns {ForkContext} The created context.
+ */
+ pushForkContext(forkLeavingPath) {
+ this.forkContext = ForkContext.newEmpty(
+ this.forkContext,
+ forkLeavingPath
+ );
+
+ return this.forkContext;
+ }
+
+ /**
+ * Pops and merges the last forking context.
+ * @returns {ForkContext} The last context.
+ */
+ popForkContext() {
+ const lastContext = this.forkContext;
+
+ this.forkContext = lastContext.upper;
+ this.forkContext.replaceHead(lastContext.makeNext(0, -1));
+
+ return lastContext;
+ }
+
+ /**
+ * Creates a new path.
+ * @returns {void}
+ */
+ forkPath() {
+ this.forkContext.add(this.parentForkContext.makeNext(-1, -1));
+ }
+
+ /**
+ * Creates a bypass path.
+ * This is used for such as IfStatement which does not have "else" chunk.
+ *
+ * @returns {void}
+ */
+ forkBypassPath() {
+ this.forkContext.add(this.parentForkContext.head);
+ }
+
+ //--------------------------------------------------------------------------
+ // ConditionalExpression, LogicalExpression, IfStatement
+ //--------------------------------------------------------------------------
+
+ /**
+ * Creates a context for ConditionalExpression, LogicalExpression,
+ * IfStatement, WhileStatement, DoWhileStatement, or ForStatement.
+ *
+ * LogicalExpressions have cases that it goes different paths between the
+ * `true` case and the `false` case.
+ *
+ * For Example:
+ *
+ * if (a || b) {
+ * foo();
+ * } else {
+ * bar();
+ * }
+ *
+ * In this case, `b` is evaluated always in the code path of the `else`
+ * block, but it's not so in the code path of the `if` block.
+ * So there are 3 paths.
+ *
+ * a -> foo();
+ * a -> b -> foo();
+ * a -> b -> bar();
+ *
+ * @param {string} kind - A kind string.
+ * If the new context is LogicalExpression's, this is `"&&"` or `"||"`.
+ * If it's IfStatement's or ConditionalExpression's, this is `"test"`.
+ * Otherwise, this is `"loop"`.
+ * @param {boolean} isForkingAsResult - A flag that shows that goes different
+ * paths between `true` and `false`.
+ * @returns {void}
+ */
+ pushChoiceContext(kind, isForkingAsResult) {
+ this.choiceContext = {
+ upper: this.choiceContext,
+ kind,
+ isForkingAsResult,
+ trueForkContext: ForkContext.newEmpty(this.forkContext),
+ falseForkContext: ForkContext.newEmpty(this.forkContext),
+ processed: false
+ };
+ }
+
+ /**
+ * Pops the last choice context and finalizes it.
+ *
+ * @returns {ChoiceContext} The popped context.
+ */
+ popChoiceContext() {
+ const context = this.choiceContext;
+
+ this.choiceContext = context.upper;
+
+ const forkContext = this.forkContext;
+ const headSegments = forkContext.head;
+
+ switch (context.kind) {
+ case "&&":
+ case "||":
+
+ /*
+ * If any result were not transferred from child contexts,
+ * this sets the head segments to both cases.
+ * The head segments are the path of the right-hand operand.
+ */
+ if (!context.processed) {
+ context.trueForkContext.add(headSegments);
+ context.falseForkContext.add(headSegments);
+ }
+
+ /*
+ * Transfers results to upper context if this context is in
+ * test chunk.
+ */
+ if (context.isForkingAsResult) {
+ const parentContext = this.choiceContext;
+
+ parentContext.trueForkContext.addAll(context.trueForkContext);
+ parentContext.falseForkContext.addAll(context.falseForkContext);
+ parentContext.processed = true;
+
+ return context;
+ }
+
+ break;
+
+ case "test":
+ if (!context.processed) {
+
+ /*
+ * The head segments are the path of the `if` block here.
+ * Updates the `true` path with the end of the `if` block.
+ */
+ context.trueForkContext.clear();
+ context.trueForkContext.add(headSegments);
+ } else {
+
+ /*
+ * The head segments are the path of the `else` block here.
+ * Updates the `false` path with the end of the `else`
+ * block.
+ */
+ context.falseForkContext.clear();
+ context.falseForkContext.add(headSegments);
+ }
+
+ break;
+
+ case "loop":
+
+ /*
+ * Loops are addressed in popLoopContext().
+ * This is called from popLoopContext().
+ */
+ return context;
+
+ /* istanbul ignore next */
+ default:
+ throw new Error("unreachable");
+ }
+
+ // Merges all paths.
+ const prevForkContext = context.trueForkContext;
+
+ prevForkContext.addAll(context.falseForkContext);
+ forkContext.replaceHead(prevForkContext.makeNext(0, -1));
+
+ return context;
+ }
+
+ /**
+ * Makes a code path segment of the right-hand operand of a logical
+ * expression.
+ *
+ * @returns {void}
+ */
+ makeLogicalRight() {
+ const context = this.choiceContext;
+ const forkContext = this.forkContext;
+
+ if (context.processed) {
+
+ /*
+ * This got segments already from the child choice context.
+ * Creates the next path from own true/false fork context.
+ */
+ const prevForkContext =
+ context.kind === "&&" ? context.trueForkContext
+ /* kind === "||" */ : context.falseForkContext;
+
+ forkContext.replaceHead(prevForkContext.makeNext(0, -1));
+ prevForkContext.clear();
+
+ context.processed = false;
+ } else {
+
+ /*
+ * This did not get segments from the child choice context.
+ * So addresses the head segments.
+ * The head segments are the path of the left-hand operand.
+ */
+ if (context.kind === "&&") {
+
+ // The path does short-circuit if false.
+ context.falseForkContext.add(forkContext.head);
+ } else {
+
+ // The path does short-circuit if true.
+ context.trueForkContext.add(forkContext.head);
+ }
+
+ forkContext.replaceHead(forkContext.makeNext(-1, -1));
+ }
+ }
+
+ /**
+ * Makes a code path segment of the `if` block.
+ *
+ * @returns {void}
+ */
+ makeIfConsequent() {
+ const context = this.choiceContext;
+ const forkContext = this.forkContext;
+
+ /*
+ * If any result were not transferred from child contexts,
+ * this sets the head segments to both cases.
+ * The head segments are the path of the test expression.
+ */
+ if (!context.processed) {
+ context.trueForkContext.add(forkContext.head);
+ context.falseForkContext.add(forkContext.head);
+ }
+
+ context.processed = false;
+
+ // Creates new path from the `true` case.
+ forkContext.replaceHead(
+ context.trueForkContext.makeNext(0, -1)
+ );
+ }
+
+ /**
+ * Makes a code path segment of the `else` block.
+ *
+ * @returns {void}
+ */
+ makeIfAlternate() {
+ const context = this.choiceContext;
+ const forkContext = this.forkContext;
+
+ /*
+ * The head segments are the path of the `if` block.
+ * Updates the `true` path with the end of the `if` block.
+ */
+ context.trueForkContext.clear();
+ context.trueForkContext.add(forkContext.head);
+ context.processed = true;
+
+ // Creates new path from the `false` case.
+ forkContext.replaceHead(
+ context.falseForkContext.makeNext(0, -1)
+ );
+ }
+
+ //--------------------------------------------------------------------------
+ // SwitchStatement
+ //--------------------------------------------------------------------------
+
+ /**
+ * Creates a context object of SwitchStatement and stacks it.
+ *
+ * @param {boolean} hasCase - `true` if the switch statement has one or more
+ * case parts.
+ * @param {string|null} label - The label text.
+ * @returns {void}
+ */
+ pushSwitchContext(hasCase, label) {
+ this.switchContext = {
+ upper: this.switchContext,
+ hasCase,
+ defaultSegments: null,
+ defaultBodySegments: null,
+ foundDefault: false,
+ lastIsDefault: false,
+ countForks: 0
+ };
+
+ this.pushBreakContext(true, label);
+ }
+
+ /**
+ * Pops the last context of SwitchStatement and finalizes it.
+ *
+ * - Disposes all forking stack for `case` and `default`.
+ * - Creates the next code path segment from `context.brokenForkContext`.
+ * - If the last `SwitchCase` node is not a `default` part, creates a path
+ * to the `default` body.
+ *
+ * @returns {void}
+ */
+ popSwitchContext() {
+ const context = this.switchContext;
+
+ this.switchContext = context.upper;
+
+ const forkContext = this.forkContext;
+ const brokenForkContext = this.popBreakContext().brokenForkContext;
+
+ if (context.countForks === 0) {
+
+ /*
+ * When there is only one `default` chunk and there is one or more
+ * `break` statements, even if forks are nothing, it needs to merge
+ * those.
+ */
+ if (!brokenForkContext.empty) {
+ brokenForkContext.add(forkContext.makeNext(-1, -1));
+ forkContext.replaceHead(brokenForkContext.makeNext(0, -1));
+ }
+
+ return;
+ }
+
+ const lastSegments = forkContext.head;
+
+ this.forkBypassPath();
+ const lastCaseSegments = forkContext.head;
+
+ /*
+ * `brokenForkContext` is used to make the next segment.
+ * It must add the last segment into `brokenForkContext`.
+ */
+ brokenForkContext.add(lastSegments);
+
+ /*
+ * A path which is failed in all case test should be connected to path
+ * of `default` chunk.
+ */
+ if (!context.lastIsDefault) {
+ if (context.defaultBodySegments) {
+
+ /*
+ * Remove a link from `default` label to its chunk.
+ * It's false route.
+ */
+ removeConnection(context.defaultSegments, context.defaultBodySegments);
+ makeLooped(this, lastCaseSegments, context.defaultBodySegments);
+ } else {
+
+ /*
+ * It handles the last case body as broken if `default` chunk
+ * does not exist.
+ */
+ brokenForkContext.add(lastCaseSegments);
+ }
+ }
+
+ // Pops the segment context stack until the entry segment.
+ for (let i = 0; i < context.countForks; ++i) {
+ this.forkContext = this.forkContext.upper;
+ }
+
+ /*
+ * Creates a path from all brokenForkContext paths.
+ * This is a path after switch statement.
+ */
+ this.forkContext.replaceHead(brokenForkContext.makeNext(0, -1));
+ }
+
+ /**
+ * Makes a code path segment for a `SwitchCase` node.
+ *
+ * @param {boolean} isEmpty - `true` if the body is empty.
+ * @param {boolean} isDefault - `true` if the body is the default case.
+ * @returns {void}
+ */
+ makeSwitchCaseBody(isEmpty, isDefault) {
+ const context = this.switchContext;
+
+ if (!context.hasCase) {
+ return;
+ }
+
+ /*
+ * Merge forks.
+ * The parent fork context has two segments.
+ * Those are from the current case and the body of the previous case.
+ */
+ const parentForkContext = this.forkContext;
+ const forkContext = this.pushForkContext();
+
+ forkContext.add(parentForkContext.makeNext(0, -1));
+
+ /*
+ * Save `default` chunk info.
+ * If the `default` label is not at the last, we must make a path from
+ * the last `case` to the `default` chunk.
+ */
+ if (isDefault) {
+ context.defaultSegments = parentForkContext.head;
+ if (isEmpty) {
+ context.foundDefault = true;
+ } else {
+ context.defaultBodySegments = forkContext.head;
+ }
+ } else {
+ if (!isEmpty && context.foundDefault) {
+ context.foundDefault = false;
+ context.defaultBodySegments = forkContext.head;
+ }
+ }
+
+ context.lastIsDefault = isDefault;
+ context.countForks += 1;
+ }
+
+ //--------------------------------------------------------------------------
+ // TryStatement
+ //--------------------------------------------------------------------------
+
+ /**
+ * Creates a context object of TryStatement and stacks it.
+ *
+ * @param {boolean} hasFinalizer - `true` if the try statement has a
+ * `finally` block.
+ * @returns {void}
+ */
+ pushTryContext(hasFinalizer) {
+ this.tryContext = {
+ upper: this.tryContext,
+ position: "try",
+ hasFinalizer,
+
+ returnedForkContext: hasFinalizer
+ ? ForkContext.newEmpty(this.forkContext)
+ : null,
+
+ thrownForkContext: ForkContext.newEmpty(this.forkContext),
+ lastOfTryIsReachable: false,
+ lastOfCatchIsReachable: false
+ };
+ }
+
+ /**
+ * Pops the last context of TryStatement and finalizes it.
+ *
+ * @returns {void}
+ */
+ popTryContext() {
+ const context = this.tryContext;
+
+ this.tryContext = context.upper;
+
+ if (context.position === "catch") {
+
+ // Merges two paths from the `try` block and `catch` block merely.
+ this.popForkContext();
+ return;
+ }
+
+ /*
+ * The following process is executed only when there is the `finally`
+ * block.
+ */
+
+ const returned = context.returnedForkContext;
+ const thrown = context.thrownForkContext;
+
+ if (returned.empty && thrown.empty) {
+ return;
+ }
+
+ // Separate head to normal paths and leaving paths.
+ const headSegments = this.forkContext.head;
+
+ this.forkContext = this.forkContext.upper;
+ const normalSegments = headSegments.slice(0, headSegments.length / 2 | 0);
+ const leavingSegments = headSegments.slice(headSegments.length / 2 | 0);
+
+ // Forwards the leaving path to upper contexts.
+ if (!returned.empty) {
+ getReturnContext(this).returnedForkContext.add(leavingSegments);
+ }
+ if (!thrown.empty) {
+ getThrowContext(this).thrownForkContext.add(leavingSegments);
+ }
+
+ // Sets the normal path as the next.
+ this.forkContext.replaceHead(normalSegments);
+
+ /*
+ * If both paths of the `try` block and the `catch` block are
+ * unreachable, the next path becomes unreachable as well.
+ */
+ if (!context.lastOfTryIsReachable && !context.lastOfCatchIsReachable) {
+ this.forkContext.makeUnreachable();
+ }
+ }
+
+ /**
+ * Makes a code path segment for a `catch` block.
+ *
+ * @returns {void}
+ */
+ makeCatchBlock() {
+ const context = this.tryContext;
+ const forkContext = this.forkContext;
+ const thrown = context.thrownForkContext;
+
+ // Update state.
+ context.position = "catch";
+ context.thrownForkContext = ForkContext.newEmpty(forkContext);
+ context.lastOfTryIsReachable = forkContext.reachable;
+
+ // Merge thrown paths.
+ thrown.add(forkContext.head);
+ const thrownSegments = thrown.makeNext(0, -1);
+
+ // Fork to a bypass and the merged thrown path.
+ this.pushForkContext();
+ this.forkBypassPath();
+ this.forkContext.add(thrownSegments);
+ }
+
+ /**
+ * Makes a code path segment for a `finally` block.
+ *
+ * In the `finally` block, parallel paths are created. The parallel paths
+ * are used as leaving-paths. The leaving-paths are paths from `return`
+ * statements and `throw` statements in a `try` block or a `catch` block.
+ *
+ * @returns {void}
+ */
+ makeFinallyBlock() {
+ const context = this.tryContext;
+ let forkContext = this.forkContext;
+ const returned = context.returnedForkContext;
+ const thrown = context.thrownForkContext;
+ const headOfLeavingSegments = forkContext.head;
+
+ // Update state.
+ if (context.position === "catch") {
+
+ // Merges two paths from the `try` block and `catch` block.
+ this.popForkContext();
+ forkContext = this.forkContext;
+
+ context.lastOfCatchIsReachable = forkContext.reachable;
+ } else {
+ context.lastOfTryIsReachable = forkContext.reachable;
+ }
+ context.position = "finally";
+
+ if (returned.empty && thrown.empty) {
+
+ // This path does not leave.
+ return;
+ }
+
+ /*
+ * Create a parallel segment from merging returned and thrown.
+ * This segment will leave at the end of this finally block.
+ */
+ const segments = forkContext.makeNext(-1, -1);
+
+ for (let i = 0; i < forkContext.count; ++i) {
+ const prevSegsOfLeavingSegment = [headOfLeavingSegments[i]];
+
+ for (let j = 0; j < returned.segmentsList.length; ++j) {
+ prevSegsOfLeavingSegment.push(returned.segmentsList[j][i]);
+ }
+ for (let j = 0; j < thrown.segmentsList.length; ++j) {
+ prevSegsOfLeavingSegment.push(thrown.segmentsList[j][i]);
+ }
+
+ segments.push(
+ CodePathSegment.newNext(
+ this.idGenerator.next(),
+ prevSegsOfLeavingSegment
+ )
+ );
+ }
+
+ this.pushForkContext(true);
+ this.forkContext.add(segments);
+ }
+
+ /**
+ * Makes a code path segment from the first throwable node to the `catch`
+ * block or the `finally` block.
+ *
+ * @returns {void}
+ */
+ makeFirstThrowablePathInTryBlock() {
+ const forkContext = this.forkContext;
+
+ if (!forkContext.reachable) {
+ return;
+ }
+
+ const context = getThrowContext(this);
+
+ if (context === this ||
+ context.position !== "try" ||
+ !context.thrownForkContext.empty
+ ) {
+ return;
+ }
+
+ context.thrownForkContext.add(forkContext.head);
+ forkContext.replaceHead(forkContext.makeNext(-1, -1));
+ }
+
+ //--------------------------------------------------------------------------
+ // Loop Statements
+ //--------------------------------------------------------------------------
+
+ /**
+ * Creates a context object of a loop statement and stacks it.
+ *
+ * @param {string} type - The type of the node which was triggered. One of
+ * `WhileStatement`, `DoWhileStatement`, `ForStatement`, `ForInStatement`,
+ * and `ForStatement`.
+ * @param {string|null} label - A label of the node which was triggered.
+ * @returns {void}
+ */
+ pushLoopContext(type, label) {
+ const forkContext = this.forkContext;
+ const breakContext = this.pushBreakContext(true, label);
+
+ switch (type) {
+ case "WhileStatement":
+ this.pushChoiceContext("loop", false);
+ this.loopContext = {
+ upper: this.loopContext,
+ type,
+ label,
+ test: void 0,
+ continueDestSegments: null,
+ brokenForkContext: breakContext.brokenForkContext
+ };
+ break;
+
+ case "DoWhileStatement":
+ this.pushChoiceContext("loop", false);
+ this.loopContext = {
+ upper: this.loopContext,
+ type,
+ label,
+ test: void 0,
+ entrySegments: null,
+ continueForkContext: ForkContext.newEmpty(forkContext),
+ brokenForkContext: breakContext.brokenForkContext
+ };
+ break;
+
+ case "ForStatement":
+ this.pushChoiceContext("loop", false);
+ this.loopContext = {
+ upper: this.loopContext,
+ type,
+ label,
+ test: void 0,
+ endOfInitSegments: null,
+ testSegments: null,
+ endOfTestSegments: null,
+ updateSegments: null,
+ endOfUpdateSegments: null,
+ continueDestSegments: null,
+ brokenForkContext: breakContext.brokenForkContext
+ };
+ break;
+
+ case "ForInStatement":
+ case "ForOfStatement":
+ this.loopContext = {
+ upper: this.loopContext,
+ type,
+ label,
+ prevSegments: null,
+ leftSegments: null,
+ endOfLeftSegments: null,
+ continueDestSegments: null,
+ brokenForkContext: breakContext.brokenForkContext
+ };
+ break;
+
+ /* istanbul ignore next */
+ default:
+ throw new Error(`unknown type: "${type}"`);
+ }
+ }
+
+ /**
+ * Pops the last context of a loop statement and finalizes it.
+ *
+ * @returns {void}
+ */
+ popLoopContext() {
+ const context = this.loopContext;
+
+ this.loopContext = context.upper;
+
+ const forkContext = this.forkContext;
+ const brokenForkContext = this.popBreakContext().brokenForkContext;
+
+ // Creates a looped path.
+ switch (context.type) {
+ case "WhileStatement":
+ case "ForStatement":
+ this.popChoiceContext();
+ makeLooped(
+ this,
+ forkContext.head,
+ context.continueDestSegments
+ );
+ break;
+
+ case "DoWhileStatement": {
+ const choiceContext = this.popChoiceContext();
+
+ if (!choiceContext.processed) {
+ choiceContext.trueForkContext.add(forkContext.head);
+ choiceContext.falseForkContext.add(forkContext.head);
+ }
+ if (context.test !== true) {
+ brokenForkContext.addAll(choiceContext.falseForkContext);
+ }
+
+ // `true` paths go to looping.
+ const segmentsList = choiceContext.trueForkContext.segmentsList;
+
+ for (let i = 0; i < segmentsList.length; ++i) {
+ makeLooped(
+ this,
+ segmentsList[i],
+ context.entrySegments
+ );
+ }
+ break;
+ }
+
+ case "ForInStatement":
+ case "ForOfStatement":
+ brokenForkContext.add(forkContext.head);
+ makeLooped(
+ this,
+ forkContext.head,
+ context.leftSegments
+ );
+ break;
+
+ /* istanbul ignore next */
+ default:
+ throw new Error("unreachable");
+ }
+
+ // Go next.
+ if (brokenForkContext.empty) {
+ forkContext.replaceHead(forkContext.makeUnreachable(-1, -1));
+ } else {
+ forkContext.replaceHead(brokenForkContext.makeNext(0, -1));
+ }
+ }
+
+ /**
+ * Makes a code path segment for the test part of a WhileStatement.
+ *
+ * @param {boolean|undefined} test - The test value (only when constant).
+ * @returns {void}
+ */
+ makeWhileTest(test) {
+ const context = this.loopContext;
+ const forkContext = this.forkContext;
+ const testSegments = forkContext.makeNext(0, -1);
+
+ // Update state.
+ context.test = test;
+ context.continueDestSegments = testSegments;
+ forkContext.replaceHead(testSegments);
+ }
+
+ /**
+ * Makes a code path segment for the body part of a WhileStatement.
+ *
+ * @returns {void}
+ */
+ makeWhileBody() {
+ const context = this.loopContext;
+ const choiceContext = this.choiceContext;
+ const forkContext = this.forkContext;
+
+ if (!choiceContext.processed) {
+ choiceContext.trueForkContext.add(forkContext.head);
+ choiceContext.falseForkContext.add(forkContext.head);
+ }
+
+ // Update state.
+ if (context.test !== true) {
+ context.brokenForkContext.addAll(choiceContext.falseForkContext);
+ }
+ forkContext.replaceHead(choiceContext.trueForkContext.makeNext(0, -1));
+ }
+
+ /**
+ * Makes a code path segment for the body part of a DoWhileStatement.
+ *
+ * @returns {void}
+ */
+ makeDoWhileBody() {
+ const context = this.loopContext;
+ const forkContext = this.forkContext;
+ const bodySegments = forkContext.makeNext(-1, -1);
+
+ // Update state.
+ context.entrySegments = bodySegments;
+ forkContext.replaceHead(bodySegments);
+ }
+
+ /**
+ * Makes a code path segment for the test part of a DoWhileStatement.
+ *
+ * @param {boolean|undefined} test - The test value (only when constant).
+ * @returns {void}
+ */
+ makeDoWhileTest(test) {
+ const context = this.loopContext;
+ const forkContext = this.forkContext;
+
+ context.test = test;
+
+ // Creates paths of `continue` statements.
+ if (!context.continueForkContext.empty) {
+ context.continueForkContext.add(forkContext.head);
+ const testSegments = context.continueForkContext.makeNext(0, -1);
+
+ forkContext.replaceHead(testSegments);
+ }
+ }
+
+ /**
+ * Makes a code path segment for the test part of a ForStatement.
+ *
+ * @param {boolean|undefined} test - The test value (only when constant).
+ * @returns {void}
+ */
+ makeForTest(test) {
+ const context = this.loopContext;
+ const forkContext = this.forkContext;
+ const endOfInitSegments = forkContext.head;
+ const testSegments = forkContext.makeNext(-1, -1);
+
+ // Update state.
+ context.test = test;
+ context.endOfInitSegments = endOfInitSegments;
+ context.continueDestSegments = context.testSegments = testSegments;
+ forkContext.replaceHead(testSegments);
+ }
+
+ /**
+ * Makes a code path segment for the update part of a ForStatement.
+ *
+ * @returns {void}
+ */
+ makeForUpdate() {
+ const context = this.loopContext;
+ const choiceContext = this.choiceContext;
+ const forkContext = this.forkContext;
+
+ // Make the next paths of the test.
+ if (context.testSegments) {
+ finalizeTestSegmentsOfFor(
+ context,
+ choiceContext,
+ forkContext.head
+ );
+ } else {
+ context.endOfInitSegments = forkContext.head;
+ }
+
+ // Update state.
+ const updateSegments = forkContext.makeDisconnected(-1, -1);
+
+ context.continueDestSegments = context.updateSegments = updateSegments;
+ forkContext.replaceHead(updateSegments);
+ }
+
+ /**
+ * Makes a code path segment for the body part of a ForStatement.
+ *
+ * @returns {void}
+ */
+ makeForBody() {
+ const context = this.loopContext;
+ const choiceContext = this.choiceContext;
+ const forkContext = this.forkContext;
+
+ // Update state.
+ if (context.updateSegments) {
+ context.endOfUpdateSegments = forkContext.head;
+
+ // `update` -> `test`
+ if (context.testSegments) {
+ makeLooped(
+ this,
+ context.endOfUpdateSegments,
+ context.testSegments
+ );
+ }
+ } else if (context.testSegments) {
+ finalizeTestSegmentsOfFor(
+ context,
+ choiceContext,
+ forkContext.head
+ );
+ } else {
+ context.endOfInitSegments = forkContext.head;
+ }
+
+ let bodySegments = context.endOfTestSegments;
+
+ if (!bodySegments) {
+
+ /*
+ * If there is not the `test` part, the `body` path comes from the
+ * `init` part and the `update` part.
+ */
+ const prevForkContext = ForkContext.newEmpty(forkContext);
+
+ prevForkContext.add(context.endOfInitSegments);
+ if (context.endOfUpdateSegments) {
+ prevForkContext.add(context.endOfUpdateSegments);
+ }
+
+ bodySegments = prevForkContext.makeNext(0, -1);
+ }
+ context.continueDestSegments = context.continueDestSegments || bodySegments;
+ forkContext.replaceHead(bodySegments);
+ }
+
+ /**
+ * Makes a code path segment for the left part of a ForInStatement and a
+ * ForOfStatement.
+ *
+ * @returns {void}
+ */
+ makeForInOfLeft() {
+ const context = this.loopContext;
+ const forkContext = this.forkContext;
+ const leftSegments = forkContext.makeDisconnected(-1, -1);
+
+ // Update state.
+ context.prevSegments = forkContext.head;
+ context.leftSegments = context.continueDestSegments = leftSegments;
+ forkContext.replaceHead(leftSegments);
+ }
+
+ /**
+ * Makes a code path segment for the right part of a ForInStatement and a
+ * ForOfStatement.
+ *
+ * @returns {void}
+ */
+ makeForInOfRight() {
+ const context = this.loopContext;
+ const forkContext = this.forkContext;
+ const temp = ForkContext.newEmpty(forkContext);
+
+ temp.add(context.prevSegments);
+ const rightSegments = temp.makeNext(-1, -1);
+
+ // Update state.
+ context.endOfLeftSegments = forkContext.head;
+ forkContext.replaceHead(rightSegments);
+ }
+
+ /**
+ * Makes a code path segment for the body part of a ForInStatement and a
+ * ForOfStatement.
+ *
+ * @returns {void}
+ */
+ makeForInOfBody() {
+ const context = this.loopContext;
+ const forkContext = this.forkContext;
+ const temp = ForkContext.newEmpty(forkContext);
+
+ temp.add(context.endOfLeftSegments);
+ const bodySegments = temp.makeNext(-1, -1);
+
+ // Make a path: `right` -> `left`.
+ makeLooped(this, forkContext.head, context.leftSegments);
+
+ // Update state.
+ context.brokenForkContext.add(forkContext.head);
+ forkContext.replaceHead(bodySegments);
+ }
+
+ //--------------------------------------------------------------------------
+ // Control Statements
+ //--------------------------------------------------------------------------
+
+ /**
+ * Creates new context for BreakStatement.
+ *
+ * @param {boolean} breakable - The flag to indicate it can break by
+ * an unlabeled BreakStatement.
+ * @param {string|null} label - The label of this context.
+ * @returns {Object} The new context.
+ */
+ pushBreakContext(breakable, label) {
+ this.breakContext = {
+ upper: this.breakContext,
+ breakable,
+ label,
+ brokenForkContext: ForkContext.newEmpty(this.forkContext)
+ };
+ return this.breakContext;
+ }
+
+ /**
+ * Removes the top item of the break context stack.
+ *
+ * @returns {Object} The removed context.
+ */
+ popBreakContext() {
+ const context = this.breakContext;
+ const forkContext = this.forkContext;
+
+ this.breakContext = context.upper;
+
+ // Process this context here for other than switches and loops.
+ if (!context.breakable) {
+ const brokenForkContext = context.brokenForkContext;
+
+ if (!brokenForkContext.empty) {
+ brokenForkContext.add(forkContext.head);
+ forkContext.replaceHead(brokenForkContext.makeNext(0, -1));
+ }
+ }
+
+ return context;
+ }
+
+ /**
+ * Makes a path for a `break` statement.
+ *
+ * It registers the head segment to a context of `break`.
+ * It makes new unreachable segment, then it set the head with the segment.
+ *
+ * @param {string} label - A label of the break statement.
+ * @returns {void}
+ */
+ makeBreak(label) {
+ const forkContext = this.forkContext;
+
+ if (!forkContext.reachable) {
+ return;
+ }
+
+ const context = getBreakContext(this, label);
+
+ /* istanbul ignore else: foolproof (syntax error) */
+ if (context) {
+ context.brokenForkContext.add(forkContext.head);
+ }
+
+ forkContext.replaceHead(forkContext.makeUnreachable(-1, -1));
+ }
+
+ /**
+ * Makes a path for a `continue` statement.
+ *
+ * It makes a looping path.
+ * It makes new unreachable segment, then it set the head with the segment.
+ *
+ * @param {string} label - A label of the continue statement.
+ * @returns {void}
+ */
+ makeContinue(label) {
+ const forkContext = this.forkContext;
+
+ if (!forkContext.reachable) {
+ return;
+ }
+
+ const context = getContinueContext(this, label);
+
+ /* istanbul ignore else: foolproof (syntax error) */
+ if (context) {
+ if (context.continueDestSegments) {
+ makeLooped(this, forkContext.head, context.continueDestSegments);
+
+ // If the context is a for-in/of loop, this effects a break also.
+ if (context.type === "ForInStatement" ||
+ context.type === "ForOfStatement"
+ ) {
+ context.brokenForkContext.add(forkContext.head);
+ }
+ } else {
+ context.continueForkContext.add(forkContext.head);
+ }
+ }
+ forkContext.replaceHead(forkContext.makeUnreachable(-1, -1));
+ }
+
+ /**
+ * Makes a path for a `return` statement.
+ *
+ * It registers the head segment to a context of `return`.
+ * It makes new unreachable segment, then it set the head with the segment.
+ *
+ * @returns {void}
+ */
+ makeReturn() {
+ const forkContext = this.forkContext;
+
+ if (forkContext.reachable) {
+ getReturnContext(this).returnedForkContext.add(forkContext.head);
+ forkContext.replaceHead(forkContext.makeUnreachable(-1, -1));
+ }
+ }
+
+ /**
+ * Makes a path for a `throw` statement.
+ *
+ * It registers the head segment to a context of `throw`.
+ * It makes new unreachable segment, then it set the head with the segment.
+ *
+ * @returns {void}
+ */
+ makeThrow() {
+ const forkContext = this.forkContext;
+
+ if (forkContext.reachable) {
+ getThrowContext(this).thrownForkContext.add(forkContext.head);
+ forkContext.replaceHead(forkContext.makeUnreachable(-1, -1));
+ }
+ }
+
+ /**
+ * Makes the final path.
+ * @returns {void}
+ */
+ makeFinal() {
+ const segments = this.currentSegments;
+
+ if (segments.length > 0 && segments[0].reachable) {
+ this.returnedForkContext.add(segments);
+ }
+ }
+}
+
+module.exports = CodePathState;
diff --git a/tools/node_modules/eslint/lib/code-path-analysis/code-path.js b/tools/node_modules/eslint/lib/code-path-analysis/code-path.js
new file mode 100644
index 0000000000..709a111189
--- /dev/null
+++ b/tools/node_modules/eslint/lib/code-path-analysis/code-path.js
@@ -0,0 +1,234 @@
+/**
+ * @fileoverview A class of the code path.
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const CodePathState = require("./code-path-state");
+const IdGenerator = require("./id-generator");
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+/**
+ * A code path.
+ */
+class CodePath {
+
+ /**
+ * @param {string} id - An identifier.
+ * @param {CodePath|null} upper - The code path of the upper function scope.
+ * @param {Function} onLooped - A callback function to notify looping.
+ */
+ constructor(id, upper, onLooped) {
+
+ /**
+ * The identifier of this code path.
+ * Rules use it to store additional information of each rule.
+ * @type {string}
+ */
+ this.id = id;
+
+ /**
+ * The code path of the upper function scope.
+ * @type {CodePath|null}
+ */
+ this.upper = upper;
+
+ /**
+ * The code paths of nested function scopes.
+ * @type {CodePath[]}
+ */
+ this.childCodePaths = [];
+
+ // Initializes internal state.
+ Object.defineProperty(
+ this,
+ "internal",
+ { value: new CodePathState(new IdGenerator(`${id}_`), onLooped) }
+ );
+
+ // Adds this into `childCodePaths` of `upper`.
+ if (upper) {
+ upper.childCodePaths.push(this);
+ }
+ }
+
+ /**
+ * Gets the state of a given code path.
+ *
+ * @param {CodePath} codePath - A code path to get.
+ * @returns {CodePathState} The state of the code path.
+ */
+ static getState(codePath) {
+ return codePath.internal;
+ }
+
+ /**
+ * The initial code path segment.
+ * @type {CodePathSegment}
+ */
+ get initialSegment() {
+ return this.internal.initialSegment;
+ }
+
+ /**
+ * Final code path segments.
+ * This array is a mix of `returnedSegments` and `thrownSegments`.
+ * @type {CodePathSegment[]}
+ */
+ get finalSegments() {
+ return this.internal.finalSegments;
+ }
+
+ /**
+ * Final code path segments which is with `return` statements.
+ * This array contains the last path segment if it's reachable.
+ * Since the reachable last path returns `undefined`.
+ * @type {CodePathSegment[]}
+ */
+ get returnedSegments() {
+ return this.internal.returnedForkContext;
+ }
+
+ /**
+ * Final code path segments which is with `throw` statements.
+ * @type {CodePathSegment[]}
+ */
+ get thrownSegments() {
+ return this.internal.thrownForkContext;
+ }
+
+ /**
+ * Current code path segments.
+ * @type {CodePathSegment[]}
+ */
+ get currentSegments() {
+ return this.internal.currentSegments;
+ }
+
+ /**
+ * Traverses all segments in this code path.
+ *
+ * codePath.traverseSegments(function(segment, controller) {
+ * // do something.
+ * });
+ *
+ * This method enumerates segments in order from the head.
+ *
+ * The `controller` object has two methods.
+ *
+ * - `controller.skip()` - Skip the following segments in this branch.
+ * - `controller.break()` - Skip all following segments.
+ *
+ * @param {Object} [options] - Omittable.
+ * @param {CodePathSegment} [options.first] - The first segment to traverse.
+ * @param {CodePathSegment} [options.last] - The last segment to traverse.
+ * @param {Function} callback - A callback function.
+ * @returns {void}
+ */
+ traverseSegments(options, callback) {
+ if (typeof options === "function") {
+ callback = options;
+ options = null;
+ }
+
+ options = options || {};
+ const startSegment = options.first || this.internal.initialSegment;
+ const lastSegment = options.last;
+
+ let item = null;
+ let index = 0;
+ let end = 0;
+ let segment = null;
+ const visited = Object.create(null);
+ const stack = [[startSegment, 0]];
+ let skippedSegment = null;
+ let broken = false;
+ const controller = {
+ skip() {
+ if (stack.length <= 1) {
+ broken = true;
+ } else {
+ skippedSegment = stack[stack.length - 2][0];
+ }
+ },
+ break() {
+ broken = true;
+ }
+ };
+
+ /**
+ * Checks a given previous segment has been visited.
+ * @param {CodePathSegment} prevSegment - A previous segment to check.
+ * @returns {boolean} `true` if the segment has been visited.
+ */
+ function isVisited(prevSegment) {
+ return (
+ visited[prevSegment.id] ||
+ segment.isLoopedPrevSegment(prevSegment)
+ );
+ }
+
+ while (stack.length > 0) {
+ item = stack[stack.length - 1];
+ segment = item[0];
+ index = item[1];
+
+ if (index === 0) {
+
+ // Skip if this segment has been visited already.
+ if (visited[segment.id]) {
+ stack.pop();
+ continue;
+ }
+
+ // Skip if all previous segments have not been visited.
+ if (segment !== startSegment &&
+ segment.prevSegments.length > 0 &&
+ !segment.prevSegments.every(isVisited)
+ ) {
+ stack.pop();
+ continue;
+ }
+
+ // Reset the flag of skipping if all branches have been skipped.
+ if (skippedSegment && segment.prevSegments.indexOf(skippedSegment) !== -1) {
+ skippedSegment = null;
+ }
+ visited[segment.id] = true;
+
+ // Call the callback when the first time.
+ if (!skippedSegment) {
+ callback.call(this, segment, controller);
+ if (segment === lastSegment) {
+ controller.skip();
+ }
+ if (broken) {
+ break;
+ }
+ }
+ }
+
+ // Update the stack.
+ end = segment.nextSegments.length - 1;
+ if (index < end) {
+ item[1] += 1;
+ stack.push([segment.nextSegments[index], 0]);
+ } else if (index === end) {
+ item[0] = segment.nextSegments[index];
+ item[1] = 0;
+ } else {
+ stack.pop();
+ }
+ }
+ }
+}
+
+module.exports = CodePath;
diff --git a/tools/node_modules/eslint/lib/code-path-analysis/debug-helpers.js b/tools/node_modules/eslint/lib/code-path-analysis/debug-helpers.js
new file mode 100644
index 0000000000..9af985ce85
--- /dev/null
+++ b/tools/node_modules/eslint/lib/code-path-analysis/debug-helpers.js
@@ -0,0 +1,200 @@
+/**
+ * @fileoverview Helpers to debug for code path analysis.
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const debug = require("debug")("eslint:code-path");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Gets id of a given segment.
+ * @param {CodePathSegment} segment - A segment to get.
+ * @returns {string} Id of the segment.
+ */
+/* istanbul ignore next */
+function getId(segment) { // eslint-disable-line require-jsdoc
+ return segment.id + (segment.reachable ? "" : "!");
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+module.exports = {
+
+ /**
+ * A flag that debug dumping is enabled or not.
+ * @type {boolean}
+ */
+ enabled: debug.enabled,
+
+ /**
+ * Dumps given objects.
+ *
+ * @param {...any} args - objects to dump.
+ * @returns {void}
+ */
+ dump: debug,
+
+ /**
+ * Dumps the current analyzing state.
+ *
+ * @param {ASTNode} node - A node to dump.
+ * @param {CodePathState} state - A state to dump.
+ * @param {boolean} leaving - A flag whether or not it's leaving
+ * @returns {void}
+ */
+ dumpState: !debug.enabled ? debug : /* istanbul ignore next */ function(node, state, leaving) {
+ for (let i = 0; i < state.currentSegments.length; ++i) {
+ const segInternal = state.currentSegments[i].internal;
+
+ if (leaving) {
+ segInternal.exitNodes.push(node);
+ } else {
+ segInternal.nodes.push(node);
+ }
+ }
+
+ debug([
+ `${state.currentSegments.map(getId).join(",")})`,
+ `${node.type}${leaving ? ":exit" : ""}`
+ ].join(" "));
+ },
+
+ /**
+ * Dumps a DOT code of a given code path.
+ * The DOT code can be visialized with Graphvis.
+ *
+ * @param {CodePath} codePath - A code path to dump.
+ * @returns {void}
+ * @see http://www.graphviz.org
+ * @see http://www.webgraphviz.com
+ */
+ dumpDot: !debug.enabled ? debug : /* istanbul ignore next */ function(codePath) {
+ let text =
+ "\n" +
+ "digraph {\n" +
+ "node[shape=box,style=\"rounded,filled\",fillcolor=white];\n" +
+ "initial[label=\"\",shape=circle,style=filled,fillcolor=black,width=0.25,height=0.25];\n";
+
+ if (codePath.returnedSegments.length > 0) {
+ text += "final[label=\"\",shape=doublecircle,style=filled,fillcolor=black,width=0.25,height=0.25];\n";
+ }
+ if (codePath.thrownSegments.length > 0) {
+ text += "thrown[label=\"✘\",shape=circle,width=0.3,height=0.3,fixedsize];\n";
+ }
+
+ const traceMap = Object.create(null);
+ const arrows = this.makeDotArrows(codePath, traceMap);
+
+ for (const id in traceMap) { // eslint-disable-line guard-for-in
+ const segment = traceMap[id];
+
+ text += `${id}[`;
+
+ if (segment.reachable) {
+ text += "label=\"";
+ } else {
+ text += "style=\"rounded,dashed,filled\",fillcolor=\"#FF9800\",label=\"<<unreachable>>\\n";
+ }
+
+ if (segment.internal.nodes.length > 0 || segment.internal.exitNodes.length > 0) {
+ text += [].concat(
+ segment.internal.nodes.map(node => {
+ switch (node.type) {
+ case "Identifier": return `${node.type} (${node.name})`;
+ case "Literal": return `${node.type} (${node.value})`;
+ default: return node.type;
+ }
+ }),
+ segment.internal.exitNodes.map(node => {
+ switch (node.type) {
+ case "Identifier": return `${node.type}:exit (${node.name})`;
+ case "Literal": return `${node.type}:exit (${node.value})`;
+ default: return `${node.type}:exit`;
+ }
+ })
+ ).join("\\n");
+ } else {
+ text += "????";
+ }
+
+ text += "\"];\n";
+ }
+
+ text += `${arrows}\n`;
+ text += "}";
+ debug("DOT", text);
+ },
+
+ /**
+ * Makes a DOT code of a given code path.
+ * The DOT code can be visialized with Graphvis.
+ *
+ * @param {CodePath} codePath - A code path to make DOT.
+ * @param {Object} traceMap - Optional. A map to check whether or not segments had been done.
+ * @returns {string} A DOT code of the code path.
+ */
+ makeDotArrows(codePath, traceMap) {
+ const stack = [[codePath.initialSegment, 0]];
+ const done = traceMap || Object.create(null);
+ let lastId = codePath.initialSegment.id;
+ let text = `initial->${codePath.initialSegment.id}`;
+
+ while (stack.length > 0) {
+ const item = stack.pop();
+ const segment = item[0];
+ const index = item[1];
+
+ if (done[segment.id] && index === 0) {
+ continue;
+ }
+ done[segment.id] = segment;
+
+ const nextSegment = segment.allNextSegments[index];
+
+ if (!nextSegment) {
+ continue;
+ }
+
+ if (lastId === segment.id) {
+ text += `->${nextSegment.id}`;
+ } else {
+ text += `;\n${segment.id}->${nextSegment.id}`;
+ }
+ lastId = nextSegment.id;
+
+ stack.unshift([segment, 1 + index]);
+ stack.push([nextSegment, 0]);
+ }
+
+ codePath.returnedSegments.forEach(finalSegment => {
+ if (lastId === finalSegment.id) {
+ text += "->final";
+ } else {
+ text += `;\n${finalSegment.id}->final`;
+ }
+ lastId = null;
+ });
+
+ codePath.thrownSegments.forEach(finalSegment => {
+ if (lastId === finalSegment.id) {
+ text += "->thrown";
+ } else {
+ text += `;\n${finalSegment.id}->thrown`;
+ }
+ lastId = null;
+ });
+
+ return `${text};`;
+ }
+};
diff --git a/tools/node_modules/eslint/lib/code-path-analysis/fork-context.js b/tools/node_modules/eslint/lib/code-path-analysis/fork-context.js
new file mode 100644
index 0000000000..4fae6bbb1e
--- /dev/null
+++ b/tools/node_modules/eslint/lib/code-path-analysis/fork-context.js
@@ -0,0 +1,262 @@
+/**
+ * @fileoverview A class to operate forking.
+ *
+ * This is state of forking.
+ * This has a fork list and manages it.
+ *
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const assert = require("assert"),
+ CodePathSegment = require("./code-path-segment");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Gets whether or not a given segment is reachable.
+ *
+ * @param {CodePathSegment} segment - A segment to get.
+ * @returns {boolean} `true` if the segment is reachable.
+ */
+function isReachable(segment) {
+ return segment.reachable;
+}
+
+/**
+ * Creates new segments from the specific range of `context.segmentsList`.
+ *
+ * When `context.segmentsList` is `[[a, b], [c, d], [e, f]]`, `begin` is `0`, and
+ * `end` is `-1`, this creates `[g, h]`. This `g` is from `a`, `c`, and `e`.
+ * This `h` is from `b`, `d`, and `f`.
+ *
+ * @param {ForkContext} context - An instance.
+ * @param {number} begin - The first index of the previous segments.
+ * @param {number} end - The last index of the previous segments.
+ * @param {Function} create - A factory function of new segments.
+ * @returns {CodePathSegment[]} New segments.
+ */
+function makeSegments(context, begin, end, create) {
+ const list = context.segmentsList;
+
+ if (begin < 0) {
+ begin = list.length + begin;
+ }
+ if (end < 0) {
+ end = list.length + end;
+ }
+
+ const segments = [];
+
+ for (let i = 0; i < context.count; ++i) {
+ const allPrevSegments = [];
+
+ for (let j = begin; j <= end; ++j) {
+ allPrevSegments.push(list[j][i]);
+ }
+
+ segments.push(create(context.idGenerator.next(), allPrevSegments));
+ }
+
+ return segments;
+}
+
+/**
+ * `segments` becomes doubly in a `finally` block. Then if a code path exits by a
+ * control statement (such as `break`, `continue`) from the `finally` block, the
+ * destination's segments may be half of the source segments. In that case, this
+ * merges segments.
+ *
+ * @param {ForkContext} context - An instance.
+ * @param {CodePathSegment[]} segments - Segments to merge.
+ * @returns {CodePathSegment[]} The merged segments.
+ */
+function mergeExtraSegments(context, segments) {
+ while (segments.length > context.count) {
+ const merged = [];
+
+ for (let i = 0, length = segments.length / 2 | 0; i < length; ++i) {
+ merged.push(CodePathSegment.newNext(
+ context.idGenerator.next(),
+ [segments[i], segments[i + length]]
+ ));
+ }
+ segments = merged;
+ }
+ return segments;
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+/**
+ * A class to manage forking.
+ */
+class ForkContext {
+
+ /**
+ * @param {IdGenerator} idGenerator - An identifier generator for segments.
+ * @param {ForkContext|null} upper - An upper fork context.
+ * @param {number} count - A number of parallel segments.
+ */
+ constructor(idGenerator, upper, count) {
+ this.idGenerator = idGenerator;
+ this.upper = upper;
+ this.count = count;
+ this.segmentsList = [];
+ }
+
+ /**
+ * The head segments.
+ * @type {CodePathSegment[]}
+ */
+ get head() {
+ const list = this.segmentsList;
+
+ return list.length === 0 ? [] : list[list.length - 1];
+ }
+
+ /**
+ * A flag which shows empty.
+ * @type {boolean}
+ */
+ get empty() {
+ return this.segmentsList.length === 0;
+ }
+
+ /**
+ * A flag which shows reachable.
+ * @type {boolean}
+ */
+ get reachable() {
+ const segments = this.head;
+
+ return segments.length > 0 && segments.some(isReachable);
+ }
+
+ /**
+ * Creates new segments from this context.
+ *
+ * @param {number} begin - The first index of previous segments.
+ * @param {number} end - The last index of previous segments.
+ * @returns {CodePathSegment[]} New segments.
+ */
+ makeNext(begin, end) {
+ return makeSegments(this, begin, end, CodePathSegment.newNext);
+ }
+
+ /**
+ * Creates new segments from this context.
+ * The new segments is always unreachable.
+ *
+ * @param {number} begin - The first index of previous segments.
+ * @param {number} end - The last index of previous segments.
+ * @returns {CodePathSegment[]} New segments.
+ */
+ makeUnreachable(begin, end) {
+ return makeSegments(this, begin, end, CodePathSegment.newUnreachable);
+ }
+
+ /**
+ * Creates new segments from this context.
+ * The new segments don't have connections for previous segments.
+ * But these inherit the reachable flag from this context.
+ *
+ * @param {number} begin - The first index of previous segments.
+ * @param {number} end - The last index of previous segments.
+ * @returns {CodePathSegment[]} New segments.
+ */
+ makeDisconnected(begin, end) {
+ return makeSegments(this, begin, end, CodePathSegment.newDisconnected);
+ }
+
+ /**
+ * Adds segments into this context.
+ * The added segments become the head.
+ *
+ * @param {CodePathSegment[]} segments - Segments to add.
+ * @returns {void}
+ */
+ add(segments) {
+ assert(segments.length >= this.count, `${segments.length} >= ${this.count}`);
+
+ this.segmentsList.push(mergeExtraSegments(this, segments));
+ }
+
+ /**
+ * Replaces the head segments with given segments.
+ * The current head segments are removed.
+ *
+ * @param {CodePathSegment[]} segments - Segments to add.
+ * @returns {void}
+ */
+ replaceHead(segments) {
+ assert(segments.length >= this.count, `${segments.length} >= ${this.count}`);
+
+ this.segmentsList.splice(-1, 1, mergeExtraSegments(this, segments));
+ }
+
+ /**
+ * Adds all segments of a given fork context into this context.
+ *
+ * @param {ForkContext} context - A fork context to add.
+ * @returns {void}
+ */
+ addAll(context) {
+ assert(context.count === this.count);
+
+ const source = context.segmentsList;
+
+ for (let i = 0; i < source.length; ++i) {
+ this.segmentsList.push(source[i]);
+ }
+ }
+
+ /**
+ * Clears all secments in this context.
+ *
+ * @returns {void}
+ */
+ clear() {
+ this.segmentsList = [];
+ }
+
+ /**
+ * Creates the root fork context.
+ *
+ * @param {IdGenerator} idGenerator - An identifier generator for segments.
+ * @returns {ForkContext} New fork context.
+ */
+ static newRoot(idGenerator) {
+ const context = new ForkContext(idGenerator, null, 1);
+
+ context.add([CodePathSegment.newRoot(idGenerator.next())]);
+
+ return context;
+ }
+
+ /**
+ * Creates an empty fork context preceded by a given context.
+ *
+ * @param {ForkContext} parentContext - The parent fork context.
+ * @param {boolean} forkLeavingPath - A flag which shows inside of `finally` block.
+ * @returns {ForkContext} New fork context.
+ */
+ static newEmpty(parentContext, forkLeavingPath) {
+ return new ForkContext(
+ parentContext.idGenerator,
+ parentContext,
+ (forkLeavingPath ? 2 : 1) * parentContext.count
+ );
+ }
+}
+
+module.exports = ForkContext;
diff --git a/tools/node_modules/eslint/lib/code-path-analysis/id-generator.js b/tools/node_modules/eslint/lib/code-path-analysis/id-generator.js
new file mode 100644
index 0000000000..062058ddc1
--- /dev/null
+++ b/tools/node_modules/eslint/lib/code-path-analysis/id-generator.js
@@ -0,0 +1,46 @@
+/**
+ * @fileoverview A class of identifiers generator for code path segments.
+ *
+ * Each rule uses the identifier of code path segments to store additional
+ * information of the code path.
+ *
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+/**
+ * A generator for unique ids.
+ */
+class IdGenerator {
+
+ /**
+ * @param {string} prefix - Optional. A prefix of generated ids.
+ */
+ constructor(prefix) {
+ this.prefix = String(prefix);
+ this.n = 0;
+ }
+
+ /**
+ * Generates id.
+ *
+ * @returns {string} A generated id.
+ */
+ next() {
+ this.n = 1 + this.n | 0;
+
+ /* istanbul ignore if */
+ if (this.n < 0) {
+ this.n = 1;
+ }
+
+ return this.prefix + this.n;
+ }
+}
+
+module.exports = IdGenerator;
diff --git a/tools/node_modules/eslint/lib/config.js b/tools/node_modules/eslint/lib/config.js
new file mode 100644
index 0000000000..b66b9f41e0
--- /dev/null
+++ b/tools/node_modules/eslint/lib/config.js
@@ -0,0 +1,365 @@
+/**
+ * @fileoverview Responsible for loading config files
+ * @author Seth McLaughlin
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const path = require("path"),
+ os = require("os"),
+ ConfigOps = require("./config/config-ops"),
+ ConfigFile = require("./config/config-file"),
+ ConfigCache = require("./config/config-cache"),
+ Plugins = require("./config/plugins"),
+ FileFinder = require("./file-finder"),
+ isResolvable = require("is-resolvable");
+
+const debug = require("debug")("eslint:config");
+
+//------------------------------------------------------------------------------
+// Constants
+//------------------------------------------------------------------------------
+
+const PERSONAL_CONFIG_DIR = os.homedir();
+const SUBCONFIG_SEP = ":";
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Determines if any rules were explicitly passed in as options.
+ * @param {Object} options The options used to create our configuration.
+ * @returns {boolean} True if rules were passed in as options, false otherwise.
+ * @private
+ */
+function hasRules(options) {
+ return options.rules && Object.keys(options.rules).length > 0;
+}
+
+//------------------------------------------------------------------------------
+// API
+//------------------------------------------------------------------------------
+
+/**
+ * Configuration class
+ */
+class Config {
+
+ /**
+ * @param {Object} options Options to be passed in
+ * @param {Linter} linterContext Linter instance object
+ */
+ constructor(options, linterContext) {
+ options = options || {};
+
+ this.linterContext = linterContext;
+ this.plugins = new Plugins(linterContext.environments, linterContext.rules);
+
+ this.options = options;
+ this.ignore = options.ignore;
+ this.ignorePath = options.ignorePath;
+ this.parser = options.parser;
+ this.parserOptions = options.parserOptions || {};
+
+ this.configCache = new ConfigCache();
+
+ this.baseConfig = options.baseConfig
+ ? ConfigOps.merge({}, ConfigFile.loadObject(options.baseConfig, this))
+ : { rules: {} };
+ this.baseConfig.filePath = "";
+ this.baseConfig.baseDirectory = this.options.cwd;
+
+ this.configCache.setConfig(this.baseConfig.filePath, this.baseConfig);
+ this.configCache.setMergedVectorConfig(this.baseConfig.filePath, this.baseConfig);
+
+ this.useEslintrc = (options.useEslintrc !== false);
+
+ this.env = (options.envs || []).reduce((envs, name) => {
+ envs[name] = true;
+ return envs;
+ }, {});
+
+ /*
+ * Handle declared globals.
+ * For global variable foo, handle "foo:false" and "foo:true" to set
+ * whether global is writable.
+ * If user declares "foo", convert to "foo:false".
+ */
+ this.globals = (options.globals || []).reduce((globals, def) => {
+ const parts = def.split(SUBCONFIG_SEP);
+
+ globals[parts[0]] = (parts.length > 1 && parts[1] === "true");
+
+ return globals;
+ }, {});
+
+ this.loadSpecificConfig(options.configFile);
+
+ // Empty values in configs don't merge properly
+ const cliConfigOptions = {
+ env: this.env,
+ rules: this.options.rules,
+ globals: this.globals,
+ parserOptions: this.parserOptions,
+ plugins: this.options.plugins
+ };
+
+ this.cliConfig = {};
+ Object.keys(cliConfigOptions).forEach(configKey => {
+ const value = cliConfigOptions[configKey];
+
+ if (value) {
+ this.cliConfig[configKey] = value;
+ }
+ });
+ }
+
+ /**
+ * Loads the config options from a config specified on the command line.
+ * @param {string} [config] A shareable named config or path to a config file.
+ * @returns {void}
+ */
+ loadSpecificConfig(config) {
+ if (config) {
+ debug(`Using command line config ${config}`);
+ const isNamedConfig =
+ isResolvable(config) ||
+ isResolvable(`eslint-config-${config}`) ||
+ config.charAt(0) === "@";
+
+ if (!isNamedConfig) {
+ config = path.resolve(this.options.cwd, config);
+ }
+
+ this.specificConfig = ConfigFile.load(config, this);
+ }
+ }
+
+ /**
+ * Gets the personal config object from user's home directory.
+ * @returns {Object} the personal config object (null if there is no personal config)
+ * @private
+ */
+ getPersonalConfig() {
+ if (typeof this.personalConfig === "undefined") {
+ let config;
+ const filename = ConfigFile.getFilenameForDirectory(PERSONAL_CONFIG_DIR);
+
+ if (filename) {
+ debug("Using personal config");
+ config = ConfigFile.load(filename, this);
+ }
+
+ this.personalConfig = config || null;
+ }
+
+ return this.personalConfig;
+ }
+
+ /**
+ * Builds a hierarchy of config objects, including the base config, all local configs from the directory tree,
+ * and a config file specified on the command line, if applicable.
+ * @param {string} directory a file in whose directory we start looking for a local config
+ * @returns {Object[]} The config objects, in ascending order of precedence
+ * @private
+ */
+ getConfigHierarchy(directory) {
+ debug(`Constructing config file hierarchy for ${directory}`);
+
+ // Step 1: Always include baseConfig
+ let configs = [this.baseConfig];
+
+ // Step 2: Add user-specified config from .eslintrc.* and package.json files
+ if (this.useEslintrc) {
+ debug("Using .eslintrc and package.json files");
+ configs = configs.concat(this.getLocalConfigHierarchy(directory));
+ } else {
+ debug("Not using .eslintrc or package.json files");
+ }
+
+ // Step 3: Merge in command line config file
+ if (this.specificConfig) {
+ debug("Using command line config file");
+ configs.push(this.specificConfig);
+ }
+
+ return configs;
+ }
+
+ /**
+ * Gets a list of config objects extracted from local config files that apply to the current directory, in
+ * descending order, beginning with the config that is highest in the directory tree.
+ * @param {string} directory The directory to start looking in for local config files.
+ * @returns {Object[]} The shallow local config objects, in ascending order of precedence (closest to the current
+ * directory at the end), or an empty array if there are no local configs.
+ * @private
+ */
+ getLocalConfigHierarchy(directory) {
+ const localConfigFiles = this.findLocalConfigFiles(directory),
+ projectConfigPath = ConfigFile.getFilenameForDirectory(this.options.cwd),
+ searched = [],
+ configs = [];
+
+ for (const localConfigFile of localConfigFiles) {
+ const localConfigDirectory = path.dirname(localConfigFile);
+ const localConfigHierarchyCache = this.configCache.getHierarchyLocalConfigs(localConfigDirectory);
+
+ if (localConfigHierarchyCache) {
+ const localConfigHierarchy = localConfigHierarchyCache.concat(configs.reverse());
+
+ this.configCache.setHierarchyLocalConfigs(searched, localConfigHierarchy);
+ return localConfigHierarchy;
+ }
+
+ /*
+ * Don't consider the personal config file in the home directory,
+ * except if the home directory is the same as the current working directory
+ */
+ if (localConfigDirectory === PERSONAL_CONFIG_DIR && localConfigFile !== projectConfigPath) {
+ continue;
+ }
+
+ debug(`Loading ${localConfigFile}`);
+ const localConfig = ConfigFile.load(localConfigFile, this);
+
+ // Ignore empty config files
+ if (!localConfig) {
+ continue;
+ }
+
+ debug(`Using ${localConfigFile}`);
+ configs.push(localConfig);
+ searched.push(localConfigDirectory);
+
+ // Stop traversing if a config is found with the root flag set
+ if (localConfig.root) {
+ break;
+ }
+ }
+
+ if (!configs.length && !this.specificConfig) {
+
+ // Fall back on the personal config from ~/.eslintrc
+ debug("Using personal config file");
+ const personalConfig = this.getPersonalConfig();
+
+ if (personalConfig) {
+ configs.push(personalConfig);
+ } else if (!hasRules(this.options) && !this.options.baseConfig) {
+
+ // No config file, no manual configuration, and no rules, so error.
+ const noConfigError = new Error("No ESLint configuration found.");
+
+ noConfigError.messageTemplate = "no-config-found";
+ noConfigError.messageData = {
+ directory,
+ filesExamined: localConfigFiles
+ };
+
+ throw noConfigError;
+ }
+ }
+
+ // Set the caches for the parent directories
+ this.configCache.setHierarchyLocalConfigs(searched, configs.reverse());
+
+ return configs;
+ }
+
+ /**
+ * Gets the vector of applicable configs and subconfigs from the hierarchy for a given file. A vector is an array of
+ * entries, each of which in an object specifying a config file path and an array of override indices corresponding
+ * to entries in the config file's overrides section whose glob patterns match the specified file path; e.g., the
+ * vector entry { configFile: '/home/john/app/.eslintrc', matchingOverrides: [0, 2] } would indicate that the main
+ * project .eslintrc file and its first and third override blocks apply to the current file.
+ * @param {string} filePath The file path for which to build the hierarchy and config vector.
+ * @returns {Array<Object>} config vector applicable to the specified path
+ * @private
+ */
+ getConfigVector(filePath) {
+ const directory = filePath ? path.dirname(filePath) : this.options.cwd;
+
+ return this.getConfigHierarchy(directory).map(config => {
+ const vectorEntry = {
+ filePath: config.filePath,
+ matchingOverrides: []
+ };
+
+ if (config.overrides) {
+ const relativePath = path.relative(config.baseDirectory, filePath || directory);
+
+ config.overrides.forEach((override, i) => {
+ if (ConfigOps.pathMatchesGlobs(relativePath, override.files, override.excludedFiles)) {
+ vectorEntry.matchingOverrides.push(i);
+ }
+ });
+ }
+
+ return vectorEntry;
+ });
+ }
+
+ /**
+ * Finds local config files from the specified directory and its parent directories.
+ * @param {string} directory The directory to start searching from.
+ * @returns {GeneratorFunction} The paths of local config files found.
+ */
+ findLocalConfigFiles(directory) {
+ if (!this.localConfigFinder) {
+ this.localConfigFinder = new FileFinder(ConfigFile.CONFIG_FILES, this.options.cwd);
+ }
+
+ return this.localConfigFinder.findAllInDirectoryAndParents(directory);
+ }
+
+ /**
+ * Builds the authoritative config object for the specified file path by merging the hierarchy of config objects
+ * that apply to the current file, including the base config (conf/eslint-recommended), the user's personal config
+ * from their homedir, all local configs from the directory tree, any specific config file passed on the command
+ * line, any configuration overrides set directly on the command line, and finally the environment configs
+ * (conf/environments).
+ * @param {string} filePath a file in whose directory we start looking for a local config
+ * @returns {Object} config object
+ */
+ getConfig(filePath) {
+ const vector = this.getConfigVector(filePath);
+ let config = this.configCache.getMergedConfig(vector);
+
+ if (config) {
+ debug("Using config from cache");
+ return config;
+ }
+
+ // Step 1: Merge in the filesystem configurations (base, local, and personal)
+ config = ConfigOps.getConfigFromVector(vector, this.configCache);
+
+ // Step 2: Merge in command line configurations
+ config = ConfigOps.merge(config, this.cliConfig);
+
+ if (this.cliConfig.plugins) {
+ this.plugins.loadAll(this.cliConfig.plugins);
+ }
+
+ /*
+ * Step 3: Override parser only if it is passed explicitly through the command line
+ * or if it's not defined yet (because the final object will at least have the parser key)
+ */
+ if (this.parser || !config.parser) {
+ config = ConfigOps.merge(config, { parser: this.parser });
+ }
+
+ // Step 4: Apply environments to the config
+ config = ConfigOps.applyEnvironments(config, this.linterContext.environments);
+
+ this.configCache.setMergedConfig(vector, config);
+
+ return config;
+ }
+}
+
+module.exports = Config;
diff --git a/tools/node_modules/eslint/lib/config/autoconfig.js b/tools/node_modules/eslint/lib/config/autoconfig.js
new file mode 100644
index 0000000000..8536fdc55a
--- /dev/null
+++ b/tools/node_modules/eslint/lib/config/autoconfig.js
@@ -0,0 +1,359 @@
+/**
+ * @fileoverview Used for creating a suggested configuration based on project code.
+ * @author Ian VanSchooten
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const lodash = require("lodash"),
+ Linter = require("../linter"),
+ configRule = require("./config-rule"),
+ ConfigOps = require("./config-ops"),
+ recConfig = require("../../conf/eslint-recommended");
+
+const debug = require("debug")("eslint:autoconfig");
+const linter = new Linter();
+
+//------------------------------------------------------------------------------
+// Data
+//------------------------------------------------------------------------------
+
+const MAX_CONFIG_COMBINATIONS = 17, // 16 combinations + 1 for severity only
+ RECOMMENDED_CONFIG_NAME = "eslint:recommended";
+
+//------------------------------------------------------------------------------
+// Private
+//------------------------------------------------------------------------------
+
+/**
+ * Information about a rule configuration, in the context of a Registry.
+ *
+ * @typedef {Object} registryItem
+ * @param {ruleConfig} config A valid configuration for the rule
+ * @param {number} specificity The number of elements in the ruleConfig array
+ * @param {number} errorCount The number of errors encountered when linting with the config
+ */
+
+/**
+ * This callback is used to measure execution status in a progress bar
+ * @callback progressCallback
+ * @param {number} The total number of times the callback will be called.
+ */
+
+/**
+ * Create registryItems for rules
+ * @param {rulesConfig} rulesConfig Hash of rule names and arrays of ruleConfig items
+ * @returns {Object} registryItems for each rule in provided rulesConfig
+ */
+function makeRegistryItems(rulesConfig) {
+ return Object.keys(rulesConfig).reduce((accumulator, ruleId) => {
+ accumulator[ruleId] = rulesConfig[ruleId].map(config => ({
+ config,
+ specificity: config.length || 1,
+ errorCount: void 0
+ }));
+ return accumulator;
+ }, {});
+}
+
+/**
+ * Creates an object in which to store rule configs and error counts
+ *
+ * Unless a rulesConfig is provided at construction, the registry will not contain
+ * any rules, only methods. This will be useful for building up registries manually.
+ *
+ * Registry class
+ */
+class Registry {
+
+ /**
+ * @param {rulesConfig} [rulesConfig] Hash of rule names and arrays of possible configurations
+ */
+ constructor(rulesConfig) {
+ this.rules = (rulesConfig) ? makeRegistryItems(rulesConfig) : {};
+ }
+
+ /**
+ * Populate the registry with core rule configs.
+ *
+ * It will set the registry's `rule` property to an object having rule names
+ * as keys and an array of registryItems as values.
+ *
+ * @returns {void}
+ */
+ populateFromCoreRules() {
+ const rulesConfig = configRule.createCoreRuleConfigs();
+
+ this.rules = makeRegistryItems(rulesConfig);
+ }
+
+ /**
+ * Creates sets of rule configurations which can be used for linting
+ * and initializes registry errors to zero for those configurations (side effect).
+ *
+ * This combines as many rules together as possible, such that the first sets
+ * in the array will have the highest number of rules configured, and later sets
+ * will have fewer and fewer, as not all rules have the same number of possible
+ * configurations.
+ *
+ * The length of the returned array will be <= MAX_CONFIG_COMBINATIONS.
+ *
+ * @param {Object} registry The autoconfig registry
+ * @returns {Object[]} "rules" configurations to use for linting
+ */
+ buildRuleSets() {
+ let idx = 0;
+ const ruleIds = Object.keys(this.rules),
+ ruleSets = [];
+
+ /**
+ * Add a rule configuration from the registry to the ruleSets
+ *
+ * This is broken out into its own function so that it doesn't need to be
+ * created inside of the while loop.
+ *
+ * @param {string} rule The ruleId to add.
+ * @returns {void}
+ */
+ const addRuleToRuleSet = function(rule) {
+
+ /*
+ * This check ensures that there is a rule configuration and that
+ * it has fewer than the max combinations allowed.
+ * If it has too many configs, we will only use the most basic of
+ * the possible configurations.
+ */
+ const hasFewCombos = (this.rules[rule].length <= MAX_CONFIG_COMBINATIONS);
+
+ if (this.rules[rule][idx] && (hasFewCombos || this.rules[rule][idx].specificity <= 2)) {
+
+ /*
+ * If the rule has too many possible combinations, only take
+ * simple ones, avoiding objects.
+ */
+ if (!hasFewCombos && typeof this.rules[rule][idx].config[1] === "object") {
+ return;
+ }
+
+ ruleSets[idx] = ruleSets[idx] || {};
+ ruleSets[idx][rule] = this.rules[rule][idx].config;
+
+ /*
+ * Initialize errorCount to zero, since this is a config which
+ * will be linted.
+ */
+ this.rules[rule][idx].errorCount = 0;
+ }
+ }.bind(this);
+
+ while (ruleSets.length === idx) {
+ ruleIds.forEach(addRuleToRuleSet);
+ idx += 1;
+ }
+
+ return ruleSets;
+ }
+
+ /**
+ * Remove all items from the registry with a non-zero number of errors
+ *
+ * Note: this also removes rule configurations which were not linted
+ * (meaning, they have an undefined errorCount).
+ *
+ * @returns {void}
+ */
+ stripFailingConfigs() {
+ const ruleIds = Object.keys(this.rules),
+ newRegistry = new Registry();
+
+ newRegistry.rules = Object.assign({}, this.rules);
+ ruleIds.forEach(ruleId => {
+ const errorFreeItems = newRegistry.rules[ruleId].filter(registryItem => (registryItem.errorCount === 0));
+
+ if (errorFreeItems.length > 0) {
+ newRegistry.rules[ruleId] = errorFreeItems;
+ } else {
+ delete newRegistry.rules[ruleId];
+ }
+ });
+
+ return newRegistry;
+ }
+
+ /**
+ * Removes rule configurations which were not included in a ruleSet
+ *
+ * @returns {void}
+ */
+ stripExtraConfigs() {
+ const ruleIds = Object.keys(this.rules),
+ newRegistry = new Registry();
+
+ newRegistry.rules = Object.assign({}, this.rules);
+ ruleIds.forEach(ruleId => {
+ newRegistry.rules[ruleId] = newRegistry.rules[ruleId].filter(registryItem => (typeof registryItem.errorCount !== "undefined"));
+ });
+
+ return newRegistry;
+ }
+
+ /**
+ * Creates a registry of rules which had no error-free configs.
+ * The new registry is intended to be analyzed to determine whether its rules
+ * should be disabled or set to warning.
+ *
+ * @returns {Registry} A registry of failing rules.
+ */
+ getFailingRulesRegistry() {
+ const ruleIds = Object.keys(this.rules),
+ failingRegistry = new Registry();
+
+ ruleIds.forEach(ruleId => {
+ const failingConfigs = this.rules[ruleId].filter(registryItem => (registryItem.errorCount > 0));
+
+ if (failingConfigs && failingConfigs.length === this.rules[ruleId].length) {
+ failingRegistry.rules[ruleId] = failingConfigs;
+ }
+ });
+
+ return failingRegistry;
+ }
+
+ /**
+ * Create an eslint config for any rules which only have one configuration
+ * in the registry.
+ *
+ * @returns {Object} An eslint config with rules section populated
+ */
+ createConfig() {
+ const ruleIds = Object.keys(this.rules),
+ config = { rules: {} };
+
+ ruleIds.forEach(ruleId => {
+ if (this.rules[ruleId].length === 1) {
+ config.rules[ruleId] = this.rules[ruleId][0].config;
+ }
+ });
+
+ return config;
+ }
+
+ /**
+ * Return a cloned registry containing only configs with a desired specificity
+ *
+ * @param {number} specificity Only keep configs with this specificity
+ * @returns {Registry} A registry of rules
+ */
+ filterBySpecificity(specificity) {
+ const ruleIds = Object.keys(this.rules),
+ newRegistry = new Registry();
+
+ newRegistry.rules = Object.assign({}, this.rules);
+ ruleIds.forEach(ruleId => {
+ newRegistry.rules[ruleId] = this.rules[ruleId].filter(registryItem => (registryItem.specificity === specificity));
+ });
+
+ return newRegistry;
+ }
+
+ /**
+ * Lint SourceCodes against all configurations in the registry, and record results
+ *
+ * @param {Object[]} sourceCodes SourceCode objects for each filename
+ * @param {Object} config ESLint config object
+ * @param {progressCallback} [cb] Optional callback for reporting execution status
+ * @returns {Registry} New registry with errorCount populated
+ */
+ lintSourceCode(sourceCodes, config, cb) {
+ let lintedRegistry = new Registry();
+
+ lintedRegistry.rules = Object.assign({}, this.rules);
+
+ const ruleSets = lintedRegistry.buildRuleSets();
+
+ lintedRegistry = lintedRegistry.stripExtraConfigs();
+
+ debug("Linting with all possible rule combinations");
+
+ const filenames = Object.keys(sourceCodes);
+ const totalFilesLinting = filenames.length * ruleSets.length;
+
+ filenames.forEach(filename => {
+ debug(`Linting file: ${filename}`);
+
+ let ruleSetIdx = 0;
+
+ ruleSets.forEach(ruleSet => {
+ const lintConfig = Object.assign({}, config, { rules: ruleSet });
+ const lintResults = linter.verify(sourceCodes[filename], lintConfig);
+
+ lintResults.forEach(result => {
+
+ /*
+ * It is possible that the error is from a configuration comment
+ * in a linted file, in which case there may not be a config
+ * set in this ruleSetIdx.
+ * (https://github.com/eslint/eslint/issues/5992)
+ * (https://github.com/eslint/eslint/issues/7860)
+ */
+ if (
+ lintedRegistry.rules[result.ruleId] &&
+ lintedRegistry.rules[result.ruleId][ruleSetIdx]
+ ) {
+ lintedRegistry.rules[result.ruleId][ruleSetIdx].errorCount += 1;
+ }
+ });
+
+ ruleSetIdx += 1;
+
+ if (cb) {
+ cb(totalFilesLinting); // eslint-disable-line callback-return
+ }
+ });
+
+ // Deallocate for GC
+ sourceCodes[filename] = null;
+ });
+
+ return lintedRegistry;
+ }
+}
+
+/**
+ * Extract rule configuration into eslint:recommended where possible.
+ *
+ * This will return a new config with `"extends": "eslint:recommended"` and
+ * only the rules which have configurations different from the recommended config.
+ *
+ * @param {Object} config config object
+ * @returns {Object} config object using `"extends": "eslint:recommended"`
+ */
+function extendFromRecommended(config) {
+ const newConfig = Object.assign({}, config);
+
+ ConfigOps.normalizeToStrings(newConfig);
+
+ const recRules = Object.keys(recConfig.rules).filter(ruleId => ConfigOps.isErrorSeverity(recConfig.rules[ruleId]));
+
+ recRules.forEach(ruleId => {
+ if (lodash.isEqual(recConfig.rules[ruleId], newConfig.rules[ruleId])) {
+ delete newConfig.rules[ruleId];
+ }
+ });
+ newConfig.extends = RECOMMENDED_CONFIG_NAME;
+ return newConfig;
+}
+
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+module.exports = {
+ Registry,
+ extendFromRecommended
+};
diff --git a/tools/node_modules/eslint/lib/config/config-cache.js b/tools/node_modules/eslint/lib/config/config-cache.js
new file mode 100644
index 0000000000..07436a87c8
--- /dev/null
+++ b/tools/node_modules/eslint/lib/config/config-cache.js
@@ -0,0 +1,130 @@
+/**
+ * @fileoverview Responsible for caching config files
+ * @author Sylvan Mably
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Get a string hash for a config vector
+ * @param {Array<Object>} vector config vector to hash
+ * @returns {string} hash of the vector values
+ * @private
+ */
+function hash(vector) {
+ return JSON.stringify(vector);
+}
+
+//------------------------------------------------------------------------------
+// API
+//------------------------------------------------------------------------------
+
+/**
+ * Configuration caching class
+ */
+module.exports = class ConfigCache {
+
+ constructor() {
+ this.configFullNameCache = new Map();
+ this.localHierarchyCache = new Map();
+ this.mergedVectorCache = new Map();
+ this.mergedCache = new Map();
+ }
+
+ /**
+ * Gets a config object from the cache for the specified config file path.
+ * @param {string} configFullName the name of the configuration as used in the eslint config(e.g. 'plugin:node/recommended'),
+ * or the absolute path to a config file. This should uniquely identify a config.
+ * @returns {Object|null} config object, if found in the cache, otherwise null
+ * @private
+ */
+ getConfig(configFullName) {
+ return this.configFullNameCache.get(configFullName);
+ }
+
+ /**
+ * Sets a config object in the cache for the specified config file path.
+ * @param {string} configFullName the name of the configuration as used in the eslint config(e.g. 'plugin:node/recommended'),
+ * or the absolute path to a config file. This should uniquely identify a config.
+ * @param {Object} config the config object to add to the cache
+ * @returns {void}
+ * @private
+ */
+ setConfig(configFullName, config) {
+ this.configFullNameCache.set(configFullName, config);
+ }
+
+ /**
+ * Gets a list of hierarchy-local config objects that apply to the specified directory.
+ * @param {string} directory the path to the directory
+ * @returns {Object[]|null} a list of config objects, if found in the cache, otherwise null
+ * @private
+ */
+ getHierarchyLocalConfigs(directory) {
+ return this.localHierarchyCache.get(directory);
+ }
+
+ /**
+ * For each of the supplied parent directories, sets the list of config objects for that directory to the
+ * appropriate subset of the supplied parent config objects.
+ * @param {string[]} parentDirectories a list of parent directories to add to the config cache
+ * @param {Object[]} parentConfigs a list of config objects that apply to the lowest directory in parentDirectories
+ * @returns {void}
+ * @private
+ */
+ setHierarchyLocalConfigs(parentDirectories, parentConfigs) {
+ parentDirectories.forEach((localConfigDirectory, i) => {
+ const directoryParentConfigs = parentConfigs.slice(0, parentConfigs.length - i);
+
+ this.localHierarchyCache.set(localConfigDirectory, directoryParentConfigs);
+ });
+ }
+
+ /**
+ * Gets a merged config object corresponding to the supplied vector.
+ * @param {Array<Object>} vector the vector to find a merged config for
+ * @returns {Object|null} a merged config object, if found in the cache, otherwise null
+ * @private
+ */
+ getMergedVectorConfig(vector) {
+ return this.mergedVectorCache.get(hash(vector));
+ }
+
+ /**
+ * Sets a merged config object in the cache for the supplied vector.
+ * @param {Array<Object>} vector the vector to save a merged config for
+ * @param {Object} config the merged config object to add to the cache
+ * @returns {void}
+ * @private
+ */
+ setMergedVectorConfig(vector, config) {
+ this.mergedVectorCache.set(hash(vector), config);
+ }
+
+ /**
+ * Gets a merged config object corresponding to the supplied vector, including configuration options from outside
+ * the vector.
+ * @param {Array<Object>} vector the vector to find a merged config for
+ * @returns {Object|null} a merged config object, if found in the cache, otherwise null
+ * @private
+ */
+ getMergedConfig(vector) {
+ return this.mergedCache.get(hash(vector));
+ }
+
+ /**
+ * Sets a merged config object in the cache for the supplied vector, including configuration options from outside
+ * the vector.
+ * @param {Array<Object>} vector the vector to save a merged config for
+ * @param {Object} config the merged config object to add to the cache
+ * @returns {void}
+ * @private
+ */
+ setMergedConfig(vector, config) {
+ this.mergedCache.set(hash(vector), config);
+ }
+};
diff --git a/tools/node_modules/eslint/lib/config/config-file.js b/tools/node_modules/eslint/lib/config/config-file.js
new file mode 100644
index 0000000000..c5ff073cfc
--- /dev/null
+++ b/tools/node_modules/eslint/lib/config/config-file.js
@@ -0,0 +1,595 @@
+/**
+ * @fileoverview Helper to locate and load configuration files.
+ * @author Nicholas C. Zakas
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const fs = require("fs"),
+ path = require("path"),
+ ConfigOps = require("./config-ops"),
+ validator = require("./config-validator"),
+ ModuleResolver = require("../util/module-resolver"),
+ naming = require("../util/naming"),
+ pathIsInside = require("path-is-inside"),
+ stripComments = require("strip-json-comments"),
+ stringify = require("json-stable-stringify-without-jsonify"),
+ requireUncached = require("require-uncached");
+
+const debug = require("debug")("eslint:config-file");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Determines sort order for object keys for json-stable-stringify
+ *
+ * see: https://github.com/samn/json-stable-stringify#cmp
+ *
+ * @param {Object} a The first comparison object ({key: akey, value: avalue})
+ * @param {Object} b The second comparison object ({key: bkey, value: bvalue})
+ * @returns {number} 1 or -1, used in stringify cmp method
+ */
+function sortByKey(a, b) {
+ return a.key > b.key ? 1 : -1;
+}
+
+//------------------------------------------------------------------------------
+// Private
+//------------------------------------------------------------------------------
+
+const CONFIG_FILES = [
+ ".eslintrc.js",
+ ".eslintrc.yaml",
+ ".eslintrc.yml",
+ ".eslintrc.json",
+ ".eslintrc",
+ "package.json"
+];
+
+const resolver = new ModuleResolver();
+
+/**
+ * Convenience wrapper for synchronously reading file contents.
+ * @param {string} filePath The filename to read.
+ * @returns {string} The file contents, with the BOM removed.
+ * @private
+ */
+function readFile(filePath) {
+ return fs.readFileSync(filePath, "utf8").replace(/^\ufeff/, "");
+}
+
+/**
+ * Determines if a given string represents a filepath or not using the same
+ * conventions as require(), meaning that the first character must be nonalphanumeric
+ * and not the @ sign which is used for scoped packages to be considered a file path.
+ * @param {string} filePath The string to check.
+ * @returns {boolean} True if it's a filepath, false if not.
+ * @private
+ */
+function isFilePath(filePath) {
+ return path.isAbsolute(filePath) || !/\w|@/.test(filePath.charAt(0));
+}
+
+/**
+ * Loads a YAML configuration from a file.
+ * @param {string} filePath The filename to load.
+ * @returns {Object} The configuration object from the file.
+ * @throws {Error} If the file cannot be read.
+ * @private
+ */
+function loadYAMLConfigFile(filePath) {
+ debug(`Loading YAML config file: ${filePath}`);
+
+ // lazy load YAML to improve performance when not used
+ const yaml = require("js-yaml");
+
+ try {
+
+ // empty YAML file can be null, so always use
+ return yaml.safeLoad(readFile(filePath)) || {};
+ } catch (e) {
+ debug(`Error reading YAML file: ${filePath}`);
+ e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
+ throw e;
+ }
+}
+
+/**
+ * Loads a JSON configuration from a file.
+ * @param {string} filePath The filename to load.
+ * @returns {Object} The configuration object from the file.
+ * @throws {Error} If the file cannot be read.
+ * @private
+ */
+function loadJSONConfigFile(filePath) {
+ debug(`Loading JSON config file: ${filePath}`);
+
+ try {
+ return JSON.parse(stripComments(readFile(filePath)));
+ } catch (e) {
+ debug(`Error reading JSON file: ${filePath}`);
+ e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
+ throw e;
+ }
+}
+
+/**
+ * Loads a legacy (.eslintrc) configuration from a file.
+ * @param {string} filePath The filename to load.
+ * @returns {Object} The configuration object from the file.
+ * @throws {Error} If the file cannot be read.
+ * @private
+ */
+function loadLegacyConfigFile(filePath) {
+ debug(`Loading config file: ${filePath}`);
+
+ // lazy load YAML to improve performance when not used
+ const yaml = require("js-yaml");
+
+ try {
+ return yaml.safeLoad(stripComments(readFile(filePath))) || /* istanbul ignore next */ {};
+ } catch (e) {
+ debug(`Error reading YAML file: ${filePath}`);
+ e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
+ throw e;
+ }
+}
+
+/**
+ * Loads a JavaScript configuration from a file.
+ * @param {string} filePath The filename to load.
+ * @returns {Object} The configuration object from the file.
+ * @throws {Error} If the file cannot be read.
+ * @private
+ */
+function loadJSConfigFile(filePath) {
+ debug(`Loading JS config file: ${filePath}`);
+ try {
+ return requireUncached(filePath);
+ } catch (e) {
+ debug(`Error reading JavaScript file: ${filePath}`);
+ e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
+ throw e;
+ }
+}
+
+/**
+ * Loads a configuration from a package.json file.
+ * @param {string} filePath The filename to load.
+ * @returns {Object} The configuration object from the file.
+ * @throws {Error} If the file cannot be read.
+ * @private
+ */
+function loadPackageJSONConfigFile(filePath) {
+ debug(`Loading package.json config file: ${filePath}`);
+ try {
+ return loadJSONConfigFile(filePath).eslintConfig || null;
+ } catch (e) {
+ debug(`Error reading package.json file: ${filePath}`);
+ e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
+ throw e;
+ }
+}
+
+/**
+ * Creates an error to notify about a missing config to extend from.
+ * @param {string} configName The name of the missing config.
+ * @returns {Error} The error object to throw
+ * @private
+ */
+function configMissingError(configName) {
+ const error = new Error(`Failed to load config "${configName}" to extend from.`);
+
+ error.messageTemplate = "extend-config-missing";
+ error.messageData = {
+ configName
+ };
+ return error;
+}
+
+/**
+ * Loads a configuration file regardless of the source. Inspects the file path
+ * to determine the correctly way to load the config file.
+ * @param {Object} file The path to the configuration.
+ * @returns {Object} The configuration information.
+ * @private
+ */
+function loadConfigFile(file) {
+ const filePath = file.filePath;
+ let config;
+
+ switch (path.extname(filePath)) {
+ case ".js":
+ config = loadJSConfigFile(filePath);
+ if (file.configName) {
+ config = config.configs[file.configName];
+ if (!config) {
+ throw configMissingError(file.configFullName);
+ }
+ }
+ break;
+
+ case ".json":
+ if (path.basename(filePath) === "package.json") {
+ config = loadPackageJSONConfigFile(filePath);
+ if (config === null) {
+ return null;
+ }
+ } else {
+ config = loadJSONConfigFile(filePath);
+ }
+ break;
+
+ case ".yaml":
+ case ".yml":
+ config = loadYAMLConfigFile(filePath);
+ break;
+
+ default:
+ config = loadLegacyConfigFile(filePath);
+ }
+
+ return ConfigOps.merge(ConfigOps.createEmptyConfig(), config);
+}
+
+/**
+ * Writes a configuration file in JSON format.
+ * @param {Object} config The configuration object to write.
+ * @param {string} filePath The filename to write to.
+ * @returns {void}
+ * @private
+ */
+function writeJSONConfigFile(config, filePath) {
+ debug(`Writing JSON config file: ${filePath}`);
+
+ const content = stringify(config, { cmp: sortByKey, space: 4 });
+
+ fs.writeFileSync(filePath, content, "utf8");
+}
+
+/**
+ * Writes a configuration file in YAML format.
+ * @param {Object} config The configuration object to write.
+ * @param {string} filePath The filename to write to.
+ * @returns {void}
+ * @private
+ */
+function writeYAMLConfigFile(config, filePath) {
+ debug(`Writing YAML config file: ${filePath}`);
+
+ // lazy load YAML to improve performance when not used
+ const yaml = require("js-yaml");
+
+ const content = yaml.safeDump(config, { sortKeys: true });
+
+ fs.writeFileSync(filePath, content, "utf8");
+}
+
+/**
+ * Writes a configuration file in JavaScript format.
+ * @param {Object} config The configuration object to write.
+ * @param {string} filePath The filename to write to.
+ * @returns {void}
+ * @private
+ */
+function writeJSConfigFile(config, filePath) {
+ debug(`Writing JS config file: ${filePath}`);
+
+ const content = `module.exports = ${stringify(config, { cmp: sortByKey, space: 4 })};`;
+
+ fs.writeFileSync(filePath, content, "utf8");
+}
+
+/**
+ * Writes a configuration file.
+ * @param {Object} config The configuration object to write.
+ * @param {string} filePath The filename to write to.
+ * @returns {void}
+ * @throws {Error} When an unknown file type is specified.
+ * @private
+ */
+function write(config, filePath) {
+ switch (path.extname(filePath)) {
+ case ".js":
+ writeJSConfigFile(config, filePath);
+ break;
+
+ case ".json":
+ writeJSONConfigFile(config, filePath);
+ break;
+
+ case ".yaml":
+ case ".yml":
+ writeYAMLConfigFile(config, filePath);
+ break;
+
+ default:
+ throw new Error("Can't write to unknown file type.");
+ }
+}
+
+/**
+ * Determines the base directory for node packages referenced in a config file.
+ * This does not include node_modules in the path so it can be used for all
+ * references relative to a config file.
+ * @param {string} configFilePath The config file referencing the file.
+ * @returns {string} The base directory for the file path.
+ * @private
+ */
+function getBaseDir(configFilePath) {
+
+ // calculates the path of the project including ESLint as dependency
+ const projectPath = path.resolve(__dirname, "../../../");
+
+ if (configFilePath && pathIsInside(configFilePath, projectPath)) {
+
+ // be careful of https://github.com/substack/node-resolve/issues/78
+ return path.join(path.resolve(configFilePath));
+ }
+
+ /*
+ * default to ESLint project path since it's unlikely that plugins will be
+ * in this directory
+ */
+ return path.join(projectPath);
+}
+
+/**
+ * Determines the lookup path, including node_modules, for package
+ * references relative to a config file.
+ * @param {string} configFilePath The config file referencing the file.
+ * @returns {string} The lookup path for the file path.
+ * @private
+ */
+function getLookupPath(configFilePath) {
+ const basedir = getBaseDir(configFilePath);
+
+ return path.join(basedir, "node_modules");
+}
+
+/**
+ * Resolves a eslint core config path
+ * @param {string} name The eslint config name.
+ * @returns {string} The resolved path of the config.
+ * @private
+ */
+function getEslintCoreConfigPath(name) {
+ if (name === "eslint:recommended") {
+
+ /*
+ * Add an explicit substitution for eslint:recommended to
+ * conf/eslint-recommended.js.
+ */
+ return path.resolve(__dirname, "../../conf/eslint-recommended.js");
+ }
+
+ if (name === "eslint:all") {
+
+ /*
+ * Add an explicit substitution for eslint:all to conf/eslint-all.js
+ */
+ return path.resolve(__dirname, "../../conf/eslint-all.js");
+ }
+
+ throw configMissingError(name);
+}
+
+/**
+ * Applies values from the "extends" field in a configuration file.
+ * @param {Object} config The configuration information.
+ * @param {Config} configContext Plugin context for the config instance
+ * @param {string} filePath The file path from which the configuration information
+ * was loaded.
+ * @param {string} [relativeTo] The path to resolve relative to.
+ * @returns {Object} A new configuration object with all of the "extends" fields
+ * loaded and merged.
+ * @private
+ */
+function applyExtends(config, configContext, filePath, relativeTo) {
+ let configExtends = config.extends;
+
+ // normalize into an array for easier handling
+ if (!Array.isArray(config.extends)) {
+ configExtends = [config.extends];
+ }
+
+ // Make the last element in an array take the highest precedence
+ config = configExtends.reduceRight((previousValue, parentPath) => {
+ try {
+ if (parentPath.startsWith("eslint:")) {
+ parentPath = getEslintCoreConfigPath(parentPath);
+ } else if (isFilePath(parentPath)) {
+
+ /*
+ * If the `extends` path is relative, use the directory of the current configuration
+ * file as the reference point. Otherwise, use as-is.
+ */
+ parentPath = (path.isAbsolute(parentPath)
+ ? parentPath
+ : path.join(relativeTo || path.dirname(filePath), parentPath)
+ );
+ }
+ debug(`Loading ${parentPath}`);
+
+ // eslint-disable-next-line no-use-before-define
+ return ConfigOps.merge(load(parentPath, configContext, relativeTo), previousValue);
+ } catch (e) {
+
+ /*
+ * If the file referenced by `extends` failed to load, add the path
+ * to the configuration file that referenced it to the error
+ * message so the user is able to see where it was referenced from,
+ * then re-throw.
+ */
+ e.message += `\nReferenced from: ${filePath}`;
+ throw e;
+ }
+
+ }, config);
+
+ return config;
+}
+
+/**
+ * Resolves a configuration file path into the fully-formed path, whether filename
+ * or package name.
+ * @param {string} filePath The filepath to resolve.
+ * @param {string} [relativeTo] The path to resolve relative to.
+ * @returns {Object} An object containing 3 properties:
+ * - 'filePath' (required) the resolved path that can be used directly to load the configuration.
+ * - 'configName' the name of the configuration inside the plugin.
+ * - 'configFullName' (required) the name of the configuration as used in the eslint config(e.g. 'plugin:node/recommended'),
+ * or the absolute path to a config file. This should uniquely identify a config.
+ * @private
+ */
+function resolve(filePath, relativeTo) {
+ if (isFilePath(filePath)) {
+ const fullPath = path.resolve(relativeTo || "", filePath);
+
+ return { filePath: fullPath, configFullName: fullPath };
+ }
+ let normalizedPackageName;
+
+ if (filePath.startsWith("plugin:")) {
+ const configFullName = filePath;
+ const pluginName = filePath.slice(7, filePath.lastIndexOf("/"));
+ const configName = filePath.slice(filePath.lastIndexOf("/") + 1);
+
+ normalizedPackageName = naming.normalizePackageName(pluginName, "eslint-plugin");
+ debug(`Attempting to resolve ${normalizedPackageName}`);
+ filePath = resolver.resolve(normalizedPackageName, getLookupPath(relativeTo));
+ return { filePath, configName, configFullName };
+ }
+ normalizedPackageName = naming.normalizePackageName(filePath, "eslint-config");
+ debug(`Attempting to resolve ${normalizedPackageName}`);
+ filePath = resolver.resolve(normalizedPackageName, getLookupPath(relativeTo));
+ return { filePath, configFullName: filePath };
+
+
+}
+
+/**
+ * Loads a configuration file from the given file path.
+ * @param {Object} resolvedPath The value from calling resolve() on a filename or package name.
+ * @param {Config} configContext Plugins context
+ * @returns {Object} The configuration information.
+ */
+function loadFromDisk(resolvedPath, configContext) {
+ const dirname = path.dirname(resolvedPath.filePath),
+ lookupPath = getLookupPath(dirname);
+ let config = loadConfigFile(resolvedPath);
+
+ if (config) {
+
+ // ensure plugins are properly loaded first
+ if (config.plugins) {
+ configContext.plugins.loadAll(config.plugins);
+ }
+
+ // include full path of parser if present
+ if (config.parser) {
+ if (isFilePath(config.parser)) {
+ config.parser = path.resolve(dirname || "", config.parser);
+ } else {
+ config.parser = resolver.resolve(config.parser, lookupPath);
+ }
+ }
+
+ const ruleMap = configContext.linterContext.getRules();
+
+ // validate the configuration before continuing
+ validator.validate(config, resolvedPath.configFullName, ruleMap.get.bind(ruleMap), configContext.linterContext.environments);
+
+ /*
+ * If an `extends` property is defined, it represents a configuration file to use as
+ * a "parent". Load the referenced file and merge the configuration recursively.
+ */
+ if (config.extends) {
+ config = applyExtends(config, configContext, resolvedPath.filePath, dirname);
+ }
+ }
+
+ return config;
+}
+
+/**
+ * Loads a config object, applying extends if present.
+ * @param {Object} configObject a config object to load
+ * @param {Config} configContext Context for the config instance
+ * @returns {Object} the config object with extends applied if present, or the passed config if not
+ * @private
+ */
+function loadObject(configObject, configContext) {
+ return configObject.extends ? applyExtends(configObject, configContext, "") : configObject;
+}
+
+/**
+ * Loads a config object from the config cache based on its filename, falling back to the disk if the file is not yet
+ * cached.
+ * @param {string} filePath the path to the config file
+ * @param {Config} configContext Context for the config instance
+ * @param {string} [relativeTo] The path to resolve relative to.
+ * @returns {Object} the parsed config object (empty object if there was a parse error)
+ * @private
+ */
+function load(filePath, configContext, relativeTo) {
+ const resolvedPath = resolve(filePath, relativeTo);
+
+ const cachedConfig = configContext.configCache.getConfig(resolvedPath.configFullName);
+
+ if (cachedConfig) {
+ return cachedConfig;
+ }
+
+ const config = loadFromDisk(resolvedPath, configContext);
+
+ if (config) {
+ config.filePath = resolvedPath.filePath;
+ config.baseDirectory = path.dirname(resolvedPath.filePath);
+ configContext.configCache.setConfig(resolvedPath.configFullName, config);
+ }
+
+ return config;
+}
+
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+module.exports = {
+
+ getBaseDir,
+ getLookupPath,
+ load,
+ loadObject,
+ resolve,
+ write,
+ applyExtends,
+ CONFIG_FILES,
+
+ /**
+ * Retrieves the configuration filename for a given directory. It loops over all
+ * of the valid configuration filenames in order to find the first one that exists.
+ * @param {string} directory The directory to check for a config file.
+ * @returns {?string} The filename of the configuration file for the directory
+ * or null if there is no configuration file in the directory.
+ */
+ getFilenameForDirectory(directory) {
+ for (let i = 0, len = CONFIG_FILES.length; i < len; i++) {
+ const filename = path.join(directory, CONFIG_FILES[i]);
+
+ if (fs.existsSync(filename) && fs.statSync(filename).isFile()) {
+ return filename;
+ }
+ }
+
+ return null;
+ }
+};
diff --git a/tools/node_modules/eslint/lib/config/config-initializer.js b/tools/node_modules/eslint/lib/config/config-initializer.js
new file mode 100644
index 0000000000..e4865a008c
--- /dev/null
+++ b/tools/node_modules/eslint/lib/config/config-initializer.js
@@ -0,0 +1,605 @@
+/**
+ * @fileoverview Config initialization wizard.
+ * @author Ilya Volodin
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const util = require("util"),
+ inquirer = require("inquirer"),
+ ProgressBar = require("progress"),
+ semver = require("semver"),
+ autoconfig = require("./autoconfig.js"),
+ ConfigFile = require("./config-file"),
+ ConfigOps = require("./config-ops"),
+ getSourceCodeOfFiles = require("../util/source-code-util").getSourceCodeOfFiles,
+ ModuleResolver = require("../util/module-resolver"),
+ npmUtil = require("../util/npm-util"),
+ recConfig = require("../../conf/eslint-recommended"),
+ log = require("../logging");
+
+const debug = require("debug")("eslint:config-initializer");
+
+//------------------------------------------------------------------------------
+// Private
+//------------------------------------------------------------------------------
+
+/* istanbul ignore next: hard to test fs function */
+/**
+ * Create .eslintrc file in the current working directory
+ * @param {Object} config object that contains user's answers
+ * @param {string} format The file format to write to.
+ * @returns {void}
+ */
+function writeFile(config, format) {
+
+ // default is .js
+ let extname = ".js";
+
+ if (format === "YAML") {
+ extname = ".yml";
+ } else if (format === "JSON") {
+ extname = ".json";
+ }
+
+ const installedESLint = config.installedESLint;
+
+ delete config.installedESLint;
+
+ ConfigFile.write(config, `./.eslintrc${extname}`);
+ log.info(`Successfully created .eslintrc${extname} file in ${process.cwd()}`);
+
+ if (installedESLint) {
+ log.info("ESLint was installed locally. We recommend using this local copy instead of your globally-installed copy.");
+ }
+}
+
+/**
+ * Get the peer dependencies of the given module.
+ * This adds the gotten value to cache at the first time, then reuses it.
+ * In a process, this function is called twice, but `npmUtil.fetchPeerDependencies` needs to access network which is relatively slow.
+ * @param {string} moduleName The module name to get.
+ * @returns {Object} The peer dependencies of the given module.
+ * This object is the object of `peerDependencies` field of `package.json`.
+ * Returns null if npm was not found.
+ */
+function getPeerDependencies(moduleName) {
+ let result = getPeerDependencies.cache.get(moduleName);
+
+ if (!result) {
+ log.info(`Checking peerDependencies of ${moduleName}`);
+
+ result = npmUtil.fetchPeerDependencies(moduleName);
+ getPeerDependencies.cache.set(moduleName, result);
+ }
+
+ return result;
+}
+getPeerDependencies.cache = new Map();
+
+/**
+ * Synchronously install necessary plugins, configs, parsers, etc. based on the config
+ * @param {Object} config config object
+ * @param {boolean} [installESLint=true] If `false` is given, it does not install eslint.
+ * @returns {void}
+ */
+function installModules(config, installESLint) {
+ const modules = {};
+
+ // Create a list of modules which should be installed based on config
+ if (config.plugins) {
+ for (const plugin of config.plugins) {
+ modules[`eslint-plugin-${plugin}`] = "latest";
+ }
+ }
+ if (config.extends && config.extends.indexOf("eslint:") === -1) {
+ const moduleName = `eslint-config-${config.extends}`;
+
+ modules[moduleName] = "latest";
+ Object.assign(
+ modules,
+ getPeerDependencies(`${moduleName}@latest`)
+ );
+ }
+
+ // If no modules, do nothing.
+ if (Object.keys(modules).length === 0) {
+ return;
+ }
+
+ if (installESLint === false) {
+ delete modules.eslint;
+ } else {
+ const installStatus = npmUtil.checkDevDeps(["eslint"]);
+
+ // Mark to show messages if it's new installation of eslint.
+ if (installStatus.eslint === false) {
+ log.info("Local ESLint installation not found.");
+ modules.eslint = modules.eslint || "latest";
+ config.installedESLint = true;
+ }
+ }
+
+ // Install packages
+ const modulesToInstall = Object.keys(modules).map(name => `${name}@${modules[name]}`);
+
+ log.info(`Installing ${modulesToInstall.join(", ")}`);
+
+ npmUtil.installSyncSaveDev(modulesToInstall);
+}
+
+/**
+ * Set the `rules` of a config by examining a user's source code
+ *
+ * Note: This clones the config object and returns a new config to avoid mutating
+ * the original config parameter.
+ *
+ * @param {Object} answers answers received from inquirer
+ * @param {Object} config config object
+ * @returns {Object} config object with configured rules
+ */
+function configureRules(answers, config) {
+ const BAR_TOTAL = 20,
+ BAR_SOURCE_CODE_TOTAL = 4,
+ newConfig = Object.assign({}, config),
+ disabledConfigs = {};
+ let sourceCodes,
+ registry;
+
+ // Set up a progress bar, as this process can take a long time
+ const bar = new ProgressBar("Determining Config: :percent [:bar] :elapseds elapsed, eta :etas ", {
+ width: 30,
+ total: BAR_TOTAL
+ });
+
+ bar.tick(0); // Shows the progress bar
+
+ // Get the SourceCode of all chosen files
+ const patterns = answers.patterns.split(/[\s]+/);
+
+ try {
+ sourceCodes = getSourceCodeOfFiles(patterns, { baseConfig: newConfig, useEslintrc: false }, total => {
+ bar.tick((BAR_SOURCE_CODE_TOTAL / total));
+ });
+ } catch (e) {
+ log.info("\n");
+ throw e;
+ }
+ const fileQty = Object.keys(sourceCodes).length;
+
+ if (fileQty === 0) {
+ log.info("\n");
+ throw new Error("Automatic Configuration failed. No files were able to be parsed.");
+ }
+
+ // Create a registry of rule configs
+ registry = new autoconfig.Registry();
+ registry.populateFromCoreRules();
+
+ // Lint all files with each rule config in the registry
+ registry = registry.lintSourceCode(sourceCodes, newConfig, total => {
+ bar.tick((BAR_TOTAL - BAR_SOURCE_CODE_TOTAL) / total); // Subtract out ticks used at beginning
+ });
+ debug(`\nRegistry: ${util.inspect(registry.rules, { depth: null })}`);
+
+ // Create a list of recommended rules, because we don't want to disable them
+ const recRules = Object.keys(recConfig.rules).filter(ruleId => ConfigOps.isErrorSeverity(recConfig.rules[ruleId]));
+
+ // Find and disable rules which had no error-free configuration
+ const failingRegistry = registry.getFailingRulesRegistry();
+
+ Object.keys(failingRegistry.rules).forEach(ruleId => {
+
+ // If the rule is recommended, set it to error, otherwise disable it
+ disabledConfigs[ruleId] = (recRules.indexOf(ruleId) !== -1) ? 2 : 0;
+ });
+
+ // Now that we know which rules to disable, strip out configs with errors
+ registry = registry.stripFailingConfigs();
+
+ /*
+ * If there is only one config that results in no errors for a rule, we should use it.
+ * createConfig will only add rules that have one configuration in the registry.
+ */
+ const singleConfigs = registry.createConfig().rules;
+
+ /*
+ * The "sweet spot" for number of options in a config seems to be two (severity plus one option).
+ * Very often, a third option (usually an object) is available to address
+ * edge cases, exceptions, or unique situations. We will prefer to use a config with
+ * specificity of two.
+ */
+ const specTwoConfigs = registry.filterBySpecificity(2).createConfig().rules;
+
+ // Maybe a specific combination using all three options works
+ const specThreeConfigs = registry.filterBySpecificity(3).createConfig().rules;
+
+ // If all else fails, try to use the default (severity only)
+ const defaultConfigs = registry.filterBySpecificity(1).createConfig().rules;
+
+ // Combine configs in reverse priority order (later take precedence)
+ newConfig.rules = Object.assign({}, disabledConfigs, defaultConfigs, specThreeConfigs, specTwoConfigs, singleConfigs);
+
+ // Make sure progress bar has finished (floating point rounding)
+ bar.update(BAR_TOTAL);
+
+ // Log out some stats to let the user know what happened
+ const finalRuleIds = Object.keys(newConfig.rules);
+ const totalRules = finalRuleIds.length;
+ const enabledRules = finalRuleIds.filter(ruleId => (newConfig.rules[ruleId] !== 0)).length;
+ const resultMessage = [
+ `\nEnabled ${enabledRules} out of ${totalRules}`,
+ `rules based on ${fileQty}`,
+ `file${(fileQty === 1) ? "." : "s."}`
+ ].join(" ");
+
+ log.info(resultMessage);
+
+ ConfigOps.normalizeToStrings(newConfig);
+ return newConfig;
+}
+
+/**
+ * process user's answers and create config object
+ * @param {Object} answers answers received from inquirer
+ * @returns {Object} config object
+ */
+function processAnswers(answers) {
+ let config = { rules: {}, env: {} };
+
+ if (answers.es6) {
+ config.env.es6 = true;
+ if (answers.modules) {
+ config.parserOptions = config.parserOptions || {};
+ config.parserOptions.sourceType = "module";
+ }
+ }
+ if (answers.commonjs) {
+ config.env.commonjs = true;
+ }
+ answers.env.forEach(env => {
+ config.env[env] = true;
+ });
+ if (answers.jsx) {
+ config.parserOptions = config.parserOptions || {};
+ config.parserOptions.ecmaFeatures = config.parserOptions.ecmaFeatures || {};
+ config.parserOptions.ecmaFeatures.jsx = true;
+ if (answers.react) {
+ config.plugins = ["react"];
+ config.parserOptions.ecmaFeatures.experimentalObjectRestSpread = true;
+ }
+ }
+
+ if (answers.source === "prompt") {
+ config.extends = "eslint:recommended";
+ config.rules.indent = ["error", answers.indent];
+ config.rules.quotes = ["error", answers.quotes];
+ config.rules["linebreak-style"] = ["error", answers.linebreak];
+ config.rules.semi = ["error", answers.semi ? "always" : "never"];
+ }
+
+ installModules(config);
+
+ if (answers.source === "auto") {
+ config = configureRules(answers, config);
+ config = autoconfig.extendFromRecommended(config);
+ }
+
+ ConfigOps.normalizeToStrings(config);
+ return config;
+}
+
+/**
+ * process user's style guide of choice and return an appropriate config object.
+ * @param {string} guide name of the chosen style guide
+ * @param {boolean} [installESLint=true] If `false` is given, it does not install eslint.
+ * @returns {Object} config object
+ */
+function getConfigForStyleGuide(guide, installESLint) {
+ const guides = {
+ google: { extends: "google" },
+ airbnb: { extends: "airbnb" },
+ "airbnb-base": { extends: "airbnb-base" },
+ standard: { extends: "standard" }
+ };
+
+ if (!guides[guide]) {
+ throw new Error("You referenced an unsupported guide.");
+ }
+
+ installModules(guides[guide], installESLint);
+
+ return guides[guide];
+}
+
+/**
+ * Get the version of the local ESLint.
+ * @returns {string|null} The version. If the local ESLint was not found, returns null.
+ */
+function getLocalESLintVersion() {
+ try {
+ const resolver = new ModuleResolver();
+ const eslintPath = resolver.resolve("eslint", process.cwd());
+ const eslint = require(eslintPath);
+
+ return eslint.linter.version || null;
+ } catch (_err) {
+ return null;
+ }
+}
+
+/**
+ * Get the shareable config name of the chosen style guide.
+ * @param {Object} answers The answers object.
+ * @returns {string} The shareable config name.
+ */
+function getStyleGuideName(answers) {
+ if (answers.styleguide === "airbnb" && !answers.airbnbReact) {
+ return "airbnb-base";
+ }
+ return answers.styleguide;
+}
+
+/**
+ * Check whether the local ESLint version conflicts with the required version of the chosen shareable config.
+ * @param {Object} answers The answers object.
+ * @returns {boolean} `true` if the local ESLint is found then it conflicts with the required version of the chosen shareable config.
+ */
+function hasESLintVersionConflict(answers) {
+
+ // Get the local ESLint version.
+ const localESLintVersion = getLocalESLintVersion();
+
+ if (!localESLintVersion) {
+ return false;
+ }
+
+ // Get the required range of ESLint version.
+ const configName = getStyleGuideName(answers);
+ const moduleName = `eslint-config-${configName}@latest`;
+ const peerDependencies = getPeerDependencies(moduleName) || {};
+ const requiredESLintVersionRange = peerDependencies.eslint;
+
+ if (!requiredESLintVersionRange) {
+ return false;
+ }
+
+ answers.localESLintVersion = localESLintVersion;
+ answers.requiredESLintVersionRange = requiredESLintVersionRange;
+
+ // Check the version.
+ if (semver.satisfies(localESLintVersion, requiredESLintVersionRange)) {
+ answers.installESLint = false;
+ return false;
+ }
+
+ return true;
+}
+
+/* istanbul ignore next: no need to test inquirer*/
+/**
+ * Ask use a few questions on command prompt
+ * @returns {Promise} The promise with the result of the prompt
+ */
+function promptUser() {
+
+ return inquirer.prompt([
+ {
+ type: "list",
+ name: "source",
+ message: "How would you like to configure ESLint?",
+ default: "prompt",
+ choices: [
+ { name: "Answer questions about your style", value: "prompt" },
+ { name: "Use a popular style guide", value: "guide" },
+ { name: "Inspect your JavaScript file(s)", value: "auto" }
+ ]
+ },
+ {
+ type: "list",
+ name: "styleguide",
+ message: "Which style guide do you want to follow?",
+ choices: [{ name: "Google", value: "google" }, { name: "Airbnb", value: "airbnb" }, { name: "Standard", value: "standard" }],
+ when(answers) {
+ answers.packageJsonExists = npmUtil.checkPackageJson();
+ return answers.source === "guide" && answers.packageJsonExists;
+ }
+ },
+ {
+ type: "confirm",
+ name: "airbnbReact",
+ message: "Do you use React?",
+ default: false,
+ when(answers) {
+ return answers.styleguide === "airbnb";
+ }
+ },
+ {
+ type: "input",
+ name: "patterns",
+ message: "Which file(s), path(s), or glob(s) should be examined?",
+ when(answers) {
+ return (answers.source === "auto");
+ },
+ validate(input) {
+ if (input.trim().length === 0 && input.trim() !== ",") {
+ return "You must tell us what code to examine. Try again.";
+ }
+ return true;
+ }
+ },
+ {
+ type: "list",
+ name: "format",
+ message: "What format do you want your config file to be in?",
+ default: "JavaScript",
+ choices: ["JavaScript", "YAML", "JSON"],
+ when(answers) {
+ return ((answers.source === "guide" && answers.packageJsonExists) || answers.source === "auto");
+ }
+ },
+ {
+ type: "confirm",
+ name: "installESLint",
+ message(answers) {
+ const verb = semver.ltr(answers.localESLintVersion, answers.requiredESLintVersionRange)
+ ? "upgrade"
+ : "downgrade";
+
+ return `The style guide "${answers.styleguide}" requires eslint@${answers.requiredESLintVersionRange}. You are currently using eslint@${answers.localESLintVersion}.\n Do you want to ${verb}?`;
+ },
+ default: true,
+ when(answers) {
+ return answers.source === "guide" && answers.packageJsonExists && hasESLintVersionConflict(answers);
+ }
+ }
+ ]).then(earlyAnswers => {
+
+ // early exit if you are using a style guide
+ if (earlyAnswers.source === "guide") {
+ if (!earlyAnswers.packageJsonExists) {
+ log.info("A package.json is necessary to install plugins such as style guides. Run `npm init` to create a package.json file and try again.");
+ return void 0;
+ }
+ if (earlyAnswers.installESLint === false && !semver.satisfies(earlyAnswers.localESLintVersion, earlyAnswers.requiredESLintVersionRange)) {
+ log.info(`Note: it might not work since ESLint's version is mismatched with the ${earlyAnswers.styleguide} config.`);
+ }
+ if (earlyAnswers.styleguide === "airbnb" && !earlyAnswers.airbnbReact) {
+ earlyAnswers.styleguide = "airbnb-base";
+ }
+
+ const config = getConfigForStyleGuide(earlyAnswers.styleguide, earlyAnswers.installESLint);
+
+ writeFile(config, earlyAnswers.format);
+
+ return void 0;
+ }
+
+ // continue with the questions otherwise...
+ return inquirer.prompt([
+ {
+ type: "confirm",
+ name: "es6",
+ message: "Are you using ECMAScript 6 features?",
+ default: false
+ },
+ {
+ type: "confirm",
+ name: "modules",
+ message: "Are you using ES6 modules?",
+ default: false,
+ when(answers) {
+ return answers.es6 === true;
+ }
+ },
+ {
+ type: "checkbox",
+ name: "env",
+ message: "Where will your code run?",
+ default: ["browser"],
+ choices: [{ name: "Browser", value: "browser" }, { name: "Node", value: "node" }]
+ },
+ {
+ type: "confirm",
+ name: "commonjs",
+ message: "Do you use CommonJS?",
+ default: false,
+ when(answers) {
+ return answers.env.some(env => env === "browser");
+ }
+ },
+ {
+ type: "confirm",
+ name: "jsx",
+ message: "Do you use JSX?",
+ default: false
+ },
+ {
+ type: "confirm",
+ name: "react",
+ message: "Do you use React?",
+ default: false,
+ when(answers) {
+ return answers.jsx;
+ }
+ }
+ ]).then(secondAnswers => {
+
+ // early exit if you are using automatic style generation
+ if (earlyAnswers.source === "auto") {
+ const combinedAnswers = Object.assign({}, earlyAnswers, secondAnswers);
+
+ const config = processAnswers(combinedAnswers);
+
+ installModules(config);
+ writeFile(config, earlyAnswers.format);
+
+ return void 0;
+ }
+
+ // continue with the style questions otherwise...
+ return inquirer.prompt([
+ {
+ type: "list",
+ name: "indent",
+ message: "What style of indentation do you use?",
+ default: "tab",
+ choices: [{ name: "Tabs", value: "tab" }, { name: "Spaces", value: 4 }]
+ },
+ {
+ type: "list",
+ name: "quotes",
+ message: "What quotes do you use for strings?",
+ default: "double",
+ choices: [{ name: "Double", value: "double" }, { name: "Single", value: "single" }]
+ },
+ {
+ type: "list",
+ name: "linebreak",
+ message: "What line endings do you use?",
+ default: "unix",
+ choices: [{ name: "Unix", value: "unix" }, { name: "Windows", value: "windows" }]
+ },
+ {
+ type: "confirm",
+ name: "semi",
+ message: "Do you require semicolons?",
+ default: true
+ },
+ {
+ type: "list",
+ name: "format",
+ message: "What format do you want your config file to be in?",
+ default: "JavaScript",
+ choices: ["JavaScript", "YAML", "JSON"]
+ }
+ ]).then(answers => {
+ const totalAnswers = Object.assign({}, earlyAnswers, secondAnswers, answers);
+
+ const config = processAnswers(totalAnswers);
+
+ installModules(config);
+ writeFile(config, answers.format);
+ });
+ });
+ });
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+const init = {
+ getConfigForStyleGuide,
+ hasESLintVersionConflict,
+ processAnswers,
+ /* istanbul ignore next */initializeConfig() {
+ return promptUser();
+ }
+};
+
+module.exports = init;
diff --git a/tools/node_modules/eslint/lib/config/config-ops.js b/tools/node_modules/eslint/lib/config/config-ops.js
new file mode 100644
index 0000000000..2ce500a4f4
--- /dev/null
+++ b/tools/node_modules/eslint/lib/config/config-ops.js
@@ -0,0 +1,383 @@
+/**
+ * @fileoverview Config file operations. This file must be usable in the browser,
+ * so no Node-specific code can be here.
+ * @author Nicholas C. Zakas
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const minimatch = require("minimatch"),
+ path = require("path");
+
+const debug = require("debug")("eslint:config-ops");
+
+//------------------------------------------------------------------------------
+// Private
+//------------------------------------------------------------------------------
+
+const RULE_SEVERITY_STRINGS = ["off", "warn", "error"],
+ RULE_SEVERITY = RULE_SEVERITY_STRINGS.reduce((map, value, index) => {
+ map[value] = index;
+ return map;
+ }, {}),
+ VALID_SEVERITIES = [0, 1, 2, "off", "warn", "error"];
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+module.exports = {
+
+ /**
+ * Creates an empty configuration object suitable for merging as a base.
+ * @returns {Object} A configuration object.
+ */
+ createEmptyConfig() {
+ return {
+ globals: {},
+ env: {},
+ rules: {},
+ parserOptions: {}
+ };
+ },
+
+ /**
+ * Creates an environment config based on the specified environments.
+ * @param {Object<string,boolean>} env The environment settings.
+ * @param {Environments} envContext The environment context.
+ * @returns {Object} A configuration object with the appropriate rules and globals
+ * set.
+ */
+ createEnvironmentConfig(env, envContext) {
+
+ const envConfig = this.createEmptyConfig();
+
+ if (env) {
+
+ envConfig.env = env;
+
+ Object.keys(env).filter(name => env[name]).forEach(name => {
+ const environment = envContext.get(name);
+
+ if (environment) {
+ debug(`Creating config for environment ${name}`);
+ if (environment.globals) {
+ Object.assign(envConfig.globals, environment.globals);
+ }
+
+ if (environment.parserOptions) {
+ Object.assign(envConfig.parserOptions, environment.parserOptions);
+ }
+ }
+ });
+ }
+
+ return envConfig;
+ },
+
+ /**
+ * Given a config with environment settings, applies the globals and
+ * ecmaFeatures to the configuration and returns the result.
+ * @param {Object} config The configuration information.
+ * @param {Environments} envContent env context.
+ * @returns {Object} The updated configuration information.
+ */
+ applyEnvironments(config, envContent) {
+ if (config.env && typeof config.env === "object") {
+ debug("Apply environment settings to config");
+ return this.merge(this.createEnvironmentConfig(config.env, envContent), config);
+ }
+
+ return config;
+ },
+
+ /**
+ * Merges two config objects. This will not only add missing keys, but will also modify values to match.
+ * @param {Object} target config object
+ * @param {Object} src config object. Overrides in this config object will take priority over base.
+ * @param {boolean} [combine] Whether to combine arrays or not
+ * @param {boolean} [isRule] Whether its a rule
+ * @returns {Object} merged config object.
+ */
+ merge: function deepmerge(target, src, combine, isRule) {
+
+ /*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2012 Nicholas Fisher
+ *
+ * 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 code is taken from deepmerge repo
+ * (https://github.com/KyleAMathews/deepmerge)
+ * and modified to meet our needs.
+ */
+ const array = Array.isArray(src) || Array.isArray(target);
+ let dst = array && [] || {};
+
+ combine = !!combine;
+ isRule = !!isRule;
+ if (array) {
+ target = target || [];
+
+ // src could be a string, so check for array
+ if (isRule && Array.isArray(src) && src.length > 1) {
+ dst = dst.concat(src);
+ } else {
+ dst = dst.concat(target);
+ }
+ if (typeof src !== "object" && !Array.isArray(src)) {
+ src = [src];
+ }
+ Object.keys(src).forEach((e, i) => {
+ e = src[i];
+ if (typeof dst[i] === "undefined") {
+ dst[i] = e;
+ } else if (typeof e === "object") {
+ if (isRule) {
+ dst[i] = e;
+ } else {
+ dst[i] = deepmerge(target[i], e, combine, isRule);
+ }
+ } else {
+ if (!combine) {
+ dst[i] = e;
+ } else {
+ if (dst.indexOf(e) === -1) {
+ dst.push(e);
+ }
+ }
+ }
+ });
+ } else {
+ if (target && typeof target === "object") {
+ Object.keys(target).forEach(key => {
+ dst[key] = target[key];
+ });
+ }
+ Object.keys(src).forEach(key => {
+ if (key === "overrides") {
+ dst[key] = (target[key] || []).concat(src[key] || []);
+ } else if (Array.isArray(src[key]) || Array.isArray(target[key])) {
+ dst[key] = deepmerge(target[key], src[key], key === "plugins" || key === "extends", isRule);
+ } else if (typeof src[key] !== "object" || !src[key] || key === "exported" || key === "astGlobals") {
+ dst[key] = src[key];
+ } else {
+ dst[key] = deepmerge(target[key] || {}, src[key], combine, key === "rules");
+ }
+ });
+ }
+
+ return dst;
+ },
+
+ /**
+ * Normalizes the severity value of a rule's configuration to a number
+ * @param {(number|string|[number, ...*]|[string, ...*])} ruleConfig A rule's configuration value, generally
+ * received from the user. A valid config value is either 0, 1, 2, the string "off" (treated the same as 0),
+ * the string "warn" (treated the same as 1), the string "error" (treated the same as 2), or an array
+ * whose first element is one of the above values. Strings are matched case-insensitively.
+ * @returns {(0|1|2)} The numeric severity value if the config value was valid, otherwise 0.
+ */
+ getRuleSeverity(ruleConfig) {
+ const severityValue = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig;
+
+ if (severityValue === 0 || severityValue === 1 || severityValue === 2) {
+ return severityValue;
+ }
+
+ if (typeof severityValue === "string") {
+ return RULE_SEVERITY[severityValue.toLowerCase()] || 0;
+ }
+
+ return 0;
+ },
+
+ /**
+ * Converts old-style severity settings (0, 1, 2) into new-style
+ * severity settings (off, warn, error) for all rules. Assumption is that severity
+ * values have already been validated as correct.
+ * @param {Object} config The config object to normalize.
+ * @returns {void}
+ */
+ normalizeToStrings(config) {
+
+ if (config.rules) {
+ Object.keys(config.rules).forEach(ruleId => {
+ const ruleConfig = config.rules[ruleId];
+
+ if (typeof ruleConfig === "number") {
+ config.rules[ruleId] = RULE_SEVERITY_STRINGS[ruleConfig] || RULE_SEVERITY_STRINGS[0];
+ } else if (Array.isArray(ruleConfig) && typeof ruleConfig[0] === "number") {
+ ruleConfig[0] = RULE_SEVERITY_STRINGS[ruleConfig[0]] || RULE_SEVERITY_STRINGS[0];
+ }
+ });
+ }
+ },
+
+ /**
+ * Determines if the severity for the given rule configuration represents an error.
+ * @param {int|string|Array} ruleConfig The configuration for an individual rule.
+ * @returns {boolean} True if the rule represents an error, false if not.
+ */
+ isErrorSeverity(ruleConfig) {
+
+ let severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig;
+
+ if (typeof severity === "string") {
+ severity = RULE_SEVERITY[severity.toLowerCase()] || 0;
+ }
+
+ return (typeof severity === "number" && severity === 2);
+ },
+
+ /**
+ * Checks whether a given config has valid severity or not.
+ * @param {number|string|Array} ruleConfig - The configuration for an individual rule.
+ * @returns {boolean} `true` if the configuration has valid severity.
+ */
+ isValidSeverity(ruleConfig) {
+ let severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig;
+
+ if (typeof severity === "string") {
+ severity = severity.toLowerCase();
+ }
+ return VALID_SEVERITIES.indexOf(severity) !== -1;
+ },
+
+ /**
+ * Checks whether every rule of a given config has valid severity or not.
+ * @param {Object} config - The configuration for rules.
+ * @returns {boolean} `true` if the configuration has valid severity.
+ */
+ isEverySeverityValid(config) {
+ return Object.keys(config).every(ruleId => this.isValidSeverity(config[ruleId]));
+ },
+
+ /**
+ * Merges all configurations in a given config vector. A vector is an array of objects, each containing a config
+ * file path and a list of subconfig indices that match the current file path. All config data is assumed to be
+ * cached.
+ * @param {Array<Object>} vector list of config files and their subconfig indices that match the current file path
+ * @param {Object} configCache the config cache
+ * @returns {Object} config object
+ */
+ getConfigFromVector(vector, configCache) {
+
+ const cachedConfig = configCache.getMergedVectorConfig(vector);
+
+ if (cachedConfig) {
+ return cachedConfig;
+ }
+
+ debug("Using config from partial cache");
+
+ const subvector = Array.from(vector);
+ let nearestCacheIndex = subvector.length - 1,
+ partialCachedConfig;
+
+ while (nearestCacheIndex >= 0) {
+ partialCachedConfig = configCache.getMergedVectorConfig(subvector);
+ if (partialCachedConfig) {
+ break;
+ }
+ subvector.pop();
+ nearestCacheIndex--;
+ }
+
+ if (!partialCachedConfig) {
+ partialCachedConfig = {};
+ }
+
+ let finalConfig = partialCachedConfig;
+
+ // Start from entry immediately following nearest cached config (first uncached entry)
+ for (let i = nearestCacheIndex + 1; i < vector.length; i++) {
+ finalConfig = this.mergeVectorEntry(finalConfig, vector[i], configCache);
+ configCache.setMergedVectorConfig(vector.slice(0, i + 1), finalConfig);
+ }
+
+ return finalConfig;
+ },
+
+ /**
+ * Merges the config options from a single vector entry into the supplied config.
+ * @param {Object} config the base config to merge the vector entry's options into
+ * @param {Object} vectorEntry a single entry from a vector, consisting of a config file path and an array of
+ * matching override indices
+ * @param {Object} configCache the config cache
+ * @returns {Object} merged config object
+ */
+ mergeVectorEntry(config, vectorEntry, configCache) {
+ const vectorEntryConfig = Object.assign({}, configCache.getConfig(vectorEntry.filePath));
+ let mergedConfig = Object.assign({}, config),
+ overrides;
+
+ if (vectorEntryConfig.overrides) {
+ overrides = vectorEntryConfig.overrides.filter(
+ (override, overrideIndex) => vectorEntry.matchingOverrides.indexOf(overrideIndex) !== -1
+ );
+ } else {
+ overrides = [];
+ }
+
+ mergedConfig = this.merge(mergedConfig, vectorEntryConfig);
+
+ delete mergedConfig.overrides;
+
+ mergedConfig = overrides.reduce((lastConfig, override) => this.merge(lastConfig, override), mergedConfig);
+
+ if (mergedConfig.filePath) {
+ delete mergedConfig.filePath;
+ delete mergedConfig.baseDirectory;
+ } else if (mergedConfig.files) {
+ delete mergedConfig.files;
+ }
+
+ return mergedConfig;
+ },
+
+ /**
+ * Checks that the specified file path matches all of the supplied glob patterns.
+ * @param {string} filePath The file path to test patterns against
+ * @param {string|string[]} patterns One or more glob patterns, of which at least one should match the file path
+ * @param {string|string[]} [excludedPatterns] One or more glob patterns, of which none should match the file path
+ * @returns {boolean} True if all the supplied patterns match the file path, false otherwise
+ */
+ pathMatchesGlobs(filePath, patterns, excludedPatterns) {
+ const patternList = [].concat(patterns);
+ const excludedPatternList = [].concat(excludedPatterns || []);
+
+ patternList.concat(excludedPatternList).forEach(pattern => {
+ if (path.isAbsolute(pattern) || pattern.includes("..")) {
+ throw new Error(`Invalid override pattern (expected relative path not containing '..'): ${pattern}`);
+ }
+ });
+
+ const opts = { matchBase: true };
+
+ return patternList.some(pattern => minimatch(filePath, pattern, opts)) &&
+ !excludedPatternList.some(excludedPattern => minimatch(filePath, excludedPattern, opts));
+ }
+};
diff --git a/tools/node_modules/eslint/lib/config/config-rule.js b/tools/node_modules/eslint/lib/config/config-rule.js
new file mode 100644
index 0000000000..5fc38ac5d1
--- /dev/null
+++ b/tools/node_modules/eslint/lib/config/config-rule.js
@@ -0,0 +1,322 @@
+/**
+ * @fileoverview Create configurations for a rule
+ * @author Ian VanSchooten
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const Rules = require("../rules"),
+ loadRules = require("../load-rules");
+
+const rules = new Rules();
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Wrap all of the elements of an array into arrays.
+ * @param {*[]} xs Any array.
+ * @returns {Array[]} An array of arrays.
+ */
+function explodeArray(xs) {
+ return xs.reduce((accumulator, x) => {
+ accumulator.push([x]);
+ return accumulator;
+ }, []);
+}
+
+/**
+ * Mix two arrays such that each element of the second array is concatenated
+ * onto each element of the first array.
+ *
+ * For example:
+ * combineArrays([a, [b, c]], [x, y]); // -> [[a, x], [a, y], [b, c, x], [b, c, y]]
+ *
+ * @param {array} arr1 The first array to combine.
+ * @param {array} arr2 The second array to combine.
+ * @returns {array} A mixture of the elements of the first and second arrays.
+ */
+function combineArrays(arr1, arr2) {
+ const res = [];
+
+ if (arr1.length === 0) {
+ return explodeArray(arr2);
+ }
+ if (arr2.length === 0) {
+ return explodeArray(arr1);
+ }
+ arr1.forEach(x1 => {
+ arr2.forEach(x2 => {
+ res.push([].concat(x1, x2));
+ });
+ });
+ return res;
+}
+
+/**
+ * Group together valid rule configurations based on object properties
+ *
+ * e.g.:
+ * groupByProperty([
+ * {before: true},
+ * {before: false},
+ * {after: true},
+ * {after: false}
+ * ]);
+ *
+ * will return:
+ * [
+ * [{before: true}, {before: false}],
+ * [{after: true}, {after: false}]
+ * ]
+ *
+ * @param {Object[]} objects Array of objects, each with one property/value pair
+ * @returns {Array[]} Array of arrays of objects grouped by property
+ */
+function groupByProperty(objects) {
+ const groupedObj = objects.reduce((accumulator, obj) => {
+ const prop = Object.keys(obj)[0];
+
+ accumulator[prop] = accumulator[prop] ? accumulator[prop].concat(obj) : [obj];
+ return accumulator;
+ }, {});
+
+ return Object.keys(groupedObj).map(prop => groupedObj[prop]);
+}
+
+
+//------------------------------------------------------------------------------
+// Private
+//------------------------------------------------------------------------------
+
+/**
+ * Configuration settings for a rule.
+ *
+ * A configuration can be a single number (severity), or an array where the first
+ * element in the array is the severity, and is the only required element.
+ * Configs may also have one or more additional elements to specify rule
+ * configuration or options.
+ *
+ * @typedef {array|number} ruleConfig
+ * @param {number} 0 The rule's severity (0, 1, 2).
+ */
+
+/**
+ * Object whose keys are rule names and values are arrays of valid ruleConfig items
+ * which should be linted against the target source code to determine error counts.
+ * (a ruleConfigSet.ruleConfigs).
+ *
+ * e.g. rulesConfig = {
+ * "comma-dangle": [2, [2, "always"], [2, "always-multiline"], [2, "never"]],
+ * "no-console": [2]
+ * }
+ * @typedef rulesConfig
+ */
+
+
+/**
+ * Create valid rule configurations by combining two arrays,
+ * with each array containing multiple objects each with a
+ * single property/value pair and matching properties.
+ *
+ * e.g.:
+ * combinePropertyObjects(
+ * [{before: true}, {before: false}],
+ * [{after: true}, {after: false}]
+ * );
+ *
+ * will return:
+ * [
+ * {before: true, after: true},
+ * {before: true, after: false},
+ * {before: false, after: true},
+ * {before: false, after: false}
+ * ]
+ *
+ * @param {Object[]} objArr1 Single key/value objects, all with the same key
+ * @param {Object[]} objArr2 Single key/value objects, all with another key
+ * @returns {Object[]} Combined objects for each combination of input properties and values
+ */
+function combinePropertyObjects(objArr1, objArr2) {
+ const res = [];
+
+ if (objArr1.length === 0) {
+ return objArr2;
+ }
+ if (objArr2.length === 0) {
+ return objArr1;
+ }
+ objArr1.forEach(obj1 => {
+ objArr2.forEach(obj2 => {
+ const combinedObj = {};
+ const obj1Props = Object.keys(obj1);
+ const obj2Props = Object.keys(obj2);
+
+ obj1Props.forEach(prop1 => {
+ combinedObj[prop1] = obj1[prop1];
+ });
+ obj2Props.forEach(prop2 => {
+ combinedObj[prop2] = obj2[prop2];
+ });
+ res.push(combinedObj);
+ });
+ });
+ return res;
+}
+
+/**
+ * Creates a new instance of a rule configuration set
+ *
+ * A rule configuration set is an array of configurations that are valid for a
+ * given rule. For example, the configuration set for the "semi" rule could be:
+ *
+ * ruleConfigSet.ruleConfigs // -> [[2], [2, "always"], [2, "never"]]
+ *
+ * Rule configuration set class
+ */
+class RuleConfigSet {
+
+ /**
+ * @param {ruleConfig[]} configs Valid rule configurations
+ */
+ constructor(configs) {
+
+ /**
+ * Stored valid rule configurations for this instance
+ * @type {array}
+ */
+ this.ruleConfigs = configs || [];
+ }
+
+ /**
+ * Add a severity level to the front of all configs in the instance.
+ * This should only be called after all configs have been added to the instance.
+ *
+ * @param {number} [severity=2] The level of severity for the rule (0, 1, 2)
+ * @returns {void}
+ */
+ addErrorSeverity(severity) {
+ severity = severity || 2;
+
+ this.ruleConfigs = this.ruleConfigs.map(config => {
+ config.unshift(severity);
+ return config;
+ });
+
+ // Add a single config at the beginning consisting of only the severity
+ this.ruleConfigs.unshift(severity);
+ }
+
+ /**
+ * Add rule configs from an array of strings (schema enums)
+ * @param {string[]} enums Array of valid rule options (e.g. ["always", "never"])
+ * @returns {void}
+ */
+ addEnums(enums) {
+ this.ruleConfigs = this.ruleConfigs.concat(combineArrays(this.ruleConfigs, enums));
+ }
+
+ /**
+ * Add rule configurations from a schema object
+ * @param {Object} obj Schema item with type === "object"
+ * @returns {boolean} true if at least one schema for the object could be generated, false otherwise
+ */
+ addObject(obj) {
+ const objectConfigSet = {
+ objectConfigs: [],
+ add(property, values) {
+ for (let idx = 0; idx < values.length; idx++) {
+ const optionObj = {};
+
+ optionObj[property] = values[idx];
+ this.objectConfigs.push(optionObj);
+ }
+ },
+
+ combine() {
+ this.objectConfigs = groupByProperty(this.objectConfigs).reduce((accumulator, objArr) => combinePropertyObjects(accumulator, objArr), []);
+ }
+ };
+
+ /*
+ * The object schema could have multiple independent properties.
+ * If any contain enums or booleans, they can be added and then combined
+ */
+ Object.keys(obj.properties).forEach(prop => {
+ if (obj.properties[prop].enum) {
+ objectConfigSet.add(prop, obj.properties[prop].enum);
+ }
+ if (obj.properties[prop].type && obj.properties[prop].type === "boolean") {
+ objectConfigSet.add(prop, [true, false]);
+ }
+ });
+ objectConfigSet.combine();
+
+ if (objectConfigSet.objectConfigs.length > 0) {
+ this.ruleConfigs = this.ruleConfigs.concat(combineArrays(this.ruleConfigs, objectConfigSet.objectConfigs));
+ return true;
+ }
+
+ return false;
+ }
+}
+
+/**
+ * Generate valid rule configurations based on a schema object
+ * @param {Object} schema A rule's schema object
+ * @returns {array[]} Valid rule configurations
+ */
+function generateConfigsFromSchema(schema) {
+ const configSet = new RuleConfigSet();
+
+ if (Array.isArray(schema)) {
+ for (const opt of schema) {
+ if (opt.enum) {
+ configSet.addEnums(opt.enum);
+ } else if (opt.type && opt.type === "object") {
+ if (!configSet.addObject(opt)) {
+ break;
+ }
+
+ // TODO (IanVS): support oneOf
+ } else {
+
+ // If we don't know how to fill in this option, don't fill in any of the following options.
+ break;
+ }
+ }
+ }
+ configSet.addErrorSeverity();
+ return configSet.ruleConfigs;
+}
+
+/**
+ * Generate possible rule configurations for all of the core rules
+ * @returns {rulesConfig} Hash of rule names and arrays of possible configurations
+ */
+function createCoreRuleConfigs() {
+ const ruleList = loadRules();
+
+ return Object.keys(ruleList).reduce((accumulator, id) => {
+ const rule = rules.get(id);
+ const schema = (typeof rule === "function") ? rule.schema : rule.meta.schema;
+
+ accumulator[id] = generateConfigsFromSchema(schema);
+ return accumulator;
+ }, {});
+}
+
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+module.exports = {
+ generateConfigsFromSchema,
+ createCoreRuleConfigs
+};
diff --git a/tools/node_modules/eslint/lib/config/config-validator.js b/tools/node_modules/eslint/lib/config/config-validator.js
new file mode 100644
index 0000000000..3d98b51045
--- /dev/null
+++ b/tools/node_modules/eslint/lib/config/config-validator.js
@@ -0,0 +1,244 @@
+/**
+ * @fileoverview Validates configs.
+ * @author Brandon Mills
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const ajv = require("../util/ajv"),
+ lodash = require("lodash"),
+ configSchema = require("../../conf/config-schema.js"),
+ util = require("util");
+
+const ruleValidators = new WeakMap();
+
+//------------------------------------------------------------------------------
+// Private
+//------------------------------------------------------------------------------
+let validateSchema;
+
+/**
+ * Gets a complete options schema for a rule.
+ * @param {{create: Function, schema: (Array|null)}} rule A new-style rule object
+ * @returns {Object} JSON Schema for the rule's options.
+ */
+function getRuleOptionsSchema(rule) {
+ const schema = rule.schema || rule.meta && rule.meta.schema;
+
+ // Given a tuple of schemas, insert warning level at the beginning
+ if (Array.isArray(schema)) {
+ if (schema.length) {
+ return {
+ type: "array",
+ items: schema,
+ minItems: 0,
+ maxItems: schema.length
+ };
+ }
+ return {
+ type: "array",
+ minItems: 0,
+ maxItems: 0
+ };
+
+ }
+
+ // Given a full schema, leave it alone
+ return schema || null;
+}
+
+/**
+ * Validates a rule's severity and returns the severity value. Throws an error if the severity is invalid.
+ * @param {options} options The given options for the rule.
+ * @returns {number|string} The rule's severity value
+ */
+function validateRuleSeverity(options) {
+ const severity = Array.isArray(options) ? options[0] : options;
+
+ if (severity !== 0 && severity !== 1 && severity !== 2 && !(typeof severity === "string" && /^(?:off|warn|error)$/i.test(severity))) {
+ throw new Error(`\tSeverity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed '${util.inspect(severity).replace(/'/g, "\"").replace(/\n/g, "")}').\n`);
+ }
+
+ return severity;
+}
+
+/**
+ * Validates the non-severity options passed to a rule, based on its schema.
+ * @param {{create: Function}} rule The rule to validate
+ * @param {array} localOptions The options for the rule, excluding severity
+ * @returns {void}
+ */
+function validateRuleSchema(rule, localOptions) {
+ if (!ruleValidators.has(rule)) {
+ const schema = getRuleOptionsSchema(rule);
+
+ if (schema) {
+ ruleValidators.set(rule, ajv.compile(schema));
+ }
+ }
+
+ const validateRule = ruleValidators.get(rule);
+
+ if (validateRule) {
+ validateRule(localOptions);
+ if (validateRule.errors) {
+ throw new Error(validateRule.errors.map(
+ error => `\tValue ${JSON.stringify(error.data)} ${error.message}.\n`
+ ).join(""));
+ }
+ }
+}
+
+/**
+ * Validates a rule's options against its schema.
+ * @param {{create: Function}|null} rule The rule that the config is being validated for
+ * @param {string} ruleId The rule's unique name.
+ * @param {array|number} options The given options for the rule.
+ * @param {string} source The name of the configuration source to report in any errors.
+ * @returns {void}
+ */
+function validateRuleOptions(rule, ruleId, options, source) {
+ if (!rule) {
+ return;
+ }
+ try {
+ const severity = validateRuleSeverity(options);
+
+ if (severity !== 0 && !(typeof severity === "string" && severity.toLowerCase() === "off")) {
+ validateRuleSchema(rule, Array.isArray(options) ? options.slice(1) : []);
+ }
+ } catch (err) {
+ throw new Error(`${source}:\n\tConfiguration for rule "${ruleId}" is invalid:\n${err.message}`);
+ }
+}
+
+/**
+ * Validates an environment object
+ * @param {Object} environment The environment config object to validate.
+ * @param {string} source The name of the configuration source to report in any errors.
+ * @param {Environments} envContext Env context
+ * @returns {void}
+ */
+function validateEnvironment(environment, source, envContext) {
+
+ // not having an environment is ok
+ if (!environment) {
+ return;
+ }
+
+ Object.keys(environment).forEach(env => {
+ if (!envContext.get(env)) {
+ const message = `${source}:\n\tEnvironment key "${env}" is unknown\n`;
+
+ throw new Error(message);
+ }
+ });
+}
+
+/**
+ * Validates a rules config object
+ * @param {Object} rulesConfig The rules config object to validate.
+ * @param {string} source The name of the configuration source to report in any errors.
+ * @param {function(string): {create: Function}} ruleMapper A mapper function from strings to loaded rules
+ * @returns {void}
+ */
+function validateRules(rulesConfig, source, ruleMapper) {
+ if (!rulesConfig) {
+ return;
+ }
+
+ Object.keys(rulesConfig).forEach(id => {
+ validateRuleOptions(ruleMapper(id), id, rulesConfig[id], source);
+ });
+}
+
+/**
+ * Formats an array of schema validation errors.
+ * @param {Array} errors An array of error messages to format.
+ * @returns {string} Formatted error message
+ */
+function formatErrors(errors) {
+ return errors.map(error => {
+ if (error.keyword === "additionalProperties") {
+ const formattedPropertyPath = error.dataPath.length ? `${error.dataPath.slice(1)}.${error.params.additionalProperty}` : error.params.additionalProperty;
+
+ return `Unexpected top-level property "${formattedPropertyPath}"`;
+ }
+ if (error.keyword === "type") {
+ const formattedField = error.dataPath.slice(1);
+ const formattedExpectedType = Array.isArray(error.schema) ? error.schema.join("/") : error.schema;
+ const formattedValue = JSON.stringify(error.data);
+
+ return `Property "${formattedField}" is the wrong type (expected ${formattedExpectedType} but got \`${formattedValue}\`)`;
+ }
+
+ const field = error.dataPath[0] === "." ? error.dataPath.slice(1) : error.dataPath;
+
+ return `"${field}" ${error.message}. Value: ${JSON.stringify(error.data)}`;
+ }).map(message => `\t- ${message}.\n`).join("");
+}
+
+/**
+ * Emits a deprecation warning containing a given filepath. A new deprecation warning is emitted
+ * for each unique file path, but repeated invocations with the same file path have no effect.
+ * No warnings are emitted if the `--no-deprecation` or `--no-warnings` Node runtime flags are active.
+ * @param {string} source The name of the configuration source to report the warning for.
+ * @returns {void}
+ */
+const emitEcmaFeaturesWarning = lodash.memoize(source => {
+
+ /*
+ * util.deprecate seems to be the only way to emit a warning in Node 4.x while respecting the --no-warnings flag.
+ * (In Node 6+, process.emitWarning could be used instead.)
+ */
+ util.deprecate(
+ () => {},
+ `[eslint] The 'ecmaFeatures' config file property is deprecated, and has no effect. (found in ${source})`
+ )();
+});
+
+/**
+ * Validates the top level properties of the config object.
+ * @param {Object} config The config object to validate.
+ * @param {string} source The name of the configuration source to report in any errors.
+ * @returns {void}
+ */
+function validateConfigSchema(config, source) {
+ validateSchema = validateSchema || ajv.compile(configSchema);
+
+ if (!validateSchema(config)) {
+ throw new Error(`ESLint configuration in ${source} is invalid:\n${formatErrors(validateSchema.errors)}`);
+ }
+
+ if (Object.prototype.hasOwnProperty.call(config, "ecmaFeatures")) {
+ emitEcmaFeaturesWarning(source);
+ }
+}
+
+/**
+ * Validates an entire config object.
+ * @param {Object} config The config object to validate.
+ * @param {string} source The name of the configuration source to report in any errors.
+ * @param {function(string): {create: Function}} ruleMapper A mapper function from rule IDs to defined rules
+ * @param {Environments} envContext The env context
+ * @returns {void}
+ */
+function validate(config, source, ruleMapper, envContext) {
+ validateConfigSchema(config, source);
+ validateRules(config.rules, source, ruleMapper);
+ validateEnvironment(config.env, source, envContext);
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+module.exports = {
+ getRuleOptionsSchema,
+ validate,
+ validateRuleOptions
+};
diff --git a/tools/node_modules/eslint/lib/config/environments.js b/tools/node_modules/eslint/lib/config/environments.js
new file mode 100644
index 0000000000..1ec9438af5
--- /dev/null
+++ b/tools/node_modules/eslint/lib/config/environments.js
@@ -0,0 +1,84 @@
+/**
+ * @fileoverview Environments manager
+ * @author Nicholas C. Zakas
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const envs = require("../../conf/environments");
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+class Environments {
+
+ /**
+ * create env context
+ */
+ constructor() {
+ this._environments = new Map();
+
+ this.load();
+ }
+
+ /**
+ * Loads the default environments.
+ * @returns {void}
+ * @private
+ */
+ load() {
+ Object.keys(envs).forEach(envName => {
+ this._environments.set(envName, envs[envName]);
+ });
+ }
+
+ /**
+ * Gets the environment with the given name.
+ * @param {string} name The name of the environment to retrieve.
+ * @returns {Object?} The environment object or null if not found.
+ */
+ get(name) {
+ return this._environments.get(name) || null;
+ }
+
+ /**
+ * Gets all the environment present
+ * @returns {Object} The environment object for each env name
+ */
+ getAll() {
+ return Array.from(this._environments).reduce((coll, env) => {
+ coll[env[0]] = env[1];
+ return coll;
+ }, {});
+ }
+
+ /**
+ * Defines an environment.
+ * @param {string} name The name of the environment.
+ * @param {Object} env The environment settings.
+ * @returns {void}
+ */
+ define(name, env) {
+ this._environments.set(name, env);
+ }
+
+ /**
+ * Imports all environments from a plugin.
+ * @param {Object} plugin The plugin object.
+ * @param {string} pluginName The name of the plugin.
+ * @returns {void}
+ */
+ importPlugin(plugin, pluginName) {
+ if (plugin.environments) {
+ Object.keys(plugin.environments).forEach(envName => {
+ this.define(`${pluginName}/${envName}`, plugin.environments[envName]);
+ });
+ }
+ }
+}
+
+module.exports = Environments;
diff --git a/tools/node_modules/eslint/lib/config/plugins.js b/tools/node_modules/eslint/lib/config/plugins.js
new file mode 100644
index 0000000000..c509c48fe2
--- /dev/null
+++ b/tools/node_modules/eslint/lib/config/plugins.js
@@ -0,0 +1,150 @@
+/**
+ * @fileoverview Plugins manager
+ * @author Nicholas C. Zakas
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const debug = require("debug")("eslint:plugins");
+const naming = require("../util/naming");
+
+//------------------------------------------------------------------------------
+// Private
+//------------------------------------------------------------------------------
+
+const PLUGIN_NAME_PREFIX = "eslint-plugin-";
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+/**
+ * Plugin class
+ */
+class Plugins {
+
+ /**
+ * Creates the plugins context
+ * @param {Environments} envContext - env context
+ * @param {Rules} rulesContext - rules context
+ */
+ constructor(envContext, rulesContext) {
+ this._plugins = Object.create(null);
+ this._environments = envContext;
+ this._rules = rulesContext;
+ }
+
+ /**
+ * Defines a plugin with a given name rather than loading from disk.
+ * @param {string} pluginName The name of the plugin to load.
+ * @param {Object} plugin The plugin object.
+ * @returns {void}
+ */
+ define(pluginName, plugin) {
+ const pluginNamespace = naming.getNamespaceFromTerm(pluginName),
+ pluginNameWithoutNamespace = naming.removeNamespaceFromTerm(pluginName),
+ pluginNameWithoutPrefix = naming.removePrefixFromTerm(PLUGIN_NAME_PREFIX, pluginNameWithoutNamespace),
+ shortName = pluginNamespace + pluginNameWithoutPrefix;
+
+ // load up environments and rules
+ this._plugins[shortName] = plugin;
+ this._environments.importPlugin(plugin, shortName);
+ this._rules.importPlugin(plugin, shortName);
+ }
+
+ /**
+ * Gets a plugin with the given name.
+ * @param {string} pluginName The name of the plugin to retrieve.
+ * @returns {Object} The plugin or null if not loaded.
+ */
+ get(pluginName) {
+ return this._plugins[pluginName] || null;
+ }
+
+ /**
+ * Returns all plugins that are loaded.
+ * @returns {Object} The plugins cache.
+ */
+ getAll() {
+ return this._plugins;
+ }
+
+ /**
+ * Loads a plugin with the given name.
+ * @param {string} pluginName The name of the plugin to load.
+ * @returns {void}
+ * @throws {Error} If the plugin cannot be loaded.
+ */
+ load(pluginName) {
+ const pluginNamespace = naming.getNamespaceFromTerm(pluginName),
+ pluginNameWithoutNamespace = naming.removeNamespaceFromTerm(pluginName),
+ pluginNameWithoutPrefix = naming.removePrefixFromTerm(PLUGIN_NAME_PREFIX, pluginNameWithoutNamespace),
+ shortName = pluginNamespace + pluginNameWithoutPrefix,
+ longName = pluginNamespace + PLUGIN_NAME_PREFIX + pluginNameWithoutPrefix;
+ let plugin = null;
+
+ if (pluginName.match(/\s+/)) {
+ const whitespaceError = new Error(`Whitespace found in plugin name '${pluginName}'`);
+
+ whitespaceError.messageTemplate = "whitespace-found";
+ whitespaceError.messageData = {
+ pluginName: longName
+ };
+ throw whitespaceError;
+ }
+
+ if (!this._plugins[shortName]) {
+ try {
+ plugin = require(longName);
+ } catch (pluginLoadErr) {
+ try {
+
+ // Check whether the plugin exists
+ require.resolve(longName);
+ } catch (missingPluginErr) {
+
+ // If the plugin can't be resolved, display the missing plugin error (usually a config or install error)
+ debug(`Failed to load plugin ${longName}.`);
+ missingPluginErr.message = `Failed to load plugin ${pluginName}: ${missingPluginErr.message}`;
+ missingPluginErr.messageTemplate = "plugin-missing";
+ missingPluginErr.messageData = {
+ pluginName: longName
+ };
+ throw missingPluginErr;
+ }
+
+ // Otherwise, the plugin exists and is throwing on module load for some reason, so print the stack trace.
+ throw pluginLoadErr;
+ }
+
+ this.define(pluginName, plugin);
+ }
+ }
+
+ /**
+ * Loads all plugins from an array.
+ * @param {string[]} pluginNames An array of plugins names.
+ * @returns {void}
+ * @throws {Error} If a plugin cannot be loaded.
+ * @throws {Error} If "plugins" in config is not an array
+ */
+ loadAll(pluginNames) {
+
+ // if "plugins" in config is not an array, throw an error so user can fix their config.
+ if (!Array.isArray(pluginNames)) {
+ const pluginNotArrayMessage = "ESLint configuration error: \"plugins\" value must be an array";
+
+ debug(`${pluginNotArrayMessage}: ${JSON.stringify(pluginNames)}`);
+
+ throw new Error(pluginNotArrayMessage);
+ }
+
+ // load each plugin by name
+ pluginNames.forEach(this.load, this);
+ }
+}
+
+module.exports = Plugins;
diff --git a/tools/node_modules/eslint/lib/file-finder.js b/tools/node_modules/eslint/lib/file-finder.js
new file mode 100644
index 0000000000..3458bbf52a
--- /dev/null
+++ b/tools/node_modules/eslint/lib/file-finder.js
@@ -0,0 +1,145 @@
+/**
+ * @fileoverview Util class to find config files.
+ * @author Aliaksei Shytkin
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const fs = require("fs"),
+ path = require("path");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Get the entries for a directory. Including a try-catch may be detrimental to
+ * function performance, so move it out here a separate function.
+ * @param {string} directory The directory to search in.
+ * @returns {string[]} The entries in the directory or an empty array on error.
+ * @private
+ */
+function getDirectoryEntries(directory) {
+ try {
+
+ return fs.readdirSync(directory);
+ } catch (ex) {
+ return [];
+ }
+}
+
+/**
+ * Create a hash of filenames from a directory listing
+ * @param {string[]} entries Array of directory entries.
+ * @param {string} directory Path to a current directory.
+ * @param {string[]} supportedConfigs List of support filenames.
+ * @returns {Object} Hashmap of filenames
+ */
+function normalizeDirectoryEntries(entries, directory, supportedConfigs) {
+ const fileHash = {};
+
+ entries.forEach(entry => {
+ if (supportedConfigs.indexOf(entry) >= 0) {
+ const resolvedEntry = path.resolve(directory, entry);
+
+ if (fs.statSync(resolvedEntry).isFile()) {
+ fileHash[entry] = resolvedEntry;
+ }
+ }
+ });
+ return fileHash;
+}
+
+//------------------------------------------------------------------------------
+// API
+//------------------------------------------------------------------------------
+
+/**
+ * FileFinder class
+ */
+class FileFinder {
+
+ /**
+ * @param {string[]} files The basename(s) of the file(s) to find.
+ * @param {stirng} cwd Current working directory
+ */
+ constructor(files, cwd) {
+ this.fileNames = Array.isArray(files) ? files : [files];
+ this.cwd = cwd || process.cwd();
+ this.cache = {};
+ }
+
+ /**
+ * Find all instances of files with the specified file names, in directory and
+ * parent directories. Cache the results.
+ * Does not check if a matching directory entry is a file.
+ * Searches for all the file names in this.fileNames.
+ * Is currently used by lib/config.js to find .eslintrc and package.json files.
+ * @param {string} directory The directory to start the search from.
+ * @returns {GeneratorFunction} to iterate the file paths found
+ */
+ *findAllInDirectoryAndParents(directory) {
+ const cache = this.cache;
+
+ if (directory) {
+ directory = path.resolve(this.cwd, directory);
+ } else {
+ directory = this.cwd;
+ }
+
+ if (cache.hasOwnProperty(directory)) {
+ yield* cache[directory];
+ return; // to avoid doing the normal loop afterwards
+ }
+
+ const dirs = [];
+ const fileNames = this.fileNames;
+ let searched = 0;
+
+ do {
+ dirs[searched++] = directory;
+ cache[directory] = [];
+
+ const filesMap = normalizeDirectoryEntries(getDirectoryEntries(directory), directory, fileNames);
+
+ if (Object.keys(filesMap).length) {
+ for (let k = 0; k < fileNames.length; k++) {
+
+ if (filesMap[fileNames[k]]) {
+ const filePath = filesMap[fileNames[k]];
+
+ // Add the file path to the cache of each directory searched.
+ for (let j = 0; j < searched; j++) {
+ cache[dirs[j]].push(filePath);
+ }
+ yield filePath;
+ break;
+ }
+ }
+ }
+
+ const child = directory;
+
+ // Assign parent directory to directory.
+ directory = path.dirname(directory);
+
+ if (directory === child) {
+ return;
+ }
+
+ } while (!cache.hasOwnProperty(directory));
+
+ // Add what has been cached previously to the cache of each directory searched.
+ for (let i = 0; i < searched; i++) {
+ dirs.push.apply(cache[dirs[i]], cache[directory]);
+ }
+
+ yield* cache[dirs[0]];
+ }
+}
+
+module.exports = FileFinder;
diff --git a/tools/node_modules/eslint/lib/formatters/checkstyle.js b/tools/node_modules/eslint/lib/formatters/checkstyle.js
new file mode 100644
index 0000000000..720e831a3e
--- /dev/null
+++ b/tools/node_modules/eslint/lib/formatters/checkstyle.js
@@ -0,0 +1,60 @@
+/**
+ * @fileoverview CheckStyle XML reporter
+ * @author Ian Christian Myers
+ */
+"use strict";
+
+const xmlEscape = require("../util/xml-escape");
+
+//------------------------------------------------------------------------------
+// Helper Functions
+//------------------------------------------------------------------------------
+
+/**
+ * Returns the severity of warning or error
+ * @param {Object} message message object to examine
+ * @returns {string} severity level
+ * @private
+ */
+function getMessageType(message) {
+ if (message.fatal || message.severity === 2) {
+ return "error";
+ }
+ return "warning";
+
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+module.exports = function(results) {
+
+ let output = "";
+
+ output += "<?xml version=\"1.1\" encoding=\"utf-8\"?>";
+ output += "<checkstyle version=\"4.3\">";
+
+ results.forEach(result => {
+ const messages = result.messages;
+
+ output += `<file name="${xmlEscape(result.filePath)}">`;
+
+ messages.forEach(message => {
+ output += [
+ `<error line="${xmlEscape(message.line)}"`,
+ `column="${xmlEscape(message.column)}"`,
+ `severity="${xmlEscape(getMessageType(message))}"`,
+ `message="${xmlEscape(message.message)}${message.ruleId ? ` (${message.ruleId})` : ""}"`,
+ `source="${message.ruleId ? xmlEscape(`eslint.rules.${message.ruleId}`) : ""}" />`
+ ].join(" ");
+ });
+
+ output += "</file>";
+
+ });
+
+ output += "</checkstyle>";
+
+ return output;
+};
diff --git a/tools/node_modules/eslint/lib/formatters/codeframe.js b/tools/node_modules/eslint/lib/formatters/codeframe.js
new file mode 100644
index 0000000000..0b97a0d818
--- /dev/null
+++ b/tools/node_modules/eslint/lib/formatters/codeframe.js
@@ -0,0 +1,138 @@
+/**
+ * @fileoverview Codeframe reporter
+ * @author Vitor Balocco
+ */
+"use strict";
+
+const chalk = require("chalk");
+const codeFrame = require("babel-code-frame");
+const path = require("path");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Given a word and a count, append an s if count is not one.
+ * @param {string} word A word in its singular form.
+ * @param {number} count A number controlling whether word should be pluralized.
+ * @returns {string} The original word with an s on the end if count is not one.
+ */
+function pluralize(word, count) {
+ return (count === 1 ? word : `${word}s`);
+}
+
+/**
+ * Gets a formatted relative file path from an absolute path and a line/column in the file.
+ * @param {string} filePath The absolute file path to format.
+ * @param {number} line The line from the file to use for formatting.
+ * @param {number} column The column from the file to use for formatting.
+ * @returns {string} The formatted file path.
+ */
+function formatFilePath(filePath, line, column) {
+ let relPath = path.relative(process.cwd(), filePath);
+
+ if (line && column) {
+ relPath += `:${line}:${column}`;
+ }
+
+ return chalk.green(relPath);
+}
+
+/**
+ * Gets the formatted output for a given message.
+ * @param {Object} message The object that represents this message.
+ * @param {Object} parentResult The result object that this message belongs to.
+ * @returns {string} The formatted output.
+ */
+function formatMessage(message, parentResult) {
+ const type = (message.fatal || message.severity === 2) ? chalk.red("error") : chalk.yellow("warning");
+ const msg = `${chalk.bold(message.message.replace(/([^ ])\.$/, "$1"))}`;
+ const ruleId = message.fatal ? "" : chalk.dim(`(${message.ruleId})`);
+ const filePath = formatFilePath(parentResult.filePath, message.line, message.column);
+ const sourceCode = parentResult.output ? parentResult.output : parentResult.source;
+
+ const firstLine = [
+ `${type}:`,
+ `${msg}`,
+ ruleId ? `${ruleId}` : "",
+ sourceCode ? `at ${filePath}:` : `at ${filePath}`
+ ].filter(String).join(" ");
+
+ const result = [firstLine];
+
+ if (sourceCode) {
+ result.push(
+ codeFrame(sourceCode, message.line, message.column, { highlightCode: false })
+ );
+ }
+
+ return result.join("\n");
+}
+
+/**
+ * Gets the formatted output summary for a given number of errors and warnings.
+ * @param {number} errors The number of errors.
+ * @param {number} warnings The number of warnings.
+ * @param {number} fixableErrors The number of fixable errors.
+ * @param {number} fixableWarnings The number of fixable warnings.
+ * @returns {string} The formatted output summary.
+ */
+function formatSummary(errors, warnings, fixableErrors, fixableWarnings) {
+ const summaryColor = errors > 0 ? "red" : "yellow";
+ const summary = [];
+ const fixablesSummary = [];
+
+ if (errors > 0) {
+ summary.push(`${errors} ${pluralize("error", errors)}`);
+ }
+
+ if (warnings > 0) {
+ summary.push(`${warnings} ${pluralize("warning", warnings)}`);
+ }
+
+ if (fixableErrors > 0) {
+ fixablesSummary.push(`${fixableErrors} ${pluralize("error", fixableErrors)}`);
+ }
+
+ if (fixableWarnings > 0) {
+ fixablesSummary.push(`${fixableWarnings} ${pluralize("warning", fixableWarnings)}`);
+ }
+
+ let output = chalk[summaryColor].bold(`${summary.join(" and ")} found.`);
+
+ if (fixableErrors || fixableWarnings) {
+ output += chalk[summaryColor].bold(`\n${fixablesSummary.join(" and ")} potentially fixable with the \`--fix\` option.`);
+ }
+
+ return output;
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+module.exports = function(results) {
+ let errors = 0;
+ let warnings = 0;
+ let fixableErrors = 0;
+ let fixableWarnings = 0;
+
+ const resultsWithMessages = results.filter(result => result.messages.length > 0);
+
+ let output = resultsWithMessages.reduce((resultsOutput, result) => {
+ const messages = result.messages.map(message => `${formatMessage(message, result)}\n\n`);
+
+ errors += result.errorCount;
+ warnings += result.warningCount;
+ fixableErrors += result.fixableErrorCount;
+ fixableWarnings += result.fixableWarningCount;
+
+ return resultsOutput.concat(messages);
+ }, []).join("\n");
+
+ output += "\n";
+ output += formatSummary(errors, warnings, fixableErrors, fixableWarnings);
+
+ return (errors + warnings) > 0 ? output : "";
+};
diff --git a/tools/node_modules/eslint/lib/formatters/compact.js b/tools/node_modules/eslint/lib/formatters/compact.js
new file mode 100644
index 0000000000..2b540bde23
--- /dev/null
+++ b/tools/node_modules/eslint/lib/formatters/compact.js
@@ -0,0 +1,60 @@
+/**
+ * @fileoverview Compact reporter
+ * @author Nicholas C. Zakas
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Helper Functions
+//------------------------------------------------------------------------------
+
+/**
+ * Returns the severity of warning or error
+ * @param {Object} message message object to examine
+ * @returns {string} severity level
+ * @private
+ */
+function getMessageType(message) {
+ if (message.fatal || message.severity === 2) {
+ return "Error";
+ }
+ return "Warning";
+
+}
+
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+module.exports = function(results) {
+
+ let output = "",
+ total = 0;
+
+ results.forEach(result => {
+
+ const messages = result.messages;
+
+ total += messages.length;
+
+ messages.forEach(message => {
+
+ output += `${result.filePath}: `;
+ output += `line ${message.line || 0}`;
+ output += `, col ${message.column || 0}`;
+ output += `, ${getMessageType(message)}`;
+ output += ` - ${message.message}`;
+ output += message.ruleId ? ` (${message.ruleId})` : "";
+ output += "\n";
+
+ });
+
+ });
+
+ if (total > 0) {
+ output += `\n${total} problem${total !== 1 ? "s" : ""}`;
+ }
+
+ return output;
+};
diff --git a/tools/node_modules/eslint/lib/formatters/html-template-message.html b/tools/node_modules/eslint/lib/formatters/html-template-message.html
new file mode 100644
index 0000000000..66f49ff49d
--- /dev/null
+++ b/tools/node_modules/eslint/lib/formatters/html-template-message.html
@@ -0,0 +1,8 @@
+<tr style="display:none" class="f-<%= parentIndex %>">
+ <td><%= lineNumber %>:<%= columnNumber %></td>
+ <td class="clr-<%= severityNumber %>"><%= severityName %></td>
+ <td><%- message %></td>
+ <td>
+ <a href="https://eslint.org/docs/rules/<%= ruleId %>" target="_blank"><%= ruleId %></a>
+ </td>
+</tr>
diff --git a/tools/node_modules/eslint/lib/formatters/html-template-page.html b/tools/node_modules/eslint/lib/formatters/html-template-page.html
new file mode 100644
index 0000000000..4016576fa0
--- /dev/null
+++ b/tools/node_modules/eslint/lib/formatters/html-template-page.html
@@ -0,0 +1,115 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="UTF-8">
+ <title>ESLint Report</title>
+ <style>
+ body {
+ font-family:Arial, "Helvetica Neue", Helvetica, sans-serif;
+ font-size:16px;
+ font-weight:normal;
+ margin:0;
+ padding:0;
+ color:#333
+ }
+ #overview {
+ padding:20px 30px
+ }
+ td, th {
+ padding:5px 10px
+ }
+ h1 {
+ margin:0
+ }
+ table {
+ margin:30px;
+ width:calc(100% - 60px);
+ max-width:1000px;
+ border-radius:5px;
+ border:1px solid #ddd;
+ border-spacing:0px;
+ }
+ th {
+ font-weight:400;
+ font-size:medium;
+ text-align:left;
+ cursor:pointer
+ }
+ td.clr-1, td.clr-2, th span {
+ font-weight:700
+ }
+ th span {
+ float:right;
+ margin-left:20px
+ }
+ th span:after {
+ content:"";
+ clear:both;
+ display:block
+ }
+ tr:last-child td {
+ border-bottom:none
+ }
+ tr td:first-child, tr td:last-child {
+ color:#9da0a4
+ }
+ #overview.bg-0, tr.bg-0 th {
+ color:#468847;
+ background:#dff0d8;
+ border-bottom:1px solid #d6e9c6
+ }
+ #overview.bg-1, tr.bg-1 th {
+ color:#f0ad4e;
+ background:#fcf8e3;
+ border-bottom:1px solid #fbeed5
+ }
+ #overview.bg-2, tr.bg-2 th {
+ color:#b94a48;
+ background:#f2dede;
+ border-bottom:1px solid #eed3d7
+ }
+ td {
+ border-bottom:1px solid #ddd
+ }
+ td.clr-1 {
+ color:#f0ad4e
+ }
+ td.clr-2 {
+ color:#b94a48
+ }
+ td a {
+ color:#3a33d1;
+ text-decoration:none
+ }
+ td a:hover {
+ color:#272296;
+ text-decoration:underline
+ }
+ </style>
+ </head>
+ <body>
+ <div id="overview" class="bg-<%= reportColor %>">
+ <h1>ESLint Report</h1>
+ <div>
+ <span><%= reportSummary %></span> - Generated on <%= date %>
+ </div>
+ </div>
+ <table>
+ <tbody>
+ <%= results %>
+ </tbody>
+ </table>
+ <script type="text/javascript">
+ var groups = document.querySelectorAll("tr[data-group]");
+ for (i = 0; i < groups.length; i++) {
+ groups[i].addEventListener("click", function() {
+ var inGroup = document.getElementsByClassName(this.getAttribute("data-group"));
+ this.innerHTML = (this.innerHTML.indexOf("+") > -1) ? this.innerHTML.replace("+", "-") : this.innerHTML.replace("-", "+");
+ for (var j = 0; j < inGroup.length; j++) {
+ inGroup[j].style.display = (inGroup[j].style.display !== "none") ? "none" : "table-row";
+ }
+ });
+ }
+ </script>
+ </body>
+</html>
diff --git a/tools/node_modules/eslint/lib/formatters/html-template-result.html b/tools/node_modules/eslint/lib/formatters/html-template-result.html
new file mode 100644
index 0000000000..f4a55933c2
--- /dev/null
+++ b/tools/node_modules/eslint/lib/formatters/html-template-result.html
@@ -0,0 +1,6 @@
+<tr class="bg-<%- color %>" data-group="f-<%- index %>">
+ <th colspan="4">
+ [+] <%- filePath %>
+ <span><%- summary %></span>
+ </th>
+</tr>
diff --git a/tools/node_modules/eslint/lib/formatters/html.js b/tools/node_modules/eslint/lib/formatters/html.js
new file mode 100644
index 0000000000..d450f9dee2
--- /dev/null
+++ b/tools/node_modules/eslint/lib/formatters/html.js
@@ -0,0 +1,127 @@
+/**
+ * @fileoverview HTML reporter
+ * @author Julian Laval
+ */
+"use strict";
+
+const lodash = require("lodash");
+const fs = require("fs");
+const path = require("path");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+const pageTemplate = lodash.template(fs.readFileSync(path.join(__dirname, "html-template-page.html"), "utf-8"));
+const messageTemplate = lodash.template(fs.readFileSync(path.join(__dirname, "html-template-message.html"), "utf-8"));
+const resultTemplate = lodash.template(fs.readFileSync(path.join(__dirname, "html-template-result.html"), "utf-8"));
+
+/**
+ * Given a word and a count, append an s if count is not one.
+ * @param {string} word A word in its singular form.
+ * @param {int} count A number controlling whether word should be pluralized.
+ * @returns {string} The original word with an s on the end if count is not one.
+ */
+function pluralize(word, count) {
+ return (count === 1 ? word : `${word}s`);
+}
+
+/**
+ * Renders text along the template of x problems (x errors, x warnings)
+ * @param {string} totalErrors Total errors
+ * @param {string} totalWarnings Total warnings
+ * @returns {string} The formatted string, pluralized where necessary
+ */
+function renderSummary(totalErrors, totalWarnings) {
+ const totalProblems = totalErrors + totalWarnings;
+ let renderedText = `${totalProblems} ${pluralize("problem", totalProblems)}`;
+
+ if (totalProblems !== 0) {
+ renderedText += ` (${totalErrors} ${pluralize("error", totalErrors)}, ${totalWarnings} ${pluralize("warning", totalWarnings)})`;
+ }
+ return renderedText;
+}
+
+/**
+ * Get the color based on whether there are errors/warnings...
+ * @param {string} totalErrors Total errors
+ * @param {string} totalWarnings Total warnings
+ * @returns {int} The color code (0 = green, 1 = yellow, 2 = red)
+ */
+function renderColor(totalErrors, totalWarnings) {
+ if (totalErrors !== 0) {
+ return 2;
+ }
+ if (totalWarnings !== 0) {
+ return 1;
+ }
+ return 0;
+}
+
+/**
+ * Get HTML (table rows) describing the messages.
+ * @param {Array} messages Messages.
+ * @param {int} parentIndex Index of the parent HTML row.
+ * @returns {string} HTML (table rows) describing the messages.
+ */
+function renderMessages(messages, parentIndex) {
+
+ /**
+ * Get HTML (table row) describing a message.
+ * @param {Object} message Message.
+ * @returns {string} HTML (table row) describing a message.
+ */
+ return lodash.map(messages, message => {
+ const lineNumber = message.line || 0;
+ const columnNumber = message.column || 0;
+
+ return messageTemplate({
+ parentIndex,
+ lineNumber,
+ columnNumber,
+ severityNumber: message.severity,
+ severityName: message.severity === 1 ? "Warning" : "Error",
+ message: message.message,
+ ruleId: message.ruleId
+ });
+ }).join("\n");
+}
+
+/**
+ * @param {Array} results Test results.
+ * @returns {string} HTML string describing the results.
+ */
+function renderResults(results) {
+ return lodash.map(results, (result, index) => resultTemplate({
+ index,
+ color: renderColor(result.errorCount, result.warningCount),
+ filePath: result.filePath,
+ summary: renderSummary(result.errorCount, result.warningCount)
+
+ }) + renderMessages(result.messages, index)).join("\n");
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+module.exports = function(results) {
+ let totalErrors,
+ totalWarnings;
+
+ totalErrors = 0;
+ totalWarnings = 0;
+
+ // Iterate over results to get totals
+ results.forEach(result => {
+ totalErrors += result.errorCount;
+ totalWarnings += result.warningCount;
+ });
+
+ return pageTemplate({
+ date: new Date(),
+ reportColor: renderColor(totalErrors, totalWarnings),
+ reportSummary: renderSummary(totalErrors, totalWarnings),
+ results: renderResults(results)
+ });
+};
diff --git a/tools/node_modules/eslint/lib/formatters/jslint-xml.js b/tools/node_modules/eslint/lib/formatters/jslint-xml.js
new file mode 100644
index 0000000000..e152d8bdd7
--- /dev/null
+++ b/tools/node_modules/eslint/lib/formatters/jslint-xml.js
@@ -0,0 +1,41 @@
+/**
+ * @fileoverview JSLint XML reporter
+ * @author Ian Christian Myers
+ */
+"use strict";
+
+const xmlEscape = require("../util/xml-escape");
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+module.exports = function(results) {
+
+ let output = "";
+
+ output += "<?xml version=\"1.1\" encoding=\"utf-8\"?>";
+ output += "<jslint>";
+
+ results.forEach(result => {
+ const messages = result.messages;
+
+ output += `<file name="${result.filePath}">`;
+
+ messages.forEach(message => {
+ output += [
+ `<issue line="${message.line}"`,
+ `char="${message.column}"`,
+ `evidence="${xmlEscape(message.source || "")}"`,
+ `reason="${xmlEscape(message.message || "")}${message.ruleId ? ` (${message.ruleId})` : ""}" />`
+ ].join(" ");
+ });
+
+ output += "</file>";
+
+ });
+
+ output += "</jslint>";
+
+ return output;
+};
diff --git a/tools/node_modules/eslint/lib/formatters/json.js b/tools/node_modules/eslint/lib/formatters/json.js
new file mode 100644
index 0000000000..82138af187
--- /dev/null
+++ b/tools/node_modules/eslint/lib/formatters/json.js
@@ -0,0 +1,13 @@
+/**
+ * @fileoverview JSON reporter
+ * @author Burak Yigit Kaya aka BYK
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+module.exports = function(results) {
+ return JSON.stringify(results);
+};
diff --git a/tools/node_modules/eslint/lib/formatters/junit.js b/tools/node_modules/eslint/lib/formatters/junit.js
new file mode 100644
index 0000000000..ca666bb14c
--- /dev/null
+++ b/tools/node_modules/eslint/lib/formatters/junit.js
@@ -0,0 +1,70 @@
+/**
+ * @fileoverview jUnit Reporter
+ * @author Jamund Ferguson
+ */
+"use strict";
+
+const xmlEscape = require("../util/xml-escape");
+
+//------------------------------------------------------------------------------
+// Helper Functions
+//------------------------------------------------------------------------------
+
+/**
+ * Returns the severity of warning or error
+ * @param {Object} message message object to examine
+ * @returns {string} severity level
+ * @private
+ */
+function getMessageType(message) {
+ if (message.fatal || message.severity === 2) {
+ return "Error";
+ }
+ return "Warning";
+
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+module.exports = function(results) {
+
+ let output = "";
+
+ output += "<?xml version=\"1.1\" encoding=\"utf-8\"?>\n";
+ output += "<testsuites>\n";
+
+ results.forEach(result => {
+
+ const messages = result.messages;
+
+ if (messages.length > 0) {
+ output += `<testsuite package="org.eslint" time="0" tests="${messages.length}" errors="${messages.length}" name="${result.filePath}">\n`;
+ messages.forEach(message => {
+ const type = message.fatal ? "error" : "failure";
+
+ output += `<testcase time="0" name="org.eslint.${message.ruleId || "unknown"}">`;
+ output += `<${type} message="${xmlEscape(message.message || "")}">`;
+ output += "<![CDATA[";
+ output += `line ${message.line || 0}, col `;
+ output += `${message.column || 0}, ${getMessageType(message)}`;
+ output += ` - ${xmlEscape(message.message || "")}`;
+ output += (message.ruleId ? ` (${message.ruleId})` : "");
+ output += "]]>";
+ output += `</${type}>`;
+ output += "</testcase>\n";
+ });
+ output += "</testsuite>\n";
+ } else {
+ output += `<testsuite package="org.eslint" time="0" tests="1" errors="0" name="${result.filePath}">\n`;
+ output += `<testcase time="0" name="${result.filePath}" />\n`;
+ output += "</testsuite>\n";
+ }
+
+ });
+
+ output += "</testsuites>\n";
+
+ return output;
+};
diff --git a/tools/node_modules/eslint/lib/formatters/stylish.js b/tools/node_modules/eslint/lib/formatters/stylish.js
new file mode 100644
index 0000000000..e586fe857c
--- /dev/null
+++ b/tools/node_modules/eslint/lib/formatters/stylish.js
@@ -0,0 +1,100 @@
+/**
+ * @fileoverview Stylish reporter
+ * @author Sindre Sorhus
+ */
+"use strict";
+
+const chalk = require("chalk"),
+ stripAnsi = require("strip-ansi"),
+ table = require("text-table");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Given a word and a count, append an s if count is not one.
+ * @param {string} word A word in its singular form.
+ * @param {int} count A number controlling whether word should be pluralized.
+ * @returns {string} The original word with an s on the end if count is not one.
+ */
+function pluralize(word, count) {
+ return (count === 1 ? word : `${word}s`);
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+module.exports = function(results) {
+
+ let output = "\n",
+ errorCount = 0,
+ warningCount = 0,
+ fixableErrorCount = 0,
+ fixableWarningCount = 0,
+ summaryColor = "yellow";
+
+ results.forEach(result => {
+ const messages = result.messages;
+
+ if (messages.length === 0) {
+ return;
+ }
+
+ errorCount += result.errorCount;
+ warningCount += result.warningCount;
+ fixableErrorCount += result.fixableErrorCount;
+ fixableWarningCount += result.fixableWarningCount;
+
+ output += `${chalk.underline(result.filePath)}\n`;
+
+ output += `${table(
+ messages.map(message => {
+ let messageType;
+
+ if (message.fatal || message.severity === 2) {
+ messageType = chalk.red("error");
+ summaryColor = "red";
+ } else {
+ messageType = chalk.yellow("warning");
+ }
+
+ return [
+ "",
+ message.line || 0,
+ message.column || 0,
+ messageType,
+ message.message.replace(/([^ ])\.$/, "$1"),
+ chalk.dim(message.ruleId || "")
+ ];
+ }),
+ {
+ align: ["", "r", "l"],
+ stringLength(str) {
+ return stripAnsi(str).length;
+ }
+ }
+ ).split("\n").map(el => el.replace(/(\d+)\s+(\d+)/, (m, p1, p2) => chalk.dim(`${p1}:${p2}`))).join("\n")}\n\n`;
+ });
+
+ const total = errorCount + warningCount;
+
+ if (total > 0) {
+ output += chalk[summaryColor].bold([
+ "\u2716 ", total, pluralize(" problem", total),
+ " (", errorCount, pluralize(" error", errorCount), ", ",
+ warningCount, pluralize(" warning", warningCount), ")\n"
+ ].join(""));
+
+ if (fixableErrorCount > 0 || fixableWarningCount > 0) {
+ output += chalk[summaryColor].bold([
+ " ", fixableErrorCount, pluralize(" error", fixableErrorCount), ", ",
+ fixableWarningCount, pluralize(" warning", fixableWarningCount),
+ " potentially fixable with the `--fix` option.\n"
+ ].join(""));
+ }
+ }
+
+ return total > 0 ? output : "";
+};
diff --git a/tools/node_modules/eslint/lib/formatters/table.js b/tools/node_modules/eslint/lib/formatters/table.js
new file mode 100644
index 0000000000..ebc3314e7a
--- /dev/null
+++ b/tools/node_modules/eslint/lib/formatters/table.js
@@ -0,0 +1,150 @@
+/**
+ * @fileoverview "table reporter.
+ * @author Gajus Kuizinas <gajus@gajus.com>
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const chalk = require("chalk"),
+ table = require("table").table,
+ pluralize = require("pluralize");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Draws text table.
+ * @param {Array<Object>} messages Error messages relating to a specific file.
+ * @returns {string} A text table.
+ */
+function drawTable(messages) {
+ const rows = [];
+
+ if (messages.length === 0) {
+ return "";
+ }
+
+ rows.push([
+ chalk.bold("Line"),
+ chalk.bold("Column"),
+ chalk.bold("Type"),
+ chalk.bold("Message"),
+ chalk.bold("Rule ID")
+ ]);
+
+ messages.forEach(message => {
+ let messageType;
+
+ if (message.fatal || message.severity === 2) {
+ messageType = chalk.red("error");
+ } else {
+ messageType = chalk.yellow("warning");
+ }
+
+ rows.push([
+ message.line || 0,
+ message.column || 0,
+ messageType,
+ message.message,
+ message.ruleId || ""
+ ]);
+ });
+
+ return table(rows, {
+ columns: {
+ 0: {
+ width: 8,
+ wrapWord: true
+ },
+ 1: {
+ width: 8,
+ wrapWord: true
+ },
+ 2: {
+ width: 8,
+ wrapWord: true
+ },
+ 3: {
+ paddingRight: 5,
+ width: 50,
+ wrapWord: true
+ },
+ 4: {
+ width: 20,
+ wrapWord: true
+ }
+ },
+ drawHorizontalLine(index) {
+ return index === 1;
+ }
+ });
+}
+
+/**
+ * Draws a report (multiple tables).
+ * @param {Array} results Report results for every file.
+ * @returns {string} A column of text tables.
+ */
+function drawReport(results) {
+ let files;
+
+ files = results.map(result => {
+ if (!result.messages.length) {
+ return "";
+ }
+
+ return `\n${result.filePath}\n\n${drawTable(result.messages)}`;
+ });
+
+ files = files.filter(content => content.trim());
+
+ return files.join("");
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+module.exports = function(report) {
+ let result,
+ errorCount,
+ warningCount;
+
+ result = "";
+ errorCount = 0;
+ warningCount = 0;
+
+ report.forEach(fileReport => {
+ errorCount += fileReport.errorCount;
+ warningCount += fileReport.warningCount;
+ });
+
+ if (errorCount || warningCount) {
+ result = drawReport(report);
+ }
+
+ result += `\n${table([
+ [
+ chalk.red(pluralize("Error", errorCount, true))
+ ],
+ [
+ chalk.yellow(pluralize("Warning", warningCount, true))
+ ]
+ ], {
+ columns: {
+ 0: {
+ width: 110,
+ wrapWord: true
+ }
+ },
+ drawHorizontalLine() {
+ return true;
+ }
+ })}`;
+
+ return result;
+};
diff --git a/tools/node_modules/eslint/lib/formatters/tap.js b/tools/node_modules/eslint/lib/formatters/tap.js
new file mode 100644
index 0000000000..9651a2bcf1
--- /dev/null
+++ b/tools/node_modules/eslint/lib/formatters/tap.js
@@ -0,0 +1,92 @@
+/**
+ * @fileoverview TAP reporter
+ * @author Jonathan Kingston
+ */
+"use strict";
+
+const yaml = require("js-yaml");
+
+//------------------------------------------------------------------------------
+// Helper Functions
+//------------------------------------------------------------------------------
+
+/**
+ * Returns a canonical error level string based upon the error message passed in.
+ * @param {Object} message Individual error message provided by eslint
+ * @returns {string} Error level string
+ */
+function getMessageType(message) {
+ if (message.fatal || message.severity === 2) {
+ return "error";
+ }
+ return "warning";
+
+}
+
+/**
+ * Takes in a JavaScript object and outputs a TAP diagnostics string
+ * @param {Object} diagnostic JavaScript object to be embedded as YAML into output.
+ * @returns {string} diagnostics string with YAML embedded - TAP version 13 compliant
+ */
+function outputDiagnostics(diagnostic) {
+ const prefix = " ";
+ let output = `${prefix}---\n`;
+
+ output += prefix + yaml.safeDump(diagnostic).split("\n").join(`\n${prefix}`);
+ output += "...\n";
+ return output;
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+module.exports = function(results) {
+ let output = `TAP version 13\n1..${results.length}\n`;
+
+ results.forEach((result, id) => {
+ const messages = result.messages;
+ let testResult = "ok";
+ let diagnostics = {};
+
+ if (messages.length > 0) {
+ testResult = "not ok";
+
+ messages.forEach(message => {
+ const diagnostic = {
+ message: message.message,
+ severity: getMessageType(message),
+ data: {
+ line: message.line || 0,
+ column: message.column || 0,
+ ruleId: message.ruleId || ""
+ }
+ };
+
+ /*
+ * If we have multiple messages place them under a messages key
+ * The first error will be logged as message key
+ * This is to adhere to TAP 13 loosely defined specification of having a message key
+ */
+ if ("message" in diagnostics) {
+ if (typeof diagnostics.messages === "undefined") {
+ diagnostics.messages = [];
+ }
+ diagnostics.messages.push(diagnostic);
+ } else {
+ diagnostics = diagnostic;
+ }
+ });
+ }
+
+ output += `${testResult} ${id + 1} - ${result.filePath}\n`;
+
+ // If we have an error include diagnostics
+ if (messages.length > 0) {
+ output += outputDiagnostics(diagnostics);
+ }
+
+ });
+
+ return output;
+};
diff --git a/tools/node_modules/eslint/lib/formatters/unix.js b/tools/node_modules/eslint/lib/formatters/unix.js
new file mode 100644
index 0000000000..c6c4ebbdb9
--- /dev/null
+++ b/tools/node_modules/eslint/lib/formatters/unix.js
@@ -0,0 +1,58 @@
+/**
+ * @fileoverview unix-style formatter.
+ * @author oshi-shinobu
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Helper Functions
+//------------------------------------------------------------------------------
+
+/**
+ * Returns a canonical error level string based upon the error message passed in.
+ * @param {Object} message Individual error message provided by eslint
+ * @returns {string} Error level string
+ */
+function getMessageType(message) {
+ if (message.fatal || message.severity === 2) {
+ return "Error";
+ }
+ return "Warning";
+
+}
+
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+module.exports = function(results) {
+
+ let output = "",
+ total = 0;
+
+ results.forEach(result => {
+
+ const messages = result.messages;
+
+ total += messages.length;
+
+ messages.forEach(message => {
+
+ output += `${result.filePath}:`;
+ output += `${message.line || 0}:`;
+ output += `${message.column || 0}:`;
+ output += ` ${message.message} `;
+ output += `[${getMessageType(message)}${message.ruleId ? `/${message.ruleId}` : ""}]`;
+ output += "\n";
+
+ });
+
+ });
+
+ if (total > 0) {
+ output += `\n${total} problem${total !== 1 ? "s" : ""}`;
+ }
+
+ return output;
+};
diff --git a/tools/node_modules/eslint/lib/formatters/visualstudio.js b/tools/node_modules/eslint/lib/formatters/visualstudio.js
new file mode 100644
index 0000000000..0d49431db8
--- /dev/null
+++ b/tools/node_modules/eslint/lib/formatters/visualstudio.js
@@ -0,0 +1,63 @@
+/**
+ * @fileoverview Visual Studio compatible formatter
+ * @author Ronald Pijnacker
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Helper Functions
+//------------------------------------------------------------------------------
+
+/**
+ * Returns the severity of warning or error
+ * @param {Object} message message object to examine
+ * @returns {string} severity level
+ * @private
+ */
+function getMessageType(message) {
+ if (message.fatal || message.severity === 2) {
+ return "error";
+ }
+ return "warning";
+
+}
+
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+module.exports = function(results) {
+
+ let output = "",
+ total = 0;
+
+ results.forEach(result => {
+
+ const messages = result.messages;
+
+ total += messages.length;
+
+ messages.forEach(message => {
+
+ output += result.filePath;
+ output += `(${message.line || 0}`;
+ output += message.column ? `,${message.column}` : "";
+ output += `): ${getMessageType(message)}`;
+ output += message.ruleId ? ` ${message.ruleId}` : "";
+ output += ` : ${message.message}`;
+ output += "\n";
+
+ });
+
+ });
+
+ if (total === 0) {
+ output += "no problems";
+ } else {
+ output += `\n${total} problem${total !== 1 ? "s" : ""}`;
+ }
+
+ return output;
+};
diff --git a/tools/node_modules/eslint/lib/ignored-paths.js b/tools/node_modules/eslint/lib/ignored-paths.js
new file mode 100644
index 0000000000..c02e83bc2a
--- /dev/null
+++ b/tools/node_modules/eslint/lib/ignored-paths.js
@@ -0,0 +1,289 @@
+/**
+ * @fileoverview Responsible for loading ignore config files and managing ignore patterns
+ * @author Jonathan Rajavuori
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const fs = require("fs"),
+ path = require("path"),
+ ignore = require("ignore"),
+ pathUtil = require("./util/path-util");
+
+const debug = require("debug")("eslint:ignored-paths");
+
+//------------------------------------------------------------------------------
+// Constants
+//------------------------------------------------------------------------------
+
+const ESLINT_IGNORE_FILENAME = ".eslintignore";
+
+/**
+ * Adds `"*"` at the end of `"node_modules/"`,
+ * so that subtle directories could be re-included by .gitignore patterns
+ * such as `"!node_modules/should_not_ignored"`
+ */
+const DEFAULT_IGNORE_DIRS = [
+ "/node_modules/*",
+ "/bower_components/*"
+];
+const DEFAULT_OPTIONS = {
+ dotfiles: false,
+ cwd: process.cwd()
+};
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Find a file in the current directory.
+ * @param {string} cwd Current working directory
+ * @param {string} name File name
+ * @returns {string} Path of ignore file or an empty string.
+ */
+function findFile(cwd, name) {
+ const ignoreFilePath = path.resolve(cwd, name);
+
+ return fs.existsSync(ignoreFilePath) && fs.statSync(ignoreFilePath).isFile() ? ignoreFilePath : "";
+}
+
+/**
+ * Find an ignore file in the current directory.
+ * @param {string} cwd Current working directory
+ * @returns {string} Path of ignore file or an empty string.
+ */
+function findIgnoreFile(cwd) {
+ return findFile(cwd, ESLINT_IGNORE_FILENAME);
+}
+
+/**
+ * Find an package.json file in the current directory.
+ * @param {string} cwd Current working directory
+ * @returns {string} Path of package.json file or an empty string.
+ */
+function findPackageJSONFile(cwd) {
+ return findFile(cwd, "package.json");
+}
+
+/**
+ * Merge options with defaults
+ * @param {Object} options Options to merge with DEFAULT_OPTIONS constant
+ * @returns {Object} Merged options
+ */
+function mergeDefaultOptions(options) {
+ options = (options || {});
+ return Object.assign({}, DEFAULT_OPTIONS, options);
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+/**
+ * IgnoredPaths class
+ */
+class IgnoredPaths {
+
+ /**
+ * @param {Object} options object containing 'ignore', 'ignorePath' and 'patterns' properties
+ */
+ constructor(options) {
+ options = mergeDefaultOptions(options);
+ this.cache = {};
+
+ /**
+ * add pattern to node-ignore instance
+ * @param {Object} ig, instance of node-ignore
+ * @param {string} pattern, pattern do add to ig
+ * @returns {array} raw ignore rules
+ */
+ function addPattern(ig, pattern) {
+ return ig.addPattern(pattern);
+ }
+
+ this.defaultPatterns = [].concat(DEFAULT_IGNORE_DIRS, options.patterns || []);
+ this.baseDir = options.cwd;
+
+ this.ig = {
+ custom: ignore(),
+ default: ignore()
+ };
+
+ /*
+ * Add a way to keep track of ignored files. This was present in node-ignore
+ * 2.x, but dropped for now as of 3.0.10.
+ */
+ this.ig.custom.ignoreFiles = [];
+ this.ig.default.ignoreFiles = [];
+
+ if (options.dotfiles !== true) {
+
+ /*
+ * ignore files beginning with a dot, but not files in a parent or
+ * ancestor directory (which in relative format will begin with `../`).
+ */
+ addPattern(this.ig.default, [".*", "!../"]);
+ }
+
+ addPattern(this.ig.default, this.defaultPatterns);
+
+ if (options.ignore !== false) {
+ let ignorePath;
+
+ if (options.ignorePath) {
+ debug("Using specific ignore file");
+
+ try {
+ fs.statSync(options.ignorePath);
+ ignorePath = options.ignorePath;
+ } catch (e) {
+ e.message = `Cannot read ignore file: ${options.ignorePath}\nError: ${e.message}`;
+ throw e;
+ }
+ } else {
+ debug(`Looking for ignore file in ${options.cwd}`);
+ ignorePath = findIgnoreFile(options.cwd);
+
+ try {
+ fs.statSync(ignorePath);
+ debug(`Loaded ignore file ${ignorePath}`);
+ } catch (e) {
+ debug("Could not find ignore file in cwd");
+ this.options = options;
+ }
+ }
+
+ if (ignorePath) {
+ debug(`Adding ${ignorePath}`);
+ this.baseDir = path.dirname(path.resolve(options.cwd, ignorePath));
+ this.addIgnoreFile(this.ig.custom, ignorePath);
+ this.addIgnoreFile(this.ig.default, ignorePath);
+ } else {
+ try {
+
+ // if the ignoreFile does not exist, check package.json for eslintIgnore
+ const packageJSONPath = findPackageJSONFile(options.cwd);
+
+ if (packageJSONPath) {
+ let packageJSONOptions;
+
+ try {
+ packageJSONOptions = JSON.parse(fs.readFileSync(packageJSONPath, "utf8"));
+ } catch (e) {
+ debug("Could not read package.json file to check eslintIgnore property");
+ throw e;
+ }
+
+ if (packageJSONOptions.eslintIgnore) {
+ if (Array.isArray(packageJSONOptions.eslintIgnore)) {
+ packageJSONOptions.eslintIgnore.forEach(pattern => {
+ addPattern(this.ig.custom, pattern);
+ addPattern(this.ig.default, pattern);
+ });
+ } else {
+ throw new TypeError("Package.json eslintIgnore property requires an array of paths");
+ }
+ }
+ }
+ } catch (e) {
+ debug("Could not find package.json to check eslintIgnore property");
+ throw e;
+ }
+ }
+
+ if (options.ignorePattern) {
+ addPattern(this.ig.custom, options.ignorePattern);
+ addPattern(this.ig.default, options.ignorePattern);
+ }
+ }
+
+ this.options = options;
+ }
+
+ /**
+ * read ignore filepath
+ * @param {string} filePath, file to add to ig
+ * @returns {array} raw ignore rules
+ */
+ readIgnoreFile(filePath) {
+ if (typeof this.cache[filePath] === "undefined") {
+ this.cache[filePath] = fs.readFileSync(filePath, "utf8");
+ }
+ return this.cache[filePath];
+ }
+
+ /**
+ * add ignore file to node-ignore instance
+ * @param {Object} ig, instance of node-ignore
+ * @param {string} filePath, file to add to ig
+ * @returns {array} raw ignore rules
+ */
+ addIgnoreFile(ig, filePath) {
+ ig.ignoreFiles.push(filePath);
+ return ig.add(this.readIgnoreFile(filePath));
+ }
+
+ /**
+ * Determine whether a file path is included in the default or custom ignore patterns
+ * @param {string} filepath Path to check
+ * @param {string} [category=null] check 'default', 'custom' or both (null)
+ * @returns {boolean} true if the file path matches one or more patterns, false otherwise
+ */
+ contains(filepath, category) {
+
+ let result = false;
+ const absolutePath = path.resolve(this.options.cwd, filepath);
+ const relativePath = pathUtil.getRelativePath(absolutePath, this.baseDir);
+
+ if ((typeof category === "undefined") || (category === "default")) {
+ result = result || (this.ig.default.filter([relativePath]).length === 0);
+ }
+
+ if ((typeof category === "undefined") || (category === "custom")) {
+ result = result || (this.ig.custom.filter([relativePath]).length === 0);
+ }
+
+ return result;
+
+ }
+
+ /**
+ * Returns a list of dir patterns for glob to ignore
+ * @returns {function()} method to check whether a folder should be ignored by glob.
+ */
+ getIgnoredFoldersGlobChecker() {
+
+ const ig = ignore().add(DEFAULT_IGNORE_DIRS);
+
+ if (this.options.dotfiles !== true) {
+
+ // Ignore hidden folders. (This cannot be ".*", or else it's not possible to unignore hidden files)
+ ig.add([".*/*", "!../"]);
+ }
+
+ if (this.options.ignore) {
+ ig.add(this.ig.custom);
+ }
+
+ const filter = ig.createFilter();
+
+ const base = this.baseDir;
+
+ return function(absolutePath) {
+ const relative = pathUtil.getRelativePath(absolutePath, base);
+
+ if (!relative) {
+ return false;
+ }
+
+ return !filter(relative);
+ };
+ }
+}
+
+module.exports = IgnoredPaths;
diff --git a/tools/node_modules/eslint/lib/linter.js b/tools/node_modules/eslint/lib/linter.js
new file mode 100755
index 0000000000..21d62f73ae
--- /dev/null
+++ b/tools/node_modules/eslint/lib/linter.js
@@ -0,0 +1,1123 @@
+/**
+ * @fileoverview Main Linter Class
+ * @author Gyandeep Singh
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const eslintScope = require("eslint-scope"),
+ levn = require("levn"),
+ lodash = require("lodash"),
+ blankScriptAST = require("../conf/blank-script.json"),
+ defaultConfig = require("../conf/default-config-options.js"),
+ CodePathAnalyzer = require("./code-path-analysis/code-path-analyzer"),
+ ConfigOps = require("./config/config-ops"),
+ validator = require("./config/config-validator"),
+ Environments = require("./config/environments"),
+ applyDisableDirectives = require("./util/apply-disable-directives"),
+ createEmitter = require("./util/safe-emitter"),
+ NodeEventGenerator = require("./util/node-event-generator"),
+ SourceCode = require("./util/source-code"),
+ Traverser = require("./util/traverser"),
+ createReportTranslator = require("./report-translator"),
+ Rules = require("./rules"),
+ timing = require("./timing"),
+ astUtils = require("./ast-utils"),
+ pkg = require("../package.json"),
+ SourceCodeFixer = require("./util/source-code-fixer");
+
+const debug = require("debug")("eslint:linter");
+const MAX_AUTOFIX_PASSES = 10;
+
+//------------------------------------------------------------------------------
+// Typedefs
+//------------------------------------------------------------------------------
+
+/**
+ * The result of a parsing operation from parseForESLint()
+ * @typedef {Object} CustomParseResult
+ * @property {ASTNode} ast The ESTree AST Program node.
+ * @property {Object} services An object containing additional services related
+ * to the parser.
+ */
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Parses a list of "name:boolean_value" or/and "name" options divided by comma or
+ * whitespace.
+ * @param {string} string The string to parse.
+ * @param {Comment} comment The comment node which has the string.
+ * @returns {Object} Result map object of names and boolean values
+ */
+function parseBooleanConfig(string, comment) {
+ const items = {};
+
+ // Collapse whitespace around `:` and `,` to make parsing easier
+ string = string.replace(/\s*([:,])\s*/g, "$1");
+
+ string.split(/\s|,+/).forEach(name => {
+ if (!name) {
+ return;
+ }
+ const pos = name.indexOf(":");
+ let value;
+
+ if (pos !== -1) {
+ value = name.slice(pos + 1);
+ name = name.slice(0, pos);
+ }
+
+ items[name] = {
+ value: (value === "true"),
+ comment
+ };
+
+ });
+ return items;
+}
+
+/**
+ * Parses a JSON-like config.
+ * @param {string} string The string to parse.
+ * @param {Object} location Start line and column of comments for potential error message.
+ * @returns {({success: true, config: Object}|{success: false, error: Problem})} Result map object
+ */
+function parseJsonConfig(string, location) {
+ let items = {};
+
+ // Parses a JSON-like comment by the same way as parsing CLI option.
+ try {
+ items = levn.parse("Object", string) || {};
+
+ // Some tests say that it should ignore invalid comments such as `/*eslint no-alert:abc*/`.
+ // Also, commaless notations have invalid severity:
+ // "no-alert: 2 no-console: 2" --> {"no-alert": "2 no-console: 2"}
+ // Should ignore that case as well.
+ if (ConfigOps.isEverySeverityValid(items)) {
+ return {
+ success: true,
+ config: items
+ };
+ }
+ } catch (ex) {
+
+ // ignore to parse the string by a fallback.
+ }
+
+ /*
+ * Optionator cannot parse commaless notations.
+ * But we are supporting that. So this is a fallback for that.
+ */
+ items = {};
+ string = string.replace(/([a-zA-Z0-9\-/]+):/g, "\"$1\":").replace(/(]|[0-9])\s+(?=")/, "$1,");
+ try {
+ items = JSON.parse(`{${string}}`);
+ } catch (ex) {
+ return {
+ success: false,
+ error: {
+ ruleId: null,
+ fatal: true,
+ severity: 2,
+ source: null,
+ message: `Failed to parse JSON from '${string}': ${ex.message}`,
+ line: location.start.line,
+ column: location.start.column + 1
+ }
+ };
+
+ }
+
+ return {
+ success: true,
+ config: items
+ };
+}
+
+/**
+ * Parses a config of values separated by comma.
+ * @param {string} string The string to parse.
+ * @returns {Object} Result map of values and true values
+ */
+function parseListConfig(string) {
+ const items = {};
+
+ // Collapse whitespace around ,
+ string = string.replace(/\s*,\s*/g, ",");
+
+ string.split(/,+/).forEach(name => {
+ name = name.trim();
+ if (!name) {
+ return;
+ }
+ items[name] = true;
+ });
+ return items;
+}
+
+/**
+ * Ensures that variables representing built-in properties of the Global Object,
+ * and any globals declared by special block comments, are present in the global
+ * scope.
+ * @param {Scope} globalScope The global scope.
+ * @param {Object} config The existing configuration data.
+ * @param {Environments} envContext Env context
+ * @returns {void}
+ */
+function addDeclaredGlobals(globalScope, config, envContext) {
+ const declaredGlobals = {},
+ exportedGlobals = {},
+ explicitGlobals = {},
+ builtin = envContext.get("builtin");
+
+ Object.assign(declaredGlobals, builtin);
+
+ Object.keys(config.env).filter(name => config.env[name]).forEach(name => {
+ const env = envContext.get(name),
+ environmentGlobals = env && env.globals;
+
+ if (environmentGlobals) {
+ Object.assign(declaredGlobals, environmentGlobals);
+ }
+ });
+
+ Object.assign(exportedGlobals, config.exported);
+ Object.assign(declaredGlobals, config.globals);
+ Object.assign(explicitGlobals, config.astGlobals);
+
+ Object.keys(declaredGlobals).forEach(name => {
+ let variable = globalScope.set.get(name);
+
+ if (!variable) {
+ variable = new eslintScope.Variable(name, globalScope);
+ variable.eslintExplicitGlobal = false;
+ globalScope.variables.push(variable);
+ globalScope.set.set(name, variable);
+ }
+ variable.writeable = declaredGlobals[name];
+ });
+
+ Object.keys(explicitGlobals).forEach(name => {
+ let variable = globalScope.set.get(name);
+
+ if (!variable) {
+ variable = new eslintScope.Variable(name, globalScope);
+ variable.eslintExplicitGlobal = true;
+ variable.eslintExplicitGlobalComment = explicitGlobals[name].comment;
+ globalScope.variables.push(variable);
+ globalScope.set.set(name, variable);
+ }
+ variable.writeable = explicitGlobals[name].value;
+ });
+
+ // mark all exported variables as such
+ Object.keys(exportedGlobals).forEach(name => {
+ const variable = globalScope.set.get(name);
+
+ if (variable) {
+ variable.eslintUsed = true;
+ }
+ });
+
+ /*
+ * "through" contains all references which definitions cannot be found.
+ * Since we augment the global scope using configuration, we need to update
+ * references and remove the ones that were added by configuration.
+ */
+ globalScope.through = globalScope.through.filter(reference => {
+ const name = reference.identifier.name;
+ const variable = globalScope.set.get(name);
+
+ if (variable) {
+
+ /*
+ * Links the variable and the reference.
+ * And this reference is removed from `Scope#through`.
+ */
+ reference.resolved = variable;
+ variable.references.push(reference);
+
+ return false;
+ }
+
+ return true;
+ });
+}
+
+/**
+ * Creates a collection of disable directives from a comment
+ * @param {("disable"|"enable"|"disable-line"|"disable-next-line")} type The type of directive comment
+ * @param {{line: number, column: number}} loc The 0-based location of the comment token
+ * @param {string} value The value after the directive in the comment
+ * comment specified no specific rules, so it applies to all rules (e.g. `eslint-disable`)
+ * @returns {{
+ * type: ("disable"|"enable"|"disable-line"|"disable-next-line"),
+ * line: number,
+ * column: number,
+ * ruleId: (string|null)
+ * }[]} Directives from the comment
+ */
+function createDisableDirectives(type, loc, value) {
+ const ruleIds = Object.keys(parseListConfig(value));
+ const directiveRules = ruleIds.length ? ruleIds : [null];
+
+ return directiveRules.map(ruleId => ({ type, line: loc.line, column: loc.column + 1, ruleId }));
+}
+
+/**
+ * Parses comments in file to extract file-specific config of rules, globals
+ * and environments and merges them with global config; also code blocks
+ * where reporting is disabled or enabled and merges them with reporting config.
+ * @param {string} filename The file being checked.
+ * @param {ASTNode} ast The top node of the AST.
+ * @param {Object} config The existing configuration data.
+ * @param {function(string): {create: Function}} ruleMapper A map from rule IDs to defined rules
+ * @returns {{
+ * config: Object,
+ * problems: Problem[],
+ * disableDirectives: {
+ * type: ("disable"|"enable"|"disable-line"|"disable-next-line"),
+ * line: number,
+ * column: number,
+ * ruleId: (string|null)
+ * }[]
+ * }} Modified config object, along with any problems encountered
+ * while parsing config comments
+ */
+function modifyConfigsFromComments(filename, ast, config, ruleMapper) {
+
+ const commentConfig = {
+ exported: {},
+ astGlobals: {},
+ rules: {},
+ env: {}
+ };
+ const commentRules = {};
+ const problems = [];
+ const disableDirectives = [];
+
+ ast.comments.filter(token => token.type !== "Shebang").forEach(comment => {
+
+ let value = comment.value.trim();
+ const match = /^(eslint(-\w+){0,3}|exported|globals?)(\s|$)/.exec(value);
+
+ if (match) {
+ value = value.slice(match.index + match[1].length);
+
+ if (comment.type === "Block") {
+ switch (match[1]) {
+ case "exported":
+ Object.assign(commentConfig.exported, parseBooleanConfig(value, comment));
+ break;
+
+ case "globals":
+ case "global":
+ Object.assign(commentConfig.astGlobals, parseBooleanConfig(value, comment));
+ break;
+
+ case "eslint-disable":
+ [].push.apply(disableDirectives, createDisableDirectives("disable", comment.loc.start, value));
+ break;
+
+ case "eslint-enable":
+ [].push.apply(disableDirectives, createDisableDirectives("enable", comment.loc.start, value));
+ break;
+
+ case "eslint": {
+ const parseResult = parseJsonConfig(value, comment.loc);
+
+ if (parseResult.success) {
+ Object.keys(parseResult.config).forEach(name => {
+ const ruleValue = parseResult.config[name];
+
+ validator.validateRuleOptions(ruleMapper(name), name, ruleValue, `${filename} line ${comment.loc.start.line}`);
+ commentRules[name] = ruleValue;
+ });
+ } else {
+ problems.push(parseResult.error);
+ }
+
+ break;
+ }
+
+ // no default
+ }
+ } else { // comment.type === "Line"
+ if (match[1] === "eslint-disable-line") {
+ [].push.apply(disableDirectives, createDisableDirectives("disable-line", comment.loc.start, value));
+ } else if (match[1] === "eslint-disable-next-line") {
+ [].push.apply(disableDirectives, createDisableDirectives("disable-next-line", comment.loc.start, value));
+ }
+ }
+ }
+ });
+
+ Object.assign(commentConfig.rules, commentRules);
+
+ return {
+ config: ConfigOps.merge(config, commentConfig),
+ problems,
+ disableDirectives
+ };
+}
+
+/**
+ * Normalize ECMAScript version from the initial config
+ * @param {number} ecmaVersion ECMAScript version from the initial config
+ * @param {boolean} isModule Whether the source type is module or not
+ * @returns {number} normalized ECMAScript version
+ */
+function normalizeEcmaVersion(ecmaVersion, isModule) {
+
+ // Need at least ES6 for modules
+ if (isModule && (!ecmaVersion || ecmaVersion < 6)) {
+ ecmaVersion = 6;
+ }
+
+ /*
+ * Calculate ECMAScript edition number from official year version starting with
+ * ES2015, which corresponds with ES6 (or a difference of 2009).
+ */
+ if (ecmaVersion >= 2015) {
+ ecmaVersion -= 2009;
+ }
+
+ return ecmaVersion;
+}
+
+/**
+ * Process initial config to make it safe to extend by file comment config
+ * @param {Object} config Initial config
+ * @param {Environments} envContext Env context
+ * @returns {Object} Processed config
+ */
+function prepareConfig(config, envContext) {
+ config.globals = config.globals || {};
+ const copiedRules = {};
+ let parserOptions = {};
+
+ if (typeof config.rules === "object") {
+ Object.keys(config.rules).forEach(k => {
+ const rule = config.rules[k];
+
+ if (rule === null) {
+ throw new Error(`Invalid config for rule '${k}'.`);
+ }
+ if (Array.isArray(rule)) {
+ copiedRules[k] = rule.slice();
+ } else {
+ copiedRules[k] = rule;
+ }
+ });
+ }
+
+ // merge in environment parserOptions
+ if (typeof config.env === "object") {
+ Object.keys(config.env).forEach(envName => {
+ const env = envContext.get(envName);
+
+ if (config.env[envName] && env && env.parserOptions) {
+ parserOptions = ConfigOps.merge(parserOptions, env.parserOptions);
+ }
+ });
+ }
+
+ const preparedConfig = {
+ rules: copiedRules,
+ parser: config.parser || defaultConfig.parser,
+ globals: ConfigOps.merge(defaultConfig.globals, config.globals),
+ env: ConfigOps.merge(defaultConfig.env, config.env || {}),
+ settings: ConfigOps.merge(defaultConfig.settings, config.settings || {}),
+ parserOptions: ConfigOps.merge(parserOptions, config.parserOptions || {})
+ };
+ const isModule = preparedConfig.parserOptions.sourceType === "module";
+
+ if (isModule) {
+
+ // can't have global return inside of modules
+ preparedConfig.parserOptions.ecmaFeatures = Object.assign({}, preparedConfig.parserOptions.ecmaFeatures, { globalReturn: false });
+ }
+
+ preparedConfig.parserOptions.ecmaVersion = normalizeEcmaVersion(preparedConfig.parserOptions.ecmaVersion, isModule);
+
+ return preparedConfig;
+}
+
+const eslintEnvPattern = /\/\*\s*eslint-env\s(.+?)\*\//g;
+
+/**
+ * Checks whether or not there is a comment which has "eslint-env *" in a given text.
+ * @param {string} text - A source code text to check.
+ * @returns {Object|null} A result of parseListConfig() with "eslint-env *" comment.
+ */
+function findEslintEnv(text) {
+ let match, retv;
+
+ eslintEnvPattern.lastIndex = 0;
+
+ while ((match = eslintEnvPattern.exec(text))) {
+ retv = Object.assign(retv || {}, parseListConfig(match[1]));
+ }
+
+ return retv;
+}
+
+/**
+ * Strips Unicode BOM from a given text.
+ *
+ * @param {string} text - A text to strip.
+ * @returns {string} The stripped text.
+ */
+function stripUnicodeBOM(text) {
+
+ /*
+ * Check Unicode BOM.
+ * In JavaScript, string data is stored as UTF-16, so BOM is 0xFEFF.
+ * http://www.ecma-international.org/ecma-262/6.0/#sec-unicode-format-control-characters
+ */
+ if (text.charCodeAt(0) === 0xFEFF) {
+ return text.slice(1);
+ }
+ return text;
+}
+
+/**
+ * Get the options for a rule (not including severity), if any
+ * @param {Array|number} ruleConfig rule configuration
+ * @returns {Array} of rule options, empty Array if none
+ */
+function getRuleOptions(ruleConfig) {
+ if (Array.isArray(ruleConfig)) {
+ return ruleConfig.slice(1);
+ }
+ return [];
+
+}
+
+/**
+ * Parses text into an AST. Moved out here because the try-catch prevents
+ * optimization of functions, so it's best to keep the try-catch as isolated
+ * as possible
+ * @param {string} text The text to parse.
+ * @param {Object} providedParserOptions Options to pass to the parser
+ * @param {Object} parser The parser module
+ * @param {string} filePath The path to the file being parsed.
+ * @returns {{success: false, error: Problem}|{success: true,ast: ASTNode, services: Object}}
+ * An object containing the AST and parser services if parsing was successful, or the error if parsing failed
+ * @private
+ */
+function parse(text, providedParserOptions, parser, filePath) {
+
+ const parserOptions = Object.assign({}, providedParserOptions, {
+ loc: true,
+ range: true,
+ raw: true,
+ tokens: true,
+ comment: true,
+ filePath
+ });
+
+ /*
+ * Check for parsing errors first. If there's a parsing error, nothing
+ * else can happen. However, a parsing error does not throw an error
+ * from this method - it's just considered a fatal error message, a
+ * problem that ESLint identified just like any other.
+ */
+ try {
+ if (typeof parser.parseForESLint === "function") {
+ const parseResult = parser.parseForESLint(text, parserOptions);
+
+ return {
+ success: true,
+ ast: parseResult.ast,
+ services: parseResult.services || {}
+ };
+ }
+
+ return {
+ success: true,
+ ast: parser.parse(text, parserOptions),
+ services: {}
+ };
+ } catch (ex) {
+
+ // If the message includes a leading line number, strip it:
+ const message = `Parsing error: ${ex.message.replace(/^line \d+:/i, "").trim()}`;
+ const source = ex.lineNumber ? SourceCode.splitLines(text)[ex.lineNumber - 1] : null;
+
+ return {
+ success: false,
+ error: {
+ ruleId: null,
+ fatal: true,
+ severity: 2,
+ source,
+ message,
+ line: ex.lineNumber,
+ column: ex.column
+ }
+ };
+ }
+}
+
+/**
+ * Gets the scope for the current node
+ * @param {ScopeManager} scopeManager The scope manager for this AST
+ * @param {ASTNode} currentNode The node to get the scope of
+ * @param {number} ecmaVersion The `ecmaVersion` setting that this code was parsed with
+ * @returns {eslint-scope.Scope} The scope information for this node
+ */
+function getScope(scopeManager, currentNode, ecmaVersion) {
+ let initialNode;
+
+ // if current node introduces a scope, add it to the list
+ if (
+ ["FunctionDeclaration", "FunctionExpression", "ArrowFunctionExpression"].indexOf(currentNode.type) >= 0 ||
+ ecmaVersion >= 6 && ["BlockStatement", "SwitchStatement", "CatchClause"].indexOf(currentNode.type) >= 0
+ ) {
+ initialNode = currentNode;
+ } else {
+ initialNode = currentNode.parent;
+ }
+
+ // Ascend the current node's parents
+ for (let node = initialNode; node; node = node.parent) {
+
+ // Get the innermost scope
+ const scope = scopeManager.acquire(node, true);
+
+ if (scope) {
+ if (scope.type === "function-expression-name") {
+ return scope.childScopes[0];
+ }
+ return scope;
+ }
+ }
+
+ return scopeManager.scopes[0];
+}
+
+/**
+ * Marks a variable as used in the current scope
+ * @param {ScopeManager} scopeManager The scope manager for this AST. The scope may be mutated by this function.
+ * @param {ASTNode} currentNode The node currently being traversed
+ * @param {Object} parserOptions The options used to parse this text
+ * @param {string} name The name of the variable that should be marked as used.
+ * @returns {boolean} True if the variable was found and marked as used, false if not.
+ */
+function markVariableAsUsed(scopeManager, currentNode, parserOptions, name) {
+ const hasGlobalReturn = parserOptions.ecmaFeatures && parserOptions.ecmaFeatures.globalReturn;
+ const specialScope = hasGlobalReturn || parserOptions.sourceType === "module";
+ const currentScope = getScope(scopeManager, currentNode, parserOptions.ecmaVersion);
+
+ // Special Node.js scope means we need to start one level deeper
+ const initialScope = currentScope.type === "global" && specialScope ? currentScope.childScopes[0] : currentScope;
+
+ for (let scope = initialScope; scope; scope = scope.upper) {
+ const variable = scope.variables.find(scopeVar => scopeVar.name === name);
+
+ if (variable) {
+ variable.eslintUsed = true;
+ return true;
+ }
+ }
+
+ return false;
+}
+
+// methods that exist on SourceCode object
+const DEPRECATED_SOURCECODE_PASSTHROUGHS = {
+ getSource: "getText",
+ getSourceLines: "getLines",
+ getAllComments: "getAllComments",
+ getNodeByRangeIndex: "getNodeByRangeIndex",
+ getComments: "getComments",
+ getCommentsBefore: "getCommentsBefore",
+ getCommentsAfter: "getCommentsAfter",
+ getCommentsInside: "getCommentsInside",
+ getJSDocComment: "getJSDocComment",
+ getFirstToken: "getFirstToken",
+ getFirstTokens: "getFirstTokens",
+ getLastToken: "getLastToken",
+ getLastTokens: "getLastTokens",
+ getTokenAfter: "getTokenAfter",
+ getTokenBefore: "getTokenBefore",
+ getTokenByRangeStart: "getTokenByRangeStart",
+ getTokens: "getTokens",
+ getTokensAfter: "getTokensAfter",
+ getTokensBefore: "getTokensBefore",
+ getTokensBetween: "getTokensBetween"
+};
+
+const BASE_TRAVERSAL_CONTEXT = Object.freeze(
+ Object.keys(DEPRECATED_SOURCECODE_PASSTHROUGHS).reduce(
+ (contextInfo, methodName) =>
+ Object.assign(contextInfo, {
+ [methodName]() {
+ const sourceCode = this.getSourceCode();
+
+ return sourceCode[DEPRECATED_SOURCECODE_PASSTHROUGHS[methodName]].apply(sourceCode, arguments);
+ }
+ }),
+ {}
+ )
+);
+
+const lastSourceCodes = new WeakMap();
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+/**
+ * Object that is responsible for verifying JavaScript text
+ * @name eslint
+ */
+module.exports = class Linter {
+
+ constructor() {
+ lastSourceCodes.set(this, null);
+ this.version = pkg.version;
+
+ this.rules = new Rules();
+ this._parsers = new Map();
+ this.environments = new Environments();
+ }
+
+ /**
+ * Configuration object for the `verify` API. A JS representation of the eslintrc files.
+ * @typedef {Object} ESLintConfig
+ * @property {Object} rules The rule configuration to verify against.
+ * @property {string} [parser] Parser to use when generatig the AST.
+ * @property {Object} [parserOptions] Options for the parsed used.
+ * @property {Object} [settings] Global settings passed to each rule.
+ * @property {Object} [env] The environment to verify in.
+ * @property {Object} [globals] Available globals to the code.
+ */
+
+ /**
+ * Same as linter.verify, except without support for processors.
+ * @param {string|SourceCode} textOrSourceCode The text to parse or a SourceCode object.
+ * @param {ESLintConfig} config An ESLintConfig instance to configure everything.
+ * @param {(string|Object)} [filenameOrOptions] The optional filename of the file being checked.
+ * If this is not set, the filename will default to '<input>' in the rule context. If
+ * an object, then it has "filename", "saveState", and "allowInlineConfig" properties.
+ * @param {boolean} [filenameOrOptions.allowInlineConfig=true] Allow/disallow inline comments' ability to change config once it is set. Defaults to true if not supplied.
+ * Useful if you want to validate JS without comments overriding rules.
+ * @param {boolean} [filenameOrOptions.reportUnusedDisableDirectives=false] Adds reported errors for unused
+ * eslint-disable directives
+ * @returns {Object[]} The results as an array of messages or null if no messages.
+ */
+ _verifyWithoutProcessors(textOrSourceCode, config, filenameOrOptions) {
+ let text,
+ parserServices,
+ allowInlineConfig,
+ providedFilename,
+ reportUnusedDisableDirectives;
+
+ // evaluate arguments
+ if (typeof filenameOrOptions === "object") {
+ providedFilename = filenameOrOptions.filename;
+ allowInlineConfig = filenameOrOptions.allowInlineConfig;
+ reportUnusedDisableDirectives = filenameOrOptions.reportUnusedDisableDirectives;
+ } else {
+ providedFilename = filenameOrOptions;
+ }
+
+ const filename = typeof providedFilename === "string" ? providedFilename : "<input>";
+
+ if (typeof textOrSourceCode === "string") {
+ lastSourceCodes.set(this, null);
+ text = textOrSourceCode;
+ } else {
+ lastSourceCodes.set(this, textOrSourceCode);
+ text = textOrSourceCode.text;
+ }
+
+ // search and apply "eslint-env *".
+ const envInFile = findEslintEnv(text);
+
+ config = Object.assign({}, config);
+
+ if (envInFile) {
+ if (config.env) {
+ config.env = Object.assign({}, config.env, envInFile);
+ } else {
+ config.env = envInFile;
+ }
+ }
+
+ // process initial config to make it safe to extend
+ config = prepareConfig(config, this.environments);
+
+ if (lastSourceCodes.get(this)) {
+ parserServices = {};
+ } else {
+
+ // there's no input, just exit here
+ if (text.trim().length === 0) {
+ lastSourceCodes.set(this, new SourceCode(text, blankScriptAST));
+ return [];
+ }
+
+ let parser;
+
+ try {
+ parser = this._parsers.get(config.parser) || require(config.parser);
+ } catch (ex) {
+ return [{
+ ruleId: null,
+ fatal: true,
+ severity: 2,
+ source: null,
+ message: ex.message,
+ line: 0,
+ column: 0
+ }];
+ }
+ const parseResult = parse(
+ stripUnicodeBOM(text).replace(astUtils.SHEBANG_MATCHER, (match, captured) => `//${captured}`),
+ config.parserOptions,
+ parser,
+ filename
+ );
+
+ if (!parseResult.success) {
+ return [parseResult.error];
+ }
+
+ parserServices = parseResult.services;
+ lastSourceCodes.set(this, new SourceCode(text, parseResult.ast));
+ }
+
+ const problems = [];
+ const sourceCode = lastSourceCodes.get(this);
+ let disableDirectives;
+
+ // parse global comments and modify config
+ if (allowInlineConfig !== false) {
+ const modifyConfigResult = modifyConfigsFromComments(filename, sourceCode.ast, config, ruleId => this.rules.get(ruleId));
+
+ config = modifyConfigResult.config;
+ modifyConfigResult.problems.forEach(problem => problems.push(problem));
+ disableDirectives = modifyConfigResult.disableDirectives;
+ } else {
+ disableDirectives = [];
+ }
+
+ const emitter = createEmitter();
+ const traverser = new Traverser();
+ const ecmaFeatures = config.parserOptions.ecmaFeatures || {};
+ const ecmaVersion = config.parserOptions.ecmaVersion || 5;
+ const scopeManager = eslintScope.analyze(sourceCode.ast, {
+ ignoreEval: true,
+ nodejsScope: ecmaFeatures.globalReturn,
+ impliedStrict: ecmaFeatures.impliedStrict,
+ ecmaVersion,
+ sourceType: config.parserOptions.sourceType || "script",
+ fallback: Traverser.getKeys
+ });
+
+ /*
+ * Create a frozen object with the ruleContext properties and methods that are shared by all rules.
+ * All rule contexts will inherit from this object. This avoids the performance penalty of copying all the
+ * properties once for each rule.
+ */
+ const sharedTraversalContext = Object.freeze(
+ Object.assign(
+ Object.create(BASE_TRAVERSAL_CONTEXT),
+ {
+ getAncestors: () => traverser.parents(),
+ getDeclaredVariables: scopeManager.getDeclaredVariables.bind(scopeManager),
+ getFilename: () => filename,
+ getScope: () => getScope(scopeManager, traverser.current(), config.parserOptions.ecmaVersion),
+ getSourceCode: () => sourceCode,
+ markVariableAsUsed: name => markVariableAsUsed(scopeManager, traverser.current(), config.parserOptions, name),
+ parserOptions: config.parserOptions,
+ parserPath: config.parser,
+ parserServices,
+ settings: config.settings,
+
+ /**
+ * This is used to avoid breaking rules that used to monkeypatch the `Linter#report` method
+ * by using the `_linter` property on rule contexts.
+ *
+ * This should be removed in a major release after we create a better way to
+ * lint for unused disable comments.
+ * https://github.com/eslint/eslint/issues/9193
+ */
+ _linter: {
+ report() {},
+ on: emitter.on
+ }
+ }
+ )
+ );
+
+ // enable appropriate rules
+ Object.keys(config.rules).forEach(ruleId => {
+ const severity = ConfigOps.getRuleSeverity(config.rules[ruleId]);
+
+ if (severity === 0) {
+ return;
+ }
+
+ const rule = this.rules.get(ruleId);
+ let reportTranslator = null;
+ const ruleContext = Object.freeze(
+ Object.assign(
+ Object.create(sharedTraversalContext),
+ {
+ id: ruleId,
+ options: getRuleOptions(config.rules[ruleId]),
+ report() {
+
+ /*
+ * Create a report translator lazily.
+ * In a vast majority of cases, any given rule reports zero errors on a given
+ * piece of code. Creating a translator lazily avoids the performance cost of
+ * creating a new translator function for each rule that usually doesn't get
+ * called.
+ *
+ * Using lazy report translators improves end-to-end performance by about 3%
+ * with Node 8.4.0.
+ */
+ if (reportTranslator === null) {
+ reportTranslator = createReportTranslator({ ruleId, severity, sourceCode });
+ }
+ const problem = reportTranslator.apply(null, arguments);
+
+ if (problem.fix && rule.meta && !rule.meta.fixable) {
+ throw new Error("Fixable rules should export a `meta.fixable` property.");
+ }
+ problems.push(problem);
+
+ /*
+ * This is used to avoid breaking rules that used monkeypatch Linter, and relied on
+ * `linter.report` getting called with report info every time a rule reports a problem.
+ * To continue to support this, make sure that `context._linter.report` is called every
+ * time a problem is reported by a rule, even though `context._linter` is no longer a
+ * `Linter` instance.
+ *
+ * This should be removed in a major release after we create a better way to
+ * lint for unused disable comments.
+ * https://github.com/eslint/eslint/issues/9193
+ */
+ sharedTraversalContext._linter.report( // eslint-disable-line no-underscore-dangle
+ problem.ruleId,
+ problem.severity,
+ { loc: { start: { line: problem.line, column: problem.column - 1 } } },
+ problem.message
+ );
+ }
+ }
+ )
+ );
+
+ try {
+ const ruleListeners = rule.create(ruleContext);
+
+ // add all the selectors from the rule as listeners
+ Object.keys(ruleListeners).forEach(selector => {
+ emitter.on(
+ selector,
+ timing.enabled
+ ? timing.time(ruleId, ruleListeners[selector])
+ : ruleListeners[selector]
+ );
+ });
+ } catch (ex) {
+ ex.message = `Error while loading rule '${ruleId}': ${ex.message}`;
+ throw ex;
+ }
+ });
+
+ // augment global scope with declared global variables
+ addDeclaredGlobals(scopeManager.scopes[0], config, this.environments);
+
+ const eventGenerator = new CodePathAnalyzer(new NodeEventGenerator(emitter));
+
+ /*
+ * Each node has a type property. Whenever a particular type of
+ * node is found, an event is fired. This allows any listeners to
+ * automatically be informed that this type of node has been found
+ * and react accordingly.
+ */
+ traverser.traverse(sourceCode.ast, {
+ enter(node, parent) {
+ node.parent = parent;
+ eventGenerator.enterNode(node);
+ },
+ leave(node) {
+ eventGenerator.leaveNode(node);
+ }
+ });
+
+ return applyDisableDirectives({
+ directives: disableDirectives,
+ problems: problems.sort((problemA, problemB) => problemA.line - problemB.line || problemA.column - problemB.column),
+ reportUnusedDisableDirectives
+ });
+ }
+
+ /**
+ * Verifies the text against the rules specified by the second argument.
+ * @param {string|SourceCode} textOrSourceCode The text to parse or a SourceCode object.
+ * @param {ESLintConfig} config An ESLintConfig instance to configure everything.
+ * @param {(string|Object)} [filenameOrOptions] The optional filename of the file being checked.
+ * If this is not set, the filename will default to '<input>' in the rule context. If
+ * an object, then it has "filename", "saveState", and "allowInlineConfig" properties.
+ * @param {boolean} [saveState] Indicates if the state from the last run should be saved.
+ * Mostly useful for testing purposes.
+ * @param {boolean} [filenameOrOptions.allowInlineConfig] Allow/disallow inline comments' ability to change config once it is set. Defaults to true if not supplied.
+ * Useful if you want to validate JS without comments overriding rules.
+ * @param {function(string): string[]} [filenameOrOptions.preprocess] preprocessor for source text. If provided,
+ * this should accept a string of source text, and return an array of code blocks to lint.
+ * @param {function(Array<Object[]>): Object[]} [filenameOrOptions.postprocess] postprocessor for report messages. If provided,
+ * this should accept an array of the message lists for each code block returned from the preprocessor,
+ * apply a mapping to the messages as appropriate, and return a one-dimensional array of messages
+ * @returns {Object[]} The results as an array of messages or null if no messages.
+ */
+ verify(textOrSourceCode, config, filenameOrOptions) {
+ const preprocess = filenameOrOptions && filenameOrOptions.preprocess || (rawText => [rawText]);
+ const postprocess = filenameOrOptions && filenameOrOptions.postprocess || lodash.flatten;
+
+ return postprocess(
+ preprocess(textOrSourceCode).map(
+ textBlock => this._verifyWithoutProcessors(textBlock, config, filenameOrOptions)
+ )
+ );
+ }
+
+ /**
+ * Gets the SourceCode object representing the parsed source.
+ * @returns {SourceCode} The SourceCode object.
+ */
+ getSourceCode() {
+ return lastSourceCodes.get(this);
+ }
+
+ /**
+ * Defines a new linting rule.
+ * @param {string} ruleId A unique rule identifier
+ * @param {Function} ruleModule Function from context to object mapping AST node types to event handlers
+ * @returns {void}
+ */
+ defineRule(ruleId, ruleModule) {
+ this.rules.define(ruleId, ruleModule);
+ }
+
+ /**
+ * Defines many new linting rules.
+ * @param {Object} rulesToDefine map from unique rule identifier to rule
+ * @returns {void}
+ */
+ defineRules(rulesToDefine) {
+ Object.getOwnPropertyNames(rulesToDefine).forEach(ruleId => {
+ this.defineRule(ruleId, rulesToDefine[ruleId]);
+ });
+ }
+
+ /**
+ * Gets an object with all loaded rules.
+ * @returns {Map} All loaded rules
+ */
+ getRules() {
+ return this.rules.getAllLoadedRules();
+ }
+
+ /**
+ * Define a new parser module
+ * @param {any} parserId Name of the parser
+ * @param {any} parserModule The parser object
+ * @returns {void}
+ */
+ defineParser(parserId, parserModule) {
+ this._parsers.set(parserId, parserModule);
+ }
+
+ /**
+ * Performs multiple autofix passes over the text until as many fixes as possible
+ * have been applied.
+ * @param {string} text The source text to apply fixes to.
+ * @param {Object} config The ESLint config object to use.
+ * @param {Object} options The ESLint options object to use.
+ * @param {string} options.filename The filename from which the text was read.
+ * @param {boolean} options.allowInlineConfig Flag indicating if inline comments
+ * should be allowed.
+ * @param {boolean|Function} options.fix Determines whether fixes should be applied
+ * @param {Function} options.preprocess preprocessor for source text. If provided, this should
+ * accept a string of source text, and return an array of code blocks to lint.
+ * @param {Function} options.postprocess postprocessor for report messages. If provided,
+ * this should accept an array of the message lists for each code block returned from the preprocessor,
+ * apply a mapping to the messages as appropriate, and return a one-dimensional array of messages
+ * @returns {Object} The result of the fix operation as returned from the
+ * SourceCodeFixer.
+ */
+ verifyAndFix(text, config, options) {
+ let messages = [],
+ fixedResult,
+ fixed = false,
+ passNumber = 0;
+ const debugTextDescription = options && options.filename || `${text.slice(0, 10)}...`;
+ const shouldFix = options && typeof options.fix !== "undefined" ? options.fix : true;
+
+ /**
+ * This loop continues until one of the following is true:
+ *
+ * 1. No more fixes have been applied.
+ * 2. Ten passes have been made.
+ *
+ * That means anytime a fix is successfully applied, there will be another pass.
+ * Essentially, guaranteeing a minimum of two passes.
+ */
+ do {
+ passNumber++;
+
+ debug(`Linting code for ${debugTextDescription} (pass ${passNumber})`);
+ messages = this.verify(text, config, options);
+
+ debug(`Generating fixed text for ${debugTextDescription} (pass ${passNumber})`);
+ fixedResult = SourceCodeFixer.applyFixes(text, messages, shouldFix);
+
+ /*
+ * stop if there are any syntax errors.
+ * 'fixedResult.output' is a empty string.
+ */
+ if (messages.length === 1 && messages[0].fatal) {
+ break;
+ }
+
+ // keep track if any fixes were ever applied - important for return value
+ fixed = fixed || fixedResult.fixed;
+
+ // update to use the fixed output instead of the original text
+ text = fixedResult.output;
+
+ } while (
+ fixedResult.fixed &&
+ passNumber < MAX_AUTOFIX_PASSES
+ );
+
+ /*
+ * If the last result had fixes, we need to lint again to be sure we have
+ * the most up-to-date information.
+ */
+ if (fixedResult.fixed) {
+ fixedResult.messages = this.verify(text, config, options);
+ }
+
+ // ensure the last result properly reflects if fixes were done
+ fixedResult.fixed = fixed;
+ fixedResult.output = text;
+
+ return fixedResult;
+ }
+};
diff --git a/tools/node_modules/eslint/lib/load-rules.js b/tools/node_modules/eslint/lib/load-rules.js
new file mode 100644
index 0000000000..b74905d65a
--- /dev/null
+++ b/tools/node_modules/eslint/lib/load-rules.js
@@ -0,0 +1,50 @@
+/**
+ * @fileoverview Module for loading rules from files and directories.
+ * @author Michael Ficarra
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const fs = require("fs"),
+ path = require("path");
+
+const rulesDirCache = {};
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+/**
+ * Load all rule modules from specified directory.
+ * @param {string} [rulesDir] Path to rules directory, may be relative. Defaults to `lib/rules`.
+ * @param {string} cwd Current working directory
+ * @returns {Object} Loaded rule modules by rule ids (file names).
+ */
+module.exports = function(rulesDir, cwd) {
+ if (!rulesDir) {
+ rulesDir = path.join(__dirname, "rules");
+ } else {
+ rulesDir = path.resolve(cwd, rulesDir);
+ }
+
+ // cache will help performance as IO operation are expensive
+ if (rulesDirCache[rulesDir]) {
+ return rulesDirCache[rulesDir];
+ }
+
+ const rules = Object.create(null);
+
+ fs.readdirSync(rulesDir).forEach(file => {
+ if (path.extname(file) !== ".js") {
+ return;
+ }
+ rules[file.slice(0, -3)] = path.join(rulesDir, file);
+ });
+ rulesDirCache[rulesDir] = rules;
+
+ return rules;
+};
diff --git a/tools/node_modules/eslint/lib/logging.js b/tools/node_modules/eslint/lib/logging.js
new file mode 100644
index 0000000000..22451e535e
--- /dev/null
+++ b/tools/node_modules/eslint/lib/logging.js
@@ -0,0 +1,28 @@
+/**
+ * @fileoverview Handle logging for ESLint
+ * @author Gyandeep Singh
+ */
+
+"use strict";
+
+/* eslint no-console: "off" */
+
+/* istanbul ignore next */
+module.exports = {
+
+ /**
+ * Cover for console.log
+ * @returns {void}
+ */
+ info() {
+ console.log.apply(console, arguments);
+ },
+
+ /**
+ * Cover for console.error
+ * @returns {void}
+ */
+ error() {
+ console.error.apply(console, arguments);
+ }
+};
diff --git a/tools/node_modules/eslint/lib/options.js b/tools/node_modules/eslint/lib/options.js
new file mode 100644
index 0000000000..ee1d3369ce
--- /dev/null
+++ b/tools/node_modules/eslint/lib/options.js
@@ -0,0 +1,235 @@
+/**
+ * @fileoverview Options configuration for optionator.
+ * @author George Zahariev
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const optionator = require("optionator");
+
+//------------------------------------------------------------------------------
+// Initialization and Public Interface
+//------------------------------------------------------------------------------
+
+// exports "parse(args)", "generateHelp()", and "generateHelpForOption(optionName)"
+module.exports = optionator({
+ prepend: "eslint [options] file.js [file.js] [dir]",
+ defaults: {
+ concatRepeatedArrays: true,
+ mergeRepeatedObjects: true
+ },
+ options: [
+ {
+ heading: "Basic configuration"
+ },
+ {
+ option: "config",
+ alias: "c",
+ type: "path::String",
+ description: "Use configuration from this file or shareable config"
+ },
+ {
+ option: "eslintrc",
+ type: "Boolean",
+ default: "true",
+ description: "Disable use of configuration from .eslintrc"
+ },
+ {
+ option: "env",
+ type: "[String]",
+ description: "Specify environments"
+ },
+ {
+ option: "ext",
+ type: "[String]",
+ default: ".js",
+ description: "Specify JavaScript file extensions"
+ },
+ {
+ option: "global",
+ type: "[String]",
+ description: "Define global variables"
+ },
+ {
+ option: "parser",
+ type: "String",
+ description: "Specify the parser to be used"
+ },
+ {
+ option: "parser-options",
+ type: "Object",
+ description: "Specify parser options"
+ },
+ {
+ heading: "Caching"
+ },
+ {
+ option: "cache",
+ type: "Boolean",
+ default: "false",
+ description: "Only check changed files"
+ },
+ {
+ option: "cache-file",
+ type: "path::String",
+ default: ".eslintcache",
+ description: "Path to the cache file. Deprecated: use --cache-location"
+ },
+ {
+ option: "cache-location",
+ type: "path::String",
+ description: "Path to the cache file or directory"
+ },
+ {
+ heading: "Specifying rules and plugins"
+ },
+ {
+ option: "rulesdir",
+ type: "[path::String]",
+ description: "Use additional rules from this directory"
+ },
+ {
+ option: "plugin",
+ type: "[String]",
+ description: "Specify plugins"
+ },
+ {
+ option: "rule",
+ type: "Object",
+ description: "Specify rules"
+ },
+ {
+ heading: "Ignoring files"
+ },
+ {
+ option: "ignore-path",
+ type: "path::String",
+ description: "Specify path of ignore file"
+ },
+ {
+ option: "ignore",
+ type: "Boolean",
+ default: "true",
+ description: "Disable use of ignore files and patterns"
+ },
+ {
+ option: "ignore-pattern",
+ type: "[String]",
+ description: "Pattern of files to ignore (in addition to those in .eslintignore)",
+ concatRepeatedArrays: [true, {
+ oneValuePerFlag: true
+ }]
+ },
+ {
+ heading: "Using stdin"
+ },
+ {
+ option: "stdin",
+ type: "Boolean",
+ default: "false",
+ description: "Lint code provided on <STDIN>"
+ },
+ {
+ option: "stdin-filename",
+ type: "String",
+ description: "Specify filename to process STDIN as"
+ },
+ {
+ heading: "Handling warnings"
+ },
+ {
+ option: "quiet",
+ type: "Boolean",
+ default: "false",
+ description: "Report errors only"
+ },
+ {
+ option: "max-warnings",
+ type: "Int",
+ default: "-1",
+ description: "Number of warnings to trigger nonzero exit code"
+ },
+ {
+ heading: "Output"
+ },
+ {
+ option: "output-file",
+ alias: "o",
+ type: "path::String",
+ description: "Specify file to write report to"
+ },
+ {
+ option: "format",
+ alias: "f",
+ type: "String",
+ default: "stylish",
+ description: "Use a specific output format"
+ },
+ {
+ option: "color",
+ type: "Boolean",
+ alias: "no-color",
+ description: "Force enabling/disabling of color"
+ },
+ {
+ heading: "Miscellaneous"
+ },
+ {
+ option: "init",
+ type: "Boolean",
+ default: "false",
+ description: "Run config initialization wizard"
+ },
+ {
+ option: "fix",
+ type: "Boolean",
+ default: false,
+ description: "Automatically fix problems"
+ },
+ {
+ option: "fix-dry-run",
+ type: "Boolean",
+ default: false,
+ description: "Automatically fix problems without saving the changes to the file system"
+ },
+ {
+ option: "debug",
+ type: "Boolean",
+ default: false,
+ description: "Output debugging information"
+ },
+ {
+ option: "help",
+ alias: "h",
+ type: "Boolean",
+ description: "Show help"
+ },
+ {
+ option: "version",
+ alias: "v",
+ type: "Boolean",
+ description: "Output the version number"
+ },
+ {
+ option: "inline-config",
+ type: "Boolean",
+ default: "true",
+ description: "Prevent comments from changing config or rules"
+ },
+ {
+ option: "report-unused-disable-directives",
+ type: "Boolean",
+ default: false,
+ description: "Adds reported errors for unused eslint-disable directives"
+ },
+ {
+ option: "print-config",
+ type: "path::String",
+ description: "Print the configuration for the given file"
+ }
+ ]
+});
diff --git a/tools/node_modules/eslint/lib/report-translator.js b/tools/node_modules/eslint/lib/report-translator.js
new file mode 100644
index 0000000000..9c4ab8b9a9
--- /dev/null
+++ b/tools/node_modules/eslint/lib/report-translator.js
@@ -0,0 +1,274 @@
+/**
+ * @fileoverview A helper that translates context.report() calls from the rule API into generic problem objects
+ * @author Teddy Katz
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const assert = require("assert");
+const ruleFixer = require("./util/rule-fixer");
+
+//------------------------------------------------------------------------------
+// Typedefs
+//------------------------------------------------------------------------------
+
+/**
+ * An error message description
+ * @typedef {Object} MessageDescriptor
+ * @property {ASTNode} [node] The reported node
+ * @property {Location} loc The location of the problem.
+ * @property {string} message The problem message.
+ * @property {Object} [data] Optional data to use to fill in placeholders in the
+ * message.
+ * @property {Function} [fix] The function to call that creates a fix command.
+ */
+
+//------------------------------------------------------------------------------
+// Module Definition
+//------------------------------------------------------------------------------
+
+
+/**
+ * Translates a multi-argument context.report() call into a single object argument call
+ * @param {...*} arguments A list of arguments passed to `context.report`
+ * @returns {MessageDescriptor} A normalized object containing report information
+ */
+function normalizeMultiArgReportCall() {
+
+ // If there is one argument, it is considered to be a new-style call already.
+ if (arguments.length === 1) {
+ return arguments[0];
+ }
+
+ // If the second argument is a string, the arguments are interpreted as [node, message, data, fix].
+ if (typeof arguments[1] === "string") {
+ return {
+ node: arguments[0],
+ message: arguments[1],
+ data: arguments[2],
+ fix: arguments[3]
+ };
+ }
+
+ // Otherwise, the arguments are interpreted as [node, loc, message, data, fix].
+ return {
+ node: arguments[0],
+ loc: arguments[1],
+ message: arguments[2],
+ data: arguments[3],
+ fix: arguments[4]
+ };
+}
+
+/**
+ * Asserts that either a loc or a node was provided, and the node is valid if it was provided.
+ * @param {MessageDescriptor} descriptor A descriptor to validate
+ * @returns {void}
+ * @throws AssertionError if neither a node nor a loc was provided, or if the node is not an object
+ */
+function assertValidNodeInfo(descriptor) {
+ if (descriptor.node) {
+ assert(typeof descriptor.node === "object", "Node must be an object");
+ } else {
+ assert(descriptor.loc, "Node must be provided when reporting error if location is not provided");
+ }
+}
+
+/**
+ * Normalizes a MessageDescriptor to always have a `loc` with `start` and `end` properties
+ * @param {MessageDescriptor} descriptor A descriptor for the report from a rule.
+ * @returns {{start: Location, end: (Location|null)}} An updated location that infers the `start` and `end` properties
+ * from the `node` of the original descriptor, or infers the `start` from the `loc` of the original descriptor.
+ */
+function normalizeReportLoc(descriptor) {
+ if (descriptor.loc) {
+ if (descriptor.loc.start) {
+ return descriptor.loc;
+ }
+ return { start: descriptor.loc, end: null };
+ }
+ return descriptor.node.loc;
+}
+
+/**
+ * Interpolates data placeholders in report messages
+ * @param {MessageDescriptor} descriptor The report message descriptor.
+ * @returns {string} The interpolated message for the descriptor
+ */
+function normalizeMessagePlaceholders(descriptor) {
+ if (!descriptor.data) {
+ return descriptor.message;
+ }
+ return descriptor.message.replace(/\{\{\s*([^{}]+?)\s*\}\}/g, (fullMatch, term) => {
+ if (term in descriptor.data) {
+ return descriptor.data[term];
+ }
+
+ return fullMatch;
+ });
+}
+
+/**
+ * Compares items in a fixes array by range.
+ * @param {Fix} a The first message.
+ * @param {Fix} b The second message.
+ * @returns {int} -1 if a comes before b, 1 if a comes after b, 0 if equal.
+ * @private
+ */
+function compareFixesByRange(a, b) {
+ return a.range[0] - b.range[0] || a.range[1] - b.range[1];
+}
+
+/**
+ * Merges the given fixes array into one.
+ * @param {Fix[]} fixes The fixes to merge.
+ * @param {SourceCode} sourceCode The source code object to get the text between fixes.
+ * @returns {{text: string, range: [number, number]}} The merged fixes
+ */
+function mergeFixes(fixes, sourceCode) {
+ if (fixes.length === 0) {
+ return null;
+ }
+ if (fixes.length === 1) {
+ return fixes[0];
+ }
+
+ fixes.sort(compareFixesByRange);
+
+ const originalText = sourceCode.text;
+ const start = fixes[0].range[0];
+ const end = fixes[fixes.length - 1].range[1];
+ let text = "";
+ let lastPos = Number.MIN_SAFE_INTEGER;
+
+ for (const fix of fixes) {
+ assert(fix.range[0] >= lastPos, "Fix objects must not be overlapped in a report.");
+
+ if (fix.range[0] >= 0) {
+ text += originalText.slice(Math.max(0, start, lastPos), fix.range[0]);
+ }
+ text += fix.text;
+ lastPos = fix.range[1];
+ }
+ text += originalText.slice(Math.max(0, start, lastPos), end);
+
+ return { range: [start, end], text };
+}
+
+/**
+ * Gets one fix object from the given descriptor.
+ * If the descriptor retrieves multiple fixes, this merges those to one.
+ * @param {MessageDescriptor} descriptor The report descriptor.
+ * @param {SourceCode} sourceCode The source code object to get text between fixes.
+ * @returns {({text: string, range: [number, number]}|null)} The fix for the descriptor
+ */
+function normalizeFixes(descriptor, sourceCode) {
+ if (typeof descriptor.fix !== "function") {
+ return null;
+ }
+
+ // @type {null | Fix | Fix[] | IterableIterator<Fix>}
+ const fix = descriptor.fix(ruleFixer);
+
+ // Merge to one.
+ if (fix && Symbol.iterator in fix) {
+ return mergeFixes(Array.from(fix), sourceCode);
+ }
+ return fix;
+}
+
+/**
+ * Creates information about the report from a descriptor
+ * @param {{
+ * ruleId: string,
+ * severity: (0|1|2),
+ * node: (ASTNode|null),
+ * message: string,
+ * loc: {start: SourceLocation, end: (SourceLocation|null)},
+ * fix: ({text: string, range: [number, number]}|null),
+ * sourceLines: string[]
+ * }} options Information about the problem
+ * @returns {function(...args): {
+ * ruleId: string,
+ * severity: (0|1|2),
+ * message: string,
+ * line: number,
+ * column: number,
+ * endLine: (number|undefined),
+ * endColumn: (number|undefined),
+ * nodeType: (string|null),
+ * source: string,
+ * fix: ({text: string, range: [number, number]}|null)
+ * }} Information about the report
+ */
+function createProblem(options) {
+ const problem = {
+ ruleId: options.ruleId,
+ severity: options.severity,
+ message: options.message,
+ line: options.loc.start.line,
+ column: options.loc.start.column + 1,
+ nodeType: options.node && options.node.type || null,
+ source: options.sourceLines[options.loc.start.line - 1] || ""
+ };
+
+ if (options.loc.end) {
+ problem.endLine = options.loc.end.line;
+ problem.endColumn = options.loc.end.column + 1;
+ }
+
+ if (options.fix) {
+ problem.fix = options.fix;
+ }
+
+ return problem;
+}
+
+/**
+ * Returns a function that converts the arguments of a `context.report` call from a rule into a reported
+ * problem for the Node.js API.
+ * @param {{ruleId: string, severity: number, sourceCode: SourceCode}} metadata Metadata for the reported problem
+ * @param {SourceCode} sourceCode The `SourceCode` instance for the text being linted
+ * @returns {function(...args): {
+ * ruleId: string,
+ * severity: (0|1|2),
+ * message: string,
+ * line: number,
+ * column: number,
+ * endLine: (number|undefined),
+ * endColumn: (number|undefined),
+ * nodeType: (string|null),
+ * source: string,
+ * fix: ({text: string, range: [number, number]}|null)
+ * }}
+ * Information about the report
+ */
+
+module.exports = function createReportTranslator(metadata) {
+
+ /*
+ * `createReportTranslator` gets called once per enabled rule per file. It needs to be very performant.
+ * The report translator itself (i.e. the function that `createReportTranslator` returns) gets
+ * called every time a rule reports a problem, which happens much less frequently (usually, the vast
+ * majority of rules don't report any problems for a given file).
+ */
+ return function() {
+ const descriptor = normalizeMultiArgReportCall.apply(null, arguments);
+
+ assertValidNodeInfo(descriptor);
+
+ return createProblem({
+ ruleId: metadata.ruleId,
+ severity: metadata.severity,
+ node: descriptor.node,
+ message: normalizeMessagePlaceholders(descriptor),
+ loc: normalizeReportLoc(descriptor),
+ fix: normalizeFixes(descriptor, metadata.sourceCode),
+ sourceLines: metadata.sourceCode.lines
+ });
+ };
+};
diff --git a/tools/node_modules/eslint/lib/rules.js b/tools/node_modules/eslint/lib/rules.js
new file mode 100644
index 0000000000..040f9db505
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules.js
@@ -0,0 +1,140 @@
+/**
+ * @fileoverview Defines a storage for rules.
+ * @author Nicholas C. Zakas
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const lodash = require("lodash");
+const loadRules = require("./load-rules");
+const ruleReplacements = require("../conf/replacements").rules;
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Creates a stub rule that gets used when a rule with a given ID is not found.
+ * @param {string} ruleId The ID of the missing rule
+ * @returns {{create: function(RuleContext): Object}} A rule that reports an error at the first location
+ * in the program. The report has the message `Definition for rule '${ruleId}' was not found` if the rule is unknown,
+ * or `Rule '${ruleId}' was removed and replaced by: ${replacements.join(", ")}` if the rule is known to have been
+ * replaced.
+ */
+const createMissingRule = lodash.memoize(ruleId => {
+ const message = Object.prototype.hasOwnProperty.call(ruleReplacements, ruleId)
+ ? `Rule '${ruleId}' was removed and replaced by: ${ruleReplacements[ruleId].join(", ")}`
+ : `Definition for rule '${ruleId}' was not found`;
+
+ return {
+ create: context => ({
+ Program() {
+ context.report({
+ loc: { line: 1, column: 0 },
+ message
+ });
+ }
+ })
+ };
+});
+
+/**
+ * Normalizes a rule module to the new-style API
+ * @param {(Function|{create: Function})} rule A rule object, which can either be a function
+ * ("old-style") or an object with a `create` method ("new-style")
+ * @returns {{create: Function}} A new-style rule.
+ */
+function normalizeRule(rule) {
+ return typeof rule === "function" ? Object.assign({ create: rule }, rule) : rule;
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+class Rules {
+ constructor() {
+ this._rules = Object.create(null);
+
+ this.load();
+ }
+
+ /**
+ * Registers a rule module for rule id in storage.
+ * @param {string} ruleId Rule id (file name).
+ * @param {Function} ruleModule Rule handler.
+ * @returns {void}
+ */
+ define(ruleId, ruleModule) {
+ this._rules[ruleId] = normalizeRule(ruleModule);
+ }
+
+ /**
+ * Loads and registers all rules from passed rules directory.
+ * @param {string} [rulesDir] Path to rules directory, may be relative. Defaults to `lib/rules`.
+ * @param {string} cwd Current working directory
+ * @returns {void}
+ */
+ load(rulesDir, cwd) {
+ const newRules = loadRules(rulesDir, cwd);
+
+ Object.keys(newRules).forEach(ruleId => {
+ this.define(ruleId, newRules[ruleId]);
+ });
+ }
+
+ /**
+ * Registers all given rules of a plugin.
+ * @param {Object} plugin The plugin object to import.
+ * @param {string} pluginName The name of the plugin without prefix (`eslint-plugin-`).
+ * @returns {void}
+ */
+ importPlugin(plugin, pluginName) {
+ if (plugin.rules) {
+ Object.keys(plugin.rules).forEach(ruleId => {
+ const qualifiedRuleId = `${pluginName}/${ruleId}`,
+ rule = plugin.rules[ruleId];
+
+ this.define(qualifiedRuleId, rule);
+ });
+ }
+ }
+
+ /**
+ * Access rule handler by id (file name).
+ * @param {string} ruleId Rule id (file name).
+ * @returns {{create: Function, schema: JsonSchema[]}}
+ * A rule. This is normalized to always have the new-style shape with a `create` method.
+ */
+ get(ruleId) {
+ if (!Object.prototype.hasOwnProperty.call(this._rules, ruleId)) {
+ return createMissingRule(ruleId);
+ }
+ if (typeof this._rules[ruleId] === "string") {
+ return normalizeRule(require(this._rules[ruleId]));
+ }
+ return this._rules[ruleId];
+
+ }
+
+ /**
+ * Get an object with all currently loaded rules
+ * @returns {Map} All loaded rules
+ */
+ getAllLoadedRules() {
+ const allRules = new Map();
+
+ Object.keys(this._rules).forEach(name => {
+ const rule = this.get(name);
+
+ allRules.set(name, rule);
+ });
+ return allRules;
+ }
+}
+
+module.exports = Rules;
diff --git a/tools/node_modules/eslint/lib/rules/.eslintrc.yml b/tools/node_modules/eslint/lib/rules/.eslintrc.yml
new file mode 100644
index 0000000000..2a8d907935
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/.eslintrc.yml
@@ -0,0 +1,3 @@
+rules:
+ rulesdir/no-invalid-meta: "error"
+ rulesdir/consistent-docs-description: "error"
diff --git a/tools/node_modules/eslint/lib/rules/accessor-pairs.js b/tools/node_modules/eslint/lib/rules/accessor-pairs.js
new file mode 100644
index 0000000000..4afdc7136c
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/accessor-pairs.js
@@ -0,0 +1,156 @@
+/**
+ * @fileoverview Rule to flag wrapping non-iife in parens
+ * @author Gyandeep Singh
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Checks whether or not a given node is an `Identifier` node which was named a given name.
+ * @param {ASTNode} node - A node to check.
+ * @param {string} name - An expected name of the node.
+ * @returns {boolean} `true` if the node is an `Identifier` node which was named as expected.
+ */
+function isIdentifier(node, name) {
+ return node.type === "Identifier" && node.name === name;
+}
+
+/**
+ * Checks whether or not a given node is an argument of a specified method call.
+ * @param {ASTNode} node - A node to check.
+ * @param {number} index - An expected index of the node in arguments.
+ * @param {string} object - An expected name of the object of the method.
+ * @param {string} property - An expected name of the method.
+ * @returns {boolean} `true` if the node is an argument of the specified method call.
+ */
+function isArgumentOfMethodCall(node, index, object, property) {
+ const parent = node.parent;
+
+ return (
+ parent.type === "CallExpression" &&
+ parent.callee.type === "MemberExpression" &&
+ parent.callee.computed === false &&
+ isIdentifier(parent.callee.object, object) &&
+ isIdentifier(parent.callee.property, property) &&
+ parent.arguments[index] === node
+ );
+}
+
+/**
+ * Checks whether or not a given node is a property descriptor.
+ * @param {ASTNode} node - A node to check.
+ * @returns {boolean} `true` if the node is a property descriptor.
+ */
+function isPropertyDescriptor(node) {
+
+ // Object.defineProperty(obj, "foo", {set: ...})
+ if (isArgumentOfMethodCall(node, 2, "Object", "defineProperty") ||
+ isArgumentOfMethodCall(node, 2, "Reflect", "defineProperty")
+ ) {
+ return true;
+ }
+
+ /*
+ * Object.defineProperties(obj, {foo: {set: ...}})
+ * Object.create(proto, {foo: {set: ...}})
+ */
+ node = node.parent.parent;
+
+ return node.type === "ObjectExpression" && (
+ isArgumentOfMethodCall(node, 1, "Object", "create") ||
+ isArgumentOfMethodCall(node, 1, "Object", "defineProperties")
+ );
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce getter and setter pairs in objects",
+ category: "Best Practices",
+ recommended: false
+ },
+ schema: [{
+ type: "object",
+ properties: {
+ getWithoutSet: {
+ type: "boolean"
+ },
+ setWithoutGet: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }]
+ },
+ create(context) {
+ const config = context.options[0] || {};
+ const checkGetWithoutSet = config.getWithoutSet === true;
+ const checkSetWithoutGet = config.setWithoutGet !== false;
+
+ /**
+ * Checks a object expression to see if it has setter and getter both present or none.
+ * @param {ASTNode} node The node to check.
+ * @returns {void}
+ * @private
+ */
+ function checkLonelySetGet(node) {
+ let isSetPresent = false;
+ let isGetPresent = false;
+ const isDescriptor = isPropertyDescriptor(node);
+
+ for (let i = 0, end = node.properties.length; i < end; i++) {
+ const property = node.properties[i];
+
+ let propToCheck = "";
+
+ if (property.kind === "init") {
+ if (isDescriptor && !property.computed) {
+ propToCheck = property.key.name;
+ }
+ } else {
+ propToCheck = property.kind;
+ }
+
+ switch (propToCheck) {
+ case "set":
+ isSetPresent = true;
+ break;
+
+ case "get":
+ isGetPresent = true;
+ break;
+
+ default:
+
+ // Do nothing
+ }
+
+ if (isSetPresent && isGetPresent) {
+ break;
+ }
+ }
+
+ if (checkSetWithoutGet && isSetPresent && !isGetPresent) {
+ context.report({ node, message: "Getter is not present." });
+ } else if (checkGetWithoutSet && isGetPresent && !isSetPresent) {
+ context.report({ node, message: "Setter is not present." });
+ }
+ }
+
+ return {
+ ObjectExpression(node) {
+ if (checkSetWithoutGet || checkGetWithoutSet) {
+ checkLonelySetGet(node);
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/array-bracket-newline.js b/tools/node_modules/eslint/lib/rules/array-bracket-newline.js
new file mode 100644
index 0000000000..cb7350a825
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/array-bracket-newline.js
@@ -0,0 +1,249 @@
+/**
+ * @fileoverview Rule to enforce linebreaks after open and before close array brackets
+ * @author Jan Peer Stöcklmair <https://github.com/JPeer264>
+ */
+
+"use strict";
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce linebreaks after opening and before closing array brackets",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+ fixable: "whitespace",
+ schema: [
+ {
+ oneOf: [
+ {
+ enum: ["always", "never", "consistent"]
+ },
+ {
+ type: "object",
+ properties: {
+ multiline: {
+ type: "boolean"
+ },
+ minItems: {
+ type: ["integer", "null"],
+ minimum: 0
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ }
+ ]
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+
+
+ //----------------------------------------------------------------------
+ // Helpers
+ //----------------------------------------------------------------------
+
+ /**
+ * Normalizes a given option value.
+ *
+ * @param {string|Object|undefined} option - An option value to parse.
+ * @returns {{multiline: boolean, minItems: number}} Normalized option object.
+ */
+ function normalizeOptionValue(option) {
+ let consistent = false;
+ let multiline = false;
+ let minItems = 0;
+
+ if (option) {
+ if (option === "consistent") {
+ consistent = true;
+ minItems = Number.POSITIVE_INFINITY;
+ } else if (option === "always" || option.minItems === 0) {
+ minItems = 0;
+ } else if (option === "never") {
+ minItems = Number.POSITIVE_INFINITY;
+ } else {
+ multiline = Boolean(option.multiline);
+ minItems = option.minItems || Number.POSITIVE_INFINITY;
+ }
+ } else {
+ consistent = false;
+ multiline = true;
+ minItems = Number.POSITIVE_INFINITY;
+ }
+
+ return { consistent, multiline, minItems };
+ }
+
+ /**
+ * Normalizes a given option value.
+ *
+ * @param {string|Object|undefined} options - An option value to parse.
+ * @returns {{ArrayExpression: {multiline: boolean, minItems: number}, ArrayPattern: {multiline: boolean, minItems: number}}} Normalized option object.
+ */
+ function normalizeOptions(options) {
+ const value = normalizeOptionValue(options);
+
+ return { ArrayExpression: value, ArrayPattern: value };
+ }
+
+ /**
+ * Reports that there shouldn't be a linebreak after the first token
+ * @param {ASTNode} node - The node to report in the event of an error.
+ * @param {Token} token - The token to use for the report.
+ * @returns {void}
+ */
+ function reportNoBeginningLinebreak(node, token) {
+ context.report({
+ node,
+ loc: token.loc,
+ message: "There should be no linebreak after '['.",
+ fix(fixer) {
+ const nextToken = sourceCode.getTokenAfter(token, { includeComments: true });
+
+ if (astUtils.isCommentToken(nextToken)) {
+ return null;
+ }
+
+ return fixer.removeRange([token.range[1], nextToken.range[0]]);
+ }
+ });
+ }
+
+ /**
+ * Reports that there shouldn't be a linebreak before the last token
+ * @param {ASTNode} node - The node to report in the event of an error.
+ * @param {Token} token - The token to use for the report.
+ * @returns {void}
+ */
+ function reportNoEndingLinebreak(node, token) {
+ context.report({
+ node,
+ loc: token.loc,
+ message: "There should be no linebreak before ']'.",
+ fix(fixer) {
+ const previousToken = sourceCode.getTokenBefore(token, { includeComments: true });
+
+ if (astUtils.isCommentToken(previousToken)) {
+ return null;
+ }
+
+ return fixer.removeRange([previousToken.range[1], token.range[0]]);
+ }
+ });
+ }
+
+ /**
+ * Reports that there should be a linebreak after the first token
+ * @param {ASTNode} node - The node to report in the event of an error.
+ * @param {Token} token - The token to use for the report.
+ * @returns {void}
+ */
+ function reportRequiredBeginningLinebreak(node, token) {
+ context.report({
+ node,
+ loc: token.loc,
+ message: "A linebreak is required after '['.",
+ fix(fixer) {
+ return fixer.insertTextAfter(token, "\n");
+ }
+ });
+ }
+
+ /**
+ * Reports that there should be a linebreak before the last token
+ * @param {ASTNode} node - The node to report in the event of an error.
+ * @param {Token} token - The token to use for the report.
+ * @returns {void}
+ */
+ function reportRequiredEndingLinebreak(node, token) {
+ context.report({
+ node,
+ loc: token.loc,
+ message: "A linebreak is required before ']'.",
+ fix(fixer) {
+ return fixer.insertTextBefore(token, "\n");
+ }
+ });
+ }
+
+ /**
+ * Reports a given node if it violated this rule.
+ *
+ * @param {ASTNode} node - A node to check. This is an ArrayExpression node or an ArrayPattern node.
+ * @returns {void}
+ */
+ function check(node) {
+ const elements = node.elements;
+ const normalizedOptions = normalizeOptions(context.options[0]);
+ const options = normalizedOptions[node.type];
+ const openBracket = sourceCode.getFirstToken(node);
+ const closeBracket = sourceCode.getLastToken(node);
+ const firstIncComment = sourceCode.getTokenAfter(openBracket, { includeComments: true });
+ const lastIncComment = sourceCode.getTokenBefore(closeBracket, { includeComments: true });
+ const first = sourceCode.getTokenAfter(openBracket);
+ const last = sourceCode.getTokenBefore(closeBracket);
+
+ const needsLinebreaks = (
+ elements.length >= options.minItems ||
+ (
+ options.multiline &&
+ elements.length > 0 &&
+ firstIncComment.loc.start.line !== lastIncComment.loc.end.line
+ ) ||
+ (
+ elements.length === 0 &&
+ firstIncComment.type === "Block" &&
+ firstIncComment.loc.start.line !== lastIncComment.loc.end.line &&
+ firstIncComment === lastIncComment
+ ) ||
+ (
+ options.consistent &&
+ firstIncComment.loc.start.line !== openBracket.loc.end.line
+ )
+ );
+
+ /*
+ * Use tokens or comments to check multiline or not.
+ * But use only tokens to check whether linebreaks are needed.
+ * This allows:
+ * var arr = [ // eslint-disable-line foo
+ * 'a'
+ * ]
+ */
+
+ if (needsLinebreaks) {
+ if (astUtils.isTokenOnSameLine(openBracket, first)) {
+ reportRequiredBeginningLinebreak(node, openBracket);
+ }
+ if (astUtils.isTokenOnSameLine(last, closeBracket)) {
+ reportRequiredEndingLinebreak(node, closeBracket);
+ }
+ } else {
+ if (!astUtils.isTokenOnSameLine(openBracket, first)) {
+ reportNoBeginningLinebreak(node, openBracket);
+ }
+ if (!astUtils.isTokenOnSameLine(last, closeBracket)) {
+ reportNoEndingLinebreak(node, closeBracket);
+ }
+ }
+ }
+
+ //----------------------------------------------------------------------
+ // Public
+ //----------------------------------------------------------------------
+
+ return {
+ ArrayPattern: check,
+ ArrayExpression: check
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/array-bracket-spacing.js b/tools/node_modules/eslint/lib/rules/array-bracket-spacing.js
new file mode 100644
index 0000000000..aecef2c4f2
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/array-bracket-spacing.js
@@ -0,0 +1,229 @@
+/**
+ * @fileoverview Disallows or enforces spaces inside of array brackets.
+ * @author Jamund Ferguson
+ */
+"use strict";
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce consistent spacing inside array brackets",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+ fixable: "whitespace",
+ schema: [
+ {
+ enum: ["always", "never"]
+ },
+ {
+ type: "object",
+ properties: {
+ singleValue: {
+ type: "boolean"
+ },
+ objectsInArrays: {
+ type: "boolean"
+ },
+ arraysInArrays: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+ create(context) {
+ const spaced = context.options[0] === "always",
+ sourceCode = context.getSourceCode();
+
+ /**
+ * Determines whether an option is set, relative to the spacing option.
+ * If spaced is "always", then check whether option is set to false.
+ * If spaced is "never", then check whether option is set to true.
+ * @param {Object} option - The option to exclude.
+ * @returns {boolean} Whether or not the property is excluded.
+ */
+ function isOptionSet(option) {
+ return context.options[1] ? context.options[1][option] === !spaced : false;
+ }
+
+ const options = {
+ spaced,
+ singleElementException: isOptionSet("singleValue"),
+ objectsInArraysException: isOptionSet("objectsInArrays"),
+ arraysInArraysException: isOptionSet("arraysInArrays")
+ };
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ /**
+ * Reports that there shouldn't be a space after the first token
+ * @param {ASTNode} node - The node to report in the event of an error.
+ * @param {Token} token - The token to use for the report.
+ * @returns {void}
+ */
+ function reportNoBeginningSpace(node, token) {
+ context.report({
+ node,
+ loc: token.loc.start,
+ message: "There should be no space after '{{tokenValue}}'.",
+ data: {
+ tokenValue: token.value
+ },
+ fix(fixer) {
+ const nextToken = sourceCode.getTokenAfter(token);
+
+ return fixer.removeRange([token.range[1], nextToken.range[0]]);
+ }
+ });
+ }
+
+ /**
+ * Reports that there shouldn't be a space before the last token
+ * @param {ASTNode} node - The node to report in the event of an error.
+ * @param {Token} token - The token to use for the report.
+ * @returns {void}
+ */
+ function reportNoEndingSpace(node, token) {
+ context.report({
+ node,
+ loc: token.loc.start,
+ message: "There should be no space before '{{tokenValue}}'.",
+ data: {
+ tokenValue: token.value
+ },
+ fix(fixer) {
+ const previousToken = sourceCode.getTokenBefore(token);
+
+ return fixer.removeRange([previousToken.range[1], token.range[0]]);
+ }
+ });
+ }
+
+ /**
+ * Reports that there should be a space after the first token
+ * @param {ASTNode} node - The node to report in the event of an error.
+ * @param {Token} token - The token to use for the report.
+ * @returns {void}
+ */
+ function reportRequiredBeginningSpace(node, token) {
+ context.report({
+ node,
+ loc: token.loc.start,
+ message: "A space is required after '{{tokenValue}}'.",
+ data: {
+ tokenValue: token.value
+ },
+ fix(fixer) {
+ return fixer.insertTextAfter(token, " ");
+ }
+ });
+ }
+
+ /**
+ * Reports that there should be a space before the last token
+ * @param {ASTNode} node - The node to report in the event of an error.
+ * @param {Token} token - The token to use for the report.
+ * @returns {void}
+ */
+ function reportRequiredEndingSpace(node, token) {
+ context.report({
+ node,
+ loc: token.loc.start,
+ message: "A space is required before '{{tokenValue}}'.",
+ data: {
+ tokenValue: token.value
+ },
+ fix(fixer) {
+ return fixer.insertTextBefore(token, " ");
+ }
+ });
+ }
+
+ /**
+ * Determines if a node is an object type
+ * @param {ASTNode} node - The node to check.
+ * @returns {boolean} Whether or not the node is an object type.
+ */
+ function isObjectType(node) {
+ return node && (node.type === "ObjectExpression" || node.type === "ObjectPattern");
+ }
+
+ /**
+ * Determines if a node is an array type
+ * @param {ASTNode} node - The node to check.
+ * @returns {boolean} Whether or not the node is an array type.
+ */
+ function isArrayType(node) {
+ return node && (node.type === "ArrayExpression" || node.type === "ArrayPattern");
+ }
+
+ /**
+ * Validates the spacing around array brackets
+ * @param {ASTNode} node - The node we're checking for spacing
+ * @returns {void}
+ */
+ function validateArraySpacing(node) {
+ if (options.spaced && node.elements.length === 0) {
+ return;
+ }
+
+ const first = sourceCode.getFirstToken(node),
+ second = sourceCode.getFirstToken(node, 1),
+ last = node.typeAnnotation
+ ? sourceCode.getTokenBefore(node.typeAnnotation)
+ : sourceCode.getLastToken(node),
+ penultimate = sourceCode.getTokenBefore(last),
+ firstElement = node.elements[0],
+ lastElement = node.elements[node.elements.length - 1];
+
+ const openingBracketMustBeSpaced =
+ options.objectsInArraysException && isObjectType(firstElement) ||
+ options.arraysInArraysException && isArrayType(firstElement) ||
+ options.singleElementException && node.elements.length === 1
+ ? !options.spaced : options.spaced;
+
+ const closingBracketMustBeSpaced =
+ options.objectsInArraysException && isObjectType(lastElement) ||
+ options.arraysInArraysException && isArrayType(lastElement) ||
+ options.singleElementException && node.elements.length === 1
+ ? !options.spaced : options.spaced;
+
+ if (astUtils.isTokenOnSameLine(first, second)) {
+ if (openingBracketMustBeSpaced && !sourceCode.isSpaceBetweenTokens(first, second)) {
+ reportRequiredBeginningSpace(node, first);
+ }
+ if (!openingBracketMustBeSpaced && sourceCode.isSpaceBetweenTokens(first, second)) {
+ reportNoBeginningSpace(node, first);
+ }
+ }
+
+ if (first !== penultimate && astUtils.isTokenOnSameLine(penultimate, last)) {
+ if (closingBracketMustBeSpaced && !sourceCode.isSpaceBetweenTokens(penultimate, last)) {
+ reportRequiredEndingSpace(node, last);
+ }
+ if (!closingBracketMustBeSpaced && sourceCode.isSpaceBetweenTokens(penultimate, last)) {
+ reportNoEndingSpace(node, last);
+ }
+ }
+ }
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+ ArrayPattern: validateArraySpacing,
+ ArrayExpression: validateArraySpacing
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/array-callback-return.js b/tools/node_modules/eslint/lib/rules/array-callback-return.js
new file mode 100644
index 0000000000..37d6ebe3a7
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/array-callback-return.js
@@ -0,0 +1,232 @@
+/**
+ * @fileoverview Rule to enforce return statements in callbacks of array's methods
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const lodash = require("lodash");
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+const TARGET_NODE_TYPE = /^(?:Arrow)?FunctionExpression$/;
+const TARGET_METHODS = /^(?:every|filter|find(?:Index)?|map|reduce(?:Right)?|some|sort)$/;
+
+/**
+ * Checks a given code path segment is reachable.
+ *
+ * @param {CodePathSegment} segment - A segment to check.
+ * @returns {boolean} `true` if the segment is reachable.
+ */
+function isReachable(segment) {
+ return segment.reachable;
+}
+
+/**
+ * Gets a readable location.
+ *
+ * - FunctionExpression -> the function name or `function` keyword.
+ * - ArrowFunctionExpression -> `=>` token.
+ *
+ * @param {ASTNode} node - A function node to get.
+ * @param {SourceCode} sourceCode - A source code to get tokens.
+ * @returns {ASTNode|Token} The node or the token of a location.
+ */
+function getLocation(node, sourceCode) {
+ if (node.type === "ArrowFunctionExpression") {
+ return sourceCode.getTokenBefore(node.body);
+ }
+ return node.id || node;
+}
+
+/**
+ * Checks a given node is a MemberExpression node which has the specified name's
+ * property.
+ *
+ * @param {ASTNode} node - A node to check.
+ * @returns {boolean} `true` if the node is a MemberExpression node which has
+ * the specified name's property
+ */
+function isTargetMethod(node) {
+ return (
+ node.type === "MemberExpression" &&
+ TARGET_METHODS.test(astUtils.getStaticPropertyName(node) || "")
+ );
+}
+
+/**
+ * Checks whether or not a given node is a function expression which is the
+ * callback of an array method.
+ *
+ * @param {ASTNode} node - A node to check. This is one of
+ * FunctionExpression or ArrowFunctionExpression.
+ * @returns {boolean} `true` if the node is the callback of an array method.
+ */
+function isCallbackOfArrayMethod(node) {
+ while (node) {
+ const parent = node.parent;
+
+ switch (parent.type) {
+
+ /*
+ * Looks up the destination. e.g.,
+ * foo.every(nativeFoo || function foo() { ... });
+ */
+ case "LogicalExpression":
+ case "ConditionalExpression":
+ node = parent;
+ break;
+
+ /*
+ * If the upper function is IIFE, checks the destination of the return value.
+ * e.g.
+ * foo.every((function() {
+ * // setup...
+ * return function callback() { ... };
+ * })());
+ */
+ case "ReturnStatement": {
+ const func = astUtils.getUpperFunction(parent);
+
+ if (func === null || !astUtils.isCallee(func)) {
+ return false;
+ }
+ node = func.parent;
+ break;
+ }
+
+ /*
+ * e.g.
+ * Array.from([], function() {});
+ * list.every(function() {});
+ */
+ case "CallExpression":
+ if (astUtils.isArrayFromMethod(parent.callee)) {
+ return (
+ parent.arguments.length >= 2 &&
+ parent.arguments[1] === node
+ );
+ }
+ if (isTargetMethod(parent.callee)) {
+ return (
+ parent.arguments.length >= 1 &&
+ parent.arguments[0] === node
+ );
+ }
+ return false;
+
+ // Otherwise this node is not target.
+ default:
+ return false;
+ }
+ }
+
+ /* istanbul ignore next: unreachable */
+ return false;
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce `return` statements in callbacks of array methods",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+ let funcInfo = {
+ upper: null,
+ codePath: null,
+ hasReturn: false,
+ shouldCheck: false,
+ node: null
+ };
+
+ /**
+ * Checks whether or not the last code path segment is reachable.
+ * Then reports this function if the segment is reachable.
+ *
+ * If the last code path segment is reachable, there are paths which are not
+ * returned or thrown.
+ *
+ * @param {ASTNode} node - A node to check.
+ * @returns {void}
+ */
+ function checkLastSegment(node) {
+ if (funcInfo.shouldCheck &&
+ funcInfo.codePath.currentSegments.some(isReachable)
+ ) {
+ context.report({
+ node,
+ loc: getLocation(node, context.getSourceCode()).loc.start,
+ message: funcInfo.hasReturn
+ ? "Expected to return a value at the end of {{name}}."
+ : "Expected to return a value in {{name}}.",
+ data: {
+ name: astUtils.getFunctionNameWithKind(funcInfo.node)
+ }
+ });
+ }
+ }
+
+ return {
+
+ // Stacks this function's information.
+ onCodePathStart(codePath, node) {
+ funcInfo = {
+ upper: funcInfo,
+ codePath,
+ hasReturn: false,
+ shouldCheck:
+ TARGET_NODE_TYPE.test(node.type) &&
+ node.body.type === "BlockStatement" &&
+ isCallbackOfArrayMethod(node) &&
+ !node.async &&
+ !node.generator,
+ node
+ };
+ },
+
+ // Pops this function's information.
+ onCodePathEnd() {
+ funcInfo = funcInfo.upper;
+ },
+
+ // Checks the return statement is valid.
+ ReturnStatement(node) {
+ if (funcInfo.shouldCheck) {
+ funcInfo.hasReturn = true;
+
+ if (!node.argument) {
+ context.report({
+ node,
+ message: "{{name}} expected a return value.",
+ data: {
+ name: lodash.upperFirst(astUtils.getFunctionNameWithKind(funcInfo.node))
+ }
+ });
+ }
+ }
+ },
+
+ // Reports a given function if the last path is reachable.
+ "FunctionExpression:exit": checkLastSegment,
+ "ArrowFunctionExpression:exit": checkLastSegment
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/array-element-newline.js b/tools/node_modules/eslint/lib/rules/array-element-newline.js
new file mode 100644
index 0000000000..26dc9bfa0b
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/array-element-newline.js
@@ -0,0 +1,230 @@
+/**
+ * @fileoverview Rule to enforce line breaks after each array element
+ * @author Jan Peer Stöcklmair <https://github.com/JPeer264>
+ */
+
+"use strict";
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce line breaks after each array element",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+ fixable: "whitespace",
+ schema: [
+ {
+ oneOf: [
+ {
+ enum: ["always", "never"]
+ },
+ {
+ type: "object",
+ properties: {
+ multiline: {
+ type: "boolean"
+ },
+ minItems: {
+ type: ["integer", "null"],
+ minimum: 0
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ }
+ ]
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+
+ //----------------------------------------------------------------------
+ // Helpers
+ //----------------------------------------------------------------------
+
+ /**
+ * Normalizes a given option value.
+ *
+ * @param {string|Object|undefined} option - An option value to parse.
+ * @returns {{multiline: boolean, minItems: number}} Normalized option object.
+ */
+ function normalizeOptionValue(option) {
+ let multiline = false;
+ let minItems;
+
+ option = option || "always";
+
+ if (option === "always" || option.minItems === 0) {
+ minItems = 0;
+ } else if (option === "never") {
+ minItems = Number.POSITIVE_INFINITY;
+ } else {
+ multiline = Boolean(option.multiline);
+ minItems = option.minItems || Number.POSITIVE_INFINITY;
+ }
+
+ return { multiline, minItems };
+ }
+
+ /**
+ * Normalizes a given option value.
+ *
+ * @param {string|Object|undefined} options - An option value to parse.
+ * @returns {{ArrayExpression: {multiline: boolean, minItems: number}, ArrayPattern: {multiline: boolean, minItems: number}}} Normalized option object.
+ */
+ function normalizeOptions(options) {
+ const value = normalizeOptionValue(options);
+
+ return { ArrayExpression: value, ArrayPattern: value };
+ }
+
+ /**
+ * Reports that there shouldn't be a line break after the first token
+ * @param {Token} token - The token to use for the report.
+ * @returns {void}
+ */
+ function reportNoLineBreak(token) {
+ const tokenBefore = sourceCode.getTokenBefore(token, { includeComments: true });
+
+ context.report({
+ loc: {
+ start: tokenBefore.loc.end,
+ end: token.loc.start
+ },
+ message: "There should be no linebreak here.",
+ fix(fixer) {
+ if (astUtils.isCommentToken(tokenBefore)) {
+ return null;
+ }
+
+ if (!astUtils.isTokenOnSameLine(tokenBefore, token)) {
+ return fixer.replaceTextRange([tokenBefore.range[1], token.range[0]], " ");
+ }
+
+ /*
+ * This will check if the comma is on the same line as the next element
+ * Following array:
+ * [
+ * 1
+ * , 2
+ * , 3
+ * ]
+ *
+ * will be fixed to:
+ * [
+ * 1, 2, 3
+ * ]
+ */
+ const twoTokensBefore = sourceCode.getTokenBefore(tokenBefore, { includeComments: true });
+
+ if (astUtils.isCommentToken(twoTokensBefore)) {
+ return null;
+ }
+
+ return fixer.replaceTextRange([twoTokensBefore.range[1], tokenBefore.range[0]], "");
+
+ }
+ });
+ }
+
+ /**
+ * Reports that there should be a line break after the first token
+ * @param {Token} token - The token to use for the report.
+ * @returns {void}
+ */
+ function reportRequiredLineBreak(token) {
+ const tokenBefore = sourceCode.getTokenBefore(token, { includeComments: true });
+
+ context.report({
+ loc: {
+ start: tokenBefore.loc.end,
+ end: token.loc.start
+ },
+ message: "There should be a linebreak after this element.",
+ fix(fixer) {
+ return fixer.replaceTextRange([tokenBefore.range[1], token.range[0]], "\n");
+ }
+ });
+ }
+
+ /**
+ * Reports a given node if it violated this rule.
+ *
+ * @param {ASTNode} node - A node to check. This is an ObjectExpression node or an ObjectPattern node.
+ * @param {{multiline: boolean, minItems: number}} options - An option object.
+ * @returns {void}
+ */
+ function check(node) {
+ const elements = node.elements;
+ const normalizedOptions = normalizeOptions(context.options[0]);
+ const options = normalizedOptions[node.type];
+
+ let elementBreak = false;
+
+ /*
+ * MULTILINE: true
+ * loop through every element and check
+ * if at least one element has linebreaks inside
+ * this ensures that following is not valid (due to elements are on the same line):
+ *
+ * [
+ * 1,
+ * 2,
+ * 3
+ * ]
+ */
+ if (options.multiline) {
+ elementBreak = elements
+ .filter(element => element !== null)
+ .some(element => element.loc.start.line !== element.loc.end.line);
+ }
+
+ const needsLinebreaks = (
+ elements.length >= options.minItems ||
+ (
+ options.multiline &&
+ elementBreak
+ )
+ );
+
+ elements.forEach((element, i) => {
+ const previousElement = elements[i - 1];
+
+ if (i === 0 || element === null || previousElement === null) {
+ return;
+ }
+
+ const commaToken = sourceCode.getFirstTokenBetween(previousElement, element, astUtils.isCommaToken);
+ const lastTokenOfPreviousElement = sourceCode.getTokenBefore(commaToken);
+ const firstTokenOfCurrentElement = sourceCode.getTokenAfter(commaToken);
+
+ if (needsLinebreaks) {
+ if (astUtils.isTokenOnSameLine(lastTokenOfPreviousElement, firstTokenOfCurrentElement)) {
+ reportRequiredLineBreak(firstTokenOfCurrentElement);
+ }
+ } else {
+ if (!astUtils.isTokenOnSameLine(lastTokenOfPreviousElement, firstTokenOfCurrentElement)) {
+ reportNoLineBreak(firstTokenOfCurrentElement);
+ }
+ }
+ });
+ }
+
+ //----------------------------------------------------------------------
+ // Public
+ //----------------------------------------------------------------------
+
+ return {
+ ArrayPattern: check,
+ ArrayExpression: check
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/arrow-body-style.js b/tools/node_modules/eslint/lib/rules/arrow-body-style.js
new file mode 100644
index 0000000000..78a391334d
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/arrow-body-style.js
@@ -0,0 +1,215 @@
+/**
+ * @fileoverview Rule to require braces in arrow function body.
+ * @author Alberto Rodríguez
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require braces around arrow function bodies",
+ category: "ECMAScript 6",
+ recommended: false
+ },
+
+ schema: {
+ anyOf: [
+ {
+ type: "array",
+ items: [
+ {
+ enum: ["always", "never"]
+ }
+ ],
+ minItems: 0,
+ maxItems: 1
+ },
+ {
+ type: "array",
+ items: [
+ {
+ enum: ["as-needed"]
+ },
+ {
+ type: "object",
+ properties: {
+ requireReturnForObjectLiteral: { type: "boolean" }
+ },
+ additionalProperties: false
+ }
+ ],
+ minItems: 0,
+ maxItems: 2
+ }
+ ]
+ },
+
+ fixable: "code"
+ },
+
+ create(context) {
+ const options = context.options;
+ const always = options[0] === "always";
+ const asNeeded = !options[0] || options[0] === "as-needed";
+ const never = options[0] === "never";
+ const requireReturnForObjectLiteral = options[1] && options[1].requireReturnForObjectLiteral;
+ const sourceCode = context.getSourceCode();
+
+ /**
+ * Checks whether the given node has ASI problem or not.
+ * @param {Token} token The token to check.
+ * @returns {boolean} `true` if it changes semantics if `;` or `}` followed by the token are removed.
+ */
+ function hasASIProblem(token) {
+ return token && token.type === "Punctuator" && /^[([/`+-]/.test(token.value);
+ }
+
+ /**
+ * Gets the closing parenthesis which is the pair of the given opening parenthesis.
+ * @param {Token} token The opening parenthesis token to get.
+ * @returns {Token} The found closing parenthesis token.
+ */
+ function findClosingParen(token) {
+ let node = sourceCode.getNodeByRangeIndex(token.range[1]);
+
+ while (!astUtils.isParenthesised(sourceCode, node)) {
+ node = node.parent;
+ }
+ return sourceCode.getTokenAfter(node);
+ }
+
+ /**
+ * Determines whether a arrow function body needs braces
+ * @param {ASTNode} node The arrow function node.
+ * @returns {void}
+ */
+ function validate(node) {
+ const arrowBody = node.body;
+
+ if (arrowBody.type === "BlockStatement") {
+ const blockBody = arrowBody.body;
+
+ if (blockBody.length !== 1 && !never) {
+ return;
+ }
+
+ if (asNeeded && requireReturnForObjectLiteral && blockBody[0].type === "ReturnStatement" &&
+ blockBody[0].argument && blockBody[0].argument.type === "ObjectExpression") {
+ return;
+ }
+
+ if (never || asNeeded && blockBody[0].type === "ReturnStatement") {
+ context.report({
+ node,
+ loc: arrowBody.loc.start,
+ message: "Unexpected block statement surrounding arrow body.",
+ fix(fixer) {
+ const fixes = [];
+
+ if (blockBody.length !== 1 ||
+ blockBody[0].type !== "ReturnStatement" ||
+ !blockBody[0].argument ||
+ hasASIProblem(sourceCode.getTokenAfter(arrowBody))
+ ) {
+ return fixes;
+ }
+
+ const openingBrace = sourceCode.getFirstToken(arrowBody);
+ const closingBrace = sourceCode.getLastToken(arrowBody);
+ const firstValueToken = sourceCode.getFirstToken(blockBody[0], 1);
+ const lastValueToken = sourceCode.getLastToken(blockBody[0]);
+ const commentsExist =
+ sourceCode.commentsExistBetween(openingBrace, firstValueToken) ||
+ sourceCode.commentsExistBetween(lastValueToken, closingBrace);
+
+ /*
+ * Remove tokens around the return value.
+ * If comments don't exist, remove extra spaces as well.
+ */
+ if (commentsExist) {
+ fixes.push(
+ fixer.remove(openingBrace),
+ fixer.remove(closingBrace),
+ fixer.remove(sourceCode.getTokenAfter(openingBrace)) // return keyword
+ );
+ } else {
+ fixes.push(
+ fixer.removeRange([openingBrace.range[0], firstValueToken.range[0]]),
+ fixer.removeRange([lastValueToken.range[1], closingBrace.range[1]])
+ );
+ }
+
+ /*
+ * If the first token of the reutrn value is `{`,
+ * enclose the return value by parentheses to avoid syntax error.
+ */
+ if (astUtils.isOpeningBraceToken(firstValueToken)) {
+ fixes.push(
+ fixer.insertTextBefore(firstValueToken, "("),
+ fixer.insertTextAfter(lastValueToken, ")")
+ );
+ }
+
+ /*
+ * If the last token of the return statement is semicolon, remove it.
+ * Non-block arrow body is an expression, not a statement.
+ */
+ if (astUtils.isSemicolonToken(lastValueToken)) {
+ fixes.push(fixer.remove(lastValueToken));
+ }
+
+ return fixes;
+ }
+ });
+ }
+ } else {
+ if (always || (asNeeded && requireReturnForObjectLiteral && arrowBody.type === "ObjectExpression")) {
+ context.report({
+ node,
+ loc: arrowBody.loc.start,
+ message: "Expected block statement surrounding arrow body.",
+ fix(fixer) {
+ const fixes = [];
+ const arrowToken = sourceCode.getTokenBefore(arrowBody, astUtils.isArrowToken);
+ const firstBodyToken = sourceCode.getTokenAfter(arrowToken);
+ const lastBodyToken = sourceCode.getLastToken(node);
+ const isParenthesisedObjectLiteral =
+ astUtils.isOpeningParenToken(firstBodyToken) &&
+ astUtils.isOpeningBraceToken(sourceCode.getTokenAfter(firstBodyToken));
+
+ // Wrap the value by a block and a return statement.
+ fixes.push(
+ fixer.insertTextBefore(firstBodyToken, "{return "),
+ fixer.insertTextAfter(lastBodyToken, "}")
+ );
+
+ // If the value is object literal, remove parentheses which were forced by syntax.
+ if (isParenthesisedObjectLiteral) {
+ fixes.push(
+ fixer.remove(firstBodyToken),
+ fixer.remove(findClosingParen(firstBodyToken))
+ );
+ }
+
+ return fixes;
+ }
+ });
+ }
+ }
+ }
+
+ return {
+ "ArrowFunctionExpression:exit": validate
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/arrow-parens.js b/tools/node_modules/eslint/lib/rules/arrow-parens.js
new file mode 100644
index 0000000000..e8f8ddd8e7
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/arrow-parens.js
@@ -0,0 +1,156 @@
+/**
+ * @fileoverview Rule to require parens in arrow function arguments.
+ * @author Jxck
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require parentheses around arrow function arguments",
+ category: "ECMAScript 6",
+ recommended: false
+ },
+
+ fixable: "code",
+
+ schema: [
+ {
+ enum: ["always", "as-needed"]
+ },
+ {
+ type: "object",
+ properties: {
+ requireForBlockBody: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+ const message = "Expected parentheses around arrow function argument.";
+ const asNeededMessage = "Unexpected parentheses around single function argument.";
+ const asNeeded = context.options[0] === "as-needed";
+ const requireForBlockBodyMessage = "Unexpected parentheses around single function argument having a body with no curly braces";
+ const requireForBlockBodyNoParensMessage = "Expected parentheses around arrow function argument having a body with curly braces.";
+ const requireForBlockBody = asNeeded && context.options[1] && context.options[1].requireForBlockBody === true;
+
+ const sourceCode = context.getSourceCode();
+
+ /**
+ * Determines whether a arrow function argument end with `)`
+ * @param {ASTNode} node The arrow function node.
+ * @returns {void}
+ */
+ function parens(node) {
+ const isAsync = node.async;
+ const firstTokenOfParam = sourceCode.getFirstToken(node, isAsync ? 1 : 0);
+
+ /**
+ * Remove the parenthesis around a parameter
+ * @param {Fixer} fixer Fixer
+ * @returns {string} fixed parameter
+ */
+ function fixParamsWithParenthesis(fixer) {
+ const paramToken = sourceCode.getTokenAfter(firstTokenOfParam);
+
+ /*
+ * ES8 allows Trailing commas in function parameter lists and calls
+ * https://github.com/eslint/eslint/issues/8834
+ */
+ const closingParenToken = sourceCode.getTokenAfter(paramToken, astUtils.isClosingParenToken);
+ const asyncToken = isAsync ? sourceCode.getTokenBefore(firstTokenOfParam) : null;
+ const shouldAddSpaceForAsync = asyncToken && (asyncToken.range[1] === firstTokenOfParam.range[0]);
+
+ return fixer.replaceTextRange([
+ firstTokenOfParam.range[0],
+ closingParenToken.range[1]
+ ], `${shouldAddSpaceForAsync ? " " : ""}${paramToken.value}`);
+ }
+
+ // "as-needed", { "requireForBlockBody": true }: x => x
+ if (
+ requireForBlockBody &&
+ node.params.length === 1 &&
+ node.params[0].type === "Identifier" &&
+ !node.params[0].typeAnnotation &&
+ node.body.type !== "BlockStatement" &&
+ !node.returnType
+ ) {
+ if (astUtils.isOpeningParenToken(firstTokenOfParam)) {
+ context.report({
+ node,
+ message: requireForBlockBodyMessage,
+ fix: fixParamsWithParenthesis
+ });
+ }
+ return;
+ }
+
+ if (
+ requireForBlockBody &&
+ node.body.type === "BlockStatement"
+ ) {
+ if (!astUtils.isOpeningParenToken(firstTokenOfParam)) {
+ context.report({
+ node,
+ message: requireForBlockBodyNoParensMessage,
+ fix(fixer) {
+ return fixer.replaceText(firstTokenOfParam, `(${firstTokenOfParam.value})`);
+ }
+ });
+ }
+ return;
+ }
+
+ // "as-needed": x => x
+ if (asNeeded &&
+ node.params.length === 1 &&
+ node.params[0].type === "Identifier" &&
+ !node.params[0].typeAnnotation &&
+ !node.returnType
+ ) {
+ if (astUtils.isOpeningParenToken(firstTokenOfParam)) {
+ context.report({
+ node,
+ message: asNeededMessage,
+ fix: fixParamsWithParenthesis
+ });
+ }
+ return;
+ }
+
+ if (firstTokenOfParam.type === "Identifier") {
+ const after = sourceCode.getTokenAfter(firstTokenOfParam);
+
+ // (x) => x
+ if (after.value !== ")") {
+ context.report({
+ node,
+ message,
+ fix(fixer) {
+ return fixer.replaceText(firstTokenOfParam, `(${firstTokenOfParam.value})`);
+ }
+ });
+ }
+ }
+ }
+
+ return {
+ ArrowFunctionExpression: parens
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/arrow-spacing.js b/tools/node_modules/eslint/lib/rules/arrow-spacing.js
new file mode 100644
index 0000000000..37e03907cb
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/arrow-spacing.js
@@ -0,0 +1,149 @@
+/**
+ * @fileoverview Rule to define spacing before/after arrow function's arrow.
+ * @author Jxck
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce consistent spacing before and after the arrow in arrow functions",
+ category: "ECMAScript 6",
+ recommended: false
+ },
+
+ fixable: "whitespace",
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ before: {
+ type: "boolean"
+ },
+ after: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+
+ // merge rules with default
+ const rule = { before: true, after: true },
+ option = context.options[0] || {};
+
+ rule.before = option.before !== false;
+ rule.after = option.after !== false;
+
+ const sourceCode = context.getSourceCode();
+
+ /**
+ * Get tokens of arrow(`=>`) and before/after arrow.
+ * @param {ASTNode} node The arrow function node.
+ * @returns {Object} Tokens of arrow and before/after arrow.
+ */
+ function getTokens(node) {
+ const arrow = sourceCode.getTokenBefore(node.body, astUtils.isArrowToken);
+
+ return {
+ before: sourceCode.getTokenBefore(arrow),
+ arrow,
+ after: sourceCode.getTokenAfter(arrow)
+ };
+ }
+
+ /**
+ * Count spaces before/after arrow(`=>`) token.
+ * @param {Object} tokens Tokens before/after arrow.
+ * @returns {Object} count of space before/after arrow.
+ */
+ function countSpaces(tokens) {
+ const before = tokens.arrow.range[0] - tokens.before.range[1];
+ const after = tokens.after.range[0] - tokens.arrow.range[1];
+
+ return { before, after };
+ }
+
+ /**
+ * Determines whether space(s) before after arrow(`=>`) is satisfy rule.
+ * if before/after value is `true`, there should be space(s).
+ * if before/after value is `false`, there should be no space.
+ * @param {ASTNode} node The arrow function node.
+ * @returns {void}
+ */
+ function spaces(node) {
+ const tokens = getTokens(node);
+ const countSpace = countSpaces(tokens);
+
+ if (rule.before) {
+
+ // should be space(s) before arrow
+ if (countSpace.before === 0) {
+ context.report({
+ node: tokens.before,
+ message: "Missing space before =>.",
+ fix(fixer) {
+ return fixer.insertTextBefore(tokens.arrow, " ");
+ }
+ });
+ }
+ } else {
+
+ // should be no space before arrow
+ if (countSpace.before > 0) {
+ context.report({
+ node: tokens.before,
+ message: "Unexpected space before =>.",
+ fix(fixer) {
+ return fixer.removeRange([tokens.before.range[1], tokens.arrow.range[0]]);
+ }
+ });
+ }
+ }
+
+ if (rule.after) {
+
+ // should be space(s) after arrow
+ if (countSpace.after === 0) {
+ context.report({
+ node: tokens.after,
+ message: "Missing space after =>.",
+ fix(fixer) {
+ return fixer.insertTextAfter(tokens.arrow, " ");
+ }
+ });
+ }
+ } else {
+
+ // should be no space after arrow
+ if (countSpace.after > 0) {
+ context.report({
+ node: tokens.after,
+ message: "Unexpected space after =>.",
+ fix(fixer) {
+ return fixer.removeRange([tokens.arrow.range[1], tokens.after.range[0]]);
+ }
+ });
+ }
+ }
+ }
+
+ return {
+ ArrowFunctionExpression: spaces
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/block-scoped-var.js b/tools/node_modules/eslint/lib/rules/block-scoped-var.js
new file mode 100644
index 0000000000..0b4d855fae
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/block-scoped-var.js
@@ -0,0 +1,115 @@
+/**
+ * @fileoverview Rule to check for "block scoped" variables by binding context
+ * @author Matt DuVall <http://www.mattduvall.com>
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce the use of variables within the scope they are defined",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+ let stack = [];
+
+ /**
+ * Makes a block scope.
+ * @param {ASTNode} node - A node of a scope.
+ * @returns {void}
+ */
+ function enterScope(node) {
+ stack.push(node.range);
+ }
+
+ /**
+ * Pops the last block scope.
+ * @returns {void}
+ */
+ function exitScope() {
+ stack.pop();
+ }
+
+ /**
+ * Reports a given reference.
+ * @param {eslint-scope.Reference} reference - A reference to report.
+ * @returns {void}
+ */
+ function report(reference) {
+ const identifier = reference.identifier;
+
+ context.report({ node: identifier, message: "'{{name}}' used outside of binding context.", data: { name: identifier.name } });
+ }
+
+ /**
+ * Finds and reports references which are outside of valid scopes.
+ * @param {ASTNode} node - A node to get variables.
+ * @returns {void}
+ */
+ function checkForVariables(node) {
+ if (node.kind !== "var") {
+ return;
+ }
+
+ // Defines a predicate to check whether or not a given reference is outside of valid scope.
+ const scopeRange = stack[stack.length - 1];
+
+ /**
+ * Check if a reference is out of scope
+ * @param {ASTNode} reference node to examine
+ * @returns {boolean} True is its outside the scope
+ * @private
+ */
+ function isOutsideOfScope(reference) {
+ const idRange = reference.identifier.range;
+
+ return idRange[0] < scopeRange[0] || idRange[1] > scopeRange[1];
+ }
+
+ // Gets declared variables, and checks its references.
+ const variables = context.getDeclaredVariables(node);
+
+ for (let i = 0; i < variables.length; ++i) {
+
+ // Reports.
+ variables[i]
+ .references
+ .filter(isOutsideOfScope)
+ .forEach(report);
+ }
+ }
+
+ return {
+ Program(node) {
+ stack = [node.range];
+ },
+
+ // Manages scopes.
+ BlockStatement: enterScope,
+ "BlockStatement:exit": exitScope,
+ ForStatement: enterScope,
+ "ForStatement:exit": exitScope,
+ ForInStatement: enterScope,
+ "ForInStatement:exit": exitScope,
+ ForOfStatement: enterScope,
+ "ForOfStatement:exit": exitScope,
+ SwitchStatement: enterScope,
+ "SwitchStatement:exit": exitScope,
+ CatchClause: enterScope,
+ "CatchClause:exit": exitScope,
+
+ // Finds and reports references which are outside of valid scope.
+ VariableDeclaration: checkForVariables
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/block-spacing.js b/tools/node_modules/eslint/lib/rules/block-spacing.js
new file mode 100644
index 0000000000..b3ea8405e2
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/block-spacing.js
@@ -0,0 +1,137 @@
+/**
+ * @fileoverview A rule to disallow or enforce spaces inside of single line blocks.
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+const util = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow or enforce spaces inside of blocks after opening block and before closing block",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ fixable: "whitespace",
+
+ schema: [
+ { enum: ["always", "never"] }
+ ]
+ },
+
+ create(context) {
+ const always = (context.options[0] !== "never"),
+ message = always ? "Requires a space" : "Unexpected space(s)",
+ sourceCode = context.getSourceCode();
+
+ /**
+ * Gets the open brace token from a given node.
+ * @param {ASTNode} node - A BlockStatement/SwitchStatement node to get.
+ * @returns {Token} The token of the open brace.
+ */
+ function getOpenBrace(node) {
+ if (node.type === "SwitchStatement") {
+ if (node.cases.length > 0) {
+ return sourceCode.getTokenBefore(node.cases[0]);
+ }
+ return sourceCode.getLastToken(node, 1);
+ }
+ return sourceCode.getFirstToken(node);
+ }
+
+ /**
+ * Checks whether or not:
+ * - given tokens are on same line.
+ * - there is/isn't a space between given tokens.
+ * @param {Token} left - A token to check.
+ * @param {Token} right - The token which is next to `left`.
+ * @returns {boolean}
+ * When the option is `"always"`, `true` if there are one or more spaces between given tokens.
+ * When the option is `"never"`, `true` if there are not any spaces between given tokens.
+ * If given tokens are not on same line, it's always `true`.
+ */
+ function isValid(left, right) {
+ return (
+ !util.isTokenOnSameLine(left, right) ||
+ sourceCode.isSpaceBetweenTokens(left, right) === always
+ );
+ }
+
+ /**
+ * Reports invalid spacing style inside braces.
+ * @param {ASTNode} node - A BlockStatement/SwitchStatement node to get.
+ * @returns {void}
+ */
+ function checkSpacingInsideBraces(node) {
+
+ // Gets braces and the first/last token of content.
+ const openBrace = getOpenBrace(node);
+ const closeBrace = sourceCode.getLastToken(node);
+ const firstToken = sourceCode.getTokenAfter(openBrace, { includeComments: true });
+ const lastToken = sourceCode.getTokenBefore(closeBrace, { includeComments: true });
+
+ // Skip if the node is invalid or empty.
+ if (openBrace.type !== "Punctuator" ||
+ openBrace.value !== "{" ||
+ closeBrace.type !== "Punctuator" ||
+ closeBrace.value !== "}" ||
+ firstToken === closeBrace
+ ) {
+ return;
+ }
+
+ // Skip line comments for option never
+ if (!always && firstToken.type === "Line") {
+ return;
+ }
+
+ // Check.
+ if (!isValid(openBrace, firstToken)) {
+ context.report({
+ node,
+ loc: openBrace.loc.start,
+ message: "{{message}} after '{'.",
+ data: {
+ message
+ },
+ fix(fixer) {
+ if (always) {
+ return fixer.insertTextBefore(firstToken, " ");
+ }
+
+ return fixer.removeRange([openBrace.range[1], firstToken.range[0]]);
+ }
+ });
+ }
+ if (!isValid(lastToken, closeBrace)) {
+ context.report({
+ node,
+ loc: closeBrace.loc.start,
+ message: "{{message}} before '}'.",
+ data: {
+ message
+ },
+ fix(fixer) {
+ if (always) {
+ return fixer.insertTextAfter(lastToken, " ");
+ }
+
+ return fixer.removeRange([lastToken.range[1], closeBrace.range[0]]);
+ }
+ });
+ }
+ }
+
+ return {
+ BlockStatement: checkSpacingInsideBraces,
+ SwitchStatement: checkSpacingInsideBraces
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/brace-style.js b/tools/node_modules/eslint/lib/rules/brace-style.js
new file mode 100644
index 0000000000..320da9dac9
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/brace-style.js
@@ -0,0 +1,182 @@
+/**
+ * @fileoverview Rule to flag block statements that do not use the one true brace style
+ * @author Ian Christian Myers
+ */
+
+"use strict";
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce consistent brace style for blocks",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: [
+ {
+ enum: ["1tbs", "stroustrup", "allman"]
+ },
+ {
+ type: "object",
+ properties: {
+ allowSingleLine: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ],
+
+ fixable: "whitespace"
+ },
+
+ create(context) {
+ const style = context.options[0] || "1tbs",
+ params = context.options[1] || {},
+ sourceCode = context.getSourceCode();
+
+ const OPEN_MESSAGE = "Opening curly brace does not appear on the same line as controlling statement.",
+ OPEN_MESSAGE_ALLMAN = "Opening curly brace appears on the same line as controlling statement.",
+ BODY_MESSAGE = "Statement inside of curly braces should be on next line.",
+ CLOSE_MESSAGE = "Closing curly brace does not appear on the same line as the subsequent block.",
+ CLOSE_MESSAGE_SINGLE = "Closing curly brace should be on the same line as opening curly brace or on the line after the previous block.",
+ CLOSE_MESSAGE_STROUSTRUP_ALLMAN = "Closing curly brace appears on the same line as the subsequent block.";
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ /**
+ * Fixes a place where a newline unexpectedly appears
+ * @param {Token} firstToken The token before the unexpected newline
+ * @param {Token} secondToken The token after the unexpected newline
+ * @returns {Function} A fixer function to remove the newlines between the tokens
+ */
+ function removeNewlineBetween(firstToken, secondToken) {
+ const textRange = [firstToken.range[1], secondToken.range[0]];
+ const textBetween = sourceCode.text.slice(textRange[0], textRange[1]);
+
+ // Don't do a fix if there is a comment between the tokens
+ if (textBetween.trim()) {
+ return null;
+ }
+ return fixer => fixer.replaceTextRange(textRange, " ");
+ }
+
+ /**
+ * Validates a pair of curly brackets based on the user's config
+ * @param {Token} openingCurly The opening curly bracket
+ * @param {Token} closingCurly The closing curly bracket
+ * @returns {void}
+ */
+ function validateCurlyPair(openingCurly, closingCurly) {
+ const tokenBeforeOpeningCurly = sourceCode.getTokenBefore(openingCurly);
+ const tokenAfterOpeningCurly = sourceCode.getTokenAfter(openingCurly);
+ const tokenBeforeClosingCurly = sourceCode.getTokenBefore(closingCurly);
+ const singleLineException = params.allowSingleLine && astUtils.isTokenOnSameLine(openingCurly, closingCurly);
+
+ if (style !== "allman" && !astUtils.isTokenOnSameLine(tokenBeforeOpeningCurly, openingCurly)) {
+ context.report({
+ node: openingCurly,
+ message: OPEN_MESSAGE,
+ fix: removeNewlineBetween(tokenBeforeOpeningCurly, openingCurly)
+ });
+ }
+
+ if (style === "allman" && astUtils.isTokenOnSameLine(tokenBeforeOpeningCurly, openingCurly) && !singleLineException) {
+ context.report({
+ node: openingCurly,
+ message: OPEN_MESSAGE_ALLMAN,
+ fix: fixer => fixer.insertTextBefore(openingCurly, "\n")
+ });
+ }
+
+ if (astUtils.isTokenOnSameLine(openingCurly, tokenAfterOpeningCurly) && tokenAfterOpeningCurly !== closingCurly && !singleLineException) {
+ context.report({
+ node: openingCurly,
+ message: BODY_MESSAGE,
+ fix: fixer => fixer.insertTextAfter(openingCurly, "\n")
+ });
+ }
+
+ if (tokenBeforeClosingCurly !== openingCurly && !singleLineException && astUtils.isTokenOnSameLine(tokenBeforeClosingCurly, closingCurly)) {
+ context.report({
+ node: closingCurly,
+ message: CLOSE_MESSAGE_SINGLE,
+ fix: fixer => fixer.insertTextBefore(closingCurly, "\n")
+ });
+ }
+ }
+
+ /**
+ * Validates the location of a token that appears before a keyword (e.g. a newline before `else`)
+ * @param {Token} curlyToken The closing curly token. This is assumed to precede a keyword token (such as `else` or `finally`).
+ * @returns {void}
+ */
+ function validateCurlyBeforeKeyword(curlyToken) {
+ const keywordToken = sourceCode.getTokenAfter(curlyToken);
+
+ if (style === "1tbs" && !astUtils.isTokenOnSameLine(curlyToken, keywordToken)) {
+ context.report({
+ node: curlyToken,
+ message: CLOSE_MESSAGE,
+ fix: removeNewlineBetween(curlyToken, keywordToken)
+ });
+ }
+
+ if (style !== "1tbs" && astUtils.isTokenOnSameLine(curlyToken, keywordToken)) {
+ context.report({
+ node: curlyToken,
+ message: CLOSE_MESSAGE_STROUSTRUP_ALLMAN,
+ fix: fixer => fixer.insertTextAfter(curlyToken, "\n")
+ });
+ }
+ }
+
+ //--------------------------------------------------------------------------
+ // Public API
+ //--------------------------------------------------------------------------
+
+ return {
+ BlockStatement(node) {
+ if (!astUtils.STATEMENT_LIST_PARENTS.has(node.parent.type)) {
+ validateCurlyPair(sourceCode.getFirstToken(node), sourceCode.getLastToken(node));
+ }
+ },
+ ClassBody(node) {
+ validateCurlyPair(sourceCode.getFirstToken(node), sourceCode.getLastToken(node));
+ },
+ SwitchStatement(node) {
+ const closingCurly = sourceCode.getLastToken(node);
+ const openingCurly = sourceCode.getTokenBefore(node.cases.length ? node.cases[0] : closingCurly);
+
+ validateCurlyPair(openingCurly, closingCurly);
+ },
+ IfStatement(node) {
+ if (node.consequent.type === "BlockStatement" && node.alternate) {
+
+ // Handle the keyword after the `if` block (before `else`)
+ validateCurlyBeforeKeyword(sourceCode.getLastToken(node.consequent));
+ }
+ },
+ TryStatement(node) {
+
+ // Handle the keyword after the `try` block (before `catch` or `finally`)
+ validateCurlyBeforeKeyword(sourceCode.getLastToken(node.block));
+
+ if (node.handler && node.finalizer) {
+
+ // Handle the keyword after the `catch` block (before `finally`)
+ validateCurlyBeforeKeyword(sourceCode.getLastToken(node.handler.body));
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/callback-return.js b/tools/node_modules/eslint/lib/rules/callback-return.js
new file mode 100644
index 0000000000..0fa7f278a1
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/callback-return.js
@@ -0,0 +1,175 @@
+/**
+ * @fileoverview Enforce return after a callback.
+ * @author Jamund Ferguson
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require `return` statements after callbacks",
+ category: "Node.js and CommonJS",
+ recommended: false
+ },
+
+ schema: [{
+ type: "array",
+ items: { type: "string" }
+ }]
+ },
+
+ create(context) {
+
+ const callbacks = context.options[0] || ["callback", "cb", "next"],
+ sourceCode = context.getSourceCode();
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ /**
+ * Find the closest parent matching a list of types.
+ * @param {ASTNode} node The node whose parents we are searching
+ * @param {Array} types The node types to match
+ * @returns {ASTNode} The matched node or undefined.
+ */
+ function findClosestParentOfType(node, types) {
+ if (!node.parent) {
+ return null;
+ }
+ if (types.indexOf(node.parent.type) === -1) {
+ return findClosestParentOfType(node.parent, types);
+ }
+ return node.parent;
+ }
+
+ /**
+ * Check to see if a node contains only identifers
+ * @param {ASTNode} node The node to check
+ * @returns {boolean} Whether or not the node contains only identifers
+ */
+ function containsOnlyIdentifiers(node) {
+ if (node.type === "Identifier") {
+ return true;
+ }
+
+ if (node.type === "MemberExpression") {
+ if (node.object.type === "Identifier") {
+ return true;
+ }
+ if (node.object.type === "MemberExpression") {
+ return containsOnlyIdentifiers(node.object);
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Check to see if a CallExpression is in our callback list.
+ * @param {ASTNode} node The node to check against our callback names list.
+ * @returns {boolean} Whether or not this function matches our callback name.
+ */
+ function isCallback(node) {
+ return containsOnlyIdentifiers(node.callee) && callbacks.indexOf(sourceCode.getText(node.callee)) > -1;
+ }
+
+ /**
+ * Determines whether or not the callback is part of a callback expression.
+ * @param {ASTNode} node The callback node
+ * @param {ASTNode} parentNode The expression node
+ * @returns {boolean} Whether or not this is part of a callback expression
+ */
+ function isCallbackExpression(node, parentNode) {
+
+ // ensure the parent node exists and is an expression
+ if (!parentNode || parentNode.type !== "ExpressionStatement") {
+ return false;
+ }
+
+ // cb()
+ if (parentNode.expression === node) {
+ return true;
+ }
+
+ // special case for cb && cb() and similar
+ if (parentNode.expression.type === "BinaryExpression" || parentNode.expression.type === "LogicalExpression") {
+ if (parentNode.expression.right === node) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+ CallExpression(node) {
+
+ // if we're not a callback we can return
+ if (!isCallback(node)) {
+ return;
+ }
+
+ // find the closest block, return or loop
+ const closestBlock = findClosestParentOfType(node, ["BlockStatement", "ReturnStatement", "ArrowFunctionExpression"]) || {};
+
+ // if our parent is a return we know we're ok
+ if (closestBlock.type === "ReturnStatement") {
+ return;
+ }
+
+ // arrow functions don't always have blocks and implicitly return
+ if (closestBlock.type === "ArrowFunctionExpression") {
+ return;
+ }
+
+ // block statements are part of functions and most if statements
+ if (closestBlock.type === "BlockStatement") {
+
+ // find the last item in the block
+ const lastItem = closestBlock.body[closestBlock.body.length - 1];
+
+ // if the callback is the last thing in a block that might be ok
+ if (isCallbackExpression(node, lastItem)) {
+
+ const parentType = closestBlock.parent.type;
+
+ // but only if the block is part of a function
+ if (parentType === "FunctionExpression" ||
+ parentType === "FunctionDeclaration" ||
+ parentType === "ArrowFunctionExpression"
+ ) {
+ return;
+ }
+
+ }
+
+ // ending a block with a return is also ok
+ if (lastItem.type === "ReturnStatement") {
+
+ // but only if the callback is immediately before
+ if (isCallbackExpression(node, closestBlock.body[closestBlock.body.length - 2])) {
+ return;
+ }
+ }
+
+ }
+
+ // as long as you're the child of a function at this point you should be asked to return
+ if (findClosestParentOfType(node, ["FunctionDeclaration", "FunctionExpression", "ArrowFunctionExpression"])) {
+ context.report({ node, message: "Expected return with your callback function." });
+ }
+
+ }
+
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/camelcase.js b/tools/node_modules/eslint/lib/rules/camelcase.js
new file mode 100644
index 0000000000..6fb1475b21
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/camelcase.js
@@ -0,0 +1,143 @@
+/**
+ * @fileoverview Rule to flag non-camelcased identifiers
+ * @author Nicholas C. Zakas
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce camelcase naming convention",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ properties: {
+ enum: ["always", "never"]
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ // contains reported nodes to avoid reporting twice on destructuring with shorthand notation
+ const reported = [];
+ const ALLOWED_PARENT_TYPES = new Set(["CallExpression", "NewExpression"]);
+
+ /**
+ * Checks if a string contains an underscore and isn't all upper-case
+ * @param {string} name The string to check.
+ * @returns {boolean} if the string is underscored
+ * @private
+ */
+ function isUnderscored(name) {
+
+ // if there's an underscore, it might be A_CONSTANT, which is okay
+ return name.indexOf("_") > -1 && name !== name.toUpperCase();
+ }
+
+ /**
+ * Reports an AST node as a rule violation.
+ * @param {ASTNode} node The node to report.
+ * @returns {void}
+ * @private
+ */
+ function report(node) {
+ if (reported.indexOf(node) < 0) {
+ reported.push(node);
+ context.report({ node, message: "Identifier '{{name}}' is not in camel case.", data: { name: node.name } });
+ }
+ }
+
+ const options = context.options[0] || {};
+ let properties = options.properties || "";
+
+ if (properties !== "always" && properties !== "never") {
+ properties = "always";
+ }
+
+ return {
+
+ Identifier(node) {
+
+ /*
+ * Leading and trailing underscores are commonly used to flag
+ * private/protected identifiers, strip them
+ */
+ const name = node.name.replace(/^_+|_+$/g, ""),
+ effectiveParent = (node.parent.type === "MemberExpression") ? node.parent.parent : node.parent;
+
+ // MemberExpressions get special rules
+ if (node.parent.type === "MemberExpression") {
+
+ // "never" check properties
+ if (properties === "never") {
+ return;
+ }
+
+ // Always report underscored object names
+ if (node.parent.object.type === "Identifier" &&
+ node.parent.object.name === node.name &&
+ isUnderscored(name)) {
+ report(node);
+
+ // Report AssignmentExpressions only if they are the left side of the assignment
+ } else if (effectiveParent.type === "AssignmentExpression" &&
+ isUnderscored(name) &&
+ (effectiveParent.right.type !== "MemberExpression" ||
+ effectiveParent.left.type === "MemberExpression" &&
+ effectiveParent.left.property.name === node.name)) {
+ report(node);
+ }
+
+ // Properties have their own rules
+ } else if (node.parent.type === "Property") {
+
+ // "never" check properties
+ if (properties === "never") {
+ return;
+ }
+
+ if (node.parent.parent && node.parent.parent.type === "ObjectPattern" &&
+ node.parent.key === node && node.parent.value !== node) {
+ return;
+ }
+
+ if (isUnderscored(name) && !ALLOWED_PARENT_TYPES.has(effectiveParent.type)) {
+ report(node);
+ }
+
+ // Check if it's an import specifier
+ } else if (["ImportSpecifier", "ImportNamespaceSpecifier", "ImportDefaultSpecifier"].indexOf(node.parent.type) >= 0) {
+
+ // Report only if the local imported identifier is underscored
+ if (node.parent.local && node.parent.local.name === node.name && isUnderscored(name)) {
+ report(node);
+ }
+
+ // Report anything that is underscored that isn't a CallExpression
+ } else if (isUnderscored(name) && !ALLOWED_PARENT_TYPES.has(effectiveParent.type)) {
+ report(node);
+ }
+ }
+
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/capitalized-comments.js b/tools/node_modules/eslint/lib/rules/capitalized-comments.js
new file mode 100644
index 0000000000..1a27608067
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/capitalized-comments.js
@@ -0,0 +1,303 @@
+/**
+ * @fileoverview enforce or disallow capitalization of the first letter of a comment
+ * @author Kevin Partington
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const LETTER_PATTERN = require("../util/patterns/letters");
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+const ALWAYS_MESSAGE = "Comments should not begin with a lowercase character",
+ NEVER_MESSAGE = "Comments should not begin with an uppercase character",
+ DEFAULT_IGNORE_PATTERN = astUtils.COMMENTS_IGNORE_PATTERN,
+ WHITESPACE = /\s/g,
+ MAYBE_URL = /^\s*[^:/?#\s]+:\/\/[^?#]/, // TODO: Combine w/ max-len pattern?
+ DEFAULTS = {
+ ignorePattern: null,
+ ignoreInlineComments: false,
+ ignoreConsecutiveComments: false
+ };
+
+/*
+ * Base schema body for defining the basic capitalization rule, ignorePattern,
+ * and ignoreInlineComments values.
+ * This can be used in a few different ways in the actual schema.
+ */
+const SCHEMA_BODY = {
+ type: "object",
+ properties: {
+ ignorePattern: {
+ type: "string"
+ },
+ ignoreInlineComments: {
+ type: "boolean"
+ },
+ ignoreConsecutiveComments: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+};
+
+/**
+ * Get normalized options for either block or line comments from the given
+ * user-provided options.
+ * - If the user-provided options is just a string, returns a normalized
+ * set of options using default values for all other options.
+ * - If the user-provided options is an object, then a normalized option
+ * set is returned. Options specified in overrides will take priority
+ * over options specified in the main options object, which will in
+ * turn take priority over the rule's defaults.
+ *
+ * @param {Object|string} rawOptions The user-provided options.
+ * @param {string} which Either "line" or "block".
+ * @returns {Object} The normalized options.
+ */
+function getNormalizedOptions(rawOptions, which) {
+ if (!rawOptions) {
+ return Object.assign({}, DEFAULTS);
+ }
+
+ return Object.assign({}, DEFAULTS, rawOptions[which] || rawOptions);
+}
+
+/**
+ * Get normalized options for block and line comments.
+ *
+ * @param {Object|string} rawOptions The user-provided options.
+ * @returns {Object} An object with "Line" and "Block" keys and corresponding
+ * normalized options objects.
+ */
+function getAllNormalizedOptions(rawOptions) {
+ return {
+ Line: getNormalizedOptions(rawOptions, "line"),
+ Block: getNormalizedOptions(rawOptions, "block")
+ };
+}
+
+/**
+ * Creates a regular expression for each ignorePattern defined in the rule
+ * options.
+ *
+ * This is done in order to avoid invoking the RegExp constructor repeatedly.
+ *
+ * @param {Object} normalizedOptions The normalized rule options.
+ * @returns {void}
+ */
+function createRegExpForIgnorePatterns(normalizedOptions) {
+ Object.keys(normalizedOptions).forEach(key => {
+ const ignorePatternStr = normalizedOptions[key].ignorePattern;
+
+ if (ignorePatternStr) {
+ const regExp = RegExp(`^\\s*(?:${ignorePatternStr})`);
+
+ normalizedOptions[key].ignorePatternRegExp = regExp;
+ }
+ });
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce or disallow capitalization of the first letter of a comment",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+ fixable: "code",
+ schema: [
+ { enum: ["always", "never"] },
+ {
+ oneOf: [
+ SCHEMA_BODY,
+ {
+ type: "object",
+ properties: {
+ line: SCHEMA_BODY,
+ block: SCHEMA_BODY
+ },
+ additionalProperties: false
+ }
+ ]
+ }
+ ]
+ },
+
+ create(context) {
+
+ const capitalize = context.options[0] || "always",
+ normalizedOptions = getAllNormalizedOptions(context.options[1]),
+ sourceCode = context.getSourceCode();
+
+ createRegExpForIgnorePatterns(normalizedOptions);
+
+ //----------------------------------------------------------------------
+ // Helpers
+ //----------------------------------------------------------------------
+
+ /**
+ * Checks whether a comment is an inline comment.
+ *
+ * For the purpose of this rule, a comment is inline if:
+ * 1. The comment is preceded by a token on the same line; and
+ * 2. The command is followed by a token on the same line.
+ *
+ * Note that the comment itself need not be single-line!
+ *
+ * Also, it follows from this definition that only block comments can
+ * be considered as possibly inline. This is because line comments
+ * would consume any following tokens on the same line as the comment.
+ *
+ * @param {ASTNode} comment The comment node to check.
+ * @returns {boolean} True if the comment is an inline comment, false
+ * otherwise.
+ */
+ function isInlineComment(comment) {
+ const previousToken = sourceCode.getTokenBefore(comment, { includeComments: true }),
+ nextToken = sourceCode.getTokenAfter(comment, { includeComments: true });
+
+ return Boolean(
+ previousToken &&
+ nextToken &&
+ comment.loc.start.line === previousToken.loc.end.line &&
+ comment.loc.end.line === nextToken.loc.start.line
+ );
+ }
+
+ /**
+ * Determine if a comment follows another comment.
+ *
+ * @param {ASTNode} comment The comment to check.
+ * @returns {boolean} True if the comment follows a valid comment.
+ */
+ function isConsecutiveComment(comment) {
+ const previousTokenOrComment = sourceCode.getTokenBefore(comment, { includeComments: true });
+
+ return Boolean(
+ previousTokenOrComment &&
+ ["Block", "Line"].indexOf(previousTokenOrComment.type) !== -1
+ );
+ }
+
+ /**
+ * Check a comment to determine if it is valid for this rule.
+ *
+ * @param {ASTNode} comment The comment node to process.
+ * @param {Object} options The options for checking this comment.
+ * @returns {boolean} True if the comment is valid, false otherwise.
+ */
+ function isCommentValid(comment, options) {
+
+ // 1. Check for default ignore pattern.
+ if (DEFAULT_IGNORE_PATTERN.test(comment.value)) {
+ return true;
+ }
+
+ // 2. Check for custom ignore pattern.
+ const commentWithoutAsterisks = comment.value
+ .replace(/\*/g, "");
+
+ if (options.ignorePatternRegExp && options.ignorePatternRegExp.test(commentWithoutAsterisks)) {
+ return true;
+ }
+
+ // 3. Check for inline comments.
+ if (options.ignoreInlineComments && isInlineComment(comment)) {
+ return true;
+ }
+
+ // 4. Is this a consecutive comment (and are we tolerating those)?
+ if (options.ignoreConsecutiveComments && isConsecutiveComment(comment)) {
+ return true;
+ }
+
+ // 5. Does the comment start with a possible URL?
+ if (MAYBE_URL.test(commentWithoutAsterisks)) {
+ return true;
+ }
+
+ // 6. Is the initial word character a letter?
+ const commentWordCharsOnly = commentWithoutAsterisks
+ .replace(WHITESPACE, "");
+
+ if (commentWordCharsOnly.length === 0) {
+ return true;
+ }
+
+ const firstWordChar = commentWordCharsOnly[0];
+
+ if (!LETTER_PATTERN.test(firstWordChar)) {
+ return true;
+ }
+
+ // 7. Check the case of the initial word character.
+ const isUppercase = firstWordChar !== firstWordChar.toLocaleLowerCase(),
+ isLowercase = firstWordChar !== firstWordChar.toLocaleUpperCase();
+
+ if (capitalize === "always" && isLowercase) {
+ return false;
+ }
+ if (capitalize === "never" && isUppercase) {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Process a comment to determine if it needs to be reported.
+ *
+ * @param {ASTNode} comment The comment node to process.
+ * @returns {void}
+ */
+ function processComment(comment) {
+ const options = normalizedOptions[comment.type],
+ commentValid = isCommentValid(comment, options);
+
+ if (!commentValid) {
+ const message = capitalize === "always"
+ ? ALWAYS_MESSAGE
+ : NEVER_MESSAGE;
+
+ context.report({
+ node: null, // Intentionally using loc instead
+ loc: comment.loc,
+ message,
+ fix(fixer) {
+ const match = comment.value.match(LETTER_PATTERN);
+
+ return fixer.replaceTextRange(
+
+ // Offset match.index by 2 to account for the first 2 characters that start the comment (// or /*)
+ [comment.range[0] + match.index + 2, comment.range[0] + match.index + 3],
+ capitalize === "always" ? match[0].toLocaleUpperCase() : match[0].toLocaleLowerCase()
+ );
+ }
+ });
+ }
+ }
+
+ //----------------------------------------------------------------------
+ // Public
+ //----------------------------------------------------------------------
+
+ return {
+ Program() {
+ const comments = sourceCode.getAllComments();
+
+ comments.filter(token => token.type !== "Shebang").forEach(processComment);
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/class-methods-use-this.js b/tools/node_modules/eslint/lib/rules/class-methods-use-this.js
new file mode 100644
index 0000000000..d429c579b9
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/class-methods-use-this.js
@@ -0,0 +1,110 @@
+/**
+ * @fileoverview Rule to enforce that all class methods use 'this'.
+ * @author Patrick Williams
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce that class methods utilize `this`",
+ category: "Best Practices",
+ recommended: false
+ },
+ schema: [{
+ type: "object",
+ properties: {
+ exceptMethods: {
+ type: "array",
+ items: {
+ type: "string"
+ }
+ }
+ },
+ additionalProperties: false
+ }]
+ },
+ create(context) {
+ const config = context.options[0] ? Object.assign({}, context.options[0]) : {};
+ const exceptMethods = new Set(config.exceptMethods || []);
+
+ const stack = [];
+
+ /**
+ * Initializes the current context to false and pushes it onto the stack.
+ * These booleans represent whether 'this' has been used in the context.
+ * @returns {void}
+ * @private
+ */
+ function enterFunction() {
+ stack.push(false);
+ }
+
+ /**
+ * Check if the node is an instance method
+ * @param {ASTNode} node - node to check
+ * @returns {boolean} True if its an instance method
+ * @private
+ */
+ function isInstanceMethod(node) {
+ return !node.static && node.kind !== "constructor" && node.type === "MethodDefinition";
+ }
+
+ /**
+ * Check if the node is an instance method not excluded by config
+ * @param {ASTNode} node - node to check
+ * @returns {boolean} True if it is an instance method, and not excluded by config
+ * @private
+ */
+ function isIncludedInstanceMethod(node) {
+ return isInstanceMethod(node) && !exceptMethods.has(node.key.name);
+ }
+
+ /**
+ * Checks if we are leaving a function that is a method, and reports if 'this' has not been used.
+ * Static methods and the constructor are exempt.
+ * Then pops the context off the stack.
+ * @param {ASTNode} node - A function node that was entered.
+ * @returns {void}
+ * @private
+ */
+ function exitFunction(node) {
+ const methodUsesThis = stack.pop();
+
+ if (isIncludedInstanceMethod(node.parent) && !methodUsesThis) {
+ context.report({
+ node,
+ message: "Expected 'this' to be used by class method '{{classMethod}}'.",
+ data: {
+ classMethod: node.parent.key.name
+ }
+ });
+ }
+ }
+
+ /**
+ * Mark the current context as having used 'this'.
+ * @returns {void}
+ * @private
+ */
+ function markThisUsed() {
+ if (stack.length) {
+ stack[stack.length - 1] = true;
+ }
+ }
+
+ return {
+ FunctionDeclaration: enterFunction,
+ "FunctionDeclaration:exit": exitFunction,
+ FunctionExpression: enterFunction,
+ "FunctionExpression:exit": exitFunction,
+ ThisExpression: markThisUsed,
+ Super: markThisUsed
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/comma-dangle.js b/tools/node_modules/eslint/lib/rules/comma-dangle.js
new file mode 100644
index 0000000000..ddcc0cd229
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/comma-dangle.js
@@ -0,0 +1,337 @@
+/**
+ * @fileoverview Rule to forbid or enforce dangling commas.
+ * @author Ian Christian Myers
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const lodash = require("lodash");
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+const DEFAULT_OPTIONS = Object.freeze({
+ arrays: "never",
+ objects: "never",
+ imports: "never",
+ exports: "never",
+ functions: "ignore"
+});
+
+/**
+ * Checks whether or not a trailing comma is allowed in a given node.
+ * If the `lastItem` is `RestElement` or `RestProperty`, it disallows trailing commas.
+ *
+ * @param {ASTNode} lastItem - The node of the last element in the given node.
+ * @returns {boolean} `true` if a trailing comma is allowed.
+ */
+function isTrailingCommaAllowed(lastItem) {
+ return !(
+ lastItem.type === "RestElement" ||
+ lastItem.type === "RestProperty" ||
+ lastItem.type === "ExperimentalRestProperty"
+ );
+}
+
+/**
+ * Normalize option value.
+ *
+ * @param {string|Object|undefined} optionValue - The 1st option value to normalize.
+ * @returns {Object} The normalized option value.
+ */
+function normalizeOptions(optionValue) {
+ if (typeof optionValue === "string") {
+ return {
+ arrays: optionValue,
+ objects: optionValue,
+ imports: optionValue,
+ exports: optionValue,
+
+ // For backward compatibility, always ignore functions.
+ functions: "ignore"
+ };
+ }
+ if (typeof optionValue === "object" && optionValue !== null) {
+ return {
+ arrays: optionValue.arrays || DEFAULT_OPTIONS.arrays,
+ objects: optionValue.objects || DEFAULT_OPTIONS.objects,
+ imports: optionValue.imports || DEFAULT_OPTIONS.imports,
+ exports: optionValue.exports || DEFAULT_OPTIONS.exports,
+ functions: optionValue.functions || DEFAULT_OPTIONS.functions
+ };
+ }
+
+ return DEFAULT_OPTIONS;
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require or disallow trailing commas",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+ fixable: "code",
+ schema: {
+ definitions: {
+ value: {
+ enum: [
+ "always-multiline",
+ "always",
+ "never",
+ "only-multiline"
+ ]
+ },
+ valueWithIgnore: {
+ enum: [
+ "always-multiline",
+ "always",
+ "ignore",
+ "never",
+ "only-multiline"
+ ]
+ }
+ },
+ type: "array",
+ items: [
+ {
+ oneOf: [
+ {
+ $ref: "#/definitions/value"
+ },
+ {
+ type: "object",
+ properties: {
+ arrays: { $ref: "#/definitions/valueWithIgnore" },
+ objects: { $ref: "#/definitions/valueWithIgnore" },
+ imports: { $ref: "#/definitions/valueWithIgnore" },
+ exports: { $ref: "#/definitions/valueWithIgnore" },
+ functions: { $ref: "#/definitions/valueWithIgnore" }
+ },
+ additionalProperties: false
+ }
+ ]
+ }
+ ]
+ }
+ },
+
+ create(context) {
+ const options = normalizeOptions(context.options[0]);
+ const sourceCode = context.getSourceCode();
+ const UNEXPECTED_MESSAGE = "Unexpected trailing comma.";
+ const MISSING_MESSAGE = "Missing trailing comma.";
+
+ /**
+ * Gets the last item of the given node.
+ * @param {ASTNode} node - The node to get.
+ * @returns {ASTNode|null} The last node or null.
+ */
+ function getLastItem(node) {
+ switch (node.type) {
+ case "ObjectExpression":
+ case "ObjectPattern":
+ return lodash.last(node.properties);
+ case "ArrayExpression":
+ case "ArrayPattern":
+ return lodash.last(node.elements);
+ case "ImportDeclaration":
+ case "ExportNamedDeclaration":
+ return lodash.last(node.specifiers);
+ case "FunctionDeclaration":
+ case "FunctionExpression":
+ case "ArrowFunctionExpression":
+ return lodash.last(node.params);
+ case "CallExpression":
+ case "NewExpression":
+ return lodash.last(node.arguments);
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Gets the trailing comma token of the given node.
+ * If the trailing comma does not exist, this returns the token which is
+ * the insertion point of the trailing comma token.
+ *
+ * @param {ASTNode} node - The node to get.
+ * @param {ASTNode} lastItem - The last item of the node.
+ * @returns {Token} The trailing comma token or the insertion point.
+ */
+ function getTrailingToken(node, lastItem) {
+ switch (node.type) {
+ case "ObjectExpression":
+ case "ArrayExpression":
+ case "CallExpression":
+ case "NewExpression":
+ return sourceCode.getLastToken(node, 1);
+ default: {
+ const nextToken = sourceCode.getTokenAfter(lastItem);
+
+ if (astUtils.isCommaToken(nextToken)) {
+ return nextToken;
+ }
+ return sourceCode.getLastToken(lastItem);
+ }
+ }
+ }
+
+ /**
+ * Checks whether or not a given node is multiline.
+ * This rule handles a given node as multiline when the closing parenthesis
+ * and the last element are not on the same line.
+ *
+ * @param {ASTNode} node - A node to check.
+ * @returns {boolean} `true` if the node is multiline.
+ */
+ function isMultiline(node) {
+ const lastItem = getLastItem(node);
+
+ if (!lastItem) {
+ return false;
+ }
+
+ const penultimateToken = getTrailingToken(node, lastItem);
+ const lastToken = sourceCode.getTokenAfter(penultimateToken);
+
+ return lastToken.loc.end.line !== penultimateToken.loc.end.line;
+ }
+
+ /**
+ * Reports a trailing comma if it exists.
+ *
+ * @param {ASTNode} node - A node to check. Its type is one of
+ * ObjectExpression, ObjectPattern, ArrayExpression, ArrayPattern,
+ * ImportDeclaration, and ExportNamedDeclaration.
+ * @returns {void}
+ */
+ function forbidTrailingComma(node) {
+ const lastItem = getLastItem(node);
+
+ if (!lastItem || (node.type === "ImportDeclaration" && lastItem.type !== "ImportSpecifier")) {
+ return;
+ }
+
+ const trailingToken = getTrailingToken(node, lastItem);
+
+ if (astUtils.isCommaToken(trailingToken)) {
+ context.report({
+ node: lastItem,
+ loc: trailingToken.loc.start,
+ message: UNEXPECTED_MESSAGE,
+ fix(fixer) {
+ return fixer.remove(trailingToken);
+ }
+ });
+ }
+ }
+
+ /**
+ * Reports the last element of a given node if it does not have a trailing
+ * comma.
+ *
+ * If a given node is `ArrayPattern` which has `RestElement`, the trailing
+ * comma is disallowed, so report if it exists.
+ *
+ * @param {ASTNode} node - A node to check. Its type is one of
+ * ObjectExpression, ObjectPattern, ArrayExpression, ArrayPattern,
+ * ImportDeclaration, and ExportNamedDeclaration.
+ * @returns {void}
+ */
+ function forceTrailingComma(node) {
+ const lastItem = getLastItem(node);
+
+ if (!lastItem || (node.type === "ImportDeclaration" && lastItem.type !== "ImportSpecifier")) {
+ return;
+ }
+ if (!isTrailingCommaAllowed(lastItem)) {
+ forbidTrailingComma(node);
+ return;
+ }
+
+ const trailingToken = getTrailingToken(node, lastItem);
+
+ if (trailingToken.value !== ",") {
+ context.report({
+ node: lastItem,
+ loc: trailingToken.loc.end,
+ message: MISSING_MESSAGE,
+ fix(fixer) {
+ return fixer.insertTextAfter(trailingToken, ",");
+ }
+ });
+ }
+ }
+
+ /**
+ * If a given node is multiline, reports the last element of a given node
+ * when it does not have a trailing comma.
+ * Otherwise, reports a trailing comma if it exists.
+ *
+ * @param {ASTNode} node - A node to check. Its type is one of
+ * ObjectExpression, ObjectPattern, ArrayExpression, ArrayPattern,
+ * ImportDeclaration, and ExportNamedDeclaration.
+ * @returns {void}
+ */
+ function forceTrailingCommaIfMultiline(node) {
+ if (isMultiline(node)) {
+ forceTrailingComma(node);
+ } else {
+ forbidTrailingComma(node);
+ }
+ }
+
+ /**
+ * Only if a given node is not multiline, reports the last element of a given node
+ * when it does not have a trailing comma.
+ * Otherwise, reports a trailing comma if it exists.
+ *
+ * @param {ASTNode} node - A node to check. Its type is one of
+ * ObjectExpression, ObjectPattern, ArrayExpression, ArrayPattern,
+ * ImportDeclaration, and ExportNamedDeclaration.
+ * @returns {void}
+ */
+ function allowTrailingCommaIfMultiline(node) {
+ if (!isMultiline(node)) {
+ forbidTrailingComma(node);
+ }
+ }
+
+ const predicate = {
+ always: forceTrailingComma,
+ "always-multiline": forceTrailingCommaIfMultiline,
+ "only-multiline": allowTrailingCommaIfMultiline,
+ never: forbidTrailingComma,
+ ignore: lodash.noop
+ };
+
+ return {
+ ObjectExpression: predicate[options.objects],
+ ObjectPattern: predicate[options.objects],
+
+ ArrayExpression: predicate[options.arrays],
+ ArrayPattern: predicate[options.arrays],
+
+ ImportDeclaration: predicate[options.imports],
+
+ ExportNamedDeclaration: predicate[options.exports],
+
+ FunctionDeclaration: predicate[options.functions],
+ FunctionExpression: predicate[options.functions],
+ ArrowFunctionExpression: predicate[options.functions],
+ CallExpression: predicate[options.functions],
+ NewExpression: predicate[options.functions]
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/comma-spacing.js b/tools/node_modules/eslint/lib/rules/comma-spacing.js
new file mode 100644
index 0000000000..25a0e7d82c
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/comma-spacing.js
@@ -0,0 +1,183 @@
+/**
+ * @fileoverview Comma spacing - validates spacing before and after comma
+ * @author Vignesh Anand aka vegetableman.
+ */
+"use strict";
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce consistent spacing before and after commas",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ fixable: "whitespace",
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ before: {
+ type: "boolean"
+ },
+ after: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+
+ const sourceCode = context.getSourceCode();
+ const tokensAndComments = sourceCode.tokensAndComments;
+
+ const options = {
+ before: context.options[0] ? !!context.options[0].before : false,
+ after: context.options[0] ? !!context.options[0].after : true
+ };
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ // list of comma tokens to ignore for the check of leading whitespace
+ const commaTokensToIgnore = [];
+
+ /**
+ * Reports a spacing error with an appropriate message.
+ * @param {ASTNode} node The binary expression node to report.
+ * @param {string} dir Is the error "before" or "after" the comma?
+ * @param {ASTNode} otherNode The node at the left or right of `node`
+ * @returns {void}
+ * @private
+ */
+ function report(node, dir, otherNode) {
+ context.report({
+ node,
+ fix(fixer) {
+ if (options[dir]) {
+ if (dir === "before") {
+ return fixer.insertTextBefore(node, " ");
+ }
+ return fixer.insertTextAfter(node, " ");
+
+ }
+ let start, end;
+ const newText = "";
+
+ if (dir === "before") {
+ start = otherNode.range[1];
+ end = node.range[0];
+ } else {
+ start = node.range[1];
+ end = otherNode.range[0];
+ }
+
+ return fixer.replaceTextRange([start, end], newText);
+
+ },
+ message: options[dir]
+ ? "A space is required {{dir}} ','."
+ : "There should be no space {{dir}} ','.",
+ data: {
+ dir
+ }
+ });
+ }
+
+ /**
+ * Validates the spacing around a comma token.
+ * @param {Object} tokens - The tokens to be validated.
+ * @param {Token} tokens.comma The token representing the comma.
+ * @param {Token} [tokens.left] The last token before the comma.
+ * @param {Token} [tokens.right] The first token after the comma.
+ * @param {Token|ASTNode} reportItem The item to use when reporting an error.
+ * @returns {void}
+ * @private
+ */
+ function validateCommaItemSpacing(tokens, reportItem) {
+ if (tokens.left && astUtils.isTokenOnSameLine(tokens.left, tokens.comma) &&
+ (options.before !== sourceCode.isSpaceBetweenTokens(tokens.left, tokens.comma))
+ ) {
+ report(reportItem, "before", tokens.left);
+ }
+
+ if (tokens.right && !options.after && tokens.right.type === "Line") {
+ return;
+ }
+
+ if (tokens.right && astUtils.isTokenOnSameLine(tokens.comma, tokens.right) &&
+ (options.after !== sourceCode.isSpaceBetweenTokens(tokens.comma, tokens.right))
+ ) {
+ report(reportItem, "after", tokens.right);
+ }
+ }
+
+ /**
+ * Adds null elements of the given ArrayExpression or ArrayPattern node to the ignore list.
+ * @param {ASTNode} node An ArrayExpression or ArrayPattern node.
+ * @returns {void}
+ */
+ function addNullElementsToIgnoreList(node) {
+ let previousToken = sourceCode.getFirstToken(node);
+
+ node.elements.forEach(element => {
+ let token;
+
+ if (element === null) {
+ token = sourceCode.getTokenAfter(previousToken);
+
+ if (astUtils.isCommaToken(token)) {
+ commaTokensToIgnore.push(token);
+ }
+ } else {
+ token = sourceCode.getTokenAfter(element);
+ }
+
+ previousToken = token;
+ });
+ }
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+ "Program:exit"() {
+ tokensAndComments.forEach((token, i) => {
+
+ if (!astUtils.isCommaToken(token)) {
+ return;
+ }
+
+ if (token && token.type === "JSXText") {
+ return;
+ }
+
+ const previousToken = tokensAndComments[i - 1];
+ const nextToken = tokensAndComments[i + 1];
+
+ validateCommaItemSpacing({
+ comma: token,
+ left: astUtils.isCommaToken(previousToken) || commaTokensToIgnore.indexOf(token) > -1 ? null : previousToken,
+ right: astUtils.isCommaToken(nextToken) ? null : nextToken
+ }, token);
+ });
+ },
+ ArrayExpression: addNullElementsToIgnoreList,
+ ArrayPattern: addNullElementsToIgnoreList
+
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/comma-style.js b/tools/node_modules/eslint/lib/rules/comma-style.js
new file mode 100644
index 0000000000..4c65338a44
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/comma-style.js
@@ -0,0 +1,299 @@
+/**
+ * @fileoverview Comma style - enforces comma styles of two types: last and first
+ * @author Vignesh Anand aka vegetableman
+ */
+
+"use strict";
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce consistent comma style",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+ fixable: "code",
+ schema: [
+ {
+ enum: ["first", "last"]
+ },
+ {
+ type: "object",
+ properties: {
+ exceptions: {
+ type: "object",
+ additionalProperties: {
+ type: "boolean"
+ }
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+ const style = context.options[0] || "last",
+ sourceCode = context.getSourceCode();
+ const exceptions = {
+ ArrayPattern: true,
+ ArrowFunctionExpression: true,
+ CallExpression: true,
+ FunctionDeclaration: true,
+ FunctionExpression: true,
+ ImportDeclaration: true,
+ ObjectPattern: true
+ };
+
+ if (context.options.length === 2 && context.options[1].hasOwnProperty("exceptions")) {
+ const keys = Object.keys(context.options[1].exceptions);
+
+ for (let i = 0; i < keys.length; i++) {
+ exceptions[keys[i]] = context.options[1].exceptions[keys[i]];
+ }
+ }
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ /**
+ * Modified text based on the style
+ * @param {string} styleType Style type
+ * @param {string} text Source code text
+ * @returns {string} modified text
+ * @private
+ */
+ function getReplacedText(styleType, text) {
+ switch (styleType) {
+ case "between":
+ return `,${text.replace("\n", "")}`;
+
+ case "first":
+ return `${text},`;
+
+ case "last":
+ return `,${text}`;
+
+ default:
+ return "";
+ }
+ }
+
+ /**
+ * Determines the fixer function for a given style.
+ * @param {string} styleType comma style
+ * @param {ASTNode} previousItemToken The token to check.
+ * @param {ASTNode} commaToken The token to check.
+ * @param {ASTNode} currentItemToken The token to check.
+ * @returns {Function} Fixer function
+ * @private
+ */
+ function getFixerFunction(styleType, previousItemToken, commaToken, currentItemToken) {
+ const text =
+ sourceCode.text.slice(previousItemToken.range[1], commaToken.range[0]) +
+ sourceCode.text.slice(commaToken.range[1], currentItemToken.range[0]);
+ const range = [previousItemToken.range[1], currentItemToken.range[0]];
+
+ return function(fixer) {
+ return fixer.replaceTextRange(range, getReplacedText(styleType, text));
+ };
+ }
+
+ /**
+ * Validates the spacing around single items in lists.
+ * @param {Token} previousItemToken The last token from the previous item.
+ * @param {Token} commaToken The token representing the comma.
+ * @param {Token} currentItemToken The first token of the current item.
+ * @param {Token} reportItem The item to use when reporting an error.
+ * @returns {void}
+ * @private
+ */
+ function validateCommaItemSpacing(previousItemToken, commaToken, currentItemToken, reportItem) {
+
+ // if single line
+ if (astUtils.isTokenOnSameLine(commaToken, currentItemToken) &&
+ astUtils.isTokenOnSameLine(previousItemToken, commaToken)) {
+
+ // do nothing.
+
+ } else if (!astUtils.isTokenOnSameLine(commaToken, currentItemToken) &&
+ !astUtils.isTokenOnSameLine(previousItemToken, commaToken)) {
+
+ // lone comma
+ context.report({
+ node: reportItem,
+ loc: {
+ line: commaToken.loc.end.line,
+ column: commaToken.loc.start.column
+ },
+ message: "Bad line breaking before and after ','.",
+ fix: getFixerFunction("between", previousItemToken, commaToken, currentItemToken)
+ });
+
+ } else if (style === "first" && !astUtils.isTokenOnSameLine(commaToken, currentItemToken)) {
+
+ context.report({
+ node: reportItem,
+ message: "',' should be placed first.",
+ fix: getFixerFunction(style, previousItemToken, commaToken, currentItemToken)
+ });
+
+ } else if (style === "last" && astUtils.isTokenOnSameLine(commaToken, currentItemToken)) {
+
+ context.report({
+ node: reportItem,
+ loc: {
+ line: commaToken.loc.end.line,
+ column: commaToken.loc.end.column
+ },
+ message: "',' should be placed last.",
+ fix: getFixerFunction(style, previousItemToken, commaToken, currentItemToken)
+ });
+ }
+ }
+
+ /**
+ * Checks the comma placement with regards to a declaration/property/element
+ * @param {ASTNode} node The binary expression node to check
+ * @param {string} property The property of the node containing child nodes.
+ * @private
+ * @returns {void}
+ */
+ function validateComma(node, property) {
+ const items = node[property],
+ arrayLiteral = (node.type === "ArrayExpression" || node.type === "ArrayPattern");
+
+ if (items.length > 1 || arrayLiteral) {
+
+ // seed as opening [
+ let previousItemToken = sourceCode.getFirstToken(node);
+
+ items.forEach(item => {
+ const commaToken = item ? sourceCode.getTokenBefore(item) : previousItemToken,
+ currentItemToken = item ? sourceCode.getFirstToken(item) : sourceCode.getTokenAfter(commaToken),
+ reportItem = item || currentItemToken,
+ tokenBeforeComma = sourceCode.getTokenBefore(commaToken);
+
+ // Check if previous token is wrapped in parentheses
+ if (tokenBeforeComma && astUtils.isClosingParenToken(tokenBeforeComma)) {
+ previousItemToken = tokenBeforeComma;
+ }
+
+ /*
+ * This works by comparing three token locations:
+ * - previousItemToken is the last token of the previous item
+ * - commaToken is the location of the comma before the current item
+ * - currentItemToken is the first token of the current item
+ *
+ * These values get switched around if item is undefined.
+ * previousItemToken will refer to the last token not belonging
+ * to the current item, which could be a comma or an opening
+ * square bracket. currentItemToken could be a comma.
+ *
+ * All comparisons are done based on these tokens directly, so
+ * they are always valid regardless of an undefined item.
+ */
+ if (astUtils.isCommaToken(commaToken)) {
+ validateCommaItemSpacing(previousItemToken, commaToken,
+ currentItemToken, reportItem);
+ }
+
+ if (item) {
+ const tokenAfterItem = sourceCode.getTokenAfter(item, astUtils.isNotClosingParenToken);
+
+ previousItemToken = tokenAfterItem
+ ? sourceCode.getTokenBefore(tokenAfterItem)
+ : sourceCode.ast.tokens[sourceCode.ast.tokens.length - 1];
+ }
+ });
+
+ /*
+ * Special case for array literals that have empty last items, such
+ * as [ 1, 2, ]. These arrays only have two items show up in the
+ * AST, so we need to look at the token to verify that there's no
+ * dangling comma.
+ */
+ if (arrayLiteral) {
+
+ const lastToken = sourceCode.getLastToken(node),
+ nextToLastToken = sourceCode.getTokenBefore(lastToken);
+
+ if (astUtils.isCommaToken(nextToLastToken)) {
+ validateCommaItemSpacing(
+ sourceCode.getTokenBefore(nextToLastToken),
+ nextToLastToken,
+ lastToken,
+ lastToken
+ );
+ }
+ }
+ }
+ }
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ const nodes = {};
+
+ if (!exceptions.VariableDeclaration) {
+ nodes.VariableDeclaration = function(node) {
+ validateComma(node, "declarations");
+ };
+ }
+ if (!exceptions.ObjectExpression) {
+ nodes.ObjectExpression = function(node) {
+ validateComma(node, "properties");
+ };
+ }
+ if (!exceptions.ObjectPattern) {
+ nodes.ObjectPattern = function(node) {
+ validateComma(node, "properties");
+ };
+ }
+ if (!exceptions.ArrayExpression) {
+ nodes.ArrayExpression = function(node) {
+ validateComma(node, "elements");
+ };
+ }
+ if (!exceptions.ArrayPattern) {
+ nodes.ArrayPattern = function(node) {
+ validateComma(node, "elements");
+ };
+ }
+ if (!exceptions.FunctionDeclaration) {
+ nodes.FunctionDeclaration = function(node) {
+ validateComma(node, "params");
+ };
+ }
+ if (!exceptions.FunctionExpression) {
+ nodes.FunctionExpression = function(node) {
+ validateComma(node, "params");
+ };
+ }
+ if (!exceptions.ArrowFunctionExpression) {
+ nodes.ArrowFunctionExpression = function(node) {
+ validateComma(node, "params");
+ };
+ }
+ if (!exceptions.CallExpression) {
+ nodes.CallExpression = function(node) {
+ validateComma(node, "arguments");
+ };
+ }
+ if (!exceptions.ImportDeclaration) {
+ nodes.ImportDeclaration = function(node) {
+ validateComma(node, "specifiers");
+ };
+ }
+
+ return nodes;
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/complexity.js b/tools/node_modules/eslint/lib/rules/complexity.js
new file mode 100644
index 0000000000..e0313fa78f
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/complexity.js
@@ -0,0 +1,168 @@
+/**
+ * @fileoverview Counts the cyclomatic complexity of each function of the script. See http://en.wikipedia.org/wiki/Cyclomatic_complexity.
+ * Counts the number of if, conditional, for, whilte, try, switch/case,
+ * @author Patrick Brosset
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const lodash = require("lodash");
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce a maximum cyclomatic complexity allowed in a program",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: [
+ {
+ oneOf: [
+ {
+ type: "integer",
+ minimum: 0
+ },
+ {
+ type: "object",
+ properties: {
+ maximum: {
+ type: "integer",
+ minimum: 0
+ },
+ max: {
+ type: "integer",
+ minimum: 0
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ }
+ ]
+ },
+
+ create(context) {
+ const option = context.options[0];
+ let THRESHOLD = 20;
+
+ if (typeof option === "object" && option.hasOwnProperty("maximum") && typeof option.maximum === "number") {
+ THRESHOLD = option.maximum;
+ }
+ if (typeof option === "object" && option.hasOwnProperty("max") && typeof option.max === "number") {
+ THRESHOLD = option.max;
+ }
+ if (typeof option === "number") {
+ THRESHOLD = option;
+ }
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ // Using a stack to store complexity (handling nested functions)
+ const fns = [];
+
+ /**
+ * When parsing a new function, store it in our function stack
+ * @returns {void}
+ * @private
+ */
+ function startFunction() {
+ fns.push(1);
+ }
+
+ /**
+ * Evaluate the node at the end of function
+ * @param {ASTNode} node node to evaluate
+ * @returns {void}
+ * @private
+ */
+ function endFunction(node) {
+ const name = lodash.upperFirst(astUtils.getFunctionNameWithKind(node));
+ const complexity = fns.pop();
+
+ if (complexity > THRESHOLD) {
+ context.report({
+ node,
+ message: "{{name}} has a complexity of {{complexity}}.",
+ data: { name, complexity }
+ });
+ }
+ }
+
+ /**
+ * Increase the complexity of the function in context
+ * @returns {void}
+ * @private
+ */
+ function increaseComplexity() {
+ if (fns.length) {
+ fns[fns.length - 1]++;
+ }
+ }
+
+ /**
+ * Increase the switch complexity in context
+ * @param {ASTNode} node node to evaluate
+ * @returns {void}
+ * @private
+ */
+ function increaseSwitchComplexity(node) {
+
+ // Avoiding `default`
+ if (node.test) {
+ increaseComplexity();
+ }
+ }
+
+ /**
+ * Increase the logical path complexity in context
+ * @param {ASTNode} node node to evaluate
+ * @returns {void}
+ * @private
+ */
+ function increaseLogicalComplexity(node) {
+
+ // Avoiding &&
+ if (node.operator === "||") {
+ increaseComplexity();
+ }
+ }
+
+ //--------------------------------------------------------------------------
+ // Public API
+ //--------------------------------------------------------------------------
+
+ return {
+ FunctionDeclaration: startFunction,
+ FunctionExpression: startFunction,
+ ArrowFunctionExpression: startFunction,
+ "FunctionDeclaration:exit": endFunction,
+ "FunctionExpression:exit": endFunction,
+ "ArrowFunctionExpression:exit": endFunction,
+
+ CatchClause: increaseComplexity,
+ ConditionalExpression: increaseComplexity,
+ LogicalExpression: increaseLogicalComplexity,
+ ForStatement: increaseComplexity,
+ ForInStatement: increaseComplexity,
+ ForOfStatement: increaseComplexity,
+ IfStatement: increaseComplexity,
+ SwitchCase: increaseSwitchComplexity,
+ WhileStatement: increaseComplexity,
+ DoWhileStatement: increaseComplexity
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/computed-property-spacing.js b/tools/node_modules/eslint/lib/rules/computed-property-spacing.js
new file mode 100644
index 0000000000..19c28fd22e
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/computed-property-spacing.js
@@ -0,0 +1,176 @@
+/**
+ * @fileoverview Disallows or enforces spaces inside computed properties.
+ * @author Jamund Ferguson
+ */
+"use strict";
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce consistent spacing inside computed property brackets",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ fixable: "whitespace",
+
+ schema: [
+ {
+ enum: ["always", "never"]
+ }
+ ]
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+ const propertyNameMustBeSpaced = context.options[0] === "always"; // default is "never"
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ /**
+ * Reports that there shouldn't be a space after the first token
+ * @param {ASTNode} node - The node to report in the event of an error.
+ * @param {Token} token - The token to use for the report.
+ * @param {Token} tokenAfter - The token after `token`.
+ * @returns {void}
+ */
+ function reportNoBeginningSpace(node, token, tokenAfter) {
+ context.report({
+ node,
+ loc: token.loc.start,
+ message: "There should be no space after '{{tokenValue}}'.",
+ data: {
+ tokenValue: token.value
+ },
+ fix(fixer) {
+ return fixer.removeRange([token.range[1], tokenAfter.range[0]]);
+ }
+ });
+ }
+
+ /**
+ * Reports that there shouldn't be a space before the last token
+ * @param {ASTNode} node - The node to report in the event of an error.
+ * @param {Token} token - The token to use for the report.
+ * @param {Token} tokenBefore - The token before `token`.
+ * @returns {void}
+ */
+ function reportNoEndingSpace(node, token, tokenBefore) {
+ context.report({
+ node,
+ loc: token.loc.start,
+ message: "There should be no space before '{{tokenValue}}'.",
+ data: {
+ tokenValue: token.value
+ },
+ fix(fixer) {
+ return fixer.removeRange([tokenBefore.range[1], token.range[0]]);
+ }
+ });
+ }
+
+ /**
+ * Reports that there should be a space after the first token
+ * @param {ASTNode} node - The node to report in the event of an error.
+ * @param {Token} token - The token to use for the report.
+ * @returns {void}
+ */
+ function reportRequiredBeginningSpace(node, token) {
+ context.report({
+ node,
+ loc: token.loc.start,
+ message: "A space is required after '{{tokenValue}}'.",
+ data: {
+ tokenValue: token.value
+ },
+ fix(fixer) {
+ return fixer.insertTextAfter(token, " ");
+ }
+ });
+ }
+
+ /**
+ * Reports that there should be a space before the last token
+ * @param {ASTNode} node - The node to report in the event of an error.
+ * @param {Token} token - The token to use for the report.
+ * @returns {void}
+ */
+ function reportRequiredEndingSpace(node, token) {
+ context.report({
+ node,
+ loc: token.loc.start,
+ message: "A space is required before '{{tokenValue}}'.",
+ data: {
+ tokenValue: token.value
+ },
+ fix(fixer) {
+ return fixer.insertTextBefore(token, " ");
+ }
+ });
+ }
+
+ /**
+ * Returns a function that checks the spacing of a node on the property name
+ * that was passed in.
+ * @param {string} propertyName The property on the node to check for spacing
+ * @returns {Function} A function that will check spacing on a node
+ */
+ function checkSpacing(propertyName) {
+ return function(node) {
+ if (!node.computed) {
+ return;
+ }
+
+ const property = node[propertyName];
+
+ const before = sourceCode.getTokenBefore(property),
+ first = sourceCode.getFirstToken(property),
+ last = sourceCode.getLastToken(property),
+ after = sourceCode.getTokenAfter(property);
+
+ if (astUtils.isTokenOnSameLine(before, first)) {
+ if (propertyNameMustBeSpaced) {
+ if (!sourceCode.isSpaceBetweenTokens(before, first) && astUtils.isTokenOnSameLine(before, first)) {
+ reportRequiredBeginningSpace(node, before);
+ }
+ } else {
+ if (sourceCode.isSpaceBetweenTokens(before, first)) {
+ reportNoBeginningSpace(node, before, first);
+ }
+ }
+ }
+
+ if (astUtils.isTokenOnSameLine(last, after)) {
+ if (propertyNameMustBeSpaced) {
+ if (!sourceCode.isSpaceBetweenTokens(last, after) && astUtils.isTokenOnSameLine(last, after)) {
+ reportRequiredEndingSpace(node, after);
+ }
+ } else {
+ if (sourceCode.isSpaceBetweenTokens(last, after)) {
+ reportNoEndingSpace(node, after, last);
+ }
+ }
+ }
+ };
+ }
+
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+ Property: checkSpacing("key"),
+ MemberExpression: checkSpacing("property")
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/consistent-return.js b/tools/node_modules/eslint/lib/rules/consistent-return.js
new file mode 100644
index 0000000000..a42faaa1ed
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/consistent-return.js
@@ -0,0 +1,188 @@
+/**
+ * @fileoverview Rule to flag consistent return values
+ * @author Nicholas C. Zakas
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const lodash = require("lodash");
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Checks whether or not a given node is an `Identifier` node which was named a given name.
+ * @param {ASTNode} node - A node to check.
+ * @param {string} name - An expected name of the node.
+ * @returns {boolean} `true` if the node is an `Identifier` node which was named as expected.
+ */
+function isIdentifier(node, name) {
+ return node.type === "Identifier" && node.name === name;
+}
+
+/**
+ * Checks whether or not a given code path segment is unreachable.
+ * @param {CodePathSegment} segment - A CodePathSegment to check.
+ * @returns {boolean} `true` if the segment is unreachable.
+ */
+function isUnreachable(segment) {
+ return !segment.reachable;
+}
+
+/**
+ * Checks whether a given node is a `constructor` method in an ES6 class
+ * @param {ASTNode} node A node to check
+ * @returns {boolean} `true` if the node is a `constructor` method
+ */
+function isClassConstructor(node) {
+ return node.type === "FunctionExpression" &&
+ node.parent &&
+ node.parent.type === "MethodDefinition" &&
+ node.parent.kind === "constructor";
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require `return` statements to either always or never specify values",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: [{
+ type: "object",
+ properties: {
+ treatUndefinedAsUnspecified: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }]
+ },
+
+ create(context) {
+ const options = context.options[0] || {};
+ const treatUndefinedAsUnspecified = options.treatUndefinedAsUnspecified === true;
+ let funcInfo = null;
+
+ /**
+ * Checks whether of not the implicit returning is consistent if the last
+ * code path segment is reachable.
+ *
+ * @param {ASTNode} node - A program/function node to check.
+ * @returns {void}
+ */
+ function checkLastSegment(node) {
+ let loc, name;
+
+ /*
+ * Skip if it expected no return value or unreachable.
+ * When unreachable, all paths are returned or thrown.
+ */
+ if (!funcInfo.hasReturnValue ||
+ funcInfo.codePath.currentSegments.every(isUnreachable) ||
+ astUtils.isES5Constructor(node) ||
+ isClassConstructor(node)
+ ) {
+ return;
+ }
+
+ // Adjust a location and a message.
+ if (node.type === "Program") {
+
+ // The head of program.
+ loc = { line: 1, column: 0 };
+ name = "program";
+ } else if (node.type === "ArrowFunctionExpression") {
+
+ // `=>` token
+ loc = context.getSourceCode().getTokenBefore(node.body, astUtils.isArrowToken).loc.start;
+ } else if (
+ node.parent.type === "MethodDefinition" ||
+ (node.parent.type === "Property" && node.parent.method)
+ ) {
+
+ // Method name.
+ loc = node.parent.key.loc.start;
+ } else {
+
+ // Function name or `function` keyword.
+ loc = (node.id || node).loc.start;
+ }
+
+ if (!name) {
+ name = astUtils.getFunctionNameWithKind(node);
+ }
+
+ // Reports.
+ context.report({
+ node,
+ loc,
+ message: "Expected to return a value at the end of {{name}}.",
+ data: { name }
+ });
+ }
+
+ return {
+
+ // Initializes/Disposes state of each code path.
+ onCodePathStart(codePath, node) {
+ funcInfo = {
+ upper: funcInfo,
+ codePath,
+ hasReturn: false,
+ hasReturnValue: false,
+ message: "",
+ node
+ };
+ },
+ onCodePathEnd() {
+ funcInfo = funcInfo.upper;
+ },
+
+ // Reports a given return statement if it's inconsistent.
+ ReturnStatement(node) {
+ const argument = node.argument;
+ let hasReturnValue = Boolean(argument);
+
+ if (treatUndefinedAsUnspecified && hasReturnValue) {
+ hasReturnValue = !isIdentifier(argument, "undefined") && argument.operator !== "void";
+ }
+
+ if (!funcInfo.hasReturn) {
+ funcInfo.hasReturn = true;
+ funcInfo.hasReturnValue = hasReturnValue;
+ funcInfo.message = "{{name}} expected {{which}} return value.";
+ funcInfo.data = {
+ name: funcInfo.node.type === "Program"
+ ? "Program"
+ : lodash.upperFirst(astUtils.getFunctionNameWithKind(funcInfo.node)),
+ which: hasReturnValue ? "a" : "no"
+ };
+ } else if (funcInfo.hasReturnValue !== hasReturnValue) {
+ context.report({
+ node,
+ message: funcInfo.message,
+ data: funcInfo.data
+ });
+ }
+ },
+
+ // Reports a given program/function if the implicit returning is not consistent.
+ "Program:exit": checkLastSegment,
+ "FunctionDeclaration:exit": checkLastSegment,
+ "FunctionExpression:exit": checkLastSegment,
+ "ArrowFunctionExpression:exit": checkLastSegment
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/consistent-this.js b/tools/node_modules/eslint/lib/rules/consistent-this.js
new file mode 100644
index 0000000000..151cdcf9c9
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/consistent-this.js
@@ -0,0 +1,143 @@
+/**
+ * @fileoverview Rule to enforce consistent naming of "this" context variables
+ * @author Raphael Pigulla
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce consistent naming when capturing the current execution context",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: {
+ type: "array",
+ items: {
+ type: "string",
+ minLength: 1
+ },
+ uniqueItems: true
+ }
+ },
+
+ create(context) {
+ let aliases = [];
+
+ if (context.options.length === 0) {
+ aliases.push("that");
+ } else {
+ aliases = context.options;
+ }
+
+ /**
+ * Reports that a variable declarator or assignment expression is assigning
+ * a non-'this' value to the specified alias.
+ * @param {ASTNode} node - The assigning node.
+ * @param {string} alias - the name of the alias that was incorrectly used.
+ * @returns {void}
+ */
+ function reportBadAssignment(node, alias) {
+ context.report({ node, message: "Designated alias '{{alias}}' is not assigned to 'this'.", data: { alias } });
+ }
+
+ /**
+ * Checks that an assignment to an identifier only assigns 'this' to the
+ * appropriate alias, and the alias is only assigned to 'this'.
+ * @param {ASTNode} node - The assigning node.
+ * @param {Identifier} name - The name of the variable assigned to.
+ * @param {Expression} value - The value of the assignment.
+ * @returns {void}
+ */
+ function checkAssignment(node, name, value) {
+ const isThis = value.type === "ThisExpression";
+
+ if (aliases.indexOf(name) !== -1) {
+ if (!isThis || node.operator && node.operator !== "=") {
+ reportBadAssignment(node, name);
+ }
+ } else if (isThis) {
+ context.report({ node, message: "Unexpected alias '{{name}}' for 'this'.", data: { name } });
+ }
+ }
+
+ /**
+ * Ensures that a variable declaration of the alias in a program or function
+ * is assigned to the correct value.
+ * @param {string} alias alias the check the assignment of.
+ * @param {Object} scope scope of the current code we are checking.
+ * @private
+ * @returns {void}
+ */
+ function checkWasAssigned(alias, scope) {
+ const variable = scope.set.get(alias);
+
+ if (!variable) {
+ return;
+ }
+
+ if (variable.defs.some(def => def.node.type === "VariableDeclarator" &&
+ def.node.init !== null)) {
+ return;
+ }
+
+ /*
+ * The alias has been declared and not assigned: check it was
+ * assigned later in the same scope.
+ */
+ if (!variable.references.some(reference => {
+ const write = reference.writeExpr;
+
+ return (
+ reference.from === scope &&
+ write && write.type === "ThisExpression" &&
+ write.parent.operator === "="
+ );
+ })) {
+ variable.defs.map(def => def.node).forEach(node => {
+ reportBadAssignment(node, alias);
+ });
+ }
+ }
+
+ /**
+ * Check each alias to ensure that is was assinged to the correct value.
+ * @returns {void}
+ */
+ function ensureWasAssigned() {
+ const scope = context.getScope();
+
+ aliases.forEach(alias => {
+ checkWasAssigned(alias, scope);
+ });
+ }
+
+ return {
+ "Program:exit": ensureWasAssigned,
+ "FunctionExpression:exit": ensureWasAssigned,
+ "FunctionDeclaration:exit": ensureWasAssigned,
+
+ VariableDeclarator(node) {
+ const id = node.id;
+ const isDestructuring =
+ id.type === "ArrayPattern" || id.type === "ObjectPattern";
+
+ if (node.init !== null && !isDestructuring) {
+ checkAssignment(node, id.name, node.init);
+ }
+ },
+
+ AssignmentExpression(node) {
+ if (node.left.type === "Identifier") {
+ checkAssignment(node, node.left.name, node.right);
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/constructor-super.js b/tools/node_modules/eslint/lib/rules/constructor-super.js
new file mode 100644
index 0000000000..d0a238df8e
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/constructor-super.js
@@ -0,0 +1,385 @@
+/**
+ * @fileoverview A rule to verify `super()` callings in constructor.
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Checks whether a given code path segment is reachable or not.
+ *
+ * @param {CodePathSegment} segment - A code path segment to check.
+ * @returns {boolean} `true` if the segment is reachable.
+ */
+function isReachable(segment) {
+ return segment.reachable;
+}
+
+/**
+ * Checks whether or not a given node is a constructor.
+ * @param {ASTNode} node - A node to check. This node type is one of
+ * `Program`, `FunctionDeclaration`, `FunctionExpression`, and
+ * `ArrowFunctionExpression`.
+ * @returns {boolean} `true` if the node is a constructor.
+ */
+function isConstructorFunction(node) {
+ return (
+ node.type === "FunctionExpression" &&
+ node.parent.type === "MethodDefinition" &&
+ node.parent.kind === "constructor"
+ );
+}
+
+/**
+ * Checks whether a given node can be a constructor or not.
+ *
+ * @param {ASTNode} node - A node to check.
+ * @returns {boolean} `true` if the node can be a constructor.
+ */
+function isPossibleConstructor(node) {
+ if (!node) {
+ return false;
+ }
+
+ switch (node.type) {
+ case "ClassExpression":
+ case "FunctionExpression":
+ case "ThisExpression":
+ case "MemberExpression":
+ case "CallExpression":
+ case "NewExpression":
+ case "YieldExpression":
+ case "TaggedTemplateExpression":
+ case "MetaProperty":
+ return true;
+
+ case "Identifier":
+ return node.name !== "undefined";
+
+ case "AssignmentExpression":
+ return isPossibleConstructor(node.right);
+
+ case "LogicalExpression":
+ return (
+ isPossibleConstructor(node.left) ||
+ isPossibleConstructor(node.right)
+ );
+
+ case "ConditionalExpression":
+ return (
+ isPossibleConstructor(node.alternate) ||
+ isPossibleConstructor(node.consequent)
+ );
+
+ case "SequenceExpression": {
+ const lastExpression = node.expressions[node.expressions.length - 1];
+
+ return isPossibleConstructor(lastExpression);
+ }
+
+ default:
+ return false;
+ }
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require `super()` calls in constructors",
+ category: "ECMAScript 6",
+ recommended: true
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ /*
+ * {{hasExtends: boolean, scope: Scope, codePath: CodePath}[]}
+ * Information for each constructor.
+ * - upper: Information of the upper constructor.
+ * - hasExtends: A flag which shows whether own class has a valid `extends`
+ * part.
+ * - scope: The scope of own class.
+ * - codePath: The code path object of the constructor.
+ */
+ let funcInfo = null;
+
+ /*
+ * {Map<string, {calledInSomePaths: boolean, calledInEveryPaths: boolean}>}
+ * Information for each code path segment.
+ * - calledInSomePaths: A flag of be called `super()` in some code paths.
+ * - calledInEveryPaths: A flag of be called `super()` in all code paths.
+ * - validNodes:
+ */
+ let segInfoMap = Object.create(null);
+
+ /**
+ * Gets the flag which shows `super()` is called in some paths.
+ * @param {CodePathSegment} segment - A code path segment to get.
+ * @returns {boolean} The flag which shows `super()` is called in some paths
+ */
+ function isCalledInSomePath(segment) {
+ return segment.reachable && segInfoMap[segment.id].calledInSomePaths;
+ }
+
+ /**
+ * Gets the flag which shows `super()` is called in all paths.
+ * @param {CodePathSegment} segment - A code path segment to get.
+ * @returns {boolean} The flag which shows `super()` is called in all paths.
+ */
+ function isCalledInEveryPath(segment) {
+
+ /*
+ * If specific segment is the looped segment of the current segment,
+ * skip the segment.
+ * If not skipped, this never becomes true after a loop.
+ */
+ if (segment.nextSegments.length === 1 &&
+ segment.nextSegments[0].isLoopedPrevSegment(segment)
+ ) {
+ return true;
+ }
+ return segment.reachable && segInfoMap[segment.id].calledInEveryPaths;
+ }
+
+ return {
+
+ /**
+ * Stacks a constructor information.
+ * @param {CodePath} codePath - A code path which was started.
+ * @param {ASTNode} node - The current node.
+ * @returns {void}
+ */
+ onCodePathStart(codePath, node) {
+ if (isConstructorFunction(node)) {
+
+ // Class > ClassBody > MethodDefinition > FunctionExpression
+ const classNode = node.parent.parent.parent;
+ const superClass = classNode.superClass;
+
+ funcInfo = {
+ upper: funcInfo,
+ isConstructor: true,
+ hasExtends: Boolean(superClass),
+ superIsConstructor: isPossibleConstructor(superClass),
+ codePath
+ };
+ } else {
+ funcInfo = {
+ upper: funcInfo,
+ isConstructor: false,
+ hasExtends: false,
+ superIsConstructor: false,
+ codePath
+ };
+ }
+ },
+
+ /**
+ * Pops a constructor information.
+ * And reports if `super()` lacked.
+ * @param {CodePath} codePath - A code path which was ended.
+ * @param {ASTNode} node - The current node.
+ * @returns {void}
+ */
+ onCodePathEnd(codePath, node) {
+ const hasExtends = funcInfo.hasExtends;
+
+ // Pop.
+ funcInfo = funcInfo.upper;
+
+ if (!hasExtends) {
+ return;
+ }
+
+ // Reports if `super()` lacked.
+ const segments = codePath.returnedSegments;
+ const calledInEveryPaths = segments.every(isCalledInEveryPath);
+ const calledInSomePaths = segments.some(isCalledInSomePath);
+
+ if (!calledInEveryPaths) {
+ context.report({
+ message: calledInSomePaths
+ ? "Lacked a call of 'super()' in some code paths."
+ : "Expected to call 'super()'.",
+ node: node.parent
+ });
+ }
+ },
+
+ /**
+ * Initialize information of a given code path segment.
+ * @param {CodePathSegment} segment - A code path segment to initialize.
+ * @returns {void}
+ */
+ onCodePathSegmentStart(segment) {
+ if (!(funcInfo && funcInfo.isConstructor && funcInfo.hasExtends)) {
+ return;
+ }
+
+ // Initialize info.
+ const info = segInfoMap[segment.id] = {
+ calledInSomePaths: false,
+ calledInEveryPaths: false,
+ validNodes: []
+ };
+
+ // When there are previous segments, aggregates these.
+ const prevSegments = segment.prevSegments;
+
+ if (prevSegments.length > 0) {
+ info.calledInSomePaths = prevSegments.some(isCalledInSomePath);
+ info.calledInEveryPaths = prevSegments.every(isCalledInEveryPath);
+ }
+ },
+
+ /**
+ * Update information of the code path segment when a code path was
+ * looped.
+ * @param {CodePathSegment} fromSegment - The code path segment of the
+ * end of a loop.
+ * @param {CodePathSegment} toSegment - A code path segment of the head
+ * of a loop.
+ * @returns {void}
+ */
+ onCodePathSegmentLoop(fromSegment, toSegment) {
+ if (!(funcInfo && funcInfo.isConstructor && funcInfo.hasExtends)) {
+ return;
+ }
+
+ // Update information inside of the loop.
+ const isRealLoop = toSegment.prevSegments.length >= 2;
+
+ funcInfo.codePath.traverseSegments(
+ { first: toSegment, last: fromSegment },
+ segment => {
+ const info = segInfoMap[segment.id];
+ const prevSegments = segment.prevSegments;
+
+ // Updates flags.
+ info.calledInSomePaths = prevSegments.some(isCalledInSomePath);
+ info.calledInEveryPaths = prevSegments.every(isCalledInEveryPath);
+
+ // If flags become true anew, reports the valid nodes.
+ if (info.calledInSomePaths || isRealLoop) {
+ const nodes = info.validNodes;
+
+ info.validNodes = [];
+
+ for (let i = 0; i < nodes.length; ++i) {
+ const node = nodes[i];
+
+ context.report({
+ message: "Unexpected duplicate 'super()'.",
+ node
+ });
+ }
+ }
+ }
+ );
+ },
+
+ /**
+ * Checks for a call of `super()`.
+ * @param {ASTNode} node - A CallExpression node to check.
+ * @returns {void}
+ */
+ "CallExpression:exit"(node) {
+ if (!(funcInfo && funcInfo.isConstructor)) {
+ return;
+ }
+
+ // Skips except `super()`.
+ if (node.callee.type !== "Super") {
+ return;
+ }
+
+ // Reports if needed.
+ if (funcInfo.hasExtends) {
+ const segments = funcInfo.codePath.currentSegments;
+ let duplicate = false;
+ let info = null;
+
+ for (let i = 0; i < segments.length; ++i) {
+ const segment = segments[i];
+
+ if (segment.reachable) {
+ info = segInfoMap[segment.id];
+
+ duplicate = duplicate || info.calledInSomePaths;
+ info.calledInSomePaths = info.calledInEveryPaths = true;
+ }
+ }
+
+ if (info) {
+ if (duplicate) {
+ context.report({
+ message: "Unexpected duplicate 'super()'.",
+ node
+ });
+ } else if (!funcInfo.superIsConstructor) {
+ context.report({
+ message: "Unexpected 'super()' because 'super' is not a constructor.",
+ node
+ });
+ } else {
+ info.validNodes.push(node);
+ }
+ }
+ } else if (funcInfo.codePath.currentSegments.some(isReachable)) {
+ context.report({
+ message: "Unexpected 'super()'.",
+ node
+ });
+ }
+ },
+
+ /**
+ * Set the mark to the returned path as `super()` was called.
+ * @param {ASTNode} node - A ReturnStatement node to check.
+ * @returns {void}
+ */
+ ReturnStatement(node) {
+ if (!(funcInfo && funcInfo.isConstructor && funcInfo.hasExtends)) {
+ return;
+ }
+
+ // Skips if no argument.
+ if (!node.argument) {
+ return;
+ }
+
+ // Returning argument is a substitute of 'super()'.
+ const segments = funcInfo.codePath.currentSegments;
+
+ for (let i = 0; i < segments.length; ++i) {
+ const segment = segments[i];
+
+ if (segment.reachable) {
+ const info = segInfoMap[segment.id];
+
+ info.calledInSomePaths = info.calledInEveryPaths = true;
+ }
+ }
+ },
+
+ /**
+ * Resets state.
+ * @returns {void}
+ */
+ "Program:exit"() {
+ segInfoMap = Object.create(null);
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/curly.js b/tools/node_modules/eslint/lib/rules/curly.js
new file mode 100644
index 0000000000..37f07d95ee
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/curly.js
@@ -0,0 +1,399 @@
+/**
+ * @fileoverview Rule to flag statements without curly braces
+ * @author Nicholas C. Zakas
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce consistent brace style for all control statements",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: {
+ anyOf: [
+ {
+ type: "array",
+ items: [
+ {
+ enum: ["all"]
+ }
+ ],
+ minItems: 0,
+ maxItems: 1
+ },
+ {
+ type: "array",
+ items: [
+ {
+ enum: ["multi", "multi-line", "multi-or-nest"]
+ },
+ {
+ enum: ["consistent"]
+ }
+ ],
+ minItems: 0,
+ maxItems: 2
+ }
+ ]
+ },
+
+ fixable: "code"
+ },
+
+ create(context) {
+
+ const multiOnly = (context.options[0] === "multi");
+ const multiLine = (context.options[0] === "multi-line");
+ const multiOrNest = (context.options[0] === "multi-or-nest");
+ const consistent = (context.options[1] === "consistent");
+
+ const sourceCode = context.getSourceCode();
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ /**
+ * Determines if a given node is a one-liner that's on the same line as it's preceding code.
+ * @param {ASTNode} node The node to check.
+ * @returns {boolean} True if the node is a one-liner that's on the same line as it's preceding code.
+ * @private
+ */
+ function isCollapsedOneLiner(node) {
+ const before = sourceCode.getTokenBefore(node);
+ const last = sourceCode.getLastToken(node);
+ const lastExcludingSemicolon = astUtils.isSemicolonToken(last) ? sourceCode.getTokenBefore(last) : last;
+
+ return before.loc.start.line === lastExcludingSemicolon.loc.end.line;
+ }
+
+ /**
+ * Determines if a given node is a one-liner.
+ * @param {ASTNode} node The node to check.
+ * @returns {boolean} True if the node is a one-liner.
+ * @private
+ */
+ function isOneLiner(node) {
+ const first = sourceCode.getFirstToken(node),
+ last = sourceCode.getLastToken(node);
+
+ return first.loc.start.line === last.loc.end.line;
+ }
+
+ /**
+ * Checks if the given token is an `else` token or not.
+ *
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is an `else` token.
+ */
+ function isElseKeywordToken(token) {
+ return token.value === "else" && token.type === "Keyword";
+ }
+
+ /**
+ * Gets the `else` keyword token of a given `IfStatement` node.
+ * @param {ASTNode} node - A `IfStatement` node to get.
+ * @returns {Token} The `else` keyword token.
+ */
+ function getElseKeyword(node) {
+ return node.alternate && sourceCode.getFirstTokenBetween(node.consequent, node.alternate, isElseKeywordToken);
+ }
+
+ /**
+ * Checks a given IfStatement node requires braces of the consequent chunk.
+ * This returns `true` when below:
+ *
+ * 1. The given node has the `alternate` node.
+ * 2. There is a `IfStatement` which doesn't have `alternate` node in the
+ * trailing statement chain of the `consequent` node.
+ *
+ * @param {ASTNode} node - A IfStatement node to check.
+ * @returns {boolean} `true` if the node requires braces of the consequent chunk.
+ */
+ function requiresBraceOfConsequent(node) {
+ if (node.alternate && node.consequent.type === "BlockStatement") {
+ if (node.consequent.body.length >= 2) {
+ return true;
+ }
+
+ node = node.consequent.body[0];
+ while (node) {
+ if (node.type === "IfStatement" && !node.alternate) {
+ return true;
+ }
+ node = astUtils.getTrailingStatement(node);
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Reports "Expected { after ..." error
+ * @param {ASTNode} node The node to report.
+ * @param {ASTNode} bodyNode The body node that is incorrectly missing curly brackets
+ * @param {string} name The name to report.
+ * @param {string} suffix Additional string to add to the end of a report.
+ * @returns {void}
+ * @private
+ */
+ function reportExpectedBraceError(node, bodyNode, name, suffix) {
+ context.report({
+ node,
+ loc: (name !== "else" ? node : getElseKeyword(node)).loc.start,
+ message: "Expected { after '{{name}}'{{suffix}}.",
+ data: {
+ name,
+ suffix: (suffix ? ` ${suffix}` : "")
+ },
+ fix: fixer => fixer.replaceText(bodyNode, `{${sourceCode.getText(bodyNode)}}`)
+ });
+ }
+
+ /**
+ * Determines if a semicolon needs to be inserted after removing a set of curly brackets, in order to avoid a SyntaxError.
+ * @param {Token} closingBracket The } token
+ * @returns {boolean} `true` if a semicolon needs to be inserted after the last statement in the block.
+ */
+ function needsSemicolon(closingBracket) {
+ const tokenBefore = sourceCode.getTokenBefore(closingBracket);
+ const tokenAfter = sourceCode.getTokenAfter(closingBracket);
+ const lastBlockNode = sourceCode.getNodeByRangeIndex(tokenBefore.range[0]);
+
+ if (astUtils.isSemicolonToken(tokenBefore)) {
+
+ // If the last statement already has a semicolon, don't add another one.
+ return false;
+ }
+
+ if (!tokenAfter) {
+
+ // If there are no statements after this block, there is no need to add a semicolon.
+ return false;
+ }
+
+ if (lastBlockNode.type === "BlockStatement" && lastBlockNode.parent.type !== "FunctionExpression" && lastBlockNode.parent.type !== "ArrowFunctionExpression") {
+
+ /*
+ * If the last node surrounded by curly brackets is a BlockStatement (other than a FunctionExpression or an ArrowFunctionExpression),
+ * don't insert a semicolon. Otherwise, the semicolon would be parsed as a separate statement, which would cause
+ * a SyntaxError if it was followed by `else`.
+ */
+ return false;
+ }
+
+ if (tokenBefore.loc.end.line === tokenAfter.loc.start.line) {
+
+ // If the next token is on the same line, insert a semicolon.
+ return true;
+ }
+
+ if (/^[([/`+-]/.test(tokenAfter.value)) {
+
+ // If the next token starts with a character that would disrupt ASI, insert a semicolon.
+ return true;
+ }
+
+ if (tokenBefore.type === "Punctuator" && (tokenBefore.value === "++" || tokenBefore.value === "--")) {
+
+ // If the last token is ++ or --, insert a semicolon to avoid disrupting ASI.
+ return true;
+ }
+
+ // Otherwise, do not insert a semicolon.
+ return false;
+ }
+
+ /**
+ * Reports "Unnecessary { after ..." error
+ * @param {ASTNode} node The node to report.
+ * @param {ASTNode} bodyNode The block statement that is incorrectly surrounded by parens
+ * @param {string} name The name to report.
+ * @param {string} suffix Additional string to add to the end of a report.
+ * @returns {void}
+ * @private
+ */
+ function reportUnnecessaryBraceError(node, bodyNode, name, suffix) {
+ context.report({
+ node,
+ loc: (name !== "else" ? node : getElseKeyword(node)).loc.start,
+ message: "Unnecessary { after '{{name}}'{{suffix}}.",
+ data: {
+ name,
+ suffix: (suffix ? ` ${suffix}` : "")
+ },
+ fix(fixer) {
+
+ /*
+ * `do while` expressions sometimes need a space to be inserted after `do`.
+ * e.g. `do{foo()} while (bar)` should be corrected to `do foo() while (bar)`
+ */
+ const needsPrecedingSpace = node.type === "DoWhileStatement" &&
+ sourceCode.getTokenBefore(bodyNode).range[1] === bodyNode.range[0] &&
+ !astUtils.canTokensBeAdjacent("do", sourceCode.getFirstToken(bodyNode, { skip: 1 }));
+
+ const openingBracket = sourceCode.getFirstToken(bodyNode);
+ const closingBracket = sourceCode.getLastToken(bodyNode);
+ const lastTokenInBlock = sourceCode.getTokenBefore(closingBracket);
+
+ if (needsSemicolon(closingBracket)) {
+
+ /*
+ * If removing braces would cause a SyntaxError due to multiple statements on the same line (or
+ * change the semantics of the code due to ASI), don't perform a fix.
+ */
+ return null;
+ }
+
+ const resultingBodyText = sourceCode.getText().slice(openingBracket.range[1], lastTokenInBlock.range[0]) +
+ sourceCode.getText(lastTokenInBlock) +
+ sourceCode.getText().slice(lastTokenInBlock.range[1], closingBracket.range[0]);
+
+ return fixer.replaceText(bodyNode, (needsPrecedingSpace ? " " : "") + resultingBodyText);
+ }
+ });
+ }
+
+ /**
+ * Prepares to check the body of a node to see if it's a block statement.
+ * @param {ASTNode} node The node to report if there's a problem.
+ * @param {ASTNode} body The body node to check for blocks.
+ * @param {string} name The name to report if there's a problem.
+ * @param {string} suffix Additional string to add to the end of a report.
+ * @returns {Object} a prepared check object, with "actual", "expected", "check" properties.
+ * "actual" will be `true` or `false` whether the body is already a block statement.
+ * "expected" will be `true` or `false` if the body should be a block statement or not, or
+ * `null` if it doesn't matter, depending on the rule options. It can be modified to change
+ * the final behavior of "check".
+ * "check" will be a function reporting appropriate problems depending on the other
+ * properties.
+ */
+ function prepareCheck(node, body, name, suffix) {
+ const hasBlock = (body.type === "BlockStatement");
+ let expected = null;
+
+ if (node.type === "IfStatement" && node.consequent === body && requiresBraceOfConsequent(node)) {
+ expected = true;
+ } else if (multiOnly) {
+ if (hasBlock && body.body.length === 1) {
+ expected = false;
+ }
+ } else if (multiLine) {
+ if (!isCollapsedOneLiner(body)) {
+ expected = true;
+ }
+ } else if (multiOrNest) {
+ if (hasBlock && body.body.length === 1 && isOneLiner(body.body[0])) {
+ const leadingComments = sourceCode.getCommentsBefore(body.body[0]);
+
+ expected = leadingComments.length > 0;
+ } else if (!isOneLiner(body)) {
+ expected = true;
+ }
+ } else {
+ expected = true;
+ }
+
+ return {
+ actual: hasBlock,
+ expected,
+ check() {
+ if (this.expected !== null && this.expected !== this.actual) {
+ if (this.expected) {
+ reportExpectedBraceError(node, body, name, suffix);
+ } else {
+ reportUnnecessaryBraceError(node, body, name, suffix);
+ }
+ }
+ }
+ };
+ }
+
+ /**
+ * Prepares to check the bodies of a "if", "else if" and "else" chain.
+ * @param {ASTNode} node The first IfStatement node of the chain.
+ * @returns {Object[]} prepared checks for each body of the chain. See `prepareCheck` for more
+ * information.
+ */
+ function prepareIfChecks(node) {
+ const preparedChecks = [];
+
+ do {
+ preparedChecks.push(prepareCheck(node, node.consequent, "if", "condition"));
+ if (node.alternate && node.alternate.type !== "IfStatement") {
+ preparedChecks.push(prepareCheck(node, node.alternate, "else"));
+ break;
+ }
+ node = node.alternate;
+ } while (node);
+
+ if (consistent) {
+
+ /*
+ * If any node should have or already have braces, make sure they
+ * all have braces.
+ * If all nodes shouldn't have braces, make sure they don't.
+ */
+ const expected = preparedChecks.some(preparedCheck => {
+ if (preparedCheck.expected !== null) {
+ return preparedCheck.expected;
+ }
+ return preparedCheck.actual;
+ });
+
+ preparedChecks.forEach(preparedCheck => {
+ preparedCheck.expected = expected;
+ });
+ }
+
+ return preparedChecks;
+ }
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+ IfStatement(node) {
+ if (node.parent.type !== "IfStatement") {
+ prepareIfChecks(node).forEach(preparedCheck => {
+ preparedCheck.check();
+ });
+ }
+ },
+
+ WhileStatement(node) {
+ prepareCheck(node, node.body, "while", "condition").check();
+ },
+
+ DoWhileStatement(node) {
+ prepareCheck(node, node.body, "do").check();
+ },
+
+ ForStatement(node) {
+ prepareCheck(node, node.body, "for", "condition").check();
+ },
+
+ ForInStatement(node) {
+ prepareCheck(node, node.body, "for-in").check();
+ },
+
+ ForOfStatement(node) {
+ prepareCheck(node, node.body, "for-of").check();
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/default-case.js b/tools/node_modules/eslint/lib/rules/default-case.js
new file mode 100644
index 0000000000..32cd8dfe49
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/default-case.js
@@ -0,0 +1,90 @@
+/**
+ * @fileoverview require default case in switch statements
+ * @author Aliaksei Shytkin
+ */
+"use strict";
+
+const DEFAULT_COMMENT_PATTERN = /^no default$/i;
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require `default` cases in `switch` statements",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: [{
+ type: "object",
+ properties: {
+ commentPattern: {
+ type: "string"
+ }
+ },
+ additionalProperties: false
+ }]
+ },
+
+ create(context) {
+ const options = context.options[0] || {};
+ const commentPattern = options.commentPattern
+ ? new RegExp(options.commentPattern)
+ : DEFAULT_COMMENT_PATTERN;
+
+ const sourceCode = context.getSourceCode();
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ /**
+ * Shortcut to get last element of array
+ * @param {*[]} collection Array
+ * @returns {*} Last element
+ */
+ function last(collection) {
+ return collection[collection.length - 1];
+ }
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+
+ SwitchStatement(node) {
+
+ if (!node.cases.length) {
+
+ /*
+ * skip check of empty switch because there is no easy way
+ * to extract comments inside it now
+ */
+ return;
+ }
+
+ const hasDefault = node.cases.some(v => v.test === null);
+
+ if (!hasDefault) {
+
+ let comment;
+
+ const lastCase = last(node.cases);
+ const comments = sourceCode.getCommentsAfter(lastCase);
+
+ if (comments.length) {
+ comment = last(comments);
+ }
+
+ if (!comment || !commentPattern.test(comment.value.trim())) {
+ context.report({ node, message: "Expected a default case." });
+ }
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/dot-location.js b/tools/node_modules/eslint/lib/rules/dot-location.js
new file mode 100644
index 0000000000..60f4af7013
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/dot-location.js
@@ -0,0 +1,88 @@
+/**
+ * @fileoverview Validates newlines before and after dots
+ * @author Greg Cochard
+ */
+
+"use strict";
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce consistent newlines before and after dots",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: [
+ {
+ enum: ["object", "property"]
+ }
+ ],
+
+ fixable: "code"
+ },
+
+ create(context) {
+
+ const config = context.options[0];
+
+ // default to onObject if no preference is passed
+ const onObject = config === "object" || !config;
+
+ const sourceCode = context.getSourceCode();
+
+ /**
+ * Reports if the dot between object and property is on the correct loccation.
+ * @param {ASTNode} obj The object owning the property.
+ * @param {ASTNode} prop The property of the object.
+ * @param {ASTNode} node The corresponding node of the token.
+ * @returns {void}
+ */
+ function checkDotLocation(obj, prop, node) {
+ const dot = sourceCode.getTokenBefore(prop);
+ const textBeforeDot = sourceCode.getText().slice(obj.range[1], dot.range[0]);
+ const textAfterDot = sourceCode.getText().slice(dot.range[1], prop.range[0]);
+
+ if (dot.type === "Punctuator" && dot.value === ".") {
+ if (onObject) {
+ if (!astUtils.isTokenOnSameLine(obj, dot)) {
+ const neededTextAfterObj = astUtils.isDecimalInteger(obj) ? " " : "";
+
+ context.report({
+ node,
+ loc: dot.loc.start,
+ message: "Expected dot to be on same line as object.",
+ fix: fixer => fixer.replaceTextRange([obj.range[1], prop.range[0]], `${neededTextAfterObj}.${textBeforeDot}${textAfterDot}`)
+ });
+ }
+ } else if (!astUtils.isTokenOnSameLine(dot, prop)) {
+ context.report({
+ node,
+ loc: dot.loc.start,
+ message: "Expected dot to be on same line as property.",
+ fix: fixer => fixer.replaceTextRange([obj.range[1], prop.range[0]], `${textBeforeDot}${textAfterDot}.`)
+ });
+ }
+ }
+ }
+
+ /**
+ * Checks the spacing of the dot within a member expression.
+ * @param {ASTNode} node The node to check.
+ * @returns {void}
+ */
+ function checkNode(node) {
+ checkDotLocation(node.object, node.property, node);
+ }
+
+ return {
+ MemberExpression: checkNode
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/dot-notation.js b/tools/node_modules/eslint/lib/rules/dot-notation.js
new file mode 100644
index 0000000000..21e3df1741
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/dot-notation.js
@@ -0,0 +1,159 @@
+/**
+ * @fileoverview Rule to warn about using dot notation instead of square bracket notation when possible.
+ * @author Josh Perez
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+const validIdentifier = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/;
+const keywords = require("../util/keywords");
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce dot notation whenever possible",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ allowKeywords: {
+ type: "boolean"
+ },
+ allowPattern: {
+ type: "string"
+ }
+ },
+ additionalProperties: false
+ }
+ ],
+
+ fixable: "code"
+ },
+
+ create(context) {
+ const options = context.options[0] || {};
+ const allowKeywords = options.allowKeywords === void 0 || !!options.allowKeywords;
+ const sourceCode = context.getSourceCode();
+
+ let allowPattern;
+
+ if (options.allowPattern) {
+ allowPattern = new RegExp(options.allowPattern);
+ }
+
+ /**
+ * Check if the property is valid dot notation
+ * @param {ASTNode} node The dot notation node
+ * @param {string} value Value which is to be checked
+ * @returns {void}
+ */
+ function checkComputedProperty(node, value) {
+ if (
+ validIdentifier.test(value) &&
+ (allowKeywords || keywords.indexOf(String(value)) === -1) &&
+ !(allowPattern && allowPattern.test(value))
+ ) {
+ const formattedValue = node.property.type === "Literal" ? JSON.stringify(value) : `\`${value}\``;
+
+ context.report({
+ node: node.property,
+ message: "[{{propertyValue}}] is better written in dot notation.",
+ data: {
+ propertyValue: formattedValue
+ },
+ fix(fixer) {
+ const leftBracket = sourceCode.getTokenAfter(node.object, astUtils.isOpeningBracketToken);
+ const rightBracket = sourceCode.getLastToken(node);
+
+ if (sourceCode.getFirstTokenBetween(leftBracket, rightBracket, { includeComments: true, filter: astUtils.isCommentToken })) {
+
+ // Don't perform any fixes if there are comments inside the brackets.
+ return null;
+ }
+
+ const tokenAfterProperty = sourceCode.getTokenAfter(rightBracket);
+ const needsSpaceAfterProperty = tokenAfterProperty &&
+ rightBracket.range[1] === tokenAfterProperty.range[0] &&
+ !astUtils.canTokensBeAdjacent(String(value), tokenAfterProperty);
+
+ const textBeforeDot = astUtils.isDecimalInteger(node.object) ? " " : "";
+ const textAfterProperty = needsSpaceAfterProperty ? " " : "";
+
+ return fixer.replaceTextRange(
+ [leftBracket.range[0], rightBracket.range[1]],
+ `${textBeforeDot}.${value}${textAfterProperty}`
+ );
+ }
+ });
+ }
+ }
+
+ return {
+ MemberExpression(node) {
+ if (
+ node.computed &&
+ node.property.type === "Literal"
+ ) {
+ checkComputedProperty(node, node.property.value);
+ }
+ if (
+ node.computed &&
+ node.property.type === "TemplateLiteral" &&
+ node.property.expressions.length === 0
+ ) {
+ checkComputedProperty(node, node.property.quasis[0].value.cooked);
+ }
+ if (
+ !allowKeywords &&
+ !node.computed &&
+ keywords.indexOf(String(node.property.name)) !== -1
+ ) {
+ context.report({
+ node: node.property,
+ message: ".{{propertyName}} is a syntax error.",
+ data: {
+ propertyName: node.property.name
+ },
+ fix(fixer) {
+ const dot = sourceCode.getTokenBefore(node.property);
+ const textAfterDot = sourceCode.text.slice(dot.range[1], node.property.range[0]);
+
+ if (textAfterDot.trim()) {
+
+ // Don't perform any fixes if there are comments between the dot and the property name.
+ return null;
+ }
+
+ if (node.object.type === "Identifier" && node.object.name === "let") {
+
+ /*
+ * A statement that starts with `let[` is parsed as a destructuring variable declaration, not
+ * a MemberExpression.
+ */
+ return null;
+ }
+
+ return fixer.replaceTextRange(
+ [dot.range[0], node.property.range[1]],
+ `[${textAfterDot}"${node.property.name}"]`
+ );
+ }
+ });
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/eol-last.js b/tools/node_modules/eslint/lib/rules/eol-last.js
new file mode 100644
index 0000000000..1f3676b0e9
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/eol-last.js
@@ -0,0 +1,94 @@
+/**
+ * @fileoverview Require or disallow newline at the end of files
+ * @author Nodeca Team <https://github.com/nodeca>
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const lodash = require("lodash");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require or disallow newline at the end of files",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+ fixable: "whitespace",
+ schema: [
+ {
+ enum: ["always", "never", "unix", "windows"]
+ }
+ ]
+ },
+ create(context) {
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+ Program: function checkBadEOF(node) {
+ const sourceCode = context.getSourceCode(),
+ src = sourceCode.getText(),
+ location = {
+ column: lodash.last(sourceCode.lines).length,
+ line: sourceCode.lines.length
+ },
+ LF = "\n",
+ CRLF = `\r${LF}`,
+ endsWithNewline = lodash.endsWith(src, LF);
+
+ let mode = context.options[0] || "always",
+ appendCRLF = false;
+
+ if (mode === "unix") {
+
+ // `"unix"` should behave exactly as `"always"`
+ mode = "always";
+ }
+ if (mode === "windows") {
+
+ // `"windows"` should behave exactly as `"always"`, but append CRLF in the fixer for backwards compatibility
+ mode = "always";
+ appendCRLF = true;
+ }
+ if (mode === "always" && !endsWithNewline) {
+
+ // File is not newline-terminated, but should be
+ context.report({
+ node,
+ loc: location,
+ message: "Newline required at end of file but not found.",
+ fix(fixer) {
+ return fixer.insertTextAfterRange([0, src.length], appendCRLF ? CRLF : LF);
+ }
+ });
+ } else if (mode === "never" && endsWithNewline) {
+
+ // File is newline-terminated, but shouldn't be
+ context.report({
+ node,
+ loc: location,
+ message: "Newline not allowed at end of file.",
+ fix(fixer) {
+ const finalEOLs = /(?:\r?\n)+$/,
+ match = finalEOLs.exec(sourceCode.text),
+ start = match.index,
+ end = sourceCode.text.length;
+
+ return fixer.replaceTextRange([start, end], "");
+ }
+ });
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/eqeqeq.js b/tools/node_modules/eslint/lib/rules/eqeqeq.js
new file mode 100644
index 0000000000..8801102e64
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/eqeqeq.js
@@ -0,0 +1,180 @@
+/**
+ * @fileoverview Rule to flag statements that use != and == instead of !== and ===
+ * @author Nicholas C. Zakas
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require the use of `===` and `!==`",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: {
+ anyOf: [
+ {
+ type: "array",
+ items: [
+ {
+ enum: ["always"]
+ },
+ {
+ type: "object",
+ properties: {
+ null: {
+ enum: ["always", "never", "ignore"]
+ }
+ },
+ additionalProperties: false
+ }
+ ],
+ additionalItems: false
+ },
+ {
+ type: "array",
+ items: [
+ {
+ enum: ["smart", "allow-null"]
+ }
+ ],
+ additionalItems: false
+ }
+ ]
+ },
+
+ fixable: "code"
+ },
+
+ create(context) {
+ const config = context.options[0] || "always";
+ const options = context.options[1] || {};
+ const sourceCode = context.getSourceCode();
+
+ const nullOption = (config === "always")
+ ? options.null || "always"
+ : "ignore";
+ const enforceRuleForNull = (nullOption === "always");
+ const enforceInverseRuleForNull = (nullOption === "never");
+
+ /**
+ * Checks if an expression is a typeof expression
+ * @param {ASTNode} node The node to check
+ * @returns {boolean} if the node is a typeof expression
+ */
+ function isTypeOf(node) {
+ return node.type === "UnaryExpression" && node.operator === "typeof";
+ }
+
+ /**
+ * Checks if either operand of a binary expression is a typeof operation
+ * @param {ASTNode} node The node to check
+ * @returns {boolean} if one of the operands is typeof
+ * @private
+ */
+ function isTypeOfBinary(node) {
+ return isTypeOf(node.left) || isTypeOf(node.right);
+ }
+
+ /**
+ * Checks if operands are literals of the same type (via typeof)
+ * @param {ASTNode} node The node to check
+ * @returns {boolean} if operands are of same type
+ * @private
+ */
+ function areLiteralsAndSameType(node) {
+ return node.left.type === "Literal" && node.right.type === "Literal" &&
+ typeof node.left.value === typeof node.right.value;
+ }
+
+ /**
+ * Checks if one of the operands is a literal null
+ * @param {ASTNode} node The node to check
+ * @returns {boolean} if operands are null
+ * @private
+ */
+ function isNullCheck(node) {
+ return astUtils.isNullLiteral(node.right) || astUtils.isNullLiteral(node.left);
+ }
+
+ /**
+ * Gets the location (line and column) of the binary expression's operator
+ * @param {ASTNode} node The binary expression node to check
+ * @param {string} operator The operator to find
+ * @returns {Object} { line, column } location of operator
+ * @private
+ */
+ function getOperatorLocation(node) {
+ const opToken = sourceCode.getTokenAfter(node.left);
+
+ return { line: opToken.loc.start.line, column: opToken.loc.start.column };
+ }
+
+ /**
+ * Reports a message for this rule.
+ * @param {ASTNode} node The binary expression node that was checked
+ * @param {string} expectedOperator The operator that was expected (either '==', '!=', '===', or '!==')
+ * @returns {void}
+ * @private
+ */
+ function report(node, expectedOperator) {
+ context.report({
+ node,
+ loc: getOperatorLocation(node),
+ message: "Expected '{{expectedOperator}}' and instead saw '{{actualOperator}}'.",
+ data: { expectedOperator, actualOperator: node.operator },
+ fix(fixer) {
+
+ // If the comparison is a `typeof` comparison or both sides are literals with the same type, then it's safe to fix.
+ if (isTypeOfBinary(node) || areLiteralsAndSameType(node)) {
+ const operatorToken = sourceCode.getFirstTokenBetween(
+ node.left,
+ node.right,
+ token => token.value === node.operator
+ );
+
+ return fixer.replaceText(operatorToken, expectedOperator);
+ }
+ return null;
+ }
+ });
+ }
+
+ return {
+ BinaryExpression(node) {
+ const isNull = isNullCheck(node);
+
+ if (node.operator !== "==" && node.operator !== "!=") {
+ if (enforceInverseRuleForNull && isNull) {
+ report(node, node.operator.slice(0, -1));
+ }
+ return;
+ }
+
+ if (config === "smart" && (isTypeOfBinary(node) ||
+ areLiteralsAndSameType(node) || isNull)) {
+ return;
+ }
+
+ if (!enforceRuleForNull && isNull) {
+ return;
+ }
+
+ report(node, `${node.operator}=`);
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/for-direction.js b/tools/node_modules/eslint/lib/rules/for-direction.js
new file mode 100644
index 0000000000..7178ced9db
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/for-direction.js
@@ -0,0 +1,105 @@
+/**
+ * @fileoverview enforce "for" loop update clause moving the counter in the right direction.(for-direction)
+ * @author Aladdin-ADD<hh_2013@foxmail.com>
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce \"for\" loop update clause moving the counter in the right direction.",
+ category: "Possible Errors",
+ recommended: false
+ },
+ fixable: null,
+ schema: []
+ },
+
+ create(context) {
+
+ /**
+ * report an error.
+ * @param {ASTNode} node the node to report.
+ * @returns {void}
+ */
+ function report(node) {
+ context.report({
+ node,
+ message: "The update clause in this loop moves the variable in the wrong direction."
+ });
+ }
+
+ /**
+ * check UpdateExpression add/sub the counter
+ * @param {ASTNode} update UpdateExpression to check
+ * @param {string} counter variable name to check
+ * @returns {int} if add return 1, if sub return -1, if nochange, return 0
+ */
+ function getUpdateDirection(update, counter) {
+ if (update.argument.type === "Identifier" && update.argument.name === counter) {
+ if (update.operator === "++") {
+ return 1;
+ }
+ if (update.operator === "--") {
+ return -1;
+ }
+ }
+ return 0;
+ }
+
+ /**
+ * check AssignmentExpression add/sub the counter
+ * @param {ASTNode} update AssignmentExpression to check
+ * @param {string} counter variable name to check
+ * @returns {int} if add return 1, if sub return -1, if nochange, return 0
+ */
+ function getAssignmentDirection(update, counter) {
+ if (update.left.name === counter) {
+ if (update.operator === "+=") {
+ return 1;
+ }
+ if (update.operator === "-=") {
+ return -1;
+ }
+ }
+ return 0;
+ }
+ return {
+ ForStatement(node) {
+
+ if (node.test && node.test.type === "BinaryExpression" && node.test.left.type === "Identifier" && node.update) {
+ const counter = node.test.left.name;
+ const operator = node.test.operator;
+ const update = node.update;
+
+ if (operator === "<" || operator === "<=") {
+
+ // report error if update sub the counter (--, -=)
+ if (update.type === "UpdateExpression" && getUpdateDirection(update, counter) < 0) {
+ report(node);
+ }
+
+ if (update.type === "AssignmentExpression" && getAssignmentDirection(update, counter) < 0) {
+ report(node);
+ }
+ } else if (operator === ">" || operator === ">=") {
+
+ // report error if update add the counter (++, +=)
+ if (update.type === "UpdateExpression" && getUpdateDirection(update, counter) > 0) {
+ report(node);
+ }
+
+ if (update.type === "AssignmentExpression" && getAssignmentDirection(update, counter) > 0) {
+ report(node);
+ }
+ }
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/func-call-spacing.js b/tools/node_modules/eslint/lib/rules/func-call-spacing.js
new file mode 100644
index 0000000000..00e677d33b
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/func-call-spacing.js
@@ -0,0 +1,159 @@
+/**
+ * @fileoverview Rule to control spacing within function calls
+ * @author Matt DuVall <http://www.mattduvall.com>
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require or disallow spacing between function identifiers and their invocations",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ fixable: "whitespace",
+ schema: {
+ anyOf: [
+ {
+ type: "array",
+ items: [
+ {
+ enum: ["never"]
+ }
+ ],
+ minItems: 0,
+ maxItems: 1
+ },
+ {
+ type: "array",
+ items: [
+ {
+ enum: ["always"]
+ },
+ {
+ type: "object",
+ properties: {
+ allowNewlines: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ],
+ minItems: 0,
+ maxItems: 2
+ }
+ ]
+ }
+ },
+
+ create(context) {
+
+ const never = context.options[0] !== "always";
+ const allowNewlines = !never && context.options[1] && context.options[1].allowNewlines;
+ const sourceCode = context.getSourceCode();
+ const text = sourceCode.getText();
+
+ /**
+ * Check if open space is present in a function name
+ * @param {ASTNode} node node to evaluate
+ * @returns {void}
+ * @private
+ */
+ function checkSpacing(node) {
+ const lastToken = sourceCode.getLastToken(node);
+ const lastCalleeToken = sourceCode.getLastToken(node.callee);
+ const parenToken = sourceCode.getFirstTokenBetween(lastCalleeToken, lastToken, astUtils.isOpeningParenToken);
+ const prevToken = parenToken && sourceCode.getTokenBefore(parenToken);
+
+ // Parens in NewExpression are optional
+ if (!(parenToken && parenToken.range[1] < node.range[1])) {
+ return;
+ }
+
+ const textBetweenTokens = text.slice(prevToken.range[1], parenToken.range[0]).replace(/\/\*.*?\*\//g, "");
+ const hasWhitespace = /\s/.test(textBetweenTokens);
+ const hasNewline = hasWhitespace && astUtils.LINEBREAK_MATCHER.test(textBetweenTokens);
+
+ /*
+ * never allowNewlines hasWhitespace hasNewline message
+ * F F F F Missing space between function name and paren.
+ * F F F T (Invalid `!hasWhitespace && hasNewline`)
+ * F F T T Unexpected newline between function name and paren.
+ * F F T F (OK)
+ * F T T F (OK)
+ * F T T T (OK)
+ * F T F T (Invalid `!hasWhitespace && hasNewline`)
+ * F T F F Missing space between function name and paren.
+ * T T F F (Invalid `never && allowNewlines`)
+ * T T F T (Invalid `!hasWhitespace && hasNewline`)
+ * T T T T (Invalid `never && allowNewlines`)
+ * T T T F (Invalid `never && allowNewlines`)
+ * T F T F Unexpected space between function name and paren.
+ * T F T T Unexpected space between function name and paren.
+ * T F F T (Invalid `!hasWhitespace && hasNewline`)
+ * T F F F (OK)
+ *
+ * T T Unexpected space between function name and paren.
+ * F F Missing space between function name and paren.
+ * F F T Unexpected newline between function name and paren.
+ */
+
+ if (never && hasWhitespace) {
+ context.report({
+ node,
+ loc: lastCalleeToken.loc.start,
+ message: "Unexpected space between function name and paren.",
+ fix(fixer) {
+
+ /*
+ * Only autofix if there is no newline
+ * https://github.com/eslint/eslint/issues/7787
+ */
+ if (!hasNewline) {
+ return fixer.removeRange([prevToken.range[1], parenToken.range[0]]);
+ }
+
+ return null;
+ }
+ });
+ } else if (!never && !hasWhitespace) {
+ context.report({
+ node,
+ loc: lastCalleeToken.loc.start,
+ message: "Missing space between function name and paren.",
+ fix(fixer) {
+ return fixer.insertTextBefore(parenToken, " ");
+ }
+ });
+ } else if (!never && !allowNewlines && hasNewline) {
+ context.report({
+ node,
+ loc: lastCalleeToken.loc.start,
+ message: "Unexpected newline between function name and paren.",
+ fix(fixer) {
+ return fixer.replaceTextRange([prevToken.range[1], parenToken.range[0]], " ");
+ }
+ });
+ }
+ }
+
+ return {
+ CallExpression: checkSpacing,
+ NewExpression: checkSpacing
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/func-name-matching.js b/tools/node_modules/eslint/lib/rules/func-name-matching.js
new file mode 100644
index 0000000000..db06d5d468
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/func-name-matching.js
@@ -0,0 +1,193 @@
+/**
+ * @fileoverview Rule to require function names to match the name of the variable or property to which they are assigned.
+ * @author Annie Zhang, Pavel Strashkin
+ */
+
+"use strict";
+
+//--------------------------------------------------------------------------
+// Requirements
+//--------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+const esutils = require("esutils");
+
+//--------------------------------------------------------------------------
+// Helpers
+//--------------------------------------------------------------------------
+
+/**
+ * Determines if a pattern is `module.exports` or `module["exports"]`
+ * @param {ASTNode} pattern The left side of the AssignmentExpression
+ * @returns {boolean} True if the pattern is `module.exports` or `module["exports"]`
+ */
+function isModuleExports(pattern) {
+ if (pattern.type === "MemberExpression" && pattern.object.type === "Identifier" && pattern.object.name === "module") {
+
+ // module.exports
+ if (pattern.property.type === "Identifier" && pattern.property.name === "exports") {
+ return true;
+ }
+
+ // module["exports"]
+ if (pattern.property.type === "Literal" && pattern.property.value === "exports") {
+ return true;
+ }
+ }
+ return false;
+}
+
+/**
+ * Determines if a string name is a valid identifier
+ * @param {string} name The string to be checked
+ * @param {int} ecmaVersion The ECMAScript version if specified in the parserOptions config
+ * @returns {boolean} True if the string is a valid identifier
+ */
+function isIdentifier(name, ecmaVersion) {
+ if (ecmaVersion >= 6) {
+ return esutils.keyword.isIdentifierES6(name);
+ }
+ return esutils.keyword.isIdentifierES5(name);
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+const alwaysOrNever = { enum: ["always", "never"] };
+const optionsObject = {
+ type: "object",
+ properties: {
+ includeCommonJSModuleExports: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+};
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require function names to match the name of the variable or property to which they are assigned",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: {
+ anyOf: [{
+ type: "array",
+ additionalItems: false,
+ items: [alwaysOrNever, optionsObject]
+ }, {
+ type: "array",
+ additionalItems: false,
+ items: [optionsObject]
+ }]
+ }
+ },
+
+ create(context) {
+ const options = (typeof context.options[0] === "object" ? context.options[0] : context.options[1]) || {};
+ const nameMatches = typeof context.options[0] === "string" ? context.options[0] : "always";
+ const includeModuleExports = options.includeCommonJSModuleExports;
+ const ecmaVersion = context.parserOptions && context.parserOptions.ecmaVersion ? context.parserOptions.ecmaVersion : 5;
+
+ /**
+ * Compares identifiers based on the nameMatches option
+ * @param {string} x the first identifier
+ * @param {string} y the second identifier
+ * @returns {boolean} whether the two identifiers should warn.
+ */
+ function shouldWarn(x, y) {
+ return (nameMatches === "always" && x !== y) || (nameMatches === "never" && x === y);
+ }
+
+ /**
+ * Reports
+ * @param {ASTNode} node The node to report
+ * @param {string} name The variable or property name
+ * @param {string} funcName The function name
+ * @param {boolean} isProp True if the reported node is a property assignment
+ * @returns {void}
+ */
+ function report(node, name, funcName, isProp) {
+ let message;
+
+ if (nameMatches === "always" && isProp) {
+ message = "Function name `{{funcName}}` should match property name `{{name}}`";
+ } else if (nameMatches === "always") {
+ message = "Function name `{{funcName}}` should match variable name `{{name}}`";
+ } else if (isProp) {
+ message = "Function name `{{funcName}}` should not match property name `{{name}}`";
+ } else {
+ message = "Function name `{{funcName}}` should not match variable name `{{name}}`";
+ }
+ context.report({
+ node,
+ message,
+ data: {
+ name,
+ funcName
+ }
+ });
+ }
+
+ /**
+ * Determines whether a given node is a string literal
+ * @param {ASTNode} node The node to check
+ * @returns {boolean} `true` if the node is a string literal
+ */
+ function isStringLiteral(node) {
+ return node.type === "Literal" && typeof node.value === "string";
+ }
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+
+ VariableDeclarator(node) {
+ if (!node.init || node.init.type !== "FunctionExpression" || node.id.type !== "Identifier") {
+ return;
+ }
+ if (node.init.id && shouldWarn(node.id.name, node.init.id.name)) {
+ report(node, node.id.name, node.init.id.name, false);
+ }
+ },
+
+ AssignmentExpression(node) {
+ if (
+ node.right.type !== "FunctionExpression" ||
+ (node.left.computed && node.left.property.type !== "Literal") ||
+ (!includeModuleExports && isModuleExports(node.left)) ||
+ (node.left.type !== "Identifier" && node.left.type !== "MemberExpression")
+ ) {
+ return;
+ }
+
+ const isProp = node.left.type === "MemberExpression";
+ const name = isProp ? astUtils.getStaticPropertyName(node.left) : node.left.name;
+
+ if (node.right.id && isIdentifier(name) && shouldWarn(name, node.right.id.name)) {
+ report(node, name, node.right.id.name, isProp);
+ }
+ },
+
+ Property(node) {
+ if (node.value.type !== "FunctionExpression" || !node.value.id || node.computed && !isStringLiteral(node.key)) {
+ return;
+ }
+ if (node.key.type === "Identifier" && shouldWarn(node.key.name, node.value.id.name)) {
+ report(node, node.key.name, node.value.id.name, true);
+ } else if (
+ isStringLiteral(node.key) &&
+ isIdentifier(node.key.value, ecmaVersion) &&
+ shouldWarn(node.key.value, node.value.id.name)
+ ) {
+ report(node, node.key.value, node.value.id.name, true);
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/func-names.js b/tools/node_modules/eslint/lib/rules/func-names.js
new file mode 100644
index 0000000000..848ce97574
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/func-names.js
@@ -0,0 +1,114 @@
+/**
+ * @fileoverview Rule to warn when a function expression does not have a name.
+ * @author Kyle T. Nunery
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+/**
+ * Checks whether or not a given variable is a function name.
+ * @param {eslint-scope.Variable} variable - A variable to check.
+ * @returns {boolean} `true` if the variable is a function name.
+ */
+function isFunctionName(variable) {
+ return variable && variable.defs[0].type === "FunctionName";
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require or disallow named `function` expressions",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: [
+ {
+ enum: ["always", "as-needed", "never"]
+ }
+ ]
+ },
+
+ create(context) {
+ const never = context.options[0] === "never";
+ const asNeeded = context.options[0] === "as-needed";
+
+ /**
+ * Determines whether the current FunctionExpression node is a get, set, or
+ * shorthand method in an object literal or a class.
+ * @param {ASTNode} node - A node to check.
+ * @returns {boolean} True if the node is a get, set, or shorthand method.
+ */
+ function isObjectOrClassMethod(node) {
+ const parent = node.parent;
+
+ return (parent.type === "MethodDefinition" || (
+ parent.type === "Property" && (
+ parent.method ||
+ parent.kind === "get" ||
+ parent.kind === "set"
+ )
+ ));
+ }
+
+ /**
+ * Determines whether the current FunctionExpression node has a name that would be
+ * inferred from context in a conforming ES6 environment.
+ * @param {ASTNode} node - A node to check.
+ * @returns {boolean} True if the node would have a name assigned automatically.
+ */
+ function hasInferredName(node) {
+ const parent = node.parent;
+
+ return isObjectOrClassMethod(node) ||
+ (parent.type === "VariableDeclarator" && parent.id.type === "Identifier" && parent.init === node) ||
+ (parent.type === "Property" && parent.value === node) ||
+ (parent.type === "AssignmentExpression" && parent.left.type === "Identifier" && parent.right === node) ||
+ (parent.type === "ExportDefaultDeclaration" && parent.declaration === node) ||
+ (parent.type === "AssignmentPattern" && parent.right === node);
+ }
+
+ return {
+ "FunctionExpression:exit"(node) {
+
+ // Skip recursive functions.
+ const nameVar = context.getDeclaredVariables(node)[0];
+
+ if (isFunctionName(nameVar) && nameVar.references.length > 0) {
+ return;
+ }
+
+ const hasName = Boolean(node.id && node.id.name);
+ const name = astUtils.getFunctionNameWithKind(node);
+
+ if (never) {
+ if (hasName) {
+ context.report({
+ node,
+ message: "Unexpected named {{name}}.",
+ data: { name }
+ });
+ }
+ } else {
+ if (!hasName && (asNeeded ? !hasInferredName(node) : !isObjectOrClassMethod(node))) {
+ context.report({
+ node,
+ message: "Unexpected unnamed {{name}}.",
+ data: { name }
+ });
+ }
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/func-style.js b/tools/node_modules/eslint/lib/rules/func-style.js
new file mode 100644
index 0000000000..123eae3d8a
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/func-style.js
@@ -0,0 +1,89 @@
+/**
+ * @fileoverview Rule to enforce a particular function style
+ * @author Nicholas C. Zakas
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce the consistent use of either `function` declarations or expressions",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: [
+ {
+ enum: ["declaration", "expression"]
+ },
+ {
+ type: "object",
+ properties: {
+ allowArrowFunctions: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+
+ const style = context.options[0],
+ allowArrowFunctions = context.options[1] && context.options[1].allowArrowFunctions === true,
+ enforceDeclarations = (style === "declaration"),
+ stack = [];
+
+ const nodesToCheck = {
+ FunctionDeclaration(node) {
+ stack.push(false);
+
+ if (!enforceDeclarations && node.parent.type !== "ExportDefaultDeclaration") {
+ context.report({ node, message: "Expected a function expression." });
+ }
+ },
+ "FunctionDeclaration:exit"() {
+ stack.pop();
+ },
+
+ FunctionExpression(node) {
+ stack.push(false);
+
+ if (enforceDeclarations && node.parent.type === "VariableDeclarator") {
+ context.report({ node: node.parent, message: "Expected a function declaration." });
+ }
+ },
+ "FunctionExpression:exit"() {
+ stack.pop();
+ },
+
+ ThisExpression() {
+ if (stack.length > 0) {
+ stack[stack.length - 1] = true;
+ }
+ }
+ };
+
+ if (!allowArrowFunctions) {
+ nodesToCheck.ArrowFunctionExpression = function() {
+ stack.push(false);
+ };
+
+ nodesToCheck["ArrowFunctionExpression:exit"] = function(node) {
+ const hasThisExpr = stack.pop();
+
+ if (enforceDeclarations && !hasThisExpr && node.parent.type === "VariableDeclarator") {
+ context.report({ node: node.parent, message: "Expected a function declaration." });
+ }
+ };
+ }
+
+ return nodesToCheck;
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/function-paren-newline.js b/tools/node_modules/eslint/lib/rules/function-paren-newline.js
new file mode 100644
index 0000000000..10ad960a4d
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/function-paren-newline.js
@@ -0,0 +1,221 @@
+/**
+ * @fileoverview enforce consistent line breaks inside function parentheses
+ * @author Teddy Katz
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce consistent line breaks inside function parentheses",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+ fixable: "whitespace",
+ schema: [
+ {
+ oneOf: [
+ {
+ enum: ["always", "never", "consistent", "multiline"]
+ },
+ {
+ type: "object",
+ properties: {
+ minItems: {
+ type: "integer",
+ minimum: 0
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ }
+ ]
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+ const rawOption = context.options[0] || "multiline";
+ const multilineOption = rawOption === "multiline";
+ const consistentOption = rawOption === "consistent";
+ let minItems;
+
+ if (typeof rawOption === "object") {
+ minItems = rawOption.minItems;
+ } else if (rawOption === "always") {
+ minItems = 0;
+ } else if (rawOption === "never") {
+ minItems = Infinity;
+ } else {
+ minItems = null;
+ }
+
+ //----------------------------------------------------------------------
+ // Helpers
+ //----------------------------------------------------------------------
+
+ /**
+ * Determines whether there should be newlines inside function parens
+ * @param {ASTNode[]} elements The arguments or parameters in the list
+ * @param {boolean} hasLeftNewline `true` if the left paren has a newline in the current code.
+ * @returns {boolean} `true` if there should be newlines inside the function parens
+ */
+ function shouldHaveNewlines(elements, hasLeftNewline) {
+ if (multilineOption) {
+ return elements.some((element, index) => index !== elements.length - 1 && element.loc.end.line !== elements[index + 1].loc.start.line);
+ }
+ if (consistentOption) {
+ return hasLeftNewline;
+ }
+ return elements.length >= minItems;
+ }
+
+ /**
+ * Validates a list of arguments or parameters
+ * @param {Object} parens An object with keys `leftParen` for the left paren token, and `rightParen` for the right paren token
+ * @param {ASTNode[]} elements The arguments or parameters in the list
+ * @returns {void}
+ */
+ function validateParens(parens, elements) {
+ const leftParen = parens.leftParen;
+ const rightParen = parens.rightParen;
+ const tokenAfterLeftParen = sourceCode.getTokenAfter(leftParen);
+ const tokenBeforeRightParen = sourceCode.getTokenBefore(rightParen);
+ const hasLeftNewline = !astUtils.isTokenOnSameLine(leftParen, tokenAfterLeftParen);
+ const hasRightNewline = !astUtils.isTokenOnSameLine(tokenBeforeRightParen, rightParen);
+ const needsNewlines = shouldHaveNewlines(elements, hasLeftNewline);
+
+ if (hasLeftNewline && !needsNewlines) {
+ context.report({
+ node: leftParen,
+ message: "Unexpected newline after '('.",
+ fix(fixer) {
+ return sourceCode.getText().slice(leftParen.range[1], tokenAfterLeftParen.range[0]).trim()
+
+ // If there is a comment between the ( and the first element, don't do a fix.
+ ? null
+ : fixer.removeRange([leftParen.range[1], tokenAfterLeftParen.range[0]]);
+ }
+ });
+ } else if (!hasLeftNewline && needsNewlines) {
+ context.report({
+ node: leftParen,
+ message: "Expected a newline after '('.",
+ fix: fixer => fixer.insertTextAfter(leftParen, "\n")
+ });
+ }
+
+ if (hasRightNewline && !needsNewlines) {
+ context.report({
+ node: rightParen,
+ message: "Unexpected newline before ')'.",
+ fix(fixer) {
+ return sourceCode.getText().slice(tokenBeforeRightParen.range[1], rightParen.range[0]).trim()
+
+ // If there is a comment between the last element and the ), don't do a fix.
+ ? null
+ : fixer.removeRange([tokenBeforeRightParen.range[1], rightParen.range[0]]);
+ }
+ });
+ } else if (!hasRightNewline && needsNewlines) {
+ context.report({
+ node: rightParen,
+ message: "Expected a newline before ')'.",
+ fix: fixer => fixer.insertTextBefore(rightParen, "\n")
+ });
+ }
+ }
+
+ /**
+ * Gets the left paren and right paren tokens of a node.
+ * @param {ASTNode} node The node with parens
+ * @returns {Object} An object with keys `leftParen` for the left paren token, and `rightParen` for the right paren token.
+ * Can also return `null` if an expression has no parens (e.g. a NewExpression with no arguments, or an ArrowFunctionExpression
+ * with a single parameter)
+ */
+ function getParenTokens(node) {
+ switch (node.type) {
+ case "NewExpression":
+ if (!node.arguments.length && !(
+ astUtils.isOpeningParenToken(sourceCode.getLastToken(node, { skip: 1 })) &&
+ astUtils.isClosingParenToken(sourceCode.getLastToken(node))
+ )) {
+
+ // If the NewExpression does not have parens (e.g. `new Foo`), return null.
+ return null;
+ }
+
+ // falls through
+
+ case "CallExpression":
+ return {
+ leftParen: sourceCode.getTokenAfter(node.callee, astUtils.isOpeningParenToken),
+ rightParen: sourceCode.getLastToken(node)
+ };
+
+ case "FunctionDeclaration":
+ case "FunctionExpression": {
+ const leftParen = sourceCode.getFirstToken(node, astUtils.isOpeningParenToken);
+ const rightParen = node.params.length
+ ? sourceCode.getTokenAfter(node.params[node.params.length - 1], astUtils.isClosingParenToken)
+ : sourceCode.getTokenAfter(leftParen);
+
+ return { leftParen, rightParen };
+ }
+
+ case "ArrowFunctionExpression": {
+ const firstToken = sourceCode.getFirstToken(node);
+
+ if (!astUtils.isOpeningParenToken(firstToken)) {
+
+ // If the ArrowFunctionExpression has a single param without parens, return null.
+ return null;
+ }
+
+ return {
+ leftParen: firstToken,
+ rightParen: sourceCode.getTokenBefore(node.body, astUtils.isClosingParenToken)
+ };
+ }
+
+ default:
+ throw new TypeError(`unexpected node with type ${node.type}`);
+ }
+ }
+
+ /**
+ * Validates the parentheses for a node
+ * @param {ASTNode} node The node with parens
+ * @returns {void}
+ */
+ function validateNode(node) {
+ const parens = getParenTokens(node);
+
+ if (parens) {
+ validateParens(parens, astUtils.isFunction(node) ? node.params : node.arguments);
+ }
+ }
+
+ //----------------------------------------------------------------------
+ // Public
+ //----------------------------------------------------------------------
+
+ return {
+ ArrowFunctionExpression: validateNode,
+ CallExpression: validateNode,
+ FunctionDeclaration: validateNode,
+ FunctionExpression: validateNode,
+ NewExpression: validateNode
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/generator-star-spacing.js b/tools/node_modules/eslint/lib/rules/generator-star-spacing.js
new file mode 100644
index 0000000000..a718b59afc
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/generator-star-spacing.js
@@ -0,0 +1,199 @@
+/**
+ * @fileoverview Rule to check the spacing around the * in generator functions.
+ * @author Jamund Ferguson
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+const OVERRIDE_SCHEMA = {
+ oneOf: [
+ {
+ enum: ["before", "after", "both", "neither"]
+ },
+ {
+ type: "object",
+ properties: {
+ before: { type: "boolean" },
+ after: { type: "boolean" }
+ },
+ additionalProperties: false
+ }
+ ]
+};
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce consistent spacing around `*` operators in generator functions",
+ category: "ECMAScript 6",
+ recommended: false
+ },
+
+ fixable: "whitespace",
+
+ schema: [
+ {
+ oneOf: [
+ {
+ enum: ["before", "after", "both", "neither"]
+ },
+ {
+ type: "object",
+ properties: {
+ before: { type: "boolean" },
+ after: { type: "boolean" },
+ named: OVERRIDE_SCHEMA,
+ anonymous: OVERRIDE_SCHEMA,
+ method: OVERRIDE_SCHEMA
+ },
+ additionalProperties: false
+ }
+ ]
+ }
+ ]
+ },
+
+ create(context) {
+
+ const optionDefinitions = {
+ before: { before: true, after: false },
+ after: { before: false, after: true },
+ both: { before: true, after: true },
+ neither: { before: false, after: false }
+ };
+
+ /**
+ * Returns resolved option definitions based on an option and defaults
+ *
+ * @param {any} option - The option object or string value
+ * @param {Object} defaults - The defaults to use if options are not present
+ * @returns {Object} the resolved object definition
+ */
+ function optionToDefinition(option, defaults) {
+ if (!option) {
+ return defaults;
+ }
+
+ return typeof option === "string"
+ ? optionDefinitions[option]
+ : Object.assign({}, defaults, option);
+ }
+
+ const modes = (function(option) {
+ option = option || {};
+ const defaults = optionToDefinition(option, optionDefinitions.before);
+
+ return {
+ named: optionToDefinition(option.named, defaults),
+ anonymous: optionToDefinition(option.anonymous, defaults),
+ method: optionToDefinition(option.method, defaults)
+ };
+ }(context.options[0]));
+
+ const sourceCode = context.getSourceCode();
+
+ /**
+ * Checks if the given token is a star token or not.
+ *
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is a star token.
+ */
+ function isStarToken(token) {
+ return token.value === "*" && token.type === "Punctuator";
+ }
+
+ /**
+ * Gets the generator star token of the given function node.
+ *
+ * @param {ASTNode} node - The function node to get.
+ * @returns {Token} Found star token.
+ */
+ function getStarToken(node) {
+ return sourceCode.getFirstToken(
+ (node.parent.method || node.parent.type === "MethodDefinition") ? node.parent : node,
+ isStarToken
+ );
+ }
+
+ /**
+ * Checks the spacing between two tokens before or after the star token.
+ *
+ * @param {string} kind Either "named", "anonymous", or "method"
+ * @param {string} side Either "before" or "after".
+ * @param {Token} leftToken `function` keyword token if side is "before", or
+ * star token if side is "after".
+ * @param {Token} rightToken Star token if side is "before", or identifier
+ * token if side is "after".
+ * @returns {void}
+ */
+ function checkSpacing(kind, side, leftToken, rightToken) {
+ if (!!(rightToken.range[0] - leftToken.range[1]) !== modes[kind][side]) {
+ const after = leftToken.value === "*";
+ const spaceRequired = modes[kind][side];
+ const node = after ? leftToken : rightToken;
+ const type = spaceRequired ? "Missing" : "Unexpected";
+ const message = "{{type}} space {{side}} *.";
+ const data = {
+ type,
+ side
+ };
+
+ context.report({
+ node,
+ message,
+ data,
+ fix(fixer) {
+ if (spaceRequired) {
+ if (after) {
+ return fixer.insertTextAfter(node, " ");
+ }
+ return fixer.insertTextBefore(node, " ");
+ }
+ return fixer.removeRange([leftToken.range[1], rightToken.range[0]]);
+ }
+ });
+ }
+ }
+
+ /**
+ * Enforces the spacing around the star if node is a generator function.
+ *
+ * @param {ASTNode} node A function expression or declaration node.
+ * @returns {void}
+ */
+ function checkFunction(node) {
+ if (!node.generator) {
+ return;
+ }
+
+ const starToken = getStarToken(node);
+ const prevToken = sourceCode.getTokenBefore(starToken);
+ const nextToken = sourceCode.getTokenAfter(starToken);
+
+ let kind = "named";
+
+ if (node.parent.type === "MethodDefinition" || (node.parent.type === "Property" && node.parent.method)) {
+ kind = "method";
+ } else if (!node.id) {
+ kind = "anonymous";
+ }
+
+ // Only check before when preceded by `function`|`static` keyword
+ if (!(kind === "method" && starToken === sourceCode.getFirstToken(node.parent))) {
+ checkSpacing(kind, "before", prevToken, starToken);
+ }
+
+ checkSpacing(kind, "after", starToken, nextToken);
+ }
+
+ return {
+ FunctionDeclaration: checkFunction,
+ FunctionExpression: checkFunction
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/getter-return.js b/tools/node_modules/eslint/lib/rules/getter-return.js
new file mode 100644
index 0000000000..6eb1efc00c
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/getter-return.js
@@ -0,0 +1,177 @@
+/**
+ * @fileoverview Enforces that a return statement is present in property getters.
+ * @author Aladdin-ADD(hh_2013@foxmail.com)
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+const TARGET_NODE_TYPE = /^(?:Arrow)?FunctionExpression$/;
+
+/**
+ * Checks a given code path segment is reachable.
+ *
+ * @param {CodePathSegment} segment - A segment to check.
+ * @returns {boolean} `true` if the segment is reachable.
+ */
+function isReachable(segment) {
+ return segment.reachable;
+}
+
+/**
+ * Gets a readable location.
+ *
+ * - FunctionExpression -> the function name or `function` keyword.
+ *
+ * @param {ASTNode} node - A function node to get.
+ * @returns {ASTNode|Token} The node or the token of a location.
+ */
+function getId(node) {
+ return node.id || node;
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce `return` statements in getters",
+ category: "Possible Errors",
+ recommended: false
+ },
+ fixable: null,
+ schema: [
+ {
+ type: "object",
+ properties: {
+ allowImplicit: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+
+ const options = context.options[0] || { allowImplicit: false };
+
+ let funcInfo = {
+ upper: null,
+ codePath: null,
+ hasReturn: false,
+ shouldCheck: false,
+ node: null
+ };
+
+ /**
+ * Checks whether or not the last code path segment is reachable.
+ * Then reports this function if the segment is reachable.
+ *
+ * If the last code path segment is reachable, there are paths which are not
+ * returned or thrown.
+ *
+ * @param {ASTNode} node - A node to check.
+ * @returns {void}
+ */
+ function checkLastSegment(node) {
+ if (funcInfo.shouldCheck &&
+ funcInfo.codePath.currentSegments.some(isReachable)
+ ) {
+ context.report({
+ node,
+ loc: getId(node).loc.start,
+ message: funcInfo.hasReturn
+ ? "Expected {{name}} to always return a value."
+ : "Expected to return a value in {{name}}.",
+ data: {
+ name: astUtils.getFunctionNameWithKind(funcInfo.node)
+ }
+ });
+ }
+ }
+
+ /**
+ * Checks whether a node means a getter function.
+ * @param {ASTNode} node - a node to check.
+ * @returns {boolean} if node means a getter, return true; else return false.
+ */
+ function isGetter(node) {
+ const parent = node.parent;
+
+ if (TARGET_NODE_TYPE.test(node.type) && node.body.type === "BlockStatement") {
+ if (parent.kind === "get") {
+ return true;
+ }
+ if (parent.type === "Property" && astUtils.getStaticPropertyName(parent) === "get" && parent.parent.type === "ObjectExpression") {
+
+ // Object.defineProperty()
+ if (parent.parent.parent.type === "CallExpression" &&
+ astUtils.getStaticPropertyName(parent.parent.parent.callee) === "defineProperty") {
+ return true;
+ }
+
+ // Object.defineProperties()
+ if (parent.parent.parent.type === "Property" &&
+ parent.parent.parent.parent.type === "ObjectExpression" &&
+ parent.parent.parent.parent.parent.type === "CallExpression" &&
+ astUtils.getStaticPropertyName(parent.parent.parent.parent.parent.callee) === "defineProperties") {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+ return {
+
+ // Stacks this function's information.
+ onCodePathStart(codePath, node) {
+ funcInfo = {
+ upper: funcInfo,
+ codePath,
+ hasReturn: false,
+ shouldCheck: isGetter(node),
+ node
+ };
+ },
+
+ // Pops this function's information.
+ onCodePathEnd() {
+ funcInfo = funcInfo.upper;
+ },
+
+ // Checks the return statement is valid.
+ ReturnStatement(node) {
+ if (funcInfo.shouldCheck) {
+ funcInfo.hasReturn = true;
+
+ // if allowImplicit: false, should also check node.argument
+ if (!options.allowImplicit && !node.argument) {
+ context.report({
+ node,
+ message: "Expected to return a value in {{name}}.",
+ data: {
+ name: astUtils.getFunctionNameWithKind(funcInfo.node)
+ }
+ });
+ }
+ }
+ },
+
+ // Reports a given function if the last path is reachable.
+ "FunctionExpression:exit": checkLastSegment,
+ "ArrowFunctionExpression:exit": checkLastSegment
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/global-require.js b/tools/node_modules/eslint/lib/rules/global-require.js
new file mode 100644
index 0000000000..beda8d99f1
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/global-require.js
@@ -0,0 +1,75 @@
+/**
+ * @fileoverview Rule for disallowing require() outside of the top-level module context
+ * @author Jamund Ferguson
+ */
+
+"use strict";
+
+const ACCEPTABLE_PARENTS = [
+ "AssignmentExpression",
+ "VariableDeclarator",
+ "MemberExpression",
+ "ExpressionStatement",
+ "CallExpression",
+ "ConditionalExpression",
+ "Program",
+ "VariableDeclaration"
+];
+
+/**
+ * Finds the eslint-scope reference in the given scope.
+ * @param {Object} scope The scope to search.
+ * @param {ASTNode} node The identifier node.
+ * @returns {Reference|null} Returns the found reference or null if none were found.
+ */
+function findReference(scope, node) {
+ const references = scope.references.filter(reference => reference.identifier.range[0] === node.range[0] &&
+ reference.identifier.range[1] === node.range[1]);
+
+ /* istanbul ignore else: correctly returns null */
+ if (references.length === 1) {
+ return references[0];
+ }
+ return null;
+
+}
+
+/**
+ * Checks if the given identifier node is shadowed in the given scope.
+ * @param {Object} scope The current scope.
+ * @param {ASTNode} node The identifier node to check.
+ * @returns {boolean} Whether or not the name is shadowed.
+ */
+function isShadowed(scope, node) {
+ const reference = findReference(scope, node);
+
+ return reference && reference.resolved && reference.resolved.defs.length > 0;
+}
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require `require()` calls to be placed at top-level module scope",
+ category: "Node.js and CommonJS",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+ return {
+ CallExpression(node) {
+ const currentScope = context.getScope();
+
+ if (node.callee.name === "require" && !isShadowed(currentScope, node.callee)) {
+ const isGoodRequire = context.getAncestors().every(parent => ACCEPTABLE_PARENTS.indexOf(parent.type) > -1);
+
+ if (!isGoodRequire) {
+ context.report({ node, message: "Unexpected require()." });
+ }
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/guard-for-in.js b/tools/node_modules/eslint/lib/rules/guard-for-in.js
new file mode 100644
index 0000000000..754830f6a6
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/guard-for-in.js
@@ -0,0 +1,42 @@
+/**
+ * @fileoverview Rule to flag for-in loops without if statements inside
+ * @author Nicholas C. Zakas
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require `for-in` loops to include an `if` statement",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ return {
+
+ ForInStatement(node) {
+
+ /*
+ * If the for-in statement has {}, then the real body is the body
+ * of the BlockStatement. Otherwise, just use body as provided.
+ */
+ const body = node.body.type === "BlockStatement" ? node.body.body[0] : node.body;
+
+ if (body && body.type !== "IfStatement") {
+ context.report({ node, message: "The body of a for-in should be wrapped in an if statement to filter unwanted properties from the prototype." });
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/handle-callback-err.js b/tools/node_modules/eslint/lib/rules/handle-callback-err.js
new file mode 100644
index 0000000000..de36a0c1b0
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/handle-callback-err.js
@@ -0,0 +1,89 @@
+/**
+ * @fileoverview Ensure handling of errors when we know they exist.
+ * @author Jamund Ferguson
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require error handling in callbacks",
+ category: "Node.js and CommonJS",
+ recommended: false
+ },
+
+ schema: [
+ {
+ type: "string"
+ }
+ ]
+ },
+
+ create(context) {
+
+ const errorArgument = context.options[0] || "err";
+
+ /**
+ * Checks if the given argument should be interpreted as a regexp pattern.
+ * @param {string} stringToCheck The string which should be checked.
+ * @returns {boolean} Whether or not the string should be interpreted as a pattern.
+ */
+ function isPattern(stringToCheck) {
+ const firstChar = stringToCheck[0];
+
+ return firstChar === "^";
+ }
+
+ /**
+ * Checks if the given name matches the configured error argument.
+ * @param {string} name The name which should be compared.
+ * @returns {boolean} Whether or not the given name matches the configured error variable name.
+ */
+ function matchesConfiguredErrorName(name) {
+ if (isPattern(errorArgument)) {
+ const regexp = new RegExp(errorArgument);
+
+ return regexp.test(name);
+ }
+ return name === errorArgument;
+ }
+
+ /**
+ * Get the parameters of a given function scope.
+ * @param {Object} scope The function scope.
+ * @returns {array} All parameters of the given scope.
+ */
+ function getParameters(scope) {
+ return scope.variables.filter(variable => variable.defs[0] && variable.defs[0].type === "Parameter");
+ }
+
+ /**
+ * Check to see if we're handling the error object properly.
+ * @param {ASTNode} node The AST node to check.
+ * @returns {void}
+ */
+ function checkForError(node) {
+ const scope = context.getScope(),
+ parameters = getParameters(scope),
+ firstParameter = parameters[0];
+
+ if (firstParameter && matchesConfiguredErrorName(firstParameter.name)) {
+ if (firstParameter.references.length === 0) {
+ context.report({ node, message: "Expected error to be handled." });
+ }
+ }
+ }
+
+ return {
+ FunctionDeclaration: checkForError,
+ FunctionExpression: checkForError,
+ ArrowFunctionExpression: checkForError
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/id-blacklist.js b/tools/node_modules/eslint/lib/rules/id-blacklist.js
new file mode 100644
index 0000000000..ee28c0b5a8
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/id-blacklist.js
@@ -0,0 +1,121 @@
+/**
+ * @fileoverview Rule that warns when identifier names that are
+ * blacklisted in the configuration are used.
+ * @author Keith Cirkel (http://keithcirkel.co.uk)
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow specified identifiers",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: {
+ type: "array",
+ items: {
+ type: "string"
+ },
+ uniqueItems: true
+ }
+ },
+
+ create(context) {
+
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ const blacklist = context.options;
+
+
+ /**
+ * Checks if a string matches the provided pattern
+ * @param {string} name The string to check.
+ * @returns {boolean} if the string is a match
+ * @private
+ */
+ function isInvalid(name) {
+ return blacklist.indexOf(name) !== -1;
+ }
+
+ /**
+ * Verifies if we should report an error or not based on the effective
+ * parent node and the identifier name.
+ * @param {ASTNode} effectiveParent The effective parent node of the node to be reported
+ * @param {string} name The identifier name of the identifier node
+ * @returns {boolean} whether an error should be reported or not
+ */
+ function shouldReport(effectiveParent, name) {
+ return effectiveParent.type !== "CallExpression" &&
+ effectiveParent.type !== "NewExpression" &&
+ isInvalid(name);
+ }
+
+ /**
+ * Reports an AST node as a rule violation.
+ * @param {ASTNode} node The node to report.
+ * @returns {void}
+ * @private
+ */
+ function report(node) {
+ context.report({
+ node,
+ message: "Identifier '{{name}}' is blacklisted.",
+ data: {
+ name: node.name
+ }
+ });
+ }
+
+ return {
+
+ Identifier(node) {
+ const name = node.name,
+ effectiveParent = (node.parent.type === "MemberExpression") ? node.parent.parent : node.parent;
+
+ // MemberExpressions get special rules
+ if (node.parent.type === "MemberExpression") {
+
+ // Always check object names
+ if (node.parent.object.type === "Identifier" &&
+ node.parent.object.name === node.name) {
+ if (isInvalid(name)) {
+ report(node);
+ }
+
+ // Report AssignmentExpressions only if they are the left side of the assignment
+ } else if (effectiveParent.type === "AssignmentExpression" &&
+ (effectiveParent.right.type !== "MemberExpression" ||
+ effectiveParent.left.type === "MemberExpression" &&
+ effectiveParent.left.property.name === node.name)) {
+ if (isInvalid(name)) {
+ report(node);
+ }
+ }
+
+ // Properties have their own rules
+ } else if (node.parent.type === "Property") {
+
+ if (shouldReport(effectiveParent, name)) {
+ report(node);
+ }
+
+ // Report anything that is a match and not a CallExpression
+ } else if (shouldReport(effectiveParent, name)) {
+ report(node);
+ }
+ }
+
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/id-length.js b/tools/node_modules/eslint/lib/rules/id-length.js
new file mode 100644
index 0000000000..dad9c40649
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/id-length.js
@@ -0,0 +1,116 @@
+/**
+ * @fileoverview Rule that warns when identifier names are shorter or longer
+ * than the values provided in configuration.
+ * @author Burak Yigit Kaya aka BYK
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce minimum and maximum identifier lengths",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ min: {
+ type: "number"
+ },
+ max: {
+ type: "number"
+ },
+ exceptions: {
+ type: "array",
+ uniqueItems: true,
+ items: {
+ type: "string"
+ }
+ },
+ properties: {
+ enum: ["always", "never"]
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+ const options = context.options[0] || {};
+ const minLength = typeof options.min !== "undefined" ? options.min : 2;
+ const maxLength = typeof options.max !== "undefined" ? options.max : Infinity;
+ const properties = options.properties !== "never";
+ const exceptions = (options.exceptions ? options.exceptions : [])
+ .reduce((obj, item) => {
+ obj[item] = true;
+
+ return obj;
+ }, {});
+
+ const SUPPORTED_EXPRESSIONS = {
+ MemberExpression: properties && function(parent) {
+ return !parent.computed && (
+
+ // regular property assignment
+ (parent.parent.left === parent && parent.parent.type === "AssignmentExpression" ||
+
+ // or the last identifier in an ObjectPattern destructuring
+ parent.parent.type === "Property" && parent.parent.value === parent &&
+ parent.parent.parent.type === "ObjectPattern" && parent.parent.parent.parent.left === parent.parent.parent)
+ );
+ },
+ AssignmentPattern(parent, node) {
+ return parent.left === node;
+ },
+ VariableDeclarator(parent, node) {
+ return parent.id === node;
+ },
+ Property: properties && function(parent, node) {
+ return parent.key === node;
+ },
+ ImportDefaultSpecifier: true,
+ RestElement: true,
+ FunctionExpression: true,
+ ArrowFunctionExpression: true,
+ ClassDeclaration: true,
+ FunctionDeclaration: true,
+ MethodDefinition: true,
+ CatchClause: true
+ };
+
+ return {
+ Identifier(node) {
+ const name = node.name;
+ const parent = node.parent;
+
+ const isShort = name.length < minLength;
+ const isLong = name.length > maxLength;
+
+ if (!(isShort || isLong) || exceptions[name]) {
+ return; // Nothing to report
+ }
+
+ const isValidExpression = SUPPORTED_EXPRESSIONS[parent.type];
+
+ if (isValidExpression && (isValidExpression === true || isValidExpression(parent, node))) {
+ context.report({
+ node,
+ message: isShort
+ ? "Identifier name '{{name}}' is too short (< {{min}})."
+ : "Identifier name '{{name}}' is too long (> {{max}}).",
+ data: { name, min: minLength, max: maxLength }
+ });
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/id-match.js b/tools/node_modules/eslint/lib/rules/id-match.js
new file mode 100644
index 0000000000..0420fdc74e
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/id-match.js
@@ -0,0 +1,144 @@
+/**
+ * @fileoverview Rule to flag non-matching identifiers
+ * @author Matthieu Larcher
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require identifiers to match a specified regular expression",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: [
+ {
+ type: "string"
+ },
+ {
+ type: "object",
+ properties: {
+ properties: {
+ type: "boolean"
+ }
+ }
+ }
+ ]
+ },
+
+ create(context) {
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ const pattern = context.options[0] || "^.+$",
+ regexp = new RegExp(pattern);
+
+ const options = context.options[1] || {},
+ properties = !!options.properties,
+ onlyDeclarations = !!options.onlyDeclarations;
+
+ /**
+ * Checks if a string matches the provided pattern
+ * @param {string} name The string to check.
+ * @returns {boolean} if the string is a match
+ * @private
+ */
+ function isInvalid(name) {
+ return !regexp.test(name);
+ }
+
+ /**
+ * Verifies if we should report an error or not based on the effective
+ * parent node and the identifier name.
+ * @param {ASTNode} effectiveParent The effective parent node of the node to be reported
+ * @param {string} name The identifier name of the identifier node
+ * @returns {boolean} whether an error should be reported or not
+ */
+ function shouldReport(effectiveParent, name) {
+ return effectiveParent.type !== "CallExpression" &&
+ effectiveParent.type !== "NewExpression" &&
+ isInvalid(name);
+ }
+
+ /**
+ * Reports an AST node as a rule violation.
+ * @param {ASTNode} node The node to report.
+ * @returns {void}
+ * @private
+ */
+ function report(node) {
+ context.report({
+ node,
+ message: "Identifier '{{name}}' does not match the pattern '{{pattern}}'.",
+ data: {
+ name: node.name,
+ pattern
+ }
+ });
+ }
+
+ return {
+
+ Identifier(node) {
+ const name = node.name,
+ parent = node.parent,
+ effectiveParent = (parent.type === "MemberExpression") ? parent.parent : parent;
+
+ if (parent.type === "MemberExpression") {
+
+ if (!properties) {
+ return;
+ }
+
+ // Always check object names
+ if (parent.object.type === "Identifier" &&
+ parent.object.name === name) {
+ if (isInvalid(name)) {
+ report(node);
+ }
+
+ // Report AssignmentExpressions only if they are the left side of the assignment
+ } else if (effectiveParent.type === "AssignmentExpression" &&
+ (effectiveParent.right.type !== "MemberExpression" ||
+ effectiveParent.left.type === "MemberExpression" &&
+ effectiveParent.left.property.name === name)) {
+ if (isInvalid(name)) {
+ report(node);
+ }
+ }
+
+ } else if (parent.type === "Property") {
+
+ if (!properties || parent.key.name !== name) {
+ return;
+ }
+
+ if (shouldReport(effectiveParent, name)) {
+ report(node);
+ }
+
+ } else {
+ const isDeclaration = effectiveParent.type === "FunctionDeclaration" || effectiveParent.type === "VariableDeclarator";
+
+ if (onlyDeclarations && !isDeclaration) {
+ return;
+ }
+
+ if (shouldReport(effectiveParent, name)) {
+ report(node);
+ }
+ }
+ }
+
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/implicit-arrow-linebreak.js b/tools/node_modules/eslint/lib/rules/implicit-arrow-linebreak.js
new file mode 100644
index 0000000000..b8802f4de5
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/implicit-arrow-linebreak.js
@@ -0,0 +1,86 @@
+/**
+ * @fileoverview enforce the location of arrow function bodies
+ * @author Sharmila Jesupaul
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce the location of arrow function bodies",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+ fixable: "whitespace",
+ schema: [
+ {
+ enum: ["beside", "below"]
+ }
+ ]
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+
+ //----------------------------------------------------------------------
+ // Helpers
+ //----------------------------------------------------------------------
+ /**
+ * Gets the applicable preference for a particular keyword
+ * @returns {string} The applicable option for the keyword, e.g. 'beside'
+ */
+ function getOption() {
+ return context.options[0] || "beside";
+ }
+
+ /**
+ * Validates the location of an arrow function body
+ * @param {ASTNode} node The arrow function body
+ * @param {string} keywordName The applicable keyword name for the arrow function body
+ * @returns {void}
+ */
+ function validateExpression(node) {
+ const option = getOption();
+
+ let tokenBefore = sourceCode.getTokenBefore(node.body);
+ const hasParens = tokenBefore.value === "(";
+
+ if (node.type === "BlockStatement") {
+ return;
+ }
+
+ let fixerTarget = node.body;
+
+ if (hasParens) {
+
+ // Gets the first token before the function body that is not an open paren
+ tokenBefore = sourceCode.getTokenBefore(node.body, token => token.value !== "(");
+ fixerTarget = sourceCode.getTokenAfter(tokenBefore);
+ }
+
+ if (tokenBefore.loc.end.line === fixerTarget.loc.start.line && option === "below") {
+ context.report({
+ node: fixerTarget,
+ message: "Expected a linebreak before this expression.",
+ fix: fixer => fixer.insertTextBefore(fixerTarget, "\n")
+ });
+ } else if (tokenBefore.loc.end.line !== fixerTarget.loc.start.line && option === "beside") {
+ context.report({
+ node: fixerTarget,
+ message: "Expected no linebreak before this expression.",
+ fix: fixer => fixer.replaceTextRange([tokenBefore.range[1], fixerTarget.range[0]], " ")
+ });
+ }
+ }
+
+ //----------------------------------------------------------------------
+ // Public
+ //----------------------------------------------------------------------
+ return {
+ ArrowFunctionExpression: node => validateExpression(node)
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/indent-legacy.js b/tools/node_modules/eslint/lib/rules/indent-legacy.js
new file mode 100644
index 0000000000..cf91406806
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/indent-legacy.js
@@ -0,0 +1,1137 @@
+/**
+ * @fileoverview This option sets a specific tab width for your code
+ *
+ * This rule has been ported and modified from nodeca.
+ * @author Vitaly Puzrin
+ * @author Gyandeep Singh
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+/* istanbul ignore next: this rule has known coverage issues, but it's deprecated and shouldn't be updated in the future anyway. */
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce consistent indentation",
+ category: "Stylistic Issues",
+ recommended: false,
+ replacedBy: ["indent"]
+ },
+
+ deprecated: true,
+
+ fixable: "whitespace",
+
+ schema: [
+ {
+ oneOf: [
+ {
+ enum: ["tab"]
+ },
+ {
+ type: "integer",
+ minimum: 0
+ }
+ ]
+ },
+ {
+ type: "object",
+ properties: {
+ SwitchCase: {
+ type: "integer",
+ minimum: 0
+ },
+ VariableDeclarator: {
+ oneOf: [
+ {
+ type: "integer",
+ minimum: 0
+ },
+ {
+ type: "object",
+ properties: {
+ var: {
+ type: "integer",
+ minimum: 0
+ },
+ let: {
+ type: "integer",
+ minimum: 0
+ },
+ const: {
+ type: "integer",
+ minimum: 0
+ }
+ }
+ }
+ ]
+ },
+ outerIIFEBody: {
+ type: "integer",
+ minimum: 0
+ },
+ MemberExpression: {
+ type: "integer",
+ minimum: 0
+ },
+ FunctionDeclaration: {
+ type: "object",
+ properties: {
+ parameters: {
+ oneOf: [
+ {
+ type: "integer",
+ minimum: 0
+ },
+ {
+ enum: ["first"]
+ }
+ ]
+ },
+ body: {
+ type: "integer",
+ minimum: 0
+ }
+ }
+ },
+ FunctionExpression: {
+ type: "object",
+ properties: {
+ parameters: {
+ oneOf: [
+ {
+ type: "integer",
+ minimum: 0
+ },
+ {
+ enum: ["first"]
+ }
+ ]
+ },
+ body: {
+ type: "integer",
+ minimum: 0
+ }
+ }
+ },
+ CallExpression: {
+ type: "object",
+ properties: {
+ parameters: {
+ oneOf: [
+ {
+ type: "integer",
+ minimum: 0
+ },
+ {
+ enum: ["first"]
+ }
+ ]
+ }
+ }
+ },
+ ArrayExpression: {
+ oneOf: [
+ {
+ type: "integer",
+ minimum: 0
+ },
+ {
+ enum: ["first"]
+ }
+ ]
+ },
+ ObjectExpression: {
+ oneOf: [
+ {
+ type: "integer",
+ minimum: 0
+ },
+ {
+ enum: ["first"]
+ }
+ ]
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+ const DEFAULT_VARIABLE_INDENT = 1;
+ const DEFAULT_PARAMETER_INDENT = null; // For backwards compatibility, don't check parameter indentation unless specified in the config
+ const DEFAULT_FUNCTION_BODY_INDENT = 1;
+
+ let indentType = "space";
+ let indentSize = 4;
+ const options = {
+ SwitchCase: 0,
+ VariableDeclarator: {
+ var: DEFAULT_VARIABLE_INDENT,
+ let: DEFAULT_VARIABLE_INDENT,
+ const: DEFAULT_VARIABLE_INDENT
+ },
+ outerIIFEBody: null,
+ FunctionDeclaration: {
+ parameters: DEFAULT_PARAMETER_INDENT,
+ body: DEFAULT_FUNCTION_BODY_INDENT
+ },
+ FunctionExpression: {
+ parameters: DEFAULT_PARAMETER_INDENT,
+ body: DEFAULT_FUNCTION_BODY_INDENT
+ },
+ CallExpression: {
+ arguments: DEFAULT_PARAMETER_INDENT
+ },
+ ArrayExpression: 1,
+ ObjectExpression: 1
+ };
+
+ const sourceCode = context.getSourceCode();
+
+ if (context.options.length) {
+ if (context.options[0] === "tab") {
+ indentSize = 1;
+ indentType = "tab";
+ } else /* istanbul ignore else : this will be caught by options validation */ if (typeof context.options[0] === "number") {
+ indentSize = context.options[0];
+ indentType = "space";
+ }
+
+ if (context.options[1]) {
+ const opts = context.options[1];
+
+ options.SwitchCase = opts.SwitchCase || 0;
+ const variableDeclaratorRules = opts.VariableDeclarator;
+
+ if (typeof variableDeclaratorRules === "number") {
+ options.VariableDeclarator = {
+ var: variableDeclaratorRules,
+ let: variableDeclaratorRules,
+ const: variableDeclaratorRules
+ };
+ } else if (typeof variableDeclaratorRules === "object") {
+ Object.assign(options.VariableDeclarator, variableDeclaratorRules);
+ }
+
+ if (typeof opts.outerIIFEBody === "number") {
+ options.outerIIFEBody = opts.outerIIFEBody;
+ }
+
+ if (typeof opts.MemberExpression === "number") {
+ options.MemberExpression = opts.MemberExpression;
+ }
+
+ if (typeof opts.FunctionDeclaration === "object") {
+ Object.assign(options.FunctionDeclaration, opts.FunctionDeclaration);
+ }
+
+ if (typeof opts.FunctionExpression === "object") {
+ Object.assign(options.FunctionExpression, opts.FunctionExpression);
+ }
+
+ if (typeof opts.CallExpression === "object") {
+ Object.assign(options.CallExpression, opts.CallExpression);
+ }
+
+ if (typeof opts.ArrayExpression === "number" || typeof opts.ArrayExpression === "string") {
+ options.ArrayExpression = opts.ArrayExpression;
+ }
+
+ if (typeof opts.ObjectExpression === "number" || typeof opts.ObjectExpression === "string") {
+ options.ObjectExpression = opts.ObjectExpression;
+ }
+ }
+ }
+
+ const caseIndentStore = {};
+
+ /**
+ * Creates an error message for a line, given the expected/actual indentation.
+ * @param {int} expectedAmount The expected amount of indentation characters for this line
+ * @param {int} actualSpaces The actual number of indentation spaces that were found on this line
+ * @param {int} actualTabs The actual number of indentation tabs that were found on this line
+ * @returns {string} An error message for this line
+ */
+ function createErrorMessage(expectedAmount, actualSpaces, actualTabs) {
+ const expectedStatement = `${expectedAmount} ${indentType}${expectedAmount === 1 ? "" : "s"}`; // e.g. "2 tabs"
+ const foundSpacesWord = `space${actualSpaces === 1 ? "" : "s"}`; // e.g. "space"
+ const foundTabsWord = `tab${actualTabs === 1 ? "" : "s"}`; // e.g. "tabs"
+ let foundStatement;
+
+ if (actualSpaces > 0 && actualTabs > 0) {
+ foundStatement = `${actualSpaces} ${foundSpacesWord} and ${actualTabs} ${foundTabsWord}`; // e.g. "1 space and 2 tabs"
+ } else if (actualSpaces > 0) {
+
+ /*
+ * Abbreviate the message if the expected indentation is also spaces.
+ * e.g. 'Expected 4 spaces but found 2' rather than 'Expected 4 spaces but found 2 spaces'
+ */
+ foundStatement = indentType === "space" ? actualSpaces : `${actualSpaces} ${foundSpacesWord}`;
+ } else if (actualTabs > 0) {
+ foundStatement = indentType === "tab" ? actualTabs : `${actualTabs} ${foundTabsWord}`;
+ } else {
+ foundStatement = "0";
+ }
+
+ return `Expected indentation of ${expectedStatement} but found ${foundStatement}.`;
+ }
+
+ /**
+ * Reports a given indent violation
+ * @param {ASTNode} node Node violating the indent rule
+ * @param {int} needed Expected indentation character count
+ * @param {int} gottenSpaces Indentation space count in the actual node/code
+ * @param {int} gottenTabs Indentation tab count in the actual node/code
+ * @param {Object=} loc Error line and column location
+ * @param {boolean} isLastNodeCheck Is the error for last node check
+ * @param {int} lastNodeCheckEndOffset Number of charecters to skip from the end
+ * @returns {void}
+ */
+ function report(node, needed, gottenSpaces, gottenTabs, loc, isLastNodeCheck) {
+ if (gottenSpaces && gottenTabs) {
+
+ // To avoid conflicts with `no-mixed-spaces-and-tabs`, don't report lines that have both spaces and tabs.
+ return;
+ }
+
+ const desiredIndent = (indentType === "space" ? " " : "\t").repeat(needed);
+
+ const textRange = isLastNodeCheck
+ ? [node.range[1] - node.loc.end.column, node.range[1] - node.loc.end.column + gottenSpaces + gottenTabs]
+ : [node.range[0] - node.loc.start.column, node.range[0] - node.loc.start.column + gottenSpaces + gottenTabs];
+
+ context.report({
+ node,
+ loc,
+ message: createErrorMessage(needed, gottenSpaces, gottenTabs),
+ fix: fixer => fixer.replaceTextRange(textRange, desiredIndent)
+ });
+ }
+
+ /**
+ * Get the actual indent of node
+ * @param {ASTNode|Token} node Node to examine
+ * @param {boolean} [byLastLine=false] get indent of node's last line
+ * @returns {Object} The node's indent. Contains keys `space` and `tab`, representing the indent of each character. Also
+ * contains keys `goodChar` and `badChar`, where `goodChar` is the amount of the user's desired indentation character, and
+ * `badChar` is the amount of the other indentation character.
+ */
+ function getNodeIndent(node, byLastLine) {
+ const token = byLastLine ? sourceCode.getLastToken(node) : sourceCode.getFirstToken(node);
+ const srcCharsBeforeNode = sourceCode.getText(token, token.loc.start.column).split("");
+ const indentChars = srcCharsBeforeNode.slice(0, srcCharsBeforeNode.findIndex(char => char !== " " && char !== "\t"));
+ const spaces = indentChars.filter(char => char === " ").length;
+ const tabs = indentChars.filter(char => char === "\t").length;
+
+ return {
+ space: spaces,
+ tab: tabs,
+ goodChar: indentType === "space" ? spaces : tabs,
+ badChar: indentType === "space" ? tabs : spaces
+ };
+ }
+
+ /**
+ * Checks node is the first in its own start line. By default it looks by start line.
+ * @param {ASTNode} node The node to check
+ * @param {boolean} [byEndLocation=false] Lookup based on start position or end
+ * @returns {boolean} true if its the first in the its start line
+ */
+ function isNodeFirstInLine(node, byEndLocation) {
+ const firstToken = byEndLocation === true ? sourceCode.getLastToken(node, 1) : sourceCode.getTokenBefore(node),
+ startLine = byEndLocation === true ? node.loc.end.line : node.loc.start.line,
+ endLine = firstToken ? firstToken.loc.end.line : -1;
+
+ return startLine !== endLine;
+ }
+
+ /**
+ * Check indent for node
+ * @param {ASTNode} node Node to check
+ * @param {int} neededIndent needed indent
+ * @param {boolean} [excludeCommas=false] skip comma on start of line
+ * @returns {void}
+ */
+ function checkNodeIndent(node, neededIndent) {
+ const actualIndent = getNodeIndent(node, false);
+
+ if (
+ node.type !== "ArrayExpression" &&
+ node.type !== "ObjectExpression" &&
+ (actualIndent.goodChar !== neededIndent || actualIndent.badChar !== 0) &&
+ isNodeFirstInLine(node)
+ ) {
+ report(node, neededIndent, actualIndent.space, actualIndent.tab);
+ }
+
+ if (node.type === "IfStatement" && node.alternate) {
+ const elseToken = sourceCode.getTokenBefore(node.alternate);
+
+ checkNodeIndent(elseToken, neededIndent);
+
+ if (!isNodeFirstInLine(node.alternate)) {
+ checkNodeIndent(node.alternate, neededIndent);
+ }
+ }
+
+ if (node.type === "TryStatement" && node.handler) {
+ const catchToken = sourceCode.getFirstToken(node.handler);
+
+ checkNodeIndent(catchToken, neededIndent);
+ }
+
+ if (node.type === "TryStatement" && node.finalizer) {
+ const finallyToken = sourceCode.getTokenBefore(node.finalizer);
+
+ checkNodeIndent(finallyToken, neededIndent);
+ }
+
+ if (node.type === "DoWhileStatement") {
+ const whileToken = sourceCode.getTokenAfter(node.body);
+
+ checkNodeIndent(whileToken, neededIndent);
+ }
+ }
+
+ /**
+ * Check indent for nodes list
+ * @param {ASTNode[]} nodes list of node objects
+ * @param {int} indent needed indent
+ * @param {boolean} [excludeCommas=false] skip comma on start of line
+ * @returns {void}
+ */
+ function checkNodesIndent(nodes, indent) {
+ nodes.forEach(node => checkNodeIndent(node, indent));
+ }
+
+ /**
+ * Check last node line indent this detects, that block closed correctly
+ * @param {ASTNode} node Node to examine
+ * @param {int} lastLineIndent needed indent
+ * @returns {void}
+ */
+ function checkLastNodeLineIndent(node, lastLineIndent) {
+ const lastToken = sourceCode.getLastToken(node);
+ const endIndent = getNodeIndent(lastToken, true);
+
+ if ((endIndent.goodChar !== lastLineIndent || endIndent.badChar !== 0) && isNodeFirstInLine(node, true)) {
+ report(
+ node,
+ lastLineIndent,
+ endIndent.space,
+ endIndent.tab,
+ { line: lastToken.loc.start.line, column: lastToken.loc.start.column },
+ true
+ );
+ }
+ }
+
+ /**
+ * Check last node line indent this detects, that block closed correctly
+ * This function for more complicated return statement case, where closing parenthesis may be followed by ';'
+ * @param {ASTNode} node Node to examine
+ * @param {int} firstLineIndent first line needed indent
+ * @returns {void}
+ */
+ function checkLastReturnStatementLineIndent(node, firstLineIndent) {
+
+ /*
+ * in case if return statement ends with ');' we have traverse back to ')'
+ * otherwise we'll measure indent for ';' and replace ')'
+ */
+ const lastToken = sourceCode.getLastToken(node, astUtils.isClosingParenToken);
+ const textBeforeClosingParenthesis = sourceCode.getText(lastToken, lastToken.loc.start.column).slice(0, -1);
+
+ if (textBeforeClosingParenthesis.trim()) {
+
+ // There are tokens before the closing paren, don't report this case
+ return;
+ }
+
+ const endIndent = getNodeIndent(lastToken, true);
+
+ if (endIndent.goodChar !== firstLineIndent) {
+ report(
+ node,
+ firstLineIndent,
+ endIndent.space,
+ endIndent.tab,
+ { line: lastToken.loc.start.line, column: lastToken.loc.start.column },
+ true
+ );
+ }
+ }
+
+ /**
+ * Check first node line indent is correct
+ * @param {ASTNode} node Node to examine
+ * @param {int} firstLineIndent needed indent
+ * @returns {void}
+ */
+ function checkFirstNodeLineIndent(node, firstLineIndent) {
+ const startIndent = getNodeIndent(node, false);
+
+ if ((startIndent.goodChar !== firstLineIndent || startIndent.badChar !== 0) && isNodeFirstInLine(node)) {
+ report(
+ node,
+ firstLineIndent,
+ startIndent.space,
+ startIndent.tab,
+ { line: node.loc.start.line, column: node.loc.start.column }
+ );
+ }
+ }
+
+ /**
+ * Returns a parent node of given node based on a specified type
+ * if not present then return null
+ * @param {ASTNode} node node to examine
+ * @param {string} type type that is being looked for
+ * @param {string} stopAtList end points for the evaluating code
+ * @returns {ASTNode|void} if found then node otherwise null
+ */
+ function getParentNodeByType(node, type, stopAtList) {
+ let parent = node.parent;
+
+ if (!stopAtList) {
+ stopAtList = ["Program"];
+ }
+
+ while (parent.type !== type && stopAtList.indexOf(parent.type) === -1 && parent.type !== "Program") {
+ parent = parent.parent;
+ }
+
+ return parent.type === type ? parent : null;
+ }
+
+ /**
+ * Returns the VariableDeclarator based on the current node
+ * if not present then return null
+ * @param {ASTNode} node node to examine
+ * @returns {ASTNode|void} if found then node otherwise null
+ */
+ function getVariableDeclaratorNode(node) {
+ return getParentNodeByType(node, "VariableDeclarator");
+ }
+
+ /**
+ * Check to see if the node is part of the multi-line variable declaration.
+ * Also if its on the same line as the varNode
+ * @param {ASTNode} node node to check
+ * @param {ASTNode} varNode variable declaration node to check against
+ * @returns {boolean} True if all the above condition satisfy
+ */
+ function isNodeInVarOnTop(node, varNode) {
+ return varNode &&
+ varNode.parent.loc.start.line === node.loc.start.line &&
+ varNode.parent.declarations.length > 1;
+ }
+
+ /**
+ * Check to see if the argument before the callee node is multi-line and
+ * there should only be 1 argument before the callee node
+ * @param {ASTNode} node node to check
+ * @returns {boolean} True if arguments are multi-line
+ */
+ function isArgBeforeCalleeNodeMultiline(node) {
+ const parent = node.parent;
+
+ if (parent.arguments.length >= 2 && parent.arguments[1] === node) {
+ return parent.arguments[0].loc.end.line > parent.arguments[0].loc.start.line;
+ }
+
+ return false;
+ }
+
+ /**
+ * Check to see if the node is a file level IIFE
+ * @param {ASTNode} node The function node to check.
+ * @returns {boolean} True if the node is the outer IIFE
+ */
+ function isOuterIIFE(node) {
+ const parent = node.parent;
+ let stmt = parent.parent;
+
+ /*
+ * Verify that the node is an IIEF
+ */
+ if (
+ parent.type !== "CallExpression" ||
+ parent.callee !== node) {
+
+ return false;
+ }
+
+ /*
+ * Navigate legal ancestors to determine whether this IIEF is outer
+ */
+ while (
+ stmt.type === "UnaryExpression" && (
+ stmt.operator === "!" ||
+ stmt.operator === "~" ||
+ stmt.operator === "+" ||
+ stmt.operator === "-") ||
+ stmt.type === "AssignmentExpression" ||
+ stmt.type === "LogicalExpression" ||
+ stmt.type === "SequenceExpression" ||
+ stmt.type === "VariableDeclarator") {
+
+ stmt = stmt.parent;
+ }
+
+ return ((
+ stmt.type === "ExpressionStatement" ||
+ stmt.type === "VariableDeclaration") &&
+ stmt.parent && stmt.parent.type === "Program"
+ );
+ }
+
+ /**
+ * Check indent for function block content
+ * @param {ASTNode} node A BlockStatement node that is inside of a function.
+ * @returns {void}
+ */
+ function checkIndentInFunctionBlock(node) {
+
+ /*
+ * Search first caller in chain.
+ * Ex.:
+ *
+ * Models <- Identifier
+ * .User
+ * .find()
+ * .exec(function() {
+ * // function body
+ * });
+ *
+ * Looks for 'Models'
+ */
+ const calleeNode = node.parent; // FunctionExpression
+ let indent;
+
+ if (calleeNode.parent &&
+ (calleeNode.parent.type === "Property" ||
+ calleeNode.parent.type === "ArrayExpression")) {
+
+ // If function is part of array or object, comma can be put at left
+ indent = getNodeIndent(calleeNode, false).goodChar;
+ } else {
+
+ // If function is standalone, simple calculate indent
+ indent = getNodeIndent(calleeNode).goodChar;
+ }
+
+ if (calleeNode.parent.type === "CallExpression") {
+ const calleeParent = calleeNode.parent;
+
+ if (calleeNode.type !== "FunctionExpression" && calleeNode.type !== "ArrowFunctionExpression") {
+ if (calleeParent && calleeParent.loc.start.line < node.loc.start.line) {
+ indent = getNodeIndent(calleeParent).goodChar;
+ }
+ } else {
+ if (isArgBeforeCalleeNodeMultiline(calleeNode) &&
+ calleeParent.callee.loc.start.line === calleeParent.callee.loc.end.line &&
+ !isNodeFirstInLine(calleeNode)) {
+ indent = getNodeIndent(calleeParent).goodChar;
+ }
+ }
+ }
+
+ /*
+ * function body indent should be indent + indent size, unless this
+ * is a FunctionDeclaration, FunctionExpression, or outer IIFE and the corresponding options are enabled.
+ */
+ let functionOffset = indentSize;
+
+ if (options.outerIIFEBody !== null && isOuterIIFE(calleeNode)) {
+ functionOffset = options.outerIIFEBody * indentSize;
+ } else if (calleeNode.type === "FunctionExpression") {
+ functionOffset = options.FunctionExpression.body * indentSize;
+ } else if (calleeNode.type === "FunctionDeclaration") {
+ functionOffset = options.FunctionDeclaration.body * indentSize;
+ }
+ indent += functionOffset;
+
+ // check if the node is inside a variable
+ const parentVarNode = getVariableDeclaratorNode(node);
+
+ if (parentVarNode && isNodeInVarOnTop(node, parentVarNode)) {
+ indent += indentSize * options.VariableDeclarator[parentVarNode.parent.kind];
+ }
+
+ if (node.body.length > 0) {
+ checkNodesIndent(node.body, indent);
+ }
+
+ checkLastNodeLineIndent(node, indent - functionOffset);
+ }
+
+
+ /**
+ * Checks if the given node starts and ends on the same line
+ * @param {ASTNode} node The node to check
+ * @returns {boolean} Whether or not the block starts and ends on the same line.
+ */
+ function isSingleLineNode(node) {
+ const lastToken = sourceCode.getLastToken(node),
+ startLine = node.loc.start.line,
+ endLine = lastToken.loc.end.line;
+
+ return startLine === endLine;
+ }
+
+ /**
+ * Check to see if the first element inside an array is an object and on the same line as the node
+ * If the node is not an array then it will return false.
+ * @param {ASTNode} node node to check
+ * @returns {boolean} success/failure
+ */
+ function isFirstArrayElementOnSameLine(node) {
+ if (node.type === "ArrayExpression" && node.elements[0]) {
+ return node.elements[0].loc.start.line === node.loc.start.line && node.elements[0].type === "ObjectExpression";
+ }
+ return false;
+
+ }
+
+ /**
+ * Check indent for array block content or object block content
+ * @param {ASTNode} node node to examine
+ * @returns {void}
+ */
+ function checkIndentInArrayOrObjectBlock(node) {
+
+ // Skip inline
+ if (isSingleLineNode(node)) {
+ return;
+ }
+
+ let elements = (node.type === "ArrayExpression") ? node.elements : node.properties;
+
+ // filter out empty elements example would be [ , 2] so remove first element as espree considers it as null
+ elements = elements.filter(elem => elem !== null);
+
+ let nodeIndent;
+ let elementsIndent;
+ const parentVarNode = getVariableDeclaratorNode(node);
+
+ // TODO - come up with a better strategy in future
+ if (isNodeFirstInLine(node)) {
+ const parent = node.parent;
+
+ nodeIndent = getNodeIndent(parent).goodChar;
+ if (!parentVarNode || parentVarNode.loc.start.line !== node.loc.start.line) {
+ if (parent.type !== "VariableDeclarator" || parentVarNode === parentVarNode.parent.declarations[0]) {
+ if (parent.type === "VariableDeclarator" && parentVarNode.loc.start.line === parent.loc.start.line) {
+ nodeIndent += (indentSize * options.VariableDeclarator[parentVarNode.parent.kind]);
+ } else if (parent.type === "ObjectExpression" || parent.type === "ArrayExpression") {
+ const parentElements = node.parent.type === "ObjectExpression" ? node.parent.properties : node.parent.elements;
+
+ if (parentElements[0] &&
+ parentElements[0].loc.start.line === parent.loc.start.line &&
+ parentElements[0].loc.end.line !== parent.loc.start.line) {
+
+ /*
+ * If the first element of the array spans multiple lines, don't increase the expected indentation of the rest.
+ * e.g. [{
+ * foo: 1
+ * },
+ * {
+ * bar: 1
+ * }]
+ * the second object is not indented.
+ */
+ } else if (typeof options[parent.type] === "number") {
+ nodeIndent += options[parent.type] * indentSize;
+ } else {
+ nodeIndent = parentElements[0].loc.start.column;
+ }
+ } else if (parent.type === "CallExpression" || parent.type === "NewExpression") {
+ if (typeof options.CallExpression.arguments === "number") {
+ nodeIndent += options.CallExpression.arguments * indentSize;
+ } else if (options.CallExpression.arguments === "first") {
+ if (parent.arguments.indexOf(node) !== -1) {
+ nodeIndent = parent.arguments[0].loc.start.column;
+ }
+ } else {
+ nodeIndent += indentSize;
+ }
+ } else if (parent.type === "LogicalExpression" || parent.type === "ArrowFunctionExpression") {
+ nodeIndent += indentSize;
+ }
+ }
+ } else if (!parentVarNode && !isFirstArrayElementOnSameLine(parent) && parent.type !== "MemberExpression" && parent.type !== "ExpressionStatement" && parent.type !== "AssignmentExpression" && parent.type !== "Property") {
+ nodeIndent += indentSize;
+ }
+
+ checkFirstNodeLineIndent(node, nodeIndent);
+ } else {
+ nodeIndent = getNodeIndent(node).goodChar;
+ }
+
+ if (options[node.type] === "first") {
+ elementsIndent = elements.length ? elements[0].loc.start.column : 0; // If there are no elements, elementsIndent doesn't matter.
+ } else {
+ elementsIndent = nodeIndent + indentSize * options[node.type];
+ }
+
+ /*
+ * Check if the node is a multiple variable declaration; if so, then
+ * make sure indentation takes that into account.
+ */
+ if (isNodeInVarOnTop(node, parentVarNode)) {
+ elementsIndent += indentSize * options.VariableDeclarator[parentVarNode.parent.kind];
+ }
+
+ checkNodesIndent(elements, elementsIndent);
+
+ if (elements.length > 0) {
+
+ // Skip last block line check if last item in same line
+ if (elements[elements.length - 1].loc.end.line === node.loc.end.line) {
+ return;
+ }
+ }
+
+ checkLastNodeLineIndent(node, nodeIndent +
+ (isNodeInVarOnTop(node, parentVarNode) ? options.VariableDeclarator[parentVarNode.parent.kind] * indentSize : 0));
+ }
+
+ /**
+ * Check if the node or node body is a BlockStatement or not
+ * @param {ASTNode} node node to test
+ * @returns {boolean} True if it or its body is a block statement
+ */
+ function isNodeBodyBlock(node) {
+ return node.type === "BlockStatement" || node.type === "ClassBody" || (node.body && node.body.type === "BlockStatement") ||
+ (node.consequent && node.consequent.type === "BlockStatement");
+ }
+
+ /**
+ * Check indentation for blocks
+ * @param {ASTNode} node node to check
+ * @returns {void}
+ */
+ function blockIndentationCheck(node) {
+
+ // Skip inline blocks
+ if (isSingleLineNode(node)) {
+ return;
+ }
+
+ if (node.parent && (
+ node.parent.type === "FunctionExpression" ||
+ node.parent.type === "FunctionDeclaration" ||
+ node.parent.type === "ArrowFunctionExpression")
+ ) {
+ checkIndentInFunctionBlock(node);
+ return;
+ }
+
+ let indent;
+ let nodesToCheck = [];
+
+ /*
+ * For this statements we should check indent from statement beginning,
+ * not from the beginning of the block.
+ */
+ const statementsWithProperties = [
+ "IfStatement", "WhileStatement", "ForStatement", "ForInStatement", "ForOfStatement", "DoWhileStatement", "ClassDeclaration", "TryStatement"
+ ];
+
+ if (node.parent && statementsWithProperties.indexOf(node.parent.type) !== -1 && isNodeBodyBlock(node)) {
+ indent = getNodeIndent(node.parent).goodChar;
+ } else if (node.parent && node.parent.type === "CatchClause") {
+ indent = getNodeIndent(node.parent.parent).goodChar;
+ } else {
+ indent = getNodeIndent(node).goodChar;
+ }
+
+ if (node.type === "IfStatement" && node.consequent.type !== "BlockStatement") {
+ nodesToCheck = [node.consequent];
+ } else if (Array.isArray(node.body)) {
+ nodesToCheck = node.body;
+ } else {
+ nodesToCheck = [node.body];
+ }
+
+ if (nodesToCheck.length > 0) {
+ checkNodesIndent(nodesToCheck, indent + indentSize);
+ }
+
+ if (node.type === "BlockStatement") {
+ checkLastNodeLineIndent(node, indent);
+ }
+ }
+
+ /**
+ * Filter out the elements which are on the same line of each other or the node.
+ * basically have only 1 elements from each line except the variable declaration line.
+ * @param {ASTNode} node Variable declaration node
+ * @returns {ASTNode[]} Filtered elements
+ */
+ function filterOutSameLineVars(node) {
+ return node.declarations.reduce((finalCollection, elem) => {
+ const lastElem = finalCollection[finalCollection.length - 1];
+
+ if ((elem.loc.start.line !== node.loc.start.line && !lastElem) ||
+ (lastElem && lastElem.loc.start.line !== elem.loc.start.line)) {
+ finalCollection.push(elem);
+ }
+
+ return finalCollection;
+ }, []);
+ }
+
+ /**
+ * Check indentation for variable declarations
+ * @param {ASTNode} node node to examine
+ * @returns {void}
+ */
+ function checkIndentInVariableDeclarations(node) {
+ const elements = filterOutSameLineVars(node);
+ const nodeIndent = getNodeIndent(node).goodChar;
+ const lastElement = elements[elements.length - 1];
+
+ const elementsIndent = nodeIndent + indentSize * options.VariableDeclarator[node.kind];
+
+ checkNodesIndent(elements, elementsIndent);
+
+ // Only check the last line if there is any token after the last item
+ if (sourceCode.getLastToken(node).loc.end.line <= lastElement.loc.end.line) {
+ return;
+ }
+
+ const tokenBeforeLastElement = sourceCode.getTokenBefore(lastElement);
+
+ if (tokenBeforeLastElement.value === ",") {
+
+ // Special case for comma-first syntax where the semicolon is indented
+ checkLastNodeLineIndent(node, getNodeIndent(tokenBeforeLastElement).goodChar);
+ } else {
+ checkLastNodeLineIndent(node, elementsIndent - indentSize);
+ }
+ }
+
+ /**
+ * Check and decide whether to check for indentation for blockless nodes
+ * Scenarios are for or while statements without braces around them
+ * @param {ASTNode} node node to examine
+ * @returns {void}
+ */
+ function blockLessNodes(node) {
+ if (node.body.type !== "BlockStatement") {
+ blockIndentationCheck(node);
+ }
+ }
+
+ /**
+ * Returns the expected indentation for the case statement
+ * @param {ASTNode} node node to examine
+ * @param {int} [switchIndent] indent for switch statement
+ * @returns {int} indent size
+ */
+ function expectedCaseIndent(node, switchIndent) {
+ const switchNode = (node.type === "SwitchStatement") ? node : node.parent;
+ let caseIndent;
+
+ if (caseIndentStore[switchNode.loc.start.line]) {
+ return caseIndentStore[switchNode.loc.start.line];
+ }
+ if (typeof switchIndent === "undefined") {
+ switchIndent = getNodeIndent(switchNode).goodChar;
+ }
+
+ if (switchNode.cases.length > 0 && options.SwitchCase === 0) {
+ caseIndent = switchIndent;
+ } else {
+ caseIndent = switchIndent + (indentSize * options.SwitchCase);
+ }
+
+ caseIndentStore[switchNode.loc.start.line] = caseIndent;
+ return caseIndent;
+
+ }
+
+ /**
+ * Checks wether a return statement is wrapped in ()
+ * @param {ASTNode} node node to examine
+ * @returns {boolean} the result
+ */
+ function isWrappedInParenthesis(node) {
+ const regex = /^return\s*?\(\s*?\);*?/;
+
+ const statementWithoutArgument = sourceCode.getText(node).replace(
+ sourceCode.getText(node.argument), ""
+ );
+
+ return regex.test(statementWithoutArgument);
+ }
+
+ return {
+ Program(node) {
+ if (node.body.length > 0) {
+
+ // Root nodes should have no indent
+ checkNodesIndent(node.body, getNodeIndent(node).goodChar);
+ }
+ },
+
+ ClassBody: blockIndentationCheck,
+
+ BlockStatement: blockIndentationCheck,
+
+ WhileStatement: blockLessNodes,
+
+ ForStatement: blockLessNodes,
+
+ ForInStatement: blockLessNodes,
+
+ ForOfStatement: blockLessNodes,
+
+ DoWhileStatement: blockLessNodes,
+
+ IfStatement(node) {
+ if (node.consequent.type !== "BlockStatement" && node.consequent.loc.start.line > node.loc.start.line) {
+ blockIndentationCheck(node);
+ }
+ },
+
+ VariableDeclaration(node) {
+ if (node.declarations[node.declarations.length - 1].loc.start.line > node.declarations[0].loc.start.line) {
+ checkIndentInVariableDeclarations(node);
+ }
+ },
+
+ ObjectExpression(node) {
+ checkIndentInArrayOrObjectBlock(node);
+ },
+
+ ArrayExpression(node) {
+ checkIndentInArrayOrObjectBlock(node);
+ },
+
+ MemberExpression(node) {
+
+ if (typeof options.MemberExpression === "undefined") {
+ return;
+ }
+
+ if (isSingleLineNode(node)) {
+ return;
+ }
+
+ /*
+ * The typical layout of variable declarations and assignments
+ * alter the expectation of correct indentation. Skip them.
+ * TODO: Add appropriate configuration options for variable
+ * declarations and assignments.
+ */
+ if (getParentNodeByType(node, "VariableDeclarator", ["FunctionExpression", "ArrowFunctionExpression"])) {
+ return;
+ }
+
+ if (getParentNodeByType(node, "AssignmentExpression", ["FunctionExpression"])) {
+ return;
+ }
+
+ const propertyIndent = getNodeIndent(node).goodChar + indentSize * options.MemberExpression;
+
+ const checkNodes = [node.property];
+
+ const dot = sourceCode.getTokenBefore(node.property);
+
+ if (dot.type === "Punctuator" && dot.value === ".") {
+ checkNodes.push(dot);
+ }
+
+ checkNodesIndent(checkNodes, propertyIndent);
+ },
+
+ SwitchStatement(node) {
+
+ // Switch is not a 'BlockStatement'
+ const switchIndent = getNodeIndent(node).goodChar;
+ const caseIndent = expectedCaseIndent(node, switchIndent);
+
+ checkNodesIndent(node.cases, caseIndent);
+
+
+ checkLastNodeLineIndent(node, switchIndent);
+ },
+
+ SwitchCase(node) {
+
+ // Skip inline cases
+ if (isSingleLineNode(node)) {
+ return;
+ }
+ const caseIndent = expectedCaseIndent(node);
+
+ checkNodesIndent(node.consequent, caseIndent + indentSize);
+ },
+
+ FunctionDeclaration(node) {
+ if (isSingleLineNode(node)) {
+ return;
+ }
+ if (options.FunctionDeclaration.parameters === "first" && node.params.length) {
+ checkNodesIndent(node.params.slice(1), node.params[0].loc.start.column);
+ } else if (options.FunctionDeclaration.parameters !== null) {
+ checkNodesIndent(node.params, getNodeIndent(node).goodChar + indentSize * options.FunctionDeclaration.parameters);
+ }
+ },
+
+ FunctionExpression(node) {
+ if (isSingleLineNode(node)) {
+ return;
+ }
+ if (options.FunctionExpression.parameters === "first" && node.params.length) {
+ checkNodesIndent(node.params.slice(1), node.params[0].loc.start.column);
+ } else if (options.FunctionExpression.parameters !== null) {
+ checkNodesIndent(node.params, getNodeIndent(node).goodChar + indentSize * options.FunctionExpression.parameters);
+ }
+ },
+
+ ReturnStatement(node) {
+ if (isSingleLineNode(node)) {
+ return;
+ }
+
+ const firstLineIndent = getNodeIndent(node).goodChar;
+
+ // in case if return statement is wrapped in parenthesis
+ if (isWrappedInParenthesis(node)) {
+ checkLastReturnStatementLineIndent(node, firstLineIndent);
+ } else {
+ checkNodeIndent(node, firstLineIndent);
+ }
+ },
+
+ CallExpression(node) {
+ if (isSingleLineNode(node)) {
+ return;
+ }
+ if (options.CallExpression.arguments === "first" && node.arguments.length) {
+ checkNodesIndent(node.arguments.slice(1), node.arguments[0].loc.start.column);
+ } else if (options.CallExpression.arguments !== null) {
+ checkNodesIndent(node.arguments, getNodeIndent(node).goodChar + indentSize * options.CallExpression.arguments);
+ }
+ }
+
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/indent.js b/tools/node_modules/eslint/lib/rules/indent.js
new file mode 100644
index 0000000000..42cebf9ea5
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/indent.js
@@ -0,0 +1,1522 @@
+/**
+ * @fileoverview This option sets a specific tab width for your code
+ *
+ * @author Teddy Katz
+ * @author Vitaly Puzrin
+ * @author Gyandeep Singh
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const lodash = require("lodash");
+const astUtils = require("../ast-utils");
+const createTree = require("functional-red-black-tree");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+const KNOWN_NODES = new Set([
+ "AssignmentExpression",
+ "AssignmentPattern",
+ "ArrayExpression",
+ "ArrayPattern",
+ "ArrowFunctionExpression",
+ "AwaitExpression",
+ "BlockStatement",
+ "BinaryExpression",
+ "BreakStatement",
+ "CallExpression",
+ "CatchClause",
+ "ClassBody",
+ "ClassDeclaration",
+ "ClassExpression",
+ "ConditionalExpression",
+ "ContinueStatement",
+ "DoWhileStatement",
+ "DebuggerStatement",
+ "EmptyStatement",
+ "ExperimentalRestProperty",
+ "ExperimentalSpreadProperty",
+ "ExpressionStatement",
+ "ForStatement",
+ "ForInStatement",
+ "ForOfStatement",
+ "FunctionDeclaration",
+ "FunctionExpression",
+ "Identifier",
+ "IfStatement",
+ "Literal",
+ "LabeledStatement",
+ "LogicalExpression",
+ "MemberExpression",
+ "MetaProperty",
+ "MethodDefinition",
+ "NewExpression",
+ "ObjectExpression",
+ "ObjectPattern",
+ "Program",
+ "Property",
+ "RestElement",
+ "ReturnStatement",
+ "SequenceExpression",
+ "SpreadElement",
+ "Super",
+ "SwitchCase",
+ "SwitchStatement",
+ "TaggedTemplateExpression",
+ "TemplateElement",
+ "TemplateLiteral",
+ "ThisExpression",
+ "ThrowStatement",
+ "TryStatement",
+ "UnaryExpression",
+ "UpdateExpression",
+ "VariableDeclaration",
+ "VariableDeclarator",
+ "WhileStatement",
+ "WithStatement",
+ "YieldExpression",
+ "JSXIdentifier",
+ "JSXNamespacedName",
+ "JSXMemberExpression",
+ "JSXEmptyExpression",
+ "JSXExpressionContainer",
+ "JSXElement",
+ "JSXClosingElement",
+ "JSXOpeningElement",
+ "JSXAttribute",
+ "JSXSpreadAttribute",
+ "JSXText",
+ "ExportDefaultDeclaration",
+ "ExportNamedDeclaration",
+ "ExportAllDeclaration",
+ "ExportSpecifier",
+ "ImportDeclaration",
+ "ImportSpecifier",
+ "ImportDefaultSpecifier",
+ "ImportNamespaceSpecifier"
+]);
+
+/*
+ * General rule strategy:
+ * 1. An OffsetStorage instance stores a map of desired offsets, where each token has a specified offset from another
+ * specified token or to the first column.
+ * 2. As the AST is traversed, modify the desired offsets of tokens accordingly. For example, when entering a
+ * BlockStatement, offset all of the tokens in the BlockStatement by 1 indent level from the opening curly
+ * brace of the BlockStatement.
+ * 3. After traversing the AST, calculate the expected indentation levels of every token according to the
+ * OffsetStorage container.
+ * 4. For each line, compare the expected indentation of the first token to the actual indentation in the file,
+ * and report the token if the two values are not equal.
+ */
+
+
+/**
+ * A mutable balanced binary search tree that stores (key, value) pairs. The keys are numeric, and must be unique.
+ * This is intended to be a generic wrapper around a balanced binary search tree library, so that the underlying implementation
+ * can easily be swapped out.
+ */
+class BinarySearchTree {
+
+ /**
+ * Creates an empty tree
+ */
+ constructor() {
+ this._rbTree = createTree();
+ }
+
+ /**
+ * Inserts an entry into the tree.
+ * @param {number} key The entry's key
+ * @param {*} value The entry's value
+ * @returns {void}
+ */
+ insert(key, value) {
+ const iterator = this._rbTree.find(key);
+
+ if (iterator.valid) {
+ this._rbTree = iterator.update(value);
+ } else {
+ this._rbTree = this._rbTree.insert(key, value);
+ }
+ }
+
+ /**
+ * Finds the entry with the largest key less than or equal to the provided key
+ * @param {number} key The provided key
+ * @returns {{key: number, value: *}|null} The found entry, or null if no such entry exists.
+ */
+ findLe(key) {
+ const iterator = this._rbTree.le(key);
+
+ return iterator && { key: iterator.key, value: iterator.value };
+ }
+
+ /**
+ * Deletes all of the keys in the interval [start, end)
+ * @param {number} start The start of the range
+ * @param {number} end The end of the range
+ * @returns {void}
+ */
+ deleteRange(start, end) {
+
+ // Exit without traversing the tree if the range has zero size.
+ if (start === end) {
+ return;
+ }
+ const iterator = this._rbTree.ge(start);
+
+ while (iterator.valid && iterator.key < end) {
+ this._rbTree = this._rbTree.remove(iterator.key);
+ iterator.next();
+ }
+ }
+}
+
+/**
+ * A helper class to get token-based info related to indentation
+ */
+class TokenInfo {
+
+ /**
+ * @param {SourceCode} sourceCode A SourceCode object
+ */
+ constructor(sourceCode) {
+ this.sourceCode = sourceCode;
+ this.firstTokensByLineNumber = sourceCode.tokensAndComments.reduce((map, token) => {
+ if (!map.has(token.loc.start.line)) {
+ map.set(token.loc.start.line, token);
+ }
+ if (!map.has(token.loc.end.line) && sourceCode.text.slice(token.range[1] - token.loc.end.column, token.range[1]).trim()) {
+ map.set(token.loc.end.line, token);
+ }
+ return map;
+ }, new Map());
+ }
+
+ /**
+ * Gets the first token on a given token's line
+ * @param {Token|ASTNode} token a node or token
+ * @returns {Token} The first token on the given line
+ */
+ getFirstTokenOfLine(token) {
+ return this.firstTokensByLineNumber.get(token.loc.start.line);
+ }
+
+ /**
+ * Determines whether a token is the first token in its line
+ * @param {Token} token The token
+ * @returns {boolean} `true` if the token is the first on its line
+ */
+ isFirstTokenOfLine(token) {
+ return this.getFirstTokenOfLine(token) === token;
+ }
+
+ /**
+ * Get the actual indent of a token
+ * @param {Token} token Token to examine. This should be the first token on its line.
+ * @returns {string} The indentation characters that precede the token
+ */
+ getTokenIndent(token) {
+ return this.sourceCode.text.slice(token.range[0] - token.loc.start.column, token.range[0]);
+ }
+}
+
+/**
+ * A class to store information on desired offsets of tokens from each other
+ */
+class OffsetStorage {
+
+ /**
+ * @param {TokenInfo} tokenInfo a TokenInfo instance
+ * @param {number} indentSize The desired size of each indentation level
+ * @param {string} indentType The indentation character
+ */
+ constructor(tokenInfo, indentSize, indentType) {
+ this._tokenInfo = tokenInfo;
+ this._indentSize = indentSize;
+ this._indentType = indentType;
+
+ this._tree = new BinarySearchTree();
+ this._tree.insert(0, { offset: 0, from: null, force: false });
+
+ this._lockedFirstTokens = new WeakMap();
+ this._desiredIndentCache = new WeakMap();
+ this._ignoredTokens = new WeakSet();
+ }
+
+ _getOffsetDescriptor(token) {
+ return this._tree.findLe(token.range[0]).value;
+ }
+
+ /**
+ * Sets the offset column of token B to match the offset column of token A.
+ * **WARNING**: This matches a *column*, even if baseToken is not the first token on its line. In
+ * most cases, `setDesiredOffset` should be used instead.
+ * @param {Token} baseToken The first token
+ * @param {Token} offsetToken The second token, whose offset should be matched to the first token
+ * @returns {void}
+ */
+ matchOffsetOf(baseToken, offsetToken) {
+
+ /*
+ * lockedFirstTokens is a map from a token whose indentation is controlled by the "first" option to
+ * the token that it depends on. For example, with the `ArrayExpression: first` option, the first
+ * token of each element in the array after the first will be mapped to the first token of the first
+ * element. The desired indentation of each of these tokens is computed based on the desired indentation
+ * of the "first" element, rather than through the normal offset mechanism.
+ */
+ this._lockedFirstTokens.set(offsetToken, baseToken);
+ }
+
+ /**
+ * Sets the desired offset of a token.
+ *
+ * This uses a line-based offset collapsing behavior to handle tokens on the same line.
+ * For example, consider the following two cases:
+ *
+ * (
+ * [
+ * bar
+ * ]
+ * )
+ *
+ * ([
+ * bar
+ * ])
+ *
+ * Based on the first case, it's clear that the `bar` token needs to have an offset of 1 indent level (4 spaces) from
+ * the `[` token, and the `[` token has to have an offset of 1 indent level from the `(` token. Since the `(` token is
+ * the first on its line (with an indent of 0 spaces), the `bar` token needs to be offset by 2 indent levels (8 spaces)
+ * from the start of its line.
+ *
+ * However, in the second case `bar` should only be indented by 4 spaces. This is because the offset of 1 indent level
+ * between the `(` and the `[` tokens gets "collapsed" because the two tokens are on the same line. As a result, the
+ * `(` token is mapped to the `[` token with an offset of 0, and the rule correctly decides that `bar` should be indented
+ * by 1 indent level from the start of the line.
+ *
+ * This is useful because rule listeners can usually just call `setDesiredOffset` for all the tokens in the node,
+ * without needing to check which lines those tokens are on.
+ *
+ * Note that since collapsing only occurs when two tokens are on the same line, there are a few cases where non-intuitive
+ * behavior can occur. For example, consider the following cases:
+ *
+ * foo(
+ * ).
+ * bar(
+ * baz
+ * )
+ *
+ * foo(
+ * ).bar(
+ * baz
+ * )
+ *
+ * Based on the first example, it would seem that `bar` should be offset by 1 indent level from `foo`, and `baz`
+ * should be offset by 1 indent level from `bar`. However, this is not correct, because it would result in `baz`
+ * being indented by 2 indent levels in the second case (since `foo`, `bar`, and `baz` are all on separate lines, no
+ * collapsing would occur).
+ *
+ * Instead, the correct way would be to offset `baz` by 1 level from `bar`, offset `bar` by 1 level from the `)`, and
+ * offset the `)` by 0 levels from `foo`. This ensures that the offset between `bar` and the `)` are correctly collapsed
+ * in the second case.
+ *
+ * @param {Token} token The token
+ * @param {Token} fromToken The token that `token` should be offset from
+ * @param {number} offset The desired indent level
+ * @returns {void}
+ */
+ setDesiredOffset(token, fromToken, offset) {
+ return this.setDesiredOffsets(token.range, fromToken, offset);
+ }
+
+ /**
+ * Sets the desired offset of all tokens in a range
+ * It's common for node listeners in this file to need to apply the same offset to a large, contiguous range of tokens.
+ * Moreover, the offset of any given token is usually updated multiple times (roughly once for each node that contains
+ * it). This means that the offset of each token is updated O(AST depth) times.
+ * It would not be performant to store and update the offsets for each token independently, because the rule would end
+ * up having a time complexity of O(number of tokens * AST depth), which is quite slow for large files.
+ *
+ * Instead, the offset tree is represented as a collection of contiguous offset ranges in a file. For example, the following
+ * list could represent the state of the offset tree at a given point:
+ *
+ * * Tokens starting in the interval [0, 15) are aligned with the beginning of the file
+ * * Tokens starting in the interval [15, 30) are offset by 1 indent level from the `bar` token
+ * * Tokens starting in the interval [30, 43) are offset by 1 indent level from the `foo` token
+ * * Tokens starting in the interval [43, 820) are offset by 2 indent levels from the `bar` token
+ * * Tokens starting in the interval [820, ∞) are offset by 1 indent level from the `baz` token
+ *
+ * The `setDesiredOffsets` methods inserts ranges like the ones above. The third line above would be inserted by using:
+ * `setDesiredOffsets([30, 43], fooToken, 1);`
+ *
+ * @param {[number, number]} range A [start, end] pair. All tokens with range[0] <= token.start < range[1] will have the offset applied.
+ * @param {Token} fromToken The token that this is offset from
+ * @param {number} offset The desired indent level
+ * @param {boolean} force `true` if this offset should not use the normal collapsing behavior. This should almost always be false.
+ * @returns {void}
+ */
+ setDesiredOffsets(range, fromToken, offset, force) {
+
+ /*
+ * Offset ranges are stored as a collection of nodes, where each node maps a numeric key to an offset
+ * descriptor. The tree for the example above would have the following nodes:
+ *
+ * * key: 0, value: { offset: 0, from: null }
+ * * key: 15, value: { offset: 1, from: barToken }
+ * * key: 30, value: { offset: 1, from: fooToken }
+ * * key: 43, value: { offset: 2, from: barToken }
+ * * key: 820, value: { offset: 1, from: bazToken }
+ *
+ * To find the offset descriptor for any given token, one needs to find the node with the largest key
+ * which is <= token.start. To make this operation fast, the nodes are stored in a balanced binary
+ * search tree indexed by key.
+ */
+
+ const descriptorToInsert = { offset, from: fromToken, force };
+
+ const descriptorAfterRange = this._tree.findLe(range[1]).value;
+
+ const fromTokenIsInRange = fromToken && fromToken.range[0] >= range[0] && fromToken.range[1] <= range[1];
+ const fromTokenDescriptor = fromTokenIsInRange && this._getOffsetDescriptor(fromToken);
+
+ // First, remove any existing nodes in the range from the tree.
+ this._tree.deleteRange(range[0] + 1, range[1]);
+
+ // Insert a new node into the tree for this range
+ this._tree.insert(range[0], descriptorToInsert);
+
+ /*
+ * To avoid circular offset dependencies, keep the `fromToken` token mapped to whatever it was mapped to previously,
+ * even if it's in the current range.
+ */
+ if (fromTokenIsInRange) {
+ this._tree.insert(fromToken.range[0], fromTokenDescriptor);
+ this._tree.insert(fromToken.range[1], descriptorToInsert);
+ }
+
+ /*
+ * To avoid modifying the offset of tokens after the range, insert another node to keep the offset of the following
+ * tokens the same as it was before.
+ */
+ this._tree.insert(range[1], descriptorAfterRange);
+ }
+
+ /**
+ * Gets the desired indent of a token
+ * @param {Token} token The token
+ * @returns {string} The desired indent of the token
+ */
+ getDesiredIndent(token) {
+ if (!this._desiredIndentCache.has(token)) {
+
+ if (this._ignoredTokens.has(token)) {
+
+ /*
+ * If the token is ignored, use the actual indent of the token as the desired indent.
+ * This ensures that no errors are reported for this token.
+ */
+ this._desiredIndentCache.set(
+ token,
+ this._tokenInfo.getTokenIndent(token)
+ );
+ } else if (this._lockedFirstTokens.has(token)) {
+ const firstToken = this._lockedFirstTokens.get(token);
+
+ this._desiredIndentCache.set(
+ token,
+
+ // (indentation for the first element's line)
+ this.getDesiredIndent(this._tokenInfo.getFirstTokenOfLine(firstToken)) +
+
+ // (space between the start of the first element's line and the first element)
+ this._indentType.repeat(firstToken.loc.start.column - this._tokenInfo.getFirstTokenOfLine(firstToken).loc.start.column)
+ );
+ } else {
+ const offsetInfo = this._getOffsetDescriptor(token);
+ const offset = (
+ offsetInfo.from &&
+ offsetInfo.from.loc.start.line === token.loc.start.line &&
+ !offsetInfo.force
+ ) ? 0 : offsetInfo.offset * this._indentSize;
+
+ this._desiredIndentCache.set(
+ token,
+ (offsetInfo.from ? this.getDesiredIndent(offsetInfo.from) : "") + this._indentType.repeat(offset)
+ );
+ }
+ }
+ return this._desiredIndentCache.get(token);
+ }
+
+ /**
+ * Ignores a token, preventing it from being reported.
+ * @param {Token} token The token
+ * @returns {void}
+ */
+ ignoreToken(token) {
+ if (this._tokenInfo.isFirstTokenOfLine(token)) {
+ this._ignoredTokens.add(token);
+ }
+ }
+
+ /**
+ * Gets the first token that the given token's indentation is dependent on
+ * @param {Token} token The token
+ * @returns {Token} The token that the given token depends on, or `null` if the given token is at the top level
+ */
+ getFirstDependency(token) {
+ return this._getOffsetDescriptor(token).from;
+ }
+}
+
+const ELEMENT_LIST_SCHEMA = {
+ oneOf: [
+ {
+ type: "integer",
+ minimum: 0
+ },
+ {
+ enum: ["first", "off"]
+ }
+ ]
+};
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce consistent indentation",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ fixable: "whitespace",
+
+ schema: [
+ {
+ oneOf: [
+ {
+ enum: ["tab"]
+ },
+ {
+ type: "integer",
+ minimum: 0
+ }
+ ]
+ },
+ {
+ type: "object",
+ properties: {
+ SwitchCase: {
+ type: "integer",
+ minimum: 0
+ },
+ VariableDeclarator: {
+ oneOf: [
+ {
+ type: "integer",
+ minimum: 0
+ },
+ {
+ type: "object",
+ properties: {
+ var: {
+ type: "integer",
+ minimum: 0
+ },
+ let: {
+ type: "integer",
+ minimum: 0
+ },
+ const: {
+ type: "integer",
+ minimum: 0
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+ outerIIFEBody: {
+ type: "integer",
+ minimum: 0
+ },
+ MemberExpression: {
+ oneOf: [
+ {
+ type: "integer",
+ minimum: 0
+ },
+ {
+ enum: ["off"]
+ }
+ ]
+ },
+ FunctionDeclaration: {
+ type: "object",
+ properties: {
+ parameters: ELEMENT_LIST_SCHEMA,
+ body: {
+ type: "integer",
+ minimum: 0
+ }
+ },
+ additionalProperties: false
+ },
+ FunctionExpression: {
+ type: "object",
+ properties: {
+ parameters: ELEMENT_LIST_SCHEMA,
+ body: {
+ type: "integer",
+ minimum: 0
+ }
+ },
+ additionalProperties: false
+ },
+ CallExpression: {
+ type: "object",
+ properties: {
+ arguments: ELEMENT_LIST_SCHEMA
+ },
+ additionalProperties: false
+ },
+ ArrayExpression: ELEMENT_LIST_SCHEMA,
+ ObjectExpression: ELEMENT_LIST_SCHEMA,
+ ImportDeclaration: ELEMENT_LIST_SCHEMA,
+ flatTernaryExpressions: {
+ type: "boolean"
+ },
+ ignoredNodes: {
+ type: "array",
+ items: {
+ type: "string",
+ not: {
+ pattern: ":exit$"
+ }
+ }
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+ const DEFAULT_VARIABLE_INDENT = 1;
+ const DEFAULT_PARAMETER_INDENT = 1;
+ const DEFAULT_FUNCTION_BODY_INDENT = 1;
+
+ let indentType = "space";
+ let indentSize = 4;
+ const options = {
+ SwitchCase: 0,
+ VariableDeclarator: {
+ var: DEFAULT_VARIABLE_INDENT,
+ let: DEFAULT_VARIABLE_INDENT,
+ const: DEFAULT_VARIABLE_INDENT
+ },
+ outerIIFEBody: 1,
+ FunctionDeclaration: {
+ parameters: DEFAULT_PARAMETER_INDENT,
+ body: DEFAULT_FUNCTION_BODY_INDENT
+ },
+ FunctionExpression: {
+ parameters: DEFAULT_PARAMETER_INDENT,
+ body: DEFAULT_FUNCTION_BODY_INDENT
+ },
+ CallExpression: {
+ arguments: DEFAULT_PARAMETER_INDENT
+ },
+ MemberExpression: 1,
+ ArrayExpression: 1,
+ ObjectExpression: 1,
+ ImportDeclaration: 1,
+ flatTernaryExpressions: false,
+ ignoredNodes: []
+ };
+
+ if (context.options.length) {
+ if (context.options[0] === "tab") {
+ indentSize = 1;
+ indentType = "tab";
+ } else {
+ indentSize = context.options[0];
+ indentType = "space";
+ }
+
+ if (context.options[1]) {
+ lodash.merge(options, context.options[1]);
+
+ if (typeof options.VariableDeclarator === "number") {
+ options.VariableDeclarator = {
+ var: options.VariableDeclarator,
+ let: options.VariableDeclarator,
+ const: options.VariableDeclarator
+ };
+ }
+ }
+ }
+
+ const sourceCode = context.getSourceCode();
+ const tokenInfo = new TokenInfo(sourceCode);
+ const offsets = new OffsetStorage(tokenInfo, indentSize, indentType === "space" ? " " : "\t");
+ const parameterParens = new WeakSet();
+
+ /**
+ * Creates an error message for a line, given the expected/actual indentation.
+ * @param {int} expectedAmount The expected amount of indentation characters for this line
+ * @param {int} actualSpaces The actual number of indentation spaces that were found on this line
+ * @param {int} actualTabs The actual number of indentation tabs that were found on this line
+ * @returns {string} An error message for this line
+ */
+ function createErrorMessage(expectedAmount, actualSpaces, actualTabs) {
+ const expectedStatement = `${expectedAmount} ${indentType}${expectedAmount === 1 ? "" : "s"}`; // e.g. "2 tabs"
+ const foundSpacesWord = `space${actualSpaces === 1 ? "" : "s"}`; // e.g. "space"
+ const foundTabsWord = `tab${actualTabs === 1 ? "" : "s"}`; // e.g. "tabs"
+ let foundStatement;
+
+ if (actualSpaces > 0) {
+
+ /*
+ * Abbreviate the message if the expected indentation is also spaces.
+ * e.g. 'Expected 4 spaces but found 2' rather than 'Expected 4 spaces but found 2 spaces'
+ */
+ foundStatement = indentType === "space" ? actualSpaces : `${actualSpaces} ${foundSpacesWord}`;
+ } else if (actualTabs > 0) {
+ foundStatement = indentType === "tab" ? actualTabs : `${actualTabs} ${foundTabsWord}`;
+ } else {
+ foundStatement = "0";
+ }
+
+ return `Expected indentation of ${expectedStatement} but found ${foundStatement}.`;
+ }
+
+ /**
+ * Reports a given indent violation
+ * @param {Token} token Token violating the indent rule
+ * @param {string} neededIndent Expected indentation string
+ * @returns {void}
+ */
+ function report(token, neededIndent) {
+ const actualIndent = Array.from(tokenInfo.getTokenIndent(token));
+ const numSpaces = actualIndent.filter(char => char === " ").length;
+ const numTabs = actualIndent.filter(char => char === "\t").length;
+
+ context.report({
+ node: token,
+ message: createErrorMessage(neededIndent.length, numSpaces, numTabs),
+ loc: {
+ start: { line: token.loc.start.line, column: 0 },
+ end: { line: token.loc.start.line, column: token.loc.start.column }
+ },
+ fix(fixer) {
+ const range = [token.range[0] - token.loc.start.column, token.range[0]];
+ const newText = neededIndent;
+
+ return fixer.replaceTextRange(range, newText);
+ }
+ });
+ }
+
+ /**
+ * Checks if a token's indentation is correct
+ * @param {Token} token Token to examine
+ * @param {string} desiredIndent Desired indentation of the string
+ * @returns {boolean} `true` if the token's indentation is correct
+ */
+ function validateTokenIndent(token, desiredIndent) {
+ const indentation = tokenInfo.getTokenIndent(token);
+
+ return indentation === desiredIndent ||
+
+ // To avoid conflicts with no-mixed-spaces-and-tabs, don't report mixed spaces and tabs.
+ indentation.includes(" ") && indentation.includes("\t");
+ }
+
+ /**
+ * Check to see if the node is a file level IIFE
+ * @param {ASTNode} node The function node to check.
+ * @returns {boolean} True if the node is the outer IIFE
+ */
+ function isOuterIIFE(node) {
+
+ /*
+ * Verify that the node is an IIFE
+ */
+ if (!node.parent || node.parent.type !== "CallExpression" || node.parent.callee !== node) {
+ return false;
+ }
+
+ /*
+ * Navigate legal ancestors to determine whether this IIFE is outer.
+ * A "legal ancestor" is an expression or statement that causes the function to get executed immediately.
+ * For example, `!(function(){})()` is an outer IIFE even though it is preceded by a ! operator.
+ */
+ let statement = node.parent && node.parent.parent;
+
+ while (
+ statement.type === "UnaryExpression" && ["!", "~", "+", "-"].indexOf(statement.operator) > -1 ||
+ statement.type === "AssignmentExpression" ||
+ statement.type === "LogicalExpression" ||
+ statement.type === "SequenceExpression" ||
+ statement.type === "VariableDeclarator"
+ ) {
+ statement = statement.parent;
+ }
+
+ return (statement.type === "ExpressionStatement" || statement.type === "VariableDeclaration") && statement.parent.type === "Program";
+ }
+
+ /**
+ * Check indentation for lists of elements (arrays, objects, function params)
+ * @param {ASTNode[]} elements List of elements that should be offset
+ * @param {Token} startToken The start token of the list that element should be aligned against, e.g. '['
+ * @param {Token} endToken The end token of the list, e.g. ']'
+ * @param {number|string} offset The amount that the elements should be offset
+ * @returns {void}
+ */
+ function addElementListIndent(elements, startToken, endToken, offset) {
+
+ /**
+ * Gets the first token of a given element, including surrounding parentheses.
+ * @param {ASTNode} element A node in the `elements` list
+ * @returns {Token} The first token of this element
+ */
+ function getFirstToken(element) {
+ let token = sourceCode.getTokenBefore(element);
+
+ while (astUtils.isOpeningParenToken(token) && token !== startToken) {
+ token = sourceCode.getTokenBefore(token);
+ }
+ return sourceCode.getTokenAfter(token);
+ }
+
+ // Run through all the tokens in the list, and offset them by one indent level (mainly for comments, other things will end up overridden)
+ offsets.setDesiredOffsets(
+ [startToken.range[1], endToken.range[0]],
+ startToken,
+ typeof offset === "number" ? offset : 1
+ );
+ offsets.setDesiredOffset(endToken, startToken, 0);
+
+ // If the preference is "first" but there is no first element (e.g. sparse arrays w/ empty first slot), fall back to 1 level.
+ if (offset === "first" && elements.length && !elements[0]) {
+ return;
+ }
+ elements.forEach((element, index) => {
+ if (!element) {
+
+ // Skip holes in arrays
+ return;
+ }
+ if (offset === "off") {
+
+ // Ignore the first token of every element if the "off" option is used
+ offsets.ignoreToken(getFirstToken(element));
+ }
+
+ // Offset the following elements correctly relative to the first element
+ if (index === 0) {
+ return;
+ }
+ if (offset === "first" && tokenInfo.isFirstTokenOfLine(getFirstToken(element))) {
+ offsets.matchOffsetOf(getFirstToken(elements[0]), getFirstToken(element));
+ } else {
+ const previousElement = elements[index - 1];
+ const firstTokenOfPreviousElement = previousElement && getFirstToken(previousElement);
+
+ if (previousElement && sourceCode.getLastToken(previousElement).loc.start.line > startToken.loc.end.line) {
+ offsets.setDesiredOffsets(element.range, firstTokenOfPreviousElement, 0);
+ }
+ }
+ });
+ }
+
+ /**
+ * Check and decide whether to check for indentation for blockless nodes
+ * Scenarios are for or while statements without braces around them
+ * @param {ASTNode} node node to examine
+ * @returns {void}
+ */
+ function addBlocklessNodeIndent(node) {
+ if (node.type !== "BlockStatement") {
+ const lastParentToken = sourceCode.getTokenBefore(node, astUtils.isNotOpeningParenToken);
+
+ let firstBodyToken = sourceCode.getFirstToken(node);
+ let lastBodyToken = sourceCode.getLastToken(node);
+
+ while (
+ astUtils.isOpeningParenToken(sourceCode.getTokenBefore(firstBodyToken)) &&
+ astUtils.isClosingParenToken(sourceCode.getTokenAfter(lastBodyToken))
+ ) {
+ firstBodyToken = sourceCode.getTokenBefore(firstBodyToken);
+ lastBodyToken = sourceCode.getTokenAfter(lastBodyToken);
+ }
+
+ offsets.setDesiredOffsets([firstBodyToken.range[0], lastBodyToken.range[1]], lastParentToken, 1);
+
+ /*
+ * For blockless nodes with semicolon-first style, don't indent the semicolon.
+ * e.g.
+ * if (foo) bar()
+ * ; [1, 2, 3].map(foo)
+ */
+ const lastToken = sourceCode.getLastToken(node);
+
+ if (node.type !== "EmptyStatement" && astUtils.isSemicolonToken(lastToken)) {
+ offsets.setDesiredOffset(lastToken, lastParentToken, 0);
+ }
+ }
+ }
+
+ /**
+ * Checks the indentation for nodes that are like function calls (`CallExpression` and `NewExpression`)
+ * @param {ASTNode} node A CallExpression or NewExpression node
+ * @returns {void}
+ */
+ function addFunctionCallIndent(node) {
+ let openingParen;
+
+ if (node.arguments.length) {
+ openingParen = sourceCode.getFirstTokenBetween(node.callee, node.arguments[0], astUtils.isOpeningParenToken);
+ } else {
+ openingParen = sourceCode.getLastToken(node, 1);
+ }
+ const closingParen = sourceCode.getLastToken(node);
+
+ parameterParens.add(openingParen);
+ parameterParens.add(closingParen);
+ offsets.setDesiredOffset(openingParen, sourceCode.getTokenBefore(openingParen), 0);
+
+ addElementListIndent(node.arguments, openingParen, closingParen, options.CallExpression.arguments);
+ }
+
+ /**
+ * Checks the indentation of parenthesized values, given a list of tokens in a program
+ * @param {Token[]} tokens A list of tokens
+ * @returns {void}
+ */
+ function addParensIndent(tokens) {
+ const parenStack = [];
+ const parenPairs = [];
+
+ tokens.forEach(nextToken => {
+
+ // Accumulate a list of parenthesis pairs
+ if (astUtils.isOpeningParenToken(nextToken)) {
+ parenStack.push(nextToken);
+ } else if (astUtils.isClosingParenToken(nextToken)) {
+ parenPairs.unshift({ left: parenStack.pop(), right: nextToken });
+ }
+ });
+
+ parenPairs.forEach(pair => {
+ const leftParen = pair.left;
+ const rightParen = pair.right;
+
+ // We only want to handle parens around expressions, so exclude parentheses that are in function parameters and function call arguments.
+ if (!parameterParens.has(leftParen) && !parameterParens.has(rightParen)) {
+ const parenthesizedTokens = new Set(sourceCode.getTokensBetween(leftParen, rightParen));
+
+ parenthesizedTokens.forEach(token => {
+ if (!parenthesizedTokens.has(offsets.getFirstDependency(token))) {
+ offsets.setDesiredOffset(token, leftParen, 1);
+ }
+ });
+ }
+
+ offsets.setDesiredOffset(rightParen, leftParen, 0);
+ });
+ }
+
+ /**
+ * Ignore all tokens within an unknown node whose offset do not depend
+ * on another token's offset within the unknown node
+ * @param {ASTNode} node Unknown Node
+ * @returns {void}
+ */
+ function ignoreNode(node) {
+ const unknownNodeTokens = new Set(sourceCode.getTokens(node, { includeComments: true }));
+
+ unknownNodeTokens.forEach(token => {
+ if (!unknownNodeTokens.has(offsets.getFirstDependency(token))) {
+ const firstTokenOfLine = tokenInfo.getFirstTokenOfLine(token);
+
+ if (token === firstTokenOfLine) {
+ offsets.ignoreToken(token);
+ } else {
+ offsets.setDesiredOffset(token, firstTokenOfLine, 0);
+ }
+ }
+ });
+ }
+
+ /**
+ * Check whether the given token is on the first line of a statement.
+ * @param {Token} token The token to check.
+ * @param {ASTNode} leafNode The expression node that the token belongs directly.
+ * @returns {boolean} `true` if the token is on the first line of a statement.
+ */
+ function isOnFirstLineOfStatement(token, leafNode) {
+ let node = leafNode;
+
+ while (node.parent && !node.parent.type.endsWith("Statement") && !node.parent.type.endsWith("Declaration")) {
+ node = node.parent;
+ }
+ node = node.parent;
+
+ return !node || node.loc.start.line === token.loc.start.line;
+ }
+
+ const baseOffsetListeners = {
+ "ArrayExpression, ArrayPattern"(node) {
+ const openingBracket = sourceCode.getFirstToken(node);
+ const closingBracket = sourceCode.getTokenAfter(lodash.findLast(node.elements) || openingBracket, astUtils.isClosingBracketToken);
+
+ addElementListIndent(node.elements, openingBracket, closingBracket, options.ArrayExpression);
+ },
+
+ "ObjectExpression, ObjectPattern"(node) {
+ const openingCurly = sourceCode.getFirstToken(node);
+ const closingCurly = sourceCode.getTokenAfter(
+ node.properties.length ? node.properties[node.properties.length - 1] : openingCurly,
+ astUtils.isClosingBraceToken
+ );
+
+ addElementListIndent(node.properties, openingCurly, closingCurly, options.ObjectExpression);
+ },
+
+ ArrowFunctionExpression(node) {
+ const firstToken = sourceCode.getFirstToken(node);
+
+ if (astUtils.isOpeningParenToken(firstToken)) {
+ const openingParen = firstToken;
+ const closingParen = sourceCode.getTokenBefore(node.body, astUtils.isClosingParenToken);
+
+ parameterParens.add(openingParen);
+ parameterParens.add(closingParen);
+ addElementListIndent(node.params, openingParen, closingParen, options.FunctionExpression.parameters);
+ }
+ addBlocklessNodeIndent(node.body);
+
+ let arrowToken;
+
+ if (node.params.length) {
+ arrowToken = sourceCode.getTokenAfter(node.params[node.params.length - 1], astUtils.isArrowToken);
+ } else {
+ arrowToken = sourceCode.getFirstToken(node, astUtils.isArrowToken);
+ }
+ offsets.setDesiredOffset(arrowToken, sourceCode.getFirstToken(node), 0);
+ },
+
+ AssignmentExpression(node) {
+ const operator = sourceCode.getFirstTokenBetween(node.left, node.right, token => token.value === node.operator);
+
+ offsets.setDesiredOffsets([operator.range[0], node.range[1]], sourceCode.getLastToken(node.left), 1);
+ offsets.ignoreToken(operator);
+ offsets.ignoreToken(sourceCode.getTokenAfter(operator));
+ },
+
+ "BinaryExpression, LogicalExpression"(node) {
+ const operator = sourceCode.getFirstTokenBetween(node.left, node.right, token => token.value === node.operator);
+
+ /*
+ * For backwards compatibility, don't check BinaryExpression indents, e.g.
+ * var foo = bar &&
+ * baz;
+ */
+
+ const tokenAfterOperator = sourceCode.getTokenAfter(operator);
+
+ offsets.ignoreToken(operator);
+ offsets.ignoreToken(tokenAfterOperator);
+ offsets.setDesiredOffset(tokenAfterOperator, operator, 0);
+ offsets.setDesiredOffsets([tokenAfterOperator.range[1], node.range[1]], tokenAfterOperator, 1);
+ },
+
+ "BlockStatement, ClassBody"(node) {
+
+ let blockIndentLevel;
+
+ if (node.parent && isOuterIIFE(node.parent)) {
+ blockIndentLevel = options.outerIIFEBody;
+ } else if (node.parent && (node.parent.type === "FunctionExpression" || node.parent.type === "ArrowFunctionExpression")) {
+ blockIndentLevel = options.FunctionExpression.body;
+ } else if (node.parent && node.parent.type === "FunctionDeclaration") {
+ blockIndentLevel = options.FunctionDeclaration.body;
+ } else {
+ blockIndentLevel = 1;
+ }
+
+ /*
+ * For blocks that aren't lone statements, ensure that the opening curly brace
+ * is aligned with the parent.
+ */
+ if (!astUtils.STATEMENT_LIST_PARENTS.has(node.parent.type)) {
+ offsets.setDesiredOffset(sourceCode.getFirstToken(node), sourceCode.getFirstToken(node.parent), 0);
+ }
+ addElementListIndent(node.body, sourceCode.getFirstToken(node), sourceCode.getLastToken(node), blockIndentLevel);
+ },
+
+ CallExpression: addFunctionCallIndent,
+
+
+ "ClassDeclaration[superClass], ClassExpression[superClass]"(node) {
+ const classToken = sourceCode.getFirstToken(node);
+ const extendsToken = sourceCode.getTokenBefore(node.superClass, astUtils.isNotOpeningParenToken);
+
+ offsets.setDesiredOffsets([extendsToken.range[0], node.body.range[0]], classToken, 1);
+ },
+
+ ConditionalExpression(node) {
+ const firstToken = sourceCode.getFirstToken(node);
+
+ // `flatTernaryExpressions` option is for the following style:
+ // var a =
+ // foo > 0 ? bar :
+ // foo < 0 ? baz :
+ // /*else*/ qiz ;
+ if (!options.flatTernaryExpressions ||
+ !astUtils.isTokenOnSameLine(node.test, node.consequent) ||
+ isOnFirstLineOfStatement(firstToken, node)
+ ) {
+ const questionMarkToken = sourceCode.getFirstTokenBetween(node.test, node.consequent, token => token.type === "Punctuator" && token.value === "?");
+ const colonToken = sourceCode.getFirstTokenBetween(node.consequent, node.alternate, token => token.type === "Punctuator" && token.value === ":");
+
+ const firstConsequentToken = sourceCode.getTokenAfter(questionMarkToken, { includeComments: true });
+ const lastConsequentToken = sourceCode.getTokenBefore(colonToken, { includeComments: true });
+ const firstAlternateToken = sourceCode.getTokenAfter(colonToken);
+
+ offsets.setDesiredOffset(questionMarkToken, firstToken, 1);
+ offsets.setDesiredOffset(colonToken, firstToken, 1);
+
+ offsets.setDesiredOffset(firstConsequentToken, firstToken, 1);
+
+ /*
+ * The alternate and the consequent should usually have the same indentation.
+ * If they share part of a line, align the alternate against the first token of the consequent.
+ * This allows the alternate to be indented correctly in cases like this:
+ * foo ? (
+ * bar
+ * ) : ( // this '(' is aligned with the '(' above, so it's considered to be aligned with `foo`
+ * baz // as a result, `baz` is offset by 1 rather than 2
+ * )
+ */
+ if (lastConsequentToken.loc.end.line === firstAlternateToken.loc.start.line) {
+ offsets.setDesiredOffset(firstAlternateToken, firstConsequentToken, 0);
+ } else {
+
+ /**
+ * If the alternate and consequent do not share part of a line, offset the alternate from the first
+ * token of the conditional expression. For example:
+ * foo ? bar
+ * : baz
+ *
+ * If `baz` were aligned with `bar` rather than being offset by 1 from `foo`, `baz` would end up
+ * having no expected indentation.
+ */
+ offsets.setDesiredOffset(firstAlternateToken, firstToken, 1);
+ }
+
+ offsets.setDesiredOffsets([questionMarkToken.range[1], colonToken.range[0]], firstConsequentToken, 0);
+ offsets.setDesiredOffsets([colonToken.range[1], node.range[1]], firstAlternateToken, 0);
+ }
+ },
+
+ "DoWhileStatement, WhileStatement, ForInStatement, ForOfStatement": node => addBlocklessNodeIndent(node.body),
+
+ ExportNamedDeclaration(node) {
+ if (node.declaration === null) {
+ const closingCurly = sourceCode.getLastToken(node, astUtils.isClosingBraceToken);
+
+ // Indent the specifiers in `export {foo, bar, baz}`
+ addElementListIndent(node.specifiers, sourceCode.getFirstToken(node, { skip: 1 }), closingCurly, 1);
+
+ if (node.source) {
+
+ // Indent everything after and including the `from` token in `export {foo, bar, baz} from 'qux'`
+ offsets.setDesiredOffsets([closingCurly.range[1], node.range[1]], sourceCode.getFirstToken(node), 1);
+ }
+ }
+ },
+
+ ForStatement(node) {
+ const forOpeningParen = sourceCode.getFirstToken(node, 1);
+
+ if (node.init) {
+ offsets.setDesiredOffsets(node.init.range, forOpeningParen, 1);
+ }
+ if (node.test) {
+ offsets.setDesiredOffsets(node.test.range, forOpeningParen, 1);
+ }
+ if (node.update) {
+ offsets.setDesiredOffsets(node.update.range, forOpeningParen, 1);
+ }
+ addBlocklessNodeIndent(node.body);
+ },
+
+ "FunctionDeclaration, FunctionExpression"(node) {
+ const closingParen = sourceCode.getTokenBefore(node.body);
+ const openingParen = sourceCode.getTokenBefore(node.params.length ? node.params[0] : closingParen);
+
+ parameterParens.add(openingParen);
+ parameterParens.add(closingParen);
+ addElementListIndent(node.params, openingParen, closingParen, options[node.type].parameters);
+ },
+
+ IfStatement(node) {
+ addBlocklessNodeIndent(node.consequent);
+ if (node.alternate && node.alternate.type !== "IfStatement") {
+ addBlocklessNodeIndent(node.alternate);
+ }
+ },
+
+ ImportDeclaration(node) {
+ if (node.specifiers.some(specifier => specifier.type === "ImportSpecifier")) {
+ const openingCurly = sourceCode.getFirstToken(node, astUtils.isOpeningBraceToken);
+ const closingCurly = sourceCode.getLastToken(node, astUtils.isClosingBraceToken);
+
+ addElementListIndent(node.specifiers.filter(specifier => specifier.type === "ImportSpecifier"), openingCurly, closingCurly, options.ImportDeclaration);
+ }
+
+ const fromToken = sourceCode.getLastToken(node, token => token.type === "Identifier" && token.value === "from");
+
+ if (fromToken) {
+ offsets.setDesiredOffsets([fromToken.range[0], node.range[1]], sourceCode.getFirstToken(node), 1);
+ }
+ },
+
+ "MemberExpression, JSXMemberExpression, MetaProperty"(node) {
+ const object = node.type === "MetaProperty" ? node.meta : node.object;
+ const firstNonObjectToken = sourceCode.getFirstTokenBetween(object, node.property, astUtils.isNotClosingParenToken);
+ const secondNonObjectToken = sourceCode.getTokenAfter(firstNonObjectToken);
+
+ const objectParenCount = sourceCode.getTokensBetween(object, node.property, { filter: astUtils.isClosingParenToken }).length;
+ const firstObjectToken = objectParenCount
+ ? sourceCode.getTokenBefore(object, { skip: objectParenCount - 1 })
+ : sourceCode.getFirstToken(object);
+ const lastObjectToken = sourceCode.getTokenBefore(firstNonObjectToken);
+ const firstPropertyToken = node.computed ? firstNonObjectToken : secondNonObjectToken;
+
+ if (node.computed) {
+
+ // For computed MemberExpressions, match the closing bracket with the opening bracket.
+ offsets.setDesiredOffset(sourceCode.getLastToken(node), firstNonObjectToken, 0);
+ offsets.setDesiredOffsets(node.property.range, firstNonObjectToken, 1);
+ }
+
+ /*
+ * If the object ends on the same line that the property starts, match against the last token
+ * of the object, to ensure that the MemberExpression is not indented.
+ *
+ * Otherwise, match against the first token of the object, e.g.
+ * foo
+ * .bar
+ * .baz // <-- offset by 1 from `foo`
+ */
+ const offsetBase = lastObjectToken.loc.end.line === firstPropertyToken.loc.start.line
+ ? lastObjectToken
+ : firstObjectToken;
+
+ if (typeof options.MemberExpression === "number") {
+
+ // Match the dot (for non-computed properties) or the opening bracket (for computed properties) against the object.
+ offsets.setDesiredOffset(firstNonObjectToken, offsetBase, options.MemberExpression);
+
+ /*
+ * For computed MemberExpressions, match the first token of the property against the opening bracket.
+ * Otherwise, match the first token of the property against the object.
+ */
+ offsets.setDesiredOffset(secondNonObjectToken, node.computed ? firstNonObjectToken : offsetBase, options.MemberExpression);
+ } else {
+
+ // If the MemberExpression option is off, ignore the dot and the first token of the property.
+ offsets.ignoreToken(firstNonObjectToken);
+ offsets.ignoreToken(secondNonObjectToken);
+
+ // To ignore the property indentation, ensure that the property tokens depend on the ignored tokens.
+ offsets.setDesiredOffset(firstNonObjectToken, offsetBase, 0);
+ offsets.setDesiredOffset(secondNonObjectToken, firstNonObjectToken, 0);
+ }
+ },
+
+ NewExpression(node) {
+
+ // Only indent the arguments if the NewExpression has parens (e.g. `new Foo(bar)` or `new Foo()`, but not `new Foo`
+ if (node.arguments.length > 0 ||
+ astUtils.isClosingParenToken(sourceCode.getLastToken(node)) &&
+ astUtils.isOpeningParenToken(sourceCode.getLastToken(node, 1))) {
+ addFunctionCallIndent(node);
+ }
+ },
+
+ Property(node) {
+ if (!node.shorthand && !node.method && node.kind === "init") {
+ const colon = sourceCode.getFirstTokenBetween(node.key, node.value, astUtils.isColonToken);
+
+ offsets.ignoreToken(sourceCode.getTokenAfter(colon));
+ }
+ },
+
+ SwitchStatement(node) {
+ const openingCurly = sourceCode.getTokenAfter(node.discriminant, astUtils.isOpeningBraceToken);
+ const closingCurly = sourceCode.getLastToken(node);
+ const caseKeywords = node.cases.map(switchCase => sourceCode.getFirstToken(switchCase));
+
+ offsets.setDesiredOffsets([openingCurly.range[1], closingCurly.range[0]], openingCurly, options.SwitchCase);
+
+ node.cases.forEach((switchCase, index) => {
+ const caseKeyword = caseKeywords[index];
+
+ if (!(switchCase.consequent.length === 1 && switchCase.consequent[0].type === "BlockStatement")) {
+ const tokenAfterCurrentCase = index === node.cases.length - 1 ? closingCurly : caseKeywords[index + 1];
+
+ offsets.setDesiredOffsets([caseKeyword.range[1], tokenAfterCurrentCase.range[0]], caseKeyword, 1);
+ }
+ });
+
+ if (node.cases.length) {
+ sourceCode.getTokensBetween(
+ node.cases[node.cases.length - 1],
+ closingCurly,
+ { includeComments: true, filter: astUtils.isCommentToken }
+ ).forEach(token => offsets.ignoreToken(token));
+ }
+ },
+
+ TemplateLiteral(node) {
+ node.expressions.forEach((expression, index) => {
+ const previousQuasi = node.quasis[index];
+ const nextQuasi = node.quasis[index + 1];
+ const tokenToAlignFrom = previousQuasi.loc.start.line === previousQuasi.loc.end.line ? sourceCode.getFirstToken(previousQuasi) : null;
+
+ offsets.setDesiredOffsets([previousQuasi.range[1], nextQuasi.range[0]], tokenToAlignFrom, 1);
+ offsets.setDesiredOffset(sourceCode.getFirstToken(nextQuasi), tokenToAlignFrom, 0);
+ });
+ },
+
+ VariableDeclaration(node) {
+ const variableIndent = options.VariableDeclarator.hasOwnProperty(node.kind) ? options.VariableDeclarator[node.kind] : DEFAULT_VARIABLE_INDENT;
+
+ if (node.declarations[node.declarations.length - 1].loc.start.line > node.loc.start.line) {
+
+ /*
+ * VariableDeclarator indentation is a bit different from other forms of indentation, in that the
+ * indentation of an opening bracket sometimes won't match that of a closing bracket. For example,
+ * the following indentations are correct:
+ *
+ * var foo = {
+ * ok: true
+ * };
+ *
+ * var foo = {
+ * ok: true,
+ * },
+ * bar = 1;
+ *
+ * Account for when exiting the AST (after indentations have already been set for the nodes in
+ * the declaration) by manually increasing the indentation level of the tokens in this declarator
+ * on the same line as the start of the declaration, provided that there are declarators that
+ * follow this one.
+ */
+ const firstToken = sourceCode.getFirstToken(node);
+
+ offsets.setDesiredOffsets(node.range, firstToken, variableIndent, true);
+ } else {
+ offsets.setDesiredOffsets(node.range, sourceCode.getFirstToken(node), variableIndent);
+ }
+ const lastToken = sourceCode.getLastToken(node);
+
+ if (astUtils.isSemicolonToken(lastToken)) {
+ offsets.ignoreToken(lastToken);
+ }
+ },
+
+ VariableDeclarator(node) {
+ if (node.init) {
+ const equalOperator = sourceCode.getTokenBefore(node.init, astUtils.isNotOpeningParenToken);
+ const tokenAfterOperator = sourceCode.getTokenAfter(equalOperator);
+
+ offsets.ignoreToken(equalOperator);
+ offsets.ignoreToken(tokenAfterOperator);
+ offsets.setDesiredOffsets([tokenAfterOperator.range[0], node.range[1]], equalOperator, 1);
+ offsets.setDesiredOffset(equalOperator, sourceCode.getLastToken(node.id), 0);
+ }
+ },
+
+ "JSXAttribute[value]"(node) {
+ const equalsToken = sourceCode.getFirstTokenBetween(node.name, node.value, token => token.type === "Punctuator" && token.value === "=");
+
+ offsets.setDesiredOffsets([equalsToken.range[0], node.value.range[1]], sourceCode.getFirstToken(node.name), 1);
+ },
+
+ JSXElement(node) {
+ if (node.closingElement) {
+ addElementListIndent(node.children, sourceCode.getFirstToken(node.openingElement), sourceCode.getFirstToken(node.closingElement), 1);
+ }
+ },
+
+ JSXOpeningElement(node) {
+ const firstToken = sourceCode.getFirstToken(node);
+ let closingToken;
+
+ if (node.selfClosing) {
+ closingToken = sourceCode.getLastToken(node, { skip: 1 });
+ offsets.setDesiredOffset(sourceCode.getLastToken(node), closingToken, 0);
+ } else {
+ closingToken = sourceCode.getLastToken(node);
+ }
+ offsets.setDesiredOffsets(node.name.range, sourceCode.getFirstToken(node));
+ addElementListIndent(node.attributes, firstToken, closingToken, 1);
+ },
+
+ JSXClosingElement(node) {
+ const firstToken = sourceCode.getFirstToken(node);
+
+ offsets.setDesiredOffsets(node.name.range, firstToken, 1);
+ offsets.setDesiredOffset(sourceCode.getLastToken(node), firstToken, 0);
+ },
+
+ JSXExpressionContainer(node) {
+ const openingCurly = sourceCode.getFirstToken(node);
+ const closingCurly = sourceCode.getLastToken(node);
+
+ offsets.setDesiredOffsets(
+ [openingCurly.range[1], closingCurly.range[0]],
+ openingCurly,
+ 1
+ );
+ offsets.setDesiredOffset(closingCurly, openingCurly, 0);
+ }
+ };
+
+ const listenerCallQueue = [];
+
+ /*
+ * To ignore the indentation of a node:
+ * 1. Don't call the node's listener when entering it (if it has a listener)
+ * 2. Call `ignoreNode` on the node sometime after exiting it and before validating offsets.
+ */
+ const offsetListeners = lodash.mapValues(
+ baseOffsetListeners,
+
+ /*
+ * Offset listener calls are deferred until traversal is finished, and are called as
+ * part of the final `Program:exit` listener. This is necessary because a node might
+ * be matched by multiple selectors.
+ *
+ * Example: Suppose there is an offset listener for `Identifier`, and the user has
+ * specified in configuration that `MemberExpression > Identifier` should be ignored.
+ * Due to selector specificity rules, the `Identifier` listener will get called first. However,
+ * if a given Identifier node is supposed to be ignored, then the `Identifier` offset listener
+ * should not have been called at all. Without doing extra selector matching, we don't know
+ * whether the Identifier matches the `MemberExpression > Identifier` selector until the
+ * `MemberExpression > Identifier` listener is called.
+ *
+ * To avoid this, the `Identifier` listener isn't called until traversal finishes and all
+ * ignored nodes are known.
+ */
+ listener =>
+ node =>
+ listenerCallQueue.push({ listener, node })
+ );
+
+ // For each ignored node selector, set up a listener to collect it into the `ignoredNodes` set.
+ const ignoredNodes = new Set();
+ const addToIgnoredNodes = ignoredNodes.add.bind(ignoredNodes);
+
+ const ignoredNodeListeners = options.ignoredNodes.reduce(
+ (listeners, ignoredSelector) => Object.assign(listeners, { [ignoredSelector]: addToIgnoredNodes }),
+ {}
+ );
+
+ /*
+ * Join the listeners, and add a listener to verify that all tokens actually have the correct indentation
+ * at the end.
+ *
+ * Using Object.assign will cause some offset listeners to be overwritten if the same selector also appears
+ * in `ignoredNodeListeners`. This isn't a problem because all of the matching nodes will be ignored,
+ * so those listeners wouldn't be called anyway.
+ */
+ return Object.assign(
+ offsetListeners,
+ ignoredNodeListeners,
+ {
+ "*:exit"(node) {
+
+ // If a node's type is nonstandard, we can't tell how its children should be offset, so ignore it.
+ if (!KNOWN_NODES.has(node.type)) {
+ ignoredNodes.add(node);
+ }
+ },
+ "Program:exit"() {
+
+ // Invoke the queued offset listeners for the nodes that aren't ignored.
+ listenerCallQueue
+ .filter(nodeInfo => !ignoredNodes.has(nodeInfo.node))
+ .forEach(nodeInfo => nodeInfo.listener(nodeInfo.node));
+
+ // Update the offsets for ignored nodes to prevent their child tokens from being reported.
+ ignoredNodes.forEach(ignoreNode);
+
+ addParensIndent(sourceCode.ast.tokens);
+
+ /*
+ * Create a Map from (tokenOrComment) => (precedingToken).
+ * This is necessary because sourceCode.getTokenBefore does not handle a comment as an argument correctly.
+ */
+ const precedingTokens = sourceCode.ast.comments.reduce((commentMap, comment) => {
+ const tokenOrCommentBefore = sourceCode.getTokenBefore(comment, { includeComments: true });
+
+ return commentMap.set(comment, commentMap.has(tokenOrCommentBefore) ? commentMap.get(tokenOrCommentBefore) : tokenOrCommentBefore);
+ }, new WeakMap());
+
+ sourceCode.lines.forEach((line, lineIndex) => {
+ const lineNumber = lineIndex + 1;
+
+ if (!tokenInfo.firstTokensByLineNumber.has(lineNumber)) {
+
+ // Don't check indentation on blank lines
+ return;
+ }
+
+ const firstTokenOfLine = tokenInfo.firstTokensByLineNumber.get(lineNumber);
+
+ if (firstTokenOfLine.loc.start.line !== lineNumber) {
+
+ // Don't check the indentation of multi-line tokens (e.g. template literals or block comments) twice.
+ return;
+ }
+
+ // If the token matches the expected expected indentation, don't report it.
+ if (validateTokenIndent(firstTokenOfLine, offsets.getDesiredIndent(firstTokenOfLine))) {
+ return;
+ }
+
+ if (astUtils.isCommentToken(firstTokenOfLine)) {
+ const tokenBefore = precedingTokens.get(firstTokenOfLine);
+ const tokenAfter = tokenBefore ? sourceCode.getTokenAfter(tokenBefore) : sourceCode.ast.tokens[0];
+
+ // If a comment matches the expected indentation of the token immediately before or after, don't report it.
+ if (
+ tokenBefore && validateTokenIndent(firstTokenOfLine, offsets.getDesiredIndent(tokenBefore)) ||
+ tokenAfter && validateTokenIndent(firstTokenOfLine, offsets.getDesiredIndent(tokenAfter))
+ ) {
+ return;
+ }
+ }
+
+ // Otherwise, report the token/comment.
+ report(firstTokenOfLine, offsets.getDesiredIndent(firstTokenOfLine));
+ });
+ }
+ }
+ );
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/init-declarations.js b/tools/node_modules/eslint/lib/rules/init-declarations.js
new file mode 100644
index 0000000000..1f53f3dfc4
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/init-declarations.js
@@ -0,0 +1,137 @@
+/**
+ * @fileoverview A rule to control the style of variable initializations.
+ * @author Colin Ihrig
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Checks whether or not a given node is a for loop.
+ * @param {ASTNode} block - A node to check.
+ * @returns {boolean} `true` when the node is a for loop.
+ */
+function isForLoop(block) {
+ return block.type === "ForInStatement" ||
+ block.type === "ForOfStatement" ||
+ block.type === "ForStatement";
+}
+
+/**
+ * Checks whether or not a given declarator node has its initializer.
+ * @param {ASTNode} node - A declarator node to check.
+ * @returns {boolean} `true` when the node has its initializer.
+ */
+function isInitialized(node) {
+ const declaration = node.parent;
+ const block = declaration.parent;
+
+ if (isForLoop(block)) {
+ if (block.type === "ForStatement") {
+ return block.init === declaration;
+ }
+ return block.left === declaration;
+ }
+ return Boolean(node.init);
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require or disallow initialization in variable declarations",
+ category: "Variables",
+ recommended: false
+ },
+
+ schema: {
+ anyOf: [
+ {
+ type: "array",
+ items: [
+ {
+ enum: ["always"]
+ }
+ ],
+ minItems: 0,
+ maxItems: 1
+ },
+ {
+ type: "array",
+ items: [
+ {
+ enum: ["never"]
+ },
+ {
+ type: "object",
+ properties: {
+ ignoreForLoopInit: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ],
+ minItems: 0,
+ maxItems: 2
+ }
+ ]
+ }
+ },
+
+ create(context) {
+
+ const MODE_ALWAYS = "always",
+ MODE_NEVER = "never";
+
+ const mode = context.options[0] || MODE_ALWAYS;
+ const params = context.options[1] || {};
+
+ //--------------------------------------------------------------------------
+ // Public API
+ //--------------------------------------------------------------------------
+
+ return {
+ "VariableDeclaration:exit"(node) {
+
+ const kind = node.kind,
+ declarations = node.declarations;
+
+ for (let i = 0; i < declarations.length; ++i) {
+ const declaration = declarations[i],
+ id = declaration.id,
+ initialized = isInitialized(declaration),
+ isIgnoredForLoop = params.ignoreForLoopInit && isForLoop(node.parent);
+
+ if (id.type !== "Identifier") {
+ continue;
+ }
+
+ if (mode === MODE_ALWAYS && !initialized) {
+ context.report({
+ node: declaration,
+ message: "Variable '{{idName}}' should be initialized on declaration.",
+ data: {
+ idName: id.name
+ }
+ });
+ } else if (mode === MODE_NEVER && kind !== "const" && initialized && !isIgnoredForLoop) {
+ context.report({
+ node: declaration,
+ message: "Variable '{{idName}}' should not be initialized on declaration.",
+ data: {
+ idName: id.name
+ }
+ });
+ }
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/jsx-quotes.js b/tools/node_modules/eslint/lib/rules/jsx-quotes.js
new file mode 100644
index 0000000000..5653922d94
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/jsx-quotes.js
@@ -0,0 +1,89 @@
+/**
+ * @fileoverview A rule to ensure consistent quotes used in jsx syntax.
+ * @author Mathias Schreck <https://github.com/lo1tuma>
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Constants
+//------------------------------------------------------------------------------
+
+const QUOTE_SETTINGS = {
+ "prefer-double": {
+ quote: "\"",
+ description: "singlequote",
+ convert(str) {
+ return str.replace(/'/g, "\"");
+ }
+ },
+ "prefer-single": {
+ quote: "'",
+ description: "doublequote",
+ convert(str) {
+ return str.replace(/"/g, "'");
+ }
+ }
+};
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce the consistent use of either double or single quotes in JSX attributes",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ fixable: "whitespace",
+
+ schema: [
+ {
+ enum: ["prefer-single", "prefer-double"]
+ }
+ ]
+ },
+
+ create(context) {
+ const quoteOption = context.options[0] || "prefer-double",
+ setting = QUOTE_SETTINGS[quoteOption];
+
+ /**
+ * Checks if the given string literal node uses the expected quotes
+ * @param {ASTNode} node - A string literal node.
+ * @returns {boolean} Whether or not the string literal used the expected quotes.
+ * @public
+ */
+ function usesExpectedQuotes(node) {
+ return node.value.indexOf(setting.quote) !== -1 || astUtils.isSurroundedBy(node.raw, setting.quote);
+ }
+
+ return {
+ JSXAttribute(node) {
+ const attributeValue = node.value;
+
+ if (attributeValue && astUtils.isStringLiteral(attributeValue) && !usesExpectedQuotes(attributeValue)) {
+ context.report({
+ node: attributeValue,
+ message: "Unexpected usage of {{description}}.",
+ data: {
+ description: setting.description
+ },
+ fix(fixer) {
+ return fixer.replaceText(attributeValue, setting.convert(attributeValue.raw));
+ }
+ });
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/key-spacing.js b/tools/node_modules/eslint/lib/rules/key-spacing.js
new file mode 100644
index 0000000000..1c62ad4289
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/key-spacing.js
@@ -0,0 +1,641 @@
+/**
+ * @fileoverview Rule to specify spacing of object literal keys and values
+ * @author Brandon Mills
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Checks whether a string contains a line terminator as defined in
+ * http://www.ecma-international.org/ecma-262/5.1/#sec-7.3
+ * @param {string} str String to test.
+ * @returns {boolean} True if str contains a line terminator.
+ */
+function containsLineTerminator(str) {
+ return astUtils.LINEBREAK_MATCHER.test(str);
+}
+
+/**
+ * Gets the last element of an array.
+ * @param {Array} arr An array.
+ * @returns {any} Last element of arr.
+ */
+function last(arr) {
+ return arr[arr.length - 1];
+}
+
+/**
+ * Checks whether a node is contained on a single line.
+ * @param {ASTNode} node AST Node being evaluated.
+ * @returns {boolean} True if the node is a single line.
+ */
+function isSingleLine(node) {
+ return (node.loc.end.line === node.loc.start.line);
+}
+
+/**
+ * Initializes a single option property from the configuration with defaults for undefined values
+ * @param {Object} toOptions Object to be initialized
+ * @param {Object} fromOptions Object to be initialized from
+ * @returns {Object} The object with correctly initialized options and values
+ */
+function initOptionProperty(toOptions, fromOptions) {
+ toOptions.mode = fromOptions.mode || "strict";
+
+ // Set value of beforeColon
+ if (typeof fromOptions.beforeColon !== "undefined") {
+ toOptions.beforeColon = +fromOptions.beforeColon;
+ } else {
+ toOptions.beforeColon = 0;
+ }
+
+ // Set value of afterColon
+ if (typeof fromOptions.afterColon !== "undefined") {
+ toOptions.afterColon = +fromOptions.afterColon;
+ } else {
+ toOptions.afterColon = 1;
+ }
+
+ // Set align if exists
+ if (typeof fromOptions.align !== "undefined") {
+ if (typeof fromOptions.align === "object") {
+ toOptions.align = fromOptions.align;
+ } else { // "string"
+ toOptions.align = {
+ on: fromOptions.align,
+ mode: toOptions.mode,
+ beforeColon: toOptions.beforeColon,
+ afterColon: toOptions.afterColon
+ };
+ }
+ }
+
+ return toOptions;
+}
+
+/**
+ * Initializes all the option values (singleLine, multiLine and align) from the configuration with defaults for undefined values
+ * @param {Object} toOptions Object to be initialized
+ * @param {Object} fromOptions Object to be initialized from
+ * @returns {Object} The object with correctly initialized options and values
+ */
+function initOptions(toOptions, fromOptions) {
+ if (typeof fromOptions.align === "object") {
+
+ // Initialize the alignment configuration
+ toOptions.align = initOptionProperty({}, fromOptions.align);
+ toOptions.align.on = fromOptions.align.on || "colon";
+ toOptions.align.mode = fromOptions.align.mode || "strict";
+
+ toOptions.multiLine = initOptionProperty({}, (fromOptions.multiLine || fromOptions));
+ toOptions.singleLine = initOptionProperty({}, (fromOptions.singleLine || fromOptions));
+
+ } else { // string or undefined
+ toOptions.multiLine = initOptionProperty({}, (fromOptions.multiLine || fromOptions));
+ toOptions.singleLine = initOptionProperty({}, (fromOptions.singleLine || fromOptions));
+
+ // If alignment options are defined in multiLine, pull them out into the general align configuration
+ if (toOptions.multiLine.align) {
+ toOptions.align = {
+ on: toOptions.multiLine.align.on,
+ mode: toOptions.multiLine.align.mode || toOptions.multiLine.mode,
+ beforeColon: toOptions.multiLine.align.beforeColon,
+ afterColon: toOptions.multiLine.align.afterColon
+ };
+ }
+ }
+
+ return toOptions;
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+const messages = {
+ key: "{{error}} space after {{computed}}key '{{key}}'.",
+ value: "{{error}} space before value for {{computed}}key '{{key}}'."
+};
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce consistent spacing between keys and values in object literal properties",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ fixable: "whitespace",
+
+ schema: [{
+ anyOf: [
+ {
+ type: "object",
+ properties: {
+ align: {
+ anyOf: [
+ {
+ enum: ["colon", "value"]
+ },
+ {
+ type: "object",
+ properties: {
+ mode: {
+ enum: ["strict", "minimum"]
+ },
+ on: {
+ enum: ["colon", "value"]
+ },
+ beforeColon: {
+ type: "boolean"
+ },
+ afterColon: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+ mode: {
+ enum: ["strict", "minimum"]
+ },
+ beforeColon: {
+ type: "boolean"
+ },
+ afterColon: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ },
+ {
+ type: "object",
+ properties: {
+ singleLine: {
+ type: "object",
+ properties: {
+ mode: {
+ enum: ["strict", "minimum"]
+ },
+ beforeColon: {
+ type: "boolean"
+ },
+ afterColon: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ },
+ multiLine: {
+ type: "object",
+ properties: {
+ align: {
+ anyOf: [
+ {
+ enum: ["colon", "value"]
+ },
+ {
+ type: "object",
+ properties: {
+ mode: {
+ enum: ["strict", "minimum"]
+ },
+ on: {
+ enum: ["colon", "value"]
+ },
+ beforeColon: {
+ type: "boolean"
+ },
+ afterColon: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+ mode: {
+ enum: ["strict", "minimum"]
+ },
+ beforeColon: {
+ type: "boolean"
+ },
+ afterColon: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ },
+ additionalProperties: false
+ },
+ {
+ type: "object",
+ properties: {
+ singleLine: {
+ type: "object",
+ properties: {
+ mode: {
+ enum: ["strict", "minimum"]
+ },
+ beforeColon: {
+ type: "boolean"
+ },
+ afterColon: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ },
+ multiLine: {
+ type: "object",
+ properties: {
+ mode: {
+ enum: ["strict", "minimum"]
+ },
+ beforeColon: {
+ type: "boolean"
+ },
+ afterColon: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ },
+ align: {
+ type: "object",
+ properties: {
+ mode: {
+ enum: ["strict", "minimum"]
+ },
+ on: {
+ enum: ["colon", "value"]
+ },
+ beforeColon: {
+ type: "boolean"
+ },
+ afterColon: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ }]
+ },
+
+ create(context) {
+
+ /**
+ * OPTIONS
+ * "key-spacing": [2, {
+ * beforeColon: false,
+ * afterColon: true,
+ * align: "colon" // Optional, or "value"
+ * }
+ */
+ const options = context.options[0] || {},
+ ruleOptions = initOptions({}, options),
+ multiLineOptions = ruleOptions.multiLine,
+ singleLineOptions = ruleOptions.singleLine,
+ alignmentOptions = ruleOptions.align || null;
+
+ const sourceCode = context.getSourceCode();
+
+ /**
+ * Checks whether a property is a member of the property group it follows.
+ * @param {ASTNode} lastMember The last Property known to be in the group.
+ * @param {ASTNode} candidate The next Property that might be in the group.
+ * @returns {boolean} True if the candidate property is part of the group.
+ */
+ function continuesPropertyGroup(lastMember, candidate) {
+ const groupEndLine = lastMember.loc.start.line,
+ candidateStartLine = candidate.loc.start.line;
+
+ if (candidateStartLine - groupEndLine <= 1) {
+ return true;
+ }
+
+ /*
+ * Check that the first comment is adjacent to the end of the group, the
+ * last comment is adjacent to the candidate property, and that successive
+ * comments are adjacent to each other.
+ */
+ const leadingComments = sourceCode.getCommentsBefore(candidate);
+
+ if (
+ leadingComments.length &&
+ leadingComments[0].loc.start.line - groupEndLine <= 1 &&
+ candidateStartLine - last(leadingComments).loc.end.line <= 1
+ ) {
+ for (let i = 1; i < leadingComments.length; i++) {
+ if (leadingComments[i].loc.start.line - leadingComments[i - 1].loc.end.line > 1) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Determines if the given property is key-value property.
+ * @param {ASTNode} property Property node to check.
+ * @returns {boolean} Whether the property is a key-value property.
+ */
+ function isKeyValueProperty(property) {
+ return !(
+ (property.method ||
+ property.shorthand ||
+ property.kind !== "init" || property.type !== "Property") // Could be "ExperimentalSpreadProperty" or "SpreadProperty"
+ );
+ }
+
+ /**
+ * Starting from the given a node (a property.key node here) looks forward
+ * until it finds the last token before a colon punctuator and returns it.
+ * @param {ASTNode} node The node to start looking from.
+ * @returns {ASTNode} The last token before a colon punctuator.
+ */
+ function getLastTokenBeforeColon(node) {
+ const colonToken = sourceCode.getTokenAfter(node, astUtils.isColonToken);
+
+ return sourceCode.getTokenBefore(colonToken);
+ }
+
+ /**
+ * Starting from the given a node (a property.key node here) looks forward
+ * until it finds the colon punctuator and returns it.
+ * @param {ASTNode} node The node to start looking from.
+ * @returns {ASTNode} The colon punctuator.
+ */
+ function getNextColon(node) {
+ return sourceCode.getTokenAfter(node, astUtils.isColonToken);
+ }
+
+ /**
+ * Gets an object literal property's key as the identifier name or string value.
+ * @param {ASTNode} property Property node whose key to retrieve.
+ * @returns {string} The property's key.
+ */
+ function getKey(property) {
+ const key = property.key;
+
+ if (property.computed) {
+ return sourceCode.getText().slice(key.range[0], key.range[1]);
+ }
+
+ return property.key.name || property.key.value;
+ }
+
+ /**
+ * Reports an appropriately-formatted error if spacing is incorrect on one
+ * side of the colon.
+ * @param {ASTNode} property Key-value pair in an object literal.
+ * @param {string} side Side being verified - either "key" or "value".
+ * @param {string} whitespace Actual whitespace string.
+ * @param {int} expected Expected whitespace length.
+ * @param {string} mode Value of the mode as "strict" or "minimum"
+ * @returns {void}
+ */
+ function report(property, side, whitespace, expected, mode) {
+ const diff = whitespace.length - expected,
+ nextColon = getNextColon(property.key),
+ tokenBeforeColon = sourceCode.getTokenBefore(nextColon, { includeComments: true }),
+ tokenAfterColon = sourceCode.getTokenAfter(nextColon, { includeComments: true }),
+ isKeySide = side === "key",
+ locStart = isKeySide ? tokenBeforeColon.loc.start : tokenAfterColon.loc.start,
+ isExtra = diff > 0,
+ diffAbs = Math.abs(diff),
+ spaces = Array(diffAbs + 1).join(" ");
+
+ if ((
+ diff && mode === "strict" ||
+ diff < 0 && mode === "minimum" ||
+ diff > 0 && !expected && mode === "minimum") &&
+ !(expected && containsLineTerminator(whitespace))
+ ) {
+ let fix;
+
+ if (isExtra) {
+ let range;
+
+ // Remove whitespace
+ if (isKeySide) {
+ range = [tokenBeforeColon.range[1], tokenBeforeColon.range[1] + diffAbs];
+ } else {
+ range = [tokenAfterColon.range[0] - diffAbs, tokenAfterColon.range[0]];
+ }
+ fix = function(fixer) {
+ return fixer.removeRange(range);
+ };
+ } else {
+
+ // Add whitespace
+ if (isKeySide) {
+ fix = function(fixer) {
+ return fixer.insertTextAfter(tokenBeforeColon, spaces);
+ };
+ } else {
+ fix = function(fixer) {
+ return fixer.insertTextBefore(tokenAfterColon, spaces);
+ };
+ }
+ }
+
+ context.report({
+ node: property[side],
+ loc: locStart,
+ message: messages[side],
+ data: {
+ error: isExtra ? "Extra" : "Missing",
+ computed: property.computed ? "computed " : "",
+ key: getKey(property)
+ },
+ fix
+ });
+ }
+ }
+
+ /**
+ * Gets the number of characters in a key, including quotes around string
+ * keys and braces around computed property keys.
+ * @param {ASTNode} property Property of on object literal.
+ * @returns {int} Width of the key.
+ */
+ function getKeyWidth(property) {
+ const startToken = sourceCode.getFirstToken(property);
+ const endToken = getLastTokenBeforeColon(property.key);
+
+ return endToken.range[1] - startToken.range[0];
+ }
+
+ /**
+ * Gets the whitespace around the colon in an object literal property.
+ * @param {ASTNode} property Property node from an object literal.
+ * @returns {Object} Whitespace before and after the property's colon.
+ */
+ function getPropertyWhitespace(property) {
+ const whitespace = /(\s*):(\s*)/.exec(sourceCode.getText().slice(
+ property.key.range[1], property.value.range[0]
+ ));
+
+ if (whitespace) {
+ return {
+ beforeColon: whitespace[1],
+ afterColon: whitespace[2]
+ };
+ }
+ return null;
+ }
+
+ /**
+ * Creates groups of properties.
+ * @param {ASTNode} node ObjectExpression node being evaluated.
+ * @returns {Array.<ASTNode[]>} Groups of property AST node lists.
+ */
+ function createGroups(node) {
+ if (node.properties.length === 1) {
+ return [node.properties];
+ }
+
+ return node.properties.reduce((groups, property) => {
+ const currentGroup = last(groups),
+ prev = last(currentGroup);
+
+ if (!prev || continuesPropertyGroup(prev, property)) {
+ currentGroup.push(property);
+ } else {
+ groups.push([property]);
+ }
+
+ return groups;
+ }, [
+ []
+ ]);
+ }
+
+ /**
+ * Verifies correct vertical alignment of a group of properties.
+ * @param {ASTNode[]} properties List of Property AST nodes.
+ * @returns {void}
+ */
+ function verifyGroupAlignment(properties) {
+ const length = properties.length,
+ widths = properties.map(getKeyWidth), // Width of keys, including quotes
+ align = alignmentOptions.on; // "value" or "colon"
+ let targetWidth = Math.max.apply(null, widths),
+ beforeColon, afterColon, mode;
+
+ if (alignmentOptions && length > 1) { // When aligning values within a group, use the alignment configuration.
+ beforeColon = alignmentOptions.beforeColon;
+ afterColon = alignmentOptions.afterColon;
+ mode = alignmentOptions.mode;
+ } else {
+ beforeColon = multiLineOptions.beforeColon;
+ afterColon = multiLineOptions.afterColon;
+ mode = alignmentOptions.mode;
+ }
+
+ // Conditionally include one space before or after colon
+ targetWidth += (align === "colon" ? beforeColon : afterColon);
+
+ for (let i = 0; i < length; i++) {
+ const property = properties[i];
+ const whitespace = getPropertyWhitespace(property);
+
+ if (whitespace) { // Object literal getters/setters lack a colon
+ const width = widths[i];
+
+ if (align === "value") {
+ report(property, "key", whitespace.beforeColon, beforeColon, mode);
+ report(property, "value", whitespace.afterColon, targetWidth - width, mode);
+ } else { // align = "colon"
+ report(property, "key", whitespace.beforeColon, targetWidth - width, mode);
+ report(property, "value", whitespace.afterColon, afterColon, mode);
+ }
+ }
+ }
+ }
+
+ /**
+ * Verifies vertical alignment, taking into account groups of properties.
+ * @param {ASTNode} node ObjectExpression node being evaluated.
+ * @returns {void}
+ */
+ function verifyAlignment(node) {
+ createGroups(node).forEach(group => {
+ verifyGroupAlignment(group.filter(isKeyValueProperty));
+ });
+ }
+
+ /**
+ * Verifies spacing of property conforms to specified options.
+ * @param {ASTNode} node Property node being evaluated.
+ * @param {Object} lineOptions Configured singleLine or multiLine options
+ * @returns {void}
+ */
+ function verifySpacing(node, lineOptions) {
+ const actual = getPropertyWhitespace(node);
+
+ if (actual) { // Object literal getters/setters lack colons
+ report(node, "key", actual.beforeColon, lineOptions.beforeColon, lineOptions.mode);
+ report(node, "value", actual.afterColon, lineOptions.afterColon, lineOptions.mode);
+ }
+ }
+
+ /**
+ * Verifies spacing of each property in a list.
+ * @param {ASTNode[]} properties List of Property AST nodes.
+ * @returns {void}
+ */
+ function verifyListSpacing(properties) {
+ const length = properties.length;
+
+ for (let i = 0; i < length; i++) {
+ verifySpacing(properties[i], singleLineOptions);
+ }
+ }
+
+ //--------------------------------------------------------------------------
+ // Public API
+ //--------------------------------------------------------------------------
+
+ if (alignmentOptions) { // Verify vertical alignment
+
+ return {
+ ObjectExpression(node) {
+ if (isSingleLine(node)) {
+ verifyListSpacing(node.properties.filter(isKeyValueProperty));
+ } else {
+ verifyAlignment(node);
+ }
+ }
+ };
+
+ }
+
+ // Obey beforeColon and afterColon in each property as configured
+ return {
+ Property(node) {
+ verifySpacing(node, isSingleLine(node.parent) ? singleLineOptions : multiLineOptions);
+ }
+ };
+
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/keyword-spacing.js b/tools/node_modules/eslint/lib/rules/keyword-spacing.js
new file mode 100644
index 0000000000..218cfd02be
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/keyword-spacing.js
@@ -0,0 +1,584 @@
+/**
+ * @fileoverview Rule to enforce spacing before and after keywords.
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils"),
+ keywords = require("../util/keywords");
+
+//------------------------------------------------------------------------------
+// Constants
+//------------------------------------------------------------------------------
+
+const PREV_TOKEN = /^[)\]}>]$/;
+const NEXT_TOKEN = /^(?:[([{<~!]|\+\+?|--?)$/;
+const PREV_TOKEN_M = /^[)\]}>*]$/;
+const NEXT_TOKEN_M = /^[{*]$/;
+const TEMPLATE_OPEN_PAREN = /\$\{$/;
+const TEMPLATE_CLOSE_PAREN = /^\}/;
+const CHECK_TYPE = /^(?:JSXElement|RegularExpression|String|Template)$/;
+const KEYS = keywords.concat(["as", "async", "await", "from", "get", "let", "of", "set", "yield"]);
+
+// check duplications.
+(function() {
+ KEYS.sort();
+ for (let i = 1; i < KEYS.length; ++i) {
+ if (KEYS[i] === KEYS[i - 1]) {
+ throw new Error(`Duplication was found in the keyword list: ${KEYS[i]}`);
+ }
+ }
+}());
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Checks whether or not a given token is a "Template" token ends with "${".
+ *
+ * @param {Token} token - A token to check.
+ * @returns {boolean} `true` if the token is a "Template" token ends with "${".
+ */
+function isOpenParenOfTemplate(token) {
+ return token.type === "Template" && TEMPLATE_OPEN_PAREN.test(token.value);
+}
+
+/**
+ * Checks whether or not a given token is a "Template" token starts with "}".
+ *
+ * @param {Token} token - A token to check.
+ * @returns {boolean} `true` if the token is a "Template" token starts with "}".
+ */
+function isCloseParenOfTemplate(token) {
+ return token.type === "Template" && TEMPLATE_CLOSE_PAREN.test(token.value);
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce consistent spacing before and after keywords",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ fixable: "whitespace",
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ before: { type: "boolean" },
+ after: { type: "boolean" },
+ overrides: {
+ type: "object",
+ properties: KEYS.reduce((retv, key) => {
+ retv[key] = {
+ type: "object",
+ properties: {
+ before: { type: "boolean" },
+ after: { type: "boolean" }
+ },
+ additionalProperties: false
+ };
+ return retv;
+ }, {}),
+ additionalProperties: false
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+
+ /**
+ * Reports a given token if there are not space(s) before the token.
+ *
+ * @param {Token} token - A token to report.
+ * @param {RegExp|undefined} pattern - Optional. A pattern of the previous
+ * token to check.
+ * @returns {void}
+ */
+ function expectSpaceBefore(token, pattern) {
+ pattern = pattern || PREV_TOKEN;
+
+ const prevToken = sourceCode.getTokenBefore(token);
+
+ if (prevToken &&
+ (CHECK_TYPE.test(prevToken.type) || pattern.test(prevToken.value)) &&
+ !isOpenParenOfTemplate(prevToken) &&
+ astUtils.isTokenOnSameLine(prevToken, token) &&
+ !sourceCode.isSpaceBetweenTokens(prevToken, token)
+ ) {
+ context.report({
+ loc: token.loc.start,
+ message: "Expected space(s) before \"{{value}}\".",
+ data: token,
+ fix(fixer) {
+ return fixer.insertTextBefore(token, " ");
+ }
+ });
+ }
+ }
+
+ /**
+ * Reports a given token if there are space(s) before the token.
+ *
+ * @param {Token} token - A token to report.
+ * @param {RegExp|undefined} pattern - Optional. A pattern of the previous
+ * token to check.
+ * @returns {void}
+ */
+ function unexpectSpaceBefore(token, pattern) {
+ pattern = pattern || PREV_TOKEN;
+
+ const prevToken = sourceCode.getTokenBefore(token);
+
+ if (prevToken &&
+ (CHECK_TYPE.test(prevToken.type) || pattern.test(prevToken.value)) &&
+ !isOpenParenOfTemplate(prevToken) &&
+ astUtils.isTokenOnSameLine(prevToken, token) &&
+ sourceCode.isSpaceBetweenTokens(prevToken, token)
+ ) {
+ context.report({
+ loc: token.loc.start,
+ message: "Unexpected space(s) before \"{{value}}\".",
+ data: token,
+ fix(fixer) {
+ return fixer.removeRange([prevToken.range[1], token.range[0]]);
+ }
+ });
+ }
+ }
+
+ /**
+ * Reports a given token if there are not space(s) after the token.
+ *
+ * @param {Token} token - A token to report.
+ * @param {RegExp|undefined} pattern - Optional. A pattern of the next
+ * token to check.
+ * @returns {void}
+ */
+ function expectSpaceAfter(token, pattern) {
+ pattern = pattern || NEXT_TOKEN;
+
+ const nextToken = sourceCode.getTokenAfter(token);
+
+ if (nextToken &&
+ (CHECK_TYPE.test(nextToken.type) || pattern.test(nextToken.value)) &&
+ !isCloseParenOfTemplate(nextToken) &&
+ astUtils.isTokenOnSameLine(token, nextToken) &&
+ !sourceCode.isSpaceBetweenTokens(token, nextToken)
+ ) {
+ context.report({
+ loc: token.loc.start,
+ message: "Expected space(s) after \"{{value}}\".",
+ data: token,
+ fix(fixer) {
+ return fixer.insertTextAfter(token, " ");
+ }
+ });
+ }
+ }
+
+ /**
+ * Reports a given token if there are space(s) after the token.
+ *
+ * @param {Token} token - A token to report.
+ * @param {RegExp|undefined} pattern - Optional. A pattern of the next
+ * token to check.
+ * @returns {void}
+ */
+ function unexpectSpaceAfter(token, pattern) {
+ pattern = pattern || NEXT_TOKEN;
+
+ const nextToken = sourceCode.getTokenAfter(token);
+
+ if (nextToken &&
+ (CHECK_TYPE.test(nextToken.type) || pattern.test(nextToken.value)) &&
+ !isCloseParenOfTemplate(nextToken) &&
+ astUtils.isTokenOnSameLine(token, nextToken) &&
+ sourceCode.isSpaceBetweenTokens(token, nextToken)
+ ) {
+ context.report({
+ loc: token.loc.start,
+ message: "Unexpected space(s) after \"{{value}}\".",
+ data: token,
+ fix(fixer) {
+ return fixer.removeRange([token.range[1], nextToken.range[0]]);
+ }
+ });
+ }
+ }
+
+ /**
+ * Parses the option object and determines check methods for each keyword.
+ *
+ * @param {Object|undefined} options - The option object to parse.
+ * @returns {Object} - Normalized option object.
+ * Keys are keywords (there are for every keyword).
+ * Values are instances of `{"before": function, "after": function}`.
+ */
+ function parseOptions(options) {
+ const before = !options || options.before !== false;
+ const after = !options || options.after !== false;
+ const defaultValue = {
+ before: before ? expectSpaceBefore : unexpectSpaceBefore,
+ after: after ? expectSpaceAfter : unexpectSpaceAfter
+ };
+ const overrides = (options && options.overrides) || {};
+ const retv = Object.create(null);
+
+ for (let i = 0; i < KEYS.length; ++i) {
+ const key = KEYS[i];
+ const override = overrides[key];
+
+ if (override) {
+ const thisBefore = ("before" in override) ? override.before : before;
+ const thisAfter = ("after" in override) ? override.after : after;
+
+ retv[key] = {
+ before: thisBefore ? expectSpaceBefore : unexpectSpaceBefore,
+ after: thisAfter ? expectSpaceAfter : unexpectSpaceAfter
+ };
+ } else {
+ retv[key] = defaultValue;
+ }
+ }
+
+ return retv;
+ }
+
+ const checkMethodMap = parseOptions(context.options[0]);
+
+ /**
+ * Reports a given token if usage of spacing followed by the token is
+ * invalid.
+ *
+ * @param {Token} token - A token to report.
+ * @param {RegExp|undefined} pattern - Optional. A pattern of the previous
+ * token to check.
+ * @returns {void}
+ */
+ function checkSpacingBefore(token, pattern) {
+ checkMethodMap[token.value].before(token, pattern);
+ }
+
+ /**
+ * Reports a given token if usage of spacing preceded by the token is
+ * invalid.
+ *
+ * @param {Token} token - A token to report.
+ * @param {RegExp|undefined} pattern - Optional. A pattern of the next
+ * token to check.
+ * @returns {void}
+ */
+ function checkSpacingAfter(token, pattern) {
+ checkMethodMap[token.value].after(token, pattern);
+ }
+
+ /**
+ * Reports a given token if usage of spacing around the token is invalid.
+ *
+ * @param {Token} token - A token to report.
+ * @returns {void}
+ */
+ function checkSpacingAround(token) {
+ checkSpacingBefore(token);
+ checkSpacingAfter(token);
+ }
+
+ /**
+ * Reports the first token of a given node if the first token is a keyword
+ * and usage of spacing around the token is invalid.
+ *
+ * @param {ASTNode|null} node - A node to report.
+ * @returns {void}
+ */
+ function checkSpacingAroundFirstToken(node) {
+ const firstToken = node && sourceCode.getFirstToken(node);
+
+ if (firstToken && firstToken.type === "Keyword") {
+ checkSpacingAround(firstToken);
+ }
+ }
+
+ /**
+ * Reports the first token of a given node if the first token is a keyword
+ * and usage of spacing followed by the token is invalid.
+ *
+ * This is used for unary operators (e.g. `typeof`), `function`, and `super`.
+ * Other rules are handling usage of spacing preceded by those keywords.
+ *
+ * @param {ASTNode|null} node - A node to report.
+ * @returns {void}
+ */
+ function checkSpacingBeforeFirstToken(node) {
+ const firstToken = node && sourceCode.getFirstToken(node);
+
+ if (firstToken && firstToken.type === "Keyword") {
+ checkSpacingBefore(firstToken);
+ }
+ }
+
+ /**
+ * Reports the previous token of a given node if the token is a keyword and
+ * usage of spacing around the token is invalid.
+ *
+ * @param {ASTNode|null} node - A node to report.
+ * @returns {void}
+ */
+ function checkSpacingAroundTokenBefore(node) {
+ if (node) {
+ const token = sourceCode.getTokenBefore(node, astUtils.isKeywordToken);
+
+ checkSpacingAround(token);
+ }
+ }
+
+ /**
+ * Reports `async` or `function` keywords of a given node if usage of
+ * spacing around those keywords is invalid.
+ *
+ * @param {ASTNode} node - A node to report.
+ * @returns {void}
+ */
+ function checkSpacingForFunction(node) {
+ const firstToken = node && sourceCode.getFirstToken(node);
+
+ if (firstToken &&
+ ((firstToken.type === "Keyword" && firstToken.value === "function") ||
+ firstToken.value === "async")
+ ) {
+ checkSpacingBefore(firstToken);
+ }
+ }
+
+ /**
+ * Reports `class` and `extends` keywords of a given node if usage of
+ * spacing around those keywords is invalid.
+ *
+ * @param {ASTNode} node - A node to report.
+ * @returns {void}
+ */
+ function checkSpacingForClass(node) {
+ checkSpacingAroundFirstToken(node);
+ checkSpacingAroundTokenBefore(node.superClass);
+ }
+
+ /**
+ * Reports `if` and `else` keywords of a given node if usage of spacing
+ * around those keywords is invalid.
+ *
+ * @param {ASTNode} node - A node to report.
+ * @returns {void}
+ */
+ function checkSpacingForIfStatement(node) {
+ checkSpacingAroundFirstToken(node);
+ checkSpacingAroundTokenBefore(node.alternate);
+ }
+
+ /**
+ * Reports `try`, `catch`, and `finally` keywords of a given node if usage
+ * of spacing around those keywords is invalid.
+ *
+ * @param {ASTNode} node - A node to report.
+ * @returns {void}
+ */
+ function checkSpacingForTryStatement(node) {
+ checkSpacingAroundFirstToken(node);
+ checkSpacingAroundFirstToken(node.handler);
+ checkSpacingAroundTokenBefore(node.finalizer);
+ }
+
+ /**
+ * Reports `do` and `while` keywords of a given node if usage of spacing
+ * around those keywords is invalid.
+ *
+ * @param {ASTNode} node - A node to report.
+ * @returns {void}
+ */
+ function checkSpacingForDoWhileStatement(node) {
+ checkSpacingAroundFirstToken(node);
+ checkSpacingAroundTokenBefore(node.test);
+ }
+
+ /**
+ * Reports `for` and `in` keywords of a given node if usage of spacing
+ * around those keywords is invalid.
+ *
+ * @param {ASTNode} node - A node to report.
+ * @returns {void}
+ */
+ function checkSpacingForForInStatement(node) {
+ checkSpacingAroundFirstToken(node);
+ checkSpacingAroundTokenBefore(node.right);
+ }
+
+ /**
+ * Reports `for` and `of` keywords of a given node if usage of spacing
+ * around those keywords is invalid.
+ *
+ * @param {ASTNode} node - A node to report.
+ * @returns {void}
+ */
+ function checkSpacingForForOfStatement(node) {
+ checkSpacingAroundFirstToken(node);
+ checkSpacingAround(sourceCode.getTokenBefore(node.right, astUtils.isNotOpeningParenToken));
+ }
+
+ /**
+ * Reports `import`, `export`, `as`, and `from` keywords of a given node if
+ * usage of spacing around those keywords is invalid.
+ *
+ * This rule handles the `*` token in module declarations.
+ *
+ * import*as A from "./a"; /*error Expected space(s) after "import".
+ * error Expected space(s) before "as".
+ *
+ * @param {ASTNode} node - A node to report.
+ * @returns {void}
+ */
+ function checkSpacingForModuleDeclaration(node) {
+ const firstToken = sourceCode.getFirstToken(node);
+
+ checkSpacingBefore(firstToken, PREV_TOKEN_M);
+ checkSpacingAfter(firstToken, NEXT_TOKEN_M);
+
+ if (node.source) {
+ const fromToken = sourceCode.getTokenBefore(node.source);
+
+ checkSpacingBefore(fromToken, PREV_TOKEN_M);
+ checkSpacingAfter(fromToken, NEXT_TOKEN_M);
+ }
+ }
+
+ /**
+ * Reports `as` keyword of a given node if usage of spacing around this
+ * keyword is invalid.
+ *
+ * @param {ASTNode} node - A node to report.
+ * @returns {void}
+ */
+ function checkSpacingForImportNamespaceSpecifier(node) {
+ const asToken = sourceCode.getFirstToken(node, 1);
+
+ checkSpacingBefore(asToken, PREV_TOKEN_M);
+ }
+
+ /**
+ * Reports `static`, `get`, and `set` keywords of a given node if usage of
+ * spacing around those keywords is invalid.
+ *
+ * @param {ASTNode} node - A node to report.
+ * @returns {void}
+ */
+ function checkSpacingForProperty(node) {
+ if (node.static) {
+ checkSpacingAroundFirstToken(node);
+ }
+ if (node.kind === "get" ||
+ node.kind === "set" ||
+ (
+ (node.method || node.type === "MethodDefinition") &&
+ node.value.async
+ )
+ ) {
+ const token = sourceCode.getTokenBefore(
+ node.key,
+ tok => {
+ switch (tok.value) {
+ case "get":
+ case "set":
+ case "async":
+ return true;
+ default:
+ return false;
+ }
+ }
+ );
+
+ if (!token) {
+ throw new Error("Failed to find token get, set, or async beside method name");
+ }
+
+
+ checkSpacingAround(token);
+ }
+ }
+
+ /**
+ * Reports `await` keyword of a given node if usage of spacing before
+ * this keyword is invalid.
+ *
+ * @param {ASTNode} node - A node to report.
+ * @returns {void}
+ */
+ function checkSpacingForAwaitExpression(node) {
+ checkSpacingBefore(sourceCode.getFirstToken(node));
+ }
+
+ return {
+
+ // Statements
+ DebuggerStatement: checkSpacingAroundFirstToken,
+ WithStatement: checkSpacingAroundFirstToken,
+
+ // Statements - Control flow
+ BreakStatement: checkSpacingAroundFirstToken,
+ ContinueStatement: checkSpacingAroundFirstToken,
+ ReturnStatement: checkSpacingAroundFirstToken,
+ ThrowStatement: checkSpacingAroundFirstToken,
+ TryStatement: checkSpacingForTryStatement,
+
+ // Statements - Choice
+ IfStatement: checkSpacingForIfStatement,
+ SwitchStatement: checkSpacingAroundFirstToken,
+ SwitchCase: checkSpacingAroundFirstToken,
+
+ // Statements - Loops
+ DoWhileStatement: checkSpacingForDoWhileStatement,
+ ForInStatement: checkSpacingForForInStatement,
+ ForOfStatement: checkSpacingForForOfStatement,
+ ForStatement: checkSpacingAroundFirstToken,
+ WhileStatement: checkSpacingAroundFirstToken,
+
+ // Statements - Declarations
+ ClassDeclaration: checkSpacingForClass,
+ ExportNamedDeclaration: checkSpacingForModuleDeclaration,
+ ExportDefaultDeclaration: checkSpacingAroundFirstToken,
+ ExportAllDeclaration: checkSpacingForModuleDeclaration,
+ FunctionDeclaration: checkSpacingForFunction,
+ ImportDeclaration: checkSpacingForModuleDeclaration,
+ VariableDeclaration: checkSpacingAroundFirstToken,
+
+ // Expressions
+ ArrowFunctionExpression: checkSpacingForFunction,
+ AwaitExpression: checkSpacingForAwaitExpression,
+ ClassExpression: checkSpacingForClass,
+ FunctionExpression: checkSpacingForFunction,
+ NewExpression: checkSpacingBeforeFirstToken,
+ Super: checkSpacingBeforeFirstToken,
+ ThisExpression: checkSpacingBeforeFirstToken,
+ UnaryExpression: checkSpacingBeforeFirstToken,
+ YieldExpression: checkSpacingBeforeFirstToken,
+
+ // Others
+ ImportNamespaceSpecifier: checkSpacingForImportNamespaceSpecifier,
+ MethodDefinition: checkSpacingForProperty,
+ Property: checkSpacingForProperty
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/line-comment-position.js b/tools/node_modules/eslint/lib/rules/line-comment-position.js
new file mode 100644
index 0000000000..0df806cca8
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/line-comment-position.js
@@ -0,0 +1,115 @@
+/**
+ * @fileoverview Rule to enforce the position of line comments
+ * @author Alberto Rodríguez
+ */
+"use strict";
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce position of line comments",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: [
+ {
+ oneOf: [
+ {
+ enum: ["above", "beside"]
+ },
+ {
+ type: "object",
+ properties: {
+ position: {
+ enum: ["above", "beside"]
+ },
+ ignorePattern: {
+ type: "string"
+ },
+ applyDefaultPatterns: {
+ type: "boolean"
+ },
+ applyDefaultIgnorePatterns: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ }
+ ]
+ },
+
+ create(context) {
+ const options = context.options[0];
+
+ let above,
+ ignorePattern,
+ applyDefaultIgnorePatterns = true;
+
+ if (!options || typeof options === "string") {
+ above = !options || options === "above";
+
+ } else {
+ above = options.position === "above";
+ ignorePattern = options.ignorePattern;
+
+ if (options.hasOwnProperty("applyDefaultIgnorePatterns")) {
+ applyDefaultIgnorePatterns = options.applyDefaultIgnorePatterns !== false;
+ } else {
+ applyDefaultIgnorePatterns = options.applyDefaultPatterns !== false;
+ }
+ }
+
+ const defaultIgnoreRegExp = astUtils.COMMENTS_IGNORE_PATTERN;
+ const fallThroughRegExp = /^\s*falls?\s?through/;
+ const customIgnoreRegExp = new RegExp(ignorePattern);
+ const sourceCode = context.getSourceCode();
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+ Program() {
+ const comments = sourceCode.getAllComments();
+
+ comments.filter(token => token.type === "Line").forEach(node => {
+ if (applyDefaultIgnorePatterns && (defaultIgnoreRegExp.test(node.value) || fallThroughRegExp.test(node.value))) {
+ return;
+ }
+
+ if (ignorePattern && customIgnoreRegExp.test(node.value)) {
+ return;
+ }
+
+ const previous = sourceCode.getTokenBefore(node, { includeComments: true });
+ const isOnSameLine = previous && previous.loc.end.line === node.loc.start.line;
+
+ if (above) {
+ if (isOnSameLine) {
+ context.report({
+ node,
+ message: "Expected comment to be above code."
+ });
+ }
+ } else {
+ if (!isOnSameLine) {
+ context.report({
+ node,
+ message: "Expected comment to be beside code."
+ });
+ }
+ }
+ });
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/linebreak-style.js b/tools/node_modules/eslint/lib/rules/linebreak-style.js
new file mode 100644
index 0000000000..907bc02ec4
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/linebreak-style.js
@@ -0,0 +1,96 @@
+/**
+ * @fileoverview Rule to enforce a single linebreak style.
+ * @author Erik Mueller
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce consistent linebreak style",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ fixable: "whitespace",
+
+ schema: [
+ {
+ enum: ["unix", "windows"]
+ }
+ ]
+ },
+
+ create(context) {
+
+ const EXPECTED_LF_MSG = "Expected linebreaks to be 'LF' but found 'CRLF'.",
+ EXPECTED_CRLF_MSG = "Expected linebreaks to be 'CRLF' but found 'LF'.";
+
+ const sourceCode = context.getSourceCode();
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ /**
+ * Builds a fix function that replaces text at the specified range in the source text.
+ * @param {int[]} range The range to replace
+ * @param {string} text The text to insert.
+ * @returns {Function} Fixer function
+ * @private
+ */
+ function createFix(range, text) {
+ return function(fixer) {
+ return fixer.replaceTextRange(range, text);
+ };
+ }
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+ Program: function checkForlinebreakStyle(node) {
+ const linebreakStyle = context.options[0] || "unix",
+ expectedLF = linebreakStyle === "unix",
+ expectedLFChars = expectedLF ? "\n" : "\r\n",
+ source = sourceCode.getText(),
+ pattern = astUtils.createGlobalLinebreakMatcher();
+ let match;
+
+ let i = 0;
+
+ while ((match = pattern.exec(source)) !== null) {
+ i++;
+ if (match[0] === expectedLFChars) {
+ continue;
+ }
+
+ const index = match.index;
+ const range = [index, index + match[0].length];
+
+ context.report({
+ node,
+ loc: {
+ line: i,
+ column: sourceCode.lines[i - 1].length
+ },
+ message: expectedLF ? EXPECTED_LF_MSG : EXPECTED_CRLF_MSG,
+ fix: createFix(range, expectedLFChars)
+ });
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/lines-around-comment.js b/tools/node_modules/eslint/lib/rules/lines-around-comment.js
new file mode 100644
index 0000000000..3df9cb86f4
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/lines-around-comment.js
@@ -0,0 +1,397 @@
+/**
+ * @fileoverview Enforces empty lines around comments.
+ * @author Jamund Ferguson
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const lodash = require("lodash"),
+ astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Return an array with with any line numbers that are empty.
+ * @param {Array} lines An array of each line of the file.
+ * @returns {Array} An array of line numbers.
+ */
+function getEmptyLineNums(lines) {
+ const emptyLines = lines.map((line, i) => ({
+ code: line.trim(),
+ num: i + 1
+ })).filter(line => !line.code).map(line => line.num);
+
+ return emptyLines;
+}
+
+/**
+ * Return an array with with any line numbers that contain comments.
+ * @param {Array} comments An array of comment tokens.
+ * @returns {Array} An array of line numbers.
+ */
+function getCommentLineNums(comments) {
+ const lines = [];
+
+ comments.forEach(token => {
+ const start = token.loc.start.line;
+ const end = token.loc.end.line;
+
+ lines.push(start, end);
+ });
+ return lines;
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require empty lines around comments",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ fixable: "whitespace",
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ beforeBlockComment: {
+ type: "boolean"
+ },
+ afterBlockComment: {
+ type: "boolean"
+ },
+ beforeLineComment: {
+ type: "boolean"
+ },
+ afterLineComment: {
+ type: "boolean"
+ },
+ allowBlockStart: {
+ type: "boolean"
+ },
+ allowBlockEnd: {
+ type: "boolean"
+ },
+ allowClassStart: {
+ type: "boolean"
+ },
+ allowClassEnd: {
+ type: "boolean"
+ },
+ allowObjectStart: {
+ type: "boolean"
+ },
+ allowObjectEnd: {
+ type: "boolean"
+ },
+ allowArrayStart: {
+ type: "boolean"
+ },
+ allowArrayEnd: {
+ type: "boolean"
+ },
+ ignorePattern: {
+ type: "string"
+ },
+ applyDefaultIgnorePatterns: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+
+ const options = context.options[0] ? Object.assign({}, context.options[0]) : {};
+ const ignorePattern = options.ignorePattern;
+ const defaultIgnoreRegExp = astUtils.COMMENTS_IGNORE_PATTERN;
+ const customIgnoreRegExp = new RegExp(ignorePattern);
+ const applyDefaultIgnorePatterns = options.applyDefaultIgnorePatterns !== false;
+
+
+ options.beforeLineComment = options.beforeLineComment || false;
+ options.afterLineComment = options.afterLineComment || false;
+ options.beforeBlockComment = typeof options.beforeBlockComment !== "undefined" ? options.beforeBlockComment : true;
+ options.afterBlockComment = options.afterBlockComment || false;
+ options.allowBlockStart = options.allowBlockStart || false;
+ options.allowBlockEnd = options.allowBlockEnd || false;
+
+ const sourceCode = context.getSourceCode();
+
+ const lines = sourceCode.lines,
+ numLines = lines.length + 1,
+ comments = sourceCode.getAllComments(),
+ commentLines = getCommentLineNums(comments),
+ emptyLines = getEmptyLineNums(lines),
+ commentAndEmptyLines = commentLines.concat(emptyLines);
+
+ /**
+ * Returns whether or not comments are on lines starting with or ending with code
+ * @param {token} token The comment token to check.
+ * @returns {boolean} True if the comment is not alone.
+ */
+ function codeAroundComment(token) {
+ let currentToken = token;
+
+ do {
+ currentToken = sourceCode.getTokenBefore(currentToken, { includeComments: true });
+ } while (currentToken && astUtils.isCommentToken(currentToken));
+
+ if (currentToken && astUtils.isTokenOnSameLine(currentToken, token)) {
+ return true;
+ }
+
+ currentToken = token;
+ do {
+ currentToken = sourceCode.getTokenAfter(currentToken, { includeComments: true });
+ } while (currentToken && astUtils.isCommentToken(currentToken));
+
+ if (currentToken && astUtils.isTokenOnSameLine(token, currentToken)) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Returns whether or not comments are inside a node type or not.
+ * @param {ASTNode} parent The Comment parent node.
+ * @param {string} nodeType The parent type to check against.
+ * @returns {boolean} True if the comment is inside nodeType.
+ */
+ function isParentNodeType(parent, nodeType) {
+ return parent.type === nodeType ||
+ (parent.body && parent.body.type === nodeType) ||
+ (parent.consequent && parent.consequent.type === nodeType);
+ }
+
+ /**
+ * Returns the parent node that contains the given token.
+ * @param {token} token The token to check.
+ * @returns {ASTNode} The parent node that contains the given token.
+ */
+ function getParentNodeOfToken(token) {
+ return sourceCode.getNodeByRangeIndex(token.range[0]);
+ }
+
+ /**
+ * Returns whether or not comments are at the parent start or not.
+ * @param {token} token The Comment token.
+ * @param {string} nodeType The parent type to check against.
+ * @returns {boolean} True if the comment is at parent start.
+ */
+ function isCommentAtParentStart(token, nodeType) {
+ const parent = getParentNodeOfToken(token);
+
+ return parent && isParentNodeType(parent, nodeType) &&
+ token.loc.start.line - parent.loc.start.line === 1;
+ }
+
+ /**
+ * Returns whether or not comments are at the parent end or not.
+ * @param {token} token The Comment token.
+ * @param {string} nodeType The parent type to check against.
+ * @returns {boolean} True if the comment is at parent end.
+ */
+ function isCommentAtParentEnd(token, nodeType) {
+ const parent = getParentNodeOfToken(token);
+
+ return parent && isParentNodeType(parent, nodeType) &&
+ parent.loc.end.line - token.loc.end.line === 1;
+ }
+
+ /**
+ * Returns whether or not comments are at the block start or not.
+ * @param {token} token The Comment token.
+ * @returns {boolean} True if the comment is at block start.
+ */
+ function isCommentAtBlockStart(token) {
+ return isCommentAtParentStart(token, "ClassBody") || isCommentAtParentStart(token, "BlockStatement") || isCommentAtParentStart(token, "SwitchCase");
+ }
+
+ /**
+ * Returns whether or not comments are at the block end or not.
+ * @param {token} token The Comment token.
+ * @returns {boolean} True if the comment is at block end.
+ */
+ function isCommentAtBlockEnd(token) {
+ return isCommentAtParentEnd(token, "ClassBody") || isCommentAtParentEnd(token, "BlockStatement") || isCommentAtParentEnd(token, "SwitchCase") || isCommentAtParentEnd(token, "SwitchStatement");
+ }
+
+ /**
+ * Returns whether or not comments are at the class start or not.
+ * @param {token} token The Comment token.
+ * @returns {boolean} True if the comment is at class start.
+ */
+ function isCommentAtClassStart(token) {
+ return isCommentAtParentStart(token, "ClassBody");
+ }
+
+ /**
+ * Returns whether or not comments are at the class end or not.
+ * @param {token} token The Comment token.
+ * @returns {boolean} True if the comment is at class end.
+ */
+ function isCommentAtClassEnd(token) {
+ return isCommentAtParentEnd(token, "ClassBody");
+ }
+
+ /**
+ * Returns whether or not comments are at the object start or not.
+ * @param {token} token The Comment token.
+ * @returns {boolean} True if the comment is at object start.
+ */
+ function isCommentAtObjectStart(token) {
+ return isCommentAtParentStart(token, "ObjectExpression") || isCommentAtParentStart(token, "ObjectPattern");
+ }
+
+ /**
+ * Returns whether or not comments are at the object end or not.
+ * @param {token} token The Comment token.
+ * @returns {boolean} True if the comment is at object end.
+ */
+ function isCommentAtObjectEnd(token) {
+ return isCommentAtParentEnd(token, "ObjectExpression") || isCommentAtParentEnd(token, "ObjectPattern");
+ }
+
+ /**
+ * Returns whether or not comments are at the array start or not.
+ * @param {token} token The Comment token.
+ * @returns {boolean} True if the comment is at array start.
+ */
+ function isCommentAtArrayStart(token) {
+ return isCommentAtParentStart(token, "ArrayExpression") || isCommentAtParentStart(token, "ArrayPattern");
+ }
+
+ /**
+ * Returns whether or not comments are at the array end or not.
+ * @param {token} token The Comment token.
+ * @returns {boolean} True if the comment is at array end.
+ */
+ function isCommentAtArrayEnd(token) {
+ return isCommentAtParentEnd(token, "ArrayExpression") || isCommentAtParentEnd(token, "ArrayPattern");
+ }
+
+ /**
+ * Checks if a comment token has lines around it (ignores inline comments)
+ * @param {token} token The Comment token.
+ * @param {Object} opts Options to determine the newline.
+ * @param {boolean} opts.after Should have a newline after this line.
+ * @param {boolean} opts.before Should have a newline before this line.
+ * @returns {void}
+ */
+ function checkForEmptyLine(token, opts) {
+ if (applyDefaultIgnorePatterns && defaultIgnoreRegExp.test(token.value)) {
+ return;
+ }
+
+ if (ignorePattern && customIgnoreRegExp.test(token.value)) {
+ return;
+ }
+
+ let after = opts.after,
+ before = opts.before;
+
+ const prevLineNum = token.loc.start.line - 1,
+ nextLineNum = token.loc.end.line + 1,
+ commentIsNotAlone = codeAroundComment(token);
+
+ const blockStartAllowed = options.allowBlockStart &&
+ isCommentAtBlockStart(token) &&
+ !(options.allowClassStart === false &&
+ isCommentAtClassStart(token)),
+ blockEndAllowed = options.allowBlockEnd && isCommentAtBlockEnd(token) && !(options.allowClassEnd === false && isCommentAtClassEnd(token)),
+ classStartAllowed = options.allowClassStart && isCommentAtClassStart(token),
+ classEndAllowed = options.allowClassEnd && isCommentAtClassEnd(token),
+ objectStartAllowed = options.allowObjectStart && isCommentAtObjectStart(token),
+ objectEndAllowed = options.allowObjectEnd && isCommentAtObjectEnd(token),
+ arrayStartAllowed = options.allowArrayStart && isCommentAtArrayStart(token),
+ arrayEndAllowed = options.allowArrayEnd && isCommentAtArrayEnd(token);
+
+ const exceptionStartAllowed = blockStartAllowed || classStartAllowed || objectStartAllowed || arrayStartAllowed;
+ const exceptionEndAllowed = blockEndAllowed || classEndAllowed || objectEndAllowed || arrayEndAllowed;
+
+ // ignore top of the file and bottom of the file
+ if (prevLineNum < 1) {
+ before = false;
+ }
+ if (nextLineNum >= numLines) {
+ after = false;
+ }
+
+ // we ignore all inline comments
+ if (commentIsNotAlone) {
+ return;
+ }
+
+ const previousTokenOrComment = sourceCode.getTokenBefore(token, { includeComments: true });
+ const nextTokenOrComment = sourceCode.getTokenAfter(token, { includeComments: true });
+
+ // check for newline before
+ if (!exceptionStartAllowed && before && !lodash.includes(commentAndEmptyLines, prevLineNum) &&
+ !(astUtils.isCommentToken(previousTokenOrComment) && astUtils.isTokenOnSameLine(previousTokenOrComment, token))) {
+ const lineStart = token.range[0] - token.loc.start.column;
+ const range = [lineStart, lineStart];
+
+ context.report({
+ node: token,
+ message: "Expected line before comment.",
+ fix(fixer) {
+ return fixer.insertTextBeforeRange(range, "\n");
+ }
+ });
+ }
+
+ // check for newline after
+ if (!exceptionEndAllowed && after && !lodash.includes(commentAndEmptyLines, nextLineNum) &&
+ !(astUtils.isCommentToken(nextTokenOrComment) && astUtils.isTokenOnSameLine(token, nextTokenOrComment))) {
+ context.report({
+ node: token,
+ message: "Expected line after comment.",
+ fix(fixer) {
+ return fixer.insertTextAfter(token, "\n");
+ }
+ });
+ }
+
+ }
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+ Program() {
+ comments.forEach(token => {
+ if (token.type === "Line") {
+ if (options.beforeLineComment || options.afterLineComment) {
+ checkForEmptyLine(token, {
+ after: options.afterLineComment,
+ before: options.beforeLineComment
+ });
+ }
+ } else if (token.type === "Block") {
+ if (options.beforeBlockComment || options.afterBlockComment) {
+ checkForEmptyLine(token, {
+ after: options.afterBlockComment,
+ before: options.beforeBlockComment
+ });
+ }
+ }
+ });
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/lines-around-directive.js b/tools/node_modules/eslint/lib/rules/lines-around-directive.js
new file mode 100644
index 0000000000..b560009f71
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/lines-around-directive.js
@@ -0,0 +1,193 @@
+/**
+ * @fileoverview Require or disallow newlines around directives.
+ * @author Kai Cataldo
+ * @deprecated
+ */
+
+"use strict";
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require or disallow newlines around directives",
+ category: "Stylistic Issues",
+ recommended: false,
+ replacedBy: ["padding-line-between-statements"]
+ },
+ schema: [{
+ oneOf: [
+ {
+ enum: ["always", "never"]
+ },
+ {
+ type: "object",
+ properties: {
+ before: {
+ enum: ["always", "never"]
+ },
+ after: {
+ enum: ["always", "never"]
+ }
+ },
+ additionalProperties: false,
+ minProperties: 2
+ }
+ ]
+ }],
+ fixable: "whitespace",
+ deprecated: true
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+ const config = context.options[0] || "always";
+ const expectLineBefore = typeof config === "string" ? config : config.before;
+ const expectLineAfter = typeof config === "string" ? config : config.after;
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ /**
+ * Check if node is preceded by a blank newline.
+ * @param {ASTNode} node Node to check.
+ * @returns {boolean} Whether or not the passed in node is preceded by a blank newline.
+ */
+ function hasNewlineBefore(node) {
+ const tokenBefore = sourceCode.getTokenBefore(node, { includeComments: true });
+ const tokenLineBefore = tokenBefore ? tokenBefore.loc.end.line : 0;
+
+ return node.loc.start.line - tokenLineBefore >= 2;
+ }
+
+ /**
+ * Gets the last token of a node that is on the same line as the rest of the node.
+ * This will usually be the last token of the node, but it will be the second-to-last token if the node has a trailing
+ * semicolon on a different line.
+ * @param {ASTNode} node A directive node
+ * @returns {Token} The last token of the node on the line
+ */
+ function getLastTokenOnLine(node) {
+ const lastToken = sourceCode.getLastToken(node);
+ const secondToLastToken = sourceCode.getTokenBefore(lastToken);
+
+ return astUtils.isSemicolonToken(lastToken) && lastToken.loc.start.line > secondToLastToken.loc.end.line
+ ? secondToLastToken
+ : lastToken;
+ }
+
+ /**
+ * Check if node is followed by a blank newline.
+ * @param {ASTNode} node Node to check.
+ * @returns {boolean} Whether or not the passed in node is followed by a blank newline.
+ */
+ function hasNewlineAfter(node) {
+ const lastToken = getLastTokenOnLine(node);
+ const tokenAfter = sourceCode.getTokenAfter(lastToken, { includeComments: true });
+
+ return tokenAfter.loc.start.line - lastToken.loc.end.line >= 2;
+ }
+
+ /**
+ * Report errors for newlines around directives.
+ * @param {ASTNode} node Node to check.
+ * @param {string} location Whether the error was found before or after the directive.
+ * @param {boolean} expected Whether or not a newline was expected or unexpected.
+ * @returns {void}
+ */
+ function reportError(node, location, expected) {
+ context.report({
+ node,
+ message: "{{expected}} newline {{location}} \"{{value}}\" directive.",
+ data: {
+ expected: expected ? "Expected" : "Unexpected",
+ value: node.expression.value,
+ location
+ },
+ fix(fixer) {
+ const lastToken = getLastTokenOnLine(node);
+
+ if (expected) {
+ return location === "before" ? fixer.insertTextBefore(node, "\n") : fixer.insertTextAfter(lastToken, "\n");
+ }
+ return fixer.removeRange(location === "before" ? [node.range[0] - 1, node.range[0]] : [lastToken.range[1], lastToken.range[1] + 1]);
+ }
+ });
+ }
+
+ /**
+ * Check lines around directives in node
+ * @param {ASTNode} node - node to check
+ * @returns {void}
+ */
+ function checkDirectives(node) {
+ const directives = astUtils.getDirectivePrologue(node);
+
+ if (!directives.length) {
+ return;
+ }
+
+ const firstDirective = directives[0];
+ const leadingComments = sourceCode.getCommentsBefore(firstDirective);
+
+ /*
+ * Only check before the first directive if it is preceded by a comment or if it is at the top of
+ * the file and expectLineBefore is set to "never". This is to not force a newline at the top of
+ * the file if there are no comments as well as for compatibility with padded-blocks.
+ */
+ if (leadingComments.length) {
+ if (expectLineBefore === "always" && !hasNewlineBefore(firstDirective)) {
+ reportError(firstDirective, "before", true);
+ }
+
+ if (expectLineBefore === "never" && hasNewlineBefore(firstDirective)) {
+ reportError(firstDirective, "before", false);
+ }
+ } else if (
+ node.type === "Program" &&
+ expectLineBefore === "never" &&
+ !leadingComments.length &&
+ hasNewlineBefore(firstDirective)
+ ) {
+ reportError(firstDirective, "before", false);
+ }
+
+ const lastDirective = directives[directives.length - 1];
+ const statements = node.type === "Program" ? node.body : node.body.body;
+
+ /*
+ * Do not check after the last directive if the body only
+ * contains a directive prologue and isn't followed by a comment to ensure
+ * this rule behaves well with padded-blocks.
+ */
+ if (lastDirective === statements[statements.length - 1] && !lastDirective.trailingComments) {
+ return;
+ }
+
+ if (expectLineAfter === "always" && !hasNewlineAfter(lastDirective)) {
+ reportError(lastDirective, "after", true);
+ }
+
+ if (expectLineAfter === "never" && hasNewlineAfter(lastDirective)) {
+ reportError(lastDirective, "after", false);
+ }
+ }
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+ Program: checkDirectives,
+ FunctionDeclaration: checkDirectives,
+ FunctionExpression: checkDirectives,
+ ArrowFunctionExpression: checkDirectives
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/lines-between-class-members.js b/tools/node_modules/eslint/lib/rules/lines-between-class-members.js
new file mode 100644
index 0000000000..85e8c69358
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/lines-between-class-members.js
@@ -0,0 +1,91 @@
+/**
+ * @fileoverview Rule to check empty newline between class members
+ * @author 薛定谔的猫<hh_2013@foxmail.com>
+ */
+"use strict";
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require or disallow an empty line between class members",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ fixable: "whitespace",
+
+ schema: [
+ {
+ enum: ["always", "never"]
+ },
+ {
+ type: "object",
+ properties: {
+ exceptAfterSingleLine: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+
+ const options = [];
+
+ options[0] = context.options[0] || "always";
+ options[1] = context.options[1] || { exceptAfterSingleLine: false };
+
+ const ALWAYS_MESSAGE = "Expected blank line between class members.";
+ const NEVER_MESSAGE = "Unexpected blank line between class members.";
+
+ const sourceCode = context.getSourceCode();
+
+ /**
+ * Checks if there is padding between two tokens
+ * @param {Token} first The first token
+ * @param {Token} second The second token
+ * @returns {boolean} True if there is at least a line between the tokens
+ */
+ function isPaddingBetweenTokens(first, second) {
+ return second.loc.start.line - first.loc.end.line >= 2;
+ }
+
+ return {
+ ClassBody(node) {
+ const body = node.body;
+
+ for (let i = 0; i < body.length - 1; i++) {
+ const curFirst = sourceCode.getFirstToken(body[i]);
+ const curLast = sourceCode.getLastToken(body[i]);
+ const comments = sourceCode.getCommentsBefore(body[i + 1]);
+ const nextFirst = comments.length ? comments[0] : sourceCode.getFirstToken(body[i + 1]);
+ const isPadded = isPaddingBetweenTokens(curLast, nextFirst);
+ const isMulti = !astUtils.isTokenOnSameLine(curFirst, curLast);
+ const skip = !isMulti && options[1].exceptAfterSingleLine;
+
+
+ if ((options[0] === "always" && !skip && !isPadded) ||
+ (options[0] === "never" && isPadded)) {
+ context.report({
+ node: body[i + 1],
+ message: isPadded ? NEVER_MESSAGE : ALWAYS_MESSAGE,
+ fix(fixer) {
+ return isPadded
+ ? fixer.replaceTextRange([curLast.range[1], nextFirst.range[0]], "\n")
+ : fixer.insertTextAfter(curLast, "\n");
+ }
+ });
+ }
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/max-depth.js b/tools/node_modules/eslint/lib/rules/max-depth.js
new file mode 100644
index 0000000000..74c13ffa9f
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/max-depth.js
@@ -0,0 +1,148 @@
+/**
+ * @fileoverview A rule to set the maximum depth block can be nested in a function.
+ * @author Ian Christian Myers
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce a maximum depth that blocks can be nested",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: [
+ {
+ oneOf: [
+ {
+ type: "integer",
+ minimum: 0
+ },
+ {
+ type: "object",
+ properties: {
+ maximum: {
+ type: "integer",
+ minimum: 0
+ },
+ max: {
+ type: "integer",
+ minimum: 0
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ }
+ ]
+ },
+
+ create(context) {
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ const functionStack = [],
+ option = context.options[0];
+ let maxDepth = 4;
+
+ if (typeof option === "object" && option.hasOwnProperty("maximum") && typeof option.maximum === "number") {
+ maxDepth = option.maximum;
+ }
+ if (typeof option === "object" && option.hasOwnProperty("max") && typeof option.max === "number") {
+ maxDepth = option.max;
+ }
+ if (typeof option === "number") {
+ maxDepth = option;
+ }
+
+ /**
+ * When parsing a new function, store it in our function stack
+ * @returns {void}
+ * @private
+ */
+ function startFunction() {
+ functionStack.push(0);
+ }
+
+ /**
+ * When parsing is done then pop out the reference
+ * @returns {void}
+ * @private
+ */
+ function endFunction() {
+ functionStack.pop();
+ }
+
+ /**
+ * Save the block and Evaluate the node
+ * @param {ASTNode} node node to evaluate
+ * @returns {void}
+ * @private
+ */
+ function pushBlock(node) {
+ const len = ++functionStack[functionStack.length - 1];
+
+ if (len > maxDepth) {
+ context.report({ node, message: "Blocks are nested too deeply ({{depth}}).", data: { depth: len } });
+ }
+ }
+
+ /**
+ * Pop the saved block
+ * @returns {void}
+ * @private
+ */
+ function popBlock() {
+ functionStack[functionStack.length - 1]--;
+ }
+
+ //--------------------------------------------------------------------------
+ // Public API
+ //--------------------------------------------------------------------------
+
+ return {
+ Program: startFunction,
+ FunctionDeclaration: startFunction,
+ FunctionExpression: startFunction,
+ ArrowFunctionExpression: startFunction,
+
+ IfStatement(node) {
+ if (node.parent.type !== "IfStatement") {
+ pushBlock(node);
+ }
+ },
+ SwitchStatement: pushBlock,
+ TryStatement: pushBlock,
+ DoWhileStatement: pushBlock,
+ WhileStatement: pushBlock,
+ WithStatement: pushBlock,
+ ForStatement: pushBlock,
+ ForInStatement: pushBlock,
+ ForOfStatement: pushBlock,
+
+ "IfStatement:exit": popBlock,
+ "SwitchStatement:exit": popBlock,
+ "TryStatement:exit": popBlock,
+ "DoWhileStatement:exit": popBlock,
+ "WhileStatement:exit": popBlock,
+ "WithStatement:exit": popBlock,
+ "ForStatement:exit": popBlock,
+ "ForInStatement:exit": popBlock,
+ "ForOfStatement:exit": popBlock,
+
+ "FunctionDeclaration:exit": endFunction,
+ "FunctionExpression:exit": endFunction,
+ "ArrowFunctionExpression:exit": endFunction,
+ "Program:exit": endFunction
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/max-len.js b/tools/node_modules/eslint/lib/rules/max-len.js
new file mode 100644
index 0000000000..27d549c9c5
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/max-len.js
@@ -0,0 +1,365 @@
+/**
+ * @fileoverview Rule to check for max length on a line.
+ * @author Matt DuVall <http://www.mattduvall.com>
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Constants
+//------------------------------------------------------------------------------
+
+const OPTIONS_SCHEMA = {
+ type: "object",
+ properties: {
+ code: {
+ type: "integer",
+ minimum: 0
+ },
+ comments: {
+ type: "integer",
+ minimum: 0
+ },
+ tabWidth: {
+ type: "integer",
+ minimum: 0
+ },
+ ignorePattern: {
+ type: "string"
+ },
+ ignoreComments: {
+ type: "boolean"
+ },
+ ignoreStrings: {
+ type: "boolean"
+ },
+ ignoreUrls: {
+ type: "boolean"
+ },
+ ignoreTemplateLiterals: {
+ type: "boolean"
+ },
+ ignoreRegExpLiterals: {
+ type: "boolean"
+ },
+ ignoreTrailingComments: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+};
+
+const OPTIONS_OR_INTEGER_SCHEMA = {
+ anyOf: [
+ OPTIONS_SCHEMA,
+ {
+ type: "integer",
+ minimum: 0
+ }
+ ]
+};
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce a maximum line length",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: [
+ OPTIONS_OR_INTEGER_SCHEMA,
+ OPTIONS_OR_INTEGER_SCHEMA,
+ OPTIONS_SCHEMA
+ ]
+ },
+
+ create(context) {
+
+ /*
+ * Inspired by http://tools.ietf.org/html/rfc3986#appendix-B, however:
+ * - They're matching an entire string that we know is a URI
+ * - We're matching part of a string where we think there *might* be a URL
+ * - We're only concerned about URLs, as picking out any URI would cause
+ * too many false positives
+ * - We don't care about matching the entire URL, any small segment is fine
+ */
+ const URL_REGEXP = /[^:/?#]:\/\/[^?#]/;
+
+ const sourceCode = context.getSourceCode();
+
+ /**
+ * Computes the length of a line that may contain tabs. The width of each
+ * tab will be the number of spaces to the next tab stop.
+ * @param {string} line The line.
+ * @param {int} tabWidth The width of each tab stop in spaces.
+ * @returns {int} The computed line length.
+ * @private
+ */
+ function computeLineLength(line, tabWidth) {
+ let extraCharacterCount = 0;
+
+ line.replace(/\t/g, (match, offset) => {
+ const totalOffset = offset + extraCharacterCount,
+ previousTabStopOffset = tabWidth ? totalOffset % tabWidth : 0,
+ spaceCount = tabWidth - previousTabStopOffset;
+
+ extraCharacterCount += spaceCount - 1; // -1 for the replaced tab
+ });
+ return Array.from(line).length + extraCharacterCount;
+ }
+
+ // The options object must be the last option specified…
+ const lastOption = context.options[context.options.length - 1];
+ const options = typeof lastOption === "object" ? Object.create(lastOption) : {};
+
+ // …but max code length…
+ if (typeof context.options[0] === "number") {
+ options.code = context.options[0];
+ }
+
+ // …and tabWidth can be optionally specified directly as integers.
+ if (typeof context.options[1] === "number") {
+ options.tabWidth = context.options[1];
+ }
+
+ const maxLength = options.code || 80,
+ tabWidth = options.tabWidth || 4,
+ ignoreComments = options.ignoreComments || false,
+ ignoreStrings = options.ignoreStrings || false,
+ ignoreTemplateLiterals = options.ignoreTemplateLiterals || false,
+ ignoreRegExpLiterals = options.ignoreRegExpLiterals || false,
+ ignoreTrailingComments = options.ignoreTrailingComments || options.ignoreComments || false,
+ ignoreUrls = options.ignoreUrls || false,
+ maxCommentLength = options.comments;
+ let ignorePattern = options.ignorePattern || null;
+
+ if (ignorePattern) {
+ ignorePattern = new RegExp(ignorePattern);
+ }
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ /**
+ * Tells if a given comment is trailing: it starts on the current line and
+ * extends to or past the end of the current line.
+ * @param {string} line The source line we want to check for a trailing comment on
+ * @param {number} lineNumber The one-indexed line number for line
+ * @param {ASTNode} comment The comment to inspect
+ * @returns {boolean} If the comment is trailing on the given line
+ */
+ function isTrailingComment(line, lineNumber, comment) {
+ return comment &&
+ (comment.loc.start.line === lineNumber && lineNumber <= comment.loc.end.line) &&
+ (comment.loc.end.line > lineNumber || comment.loc.end.column === line.length);
+ }
+
+ /**
+ * Tells if a comment encompasses the entire line.
+ * @param {string} line The source line with a trailing comment
+ * @param {number} lineNumber The one-indexed line number this is on
+ * @param {ASTNode} comment The comment to remove
+ * @returns {boolean} If the comment covers the entire line
+ */
+ function isFullLineComment(line, lineNumber, comment) {
+ const start = comment.loc.start,
+ end = comment.loc.end,
+ isFirstTokenOnLine = !line.slice(0, comment.loc.start.column).trim();
+
+ return comment &&
+ (start.line < lineNumber || (start.line === lineNumber && isFirstTokenOnLine)) &&
+ (end.line > lineNumber || (end.line === lineNumber && end.column === line.length));
+ }
+
+ /**
+ * Gets the line after the comment and any remaining trailing whitespace is
+ * stripped.
+ * @param {string} line The source line with a trailing comment
+ * @param {ASTNode} comment The comment to remove
+ * @returns {string} Line without comment and trailing whitepace
+ */
+ function stripTrailingComment(line, comment) {
+
+ // loc.column is zero-indexed
+ return line.slice(0, comment.loc.start.column).replace(/\s+$/, "");
+ }
+
+ /**
+ * Ensure that an array exists at [key] on `object`, and add `value` to it.
+ *
+ * @param {Object} object the object to mutate
+ * @param {string} key the object's key
+ * @param {*} value the value to add
+ * @returns {void}
+ * @private
+ */
+ function ensureArrayAndPush(object, key, value) {
+ if (!Array.isArray(object[key])) {
+ object[key] = [];
+ }
+ object[key].push(value);
+ }
+
+ /**
+ * Retrieves an array containing all strings (" or ') in the source code.
+ *
+ * @returns {ASTNode[]} An array of string nodes.
+ */
+ function getAllStrings() {
+ return sourceCode.ast.tokens.filter(token => token.type === "String");
+ }
+
+ /**
+ * Retrieves an array containing all template literals in the source code.
+ *
+ * @returns {ASTNode[]} An array of template literal nodes.
+ */
+ function getAllTemplateLiterals() {
+ return sourceCode.ast.tokens.filter(token => token.type === "Template");
+ }
+
+
+ /**
+ * Retrieves an array containing all RegExp literals in the source code.
+ *
+ * @returns {ASTNode[]} An array of RegExp literal nodes.
+ */
+ function getAllRegExpLiterals() {
+ return sourceCode.ast.tokens.filter(token => token.type === "RegularExpression");
+ }
+
+
+ /**
+ * A reducer to group an AST node by line number, both start and end.
+ *
+ * @param {Object} acc the accumulator
+ * @param {ASTNode} node the AST node in question
+ * @returns {Object} the modified accumulator
+ * @private
+ */
+ function groupByLineNumber(acc, node) {
+ for (let i = node.loc.start.line; i <= node.loc.end.line; ++i) {
+ ensureArrayAndPush(acc, i, node);
+ }
+ return acc;
+ }
+
+ /**
+ * Check the program for max length
+ * @param {ASTNode} node Node to examine
+ * @returns {void}
+ * @private
+ */
+ function checkProgramForMaxLength(node) {
+
+ // split (honors line-ending)
+ const lines = sourceCode.lines,
+
+ // list of comments to ignore
+ comments = ignoreComments || maxCommentLength || ignoreTrailingComments ? sourceCode.getAllComments() : [];
+
+ // we iterate over comments in parallel with the lines
+ let commentsIndex = 0;
+
+ const strings = getAllStrings();
+ const stringsByLine = strings.reduce(groupByLineNumber, {});
+
+ const templateLiterals = getAllTemplateLiterals();
+ const templateLiteralsByLine = templateLiterals.reduce(groupByLineNumber, {});
+
+ const regExpLiterals = getAllRegExpLiterals();
+ const regExpLiteralsByLine = regExpLiterals.reduce(groupByLineNumber, {});
+
+ lines.forEach((line, i) => {
+
+ // i is zero-indexed, line numbers are one-indexed
+ const lineNumber = i + 1;
+
+ /*
+ * if we're checking comment length; we need to know whether this
+ * line is a comment
+ */
+ let lineIsComment = false;
+
+ /*
+ * We can short-circuit the comment checks if we're already out of
+ * comments to check.
+ */
+ if (commentsIndex < comments.length) {
+ let comment = null;
+
+ // iterate over comments until we find one past the current line
+ do {
+ comment = comments[++commentsIndex];
+ } while (comment && comment.loc.start.line <= lineNumber);
+
+ // and step back by one
+ comment = comments[--commentsIndex];
+
+ if (isFullLineComment(line, lineNumber, comment)) {
+ lineIsComment = true;
+ } else if (ignoreTrailingComments && isTrailingComment(line, lineNumber, comment)) {
+ line = stripTrailingComment(line, comment);
+ }
+ }
+ if (ignorePattern && ignorePattern.test(line) ||
+ ignoreUrls && URL_REGEXP.test(line) ||
+ ignoreStrings && stringsByLine[lineNumber] ||
+ ignoreTemplateLiterals && templateLiteralsByLine[lineNumber] ||
+ ignoreRegExpLiterals && regExpLiteralsByLine[lineNumber]
+ ) {
+
+ // ignore this line
+ return;
+ }
+
+ const lineLength = computeLineLength(line, tabWidth);
+ const commentLengthApplies = lineIsComment && maxCommentLength;
+
+ if (lineIsComment && ignoreComments) {
+ return;
+ }
+
+ if (commentLengthApplies) {
+ if (lineLength > maxCommentLength) {
+ context.report({
+ node,
+ loc: { line: lineNumber, column: 0 },
+ message: "Line {{lineNumber}} exceeds the maximum comment line length of {{maxCommentLength}}.",
+ data: {
+ lineNumber: i + 1,
+ maxCommentLength
+ }
+ });
+ }
+ } else if (lineLength > maxLength) {
+ context.report({
+ node,
+ loc: { line: lineNumber, column: 0 },
+ message: "Line {{lineNumber}} exceeds the maximum line length of {{maxLength}}.",
+ data: {
+ lineNumber: i + 1,
+ maxLength
+ }
+ });
+ }
+ });
+ }
+
+
+ //--------------------------------------------------------------------------
+ // Public API
+ //--------------------------------------------------------------------------
+
+ return {
+ Program: checkProgramForMaxLength
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/max-lines.js b/tools/node_modules/eslint/lib/rules/max-lines.js
new file mode 100644
index 0000000000..297c75dc13
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/max-lines.js
@@ -0,0 +1,144 @@
+/**
+ * @fileoverview enforce a maximum file length
+ * @author Alberto Rodríguez
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const lodash = require("lodash");
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce a maximum number of lines per file",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: [
+ {
+ oneOf: [
+ {
+ type: "integer",
+ minimum: 0
+ },
+ {
+ type: "object",
+ properties: {
+ max: {
+ type: "integer",
+ minimum: 0
+ },
+ skipComments: {
+ type: "boolean"
+ },
+ skipBlankLines: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ }
+ ]
+ },
+
+ create(context) {
+ const option = context.options[0];
+ let max = 300;
+
+ if (typeof option === "object" && option.hasOwnProperty("max") && typeof option.max === "number") {
+ max = option.max;
+ }
+
+ if (typeof option === "number") {
+ max = option;
+ }
+
+ const skipComments = option && option.skipComments;
+ const skipBlankLines = option && option.skipBlankLines;
+
+ const sourceCode = context.getSourceCode();
+
+ /**
+ * Returns whether or not a token is a comment node type
+ * @param {Token} token The token to check
+ * @returns {boolean} True if the token is a comment node
+ */
+ function isCommentNodeType(token) {
+ return token && (token.type === "Block" || token.type === "Line");
+ }
+
+ /**
+ * Returns the line numbers of a comment that don't have any code on the same line
+ * @param {Node} comment The comment node to check
+ * @returns {int[]} The line numbers
+ */
+ function getLinesWithoutCode(comment) {
+ let start = comment.loc.start.line;
+ let end = comment.loc.end.line;
+
+ let token;
+
+ token = comment;
+ do {
+ token = sourceCode.getTokenBefore(token, { includeComments: true });
+ } while (isCommentNodeType(token));
+
+ if (token && astUtils.isTokenOnSameLine(token, comment)) {
+ start += 1;
+ }
+
+ token = comment;
+ do {
+ token = sourceCode.getTokenAfter(token, { includeComments: true });
+ } while (isCommentNodeType(token));
+
+ if (token && astUtils.isTokenOnSameLine(comment, token)) {
+ end -= 1;
+ }
+
+ if (start <= end) {
+ return lodash.range(start, end + 1);
+ }
+ return [];
+ }
+
+ return {
+ "Program:exit"() {
+ let lines = sourceCode.lines.map((text, i) => ({ lineNumber: i + 1, text }));
+
+ if (skipBlankLines) {
+ lines = lines.filter(l => l.text.trim() !== "");
+ }
+
+ if (skipComments) {
+ const comments = sourceCode.getAllComments();
+
+ const commentLines = lodash.flatten(comments.map(comment => getLinesWithoutCode(comment)));
+
+ lines = lines.filter(l => !lodash.includes(commentLines, l.lineNumber));
+ }
+
+ if (lines.length > max) {
+ context.report({
+ loc: { line: 1, column: 0 },
+ message: "File must be at most {{max}} lines long. It's {{actual}} lines long.",
+ data: {
+ max,
+ actual: lines.length
+ }
+ });
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/max-nested-callbacks.js b/tools/node_modules/eslint/lib/rules/max-nested-callbacks.js
new file mode 100644
index 0000000000..a89f49ae02
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/max-nested-callbacks.js
@@ -0,0 +1,112 @@
+/**
+ * @fileoverview Rule to enforce a maximum number of nested callbacks.
+ * @author Ian Christian Myers
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce a maximum depth that callbacks can be nested",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: [
+ {
+ oneOf: [
+ {
+ type: "integer",
+ minimum: 0
+ },
+ {
+ type: "object",
+ properties: {
+ maximum: {
+ type: "integer",
+ minimum: 0
+ },
+ max: {
+ type: "integer",
+ minimum: 0
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ }
+ ]
+ },
+
+ create(context) {
+
+ //--------------------------------------------------------------------------
+ // Constants
+ //--------------------------------------------------------------------------
+ const option = context.options[0];
+ let THRESHOLD = 10;
+
+ if (typeof option === "object" && option.hasOwnProperty("maximum") && typeof option.maximum === "number") {
+ THRESHOLD = option.maximum;
+ }
+ if (typeof option === "object" && option.hasOwnProperty("max") && typeof option.max === "number") {
+ THRESHOLD = option.max;
+ }
+ if (typeof option === "number") {
+ THRESHOLD = option;
+ }
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ const callbackStack = [];
+
+ /**
+ * Checks a given function node for too many callbacks.
+ * @param {ASTNode} node The node to check.
+ * @returns {void}
+ * @private
+ */
+ function checkFunction(node) {
+ const parent = node.parent;
+
+ if (parent.type === "CallExpression") {
+ callbackStack.push(node);
+ }
+
+ if (callbackStack.length > THRESHOLD) {
+ const opts = { num: callbackStack.length, max: THRESHOLD };
+
+ context.report({ node, message: "Too many nested callbacks ({{num}}). Maximum allowed is {{max}}.", data: opts });
+ }
+ }
+
+ /**
+ * Pops the call stack.
+ * @returns {void}
+ * @private
+ */
+ function popStack() {
+ callbackStack.pop();
+ }
+
+ //--------------------------------------------------------------------------
+ // Public API
+ //--------------------------------------------------------------------------
+
+ return {
+ ArrowFunctionExpression: checkFunction,
+ "ArrowFunctionExpression:exit": popStack,
+
+ FunctionExpression: checkFunction,
+ "FunctionExpression:exit": popStack
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/max-params.js b/tools/node_modules/eslint/lib/rules/max-params.js
new file mode 100644
index 0000000000..85838adacc
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/max-params.js
@@ -0,0 +1,96 @@
+/**
+ * @fileoverview Rule to flag when a function has too many parameters
+ * @author Ilya Volodin
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const lodash = require("lodash");
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce a maximum number of parameters in function definitions",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: [
+ {
+ oneOf: [
+ {
+ type: "integer",
+ minimum: 0
+ },
+ {
+ type: "object",
+ properties: {
+ maximum: {
+ type: "integer",
+ minimum: 0
+ },
+ max: {
+ type: "integer",
+ minimum: 0
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ }
+ ]
+ },
+
+ create(context) {
+
+ const option = context.options[0];
+ let numParams = 3;
+
+ if (typeof option === "object" && option.hasOwnProperty("maximum") && typeof option.maximum === "number") {
+ numParams = option.maximum;
+ }
+ if (typeof option === "object" && option.hasOwnProperty("max") && typeof option.max === "number") {
+ numParams = option.max;
+ }
+ if (typeof option === "number") {
+ numParams = option;
+ }
+
+ /**
+ * Checks a function to see if it has too many parameters.
+ * @param {ASTNode} node The node to check.
+ * @returns {void}
+ * @private
+ */
+ function checkFunction(node) {
+ if (node.params.length > numParams) {
+ context.report({
+ node,
+ message: "{{name}} has too many parameters ({{count}}). Maximum allowed is {{max}}.",
+ data: {
+ name: lodash.upperFirst(astUtils.getFunctionNameWithKind(node)),
+ count: node.params.length,
+ max: numParams
+ }
+ });
+ }
+ }
+
+ return {
+ FunctionDeclaration: checkFunction,
+ ArrowFunctionExpression: checkFunction,
+ FunctionExpression: checkFunction
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/max-statements-per-line.js b/tools/node_modules/eslint/lib/rules/max-statements-per-line.js
new file mode 100644
index 0000000000..3d18da4ee1
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/max-statements-per-line.js
@@ -0,0 +1,194 @@
+/**
+ * @fileoverview Specify the maximum number of statements allowed per line.
+ * @author Kenneth Williams
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce a maximum number of statements allowed per line",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ max: {
+ type: "integer",
+ minimum: 1
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+
+ const sourceCode = context.getSourceCode(),
+ options = context.options[0] || {},
+ maxStatementsPerLine = typeof options.max !== "undefined" ? options.max : 1,
+ message = "This line has {{numberOfStatementsOnThisLine}} {{statements}}. Maximum allowed is {{maxStatementsPerLine}}.";
+
+ let lastStatementLine = 0,
+ numberOfStatementsOnThisLine = 0,
+ firstExtraStatement;
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ const SINGLE_CHILD_ALLOWED = /^(?:(?:DoWhile|For|ForIn|ForOf|If|Labeled|While)Statement|Export(?:Default|Named)Declaration)$/;
+
+ /**
+ * Reports with the first extra statement, and clears it.
+ *
+ * @returns {void}
+ */
+ function reportFirstExtraStatementAndClear() {
+ if (firstExtraStatement) {
+ context.report({
+ node: firstExtraStatement,
+ message,
+ data: {
+ numberOfStatementsOnThisLine,
+ maxStatementsPerLine,
+ statements: numberOfStatementsOnThisLine === 1 ? "statement" : "statements"
+ }
+ });
+ }
+ firstExtraStatement = null;
+ }
+
+ /**
+ * Gets the actual last token of a given node.
+ *
+ * @param {ASTNode} node - A node to get. This is a node except EmptyStatement.
+ * @returns {Token} The actual last token.
+ */
+ function getActualLastToken(node) {
+ return sourceCode.getLastToken(node, astUtils.isNotSemicolonToken);
+ }
+
+ /**
+ * Addresses a given node.
+ * It updates the state of this rule, then reports the node if the node violated this rule.
+ *
+ * @param {ASTNode} node - A node to check.
+ * @returns {void}
+ */
+ function enterStatement(node) {
+ const line = node.loc.start.line;
+
+ /*
+ * Skip to allow non-block statements if this is direct child of control statements.
+ * `if (a) foo();` is counted as 1.
+ * But `if (a) foo(); else foo();` should be counted as 2.
+ */
+ if (SINGLE_CHILD_ALLOWED.test(node.parent.type) &&
+ node.parent.alternate !== node
+ ) {
+ return;
+ }
+
+ // Update state.
+ if (line === lastStatementLine) {
+ numberOfStatementsOnThisLine += 1;
+ } else {
+ reportFirstExtraStatementAndClear();
+ numberOfStatementsOnThisLine = 1;
+ lastStatementLine = line;
+ }
+
+ // Reports if the node violated this rule.
+ if (numberOfStatementsOnThisLine === maxStatementsPerLine + 1) {
+ firstExtraStatement = firstExtraStatement || node;
+ }
+ }
+
+ /**
+ * Updates the state of this rule with the end line of leaving node to check with the next statement.
+ *
+ * @param {ASTNode} node - A node to check.
+ * @returns {void}
+ */
+ function leaveStatement(node) {
+ const line = getActualLastToken(node).loc.end.line;
+
+ // Update state.
+ if (line !== lastStatementLine) {
+ reportFirstExtraStatementAndClear();
+ numberOfStatementsOnThisLine = 1;
+ lastStatementLine = line;
+ }
+ }
+
+ //--------------------------------------------------------------------------
+ // Public API
+ //--------------------------------------------------------------------------
+
+ return {
+ BreakStatement: enterStatement,
+ ClassDeclaration: enterStatement,
+ ContinueStatement: enterStatement,
+ DebuggerStatement: enterStatement,
+ DoWhileStatement: enterStatement,
+ ExpressionStatement: enterStatement,
+ ForInStatement: enterStatement,
+ ForOfStatement: enterStatement,
+ ForStatement: enterStatement,
+ FunctionDeclaration: enterStatement,
+ IfStatement: enterStatement,
+ ImportDeclaration: enterStatement,
+ LabeledStatement: enterStatement,
+ ReturnStatement: enterStatement,
+ SwitchStatement: enterStatement,
+ ThrowStatement: enterStatement,
+ TryStatement: enterStatement,
+ VariableDeclaration: enterStatement,
+ WhileStatement: enterStatement,
+ WithStatement: enterStatement,
+ ExportNamedDeclaration: enterStatement,
+ ExportDefaultDeclaration: enterStatement,
+ ExportAllDeclaration: enterStatement,
+
+ "BreakStatement:exit": leaveStatement,
+ "ClassDeclaration:exit": leaveStatement,
+ "ContinueStatement:exit": leaveStatement,
+ "DebuggerStatement:exit": leaveStatement,
+ "DoWhileStatement:exit": leaveStatement,
+ "ExpressionStatement:exit": leaveStatement,
+ "ForInStatement:exit": leaveStatement,
+ "ForOfStatement:exit": leaveStatement,
+ "ForStatement:exit": leaveStatement,
+ "FunctionDeclaration:exit": leaveStatement,
+ "IfStatement:exit": leaveStatement,
+ "ImportDeclaration:exit": leaveStatement,
+ "LabeledStatement:exit": leaveStatement,
+ "ReturnStatement:exit": leaveStatement,
+ "SwitchStatement:exit": leaveStatement,
+ "ThrowStatement:exit": leaveStatement,
+ "TryStatement:exit": leaveStatement,
+ "VariableDeclaration:exit": leaveStatement,
+ "WhileStatement:exit": leaveStatement,
+ "WithStatement:exit": leaveStatement,
+ "ExportNamedDeclaration:exit": leaveStatement,
+ "ExportDefaultDeclaration:exit": leaveStatement,
+ "ExportAllDeclaration:exit": leaveStatement,
+ "Program:exit": reportFirstExtraStatementAndClear
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/max-statements.js b/tools/node_modules/eslint/lib/rules/max-statements.js
new file mode 100644
index 0000000000..f98aa3a21d
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/max-statements.js
@@ -0,0 +1,170 @@
+/**
+ * @fileoverview A rule to set the maximum number of statements in a function.
+ * @author Ian Christian Myers
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const lodash = require("lodash");
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce a maximum number of statements allowed in function blocks",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: [
+ {
+ oneOf: [
+ {
+ type: "integer",
+ minimum: 0
+ },
+ {
+ type: "object",
+ properties: {
+ maximum: {
+ type: "integer",
+ minimum: 0
+ },
+ max: {
+ type: "integer",
+ minimum: 0
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+ {
+ type: "object",
+ properties: {
+ ignoreTopLevelFunctions: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ const functionStack = [],
+ option = context.options[0],
+ ignoreTopLevelFunctions = context.options[1] && context.options[1].ignoreTopLevelFunctions || false,
+ topLevelFunctions = [];
+ let maxStatements = 10;
+
+ if (typeof option === "object" && option.hasOwnProperty("maximum") && typeof option.maximum === "number") {
+ maxStatements = option.maximum;
+ }
+ if (typeof option === "object" && option.hasOwnProperty("max") && typeof option.max === "number") {
+ maxStatements = option.max;
+ }
+ if (typeof option === "number") {
+ maxStatements = option;
+ }
+
+ /**
+ * Reports a node if it has too many statements
+ * @param {ASTNode} node node to evaluate
+ * @param {int} count Number of statements in node
+ * @param {int} max Maximum number of statements allowed
+ * @returns {void}
+ * @private
+ */
+ function reportIfTooManyStatements(node, count, max) {
+ if (count > max) {
+ const name = lodash.upperFirst(astUtils.getFunctionNameWithKind(node));
+
+ context.report({
+ node,
+ message: "{{name}} has too many statements ({{count}}). Maximum allowed is {{max}}.",
+ data: { name, count, max }
+ });
+ }
+ }
+
+ /**
+ * When parsing a new function, store it in our function stack
+ * @returns {void}
+ * @private
+ */
+ function startFunction() {
+ functionStack.push(0);
+ }
+
+ /**
+ * Evaluate the node at the end of function
+ * @param {ASTNode} node node to evaluate
+ * @returns {void}
+ * @private
+ */
+ function endFunction(node) {
+ const count = functionStack.pop();
+
+ if (ignoreTopLevelFunctions && functionStack.length === 0) {
+ topLevelFunctions.push({ node, count });
+ } else {
+ reportIfTooManyStatements(node, count, maxStatements);
+ }
+ }
+
+ /**
+ * Increment the count of the functions
+ * @param {ASTNode} node node to evaluate
+ * @returns {void}
+ * @private
+ */
+ function countStatements(node) {
+ functionStack[functionStack.length - 1] += node.body.length;
+ }
+
+ //--------------------------------------------------------------------------
+ // Public API
+ //--------------------------------------------------------------------------
+
+ return {
+ FunctionDeclaration: startFunction,
+ FunctionExpression: startFunction,
+ ArrowFunctionExpression: startFunction,
+
+ BlockStatement: countStatements,
+
+ "FunctionDeclaration:exit": endFunction,
+ "FunctionExpression:exit": endFunction,
+ "ArrowFunctionExpression:exit": endFunction,
+
+ "Program:exit"() {
+ if (topLevelFunctions.length === 1) {
+ return;
+ }
+
+ topLevelFunctions.forEach(element => {
+ const count = element.count;
+ const node = element.node;
+
+ reportIfTooManyStatements(node, count, maxStatements);
+ });
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/multiline-comment-style.js b/tools/node_modules/eslint/lib/rules/multiline-comment-style.js
new file mode 100644
index 0000000000..db4f768443
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/multiline-comment-style.js
@@ -0,0 +1,294 @@
+/**
+ * @fileoverview enforce a particular style for multiline comments
+ * @author Teddy Katz
+ */
+"use strict";
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce a particular style for multiline comments",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+ fixable: "whitespace",
+ schema: [{ enum: ["starred-block", "separate-lines", "bare-block"] }]
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+ const option = context.options[0] || "starred-block";
+
+ const EXPECTED_BLOCK_ERROR = "Expected a block comment instead of consecutive line comments.";
+ const START_NEWLINE_ERROR = "Expected a linebreak after '/*'.";
+ const END_NEWLINE_ERROR = "Expected a linebreak before '*/'.";
+ const MISSING_STAR_ERROR = "Expected a '*' at the start of this line.";
+ const ALIGNMENT_ERROR = "Expected this line to be aligned with the start of the comment.";
+ const EXPECTED_LINES_ERROR = "Expected multiple line comments instead of a block comment.";
+
+ //----------------------------------------------------------------------
+ // Helpers
+ //----------------------------------------------------------------------
+
+ /**
+ * Gets a list of comment lines in a group
+ * @param {Token[]} commentGroup A group of comments, containing either multiple line comments or a single block comment
+ * @returns {string[]} A list of comment lines
+ */
+ function getCommentLines(commentGroup) {
+ if (commentGroup[0].type === "Line") {
+ return commentGroup.map(comment => comment.value);
+ }
+ return commentGroup[0].value
+ .split(astUtils.LINEBREAK_MATCHER)
+ .map(line => line.replace(/^\s*\*?/, ""));
+ }
+
+ /**
+ * Converts a comment into starred-block form
+ * @param {Token} firstComment The first comment of the group being converted
+ * @param {string[]} commentLinesList A list of lines to appear in the new starred-block comment
+ * @returns {string} A representation of the comment value in starred-block form, excluding start and end markers
+ */
+ function convertToStarredBlock(firstComment, commentLinesList) {
+ const initialOffset = sourceCode.text.slice(firstComment.range[0] - firstComment.loc.start.column, firstComment.range[0]);
+ const starredLines = commentLinesList.map(line => `${initialOffset} *${line}`);
+
+ return `\n${starredLines.join("\n")}\n${initialOffset} `;
+ }
+
+ /**
+ * Converts a comment into separate-line form
+ * @param {Token} firstComment The first comment of the group being converted
+ * @param {string[]} commentLinesList A list of lines to appear in the new starred-block comment
+ * @returns {string} A representation of the comment value in separate-line form
+ */
+ function convertToSeparateLines(firstComment, commentLinesList) {
+ const initialOffset = sourceCode.text.slice(firstComment.range[0] - firstComment.loc.start.column, firstComment.range[0]);
+ const separateLines = commentLinesList.map(line => `// ${line.trim()}`);
+
+ return separateLines.join(`\n${initialOffset}`);
+ }
+
+ /**
+ * Converts a comment into bare-block form
+ * @param {Token} firstComment The first comment of the group being converted
+ * @param {string[]} commentLinesList A list of lines to appear in the new starred-block comment
+ * @returns {string} A representation of the comment value in bare-block form
+ */
+ function convertToBlock(firstComment, commentLinesList) {
+ const initialOffset = sourceCode.text.slice(firstComment.range[0] - firstComment.loc.start.column, firstComment.range[0]);
+ const blockLines = commentLinesList.map(line => line.trim());
+
+ return `/* ${blockLines.join(`\n${initialOffset} `)} */`;
+ }
+
+ /**
+ * Check a comment is JSDoc form
+ * @param {Token[]} commentGroup A group of comments, containing either multiple line comments or a single block comment
+ * @returns {boolean} if commentGroup is JSDoc form, return true
+ */
+ function isJSDoc(commentGroup) {
+ const lines = commentGroup[0].value.split(astUtils.LINEBREAK_MATCHER);
+
+ return commentGroup[0].type === "Block" &&
+ /^\*\s*$/.test(lines[0]) &&
+ lines.slice(1, -1).every(line => /^\s* /.test(line)) &&
+ /^\s*$/.test(lines[lines.length - 1]);
+ }
+
+ /**
+ * Each method checks a group of comments to see if it's valid according to the given option.
+ * @param {Token[]} commentGroup A list of comments that appear together. This will either contain a single
+ * block comment or multiple line comments.
+ * @returns {void}
+ */
+ const commentGroupCheckers = {
+ "starred-block"(commentGroup) {
+ const commentLines = getCommentLines(commentGroup);
+
+ if (commentLines.some(value => value.includes("*/"))) {
+ return;
+ }
+
+ if (commentGroup.length > 1) {
+ context.report({
+ loc: {
+ start: commentGroup[0].loc.start,
+ end: commentGroup[commentGroup.length - 1].loc.end
+ },
+ message: EXPECTED_BLOCK_ERROR,
+ fix(fixer) {
+ const range = [commentGroup[0].range[0], commentGroup[commentGroup.length - 1].range[1]];
+ const starredBlock = `/*${convertToStarredBlock(commentGroup[0], commentLines)}*/`;
+
+ return commentLines.some(value => value.startsWith("/"))
+ ? null
+ : fixer.replaceTextRange(range, starredBlock);
+ }
+ });
+ } else {
+ const block = commentGroup[0];
+ const lines = block.value.split(astUtils.LINEBREAK_MATCHER);
+ const expectedLinePrefix = `${sourceCode.text.slice(block.range[0] - block.loc.start.column, block.range[0])} *`;
+
+ if (!/^\*?\s*$/.test(lines[0])) {
+ const start = block.value.startsWith("*") ? block.range[0] + 1 : block.range[0];
+
+ context.report({
+ loc: {
+ start: block.loc.start,
+ end: { line: block.loc.start.line, column: block.loc.start.column + 2 }
+ },
+ message: START_NEWLINE_ERROR,
+ fix: fixer => fixer.insertTextAfterRange([start, start + 2], `\n${expectedLinePrefix}`)
+ });
+ }
+
+ if (!/^\s*$/.test(lines[lines.length - 1])) {
+ context.report({
+ loc: {
+ start: { line: block.loc.end.line, column: block.loc.end.column - 2 },
+ end: block.loc.end
+ },
+ message: END_NEWLINE_ERROR,
+ fix: fixer => fixer.replaceTextRange([block.range[1] - 2, block.range[1]], `\n${expectedLinePrefix}/`)
+ });
+ }
+
+ for (let lineNumber = block.loc.start.line + 1; lineNumber <= block.loc.end.line; lineNumber++) {
+ const lineText = sourceCode.lines[lineNumber - 1];
+
+ if (!lineText.startsWith(expectedLinePrefix)) {
+ context.report({
+ loc: {
+ start: { line: lineNumber, column: 0 },
+ end: { line: lineNumber, column: sourceCode.lines[lineNumber - 1].length }
+ },
+ message: /^\s*\*/.test(lineText)
+ ? ALIGNMENT_ERROR
+ : MISSING_STAR_ERROR,
+ fix(fixer) {
+ const lineStartIndex = sourceCode.getIndexFromLoc({ line: lineNumber, column: 0 });
+ const linePrefixLength = lineText.match(/^\s*\*? ?/)[0].length;
+ const commentStartIndex = lineStartIndex + linePrefixLength;
+
+ const replacementText = lineNumber === block.loc.end.line || lineText.length === linePrefixLength
+ ? expectedLinePrefix
+ : `${expectedLinePrefix} `;
+
+ return fixer.replaceTextRange([lineStartIndex, commentStartIndex], replacementText);
+ }
+ });
+ }
+ }
+ }
+ },
+ "separate-lines"(commentGroup) {
+ if (!isJSDoc(commentGroup) && commentGroup[0].type === "Block") {
+ const commentLines = getCommentLines(commentGroup);
+ const block = commentGroup[0];
+ const tokenAfter = sourceCode.getTokenAfter(block, { includeComments: true });
+
+ if (tokenAfter && block.loc.end.line === tokenAfter.loc.start.line) {
+ return;
+ }
+
+ context.report({
+ loc: {
+ start: block.loc.start,
+ end: { line: block.loc.start.line, column: block.loc.start.column + 2 }
+ },
+ message: EXPECTED_LINES_ERROR,
+ fix(fixer) {
+ return fixer.replaceText(block, convertToSeparateLines(block, commentLines.filter(line => line)));
+ }
+ });
+ }
+ },
+ "bare-block"(commentGroup) {
+ if (!isJSDoc(commentGroup)) {
+ const commentLines = getCommentLines(commentGroup);
+
+ // disallows consecutive line comments in favor of using a block comment.
+ if (commentGroup[0].type === "Line" && commentLines.length > 1 &&
+ !commentLines.some(value => value.includes("*/"))) {
+ context.report({
+ loc: {
+ start: commentGroup[0].loc.start,
+ end: commentGroup[commentGroup.length - 1].loc.end
+ },
+ message: EXPECTED_BLOCK_ERROR,
+ fix(fixer) {
+ const range = [commentGroup[0].range[0], commentGroup[commentGroup.length - 1].range[1]];
+ const block = convertToBlock(commentGroup[0], commentLines.filter(line => line));
+
+ return fixer.replaceTextRange(range, block);
+ }
+ });
+ }
+
+ // prohibits block comments from having a * at the beginning of each line.
+ if (commentGroup[0].type === "Block") {
+ const block = commentGroup[0];
+ const lines = block.value.split(astUtils.LINEBREAK_MATCHER).filter(line => line.trim());
+
+ if (lines.length > 0 && lines.every(line => /^\s*\*/.test(line))) {
+ context.report({
+ loc: {
+ start: block.loc.start,
+ end: { line: block.loc.start.line, column: block.loc.start.column + 2 }
+ },
+ message: EXPECTED_BLOCK_ERROR,
+ fix(fixer) {
+ return fixer.replaceText(block, convertToBlock(block, commentLines.filter(line => line)));
+ }
+ });
+ }
+ }
+ }
+ }
+ };
+
+ //----------------------------------------------------------------------
+ // Public
+ //----------------------------------------------------------------------
+
+ return {
+ Program() {
+ return sourceCode.getAllComments()
+ .filter(comment => comment.type !== "Shebang")
+ .filter(comment => !astUtils.COMMENTS_IGNORE_PATTERN.test(comment.value))
+ .filter(comment => {
+ const tokenBefore = sourceCode.getTokenBefore(comment, { includeComments: true });
+
+ return !tokenBefore || tokenBefore.loc.end.line < comment.loc.start.line;
+ })
+ .reduce((commentGroups, comment, index, commentList) => {
+ const tokenBefore = sourceCode.getTokenBefore(comment, { includeComments: true });
+
+ if (
+ comment.type === "Line" &&
+ index && commentList[index - 1].type === "Line" &&
+ tokenBefore && tokenBefore.loc.end.line === comment.loc.start.line - 1 &&
+ tokenBefore === commentList[index - 1]
+ ) {
+ commentGroups[commentGroups.length - 1].push(comment);
+ } else {
+ commentGroups.push([comment]);
+ }
+
+ return commentGroups;
+ }, [])
+ .filter(commentGroup => !(commentGroup.length === 1 && commentGroup[0].loc.start.line === commentGroup[0].loc.end.line))
+ .forEach(commentGroupCheckers[option]);
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/multiline-ternary.js b/tools/node_modules/eslint/lib/rules/multiline-ternary.js
new file mode 100644
index 0000000000..a74f241d86
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/multiline-ternary.js
@@ -0,0 +1,89 @@
+/**
+ * @fileoverview Enforce newlines between operands of ternary expressions
+ * @author Kai Cataldo
+ */
+
+"use strict";
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce newlines between operands of ternary expressions",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+ schema: [
+ {
+ enum: ["always", "always-multiline", "never"]
+ }
+ ]
+ },
+
+ create(context) {
+ const option = context.options[0];
+ const multiline = option !== "never";
+ const allowSingleLine = option === "always-multiline";
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ /**
+ * Tests whether node is preceded by supplied tokens
+ * @param {ASTNode} node - node to check
+ * @param {ASTNode} parentNode - parent of node to report
+ * @param {boolean} expected - whether newline was expected or not
+ * @returns {void}
+ * @private
+ */
+ function reportError(node, parentNode, expected) {
+ context.report({
+ node,
+ message: "{{expected}} newline between {{typeOfError}} of ternary expression.",
+ data: {
+ expected: expected ? "Expected" : "Unexpected",
+ typeOfError: node === parentNode.test ? "test and consequent" : "consequent and alternate"
+ }
+ });
+ }
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+ ConditionalExpression(node) {
+ const areTestAndConsequentOnSameLine = astUtils.isTokenOnSameLine(node.test, node.consequent);
+ const areConsequentAndAlternateOnSameLine = astUtils.isTokenOnSameLine(node.consequent, node.alternate);
+
+ if (!multiline) {
+ if (!areTestAndConsequentOnSameLine) {
+ reportError(node.test, node, false);
+ }
+
+ if (!areConsequentAndAlternateOnSameLine) {
+ reportError(node.consequent, node, false);
+ }
+ } else {
+ if (allowSingleLine && node.loc.start.line === node.loc.end.line) {
+ return;
+ }
+
+ if (areTestAndConsequentOnSameLine) {
+ reportError(node.test, node, true);
+ }
+
+ if (areConsequentAndAlternateOnSameLine) {
+ reportError(node.consequent, node, true);
+ }
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/new-cap.js b/tools/node_modules/eslint/lib/rules/new-cap.js
new file mode 100644
index 0000000000..f01e8f90ac
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/new-cap.js
@@ -0,0 +1,272 @@
+/**
+ * @fileoverview Rule to flag use of constructors without capital letters
+ * @author Nicholas C. Zakas
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+const CAPS_ALLOWED = [
+ "Array",
+ "Boolean",
+ "Date",
+ "Error",
+ "Function",
+ "Number",
+ "Object",
+ "RegExp",
+ "String",
+ "Symbol"
+];
+
+/**
+ * Ensure that if the key is provided, it must be an array.
+ * @param {Object} obj Object to check with `key`.
+ * @param {string} key Object key to check on `obj`.
+ * @param {*} fallback If obj[key] is not present, this will be returned.
+ * @returns {string[]} Returns obj[key] if it's an Array, otherwise `fallback`
+ */
+function checkArray(obj, key, fallback) {
+
+ /* istanbul ignore if */
+ if (Object.prototype.hasOwnProperty.call(obj, key) && !Array.isArray(obj[key])) {
+ throw new TypeError(`${key}, if provided, must be an Array`);
+ }
+ return obj[key] || fallback;
+}
+
+/**
+ * A reducer function to invert an array to an Object mapping the string form of the key, to `true`.
+ * @param {Object} map Accumulator object for the reduce.
+ * @param {string} key Object key to set to `true`.
+ * @returns {Object} Returns the updated Object for further reduction.
+ */
+function invert(map, key) {
+ map[key] = true;
+ return map;
+}
+
+/**
+ * Creates an object with the cap is new exceptions as its keys and true as their values.
+ * @param {Object} config Rule configuration
+ * @returns {Object} Object with cap is new exceptions.
+ */
+function calculateCapIsNewExceptions(config) {
+ let capIsNewExceptions = checkArray(config, "capIsNewExceptions", CAPS_ALLOWED);
+
+ if (capIsNewExceptions !== CAPS_ALLOWED) {
+ capIsNewExceptions = capIsNewExceptions.concat(CAPS_ALLOWED);
+ }
+
+ return capIsNewExceptions.reduce(invert, {});
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require constructor names to begin with a capital letter",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ newIsCap: {
+ type: "boolean"
+ },
+ capIsNew: {
+ type: "boolean"
+ },
+ newIsCapExceptions: {
+ type: "array",
+ items: {
+ type: "string"
+ }
+ },
+ newIsCapExceptionPattern: {
+ type: "string"
+ },
+ capIsNewExceptions: {
+ type: "array",
+ items: {
+ type: "string"
+ }
+ },
+ capIsNewExceptionPattern: {
+ type: "string"
+ },
+ properties: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+
+ const config = context.options[0] ? Object.assign({}, context.options[0]) : {};
+
+ config.newIsCap = config.newIsCap !== false;
+ config.capIsNew = config.capIsNew !== false;
+ const skipProperties = config.properties === false;
+
+ const newIsCapExceptions = checkArray(config, "newIsCapExceptions", []).reduce(invert, {});
+ const newIsCapExceptionPattern = config.newIsCapExceptionPattern ? new RegExp(config.newIsCapExceptionPattern) : null;
+
+ const capIsNewExceptions = calculateCapIsNewExceptions(config);
+ const capIsNewExceptionPattern = config.capIsNewExceptionPattern ? new RegExp(config.capIsNewExceptionPattern) : null;
+
+ const listeners = {};
+
+ const sourceCode = context.getSourceCode();
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ /**
+ * Get exact callee name from expression
+ * @param {ASTNode} node CallExpression or NewExpression node
+ * @returns {string} name
+ */
+ function extractNameFromExpression(node) {
+
+ let name = "";
+
+ if (node.callee.type === "MemberExpression") {
+ const property = node.callee.property;
+
+ if (property.type === "Literal" && (typeof property.value === "string")) {
+ name = property.value;
+ } else if (property.type === "Identifier" && !node.callee.computed) {
+ name = property.name;
+ }
+ } else {
+ name = node.callee.name;
+ }
+ return name;
+ }
+
+ /**
+ * Returns the capitalization state of the string -
+ * Whether the first character is uppercase, lowercase, or non-alphabetic
+ * @param {string} str String
+ * @returns {string} capitalization state: "non-alpha", "lower", or "upper"
+ */
+ function getCap(str) {
+ const firstChar = str.charAt(0);
+
+ const firstCharLower = firstChar.toLowerCase();
+ const firstCharUpper = firstChar.toUpperCase();
+
+ if (firstCharLower === firstCharUpper) {
+
+ // char has no uppercase variant, so it's non-alphabetic
+ return "non-alpha";
+ }
+ if (firstChar === firstCharLower) {
+ return "lower";
+ }
+ return "upper";
+
+ }
+
+ /**
+ * Check if capitalization is allowed for a CallExpression
+ * @param {Object} allowedMap Object mapping calleeName to a Boolean
+ * @param {ASTNode} node CallExpression node
+ * @param {string} calleeName Capitalized callee name from a CallExpression
+ * @param {Object} pattern RegExp object from options pattern
+ * @returns {boolean} Returns true if the callee may be capitalized
+ */
+ function isCapAllowed(allowedMap, node, calleeName, pattern) {
+ const sourceText = sourceCode.getText(node.callee);
+
+ if (allowedMap[calleeName] || allowedMap[sourceText]) {
+ return true;
+ }
+
+ if (pattern && pattern.test(sourceText)) {
+ return true;
+ }
+
+ if (calleeName === "UTC" && node.callee.type === "MemberExpression") {
+
+ // allow if callee is Date.UTC
+ return node.callee.object.type === "Identifier" &&
+ node.callee.object.name === "Date";
+ }
+
+ return skipProperties && node.callee.type === "MemberExpression";
+ }
+
+ /**
+ * Reports the given message for the given node. The location will be the start of the property or the callee.
+ * @param {ASTNode} node CallExpression or NewExpression node.
+ * @param {string} message The message to report.
+ * @returns {void}
+ */
+ function report(node, message) {
+ let callee = node.callee;
+
+ if (callee.type === "MemberExpression") {
+ callee = callee.property;
+ }
+
+ context.report({ node, loc: callee.loc.start, message });
+ }
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ if (config.newIsCap) {
+ listeners.NewExpression = function(node) {
+
+ const constructorName = extractNameFromExpression(node);
+
+ if (constructorName) {
+ const capitalization = getCap(constructorName);
+ const isAllowed = capitalization !== "lower" || isCapAllowed(newIsCapExceptions, node, constructorName, newIsCapExceptionPattern);
+
+ if (!isAllowed) {
+ report(node, "A constructor name should not start with a lowercase letter.");
+ }
+ }
+ };
+ }
+
+ if (config.capIsNew) {
+ listeners.CallExpression = function(node) {
+
+ const calleeName = extractNameFromExpression(node);
+
+ if (calleeName) {
+ const capitalization = getCap(calleeName);
+ const isAllowed = capitalization !== "upper" || isCapAllowed(capIsNewExceptions, node, calleeName, capIsNewExceptionPattern);
+
+ if (!isAllowed) {
+ report(node, "A function with a name starting with an uppercase letter should only be used as a constructor.");
+ }
+ }
+ };
+ }
+
+ return listeners;
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/new-parens.js b/tools/node_modules/eslint/lib/rules/new-parens.js
new file mode 100644
index 0000000000..aa0f7fe931
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/new-parens.js
@@ -0,0 +1,58 @@
+/**
+ * @fileoverview Rule to flag when using constructor without parentheses
+ * @author Ilya Volodin
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require parentheses when invoking a constructor with no arguments",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: [],
+
+ fixable: "code"
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+
+ return {
+ NewExpression(node) {
+ if (node.arguments.length !== 0) {
+ return; // shortcut: if there are arguments, there have to be parens
+ }
+
+ const lastToken = sourceCode.getLastToken(node);
+ const hasLastParen = lastToken && astUtils.isClosingParenToken(lastToken);
+ const hasParens = hasLastParen && astUtils.isOpeningParenToken(sourceCode.getTokenBefore(lastToken));
+
+ if (!hasParens) {
+ context.report({
+ node,
+ message: "Missing '()' invoking a constructor.",
+ fix: fixer => fixer.insertTextAfter(node, "()")
+ });
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/newline-after-var.js b/tools/node_modules/eslint/lib/rules/newline-after-var.js
new file mode 100644
index 0000000000..80f73c836f
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/newline-after-var.js
@@ -0,0 +1,254 @@
+/**
+ * @fileoverview Rule to check empty newline after "var" statement
+ * @author Gopal Venkatesan
+ * @deprecated
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require or disallow an empty line after variable declarations",
+ category: "Stylistic Issues",
+ recommended: false,
+ replacedBy: ["padding-line-between-statements"]
+ },
+
+ schema: [
+ {
+ enum: ["never", "always"]
+ }
+ ],
+
+ fixable: "whitespace",
+
+ deprecated: true
+ },
+
+ create(context) {
+
+ const ALWAYS_MESSAGE = "Expected blank line after variable declarations.",
+ NEVER_MESSAGE = "Unexpected blank line after variable declarations.";
+
+ const sourceCode = context.getSourceCode();
+
+ // Default `mode` to "always".
+ const mode = context.options[0] === "never" ? "never" : "always";
+
+ // Cache starting and ending line numbers of comments for faster lookup
+ const commentEndLine = sourceCode.getAllComments().reduce((result, token) => {
+ result[token.loc.start.line] = token.loc.end.line;
+ return result;
+ }, {});
+
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ /**
+ * Gets a token from the given node to compare line to the next statement.
+ *
+ * In general, the token is the last token of the node. However, the token is the second last token if the following conditions satisfy.
+ *
+ * - The last token is semicolon.
+ * - The semicolon is on a different line from the previous token of the semicolon.
+ *
+ * This behavior would address semicolon-less style code. e.g.:
+ *
+ * var foo = 1
+ *
+ * ;(a || b).doSomething()
+ *
+ * @param {ASTNode} node - The node to get.
+ * @returns {Token} The token to compare line to the next statement.
+ */
+ function getLastToken(node) {
+ const lastToken = sourceCode.getLastToken(node);
+
+ if (lastToken.type === "Punctuator" && lastToken.value === ";") {
+ const prevToken = sourceCode.getTokenBefore(lastToken);
+
+ if (prevToken.loc.end.line !== lastToken.loc.start.line) {
+ return prevToken;
+ }
+ }
+
+ return lastToken;
+ }
+
+ /**
+ * Determine if provided keyword is a variable declaration
+ * @private
+ * @param {string} keyword - keyword to test
+ * @returns {boolean} True if `keyword` is a type of var
+ */
+ function isVar(keyword) {
+ return keyword === "var" || keyword === "let" || keyword === "const";
+ }
+
+ /**
+ * Determine if provided keyword is a variant of for specifiers
+ * @private
+ * @param {string} keyword - keyword to test
+ * @returns {boolean} True if `keyword` is a variant of for specifier
+ */
+ function isForTypeSpecifier(keyword) {
+ return keyword === "ForStatement" || keyword === "ForInStatement" || keyword === "ForOfStatement";
+ }
+
+ /**
+ * Determine if provided keyword is an export specifiers
+ * @private
+ * @param {string} nodeType - nodeType to test
+ * @returns {boolean} True if `nodeType` is an export specifier
+ */
+ function isExportSpecifier(nodeType) {
+ return nodeType === "ExportNamedDeclaration" || nodeType === "ExportSpecifier" ||
+ nodeType === "ExportDefaultDeclaration" || nodeType === "ExportAllDeclaration";
+ }
+
+ /**
+ * Determine if provided node is the last of their parent block.
+ * @private
+ * @param {ASTNode} node - node to test
+ * @returns {boolean} True if `node` is last of their parent block.
+ */
+ function isLastNode(node) {
+ const token = sourceCode.getTokenAfter(node);
+
+ return !token || (token.type === "Punctuator" && token.value === "}");
+ }
+
+ /**
+ * Gets the last line of a group of consecutive comments
+ * @param {number} commentStartLine The starting line of the group
+ * @returns {number} The number of the last comment line of the group
+ */
+ function getLastCommentLineOfBlock(commentStartLine) {
+ const currentCommentEnd = commentEndLine[commentStartLine];
+
+ return commentEndLine[currentCommentEnd + 1] ? getLastCommentLineOfBlock(currentCommentEnd + 1) : currentCommentEnd;
+ }
+
+ /**
+ * Determine if a token starts more than one line after a comment ends
+ * @param {token} token The token being checked
+ * @param {integer} commentStartLine The line number on which the comment starts
+ * @returns {boolean} True if `token` does not start immediately after a comment
+ */
+ function hasBlankLineAfterComment(token, commentStartLine) {
+ return token.loc.start.line > getLastCommentLineOfBlock(commentStartLine) + 1;
+ }
+
+ /**
+ * Checks that a blank line exists after a variable declaration when mode is
+ * set to "always", or checks that there is no blank line when mode is set
+ * to "never"
+ * @private
+ * @param {ASTNode} node - `VariableDeclaration` node to test
+ * @returns {void}
+ */
+ function checkForBlankLine(node) {
+
+ /*
+ * lastToken is the last token on the node's line. It will usually also be the last token of the node, but it will
+ * sometimes be second-last if there is a semicolon on a different line.
+ */
+ const lastToken = getLastToken(node),
+
+ /*
+ * If lastToken is the last token of the node, nextToken should be the token after the node. Otherwise, nextToken
+ * is the last token of the node.
+ */
+ nextToken = lastToken === sourceCode.getLastToken(node) ? sourceCode.getTokenAfter(node) : sourceCode.getLastToken(node),
+ nextLineNum = lastToken.loc.end.line + 1;
+
+ // Ignore if there is no following statement
+ if (!nextToken) {
+ return;
+ }
+
+ // Ignore if parent of node is a for variant
+ if (isForTypeSpecifier(node.parent.type)) {
+ return;
+ }
+
+ // Ignore if parent of node is an export specifier
+ if (isExportSpecifier(node.parent.type)) {
+ return;
+ }
+
+ /*
+ * Some coding styles use multiple `var` statements, so do nothing if
+ * the next token is a `var` statement.
+ */
+ if (nextToken.type === "Keyword" && isVar(nextToken.value)) {
+ return;
+ }
+
+ // Ignore if it is last statement in a block
+ if (isLastNode(node)) {
+ return;
+ }
+
+ // Next statement is not a `var`...
+ const noNextLineToken = nextToken.loc.start.line > nextLineNum;
+ const hasNextLineComment = (typeof commentEndLine[nextLineNum] !== "undefined");
+
+ if (mode === "never" && noNextLineToken && !hasNextLineComment) {
+ context.report({
+ node,
+ message: NEVER_MESSAGE,
+ data: { identifier: node.name },
+ fix(fixer) {
+ const linesBetween = sourceCode.getText().slice(lastToken.range[1], nextToken.range[0]).split(astUtils.LINEBREAK_MATCHER);
+
+ return fixer.replaceTextRange([lastToken.range[1], nextToken.range[0]], `${linesBetween.slice(0, -1).join("")}\n${linesBetween[linesBetween.length - 1]}`);
+ }
+ });
+ }
+
+ // Token on the next line, or comment without blank line
+ if (
+ mode === "always" && (
+ !noNextLineToken ||
+ hasNextLineComment && !hasBlankLineAfterComment(nextToken, nextLineNum)
+ )
+ ) {
+ context.report({
+ node,
+ message: ALWAYS_MESSAGE,
+ data: { identifier: node.name },
+ fix(fixer) {
+ if ((noNextLineToken ? getLastCommentLineOfBlock(nextLineNum) : lastToken.loc.end.line) === nextToken.loc.start.line) {
+ return fixer.insertTextBefore(nextToken, "\n\n");
+ }
+
+ return fixer.insertTextBeforeRange([nextToken.range[0] - nextToken.loc.start.column, nextToken.range[1]], "\n");
+ }
+ });
+ }
+ }
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+ VariableDeclaration: checkForBlankLine
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/newline-before-return.js b/tools/node_modules/eslint/lib/rules/newline-before-return.js
new file mode 100644
index 0000000000..02bd66db13
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/newline-before-return.js
@@ -0,0 +1,210 @@
+/**
+ * @fileoverview Rule to require newlines before `return` statement
+ * @author Kai Cataldo
+ * @deprecated
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require an empty line before `return` statements",
+ category: "Stylistic Issues",
+ recommended: false,
+ replacedBy: ["padding-line-between-statements"]
+ },
+ fixable: "whitespace",
+ schema: [],
+ deprecated: true
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ /**
+ * Tests whether node is preceded by supplied tokens
+ * @param {ASTNode} node - node to check
+ * @param {array} testTokens - array of tokens to test against
+ * @returns {boolean} Whether or not the node is preceded by one of the supplied tokens
+ * @private
+ */
+ function isPrecededByTokens(node, testTokens) {
+ const tokenBefore = sourceCode.getTokenBefore(node);
+
+ return testTokens.some(token => tokenBefore.value === token);
+ }
+
+ /**
+ * Checks whether node is the first node after statement or in block
+ * @param {ASTNode} node - node to check
+ * @returns {boolean} Whether or not the node is the first node after statement or in block
+ * @private
+ */
+ function isFirstNode(node) {
+ const parentType = node.parent.type;
+
+ if (node.parent.body) {
+ return Array.isArray(node.parent.body)
+ ? node.parent.body[0] === node
+ : node.parent.body === node;
+ }
+
+ if (parentType === "IfStatement") {
+ return isPrecededByTokens(node, ["else", ")"]);
+ }
+ if (parentType === "DoWhileStatement") {
+ return isPrecededByTokens(node, ["do"]);
+ }
+ if (parentType === "SwitchCase") {
+ return isPrecededByTokens(node, [":"]);
+ }
+ return isPrecededByTokens(node, [")"]);
+
+ }
+
+ /**
+ * Returns the number of lines of comments that precede the node
+ * @param {ASTNode} node - node to check for overlapping comments
+ * @param {number} lineNumTokenBefore - line number of previous token, to check for overlapping comments
+ * @returns {number} Number of lines of comments that precede the node
+ * @private
+ */
+ function calcCommentLines(node, lineNumTokenBefore) {
+ const comments = sourceCode.getCommentsBefore(node);
+ let numLinesComments = 0;
+
+ if (!comments.length) {
+ return numLinesComments;
+ }
+
+ comments.forEach(comment => {
+ numLinesComments++;
+
+ if (comment.type === "Block") {
+ numLinesComments += comment.loc.end.line - comment.loc.start.line;
+ }
+
+ // avoid counting lines with inline comments twice
+ if (comment.loc.start.line === lineNumTokenBefore) {
+ numLinesComments--;
+ }
+
+ if (comment.loc.end.line === node.loc.start.line) {
+ numLinesComments--;
+ }
+ });
+
+ return numLinesComments;
+ }
+
+ /**
+ * Returns the line number of the token before the node that is passed in as an argument
+ * @param {ASTNode} node - The node to use as the start of the calculation
+ * @returns {number} Line number of the token before `node`
+ * @private
+ */
+ function getLineNumberOfTokenBefore(node) {
+ const tokenBefore = sourceCode.getTokenBefore(node);
+ let lineNumTokenBefore;
+
+ /**
+ * Global return (at the beginning of a script) is a special case.
+ * If there is no token before `return`, then we expect no line
+ * break before the return. Comments are allowed to occupy lines
+ * before the global return, just no blank lines.
+ * Setting lineNumTokenBefore to zero in that case results in the
+ * desired behavior.
+ */
+ if (tokenBefore) {
+ lineNumTokenBefore = tokenBefore.loc.end.line;
+ } else {
+ lineNumTokenBefore = 0; // global return at beginning of script
+ }
+
+ return lineNumTokenBefore;
+ }
+
+ /**
+ * Checks whether node is preceded by a newline
+ * @param {ASTNode} node - node to check
+ * @returns {boolean} Whether or not the node is preceded by a newline
+ * @private
+ */
+ function hasNewlineBefore(node) {
+ const lineNumNode = node.loc.start.line;
+ const lineNumTokenBefore = getLineNumberOfTokenBefore(node);
+ const commentLines = calcCommentLines(node, lineNumTokenBefore);
+
+ return (lineNumNode - lineNumTokenBefore - commentLines) > 1;
+ }
+
+ /**
+ * Checks whether it is safe to apply a fix to a given return statement.
+ *
+ * The fix is not considered safe if the given return statement has leading comments,
+ * as we cannot safely determine if the newline should be added before or after the comments.
+ * For more information, see: https://github.com/eslint/eslint/issues/5958#issuecomment-222767211
+ *
+ * @param {ASTNode} node - The return statement node to check.
+ * @returns {boolean} `true` if it can fix the node.
+ * @private
+ */
+ function canFix(node) {
+ const leadingComments = sourceCode.getCommentsBefore(node);
+ const lastLeadingComment = leadingComments[leadingComments.length - 1];
+ const tokenBefore = sourceCode.getTokenBefore(node);
+
+ if (leadingComments.length === 0) {
+ return true;
+ }
+
+ /*
+ * if the last leading comment ends in the same line as the previous token and
+ * does not share a line with the `return` node, we can consider it safe to fix.
+ * Example:
+ * function a() {
+ * var b; //comment
+ * return;
+ * }
+ */
+ if (lastLeadingComment.loc.end.line === tokenBefore.loc.end.line &&
+ lastLeadingComment.loc.end.line !== node.loc.start.line) {
+ return true;
+ }
+
+ return false;
+ }
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+ ReturnStatement(node) {
+ if (!isFirstNode(node) && !hasNewlineBefore(node)) {
+ context.report({
+ node,
+ message: "Expected newline before return statement.",
+ fix(fixer) {
+ if (canFix(node)) {
+ const tokenBefore = sourceCode.getTokenBefore(node);
+ const newlines = node.loc.start.line === tokenBefore.loc.end.line ? "\n\n" : "\n";
+
+ return fixer.insertTextBefore(node, newlines);
+ }
+ return null;
+ }
+ });
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/newline-per-chained-call.js b/tools/node_modules/eslint/lib/rules/newline-per-chained-call.js
new file mode 100644
index 0000000000..356c4baf32
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/newline-per-chained-call.js
@@ -0,0 +1,103 @@
+/**
+ * @fileoverview Rule to ensure newline per method call when chaining calls
+ * @author Rajendra Patil
+ * @author Burak Yigit Kaya
+ */
+
+"use strict";
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require a newline after each call in a method chain",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+ fixable: "whitespace",
+ schema: [{
+ type: "object",
+ properties: {
+ ignoreChainWithDepth: {
+ type: "integer",
+ minimum: 1,
+ maximum: 10
+ }
+ },
+ additionalProperties: false
+ }]
+ },
+
+ create(context) {
+
+ const options = context.options[0] || {},
+ ignoreChainWithDepth = options.ignoreChainWithDepth || 2;
+
+ const sourceCode = context.getSourceCode();
+
+ /**
+ * Get the prefix of a given MemberExpression node.
+ * If the MemberExpression node is a computed value it returns a
+ * left bracket. If not it returns a period.
+ *
+ * @param {ASTNode} node - A MemberExpression node to get
+ * @returns {string} The prefix of the node.
+ */
+ function getPrefix(node) {
+ return node.computed ? "[" : ".";
+ }
+
+ /**
+ * Gets the property text of a given MemberExpression node.
+ * If the text is multiline, this returns only the first line.
+ *
+ * @param {ASTNode} node - A MemberExpression node to get.
+ * @returns {string} The property text of the node.
+ */
+ function getPropertyText(node) {
+ const prefix = getPrefix(node);
+ const lines = sourceCode.getText(node.property).split(astUtils.LINEBREAK_MATCHER);
+ const suffix = node.computed && lines.length === 1 ? "]" : "";
+
+ return prefix + lines[0] + suffix;
+ }
+
+ return {
+ "CallExpression:exit"(node) {
+ if (!node.callee || node.callee.type !== "MemberExpression") {
+ return;
+ }
+
+ const callee = node.callee;
+ let parent = callee.object;
+ let depth = 1;
+
+ while (parent && parent.callee) {
+ depth += 1;
+ parent = parent.callee.object;
+ }
+
+ if (depth > ignoreChainWithDepth && astUtils.isTokenOnSameLine(callee.object, callee.property)) {
+ context.report({
+ node: callee.property,
+ loc: callee.property.loc.start,
+ message: "Expected line break before `{{callee}}`.",
+ data: {
+ callee: getPropertyText(callee)
+ },
+ fix(fixer) {
+ const firstTokenAfterObject = sourceCode.getTokenAfter(callee.object, astUtils.isNotClosingParenToken);
+
+ return fixer.insertTextBefore(firstTokenAfterObject, "\n");
+ }
+ });
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-alert.js b/tools/node_modules/eslint/lib/rules/no-alert.js
new file mode 100644
index 0000000000..bc1087253b
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-alert.js
@@ -0,0 +1,123 @@
+/**
+ * @fileoverview Rule to flag use of alert, confirm, prompt
+ * @author Nicholas C. Zakas
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const getPropertyName = require("../ast-utils").getStaticPropertyName;
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Checks if the given name is a prohibited identifier.
+ * @param {string} name The name to check
+ * @returns {boolean} Whether or not the name is prohibited.
+ */
+function isProhibitedIdentifier(name) {
+ return /^(alert|confirm|prompt)$/.test(name);
+}
+
+/**
+ * Reports the given node and identifier name.
+ * @param {RuleContext} context The ESLint rule context.
+ * @param {ASTNode} node The node to report on.
+ * @param {string} identifierName The name of the identifier.
+ * @returns {void}
+ */
+function report(context, node, identifierName) {
+ context.report(node, "Unexpected {{name}}.", { name: identifierName });
+}
+
+/**
+ * Finds the eslint-scope reference in the given scope.
+ * @param {Object} scope The scope to search.
+ * @param {ASTNode} node The identifier node.
+ * @returns {Reference|null} Returns the found reference or null if none were found.
+ */
+function findReference(scope, node) {
+ const references = scope.references.filter(reference => reference.identifier.range[0] === node.range[0] &&
+ reference.identifier.range[1] === node.range[1]);
+
+ if (references.length === 1) {
+ return references[0];
+ }
+ return null;
+}
+
+/**
+ * Checks if the given identifier node is shadowed in the given scope.
+ * @param {Object} scope The current scope.
+ * @param {string} node The identifier node to check
+ * @returns {boolean} Whether or not the name is shadowed.
+ */
+function isShadowed(scope, node) {
+ const reference = findReference(scope, node);
+
+ return reference && reference.resolved && reference.resolved.defs.length > 0;
+}
+
+/**
+ * Checks if the given identifier node is a ThisExpression in the global scope or the global window property.
+ * @param {Object} scope The current scope.
+ * @param {string} node The identifier node to check
+ * @returns {boolean} Whether or not the node is a reference to the global object.
+ */
+function isGlobalThisReferenceOrGlobalWindow(scope, node) {
+ if (scope.type === "global" && node.type === "ThisExpression") {
+ return true;
+ }
+ if (node.name === "window") {
+ return !isShadowed(scope, node);
+ }
+
+ return false;
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow the use of `alert`, `confirm`, and `prompt`",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+ return {
+ CallExpression(node) {
+ const callee = node.callee,
+ currentScope = context.getScope();
+
+ // without window.
+ if (callee.type === "Identifier") {
+ const identifierName = callee.name;
+
+ if (!isShadowed(currentScope, callee) && isProhibitedIdentifier(callee.name)) {
+ report(context, node, identifierName);
+ }
+
+ } else if (callee.type === "MemberExpression" && isGlobalThisReferenceOrGlobalWindow(currentScope, callee.object)) {
+ const identifierName = getPropertyName(callee);
+
+ if (isProhibitedIdentifier(identifierName)) {
+ report(context, node, identifierName);
+ }
+ }
+
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-array-constructor.js b/tools/node_modules/eslint/lib/rules/no-array-constructor.js
new file mode 100644
index 0000000000..70dc8b4cd5
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-array-constructor.js
@@ -0,0 +1,47 @@
+/**
+ * @fileoverview Disallow construction of dense arrays using the Array constructor
+ * @author Matt DuVall <http://www.mattduvall.com/>
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow `Array` constructors",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ /**
+ * Disallow construction of dense arrays using the Array constructor
+ * @param {ASTNode} node node to evaluate
+ * @returns {void}
+ * @private
+ */
+ function check(node) {
+ if (
+ node.arguments.length !== 1 &&
+ node.callee.type === "Identifier" &&
+ node.callee.name === "Array"
+ ) {
+ context.report({ node, message: "The array literal notation [] is preferrable." });
+ }
+ }
+
+ return {
+ CallExpression: check,
+ NewExpression: check
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-await-in-loop.js b/tools/node_modules/eslint/lib/rules/no-await-in-loop.js
new file mode 100644
index 0000000000..d1ed92b704
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-await-in-loop.js
@@ -0,0 +1,83 @@
+/**
+ * @fileoverview Rule to disallow uses of await inside of loops.
+ * @author Nat Mote (nmote)
+ */
+"use strict";
+
+// Node types which are considered loops.
+const loopTypes = new Set([
+ "ForStatement",
+ "ForOfStatement",
+ "ForInStatement",
+ "WhileStatement",
+ "DoWhileStatement"
+]);
+
+/*
+ * Node types at which we should stop looking for loops. For example, it is fine to declare an async
+ * function within a loop, and use await inside of that.
+ */
+const boundaryTypes = new Set([
+ "FunctionDeclaration",
+ "FunctionExpression",
+ "ArrowFunctionExpression"
+]);
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow `await` inside of loops",
+ category: "Possible Errors",
+ recommended: false
+ },
+ schema: []
+ },
+ create(context) {
+ return {
+ AwaitExpression(node) {
+ const ancestors = context.getAncestors();
+
+ // Reverse so that we can traverse from the deepest node upwards.
+ ancestors.reverse();
+
+ /*
+ * Create a set of all the ancestors plus this node so that we can check
+ * if this use of await appears in the body of the loop as opposed to
+ * the right-hand side of a for...of, for example.
+ */
+ const ancestorSet = new Set(ancestors).add(node);
+
+ for (let i = 0; i < ancestors.length; i++) {
+ const ancestor = ancestors[i];
+
+ if (boundaryTypes.has(ancestor.type)) {
+
+ /*
+ * Short-circuit out if we encounter a boundary type. Loops above
+ * this do not matter.
+ */
+ return;
+ }
+ if (loopTypes.has(ancestor.type)) {
+
+ /*
+ * Only report if we are actually in the body or another part that gets executed on
+ * every iteration.
+ */
+ if (
+ ancestorSet.has(ancestor.body) ||
+ ancestorSet.has(ancestor.test) ||
+ ancestorSet.has(ancestor.update)
+ ) {
+ context.report({
+ node,
+ message: "Unexpected `await` inside a loop."
+ });
+ return;
+ }
+ }
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-bitwise.js b/tools/node_modules/eslint/lib/rules/no-bitwise.js
new file mode 100644
index 0000000000..f062ad2669
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-bitwise.js
@@ -0,0 +1,111 @@
+/**
+ * @fileoverview Rule to flag bitwise identifiers
+ * @author Nicholas C. Zakas
+ */
+
+"use strict";
+
+/*
+ *
+ * Set of bitwise operators.
+ *
+ */
+const BITWISE_OPERATORS = [
+ "^", "|", "&", "<<", ">>", ">>>",
+ "^=", "|=", "&=", "<<=", ">>=", ">>>=",
+ "~"
+];
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow bitwise operators",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ allow: {
+ type: "array",
+ items: {
+ enum: BITWISE_OPERATORS
+ },
+ uniqueItems: true
+ },
+ int32Hint: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+ const options = context.options[0] || {};
+ const allowed = options.allow || [];
+ const int32Hint = options.int32Hint === true;
+
+ /**
+ * Reports an unexpected use of a bitwise operator.
+ * @param {ASTNode} node Node which contains the bitwise operator.
+ * @returns {void}
+ */
+ function report(node) {
+ context.report({ node, message: "Unexpected use of '{{operator}}'.", data: { operator: node.operator } });
+ }
+
+ /**
+ * Checks if the given node has a bitwise operator.
+ * @param {ASTNode} node The node to check.
+ * @returns {boolean} Whether or not the node has a bitwise operator.
+ */
+ function hasBitwiseOperator(node) {
+ return BITWISE_OPERATORS.indexOf(node.operator) !== -1;
+ }
+
+ /**
+ * Checks if exceptions were provided, e.g. `{ allow: ['~', '|'] }`.
+ * @param {ASTNode} node The node to check.
+ * @returns {boolean} Whether or not the node has a bitwise operator.
+ */
+ function allowedOperator(node) {
+ return allowed.indexOf(node.operator) !== -1;
+ }
+
+ /**
+ * Checks if the given bitwise operator is used for integer typecasting, i.e. "|0"
+ * @param {ASTNode} node The node to check.
+ * @returns {boolean} whether the node is used in integer typecasting.
+ */
+ function isInt32Hint(node) {
+ return int32Hint && node.operator === "|" && node.right &&
+ node.right.type === "Literal" && node.right.value === 0;
+ }
+
+ /**
+ * Report if the given node contains a bitwise operator.
+ * @param {ASTNode} node The node to check.
+ * @returns {void}
+ */
+ function checkNodeForBitwiseOperator(node) {
+ if (hasBitwiseOperator(node) && !allowedOperator(node) && !isInt32Hint(node)) {
+ report(node);
+ }
+ }
+
+ return {
+ AssignmentExpression: checkNodeForBitwiseOperator,
+ BinaryExpression: checkNodeForBitwiseOperator,
+ UnaryExpression: checkNodeForBitwiseOperator
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-buffer-constructor.js b/tools/node_modules/eslint/lib/rules/no-buffer-constructor.js
new file mode 100644
index 0000000000..1521ff2847
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-buffer-constructor.js
@@ -0,0 +1,37 @@
+/**
+ * @fileoverview disallow use of the Buffer() constructor
+ * @author Teddy Katz
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow use of the Buffer() constructor",
+ category: "Node.js and CommonJS",
+ recommended: false
+ },
+ schema: []
+ },
+
+ create(context) {
+
+ //----------------------------------------------------------------------
+ // Public
+ //----------------------------------------------------------------------
+
+ return {
+ "CallExpression[callee.name='Buffer'], NewExpression[callee.name='Buffer']"(node) {
+ context.report({
+ node,
+ message: "{{example}} is deprecated. Use Buffer.from(), Buffer.alloc(), or Buffer.allocUnsafe() instead.",
+ data: { example: node.type === "CallExpression" ? "Buffer()" : "new Buffer()" }
+ });
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-caller.js b/tools/node_modules/eslint/lib/rules/no-caller.js
new file mode 100644
index 0000000000..55a37b7d86
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-caller.js
@@ -0,0 +1,39 @@
+/**
+ * @fileoverview Rule to flag use of arguments.callee and arguments.caller.
+ * @author Nicholas C. Zakas
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow the use of `arguments.caller` or `arguments.callee`",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ return {
+
+ MemberExpression(node) {
+ const objectName = node.object.name,
+ propertyName = node.property.name;
+
+ if (objectName === "arguments" && !node.computed && propertyName && propertyName.match(/^calle[er]$/)) {
+ context.report({ node, message: "Avoid arguments.{{property}}.", data: { property: propertyName } });
+ }
+
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-case-declarations.js b/tools/node_modules/eslint/lib/rules/no-case-declarations.js
new file mode 100644
index 0000000000..e801c6bb6e
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-case-declarations.js
@@ -0,0 +1,57 @@
+/**
+ * @fileoverview Rule to flag use of an lexical declarations inside a case clause
+ * @author Erik Arvidsson
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow lexical declarations in case clauses",
+ category: "Best Practices",
+ recommended: true
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ /**
+ * Checks whether or not a node is a lexical declaration.
+ * @param {ASTNode} node A direct child statement of a switch case.
+ * @returns {boolean} Whether or not the node is a lexical declaration.
+ */
+ function isLexicalDeclaration(node) {
+ switch (node.type) {
+ case "FunctionDeclaration":
+ case "ClassDeclaration":
+ return true;
+ case "VariableDeclaration":
+ return node.kind !== "var";
+ default:
+ return false;
+ }
+ }
+
+ return {
+ SwitchCase(node) {
+ for (let i = 0; i < node.consequent.length; i++) {
+ const statement = node.consequent[i];
+
+ if (isLexicalDeclaration(statement)) {
+ context.report({
+ node,
+ message: "Unexpected lexical declaration in case block."
+ });
+ }
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-catch-shadow.js b/tools/node_modules/eslint/lib/rules/no-catch-shadow.js
new file mode 100644
index 0000000000..bef61902e9
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-catch-shadow.js
@@ -0,0 +1,69 @@
+/**
+ * @fileoverview Rule to flag variable leak in CatchClauses in IE 8 and earlier
+ * @author Ian Christian Myers
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow `catch` clause parameters from shadowing variables in the outer scope",
+ category: "Variables",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ /**
+ * Check if the parameters are been shadowed
+ * @param {Object} scope current scope
+ * @param {string} name parameter name
+ * @returns {boolean} True is its been shadowed
+ */
+ function paramIsShadowing(scope, name) {
+ return astUtils.getVariableByName(scope, name) !== null;
+ }
+
+ //--------------------------------------------------------------------------
+ // Public API
+ //--------------------------------------------------------------------------
+
+ return {
+
+ CatchClause(node) {
+ let scope = context.getScope();
+
+ /*
+ * When ecmaVersion >= 6, CatchClause creates its own scope
+ * so start from one upper scope to exclude the current node
+ */
+ if (scope.block === node) {
+ scope = scope.upper;
+ }
+
+ if (paramIsShadowing(scope, node.param.name)) {
+ context.report({ node, message: "Value of '{{name}}' may be overwritten in IE 8 and earlier.", data: { name: node.param.name } });
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-class-assign.js b/tools/node_modules/eslint/lib/rules/no-class-assign.js
new file mode 100644
index 0000000000..4b0443abc7
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-class-assign.js
@@ -0,0 +1,54 @@
+/**
+ * @fileoverview A rule to disallow modifying variables of class declarations
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow reassigning class members",
+ category: "ECMAScript 6",
+ recommended: true
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ /**
+ * Finds and reports references that are non initializer and writable.
+ * @param {Variable} variable - A variable to check.
+ * @returns {void}
+ */
+ function checkVariable(variable) {
+ astUtils.getModifyingReferences(variable.references).forEach(reference => {
+ context.report({ node: reference.identifier, message: "'{{name}}' is a class.", data: { name: reference.identifier.name } });
+
+ });
+ }
+
+ /**
+ * Finds and reports references that are non initializer and writable.
+ * @param {ASTNode} node - A ClassDeclaration/ClassExpression node to check.
+ * @returns {void}
+ */
+ function checkForClass(node) {
+ context.getDeclaredVariables(node).forEach(checkVariable);
+ }
+
+ return {
+ ClassDeclaration: checkForClass,
+ ClassExpression: checkForClass
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-compare-neg-zero.js b/tools/node_modules/eslint/lib/rules/no-compare-neg-zero.js
new file mode 100644
index 0000000000..604e221919
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-compare-neg-zero.js
@@ -0,0 +1,53 @@
+/**
+ * @fileoverview The rule should warn against code that tries to compare against -0.
+ * @author Aladdin-ADD <hh_2013@foxmail.com>
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow comparing against -0",
+ category: "Possible Errors",
+ recommended: true
+ },
+ fixable: null,
+ schema: []
+ },
+
+ create(context) {
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ /**
+ * Checks a given node is -0
+ *
+ * @param {ASTNode} node - A node to check.
+ * @returns {boolean} `true` if the node is -0.
+ */
+ function isNegZero(node) {
+ return node.type === "UnaryExpression" && node.operator === "-" && node.argument.type === "Literal" && node.argument.value === 0;
+ }
+ const OPERATORS_TO_CHECK = new Set([">", ">=", "<", "<=", "==", "===", "!=", "!=="]);
+
+ return {
+ BinaryExpression(node) {
+ if (OPERATORS_TO_CHECK.has(node.operator)) {
+ if (isNegZero(node.left) || isNegZero(node.right)) {
+ context.report({
+ node,
+ message: "Do not use the '{{operator}}' operator to compare against -0.",
+ data: { operator: node.operator }
+ });
+ }
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-cond-assign.js b/tools/node_modules/eslint/lib/rules/no-cond-assign.js
new file mode 100644
index 0000000000..7c031c13f0
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-cond-assign.js
@@ -0,0 +1,139 @@
+/**
+ * @fileoverview Rule to flag assignment in a conditional statement's test expression
+ * @author Stephen Murray <spmurrayzzz>
+ */
+"use strict";
+
+const astUtils = require("../ast-utils");
+
+const NODE_DESCRIPTIONS = {
+ DoWhileStatement: "a 'do...while' statement",
+ ForStatement: "a 'for' statement",
+ IfStatement: "an 'if' statement",
+ WhileStatement: "a 'while' statement"
+};
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow assignment operators in conditional expressions",
+ category: "Possible Errors",
+ recommended: true
+ },
+
+ schema: [
+ {
+ enum: ["except-parens", "always"]
+ }
+ ]
+ },
+
+ create(context) {
+
+ const prohibitAssign = (context.options[0] || "except-parens");
+
+ const sourceCode = context.getSourceCode();
+
+ /**
+ * Check whether an AST node is the test expression for a conditional statement.
+ * @param {!Object} node The node to test.
+ * @returns {boolean} `true` if the node is the text expression for a conditional statement; otherwise, `false`.
+ */
+ function isConditionalTestExpression(node) {
+ return node.parent &&
+ node.parent.test &&
+ node === node.parent.test;
+ }
+
+ /**
+ * Given an AST node, perform a bottom-up search for the first ancestor that represents a conditional statement.
+ * @param {!Object} node The node to use at the start of the search.
+ * @returns {?Object} The closest ancestor node that represents a conditional statement.
+ */
+ function findConditionalAncestor(node) {
+ let currentAncestor = node;
+
+ do {
+ if (isConditionalTestExpression(currentAncestor)) {
+ return currentAncestor.parent;
+ }
+ } while ((currentAncestor = currentAncestor.parent) && !astUtils.isFunction(currentAncestor));
+
+ return null;
+ }
+
+ /**
+ * Check whether the code represented by an AST node is enclosed in two sets of parentheses.
+ * @param {!Object} node The node to test.
+ * @returns {boolean} `true` if the code is enclosed in two sets of parentheses; otherwise, `false`.
+ */
+ function isParenthesisedTwice(node) {
+ const previousToken = sourceCode.getTokenBefore(node, 1),
+ nextToken = sourceCode.getTokenAfter(node, 1);
+
+ return astUtils.isParenthesised(sourceCode, node) &&
+ astUtils.isOpeningParenToken(previousToken) && previousToken.range[1] <= node.range[0] &&
+ astUtils.isClosingParenToken(nextToken) && nextToken.range[0] >= node.range[1];
+ }
+
+ /**
+ * Check a conditional statement's test expression for top-level assignments that are not enclosed in parentheses.
+ * @param {!Object} node The node for the conditional statement.
+ * @returns {void}
+ */
+ function testForAssign(node) {
+ if (node.test &&
+ (node.test.type === "AssignmentExpression") &&
+ (node.type === "ForStatement"
+ ? !astUtils.isParenthesised(sourceCode, node.test)
+ : !isParenthesisedTwice(node.test)
+ )
+ ) {
+
+ // must match JSHint's error message
+ context.report({
+ node,
+ loc: node.test.loc.start,
+ message: "Expected a conditional expression and instead saw an assignment."
+ });
+ }
+ }
+
+ /**
+ * Check whether an assignment expression is descended from a conditional statement's test expression.
+ * @param {!Object} node The node for the assignment expression.
+ * @returns {void}
+ */
+ function testForConditionalAncestor(node) {
+ const ancestor = findConditionalAncestor(node);
+
+ if (ancestor) {
+ context.report({
+ node: ancestor,
+ message: "Unexpected assignment within {{type}}.",
+ data: {
+ type: NODE_DESCRIPTIONS[ancestor.type] || ancestor.type
+ }
+ });
+ }
+ }
+
+ if (prohibitAssign === "always") {
+ return {
+ AssignmentExpression: testForConditionalAncestor
+ };
+ }
+
+ return {
+ DoWhileStatement: testForAssign,
+ ForStatement: testForAssign,
+ IfStatement: testForAssign,
+ WhileStatement: testForAssign
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-confusing-arrow.js b/tools/node_modules/eslint/lib/rules/no-confusing-arrow.js
new file mode 100644
index 0000000000..fc69ca39a9
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-confusing-arrow.js
@@ -0,0 +1,76 @@
+/**
+ * @fileoverview A rule to warn against using arrow functions when they could be
+ * confused with comparisions
+ * @author Jxck <https://github.com/Jxck>
+ */
+
+"use strict";
+
+const astUtils = require("../ast-utils.js");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Checks whether or not a node is a conditional expression.
+ * @param {ASTNode} node - node to test
+ * @returns {boolean} `true` if the node is a conditional expression.
+ */
+function isConditional(node) {
+ return node && node.type === "ConditionalExpression";
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow arrow functions where they could be confused with comparisons",
+ category: "ECMAScript 6",
+ recommended: false
+ },
+
+ fixable: "code",
+
+ schema: [{
+ type: "object",
+ properties: {
+ allowParens: { type: "boolean" }
+ },
+ additionalProperties: false
+ }]
+ },
+
+ create(context) {
+ const config = context.options[0] || {};
+ const sourceCode = context.getSourceCode();
+
+ /**
+ * Reports if an arrow function contains an ambiguous conditional.
+ * @param {ASTNode} node - A node to check and report.
+ * @returns {void}
+ */
+ function checkArrowFunc(node) {
+ const body = node.body;
+
+ if (isConditional(body) && !(config.allowParens && astUtils.isParenthesised(sourceCode, body))) {
+ context.report({
+ node,
+ message: "Arrow function used ambiguously with a conditional expression.",
+ fix(fixer) {
+
+ // if `allowParens` is not set to true dont bother wrapping in parens
+ return config.allowParens && fixer.replaceText(node.body, `(${sourceCode.getText(node.body)})`);
+ }
+ });
+ }
+ }
+
+ return {
+ ArrowFunctionExpression: checkArrowFunc
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-console.js b/tools/node_modules/eslint/lib/rules/no-console.js
new file mode 100644
index 0000000000..f5a3a235e6
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-console.js
@@ -0,0 +1,131 @@
+/**
+ * @fileoverview Rule to flag use of console object
+ * @author Nicholas C. Zakas
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow the use of `console`",
+ category: "Possible Errors",
+ recommended: true
+ },
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ allow: {
+ type: "array",
+ items: {
+ type: "string"
+ },
+ minItems: 1,
+ uniqueItems: true
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+ const options = context.options[0] || {};
+ const allowed = options.allow || [];
+
+ /**
+ * Checks whether the given reference is 'console' or not.
+ *
+ * @param {eslint-scope.Reference} reference - The reference to check.
+ * @returns {boolean} `true` if the reference is 'console'.
+ */
+ function isConsole(reference) {
+ const id = reference.identifier;
+
+ return id && id.name === "console";
+ }
+
+ /**
+ * Checks whether the property name of the given MemberExpression node
+ * is allowed by options or not.
+ *
+ * @param {ASTNode} node - The MemberExpression node to check.
+ * @returns {boolean} `true` if the property name of the node is allowed.
+ */
+ function isAllowed(node) {
+ const propertyName = astUtils.getStaticPropertyName(node);
+
+ return propertyName && allowed.indexOf(propertyName) !== -1;
+ }
+
+ /**
+ * Checks whether the given reference is a member access which is not
+ * allowed by options or not.
+ *
+ * @param {eslint-scope.Reference} reference - The reference to check.
+ * @returns {boolean} `true` if the reference is a member access which
+ * is not allowed by options.
+ */
+ function isMemberAccessExceptAllowed(reference) {
+ const node = reference.identifier;
+ const parent = node.parent;
+
+ return (
+ parent.type === "MemberExpression" &&
+ parent.object === node &&
+ !isAllowed(parent)
+ );
+ }
+
+ /**
+ * Reports the given reference as a violation.
+ *
+ * @param {eslint-scope.Reference} reference - The reference to report.
+ * @returns {void}
+ */
+ function report(reference) {
+ const node = reference.identifier.parent;
+
+ context.report({
+ node,
+ loc: node.loc,
+ message: "Unexpected console statement."
+ });
+ }
+
+ return {
+ "Program:exit"() {
+ const scope = context.getScope();
+ const consoleVar = astUtils.getVariableByName(scope, "console");
+ const shadowed = consoleVar && consoleVar.defs.length > 0;
+
+ /*
+ * 'scope.through' includes all references to undefined
+ * variables. If the variable 'console' is not defined, it uses
+ * 'scope.through'.
+ */
+ const references = consoleVar
+ ? consoleVar.references
+ : scope.through.filter(isConsole);
+
+ if (!shadowed) {
+ references
+ .filter(isMemberAccessExceptAllowed)
+ .forEach(report);
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-const-assign.js b/tools/node_modules/eslint/lib/rules/no-const-assign.js
new file mode 100644
index 0000000000..db1848a981
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-const-assign.js
@@ -0,0 +1,47 @@
+/**
+ * @fileoverview A rule to disallow modifying variables that are declared using `const`
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow reassigning `const` variables",
+ category: "ECMAScript 6",
+ recommended: true
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ /**
+ * Finds and reports references that are non initializer and writable.
+ * @param {Variable} variable - A variable to check.
+ * @returns {void}
+ */
+ function checkVariable(variable) {
+ astUtils.getModifyingReferences(variable.references).forEach(reference => {
+ context.report({ node: reference.identifier, message: "'{{name}}' is constant.", data: { name: reference.identifier.name } });
+ });
+ }
+
+ return {
+ VariableDeclaration(node) {
+ if (node.kind === "const") {
+ context.getDeclaredVariables(node).forEach(checkVariable);
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-constant-condition.js b/tools/node_modules/eslint/lib/rules/no-constant-condition.js
new file mode 100644
index 0000000000..0cd445dfdb
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-constant-condition.js
@@ -0,0 +1,210 @@
+/**
+ * @fileoverview Rule to flag use constant conditions
+ * @author Christian Schulz <http://rndm.de>
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow constant expressions in conditions",
+ category: "Possible Errors",
+ recommended: true
+ },
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ checkLoops: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+
+ ]
+ },
+
+ create(context) {
+ const options = context.options[0] || {},
+ checkLoops = options.checkLoops !== false,
+ loopSetStack = [];
+
+ let loopsInCurrentScope = new Set();
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+
+ /**
+ * Checks if a branch node of LogicalExpression short circuits the whole condition
+ * @param {ASTNode} node The branch of main condition which needs to be checked
+ * @param {string} operator The operator of the main LogicalExpression.
+ * @returns {boolean} true when condition short circuits whole condition
+ */
+ function isLogicalIdentity(node, operator) {
+ switch (node.type) {
+ case "Literal":
+ return (operator === "||" && node.value === true) ||
+ (operator === "&&" && node.value === false);
+
+ case "UnaryExpression":
+ return (operator === "&&" && node.operator === "void");
+
+ case "LogicalExpression":
+ return isLogicalIdentity(node.left, node.operator) ||
+ isLogicalIdentity(node.right, node.operator);
+
+ // no default
+ }
+ return false;
+ }
+
+ /**
+ * Checks if a node has a constant truthiness value.
+ * @param {ASTNode} node The AST node to check.
+ * @param {boolean} inBooleanPosition `false` if checking branch of a condition.
+ * `true` in all other cases
+ * @returns {Bool} true when node's truthiness is constant
+ * @private
+ */
+ function isConstant(node, inBooleanPosition) {
+ switch (node.type) {
+ case "Literal":
+ case "ArrowFunctionExpression":
+ case "FunctionExpression":
+ case "ObjectExpression":
+ case "ArrayExpression":
+ return true;
+
+ case "UnaryExpression":
+ if (node.operator === "void") {
+ return true;
+ }
+
+ return (node.operator === "typeof" && inBooleanPosition) ||
+ isConstant(node.argument, true);
+
+ case "BinaryExpression":
+ return isConstant(node.left, false) &&
+ isConstant(node.right, false) &&
+ node.operator !== "in";
+
+ case "LogicalExpression": {
+ const isLeftConstant = isConstant(node.left, inBooleanPosition);
+ const isRightConstant = isConstant(node.right, inBooleanPosition);
+ const isLeftShortCircuit = (isLeftConstant && isLogicalIdentity(node.left, node.operator));
+ const isRightShortCircuit = (isRightConstant && isLogicalIdentity(node.right, node.operator));
+
+ return (isLeftConstant && isRightConstant) || isLeftShortCircuit || isRightShortCircuit;
+ }
+
+ case "AssignmentExpression":
+ return (node.operator === "=") && isConstant(node.right, inBooleanPosition);
+
+ case "SequenceExpression":
+ return isConstant(node.expressions[node.expressions.length - 1], inBooleanPosition);
+
+ // no default
+ }
+ return false;
+ }
+
+ /**
+ * Tracks when the given node contains a constant condition.
+ * @param {ASTNode} node The AST node to check.
+ * @returns {void}
+ * @private
+ */
+ function trackConstantConditionLoop(node) {
+ if (node.test && isConstant(node.test, true)) {
+ loopsInCurrentScope.add(node);
+ }
+ }
+
+ /**
+ * Reports when the set contains the given constant condition node
+ * @param {ASTNode} node The AST node to check.
+ * @returns {void}
+ * @private
+ */
+ function checkConstantConditionLoopInSet(node) {
+ if (loopsInCurrentScope.has(node)) {
+ loopsInCurrentScope.delete(node);
+ context.report({ node: node.test, message: "Unexpected constant condition." });
+ }
+ }
+
+ /**
+ * Reports when the given node contains a constant condition.
+ * @param {ASTNode} node The AST node to check.
+ * @returns {void}
+ * @private
+ */
+ function reportIfConstant(node) {
+ if (node.test && isConstant(node.test, true)) {
+ context.report({ node: node.test, message: "Unexpected constant condition." });
+ }
+ }
+
+ /**
+ * Stores current set of constant loops in loopSetStack temporarily
+ * and uses a new set to track constant loops
+ * @returns {void}
+ * @private
+ */
+ function enterFunction() {
+ loopSetStack.push(loopsInCurrentScope);
+ loopsInCurrentScope = new Set();
+ }
+
+ /**
+ * Reports when the set still contains stored constant conditions
+ * @param {ASTNode} node The AST node to check.
+ * @returns {void}
+ * @private
+ */
+ function exitFunction() {
+ loopsInCurrentScope = loopSetStack.pop();
+ }
+
+ /**
+ * Checks node when checkLoops option is enabled
+ * @param {ASTNode} node The AST node to check.
+ * @returns {void}
+ * @private
+ */
+ function checkLoop(node) {
+ if (checkLoops) {
+ trackConstantConditionLoop(node);
+ }
+ }
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+ ConditionalExpression: reportIfConstant,
+ IfStatement: reportIfConstant,
+ WhileStatement: checkLoop,
+ "WhileStatement:exit": checkConstantConditionLoopInSet,
+ DoWhileStatement: checkLoop,
+ "DoWhileStatement:exit": checkConstantConditionLoopInSet,
+ ForStatement: checkLoop,
+ "ForStatement > .test": node => checkLoop(node.parent),
+ "ForStatement:exit": checkConstantConditionLoopInSet,
+ FunctionDeclaration: enterFunction,
+ "FunctionDeclaration:exit": exitFunction,
+ YieldExpression: () => loopsInCurrentScope.clear()
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-continue.js b/tools/node_modules/eslint/lib/rules/no-continue.js
new file mode 100644
index 0000000000..2615fba13e
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-continue.js
@@ -0,0 +1,32 @@
+/**
+ * @fileoverview Rule to flag use of continue statement
+ * @author Borislav Zhivkov
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow `continue` statements",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ return {
+ ContinueStatement(node) {
+ context.report({ node, message: "Unexpected use of continue statement." });
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-control-regex.js b/tools/node_modules/eslint/lib/rules/no-control-regex.js
new file mode 100644
index 0000000000..14981f4ab1
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-control-regex.js
@@ -0,0 +1,127 @@
+/**
+ * @fileoverview Rule to forbid control charactes from regular expressions.
+ * @author Nicholas C. Zakas
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow control characters in regular expressions",
+ category: "Possible Errors",
+ recommended: true
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ /**
+ * Get the regex expression
+ * @param {ASTNode} node node to evaluate
+ * @returns {*} Regex if found else null
+ * @private
+ */
+ function getRegExp(node) {
+ if (node.value instanceof RegExp) {
+ return node.value;
+ }
+ if (typeof node.value === "string") {
+
+ const parent = context.getAncestors().pop();
+
+ if ((parent.type === "NewExpression" || parent.type === "CallExpression") &&
+ parent.callee.type === "Identifier" && parent.callee.name === "RegExp"
+ ) {
+
+ // there could be an invalid regular expression string
+ try {
+ return new RegExp(node.value);
+ } catch (ex) {
+ return null;
+ }
+ }
+ }
+
+ return null;
+ }
+
+
+ const controlChar = /[\x00-\x1f]/g; // eslint-disable-line no-control-regex
+ const consecutiveSlashes = /\\+/g;
+ const consecutiveSlashesAtEnd = /\\+$/g;
+ const stringControlChar = /\\x[01][0-9a-f]/ig;
+ const stringControlCharWithoutSlash = /x[01][0-9a-f]/ig;
+
+ /**
+ * Return a list of the control characters in the given regex string
+ * @param {string} regexStr regex as string to check
+ * @returns {array} returns a list of found control characters on given string
+ * @private
+ */
+ function getControlCharacters(regexStr) {
+
+ // check control characters, if RegExp object used
+ const controlChars = regexStr.match(controlChar) || [];
+
+ let stringControlChars = [];
+
+ // check substr, if regex literal used
+ const subStrIndex = regexStr.search(stringControlChar);
+
+ if (subStrIndex > -1) {
+
+ // is it escaped, check backslash count
+ const possibleEscapeCharacters = regexStr.slice(0, subStrIndex).match(consecutiveSlashesAtEnd);
+
+ const hasControlChars = possibleEscapeCharacters === null || !(possibleEscapeCharacters[0].length % 2);
+
+ if (hasControlChars) {
+ stringControlChars = regexStr.slice(subStrIndex, -1)
+ .split(consecutiveSlashes)
+ .filter(Boolean)
+ .map(x => {
+ const match = x.match(stringControlCharWithoutSlash) || [x];
+
+ return `\\${match[0]}`;
+ });
+ }
+ }
+
+ return controlChars.map(x => {
+ const hexCode = `0${x.charCodeAt(0).toString(16)}`.slice(-2);
+
+ return `\\x${hexCode}`;
+ }).concat(stringControlChars);
+ }
+
+ return {
+ Literal(node) {
+ const regex = getRegExp(node);
+
+ if (regex) {
+ const computedValue = regex.toString();
+
+ const controlCharacters = getControlCharacters(computedValue);
+
+ if (controlCharacters.length > 0) {
+ context.report({
+ node,
+ message: "Unexpected control character(s) in regular expression: {{controlChars}}.",
+ data: {
+ controlChars: controlCharacters.join(", ")
+ }
+ });
+ }
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-debugger.js b/tools/node_modules/eslint/lib/rules/no-debugger.js
new file mode 100644
index 0000000000..d79cb18166
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-debugger.js
@@ -0,0 +1,43 @@
+/**
+ * @fileoverview Rule to flag use of a debugger statement
+ * @author Nicholas C. Zakas
+ */
+
+"use strict";
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow the use of `debugger`",
+ category: "Possible Errors",
+ recommended: true
+ },
+ fixable: "code",
+ schema: []
+ },
+
+ create(context) {
+
+ return {
+ DebuggerStatement(node) {
+ context.report({
+ node,
+ message: "Unexpected 'debugger' statement.",
+ fix(fixer) {
+ if (astUtils.STATEMENT_LIST_PARENTS.has(node.parent.type)) {
+ return fixer.remove(node);
+ }
+ return null;
+ }
+ });
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-delete-var.js b/tools/node_modules/eslint/lib/rules/no-delete-var.js
new file mode 100644
index 0000000000..adc1b5bb9c
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-delete-var.js
@@ -0,0 +1,35 @@
+/**
+ * @fileoverview Rule to flag when deleting variables
+ * @author Ilya Volodin
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow deleting variables",
+ category: "Variables",
+ recommended: true
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ return {
+
+ UnaryExpression(node) {
+ if (node.operator === "delete" && node.argument.type === "Identifier") {
+ context.report({ node, message: "Variables should not be deleted." });
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-div-regex.js b/tools/node_modules/eslint/lib/rules/no-div-regex.js
new file mode 100644
index 0000000000..84a9b9a3aa
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-div-regex.js
@@ -0,0 +1,38 @@
+/**
+ * @fileoverview Rule to check for ambiguous div operator in regexes
+ * @author Matt DuVall <http://www.mattduvall.com>
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow division operators explicitly at the beginning of regular expressions",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+
+ return {
+
+ Literal(node) {
+ const token = sourceCode.getFirstToken(node);
+
+ if (token.type === "RegularExpression" && token.value[1] === "=") {
+ context.report({ node, message: "A regular expression literal can be confused with '/='." });
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-dupe-args.js b/tools/node_modules/eslint/lib/rules/no-dupe-args.js
new file mode 100644
index 0000000000..c932be01d7
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-dupe-args.js
@@ -0,0 +1,73 @@
+/**
+ * @fileoverview Rule to flag duplicate arguments
+ * @author Jamund Ferguson
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow duplicate arguments in `function` definitions",
+ category: "Possible Errors",
+ recommended: true
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ /**
+ * Checks whether or not a given definition is a parameter's.
+ * @param {eslint-scope.DefEntry} def - A definition to check.
+ * @returns {boolean} `true` if the definition is a parameter's.
+ */
+ function isParameter(def) {
+ return def.type === "Parameter";
+ }
+
+ /**
+ * Determines if a given node has duplicate parameters.
+ * @param {ASTNode} node The node to check.
+ * @returns {void}
+ * @private
+ */
+ function checkParams(node) {
+ const variables = context.getDeclaredVariables(node);
+
+ for (let i = 0; i < variables.length; ++i) {
+ const variable = variables[i];
+
+ // Checks and reports duplications.
+ const defs = variable.defs.filter(isParameter);
+
+ if (defs.length >= 2) {
+ context.report({
+ node,
+ message: "Duplicate param '{{name}}'.",
+ data: { name: variable.name }
+ });
+ }
+ }
+ }
+
+ //--------------------------------------------------------------------------
+ // Public API
+ //--------------------------------------------------------------------------
+
+ return {
+ FunctionDeclaration: checkParams,
+ FunctionExpression: checkParams
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-dupe-class-members.js b/tools/node_modules/eslint/lib/rules/no-dupe-class-members.js
new file mode 100644
index 0000000000..07b999fab1
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-dupe-class-members.js
@@ -0,0 +1,109 @@
+/**
+ * @fileoverview A rule to disallow duplicate name in class members.
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow duplicate class members",
+ category: "ECMAScript 6",
+ recommended: true
+ },
+
+ schema: []
+ },
+
+ create(context) {
+ let stack = [];
+
+ /**
+ * Gets state of a given member name.
+ * @param {string} name - A name of a member.
+ * @param {boolean} isStatic - A flag which specifies that is a static member.
+ * @returns {Object} A state of a given member name.
+ * - retv.init {boolean} A flag which shows the name is declared as normal member.
+ * - retv.get {boolean} A flag which shows the name is declared as getter.
+ * - retv.set {boolean} A flag which shows the name is declared as setter.
+ */
+ function getState(name, isStatic) {
+ const stateMap = stack[stack.length - 1];
+ const key = `$${name}`; // to avoid "__proto__".
+
+ if (!stateMap[key]) {
+ stateMap[key] = {
+ nonStatic: { init: false, get: false, set: false },
+ static: { init: false, get: false, set: false }
+ };
+ }
+
+ return stateMap[key][isStatic ? "static" : "nonStatic"];
+ }
+
+ /**
+ * Gets the name text of a given node.
+ *
+ * @param {ASTNode} node - A node to get the name.
+ * @returns {string} The name text of the node.
+ */
+ function getName(node) {
+ switch (node.type) {
+ case "Identifier": return node.name;
+ case "Literal": return String(node.value);
+
+ /* istanbul ignore next: syntax error */
+ default: return "";
+ }
+ }
+
+ return {
+
+ // Initializes the stack of state of member declarations.
+ Program() {
+ stack = [];
+ },
+
+ // Initializes state of member declarations for the class.
+ ClassBody() {
+ stack.push(Object.create(null));
+ },
+
+ // Disposes the state for the class.
+ "ClassBody:exit"() {
+ stack.pop();
+ },
+
+ // Reports the node if its name has been declared already.
+ MethodDefinition(node) {
+ if (node.computed) {
+ return;
+ }
+
+ const name = getName(node.key);
+ const state = getState(name, node.static);
+ let isDuplicate = false;
+
+ if (node.kind === "get") {
+ isDuplicate = (state.init || state.get);
+ state.get = true;
+ } else if (node.kind === "set") {
+ isDuplicate = (state.init || state.set);
+ state.set = true;
+ } else {
+ isDuplicate = (state.init || state.get || state.set);
+ state.init = true;
+ }
+
+ if (isDuplicate) {
+ context.report({ node, message: "Duplicate name '{{name}}'.", data: { name } });
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-dupe-keys.js b/tools/node_modules/eslint/lib/rules/no-dupe-keys.js
new file mode 100644
index 0000000000..0120d0b38c
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-dupe-keys.js
@@ -0,0 +1,135 @@
+/**
+ * @fileoverview Rule to flag use of duplicate keys in an object.
+ * @author Ian Christian Myers
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+const GET_KIND = /^(?:init|get)$/;
+const SET_KIND = /^(?:init|set)$/;
+
+/**
+ * The class which stores properties' information of an object.
+ */
+class ObjectInfo {
+
+ /**
+ * @param {ObjectInfo|null} upper - The information of the outer object.
+ * @param {ASTNode} node - The ObjectExpression node of this information.
+ */
+ constructor(upper, node) {
+ this.upper = upper;
+ this.node = node;
+ this.properties = new Map();
+ }
+
+ /**
+ * Gets the information of the given Property node.
+ * @param {ASTNode} node - The Property node to get.
+ * @returns {{get: boolean, set: boolean}} The information of the property.
+ */
+ getPropertyInfo(node) {
+ const name = astUtils.getStaticPropertyName(node);
+
+ if (!this.properties.has(name)) {
+ this.properties.set(name, { get: false, set: false });
+ }
+ return this.properties.get(name);
+ }
+
+ /**
+ * Checks whether the given property has been defined already or not.
+ * @param {ASTNode} node - The Property node to check.
+ * @returns {boolean} `true` if the property has been defined.
+ */
+ isPropertyDefined(node) {
+ const entry = this.getPropertyInfo(node);
+
+ return (
+ (GET_KIND.test(node.kind) && entry.get) ||
+ (SET_KIND.test(node.kind) && entry.set)
+ );
+ }
+
+ /**
+ * Defines the given property.
+ * @param {ASTNode} node - The Property node to define.
+ * @returns {void}
+ */
+ defineProperty(node) {
+ const entry = this.getPropertyInfo(node);
+
+ if (GET_KIND.test(node.kind)) {
+ entry.get = true;
+ }
+ if (SET_KIND.test(node.kind)) {
+ entry.set = true;
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow duplicate keys in object literals",
+ category: "Possible Errors",
+ recommended: true
+ },
+
+ schema: []
+ },
+
+ create(context) {
+ let info = null;
+
+ return {
+ ObjectExpression(node) {
+ info = new ObjectInfo(info, node);
+ },
+ "ObjectExpression:exit"() {
+ info = info.upper;
+ },
+
+ Property(node) {
+ const name = astUtils.getStaticPropertyName(node);
+
+ // Skip destructuring.
+ if (node.parent.type !== "ObjectExpression") {
+ return;
+ }
+
+ // Skip if the name is not static.
+ if (!name) {
+ return;
+ }
+
+ // Reports if the name is defined already.
+ if (info.isPropertyDefined(node)) {
+ context.report({
+ node: info.node,
+ loc: node.key.loc,
+ message: "Duplicate key '{{name}}'.",
+ data: { name }
+ });
+ }
+
+ // Update info.
+ info.defineProperty(node);
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-duplicate-case.js b/tools/node_modules/eslint/lib/rules/no-duplicate-case.js
new file mode 100644
index 0000000000..07823f284c
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-duplicate-case.js
@@ -0,0 +1,43 @@
+/**
+ * @fileoverview Rule to disallow a duplicate case label.
+ * @author Dieter Oberkofler
+ * @author Burak Yigit Kaya
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow duplicate case labels",
+ category: "Possible Errors",
+ recommended: true
+ },
+
+ schema: []
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+
+ return {
+ SwitchStatement(node) {
+ const mapping = {};
+
+ node.cases.forEach(switchCase => {
+ const key = sourceCode.getText(switchCase.test);
+
+ if (mapping[key]) {
+ context.report({ node: switchCase, message: "Duplicate case label." });
+ } else {
+ mapping[key] = switchCase;
+ }
+ });
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-duplicate-imports.js b/tools/node_modules/eslint/lib/rules/no-duplicate-imports.js
new file mode 100644
index 0000000000..d12c3a56df
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-duplicate-imports.js
@@ -0,0 +1,137 @@
+/**
+ * @fileoverview Restrict usage of duplicate imports.
+ * @author Simen Bekkhus
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+/**
+ * Returns the name of the module imported or re-exported.
+ *
+ * @param {ASTNode} node - A node to get.
+ * @returns {string} the name of the module, or empty string if no name.
+ */
+function getValue(node) {
+ if (node && node.source && node.source.value) {
+ return node.source.value.trim();
+ }
+
+ return "";
+}
+
+/**
+ * Checks if the name of the import or export exists in the given array, and reports if so.
+ *
+ * @param {RuleContext} context - The ESLint rule context object.
+ * @param {ASTNode} node - A node to get.
+ * @param {string} value - The name of the imported or exported module.
+ * @param {string[]} array - The array containing other imports or exports in the file.
+ * @param {string} message - A message to be reported after the name of the module
+ *
+ * @returns {void} No return value
+ */
+function checkAndReport(context, node, value, array, message) {
+ if (array.indexOf(value) !== -1) {
+ context.report({
+ node,
+ message: "'{{module}}' {{message}}",
+ data: {
+ module: value,
+ message
+ }
+ });
+ }
+}
+
+/**
+ * @callback nodeCallback
+ * @param {ASTNode} node - A node to handle.
+ */
+
+/**
+ * Returns a function handling the imports of a given file
+ *
+ * @param {RuleContext} context - The ESLint rule context object.
+ * @param {boolean} includeExports - Whether or not to check for exports in addition to imports.
+ * @param {string[]} importsInFile - The array containing other imports in the file.
+ * @param {string[]} exportsInFile - The array containing other exports in the file.
+ *
+ * @returns {nodeCallback} A function passed to ESLint to handle the statement.
+ */
+function handleImports(context, includeExports, importsInFile, exportsInFile) {
+ return function(node) {
+ const value = getValue(node);
+
+ if (value) {
+ checkAndReport(context, node, value, importsInFile, "import is duplicated.");
+
+ if (includeExports) {
+ checkAndReport(context, node, value, exportsInFile, "import is duplicated as export.");
+ }
+
+ importsInFile.push(value);
+ }
+ };
+}
+
+/**
+ * Returns a function handling the exports of a given file
+ *
+ * @param {RuleContext} context - The ESLint rule context object.
+ * @param {string[]} importsInFile - The array containing other imports in the file.
+ * @param {string[]} exportsInFile - The array containing other exports in the file.
+ *
+ * @returns {nodeCallback} A function passed to ESLint to handle the statement.
+ */
+function handleExports(context, importsInFile, exportsInFile) {
+ return function(node) {
+ const value = getValue(node);
+
+ if (value) {
+ checkAndReport(context, node, value, exportsInFile, "export is duplicated.");
+ checkAndReport(context, node, value, importsInFile, "export is duplicated as import.");
+
+ exportsInFile.push(value);
+ }
+ };
+}
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow duplicate module imports",
+ category: "ECMAScript 6",
+ recommended: false
+ },
+
+ schema: [{
+ type: "object",
+ properties: {
+ includeExports: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }]
+ },
+
+ create(context) {
+ const includeExports = (context.options[0] || {}).includeExports,
+ importsInFile = [],
+ exportsInFile = [];
+
+ const handlers = {
+ ImportDeclaration: handleImports(context, includeExports, importsInFile, exportsInFile)
+ };
+
+ if (includeExports) {
+ handlers.ExportNamedDeclaration = handleExports(context, importsInFile, exportsInFile);
+ handlers.ExportAllDeclaration = handleExports(context, importsInFile, exportsInFile);
+ }
+
+ return handlers;
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-else-return.js b/tools/node_modules/eslint/lib/rules/no-else-return.js
new file mode 100644
index 0000000000..deeff41ab8
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-else-return.js
@@ -0,0 +1,276 @@
+/**
+ * @fileoverview Rule to flag `else` after a `return` in `if`
+ * @author Ian Christian Myers
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+const FixTracker = require("../util/fix-tracker");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow `else` blocks after `return` statements in `if` statements",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: [{
+ type: "object",
+ properties: {
+ allowElseIf: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }],
+ fixable: "code"
+ },
+
+ create(context) {
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ /**
+ * Display the context report if rule is violated
+ *
+ * @param {Node} node The 'else' node
+ * @returns {void}
+ */
+ function displayReport(node) {
+ context.report({
+ node,
+ message: "Unnecessary 'else' after 'return'.",
+ fix: fixer => {
+ const sourceCode = context.getSourceCode();
+ const startToken = sourceCode.getFirstToken(node);
+ const elseToken = sourceCode.getTokenBefore(startToken);
+ const source = sourceCode.getText(node);
+ const lastIfToken = sourceCode.getTokenBefore(elseToken);
+ let fixedSource, firstTokenOfElseBlock;
+
+ if (startToken.type === "Punctuator" && startToken.value === "{") {
+ firstTokenOfElseBlock = sourceCode.getTokenAfter(startToken);
+ } else {
+ firstTokenOfElseBlock = startToken;
+ }
+
+ /*
+ * If the if block does not have curly braces and does not end in a semicolon
+ * and the else block starts with (, [, /, +, ` or -, then it is not
+ * safe to remove the else keyword, because ASI will not add a semicolon
+ * after the if block
+ */
+ const ifBlockMaybeUnsafe = node.parent.consequent.type !== "BlockStatement" && lastIfToken.value !== ";";
+ const elseBlockUnsafe = /^[([/+`-]/.test(firstTokenOfElseBlock.value);
+
+ if (ifBlockMaybeUnsafe && elseBlockUnsafe) {
+ return null;
+ }
+
+ const endToken = sourceCode.getLastToken(node);
+ const lastTokenOfElseBlock = sourceCode.getTokenBefore(endToken);
+
+ if (lastTokenOfElseBlock.value !== ";") {
+ const nextToken = sourceCode.getTokenAfter(endToken);
+
+ const nextTokenUnsafe = nextToken && /^[([/+`-]/.test(nextToken.value);
+ const nextTokenOnSameLine = nextToken && nextToken.loc.start.line === lastTokenOfElseBlock.loc.start.line;
+
+ /*
+ * If the else block contents does not end in a semicolon,
+ * and the else block starts with (, [, /, +, ` or -, then it is not
+ * safe to remove the else block, because ASI will not add a semicolon
+ * after the remaining else block contents
+ */
+ if (nextTokenUnsafe || (nextTokenOnSameLine && nextToken.value !== "}")) {
+ return null;
+ }
+ }
+
+ if (startToken.type === "Punctuator" && startToken.value === "{") {
+ fixedSource = source.slice(1, -1);
+ } else {
+ fixedSource = source;
+ }
+
+ /*
+ * Extend the replacement range to include the entire
+ * function to avoid conflicting with no-useless-return.
+ * https://github.com/eslint/eslint/issues/8026
+ */
+ return new FixTracker(fixer, sourceCode)
+ .retainEnclosingFunction(node)
+ .replaceTextRange([elseToken.range[0], node.range[1]], fixedSource);
+ }
+ });
+ }
+
+ /**
+ * Check to see if the node is a ReturnStatement
+ *
+ * @param {Node} node The node being evaluated
+ * @returns {boolean} True if node is a return
+ */
+ function checkForReturn(node) {
+ return node.type === "ReturnStatement";
+ }
+
+ /**
+ * Naive return checking, does not iterate through the whole
+ * BlockStatement because we make the assumption that the ReturnStatement
+ * will be the last node in the body of the BlockStatement.
+ *
+ * @param {Node} node The consequent/alternate node
+ * @returns {boolean} True if it has a return
+ */
+ function naiveHasReturn(node) {
+ if (node.type === "BlockStatement") {
+ const body = node.body,
+ lastChildNode = body[body.length - 1];
+
+ return lastChildNode && checkForReturn(lastChildNode);
+ }
+ return checkForReturn(node);
+ }
+
+ /**
+ * Check to see if the node is valid for evaluation,
+ * meaning it has an else.
+ *
+ * @param {Node} node The node being evaluated
+ * @returns {boolean} True if the node is valid
+ */
+ function hasElse(node) {
+ return node.alternate && node.consequent;
+ }
+
+ /**
+ * If the consequent is an IfStatement, check to see if it has an else
+ * and both its consequent and alternate path return, meaning this is
+ * a nested case of rule violation. If-Else not considered currently.
+ *
+ * @param {Node} node The consequent node
+ * @returns {boolean} True if this is a nested rule violation
+ */
+ function checkForIf(node) {
+ return node.type === "IfStatement" && hasElse(node) &&
+ naiveHasReturn(node.alternate) && naiveHasReturn(node.consequent);
+ }
+
+ /**
+ * Check the consequent/body node to make sure it is not
+ * a ReturnStatement or an IfStatement that returns on both
+ * code paths.
+ *
+ * @param {Node} node The consequent or body node
+ * @param {Node} alternate The alternate node
+ * @returns {boolean} `true` if it is a Return/If node that always returns.
+ */
+ function checkForReturnOrIf(node) {
+ return checkForReturn(node) || checkForIf(node);
+ }
+
+
+ /**
+ * Check whether a node returns in every codepath.
+ * @param {Node} node The node to be checked
+ * @returns {boolean} `true` if it returns on every codepath.
+ */
+ function alwaysReturns(node) {
+ if (node.type === "BlockStatement") {
+
+ // If we have a BlockStatement, check each consequent body node.
+ return node.body.some(checkForReturnOrIf);
+ }
+
+ /*
+ * If not a block statement, make sure the consequent isn't a
+ * ReturnStatement or an IfStatement with returns on both paths.
+ */
+ return checkForReturnOrIf(node);
+ }
+
+
+ /**
+ * Check the if statement, but don't catch else-if blocks.
+ * @returns {void}
+ * @param {Node} node The node for the if statement to check
+ * @private
+ */
+ function checkIfWithoutElse(node) {
+ const parent = node.parent;
+ let consequents,
+ alternate;
+
+ /*
+ * Fixing this would require splitting one statement into two, so no error should
+ * be reported if this node is in a position where only one statement is allowed.
+ */
+ if (!astUtils.STATEMENT_LIST_PARENTS.has(parent.type)) {
+ return;
+ }
+
+ for (consequents = []; node.type === "IfStatement"; node = node.alternate) {
+ if (!node.alternate) {
+ return;
+ }
+ consequents.push(node.consequent);
+ alternate = node.alternate;
+ }
+
+ if (consequents.every(alwaysReturns)) {
+ displayReport(alternate);
+ }
+ }
+
+ /**
+ * Check the if statement
+ * @returns {void}
+ * @param {Node} node The node for the if statement to check
+ * @private
+ */
+ function checkIfWithElse(node) {
+ const parent = node.parent;
+
+
+ /*
+ * Fixing this would require splitting one statement into two, so no error should
+ * be reported if this node is in a position where only one statement is allowed.
+ */
+ if (!astUtils.STATEMENT_LIST_PARENTS.has(parent.type)) {
+ return;
+ }
+
+ const alternate = node.alternate;
+
+ if (alternate && alwaysReturns(node.consequent)) {
+ displayReport(alternate);
+ }
+ }
+
+ const allowElseIf = !(context.options[0] && context.options[0].allowElseIf === false);
+
+ //--------------------------------------------------------------------------
+ // Public API
+ //--------------------------------------------------------------------------
+
+ return {
+
+ "IfStatement:exit": allowElseIf ? checkIfWithoutElse : checkIfWithElse
+
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-empty-character-class.js b/tools/node_modules/eslint/lib/rules/no-empty-character-class.js
new file mode 100644
index 0000000000..0ea7c5a0d1
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-empty-character-class.js
@@ -0,0 +1,57 @@
+/**
+ * @fileoverview Rule to flag the use of empty character classes in regular expressions
+ * @author Ian Christian Myers
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/*
+ * plain-English description of the following regexp:
+ * 0. `^` fix the match at the beginning of the string
+ * 1. `\/`: the `/` that begins the regexp
+ * 2. `([^\\[]|\\.|\[([^\\\]]|\\.)+\])*`: regexp contents; 0 or more of the following
+ * 2.0. `[^\\[]`: any character that's not a `\` or a `[` (anything but escape sequences and character classes)
+ * 2.1. `\\.`: an escape sequence
+ * 2.2. `\[([^\\\]]|\\.)+\]`: a character class that isn't empty
+ * 3. `\/` the `/` that ends the regexp
+ * 4. `[gimuy]*`: optional regexp flags
+ * 5. `$`: fix the match at the end of the string
+ */
+const regex = /^\/([^\\[]|\\.|\[([^\\\]]|\\.)+])*\/[gimuy]*$/;
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow empty character classes in regular expressions",
+ category: "Possible Errors",
+ recommended: true
+ },
+
+ schema: []
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+
+ return {
+
+ Literal(node) {
+ const token = sourceCode.getFirstToken(node);
+
+ if (token.type === "RegularExpression" && !regex.test(token.value)) {
+ context.report({ node, message: "Empty class." });
+ }
+ }
+
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-empty-function.js b/tools/node_modules/eslint/lib/rules/no-empty-function.js
new file mode 100644
index 0000000000..38c915c33f
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-empty-function.js
@@ -0,0 +1,160 @@
+/**
+ * @fileoverview Rule to disallow empty functions.
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+const ALLOW_OPTIONS = Object.freeze([
+ "functions",
+ "arrowFunctions",
+ "generatorFunctions",
+ "methods",
+ "generatorMethods",
+ "getters",
+ "setters",
+ "constructors"
+]);
+
+/**
+ * Gets the kind of a given function node.
+ *
+ * @param {ASTNode} node - A function node to get. This is one of
+ * an ArrowFunctionExpression, a FunctionDeclaration, or a
+ * FunctionExpression.
+ * @returns {string} The kind of the function. This is one of "functions",
+ * "arrowFunctions", "generatorFunctions", "asyncFunctions", "methods",
+ * "generatorMethods", "asyncMethods", "getters", "setters", and
+ * "constructors".
+ */
+function getKind(node) {
+ const parent = node.parent;
+ let kind = "";
+
+ if (node.type === "ArrowFunctionExpression") {
+ return "arrowFunctions";
+ }
+
+ // Detects main kind.
+ if (parent.type === "Property") {
+ if (parent.kind === "get") {
+ return "getters";
+ }
+ if (parent.kind === "set") {
+ return "setters";
+ }
+ kind = parent.method ? "methods" : "functions";
+
+ } else if (parent.type === "MethodDefinition") {
+ if (parent.kind === "get") {
+ return "getters";
+ }
+ if (parent.kind === "set") {
+ return "setters";
+ }
+ if (parent.kind === "constructor") {
+ return "constructors";
+ }
+ kind = "methods";
+
+ } else {
+ kind = "functions";
+ }
+
+ // Detects prefix.
+ let prefix = "";
+
+ if (node.generator) {
+ prefix = "generator";
+ } else if (node.async) {
+ prefix = "async";
+ } else {
+ return kind;
+ }
+ return prefix + kind[0].toUpperCase() + kind.slice(1);
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow empty functions",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ allow: {
+ type: "array",
+ items: { enum: ALLOW_OPTIONS },
+ uniqueItems: true
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+ const options = context.options[0] || {};
+ const allowed = options.allow || [];
+
+ const sourceCode = context.getSourceCode();
+
+ /**
+ * Reports a given function node if the node matches the following patterns.
+ *
+ * - Not allowed by options.
+ * - The body is empty.
+ * - The body doesn't have any comments.
+ *
+ * @param {ASTNode} node - A function node to report. This is one of
+ * an ArrowFunctionExpression, a FunctionDeclaration, or a
+ * FunctionExpression.
+ * @returns {void}
+ */
+ function reportIfEmpty(node) {
+ const kind = getKind(node);
+ const name = astUtils.getFunctionNameWithKind(node);
+ const innerComments = sourceCode.getTokens(node.body, {
+ includeComments: true,
+ filter: astUtils.isCommentToken
+ });
+
+ if (allowed.indexOf(kind) === -1 &&
+ node.body.type === "BlockStatement" &&
+ node.body.body.length === 0 &&
+ innerComments.length === 0
+ ) {
+ context.report({
+ node,
+ loc: node.body.loc.start,
+ message: "Unexpected empty {{name}}.",
+ data: { name }
+ });
+ }
+ }
+
+ return {
+ ArrowFunctionExpression: reportIfEmpty,
+ FunctionDeclaration: reportIfEmpty,
+ FunctionExpression: reportIfEmpty
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-empty-pattern.js b/tools/node_modules/eslint/lib/rules/no-empty-pattern.js
new file mode 100644
index 0000000000..11f50b5414
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-empty-pattern.js
@@ -0,0 +1,36 @@
+/**
+ * @fileoverview Rule to disallow an empty pattern
+ * @author Alberto Rodríguez
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow empty destructuring patterns",
+ category: "Best Practices",
+ recommended: true
+ },
+
+ schema: []
+ },
+
+ create(context) {
+ return {
+ ObjectPattern(node) {
+ if (node.properties.length === 0) {
+ context.report({ node, message: "Unexpected empty object pattern." });
+ }
+ },
+ ArrayPattern(node) {
+ if (node.elements.length === 0) {
+ context.report({ node, message: "Unexpected empty array pattern." });
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-empty.js b/tools/node_modules/eslint/lib/rules/no-empty.js
new file mode 100644
index 0000000000..b71b8582a3
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-empty.js
@@ -0,0 +1,78 @@
+/**
+ * @fileoverview Rule to flag use of an empty block statement
+ * @author Nicholas C. Zakas
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow empty block statements",
+ category: "Possible Errors",
+ recommended: true
+ },
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ allowEmptyCatch: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+ const options = context.options[0] || {},
+ allowEmptyCatch = options.allowEmptyCatch || false;
+
+ const sourceCode = context.getSourceCode();
+
+ return {
+ BlockStatement(node) {
+
+ // if the body is not empty, we can just return immediately
+ if (node.body.length !== 0) {
+ return;
+ }
+
+ // a function is generally allowed to be empty
+ if (astUtils.isFunction(node.parent)) {
+ return;
+ }
+
+ if (allowEmptyCatch && node.parent.type === "CatchClause") {
+ return;
+ }
+
+ // any other block is only allowed to be empty, if it contains a comment
+ if (sourceCode.getCommentsInside(node).length > 0) {
+ return;
+ }
+
+ context.report({ node, message: "Empty block statement." });
+ },
+
+ SwitchStatement(node) {
+
+ if (typeof node.cases === "undefined" || node.cases.length === 0) {
+ context.report({ node, message: "Empty switch statement." });
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-eq-null.js b/tools/node_modules/eslint/lib/rules/no-eq-null.js
new file mode 100644
index 0000000000..7e915a8c72
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-eq-null.js
@@ -0,0 +1,39 @@
+/**
+ * @fileoverview Rule to flag comparisons to null without a type-checking
+ * operator.
+ * @author Ian Christian Myers
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow `null` comparisons without type-checking operators",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ return {
+
+ BinaryExpression(node) {
+ const badOperator = node.operator === "==" || node.operator === "!=";
+
+ if (node.right.type === "Literal" && node.right.raw === "null" && badOperator ||
+ node.left.type === "Literal" && node.left.raw === "null" && badOperator) {
+ context.report({ node, message: "Use ‘===’ to compare with ‘null’." });
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-eval.js b/tools/node_modules/eslint/lib/rules/no-eval.js
new file mode 100644
index 0000000000..ee5f577f47
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-eval.js
@@ -0,0 +1,308 @@
+/**
+ * @fileoverview Rule to flag use of eval() statement
+ * @author Nicholas C. Zakas
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+const candidatesOfGlobalObject = Object.freeze([
+ "global",
+ "window"
+]);
+
+/**
+ * Checks a given node is a Identifier node of the specified name.
+ *
+ * @param {ASTNode} node - A node to check.
+ * @param {string} name - A name to check.
+ * @returns {boolean} `true` if the node is a Identifier node of the name.
+ */
+function isIdentifier(node, name) {
+ return node.type === "Identifier" && node.name === name;
+}
+
+/**
+ * Checks a given node is a Literal node of the specified string value.
+ *
+ * @param {ASTNode} node - A node to check.
+ * @param {string} name - A name to check.
+ * @returns {boolean} `true` if the node is a Literal node of the name.
+ */
+function isConstant(node, name) {
+ switch (node.type) {
+ case "Literal":
+ return node.value === name;
+
+ case "TemplateLiteral":
+ return (
+ node.expressions.length === 0 &&
+ node.quasis[0].value.cooked === name
+ );
+
+ default:
+ return false;
+ }
+}
+
+/**
+ * Checks a given node is a MemberExpression node which has the specified name's
+ * property.
+ *
+ * @param {ASTNode} node - A node to check.
+ * @param {string} name - A name to check.
+ * @returns {boolean} `true` if the node is a MemberExpression node which has
+ * the specified name's property
+ */
+function isMember(node, name) {
+ return (
+ node.type === "MemberExpression" &&
+ (node.computed ? isConstant : isIdentifier)(node.property, name)
+ );
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow the use of `eval()`",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ allowIndirect: { type: "boolean" }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+ const allowIndirect = Boolean(
+ context.options[0] &&
+ context.options[0].allowIndirect
+ );
+ const sourceCode = context.getSourceCode();
+ let funcInfo = null;
+
+ /**
+ * Pushs a variable scope (Program or Function) information to the stack.
+ *
+ * This is used in order to check whether or not `this` binding is a
+ * reference to the global object.
+ *
+ * @param {ASTNode} node - A node of the scope. This is one of Program,
+ * FunctionDeclaration, FunctionExpression, and ArrowFunctionExpression.
+ * @returns {void}
+ */
+ function enterVarScope(node) {
+ const strict = context.getScope().isStrict;
+
+ funcInfo = {
+ upper: funcInfo,
+ node,
+ strict,
+ defaultThis: false,
+ initialized: strict
+ };
+ }
+
+ /**
+ * Pops a variable scope from the stack.
+ *
+ * @returns {void}
+ */
+ function exitVarScope() {
+ funcInfo = funcInfo.upper;
+ }
+
+ /**
+ * Reports a given node.
+ *
+ * `node` is `Identifier` or `MemberExpression`.
+ * The parent of `node` might be `CallExpression`.
+ *
+ * The location of the report is always `eval` `Identifier` (or possibly
+ * `Literal`). The type of the report is `CallExpression` if the parent is
+ * `CallExpression`. Otherwise, it's the given node type.
+ *
+ * @param {ASTNode} node - A node to report.
+ * @returns {void}
+ */
+ function report(node) {
+ let locationNode = node;
+ const parent = node.parent;
+
+ if (node.type === "MemberExpression") {
+ locationNode = node.property;
+ }
+ if (parent.type === "CallExpression" && parent.callee === node) {
+ node = parent;
+ }
+
+ context.report({
+ node,
+ loc: locationNode.loc.start,
+ message: "eval can be harmful."
+ });
+ }
+
+ /**
+ * Reports accesses of `eval` via the global object.
+ *
+ * @param {eslint-scope.Scope} globalScope - The global scope.
+ * @returns {void}
+ */
+ function reportAccessingEvalViaGlobalObject(globalScope) {
+ for (let i = 0; i < candidatesOfGlobalObject.length; ++i) {
+ const name = candidatesOfGlobalObject[i];
+ const variable = astUtils.getVariableByName(globalScope, name);
+
+ if (!variable) {
+ continue;
+ }
+
+ const references = variable.references;
+
+ for (let j = 0; j < references.length; ++j) {
+ const identifier = references[j].identifier;
+ let node = identifier.parent;
+
+ // To detect code like `window.window.eval`.
+ while (isMember(node, name)) {
+ node = node.parent;
+ }
+
+ // Reports.
+ if (isMember(node, "eval")) {
+ report(node);
+ }
+ }
+ }
+ }
+
+ /**
+ * Reports all accesses of `eval` (excludes direct calls to eval).
+ *
+ * @param {eslint-scope.Scope} globalScope - The global scope.
+ * @returns {void}
+ */
+ function reportAccessingEval(globalScope) {
+ const variable = astUtils.getVariableByName(globalScope, "eval");
+
+ if (!variable) {
+ return;
+ }
+
+ const references = variable.references;
+
+ for (let i = 0; i < references.length; ++i) {
+ const reference = references[i];
+ const id = reference.identifier;
+
+ if (id.name === "eval" && !astUtils.isCallee(id)) {
+
+ // Is accessing to eval (excludes direct calls to eval)
+ report(id);
+ }
+ }
+ }
+
+ if (allowIndirect) {
+
+ // Checks only direct calls to eval. It's simple!
+ return {
+ "CallExpression:exit"(node) {
+ const callee = node.callee;
+
+ if (isIdentifier(callee, "eval")) {
+ report(callee);
+ }
+ }
+ };
+ }
+
+ return {
+ "CallExpression:exit"(node) {
+ const callee = node.callee;
+
+ if (isIdentifier(callee, "eval")) {
+ report(callee);
+ }
+ },
+
+ Program(node) {
+ const scope = context.getScope(),
+ features = context.parserOptions.ecmaFeatures || {},
+ strict =
+ scope.isStrict ||
+ node.sourceType === "module" ||
+ (features.globalReturn && scope.childScopes[0].isStrict);
+
+ funcInfo = {
+ upper: null,
+ node,
+ strict,
+ defaultThis: true,
+ initialized: true
+ };
+ },
+
+ "Program:exit"() {
+ const globalScope = context.getScope();
+
+ exitVarScope();
+ reportAccessingEval(globalScope);
+ reportAccessingEvalViaGlobalObject(globalScope);
+ },
+
+ FunctionDeclaration: enterVarScope,
+ "FunctionDeclaration:exit": exitVarScope,
+ FunctionExpression: enterVarScope,
+ "FunctionExpression:exit": exitVarScope,
+ ArrowFunctionExpression: enterVarScope,
+ "ArrowFunctionExpression:exit": exitVarScope,
+
+ ThisExpression(node) {
+ if (!isMember(node.parent, "eval")) {
+ return;
+ }
+
+ /*
+ * `this.eval` is found.
+ * Checks whether or not the value of `this` is the global object.
+ */
+ if (!funcInfo.initialized) {
+ funcInfo.initialized = true;
+ funcInfo.defaultThis = astUtils.isDefaultThisBinding(
+ funcInfo.node,
+ sourceCode
+ );
+ }
+
+ if (!funcInfo.strict && funcInfo.defaultThis) {
+
+ // `this.eval` is possible built-in `eval`.
+ report(node.parent);
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-ex-assign.js b/tools/node_modules/eslint/lib/rules/no-ex-assign.js
new file mode 100644
index 0000000000..20869d5cd1
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-ex-assign.js
@@ -0,0 +1,45 @@
+/**
+ * @fileoverview Rule to flag assignment of the exception parameter
+ * @author Stephen Murray <spmurrayzzz>
+ */
+
+"use strict";
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow reassigning exceptions in `catch` clauses",
+ category: "Possible Errors",
+ recommended: true
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ /**
+ * Finds and reports references that are non initializer and writable.
+ * @param {Variable} variable - A variable to check.
+ * @returns {void}
+ */
+ function checkVariable(variable) {
+ astUtils.getModifyingReferences(variable.references).forEach(reference => {
+ context.report({ node: reference.identifier, message: "Do not assign to the exception parameter." });
+ });
+ }
+
+ return {
+ CatchClause(node) {
+ context.getDeclaredVariables(node).forEach(checkVariable);
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-extend-native.js b/tools/node_modules/eslint/lib/rules/no-extend-native.js
new file mode 100644
index 0000000000..c550cf5da5
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-extend-native.js
@@ -0,0 +1,174 @@
+/**
+ * @fileoverview Rule to flag adding properties to native object's prototypes.
+ * @author David Nelson
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+const globals = require("globals");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+const propertyDefinitionMethods = new Set(["defineProperty", "defineProperties"]);
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow extending native types",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ exceptions: {
+ type: "array",
+ items: {
+ type: "string"
+ },
+ uniqueItems: true
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+
+ const config = context.options[0] || {};
+ const exceptions = new Set(config.exceptions || []);
+ const modifiedBuiltins = new Set(
+ Object.keys(globals.builtin)
+ .filter(builtin => builtin[0].toUpperCase() === builtin[0])
+ .filter(builtin => !exceptions.has(builtin))
+ );
+
+ /**
+ * Reports a lint error for the given node.
+ * @param {ASTNode} node The node to report.
+ * @param {string} builtin The name of the native builtin being extended.
+ * @returns {void}
+ */
+ function reportNode(node, builtin) {
+ context.report({
+ node,
+ message: "{{builtin}} prototype is read only, properties should not be added.",
+ data: {
+ builtin
+ }
+ });
+ }
+
+ /**
+ * Check to see if the `prototype` property of the given object
+ * identifier node is being accessed.
+ * @param {ASTNode} identifierNode The Identifier representing the object
+ * to check.
+ * @returns {boolean} True if the identifier is the object of a
+ * MemberExpression and its `prototype` property is being accessed,
+ * false otherwise.
+ */
+ function isPrototypePropertyAccessed(identifierNode) {
+ return Boolean(
+ identifierNode &&
+ identifierNode.parent &&
+ identifierNode.parent.type === "MemberExpression" &&
+ identifierNode.parent.object === identifierNode &&
+ astUtils.getStaticPropertyName(identifierNode.parent) === "prototype"
+ );
+ }
+
+ /**
+ * Checks that an identifier is an object of a prototype whose member
+ * is being assigned in an AssignmentExpression.
+ * Example: Object.prototype.foo = "bar"
+ * @param {ASTNode} identifierNode The identifier to check.
+ * @returns {boolean} True if the identifier's prototype is modified.
+ */
+ function isInPrototypePropertyAssignment(identifierNode) {
+ return Boolean(
+ isPrototypePropertyAccessed(identifierNode) &&
+ identifierNode.parent.parent.type === "MemberExpression" &&
+ identifierNode.parent.parent.parent.type === "AssignmentExpression" &&
+ identifierNode.parent.parent.parent.left === identifierNode.parent.parent
+ );
+ }
+
+ /**
+ * Checks that an identifier is an object of a prototype whose member
+ * is being extended via the Object.defineProperty() or
+ * Object.defineProperties() methods.
+ * Example: Object.defineProperty(Array.prototype, "foo", ...)
+ * Example: Object.defineProperties(Array.prototype, ...)
+ * @param {ASTNode} identifierNode The identifier to check.
+ * @returns {boolean} True if the identifier's prototype is modified.
+ */
+ function isInDefinePropertyCall(identifierNode) {
+ return Boolean(
+ isPrototypePropertyAccessed(identifierNode) &&
+ identifierNode.parent.parent.type === "CallExpression" &&
+ identifierNode.parent.parent.arguments[0] === identifierNode.parent &&
+ identifierNode.parent.parent.callee.type === "MemberExpression" &&
+ identifierNode.parent.parent.callee.object.type === "Identifier" &&
+ identifierNode.parent.parent.callee.object.name === "Object" &&
+ identifierNode.parent.parent.callee.property.type === "Identifier" &&
+ propertyDefinitionMethods.has(identifierNode.parent.parent.callee.property.name)
+ );
+ }
+
+ /**
+ * Check to see if object prototype access is part of a prototype
+ * extension. There are three ways a prototype can be extended:
+ * 1. Assignment to prototype property (Object.prototype.foo = 1)
+ * 2. Object.defineProperty()/Object.defineProperties() on a prototype
+ * If prototype extension is detected, report the AssignmentExpression
+ * or CallExpression node.
+ * @param {ASTNode} identifierNode The Identifier representing the object
+ * which prototype is being accessed and possibly extended.
+ * @returns {void}
+ */
+ function checkAndReportPrototypeExtension(identifierNode) {
+ if (isInPrototypePropertyAssignment(identifierNode)) {
+
+ // Identifier --> MemberExpression --> MemberExpression --> AssignmentExpression
+ reportNode(identifierNode.parent.parent.parent, identifierNode.name);
+ } else if (isInDefinePropertyCall(identifierNode)) {
+
+ // Identifier --> MemberExpression --> CallExpression
+ reportNode(identifierNode.parent.parent, identifierNode.name);
+ }
+ }
+
+ return {
+
+ "Program:exit"() {
+ const globalScope = context.getScope();
+
+ modifiedBuiltins.forEach(builtin => {
+ const builtinVar = globalScope.set.get(builtin);
+
+ if (builtinVar && builtinVar.references) {
+ builtinVar.references
+ .map(ref => ref.identifier)
+ .forEach(checkAndReportPrototypeExtension);
+ }
+ });
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-extra-bind.js b/tools/node_modules/eslint/lib/rules/no-extra-bind.js
new file mode 100644
index 0000000000..2d22eff245
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-extra-bind.js
@@ -0,0 +1,145 @@
+/**
+ * @fileoverview Rule to flag unnecessary bind calls
+ * @author Bence Dányi <bence@danyi.me>
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow unnecessary calls to `.bind()`",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: [],
+
+ fixable: "code"
+ },
+
+ create(context) {
+ let scopeInfo = null;
+
+ /**
+ * Reports a given function node.
+ *
+ * @param {ASTNode} node - A node to report. This is a FunctionExpression or
+ * an ArrowFunctionExpression.
+ * @returns {void}
+ */
+ function report(node) {
+ context.report({
+ node: node.parent.parent,
+ message: "The function binding is unnecessary.",
+ loc: node.parent.property.loc.start,
+ fix(fixer) {
+ const firstTokenToRemove = context.getSourceCode()
+ .getFirstTokenBetween(node.parent.object, node.parent.property, astUtils.isNotClosingParenToken);
+
+ return fixer.removeRange([firstTokenToRemove.range[0], node.parent.parent.range[1]]);
+ }
+ });
+ }
+
+ /**
+ * Checks whether or not a given function node is the callee of `.bind()`
+ * method.
+ *
+ * e.g. `(function() {}.bind(foo))`
+ *
+ * @param {ASTNode} node - A node to report. This is a FunctionExpression or
+ * an ArrowFunctionExpression.
+ * @returns {boolean} `true` if the node is the callee of `.bind()` method.
+ */
+ function isCalleeOfBindMethod(node) {
+ const parent = node.parent;
+ const grandparent = parent.parent;
+
+ return (
+ grandparent &&
+ grandparent.type === "CallExpression" &&
+ grandparent.callee === parent &&
+ grandparent.arguments.length === 1 &&
+ parent.type === "MemberExpression" &&
+ parent.object === node &&
+ astUtils.getStaticPropertyName(parent) === "bind"
+ );
+ }
+
+ /**
+ * Adds a scope information object to the stack.
+ *
+ * @param {ASTNode} node - A node to add. This node is a FunctionExpression
+ * or a FunctionDeclaration node.
+ * @returns {void}
+ */
+ function enterFunction(node) {
+ scopeInfo = {
+ isBound: isCalleeOfBindMethod(node),
+ thisFound: false,
+ upper: scopeInfo
+ };
+ }
+
+ /**
+ * Removes the scope information object from the top of the stack.
+ * At the same time, this reports the function node if the function has
+ * `.bind()` and the `this` keywords found.
+ *
+ * @param {ASTNode} node - A node to remove. This node is a
+ * FunctionExpression or a FunctionDeclaration node.
+ * @returns {void}
+ */
+ function exitFunction(node) {
+ if (scopeInfo.isBound && !scopeInfo.thisFound) {
+ report(node);
+ }
+
+ scopeInfo = scopeInfo.upper;
+ }
+
+ /**
+ * Reports a given arrow function if the function is callee of `.bind()`
+ * method.
+ *
+ * @param {ASTNode} node - A node to report. This node is an
+ * ArrowFunctionExpression.
+ * @returns {void}
+ */
+ function exitArrowFunction(node) {
+ if (isCalleeOfBindMethod(node)) {
+ report(node);
+ }
+ }
+
+ /**
+ * Set the mark as the `this` keyword was found in this scope.
+ *
+ * @returns {void}
+ */
+ function markAsThisFound() {
+ if (scopeInfo) {
+ scopeInfo.thisFound = true;
+ }
+ }
+
+ return {
+ "ArrowFunctionExpression:exit": exitArrowFunction,
+ FunctionDeclaration: enterFunction,
+ "FunctionDeclaration:exit": exitFunction,
+ FunctionExpression: enterFunction,
+ "FunctionExpression:exit": exitFunction,
+ ThisExpression: markAsThisFound
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-extra-boolean-cast.js b/tools/node_modules/eslint/lib/rules/no-extra-boolean-cast.js
new file mode 100644
index 0000000000..47ca7e22fe
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-extra-boolean-cast.js
@@ -0,0 +1,122 @@
+/**
+ * @fileoverview Rule to flag unnecessary double negation in Boolean contexts
+ * @author Brandon Mills
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow unnecessary boolean casts",
+ category: "Possible Errors",
+ recommended: true
+ },
+
+ schema: [],
+
+ fixable: "code"
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+
+ // Node types which have a test which will coerce values to booleans.
+ const BOOLEAN_NODE_TYPES = [
+ "IfStatement",
+ "DoWhileStatement",
+ "WhileStatement",
+ "ConditionalExpression",
+ "ForStatement"
+ ];
+
+ /**
+ * Check if a node is in a context where its value would be coerced to a boolean at runtime.
+ *
+ * @param {Object} node The node
+ * @param {Object} parent Its parent
+ * @returns {boolean} If it is in a boolean context
+ */
+ function isInBooleanContext(node, parent) {
+ return (
+ (BOOLEAN_NODE_TYPES.indexOf(parent.type) !== -1 &&
+ node === parent.test) ||
+
+ // !<bool>
+ (parent.type === "UnaryExpression" &&
+ parent.operator === "!")
+ );
+ }
+
+
+ return {
+ UnaryExpression(node) {
+ const ancestors = context.getAncestors(),
+ parent = ancestors.pop(),
+ grandparent = ancestors.pop();
+
+ // Exit early if it's guaranteed not to match
+ if (node.operator !== "!" ||
+ parent.type !== "UnaryExpression" ||
+ parent.operator !== "!") {
+ return;
+ }
+
+ if (isInBooleanContext(parent, grandparent) ||
+
+ // Boolean(<bool>) and new Boolean(<bool>)
+ ((grandparent.type === "CallExpression" || grandparent.type === "NewExpression") &&
+ grandparent.callee.type === "Identifier" &&
+ grandparent.callee.name === "Boolean")
+ ) {
+ context.report({
+ node,
+ message: "Redundant double negation.",
+ fix: fixer => fixer.replaceText(parent, sourceCode.getText(node.argument))
+ });
+ }
+ },
+ CallExpression(node) {
+ const parent = node.parent;
+
+ if (node.callee.type !== "Identifier" || node.callee.name !== "Boolean") {
+ return;
+ }
+
+ if (isInBooleanContext(node, parent)) {
+ context.report({
+ node,
+ message: "Redundant Boolean call.",
+ fix: fixer => {
+ if (!node.arguments.length) {
+ return fixer.replaceText(parent, "true");
+ }
+
+ if (node.arguments.length > 1 || node.arguments[0].type === "SpreadElement") {
+ return null;
+ }
+
+ const argument = node.arguments[0];
+
+ if (astUtils.getPrecedence(argument) < astUtils.getPrecedence(node.parent)) {
+ return fixer.replaceText(node, `(${sourceCode.getText(argument)})`);
+ }
+ return fixer.replaceText(node, sourceCode.getText(argument));
+ }
+ });
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-extra-label.js b/tools/node_modules/eslint/lib/rules/no-extra-label.js
new file mode 100644
index 0000000000..b89267de93
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-extra-label.js
@@ -0,0 +1,140 @@
+/**
+ * @fileoverview Rule to disallow unnecessary labels
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow unnecessary labels",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: [],
+
+ fixable: "code"
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+ let scopeInfo = null;
+
+ /**
+ * Creates a new scope with a breakable statement.
+ *
+ * @param {ASTNode} node - A node to create. This is a BreakableStatement.
+ * @returns {void}
+ */
+ function enterBreakableStatement(node) {
+ scopeInfo = {
+ label: node.parent.type === "LabeledStatement" ? node.parent.label : null,
+ breakable: true,
+ upper: scopeInfo
+ };
+ }
+
+ /**
+ * Removes the top scope of the stack.
+ *
+ * @returns {void}
+ */
+ function exitBreakableStatement() {
+ scopeInfo = scopeInfo.upper;
+ }
+
+ /**
+ * Creates a new scope with a labeled statement.
+ *
+ * This ignores it if the body is a breakable statement.
+ * In this case it's handled in the `enterBreakableStatement` function.
+ *
+ * @param {ASTNode} node - A node to create. This is a LabeledStatement.
+ * @returns {void}
+ */
+ function enterLabeledStatement(node) {
+ if (!astUtils.isBreakableStatement(node.body)) {
+ scopeInfo = {
+ label: node.label,
+ breakable: false,
+ upper: scopeInfo
+ };
+ }
+ }
+
+ /**
+ * Removes the top scope of the stack.
+ *
+ * This ignores it if the body is a breakable statement.
+ * In this case it's handled in the `exitBreakableStatement` function.
+ *
+ * @param {ASTNode} node - A node. This is a LabeledStatement.
+ * @returns {void}
+ */
+ function exitLabeledStatement(node) {
+ if (!astUtils.isBreakableStatement(node.body)) {
+ scopeInfo = scopeInfo.upper;
+ }
+ }
+
+ /**
+ * Reports a given control node if it's unnecessary.
+ *
+ * @param {ASTNode} node - A node. This is a BreakStatement or a
+ * ContinueStatement.
+ * @returns {void}
+ */
+ function reportIfUnnecessary(node) {
+ if (!node.label) {
+ return;
+ }
+
+ const labelNode = node.label;
+
+ for (let info = scopeInfo; info !== null; info = info.upper) {
+ if (info.breakable || info.label && info.label.name === labelNode.name) {
+ if (info.breakable && info.label && info.label.name === labelNode.name) {
+ context.report({
+ node: labelNode,
+ message: "This label '{{name}}' is unnecessary.",
+ data: labelNode,
+ fix: fixer => fixer.removeRange([sourceCode.getFirstToken(node).range[1], labelNode.range[1]])
+ });
+ }
+ return;
+ }
+ }
+ }
+
+ return {
+ WhileStatement: enterBreakableStatement,
+ "WhileStatement:exit": exitBreakableStatement,
+ DoWhileStatement: enterBreakableStatement,
+ "DoWhileStatement:exit": exitBreakableStatement,
+ ForStatement: enterBreakableStatement,
+ "ForStatement:exit": exitBreakableStatement,
+ ForInStatement: enterBreakableStatement,
+ "ForInStatement:exit": exitBreakableStatement,
+ ForOfStatement: enterBreakableStatement,
+ "ForOfStatement:exit": exitBreakableStatement,
+ SwitchStatement: enterBreakableStatement,
+ "SwitchStatement:exit": exitBreakableStatement,
+ LabeledStatement: enterLabeledStatement,
+ "LabeledStatement:exit": exitLabeledStatement,
+ BreakStatement: reportIfUnnecessary,
+ ContinueStatement: reportIfUnnecessary
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-extra-parens.js b/tools/node_modules/eslint/lib/rules/no-extra-parens.js
new file mode 100644
index 0000000000..d8e0df64a7
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-extra-parens.js
@@ -0,0 +1,745 @@
+/**
+ * @fileoverview Disallow parenthesising higher precedence subexpressions.
+ * @author Michael Ficarra
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils.js");
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow unnecessary parentheses",
+ category: "Possible Errors",
+ recommended: false
+ },
+
+ fixable: "code",
+
+ schema: {
+ anyOf: [
+ {
+ type: "array",
+ items: [
+ {
+ enum: ["functions"]
+ }
+ ],
+ minItems: 0,
+ maxItems: 1
+ },
+ {
+ type: "array",
+ items: [
+ {
+ enum: ["all"]
+ },
+ {
+ type: "object",
+ properties: {
+ conditionalAssign: { type: "boolean" },
+ nestedBinaryExpressions: { type: "boolean" },
+ returnAssign: { type: "boolean" },
+ ignoreJSX: { enum: ["none", "all", "single-line", "multi-line"] },
+ enforceForArrowConditionals: { type: "boolean" }
+ },
+ additionalProperties: false
+ }
+ ],
+ minItems: 0,
+ maxItems: 2
+ }
+ ]
+ }
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+
+ const tokensToIgnore = new WeakSet();
+ const isParenthesised = astUtils.isParenthesised.bind(astUtils, sourceCode);
+ const precedence = astUtils.getPrecedence;
+ const ALL_NODES = context.options[0] !== "functions";
+ const EXCEPT_COND_ASSIGN = ALL_NODES && context.options[1] && context.options[1].conditionalAssign === false;
+ const NESTED_BINARY = ALL_NODES && context.options[1] && context.options[1].nestedBinaryExpressions === false;
+ const EXCEPT_RETURN_ASSIGN = ALL_NODES && context.options[1] && context.options[1].returnAssign === false;
+ const IGNORE_JSX = ALL_NODES && context.options[1] && context.options[1].ignoreJSX;
+ const IGNORE_ARROW_CONDITIONALS = ALL_NODES && context.options[1] &&
+ context.options[1].enforceForArrowConditionals === false;
+
+ const PRECEDENCE_OF_ASSIGNMENT_EXPR = precedence({ type: "AssignmentExpression" });
+ const PRECEDENCE_OF_UPDATE_EXPR = precedence({ type: "UpdateExpression" });
+
+ /**
+ * Determines if this rule should be enforced for a node given the current configuration.
+ * @param {ASTNode} node - The node to be checked.
+ * @returns {boolean} True if the rule should be enforced for this node.
+ * @private
+ */
+ function ruleApplies(node) {
+ if (node.type === "JSXElement") {
+ const isSingleLine = node.loc.start.line === node.loc.end.line;
+
+ switch (IGNORE_JSX) {
+
+ // Exclude this JSX element from linting
+ case "all":
+ return false;
+
+ // Exclude this JSX element if it is multi-line element
+ case "multi-line":
+ return isSingleLine;
+
+ // Exclude this JSX element if it is single-line element
+ case "single-line":
+ return !isSingleLine;
+
+ // Nothing special to be done for JSX elements
+ case "none":
+ break;
+
+ // no default
+ }
+ }
+
+ return ALL_NODES || node.type === "FunctionExpression" || node.type === "ArrowFunctionExpression";
+ }
+
+ /**
+ * Determines if a node is surrounded by parentheses twice.
+ * @param {ASTNode} node - The node to be checked.
+ * @returns {boolean} True if the node is doubly parenthesised.
+ * @private
+ */
+ function isParenthesisedTwice(node) {
+ const previousToken = sourceCode.getTokenBefore(node, 1),
+ nextToken = sourceCode.getTokenAfter(node, 1);
+
+ return isParenthesised(node) && previousToken && nextToken &&
+ astUtils.isOpeningParenToken(previousToken) && previousToken.range[1] <= node.range[0] &&
+ astUtils.isClosingParenToken(nextToken) && nextToken.range[0] >= node.range[1];
+ }
+
+ /**
+ * Determines if a node is surrounded by (potentially) invalid parentheses.
+ * @param {ASTNode} node - The node to be checked.
+ * @returns {boolean} True if the node is incorrectly parenthesised.
+ * @private
+ */
+ function hasExcessParens(node) {
+ return ruleApplies(node) && isParenthesised(node);
+ }
+
+ /**
+ * Determines if a node that is expected to be parenthesised is surrounded by
+ * (potentially) invalid extra parentheses.
+ * @param {ASTNode} node - The node to be checked.
+ * @returns {boolean} True if the node is has an unexpected extra pair of parentheses.
+ * @private
+ */
+ function hasDoubleExcessParens(node) {
+ return ruleApplies(node) && isParenthesisedTwice(node);
+ }
+
+ /**
+ * Determines if a node test expression is allowed to have a parenthesised assignment
+ * @param {ASTNode} node - The node to be checked.
+ * @returns {boolean} True if the assignment can be parenthesised.
+ * @private
+ */
+ function isCondAssignException(node) {
+ return EXCEPT_COND_ASSIGN && node.test.type === "AssignmentExpression";
+ }
+
+ /**
+ * Determines if a node is in a return statement
+ * @param {ASTNode} node - The node to be checked.
+ * @returns {boolean} True if the node is in a return statement.
+ * @private
+ */
+ function isInReturnStatement(node) {
+ while (node) {
+ if (node.type === "ReturnStatement" ||
+ (node.type === "ArrowFunctionExpression" && node.body.type !== "BlockStatement")) {
+ return true;
+ }
+ node = node.parent;
+ }
+
+ return false;
+ }
+
+ /**
+ * Determines if a constructor function is newed-up with parens
+ * @param {ASTNode} newExpression - The NewExpression node to be checked.
+ * @returns {boolean} True if the constructor is called with parens.
+ * @private
+ */
+ function isNewExpressionWithParens(newExpression) {
+ const lastToken = sourceCode.getLastToken(newExpression);
+ const penultimateToken = sourceCode.getTokenBefore(lastToken);
+
+ return newExpression.arguments.length > 0 || astUtils.isOpeningParenToken(penultimateToken) && astUtils.isClosingParenToken(lastToken);
+ }
+
+ /**
+ * Determines if a node is or contains an assignment expression
+ * @param {ASTNode} node - The node to be checked.
+ * @returns {boolean} True if the node is or contains an assignment expression.
+ * @private
+ */
+ function containsAssignment(node) {
+ if (node.type === "AssignmentExpression") {
+ return true;
+ }
+ if (node.type === "ConditionalExpression" &&
+ (node.consequent.type === "AssignmentExpression" || node.alternate.type === "AssignmentExpression")) {
+ return true;
+ }
+ if ((node.left && node.left.type === "AssignmentExpression") ||
+ (node.right && node.right.type === "AssignmentExpression")) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Determines if a node is contained by or is itself a return statement and is allowed to have a parenthesised assignment
+ * @param {ASTNode} node - The node to be checked.
+ * @returns {boolean} True if the assignment can be parenthesised.
+ * @private
+ */
+ function isReturnAssignException(node) {
+ if (!EXCEPT_RETURN_ASSIGN || !isInReturnStatement(node)) {
+ return false;
+ }
+
+ if (node.type === "ReturnStatement") {
+ return node.argument && containsAssignment(node.argument);
+ }
+ if (node.type === "ArrowFunctionExpression" && node.body.type !== "BlockStatement") {
+ return containsAssignment(node.body);
+ }
+ return containsAssignment(node);
+
+ }
+
+ /**
+ * Determines if a node following a [no LineTerminator here] restriction is
+ * surrounded by (potentially) invalid extra parentheses.
+ * @param {Token} token - The token preceding the [no LineTerminator here] restriction.
+ * @param {ASTNode} node - The node to be checked.
+ * @returns {boolean} True if the node is incorrectly parenthesised.
+ * @private
+ */
+ function hasExcessParensNoLineTerminator(token, node) {
+ if (token.loc.end.line === node.loc.start.line) {
+ return hasExcessParens(node);
+ }
+
+ return hasDoubleExcessParens(node);
+ }
+
+ /**
+ * Determines whether a node should be preceded by an additional space when removing parens
+ * @param {ASTNode} node node to evaluate; must be surrounded by parentheses
+ * @returns {boolean} `true` if a space should be inserted before the node
+ * @private
+ */
+ function requiresLeadingSpace(node) {
+ const leftParenToken = sourceCode.getTokenBefore(node);
+ const tokenBeforeLeftParen = sourceCode.getTokenBefore(node, 1);
+ const firstToken = sourceCode.getFirstToken(node);
+
+ return tokenBeforeLeftParen &&
+ tokenBeforeLeftParen.range[1] === leftParenToken.range[0] &&
+ leftParenToken.range[1] === firstToken.range[0] &&
+ !astUtils.canTokensBeAdjacent(tokenBeforeLeftParen, firstToken);
+ }
+
+ /**
+ * Determines whether a node should be followed by an additional space when removing parens
+ * @param {ASTNode} node node to evaluate; must be surrounded by parentheses
+ * @returns {boolean} `true` if a space should be inserted after the node
+ * @private
+ */
+ function requiresTrailingSpace(node) {
+ const nextTwoTokens = sourceCode.getTokensAfter(node, { count: 2 });
+ const rightParenToken = nextTwoTokens[0];
+ const tokenAfterRightParen = nextTwoTokens[1];
+ const tokenBeforeRightParen = sourceCode.getLastToken(node);
+
+ return rightParenToken && tokenAfterRightParen &&
+ !sourceCode.isSpaceBetweenTokens(rightParenToken, tokenAfterRightParen) &&
+ !astUtils.canTokensBeAdjacent(tokenBeforeRightParen, tokenAfterRightParen);
+ }
+
+ /**
+ * Determines if a given expression node is an IIFE
+ * @param {ASTNode} node The node to check
+ * @returns {boolean} `true` if the given node is an IIFE
+ */
+ function isIIFE(node) {
+ return node.type === "CallExpression" && node.callee.type === "FunctionExpression";
+ }
+
+ /**
+ * Report the node
+ * @param {ASTNode} node node to evaluate
+ * @returns {void}
+ * @private
+ */
+ function report(node) {
+ const leftParenToken = sourceCode.getTokenBefore(node);
+ const rightParenToken = sourceCode.getTokenAfter(node);
+
+ if (!isParenthesisedTwice(node)) {
+ if (tokensToIgnore.has(sourceCode.getFirstToken(node))) {
+ return;
+ }
+
+ if (isIIFE(node) && !isParenthesised(node.callee)) {
+ return;
+ }
+ }
+
+ context.report({
+ node,
+ loc: leftParenToken.loc.start,
+ message: "Gratuitous parentheses around expression.",
+ fix(fixer) {
+ const parenthesizedSource = sourceCode.text.slice(leftParenToken.range[1], rightParenToken.range[0]);
+
+ return fixer.replaceTextRange([
+ leftParenToken.range[0],
+ rightParenToken.range[1]
+ ], (requiresLeadingSpace(node) ? " " : "") + parenthesizedSource + (requiresTrailingSpace(node) ? " " : ""));
+ }
+ });
+ }
+
+ /**
+ * Evaluate Unary update
+ * @param {ASTNode} node node to evaluate
+ * @returns {void}
+ * @private
+ */
+ function checkUnaryUpdate(node) {
+ if (node.type === "UnaryExpression" && node.argument.type === "BinaryExpression" && node.argument.operator === "**") {
+ return;
+ }
+
+ if (hasExcessParens(node.argument) && precedence(node.argument) >= precedence(node)) {
+ report(node.argument);
+ }
+ }
+
+ /**
+ * Check if a member expression contains a call expression
+ * @param {ASTNode} node MemberExpression node to evaluate
+ * @returns {boolean} true if found, false if not
+ */
+ function doesMemberExpressionContainCallExpression(node) {
+ let currentNode = node.object;
+ let currentNodeType = node.object.type;
+
+ while (currentNodeType === "MemberExpression") {
+ currentNode = currentNode.object;
+ currentNodeType = currentNode.type;
+ }
+
+ return currentNodeType === "CallExpression";
+ }
+
+ /**
+ * Evaluate a new call
+ * @param {ASTNode} node node to evaluate
+ * @returns {void}
+ * @private
+ */
+ function checkCallNew(node) {
+ const callee = node.callee;
+
+ if (hasExcessParens(callee) && precedence(callee) >= precedence(node)) {
+ const hasNewParensException = callee.type === "NewExpression" && !isNewExpressionWithParens(callee);
+
+ if (
+ hasDoubleExcessParens(callee) ||
+ !isIIFE(node) && !hasNewParensException && !(
+
+ /*
+ * Allow extra parens around a new expression if
+ * there are intervening parentheses.
+ */
+ callee.type === "MemberExpression" &&
+ doesMemberExpressionContainCallExpression(callee)
+ )
+ ) {
+ report(node.callee);
+ }
+ }
+ if (node.arguments.length === 1) {
+ if (hasDoubleExcessParens(node.arguments[0]) && precedence(node.arguments[0]) >= PRECEDENCE_OF_ASSIGNMENT_EXPR) {
+ report(node.arguments[0]);
+ }
+ } else {
+ node.arguments
+ .filter(arg => hasExcessParens(arg) && precedence(arg) >= PRECEDENCE_OF_ASSIGNMENT_EXPR)
+ .forEach(report);
+ }
+ }
+
+ /**
+ * Evaluate binary logicals
+ * @param {ASTNode} node node to evaluate
+ * @returns {void}
+ * @private
+ */
+ function checkBinaryLogical(node) {
+ const prec = precedence(node);
+ const leftPrecedence = precedence(node.left);
+ const rightPrecedence = precedence(node.right);
+ const isExponentiation = node.operator === "**";
+ const shouldSkipLeft = (NESTED_BINARY && (node.left.type === "BinaryExpression" || node.left.type === "LogicalExpression")) ||
+ node.left.type === "UnaryExpression" && isExponentiation;
+ const shouldSkipRight = NESTED_BINARY && (node.right.type === "BinaryExpression" || node.right.type === "LogicalExpression");
+
+ if (!shouldSkipLeft && hasExcessParens(node.left) && (leftPrecedence > prec || (leftPrecedence === prec && !isExponentiation))) {
+ report(node.left);
+ }
+ if (!shouldSkipRight && hasExcessParens(node.right) && (rightPrecedence > prec || (rightPrecedence === prec && isExponentiation))) {
+ report(node.right);
+ }
+ }
+
+ /**
+ * Check the parentheses around the super class of the given class definition.
+ * @param {ASTNode} node The node of class declarations to check.
+ * @returns {void}
+ */
+ function checkClass(node) {
+ if (!node.superClass) {
+ return;
+ }
+
+ /*
+ * If `node.superClass` is a LeftHandSideExpression, parentheses are extra.
+ * Otherwise, parentheses are needed.
+ */
+ const hasExtraParens = precedence(node.superClass) > PRECEDENCE_OF_UPDATE_EXPR
+ ? hasExcessParens(node.superClass)
+ : hasDoubleExcessParens(node.superClass);
+
+ if (hasExtraParens) {
+ report(node.superClass);
+ }
+ }
+
+ /**
+ * Check the parentheses around the argument of the given spread operator.
+ * @param {ASTNode} node The node of spread elements/properties to check.
+ * @returns {void}
+ */
+ function checkSpreadOperator(node) {
+ const hasExtraParens = precedence(node.argument) >= PRECEDENCE_OF_ASSIGNMENT_EXPR
+ ? hasExcessParens(node.argument)
+ : hasDoubleExcessParens(node.argument);
+
+ if (hasExtraParens) {
+ report(node.argument);
+ }
+ }
+
+ /**
+ * Checks the parentheses for an ExpressionStatement or ExportDefaultDeclaration
+ * @param {ASTNode} node The ExpressionStatement.expression or ExportDefaultDeclaration.declaration node
+ * @returns {void}
+ */
+ function checkExpressionOrExportStatement(node) {
+ const firstToken = isParenthesised(node) ? sourceCode.getTokenBefore(node) : sourceCode.getFirstToken(node);
+ const secondToken = sourceCode.getTokenAfter(firstToken, astUtils.isNotOpeningParenToken);
+ const thirdToken = secondToken ? sourceCode.getTokenAfter(secondToken) : null;
+
+ if (
+ astUtils.isOpeningParenToken(firstToken) &&
+ (
+ astUtils.isOpeningBraceToken(secondToken) ||
+ secondToken.type === "Keyword" && (
+ secondToken.value === "function" ||
+ secondToken.value === "class" ||
+ secondToken.value === "let" && astUtils.isOpeningBracketToken(sourceCode.getTokenAfter(secondToken, astUtils.isNotClosingParenToken))
+ ) ||
+ secondToken && secondToken.type === "Identifier" && secondToken.value === "async" && thirdToken && thirdToken.type === "Keyword" && thirdToken.value === "function"
+ )
+ ) {
+ tokensToIgnore.add(secondToken);
+ }
+
+ if (hasExcessParens(node)) {
+ report(node);
+ }
+ }
+
+ return {
+ ArrayExpression(node) {
+ node.elements
+ .filter(e => e && hasExcessParens(e) && precedence(e) >= PRECEDENCE_OF_ASSIGNMENT_EXPR)
+ .forEach(report);
+ },
+
+ ArrowFunctionExpression(node) {
+ if (isReturnAssignException(node)) {
+ return;
+ }
+
+ if (node.body.type === "ConditionalExpression" &&
+ IGNORE_ARROW_CONDITIONALS &&
+ !isParenthesisedTwice(node.body)
+ ) {
+ return;
+ }
+
+ if (node.body.type !== "BlockStatement") {
+ const firstBodyToken = sourceCode.getFirstToken(node.body, astUtils.isNotOpeningParenToken);
+ const tokenBeforeFirst = sourceCode.getTokenBefore(firstBodyToken);
+
+ if (astUtils.isOpeningParenToken(tokenBeforeFirst) && astUtils.isOpeningBraceToken(firstBodyToken)) {
+ tokensToIgnore.add(firstBodyToken);
+ }
+ if (hasExcessParens(node.body) && precedence(node.body) >= PRECEDENCE_OF_ASSIGNMENT_EXPR) {
+ report(node.body);
+ }
+ }
+ },
+
+ AssignmentExpression(node) {
+ if (isReturnAssignException(node)) {
+ return;
+ }
+
+ if (hasExcessParens(node.right) && precedence(node.right) >= precedence(node)) {
+ report(node.right);
+ }
+ },
+
+ BinaryExpression: checkBinaryLogical,
+ CallExpression: checkCallNew,
+
+ ConditionalExpression(node) {
+ if (isReturnAssignException(node)) {
+ return;
+ }
+
+ if (hasExcessParens(node.test) && precedence(node.test) >= precedence({ type: "LogicalExpression", operator: "||" })) {
+ report(node.test);
+ }
+
+ if (hasExcessParens(node.consequent) && precedence(node.consequent) >= PRECEDENCE_OF_ASSIGNMENT_EXPR) {
+ report(node.consequent);
+ }
+
+ if (hasExcessParens(node.alternate) && precedence(node.alternate) >= PRECEDENCE_OF_ASSIGNMENT_EXPR) {
+ report(node.alternate);
+ }
+ },
+
+ DoWhileStatement(node) {
+ if (hasDoubleExcessParens(node.test) && !isCondAssignException(node)) {
+ report(node.test);
+ }
+ },
+
+ ExportDefaultDeclaration: node => checkExpressionOrExportStatement(node.declaration),
+ ExpressionStatement: node => checkExpressionOrExportStatement(node.expression),
+
+ "ForInStatement, ForOfStatement"(node) {
+ if (node.left.type !== "VariableDeclarator") {
+ const firstLeftToken = sourceCode.getFirstToken(node.left, astUtils.isNotOpeningParenToken);
+
+ if (
+ firstLeftToken.value === "let" && (
+
+ /*
+ * If `let` is the only thing on the left side of the loop, it's the loop variable: `for ((let) of foo);`
+ * Removing it will cause a syntax error, because it will be parsed as the start of a VariableDeclarator.
+ */
+ firstLeftToken.range[1] === node.left.range[1] ||
+
+ /*
+ * If `let` is followed by a `[` token, it's a property access on the `let` value: `for ((let[foo]) of bar);`
+ * Removing it will cause the property access to be parsed as a destructuring declaration of `foo` instead.
+ */
+ astUtils.isOpeningBracketToken(
+ sourceCode.getTokenAfter(firstLeftToken, astUtils.isNotClosingParenToken)
+ )
+ )
+ ) {
+ tokensToIgnore.add(firstLeftToken);
+ }
+ }
+ if (hasExcessParens(node.right)) {
+ report(node.right);
+ }
+ if (hasExcessParens(node.left)) {
+ report(node.left);
+ }
+ },
+
+ ForStatement(node) {
+ if (node.init && hasExcessParens(node.init)) {
+ report(node.init);
+ }
+
+ if (node.test && hasExcessParens(node.test) && !isCondAssignException(node)) {
+ report(node.test);
+ }
+
+ if (node.update && hasExcessParens(node.update)) {
+ report(node.update);
+ }
+ },
+
+ IfStatement(node) {
+ if (hasDoubleExcessParens(node.test) && !isCondAssignException(node)) {
+ report(node.test);
+ }
+ },
+
+ LogicalExpression: checkBinaryLogical,
+
+ MemberExpression(node) {
+ const nodeObjHasExcessParens = hasExcessParens(node.object);
+
+ if (
+ nodeObjHasExcessParens &&
+ precedence(node.object) >= precedence(node) &&
+ (
+ node.computed ||
+ !(
+ astUtils.isDecimalInteger(node.object) ||
+
+ // RegExp literal is allowed to have parens (#1589)
+ (node.object.type === "Literal" && node.object.regex)
+ )
+ )
+ ) {
+ report(node.object);
+ }
+
+ if (nodeObjHasExcessParens &&
+ node.object.type === "CallExpression" &&
+ node.parent.type !== "NewExpression") {
+ report(node.object);
+ }
+
+ if (node.computed && hasExcessParens(node.property)) {
+ report(node.property);
+ }
+ },
+
+ NewExpression: checkCallNew,
+
+ ObjectExpression(node) {
+ node.properties
+ .filter(property => {
+ const value = property.value;
+
+ return value && hasExcessParens(value) && precedence(value) >= PRECEDENCE_OF_ASSIGNMENT_EXPR;
+ }).forEach(property => report(property.value));
+ },
+
+ ReturnStatement(node) {
+ const returnToken = sourceCode.getFirstToken(node);
+
+ if (isReturnAssignException(node)) {
+ return;
+ }
+
+ if (node.argument &&
+ hasExcessParensNoLineTerminator(returnToken, node.argument) &&
+
+ // RegExp literal is allowed to have parens (#1589)
+ !(node.argument.type === "Literal" && node.argument.regex)) {
+ report(node.argument);
+ }
+ },
+
+ SequenceExpression(node) {
+ node.expressions
+ .filter(e => hasExcessParens(e) && precedence(e) >= precedence(node))
+ .forEach(report);
+ },
+
+ SwitchCase(node) {
+ if (node.test && hasExcessParens(node.test)) {
+ report(node.test);
+ }
+ },
+
+ SwitchStatement(node) {
+ if (hasDoubleExcessParens(node.discriminant)) {
+ report(node.discriminant);
+ }
+ },
+
+ ThrowStatement(node) {
+ const throwToken = sourceCode.getFirstToken(node);
+
+ if (hasExcessParensNoLineTerminator(throwToken, node.argument)) {
+ report(node.argument);
+ }
+ },
+
+ UnaryExpression: checkUnaryUpdate,
+ UpdateExpression: checkUnaryUpdate,
+ AwaitExpression: checkUnaryUpdate,
+
+ VariableDeclarator(node) {
+ if (node.init && hasExcessParens(node.init) &&
+ precedence(node.init) >= PRECEDENCE_OF_ASSIGNMENT_EXPR &&
+
+ // RegExp literal is allowed to have parens (#1589)
+ !(node.init.type === "Literal" && node.init.regex)) {
+ report(node.init);
+ }
+ },
+
+ WhileStatement(node) {
+ if (hasDoubleExcessParens(node.test) && !isCondAssignException(node)) {
+ report(node.test);
+ }
+ },
+
+ WithStatement(node) {
+ if (hasDoubleExcessParens(node.object)) {
+ report(node.object);
+ }
+ },
+
+ YieldExpression(node) {
+ if (node.argument) {
+ const yieldToken = sourceCode.getFirstToken(node);
+
+ if ((precedence(node.argument) >= precedence(node) &&
+ hasExcessParensNoLineTerminator(yieldToken, node.argument)) ||
+ hasDoubleExcessParens(node.argument)) {
+ report(node.argument);
+ }
+ }
+ },
+
+ ClassDeclaration: checkClass,
+ ClassExpression: checkClass,
+
+ SpreadElement: checkSpreadOperator,
+ SpreadProperty: checkSpreadOperator,
+ ExperimentalSpreadProperty: checkSpreadOperator
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-extra-semi.js b/tools/node_modules/eslint/lib/rules/no-extra-semi.js
new file mode 100644
index 0000000000..acd312b32b
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-extra-semi.js
@@ -0,0 +1,120 @@
+/**
+ * @fileoverview Rule to flag use of unnecessary semicolons
+ * @author Nicholas C. Zakas
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const FixTracker = require("../util/fix-tracker");
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow unnecessary semicolons",
+ category: "Possible Errors",
+ recommended: true
+ },
+
+ fixable: "code",
+ schema: []
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+
+ /**
+ * Reports an unnecessary semicolon error.
+ * @param {Node|Token} nodeOrToken - A node or a token to be reported.
+ * @returns {void}
+ */
+ function report(nodeOrToken) {
+ context.report({
+ node: nodeOrToken,
+ message: "Unnecessary semicolon.",
+ fix(fixer) {
+
+ /*
+ * Expand the replacement range to include the surrounding
+ * tokens to avoid conflicting with semi.
+ * https://github.com/eslint/eslint/issues/7928
+ */
+ return new FixTracker(fixer, context.getSourceCode())
+ .retainSurroundingTokens(nodeOrToken)
+ .remove(nodeOrToken);
+ }
+ });
+ }
+
+ /**
+ * Checks for a part of a class body.
+ * This checks tokens from a specified token to a next MethodDefinition or the end of class body.
+ *
+ * @param {Token} firstToken - The first token to check.
+ * @returns {void}
+ */
+ function checkForPartOfClassBody(firstToken) {
+ for (let token = firstToken;
+ token.type === "Punctuator" && !astUtils.isClosingBraceToken(token);
+ token = sourceCode.getTokenAfter(token)
+ ) {
+ if (astUtils.isSemicolonToken(token)) {
+ report(token);
+ }
+ }
+ }
+
+ return {
+
+ /**
+ * Reports this empty statement, except if the parent node is a loop.
+ * @param {Node} node - A EmptyStatement node to be reported.
+ * @returns {void}
+ */
+ EmptyStatement(node) {
+ const parent = node.parent,
+ allowedParentTypes = [
+ "ForStatement",
+ "ForInStatement",
+ "ForOfStatement",
+ "WhileStatement",
+ "DoWhileStatement",
+ "IfStatement",
+ "LabeledStatement",
+ "WithStatement"
+ ];
+
+ if (allowedParentTypes.indexOf(parent.type) === -1) {
+ report(node);
+ }
+ },
+
+ /**
+ * Checks tokens from the head of this class body to the first MethodDefinition or the end of this class body.
+ * @param {Node} node - A ClassBody node to check.
+ * @returns {void}
+ */
+ ClassBody(node) {
+ checkForPartOfClassBody(sourceCode.getFirstToken(node, 1)); // 0 is `{`.
+ },
+
+ /**
+ * Checks tokens from this MethodDefinition to the next MethodDefinition or the end of this class body.
+ * @param {Node} node - A MethodDefinition node of the start point.
+ * @returns {void}
+ */
+ MethodDefinition(node) {
+ checkForPartOfClassBody(sourceCode.getTokenAfter(node));
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-fallthrough.js b/tools/node_modules/eslint/lib/rules/no-fallthrough.js
new file mode 100644
index 0000000000..082e8431d6
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-fallthrough.js
@@ -0,0 +1,135 @@
+/**
+ * @fileoverview Rule to flag fall-through cases in switch statements.
+ * @author Matt DuVall <http://mattduvall.com/>
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const lodash = require("lodash");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+const DEFAULT_FALLTHROUGH_COMMENT = /falls?\s?through/i;
+
+/**
+ * Checks whether or not a given node has a fallthrough comment.
+ * @param {ASTNode} node - A SwitchCase node to get comments.
+ * @param {RuleContext} context - A rule context which stores comments.
+ * @param {RegExp} fallthroughCommentPattern - A pattern to match comment to.
+ * @returns {boolean} `true` if the node has a valid fallthrough comment.
+ */
+function hasFallthroughComment(node, context, fallthroughCommentPattern) {
+ const sourceCode = context.getSourceCode();
+ const comment = lodash.last(sourceCode.getCommentsBefore(node));
+
+ return Boolean(comment && fallthroughCommentPattern.test(comment.value));
+}
+
+/**
+ * Checks whether or not a given code path segment is reachable.
+ * @param {CodePathSegment} segment - A CodePathSegment to check.
+ * @returns {boolean} `true` if the segment is reachable.
+ */
+function isReachable(segment) {
+ return segment.reachable;
+}
+
+/**
+ * Checks whether a node and a token are separated by blank lines
+ * @param {ASTNode} node - The node to check
+ * @param {Token} token - The token to compare against
+ * @returns {boolean} `true` if there are blank lines between node and token
+ */
+function hasBlankLinesBetween(node, token) {
+ return token.loc.start.line > node.loc.end.line + 1;
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow fallthrough of `case` statements",
+ category: "Best Practices",
+ recommended: true
+ },
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ commentPattern: {
+ type: "string"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+ const options = context.options[0] || {};
+ let currentCodePath = null;
+ const sourceCode = context.getSourceCode();
+
+ /*
+ * We need to use leading comments of the next SwitchCase node because
+ * trailing comments is wrong if semicolons are omitted.
+ */
+ let fallthroughCase = null;
+ let fallthroughCommentPattern = null;
+
+ if (options.commentPattern) {
+ fallthroughCommentPattern = new RegExp(options.commentPattern);
+ } else {
+ fallthroughCommentPattern = DEFAULT_FALLTHROUGH_COMMENT;
+ }
+
+ return {
+ onCodePathStart(codePath) {
+ currentCodePath = codePath;
+ },
+ onCodePathEnd() {
+ currentCodePath = currentCodePath.upper;
+ },
+
+ SwitchCase(node) {
+
+ /*
+ * Checks whether or not there is a fallthrough comment.
+ * And reports the previous fallthrough node if that does not exist.
+ */
+ if (fallthroughCase && !hasFallthroughComment(node, context, fallthroughCommentPattern)) {
+ context.report({
+ message: "Expected a 'break' statement before '{{type}}'.",
+ data: { type: node.test ? "case" : "default" },
+ node
+ });
+ }
+ fallthroughCase = null;
+ },
+
+ "SwitchCase:exit"(node) {
+ const nextToken = sourceCode.getTokenAfter(node);
+
+ /*
+ * `reachable` meant fall through because statements preceded by
+ * `break`, `return`, or `throw` are unreachable.
+ * And allows empty cases and the last case.
+ */
+ if (currentCodePath.currentSegments.some(isReachable) &&
+ (node.consequent.length > 0 || hasBlankLinesBetween(node, nextToken)) &&
+ lodash.last(node.parent.cases) !== node) {
+ fallthroughCase = node;
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-floating-decimal.js b/tools/node_modules/eslint/lib/rules/no-floating-decimal.js
new file mode 100644
index 0000000000..dfba453a49
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-floating-decimal.js
@@ -0,0 +1,64 @@
+/**
+ * @fileoverview Rule to flag use of a leading/trailing decimal point in a numeric literal
+ * @author James Allardice
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow leading or trailing decimal points in numeric literals",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: [],
+
+ fixable: "code"
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+
+ return {
+ Literal(node) {
+
+ if (typeof node.value === "number") {
+ if (node.raw.startsWith(".")) {
+ context.report({
+ node,
+ message: "A leading decimal point can be confused with a dot.",
+ fix(fixer) {
+ const tokenBefore = sourceCode.getTokenBefore(node);
+ const needsSpaceBefore = tokenBefore &&
+ tokenBefore.range[1] === node.range[0] &&
+ !astUtils.canTokensBeAdjacent(tokenBefore, `0${node.raw}`);
+
+ return fixer.insertTextBefore(node, needsSpaceBefore ? " 0" : "0");
+ }
+ });
+ }
+ if (node.raw.indexOf(".") === node.raw.length - 1) {
+ context.report({
+ node,
+ message: "A trailing decimal point can be confused with a dot.",
+ fix: fixer => fixer.insertTextAfter(node, "0")
+ });
+ }
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-func-assign.js b/tools/node_modules/eslint/lib/rules/no-func-assign.js
new file mode 100644
index 0000000000..ea86365b29
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-func-assign.js
@@ -0,0 +1,63 @@
+/**
+ * @fileoverview Rule to flag use of function declaration identifiers as variables.
+ * @author Ian Christian Myers
+ */
+
+"use strict";
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow reassigning `function` declarations",
+ category: "Possible Errors",
+ recommended: true
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ /**
+ * Reports a reference if is non initializer and writable.
+ * @param {References} references - Collection of reference to check.
+ * @returns {void}
+ */
+ function checkReference(references) {
+ astUtils.getModifyingReferences(references).forEach(reference => {
+ context.report({ node: reference.identifier, message: "'{{name}}' is a function.", data: { name: reference.identifier.name } });
+ });
+ }
+
+ /**
+ * Finds and reports references that are non initializer and writable.
+ * @param {Variable} variable - A variable to check.
+ * @returns {void}
+ */
+ function checkVariable(variable) {
+ if (variable.defs[0].type === "FunctionName") {
+ checkReference(variable.references);
+ }
+ }
+
+ /**
+ * Checks parameters of a given function node.
+ * @param {ASTNode} node - A function node to check.
+ * @returns {void}
+ */
+ function checkForFunction(node) {
+ context.getDeclaredVariables(node).forEach(checkVariable);
+ }
+
+ return {
+ FunctionDeclaration: checkForFunction,
+ FunctionExpression: checkForFunction
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-global-assign.js b/tools/node_modules/eslint/lib/rules/no-global-assign.js
new file mode 100644
index 0000000000..679650cb70
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-global-assign.js
@@ -0,0 +1,85 @@
+/**
+ * @fileoverview Rule to disallow assignments to native objects or read-only global variables
+ * @author Ilya Volodin
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow assignments to native objects or read-only global variables",
+ category: "Best Practices",
+ recommended: true
+ },
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ exceptions: {
+ type: "array",
+ items: { type: "string" },
+ uniqueItems: true
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+ const config = context.options[0];
+ const exceptions = (config && config.exceptions) || [];
+
+ /**
+ * Reports write references.
+ * @param {Reference} reference - A reference to check.
+ * @param {int} index - The index of the reference in the references.
+ * @param {Reference[]} references - The array that the reference belongs to.
+ * @returns {void}
+ */
+ function checkReference(reference, index, references) {
+ const identifier = reference.identifier;
+
+ if (reference.init === false &&
+ reference.isWrite() &&
+
+ /*
+ * Destructuring assignments can have multiple default value,
+ * so possibly there are multiple writeable references for the same identifier.
+ */
+ (index === 0 || references[index - 1].identifier !== identifier)
+ ) {
+ context.report({
+ node: identifier,
+ message: "Read-only global '{{name}}' should not be modified.",
+ data: identifier
+ });
+ }
+ }
+
+ /**
+ * Reports write references if a given variable is read-only builtin.
+ * @param {Variable} variable - A variable to check.
+ * @returns {void}
+ */
+ function checkVariable(variable) {
+ if (variable.writeable === false && exceptions.indexOf(variable.name) === -1) {
+ variable.references.forEach(checkReference);
+ }
+ }
+
+ return {
+ Program() {
+ const globalScope = context.getScope();
+
+ globalScope.variables.forEach(checkVariable);
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-implicit-coercion.js b/tools/node_modules/eslint/lib/rules/no-implicit-coercion.js
new file mode 100644
index 0000000000..24e04858f0
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-implicit-coercion.js
@@ -0,0 +1,292 @@
+/**
+ * @fileoverview A rule to disallow the type conversions with shorter notations.
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+const INDEX_OF_PATTERN = /^(?:i|lastI)ndexOf$/;
+const ALLOWABLE_OPERATORS = ["~", "!!", "+", "*"];
+
+/**
+ * Parses and normalizes an option object.
+ * @param {Object} options - An option object to parse.
+ * @returns {Object} The parsed and normalized option object.
+ */
+function parseOptions(options) {
+ options = options || {};
+ return {
+ boolean: "boolean" in options ? Boolean(options.boolean) : true,
+ number: "number" in options ? Boolean(options.number) : true,
+ string: "string" in options ? Boolean(options.string) : true,
+ allow: options.allow || []
+ };
+}
+
+/**
+ * Checks whether or not a node is a double logical nigating.
+ * @param {ASTNode} node - An UnaryExpression node to check.
+ * @returns {boolean} Whether or not the node is a double logical nigating.
+ */
+function isDoubleLogicalNegating(node) {
+ return (
+ node.operator === "!" &&
+ node.argument.type === "UnaryExpression" &&
+ node.argument.operator === "!"
+ );
+}
+
+/**
+ * Checks whether or not a node is a binary negating of `.indexOf()` method calling.
+ * @param {ASTNode} node - An UnaryExpression node to check.
+ * @returns {boolean} Whether or not the node is a binary negating of `.indexOf()` method calling.
+ */
+function isBinaryNegatingOfIndexOf(node) {
+ return (
+ node.operator === "~" &&
+ node.argument.type === "CallExpression" &&
+ node.argument.callee.type === "MemberExpression" &&
+ node.argument.callee.property.type === "Identifier" &&
+ INDEX_OF_PATTERN.test(node.argument.callee.property.name)
+ );
+}
+
+/**
+ * Checks whether or not a node is a multiplying by one.
+ * @param {BinaryExpression} node - A BinaryExpression node to check.
+ * @returns {boolean} Whether or not the node is a multiplying by one.
+ */
+function isMultiplyByOne(node) {
+ return node.operator === "*" && (
+ node.left.type === "Literal" && node.left.value === 1 ||
+ node.right.type === "Literal" && node.right.value === 1
+ );
+}
+
+/**
+ * Checks whether the result of a node is numeric or not
+ * @param {ASTNode} node The node to test
+ * @returns {boolean} true if the node is a number literal or a `Number()`, `parseInt` or `parseFloat` call
+ */
+function isNumeric(node) {
+ return (
+ node.type === "Literal" && typeof node.value === "number" ||
+ node.type === "CallExpression" && (
+ node.callee.name === "Number" ||
+ node.callee.name === "parseInt" ||
+ node.callee.name === "parseFloat"
+ )
+ );
+}
+
+/**
+ * Returns the first non-numeric operand in a BinaryExpression. Designed to be
+ * used from bottom to up since it walks up the BinaryExpression trees using
+ * node.parent to find the result.
+ * @param {BinaryExpression} node The BinaryExpression node to be walked up on
+ * @returns {ASTNode|null} The first non-numeric item in the BinaryExpression tree or null
+ */
+function getNonNumericOperand(node) {
+ const left = node.left,
+ right = node.right;
+
+ if (right.type !== "BinaryExpression" && !isNumeric(right)) {
+ return right;
+ }
+
+ if (left.type !== "BinaryExpression" && !isNumeric(left)) {
+ return left;
+ }
+
+ return null;
+}
+
+/**
+ * Checks whether a node is an empty string literal or not.
+ * @param {ASTNode} node The node to check.
+ * @returns {boolean} Whether or not the passed in node is an
+ * empty string literal or not.
+ */
+function isEmptyString(node) {
+ return astUtils.isStringLiteral(node) && (node.value === "" || (node.type === "TemplateLiteral" && node.quasis.length === 1 && node.quasis[0].value.cooked === ""));
+}
+
+/**
+ * Checks whether or not a node is a concatenating with an empty string.
+ * @param {ASTNode} node - A BinaryExpression node to check.
+ * @returns {boolean} Whether or not the node is a concatenating with an empty string.
+ */
+function isConcatWithEmptyString(node) {
+ return node.operator === "+" && (
+ (isEmptyString(node.left) && !astUtils.isStringLiteral(node.right)) ||
+ (isEmptyString(node.right) && !astUtils.isStringLiteral(node.left))
+ );
+}
+
+/**
+ * Checks whether or not a node is appended with an empty string.
+ * @param {ASTNode} node - An AssignmentExpression node to check.
+ * @returns {boolean} Whether or not the node is appended with an empty string.
+ */
+function isAppendEmptyString(node) {
+ return node.operator === "+=" && isEmptyString(node.right);
+}
+
+/**
+ * Returns the operand that is not an empty string from a flagged BinaryExpression.
+ * @param {ASTNode} node - The flagged BinaryExpression node to check.
+ * @returns {ASTNode} The operand that is not an empty string from a flagged BinaryExpression.
+ */
+function getNonEmptyOperand(node) {
+ return isEmptyString(node.left) ? node.right : node.left;
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow shorthand type conversions",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ fixable: "code",
+ schema: [{
+ type: "object",
+ properties: {
+ boolean: {
+ type: "boolean"
+ },
+ number: {
+ type: "boolean"
+ },
+ string: {
+ type: "boolean"
+ },
+ allow: {
+ type: "array",
+ items: {
+ enum: ALLOWABLE_OPERATORS
+ },
+ uniqueItems: true
+ }
+ },
+ additionalProperties: false
+ }]
+ },
+
+ create(context) {
+ const options = parseOptions(context.options[0]);
+ const sourceCode = context.getSourceCode();
+
+ /**
+ * Reports an error and autofixes the node
+ * @param {ASTNode} node - An ast node to report the error on.
+ * @param {string} recommendation - The recommended code for the issue
+ * @param {bool} shouldFix - Whether this report should fix the node
+ * @returns {void}
+ */
+ function report(node, recommendation, shouldFix) {
+ shouldFix = typeof shouldFix === "undefined" ? true : shouldFix;
+
+ context.report({
+ node,
+ message: "use `{{recommendation}}` instead.",
+ data: {
+ recommendation
+ },
+ fix(fixer) {
+ if (!shouldFix) {
+ return null;
+ }
+
+ const tokenBefore = sourceCode.getTokenBefore(node);
+
+ if (
+ tokenBefore &&
+ tokenBefore.range[1] === node.range[0] &&
+ !astUtils.canTokensBeAdjacent(tokenBefore, recommendation)
+ ) {
+ return fixer.replaceText(node, ` ${recommendation}`);
+ }
+ return fixer.replaceText(node, recommendation);
+ }
+ });
+ }
+
+ return {
+ UnaryExpression(node) {
+ let operatorAllowed;
+
+ // !!foo
+ operatorAllowed = options.allow.indexOf("!!") >= 0;
+ if (!operatorAllowed && options.boolean && isDoubleLogicalNegating(node)) {
+ const recommendation = `Boolean(${sourceCode.getText(node.argument.argument)})`;
+
+ report(node, recommendation);
+ }
+
+ // ~foo.indexOf(bar)
+ operatorAllowed = options.allow.indexOf("~") >= 0;
+ if (!operatorAllowed && options.boolean && isBinaryNegatingOfIndexOf(node)) {
+ const recommendation = `${sourceCode.getText(node.argument)} !== -1`;
+
+ report(node, recommendation, false);
+ }
+
+ // +foo
+ operatorAllowed = options.allow.indexOf("+") >= 0;
+ if (!operatorAllowed && options.number && node.operator === "+" && !isNumeric(node.argument)) {
+ const recommendation = `Number(${sourceCode.getText(node.argument)})`;
+
+ report(node, recommendation);
+ }
+ },
+
+ // Use `:exit` to prevent double reporting
+ "BinaryExpression:exit"(node) {
+ let operatorAllowed;
+
+ // 1 * foo
+ operatorAllowed = options.allow.indexOf("*") >= 0;
+ const nonNumericOperand = !operatorAllowed && options.number && isMultiplyByOne(node) && getNonNumericOperand(node);
+
+ if (nonNumericOperand) {
+ const recommendation = `Number(${sourceCode.getText(nonNumericOperand)})`;
+
+ report(node, recommendation);
+ }
+
+ // "" + foo
+ operatorAllowed = options.allow.indexOf("+") >= 0;
+ if (!operatorAllowed && options.string && isConcatWithEmptyString(node)) {
+ const recommendation = `String(${sourceCode.getText(getNonEmptyOperand(node))})`;
+
+ report(node, recommendation);
+ }
+ },
+
+ AssignmentExpression(node) {
+
+ // foo += ""
+ const operatorAllowed = options.allow.indexOf("+") >= 0;
+
+ if (!operatorAllowed && options.string && isAppendEmptyString(node)) {
+ const code = sourceCode.getText(getNonEmptyOperand(node));
+ const recommendation = `${code} = String(${code})`;
+
+ report(node, recommendation);
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-implicit-globals.js b/tools/node_modules/eslint/lib/rules/no-implicit-globals.js
new file mode 100644
index 0000000000..f0962cdc7a
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-implicit-globals.js
@@ -0,0 +1,55 @@
+/**
+ * @fileoverview Rule to check for implicit global variables and functions.
+ * @author Joshua Peek
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow variable and `function` declarations in the global scope",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+ return {
+ Program() {
+ const scope = context.getScope();
+
+ scope.variables.forEach(variable => {
+ if (variable.writeable) {
+ return;
+ }
+
+ variable.defs.forEach(def => {
+ if (def.type === "FunctionName" || (def.type === "Variable" && def.parent.kind === "var")) {
+ context.report({ node: def.node, message: "Implicit global variable, assign as global property instead." });
+ }
+ });
+ });
+
+ scope.implicit.variables.forEach(variable => {
+ const scopeVariable = scope.set.get(variable.name);
+
+ if (scopeVariable && scopeVariable.writeable) {
+ return;
+ }
+
+ variable.defs.forEach(def => {
+ context.report({ node: def.node, message: "Implicit global variable, assign as global property instead." });
+ });
+ });
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-implied-eval.js b/tools/node_modules/eslint/lib/rules/no-implied-eval.js
new file mode 100644
index 0000000000..cfb16dbf73
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-implied-eval.js
@@ -0,0 +1,161 @@
+/**
+ * @fileoverview Rule to flag use of implied eval via setTimeout and setInterval
+ * @author James Allardice
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow the use of `eval()`-like methods",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+ const CALLEE_RE = /^(setTimeout|setInterval|execScript)$/;
+
+ /*
+ * Figures out if we should inspect a given binary expression. Is a stack
+ * of stacks, where the first element in each substack is a CallExpression.
+ */
+ const impliedEvalAncestorsStack = [];
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ /**
+ * Get the last element of an array, without modifying arr, like pop(), but non-destructive.
+ * @param {array} arr What to inspect
+ * @returns {*} The last element of arr
+ * @private
+ */
+ function last(arr) {
+ return arr ? arr[arr.length - 1] : null;
+ }
+
+ /**
+ * Checks if the given MemberExpression node is a potentially implied eval identifier on window.
+ * @param {ASTNode} node The MemberExpression node to check.
+ * @returns {boolean} Whether or not the given node is potentially an implied eval.
+ * @private
+ */
+ function isImpliedEvalMemberExpression(node) {
+ const object = node.object,
+ property = node.property,
+ hasImpliedEvalName = CALLEE_RE.test(property.name) || CALLEE_RE.test(property.value);
+
+ return object.name === "window" && hasImpliedEvalName;
+ }
+
+ /**
+ * Determines if a node represents a call to a potentially implied eval.
+ *
+ * This checks the callee name and that there's an argument, but not the type of the argument.
+ *
+ * @param {ASTNode} node The CallExpression to check.
+ * @returns {boolean} True if the node matches, false if not.
+ * @private
+ */
+ function isImpliedEvalCallExpression(node) {
+ const isMemberExpression = (node.callee.type === "MemberExpression"),
+ isIdentifier = (node.callee.type === "Identifier"),
+ isImpliedEvalCallee =
+ (isIdentifier && CALLEE_RE.test(node.callee.name)) ||
+ (isMemberExpression && isImpliedEvalMemberExpression(node.callee));
+
+ return isImpliedEvalCallee && node.arguments.length;
+ }
+
+ /**
+ * Checks that the parent is a direct descendent of an potential implied eval CallExpression, and if the parent is a CallExpression, that we're the first argument.
+ * @param {ASTNode} node The node to inspect the parent of.
+ * @returns {boolean} Was the parent a direct descendent, and is the child therefore potentially part of a dangerous argument?
+ * @private
+ */
+ function hasImpliedEvalParent(node) {
+
+ // make sure our parent is marked
+ return node.parent === last(last(impliedEvalAncestorsStack)) &&
+
+ // if our parent is a CallExpression, make sure we're the first argument
+ (node.parent.type !== "CallExpression" || node === node.parent.arguments[0]);
+ }
+
+ /**
+ * Checks if our parent is marked as part of an implied eval argument. If
+ * so, collapses the top of impliedEvalAncestorsStack and reports on the
+ * original CallExpression.
+ * @param {ASTNode} node The CallExpression to check.
+ * @returns {boolean} True if the node matches, false if not.
+ * @private
+ */
+ function checkString(node) {
+ if (hasImpliedEvalParent(node)) {
+
+ // remove the entire substack, to avoid duplicate reports
+ const substack = impliedEvalAncestorsStack.pop();
+
+ context.report({ node: substack[0], message: "Implied eval. Consider passing a function instead of a string." });
+ }
+ }
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+ CallExpression(node) {
+ if (isImpliedEvalCallExpression(node)) {
+
+ // call expressions create a new substack
+ impliedEvalAncestorsStack.push([node]);
+ }
+ },
+
+ "CallExpression:exit"(node) {
+ if (node === last(last(impliedEvalAncestorsStack))) {
+
+ /*
+ * Destroys the entire sub-stack, rather than just using
+ * last(impliedEvalAncestorsStack).pop(), as a CallExpression is
+ * always the bottom of a impliedEvalAncestorsStack substack.
+ */
+ impliedEvalAncestorsStack.pop();
+ }
+ },
+
+ BinaryExpression(node) {
+ if (node.operator === "+" && hasImpliedEvalParent(node)) {
+ last(impliedEvalAncestorsStack).push(node);
+ }
+ },
+
+ "BinaryExpression:exit"(node) {
+ if (node === last(last(impliedEvalAncestorsStack))) {
+ last(impliedEvalAncestorsStack).pop();
+ }
+ },
+
+ Literal(node) {
+ if (typeof node.value === "string") {
+ checkString(node);
+ }
+ },
+
+ TemplateLiteral(node) {
+ checkString(node);
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-inline-comments.js b/tools/node_modules/eslint/lib/rules/no-inline-comments.js
new file mode 100644
index 0000000000..42b4753dfd
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-inline-comments.js
@@ -0,0 +1,65 @@
+/**
+ * @fileoverview Enforces or disallows inline comments.
+ * @author Greg Cochard
+ */
+"use strict";
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow inline comments after code",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+
+ /**
+ * Will check that comments are not on lines starting with or ending with code
+ * @param {ASTNode} node The comment node to check
+ * @private
+ * @returns {void}
+ */
+ function testCodeAroundComment(node) {
+
+ // Get the whole line and cut it off at the start of the comment
+ const startLine = String(sourceCode.lines[node.loc.start.line - 1]);
+ const endLine = String(sourceCode.lines[node.loc.end.line - 1]);
+
+ const preamble = startLine.slice(0, node.loc.start.column).trim();
+
+ // Also check after the comment
+ const postamble = endLine.slice(node.loc.end.column).trim();
+
+ // Check that this comment isn't an ESLint directive
+ const isDirective = astUtils.isDirectiveComment(node);
+
+ // Should be empty if there was only whitespace around the comment
+ if (!isDirective && (preamble || postamble)) {
+ context.report({ node, message: "Unexpected comment inline with code." });
+ }
+ }
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+ Program() {
+ const comments = sourceCode.getAllComments();
+
+ comments.filter(token => token.type !== "Shebang").forEach(testCodeAroundComment);
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-inner-declarations.js b/tools/node_modules/eslint/lib/rules/no-inner-declarations.js
new file mode 100644
index 0000000000..28aa5b4b5c
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-inner-declarations.js
@@ -0,0 +1,89 @@
+/**
+ * @fileoverview Rule to enforce declarations in program or function body root.
+ * @author Brandon Mills
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow variable or `function` declarations in nested blocks",
+ category: "Possible Errors",
+ recommended: true
+ },
+
+ schema: [
+ {
+ enum: ["functions", "both"]
+ }
+ ]
+ },
+
+ create(context) {
+
+ /**
+ * Find the nearest Program or Function ancestor node.
+ * @returns {Object} Ancestor's type and distance from node.
+ */
+ function nearestBody() {
+ const ancestors = context.getAncestors();
+ let ancestor = ancestors.pop(),
+ generation = 1;
+
+ while (ancestor && ["Program", "FunctionDeclaration",
+ "FunctionExpression", "ArrowFunctionExpression"
+ ].indexOf(ancestor.type) < 0) {
+ generation += 1;
+ ancestor = ancestors.pop();
+ }
+
+ return {
+
+ // Type of containing ancestor
+ type: ancestor.type,
+
+ // Separation between ancestor and node
+ distance: generation
+ };
+ }
+
+ /**
+ * Ensure that a given node is at a program or function body's root.
+ * @param {ASTNode} node Declaration node to check.
+ * @returns {void}
+ */
+ function check(node) {
+ const body = nearestBody(),
+ valid = ((body.type === "Program" && body.distance === 1) ||
+ body.distance === 2);
+
+ if (!valid) {
+ context.report({
+ node,
+ message: "Move {{type}} declaration to {{body}} root.",
+ data: {
+ type: (node.type === "FunctionDeclaration" ? "function" : "variable"),
+ body: (body.type === "Program" ? "program" : "function body")
+ }
+ });
+ }
+ }
+
+ return {
+
+ FunctionDeclaration: check,
+ VariableDeclaration(node) {
+ if (context.options[0] === "both" && node.kind === "var") {
+ check(node);
+ }
+ }
+
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-invalid-regexp.js b/tools/node_modules/eslint/lib/rules/no-invalid-regexp.js
new file mode 100644
index 0000000000..45596f7ee8
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-invalid-regexp.js
@@ -0,0 +1,106 @@
+/**
+ * @fileoverview Validate strings passed to the RegExp constructor
+ * @author Michael Ficarra
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const espree = require("espree");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow invalid regular expression strings in `RegExp` constructors",
+ category: "Possible Errors",
+ recommended: true
+ },
+
+ schema: [{
+ type: "object",
+ properties: {
+ allowConstructorFlags: {
+ type: "array",
+ items: {
+ type: "string"
+ }
+ }
+ },
+ additionalProperties: false
+ }]
+ },
+
+ create(context) {
+
+ const options = context.options[0];
+ let allowedFlags = "";
+
+ if (options && options.allowConstructorFlags) {
+ allowedFlags = options.allowConstructorFlags.join("");
+ }
+
+ /**
+ * Check if node is a string
+ * @param {ASTNode} node node to evaluate
+ * @returns {boolean} True if its a string
+ * @private
+ */
+ function isString(node) {
+ return node && node.type === "Literal" && typeof node.value === "string";
+ }
+
+ /**
+ * Validate strings passed to the RegExp constructor
+ * @param {ASTNode} node node to evaluate
+ * @returns {void}
+ * @private
+ */
+ function check(node) {
+ if (node.callee.type === "Identifier" && node.callee.name === "RegExp" && isString(node.arguments[0])) {
+ let flags = isString(node.arguments[1]) ? node.arguments[1].value : "";
+
+ if (allowedFlags) {
+ flags = flags.replace(new RegExp(`[${allowedFlags}]`, "gi"), "");
+ }
+
+ try {
+ void new RegExp(node.arguments[0].value);
+ } catch (e) {
+ context.report({
+ node,
+ message: "{{message}}.",
+ data: e
+ });
+ }
+
+ if (flags) {
+
+ try {
+ espree.parse(`/./${flags}`, context.parserOptions);
+ } catch (ex) {
+ context.report({
+ node,
+ message: "Invalid flags supplied to RegExp constructor '{{flags}}'.",
+ data: {
+ flags
+ }
+ });
+ }
+ }
+
+ }
+ }
+
+ return {
+ CallExpression: check,
+ NewExpression: check
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-invalid-this.js b/tools/node_modules/eslint/lib/rules/no-invalid-this.js
new file mode 100644
index 0000000000..5a0a62f7a1
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-invalid-this.js
@@ -0,0 +1,123 @@
+/**
+ * @fileoverview A rule to disallow `this` keywords outside of classes or class-like objects.
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow `this` keywords outside of classes or class-like objects",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+ const stack = [],
+ sourceCode = context.getSourceCode();
+
+ /**
+ * Gets the current checking context.
+ *
+ * The return value has a flag that whether or not `this` keyword is valid.
+ * The flag is initialized when got at the first time.
+ *
+ * @returns {{valid: boolean}}
+ * an object which has a flag that whether or not `this` keyword is valid.
+ */
+ stack.getCurrent = function() {
+ const current = this[this.length - 1];
+
+ if (!current.init) {
+ current.init = true;
+ current.valid = !astUtils.isDefaultThisBinding(
+ current.node,
+ sourceCode
+ );
+ }
+ return current;
+ };
+
+ /**
+ * Pushs new checking context into the stack.
+ *
+ * The checking context is not initialized yet.
+ * Because most functions don't have `this` keyword.
+ * When `this` keyword was found, the checking context is initialized.
+ *
+ * @param {ASTNode} node - A function node that was entered.
+ * @returns {void}
+ */
+ function enterFunction(node) {
+
+ // `this` can be invalid only under strict mode.
+ stack.push({
+ init: !context.getScope().isStrict,
+ node,
+ valid: true
+ });
+ }
+
+ /**
+ * Pops the current checking context from the stack.
+ * @returns {void}
+ */
+ function exitFunction() {
+ stack.pop();
+ }
+
+ return {
+
+ /*
+ * `this` is invalid only under strict mode.
+ * Modules is always strict mode.
+ */
+ Program(node) {
+ const scope = context.getScope(),
+ features = context.parserOptions.ecmaFeatures || {};
+
+ stack.push({
+ init: true,
+ node,
+ valid: !(
+ scope.isStrict ||
+ node.sourceType === "module" ||
+ (features.globalReturn && scope.childScopes[0].isStrict)
+ )
+ });
+ },
+
+ "Program:exit"() {
+ stack.pop();
+ },
+
+ FunctionDeclaration: enterFunction,
+ "FunctionDeclaration:exit": exitFunction,
+ FunctionExpression: enterFunction,
+ "FunctionExpression:exit": exitFunction,
+
+ // Reports if `this` of the current context is invalid.
+ ThisExpression(node) {
+ const current = stack.getCurrent();
+
+ if (current && !current.valid) {
+ context.report({ node, message: "Unexpected 'this'." });
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-irregular-whitespace.js b/tools/node_modules/eslint/lib/rules/no-irregular-whitespace.js
new file mode 100644
index 0000000000..cfbdfd1a5e
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-irregular-whitespace.js
@@ -0,0 +1,236 @@
+/**
+ * @fileoverview Rule to disalow whitespace that is not a tab or space, whitespace inside strings and comments are allowed
+ * @author Jonathan Kingston
+ * @author Christophe Porteneuve
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Constants
+//------------------------------------------------------------------------------
+
+const ALL_IRREGULARS = /[\f\v\u0085\ufeff\u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u202f\u205f\u3000\u2028\u2029]/;
+const IRREGULAR_WHITESPACE = /[\f\v\u0085\ufeff\u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u202f\u205f\u3000]+/mg;
+const IRREGULAR_LINE_TERMINATORS = /[\u2028\u2029]/mg;
+const LINE_BREAK = astUtils.createGlobalLinebreakMatcher();
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow irregular whitespace outside of strings and comments",
+ category: "Possible Errors",
+ recommended: true
+ },
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ skipComments: {
+ type: "boolean"
+ },
+ skipStrings: {
+ type: "boolean"
+ },
+ skipTemplates: {
+ type: "boolean"
+ },
+ skipRegExps: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+
+ // Module store of errors that we have found
+ let errors = [];
+
+ // Lookup the `skipComments` option, which defaults to `false`.
+ const options = context.options[0] || {};
+ const skipComments = !!options.skipComments;
+ const skipStrings = options.skipStrings !== false;
+ const skipRegExps = !!options.skipRegExps;
+ const skipTemplates = !!options.skipTemplates;
+
+ const sourceCode = context.getSourceCode();
+ const commentNodes = sourceCode.getAllComments();
+
+ /**
+ * Removes errors that occur inside a string node
+ * @param {ASTNode} node to check for matching errors.
+ * @returns {void}
+ * @private
+ */
+ function removeWhitespaceError(node) {
+ const locStart = node.loc.start;
+ const locEnd = node.loc.end;
+
+ errors = errors.filter(error => {
+ const errorLoc = error[1];
+
+ if (errorLoc.line >= locStart.line && errorLoc.line <= locEnd.line) {
+ if (errorLoc.column >= locStart.column && (errorLoc.column <= locEnd.column || errorLoc.line < locEnd.line)) {
+ return false;
+ }
+ }
+ return true;
+ });
+ }
+
+ /**
+ * Checks identifier or literal nodes for errors that we are choosing to ignore and calls the relevant methods to remove the errors
+ * @param {ASTNode} node to check for matching errors.
+ * @returns {void}
+ * @private
+ */
+ function removeInvalidNodeErrorsInIdentifierOrLiteral(node) {
+ const shouldCheckStrings = skipStrings && (typeof node.value === "string");
+ const shouldCheckRegExps = skipRegExps && (node.value instanceof RegExp);
+
+ if (shouldCheckStrings || shouldCheckRegExps) {
+
+ // If we have irregular characters remove them from the errors list
+ if (ALL_IRREGULARS.test(node.raw)) {
+ removeWhitespaceError(node);
+ }
+ }
+ }
+
+ /**
+ * Checks template string literal nodes for errors that we are choosing to ignore and calls the relevant methods to remove the errors
+ * @param {ASTNode} node to check for matching errors.
+ * @returns {void}
+ * @private
+ */
+ function removeInvalidNodeErrorsInTemplateLiteral(node) {
+ if (typeof node.value.raw === "string") {
+ if (ALL_IRREGULARS.test(node.value.raw)) {
+ removeWhitespaceError(node);
+ }
+ }
+ }
+
+ /**
+ * Checks comment nodes for errors that we are choosing to ignore and calls the relevant methods to remove the errors
+ * @param {ASTNode} node to check for matching errors.
+ * @returns {void}
+ * @private
+ */
+ function removeInvalidNodeErrorsInComment(node) {
+ if (ALL_IRREGULARS.test(node.value)) {
+ removeWhitespaceError(node);
+ }
+ }
+
+ /**
+ * Checks the program source for irregular whitespace
+ * @param {ASTNode} node The program node
+ * @returns {void}
+ * @private
+ */
+ function checkForIrregularWhitespace(node) {
+ const sourceLines = sourceCode.lines;
+
+ sourceLines.forEach((sourceLine, lineIndex) => {
+ const lineNumber = lineIndex + 1;
+ let match;
+
+ while ((match = IRREGULAR_WHITESPACE.exec(sourceLine)) !== null) {
+ const location = {
+ line: lineNumber,
+ column: match.index
+ };
+
+ errors.push([node, location, "Irregular whitespace not allowed."]);
+ }
+ });
+ }
+
+ /**
+ * Checks the program source for irregular line terminators
+ * @param {ASTNode} node The program node
+ * @returns {void}
+ * @private
+ */
+ function checkForIrregularLineTerminators(node) {
+ const source = sourceCode.getText(),
+ sourceLines = sourceCode.lines,
+ linebreaks = source.match(LINE_BREAK);
+ let lastLineIndex = -1,
+ match;
+
+ while ((match = IRREGULAR_LINE_TERMINATORS.exec(source)) !== null) {
+ const lineIndex = linebreaks.indexOf(match[0], lastLineIndex + 1) || 0;
+ const location = {
+ line: lineIndex + 1,
+ column: sourceLines[lineIndex].length
+ };
+
+ errors.push([node, location, "Irregular whitespace not allowed."]);
+ lastLineIndex = lineIndex;
+ }
+ }
+
+ /**
+ * A no-op function to act as placeholder for comment accumulation when the `skipComments` option is `false`.
+ * @returns {void}
+ * @private
+ */
+ function noop() {}
+
+ const nodes = {};
+
+ if (ALL_IRREGULARS.test(sourceCode.getText())) {
+ nodes.Program = function(node) {
+
+ /*
+ * As we can easily fire warnings for all white space issues with
+ * all the source its simpler to fire them here.
+ * This means we can check all the application code without having
+ * to worry about issues caused in the parser tokens.
+ * When writing this code also evaluating per node was missing out
+ * connecting tokens in some cases.
+ * We can later filter the errors when they are found to be not an
+ * issue in nodes we don't care about.
+ */
+ checkForIrregularWhitespace(node);
+ checkForIrregularLineTerminators(node);
+ };
+
+ nodes.Identifier = removeInvalidNodeErrorsInIdentifierOrLiteral;
+ nodes.Literal = removeInvalidNodeErrorsInIdentifierOrLiteral;
+ nodes.TemplateElement = skipTemplates ? removeInvalidNodeErrorsInTemplateLiteral : noop;
+ nodes["Program:exit"] = function() {
+ if (skipComments) {
+
+ // First strip errors occurring in comment nodes.
+ commentNodes.forEach(removeInvalidNodeErrorsInComment);
+ }
+
+ // If we have any errors remaining report on them
+ errors.forEach(error => {
+ context.report.apply(context, error);
+ });
+ };
+ } else {
+ nodes.Program = noop;
+ }
+
+ return nodes;
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-iterator.js b/tools/node_modules/eslint/lib/rules/no-iterator.js
new file mode 100644
index 0000000000..3677dd94d9
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-iterator.js
@@ -0,0 +1,38 @@
+/**
+ * @fileoverview Rule to flag usage of __iterator__ property
+ * @author Ian Christian Myers
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow the use of the `__iterator__` property",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ return {
+
+ MemberExpression(node) {
+
+ if (node.property &&
+ (node.property.type === "Identifier" && node.property.name === "__iterator__" && !node.computed) ||
+ (node.property.type === "Literal" && node.property.value === "__iterator__")) {
+ context.report({ node, message: "Reserved name '__iterator__'." });
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-label-var.js b/tools/node_modules/eslint/lib/rules/no-label-var.js
new file mode 100644
index 0000000000..954066aef3
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-label-var.js
@@ -0,0 +1,69 @@
+/**
+ * @fileoverview Rule to flag labels that are the same as an identifier
+ * @author Ian Christian Myers
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow labels that share a name with a variable",
+ category: "Variables",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ /**
+ * Check if the identifier is present inside current scope
+ * @param {Object} scope current scope
+ * @param {string} name To evaluate
+ * @returns {boolean} True if its present
+ * @private
+ */
+ function findIdentifier(scope, name) {
+ return astUtils.getVariableByName(scope, name) !== null;
+ }
+
+ //--------------------------------------------------------------------------
+ // Public API
+ //--------------------------------------------------------------------------
+
+ return {
+
+ LabeledStatement(node) {
+
+ // Fetch the innermost scope.
+ const scope = context.getScope();
+
+ /*
+ * Recursively find the identifier walking up the scope, starting
+ * with the innermost scope.
+ */
+ if (findIdentifier(scope, node.label.name)) {
+ context.report({ node, message: "Found identifier with same name as label." });
+ }
+ }
+
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-labels.js b/tools/node_modules/eslint/lib/rules/no-labels.js
new file mode 100644
index 0000000000..101092a667
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-labels.js
@@ -0,0 +1,141 @@
+/**
+ * @fileoverview Disallow Labeled Statements
+ * @author Nicholas C. Zakas
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow labeled statements",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ allowLoop: {
+ type: "boolean"
+ },
+ allowSwitch: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+ const options = context.options[0];
+ const allowLoop = Boolean(options && options.allowLoop);
+ const allowSwitch = Boolean(options && options.allowSwitch);
+ let scopeInfo = null;
+
+ /**
+ * Gets the kind of a given node.
+ *
+ * @param {ASTNode} node - A node to get.
+ * @returns {string} The kind of the node.
+ */
+ function getBodyKind(node) {
+ if (astUtils.isLoop(node)) {
+ return "loop";
+ }
+ if (node.type === "SwitchStatement") {
+ return "switch";
+ }
+ return "other";
+ }
+
+ /**
+ * Checks whether the label of a given kind is allowed or not.
+ *
+ * @param {string} kind - A kind to check.
+ * @returns {boolean} `true` if the kind is allowed.
+ */
+ function isAllowed(kind) {
+ switch (kind) {
+ case "loop": return allowLoop;
+ case "switch": return allowSwitch;
+ default: return false;
+ }
+ }
+
+ /**
+ * Checks whether a given name is a label of a loop or not.
+ *
+ * @param {string} label - A name of a label to check.
+ * @returns {boolean} `true` if the name is a label of a loop.
+ */
+ function getKind(label) {
+ let info = scopeInfo;
+
+ while (info) {
+ if (info.label === label) {
+ return info.kind;
+ }
+ info = info.upper;
+ }
+
+ /* istanbul ignore next: syntax error */
+ return "other";
+ }
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+ LabeledStatement(node) {
+ scopeInfo = {
+ label: node.label.name,
+ kind: getBodyKind(node.body),
+ upper: scopeInfo
+ };
+ },
+
+ "LabeledStatement:exit"(node) {
+ if (!isAllowed(scopeInfo.kind)) {
+ context.report({
+ node,
+ message: "Unexpected labeled statement."
+ });
+ }
+
+ scopeInfo = scopeInfo.upper;
+ },
+
+ BreakStatement(node) {
+ if (node.label && !isAllowed(getKind(node.label.name))) {
+ context.report({
+ node,
+ message: "Unexpected label in break statement."
+ });
+ }
+ },
+
+ ContinueStatement(node) {
+ if (node.label && !isAllowed(getKind(node.label.name))) {
+ context.report({
+ node,
+ message: "Unexpected label in continue statement."
+ });
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-lone-blocks.js b/tools/node_modules/eslint/lib/rules/no-lone-blocks.js
new file mode 100644
index 0000000000..2b5666e213
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-lone-blocks.js
@@ -0,0 +1,112 @@
+/**
+ * @fileoverview Rule to flag blocks with no reason to exist
+ * @author Brandon Mills
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow unnecessary nested blocks",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ // A stack of lone blocks to be checked for block-level bindings
+ const loneBlocks = [];
+ let ruleDef;
+
+ /**
+ * Reports a node as invalid.
+ * @param {ASTNode} node - The node to be reported.
+ * @returns {void}
+ */
+ function report(node) {
+ const message = node.parent.type === "BlockStatement" ? "Nested block is redundant." : "Block is redundant.";
+
+ context.report({ node, message });
+ }
+
+ /**
+ * Checks for any ocurrence of a BlockStatement in a place where lists of statements can appear
+ * @param {ASTNode} node The node to check
+ * @returns {boolean} True if the node is a lone block.
+ */
+ function isLoneBlock(node) {
+ return node.parent.type === "BlockStatement" ||
+ node.parent.type === "Program" ||
+
+ // Don't report blocks in switch cases if the block is the only statement of the case.
+ node.parent.type === "SwitchCase" && !(node.parent.consequent[0] === node && node.parent.consequent.length === 1);
+ }
+
+ /**
+ * Checks the enclosing block of the current node for block-level bindings,
+ * and "marks it" as valid if any.
+ * @returns {void}
+ */
+ function markLoneBlock() {
+ if (loneBlocks.length === 0) {
+ return;
+ }
+
+ const block = context.getAncestors().pop();
+
+ if (loneBlocks[loneBlocks.length - 1] === block) {
+ loneBlocks.pop();
+ }
+ }
+
+ // Default rule definition: report all lone blocks
+ ruleDef = {
+ BlockStatement(node) {
+ if (isLoneBlock(node)) {
+ report(node);
+ }
+ }
+ };
+
+ // ES6: report blocks without block-level bindings
+ if (context.parserOptions.ecmaVersion >= 6) {
+ ruleDef = {
+ BlockStatement(node) {
+ if (isLoneBlock(node)) {
+ loneBlocks.push(node);
+ }
+ },
+ "BlockStatement:exit"(node) {
+ if (loneBlocks.length > 0 && loneBlocks[loneBlocks.length - 1] === node) {
+ loneBlocks.pop();
+ report(node);
+ }
+ }
+ };
+
+ ruleDef.VariableDeclaration = function(node) {
+ if (node.kind === "let" || node.kind === "const") {
+ markLoneBlock();
+ }
+ };
+
+ ruleDef.FunctionDeclaration = function() {
+ if (context.getScope().isStrict) {
+ markLoneBlock();
+ }
+ };
+
+ ruleDef.ClassDeclaration = markLoneBlock;
+ }
+
+ return ruleDef;
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-lonely-if.js b/tools/node_modules/eslint/lib/rules/no-lonely-if.js
new file mode 100644
index 0000000000..db127d1945
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-lonely-if.js
@@ -0,0 +1,83 @@
+/**
+ * @fileoverview Rule to disallow if as the only statmenet in an else block
+ * @author Brandon Mills
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow `if` statements as the only statement in `else` blocks",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: [],
+
+ fixable: "code"
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+
+ return {
+ IfStatement(node) {
+ const ancestors = context.getAncestors(),
+ parent = ancestors.pop(),
+ grandparent = ancestors.pop();
+
+ if (parent && parent.type === "BlockStatement" &&
+ parent.body.length === 1 && grandparent &&
+ grandparent.type === "IfStatement" &&
+ parent === grandparent.alternate) {
+ context.report({
+ node,
+ message: "Unexpected if as the only statement in an else block.",
+ fix(fixer) {
+ const openingElseCurly = sourceCode.getFirstToken(parent);
+ const closingElseCurly = sourceCode.getLastToken(parent);
+ const elseKeyword = sourceCode.getTokenBefore(openingElseCurly);
+ const tokenAfterElseBlock = sourceCode.getTokenAfter(closingElseCurly);
+ const lastIfToken = sourceCode.getLastToken(node.consequent);
+ const sourceText = sourceCode.getText();
+
+ if (sourceText.slice(openingElseCurly.range[1],
+ node.range[0]).trim() || sourceText.slice(node.range[1], closingElseCurly.range[0]).trim()) {
+
+ // Don't fix if there are any non-whitespace characters interfering (e.g. comments)
+ return null;
+ }
+
+ if (
+ node.consequent.type !== "BlockStatement" && lastIfToken.value !== ";" && tokenAfterElseBlock &&
+ (
+ node.consequent.loc.end.line === tokenAfterElseBlock.loc.start.line ||
+ /^[([/+`-]/.test(tokenAfterElseBlock.value) ||
+ lastIfToken.value === "++" ||
+ lastIfToken.value === "--"
+ )
+ ) {
+
+ /*
+ * If the `if` statement has no block, and is not followed by a semicolon, make sure that fixing
+ * the issue would not change semantics due to ASI. If this would happen, don't do a fix.
+ */
+ return null;
+ }
+
+ return fixer.replaceTextRange(
+ [openingElseCurly.range[0], closingElseCurly.range[1]],
+ (elseKeyword.range[1] === openingElseCurly.range[0] ? " " : "") + sourceCode.getText(node)
+ );
+ }
+ });
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-loop-func.js b/tools/node_modules/eslint/lib/rules/no-loop-func.js
new file mode 100644
index 0000000000..c97e0c3c5a
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-loop-func.js
@@ -0,0 +1,201 @@
+/**
+ * @fileoverview Rule to flag creation of function inside a loop
+ * @author Ilya Volodin
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Gets the containing loop node of a specified node.
+ *
+ * We don't need to check nested functions, so this ignores those.
+ * `Scope.through` contains references of nested functions.
+ *
+ * @param {ASTNode} node - An AST node to get.
+ * @returns {ASTNode|null} The containing loop node of the specified node, or
+ * `null`.
+ */
+function getContainingLoopNode(node) {
+ let parent = node.parent;
+
+ while (parent) {
+ switch (parent.type) {
+ case "WhileStatement":
+ case "DoWhileStatement":
+ return parent;
+
+ case "ForStatement":
+
+ // `init` is outside of the loop.
+ if (parent.init !== node) {
+ return parent;
+ }
+ break;
+
+ case "ForInStatement":
+ case "ForOfStatement":
+
+ // `right` is outside of the loop.
+ if (parent.right !== node) {
+ return parent;
+ }
+ break;
+
+ case "ArrowFunctionExpression":
+ case "FunctionExpression":
+ case "FunctionDeclaration":
+
+ // We don't need to check nested functions.
+ return null;
+
+ default:
+ break;
+ }
+
+ node = parent;
+ parent = node.parent;
+ }
+
+ return null;
+}
+
+/**
+ * Gets the containing loop node of a given node.
+ * If the loop was nested, this returns the most outer loop.
+ *
+ * @param {ASTNode} node - A node to get. This is a loop node.
+ * @param {ASTNode|null} excludedNode - A node that the result node should not
+ * include.
+ * @returns {ASTNode} The most outer loop node.
+ */
+function getTopLoopNode(node, excludedNode) {
+ let retv = node;
+ const border = excludedNode ? excludedNode.range[1] : 0;
+
+ while (node && node.range[0] >= border) {
+ retv = node;
+ node = getContainingLoopNode(node);
+ }
+
+ return retv;
+}
+
+/**
+ * Checks whether a given reference which refers to an upper scope's variable is
+ * safe or not.
+ *
+ * @param {ASTNode} loopNode - A containing loop node.
+ * @param {eslint-scope.Reference} reference - A reference to check.
+ * @returns {boolean} `true` if the reference is safe or not.
+ */
+function isSafe(loopNode, reference) {
+ const variable = reference.resolved;
+ const definition = variable && variable.defs[0];
+ const declaration = definition && definition.parent;
+ const kind = (declaration && declaration.type === "VariableDeclaration")
+ ? declaration.kind
+ : "";
+
+ // Variables which are declared by `const` is safe.
+ if (kind === "const") {
+ return true;
+ }
+
+ /*
+ * Variables which are declared by `let` in the loop is safe.
+ * It's a different instance from the next loop step's.
+ */
+ if (kind === "let" &&
+ declaration.range[0] > loopNode.range[0] &&
+ declaration.range[1] < loopNode.range[1]
+ ) {
+ return true;
+ }
+
+ /*
+ * WriteReferences which exist after this border are unsafe because those
+ * can modify the variable.
+ */
+ const border = getTopLoopNode(
+ loopNode,
+ (kind === "let") ? declaration : null
+ ).range[0];
+
+ /**
+ * Checks whether a given reference is safe or not.
+ * The reference is every reference of the upper scope's variable we are
+ * looking now.
+ *
+ * It's safeafe if the reference matches one of the following condition.
+ * - is readonly.
+ * - doesn't exist inside a local function and after the border.
+ *
+ * @param {eslint-scope.Reference} upperRef - A reference to check.
+ * @returns {boolean} `true` if the reference is safe.
+ */
+ function isSafeReference(upperRef) {
+ const id = upperRef.identifier;
+
+ return (
+ !upperRef.isWrite() ||
+ variable.scope.variableScope === upperRef.from.variableScope &&
+ id.range[0] < border
+ );
+ }
+
+ return Boolean(variable) && variable.references.every(isSafeReference);
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow `function` declarations and expressions inside loop statements",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ /**
+ * Reports functions which match the following condition:
+ *
+ * - has a loop node in ancestors.
+ * - has any references which refers to an unsafe variable.
+ *
+ * @param {ASTNode} node The AST node to check.
+ * @returns {boolean} Whether or not the node is within a loop.
+ */
+ function checkForLoops(node) {
+ const loopNode = getContainingLoopNode(node);
+
+ if (!loopNode) {
+ return;
+ }
+
+ const references = context.getScope().through;
+
+ if (references.length > 0 &&
+ !references.every(isSafe.bind(null, loopNode))
+ ) {
+ context.report({ node, message: "Don't make functions within a loop." });
+ }
+ }
+
+ return {
+ ArrowFunctionExpression: checkForLoops,
+ FunctionExpression: checkForLoops,
+ FunctionDeclaration: checkForLoops
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-magic-numbers.js b/tools/node_modules/eslint/lib/rules/no-magic-numbers.js
new file mode 100644
index 0000000000..796ecff0f8
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-magic-numbers.js
@@ -0,0 +1,149 @@
+/**
+ * @fileoverview Rule to flag statements that use magic numbers (adapted from https://github.com/danielstjules/buddy.js)
+ * @author Vincent Lemeunier
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow magic numbers",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: [{
+ type: "object",
+ properties: {
+ detectObjects: {
+ type: "boolean"
+ },
+ enforceConst: {
+ type: "boolean"
+ },
+ ignore: {
+ type: "array",
+ items: {
+ type: "number"
+ },
+ uniqueItems: true
+ },
+ ignoreArrayIndexes: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }]
+ },
+
+ create(context) {
+ const config = context.options[0] || {},
+ detectObjects = !!config.detectObjects,
+ enforceConst = !!config.enforceConst,
+ ignore = config.ignore || [],
+ ignoreArrayIndexes = !!config.ignoreArrayIndexes;
+
+ /**
+ * Returns whether the node is number literal
+ * @param {Node} node - the node literal being evaluated
+ * @returns {boolean} true if the node is a number literal
+ */
+ function isNumber(node) {
+ return typeof node.value === "number";
+ }
+
+ /**
+ * Returns whether the number should be ignored
+ * @param {number} num - the number
+ * @returns {boolean} true if the number should be ignored
+ */
+ function shouldIgnoreNumber(num) {
+ return ignore.indexOf(num) !== -1;
+ }
+
+ /**
+ * Returns whether the number should be ignored when used as a radix within parseInt() or Number.parseInt()
+ * @param {ASTNode} parent - the non-"UnaryExpression" parent
+ * @param {ASTNode} node - the node literal being evaluated
+ * @returns {boolean} true if the number should be ignored
+ */
+ function shouldIgnoreParseInt(parent, node) {
+ return parent.type === "CallExpression" && node === parent.arguments[1] &&
+ (parent.callee.name === "parseInt" ||
+ parent.callee.type === "MemberExpression" &&
+ parent.callee.object.name === "Number" &&
+ parent.callee.property.name === "parseInt");
+ }
+
+ /**
+ * Returns whether the number should be ignored when used to define a JSX prop
+ * @param {ASTNode} parent - the non-"UnaryExpression" parent
+ * @returns {boolean} true if the number should be ignored
+ */
+ function shouldIgnoreJSXNumbers(parent) {
+ return parent.type.indexOf("JSX") === 0;
+ }
+
+ /**
+ * Returns whether the number should be ignored when used as an array index with enabled 'ignoreArrayIndexes' option.
+ * @param {ASTNode} parent - the non-"UnaryExpression" parent.
+ * @returns {boolean} true if the number should be ignored
+ */
+ function shouldIgnoreArrayIndexes(parent) {
+ return parent.type === "MemberExpression" && ignoreArrayIndexes;
+ }
+
+ return {
+ Literal(node) {
+ let parent = node.parent,
+ value = node.value,
+ raw = node.raw;
+ const okTypes = detectObjects ? [] : ["ObjectExpression", "Property", "AssignmentExpression"];
+
+ if (!isNumber(node)) {
+ return;
+ }
+
+ // For negative magic numbers: update the value and parent node
+ if (parent.type === "UnaryExpression" && parent.operator === "-") {
+ node = parent;
+ parent = node.parent;
+ value = -value;
+ raw = `-${raw}`;
+ }
+
+ if (shouldIgnoreNumber(value) ||
+ shouldIgnoreParseInt(parent, node) ||
+ shouldIgnoreArrayIndexes(parent) ||
+ shouldIgnoreJSXNumbers(parent)) {
+ return;
+ }
+
+ if (parent.type === "VariableDeclarator") {
+ if (enforceConst && parent.parent.kind !== "const") {
+ context.report({
+ node,
+ message: "Number constants declarations must use 'const'."
+ });
+ }
+ } else if (
+ okTypes.indexOf(parent.type) === -1 ||
+ (parent.type === "AssignmentExpression" && parent.left.type === "Identifier")
+ ) {
+ context.report({
+ node,
+ message: "No magic number: {{raw}}.",
+ data: {
+ raw
+ }
+ });
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-mixed-operators.js b/tools/node_modules/eslint/lib/rules/no-mixed-operators.js
new file mode 100644
index 0000000000..9f1fbc9a6d
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-mixed-operators.js
@@ -0,0 +1,209 @@
+/**
+ * @fileoverview Rule to disallow mixed binary operators.
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils.js");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+const ARITHMETIC_OPERATORS = ["+", "-", "*", "/", "%", "**"];
+const BITWISE_OPERATORS = ["&", "|", "^", "~", "<<", ">>", ">>>"];
+const COMPARISON_OPERATORS = ["==", "!=", "===", "!==", ">", ">=", "<", "<="];
+const LOGICAL_OPERATORS = ["&&", "||"];
+const RELATIONAL_OPERATORS = ["in", "instanceof"];
+const ALL_OPERATORS = [].concat(
+ ARITHMETIC_OPERATORS,
+ BITWISE_OPERATORS,
+ COMPARISON_OPERATORS,
+ LOGICAL_OPERATORS,
+ RELATIONAL_OPERATORS
+);
+const DEFAULT_GROUPS = [
+ ARITHMETIC_OPERATORS,
+ BITWISE_OPERATORS,
+ COMPARISON_OPERATORS,
+ LOGICAL_OPERATORS,
+ RELATIONAL_OPERATORS
+];
+const TARGET_NODE_TYPE = /^(?:Binary|Logical)Expression$/;
+
+/**
+ * Normalizes options.
+ *
+ * @param {Object|undefined} options - A options object to normalize.
+ * @returns {Object} Normalized option object.
+ */
+function normalizeOptions(options) {
+ const hasGroups = (options && options.groups && options.groups.length > 0);
+ const groups = hasGroups ? options.groups : DEFAULT_GROUPS;
+ const allowSamePrecedence = (options && options.allowSamePrecedence) !== false;
+
+ return {
+ groups,
+ allowSamePrecedence
+ };
+}
+
+/**
+ * Checks whether any group which includes both given operator exists or not.
+ *
+ * @param {Array.<string[]>} groups - A list of groups to check.
+ * @param {string} left - An operator.
+ * @param {string} right - Another operator.
+ * @returns {boolean} `true` if such group existed.
+ */
+function includesBothInAGroup(groups, left, right) {
+ return groups.some(group => group.indexOf(left) !== -1 && group.indexOf(right) !== -1);
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow mixed binary operators",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+ schema: [
+ {
+ type: "object",
+ properties: {
+ groups: {
+ type: "array",
+ items: {
+ type: "array",
+ items: { enum: ALL_OPERATORS },
+ minItems: 2,
+ uniqueItems: true
+ },
+ uniqueItems: true
+ },
+ allowSamePrecedence: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+ const options = normalizeOptions(context.options[0]);
+
+ /**
+ * Checks whether a given node should be ignored by options or not.
+ *
+ * @param {ASTNode} node - A node to check. This is a BinaryExpression
+ * node or a LogicalExpression node. This parent node is one of
+ * them, too.
+ * @returns {boolean} `true` if the node should be ignored.
+ */
+ function shouldIgnore(node) {
+ const a = node;
+ const b = node.parent;
+
+ return (
+ !includesBothInAGroup(options.groups, a.operator, b.operator) ||
+ (
+ options.allowSamePrecedence &&
+ astUtils.getPrecedence(a) === astUtils.getPrecedence(b)
+ )
+ );
+ }
+
+ /**
+ * Checks whether the operator of a given node is mixed with parent
+ * node's operator or not.
+ *
+ * @param {ASTNode} node - A node to check. This is a BinaryExpression
+ * node or a LogicalExpression node. This parent node is one of
+ * them, too.
+ * @returns {boolean} `true` if the node was mixed.
+ */
+ function isMixedWithParent(node) {
+ return (
+ node.operator !== node.parent.operator &&
+ !astUtils.isParenthesised(sourceCode, node)
+ );
+ }
+
+ /**
+ * Gets the operator token of a given node.
+ *
+ * @param {ASTNode} node - A node to check. This is a BinaryExpression
+ * node or a LogicalExpression node.
+ * @returns {Token} The operator token of the node.
+ */
+ function getOperatorToken(node) {
+ return sourceCode.getTokenAfter(node.left, astUtils.isNotClosingParenToken);
+ }
+
+ /**
+ * Reports both the operator of a given node and the operator of the
+ * parent node.
+ *
+ * @param {ASTNode} node - A node to check. This is a BinaryExpression
+ * node or a LogicalExpression node. This parent node is one of
+ * them, too.
+ * @returns {void}
+ */
+ function reportBothOperators(node) {
+ const parent = node.parent;
+ const left = (parent.left === node) ? node : parent;
+ const right = (parent.left !== node) ? node : parent;
+ const message =
+ "Unexpected mix of '{{leftOperator}}' and '{{rightOperator}}'.";
+ const data = {
+ leftOperator: left.operator,
+ rightOperator: right.operator
+ };
+
+ context.report({
+ node: left,
+ loc: getOperatorToken(left).loc.start,
+ message,
+ data
+ });
+ context.report({
+ node: right,
+ loc: getOperatorToken(right).loc.start,
+ message,
+ data
+ });
+ }
+
+ /**
+ * Checks between the operator of this node and the operator of the
+ * parent node.
+ *
+ * @param {ASTNode} node - A node to check.
+ * @returns {void}
+ */
+ function check(node) {
+ if (TARGET_NODE_TYPE.test(node.parent.type) &&
+ isMixedWithParent(node) &&
+ !shouldIgnore(node)
+ ) {
+ reportBothOperators(node);
+ }
+ }
+
+ return {
+ BinaryExpression: check,
+ LogicalExpression: check
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-mixed-requires.js b/tools/node_modules/eslint/lib/rules/no-mixed-requires.js
new file mode 100644
index 0000000000..171052a52a
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-mixed-requires.js
@@ -0,0 +1,220 @@
+/**
+ * @fileoverview Rule to enforce grouped require statements for Node.JS
+ * @author Raphael Pigulla
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow `require` calls to be mixed with regular variable declarations",
+ category: "Node.js and CommonJS",
+ recommended: false
+ },
+
+ schema: [
+ {
+ oneOf: [
+ {
+ type: "boolean"
+ },
+ {
+ type: "object",
+ properties: {
+ grouping: {
+ type: "boolean"
+ },
+ allowCall: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ }
+ ]
+ },
+
+ create(context) {
+
+ const options = context.options[0];
+ let grouping = false,
+ allowCall = false;
+
+ if (typeof options === "object") {
+ grouping = options.grouping;
+ allowCall = options.allowCall;
+ } else {
+ grouping = !!options;
+ }
+
+ /**
+ * Returns the list of built-in modules.
+ *
+ * @returns {string[]} An array of built-in Node.js modules.
+ */
+ function getBuiltinModules() {
+
+ /*
+ * This list is generated using:
+ * `require("repl")._builtinLibs.concat('repl').sort()`
+ * This particular list is as per nodejs v0.12.2 and iojs v0.7.1
+ */
+ return [
+ "assert", "buffer", "child_process", "cluster", "crypto",
+ "dgram", "dns", "domain", "events", "fs", "http", "https",
+ "net", "os", "path", "punycode", "querystring", "readline",
+ "repl", "smalloc", "stream", "string_decoder", "tls", "tty",
+ "url", "util", "v8", "vm", "zlib"
+ ];
+ }
+
+ const BUILTIN_MODULES = getBuiltinModules();
+
+ const DECL_REQUIRE = "require",
+ DECL_UNINITIALIZED = "uninitialized",
+ DECL_OTHER = "other";
+
+ const REQ_CORE = "core",
+ REQ_FILE = "file",
+ REQ_MODULE = "module",
+ REQ_COMPUTED = "computed";
+
+ /**
+ * Determines the type of a declaration statement.
+ * @param {ASTNode} initExpression The init node of the VariableDeclarator.
+ * @returns {string} The type of declaration represented by the expression.
+ */
+ function getDeclarationType(initExpression) {
+ if (!initExpression) {
+
+ // "var x;"
+ return DECL_UNINITIALIZED;
+ }
+
+ if (initExpression.type === "CallExpression" &&
+ initExpression.callee.type === "Identifier" &&
+ initExpression.callee.name === "require"
+ ) {
+
+ // "var x = require('util');"
+ return DECL_REQUIRE;
+ }
+ if (allowCall &&
+ initExpression.type === "CallExpression" &&
+ initExpression.callee.type === "CallExpression"
+ ) {
+
+ // "var x = require('diagnose')('sub-module');"
+ return getDeclarationType(initExpression.callee);
+ }
+ if (initExpression.type === "MemberExpression") {
+
+ // "var x = require('glob').Glob;"
+ return getDeclarationType(initExpression.object);
+ }
+
+ // "var x = 42;"
+ return DECL_OTHER;
+ }
+
+ /**
+ * Determines the type of module that is loaded via require.
+ * @param {ASTNode} initExpression The init node of the VariableDeclarator.
+ * @returns {string} The module type.
+ */
+ function inferModuleType(initExpression) {
+ if (initExpression.type === "MemberExpression") {
+
+ // "var x = require('glob').Glob;"
+ return inferModuleType(initExpression.object);
+ }
+ if (initExpression.arguments.length === 0) {
+
+ // "var x = require();"
+ return REQ_COMPUTED;
+ }
+
+ const arg = initExpression.arguments[0];
+
+ if (arg.type !== "Literal" || typeof arg.value !== "string") {
+
+ // "var x = require(42);"
+ return REQ_COMPUTED;
+ }
+
+ if (BUILTIN_MODULES.indexOf(arg.value) !== -1) {
+
+ // "var fs = require('fs');"
+ return REQ_CORE;
+ }
+ if (/^\.{0,2}\//.test(arg.value)) {
+
+ // "var utils = require('./utils');"
+ return REQ_FILE;
+ }
+
+ // "var async = require('async');"
+ return REQ_MODULE;
+
+ }
+
+ /**
+ * Check if the list of variable declarations is mixed, i.e. whether it
+ * contains both require and other declarations.
+ * @param {ASTNode} declarations The list of VariableDeclarators.
+ * @returns {boolean} True if the declarations are mixed, false if not.
+ */
+ function isMixed(declarations) {
+ const contains = {};
+
+ declarations.forEach(declaration => {
+ const type = getDeclarationType(declaration.init);
+
+ contains[type] = true;
+ });
+
+ return !!(
+ contains[DECL_REQUIRE] &&
+ (contains[DECL_UNINITIALIZED] || contains[DECL_OTHER])
+ );
+ }
+
+ /**
+ * Check if all require declarations in the given list are of the same
+ * type.
+ * @param {ASTNode} declarations The list of VariableDeclarators.
+ * @returns {boolean} True if the declarations are grouped, false if not.
+ */
+ function isGrouped(declarations) {
+ const found = {};
+
+ declarations.forEach(declaration => {
+ if (getDeclarationType(declaration.init) === DECL_REQUIRE) {
+ found[inferModuleType(declaration.init)] = true;
+ }
+ });
+
+ return Object.keys(found).length <= 1;
+ }
+
+
+ return {
+
+ VariableDeclaration(node) {
+
+ if (isMixed(node.declarations)) {
+ context.report({ node, message: "Do not mix 'require' and other declarations." });
+ } else if (grouping && !isGrouped(node.declarations)) {
+ context.report({ node, message: "Do not mix core, module, file and computed requires." });
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-mixed-spaces-and-tabs.js b/tools/node_modules/eslint/lib/rules/no-mixed-spaces-and-tabs.js
new file mode 100644
index 0000000000..2b8e89d3c8
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-mixed-spaces-and-tabs.js
@@ -0,0 +1,143 @@
+/**
+ * @fileoverview Disallow mixed spaces and tabs for indentation
+ * @author Jary Niebur
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow mixed spaces and tabs for indentation",
+ category: "Stylistic Issues",
+ recommended: true
+ },
+
+ schema: [
+ {
+ enum: ["smart-tabs", true, false]
+ }
+ ]
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+
+ let smartTabs;
+ const ignoredLocs = [];
+
+ switch (context.options[0]) {
+ case true: // Support old syntax, maybe add deprecation warning here
+ case "smart-tabs":
+ smartTabs = true;
+ break;
+ default:
+ smartTabs = false;
+ }
+
+ /**
+ * Determines if a given line and column are before a location.
+ * @param {Location} loc The location object from an AST node.
+ * @param {int} line The line to check.
+ * @param {int} column The column to check.
+ * @returns {boolean} True if the line and column are before the location, false if not.
+ * @private
+ */
+ function beforeLoc(loc, line, column) {
+ if (line < loc.start.line) {
+ return true;
+ }
+ return line === loc.start.line && column < loc.start.column;
+ }
+
+ /**
+ * Determines if a given line and column are after a location.
+ * @param {Location} loc The location object from an AST node.
+ * @param {int} line The line to check.
+ * @param {int} column The column to check.
+ * @returns {boolean} True if the line and column are after the location, false if not.
+ * @private
+ */
+ function afterLoc(loc, line, column) {
+ if (line > loc.end.line) {
+ return true;
+ }
+ return line === loc.end.line && column > loc.end.column;
+ }
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+
+ TemplateElement(node) {
+ ignoredLocs.push(node.loc);
+ },
+
+ "Program:exit"(node) {
+
+ /*
+ * At least one space followed by a tab
+ * or the reverse before non-tab/-space
+ * characters begin.
+ */
+ let regex = /^(?=[\t ]*(\t | \t))/;
+ const lines = sourceCode.lines,
+ comments = sourceCode.getAllComments();
+
+ comments.forEach(comment => {
+ ignoredLocs.push(comment.loc);
+ });
+
+ ignoredLocs.sort((first, second) => {
+ if (beforeLoc(first, second.start.line, second.start.column)) {
+ return 1;
+ }
+
+ if (beforeLoc(second, first.start.line, second.start.column)) {
+ return -1;
+ }
+
+ return 0;
+ });
+
+ if (smartTabs) {
+
+ /*
+ * At least one space followed by a tab
+ * before non-tab/-space characters begin.
+ */
+ regex = /^(?=[\t ]* \t)/;
+ }
+
+ lines.forEach((line, i) => {
+ const match = regex.exec(line);
+
+ if (match) {
+ const lineNumber = i + 1,
+ column = match.index + 1;
+
+ for (let j = 0; j < ignoredLocs.length; j++) {
+ if (beforeLoc(ignoredLocs[j], lineNumber, column)) {
+ continue;
+ }
+ if (afterLoc(ignoredLocs[j], lineNumber, column)) {
+ continue;
+ }
+
+ return;
+ }
+
+ context.report({ node, loc: { line: lineNumber, column }, message: "Mixed spaces and tabs." });
+ }
+ });
+ }
+
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-multi-assign.js b/tools/node_modules/eslint/lib/rules/no-multi-assign.js
new file mode 100644
index 0000000000..164869f6dd
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-multi-assign.js
@@ -0,0 +1,41 @@
+/**
+ * @fileoverview Rule to check use of chained assignment expressions
+ * @author Stewart Rand
+ */
+
+"use strict";
+
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow use of chained assignment expressions",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+ schema: []
+ },
+
+ create(context) {
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+ AssignmentExpression(node) {
+ if (["AssignmentExpression", "VariableDeclarator"].indexOf(node.parent.type) !== -1) {
+ context.report({
+ node,
+ message: "Unexpected chained assignment."
+ });
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-multi-spaces.js b/tools/node_modules/eslint/lib/rules/no-multi-spaces.js
new file mode 100644
index 0000000000..84f1b50189
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-multi-spaces.js
@@ -0,0 +1,130 @@
+/**
+ * @fileoverview Disallow use of multiple spaces.
+ * @author Nicholas C. Zakas
+ */
+
+"use strict";
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow multiple spaces",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ fixable: "whitespace",
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ exceptions: {
+ type: "object",
+ patternProperties: {
+ "^([A-Z][a-z]*)+$": {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ },
+ ignoreEOLComments: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+ const options = context.options[0] || {};
+ const ignoreEOLComments = options.ignoreEOLComments;
+ const exceptions = Object.assign({ Property: true }, options.exceptions);
+ const hasExceptions = Object.keys(exceptions).filter(key => exceptions[key]).length > 0;
+
+ /**
+ * Formats value of given comment token for error message by truncating its length.
+ * @param {Token} token comment token
+ * @returns {string} formatted value
+ * @private
+ */
+ function formatReportedCommentValue(token) {
+ const valueLines = token.value.split("\n");
+ const value = valueLines[0];
+ const formattedValue = `${value.slice(0, 12)}...`;
+
+ return valueLines.length === 1 && value.length <= 12 ? value : formattedValue;
+ }
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+ Program() {
+ sourceCode.tokensAndComments.forEach((leftToken, leftIndex, tokensAndComments) => {
+ if (leftIndex === tokensAndComments.length - 1) {
+ return;
+ }
+ const rightToken = tokensAndComments[leftIndex + 1];
+
+ // Ignore tokens that don't have 2 spaces between them or are on different lines
+ if (
+ !sourceCode.text.slice(leftToken.range[1], rightToken.range[0]).includes(" ") ||
+ leftToken.loc.end.line < rightToken.loc.start.line
+ ) {
+ return;
+ }
+
+ // Ignore comments that are the last token on their line if `ignoreEOLComments` is active.
+ if (
+ ignoreEOLComments &&
+ astUtils.isCommentToken(rightToken) &&
+ (
+ leftIndex === tokensAndComments.length - 2 ||
+ rightToken.loc.end.line < tokensAndComments[leftIndex + 2].loc.start.line
+ )
+ ) {
+ return;
+ }
+
+ // Ignore tokens that are in a node in the "exceptions" object
+ if (hasExceptions) {
+ const parentNode = sourceCode.getNodeByRangeIndex(rightToken.range[0] - 1);
+
+ if (parentNode && exceptions[parentNode.type]) {
+ return;
+ }
+ }
+
+ let displayValue;
+
+ if (rightToken.type === "Block") {
+ displayValue = `/*${formatReportedCommentValue(rightToken)}*/`;
+ } else if (rightToken.type === "Line") {
+ displayValue = `//${formatReportedCommentValue(rightToken)}`;
+ } else {
+ displayValue = rightToken.value;
+ }
+
+ context.report({
+ node: rightToken,
+ loc: rightToken.loc.start,
+ message: "Multiple spaces found before '{{displayValue}}'.",
+ data: { displayValue },
+ fix: fixer => fixer.replaceTextRange([leftToken.range[1], rightToken.range[0]], " ")
+ });
+ });
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-multi-str.js b/tools/node_modules/eslint/lib/rules/no-multi-str.js
new file mode 100644
index 0000000000..76f29cbb5a
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-multi-str.js
@@ -0,0 +1,55 @@
+/**
+ * @fileoverview Rule to flag when using multiline strings
+ * @author Ilya Volodin
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow multiline strings",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ /**
+ * Determines if a given node is part of JSX syntax.
+ * @param {ASTNode} node The node to check.
+ * @returns {boolean} True if the node is a JSX node, false if not.
+ * @private
+ */
+ function isJSXElement(node) {
+ return node.type.indexOf("JSX") === 0;
+ }
+
+ //--------------------------------------------------------------------------
+ // Public API
+ //--------------------------------------------------------------------------
+
+ return {
+
+ Literal(node) {
+ if (astUtils.LINEBREAK_MATCHER.test(node.raw) && !isJSXElement(node.parent)) {
+ context.report({ node, message: "Multiline support is limited to browsers supporting ES5 only." });
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-multiple-empty-lines.js b/tools/node_modules/eslint/lib/rules/no-multiple-empty-lines.js
new file mode 100644
index 0000000000..9d1067c205
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-multiple-empty-lines.js
@@ -0,0 +1,136 @@
+/**
+ * @fileoverview Disallows multiple blank lines.
+ * implementation adapted from the no-trailing-spaces rule.
+ * @author Greg Cochard
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow multiple empty lines",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ fixable: "whitespace",
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ max: {
+ type: "integer",
+ minimum: 0
+ },
+ maxEOF: {
+ type: "integer",
+ minimum: 0
+ },
+ maxBOF: {
+ type: "integer",
+ minimum: 0
+ }
+ },
+ required: ["max"],
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+
+ // Use options.max or 2 as default
+ let max = 2,
+ maxEOF = max,
+ maxBOF = max;
+
+ if (context.options.length) {
+ max = context.options[0].max;
+ maxEOF = typeof context.options[0].maxEOF !== "undefined" ? context.options[0].maxEOF : max;
+ maxBOF = typeof context.options[0].maxBOF !== "undefined" ? context.options[0].maxBOF : max;
+ }
+
+ const sourceCode = context.getSourceCode();
+
+ // Swallow the final newline, as some editors add it automatically and we don't want it to cause an issue
+ const allLines = sourceCode.lines[sourceCode.lines.length - 1] === "" ? sourceCode.lines.slice(0, -1) : sourceCode.lines;
+ const templateLiteralLines = new Set();
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+ TemplateLiteral(node) {
+ node.quasis.forEach(literalPart => {
+
+ // Empty lines have a semantic meaning if they're inside template literals. Don't count these as empty lines.
+ for (let ignoredLine = literalPart.loc.start.line; ignoredLine < literalPart.loc.end.line; ignoredLine++) {
+ templateLiteralLines.add(ignoredLine);
+ }
+ });
+ },
+ "Program:exit"(node) {
+ return allLines
+
+ // Given a list of lines, first get a list of line numbers that are non-empty.
+ .reduce((nonEmptyLineNumbers, line, index) => {
+ if (line.trim() || templateLiteralLines.has(index + 1)) {
+ nonEmptyLineNumbers.push(index + 1);
+ }
+ return nonEmptyLineNumbers;
+ }, [])
+
+ // Add a value at the end to allow trailing empty lines to be checked.
+ .concat(allLines.length + 1)
+
+ // Given two line numbers of non-empty lines, report the lines between if the difference is too large.
+ .reduce((lastLineNumber, lineNumber) => {
+ let message, maxAllowed;
+
+ if (lastLineNumber === 0) {
+ message = "Too many blank lines at the beginning of file. Max of {{max}} allowed.";
+ maxAllowed = maxBOF;
+ } else if (lineNumber === allLines.length + 1) {
+ message = "Too many blank lines at the end of file. Max of {{max}} allowed.";
+ maxAllowed = maxEOF;
+ } else {
+ message = "More than {{max}} blank {{pluralizedLines}} not allowed.";
+ maxAllowed = max;
+ }
+
+ if (lineNumber - lastLineNumber - 1 > maxAllowed) {
+ context.report({
+ node,
+ loc: { start: { line: lastLineNumber + 1, column: 0 }, end: { line: lineNumber, column: 0 } },
+ message,
+ data: { max: maxAllowed, pluralizedLines: maxAllowed === 1 ? "line" : "lines" },
+ fix(fixer) {
+ const rangeStart = sourceCode.getIndexFromLoc({ line: lastLineNumber + 1, column: 0 });
+
+ /*
+ * The end of the removal range is usually the start index of the next line.
+ * However, at the end of the file there is no next line, so the end of the
+ * range is just the length of the text.
+ */
+ const lineNumberAfterRemovedLines = lineNumber - maxAllowed;
+ const rangeEnd = lineNumberAfterRemovedLines <= allLines.length
+ ? sourceCode.getIndexFromLoc({ line: lineNumberAfterRemovedLines, column: 0 })
+ : sourceCode.text.length;
+
+ return fixer.removeRange([rangeStart, rangeEnd]);
+ }
+ });
+ }
+
+ return lineNumber;
+ }, 0);
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-native-reassign.js b/tools/node_modules/eslint/lib/rules/no-native-reassign.js
new file mode 100644
index 0000000000..a60d4e499c
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-native-reassign.js
@@ -0,0 +1,89 @@
+/**
+ * @fileoverview Rule to disallow assignments to native objects or read-only global variables
+ * @author Ilya Volodin
+ * @deprecated in ESLint v3.3.0
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow assignments to native objects or read-only global variables",
+ category: "Best Practices",
+ recommended: false,
+ replacedBy: ["no-global-assign"]
+ },
+
+ deprecated: true,
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ exceptions: {
+ type: "array",
+ items: { type: "string" },
+ uniqueItems: true
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+ const config = context.options[0];
+ const exceptions = (config && config.exceptions) || [];
+
+ /**
+ * Reports write references.
+ * @param {Reference} reference - A reference to check.
+ * @param {int} index - The index of the reference in the references.
+ * @param {Reference[]} references - The array that the reference belongs to.
+ * @returns {void}
+ */
+ function checkReference(reference, index, references) {
+ const identifier = reference.identifier;
+
+ if (reference.init === false &&
+ reference.isWrite() &&
+
+ /*
+ * Destructuring assignments can have multiple default value,
+ * so possibly there are multiple writeable references for the same identifier.
+ */
+ (index === 0 || references[index - 1].identifier !== identifier)
+ ) {
+ context.report({
+ node: identifier,
+ message: "Read-only global '{{name}}' should not be modified.",
+ data: identifier
+ });
+ }
+ }
+
+ /**
+ * Reports write references if a given variable is read-only builtin.
+ * @param {Variable} variable - A variable to check.
+ * @returns {void}
+ */
+ function checkVariable(variable) {
+ if (variable.writeable === false && exceptions.indexOf(variable.name) === -1) {
+ variable.references.forEach(checkReference);
+ }
+ }
+
+ return {
+ Program() {
+ const globalScope = context.getScope();
+
+ globalScope.variables.forEach(checkVariable);
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-negated-condition.js b/tools/node_modules/eslint/lib/rules/no-negated-condition.js
new file mode 100644
index 0000000000..8ea8559ea1
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-negated-condition.js
@@ -0,0 +1,82 @@
+/**
+ * @fileoverview Rule to disallow a negated condition
+ * @author Alberto Rodríguez
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow negated conditions",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ /**
+ * Determines if a given node is an if-else without a condition on the else
+ * @param {ASTNode} node The node to check.
+ * @returns {boolean} True if the node has an else without an if.
+ * @private
+ */
+ function hasElseWithoutCondition(node) {
+ return node.alternate && node.alternate.type !== "IfStatement";
+ }
+
+ /**
+ * Determines if a given node is a negated unary expression
+ * @param {Object} test The test object to check.
+ * @returns {boolean} True if the node is a negated unary expression.
+ * @private
+ */
+ function isNegatedUnaryExpression(test) {
+ return test.type === "UnaryExpression" && test.operator === "!";
+ }
+
+ /**
+ * Determines if a given node is a negated binary expression
+ * @param {Test} test The test to check.
+ * @returns {boolean} True if the node is a negated binary expression.
+ * @private
+ */
+ function isNegatedBinaryExpression(test) {
+ return test.type === "BinaryExpression" &&
+ (test.operator === "!=" || test.operator === "!==");
+ }
+
+ /**
+ * Determines if a given node has a negated if expression
+ * @param {ASTNode} node The node to check.
+ * @returns {boolean} True if the node has a negated if expression.
+ * @private
+ */
+ function isNegatedIf(node) {
+ return isNegatedUnaryExpression(node.test) || isNegatedBinaryExpression(node.test);
+ }
+
+ return {
+ IfStatement(node) {
+ if (!hasElseWithoutCondition(node)) {
+ return;
+ }
+
+ if (isNegatedIf(node)) {
+ context.report({ node, message: "Unexpected negated condition." });
+ }
+ },
+ ConditionalExpression(node) {
+ if (isNegatedIf(node)) {
+ context.report({ node, message: "Unexpected negated condition." });
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-negated-in-lhs.js b/tools/node_modules/eslint/lib/rules/no-negated-in-lhs.js
new file mode 100644
index 0000000000..495cbc160e
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-negated-in-lhs.js
@@ -0,0 +1,38 @@
+/**
+ * @fileoverview A rule to disallow negated left operands of the `in` operator
+ * @author Michael Ficarra
+ * @deprecated in ESLint v3.3.0
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow negating the left operand in `in` expressions",
+ category: "Possible Errors",
+ recommended: false,
+ replacedBy: ["no-unsafe-negation"]
+ },
+ deprecated: true,
+
+ schema: []
+ },
+
+ create(context) {
+
+ return {
+
+ BinaryExpression(node) {
+ if (node.operator === "in" && node.left.type === "UnaryExpression" && node.left.operator === "!") {
+ context.report({ node, message: "The 'in' expression's left operand is negated." });
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-nested-ternary.js b/tools/node_modules/eslint/lib/rules/no-nested-ternary.js
new file mode 100644
index 0000000000..4fe49fc9c0
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-nested-ternary.js
@@ -0,0 +1,34 @@
+/**
+ * @fileoverview Rule to flag nested ternary expressions
+ * @author Ian Christian Myers
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow nested ternary expressions",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ return {
+ ConditionalExpression(node) {
+ if (node.alternate.type === "ConditionalExpression" ||
+ node.consequent.type === "ConditionalExpression") {
+ context.report({ node, message: "Do not nest ternary expressions." });
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-new-func.js b/tools/node_modules/eslint/lib/rules/no-new-func.js
new file mode 100644
index 0000000000..6abbe8391d
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-new-func.js
@@ -0,0 +1,45 @@
+/**
+ * @fileoverview Rule to flag when using new Function
+ * @author Ilya Volodin
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow `new` operators with the `Function` object",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ /**
+ * Reports a node.
+ * @param {ASTNode} node The node to report
+ * @returns {void}
+ * @private
+ */
+ function report(node) {
+ context.report({ node, message: "The Function constructor is eval." });
+ }
+
+ return {
+ "NewExpression[callee.name = 'Function']": report,
+ "CallExpression[callee.name = 'Function']": report
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-new-object.js b/tools/node_modules/eslint/lib/rules/no-new-object.js
new file mode 100644
index 0000000000..d4d77b5514
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-new-object.js
@@ -0,0 +1,35 @@
+/**
+ * @fileoverview A rule to disallow calls to the Object constructor
+ * @author Matt DuVall <http://www.mattduvall.com/>
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow `Object` constructors",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ return {
+
+ NewExpression(node) {
+ if (node.callee.name === "Object") {
+ context.report({ node, message: "The object literal notation {} is preferrable." });
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-new-require.js b/tools/node_modules/eslint/lib/rules/no-new-require.js
new file mode 100644
index 0000000000..f9ea1f84bf
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-new-require.js
@@ -0,0 +1,35 @@
+/**
+ * @fileoverview Rule to disallow use of new operator with the `require` function
+ * @author Wil Moore III
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow `new` operators with calls to `require`",
+ category: "Node.js and CommonJS",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ return {
+
+ NewExpression(node) {
+ if (node.callee.type === "Identifier" && node.callee.name === "require") {
+ context.report({ node, message: "Unexpected use of new with require." });
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-new-symbol.js b/tools/node_modules/eslint/lib/rules/no-new-symbol.js
new file mode 100644
index 0000000000..5743a4748a
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-new-symbol.js
@@ -0,0 +1,43 @@
+/**
+ * @fileoverview Rule to disallow use of the new operator with the `Symbol` object
+ * @author Alberto Rodríguez
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow `new` operators with the `Symbol` object",
+ category: "ECMAScript 6",
+ recommended: true
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ return {
+ "Program:exit"() {
+ const globalScope = context.getScope();
+ const variable = globalScope.set.get("Symbol");
+
+ if (variable && variable.defs.length === 0) {
+ variable.references.forEach(ref => {
+ const node = ref.identifier;
+
+ if (node.parent && node.parent.type === "NewExpression") {
+ context.report({ node, message: "`Symbol` cannot be called as a constructor." });
+ }
+ });
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-new-wrappers.js b/tools/node_modules/eslint/lib/rules/no-new-wrappers.js
new file mode 100644
index 0000000000..65bf79b87c
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-new-wrappers.js
@@ -0,0 +1,37 @@
+/**
+ * @fileoverview Rule to flag when using constructor for wrapper objects
+ * @author Ilya Volodin
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow `new` operators with the `String`, `Number`, and `Boolean` objects",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ return {
+
+ NewExpression(node) {
+ const wrapperObjects = ["String", "Number", "Boolean", "Math", "JSON"];
+
+ if (wrapperObjects.indexOf(node.callee.name) > -1) {
+ context.report({ node, message: "Do not use {{fn}} as a constructor.", data: { fn: node.callee.name } });
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-new.js b/tools/node_modules/eslint/lib/rules/no-new.js
new file mode 100644
index 0000000000..6e6025aac5
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-new.js
@@ -0,0 +1,33 @@
+/**
+ * @fileoverview Rule to flag statements with function invocation preceded by
+ * "new" and not part of assignment
+ * @author Ilya Volodin
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow `new` operators outside of assignments or comparisons",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ return {
+ "ExpressionStatement > NewExpression"(node) {
+ context.report({ node: node.parent, message: "Do not use 'new' for side effects." });
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-obj-calls.js b/tools/node_modules/eslint/lib/rules/no-obj-calls.js
new file mode 100644
index 0000000000..0ca8a5effb
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-obj-calls.js
@@ -0,0 +1,39 @@
+/**
+ * @fileoverview Rule to flag use of an object property of the global object (Math and JSON) as a function
+ * @author James Allardice
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow calling global object properties as functions",
+ category: "Possible Errors",
+ recommended: true
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ return {
+ CallExpression(node) {
+
+ if (node.callee.type === "Identifier") {
+ const name = node.callee.name;
+
+ if (name === "Math" || name === "JSON" || name === "Reflect") {
+ context.report({ node, message: "'{{name}}' is not a function.", data: { name } });
+ }
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-octal-escape.js b/tools/node_modules/eslint/lib/rules/no-octal-escape.js
new file mode 100644
index 0000000000..04bfb6aae3
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-octal-escape.js
@@ -0,0 +1,47 @@
+/**
+ * @fileoverview Rule to flag octal escape sequences in string literals.
+ * @author Ian Christian Myers
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow octal escape sequences in string literals",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ return {
+
+ Literal(node) {
+ if (typeof node.value !== "string") {
+ return;
+ }
+
+ const match = node.raw.match(/^([^\\]|\\[^0-7])*\\([0-3][0-7]{1,2}|[4-7][0-7]|[0-7])/);
+
+ if (match) {
+ const octalDigit = match[2];
+
+ // \0 is actually not considered an octal
+ if (match[2] !== "0" || typeof match[3] !== "undefined") {
+ context.report({ node, message: "Don't use octal: '\\{{octalDigit}}'. Use '\\u....' instead.", data: { octalDigit } });
+ }
+ }
+ }
+
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-octal.js b/tools/node_modules/eslint/lib/rules/no-octal.js
new file mode 100644
index 0000000000..58082d0d1c
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-octal.js
@@ -0,0 +1,35 @@
+/**
+ * @fileoverview Rule to flag when initializing octal literal
+ * @author Ilya Volodin
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow octal literals",
+ category: "Best Practices",
+ recommended: true
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ return {
+
+ Literal(node) {
+ if (typeof node.value === "number" && /^0[0-7]/.test(node.raw)) {
+ context.report({ node, message: "Octal literals should not be used." });
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-param-reassign.js b/tools/node_modules/eslint/lib/rules/no-param-reassign.js
new file mode 100644
index 0000000000..f32e42ae2f
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-param-reassign.js
@@ -0,0 +1,173 @@
+/**
+ * @fileoverview Disallow reassignment of function parameters.
+ * @author Nat Burns
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+const stopNodePattern = /(?:Statement|Declaration|Function(?:Expression)?|Program)$/;
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow reassigning `function` parameters",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: [
+ {
+ oneOf: [
+ {
+ type: "object",
+ properties: {
+ props: {
+ enum: [false]
+ }
+ },
+ additionalProperties: false
+ },
+ {
+ type: "object",
+ properties: {
+ props: {
+ enum: [true]
+ },
+ ignorePropertyModificationsFor: {
+ type: "array",
+ items: {
+ type: "string"
+ },
+ uniqueItems: true
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ }
+ ]
+ },
+
+ create(context) {
+ const props = context.options[0] && Boolean(context.options[0].props);
+ const ignoredPropertyAssignmentsFor = context.options[0] && context.options[0].ignorePropertyModificationsFor || [];
+
+ /**
+ * Checks whether or not the reference modifies properties of its variable.
+ * @param {Reference} reference - A reference to check.
+ * @returns {boolean} Whether or not the reference modifies properties of its variable.
+ */
+ function isModifyingProp(reference) {
+ let node = reference.identifier;
+ let parent = node.parent;
+
+ while (parent && !stopNodePattern.test(parent.type)) {
+ switch (parent.type) {
+
+ // e.g. foo.a = 0;
+ case "AssignmentExpression":
+ return parent.left === node;
+
+ // e.g. ++foo.a;
+ case "UpdateExpression":
+ return true;
+
+ // e.g. delete foo.a;
+ case "UnaryExpression":
+ if (parent.operator === "delete") {
+ return true;
+ }
+ break;
+
+ // EXCLUDES: e.g. cache.get(foo.a).b = 0;
+ case "CallExpression":
+ if (parent.callee !== node) {
+ return false;
+ }
+ break;
+
+ // EXCLUDES: e.g. cache[foo.a] = 0;
+ case "MemberExpression":
+ if (parent.property === node) {
+ return false;
+ }
+ break;
+
+ // EXCLUDES: e.g. ({ [foo]: a }) = bar;
+ case "Property":
+ if (parent.key === node) {
+ return false;
+ }
+
+ break;
+
+ // no default
+ }
+
+ node = parent;
+ parent = node.parent;
+ }
+
+ return false;
+ }
+
+ /**
+ * Reports a reference if is non initializer and writable.
+ * @param {Reference} reference - A reference to check.
+ * @param {int} index - The index of the reference in the references.
+ * @param {Reference[]} references - The array that the reference belongs to.
+ * @returns {void}
+ */
+ function checkReference(reference, index, references) {
+ const identifier = reference.identifier;
+
+ if (identifier &&
+ !reference.init &&
+
+ /*
+ * Destructuring assignments can have multiple default value,
+ * so possibly there are multiple writeable references for the same identifier.
+ */
+ (index === 0 || references[index - 1].identifier !== identifier)
+ ) {
+ if (reference.isWrite()) {
+ context.report({ node: identifier, message: "Assignment to function parameter '{{name}}'.", data: { name: identifier.name } });
+ } else if (props && isModifyingProp(reference) && ignoredPropertyAssignmentsFor.indexOf(identifier.name) === -1) {
+ context.report({ node: identifier, message: "Assignment to property of function parameter '{{name}}'.", data: { name: identifier.name } });
+ }
+ }
+ }
+
+ /**
+ * Finds and reports references that are non initializer and writable.
+ * @param {Variable} variable - A variable to check.
+ * @returns {void}
+ */
+ function checkVariable(variable) {
+ if (variable.defs[0].type === "Parameter") {
+ variable.references.forEach(checkReference);
+ }
+ }
+
+ /**
+ * Checks parameters of a given function node.
+ * @param {ASTNode} node - A function node to check.
+ * @returns {void}
+ */
+ function checkForFunction(node) {
+ context.getDeclaredVariables(node).forEach(checkVariable);
+ }
+
+ return {
+
+ // `:exit` is needed for the `node.parent` property of identifier nodes.
+ "FunctionDeclaration:exit": checkForFunction,
+ "FunctionExpression:exit": checkForFunction,
+ "ArrowFunctionExpression:exit": checkForFunction
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-path-concat.js b/tools/node_modules/eslint/lib/rules/no-path-concat.js
new file mode 100644
index 0000000000..1e153a43b6
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-path-concat.js
@@ -0,0 +1,49 @@
+/**
+ * @fileoverview Disallow string concatenation when using __dirname and __filename
+ * @author Nicholas C. Zakas
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow string concatenation with `__dirname` and `__filename`",
+ category: "Node.js and CommonJS",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ const MATCHER = /^__(?:dir|file)name$/;
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+
+ BinaryExpression(node) {
+
+ const left = node.left,
+ right = node.right;
+
+ if (node.operator === "+" &&
+ ((left.type === "Identifier" && MATCHER.test(left.name)) ||
+ (right.type === "Identifier" && MATCHER.test(right.name)))
+ ) {
+
+ context.report({ node, message: "Use path.join() or path.resolve() instead of + to create paths." });
+ }
+ }
+
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-plusplus.js b/tools/node_modules/eslint/lib/rules/no-plusplus.js
new file mode 100644
index 0000000000..94f259ac9e
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-plusplus.js
@@ -0,0 +1,61 @@
+/**
+ * @fileoverview Rule to flag use of unary increment and decrement operators.
+ * @author Ian Christian Myers
+ * @author Brody McKee (github.com/mrmckeb)
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow the unary operators `++` and `--`",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ allowForLoopAfterthoughts: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+
+ const config = context.options[0];
+ let allowInForAfterthought = false;
+
+ if (typeof config === "object") {
+ allowInForAfterthought = config.allowForLoopAfterthoughts === true;
+ }
+
+ return {
+
+ UpdateExpression(node) {
+ if (allowInForAfterthought && node.parent.type === "ForStatement") {
+ return;
+ }
+ context.report({
+ node,
+ message: "Unary operator '{{operator}}' used.",
+ data: {
+ operator: node.operator
+ }
+ });
+ }
+
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-process-env.js b/tools/node_modules/eslint/lib/rules/no-process-env.js
new file mode 100644
index 0000000000..ef58b38e3c
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-process-env.js
@@ -0,0 +1,39 @@
+/**
+ * @fileoverview Disallow the use of process.env()
+ * @author Vignesh Anand
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow the use of `process.env`",
+ category: "Node.js and CommonJS",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ return {
+
+ MemberExpression(node) {
+ const objectName = node.object.name,
+ propertyName = node.property.name;
+
+ if (objectName === "process" && !node.computed && propertyName && propertyName === "env") {
+ context.report({ node, message: "Unexpected use of process.env." });
+ }
+
+ }
+
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-process-exit.js b/tools/node_modules/eslint/lib/rules/no-process-exit.js
new file mode 100644
index 0000000000..04e423b88f
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-process-exit.js
@@ -0,0 +1,35 @@
+/**
+ * @fileoverview Disallow the use of process.exit()
+ * @author Nicholas C. Zakas
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow the use of `process.exit()`",
+ category: "Node.js and CommonJS",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+ "CallExpression > MemberExpression.callee[object.name = 'process'][property.name = 'exit']"(node) {
+ context.report({ node: node.parent, message: "Don't use process.exit(); throw an error instead." });
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-proto.js b/tools/node_modules/eslint/lib/rules/no-proto.js
new file mode 100644
index 0000000000..933746f559
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-proto.js
@@ -0,0 +1,38 @@
+/**
+ * @fileoverview Rule to flag usage of __proto__ property
+ * @author Ilya Volodin
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow the use of the `__proto__` property",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ return {
+
+ MemberExpression(node) {
+
+ if (node.property &&
+ (node.property.type === "Identifier" && node.property.name === "__proto__" && !node.computed) ||
+ (node.property.type === "Literal" && node.property.value === "__proto__")) {
+ context.report({ node, message: "The '__proto__' property is deprecated." });
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-prototype-builtins.js b/tools/node_modules/eslint/lib/rules/no-prototype-builtins.js
new file mode 100644
index 0000000000..b9f040eaf6
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-prototype-builtins.js
@@ -0,0 +1,54 @@
+/**
+ * @fileoverview Rule to disallow use of Object.prototype builtins on objects
+ * @author Andrew Levine
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow calling some `Object.prototype` methods directly on objects",
+ category: "Possible Errors",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+ const DISALLOWED_PROPS = [
+ "hasOwnProperty",
+ "isPrototypeOf",
+ "propertyIsEnumerable"
+ ];
+
+ /**
+ * Reports if a disallowed property is used in a CallExpression
+ * @param {ASTNode} node The CallExpression node.
+ * @returns {void}
+ */
+ function disallowBuiltIns(node) {
+ if (node.callee.type !== "MemberExpression" || node.callee.computed) {
+ return;
+ }
+ const propName = node.callee.property.name;
+
+ if (DISALLOWED_PROPS.indexOf(propName) > -1) {
+ context.report({
+ message: "Do not access Object.prototype method '{{prop}}' from target object.",
+ loc: node.callee.property.loc.start,
+ data: { prop: propName },
+ node
+ });
+ }
+ }
+
+ return {
+ CallExpression: disallowBuiltIns
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-redeclare.js b/tools/node_modules/eslint/lib/rules/no-redeclare.js
new file mode 100644
index 0000000000..ccb57003ed
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-redeclare.js
@@ -0,0 +1,101 @@
+/**
+ * @fileoverview Rule to flag when the same variable is declared more then once.
+ * @author Ilya Volodin
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow variable redeclaration",
+ category: "Best Practices",
+ recommended: true
+ },
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ builtinGlobals: { type: "boolean" }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+ const options = {
+ builtinGlobals: Boolean(context.options[0] && context.options[0].builtinGlobals)
+ };
+
+ /**
+ * Find variables in a given scope and flag redeclared ones.
+ * @param {Scope} scope - An eslint-scope scope object.
+ * @returns {void}
+ * @private
+ */
+ function findVariablesInScope(scope) {
+ scope.variables.forEach(variable => {
+ const hasBuiltin = options.builtinGlobals && "writeable" in variable;
+ const count = (hasBuiltin ? 1 : 0) + variable.identifiers.length;
+
+ if (count >= 2) {
+ variable.identifiers.sort((a, b) => a.range[1] - b.range[1]);
+
+ for (let i = (hasBuiltin ? 0 : 1), l = variable.identifiers.length; i < l; i++) {
+ context.report({ node: variable.identifiers[i], message: "'{{a}}' is already defined.", data: { a: variable.name } });
+ }
+ }
+ });
+
+ }
+
+ /**
+ * Find variables in the current scope.
+ * @param {ASTNode} node - The Program node.
+ * @returns {void}
+ * @private
+ */
+ function checkForGlobal(node) {
+ const scope = context.getScope(),
+ parserOptions = context.parserOptions,
+ ecmaFeatures = parserOptions.ecmaFeatures || {};
+
+ // Nodejs env or modules has a special scope.
+ if (ecmaFeatures.globalReturn || node.sourceType === "module") {
+ findVariablesInScope(scope.childScopes[0]);
+ } else {
+ findVariablesInScope(scope);
+ }
+ }
+
+ /**
+ * Find variables in the current scope.
+ * @returns {void}
+ * @private
+ */
+ function checkForBlock() {
+ findVariablesInScope(context.getScope());
+ }
+
+ if (context.parserOptions.ecmaVersion >= 6) {
+ return {
+ Program: checkForGlobal,
+ BlockStatement: checkForBlock,
+ SwitchStatement: checkForBlock
+ };
+ }
+ return {
+ Program: checkForGlobal,
+ FunctionDeclaration: checkForBlock,
+ FunctionExpression: checkForBlock,
+ ArrowFunctionExpression: checkForBlock
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-regex-spaces.js b/tools/node_modules/eslint/lib/rules/no-regex-spaces.js
new file mode 100644
index 0000000000..9250437caa
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-regex-spaces.js
@@ -0,0 +1,114 @@
+/**
+ * @fileoverview Rule to count multiple spaces in regular expressions
+ * @author Matt DuVall <http://www.mattduvall.com/>
+ */
+
+"use strict";
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow multiple spaces in regular expressions",
+ category: "Possible Errors",
+ recommended: true
+ },
+
+ schema: [],
+
+ fixable: "code"
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+
+ /**
+ * Validate regular expressions
+ * @param {ASTNode} node node to validate
+ * @param {string} value regular expression to validate
+ * @param {number} valueStart The start location of the regex/string literal. It will always be the case that
+ * `sourceCode.getText().slice(valueStart, valueStart + value.length) === value`
+ * @returns {void}
+ * @private
+ */
+ function checkRegex(node, value, valueStart) {
+ const multipleSpacesRegex = /( {2,})( [+*{?]|[^+*{?]|$)/,
+ regexResults = multipleSpacesRegex.exec(value);
+
+ if (regexResults !== null) {
+ const count = regexResults[1].length;
+
+ context.report({
+ node,
+ message: "Spaces are hard to count. Use {{{count}}}.",
+ data: { count },
+ fix(fixer) {
+ return fixer.replaceTextRange(
+ [valueStart + regexResults.index, valueStart + regexResults.index + count],
+ ` {${count}}`
+ );
+ }
+ });
+
+ /*
+ * TODO: (platinumazure) Fix message to use rule message
+ * substitution when api.report is fixed in lib/eslint.js.
+ */
+ }
+ }
+
+ /**
+ * Validate regular expression literals
+ * @param {ASTNode} node node to validate
+ * @returns {void}
+ * @private
+ */
+ function checkLiteral(node) {
+ const token = sourceCode.getFirstToken(node),
+ nodeType = token.type,
+ nodeValue = token.value;
+
+ if (nodeType === "RegularExpression") {
+ checkRegex(node, nodeValue, token.range[0]);
+ }
+ }
+
+ /**
+ * Check if node is a string
+ * @param {ASTNode} node node to evaluate
+ * @returns {boolean} True if its a string
+ * @private
+ */
+ function isString(node) {
+ return node && node.type === "Literal" && typeof node.value === "string";
+ }
+
+ /**
+ * Validate strings passed to the RegExp constructor
+ * @param {ASTNode} node node to validate
+ * @returns {void}
+ * @private
+ */
+ function checkFunction(node) {
+ const scope = context.getScope();
+ const regExpVar = astUtils.getVariableByName(scope, "RegExp");
+ const shadowed = regExpVar && regExpVar.defs.length > 0;
+
+ if (node.callee.type === "Identifier" && node.callee.name === "RegExp" && isString(node.arguments[0]) && !shadowed) {
+ checkRegex(node, node.arguments[0].value, node.arguments[0].range[0] + 1);
+ }
+ }
+
+ return {
+ Literal: checkLiteral,
+ CallExpression: checkFunction,
+ NewExpression: checkFunction
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-restricted-globals.js b/tools/node_modules/eslint/lib/rules/no-restricted-globals.js
new file mode 100644
index 0000000000..75428fc174
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-restricted-globals.js
@@ -0,0 +1,120 @@
+/**
+ * @fileoverview Restrict usage of specified globals.
+ * @author Benoît Zugmeyer
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+const DEFAULT_MESSAGE_TEMPLATE = "Unexpected use of '{{name}}'.",
+ CUSTOM_MESSAGE_TEMPLATE = "Unexpected use of '{{name}}'. {{customMessage}}";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow specified global variables",
+ category: "Variables",
+ recommended: false
+ },
+
+ schema: {
+ type: "array",
+ items: {
+ oneOf: [
+ {
+ type: "string"
+ },
+ {
+ type: "object",
+ properties: {
+ name: { type: "string" },
+ message: { type: "string" }
+ },
+ required: ["name"],
+ additionalProperties: false
+ }
+ ]
+ },
+ uniqueItems: true,
+ minItems: 0
+ }
+ },
+
+ create(context) {
+
+ // If no globals are restricted, we don't need to do anything
+ if (context.options.length === 0) {
+ return {};
+ }
+
+ const restrictedGlobalMessages = context.options.reduce((memo, option) => {
+ if (typeof option === "string") {
+ memo[option] = null;
+ } else {
+ memo[option.name] = option.message;
+ }
+
+ return memo;
+ }, {});
+
+ /**
+ * Report a variable to be used as a restricted global.
+ * @param {Reference} reference the variable reference
+ * @returns {void}
+ * @private
+ */
+ function reportReference(reference) {
+ const name = reference.identifier.name,
+ customMessage = restrictedGlobalMessages[name],
+ message = customMessage
+ ? CUSTOM_MESSAGE_TEMPLATE
+ : DEFAULT_MESSAGE_TEMPLATE;
+
+ context.report({
+ node: reference.identifier,
+ message,
+ data: {
+ name,
+ customMessage
+ }
+ });
+ }
+
+ /**
+ * Check if the given name is a restricted global name.
+ * @param {string} name name of a variable
+ * @returns {boolean} whether the variable is a restricted global or not
+ * @private
+ */
+ function isRestricted(name) {
+ return restrictedGlobalMessages.hasOwnProperty(name);
+ }
+
+ return {
+ Program() {
+ const scope = context.getScope();
+
+ // Report variables declared elsewhere (ex: variables defined as "global" by eslint)
+ scope.variables.forEach(variable => {
+ if (!variable.defs.length && isRestricted(variable.name)) {
+ variable.references.forEach(reportReference);
+ }
+ });
+
+ // Report variables not declared at all
+ scope.through.forEach(reference => {
+ if (isRestricted(reference.identifier.name)) {
+ reportReference(reference);
+ }
+ });
+
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-restricted-imports.js b/tools/node_modules/eslint/lib/rules/no-restricted-imports.js
new file mode 100644
index 0000000000..eb477b4be6
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-restricted-imports.js
@@ -0,0 +1,263 @@
+/**
+ * @fileoverview Restrict usage of specified node imports.
+ * @author Guy Ellis
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+const DEFAULT_MESSAGE_TEMPLATE = "'{{importSource}}' import is restricted from being used.";
+const CUSTOM_MESSAGE_TEMPLATE = "'{{importSource}}' import is restricted from being used. {{customMessage}}";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+const ignore = require("ignore");
+
+const arrayOfStrings = {
+ type: "array",
+ items: { type: "string" },
+ uniqueItems: true
+};
+
+const arrayOfStringsOrObjects = {
+ type: "array",
+ items: {
+ anyOf: [
+ { type: "string" },
+ {
+ type: "object",
+ properties: {
+ name: { type: "string" },
+ message: {
+ type: "string",
+ minLength: 1
+ },
+ importNames: {
+ type: "array",
+ items: {
+ type: "string"
+ }
+ }
+ },
+ additionalProperties: false,
+ required: ["name"]
+ }
+ ]
+ },
+ uniqueItems: true
+};
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow specified modules when loaded by `import`",
+ category: "ECMAScript 6",
+ recommended: false
+ },
+
+ schema: {
+ anyOf: [
+ arrayOfStringsOrObjects,
+ {
+ type: "array",
+ items: {
+ type: "object",
+ properties: {
+ paths: arrayOfStringsOrObjects,
+ patterns: arrayOfStrings
+ },
+ additionalProperties: false
+ },
+ additionalItems: false
+ }
+ ]
+ }
+ },
+
+ create(context) {
+ const options = Array.isArray(context.options) ? context.options : [];
+ const isPathAndPatternsObject =
+ typeof options[0] === "object" &&
+ (options[0].hasOwnProperty("paths") || options[0].hasOwnProperty("patterns"));
+
+ const restrictedPaths = (isPathAndPatternsObject ? options[0].paths : context.options) || [];
+ const restrictedPatterns = (isPathAndPatternsObject ? options[0].patterns : []) || [];
+
+ const restrictedPathMessages = restrictedPaths.reduce((memo, importSource) => {
+ if (typeof importSource === "string") {
+ memo[importSource] = { message: null };
+ } else {
+ memo[importSource.name] = {
+ message: importSource.message,
+ importNames: importSource.importNames
+ };
+ }
+ return memo;
+ }, {});
+
+ // if no imports are restricted we don"t need to check
+ if (Object.keys(restrictedPaths).length === 0 && restrictedPatterns.length === 0) {
+ return {};
+ }
+
+ const restrictedPatternsMatcher = ignore().add(restrictedPatterns);
+
+ /**
+ * Checks to see if "*" is being used to import everything.
+ * @param {Set.<string>} importNames - Set of import names that are being imported
+ * @returns {boolean} whether everything is imported or not
+ */
+ function isEverythingImported(importNames) {
+ return importNames.has("*");
+ }
+
+ /**
+ * Report a restricted path.
+ * @param {node} node representing the restricted path reference
+ * @returns {void}
+ * @private
+ */
+ function reportPath(node) {
+ const importSource = node.source.value.trim();
+ const customMessage = restrictedPathMessages[importSource] && restrictedPathMessages[importSource].message;
+ const message = customMessage
+ ? CUSTOM_MESSAGE_TEMPLATE
+ : DEFAULT_MESSAGE_TEMPLATE;
+
+ context.report({
+ node,
+ message,
+ data: {
+ importSource,
+ customMessage
+ }
+ });
+ }
+
+ /**
+ * Report a restricted path specifically for patterns.
+ * @param {node} node - representing the restricted path reference
+ * @returns {void}
+ * @private
+ */
+ function reportPathForPatterns(node) {
+ const importSource = node.source.value.trim();
+
+ context.report({
+ node,
+ message: "'{{importSource}}' import is restricted from being used by a pattern.",
+ data: {
+ importSource
+ }
+ });
+ }
+
+ /**
+ * Report a restricted path specifically when using the '*' import.
+ * @param {string} importSource - path of the import
+ * @param {node} node - representing the restricted path reference
+ * @returns {void}
+ * @private
+ */
+ function reportPathForEverythingImported(importSource, node) {
+ const importNames = restrictedPathMessages[importSource].importNames;
+
+ context.report({
+ node,
+ message: "* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted.",
+ data: {
+ importSource,
+ importNames
+ }
+ });
+ }
+
+ /**
+ * Check if the given importSource is restricted because '*' is being imported.
+ * @param {string} importSource - path of the import
+ * @param {Set.<string>} importNames - Set of import names that are being imported
+ * @returns {boolean} whether the path is restricted
+ * @private
+ */
+ function isRestrictedForEverythingImported(importSource, importNames) {
+ return Object.prototype.hasOwnProperty.call(restrictedPathMessages, importSource) &&
+ restrictedPathMessages[importSource].importNames &&
+ isEverythingImported(importNames);
+ }
+
+ /**
+ * Check if the given importNames are restricted given a list of restrictedImportNames.
+ * @param {Set.<string>} importNames - Set of import names that are being imported
+ * @param {[string]} restrictedImportNames - array of import names that are restricted for this import
+ * @returns {boolean} whether the objectName is restricted
+ * @private
+ */
+ function isRestrictedObject(importNames, restrictedImportNames) {
+ return restrictedImportNames.some(restrictedObjectName => (
+ importNames.has(restrictedObjectName)
+ ));
+ }
+
+ /**
+ * Check if the given importSource is a restricted path.
+ * @param {string} importSource - path of the import
+ * @param {Set.<string>} importNames - Set of import names that are being imported
+ * @returns {boolean} whether the variable is a restricted path or not
+ * @private
+ */
+ function isRestrictedPath(importSource, importNames) {
+ let isRestricted = false;
+
+ if (Object.prototype.hasOwnProperty.call(restrictedPathMessages, importSource)) {
+ if (restrictedPathMessages[importSource].importNames) {
+ isRestricted = isRestrictedObject(importNames, restrictedPathMessages[importSource].importNames);
+ } else {
+ isRestricted = true;
+ }
+ }
+
+ return isRestricted;
+ }
+
+ /**
+ * Check if the given importSource is restricted by a pattern.
+ * @param {string} importSource - path of the import
+ * @returns {boolean} whether the variable is a restricted pattern or not
+ * @private
+ */
+ function isRestrictedPattern(importSource) {
+ return restrictedPatterns.length > 0 && restrictedPatternsMatcher.ignores(importSource);
+ }
+
+ return {
+ ImportDeclaration(node) {
+ const importSource = node.source.value.trim();
+ const importNames = node.specifiers.reduce((set, specifier) => {
+ if (specifier.type === "ImportDefaultSpecifier") {
+ set.add("default");
+ } else if (specifier.type === "ImportNamespaceSpecifier") {
+ set.add("*");
+ } else {
+ set.add(specifier.imported.name);
+ }
+ return set;
+ }, new Set());
+
+ if (isRestrictedForEverythingImported(importSource, importNames)) {
+ reportPathForEverythingImported(importSource, node);
+ }
+
+ if (isRestrictedPath(importSource, importNames)) {
+ reportPath(node);
+ }
+ if (isRestrictedPattern(importSource)) {
+ reportPathForPatterns(node);
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-restricted-modules.js b/tools/node_modules/eslint/lib/rules/no-restricted-modules.js
new file mode 100644
index 0000000000..cd47975733
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-restricted-modules.js
@@ -0,0 +1,177 @@
+/**
+ * @fileoverview Restrict usage of specified node modules.
+ * @author Christian Schulz
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+const DEFAULT_MESSAGE_TEMPLATE = "'{{moduleName}}' module is restricted from being used.";
+const CUSTOM_MESSAGE_TEMPLATE = "'{{moduleName}}' module is restricted from being used. {{customMessage}}";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+const ignore = require("ignore");
+
+const arrayOfStrings = {
+ type: "array",
+ items: { type: "string" },
+ uniqueItems: true
+};
+
+const arrayOfStringsOrObjects = {
+ type: "array",
+ items: {
+ anyOf: [
+ { type: "string" },
+ {
+ type: "object",
+ properties: {
+ name: { type: "string" },
+ message: {
+ type: "string",
+ minLength: 1
+ }
+ },
+ additionalProperties: false,
+ required: ["name"]
+ }
+ ]
+ },
+ uniqueItems: true
+};
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow specified modules when loaded by `require`",
+ category: "Node.js and CommonJS",
+ recommended: false
+ },
+
+ schema: {
+ anyOf: [
+ arrayOfStringsOrObjects,
+ {
+ type: "array",
+ items: {
+ type: "object",
+ properties: {
+ paths: arrayOfStringsOrObjects,
+ patterns: arrayOfStrings
+ },
+ additionalProperties: false
+ },
+ additionalItems: false
+ }
+ ]
+ }
+ },
+
+ create(context) {
+ const options = Array.isArray(context.options) ? context.options : [];
+ const isPathAndPatternsObject =
+ typeof options[0] === "object" &&
+ (options[0].hasOwnProperty("paths") || options[0].hasOwnProperty("patterns"));
+
+ const restrictedPaths = (isPathAndPatternsObject ? options[0].paths : context.options) || [];
+ const restrictedPatterns = (isPathAndPatternsObject ? options[0].patterns : []) || [];
+
+ const restrictedPathMessages = restrictedPaths.reduce((memo, importName) => {
+ if (typeof importName === "string") {
+ memo[importName] = null;
+ } else {
+ memo[importName.name] = importName.message;
+ }
+ return memo;
+ }, {});
+
+ // if no imports are restricted we don"t need to check
+ if (Object.keys(restrictedPaths).length === 0 && restrictedPatterns.length === 0) {
+ return {};
+ }
+
+ const ig = ignore().add(restrictedPatterns);
+
+
+ /**
+ * Function to check if a node is a string literal.
+ * @param {ASTNode} node The node to check.
+ * @returns {boolean} If the node is a string literal.
+ */
+ function isString(node) {
+ return node && node.type === "Literal" && typeof node.value === "string";
+ }
+
+ /**
+ * Function to check if a node is a require call.
+ * @param {ASTNode} node The node to check.
+ * @returns {boolean} If the node is a require call.
+ */
+ function isRequireCall(node) {
+ return node.callee.type === "Identifier" && node.callee.name === "require";
+ }
+
+ /**
+ * Report a restricted path.
+ * @param {node} node representing the restricted path reference
+ * @returns {void}
+ * @private
+ */
+ function reportPath(node) {
+ const moduleName = node.arguments[0].value.trim();
+ const customMessage = restrictedPathMessages[moduleName];
+ const message = customMessage
+ ? CUSTOM_MESSAGE_TEMPLATE
+ : DEFAULT_MESSAGE_TEMPLATE;
+
+ context.report({
+ node,
+ message,
+ data: {
+ moduleName,
+ customMessage
+ }
+ });
+ }
+
+ /**
+ * Check if the given name is a restricted path name
+ * @param {string} name name of a variable
+ * @returns {boolean} whether the variable is a restricted path or not
+ * @private
+ */
+ function isRestrictedPath(name) {
+ return Object.prototype.hasOwnProperty.call(restrictedPathMessages, name);
+ }
+
+ return {
+ CallExpression(node) {
+ if (isRequireCall(node)) {
+
+ // node has arguments and first argument is string
+ if (node.arguments.length && isString(node.arguments[0])) {
+ const moduleName = node.arguments[0].value.trim();
+
+ // check if argument value is in restricted modules array
+ if (isRestrictedPath(moduleName)) {
+ reportPath(node);
+ }
+
+ if (restrictedPatterns.length > 0 && ig.ignores(moduleName)) {
+ context.report({
+ node,
+ message: "'{{moduleName}}' module is restricted from being used by a pattern.",
+ data: { moduleName }
+ });
+ }
+ }
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-restricted-properties.js b/tools/node_modules/eslint/lib/rules/no-restricted-properties.js
new file mode 100644
index 0000000000..cdc73f9e41
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-restricted-properties.js
@@ -0,0 +1,173 @@
+/**
+ * @fileoverview Rule to disallow certain object properties
+ * @author Will Klein & Eli White
+ */
+
+"use strict";
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow certain properties on certain objects",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: {
+ type: "array",
+ items: {
+ anyOf: [ // `object` and `property` are both optional, but at least one of them must be provided.
+ {
+ type: "object",
+ properties: {
+ object: {
+ type: "string"
+ },
+ property: {
+ type: "string"
+ },
+ message: {
+ type: "string"
+ }
+ },
+ additionalProperties: false,
+ required: ["object"]
+ },
+ {
+ type: "object",
+ properties: {
+ object: {
+ type: "string"
+ },
+ property: {
+ type: "string"
+ },
+ message: {
+ type: "string"
+ }
+ },
+ additionalProperties: false,
+ required: ["property"]
+ }
+ ]
+ },
+ uniqueItems: true
+ }
+ },
+
+ create(context) {
+ const restrictedCalls = context.options;
+
+ if (restrictedCalls.length === 0) {
+ return {};
+ }
+
+ const restrictedProperties = new Map();
+ const globallyRestrictedObjects = new Map();
+ const globallyRestrictedProperties = new Map();
+
+ restrictedCalls.forEach(option => {
+ const objectName = option.object;
+ const propertyName = option.property;
+
+ if (typeof objectName === "undefined") {
+ globallyRestrictedProperties.set(propertyName, { message: option.message });
+ } else if (typeof propertyName === "undefined") {
+ globallyRestrictedObjects.set(objectName, { message: option.message });
+ } else {
+ if (!restrictedProperties.has(objectName)) {
+ restrictedProperties.set(objectName, new Map());
+ }
+
+ restrictedProperties.get(objectName).set(propertyName, {
+ message: option.message
+ });
+ }
+ });
+
+ /**
+ * Checks to see whether a property access is restricted, and reports it if so.
+ * @param {ASTNode} node The node to report
+ * @param {string} objectName The name of the object
+ * @param {string} propertyName The name of the property
+ * @returns {undefined}
+ */
+ function checkPropertyAccess(node, objectName, propertyName) {
+ if (propertyName === null) {
+ return;
+ }
+ const matchedObject = restrictedProperties.get(objectName);
+ const matchedObjectProperty = matchedObject ? matchedObject.get(propertyName) : globallyRestrictedObjects.get(objectName);
+ const globalMatchedProperty = globallyRestrictedProperties.get(propertyName);
+
+ if (matchedObjectProperty) {
+ const message = matchedObjectProperty.message ? ` ${matchedObjectProperty.message}` : "";
+
+ context.report({
+ node,
+ // eslint-disable-next-line eslint-plugin/report-message-format
+ message: "'{{objectName}}.{{propertyName}}' is restricted from being used.{{message}}",
+ data: {
+ objectName,
+ propertyName,
+ message
+ }
+ });
+ } else if (globalMatchedProperty) {
+ const message = globalMatchedProperty.message ? ` ${globalMatchedProperty.message}` : "";
+
+ context.report({
+ node,
+ // eslint-disable-next-line eslint-plugin/report-message-format
+ message: "'{{propertyName}}' is restricted from being used.{{message}}",
+ data: {
+ propertyName,
+ message
+ }
+ });
+ }
+ }
+
+ /**
+ * Checks property accesses in a destructuring assignment expression, e.g. `var foo; ({foo} = bar);`
+ * @param {ASTNode} node An AssignmentExpression or AssignmentPattern node
+ * @returns {undefined}
+ */
+ function checkDestructuringAssignment(node) {
+ if (node.right.type === "Identifier") {
+ const objectName = node.right.name;
+
+ if (node.left.type === "ObjectPattern") {
+ node.left.properties.forEach(property => {
+ checkPropertyAccess(node.left, objectName, astUtils.getStaticPropertyName(property));
+ });
+ }
+ }
+ }
+
+ return {
+ MemberExpression(node) {
+ checkPropertyAccess(node, node.object && node.object.name, astUtils.getStaticPropertyName(node));
+ },
+ VariableDeclarator(node) {
+ if (node.init && node.init.type === "Identifier") {
+ const objectName = node.init.name;
+
+ if (node.id.type === "ObjectPattern") {
+ node.id.properties.forEach(property => {
+ checkPropertyAccess(node.id, objectName, astUtils.getStaticPropertyName(property));
+ });
+ }
+ }
+ },
+ AssignmentExpression: checkDestructuringAssignment,
+ AssignmentPattern: checkDestructuringAssignment
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-restricted-syntax.js b/tools/node_modules/eslint/lib/rules/no-restricted-syntax.js
new file mode 100644
index 0000000000..1798065ec0
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-restricted-syntax.js
@@ -0,0 +1,62 @@
+/**
+ * @fileoverview Rule to flag use of certain node types
+ * @author Burak Yigit Kaya
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow specified syntax",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: {
+ type: "array",
+ items: [{
+ oneOf: [
+ {
+ type: "string"
+ },
+ {
+ type: "object",
+ properties: {
+ selector: { type: "string" },
+ message: { type: "string" }
+ },
+ required: ["selector"],
+ additionalProperties: false
+ }
+ ]
+ }],
+ uniqueItems: true,
+ minItems: 0
+ }
+ },
+
+ create(context) {
+ return context.options.reduce((result, selectorOrObject) => {
+ const isStringFormat = (typeof selectorOrObject === "string");
+ const hasCustomMessage = !isStringFormat && Boolean(selectorOrObject.message);
+
+ const selector = isStringFormat ? selectorOrObject : selectorOrObject.selector;
+ const message = hasCustomMessage ? selectorOrObject.message : "Using '{{selector}}' is not allowed.";
+
+ return Object.assign(result, {
+ [selector](node) {
+ context.report({
+ node,
+ message,
+ data: hasCustomMessage ? {} : { selector }
+ });
+ }
+ });
+ }, {});
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-return-assign.js b/tools/node_modules/eslint/lib/rules/no-return-assign.js
new file mode 100644
index 0000000000..882f94b724
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-return-assign.js
@@ -0,0 +1,71 @@
+/**
+ * @fileoverview Rule to flag when return statement contains assignment
+ * @author Ilya Volodin
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+const SENTINEL_TYPE = /^(?:[a-zA-Z]+?Statement|ArrowFunctionExpression|FunctionExpression|ClassExpression)$/;
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow assignment operators in `return` statements",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: [
+ {
+ enum: ["except-parens", "always"]
+ }
+ ]
+ },
+
+ create(context) {
+ const always = (context.options[0] || "except-parens") !== "except-parens";
+ const sourceCode = context.getSourceCode();
+
+ return {
+ AssignmentExpression(node) {
+ if (!always && astUtils.isParenthesised(sourceCode, node)) {
+ return;
+ }
+
+ let parent = node.parent;
+
+ // Find ReturnStatement or ArrowFunctionExpression in ancestors.
+ while (parent && !SENTINEL_TYPE.test(parent.type)) {
+ node = parent;
+ parent = parent.parent;
+ }
+
+ // Reports.
+ if (parent && parent.type === "ReturnStatement") {
+ context.report({
+ node: parent,
+ message: "Return statement should not contain assignment."
+ });
+ } else if (parent && parent.type === "ArrowFunctionExpression" && parent.body === node) {
+ context.report({
+ node: parent,
+ message: "Arrow function should not return assignment."
+ });
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-return-await.js b/tools/node_modules/eslint/lib/rules/no-return-await.js
new file mode 100644
index 0000000000..2f06b61108
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-return-await.js
@@ -0,0 +1,94 @@
+/**
+ * @fileoverview Disallows unnecessary `return await`
+ * @author Jordan Harband
+ */
+"use strict";
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+const message = "Redundant use of `await` on a return value.";
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow unnecessary `return await`",
+ category: "Best Practices",
+ recommended: false // TODO: set to true
+ },
+ fixable: null,
+ schema: [
+ ]
+ },
+
+ create(context) {
+
+ /**
+ * Reports a found unnecessary `await` expression.
+ * @param {ASTNode} node The node representing the `await` expression to report
+ * @returns {void}
+ */
+ function reportUnnecessaryAwait(node) {
+ context.report({
+ node: context.getSourceCode().getFirstToken(node),
+ loc: node.loc,
+ message
+ });
+ }
+
+ /**
+ * Determines whether a thrown error from this node will be caught/handled within this function rather than immediately halting
+ * this function. For example, a statement in a `try` block will always have an error handler. A statement in
+ * a `catch` block will only have an error handler if there is also a `finally` block.
+ * @param {ASTNode} node A node representing a location where an could be thrown
+ * @returns {boolean} `true` if a thrown error will be caught/handled in this function
+ */
+ function hasErrorHandler(node) {
+ let ancestor = node;
+
+ while (!astUtils.isFunction(ancestor) && ancestor.type !== "Program") {
+ if (ancestor.parent.type === "TryStatement" && (ancestor === ancestor.parent.block || ancestor === ancestor.parent.handler && ancestor.parent.finalizer)) {
+ return true;
+ }
+ ancestor = ancestor.parent;
+ }
+ return false;
+ }
+
+ /**
+ * Checks if a node is placed in tail call position. Once `return` arguments (or arrow function expressions) can be a complex expression,
+ * an `await` expression could or could not be unnecessary by the definition of this rule. So we're looking for `await` expressions that are in tail position.
+ * @param {ASTNode} node A node representing the `await` expression to check
+ * @returns {boolean} The checking result
+ */
+ function isInTailCallPosition(node) {
+ if (node.parent.type === "ArrowFunctionExpression") {
+ return true;
+ }
+ if (node.parent.type === "ReturnStatement") {
+ return !hasErrorHandler(node.parent);
+ }
+ if (node.parent.type === "ConditionalExpression" && (node === node.parent.consequent || node === node.parent.alternate)) {
+ return isInTailCallPosition(node.parent);
+ }
+ if (node.parent.type === "LogicalExpression" && node === node.parent.right) {
+ return isInTailCallPosition(node.parent);
+ }
+ if (node.parent.type === "SequenceExpression" && node === node.parent.expressions[node.parent.expressions.length - 1]) {
+ return isInTailCallPosition(node.parent);
+ }
+ return false;
+ }
+
+ return {
+ AwaitExpression(node) {
+ if (isInTailCallPosition(node) && !hasErrorHandler(node)) {
+ reportUnnecessaryAwait(node);
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-script-url.js b/tools/node_modules/eslint/lib/rules/no-script-url.js
new file mode 100644
index 0000000000..98f988ff1a
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-script-url.js
@@ -0,0 +1,41 @@
+/**
+ * @fileoverview Rule to flag when using javascript: urls
+ * @author Ilya Volodin
+ */
+/* jshint scripturl: true */
+/* eslint no-script-url: 0 */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow `javascript:` urls",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ return {
+
+ Literal(node) {
+ if (node.value && typeof node.value === "string") {
+ const value = node.value.toLowerCase();
+
+ if (value.indexOf("javascript:") === 0) {
+ context.report({ node, message: "Script URL is a form of eval." });
+ }
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-self-assign.js b/tools/node_modules/eslint/lib/rules/no-self-assign.js
new file mode 100644
index 0000000000..48b922d46b
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-self-assign.js
@@ -0,0 +1,214 @@
+/**
+ * @fileoverview Rule to disallow assignments where both sides are exactly the same
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+const SPACES = /\s+/g;
+
+/**
+ * Checks whether the property of 2 given member expression nodes are the same
+ * property or not.
+ *
+ * @param {ASTNode} left - A member expression node to check.
+ * @param {ASTNode} right - Another member expression node to check.
+ * @returns {boolean} `true` if the member expressions have the same property.
+ */
+function isSameProperty(left, right) {
+ if (left.property.type === "Identifier" &&
+ left.property.type === right.property.type &&
+ left.property.name === right.property.name &&
+ left.computed === right.computed
+ ) {
+ return true;
+ }
+
+ const lname = astUtils.getStaticPropertyName(left);
+ const rname = astUtils.getStaticPropertyName(right);
+
+ return lname !== null && lname === rname;
+}
+
+/**
+ * Checks whether 2 given member expression nodes are the reference to the same
+ * property or not.
+ *
+ * @param {ASTNode} left - A member expression node to check.
+ * @param {ASTNode} right - Another member expression node to check.
+ * @returns {boolean} `true` if the member expressions are the reference to the
+ * same property or not.
+ */
+function isSameMember(left, right) {
+ if (!isSameProperty(left, right)) {
+ return false;
+ }
+
+ const lobj = left.object;
+ const robj = right.object;
+
+ if (lobj.type !== robj.type) {
+ return false;
+ }
+ if (lobj.type === "MemberExpression") {
+ return isSameMember(lobj, robj);
+ }
+ return lobj.type === "Identifier" && lobj.name === robj.name;
+}
+
+/**
+ * Traverses 2 Pattern nodes in parallel, then reports self-assignments.
+ *
+ * @param {ASTNode|null} left - A left node to traverse. This is a Pattern or
+ * a Property.
+ * @param {ASTNode|null} right - A right node to traverse. This is a Pattern or
+ * a Property.
+ * @param {boolean} props - The flag to check member expressions as well.
+ * @param {Function} report - A callback function to report.
+ * @returns {void}
+ */
+function eachSelfAssignment(left, right, props, report) {
+ if (!left || !right) {
+
+ // do nothing
+ } else if (
+ left.type === "Identifier" &&
+ right.type === "Identifier" &&
+ left.name === right.name
+ ) {
+ report(right);
+ } else if (
+ left.type === "ArrayPattern" &&
+ right.type === "ArrayExpression"
+ ) {
+ const end = Math.min(left.elements.length, right.elements.length);
+
+ for (let i = 0; i < end; ++i) {
+ const rightElement = right.elements[i];
+
+ eachSelfAssignment(left.elements[i], rightElement, props, report);
+
+ // After a spread element, those indices are unknown.
+ if (rightElement && rightElement.type === "SpreadElement") {
+ break;
+ }
+ }
+ } else if (
+ left.type === "RestElement" &&
+ right.type === "SpreadElement"
+ ) {
+ eachSelfAssignment(left.argument, right.argument, props, report);
+ } else if (
+ left.type === "ObjectPattern" &&
+ right.type === "ObjectExpression" &&
+ right.properties.length >= 1
+ ) {
+
+ /*
+ * Gets the index of the last spread property.
+ * It's possible to overwrite properties followed by it.
+ */
+ let startJ = 0;
+
+ for (let i = right.properties.length - 1; i >= 0; --i) {
+ if (right.properties[i].type === "ExperimentalSpreadProperty") {
+ startJ = i + 1;
+ break;
+ }
+ }
+
+ for (let i = 0; i < left.properties.length; ++i) {
+ for (let j = startJ; j < right.properties.length; ++j) {
+ eachSelfAssignment(
+ left.properties[i],
+ right.properties[j],
+ props,
+ report
+ );
+ }
+ }
+ } else if (
+ left.type === "Property" &&
+ right.type === "Property" &&
+ !left.computed &&
+ !right.computed &&
+ right.kind === "init" &&
+ !right.method &&
+ left.key.name === right.key.name
+ ) {
+ eachSelfAssignment(left.value, right.value, props, report);
+ } else if (
+ props &&
+ left.type === "MemberExpression" &&
+ right.type === "MemberExpression" &&
+ isSameMember(left, right)
+ ) {
+ report(right);
+ }
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow assignments where both sides are exactly the same",
+ category: "Best Practices",
+ recommended: true
+ },
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ props: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+ const options = context.options[0];
+ const props = Boolean(options && options.props);
+
+ /**
+ * Reports a given node as self assignments.
+ *
+ * @param {ASTNode} node - A node to report. This is an Identifier node.
+ * @returns {void}
+ */
+ function report(node) {
+ context.report({
+ node,
+ message: "'{{name}}' is assigned to itself.",
+ data: {
+ name: sourceCode.getText(node).replace(SPACES, "")
+ }
+ });
+ }
+
+ return {
+ AssignmentExpression(node) {
+ if (node.operator === "=") {
+ eachSelfAssignment(node.left, node.right, props, report);
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-self-compare.js b/tools/node_modules/eslint/lib/rules/no-self-compare.js
new file mode 100644
index 0000000000..5beaa181b9
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-self-compare.js
@@ -0,0 +1,53 @@
+/**
+ * @fileoverview Rule to flag comparison where left part is the same as the right
+ * part.
+ * @author Ilya Volodin
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow comparisons where both sides are exactly the same",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+
+ /**
+ * Determines whether two nodes are composed of the same tokens.
+ * @param {ASTNode} nodeA The first node
+ * @param {ASTNode} nodeB The second node
+ * @returns {boolean} true if the nodes have identical token representations
+ */
+ function hasSameTokens(nodeA, nodeB) {
+ const tokensA = sourceCode.getTokens(nodeA);
+ const tokensB = sourceCode.getTokens(nodeB);
+
+ return tokensA.length === tokensB.length &&
+ tokensA.every((token, index) => token.type === tokensB[index].type && token.value === tokensB[index].value);
+ }
+
+ return {
+
+ BinaryExpression(node) {
+ const operators = new Set(["===", "==", "!==", "!=", ">", "<", ">=", "<="]);
+
+ if (operators.has(node.operator) && hasSameTokens(node.left, node.right)) {
+ context.report({ node, message: "Comparing to itself is potentially pointless." });
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-sequences.js b/tools/node_modules/eslint/lib/rules/no-sequences.js
new file mode 100644
index 0000000000..5e746dfa88
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-sequences.js
@@ -0,0 +1,112 @@
+/**
+ * @fileoverview Rule to flag use of comma operator
+ * @author Brandon Mills
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow comma operators",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+
+ /**
+ * Parts of the grammar that are required to have parens.
+ */
+ const parenthesized = {
+ DoWhileStatement: "test",
+ IfStatement: "test",
+ SwitchStatement: "discriminant",
+ WhileStatement: "test",
+ WithStatement: "object",
+ ArrowFunctionExpression: "body"
+
+ /*
+ * Omitting CallExpression - commas are parsed as argument separators
+ * Omitting NewExpression - commas are parsed as argument separators
+ * Omitting ForInStatement - parts aren't individually parenthesised
+ * Omitting ForStatement - parts aren't individually parenthesised
+ */
+ };
+
+ /**
+ * Determines whether a node is required by the grammar to be wrapped in
+ * parens, e.g. the test of an if statement.
+ * @param {ASTNode} node - The AST node
+ * @returns {boolean} True if parens around node belong to parent node.
+ */
+ function requiresExtraParens(node) {
+ return node.parent && parenthesized[node.parent.type] &&
+ node === node.parent[parenthesized[node.parent.type]];
+ }
+
+ /**
+ * Check if a node is wrapped in parens.
+ * @param {ASTNode} node - The AST node
+ * @returns {boolean} True if the node has a paren on each side.
+ */
+ function isParenthesised(node) {
+ return astUtils.isParenthesised(sourceCode, node);
+ }
+
+ /**
+ * Check if a node is wrapped in two levels of parens.
+ * @param {ASTNode} node - The AST node
+ * @returns {boolean} True if two parens surround the node on each side.
+ */
+ function isParenthesisedTwice(node) {
+ const previousToken = sourceCode.getTokenBefore(node, 1),
+ nextToken = sourceCode.getTokenAfter(node, 1);
+
+ return isParenthesised(node) && previousToken && nextToken &&
+ astUtils.isOpeningParenToken(previousToken) && previousToken.range[1] <= node.range[0] &&
+ astUtils.isClosingParenToken(nextToken) && nextToken.range[0] >= node.range[1];
+ }
+
+ return {
+ SequenceExpression(node) {
+
+ // Always allow sequences in for statement update
+ if (node.parent.type === "ForStatement" &&
+ (node === node.parent.init || node === node.parent.update)) {
+ return;
+ }
+
+ // Wrapping a sequence in extra parens indicates intent
+ if (requiresExtraParens(node)) {
+ if (isParenthesisedTwice(node)) {
+ return;
+ }
+ } else {
+ if (isParenthesised(node)) {
+ return;
+ }
+ }
+
+ const child = sourceCode.getTokenAfter(node.expressions[0]);
+
+ context.report({ node, loc: child.loc.start, message: "Unexpected use of comma operator." });
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-shadow-restricted-names.js b/tools/node_modules/eslint/lib/rules/no-shadow-restricted-names.js
new file mode 100644
index 0000000000..6c60232b8b
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-shadow-restricted-names.js
@@ -0,0 +1,69 @@
+/**
+ * @fileoverview Disallow shadowing of NaN, undefined, and Infinity (ES5 section 15.1.1)
+ * @author Michael Ficarra
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow identifiers from shadowing restricted names",
+ category: "Variables",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ const RESTRICTED = ["undefined", "NaN", "Infinity", "arguments", "eval"];
+
+ /**
+ * Check if the node name is present inside the restricted list
+ * @param {ASTNode} id id to evaluate
+ * @returns {void}
+ * @private
+ */
+ function checkForViolation(id) {
+ if (RESTRICTED.indexOf(id.name) > -1) {
+ context.report({
+ node: id,
+ message: "Shadowing of global property '{{idName}}'.",
+ data: {
+ idName: id.name
+ }
+ });
+ }
+ }
+
+ return {
+ VariableDeclarator(node) {
+ checkForViolation(node.id);
+ },
+ ArrowFunctionExpression(node) {
+ [].map.call(node.params, checkForViolation);
+ },
+ FunctionExpression(node) {
+ if (node.id) {
+ checkForViolation(node.id);
+ }
+ [].map.call(node.params, checkForViolation);
+ },
+ FunctionDeclaration(node) {
+ if (node.id) {
+ checkForViolation(node.id);
+ [].map.call(node.params, checkForViolation);
+ }
+ },
+ CatchClause(node) {
+ checkForViolation(node.param);
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-shadow.js b/tools/node_modules/eslint/lib/rules/no-shadow.js
new file mode 100644
index 0000000000..e093d48c81
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-shadow.js
@@ -0,0 +1,188 @@
+/**
+ * @fileoverview Rule to flag on declaring variables already declared in the outer scope
+ * @author Ilya Volodin
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow variable declarations from shadowing variables declared in the outer scope",
+ category: "Variables",
+ recommended: false
+ },
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ builtinGlobals: { type: "boolean" },
+ hoist: { enum: ["all", "functions", "never"] },
+ allow: {
+ type: "array",
+ items: {
+ type: "string"
+ }
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+
+ const options = {
+ builtinGlobals: Boolean(context.options[0] && context.options[0].builtinGlobals),
+ hoist: (context.options[0] && context.options[0].hoist) || "functions",
+ allow: (context.options[0] && context.options[0].allow) || []
+ };
+
+ /**
+ * Check if variable name is allowed.
+ *
+ * @param {ASTNode} variable The variable to check.
+ * @returns {boolean} Whether or not the variable name is allowed.
+ */
+ function isAllowed(variable) {
+ return options.allow.indexOf(variable.name) !== -1;
+ }
+
+ /**
+ * Checks if a variable of the class name in the class scope of ClassDeclaration.
+ *
+ * ClassDeclaration creates two variables of its name into its outer scope and its class scope.
+ * So we should ignore the variable in the class scope.
+ *
+ * @param {Object} variable The variable to check.
+ * @returns {boolean} Whether or not the variable of the class name in the class scope of ClassDeclaration.
+ */
+ function isDuplicatedClassNameVariable(variable) {
+ const block = variable.scope.block;
+
+ return block.type === "ClassDeclaration" && block.id === variable.identifiers[0];
+ }
+
+ /**
+ * Checks if a variable is inside the initializer of scopeVar.
+ *
+ * To avoid reporting at declarations such as `var a = function a() {};`.
+ * But it should report `var a = function(a) {};` or `var a = function() { function a() {} };`.
+ *
+ * @param {Object} variable The variable to check.
+ * @param {Object} scopeVar The scope variable to look for.
+ * @returns {boolean} Whether or not the variable is inside initializer of scopeVar.
+ */
+ function isOnInitializer(variable, scopeVar) {
+ const outerScope = scopeVar.scope;
+ const outerDef = scopeVar.defs[0];
+ const outer = outerDef && outerDef.parent && outerDef.parent.range;
+ const innerScope = variable.scope;
+ const innerDef = variable.defs[0];
+ const inner = innerDef && innerDef.name.range;
+
+ return (
+ outer &&
+ inner &&
+ outer[0] < inner[0] &&
+ inner[1] < outer[1] &&
+ ((innerDef.type === "FunctionName" && innerDef.node.type === "FunctionExpression") || innerDef.node.type === "ClassExpression") &&
+ outerScope === innerScope.upper
+ );
+ }
+
+ /**
+ * Get a range of a variable's identifier node.
+ * @param {Object} variable The variable to get.
+ * @returns {Array|undefined} The range of the variable's identifier node.
+ */
+ function getNameRange(variable) {
+ const def = variable.defs[0];
+
+ return def && def.name.range;
+ }
+
+ /**
+ * Checks if a variable is in TDZ of scopeVar.
+ * @param {Object} variable The variable to check.
+ * @param {Object} scopeVar The variable of TDZ.
+ * @returns {boolean} Whether or not the variable is in TDZ of scopeVar.
+ */
+ function isInTdz(variable, scopeVar) {
+ const outerDef = scopeVar.defs[0];
+ const inner = getNameRange(variable);
+ const outer = getNameRange(scopeVar);
+
+ return (
+ inner &&
+ outer &&
+ inner[1] < outer[0] &&
+
+ // Excepts FunctionDeclaration if is {"hoist":"function"}.
+ (options.hoist !== "functions" || !outerDef || outerDef.node.type !== "FunctionDeclaration")
+ );
+ }
+
+ /**
+ * Checks the current context for shadowed variables.
+ * @param {Scope} scope - Fixme
+ * @returns {void}
+ */
+ function checkForShadows(scope) {
+ const variables = scope.variables;
+
+ for (let i = 0; i < variables.length; ++i) {
+ const variable = variables[i];
+
+ // Skips "arguments" or variables of a class name in the class scope of ClassDeclaration.
+ if (variable.identifiers.length === 0 ||
+ isDuplicatedClassNameVariable(variable) ||
+ isAllowed(variable)
+ ) {
+ continue;
+ }
+
+ // Gets shadowed variable.
+ const shadowed = astUtils.getVariableByName(scope.upper, variable.name);
+
+ if (shadowed &&
+ (shadowed.identifiers.length > 0 || (options.builtinGlobals && "writeable" in shadowed)) &&
+ !isOnInitializer(variable, shadowed) &&
+ !(options.hoist !== "all" && isInTdz(variable, shadowed))
+ ) {
+ context.report({
+ node: variable.identifiers[0],
+ message: "'{{name}}' is already declared in the upper scope.",
+ data: variable
+ });
+ }
+ }
+ }
+
+ return {
+ "Program:exit"() {
+ const globalScope = context.getScope();
+ const stack = globalScope.childScopes.slice();
+
+ while (stack.length) {
+ const scope = stack.pop();
+
+ stack.push.apply(stack, scope.childScopes);
+ checkForShadows(scope);
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-spaced-func.js b/tools/node_modules/eslint/lib/rules/no-spaced-func.js
new file mode 100644
index 0000000000..361c1e0cd7
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-spaced-func.js
@@ -0,0 +1,75 @@
+/**
+ * @fileoverview Rule to check that spaced function application
+ * @author Matt DuVall <http://www.mattduvall.com>
+ * @deprecated in ESLint v3.3.0
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow spacing between function identifiers and their applications (deprecated)",
+ category: "Stylistic Issues",
+ recommended: false,
+ replacedBy: ["func-call-spacing"]
+ },
+
+ deprecated: true,
+
+ fixable: "whitespace",
+ schema: []
+ },
+
+ create(context) {
+
+ const sourceCode = context.getSourceCode();
+
+ /**
+ * Check if open space is present in a function name
+ * @param {ASTNode} node node to evaluate
+ * @returns {void}
+ * @private
+ */
+ function detectOpenSpaces(node) {
+ const lastCalleeToken = sourceCode.getLastToken(node.callee);
+ let prevToken = lastCalleeToken,
+ parenToken = sourceCode.getTokenAfter(lastCalleeToken);
+
+ // advances to an open parenthesis.
+ while (
+ parenToken &&
+ parenToken.range[1] < node.range[1] &&
+ parenToken.value !== "("
+ ) {
+ prevToken = parenToken;
+ parenToken = sourceCode.getTokenAfter(parenToken);
+ }
+
+ // look for a space between the callee and the open paren
+ if (parenToken &&
+ parenToken.range[1] < node.range[1] &&
+ sourceCode.isSpaceBetweenTokens(prevToken, parenToken)
+ ) {
+ context.report({
+ node,
+ loc: lastCalleeToken.loc.start,
+ message: "Unexpected space between function name and paren.",
+ fix(fixer) {
+ return fixer.removeRange([prevToken.range[1], parenToken.range[0]]);
+ }
+ });
+ }
+ }
+
+ return {
+ CallExpression: detectOpenSpaces,
+ NewExpression: detectOpenSpaces
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-sparse-arrays.js b/tools/node_modules/eslint/lib/rules/no-sparse-arrays.js
new file mode 100644
index 0000000000..3044896c61
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-sparse-arrays.js
@@ -0,0 +1,43 @@
+/**
+ * @fileoverview Disallow sparse arrays
+ * @author Nicholas C. Zakas
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow sparse arrays",
+ category: "Possible Errors",
+ recommended: true
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+
+ ArrayExpression(node) {
+
+ const emptySpot = node.elements.indexOf(null) > -1;
+
+ if (emptySpot) {
+ context.report({ node, message: "Unexpected comma in middle of array." });
+ }
+ }
+
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-sync.js b/tools/node_modules/eslint/lib/rules/no-sync.js
new file mode 100644
index 0000000000..06305969a1
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-sync.js
@@ -0,0 +1,53 @@
+/**
+ * @fileoverview Rule to check for properties whose identifier ends with the string Sync
+ * @author Matt DuVall<http://mattduvall.com/>
+ */
+
+/* jshint node:true */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow synchronous methods",
+ category: "Node.js and CommonJS",
+ recommended: false
+ },
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ allowAtRootLevel: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+ const selector = context.options[0] && context.options[0].allowAtRootLevel
+ ? ":function MemberExpression[property.name=/.*Sync$/]"
+ : "MemberExpression[property.name=/.*Sync$/]";
+
+ return {
+ [selector](node) {
+ context.report({
+ node,
+ message: "Unexpected sync method: '{{propertyName}}'.",
+ data: {
+ propertyName: node.property.name
+ }
+ });
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-tabs.js b/tools/node_modules/eslint/lib/rules/no-tabs.js
new file mode 100644
index 0000000000..4bab96f387
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-tabs.js
@@ -0,0 +1,47 @@
+/**
+ * @fileoverview Rule to check for tabs inside a file
+ * @author Gyandeep Singh
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+const regex = /\t/;
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow all tabs",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+ schema: []
+ },
+
+ create(context) {
+ return {
+ Program(node) {
+ context.getSourceCode().getLines().forEach((line, index) => {
+ const match = regex.exec(line);
+
+ if (match) {
+ context.report({
+ node,
+ loc: {
+ line: index + 1,
+ column: match.index + 1
+ },
+ message: "Unexpected tab character."
+ });
+ }
+ });
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-template-curly-in-string.js b/tools/node_modules/eslint/lib/rules/no-template-curly-in-string.js
new file mode 100644
index 0000000000..d8f6c31108
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-template-curly-in-string.js
@@ -0,0 +1,37 @@
+/**
+ * @fileoverview Warn when using template string syntax in regular strings
+ * @author Jeroen Engels
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow template literal placeholder syntax in regular strings",
+ category: "Possible Errors",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+ const regex = /\$\{[^}]+\}/;
+
+ return {
+ Literal(node) {
+ if (typeof node.value === "string" && regex.test(node.value)) {
+ context.report({
+ node,
+ message: "Unexpected template string expression."
+ });
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-ternary.js b/tools/node_modules/eslint/lib/rules/no-ternary.js
new file mode 100644
index 0000000000..3e254f6812
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-ternary.js
@@ -0,0 +1,34 @@
+/**
+ * @fileoverview Rule to flag use of ternary operators.
+ * @author Ian Christian Myers
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow ternary operators",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ return {
+
+ ConditionalExpression(node) {
+ context.report({ node, message: "Ternary operator used." });
+ }
+
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-this-before-super.js b/tools/node_modules/eslint/lib/rules/no-this-before-super.js
new file mode 100644
index 0000000000..2a686ac72e
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-this-before-super.js
@@ -0,0 +1,299 @@
+/**
+ * @fileoverview A rule to disallow using `this`/`super` before `super()`.
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Checks whether or not a given node is a constructor.
+ * @param {ASTNode} node - A node to check. This node type is one of
+ * `Program`, `FunctionDeclaration`, `FunctionExpression`, and
+ * `ArrowFunctionExpression`.
+ * @returns {boolean} `true` if the node is a constructor.
+ */
+function isConstructorFunction(node) {
+ return (
+ node.type === "FunctionExpression" &&
+ node.parent.type === "MethodDefinition" &&
+ node.parent.kind === "constructor"
+ );
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow `this`/`super` before calling `super()` in constructors",
+ category: "ECMAScript 6",
+ recommended: true
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ /*
+ * Information for each constructor.
+ * - upper: Information of the upper constructor.
+ * - hasExtends: A flag which shows whether the owner class has a valid
+ * `extends` part.
+ * - scope: The scope of the owner class.
+ * - codePath: The code path of this constructor.
+ */
+ let funcInfo = null;
+
+ /*
+ * Information for each code path segment.
+ * Each key is the id of a code path segment.
+ * Each value is an object:
+ * - superCalled: The flag which shows `super()` called in all code paths.
+ * - invalidNodes: The array of invalid ThisExpression and Super nodes.
+ */
+ let segInfoMap = Object.create(null);
+
+ /**
+ * Gets whether or not `super()` is called in a given code path segment.
+ * @param {CodePathSegment} segment - A code path segment to get.
+ * @returns {boolean} `true` if `super()` is called.
+ */
+ function isCalled(segment) {
+ return !segment.reachable || segInfoMap[segment.id].superCalled;
+ }
+
+ /**
+ * Checks whether or not this is in a constructor.
+ * @returns {boolean} `true` if this is in a constructor.
+ */
+ function isInConstructorOfDerivedClass() {
+ return Boolean(funcInfo && funcInfo.isConstructor && funcInfo.hasExtends);
+ }
+
+ /**
+ * Checks whether or not this is before `super()` is called.
+ * @returns {boolean} `true` if this is before `super()` is called.
+ */
+ function isBeforeCallOfSuper() {
+ return (
+ isInConstructorOfDerivedClass() &&
+ !funcInfo.codePath.currentSegments.every(isCalled)
+ );
+ }
+
+ /**
+ * Sets a given node as invalid.
+ * @param {ASTNode} node - A node to set as invalid. This is one of
+ * a ThisExpression and a Super.
+ * @returns {void}
+ */
+ function setInvalid(node) {
+ const segments = funcInfo.codePath.currentSegments;
+
+ for (let i = 0; i < segments.length; ++i) {
+ const segment = segments[i];
+
+ if (segment.reachable) {
+ segInfoMap[segment.id].invalidNodes.push(node);
+ }
+ }
+ }
+
+ /**
+ * Sets the current segment as `super` was called.
+ * @returns {void}
+ */
+ function setSuperCalled() {
+ const segments = funcInfo.codePath.currentSegments;
+
+ for (let i = 0; i < segments.length; ++i) {
+ const segment = segments[i];
+
+ if (segment.reachable) {
+ segInfoMap[segment.id].superCalled = true;
+ }
+ }
+ }
+
+ return {
+
+ /**
+ * Adds information of a constructor into the stack.
+ * @param {CodePath} codePath - A code path which was started.
+ * @param {ASTNode} node - The current node.
+ * @returns {void}
+ */
+ onCodePathStart(codePath, node) {
+ if (isConstructorFunction(node)) {
+
+ // Class > ClassBody > MethodDefinition > FunctionExpression
+ const classNode = node.parent.parent.parent;
+
+ funcInfo = {
+ upper: funcInfo,
+ isConstructor: true,
+ hasExtends: Boolean(
+ classNode.superClass &&
+ !astUtils.isNullOrUndefined(classNode.superClass)
+ ),
+ codePath
+ };
+ } else {
+ funcInfo = {
+ upper: funcInfo,
+ isConstructor: false,
+ hasExtends: false,
+ codePath
+ };
+ }
+ },
+
+ /**
+ * Removes the top of stack item.
+ *
+ * And this treverses all segments of this code path then reports every
+ * invalid node.
+ *
+ * @param {CodePath} codePath - A code path which was ended.
+ * @param {ASTNode} node - The current node.
+ * @returns {void}
+ */
+ onCodePathEnd(codePath) {
+ const isDerivedClass = funcInfo.hasExtends;
+
+ funcInfo = funcInfo.upper;
+ if (!isDerivedClass) {
+ return;
+ }
+
+ codePath.traverseSegments((segment, controller) => {
+ const info = segInfoMap[segment.id];
+
+ for (let i = 0; i < info.invalidNodes.length; ++i) {
+ const invalidNode = info.invalidNodes[i];
+
+ context.report({
+ message: "'{{kind}}' is not allowed before 'super()'.",
+ node: invalidNode,
+ data: {
+ kind: invalidNode.type === "Super" ? "super" : "this"
+ }
+ });
+ }
+
+ if (info.superCalled) {
+ controller.skip();
+ }
+ });
+ },
+
+ /**
+ * Initialize information of a given code path segment.
+ * @param {CodePathSegment} segment - A code path segment to initialize.
+ * @returns {void}
+ */
+ onCodePathSegmentStart(segment) {
+ if (!isInConstructorOfDerivedClass()) {
+ return;
+ }
+
+ // Initialize info.
+ segInfoMap[segment.id] = {
+ superCalled: (
+ segment.prevSegments.length > 0 &&
+ segment.prevSegments.every(isCalled)
+ ),
+ invalidNodes: []
+ };
+ },
+
+ /**
+ * Update information of the code path segment when a code path was
+ * looped.
+ * @param {CodePathSegment} fromSegment - The code path segment of the
+ * end of a loop.
+ * @param {CodePathSegment} toSegment - A code path segment of the head
+ * of a loop.
+ * @returns {void}
+ */
+ onCodePathSegmentLoop(fromSegment, toSegment) {
+ if (!isInConstructorOfDerivedClass()) {
+ return;
+ }
+
+ // Update information inside of the loop.
+ funcInfo.codePath.traverseSegments(
+ { first: toSegment, last: fromSegment },
+ (segment, controller) => {
+ const info = segInfoMap[segment.id];
+
+ if (info.superCalled) {
+ info.invalidNodes = [];
+ controller.skip();
+ } else if (
+ segment.prevSegments.length > 0 &&
+ segment.prevSegments.every(isCalled)
+ ) {
+ info.superCalled = true;
+ info.invalidNodes = [];
+ }
+ }
+ );
+ },
+
+ /**
+ * Reports if this is before `super()`.
+ * @param {ASTNode} node - A target node.
+ * @returns {void}
+ */
+ ThisExpression(node) {
+ if (isBeforeCallOfSuper()) {
+ setInvalid(node);
+ }
+ },
+
+ /**
+ * Reports if this is before `super()`.
+ * @param {ASTNode} node - A target node.
+ * @returns {void}
+ */
+ Super(node) {
+ if (!astUtils.isCallee(node) && isBeforeCallOfSuper()) {
+ setInvalid(node);
+ }
+ },
+
+ /**
+ * Marks `super()` called.
+ * @param {ASTNode} node - A target node.
+ * @returns {void}
+ */
+ "CallExpression:exit"(node) {
+ if (node.callee.type === "Super" && isBeforeCallOfSuper()) {
+ setSuperCalled();
+ }
+ },
+
+ /**
+ * Resets state.
+ * @returns {void}
+ */
+ "Program:exit"() {
+ segInfoMap = Object.create(null);
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-throw-literal.js b/tools/node_modules/eslint/lib/rules/no-throw-literal.js
new file mode 100644
index 0000000000..5e9054399a
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-throw-literal.js
@@ -0,0 +1,43 @@
+/**
+ * @fileoverview Rule to restrict what can be thrown as an exception.
+ * @author Dieter Oberkofler
+ */
+
+"use strict";
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow throwing literals as exceptions",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ return {
+
+ ThrowStatement(node) {
+ if (!astUtils.couldBeError(node.argument)) {
+ context.report({ node, message: "Expected an object to be thrown." });
+ } else if (node.argument.type === "Identifier") {
+ if (node.argument.name === "undefined") {
+ context.report({ node, message: "Do not throw undefined." });
+ }
+ }
+
+ }
+
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-trailing-spaces.js b/tools/node_modules/eslint/lib/rules/no-trailing-spaces.js
new file mode 100644
index 0000000000..fbbc640217
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-trailing-spaces.js
@@ -0,0 +1,169 @@
+/**
+ * @fileoverview Disallow trailing spaces at the end of lines.
+ * @author Nodeca Team <https://github.com/nodeca>
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow trailing whitespace at the end of lines",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ fixable: "whitespace",
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ skipBlankLines: {
+ type: "boolean"
+ },
+ ignoreComments: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+
+ const BLANK_CLASS = "[ \t\u00a0\u2000-\u200b\u3000]",
+ SKIP_BLANK = `^${BLANK_CLASS}*$`,
+ NONBLANK = `${BLANK_CLASS}+$`;
+
+ const options = context.options[0] || {},
+ skipBlankLines = options.skipBlankLines || false,
+ ignoreComments = typeof options.ignoreComments === "boolean" && options.ignoreComments;
+
+ /**
+ * Report the error message
+ * @param {ASTNode} node node to report
+ * @param {int[]} location range information
+ * @param {int[]} fixRange Range based on the whole program
+ * @returns {void}
+ */
+ function report(node, location, fixRange) {
+
+ /*
+ * Passing node is a bit dirty, because message data will contain big
+ * text in `source`. But... who cares :) ?
+ * One more kludge will not make worse the bloody wizardry of this
+ * plugin.
+ */
+ context.report({
+ node,
+ loc: location,
+ message: "Trailing spaces not allowed.",
+ fix(fixer) {
+ return fixer.removeRange(fixRange);
+ }
+ });
+ }
+
+ /**
+ * Given a list of comment nodes, return the line numbers for those comments.
+ * @param {Array} comments An array of comment nodes.
+ * @returns {number[]} An array of line numbers containing comments.
+ */
+ function getCommentLineNumbers(comments) {
+ const lines = new Set();
+
+ comments.forEach(comment => {
+ for (let i = comment.loc.start.line; i <= comment.loc.end.line; i++) {
+ lines.add(i);
+ }
+ });
+
+ return lines;
+ }
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+
+ Program: function checkTrailingSpaces(node) {
+
+ /*
+ * Let's hack. Since Espree does not return whitespace nodes,
+ * fetch the source code and do matching via regexps.
+ */
+
+ const re = new RegExp(NONBLANK),
+ skipMatch = new RegExp(SKIP_BLANK),
+ lines = sourceCode.lines,
+ linebreaks = sourceCode.getText().match(astUtils.createGlobalLinebreakMatcher()),
+ comments = sourceCode.getAllComments(),
+ commentLineNumbers = getCommentLineNumbers(comments);
+
+ let totalLength = 0,
+ fixRange = [];
+
+ for (let i = 0, ii = lines.length; i < ii; i++) {
+ const matches = re.exec(lines[i]);
+
+ /*
+ * Always add linebreak length to line length to accommodate for line break (\n or \r\n)
+ * Because during the fix time they also reserve one spot in the array.
+ * Usually linebreak length is 2 for \r\n (CRLF) and 1 for \n (LF)
+ */
+ const linebreakLength = linebreaks && linebreaks[i] ? linebreaks[i].length : 1;
+ const lineLength = lines[i].length + linebreakLength;
+
+ if (matches) {
+ const location = {
+ line: i + 1,
+ column: matches.index
+ };
+
+ const rangeStart = totalLength + location.column;
+ const rangeEnd = totalLength + lineLength - linebreakLength;
+ const containingNode = sourceCode.getNodeByRangeIndex(rangeStart);
+
+ if (containingNode && containingNode.type === "TemplateElement" &&
+ rangeStart > containingNode.parent.range[0] &&
+ rangeEnd < containingNode.parent.range[1]) {
+ totalLength += lineLength;
+ continue;
+ }
+
+ /*
+ * If the line has only whitespace, and skipBlankLines
+ * is true, don't report it
+ */
+ if (skipBlankLines && skipMatch.test(lines[i])) {
+ totalLength += lineLength;
+ continue;
+ }
+
+ fixRange = [rangeStart, rangeEnd];
+
+ if (!ignoreComments || !commentLineNumbers.has(location.line)) {
+ report(node, location, fixRange);
+ }
+ }
+
+ totalLength += lineLength;
+ }
+ }
+
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-undef-init.js b/tools/node_modules/eslint/lib/rules/no-undef-init.js
new file mode 100644
index 0000000000..7e58f55a69
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-undef-init.js
@@ -0,0 +1,63 @@
+/**
+ * @fileoverview Rule to flag when initializing to undefined
+ * @author Ilya Volodin
+ */
+
+"use strict";
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow initializing variables to `undefined`",
+ category: "Variables",
+ recommended: false
+ },
+
+ schema: [],
+
+ fixable: "code"
+ },
+
+ create(context) {
+
+ const sourceCode = context.getSourceCode();
+
+ return {
+
+ VariableDeclarator(node) {
+ const name = sourceCode.getText(node.id),
+ init = node.init && node.init.name,
+ scope = context.getScope(),
+ undefinedVar = astUtils.getVariableByName(scope, "undefined"),
+ shadowed = undefinedVar && undefinedVar.defs.length > 0;
+
+ if (init === "undefined" && node.parent.kind !== "const" && !shadowed) {
+ context.report({
+ node,
+ message: "It's not necessary to initialize '{{name}}' to undefined.",
+ data: { name },
+ fix(fixer) {
+ if (node.parent.kind === "var") {
+ return null;
+ }
+
+ if (node.id.type === "ArrayPattern" || node.id.type === "ObjectPattern") {
+
+ // Don't fix destructuring assignment to `undefined`.
+ return null;
+ }
+ return fixer.removeRange([node.id.range[1], node.range[1]]);
+ }
+ });
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-undef.js b/tools/node_modules/eslint/lib/rules/no-undef.js
new file mode 100644
index 0000000000..74a33dd997
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-undef.js
@@ -0,0 +1,71 @@
+/**
+ * @fileoverview Rule to flag references to undeclared variables.
+ * @author Mark Macdonald
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Checks if the given node is the argument of a typeof operator.
+ * @param {ASTNode} node The AST node being checked.
+ * @returns {boolean} Whether or not the node is the argument of a typeof operator.
+ */
+function hasTypeOfOperator(node) {
+ const parent = node.parent;
+
+ return parent.type === "UnaryExpression" && parent.operator === "typeof";
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow the use of undeclared variables unless mentioned in `/*global */` comments",
+ category: "Variables",
+ recommended: true
+ },
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ typeof: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+ const options = context.options[0];
+ const considerTypeOf = options && options.typeof === true || false;
+
+ return {
+ "Program:exit"(/* node */) {
+ const globalScope = context.getScope();
+
+ globalScope.through.forEach(ref => {
+ const identifier = ref.identifier;
+
+ if (!considerTypeOf && hasTypeOfOperator(identifier)) {
+ return;
+ }
+
+ context.report({
+ node: identifier,
+ message: "'{{name}}' is not defined.",
+ data: identifier
+ });
+ });
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-undefined.js b/tools/node_modules/eslint/lib/rules/no-undefined.js
new file mode 100644
index 0000000000..7e9f96b921
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-undefined.js
@@ -0,0 +1,77 @@
+/**
+ * @fileoverview Rule to flag references to the undefined variable.
+ * @author Michael Ficarra
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow the use of `undefined` as an identifier",
+ category: "Variables",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ /**
+ * Report an invalid "undefined" identifier node.
+ * @param {ASTNode} node The node to report.
+ * @returns {void}
+ */
+ function report(node) {
+ context.report({
+ node,
+ message: "Unexpected use of undefined."
+ });
+ }
+
+ /**
+ * Checks the given scope for references to `undefined` and reports
+ * all references found.
+ * @param {eslint-scope.Scope} scope The scope to check.
+ * @returns {void}
+ */
+ function checkScope(scope) {
+ const undefinedVar = scope.set.get("undefined");
+
+ if (!undefinedVar) {
+ return;
+ }
+
+ const references = undefinedVar.references;
+
+ const defs = undefinedVar.defs;
+
+ // Report non-initializing references (those are covered in defs below)
+ references
+ .filter(ref => !ref.init)
+ .forEach(ref => report(ref.identifier));
+
+ defs.forEach(def => report(def.name));
+ }
+
+ return {
+ "Program:exit"() {
+ const globalScope = context.getScope();
+
+ const stack = [globalScope];
+
+ while (stack.length) {
+ const scope = stack.pop();
+
+ stack.push.apply(stack, scope.childScopes);
+ checkScope(scope);
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-underscore-dangle.js b/tools/node_modules/eslint/lib/rules/no-underscore-dangle.js
new file mode 100644
index 0000000000..5964da41cd
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-underscore-dangle.js
@@ -0,0 +1,203 @@
+/**
+ * @fileoverview Rule to flag trailing underscores in variable declarations.
+ * @author Matt DuVall <http://www.mattduvall.com>
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow dangling underscores in identifiers",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ allow: {
+ type: "array",
+ items: {
+ type: "string"
+ }
+ },
+ allowAfterThis: {
+ type: "boolean"
+ },
+ allowAfterSuper: {
+ type: "boolean"
+ },
+ enforceInMethodNames: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+
+ const options = context.options[0] || {};
+ const ALLOWED_VARIABLES = options.allow ? options.allow : [];
+ const allowAfterThis = typeof options.allowAfterThis !== "undefined" ? options.allowAfterThis : false;
+ const allowAfterSuper = typeof options.allowAfterSuper !== "undefined" ? options.allowAfterSuper : false;
+ const enforceInMethodNames = typeof options.enforceInMethodNames !== "undefined" ? options.enforceInMethodNames : false;
+
+ //-------------------------------------------------------------------------
+ // Helpers
+ //-------------------------------------------------------------------------
+
+ /**
+ * Check if identifier is present inside the allowed option
+ * @param {string} identifier name of the node
+ * @returns {boolean} true if its is present
+ * @private
+ */
+ function isAllowed(identifier) {
+ return ALLOWED_VARIABLES.some(ident => ident === identifier);
+ }
+
+ /**
+ * Check if identifier has a underscore at the end
+ * @param {ASTNode} identifier node to evaluate
+ * @returns {boolean} true if its is present
+ * @private
+ */
+ function hasTrailingUnderscore(identifier) {
+ const len = identifier.length;
+
+ return identifier !== "_" && (identifier[0] === "_" || identifier[len - 1] === "_");
+ }
+
+ /**
+ * Check if identifier is a special case member expression
+ * @param {ASTNode} identifier node to evaluate
+ * @returns {boolean} true if its is a special case
+ * @private
+ */
+ function isSpecialCaseIdentifierForMemberExpression(identifier) {
+ return identifier === "__proto__";
+ }
+
+ /**
+ * Check if identifier is a special case variable expression
+ * @param {ASTNode} identifier node to evaluate
+ * @returns {boolean} true if its is a special case
+ * @private
+ */
+ function isSpecialCaseIdentifierInVariableExpression(identifier) {
+
+ // Checks for the underscore library usage here
+ return identifier === "_";
+ }
+
+ /**
+ * Check if function has a underscore at the end
+ * @param {ASTNode} node node to evaluate
+ * @returns {void}
+ * @private
+ */
+ function checkForTrailingUnderscoreInFunctionDeclaration(node) {
+ if (node.id) {
+ const identifier = node.id.name;
+
+ if (typeof identifier !== "undefined" && hasTrailingUnderscore(identifier) && !isAllowed(identifier)) {
+ context.report({
+ node,
+ message: "Unexpected dangling '_' in '{{identifier}}'.",
+ data: {
+ identifier
+ }
+ });
+ }
+ }
+ }
+
+ /**
+ * Check if variable expression has a underscore at the end
+ * @param {ASTNode} node node to evaluate
+ * @returns {void}
+ * @private
+ */
+ function checkForTrailingUnderscoreInVariableExpression(node) {
+ const identifier = node.id.name;
+
+ if (typeof identifier !== "undefined" && hasTrailingUnderscore(identifier) &&
+ !isSpecialCaseIdentifierInVariableExpression(identifier) && !isAllowed(identifier)) {
+ context.report({
+ node,
+ message: "Unexpected dangling '_' in '{{identifier}}'.",
+ data: {
+ identifier
+ }
+ });
+ }
+ }
+
+ /**
+ * Check if member expression has a underscore at the end
+ * @param {ASTNode} node node to evaluate
+ * @returns {void}
+ * @private
+ */
+ function checkForTrailingUnderscoreInMemberExpression(node) {
+ const identifier = node.property.name,
+ isMemberOfThis = node.object.type === "ThisExpression",
+ isMemberOfSuper = node.object.type === "Super";
+
+ if (typeof identifier !== "undefined" && hasTrailingUnderscore(identifier) &&
+ !(isMemberOfThis && allowAfterThis) &&
+ !(isMemberOfSuper && allowAfterSuper) &&
+ !isSpecialCaseIdentifierForMemberExpression(identifier) && !isAllowed(identifier)) {
+ context.report({
+ node,
+ message: "Unexpected dangling '_' in '{{identifier}}'.",
+ data: {
+ identifier
+ }
+ });
+ }
+ }
+
+ /**
+ * Check if method declaration or method property has a underscore at the end
+ * @param {ASTNode} node node to evaluate
+ * @returns {void}
+ * @private
+ */
+ function checkForTrailingUnderscoreInMethod(node) {
+ const identifier = node.key.name;
+ const isMethod = node.type === "MethodDefinition" || node.type === "Property" && node.method;
+
+ if (typeof identifier !== "undefined" && enforceInMethodNames && isMethod && hasTrailingUnderscore(identifier)) {
+ context.report({
+ node,
+ message: "Unexpected dangling '_' in '{{identifier}}'.",
+ data: {
+ identifier
+ }
+ });
+ }
+ }
+
+ //--------------------------------------------------------------------------
+ // Public API
+ //--------------------------------------------------------------------------
+
+ return {
+ FunctionDeclaration: checkForTrailingUnderscoreInFunctionDeclaration,
+ VariableDeclarator: checkForTrailingUnderscoreInVariableExpression,
+ MemberExpression: checkForTrailingUnderscoreInMemberExpression,
+ MethodDefinition: checkForTrailingUnderscoreInMethod,
+ Property: checkForTrailingUnderscoreInMethod
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-unexpected-multiline.js b/tools/node_modules/eslint/lib/rules/no-unexpected-multiline.js
new file mode 100644
index 0000000000..9398b8a603
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-unexpected-multiline.js
@@ -0,0 +1,98 @@
+/**
+ * @fileoverview Rule to spot scenarios where a newline looks like it is ending a statement, but is not.
+ * @author Glen Mailer
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow confusing multiline expressions",
+ category: "Possible Errors",
+ recommended: true
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ const FUNCTION_MESSAGE = "Unexpected newline between function and ( of function call.";
+ const PROPERTY_MESSAGE = "Unexpected newline between object and [ of property access.";
+ const TAGGED_TEMPLATE_MESSAGE = "Unexpected newline between template tag and template literal.";
+ const DIVISION_MESSAGE = "Unexpected newline between numerator and division operator.";
+
+ const REGEX_FLAG_MATCHER = /^[gimuy]+$/;
+
+ const sourceCode = context.getSourceCode();
+
+ /**
+ * Check to see if there is a newline between the node and the following open bracket
+ * line's expression
+ * @param {ASTNode} node The node to check.
+ * @param {string} msg The error message to use.
+ * @returns {void}
+ * @private
+ */
+ function checkForBreakAfter(node, msg) {
+ const openParen = sourceCode.getTokenAfter(node, astUtils.isNotClosingParenToken);
+ const nodeExpressionEnd = sourceCode.getTokenBefore(openParen);
+
+ if (openParen.loc.start.line !== nodeExpressionEnd.loc.end.line) {
+ context.report({ node, loc: openParen.loc.start, message: msg, data: { char: openParen.value } });
+ }
+ }
+
+ //--------------------------------------------------------------------------
+ // Public API
+ //--------------------------------------------------------------------------
+
+ return {
+
+ MemberExpression(node) {
+ if (!node.computed) {
+ return;
+ }
+ checkForBreakAfter(node.object, PROPERTY_MESSAGE);
+ },
+
+ TaggedTemplateExpression(node) {
+ if (node.tag.loc.end.line === node.quasi.loc.start.line) {
+ return;
+ }
+ context.report({ node, loc: node.loc.start, message: TAGGED_TEMPLATE_MESSAGE });
+ },
+
+ CallExpression(node) {
+ if (node.arguments.length === 0) {
+ return;
+ }
+ checkForBreakAfter(node.callee, FUNCTION_MESSAGE);
+ },
+
+ "BinaryExpression[operator='/'] > BinaryExpression[operator='/'].left"(node) {
+ const secondSlash = sourceCode.getTokenAfter(node, token => token.value === "/");
+ const tokenAfterOperator = sourceCode.getTokenAfter(secondSlash);
+
+ if (
+ tokenAfterOperator.type === "Identifier" &&
+ REGEX_FLAG_MATCHER.test(tokenAfterOperator.value) &&
+ secondSlash.range[1] === tokenAfterOperator.range[0]
+ ) {
+ checkForBreakAfter(node.left, DIVISION_MESSAGE);
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-unmodified-loop-condition.js b/tools/node_modules/eslint/lib/rules/no-unmodified-loop-condition.js
new file mode 100644
index 0000000000..49dff0d0ce
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-unmodified-loop-condition.js
@@ -0,0 +1,366 @@
+/**
+ * @fileoverview Rule to disallow use of unmodified expressions in loop conditions
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const Traverser = require("../util/traverser"),
+ astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+const pushAll = Function.apply.bind(Array.prototype.push);
+const SENTINEL_PATTERN = /(?:(?:Call|Class|Function|Member|New|Yield)Expression|Statement|Declaration)$/;
+const LOOP_PATTERN = /^(?:DoWhile|For|While)Statement$/; // for-in/of statements don't have `test` property.
+const GROUP_PATTERN = /^(?:BinaryExpression|ConditionalExpression)$/;
+const SKIP_PATTERN = /^(?:ArrowFunction|Class|Function)Expression$/;
+const DYNAMIC_PATTERN = /^(?:Call|Member|New|TaggedTemplate|Yield)Expression$/;
+
+/**
+ * @typedef {Object} LoopConditionInfo
+ * @property {eslint-scope.Reference} reference - The reference.
+ * @property {ASTNode} group - BinaryExpression or ConditionalExpression nodes
+ * that the reference is belonging to.
+ * @property {Function} isInLoop - The predicate which checks a given reference
+ * is in this loop.
+ * @property {boolean} modified - The flag that the reference is modified in
+ * this loop.
+ */
+
+/**
+ * Checks whether or not a given reference is a write reference.
+ *
+ * @param {eslint-scope.Reference} reference - A reference to check.
+ * @returns {boolean} `true` if the reference is a write reference.
+ */
+function isWriteReference(reference) {
+ if (reference.init) {
+ const def = reference.resolved && reference.resolved.defs[0];
+
+ if (!def || def.type !== "Variable" || def.parent.kind !== "var") {
+ return false;
+ }
+ }
+ return reference.isWrite();
+}
+
+/**
+ * Checks whether or not a given loop condition info does not have the modified
+ * flag.
+ *
+ * @param {LoopConditionInfo} condition - A loop condition info to check.
+ * @returns {boolean} `true` if the loop condition info is "unmodified".
+ */
+function isUnmodified(condition) {
+ return !condition.modified;
+}
+
+/**
+ * Checks whether or not a given loop condition info does not have the modified
+ * flag and does not have the group this condition belongs to.
+ *
+ * @param {LoopConditionInfo} condition - A loop condition info to check.
+ * @returns {boolean} `true` if the loop condition info is "unmodified".
+ */
+function isUnmodifiedAndNotBelongToGroup(condition) {
+ return !(condition.modified || condition.group);
+}
+
+/**
+ * Checks whether or not a given reference is inside of a given node.
+ *
+ * @param {ASTNode} node - A node to check.
+ * @param {eslint-scope.Reference} reference - A reference to check.
+ * @returns {boolean} `true` if the reference is inside of the node.
+ */
+function isInRange(node, reference) {
+ const or = node.range;
+ const ir = reference.identifier.range;
+
+ return or[0] <= ir[0] && ir[1] <= or[1];
+}
+
+/**
+ * Checks whether or not a given reference is inside of a loop node's condition.
+ *
+ * @param {ASTNode} node - A node to check.
+ * @param {eslint-scope.Reference} reference - A reference to check.
+ * @returns {boolean} `true` if the reference is inside of the loop node's
+ * condition.
+ */
+const isInLoop = {
+ WhileStatement: isInRange,
+ DoWhileStatement: isInRange,
+ ForStatement(node, reference) {
+ return (
+ isInRange(node, reference) &&
+ !(node.init && isInRange(node.init, reference))
+ );
+ }
+};
+
+/**
+ * Checks whether or not a given group node has any dynamic elements.
+ *
+ * @param {ASTNode} root - A node to check.
+ * This node is one of BinaryExpression or ConditionalExpression.
+ * @returns {boolean} `true` if the node is dynamic.
+ */
+function hasDynamicExpressions(root) {
+ let retv = false;
+ const traverser = new Traverser();
+
+ traverser.traverse(root, {
+ enter(node) {
+ if (DYNAMIC_PATTERN.test(node.type)) {
+ retv = true;
+ this.break();
+ } else if (SKIP_PATTERN.test(node.type)) {
+ this.skip();
+ }
+ }
+ });
+
+ return retv;
+}
+
+/**
+ * Creates the loop condition information from a given reference.
+ *
+ * @param {eslint-scope.Reference} reference - A reference to create.
+ * @returns {LoopConditionInfo|null} Created loop condition info, or null.
+ */
+function toLoopCondition(reference) {
+ if (reference.init) {
+ return null;
+ }
+
+ let group = null;
+ let child = reference.identifier;
+ let node = child.parent;
+
+ while (node) {
+ if (SENTINEL_PATTERN.test(node.type)) {
+ if (LOOP_PATTERN.test(node.type) && node.test === child) {
+
+ // This reference is inside of a loop condition.
+ return {
+ reference,
+ group,
+ isInLoop: isInLoop[node.type].bind(null, node),
+ modified: false
+ };
+ }
+
+ // This reference is outside of a loop condition.
+ break;
+ }
+
+ /*
+ * If it's inside of a group, OK if either operand is modified.
+ * So stores the group this reference belongs to.
+ */
+ if (GROUP_PATTERN.test(node.type)) {
+
+ // If this expression is dynamic, no need to check.
+ if (hasDynamicExpressions(node)) {
+ break;
+ } else {
+ group = node;
+ }
+ }
+
+ child = node;
+ node = node.parent;
+ }
+
+ return null;
+}
+
+/**
+ * Gets the function which encloses a given reference.
+ * This supports only FunctionDeclaration.
+ *
+ * @param {eslint-scope.Reference} reference - A reference to get.
+ * @returns {ASTNode|null} The function node or null.
+ */
+function getEncloseFunctionDeclaration(reference) {
+ let node = reference.identifier;
+
+ while (node) {
+ if (node.type === "FunctionDeclaration") {
+ return node.id ? node : null;
+ }
+
+ node = node.parent;
+ }
+
+ return null;
+}
+
+/**
+ * Updates the "modified" flags of given loop conditions with given modifiers.
+ *
+ * @param {LoopConditionInfo[]} conditions - The loop conditions to be updated.
+ * @param {eslint-scope.Reference[]} modifiers - The references to update.
+ * @returns {void}
+ */
+function updateModifiedFlag(conditions, modifiers) {
+
+ for (let i = 0; i < conditions.length; ++i) {
+ const condition = conditions[i];
+
+ for (let j = 0; !condition.modified && j < modifiers.length; ++j) {
+ const modifier = modifiers[j];
+ let funcNode, funcVar;
+
+ /*
+ * Besides checking for the condition being in the loop, we want to
+ * check the function that this modifier is belonging to is called
+ * in the loop.
+ * FIXME: This should probably be extracted to a function.
+ */
+ const inLoop = condition.isInLoop(modifier) || Boolean(
+ (funcNode = getEncloseFunctionDeclaration(modifier)) &&
+ (funcVar = astUtils.getVariableByName(modifier.from.upper, funcNode.id.name)) &&
+ funcVar.references.some(condition.isInLoop)
+ );
+
+ condition.modified = inLoop;
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow unmodified loop conditions",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+ let groupMap = null;
+
+ /**
+ * Reports a given condition info.
+ *
+ * @param {LoopConditionInfo} condition - A loop condition info to report.
+ * @returns {void}
+ */
+ function report(condition) {
+ const node = condition.reference.identifier;
+
+ context.report({
+ node,
+ message: "'{{name}}' is not modified in this loop.",
+ data: node
+ });
+ }
+
+ /**
+ * Registers given conditions to the group the condition belongs to.
+ *
+ * @param {LoopConditionInfo[]} conditions - A loop condition info to
+ * register.
+ * @returns {void}
+ */
+ function registerConditionsToGroup(conditions) {
+ for (let i = 0; i < conditions.length; ++i) {
+ const condition = conditions[i];
+
+ if (condition.group) {
+ let group = groupMap.get(condition.group);
+
+ if (!group) {
+ group = [];
+ groupMap.set(condition.group, group);
+ }
+ group.push(condition);
+ }
+ }
+ }
+
+ /**
+ * Reports references which are inside of unmodified groups.
+ *
+ * @param {LoopConditionInfo[]} conditions - A loop condition info to report.
+ * @returns {void}
+ */
+ function checkConditionsInGroup(conditions) {
+ if (conditions.every(isUnmodified)) {
+ conditions.forEach(report);
+ }
+ }
+
+ /**
+ * Finds unmodified references which are inside of a loop condition.
+ * Then reports the references which are outside of groups.
+ *
+ * @param {eslint-scope.Variable} variable - A variable to report.
+ * @returns {void}
+ */
+ function checkReferences(variable) {
+
+ // Gets references that exist in loop conditions.
+ const conditions = variable
+ .references
+ .map(toLoopCondition)
+ .filter(Boolean);
+
+ if (conditions.length === 0) {
+ return;
+ }
+
+ // Registers the conditions to belonging groups.
+ registerConditionsToGroup(conditions);
+
+ // Check the conditions are modified.
+ const modifiers = variable.references.filter(isWriteReference);
+
+ if (modifiers.length > 0) {
+ updateModifiedFlag(conditions, modifiers);
+ }
+
+ /*
+ * Reports the conditions which are not belonging to groups.
+ * Others will be reported after all variables are done.
+ */
+ conditions
+ .filter(isUnmodifiedAndNotBelongToGroup)
+ .forEach(report);
+ }
+
+ return {
+ "Program:exit"() {
+ const queue = [context.getScope()];
+
+ groupMap = new Map();
+
+ let scope;
+
+ while ((scope = queue.pop())) {
+ pushAll(queue, scope.childScopes);
+ scope.variables.forEach(checkReferences);
+ }
+
+ groupMap.forEach(checkConditionsInGroup);
+ groupMap = null;
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-unneeded-ternary.js b/tools/node_modules/eslint/lib/rules/no-unneeded-ternary.js
new file mode 100644
index 0000000000..5745537805
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-unneeded-ternary.js
@@ -0,0 +1,155 @@
+/**
+ * @fileoverview Rule to flag no-unneeded-ternary
+ * @author Gyandeep Singh
+ */
+
+"use strict";
+
+const astUtils = require("../ast-utils");
+
+// Operators that always result in a boolean value
+const BOOLEAN_OPERATORS = new Set(["==", "===", "!=", "!==", ">", ">=", "<", "<=", "in", "instanceof"]);
+const OPERATOR_INVERSES = {
+ "==": "!=",
+ "!=": "==",
+ "===": "!==",
+ "!==": "==="
+
+ // Operators like < and >= are not true inverses, since both will return false with NaN.
+};
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow ternary operators when simpler alternatives exist",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ defaultAssignment: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ],
+
+ fixable: "code"
+ },
+
+ create(context) {
+ const options = context.options[0] || {};
+ const defaultAssignment = options.defaultAssignment !== false;
+ const sourceCode = context.getSourceCode();
+
+ /**
+ * Test if the node is a boolean literal
+ * @param {ASTNode} node - The node to report.
+ * @returns {boolean} True if the its a boolean literal
+ * @private
+ */
+ function isBooleanLiteral(node) {
+ return node.type === "Literal" && typeof node.value === "boolean";
+ }
+
+ /**
+ * Creates an expression that represents the boolean inverse of the expression represented by the original node
+ * @param {ASTNode} node A node representing an expression
+ * @returns {string} A string representing an inverted expression
+ */
+ function invertExpression(node) {
+ if (node.type === "BinaryExpression" && Object.prototype.hasOwnProperty.call(OPERATOR_INVERSES, node.operator)) {
+ const operatorToken = sourceCode.getFirstTokenBetween(
+ node.left,
+ node.right,
+ token => token.value === node.operator
+ );
+ const text = sourceCode.getText();
+
+ return text.slice(node.range[0],
+ operatorToken.range[0]) + OPERATOR_INVERSES[node.operator] + text.slice(operatorToken.range[1], node.range[1]);
+ }
+
+ if (astUtils.getPrecedence(node) < astUtils.getPrecedence({ type: "UnaryExpression" })) {
+ return `!(${astUtils.getParenthesisedText(sourceCode, node)})`;
+ }
+ return `!${astUtils.getParenthesisedText(sourceCode, node)}`;
+ }
+
+ /**
+ * Tests if a given node always evaluates to a boolean value
+ * @param {ASTNode} node - An expression node
+ * @returns {boolean} True if it is determined that the node will always evaluate to a boolean value
+ */
+ function isBooleanExpression(node) {
+ return node.type === "BinaryExpression" && BOOLEAN_OPERATORS.has(node.operator) ||
+ node.type === "UnaryExpression" && node.operator === "!";
+ }
+
+ /**
+ * Test if the node matches the pattern id ? id : expression
+ * @param {ASTNode} node - The ConditionalExpression to check.
+ * @returns {boolean} True if the pattern is matched, and false otherwise
+ * @private
+ */
+ function matchesDefaultAssignment(node) {
+ return node.test.type === "Identifier" &&
+ node.consequent.type === "Identifier" &&
+ node.test.name === node.consequent.name;
+ }
+
+ return {
+
+ ConditionalExpression(node) {
+ if (isBooleanLiteral(node.alternate) && isBooleanLiteral(node.consequent)) {
+ context.report({
+ node,
+ loc: node.consequent.loc.start,
+ message: "Unnecessary use of boolean literals in conditional expression.",
+ fix(fixer) {
+ if (node.consequent.value === node.alternate.value) {
+
+ // Replace `foo ? true : true` with just `true`, but don't replace `foo() ? true : true`
+ return node.test.type === "Identifier" ? fixer.replaceText(node, node.consequent.value.toString()) : null;
+ }
+ if (node.alternate.value) {
+
+ // Replace `foo() ? false : true` with `!(foo())`
+ return fixer.replaceText(node, invertExpression(node.test));
+ }
+
+ // Replace `foo ? true : false` with `foo` if `foo` is guaranteed to be a boolean, or `!!foo` otherwise.
+
+ return fixer.replaceText(node, isBooleanExpression(node.test) ? astUtils.getParenthesisedText(sourceCode, node.test) : `!${invertExpression(node.test)}`);
+ }
+ });
+ } else if (!defaultAssignment && matchesDefaultAssignment(node)) {
+ context.report({
+ node,
+ loc: node.consequent.loc.start,
+ message: "Unnecessary use of conditional expression for default assignment.",
+ fix: fixer => {
+ let nodeAlternate = astUtils.getParenthesisedText(sourceCode, node.alternate);
+
+ if (node.alternate.type === "ConditionalExpression") {
+ const isAlternateParenthesised = astUtils.isParenthesised(sourceCode, node.alternate);
+
+ nodeAlternate = isAlternateParenthesised ? nodeAlternate : `(${nodeAlternate})`;
+ }
+
+ return fixer.replaceText(node, `${astUtils.getParenthesisedText(sourceCode, node.test)} || ${nodeAlternate}`);
+ }
+ });
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-unreachable.js b/tools/node_modules/eslint/lib/rules/no-unreachable.js
new file mode 100644
index 0000000000..217a6a4299
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-unreachable.js
@@ -0,0 +1,212 @@
+/**
+ * @fileoverview Checks for unreachable code due to return, throws, break, and continue.
+ * @author Joel Feenstra
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Checks whether or not a given variable declarator has the initializer.
+ * @param {ASTNode} node - A VariableDeclarator node to check.
+ * @returns {boolean} `true` if the node has the initializer.
+ */
+function isInitialized(node) {
+ return Boolean(node.init);
+}
+
+/**
+ * Checks whether or not a given code path segment is unreachable.
+ * @param {CodePathSegment} segment - A CodePathSegment to check.
+ * @returns {boolean} `true` if the segment is unreachable.
+ */
+function isUnreachable(segment) {
+ return !segment.reachable;
+}
+
+/**
+ * The class to distinguish consecutive unreachable statements.
+ */
+class ConsecutiveRange {
+ constructor(sourceCode) {
+ this.sourceCode = sourceCode;
+ this.startNode = null;
+ this.endNode = null;
+ }
+
+ /**
+ * The location object of this range.
+ * @type {Object}
+ */
+ get location() {
+ return {
+ start: this.startNode.loc.start,
+ end: this.endNode.loc.end
+ };
+ }
+
+ /**
+ * `true` if this range is empty.
+ * @type {boolean}
+ */
+ get isEmpty() {
+ return !(this.startNode && this.endNode);
+ }
+
+ /**
+ * Checks whether the given node is inside of this range.
+ * @param {ASTNode|Token} node - The node to check.
+ * @returns {boolean} `true` if the node is inside of this range.
+ */
+ contains(node) {
+ return (
+ node.range[0] >= this.startNode.range[0] &&
+ node.range[1] <= this.endNode.range[1]
+ );
+ }
+
+ /**
+ * Checks whether the given node is consecutive to this range.
+ * @param {ASTNode} node - The node to check.
+ * @returns {boolean} `true` if the node is consecutive to this range.
+ */
+ isConsecutive(node) {
+ return this.contains(this.sourceCode.getTokenBefore(node));
+ }
+
+ /**
+ * Merges the given node to this range.
+ * @param {ASTNode} node - The node to merge.
+ * @returns {void}
+ */
+ merge(node) {
+ this.endNode = node;
+ }
+
+ /**
+ * Resets this range by the given node or null.
+ * @param {ASTNode|null} node - The node to reset, or null.
+ * @returns {void}
+ */
+ reset(node) {
+ this.startNode = this.endNode = node;
+ }
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow unreachable code after `return`, `throw`, `continue`, and `break` statements",
+ category: "Possible Errors",
+ recommended: true
+ },
+
+ schema: []
+ },
+
+ create(context) {
+ let currentCodePath = null;
+
+ const range = new ConsecutiveRange(context.getSourceCode());
+
+ /**
+ * Reports a given node if it's unreachable.
+ * @param {ASTNode} node - A statement node to report.
+ * @returns {void}
+ */
+ function reportIfUnreachable(node) {
+ let nextNode = null;
+
+ if (node && currentCodePath.currentSegments.every(isUnreachable)) {
+
+ // Store this statement to distinguish consecutive statements.
+ if (range.isEmpty) {
+ range.reset(node);
+ return;
+ }
+
+ // Skip if this statement is inside of the current range.
+ if (range.contains(node)) {
+ return;
+ }
+
+ // Merge if this statement is consecutive to the current range.
+ if (range.isConsecutive(node)) {
+ range.merge(node);
+ return;
+ }
+
+ nextNode = node;
+ }
+
+ /*
+ * Report the current range since this statement is reachable or is
+ * not consecutive to the current range.
+ */
+ if (!range.isEmpty) {
+ context.report({
+ message: "Unreachable code.",
+ loc: range.location,
+ node: range.startNode
+ });
+ }
+
+ // Update the current range.
+ range.reset(nextNode);
+ }
+
+ return {
+
+ // Manages the current code path.
+ onCodePathStart(codePath) {
+ currentCodePath = codePath;
+ },
+
+ onCodePathEnd() {
+ currentCodePath = currentCodePath.upper;
+ },
+
+ // Registers for all statement nodes (excludes FunctionDeclaration).
+ BlockStatement: reportIfUnreachable,
+ BreakStatement: reportIfUnreachable,
+ ClassDeclaration: reportIfUnreachable,
+ ContinueStatement: reportIfUnreachable,
+ DebuggerStatement: reportIfUnreachable,
+ DoWhileStatement: reportIfUnreachable,
+ EmptyStatement: reportIfUnreachable,
+ ExpressionStatement: reportIfUnreachable,
+ ForInStatement: reportIfUnreachable,
+ ForOfStatement: reportIfUnreachable,
+ ForStatement: reportIfUnreachable,
+ IfStatement: reportIfUnreachable,
+ ImportDeclaration: reportIfUnreachable,
+ LabeledStatement: reportIfUnreachable,
+ ReturnStatement: reportIfUnreachable,
+ SwitchStatement: reportIfUnreachable,
+ ThrowStatement: reportIfUnreachable,
+ TryStatement: reportIfUnreachable,
+
+ VariableDeclaration(node) {
+ if (node.kind !== "var" || node.declarations.some(isInitialized)) {
+ reportIfUnreachable(node);
+ }
+ },
+
+ WhileStatement: reportIfUnreachable,
+ WithStatement: reportIfUnreachable,
+ ExportNamedDeclaration: reportIfUnreachable,
+ ExportDefaultDeclaration: reportIfUnreachable,
+ ExportAllDeclaration: reportIfUnreachable,
+
+ "Program:exit"() {
+ reportIfUnreachable();
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-unsafe-finally.js b/tools/node_modules/eslint/lib/rules/no-unsafe-finally.js
new file mode 100644
index 0000000000..d25033e545
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-unsafe-finally.js
@@ -0,0 +1,104 @@
+/**
+ * @fileoverview Rule to flag unsafe statements in finally block
+ * @author Onur Temizkan
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+const SENTINEL_NODE_TYPE_RETURN_THROW = /^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression)$/;
+const SENTINEL_NODE_TYPE_BREAK = /^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|DoWhileStatement|WhileStatement|ForOfStatement|ForInStatement|ForStatement|SwitchStatement)$/;
+const SENTINEL_NODE_TYPE_CONTINUE = /^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|DoWhileStatement|WhileStatement|ForOfStatement|ForInStatement|ForStatement)$/;
+
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow control flow statements in `finally` blocks",
+ category: "Possible Errors",
+ recommended: true
+ },
+
+ schema: []
+ },
+ create(context) {
+
+ /**
+ * Checks if the node is the finalizer of a TryStatement
+ *
+ * @param {ASTNode} node - node to check.
+ * @returns {boolean} - true if the node is the finalizer of a TryStatement
+ */
+ function isFinallyBlock(node) {
+ return node.parent.type === "TryStatement" && node.parent.finalizer === node;
+ }
+
+ /**
+ * Climbs up the tree if the node is not a sentinel node
+ *
+ * @param {ASTNode} node - node to check.
+ * @param {string} label - label of the break or continue statement
+ * @returns {boolean} - return whether the node is a finally block or a sentinel node
+ */
+ function isInFinallyBlock(node, label) {
+ let labelInside = false;
+ let sentinelNodeType;
+
+ if (node.type === "BreakStatement" && !node.label) {
+ sentinelNodeType = SENTINEL_NODE_TYPE_BREAK;
+ } else if (node.type === "ContinueStatement") {
+ sentinelNodeType = SENTINEL_NODE_TYPE_CONTINUE;
+ } else {
+ sentinelNodeType = SENTINEL_NODE_TYPE_RETURN_THROW;
+ }
+
+ while (node && !sentinelNodeType.test(node.type)) {
+ if (node.parent.label && label && (node.parent.label.name === label.name)) {
+ labelInside = true;
+ }
+ if (isFinallyBlock(node)) {
+ if (label && labelInside) {
+ return false;
+ }
+ return true;
+ }
+ node = node.parent;
+ }
+ return false;
+ }
+
+ /**
+ * Checks whether the possibly-unsafe statement is inside a finally block.
+ *
+ * @param {ASTNode} node - node to check.
+ * @returns {void}
+ */
+ function check(node) {
+ if (isInFinallyBlock(node, node.label)) {
+ context.report({
+ message: "Unsafe usage of {{nodeType}}.",
+ data: {
+ nodeType: node.type
+ },
+ node,
+ line: node.loc.line,
+ column: node.loc.column
+ });
+ }
+ }
+
+ return {
+ ReturnStatement: check,
+ ThrowStatement: check,
+ BreakStatement: check,
+ ContinueStatement: check
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-unsafe-negation.js b/tools/node_modules/eslint/lib/rules/no-unsafe-negation.js
new file mode 100644
index 0000000000..761dc03386
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-unsafe-negation.js
@@ -0,0 +1,80 @@
+/**
+ * @fileoverview Rule to disallow negating the left operand of relational operators
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Checks whether the given operator is a relational operator or not.
+ *
+ * @param {string} op - The operator type to check.
+ * @returns {boolean} `true` if the operator is a relational operator.
+ */
+function isRelationalOperator(op) {
+ return op === "in" || op === "instanceof";
+}
+
+/**
+ * Checks whether the given node is a logical negation expression or not.
+ *
+ * @param {ASTNode} node - The node to check.
+ * @returns {boolean} `true` if the node is a logical negation expression.
+ */
+function isNegation(node) {
+ return node.type === "UnaryExpression" && node.operator === "!";
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow negating the left operand of relational operators",
+ category: "Possible Errors",
+ recommended: true
+ },
+ schema: [],
+ fixable: "code"
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+
+ return {
+ BinaryExpression(node) {
+ if (isRelationalOperator(node.operator) &&
+ isNegation(node.left) &&
+ !astUtils.isParenthesised(sourceCode, node.left)
+ ) {
+ context.report({
+ node,
+ loc: node.left.loc,
+ message: "Unexpected negating the left operand of '{{operator}}' operator.",
+ data: node,
+
+ fix(fixer) {
+ const negationToken = sourceCode.getFirstToken(node.left);
+ const fixRange = [negationToken.range[1], node.range[1]];
+ const text = sourceCode.text.slice(fixRange[0], fixRange[1]);
+
+ return fixer.replaceTextRange(fixRange, `(${text})`);
+ }
+ });
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-unused-expressions.js b/tools/node_modules/eslint/lib/rules/no-unused-expressions.js
new file mode 100644
index 0000000000..b4e1074d54
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-unused-expressions.js
@@ -0,0 +1,126 @@
+/**
+ * @fileoverview Flag expressions in statement position that do not side effect
+ * @author Michael Ficarra
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow unused expressions",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ allowShortCircuit: {
+ type: "boolean"
+ },
+ allowTernary: {
+ type: "boolean"
+ },
+ allowTaggedTemplates: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+ const config = context.options[0] || {},
+ allowShortCircuit = config.allowShortCircuit || false,
+ allowTernary = config.allowTernary || false,
+ allowTaggedTemplates = config.allowTaggedTemplates || false;
+
+ /**
+ * @param {ASTNode} node - any node
+ * @returns {boolean} whether the given node structurally represents a directive
+ */
+ function looksLikeDirective(node) {
+ return node.type === "ExpressionStatement" &&
+ node.expression.type === "Literal" && typeof node.expression.value === "string";
+ }
+
+ /**
+ * @param {Function} predicate - ([a] -> Boolean) the function used to make the determination
+ * @param {a[]} list - the input list
+ * @returns {a[]} the leading sequence of members in the given list that pass the given predicate
+ */
+ function takeWhile(predicate, list) {
+ for (let i = 0; i < list.length; ++i) {
+ if (!predicate(list[i])) {
+ return list.slice(0, i);
+ }
+ }
+ return list.slice();
+ }
+
+ /**
+ * @param {ASTNode} node - a Program or BlockStatement node
+ * @returns {ASTNode[]} the leading sequence of directive nodes in the given node's body
+ */
+ function directives(node) {
+ return takeWhile(looksLikeDirective, node.body);
+ }
+
+ /**
+ * @param {ASTNode} node - any node
+ * @param {ASTNode[]} ancestors - the given node's ancestors
+ * @returns {boolean} whether the given node is considered a directive in its current position
+ */
+ function isDirective(node, ancestors) {
+ const parent = ancestors[ancestors.length - 1],
+ grandparent = ancestors[ancestors.length - 2];
+
+ return (parent.type === "Program" || parent.type === "BlockStatement" &&
+ (/Function/.test(grandparent.type))) &&
+ directives(parent).indexOf(node) >= 0;
+ }
+
+ /**
+ * Determines whether or not a given node is a valid expression. Recurses on short circuit eval and ternary nodes if enabled by flags.
+ * @param {ASTNode} node - any node
+ * @returns {boolean} whether the given node is a valid expression
+ */
+ function isValidExpression(node) {
+ if (allowTernary) {
+
+ // Recursive check for ternary and logical expressions
+ if (node.type === "ConditionalExpression") {
+ return isValidExpression(node.consequent) && isValidExpression(node.alternate);
+ }
+ }
+
+ if (allowShortCircuit) {
+ if (node.type === "LogicalExpression") {
+ return isValidExpression(node.right);
+ }
+ }
+
+ if (allowTaggedTemplates && node.type === "TaggedTemplateExpression") {
+ return true;
+ }
+
+ return /^(?:Assignment|Call|New|Update|Yield|Await)Expression$/.test(node.type) ||
+ (node.type === "UnaryExpression" && ["delete", "void"].indexOf(node.operator) >= 0);
+ }
+
+ return {
+ ExpressionStatement(node) {
+ if (!isValidExpression(node.expression) && !isDirective(node, context.getAncestors())) {
+ context.report({ node, message: "Expected an assignment or function call and instead saw an expression." });
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-unused-labels.js b/tools/node_modules/eslint/lib/rules/no-unused-labels.js
new file mode 100644
index 0000000000..bcd3cfdc47
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-unused-labels.js
@@ -0,0 +1,106 @@
+/**
+ * @fileoverview Rule to disallow unused labels.
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow unused labels",
+ category: "Best Practices",
+ recommended: true
+ },
+
+ schema: [],
+
+ fixable: "code"
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+ let scopeInfo = null;
+
+ /**
+ * Adds a scope info to the stack.
+ *
+ * @param {ASTNode} node - A node to add. This is a LabeledStatement.
+ * @returns {void}
+ */
+ function enterLabeledScope(node) {
+ scopeInfo = {
+ label: node.label.name,
+ used: false,
+ upper: scopeInfo
+ };
+ }
+
+ /**
+ * Removes the top of the stack.
+ * At the same time, this reports the label if it's never used.
+ *
+ * @param {ASTNode} node - A node to report. This is a LabeledStatement.
+ * @returns {void}
+ */
+ function exitLabeledScope(node) {
+ if (!scopeInfo.used) {
+ context.report({
+ node: node.label,
+ message: "'{{name}}:' is defined but never used.",
+ data: node.label,
+ fix(fixer) {
+
+ /*
+ * Only perform a fix if there are no comments between the label and the body. This will be the case
+ * when there is exactly one token/comment (the ":") between the label and the body.
+ */
+ if (sourceCode.getTokenAfter(node.label, { includeComments: true }) ===
+ sourceCode.getTokenBefore(node.body, { includeComments: true })) {
+ return fixer.removeRange([node.range[0], node.body.range[0]]);
+ }
+
+ return null;
+ }
+ });
+ }
+
+ scopeInfo = scopeInfo.upper;
+ }
+
+ /**
+ * Marks the label of a given node as used.
+ *
+ * @param {ASTNode} node - A node to mark. This is a BreakStatement or
+ * ContinueStatement.
+ * @returns {void}
+ */
+ function markAsUsed(node) {
+ if (!node.label) {
+ return;
+ }
+
+ const label = node.label.name;
+ let info = scopeInfo;
+
+ while (info) {
+ if (info.label === label) {
+ info.used = true;
+ break;
+ }
+ info = info.upper;
+ }
+ }
+
+ return {
+ LabeledStatement: enterLabeledScope,
+ "LabeledStatement:exit": exitLabeledScope,
+ BreakStatement: markAsUsed,
+ ContinueStatement: markAsUsed
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-unused-vars.js b/tools/node_modules/eslint/lib/rules/no-unused-vars.js
new file mode 100644
index 0000000000..05940d5932
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-unused-vars.js
@@ -0,0 +1,647 @@
+/**
+ * @fileoverview Rule to flag declared but unused variables
+ * @author Ilya Volodin
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const lodash = require("lodash");
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow unused variables",
+ category: "Variables",
+ recommended: true
+ },
+
+ schema: [
+ {
+ oneOf: [
+ {
+ enum: ["all", "local"]
+ },
+ {
+ type: "object",
+ properties: {
+ vars: {
+ enum: ["all", "local"]
+ },
+ varsIgnorePattern: {
+ type: "string"
+ },
+ args: {
+ enum: ["all", "after-used", "none"]
+ },
+ ignoreRestSiblings: {
+ type: "boolean"
+ },
+ argsIgnorePattern: {
+ type: "string"
+ },
+ caughtErrors: {
+ enum: ["all", "none"]
+ },
+ caughtErrorsIgnorePattern: {
+ type: "string"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+
+ const REST_PROPERTY_TYPE = /^(?:Experimental)?RestProperty$/;
+
+ const config = {
+ vars: "all",
+ args: "after-used",
+ ignoreRestSiblings: false,
+ caughtErrors: "none"
+ };
+
+ const firstOption = context.options[0];
+
+ if (firstOption) {
+ if (typeof firstOption === "string") {
+ config.vars = firstOption;
+ } else {
+ config.vars = firstOption.vars || config.vars;
+ config.args = firstOption.args || config.args;
+ config.ignoreRestSiblings = firstOption.ignoreRestSiblings || config.ignoreRestSiblings;
+ config.caughtErrors = firstOption.caughtErrors || config.caughtErrors;
+
+ if (firstOption.varsIgnorePattern) {
+ config.varsIgnorePattern = new RegExp(firstOption.varsIgnorePattern);
+ }
+
+ if (firstOption.argsIgnorePattern) {
+ config.argsIgnorePattern = new RegExp(firstOption.argsIgnorePattern);
+ }
+
+ if (firstOption.caughtErrorsIgnorePattern) {
+ config.caughtErrorsIgnorePattern = new RegExp(firstOption.caughtErrorsIgnorePattern);
+ }
+ }
+ }
+
+ /**
+ * Generate the warning message about the variable being
+ * defined and unused, including the ignore pattern if configured.
+ * @param {Variable} unusedVar - eslint-scope variable object.
+ * @returns {string} The warning message to be used with this unused variable.
+ */
+ function getDefinedMessage(unusedVar) {
+ let type;
+ let pattern;
+
+ if (config.varsIgnorePattern) {
+ type = "vars";
+ pattern = config.varsIgnorePattern.toString();
+ }
+
+ if (unusedVar.defs && unusedVar.defs[0] && unusedVar.defs[0].type) {
+ const defType = unusedVar.defs[0].type;
+
+ if (defType === "CatchClause" && config.caughtErrorsIgnorePattern) {
+ type = "args";
+ pattern = config.caughtErrorsIgnorePattern.toString();
+ } else if (defType === "Parameter" && config.argsIgnorePattern) {
+ type = "args";
+ pattern = config.argsIgnorePattern.toString();
+ }
+ }
+
+ const additional = type ? ` Allowed unused ${type} must match ${pattern}.` : "";
+
+ return `'{{name}}' is defined but never used.${additional}`;
+ }
+
+ /**
+ * Generate the warning message about the variable being
+ * assigned and unused, including the ignore pattern if configured.
+ * @returns {string} The warning message to be used with this unused variable.
+ */
+ function getAssignedMessage() {
+ const additional = config.varsIgnorePattern ? ` Allowed unused vars must match ${config.varsIgnorePattern.toString()}.` : "";
+
+ return `'{{name}}' is assigned a value but never used.${additional}`;
+ }
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ const STATEMENT_TYPE = /(?:Statement|Declaration)$/;
+
+ /**
+ * Determines if a given variable is being exported from a module.
+ * @param {Variable} variable - eslint-scope variable object.
+ * @returns {boolean} True if the variable is exported, false if not.
+ * @private
+ */
+ function isExported(variable) {
+
+ const definition = variable.defs[0];
+
+ if (definition) {
+
+ let node = definition.node;
+
+ if (node.type === "VariableDeclarator") {
+ node = node.parent;
+ } else if (definition.type === "Parameter") {
+ return false;
+ }
+
+ return node.parent.type.indexOf("Export") === 0;
+ }
+ return false;
+
+ }
+
+ /**
+ * Determines if a variable has a sibling rest property
+ * @param {Variable} variable - eslint-scope variable object.
+ * @returns {boolean} True if the variable is exported, false if not.
+ * @private
+ */
+ function hasRestSpreadSibling(variable) {
+ if (config.ignoreRestSiblings) {
+ return variable.defs.some(def => {
+ const propertyNode = def.name.parent;
+ const patternNode = propertyNode.parent;
+
+ return (
+ propertyNode.type === "Property" &&
+ patternNode.type === "ObjectPattern" &&
+ REST_PROPERTY_TYPE.test(patternNode.properties[patternNode.properties.length - 1].type)
+ );
+ });
+ }
+
+ return false;
+ }
+
+ /**
+ * Determines if a reference is a read operation.
+ * @param {Reference} ref - An eslint-scope Reference
+ * @returns {boolean} whether the given reference represents a read operation
+ * @private
+ */
+ function isReadRef(ref) {
+ return ref.isRead();
+ }
+
+ /**
+ * Determine if an identifier is referencing an enclosing function name.
+ * @param {Reference} ref - The reference to check.
+ * @param {ASTNode[]} nodes - The candidate function nodes.
+ * @returns {boolean} True if it's a self-reference, false if not.
+ * @private
+ */
+ function isSelfReference(ref, nodes) {
+ let scope = ref.from;
+
+ while (scope) {
+ if (nodes.indexOf(scope.block) >= 0) {
+ return true;
+ }
+
+ scope = scope.upper;
+ }
+
+ return false;
+ }
+
+ /**
+ * Checks the position of given nodes.
+ *
+ * @param {ASTNode} inner - A node which is expected as inside.
+ * @param {ASTNode} outer - A node which is expected as outside.
+ * @returns {boolean} `true` if the `inner` node exists in the `outer` node.
+ * @private
+ */
+ function isInside(inner, outer) {
+ return (
+ inner.range[0] >= outer.range[0] &&
+ inner.range[1] <= outer.range[1]
+ );
+ }
+
+ /**
+ * If a given reference is left-hand side of an assignment, this gets
+ * the right-hand side node of the assignment.
+ *
+ * In the following cases, this returns null.
+ *
+ * - The reference is not the LHS of an assignment expression.
+ * - The reference is inside of a loop.
+ * - The reference is inside of a function scope which is different from
+ * the declaration.
+ *
+ * @param {eslint-scope.Reference} ref - A reference to check.
+ * @param {ASTNode} prevRhsNode - The previous RHS node.
+ * @returns {ASTNode|null} The RHS node or null.
+ * @private
+ */
+ function getRhsNode(ref, prevRhsNode) {
+ const id = ref.identifier;
+ const parent = id.parent;
+ const granpa = parent.parent;
+ const refScope = ref.from.variableScope;
+ const varScope = ref.resolved.scope.variableScope;
+ const canBeUsedLater = refScope !== varScope || astUtils.isInLoop(id);
+
+ /*
+ * Inherits the previous node if this reference is in the node.
+ * This is for `a = a + a`-like code.
+ */
+ if (prevRhsNode && isInside(id, prevRhsNode)) {
+ return prevRhsNode;
+ }
+
+ if (parent.type === "AssignmentExpression" &&
+ granpa.type === "ExpressionStatement" &&
+ id === parent.left &&
+ !canBeUsedLater
+ ) {
+ return parent.right;
+ }
+ return null;
+ }
+
+ /**
+ * Checks whether a given function node is stored to somewhere or not.
+ * If the function node is stored, the function can be used later.
+ *
+ * @param {ASTNode} funcNode - A function node to check.
+ * @param {ASTNode} rhsNode - The RHS node of the previous assignment.
+ * @returns {boolean} `true` if under the following conditions:
+ * - the funcNode is assigned to a variable.
+ * - the funcNode is bound as an argument of a function call.
+ * - the function is bound to a property and the object satisfies above conditions.
+ * @private
+ */
+ function isStorableFunction(funcNode, rhsNode) {
+ let node = funcNode;
+ let parent = funcNode.parent;
+
+ while (parent && isInside(parent, rhsNode)) {
+ switch (parent.type) {
+ case "SequenceExpression":
+ if (parent.expressions[parent.expressions.length - 1] !== node) {
+ return false;
+ }
+ break;
+
+ case "CallExpression":
+ case "NewExpression":
+ return parent.callee !== node;
+
+ case "AssignmentExpression":
+ case "TaggedTemplateExpression":
+ case "YieldExpression":
+ return true;
+
+ default:
+ if (STATEMENT_TYPE.test(parent.type)) {
+
+ /*
+ * If it encountered statements, this is a complex pattern.
+ * Since analyzeing complex patterns is hard, this returns `true` to avoid false positive.
+ */
+ return true;
+ }
+ }
+
+ node = parent;
+ parent = parent.parent;
+ }
+
+ return false;
+ }
+
+ /**
+ * Checks whether a given Identifier node exists inside of a function node which can be used later.
+ *
+ * "can be used later" means:
+ * - the function is assigned to a variable.
+ * - the function is bound to a property and the object can be used later.
+ * - the function is bound as an argument of a function call.
+ *
+ * If a reference exists in a function which can be used later, the reference is read when the function is called.
+ *
+ * @param {ASTNode} id - An Identifier node to check.
+ * @param {ASTNode} rhsNode - The RHS node of the previous assignment.
+ * @returns {boolean} `true` if the `id` node exists inside of a function node which can be used later.
+ * @private
+ */
+ function isInsideOfStorableFunction(id, rhsNode) {
+ const funcNode = astUtils.getUpperFunction(id);
+
+ return (
+ funcNode &&
+ isInside(funcNode, rhsNode) &&
+ isStorableFunction(funcNode, rhsNode)
+ );
+ }
+
+ /**
+ * Checks whether a given reference is a read to update itself or not.
+ *
+ * @param {eslint-scope.Reference} ref - A reference to check.
+ * @param {ASTNode} rhsNode - The RHS node of the previous assignment.
+ * @returns {boolean} The reference is a read to update itself.
+ * @private
+ */
+ function isReadForItself(ref, rhsNode) {
+ const id = ref.identifier;
+ const parent = id.parent;
+ const granpa = parent.parent;
+
+ return ref.isRead() && (
+
+ // self update. e.g. `a += 1`, `a++`
+ (
+ parent.type === "AssignmentExpression" &&
+ granpa.type === "ExpressionStatement" &&
+ parent.left === id
+ ) ||
+ (
+ parent.type === "UpdateExpression" &&
+ granpa.type === "ExpressionStatement"
+ ) ||
+
+ // in RHS of an assignment for itself. e.g. `a = a + 1`
+ (
+ rhsNode &&
+ isInside(id, rhsNode) &&
+ !isInsideOfStorableFunction(id, rhsNode)
+ )
+ );
+ }
+
+ /**
+ * Determine if an identifier is used either in for-in loops.
+ *
+ * @param {Reference} ref - The reference to check.
+ * @returns {boolean} whether reference is used in the for-in loops
+ * @private
+ */
+ function isForInRef(ref) {
+ let target = ref.identifier.parent;
+
+
+ // "for (var ...) { return; }"
+ if (target.type === "VariableDeclarator") {
+ target = target.parent.parent;
+ }
+
+ if (target.type !== "ForInStatement") {
+ return false;
+ }
+
+ // "for (...) { return; }"
+ if (target.body.type === "BlockStatement") {
+ target = target.body.body[0];
+
+ // "for (...) return;"
+ } else {
+ target = target.body;
+ }
+
+ // For empty loop body
+ if (!target) {
+ return false;
+ }
+
+ return target.type === "ReturnStatement";
+ }
+
+ /**
+ * Determines if the variable is used.
+ * @param {Variable} variable - The variable to check.
+ * @returns {boolean} True if the variable is used
+ * @private
+ */
+ function isUsedVariable(variable) {
+ const functionNodes = variable.defs.filter(def => def.type === "FunctionName").map(def => def.node),
+ isFunctionDefinition = functionNodes.length > 0;
+ let rhsNode = null;
+
+ return variable.references.some(ref => {
+ if (isForInRef(ref)) {
+ return true;
+ }
+
+ const forItself = isReadForItself(ref, rhsNode);
+
+ rhsNode = getRhsNode(ref, rhsNode);
+
+ return (
+ isReadRef(ref) &&
+ !forItself &&
+ !(isFunctionDefinition && isSelfReference(ref, functionNodes))
+ );
+ });
+ }
+
+ /**
+ * Checks whether the given variable is the last parameter in the non-ignored parameters.
+ *
+ * @param {eslint-scope.Variable} variable - The variable to check.
+ * @returns {boolean} `true` if the variable is the last.
+ */
+ function isLastInNonIgnoredParameters(variable) {
+ const def = variable.defs[0];
+
+ // This is the last.
+ if (def.index === def.node.params.length - 1) {
+ return true;
+ }
+
+ // if all parameters preceded by this variable are ignored and unused, this is the last.
+ if (config.argsIgnorePattern) {
+ const params = context.getDeclaredVariables(def.node);
+ const posteriorParams = params.slice(params.indexOf(variable) + 1);
+
+ if (posteriorParams.every(v => v.references.length === 0 && config.argsIgnorePattern.test(v.name))) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Gets an array of variables without read references.
+ * @param {Scope} scope - an eslint-scope Scope object.
+ * @param {Variable[]} unusedVars - an array that saving result.
+ * @returns {Variable[]} unused variables of the scope and descendant scopes.
+ * @private
+ */
+ function collectUnusedVariables(scope, unusedVars) {
+ const variables = scope.variables;
+ const childScopes = scope.childScopes;
+ let i, l;
+
+ if (scope.type !== "TDZ" && (scope.type !== "global" || config.vars === "all")) {
+ for (i = 0, l = variables.length; i < l; ++i) {
+ const variable = variables[i];
+
+ // skip a variable of class itself name in the class scope
+ if (scope.type === "class" && scope.block.id === variable.identifiers[0]) {
+ continue;
+ }
+
+ // skip function expression names and variables marked with markVariableAsUsed()
+ if (scope.functionExpressionScope || variable.eslintUsed) {
+ continue;
+ }
+
+ // skip implicit "arguments" variable
+ if (scope.type === "function" && variable.name === "arguments" && variable.identifiers.length === 0) {
+ continue;
+ }
+
+ // explicit global variables don't have definitions.
+ const def = variable.defs[0];
+
+ if (def) {
+ const type = def.type;
+
+ // skip catch variables
+ if (type === "CatchClause") {
+ if (config.caughtErrors === "none") {
+ continue;
+ }
+
+ // skip ignored parameters
+ if (config.caughtErrorsIgnorePattern && config.caughtErrorsIgnorePattern.test(def.name.name)) {
+ continue;
+ }
+ }
+
+ if (type === "Parameter") {
+
+ // skip any setter argument
+ if ((def.node.parent.type === "Property" || def.node.parent.type === "MethodDefinition") && def.node.parent.kind === "set") {
+ continue;
+ }
+
+ // if "args" option is "none", skip any parameter
+ if (config.args === "none") {
+ continue;
+ }
+
+ // skip ignored parameters
+ if (config.argsIgnorePattern && config.argsIgnorePattern.test(def.name.name)) {
+ continue;
+ }
+
+ // if "args" option is "after-used", skip all but the last parameter
+ if (config.args === "after-used" && astUtils.isFunction(def.name.parent) && !isLastInNonIgnoredParameters(variable)) {
+ continue;
+ }
+ } else {
+
+ // skip ignored variables
+ if (config.varsIgnorePattern && config.varsIgnorePattern.test(def.name.name)) {
+ continue;
+ }
+ }
+ }
+
+ if (!isUsedVariable(variable) && !isExported(variable) && !hasRestSpreadSibling(variable)) {
+ unusedVars.push(variable);
+ }
+ }
+ }
+
+ for (i = 0, l = childScopes.length; i < l; ++i) {
+ collectUnusedVariables(childScopes[i], unusedVars);
+ }
+
+ return unusedVars;
+ }
+
+ /**
+ * Gets the index of a given variable name in a given comment.
+ * @param {eslint-scope.Variable} variable - A variable to get.
+ * @param {ASTNode} comment - A comment node which includes the variable name.
+ * @returns {number} The index of the variable name's location.
+ * @private
+ */
+ function getColumnInComment(variable, comment) {
+ const namePattern = new RegExp(`[\\s,]${lodash.escapeRegExp(variable.name)}(?:$|[\\s,:])`, "g");
+
+ // To ignore the first text "global".
+ namePattern.lastIndex = comment.value.indexOf("global") + 6;
+
+ // Search a given variable name.
+ const match = namePattern.exec(comment.value);
+
+ return match ? match.index + 1 : 0;
+ }
+
+ /**
+ * Creates the correct location of a given variables.
+ * The location is at its name string in a `/*global` comment.
+ *
+ * @param {eslint-scope.Variable} variable - A variable to get its location.
+ * @returns {{line: number, column: number}} The location object for the variable.
+ * @private
+ */
+ function getLocation(variable) {
+ const comment = variable.eslintExplicitGlobalComment;
+
+ return sourceCode.getLocFromIndex(comment.range[0] + 2 + getColumnInComment(variable, comment));
+ }
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+ "Program:exit"(programNode) {
+ const unusedVars = collectUnusedVariables(context.getScope(), []);
+
+ for (let i = 0, l = unusedVars.length; i < l; ++i) {
+ const unusedVar = unusedVars[i];
+
+ if (unusedVar.eslintExplicitGlobal) {
+ context.report({
+ node: programNode,
+ loc: getLocation(unusedVar),
+ message: getDefinedMessage(unusedVar),
+ data: unusedVar
+ });
+ } else if (unusedVar.defs.length > 0) {
+ context.report({
+ node: unusedVar.identifiers[0],
+ message: unusedVar.references.some(ref => ref.isWrite())
+ ? getAssignedMessage()
+ : getDefinedMessage(unusedVar),
+ data: unusedVar
+ });
+ }
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-use-before-define.js b/tools/node_modules/eslint/lib/rules/no-use-before-define.js
new file mode 100644
index 0000000000..ada01815d9
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-use-before-define.js
@@ -0,0 +1,266 @@
+/**
+ * @fileoverview Rule to flag use of variables before they are defined
+ * @author Ilya Volodin
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+const SENTINEL_TYPE = /^(?:(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|CatchClause|ImportDeclaration|ExportNamedDeclaration)$/;
+const FOR_IN_OF_TYPE = /^For(?:In|Of)Statement$/;
+
+/**
+ * Parses a given value as options.
+ *
+ * @param {any} options - A value to parse.
+ * @returns {Object} The parsed options.
+ */
+function parseOptions(options) {
+ let functions = true;
+ let classes = true;
+ let variables = true;
+
+ if (typeof options === "string") {
+ functions = (options !== "nofunc");
+ } else if (typeof options === "object" && options !== null) {
+ functions = options.functions !== false;
+ classes = options.classes !== false;
+ variables = options.variables !== false;
+ }
+
+ return { functions, classes, variables };
+}
+
+/**
+ * Checks whether or not a given variable is a function declaration.
+ *
+ * @param {eslint-scope.Variable} variable - A variable to check.
+ * @returns {boolean} `true` if the variable is a function declaration.
+ */
+function isFunction(variable) {
+ return variable.defs[0].type === "FunctionName";
+}
+
+/**
+ * Checks whether or not a given variable is a class declaration in an upper function scope.
+ *
+ * @param {eslint-scope.Variable} variable - A variable to check.
+ * @param {eslint-scope.Reference} reference - A reference to check.
+ * @returns {boolean} `true` if the variable is a class declaration.
+ */
+function isOuterClass(variable, reference) {
+ return (
+ variable.defs[0].type === "ClassName" &&
+ variable.scope.variableScope !== reference.from.variableScope
+ );
+}
+
+/**
+ * Checks whether or not a given variable is a variable declaration in an upper function scope.
+ * @param {eslint-scope.Variable} variable - A variable to check.
+ * @param {eslint-scope.Reference} reference - A reference to check.
+ * @returns {boolean} `true` if the variable is a variable declaration.
+ */
+function isOuterVariable(variable, reference) {
+ return (
+ variable.defs[0].type === "Variable" &&
+ variable.scope.variableScope !== reference.from.variableScope
+ );
+}
+
+/**
+ * Checks whether or not a given location is inside of the range of a given node.
+ *
+ * @param {ASTNode} node - An node to check.
+ * @param {number} location - A location to check.
+ * @returns {boolean} `true` if the location is inside of the range of the node.
+ */
+function isInRange(node, location) {
+ return node && node.range[0] <= location && location <= node.range[1];
+}
+
+/**
+ * Checks whether or not a given reference is inside of the initializers of a given variable.
+ *
+ * This returns `true` in the following cases:
+ *
+ * var a = a
+ * var [a = a] = list
+ * var {a = a} = obj
+ * for (var a in a) {}
+ * for (var a of a) {}
+ *
+ * @param {Variable} variable - A variable to check.
+ * @param {Reference} reference - A reference to check.
+ * @returns {boolean} `true` if the reference is inside of the initializers.
+ */
+function isInInitializer(variable, reference) {
+ if (variable.scope !== reference.from) {
+ return false;
+ }
+
+ let node = variable.identifiers[0].parent;
+ const location = reference.identifier.range[1];
+
+ while (node) {
+ if (node.type === "VariableDeclarator") {
+ if (isInRange(node.init, location)) {
+ return true;
+ }
+ if (FOR_IN_OF_TYPE.test(node.parent.parent.type) &&
+ isInRange(node.parent.parent.right, location)
+ ) {
+ return true;
+ }
+ break;
+ } else if (node.type === "AssignmentPattern") {
+ if (isInRange(node.right, location)) {
+ return true;
+ }
+ } else if (SENTINEL_TYPE.test(node.type)) {
+ break;
+ }
+
+ node = node.parent;
+ }
+
+ return false;
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow the use of variables before they are defined",
+ category: "Variables",
+ recommended: false
+ },
+
+ schema: [
+ {
+ oneOf: [
+ {
+ enum: ["nofunc"]
+ },
+ {
+ type: "object",
+ properties: {
+ functions: { type: "boolean" },
+ classes: { type: "boolean" },
+ variables: { type: "boolean" }
+ },
+ additionalProperties: false
+ }
+ ]
+ }
+ ]
+ },
+
+ create(context) {
+ const options = parseOptions(context.options[0]);
+
+ /**
+ * Determines whether a given use-before-define case should be reported according to the options.
+ * @param {eslint-scope.Variable} variable The variable that gets used before being defined
+ * @param {eslint-scope.Reference} reference The reference to the variable
+ * @returns {boolean} `true` if the usage should be reported
+ */
+ function isForbidden(variable, reference) {
+ if (isFunction(variable)) {
+ return options.functions;
+ }
+ if (isOuterClass(variable, reference)) {
+ return options.classes;
+ }
+ if (isOuterVariable(variable, reference)) {
+ return options.variables;
+ }
+ return true;
+ }
+
+ /**
+ * Finds and validates all variables in a given scope.
+ * @param {Scope} scope The scope object.
+ * @returns {void}
+ * @private
+ */
+ function findVariablesInScope(scope) {
+ scope.references.forEach(reference => {
+ const variable = reference.resolved;
+
+ /*
+ * Skips when the reference is:
+ * - initialization's.
+ * - referring to an undefined variable.
+ * - referring to a global environment variable (there're no identifiers).
+ * - located preceded by the variable (except in initializers).
+ * - allowed by options.
+ */
+ if (reference.init ||
+ !variable ||
+ variable.identifiers.length === 0 ||
+ (variable.identifiers[0].range[1] < reference.identifier.range[1] && !isInInitializer(variable, reference)) ||
+ !isForbidden(variable, reference)
+ ) {
+ return;
+ }
+
+ // Reports.
+ context.report({
+ node: reference.identifier,
+ message: "'{{name}}' was used before it was defined.",
+ data: reference.identifier
+ });
+ });
+ }
+
+ /**
+ * Validates variables inside of a node's scope.
+ * @param {ASTNode} node The node to check.
+ * @returns {void}
+ * @private
+ */
+ function findVariables() {
+ const scope = context.getScope();
+
+ findVariablesInScope(scope);
+ }
+
+ const ruleDefinition = {
+ "Program:exit"(node) {
+ const scope = context.getScope(),
+ ecmaFeatures = context.parserOptions.ecmaFeatures || {};
+
+ findVariablesInScope(scope);
+
+ // both Node.js and Modules have an extra scope
+ if (ecmaFeatures.globalReturn || node.sourceType === "module") {
+ findVariablesInScope(scope.childScopes[0]);
+ }
+ }
+ };
+
+ if (context.parserOptions.ecmaVersion >= 6) {
+ ruleDefinition["BlockStatement:exit"] =
+ ruleDefinition["SwitchStatement:exit"] = findVariables;
+
+ ruleDefinition["ArrowFunctionExpression:exit"] = function(node) {
+ if (node.body.type !== "BlockStatement") {
+ findVariables();
+ }
+ };
+ } else {
+ ruleDefinition["FunctionExpression:exit"] =
+ ruleDefinition["FunctionDeclaration:exit"] =
+ ruleDefinition["ArrowFunctionExpression:exit"] = findVariables;
+ }
+
+ return ruleDefinition;
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-useless-call.js b/tools/node_modules/eslint/lib/rules/no-useless-call.js
new file mode 100644
index 0000000000..e4820ac248
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-useless-call.js
@@ -0,0 +1,80 @@
+/**
+ * @fileoverview A rule to disallow unnecessary `.call()` and `.apply()`.
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Checks whether or not a node is a `.call()`/`.apply()`.
+ * @param {ASTNode} node - A CallExpression node to check.
+ * @returns {boolean} Whether or not the node is a `.call()`/`.apply()`.
+ */
+function isCallOrNonVariadicApply(node) {
+ return (
+ node.callee.type === "MemberExpression" &&
+ node.callee.property.type === "Identifier" &&
+ node.callee.computed === false &&
+ (
+ (node.callee.property.name === "call" && node.arguments.length >= 1) ||
+ (node.callee.property.name === "apply" && node.arguments.length === 2 && node.arguments[1].type === "ArrayExpression")
+ )
+ );
+}
+
+
+/**
+ * Checks whether or not `thisArg` is not changed by `.call()`/`.apply()`.
+ * @param {ASTNode|null} expectedThis - The node that is the owner of the applied function.
+ * @param {ASTNode} thisArg - The node that is given to the first argument of the `.call()`/`.apply()`.
+ * @param {SourceCode} sourceCode - The ESLint source code object.
+ * @returns {boolean} Whether or not `thisArg` is not changed by `.call()`/`.apply()`.
+ */
+function isValidThisArg(expectedThis, thisArg, sourceCode) {
+ if (!expectedThis) {
+ return astUtils.isNullOrUndefined(thisArg);
+ }
+ return astUtils.equalTokens(expectedThis, thisArg, sourceCode);
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow unnecessary calls to `.call()` and `.apply()`",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+
+ return {
+ CallExpression(node) {
+ if (!isCallOrNonVariadicApply(node)) {
+ return;
+ }
+
+ const applied = node.callee.object;
+ const expectedThis = (applied.type === "MemberExpression") ? applied.object : null;
+ const thisArg = node.arguments[0];
+
+ if (isValidThisArg(expectedThis, thisArg, sourceCode)) {
+ context.report({ node, message: "unnecessary '.{{name}}()'.", data: { name: node.callee.property.name } });
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-useless-computed-key.js b/tools/node_modules/eslint/lib/rules/no-useless-computed-key.js
new file mode 100644
index 0000000000..f8114ab754
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-useless-computed-key.js
@@ -0,0 +1,75 @@
+/**
+ * @fileoverview Rule to disallow unnecessary computed property keys in object literals
+ * @author Burak Yigit Kaya
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+const MESSAGE_UNNECESSARY_COMPUTED = "Unnecessarily computed property [{{property}}] found.";
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow unnecessary computed property keys in object literals",
+ category: "ECMAScript 6",
+ recommended: false
+ },
+
+ schema: [],
+
+ fixable: "code"
+ },
+ create(context) {
+ const sourceCode = context.getSourceCode();
+
+ return {
+ Property(node) {
+ if (!node.computed) {
+ return;
+ }
+
+ const key = node.key,
+ nodeType = typeof key.value;
+
+ if (key.type === "Literal" && (nodeType === "string" || nodeType === "number") && key.value !== "__proto__") {
+ context.report({
+ node,
+ message: MESSAGE_UNNECESSARY_COMPUTED,
+ data: { property: sourceCode.getText(key) },
+ fix(fixer) {
+ const leftSquareBracket = sourceCode.getFirstToken(node, astUtils.isOpeningBracketToken);
+ const rightSquareBracket = sourceCode.getFirstTokenBetween(node.key, node.value, astUtils.isClosingBracketToken);
+ const tokensBetween = sourceCode.getTokensBetween(leftSquareBracket, rightSquareBracket, 1);
+
+ if (tokensBetween.slice(0, -1).some((token, index) =>
+ sourceCode.getText().slice(token.range[1], tokensBetween[index + 1].range[0]).trim())) {
+
+ // If there are comments between the brackets and the property name, don't do a fix.
+ return null;
+ }
+
+ const tokenBeforeLeftBracket = sourceCode.getTokenBefore(leftSquareBracket);
+
+ // Insert a space before the key to avoid changing identifiers, e.g. ({ get[2]() {} }) to ({ get2() {} })
+ const needsSpaceBeforeKey = tokenBeforeLeftBracket.range[1] === leftSquareBracket.range[0] &&
+ !astUtils.canTokensBeAdjacent(tokenBeforeLeftBracket, sourceCode.getFirstToken(key));
+
+ const replacementKey = (needsSpaceBeforeKey ? " " : "") + key.raw;
+
+ return fixer.replaceTextRange([leftSquareBracket.range[0], rightSquareBracket.range[1]], replacementKey);
+ }
+ });
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-useless-concat.js b/tools/node_modules/eslint/lib/rules/no-useless-concat.js
new file mode 100644
index 0000000000..e42781fee7
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-useless-concat.js
@@ -0,0 +1,108 @@
+/**
+ * @fileoverview disallow unncessary concatenation of template strings
+ * @author Henry Zhu
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Checks whether or not a given node is a concatenation.
+ * @param {ASTNode} node - A node to check.
+ * @returns {boolean} `true` if the node is a concatenation.
+ */
+function isConcatenation(node) {
+ return node.type === "BinaryExpression" && node.operator === "+";
+}
+
+/**
+ * Checks if the given token is a `+` token or not.
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is a `+` token.
+ */
+function isConcatOperatorToken(token) {
+ return token.value === "+" && token.type === "Punctuator";
+}
+
+/**
+ * Get's the right most node on the left side of a BinaryExpression with + operator.
+ * @param {ASTNode} node - A BinaryExpression node to check.
+ * @returns {ASTNode} node
+ */
+function getLeft(node) {
+ let left = node.left;
+
+ while (isConcatenation(left)) {
+ left = left.right;
+ }
+ return left;
+}
+
+/**
+ * Get's the left most node on the right side of a BinaryExpression with + operator.
+ * @param {ASTNode} node - A BinaryExpression node to check.
+ * @returns {ASTNode} node
+ */
+function getRight(node) {
+ let right = node.right;
+
+ while (isConcatenation(right)) {
+ right = right.left;
+ }
+ return right;
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow unnecessary concatenation of literals or template literals",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+
+ return {
+ BinaryExpression(node) {
+
+ // check if not concatenation
+ if (node.operator !== "+") {
+ return;
+ }
+
+ // account for the `foo + "a" + "b"` case
+ const left = getLeft(node);
+ const right = getRight(node);
+
+ if (astUtils.isStringLiteral(left) &&
+ astUtils.isStringLiteral(right) &&
+ astUtils.isTokenOnSameLine(left, right)
+ ) {
+ const operatorToken = sourceCode.getFirstTokenBetween(left, right, isConcatOperatorToken);
+
+ context.report({
+ node,
+ loc: operatorToken.loc.start,
+ message: "Unexpected string concatenation of literals."
+ });
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-useless-constructor.js b/tools/node_modules/eslint/lib/rules/no-useless-constructor.js
new file mode 100644
index 0000000000..f790c789f5
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-useless-constructor.js
@@ -0,0 +1,182 @@
+/**
+ * @fileoverview Rule to flag the use of redundant constructors in classes.
+ * @author Alberto Rodríguez
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Checks whether a given array of statements is a single call of `super`.
+ *
+ * @param {ASTNode[]} body - An array of statements to check.
+ * @returns {boolean} `true` if the body is a single call of `super`.
+ */
+function isSingleSuperCall(body) {
+ return (
+ body.length === 1 &&
+ body[0].type === "ExpressionStatement" &&
+ body[0].expression.type === "CallExpression" &&
+ body[0].expression.callee.type === "Super"
+ );
+}
+
+/**
+ * Checks whether a given node is a pattern which doesn't have any side effects.
+ * Default parameters and Destructuring parameters can have side effects.
+ *
+ * @param {ASTNode} node - A pattern node.
+ * @returns {boolean} `true` if the node doesn't have any side effects.
+ */
+function isSimple(node) {
+ return node.type === "Identifier" || node.type === "RestElement";
+}
+
+/**
+ * Checks whether a given array of expressions is `...arguments` or not.
+ * `super(...arguments)` passes all arguments through.
+ *
+ * @param {ASTNode[]} superArgs - An array of expressions to check.
+ * @returns {boolean} `true` if the superArgs is `...arguments`.
+ */
+function isSpreadArguments(superArgs) {
+ return (
+ superArgs.length === 1 &&
+ superArgs[0].type === "SpreadElement" &&
+ superArgs[0].argument.type === "Identifier" &&
+ superArgs[0].argument.name === "arguments"
+ );
+}
+
+/**
+ * Checks whether given 2 nodes are identifiers which have the same name or not.
+ *
+ * @param {ASTNode} ctorParam - A node to check.
+ * @param {ASTNode} superArg - A node to check.
+ * @returns {boolean} `true` if the nodes are identifiers which have the same
+ * name.
+ */
+function isValidIdentifierPair(ctorParam, superArg) {
+ return (
+ ctorParam.type === "Identifier" &&
+ superArg.type === "Identifier" &&
+ ctorParam.name === superArg.name
+ );
+}
+
+/**
+ * Checks whether given 2 nodes are a rest/spread pair which has the same values.
+ *
+ * @param {ASTNode} ctorParam - A node to check.
+ * @param {ASTNode} superArg - A node to check.
+ * @returns {boolean} `true` if the nodes are a rest/spread pair which has the
+ * same values.
+ */
+function isValidRestSpreadPair(ctorParam, superArg) {
+ return (
+ ctorParam.type === "RestElement" &&
+ superArg.type === "SpreadElement" &&
+ isValidIdentifierPair(ctorParam.argument, superArg.argument)
+ );
+}
+
+/**
+ * Checks whether given 2 nodes have the same value or not.
+ *
+ * @param {ASTNode} ctorParam - A node to check.
+ * @param {ASTNode} superArg - A node to check.
+ * @returns {boolean} `true` if the nodes have the same value or not.
+ */
+function isValidPair(ctorParam, superArg) {
+ return (
+ isValidIdentifierPair(ctorParam, superArg) ||
+ isValidRestSpreadPair(ctorParam, superArg)
+ );
+}
+
+/**
+ * Checks whether the parameters of a constructor and the arguments of `super()`
+ * have the same values or not.
+ *
+ * @param {ASTNode} ctorParams - The parameters of a constructor to check.
+ * @param {ASTNode} superArgs - The arguments of `super()` to check.
+ * @returns {boolean} `true` if those have the same values.
+ */
+function isPassingThrough(ctorParams, superArgs) {
+ if (ctorParams.length !== superArgs.length) {
+ return false;
+ }
+
+ for (let i = 0; i < ctorParams.length; ++i) {
+ if (!isValidPair(ctorParams[i], superArgs[i])) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+/**
+ * Checks whether the constructor body is a redundant super call.
+ *
+ * @param {Array} body - constructor body content.
+ * @param {Array} ctorParams - The params to check against super call.
+ * @returns {boolean} true if the construtor body is redundant
+ */
+function isRedundantSuperCall(body, ctorParams) {
+ return (
+ isSingleSuperCall(body) &&
+ ctorParams.every(isSimple) &&
+ (
+ isSpreadArguments(body[0].expression.arguments) ||
+ isPassingThrough(ctorParams, body[0].expression.arguments)
+ )
+ );
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow unnecessary constructors",
+ category: "ECMAScript 6",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ /**
+ * Checks whether a node is a redundant constructor
+ * @param {ASTNode} node - node to check
+ * @returns {void}
+ */
+ function checkForConstructor(node) {
+ if (node.kind !== "constructor") {
+ return;
+ }
+
+ const body = node.value.body.body;
+ const ctorParams = node.value.params;
+ const superClass = node.parent.parent.superClass;
+
+ if (superClass ? isRedundantSuperCall(body, ctorParams) : (body.length === 0)) {
+ context.report({
+ node,
+ message: "Useless constructor."
+ });
+ }
+ }
+
+ return {
+ MethodDefinition: checkForConstructor
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-useless-escape.js b/tools/node_modules/eslint/lib/rules/no-useless-escape.js
new file mode 100644
index 0000000000..cdc3e98df8
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-useless-escape.js
@@ -0,0 +1,223 @@
+/**
+ * @fileoverview Look for useless escapes in strings and regexes
+ * @author Onur Temizkan
+ */
+
+"use strict";
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+/**
+ * Returns the union of two sets.
+ * @param {Set} setA The first set
+ * @param {Set} setB The second set
+ * @returns {Set} The union of the two sets
+ */
+function union(setA, setB) {
+ return new Set(function *() {
+ yield* setA;
+ yield* setB;
+ }());
+}
+
+const VALID_STRING_ESCAPES = union(new Set("\\nrvtbfux"), astUtils.LINEBREAKS);
+const REGEX_GENERAL_ESCAPES = new Set("\\bcdDfnrsStvwWxu0123456789]");
+const REGEX_NON_CHARCLASS_ESCAPES = union(REGEX_GENERAL_ESCAPES, new Set("^/.$*+?[{}|()B"));
+
+/**
+ * Parses a regular expression into a list of characters with character class info.
+ * @param {string} regExpText The raw text used to create the regular expression
+ * @returns {Object[]} A list of characters, each with info on escaping and whether they're in a character class.
+ * @example
+ *
+ * parseRegExp('a\\b[cd-]')
+ *
+ * returns:
+ * [
+ * {text: 'a', index: 0, escaped: false, inCharClass: false, startsCharClass: false, endsCharClass: false},
+ * {text: 'b', index: 2, escaped: true, inCharClass: false, startsCharClass: false, endsCharClass: false},
+ * {text: 'c', index: 4, escaped: false, inCharClass: true, startsCharClass: true, endsCharClass: false},
+ * {text: 'd', index: 5, escaped: false, inCharClass: true, startsCharClass: false, endsCharClass: false},
+ * {text: '-', index: 6, escaped: false, inCharClass: true, startsCharClass: false, endsCharClass: false}
+ * ]
+ */
+function parseRegExp(regExpText) {
+ const charList = [];
+
+ regExpText.split("").reduce((state, char, index) => {
+ if (!state.escapeNextChar) {
+ if (char === "\\") {
+ return Object.assign(state, { escapeNextChar: true });
+ }
+ if (char === "[" && !state.inCharClass) {
+ return Object.assign(state, { inCharClass: true, startingCharClass: true });
+ }
+ if (char === "]" && state.inCharClass) {
+ if (charList.length && charList[charList.length - 1].inCharClass) {
+ charList[charList.length - 1].endsCharClass = true;
+ }
+ return Object.assign(state, { inCharClass: false, startingCharClass: false });
+ }
+ }
+ charList.push({
+ text: char,
+ index,
+ escaped: state.escapeNextChar,
+ inCharClass: state.inCharClass,
+ startsCharClass: state.startingCharClass,
+ endsCharClass: false
+ });
+ return Object.assign(state, { escapeNextChar: false, startingCharClass: false });
+ }, { escapeNextChar: false, inCharClass: false, startingCharClass: false });
+
+ return charList;
+}
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow unnecessary escape characters",
+ category: "Best Practices",
+ recommended: true
+ },
+
+ schema: []
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+
+ /**
+ * Reports a node
+ * @param {ASTNode} node The node to report
+ * @param {number} startOffset The backslash's offset from the start of the node
+ * @param {string} character The uselessly escaped character (not including the backslash)
+ * @returns {void}
+ */
+ function report(node, startOffset, character) {
+ context.report({
+ node,
+ loc: sourceCode.getLocFromIndex(sourceCode.getIndexFromLoc(node.loc.start) + startOffset),
+ message: "Unnecessary escape character: \\{{character}}.",
+ data: { character }
+ });
+ }
+
+ /**
+ * Checks if the escape character in given string slice is unnecessary.
+ *
+ * @private
+ * @param {ASTNode} node - node to validate.
+ * @param {string} match - string slice to validate.
+ * @returns {void}
+ */
+ function validateString(node, match) {
+ const isTemplateElement = node.type === "TemplateElement";
+ const escapedChar = match[0][1];
+ let isUnnecessaryEscape = !VALID_STRING_ESCAPES.has(escapedChar);
+ let isQuoteEscape;
+
+ if (isTemplateElement) {
+ isQuoteEscape = escapedChar === "`";
+
+ if (escapedChar === "$") {
+
+ // Warn if `\$` is not followed by `{`
+ isUnnecessaryEscape = match.input[match.index + 2] !== "{";
+ } else if (escapedChar === "{") {
+
+ /*
+ * Warn if `\{` is not preceded by `$`. If preceded by `$`, escaping
+ * is necessary and the rule should not warn. If preceded by `/$`, the rule
+ * will warn for the `/$` instead, as it is the first unnecessarily escaped character.
+ */
+ isUnnecessaryEscape = match.input[match.index - 1] !== "$";
+ }
+ } else {
+ isQuoteEscape = escapedChar === node.raw[0];
+ }
+
+ if (isUnnecessaryEscape && !isQuoteEscape) {
+ report(node, match.index + 1, match[0].slice(1));
+ }
+ }
+
+ /**
+ * Checks if a node has an escape.
+ *
+ * @param {ASTNode} node - node to check.
+ * @returns {void}
+ */
+ function check(node) {
+ const isTemplateElement = node.type === "TemplateElement";
+
+ if (
+ isTemplateElement &&
+ node.parent &&
+ node.parent.parent &&
+ node.parent.parent.type === "TaggedTemplateExpression" &&
+ node.parent === node.parent.parent.quasi
+ ) {
+
+ // Don't report tagged template literals, because the backslash character is accessible to the tag function.
+ return;
+ }
+
+ if (typeof node.value === "string" || isTemplateElement) {
+
+ /*
+ * JSXAttribute doesn't have any escape sequence: https://facebook.github.io/jsx/.
+ * In addition, backticks are not supported by JSX yet: https://github.com/facebook/jsx/issues/25.
+ */
+ if (node.parent.type === "JSXAttribute" || node.parent.type === "JSXElement") {
+ return;
+ }
+
+ const value = isTemplateElement ? node.value.raw : node.raw.slice(1, -1);
+ const pattern = /\\[^\d]/g;
+ let match;
+
+ while ((match = pattern.exec(value))) {
+ validateString(node, match);
+ }
+ } else if (node.regex) {
+ parseRegExp(node.regex.pattern)
+
+ /*
+ * The '-' character is a special case, because it's only valid to escape it if it's in a character
+ * class, and is not at either edge of the character class. To account for this, don't consider '-'
+ * characters to be valid in general, and filter out '-' characters that appear in the middle of a
+ * character class.
+ */
+ .filter(charInfo => !(charInfo.text === "-" && charInfo.inCharClass && !charInfo.startsCharClass && !charInfo.endsCharClass))
+
+ /*
+ * The '^' character is also a special case; it must always be escaped outside of character classes, but
+ * it only needs to be escaped in character classes if it's at the beginning of the character class. To
+ * account for this, consider it to be a valid escape character outside of character classes, and filter
+ * out '^' characters that appear at the start of a character class.
+ */
+ .filter(charInfo => !(charInfo.text === "^" && charInfo.startsCharClass))
+
+ // Filter out characters that aren't escaped.
+ .filter(charInfo => charInfo.escaped)
+
+ // Filter out characters that are valid to escape, based on their position in the regular expression.
+ .filter(charInfo => !(charInfo.inCharClass ? REGEX_GENERAL_ESCAPES : REGEX_NON_CHARCLASS_ESCAPES).has(charInfo.text))
+
+ // Report all the remaining characters.
+ .forEach(charInfo => report(node, charInfo.index, charInfo.text));
+ }
+
+ }
+
+ return {
+ Literal: check,
+ TemplateElement: check
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-useless-rename.js b/tools/node_modules/eslint/lib/rules/no-useless-rename.js
new file mode 100644
index 0000000000..a489a6e51b
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-useless-rename.js
@@ -0,0 +1,147 @@
+/**
+ * @fileoverview Disallow renaming import, export, and destructured assignments to the same name.
+ * @author Kai Cataldo
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow renaming import, export, and destructured assignments to the same name",
+ category: "ECMAScript 6",
+ recommended: false
+ },
+ fixable: "code",
+ schema: [
+ {
+ type: "object",
+ properties: {
+ ignoreDestructuring: { type: "boolean" },
+ ignoreImport: { type: "boolean" },
+ ignoreExport: { type: "boolean" }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+ const options = context.options[0] || {},
+ ignoreDestructuring = options.ignoreDestructuring === true,
+ ignoreImport = options.ignoreImport === true,
+ ignoreExport = options.ignoreExport === true;
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ /**
+ * Reports error for unnecessarily renamed assignments
+ * @param {ASTNode} node - node to report
+ * @param {ASTNode} initial - node with initial name value
+ * @param {ASTNode} result - node with new name value
+ * @param {string} type - the type of the offending node
+ * @returns {void}
+ */
+ function reportError(node, initial, result, type) {
+ const name = initial.type === "Identifier" ? initial.name : initial.value;
+
+ return context.report({
+ node,
+ message: "{{type}} {{name}} unnecessarily renamed.",
+ data: {
+ name,
+ type
+ },
+ fix(fixer) {
+ return fixer.replaceTextRange([
+ initial.range[0],
+ result.range[1]
+ ], name);
+ }
+ });
+ }
+
+ /**
+ * Checks whether a destructured assignment is unnecessarily renamed
+ * @param {ASTNode} node - node to check
+ * @returns {void}
+ */
+ function checkDestructured(node) {
+ if (ignoreDestructuring) {
+ return;
+ }
+
+ const properties = node.properties;
+
+ for (let i = 0; i < properties.length; i++) {
+ if (properties[i].shorthand) {
+ continue;
+ }
+
+ /**
+ * If an ObjectPattern property is computed, we have no idea
+ * if a rename is useless or not. If an ObjectPattern property
+ * lacks a key, it is likely an ExperimentalRestProperty and
+ * so there is no "renaming" occurring here.
+ */
+ if (properties[i].computed || !properties[i].key) {
+ continue;
+ }
+
+ if (properties[i].key.type === "Identifier" && properties[i].key.name === properties[i].value.name ||
+ properties[i].key.type === "Literal" && properties[i].key.value === properties[i].value.name) {
+ reportError(properties[i], properties[i].key, properties[i].value, "Destructuring assignment");
+ }
+ }
+ }
+
+ /**
+ * Checks whether an import is unnecessarily renamed
+ * @param {ASTNode} node - node to check
+ * @returns {void}
+ */
+ function checkImport(node) {
+ if (ignoreImport) {
+ return;
+ }
+
+ if (node.imported.name === node.local.name &&
+ node.imported.range[0] !== node.local.range[0]) {
+ reportError(node, node.imported, node.local, "Import");
+ }
+ }
+
+ /**
+ * Checks whether an export is unnecessarily renamed
+ * @param {ASTNode} node - node to check
+ * @returns {void}
+ */
+ function checkExport(node) {
+ if (ignoreExport) {
+ return;
+ }
+
+ if (node.local.name === node.exported.name &&
+ node.local.range[0] !== node.exported.range[0]) {
+ reportError(node, node.local, node.exported, "Export");
+ }
+
+ }
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+ ObjectPattern: checkDestructured,
+ ImportSpecifier: checkImport,
+ ExportSpecifier: checkExport
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-useless-return.js b/tools/node_modules/eslint/lib/rules/no-useless-return.js
new file mode 100644
index 0000000000..5415bf59b8
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-useless-return.js
@@ -0,0 +1,304 @@
+/**
+ * @fileoverview Disallow redundant return statements
+ * @author Teddy Katz
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils"),
+ FixTracker = require("../util/fix-tracker");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Adds all elements of 2nd argument into 1st argument.
+ *
+ * @param {Array} array - The destination array to add.
+ * @param {Array} elements - The source array to add.
+ * @returns {void}
+ */
+const pushAll = Function.apply.bind(Array.prototype.push);
+
+/**
+ * Removes the given element from the array.
+ *
+ * @param {Array} array - The source array to remove.
+ * @param {any} element - The target item to remove.
+ * @returns {void}
+ */
+function remove(array, element) {
+ const index = array.indexOf(element);
+
+ if (index !== -1) {
+ array.splice(index, 1);
+ }
+}
+
+/**
+ * Checks whether it can remove the given return statement or not.
+ *
+ * @param {ASTNode} node - The return statement node to check.
+ * @returns {boolean} `true` if the node is removeable.
+ */
+function isRemovable(node) {
+ return astUtils.STATEMENT_LIST_PARENTS.has(node.parent.type);
+}
+
+/**
+ * Checks whether the given return statement is in a `finally` block or not.
+ *
+ * @param {ASTNode} node - The return statement node to check.
+ * @returns {boolean} `true` if the node is in a `finally` block.
+ */
+function isInFinally(node) {
+ while (node && node.parent && !astUtils.isFunction(node)) {
+ if (node.parent.type === "TryStatement" && node.parent.finalizer === node) {
+ return true;
+ }
+
+ node = node.parent;
+ }
+
+ return false;
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow redundant return statements",
+ category: "Best Practices",
+ recommended: false
+ },
+ fixable: "code",
+ schema: []
+ },
+
+ create(context) {
+ const segmentInfoMap = new WeakMap();
+ const usedUnreachableSegments = new WeakSet();
+ let scopeInfo = null;
+
+ /**
+ * Checks whether the given segment is terminated by a return statement or not.
+ *
+ * @param {CodePathSegment} segment - The segment to check.
+ * @returns {boolean} `true` if the segment is terminated by a return statement, or if it's still a part of unreachable.
+ */
+ function isReturned(segment) {
+ const info = segmentInfoMap.get(segment);
+
+ return !info || info.returned;
+ }
+
+ /**
+ * Collects useless return statements from the given previous segments.
+ *
+ * A previous segment may be an unreachable segment.
+ * In that case, the information object of the unreachable segment is not
+ * initialized because `onCodePathSegmentStart` event is not notified for
+ * unreachable segments.
+ * This goes to the previous segments of the unreachable segment recursively
+ * if the unreachable segment was generated by a return statement. Otherwise,
+ * this ignores the unreachable segment.
+ *
+ * This behavior would simulate code paths for the case that the return
+ * statement does not exist.
+ *
+ * @param {ASTNode[]} uselessReturns - The collected return statements.
+ * @param {CodePathSegment[]} prevSegments - The previous segments to traverse.
+ * @param {WeakSet<CodePathSegment>} [traversedSegments] A set of segments that have already been traversed in this call
+ * @returns {ASTNode[]} `uselessReturns`.
+ */
+ function getUselessReturns(uselessReturns, prevSegments, traversedSegments) {
+ if (!traversedSegments) {
+ traversedSegments = new WeakSet();
+ }
+ for (const segment of prevSegments) {
+ if (!segment.reachable) {
+ if (!traversedSegments.has(segment)) {
+ traversedSegments.add(segment);
+ getUselessReturns(
+ uselessReturns,
+ segment.allPrevSegments.filter(isReturned),
+ traversedSegments
+ );
+ }
+ continue;
+ }
+
+ pushAll(uselessReturns, segmentInfoMap.get(segment).uselessReturns);
+ }
+
+ return uselessReturns;
+ }
+
+ /**
+ * Removes the return statements on the given segment from the useless return
+ * statement list.
+ *
+ * This segment may be an unreachable segment.
+ * In that case, the information object of the unreachable segment is not
+ * initialized because `onCodePathSegmentStart` event is not notified for
+ * unreachable segments.
+ * This goes to the previous segments of the unreachable segment recursively
+ * if the unreachable segment was generated by a return statement. Otherwise,
+ * this ignores the unreachable segment.
+ *
+ * This behavior would simulate code paths for the case that the return
+ * statement does not exist.
+ *
+ * @param {CodePathSegment} segment - The segment to get return statements.
+ * @returns {void}
+ */
+ function markReturnStatementsOnSegmentAsUsed(segment) {
+ if (!segment.reachable) {
+ usedUnreachableSegments.add(segment);
+ segment.allPrevSegments
+ .filter(isReturned)
+ .filter(prevSegment => !usedUnreachableSegments.has(prevSegment))
+ .forEach(markReturnStatementsOnSegmentAsUsed);
+ return;
+ }
+
+ const info = segmentInfoMap.get(segment);
+
+ for (const node of info.uselessReturns) {
+ remove(scopeInfo.uselessReturns, node);
+ }
+ info.uselessReturns = [];
+ }
+
+ /**
+ * Removes the return statements on the current segments from the useless
+ * return statement list.
+ *
+ * This function will be called at every statement except FunctionDeclaration,
+ * BlockStatement, and BreakStatement.
+ *
+ * - FunctionDeclarations are always executed whether it's returned or not.
+ * - BlockStatements do nothing.
+ * - BreakStatements go the next merely.
+ *
+ * @returns {void}
+ */
+ function markReturnStatementsOnCurrentSegmentsAsUsed() {
+ scopeInfo
+ .codePath
+ .currentSegments
+ .forEach(markReturnStatementsOnSegmentAsUsed);
+ }
+
+ //----------------------------------------------------------------------
+ // Public
+ //----------------------------------------------------------------------
+
+ return {
+
+ // Makes and pushs a new scope information.
+ onCodePathStart(codePath) {
+ scopeInfo = {
+ upper: scopeInfo,
+ uselessReturns: [],
+ codePath
+ };
+ },
+
+ // Reports useless return statements if exist.
+ onCodePathEnd() {
+ for (const node of scopeInfo.uselessReturns) {
+ context.report({
+ node,
+ loc: node.loc,
+ message: "Unnecessary return statement.",
+ fix(fixer) {
+ if (isRemovable(node)) {
+
+ /*
+ * Extend the replacement range to include the
+ * entire function to avoid conflicting with
+ * no-else-return.
+ * https://github.com/eslint/eslint/issues/8026
+ */
+ return new FixTracker(fixer, context.getSourceCode())
+ .retainEnclosingFunction(node)
+ .remove(node);
+ }
+ return null;
+ }
+ });
+ }
+
+ scopeInfo = scopeInfo.upper;
+ },
+
+ /*
+ * Initializes segments.
+ * NOTE: This event is notified for only reachable segments.
+ */
+ onCodePathSegmentStart(segment) {
+ const info = {
+ uselessReturns: getUselessReturns([], segment.allPrevSegments),
+ returned: false
+ };
+
+ // Stores the info.
+ segmentInfoMap.set(segment, info);
+ },
+
+ // Adds ReturnStatement node to check whether it's useless or not.
+ ReturnStatement(node) {
+ if (node.argument) {
+ markReturnStatementsOnCurrentSegmentsAsUsed();
+ }
+ if (node.argument || astUtils.isInLoop(node) || isInFinally(node)) {
+ return;
+ }
+
+ for (const segment of scopeInfo.codePath.currentSegments) {
+ const info = segmentInfoMap.get(segment);
+
+ if (info) {
+ info.uselessReturns.push(node);
+ info.returned = true;
+ }
+ }
+ scopeInfo.uselessReturns.push(node);
+ },
+
+ /*
+ * Registers for all statement nodes except FunctionDeclaration, BlockStatement, BreakStatement.
+ * Removes return statements of the current segments from the useless return statement list.
+ */
+ ClassDeclaration: markReturnStatementsOnCurrentSegmentsAsUsed,
+ ContinueStatement: markReturnStatementsOnCurrentSegmentsAsUsed,
+ DebuggerStatement: markReturnStatementsOnCurrentSegmentsAsUsed,
+ DoWhileStatement: markReturnStatementsOnCurrentSegmentsAsUsed,
+ EmptyStatement: markReturnStatementsOnCurrentSegmentsAsUsed,
+ ExpressionStatement: markReturnStatementsOnCurrentSegmentsAsUsed,
+ ForInStatement: markReturnStatementsOnCurrentSegmentsAsUsed,
+ ForOfStatement: markReturnStatementsOnCurrentSegmentsAsUsed,
+ ForStatement: markReturnStatementsOnCurrentSegmentsAsUsed,
+ IfStatement: markReturnStatementsOnCurrentSegmentsAsUsed,
+ ImportDeclaration: markReturnStatementsOnCurrentSegmentsAsUsed,
+ LabeledStatement: markReturnStatementsOnCurrentSegmentsAsUsed,
+ SwitchStatement: markReturnStatementsOnCurrentSegmentsAsUsed,
+ ThrowStatement: markReturnStatementsOnCurrentSegmentsAsUsed,
+ TryStatement: markReturnStatementsOnCurrentSegmentsAsUsed,
+ VariableDeclaration: markReturnStatementsOnCurrentSegmentsAsUsed,
+ WhileStatement: markReturnStatementsOnCurrentSegmentsAsUsed,
+ WithStatement: markReturnStatementsOnCurrentSegmentsAsUsed,
+ ExportNamedDeclaration: markReturnStatementsOnCurrentSegmentsAsUsed,
+ ExportDefaultDeclaration: markReturnStatementsOnCurrentSegmentsAsUsed,
+ ExportAllDeclaration: markReturnStatementsOnCurrentSegmentsAsUsed
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-var.js b/tools/node_modules/eslint/lib/rules/no-var.js
new file mode 100644
index 0000000000..d3c163e557
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-var.js
@@ -0,0 +1,328 @@
+/**
+ * @fileoverview Rule to check for the usage of var.
+ * @author Jamund Ferguson
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Check whether a given variable is a global variable or not.
+ * @param {eslint-scope.Variable} variable The variable to check.
+ * @returns {boolean} `true` if the variable is a global variable.
+ */
+function isGlobal(variable) {
+ return Boolean(variable.scope) && variable.scope.type === "global";
+}
+
+/**
+ * Finds the nearest function scope or global scope walking up the scope
+ * hierarchy.
+ *
+ * @param {eslint-scope.Scope} scope - The scope to traverse.
+ * @returns {eslint-scope.Scope} a function scope or global scope containing the given
+ * scope.
+ */
+function getEnclosingFunctionScope(scope) {
+ while (scope.type !== "function" && scope.type !== "global") {
+ scope = scope.upper;
+ }
+ return scope;
+}
+
+/**
+ * Checks whether the given variable has any references from a more specific
+ * function expression (i.e. a closure).
+ *
+ * @param {eslint-scope.Variable} variable - A variable to check.
+ * @returns {boolean} `true` if the variable is used from a closure.
+ */
+function isReferencedInClosure(variable) {
+ const enclosingFunctionScope = getEnclosingFunctionScope(variable.scope);
+
+ return variable.references.some(reference =>
+ getEnclosingFunctionScope(reference.from) !== enclosingFunctionScope);
+}
+
+/**
+ * Checks whether the given node is the assignee of a loop.
+ *
+ * @param {ASTNode} node - A VariableDeclaration node to check.
+ * @returns {boolean} `true` if the declaration is assigned as part of loop
+ * iteration.
+ */
+function isLoopAssignee(node) {
+ return (node.parent.type === "ForOfStatement" || node.parent.type === "ForInStatement") &&
+ node === node.parent.left;
+}
+
+/**
+ * Checks whether the given variable declaration is immediately initialized.
+ *
+ * @param {ASTNode} node - A VariableDeclaration node to check.
+ * @returns {boolean} `true` if the declaration has an initializer.
+ */
+function isDeclarationInitialized(node) {
+ return node.declarations.every(declarator => declarator.init !== null);
+}
+
+const SCOPE_NODE_TYPE = /^(?:Program|BlockStatement|SwitchStatement|ForStatement|ForInStatement|ForOfStatement)$/;
+
+/**
+ * Gets the scope node which directly contains a given node.
+ *
+ * @param {ASTNode} node - A node to get. This is a `VariableDeclaration` or
+ * an `Identifier`.
+ * @returns {ASTNode} A scope node. This is one of `Program`, `BlockStatement`,
+ * `SwitchStatement`, `ForStatement`, `ForInStatement`, and
+ * `ForOfStatement`.
+ */
+function getScopeNode(node) {
+ while (node) {
+ if (SCOPE_NODE_TYPE.test(node.type)) {
+ return node;
+ }
+
+ node = node.parent;
+ }
+
+ /* istanbul ignore next : unreachable */
+ return null;
+}
+
+/**
+ * Checks whether a given variable is redeclared or not.
+ *
+ * @param {eslint-scope.Variable} variable - A variable to check.
+ * @returns {boolean} `true` if the variable is redeclared.
+ */
+function isRedeclared(variable) {
+ return variable.defs.length >= 2;
+}
+
+/**
+ * Checks whether a given variable is used from outside of the specified scope.
+ *
+ * @param {ASTNode} scopeNode - A scope node to check.
+ * @returns {Function} The predicate function which checks whether a given
+ * variable is used from outside of the specified scope.
+ */
+function isUsedFromOutsideOf(scopeNode) {
+
+ /**
+ * Checks whether a given reference is inside of the specified scope or not.
+ *
+ * @param {eslint-scope.Reference} reference - A reference to check.
+ * @returns {boolean} `true` if the reference is inside of the specified
+ * scope.
+ */
+ function isOutsideOfScope(reference) {
+ const scope = scopeNode.range;
+ const id = reference.identifier.range;
+
+ return id[0] < scope[0] || id[1] > scope[1];
+ }
+
+ return function(variable) {
+ return variable.references.some(isOutsideOfScope);
+ };
+}
+
+/**
+ * Creates the predicate function which checks whether a variable has their references in TDZ.
+ *
+ * The predicate function would return `true`:
+ *
+ * - if a reference is before the declarator. E.g. (var a = b, b = 1;)(var {a = b, b} = {};)
+ * - if a reference is in the expression of their default value. E.g. (var {a = a} = {};)
+ * - if a reference is in the expression of their initializer. E.g. (var a = a;)
+ *
+ * @param {ASTNode} node - The initializer node of VariableDeclarator.
+ * @returns {Function} The predicate function.
+ * @private
+ */
+function hasReferenceInTDZ(node) {
+ const initStart = node.range[0];
+ const initEnd = node.range[1];
+
+ return variable => {
+ const id = variable.defs[0].name;
+ const idStart = id.range[0];
+ const defaultValue = (id.parent.type === "AssignmentPattern" ? id.parent.right : null);
+ const defaultStart = defaultValue && defaultValue.range[0];
+ const defaultEnd = defaultValue && defaultValue.range[1];
+
+ return variable.references.some(reference => {
+ const start = reference.identifier.range[0];
+ const end = reference.identifier.range[1];
+
+ return !reference.init && (
+ start < idStart ||
+ (defaultValue !== null && start >= defaultStart && end <= defaultEnd) ||
+ (start >= initStart && end <= initEnd)
+ );
+ });
+ };
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require `let` or `const` instead of `var`",
+ category: "ECMAScript 6",
+ recommended: false
+ },
+
+ schema: [],
+ fixable: "code"
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+
+ /**
+ * Checks whether the variables which are defined by the given declarator node have their references in TDZ.
+ *
+ * @param {ASTNode} declarator - The VariableDeclarator node to check.
+ * @returns {boolean} `true` if one of the variables which are defined by the given declarator node have their references in TDZ.
+ */
+ function hasSelfReferenceInTDZ(declarator) {
+ if (!declarator.init) {
+ return false;
+ }
+ const variables = context.getDeclaredVariables(declarator);
+
+ return variables.some(hasReferenceInTDZ(declarator.init));
+ }
+
+ /**
+ * Checks whether it can fix a given variable declaration or not.
+ * It cannot fix if the following cases:
+ *
+ * - A variable is a global variable.
+ * - A variable is declared on a SwitchCase node.
+ * - A variable is redeclared.
+ * - A variable is used from outside the scope.
+ * - A variable is used from a closure within a loop.
+ * - A variable might be used before it is assigned within a loop.
+ * - A variable might be used in TDZ.
+ * - A variable is declared in statement position (e.g. a single-line `IfStatement`)
+ *
+ * ## A variable is declared on a SwitchCase node.
+ *
+ * If this rule modifies 'var' declarations on a SwitchCase node, it
+ * would generate the warnings of 'no-case-declarations' rule. And the
+ * 'eslint:recommended' preset includes 'no-case-declarations' rule, so
+ * this rule doesn't modify those declarations.
+ *
+ * ## A variable is redeclared.
+ *
+ * The language spec disallows redeclarations of `let` declarations.
+ * Those variables would cause syntax errors.
+ *
+ * ## A variable is used from outside the scope.
+ *
+ * The language spec disallows accesses from outside of the scope for
+ * `let` declarations. Those variables would cause reference errors.
+ *
+ * ## A variable is used from a closure within a loop.
+ *
+ * A `var` declaration within a loop shares the same variable instance
+ * across all loop iterations, while a `let` declaration creates a new
+ * instance for each iteration. This means if a variable in a loop is
+ * referenced by any closure, changing it from `var` to `let` would
+ * change the behavior in a way that is generally unsafe.
+ *
+ * ## A variable might be used before it is assigned within a loop.
+ *
+ * Within a loop, a `let` declaration without an initializer will be
+ * initialized to null, while a `var` declaration will retain its value
+ * from the previous iteration, so it is only safe to change `var` to
+ * `let` if we can statically determine that the variable is always
+ * assigned a value before its first access in the loop body. To keep
+ * the implementation simple, we only convert `var` to `let` within
+ * loops when the variable is a loop assignee or the declaration has an
+ * initializer.
+ *
+ * @param {ASTNode} node - A variable declaration node to check.
+ * @returns {boolean} `true` if it can fix the node.
+ */
+ function canFix(node) {
+ const variables = context.getDeclaredVariables(node);
+ const scopeNode = getScopeNode(node);
+
+ if (node.parent.type === "SwitchCase" ||
+ node.declarations.some(hasSelfReferenceInTDZ) ||
+ variables.some(isGlobal) ||
+ variables.some(isRedeclared) ||
+ variables.some(isUsedFromOutsideOf(scopeNode))
+ ) {
+ return false;
+ }
+
+ if (astUtils.isInLoop(node)) {
+ if (variables.some(isReferencedInClosure)) {
+ return false;
+ }
+ if (!isLoopAssignee(node) && !isDeclarationInitialized(node)) {
+ return false;
+ }
+ }
+
+ if (
+ !isLoopAssignee(node) &&
+ !(node.parent.type === "ForStatement" && node.parent.init === node) &&
+ !astUtils.STATEMENT_LIST_PARENTS.has(node.parent.type)
+ ) {
+
+ // If the declaration is not in a block, e.g. `if (foo) var bar = 1;`, then it can't be fixed.
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Reports a given variable declaration node.
+ *
+ * @param {ASTNode} node - A variable declaration node to report.
+ * @returns {void}
+ */
+ function report(node) {
+ const varToken = sourceCode.getFirstToken(node);
+
+ context.report({
+ node,
+ message: "Unexpected var, use let or const instead.",
+
+ fix(fixer) {
+ if (canFix(node)) {
+ return fixer.replaceText(varToken, "let");
+ }
+ return null;
+ }
+ });
+ }
+
+ return {
+ "VariableDeclaration:exit"(node) {
+ if (node.kind === "var") {
+ report(node);
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-void.js b/tools/node_modules/eslint/lib/rules/no-void.js
new file mode 100644
index 0000000000..5202fa49a8
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-void.js
@@ -0,0 +1,37 @@
+/**
+ * @fileoverview Rule to disallow use of void operator.
+ * @author Mike Sidorov
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow `void` operators",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+ UnaryExpression(node) {
+ if (node.operator === "void") {
+ context.report({ node, message: "Expected 'undefined' and instead saw 'void'." });
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-warning-comments.js b/tools/node_modules/eslint/lib/rules/no-warning-comments.js
new file mode 100644
index 0000000000..c0ecaca9e7
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-warning-comments.js
@@ -0,0 +1,139 @@
+/**
+ * @fileoverview Rule that warns about used warning comments
+ * @author Alexander Schmidt <https://github.com/lxanders>
+ */
+
+"use strict";
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow specified warning terms in comments",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ terms: {
+ type: "array",
+ items: {
+ type: "string"
+ }
+ },
+ location: {
+ enum: ["start", "anywhere"]
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+
+ const sourceCode = context.getSourceCode(),
+ configuration = context.options[0] || {},
+ warningTerms = configuration.terms || ["todo", "fixme", "xxx"],
+ location = configuration.location || "start",
+ selfConfigRegEx = /\bno-warning-comments\b/;
+
+ /**
+ * Convert a warning term into a RegExp which will match a comment containing that whole word in the specified
+ * location ("start" or "anywhere"). If the term starts or ends with non word characters, then the match will not
+ * require word boundaries on that side.
+ *
+ * @param {string} term A term to convert to a RegExp
+ * @returns {RegExp} The term converted to a RegExp
+ */
+ function convertToRegExp(term) {
+ const escaped = term.replace(/[-/\\$^*+?.()|[\]{}]/g, "\\$&");
+ let prefix;
+
+ /*
+ * If the term ends in a word character (a-z0-9_), ensure a word
+ * boundary at the end, so that substrings do not get falsely
+ * matched. eg "todo" in a string such as "mastodon".
+ * If the term ends in a non-word character, then \b won't match on
+ * the boundary to the next non-word character, which would likely
+ * be a space. For example `/\bFIX!\b/.test('FIX! blah') === false`.
+ * In these cases, use no bounding match. Same applies for the
+ * prefix, handled below.
+ */
+ const suffix = /\w$/.test(term) ? "\\b" : "";
+
+ if (location === "start") {
+
+ /*
+ * When matching at the start, ignore leading whitespace, and
+ * there's no need to worry about word boundaries.
+ */
+ prefix = "^\\s*";
+ } else if (/^\w/.test(term)) {
+ prefix = "\\b";
+ } else {
+ prefix = "";
+ }
+
+ return new RegExp(prefix + escaped + suffix, "i");
+ }
+
+ const warningRegExps = warningTerms.map(convertToRegExp);
+
+ /**
+ * Checks the specified comment for matches of the configured warning terms and returns the matches.
+ * @param {string} comment The comment which is checked.
+ * @returns {Array} All matched warning terms for this comment.
+ */
+ function commentContainsWarningTerm(comment) {
+ const matches = [];
+
+ warningRegExps.forEach((regex, index) => {
+ if (regex.test(comment)) {
+ matches.push(warningTerms[index]);
+ }
+ });
+
+ return matches;
+ }
+
+ /**
+ * Checks the specified node for matching warning comments and reports them.
+ * @param {ASTNode} node The AST node being checked.
+ * @returns {void} undefined.
+ */
+ function checkComment(node) {
+ if (astUtils.isDirectiveComment(node) && selfConfigRegEx.test(node.value)) {
+ return;
+ }
+
+ const matches = commentContainsWarningTerm(node.value);
+
+ matches.forEach(matchedTerm => {
+ context.report({
+ node,
+ message: "Unexpected '{{matchedTerm}}' comment.",
+ data: {
+ matchedTerm
+ }
+ });
+ });
+ }
+
+ return {
+ Program() {
+ const comments = sourceCode.getAllComments();
+
+ comments.filter(token => token.type !== "Shebang").forEach(checkComment);
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-whitespace-before-property.js b/tools/node_modules/eslint/lib/rules/no-whitespace-before-property.js
new file mode 100644
index 0000000000..2d476b66c0
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-whitespace-before-property.js
@@ -0,0 +1,94 @@
+/**
+ * @fileoverview Rule to disallow whitespace before properties
+ * @author Kai Cataldo
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow whitespace before properties",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ fixable: "whitespace",
+ schema: []
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ /**
+ * Reports whitespace before property token
+ * @param {ASTNode} node - the node to report in the event of an error
+ * @param {Token} leftToken - the left token
+ * @param {Token} rightToken - the right token
+ * @returns {void}
+ * @private
+ */
+ function reportError(node, leftToken, rightToken) {
+ const replacementText = node.computed ? "" : ".";
+
+ context.report({
+ node,
+ message: "Unexpected whitespace before property {{propName}}.",
+ data: {
+ propName: sourceCode.getText(node.property)
+ },
+ fix(fixer) {
+ if (!node.computed && astUtils.isDecimalInteger(node.object)) {
+
+ /*
+ * If the object is a number literal, fixing it to something like 5.toString() would cause a SyntaxError.
+ * Don't fix this case.
+ */
+ return null;
+ }
+ return fixer.replaceTextRange([leftToken.range[1], rightToken.range[0]], replacementText);
+ }
+ });
+ }
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+ MemberExpression(node) {
+ let rightToken;
+ let leftToken;
+
+ if (!astUtils.isTokenOnSameLine(node.object, node.property)) {
+ return;
+ }
+
+ if (node.computed) {
+ rightToken = sourceCode.getTokenBefore(node.property, astUtils.isOpeningBracketToken);
+ leftToken = sourceCode.getTokenBefore(rightToken);
+ } else {
+ rightToken = sourceCode.getFirstToken(node.property);
+ leftToken = sourceCode.getTokenBefore(rightToken, 1);
+ }
+
+ if (sourceCode.isSpaceBetweenTokens(leftToken, rightToken)) {
+ reportError(node, leftToken, rightToken);
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/no-with.js b/tools/node_modules/eslint/lib/rules/no-with.js
new file mode 100644
index 0000000000..be9e346360
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/no-with.js
@@ -0,0 +1,32 @@
+/**
+ * @fileoverview Rule to flag use of with statement
+ * @author Nicholas C. Zakas
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow `with` statements",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ return {
+ WithStatement(node) {
+ context.report({ node, message: "Unexpected use of 'with' statement." });
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/nonblock-statement-body-position.js b/tools/node_modules/eslint/lib/rules/nonblock-statement-body-position.js
new file mode 100644
index 0000000000..212e36a57c
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/nonblock-statement-body-position.js
@@ -0,0 +1,114 @@
+/**
+ * @fileoverview enforce the location of single-line statements
+ * @author Teddy Katz
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+const POSITION_SCHEMA = { enum: ["beside", "below", "any"] };
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce the location of single-line statements",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+ fixable: "whitespace",
+ schema: [
+ POSITION_SCHEMA,
+ {
+ properties: {
+ overrides: {
+ properties: {
+ if: POSITION_SCHEMA,
+ else: POSITION_SCHEMA,
+ while: POSITION_SCHEMA,
+ do: POSITION_SCHEMA,
+ for: POSITION_SCHEMA
+ },
+ additionalProperties: false
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+
+ //----------------------------------------------------------------------
+ // Helpers
+ //----------------------------------------------------------------------
+
+ /**
+ * Gets the applicable preference for a particular keyword
+ * @param {string} keywordName The name of a keyword, e.g. 'if'
+ * @returns {string} The applicable option for the keyword, e.g. 'beside'
+ */
+ function getOption(keywordName) {
+ return context.options[1] && context.options[1].overrides && context.options[1].overrides[keywordName] ||
+ context.options[0] ||
+ "beside";
+ }
+
+ /**
+ * Validates the location of a single-line statement
+ * @param {ASTNode} node The single-line statement
+ * @param {string} keywordName The applicable keyword name for the single-line statement
+ * @returns {void}
+ */
+ function validateStatement(node, keywordName) {
+ const option = getOption(keywordName);
+
+ if (node.type === "BlockStatement" || option === "any") {
+ return;
+ }
+
+ const tokenBefore = sourceCode.getTokenBefore(node);
+
+ if (tokenBefore.loc.end.line === node.loc.start.line && option === "below") {
+ context.report({
+ node,
+ message: "Expected a linebreak before this statement.",
+ fix: fixer => fixer.insertTextBefore(node, "\n")
+ });
+ } else if (tokenBefore.loc.end.line !== node.loc.start.line && option === "beside") {
+ context.report({
+ node,
+ message: "Expected no linebreak before this statement.",
+ fix(fixer) {
+ if (sourceCode.getText().slice(tokenBefore.range[1], node.range[0]).trim()) {
+ return null;
+ }
+ return fixer.replaceTextRange([tokenBefore.range[1], node.range[0]], " ");
+ }
+ });
+ }
+ }
+
+ //----------------------------------------------------------------------
+ // Public
+ //----------------------------------------------------------------------
+
+ return {
+ IfStatement(node) {
+ validateStatement(node.consequent, "if");
+
+ // Check the `else` node, but don't check 'else if' statements.
+ if (node.alternate && node.alternate.type !== "IfStatement") {
+ validateStatement(node.alternate, "else");
+ }
+ },
+ WhileStatement: node => validateStatement(node.body, "while"),
+ DoWhileStatement: node => validateStatement(node.body, "do"),
+ ForStatement: node => validateStatement(node.body, "for"),
+ ForInStatement: node => validateStatement(node.body, "for"),
+ ForOfStatement: node => validateStatement(node.body, "for")
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/object-curly-newline.js b/tools/node_modules/eslint/lib/rules/object-curly-newline.js
new file mode 100644
index 0000000000..ebad69de2e
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/object-curly-newline.js
@@ -0,0 +1,249 @@
+/**
+ * @fileoverview Rule to require or disallow line breaks inside braces.
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+// Schema objects.
+const OPTION_VALUE = {
+ oneOf: [
+ {
+ enum: ["always", "never"]
+ },
+ {
+ type: "object",
+ properties: {
+ multiline: {
+ type: "boolean"
+ },
+ minProperties: {
+ type: "integer",
+ minimum: 0
+ },
+ consistent: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false,
+ minProperties: 1
+ }
+ ]
+};
+
+/**
+ * Normalizes a given option value.
+ *
+ * @param {string|Object|undefined} value - An option value to parse.
+ * @returns {{multiline: boolean, minProperties: number, consistent: boolean}} Normalized option object.
+ */
+function normalizeOptionValue(value) {
+ let multiline = false;
+ let minProperties = Number.POSITIVE_INFINITY;
+ let consistent = false;
+
+ if (value) {
+ if (value === "always") {
+ minProperties = 0;
+ } else if (value === "never") {
+ minProperties = Number.POSITIVE_INFINITY;
+ } else {
+ multiline = Boolean(value.multiline);
+ minProperties = value.minProperties || Number.POSITIVE_INFINITY;
+ consistent = Boolean(value.consistent);
+ }
+ } else {
+ multiline = true;
+ }
+
+ return { multiline, minProperties, consistent };
+}
+
+/**
+ * Normalizes a given option value.
+ *
+ * @param {string|Object|undefined} options - An option value to parse.
+ * @returns {{ObjectExpression: {multiline: boolean, minProperties: number}, ObjectPattern: {multiline: boolean, minProperties: number}}} Normalized option object.
+ */
+function normalizeOptions(options) {
+ if (options && (options.ObjectExpression || options.ObjectPattern)) {
+ return {
+ ObjectExpression: normalizeOptionValue(options.ObjectExpression),
+ ObjectPattern: normalizeOptionValue(options.ObjectPattern)
+ };
+ }
+
+ const value = normalizeOptionValue(options);
+
+ return { ObjectExpression: value, ObjectPattern: value };
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce consistent line breaks inside braces",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+ fixable: "whitespace",
+ schema: [
+ {
+ oneOf: [
+ OPTION_VALUE,
+ {
+ type: "object",
+ properties: {
+ ObjectExpression: OPTION_VALUE,
+ ObjectPattern: OPTION_VALUE
+ },
+ additionalProperties: false,
+ minProperties: 1
+ }
+ ]
+ }
+ ]
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+ const normalizedOptions = normalizeOptions(context.options[0]);
+
+ /**
+ * Reports a given node if it violated this rule.
+ *
+ * @param {ASTNode} node - A node to check. This is an ObjectExpression node or an ObjectPattern node.
+ * @param {{multiline: boolean, minProperties: number}} options - An option object.
+ * @returns {void}
+ */
+ function check(node) {
+ const options = normalizedOptions[node.type];
+ const openBrace = sourceCode.getFirstToken(node, token => token.value === "{");
+ let closeBrace;
+
+ if (node.typeAnnotation) {
+ closeBrace = sourceCode.getTokenBefore(node.typeAnnotation);
+ } else {
+ closeBrace = sourceCode.getLastToken(node);
+ }
+
+ let first = sourceCode.getTokenAfter(openBrace, { includeComments: true });
+ let last = sourceCode.getTokenBefore(closeBrace, { includeComments: true });
+ const needsLinebreaks = (
+ node.properties.length >= options.minProperties ||
+ (
+ options.multiline &&
+ node.properties.length > 0 &&
+ first.loc.start.line !== last.loc.end.line
+ )
+ );
+ const hasCommentsFirstToken = astUtils.isCommentToken(first);
+ const hasCommentsLastToken = astUtils.isCommentToken(last);
+
+ /*
+ * Use tokens or comments to check multiline or not.
+ * But use only tokens to check whether line breaks are needed.
+ * This allows:
+ * var obj = { // eslint-disable-line foo
+ * a: 1
+ * }
+ */
+ first = sourceCode.getTokenAfter(openBrace);
+ last = sourceCode.getTokenBefore(closeBrace);
+
+ if (needsLinebreaks) {
+ if (astUtils.isTokenOnSameLine(openBrace, first)) {
+ context.report({
+ message: "Expected a line break after this opening brace.",
+ node,
+ loc: openBrace.loc.start,
+ fix(fixer) {
+ if (hasCommentsFirstToken) {
+ return null;
+ }
+
+ return fixer.insertTextAfter(openBrace, "\n");
+ }
+ });
+ }
+ if (astUtils.isTokenOnSameLine(last, closeBrace)) {
+ context.report({
+ message: "Expected a line break before this closing brace.",
+ node,
+ loc: closeBrace.loc.start,
+ fix(fixer) {
+ if (hasCommentsLastToken) {
+ return null;
+ }
+
+ return fixer.insertTextBefore(closeBrace, "\n");
+ }
+ });
+ }
+ } else {
+ const consistent = options.consistent;
+ const hasLineBreakBetweenOpenBraceAndFirst = !astUtils.isTokenOnSameLine(openBrace, first);
+ const hasLineBreakBetweenCloseBraceAndLast = !astUtils.isTokenOnSameLine(last, closeBrace);
+
+ if (
+ (!consistent && hasLineBreakBetweenOpenBraceAndFirst) ||
+ (consistent && hasLineBreakBetweenOpenBraceAndFirst && !hasLineBreakBetweenCloseBraceAndLast)
+ ) {
+ context.report({
+ message: "Unexpected line break after this opening brace.",
+ node,
+ loc: openBrace.loc.start,
+ fix(fixer) {
+ if (hasCommentsFirstToken) {
+ return null;
+ }
+
+ return fixer.removeRange([
+ openBrace.range[1],
+ first.range[0]
+ ]);
+ }
+ });
+ }
+ if (
+ (!consistent && hasLineBreakBetweenCloseBraceAndLast) ||
+ (consistent && !hasLineBreakBetweenOpenBraceAndFirst && hasLineBreakBetweenCloseBraceAndLast)
+ ) {
+ context.report({
+ message: "Unexpected line break before this closing brace.",
+ node,
+ loc: closeBrace.loc.start,
+ fix(fixer) {
+ if (hasCommentsLastToken) {
+ return null;
+ }
+
+ return fixer.removeRange([
+ last.range[1],
+ closeBrace.range[0]
+ ]);
+ }
+ });
+ }
+ }
+ }
+
+ return {
+ ObjectExpression: check,
+ ObjectPattern: check
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/object-curly-spacing.js b/tools/node_modules/eslint/lib/rules/object-curly-spacing.js
new file mode 100644
index 0000000000..3341e915f2
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/object-curly-spacing.js
@@ -0,0 +1,299 @@
+/**
+ * @fileoverview Disallows or enforces spaces inside of object literals.
+ * @author Jamund Ferguson
+ */
+"use strict";
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce consistent spacing inside braces",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ fixable: "whitespace",
+
+ schema: [
+ {
+ enum: ["always", "never"]
+ },
+ {
+ type: "object",
+ properties: {
+ arraysInObjects: {
+ type: "boolean"
+ },
+ objectsInObjects: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+ const spaced = context.options[0] === "always",
+ sourceCode = context.getSourceCode();
+
+ /**
+ * Determines whether an option is set, relative to the spacing option.
+ * If spaced is "always", then check whether option is set to false.
+ * If spaced is "never", then check whether option is set to true.
+ * @param {Object} option - The option to exclude.
+ * @returns {boolean} Whether or not the property is excluded.
+ */
+ function isOptionSet(option) {
+ return context.options[1] ? context.options[1][option] === !spaced : false;
+ }
+
+ const options = {
+ spaced,
+ arraysInObjectsException: isOptionSet("arraysInObjects"),
+ objectsInObjectsException: isOptionSet("objectsInObjects")
+ };
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ /**
+ * Reports that there shouldn't be a space after the first token
+ * @param {ASTNode} node - The node to report in the event of an error.
+ * @param {Token} token - The token to use for the report.
+ * @returns {void}
+ */
+ function reportNoBeginningSpace(node, token) {
+ context.report({
+ node,
+ loc: token.loc.start,
+ message: "There should be no space after '{{token}}'.",
+ data: {
+ token: token.value
+ },
+ fix(fixer) {
+ const nextToken = context.getSourceCode().getTokenAfter(token);
+
+ return fixer.removeRange([token.range[1], nextToken.range[0]]);
+ }
+ });
+ }
+
+ /**
+ * Reports that there shouldn't be a space before the last token
+ * @param {ASTNode} node - The node to report in the event of an error.
+ * @param {Token} token - The token to use for the report.
+ * @returns {void}
+ */
+ function reportNoEndingSpace(node, token) {
+ context.report({
+ node,
+ loc: token.loc.start,
+ message: "There should be no space before '{{token}}'.",
+ data: {
+ token: token.value
+ },
+ fix(fixer) {
+ const previousToken = context.getSourceCode().getTokenBefore(token);
+
+ return fixer.removeRange([previousToken.range[1], token.range[0]]);
+ }
+ });
+ }
+
+ /**
+ * Reports that there should be a space after the first token
+ * @param {ASTNode} node - The node to report in the event of an error.
+ * @param {Token} token - The token to use for the report.
+ * @returns {void}
+ */
+ function reportRequiredBeginningSpace(node, token) {
+ context.report({
+ node,
+ loc: token.loc.start,
+ message: "A space is required after '{{token}}'.",
+ data: {
+ token: token.value
+ },
+ fix(fixer) {
+ return fixer.insertTextAfter(token, " ");
+ }
+ });
+ }
+
+ /**
+ * Reports that there should be a space before the last token
+ * @param {ASTNode} node - The node to report in the event of an error.
+ * @param {Token} token - The token to use for the report.
+ * @returns {void}
+ */
+ function reportRequiredEndingSpace(node, token) {
+ context.report({
+ node,
+ loc: token.loc.start,
+ message: "A space is required before '{{token}}'.",
+ data: {
+ token: token.value
+ },
+ fix(fixer) {
+ return fixer.insertTextBefore(token, " ");
+ }
+ });
+ }
+
+ /**
+ * Determines if spacing in curly braces is valid.
+ * @param {ASTNode} node The AST node to check.
+ * @param {Token} first The first token to check (should be the opening brace)
+ * @param {Token} second The second token to check (should be first after the opening brace)
+ * @param {Token} penultimate The penultimate token to check (should be last before closing brace)
+ * @param {Token} last The last token to check (should be closing brace)
+ * @returns {void}
+ */
+ function validateBraceSpacing(node, first, second, penultimate, last) {
+ if (astUtils.isTokenOnSameLine(first, second)) {
+ const firstSpaced = sourceCode.isSpaceBetweenTokens(first, second);
+
+ if (options.spaced && !firstSpaced) {
+ reportRequiredBeginningSpace(node, first);
+ }
+ if (!options.spaced && firstSpaced) {
+ reportNoBeginningSpace(node, first);
+ }
+ }
+
+ if (astUtils.isTokenOnSameLine(penultimate, last)) {
+ const shouldCheckPenultimate = (
+ options.arraysInObjectsException && astUtils.isClosingBracketToken(penultimate) ||
+ options.objectsInObjectsException && astUtils.isClosingBraceToken(penultimate)
+ );
+ const penultimateType = shouldCheckPenultimate && sourceCode.getNodeByRangeIndex(penultimate.range[0]).type;
+
+ const closingCurlyBraceMustBeSpaced = (
+ options.arraysInObjectsException && penultimateType === "ArrayExpression" ||
+ options.objectsInObjectsException && (penultimateType === "ObjectExpression" || penultimateType === "ObjectPattern")
+ ) ? !options.spaced : options.spaced;
+
+ const lastSpaced = sourceCode.isSpaceBetweenTokens(penultimate, last);
+
+ if (closingCurlyBraceMustBeSpaced && !lastSpaced) {
+ reportRequiredEndingSpace(node, last);
+ }
+ if (!closingCurlyBraceMustBeSpaced && lastSpaced) {
+ reportNoEndingSpace(node, last);
+ }
+ }
+ }
+
+ /**
+ * Gets '}' token of an object node.
+ *
+ * Because the last token of object patterns might be a type annotation,
+ * this traverses tokens preceded by the last property, then returns the
+ * first '}' token.
+ *
+ * @param {ASTNode} node - The node to get. This node is an
+ * ObjectExpression or an ObjectPattern. And this node has one or
+ * more properties.
+ * @returns {Token} '}' token.
+ */
+ function getClosingBraceOfObject(node) {
+ const lastProperty = node.properties[node.properties.length - 1];
+
+ return sourceCode.getTokenAfter(lastProperty, astUtils.isClosingBraceToken);
+ }
+
+ /**
+ * Reports a given object node if spacing in curly braces is invalid.
+ * @param {ASTNode} node - An ObjectExpression or ObjectPattern node to check.
+ * @returns {void}
+ */
+ function checkForObject(node) {
+ if (node.properties.length === 0) {
+ return;
+ }
+
+ const first = sourceCode.getFirstToken(node),
+ last = getClosingBraceOfObject(node),
+ second = sourceCode.getTokenAfter(first),
+ penultimate = sourceCode.getTokenBefore(last);
+
+ validateBraceSpacing(node, first, second, penultimate, last);
+ }
+
+ /**
+ * Reports a given import node if spacing in curly braces is invalid.
+ * @param {ASTNode} node - An ImportDeclaration node to check.
+ * @returns {void}
+ */
+ function checkForImport(node) {
+ if (node.specifiers.length === 0) {
+ return;
+ }
+
+ let firstSpecifier = node.specifiers[0];
+ const lastSpecifier = node.specifiers[node.specifiers.length - 1];
+
+ if (lastSpecifier.type !== "ImportSpecifier") {
+ return;
+ }
+ if (firstSpecifier.type !== "ImportSpecifier") {
+ firstSpecifier = node.specifiers[1];
+ }
+
+ const first = sourceCode.getTokenBefore(firstSpecifier),
+ last = sourceCode.getTokenAfter(lastSpecifier, astUtils.isNotCommaToken),
+ second = sourceCode.getTokenAfter(first),
+ penultimate = sourceCode.getTokenBefore(last);
+
+ validateBraceSpacing(node, first, second, penultimate, last);
+ }
+
+ /**
+ * Reports a given export node if spacing in curly braces is invalid.
+ * @param {ASTNode} node - An ExportNamedDeclaration node to check.
+ * @returns {void}
+ */
+ function checkForExport(node) {
+ if (node.specifiers.length === 0) {
+ return;
+ }
+
+ const firstSpecifier = node.specifiers[0],
+ lastSpecifier = node.specifiers[node.specifiers.length - 1],
+ first = sourceCode.getTokenBefore(firstSpecifier),
+ last = sourceCode.getTokenAfter(lastSpecifier, astUtils.isNotCommaToken),
+ second = sourceCode.getTokenAfter(first),
+ penultimate = sourceCode.getTokenBefore(last);
+
+ validateBraceSpacing(node, first, second, penultimate, last);
+ }
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+
+ // var {x} = y;
+ ObjectPattern: checkForObject,
+
+ // var y = {x: 'y'}
+ ObjectExpression: checkForObject,
+
+ // import {y} from 'x';
+ ImportDeclaration: checkForImport,
+
+ // export {name} from 'yo';
+ ExportNamedDeclaration: checkForExport
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/object-property-newline.js b/tools/node_modules/eslint/lib/rules/object-property-newline.js
new file mode 100644
index 0000000000..0463e389ab
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/object-property-newline.js
@@ -0,0 +1,84 @@
+/**
+ * @fileoverview Rule to enforce placing object properties on separate lines.
+ * @author Vitor Balocco
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce placing object properties on separate lines",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ allowMultiplePropertiesPerLine: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ],
+
+ fixable: "whitespace"
+ },
+
+ create(context) {
+ const allowSameLine = context.options[0] && Boolean(context.options[0].allowMultiplePropertiesPerLine);
+ const errorMessage = allowSameLine
+ ? "Object properties must go on a new line if they aren't all on the same line."
+ : "Object properties must go on a new line.";
+
+ const sourceCode = context.getSourceCode();
+
+ return {
+ ObjectExpression(node) {
+ if (allowSameLine) {
+ if (node.properties.length > 1) {
+ const firstTokenOfFirstProperty = sourceCode.getFirstToken(node.properties[0]);
+ const lastTokenOfLastProperty = sourceCode.getLastToken(node.properties[node.properties.length - 1]);
+
+ if (firstTokenOfFirstProperty.loc.end.line === lastTokenOfLastProperty.loc.start.line) {
+
+ // All keys and values are on the same line
+ return;
+ }
+ }
+ }
+
+ for (let i = 1; i < node.properties.length; i++) {
+ const lastTokenOfPreviousProperty = sourceCode.getLastToken(node.properties[i - 1]);
+ const firstTokenOfCurrentProperty = sourceCode.getFirstToken(node.properties[i]);
+
+ if (lastTokenOfPreviousProperty.loc.end.line === firstTokenOfCurrentProperty.loc.start.line) {
+ context.report({
+ node,
+ loc: firstTokenOfCurrentProperty.loc.start,
+ message: errorMessage,
+ fix(fixer) {
+ const comma = sourceCode.getTokenBefore(firstTokenOfCurrentProperty);
+ const rangeAfterComma = [comma.range[1], firstTokenOfCurrentProperty.range[0]];
+
+ // Don't perform a fix if there are any comments between the comma and the next property.
+ if (sourceCode.text.slice(rangeAfterComma[0], rangeAfterComma[1]).trim()) {
+ return null;
+ }
+
+ return fixer.replaceTextRange(rangeAfterComma, "\n");
+ }
+ });
+ }
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/object-shorthand.js b/tools/node_modules/eslint/lib/rules/object-shorthand.js
new file mode 100644
index 0000000000..980d0fc35a
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/object-shorthand.js
@@ -0,0 +1,454 @@
+/**
+ * @fileoverview Rule to enforce concise object methods and properties.
+ * @author Jamund Ferguson
+ */
+
+"use strict";
+
+const OPTIONS = {
+ always: "always",
+ never: "never",
+ methods: "methods",
+ properties: "properties",
+ consistent: "consistent",
+ consistentAsNeeded: "consistent-as-needed"
+};
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+module.exports = {
+ meta: {
+ docs: {
+ description: "require or disallow method and property shorthand syntax for object literals",
+ category: "ECMAScript 6",
+ recommended: false
+ },
+
+ fixable: "code",
+
+ schema: {
+ anyOf: [
+ {
+ type: "array",
+ items: [
+ {
+ enum: ["always", "methods", "properties", "never", "consistent", "consistent-as-needed"]
+ }
+ ],
+ minItems: 0,
+ maxItems: 1
+ },
+ {
+ type: "array",
+ items: [
+ {
+ enum: ["always", "methods", "properties"]
+ },
+ {
+ type: "object",
+ properties: {
+ avoidQuotes: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ],
+ minItems: 0,
+ maxItems: 2
+ },
+ {
+ type: "array",
+ items: [
+ {
+ enum: ["always", "methods"]
+ },
+ {
+ type: "object",
+ properties: {
+ ignoreConstructors: {
+ type: "boolean"
+ },
+ avoidQuotes: {
+ type: "boolean"
+ },
+ avoidExplicitReturnArrows: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ],
+ minItems: 0,
+ maxItems: 2
+ }
+ ]
+ }
+ },
+
+ create(context) {
+ const APPLY = context.options[0] || OPTIONS.always;
+ const APPLY_TO_METHODS = APPLY === OPTIONS.methods || APPLY === OPTIONS.always;
+ const APPLY_TO_PROPS = APPLY === OPTIONS.properties || APPLY === OPTIONS.always;
+ const APPLY_NEVER = APPLY === OPTIONS.never;
+ const APPLY_CONSISTENT = APPLY === OPTIONS.consistent;
+ const APPLY_CONSISTENT_AS_NEEDED = APPLY === OPTIONS.consistentAsNeeded;
+
+ const PARAMS = context.options[1] || {};
+ const IGNORE_CONSTRUCTORS = PARAMS.ignoreConstructors;
+ const AVOID_QUOTES = PARAMS.avoidQuotes;
+ const AVOID_EXPLICIT_RETURN_ARROWS = !!PARAMS.avoidExplicitReturnArrows;
+ const sourceCode = context.getSourceCode();
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ /**
+ * Determines if the first character of the name is a capital letter.
+ * @param {string} name The name of the node to evaluate.
+ * @returns {boolean} True if the first character of the property name is a capital letter, false if not.
+ * @private
+ */
+ function isConstructor(name) {
+ const firstChar = name.charAt(0);
+
+ return firstChar === firstChar.toUpperCase();
+ }
+
+ /**
+ * Determines if the property can have a shorthand form.
+ * @param {ASTNode} property Property AST node
+ * @returns {boolean} True if the property can have a shorthand form
+ * @private
+ *
+ */
+ function canHaveShorthand(property) {
+ return (property.kind !== "set" && property.kind !== "get" && property.type !== "SpreadProperty" && property.type !== "ExperimentalSpreadProperty");
+ }
+
+ /**
+ * Checks whether a node is a string literal.
+ * @param {ASTNode} node - Any AST node.
+ * @returns {boolean} `true` if it is a string literal.
+ */
+ function isStringLiteral(node) {
+ return node.type === "Literal" && typeof node.value === "string";
+ }
+
+ /**
+ * Determines if the property is a shorthand or not.
+ * @param {ASTNode} property Property AST node
+ * @returns {boolean} True if the property is considered shorthand, false if not.
+ * @private
+ *
+ */
+ function isShorthand(property) {
+
+ // property.method is true when `{a(){}}`.
+ return (property.shorthand || property.method);
+ }
+
+ /**
+ * Determines if the property's key and method or value are named equally.
+ * @param {ASTNode} property Property AST node
+ * @returns {boolean} True if the key and value are named equally, false if not.
+ * @private
+ *
+ */
+ function isRedundant(property) {
+ const value = property.value;
+
+ if (value.type === "FunctionExpression") {
+ return !value.id; // Only anonymous should be shorthand method.
+ }
+ if (value.type === "Identifier") {
+ return astUtils.getStaticPropertyName(property) === value.name;
+ }
+
+ return false;
+ }
+
+ /**
+ * Ensures that an object's properties are consistently shorthand, or not shorthand at all.
+ * @param {ASTNode} node Property AST node
+ * @param {boolean} checkRedundancy Whether to check longform redundancy
+ * @returns {void}
+ *
+ */
+ function checkConsistency(node, checkRedundancy) {
+
+ // We are excluding getters/setters and spread properties as they are considered neither longform nor shorthand.
+ const properties = node.properties.filter(canHaveShorthand);
+
+ // Do we still have properties left after filtering the getters and setters?
+ if (properties.length > 0) {
+ const shorthandProperties = properties.filter(isShorthand);
+
+ /*
+ * If we do not have an equal number of longform properties as
+ * shorthand properties, we are using the annotations inconsistently
+ */
+ if (shorthandProperties.length !== properties.length) {
+
+ // We have at least 1 shorthand property
+ if (shorthandProperties.length > 0) {
+ context.report({ node, message: "Unexpected mix of shorthand and non-shorthand properties." });
+ } else if (checkRedundancy) {
+
+ /*
+ * If all properties of the object contain a method or value with a name matching it's key,
+ * all the keys are redundant.
+ */
+ const canAlwaysUseShorthand = properties.every(isRedundant);
+
+ if (canAlwaysUseShorthand) {
+ context.report({ node, message: "Expected shorthand for all properties." });
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Fixes a FunctionExpression node by making it into a shorthand property.
+ * @param {SourceCodeFixer} fixer The fixer object
+ * @param {ASTNode} node A `Property` node that has a `FunctionExpression` or `ArrowFunctionExpression` as its value
+ * @returns {Object} A fix for this node
+ */
+ function makeFunctionShorthand(fixer, node) {
+ const firstKeyToken = node.computed
+ ? sourceCode.getFirstToken(node, astUtils.isOpeningBracketToken)
+ : sourceCode.getFirstToken(node.key);
+ const lastKeyToken = node.computed
+ ? sourceCode.getFirstTokenBetween(node.key, node.value, astUtils.isClosingBracketToken)
+ : sourceCode.getLastToken(node.key);
+ const keyText = sourceCode.text.slice(firstKeyToken.range[0], lastKeyToken.range[1]);
+ let keyPrefix = "";
+
+ if (node.value.generator) {
+ keyPrefix = "*";
+ } else if (node.value.async) {
+ keyPrefix = "async ";
+ }
+
+ if (node.value.type === "FunctionExpression") {
+ const functionToken = sourceCode.getTokens(node.value).find(token => token.type === "Keyword" && token.value === "function");
+ const tokenBeforeParams = node.value.generator ? sourceCode.getTokenAfter(functionToken) : functionToken;
+
+ return fixer.replaceTextRange(
+ [firstKeyToken.range[0], node.range[1]],
+ keyPrefix + keyText + sourceCode.text.slice(tokenBeforeParams.range[1], node.value.range[1])
+ );
+ }
+ const arrowToken = sourceCode.getTokens(node.value).find(token => token.value === "=>");
+ const tokenBeforeArrow = sourceCode.getTokenBefore(arrowToken);
+ const hasParensAroundParameters = tokenBeforeArrow.type === "Punctuator" && tokenBeforeArrow.value === ")";
+ const oldParamText = sourceCode.text.slice(sourceCode.getFirstToken(node.value, node.value.async ? 1 : 0).range[0], tokenBeforeArrow.range[1]);
+ const newParamText = hasParensAroundParameters ? oldParamText : `(${oldParamText})`;
+
+ return fixer.replaceTextRange(
+ [firstKeyToken.range[0], node.range[1]],
+ keyPrefix + keyText + newParamText + sourceCode.text.slice(arrowToken.range[1], node.value.range[1])
+ );
+
+ }
+
+ /**
+ * Fixes a FunctionExpression node by making it into a longform property.
+ * @param {SourceCodeFixer} fixer The fixer object
+ * @param {ASTNode} node A `Property` node that has a `FunctionExpression` as its value
+ * @returns {Object} A fix for this node
+ */
+ function makeFunctionLongform(fixer, node) {
+ const firstKeyToken = node.computed ? sourceCode.getTokens(node).find(token => token.value === "[") : sourceCode.getFirstToken(node.key);
+ const lastKeyToken = node.computed ? sourceCode.getTokensBetween(node.key, node.value).find(token => token.value === "]") : sourceCode.getLastToken(node.key);
+ const keyText = sourceCode.text.slice(firstKeyToken.range[0], lastKeyToken.range[1]);
+ let functionHeader = "function";
+
+ if (node.value.generator) {
+ functionHeader = "function*";
+ } else if (node.value.async) {
+ functionHeader = "async function";
+ }
+
+ return fixer.replaceTextRange([node.range[0], lastKeyToken.range[1]], `${keyText}: ${functionHeader}`);
+ }
+
+ /*
+ * To determine whether a given arrow function has a lexical identifier (`this`, `arguments`, `super`, or `new.target`),
+ * create a stack of functions that define these identifiers (i.e. all functions except arrow functions) as the AST is
+ * traversed. Whenever a new function is encountered, create a new entry on the stack (corresponding to a different lexical
+ * scope of `this`), and whenever a function is exited, pop that entry off the stack. When an arrow function is entered,
+ * keep a reference to it on the current stack entry, and remove that reference when the arrow function is exited.
+ * When a lexical identifier is encountered, mark all the arrow functions on the current stack entry by adding them
+ * to an `arrowsWithLexicalIdentifiers` set. Any arrow function in that set will not be reported by this rule,
+ * because converting it into a method would change the value of one of the lexical identifiers.
+ */
+ const lexicalScopeStack = [];
+ const arrowsWithLexicalIdentifiers = new WeakSet();
+ const argumentsIdentifiers = new WeakSet();
+
+ /**
+ * Enters a function. This creates a new lexical identifier scope, so a new Set of arrow functions is pushed onto the stack.
+ * Also, this marks all `arguments` identifiers so that they can be detected later.
+ * @returns {void}
+ */
+ function enterFunction() {
+ lexicalScopeStack.unshift(new Set());
+ context.getScope().variables.filter(variable => variable.name === "arguments").forEach(variable => {
+ variable.references.map(ref => ref.identifier).forEach(identifier => argumentsIdentifiers.add(identifier));
+ });
+ }
+
+ /**
+ * Exits a function. This pops the current set of arrow functions off the lexical scope stack.
+ * @returns {void}
+ */
+ function exitFunction() {
+ lexicalScopeStack.shift();
+ }
+
+ /**
+ * Marks the current function as having a lexical keyword. This implies that all arrow functions
+ * in the current lexical scope contain a reference to this lexical keyword.
+ * @returns {void}
+ */
+ function reportLexicalIdentifier() {
+ lexicalScopeStack[0].forEach(arrowFunction => arrowsWithLexicalIdentifiers.add(arrowFunction));
+ }
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+ Program: enterFunction,
+ FunctionDeclaration: enterFunction,
+ FunctionExpression: enterFunction,
+ "Program:exit": exitFunction,
+ "FunctionDeclaration:exit": exitFunction,
+ "FunctionExpression:exit": exitFunction,
+
+ ArrowFunctionExpression(node) {
+ lexicalScopeStack[0].add(node);
+ },
+ "ArrowFunctionExpression:exit"(node) {
+ lexicalScopeStack[0].delete(node);
+ },
+
+ ThisExpression: reportLexicalIdentifier,
+ Super: reportLexicalIdentifier,
+ MetaProperty(node) {
+ if (node.meta.name === "new" && node.property.name === "target") {
+ reportLexicalIdentifier();
+ }
+ },
+ Identifier(node) {
+ if (argumentsIdentifiers.has(node)) {
+ reportLexicalIdentifier();
+ }
+ },
+
+ ObjectExpression(node) {
+ if (APPLY_CONSISTENT) {
+ checkConsistency(node, false);
+ } else if (APPLY_CONSISTENT_AS_NEEDED) {
+ checkConsistency(node, true);
+ }
+ },
+
+ "Property:exit"(node) {
+ const isConciseProperty = node.method || node.shorthand;
+
+ // Ignore destructuring assignment
+ if (node.parent.type === "ObjectPattern") {
+ return;
+ }
+
+ // getters and setters are ignored
+ if (node.kind === "get" || node.kind === "set") {
+ return;
+ }
+
+ // only computed methods can fail the following checks
+ if (node.computed && node.value.type !== "FunctionExpression" && node.value.type !== "ArrowFunctionExpression") {
+ return;
+ }
+
+ //--------------------------------------------------------------
+ // Checks for property/method shorthand.
+ if (isConciseProperty) {
+ if (node.method && (APPLY_NEVER || AVOID_QUOTES && isStringLiteral(node.key))) {
+ const message = APPLY_NEVER ? "Expected longform method syntax." : "Expected longform method syntax for string literal keys.";
+
+ // { x() {} } should be written as { x: function() {} }
+ context.report({
+ node,
+ message,
+ fix: fixer => makeFunctionLongform(fixer, node)
+ });
+ } else if (APPLY_NEVER) {
+
+ // { x } should be written as { x: x }
+ context.report({
+ node,
+ message: "Expected longform property syntax.",
+ fix: fixer => fixer.insertTextAfter(node.key, `: ${node.key.name}`)
+ });
+ }
+ } else if (APPLY_TO_METHODS && !node.value.id && (node.value.type === "FunctionExpression" || node.value.type === "ArrowFunctionExpression")) {
+ if (IGNORE_CONSTRUCTORS && node.key.type === "Identifier" && isConstructor(node.key.name)) {
+ return;
+ }
+ if (AVOID_QUOTES && isStringLiteral(node.key)) {
+ return;
+ }
+
+ // {[x]: function(){}} should be written as {[x]() {}}
+ if (node.value.type === "FunctionExpression" ||
+ node.value.type === "ArrowFunctionExpression" &&
+ node.value.body.type === "BlockStatement" &&
+ AVOID_EXPLICIT_RETURN_ARROWS &&
+ !arrowsWithLexicalIdentifiers.has(node.value)
+ ) {
+ context.report({
+ node,
+ message: "Expected method shorthand.",
+ fix: fixer => makeFunctionShorthand(fixer, node)
+ });
+ }
+ } else if (node.value.type === "Identifier" && node.key.name === node.value.name && APPLY_TO_PROPS) {
+
+ // {x: x} should be written as {x}
+ context.report({
+ node,
+ message: "Expected property shorthand.",
+ fix(fixer) {
+ return fixer.replaceText(node, node.value.name);
+ }
+ });
+ } else if (node.value.type === "Identifier" && node.key.type === "Literal" && node.key.value === node.value.name && APPLY_TO_PROPS) {
+ if (AVOID_QUOTES) {
+ return;
+ }
+
+ // {"x": x} should be written as {x}
+ context.report({
+ node,
+ message: "Expected property shorthand.",
+ fix(fixer) {
+ return fixer.replaceText(node, node.value.name);
+ }
+ });
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/one-var-declaration-per-line.js b/tools/node_modules/eslint/lib/rules/one-var-declaration-per-line.js
new file mode 100644
index 0000000000..61b505c82d
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/one-var-declaration-per-line.js
@@ -0,0 +1,86 @@
+/**
+ * @fileoverview Rule to check multiple var declarations per line
+ * @author Alberto Rodríguez
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require or disallow newlines around variable declarations",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: [
+ {
+ enum: ["always", "initializations"]
+ }
+ ],
+
+ fixable: "whitespace"
+ },
+
+ create(context) {
+
+ const ERROR_MESSAGE = "Expected variable declaration to be on a new line.";
+ const always = context.options[0] === "always";
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+
+ /**
+ * Determine if provided keyword is a variant of for specifiers
+ * @private
+ * @param {string} keyword - keyword to test
+ * @returns {boolean} True if `keyword` is a variant of for specifier
+ */
+ function isForTypeSpecifier(keyword) {
+ return keyword === "ForStatement" || keyword === "ForInStatement" || keyword === "ForOfStatement";
+ }
+
+ /**
+ * Checks newlines around variable declarations.
+ * @private
+ * @param {ASTNode} node - `VariableDeclaration` node to test
+ * @returns {void}
+ */
+ function checkForNewLine(node) {
+ if (isForTypeSpecifier(node.parent.type)) {
+ return;
+ }
+
+ const declarations = node.declarations;
+ let prev;
+
+ declarations.forEach(current => {
+ if (prev && prev.loc.end.line === current.loc.start.line) {
+ if (always || prev.init || current.init) {
+ context.report({
+ node,
+ message: ERROR_MESSAGE,
+ loc: current.loc.start,
+ fix: fixer => fixer.insertTextBefore(current, "\n")
+ });
+ }
+ }
+ prev = current;
+ });
+ }
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+ VariableDeclaration: checkForNewLine
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/one-var.js b/tools/node_modules/eslint/lib/rules/one-var.js
new file mode 100644
index 0000000000..9e40d4ea6f
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/one-var.js
@@ -0,0 +1,367 @@
+/**
+ * @fileoverview A rule to control the use of single variable declarations.
+ * @author Ian Christian Myers
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce variables to be declared either together or separately in functions",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: [
+ {
+ oneOf: [
+ {
+ enum: ["always", "never"]
+ },
+ {
+ type: "object",
+ properties: {
+ var: {
+ enum: ["always", "never"]
+ },
+ let: {
+ enum: ["always", "never"]
+ },
+ const: {
+ enum: ["always", "never"]
+ }
+ },
+ additionalProperties: false
+ },
+ {
+ type: "object",
+ properties: {
+ initialized: {
+ enum: ["always", "never"]
+ },
+ uninitialized: {
+ enum: ["always", "never"]
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ }
+ ]
+ },
+
+ create(context) {
+
+ const MODE_ALWAYS = "always",
+ MODE_NEVER = "never";
+
+ const mode = context.options[0] || MODE_ALWAYS;
+
+ const options = {
+ };
+
+ if (typeof mode === "string") { // simple options configuration with just a string
+ options.var = { uninitialized: mode, initialized: mode };
+ options.let = { uninitialized: mode, initialized: mode };
+ options.const = { uninitialized: mode, initialized: mode };
+ } else if (typeof mode === "object") { // options configuration is an object
+ if (mode.hasOwnProperty("var") && typeof mode.var === "string") {
+ options.var = { uninitialized: mode.var, initialized: mode.var };
+ }
+ if (mode.hasOwnProperty("let") && typeof mode.let === "string") {
+ options.let = { uninitialized: mode.let, initialized: mode.let };
+ }
+ if (mode.hasOwnProperty("const") && typeof mode.const === "string") {
+ options.const = { uninitialized: mode.const, initialized: mode.const };
+ }
+ if (mode.hasOwnProperty("uninitialized")) {
+ if (!options.var) {
+ options.var = {};
+ }
+ if (!options.let) {
+ options.let = {};
+ }
+ if (!options.const) {
+ options.const = {};
+ }
+ options.var.uninitialized = mode.uninitialized;
+ options.let.uninitialized = mode.uninitialized;
+ options.const.uninitialized = mode.uninitialized;
+ }
+ if (mode.hasOwnProperty("initialized")) {
+ if (!options.var) {
+ options.var = {};
+ }
+ if (!options.let) {
+ options.let = {};
+ }
+ if (!options.const) {
+ options.const = {};
+ }
+ options.var.initialized = mode.initialized;
+ options.let.initialized = mode.initialized;
+ options.const.initialized = mode.initialized;
+ }
+ }
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ const functionStack = [];
+ const blockStack = [];
+
+ /**
+ * Increments the blockStack counter.
+ * @returns {void}
+ * @private
+ */
+ function startBlock() {
+ blockStack.push({
+ let: { initialized: false, uninitialized: false },
+ const: { initialized: false, uninitialized: false }
+ });
+ }
+
+ /**
+ * Increments the functionStack counter.
+ * @returns {void}
+ * @private
+ */
+ function startFunction() {
+ functionStack.push({ initialized: false, uninitialized: false });
+ startBlock();
+ }
+
+ /**
+ * Decrements the blockStack counter.
+ * @returns {void}
+ * @private
+ */
+ function endBlock() {
+ blockStack.pop();
+ }
+
+ /**
+ * Decrements the functionStack counter.
+ * @returns {void}
+ * @private
+ */
+ function endFunction() {
+ functionStack.pop();
+ endBlock();
+ }
+
+ /**
+ * Records whether initialized or uninitialized variables are defined in current scope.
+ * @param {string} statementType node.kind, one of: "var", "let", or "const"
+ * @param {ASTNode[]} declarations List of declarations
+ * @param {Object} currentScope The scope being investigated
+ * @returns {void}
+ * @private
+ */
+ function recordTypes(statementType, declarations, currentScope) {
+ for (let i = 0; i < declarations.length; i++) {
+ if (declarations[i].init === null) {
+ if (options[statementType] && options[statementType].uninitialized === MODE_ALWAYS) {
+ currentScope.uninitialized = true;
+ }
+ } else {
+ if (options[statementType] && options[statementType].initialized === MODE_ALWAYS) {
+ currentScope.initialized = true;
+ }
+ }
+ }
+ }
+
+ /**
+ * Determines the current scope (function or block)
+ * @param {string} statementType node.kind, one of: "var", "let", or "const"
+ * @returns {Object} The scope associated with statementType
+ */
+ function getCurrentScope(statementType) {
+ let currentScope;
+
+ if (statementType === "var") {
+ currentScope = functionStack[functionStack.length - 1];
+ } else if (statementType === "let") {
+ currentScope = blockStack[blockStack.length - 1].let;
+ } else if (statementType === "const") {
+ currentScope = blockStack[blockStack.length - 1].const;
+ }
+ return currentScope;
+ }
+
+ /**
+ * Counts the number of initialized and uninitialized declarations in a list of declarations
+ * @param {ASTNode[]} declarations List of declarations
+ * @returns {Object} Counts of 'uninitialized' and 'initialized' declarations
+ * @private
+ */
+ function countDeclarations(declarations) {
+ const counts = { uninitialized: 0, initialized: 0 };
+
+ for (let i = 0; i < declarations.length; i++) {
+ if (declarations[i].init === null) {
+ counts.uninitialized++;
+ } else {
+ counts.initialized++;
+ }
+ }
+ return counts;
+ }
+
+ /**
+ * Determines if there is more than one var statement in the current scope.
+ * @param {string} statementType node.kind, one of: "var", "let", or "const"
+ * @param {ASTNode[]} declarations List of declarations
+ * @returns {boolean} Returns true if it is the first var declaration, false if not.
+ * @private
+ */
+ function hasOnlyOneStatement(statementType, declarations) {
+
+ const declarationCounts = countDeclarations(declarations);
+ const currentOptions = options[statementType] || {};
+ const currentScope = getCurrentScope(statementType);
+
+ if (currentOptions.uninitialized === MODE_ALWAYS && currentOptions.initialized === MODE_ALWAYS) {
+ if (currentScope.uninitialized || currentScope.initialized) {
+ return false;
+ }
+ }
+
+ if (declarationCounts.uninitialized > 0) {
+ if (currentOptions.uninitialized === MODE_ALWAYS && currentScope.uninitialized) {
+ return false;
+ }
+ }
+ if (declarationCounts.initialized > 0) {
+ if (currentOptions.initialized === MODE_ALWAYS && currentScope.initialized) {
+ return false;
+ }
+ }
+ recordTypes(statementType, declarations, currentScope);
+ return true;
+ }
+
+
+ //--------------------------------------------------------------------------
+ // Public API
+ //--------------------------------------------------------------------------
+
+ return {
+ Program: startFunction,
+ FunctionDeclaration: startFunction,
+ FunctionExpression: startFunction,
+ ArrowFunctionExpression: startFunction,
+ BlockStatement: startBlock,
+ ForStatement: startBlock,
+ ForInStatement: startBlock,
+ ForOfStatement: startBlock,
+ SwitchStatement: startBlock,
+
+ VariableDeclaration(node) {
+ const parent = node.parent;
+ const type = node.kind;
+
+ if (!options[type]) {
+ return;
+ }
+
+ const declarations = node.declarations;
+ const declarationCounts = countDeclarations(declarations);
+
+ // always
+ if (!hasOnlyOneStatement(type, declarations)) {
+ if (options[type].initialized === MODE_ALWAYS && options[type].uninitialized === MODE_ALWAYS) {
+ context.report({
+ node,
+ message: "Combine this with the previous '{{type}}' statement.",
+ data: {
+ type
+ }
+ });
+ } else {
+ if (options[type].initialized === MODE_ALWAYS) {
+ context.report({
+ node,
+ message: "Combine this with the previous '{{type}}' statement with initialized variables.",
+ data: {
+ type
+ }
+ });
+ }
+ if (options[type].uninitialized === MODE_ALWAYS) {
+ if (node.parent.left === node && (node.parent.type === "ForInStatement" || node.parent.type === "ForOfStatement")) {
+ return;
+ }
+ context.report({
+ node,
+ message: "Combine this with the previous '{{type}}' statement with uninitialized variables.",
+ data: {
+ type
+ }
+ });
+ }
+ }
+ }
+
+ // never
+ if (parent.type !== "ForStatement" || parent.init !== node) {
+ const totalDeclarations = declarationCounts.uninitialized + declarationCounts.initialized;
+
+ if (totalDeclarations > 1) {
+
+ if (options[type].initialized === MODE_NEVER && options[type].uninitialized === MODE_NEVER) {
+
+ // both initialized and uninitialized
+ context.report({
+ node,
+ message: "Split '{{type}}' declarations into multiple statements.",
+ data: {
+ type
+ }
+ });
+ } else if (options[type].initialized === MODE_NEVER && declarationCounts.initialized > 0) {
+
+ // initialized
+ context.report({
+ node,
+ message: "Split initialized '{{type}}' declarations into multiple statements.",
+ data: {
+ type
+ }
+ });
+ } else if (options[type].uninitialized === MODE_NEVER && declarationCounts.uninitialized > 0) {
+
+ // uninitialized
+ context.report({
+ node,
+ message: "Split uninitialized '{{type}}' declarations into multiple statements.",
+ data: {
+ type
+ }
+ });
+ }
+ }
+ }
+ },
+
+ "ForStatement:exit": endBlock,
+ "ForOfStatement:exit": endBlock,
+ "ForInStatement:exit": endBlock,
+ "SwitchStatement:exit": endBlock,
+ "BlockStatement:exit": endBlock,
+ "Program:exit": endFunction,
+ "FunctionDeclaration:exit": endFunction,
+ "FunctionExpression:exit": endFunction,
+ "ArrowFunctionExpression:exit": endFunction
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/operator-assignment.js b/tools/node_modules/eslint/lib/rules/operator-assignment.js
new file mode 100644
index 0000000000..f776609f5e
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/operator-assignment.js
@@ -0,0 +1,206 @@
+/**
+ * @fileoverview Rule to replace assignment expressions with operator assignment
+ * @author Brandon Mills
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Checks whether an operator is commutative and has an operator assignment
+ * shorthand form.
+ * @param {string} operator Operator to check.
+ * @returns {boolean} True if the operator is commutative and has a
+ * shorthand form.
+ */
+function isCommutativeOperatorWithShorthand(operator) {
+ return ["*", "&", "^", "|"].indexOf(operator) >= 0;
+}
+
+/**
+ * Checks whether an operator is not commuatative and has an operator assignment
+ * shorthand form.
+ * @param {string} operator Operator to check.
+ * @returns {boolean} True if the operator is not commuatative and has
+ * a shorthand form.
+ */
+function isNonCommutativeOperatorWithShorthand(operator) {
+ return ["+", "-", "/", "%", "<<", ">>", ">>>", "**"].indexOf(operator) >= 0;
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+/**
+ * Checks whether two expressions reference the same value. For example:
+ * a = a
+ * a.b = a.b
+ * a[0] = a[0]
+ * a['b'] = a['b']
+ * @param {ASTNode} a Left side of the comparison.
+ * @param {ASTNode} b Right side of the comparison.
+ * @returns {boolean} True if both sides match and reference the same value.
+ */
+function same(a, b) {
+ if (a.type !== b.type) {
+ return false;
+ }
+
+ switch (a.type) {
+ case "Identifier":
+ return a.name === b.name;
+
+ case "Literal":
+ return a.value === b.value;
+
+ case "MemberExpression":
+
+ /*
+ * x[0] = x[0]
+ * x[y] = x[y]
+ * x.y = x.y
+ */
+ return same(a.object, b.object) && same(a.property, b.property);
+
+ default:
+ return false;
+ }
+}
+
+/**
+ * Determines if the left side of a node can be safely fixed (i.e. if it activates the same getters/setters and)
+ * toString calls regardless of whether assignment shorthand is used)
+ * @param {ASTNode} node The node on the left side of the expression
+ * @returns {boolean} `true` if the node can be fixed
+ */
+function canBeFixed(node) {
+ return node.type === "Identifier" ||
+ node.type === "MemberExpression" && node.object.type === "Identifier" && (!node.computed || node.property.type === "Literal");
+}
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require or disallow assignment operator shorthand where possible",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: [
+ {
+ enum: ["always", "never"]
+ }
+ ],
+
+ fixable: "code"
+ },
+
+ create(context) {
+
+ const sourceCode = context.getSourceCode();
+
+ /**
+ * Returns the operator token of an AssignmentExpression or BinaryExpression
+ * @param {ASTNode} node An AssignmentExpression or BinaryExpression node
+ * @returns {Token} The operator token in the node
+ */
+ function getOperatorToken(node) {
+ return sourceCode.getFirstTokenBetween(node.left, node.right, token => token.value === node.operator);
+ }
+
+ /**
+ * Ensures that an assignment uses the shorthand form where possible.
+ * @param {ASTNode} node An AssignmentExpression node.
+ * @returns {void}
+ */
+ function verify(node) {
+ if (node.operator !== "=" || node.right.type !== "BinaryExpression") {
+ return;
+ }
+
+ const left = node.left;
+ const expr = node.right;
+ const operator = expr.operator;
+
+ if (isCommutativeOperatorWithShorthand(operator) || isNonCommutativeOperatorWithShorthand(operator)) {
+ if (same(left, expr.left)) {
+ context.report({
+ node,
+ message: "Assignment can be replaced with operator assignment.",
+ fix(fixer) {
+ if (canBeFixed(left)) {
+ const equalsToken = getOperatorToken(node);
+ const operatorToken = getOperatorToken(expr);
+ const leftText = sourceCode.getText().slice(node.range[0], equalsToken.range[0]);
+ const rightText = sourceCode.getText().slice(operatorToken.range[1], node.right.range[1]);
+
+ return fixer.replaceText(node, `${leftText}${expr.operator}=${rightText}`);
+ }
+ return null;
+ }
+ });
+ } else if (same(left, expr.right) && isCommutativeOperatorWithShorthand(operator)) {
+
+ /*
+ * This case can't be fixed safely.
+ * If `a` and `b` both have custom valueOf() behavior, then fixing `a = b * a` to `a *= b` would
+ * change the execution order of the valueOf() functions.
+ */
+ context.report({
+ node,
+ message: "Assignment can be replaced with operator assignment."
+ });
+ }
+ }
+ }
+
+ /**
+ * Warns if an assignment expression uses operator assignment shorthand.
+ * @param {ASTNode} node An AssignmentExpression node.
+ * @returns {void}
+ */
+ function prohibit(node) {
+ if (node.operator !== "=") {
+ context.report({
+ node,
+ message: "Unexpected operator assignment shorthand.",
+ fix(fixer) {
+ if (canBeFixed(node.left)) {
+ const operatorToken = getOperatorToken(node);
+ const leftText = sourceCode.getText().slice(node.range[0], operatorToken.range[0]);
+ const newOperator = node.operator.slice(0, -1);
+ let rightText;
+
+ // If this change would modify precedence (e.g. `foo *= bar + 1` => `foo = foo * (bar + 1)`), parenthesize the right side.
+ if (
+ astUtils.getPrecedence(node.right) <= astUtils.getPrecedence({ type: "BinaryExpression", operator: newOperator }) &&
+ !astUtils.isParenthesised(sourceCode, node.right)
+ ) {
+ rightText = `${sourceCode.text.slice(operatorToken.range[1], node.right.range[0])}(${sourceCode.getText(node.right)})`;
+ } else {
+ rightText = sourceCode.text.slice(operatorToken.range[1], node.range[1]);
+ }
+
+ return fixer.replaceText(node, `${leftText}= ${leftText}${newOperator}${rightText}`);
+ }
+ return null;
+ }
+ });
+ }
+ }
+
+ return {
+ AssignmentExpression: context.options[0] !== "never" ? verify : prohibit
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/operator-linebreak.js b/tools/node_modules/eslint/lib/rules/operator-linebreak.js
new file mode 100644
index 0000000000..271cbb35c1
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/operator-linebreak.js
@@ -0,0 +1,252 @@
+/**
+ * @fileoverview Operator linebreak - enforces operator linebreak style of two types: after and before
+ * @author Benoît Zugmeyer
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce consistent linebreak style for operators",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: [
+ {
+ enum: ["after", "before", "none", null]
+ },
+ {
+ type: "object",
+ properties: {
+ overrides: {
+ type: "object",
+ properties: {
+ anyOf: {
+ type: "string",
+ enum: ["after", "before", "none", "ignore"]
+ }
+ }
+ }
+ },
+ additionalProperties: false
+ }
+ ],
+
+ fixable: "code"
+ },
+
+ create(context) {
+
+ const usedDefaultGlobal = !context.options[0];
+ const globalStyle = context.options[0] || "after";
+ const options = context.options[1] || {};
+ const styleOverrides = options.overrides ? Object.assign({}, options.overrides) : {};
+
+ if (usedDefaultGlobal && !styleOverrides["?"]) {
+ styleOverrides["?"] = "before";
+ }
+
+ if (usedDefaultGlobal && !styleOverrides[":"]) {
+ styleOverrides[":"] = "before";
+ }
+
+ const sourceCode = context.getSourceCode();
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ /**
+ * Gets a fixer function to fix rule issues
+ * @param {Token} operatorToken The operator token of an expression
+ * @param {string} desiredStyle The style for the rule. One of 'before', 'after', 'none'
+ * @returns {Function} A fixer function
+ */
+ function getFixer(operatorToken, desiredStyle) {
+ return fixer => {
+ const tokenBefore = sourceCode.getTokenBefore(operatorToken);
+ const tokenAfter = sourceCode.getTokenAfter(operatorToken);
+ const textBefore = sourceCode.text.slice(tokenBefore.range[1], operatorToken.range[0]);
+ const textAfter = sourceCode.text.slice(operatorToken.range[1], tokenAfter.range[0]);
+ const hasLinebreakBefore = !astUtils.isTokenOnSameLine(tokenBefore, operatorToken);
+ const hasLinebreakAfter = !astUtils.isTokenOnSameLine(operatorToken, tokenAfter);
+ let newTextBefore, newTextAfter;
+
+ if (hasLinebreakBefore !== hasLinebreakAfter && desiredStyle !== "none") {
+
+ // If there is a comment before and after the operator, don't do a fix.
+ if (sourceCode.getTokenBefore(operatorToken, { includeComments: true }) !== tokenBefore &&
+ sourceCode.getTokenAfter(operatorToken, { includeComments: true }) !== tokenAfter) {
+
+ return null;
+ }
+
+ /*
+ * If there is only one linebreak and it's on the wrong side of the operator, swap the text before and after the operator.
+ * foo &&
+ * bar
+ * would get fixed to
+ * foo
+ * && bar
+ */
+ newTextBefore = textAfter;
+ newTextAfter = textBefore;
+ } else {
+ const LINEBREAK_REGEX = astUtils.createGlobalLinebreakMatcher();
+
+ // Otherwise, if no linebreak is desired and no comments interfere, replace the linebreaks with empty strings.
+ newTextBefore = desiredStyle === "before" || textBefore.trim() ? textBefore : textBefore.replace(LINEBREAK_REGEX, "");
+ newTextAfter = desiredStyle === "after" || textAfter.trim() ? textAfter : textAfter.replace(LINEBREAK_REGEX, "");
+
+ // If there was no change (due to interfering comments), don't output a fix.
+ if (newTextBefore === textBefore && newTextAfter === textAfter) {
+ return null;
+ }
+ }
+
+ if (newTextAfter === "" && tokenAfter.type === "Punctuator" && "+-".includes(operatorToken.value) && tokenAfter.value === operatorToken.value) {
+
+ // To avoid accidentally creating a ++ or -- operator, insert a space if the operator is a +/- and the following token is a unary +/-.
+ newTextAfter += " ";
+ }
+
+ return fixer.replaceTextRange([tokenBefore.range[1], tokenAfter.range[0]], newTextBefore + operatorToken.value + newTextAfter);
+ };
+ }
+
+ /**
+ * Checks the operator placement
+ * @param {ASTNode} node The node to check
+ * @param {ASTNode} leftSide The node that comes before the operator in `node`
+ * @private
+ * @returns {void}
+ */
+ function validateNode(node, leftSide) {
+
+ /*
+ * When the left part of a binary expression is a single expression wrapped in
+ * parentheses (ex: `(a) + b`), leftToken will be the last token of the expression
+ * and operatorToken will be the closing parenthesis.
+ * The leftToken should be the last closing parenthesis, and the operatorToken
+ * should be the token right after that.
+ */
+ const operatorToken = sourceCode.getTokenAfter(leftSide, astUtils.isNotClosingParenToken);
+ const leftToken = sourceCode.getTokenBefore(operatorToken);
+ const rightToken = sourceCode.getTokenAfter(operatorToken);
+ const operator = operatorToken.value;
+ const operatorStyleOverride = styleOverrides[operator];
+ const style = operatorStyleOverride || globalStyle;
+ const fix = getFixer(operatorToken, style);
+
+ // if single line
+ if (astUtils.isTokenOnSameLine(leftToken, operatorToken) &&
+ astUtils.isTokenOnSameLine(operatorToken, rightToken)) {
+
+ // do nothing.
+
+ } else if (operatorStyleOverride !== "ignore" && !astUtils.isTokenOnSameLine(leftToken, operatorToken) &&
+ !astUtils.isTokenOnSameLine(operatorToken, rightToken)) {
+
+ // lone operator
+ context.report({
+ node,
+ loc: {
+ line: operatorToken.loc.end.line,
+ column: operatorToken.loc.end.column
+ },
+ message: "Bad line breaking before and after '{{operator}}'.",
+ data: {
+ operator
+ },
+ fix
+ });
+
+ } else if (style === "before" && astUtils.isTokenOnSameLine(leftToken, operatorToken)) {
+
+ context.report({
+ node,
+ loc: {
+ line: operatorToken.loc.end.line,
+ column: operatorToken.loc.end.column
+ },
+ message: "'{{operator}}' should be placed at the beginning of the line.",
+ data: {
+ operator
+ },
+ fix
+ });
+
+ } else if (style === "after" && astUtils.isTokenOnSameLine(operatorToken, rightToken)) {
+
+ context.report({
+ node,
+ loc: {
+ line: operatorToken.loc.end.line,
+ column: operatorToken.loc.end.column
+ },
+ message: "'{{operator}}' should be placed at the end of the line.",
+ data: {
+ operator
+ },
+ fix
+ });
+
+ } else if (style === "none") {
+
+ context.report({
+ node,
+ loc: {
+ line: operatorToken.loc.end.line,
+ column: operatorToken.loc.end.column
+ },
+ message: "There should be no line break before or after '{{operator}}'.",
+ data: {
+ operator
+ },
+ fix
+ });
+
+ }
+ }
+
+ /**
+ * Validates a binary expression using `validateNode`
+ * @param {BinaryExpression|LogicalExpression|AssignmentExpression} node node to be validated
+ * @returns {void}
+ */
+ function validateBinaryExpression(node) {
+ validateNode(node, node.left);
+ }
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+ BinaryExpression: validateBinaryExpression,
+ LogicalExpression: validateBinaryExpression,
+ AssignmentExpression: validateBinaryExpression,
+ VariableDeclarator(node) {
+ if (node.init) {
+ validateNode(node, node.id);
+ }
+ },
+ ConditionalExpression(node) {
+ validateNode(node, node.test);
+ validateNode(node, node.consequent);
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/padded-blocks.js b/tools/node_modules/eslint/lib/rules/padded-blocks.js
new file mode 100644
index 0000000000..ad65882ac6
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/padded-blocks.js
@@ -0,0 +1,256 @@
+/**
+ * @fileoverview A rule to ensure blank lines within blocks.
+ * @author Mathias Schreck <https://github.com/lo1tuma>
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require or disallow padding within blocks",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ fixable: "whitespace",
+
+ schema: [
+ {
+ oneOf: [
+ {
+ enum: ["always", "never"]
+ },
+ {
+ type: "object",
+ properties: {
+ blocks: {
+ enum: ["always", "never"]
+ },
+ switches: {
+ enum: ["always", "never"]
+ },
+ classes: {
+ enum: ["always", "never"]
+ }
+ },
+ additionalProperties: false,
+ minProperties: 1
+ }
+ ]
+ }
+ ]
+ },
+
+ create(context) {
+ const options = {};
+ const config = context.options[0] || "always";
+
+ if (typeof config === "string") {
+ const shouldHavePadding = config === "always";
+
+ options.blocks = shouldHavePadding;
+ options.switches = shouldHavePadding;
+ options.classes = shouldHavePadding;
+ } else {
+ if (config.hasOwnProperty("blocks")) {
+ options.blocks = config.blocks === "always";
+ }
+ if (config.hasOwnProperty("switches")) {
+ options.switches = config.switches === "always";
+ }
+ if (config.hasOwnProperty("classes")) {
+ options.classes = config.classes === "always";
+ }
+ }
+
+ const ALWAYS_MESSAGE = "Block must be padded by blank lines.",
+ NEVER_MESSAGE = "Block must not be padded by blank lines.";
+
+ const sourceCode = context.getSourceCode();
+
+ /**
+ * Gets the open brace token from a given node.
+ * @param {ASTNode} node - A BlockStatement or SwitchStatement node from which to get the open brace.
+ * @returns {Token} The token of the open brace.
+ */
+ function getOpenBrace(node) {
+ if (node.type === "SwitchStatement") {
+ return sourceCode.getTokenBefore(node.cases[0]);
+ }
+ return sourceCode.getFirstToken(node);
+ }
+
+ /**
+ * Checks if the given parameter is a comment node
+ * @param {ASTNode|Token} node An AST node or token
+ * @returns {boolean} True if node is a comment
+ */
+ function isComment(node) {
+ return node.type === "Line" || node.type === "Block";
+ }
+
+ /**
+ * Checks if there is padding between two tokens
+ * @param {Token} first The first token
+ * @param {Token} second The second token
+ * @returns {boolean} True if there is at least a line between the tokens
+ */
+ function isPaddingBetweenTokens(first, second) {
+ return second.loc.start.line - first.loc.end.line >= 2;
+ }
+
+
+ /**
+ * Checks if the given token has a blank line after it.
+ * @param {Token} token The token to check.
+ * @returns {boolean} Whether or not the token is followed by a blank line.
+ */
+ function getFirstBlockToken(token) {
+ let prev,
+ first = token;
+
+ do {
+ prev = first;
+ first = sourceCode.getTokenAfter(first, { includeComments: true });
+ } while (isComment(first) && first.loc.start.line === prev.loc.end.line);
+
+ return first;
+ }
+
+ /**
+ * Checks if the given token is preceeded by a blank line.
+ * @param {Token} token The token to check
+ * @returns {boolean} Whether or not the token is preceeded by a blank line
+ */
+ function getLastBlockToken(token) {
+ let last = token,
+ next;
+
+ do {
+ next = last;
+ last = sourceCode.getTokenBefore(last, { includeComments: true });
+ } while (isComment(last) && last.loc.end.line === next.loc.start.line);
+
+ return last;
+ }
+
+ /**
+ * Checks if a node should be padded, according to the rule config.
+ * @param {ASTNode} node The AST node to check.
+ * @returns {boolean} True if the node should be padded, false otherwise.
+ */
+ function requirePaddingFor(node) {
+ switch (node.type) {
+ case "BlockStatement":
+ return options.blocks;
+ case "SwitchStatement":
+ return options.switches;
+ case "ClassBody":
+ return options.classes;
+
+ /* istanbul ignore next */
+ default:
+ throw new Error("unreachable");
+ }
+ }
+
+ /**
+ * Checks the given BlockStatement node to be padded if the block is not empty.
+ * @param {ASTNode} node The AST node of a BlockStatement.
+ * @returns {void} undefined.
+ */
+ function checkPadding(node) {
+ const openBrace = getOpenBrace(node),
+ firstBlockToken = getFirstBlockToken(openBrace),
+ tokenBeforeFirst = sourceCode.getTokenBefore(firstBlockToken, { includeComments: true }),
+ closeBrace = sourceCode.getLastToken(node),
+ lastBlockToken = getLastBlockToken(closeBrace),
+ tokenAfterLast = sourceCode.getTokenAfter(lastBlockToken, { includeComments: true }),
+ blockHasTopPadding = isPaddingBetweenTokens(tokenBeforeFirst, firstBlockToken),
+ blockHasBottomPadding = isPaddingBetweenTokens(lastBlockToken, tokenAfterLast);
+
+ if (requirePaddingFor(node)) {
+ if (!blockHasTopPadding) {
+ context.report({
+ node,
+ loc: { line: tokenBeforeFirst.loc.start.line, column: tokenBeforeFirst.loc.start.column },
+ fix(fixer) {
+ return fixer.insertTextAfter(tokenBeforeFirst, "\n");
+ },
+ message: ALWAYS_MESSAGE
+ });
+ }
+ if (!blockHasBottomPadding) {
+ context.report({
+ node,
+ loc: { line: tokenAfterLast.loc.end.line, column: tokenAfterLast.loc.end.column - 1 },
+ fix(fixer) {
+ return fixer.insertTextBefore(tokenAfterLast, "\n");
+ },
+ message: ALWAYS_MESSAGE
+ });
+ }
+ } else {
+ if (blockHasTopPadding) {
+
+ context.report({
+ node,
+ loc: { line: tokenBeforeFirst.loc.start.line, column: tokenBeforeFirst.loc.start.column },
+ fix(fixer) {
+ return fixer.replaceTextRange([tokenBeforeFirst.range[1], firstBlockToken.range[0] - firstBlockToken.loc.start.column], "\n");
+ },
+ message: NEVER_MESSAGE
+ });
+ }
+
+ if (blockHasBottomPadding) {
+
+ context.report({
+ node,
+ loc: { line: tokenAfterLast.loc.end.line, column: tokenAfterLast.loc.end.column - 1 },
+ message: NEVER_MESSAGE,
+ fix(fixer) {
+ return fixer.replaceTextRange([lastBlockToken.range[1], tokenAfterLast.range[0] - tokenAfterLast.loc.start.column], "\n");
+ }
+ });
+ }
+ }
+ }
+
+ const rule = {};
+
+ if (options.hasOwnProperty("switches")) {
+ rule.SwitchStatement = function(node) {
+ if (node.cases.length === 0) {
+ return;
+ }
+ checkPadding(node);
+ };
+ }
+
+ if (options.hasOwnProperty("blocks")) {
+ rule.BlockStatement = function(node) {
+ if (node.body.length === 0) {
+ return;
+ }
+ checkPadding(node);
+ };
+ }
+
+ if (options.hasOwnProperty("classes")) {
+ rule.ClassBody = function(node) {
+ if (node.body.length === 0) {
+ return;
+ }
+ checkPadding(node);
+ };
+ }
+
+ return rule;
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/padding-line-between-statements.js b/tools/node_modules/eslint/lib/rules/padding-line-between-statements.js
new file mode 100644
index 0000000000..a89c49decf
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/padding-line-between-statements.js
@@ -0,0 +1,589 @@
+/**
+ * @fileoverview Rule to require or disallow newlines between statements
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+const LT = `[${Array.from(astUtils.LINEBREAKS).join("")}]`;
+const PADDING_LINE_SEQUENCE = new RegExp(
+ String.raw`^(\s*?${LT})\s*${LT}(\s*;?)$`
+);
+const CJS_EXPORT = /^(?:module\s*\.\s*)?exports(?:\s*\.|\s*\[|$)/;
+const CJS_IMPORT = /^require\(/;
+
+/**
+ * Creates tester which check if a node starts with specific keyword.
+ *
+ * @param {string} keyword The keyword to test.
+ * @returns {Object} the created tester.
+ * @private
+ */
+function newKeywordTester(keyword) {
+ return {
+ test: (node, sourceCode) =>
+ sourceCode.getFirstToken(node).value === keyword
+ };
+}
+
+/**
+ * Creates tester which check if a node is specific type.
+ *
+ * @param {string} type The node type to test.
+ * @returns {Object} the created tester.
+ * @private
+ */
+function newNodeTypeTester(type) {
+ return {
+ test: node =>
+ node.type === type
+ };
+}
+
+/**
+ * Checks the given node is an expression statement of IIFE.
+ *
+ * @param {ASTNode} node The node to check.
+ * @returns {boolean} `true` if the node is an expression statement of IIFE.
+ * @private
+ */
+function isIIFEStatement(node) {
+ if (node.type === "ExpressionStatement") {
+ let call = node.expression;
+
+ if (call.type === "UnaryExpression") {
+ call = call.argument;
+ }
+ return call.type === "CallExpression" && astUtils.isFunction(call.callee);
+ }
+ return false;
+}
+
+/**
+ * Checks whether the given node is a block-like statement.
+ * This checks the last token of the node is the closing brace of a block.
+ *
+ * @param {SourceCode} sourceCode The source code to get tokens.
+ * @param {ASTNode} node The node to check.
+ * @returns {boolean} `true` if the node is a block-like statement.
+ * @private
+ */
+function isBlockLikeStatement(sourceCode, node) {
+
+ // do-while with a block is a block-like statement.
+ if (node.type === "DoWhileStatement" && node.body.type === "BlockStatement") {
+ return true;
+ }
+
+ /*
+ * IIFE is a block-like statement specially from
+ * JSCS#disallowPaddingNewLinesAfterBlocks.
+ */
+ if (isIIFEStatement(node)) {
+ return true;
+ }
+
+ // Checks the last token is a closing brace of blocks.
+ const lastToken = sourceCode.getLastToken(node, astUtils.isNotSemicolonToken);
+ const belongingNode = lastToken && astUtils.isClosingBraceToken(lastToken)
+ ? sourceCode.getNodeByRangeIndex(lastToken.range[0])
+ : null;
+
+ return Boolean(belongingNode) && (
+ belongingNode.type === "BlockStatement" ||
+ belongingNode.type === "SwitchStatement"
+ );
+}
+
+/**
+ * Check whether the given node is a directive or not.
+ * @param {ASTNode} node The node to check.
+ * @param {SourceCode} sourceCode The source code object to get tokens.
+ * @returns {boolean} `true` if the node is a directive.
+ */
+function isDirective(node, sourceCode) {
+ return (
+ node.type === "ExpressionStatement" &&
+ (
+ node.parent.type === "Program" ||
+ (
+ node.parent.type === "BlockStatement" &&
+ astUtils.isFunction(node.parent.parent)
+ )
+ ) &&
+ node.expression.type === "Literal" &&
+ typeof node.expression.value === "string" &&
+ !astUtils.isParenthesised(sourceCode, node.expression)
+ );
+}
+
+/**
+ * Check whether the given node is a part of directive prologue or not.
+ * @param {ASTNode} node The node to check.
+ * @param {SourceCode} sourceCode The source code object to get tokens.
+ * @returns {boolean} `true` if the node is a part of directive prologue.
+ */
+function isDirectivePrologue(node, sourceCode) {
+ if (isDirective(node, sourceCode)) {
+ for (const sibling of node.parent.body) {
+ if (sibling === node) {
+ break;
+ }
+ if (!isDirective(sibling, sourceCode)) {
+ return false;
+ }
+ }
+ return true;
+ }
+ return false;
+}
+
+/**
+ * Gets the actual last token.
+ *
+ * If a semicolon is semicolon-less style's semicolon, this ignores it.
+ * For example:
+ *
+ * foo()
+ * ;[1, 2, 3].forEach(bar)
+ *
+ * @param {SourceCode} sourceCode The source code to get tokens.
+ * @param {ASTNode} node The node to get.
+ * @returns {Token} The actual last token.
+ * @private
+ */
+function getActualLastToken(sourceCode, node) {
+ const semiToken = sourceCode.getLastToken(node);
+ const prevToken = sourceCode.getTokenBefore(semiToken);
+ const nextToken = sourceCode.getTokenAfter(semiToken);
+ const isSemicolonLessStyle = Boolean(
+ prevToken &&
+ nextToken &&
+ prevToken.range[0] >= node.range[0] &&
+ astUtils.isSemicolonToken(semiToken) &&
+ semiToken.loc.start.line !== prevToken.loc.end.line &&
+ semiToken.loc.end.line === nextToken.loc.start.line
+ );
+
+ return isSemicolonLessStyle ? prevToken : semiToken;
+}
+
+/**
+ * This returns the concatenation of the first 2 captured strings.
+ * @param {string} _ Unused. Whole matched string.
+ * @param {string} trailingSpaces The trailing spaces of the first line.
+ * @param {string} indentSpaces The indentation spaces of the last line.
+ * @returns {string} The concatenation of trailingSpaces and indentSpaces.
+ * @private
+ */
+function replacerToRemovePaddingLines(_, trailingSpaces, indentSpaces) {
+ return trailingSpaces + indentSpaces;
+}
+
+/**
+ * Check and report statements for `any` configuration.
+ * It does nothing.
+ *
+ * @returns {void}
+ * @private
+ */
+function verifyForAny() {
+}
+
+/**
+ * Check and report statements for `never` configuration.
+ * This autofix removes blank lines between the given 2 statements.
+ * However, if comments exist between 2 blank lines, it does not remove those
+ * blank lines automatically.
+ *
+ * @param {RuleContext} context The rule context to report.
+ * @param {ASTNode} _ Unused. The previous node to check.
+ * @param {ASTNode} nextNode The next node to check.
+ * @param {Array<Token[]>} paddingLines The array of token pairs that blank
+ * lines exist between the pair.
+ * @returns {void}
+ * @private
+ */
+function verifyForNever(context, _, nextNode, paddingLines) {
+ if (paddingLines.length === 0) {
+ return;
+ }
+
+ context.report({
+ node: nextNode,
+ message: "Unexpected blank line before this statement.",
+ fix(fixer) {
+ if (paddingLines.length >= 2) {
+ return null;
+ }
+
+ const prevToken = paddingLines[0][0];
+ const nextToken = paddingLines[0][1];
+ const start = prevToken.range[1];
+ const end = nextToken.range[0];
+ const text = context.getSourceCode().text
+ .slice(start, end)
+ .replace(PADDING_LINE_SEQUENCE, replacerToRemovePaddingLines);
+
+ return fixer.replaceTextRange([start, end], text);
+ }
+ });
+}
+
+/**
+ * Check and report statements for `always` configuration.
+ * This autofix inserts a blank line between the given 2 statements.
+ * If the `prevNode` has trailing comments, it inserts a blank line after the
+ * trailing comments.
+ *
+ * @param {RuleContext} context The rule context to report.
+ * @param {ASTNode} prevNode The previous node to check.
+ * @param {ASTNode} nextNode The next node to check.
+ * @param {Array<Token[]>} paddingLines The array of token pairs that blank
+ * lines exist between the pair.
+ * @returns {void}
+ * @private
+ */
+function verifyForAlways(context, prevNode, nextNode, paddingLines) {
+ if (paddingLines.length > 0) {
+ return;
+ }
+
+ context.report({
+ node: nextNode,
+ message: "Expected blank line before this statement.",
+ fix(fixer) {
+ const sourceCode = context.getSourceCode();
+ let prevToken = getActualLastToken(sourceCode, prevNode);
+ const nextToken = sourceCode.getFirstTokenBetween(
+ prevToken,
+ nextNode,
+ {
+ includeComments: true,
+
+ /**
+ * Skip the trailing comments of the previous node.
+ * This inserts a blank line after the last trailing comment.
+ *
+ * For example:
+ *
+ * foo(); // trailing comment.
+ * // comment.
+ * bar();
+ *
+ * Get fixed to:
+ *
+ * foo(); // trailing comment.
+ *
+ * // comment.
+ * bar();
+ *
+ * @param {Token} token The token to check.
+ * @returns {boolean} `true` if the token is not a trailing comment.
+ * @private
+ */
+ filter(token) {
+ if (astUtils.isTokenOnSameLine(prevToken, token)) {
+ prevToken = token;
+ return false;
+ }
+ return true;
+ }
+ }
+ ) || nextNode;
+ const insertText = astUtils.isTokenOnSameLine(prevToken, nextToken)
+ ? "\n\n"
+ : "\n";
+
+ return fixer.insertTextAfter(prevToken, insertText);
+ }
+ });
+}
+
+/**
+ * Types of blank lines.
+ * `any`, `never`, and `always` are defined.
+ * Those have `verify` method to check and report statements.
+ * @private
+ */
+const PaddingTypes = {
+ any: { verify: verifyForAny },
+ never: { verify: verifyForNever },
+ always: { verify: verifyForAlways }
+};
+
+/**
+ * Types of statements.
+ * Those have `test` method to check it matches to the given statement.
+ * @private
+ */
+const StatementTypes = {
+ "*": { test: () => true },
+ "block-like": {
+ test: (node, sourceCode) => isBlockLikeStatement(sourceCode, node)
+ },
+ "cjs-export": {
+ test: (node, sourceCode) =>
+ node.type === "ExpressionStatement" &&
+ node.expression.type === "AssignmentExpression" &&
+ CJS_EXPORT.test(sourceCode.getText(node.expression.left))
+ },
+ "cjs-import": {
+ test: (node, sourceCode) =>
+ node.type === "VariableDeclaration" &&
+ node.declarations.length > 0 &&
+ Boolean(node.declarations[0].init) &&
+ CJS_IMPORT.test(sourceCode.getText(node.declarations[0].init))
+ },
+ directive: {
+ test: isDirectivePrologue
+ },
+ expression: {
+ test: (node, sourceCode) =>
+ node.type === "ExpressionStatement" &&
+ !isDirectivePrologue(node, sourceCode)
+ },
+ "multiline-block-like": {
+ test: (node, sourceCode) =>
+ node.loc.start.line !== node.loc.end.line &&
+ isBlockLikeStatement(sourceCode, node)
+ },
+
+ block: newNodeTypeTester("BlockStatement"),
+ empty: newNodeTypeTester("EmptyStatement"),
+
+ break: newKeywordTester("break"),
+ case: newKeywordTester("case"),
+ class: newKeywordTester("class"),
+ const: newKeywordTester("const"),
+ continue: newKeywordTester("continue"),
+ debugger: newKeywordTester("debugger"),
+ default: newKeywordTester("default"),
+ do: newKeywordTester("do"),
+ export: newKeywordTester("export"),
+ for: newKeywordTester("for"),
+ function: newKeywordTester("function"),
+ if: newKeywordTester("if"),
+ import: newKeywordTester("import"),
+ let: newKeywordTester("let"),
+ return: newKeywordTester("return"),
+ switch: newKeywordTester("switch"),
+ throw: newKeywordTester("throw"),
+ try: newKeywordTester("try"),
+ var: newKeywordTester("var"),
+ while: newKeywordTester("while"),
+ with: newKeywordTester("with")
+};
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require or disallow padding lines between statements",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+ fixable: "whitespace",
+ schema: {
+ definitions: {
+ paddingType: {
+ enum: Object.keys(PaddingTypes)
+ },
+ statementType: {
+ anyOf: [
+ { enum: Object.keys(StatementTypes) },
+ {
+ type: "array",
+ items: { enum: Object.keys(StatementTypes) },
+ minItems: 1,
+ uniqueItems: true,
+ additionalItems: false
+ }
+ ]
+ }
+ },
+ type: "array",
+ items: {
+ type: "object",
+ properties: {
+ blankLine: { $ref: "#/definitions/paddingType" },
+ prev: { $ref: "#/definitions/statementType" },
+ next: { $ref: "#/definitions/statementType" }
+ },
+ additionalProperties: false,
+ required: ["blankLine", "prev", "next"]
+ },
+ additionalItems: false
+ }
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+ const configureList = context.options || [];
+ let scopeInfo = null;
+
+ /**
+ * Processes to enter to new scope.
+ * This manages the current previous statement.
+ * @returns {void}
+ * @private
+ */
+ function enterScope() {
+ scopeInfo = {
+ upper: scopeInfo,
+ prevNode: null
+ };
+ }
+
+ /**
+ * Processes to exit from the current scope.
+ * @returns {void}
+ * @private
+ */
+ function exitScope() {
+ scopeInfo = scopeInfo.upper;
+ }
+
+ /**
+ * Checks whether the given node matches the given type.
+ *
+ * @param {ASTNode} node The statement node to check.
+ * @param {string|string[]} type The statement type to check.
+ * @returns {boolean} `true` if the statement node matched the type.
+ * @private
+ */
+ function match(node, type) {
+ while (node.type === "LabeledStatement") {
+ node = node.body;
+ }
+ if (Array.isArray(type)) {
+ return type.some(match.bind(null, node));
+ }
+ return StatementTypes[type].test(node, sourceCode);
+ }
+
+ /**
+ * Finds the last matched configure from configureList.
+ *
+ * @param {ASTNode} prevNode The previous statement to match.
+ * @param {ASTNode} nextNode The current statement to match.
+ * @returns {Object} The tester of the last matched configure.
+ * @private
+ */
+ function getPaddingType(prevNode, nextNode) {
+ for (let i = configureList.length - 1; i >= 0; --i) {
+ const configure = configureList[i];
+ const matched =
+ match(prevNode, configure.prev) &&
+ match(nextNode, configure.next);
+
+ if (matched) {
+ return PaddingTypes[configure.blankLine];
+ }
+ }
+ return PaddingTypes.any;
+ }
+
+ /**
+ * Gets padding line sequences between the given 2 statements.
+ * Comments are separators of the padding line sequences.
+ *
+ * @param {ASTNode} prevNode The previous statement to count.
+ * @param {ASTNode} nextNode The current statement to count.
+ * @returns {Array<Token[]>} The array of token pairs.
+ * @private
+ */
+ function getPaddingLineSequences(prevNode, nextNode) {
+ const pairs = [];
+ let prevToken = getActualLastToken(sourceCode, prevNode);
+
+ if (nextNode.loc.start.line - prevToken.loc.end.line >= 2) {
+ do {
+ const token = sourceCode.getTokenAfter(
+ prevToken,
+ { includeComments: true }
+ );
+
+ if (token.loc.start.line - prevToken.loc.end.line >= 2) {
+ pairs.push([prevToken, token]);
+ }
+ prevToken = token;
+
+ } while (prevToken.range[0] < nextNode.range[0]);
+ }
+
+ return pairs;
+ }
+
+ /**
+ * Verify padding lines between the given node and the previous node.
+ *
+ * @param {ASTNode} node The node to verify.
+ * @returns {void}
+ * @private
+ */
+ function verify(node) {
+ const parentType = node.parent.type;
+ const validParent =
+ astUtils.STATEMENT_LIST_PARENTS.has(parentType) ||
+ parentType === "SwitchStatement";
+
+ if (!validParent) {
+ return;
+ }
+
+ // Save this node as the current previous statement.
+ const prevNode = scopeInfo.prevNode;
+
+ // Verify.
+ if (prevNode) {
+ const type = getPaddingType(prevNode, node);
+ const paddingLines = getPaddingLineSequences(prevNode, node);
+
+ type.verify(context, prevNode, node, paddingLines);
+ }
+
+ scopeInfo.prevNode = node;
+ }
+
+ /**
+ * Verify padding lines between the given node and the previous node.
+ * Then process to enter to new scope.
+ *
+ * @param {ASTNode} node The node to verify.
+ * @returns {void}
+ * @private
+ */
+ function verifyThenEnterScope(node) {
+ verify(node);
+ enterScope();
+ }
+
+ return {
+ Program: enterScope,
+ BlockStatement: enterScope,
+ SwitchStatement: enterScope,
+ "Program:exit": exitScope,
+ "BlockStatement:exit": exitScope,
+ "SwitchStatement:exit": exitScope,
+
+ ":statement": verify,
+
+ SwitchCase: verifyThenEnterScope,
+ "SwitchCase:exit": exitScope
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/prefer-arrow-callback.js b/tools/node_modules/eslint/lib/rules/prefer-arrow-callback.js
new file mode 100644
index 0000000000..31ae2859fe
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/prefer-arrow-callback.js
@@ -0,0 +1,304 @@
+/**
+ * @fileoverview A rule to suggest using arrow functions as callbacks.
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Checks whether or not a given variable is a function name.
+ * @param {eslint-scope.Variable} variable - A variable to check.
+ * @returns {boolean} `true` if the variable is a function name.
+ */
+function isFunctionName(variable) {
+ return variable && variable.defs[0].type === "FunctionName";
+}
+
+/**
+ * Checks whether or not a given MetaProperty node equals to a given value.
+ * @param {ASTNode} node - A MetaProperty node to check.
+ * @param {string} metaName - The name of `MetaProperty.meta`.
+ * @param {string} propertyName - The name of `MetaProperty.property`.
+ * @returns {boolean} `true` if the node is the specific value.
+ */
+function checkMetaProperty(node, metaName, propertyName) {
+ return node.meta.name === metaName && node.property.name === propertyName;
+}
+
+/**
+ * Gets the variable object of `arguments` which is defined implicitly.
+ * @param {eslint-scope.Scope} scope - A scope to get.
+ * @returns {eslint-scope.Variable} The found variable object.
+ */
+function getVariableOfArguments(scope) {
+ const variables = scope.variables;
+
+ for (let i = 0; i < variables.length; ++i) {
+ const variable = variables[i];
+
+ if (variable.name === "arguments") {
+
+ /*
+ * If there was a parameter which is named "arguments", the
+ * implicit "arguments" is not defined.
+ * So does fast return with null.
+ */
+ return (variable.identifiers.length === 0) ? variable : null;
+ }
+ }
+
+ /* istanbul ignore next */
+ return null;
+}
+
+/**
+ * Checkes whether or not a given node is a callback.
+ * @param {ASTNode} node - A node to check.
+ * @returns {Object}
+ * {boolean} retv.isCallback - `true` if the node is a callback.
+ * {boolean} retv.isLexicalThis - `true` if the node is with `.bind(this)`.
+ */
+function getCallbackInfo(node) {
+ const retv = { isCallback: false, isLexicalThis: false };
+ let parent = node.parent;
+
+ while (node) {
+ switch (parent.type) {
+
+ // Checks parents recursively.
+
+ case "LogicalExpression":
+ case "ConditionalExpression":
+ break;
+
+ // Checks whether the parent node is `.bind(this)` call.
+ case "MemberExpression":
+ if (parent.object === node &&
+ !parent.property.computed &&
+ parent.property.type === "Identifier" &&
+ parent.property.name === "bind" &&
+ parent.parent.type === "CallExpression" &&
+ parent.parent.callee === parent
+ ) {
+ retv.isLexicalThis = (
+ parent.parent.arguments.length === 1 &&
+ parent.parent.arguments[0].type === "ThisExpression"
+ );
+ parent = parent.parent;
+ } else {
+ return retv;
+ }
+ break;
+
+ // Checks whether the node is a callback.
+ case "CallExpression":
+ case "NewExpression":
+ if (parent.callee !== node) {
+ retv.isCallback = true;
+ }
+ return retv;
+
+ default:
+ return retv;
+ }
+
+ node = parent;
+ parent = parent.parent;
+ }
+
+ /* istanbul ignore next */
+ throw new Error("unreachable");
+}
+
+/**
+ * Checks whether a simple list of parameters contains any duplicates. This does not handle complex
+ * parameter lists (e.g. with destructuring), since complex parameter lists are a SyntaxError with duplicate
+ * parameter names anyway. Instead, it always returns `false` for complex parameter lists.
+ * @param {ASTNode[]} paramsList The list of parameters for a function
+ * @returns {boolean} `true` if the list of parameters contains any duplicates
+ */
+function hasDuplicateParams(paramsList) {
+ return paramsList.every(param => param.type === "Identifier") && paramsList.length !== new Set(paramsList.map(param => param.name)).size;
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require using arrow functions for callbacks",
+ category: "ECMAScript 6",
+ recommended: false
+ },
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ allowNamedFunctions: {
+ type: "boolean"
+ },
+ allowUnboundThis: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ],
+
+ fixable: "code"
+ },
+
+ create(context) {
+ const options = context.options[0] || {};
+
+ const allowUnboundThis = options.allowUnboundThis !== false; // default to true
+ const allowNamedFunctions = options.allowNamedFunctions;
+ const sourceCode = context.getSourceCode();
+
+ /*
+ * {Array<{this: boolean, super: boolean, meta: boolean}>}
+ * - this - A flag which shows there are one or more ThisExpression.
+ * - super - A flag which shows there are one or more Super.
+ * - meta - A flag which shows there are one or more MethProperty.
+ */
+ let stack = [];
+
+ /**
+ * Pushes new function scope with all `false` flags.
+ * @returns {void}
+ */
+ function enterScope() {
+ stack.push({ this: false, super: false, meta: false });
+ }
+
+ /**
+ * Pops a function scope from the stack.
+ * @returns {{this: boolean, super: boolean, meta: boolean}} The information of the last scope.
+ */
+ function exitScope() {
+ return stack.pop();
+ }
+
+ return {
+
+ // Reset internal state.
+ Program() {
+ stack = [];
+ },
+
+ // If there are below, it cannot replace with arrow functions merely.
+ ThisExpression() {
+ const info = stack[stack.length - 1];
+
+ if (info) {
+ info.this = true;
+ }
+ },
+
+ Super() {
+ const info = stack[stack.length - 1];
+
+ if (info) {
+ info.super = true;
+ }
+ },
+
+ MetaProperty(node) {
+ const info = stack[stack.length - 1];
+
+ if (info && checkMetaProperty(node, "new", "target")) {
+ info.meta = true;
+ }
+ },
+
+ // To skip nested scopes.
+ FunctionDeclaration: enterScope,
+ "FunctionDeclaration:exit": exitScope,
+
+ // Main.
+ FunctionExpression: enterScope,
+ "FunctionExpression:exit"(node) {
+ const scopeInfo = exitScope();
+
+ // Skip named function expressions
+ if (allowNamedFunctions && node.id && node.id.name) {
+ return;
+ }
+
+ // Skip generators.
+ if (node.generator) {
+ return;
+ }
+
+ // Skip recursive functions.
+ const nameVar = context.getDeclaredVariables(node)[0];
+
+ if (isFunctionName(nameVar) && nameVar.references.length > 0) {
+ return;
+ }
+
+ // Skip if it's using arguments.
+ const variable = getVariableOfArguments(context.getScope());
+
+ if (variable && variable.references.length > 0) {
+ return;
+ }
+
+ // Reports if it's a callback which can replace with arrows.
+ const callbackInfo = getCallbackInfo(node);
+
+ if (callbackInfo.isCallback &&
+ (!allowUnboundThis || !scopeInfo.this || callbackInfo.isLexicalThis) &&
+ !scopeInfo.super &&
+ !scopeInfo.meta
+ ) {
+ context.report({
+ node,
+ message: "Unexpected function expression.",
+ fix(fixer) {
+ if ((!callbackInfo.isLexicalThis && scopeInfo.this) || hasDuplicateParams(node.params)) {
+
+ /*
+ * If the callback function does not have .bind(this) and contains a reference to `this`, there
+ * is no way to determine what `this` should be, so don't perform any fixes.
+ * If the callback function has duplicates in its list of parameters (possible in sloppy mode),
+ * don't replace it with an arrow function, because this is a SyntaxError with arrow functions.
+ */
+ return null;
+ }
+
+ const paramsLeftParen = node.params.length ? sourceCode.getTokenBefore(node.params[0]) : sourceCode.getTokenBefore(node.body, 1);
+ const paramsRightParen = sourceCode.getTokenBefore(node.body);
+ const asyncKeyword = node.async ? "async " : "";
+ const paramsFullText = sourceCode.text.slice(paramsLeftParen.range[0], paramsRightParen.range[1]);
+ const arrowFunctionText = `${asyncKeyword}${paramsFullText} => ${sourceCode.getText(node.body)}`;
+
+ /*
+ * If the callback function has `.bind(this)`, replace it with an arrow function and remove the binding.
+ * Otherwise, just replace the arrow function itself.
+ */
+ const replacedNode = callbackInfo.isLexicalThis ? node.parent.parent : node;
+
+ /*
+ * If the replaced node is part of a BinaryExpression, LogicalExpression, or MemberExpression, then
+ * the arrow function needs to be parenthesized, because `foo || () => {}` is invalid syntax even
+ * though `foo || function() {}` is valid.
+ */
+ const needsParens = replacedNode.parent.type !== "CallExpression" && replacedNode.parent.type !== "ConditionalExpression";
+ const replacementText = needsParens ? `(${arrowFunctionText})` : arrowFunctionText;
+
+ return fixer.replaceText(replacedNode, replacementText);
+ }
+ });
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/prefer-const.js b/tools/node_modules/eslint/lib/rules/prefer-const.js
new file mode 100644
index 0000000000..a8cf3b7ef6
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/prefer-const.js
@@ -0,0 +1,321 @@
+/**
+ * @fileoverview A rule to suggest using of const declaration for variables that are never reassigned after declared.
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+const PATTERN_TYPE = /^(?:.+?Pattern|RestElement|SpreadProperty|ExperimentalRestProperty|Property)$/;
+const DECLARATION_HOST_TYPE = /^(?:Program|BlockStatement|SwitchCase)$/;
+const DESTRUCTURING_HOST_TYPE = /^(?:VariableDeclarator|AssignmentExpression)$/;
+
+/**
+ * Adds multiple items to the tail of an array.
+ *
+ * @param {any[]} array - A destination to add.
+ * @param {any[]} values - Items to be added.
+ * @returns {void}
+ */
+const pushAll = Function.apply.bind(Array.prototype.push);
+
+/**
+ * Checks whether a given node is located at `ForStatement.init` or not.
+ *
+ * @param {ASTNode} node - A node to check.
+ * @returns {boolean} `true` if the node is located at `ForStatement.init`.
+ */
+function isInitOfForStatement(node) {
+ return node.parent.type === "ForStatement" && node.parent.init === node;
+}
+
+/**
+ * Checks whether a given Identifier node becomes a VariableDeclaration or not.
+ *
+ * @param {ASTNode} identifier - An Identifier node to check.
+ * @returns {boolean} `true` if the node can become a VariableDeclaration.
+ */
+function canBecomeVariableDeclaration(identifier) {
+ let node = identifier.parent;
+
+ while (PATTERN_TYPE.test(node.type)) {
+ node = node.parent;
+ }
+
+ return (
+ node.type === "VariableDeclarator" ||
+ (
+ node.type === "AssignmentExpression" &&
+ node.parent.type === "ExpressionStatement" &&
+ DECLARATION_HOST_TYPE.test(node.parent.parent.type)
+ )
+ );
+}
+
+/**
+ * Gets an identifier node of a given variable.
+ *
+ * If the initialization exists or one or more reading references exist before
+ * the first assignment, the identifier node is the node of the declaration.
+ * Otherwise, the identifier node is the node of the first assignment.
+ *
+ * If the variable should not change to const, this function returns null.
+ * - If the variable is reassigned.
+ * - If the variable is never initialized nor assigned.
+ * - If the variable is initialized in a different scope from the declaration.
+ * - If the unique assignment of the variable cannot change to a declaration.
+ * e.g. `if (a) b = 1` / `return (b = 1)`
+ * - If the variable is declared in the global scope and `eslintUsed` is `true`.
+ * `/*exported foo` directive comment makes such variables. This rule does not
+ * warn such variables because this rule cannot distinguish whether the
+ * exported variables are reassigned or not.
+ *
+ * @param {eslint-scope.Variable} variable - A variable to get.
+ * @param {boolean} ignoreReadBeforeAssign -
+ * The value of `ignoreReadBeforeAssign` option.
+ * @returns {ASTNode|null}
+ * An Identifier node if the variable should change to const.
+ * Otherwise, null.
+ */
+function getIdentifierIfShouldBeConst(variable, ignoreReadBeforeAssign) {
+ if (variable.eslintUsed && variable.scope.type === "global") {
+ return null;
+ }
+
+ // Finds the unique WriteReference.
+ let writer = null;
+ let isReadBeforeInit = false;
+ const references = variable.references;
+
+ for (let i = 0; i < references.length; ++i) {
+ const reference = references[i];
+
+ if (reference.isWrite()) {
+ const isReassigned = (
+ writer !== null &&
+ writer.identifier !== reference.identifier
+ );
+
+ if (isReassigned) {
+ return null;
+ }
+ writer = reference;
+
+ } else if (reference.isRead() && writer === null) {
+ if (ignoreReadBeforeAssign) {
+ return null;
+ }
+ isReadBeforeInit = true;
+ }
+ }
+
+ /*
+ * If the assignment is from a different scope, ignore it.
+ * If the assignment cannot change to a declaration, ignore it.
+ */
+ const shouldBeConst = (
+ writer !== null &&
+ writer.from === variable.scope &&
+ canBecomeVariableDeclaration(writer.identifier)
+ );
+
+ if (!shouldBeConst) {
+ return null;
+ }
+ if (isReadBeforeInit) {
+ return variable.defs[0].name;
+ }
+ return writer.identifier;
+}
+
+/**
+ * Gets the VariableDeclarator/AssignmentExpression node that a given reference
+ * belongs to.
+ * This is used to detect a mix of reassigned and never reassigned in a
+ * destructuring.
+ *
+ * @param {eslint-scope.Reference} reference - A reference to get.
+ * @returns {ASTNode|null} A VariableDeclarator/AssignmentExpression node or
+ * null.
+ */
+function getDestructuringHost(reference) {
+ if (!reference.isWrite()) {
+ return null;
+ }
+ let node = reference.identifier.parent;
+
+ while (PATTERN_TYPE.test(node.type)) {
+ node = node.parent;
+ }
+
+ if (!DESTRUCTURING_HOST_TYPE.test(node.type)) {
+ return null;
+ }
+ return node;
+}
+
+/**
+ * Groups by the VariableDeclarator/AssignmentExpression node that each
+ * reference of given variables belongs to.
+ * This is used to detect a mix of reassigned and never reassigned in a
+ * destructuring.
+ *
+ * @param {eslint-scope.Variable[]} variables - Variables to group by destructuring.
+ * @param {boolean} ignoreReadBeforeAssign -
+ * The value of `ignoreReadBeforeAssign` option.
+ * @returns {Map<ASTNode, ASTNode[]>} Grouped identifier nodes.
+ */
+function groupByDestructuring(variables, ignoreReadBeforeAssign) {
+ const identifierMap = new Map();
+
+ for (let i = 0; i < variables.length; ++i) {
+ const variable = variables[i];
+ const references = variable.references;
+ const identifier = getIdentifierIfShouldBeConst(variable, ignoreReadBeforeAssign);
+ let prevId = null;
+
+ for (let j = 0; j < references.length; ++j) {
+ const reference = references[j];
+ const id = reference.identifier;
+
+ /*
+ * Avoid counting a reference twice or more for default values of
+ * destructuring.
+ */
+ if (id === prevId) {
+ continue;
+ }
+ prevId = id;
+
+ // Add the identifier node into the destructuring group.
+ const group = getDestructuringHost(reference);
+
+ if (group) {
+ if (identifierMap.has(group)) {
+ identifierMap.get(group).push(identifier);
+ } else {
+ identifierMap.set(group, [identifier]);
+ }
+ }
+ }
+ }
+
+ return identifierMap;
+}
+
+/**
+ * Finds the nearest parent of node with a given type.
+ *
+ * @param {ASTNode} node – The node to search from.
+ * @param {string} type – The type field of the parent node.
+ * @param {Function} shouldStop – a predicate that returns true if the traversal should stop, and false otherwise.
+ * @returns {ASTNode} The closest ancestor with the specified type; null if no such ancestor exists.
+ */
+function findUp(node, type, shouldStop) {
+ if (!node || shouldStop(node)) {
+ return null;
+ }
+ if (node.type === type) {
+ return node;
+ }
+ return findUp(node.parent, type, shouldStop);
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require `const` declarations for variables that are never reassigned after declared",
+ category: "ECMAScript 6",
+ recommended: false
+ },
+
+ fixable: "code",
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ destructuring: { enum: ["any", "all"] },
+ ignoreReadBeforeAssign: { type: "boolean" }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+ const options = context.options[0] || {};
+ const sourceCode = context.getSourceCode();
+ const checkingMixedDestructuring = options.destructuring !== "all";
+ const ignoreReadBeforeAssign = options.ignoreReadBeforeAssign === true;
+ const variables = [];
+
+ /**
+ * Reports given identifier nodes if all of the nodes should be declared
+ * as const.
+ *
+ * The argument 'nodes' is an array of Identifier nodes.
+ * This node is the result of 'getIdentifierIfShouldBeConst()', so it's
+ * nullable. In simple declaration or assignment cases, the length of
+ * the array is 1. In destructuring cases, the length of the array can
+ * be 2 or more.
+ *
+ * @param {(eslint-scope.Reference|null)[]} nodes -
+ * References which are grouped by destructuring to report.
+ * @returns {void}
+ */
+ function checkGroup(nodes) {
+ const nodesToReport = nodes.filter(Boolean);
+
+ if (nodes.length && (checkingMixedDestructuring || nodesToReport.length === nodes.length)) {
+ const varDeclParent = findUp(nodes[0], "VariableDeclaration", parentNode => parentNode.type.endsWith("Statement"));
+ const shouldFix = varDeclParent &&
+
+ /*
+ * If there are multiple variable declarations, like {let a = 1, b = 2}, then
+ * do not attempt to fix if one of the declarations should be `const`. It's
+ * too hard to know how the developer would want to automatically resolve the issue.
+ */
+ varDeclParent.declarations.length === 1 &&
+
+ // Don't do a fix unless the variable is initialized (or it's in a for-in or for-of loop)
+ (varDeclParent.parent.type === "ForInStatement" || varDeclParent.parent.type === "ForOfStatement" || varDeclParent.declarations[0].init) &&
+
+ /*
+ * If options.destucturing is "all", then this warning will not occur unless
+ * every assignment in the destructuring should be const. In that case, it's safe
+ * to apply the fix.
+ */
+ nodesToReport.length === nodes.length;
+
+ nodesToReport.forEach(node => {
+ context.report({
+ node,
+ message: "'{{name}}' is never reassigned. Use 'const' instead.",
+ data: node,
+ fix: shouldFix ? fixer => fixer.replaceText(sourceCode.getFirstToken(varDeclParent), "const") : null
+ });
+ });
+ }
+ }
+
+ return {
+ "Program:exit"() {
+ groupByDestructuring(variables, ignoreReadBeforeAssign).forEach(checkGroup);
+ },
+
+ VariableDeclaration(node) {
+ if (node.kind === "let" && !isInitOfForStatement(node)) {
+ pushAll(variables, context.getDeclaredVariables(node));
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/prefer-destructuring.js b/tools/node_modules/eslint/lib/rules/prefer-destructuring.js
new file mode 100644
index 0000000000..56c348a478
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/prefer-destructuring.js
@@ -0,0 +1,217 @@
+/**
+ * @fileoverview Prefer destructuring from arrays and objects
+ * @author Alex LaFroscia
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require destructuring from arrays and/or objects",
+ category: "ECMAScript 6",
+ recommended: false
+ },
+ schema: [
+ {
+
+ /*
+ * old support {array: Boolean, object: Boolean}
+ * new support {VariableDeclarator: {}, AssignmentExpression: {}}
+ */
+ oneOf: [
+ {
+ type: "object",
+ properties: {
+ VariableDeclarator: {
+ type: "object",
+ properties: {
+ array: {
+ type: "boolean"
+ },
+ object: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ },
+ AssignmentExpression: {
+ type: "object",
+ properties: {
+ array: {
+ type: "boolean"
+ },
+ object: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ },
+ additionalProperties: false
+ },
+ {
+ type: "object",
+ properties: {
+ array: {
+ type: "boolean"
+ },
+ object: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+ {
+ type: "object",
+ properties: {
+ enforceForRenamedProperties: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+ create(context) {
+
+ const enabledTypes = context.options[0];
+ const enforceForRenamedProperties = context.options[1] && context.options[1].enforceForRenamedProperties;
+ let normalizedOptions = {
+ VariableDeclarator: { array: true, object: true },
+ AssignmentExpression: { array: true, object: true }
+ };
+
+ if (enabledTypes) {
+ normalizedOptions = typeof enabledTypes.array !== "undefined" || typeof enabledTypes.object !== "undefined"
+ ? { VariableDeclarator: enabledTypes, AssignmentExpression: enabledTypes }
+ : enabledTypes;
+ }
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ /**
+ * @param {string} nodeType "AssignmentExpression" or "VariableDeclarator"
+ * @param {string} destructuringType "array" or "object"
+ * @returns {boolean} `true` if the destructuring type should be checked for the given node
+ */
+ function shouldCheck(nodeType, destructuringType) {
+ return normalizedOptions &&
+ normalizedOptions[nodeType] &&
+ normalizedOptions[nodeType][destructuringType];
+ }
+
+ /**
+ * Determines if the given node is accessing an array index
+ *
+ * This is used to differentiate array index access from object property
+ * access.
+ *
+ * @param {ASTNode} node the node to evaluate
+ * @returns {boolean} whether or not the node is an integer
+ */
+ function isArrayIndexAccess(node) {
+ return Number.isInteger(node.property.value);
+ }
+
+ /**
+ * Report that the given node should use destructuring
+ *
+ * @param {ASTNode} reportNode the node to report
+ * @param {string} type the type of destructuring that should have been done
+ * @returns {void}
+ */
+ function report(reportNode, type) {
+ context.report({ node: reportNode, message: "Use {{type}} destructuring.", data: { type } });
+ }
+
+ /**
+ * Check that the `prefer-destructuring` rules are followed based on the
+ * given left- and right-hand side of the assignment.
+ *
+ * Pulled out into a separate method so that VariableDeclarators and
+ * AssignmentExpressions can share the same verification logic.
+ *
+ * @param {ASTNode} leftNode the left-hand side of the assignment
+ * @param {ASTNode} rightNode the right-hand side of the assignment
+ * @param {ASTNode} reportNode the node to report the error on
+ * @returns {void}
+ */
+ function performCheck(leftNode, rightNode, reportNode) {
+ if (rightNode.type !== "MemberExpression" || rightNode.object.type === "Super") {
+ return;
+ }
+
+ if (isArrayIndexAccess(rightNode)) {
+ if (shouldCheck(reportNode.type, "array")) {
+ report(reportNode, "array");
+ }
+ return;
+ }
+
+ if (shouldCheck(reportNode.type, "object") && enforceForRenamedProperties) {
+ report(reportNode, "object");
+ return;
+ }
+
+ if (shouldCheck(reportNode.type, "object")) {
+ const property = rightNode.property;
+
+ if ((property.type === "Literal" && leftNode.name === property.value) || (property.type === "Identifier" &&
+ leftNode.name === property.name)) {
+ report(reportNode, "object");
+ }
+ }
+ }
+
+ /**
+ * Check if a given variable declarator is coming from an property access
+ * that should be using destructuring instead
+ *
+ * @param {ASTNode} node the variable declarator to check
+ * @returns {void}
+ */
+ function checkVariableDeclarator(node) {
+
+ // Skip if variable is declared without assignment
+ if (!node.init) {
+ return;
+ }
+
+ // We only care about member expressions past this point
+ if (node.init.type !== "MemberExpression") {
+ return;
+ }
+
+ performCheck(node.id, node.init, node);
+ }
+
+ /**
+ * Run the `prefer-destructuring` check on an AssignmentExpression
+ *
+ * @param {ASTNode} node the AssignmentExpression node
+ * @returns {void}
+ */
+ function checkAssigmentExpression(node) {
+ if (node.operator === "=") {
+ performCheck(node.left, node.right, node);
+ }
+ }
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+ VariableDeclarator: checkVariableDeclarator,
+ AssignmentExpression: checkAssigmentExpression
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/prefer-numeric-literals.js b/tools/node_modules/eslint/lib/rules/prefer-numeric-literals.js
new file mode 100644
index 0000000000..929e660c66
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/prefer-numeric-literals.js
@@ -0,0 +1,112 @@
+/**
+ * @fileoverview Rule to disallow `parseInt()` in favor of binary, octal, and hexadecimal literals
+ * @author Annie Zhang, Henry Zhu
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Checks to see if a CallExpression's callee node is `parseInt` or
+ * `Number.parseInt`.
+ * @param {ASTNode} calleeNode The callee node to evaluate.
+ * @returns {boolean} True if the callee is `parseInt` or `Number.parseInt`,
+ * false otherwise.
+ */
+function isParseInt(calleeNode) {
+ switch (calleeNode.type) {
+ case "Identifier":
+ return calleeNode.name === "parseInt";
+ case "MemberExpression":
+ return calleeNode.object.type === "Identifier" &&
+ calleeNode.object.name === "Number" &&
+ calleeNode.property.type === "Identifier" &&
+ calleeNode.property.name === "parseInt";
+
+ // no default
+ }
+
+ return false;
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals",
+ category: "ECMAScript 6",
+ recommended: false
+ },
+
+ schema: [],
+
+ fixable: "code"
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+
+ const radixMap = {
+ 2: "binary",
+ 8: "octal",
+ 16: "hexadecimal"
+ };
+
+ const prefixMap = {
+ 2: "0b",
+ 8: "0o",
+ 16: "0x"
+ };
+
+ //----------------------------------------------------------------------
+ // Public
+ //----------------------------------------------------------------------
+
+ return {
+
+ CallExpression(node) {
+
+ // doesn't check parseInt() if it doesn't have a radix argument
+ if (node.arguments.length !== 2) {
+ return;
+ }
+
+ // only error if the radix is 2, 8, or 16
+ const radixName = radixMap[node.arguments[1].value];
+
+ if (isParseInt(node.callee) &&
+ radixName &&
+ node.arguments[0].type === "Literal"
+ ) {
+ context.report({
+ node,
+ message: "Use {{radixName}} literals instead of {{functionName}}().",
+ data: {
+ radixName,
+ functionName: sourceCode.getText(node.callee)
+ },
+ fix(fixer) {
+ const newPrefix = prefixMap[node.arguments[1].value];
+
+ if (+(newPrefix + node.arguments[0].value) !== parseInt(node.arguments[0].value, node.arguments[1].value)) {
+
+ /*
+ * If the newly-produced literal would be invalid, (e.g. 0b1234),
+ * or it would yield an incorrect parseInt result for some other reason, don't make a fix.
+ */
+ return null;
+ }
+ return fixer.replaceText(node, prefixMap[node.arguments[1].value] + node.arguments[0].value);
+ }
+ });
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/prefer-promise-reject-errors.js b/tools/node_modules/eslint/lib/rules/prefer-promise-reject-errors.js
new file mode 100644
index 0000000000..d2a6b5df10
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/prefer-promise-reject-errors.js
@@ -0,0 +1,124 @@
+/**
+ * @fileoverview restrict values that can be used as Promise rejection reasons
+ * @author Teddy Katz
+ */
+"use strict";
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require using Error objects as Promise rejection reasons",
+ category: "Best Practices",
+ recommended: false
+ },
+ fixable: null,
+ schema: [
+ {
+ type: "object",
+ properties: {
+ allowEmptyReject: { type: "boolean" }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+
+ const ALLOW_EMPTY_REJECT = context.options.length && context.options[0].allowEmptyReject;
+
+ //----------------------------------------------------------------------
+ // Helpers
+ //----------------------------------------------------------------------
+
+ /**
+ * Checks the argument of a reject() or Promise.reject() CallExpression, and reports it if it can't be an Error
+ * @param {ASTNode} callExpression A CallExpression node which is used to reject a Promise
+ * @returns {void}
+ */
+ function checkRejectCall(callExpression) {
+ if (!callExpression.arguments.length && ALLOW_EMPTY_REJECT) {
+ return;
+ }
+ if (
+ !callExpression.arguments.length ||
+ !astUtils.couldBeError(callExpression.arguments[0]) ||
+ callExpression.arguments[0].type === "Identifier" && callExpression.arguments[0].name === "undefined"
+ ) {
+ context.report({
+ node: callExpression,
+ message: "Expected the Promise rejection reason to be an Error."
+ });
+ }
+ }
+
+ /**
+ * Determines whether a function call is a Promise.reject() call
+ * @param {ASTNode} node A CallExpression node
+ * @returns {boolean} `true` if the call is a Promise.reject() call
+ */
+ function isPromiseRejectCall(node) {
+ return node.callee.type === "MemberExpression" &&
+ node.callee.object.type === "Identifier" && node.callee.object.name === "Promise" &&
+ node.callee.property.type === "Identifier" && node.callee.property.name === "reject";
+ }
+
+ //----------------------------------------------------------------------
+ // Public
+ //----------------------------------------------------------------------
+
+ return {
+
+ // Check `Promise.reject(value)` calls.
+ CallExpression(node) {
+ if (isPromiseRejectCall(node)) {
+ checkRejectCall(node);
+ }
+ },
+
+ /*
+ * Check for `new Promise((resolve, reject) => {})`, and check for reject() calls.
+ * This function is run on "NewExpression:exit" instead of "NewExpression" to ensure that
+ * the nodes in the expression already have the `parent` property.
+ */
+ "NewExpression:exit"(node) {
+ if (
+ node.callee.type === "Identifier" && node.callee.name === "Promise" &&
+ node.arguments.length && astUtils.isFunction(node.arguments[0]) &&
+ node.arguments[0].params.length > 1 && node.arguments[0].params[1].type === "Identifier"
+ ) {
+ context.getDeclaredVariables(node.arguments[0])
+
+ /*
+ * Find the first variable that matches the second parameter's name.
+ * If the first parameter has the same name as the second parameter, then the variable will actually
+ * be "declared" when the first parameter is evaluated, but then it will be immediately overwritten
+ * by the second parameter. It's not possible for an expression with the variable to be evaluated before
+ * the variable is overwritten, because functions with duplicate parameters cannot have destructuring or
+ * default assignments in their parameter lists. Therefore, it's not necessary to explicitly account for
+ * this case.
+ */
+ .find(variable => variable.name === node.arguments[0].params[1].name)
+
+ // Get the references to that variable.
+ .references
+
+ // Only check the references that read the parameter's value.
+ .filter(ref => ref.isRead())
+
+ // Only check the references that are used as the callee in a function call, e.g. `reject(foo)`.
+ .filter(ref => ref.identifier.parent.type === "CallExpression" && ref.identifier === ref.identifier.parent.callee)
+
+ // Check the argument of the function call to determine whether it's an Error.
+ .forEach(ref => checkRejectCall(ref.identifier.parent));
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/prefer-reflect.js b/tools/node_modules/eslint/lib/rules/prefer-reflect.js
new file mode 100644
index 0000000000..a47e66c5f5
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/prefer-reflect.js
@@ -0,0 +1,119 @@
+/**
+ * @fileoverview Rule to suggest using "Reflect" api over Function/Object methods
+ * @author Keith Cirkel <http://keithcirkel.co.uk>
+ * @deprecated in ESLint v3.9.0
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require `Reflect` methods where applicable",
+ category: "ECMAScript 6",
+ recommended: false,
+ replacedBy: []
+ },
+
+ deprecated: true,
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ exceptions: {
+ type: "array",
+ items: {
+ enum: [
+ "apply",
+ "call",
+ "delete",
+ "defineProperty",
+ "getOwnPropertyDescriptor",
+ "getPrototypeOf",
+ "setPrototypeOf",
+ "isExtensible",
+ "getOwnPropertyNames",
+ "preventExtensions"
+ ]
+ },
+ uniqueItems: true
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+ const existingNames = {
+ apply: "Function.prototype.apply",
+ call: "Function.prototype.call",
+ defineProperty: "Object.defineProperty",
+ getOwnPropertyDescriptor: "Object.getOwnPropertyDescriptor",
+ getPrototypeOf: "Object.getPrototypeOf",
+ setPrototypeOf: "Object.setPrototypeOf",
+ isExtensible: "Object.isExtensible",
+ getOwnPropertyNames: "Object.getOwnPropertyNames",
+ preventExtensions: "Object.preventExtensions"
+ };
+
+ const reflectSubsitutes = {
+ apply: "Reflect.apply",
+ call: "Reflect.apply",
+ defineProperty: "Reflect.defineProperty",
+ getOwnPropertyDescriptor: "Reflect.getOwnPropertyDescriptor",
+ getPrototypeOf: "Reflect.getPrototypeOf",
+ setPrototypeOf: "Reflect.setPrototypeOf",
+ isExtensible: "Reflect.isExtensible",
+ getOwnPropertyNames: "Reflect.getOwnPropertyNames",
+ preventExtensions: "Reflect.preventExtensions"
+ };
+
+ const exceptions = (context.options[0] || {}).exceptions || [];
+
+ /**
+ * Reports the Reflect violation based on the `existing` and `substitute`
+ * @param {Object} node The node that violates the rule.
+ * @param {string} existing The existing method name that has been used.
+ * @param {string} substitute The Reflect substitute that should be used.
+ * @returns {void}
+ */
+ function report(node, existing, substitute) {
+ context.report({
+ node,
+ message: "Avoid using {{existing}}, instead use {{substitute}}.",
+ data: {
+ existing,
+ substitute
+ }
+ });
+ }
+
+ return {
+ CallExpression(node) {
+ const methodName = (node.callee.property || {}).name;
+ const isReflectCall = (node.callee.object || {}).name === "Reflect";
+ const hasReflectSubsitute = reflectSubsitutes.hasOwnProperty(methodName);
+ const userConfiguredException = exceptions.indexOf(methodName) !== -1;
+
+ if (hasReflectSubsitute && !isReflectCall && !userConfiguredException) {
+ report(node, existingNames[methodName], reflectSubsitutes[methodName]);
+ }
+ },
+ UnaryExpression(node) {
+ const isDeleteOperator = node.operator === "delete";
+ const targetsIdentifier = node.argument.type === "Identifier";
+ const userConfiguredException = exceptions.indexOf("delete") !== -1;
+
+ if (isDeleteOperator && !targetsIdentifier && !userConfiguredException) {
+ report(node, "the delete keyword", "Reflect.deleteProperty");
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/prefer-rest-params.js b/tools/node_modules/eslint/lib/rules/prefer-rest-params.js
new file mode 100644
index 0000000000..03342371b2
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/prefer-rest-params.js
@@ -0,0 +1,111 @@
+/**
+ * @fileoverview Rule to
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Gets the variable object of `arguments` which is defined implicitly.
+ * @param {eslint-scope.Scope} scope - A scope to get.
+ * @returns {eslint-scope.Variable} The found variable object.
+ */
+function getVariableOfArguments(scope) {
+ const variables = scope.variables;
+
+ for (let i = 0; i < variables.length; ++i) {
+ const variable = variables[i];
+
+ if (variable.name === "arguments") {
+
+ /*
+ * If there was a parameter which is named "arguments", the implicit "arguments" is not defined.
+ * So does fast return with null.
+ */
+ return (variable.identifiers.length === 0) ? variable : null;
+ }
+ }
+
+ /* istanbul ignore next : unreachable */
+ return null;
+}
+
+/**
+ * Checks if the given reference is not normal member access.
+ *
+ * - arguments .... true // not member access
+ * - arguments[i] .... true // computed member access
+ * - arguments[0] .... true // computed member access
+ * - arguments.length .... false // normal member access
+ *
+ * @param {eslint-scope.Reference} reference - The reference to check.
+ * @returns {boolean} `true` if the reference is not normal member access.
+ */
+function isNotNormalMemberAccess(reference) {
+ const id = reference.identifier;
+ const parent = id.parent;
+
+ return !(
+ parent.type === "MemberExpression" &&
+ parent.object === id &&
+ !parent.computed
+ );
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require rest parameters instead of `arguments`",
+ category: "ECMAScript 6",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ /**
+ * Reports a given reference.
+ *
+ * @param {eslint-scope.Reference} reference - A reference to report.
+ * @returns {void}
+ */
+ function report(reference) {
+ context.report({
+ node: reference.identifier,
+ loc: reference.identifier.loc,
+ message: "Use the rest parameters instead of 'arguments'."
+ });
+ }
+
+ /**
+ * Reports references of the implicit `arguments` variable if exist.
+ *
+ * @returns {void}
+ */
+ function checkForArguments() {
+ const argumentsVar = getVariableOfArguments(context.getScope());
+
+ if (argumentsVar) {
+ argumentsVar
+ .references
+ .filter(isNotNormalMemberAccess)
+ .forEach(report);
+ }
+ }
+
+ return {
+ "FunctionDeclaration:exit": checkForArguments,
+ "FunctionExpression:exit": checkForArguments
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/prefer-spread.js b/tools/node_modules/eslint/lib/rules/prefer-spread.js
new file mode 100644
index 0000000000..c111d5f98e
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/prefer-spread.js
@@ -0,0 +1,96 @@
+/**
+ * @fileoverview A rule to suggest using of the spread operator instead of `.apply()`.
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Checks whether or not a node is a `.apply()` for variadic.
+ * @param {ASTNode} node - A CallExpression node to check.
+ * @returns {boolean} Whether or not the node is a `.apply()` for variadic.
+ */
+function isVariadicApplyCalling(node) {
+ return (
+ node.callee.type === "MemberExpression" &&
+ node.callee.property.type === "Identifier" &&
+ node.callee.property.name === "apply" &&
+ node.callee.computed === false &&
+ node.arguments.length === 2 &&
+ node.arguments[1].type !== "ArrayExpression" &&
+ node.arguments[1].type !== "SpreadElement"
+ );
+}
+
+
+/**
+ * Checks whether or not `thisArg` is not changed by `.apply()`.
+ * @param {ASTNode|null} expectedThis - The node that is the owner of the applied function.
+ * @param {ASTNode} thisArg - The node that is given to the first argument of the `.apply()`.
+ * @param {RuleContext} context - The ESLint rule context object.
+ * @returns {boolean} Whether or not `thisArg` is not changed by `.apply()`.
+ */
+function isValidThisArg(expectedThis, thisArg, context) {
+ if (!expectedThis) {
+ return astUtils.isNullOrUndefined(thisArg);
+ }
+ return astUtils.equalTokens(expectedThis, thisArg, context);
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require spread operators instead of `.apply()`",
+ category: "ECMAScript 6",
+ recommended: false
+ },
+
+ schema: [],
+
+ fixable: "code"
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+
+ return {
+ CallExpression(node) {
+ if (!isVariadicApplyCalling(node)) {
+ return;
+ }
+
+ const applied = node.callee.object;
+ const expectedThis = (applied.type === "MemberExpression") ? applied.object : null;
+ const thisArg = node.arguments[0];
+
+ if (isValidThisArg(expectedThis, thisArg, sourceCode)) {
+ context.report({
+ node,
+ message: "Use the spread operator instead of '.apply()'.",
+ fix(fixer) {
+ if (expectedThis && expectedThis.type !== "Identifier") {
+
+ // Don't fix cases where the `this` value could be a computed expression.
+ return null;
+ }
+
+ const propertyDot = sourceCode.getFirstTokenBetween(applied, node.callee.property, token => token.value === ".");
+
+ return fixer.replaceTextRange([propertyDot.range[0], node.range[1]], `(...${sourceCode.getText(node.arguments[1])})`);
+ }
+ });
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/prefer-template.js b/tools/node_modules/eslint/lib/rules/prefer-template.js
new file mode 100644
index 0000000000..076ce6a3ea
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/prefer-template.js
@@ -0,0 +1,232 @@
+/**
+ * @fileoverview A rule to suggest using template literals instead of string concatenation.
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Checks whether or not a given node is a concatenation.
+ * @param {ASTNode} node - A node to check.
+ * @returns {boolean} `true` if the node is a concatenation.
+ */
+function isConcatenation(node) {
+ return node.type === "BinaryExpression" && node.operator === "+";
+}
+
+/**
+ * Gets the top binary expression node for concatenation in parents of a given node.
+ * @param {ASTNode} node - A node to get.
+ * @returns {ASTNode} the top binary expression node in parents of a given node.
+ */
+function getTopConcatBinaryExpression(node) {
+ while (isConcatenation(node.parent)) {
+ node = node.parent;
+ }
+ return node;
+}
+
+/**
+ * Checks whether or not a given binary expression has string literals.
+ * @param {ASTNode} node - A node to check.
+ * @returns {boolean} `true` if the node has string literals.
+ */
+function hasStringLiteral(node) {
+ if (isConcatenation(node)) {
+
+ // `left` is deeper than `right` normally.
+ return hasStringLiteral(node.right) || hasStringLiteral(node.left);
+ }
+ return astUtils.isStringLiteral(node);
+}
+
+/**
+ * Checks whether or not a given binary expression has non string literals.
+ * @param {ASTNode} node - A node to check.
+ * @returns {boolean} `true` if the node has non string literals.
+ */
+function hasNonStringLiteral(node) {
+ if (isConcatenation(node)) {
+
+ // `left` is deeper than `right` normally.
+ return hasNonStringLiteral(node.right) || hasNonStringLiteral(node.left);
+ }
+ return !astUtils.isStringLiteral(node);
+}
+
+/**
+ * Determines whether a given node will start with a template curly expression (`${}`) when being converted to a template literal.
+ * @param {ASTNode} node The node that will be fixed to a template literal
+ * @returns {boolean} `true` if the node will start with a template curly.
+ */
+function startsWithTemplateCurly(node) {
+ if (node.type === "BinaryExpression") {
+ return startsWithTemplateCurly(node.left);
+ }
+ if (node.type === "TemplateLiteral") {
+ return node.expressions.length && node.quasis.length && node.quasis[0].range[0] === node.quasis[0].range[1];
+ }
+ return node.type !== "Literal" || typeof node.value !== "string";
+}
+
+/**
+ * Determines whether a given node end with a template curly expression (`${}`) when being converted to a template literal.
+ * @param {ASTNode} node The node that will be fixed to a template literal
+ * @returns {boolean} `true` if the node will end with a template curly.
+ */
+function endsWithTemplateCurly(node) {
+ if (node.type === "BinaryExpression") {
+ return startsWithTemplateCurly(node.right);
+ }
+ if (node.type === "TemplateLiteral") {
+ return node.expressions.length && node.quasis.length && node.quasis[node.quasis.length - 1].range[0] === node.quasis[node.quasis.length - 1].range[1];
+ }
+ return node.type !== "Literal" || typeof node.value !== "string";
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require template literals instead of string concatenation",
+ category: "ECMAScript 6",
+ recommended: false
+ },
+
+ schema: [],
+
+ fixable: "code"
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+ let done = Object.create(null);
+
+ /**
+ * Gets the non-token text between two nodes, ignoring any other tokens that appear between the two tokens.
+ * @param {ASTNode} node1 The first node
+ * @param {ASTNode} node2 The second node
+ * @returns {string} The text between the nodes, excluding other tokens
+ */
+ function getTextBetween(node1, node2) {
+ const allTokens = [node1].concat(sourceCode.getTokensBetween(node1, node2)).concat(node2);
+ const sourceText = sourceCode.getText();
+
+ return allTokens.slice(0, -1).reduce((accumulator, token, index) => accumulator + sourceText.slice(token.range[1], allTokens[index + 1].range[0]), "");
+ }
+
+ /**
+ * Returns a template literal form of the given node.
+ * @param {ASTNode} currentNode A node that should be converted to a template literal
+ * @param {string} textBeforeNode Text that should appear before the node
+ * @param {string} textAfterNode Text that should appear after the node
+ * @returns {string} A string form of this node, represented as a template literal
+ */
+ function getTemplateLiteral(currentNode, textBeforeNode, textAfterNode) {
+ if (currentNode.type === "Literal" && typeof currentNode.value === "string") {
+
+ /*
+ * If the current node is a string literal, escape any instances of ${ or ` to prevent them from being interpreted
+ * as a template placeholder. However, if the code already contains a backslash before the ${ or `
+ * for some reason, don't add another backslash, because that would change the meaning of the code (it would cause
+ * an actual backslash character to appear before the dollar sign).
+ */
+ return `\`${currentNode.raw.slice(1, -1).replace(/\\*(\${|`)/g, matched => {
+ if (matched.lastIndexOf("\\") % 2) {
+ return `\\${matched}`;
+ }
+ return matched;
+
+ // Unescape any quotes that appear in the original Literal that no longer need to be escaped.
+ }).replace(new RegExp(`\\\\${currentNode.raw[0]}`, "g"), currentNode.raw[0])}\``;
+ }
+
+ if (currentNode.type === "TemplateLiteral") {
+ return sourceCode.getText(currentNode);
+ }
+
+ if (isConcatenation(currentNode) && hasStringLiteral(currentNode) && hasNonStringLiteral(currentNode)) {
+ const plusSign = sourceCode.getFirstTokenBetween(currentNode.left, currentNode.right, token => token.value === "+");
+ const textBeforePlus = getTextBetween(currentNode.left, plusSign);
+ const textAfterPlus = getTextBetween(plusSign, currentNode.right);
+ const leftEndsWithCurly = endsWithTemplateCurly(currentNode.left);
+ const rightStartsWithCurly = startsWithTemplateCurly(currentNode.right);
+
+ if (leftEndsWithCurly) {
+
+ // If the left side of the expression ends with a template curly, add the extra text to the end of the curly bracket.
+ // `foo${bar}` /* comment */ + 'baz' --> `foo${bar /* comment */ }${baz}`
+ return getTemplateLiteral(currentNode.left, textBeforeNode, textBeforePlus + textAfterPlus).slice(0, -1) +
+ getTemplateLiteral(currentNode.right, null, textAfterNode).slice(1);
+ }
+ if (rightStartsWithCurly) {
+
+ // Otherwise, if the right side of the expression starts with a template curly, add the text there.
+ // 'foo' /* comment */ + `${bar}baz` --> `foo${ /* comment */ bar}baz`
+ return getTemplateLiteral(currentNode.left, textBeforeNode, null).slice(0, -1) +
+ getTemplateLiteral(currentNode.right, textBeforePlus + textAfterPlus, textAfterNode).slice(1);
+ }
+
+ /*
+ * Otherwise, these nodes should not be combined into a template curly, since there is nowhere to put
+ * the text between them.
+ */
+ return `${getTemplateLiteral(currentNode.left, textBeforeNode, null)}${textBeforePlus}+${textAfterPlus}${getTemplateLiteral(currentNode.right, textAfterNode, null)}`;
+ }
+
+ return `\`\${${textBeforeNode || ""}${sourceCode.getText(currentNode)}${textAfterNode || ""}}\``;
+ }
+
+ /**
+ * Reports if a given node is string concatenation with non string literals.
+ *
+ * @param {ASTNode} node - A node to check.
+ * @returns {void}
+ */
+ function checkForStringConcat(node) {
+ if (!astUtils.isStringLiteral(node) || !isConcatenation(node.parent)) {
+ return;
+ }
+
+ const topBinaryExpr = getTopConcatBinaryExpression(node.parent);
+
+ // Checks whether or not this node had been checked already.
+ if (done[topBinaryExpr.range[0]]) {
+ return;
+ }
+ done[topBinaryExpr.range[0]] = true;
+
+ if (hasNonStringLiteral(topBinaryExpr)) {
+ context.report({
+ node: topBinaryExpr,
+ message: "Unexpected string concatenation.",
+ fix(fixer) {
+ return fixer.replaceText(topBinaryExpr, getTemplateLiteral(topBinaryExpr, null, null));
+ }
+ });
+ }
+ }
+
+ return {
+ Program() {
+ done = Object.create(null);
+ },
+
+ Literal: checkForStringConcat,
+ TemplateLiteral: checkForStringConcat
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/quote-props.js b/tools/node_modules/eslint/lib/rules/quote-props.js
new file mode 100644
index 0000000000..6ac1f3c138
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/quote-props.js
@@ -0,0 +1,298 @@
+/**
+ * @fileoverview Rule to flag non-quoted property names in object literals.
+ * @author Mathias Bynens <http://mathiasbynens.be/>
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const espree = require("espree"),
+ keywords = require("../util/keywords");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require quotes around object literal property names",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: {
+ anyOf: [
+ {
+ type: "array",
+ items: [
+ {
+ enum: ["always", "as-needed", "consistent", "consistent-as-needed"]
+ }
+ ],
+ minItems: 0,
+ maxItems: 1
+ },
+ {
+ type: "array",
+ items: [
+ {
+ enum: ["always", "as-needed", "consistent", "consistent-as-needed"]
+ },
+ {
+ type: "object",
+ properties: {
+ keywords: {
+ type: "boolean"
+ },
+ unnecessary: {
+ type: "boolean"
+ },
+ numbers: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ],
+ minItems: 0,
+ maxItems: 2
+ }
+ ]
+ },
+
+ fixable: "code"
+ },
+
+ create(context) {
+
+ const MODE = context.options[0],
+ KEYWORDS = context.options[1] && context.options[1].keywords,
+ CHECK_UNNECESSARY = !context.options[1] || context.options[1].unnecessary !== false,
+ NUMBERS = context.options[1] && context.options[1].numbers,
+
+ MESSAGE_UNNECESSARY = "Unnecessarily quoted property '{{property}}' found.",
+ MESSAGE_UNQUOTED = "Unquoted property '{{property}}' found.",
+ MESSAGE_NUMERIC = "Unquoted number literal '{{property}}' used as key.",
+ MESSAGE_RESERVED = "Unquoted reserved word '{{property}}' used as key.",
+ sourceCode = context.getSourceCode();
+
+
+ /**
+ * Checks whether a certain string constitutes an ES3 token
+ * @param {string} tokenStr - The string to be checked.
+ * @returns {boolean} `true` if it is an ES3 token.
+ */
+ function isKeyword(tokenStr) {
+ return keywords.indexOf(tokenStr) >= 0;
+ }
+
+ /**
+ * Checks if an espree-tokenized key has redundant quotes (i.e. whether quotes are unnecessary)
+ * @param {string} rawKey The raw key value from the source
+ * @param {espreeTokens} tokens The espree-tokenized node key
+ * @param {boolean} [skipNumberLiterals=false] Indicates whether number literals should be checked
+ * @returns {boolean} Whether or not a key has redundant quotes.
+ * @private
+ */
+ function areQuotesRedundant(rawKey, tokens, skipNumberLiterals) {
+ return tokens.length === 1 && tokens[0].start === 0 && tokens[0].end === rawKey.length &&
+ (["Identifier", "Keyword", "Null", "Boolean"].indexOf(tokens[0].type) >= 0 ||
+ (tokens[0].type === "Numeric" && !skipNumberLiterals && String(+tokens[0].value) === tokens[0].value));
+ }
+
+ /**
+ * Returns a string representation of a property node with quotes removed
+ * @param {ASTNode} key Key AST Node, which may or may not be quoted
+ * @returns {string} A replacement string for this property
+ */
+ function getUnquotedKey(key) {
+ return key.type === "Identifier" ? key.name : key.value;
+ }
+
+ /**
+ * Returns a string representation of a property node with quotes added
+ * @param {ASTNode} key Key AST Node, which may or may not be quoted
+ * @returns {string} A replacement string for this property
+ */
+ function getQuotedKey(key) {
+ if (key.type === "Literal" && typeof key.value === "string") {
+
+ // If the key is already a string literal, don't replace the quotes with double quotes.
+ return sourceCode.getText(key);
+ }
+
+ // Otherwise, the key is either an identifier or a number literal.
+ return `"${key.type === "Identifier" ? key.name : key.value}"`;
+ }
+
+ /**
+ * Ensures that a property's key is quoted only when necessary
+ * @param {ASTNode} node Property AST node
+ * @returns {void}
+ */
+ function checkUnnecessaryQuotes(node) {
+ const key = node.key;
+
+ if (node.method || node.computed || node.shorthand) {
+ return;
+ }
+
+ if (key.type === "Literal" && typeof key.value === "string") {
+ let tokens;
+
+ try {
+ tokens = espree.tokenize(key.value);
+ } catch (e) {
+ return;
+ }
+
+ if (tokens.length !== 1) {
+ return;
+ }
+
+ const isKeywordToken = isKeyword(tokens[0].value);
+
+ if (isKeywordToken && KEYWORDS) {
+ return;
+ }
+
+ if (CHECK_UNNECESSARY && areQuotesRedundant(key.value, tokens, NUMBERS)) {
+ context.report({
+ node,
+ message: MESSAGE_UNNECESSARY,
+ data: { property: key.value },
+ fix: fixer => fixer.replaceText(key, getUnquotedKey(key))
+ });
+ }
+ } else if (KEYWORDS && key.type === "Identifier" && isKeyword(key.name)) {
+ context.report({
+ node,
+ message: MESSAGE_RESERVED,
+ data: { property: key.name },
+ fix: fixer => fixer.replaceText(key, getQuotedKey(key))
+ });
+ } else if (NUMBERS && key.type === "Literal" && typeof key.value === "number") {
+ context.report({
+ node,
+ message: MESSAGE_NUMERIC,
+ data: { property: key.value },
+ fix: fixer => fixer.replaceText(key, getQuotedKey(key))
+ });
+ }
+ }
+
+ /**
+ * Ensures that a property's key is quoted
+ * @param {ASTNode} node Property AST node
+ * @returns {void}
+ */
+ function checkOmittedQuotes(node) {
+ const key = node.key;
+
+ if (!node.method && !node.computed && !node.shorthand && !(key.type === "Literal" && typeof key.value === "string")) {
+ context.report({
+ node,
+ message: MESSAGE_UNQUOTED,
+ data: { property: key.name || key.value },
+ fix: fixer => fixer.replaceText(key, getQuotedKey(key))
+ });
+ }
+ }
+
+ /**
+ * Ensures that an object's keys are consistently quoted, optionally checks for redundancy of quotes
+ * @param {ASTNode} node Property AST node
+ * @param {boolean} checkQuotesRedundancy Whether to check quotes' redundancy
+ * @returns {void}
+ */
+ function checkConsistency(node, checkQuotesRedundancy) {
+ const quotedProps = [],
+ unquotedProps = [];
+ let keywordKeyName = null,
+ necessaryQuotes = false;
+
+ node.properties.forEach(property => {
+ const key = property.key;
+
+ if (!key || property.method || property.computed || property.shorthand) {
+ return;
+ }
+
+ if (key.type === "Literal" && typeof key.value === "string") {
+
+ quotedProps.push(property);
+
+ if (checkQuotesRedundancy) {
+ let tokens;
+
+ try {
+ tokens = espree.tokenize(key.value);
+ } catch (e) {
+ necessaryQuotes = true;
+ return;
+ }
+
+ necessaryQuotes = necessaryQuotes || !areQuotesRedundant(key.value, tokens) || KEYWORDS && isKeyword(tokens[0].value);
+ }
+ } else if (KEYWORDS && checkQuotesRedundancy && key.type === "Identifier" && isKeyword(key.name)) {
+ unquotedProps.push(property);
+ necessaryQuotes = true;
+ keywordKeyName = key.name;
+ } else {
+ unquotedProps.push(property);
+ }
+ });
+
+ if (checkQuotesRedundancy && quotedProps.length && !necessaryQuotes) {
+ quotedProps.forEach(property => {
+ context.report({
+ node: property,
+ message: "Properties shouldn't be quoted as all quotes are redundant.",
+ fix: fixer => fixer.replaceText(property.key, getUnquotedKey(property.key))
+ });
+ });
+ } else if (unquotedProps.length && keywordKeyName) {
+ unquotedProps.forEach(property => {
+ context.report({
+ node: property,
+ message: "Properties should be quoted as '{{property}}' is a reserved word.",
+ data: { property: keywordKeyName },
+ fix: fixer => fixer.replaceText(property.key, getQuotedKey(property.key))
+ });
+ });
+ } else if (quotedProps.length && unquotedProps.length) {
+ unquotedProps.forEach(property => {
+ context.report({
+ node: property,
+ message: "Inconsistently quoted property '{{key}}' found.",
+ data: { key: property.key.name || property.key.value },
+ fix: fixer => fixer.replaceText(property.key, getQuotedKey(property.key))
+ });
+ });
+ }
+ }
+
+ return {
+ Property(node) {
+ if (MODE === "always" || !MODE) {
+ checkOmittedQuotes(node);
+ }
+ if (MODE === "as-needed") {
+ checkUnnecessaryQuotes(node);
+ }
+ },
+ ObjectExpression(node) {
+ if (MODE === "consistent") {
+ checkConsistency(node, false);
+ }
+ if (MODE === "consistent-as-needed") {
+ checkConsistency(node, true);
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/quotes.js b/tools/node_modules/eslint/lib/rules/quotes.js
new file mode 100644
index 0000000000..914762727b
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/quotes.js
@@ -0,0 +1,296 @@
+/**
+ * @fileoverview A rule to choose between single and double quote marks
+ * @author Matt DuVall <http://www.mattduvall.com/>, Brandon Payton
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Constants
+//------------------------------------------------------------------------------
+
+const QUOTE_SETTINGS = {
+ double: {
+ quote: "\"",
+ alternateQuote: "'",
+ description: "doublequote"
+ },
+ single: {
+ quote: "'",
+ alternateQuote: "\"",
+ description: "singlequote"
+ },
+ backtick: {
+ quote: "`",
+ alternateQuote: "\"",
+ description: "backtick"
+ }
+};
+
+// An unescaped newline is a newline preceded by an even number of backslashes.
+const UNESCAPED_LINEBREAK_PATTERN = new RegExp(String.raw`(^|[^\\])(\\\\)*[${Array.from(astUtils.LINEBREAKS).join("")}]`);
+
+/**
+ * Switches quoting of javascript string between ' " and `
+ * escaping and unescaping as necessary.
+ * Only escaping of the minimal set of characters is changed.
+ * Note: escaping of newlines when switching from backtick to other quotes is not handled.
+ * @param {string} str - A string to convert.
+ * @returns {string} The string with changed quotes.
+ * @private
+ */
+QUOTE_SETTINGS.double.convert =
+QUOTE_SETTINGS.single.convert =
+QUOTE_SETTINGS.backtick.convert = function(str) {
+ const newQuote = this.quote;
+ const oldQuote = str[0];
+
+ if (newQuote === oldQuote) {
+ return str;
+ }
+ return newQuote + str.slice(1, -1).replace(/\\(\${|\r\n?|\n|.)|["'`]|\${|(\r\n?|\n)/g, (match, escaped, newline) => {
+ if (escaped === oldQuote || oldQuote === "`" && escaped === "${") {
+ return escaped; // unescape
+ }
+ if (match === newQuote || newQuote === "`" && match === "${") {
+ return `\\${match}`; // escape
+ }
+ if (newline && oldQuote === "`") {
+ return "\\n"; // escape newlines
+ }
+ return match;
+ }) + newQuote;
+};
+
+const AVOID_ESCAPE = "avoid-escape";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce the consistent use of either backticks, double, or single quotes",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ fixable: "code",
+
+ schema: [
+ {
+ enum: ["single", "double", "backtick"]
+ },
+ {
+ anyOf: [
+ {
+ enum: ["avoid-escape"]
+ },
+ {
+ type: "object",
+ properties: {
+ avoidEscape: {
+ type: "boolean"
+ },
+ allowTemplateLiterals: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ }
+ ]
+ },
+
+ create(context) {
+
+ const quoteOption = context.options[0],
+ settings = QUOTE_SETTINGS[quoteOption || "double"],
+ options = context.options[1],
+ allowTemplateLiterals = options && options.allowTemplateLiterals === true,
+ sourceCode = context.getSourceCode();
+ let avoidEscape = options && options.avoidEscape === true;
+
+ // deprecated
+ if (options === AVOID_ESCAPE) {
+ avoidEscape = true;
+ }
+
+ /**
+ * Determines if a given node is part of JSX syntax.
+ *
+ * This function returns `true` in the following cases:
+ *
+ * - `<div className="foo"></div>` ... If the literal is an attribute value, the parent of the literal is `JSXAttribute`.
+ * - `<div>foo</div>` ... If the literal is a text content, the parent of the literal is `JSXElement`.
+ *
+ * In particular, this function returns `false` in the following cases:
+ *
+ * - `<div className={"foo"}></div>`
+ * - `<div>{"foo"}</div>`
+ *
+ * In both cases, inside of the braces is handled as normal JavaScript.
+ * The braces are `JSXExpressionContainer` nodes.
+ *
+ * @param {ASTNode} node The Literal node to check.
+ * @returns {boolean} True if the node is a part of JSX, false if not.
+ * @private
+ */
+ function isJSXLiteral(node) {
+ return node.parent.type === "JSXAttribute" || node.parent.type === "JSXElement";
+ }
+
+ /**
+ * Checks whether or not a given node is a directive.
+ * The directive is a `ExpressionStatement` which has only a string literal.
+ * @param {ASTNode} node - A node to check.
+ * @returns {boolean} Whether or not the node is a directive.
+ * @private
+ */
+ function isDirective(node) {
+ return (
+ node.type === "ExpressionStatement" &&
+ node.expression.type === "Literal" &&
+ typeof node.expression.value === "string"
+ );
+ }
+
+ /**
+ * Checks whether or not a given node is a part of directive prologues.
+ * See also: http://www.ecma-international.org/ecma-262/6.0/#sec-directive-prologues-and-the-use-strict-directive
+ * @param {ASTNode} node - A node to check.
+ * @returns {boolean} Whether or not the node is a part of directive prologues.
+ * @private
+ */
+ function isPartOfDirectivePrologue(node) {
+ const block = node.parent.parent;
+
+ if (block.type !== "Program" && (block.type !== "BlockStatement" || !astUtils.isFunction(block.parent))) {
+ return false;
+ }
+
+ // Check the node is at a prologue.
+ for (let i = 0; i < block.body.length; ++i) {
+ const statement = block.body[i];
+
+ if (statement === node.parent) {
+ return true;
+ }
+ if (!isDirective(statement)) {
+ break;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Checks whether or not a given node is allowed as non backtick.
+ * @param {ASTNode} node - A node to check.
+ * @returns {boolean} Whether or not the node is allowed as non backtick.
+ * @private
+ */
+ function isAllowedAsNonBacktick(node) {
+ const parent = node.parent;
+
+ switch (parent.type) {
+
+ // Directive Prologues.
+ case "ExpressionStatement":
+ return isPartOfDirectivePrologue(node);
+
+ // LiteralPropertyName.
+ case "Property":
+ case "MethodDefinition":
+ return parent.key === node && !parent.computed;
+
+ // ModuleSpecifier.
+ case "ImportDeclaration":
+ case "ExportNamedDeclaration":
+ case "ExportAllDeclaration":
+ return parent.source === node;
+
+ // Others don't allow.
+ default:
+ return false;
+ }
+ }
+
+ return {
+
+ Literal(node) {
+ const val = node.value,
+ rawVal = node.raw;
+
+ if (settings && typeof val === "string") {
+ let isValid = (quoteOption === "backtick" && isAllowedAsNonBacktick(node)) ||
+ isJSXLiteral(node) ||
+ astUtils.isSurroundedBy(rawVal, settings.quote);
+
+ if (!isValid && avoidEscape) {
+ isValid = astUtils.isSurroundedBy(rawVal, settings.alternateQuote) && rawVal.indexOf(settings.quote) >= 0;
+ }
+
+ if (!isValid) {
+ context.report({
+ node,
+ message: "Strings must use {{description}}.",
+ data: {
+ description: settings.description
+ },
+ fix(fixer) {
+ return fixer.replaceText(node, settings.convert(node.raw));
+ }
+ });
+ }
+ }
+ },
+
+ TemplateLiteral(node) {
+
+ // If backticks are expected or it's a tagged template, then this shouldn't throw an errors
+ if (
+ allowTemplateLiterals ||
+ quoteOption === "backtick" ||
+ node.parent.type === "TaggedTemplateExpression" && node === node.parent.quasi
+ ) {
+ return;
+ }
+
+ // A warning should be produced if the template literal only has one TemplateElement, and has no unescaped newlines.
+ const shouldWarn = node.quasis.length === 1 && !UNESCAPED_LINEBREAK_PATTERN.test(node.quasis[0].value.raw);
+
+ if (shouldWarn) {
+ context.report({
+ node,
+ message: "Strings must use {{description}}.",
+ data: {
+ description: settings.description
+ },
+ fix(fixer) {
+ if (isPartOfDirectivePrologue(node)) {
+
+ /*
+ * TemplateLiterals in a directive prologue aren't actually directives, but if they're
+ * in the directive prologue, then fixing them might turn them into directives and change
+ * the behavior of the code.
+ */
+ return null;
+ }
+ return fixer.replaceText(node, settings.convert(sourceCode.getText(node)));
+ }
+ });
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/radix.js b/tools/node_modules/eslint/lib/rules/radix.js
new file mode 100644
index 0000000000..0484c3bfb3
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/radix.js
@@ -0,0 +1,171 @@
+/**
+ * @fileoverview Rule to flag use of parseInt without a radix argument
+ * @author James Allardice
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+const MODE_ALWAYS = "always",
+ MODE_AS_NEEDED = "as-needed";
+
+/**
+ * Checks whether a given variable is shadowed or not.
+ *
+ * @param {eslint-scope.Variable} variable - A variable to check.
+ * @returns {boolean} `true` if the variable is shadowed.
+ */
+function isShadowed(variable) {
+ return variable.defs.length >= 1;
+}
+
+/**
+ * Checks whether a given node is a MemberExpression of `parseInt` method or not.
+ *
+ * @param {ASTNode} node - A node to check.
+ * @returns {boolean} `true` if the node is a MemberExpression of `parseInt`
+ * method.
+ */
+function isParseIntMethod(node) {
+ return (
+ node.type === "MemberExpression" &&
+ !node.computed &&
+ node.property.type === "Identifier" &&
+ node.property.name === "parseInt"
+ );
+}
+
+/**
+ * Checks whether a given node is a valid value of radix or not.
+ *
+ * The following values are invalid.
+ *
+ * - A literal except numbers.
+ * - undefined.
+ *
+ * @param {ASTNode} radix - A node of radix to check.
+ * @returns {boolean} `true` if the node is valid.
+ */
+function isValidRadix(radix) {
+ return !(
+ (radix.type === "Literal" && typeof radix.value !== "number") ||
+ (radix.type === "Identifier" && radix.name === "undefined")
+ );
+}
+
+/**
+ * Checks whether a given node is a default value of radix or not.
+ *
+ * @param {ASTNode} radix - A node of radix to check.
+ * @returns {boolean} `true` if the node is the literal node of `10`.
+ */
+function isDefaultRadix(radix) {
+ return radix.type === "Literal" && radix.value === 10;
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce the consistent use of the radix argument when using `parseInt()`",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: [
+ {
+ enum: ["always", "as-needed"]
+ }
+ ]
+ },
+
+ create(context) {
+ const mode = context.options[0] || MODE_ALWAYS;
+
+ /**
+ * Checks the arguments of a given CallExpression node and reports it if it
+ * offends this rule.
+ *
+ * @param {ASTNode} node - A CallExpression node to check.
+ * @returns {void}
+ */
+ function checkArguments(node) {
+ const args = node.arguments;
+
+ switch (args.length) {
+ case 0:
+ context.report({
+ node,
+ message: "Missing parameters."
+ });
+ break;
+
+ case 1:
+ if (mode === MODE_ALWAYS) {
+ context.report({
+ node,
+ message: "Missing radix parameter."
+ });
+ }
+ break;
+
+ default:
+ if (mode === MODE_AS_NEEDED && isDefaultRadix(args[1])) {
+ context.report({
+ node,
+ message: "Redundant radix parameter."
+ });
+ } else if (!isValidRadix(args[1])) {
+ context.report({
+ node,
+ message: "Invalid radix parameter."
+ });
+ }
+ break;
+ }
+ }
+
+ return {
+ "Program:exit"() {
+ const scope = context.getScope();
+ let variable;
+
+ // Check `parseInt()`
+ variable = astUtils.getVariableByName(scope, "parseInt");
+ if (!isShadowed(variable)) {
+ variable.references.forEach(reference => {
+ const node = reference.identifier;
+
+ if (astUtils.isCallee(node)) {
+ checkArguments(node.parent);
+ }
+ });
+ }
+
+ // Check `Number.parseInt()`
+ variable = astUtils.getVariableByName(scope, "Number");
+ if (!isShadowed(variable)) {
+ variable.references.forEach(reference => {
+ const node = reference.identifier.parent;
+
+ if (isParseIntMethod(node) && astUtils.isCallee(node)) {
+ checkArguments(node.parent);
+ }
+ });
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/require-await.js b/tools/node_modules/eslint/lib/rules/require-await.js
new file mode 100644
index 0000000000..a5698ae058
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/require-await.js
@@ -0,0 +1,95 @@
+/**
+ * @fileoverview Rule to disallow async functions which have no `await` expression.
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Capitalize the 1st letter of the given text.
+ *
+ * @param {string} text - The text to capitalize.
+ * @returns {string} The text that the 1st letter was capitalized.
+ */
+function capitalizeFirstLetter(text) {
+ return text[0].toUpperCase() + text.slice(1);
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "disallow async functions which have no `await` expression",
+ category: "Best Practices",
+ recommended: false
+ },
+ schema: []
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+ let scopeInfo = null;
+
+ /**
+ * Push the scope info object to the stack.
+ *
+ * @returns {void}
+ */
+ function enterFunction() {
+ scopeInfo = {
+ upper: scopeInfo,
+ hasAwait: false
+ };
+ }
+
+ /**
+ * Pop the top scope info object from the stack.
+ * Also, it reports the function if needed.
+ *
+ * @param {ASTNode} node - The node to report.
+ * @returns {void}
+ */
+ function exitFunction(node) {
+ if (node.async && !scopeInfo.hasAwait && !astUtils.isEmptyFunction(node)) {
+ context.report({
+ node,
+ loc: astUtils.getFunctionHeadLoc(node, sourceCode),
+ message: "{{name}} has no 'await' expression.",
+ data: {
+ name: capitalizeFirstLetter(
+ astUtils.getFunctionNameWithKind(node)
+ )
+ }
+ });
+ }
+
+ scopeInfo = scopeInfo.upper;
+ }
+
+ return {
+ FunctionDeclaration: enterFunction,
+ FunctionExpression: enterFunction,
+ ArrowFunctionExpression: enterFunction,
+ "FunctionDeclaration:exit": exitFunction,
+ "FunctionExpression:exit": exitFunction,
+ "ArrowFunctionExpression:exit": exitFunction,
+
+ AwaitExpression() {
+ scopeInfo.hasAwait = true;
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/require-jsdoc.js b/tools/node_modules/eslint/lib/rules/require-jsdoc.js
new file mode 100644
index 0000000000..a02ee3659c
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/require-jsdoc.js
@@ -0,0 +1,105 @@
+/**
+ * @fileoverview Rule to check for jsdoc presence.
+ * @author Gyandeep Singh
+ */
+"use strict";
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require JSDoc comments",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ require: {
+ type: "object",
+ properties: {
+ ClassDeclaration: {
+ type: "boolean"
+ },
+ MethodDefinition: {
+ type: "boolean"
+ },
+ FunctionDeclaration: {
+ type: "boolean"
+ },
+ ArrowFunctionExpression: {
+ type: "boolean"
+ },
+ FunctionExpression: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+ const source = context.getSourceCode();
+ const DEFAULT_OPTIONS = {
+ FunctionDeclaration: true,
+ MethodDefinition: false,
+ ClassDeclaration: false,
+ ArrowFunctionExpression: false,
+ FunctionExpression: false
+ };
+ const options = Object.assign(DEFAULT_OPTIONS, context.options[0] && context.options[0].require || {});
+
+ /**
+ * Report the error message
+ * @param {ASTNode} node node to report
+ * @returns {void}
+ */
+ function report(node) {
+ context.report({ node, message: "Missing JSDoc comment." });
+ }
+
+ /**
+ * Check if the jsdoc comment is present or not.
+ * @param {ASTNode} node node to examine
+ * @returns {void}
+ */
+ function checkJsDoc(node) {
+ const jsdocComment = source.getJSDocComment(node);
+
+ if (!jsdocComment) {
+ report(node);
+ }
+ }
+
+ return {
+ FunctionDeclaration(node) {
+ if (options.FunctionDeclaration) {
+ checkJsDoc(node);
+ }
+ },
+ FunctionExpression(node) {
+ if (
+ (options.MethodDefinition && node.parent.type === "MethodDefinition") ||
+ (options.FunctionExpression && (node.parent.type === "VariableDeclarator" || (node.parent.type === "Property" && node === node.parent.value)))
+ ) {
+ checkJsDoc(node);
+ }
+ },
+ ClassDeclaration(node) {
+ if (options.ClassDeclaration) {
+ checkJsDoc(node);
+ }
+ },
+ ArrowFunctionExpression(node) {
+ if (options.ArrowFunctionExpression && node.parent.type === "VariableDeclarator") {
+ checkJsDoc(node);
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/require-yield.js b/tools/node_modules/eslint/lib/rules/require-yield.js
new file mode 100644
index 0000000000..5cc2944bc6
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/require-yield.js
@@ -0,0 +1,71 @@
+/**
+ * @fileoverview Rule to flag the generator functions that does not have yield.
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require generator functions to contain `yield`",
+ category: "ECMAScript 6",
+ recommended: true
+ },
+
+ schema: []
+ },
+
+ create(context) {
+ const stack = [];
+
+ /**
+ * If the node is a generator function, start counting `yield` keywords.
+ * @param {Node} node - A function node to check.
+ * @returns {void}
+ */
+ function beginChecking(node) {
+ if (node.generator) {
+ stack.push(0);
+ }
+ }
+
+ /**
+ * If the node is a generator function, end counting `yield` keywords, then
+ * reports result.
+ * @param {Node} node - A function node to check.
+ * @returns {void}
+ */
+ function endChecking(node) {
+ if (!node.generator) {
+ return;
+ }
+
+ const countYield = stack.pop();
+
+ if (countYield === 0 && node.body.body.length > 0) {
+ context.report({ node, message: "This generator function does not have 'yield'." });
+ }
+ }
+
+ return {
+ FunctionDeclaration: beginChecking,
+ "FunctionDeclaration:exit": endChecking,
+ FunctionExpression: beginChecking,
+ "FunctionExpression:exit": endChecking,
+
+ // Increases the count of `yield` keyword.
+ YieldExpression() {
+
+ /* istanbul ignore else */
+ if (stack.length > 0) {
+ stack[stack.length - 1] += 1;
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/rest-spread-spacing.js b/tools/node_modules/eslint/lib/rules/rest-spread-spacing.js
new file mode 100644
index 0000000000..91770eca74
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/rest-spread-spacing.js
@@ -0,0 +1,107 @@
+/**
+ * @fileoverview Enforce spacing between rest and spread operators and their expressions.
+ * @author Kai Cataldo
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce spacing between rest and spread operators and their expressions",
+ category: "ECMAScript 6",
+ recommended: false
+ },
+ fixable: "whitespace",
+ schema: [
+ {
+ enum: ["always", "never"]
+ }
+ ]
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode(),
+ alwaysSpace = context.options[0] === "always";
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ /**
+ * Checks whitespace between rest/spread operators and their expressions
+ * @param {ASTNode} node - The node to check
+ * @returns {void}
+ */
+ function checkWhiteSpace(node) {
+ const operator = sourceCode.getFirstToken(node),
+ nextToken = sourceCode.getTokenAfter(operator),
+ hasWhitespace = sourceCode.isSpaceBetweenTokens(operator, nextToken);
+ let type;
+
+ switch (node.type) {
+ case "SpreadElement":
+ type = "spread";
+ break;
+ case "RestElement":
+ type = "rest";
+ break;
+ case "ExperimentalSpreadProperty":
+ type = "spread property";
+ break;
+ case "ExperimentalRestProperty":
+ type = "rest property";
+ break;
+ default:
+ return;
+ }
+
+ if (alwaysSpace && !hasWhitespace) {
+ context.report({
+ node,
+ loc: {
+ line: operator.loc.end.line,
+ column: operator.loc.end.column
+ },
+ message: "Expected whitespace after {{type}} operator.",
+ data: {
+ type
+ },
+ fix(fixer) {
+ return fixer.replaceTextRange([operator.range[1], nextToken.range[0]], " ");
+ }
+ });
+ } else if (!alwaysSpace && hasWhitespace) {
+ context.report({
+ node,
+ loc: {
+ line: operator.loc.end.line,
+ column: operator.loc.end.column
+ },
+ message: "Unexpected whitespace after {{type}} operator.",
+ data: {
+ type
+ },
+ fix(fixer) {
+ return fixer.removeRange([operator.range[1], nextToken.range[0]]);
+ }
+ });
+ }
+ }
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+ SpreadElement: checkWhiteSpace,
+ RestElement: checkWhiteSpace,
+ ExperimentalSpreadProperty: checkWhiteSpace,
+ ExperimentalRestProperty: checkWhiteSpace
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/semi-spacing.js b/tools/node_modules/eslint/lib/rules/semi-spacing.js
new file mode 100644
index 0000000000..fd300e4a37
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/semi-spacing.js
@@ -0,0 +1,211 @@
+/**
+ * @fileoverview Validates spacing before and after semicolon
+ * @author Mathias Schreck
+ */
+
+"use strict";
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce consistent spacing before and after semicolons",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ fixable: "whitespace",
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ before: {
+ type: "boolean"
+ },
+ after: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+
+ const config = context.options[0],
+ sourceCode = context.getSourceCode();
+ let requireSpaceBefore = false,
+ requireSpaceAfter = true;
+
+ if (typeof config === "object") {
+ if (config.hasOwnProperty("before")) {
+ requireSpaceBefore = config.before;
+ }
+ if (config.hasOwnProperty("after")) {
+ requireSpaceAfter = config.after;
+ }
+ }
+
+ /**
+ * Checks if a given token has leading whitespace.
+ * @param {Object} token The token to check.
+ * @returns {boolean} True if the given token has leading space, false if not.
+ */
+ function hasLeadingSpace(token) {
+ const tokenBefore = sourceCode.getTokenBefore(token);
+
+ return tokenBefore && astUtils.isTokenOnSameLine(tokenBefore, token) && sourceCode.isSpaceBetweenTokens(tokenBefore, token);
+ }
+
+ /**
+ * Checks if a given token has trailing whitespace.
+ * @param {Object} token The token to check.
+ * @returns {boolean} True if the given token has trailing space, false if not.
+ */
+ function hasTrailingSpace(token) {
+ const tokenAfter = sourceCode.getTokenAfter(token);
+
+ return tokenAfter && astUtils.isTokenOnSameLine(token, tokenAfter) && sourceCode.isSpaceBetweenTokens(token, tokenAfter);
+ }
+
+ /**
+ * Checks if the given token is the last token in its line.
+ * @param {Token} token The token to check.
+ * @returns {boolean} Whether or not the token is the last in its line.
+ */
+ function isLastTokenInCurrentLine(token) {
+ const tokenAfter = sourceCode.getTokenAfter(token);
+
+ return !(tokenAfter && astUtils.isTokenOnSameLine(token, tokenAfter));
+ }
+
+ /**
+ * Checks if the given token is the first token in its line
+ * @param {Token} token The token to check.
+ * @returns {boolean} Whether or not the token is the first in its line.
+ */
+ function isFirstTokenInCurrentLine(token) {
+ const tokenBefore = sourceCode.getTokenBefore(token);
+
+ return !(tokenBefore && astUtils.isTokenOnSameLine(token, tokenBefore));
+ }
+
+ /**
+ * Checks if the next token of a given token is a closing parenthesis.
+ * @param {Token} token The token to check.
+ * @returns {boolean} Whether or not the next token of a given token is a closing parenthesis.
+ */
+ function isBeforeClosingParen(token) {
+ const nextToken = sourceCode.getTokenAfter(token);
+
+ return (nextToken && astUtils.isClosingBraceToken(nextToken) || astUtils.isClosingParenToken(nextToken));
+ }
+
+ /**
+ * Reports if the given token has invalid spacing.
+ * @param {Token} token The semicolon token to check.
+ * @param {ASTNode} node The corresponding node of the token.
+ * @returns {void}
+ */
+ function checkSemicolonSpacing(token, node) {
+ if (astUtils.isSemicolonToken(token)) {
+ const location = token.loc.start;
+
+ if (hasLeadingSpace(token)) {
+ if (!requireSpaceBefore) {
+ context.report({
+ node,
+ loc: location,
+ message: "Unexpected whitespace before semicolon.",
+ fix(fixer) {
+ const tokenBefore = sourceCode.getTokenBefore(token);
+
+ return fixer.removeRange([tokenBefore.range[1], token.range[0]]);
+ }
+ });
+ }
+ } else {
+ if (requireSpaceBefore) {
+ context.report({
+ node,
+ loc: location,
+ message: "Missing whitespace before semicolon.",
+ fix(fixer) {
+ return fixer.insertTextBefore(token, " ");
+ }
+ });
+ }
+ }
+
+ if (!isFirstTokenInCurrentLine(token) && !isLastTokenInCurrentLine(token) && !isBeforeClosingParen(token)) {
+ if (hasTrailingSpace(token)) {
+ if (!requireSpaceAfter) {
+ context.report({
+ node,
+ loc: location,
+ message: "Unexpected whitespace after semicolon.",
+ fix(fixer) {
+ const tokenAfter = sourceCode.getTokenAfter(token);
+
+ return fixer.removeRange([token.range[1], tokenAfter.range[0]]);
+ }
+ });
+ }
+ } else {
+ if (requireSpaceAfter) {
+ context.report({
+ node,
+ loc: location,
+ message: "Missing whitespace after semicolon.",
+ fix(fixer) {
+ return fixer.insertTextAfter(token, " ");
+ }
+ });
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Checks the spacing of the semicolon with the assumption that the last token is the semicolon.
+ * @param {ASTNode} node The node to check.
+ * @returns {void}
+ */
+ function checkNode(node) {
+ const token = sourceCode.getLastToken(node);
+
+ checkSemicolonSpacing(token, node);
+ }
+
+ return {
+ VariableDeclaration: checkNode,
+ ExpressionStatement: checkNode,
+ BreakStatement: checkNode,
+ ContinueStatement: checkNode,
+ DebuggerStatement: checkNode,
+ ReturnStatement: checkNode,
+ ThrowStatement: checkNode,
+ ImportDeclaration: checkNode,
+ ExportNamedDeclaration: checkNode,
+ ExportAllDeclaration: checkNode,
+ ExportDefaultDeclaration: checkNode,
+ ForStatement(node) {
+ if (node.init) {
+ checkSemicolonSpacing(sourceCode.getTokenAfter(node.init), node);
+ }
+
+ if (node.test) {
+ checkSemicolonSpacing(sourceCode.getTokenAfter(node.test), node);
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/semi-style.js b/tools/node_modules/eslint/lib/rules/semi-style.js
new file mode 100644
index 0000000000..41fb39246c
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/semi-style.js
@@ -0,0 +1,143 @@
+/**
+ * @fileoverview Rule to enforce location of semicolons.
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+const SELECTOR = `:matches(${
+ [
+ "BreakStatement", "ContinueStatement", "DebuggerStatement",
+ "DoWhileStatement", "ExportAllDeclaration",
+ "ExportDefaultDeclaration", "ExportNamedDeclaration",
+ "ExpressionStatement", "ImportDeclaration", "ReturnStatement",
+ "ThrowStatement", "VariableDeclaration"
+ ].join(",")
+})`;
+
+/**
+ * Get the child node list of a given node.
+ * This returns `Program#body`, `BlockStatement#body`, or `SwitchCase#consequent`.
+ * This is used to check whether a node is the first/last child.
+ * @param {Node} node A node to get child node list.
+ * @returns {Node[]|null} The child node list.
+ */
+function getChildren(node) {
+ const t = node.type;
+
+ if (t === "BlockStatement" || t === "Program") {
+ return node.body;
+ }
+ if (t === "SwitchCase") {
+ return node.consequent;
+ }
+ return null;
+}
+
+/**
+ * Check whether a given node is the last statement in the parent block.
+ * @param {Node} node A node to check.
+ * @returns {boolean} `true` if the node is the last statement in the parent block.
+ */
+function isLastChild(node) {
+ const t = node.parent.type;
+
+ if (t === "IfStatement" && node.parent.consequent === node && node.parent.alternate) { // before `else` keyword.
+ return true;
+ }
+ if (t === "DoWhileStatement") { // before `while` keyword.
+ return true;
+ }
+ const nodeList = getChildren(node.parent);
+
+ return nodeList !== null && nodeList[nodeList.length - 1] === node; // before `}` or etc.
+}
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce location of semicolons",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+ schema: [{ enum: ["last", "first"] }],
+ fixable: "whitespace"
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+ const option = context.options[0] || "last";
+
+ /**
+ * Check the given semicolon token.
+ * @param {Token} semiToken The semicolon token to check.
+ * @param {"first"|"last"} expected The expected location to check.
+ * @returns {void}
+ */
+ function check(semiToken, expected) {
+ const prevToken = sourceCode.getTokenBefore(semiToken);
+ const nextToken = sourceCode.getTokenAfter(semiToken);
+ const prevIsSameLine = !prevToken || astUtils.isTokenOnSameLine(prevToken, semiToken);
+ const nextIsSameLine = !nextToken || astUtils.isTokenOnSameLine(semiToken, nextToken);
+
+ if ((expected === "last" && !prevIsSameLine) || (expected === "first" && !nextIsSameLine)) {
+ context.report({
+ loc: semiToken.loc,
+ message: "Expected this semicolon to be at {{pos}}.",
+ data: {
+ pos: (expected === "last")
+ ? "the end of the previous line"
+ : "the beginning of the next line"
+ },
+ fix(fixer) {
+ if (prevToken && nextToken && sourceCode.commentsExistBetween(prevToken, nextToken)) {
+ return null;
+ }
+
+ const start = prevToken ? prevToken.range[1] : semiToken.range[0];
+ const end = nextToken ? nextToken.range[0] : semiToken.range[1];
+ const text = (expected === "last") ? ";\n" : "\n;";
+
+ return fixer.replaceTextRange([start, end], text);
+ }
+ });
+ }
+ }
+
+ return {
+ [SELECTOR](node) {
+ if (option === "first" && isLastChild(node)) {
+ return;
+ }
+
+ const lastToken = sourceCode.getLastToken(node);
+
+ if (astUtils.isSemicolonToken(lastToken)) {
+ check(lastToken, option);
+ }
+ },
+
+ ForStatement(node) {
+ const firstSemi = node.init && sourceCode.getTokenAfter(node.init, astUtils.isSemicolonToken);
+ const secondSemi = node.test && sourceCode.getTokenAfter(node.test, astUtils.isSemicolonToken);
+
+ if (firstSemi) {
+ check(firstSemi, "last");
+ }
+ if (secondSemi) {
+ check(secondSemi, "last");
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/semi.js b/tools/node_modules/eslint/lib/rules/semi.js
new file mode 100644
index 0000000000..78b6966dea
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/semi.js
@@ -0,0 +1,325 @@
+/**
+ * @fileoverview Rule to flag missing semicolons.
+ * @author Nicholas C. Zakas
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const FixTracker = require("../util/fix-tracker");
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require or disallow semicolons instead of ASI",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ fixable: "code",
+
+ schema: {
+ anyOf: [
+ {
+ type: "array",
+ items: [
+ {
+ enum: ["never"]
+ },
+ {
+ type: "object",
+ properties: {
+ beforeStatementContinuationChars: {
+ enum: ["always", "any", "never"]
+ }
+ },
+ additionalProperties: false
+ }
+ ],
+ minItems: 0,
+ maxItems: 2
+ },
+ {
+ type: "array",
+ items: [
+ {
+ enum: ["always"]
+ },
+ {
+ type: "object",
+ properties: {
+ omitLastInOneLineBlock: { type: "boolean" }
+ },
+ additionalProperties: false
+ }
+ ],
+ minItems: 0,
+ maxItems: 2
+ }
+ ]
+ }
+ },
+
+ create(context) {
+
+ const OPT_OUT_PATTERN = /^[-[(/+`]/; // One of [(/+-`
+ const options = context.options[1];
+ const never = context.options[0] === "never";
+ const exceptOneLine = Boolean(options && options.omitLastInOneLineBlock);
+ const beforeStatementContinuationChars = (options && options.beforeStatementContinuationChars) || "any";
+ const sourceCode = context.getSourceCode();
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ /**
+ * Reports a semicolon error with appropriate location and message.
+ * @param {ASTNode} node The node with an extra or missing semicolon.
+ * @param {boolean} missing True if the semicolon is missing.
+ * @returns {void}
+ */
+ function report(node, missing) {
+ const lastToken = sourceCode.getLastToken(node);
+ let message,
+ fix,
+ loc = lastToken.loc;
+
+ if (!missing) {
+ message = "Missing semicolon.";
+ loc = loc.end;
+ fix = function(fixer) {
+ return fixer.insertTextAfter(lastToken, ";");
+ };
+ } else {
+ message = "Extra semicolon.";
+ loc = loc.start;
+ fix = function(fixer) {
+
+ /*
+ * Expand the replacement range to include the surrounding
+ * tokens to avoid conflicting with no-extra-semi.
+ * https://github.com/eslint/eslint/issues/7928
+ */
+ return new FixTracker(fixer, sourceCode)
+ .retainSurroundingTokens(lastToken)
+ .remove(lastToken);
+ };
+ }
+
+ context.report({
+ node,
+ loc,
+ message,
+ fix
+ });
+
+ }
+
+ /**
+ * Check whether a given semicolon token is redandant.
+ * @param {Token} semiToken A semicolon token to check.
+ * @returns {boolean} `true` if the next token is `;` or `}`.
+ */
+ function isRedundantSemi(semiToken) {
+ const nextToken = sourceCode.getTokenAfter(semiToken);
+
+ return (
+ !nextToken ||
+ astUtils.isClosingBraceToken(nextToken) ||
+ astUtils.isSemicolonToken(nextToken)
+ );
+ }
+
+ /**
+ * Check whether a given token is the closing brace of an arrow function.
+ * @param {Token} lastToken A token to check.
+ * @returns {boolean} `true` if the token is the closing brace of an arrow function.
+ */
+ function isEndOfArrowBlock(lastToken) {
+ if (!astUtils.isClosingBraceToken(lastToken)) {
+ return false;
+ }
+ const node = sourceCode.getNodeByRangeIndex(lastToken.range[0]);
+
+ return (
+ node.type === "BlockStatement" &&
+ node.parent.type === "ArrowFunctionExpression"
+ );
+ }
+
+ /**
+ * Check whether a given node is on the same line with the next token.
+ * @param {Node} node A statement node to check.
+ * @returns {boolean} `true` if the node is on the same line with the next token.
+ */
+ function isOnSameLineWithNextToken(node) {
+ const prevToken = sourceCode.getLastToken(node, 1);
+ const nextToken = sourceCode.getTokenAfter(node);
+
+ return !!nextToken && astUtils.isTokenOnSameLine(prevToken, nextToken);
+ }
+
+ /**
+ * Check whether a given node can connect the next line if the next line is unreliable.
+ * @param {Node} node A statement node to check.
+ * @returns {boolean} `true` if the node can connect the next line.
+ */
+ function maybeAsiHazardAfter(node) {
+ const t = node.type;
+
+ if (t === "DoWhileStatement" ||
+ t === "BreakStatement" ||
+ t === "ContinueStatement" ||
+ t === "DebuggerStatement" ||
+ t === "ImportDeclaration" ||
+ t === "ExportAllDeclaration"
+ ) {
+ return false;
+ }
+ if (t === "ReturnStatement") {
+ return Boolean(node.argument);
+ }
+ if (t === "ExportNamedDeclaration") {
+ return Boolean(node.declaration);
+ }
+ if (isEndOfArrowBlock(sourceCode.getLastToken(node, 1))) {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Check whether a given token can connect the previous statement.
+ * @param {Token} token A token to check.
+ * @returns {boolean} `true` if the token is one of `[`, `(`, `/`, `+`, `-`, ```, `++`, and `--`.
+ */
+ function maybeAsiHazardBefore(token) {
+ return (
+ Boolean(token) &&
+ OPT_OUT_PATTERN.test(token.value) &&
+ token.value !== "++" &&
+ token.value !== "--"
+ );
+ }
+
+ /**
+ * Check if the semicolon of a given node is unnecessary, only true if:
+ * - next token is a valid statement divider (`;` or `}`).
+ * - next token is on a new line and the node is not connectable to the new line.
+ * @param {Node} node A statement node to check.
+ * @returns {boolean} whether the semicolon is unnecessary.
+ */
+ function canRemoveSemicolon(node) {
+ if (isRedundantSemi(sourceCode.getLastToken(node))) {
+ return true; // `;;` or `;}`
+ }
+ if (isOnSameLineWithNextToken(node)) {
+ return false; // One liner.
+ }
+ if (beforeStatementContinuationChars === "never" && !maybeAsiHazardAfter(node)) {
+ return true; // ASI works. This statement doesn't connect to the next.
+ }
+ if (!maybeAsiHazardBefore(sourceCode.getTokenAfter(node))) {
+ return true; // ASI works. The next token doesn't connect to this statement.
+ }
+
+ return false;
+ }
+
+ /**
+ * Checks a node to see if it's in a one-liner block statement.
+ * @param {ASTNode} node The node to check.
+ * @returns {boolean} whether the node is in a one-liner block statement.
+ */
+ function isOneLinerBlock(node) {
+ const parent = node.parent;
+ const nextToken = sourceCode.getTokenAfter(node);
+
+ if (!nextToken || nextToken.value !== "}") {
+ return false;
+ }
+ return (
+ !!parent &&
+ parent.type === "BlockStatement" &&
+ parent.loc.start.line === parent.loc.end.line
+ );
+ }
+
+ /**
+ * Checks a node to see if it's followed by a semicolon.
+ * @param {ASTNode} node The node to check.
+ * @returns {void}
+ */
+ function checkForSemicolon(node) {
+ const isSemi = astUtils.isSemicolonToken(sourceCode.getLastToken(node));
+
+ if (never) {
+ if (isSemi && canRemoveSemicolon(node)) {
+ report(node, true);
+ } else if (!isSemi && beforeStatementContinuationChars === "always" && maybeAsiHazardBefore(sourceCode.getTokenAfter(node))) {
+ report(node);
+ }
+ } else {
+ const oneLinerBlock = (exceptOneLine && isOneLinerBlock(node));
+
+ if (isSemi && oneLinerBlock) {
+ report(node, true);
+ } else if (!isSemi && !oneLinerBlock) {
+ report(node);
+ }
+ }
+ }
+
+ /**
+ * Checks to see if there's a semicolon after a variable declaration.
+ * @param {ASTNode} node The node to check.
+ * @returns {void}
+ */
+ function checkForSemicolonForVariableDeclaration(node) {
+ const parent = node.parent;
+
+ if ((parent.type !== "ForStatement" || parent.init !== node) &&
+ (!/^For(?:In|Of)Statement/.test(parent.type) || parent.left !== node)
+ ) {
+ checkForSemicolon(node);
+ }
+ }
+
+ //--------------------------------------------------------------------------
+ // Public API
+ //--------------------------------------------------------------------------
+
+ return {
+ VariableDeclaration: checkForSemicolonForVariableDeclaration,
+ ExpressionStatement: checkForSemicolon,
+ ReturnStatement: checkForSemicolon,
+ ThrowStatement: checkForSemicolon,
+ DoWhileStatement: checkForSemicolon,
+ DebuggerStatement: checkForSemicolon,
+ BreakStatement: checkForSemicolon,
+ ContinueStatement: checkForSemicolon,
+ ImportDeclaration: checkForSemicolon,
+ ExportAllDeclaration: checkForSemicolon,
+ ExportNamedDeclaration(node) {
+ if (!node.declaration) {
+ checkForSemicolon(node);
+ }
+ },
+ ExportDefaultDeclaration(node) {
+ if (!/(?:Class|Function)Declaration/.test(node.declaration.type)) {
+ checkForSemicolon(node);
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/sort-imports.js b/tools/node_modules/eslint/lib/rules/sort-imports.js
new file mode 100644
index 0000000000..2bd415e974
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/sort-imports.js
@@ -0,0 +1,196 @@
+/**
+ * @fileoverview Rule to require sorting of import declarations
+ * @author Christian Schuller
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce sorted import declarations within modules",
+ category: "ECMAScript 6",
+ recommended: false
+ },
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ ignoreCase: {
+ type: "boolean"
+ },
+ memberSyntaxSortOrder: {
+ type: "array",
+ items: {
+ enum: ["none", "all", "multiple", "single"]
+ },
+ uniqueItems: true,
+ minItems: 4,
+ maxItems: 4
+ },
+ ignoreMemberSort: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ],
+
+ fixable: "code"
+ },
+
+ create(context) {
+
+ const configuration = context.options[0] || {},
+ ignoreCase = configuration.ignoreCase || false,
+ ignoreMemberSort = configuration.ignoreMemberSort || false,
+ memberSyntaxSortOrder = configuration.memberSyntaxSortOrder || ["none", "all", "multiple", "single"],
+ sourceCode = context.getSourceCode();
+ let previousDeclaration = null;
+
+ /**
+ * Gets the used member syntax style.
+ *
+ * import "my-module.js" --> none
+ * import * as myModule from "my-module.js" --> all
+ * import {myMember} from "my-module.js" --> single
+ * import {foo, bar} from "my-module.js" --> multiple
+ *
+ * @param {ASTNode} node - the ImportDeclaration node.
+ * @returns {string} used member parameter style, ["all", "multiple", "single"]
+ */
+ function usedMemberSyntax(node) {
+ if (node.specifiers.length === 0) {
+ return "none";
+ }
+ if (node.specifiers[0].type === "ImportNamespaceSpecifier") {
+ return "all";
+ }
+ if (node.specifiers.length === 1) {
+ return "single";
+ }
+ return "multiple";
+
+ }
+
+ /**
+ * Gets the group by member parameter index for given declaration.
+ * @param {ASTNode} node - the ImportDeclaration node.
+ * @returns {number} the declaration group by member index.
+ */
+ function getMemberParameterGroupIndex(node) {
+ return memberSyntaxSortOrder.indexOf(usedMemberSyntax(node));
+ }
+
+ /**
+ * Gets the local name of the first imported module.
+ * @param {ASTNode} node - the ImportDeclaration node.
+ * @returns {?string} the local name of the first imported module.
+ */
+ function getFirstLocalMemberName(node) {
+ if (node.specifiers[0]) {
+ return node.specifiers[0].local.name;
+ }
+ return null;
+
+ }
+
+ return {
+ ImportDeclaration(node) {
+ if (previousDeclaration) {
+ const currentMemberSyntaxGroupIndex = getMemberParameterGroupIndex(node),
+ previousMemberSyntaxGroupIndex = getMemberParameterGroupIndex(previousDeclaration);
+ let currentLocalMemberName = getFirstLocalMemberName(node),
+ previousLocalMemberName = getFirstLocalMemberName(previousDeclaration);
+
+ if (ignoreCase) {
+ previousLocalMemberName = previousLocalMemberName && previousLocalMemberName.toLowerCase();
+ currentLocalMemberName = currentLocalMemberName && currentLocalMemberName.toLowerCase();
+ }
+
+ /*
+ * When the current declaration uses a different member syntax,
+ * then check if the ordering is correct.
+ * Otherwise, make a default string compare (like rule sort-vars to be consistent) of the first used local member name.
+ */
+ if (currentMemberSyntaxGroupIndex !== previousMemberSyntaxGroupIndex) {
+ if (currentMemberSyntaxGroupIndex < previousMemberSyntaxGroupIndex) {
+ context.report({
+ node,
+ message: "Expected '{{syntaxA}}' syntax before '{{syntaxB}}' syntax.",
+ data: {
+ syntaxA: memberSyntaxSortOrder[currentMemberSyntaxGroupIndex],
+ syntaxB: memberSyntaxSortOrder[previousMemberSyntaxGroupIndex]
+ }
+ });
+ }
+ } else {
+ if (previousLocalMemberName &&
+ currentLocalMemberName &&
+ currentLocalMemberName < previousLocalMemberName
+ ) {
+ context.report({
+ node,
+ message: "Imports should be sorted alphabetically."
+ });
+ }
+ }
+ }
+
+ if (!ignoreMemberSort) {
+ const importSpecifiers = node.specifiers.filter(specifier => specifier.type === "ImportSpecifier");
+ const getSortableName = ignoreCase ? specifier => specifier.local.name.toLowerCase() : specifier => specifier.local.name;
+ const firstUnsortedIndex = importSpecifiers.map(getSortableName).findIndex((name, index, array) => array[index - 1] > name);
+
+ if (firstUnsortedIndex !== -1) {
+ context.report({
+ node: importSpecifiers[firstUnsortedIndex],
+ message: "Member '{{memberName}}' of the import declaration should be sorted alphabetically.",
+ data: { memberName: importSpecifiers[firstUnsortedIndex].local.name },
+ fix(fixer) {
+ if (importSpecifiers.some(specifier =>
+ sourceCode.getCommentsBefore(specifier).length || sourceCode.getCommentsAfter(specifier).length)) {
+
+ // If there are comments in the ImportSpecifier list, don't rearrange the specifiers.
+ return null;
+ }
+
+ return fixer.replaceTextRange(
+ [importSpecifiers[0].range[0], importSpecifiers[importSpecifiers.length - 1].range[1]],
+ importSpecifiers
+
+ // Clone the importSpecifiers array to avoid mutating it
+ .slice()
+
+ // Sort the array into the desired order
+ .sort((specifierA, specifierB) => {
+ const aName = getSortableName(specifierA);
+ const bName = getSortableName(specifierB);
+
+ return aName > bName ? 1 : -1;
+ })
+
+ // Build a string out of the sorted list of import specifiers and the text between the originals
+ .reduce((sourceText, specifier, index) => {
+ const textAfterSpecifier = index === importSpecifiers.length - 1
+ ? ""
+ : sourceCode.getText().slice(importSpecifiers[index].range[1], importSpecifiers[index + 1].range[0]);
+
+ return sourceText + sourceCode.getText(specifier) + textAfterSpecifier;
+ }, "")
+ );
+ }
+ });
+ }
+ }
+
+ previousDeclaration = node;
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/sort-keys.js b/tools/node_modules/eslint/lib/rules/sort-keys.js
new file mode 100644
index 0000000000..8821f62943
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/sort-keys.js
@@ -0,0 +1,157 @@
+/**
+ * @fileoverview Rule to require object keys to be sorted
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils"),
+ naturalCompare = require("natural-compare");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Gets the property name of the given `Property` node.
+ *
+ * - If the property's key is an `Identifier` node, this returns the key's name
+ * whether it's a computed property or not.
+ * - If the property has a static name, this returns the static name.
+ * - Otherwise, this returns null.
+ *
+ * @param {ASTNode} node - The `Property` node to get.
+ * @returns {string|null} The property name or null.
+ * @private
+ */
+function getPropertyName(node) {
+ return astUtils.getStaticPropertyName(node) || node.key.name || null;
+}
+
+/**
+ * Functions which check that the given 2 names are in specific order.
+ *
+ * Postfix `I` is meant insensitive.
+ * Postfix `N` is meant natual.
+ *
+ * @private
+ */
+const isValidOrders = {
+ asc(a, b) {
+ return a <= b;
+ },
+ ascI(a, b) {
+ return a.toLowerCase() <= b.toLowerCase();
+ },
+ ascN(a, b) {
+ return naturalCompare(a, b) <= 0;
+ },
+ ascIN(a, b) {
+ return naturalCompare(a.toLowerCase(), b.toLowerCase()) <= 0;
+ },
+ desc(a, b) {
+ return isValidOrders.asc(b, a);
+ },
+ descI(a, b) {
+ return isValidOrders.ascI(b, a);
+ },
+ descN(a, b) {
+ return isValidOrders.ascN(b, a);
+ },
+ descIN(a, b) {
+ return isValidOrders.ascIN(b, a);
+ }
+};
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require object keys to be sorted",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+ schema: [
+ {
+ enum: ["asc", "desc"]
+ },
+ {
+ type: "object",
+ properties: {
+ caseSensitive: {
+ type: "boolean"
+ },
+ natural: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+
+ // Parse options.
+ const order = context.options[0] || "asc";
+ const options = context.options[1];
+ const insensitive = (options && options.caseSensitive) === false;
+ const natual = Boolean(options && options.natural);
+ const isValidOrder = isValidOrders[
+ order + (insensitive ? "I" : "") + (natual ? "N" : "")
+ ];
+
+ // The stack to save the previous property's name for each object literals.
+ let stack = null;
+
+ return {
+ ObjectExpression() {
+ stack = {
+ upper: stack,
+ prevName: null
+ };
+ },
+
+ "ObjectExpression:exit"() {
+ stack = stack.upper;
+ },
+
+ Property(node) {
+ if (node.parent.type === "ObjectPattern") {
+ return;
+ }
+
+ const prevName = stack.prevName;
+ const thisName = getPropertyName(node);
+
+ stack.prevName = thisName || prevName;
+
+ if (!prevName || !thisName) {
+ return;
+ }
+
+ if (!isValidOrder(prevName, thisName)) {
+ context.report({
+ node,
+ loc: node.key.loc,
+ message: "Expected object keys to be in {{natual}}{{insensitive}}{{order}}ending order. '{{thisName}}' should be before '{{prevName}}'.",
+ data: {
+ thisName,
+ prevName,
+ order,
+ insensitive: insensitive ? "insensitive " : "",
+ natual: natual ? "natural " : ""
+ }
+ });
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/sort-vars.js b/tools/node_modules/eslint/lib/rules/sort-vars.js
new file mode 100644
index 0000000000..c77cdf8620
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/sort-vars.js
@@ -0,0 +1,96 @@
+/**
+ * @fileoverview Rule to require sorting of variables within a single Variable Declaration block
+ * @author Ilya Volodin
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require variables within the same declaration block to be sorted",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ ignoreCase: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ],
+
+ fixable: "code"
+ },
+
+ create(context) {
+
+ const configuration = context.options[0] || {},
+ ignoreCase = configuration.ignoreCase || false,
+ sourceCode = context.getSourceCode();
+
+ return {
+ VariableDeclaration(node) {
+ const idDeclarations = node.declarations.filter(decl => decl.id.type === "Identifier");
+ const getSortableName = ignoreCase ? decl => decl.id.name.toLowerCase() : decl => decl.id.name;
+ const unfixable = idDeclarations.some(decl => decl.init !== null && decl.init.type !== "Literal");
+ let fixed = false;
+
+ idDeclarations.slice(1).reduce((memo, decl) => {
+ const lastVariableName = getSortableName(memo),
+ currentVariableName = getSortableName(decl);
+
+ if (currentVariableName < lastVariableName) {
+ context.report({
+ node: decl,
+ message: "Variables within the same declaration block should be sorted alphabetically.",
+ fix(fixer) {
+ if (unfixable || fixed) {
+ return null;
+ }
+ return fixer.replaceTextRange(
+ [idDeclarations[0].range[0], idDeclarations[idDeclarations.length - 1].range[1]],
+ idDeclarations
+
+ // Clone the idDeclarations array to avoid mutating it
+ .slice()
+
+ // Sort the array into the desired order
+ .sort((declA, declB) => {
+ const aName = getSortableName(declA);
+ const bName = getSortableName(declB);
+
+ return aName > bName ? 1 : -1;
+ })
+
+ // Build a string out of the sorted list of identifier declarations and the text between the originals
+ .reduce((sourceText, identifier, index) => {
+ const textAfterIdentifier = index === idDeclarations.length - 1
+ ? ""
+ : sourceCode.getText().slice(idDeclarations[index].range[1], idDeclarations[index + 1].range[0]);
+
+ return sourceText + sourceCode.getText(identifier) + textAfterIdentifier;
+ }, "")
+
+ );
+ }
+ });
+ fixed = true;
+ return memo;
+ }
+ return decl;
+
+ }, idDeclarations[0]);
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/space-before-blocks.js b/tools/node_modules/eslint/lib/rules/space-before-blocks.js
new file mode 100644
index 0000000000..f50298c9c4
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/space-before-blocks.js
@@ -0,0 +1,148 @@
+/**
+ * @fileoverview A rule to ensure whitespace before blocks.
+ * @author Mathias Schreck <https://github.com/lo1tuma>
+ */
+
+"use strict";
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce consistent spacing before blocks",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ fixable: "whitespace",
+
+ schema: [
+ {
+ oneOf: [
+ {
+ enum: ["always", "never"]
+ },
+ {
+ type: "object",
+ properties: {
+ keywords: {
+ enum: ["always", "never"]
+ },
+ functions: {
+ enum: ["always", "never"]
+ },
+ classes: {
+ enum: ["always", "never"]
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ }
+ ]
+ },
+
+ create(context) {
+ const config = context.options[0],
+ sourceCode = context.getSourceCode();
+ let checkFunctions = true,
+ checkKeywords = true,
+ checkClasses = true;
+
+ if (typeof config === "object") {
+ checkFunctions = config.functions !== "never";
+ checkKeywords = config.keywords !== "never";
+ checkClasses = config.classes !== "never";
+ } else if (config === "never") {
+ checkFunctions = false;
+ checkKeywords = false;
+ checkClasses = false;
+ }
+
+ /**
+ * Checks whether or not a given token is an arrow operator (=>) or a keyword
+ * in order to avoid to conflict with `arrow-spacing` and `keyword-spacing`.
+ *
+ * @param {Token} token - A token to check.
+ * @returns {boolean} `true` if the token is an arrow operator.
+ */
+ function isConflicted(token) {
+ return (token.type === "Punctuator" && token.value === "=>") || token.type === "Keyword";
+ }
+
+ /**
+ * Checks the given BlockStatement node has a preceding space if it doesn’t start on a new line.
+ * @param {ASTNode|Token} node The AST node of a BlockStatement.
+ * @returns {void} undefined.
+ */
+ function checkPrecedingSpace(node) {
+ const precedingToken = sourceCode.getTokenBefore(node);
+
+ if (precedingToken && !isConflicted(precedingToken) && astUtils.isTokenOnSameLine(precedingToken, node)) {
+ const hasSpace = sourceCode.isSpaceBetweenTokens(precedingToken, node);
+ const parent = context.getAncestors().pop();
+ let requireSpace;
+
+ if (parent.type === "FunctionExpression" || parent.type === "FunctionDeclaration") {
+ requireSpace = checkFunctions;
+ } else if (node.type === "ClassBody") {
+ requireSpace = checkClasses;
+ } else {
+ requireSpace = checkKeywords;
+ }
+
+ if (requireSpace) {
+ if (!hasSpace) {
+ context.report({
+ node,
+ message: "Missing space before opening brace.",
+ fix(fixer) {
+ return fixer.insertTextBefore(node, " ");
+ }
+ });
+ }
+ } else {
+ if (hasSpace) {
+ context.report({
+ node,
+ message: "Unexpected space before opening brace.",
+ fix(fixer) {
+ return fixer.removeRange([precedingToken.range[1], node.range[0]]);
+ }
+ });
+ }
+ }
+ }
+ }
+
+ /**
+ * Checks if the CaseBlock of an given SwitchStatement node has a preceding space.
+ * @param {ASTNode} node The node of a SwitchStatement.
+ * @returns {void} undefined.
+ */
+ function checkSpaceBeforeCaseBlock(node) {
+ const cases = node.cases;
+ let openingBrace;
+
+ if (cases.length > 0) {
+ openingBrace = sourceCode.getTokenBefore(cases[0]);
+ } else {
+ openingBrace = sourceCode.getLastToken(node, 1);
+ }
+
+ checkPrecedingSpace(openingBrace);
+ }
+
+ return {
+ BlockStatement: checkPrecedingSpace,
+ ClassBody: checkPrecedingSpace,
+ SwitchStatement: checkSpaceBeforeCaseBlock
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/space-before-function-paren.js b/tools/node_modules/eslint/lib/rules/space-before-function-paren.js
new file mode 100644
index 0000000000..8851c4587a
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/space-before-function-paren.js
@@ -0,0 +1,142 @@
+/**
+ * @fileoverview Rule to validate spacing before function paren.
+ * @author Mathias Schreck <https://github.com/lo1tuma>
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce consistent spacing before `function` definition opening parenthesis",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ fixable: "whitespace",
+
+ schema: [
+ {
+ oneOf: [
+ {
+ enum: ["always", "never"]
+ },
+ {
+ type: "object",
+ properties: {
+ anonymous: {
+ enum: ["always", "never", "ignore"]
+ },
+ named: {
+ enum: ["always", "never", "ignore"]
+ },
+ asyncArrow: {
+ enum: ["always", "never", "ignore"]
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ }
+ ]
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+ const baseConfig = typeof context.options[0] === "string" ? context.options[0] : "always";
+ const overrideConfig = typeof context.options[0] === "object" ? context.options[0] : {};
+
+ /**
+ * Determines whether a function has a name.
+ * @param {ASTNode} node The function node.
+ * @returns {boolean} Whether the function has a name.
+ */
+ function isNamedFunction(node) {
+ if (node.id) {
+ return true;
+ }
+
+ const parent = node.parent;
+
+ return parent.type === "MethodDefinition" ||
+ (parent.type === "Property" &&
+ (
+ parent.kind === "get" ||
+ parent.kind === "set" ||
+ parent.method
+ )
+ );
+ }
+
+ /**
+ * Gets the config for a given function
+ * @param {ASTNode} node The function node
+ * @returns {string} "always", "never", or "ignore"
+ */
+ function getConfigForFunction(node) {
+ if (node.type === "ArrowFunctionExpression") {
+
+ // Always ignore non-async functions and arrow functions without parens, e.g. async foo => bar
+ if (node.async && astUtils.isOpeningParenToken(sourceCode.getFirstToken(node, { skip: 1 }))) {
+ return overrideConfig.asyncArrow || baseConfig;
+ }
+ } else if (isNamedFunction(node)) {
+ return overrideConfig.named || baseConfig;
+
+ // `generator-star-spacing` should warn anonymous generators. E.g. `function* () {}`
+ } else if (!node.generator) {
+ return overrideConfig.anonymous || baseConfig;
+ }
+
+ return "ignore";
+ }
+
+ /**
+ * Checks the parens of a function node
+ * @param {ASTNode} node A function node
+ * @returns {void}
+ */
+ function checkFunction(node) {
+ const functionConfig = getConfigForFunction(node);
+
+ if (functionConfig === "ignore") {
+ return;
+ }
+
+ const rightToken = sourceCode.getFirstToken(node, astUtils.isOpeningParenToken);
+ const leftToken = sourceCode.getTokenBefore(rightToken);
+ const hasSpacing = sourceCode.isSpaceBetweenTokens(leftToken, rightToken);
+
+ if (hasSpacing && functionConfig === "never") {
+ context.report({
+ node,
+ loc: leftToken.loc.end,
+ message: "Unexpected space before function parentheses.",
+ fix: fixer => fixer.removeRange([leftToken.range[1], rightToken.range[0]])
+ });
+ } else if (!hasSpacing && functionConfig === "always") {
+ context.report({
+ node,
+ loc: leftToken.loc.end,
+ message: "Missing space before function parentheses.",
+ fix: fixer => fixer.insertTextAfter(leftToken, " ")
+ });
+ }
+ }
+
+ return {
+ ArrowFunctionExpression: checkFunction,
+ FunctionDeclaration: checkFunction,
+ FunctionExpression: checkFunction
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/space-in-parens.js b/tools/node_modules/eslint/lib/rules/space-in-parens.js
new file mode 100644
index 0000000000..67ec5847cd
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/space-in-parens.js
@@ -0,0 +1,274 @@
+/**
+ * @fileoverview Disallows or enforces spaces inside of parentheses.
+ * @author Jonathan Rajavuori
+ */
+"use strict";
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce consistent spacing inside parentheses",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ fixable: "whitespace",
+
+ schema: [
+ {
+ enum: ["always", "never"]
+ },
+ {
+ type: "object",
+ properties: {
+ exceptions: {
+ type: "array",
+ items: {
+ enum: ["{}", "[]", "()", "empty"]
+ },
+ uniqueItems: true
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+
+ const MISSING_SPACE_MESSAGE = "There must be a space inside this paren.",
+ REJECTED_SPACE_MESSAGE = "There should be no spaces inside this paren.",
+ ALWAYS = context.options[0] === "always",
+ exceptionsArrayOptions = (context.options[1] && context.options[1].exceptions) || [],
+ options = {};
+ let exceptions;
+
+ if (exceptionsArrayOptions.length) {
+ options.braceException = exceptionsArrayOptions.indexOf("{}") !== -1;
+ options.bracketException = exceptionsArrayOptions.indexOf("[]") !== -1;
+ options.parenException = exceptionsArrayOptions.indexOf("()") !== -1;
+ options.empty = exceptionsArrayOptions.indexOf("empty") !== -1;
+ }
+
+ /**
+ * Produces an object with the opener and closer exception values
+ * @param {Object} opts The exception options
+ * @returns {Object} `openers` and `closers` exception values
+ * @private
+ */
+ function getExceptions() {
+ const openers = [],
+ closers = [];
+
+ if (options.braceException) {
+ openers.push("{");
+ closers.push("}");
+ }
+
+ if (options.bracketException) {
+ openers.push("[");
+ closers.push("]");
+ }
+
+ if (options.parenException) {
+ openers.push("(");
+ closers.push(")");
+ }
+
+ if (options.empty) {
+ openers.push(")");
+ closers.push("(");
+ }
+
+ return {
+ openers,
+ closers
+ };
+ }
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+ const sourceCode = context.getSourceCode();
+
+ /**
+ * Determines if a token is one of the exceptions for the opener paren
+ * @param {Object} token The token to check
+ * @returns {boolean} True if the token is one of the exceptions for the opener paren
+ */
+ function isOpenerException(token) {
+ return token.type === "Punctuator" && exceptions.openers.indexOf(token.value) >= 0;
+ }
+
+ /**
+ * Determines if a token is one of the exceptions for the closer paren
+ * @param {Object} token The token to check
+ * @returns {boolean} True if the token is one of the exceptions for the closer paren
+ */
+ function isCloserException(token) {
+ return token.type === "Punctuator" && exceptions.closers.indexOf(token.value) >= 0;
+ }
+
+ /**
+ * Determines if an opener paren should have a missing space after it
+ * @param {Object} left The paren token
+ * @param {Object} right The token after it
+ * @returns {boolean} True if the paren should have a space
+ */
+ function shouldOpenerHaveSpace(left, right) {
+ if (sourceCode.isSpaceBetweenTokens(left, right)) {
+ return false;
+ }
+
+ if (ALWAYS) {
+ if (astUtils.isClosingParenToken(right)) {
+ return false;
+ }
+ return !isOpenerException(right);
+ }
+ return isOpenerException(right);
+
+ }
+
+ /**
+ * Determines if an closer paren should have a missing space after it
+ * @param {Object} left The token before the paren
+ * @param {Object} right The paren token
+ * @returns {boolean} True if the paren should have a space
+ */
+ function shouldCloserHaveSpace(left, right) {
+ if (astUtils.isOpeningParenToken(left)) {
+ return false;
+ }
+
+ if (sourceCode.isSpaceBetweenTokens(left, right)) {
+ return false;
+ }
+
+ if (ALWAYS) {
+ return !isCloserException(left);
+ }
+ return isCloserException(left);
+
+ }
+
+ /**
+ * Determines if an opener paren should not have an existing space after it
+ * @param {Object} left The paren token
+ * @param {Object} right The token after it
+ * @returns {boolean} True if the paren should reject the space
+ */
+ function shouldOpenerRejectSpace(left, right) {
+ if (right.type === "Line") {
+ return false;
+ }
+
+ if (!astUtils.isTokenOnSameLine(left, right)) {
+ return false;
+ }
+
+ if (!sourceCode.isSpaceBetweenTokens(left, right)) {
+ return false;
+ }
+
+ if (ALWAYS) {
+ return isOpenerException(right);
+ }
+ return !isOpenerException(right);
+
+ }
+
+ /**
+ * Determines if an closer paren should not have an existing space after it
+ * @param {Object} left The token before the paren
+ * @param {Object} right The paren token
+ * @returns {boolean} True if the paren should reject the space
+ */
+ function shouldCloserRejectSpace(left, right) {
+ if (astUtils.isOpeningParenToken(left)) {
+ return false;
+ }
+
+ if (!astUtils.isTokenOnSameLine(left, right)) {
+ return false;
+ }
+
+ if (!sourceCode.isSpaceBetweenTokens(left, right)) {
+ return false;
+ }
+
+ if (ALWAYS) {
+ return isCloserException(left);
+ }
+ return !isCloserException(left);
+
+ }
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+ Program: function checkParenSpaces(node) {
+ exceptions = getExceptions();
+ const tokens = sourceCode.tokensAndComments;
+
+ tokens.forEach((token, i) => {
+ const prevToken = tokens[i - 1];
+ const nextToken = tokens[i + 1];
+
+ if (!astUtils.isOpeningParenToken(token) && !astUtils.isClosingParenToken(token)) {
+ return;
+ }
+
+ if (token.value === "(" && shouldOpenerHaveSpace(token, nextToken)) {
+ context.report({
+ node,
+ loc: token.loc.start,
+ message: MISSING_SPACE_MESSAGE,
+ fix(fixer) {
+ return fixer.insertTextAfter(token, " ");
+ }
+ });
+ } else if (token.value === "(" && shouldOpenerRejectSpace(token, nextToken)) {
+ context.report({
+ node,
+ loc: token.loc.start,
+ message: REJECTED_SPACE_MESSAGE,
+ fix(fixer) {
+ return fixer.removeRange([token.range[1], nextToken.range[0]]);
+ }
+ });
+ } else if (token.value === ")" && shouldCloserHaveSpace(prevToken, token)) {
+
+ // context.report(node, token.loc.start, MISSING_SPACE_MESSAGE);
+ context.report({
+ node,
+ loc: token.loc.start,
+ message: MISSING_SPACE_MESSAGE,
+ fix(fixer) {
+ return fixer.insertTextBefore(token, " ");
+ }
+ });
+ } else if (token.value === ")" && shouldCloserRejectSpace(prevToken, token)) {
+ context.report({
+ node,
+ loc: token.loc.start,
+ message: REJECTED_SPACE_MESSAGE,
+ fix(fixer) {
+ return fixer.removeRange([prevToken.range[1], token.range[0]]);
+ }
+ });
+ }
+ });
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/space-infix-ops.js b/tools/node_modules/eslint/lib/rules/space-infix-ops.js
new file mode 100644
index 0000000000..b92c889c7f
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/space-infix-ops.js
@@ -0,0 +1,167 @@
+/**
+ * @fileoverview Require spaces around infix operators
+ * @author Michael Ficarra
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require spacing around infix operators",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ fixable: "whitespace",
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ int32Hint: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+ const int32Hint = context.options[0] ? context.options[0].int32Hint === true : false;
+
+ const OPERATORS = [
+ "*", "/", "%", "+", "-", "<<", ">>", ">>>", "<", "<=", ">", ">=", "in",
+ "instanceof", "==", "!=", "===", "!==", "&", "^", "|", "&&", "||", "=",
+ "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=", "&=", "^=", "|=",
+ "?", ":", ",", "**"
+ ];
+
+ const sourceCode = context.getSourceCode();
+
+ /**
+ * Returns the first token which violates the rule
+ * @param {ASTNode} left - The left node of the main node
+ * @param {ASTNode} right - The right node of the main node
+ * @returns {Object} The violator token or null
+ * @private
+ */
+ function getFirstNonSpacedToken(left, right) {
+ const tokens = sourceCode.getTokensBetween(left, right, 1);
+
+ for (let i = 1, l = tokens.length - 1; i < l; ++i) {
+ const op = tokens[i];
+
+ if (
+ (op.type === "Punctuator" || op.type === "Keyword") &&
+ OPERATORS.indexOf(op.value) >= 0 &&
+ (tokens[i - 1].range[1] >= op.range[0] || op.range[1] >= tokens[i + 1].range[0])
+ ) {
+ return op;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Reports an AST node as a rule violation
+ * @param {ASTNode} mainNode - The node to report
+ * @param {Object} culpritToken - The token which has a problem
+ * @returns {void}
+ * @private
+ */
+ function report(mainNode, culpritToken) {
+ context.report({
+ node: mainNode,
+ loc: culpritToken.loc.start,
+ message: "Infix operators must be spaced.",
+ fix(fixer) {
+ const previousToken = sourceCode.getTokenBefore(culpritToken);
+ const afterToken = sourceCode.getTokenAfter(culpritToken);
+ let fixString = "";
+
+ if (culpritToken.range[0] - previousToken.range[1] === 0) {
+ fixString = " ";
+ }
+
+ fixString += culpritToken.value;
+
+ if (afterToken.range[0] - culpritToken.range[1] === 0) {
+ fixString += " ";
+ }
+
+ return fixer.replaceText(culpritToken, fixString);
+ }
+ });
+ }
+
+ /**
+ * Check if the node is binary then report
+ * @param {ASTNode} node node to evaluate
+ * @returns {void}
+ * @private
+ */
+ function checkBinary(node) {
+ const leftNode = (node.left.typeAnnotation) ? node.left.typeAnnotation : node.left;
+ const rightNode = node.right;
+
+ const nonSpacedNode = getFirstNonSpacedToken(leftNode, rightNode);
+
+ if (nonSpacedNode) {
+ if (!(int32Hint && sourceCode.getText(node).endsWith("|0"))) {
+ report(node, nonSpacedNode);
+ }
+ }
+ }
+
+ /**
+ * Check if the node is conditional
+ * @param {ASTNode} node node to evaluate
+ * @returns {void}
+ * @private
+ */
+ function checkConditional(node) {
+ const nonSpacedConsequesntNode = getFirstNonSpacedToken(node.test, node.consequent);
+ const nonSpacedAlternateNode = getFirstNonSpacedToken(node.consequent, node.alternate);
+
+ if (nonSpacedConsequesntNode) {
+ report(node, nonSpacedConsequesntNode);
+ } else if (nonSpacedAlternateNode) {
+ report(node, nonSpacedAlternateNode);
+ }
+ }
+
+ /**
+ * Check if the node is a variable
+ * @param {ASTNode} node node to evaluate
+ * @returns {void}
+ * @private
+ */
+ function checkVar(node) {
+ const leftNode = (node.id.typeAnnotation) ? node.id.typeAnnotation : node.id;
+ const rightNode = node.init;
+
+ if (rightNode) {
+ const nonSpacedNode = getFirstNonSpacedToken(leftNode, rightNode);
+
+ if (nonSpacedNode) {
+ report(node, nonSpacedNode);
+ }
+ }
+ }
+
+ return {
+ AssignmentExpression: checkBinary,
+ AssignmentPattern: checkBinary,
+ BinaryExpression: checkBinary,
+ LogicalExpression: checkBinary,
+ ConditionalExpression: checkConditional,
+ VariableDeclarator: checkVar
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/space-unary-ops.js b/tools/node_modules/eslint/lib/rules/space-unary-ops.js
new file mode 100644
index 0000000000..06a70fb6ad
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/space-unary-ops.js
@@ -0,0 +1,319 @@
+/**
+ * @fileoverview This rule shoud require or disallow spaces before or after unary operations.
+ * @author Marcin Kumorek
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce consistent spacing before or after unary operators",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ fixable: "whitespace",
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ words: {
+ type: "boolean"
+ },
+ nonwords: {
+ type: "boolean"
+ },
+ overrides: {
+ type: "object",
+ additionalProperties: {
+ type: "boolean"
+ }
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+ const options = context.options && Array.isArray(context.options) && context.options[0] || { words: true, nonwords: false };
+
+ const sourceCode = context.getSourceCode();
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ /**
+ * Check if the node is the first "!" in a "!!" convert to Boolean expression
+ * @param {ASTnode} node AST node
+ * @returns {boolean} Whether or not the node is first "!" in "!!"
+ */
+ function isFirstBangInBangBangExpression(node) {
+ return node && node.type === "UnaryExpression" && node.argument.operator === "!" &&
+ node.argument && node.argument.type === "UnaryExpression" && node.argument.operator === "!";
+ }
+
+ /**
+ * Check if the node's child argument is an "ObjectExpression"
+ * @param {ASTnode} node AST node
+ * @returns {boolean} Whether or not the argument's type is "ObjectExpression"
+ */
+ function isArgumentObjectExpression(node) {
+ return node.argument && node.argument.type && node.argument.type === "ObjectExpression";
+ }
+
+ /**
+ * Checks if an override exists for a given operator.
+ * @param {string} operator Operator
+ * @returns {boolean} Whether or not an override has been provided for the operator
+ */
+ function overrideExistsForOperator(operator) {
+ return options.overrides && options.overrides.hasOwnProperty(operator);
+ }
+
+ /**
+ * Gets the value that the override was set to for this operator
+ * @param {string} operator Operator
+ * @returns {boolean} Whether or not an override enforces a space with this operator
+ */
+ function overrideEnforcesSpaces(operator) {
+ return options.overrides[operator];
+ }
+
+ /**
+ * Verify Unary Word Operator has spaces after the word operator
+ * @param {ASTnode} node AST node
+ * @param {Object} firstToken first token from the AST node
+ * @param {Object} secondToken second token from the AST node
+ * @param {string} word The word to be used for reporting
+ * @returns {void}
+ */
+ function verifyWordHasSpaces(node, firstToken, secondToken, word) {
+ if (secondToken.range[0] === firstToken.range[1]) {
+ context.report({
+ node,
+ message: "Unary word operator '{{word}}' must be followed by whitespace.",
+ data: {
+ word
+ },
+ fix(fixer) {
+ return fixer.insertTextAfter(firstToken, " ");
+ }
+ });
+ }
+ }
+
+ /**
+ * Verify Unary Word Operator doesn't have spaces after the word operator
+ * @param {ASTnode} node AST node
+ * @param {Object} firstToken first token from the AST node
+ * @param {Object} secondToken second token from the AST node
+ * @param {string} word The word to be used for reporting
+ * @returns {void}
+ */
+ function verifyWordDoesntHaveSpaces(node, firstToken, secondToken, word) {
+ if (isArgumentObjectExpression(node)) {
+ if (secondToken.range[0] > firstToken.range[1]) {
+ context.report({
+ node,
+ message: "Unexpected space after unary word operator '{{word}}'.",
+ data: {
+ word
+ },
+ fix(fixer) {
+ return fixer.removeRange([firstToken.range[1], secondToken.range[0]]);
+ }
+ });
+ }
+ }
+ }
+
+ /**
+ * Check Unary Word Operators for spaces after the word operator
+ * @param {ASTnode} node AST node
+ * @param {Object} firstToken first token from the AST node
+ * @param {Object} secondToken second token from the AST node
+ * @param {string} word The word to be used for reporting
+ * @returns {void}
+ */
+ function checkUnaryWordOperatorForSpaces(node, firstToken, secondToken, word) {
+ word = word || firstToken.value;
+
+ if (overrideExistsForOperator(word)) {
+ if (overrideEnforcesSpaces(word)) {
+ verifyWordHasSpaces(node, firstToken, secondToken, word);
+ } else {
+ verifyWordDoesntHaveSpaces(node, firstToken, secondToken, word);
+ }
+ } else if (options.words) {
+ verifyWordHasSpaces(node, firstToken, secondToken, word);
+ } else {
+ verifyWordDoesntHaveSpaces(node, firstToken, secondToken, word);
+ }
+ }
+
+ /**
+ * Verifies YieldExpressions satisfy spacing requirements
+ * @param {ASTnode} node AST node
+ * @returns {void}
+ */
+ function checkForSpacesAfterYield(node) {
+ const tokens = sourceCode.getFirstTokens(node, 3),
+ word = "yield";
+
+ if (!node.argument || node.delegate) {
+ return;
+ }
+
+ checkUnaryWordOperatorForSpaces(node, tokens[0], tokens[1], word);
+ }
+
+ /**
+ * Verifies AwaitExpressions satisfy spacing requirements
+ * @param {ASTNode} node AwaitExpression AST node
+ * @returns {void}
+ */
+ function checkForSpacesAfterAwait(node) {
+ const tokens = sourceCode.getFirstTokens(node, 3);
+
+ checkUnaryWordOperatorForSpaces(node, tokens[0], tokens[1], "await");
+ }
+
+ /**
+ * Verifies UnaryExpression, UpdateExpression and NewExpression have spaces before or after the operator
+ * @param {ASTnode} node AST node
+ * @param {Object} firstToken First token in the expression
+ * @param {Object} secondToken Second token in the expression
+ * @returns {void}
+ */
+ function verifyNonWordsHaveSpaces(node, firstToken, secondToken) {
+ if (node.prefix) {
+ if (isFirstBangInBangBangExpression(node)) {
+ return;
+ }
+ if (firstToken.range[1] === secondToken.range[0]) {
+ context.report({
+ node,
+ message: "Unary operator '{{operator}}' must be followed by whitespace.",
+ data: {
+ operator: firstToken.value
+ },
+ fix(fixer) {
+ return fixer.insertTextAfter(firstToken, " ");
+ }
+ });
+ }
+ } else {
+ if (firstToken.range[1] === secondToken.range[0]) {
+ context.report({
+ node,
+ message: "Space is required before unary expressions '{{token}}'.",
+ data: {
+ token: secondToken.value
+ },
+ fix(fixer) {
+ return fixer.insertTextBefore(secondToken, " ");
+ }
+ });
+ }
+ }
+ }
+
+ /**
+ * Verifies UnaryExpression, UpdateExpression and NewExpression don't have spaces before or after the operator
+ * @param {ASTnode} node AST node
+ * @param {Object} firstToken First token in the expression
+ * @param {Object} secondToken Second token in the expression
+ * @returns {void}
+ */
+ function verifyNonWordsDontHaveSpaces(node, firstToken, secondToken) {
+ if (node.prefix) {
+ if (secondToken.range[0] > firstToken.range[1]) {
+ context.report({
+ node,
+ message: "Unexpected space after unary operator '{{operator}}'.",
+ data: {
+ operator: firstToken.value
+ },
+ fix(fixer) {
+ if (astUtils.canTokensBeAdjacent(firstToken, secondToken)) {
+ return fixer.removeRange([firstToken.range[1], secondToken.range[0]]);
+ }
+ return null;
+ }
+ });
+ }
+ } else {
+ if (secondToken.range[0] > firstToken.range[1]) {
+ context.report({
+ node,
+ message: "Unexpected space before unary operator '{{operator}}'.",
+ data: {
+ operator: secondToken.value
+ },
+ fix(fixer) {
+ return fixer.removeRange([firstToken.range[1], secondToken.range[0]]);
+ }
+ });
+ }
+ }
+ }
+
+ /**
+ * Verifies UnaryExpression, UpdateExpression and NewExpression satisfy spacing requirements
+ * @param {ASTnode} node AST node
+ * @returns {void}
+ */
+ function checkForSpaces(node) {
+ const tokens = node.type === "UpdateExpression" && !node.prefix
+ ? sourceCode.getLastTokens(node, 2)
+ : sourceCode.getFirstTokens(node, 2);
+ const firstToken = tokens[0];
+ const secondToken = tokens[1];
+
+ if ((node.type === "NewExpression" || node.prefix) && firstToken.type === "Keyword") {
+ checkUnaryWordOperatorForSpaces(node, firstToken, secondToken);
+ return;
+ }
+
+ const operator = node.prefix ? tokens[0].value : tokens[1].value;
+
+ if (overrideExistsForOperator(operator)) {
+ if (overrideEnforcesSpaces(operator)) {
+ verifyNonWordsHaveSpaces(node, firstToken, secondToken);
+ } else {
+ verifyNonWordsDontHaveSpaces(node, firstToken, secondToken);
+ }
+ } else if (options.nonwords) {
+ verifyNonWordsHaveSpaces(node, firstToken, secondToken);
+ } else {
+ verifyNonWordsDontHaveSpaces(node, firstToken, secondToken);
+ }
+ }
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+ UnaryExpression: checkForSpaces,
+ UpdateExpression: checkForSpaces,
+ NewExpression: checkForSpaces,
+ YieldExpression: checkForSpacesAfterYield,
+ AwaitExpression: checkForSpacesAfterAwait
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/spaced-comment.js b/tools/node_modules/eslint/lib/rules/spaced-comment.js
new file mode 100644
index 0000000000..8cdd05514c
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/spaced-comment.js
@@ -0,0 +1,375 @@
+/**
+ * @fileoverview Source code for spaced-comments rule
+ * @author Gyandeep Singh
+ */
+"use strict";
+
+const lodash = require("lodash");
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Escapes the control characters of a given string.
+ * @param {string} s - A string to escape.
+ * @returns {string} An escaped string.
+ */
+function escape(s) {
+ const isOneChar = s.length === 1;
+
+ s = lodash.escapeRegExp(s);
+ return isOneChar ? s : `(?:${s})`;
+}
+
+/**
+ * Escapes the control characters of a given string.
+ * And adds a repeat flag.
+ * @param {string} s - A string to escape.
+ * @returns {string} An escaped string.
+ */
+function escapeAndRepeat(s) {
+ return `${escape(s)}+`;
+}
+
+/**
+ * Parses `markers` option.
+ * If markers don't include `"*"`, this adds `"*"` to allow JSDoc comments.
+ * @param {string[]} [markers] - A marker list.
+ * @returns {string[]} A marker list.
+ */
+function parseMarkersOption(markers) {
+ markers = markers ? markers.slice(0) : [];
+
+ // `*` is a marker for JSDoc comments.
+ if (markers.indexOf("*") === -1) {
+ markers.push("*");
+ }
+
+ return markers;
+}
+
+/**
+ * Creates string pattern for exceptions.
+ * Generated pattern:
+ *
+ * 1. A space or an exception pattern sequence.
+ *
+ * @param {string[]} exceptions - An exception pattern list.
+ * @returns {string} A regular expression string for exceptions.
+ */
+function createExceptionsPattern(exceptions) {
+ let pattern = "";
+
+ /*
+ * A space or an exception pattern sequence.
+ * [] ==> "\s"
+ * ["-"] ==> "(?:\s|\-+$)"
+ * ["-", "="] ==> "(?:\s|(?:\-+|=+)$)"
+ * ["-", "=", "--=="] ==> "(?:\s|(?:\-+|=+|(?:\-\-==)+)$)" ==> https://jex.im/regulex/#!embed=false&flags=&re=(%3F%3A%5Cs%7C(%3F%3A%5C-%2B%7C%3D%2B%7C(%3F%3A%5C-%5C-%3D%3D)%2B)%24)
+ */
+ if (exceptions.length === 0) {
+
+ // a space.
+ pattern += "\\s";
+ } else {
+
+ // a space or...
+ pattern += "(?:\\s|";
+
+ if (exceptions.length === 1) {
+
+ // a sequence of the exception pattern.
+ pattern += escapeAndRepeat(exceptions[0]);
+ } else {
+
+ // a sequence of one of the exception patterns.
+ pattern += "(?:";
+ pattern += exceptions.map(escapeAndRepeat).join("|");
+ pattern += ")";
+ }
+ pattern += `(?:$|[${Array.from(astUtils.LINEBREAKS).join("")}]))`;
+ }
+
+ return pattern;
+}
+
+/**
+ * Creates RegExp object for `always` mode.
+ * Generated pattern for beginning of comment:
+ *
+ * 1. First, a marker or nothing.
+ * 2. Next, a space or an exception pattern sequence.
+ *
+ * @param {string[]} markers - A marker list.
+ * @param {string[]} exceptions - An exception pattern list.
+ * @returns {RegExp} A RegExp object for the beginning of a comment in `always` mode.
+ */
+function createAlwaysStylePattern(markers, exceptions) {
+ let pattern = "^";
+
+ /*
+ * A marker or nothing.
+ * ["*"] ==> "\*?"
+ * ["*", "!"] ==> "(?:\*|!)?"
+ * ["*", "/", "!<"] ==> "(?:\*|\/|(?:!<))?" ==> https://jex.im/regulex/#!embed=false&flags=&re=(%3F%3A%5C*%7C%5C%2F%7C(%3F%3A!%3C))%3F
+ */
+ if (markers.length === 1) {
+
+ // the marker.
+ pattern += escape(markers[0]);
+ } else {
+
+ // one of markers.
+ pattern += "(?:";
+ pattern += markers.map(escape).join("|");
+ pattern += ")";
+ }
+
+ pattern += "?"; // or nothing.
+ pattern += createExceptionsPattern(exceptions);
+
+ return new RegExp(pattern);
+}
+
+/**
+ * Creates RegExp object for `never` mode.
+ * Generated pattern for beginning of comment:
+ *
+ * 1. First, a marker or nothing (captured).
+ * 2. Next, a space or a tab.
+ *
+ * @param {string[]} markers - A marker list.
+ * @returns {RegExp} A RegExp object for `never` mode.
+ */
+function createNeverStylePattern(markers) {
+ const pattern = `^(${markers.map(escape).join("|")})?[ \t]+`;
+
+ return new RegExp(pattern);
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce consistent spacing after the `//` or `/*` in a comment",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ fixable: "whitespace",
+
+ schema: [
+ {
+ enum: ["always", "never"]
+ },
+ {
+ type: "object",
+ properties: {
+ exceptions: {
+ type: "array",
+ items: {
+ type: "string"
+ }
+ },
+ markers: {
+ type: "array",
+ items: {
+ type: "string"
+ }
+ },
+ line: {
+ type: "object",
+ properties: {
+ exceptions: {
+ type: "array",
+ items: {
+ type: "string"
+ }
+ },
+ markers: {
+ type: "array",
+ items: {
+ type: "string"
+ }
+ }
+ },
+ additionalProperties: false
+ },
+ block: {
+ type: "object",
+ properties: {
+ exceptions: {
+ type: "array",
+ items: {
+ type: "string"
+ }
+ },
+ markers: {
+ type: "array",
+ items: {
+ type: "string"
+ }
+ },
+ balanced: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+
+ const sourceCode = context.getSourceCode();
+
+ // Unless the first option is never, require a space
+ const requireSpace = context.options[0] !== "never";
+
+ /*
+ * Parse the second options.
+ * If markers don't include `"*"`, it's added automatically for JSDoc
+ * comments.
+ */
+ const config = context.options[1] || {};
+ const balanced = config.block && config.block.balanced;
+
+ const styleRules = ["block", "line"].reduce((rule, type) => {
+ const markers = parseMarkersOption(config[type] && config[type].markers || config.markers);
+ const exceptions = config[type] && config[type].exceptions || config.exceptions || [];
+ const endNeverPattern = "[ \t]+$";
+
+ // Create RegExp object for valid patterns.
+ rule[type] = {
+ beginRegex: requireSpace ? createAlwaysStylePattern(markers, exceptions) : createNeverStylePattern(markers),
+ endRegex: balanced && requireSpace ? new RegExp(`${createExceptionsPattern(exceptions)}$`) : new RegExp(endNeverPattern),
+ hasExceptions: exceptions.length > 0,
+ markers: new RegExp(`^(${markers.map(escape).join("|")})`)
+ };
+
+ return rule;
+ }, {});
+
+ /**
+ * Reports a beginning spacing error with an appropriate message.
+ * @param {ASTNode} node - A comment node to check.
+ * @param {string} message - An error message to report.
+ * @param {Array} match - An array of match results for markers.
+ * @param {string} refChar - Character used for reference in the error message.
+ * @returns {void}
+ */
+ function reportBegin(node, message, match, refChar) {
+ const type = node.type.toLowerCase(),
+ commentIdentifier = type === "block" ? "/*" : "//";
+
+ context.report({
+ node,
+ fix(fixer) {
+ const start = node.range[0];
+ let end = start + 2;
+
+ if (requireSpace) {
+ if (match) {
+ end += match[0].length;
+ }
+ return fixer.insertTextAfterRange([start, end], " ");
+ }
+ end += match[0].length;
+ return fixer.replaceTextRange([start, end], commentIdentifier + (match[1] ? match[1] : ""));
+
+ },
+ message,
+ data: { refChar }
+ });
+ }
+
+ /**
+ * Reports an ending spacing error with an appropriate message.
+ * @param {ASTNode} node - A comment node to check.
+ * @param {string} message - An error message to report.
+ * @param {string} match - An array of the matched whitespace characters.
+ * @returns {void}
+ */
+ function reportEnd(node, message, match) {
+ context.report({
+ node,
+ fix(fixer) {
+ if (requireSpace) {
+ return fixer.insertTextAfterRange([node.range[0], node.range[1] - 2], " ");
+ }
+ const end = node.range[1] - 2,
+ start = end - match[0].length;
+
+ return fixer.replaceTextRange([start, end], "");
+
+ },
+ message
+ });
+ }
+
+ /**
+ * Reports a given comment if it's invalid.
+ * @param {ASTNode} node - a comment node to check.
+ * @returns {void}
+ */
+ function checkCommentForSpace(node) {
+ const type = node.type.toLowerCase(),
+ rule = styleRules[type],
+ commentIdentifier = type === "block" ? "/*" : "//";
+
+ // Ignores empty comments.
+ if (node.value.length === 0) {
+ return;
+ }
+
+ const beginMatch = rule.beginRegex.exec(node.value);
+ const endMatch = rule.endRegex.exec(node.value);
+
+ // Checks.
+ if (requireSpace) {
+ if (!beginMatch) {
+ const hasMarker = rule.markers.exec(node.value);
+ const marker = hasMarker ? commentIdentifier + hasMarker[0] : commentIdentifier;
+
+ if (rule.hasExceptions) {
+ reportBegin(node, "Expected exception block, space or tab after '{{refChar}}' in comment.", hasMarker, marker);
+ } else {
+ reportBegin(node, "Expected space or tab after '{{refChar}}' in comment.", hasMarker, marker);
+ }
+ }
+
+ if (balanced && type === "block" && !endMatch) {
+ reportEnd(node, "Expected space or tab before '*/' in comment.");
+ }
+ } else {
+ if (beginMatch) {
+ if (!beginMatch[1]) {
+ reportBegin(node, "Unexpected space or tab after '{{refChar}}' in comment.", beginMatch, commentIdentifier);
+ } else {
+ reportBegin(node, "Unexpected space or tab after marker ({{refChar}}) in comment.", beginMatch, beginMatch[1]);
+ }
+ }
+
+ if (balanced && type === "block" && endMatch) {
+ reportEnd(node, "Unexpected space or tab before '*/' in comment.", endMatch);
+ }
+ }
+ }
+
+ return {
+ Program() {
+ const comments = sourceCode.getAllComments();
+
+ comments.filter(token => token.type !== "Shebang").forEach(checkCommentForSpace);
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/strict.js b/tools/node_modules/eslint/lib/rules/strict.js
new file mode 100644
index 0000000000..433b471367
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/strict.js
@@ -0,0 +1,277 @@
+/**
+ * @fileoverview Rule to control usage of strict mode directives.
+ * @author Brandon Mills
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+const messages = {
+ function: "Use the function form of 'use strict'.",
+ global: "Use the global form of 'use strict'.",
+ multiple: "Multiple 'use strict' directives.",
+ never: "Strict mode is not permitted.",
+ unnecessary: "Unnecessary 'use strict' directive.",
+ module: "'use strict' is unnecessary inside of modules.",
+ implied: "'use strict' is unnecessary when implied strict mode is enabled.",
+ unnecessaryInClasses: "'use strict' is unnecessary inside of classes.",
+ nonSimpleParameterList: "'use strict' directive inside a function with non-simple parameter list throws a syntax error since ES2016.",
+ wrap: "Wrap {{name}} in a function with 'use strict' directive."
+};
+
+/**
+ * Gets all of the Use Strict Directives in the Directive Prologue of a group of
+ * statements.
+ * @param {ASTNode[]} statements Statements in the program or function body.
+ * @returns {ASTNode[]} All of the Use Strict Directives.
+ */
+function getUseStrictDirectives(statements) {
+ const directives = [];
+
+ for (let i = 0; i < statements.length; i++) {
+ const statement = statements[i];
+
+ if (
+ statement.type === "ExpressionStatement" &&
+ statement.expression.type === "Literal" &&
+ statement.expression.value === "use strict"
+ ) {
+ directives[i] = statement;
+ } else {
+ break;
+ }
+ }
+
+ return directives;
+}
+
+/**
+ * Checks whether a given parameter is a simple parameter.
+ *
+ * @param {ASTNode} node - A pattern node to check.
+ * @returns {boolean} `true` if the node is an Identifier node.
+ */
+function isSimpleParameter(node) {
+ return node.type === "Identifier";
+}
+
+/**
+ * Checks whether a given parameter list is a simple parameter list.
+ *
+ * @param {ASTNode[]} params - A parameter list to check.
+ * @returns {boolean} `true` if the every parameter is an Identifier node.
+ */
+function isSimpleParameterList(params) {
+ return params.every(isSimpleParameter);
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require or disallow strict mode directives",
+ category: "Strict Mode",
+ recommended: false
+ },
+
+ schema: [
+ {
+ enum: ["never", "global", "function", "safe"]
+ }
+ ],
+
+ fixable: "code"
+ },
+
+ create(context) {
+
+ const ecmaFeatures = context.parserOptions.ecmaFeatures || {},
+ scopes = [],
+ classScopes = [];
+ let mode = context.options[0] || "safe";
+
+ if (ecmaFeatures.impliedStrict) {
+ mode = "implied";
+ } else if (mode === "safe") {
+ mode = ecmaFeatures.globalReturn ? "global" : "function";
+ }
+
+ /**
+ * Determines whether a reported error should be fixed, depending on the error type.
+ * @param {string} errorType The type of error
+ * @returns {boolean} `true` if the reported error should be fixed
+ */
+ function shouldFix(errorType) {
+ return errorType === "multiple" || errorType === "unnecessary" || errorType === "module" || errorType === "implied" || errorType === "unnecessaryInClasses";
+ }
+
+ /**
+ * Gets a fixer function to remove a given 'use strict' directive.
+ * @param {ASTNode} node The directive that should be removed
+ * @returns {Function} A fixer function
+ */
+ function getFixFunction(node) {
+ return fixer => fixer.remove(node);
+ }
+
+ /**
+ * Report a slice of an array of nodes with a given message.
+ * @param {ASTNode[]} nodes Nodes.
+ * @param {string} start Index to start from.
+ * @param {string} end Index to end before.
+ * @param {string} message Message to display.
+ * @param {boolean} fix `true` if the directive should be fixed (i.e. removed)
+ * @returns {void}
+ */
+ function reportSlice(nodes, start, end, message, fix) {
+ nodes.slice(start, end).forEach(node => {
+ context.report({ node, message, fix: fix ? getFixFunction(node) : null });
+ });
+ }
+
+ /**
+ * Report all nodes in an array with a given message.
+ * @param {ASTNode[]} nodes Nodes.
+ * @param {string} message Message to display.
+ * @param {boolean} fix `true` if the directive should be fixed (i.e. removed)
+ * @returns {void}
+ */
+ function reportAll(nodes, message, fix) {
+ reportSlice(nodes, 0, nodes.length, message, fix);
+ }
+
+ /**
+ * Report all nodes in an array, except the first, with a given message.
+ * @param {ASTNode[]} nodes Nodes.
+ * @param {string} message Message to display.
+ * @param {boolean} fix `true` if the directive should be fixed (i.e. removed)
+ * @returns {void}
+ */
+ function reportAllExceptFirst(nodes, message, fix) {
+ reportSlice(nodes, 1, nodes.length, message, fix);
+ }
+
+ /**
+ * Entering a function in 'function' mode pushes a new nested scope onto the
+ * stack. The new scope is true if the nested function is strict mode code.
+ * @param {ASTNode} node The function declaration or expression.
+ * @param {ASTNode[]} useStrictDirectives The Use Strict Directives of the node.
+ * @returns {void}
+ */
+ function enterFunctionInFunctionMode(node, useStrictDirectives) {
+ const isInClass = classScopes.length > 0,
+ isParentGlobal = scopes.length === 0 && classScopes.length === 0,
+ isParentStrict = scopes.length > 0 && scopes[scopes.length - 1],
+ isStrict = useStrictDirectives.length > 0;
+
+ if (isStrict) {
+ if (!isSimpleParameterList(node.params)) {
+ context.report({ node: useStrictDirectives[0], message: messages.nonSimpleParameterList });
+ } else if (isParentStrict) {
+ context.report({ node: useStrictDirectives[0], message: messages.unnecessary, fix: getFixFunction(useStrictDirectives[0]) });
+ } else if (isInClass) {
+ context.report({ node: useStrictDirectives[0], message: messages.unnecessaryInClasses, fix: getFixFunction(useStrictDirectives[0]) });
+ }
+
+ reportAllExceptFirst(useStrictDirectives, messages.multiple, true);
+ } else if (isParentGlobal) {
+ if (isSimpleParameterList(node.params)) {
+ context.report({ node, message: messages.function });
+ } else {
+ context.report({
+ node,
+ message: messages.wrap,
+ data: { name: astUtils.getFunctionNameWithKind(node) }
+ });
+ }
+ }
+
+ scopes.push(isParentStrict || isStrict);
+ }
+
+ /**
+ * Exiting a function in 'function' mode pops its scope off the stack.
+ * @returns {void}
+ */
+ function exitFunctionInFunctionMode() {
+ scopes.pop();
+ }
+
+ /**
+ * Enter a function and either:
+ * - Push a new nested scope onto the stack (in 'function' mode).
+ * - Report all the Use Strict Directives (in the other modes).
+ * @param {ASTNode} node The function declaration or expression.
+ * @returns {void}
+ */
+ function enterFunction(node) {
+ const isBlock = node.body.type === "BlockStatement",
+ useStrictDirectives = isBlock
+ ? getUseStrictDirectives(node.body.body) : [];
+
+ if (mode === "function") {
+ enterFunctionInFunctionMode(node, useStrictDirectives);
+ } else if (useStrictDirectives.length > 0) {
+ if (isSimpleParameterList(node.params)) {
+ reportAll(useStrictDirectives, messages[mode], shouldFix(mode));
+ } else {
+ context.report({ node: useStrictDirectives[0], message: messages.nonSimpleParameterList });
+ reportAllExceptFirst(useStrictDirectives, messages.multiple, true);
+ }
+ }
+ }
+
+ const rule = {
+ Program(node) {
+ const useStrictDirectives = getUseStrictDirectives(node.body);
+
+ if (node.sourceType === "module") {
+ mode = "module";
+ }
+
+ if (mode === "global") {
+ if (node.body.length > 0 && useStrictDirectives.length === 0) {
+ context.report({ node, message: messages.global });
+ }
+ reportAllExceptFirst(useStrictDirectives, messages.multiple, true);
+ } else {
+ reportAll(useStrictDirectives, messages[mode], shouldFix(mode));
+ }
+ },
+ FunctionDeclaration: enterFunction,
+ FunctionExpression: enterFunction,
+ ArrowFunctionExpression: enterFunction
+ };
+
+ if (mode === "function") {
+ Object.assign(rule, {
+
+ // Inside of class bodies are always strict mode.
+ ClassBody() {
+ classScopes.push(true);
+ },
+ "ClassBody:exit"() {
+ classScopes.pop();
+ },
+
+ "FunctionDeclaration:exit": exitFunctionInFunctionMode,
+ "FunctionExpression:exit": exitFunctionInFunctionMode,
+ "ArrowFunctionExpression:exit": exitFunctionInFunctionMode
+ });
+ }
+
+ return rule;
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/switch-colon-spacing.js b/tools/node_modules/eslint/lib/rules/switch-colon-spacing.js
new file mode 100644
index 0000000000..400e850997
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/switch-colon-spacing.js
@@ -0,0 +1,133 @@
+/**
+ * @fileoverview Rule to enforce spacing around colons of switch statements.
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce spacing around colons of switch statements",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+ schema: [
+ {
+ type: "object",
+ properties: {
+ before: { type: "boolean" },
+ after: { type: "boolean" }
+ },
+ additionalProperties: false
+ }
+ ],
+ fixable: "whitespace"
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+ const options = context.options[0] || {};
+ const beforeSpacing = options.before === true; // false by default
+ const afterSpacing = options.after !== false; // true by default
+
+ /**
+ * Get the colon token of the given SwitchCase node.
+ * @param {ASTNode} node The SwitchCase node to get.
+ * @returns {Token} The colon token of the node.
+ */
+ function getColonToken(node) {
+ if (node.test) {
+ return sourceCode.getTokenAfter(node.test, astUtils.isColonToken);
+ }
+ return sourceCode.getFirstToken(node, 1);
+ }
+
+ /**
+ * Check whether the spacing between the given 2 tokens is valid or not.
+ * @param {Token} left The left token to check.
+ * @param {Token} right The right token to check.
+ * @param {boolean} expected The expected spacing to check. `true` if there should be a space.
+ * @returns {boolean} `true` if the spacing between the tokens is valid.
+ */
+ function isValidSpacing(left, right, expected) {
+ return (
+ astUtils.isClosingBraceToken(right) ||
+ !astUtils.isTokenOnSameLine(left, right) ||
+ sourceCode.isSpaceBetweenTokens(left, right) === expected
+ );
+ }
+
+ /**
+ * Check whether comments exist between the given 2 tokens.
+ * @param {Token} left The left token to check.
+ * @param {Token} right The right token to check.
+ * @returns {boolean} `true` if comments exist between the given 2 tokens.
+ */
+ function commentsExistBetween(left, right) {
+ return sourceCode.getFirstTokenBetween(
+ left,
+ right,
+ {
+ includeComments: true,
+ filter: astUtils.isCommentToken
+ }
+ ) !== null;
+ }
+
+ /**
+ * Fix the spacing between the given 2 tokens.
+ * @param {RuleFixer} fixer The fixer to fix.
+ * @param {Token} left The left token of fix range.
+ * @param {Token} right The right token of fix range.
+ * @param {boolean} spacing The spacing style. `true` if there should be a space.
+ * @returns {Fix|null} The fix object.
+ */
+ function fix(fixer, left, right, spacing) {
+ if (commentsExistBetween(left, right)) {
+ return null;
+ }
+ if (spacing) {
+ return fixer.insertTextAfter(left, " ");
+ }
+ return fixer.removeRange([left.range[1], right.range[0]]);
+ }
+
+ return {
+ SwitchCase(node) {
+ const colonToken = getColonToken(node);
+ const beforeToken = sourceCode.getTokenBefore(colonToken);
+ const afterToken = sourceCode.getTokenAfter(colonToken);
+
+ if (!isValidSpacing(beforeToken, colonToken, beforeSpacing)) {
+ context.report({
+ node,
+ loc: colonToken.loc,
+ message: "{{verb}} space(s) before this colon.",
+ data: { verb: beforeSpacing ? "Expected" : "Unexpected" },
+ fix: fixer => fix(fixer, beforeToken, colonToken, beforeSpacing)
+ });
+ }
+ if (!isValidSpacing(colonToken, afterToken, afterSpacing)) {
+ context.report({
+ node,
+ loc: colonToken.loc,
+ message: "{{verb}} space(s) after this colon.",
+ data: { verb: afterSpacing ? "Expected" : "Unexpected" },
+ fix: fixer => fix(fixer, colonToken, afterToken, afterSpacing)
+ });
+ }
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/symbol-description.js b/tools/node_modules/eslint/lib/rules/symbol-description.js
new file mode 100644
index 0000000000..3f5ffd7463
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/symbol-description.js
@@ -0,0 +1,66 @@
+/**
+ * @fileoverview Rule to enforce description with the `Symbol` object
+ * @author Jarek Rencz
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require symbol descriptions",
+ category: "ECMAScript 6",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ /**
+ * Reports if node does not conform the rule in case rule is set to
+ * report missing description
+ *
+ * @param {ASTNode} node - A CallExpression node to check.
+ * @returns {void}
+ */
+ function checkArgument(node) {
+ if (node.arguments.length === 0) {
+ context.report({
+ node,
+ message: "Expected Symbol to have a description."
+ });
+ }
+ }
+
+ return {
+ "Program:exit"() {
+ const scope = context.getScope();
+ const variable = astUtils.getVariableByName(scope, "Symbol");
+
+ if (variable && variable.defs.length === 0) {
+ variable.references.forEach(reference => {
+ const node = reference.identifier;
+
+ if (astUtils.isCallee(node)) {
+ checkArgument(node.parent);
+ }
+ });
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/template-curly-spacing.js b/tools/node_modules/eslint/lib/rules/template-curly-spacing.js
new file mode 100644
index 0000000000..1d491a24c9
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/template-curly-spacing.js
@@ -0,0 +1,121 @@
+/**
+ * @fileoverview Rule to enforce spacing around embedded expressions of template strings
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+const OPEN_PAREN = /\$\{$/;
+const CLOSE_PAREN = /^\}/;
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require or disallow spacing around embedded expressions of template strings",
+ category: "ECMAScript 6",
+ recommended: false
+ },
+
+ fixable: "whitespace",
+
+ schema: [
+ { enum: ["always", "never"] }
+ ]
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+ const always = context.options[0] === "always";
+ const prefix = always ? "Expected" : "Unexpected";
+
+ /**
+ * Checks spacing before `}` of a given token.
+ * @param {Token} token - A token to check. This is a Template token.
+ * @returns {void}
+ */
+ function checkSpacingBefore(token) {
+ const prevToken = sourceCode.getTokenBefore(token);
+
+ if (prevToken &&
+ CLOSE_PAREN.test(token.value) &&
+ astUtils.isTokenOnSameLine(prevToken, token) &&
+ sourceCode.isSpaceBetweenTokens(prevToken, token) !== always
+ ) {
+ context.report({
+ loc: token.loc.start,
+ message: "{{prefix}} space(s) before '}'.",
+ data: {
+ prefix
+ },
+ fix(fixer) {
+ if (always) {
+ return fixer.insertTextBefore(token, " ");
+ }
+ return fixer.removeRange([
+ prevToken.range[1],
+ token.range[0]
+ ]);
+ }
+ });
+ }
+ }
+
+ /**
+ * Checks spacing after `${` of a given token.
+ * @param {Token} token - A token to check. This is a Template token.
+ * @returns {void}
+ */
+ function checkSpacingAfter(token) {
+ const nextToken = sourceCode.getTokenAfter(token);
+
+ if (nextToken &&
+ OPEN_PAREN.test(token.value) &&
+ astUtils.isTokenOnSameLine(token, nextToken) &&
+ sourceCode.isSpaceBetweenTokens(token, nextToken) !== always
+ ) {
+ context.report({
+ loc: {
+ line: token.loc.end.line,
+ column: token.loc.end.column - 2
+ },
+ message: "{{prefix}} space(s) after '${'.",
+ data: {
+ prefix
+ },
+ fix(fixer) {
+ if (always) {
+ return fixer.insertTextAfter(token, " ");
+ }
+ return fixer.removeRange([
+ token.range[1],
+ nextToken.range[0]
+ ]);
+ }
+ });
+ }
+ }
+
+ return {
+ TemplateElement(node) {
+ const token = sourceCode.getFirstToken(node);
+
+ checkSpacingBefore(token);
+ checkSpacingAfter(token);
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/template-tag-spacing.js b/tools/node_modules/eslint/lib/rules/template-tag-spacing.js
new file mode 100755
index 0000000000..907c537ff3
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/template-tag-spacing.js
@@ -0,0 +1,77 @@
+/**
+ * @fileoverview Rule to check spacing between template tags and their literals
+ * @author Jonathan Wilsson
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require or disallow spacing between template tags and their literals",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ fixable: "whitespace",
+
+ schema: [
+ { enum: ["always", "never"] }
+ ]
+ },
+
+ create(context) {
+ const never = context.options[0] !== "always";
+ const sourceCode = context.getSourceCode();
+
+ /**
+ * Check if a space is present between a template tag and its literal
+ * @param {ASTNode} node node to evaluate
+ * @returns {void}
+ * @private
+ */
+ function checkSpacing(node) {
+ const tagToken = sourceCode.getTokenBefore(node.quasi);
+ const literalToken = sourceCode.getFirstToken(node.quasi);
+ const hasWhitespace = sourceCode.isSpaceBetweenTokens(tagToken, literalToken);
+
+ if (never && hasWhitespace) {
+ context.report({
+ node,
+ loc: tagToken.loc.start,
+ message: "Unexpected space between template tag and template literal.",
+ fix(fixer) {
+ const comments = sourceCode.getCommentsBefore(node.quasi);
+
+ // Don't fix anything if there's a single line comment after the template tag
+ if (comments.some(comment => comment.type === "Line")) {
+ return null;
+ }
+
+ return fixer.replaceTextRange(
+ [tagToken.range[1], literalToken.range[0]],
+ comments.reduce((text, comment) => text + sourceCode.getText(comment), "")
+ );
+ }
+ });
+ } else if (!never && !hasWhitespace) {
+ context.report({
+ node,
+ loc: tagToken.loc.start,
+ message: "Missing space between template tag and template literal.",
+ fix(fixer) {
+ return fixer.insertTextAfter(tagToken, " ");
+ }
+ });
+ }
+ }
+
+ return {
+ TaggedTemplateExpression: checkSpacing
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/unicode-bom.js b/tools/node_modules/eslint/lib/rules/unicode-bom.js
new file mode 100644
index 0000000000..7109a49edb
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/unicode-bom.js
@@ -0,0 +1,66 @@
+/**
+ * @fileoverview Require or disallow Unicode BOM
+ * @author Andrew Johnston <https://github.com/ehjay>
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require or disallow Unicode byte order mark (BOM)",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ fixable: "whitespace",
+
+ schema: [
+ {
+ enum: ["always", "never"]
+ }
+ ]
+ },
+
+ create(context) {
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+
+ Program: function checkUnicodeBOM(node) {
+
+ const sourceCode = context.getSourceCode(),
+ location = { column: 0, line: 1 },
+ requireBOM = context.options[0] || "never";
+
+ if (!sourceCode.hasBOM && (requireBOM === "always")) {
+ context.report({
+ node,
+ loc: location,
+ message: "Expected Unicode BOM (Byte Order Mark).",
+ fix(fixer) {
+ return fixer.insertTextBeforeRange([0, 1], "\uFEFF");
+ }
+ });
+ } else if (sourceCode.hasBOM && (requireBOM === "never")) {
+ context.report({
+ node,
+ loc: location,
+ message: "Unexpected Unicode BOM (Byte Order Mark).",
+ fix(fixer) {
+ return fixer.removeRange([-1, 0]);
+ }
+ });
+ }
+ }
+
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/use-isnan.js b/tools/node_modules/eslint/lib/rules/use-isnan.js
new file mode 100644
index 0000000000..5ec48a0386
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/use-isnan.js
@@ -0,0 +1,34 @@
+/**
+ * @fileoverview Rule to flag comparisons to the value NaN
+ * @author James Allardice
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require calls to `isNaN()` when checking for `NaN`",
+ category: "Possible Errors",
+ recommended: true
+ },
+
+ schema: []
+ },
+
+ create(context) {
+
+ return {
+ BinaryExpression(node) {
+ if (/^(?:[<>]|[!=]=)=?$/.test(node.operator) && (node.left.name === "NaN" || node.right.name === "NaN")) {
+ context.report({ node, message: "Use the isNaN function to compare with NaN." });
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/valid-jsdoc.js b/tools/node_modules/eslint/lib/rules/valid-jsdoc.js
new file mode 100644
index 0000000000..ea60b115ce
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/valid-jsdoc.js
@@ -0,0 +1,423 @@
+/**
+ * @fileoverview Validates JSDoc comments are syntactically correct
+ * @author Nicholas C. Zakas
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const doctrine = require("doctrine");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce valid JSDoc comments",
+ category: "Possible Errors",
+ recommended: false
+ },
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ prefer: {
+ type: "object",
+ additionalProperties: {
+ type: "string"
+ }
+ },
+ preferType: {
+ type: "object",
+ additionalProperties: {
+ type: "string"
+ }
+ },
+ requireReturn: {
+ type: "boolean"
+ },
+ requireParamDescription: {
+ type: "boolean"
+ },
+ requireReturnDescription: {
+ type: "boolean"
+ },
+ matchDescription: {
+ type: "string"
+ },
+ requireReturnType: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+
+ const options = context.options[0] || {},
+ prefer = options.prefer || {},
+ sourceCode = context.getSourceCode(),
+
+ // these both default to true, so you have to explicitly make them false
+ requireReturn = options.requireReturn !== false,
+ requireParamDescription = options.requireParamDescription !== false,
+ requireReturnDescription = options.requireReturnDescription !== false,
+ requireReturnType = options.requireReturnType !== false,
+ preferType = options.preferType || {},
+ checkPreferType = Object.keys(preferType).length !== 0;
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ // Using a stack to store if a function returns or not (handling nested functions)
+ const fns = [];
+
+ /**
+ * Check if node type is a Class
+ * @param {ASTNode} node node to check.
+ * @returns {boolean} True is its a class
+ * @private
+ */
+ function isTypeClass(node) {
+ return node.type === "ClassExpression" || node.type === "ClassDeclaration";
+ }
+
+ /**
+ * When parsing a new function, store it in our function stack.
+ * @param {ASTNode} node A function node to check.
+ * @returns {void}
+ * @private
+ */
+ function startFunction(node) {
+ fns.push({
+ returnPresent: (node.type === "ArrowFunctionExpression" && node.body.type !== "BlockStatement") ||
+ isTypeClass(node)
+ });
+ }
+
+ /**
+ * Indicate that return has been found in the current function.
+ * @param {ASTNode} node The return node.
+ * @returns {void}
+ * @private
+ */
+ function addReturn(node) {
+ const functionState = fns[fns.length - 1];
+
+ if (functionState && node.argument !== null) {
+ functionState.returnPresent = true;
+ }
+ }
+
+ /**
+ * Check if return tag type is void or undefined
+ * @param {Object} tag JSDoc tag
+ * @returns {boolean} True if its of type void or undefined
+ * @private
+ */
+ function isValidReturnType(tag) {
+ return tag.type === null || tag.type.name === "void" || tag.type.type === "UndefinedLiteral";
+ }
+
+ /**
+ * Check if type should be validated based on some exceptions
+ * @param {Object} type JSDoc tag
+ * @returns {boolean} True if it can be validated
+ * @private
+ */
+ function canTypeBeValidated(type) {
+ return type !== "UndefinedLiteral" && // {undefined} as there is no name property available.
+ type !== "NullLiteral" && // {null}
+ type !== "NullableLiteral" && // {?}
+ type !== "FunctionType" && // {function(a)}
+ type !== "AllLiteral"; // {*}
+ }
+
+ /**
+ * Extract the current and expected type based on the input type object
+ * @param {Object} type JSDoc tag
+ * @returns {Object} current and expected type object
+ * @private
+ */
+ function getCurrentExpectedTypes(type) {
+ let currentType;
+
+ if (type.name) {
+ currentType = type.name;
+ } else if (type.expression) {
+ currentType = type.expression.name;
+ }
+
+ const expectedType = currentType && preferType[currentType];
+
+ return {
+ currentType,
+ expectedType
+ };
+ }
+
+ /**
+ * Validate type for a given JSDoc node
+ * @param {Object} jsdocNode JSDoc node
+ * @param {Object} type JSDoc tag
+ * @returns {void}
+ * @private
+ */
+ function validateType(jsdocNode, type) {
+ if (!type || !canTypeBeValidated(type.type)) {
+ return;
+ }
+
+ const typesToCheck = [];
+ let elements = [];
+
+ switch (type.type) {
+ case "TypeApplication": // {Array.<String>}
+ elements = type.applications[0].type === "UnionType" ? type.applications[0].elements : type.applications;
+ typesToCheck.push(getCurrentExpectedTypes(type));
+ break;
+ case "RecordType": // {{20:String}}
+ elements = type.fields;
+ break;
+ case "UnionType": // {String|number|Test}
+ case "ArrayType": // {[String, number, Test]}
+ elements = type.elements;
+ break;
+ case "FieldType": // Array.<{count: number, votes: number}>
+ if (type.value) {
+ typesToCheck.push(getCurrentExpectedTypes(type.value));
+ }
+ break;
+ default:
+ typesToCheck.push(getCurrentExpectedTypes(type));
+ }
+
+ elements.forEach(validateType.bind(null, jsdocNode));
+
+ typesToCheck.forEach(typeToCheck => {
+ if (typeToCheck.expectedType &&
+ typeToCheck.expectedType !== typeToCheck.currentType) {
+ context.report({
+ node: jsdocNode,
+ message: "Use '{{expectedType}}' instead of '{{currentType}}'.",
+ data: {
+ currentType: typeToCheck.currentType,
+ expectedType: typeToCheck.expectedType
+ }
+ });
+ }
+ });
+ }
+
+ /**
+ * Validate the JSDoc node and output warnings if anything is wrong.
+ * @param {ASTNode} node The AST node to check.
+ * @returns {void}
+ * @private
+ */
+ function checkJSDoc(node) {
+ const jsdocNode = sourceCode.getJSDocComment(node),
+ functionData = fns.pop(),
+ params = Object.create(null),
+ paramsTags = [];
+ let hasReturns = false,
+ returnsTag,
+ hasConstructor = false,
+ isInterface = false,
+ isOverride = false,
+ isAbstract = false;
+
+ // make sure only to validate JSDoc comments
+ if (jsdocNode) {
+ let jsdoc;
+
+ try {
+ jsdoc = doctrine.parse(jsdocNode.value, {
+ strict: true,
+ unwrap: true,
+ sloppy: true
+ });
+ } catch (ex) {
+
+ if (/braces/i.test(ex.message)) {
+ context.report({ node: jsdocNode, message: "JSDoc type missing brace." });
+ } else {
+ context.report({ node: jsdocNode, message: "JSDoc syntax error." });
+ }
+
+ return;
+ }
+
+ jsdoc.tags.forEach(tag => {
+
+ switch (tag.title.toLowerCase()) {
+
+ case "param":
+ case "arg":
+ case "argument":
+ paramsTags.push(tag);
+ break;
+
+ case "return":
+ case "returns":
+ hasReturns = true;
+ returnsTag = tag;
+ break;
+
+ case "constructor":
+ case "class":
+ hasConstructor = true;
+ break;
+
+ case "override":
+ case "inheritdoc":
+ isOverride = true;
+ break;
+
+ case "abstract":
+ case "virtual":
+ isAbstract = true;
+ break;
+
+ case "interface":
+ isInterface = true;
+ break;
+
+ // no default
+ }
+
+ // check tag preferences
+ if (prefer.hasOwnProperty(tag.title) && tag.title !== prefer[tag.title]) {
+ context.report({ node: jsdocNode, message: "Use @{{name}} instead.", data: { name: prefer[tag.title] } });
+ }
+
+ // validate the types
+ if (checkPreferType && tag.type) {
+ validateType(jsdocNode, tag.type);
+ }
+ });
+
+ paramsTags.forEach(param => {
+ if (!param.type) {
+ context.report({ node: jsdocNode, message: "Missing JSDoc parameter type for '{{name}}'.", data: { name: param.name } });
+ }
+ if (!param.description && requireParamDescription) {
+ context.report({ node: jsdocNode, message: "Missing JSDoc parameter description for '{{name}}'.", data: { name: param.name } });
+ }
+ if (params[param.name]) {
+ context.report({ node: jsdocNode, message: "Duplicate JSDoc parameter '{{name}}'.", data: { name: param.name } });
+ } else if (param.name.indexOf(".") === -1) {
+ params[param.name] = 1;
+ }
+ });
+
+ if (hasReturns) {
+ if (!requireReturn && !functionData.returnPresent && (returnsTag.type === null || !isValidReturnType(returnsTag)) && !isAbstract) {
+ context.report({
+ node: jsdocNode,
+ message: "Unexpected @{{title}} tag; function has no return statement.",
+ data: {
+ title: returnsTag.title
+ }
+ });
+ } else {
+ if (requireReturnType && !returnsTag.type) {
+ context.report({ node: jsdocNode, message: "Missing JSDoc return type." });
+ }
+
+ if (!isValidReturnType(returnsTag) && !returnsTag.description && requireReturnDescription) {
+ context.report({ node: jsdocNode, message: "Missing JSDoc return description." });
+ }
+ }
+ }
+
+ // check for functions missing @returns
+ if (!isOverride && !hasReturns && !hasConstructor && !isInterface &&
+ node.parent.kind !== "get" && node.parent.kind !== "constructor" &&
+ node.parent.kind !== "set" && !isTypeClass(node)) {
+ if (requireReturn || functionData.returnPresent) {
+ context.report({
+ node: jsdocNode,
+ message: "Missing JSDoc @{{returns}} for function.",
+ data: {
+ returns: prefer.returns || "returns"
+ }
+ });
+ }
+ }
+
+ // check the parameters
+ const jsdocParams = Object.keys(params);
+
+ if (node.params) {
+ node.params.forEach((param, i) => {
+ if (param.type === "AssignmentPattern") {
+ param = param.left;
+ }
+
+ const name = param.name;
+
+ // TODO(nzakas): Figure out logical things to do with destructured, default, rest params
+ if (param.type === "Identifier") {
+ if (jsdocParams[i] && (name !== jsdocParams[i])) {
+ context.report({
+ node: jsdocNode,
+ message: "Expected JSDoc for '{{name}}' but found '{{jsdocName}}'.",
+ data: {
+ name,
+ jsdocName: jsdocParams[i]
+ }
+ });
+ } else if (!params[name] && !isOverride) {
+ context.report({
+ node: jsdocNode,
+ message: "Missing JSDoc for parameter '{{name}}'.",
+ data: {
+ name
+ }
+ });
+ }
+ }
+ });
+ }
+
+ if (options.matchDescription) {
+ const regex = new RegExp(options.matchDescription);
+
+ if (!regex.test(jsdoc.description)) {
+ context.report({ node: jsdocNode, message: "JSDoc description does not satisfy the regex pattern." });
+ }
+ }
+
+ }
+
+ }
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+ ArrowFunctionExpression: startFunction,
+ FunctionExpression: startFunction,
+ FunctionDeclaration: startFunction,
+ ClassExpression: startFunction,
+ ClassDeclaration: startFunction,
+ "ArrowFunctionExpression:exit": checkJSDoc,
+ "FunctionExpression:exit": checkJSDoc,
+ "FunctionDeclaration:exit": checkJSDoc,
+ "ClassExpression:exit": checkJSDoc,
+ "ClassDeclaration:exit": checkJSDoc,
+ ReturnStatement: addReturn
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/valid-typeof.js b/tools/node_modules/eslint/lib/rules/valid-typeof.js
new file mode 100644
index 0000000000..fba4cc5712
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/valid-typeof.js
@@ -0,0 +1,77 @@
+/**
+ * @fileoverview Ensures that the results of typeof are compared against a valid string
+ * @author Ian Christian Myers
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce comparing `typeof` expressions against valid strings",
+ category: "Possible Errors",
+ recommended: true
+ },
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ requireStringLiterals: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+
+ const VALID_TYPES = ["symbol", "undefined", "object", "boolean", "number", "string", "function"],
+ OPERATORS = ["==", "===", "!=", "!=="];
+
+ const requireStringLiterals = context.options[0] && context.options[0].requireStringLiterals;
+
+ /**
+ * Determines whether a node is a typeof expression.
+ * @param {ASTNode} node The node
+ * @returns {boolean} `true` if the node is a typeof expression
+ */
+ function isTypeofExpression(node) {
+ return node.type === "UnaryExpression" && node.operator === "typeof";
+ }
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+
+ UnaryExpression(node) {
+ if (isTypeofExpression(node)) {
+ const parent = context.getAncestors().pop();
+
+ if (parent.type === "BinaryExpression" && OPERATORS.indexOf(parent.operator) !== -1) {
+ const sibling = parent.left === node ? parent.right : parent.left;
+
+ if (sibling.type === "Literal" || sibling.type === "TemplateLiteral" && !sibling.expressions.length) {
+ const value = sibling.type === "Literal" ? sibling.value : sibling.quasis[0].value.cooked;
+
+ if (VALID_TYPES.indexOf(value) === -1) {
+ context.report({ node: sibling, message: "Invalid typeof comparison value." });
+ }
+ } else if (requireStringLiterals && !isTypeofExpression(sibling)) {
+ context.report({ node: sibling, message: "Typeof comparisons should be to string literals." });
+ }
+ }
+ }
+ }
+
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/vars-on-top.js b/tools/node_modules/eslint/lib/rules/vars-on-top.js
new file mode 100644
index 0000000000..f74db905b1
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/vars-on-top.js
@@ -0,0 +1,149 @@
+/**
+ * @fileoverview Rule to enforce var declarations are only at the top of a function.
+ * @author Danny Fritz
+ * @author Gyandeep Singh
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require `var` declarations be placed at the top of their containing scope",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+ const errorMessage = "All 'var' declarations must be at the top of the function scope.";
+
+ //--------------------------------------------------------------------------
+ // Helpers
+ //--------------------------------------------------------------------------
+
+ /**
+ * @param {ASTNode} node - any node
+ * @returns {boolean} whether the given node structurally represents a directive
+ */
+ function looksLikeDirective(node) {
+ return node.type === "ExpressionStatement" &&
+ node.expression.type === "Literal" && typeof node.expression.value === "string";
+ }
+
+ /**
+ * Check to see if its a ES6 import declaration
+ * @param {ASTNode} node - any node
+ * @returns {boolean} whether the given node represents a import declaration
+ */
+ function looksLikeImport(node) {
+ return node.type === "ImportDeclaration" || node.type === "ImportSpecifier" ||
+ node.type === "ImportDefaultSpecifier" || node.type === "ImportNamespaceSpecifier";
+ }
+
+ /**
+ * Checks whether a given node is a variable declaration or not.
+ *
+ * @param {ASTNode} node - any node
+ * @returns {boolean} `true` if the node is a variable declaration.
+ */
+ function isVariableDeclaration(node) {
+ return (
+ node.type === "VariableDeclaration" ||
+ (
+ node.type === "ExportNamedDeclaration" &&
+ node.declaration &&
+ node.declaration.type === "VariableDeclaration"
+ )
+ );
+ }
+
+ /**
+ * Checks whether this variable is on top of the block body
+ * @param {ASTNode} node - The node to check
+ * @param {ASTNode[]} statements - collection of ASTNodes for the parent node block
+ * @returns {boolean} True if var is on top otherwise false
+ */
+ function isVarOnTop(node, statements) {
+ const l = statements.length;
+ let i = 0;
+
+ // skip over directives
+ for (; i < l; ++i) {
+ if (!looksLikeDirective(statements[i]) && !looksLikeImport(statements[i])) {
+ break;
+ }
+ }
+
+ for (; i < l; ++i) {
+ if (!isVariableDeclaration(statements[i])) {
+ return false;
+ }
+ if (statements[i] === node) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Checks whether variable is on top at the global level
+ * @param {ASTNode} node - The node to check
+ * @param {ASTNode} parent - Parent of the node
+ * @returns {void}
+ */
+ function globalVarCheck(node, parent) {
+ if (!isVarOnTop(node, parent.body)) {
+ context.report({ node, message: errorMessage });
+ }
+ }
+
+ /**
+ * Checks whether variable is on top at functional block scope level
+ * @param {ASTNode} node - The node to check
+ * @param {ASTNode} parent - Parent of the node
+ * @param {ASTNode} grandParent - Parent of the node's parent
+ * @returns {void}
+ */
+ function blockScopeVarCheck(node, parent, grandParent) {
+ if (!(/Function/.test(grandParent.type) &&
+ parent.type === "BlockStatement" &&
+ isVarOnTop(node, parent.body))) {
+ context.report({ node, message: errorMessage });
+ }
+ }
+
+ //--------------------------------------------------------------------------
+ // Public API
+ //--------------------------------------------------------------------------
+
+ return {
+ VariableDeclaration(node) {
+ const ancestors = context.getAncestors();
+ let parent = ancestors.pop();
+ let grandParent = ancestors.pop();
+
+ if (node.kind === "var") { // check variable is `var` type and not `let` or `const`
+ if (parent.type === "ExportNamedDeclaration") {
+ node = parent;
+ parent = grandParent;
+ grandParent = ancestors.pop();
+ }
+
+ if (parent.type === "Program") { // That means its a global variable
+ globalVarCheck(node, parent);
+ } else {
+ blockScopeVarCheck(node, parent, grandParent);
+ }
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/wrap-iife.js b/tools/node_modules/eslint/lib/rules/wrap-iife.js
new file mode 100644
index 0000000000..c4e6a9e0c7
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/wrap-iife.js
@@ -0,0 +1,151 @@
+/**
+ * @fileoverview Rule to flag when IIFE is not wrapped in parens
+ * @author Ilya Volodin
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require parentheses around immediate `function` invocations",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: [
+ {
+ enum: ["outside", "inside", "any"]
+ },
+ {
+ type: "object",
+ properties: {
+ functionPrototypeMethods: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ],
+
+ fixable: "code"
+ },
+
+ create(context) {
+
+ const style = context.options[0] || "outside";
+ const includeFunctionPrototypeMethods = (context.options[1] && context.options[1].functionPrototypeMethods) || false;
+
+ const sourceCode = context.getSourceCode();
+
+ /**
+ * Check if the node is wrapped in ()
+ * @param {ASTNode} node node to evaluate
+ * @returns {boolean} True if it is wrapped
+ * @private
+ */
+ function wrapped(node) {
+ return astUtils.isParenthesised(sourceCode, node);
+ }
+
+ /**
+ * Get the function node from an IIFE
+ * @param {ASTNode} node node to evaluate
+ * @returns {ASTNode} node that is the function expression of the given IIFE, or null if none exist
+ */
+ function getFunctionNodeFromIIFE(node) {
+ const callee = node.callee;
+
+ if (callee.type === "FunctionExpression") {
+ return callee;
+ }
+
+ if (includeFunctionPrototypeMethods &&
+ callee.type === "MemberExpression" &&
+ callee.object.type === "FunctionExpression" &&
+ (astUtils.getStaticPropertyName(callee) === "call" || astUtils.getStaticPropertyName(callee) === "apply")
+ ) {
+ return callee.object;
+ }
+
+ return null;
+ }
+
+
+ return {
+ CallExpression(node) {
+ const innerNode = getFunctionNodeFromIIFE(node);
+
+ if (!innerNode) {
+ return;
+ }
+
+ const callExpressionWrapped = wrapped(node),
+ functionExpressionWrapped = wrapped(innerNode);
+
+ if (!callExpressionWrapped && !functionExpressionWrapped) {
+ context.report({
+ node,
+ message: "Wrap an immediate function invocation in parentheses.",
+ fix(fixer) {
+ const nodeToSurround = style === "inside" ? innerNode : node;
+
+ return fixer.replaceText(nodeToSurround, `(${sourceCode.getText(nodeToSurround)})`);
+ }
+ });
+ } else if (style === "inside" && !functionExpressionWrapped) {
+ context.report({
+ node,
+ message: "Wrap only the function expression in parens.",
+ fix(fixer) {
+
+ /*
+ * The outer call expression will always be wrapped at this point.
+ * Replace the range between the end of the function expression and the end of the call expression.
+ * for example, in `(function(foo) {}(bar))`, the range `(bar))` should get replaced with `)(bar)`.
+ * Replace the parens from the outer expression, and parenthesize the function expression.
+ */
+ const parenAfter = sourceCode.getTokenAfter(node);
+
+ return fixer.replaceTextRange(
+ [innerNode.range[1], parenAfter.range[1]],
+ `)${sourceCode.getText().slice(innerNode.range[1], parenAfter.range[0])}`
+ );
+ }
+ });
+ } else if (style === "outside" && !callExpressionWrapped) {
+ context.report({
+ node,
+ message: "Move the invocation into the parens that contain the function.",
+ fix(fixer) {
+
+ /*
+ * The inner function expression will always be wrapped at this point.
+ * It's only necessary to replace the range between the end of the function expression
+ * and the call expression. For example, in `(function(foo) {})(bar)`, the range `)(bar)`
+ * should get replaced with `(bar))`.
+ */
+ const parenAfter = sourceCode.getTokenAfter(innerNode);
+
+ return fixer.replaceTextRange(
+ [parenAfter.range[0], node.range[1]],
+ `${sourceCode.getText().slice(parenAfter.range[1], node.range[1])})`
+ );
+ }
+ });
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/wrap-regex.js b/tools/node_modules/eslint/lib/rules/wrap-regex.js
new file mode 100644
index 0000000000..79f3d30515
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/wrap-regex.js
@@ -0,0 +1,52 @@
+/**
+ * @fileoverview Rule to flag when regex literals are not wrapped in parens
+ * @author Matt DuVall <http://www.mattduvall.com>
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require parenthesis around regex literals",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: [],
+
+ fixable: "code"
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+
+ return {
+
+ Literal(node) {
+ const token = sourceCode.getFirstToken(node),
+ nodeType = token.type;
+
+ if (nodeType === "RegularExpression") {
+ const source = sourceCode.getTokenBefore(node);
+ const ancestors = context.getAncestors();
+ const grandparent = ancestors[ancestors.length - 1];
+
+ if (grandparent.type === "MemberExpression" && grandparent.object === node &&
+ (!source || source.value !== "(")) {
+ context.report({
+ node,
+ message: "Wrap the regexp literal in parens to disambiguate the slash.",
+ fix: fixer => fixer.replaceText(node, `(${sourceCode.getText(node)})`)
+ });
+ }
+ }
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/yield-star-spacing.js b/tools/node_modules/eslint/lib/rules/yield-star-spacing.js
new file mode 100644
index 0000000000..eb20fc01b0
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/yield-star-spacing.js
@@ -0,0 +1,117 @@
+/**
+ * @fileoverview Rule to check the spacing around the * in yield* expressions.
+ * @author Bryan Smith
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require or disallow spacing around the `*` in `yield*` expressions",
+ category: "ECMAScript 6",
+ recommended: false
+ },
+
+ fixable: "whitespace",
+
+ schema: [
+ {
+ oneOf: [
+ {
+ enum: ["before", "after", "both", "neither"]
+ },
+ {
+ type: "object",
+ properties: {
+ before: { type: "boolean" },
+ after: { type: "boolean" }
+ },
+ additionalProperties: false
+ }
+ ]
+ }
+ ]
+ },
+
+ create(context) {
+ const sourceCode = context.getSourceCode();
+
+ const mode = (function(option) {
+ if (!option || typeof option === "string") {
+ return {
+ before: { before: true, after: false },
+ after: { before: false, after: true },
+ both: { before: true, after: true },
+ neither: { before: false, after: false }
+ }[option || "after"];
+ }
+ return option;
+ }(context.options[0]));
+
+ /**
+ * Checks the spacing between two tokens before or after the star token.
+ * @param {string} side Either "before" or "after".
+ * @param {Token} leftToken `function` keyword token if side is "before", or
+ * star token if side is "after".
+ * @param {Token} rightToken Star token if side is "before", or identifier
+ * token if side is "after".
+ * @returns {void}
+ */
+ function checkSpacing(side, leftToken, rightToken) {
+ if (sourceCode.isSpaceBetweenTokens(leftToken, rightToken) !== mode[side]) {
+ const after = leftToken.value === "*";
+ const spaceRequired = mode[side];
+ const node = after ? leftToken : rightToken;
+ const type = spaceRequired ? "Missing" : "Unexpected";
+ const message = "{{type}} space {{side}} *.";
+
+ context.report({
+ node,
+ message,
+ data: {
+ type,
+ side
+ },
+ fix(fixer) {
+ if (spaceRequired) {
+ if (after) {
+ return fixer.insertTextAfter(node, " ");
+ }
+ return fixer.insertTextBefore(node, " ");
+ }
+ return fixer.removeRange([leftToken.range[1], rightToken.range[0]]);
+ }
+ });
+ }
+ }
+
+ /**
+ * Enforces the spacing around the star if node is a yield* expression.
+ * @param {ASTNode} node A yield expression node.
+ * @returns {void}
+ */
+ function checkExpression(node) {
+ if (!node.delegate) {
+ return;
+ }
+
+ const tokens = sourceCode.getFirstTokens(node, 3);
+ const yieldToken = tokens[0];
+ const starToken = tokens[1];
+ const nextToken = tokens[2];
+
+ checkSpacing("before", yieldToken, starToken);
+ checkSpacing("after", starToken, nextToken);
+ }
+
+ return {
+ YieldExpression: checkExpression
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/rules/yoda.js b/tools/node_modules/eslint/lib/rules/yoda.js
new file mode 100644
index 0000000000..2ccb61f73a
--- /dev/null
+++ b/tools/node_modules/eslint/lib/rules/yoda.js
@@ -0,0 +1,310 @@
+/**
+ * @fileoverview Rule to require or disallow yoda comparisons
+ * @author Nicholas C. Zakas
+ */
+"use strict";
+
+//--------------------------------------------------------------------------
+// Requirements
+//--------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//--------------------------------------------------------------------------
+// Helpers
+//--------------------------------------------------------------------------
+
+/**
+ * Determines whether an operator is a comparison operator.
+ * @param {string} operator The operator to check.
+ * @returns {boolean} Whether or not it is a comparison operator.
+ */
+function isComparisonOperator(operator) {
+ return (/^(==|===|!=|!==|<|>|<=|>=)$/).test(operator);
+}
+
+/**
+ * Determines whether an operator is an equality operator.
+ * @param {string} operator The operator to check.
+ * @returns {boolean} Whether or not it is an equality operator.
+ */
+function isEqualityOperator(operator) {
+ return (/^(==|===)$/).test(operator);
+}
+
+/**
+ * Determines whether an operator is one used in a range test.
+ * Allowed operators are `<` and `<=`.
+ * @param {string} operator The operator to check.
+ * @returns {boolean} Whether the operator is used in range tests.
+ */
+function isRangeTestOperator(operator) {
+ return ["<", "<="].indexOf(operator) >= 0;
+}
+
+/**
+ * Determines whether a non-Literal node is a negative number that should be
+ * treated as if it were a single Literal node.
+ * @param {ASTNode} node Node to test.
+ * @returns {boolean} True if the node is a negative number that looks like a
+ * real literal and should be treated as such.
+ */
+function looksLikeLiteral(node) {
+ return (node.type === "UnaryExpression" &&
+ node.operator === "-" &&
+ node.prefix &&
+ node.argument.type === "Literal" &&
+ typeof node.argument.value === "number");
+}
+
+/**
+ * Attempts to derive a Literal node from nodes that are treated like literals.
+ * @param {ASTNode} node Node to normalize.
+ * @param {number} [defaultValue] The default value to be returned if the node
+ * is not a Literal.
+ * @returns {ASTNode} One of the following options.
+ * 1. The original node if the node is already a Literal
+ * 2. A normalized Literal node with the negative number as the value if the
+ * node represents a negative number literal.
+ * 3. The Literal node which has the `defaultValue` argument if it exists.
+ * 4. Otherwise `null`.
+ */
+function getNormalizedLiteral(node, defaultValue) {
+ if (node.type === "Literal") {
+ return node;
+ }
+
+ if (looksLikeLiteral(node)) {
+ return {
+ type: "Literal",
+ value: -node.argument.value,
+ raw: `-${node.argument.value}`
+ };
+ }
+
+ if (defaultValue) {
+ return {
+ type: "Literal",
+ value: defaultValue,
+ raw: String(defaultValue)
+ };
+ }
+
+ return null;
+}
+
+/**
+ * Checks whether two expressions reference the same value. For example:
+ * a = a
+ * a.b = a.b
+ * a[0] = a[0]
+ * a['b'] = a['b']
+ * @param {ASTNode} a Left side of the comparison.
+ * @param {ASTNode} b Right side of the comparison.
+ * @returns {boolean} True if both sides match and reference the same value.
+ */
+function same(a, b) {
+ if (a.type !== b.type) {
+ return false;
+ }
+
+ switch (a.type) {
+ case "Identifier":
+ return a.name === b.name;
+
+ case "Literal":
+ return a.value === b.value;
+
+ case "MemberExpression": {
+ const nameA = astUtils.getStaticPropertyName(a);
+
+ // x.y = x["y"]
+ if (nameA) {
+ return (
+ same(a.object, b.object) &&
+ nameA === astUtils.getStaticPropertyName(b)
+ );
+ }
+
+ /*
+ * x[0] = x[0]
+ * x[y] = x[y]
+ * x.y = x.y
+ */
+ return (
+ a.computed === b.computed &&
+ same(a.object, b.object) &&
+ same(a.property, b.property)
+ );
+ }
+
+ case "ThisExpression":
+ return true;
+
+ default:
+ return false;
+ }
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require or disallow \"Yoda\" conditions",
+ category: "Best Practices",
+ recommended: false
+ },
+
+ schema: [
+ {
+ enum: ["always", "never"]
+ },
+ {
+ type: "object",
+ properties: {
+ exceptRange: {
+ type: "boolean"
+ },
+ onlyEquality: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ],
+
+ fixable: "code"
+ },
+
+ create(context) {
+
+ // Default to "never" (!always) if no option
+ const always = (context.options[0] === "always");
+ const exceptRange = (context.options[1] && context.options[1].exceptRange);
+ const onlyEquality = (context.options[1] && context.options[1].onlyEquality);
+
+ const sourceCode = context.getSourceCode();
+
+ /**
+ * Determines whether node represents a range test.
+ * A range test is a "between" test like `(0 <= x && x < 1)` or an "outside"
+ * test like `(x < 0 || 1 <= x)`. It must be wrapped in parentheses, and
+ * both operators must be `<` or `<=`. Finally, the literal on the left side
+ * must be less than or equal to the literal on the right side so that the
+ * test makes any sense.
+ * @param {ASTNode} node LogicalExpression node to test.
+ * @returns {boolean} Whether node is a range test.
+ */
+ function isRangeTest(node) {
+ const left = node.left,
+ right = node.right;
+
+ /**
+ * Determines whether node is of the form `0 <= x && x < 1`.
+ * @returns {boolean} Whether node is a "between" range test.
+ */
+ function isBetweenTest() {
+ let leftLiteral, rightLiteral;
+
+ return (node.operator === "&&" &&
+ (leftLiteral = getNormalizedLiteral(left.left)) &&
+ (rightLiteral = getNormalizedLiteral(right.right, Number.POSITIVE_INFINITY)) &&
+ leftLiteral.value <= rightLiteral.value &&
+ same(left.right, right.left));
+ }
+
+ /**
+ * Determines whether node is of the form `x < 0 || 1 <= x`.
+ * @returns {boolean} Whether node is an "outside" range test.
+ */
+ function isOutsideTest() {
+ let leftLiteral, rightLiteral;
+
+ return (node.operator === "||" &&
+ (leftLiteral = getNormalizedLiteral(left.right, Number.NEGATIVE_INFINITY)) &&
+ (rightLiteral = getNormalizedLiteral(right.left)) &&
+ leftLiteral.value <= rightLiteral.value &&
+ same(left.left, right.right));
+ }
+
+ /**
+ * Determines whether node is wrapped in parentheses.
+ * @returns {boolean} Whether node is preceded immediately by an open
+ * paren token and followed immediately by a close
+ * paren token.
+ */
+ function isParenWrapped() {
+ return astUtils.isParenthesised(sourceCode, node);
+ }
+
+ return (node.type === "LogicalExpression" &&
+ left.type === "BinaryExpression" &&
+ right.type === "BinaryExpression" &&
+ isRangeTestOperator(left.operator) &&
+ isRangeTestOperator(right.operator) &&
+ (isBetweenTest() || isOutsideTest()) &&
+ isParenWrapped());
+ }
+
+ const OPERATOR_FLIP_MAP = {
+ "===": "===",
+ "!==": "!==",
+ "==": "==",
+ "!=": "!=",
+ "<": ">",
+ ">": "<",
+ "<=": ">=",
+ ">=": "<="
+ };
+
+ /**
+ * Returns a string representation of a BinaryExpression node with its sides/operator flipped around.
+ * @param {ASTNode} node The BinaryExpression node
+ * @returns {string} A string representation of the node with the sides and operator flipped
+ */
+ function getFlippedString(node) {
+ const operatorToken = sourceCode.getFirstTokenBetween(node.left, node.right, token => token.value === node.operator);
+ const textBeforeOperator = sourceCode.getText().slice(sourceCode.getTokenBefore(operatorToken).range[1], operatorToken.range[0]);
+ const textAfterOperator = sourceCode.getText().slice(operatorToken.range[1], sourceCode.getTokenAfter(operatorToken).range[0]);
+ const leftText = sourceCode.getText().slice(node.range[0], sourceCode.getTokenBefore(operatorToken).range[1]);
+ const rightText = sourceCode.getText().slice(sourceCode.getTokenAfter(operatorToken).range[0], node.range[1]);
+
+ return rightText + textBeforeOperator + OPERATOR_FLIP_MAP[operatorToken.value] + textAfterOperator + leftText;
+ }
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+ BinaryExpression(node) {
+ const expectedLiteral = always ? node.left : node.right;
+ const expectedNonLiteral = always ? node.right : node.left;
+
+ // If `expectedLiteral` is not a literal, and `expectedNonLiteral` is a literal, raise an error.
+ if (
+ (expectedNonLiteral.type === "Literal" || looksLikeLiteral(expectedNonLiteral)) &&
+ !(expectedLiteral.type === "Literal" || looksLikeLiteral(expectedLiteral)) &&
+ !(!isEqualityOperator(node.operator) && onlyEquality) &&
+ isComparisonOperator(node.operator) &&
+ !(exceptRange && isRangeTest(context.getAncestors().pop()))
+ ) {
+ context.report({
+ node,
+ message: "Expected literal to be on the {{expectedSide}} side of {{operator}}.",
+ data: {
+ operator: node.operator,
+ expectedSide: always ? "left" : "right"
+ },
+ fix: fixer => fixer.replaceText(node, getFlippedString(node))
+ });
+ }
+
+ }
+ };
+
+ }
+};
diff --git a/tools/node_modules/eslint/lib/testers/rule-tester.js b/tools/node_modules/eslint/lib/testers/rule-tester.js
new file mode 100644
index 0000000000..aae66301d8
--- /dev/null
+++ b/tools/node_modules/eslint/lib/testers/rule-tester.js
@@ -0,0 +1,558 @@
+/**
+ * @fileoverview Mocha test wrapper
+ * @author Ilya Volodin
+ */
+"use strict";
+
+/* global describe, it */
+
+/*
+ * This is a wrapper around mocha to allow for DRY unittests for eslint
+ * Format:
+ * RuleTester.run("{ruleName}", {
+ * valid: [
+ * "{code}",
+ * { code: "{code}", options: {options}, globals: {globals}, parser: "{parser}", settings: {settings} }
+ * ],
+ * invalid: [
+ * { code: "{code}", errors: {numErrors} },
+ * { code: "{code}", errors: ["{errorMessage}"] },
+ * { code: "{code}", options: {options}, globals: {globals}, parser: "{parser}", settings: {settings}, errors: [{ message: "{errorMessage}", type: "{errorNodeType}"}] }
+ * ]
+ * });
+ *
+ * Variables:
+ * {code} - String that represents the code to be tested
+ * {options} - Arguments that are passed to the configurable rules.
+ * {globals} - An object representing a list of variables that are
+ * registered as globals
+ * {parser} - String representing the parser to use
+ * {settings} - An object representing global settings for all rules
+ * {numErrors} - If failing case doesn't need to check error message,
+ * this integer will specify how many errors should be
+ * received
+ * {errorMessage} - Message that is returned by the rule on failure
+ * {errorNodeType} - AST node type that is returned by they rule as
+ * a cause of the failure.
+ */
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const lodash = require("lodash"),
+ assert = require("assert"),
+ util = require("util"),
+ validator = require("../config/config-validator"),
+ ajv = require("../util/ajv"),
+ Linter = require("../linter"),
+ Environments = require("../config/environments"),
+ SourceCodeFixer = require("../util/source-code-fixer");
+
+//------------------------------------------------------------------------------
+// Private Members
+//------------------------------------------------------------------------------
+
+/*
+ * testerDefaultConfig must not be modified as it allows to reset the tester to
+ * the initial default configuration
+ */
+const testerDefaultConfig = { rules: {} };
+let defaultConfig = { rules: {} };
+
+/*
+ * List every parameters possible on a test case that are not related to eslint
+ * configuration
+ */
+const RuleTesterParameters = [
+ "code",
+ "filename",
+ "options",
+ "errors",
+ "output"
+];
+
+const hasOwnProperty = Function.call.bind(Object.hasOwnProperty);
+
+/**
+ * Clones a given value deeply.
+ * Note: This ignores `parent` property.
+ *
+ * @param {any} x - A value to clone.
+ * @returns {any} A cloned value.
+ */
+function cloneDeeplyExcludesParent(x) {
+ if (typeof x === "object" && x !== null) {
+ if (Array.isArray(x)) {
+ return x.map(cloneDeeplyExcludesParent);
+ }
+
+ const retv = {};
+
+ for (const key in x) {
+ if (key !== "parent" && hasOwnProperty(x, key)) {
+ retv[key] = cloneDeeplyExcludesParent(x[key]);
+ }
+ }
+
+ return retv;
+ }
+
+ return x;
+}
+
+/**
+ * Freezes a given value deeply.
+ *
+ * @param {any} x - A value to freeze.
+ * @returns {void}
+ */
+function freezeDeeply(x) {
+ if (typeof x === "object" && x !== null) {
+ if (Array.isArray(x)) {
+ x.forEach(freezeDeeply);
+ } else {
+ for (const key in x) {
+ if (key !== "parent" && hasOwnProperty(x, key)) {
+ freezeDeeply(x[key]);
+ }
+ }
+ }
+ Object.freeze(x);
+ }
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+// default separators for testing
+const DESCRIBE = Symbol("describe");
+const IT = Symbol("it");
+
+/**
+ * This is `it` or `describe` if those don't exist.
+ * @this {Mocha}
+ * @param {string} text - The description of the test case.
+ * @param {Function} method - The logic of the test case.
+ * @returns {any} Returned value of `method`.
+ */
+function defaultHandler(text, method) {
+ return method.apply(this);
+}
+
+class RuleTester {
+
+ /**
+ * Creates a new instance of RuleTester.
+ * @param {Object} [testerConfig] Optional, extra configuration for the tester
+ * @constructor
+ */
+ constructor(testerConfig) {
+
+ /**
+ * The configuration to use for this tester. Combination of the tester
+ * configuration and the default configuration.
+ * @type {Object}
+ */
+ this.testerConfig = lodash.merge(
+
+ // we have to clone because merge uses the first argument for recipient
+ lodash.cloneDeep(defaultConfig),
+ testerConfig,
+ { rules: { "rule-tester/validate-ast": "error" } }
+ );
+
+ /**
+ * Rule definitions to define before tests.
+ * @type {Object}
+ */
+ this.rules = {};
+ this.linter = new Linter();
+ }
+
+ /**
+ * Set the configuration to use for all future tests
+ * @param {Object} config the configuration to use.
+ * @returns {void}
+ */
+ static setDefaultConfig(config) {
+ if (typeof config !== "object") {
+ throw new TypeError("RuleTester.setDefaultConfig: config must be an object");
+ }
+ defaultConfig = config;
+
+ // Make sure the rules object exists since it is assumed to exist later
+ defaultConfig.rules = defaultConfig.rules || {};
+ }
+
+ /**
+ * Get the current configuration used for all tests
+ * @returns {Object} the current configuration
+ */
+ static getDefaultConfig() {
+ return defaultConfig;
+ }
+
+ /**
+ * Reset the configuration to the initial configuration of the tester removing
+ * any changes made until now.
+ * @returns {void}
+ */
+ static resetDefaultConfig() {
+ defaultConfig = lodash.cloneDeep(testerDefaultConfig);
+ }
+
+
+ /*
+ * If people use `mocha test.js --watch` command, `describe` and `it` function
+ * instances are different for each execution. So `describe` and `it` should get fresh instance
+ * always.
+ */
+ static get describe() {
+ return (
+ this[DESCRIBE] ||
+ (typeof describe === "function" ? describe : defaultHandler)
+ );
+ }
+
+ static set describe(value) {
+ this[DESCRIBE] = value;
+ }
+
+ static get it() {
+ return (
+ this[IT] ||
+ (typeof it === "function" ? it : defaultHandler)
+ );
+ }
+
+ static set it(value) {
+ this[IT] = value;
+ }
+
+ /**
+ * Define a rule for one particular run of tests.
+ * @param {string} name The name of the rule to define.
+ * @param {Function} rule The rule definition.
+ * @returns {void}
+ */
+ defineRule(name, rule) {
+ this.rules[name] = rule;
+ }
+
+ /**
+ * Adds a new rule test to execute.
+ * @param {string} ruleName The name of the rule to run.
+ * @param {Function} rule The rule to test.
+ * @param {Object} test The collection of tests to run.
+ * @returns {void}
+ */
+ run(ruleName, rule, test) {
+
+ const testerConfig = this.testerConfig,
+ requiredScenarios = ["valid", "invalid"],
+ scenarioErrors = [],
+ linter = this.linter;
+
+ if (lodash.isNil(test) || typeof test !== "object") {
+ throw new TypeError(`Test Scenarios for rule ${ruleName} : Could not find test scenario object`);
+ }
+
+ requiredScenarios.forEach(scenarioType => {
+ if (lodash.isNil(test[scenarioType])) {
+ scenarioErrors.push(`Could not find any ${scenarioType} test scenarios`);
+ }
+ });
+
+ if (scenarioErrors.length > 0) {
+ throw new Error([
+ `Test Scenarios for rule ${ruleName} is invalid:`
+ ].concat(scenarioErrors).join("\n"));
+ }
+
+
+ linter.defineRule(ruleName, Object.assign({}, rule, {
+
+ // Create a wrapper rule that freezes the `context` properties.
+ create(context) {
+ freezeDeeply(context.options);
+ freezeDeeply(context.settings);
+ freezeDeeply(context.parserOptions);
+
+ return (typeof rule === "function" ? rule : rule.create)(context);
+ }
+ }));
+
+ linter.defineRules(this.rules);
+
+ const ruleMap = linter.getRules();
+
+ /**
+ * Run the rule for the given item
+ * @param {string|Object} item Item to run the rule against
+ * @returns {Object} Eslint run result
+ * @private
+ */
+ function runRuleForItem(item) {
+ let config = lodash.cloneDeep(testerConfig),
+ code, filename, beforeAST, afterAST;
+
+ if (typeof item === "string") {
+ code = item;
+ } else {
+ code = item.code;
+
+ /*
+ * Assumes everything on the item is a config except for the
+ * parameters used by this tester
+ */
+ const itemConfig = lodash.omit(item, RuleTesterParameters);
+
+ /*
+ * Create the config object from the tester config and this item
+ * specific configurations.
+ */
+ config = lodash.merge(
+ config,
+ itemConfig
+ );
+ }
+
+ if (item.filename) {
+ filename = item.filename;
+ }
+
+ if (Object.prototype.hasOwnProperty.call(item, "options")) {
+ assert(Array.isArray(item.options), "options must be an array");
+ config.rules[ruleName] = [1].concat(item.options);
+ } else {
+ config.rules[ruleName] = 1;
+ }
+
+ const schema = validator.getRuleOptionsSchema(rule);
+
+ /*
+ * Setup AST getters.
+ * The goal is to check whether or not AST was modified when
+ * running the rule under test.
+ */
+ linter.defineRule("rule-tester/validate-ast", () => ({
+ Program(node) {
+ beforeAST = cloneDeeplyExcludesParent(node);
+ },
+ "Program:exit"(node) {
+ afterAST = node;
+ }
+ }));
+
+ if (schema) {
+ ajv.validateSchema(schema);
+
+ if (ajv.errors) {
+ const errors = ajv.errors.map(error => {
+ const field = error.dataPath[0] === "." ? error.dataPath.slice(1) : error.dataPath;
+
+ return `\t${field}: ${error.message}`;
+ }).join("\n");
+
+ throw new Error([`Schema for rule ${ruleName} is invalid:`, errors]);
+ }
+ }
+
+ validator.validate(config, "rule-tester", ruleMap.get.bind(ruleMap), new Environments());
+
+ return {
+ messages: linter.verify(code, config, filename, true),
+ beforeAST,
+ afterAST: cloneDeeplyExcludesParent(afterAST)
+ };
+ }
+
+ /**
+ * Check if the AST was changed
+ * @param {ASTNode} beforeAST AST node before running
+ * @param {ASTNode} afterAST AST node after running
+ * @returns {void}
+ * @private
+ */
+ function assertASTDidntChange(beforeAST, afterAST) {
+ if (!lodash.isEqual(beforeAST, afterAST)) {
+
+ // Not using directly to avoid performance problem in node 6.1.0. See #6111
+ // eslint-disable-next-line no-restricted-properties
+ assert.deepEqual(beforeAST, afterAST, "Rule should not modify AST.");
+ }
+ }
+
+ /**
+ * Check if the template is valid or not
+ * all valid cases go through this
+ * @param {string|Object} item Item to run the rule against
+ * @returns {void}
+ * @private
+ */
+ function testValidTemplate(item) {
+ const result = runRuleForItem(item);
+ const messages = result.messages;
+
+ assert.strictEqual(messages.length, 0, util.format("Should have no errors but had %d: %s",
+ messages.length, util.inspect(messages)));
+
+ assertASTDidntChange(result.beforeAST, result.afterAST);
+ }
+
+ /**
+ * Asserts that the message matches its expected value. If the expected
+ * value is a regular expression, it is checked against the actual
+ * value.
+ * @param {string} actual Actual value
+ * @param {string|RegExp} expected Expected value
+ * @returns {void}
+ * @private
+ */
+ function assertMessageMatches(actual, expected) {
+ if (expected instanceof RegExp) {
+
+ // assert.js doesn't have a built-in RegExp match function
+ assert.ok(
+ expected.test(actual),
+ `Expected '${actual}' to match ${expected}`
+ );
+ } else {
+ assert.strictEqual(actual, expected);
+ }
+ }
+
+ /**
+ * Check if the template is invalid or not
+ * all invalid cases go through this.
+ * @param {string|Object} item Item to run the rule against
+ * @returns {void}
+ * @private
+ */
+ function testInvalidTemplate(item) {
+ assert.ok(item.errors || item.errors === 0,
+ `Did not specify errors for an invalid test of ${ruleName}`);
+
+ const result = runRuleForItem(item);
+ const messages = result.messages;
+
+
+ if (typeof item.errors === "number") {
+ assert.strictEqual(messages.length, item.errors, util.format("Should have %d error%s but had %d: %s",
+ item.errors, item.errors === 1 ? "" : "s", messages.length, util.inspect(messages)));
+ } else {
+ assert.strictEqual(
+ messages.length, item.errors.length,
+ util.format(
+ "Should have %d error%s but had %d: %s",
+ item.errors.length, item.errors.length === 1 ? "" : "s", messages.length, util.inspect(messages)
+ )
+ );
+
+ const hasMessageOfThisRule = messages.some(m => m.ruleId === ruleName);
+
+ for (let i = 0, l = item.errors.length; i < l; i++) {
+ assert(!messages[i].fatal, `A fatal parsing error occurred: ${messages[i].message}`);
+ assert(hasMessageOfThisRule, "Error rule name should be the same as the name of the rule being tested");
+
+ if (typeof item.errors[i] === "string" || item.errors[i] instanceof RegExp) {
+
+ // Just an error message.
+ assertMessageMatches(messages[i].message, item.errors[i]);
+ } else if (typeof item.errors[i] === "object") {
+
+ /*
+ * Error object.
+ * This may have a message, node type, line, and/or
+ * column.
+ */
+ if (item.errors[i].message) {
+ assertMessageMatches(messages[i].message, item.errors[i].message);
+ }
+
+ // The following checks use loose equality assertions for backwards compatibility.
+
+ if (item.errors[i].type) {
+
+ // eslint-disable-next-line no-restricted-properties
+ assert.equal(messages[i].nodeType, item.errors[i].type, `Error type should be ${item.errors[i].type}, found ${messages[i].nodeType}`);
+ }
+
+ if (item.errors[i].hasOwnProperty("line")) {
+
+ // eslint-disable-next-line no-restricted-properties
+ assert.equal(messages[i].line, item.errors[i].line, `Error line should be ${item.errors[i].line}`);
+ }
+
+ if (item.errors[i].hasOwnProperty("column")) {
+
+ // eslint-disable-next-line no-restricted-properties
+ assert.equal(messages[i].column, item.errors[i].column, `Error column should be ${item.errors[i].column}`);
+ }
+
+ if (item.errors[i].hasOwnProperty("endLine")) {
+
+ // eslint-disable-next-line no-restricted-properties
+ assert.equal(messages[i].endLine, item.errors[i].endLine, `Error endLine should be ${item.errors[i].endLine}`);
+ }
+
+ if (item.errors[i].hasOwnProperty("endColumn")) {
+
+ // eslint-disable-next-line no-restricted-properties
+ assert.equal(messages[i].endColumn, item.errors[i].endColumn, `Error endColumn should be ${item.errors[i].endColumn}`);
+ }
+ } else {
+
+ // Message was an unexpected type
+ assert.fail(messages[i], null, "Error should be a string, object, or RegExp.");
+ }
+ }
+ }
+
+ if (item.hasOwnProperty("output")) {
+ if (item.output === null) {
+ assert.strictEqual(
+ messages.filter(message => message.fix).length,
+ 0,
+ "Expected no autofixes to be suggested"
+ );
+ } else {
+ const fixResult = SourceCodeFixer.applyFixes(item.code, messages);
+
+ // eslint-disable-next-line no-restricted-properties
+ assert.equal(fixResult.output, item.output, "Output is incorrect.");
+ }
+ }
+
+ assertASTDidntChange(result.beforeAST, result.afterAST);
+ }
+
+ /*
+ * This creates a mocha test suite and pipes all supplied info through
+ * one of the templates above.
+ */
+ RuleTester.describe(ruleName, () => {
+ RuleTester.describe("valid", () => {
+ test.valid.forEach(valid => {
+ RuleTester.it(typeof valid === "object" ? valid.code : valid, () => {
+ testValidTemplate(valid);
+ });
+ });
+ });
+
+ RuleTester.describe("invalid", () => {
+ test.invalid.forEach(invalid => {
+ RuleTester.it(invalid.code, () => {
+ testInvalidTemplate(invalid);
+ });
+ });
+ });
+ });
+ }
+}
+
+RuleTester[DESCRIBE] = RuleTester[IT] = null;
+
+module.exports = RuleTester;
diff --git a/tools/node_modules/eslint/lib/timing.js b/tools/node_modules/eslint/lib/timing.js
new file mode 100644
index 0000000000..e33ac8f458
--- /dev/null
+++ b/tools/node_modules/eslint/lib/timing.js
@@ -0,0 +1,141 @@
+/**
+ * @fileoverview Tracks performance of individual rules.
+ * @author Brandon Mills
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/* istanbul ignore next */
+/**
+ * Align the string to left
+ * @param {string} str string to evaluate
+ * @param {int} len length of the string
+ * @param {string} ch delimiter character
+ * @returns {string} modified string
+ * @private
+ */
+function alignLeft(str, len, ch) {
+ return str + new Array(len - str.length + 1).join(ch || " ");
+}
+
+/* istanbul ignore next */
+/**
+ * Align the string to right
+ * @param {string} str string to evaluate
+ * @param {int} len length of the string
+ * @param {string} ch delimiter character
+ * @returns {string} modified string
+ * @private
+ */
+function alignRight(str, len, ch) {
+ return new Array(len - str.length + 1).join(ch || " ") + str;
+}
+
+//------------------------------------------------------------------------------
+// Module definition
+//------------------------------------------------------------------------------
+
+const enabled = !!process.env.TIMING;
+
+const HEADERS = ["Rule", "Time (ms)", "Relative"];
+const ALIGN = [alignLeft, alignRight, alignRight];
+
+/* istanbul ignore next */
+/**
+ * display the data
+ * @param {Object} data Data object to be displayed
+ * @returns {string} modified string
+ * @private
+ */
+function display(data) {
+ let total = 0;
+ const rows = Object.keys(data)
+ .map(key => {
+ const time = data[key];
+
+ total += time;
+ return [key, time];
+ })
+ .sort((a, b) => b[1] - a[1])
+ .slice(0, 10);
+
+ rows.forEach(row => {
+ row.push(`${(row[1] * 100 / total).toFixed(1)}%`);
+ row[1] = row[1].toFixed(3);
+ });
+
+ rows.unshift(HEADERS);
+
+ const widths = [];
+
+ rows.forEach(row => {
+ const len = row.length;
+
+ for (let i = 0; i < len; i++) {
+ const n = row[i].length;
+
+ if (!widths[i] || n > widths[i]) {
+ widths[i] = n;
+ }
+ }
+ });
+
+ const table = rows.map(row => (
+ row
+ .map((cell, index) => ALIGN[index](cell, widths[index]))
+ .join(" | ")
+ ));
+
+ table.splice(1, 0, widths.map((w, index) => {
+ if (index !== 0 && index !== widths.length - 1) {
+ w++;
+ }
+
+ return ALIGN[index](":", w + 1, "-");
+ }).join("|"));
+
+ console.log(table.join("\n")); // eslint-disable-line no-console
+}
+
+/* istanbul ignore next */
+module.exports = (function() {
+
+ const data = Object.create(null);
+
+ /**
+ * Time the run
+ * @param {*} key key from the data object
+ * @param {Function} fn function to be called
+ * @returns {Function} function to be executed
+ * @private
+ */
+ function time(key, fn) {
+ if (typeof data[key] === "undefined") {
+ data[key] = 0;
+ }
+
+ return function() {
+ let t = process.hrtime();
+
+ fn.apply(null, Array.prototype.slice.call(arguments));
+ t = process.hrtime(t);
+ data[key] += t[0] * 1e3 + t[1] / 1e6;
+ };
+ }
+
+ if (enabled) {
+ process.on("exit", () => {
+ display(data);
+ });
+ }
+
+ return {
+ time,
+ enabled
+ };
+
+}());
diff --git a/tools/node_modules/eslint/lib/token-store/backward-token-comment-cursor.js b/tools/node_modules/eslint/lib/token-store/backward-token-comment-cursor.js
new file mode 100644
index 0000000000..7c2137a176
--- /dev/null
+++ b/tools/node_modules/eslint/lib/token-store/backward-token-comment-cursor.js
@@ -0,0 +1,57 @@
+/**
+ * @fileoverview Define the cursor which iterates tokens and comments in reverse.
+ * @author Toru Nagashima
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const Cursor = require("./cursor");
+const utils = require("./utils");
+
+//------------------------------------------------------------------------------
+// Exports
+//------------------------------------------------------------------------------
+
+/**
+ * The cursor which iterates tokens and comments in reverse.
+ */
+module.exports = class BackwardTokenCommentCursor extends Cursor {
+
+ /**
+ * Initializes this cursor.
+ * @param {Token[]} tokens - The array of tokens.
+ * @param {Comment[]} comments - The array of comments.
+ * @param {Object} indexMap - The map from locations to indices in `tokens`.
+ * @param {number} startLoc - The start location of the iteration range.
+ * @param {number} endLoc - The end location of the iteration range.
+ */
+ constructor(tokens, comments, indexMap, startLoc, endLoc) {
+ super();
+ this.tokens = tokens;
+ this.comments = comments;
+ this.tokenIndex = utils.getLastIndex(tokens, indexMap, endLoc);
+ this.commentIndex = utils.search(comments, endLoc) - 1;
+ this.border = startLoc;
+ }
+
+ /** @inheritdoc */
+ moveNext() {
+ const token = (this.tokenIndex >= 0) ? this.tokens[this.tokenIndex] : null;
+ const comment = (this.commentIndex >= 0) ? this.comments[this.commentIndex] : null;
+
+ if (token && (!comment || token.range[1] > comment.range[1])) {
+ this.current = token;
+ this.tokenIndex -= 1;
+ } else if (comment) {
+ this.current = comment;
+ this.commentIndex -= 1;
+ } else {
+ this.current = null;
+ }
+
+ return Boolean(this.current) && (this.border === -1 || this.current.range[0] >= this.border);
+ }
+};
diff --git a/tools/node_modules/eslint/lib/token-store/backward-token-cursor.js b/tools/node_modules/eslint/lib/token-store/backward-token-cursor.js
new file mode 100644
index 0000000000..93973bce44
--- /dev/null
+++ b/tools/node_modules/eslint/lib/token-store/backward-token-cursor.js
@@ -0,0 +1,58 @@
+/**
+ * @fileoverview Define the cursor which iterates tokens only in reverse.
+ * @author Toru Nagashima
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const Cursor = require("./cursor");
+const utils = require("./utils");
+
+//------------------------------------------------------------------------------
+// Exports
+//------------------------------------------------------------------------------
+
+/**
+ * The cursor which iterates tokens only in reverse.
+ */
+module.exports = class BackwardTokenCursor extends Cursor {
+
+ /**
+ * Initializes this cursor.
+ * @param {Token[]} tokens - The array of tokens.
+ * @param {Comment[]} comments - The array of comments.
+ * @param {Object} indexMap - The map from locations to indices in `tokens`.
+ * @param {number} startLoc - The start location of the iteration range.
+ * @param {number} endLoc - The end location of the iteration range.
+ */
+ constructor(tokens, comments, indexMap, startLoc, endLoc) {
+ super();
+ this.tokens = tokens;
+ this.index = utils.getLastIndex(tokens, indexMap, endLoc);
+ this.indexEnd = utils.getFirstIndex(tokens, indexMap, startLoc);
+ }
+
+ /** @inheritdoc */
+ moveNext() {
+ if (this.index >= this.indexEnd) {
+ this.current = this.tokens[this.index];
+ this.index -= 1;
+ return true;
+ }
+ return false;
+ }
+
+ /*
+ *
+ * Shorthand for performance.
+ *
+ */
+
+ /** @inheritdoc */
+ getOneToken() {
+ return (this.index >= this.indexEnd) ? this.tokens[this.index] : null;
+ }
+};
diff --git a/tools/node_modules/eslint/lib/token-store/cursor.js b/tools/node_modules/eslint/lib/token-store/cursor.js
new file mode 100644
index 0000000000..4e1595c6dc
--- /dev/null
+++ b/tools/node_modules/eslint/lib/token-store/cursor.js
@@ -0,0 +1,76 @@
+/**
+ * @fileoverview Define the abstract class about cursors which iterate tokens.
+ * @author Toru Nagashima
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Exports
+//------------------------------------------------------------------------------
+
+/**
+ * The abstract class about cursors which iterate tokens.
+ *
+ * This class has 2 abstract methods.
+ *
+ * - `current: Token | Comment | null` ... The current token.
+ * - `moveNext(): boolean` ... Moves this cursor to the next token. If the next token didn't exist, it returns `false`.
+ *
+ * This is similar to ES2015 Iterators.
+ * However, Iterators were slow (at 2017-01), so I created this class as similar to C# IEnumerable.
+ *
+ * There are the following known sub classes.
+ *
+ * - ForwardTokenCursor .......... The cursor which iterates tokens only.
+ * - BackwardTokenCursor ......... The cursor which iterates tokens only in reverse.
+ * - ForwardTokenCommentCursor ... The cursor which iterates tokens and comments.
+ * - BackwardTokenCommentCursor .. The cursor which iterates tokens and comments in reverse.
+ * - DecorativeCursor
+ * - FilterCursor ............ The cursor which ignores the specified tokens.
+ * - SkipCursor .............. The cursor which ignores the first few tokens.
+ * - LimitCursor ............. The cursor which limits the count of tokens.
+ *
+ */
+module.exports = class Cursor {
+
+ /**
+ * Initializes this cursor.
+ */
+ constructor() {
+ this.current = null;
+ }
+
+ /**
+ * Gets the first token.
+ * This consumes this cursor.
+ * @returns {Token|Comment} The first token or null.
+ */
+ getOneToken() {
+ return this.moveNext() ? this.current : null;
+ }
+
+ /**
+ * Gets the first tokens.
+ * This consumes this cursor.
+ * @returns {(Token|Comment)[]} All tokens.
+ */
+ getAllTokens() {
+ const tokens = [];
+
+ while (this.moveNext()) {
+ tokens.push(this.current);
+ }
+
+ return tokens;
+ }
+
+ /**
+ * Moves this cursor to the next token.
+ * @returns {boolean} `true` if the next token exists.
+ * @abstract
+ */
+ /* istanbul ignore next */
+ moveNext() { // eslint-disable-line class-methods-use-this
+ throw new Error("Not implemented.");
+ }
+};
diff --git a/tools/node_modules/eslint/lib/token-store/cursors.js b/tools/node_modules/eslint/lib/token-store/cursors.js
new file mode 100644
index 0000000000..b315c7e65e
--- /dev/null
+++ b/tools/node_modules/eslint/lib/token-store/cursors.js
@@ -0,0 +1,92 @@
+/**
+ * @fileoverview Define 2 token factories; forward and backward.
+ * @author Toru Nagashima
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const BackwardTokenCommentCursor = require("./backward-token-comment-cursor");
+const BackwardTokenCursor = require("./backward-token-cursor");
+const FilterCursor = require("./filter-cursor");
+const ForwardTokenCommentCursor = require("./forward-token-comment-cursor");
+const ForwardTokenCursor = require("./forward-token-cursor");
+const LimitCursor = require("./limit-cursor");
+const SkipCursor = require("./skip-cursor");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * The cursor factory.
+ * @private
+ */
+class CursorFactory {
+
+ /**
+ * Initializes this cursor.
+ * @param {Function} TokenCursor - The class of the cursor which iterates tokens only.
+ * @param {Function} TokenCommentCursor - The class of the cursor which iterates the mix of tokens and comments.
+ */
+ constructor(TokenCursor, TokenCommentCursor) {
+ this.TokenCursor = TokenCursor;
+ this.TokenCommentCursor = TokenCommentCursor;
+ }
+
+ /**
+ * Creates a base cursor instance that can be decorated by createCursor.
+ *
+ * @param {Token[]} tokens - The array of tokens.
+ * @param {Comment[]} comments - The array of comments.
+ * @param {Object} indexMap - The map from locations to indices in `tokens`.
+ * @param {number} startLoc - The start location of the iteration range.
+ * @param {number} endLoc - The end location of the iteration range.
+ * @param {boolean} includeComments - The flag to iterate comments as well.
+ * @returns {Cursor} The created base cursor.
+ */
+ createBaseCursor(tokens, comments, indexMap, startLoc, endLoc, includeComments) {
+ const Cursor = includeComments ? this.TokenCommentCursor : this.TokenCursor;
+
+ return new Cursor(tokens, comments, indexMap, startLoc, endLoc);
+ }
+
+ /**
+ * Creates a cursor that iterates tokens with normalized options.
+ *
+ * @param {Token[]} tokens - The array of tokens.
+ * @param {Comment[]} comments - The array of comments.
+ * @param {Object} indexMap - The map from locations to indices in `tokens`.
+ * @param {number} startLoc - The start location of the iteration range.
+ * @param {number} endLoc - The end location of the iteration range.
+ * @param {boolean} includeComments - The flag to iterate comments as well.
+ * @param {Function|null} filter - The predicate function to choose tokens.
+ * @param {number} skip - The count of tokens the cursor skips.
+ * @param {number} count - The maximum count of tokens the cursor iterates. Zero is no iteration for backward compatibility.
+ * @returns {Cursor} The created cursor.
+ */
+ createCursor(tokens, comments, indexMap, startLoc, endLoc, includeComments, filter, skip, count) {
+ let cursor = this.createBaseCursor(tokens, comments, indexMap, startLoc, endLoc, includeComments);
+
+ if (filter) {
+ cursor = new FilterCursor(cursor, filter);
+ }
+ if (skip >= 1) {
+ cursor = new SkipCursor(cursor, skip);
+ }
+ if (count >= 0) {
+ cursor = new LimitCursor(cursor, count);
+ }
+
+ return cursor;
+ }
+}
+
+//------------------------------------------------------------------------------
+// Exports
+//------------------------------------------------------------------------------
+
+exports.forward = new CursorFactory(ForwardTokenCursor, ForwardTokenCommentCursor);
+exports.backward = new CursorFactory(BackwardTokenCursor, BackwardTokenCommentCursor);
diff --git a/tools/node_modules/eslint/lib/token-store/decorative-cursor.js b/tools/node_modules/eslint/lib/token-store/decorative-cursor.js
new file mode 100644
index 0000000000..f0bff9c51d
--- /dev/null
+++ b/tools/node_modules/eslint/lib/token-store/decorative-cursor.js
@@ -0,0 +1,39 @@
+/**
+ * @fileoverview Define the abstract class about cursors which manipulate another cursor.
+ * @author Toru Nagashima
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const Cursor = require("./cursor");
+
+//------------------------------------------------------------------------------
+// Exports
+//------------------------------------------------------------------------------
+
+/**
+ * The abstract class about cursors which manipulate another cursor.
+ */
+module.exports = class DecorativeCursor extends Cursor {
+
+ /**
+ * Initializes this cursor.
+ * @param {Cursor} cursor - The cursor to be decorated.
+ */
+ constructor(cursor) {
+ super();
+ this.cursor = cursor;
+ }
+
+ /** @inheritdoc */
+ moveNext() {
+ const retv = this.cursor.moveNext();
+
+ this.current = this.cursor.current;
+
+ return retv;
+ }
+};
diff --git a/tools/node_modules/eslint/lib/token-store/filter-cursor.js b/tools/node_modules/eslint/lib/token-store/filter-cursor.js
new file mode 100644
index 0000000000..7133627bd3
--- /dev/null
+++ b/tools/node_modules/eslint/lib/token-store/filter-cursor.js
@@ -0,0 +1,43 @@
+/**
+ * @fileoverview Define the cursor which ignores specified tokens.
+ * @author Toru Nagashima
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const DecorativeCursor = require("./decorative-cursor");
+
+//------------------------------------------------------------------------------
+// Exports
+//------------------------------------------------------------------------------
+
+/**
+ * The decorative cursor which ignores specified tokens.
+ */
+module.exports = class FilterCursor extends DecorativeCursor {
+
+ /**
+ * Initializes this cursor.
+ * @param {Cursor} cursor - The cursor to be decorated.
+ * @param {Function} predicate - The predicate function to decide tokens this cursor iterates.
+ */
+ constructor(cursor, predicate) {
+ super(cursor);
+ this.predicate = predicate;
+ }
+
+ /** @inheritdoc */
+ moveNext() {
+ const predicate = this.predicate;
+
+ while (super.moveNext()) {
+ if (predicate(this.current)) {
+ return true;
+ }
+ }
+ return false;
+ }
+};
diff --git a/tools/node_modules/eslint/lib/token-store/forward-token-comment-cursor.js b/tools/node_modules/eslint/lib/token-store/forward-token-comment-cursor.js
new file mode 100644
index 0000000000..be08552970
--- /dev/null
+++ b/tools/node_modules/eslint/lib/token-store/forward-token-comment-cursor.js
@@ -0,0 +1,57 @@
+/**
+ * @fileoverview Define the cursor which iterates tokens and comments.
+ * @author Toru Nagashima
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const Cursor = require("./cursor");
+const utils = require("./utils");
+
+//------------------------------------------------------------------------------
+// Exports
+//------------------------------------------------------------------------------
+
+/**
+ * The cursor which iterates tokens and comments.
+ */
+module.exports = class ForwardTokenCommentCursor extends Cursor {
+
+ /**
+ * Initializes this cursor.
+ * @param {Token[]} tokens - The array of tokens.
+ * @param {Comment[]} comments - The array of comments.
+ * @param {Object} indexMap - The map from locations to indices in `tokens`.
+ * @param {number} startLoc - The start location of the iteration range.
+ * @param {number} endLoc - The end location of the iteration range.
+ */
+ constructor(tokens, comments, indexMap, startLoc, endLoc) {
+ super();
+ this.tokens = tokens;
+ this.comments = comments;
+ this.tokenIndex = utils.getFirstIndex(tokens, indexMap, startLoc);
+ this.commentIndex = utils.search(comments, startLoc);
+ this.border = endLoc;
+ }
+
+ /** @inheritdoc */
+ moveNext() {
+ const token = (this.tokenIndex < this.tokens.length) ? this.tokens[this.tokenIndex] : null;
+ const comment = (this.commentIndex < this.comments.length) ? this.comments[this.commentIndex] : null;
+
+ if (token && (!comment || token.range[0] < comment.range[0])) {
+ this.current = token;
+ this.tokenIndex += 1;
+ } else if (comment) {
+ this.current = comment;
+ this.commentIndex += 1;
+ } else {
+ this.current = null;
+ }
+
+ return Boolean(this.current) && (this.border === -1 || this.current.range[1] <= this.border);
+ }
+};
diff --git a/tools/node_modules/eslint/lib/token-store/forward-token-cursor.js b/tools/node_modules/eslint/lib/token-store/forward-token-cursor.js
new file mode 100644
index 0000000000..523ed398fa
--- /dev/null
+++ b/tools/node_modules/eslint/lib/token-store/forward-token-cursor.js
@@ -0,0 +1,63 @@
+/**
+ * @fileoverview Define the cursor which iterates tokens only.
+ * @author Toru Nagashima
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const Cursor = require("./cursor");
+const utils = require("./utils");
+
+//------------------------------------------------------------------------------
+// Exports
+//------------------------------------------------------------------------------
+
+/**
+ * The cursor which iterates tokens only.
+ */
+module.exports = class ForwardTokenCursor extends Cursor {
+
+ /**
+ * Initializes this cursor.
+ * @param {Token[]} tokens - The array of tokens.
+ * @param {Comment[]} comments - The array of comments.
+ * @param {Object} indexMap - The map from locations to indices in `tokens`.
+ * @param {number} startLoc - The start location of the iteration range.
+ * @param {number} endLoc - The end location of the iteration range.
+ */
+ constructor(tokens, comments, indexMap, startLoc, endLoc) {
+ super();
+ this.tokens = tokens;
+ this.index = utils.getFirstIndex(tokens, indexMap, startLoc);
+ this.indexEnd = utils.getLastIndex(tokens, indexMap, endLoc);
+ }
+
+ /** @inheritdoc */
+ moveNext() {
+ if (this.index <= this.indexEnd) {
+ this.current = this.tokens[this.index];
+ this.index += 1;
+ return true;
+ }
+ return false;
+ }
+
+ /*
+ *
+ * Shorthand for performance.
+ *
+ */
+
+ /** @inheritdoc */
+ getOneToken() {
+ return (this.index <= this.indexEnd) ? this.tokens[this.index] : null;
+ }
+
+ /** @inheritdoc */
+ getAllTokens() {
+ return this.tokens.slice(this.index, this.indexEnd + 1);
+ }
+};
diff --git a/tools/node_modules/eslint/lib/token-store/index.js b/tools/node_modules/eslint/lib/token-store/index.js
new file mode 100644
index 0000000000..1446b9ff02
--- /dev/null
+++ b/tools/node_modules/eslint/lib/token-store/index.js
@@ -0,0 +1,633 @@
+/**
+ * @fileoverview Object to handle access and retrieval of tokens.
+ * @author Brandon Mills
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const assert = require("assert");
+const cursors = require("./cursors");
+const ForwardTokenCursor = require("./forward-token-cursor");
+const PaddedTokenCursor = require("./padded-token-cursor");
+const utils = require("./utils");
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+const TOKENS = Symbol("tokens");
+const COMMENTS = Symbol("comments");
+const INDEX_MAP = Symbol("indexMap");
+
+/**
+ * Creates the map from locations to indices in `tokens`.
+ *
+ * The first/last location of tokens is mapped to the index of the token.
+ * The first/last location of comments is mapped to the index of the next token of each comment.
+ *
+ * @param {Token[]} tokens - The array of tokens.
+ * @param {Comment[]} comments - The array of comments.
+ * @returns {Object} The map from locations to indices in `tokens`.
+ * @private
+ */
+function createIndexMap(tokens, comments) {
+ const map = Object.create(null);
+ let tokenIndex = 0;
+ let commentIndex = 0;
+ let nextStart = 0;
+ let range = null;
+
+ while (tokenIndex < tokens.length || commentIndex < comments.length) {
+ nextStart = (commentIndex < comments.length) ? comments[commentIndex].range[0] : Number.MAX_SAFE_INTEGER;
+ while (tokenIndex < tokens.length && (range = tokens[tokenIndex].range)[0] < nextStart) {
+ map[range[0]] = tokenIndex;
+ map[range[1] - 1] = tokenIndex;
+ tokenIndex += 1;
+ }
+
+ nextStart = (tokenIndex < tokens.length) ? tokens[tokenIndex].range[0] : Number.MAX_SAFE_INTEGER;
+ while (commentIndex < comments.length && (range = comments[commentIndex].range)[0] < nextStart) {
+ map[range[0]] = tokenIndex;
+ map[range[1] - 1] = tokenIndex;
+ commentIndex += 1;
+ }
+ }
+
+ return map;
+}
+
+/**
+ * Creates the cursor iterates tokens with options.
+ *
+ * @param {CursorFactory} factory - The cursor factory to initialize cursor.
+ * @param {Token[]} tokens - The array of tokens.
+ * @param {Comment[]} comments - The array of comments.
+ * @param {Object} indexMap - The map from locations to indices in `tokens`.
+ * @param {number} startLoc - The start location of the iteration range.
+ * @param {number} endLoc - The end location of the iteration range.
+ * @param {number|Function|Object} [opts=0] - The option object. If this is a number then it's `opts.skip`. If this is a function then it's `opts.filter`.
+ * @param {boolean} [opts.includeComments=false] - The flag to iterate comments as well.
+ * @param {Function|null} [opts.filter=null] - The predicate function to choose tokens.
+ * @param {number} [opts.skip=0] - The count of tokens the cursor skips.
+ * @returns {Cursor} The created cursor.
+ * @private
+ */
+function createCursorWithSkip(factory, tokens, comments, indexMap, startLoc, endLoc, opts) {
+ let includeComments = false;
+ let skip = 0;
+ let filter = null;
+
+ if (typeof opts === "number") {
+ skip = opts | 0;
+ } else if (typeof opts === "function") {
+ filter = opts;
+ } else if (opts) {
+ includeComments = !!opts.includeComments;
+ skip = opts.skip | 0;
+ filter = opts.filter || null;
+ }
+ assert(skip >= 0, "options.skip should be zero or a positive integer.");
+ assert(!filter || typeof filter === "function", "options.filter should be a function.");
+
+ return factory.createCursor(tokens, comments, indexMap, startLoc, endLoc, includeComments, filter, skip, -1);
+}
+
+/**
+ * Creates the cursor iterates tokens with options.
+ *
+ * @param {CursorFactory} factory - The cursor factory to initialize cursor.
+ * @param {Token[]} tokens - The array of tokens.
+ * @param {Comment[]} comments - The array of comments.
+ * @param {Object} indexMap - The map from locations to indices in `tokens`.
+ * @param {number} startLoc - The start location of the iteration range.
+ * @param {number} endLoc - The end location of the iteration range.
+ * @param {number|Function|Object} [opts=0] - The option object. If this is a number then it's `opts.count`. If this is a function then it's `opts.filter`.
+ * @param {boolean} [opts.includeComments] - The flag to iterate comments as well.
+ * @param {Function|null} [opts.filter=null] - The predicate function to choose tokens.
+ * @param {number} [opts.count=0] - The maximum count of tokens the cursor iterates. Zero is no iteration for backward compatibility.
+ * @returns {Cursor} The created cursor.
+ * @private
+ */
+function createCursorWithCount(factory, tokens, comments, indexMap, startLoc, endLoc, opts) {
+ let includeComments = false;
+ let count = 0;
+ let countExists = false;
+ let filter = null;
+
+ if (typeof opts === "number") {
+ count = opts | 0;
+ countExists = true;
+ } else if (typeof opts === "function") {
+ filter = opts;
+ } else if (opts) {
+ includeComments = !!opts.includeComments;
+ count = opts.count | 0;
+ countExists = typeof opts.count === "number";
+ filter = opts.filter || null;
+ }
+ assert(count >= 0, "options.count should be zero or a positive integer.");
+ assert(!filter || typeof filter === "function", "options.filter should be a function.");
+
+ return factory.createCursor(tokens, comments, indexMap, startLoc, endLoc, includeComments, filter, 0, countExists ? count : -1);
+}
+
+/**
+ * Creates the cursor iterates tokens with options.
+ * This is overload function of the below.
+ *
+ * @param {Token[]} tokens - The array of tokens.
+ * @param {Comment[]} comments - The array of comments.
+ * @param {Object} indexMap - The map from locations to indices in `tokens`.
+ * @param {number} startLoc - The start location of the iteration range.
+ * @param {number} endLoc - The end location of the iteration range.
+ * @param {Function|Object} opts - The option object. If this is a function then it's `opts.filter`.
+ * @param {boolean} [opts.includeComments] - The flag to iterate comments as well.
+ * @param {Function|null} [opts.filter=null] - The predicate function to choose tokens.
+ * @param {number} [opts.count=0] - The maximum count of tokens the cursor iterates. Zero is no iteration for backward compatibility.
+ * @returns {Cursor} The created cursor.
+ * @private
+ */
+/**
+ * Creates the cursor iterates tokens with options.
+ *
+ * @param {Token[]} tokens - The array of tokens.
+ * @param {Comment[]} comments - The array of comments.
+ * @param {Object} indexMap - The map from locations to indices in `tokens`.
+ * @param {number} startLoc - The start location of the iteration range.
+ * @param {number} endLoc - The end location of the iteration range.
+ * @param {number} [beforeCount=0] - The number of tokens before the node to retrieve.
+ * @param {boolean} [afterCount=0] - The number of tokens after the node to retrieve.
+ * @returns {Cursor} The created cursor.
+ * @private
+ */
+function createCursorWithPadding(tokens, comments, indexMap, startLoc, endLoc, beforeCount, afterCount) {
+ if (typeof beforeCount === "undefined" && typeof afterCount === "undefined") {
+ return new ForwardTokenCursor(tokens, comments, indexMap, startLoc, endLoc);
+ }
+ if (typeof beforeCount === "number" || typeof beforeCount === "undefined") {
+ return new PaddedTokenCursor(tokens, comments, indexMap, startLoc, endLoc, beforeCount | 0, afterCount | 0);
+ }
+ return createCursorWithCount(cursors.forward, tokens, comments, indexMap, startLoc, endLoc, beforeCount);
+}
+
+/**
+ * Gets comment tokens that are adjacent to the current cursor position.
+ * @param {Cursor} cursor - A cursor instance.
+ * @returns {Array} An array of comment tokens adjacent to the current cursor position.
+ * @private
+ */
+function getAdjacentCommentTokensFromCursor(cursor) {
+ const tokens = [];
+ let currentToken = cursor.getOneToken();
+
+ while (currentToken && astUtils.isCommentToken(currentToken)) {
+ tokens.push(currentToken);
+ currentToken = cursor.getOneToken();
+ }
+
+ return tokens;
+}
+
+//------------------------------------------------------------------------------
+// Exports
+//------------------------------------------------------------------------------
+
+/**
+ * The token store.
+ *
+ * This class provides methods to get tokens by locations as fast as possible.
+ * The methods are a part of public API, so we should be careful if it changes this class.
+ *
+ * People can get tokens in O(1) by the hash map which is mapping from the location of tokens/comments to tokens.
+ * Also people can get a mix of tokens and comments in O(log k), the k is the number of comments.
+ * Assuming that comments to be much fewer than tokens, this does not make hash map from token's locations to comments to reduce memory cost.
+ * This uses binary-searching instead for comments.
+ */
+module.exports = class TokenStore {
+
+ /**
+ * Initializes this token store.
+ * @param {Token[]} tokens - The array of tokens.
+ * @param {Comment[]} comments - The array of comments.
+ */
+ constructor(tokens, comments) {
+ this[TOKENS] = tokens;
+ this[COMMENTS] = comments;
+ this[INDEX_MAP] = createIndexMap(tokens, comments);
+ }
+
+ //--------------------------------------------------------------------------
+ // Gets single token.
+ //--------------------------------------------------------------------------
+
+ /**
+ * Gets the token starting at the specified index.
+ * @param {number} offset - Index of the start of the token's range.
+ * @param {Object} [options=0] - The option object.
+ * @param {boolean} [options.includeComments=false] - The flag to iterate comments as well.
+ * @returns {Token|null} The token starting at index, or null if no such token.
+ */
+ getTokenByRangeStart(offset, options) {
+ const includeComments = options && options.includeComments;
+ const token = cursors.forward.createBaseCursor(
+ this[TOKENS],
+ this[COMMENTS],
+ this[INDEX_MAP],
+ offset,
+ -1,
+ includeComments
+ ).getOneToken();
+
+ if (token && token.range[0] === offset) {
+ return token;
+ }
+ return null;
+ }
+
+ /**
+ * Gets the first token of the given node.
+ * @param {ASTNode} node - The AST node.
+ * @param {number|Function|Object} [options=0] - The option object. If this is a number then it's `options.skip`. If this is a function then it's `options.filter`.
+ * @param {boolean} [options.includeComments=false] - The flag to iterate comments as well.
+ * @param {Function|null} [options.filter=null] - The predicate function to choose tokens.
+ * @param {number} [options.skip=0] - The count of tokens the cursor skips.
+ * @returns {Token|null} An object representing the token.
+ */
+ getFirstToken(node, options) {
+ return createCursorWithSkip(
+ cursors.forward,
+ this[TOKENS],
+ this[COMMENTS],
+ this[INDEX_MAP],
+ node.range[0],
+ node.range[1],
+ options
+ ).getOneToken();
+ }
+
+ /**
+ * Gets the last token of the given node.
+ * @param {ASTNode} node - The AST node.
+ * @param {number|Function|Object} [options=0] - The option object. Same options as getFirstToken()
+ * @returns {Token|null} An object representing the token.
+ */
+ getLastToken(node, options) {
+ return createCursorWithSkip(
+ cursors.backward,
+ this[TOKENS],
+ this[COMMENTS],
+ this[INDEX_MAP],
+ node.range[0],
+ node.range[1],
+ options
+ ).getOneToken();
+ }
+
+ /**
+ * Gets the token that precedes a given node or token.
+ * @param {ASTNode|Token|Comment} node - The AST node or token.
+ * @param {number|Function|Object} [options=0] - The option object. Same options as getFirstToken()
+ * @returns {Token|null} An object representing the token.
+ */
+ getTokenBefore(node, options) {
+ return createCursorWithSkip(
+ cursors.backward,
+ this[TOKENS],
+ this[COMMENTS],
+ this[INDEX_MAP],
+ -1,
+ node.range[0],
+ options
+ ).getOneToken();
+ }
+
+ /**
+ * Gets the token that follows a given node or token.
+ * @param {ASTNode|Token|Comment} node - The AST node or token.
+ * @param {number|Function|Object} [options=0] - The option object. Same options as getFirstToken()
+ * @returns {Token|null} An object representing the token.
+ */
+ getTokenAfter(node, options) {
+ return createCursorWithSkip(
+ cursors.forward,
+ this[TOKENS],
+ this[COMMENTS],
+ this[INDEX_MAP],
+ node.range[1],
+ -1,
+ options
+ ).getOneToken();
+ }
+
+ /**
+ * Gets the first token between two non-overlapping nodes.
+ * @param {ASTNode|Token|Comment} left - Node before the desired token range.
+ * @param {ASTNode|Token|Comment} right - Node after the desired token range.
+ * @param {number|Function|Object} [options=0] - The option object. Same options as getFirstToken()
+ * @returns {Token|null} An object representing the token.
+ */
+ getFirstTokenBetween(left, right, options) {
+ return createCursorWithSkip(
+ cursors.forward,
+ this[TOKENS],
+ this[COMMENTS],
+ this[INDEX_MAP],
+ left.range[1],
+ right.range[0],
+ options
+ ).getOneToken();
+ }
+
+ /**
+ * Gets the last token between two non-overlapping nodes.
+ * @param {ASTNode|Token|Comment} left Node before the desired token range.
+ * @param {ASTNode|Token|Comment} right Node after the desired token range.
+ * @param {number|Function|Object} [options=0] - The option object. Same options as getFirstToken()
+ * @returns {Token|null} An object representing the token.
+ */
+ getLastTokenBetween(left, right, options) {
+ return createCursorWithSkip(
+ cursors.backward,
+ this[TOKENS],
+ this[COMMENTS],
+ this[INDEX_MAP],
+ left.range[1],
+ right.range[0],
+ options
+ ).getOneToken();
+ }
+
+ /**
+ * Gets the token that precedes a given node or token in the token stream.
+ * This is defined for backward compatibility. Use `includeComments` option instead.
+ * TODO: We have a plan to remove this in a future major version.
+ * @param {ASTNode|Token|Comment} node The AST node or token.
+ * @param {number} [skip=0] A number of tokens to skip.
+ * @returns {Token|null} An object representing the token.
+ * @deprecated
+ */
+ getTokenOrCommentBefore(node, skip) {
+ return this.getTokenBefore(node, { includeComments: true, skip });
+ }
+
+ /**
+ * Gets the token that follows a given node or token in the token stream.
+ * This is defined for backward compatibility. Use `includeComments` option instead.
+ * TODO: We have a plan to remove this in a future major version.
+ * @param {ASTNode|Token|Comment} node The AST node or token.
+ * @param {number} [skip=0] A number of tokens to skip.
+ * @returns {Token|null} An object representing the token.
+ * @deprecated
+ */
+ getTokenOrCommentAfter(node, skip) {
+ return this.getTokenAfter(node, { includeComments: true, skip });
+ }
+
+ //--------------------------------------------------------------------------
+ // Gets multiple tokens.
+ //--------------------------------------------------------------------------
+
+ /**
+ * Gets the first `count` tokens of the given node.
+ * @param {ASTNode} node - The AST node.
+ * @param {number|Function|Object} [options=0] - The option object. If this is a number then it's `options.count`. If this is a function then it's `options.filter`.
+ * @param {boolean} [options.includeComments=false] - The flag to iterate comments as well.
+ * @param {Function|null} [options.filter=null] - The predicate function to choose tokens.
+ * @param {number} [options.count=0] - The maximum count of tokens the cursor iterates.
+ * @returns {Token[]} Tokens.
+ */
+ getFirstTokens(node, options) {
+ return createCursorWithCount(
+ cursors.forward,
+ this[TOKENS],
+ this[COMMENTS],
+ this[INDEX_MAP],
+ node.range[0],
+ node.range[1],
+ options
+ ).getAllTokens();
+ }
+
+ /**
+ * Gets the last `count` tokens of the given node.
+ * @param {ASTNode} node - The AST node.
+ * @param {number|Function|Object} [options=0] - The option object. Same options as getFirstTokens()
+ * @returns {Token[]} Tokens.
+ */
+ getLastTokens(node, options) {
+ return createCursorWithCount(
+ cursors.backward,
+ this[TOKENS],
+ this[COMMENTS],
+ this[INDEX_MAP],
+ node.range[0],
+ node.range[1],
+ options
+ ).getAllTokens().reverse();
+ }
+
+ /**
+ * Gets the `count` tokens that precedes a given node or token.
+ * @param {ASTNode|Token|Comment} node - The AST node or token.
+ * @param {number|Function|Object} [options=0] - The option object. Same options as getFirstTokens()
+ * @returns {Token[]} Tokens.
+ */
+ getTokensBefore(node, options) {
+ return createCursorWithCount(
+ cursors.backward,
+ this[TOKENS],
+ this[COMMENTS],
+ this[INDEX_MAP],
+ -1,
+ node.range[0],
+ options
+ ).getAllTokens().reverse();
+ }
+
+ /**
+ * Gets the `count` tokens that follows a given node or token.
+ * @param {ASTNode|Token|Comment} node - The AST node or token.
+ * @param {number|Function|Object} [options=0] - The option object. Same options as getFirstTokens()
+ * @returns {Token[]} Tokens.
+ */
+ getTokensAfter(node, options) {
+ return createCursorWithCount(
+ cursors.forward,
+ this[TOKENS],
+ this[COMMENTS],
+ this[INDEX_MAP],
+ node.range[1],
+ -1,
+ options
+ ).getAllTokens();
+ }
+
+ /**
+ * Gets the first `count` tokens between two non-overlapping nodes.
+ * @param {ASTNode|Token|Comment} left - Node before the desired token range.
+ * @param {ASTNode|Token|Comment} right - Node after the desired token range.
+ * @param {number|Function|Object} [options=0] - The option object. Same options as getFirstTokens()
+ * @returns {Token[]} Tokens between left and right.
+ */
+ getFirstTokensBetween(left, right, options) {
+ return createCursorWithCount(
+ cursors.forward,
+ this[TOKENS],
+ this[COMMENTS],
+ this[INDEX_MAP],
+ left.range[1],
+ right.range[0],
+ options
+ ).getAllTokens();
+ }
+
+ /**
+ * Gets the last `count` tokens between two non-overlapping nodes.
+ * @param {ASTNode|Token|Comment} left Node before the desired token range.
+ * @param {ASTNode|Token|Comment} right Node after the desired token range.
+ * @param {number|Function|Object} [options=0] - The option object. Same options as getFirstTokens()
+ * @returns {Token[]} Tokens between left and right.
+ */
+ getLastTokensBetween(left, right, options) {
+ return createCursorWithCount(
+ cursors.backward,
+ this[TOKENS],
+ this[COMMENTS],
+ this[INDEX_MAP],
+ left.range[1],
+ right.range[0],
+ options
+ ).getAllTokens().reverse();
+ }
+
+ /**
+ * Gets all tokens that are related to the given node.
+ * @param {ASTNode} node - The AST node.
+ * @param {Function|Object} options The option object. If this is a function then it's `options.filter`.
+ * @param {boolean} [options.includeComments=false] - The flag to iterate comments as well.
+ * @param {Function|null} [options.filter=null] - The predicate function to choose tokens.
+ * @param {number} [options.count=0] - The maximum count of tokens the cursor iterates.
+ * @returns {Token[]} Array of objects representing tokens.
+ */
+ /**
+ * Gets all tokens that are related to the given node.
+ * @param {ASTNode} node - The AST node.
+ * @param {int} [beforeCount=0] - The number of tokens before the node to retrieve.
+ * @param {int} [afterCount=0] - The number of tokens after the node to retrieve.
+ * @returns {Token[]} Array of objects representing tokens.
+ */
+ getTokens(node, beforeCount, afterCount) {
+ return createCursorWithPadding(
+ this[TOKENS],
+ this[COMMENTS],
+ this[INDEX_MAP],
+ node.range[0],
+ node.range[1],
+ beforeCount,
+ afterCount
+ ).getAllTokens();
+ }
+
+ /**
+ * Gets all of the tokens between two non-overlapping nodes.
+ * @param {ASTNode|Token|Comment} left Node before the desired token range.
+ * @param {ASTNode|Token|Comment} right Node after the desired token range.
+ * @param {Function|Object} options The option object. If this is a function then it's `options.filter`.
+ * @param {boolean} [options.includeComments=false] - The flag to iterate comments as well.
+ * @param {Function|null} [options.filter=null] - The predicate function to choose tokens.
+ * @param {number} [options.count=0] - The maximum count of tokens the cursor iterates.
+ * @returns {Token[]} Tokens between left and right.
+ */
+ /**
+ * Gets all of the tokens between two non-overlapping nodes.
+ * @param {ASTNode|Token|Comment} left Node before the desired token range.
+ * @param {ASTNode|Token|Comment} right Node after the desired token range.
+ * @param {int} [padding=0] Number of extra tokens on either side of center.
+ * @returns {Token[]} Tokens between left and right.
+ */
+ getTokensBetween(left, right, padding) {
+ return createCursorWithPadding(
+ this[TOKENS],
+ this[COMMENTS],
+ this[INDEX_MAP],
+ left.range[1],
+ right.range[0],
+ padding,
+ padding
+ ).getAllTokens();
+ }
+
+ //--------------------------------------------------------------------------
+ // Others.
+ //--------------------------------------------------------------------------
+
+ /**
+ * Checks whether any comments exist or not between the given 2 nodes.
+ *
+ * @param {ASTNode} left - The node to check.
+ * @param {ASTNode} right - The node to check.
+ * @returns {boolean} `true` if one or more comments exist.
+ */
+ commentsExistBetween(left, right) {
+ const index = utils.search(this[COMMENTS], left.range[1]);
+
+ return (
+ index < this[COMMENTS].length &&
+ this[COMMENTS][index].range[1] <= right.range[0]
+ );
+ }
+
+ /**
+ * Gets all comment tokens directly before the given node or token.
+ * @param {ASTNode|token} nodeOrToken The AST node or token to check for adjacent comment tokens.
+ * @returns {Array} An array of comments in occurrence order.
+ */
+ getCommentsBefore(nodeOrToken) {
+ const cursor = createCursorWithCount(
+ cursors.backward,
+ this[TOKENS],
+ this[COMMENTS],
+ this[INDEX_MAP],
+ -1,
+ nodeOrToken.range[0],
+ { includeComments: true }
+ );
+
+ return getAdjacentCommentTokensFromCursor(cursor).reverse();
+ }
+
+ /**
+ * Gets all comment tokens directly after the given node or token.
+ * @param {ASTNode|token} nodeOrToken The AST node or token to check for adjacent comment tokens.
+ * @returns {Array} An array of comments in occurrence order.
+ */
+ getCommentsAfter(nodeOrToken) {
+ const cursor = createCursorWithCount(
+ cursors.forward,
+ this[TOKENS],
+ this[COMMENTS],
+ this[INDEX_MAP],
+ nodeOrToken.range[1],
+ -1,
+ { includeComments: true }
+ );
+
+ return getAdjacentCommentTokensFromCursor(cursor);
+ }
+
+ /**
+ * Gets all comment tokens inside the given node.
+ * @param {ASTNode} node The AST node to get the comments for.
+ * @returns {Array} An array of comments in occurrence order.
+ */
+ getCommentsInside(node) {
+ return this.getTokens(node, {
+ includeComments: true,
+ filter: astUtils.isCommentToken
+ });
+ }
+};
diff --git a/tools/node_modules/eslint/lib/token-store/limit-cursor.js b/tools/node_modules/eslint/lib/token-store/limit-cursor.js
new file mode 100644
index 0000000000..efb46cf0e3
--- /dev/null
+++ b/tools/node_modules/eslint/lib/token-store/limit-cursor.js
@@ -0,0 +1,40 @@
+/**
+ * @fileoverview Define the cursor which limits the number of tokens.
+ * @author Toru Nagashima
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const DecorativeCursor = require("./decorative-cursor");
+
+//------------------------------------------------------------------------------
+// Exports
+//------------------------------------------------------------------------------
+
+/**
+ * The decorative cursor which limits the number of tokens.
+ */
+module.exports = class LimitCursor extends DecorativeCursor {
+
+ /**
+ * Initializes this cursor.
+ * @param {Cursor} cursor - The cursor to be decorated.
+ * @param {number} count - The count of tokens this cursor iterates.
+ */
+ constructor(cursor, count) {
+ super(cursor);
+ this.count = count;
+ }
+
+ /** @inheritdoc */
+ moveNext() {
+ if (this.count > 0) {
+ this.count -= 1;
+ return super.moveNext();
+ }
+ return false;
+ }
+};
diff --git a/tools/node_modules/eslint/lib/token-store/padded-token-cursor.js b/tools/node_modules/eslint/lib/token-store/padded-token-cursor.js
new file mode 100644
index 0000000000..c083aed1e9
--- /dev/null
+++ b/tools/node_modules/eslint/lib/token-store/padded-token-cursor.js
@@ -0,0 +1,38 @@
+/**
+ * @fileoverview Define the cursor which iterates tokens only, with inflated range.
+ * @author Toru Nagashima
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const ForwardTokenCursor = require("./forward-token-cursor");
+
+//------------------------------------------------------------------------------
+// Exports
+//------------------------------------------------------------------------------
+
+/**
+ * The cursor which iterates tokens only, with inflated range.
+ * This is for the backward compatibility of padding options.
+ */
+module.exports = class PaddedTokenCursor extends ForwardTokenCursor {
+
+ /**
+ * Initializes this cursor.
+ * @param {Token[]} tokens - The array of tokens.
+ * @param {Comment[]} comments - The array of comments.
+ * @param {Object} indexMap - The map from locations to indices in `tokens`.
+ * @param {number} startLoc - The start location of the iteration range.
+ * @param {number} endLoc - The end location of the iteration range.
+ * @param {number} beforeCount - The number of tokens this cursor iterates before start.
+ * @param {number} afterCount - The number of tokens this cursor iterates after end.
+ */
+ constructor(tokens, comments, indexMap, startLoc, endLoc, beforeCount, afterCount) {
+ super(tokens, comments, indexMap, startLoc, endLoc);
+ this.index = Math.max(0, this.index - beforeCount);
+ this.indexEnd = Math.min(tokens.length - 1, this.indexEnd + afterCount);
+ }
+};
diff --git a/tools/node_modules/eslint/lib/token-store/skip-cursor.js b/tools/node_modules/eslint/lib/token-store/skip-cursor.js
new file mode 100644
index 0000000000..ab34dfab0d
--- /dev/null
+++ b/tools/node_modules/eslint/lib/token-store/skip-cursor.js
@@ -0,0 +1,42 @@
+/**
+ * @fileoverview Define the cursor which ignores the first few tokens.
+ * @author Toru Nagashima
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const DecorativeCursor = require("./decorative-cursor");
+
+//------------------------------------------------------------------------------
+// Exports
+//------------------------------------------------------------------------------
+
+/**
+ * The decorative cursor which ignores the first few tokens.
+ */
+module.exports = class SkipCursor extends DecorativeCursor {
+
+ /**
+ * Initializes this cursor.
+ * @param {Cursor} cursor - The cursor to be decorated.
+ * @param {number} count - The count of tokens this cursor skips.
+ */
+ constructor(cursor, count) {
+ super(cursor);
+ this.count = count;
+ }
+
+ /** @inheritdoc */
+ moveNext() {
+ while (this.count > 0) {
+ this.count -= 1;
+ if (!super.moveNext()) {
+ return false;
+ }
+ }
+ return super.moveNext();
+ }
+};
diff --git a/tools/node_modules/eslint/lib/token-store/utils.js b/tools/node_modules/eslint/lib/token-store/utils.js
new file mode 100644
index 0000000000..34b0a9af6d
--- /dev/null
+++ b/tools/node_modules/eslint/lib/token-store/utils.js
@@ -0,0 +1,104 @@
+/**
+ * @fileoverview Define utilify functions for token store.
+ * @author Toru Nagashima
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const lodash = require("lodash");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Gets `token.range[0]` from the given token.
+ *
+ * @param {Node|Token|Comment} token - The token to get.
+ * @returns {number} The start location.
+ * @private
+ */
+function getStartLocation(token) {
+ return token.range[0];
+}
+
+//------------------------------------------------------------------------------
+// Exports
+//------------------------------------------------------------------------------
+
+/**
+ * Binary-searches the index of the first token which is after the given location.
+ * If it was not found, this returns `tokens.length`.
+ *
+ * @param {(Token|Comment)[]} tokens - It searches the token in this list.
+ * @param {number} location - The location to search.
+ * @returns {number} The found index or `tokens.length`.
+ */
+exports.search = function search(tokens, location) {
+ return lodash.sortedIndexBy(
+ tokens,
+ { range: [location] },
+ getStartLocation
+ );
+};
+
+/**
+ * Gets the index of the `startLoc` in `tokens`.
+ * `startLoc` can be the value of `node.range[1]`, so this checks about `startLoc - 1` as well.
+ *
+ * @param {(Token|Comment)[]} tokens - The tokens to find an index.
+ * @param {Object} indexMap - The map from locations to indices.
+ * @param {number} startLoc - The location to get an index.
+ * @returns {number} The index.
+ */
+exports.getFirstIndex = function getFirstIndex(tokens, indexMap, startLoc) {
+ if (startLoc in indexMap) {
+ return indexMap[startLoc];
+ }
+ if ((startLoc - 1) in indexMap) {
+ const index = indexMap[startLoc - 1];
+ const token = (index >= 0 && index < tokens.length) ? tokens[index] : null;
+
+ /*
+ * For the map of "comment's location -> token's index", it points the next token of a comment.
+ * In that case, +1 is unnecessary.
+ */
+ if (token && token.range[0] >= startLoc) {
+ return index;
+ }
+ return index + 1;
+ }
+ return 0;
+};
+
+/**
+ * Gets the index of the `endLoc` in `tokens`.
+ * The information of end locations are recorded at `endLoc - 1` in `indexMap`, so this checks about `endLoc - 1` as well.
+ *
+ * @param {(Token|Comment)[]} tokens - The tokens to find an index.
+ * @param {Object} indexMap - The map from locations to indices.
+ * @param {number} endLoc - The location to get an index.
+ * @returns {number} The index.
+ */
+exports.getLastIndex = function getLastIndex(tokens, indexMap, endLoc) {
+ if (endLoc in indexMap) {
+ return indexMap[endLoc] - 1;
+ }
+ if ((endLoc - 1) in indexMap) {
+ const index = indexMap[endLoc - 1];
+ const token = (index >= 0 && index < tokens.length) ? tokens[index] : null;
+
+ /*
+ * For the map of "comment's location -> token's index", it points the next token of a comment.
+ * In that case, -1 is necessary.
+ */
+ if (token && token.range[1] > endLoc) {
+ return index - 1;
+ }
+ return index;
+ }
+ return tokens.length - 1;
+};
diff --git a/tools/node_modules/eslint/lib/util/ajv.js b/tools/node_modules/eslint/lib/util/ajv.js
new file mode 100644
index 0000000000..f9e8b98535
--- /dev/null
+++ b/tools/node_modules/eslint/lib/util/ajv.js
@@ -0,0 +1,29 @@
+/**
+ * @fileoverview The instance of Ajv validator.
+ * @author Evgeny Poberezkin
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const Ajv = require("ajv"),
+ metaSchema = require("ajv/lib/refs/json-schema-draft-04.json");
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+const ajv = new Ajv({
+ meta: false,
+ validateSchema: false,
+ missingRefs: "ignore",
+ verbose: true
+});
+
+ajv.addMetaSchema(metaSchema);
+// eslint-disable-next-line no-underscore-dangle
+ajv._opts.defaultMeta = metaSchema.id;
+
+module.exports = ajv;
diff --git a/tools/node_modules/eslint/lib/util/apply-disable-directives.js b/tools/node_modules/eslint/lib/util/apply-disable-directives.js
new file mode 100644
index 0000000000..8153942789
--- /dev/null
+++ b/tools/node_modules/eslint/lib/util/apply-disable-directives.js
@@ -0,0 +1,160 @@
+/**
+ * @fileoverview A module that filters reported problems based on `eslint-disable` and `eslint-enable` comments
+ * @author Teddy Katz
+ */
+
+"use strict";
+
+const lodash = require("lodash");
+
+/**
+ * Compares the locations of two objects in a source file
+ * @param {{line: number, column: number}} itemA The first object
+ * @param {{line: number, column: number}} itemB The second object
+ * @returns {number} A value less than 1 if itemA appears before itemB in the source file, greater than 1 if
+ * itemA appears after itemB in the source file, or 0 if itemA and itemB have the same location.
+ */
+function compareLocations(itemA, itemB) {
+ return itemA.line - itemB.line || itemA.column - itemB.column;
+}
+
+/**
+ * This is the same as the exported function, except that it
+ * doesn't handle disable-line and disable-next-line directives, and it always reports unused
+ * disable directives.
+ * @param {Object} options options for applying directives. This is the same as the options
+ * for the exported function, except that `reportUnusedDisableDirectives` is not supported
+ * (this function always reports unused disable directives).
+ * @returns {{problems: Problem[], unusedDisableDirectives: Problem[]}} An object with a list
+ * of filtered problems and unused eslint-disable directives
+ */
+function applyDirectives(options) {
+ const problems = [];
+ let nextDirectiveIndex = 0;
+ let currentGlobalDisableDirective = null;
+ const disabledRuleMap = new Map();
+
+ // enabledRules is only used when there is a current global disable directive.
+ const enabledRules = new Set();
+ const usedDisableDirectives = new Set();
+
+ for (const problem of options.problems) {
+ while (
+ nextDirectiveIndex < options.directives.length &&
+ compareLocations(options.directives[nextDirectiveIndex], problem) <= 0
+ ) {
+ const directive = options.directives[nextDirectiveIndex++];
+
+ switch (directive.type) {
+ case "disable":
+ if (directive.ruleId === null) {
+ currentGlobalDisableDirective = directive;
+ disabledRuleMap.clear();
+ enabledRules.clear();
+ } else if (currentGlobalDisableDirective) {
+ enabledRules.delete(directive.ruleId);
+ disabledRuleMap.set(directive.ruleId, directive);
+ } else {
+ disabledRuleMap.set(directive.ruleId, directive);
+ }
+ break;
+
+ case "enable":
+ if (directive.ruleId === null) {
+ currentGlobalDisableDirective = null;
+ disabledRuleMap.clear();
+ } else if (currentGlobalDisableDirective) {
+ enabledRules.add(directive.ruleId);
+ disabledRuleMap.delete(directive.ruleId);
+ } else {
+ disabledRuleMap.delete(directive.ruleId);
+ }
+ break;
+
+ // no default
+ }
+ }
+
+ if (disabledRuleMap.has(problem.ruleId)) {
+ usedDisableDirectives.add(disabledRuleMap.get(problem.ruleId));
+ } else if (currentGlobalDisableDirective && !enabledRules.has(problem.ruleId)) {
+ usedDisableDirectives.add(currentGlobalDisableDirective);
+ } else {
+ problems.push(problem);
+ }
+ }
+
+ const unusedDisableDirectives = options.directives
+ .filter(directive => directive.type === "disable" && !usedDisableDirectives.has(directive))
+ .map(directive => ({
+ ruleId: null,
+ message: directive.ruleId
+ ? `Unused eslint-disable directive (no problems were reported from '${directive.ruleId}').`
+ : "Unused eslint-disable directive (no problems were reported).",
+ line: directive.unprocessedDirective.line,
+ column: directive.unprocessedDirective.column,
+ severity: 2,
+ source: null,
+ nodeType: null
+ }));
+
+ return { problems, unusedDisableDirectives };
+}
+
+/**
+ * Given a list of directive comments (i.e. metadata about eslint-disable and eslint-enable comments) and a list
+ * of reported problems, determines which problems should be reported.
+ * @param {Object} options Information about directives and problems
+ * @param {{
+ * type: ("disable"|"enable"|"disable-line"|"disable-next-line"),
+ * ruleId: (string|null),
+ * line: number,
+ * column: number
+ * }} options.directives Directive comments found in the file, with one-based columns.
+ * Two directive comments can only have the same location if they also have the same type (e.g. a single eslint-disable
+ * comment for two different rules is represented as two directives).
+ * @param {{ruleId: (string|null), line: number, column: number}[]} options.problems
+ * A list of problems reported by rules, sorted by increasing location in the file, with one-based columns.
+ * @param {boolean} options.reportUnusedDisableDirectives If `true`, adds additional problems for unused directives
+ * @returns {{ruleId: (string|null), line: number, column: number}[]}
+ * A list of reported problems that were not disabled by the directive comments.
+ */
+module.exports = options => {
+ const blockDirectives = options.directives
+ .filter(directive => directive.type === "disable" || directive.type === "enable")
+ .map(directive => Object.assign({}, directive, { unprocessedDirective: directive }))
+ .sort(compareLocations);
+
+ const lineDirectives = lodash.flatMap(options.directives, directive => {
+ switch (directive.type) {
+ case "disable":
+ case "enable":
+ return [];
+
+ case "disable-line":
+ return [
+ { type: "disable", line: directive.line, column: 1, ruleId: directive.ruleId, unprocessedDirective: directive },
+ { type: "enable", line: directive.line + 1, column: 0, ruleId: directive.ruleId, unprocessedDirective: directive }
+ ];
+
+ case "disable-next-line":
+ return [
+ { type: "disable", line: directive.line + 1, column: 1, ruleId: directive.ruleId, unprocessedDirective: directive },
+ { type: "enable", line: directive.line + 2, column: 0, ruleId: directive.ruleId, unprocessedDirective: directive }
+ ];
+
+ default:
+ throw new TypeError(`Unrecognized directive type '${directive.type}'`);
+ }
+ }).sort(compareLocations);
+
+ const blockDirectivesResult = applyDirectives({ problems: options.problems, directives: blockDirectives });
+ const lineDirectivesResult = applyDirectives({ problems: blockDirectivesResult.problems, directives: lineDirectives });
+
+ return options.reportUnusedDisableDirectives
+ ? lineDirectivesResult.problems
+ .concat(blockDirectivesResult.unusedDisableDirectives)
+ .concat(lineDirectivesResult.unusedDisableDirectives)
+ .sort(compareLocations)
+ : lineDirectivesResult.problems;
+};
diff --git a/tools/node_modules/eslint/lib/util/fix-tracker.js b/tools/node_modules/eslint/lib/util/fix-tracker.js
new file mode 100644
index 0000000000..067070df00
--- /dev/null
+++ b/tools/node_modules/eslint/lib/util/fix-tracker.js
@@ -0,0 +1,120 @@
+/**
+ * @fileoverview Helper class to aid in constructing fix commands.
+ * @author Alan Pierce
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+/**
+ * A helper class to combine fix options into a fix command. Currently, it
+ * exposes some "retain" methods that extend the range of the text being
+ * replaced so that other fixes won't touch that region in the same pass.
+ */
+class FixTracker {
+
+ /**
+ * Create a new FixTracker.
+ *
+ * @param {ruleFixer} fixer A ruleFixer instance.
+ * @param {SourceCode} sourceCode A SourceCode object for the current code.
+ */
+ constructor(fixer, sourceCode) {
+ this.fixer = fixer;
+ this.sourceCode = sourceCode;
+ this.retainedRange = null;
+ }
+
+ /**
+ * Mark the given range as "retained", meaning that other fixes may not
+ * may not modify this region in the same pass.
+ *
+ * @param {int[]} range The range to retain.
+ * @returns {FixTracker} The same RuleFixer, for chained calls.
+ */
+ retainRange(range) {
+ this.retainedRange = range;
+ return this;
+ }
+
+ /**
+ * Given a node, find the function containing it (or the entire program) and
+ * mark it as retained, meaning that other fixes may not modify it in this
+ * pass. This is useful for avoiding conflicts in fixes that modify control
+ * flow.
+ *
+ * @param {ASTNode} node The node to use as a starting point.
+ * @returns {FixTracker} The same RuleFixer, for chained calls.
+ */
+ retainEnclosingFunction(node) {
+ const functionNode = astUtils.getUpperFunction(node);
+
+ return this.retainRange(functionNode ? functionNode.range : this.sourceCode.ast.range);
+ }
+
+ /**
+ * Given a node or token, find the token before and afterward, and mark that
+ * range as retained, meaning that other fixes may not modify it in this
+ * pass. This is useful for avoiding conflicts in fixes that make a small
+ * change to the code where the AST should not be changed.
+ *
+ * @param {ASTNode|Token} nodeOrToken The node or token to use as a starting
+ * point. The token to the left and right are use in the range.
+ * @returns {FixTracker} The same RuleFixer, for chained calls.
+ */
+ retainSurroundingTokens(nodeOrToken) {
+ const tokenBefore = this.sourceCode.getTokenBefore(nodeOrToken) || nodeOrToken;
+ const tokenAfter = this.sourceCode.getTokenAfter(nodeOrToken) || nodeOrToken;
+
+ return this.retainRange([tokenBefore.range[0], tokenAfter.range[1]]);
+ }
+
+ /**
+ * Create a fix command that replaces the given range with the given text,
+ * accounting for any retained ranges.
+ *
+ * @param {int[]} range The range to remove in the fix.
+ * @param {string} text The text to insert in place of the range.
+ * @returns {Object} The fix command.
+ */
+ replaceTextRange(range, text) {
+ let actualRange;
+
+ if (this.retainedRange) {
+ actualRange = [
+ Math.min(this.retainedRange[0], range[0]),
+ Math.max(this.retainedRange[1], range[1])
+ ];
+ } else {
+ actualRange = range;
+ }
+
+ return this.fixer.replaceTextRange(
+ actualRange,
+ this.sourceCode.text.slice(actualRange[0], range[0]) +
+ text +
+ this.sourceCode.text.slice(range[1], actualRange[1])
+ );
+ }
+
+ /**
+ * Create a fix command that removes the given node or token, accounting for
+ * any retained ranges.
+ *
+ * @param {ASTNode|Token} nodeOrToken The node or token to remove.
+ * @returns {Object} The fix command.
+ */
+ remove(nodeOrToken) {
+ return this.replaceTextRange(nodeOrToken.range, "");
+ }
+}
+
+module.exports = FixTracker;
diff --git a/tools/node_modules/eslint/lib/util/glob-util.js b/tools/node_modules/eslint/lib/util/glob-util.js
new file mode 100644
index 0000000000..6a1f150a59
--- /dev/null
+++ b/tools/node_modules/eslint/lib/util/glob-util.js
@@ -0,0 +1,182 @@
+/**
+ * @fileoverview Utilities for working with globs and the filesystem.
+ * @author Ian VanSchooten
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const fs = require("fs"),
+ path = require("path"),
+ GlobSync = require("./glob"),
+
+ pathUtil = require("./path-util"),
+ IgnoredPaths = require("../ignored-paths");
+
+const debug = require("debug")("eslint:glob-util");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Checks if a provided path is a directory and returns a glob string matching
+ * all files under that directory if so, the path itself otherwise.
+ *
+ * Reason for this is that `glob` needs `/**` to collect all the files under a
+ * directory where as our previous implementation without `glob` simply walked
+ * a directory that is passed. So this is to maintain backwards compatibility.
+ *
+ * Also makes sure all path separators are POSIX style for `glob` compatibility.
+ *
+ * @param {Object} [options] An options object
+ * @param {string[]} [options.extensions=[".js"]] An array of accepted extensions
+ * @param {string} [options.cwd=process.cwd()] The cwd to use to resolve relative pathnames
+ * @returns {Function} A function that takes a pathname and returns a glob that
+ * matches all files with the provided extensions if
+ * pathname is a directory.
+ */
+function processPath(options) {
+ const cwd = (options && options.cwd) || process.cwd();
+ let extensions = (options && options.extensions) || [".js"];
+
+ extensions = extensions.map(ext => ext.replace(/^\./, ""));
+
+ let suffix = "/**";
+
+ if (extensions.length === 1) {
+ suffix += `/*.${extensions[0]}`;
+ } else {
+ suffix += `/*.{${extensions.join(",")}}`;
+ }
+
+ /**
+ * A function that converts a directory name to a glob pattern
+ *
+ * @param {string} pathname The directory path to be modified
+ * @returns {string} The glob path or the file path itself
+ * @private
+ */
+ return function(pathname) {
+ let newPath = pathname;
+ const resolvedPath = path.resolve(cwd, pathname);
+
+ if (fs.existsSync(resolvedPath) && fs.statSync(resolvedPath).isDirectory()) {
+ newPath = pathname.replace(/[/\\]$/, "") + suffix;
+ }
+
+ return pathUtil.convertPathToPosix(newPath);
+ };
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+/**
+ * Resolves any directory patterns into glob-based patterns for easier handling.
+ * @param {string[]} patterns File patterns (such as passed on the command line).
+ * @param {Object} options An options object.
+ * @returns {string[]} The equivalent glob patterns and filepath strings.
+ */
+function resolveFileGlobPatterns(patterns, options) {
+
+ const processPathExtensions = processPath(options);
+
+ return patterns.filter(p => p.length).map(processPathExtensions);
+}
+
+/**
+ * Build a list of absolute filesnames on which ESLint will act.
+ * Ignored files are excluded from the results, as are duplicates.
+ *
+ * @param {string[]} globPatterns Glob patterns.
+ * @param {Object} [options] An options object.
+ * @param {string} [options.cwd] CWD (considered for relative filenames)
+ * @param {boolean} [options.ignore] False disables use of .eslintignore.
+ * @param {string} [options.ignorePath] The ignore file to use instead of .eslintignore.
+ * @param {string} [options.ignorePattern] A pattern of files to ignore.
+ * @returns {string[]} Resolved absolute filenames.
+ */
+function listFilesToProcess(globPatterns, options) {
+ options = options || { ignore: true };
+ const files = [],
+ added = {};
+
+ const cwd = (options && options.cwd) || process.cwd();
+
+ /**
+ * Executes the linter on a file defined by the `filename`. Skips
+ * unsupported file extensions and any files that are already linted.
+ * @param {string} filename The file to be processed
+ * @param {boolean} shouldWarnIgnored Whether or not a report should be made if
+ * the file is ignored
+ * @param {IgnoredPaths} ignoredPaths An instance of IgnoredPaths
+ * @returns {void}
+ */
+ function addFile(filename, shouldWarnIgnored, ignoredPaths) {
+ let ignored = false;
+ let isSilentlyIgnored;
+
+ if (ignoredPaths.contains(filename, "default")) {
+ ignored = (options.ignore !== false) && shouldWarnIgnored;
+ isSilentlyIgnored = !shouldWarnIgnored;
+ }
+
+ if (options.ignore !== false) {
+ if (ignoredPaths.contains(filename, "custom")) {
+ if (shouldWarnIgnored) {
+ ignored = true;
+ } else {
+ isSilentlyIgnored = true;
+ }
+ }
+ }
+
+ if (isSilentlyIgnored && !ignored) {
+ return;
+ }
+
+ if (added[filename]) {
+ return;
+ }
+ files.push({ filename, ignored });
+ added[filename] = true;
+ }
+
+ debug("Creating list of files to process.");
+ globPatterns.forEach(pattern => {
+ const file = path.resolve(cwd, pattern);
+
+ if (fs.existsSync(file) && fs.statSync(file).isFile()) {
+ const ignoredPaths = new IgnoredPaths(options);
+
+ addFile(fs.realpathSync(file), true, ignoredPaths);
+ } else {
+
+ // regex to find .hidden or /.hidden patterns, but not ./relative or ../relative
+ const globIncludesDotfiles = /(?:(?:^\.)|(?:[/\\]\.))[^/\\.].*/.test(pattern);
+
+ const ignoredPaths = new IgnoredPaths(Object.assign({}, options, { dotfiles: options.dotfiles || globIncludesDotfiles }));
+ const shouldIgnore = ignoredPaths.getIgnoredFoldersGlobChecker();
+ const globOptions = {
+ nodir: true,
+ dot: true,
+ cwd
+ };
+
+ new GlobSync(pattern, globOptions, shouldIgnore).found.forEach(globMatch => {
+ addFile(path.resolve(cwd, globMatch), false, ignoredPaths);
+ });
+ }
+ });
+
+ return files;
+}
+
+module.exports = {
+ resolveFileGlobPatterns,
+ listFilesToProcess
+};
diff --git a/tools/node_modules/eslint/lib/util/glob.js b/tools/node_modules/eslint/lib/util/glob.js
new file mode 100644
index 0000000000..f352dae7a4
--- /dev/null
+++ b/tools/node_modules/eslint/lib/util/glob.js
@@ -0,0 +1,63 @@
+/**
+ * @fileoverview An inherited `glob.GlobSync` to support .gitignore patterns.
+ * @author Kael Zhang
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const Sync = require("glob").GlobSync,
+ util = require("util");
+
+//------------------------------------------------------------------------------
+// Private
+//------------------------------------------------------------------------------
+
+const IGNORE = Symbol("ignore");
+
+/**
+ * Subclass of `glob.GlobSync`
+ * @param {string} pattern Pattern to be matched.
+ * @param {Object} options `options` for `glob`
+ * @param {function()} shouldIgnore Method to check whether a directory should be ignored.
+ * @constructor
+ */
+function GlobSync(pattern, options, shouldIgnore) {
+
+ /**
+ * We don't put this thing to argument `options` to avoid
+ * further problems, such as `options` validation.
+ *
+ * Use `Symbol` as much as possible to avoid confliction.
+ */
+ this[IGNORE] = shouldIgnore;
+
+ Sync.call(this, pattern, options);
+}
+
+util.inherits(GlobSync, Sync);
+
+/* eslint no-underscore-dangle: ["error", { "allow": ["_readdir", "_mark"] }] */
+
+GlobSync.prototype._readdir = function(abs, inGlobStar) {
+
+ /**
+ * `options.nodir` makes `options.mark` as `true`.
+ * Mark `abs` first
+ * to make sure `"node_modules"` will be ignored immediately with ignore pattern `"node_modules/"`.
+ *
+ * There is a built-in cache about marked `File.Stat` in `glob`, so that we could not worry about the extra invocation of `this._mark()`
+ */
+ const marked = this._mark(abs);
+
+ if (this[IGNORE](marked)) {
+ return null;
+ }
+
+ return Sync.prototype._readdir.call(this, abs, inGlobStar);
+};
+
+
+module.exports = GlobSync;
diff --git a/tools/node_modules/eslint/lib/util/hash.js b/tools/node_modules/eslint/lib/util/hash.js
new file mode 100644
index 0000000000..6d7ef8bf1b
--- /dev/null
+++ b/tools/node_modules/eslint/lib/util/hash.js
@@ -0,0 +1,35 @@
+/**
+ * @fileoverview Defining the hashing function in one place.
+ * @author Michael Ficarra
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const murmur = require("imurmurhash");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+// Private
+//------------------------------------------------------------------------------
+
+/**
+ * hash the given string
+ * @param {string} str the string to hash
+ * @returns {string} the hash
+ */
+function hash(str) {
+ return murmur(str).result().toString(36);
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+module.exports = hash;
diff --git a/tools/node_modules/eslint/lib/util/keywords.js b/tools/node_modules/eslint/lib/util/keywords.js
new file mode 100644
index 0000000000..3fbb77771d
--- /dev/null
+++ b/tools/node_modules/eslint/lib/util/keywords.js
@@ -0,0 +1,67 @@
+/**
+ * @fileoverview A shared list of ES3 keywords.
+ * @author Josh Perez
+ */
+"use strict";
+
+module.exports = [
+ "abstract",
+ "boolean",
+ "break",
+ "byte",
+ "case",
+ "catch",
+ "char",
+ "class",
+ "const",
+ "continue",
+ "debugger",
+ "default",
+ "delete",
+ "do",
+ "double",
+ "else",
+ "enum",
+ "export",
+ "extends",
+ "false",
+ "final",
+ "finally",
+ "float",
+ "for",
+ "function",
+ "goto",
+ "if",
+ "implements",
+ "import",
+ "in",
+ "instanceof",
+ "int",
+ "interface",
+ "long",
+ "native",
+ "new",
+ "null",
+ "package",
+ "private",
+ "protected",
+ "public",
+ "return",
+ "short",
+ "static",
+ "super",
+ "switch",
+ "synchronized",
+ "this",
+ "throw",
+ "throws",
+ "transient",
+ "true",
+ "try",
+ "typeof",
+ "var",
+ "void",
+ "volatile",
+ "while",
+ "with"
+];
diff --git a/tools/node_modules/eslint/lib/util/module-resolver.js b/tools/node_modules/eslint/lib/util/module-resolver.js
new file mode 100644
index 0000000000..470a54f7c4
--- /dev/null
+++ b/tools/node_modules/eslint/lib/util/module-resolver.js
@@ -0,0 +1,85 @@
+/**
+ * @fileoverview Implements the Node.js require.resolve algorithm
+ * @author Nicholas C. Zakas
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const Module = require("module");
+
+//------------------------------------------------------------------------------
+// Private
+//------------------------------------------------------------------------------
+
+const DEFAULT_OPTIONS = {
+
+ /*
+ * module.paths is an array of paths to search for resolving things relative
+ * to this file. Module.globalPaths contains all of the special Node.js
+ * directories that can also be searched for modules.
+ *
+ * Need to check for existence of module.paths because Jest seems not to
+ * include it. See https://github.com/eslint/eslint/issues/5791.
+ */
+ lookupPaths: module.paths ? module.paths.concat(Module.globalPaths) : Module.globalPaths.concat()
+};
+
+/**
+ * Resolves modules based on a set of options.
+ */
+class ModuleResolver {
+
+ /**
+ * Resolves modules based on a set of options.
+ * @param {Object} options The options for resolving modules.
+ * @param {string[]} options.lookupPaths An array of paths to include in the
+ * lookup with the highest priority paths coming first.
+ */
+ constructor(options) {
+ this.options = Object.assign({}, DEFAULT_OPTIONS, options || {});
+ }
+
+ /**
+ * Resolves the file location of a given module relative to the configured
+ * lookup paths.
+ * @param {string} name The module name to resolve.
+ * @param {string} extraLookupPath An extra path to look into for the module.
+ * This path is used with the highest priority.
+ * @returns {string} The resolved file path for the module.
+ * @throws {Error} If the module cannot be resolved.
+ */
+ resolve(name, extraLookupPath) {
+
+ /*
+ * First, clone the lookup paths so we're not messing things up for
+ * subsequent calls to this function. Then, move the extraLookupPath to the
+ * top of the lookup paths list so it will be searched first.
+ */
+ const lookupPaths = this.options.lookupPaths.concat();
+
+ lookupPaths.unshift(extraLookupPath);
+
+ /**
+ * Module._findPath is an internal method to Node.js, then one they use to
+ * lookup file paths when require() is called. So, we are hooking into the
+ * exact same logic that Node.js uses.
+ */
+ const result = Module._findPath(name, lookupPaths); // eslint-disable-line no-underscore-dangle
+
+ if (!result) {
+ throw new Error(`Cannot find module '${name}'`);
+ }
+
+ return result;
+ }
+}
+
+//------------------------------------------------------------------------------
+// Public API
+//------------------------------------------------------------------------------
+
+module.exports = ModuleResolver;
diff --git a/tools/node_modules/eslint/lib/util/naming.js b/tools/node_modules/eslint/lib/util/naming.js
new file mode 100644
index 0000000000..dcac81bbd6
--- /dev/null
+++ b/tools/node_modules/eslint/lib/util/naming.js
@@ -0,0 +1,112 @@
+/**
+ * @fileoverview Common helpers for naming of plugins, formatters and configs
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const pathUtil = require("../util/path-util");
+
+//------------------------------------------------------------------------------
+// Private
+//------------------------------------------------------------------------------
+
+const NAMESPACE_REGEX = /^@.*\//i;
+
+/**
+ * Brings package name to correct format based on prefix
+ * @param {string} name The name of the package.
+ * @param {string} prefix Can be either "eslint-plugin", "eslint-config" or "eslint-formatter"
+ * @returns {string} Normalized name of the package
+ * @private
+ */
+function normalizePackageName(name, prefix) {
+
+ /**
+ * On Windows, name can come in with Windows slashes instead of Unix slashes.
+ * Normalize to Unix first to avoid errors later on.
+ * https://github.com/eslint/eslint/issues/5644
+ */
+ if (name.indexOf("\\") > -1) {
+ name = pathUtil.convertPathToPosix(name);
+ }
+
+ if (name.charAt(0) === "@") {
+
+ /**
+ * it's a scoped package
+ * package name is the prefix, or just a username
+ */
+ const scopedPackageShortcutRegex = new RegExp(`^(@[^/]+)(?:/(?:${prefix})?)?$`),
+ scopedPackageNameRegex = new RegExp(`^${prefix}(-|$)`);
+
+ if (scopedPackageShortcutRegex.test(name)) {
+ name = name.replace(scopedPackageShortcutRegex, `$1/${prefix}`);
+ } else if (!scopedPackageNameRegex.test(name.split("/")[1])) {
+
+ /**
+ * for scoped packages, insert the prefix after the first / unless
+ * the path is already @scope/eslint or @scope/eslint-xxx-yyy
+ */
+ name = name.replace(/^@([^/]+)\/(.*)$/, `@$1/${prefix}-$2`);
+ }
+ } else if (name.indexOf(`${prefix}-`) !== 0) {
+ name = `${prefix}-${name}`;
+ }
+
+ return name;
+}
+
+/**
+ * Removes the prefix from a term.
+ * @param {string} prefix The prefix to remove.
+ * @param {string} term The term which may have the prefix.
+ * @returns {string} The term without prefix.
+ */
+function removePrefixFromTerm(prefix, term) {
+ return term.startsWith(prefix) ? term.slice(prefix.length) : term;
+}
+
+/**
+ * Adds a prefix to a term.
+ * @param {string} prefix The prefix to add.
+ * @param {string} term The term which may not have the prefix.
+ * @returns {string} The term with prefix.
+ */
+function addPrefixToTerm(prefix, term) {
+ return term.startsWith(prefix) ? term : `${prefix}${term}`;
+}
+
+/**
+ * Gets the scope (namespace) of a term.
+ * @param {string} term The term which may have the namespace.
+ * @returns {string} The namepace of the term if it has one.
+ */
+function getNamespaceFromTerm(term) {
+ const match = term.match(NAMESPACE_REGEX);
+
+ return match ? match[0] : "";
+}
+
+/**
+ * Removes the namespace from a term.
+ * @param {string} term The term which may have the namespace.
+ * @returns {string} The name of the plugin without the namespace.
+ */
+function removeNamespaceFromTerm(term) {
+ return term.replace(NAMESPACE_REGEX, "");
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+module.exports = {
+ normalizePackageName,
+ removePrefixFromTerm,
+ addPrefixToTerm,
+ getNamespaceFromTerm,
+ removeNamespaceFromTerm
+};
diff --git a/tools/node_modules/eslint/lib/util/node-event-generator.js b/tools/node_modules/eslint/lib/util/node-event-generator.js
new file mode 100644
index 0000000000..9d477bbb4e
--- /dev/null
+++ b/tools/node_modules/eslint/lib/util/node-event-generator.js
@@ -0,0 +1,308 @@
+/**
+ * @fileoverview The event generator for AST nodes.
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const esquery = require("esquery");
+const lodash = require("lodash");
+
+//------------------------------------------------------------------------------
+// Typedefs
+//------------------------------------------------------------------------------
+
+/**
+ * An object describing an AST selector
+ * @typedef {Object} ASTSelector
+ * @property {string} rawSelector The string that was parsed into this selector
+ * @property {boolean} isExit `true` if this should be emitted when exiting the node rather than when entering
+ * @property {Object} parsedSelector An object (from esquery) describing the matching behavior of the selector
+ * @property {string[]|null} listenerTypes A list of node types that could possibly cause the selector to match,
+ * or `null` if all node types could cause a match
+ * @property {number} attributeCount The total number of classes, pseudo-classes, and attribute queries in this selector
+ * @property {number} identifierCount The total number of identifier queries in this selector
+ */
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Gets the possible types of a selector
+ * @param {Object} parsedSelector An object (from esquery) describing the matching behavior of the selector
+ * @returns {string[]|null} The node types that could possibly trigger this selector, or `null` if all node types could trigger it
+ */
+function getPossibleTypes(parsedSelector) {
+ switch (parsedSelector.type) {
+ case "identifier":
+ return [parsedSelector.value];
+
+ case "matches": {
+ const typesForComponents = parsedSelector.selectors.map(getPossibleTypes);
+
+ if (typesForComponents.every(typesForComponent => typesForComponent)) {
+ return lodash.union.apply(null, typesForComponents);
+ }
+ return null;
+ }
+
+ case "compound": {
+ const typesForComponents = parsedSelector.selectors.map(getPossibleTypes).filter(typesForComponent => typesForComponent);
+
+ // If all of the components could match any type, then the compound could also match any type.
+ if (!typesForComponents.length) {
+ return null;
+ }
+
+ /*
+ * If at least one of the components could only match a particular type, the compound could only match
+ * the intersection of those types.
+ */
+ return lodash.intersection.apply(null, typesForComponents);
+ }
+
+ case "child":
+ case "descendant":
+ case "sibling":
+ case "adjacent":
+ return getPossibleTypes(parsedSelector.right);
+
+ default:
+ return null;
+
+ }
+}
+
+/**
+ * Counts the number of class, pseudo-class, and attribute queries in this selector
+ * @param {Object} parsedSelector An object (from esquery) describing the selector's matching behavior
+ * @returns {number} The number of class, pseudo-class, and attribute queries in this selector
+ */
+function countClassAttributes(parsedSelector) {
+ switch (parsedSelector.type) {
+ case "child":
+ case "descendant":
+ case "sibling":
+ case "adjacent":
+ return countClassAttributes(parsedSelector.left) + countClassAttributes(parsedSelector.right);
+
+ case "compound":
+ case "not":
+ case "matches":
+ return parsedSelector.selectors.reduce((sum, childSelector) => sum + countClassAttributes(childSelector), 0);
+
+ case "attribute":
+ case "field":
+ case "nth-child":
+ case "nth-last-child":
+ return 1;
+
+ default:
+ return 0;
+ }
+}
+
+/**
+ * Counts the number of identifier queries in this selector
+ * @param {Object} parsedSelector An object (from esquery) describing the selector's matching behavior
+ * @returns {number} The number of identifier queries
+ */
+function countIdentifiers(parsedSelector) {
+ switch (parsedSelector.type) {
+ case "child":
+ case "descendant":
+ case "sibling":
+ case "adjacent":
+ return countIdentifiers(parsedSelector.left) + countIdentifiers(parsedSelector.right);
+
+ case "compound":
+ case "not":
+ case "matches":
+ return parsedSelector.selectors.reduce((sum, childSelector) => sum + countIdentifiers(childSelector), 0);
+
+ case "identifier":
+ return 1;
+
+ default:
+ return 0;
+ }
+}
+
+/**
+ * Compares the specificity of two selector objects, with CSS-like rules.
+ * @param {ASTSelector} selectorA An AST selector descriptor
+ * @param {ASTSelector} selectorB Another AST selector descriptor
+ * @returns {number}
+ * a value less than 0 if selectorA is less specific than selectorB
+ * a value greater than 0 if selectorA is more specific than selectorB
+ * a value less than 0 if selectorA and selectorB have the same specificity, and selectorA <= selectorB alphabetically
+ * a value greater than 0 if selectorA and selectorB have the same specificity, and selectorA > selectorB alphabetically
+ */
+function compareSpecificity(selectorA, selectorB) {
+ return selectorA.attributeCount - selectorB.attributeCount ||
+ selectorA.identifierCount - selectorB.identifierCount ||
+ (selectorA.rawSelector <= selectorB.rawSelector ? -1 : 1);
+}
+
+/**
+ * Parses a raw selector string, and throws a useful error if parsing fails.
+ * @param {string} rawSelector A raw AST selector
+ * @returns {Object} An object (from esquery) describing the matching behavior of this selector
+ * @throws {Error} An error if the selector is invalid
+ */
+function tryParseSelector(rawSelector) {
+ try {
+ return esquery.parse(rawSelector.replace(/:exit$/, ""));
+ } catch (err) {
+ if (typeof err.offset === "number") {
+ throw new SyntaxError(`Syntax error in selector "${rawSelector}" at position ${err.offset}: ${err.message}`);
+ }
+ throw err;
+ }
+}
+
+/**
+ * Parses a raw selector string, and returns the parsed selector along with specificity and type information.
+ * @param {string} rawSelector A raw AST selector
+ * @returns {ASTSelector} A selector descriptor
+ */
+const parseSelector = lodash.memoize(rawSelector => {
+ const parsedSelector = tryParseSelector(rawSelector);
+
+ return {
+ rawSelector,
+ isExit: rawSelector.endsWith(":exit"),
+ parsedSelector,
+ listenerTypes: getPossibleTypes(parsedSelector),
+ attributeCount: countClassAttributes(parsedSelector),
+ identifierCount: countIdentifiers(parsedSelector)
+ };
+});
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+/**
+ * The event generator for AST nodes.
+ * This implements below interface.
+ *
+ * ```ts
+ * interface EventGenerator {
+ * emitter: SafeEmitter;
+ * enterNode(node: ASTNode): void;
+ * leaveNode(node: ASTNode): void;
+ * }
+ * ```
+ */
+class NodeEventGenerator {
+
+ /**
+ * @param {SafeEmitter} emitter
+ * An SafeEmitter which is the destination of events. This emitter must already
+ * have registered listeners for all of the events that it needs to listen for.
+ * (See lib/util/safe-emitter.js for more details on `SafeEmitter`.)
+ * @returns {NodeEventGenerator} new instance
+ */
+ constructor(emitter) {
+ this.emitter = emitter;
+ this.currentAncestry = [];
+ this.enterSelectorsByNodeType = new Map();
+ this.exitSelectorsByNodeType = new Map();
+ this.anyTypeEnterSelectors = [];
+ this.anyTypeExitSelectors = [];
+
+ emitter.eventNames().forEach(rawSelector => {
+ const selector = parseSelector(rawSelector);
+
+ if (selector.listenerTypes) {
+ selector.listenerTypes.forEach(nodeType => {
+ const typeMap = selector.isExit ? this.exitSelectorsByNodeType : this.enterSelectorsByNodeType;
+
+ if (!typeMap.has(nodeType)) {
+ typeMap.set(nodeType, []);
+ }
+ typeMap.get(nodeType).push(selector);
+ });
+ } else {
+ (selector.isExit ? this.anyTypeExitSelectors : this.anyTypeEnterSelectors).push(selector);
+ }
+ });
+
+ this.anyTypeEnterSelectors.sort(compareSpecificity);
+ this.anyTypeExitSelectors.sort(compareSpecificity);
+ this.enterSelectorsByNodeType.forEach(selectorList => selectorList.sort(compareSpecificity));
+ this.exitSelectorsByNodeType.forEach(selectorList => selectorList.sort(compareSpecificity));
+ }
+
+ /**
+ * Checks a selector against a node, and emits it if it matches
+ * @param {ASTNode} node The node to check
+ * @param {ASTSelector} selector An AST selector descriptor
+ * @returns {void}
+ */
+ applySelector(node, selector) {
+ if (esquery.matches(node, selector.parsedSelector, this.currentAncestry)) {
+ this.emitter.emit(selector.rawSelector, node);
+ }
+ }
+
+ /**
+ * Applies all appropriate selectors to a node, in specificity order
+ * @param {ASTNode} node The node to check
+ * @param {boolean} isExit `false` if the node is currently being entered, `true` if it's currently being exited
+ * @returns {void}
+ */
+ applySelectors(node, isExit) {
+ const selectorsByNodeType = (isExit ? this.exitSelectorsByNodeType : this.enterSelectorsByNodeType).get(node.type) || [];
+ const anyTypeSelectors = isExit ? this.anyTypeExitSelectors : this.anyTypeEnterSelectors;
+
+ /*
+ * selectorsByNodeType and anyTypeSelectors were already sorted by specificity in the constructor.
+ * Iterate through each of them, applying selectors in the right order.
+ */
+ let selectorsByTypeIndex = 0;
+ let anyTypeSelectorsIndex = 0;
+
+ while (selectorsByTypeIndex < selectorsByNodeType.length || anyTypeSelectorsIndex < anyTypeSelectors.length) {
+ if (
+ selectorsByTypeIndex >= selectorsByNodeType.length ||
+ anyTypeSelectorsIndex < anyTypeSelectors.length &&
+ compareSpecificity(anyTypeSelectors[anyTypeSelectorsIndex], selectorsByNodeType[selectorsByTypeIndex]) < 0
+ ) {
+ this.applySelector(node, anyTypeSelectors[anyTypeSelectorsIndex++]);
+ } else {
+ this.applySelector(node, selectorsByNodeType[selectorsByTypeIndex++]);
+ }
+ }
+ }
+
+ /**
+ * Emits an event of entering AST node.
+ * @param {ASTNode} node - A node which was entered.
+ * @returns {void}
+ */
+ enterNode(node) {
+ if (node.parent) {
+ this.currentAncestry.unshift(node.parent);
+ }
+ this.applySelectors(node, false);
+ }
+
+ /**
+ * Emits an event of leaving AST node.
+ * @param {ASTNode} node - A node which was left.
+ * @returns {void}
+ */
+ leaveNode(node) {
+ this.applySelectors(node, true);
+ this.currentAncestry.shift();
+ }
+}
+
+module.exports = NodeEventGenerator;
diff --git a/tools/node_modules/eslint/lib/util/npm-util.js b/tools/node_modules/eslint/lib/util/npm-util.js
new file mode 100644
index 0000000000..6c431e0395
--- /dev/null
+++ b/tools/node_modules/eslint/lib/util/npm-util.js
@@ -0,0 +1,179 @@
+/**
+ * @fileoverview Utility for executing npm commands.
+ * @author Ian VanSchooten
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const fs = require("fs"),
+ spawn = require("cross-spawn"),
+ path = require("path"),
+ log = require("../logging");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Find the closest package.json file, starting at process.cwd (by default),
+ * and working up to root.
+ *
+ * @param {string} [startDir=process.cwd()] Starting directory
+ * @returns {string} Absolute path to closest package.json file
+ */
+function findPackageJson(startDir) {
+ let dir = path.resolve(startDir || process.cwd());
+
+ do {
+ const pkgFile = path.join(dir, "package.json");
+
+ if (!fs.existsSync(pkgFile) || !fs.statSync(pkgFile).isFile()) {
+ dir = path.join(dir, "..");
+ continue;
+ }
+ return pkgFile;
+ } while (dir !== path.resolve(dir, ".."));
+ return null;
+}
+
+//------------------------------------------------------------------------------
+// Private
+//------------------------------------------------------------------------------
+
+/**
+ * Install node modules synchronously and save to devDependencies in package.json
+ * @param {string|string[]} packages Node module or modules to install
+ * @returns {void}
+ */
+function installSyncSaveDev(packages) {
+ if (!Array.isArray(packages)) {
+ packages = [packages];
+ }
+ const npmProcess = spawn.sync("npm", ["i", "--save-dev"].concat(packages),
+ { stdio: "inherit" });
+ const error = npmProcess.error;
+
+ if (error && error.code === "ENOENT") {
+ const pluralS = packages.length > 1 ? "s" : "";
+
+ log.error(`Could not execute npm. Please install the following package${pluralS} with your package manager of choice: ${packages.join(", ")}`);
+ }
+}
+
+/**
+ * Fetch `peerDependencies` of the given package by `npm show` command.
+ * @param {string} packageName The package name to fetch peerDependencies.
+ * @returns {Object} Gotten peerDependencies. Returns null if npm was not found.
+ */
+function fetchPeerDependencies(packageName) {
+ const npmProcess = spawn.sync(
+ "npm",
+ ["show", "--json", packageName, "peerDependencies"],
+ { encoding: "utf8" }
+ );
+
+ const error = npmProcess.error;
+
+ if (error && error.code === "ENOENT") {
+ return null;
+ }
+ const fetchedText = npmProcess.stdout.trim();
+
+ return JSON.parse(fetchedText || "{}");
+
+
+}
+
+/**
+ * Check whether node modules are include in a project's package.json.
+ *
+ * @param {string[]} packages Array of node module names
+ * @param {Object} opt Options Object
+ * @param {boolean} opt.dependencies Set to true to check for direct dependencies
+ * @param {boolean} opt.devDependencies Set to true to check for development dependencies
+ * @param {boolean} opt.startdir Directory to begin searching from
+ * @returns {Object} An object whose keys are the module names
+ * and values are booleans indicating installation.
+ */
+function check(packages, opt) {
+ let deps = [];
+ const pkgJson = (opt) ? findPackageJson(opt.startDir) : findPackageJson();
+ let fileJson;
+
+ if (!pkgJson) {
+ throw new Error("Could not find a package.json file. Run 'npm init' to create one.");
+ }
+
+ try {
+ fileJson = JSON.parse(fs.readFileSync(pkgJson, "utf8"));
+ } catch (e) {
+ log.info("Could not read package.json file. Please check that the file contains valid JSON.");
+ throw new Error(e);
+ }
+
+ if (opt.devDependencies && typeof fileJson.devDependencies === "object") {
+ deps = deps.concat(Object.keys(fileJson.devDependencies));
+ }
+ if (opt.dependencies && typeof fileJson.dependencies === "object") {
+ deps = deps.concat(Object.keys(fileJson.dependencies));
+ }
+ return packages.reduce((status, pkg) => {
+ status[pkg] = deps.indexOf(pkg) !== -1;
+ return status;
+ }, {});
+}
+
+/**
+ * Check whether node modules are included in the dependencies of a project's
+ * package.json.
+ *
+ * Convienience wrapper around check().
+ *
+ * @param {string[]} packages Array of node modules to check.
+ * @param {string} rootDir The directory contianing a package.json
+ * @returns {Object} An object whose keys are the module names
+ * and values are booleans indicating installation.
+ */
+function checkDeps(packages, rootDir) {
+ return check(packages, { dependencies: true, startDir: rootDir });
+}
+
+/**
+ * Check whether node modules are included in the devDependencies of a project's
+ * package.json.
+ *
+ * Convienience wrapper around check().
+ *
+ * @param {string[]} packages Array of node modules to check.
+ * @returns {Object} An object whose keys are the module names
+ * and values are booleans indicating installation.
+ */
+function checkDevDeps(packages) {
+ return check(packages, { devDependencies: true });
+}
+
+/**
+ * Check whether package.json is found in current path.
+ *
+ * @param {string=} startDir Starting directory
+ * @returns {boolean} Whether a package.json is found in current path.
+ */
+function checkPackageJson(startDir) {
+ return !!findPackageJson(startDir);
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+module.exports = {
+ installSyncSaveDev,
+ fetchPeerDependencies,
+ checkDeps,
+ checkDevDeps,
+ checkPackageJson
+};
diff --git a/tools/node_modules/eslint/lib/util/path-util.js b/tools/node_modules/eslint/lib/util/path-util.js
new file mode 100644
index 0000000000..4100ff91a0
--- /dev/null
+++ b/tools/node_modules/eslint/lib/util/path-util.js
@@ -0,0 +1,74 @@
+/**
+ * @fileoverview Common helpers for operations on filenames and paths
+ * @author Ian VanSchooten
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const path = require("path");
+
+//------------------------------------------------------------------------------
+// Private
+//------------------------------------------------------------------------------
+
+/**
+ * Replace Windows with posix style paths
+ *
+ * @param {string} filepath Path to convert
+ * @returns {string} Converted filepath
+ */
+function convertPathToPosix(filepath) {
+ const normalizedFilepath = path.normalize(filepath);
+ const posixFilepath = normalizedFilepath.replace(/\\/g, "/");
+
+ return posixFilepath;
+}
+
+/**
+ * Converts an absolute filepath to a relative path from a given base path
+ *
+ * For example, if the filepath is `/my/awesome/project/foo.bar`,
+ * and the base directory is `/my/awesome/project/`,
+ * then this function should return `foo.bar`.
+ *
+ * path.relative() does something similar, but it requires a baseDir (`from` argument).
+ * This function makes it optional and just removes a leading slash if the baseDir is not given.
+ *
+ * It does not take into account symlinks (for now).
+ *
+ * @param {string} filepath Path to convert to relative path. If already relative,
+ * it will be assumed to be relative to process.cwd(),
+ * converted to absolute, and then processed.
+ * @param {string} [baseDir] Absolute base directory to resolve the filepath from.
+ * If not provided, all this function will do is remove
+ * a leading slash.
+ * @returns {string} Relative filepath
+ */
+function getRelativePath(filepath, baseDir) {
+ let relativePath;
+
+ if (!path.isAbsolute(filepath)) {
+ filepath = path.resolve(filepath);
+ }
+ if (baseDir) {
+ if (!path.isAbsolute(baseDir)) {
+ throw new Error("baseDir should be an absolute path");
+ }
+ relativePath = path.relative(baseDir, filepath);
+ } else {
+ relativePath = filepath.replace(/^\//, "");
+ }
+ return relativePath;
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+module.exports = {
+ convertPathToPosix,
+ getRelativePath
+};
diff --git a/tools/node_modules/eslint/lib/util/patterns/letters.js b/tools/node_modules/eslint/lib/util/patterns/letters.js
new file mode 100644
index 0000000000..eb255d8f00
--- /dev/null
+++ b/tools/node_modules/eslint/lib/util/patterns/letters.js
@@ -0,0 +1,36 @@
+/**
+ * @fileoverview Pattern for detecting any letter (even letters outside of ASCII).
+ * NOTE: This file was generated using this script in JSCS based on the Unicode 7.0.0 standard: https://github.com/jscs-dev/node-jscs/blob/f5ed14427deb7e7aac84f3056a5aab2d9f3e563e/publish/helpers/generate-patterns.js
+ * Do not edit this file by hand-- please use https://github.com/mathiasbynens/regenerate to regenerate the regular expression exported from this file.
+ * @author Kevin Partington
+ * @license MIT License (from JSCS). See below.
+ */
+
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright 2013-2016 Dulin Marat and other contributors
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+"use strict";
+
+module.exports = /[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]/;
diff --git a/tools/node_modules/eslint/lib/util/rule-fixer.js b/tools/node_modules/eslint/lib/util/rule-fixer.js
new file mode 100644
index 0000000000..bdd80d13b1
--- /dev/null
+++ b/tools/node_modules/eslint/lib/util/rule-fixer.js
@@ -0,0 +1,140 @@
+/**
+ * @fileoverview An object that creates fix commands for rules.
+ * @author Nicholas C. Zakas
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+// none!
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Creates a fix command that inserts text at the specified index in the source text.
+ * @param {int} index The 0-based index at which to insert the new text.
+ * @param {string} text The text to insert.
+ * @returns {Object} The fix command.
+ * @private
+ */
+function insertTextAt(index, text) {
+ return {
+ range: [index, index],
+ text
+ };
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+/**
+ * Creates code fixing commands for rules.
+ */
+
+const ruleFixer = Object.freeze({
+
+ /**
+ * Creates a fix command that inserts text after the given node or token.
+ * The fix is not applied until applyFixes() is called.
+ * @param {ASTNode|Token} nodeOrToken The node or token to insert after.
+ * @param {string} text The text to insert.
+ * @returns {Object} The fix command.
+ */
+ insertTextAfter(nodeOrToken, text) {
+ return this.insertTextAfterRange(nodeOrToken.range, text);
+ },
+
+ /**
+ * Creates a fix command that inserts text after the specified range in the source text.
+ * The fix is not applied until applyFixes() is called.
+ * @param {int[]} range The range to replace, first item is start of range, second
+ * is end of range.
+ * @param {string} text The text to insert.
+ * @returns {Object} The fix command.
+ */
+ insertTextAfterRange(range, text) {
+ return insertTextAt(range[1], text);
+ },
+
+ /**
+ * Creates a fix command that inserts text before the given node or token.
+ * The fix is not applied until applyFixes() is called.
+ * @param {ASTNode|Token} nodeOrToken The node or token to insert before.
+ * @param {string} text The text to insert.
+ * @returns {Object} The fix command.
+ */
+ insertTextBefore(nodeOrToken, text) {
+ return this.insertTextBeforeRange(nodeOrToken.range, text);
+ },
+
+ /**
+ * Creates a fix command that inserts text before the specified range in the source text.
+ * The fix is not applied until applyFixes() is called.
+ * @param {int[]} range The range to replace, first item is start of range, second
+ * is end of range.
+ * @param {string} text The text to insert.
+ * @returns {Object} The fix command.
+ */
+ insertTextBeforeRange(range, text) {
+ return insertTextAt(range[0], text);
+ },
+
+ /**
+ * Creates a fix command that replaces text at the node or token.
+ * The fix is not applied until applyFixes() is called.
+ * @param {ASTNode|Token} nodeOrToken The node or token to remove.
+ * @param {string} text The text to insert.
+ * @returns {Object} The fix command.
+ */
+ replaceText(nodeOrToken, text) {
+ return this.replaceTextRange(nodeOrToken.range, text);
+ },
+
+ /**
+ * Creates a fix command that replaces text at the specified range in the source text.
+ * The fix is not applied until applyFixes() is called.
+ * @param {int[]} range The range to replace, first item is start of range, second
+ * is end of range.
+ * @param {string} text The text to insert.
+ * @returns {Object} The fix command.
+ */
+ replaceTextRange(range, text) {
+ return {
+ range,
+ text
+ };
+ },
+
+ /**
+ * Creates a fix command that removes the node or token from the source.
+ * The fix is not applied until applyFixes() is called.
+ * @param {ASTNode|Token} nodeOrToken The node or token to remove.
+ * @returns {Object} The fix command.
+ */
+ remove(nodeOrToken) {
+ return this.removeRange(nodeOrToken.range);
+ },
+
+ /**
+ * Creates a fix command that removes the specified range of text from the source.
+ * The fix is not applied until applyFixes() is called.
+ * @param {int[]} range The range to remove, first item is start of range, second
+ * is end of range.
+ * @returns {Object} The fix command.
+ */
+ removeRange(range) {
+ return {
+ range,
+ text: ""
+ };
+ }
+
+});
+
+
+module.exports = ruleFixer;
diff --git a/tools/node_modules/eslint/lib/util/safe-emitter.js b/tools/node_modules/eslint/lib/util/safe-emitter.js
new file mode 100644
index 0000000000..2fa373cb96
--- /dev/null
+++ b/tools/node_modules/eslint/lib/util/safe-emitter.js
@@ -0,0 +1,54 @@
+/**
+ * @fileoverview A variant of EventEmitter which does not give listeners information about each other
+ * @author Teddy Katz
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Typedefs
+//------------------------------------------------------------------------------
+
+/**
+ * An event emitter
+ * @typedef {Object} SafeEmitter
+ * @property {function(eventName: string, listenerFunc: Function): void} on Adds a listener for a given event name
+ * @property {function(eventName: string, arg1?: any, arg2?: any, arg3?: any)} emit Emits an event with a given name.
+ * This calls all the listeners that were listening for that name, with `arg1`, `arg2`, and `arg3` as arguments.
+ * @property {function(): string[]} eventNames Gets the list of event names that have registered listeners.
+ */
+
+/**
+ * Creates an object which can listen for and emit events.
+ * This is similar to the EventEmitter API in Node's standard library, but it has a few differences.
+ * The goal is to allow multiple modules to attach arbitrary listeners to the same emitter, without
+ * letting the modules know about each other at all.
+ * 1. It has no special keys like `error` and `newListener`, which would allow modules to detect when
+ * another module throws an error or registers a listener.
+ * 2. It calls listener functions without any `this` value. (`EventEmitter` calls listeners with a
+ * `this` value of the emitter instance, which would give listeners access to other listeners.)
+ * 3. Events can be emitted with at most 3 arguments. (For example: when using `emitter.emit('foo', a, b, c)`,
+ * the arguments `a`, `b`, and `c` will be passed to the listener functions.)
+ * @returns {SafeEmitter} An emitter
+ */
+module.exports = () => {
+ const listeners = Object.create(null);
+
+ return Object.freeze({
+ on(eventName, listener) {
+ if (eventName in listeners) {
+ listeners[eventName].push(listener);
+ } else {
+ listeners[eventName] = [listener];
+ }
+ },
+ emit(eventName, a, b, c) {
+ if (eventName in listeners) {
+ listeners[eventName].forEach(listener => listener(a, b, c));
+ }
+ },
+ eventNames() {
+ return Object.keys(listeners);
+ }
+ });
+};
diff --git a/tools/node_modules/eslint/lib/util/source-code-fixer.js b/tools/node_modules/eslint/lib/util/source-code-fixer.js
new file mode 100644
index 0000000000..b5bfc7457a
--- /dev/null
+++ b/tools/node_modules/eslint/lib/util/source-code-fixer.js
@@ -0,0 +1,152 @@
+/**
+ * @fileoverview An object that caches and applies source code fixes.
+ * @author Nicholas C. Zakas
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const debug = require("debug")("eslint:text-fixer");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+const BOM = "\uFEFF";
+
+/**
+ * Compares items in a messages array by range.
+ * @param {Message} a The first message.
+ * @param {Message} b The second message.
+ * @returns {int} -1 if a comes before b, 1 if a comes after b, 0 if equal.
+ * @private
+ */
+function compareMessagesByFixRange(a, b) {
+ return a.fix.range[0] - b.fix.range[0] || a.fix.range[1] - b.fix.range[1];
+}
+
+/**
+ * Compares items in a messages array by line and column.
+ * @param {Message} a The first message.
+ * @param {Message} b The second message.
+ * @returns {int} -1 if a comes before b, 1 if a comes after b, 0 if equal.
+ * @private
+ */
+function compareMessagesByLocation(a, b) {
+ return a.line - b.line || a.column - b.column;
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+/**
+ * Utility for apply fixes to source code.
+ * @constructor
+ */
+function SourceCodeFixer() {
+ Object.freeze(this);
+}
+
+/**
+ * Applies the fixes specified by the messages to the given text. Tries to be
+ * smart about the fixes and won't apply fixes over the same area in the text.
+ * @param {string} sourceText The text to apply the changes to.
+ * @param {Message[]} messages The array of messages reported by ESLint.
+ * @param {boolean|Function} [shouldFix=true] Determines whether each message should be fixed
+ * @returns {Object} An object containing the fixed text and any unfixed messages.
+ */
+SourceCodeFixer.applyFixes = function(sourceText, messages, shouldFix) {
+ debug("Applying fixes");
+
+ if (shouldFix === false) {
+ debug("shouldFix parameter was false, not attempting fixes");
+ return {
+ fixed: false,
+ messages,
+ output: sourceText
+ };
+ }
+
+ // clone the array
+ const remainingMessages = [],
+ fixes = [],
+ bom = sourceText.startsWith(BOM) ? BOM : "",
+ text = bom ? sourceText.slice(1) : sourceText;
+ let lastPos = Number.NEGATIVE_INFINITY,
+ output = bom;
+
+ /**
+ * Try to use the 'fix' from a problem.
+ * @param {Message} problem The message object to apply fixes from
+ * @returns {boolean} Whether fix was successfully applied
+ */
+ function attemptFix(problem) {
+ const fix = problem.fix;
+ const start = fix.range[0];
+ const end = fix.range[1];
+
+ // Remain it as a problem if it's overlapped or it's a negative range
+ if (lastPos >= start || start > end) {
+ remainingMessages.push(problem);
+ return false;
+ }
+
+ // Remove BOM.
+ if ((start < 0 && end >= 0) || (start === 0 && fix.text.startsWith(BOM))) {
+ output = "";
+ }
+
+ // Make output to this fix.
+ output += text.slice(Math.max(0, lastPos), Math.max(0, start));
+ output += fix.text;
+ lastPos = end;
+ return true;
+ }
+
+ messages.forEach(problem => {
+ if (problem.hasOwnProperty("fix")) {
+ fixes.push(problem);
+ } else {
+ remainingMessages.push(problem);
+ }
+ });
+
+ if (fixes.length) {
+ debug("Found fixes to apply");
+ let fixesWereApplied = false;
+
+ for (const problem of fixes.sort(compareMessagesByFixRange)) {
+ if (typeof shouldFix !== "function" || shouldFix(problem)) {
+ attemptFix(problem);
+
+ /*
+ * The only time attemptFix will fail is if a previous fix was
+ * applied which conflicts with it. So we can mark this as true.
+ */
+ fixesWereApplied = true;
+ } else {
+ remainingMessages.push(problem);
+ }
+ }
+ output += text.slice(Math.max(0, lastPos));
+
+ return {
+ fixed: fixesWereApplied,
+ messages: remainingMessages.sort(compareMessagesByLocation),
+ output
+ };
+ }
+
+ debug("No fixes to apply");
+ return {
+ fixed: false,
+ messages,
+ output: bom + text
+ };
+
+};
+
+module.exports = SourceCodeFixer;
diff --git a/tools/node_modules/eslint/lib/util/source-code-util.js b/tools/node_modules/eslint/lib/util/source-code-util.js
new file mode 100644
index 0000000000..6ffd243e2e
--- /dev/null
+++ b/tools/node_modules/eslint/lib/util/source-code-util.js
@@ -0,0 +1,109 @@
+/**
+ * @fileoverview Tools for obtaining SourceCode objects.
+ * @author Ian VanSchooten
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const CLIEngine = require("../cli-engine"),
+ globUtil = require("./glob-util"),
+ baseDefaultOptions = require("../../conf/default-cli-options");
+
+const debug = require("debug")("eslint:source-code-util");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Get the SourceCode object for a single file
+ * @param {string} filename The fully resolved filename to get SourceCode from.
+ * @param {Object} options A CLIEngine options object.
+ * @returns {Array} Array of the SourceCode object representing the file
+ * and fatal error message.
+ */
+function getSourceCodeOfFile(filename, options) {
+ debug("getting sourceCode of", filename);
+ const opts = Object.assign({}, options, { rules: {} });
+ const cli = new CLIEngine(opts);
+ const results = cli.executeOnFiles([filename]);
+
+ if (results && results.results[0] && results.results[0].messages[0] && results.results[0].messages[0].fatal) {
+ const msg = results.results[0].messages[0];
+
+ throw new Error(`(${filename}:${msg.line}:${msg.column}) ${msg.message}`);
+ }
+ const sourceCode = cli.linter.getSourceCode();
+
+ return sourceCode;
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+
+/**
+ * This callback is used to measure execution status in a progress bar
+ * @callback progressCallback
+ * @param {number} The total number of times the callback will be called.
+ */
+
+/**
+ * Gets the SourceCode of a single file, or set of files.
+ * @param {string[]|string} patterns A filename, directory name, or glob,
+ * or an array of them
+ * @param {Object} [options] A CLIEngine options object. If not provided,
+ * the default cli options will be used.
+ * @param {progressCallback} [cb] Callback for reporting execution status
+ * @returns {Object} The SourceCode of all processed files.
+ */
+function getSourceCodeOfFiles(patterns, options, cb) {
+ const sourceCodes = {};
+ let opts;
+
+ if (typeof patterns === "string") {
+ patterns = [patterns];
+ }
+
+ const defaultOptions = Object.assign({}, baseDefaultOptions, { cwd: process.cwd() });
+
+ if (typeof options === "undefined") {
+ opts = defaultOptions;
+ } else if (typeof options === "function") {
+ cb = options;
+ opts = defaultOptions;
+ } else if (typeof options === "object") {
+ opts = Object.assign({}, defaultOptions, options);
+ }
+ debug("constructed options:", opts);
+ patterns = globUtil.resolveFileGlobPatterns(patterns, opts);
+
+ const filenames = globUtil.listFilesToProcess(patterns, opts)
+ .filter(fileInfo => !fileInfo.ignored)
+ .reduce((files, fileInfo) => files.concat(fileInfo.filename), []);
+
+ if (filenames.length === 0) {
+ debug(`Did not find any files matching pattern(s): ${patterns}`);
+ }
+ filenames.forEach(filename => {
+ const sourceCode = getSourceCodeOfFile(filename, opts);
+
+ if (sourceCode) {
+ debug("got sourceCode of", filename);
+ sourceCodes[filename] = sourceCode;
+ }
+ if (cb) {
+ cb(filenames.length); // eslint-disable-line callback-return
+ }
+ });
+ return sourceCodes;
+}
+
+module.exports = {
+ getSourceCodeOfFiles
+};
diff --git a/tools/node_modules/eslint/lib/util/source-code.js b/tools/node_modules/eslint/lib/util/source-code.js
new file mode 100644
index 0000000000..0bd710bf67
--- /dev/null
+++ b/tools/node_modules/eslint/lib/util/source-code.js
@@ -0,0 +1,472 @@
+/**
+ * @fileoverview Abstraction of JavaScript source code.
+ * @author Nicholas C. Zakas
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const TokenStore = require("../token-store"),
+ Traverser = require("./traverser"),
+ astUtils = require("../ast-utils"),
+ lodash = require("lodash");
+
+//------------------------------------------------------------------------------
+// Private
+//------------------------------------------------------------------------------
+
+/**
+ * Validates that the given AST has the required information.
+ * @param {ASTNode} ast The Program node of the AST to check.
+ * @throws {Error} If the AST doesn't contain the correct information.
+ * @returns {void}
+ * @private
+ */
+function validate(ast) {
+ if (!ast.tokens) {
+ throw new Error("AST is missing the tokens array.");
+ }
+
+ if (!ast.comments) {
+ throw new Error("AST is missing the comments array.");
+ }
+
+ if (!ast.loc) {
+ throw new Error("AST is missing location information.");
+ }
+
+ if (!ast.range) {
+ throw new Error("AST is missing range information");
+ }
+}
+
+/**
+ * Check to see if its a ES6 export declaration.
+ * @param {ASTNode} astNode An AST node.
+ * @returns {boolean} whether the given node represents an export declaration.
+ * @private
+ */
+function looksLikeExport(astNode) {
+ return astNode.type === "ExportDefaultDeclaration" || astNode.type === "ExportNamedDeclaration" ||
+ astNode.type === "ExportAllDeclaration" || astNode.type === "ExportSpecifier";
+}
+
+/**
+ * Merges two sorted lists into a larger sorted list in O(n) time.
+ * @param {Token[]} tokens The list of tokens.
+ * @param {Token[]} comments The list of comments.
+ * @returns {Token[]} A sorted list of tokens and comments.
+ * @private
+ */
+function sortedMerge(tokens, comments) {
+ const result = [];
+ let tokenIndex = 0;
+ let commentIndex = 0;
+
+ while (tokenIndex < tokens.length || commentIndex < comments.length) {
+ if (commentIndex >= comments.length || tokenIndex < tokens.length && tokens[tokenIndex].range[0] < comments[commentIndex].range[0]) {
+ result.push(tokens[tokenIndex++]);
+ } else {
+ result.push(comments[commentIndex++]);
+ }
+ }
+
+ return result;
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+class SourceCode extends TokenStore {
+
+ /**
+ * Represents parsed source code.
+ * @param {string} text - The source code text.
+ * @param {ASTNode} ast - The Program node of the AST representing the code. This AST should be created from the text that BOM was stripped.
+ * @constructor
+ */
+ constructor(text, ast) {
+ validate(ast);
+
+ super(ast.tokens, ast.comments);
+
+ /**
+ * The flag to indicate that the source code has Unicode BOM.
+ * @type boolean
+ */
+ this.hasBOM = (text.charCodeAt(0) === 0xFEFF);
+
+ /**
+ * The original text source code.
+ * BOM was stripped from this text.
+ * @type string
+ */
+ this.text = (this.hasBOM ? text.slice(1) : text);
+
+ /**
+ * The parsed AST for the source code.
+ * @type ASTNode
+ */
+ this.ast = ast;
+
+ // Check the source text for the presence of a shebang since it is parsed as a standard line comment.
+ const shebangMatched = this.text.match(astUtils.SHEBANG_MATCHER);
+ const hasShebang = shebangMatched && ast.comments.length && ast.comments[0].value === shebangMatched[1];
+
+ if (hasShebang) {
+ ast.comments[0].type = "Shebang";
+ }
+
+ this.tokensAndComments = sortedMerge(ast.tokens, ast.comments);
+
+ /**
+ * The source code split into lines according to ECMA-262 specification.
+ * This is done to avoid each rule needing to do so separately.
+ * @type string[]
+ */
+ this.lines = [];
+ this.lineStartIndices = [0];
+
+ const lineEndingPattern = astUtils.createGlobalLinebreakMatcher();
+ let match;
+
+ /*
+ * Previously, this was implemented using a regex that
+ * matched a sequence of non-linebreak characters followed by a
+ * linebreak, then adding the lengths of the matches. However,
+ * this caused a catastrophic backtracking issue when the end
+ * of a file contained a large number of non-newline characters.
+ * To avoid this, the current implementation just matches newlines
+ * and uses match.index to get the correct line start indices.
+ */
+ while ((match = lineEndingPattern.exec(this.text))) {
+ this.lines.push(this.text.slice(this.lineStartIndices[this.lineStartIndices.length - 1], match.index));
+ this.lineStartIndices.push(match.index + match[0].length);
+ }
+ this.lines.push(this.text.slice(this.lineStartIndices[this.lineStartIndices.length - 1]));
+
+ // Cache for comments found using getComments().
+ this._commentCache = new WeakMap();
+
+ // don't allow modification of this object
+ Object.freeze(this);
+ Object.freeze(this.lines);
+ }
+
+ /**
+ * Split the source code into multiple lines based on the line delimiters.
+ * @param {string} text Source code as a string.
+ * @returns {string[]} Array of source code lines.
+ * @public
+ */
+ static splitLines(text) {
+ return text.split(astUtils.createGlobalLinebreakMatcher());
+ }
+
+ /**
+ * Gets the source code for the given node.
+ * @param {ASTNode=} node The AST node to get the text for.
+ * @param {int=} beforeCount The number of characters before the node to retrieve.
+ * @param {int=} afterCount The number of characters after the node to retrieve.
+ * @returns {string} The text representing the AST node.
+ * @public
+ */
+ getText(node, beforeCount, afterCount) {
+ if (node) {
+ return this.text.slice(Math.max(node.range[0] - (beforeCount || 0), 0),
+ node.range[1] + (afterCount || 0));
+ }
+ return this.text;
+ }
+
+ /**
+ * Gets the entire source text split into an array of lines.
+ * @returns {Array} The source text as an array of lines.
+ * @public
+ */
+ getLines() {
+ return this.lines;
+ }
+
+ /**
+ * Retrieves an array containing all comments in the source code.
+ * @returns {ASTNode[]} An array of comment nodes.
+ * @public
+ */
+ getAllComments() {
+ return this.ast.comments;
+ }
+
+ /**
+ * Gets all comments for the given node.
+ * @param {ASTNode} node The AST node to get the comments for.
+ * @returns {Object} An object containing a leading and trailing array
+ * of comments indexed by their position.
+ * @public
+ */
+ getComments(node) {
+ if (this._commentCache.has(node)) {
+ return this._commentCache.get(node);
+ }
+
+ const comments = {
+ leading: [],
+ trailing: []
+ };
+
+ /*
+ * Return all comments as leading comments of the Program node when
+ * there is no executable code.
+ */
+ if (node.type === "Program") {
+ if (node.body.length === 0) {
+ comments.leading = node.comments;
+ }
+ } else {
+
+ /*
+ * Return comments as trailing comments of nodes that only contain
+ * comments (to mimic the comment attachment behavior present in Espree).
+ */
+ if ((node.type === "BlockStatement" || node.type === "ClassBody") && node.body.length === 0 ||
+ node.type === "ObjectExpression" && node.properties.length === 0 ||
+ node.type === "ArrayExpression" && node.elements.length === 0 ||
+ node.type === "SwitchStatement" && node.cases.length === 0
+ ) {
+ comments.trailing = this.getTokens(node, {
+ includeComments: true,
+ filter: astUtils.isCommentToken
+ });
+ }
+
+ /*
+ * Iterate over tokens before and after node and collect comment tokens.
+ * Do not include comments that exist outside of the parent node
+ * to avoid duplication.
+ */
+ let currentToken = this.getTokenBefore(node, { includeComments: true });
+
+ while (currentToken && astUtils.isCommentToken(currentToken)) {
+ if (node.parent && (currentToken.start < node.parent.start)) {
+ break;
+ }
+ comments.leading.push(currentToken);
+ currentToken = this.getTokenBefore(currentToken, { includeComments: true });
+ }
+
+ comments.leading.reverse();
+
+ currentToken = this.getTokenAfter(node, { includeComments: true });
+
+ while (currentToken && astUtils.isCommentToken(currentToken)) {
+ if (node.parent && (currentToken.end > node.parent.end)) {
+ break;
+ }
+ comments.trailing.push(currentToken);
+ currentToken = this.getTokenAfter(currentToken, { includeComments: true });
+ }
+ }
+
+ this._commentCache.set(node, comments);
+ return comments;
+ }
+
+ /**
+ * Retrieves the JSDoc comment for a given node.
+ * @param {ASTNode} node The AST node to get the comment for.
+ * @returns {Token|null} The Block comment token containing the JSDoc comment
+ * for the given node or null if not found.
+ * @public
+ */
+ getJSDocComment(node) {
+
+ /**
+ * Checks for the presence of a JSDoc comment for the given node and returns it.
+ * @param {ASTNode} astNode The AST node to get the comment for.
+ * @returns {Token|null} The Block comment token containing the JSDoc comment
+ * for the given node or null if not found.
+ * @private
+ */
+ const findJSDocComment = astNode => {
+ const tokenBefore = this.getTokenBefore(astNode, { includeComments: true });
+
+ if (
+ tokenBefore &&
+ astUtils.isCommentToken(tokenBefore) &&
+ tokenBefore.type === "Block" &&
+ tokenBefore.value.charAt(0) === "*" &&
+ astNode.loc.start.line - tokenBefore.loc.end.line <= 1
+ ) {
+ return tokenBefore;
+ }
+
+ return null;
+ };
+ let parent = node.parent;
+
+ switch (node.type) {
+ case "ClassDeclaration":
+ case "FunctionDeclaration":
+ return findJSDocComment(looksLikeExport(parent) ? parent : node);
+
+ case "ClassExpression":
+ return findJSDocComment(parent.parent);
+
+ case "ArrowFunctionExpression":
+ case "FunctionExpression":
+ if (parent.type !== "CallExpression" && parent.type !== "NewExpression") {
+ while (
+ !this.getCommentsBefore(parent).length &&
+ !/Function/.test(parent.type) &&
+ parent.type !== "MethodDefinition" &&
+ parent.type !== "Property"
+ ) {
+ parent = parent.parent;
+
+ if (!parent) {
+ break;
+ }
+ }
+
+ if (parent && parent.type !== "FunctionDeclaration" && parent.type !== "Program") {
+ return findJSDocComment(parent);
+ }
+ }
+
+ return findJSDocComment(node);
+
+ // falls through
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Gets the deepest node containing a range index.
+ * @param {int} index Range index of the desired node.
+ * @returns {ASTNode} The node if found or null if not found.
+ * @public
+ */
+ getNodeByRangeIndex(index) {
+ let result = null,
+ resultParent = null;
+ const traverser = new Traverser();
+
+ traverser.traverse(this.ast, {
+ enter(node, parent) {
+ if (node.range[0] <= index && index < node.range[1]) {
+ result = node;
+ resultParent = parent;
+ } else {
+ this.skip();
+ }
+ },
+ leave(node) {
+ if (node === result) {
+ this.break();
+ }
+ }
+ });
+
+ return result ? Object.assign({ parent: resultParent }, result) : null;
+ }
+
+ /**
+ * Determines if two tokens have at least one whitespace character
+ * between them. This completely disregards comments in making the
+ * determination, so comments count as zero-length substrings.
+ * @param {Token} first The token to check after.
+ * @param {Token} second The token to check before.
+ * @returns {boolean} True if there is only space between tokens, false
+ * if there is anything other than whitespace between tokens.
+ * @public
+ */
+ isSpaceBetweenTokens(first, second) {
+ const text = this.text.slice(first.range[1], second.range[0]);
+
+ return /\s/.test(text.replace(/\/\*.*?\*\//g, ""));
+ }
+
+ /**
+ * Converts a source text index into a (line, column) pair.
+ * @param {number} index The index of a character in a file
+ * @returns {Object} A {line, column} location object with a 0-indexed column
+ * @public
+ */
+ getLocFromIndex(index) {
+ if (typeof index !== "number") {
+ throw new TypeError("Expected `index` to be a number.");
+ }
+
+ if (index < 0 || index > this.text.length) {
+ throw new RangeError(`Index out of range (requested index ${index}, but source text has length ${this.text.length}).`);
+ }
+
+ /*
+ * For an argument of this.text.length, return the location one "spot" past the last character
+ * of the file. If the last character is a linebreak, the location will be column 0 of the next
+ * line; otherwise, the location will be in the next column on the same line.
+ *
+ * See getIndexFromLoc for the motivation for this special case.
+ */
+ if (index === this.text.length) {
+ return { line: this.lines.length, column: this.lines[this.lines.length - 1].length };
+ }
+
+ /*
+ * To figure out which line rangeIndex is on, determine the last index at which rangeIndex could
+ * be inserted into lineIndices to keep the list sorted.
+ */
+ const lineNumber = lodash.sortedLastIndex(this.lineStartIndices, index);
+
+ return { line: lineNumber, column: index - this.lineStartIndices[lineNumber - 1] };
+ }
+
+ /**
+ * Converts a (line, column) pair into a range index.
+ * @param {Object} loc A line/column location
+ * @param {number} loc.line The line number of the location (1-indexed)
+ * @param {number} loc.column The column number of the location (0-indexed)
+ * @returns {number} The range index of the location in the file.
+ * @public
+ */
+ getIndexFromLoc(loc) {
+ if (typeof loc !== "object" || typeof loc.line !== "number" || typeof loc.column !== "number") {
+ throw new TypeError("Expected `loc` to be an object with numeric `line` and `column` properties.");
+ }
+
+ if (loc.line <= 0) {
+ throw new RangeError(`Line number out of range (line ${loc.line} requested). Line numbers should be 1-based.`);
+ }
+
+ if (loc.line > this.lineStartIndices.length) {
+ throw new RangeError(`Line number out of range (line ${loc.line} requested, but only ${this.lineStartIndices.length} lines present).`);
+ }
+
+ const lineStartIndex = this.lineStartIndices[loc.line - 1];
+ const lineEndIndex = loc.line === this.lineStartIndices.length ? this.text.length : this.lineStartIndices[loc.line];
+ const positionIndex = lineStartIndex + loc.column;
+
+ /*
+ * By design, getIndexFromLoc({ line: lineNum, column: 0 }) should return the start index of
+ * the given line, provided that the line number is valid element of this.lines. Since the
+ * last element of this.lines is an empty string for files with trailing newlines, add a
+ * special case where getting the index for the first location after the end of the file
+ * will return the length of the file, rather than throwing an error. This allows rules to
+ * use getIndexFromLoc consistently without worrying about edge cases at the end of a file.
+ */
+ if (
+ loc.line === this.lineStartIndices.length && positionIndex > lineEndIndex ||
+ loc.line < this.lineStartIndices.length && positionIndex >= lineEndIndex
+ ) {
+ throw new RangeError(`Column number out of range (column ${loc.column} requested, but the length of line ${loc.line} is ${lineEndIndex - lineStartIndex}).`);
+ }
+
+ return positionIndex;
+ }
+}
+
+module.exports = SourceCode;
diff --git a/tools/node_modules/eslint/lib/util/traverser.js b/tools/node_modules/eslint/lib/util/traverser.js
new file mode 100644
index 0000000000..fc070186b3
--- /dev/null
+++ b/tools/node_modules/eslint/lib/util/traverser.js
@@ -0,0 +1,45 @@
+/**
+ * @fileoverview Wrapper around estraverse
+ * @author Nicholas C. Zakas
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const estraverse = require("estraverse");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+const KEY_BLACKLIST = new Set([
+ "parent",
+ "leadingComments",
+ "trailingComments"
+]);
+
+/**
+ * Wrapper around an estraverse controller that ensures the correct keys
+ * are visited.
+ * @constructor
+ */
+class Traverser extends estraverse.Controller {
+ traverse(node, visitor) {
+ visitor.fallback = Traverser.getKeys;
+ return super.traverse(node, visitor);
+ }
+
+ /**
+ * Calculates the keys to use for traversal.
+ * @param {ASTNode} node The node to read keys from.
+ * @returns {string[]} An array of keys to visit on the node.
+ * @private
+ */
+ static getKeys(node) {
+ return Object.keys(node).filter(key => !KEY_BLACKLIST.has(key));
+ }
+}
+
+module.exports = Traverser;
diff --git a/tools/node_modules/eslint/lib/util/xml-escape.js b/tools/node_modules/eslint/lib/util/xml-escape.js
new file mode 100644
index 0000000000..9f43c99c46
--- /dev/null
+++ b/tools/node_modules/eslint/lib/util/xml-escape.js
@@ -0,0 +1,34 @@
+/**
+ * @fileoverview XML character escaper
+ * @author George Chung
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+/**
+ * Returns the escaped value for a character
+ * @param {string} s string to examine
+ * @returns {string} severity level
+ * @private
+ */
+module.exports = function(s) {
+ return (`${s}`).replace(/[<>&"'\x00-\x1F\x7F\u0080-\uFFFF]/g, c => { // eslint-disable-line no-control-regex
+ switch (c) {
+ case "<":
+ return "&lt;";
+ case ">":
+ return "&gt;";
+ case "&":
+ return "&amp;";
+ case "\"":
+ return "&quot;";
+ case "'":
+ return "&apos;";
+ default:
+ return `&#${c.charCodeAt(0)};`;
+ }
+ });
+};
diff --git a/tools/node_modules/eslint/messages/extend-config-missing.txt b/tools/node_modules/eslint/messages/extend-config-missing.txt
new file mode 100644
index 0000000000..38e6458197
--- /dev/null
+++ b/tools/node_modules/eslint/messages/extend-config-missing.txt
@@ -0,0 +1,3 @@
+ESLint couldn't find the config "<%- configName %>" to extend from. Please check that the name of the config is correct.
+
+If you still have problems, please stop by https://gitter.im/eslint/eslint to chat with the team.
diff --git a/tools/node_modules/eslint/messages/no-config-found.txt b/tools/node_modules/eslint/messages/no-config-found.txt
new file mode 100644
index 0000000000..2f95c41b8c
--- /dev/null
+++ b/tools/node_modules/eslint/messages/no-config-found.txt
@@ -0,0 +1,7 @@
+ESLint couldn't find a configuration file. To set up a configuration file for this project, please run:
+
+ eslint --init
+
+ESLint looked for configuration files in <%= directory %> and its ancestors. If it found none, it then looked in your home directory.
+
+If you think you already have a configuration file or if you need more help, please stop by the ESLint chat room: https://gitter.im/eslint/eslint
diff --git a/tools/node_modules/eslint/messages/plugin-missing.txt b/tools/node_modules/eslint/messages/plugin-missing.txt
new file mode 100644
index 0000000000..00c7fe78b0
--- /dev/null
+++ b/tools/node_modules/eslint/messages/plugin-missing.txt
@@ -0,0 +1,9 @@
+ESLint couldn't find the plugin "<%- pluginName %>". This can happen for a couple different reasons:
+
+1. If ESLint is installed globally, then make sure <%- pluginName %> is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin.
+
+2. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
+
+ npm i <%- pluginName %>@latest --save-dev
+
+If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.
diff --git a/tools/node_modules/eslint/messages/whitespace-found.txt b/tools/node_modules/eslint/messages/whitespace-found.txt
new file mode 100644
index 0000000000..eea4efcced
--- /dev/null
+++ b/tools/node_modules/eslint/messages/whitespace-found.txt
@@ -0,0 +1,3 @@
+ESLint couldn't find the plugin "<%- pluginName %>". because there is whitespace in the name. Please check your configuration and remove all whitespace from the plugin name.
+
+If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/LICENSE b/tools/node_modules/eslint/node_modules/acorn-jsx/LICENSE
new file mode 100644
index 0000000000..6d1e4f4541
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/LICENSE
@@ -0,0 +1,19 @@
+Copyright (C) 2012-2014 by Ingvar Stepanyan
+
+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/tools/node_modules/eslint/node_modules/acorn-jsx/README.md b/tools/node_modules/eslint/node_modules/acorn-jsx/README.md
new file mode 100644
index 0000000000..cd9674c0b3
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/README.md
@@ -0,0 +1,64 @@
+# Acorn-JSX
+
+[![Build Status](https://travis-ci.org/RReverser/acorn-jsx.svg?branch=master)](https://travis-ci.org/RReverser/acorn-jsx)
+[![NPM version](https://img.shields.io/npm/v/acorn-jsx.svg)](https://www.npmjs.org/package/acorn-jsx)
+
+This is plugin for [Acorn](http://marijnhaverbeke.nl/acorn/) - a tiny, fast JavaScript parser, written completely in JavaScript.
+
+It was created as an experimental alternative, faster [React.js JSX](http://facebook.github.io/react/docs/jsx-in-depth.html) parser.
+
+According to [benchmarks](https://github.com/RReverser/acorn-jsx/blob/master/test/bench.html), Acorn-JSX is 2x faster than official [Esprima-based parser](https://github.com/facebook/esprima) when location tracking is turned on in both (call it "source maps enabled mode"). At the same time, it consumes all the ES6+JSX syntax that can be consumed by Esprima-FB (this is proved by [official tests](https://github.com/RReverser/acorn-jsx/blob/master/test/tests-jsx.js)).
+
+**UPDATE [14-Apr-2015]**: Facebook implementation started [deprecation process](https://github.com/facebook/esprima/issues/111) in favor of Acorn + Acorn-JSX + Babel for parsing and transpiling JSX syntax.
+
+## Transpiler
+
+Please note that this tool only parses source code to JSX AST, which is useful for various language tools and services. If you want to transpile your code to regular ES5-compliant JavaScript with source map, check out the [babel transpiler](https://babeljs.io/) which uses `acorn-jsx` under the hood.
+
+## Usage
+
+You can use module directly in order to get Acorn instance with plugin installed:
+
+```javascript
+var acorn = require('acorn-jsx');
+```
+
+Or you can use `inject.js` for injecting plugin into your own version of Acorn like following:
+
+```javascript
+var acorn = require('acorn-jsx/inject')(require('./custom-acorn'));
+```
+
+Then, use `plugins` option whenever you need to support JSX while parsing:
+
+```javascript
+var ast = acorn.parse(code, {
+ plugins: { jsx: true }
+});
+```
+
+Note that official spec doesn't support mix of XML namespaces and object-style access in tag names (#27) like in `<namespace:Object.Property />`, so it was deprecated in `acorn-jsx@3.0`. If you still want to opt-in to support of such constructions, you can pass the following option:
+
+```javascript
+var ast = acorn.parse(code, {
+ plugins: {
+ jsx: { allowNamespacedObjects: true }
+ }
+});
+```
+
+Also, since most apps use pure React transformer, a new option was introduced that allows to prohibit namespaces completely:
+
+```javascript
+var ast = acorn.parse(code, {
+ plugins: {
+ jsx: { allowNamespaces: false }
+ }
+});
+```
+
+Note that by default `allowNamespaces` is enabled for spec compliancy.
+
+## License
+
+This plugin is issued under the [MIT license](./LICENSE).
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/index.js b/tools/node_modules/eslint/node_modules/acorn-jsx/index.js
new file mode 100644
index 0000000000..58c8677740
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./inject')(require('acorn'));
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/inject.js b/tools/node_modules/eslint/node_modules/acorn-jsx/inject.js
new file mode 100644
index 0000000000..2bc4e9fd39
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/inject.js
@@ -0,0 +1,433 @@
+'use strict';
+
+var XHTMLEntities = require('./xhtml');
+
+var hexNumber = /^[\da-fA-F]+$/;
+var decimalNumber = /^\d+$/;
+
+module.exports = function(acorn) {
+ var tt = acorn.tokTypes;
+ var tc = acorn.tokContexts;
+
+ tc.j_oTag = new acorn.TokContext('<tag', false);
+ tc.j_cTag = new acorn.TokContext('</tag', false);
+ tc.j_expr = new acorn.TokContext('<tag>...</tag>', true, true);
+
+ tt.jsxName = new acorn.TokenType('jsxName');
+ tt.jsxText = new acorn.TokenType('jsxText', {beforeExpr: true});
+ tt.jsxTagStart = new acorn.TokenType('jsxTagStart');
+ tt.jsxTagEnd = new acorn.TokenType('jsxTagEnd');
+
+ tt.jsxTagStart.updateContext = function() {
+ this.context.push(tc.j_expr); // treat as beginning of JSX expression
+ this.context.push(tc.j_oTag); // start opening tag context
+ this.exprAllowed = false;
+ };
+ tt.jsxTagEnd.updateContext = function(prevType) {
+ var out = this.context.pop();
+ if (out === tc.j_oTag && prevType === tt.slash || out === tc.j_cTag) {
+ this.context.pop();
+ this.exprAllowed = this.curContext() === tc.j_expr;
+ } else {
+ this.exprAllowed = true;
+ }
+ };
+
+ var pp = acorn.Parser.prototype;
+
+ // Reads inline JSX contents token.
+
+ pp.jsx_readToken = function() {
+ var out = '', chunkStart = this.pos;
+ for (;;) {
+ if (this.pos >= this.input.length)
+ this.raise(this.start, 'Unterminated JSX contents');
+ var ch = this.input.charCodeAt(this.pos);
+
+ switch (ch) {
+ case 60: // '<'
+ case 123: // '{'
+ if (this.pos === this.start) {
+ if (ch === 60 && this.exprAllowed) {
+ ++this.pos;
+ return this.finishToken(tt.jsxTagStart);
+ }
+ return this.getTokenFromCode(ch);
+ }
+ out += this.input.slice(chunkStart, this.pos);
+ return this.finishToken(tt.jsxText, out);
+
+ case 38: // '&'
+ out += this.input.slice(chunkStart, this.pos);
+ out += this.jsx_readEntity();
+ chunkStart = this.pos;
+ break;
+
+ default:
+ if (acorn.isNewLine(ch)) {
+ out += this.input.slice(chunkStart, this.pos);
+ out += this.jsx_readNewLine(true);
+ chunkStart = this.pos;
+ } else {
+ ++this.pos;
+ }
+ }
+ }
+ };
+
+ pp.jsx_readNewLine = function(normalizeCRLF) {
+ var ch = this.input.charCodeAt(this.pos);
+ var out;
+ ++this.pos;
+ if (ch === 13 && this.input.charCodeAt(this.pos) === 10) {
+ ++this.pos;
+ out = normalizeCRLF ? '\n' : '\r\n';
+ } else {
+ out = String.fromCharCode(ch);
+ }
+ if (this.options.locations) {
+ ++this.curLine;
+ this.lineStart = this.pos;
+ }
+
+ return out;
+ };
+
+ pp.jsx_readString = function(quote) {
+ var out = '', chunkStart = ++this.pos;
+ for (;;) {
+ if (this.pos >= this.input.length)
+ this.raise(this.start, 'Unterminated string constant');
+ var ch = this.input.charCodeAt(this.pos);
+ if (ch === quote) break;
+ if (ch === 38) { // '&'
+ out += this.input.slice(chunkStart, this.pos);
+ out += this.jsx_readEntity();
+ chunkStart = this.pos;
+ } else if (acorn.isNewLine(ch)) {
+ out += this.input.slice(chunkStart, this.pos);
+ out += this.jsx_readNewLine(false);
+ chunkStart = this.pos;
+ } else {
+ ++this.pos;
+ }
+ }
+ out += this.input.slice(chunkStart, this.pos++);
+ return this.finishToken(tt.string, out);
+ };
+
+ pp.jsx_readEntity = function() {
+ var str = '', count = 0, entity;
+ var ch = this.input[this.pos];
+ if (ch !== '&')
+ this.raise(this.pos, 'Entity must start with an ampersand');
+ var startPos = ++this.pos;
+ while (this.pos < this.input.length && count++ < 10) {
+ ch = this.input[this.pos++];
+ if (ch === ';') {
+ if (str[0] === '#') {
+ if (str[1] === 'x') {
+ str = str.substr(2);
+ if (hexNumber.test(str))
+ entity = String.fromCharCode(parseInt(str, 16));
+ } else {
+ str = str.substr(1);
+ if (decimalNumber.test(str))
+ entity = String.fromCharCode(parseInt(str, 10));
+ }
+ } else {
+ entity = XHTMLEntities[str];
+ }
+ break;
+ }
+ str += ch;
+ }
+ if (!entity) {
+ this.pos = startPos;
+ return '&';
+ }
+ return entity;
+ };
+
+
+ // Read a JSX identifier (valid tag or attribute name).
+ //
+ // Optimized version since JSX identifiers can't contain
+ // escape characters and so can be read as single slice.
+ // Also assumes that first character was already checked
+ // by isIdentifierStart in readToken.
+
+ pp.jsx_readWord = function() {
+ var ch, start = this.pos;
+ do {
+ ch = this.input.charCodeAt(++this.pos);
+ } while (acorn.isIdentifierChar(ch) || ch === 45); // '-'
+ return this.finishToken(tt.jsxName, this.input.slice(start, this.pos));
+ };
+
+ // Transforms JSX element name to string.
+
+ function getQualifiedJSXName(object) {
+ if (object.type === 'JSXIdentifier')
+ return object.name;
+
+ if (object.type === 'JSXNamespacedName')
+ return object.namespace.name + ':' + object.name.name;
+
+ if (object.type === 'JSXMemberExpression')
+ return getQualifiedJSXName(object.object) + '.' +
+ getQualifiedJSXName(object.property);
+ }
+
+ // Parse next token as JSX identifier
+
+ pp.jsx_parseIdentifier = function() {
+ var node = this.startNode();
+ if (this.type === tt.jsxName)
+ node.name = this.value;
+ else if (this.type.keyword)
+ node.name = this.type.keyword;
+ else
+ this.unexpected();
+ this.next();
+ return this.finishNode(node, 'JSXIdentifier');
+ };
+
+ // Parse namespaced identifier.
+
+ pp.jsx_parseNamespacedName = function() {
+ var startPos = this.start, startLoc = this.startLoc;
+ var name = this.jsx_parseIdentifier();
+ if (!this.options.plugins.jsx.allowNamespaces || !this.eat(tt.colon)) return name;
+ var node = this.startNodeAt(startPos, startLoc);
+ node.namespace = name;
+ node.name = this.jsx_parseIdentifier();
+ return this.finishNode(node, 'JSXNamespacedName');
+ };
+
+ // Parses element name in any form - namespaced, member
+ // or single identifier.
+
+ pp.jsx_parseElementName = function() {
+ var startPos = this.start, startLoc = this.startLoc;
+ var node = this.jsx_parseNamespacedName();
+ if (this.type === tt.dot && node.type === 'JSXNamespacedName' && !this.options.plugins.jsx.allowNamespacedObjects) {
+ this.unexpected();
+ }
+ while (this.eat(tt.dot)) {
+ var newNode = this.startNodeAt(startPos, startLoc);
+ newNode.object = node;
+ newNode.property = this.jsx_parseIdentifier();
+ node = this.finishNode(newNode, 'JSXMemberExpression');
+ }
+ return node;
+ };
+
+ // Parses any type of JSX attribute value.
+
+ pp.jsx_parseAttributeValue = function() {
+ switch (this.type) {
+ case tt.braceL:
+ var node = this.jsx_parseExpressionContainer();
+ if (node.expression.type === 'JSXEmptyExpression')
+ this.raise(node.start, 'JSX attributes must only be assigned a non-empty expression');
+ return node;
+
+ case tt.jsxTagStart:
+ case tt.string:
+ return this.parseExprAtom();
+
+ default:
+ this.raise(this.start, 'JSX value should be either an expression or a quoted JSX text');
+ }
+ };
+
+ // JSXEmptyExpression is unique type since it doesn't actually parse anything,
+ // and so it should start at the end of last read token (left brace) and finish
+ // at the beginning of the next one (right brace).
+
+ pp.jsx_parseEmptyExpression = function() {
+ var node = this.startNodeAt(this.lastTokEnd, this.lastTokEndLoc);
+ return this.finishNodeAt(node, 'JSXEmptyExpression', this.start, this.startLoc);
+ };
+
+ // Parses JSX expression enclosed into curly brackets.
+
+
+ pp.jsx_parseExpressionContainer = function() {
+ var node = this.startNode();
+ this.next();
+ node.expression = this.type === tt.braceR
+ ? this.jsx_parseEmptyExpression()
+ : this.parseExpression();
+ this.expect(tt.braceR);
+ return this.finishNode(node, 'JSXExpressionContainer');
+ };
+
+ // Parses following JSX attribute name-value pair.
+
+ pp.jsx_parseAttribute = function() {
+ var node = this.startNode();
+ if (this.eat(tt.braceL)) {
+ this.expect(tt.ellipsis);
+ node.argument = this.parseMaybeAssign();
+ this.expect(tt.braceR);
+ return this.finishNode(node, 'JSXSpreadAttribute');
+ }
+ node.name = this.jsx_parseNamespacedName();
+ node.value = this.eat(tt.eq) ? this.jsx_parseAttributeValue() : null;
+ return this.finishNode(node, 'JSXAttribute');
+ };
+
+ // Parses JSX opening tag starting after '<'.
+
+ pp.jsx_parseOpeningElementAt = function(startPos, startLoc) {
+ var node = this.startNodeAt(startPos, startLoc);
+ node.attributes = [];
+ node.name = this.jsx_parseElementName();
+ while (this.type !== tt.slash && this.type !== tt.jsxTagEnd)
+ node.attributes.push(this.jsx_parseAttribute());
+ node.selfClosing = this.eat(tt.slash);
+ this.expect(tt.jsxTagEnd);
+ return this.finishNode(node, 'JSXOpeningElement');
+ };
+
+ // Parses JSX closing tag starting after '</'.
+
+ pp.jsx_parseClosingElementAt = function(startPos, startLoc) {
+ var node = this.startNodeAt(startPos, startLoc);
+ node.name = this.jsx_parseElementName();
+ this.expect(tt.jsxTagEnd);
+ return this.finishNode(node, 'JSXClosingElement');
+ };
+
+ // Parses entire JSX element, including it's opening tag
+ // (starting after '<'), attributes, contents and closing tag.
+
+ pp.jsx_parseElementAt = function(startPos, startLoc) {
+ var node = this.startNodeAt(startPos, startLoc);
+ var children = [];
+ var openingElement = this.jsx_parseOpeningElementAt(startPos, startLoc);
+ var closingElement = null;
+
+ if (!openingElement.selfClosing) {
+ contents: for (;;) {
+ switch (this.type) {
+ case tt.jsxTagStart:
+ startPos = this.start; startLoc = this.startLoc;
+ this.next();
+ if (this.eat(tt.slash)) {
+ closingElement = this.jsx_parseClosingElementAt(startPos, startLoc);
+ break contents;
+ }
+ children.push(this.jsx_parseElementAt(startPos, startLoc));
+ break;
+
+ case tt.jsxText:
+ children.push(this.parseExprAtom());
+ break;
+
+ case tt.braceL:
+ children.push(this.jsx_parseExpressionContainer());
+ break;
+
+ default:
+ this.unexpected();
+ }
+ }
+ if (getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) {
+ this.raise(
+ closingElement.start,
+ 'Expected corresponding JSX closing tag for <' + getQualifiedJSXName(openingElement.name) + '>');
+ }
+ }
+
+ node.openingElement = openingElement;
+ node.closingElement = closingElement;
+ node.children = children;
+ if (this.type === tt.relational && this.value === "<") {
+ this.raise(this.start, "Adjacent JSX elements must be wrapped in an enclosing tag");
+ }
+ return this.finishNode(node, 'JSXElement');
+ };
+
+ // Parses entire JSX element from current position.
+
+ pp.jsx_parseElement = function() {
+ var startPos = this.start, startLoc = this.startLoc;
+ this.next();
+ return this.jsx_parseElementAt(startPos, startLoc);
+ };
+
+ acorn.plugins.jsx = function(instance, opts) {
+ if (!opts) {
+ return;
+ }
+
+ if (typeof opts !== 'object') {
+ opts = {};
+ }
+
+ instance.options.plugins.jsx = {
+ allowNamespaces: opts.allowNamespaces !== false,
+ allowNamespacedObjects: !!opts.allowNamespacedObjects
+ };
+
+ instance.extend('parseExprAtom', function(inner) {
+ return function(refShortHandDefaultPos) {
+ if (this.type === tt.jsxText)
+ return this.parseLiteral(this.value);
+ else if (this.type === tt.jsxTagStart)
+ return this.jsx_parseElement();
+ else
+ return inner.call(this, refShortHandDefaultPos);
+ };
+ });
+
+ instance.extend('readToken', function(inner) {
+ return function(code) {
+ var context = this.curContext();
+
+ if (context === tc.j_expr) return this.jsx_readToken();
+
+ if (context === tc.j_oTag || context === tc.j_cTag) {
+ if (acorn.isIdentifierStart(code)) return this.jsx_readWord();
+
+ if (code == 62) {
+ ++this.pos;
+ return this.finishToken(tt.jsxTagEnd);
+ }
+
+ if ((code === 34 || code === 39) && context == tc.j_oTag)
+ return this.jsx_readString(code);
+ }
+
+ if (code === 60 && this.exprAllowed) {
+ ++this.pos;
+ return this.finishToken(tt.jsxTagStart);
+ }
+ return inner.call(this, code);
+ };
+ });
+
+ instance.extend('updateContext', function(inner) {
+ return function(prevType) {
+ if (this.type == tt.braceL) {
+ var curContext = this.curContext();
+ if (curContext == tc.j_oTag) this.context.push(tc.b_expr);
+ else if (curContext == tc.j_expr) this.context.push(tc.b_tmpl);
+ else inner.call(this, prevType);
+ this.exprAllowed = true;
+ } else if (this.type === tt.slash && prevType === tt.jsxTagStart) {
+ this.context.length -= 2; // do not consider JSX expr -> JSX open tag -> ... anymore
+ this.context.push(tc.j_cTag); // reconsider as closing tag context
+ this.exprAllowed = false;
+ } else {
+ return inner.call(this, prevType);
+ }
+ };
+ });
+ };
+
+ return acorn;
+};
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/.tern-project b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/.tern-project
new file mode 100644
index 0000000000..6718ce07e1
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/.tern-project
@@ -0,0 +1,6 @@
+{
+ "plugins": {
+ "node": true,
+ "es_modules": true
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/AUTHORS b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/AUTHORS
new file mode 100644
index 0000000000..1b2061cd4b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/AUTHORS
@@ -0,0 +1,59 @@
+List of Acorn contributors. Updated before every release.
+
+Adrian Rakovsky
+Alistair Braidwood
+Amila Welihinda
+Andres Suarez
+Angelo
+Aparajita Fishman
+Arian Stolwijk
+Artem Govorov
+Brandon Mills
+Charles Hughes
+Conrad Irwin
+Daniel Tschinder
+David Bonnet
+Domenico Matteo
+ForbesLindesay
+Forbes Lindesay
+Gilad Peleg
+impinball
+Ingvar Stepanyan
+Jackson Ray Hamilton
+Jesse McCarthy
+Jiaxing Wang
+Joel Kemp
+Johannes Herr
+Jordan Klassen
+Jürg Lehni
+keeyipchan
+Keheliya Gallaba
+Kevin Irish
+Kevin Kwok
+krator
+Marijn Haverbeke
+Martin Carlberg
+Mathias Bynens
+Mathieu 'p01' Henri
+Matthew Bastien
+Max Schaefer
+Max Zerzouri
+Mihai Bazon
+Mike Rennie
+Nicholas C. Zakas
+Nick Fitzgerald
+Olivier Thomann
+Oskar Schöldström
+Paul Harper
+Peter Rust
+PlNG
+Prayag Verma
+ReadmeCritic
+r-e-d
+Richard Gibson
+Rich Harris
+Rich-Harris
+Sebastian McKenzie
+Timothy Gu
+Toru Nagashima
+zsjforcn
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/LICENSE b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/LICENSE
new file mode 100644
index 0000000000..a35ebf44fd
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/LICENSE
@@ -0,0 +1,19 @@
+Copyright (C) 2012-2016 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/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/README.md b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/README.md
new file mode 100644
index 0000000000..0c514d5e63
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/README.md
@@ -0,0 +1,407 @@
+# 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, 6, or 7. This influences support for strict mode, the set
+ of reserved words, and support for new syntax features. Default is 6.
+
+ **NOTE**: Only 'stage 4' (finalized) ECMAScript 7 features are being
+ implemented by Acorn. That means that most of the draft standard is
+ not yet being parsed.
+
+- **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 (regardless of the `location` option) 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 the callbacks as a third 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|--ecma7`: 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)
+ }
+})
+```
+
+### Existing plugins
+
+ - [`acorn-jsx`](https://github.com/RReverser/acorn-jsx): Parse [Facebook JSX syntax extensions](https://github.com/facebook/jsx)
+ - [`acorn-es7-plugin`](https://github.com/MatAtBread/acorn-es7-plugin/): Parse [async/await syntax proposal](https://github.com/tc39/ecmascript-asyncawait)
+ - [`acorn-object-spread`](https://github.com/UXtemple/acorn-object-spread): Parse [object spread syntax proposal](https://github.com/sebmarkbage/ecmascript-rest-spread)
+ - [`acorn-es7`](https://www.npmjs.com/package/acorn-es7): Parse [decorator syntax proposal](https://github.com/wycats/javascript-decorators)
+ - [`acorn-objj`](https://www.npmjs.com/package/acorn-objj): [Objective-J](http://www.cappuccino-project.org/learn/objective-j.html) language parser built as Acorn plugin
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/bin/acorn b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/bin/acorn
new file mode 100755
index 0000000000..cf4acd5631
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/bin/acorn
@@ -0,0 +1,65 @@
+#!/usr/bin/env node
+'use strict';
+
+var path = require('path');
+var fs = require('fs');
+var acorn = require('../dist/acorn.js');
+
+var infile;
+var forceFile;
+var silent = false;
+var compact = false;
+var tokenize = false;
+var options = {}
+
+function help(status) {
+ var print = (status == 0) ? console.log : console.error
+ print("usage: " + path.basename(process.argv[1]) + " [--ecma3|--ecma5|--ecma6|--ecma7]")
+ 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 == "--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 if (arg == "--module") options.sourceType = 'module'
+ else help(1)
+}
+
+function run(code) {
+ var result
+ 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
+ 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(fs.readFileSync(infile, "utf8"))
+} else {
+ 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/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/bin/generate-identifier-regex.js b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/bin/generate-identifier-regex.js
new file mode 100644
index 0000000000..100e8cf280
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/bin/generate-identifier-regex.js
@@ -0,0 +1,55 @@
+'use strict';
+
+// Which Unicode version should be used?
+var version = '9.0.0';
+
+var start = require('unicode-' + version + '/Binary_Property/ID_Start/code-points.js')
+ .filter(function(ch) { return ch > 0x7f; });
+var last = -1;
+var cont = [0x200c, 0x200d].concat(require('unicode-' + version + '/Binary_Property/ID_Continue/code-points.js')
+ .filter(function(ch) { return ch > 0x7f && search(start, ch, last + 1) == -1; }));
+
+function search(arr, ch, starting) {
+ for (var i = starting; arr[i] <= ch && i < arr.length; last = i++)
+ if (arr[i] === ch)
+ return i;
+ return -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("let nonASCIIidentifierStartChars = \"" + startData.nonASCII + "\"");
+console.log("let nonASCIIidentifierChars = \"" + contData.nonASCII + "\"");
+console.log("const astralIdentifierStartCodes = " + JSON.stringify(startData.astral));
+console.log("const astralIdentifierCodes = " + JSON.stringify(contData.astral));
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/bin/update_authors.sh b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/bin/update_authors.sh
new file mode 100755
index 0000000000..466c8db586
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/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/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/.keep b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/.keep
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/.keep
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn.es.js b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn.es.js
new file mode 100644
index 0000000000..4460957fd7
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn.es.js
@@ -0,0 +1,3112 @@
+// Reserved word lists for various dialects of the language
+
+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",
+ 7: "enum",
+ strict: "implements interface let package private protected public static yield",
+ strictBind: "eval arguments"
+}
+
+// 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 + " const class extends export import super"
+}
+
+// ## 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 = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fd5\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ae\ua7b0-\ua7b7\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab65\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"
+var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d4-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d01-\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1cf8\u1cf9\u1dc0-\u1df5\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua900-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f"
+
+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 bin/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,19,35,5,35,5,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,66,18,2,1,11,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,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,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,60,67,1213,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,3,5761,10591,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,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,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,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,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)
+}
+
+// ## Token types
+
+// The assignment of fine-grained, information-carrying type objects
+// allows the tokenizer to store the information it has about a
+// token in a way that is very cheap for the parser to look up.
+
+// All token type variables start with an underscore, to make them
+// easy to recognize.
+
+// The `beforeExpr` property is used to disambiguate between regular
+// expressions and divisions. It is set on all token types that can
+// be followed by an expression (thus, a slash after them would be a
+// regular expression).
+//
+// The `startsExpr` property is used to check if the token ends a
+// `yield` expression. It is set on all token types that either can
+// directly start an expression (like a quotation mark) or can
+// continue an expression (like the body of a string).
+//
+// `isLoop` marks a keyword as starting a loop, which is important
+// to know when parsing a label, in order to allow or disallow
+// continue jumps to that label.
+
+var TokenType = function TokenType(label, conf) {
+ if ( conf === void 0 ) conf = {};
+
+ this.label = label
+ this.keyword = conf.keyword
+ this.beforeExpr = !!conf.beforeExpr
+ this.startsExpr = !!conf.startsExpr
+ this.isLoop = !!conf.isLoop
+ this.isAssign = !!conf.isAssign
+ this.prefix = !!conf.prefix
+ this.postfix = !!conf.postfix
+ this.binop = conf.binop || null
+ this.updateContext = null
+};
+
+function binop(name, prec) {
+ return new TokenType(name, {beforeExpr: true, binop: prec})
+}
+var beforeExpr = {beforeExpr: true};
+var startsExpr = {startsExpr: true};
+// Map keyword names to token types.
+
+var keywordTypes = {}
+
+// Succinct definitions of keyword token types
+function kw(name, options) {
+ if ( options === void 0 ) options = {};
+
+ options.keyword = name
+ return keywordTypes[name] = new TokenType(name, options)
+}
+
+var tt = {
+ num: new TokenType("num", startsExpr),
+ regexp: new TokenType("regexp", startsExpr),
+ string: new TokenType("string", startsExpr),
+ name: new TokenType("name", startsExpr),
+ eof: new TokenType("eof"),
+
+ // Punctuation token types.
+ bracketL: new TokenType("[", {beforeExpr: true, startsExpr: true}),
+ bracketR: new TokenType("]"),
+ braceL: new TokenType("{", {beforeExpr: true, startsExpr: true}),
+ braceR: new TokenType("}"),
+ parenL: new TokenType("(", {beforeExpr: true, startsExpr: true}),
+ parenR: new TokenType(")"),
+ comma: new TokenType(",", beforeExpr),
+ semi: new TokenType(";", beforeExpr),
+ colon: new TokenType(":", beforeExpr),
+ dot: new TokenType("."),
+ question: new TokenType("?", beforeExpr),
+ arrow: new TokenType("=>", beforeExpr),
+ template: new TokenType("template"),
+ ellipsis: new TokenType("...", beforeExpr),
+ backQuote: new TokenType("`", startsExpr),
+ dollarBraceL: new TokenType("${", {beforeExpr: true, startsExpr: true}),
+
+ // Operators. These carry several kinds of properties to help the
+ // parser use them properly (the presence of these properties is
+ // what categorizes them as operators).
+ //
+ // `binop`, when present, specifies that this operator is a binary
+ // operator, and will refer to its precedence.
+ //
+ // `prefix` and `postfix` mark the operator as a prefix or postfix
+ // unary operator.
+ //
+ // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as
+ // binary operators with a very low precedence, that should result
+ // in AssignmentExpression nodes.
+
+ eq: new TokenType("=", {beforeExpr: true, isAssign: true}),
+ assign: new TokenType("_=", {beforeExpr: true, isAssign: true}),
+ incDec: new TokenType("++/--", {prefix: true, postfix: true, startsExpr: true}),
+ prefix: new TokenType("prefix", {beforeExpr: true, prefix: true, startsExpr: true}),
+ logicalOR: binop("||", 1),
+ logicalAND: binop("&&", 2),
+ bitwiseOR: binop("|", 3),
+ bitwiseXOR: binop("^", 4),
+ bitwiseAND: binop("&", 5),
+ equality: binop("==/!=", 6),
+ relational: binop("</>", 7),
+ bitShift: binop("<</>>", 8),
+ plusMin: new TokenType("+/-", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}),
+ modulo: binop("%", 10),
+ star: binop("*", 10),
+ slash: binop("/", 10),
+ starstar: new TokenType("**", {beforeExpr: true}),
+
+ // Keyword token types.
+ _break: kw("break"),
+ _case: kw("case", beforeExpr),
+ _catch: kw("catch"),
+ _continue: kw("continue"),
+ _debugger: kw("debugger"),
+ _default: kw("default", beforeExpr),
+ _do: kw("do", {isLoop: true, beforeExpr: true}),
+ _else: kw("else", beforeExpr),
+ _finally: kw("finally"),
+ _for: kw("for", {isLoop: true}),
+ _function: kw("function", startsExpr),
+ _if: kw("if"),
+ _return: kw("return", beforeExpr),
+ _switch: kw("switch"),
+ _throw: kw("throw", beforeExpr),
+ _try: kw("try"),
+ _var: kw("var"),
+ _const: kw("const"),
+ _while: kw("while", {isLoop: true}),
+ _with: kw("with"),
+ _new: kw("new", {beforeExpr: true, startsExpr: true}),
+ _this: kw("this", startsExpr),
+ _super: kw("super", startsExpr),
+ _class: kw("class"),
+ _extends: kw("extends", beforeExpr),
+ _export: kw("export"),
+ _import: kw("import"),
+ _null: kw("null", startsExpr),
+ _true: kw("true", startsExpr),
+ _false: kw("false", startsExpr),
+ _in: kw("in", {beforeExpr: true, binop: 7}),
+ _instanceof: kw("instanceof", {beforeExpr: true, binop: 7}),
+ _typeof: kw("typeof", {beforeExpr: true, prefix: true, startsExpr: true}),
+ _void: kw("void", {beforeExpr: true, prefix: true, startsExpr: true}),
+ _delete: kw("delete", {beforeExpr: true, prefix: true, startsExpr: true})
+}
+
+// Matches a whole line break (where CRLF is considered a single
+// line break). Used to count lines.
+
+var lineBreak = /\r\n?|\n|\u2028|\u2029/
+var lineBreakG = new RegExp(lineBreak.source, "g")
+
+function isNewLine(code) {
+ return code === 10 || code === 13 || code === 0x2028 || code == 0x2029
+}
+
+var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/
+
+var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g
+
+function isArray(obj) {
+ return Object.prototype.toString.call(obj) === "[object Array]"
+}
+
+// Checks if an object has a property.
+
+function has(obj, propName) {
+ return Object.prototype.hasOwnProperty.call(obj, propName)
+}
+
+// These are used when `options.locations` is on, for the
+// `startLoc` and `endLoc` properties.
+
+var Position = function Position(line, col) {
+ this.line = line
+ this.column = col
+};
+
+Position.prototype.offset = function offset (n) {
+ return new Position(this.line, this.column + n)
+};
+
+var SourceLocation = function SourceLocation(p, start, end) {
+ 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.
+
+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)
+ }
+ }
+}
+
+// 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. The default is 6.
+ ecmaVersion: 6,
+ // 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: {}
+}
+
+// Interpret and default an options object
+
+function getOptions(opts) {
+ var options = {}
+ for (var opt in defaultOptions)
+ options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt]
+ if (options.allowReserved == null)
+ options.allowReserved = options.ecmaVersion < 5
+
+ if (isArray(options.onToken)) {
+ 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)
+ }
+}
+
+// Registered plugins
+var plugins = {}
+
+function keywordRegexp(words) {
+ return new RegExp("^(" + words.replace(/ /g, "|") + ")$")
+}
+
+var Parser = function Parser(options, input, startPos) {
+ this.options = options = getOptions(options)
+ this.sourceFile = options.sourceFile
+ this.keywords = keywordRegexp(keywords[options.ecmaVersion >= 6 ? 6 : 5])
+ var reserved = options.allowReserved ? "" :
+ reservedWords[options.ecmaVersion] + (options.sourceType == "module" ? " await" : "")
+ this.reservedWords = keywordRegexp(reserved)
+ var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict
+ this.reservedWordsStrict = keywordRegexp(reservedStrict)
+ this.reservedWordsStrictBind = keywordRegexp(reservedStrict + " " + 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(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 = 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) {
+ var this$1 = this;
+
+ for (var name in pluginConfigs) {
+ var plugin = plugins[name]
+ if (!plugin) throw new Error("Plugin '" + name + "' not found")
+ plugin(this$1, pluginConfigs[name])
+ }
+};
+
+Parser.prototype.parse = function parse () {
+ var node = this.options.program || this.startNode()
+ this.nextToken()
+ return this.parseTopLevel(node)
+};
+
+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.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 === 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")
+}
+
+var DestructuringErrors = function DestructuringErrors() {
+ this.shorthandAssign = 0
+ this.trailingComma = 0
+};
+
+pp.checkPatternErrors = function(refDestructuringErrors, andThrow) {
+ var trailing = refDestructuringErrors && refDestructuringErrors.trailingComma
+ if (!andThrow) return !!trailing
+ if (trailing) this.raise(trailing, "Comma is not permitted after the rest element")
+}
+
+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")
+}
+
+var pp$1 = 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$1.parseTopLevel = function(node) {
+ var this$1 = this;
+
+ var first = true
+ if (!node.body) node.body = []
+ while (this.type !== tt.eof) {
+ var stmt = this$1.parseStatement(true, true)
+ node.body.push(stmt)
+ if (first) {
+ if (this$1.isUseStrict(stmt)) this$1.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"};
+var switchLabel = {kind: "switch"};
+pp$1.isLet = function() {
+ if (this.type !== tt.name || this.options.ecmaVersion < 6 || this.value != "let") return false
+ skipWhiteSpace.lastIndex = this.pos
+ var skip = skipWhiteSpace.exec(this.input)
+ var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next)
+ if (nextCh === 91 || nextCh == 123) return true // '{' and '['
+ if (isIdentifierStart(nextCh, true)) {
+ for (var pos = next + 1; isIdentifierChar(this.input.charCodeAt(pos), true); ++pos) {}
+ var ident = this.input.slice(next, pos)
+ if (!this.isKeyword(ident)) return true
+ }
+ return false
+}
+
+// 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$1.parseStatement = function(declaration, topLevel) {
+ var starttype = this.type, node = this.startNode(), kind
+
+ if (this.isLet()) {
+ starttype = tt._var
+ kind = "let"
+ }
+
+ // 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._const: case tt._var:
+ kind = kind || this.value
+ if (!declaration && kind != "var") this.unexpected()
+ return this.parseVarStatement(node, kind)
+ 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$1.parseBreakContinueStatement = function(node, keyword) {
+ var this$1 = this;
+
+ 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$1.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$1.parseDebuggerStatement = function(node) {
+ this.next()
+ this.semicolon()
+ return this.finishNode(node, "DebuggerStatement")
+}
+
+pp$1.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$1.parseForStatement = function(node) {
+ this.next()
+ this.labels.push(loopLabel)
+ this.expect(tt.parenL)
+ if (this.type === tt.semi) return this.parseFor(node, null)
+ var isLet = this.isLet()
+ if (this.type === tt._var || this.type === tt._const || isLet) {
+ var init$1 = this.startNode(), kind = isLet ? "let" : this.value
+ this.next()
+ this.parseVar(init$1, true, kind)
+ this.finishNode(init$1, "VariableDeclaration")
+ if ((this.type === tt._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) && init$1.declarations.length === 1 &&
+ !(kind !== "var" && init$1.declarations[0].init))
+ return this.parseForIn(node, init$1)
+ return this.parseFor(node, init$1)
+ }
+ var refDestructuringErrors = new DestructuringErrors
+ var init = this.parseExpression(true, refDestructuringErrors)
+ if (this.type === tt._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$1.parseFunctionStatement = function(node) {
+ this.next()
+ return this.parseFunction(node, true)
+}
+
+pp$1.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$1.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$1.parseSwitchStatement = function(node) {
+ var this$1 = this;
+
+ 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 = false; this.type != tt.braceR;) {
+ if (this$1.type === tt._case || this$1.type === tt._default) {
+ var isCase = this$1.type === tt._case
+ if (cur) this$1.finishNode(cur, "SwitchCase")
+ node.cases.push(cur = this$1.startNode())
+ cur.consequent = []
+ this$1.next()
+ if (isCase) {
+ cur.test = this$1.parseExpression()
+ } else {
+ if (sawDefault) this$1.raiseRecoverable(this$1.lastTokStart, "Multiple default clauses")
+ sawDefault = true
+ cur.test = null
+ }
+ this$1.expect(tt.colon)
+ } else {
+ if (!cur) this$1.unexpected()
+ cur.consequent.push(this$1.parseStatement(true))
+ }
+ }
+ if (cur) this.finishNode(cur, "SwitchCase")
+ this.next() // Closing brace
+ this.labels.pop()
+ return this.finishNode(node, "SwitchStatement")
+}
+
+pp$1.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$1.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.body = this.parseBlock()
+ node.handler = this.finishNode(clause, "CatchClause")
+ }
+ 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$1.parseVarStatement = function(node, kind) {
+ this.next()
+ this.parseVar(node, false, kind)
+ this.semicolon()
+ return this.finishNode(node, "VariableDeclaration")
+}
+
+pp$1.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$1.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$1.parseEmptyStatement = function(node) {
+ this.next()
+ return this.finishNode(node, "EmptyStatement")
+}
+
+pp$1.parseLabeledStatement = function(node, maybeName, expr) {
+ var this$1 = this;
+
+ for (var i = 0; i < this.labels.length; ++i)
+ if (this$1.labels[i].name === maybeName) this$1.raise(expr.start, "Label '" + maybeName + "' is already declared")
+ var kind = this.type.isLoop ? "loop" : this.type === tt._switch ? "switch" : null
+ for (var i$1 = this.labels.length - 1; i$1 >= 0; i$1--) {
+ var label = this$1.labels[i$1]
+ if (label.statementStart == node.start) {
+ label.statementStart = this$1.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$1.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$1.parseBlock = function(allowStrict) {
+ var this$1 = this;
+
+ var node = this.startNode(), first = true, oldStrict
+ node.body = []
+ this.expect(tt.braceL)
+ while (!this.eat(tt.braceR)) {
+ var stmt = this$1.parseStatement(true)
+ node.body.push(stmt)
+ if (first && allowStrict && this$1.isUseStrict(stmt)) {
+ oldStrict = this$1.strict
+ this$1.setStrict(this$1.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$1.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$1.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$1.parseVar = function(node, isFor, kind) {
+ var this$1 = this;
+
+ node.declarations = []
+ node.kind = kind
+ for (;;) {
+ var decl = this$1.startNode()
+ this$1.parseVarId(decl)
+ if (this$1.eat(tt.eq)) {
+ decl.init = this$1.parseMaybeAssign(isFor)
+ } else if (kind === "const" && !(this$1.type === tt._in || (this$1.options.ecmaVersion >= 6 && this$1.isContextual("of")))) {
+ this$1.unexpected()
+ } else if (decl.id.type != "Identifier" && !(isFor && (this$1.type === tt._in || this$1.isContextual("of")))) {
+ this$1.raise(this$1.lastTokEnd, "Complex binding patterns require an initialization value")
+ } else {
+ decl.init = null
+ }
+ node.declarations.push(this$1.finishNode(decl, "VariableDeclarator"))
+ if (!this$1.eat(tt.comma)) break
+ }
+ return node
+}
+
+pp$1.parseVarId = function(decl) {
+ decl.id = this.parseBindingAtom()
+ this.checkLVal(decl.id, true)
+}
+
+// Parse a function declaration or literal (depending on the
+// `isStatement` parameter).
+
+pp$1.parseFunction = function(node, isStatement, allowExpressionBody) {
+ this.initFunction(node)
+ if (this.options.ecmaVersion >= 6)
+ node.generator = this.eat(tt.star)
+ var oldInGen = this.inGenerator
+ this.inGenerator = node.generator
+ if (isStatement || this.type === tt.name)
+ node.id = this.parseIdent()
+ this.parseFunctionParams(node)
+ this.parseFunctionBody(node, allowExpressionBody)
+ this.inGenerator = oldInGen
+ return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression")
+}
+
+pp$1.parseFunctionParams = function(node) {
+ this.expect(tt.parenL)
+ node.params = this.parseBindingList(tt.parenR, false, false, true)
+}
+
+// Parse a class declaration or literal (depending on the
+// `isStatement` parameter).
+
+pp$1.parseClass = function(node, isStatement) {
+ var this$1 = this;
+
+ 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$1.eat(tt.semi)) continue
+ var method = this$1.startNode()
+ var isGenerator = this$1.eat(tt.star)
+ var isMaybeStatic = this$1.type === tt.name && this$1.value === "static"
+ this$1.parsePropertyName(method)
+ method.static = isMaybeStatic && this$1.type !== tt.parenL
+ if (method.static) {
+ if (isGenerator) this$1.unexpected()
+ isGenerator = this$1.eat(tt.star)
+ this$1.parsePropertyName(method)
+ }
+ method.kind = "method"
+ var isGetSet = false
+ if (!method.computed) {
+ var key = method.key;
+ if (!isGenerator && key.type === "Identifier" && this$1.type !== tt.parenL && (key.name === "get" || key.name === "set")) {
+ isGetSet = true
+ method.kind = key.name
+ key = this$1.parsePropertyName(method)
+ }
+ if (!method.static && (key.type === "Identifier" && key.name === "constructor" ||
+ key.type === "Literal" && key.value === "constructor")) {
+ if (hadConstructor) this$1.raise(key.start, "Duplicate constructor in the same class")
+ if (isGetSet) this$1.raise(key.start, "Constructor can't have get/set modifier")
+ if (isGenerator) this$1.raise(key.start, "Constructor can't be a generator")
+ method.kind = "constructor"
+ hadConstructor = true
+ }
+ }
+ this$1.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$1.raiseRecoverable(start, "getter should have no params")
+ else
+ this$1.raiseRecoverable(start, "setter should have exactly one param")
+ }
+ if (method.kind === "set" && method.value.params[0].type === "RestElement")
+ this$1.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$1.parseClassMethod = function(classBody, method, isGenerator) {
+ method.value = this.parseMethod(isGenerator)
+ classBody.body.push(this.finishNode(method, "MethodDefinition"))
+}
+
+pp$1.parseClassId = function(node, isStatement) {
+ node.id = this.type === tt.name ? this.parseIdent() : isStatement ? this.unexpected() : null
+}
+
+pp$1.parseClassSuper = function(node) {
+ node.superClass = this.eat(tt._extends) ? this.parseExprSubscripts() : null
+}
+
+// Parses module export declaration.
+
+pp$1.parseExport = function(node) {
+ var this$1 = this;
+
+ 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 parens = this.type == tt.parenL
+ var expr = this.parseMaybeAssign()
+ var needsSemi = true
+ if (!parens && (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 {
+ // check for keywords used as local names
+ for (var i = 0; i < node.specifiers.length; i++) {
+ if (this$1.keywords.test(node.specifiers[i].local.name) || this$1.reservedWords.test(node.specifiers[i].local.name)) {
+ this$1.unexpected(node.specifiers[i].local.start)
+ }
+ }
+
+ node.source = null
+ }
+ this.semicolon()
+ }
+ return this.finishNode(node, "ExportNamedDeclaration")
+}
+
+pp$1.shouldParseExportStatement = function() {
+ return this.type.keyword || this.isLet()
+}
+
+// Parses a comma-separated list of module exports.
+
+pp$1.parseExportSpecifiers = function() {
+ var this$1 = this;
+
+ var nodes = [], first = true
+ // export { x, y as z } [from '...']
+ this.expect(tt.braceL)
+ while (!this.eat(tt.braceR)) {
+ if (!first) {
+ this$1.expect(tt.comma)
+ if (this$1.afterTrailingComma(tt.braceR)) break
+ } else first = false
+
+ var node = this$1.startNode()
+ node.local = this$1.parseIdent(this$1.type === tt._default)
+ node.exported = this$1.eatContextual("as") ? this$1.parseIdent(true) : node.local
+ nodes.push(this$1.finishNode(node, "ExportSpecifier"))
+ }
+ return nodes
+}
+
+// Parses import declaration.
+
+pp$1.parseImport = function(node) {
+ this.next()
+ // import '...'
+ if (this.type === tt.string) {
+ node.specifiers = empty
+ node.source = this.parseExprAtom()
+ } 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$1.parseImportSpecifiers = function() {
+ var this$1 = this;
+
+ 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$1 = this.startNode()
+ this.next()
+ this.expectContextual("as")
+ node$1.local = this.parseIdent()
+ this.checkLVal(node$1.local, true)
+ nodes.push(this.finishNode(node$1, "ImportNamespaceSpecifier"))
+ return nodes
+ }
+ this.expect(tt.braceL)
+ while (!this.eat(tt.braceR)) {
+ if (!first) {
+ this$1.expect(tt.comma)
+ if (this$1.afterTrailingComma(tt.braceR)) break
+ } else first = false
+
+ var node$2 = this$1.startNode()
+ node$2.imported = this$1.parseIdent(true)
+ if (this$1.eatContextual("as")) {
+ node$2.local = this$1.parseIdent()
+ } else {
+ node$2.local = node$2.imported
+ if (this$1.isKeyword(node$2.local.name)) this$1.unexpected(node$2.local.start)
+ if (this$1.reservedWordsStrict.test(node$2.local.name)) this$1.raise(node$2.local.start, "The keyword '" + node$2.local.name + "' is reserved")
+ }
+ this$1.checkLVal(node$2.local, true)
+ nodes.push(this$1.finishNode(node$2, "ImportSpecifier"))
+ }
+ return nodes
+}
+
+var pp$2 = Parser.prototype
+
+// Convert existing expression atom to assignable pattern
+// if possible.
+
+pp$2.toAssignable = function(node, isBinding) {
+ var this$1 = this;
+
+ 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$1.raise(prop.key.start, "Object pattern can't contain getter or setter")
+ this$1.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$2.toAssignableList = function(exprList, isBinding) {
+ var this$1 = this;
+
+ 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 && 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$1.toAssignable(elt, isBinding)
+ }
+ return exprList
+}
+
+// Parses spread element.
+
+pp$2.parseSpread = function(refDestructuringErrors) {
+ var node = this.startNode()
+ this.next()
+ node.argument = this.parseMaybeAssign(false, refDestructuringErrors)
+ return this.finishNode(node, "SpreadElement")
+}
+
+pp$2.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 === tt.name ? this.parseIdent() : this.unexpected()
+ else node.argument = this.type === tt.name || this.type === tt.bracketL ? this.parseBindingAtom() : this.unexpected()
+
+ return this.finishNode(node, "RestElement")
+}
+
+// Parses lvalue (assignable) atom.
+
+pp$2.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$2.parseBindingList = function(close, allowEmpty, allowTrailingComma, allowNonIdent) {
+ var this$1 = this;
+
+ var elts = [], first = true
+ while (!this.eat(close)) {
+ if (first) first = false
+ else this$1.expect(tt.comma)
+ if (allowEmpty && this$1.type === tt.comma) {
+ elts.push(null)
+ } else if (allowTrailingComma && this$1.afterTrailingComma(close)) {
+ break
+ } else if (this$1.type === tt.ellipsis) {
+ var rest = this$1.parseRest(allowNonIdent)
+ this$1.parseBindingListItem(rest)
+ elts.push(rest)
+ if (this$1.type === tt.comma) this$1.raise(this$1.start, "Comma is not permitted after the rest element")
+ this$1.expect(close)
+ break
+ } else {
+ var elem = this$1.parseMaybeDefault(this$1.start, this$1.startLoc)
+ this$1.parseBindingListItem(elem)
+ elts.push(elem)
+ }
+ }
+ return elts
+}
+
+pp$2.parseBindingListItem = function(param) {
+ return param
+}
+
+// Parses assignment pattern around given atom if possible.
+
+pp$2.parseMaybeDefault = function(startPos, startLoc, left) {
+ left = left || this.parseBindingAtom()
+ if (this.options.ecmaVersion < 6 || !this.eat(tt.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$2.checkLVal = function(expr, isBinding, checkClashes) {
+ var this$1 = this;
+
+ switch (expr.type) {
+ case "Identifier":
+ if (this.strict && this.reservedWordsStrictBind.test(expr.name))
+ this.raiseRecoverable(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode")
+ if (checkClashes) {
+ if (has(checkClashes, expr.name))
+ this.raiseRecoverable(expr.start, "Argument name clash")
+ checkClashes[expr.name] = true
+ }
+ break
+
+ case "MemberExpression":
+ if (isBinding) this.raiseRecoverable(expr.start, (isBinding ? "Binding" : "Assigning to") + " member expression")
+ break
+
+ case "ObjectPattern":
+ for (var i = 0; i < expr.properties.length; i++)
+ this$1.checkLVal(expr.properties[i].value, isBinding, checkClashes)
+ break
+
+ case "ArrayPattern":
+ for (var i$1 = 0; i$1 < expr.elements.length; i$1++) {
+ var elem = expr.elements[i$1]
+ if (elem) this$1.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")
+ }
+}
+
+var pp$3 = 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$3.checkPropClash = function(prop, propHash) {
+ if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand))
+ return
+ var key = prop.key;
+ var name
+ 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.raiseRecoverable(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.raiseRecoverable(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$3.parseExpression = function(noIn, refDestructuringErrors) {
+ var this$1 = this;
+
+ var startPos = this.start, startLoc = this.startLoc
+ var expr = this.parseMaybeAssign(noIn, refDestructuringErrors)
+ if (this.type === tt.comma) {
+ var node = this.startNodeAt(startPos, startLoc)
+ node.expressions = [expr]
+ while (this.eat(tt.comma)) node.expressions.push(this$1.parseMaybeAssign(noIn, refDestructuringErrors))
+ return this.finishNode(node, "SequenceExpression")
+ }
+ return expr
+}
+
+// Parse an assignment expression. This includes applications of
+// operators like `+=`.
+
+pp$3.parseMaybeAssign = function(noIn, refDestructuringErrors, afterLeftParse) {
+ if (this.inGenerator && this.isContextual("yield")) return this.parseYield()
+
+ var ownDestructuringErrors = false
+ if (!refDestructuringErrors) {
+ refDestructuringErrors = new DestructuringErrors
+ ownDestructuringErrors = true
+ }
+ 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, refDestructuringErrors)
+ if (afterLeftParse) left = afterLeftParse.call(this, left, startPos, startLoc)
+ if (this.type.isAssign) {
+ this.checkPatternErrors(refDestructuringErrors, true)
+ if (!ownDestructuringErrors) DestructuringErrors.call(refDestructuringErrors)
+ var node = this.startNodeAt(startPos, startLoc)
+ node.operator = this.value
+ node.left = this.type === tt.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 (ownDestructuringErrors) this.checkExpressionErrors(refDestructuringErrors, true)
+ }
+ return left
+}
+
+// Parse a ternary conditional (`?:`) operator.
+
+pp$3.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(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$3.parseExprOps = function(noIn, refDestructuringErrors) {
+ var startPos = this.start, startLoc = this.startLoc
+ var expr = this.parseMaybeUnary(refDestructuringErrors, false)
+ 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$3.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, noIn) {
+ var prec = this.type.binop
+ if (prec != null && (!noIn || this.type !== tt._in)) {
+ if (prec > minPrec) {
+ var logical = this.type === tt.logicalOR || this.type === tt.logicalAND
+ var op = this.value
+ this.next()
+ var startPos = this.start, startLoc = this.startLoc
+ var right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, noIn)
+ var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical)
+ return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn)
+ }
+ }
+ return left
+}
+
+pp$3.buildBinary = function(startPos, startLoc, left, right, op, logical) {
+ var node = this.startNodeAt(startPos, startLoc)
+ node.left = left
+ node.operator = op
+ node.right = right
+ return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression")
+}
+
+// Parse unary operators, both prefix and postfix.
+
+pp$3.parseMaybeUnary = function(refDestructuringErrors, sawUnary) {
+ var this$1 = this;
+
+ var startPos = this.start, startLoc = this.startLoc, expr
+ 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(null, true)
+ this.checkExpressionErrors(refDestructuringErrors, true)
+ if (update) this.checkLVal(node.argument)
+ else if (this.strict && node.operator === "delete" &&
+ node.argument.type === "Identifier")
+ this.raiseRecoverable(node.start, "Deleting local variable in strict mode")
+ else sawUnary = true
+ expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression")
+ } else {
+ expr = this.parseExprSubscripts(refDestructuringErrors)
+ if (this.checkExpressionErrors(refDestructuringErrors)) return expr
+ while (this.type.postfix && !this.canInsertSemicolon()) {
+ var node$1 = this$1.startNodeAt(startPos, startLoc)
+ node$1.operator = this$1.value
+ node$1.prefix = false
+ node$1.argument = expr
+ this$1.checkLVal(expr)
+ this$1.next()
+ expr = this$1.finishNode(node$1, "UpdateExpression")
+ }
+ }
+
+ if (!sawUnary && this.eat(tt.starstar))
+ return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false), "**", false)
+ else
+ return expr
+}
+
+// Parse call, dot, and `[]`-subscript expressions.
+
+pp$3.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$3.parseSubscripts = function(base, startPos, startLoc, noCalls) {
+ var this$1 = this;
+
+ for (;;) {
+ if (this$1.eat(tt.dot)) {
+ var node = this$1.startNodeAt(startPos, startLoc)
+ node.object = base
+ node.property = this$1.parseIdent(true)
+ node.computed = false
+ base = this$1.finishNode(node, "MemberExpression")
+ } else if (this$1.eat(tt.bracketL)) {
+ var node$1 = this$1.startNodeAt(startPos, startLoc)
+ node$1.object = base
+ node$1.property = this$1.parseExpression()
+ node$1.computed = true
+ this$1.expect(tt.bracketR)
+ base = this$1.finishNode(node$1, "MemberExpression")
+ } else if (!noCalls && this$1.eat(tt.parenL)) {
+ var node$2 = this$1.startNodeAt(startPos, startLoc)
+ node$2.callee = base
+ node$2.arguments = this$1.parseExprList(tt.parenR, false)
+ base = this$1.finishNode(node$2, "CallExpression")
+ } else if (this$1.type === tt.backQuote) {
+ var node$3 = this$1.startNodeAt(startPos, startLoc)
+ node$3.tag = base
+ node$3.quasi = this$1.parseTemplate()
+ base = this$1.finishNode(node$3, "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$3.parseExprAtom = function(refDestructuringErrors) {
+ var node, canBeArrow = this.potentialArrowAt == this.start
+ switch (this.type) {
+ case tt._super:
+ if (!this.inFunction)
+ this.raise(this.start, "'super' outside of function or class")
+
+ case tt._this:
+ var type = this.type === tt._this ? "ThisExpression" : "Super"
+ node = this.startNode()
+ this.next()
+ return this.finishNode(node, type)
+
+ 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()
+ node.elements = this.parseExprList(tt.bracketR, true, true, refDestructuringErrors)
+ return this.finishNode(node, "ArrayExpression")
+
+ case tt.braceL:
+ return this.parseObj(false, refDestructuringErrors)
+
+ 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$3.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$3.parseParenExpression = function() {
+ this.expect(tt.parenL)
+ var val = this.parseExpression()
+ this.expect(tt.parenR)
+ return val
+}
+
+pp$3.parseParenAndDistinguishExpression = function(canBeArrow) {
+ var this$1 = this;
+
+ var startPos = this.start, startLoc = this.startLoc, val
+ if (this.options.ecmaVersion >= 6) {
+ this.next()
+
+ var innerStartPos = this.start, innerStartLoc = this.startLoc
+ var exprList = [], first = true
+ var refDestructuringErrors = new DestructuringErrors, spreadStart, innerParenStart
+ while (this.type !== tt.parenR) {
+ first ? first = false : this$1.expect(tt.comma)
+ if (this$1.type === tt.ellipsis) {
+ spreadStart = this$1.start
+ exprList.push(this$1.parseParenItem(this$1.parseRest()))
+ break
+ } else {
+ if (this$1.type === tt.parenL && !innerParenStart) {
+ innerParenStart = this$1.start
+ }
+ exprList.push(this$1.parseMaybeAssign(false, refDestructuringErrors, this$1.parseParenItem))
+ }
+ }
+ var innerEndPos = this.start, innerEndLoc = this.startLoc
+ this.expect(tt.parenR)
+
+ if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.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$3.parseParenItem = function(item) {
+ return item
+}
+
+pp$3.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$1 = []
+
+pp$3.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.raiseRecoverable(node.property.start, "The only valid meta property for new is new.target")
+ if (!this.inFunction)
+ this.raiseRecoverable(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(tt.parenL)) node.arguments = this.parseExprList(tt.parenR, false)
+ else node.arguments = empty$1
+ return this.finishNode(node, "NewExpression")
+}
+
+// Parse template expression.
+
+pp$3.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 === tt.backQuote
+ return this.finishNode(elem, "TemplateElement")
+}
+
+pp$3.parseTemplate = function() {
+ var this$1 = this;
+
+ var node = this.startNode()
+ this.next()
+ node.expressions = []
+ var curElt = this.parseTemplateElement()
+ node.quasis = [curElt]
+ while (!curElt.tail) {
+ this$1.expect(tt.dollarBraceL)
+ node.expressions.push(this$1.parseExpression())
+ this$1.expect(tt.braceR)
+ node.quasis.push(curElt = this$1.parseTemplateElement())
+ }
+ this.next()
+ return this.finishNode(node, "TemplateLiteral")
+}
+
+// Parse an object literal or binding pattern.
+
+pp$3.parseObj = function(isPattern, refDestructuringErrors) {
+ var this$1 = this;
+
+ var node = this.startNode(), first = true, propHash = {}
+ node.properties = []
+ this.next()
+ while (!this.eat(tt.braceR)) {
+ if (!first) {
+ this$1.expect(tt.comma)
+ if (this$1.afterTrailingComma(tt.braceR)) break
+ } else first = false
+
+ var prop = this$1.startNode(), isGenerator, startPos, startLoc
+ if (this$1.options.ecmaVersion >= 6) {
+ prop.method = false
+ prop.shorthand = false
+ if (isPattern || refDestructuringErrors) {
+ startPos = this$1.start
+ startLoc = this$1.startLoc
+ }
+ if (!isPattern)
+ isGenerator = this$1.eat(tt.star)
+ }
+ this$1.parsePropertyName(prop)
+ this$1.parsePropertyValue(prop, isPattern, isGenerator, startPos, startLoc, refDestructuringErrors)
+ this$1.checkPropClash(prop, propHash)
+ node.properties.push(this$1.finishNode(prop, "Property"))
+ }
+ return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression")
+}
+
+pp$3.parsePropertyValue = function(prop, isPattern, isGenerator, startPos, startLoc, refDestructuringErrors) {
+ if (this.eat(tt.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 === 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)
+ var paramCount = prop.kind === "get" ? 0 : 1
+ if (prop.value.params.length !== paramCount) {
+ var start = prop.value.start
+ if (prop.kind === "get")
+ this.raiseRecoverable(start, "getter should have no params")
+ else
+ this.raiseRecoverable(start, "setter should have exactly one param")
+ }
+ if (prop.kind === "set" && prop.value.params[0].type === "RestElement")
+ this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params")
+ } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") {
+ if (this.keywords.test(prop.key.name) ||
+ (this.strict ? this.reservedWordsStrictBind : this.reservedWords).test(prop.key.name) ||
+ (this.inGenerator && prop.key.name == "yield"))
+ this.raiseRecoverable(prop.key.start, "'" + prop.key.name + "' can not be used as shorthand property")
+ prop.kind = "init"
+ if (isPattern) {
+ prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key)
+ } else if (this.type === tt.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$3.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$3.initFunction = function(node) {
+ node.id = null
+ if (this.options.ecmaVersion >= 6) {
+ node.generator = false
+ node.expression = false
+ }
+}
+
+// Parse object or class method.
+
+pp$3.parseMethod = function(isGenerator) {
+ var node = this.startNode(), oldInGen = this.inGenerator
+ this.inGenerator = isGenerator
+ this.initFunction(node)
+ this.expect(tt.parenL)
+ node.params = this.parseBindingList(tt.parenR, false, false)
+ if (this.options.ecmaVersion >= 6)
+ node.generator = isGenerator
+ this.parseFunctionBody(node, false)
+ this.inGenerator = oldInGen
+ return this.finishNode(node, "FunctionExpression")
+}
+
+// Parse arrow function expression with given parameters.
+
+pp$3.parseArrowExpression = function(node, params) {
+ var oldInGen = this.inGenerator
+ this.inGenerator = false
+ this.initFunction(node)
+ node.params = this.toAssignableList(params, true)
+ this.parseFunctionBody(node, true)
+ this.inGenerator = oldInGen
+ return this.finishNode(node, "ArrowFunctionExpression")
+}
+
+// Parse function body and check parameters.
+
+pp$3.parseFunctionBody = function(node, isArrowFunction) {
+ var isExpression = isArrowFunction && 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, oldLabels = this.labels
+ this.inFunction = true; this.labels = []
+ node.body = this.parseBlock(true)
+ node.expression = false
+ this.inFunction = oldInFunc; 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`.
+ var useStrict = (!isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) ? node.body.body[0] : null;
+ if (this.strict || useStrict) {
+ var oldStrict = this.strict
+ this.strict = true
+ if (node.id)
+ this.checkLVal(node.id, true)
+ this.checkParams(node, useStrict)
+ this.strict = oldStrict
+ } else if (isArrowFunction) {
+ this.checkParams(node, useStrict)
+ }
+}
+
+// Checks function params for various disallowed patterns such as using "eval"
+// or "arguments" and duplicate parameters.
+
+pp$3.checkParams = function(node, useStrict) {
+ var this$1 = this;
+
+ var nameHash = {}
+ for (var i = 0; i < node.params.length; i++) {
+ if (useStrict && this$1.options.ecmaVersion >= 7 && node.params[i].type !== "Identifier")
+ this$1.raiseRecoverable(useStrict.start, "Illegal 'use strict' directive in function with non-simple parameter list");
+ this$1.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$3.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) {
+ var this$1 = this;
+
+ var elts = [], first = true
+ while (!this.eat(close)) {
+ if (!first) {
+ this$1.expect(tt.comma)
+ if (allowTrailingComma && this$1.afterTrailingComma(close)) break
+ } else first = false
+
+ var elt
+ if (allowEmpty && this$1.type === tt.comma)
+ elt = null
+ else if (this$1.type === tt.ellipsis) {
+ elt = this$1.parseSpread(refDestructuringErrors)
+ if (this$1.type === tt.comma && refDestructuringErrors && !refDestructuringErrors.trailingComma) {
+ refDestructuringErrors.trailingComma = this$1.lastTokStart
+ }
+ } else
+ elt = this$1.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$3.parseIdent = function(liberal) {
+ var node = this.startNode()
+ if (liberal && this.options.allowReserved == "never") liberal = false
+ if (this.type === tt.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.raiseRecoverable(this.start, "The keyword '" + this.value + "' is reserved")
+ if (!liberal && this.inGenerator && this.value === "yield")
+ this.raiseRecoverable(this.start, "Can not use 'yield' as identifier inside a generator")
+ 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$3.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")
+}
+
+var pp$4 = 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$4.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$4.raiseRecoverable = pp$4.raise
+
+pp$4.curPosition = function() {
+ if (this.options.locations) {
+ return new Position(this.curLine, this.pos - this.lineStart)
+ }
+}
+
+var Node = function Node(parser, pos, loc) {
+ this.type = ""
+ this.start = pos
+ this.end = 0
+ if (parser.options.locations)
+ this.loc = new 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.
+
+var pp$5 = Parser.prototype
+
+pp$5.startNode = function() {
+ return new Node(this, this.start, this.startLoc)
+}
+
+pp$5.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$5.finishNode = function(node, type) {
+ return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc)
+}
+
+// Finish node at given position
+
+pp$5.finishNodeAt = function(node, type, pos, loc) {
+ return finishNodeAt.call(this, node, type, pos, loc)
+}
+
+var TokContext = function TokContext(token, isExpr, preserveSpace, override) {
+ 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)
+}
+
+var pp$6 = Parser.prototype
+
+pp$6.initialContext = function() {
+ return [types.b_stat]
+}
+
+pp$6.braceIsBlock = function(prevType) {
+ if (prevType === tt.colon) {
+ var parent = this.curContext()
+ if (parent === types.b_stat || parent === types.b_expr)
+ 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 || prevType === tt.parenR)
+ return true
+ if (prevType == tt.braceL)
+ return this.curContext() === types.b_stat
+ return !this.exprAllowed
+}
+
+pp$6.updateContext = function(prevType) {
+ var update, 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() {
+ // tokExprAllowed stays unchanged
+}
+
+tt._function.updateContext = function(prevType) {
+ if (prevType.beforeExpr && prevType !== tt.semi && prevType !== tt._else &&
+ !((prevType === tt.colon || prevType === tt.braceL) && 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
+}
+
+// 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) {
+ 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$7 = 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$7.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$7.getToken = function() {
+ this.next()
+ return new Token(this)
+}
+
+// If we're in an ES6 environment, make parsers iterable
+if (typeof Symbol !== "undefined")
+ pp$7[Symbol.iterator] = function () {
+ var self = this
+ return {next: function () {
+ 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$7.setStrict = function(strict) {
+ var this$1 = this;
+
+ 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$1.lineStart = this$1.input.lastIndexOf("\n", this$1.lineStart - 2) + 1
+ --this$1.curLine
+ }
+ }
+ this.nextToken()
+}
+
+pp$7.curContext = function() {
+ return this.context[this.context.length - 1]
+}
+
+// Read a single token, updating the parser object's token-related
+// properties.
+
+pp$7.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$7.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$7.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$7.skipBlockComment = function() {
+ var this$1 = this;
+
+ 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) {
+ lineBreakG.lastIndex = start
+ var match
+ while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) {
+ ++this$1.curLine
+ this$1.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$7.skipLineComment = function(startSkip) {
+ var this$1 = this;
+
+ 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$1.pos
+ ch = this$1.input.charCodeAt(this$1.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$7.skipSpace = function() {
+ var this$1 = this;
+
+ loop: while (this.pos < this.input.length) {
+ var ch = this$1.input.charCodeAt(this$1.pos)
+ switch (ch) {
+ case 32: case 160: // ' '
+ ++this$1.pos
+ break
+ case 13:
+ if (this$1.input.charCodeAt(this$1.pos + 1) === 10) {
+ ++this$1.pos
+ }
+ case 10: case 8232: case 8233:
+ ++this$1.pos
+ if (this$1.options.locations) {
+ ++this$1.curLine
+ this$1.lineStart = this$1.pos
+ }
+ break
+ case 47: // '/'
+ switch (this$1.input.charCodeAt(this$1.pos + 1)) {
+ case 42: // '*'
+ this$1.skipBlockComment()
+ break
+ case 47:
+ this$1.skipLineComment(2)
+ break
+ default:
+ break loop
+ }
+ break
+ default:
+ if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) {
+ ++this$1.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$7.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$7.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$7.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$7.readToken_mult_modulo_exp = function(code) { // '%*'
+ var next = this.input.charCodeAt(this.pos + 1)
+ var size = 1
+ var tokentype = code === 42 ? tt.star : tt.modulo
+
+ // exponentiation operator ** and **=
+ if (this.options.ecmaVersion >= 7 && next === 42) {
+ ++size
+ tokentype = tt.starstar
+ next = this.input.charCodeAt(this.pos + 2)
+ }
+
+ if (next === 61) return this.finishOp(tt.assign, size + 1)
+ return this.finishOp(tokentype, size)
+}
+
+pp$7.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$7.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$7.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$7.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()
+ // `<!--`, an XML-style comment that should be interpreted as a line comment
+ this.skipLineComment(4)
+ this.skipSpace()
+ return this.nextToken()
+ }
+ if (next === 61) size = 2
+ return this.finishOp(tt.relational, size)
+}
+
+pp$7.readToken_eq_excl = function(code) { // '=!'
+ var next = this.input.charCodeAt(this.pos + 1)
+ if (next === 61) return this.finishOp(tt.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2)
+ if (code === 61 && next === 62 && this.options.ecmaVersion >= 6) { // '=>'
+ this.pos += 2
+ return this.finishToken(tt.arrow)
+ }
+ return this.finishOp(code === 61 ? tt.eq : tt.prefix, 1)
+}
+
+pp$7.getTokenFromCode = function(code) {
+ switch (code) {
+ // The interpretation of a dot depends on whether it is followed
+ // by a digit or another two dots.
+ case 46: // '.'
+ return this.readToken_dot()
+
+ // Punctuation tokens.
+ case 40: ++this.pos; return this.finishToken(tt.parenL)
+ case 41: ++this.pos; return this.finishToken(tt.parenR)
+ case 59: ++this.pos; return this.finishToken(tt.semi)
+ case 44: ++this.pos; return this.finishToken(tt.comma)
+ case 91: ++this.pos; return this.finishToken(tt.bracketL)
+ case 93: ++this.pos; return this.finishToken(tt.bracketR)
+ case 123: ++this.pos; return this.finishToken(tt.braceL)
+ case 125: ++this.pos; return this.finishToken(tt.braceR)
+ case 58: ++this.pos; return this.finishToken(tt.colon)
+ case 63: ++this.pos; return this.finishToken(tt.question)
+
+ case 96: // '`'
+ if (this.options.ecmaVersion < 6) break
+ ++this.pos
+ return this.finishToken(tt.backQuote)
+
+ case 48: // '0'
+ var next = this.input.charCodeAt(this.pos + 1)
+ if (next === 120 || next === 88) return this.readRadixNumber(16) // '0x', '0X' - hex number
+ if (this.options.ecmaVersion >= 6) {
+ if (next === 111 || next === 79) return this.readRadixNumber(8) // '0o', '0O' - octal number
+ if (next === 98 || next === 66) return this.readRadixNumber(2) // '0b', '0B' - binary number
+ }
+ // Anything else beginning with a digit is an integer, octal
+ // number, or float.
+ case 49: case 50: case 51: case 52: case 53: case 54: case 55: case 56: case 57: // 1-9
+ return this.readNumber(false)
+
+ // Quotes produce strings.
+ case 34: case 39: // '"', "'"
+ return this.readString(code)
+
+ // Operators are parsed inline in tiny state machines. '=' (61) is
+ // often referred to. `finishOp` simply skips the amount of
+ // characters it is given as second argument, and returns a token
+ // of the type given by its first argument.
+
+ case 47: // '/'
+ return this.readToken_slash()
+
+ case 37: case 42: // '%*'
+ return this.readToken_mult_modulo_exp(code)
+
+ case 124: case 38: // '|&'
+ return this.readToken_pipe_amp(code)
+
+ case 94: // '^'
+ return this.readToken_caret()
+
+ case 43: case 45: // '+-'
+ return this.readToken_plus_min(code)
+
+ case 60: case 62: // '<>'
+ return this.readToken_lt_gt(code)
+
+ case 61: case 33: // '=!'
+ return this.readToken_eq_excl(code)
+
+ case 126: // '~'
+ return this.finishOp(tt.prefix, 1)
+ }
+
+ this.raise(this.pos, "Unexpected character '" + codePointToString(code) + "'")
+}
+
+pp$7.finishOp = function(type, size) {
+ var str = this.input.slice(this.pos, this.pos + size)
+ this.pos += size
+ return this.finishToken(type, str)
+}
+
+// Parse a regular expression. Some context-awareness is necessary,
+// since a '/' inside a '[]' set does not end the expression.
+
+function tryCreateRegexp(src, flags, throwErrorAt, parser) {
+ try {
+ return new RegExp(src, flags)
+ } catch (e) {
+ if (throwErrorAt !== undefined) {
+ if (e instanceof SyntaxError) parser.raise(throwErrorAt, "Error parsing regular expression: " + e.message)
+ throw e
+ }
+ }
+}
+
+var regexpUnicodeSupport = !!tryCreateRegexp("\uffff", "u")
+
+pp$7.readRegexp = function() {
+ var this$1 = this;
+
+ var escaped, inClass, start = this.pos
+ for (;;) {
+ if (this$1.pos >= this$1.input.length) this$1.raise(start, "Unterminated regular expression")
+ var ch = this$1.input.charAt(this$1.pos)
+ if (lineBreak.test(ch)) this$1.raise(start, "Unterminated regular expression")
+ if (!escaped) {
+ if (ch === "[") inClass = true
+ else if (ch === "]" && inClass) inClass = false
+ else if (ch === "/" && !inClass) break
+ escaped = ch === "\\"
+ } else escaped = false
+ ++this$1.pos
+ }
+ var content = this.input.slice(start, this.pos)
+ ++this.pos
+ // Need to use `readWord1` because '\uXXXX' sequences are allowed
+ // here (don't ask).
+ var mods = this.readWord1()
+ var tmp = content, tmpFlags = ""
+ if (mods) {
+ var validFlags = /^[gim]*$/
+ if (this.options.ecmaVersion >= 6) validFlags = /^[gimuy]*$/
+ if (!validFlags.test(mods)) this.raise(start, "Invalid regular expression flag")
+ if (mods.indexOf("u") >= 0) {
+ if (regexpUnicodeSupport) {
+ tmpFlags = "u"
+ } else {
+ // Replace each astral symbol and every Unicode escape sequence that
+ // possibly represents an astral symbol or a paired surrogate with a
+ // single ASCII symbol to avoid throwing on regular expressions that
+ // are only valid in combination with the `/u` flag.
+ // Note: replacing with the ASCII symbol `x` might cause false
+ // negatives in unlikely scenarios. For example, `[\u{61}-b]` is a
+ // perfectly valid pattern that is equivalent to `[a-b]`, but it would
+ // be replaced by `[x-b]` which throws an error.
+ tmp = tmp.replace(/\\u\{([0-9a-fA-F]+)\}/g, function (_match, code, offset) {
+ code = Number("0x" + code)
+ if (code > 0x10FFFF) this$1.raise(start + offset + 3, "Code point out of bounds")
+ return "x"
+ })
+ tmp = tmp.replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "x")
+ tmpFlags = tmpFlags.replace("u", "")
+ }
+ }
+ }
+ // Detect invalid regular expressions.
+ var value = null
+ // Rhino's regular expression parser is flaky and throws uncatchable exceptions,
+ // so don't do detection if we are running under Rhino
+ if (!isRhino) {
+ tryCreateRegexp(tmp, tmpFlags, start, this)
+ // Get a regular expression object for this pattern-flag pair, or `null` in
+ // case the current environment doesn't support the flags it uses.
+ value = tryCreateRegexp(content, mods)
+ }
+ return this.finishToken(tt.regexp, {pattern: content, flags: mods, value: value})
+}
+
+// Read an integer in the given radix. Return null if zero digits
+// were read, the integer value otherwise. When `len` is given, this
+// will return `null` unless the integer has exactly `len` digits.
+
+pp$7.readInt = function(radix, len) {
+ var this$1 = this;
+
+ var start = this.pos, total = 0
+ for (var i = 0, e = len == null ? Infinity : len; i < e; ++i) {
+ var code = this$1.input.charCodeAt(this$1.pos), val
+ if (code >= 97) val = code - 97 + 10 // a
+ else if (code >= 65) val = code - 65 + 10 // A
+ else if (code >= 48 && code <= 57) val = code - 48 // 0-9
+ else val = Infinity
+ if (val >= radix) break
+ ++this$1.pos
+ total = total * radix + val
+ }
+ if (this.pos === start || len != null && this.pos - start !== len) return null
+
+ return total
+}
+
+pp$7.readRadixNumber = function(radix) {
+ this.pos += 2 // 0x
+ var val = this.readInt(radix)
+ if (val == null) this.raise(this.start + 2, "Expected number in radix " + radix)
+ if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number")
+ return this.finishToken(tt.num, val)
+}
+
+// Read an integer, octal integer, or floating-point number.
+
+pp$7.readNumber = function(startsWithDot) {
+ var start = this.pos, isFloat = false, octal = this.input.charCodeAt(this.pos) === 48
+ if (!startsWithDot && this.readInt(10) === null) this.raise(start, "Invalid number")
+ var next = this.input.charCodeAt(this.pos)
+ if (next === 46) { // '.'
+ ++this.pos
+ this.readInt(10)
+ isFloat = true
+ next = this.input.charCodeAt(this.pos)
+ }
+ if (next === 69 || next === 101) { // 'eE'
+ next = this.input.charCodeAt(++this.pos)
+ if (next === 43 || next === 45) ++this.pos // '+-'
+ if (this.readInt(10) === null) this.raise(start, "Invalid number")
+ isFloat = true
+ }
+ if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number")
+
+ var str = this.input.slice(start, this.pos), val
+ if (isFloat) val = parseFloat(str)
+ else if (!octal || str.length === 1) val = parseInt(str, 10)
+ else if (/[89]/.test(str) || this.strict) this.raise(start, "Invalid number")
+ else val = parseInt(str, 8)
+ return this.finishToken(tt.num, val)
+}
+
+// Read a string value, interpreting backslash-escapes.
+
+pp$7.readCodePoint = function() {
+ var ch = this.input.charCodeAt(this.pos), code
+
+ if (ch === 123) {
+ if (this.options.ecmaVersion < 6) this.unexpected()
+ var codePos = ++this.pos
+ code = this.readHexChar(this.input.indexOf('}', this.pos) - this.pos)
+ ++this.pos
+ if (code > 0x10FFFF) this.raise(codePos, "Code point out of bounds")
+ } else {
+ code = this.readHexChar(4)
+ }
+ return code
+}
+
+function codePointToString(code) {
+ // UTF-16 Decoding
+ if (code <= 0xFFFF) return String.fromCharCode(code)
+ code -= 0x10000
+ return String.fromCharCode((code >> 10) + 0xD800, (code & 1023) + 0xDC00)
+}
+
+pp$7.readString = function(quote) {
+ var this$1 = this;
+
+ var out = "", chunkStart = ++this.pos
+ for (;;) {
+ if (this$1.pos >= this$1.input.length) this$1.raise(this$1.start, "Unterminated string constant")
+ var ch = this$1.input.charCodeAt(this$1.pos)
+ if (ch === quote) break
+ if (ch === 92) { // '\'
+ out += this$1.input.slice(chunkStart, this$1.pos)
+ out += this$1.readEscapedChar(false)
+ chunkStart = this$1.pos
+ } else {
+ if (isNewLine(ch)) this$1.raise(this$1.start, "Unterminated string constant")
+ ++this$1.pos
+ }
+ }
+ out += this.input.slice(chunkStart, this.pos++)
+ return this.finishToken(tt.string, out)
+}
+
+// Reads template string tokens.
+
+pp$7.readTmplToken = function() {
+ var this$1 = this;
+
+ var out = "", chunkStart = this.pos
+ for (;;) {
+ if (this$1.pos >= this$1.input.length) this$1.raise(this$1.start, "Unterminated template")
+ var ch = this$1.input.charCodeAt(this$1.pos)
+ if (ch === 96 || ch === 36 && this$1.input.charCodeAt(this$1.pos + 1) === 123) { // '`', '${'
+ if (this$1.pos === this$1.start && this$1.type === tt.template) {
+ if (ch === 36) {
+ this$1.pos += 2
+ return this$1.finishToken(tt.dollarBraceL)
+ } else {
+ ++this$1.pos
+ return this$1.finishToken(tt.backQuote)
+ }
+ }
+ out += this$1.input.slice(chunkStart, this$1.pos)
+ return this$1.finishToken(tt.template, out)
+ }
+ if (ch === 92) { // '\'
+ out += this$1.input.slice(chunkStart, this$1.pos)
+ out += this$1.readEscapedChar(true)
+ chunkStart = this$1.pos
+ } else if (isNewLine(ch)) {
+ out += this$1.input.slice(chunkStart, this$1.pos)
+ ++this$1.pos
+ switch (ch) {
+ case 13:
+ if (this$1.input.charCodeAt(this$1.pos) === 10) ++this$1.pos
+ case 10:
+ out += "\n"
+ break
+ default:
+ out += String.fromCharCode(ch)
+ break
+ }
+ if (this$1.options.locations) {
+ ++this$1.curLine
+ this$1.lineStart = this$1.pos
+ }
+ chunkStart = this$1.pos
+ } else {
+ ++this$1.pos
+ }
+ }
+}
+
+// Used to read escaped characters
+
+pp$7.readEscapedChar = function(inTemplate) {
+ var ch = this.input.charCodeAt(++this.pos)
+ ++this.pos
+ switch (ch) {
+ case 110: return "\n" // 'n' -> '\n'
+ case 114: return "\r" // 'r' -> '\r'
+ case 120: return String.fromCharCode(this.readHexChar(2)) // 'x'
+ case 117: return codePointToString(this.readCodePoint()) // 'u'
+ case 116: return "\t" // 't' -> '\t'
+ case 98: return "\b" // 'b' -> '\b'
+ case 118: return "\u000b" // 'v' -> '\u000b'
+ case 102: return "\f" // 'f' -> '\f'
+ case 13: if (this.input.charCodeAt(this.pos) === 10) ++this.pos // '\r\n'
+ case 10: // ' \n'
+ if (this.options.locations) { this.lineStart = this.pos; ++this.curLine }
+ return ""
+ default:
+ if (ch >= 48 && ch <= 55) {
+ var octalStr = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0]
+ var octal = parseInt(octalStr, 8)
+ if (octal > 255) {
+ octalStr = octalStr.slice(0, -1)
+ octal = parseInt(octalStr, 8)
+ }
+ if (octalStr !== "0" && (this.strict || inTemplate)) {
+ this.raise(this.pos - 2, "Octal literal in strict mode")
+ }
+ this.pos += octalStr.length - 1
+ return String.fromCharCode(octal)
+ }
+ return String.fromCharCode(ch)
+ }
+}
+
+// Used to read character escape sequences ('\x', '\u', '\U').
+
+pp$7.readHexChar = function(len) {
+ var codePos = this.pos
+ var n = this.readInt(16, len)
+ if (n === null) this.raise(codePos, "Bad character escape sequence")
+ return n
+}
+
+// Read an identifier, and return it as a string. Sets `this.containsEsc`
+// to whether the word contained a '\u' escape.
+//
+// Incrementally adds only escaped chars, adding other chunks as-is
+// as a micro-optimization.
+
+pp$7.readWord1 = function() {
+ var this$1 = this;
+
+ this.containsEsc = false
+ var word = "", first = true, chunkStart = this.pos
+ var astral = this.options.ecmaVersion >= 6
+ while (this.pos < this.input.length) {
+ var ch = this$1.fullCharCodeAtPos()
+ if (isIdentifierChar(ch, astral)) {
+ this$1.pos += ch <= 0xffff ? 1 : 2
+ } else if (ch === 92) { // "\"
+ this$1.containsEsc = true
+ word += this$1.input.slice(chunkStart, this$1.pos)
+ var escStart = this$1.pos
+ if (this$1.input.charCodeAt(++this$1.pos) != 117) // "u"
+ this$1.raise(this$1.pos, "Expecting Unicode escape sequence \\uXXXX")
+ ++this$1.pos
+ var esc = this$1.readCodePoint()
+ if (!(first ? isIdentifierStart : isIdentifierChar)(esc, astral))
+ this$1.raise(escStart, "Invalid Unicode escape")
+ word += codePointToString(esc)
+ chunkStart = this$1.pos
+ } else {
+ break
+ }
+ first = false
+ }
+ return word + this.input.slice(chunkStart, this.pos)
+}
+
+// Read an identifier or keyword token. Will check for reserved
+// words when necessary.
+
+pp$7.readWord = function() {
+ var word = this.readWord1()
+ var type = tt.name
+ if ((this.options.ecmaVersion >= 6 || !this.containsEsc) && this.keywords.test(word))
+ type = keywordTypes[word]
+ return this.finishToken(type, word)
+}
+
+var version = "3.3.0"
+
+// 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 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 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 Parser(options, input)
+}
+
+export { version, parse, parseExpressionAt, tokenizer, Parser, plugins, defaultOptions, Position, SourceLocation, getLineInfo, Node, TokenType, tt as tokTypes, TokContext, types as tokContexts, isIdentifierChar, isIdentifierStart, Token, isNewLine, lineBreak, lineBreakG }; \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn.js b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn.js
new file mode 100644
index 0000000000..127dfb2da7
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn.js
@@ -0,0 +1,3142 @@
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
+ typeof define === 'function' && define.amd ? define(['exports'], factory) :
+ (factory((global.acorn = global.acorn || {})));
+}(this, function (exports) { 'use strict';
+
+ // Reserved word lists for various dialects of the language
+
+ 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",
+ 7: "enum",
+ strict: "implements interface let package private protected public static yield",
+ strictBind: "eval arguments"
+ }
+
+ // 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 + " const class extends export import super"
+ }
+
+ // ## 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 = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fd5\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ae\ua7b0-\ua7b7\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab65\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"
+ var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d4-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d01-\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1cf8\u1cf9\u1dc0-\u1df5\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua900-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f"
+
+ 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 bin/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,19,35,5,35,5,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,66,18,2,1,11,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,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,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,60,67,1213,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,3,5761,10591,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,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,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,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,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)
+ }
+
+ // ## Token types
+
+ // The assignment of fine-grained, information-carrying type objects
+ // allows the tokenizer to store the information it has about a
+ // token in a way that is very cheap for the parser to look up.
+
+ // All token type variables start with an underscore, to make them
+ // easy to recognize.
+
+ // The `beforeExpr` property is used to disambiguate between regular
+ // expressions and divisions. It is set on all token types that can
+ // be followed by an expression (thus, a slash after them would be a
+ // regular expression).
+ //
+ // The `startsExpr` property is used to check if the token ends a
+ // `yield` expression. It is set on all token types that either can
+ // directly start an expression (like a quotation mark) or can
+ // continue an expression (like the body of a string).
+ //
+ // `isLoop` marks a keyword as starting a loop, which is important
+ // to know when parsing a label, in order to allow or disallow
+ // continue jumps to that label.
+
+ var TokenType = function TokenType(label, conf) {
+ if ( conf === void 0 ) conf = {};
+
+ this.label = label
+ this.keyword = conf.keyword
+ this.beforeExpr = !!conf.beforeExpr
+ this.startsExpr = !!conf.startsExpr
+ this.isLoop = !!conf.isLoop
+ this.isAssign = !!conf.isAssign
+ this.prefix = !!conf.prefix
+ this.postfix = !!conf.postfix
+ this.binop = conf.binop || null
+ this.updateContext = null
+ };
+
+ function binop(name, prec) {
+ return new TokenType(name, {beforeExpr: true, binop: prec})
+ }
+ var beforeExpr = {beforeExpr: true};
+ var startsExpr = {startsExpr: true};
+ // Map keyword names to token types.
+
+ var keywordTypes = {}
+
+ // Succinct definitions of keyword token types
+ function kw(name, options) {
+ if ( options === void 0 ) options = {};
+
+ options.keyword = name
+ return keywordTypes[name] = new TokenType(name, options)
+ }
+
+ var tt = {
+ num: new TokenType("num", startsExpr),
+ regexp: new TokenType("regexp", startsExpr),
+ string: new TokenType("string", startsExpr),
+ name: new TokenType("name", startsExpr),
+ eof: new TokenType("eof"),
+
+ // Punctuation token types.
+ bracketL: new TokenType("[", {beforeExpr: true, startsExpr: true}),
+ bracketR: new TokenType("]"),
+ braceL: new TokenType("{", {beforeExpr: true, startsExpr: true}),
+ braceR: new TokenType("}"),
+ parenL: new TokenType("(", {beforeExpr: true, startsExpr: true}),
+ parenR: new TokenType(")"),
+ comma: new TokenType(",", beforeExpr),
+ semi: new TokenType(";", beforeExpr),
+ colon: new TokenType(":", beforeExpr),
+ dot: new TokenType("."),
+ question: new TokenType("?", beforeExpr),
+ arrow: new TokenType("=>", beforeExpr),
+ template: new TokenType("template"),
+ ellipsis: new TokenType("...", beforeExpr),
+ backQuote: new TokenType("`", startsExpr),
+ dollarBraceL: new TokenType("${", {beforeExpr: true, startsExpr: true}),
+
+ // Operators. These carry several kinds of properties to help the
+ // parser use them properly (the presence of these properties is
+ // what categorizes them as operators).
+ //
+ // `binop`, when present, specifies that this operator is a binary
+ // operator, and will refer to its precedence.
+ //
+ // `prefix` and `postfix` mark the operator as a prefix or postfix
+ // unary operator.
+ //
+ // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as
+ // binary operators with a very low precedence, that should result
+ // in AssignmentExpression nodes.
+
+ eq: new TokenType("=", {beforeExpr: true, isAssign: true}),
+ assign: new TokenType("_=", {beforeExpr: true, isAssign: true}),
+ incDec: new TokenType("++/--", {prefix: true, postfix: true, startsExpr: true}),
+ prefix: new TokenType("prefix", {beforeExpr: true, prefix: true, startsExpr: true}),
+ logicalOR: binop("||", 1),
+ logicalAND: binop("&&", 2),
+ bitwiseOR: binop("|", 3),
+ bitwiseXOR: binop("^", 4),
+ bitwiseAND: binop("&", 5),
+ equality: binop("==/!=", 6),
+ relational: binop("</>", 7),
+ bitShift: binop("<</>>", 8),
+ plusMin: new TokenType("+/-", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}),
+ modulo: binop("%", 10),
+ star: binop("*", 10),
+ slash: binop("/", 10),
+ starstar: new TokenType("**", {beforeExpr: true}),
+
+ // Keyword token types.
+ _break: kw("break"),
+ _case: kw("case", beforeExpr),
+ _catch: kw("catch"),
+ _continue: kw("continue"),
+ _debugger: kw("debugger"),
+ _default: kw("default", beforeExpr),
+ _do: kw("do", {isLoop: true, beforeExpr: true}),
+ _else: kw("else", beforeExpr),
+ _finally: kw("finally"),
+ _for: kw("for", {isLoop: true}),
+ _function: kw("function", startsExpr),
+ _if: kw("if"),
+ _return: kw("return", beforeExpr),
+ _switch: kw("switch"),
+ _throw: kw("throw", beforeExpr),
+ _try: kw("try"),
+ _var: kw("var"),
+ _const: kw("const"),
+ _while: kw("while", {isLoop: true}),
+ _with: kw("with"),
+ _new: kw("new", {beforeExpr: true, startsExpr: true}),
+ _this: kw("this", startsExpr),
+ _super: kw("super", startsExpr),
+ _class: kw("class"),
+ _extends: kw("extends", beforeExpr),
+ _export: kw("export"),
+ _import: kw("import"),
+ _null: kw("null", startsExpr),
+ _true: kw("true", startsExpr),
+ _false: kw("false", startsExpr),
+ _in: kw("in", {beforeExpr: true, binop: 7}),
+ _instanceof: kw("instanceof", {beforeExpr: true, binop: 7}),
+ _typeof: kw("typeof", {beforeExpr: true, prefix: true, startsExpr: true}),
+ _void: kw("void", {beforeExpr: true, prefix: true, startsExpr: true}),
+ _delete: kw("delete", {beforeExpr: true, prefix: true, startsExpr: true})
+ }
+
+ // Matches a whole line break (where CRLF is considered a single
+ // line break). Used to count lines.
+
+ var lineBreak = /\r\n?|\n|\u2028|\u2029/
+ var lineBreakG = new RegExp(lineBreak.source, "g")
+
+ function isNewLine(code) {
+ return code === 10 || code === 13 || code === 0x2028 || code == 0x2029
+ }
+
+ var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/
+
+ var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g
+
+ function isArray(obj) {
+ return Object.prototype.toString.call(obj) === "[object Array]"
+ }
+
+ // Checks if an object has a property.
+
+ function has(obj, propName) {
+ return Object.prototype.hasOwnProperty.call(obj, propName)
+ }
+
+ // These are used when `options.locations` is on, for the
+ // `startLoc` and `endLoc` properties.
+
+ var Position = function Position(line, col) {
+ this.line = line
+ this.column = col
+ };
+
+ Position.prototype.offset = function offset (n) {
+ return new Position(this.line, this.column + n)
+ };
+
+ var SourceLocation = function SourceLocation(p, start, end) {
+ 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.
+
+ 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)
+ }
+ }
+ }
+
+ // 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. The default is 6.
+ ecmaVersion: 6,
+ // 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: {}
+ }
+
+ // Interpret and default an options object
+
+ function getOptions(opts) {
+ var options = {}
+ for (var opt in defaultOptions)
+ options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt]
+ if (options.allowReserved == null)
+ options.allowReserved = options.ecmaVersion < 5
+
+ if (isArray(options.onToken)) {
+ 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)
+ }
+ }
+
+ // Registered plugins
+ var plugins = {}
+
+ function keywordRegexp(words) {
+ return new RegExp("^(" + words.replace(/ /g, "|") + ")$")
+ }
+
+ var Parser = function Parser(options, input, startPos) {
+ this.options = options = getOptions(options)
+ this.sourceFile = options.sourceFile
+ this.keywords = keywordRegexp(keywords[options.ecmaVersion >= 6 ? 6 : 5])
+ var reserved = options.allowReserved ? "" :
+ reservedWords[options.ecmaVersion] + (options.sourceType == "module" ? " await" : "")
+ this.reservedWords = keywordRegexp(reserved)
+ var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict
+ this.reservedWordsStrict = keywordRegexp(reservedStrict)
+ this.reservedWordsStrictBind = keywordRegexp(reservedStrict + " " + 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(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 = 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) {
+ var this$1 = this;
+
+ for (var name in pluginConfigs) {
+ var plugin = plugins[name]
+ if (!plugin) throw new Error("Plugin '" + name + "' not found")
+ plugin(this$1, pluginConfigs[name])
+ }
+ };
+
+ Parser.prototype.parse = function parse () {
+ var node = this.options.program || this.startNode()
+ this.nextToken()
+ return this.parseTopLevel(node)
+ };
+
+ 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.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 === 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")
+ }
+
+ var DestructuringErrors = function DestructuringErrors() {
+ this.shorthandAssign = 0
+ this.trailingComma = 0
+ };
+
+ pp.checkPatternErrors = function(refDestructuringErrors, andThrow) {
+ var trailing = refDestructuringErrors && refDestructuringErrors.trailingComma
+ if (!andThrow) return !!trailing
+ if (trailing) this.raise(trailing, "Comma is not permitted after the rest element")
+ }
+
+ 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")
+ }
+
+ var pp$1 = 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$1.parseTopLevel = function(node) {
+ var this$1 = this;
+
+ var first = true
+ if (!node.body) node.body = []
+ while (this.type !== tt.eof) {
+ var stmt = this$1.parseStatement(true, true)
+ node.body.push(stmt)
+ if (first) {
+ if (this$1.isUseStrict(stmt)) this$1.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"};
+ var switchLabel = {kind: "switch"};
+ pp$1.isLet = function() {
+ if (this.type !== tt.name || this.options.ecmaVersion < 6 || this.value != "let") return false
+ skipWhiteSpace.lastIndex = this.pos
+ var skip = skipWhiteSpace.exec(this.input)
+ var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next)
+ if (nextCh === 91 || nextCh == 123) return true // '{' and '['
+ if (isIdentifierStart(nextCh, true)) {
+ for (var pos = next + 1; isIdentifierChar(this.input.charCodeAt(pos), true); ++pos) {}
+ var ident = this.input.slice(next, pos)
+ if (!this.isKeyword(ident)) return true
+ }
+ return false
+ }
+
+ // 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$1.parseStatement = function(declaration, topLevel) {
+ var starttype = this.type, node = this.startNode(), kind
+
+ if (this.isLet()) {
+ starttype = tt._var
+ kind = "let"
+ }
+
+ // 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._const: case tt._var:
+ kind = kind || this.value
+ if (!declaration && kind != "var") this.unexpected()
+ return this.parseVarStatement(node, kind)
+ 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$1.parseBreakContinueStatement = function(node, keyword) {
+ var this$1 = this;
+
+ 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$1.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$1.parseDebuggerStatement = function(node) {
+ this.next()
+ this.semicolon()
+ return this.finishNode(node, "DebuggerStatement")
+ }
+
+ pp$1.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$1.parseForStatement = function(node) {
+ this.next()
+ this.labels.push(loopLabel)
+ this.expect(tt.parenL)
+ if (this.type === tt.semi) return this.parseFor(node, null)
+ var isLet = this.isLet()
+ if (this.type === tt._var || this.type === tt._const || isLet) {
+ var init$1 = this.startNode(), kind = isLet ? "let" : this.value
+ this.next()
+ this.parseVar(init$1, true, kind)
+ this.finishNode(init$1, "VariableDeclaration")
+ if ((this.type === tt._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) && init$1.declarations.length === 1 &&
+ !(kind !== "var" && init$1.declarations[0].init))
+ return this.parseForIn(node, init$1)
+ return this.parseFor(node, init$1)
+ }
+ var refDestructuringErrors = new DestructuringErrors
+ var init = this.parseExpression(true, refDestructuringErrors)
+ if (this.type === tt._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$1.parseFunctionStatement = function(node) {
+ this.next()
+ return this.parseFunction(node, true)
+ }
+
+ pp$1.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$1.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$1.parseSwitchStatement = function(node) {
+ var this$1 = this;
+
+ 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 = false; this.type != tt.braceR;) {
+ if (this$1.type === tt._case || this$1.type === tt._default) {
+ var isCase = this$1.type === tt._case
+ if (cur) this$1.finishNode(cur, "SwitchCase")
+ node.cases.push(cur = this$1.startNode())
+ cur.consequent = []
+ this$1.next()
+ if (isCase) {
+ cur.test = this$1.parseExpression()
+ } else {
+ if (sawDefault) this$1.raiseRecoverable(this$1.lastTokStart, "Multiple default clauses")
+ sawDefault = true
+ cur.test = null
+ }
+ this$1.expect(tt.colon)
+ } else {
+ if (!cur) this$1.unexpected()
+ cur.consequent.push(this$1.parseStatement(true))
+ }
+ }
+ if (cur) this.finishNode(cur, "SwitchCase")
+ this.next() // Closing brace
+ this.labels.pop()
+ return this.finishNode(node, "SwitchStatement")
+ }
+
+ pp$1.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$1.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.body = this.parseBlock()
+ node.handler = this.finishNode(clause, "CatchClause")
+ }
+ 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$1.parseVarStatement = function(node, kind) {
+ this.next()
+ this.parseVar(node, false, kind)
+ this.semicolon()
+ return this.finishNode(node, "VariableDeclaration")
+ }
+
+ pp$1.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$1.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$1.parseEmptyStatement = function(node) {
+ this.next()
+ return this.finishNode(node, "EmptyStatement")
+ }
+
+ pp$1.parseLabeledStatement = function(node, maybeName, expr) {
+ var this$1 = this;
+
+ for (var i = 0; i < this.labels.length; ++i)
+ if (this$1.labels[i].name === maybeName) this$1.raise(expr.start, "Label '" + maybeName + "' is already declared")
+ var kind = this.type.isLoop ? "loop" : this.type === tt._switch ? "switch" : null
+ for (var i$1 = this.labels.length - 1; i$1 >= 0; i$1--) {
+ var label = this$1.labels[i$1]
+ if (label.statementStart == node.start) {
+ label.statementStart = this$1.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$1.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$1.parseBlock = function(allowStrict) {
+ var this$1 = this;
+
+ var node = this.startNode(), first = true, oldStrict
+ node.body = []
+ this.expect(tt.braceL)
+ while (!this.eat(tt.braceR)) {
+ var stmt = this$1.parseStatement(true)
+ node.body.push(stmt)
+ if (first && allowStrict && this$1.isUseStrict(stmt)) {
+ oldStrict = this$1.strict
+ this$1.setStrict(this$1.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$1.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$1.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$1.parseVar = function(node, isFor, kind) {
+ var this$1 = this;
+
+ node.declarations = []
+ node.kind = kind
+ for (;;) {
+ var decl = this$1.startNode()
+ this$1.parseVarId(decl)
+ if (this$1.eat(tt.eq)) {
+ decl.init = this$1.parseMaybeAssign(isFor)
+ } else if (kind === "const" && !(this$1.type === tt._in || (this$1.options.ecmaVersion >= 6 && this$1.isContextual("of")))) {
+ this$1.unexpected()
+ } else if (decl.id.type != "Identifier" && !(isFor && (this$1.type === tt._in || this$1.isContextual("of")))) {
+ this$1.raise(this$1.lastTokEnd, "Complex binding patterns require an initialization value")
+ } else {
+ decl.init = null
+ }
+ node.declarations.push(this$1.finishNode(decl, "VariableDeclarator"))
+ if (!this$1.eat(tt.comma)) break
+ }
+ return node
+ }
+
+ pp$1.parseVarId = function(decl) {
+ decl.id = this.parseBindingAtom()
+ this.checkLVal(decl.id, true)
+ }
+
+ // Parse a function declaration or literal (depending on the
+ // `isStatement` parameter).
+
+ pp$1.parseFunction = function(node, isStatement, allowExpressionBody) {
+ this.initFunction(node)
+ if (this.options.ecmaVersion >= 6)
+ node.generator = this.eat(tt.star)
+ var oldInGen = this.inGenerator
+ this.inGenerator = node.generator
+ if (isStatement || this.type === tt.name)
+ node.id = this.parseIdent()
+ this.parseFunctionParams(node)
+ this.parseFunctionBody(node, allowExpressionBody)
+ this.inGenerator = oldInGen
+ return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression")
+ }
+
+ pp$1.parseFunctionParams = function(node) {
+ this.expect(tt.parenL)
+ node.params = this.parseBindingList(tt.parenR, false, false, true)
+ }
+
+ // Parse a class declaration or literal (depending on the
+ // `isStatement` parameter).
+
+ pp$1.parseClass = function(node, isStatement) {
+ var this$1 = this;
+
+ 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$1.eat(tt.semi)) continue
+ var method = this$1.startNode()
+ var isGenerator = this$1.eat(tt.star)
+ var isMaybeStatic = this$1.type === tt.name && this$1.value === "static"
+ this$1.parsePropertyName(method)
+ method.static = isMaybeStatic && this$1.type !== tt.parenL
+ if (method.static) {
+ if (isGenerator) this$1.unexpected()
+ isGenerator = this$1.eat(tt.star)
+ this$1.parsePropertyName(method)
+ }
+ method.kind = "method"
+ var isGetSet = false
+ if (!method.computed) {
+ var key = method.key;
+ if (!isGenerator && key.type === "Identifier" && this$1.type !== tt.parenL && (key.name === "get" || key.name === "set")) {
+ isGetSet = true
+ method.kind = key.name
+ key = this$1.parsePropertyName(method)
+ }
+ if (!method.static && (key.type === "Identifier" && key.name === "constructor" ||
+ key.type === "Literal" && key.value === "constructor")) {
+ if (hadConstructor) this$1.raise(key.start, "Duplicate constructor in the same class")
+ if (isGetSet) this$1.raise(key.start, "Constructor can't have get/set modifier")
+ if (isGenerator) this$1.raise(key.start, "Constructor can't be a generator")
+ method.kind = "constructor"
+ hadConstructor = true
+ }
+ }
+ this$1.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$1.raiseRecoverable(start, "getter should have no params")
+ else
+ this$1.raiseRecoverable(start, "setter should have exactly one param")
+ }
+ if (method.kind === "set" && method.value.params[0].type === "RestElement")
+ this$1.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$1.parseClassMethod = function(classBody, method, isGenerator) {
+ method.value = this.parseMethod(isGenerator)
+ classBody.body.push(this.finishNode(method, "MethodDefinition"))
+ }
+
+ pp$1.parseClassId = function(node, isStatement) {
+ node.id = this.type === tt.name ? this.parseIdent() : isStatement ? this.unexpected() : null
+ }
+
+ pp$1.parseClassSuper = function(node) {
+ node.superClass = this.eat(tt._extends) ? this.parseExprSubscripts() : null
+ }
+
+ // Parses module export declaration.
+
+ pp$1.parseExport = function(node) {
+ var this$1 = this;
+
+ 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 parens = this.type == tt.parenL
+ var expr = this.parseMaybeAssign()
+ var needsSemi = true
+ if (!parens && (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 {
+ // check for keywords used as local names
+ for (var i = 0; i < node.specifiers.length; i++) {
+ if (this$1.keywords.test(node.specifiers[i].local.name) || this$1.reservedWords.test(node.specifiers[i].local.name)) {
+ this$1.unexpected(node.specifiers[i].local.start)
+ }
+ }
+
+ node.source = null
+ }
+ this.semicolon()
+ }
+ return this.finishNode(node, "ExportNamedDeclaration")
+ }
+
+ pp$1.shouldParseExportStatement = function() {
+ return this.type.keyword || this.isLet()
+ }
+
+ // Parses a comma-separated list of module exports.
+
+ pp$1.parseExportSpecifiers = function() {
+ var this$1 = this;
+
+ var nodes = [], first = true
+ // export { x, y as z } [from '...']
+ this.expect(tt.braceL)
+ while (!this.eat(tt.braceR)) {
+ if (!first) {
+ this$1.expect(tt.comma)
+ if (this$1.afterTrailingComma(tt.braceR)) break
+ } else first = false
+
+ var node = this$1.startNode()
+ node.local = this$1.parseIdent(this$1.type === tt._default)
+ node.exported = this$1.eatContextual("as") ? this$1.parseIdent(true) : node.local
+ nodes.push(this$1.finishNode(node, "ExportSpecifier"))
+ }
+ return nodes
+ }
+
+ // Parses import declaration.
+
+ pp$1.parseImport = function(node) {
+ this.next()
+ // import '...'
+ if (this.type === tt.string) {
+ node.specifiers = empty
+ node.source = this.parseExprAtom()
+ } 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$1.parseImportSpecifiers = function() {
+ var this$1 = this;
+
+ 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$1 = this.startNode()
+ this.next()
+ this.expectContextual("as")
+ node$1.local = this.parseIdent()
+ this.checkLVal(node$1.local, true)
+ nodes.push(this.finishNode(node$1, "ImportNamespaceSpecifier"))
+ return nodes
+ }
+ this.expect(tt.braceL)
+ while (!this.eat(tt.braceR)) {
+ if (!first) {
+ this$1.expect(tt.comma)
+ if (this$1.afterTrailingComma(tt.braceR)) break
+ } else first = false
+
+ var node$2 = this$1.startNode()
+ node$2.imported = this$1.parseIdent(true)
+ if (this$1.eatContextual("as")) {
+ node$2.local = this$1.parseIdent()
+ } else {
+ node$2.local = node$2.imported
+ if (this$1.isKeyword(node$2.local.name)) this$1.unexpected(node$2.local.start)
+ if (this$1.reservedWordsStrict.test(node$2.local.name)) this$1.raise(node$2.local.start, "The keyword '" + node$2.local.name + "' is reserved")
+ }
+ this$1.checkLVal(node$2.local, true)
+ nodes.push(this$1.finishNode(node$2, "ImportSpecifier"))
+ }
+ return nodes
+ }
+
+ var pp$2 = Parser.prototype
+
+ // Convert existing expression atom to assignable pattern
+ // if possible.
+
+ pp$2.toAssignable = function(node, isBinding) {
+ var this$1 = this;
+
+ 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$1.raise(prop.key.start, "Object pattern can't contain getter or setter")
+ this$1.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$2.toAssignableList = function(exprList, isBinding) {
+ var this$1 = this;
+
+ 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 && 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$1.toAssignable(elt, isBinding)
+ }
+ return exprList
+ }
+
+ // Parses spread element.
+
+ pp$2.parseSpread = function(refDestructuringErrors) {
+ var node = this.startNode()
+ this.next()
+ node.argument = this.parseMaybeAssign(false, refDestructuringErrors)
+ return this.finishNode(node, "SpreadElement")
+ }
+
+ pp$2.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 === tt.name ? this.parseIdent() : this.unexpected()
+ else node.argument = this.type === tt.name || this.type === tt.bracketL ? this.parseBindingAtom() : this.unexpected()
+
+ return this.finishNode(node, "RestElement")
+ }
+
+ // Parses lvalue (assignable) atom.
+
+ pp$2.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$2.parseBindingList = function(close, allowEmpty, allowTrailingComma, allowNonIdent) {
+ var this$1 = this;
+
+ var elts = [], first = true
+ while (!this.eat(close)) {
+ if (first) first = false
+ else this$1.expect(tt.comma)
+ if (allowEmpty && this$1.type === tt.comma) {
+ elts.push(null)
+ } else if (allowTrailingComma && this$1.afterTrailingComma(close)) {
+ break
+ } else if (this$1.type === tt.ellipsis) {
+ var rest = this$1.parseRest(allowNonIdent)
+ this$1.parseBindingListItem(rest)
+ elts.push(rest)
+ if (this$1.type === tt.comma) this$1.raise(this$1.start, "Comma is not permitted after the rest element")
+ this$1.expect(close)
+ break
+ } else {
+ var elem = this$1.parseMaybeDefault(this$1.start, this$1.startLoc)
+ this$1.parseBindingListItem(elem)
+ elts.push(elem)
+ }
+ }
+ return elts
+ }
+
+ pp$2.parseBindingListItem = function(param) {
+ return param
+ }
+
+ // Parses assignment pattern around given atom if possible.
+
+ pp$2.parseMaybeDefault = function(startPos, startLoc, left) {
+ left = left || this.parseBindingAtom()
+ if (this.options.ecmaVersion < 6 || !this.eat(tt.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$2.checkLVal = function(expr, isBinding, checkClashes) {
+ var this$1 = this;
+
+ switch (expr.type) {
+ case "Identifier":
+ if (this.strict && this.reservedWordsStrictBind.test(expr.name))
+ this.raiseRecoverable(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode")
+ if (checkClashes) {
+ if (has(checkClashes, expr.name))
+ this.raiseRecoverable(expr.start, "Argument name clash")
+ checkClashes[expr.name] = true
+ }
+ break
+
+ case "MemberExpression":
+ if (isBinding) this.raiseRecoverable(expr.start, (isBinding ? "Binding" : "Assigning to") + " member expression")
+ break
+
+ case "ObjectPattern":
+ for (var i = 0; i < expr.properties.length; i++)
+ this$1.checkLVal(expr.properties[i].value, isBinding, checkClashes)
+ break
+
+ case "ArrayPattern":
+ for (var i$1 = 0; i$1 < expr.elements.length; i$1++) {
+ var elem = expr.elements[i$1]
+ if (elem) this$1.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")
+ }
+ }
+
+ var pp$3 = 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$3.checkPropClash = function(prop, propHash) {
+ if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand))
+ return
+ var key = prop.key;
+ var name
+ 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.raiseRecoverable(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.raiseRecoverable(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$3.parseExpression = function(noIn, refDestructuringErrors) {
+ var this$1 = this;
+
+ var startPos = this.start, startLoc = this.startLoc
+ var expr = this.parseMaybeAssign(noIn, refDestructuringErrors)
+ if (this.type === tt.comma) {
+ var node = this.startNodeAt(startPos, startLoc)
+ node.expressions = [expr]
+ while (this.eat(tt.comma)) node.expressions.push(this$1.parseMaybeAssign(noIn, refDestructuringErrors))
+ return this.finishNode(node, "SequenceExpression")
+ }
+ return expr
+ }
+
+ // Parse an assignment expression. This includes applications of
+ // operators like `+=`.
+
+ pp$3.parseMaybeAssign = function(noIn, refDestructuringErrors, afterLeftParse) {
+ if (this.inGenerator && this.isContextual("yield")) return this.parseYield()
+
+ var ownDestructuringErrors = false
+ if (!refDestructuringErrors) {
+ refDestructuringErrors = new DestructuringErrors
+ ownDestructuringErrors = true
+ }
+ 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, refDestructuringErrors)
+ if (afterLeftParse) left = afterLeftParse.call(this, left, startPos, startLoc)
+ if (this.type.isAssign) {
+ this.checkPatternErrors(refDestructuringErrors, true)
+ if (!ownDestructuringErrors) DestructuringErrors.call(refDestructuringErrors)
+ var node = this.startNodeAt(startPos, startLoc)
+ node.operator = this.value
+ node.left = this.type === tt.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 (ownDestructuringErrors) this.checkExpressionErrors(refDestructuringErrors, true)
+ }
+ return left
+ }
+
+ // Parse a ternary conditional (`?:`) operator.
+
+ pp$3.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(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$3.parseExprOps = function(noIn, refDestructuringErrors) {
+ var startPos = this.start, startLoc = this.startLoc
+ var expr = this.parseMaybeUnary(refDestructuringErrors, false)
+ 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$3.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, noIn) {
+ var prec = this.type.binop
+ if (prec != null && (!noIn || this.type !== tt._in)) {
+ if (prec > minPrec) {
+ var logical = this.type === tt.logicalOR || this.type === tt.logicalAND
+ var op = this.value
+ this.next()
+ var startPos = this.start, startLoc = this.startLoc
+ var right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, noIn)
+ var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical)
+ return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn)
+ }
+ }
+ return left
+ }
+
+ pp$3.buildBinary = function(startPos, startLoc, left, right, op, logical) {
+ var node = this.startNodeAt(startPos, startLoc)
+ node.left = left
+ node.operator = op
+ node.right = right
+ return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression")
+ }
+
+ // Parse unary operators, both prefix and postfix.
+
+ pp$3.parseMaybeUnary = function(refDestructuringErrors, sawUnary) {
+ var this$1 = this;
+
+ var startPos = this.start, startLoc = this.startLoc, expr
+ 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(null, true)
+ this.checkExpressionErrors(refDestructuringErrors, true)
+ if (update) this.checkLVal(node.argument)
+ else if (this.strict && node.operator === "delete" &&
+ node.argument.type === "Identifier")
+ this.raiseRecoverable(node.start, "Deleting local variable in strict mode")
+ else sawUnary = true
+ expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression")
+ } else {
+ expr = this.parseExprSubscripts(refDestructuringErrors)
+ if (this.checkExpressionErrors(refDestructuringErrors)) return expr
+ while (this.type.postfix && !this.canInsertSemicolon()) {
+ var node$1 = this$1.startNodeAt(startPos, startLoc)
+ node$1.operator = this$1.value
+ node$1.prefix = false
+ node$1.argument = expr
+ this$1.checkLVal(expr)
+ this$1.next()
+ expr = this$1.finishNode(node$1, "UpdateExpression")
+ }
+ }
+
+ if (!sawUnary && this.eat(tt.starstar))
+ return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false), "**", false)
+ else
+ return expr
+ }
+
+ // Parse call, dot, and `[]`-subscript expressions.
+
+ pp$3.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$3.parseSubscripts = function(base, startPos, startLoc, noCalls) {
+ var this$1 = this;
+
+ for (;;) {
+ if (this$1.eat(tt.dot)) {
+ var node = this$1.startNodeAt(startPos, startLoc)
+ node.object = base
+ node.property = this$1.parseIdent(true)
+ node.computed = false
+ base = this$1.finishNode(node, "MemberExpression")
+ } else if (this$1.eat(tt.bracketL)) {
+ var node$1 = this$1.startNodeAt(startPos, startLoc)
+ node$1.object = base
+ node$1.property = this$1.parseExpression()
+ node$1.computed = true
+ this$1.expect(tt.bracketR)
+ base = this$1.finishNode(node$1, "MemberExpression")
+ } else if (!noCalls && this$1.eat(tt.parenL)) {
+ var node$2 = this$1.startNodeAt(startPos, startLoc)
+ node$2.callee = base
+ node$2.arguments = this$1.parseExprList(tt.parenR, false)
+ base = this$1.finishNode(node$2, "CallExpression")
+ } else if (this$1.type === tt.backQuote) {
+ var node$3 = this$1.startNodeAt(startPos, startLoc)
+ node$3.tag = base
+ node$3.quasi = this$1.parseTemplate()
+ base = this$1.finishNode(node$3, "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$3.parseExprAtom = function(refDestructuringErrors) {
+ var node, canBeArrow = this.potentialArrowAt == this.start
+ switch (this.type) {
+ case tt._super:
+ if (!this.inFunction)
+ this.raise(this.start, "'super' outside of function or class")
+
+ case tt._this:
+ var type = this.type === tt._this ? "ThisExpression" : "Super"
+ node = this.startNode()
+ this.next()
+ return this.finishNode(node, type)
+
+ 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()
+ node.elements = this.parseExprList(tt.bracketR, true, true, refDestructuringErrors)
+ return this.finishNode(node, "ArrayExpression")
+
+ case tt.braceL:
+ return this.parseObj(false, refDestructuringErrors)
+
+ 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$3.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$3.parseParenExpression = function() {
+ this.expect(tt.parenL)
+ var val = this.parseExpression()
+ this.expect(tt.parenR)
+ return val
+ }
+
+ pp$3.parseParenAndDistinguishExpression = function(canBeArrow) {
+ var this$1 = this;
+
+ var startPos = this.start, startLoc = this.startLoc, val
+ if (this.options.ecmaVersion >= 6) {
+ this.next()
+
+ var innerStartPos = this.start, innerStartLoc = this.startLoc
+ var exprList = [], first = true
+ var refDestructuringErrors = new DestructuringErrors, spreadStart, innerParenStart
+ while (this.type !== tt.parenR) {
+ first ? first = false : this$1.expect(tt.comma)
+ if (this$1.type === tt.ellipsis) {
+ spreadStart = this$1.start
+ exprList.push(this$1.parseParenItem(this$1.parseRest()))
+ break
+ } else {
+ if (this$1.type === tt.parenL && !innerParenStart) {
+ innerParenStart = this$1.start
+ }
+ exprList.push(this$1.parseMaybeAssign(false, refDestructuringErrors, this$1.parseParenItem))
+ }
+ }
+ var innerEndPos = this.start, innerEndLoc = this.startLoc
+ this.expect(tt.parenR)
+
+ if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.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$3.parseParenItem = function(item) {
+ return item
+ }
+
+ pp$3.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$1 = []
+
+ pp$3.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.raiseRecoverable(node.property.start, "The only valid meta property for new is new.target")
+ if (!this.inFunction)
+ this.raiseRecoverable(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(tt.parenL)) node.arguments = this.parseExprList(tt.parenR, false)
+ else node.arguments = empty$1
+ return this.finishNode(node, "NewExpression")
+ }
+
+ // Parse template expression.
+
+ pp$3.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 === tt.backQuote
+ return this.finishNode(elem, "TemplateElement")
+ }
+
+ pp$3.parseTemplate = function() {
+ var this$1 = this;
+
+ var node = this.startNode()
+ this.next()
+ node.expressions = []
+ var curElt = this.parseTemplateElement()
+ node.quasis = [curElt]
+ while (!curElt.tail) {
+ this$1.expect(tt.dollarBraceL)
+ node.expressions.push(this$1.parseExpression())
+ this$1.expect(tt.braceR)
+ node.quasis.push(curElt = this$1.parseTemplateElement())
+ }
+ this.next()
+ return this.finishNode(node, "TemplateLiteral")
+ }
+
+ // Parse an object literal or binding pattern.
+
+ pp$3.parseObj = function(isPattern, refDestructuringErrors) {
+ var this$1 = this;
+
+ var node = this.startNode(), first = true, propHash = {}
+ node.properties = []
+ this.next()
+ while (!this.eat(tt.braceR)) {
+ if (!first) {
+ this$1.expect(tt.comma)
+ if (this$1.afterTrailingComma(tt.braceR)) break
+ } else first = false
+
+ var prop = this$1.startNode(), isGenerator, startPos, startLoc
+ if (this$1.options.ecmaVersion >= 6) {
+ prop.method = false
+ prop.shorthand = false
+ if (isPattern || refDestructuringErrors) {
+ startPos = this$1.start
+ startLoc = this$1.startLoc
+ }
+ if (!isPattern)
+ isGenerator = this$1.eat(tt.star)
+ }
+ this$1.parsePropertyName(prop)
+ this$1.parsePropertyValue(prop, isPattern, isGenerator, startPos, startLoc, refDestructuringErrors)
+ this$1.checkPropClash(prop, propHash)
+ node.properties.push(this$1.finishNode(prop, "Property"))
+ }
+ return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression")
+ }
+
+ pp$3.parsePropertyValue = function(prop, isPattern, isGenerator, startPos, startLoc, refDestructuringErrors) {
+ if (this.eat(tt.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 === 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)
+ var paramCount = prop.kind === "get" ? 0 : 1
+ if (prop.value.params.length !== paramCount) {
+ var start = prop.value.start
+ if (prop.kind === "get")
+ this.raiseRecoverable(start, "getter should have no params")
+ else
+ this.raiseRecoverable(start, "setter should have exactly one param")
+ }
+ if (prop.kind === "set" && prop.value.params[0].type === "RestElement")
+ this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params")
+ } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") {
+ if (this.keywords.test(prop.key.name) ||
+ (this.strict ? this.reservedWordsStrictBind : this.reservedWords).test(prop.key.name) ||
+ (this.inGenerator && prop.key.name == "yield"))
+ this.raiseRecoverable(prop.key.start, "'" + prop.key.name + "' can not be used as shorthand property")
+ prop.kind = "init"
+ if (isPattern) {
+ prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key)
+ } else if (this.type === tt.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$3.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$3.initFunction = function(node) {
+ node.id = null
+ if (this.options.ecmaVersion >= 6) {
+ node.generator = false
+ node.expression = false
+ }
+ }
+
+ // Parse object or class method.
+
+ pp$3.parseMethod = function(isGenerator) {
+ var node = this.startNode(), oldInGen = this.inGenerator
+ this.inGenerator = isGenerator
+ this.initFunction(node)
+ this.expect(tt.parenL)
+ node.params = this.parseBindingList(tt.parenR, false, false)
+ if (this.options.ecmaVersion >= 6)
+ node.generator = isGenerator
+ this.parseFunctionBody(node, false)
+ this.inGenerator = oldInGen
+ return this.finishNode(node, "FunctionExpression")
+ }
+
+ // Parse arrow function expression with given parameters.
+
+ pp$3.parseArrowExpression = function(node, params) {
+ var oldInGen = this.inGenerator
+ this.inGenerator = false
+ this.initFunction(node)
+ node.params = this.toAssignableList(params, true)
+ this.parseFunctionBody(node, true)
+ this.inGenerator = oldInGen
+ return this.finishNode(node, "ArrowFunctionExpression")
+ }
+
+ // Parse function body and check parameters.
+
+ pp$3.parseFunctionBody = function(node, isArrowFunction) {
+ var isExpression = isArrowFunction && 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, oldLabels = this.labels
+ this.inFunction = true; this.labels = []
+ node.body = this.parseBlock(true)
+ node.expression = false
+ this.inFunction = oldInFunc; 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`.
+ var useStrict = (!isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) ? node.body.body[0] : null;
+ if (this.strict || useStrict) {
+ var oldStrict = this.strict
+ this.strict = true
+ if (node.id)
+ this.checkLVal(node.id, true)
+ this.checkParams(node, useStrict)
+ this.strict = oldStrict
+ } else if (isArrowFunction) {
+ this.checkParams(node, useStrict)
+ }
+ }
+
+ // Checks function params for various disallowed patterns such as using "eval"
+ // or "arguments" and duplicate parameters.
+
+ pp$3.checkParams = function(node, useStrict) {
+ var this$1 = this;
+
+ var nameHash = {}
+ for (var i = 0; i < node.params.length; i++) {
+ if (useStrict && this$1.options.ecmaVersion >= 7 && node.params[i].type !== "Identifier")
+ this$1.raiseRecoverable(useStrict.start, "Illegal 'use strict' directive in function with non-simple parameter list");
+ this$1.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$3.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) {
+ var this$1 = this;
+
+ var elts = [], first = true
+ while (!this.eat(close)) {
+ if (!first) {
+ this$1.expect(tt.comma)
+ if (allowTrailingComma && this$1.afterTrailingComma(close)) break
+ } else first = false
+
+ var elt
+ if (allowEmpty && this$1.type === tt.comma)
+ elt = null
+ else if (this$1.type === tt.ellipsis) {
+ elt = this$1.parseSpread(refDestructuringErrors)
+ if (this$1.type === tt.comma && refDestructuringErrors && !refDestructuringErrors.trailingComma) {
+ refDestructuringErrors.trailingComma = this$1.lastTokStart
+ }
+ } else
+ elt = this$1.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$3.parseIdent = function(liberal) {
+ var node = this.startNode()
+ if (liberal && this.options.allowReserved == "never") liberal = false
+ if (this.type === tt.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.raiseRecoverable(this.start, "The keyword '" + this.value + "' is reserved")
+ if (!liberal && this.inGenerator && this.value === "yield")
+ this.raiseRecoverable(this.start, "Can not use 'yield' as identifier inside a generator")
+ 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$3.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")
+ }
+
+ var pp$4 = 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$4.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$4.raiseRecoverable = pp$4.raise
+
+ pp$4.curPosition = function() {
+ if (this.options.locations) {
+ return new Position(this.curLine, this.pos - this.lineStart)
+ }
+ }
+
+ var Node = function Node(parser, pos, loc) {
+ this.type = ""
+ this.start = pos
+ this.end = 0
+ if (parser.options.locations)
+ this.loc = new 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.
+
+ var pp$5 = Parser.prototype
+
+ pp$5.startNode = function() {
+ return new Node(this, this.start, this.startLoc)
+ }
+
+ pp$5.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$5.finishNode = function(node, type) {
+ return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc)
+ }
+
+ // Finish node at given position
+
+ pp$5.finishNodeAt = function(node, type, pos, loc) {
+ return finishNodeAt.call(this, node, type, pos, loc)
+ }
+
+ var TokContext = function TokContext(token, isExpr, preserveSpace, override) {
+ 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)
+ }
+
+ var pp$6 = Parser.prototype
+
+ pp$6.initialContext = function() {
+ return [types.b_stat]
+ }
+
+ pp$6.braceIsBlock = function(prevType) {
+ if (prevType === tt.colon) {
+ var parent = this.curContext()
+ if (parent === types.b_stat || parent === types.b_expr)
+ 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 || prevType === tt.parenR)
+ return true
+ if (prevType == tt.braceL)
+ return this.curContext() === types.b_stat
+ return !this.exprAllowed
+ }
+
+ pp$6.updateContext = function(prevType) {
+ var update, 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() {
+ // tokExprAllowed stays unchanged
+ }
+
+ tt._function.updateContext = function(prevType) {
+ if (prevType.beforeExpr && prevType !== tt.semi && prevType !== tt._else &&
+ !((prevType === tt.colon || prevType === tt.braceL) && 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
+ }
+
+ // 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) {
+ 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$7 = 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$7.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$7.getToken = function() {
+ this.next()
+ return new Token(this)
+ }
+
+ // If we're in an ES6 environment, make parsers iterable
+ if (typeof Symbol !== "undefined")
+ pp$7[Symbol.iterator] = function () {
+ var self = this
+ return {next: function () {
+ 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$7.setStrict = function(strict) {
+ var this$1 = this;
+
+ 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$1.lineStart = this$1.input.lastIndexOf("\n", this$1.lineStart - 2) + 1
+ --this$1.curLine
+ }
+ }
+ this.nextToken()
+ }
+
+ pp$7.curContext = function() {
+ return this.context[this.context.length - 1]
+ }
+
+ // Read a single token, updating the parser object's token-related
+ // properties.
+
+ pp$7.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$7.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$7.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$7.skipBlockComment = function() {
+ var this$1 = this;
+
+ 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) {
+ lineBreakG.lastIndex = start
+ var match
+ while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) {
+ ++this$1.curLine
+ this$1.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$7.skipLineComment = function(startSkip) {
+ var this$1 = this;
+
+ 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$1.pos
+ ch = this$1.input.charCodeAt(this$1.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$7.skipSpace = function() {
+ var this$1 = this;
+
+ loop: while (this.pos < this.input.length) {
+ var ch = this$1.input.charCodeAt(this$1.pos)
+ switch (ch) {
+ case 32: case 160: // ' '
+ ++this$1.pos
+ break
+ case 13:
+ if (this$1.input.charCodeAt(this$1.pos + 1) === 10) {
+ ++this$1.pos
+ }
+ case 10: case 8232: case 8233:
+ ++this$1.pos
+ if (this$1.options.locations) {
+ ++this$1.curLine
+ this$1.lineStart = this$1.pos
+ }
+ break
+ case 47: // '/'
+ switch (this$1.input.charCodeAt(this$1.pos + 1)) {
+ case 42: // '*'
+ this$1.skipBlockComment()
+ break
+ case 47:
+ this$1.skipLineComment(2)
+ break
+ default:
+ break loop
+ }
+ break
+ default:
+ if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) {
+ ++this$1.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$7.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$7.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$7.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$7.readToken_mult_modulo_exp = function(code) { // '%*'
+ var next = this.input.charCodeAt(this.pos + 1)
+ var size = 1
+ var tokentype = code === 42 ? tt.star : tt.modulo
+
+ // exponentiation operator ** and **=
+ if (this.options.ecmaVersion >= 7 && next === 42) {
+ ++size
+ tokentype = tt.starstar
+ next = this.input.charCodeAt(this.pos + 2)
+ }
+
+ if (next === 61) return this.finishOp(tt.assign, size + 1)
+ return this.finishOp(tokentype, size)
+ }
+
+ pp$7.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$7.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$7.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$7.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()
+ // `<!--`, an XML-style comment that should be interpreted as a line comment
+ this.skipLineComment(4)
+ this.skipSpace()
+ return this.nextToken()
+ }
+ if (next === 61) size = 2
+ return this.finishOp(tt.relational, size)
+ }
+
+ pp$7.readToken_eq_excl = function(code) { // '=!'
+ var next = this.input.charCodeAt(this.pos + 1)
+ if (next === 61) return this.finishOp(tt.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2)
+ if (code === 61 && next === 62 && this.options.ecmaVersion >= 6) { // '=>'
+ this.pos += 2
+ return this.finishToken(tt.arrow)
+ }
+ return this.finishOp(code === 61 ? tt.eq : tt.prefix, 1)
+ }
+
+ pp$7.getTokenFromCode = function(code) {
+ switch (code) {
+ // The interpretation of a dot depends on whether it is followed
+ // by a digit or another two dots.
+ case 46: // '.'
+ return this.readToken_dot()
+
+ // Punctuation tokens.
+ case 40: ++this.pos; return this.finishToken(tt.parenL)
+ case 41: ++this.pos; return this.finishToken(tt.parenR)
+ case 59: ++this.pos; return this.finishToken(tt.semi)
+ case 44: ++this.pos; return this.finishToken(tt.comma)
+ case 91: ++this.pos; return this.finishToken(tt.bracketL)
+ case 93: ++this.pos; return this.finishToken(tt.bracketR)
+ case 123: ++this.pos; return this.finishToken(tt.braceL)
+ case 125: ++this.pos; return this.finishToken(tt.braceR)
+ case 58: ++this.pos; return this.finishToken(tt.colon)
+ case 63: ++this.pos; return this.finishToken(tt.question)
+
+ case 96: // '`'
+ if (this.options.ecmaVersion < 6) break
+ ++this.pos
+ return this.finishToken(tt.backQuote)
+
+ case 48: // '0'
+ var next = this.input.charCodeAt(this.pos + 1)
+ if (next === 120 || next === 88) return this.readRadixNumber(16) // '0x', '0X' - hex number
+ if (this.options.ecmaVersion >= 6) {
+ if (next === 111 || next === 79) return this.readRadixNumber(8) // '0o', '0O' - octal number
+ if (next === 98 || next === 66) return this.readRadixNumber(2) // '0b', '0B' - binary number
+ }
+ // Anything else beginning with a digit is an integer, octal
+ // number, or float.
+ case 49: case 50: case 51: case 52: case 53: case 54: case 55: case 56: case 57: // 1-9
+ return this.readNumber(false)
+
+ // Quotes produce strings.
+ case 34: case 39: // '"', "'"
+ return this.readString(code)
+
+ // Operators are parsed inline in tiny state machines. '=' (61) is
+ // often referred to. `finishOp` simply skips the amount of
+ // characters it is given as second argument, and returns a token
+ // of the type given by its first argument.
+
+ case 47: // '/'
+ return this.readToken_slash()
+
+ case 37: case 42: // '%*'
+ return this.readToken_mult_modulo_exp(code)
+
+ case 124: case 38: // '|&'
+ return this.readToken_pipe_amp(code)
+
+ case 94: // '^'
+ return this.readToken_caret()
+
+ case 43: case 45: // '+-'
+ return this.readToken_plus_min(code)
+
+ case 60: case 62: // '<>'
+ return this.readToken_lt_gt(code)
+
+ case 61: case 33: // '=!'
+ return this.readToken_eq_excl(code)
+
+ case 126: // '~'
+ return this.finishOp(tt.prefix, 1)
+ }
+
+ this.raise(this.pos, "Unexpected character '" + codePointToString(code) + "'")
+ }
+
+ pp$7.finishOp = function(type, size) {
+ var str = this.input.slice(this.pos, this.pos + size)
+ this.pos += size
+ return this.finishToken(type, str)
+ }
+
+ // Parse a regular expression. Some context-awareness is necessary,
+ // since a '/' inside a '[]' set does not end the expression.
+
+ function tryCreateRegexp(src, flags, throwErrorAt, parser) {
+ try {
+ return new RegExp(src, flags)
+ } catch (e) {
+ if (throwErrorAt !== undefined) {
+ if (e instanceof SyntaxError) parser.raise(throwErrorAt, "Error parsing regular expression: " + e.message)
+ throw e
+ }
+ }
+ }
+
+ var regexpUnicodeSupport = !!tryCreateRegexp("\uffff", "u")
+
+ pp$7.readRegexp = function() {
+ var this$1 = this;
+
+ var escaped, inClass, start = this.pos
+ for (;;) {
+ if (this$1.pos >= this$1.input.length) this$1.raise(start, "Unterminated regular expression")
+ var ch = this$1.input.charAt(this$1.pos)
+ if (lineBreak.test(ch)) this$1.raise(start, "Unterminated regular expression")
+ if (!escaped) {
+ if (ch === "[") inClass = true
+ else if (ch === "]" && inClass) inClass = false
+ else if (ch === "/" && !inClass) break
+ escaped = ch === "\\"
+ } else escaped = false
+ ++this$1.pos
+ }
+ var content = this.input.slice(start, this.pos)
+ ++this.pos
+ // Need to use `readWord1` because '\uXXXX' sequences are allowed
+ // here (don't ask).
+ var mods = this.readWord1()
+ var tmp = content, tmpFlags = ""
+ if (mods) {
+ var validFlags = /^[gim]*$/
+ if (this.options.ecmaVersion >= 6) validFlags = /^[gimuy]*$/
+ if (!validFlags.test(mods)) this.raise(start, "Invalid regular expression flag")
+ if (mods.indexOf("u") >= 0) {
+ if (regexpUnicodeSupport) {
+ tmpFlags = "u"
+ } else {
+ // Replace each astral symbol and every Unicode escape sequence that
+ // possibly represents an astral symbol or a paired surrogate with a
+ // single ASCII symbol to avoid throwing on regular expressions that
+ // are only valid in combination with the `/u` flag.
+ // Note: replacing with the ASCII symbol `x` might cause false
+ // negatives in unlikely scenarios. For example, `[\u{61}-b]` is a
+ // perfectly valid pattern that is equivalent to `[a-b]`, but it would
+ // be replaced by `[x-b]` which throws an error.
+ tmp = tmp.replace(/\\u\{([0-9a-fA-F]+)\}/g, function (_match, code, offset) {
+ code = Number("0x" + code)
+ if (code > 0x10FFFF) this$1.raise(start + offset + 3, "Code point out of bounds")
+ return "x"
+ })
+ tmp = tmp.replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "x")
+ tmpFlags = tmpFlags.replace("u", "")
+ }
+ }
+ }
+ // Detect invalid regular expressions.
+ var value = null
+ // Rhino's regular expression parser is flaky and throws uncatchable exceptions,
+ // so don't do detection if we are running under Rhino
+ if (!isRhino) {
+ tryCreateRegexp(tmp, tmpFlags, start, this)
+ // Get a regular expression object for this pattern-flag pair, or `null` in
+ // case the current environment doesn't support the flags it uses.
+ value = tryCreateRegexp(content, mods)
+ }
+ return this.finishToken(tt.regexp, {pattern: content, flags: mods, value: value})
+ }
+
+ // Read an integer in the given radix. Return null if zero digits
+ // were read, the integer value otherwise. When `len` is given, this
+ // will return `null` unless the integer has exactly `len` digits.
+
+ pp$7.readInt = function(radix, len) {
+ var this$1 = this;
+
+ var start = this.pos, total = 0
+ for (var i = 0, e = len == null ? Infinity : len; i < e; ++i) {
+ var code = this$1.input.charCodeAt(this$1.pos), val
+ if (code >= 97) val = code - 97 + 10 // a
+ else if (code >= 65) val = code - 65 + 10 // A
+ else if (code >= 48 && code <= 57) val = code - 48 // 0-9
+ else val = Infinity
+ if (val >= radix) break
+ ++this$1.pos
+ total = total * radix + val
+ }
+ if (this.pos === start || len != null && this.pos - start !== len) return null
+
+ return total
+ }
+
+ pp$7.readRadixNumber = function(radix) {
+ this.pos += 2 // 0x
+ var val = this.readInt(radix)
+ if (val == null) this.raise(this.start + 2, "Expected number in radix " + radix)
+ if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number")
+ return this.finishToken(tt.num, val)
+ }
+
+ // Read an integer, octal integer, or floating-point number.
+
+ pp$7.readNumber = function(startsWithDot) {
+ var start = this.pos, isFloat = false, octal = this.input.charCodeAt(this.pos) === 48
+ if (!startsWithDot && this.readInt(10) === null) this.raise(start, "Invalid number")
+ var next = this.input.charCodeAt(this.pos)
+ if (next === 46) { // '.'
+ ++this.pos
+ this.readInt(10)
+ isFloat = true
+ next = this.input.charCodeAt(this.pos)
+ }
+ if (next === 69 || next === 101) { // 'eE'
+ next = this.input.charCodeAt(++this.pos)
+ if (next === 43 || next === 45) ++this.pos // '+-'
+ if (this.readInt(10) === null) this.raise(start, "Invalid number")
+ isFloat = true
+ }
+ if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number")
+
+ var str = this.input.slice(start, this.pos), val
+ if (isFloat) val = parseFloat(str)
+ else if (!octal || str.length === 1) val = parseInt(str, 10)
+ else if (/[89]/.test(str) || this.strict) this.raise(start, "Invalid number")
+ else val = parseInt(str, 8)
+ return this.finishToken(tt.num, val)
+ }
+
+ // Read a string value, interpreting backslash-escapes.
+
+ pp$7.readCodePoint = function() {
+ var ch = this.input.charCodeAt(this.pos), code
+
+ if (ch === 123) {
+ if (this.options.ecmaVersion < 6) this.unexpected()
+ var codePos = ++this.pos
+ code = this.readHexChar(this.input.indexOf('}', this.pos) - this.pos)
+ ++this.pos
+ if (code > 0x10FFFF) this.raise(codePos, "Code point out of bounds")
+ } else {
+ code = this.readHexChar(4)
+ }
+ return code
+ }
+
+ function codePointToString(code) {
+ // UTF-16 Decoding
+ if (code <= 0xFFFF) return String.fromCharCode(code)
+ code -= 0x10000
+ return String.fromCharCode((code >> 10) + 0xD800, (code & 1023) + 0xDC00)
+ }
+
+ pp$7.readString = function(quote) {
+ var this$1 = this;
+
+ var out = "", chunkStart = ++this.pos
+ for (;;) {
+ if (this$1.pos >= this$1.input.length) this$1.raise(this$1.start, "Unterminated string constant")
+ var ch = this$1.input.charCodeAt(this$1.pos)
+ if (ch === quote) break
+ if (ch === 92) { // '\'
+ out += this$1.input.slice(chunkStart, this$1.pos)
+ out += this$1.readEscapedChar(false)
+ chunkStart = this$1.pos
+ } else {
+ if (isNewLine(ch)) this$1.raise(this$1.start, "Unterminated string constant")
+ ++this$1.pos
+ }
+ }
+ out += this.input.slice(chunkStart, this.pos++)
+ return this.finishToken(tt.string, out)
+ }
+
+ // Reads template string tokens.
+
+ pp$7.readTmplToken = function() {
+ var this$1 = this;
+
+ var out = "", chunkStart = this.pos
+ for (;;) {
+ if (this$1.pos >= this$1.input.length) this$1.raise(this$1.start, "Unterminated template")
+ var ch = this$1.input.charCodeAt(this$1.pos)
+ if (ch === 96 || ch === 36 && this$1.input.charCodeAt(this$1.pos + 1) === 123) { // '`', '${'
+ if (this$1.pos === this$1.start && this$1.type === tt.template) {
+ if (ch === 36) {
+ this$1.pos += 2
+ return this$1.finishToken(tt.dollarBraceL)
+ } else {
+ ++this$1.pos
+ return this$1.finishToken(tt.backQuote)
+ }
+ }
+ out += this$1.input.slice(chunkStart, this$1.pos)
+ return this$1.finishToken(tt.template, out)
+ }
+ if (ch === 92) { // '\'
+ out += this$1.input.slice(chunkStart, this$1.pos)
+ out += this$1.readEscapedChar(true)
+ chunkStart = this$1.pos
+ } else if (isNewLine(ch)) {
+ out += this$1.input.slice(chunkStart, this$1.pos)
+ ++this$1.pos
+ switch (ch) {
+ case 13:
+ if (this$1.input.charCodeAt(this$1.pos) === 10) ++this$1.pos
+ case 10:
+ out += "\n"
+ break
+ default:
+ out += String.fromCharCode(ch)
+ break
+ }
+ if (this$1.options.locations) {
+ ++this$1.curLine
+ this$1.lineStart = this$1.pos
+ }
+ chunkStart = this$1.pos
+ } else {
+ ++this$1.pos
+ }
+ }
+ }
+
+ // Used to read escaped characters
+
+ pp$7.readEscapedChar = function(inTemplate) {
+ var ch = this.input.charCodeAt(++this.pos)
+ ++this.pos
+ switch (ch) {
+ case 110: return "\n" // 'n' -> '\n'
+ case 114: return "\r" // 'r' -> '\r'
+ case 120: return String.fromCharCode(this.readHexChar(2)) // 'x'
+ case 117: return codePointToString(this.readCodePoint()) // 'u'
+ case 116: return "\t" // 't' -> '\t'
+ case 98: return "\b" // 'b' -> '\b'
+ case 118: return "\u000b" // 'v' -> '\u000b'
+ case 102: return "\f" // 'f' -> '\f'
+ case 13: if (this.input.charCodeAt(this.pos) === 10) ++this.pos // '\r\n'
+ case 10: // ' \n'
+ if (this.options.locations) { this.lineStart = this.pos; ++this.curLine }
+ return ""
+ default:
+ if (ch >= 48 && ch <= 55) {
+ var octalStr = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0]
+ var octal = parseInt(octalStr, 8)
+ if (octal > 255) {
+ octalStr = octalStr.slice(0, -1)
+ octal = parseInt(octalStr, 8)
+ }
+ if (octalStr !== "0" && (this.strict || inTemplate)) {
+ this.raise(this.pos - 2, "Octal literal in strict mode")
+ }
+ this.pos += octalStr.length - 1
+ return String.fromCharCode(octal)
+ }
+ return String.fromCharCode(ch)
+ }
+ }
+
+ // Used to read character escape sequences ('\x', '\u', '\U').
+
+ pp$7.readHexChar = function(len) {
+ var codePos = this.pos
+ var n = this.readInt(16, len)
+ if (n === null) this.raise(codePos, "Bad character escape sequence")
+ return n
+ }
+
+ // Read an identifier, and return it as a string. Sets `this.containsEsc`
+ // to whether the word contained a '\u' escape.
+ //
+ // Incrementally adds only escaped chars, adding other chunks as-is
+ // as a micro-optimization.
+
+ pp$7.readWord1 = function() {
+ var this$1 = this;
+
+ this.containsEsc = false
+ var word = "", first = true, chunkStart = this.pos
+ var astral = this.options.ecmaVersion >= 6
+ while (this.pos < this.input.length) {
+ var ch = this$1.fullCharCodeAtPos()
+ if (isIdentifierChar(ch, astral)) {
+ this$1.pos += ch <= 0xffff ? 1 : 2
+ } else if (ch === 92) { // "\"
+ this$1.containsEsc = true
+ word += this$1.input.slice(chunkStart, this$1.pos)
+ var escStart = this$1.pos
+ if (this$1.input.charCodeAt(++this$1.pos) != 117) // "u"
+ this$1.raise(this$1.pos, "Expecting Unicode escape sequence \\uXXXX")
+ ++this$1.pos
+ var esc = this$1.readCodePoint()
+ if (!(first ? isIdentifierStart : isIdentifierChar)(esc, astral))
+ this$1.raise(escStart, "Invalid Unicode escape")
+ word += codePointToString(esc)
+ chunkStart = this$1.pos
+ } else {
+ break
+ }
+ first = false
+ }
+ return word + this.input.slice(chunkStart, this.pos)
+ }
+
+ // Read an identifier or keyword token. Will check for reserved
+ // words when necessary.
+
+ pp$7.readWord = function() {
+ var word = this.readWord1()
+ var type = tt.name
+ if ((this.options.ecmaVersion >= 6 || !this.containsEsc) && this.keywords.test(word))
+ type = keywordTypes[word]
+ return this.finishToken(type, word)
+ }
+
+ var version = "3.3.0"
+
+ // 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 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 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 Parser(options, input)
+ }
+
+ exports.version = version;
+ exports.parse = parse;
+ exports.parseExpressionAt = parseExpressionAt;
+ exports.tokenizer = tokenizer;
+ exports.Parser = Parser;
+ exports.plugins = plugins;
+ exports.defaultOptions = defaultOptions;
+ exports.Position = Position;
+ exports.SourceLocation = SourceLocation;
+ exports.getLineInfo = getLineInfo;
+ exports.Node = Node;
+ exports.TokenType = TokenType;
+ exports.tokTypes = tt;
+ exports.TokContext = TokContext;
+ exports.tokContexts = types;
+ exports.isIdentifierChar = isIdentifierChar;
+ exports.isIdentifierStart = isIdentifierStart;
+ exports.Token = Token;
+ exports.isNewLine = isNewLine;
+ exports.lineBreak = lineBreak;
+ exports.lineBreakG = lineBreakG;
+
+ Object.defineProperty(exports, '__esModule', { value: true });
+
+})); \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn_loose.es.js b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn_loose.es.js
new file mode 100644
index 0000000000..cb114d8cbd
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn_loose.es.js
@@ -0,0 +1,1261 @@
+import acorn, { SourceLocation, tokTypes, tokenizer, Node, lineBreak, isNewLine, getLineInfo, Token, lineBreakG } from './acorn.js';
+
+// Registered plugins
+var pluginsLoose = {}
+
+var LooseParser = function LooseParser(input, options) {
+ if ( options === void 0 ) options = {};
+
+ this.toks = tokenizer(input, options)
+ this.options = this.toks.options
+ this.input = this.toks.input
+ this.tok = this.last = {type: tokTypes.eof, start: 0, end: 0}
+ if (this.options.locations) {
+ var here = this.toks.curPosition()
+ this.tok.loc = new SourceLocation(this.toks, here, here)
+ }
+ this.ahead = [] // Tokens ahead
+ this.context = [] // Indentation contexted
+ this.curIndent = 0
+ this.curLineStart = 0
+ this.nextLineStart = this.lineEnd(this.curLineStart) + 1
+ // Load plugins
+ this.options.pluginsLoose = options.pluginsLoose || {}
+ this.loadPlugins(this.options.pluginsLoose)
+};
+
+LooseParser.prototype.startNode = function startNode () {
+ return new Node(this.toks, this.tok.start, this.options.locations ? this.tok.loc.start : null)
+};
+
+LooseParser.prototype.storeCurrentPos = function storeCurrentPos () {
+ return this.options.locations ? [this.tok.start, this.tok.loc.start] : this.tok.start
+};
+
+LooseParser.prototype.startNodeAt = function startNodeAt (pos) {
+ if (this.options.locations) {
+ return new Node(this.toks, pos[0], pos[1])
+ } else {
+ return new Node(this.toks, pos)
+ }
+};
+
+LooseParser.prototype.finishNode = function finishNode (node, type) {
+ node.type = type
+ node.end = this.last.end
+ if (this.options.locations)
+ node.loc.end = this.last.loc.end
+ if (this.options.ranges)
+ node.range[1] = this.last.end
+ return node
+};
+
+LooseParser.prototype.dummyNode = function dummyNode (type) {
+ var dummy = this.startNode()
+ dummy.type = type
+ dummy.end = dummy.start
+ if (this.options.locations)
+ dummy.loc.end = dummy.loc.start
+ if (this.options.ranges)
+ dummy.range[1] = dummy.start
+ this.last = {type: tokTypes.name, start: dummy.start, end: dummy.start, loc: dummy.loc}
+ return dummy
+};
+
+LooseParser.prototype.dummyIdent = function dummyIdent () {
+ var dummy = this.dummyNode("Identifier")
+ dummy.name = "✖"
+ return dummy
+};
+
+LooseParser.prototype.dummyString = function dummyString () {
+ var dummy = this.dummyNode("Literal")
+ dummy.value = dummy.raw = "✖"
+ return dummy
+};
+
+LooseParser.prototype.eat = function eat (type) {
+ if (this.tok.type === type) {
+ this.next()
+ return true
+ } else {
+ return false
+ }
+};
+
+LooseParser.prototype.isContextual = function isContextual (name) {
+ return this.tok.type === tokTypes.name && this.tok.value === name
+};
+
+LooseParser.prototype.eatContextual = function eatContextual (name) {
+ return this.tok.value === name && this.eat(tokTypes.name)
+};
+
+LooseParser.prototype.canInsertSemicolon = function canInsertSemicolon () {
+ return this.tok.type === tokTypes.eof || this.tok.type === tokTypes.braceR ||
+ lineBreak.test(this.input.slice(this.last.end, this.tok.start))
+};
+
+LooseParser.prototype.semicolon = function semicolon () {
+ return this.eat(tokTypes.semi)
+};
+
+LooseParser.prototype.expect = function expect (type) {
+ var this$1 = this;
+
+ if (this.eat(type)) return true
+ for (var i = 1; i <= 2; i++) {
+ if (this$1.lookAhead(i).type == type) {
+ for (var j = 0; j < i; j++) this$1.next()
+ return true
+ }
+ }
+};
+
+LooseParser.prototype.pushCx = function pushCx () {
+ this.context.push(this.curIndent)
+};
+
+LooseParser.prototype.popCx = function popCx () {
+ this.curIndent = this.context.pop()
+};
+
+LooseParser.prototype.lineEnd = function lineEnd (pos) {
+ while (pos < this.input.length && !isNewLine(this.input.charCodeAt(pos))) ++pos
+ return pos
+};
+
+LooseParser.prototype.indentationAfter = function indentationAfter (pos) {
+ var this$1 = this;
+
+ for (var count = 0;; ++pos) {
+ var ch = this$1.input.charCodeAt(pos)
+ if (ch === 32) ++count
+ else if (ch === 9) count += this$1.options.tabSize
+ else return count
+ }
+};
+
+LooseParser.prototype.closes = function closes (closeTok, indent, line, blockHeuristic) {
+ if (this.tok.type === closeTok || this.tok.type === tokTypes.eof) return true
+ return line != this.curLineStart && this.curIndent < indent && this.tokenStartsLine() &&
+ (!blockHeuristic || this.nextLineStart >= this.input.length ||
+ this.indentationAfter(this.nextLineStart) < indent)
+};
+
+LooseParser.prototype.tokenStartsLine = function tokenStartsLine () {
+ var this$1 = this;
+
+ for (var p = this.tok.start - 1; p >= this.curLineStart; --p) {
+ var ch = this$1.input.charCodeAt(p)
+ if (ch !== 9 && ch !== 32) return false
+ }
+ return true
+};
+
+LooseParser.prototype.extend = function extend (name, f) {
+ this[name] = f(this[name])
+};
+
+LooseParser.prototype.loadPlugins = function loadPlugins (pluginConfigs) {
+ var this$1 = this;
+
+ for (var name in pluginConfigs) {
+ var plugin = pluginsLoose[name]
+ if (!plugin) throw new Error("Plugin '" + name + "' not found")
+ plugin(this$1, pluginConfigs[name])
+ }
+};
+
+var lp = LooseParser.prototype
+
+function isSpace(ch) {
+ return (ch < 14 && ch > 8) || ch === 32 || ch === 160 || isNewLine(ch)
+}
+
+lp.next = function() {
+ var this$1 = this;
+
+ this.last = this.tok
+ if (this.ahead.length)
+ this.tok = this.ahead.shift()
+ else
+ this.tok = this.readToken()
+
+ if (this.tok.start >= this.nextLineStart) {
+ while (this.tok.start >= this.nextLineStart) {
+ this$1.curLineStart = this$1.nextLineStart
+ this$1.nextLineStart = this$1.lineEnd(this$1.curLineStart) + 1
+ }
+ this.curIndent = this.indentationAfter(this.curLineStart)
+ }
+}
+
+lp.readToken = function() {
+ var this$1 = this;
+
+ for (;;) {
+ try {
+ this$1.toks.next()
+ if (this$1.toks.type === tokTypes.dot &&
+ this$1.input.substr(this$1.toks.end, 1) === "." &&
+ this$1.options.ecmaVersion >= 6) {
+ this$1.toks.end++
+ this$1.toks.type = tokTypes.ellipsis
+ }
+ return new Token(this$1.toks)
+ } catch(e) {
+ if (!(e instanceof SyntaxError)) throw e
+
+ // Try to skip some text, based on the error message, and then continue
+ var msg = e.message, pos = e.raisedAt, replace = true
+ if (/unterminated/i.test(msg)) {
+ pos = this$1.lineEnd(e.pos + 1)
+ if (/string/.test(msg)) {
+ replace = {start: e.pos, end: pos, type: tokTypes.string, value: this$1.input.slice(e.pos + 1, pos)}
+ } else if (/regular expr/i.test(msg)) {
+ var re = this$1.input.slice(e.pos, pos)
+ try { re = new RegExp(re) } catch(e) {}
+ replace = {start: e.pos, end: pos, type: tokTypes.regexp, value: re}
+ } else if (/template/.test(msg)) {
+ replace = {start: e.pos, end: pos,
+ type: tokTypes.template,
+ value: this$1.input.slice(e.pos, pos)}
+ } else {
+ replace = false
+ }
+ } else if (/invalid (unicode|regexp|number)|expecting unicode|octal literal|is reserved|directly after number|expected number in radix/i.test(msg)) {
+ while (pos < this.input.length && !isSpace(this.input.charCodeAt(pos))) ++pos
+ } else if (/character escape|expected hexadecimal/i.test(msg)) {
+ while (pos < this.input.length) {
+ var ch = this$1.input.charCodeAt(pos++)
+ if (ch === 34 || ch === 39 || isNewLine(ch)) break
+ }
+ } else if (/unexpected character/i.test(msg)) {
+ pos++
+ replace = false
+ } else if (/regular expression/i.test(msg)) {
+ replace = true
+ } else {
+ throw e
+ }
+ this$1.resetTo(pos)
+ if (replace === true) replace = {start: pos, end: pos, type: tokTypes.name, value: "✖"}
+ if (replace) {
+ if (this$1.options.locations)
+ replace.loc = new SourceLocation(
+ this$1.toks,
+ getLineInfo(this$1.input, replace.start),
+ getLineInfo(this$1.input, replace.end))
+ return replace
+ }
+ }
+ }
+}
+
+lp.resetTo = function(pos) {
+ var this$1 = this;
+
+ this.toks.pos = pos
+ var ch = this.input.charAt(pos - 1)
+ this.toks.exprAllowed = !ch || /[\[\{\(,;:?\/*=+\-~!|&%^<>]/.test(ch) ||
+ /[enwfd]/.test(ch) &&
+ /\b(keywords|case|else|return|throw|new|in|(instance|type)of|delete|void)$/.test(this.input.slice(pos - 10, pos))
+
+ if (this.options.locations) {
+ this.toks.curLine = 1
+ this.toks.lineStart = lineBreakG.lastIndex = 0
+ var match
+ while ((match = lineBreakG.exec(this.input)) && match.index < pos) {
+ ++this$1.toks.curLine
+ this$1.toks.lineStart = match.index + match[0].length
+ }
+ }
+}
+
+lp.lookAhead = function(n) {
+ var this$1 = this;
+
+ while (n > this.ahead.length)
+ this$1.ahead.push(this$1.readToken())
+ return this.ahead[n - 1]
+}
+
+function isDummy(node) { return node.name == "✖" }
+
+var lp$1 = LooseParser.prototype
+
+lp$1.parseTopLevel = function() {
+ var this$1 = this;
+
+ var node = this.startNodeAt(this.options.locations ? [0, getLineInfo(this.input, 0)] : 0)
+ node.body = []
+ while (this.tok.type !== tokTypes.eof) node.body.push(this$1.parseStatement())
+ this.last = this.tok
+ if (this.options.ecmaVersion >= 6) {
+ node.sourceType = this.options.sourceType
+ }
+ return this.finishNode(node, "Program")
+}
+
+lp$1.parseStatement = function() {
+ var this$1 = this;
+
+ var starttype = this.tok.type, node = this.startNode(), kind
+
+ if (this.toks.isLet()) {
+ starttype = tokTypes._var
+ kind = "let"
+ }
+
+ switch (starttype) {
+ case tokTypes._break: case tokTypes._continue:
+ this.next()
+ var isBreak = starttype === tokTypes._break
+ if (this.semicolon() || this.canInsertSemicolon()) {
+ node.label = null
+ } else {
+ node.label = this.tok.type === tokTypes.name ? this.parseIdent() : null
+ this.semicolon()
+ }
+ return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement")
+
+ case tokTypes._debugger:
+ this.next()
+ this.semicolon()
+ return this.finishNode(node, "DebuggerStatement")
+
+ case tokTypes._do:
+ this.next()
+ node.body = this.parseStatement()
+ node.test = this.eat(tokTypes._while) ? this.parseParenExpression() : this.dummyIdent()
+ this.semicolon()
+ return this.finishNode(node, "DoWhileStatement")
+
+ case tokTypes._for:
+ this.next()
+ this.pushCx()
+ this.expect(tokTypes.parenL)
+ if (this.tok.type === tokTypes.semi) return this.parseFor(node, null)
+ var isLet = this.toks.isLet()
+ if (isLet || this.tok.type === tokTypes._var || this.tok.type === tokTypes._const) {
+ var init$1 = this.parseVar(true, isLet ? "let" : this.tok.value)
+ if (init$1.declarations.length === 1 && (this.tok.type === tokTypes._in || this.isContextual("of"))) {
+ return this.parseForIn(node, init$1)
+ }
+ return this.parseFor(node, init$1)
+ }
+ var init = this.parseExpression(true)
+ if (this.tok.type === tokTypes._in || this.isContextual("of"))
+ return this.parseForIn(node, this.toAssignable(init))
+ return this.parseFor(node, init)
+
+ case tokTypes._function:
+ this.next()
+ return this.parseFunction(node, true)
+
+ case tokTypes._if:
+ this.next()
+ node.test = this.parseParenExpression()
+ node.consequent = this.parseStatement()
+ node.alternate = this.eat(tokTypes._else) ? this.parseStatement() : null
+ return this.finishNode(node, "IfStatement")
+
+ case tokTypes._return:
+ this.next()
+ if (this.eat(tokTypes.semi) || this.canInsertSemicolon()) node.argument = null
+ else { node.argument = this.parseExpression(); this.semicolon() }
+ return this.finishNode(node, "ReturnStatement")
+
+ case tokTypes._switch:
+ var blockIndent = this.curIndent, line = this.curLineStart
+ this.next()
+ node.discriminant = this.parseParenExpression()
+ node.cases = []
+ this.pushCx()
+ this.expect(tokTypes.braceL)
+
+ var cur
+ while (!this.closes(tokTypes.braceR, blockIndent, line, true)) {
+ if (this$1.tok.type === tokTypes._case || this$1.tok.type === tokTypes._default) {
+ var isCase = this$1.tok.type === tokTypes._case
+ if (cur) this$1.finishNode(cur, "SwitchCase")
+ node.cases.push(cur = this$1.startNode())
+ cur.consequent = []
+ this$1.next()
+ if (isCase) cur.test = this$1.parseExpression()
+ else cur.test = null
+ this$1.expect(tokTypes.colon)
+ } else {
+ if (!cur) {
+ node.cases.push(cur = this$1.startNode())
+ cur.consequent = []
+ cur.test = null
+ }
+ cur.consequent.push(this$1.parseStatement())
+ }
+ }
+ if (cur) this.finishNode(cur, "SwitchCase")
+ this.popCx()
+ this.eat(tokTypes.braceR)
+ return this.finishNode(node, "SwitchStatement")
+
+ case tokTypes._throw:
+ this.next()
+ node.argument = this.parseExpression()
+ this.semicolon()
+ return this.finishNode(node, "ThrowStatement")
+
+ case tokTypes._try:
+ this.next()
+ node.block = this.parseBlock()
+ node.handler = null
+ if (this.tok.type === tokTypes._catch) {
+ var clause = this.startNode()
+ this.next()
+ this.expect(tokTypes.parenL)
+ clause.param = this.toAssignable(this.parseExprAtom(), true)
+ this.expect(tokTypes.parenR)
+ clause.body = this.parseBlock()
+ node.handler = this.finishNode(clause, "CatchClause")
+ }
+ node.finalizer = this.eat(tokTypes._finally) ? this.parseBlock() : null
+ if (!node.handler && !node.finalizer) return node.block
+ return this.finishNode(node, "TryStatement")
+
+ case tokTypes._var:
+ case tokTypes._const:
+ return this.parseVar(false, kind || this.tok.value)
+
+ case tokTypes._while:
+ this.next()
+ node.test = this.parseParenExpression()
+ node.body = this.parseStatement()
+ return this.finishNode(node, "WhileStatement")
+
+ case tokTypes._with:
+ this.next()
+ node.object = this.parseParenExpression()
+ node.body = this.parseStatement()
+ return this.finishNode(node, "WithStatement")
+
+ case tokTypes.braceL:
+ return this.parseBlock()
+
+ case tokTypes.semi:
+ this.next()
+ return this.finishNode(node, "EmptyStatement")
+
+ case tokTypes._class:
+ return this.parseClass(true)
+
+ case tokTypes._import:
+ return this.parseImport()
+
+ case tokTypes._export:
+ return this.parseExport()
+
+ default:
+ var expr = this.parseExpression()
+ if (isDummy(expr)) {
+ this.next()
+ if (this.tok.type === tokTypes.eof) return this.finishNode(node, "EmptyStatement")
+ return this.parseStatement()
+ } else if (starttype === tokTypes.name && expr.type === "Identifier" && this.eat(tokTypes.colon)) {
+ node.body = this.parseStatement()
+ node.label = expr
+ return this.finishNode(node, "LabeledStatement")
+ } else {
+ node.expression = expr
+ this.semicolon()
+ return this.finishNode(node, "ExpressionStatement")
+ }
+ }
+}
+
+lp$1.parseBlock = function() {
+ var this$1 = this;
+
+ var node = this.startNode()
+ this.pushCx()
+ this.expect(tokTypes.braceL)
+ var blockIndent = this.curIndent, line = this.curLineStart
+ node.body = []
+ while (!this.closes(tokTypes.braceR, blockIndent, line, true))
+ node.body.push(this$1.parseStatement())
+ this.popCx()
+ this.eat(tokTypes.braceR)
+ return this.finishNode(node, "BlockStatement")
+}
+
+lp$1.parseFor = function(node, init) {
+ node.init = init
+ node.test = node.update = null
+ if (this.eat(tokTypes.semi) && this.tok.type !== tokTypes.semi) node.test = this.parseExpression()
+ if (this.eat(tokTypes.semi) && this.tok.type !== tokTypes.parenR) node.update = this.parseExpression()
+ this.popCx()
+ this.expect(tokTypes.parenR)
+ node.body = this.parseStatement()
+ return this.finishNode(node, "ForStatement")
+}
+
+lp$1.parseForIn = function(node, init) {
+ var type = this.tok.type === tokTypes._in ? "ForInStatement" : "ForOfStatement"
+ this.next()
+ node.left = init
+ node.right = this.parseExpression()
+ this.popCx()
+ this.expect(tokTypes.parenR)
+ node.body = this.parseStatement()
+ return this.finishNode(node, type)
+}
+
+lp$1.parseVar = function(noIn, kind) {
+ var this$1 = this;
+
+ var node = this.startNode()
+ node.kind = kind
+ this.next()
+ node.declarations = []
+ do {
+ var decl = this$1.startNode()
+ decl.id = this$1.options.ecmaVersion >= 6 ? this$1.toAssignable(this$1.parseExprAtom(), true) : this$1.parseIdent()
+ decl.init = this$1.eat(tokTypes.eq) ? this$1.parseMaybeAssign(noIn) : null
+ node.declarations.push(this$1.finishNode(decl, "VariableDeclarator"))
+ } while (this.eat(tokTypes.comma))
+ if (!node.declarations.length) {
+ var decl$1 = this.startNode()
+ decl$1.id = this.dummyIdent()
+ node.declarations.push(this.finishNode(decl$1, "VariableDeclarator"))
+ }
+ if (!noIn) this.semicolon()
+ return this.finishNode(node, "VariableDeclaration")
+}
+
+lp$1.parseClass = function(isStatement) {
+ var this$1 = this;
+
+ var node = this.startNode()
+ this.next()
+ if (this.tok.type === tokTypes.name) node.id = this.parseIdent()
+ else if (isStatement) node.id = this.dummyIdent()
+ else node.id = null
+ node.superClass = this.eat(tokTypes._extends) ? this.parseExpression() : null
+ node.body = this.startNode()
+ node.body.body = []
+ this.pushCx()
+ var indent = this.curIndent + 1, line = this.curLineStart
+ this.eat(tokTypes.braceL)
+ if (this.curIndent + 1 < indent) { indent = this.curIndent; line = this.curLineStart }
+ while (!this.closes(tokTypes.braceR, indent, line)) {
+ if (this$1.semicolon()) continue
+ var method = this$1.startNode(), isGenerator
+ if (this$1.options.ecmaVersion >= 6) {
+ method.static = false
+ isGenerator = this$1.eat(tokTypes.star)
+ }
+ this$1.parsePropertyName(method)
+ if (isDummy(method.key)) { if (isDummy(this$1.parseMaybeAssign())) this$1.next(); this$1.eat(tokTypes.comma); continue }
+ if (method.key.type === "Identifier" && !method.computed && method.key.name === "static" &&
+ (this$1.tok.type != tokTypes.parenL && this$1.tok.type != tokTypes.braceL)) {
+ method.static = true
+ isGenerator = this$1.eat(tokTypes.star)
+ this$1.parsePropertyName(method)
+ } else {
+ method.static = false
+ }
+ if (this$1.options.ecmaVersion >= 5 && method.key.type === "Identifier" &&
+ !method.computed && (method.key.name === "get" || method.key.name === "set") &&
+ this$1.tok.type !== tokTypes.parenL && this$1.tok.type !== tokTypes.braceL) {
+ method.kind = method.key.name
+ this$1.parsePropertyName(method)
+ method.value = this$1.parseMethod(false)
+ } else {
+ if (!method.computed && !method.static && !isGenerator && (
+ method.key.type === "Identifier" && method.key.name === "constructor" ||
+ method.key.type === "Literal" && method.key.value === "constructor")) {
+ method.kind = "constructor"
+ } else {
+ method.kind = "method"
+ }
+ method.value = this$1.parseMethod(isGenerator)
+ }
+ node.body.body.push(this$1.finishNode(method, "MethodDefinition"))
+ }
+ this.popCx()
+ if (!this.eat(tokTypes.braceR)) {
+ // If there is no closing brace, make the node span to the start
+ // of the next token (this is useful for Tern)
+ this.last.end = this.tok.start
+ if (this.options.locations) this.last.loc.end = this.tok.loc.start
+ }
+ this.semicolon()
+ this.finishNode(node.body, "ClassBody")
+ return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression")
+}
+
+lp$1.parseFunction = function(node, isStatement) {
+ this.initFunction(node)
+ if (this.options.ecmaVersion >= 6) {
+ node.generator = this.eat(tokTypes.star)
+ }
+ if (this.tok.type === tokTypes.name) node.id = this.parseIdent()
+ else if (isStatement) node.id = this.dummyIdent()
+ node.params = this.parseFunctionParams()
+ node.body = this.parseBlock()
+ return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression")
+}
+
+lp$1.parseExport = function() {
+ var node = this.startNode()
+ this.next()
+ if (this.eat(tokTypes.star)) {
+ node.source = this.eatContextual("from") ? this.parseExprAtom() : this.dummyString()
+ return this.finishNode(node, "ExportAllDeclaration")
+ }
+ if (this.eat(tokTypes._default)) {
+ var expr = this.parseMaybeAssign()
+ if (expr.id) {
+ switch (expr.type) {
+ case "FunctionExpression": expr.type = "FunctionDeclaration"; break
+ case "ClassExpression": expr.type = "ClassDeclaration"; break
+ }
+ }
+ node.declaration = expr
+ this.semicolon()
+ return this.finishNode(node, "ExportDefaultDeclaration")
+ }
+ if (this.tok.type.keyword || this.toks.isLet()) {
+ node.declaration = this.parseStatement()
+ node.specifiers = []
+ node.source = null
+ } else {
+ node.declaration = null
+ node.specifiers = this.parseExportSpecifierList()
+ node.source = this.eatContextual("from") ? this.parseExprAtom() : null
+ this.semicolon()
+ }
+ return this.finishNode(node, "ExportNamedDeclaration")
+}
+
+lp$1.parseImport = function() {
+ var node = this.startNode()
+ this.next()
+ if (this.tok.type === tokTypes.string) {
+ node.specifiers = []
+ node.source = this.parseExprAtom()
+ node.kind = ''
+ } else {
+ var elt
+ if (this.tok.type === tokTypes.name && this.tok.value !== "from") {
+ elt = this.startNode()
+ elt.local = this.parseIdent()
+ this.finishNode(elt, "ImportDefaultSpecifier")
+ this.eat(tokTypes.comma)
+ }
+ node.specifiers = this.parseImportSpecifierList()
+ node.source = this.eatContextual("from") && this.tok.type == tokTypes.string ? this.parseExprAtom() : this.dummyString()
+ if (elt) node.specifiers.unshift(elt)
+ }
+ this.semicolon()
+ return this.finishNode(node, "ImportDeclaration")
+}
+
+lp$1.parseImportSpecifierList = function() {
+ var this$1 = this;
+
+ var elts = []
+ if (this.tok.type === tokTypes.star) {
+ var elt = this.startNode()
+ this.next()
+ elt.local = this.eatContextual("as") ? this.parseIdent() : this.dummyIdent()
+ elts.push(this.finishNode(elt, "ImportNamespaceSpecifier"))
+ } else {
+ var indent = this.curIndent, line = this.curLineStart, continuedLine = this.nextLineStart
+ this.pushCx()
+ this.eat(tokTypes.braceL)
+ if (this.curLineStart > continuedLine) continuedLine = this.curLineStart
+ while (!this.closes(tokTypes.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) {
+ var elt$1 = this$1.startNode()
+ if (this$1.eat(tokTypes.star)) {
+ elt$1.local = this$1.eatContextual("as") ? this$1.parseIdent() : this$1.dummyIdent()
+ this$1.finishNode(elt$1, "ImportNamespaceSpecifier")
+ } else {
+ if (this$1.isContextual("from")) break
+ elt$1.imported = this$1.parseIdent()
+ if (isDummy(elt$1.imported)) break
+ elt$1.local = this$1.eatContextual("as") ? this$1.parseIdent() : elt$1.imported
+ this$1.finishNode(elt$1, "ImportSpecifier")
+ }
+ elts.push(elt$1)
+ this$1.eat(tokTypes.comma)
+ }
+ this.eat(tokTypes.braceR)
+ this.popCx()
+ }
+ return elts
+}
+
+lp$1.parseExportSpecifierList = function() {
+ var this$1 = this;
+
+ var elts = []
+ var indent = this.curIndent, line = this.curLineStart, continuedLine = this.nextLineStart
+ this.pushCx()
+ this.eat(tokTypes.braceL)
+ if (this.curLineStart > continuedLine) continuedLine = this.curLineStart
+ while (!this.closes(tokTypes.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) {
+ if (this$1.isContextual("from")) break
+ var elt = this$1.startNode()
+ elt.local = this$1.parseIdent()
+ if (isDummy(elt.local)) break
+ elt.exported = this$1.eatContextual("as") ? this$1.parseIdent() : elt.local
+ this$1.finishNode(elt, "ExportSpecifier")
+ elts.push(elt)
+ this$1.eat(tokTypes.comma)
+ }
+ this.eat(tokTypes.braceR)
+ this.popCx()
+ return elts
+}
+
+var lp$2 = LooseParser.prototype
+
+lp$2.checkLVal = function(expr) {
+ if (!expr) return expr
+ switch (expr.type) {
+ case "Identifier":
+ case "MemberExpression":
+ return expr
+
+ case "ParenthesizedExpression":
+ expr.expression = this.checkLVal(expr.expression)
+ return expr
+
+ default:
+ return this.dummyIdent()
+ }
+}
+
+lp$2.parseExpression = function(noIn) {
+ var this$1 = this;
+
+ var start = this.storeCurrentPos()
+ var expr = this.parseMaybeAssign(noIn)
+ if (this.tok.type === tokTypes.comma) {
+ var node = this.startNodeAt(start)
+ node.expressions = [expr]
+ while (this.eat(tokTypes.comma)) node.expressions.push(this$1.parseMaybeAssign(noIn))
+ return this.finishNode(node, "SequenceExpression")
+ }
+ return expr
+}
+
+lp$2.parseParenExpression = function() {
+ this.pushCx()
+ this.expect(tokTypes.parenL)
+ var val = this.parseExpression()
+ this.popCx()
+ this.expect(tokTypes.parenR)
+ return val
+}
+
+lp$2.parseMaybeAssign = function(noIn) {
+ if (this.toks.isContextual("yield")) {
+ var node = this.startNode()
+ this.next()
+ if (this.semicolon() || this.canInsertSemicolon() || (this.tok.type != tokTypes.star && !this.tok.type.startsExpr)) {
+ node.delegate = false
+ node.argument = null
+ } else {
+ node.delegate = this.eat(tokTypes.star)
+ node.argument = this.parseMaybeAssign()
+ }
+ return this.finishNode(node, "YieldExpression")
+ }
+
+ var start = this.storeCurrentPos()
+ var left = this.parseMaybeConditional(noIn)
+ if (this.tok.type.isAssign) {
+ var node$1 = this.startNodeAt(start)
+ node$1.operator = this.tok.value
+ node$1.left = this.tok.type === tokTypes.eq ? this.toAssignable(left) : this.checkLVal(left)
+ this.next()
+ node$1.right = this.parseMaybeAssign(noIn)
+ return this.finishNode(node$1, "AssignmentExpression")
+ }
+ return left
+}
+
+lp$2.parseMaybeConditional = function(noIn) {
+ var start = this.storeCurrentPos()
+ var expr = this.parseExprOps(noIn)
+ if (this.eat(tokTypes.question)) {
+ var node = this.startNodeAt(start)
+ node.test = expr
+ node.consequent = this.parseMaybeAssign()
+ node.alternate = this.expect(tokTypes.colon) ? this.parseMaybeAssign(noIn) : this.dummyIdent()
+ return this.finishNode(node, "ConditionalExpression")
+ }
+ return expr
+}
+
+lp$2.parseExprOps = function(noIn) {
+ var start = this.storeCurrentPos()
+ var indent = this.curIndent, line = this.curLineStart
+ return this.parseExprOp(this.parseMaybeUnary(false), start, -1, noIn, indent, line)
+}
+
+lp$2.parseExprOp = function(left, start, minPrec, noIn, indent, line) {
+ if (this.curLineStart != line && this.curIndent < indent && this.tokenStartsLine()) return left
+ var prec = this.tok.type.binop
+ if (prec != null && (!noIn || this.tok.type !== tokTypes._in)) {
+ if (prec > minPrec) {
+ var node = this.startNodeAt(start)
+ node.left = left
+ node.operator = this.tok.value
+ this.next()
+ if (this.curLineStart != line && this.curIndent < indent && this.tokenStartsLine()) {
+ node.right = this.dummyIdent()
+ } else {
+ var rightStart = this.storeCurrentPos()
+ node.right = this.parseExprOp(this.parseMaybeUnary(false), rightStart, prec, noIn, indent, line)
+ }
+ this.finishNode(node, /&&|\|\|/.test(node.operator) ? "LogicalExpression" : "BinaryExpression")
+ return this.parseExprOp(node, start, minPrec, noIn, indent, line)
+ }
+ }
+ return left
+}
+
+lp$2.parseMaybeUnary = function(sawUnary) {
+ var this$1 = this;
+
+ var start = this.storeCurrentPos(), expr
+ if (this.tok.type.prefix) {
+ var node = this.startNode(), update = this.tok.type === tokTypes.incDec
+ if (!update) sawUnary = true
+ node.operator = this.tok.value
+ node.prefix = true
+ this.next()
+ node.argument = this.parseMaybeUnary(true)
+ if (update) node.argument = this.checkLVal(node.argument)
+ expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression")
+ } else if (this.tok.type === tokTypes.ellipsis) {
+ var node$1 = this.startNode()
+ this.next()
+ node$1.argument = this.parseMaybeUnary(sawUnary)
+ expr = this.finishNode(node$1, "SpreadElement")
+ } else {
+ expr = this.parseExprSubscripts()
+ while (this.tok.type.postfix && !this.canInsertSemicolon()) {
+ var node$2 = this$1.startNodeAt(start)
+ node$2.operator = this$1.tok.value
+ node$2.prefix = false
+ node$2.argument = this$1.checkLVal(expr)
+ this$1.next()
+ expr = this$1.finishNode(node$2, "UpdateExpression")
+ }
+ }
+
+ if (!sawUnary && this.eat(tokTypes.starstar)) {
+ var node$3 = this.startNodeAt(start)
+ node$3.operator = "**"
+ node$3.left = expr
+ node$3.right = this.parseMaybeUnary(false)
+ return this.finishNode(node$3, "BinaryExpression")
+ }
+
+ return expr
+}
+
+lp$2.parseExprSubscripts = function() {
+ var start = this.storeCurrentPos()
+ return this.parseSubscripts(this.parseExprAtom(), start, false, this.curIndent, this.curLineStart)
+}
+
+lp$2.parseSubscripts = function(base, start, noCalls, startIndent, line) {
+ var this$1 = this;
+
+ for (;;) {
+ if (this$1.curLineStart != line && this$1.curIndent <= startIndent && this$1.tokenStartsLine()) {
+ if (this$1.tok.type == tokTypes.dot && this$1.curIndent == startIndent)
+ --startIndent
+ else
+ return base
+ }
+
+ if (this$1.eat(tokTypes.dot)) {
+ var node = this$1.startNodeAt(start)
+ node.object = base
+ if (this$1.curLineStart != line && this$1.curIndent <= startIndent && this$1.tokenStartsLine())
+ node.property = this$1.dummyIdent()
+ else
+ node.property = this$1.parsePropertyAccessor() || this$1.dummyIdent()
+ node.computed = false
+ base = this$1.finishNode(node, "MemberExpression")
+ } else if (this$1.tok.type == tokTypes.bracketL) {
+ this$1.pushCx()
+ this$1.next()
+ var node$1 = this$1.startNodeAt(start)
+ node$1.object = base
+ node$1.property = this$1.parseExpression()
+ node$1.computed = true
+ this$1.popCx()
+ this$1.expect(tokTypes.bracketR)
+ base = this$1.finishNode(node$1, "MemberExpression")
+ } else if (!noCalls && this$1.tok.type == tokTypes.parenL) {
+ var node$2 = this$1.startNodeAt(start)
+ node$2.callee = base
+ node$2.arguments = this$1.parseExprList(tokTypes.parenR)
+ base = this$1.finishNode(node$2, "CallExpression")
+ } else if (this$1.tok.type == tokTypes.backQuote) {
+ var node$3 = this$1.startNodeAt(start)
+ node$3.tag = base
+ node$3.quasi = this$1.parseTemplate()
+ base = this$1.finishNode(node$3, "TaggedTemplateExpression")
+ } else {
+ return base
+ }
+ }
+}
+
+lp$2.parseExprAtom = function() {
+ var node
+ switch (this.tok.type) {
+ case tokTypes._this:
+ case tokTypes._super:
+ var type = this.tok.type === tokTypes._this ? "ThisExpression" : "Super"
+ node = this.startNode()
+ this.next()
+ return this.finishNode(node, type)
+
+ case tokTypes.name:
+ var start = this.storeCurrentPos()
+ var id = this.parseIdent()
+ return this.eat(tokTypes.arrow) ? this.parseArrowExpression(this.startNodeAt(start), [id]) : id
+
+ case tokTypes.regexp:
+ node = this.startNode()
+ var val = this.tok.value
+ node.regex = {pattern: val.pattern, flags: val.flags}
+ node.value = val.value
+ node.raw = this.input.slice(this.tok.start, this.tok.end)
+ this.next()
+ return this.finishNode(node, "Literal")
+
+ case tokTypes.num: case tokTypes.string:
+ node = this.startNode()
+ node.value = this.tok.value
+ node.raw = this.input.slice(this.tok.start, this.tok.end)
+ this.next()
+ return this.finishNode(node, "Literal")
+
+ case tokTypes._null: case tokTypes._true: case tokTypes._false:
+ node = this.startNode()
+ node.value = this.tok.type === tokTypes._null ? null : this.tok.type === tokTypes._true
+ node.raw = this.tok.type.keyword
+ this.next()
+ return this.finishNode(node, "Literal")
+
+ case tokTypes.parenL:
+ var parenStart = this.storeCurrentPos()
+ this.next()
+ var inner = this.parseExpression()
+ this.expect(tokTypes.parenR)
+ if (this.eat(tokTypes.arrow)) {
+ return this.parseArrowExpression(this.startNodeAt(parenStart), inner.expressions || (isDummy(inner) ? [] : [inner]))
+ }
+ if (this.options.preserveParens) {
+ var par = this.startNodeAt(parenStart)
+ par.expression = inner
+ inner = this.finishNode(par, "ParenthesizedExpression")
+ }
+ return inner
+
+ case tokTypes.bracketL:
+ node = this.startNode()
+ node.elements = this.parseExprList(tokTypes.bracketR, true)
+ return this.finishNode(node, "ArrayExpression")
+
+ case tokTypes.braceL:
+ return this.parseObj()
+
+ case tokTypes._class:
+ return this.parseClass()
+
+ case tokTypes._function:
+ node = this.startNode()
+ this.next()
+ return this.parseFunction(node, false)
+
+ case tokTypes._new:
+ return this.parseNew()
+
+ case tokTypes.backQuote:
+ return this.parseTemplate()
+
+ default:
+ return this.dummyIdent()
+ }
+}
+
+lp$2.parseNew = function() {
+ var node = this.startNode(), startIndent = this.curIndent, line = this.curLineStart
+ var meta = this.parseIdent(true)
+ if (this.options.ecmaVersion >= 6 && this.eat(tokTypes.dot)) {
+ node.meta = meta
+ node.property = this.parseIdent(true)
+ return this.finishNode(node, "MetaProperty")
+ }
+ var start = this.storeCurrentPos()
+ node.callee = this.parseSubscripts(this.parseExprAtom(), start, true, startIndent, line)
+ if (this.tok.type == tokTypes.parenL) {
+ node.arguments = this.parseExprList(tokTypes.parenR)
+ } else {
+ node.arguments = []
+ }
+ return this.finishNode(node, "NewExpression")
+}
+
+lp$2.parseTemplateElement = function() {
+ var elem = this.startNode()
+ elem.value = {
+ raw: this.input.slice(this.tok.start, this.tok.end).replace(/\r\n?/g, '\n'),
+ cooked: this.tok.value
+ }
+ this.next()
+ elem.tail = this.tok.type === tokTypes.backQuote
+ return this.finishNode(elem, "TemplateElement")
+}
+
+lp$2.parseTemplate = function() {
+ var this$1 = this;
+
+ var node = this.startNode()
+ this.next()
+ node.expressions = []
+ var curElt = this.parseTemplateElement()
+ node.quasis = [curElt]
+ while (!curElt.tail) {
+ this$1.next()
+ node.expressions.push(this$1.parseExpression())
+ if (this$1.expect(tokTypes.braceR)) {
+ curElt = this$1.parseTemplateElement()
+ } else {
+ curElt = this$1.startNode()
+ curElt.value = {cooked: '', raw: ''}
+ curElt.tail = true
+ this$1.finishNode(curElt, "TemplateElement")
+ }
+ node.quasis.push(curElt)
+ }
+ this.expect(tokTypes.backQuote)
+ return this.finishNode(node, "TemplateLiteral")
+}
+
+lp$2.parseObj = function() {
+ var this$1 = this;
+
+ var node = this.startNode()
+ node.properties = []
+ this.pushCx()
+ var indent = this.curIndent + 1, line = this.curLineStart
+ this.eat(tokTypes.braceL)
+ if (this.curIndent + 1 < indent) { indent = this.curIndent; line = this.curLineStart }
+ while (!this.closes(tokTypes.braceR, indent, line)) {
+ var prop = this$1.startNode(), isGenerator, start
+ if (this$1.options.ecmaVersion >= 6) {
+ start = this$1.storeCurrentPos()
+ prop.method = false
+ prop.shorthand = false
+ isGenerator = this$1.eat(tokTypes.star)
+ }
+ this$1.parsePropertyName(prop)
+ if (isDummy(prop.key)) { if (isDummy(this$1.parseMaybeAssign())) this$1.next(); this$1.eat(tokTypes.comma); continue }
+ if (this$1.eat(tokTypes.colon)) {
+ prop.kind = "init"
+ prop.value = this$1.parseMaybeAssign()
+ } else if (this$1.options.ecmaVersion >= 6 && (this$1.tok.type === tokTypes.parenL || this$1.tok.type === tokTypes.braceL)) {
+ prop.kind = "init"
+ prop.method = true
+ prop.value = this$1.parseMethod(isGenerator)
+ } else if (this$1.options.ecmaVersion >= 5 && prop.key.type === "Identifier" &&
+ !prop.computed && (prop.key.name === "get" || prop.key.name === "set") &&
+ (this$1.tok.type != tokTypes.comma && this$1.tok.type != tokTypes.braceR)) {
+ prop.kind = prop.key.name
+ this$1.parsePropertyName(prop)
+ prop.value = this$1.parseMethod(false)
+ } else {
+ prop.kind = "init"
+ if (this$1.options.ecmaVersion >= 6) {
+ if (this$1.eat(tokTypes.eq)) {
+ var assign = this$1.startNodeAt(start)
+ assign.operator = "="
+ assign.left = prop.key
+ assign.right = this$1.parseMaybeAssign()
+ prop.value = this$1.finishNode(assign, "AssignmentExpression")
+ } else {
+ prop.value = prop.key
+ }
+ } else {
+ prop.value = this$1.dummyIdent()
+ }
+ prop.shorthand = true
+ }
+ node.properties.push(this$1.finishNode(prop, "Property"))
+ this$1.eat(tokTypes.comma)
+ }
+ this.popCx()
+ if (!this.eat(tokTypes.braceR)) {
+ // If there is no closing brace, make the node span to the start
+ // of the next token (this is useful for Tern)
+ this.last.end = this.tok.start
+ if (this.options.locations) this.last.loc.end = this.tok.loc.start
+ }
+ return this.finishNode(node, "ObjectExpression")
+}
+
+lp$2.parsePropertyName = function(prop) {
+ if (this.options.ecmaVersion >= 6) {
+ if (this.eat(tokTypes.bracketL)) {
+ prop.computed = true
+ prop.key = this.parseExpression()
+ this.expect(tokTypes.bracketR)
+ return
+ } else {
+ prop.computed = false
+ }
+ }
+ var key = (this.tok.type === tokTypes.num || this.tok.type === tokTypes.string) ? this.parseExprAtom() : this.parseIdent()
+ prop.key = key || this.dummyIdent()
+}
+
+lp$2.parsePropertyAccessor = function() {
+ if (this.tok.type === tokTypes.name || this.tok.type.keyword) return this.parseIdent()
+}
+
+lp$2.parseIdent = function() {
+ var name = this.tok.type === tokTypes.name ? this.tok.value : this.tok.type.keyword
+ if (!name) return this.dummyIdent()
+ var node = this.startNode()
+ this.next()
+ node.name = name
+ return this.finishNode(node, "Identifier")
+}
+
+lp$2.initFunction = function(node) {
+ node.id = null
+ node.params = []
+ if (this.options.ecmaVersion >= 6) {
+ node.generator = false
+ node.expression = false
+ }
+}
+
+// Convert existing expression atom to assignable pattern
+// if possible.
+
+lp$2.toAssignable = function(node, binding) {
+ var this$1 = this;
+
+ if (!node || node.type == "Identifier" || (node.type == "MemberExpression" && !binding)) {
+ // Okay
+ } else if (node.type == "ParenthesizedExpression") {
+ node.expression = this.toAssignable(node.expression, binding)
+ } else if (this.options.ecmaVersion < 6) {
+ return this.dummyIdent()
+ } else if (node.type == "ObjectExpression") {
+ node.type = "ObjectPattern"
+ var props = node.properties
+ for (var i = 0; i < props.length; i++)
+ props[i].value = this$1.toAssignable(props[i].value, binding)
+ } else if (node.type == "ArrayExpression") {
+ node.type = "ArrayPattern"
+ this.toAssignableList(node.elements, binding)
+ } else if (node.type == "SpreadElement") {
+ node.type = "RestElement"
+ node.argument = this.toAssignable(node.argument, binding)
+ } else if (node.type == "AssignmentExpression") {
+ node.type = "AssignmentPattern"
+ delete node.operator
+ } else {
+ return this.dummyIdent()
+ }
+ return node
+}
+
+lp$2.toAssignableList = function(exprList, binding) {
+ var this$1 = this;
+
+ for (var i = 0; i < exprList.length; i++)
+ exprList[i] = this$1.toAssignable(exprList[i], binding)
+ return exprList
+}
+
+lp$2.parseFunctionParams = function(params) {
+ params = this.parseExprList(tokTypes.parenR)
+ return this.toAssignableList(params, true)
+}
+
+lp$2.parseMethod = function(isGenerator) {
+ var node = this.startNode()
+ this.initFunction(node)
+ node.params = this.parseFunctionParams()
+ node.generator = isGenerator || false
+ node.expression = this.options.ecmaVersion >= 6 && this.tok.type !== tokTypes.braceL
+ node.body = node.expression ? this.parseMaybeAssign() : this.parseBlock()
+ return this.finishNode(node, "FunctionExpression")
+}
+
+lp$2.parseArrowExpression = function(node, params) {
+ this.initFunction(node)
+ node.params = this.toAssignableList(params, true)
+ node.expression = this.tok.type !== tokTypes.braceL
+ node.body = node.expression ? this.parseMaybeAssign() : this.parseBlock()
+ return this.finishNode(node, "ArrowFunctionExpression")
+}
+
+lp$2.parseExprList = function(close, allowEmpty) {
+ var this$1 = this;
+
+ this.pushCx()
+ var indent = this.curIndent, line = this.curLineStart, elts = []
+ this.next() // Opening bracket
+ while (!this.closes(close, indent + 1, line)) {
+ if (this$1.eat(tokTypes.comma)) {
+ elts.push(allowEmpty ? null : this$1.dummyIdent())
+ continue
+ }
+ var elt = this$1.parseMaybeAssign()
+ if (isDummy(elt)) {
+ if (this$1.closes(close, indent, line)) break
+ this$1.next()
+ } else {
+ elts.push(elt)
+ }
+ this$1.eat(tokTypes.comma)
+ }
+ this.popCx()
+ if (!this.eat(close)) {
+ // If there is no closing brace, make the node span to the start
+ // of the next token (this is useful for Tern)
+ this.last.end = this.tok.start
+ if (this.options.locations) this.last.loc.end = this.tok.loc.start
+ }
+ return elts
+}
+
+acorn.defaultOptions.tabSize = 4
+
+function parse_dammit(input, options) {
+ var p = new LooseParser(input, options)
+ p.next()
+ return p.parseTopLevel()
+}
+
+acorn.parse_dammit = parse_dammit
+acorn.LooseParser = LooseParser
+acorn.pluginsLoose = pluginsLoose
+
+export { parse_dammit, LooseParser, pluginsLoose }; \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn_loose.js b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn_loose.js
new file mode 100644
index 0000000000..26b9e48128
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn_loose.js
@@ -0,0 +1,1273 @@
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('./acorn.js')) :
+ typeof define === 'function' && define.amd ? define(['exports', './acorn.js'], factory) :
+ (factory((global.acorn = global.acorn || {}, global.acorn.loose = global.acorn.loose || {}),global.acorn));
+}(this, function (exports,acorn) { 'use strict';
+
+ var acorn__default = 'default' in acorn ? acorn['default'] : acorn;
+
+ // Registered plugins
+ var pluginsLoose = {}
+
+ var LooseParser = function LooseParser(input, options) {
+ if ( options === void 0 ) options = {};
+
+ this.toks = acorn.tokenizer(input, options)
+ this.options = this.toks.options
+ this.input = this.toks.input
+ this.tok = this.last = {type: acorn.tokTypes.eof, start: 0, end: 0}
+ if (this.options.locations) {
+ var here = this.toks.curPosition()
+ this.tok.loc = new acorn.SourceLocation(this.toks, here, here)
+ }
+ this.ahead = [] // Tokens ahead
+ this.context = [] // Indentation contexted
+ this.curIndent = 0
+ this.curLineStart = 0
+ this.nextLineStart = this.lineEnd(this.curLineStart) + 1
+ // Load plugins
+ this.options.pluginsLoose = options.pluginsLoose || {}
+ this.loadPlugins(this.options.pluginsLoose)
+ };
+
+ LooseParser.prototype.startNode = function startNode () {
+ return new acorn.Node(this.toks, this.tok.start, this.options.locations ? this.tok.loc.start : null)
+ };
+
+ LooseParser.prototype.storeCurrentPos = function storeCurrentPos () {
+ return this.options.locations ? [this.tok.start, this.tok.loc.start] : this.tok.start
+ };
+
+ LooseParser.prototype.startNodeAt = function startNodeAt (pos) {
+ if (this.options.locations) {
+ return new acorn.Node(this.toks, pos[0], pos[1])
+ } else {
+ return new acorn.Node(this.toks, pos)
+ }
+ };
+
+ LooseParser.prototype.finishNode = function finishNode (node, type) {
+ node.type = type
+ node.end = this.last.end
+ if (this.options.locations)
+ node.loc.end = this.last.loc.end
+ if (this.options.ranges)
+ node.range[1] = this.last.end
+ return node
+ };
+
+ LooseParser.prototype.dummyNode = function dummyNode (type) {
+ var dummy = this.startNode()
+ dummy.type = type
+ dummy.end = dummy.start
+ if (this.options.locations)
+ dummy.loc.end = dummy.loc.start
+ if (this.options.ranges)
+ dummy.range[1] = dummy.start
+ this.last = {type: acorn.tokTypes.name, start: dummy.start, end: dummy.start, loc: dummy.loc}
+ return dummy
+ };
+
+ LooseParser.prototype.dummyIdent = function dummyIdent () {
+ var dummy = this.dummyNode("Identifier")
+ dummy.name = "✖"
+ return dummy
+ };
+
+ LooseParser.prototype.dummyString = function dummyString () {
+ var dummy = this.dummyNode("Literal")
+ dummy.value = dummy.raw = "✖"
+ return dummy
+ };
+
+ LooseParser.prototype.eat = function eat (type) {
+ if (this.tok.type === type) {
+ this.next()
+ return true
+ } else {
+ return false
+ }
+ };
+
+ LooseParser.prototype.isContextual = function isContextual (name) {
+ return this.tok.type === acorn.tokTypes.name && this.tok.value === name
+ };
+
+ LooseParser.prototype.eatContextual = function eatContextual (name) {
+ return this.tok.value === name && this.eat(acorn.tokTypes.name)
+ };
+
+ LooseParser.prototype.canInsertSemicolon = function canInsertSemicolon () {
+ return this.tok.type === acorn.tokTypes.eof || this.tok.type === acorn.tokTypes.braceR ||
+ acorn.lineBreak.test(this.input.slice(this.last.end, this.tok.start))
+ };
+
+ LooseParser.prototype.semicolon = function semicolon () {
+ return this.eat(acorn.tokTypes.semi)
+ };
+
+ LooseParser.prototype.expect = function expect (type) {
+ var this$1 = this;
+
+ if (this.eat(type)) return true
+ for (var i = 1; i <= 2; i++) {
+ if (this$1.lookAhead(i).type == type) {
+ for (var j = 0; j < i; j++) this$1.next()
+ return true
+ }
+ }
+ };
+
+ LooseParser.prototype.pushCx = function pushCx () {
+ this.context.push(this.curIndent)
+ };
+
+ LooseParser.prototype.popCx = function popCx () {
+ this.curIndent = this.context.pop()
+ };
+
+ LooseParser.prototype.lineEnd = function lineEnd (pos) {
+ while (pos < this.input.length && !acorn.isNewLine(this.input.charCodeAt(pos))) ++pos
+ return pos
+ };
+
+ LooseParser.prototype.indentationAfter = function indentationAfter (pos) {
+ var this$1 = this;
+
+ for (var count = 0;; ++pos) {
+ var ch = this$1.input.charCodeAt(pos)
+ if (ch === 32) ++count
+ else if (ch === 9) count += this$1.options.tabSize
+ else return count
+ }
+ };
+
+ LooseParser.prototype.closes = function closes (closeTok, indent, line, blockHeuristic) {
+ if (this.tok.type === closeTok || this.tok.type === acorn.tokTypes.eof) return true
+ return line != this.curLineStart && this.curIndent < indent && this.tokenStartsLine() &&
+ (!blockHeuristic || this.nextLineStart >= this.input.length ||
+ this.indentationAfter(this.nextLineStart) < indent)
+ };
+
+ LooseParser.prototype.tokenStartsLine = function tokenStartsLine () {
+ var this$1 = this;
+
+ for (var p = this.tok.start - 1; p >= this.curLineStart; --p) {
+ var ch = this$1.input.charCodeAt(p)
+ if (ch !== 9 && ch !== 32) return false
+ }
+ return true
+ };
+
+ LooseParser.prototype.extend = function extend (name, f) {
+ this[name] = f(this[name])
+ };
+
+ LooseParser.prototype.loadPlugins = function loadPlugins (pluginConfigs) {
+ var this$1 = this;
+
+ for (var name in pluginConfigs) {
+ var plugin = pluginsLoose[name]
+ if (!plugin) throw new Error("Plugin '" + name + "' not found")
+ plugin(this$1, pluginConfigs[name])
+ }
+ };
+
+ var lp = LooseParser.prototype
+
+ function isSpace(ch) {
+ return (ch < 14 && ch > 8) || ch === 32 || ch === 160 || acorn.isNewLine(ch)
+ }
+
+ lp.next = function() {
+ var this$1 = this;
+
+ this.last = this.tok
+ if (this.ahead.length)
+ this.tok = this.ahead.shift()
+ else
+ this.tok = this.readToken()
+
+ if (this.tok.start >= this.nextLineStart) {
+ while (this.tok.start >= this.nextLineStart) {
+ this$1.curLineStart = this$1.nextLineStart
+ this$1.nextLineStart = this$1.lineEnd(this$1.curLineStart) + 1
+ }
+ this.curIndent = this.indentationAfter(this.curLineStart)
+ }
+ }
+
+ lp.readToken = function() {
+ var this$1 = this;
+
+ for (;;) {
+ try {
+ this$1.toks.next()
+ if (this$1.toks.type === acorn.tokTypes.dot &&
+ this$1.input.substr(this$1.toks.end, 1) === "." &&
+ this$1.options.ecmaVersion >= 6) {
+ this$1.toks.end++
+ this$1.toks.type = acorn.tokTypes.ellipsis
+ }
+ return new acorn.Token(this$1.toks)
+ } catch(e) {
+ if (!(e instanceof SyntaxError)) throw e
+
+ // Try to skip some text, based on the error message, and then continue
+ var msg = e.message, pos = e.raisedAt, replace = true
+ if (/unterminated/i.test(msg)) {
+ pos = this$1.lineEnd(e.pos + 1)
+ if (/string/.test(msg)) {
+ replace = {start: e.pos, end: pos, type: acorn.tokTypes.string, value: this$1.input.slice(e.pos + 1, pos)}
+ } else if (/regular expr/i.test(msg)) {
+ var re = this$1.input.slice(e.pos, pos)
+ try { re = new RegExp(re) } catch(e) {}
+ replace = {start: e.pos, end: pos, type: acorn.tokTypes.regexp, value: re}
+ } else if (/template/.test(msg)) {
+ replace = {start: e.pos, end: pos,
+ type: acorn.tokTypes.template,
+ value: this$1.input.slice(e.pos, pos)}
+ } else {
+ replace = false
+ }
+ } else if (/invalid (unicode|regexp|number)|expecting unicode|octal literal|is reserved|directly after number|expected number in radix/i.test(msg)) {
+ while (pos < this.input.length && !isSpace(this.input.charCodeAt(pos))) ++pos
+ } else if (/character escape|expected hexadecimal/i.test(msg)) {
+ while (pos < this.input.length) {
+ var ch = this$1.input.charCodeAt(pos++)
+ if (ch === 34 || ch === 39 || acorn.isNewLine(ch)) break
+ }
+ } else if (/unexpected character/i.test(msg)) {
+ pos++
+ replace = false
+ } else if (/regular expression/i.test(msg)) {
+ replace = true
+ } else {
+ throw e
+ }
+ this$1.resetTo(pos)
+ if (replace === true) replace = {start: pos, end: pos, type: acorn.tokTypes.name, value: "✖"}
+ if (replace) {
+ if (this$1.options.locations)
+ replace.loc = new acorn.SourceLocation(
+ this$1.toks,
+ acorn.getLineInfo(this$1.input, replace.start),
+ acorn.getLineInfo(this$1.input, replace.end))
+ return replace
+ }
+ }
+ }
+ }
+
+ lp.resetTo = function(pos) {
+ var this$1 = this;
+
+ this.toks.pos = pos
+ var ch = this.input.charAt(pos - 1)
+ this.toks.exprAllowed = !ch || /[\[\{\(,;:?\/*=+\-~!|&%^<>]/.test(ch) ||
+ /[enwfd]/.test(ch) &&
+ /\b(keywords|case|else|return|throw|new|in|(instance|type)of|delete|void)$/.test(this.input.slice(pos - 10, pos))
+
+ if (this.options.locations) {
+ this.toks.curLine = 1
+ this.toks.lineStart = acorn.lineBreakG.lastIndex = 0
+ var match
+ while ((match = acorn.lineBreakG.exec(this.input)) && match.index < pos) {
+ ++this$1.toks.curLine
+ this$1.toks.lineStart = match.index + match[0].length
+ }
+ }
+ }
+
+ lp.lookAhead = function(n) {
+ var this$1 = this;
+
+ while (n > this.ahead.length)
+ this$1.ahead.push(this$1.readToken())
+ return this.ahead[n - 1]
+ }
+
+ function isDummy(node) { return node.name == "✖" }
+
+ var lp$1 = LooseParser.prototype
+
+ lp$1.parseTopLevel = function() {
+ var this$1 = this;
+
+ var node = this.startNodeAt(this.options.locations ? [0, acorn.getLineInfo(this.input, 0)] : 0)
+ node.body = []
+ while (this.tok.type !== acorn.tokTypes.eof) node.body.push(this$1.parseStatement())
+ this.last = this.tok
+ if (this.options.ecmaVersion >= 6) {
+ node.sourceType = this.options.sourceType
+ }
+ return this.finishNode(node, "Program")
+ }
+
+ lp$1.parseStatement = function() {
+ var this$1 = this;
+
+ var starttype = this.tok.type, node = this.startNode(), kind
+
+ if (this.toks.isLet()) {
+ starttype = acorn.tokTypes._var
+ kind = "let"
+ }
+
+ switch (starttype) {
+ case acorn.tokTypes._break: case acorn.tokTypes._continue:
+ this.next()
+ var isBreak = starttype === acorn.tokTypes._break
+ if (this.semicolon() || this.canInsertSemicolon()) {
+ node.label = null
+ } else {
+ node.label = this.tok.type === acorn.tokTypes.name ? this.parseIdent() : null
+ this.semicolon()
+ }
+ return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement")
+
+ case acorn.tokTypes._debugger:
+ this.next()
+ this.semicolon()
+ return this.finishNode(node, "DebuggerStatement")
+
+ case acorn.tokTypes._do:
+ this.next()
+ node.body = this.parseStatement()
+ node.test = this.eat(acorn.tokTypes._while) ? this.parseParenExpression() : this.dummyIdent()
+ this.semicolon()
+ return this.finishNode(node, "DoWhileStatement")
+
+ case acorn.tokTypes._for:
+ this.next()
+ this.pushCx()
+ this.expect(acorn.tokTypes.parenL)
+ if (this.tok.type === acorn.tokTypes.semi) return this.parseFor(node, null)
+ var isLet = this.toks.isLet()
+ if (isLet || this.tok.type === acorn.tokTypes._var || this.tok.type === acorn.tokTypes._const) {
+ var init$1 = this.parseVar(true, isLet ? "let" : this.tok.value)
+ if (init$1.declarations.length === 1 && (this.tok.type === acorn.tokTypes._in || this.isContextual("of"))) {
+ return this.parseForIn(node, init$1)
+ }
+ return this.parseFor(node, init$1)
+ }
+ var init = this.parseExpression(true)
+ if (this.tok.type === acorn.tokTypes._in || this.isContextual("of"))
+ return this.parseForIn(node, this.toAssignable(init))
+ return this.parseFor(node, init)
+
+ case acorn.tokTypes._function:
+ this.next()
+ return this.parseFunction(node, true)
+
+ case acorn.tokTypes._if:
+ this.next()
+ node.test = this.parseParenExpression()
+ node.consequent = this.parseStatement()
+ node.alternate = this.eat(acorn.tokTypes._else) ? this.parseStatement() : null
+ return this.finishNode(node, "IfStatement")
+
+ case acorn.tokTypes._return:
+ this.next()
+ if (this.eat(acorn.tokTypes.semi) || this.canInsertSemicolon()) node.argument = null
+ else { node.argument = this.parseExpression(); this.semicolon() }
+ return this.finishNode(node, "ReturnStatement")
+
+ case acorn.tokTypes._switch:
+ var blockIndent = this.curIndent, line = this.curLineStart
+ this.next()
+ node.discriminant = this.parseParenExpression()
+ node.cases = []
+ this.pushCx()
+ this.expect(acorn.tokTypes.braceL)
+
+ var cur
+ while (!this.closes(acorn.tokTypes.braceR, blockIndent, line, true)) {
+ if (this$1.tok.type === acorn.tokTypes._case || this$1.tok.type === acorn.tokTypes._default) {
+ var isCase = this$1.tok.type === acorn.tokTypes._case
+ if (cur) this$1.finishNode(cur, "SwitchCase")
+ node.cases.push(cur = this$1.startNode())
+ cur.consequent = []
+ this$1.next()
+ if (isCase) cur.test = this$1.parseExpression()
+ else cur.test = null
+ this$1.expect(acorn.tokTypes.colon)
+ } else {
+ if (!cur) {
+ node.cases.push(cur = this$1.startNode())
+ cur.consequent = []
+ cur.test = null
+ }
+ cur.consequent.push(this$1.parseStatement())
+ }
+ }
+ if (cur) this.finishNode(cur, "SwitchCase")
+ this.popCx()
+ this.eat(acorn.tokTypes.braceR)
+ return this.finishNode(node, "SwitchStatement")
+
+ case acorn.tokTypes._throw:
+ this.next()
+ node.argument = this.parseExpression()
+ this.semicolon()
+ return this.finishNode(node, "ThrowStatement")
+
+ case acorn.tokTypes._try:
+ this.next()
+ node.block = this.parseBlock()
+ node.handler = null
+ if (this.tok.type === acorn.tokTypes._catch) {
+ var clause = this.startNode()
+ this.next()
+ this.expect(acorn.tokTypes.parenL)
+ clause.param = this.toAssignable(this.parseExprAtom(), true)
+ this.expect(acorn.tokTypes.parenR)
+ clause.body = this.parseBlock()
+ node.handler = this.finishNode(clause, "CatchClause")
+ }
+ node.finalizer = this.eat(acorn.tokTypes._finally) ? this.parseBlock() : null
+ if (!node.handler && !node.finalizer) return node.block
+ return this.finishNode(node, "TryStatement")
+
+ case acorn.tokTypes._var:
+ case acorn.tokTypes._const:
+ return this.parseVar(false, kind || this.tok.value)
+
+ case acorn.tokTypes._while:
+ this.next()
+ node.test = this.parseParenExpression()
+ node.body = this.parseStatement()
+ return this.finishNode(node, "WhileStatement")
+
+ case acorn.tokTypes._with:
+ this.next()
+ node.object = this.parseParenExpression()
+ node.body = this.parseStatement()
+ return this.finishNode(node, "WithStatement")
+
+ case acorn.tokTypes.braceL:
+ return this.parseBlock()
+
+ case acorn.tokTypes.semi:
+ this.next()
+ return this.finishNode(node, "EmptyStatement")
+
+ case acorn.tokTypes._class:
+ return this.parseClass(true)
+
+ case acorn.tokTypes._import:
+ return this.parseImport()
+
+ case acorn.tokTypes._export:
+ return this.parseExport()
+
+ default:
+ var expr = this.parseExpression()
+ if (isDummy(expr)) {
+ this.next()
+ if (this.tok.type === acorn.tokTypes.eof) return this.finishNode(node, "EmptyStatement")
+ return this.parseStatement()
+ } else if (starttype === acorn.tokTypes.name && expr.type === "Identifier" && this.eat(acorn.tokTypes.colon)) {
+ node.body = this.parseStatement()
+ node.label = expr
+ return this.finishNode(node, "LabeledStatement")
+ } else {
+ node.expression = expr
+ this.semicolon()
+ return this.finishNode(node, "ExpressionStatement")
+ }
+ }
+ }
+
+ lp$1.parseBlock = function() {
+ var this$1 = this;
+
+ var node = this.startNode()
+ this.pushCx()
+ this.expect(acorn.tokTypes.braceL)
+ var blockIndent = this.curIndent, line = this.curLineStart
+ node.body = []
+ while (!this.closes(acorn.tokTypes.braceR, blockIndent, line, true))
+ node.body.push(this$1.parseStatement())
+ this.popCx()
+ this.eat(acorn.tokTypes.braceR)
+ return this.finishNode(node, "BlockStatement")
+ }
+
+ lp$1.parseFor = function(node, init) {
+ node.init = init
+ node.test = node.update = null
+ if (this.eat(acorn.tokTypes.semi) && this.tok.type !== acorn.tokTypes.semi) node.test = this.parseExpression()
+ if (this.eat(acorn.tokTypes.semi) && this.tok.type !== acorn.tokTypes.parenR) node.update = this.parseExpression()
+ this.popCx()
+ this.expect(acorn.tokTypes.parenR)
+ node.body = this.parseStatement()
+ return this.finishNode(node, "ForStatement")
+ }
+
+ lp$1.parseForIn = function(node, init) {
+ var type = this.tok.type === acorn.tokTypes._in ? "ForInStatement" : "ForOfStatement"
+ this.next()
+ node.left = init
+ node.right = this.parseExpression()
+ this.popCx()
+ this.expect(acorn.tokTypes.parenR)
+ node.body = this.parseStatement()
+ return this.finishNode(node, type)
+ }
+
+ lp$1.parseVar = function(noIn, kind) {
+ var this$1 = this;
+
+ var node = this.startNode()
+ node.kind = kind
+ this.next()
+ node.declarations = []
+ do {
+ var decl = this$1.startNode()
+ decl.id = this$1.options.ecmaVersion >= 6 ? this$1.toAssignable(this$1.parseExprAtom(), true) : this$1.parseIdent()
+ decl.init = this$1.eat(acorn.tokTypes.eq) ? this$1.parseMaybeAssign(noIn) : null
+ node.declarations.push(this$1.finishNode(decl, "VariableDeclarator"))
+ } while (this.eat(acorn.tokTypes.comma))
+ if (!node.declarations.length) {
+ var decl$1 = this.startNode()
+ decl$1.id = this.dummyIdent()
+ node.declarations.push(this.finishNode(decl$1, "VariableDeclarator"))
+ }
+ if (!noIn) this.semicolon()
+ return this.finishNode(node, "VariableDeclaration")
+ }
+
+ lp$1.parseClass = function(isStatement) {
+ var this$1 = this;
+
+ var node = this.startNode()
+ this.next()
+ if (this.tok.type === acorn.tokTypes.name) node.id = this.parseIdent()
+ else if (isStatement) node.id = this.dummyIdent()
+ else node.id = null
+ node.superClass = this.eat(acorn.tokTypes._extends) ? this.parseExpression() : null
+ node.body = this.startNode()
+ node.body.body = []
+ this.pushCx()
+ var indent = this.curIndent + 1, line = this.curLineStart
+ this.eat(acorn.tokTypes.braceL)
+ if (this.curIndent + 1 < indent) { indent = this.curIndent; line = this.curLineStart }
+ while (!this.closes(acorn.tokTypes.braceR, indent, line)) {
+ if (this$1.semicolon()) continue
+ var method = this$1.startNode(), isGenerator
+ if (this$1.options.ecmaVersion >= 6) {
+ method.static = false
+ isGenerator = this$1.eat(acorn.tokTypes.star)
+ }
+ this$1.parsePropertyName(method)
+ if (isDummy(method.key)) { if (isDummy(this$1.parseMaybeAssign())) this$1.next(); this$1.eat(acorn.tokTypes.comma); continue }
+ if (method.key.type === "Identifier" && !method.computed && method.key.name === "static" &&
+ (this$1.tok.type != acorn.tokTypes.parenL && this$1.tok.type != acorn.tokTypes.braceL)) {
+ method.static = true
+ isGenerator = this$1.eat(acorn.tokTypes.star)
+ this$1.parsePropertyName(method)
+ } else {
+ method.static = false
+ }
+ if (this$1.options.ecmaVersion >= 5 && method.key.type === "Identifier" &&
+ !method.computed && (method.key.name === "get" || method.key.name === "set") &&
+ this$1.tok.type !== acorn.tokTypes.parenL && this$1.tok.type !== acorn.tokTypes.braceL) {
+ method.kind = method.key.name
+ this$1.parsePropertyName(method)
+ method.value = this$1.parseMethod(false)
+ } else {
+ if (!method.computed && !method.static && !isGenerator && (
+ method.key.type === "Identifier" && method.key.name === "constructor" ||
+ method.key.type === "Literal" && method.key.value === "constructor")) {
+ method.kind = "constructor"
+ } else {
+ method.kind = "method"
+ }
+ method.value = this$1.parseMethod(isGenerator)
+ }
+ node.body.body.push(this$1.finishNode(method, "MethodDefinition"))
+ }
+ this.popCx()
+ if (!this.eat(acorn.tokTypes.braceR)) {
+ // If there is no closing brace, make the node span to the start
+ // of the next token (this is useful for Tern)
+ this.last.end = this.tok.start
+ if (this.options.locations) this.last.loc.end = this.tok.loc.start
+ }
+ this.semicolon()
+ this.finishNode(node.body, "ClassBody")
+ return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression")
+ }
+
+ lp$1.parseFunction = function(node, isStatement) {
+ this.initFunction(node)
+ if (this.options.ecmaVersion >= 6) {
+ node.generator = this.eat(acorn.tokTypes.star)
+ }
+ if (this.tok.type === acorn.tokTypes.name) node.id = this.parseIdent()
+ else if (isStatement) node.id = this.dummyIdent()
+ node.params = this.parseFunctionParams()
+ node.body = this.parseBlock()
+ return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression")
+ }
+
+ lp$1.parseExport = function() {
+ var node = this.startNode()
+ this.next()
+ if (this.eat(acorn.tokTypes.star)) {
+ node.source = this.eatContextual("from") ? this.parseExprAtom() : this.dummyString()
+ return this.finishNode(node, "ExportAllDeclaration")
+ }
+ if (this.eat(acorn.tokTypes._default)) {
+ var expr = this.parseMaybeAssign()
+ if (expr.id) {
+ switch (expr.type) {
+ case "FunctionExpression": expr.type = "FunctionDeclaration"; break
+ case "ClassExpression": expr.type = "ClassDeclaration"; break
+ }
+ }
+ node.declaration = expr
+ this.semicolon()
+ return this.finishNode(node, "ExportDefaultDeclaration")
+ }
+ if (this.tok.type.keyword || this.toks.isLet()) {
+ node.declaration = this.parseStatement()
+ node.specifiers = []
+ node.source = null
+ } else {
+ node.declaration = null
+ node.specifiers = this.parseExportSpecifierList()
+ node.source = this.eatContextual("from") ? this.parseExprAtom() : null
+ this.semicolon()
+ }
+ return this.finishNode(node, "ExportNamedDeclaration")
+ }
+
+ lp$1.parseImport = function() {
+ var node = this.startNode()
+ this.next()
+ if (this.tok.type === acorn.tokTypes.string) {
+ node.specifiers = []
+ node.source = this.parseExprAtom()
+ node.kind = ''
+ } else {
+ var elt
+ if (this.tok.type === acorn.tokTypes.name && this.tok.value !== "from") {
+ elt = this.startNode()
+ elt.local = this.parseIdent()
+ this.finishNode(elt, "ImportDefaultSpecifier")
+ this.eat(acorn.tokTypes.comma)
+ }
+ node.specifiers = this.parseImportSpecifierList()
+ node.source = this.eatContextual("from") && this.tok.type == acorn.tokTypes.string ? this.parseExprAtom() : this.dummyString()
+ if (elt) node.specifiers.unshift(elt)
+ }
+ this.semicolon()
+ return this.finishNode(node, "ImportDeclaration")
+ }
+
+ lp$1.parseImportSpecifierList = function() {
+ var this$1 = this;
+
+ var elts = []
+ if (this.tok.type === acorn.tokTypes.star) {
+ var elt = this.startNode()
+ this.next()
+ elt.local = this.eatContextual("as") ? this.parseIdent() : this.dummyIdent()
+ elts.push(this.finishNode(elt, "ImportNamespaceSpecifier"))
+ } else {
+ var indent = this.curIndent, line = this.curLineStart, continuedLine = this.nextLineStart
+ this.pushCx()
+ this.eat(acorn.tokTypes.braceL)
+ if (this.curLineStart > continuedLine) continuedLine = this.curLineStart
+ while (!this.closes(acorn.tokTypes.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) {
+ var elt$1 = this$1.startNode()
+ if (this$1.eat(acorn.tokTypes.star)) {
+ elt$1.local = this$1.eatContextual("as") ? this$1.parseIdent() : this$1.dummyIdent()
+ this$1.finishNode(elt$1, "ImportNamespaceSpecifier")
+ } else {
+ if (this$1.isContextual("from")) break
+ elt$1.imported = this$1.parseIdent()
+ if (isDummy(elt$1.imported)) break
+ elt$1.local = this$1.eatContextual("as") ? this$1.parseIdent() : elt$1.imported
+ this$1.finishNode(elt$1, "ImportSpecifier")
+ }
+ elts.push(elt$1)
+ this$1.eat(acorn.tokTypes.comma)
+ }
+ this.eat(acorn.tokTypes.braceR)
+ this.popCx()
+ }
+ return elts
+ }
+
+ lp$1.parseExportSpecifierList = function() {
+ var this$1 = this;
+
+ var elts = []
+ var indent = this.curIndent, line = this.curLineStart, continuedLine = this.nextLineStart
+ this.pushCx()
+ this.eat(acorn.tokTypes.braceL)
+ if (this.curLineStart > continuedLine) continuedLine = this.curLineStart
+ while (!this.closes(acorn.tokTypes.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) {
+ if (this$1.isContextual("from")) break
+ var elt = this$1.startNode()
+ elt.local = this$1.parseIdent()
+ if (isDummy(elt.local)) break
+ elt.exported = this$1.eatContextual("as") ? this$1.parseIdent() : elt.local
+ this$1.finishNode(elt, "ExportSpecifier")
+ elts.push(elt)
+ this$1.eat(acorn.tokTypes.comma)
+ }
+ this.eat(acorn.tokTypes.braceR)
+ this.popCx()
+ return elts
+ }
+
+ var lp$2 = LooseParser.prototype
+
+ lp$2.checkLVal = function(expr) {
+ if (!expr) return expr
+ switch (expr.type) {
+ case "Identifier":
+ case "MemberExpression":
+ return expr
+
+ case "ParenthesizedExpression":
+ expr.expression = this.checkLVal(expr.expression)
+ return expr
+
+ default:
+ return this.dummyIdent()
+ }
+ }
+
+ lp$2.parseExpression = function(noIn) {
+ var this$1 = this;
+
+ var start = this.storeCurrentPos()
+ var expr = this.parseMaybeAssign(noIn)
+ if (this.tok.type === acorn.tokTypes.comma) {
+ var node = this.startNodeAt(start)
+ node.expressions = [expr]
+ while (this.eat(acorn.tokTypes.comma)) node.expressions.push(this$1.parseMaybeAssign(noIn))
+ return this.finishNode(node, "SequenceExpression")
+ }
+ return expr
+ }
+
+ lp$2.parseParenExpression = function() {
+ this.pushCx()
+ this.expect(acorn.tokTypes.parenL)
+ var val = this.parseExpression()
+ this.popCx()
+ this.expect(acorn.tokTypes.parenR)
+ return val
+ }
+
+ lp$2.parseMaybeAssign = function(noIn) {
+ if (this.toks.isContextual("yield")) {
+ var node = this.startNode()
+ this.next()
+ if (this.semicolon() || this.canInsertSemicolon() || (this.tok.type != acorn.tokTypes.star && !this.tok.type.startsExpr)) {
+ node.delegate = false
+ node.argument = null
+ } else {
+ node.delegate = this.eat(acorn.tokTypes.star)
+ node.argument = this.parseMaybeAssign()
+ }
+ return this.finishNode(node, "YieldExpression")
+ }
+
+ var start = this.storeCurrentPos()
+ var left = this.parseMaybeConditional(noIn)
+ if (this.tok.type.isAssign) {
+ var node$1 = this.startNodeAt(start)
+ node$1.operator = this.tok.value
+ node$1.left = this.tok.type === acorn.tokTypes.eq ? this.toAssignable(left) : this.checkLVal(left)
+ this.next()
+ node$1.right = this.parseMaybeAssign(noIn)
+ return this.finishNode(node$1, "AssignmentExpression")
+ }
+ return left
+ }
+
+ lp$2.parseMaybeConditional = function(noIn) {
+ var start = this.storeCurrentPos()
+ var expr = this.parseExprOps(noIn)
+ if (this.eat(acorn.tokTypes.question)) {
+ var node = this.startNodeAt(start)
+ node.test = expr
+ node.consequent = this.parseMaybeAssign()
+ node.alternate = this.expect(acorn.tokTypes.colon) ? this.parseMaybeAssign(noIn) : this.dummyIdent()
+ return this.finishNode(node, "ConditionalExpression")
+ }
+ return expr
+ }
+
+ lp$2.parseExprOps = function(noIn) {
+ var start = this.storeCurrentPos()
+ var indent = this.curIndent, line = this.curLineStart
+ return this.parseExprOp(this.parseMaybeUnary(false), start, -1, noIn, indent, line)
+ }
+
+ lp$2.parseExprOp = function(left, start, minPrec, noIn, indent, line) {
+ if (this.curLineStart != line && this.curIndent < indent && this.tokenStartsLine()) return left
+ var prec = this.tok.type.binop
+ if (prec != null && (!noIn || this.tok.type !== acorn.tokTypes._in)) {
+ if (prec > minPrec) {
+ var node = this.startNodeAt(start)
+ node.left = left
+ node.operator = this.tok.value
+ this.next()
+ if (this.curLineStart != line && this.curIndent < indent && this.tokenStartsLine()) {
+ node.right = this.dummyIdent()
+ } else {
+ var rightStart = this.storeCurrentPos()
+ node.right = this.parseExprOp(this.parseMaybeUnary(false), rightStart, prec, noIn, indent, line)
+ }
+ this.finishNode(node, /&&|\|\|/.test(node.operator) ? "LogicalExpression" : "BinaryExpression")
+ return this.parseExprOp(node, start, minPrec, noIn, indent, line)
+ }
+ }
+ return left
+ }
+
+ lp$2.parseMaybeUnary = function(sawUnary) {
+ var this$1 = this;
+
+ var start = this.storeCurrentPos(), expr
+ if (this.tok.type.prefix) {
+ var node = this.startNode(), update = this.tok.type === acorn.tokTypes.incDec
+ if (!update) sawUnary = true
+ node.operator = this.tok.value
+ node.prefix = true
+ this.next()
+ node.argument = this.parseMaybeUnary(true)
+ if (update) node.argument = this.checkLVal(node.argument)
+ expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression")
+ } else if (this.tok.type === acorn.tokTypes.ellipsis) {
+ var node$1 = this.startNode()
+ this.next()
+ node$1.argument = this.parseMaybeUnary(sawUnary)
+ expr = this.finishNode(node$1, "SpreadElement")
+ } else {
+ expr = this.parseExprSubscripts()
+ while (this.tok.type.postfix && !this.canInsertSemicolon()) {
+ var node$2 = this$1.startNodeAt(start)
+ node$2.operator = this$1.tok.value
+ node$2.prefix = false
+ node$2.argument = this$1.checkLVal(expr)
+ this$1.next()
+ expr = this$1.finishNode(node$2, "UpdateExpression")
+ }
+ }
+
+ if (!sawUnary && this.eat(acorn.tokTypes.starstar)) {
+ var node$3 = this.startNodeAt(start)
+ node$3.operator = "**"
+ node$3.left = expr
+ node$3.right = this.parseMaybeUnary(false)
+ return this.finishNode(node$3, "BinaryExpression")
+ }
+
+ return expr
+ }
+
+ lp$2.parseExprSubscripts = function() {
+ var start = this.storeCurrentPos()
+ return this.parseSubscripts(this.parseExprAtom(), start, false, this.curIndent, this.curLineStart)
+ }
+
+ lp$2.parseSubscripts = function(base, start, noCalls, startIndent, line) {
+ var this$1 = this;
+
+ for (;;) {
+ if (this$1.curLineStart != line && this$1.curIndent <= startIndent && this$1.tokenStartsLine()) {
+ if (this$1.tok.type == acorn.tokTypes.dot && this$1.curIndent == startIndent)
+ --startIndent
+ else
+ return base
+ }
+
+ if (this$1.eat(acorn.tokTypes.dot)) {
+ var node = this$1.startNodeAt(start)
+ node.object = base
+ if (this$1.curLineStart != line && this$1.curIndent <= startIndent && this$1.tokenStartsLine())
+ node.property = this$1.dummyIdent()
+ else
+ node.property = this$1.parsePropertyAccessor() || this$1.dummyIdent()
+ node.computed = false
+ base = this$1.finishNode(node, "MemberExpression")
+ } else if (this$1.tok.type == acorn.tokTypes.bracketL) {
+ this$1.pushCx()
+ this$1.next()
+ var node$1 = this$1.startNodeAt(start)
+ node$1.object = base
+ node$1.property = this$1.parseExpression()
+ node$1.computed = true
+ this$1.popCx()
+ this$1.expect(acorn.tokTypes.bracketR)
+ base = this$1.finishNode(node$1, "MemberExpression")
+ } else if (!noCalls && this$1.tok.type == acorn.tokTypes.parenL) {
+ var node$2 = this$1.startNodeAt(start)
+ node$2.callee = base
+ node$2.arguments = this$1.parseExprList(acorn.tokTypes.parenR)
+ base = this$1.finishNode(node$2, "CallExpression")
+ } else if (this$1.tok.type == acorn.tokTypes.backQuote) {
+ var node$3 = this$1.startNodeAt(start)
+ node$3.tag = base
+ node$3.quasi = this$1.parseTemplate()
+ base = this$1.finishNode(node$3, "TaggedTemplateExpression")
+ } else {
+ return base
+ }
+ }
+ }
+
+ lp$2.parseExprAtom = function() {
+ var node
+ switch (this.tok.type) {
+ case acorn.tokTypes._this:
+ case acorn.tokTypes._super:
+ var type = this.tok.type === acorn.tokTypes._this ? "ThisExpression" : "Super"
+ node = this.startNode()
+ this.next()
+ return this.finishNode(node, type)
+
+ case acorn.tokTypes.name:
+ var start = this.storeCurrentPos()
+ var id = this.parseIdent()
+ return this.eat(acorn.tokTypes.arrow) ? this.parseArrowExpression(this.startNodeAt(start), [id]) : id
+
+ case acorn.tokTypes.regexp:
+ node = this.startNode()
+ var val = this.tok.value
+ node.regex = {pattern: val.pattern, flags: val.flags}
+ node.value = val.value
+ node.raw = this.input.slice(this.tok.start, this.tok.end)
+ this.next()
+ return this.finishNode(node, "Literal")
+
+ case acorn.tokTypes.num: case acorn.tokTypes.string:
+ node = this.startNode()
+ node.value = this.tok.value
+ node.raw = this.input.slice(this.tok.start, this.tok.end)
+ this.next()
+ return this.finishNode(node, "Literal")
+
+ case acorn.tokTypes._null: case acorn.tokTypes._true: case acorn.tokTypes._false:
+ node = this.startNode()
+ node.value = this.tok.type === acorn.tokTypes._null ? null : this.tok.type === acorn.tokTypes._true
+ node.raw = this.tok.type.keyword
+ this.next()
+ return this.finishNode(node, "Literal")
+
+ case acorn.tokTypes.parenL:
+ var parenStart = this.storeCurrentPos()
+ this.next()
+ var inner = this.parseExpression()
+ this.expect(acorn.tokTypes.parenR)
+ if (this.eat(acorn.tokTypes.arrow)) {
+ return this.parseArrowExpression(this.startNodeAt(parenStart), inner.expressions || (isDummy(inner) ? [] : [inner]))
+ }
+ if (this.options.preserveParens) {
+ var par = this.startNodeAt(parenStart)
+ par.expression = inner
+ inner = this.finishNode(par, "ParenthesizedExpression")
+ }
+ return inner
+
+ case acorn.tokTypes.bracketL:
+ node = this.startNode()
+ node.elements = this.parseExprList(acorn.tokTypes.bracketR, true)
+ return this.finishNode(node, "ArrayExpression")
+
+ case acorn.tokTypes.braceL:
+ return this.parseObj()
+
+ case acorn.tokTypes._class:
+ return this.parseClass()
+
+ case acorn.tokTypes._function:
+ node = this.startNode()
+ this.next()
+ return this.parseFunction(node, false)
+
+ case acorn.tokTypes._new:
+ return this.parseNew()
+
+ case acorn.tokTypes.backQuote:
+ return this.parseTemplate()
+
+ default:
+ return this.dummyIdent()
+ }
+ }
+
+ lp$2.parseNew = function() {
+ var node = this.startNode(), startIndent = this.curIndent, line = this.curLineStart
+ var meta = this.parseIdent(true)
+ if (this.options.ecmaVersion >= 6 && this.eat(acorn.tokTypes.dot)) {
+ node.meta = meta
+ node.property = this.parseIdent(true)
+ return this.finishNode(node, "MetaProperty")
+ }
+ var start = this.storeCurrentPos()
+ node.callee = this.parseSubscripts(this.parseExprAtom(), start, true, startIndent, line)
+ if (this.tok.type == acorn.tokTypes.parenL) {
+ node.arguments = this.parseExprList(acorn.tokTypes.parenR)
+ } else {
+ node.arguments = []
+ }
+ return this.finishNode(node, "NewExpression")
+ }
+
+ lp$2.parseTemplateElement = function() {
+ var elem = this.startNode()
+ elem.value = {
+ raw: this.input.slice(this.tok.start, this.tok.end).replace(/\r\n?/g, '\n'),
+ cooked: this.tok.value
+ }
+ this.next()
+ elem.tail = this.tok.type === acorn.tokTypes.backQuote
+ return this.finishNode(elem, "TemplateElement")
+ }
+
+ lp$2.parseTemplate = function() {
+ var this$1 = this;
+
+ var node = this.startNode()
+ this.next()
+ node.expressions = []
+ var curElt = this.parseTemplateElement()
+ node.quasis = [curElt]
+ while (!curElt.tail) {
+ this$1.next()
+ node.expressions.push(this$1.parseExpression())
+ if (this$1.expect(acorn.tokTypes.braceR)) {
+ curElt = this$1.parseTemplateElement()
+ } else {
+ curElt = this$1.startNode()
+ curElt.value = {cooked: '', raw: ''}
+ curElt.tail = true
+ this$1.finishNode(curElt, "TemplateElement")
+ }
+ node.quasis.push(curElt)
+ }
+ this.expect(acorn.tokTypes.backQuote)
+ return this.finishNode(node, "TemplateLiteral")
+ }
+
+ lp$2.parseObj = function() {
+ var this$1 = this;
+
+ var node = this.startNode()
+ node.properties = []
+ this.pushCx()
+ var indent = this.curIndent + 1, line = this.curLineStart
+ this.eat(acorn.tokTypes.braceL)
+ if (this.curIndent + 1 < indent) { indent = this.curIndent; line = this.curLineStart }
+ while (!this.closes(acorn.tokTypes.braceR, indent, line)) {
+ var prop = this$1.startNode(), isGenerator, start
+ if (this$1.options.ecmaVersion >= 6) {
+ start = this$1.storeCurrentPos()
+ prop.method = false
+ prop.shorthand = false
+ isGenerator = this$1.eat(acorn.tokTypes.star)
+ }
+ this$1.parsePropertyName(prop)
+ if (isDummy(prop.key)) { if (isDummy(this$1.parseMaybeAssign())) this$1.next(); this$1.eat(acorn.tokTypes.comma); continue }
+ if (this$1.eat(acorn.tokTypes.colon)) {
+ prop.kind = "init"
+ prop.value = this$1.parseMaybeAssign()
+ } else if (this$1.options.ecmaVersion >= 6 && (this$1.tok.type === acorn.tokTypes.parenL || this$1.tok.type === acorn.tokTypes.braceL)) {
+ prop.kind = "init"
+ prop.method = true
+ prop.value = this$1.parseMethod(isGenerator)
+ } else if (this$1.options.ecmaVersion >= 5 && prop.key.type === "Identifier" &&
+ !prop.computed && (prop.key.name === "get" || prop.key.name === "set") &&
+ (this$1.tok.type != acorn.tokTypes.comma && this$1.tok.type != acorn.tokTypes.braceR)) {
+ prop.kind = prop.key.name
+ this$1.parsePropertyName(prop)
+ prop.value = this$1.parseMethod(false)
+ } else {
+ prop.kind = "init"
+ if (this$1.options.ecmaVersion >= 6) {
+ if (this$1.eat(acorn.tokTypes.eq)) {
+ var assign = this$1.startNodeAt(start)
+ assign.operator = "="
+ assign.left = prop.key
+ assign.right = this$1.parseMaybeAssign()
+ prop.value = this$1.finishNode(assign, "AssignmentExpression")
+ } else {
+ prop.value = prop.key
+ }
+ } else {
+ prop.value = this$1.dummyIdent()
+ }
+ prop.shorthand = true
+ }
+ node.properties.push(this$1.finishNode(prop, "Property"))
+ this$1.eat(acorn.tokTypes.comma)
+ }
+ this.popCx()
+ if (!this.eat(acorn.tokTypes.braceR)) {
+ // If there is no closing brace, make the node span to the start
+ // of the next token (this is useful for Tern)
+ this.last.end = this.tok.start
+ if (this.options.locations) this.last.loc.end = this.tok.loc.start
+ }
+ return this.finishNode(node, "ObjectExpression")
+ }
+
+ lp$2.parsePropertyName = function(prop) {
+ if (this.options.ecmaVersion >= 6) {
+ if (this.eat(acorn.tokTypes.bracketL)) {
+ prop.computed = true
+ prop.key = this.parseExpression()
+ this.expect(acorn.tokTypes.bracketR)
+ return
+ } else {
+ prop.computed = false
+ }
+ }
+ var key = (this.tok.type === acorn.tokTypes.num || this.tok.type === acorn.tokTypes.string) ? this.parseExprAtom() : this.parseIdent()
+ prop.key = key || this.dummyIdent()
+ }
+
+ lp$2.parsePropertyAccessor = function() {
+ if (this.tok.type === acorn.tokTypes.name || this.tok.type.keyword) return this.parseIdent()
+ }
+
+ lp$2.parseIdent = function() {
+ var name = this.tok.type === acorn.tokTypes.name ? this.tok.value : this.tok.type.keyword
+ if (!name) return this.dummyIdent()
+ var node = this.startNode()
+ this.next()
+ node.name = name
+ return this.finishNode(node, "Identifier")
+ }
+
+ lp$2.initFunction = function(node) {
+ node.id = null
+ node.params = []
+ if (this.options.ecmaVersion >= 6) {
+ node.generator = false
+ node.expression = false
+ }
+ }
+
+ // Convert existing expression atom to assignable pattern
+ // if possible.
+
+ lp$2.toAssignable = function(node, binding) {
+ var this$1 = this;
+
+ if (!node || node.type == "Identifier" || (node.type == "MemberExpression" && !binding)) {
+ // Okay
+ } else if (node.type == "ParenthesizedExpression") {
+ node.expression = this.toAssignable(node.expression, binding)
+ } else if (this.options.ecmaVersion < 6) {
+ return this.dummyIdent()
+ } else if (node.type == "ObjectExpression") {
+ node.type = "ObjectPattern"
+ var props = node.properties
+ for (var i = 0; i < props.length; i++)
+ props[i].value = this$1.toAssignable(props[i].value, binding)
+ } else if (node.type == "ArrayExpression") {
+ node.type = "ArrayPattern"
+ this.toAssignableList(node.elements, binding)
+ } else if (node.type == "SpreadElement") {
+ node.type = "RestElement"
+ node.argument = this.toAssignable(node.argument, binding)
+ } else if (node.type == "AssignmentExpression") {
+ node.type = "AssignmentPattern"
+ delete node.operator
+ } else {
+ return this.dummyIdent()
+ }
+ return node
+ }
+
+ lp$2.toAssignableList = function(exprList, binding) {
+ var this$1 = this;
+
+ for (var i = 0; i < exprList.length; i++)
+ exprList[i] = this$1.toAssignable(exprList[i], binding)
+ return exprList
+ }
+
+ lp$2.parseFunctionParams = function(params) {
+ params = this.parseExprList(acorn.tokTypes.parenR)
+ return this.toAssignableList(params, true)
+ }
+
+ lp$2.parseMethod = function(isGenerator) {
+ var node = this.startNode()
+ this.initFunction(node)
+ node.params = this.parseFunctionParams()
+ node.generator = isGenerator || false
+ node.expression = this.options.ecmaVersion >= 6 && this.tok.type !== acorn.tokTypes.braceL
+ node.body = node.expression ? this.parseMaybeAssign() : this.parseBlock()
+ return this.finishNode(node, "FunctionExpression")
+ }
+
+ lp$2.parseArrowExpression = function(node, params) {
+ this.initFunction(node)
+ node.params = this.toAssignableList(params, true)
+ node.expression = this.tok.type !== acorn.tokTypes.braceL
+ node.body = node.expression ? this.parseMaybeAssign() : this.parseBlock()
+ return this.finishNode(node, "ArrowFunctionExpression")
+ }
+
+ lp$2.parseExprList = function(close, allowEmpty) {
+ var this$1 = this;
+
+ this.pushCx()
+ var indent = this.curIndent, line = this.curLineStart, elts = []
+ this.next() // Opening bracket
+ while (!this.closes(close, indent + 1, line)) {
+ if (this$1.eat(acorn.tokTypes.comma)) {
+ elts.push(allowEmpty ? null : this$1.dummyIdent())
+ continue
+ }
+ var elt = this$1.parseMaybeAssign()
+ if (isDummy(elt)) {
+ if (this$1.closes(close, indent, line)) break
+ this$1.next()
+ } else {
+ elts.push(elt)
+ }
+ this$1.eat(acorn.tokTypes.comma)
+ }
+ this.popCx()
+ if (!this.eat(close)) {
+ // If there is no closing brace, make the node span to the start
+ // of the next token (this is useful for Tern)
+ this.last.end = this.tok.start
+ if (this.options.locations) this.last.loc.end = this.tok.loc.start
+ }
+ return elts
+ }
+
+ acorn__default.defaultOptions.tabSize = 4
+
+ function parse_dammit(input, options) {
+ var p = new LooseParser(input, options)
+ p.next()
+ return p.parseTopLevel()
+ }
+
+ acorn__default.parse_dammit = parse_dammit
+ acorn__default.LooseParser = LooseParser
+ acorn__default.pluginsLoose = pluginsLoose
+
+ exports.parse_dammit = parse_dammit;
+ exports.LooseParser = LooseParser;
+ exports.pluginsLoose = pluginsLoose;
+
+ Object.defineProperty(exports, '__esModule', { value: true });
+
+})); \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/walk.es.js b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/walk.es.js
new file mode 100644
index 0000000000..bef40937ac
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/walk.es.js
@@ -0,0 +1,342 @@
+// AST walker module for Mozilla Parser API compatible trees
+
+// A simple walk is one where you simply specify callbacks to be
+// called on specific nodes. The last two arguments are optional. A
+// simple use would be
+//
+// walk.simple(myTree, {
+// Expression: function(node) { ... }
+// });
+//
+// to do something with all expressions. All Parser API node types
+// can be used to identify node types, as well as Expression,
+// Statement, and ScopeBody, which denote categories of nodes.
+//
+// The base argument can be used to pass a custom (recursive)
+// walker, and state can be used to give this walked an initial
+// state.
+
+function simple(node, visitors, base, state, override) {
+ if (!base) base = exports.base
+ ;(function c(node, st, override) {
+ var type = override || node.type, found = visitors[type]
+ base[type](node, st, c)
+ if (found) found(node, st)
+ })(node, state, override)
+}
+
+// An ancestor walk keeps an array of ancestor nodes (including the
+// current node) and passes them to the callback as third parameter
+// (and also as state parameter when no other state is present).
+function ancestor(node, visitors, base, state) {
+ if (!base) base = exports.base
+ var ancestors = []
+ ;(function c(node, st, override) {
+ var type = override || node.type, found = visitors[type]
+ var isNew = node != ancestors[ancestors.length - 1]
+ if (isNew) ancestors.push(node)
+ base[type](node, st, c)
+ if (found) found(node, st || ancestors, ancestors)
+ if (isNew) ancestors.pop()
+ })(node, state)
+}
+
+// A recursive walk is one where your functions override the default
+// walkers. They can modify and replace the state parameter that's
+// threaded through the walk, and can opt how and whether to walk
+// their child nodes (by calling their third argument on these
+// nodes).
+function recursive(node, state, funcs, base, override) {
+ var visitor = funcs ? exports.make(funcs, base) : base
+ ;(function c(node, st, override) {
+ visitor[override || node.type](node, st, c)
+ })(node, state, override)
+}
+
+function makeTest(test) {
+ if (typeof test == "string")
+ return function (type) { return type == test; }
+ else if (!test)
+ return function () { return true; }
+ else
+ return test
+}
+
+var Found = function Found(node, state) { this.node = node; this.state = state };
+
+// Find a node with a given start, end, and type (all are optional,
+// null can be used as wildcard). Returns a {node, state} object, or
+// undefined when it doesn't find a matching node.
+function findNodeAt(node, start, end, test, base, state) {
+ test = makeTest(test)
+ if (!base) base = exports.base
+ try {
+ ;(function c(node, st, override) {
+ var type = override || node.type
+ if ((start == null || node.start <= start) &&
+ (end == null || node.end >= end))
+ base[type](node, st, c)
+ if ((start == null || node.start == start) &&
+ (end == null || node.end == end) &&
+ test(type, node))
+ throw new Found(node, st)
+ })(node, state)
+ } catch (e) {
+ if (e instanceof Found) return e
+ throw e
+ }
+}
+
+// Find the innermost node of a given type that contains the given
+// position. Interface similar to findNodeAt.
+function findNodeAround(node, pos, test, base, state) {
+ test = makeTest(test)
+ if (!base) base = exports.base
+ try {
+ ;(function c(node, st, override) {
+ var type = override || node.type
+ if (node.start > pos || node.end < pos) return
+ base[type](node, st, c)
+ if (test(type, node)) throw new Found(node, st)
+ })(node, state)
+ } catch (e) {
+ if (e instanceof Found) return e
+ throw e
+ }
+}
+
+// Find the outermost matching node after a given position.
+function findNodeAfter(node, pos, test, base, state) {
+ test = makeTest(test)
+ if (!base) base = exports.base
+ try {
+ ;(function c(node, st, override) {
+ if (node.end < pos) return
+ var type = override || node.type
+ if (node.start >= pos && test(type, node)) throw new Found(node, st)
+ base[type](node, st, c)
+ })(node, state)
+ } catch (e) {
+ if (e instanceof Found) return e
+ throw e
+ }
+}
+
+// Find the outermost matching node before a given position.
+function findNodeBefore(node, pos, test, base, state) {
+ test = makeTest(test)
+ if (!base) base = exports.base
+ var max
+ ;(function c(node, st, override) {
+ if (node.start > pos) return
+ var type = override || node.type
+ if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node))
+ max = new Found(node, st)
+ base[type](node, st, c)
+ })(node, state)
+ return max
+}
+
+// Fallback to an Object.create polyfill for older environments.
+var create = Object.create || function(proto) {
+ function Ctor() {}
+ Ctor.prototype = proto
+ return new Ctor
+}
+
+// Used to create a custom walker. Will fill in all missing node
+// type properties with the defaults.
+function make(funcs, base) {
+ if (!base) base = exports.base
+ var visitor = create(base)
+ for (var type in funcs) visitor[type] = funcs[type]
+ return visitor
+}
+
+function skipThrough(node, st, c) { c(node, st) }
+function ignore(_node, _st, _c) {}
+
+// Node walkers.
+
+var base = {}
+
+base.Program = base.BlockStatement = function (node, st, c) {
+ for (var i = 0; i < node.body.length; ++i)
+ c(node.body[i], st, "Statement")
+}
+base.Statement = skipThrough
+base.EmptyStatement = ignore
+base.ExpressionStatement = base.ParenthesizedExpression =
+ function (node, st, c) { return c(node.expression, st, "Expression"); }
+base.IfStatement = function (node, st, c) {
+ c(node.test, st, "Expression")
+ c(node.consequent, st, "Statement")
+ if (node.alternate) c(node.alternate, st, "Statement")
+}
+base.LabeledStatement = function (node, st, c) { return c(node.body, st, "Statement"); }
+base.BreakStatement = base.ContinueStatement = ignore
+base.WithStatement = function (node, st, c) {
+ c(node.object, st, "Expression")
+ c(node.body, st, "Statement")
+}
+base.SwitchStatement = function (node, st, c) {
+ c(node.discriminant, st, "Expression")
+ for (var i = 0; i < node.cases.length; ++i) {
+ var cs = node.cases[i]
+ if (cs.test) c(cs.test, st, "Expression")
+ for (var j = 0; j < cs.consequent.length; ++j)
+ c(cs.consequent[j], st, "Statement")
+ }
+}
+base.ReturnStatement = base.YieldExpression = function (node, st, c) {
+ if (node.argument) c(node.argument, st, "Expression")
+}
+base.ThrowStatement = base.SpreadElement =
+ function (node, st, c) { return c(node.argument, st, "Expression"); }
+base.TryStatement = function (node, st, c) {
+ c(node.block, st, "Statement")
+ if (node.handler) c(node.handler, st)
+ if (node.finalizer) c(node.finalizer, st, "Statement")
+}
+base.CatchClause = function (node, st, c) {
+ c(node.param, st, "Pattern")
+ c(node.body, st, "ScopeBody")
+}
+base.WhileStatement = base.DoWhileStatement = function (node, st, c) {
+ c(node.test, st, "Expression")
+ c(node.body, st, "Statement")
+}
+base.ForStatement = function (node, st, c) {
+ if (node.init) c(node.init, st, "ForInit")
+ if (node.test) c(node.test, st, "Expression")
+ if (node.update) c(node.update, st, "Expression")
+ c(node.body, st, "Statement")
+}
+base.ForInStatement = base.ForOfStatement = function (node, st, c) {
+ c(node.left, st, "ForInit")
+ c(node.right, st, "Expression")
+ c(node.body, st, "Statement")
+}
+base.ForInit = function (node, st, c) {
+ if (node.type == "VariableDeclaration") c(node, st)
+ else c(node, st, "Expression")
+}
+base.DebuggerStatement = ignore
+
+base.FunctionDeclaration = function (node, st, c) { return c(node, st, "Function"); }
+base.VariableDeclaration = function (node, st, c) {
+ for (var i = 0; i < node.declarations.length; ++i)
+ c(node.declarations[i], st)
+}
+base.VariableDeclarator = function (node, st, c) {
+ c(node.id, st, "Pattern")
+ if (node.init) c(node.init, st, "Expression")
+}
+
+base.Function = function (node, st, c) {
+ if (node.id) c(node.id, st, "Pattern")
+ for (var i = 0; i < node.params.length; i++)
+ c(node.params[i], st, "Pattern")
+ c(node.body, st, node.expression ? "ScopeExpression" : "ScopeBody")
+}
+// FIXME drop these node types in next major version
+// (They are awkward, and in ES6 every block can be a scope.)
+base.ScopeBody = function (node, st, c) { return c(node, st, "Statement"); }
+base.ScopeExpression = function (node, st, c) { return c(node, st, "Expression"); }
+
+base.Pattern = function (node, st, c) {
+ if (node.type == "Identifier")
+ c(node, st, "VariablePattern")
+ else if (node.type == "MemberExpression")
+ c(node, st, "MemberPattern")
+ else
+ c(node, st)
+}
+base.VariablePattern = ignore
+base.MemberPattern = skipThrough
+base.RestElement = function (node, st, c) { return c(node.argument, st, "Pattern"); }
+base.ArrayPattern = function (node, st, c) {
+ for (var i = 0; i < node.elements.length; ++i) {
+ var elt = node.elements[i]
+ if (elt) c(elt, st, "Pattern")
+ }
+}
+base.ObjectPattern = function (node, st, c) {
+ for (var i = 0; i < node.properties.length; ++i)
+ c(node.properties[i].value, st, "Pattern")
+}
+
+base.Expression = skipThrough
+base.ThisExpression = base.Super = base.MetaProperty = ignore
+base.ArrayExpression = function (node, st, c) {
+ for (var i = 0; i < node.elements.length; ++i) {
+ var elt = node.elements[i]
+ if (elt) c(elt, st, "Expression")
+ }
+}
+base.ObjectExpression = function (node, st, c) {
+ for (var i = 0; i < node.properties.length; ++i)
+ c(node.properties[i], st)
+}
+base.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration
+base.SequenceExpression = base.TemplateLiteral = function (node, st, c) {
+ for (var i = 0; i < node.expressions.length; ++i)
+ c(node.expressions[i], st, "Expression")
+}
+base.UnaryExpression = base.UpdateExpression = function (node, st, c) {
+ c(node.argument, st, "Expression")
+}
+base.BinaryExpression = base.LogicalExpression = function (node, st, c) {
+ c(node.left, st, "Expression")
+ c(node.right, st, "Expression")
+}
+base.AssignmentExpression = base.AssignmentPattern = function (node, st, c) {
+ c(node.left, st, "Pattern")
+ c(node.right, st, "Expression")
+}
+base.ConditionalExpression = function (node, st, c) {
+ c(node.test, st, "Expression")
+ c(node.consequent, st, "Expression")
+ c(node.alternate, st, "Expression")
+}
+base.NewExpression = base.CallExpression = function (node, st, c) {
+ c(node.callee, st, "Expression")
+ if (node.arguments) for (var i = 0; i < node.arguments.length; ++i)
+ c(node.arguments[i], st, "Expression")
+}
+base.MemberExpression = function (node, st, c) {
+ c(node.object, st, "Expression")
+ if (node.computed) c(node.property, st, "Expression")
+}
+base.ExportNamedDeclaration = base.ExportDefaultDeclaration = function (node, st, c) {
+ if (node.declaration)
+ c(node.declaration, st, node.type == "ExportNamedDeclaration" || node.declaration.id ? "Statement" : "Expression")
+ if (node.source) c(node.source, st, "Expression")
+}
+base.ExportAllDeclaration = function (node, st, c) {
+ c(node.source, st, "Expression")
+}
+base.ImportDeclaration = function (node, st, c) {
+ for (var i = 0; i < node.specifiers.length; i++)
+ c(node.specifiers[i], st)
+ c(node.source, st, "Expression")
+}
+base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.Literal = ignore
+
+base.TaggedTemplateExpression = function (node, st, c) {
+ c(node.tag, st, "Expression")
+ c(node.quasi, st)
+}
+base.ClassDeclaration = base.ClassExpression = function (node, st, c) { return c(node, st, "Class"); }
+base.Class = function (node, st, c) {
+ if (node.id) c(node.id, st, "Pattern")
+ if (node.superClass) c(node.superClass, st, "Expression")
+ for (var i = 0; i < node.body.body.length; i++)
+ c(node.body.body[i], st)
+}
+base.MethodDefinition = base.Property = function (node, st, c) {
+ if (node.computed) c(node.key, st, "Expression")
+ c(node.value, st, "Expression")
+}
+
+export { simple, ancestor, recursive, findNodeAt, findNodeAround, findNodeAfter, findNodeBefore, make, base }; \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/walk.js b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/walk.js
new file mode 100644
index 0000000000..56079ac13f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/walk.js
@@ -0,0 +1,360 @@
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
+ typeof define === 'function' && define.amd ? define(['exports'], factory) :
+ (factory((global.acorn = global.acorn || {}, global.acorn.walk = global.acorn.walk || {})));
+}(this, function (exports) { 'use strict';
+
+ // AST walker module for Mozilla Parser API compatible trees
+
+ // A simple walk is one where you simply specify callbacks to be
+ // called on specific nodes. The last two arguments are optional. A
+ // simple use would be
+ //
+ // walk.simple(myTree, {
+ // Expression: function(node) { ... }
+ // });
+ //
+ // to do something with all expressions. All Parser API node types
+ // can be used to identify node types, as well as Expression,
+ // Statement, and ScopeBody, which denote categories of nodes.
+ //
+ // The base argument can be used to pass a custom (recursive)
+ // walker, and state can be used to give this walked an initial
+ // state.
+
+ function simple(node, visitors, base, state, override) {
+ if (!base) base = exports.base
+ ;(function c(node, st, override) {
+ var type = override || node.type, found = visitors[type]
+ base[type](node, st, c)
+ if (found) found(node, st)
+ })(node, state, override)
+ }
+
+ // An ancestor walk keeps an array of ancestor nodes (including the
+ // current node) and passes them to the callback as third parameter
+ // (and also as state parameter when no other state is present).
+ function ancestor(node, visitors, base, state) {
+ if (!base) base = exports.base
+ var ancestors = []
+ ;(function c(node, st, override) {
+ var type = override || node.type, found = visitors[type]
+ var isNew = node != ancestors[ancestors.length - 1]
+ if (isNew) ancestors.push(node)
+ base[type](node, st, c)
+ if (found) found(node, st || ancestors, ancestors)
+ if (isNew) ancestors.pop()
+ })(node, state)
+ }
+
+ // A recursive walk is one where your functions override the default
+ // walkers. They can modify and replace the state parameter that's
+ // threaded through the walk, and can opt how and whether to walk
+ // their child nodes (by calling their third argument on these
+ // nodes).
+ function recursive(node, state, funcs, base, override) {
+ var visitor = funcs ? exports.make(funcs, base) : base
+ ;(function c(node, st, override) {
+ visitor[override || node.type](node, st, c)
+ })(node, state, override)
+ }
+
+ function makeTest(test) {
+ if (typeof test == "string")
+ return function (type) { return type == test; }
+ else if (!test)
+ return function () { return true; }
+ else
+ return test
+ }
+
+ var Found = function Found(node, state) { this.node = node; this.state = state };
+
+ // Find a node with a given start, end, and type (all are optional,
+ // null can be used as wildcard). Returns a {node, state} object, or
+ // undefined when it doesn't find a matching node.
+ function findNodeAt(node, start, end, test, base, state) {
+ test = makeTest(test)
+ if (!base) base = exports.base
+ try {
+ ;(function c(node, st, override) {
+ var type = override || node.type
+ if ((start == null || node.start <= start) &&
+ (end == null || node.end >= end))
+ base[type](node, st, c)
+ if ((start == null || node.start == start) &&
+ (end == null || node.end == end) &&
+ test(type, node))
+ throw new Found(node, st)
+ })(node, state)
+ } catch (e) {
+ if (e instanceof Found) return e
+ throw e
+ }
+ }
+
+ // Find the innermost node of a given type that contains the given
+ // position. Interface similar to findNodeAt.
+ function findNodeAround(node, pos, test, base, state) {
+ test = makeTest(test)
+ if (!base) base = exports.base
+ try {
+ ;(function c(node, st, override) {
+ var type = override || node.type
+ if (node.start > pos || node.end < pos) return
+ base[type](node, st, c)
+ if (test(type, node)) throw new Found(node, st)
+ })(node, state)
+ } catch (e) {
+ if (e instanceof Found) return e
+ throw e
+ }
+ }
+
+ // Find the outermost matching node after a given position.
+ function findNodeAfter(node, pos, test, base, state) {
+ test = makeTest(test)
+ if (!base) base = exports.base
+ try {
+ ;(function c(node, st, override) {
+ if (node.end < pos) return
+ var type = override || node.type
+ if (node.start >= pos && test(type, node)) throw new Found(node, st)
+ base[type](node, st, c)
+ })(node, state)
+ } catch (e) {
+ if (e instanceof Found) return e
+ throw e
+ }
+ }
+
+ // Find the outermost matching node before a given position.
+ function findNodeBefore(node, pos, test, base, state) {
+ test = makeTest(test)
+ if (!base) base = exports.base
+ var max
+ ;(function c(node, st, override) {
+ if (node.start > pos) return
+ var type = override || node.type
+ if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node))
+ max = new Found(node, st)
+ base[type](node, st, c)
+ })(node, state)
+ return max
+ }
+
+ // Fallback to an Object.create polyfill for older environments.
+ var create = Object.create || function(proto) {
+ function Ctor() {}
+ Ctor.prototype = proto
+ return new Ctor
+ }
+
+ // Used to create a custom walker. Will fill in all missing node
+ // type properties with the defaults.
+ function make(funcs, base) {
+ if (!base) base = exports.base
+ var visitor = create(base)
+ for (var type in funcs) visitor[type] = funcs[type]
+ return visitor
+ }
+
+ function skipThrough(node, st, c) { c(node, st) }
+ function ignore(_node, _st, _c) {}
+
+ // Node walkers.
+
+ var base = {}
+
+ base.Program = base.BlockStatement = function (node, st, c) {
+ for (var i = 0; i < node.body.length; ++i)
+ c(node.body[i], st, "Statement")
+ }
+ base.Statement = skipThrough
+ base.EmptyStatement = ignore
+ base.ExpressionStatement = base.ParenthesizedExpression =
+ function (node, st, c) { return c(node.expression, st, "Expression"); }
+ base.IfStatement = function (node, st, c) {
+ c(node.test, st, "Expression")
+ c(node.consequent, st, "Statement")
+ if (node.alternate) c(node.alternate, st, "Statement")
+ }
+ base.LabeledStatement = function (node, st, c) { return c(node.body, st, "Statement"); }
+ base.BreakStatement = base.ContinueStatement = ignore
+ base.WithStatement = function (node, st, c) {
+ c(node.object, st, "Expression")
+ c(node.body, st, "Statement")
+ }
+ base.SwitchStatement = function (node, st, c) {
+ c(node.discriminant, st, "Expression")
+ for (var i = 0; i < node.cases.length; ++i) {
+ var cs = node.cases[i]
+ if (cs.test) c(cs.test, st, "Expression")
+ for (var j = 0; j < cs.consequent.length; ++j)
+ c(cs.consequent[j], st, "Statement")
+ }
+ }
+ base.ReturnStatement = base.YieldExpression = function (node, st, c) {
+ if (node.argument) c(node.argument, st, "Expression")
+ }
+ base.ThrowStatement = base.SpreadElement =
+ function (node, st, c) { return c(node.argument, st, "Expression"); }
+ base.TryStatement = function (node, st, c) {
+ c(node.block, st, "Statement")
+ if (node.handler) c(node.handler, st)
+ if (node.finalizer) c(node.finalizer, st, "Statement")
+ }
+ base.CatchClause = function (node, st, c) {
+ c(node.param, st, "Pattern")
+ c(node.body, st, "ScopeBody")
+ }
+ base.WhileStatement = base.DoWhileStatement = function (node, st, c) {
+ c(node.test, st, "Expression")
+ c(node.body, st, "Statement")
+ }
+ base.ForStatement = function (node, st, c) {
+ if (node.init) c(node.init, st, "ForInit")
+ if (node.test) c(node.test, st, "Expression")
+ if (node.update) c(node.update, st, "Expression")
+ c(node.body, st, "Statement")
+ }
+ base.ForInStatement = base.ForOfStatement = function (node, st, c) {
+ c(node.left, st, "ForInit")
+ c(node.right, st, "Expression")
+ c(node.body, st, "Statement")
+ }
+ base.ForInit = function (node, st, c) {
+ if (node.type == "VariableDeclaration") c(node, st)
+ else c(node, st, "Expression")
+ }
+ base.DebuggerStatement = ignore
+
+ base.FunctionDeclaration = function (node, st, c) { return c(node, st, "Function"); }
+ base.VariableDeclaration = function (node, st, c) {
+ for (var i = 0; i < node.declarations.length; ++i)
+ c(node.declarations[i], st)
+ }
+ base.VariableDeclarator = function (node, st, c) {
+ c(node.id, st, "Pattern")
+ if (node.init) c(node.init, st, "Expression")
+ }
+
+ base.Function = function (node, st, c) {
+ if (node.id) c(node.id, st, "Pattern")
+ for (var i = 0; i < node.params.length; i++)
+ c(node.params[i], st, "Pattern")
+ c(node.body, st, node.expression ? "ScopeExpression" : "ScopeBody")
+ }
+ // FIXME drop these node types in next major version
+ // (They are awkward, and in ES6 every block can be a scope.)
+ base.ScopeBody = function (node, st, c) { return c(node, st, "Statement"); }
+ base.ScopeExpression = function (node, st, c) { return c(node, st, "Expression"); }
+
+ base.Pattern = function (node, st, c) {
+ if (node.type == "Identifier")
+ c(node, st, "VariablePattern")
+ else if (node.type == "MemberExpression")
+ c(node, st, "MemberPattern")
+ else
+ c(node, st)
+ }
+ base.VariablePattern = ignore
+ base.MemberPattern = skipThrough
+ base.RestElement = function (node, st, c) { return c(node.argument, st, "Pattern"); }
+ base.ArrayPattern = function (node, st, c) {
+ for (var i = 0; i < node.elements.length; ++i) {
+ var elt = node.elements[i]
+ if (elt) c(elt, st, "Pattern")
+ }
+ }
+ base.ObjectPattern = function (node, st, c) {
+ for (var i = 0; i < node.properties.length; ++i)
+ c(node.properties[i].value, st, "Pattern")
+ }
+
+ base.Expression = skipThrough
+ base.ThisExpression = base.Super = base.MetaProperty = ignore
+ base.ArrayExpression = function (node, st, c) {
+ for (var i = 0; i < node.elements.length; ++i) {
+ var elt = node.elements[i]
+ if (elt) c(elt, st, "Expression")
+ }
+ }
+ base.ObjectExpression = function (node, st, c) {
+ for (var i = 0; i < node.properties.length; ++i)
+ c(node.properties[i], st)
+ }
+ base.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration
+ base.SequenceExpression = base.TemplateLiteral = function (node, st, c) {
+ for (var i = 0; i < node.expressions.length; ++i)
+ c(node.expressions[i], st, "Expression")
+ }
+ base.UnaryExpression = base.UpdateExpression = function (node, st, c) {
+ c(node.argument, st, "Expression")
+ }
+ base.BinaryExpression = base.LogicalExpression = function (node, st, c) {
+ c(node.left, st, "Expression")
+ c(node.right, st, "Expression")
+ }
+ base.AssignmentExpression = base.AssignmentPattern = function (node, st, c) {
+ c(node.left, st, "Pattern")
+ c(node.right, st, "Expression")
+ }
+ base.ConditionalExpression = function (node, st, c) {
+ c(node.test, st, "Expression")
+ c(node.consequent, st, "Expression")
+ c(node.alternate, st, "Expression")
+ }
+ base.NewExpression = base.CallExpression = function (node, st, c) {
+ c(node.callee, st, "Expression")
+ if (node.arguments) for (var i = 0; i < node.arguments.length; ++i)
+ c(node.arguments[i], st, "Expression")
+ }
+ base.MemberExpression = function (node, st, c) {
+ c(node.object, st, "Expression")
+ if (node.computed) c(node.property, st, "Expression")
+ }
+ base.ExportNamedDeclaration = base.ExportDefaultDeclaration = function (node, st, c) {
+ if (node.declaration)
+ c(node.declaration, st, node.type == "ExportNamedDeclaration" || node.declaration.id ? "Statement" : "Expression")
+ if (node.source) c(node.source, st, "Expression")
+ }
+ base.ExportAllDeclaration = function (node, st, c) {
+ c(node.source, st, "Expression")
+ }
+ base.ImportDeclaration = function (node, st, c) {
+ for (var i = 0; i < node.specifiers.length; i++)
+ c(node.specifiers[i], st)
+ c(node.source, st, "Expression")
+ }
+ base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.Literal = ignore
+
+ base.TaggedTemplateExpression = function (node, st, c) {
+ c(node.tag, st, "Expression")
+ c(node.quasi, st)
+ }
+ base.ClassDeclaration = base.ClassExpression = function (node, st, c) { return c(node, st, "Class"); }
+ base.Class = function (node, st, c) {
+ if (node.id) c(node.id, st, "Pattern")
+ if (node.superClass) c(node.superClass, st, "Expression")
+ for (var i = 0; i < node.body.body.length; i++)
+ c(node.body.body[i], st)
+ }
+ base.MethodDefinition = base.Property = function (node, st, c) {
+ if (node.computed) c(node.key, st, "Expression")
+ c(node.value, st, "Expression")
+ }
+
+ exports.simple = simple;
+ exports.ancestor = ancestor;
+ exports.recursive = recursive;
+ exports.findNodeAt = findNodeAt;
+ exports.findNodeAround = findNodeAround;
+ exports.findNodeAfter = findNodeAfter;
+ exports.findNodeBefore = findNodeBefore;
+ exports.make = make;
+ exports.base = base;
+
+ Object.defineProperty(exports, '__esModule', { value: true });
+
+})); \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/package.json b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/package.json
new file mode 100644
index 0000000000..c62e197f49
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/package.json
@@ -0,0 +1,250 @@
+{
+ "_from": "acorn@^3.0.4",
+ "_id": "acorn@3.3.0",
+ "_inBundle": false,
+ "_integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=",
+ "_location": "/eslint/acorn-jsx/acorn",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "acorn@^3.0.4",
+ "name": "acorn",
+ "escapedName": "acorn",
+ "rawSpec": "^3.0.4",
+ "saveSpec": null,
+ "fetchSpec": "^3.0.4"
+ },
+ "_requiredBy": [
+ "/eslint/acorn-jsx"
+ ],
+ "_resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz",
+ "_shasum": "45e37fb39e8da3f25baee3ff5369e2bb5f22017a",
+ "_spec": "acorn@^3.0.4",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/acorn-jsx",
+ "bin": {
+ "acorn": "./bin/acorn"
+ },
+ "bugs": {
+ "url": "https://github.com/ternjs/acorn/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "List of Acorn contributors. Updated before every release."
+ },
+ {
+ "name": "Adrian Rakovsky"
+ },
+ {
+ "name": "Alistair Braidwood"
+ },
+ {
+ "name": "Amila Welihinda"
+ },
+ {
+ "name": "Andres Suarez"
+ },
+ {
+ "name": "Angelo"
+ },
+ {
+ "name": "Aparajita Fishman"
+ },
+ {
+ "name": "Arian Stolwijk"
+ },
+ {
+ "name": "Artem Govorov"
+ },
+ {
+ "name": "Brandon Mills"
+ },
+ {
+ "name": "Charles Hughes"
+ },
+ {
+ "name": "Conrad Irwin"
+ },
+ {
+ "name": "Daniel Tschinder"
+ },
+ {
+ "name": "David Bonnet"
+ },
+ {
+ "name": "Domenico Matteo"
+ },
+ {
+ "name": "ForbesLindesay"
+ },
+ {
+ "name": "Forbes Lindesay"
+ },
+ {
+ "name": "Gilad Peleg"
+ },
+ {
+ "name": "impinball"
+ },
+ {
+ "name": "Ingvar Stepanyan"
+ },
+ {
+ "name": "Jackson Ray Hamilton"
+ },
+ {
+ "name": "Jesse McCarthy"
+ },
+ {
+ "name": "Jiaxing Wang"
+ },
+ {
+ "name": "Joel Kemp"
+ },
+ {
+ "name": "Johannes Herr"
+ },
+ {
+ "name": "Jordan Klassen"
+ },
+ {
+ "name": "Jürg Lehni"
+ },
+ {
+ "name": "keeyipchan"
+ },
+ {
+ "name": "Keheliya Gallaba"
+ },
+ {
+ "name": "Kevin Irish"
+ },
+ {
+ "name": "Kevin Kwok"
+ },
+ {
+ "name": "krator"
+ },
+ {
+ "name": "Marijn Haverbeke"
+ },
+ {
+ "name": "Martin Carlberg"
+ },
+ {
+ "name": "Mathias Bynens"
+ },
+ {
+ "name": "Mathieu 'p01' Henri"
+ },
+ {
+ "name": "Matthew Bastien"
+ },
+ {
+ "name": "Max Schaefer"
+ },
+ {
+ "name": "Max Zerzouri"
+ },
+ {
+ "name": "Mihai Bazon"
+ },
+ {
+ "name": "Mike Rennie"
+ },
+ {
+ "name": "Nicholas C. Zakas"
+ },
+ {
+ "name": "Nick Fitzgerald"
+ },
+ {
+ "name": "Olivier Thomann"
+ },
+ {
+ "name": "Oskar Schöldström"
+ },
+ {
+ "name": "Paul Harper"
+ },
+ {
+ "name": "Peter Rust"
+ },
+ {
+ "name": "PlNG"
+ },
+ {
+ "name": "Prayag Verma"
+ },
+ {
+ "name": "ReadmeCritic"
+ },
+ {
+ "name": "r-e-d"
+ },
+ {
+ "name": "Richard Gibson"
+ },
+ {
+ "name": "Rich Harris"
+ },
+ {
+ "name": "Rich-Harris"
+ },
+ {
+ "name": "Sebastian McKenzie"
+ },
+ {
+ "name": "Timothy Gu"
+ },
+ {
+ "name": "Toru Nagashima"
+ },
+ {
+ "name": "zsjforcn"
+ }
+ ],
+ "deprecated": false,
+ "description": "ECMAScript parser",
+ "devDependencies": {
+ "rollup": "^0.34.1",
+ "rollup-plugin-buble": "^0.11.0",
+ "unicode-9.0.0": "^0.7.0"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ },
+ "homepage": "https://github.com/ternjs/acorn",
+ "jsnext:main": "dist/acorn.es.js",
+ "license": "MIT",
+ "main": "dist/acorn.js",
+ "maintainers": [
+ {
+ "name": "Marijn Haverbeke",
+ "email": "marijnh@gmail.com",
+ "url": "http://marijnhaverbeke.nl"
+ },
+ {
+ "name": "Ingvar Stepanyan",
+ "email": "me@rreverser.com",
+ "url": "http://rreverser.com/"
+ }
+ ],
+ "name": "acorn",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/ternjs/acorn.git"
+ },
+ "scripts": {
+ "build": "npm run build:main && npm run build:walk && npm run build:loose && npm run build:bin",
+ "build:bin": "rollup -c rollup/config.bin.js",
+ "build:loose": "rollup -c rollup/config.loose.js",
+ "build:main": "rollup -c rollup/config.main.js",
+ "build:walk": "rollup -c rollup/config.walk.js",
+ "prepublish": "npm test",
+ "pretest": "npm run build",
+ "test": "node test/run.js"
+ },
+ "version": "3.3.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/rollup/config.bin.js b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/rollup/config.bin.js
new file mode 100644
index 0000000000..3726606e0d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/rollup/config.bin.js
@@ -0,0 +1,15 @@
+import buble from 'rollup-plugin-buble'
+
+export default {
+ entry: 'src/bin/acorn.js',
+ dest: 'bin/acorn',
+ format: 'cjs',
+ banner: '#!/usr/bin/env node',
+ external: [ 'fs', 'path', 'acorn' ],
+ paths: {
+ acorn: '../dist/acorn.js'
+ },
+ plugins: [
+ buble()
+ ]
+}
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/rollup/config.loose.js b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/rollup/config.loose.js
new file mode 100644
index 0000000000..11116950ee
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/rollup/config.loose.js
@@ -0,0 +1,20 @@
+import buble from 'rollup-plugin-buble'
+
+export default {
+ entry: 'src/loose/index.js',
+ moduleName: 'acorn.loose',
+ external: [ 'acorn' ],
+ paths: {
+ acorn: './acorn.js'
+ },
+ globals: {
+ acorn: 'acorn'
+ },
+ targets: [
+ { dest: 'dist/acorn_loose.js', format: 'umd' },
+ { dest: 'dist/acorn_loose.es.js', format: 'es' }
+ ],
+ plugins: [
+ buble()
+ ]
+}
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/rollup/config.main.js b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/rollup/config.main.js
new file mode 100644
index 0000000000..730b79b2fe
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/rollup/config.main.js
@@ -0,0 +1,11 @@
+import buble from 'rollup-plugin-buble';
+
+export default {
+ entry: 'src/index.js',
+ moduleName: 'acorn',
+ plugins: [ buble() ],
+ targets: [
+ { dest: 'dist/acorn.js', format: 'umd' },
+ { dest: 'dist/acorn.es.js', format: 'es' }
+ ]
+};
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/rollup/config.walk.js b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/rollup/config.walk.js
new file mode 100644
index 0000000000..95f2a93db1
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/rollup/config.walk.js
@@ -0,0 +1,11 @@
+import buble from 'rollup-plugin-buble';
+
+export default {
+ entry: 'src/walk/index.js',
+ moduleName: 'acorn.walk',
+ plugins: [ buble() ],
+ targets: [
+ { dest: 'dist/walk.js', format: 'umd' },
+ { dest: 'dist/walk.es.js', format: 'es' }
+ ]
+};
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/bin/acorn.js b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/bin/acorn.js
new file mode 100644
index 0000000000..2d9cff7c60
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/bin/acorn.js
@@ -0,0 +1,58 @@
+import {basename} from "path"
+import {readFileSync as readFile} from "fs"
+import * as acorn from "acorn"
+
+let infile, forceFile, silent = false, compact = false, tokenize = false
+const options = {}
+
+function help(status) {
+ const print = (status == 0) ? console.log : console.error
+ print("usage: " + basename(process.argv[1]) + " [--ecma3|--ecma5|--ecma6|--ecma7]")
+ print(" [--tokenize] [--locations] [---allow-hash-bang] [--compact] [--silent] [--module] [--help] [--] [infile]")
+ process.exit(status)
+}
+
+for (let i = 2; i < process.argv.length; ++i) {
+ const 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 == "--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 if (arg == "--module") options.sourceType = 'module'
+ else help(1)
+}
+
+function run(code) {
+ let result
+ if (!tokenize) {
+ try { result = acorn.parse(code, options) }
+ catch(e) { console.error(e.message); process.exit(1) }
+ } else {
+ result = []
+ let tokenizer = acorn.tokenizer(code, options), token
+ 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(readFile(infile, "utf8"))
+} else {
+ let code = ""
+ process.stdin.resume()
+ process.stdin.on("data", chunk => code += chunk)
+ process.stdin.on("end", () => run(code))
+}
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/expression.js b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/expression.js
new file mode 100644
index 0000000000..20b25cf055
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/expression.js
@@ -0,0 +1,701 @@
+// 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
+
+import {types as tt} from "./tokentype"
+import {Parser} from "./state"
+import {DestructuringErrors} from "./parseutil"
+
+const 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 && (prop.computed || prop.method || prop.shorthand))
+ return
+ let {key} = prop, name
+ switch (key.type) {
+ case "Identifier": name = key.name; break
+ case "Literal": name = String(key.value); break
+ default: return
+ }
+ let {kind} = prop
+ if (this.options.ecmaVersion >= 6) {
+ if (name === "__proto__" && kind === "init") {
+ if (propHash.proto) this.raiseRecoverable(key.start, "Redefinition of __proto__ property")
+ propHash.proto = true
+ }
+ return
+ }
+ name = "$" + name
+ let other = propHash[name]
+ if (other) {
+ let isGetSet = kind !== "init"
+ if ((this.strict || isGetSet) && other[kind] || !(isGetSet ^ other.init))
+ this.raiseRecoverable(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) {
+ let startPos = this.start, startLoc = this.startLoc
+ let expr = this.parseMaybeAssign(noIn, refDestructuringErrors)
+ if (this.type === tt.comma) {
+ let node = this.startNodeAt(startPos, startLoc)
+ node.expressions = [expr]
+ while (this.eat(tt.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.inGenerator && this.isContextual("yield")) return this.parseYield()
+
+ let ownDestructuringErrors = false
+ if (!refDestructuringErrors) {
+ refDestructuringErrors = new DestructuringErrors
+ ownDestructuringErrors = true
+ }
+ let startPos = this.start, startLoc = this.startLoc
+ if (this.type == tt.parenL || this.type == tt.name)
+ this.potentialArrowAt = this.start
+ let left = this.parseMaybeConditional(noIn, refDestructuringErrors)
+ if (afterLeftParse) left = afterLeftParse.call(this, left, startPos, startLoc)
+ if (this.type.isAssign) {
+ this.checkPatternErrors(refDestructuringErrors, true)
+ if (!ownDestructuringErrors) DestructuringErrors.call(refDestructuringErrors)
+ let node = this.startNodeAt(startPos, startLoc)
+ node.operator = this.value
+ node.left = this.type === tt.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 (ownDestructuringErrors) this.checkExpressionErrors(refDestructuringErrors, true)
+ }
+ return left
+}
+
+// Parse a ternary conditional (`?:`) operator.
+
+pp.parseMaybeConditional = function(noIn, refDestructuringErrors) {
+ let startPos = this.start, startLoc = this.startLoc
+ let expr = this.parseExprOps(noIn, refDestructuringErrors)
+ if (this.checkExpressionErrors(refDestructuringErrors)) return expr
+ if (this.eat(tt.question)) {
+ let 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, refDestructuringErrors) {
+ let startPos = this.start, startLoc = this.startLoc
+ let expr = this.parseMaybeUnary(refDestructuringErrors, false)
+ 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) {
+ let prec = this.type.binop
+ if (prec != null && (!noIn || this.type !== tt._in)) {
+ if (prec > minPrec) {
+ let logical = this.type === tt.logicalOR || this.type === tt.logicalAND
+ let op = this.value
+ this.next()
+ let startPos = this.start, startLoc = this.startLoc
+ let right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, noIn)
+ let node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical)
+ return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn)
+ }
+ }
+ return left
+}
+
+pp.buildBinary = function(startPos, startLoc, left, right, op, logical) {
+ let node = this.startNodeAt(startPos, startLoc)
+ node.left = left
+ node.operator = op
+ node.right = right
+ return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression")
+}
+
+// Parse unary operators, both prefix and postfix.
+
+pp.parseMaybeUnary = function(refDestructuringErrors, sawUnary) {
+ let startPos = this.start, startLoc = this.startLoc, expr
+ if (this.type.prefix) {
+ let node = this.startNode(), update = this.type === tt.incDec
+ node.operator = this.value
+ node.prefix = true
+ this.next()
+ node.argument = this.parseMaybeUnary(null, true)
+ this.checkExpressionErrors(refDestructuringErrors, true)
+ if (update) this.checkLVal(node.argument)
+ else if (this.strict && node.operator === "delete" &&
+ node.argument.type === "Identifier")
+ this.raiseRecoverable(node.start, "Deleting local variable in strict mode")
+ else sawUnary = true
+ expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression")
+ } else {
+ expr = this.parseExprSubscripts(refDestructuringErrors)
+ if (this.checkExpressionErrors(refDestructuringErrors)) return expr
+ while (this.type.postfix && !this.canInsertSemicolon()) {
+ let 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")
+ }
+ }
+
+ if (!sawUnary && this.eat(tt.starstar))
+ return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false), "**", false)
+ else
+ return expr
+}
+
+// Parse call, dot, and `[]`-subscript expressions.
+
+pp.parseExprSubscripts = function(refDestructuringErrors) {
+ let startPos = this.start, startLoc = this.startLoc
+ let expr = this.parseExprAtom(refDestructuringErrors)
+ let 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(tt.dot)) {
+ let 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)) {
+ let 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)) {
+ let 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) {
+ let 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) {
+ let node, canBeArrow = this.potentialArrowAt == this.start
+ switch (this.type) {
+ case tt._super:
+ if (!this.inFunction)
+ this.raise(this.start, "'super' outside of function or class")
+
+ case tt._this:
+ let type = this.type === tt._this ? "ThisExpression" : "Super"
+ node = this.startNode()
+ this.next()
+ return this.finishNode(node, type)
+
+ case tt.name:
+ let startPos = this.start, startLoc = this.startLoc
+ let 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:
+ let 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()
+ node.elements = this.parseExprList(tt.bracketR, true, true, refDestructuringErrors)
+ return this.finishNode(node, "ArrayExpression")
+
+ case tt.braceL:
+ return this.parseObj(false, refDestructuringErrors)
+
+ 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) {
+ let 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)
+ let val = this.parseExpression()
+ this.expect(tt.parenR)
+ return val
+}
+
+pp.parseParenAndDistinguishExpression = function(canBeArrow) {
+ let startPos = this.start, startLoc = this.startLoc, val
+ if (this.options.ecmaVersion >= 6) {
+ this.next()
+
+ let innerStartPos = this.start, innerStartLoc = this.startLoc
+ let exprList = [], first = true
+ let refDestructuringErrors = new DestructuringErrors, spreadStart, innerParenStart
+ 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, refDestructuringErrors, this.parseParenItem))
+ }
+ }
+ let innerEndPos = this.start, innerEndLoc = this.startLoc
+ this.expect(tt.parenR)
+
+ if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.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) {
+ let 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.
+
+const empty = []
+
+pp.parseNew = function() {
+ let node = this.startNode()
+ let 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.raiseRecoverable(node.property.start, "The only valid meta property for new is new.target")
+ if (!this.inFunction)
+ this.raiseRecoverable(node.start, "new.target can only be used in functions")
+ return this.finishNode(node, "MetaProperty")
+ }
+ let 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() {
+ let 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 === tt.backQuote
+ return this.finishNode(elem, "TemplateElement")
+}
+
+pp.parseTemplate = function() {
+ let node = this.startNode()
+ this.next()
+ node.expressions = []
+ let 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, refDestructuringErrors) {
+ let 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
+
+ let prop = this.startNode(), isGenerator, startPos, startLoc
+ 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(tt.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(tt.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 === 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)
+ let paramCount = prop.kind === "get" ? 0 : 1
+ if (prop.value.params.length !== paramCount) {
+ let start = prop.value.start
+ if (prop.kind === "get")
+ this.raiseRecoverable(start, "getter should have no params")
+ else
+ this.raiseRecoverable(start, "setter should have exactly one param")
+ }
+ if (prop.kind === "set" && prop.value.params[0].type === "RestElement")
+ this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params")
+ } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") {
+ if (this.keywords.test(prop.key.name) ||
+ (this.strict ? this.reservedWordsStrictBind : this.reservedWords).test(prop.key.name) ||
+ (this.inGenerator && prop.key.name == "yield"))
+ this.raiseRecoverable(prop.key.start, "'" + prop.key.name + "' can not be used as shorthand property")
+ prop.kind = "init"
+ if (isPattern) {
+ prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key)
+ } else if (this.type === tt.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(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) {
+ let node = this.startNode(), oldInGen = this.inGenerator
+ this.inGenerator = isGenerator
+ this.initFunction(node)
+ this.expect(tt.parenL)
+ node.params = this.parseBindingList(tt.parenR, false, false)
+ if (this.options.ecmaVersion >= 6)
+ node.generator = isGenerator
+ this.parseFunctionBody(node, false)
+ this.inGenerator = oldInGen
+ return this.finishNode(node, "FunctionExpression")
+}
+
+// Parse arrow function expression with given parameters.
+
+pp.parseArrowExpression = function(node, params) {
+ let oldInGen = this.inGenerator
+ this.inGenerator = false
+ this.initFunction(node)
+ node.params = this.toAssignableList(params, true)
+ this.parseFunctionBody(node, true)
+ this.inGenerator = oldInGen
+ return this.finishNode(node, "ArrowFunctionExpression")
+}
+
+// Parse function body and check parameters.
+
+pp.parseFunctionBody = function(node, isArrowFunction) {
+ let isExpression = isArrowFunction && 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).
+ let oldInFunc = this.inFunction, oldLabels = this.labels
+ this.inFunction = true; this.labels = []
+ node.body = this.parseBlock(true)
+ node.expression = false
+ this.inFunction = oldInFunc; 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`.
+ let useStrict = (!isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) ? node.body.body[0] : null;
+ if (this.strict || useStrict) {
+ let oldStrict = this.strict
+ this.strict = true
+ if (node.id)
+ this.checkLVal(node.id, true)
+ this.checkParams(node, useStrict)
+ this.strict = oldStrict
+ } else if (isArrowFunction) {
+ this.checkParams(node, useStrict)
+ }
+}
+
+// Checks function params for various disallowed patterns such as using "eval"
+// or "arguments" and duplicate parameters.
+
+pp.checkParams = function(node, useStrict) {
+ let nameHash = {}
+ for (let i = 0; i < node.params.length; i++) {
+ if (useStrict && this.options.ecmaVersion >= 7 && node.params[i].type !== "Identifier")
+ this.raiseRecoverable(useStrict.start, "Illegal 'use strict' directive in function with non-simple parameter list");
+ 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) {
+ let elts = [], first = true
+ while (!this.eat(close)) {
+ if (!first) {
+ this.expect(tt.comma)
+ if (allowTrailingComma && this.afterTrailingComma(close)) break
+ } else first = false
+
+ let elt
+ if (allowEmpty && this.type === tt.comma)
+ elt = null
+ else if (this.type === tt.ellipsis) {
+ elt = this.parseSpread(refDestructuringErrors)
+ if (this.type === tt.comma && refDestructuringErrors && !refDestructuringErrors.trailingComma) {
+ refDestructuringErrors.trailingComma = this.lastTokStart
+ }
+ } 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) {
+ let node = this.startNode()
+ if (liberal && this.options.allowReserved == "never") liberal = false
+ if (this.type === tt.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.raiseRecoverable(this.start, "The keyword '" + this.value + "' is reserved")
+ if (!liberal && this.inGenerator && this.value === "yield")
+ this.raiseRecoverable(this.start, "Can not use 'yield' as identifier inside a generator")
+ 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() {
+ let 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")
+}
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/identifier.js b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/identifier.js
new file mode 100644
index 0000000000..e4a7415ac1
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/identifier.js
@@ -0,0 +1,82 @@
+// Reserved word lists for various dialects of the language
+
+export const 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",
+ 7: "enum",
+ strict: "implements interface let package private protected public static yield",
+ strictBind: "eval arguments"
+}
+
+// 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"
+
+export const keywords = {
+ 5: ecma5AndLessKeywords,
+ 6: ecma5AndLessKeywords + " const class extends export import super"
+}
+
+// ## 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`.
+
+let nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fd5\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ae\ua7b0-\ua7b7\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab65\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"
+let nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d4-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d01-\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1cf8\u1cf9\u1dc0-\u1df5\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua900-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f"
+
+const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]")
+const 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 bin/generate-identifier-regex.js
+const 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,19,35,5,35,5,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,66,18,2,1,11,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,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,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,60,67,1213,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,3,5761,10591,541]
+const 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,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,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,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,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) {
+ let pos = 0x10000
+ for (let 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.
+
+export 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.
+
+export 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)
+}
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/index.js b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/index.js
new file mode 100644
index 0000000000..0a59bdf791
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/index.js
@@ -0,0 +1,67 @@
+// 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
+
+import {Parser} from "./state"
+import "./parseutil"
+import "./statement"
+import "./lval"
+import "./expression"
+import "./location"
+
+export {Parser, plugins} from "./state"
+export {defaultOptions} from "./options"
+export {Position, SourceLocation, getLineInfo} from "./locutil"
+export {Node} from "./node"
+export {TokenType, types as tokTypes} from "./tokentype"
+export {TokContext, types as tokContexts} from "./tokencontext"
+export {isIdentifierChar, isIdentifierStart} from "./identifier"
+export {Token} from "./tokenize"
+export {isNewLine, lineBreak, lineBreakG} from "./whitespace"
+
+export const version = "3.3.0"
+
+// 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
+
+export function parse(input, options) {
+ return new 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.
+
+export function parseExpressionAt(input, pos, options) {
+ let p = new 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.
+
+export function tokenizer(input, options) {
+ return new Parser(options, input)
+}
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/location.js b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/location.js
new file mode 100644
index 0000000000..99e71234cc
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/location.js
@@ -0,0 +1,26 @@
+import {Parser} from "./state"
+import {Position, getLineInfo} from "./locutil"
+
+const 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) {
+ let loc = getLineInfo(this.input, pos)
+ message += " (" + loc.line + ":" + loc.column + ")"
+ let err = new SyntaxError(message)
+ err.pos = pos; err.loc = loc; err.raisedAt = this.pos
+ throw err
+}
+
+pp.raiseRecoverable = pp.raise
+
+pp.curPosition = function() {
+ if (this.options.locations) {
+ return new Position(this.curLine, this.pos - this.lineStart)
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/locutil.js b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/locutil.js
new file mode 100644
index 0000000000..5a9465e017
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/locutil.js
@@ -0,0 +1,42 @@
+import {lineBreakG} from "./whitespace"
+
+// These are used when `options.locations` is on, for the
+// `startLoc` and `endLoc` properties.
+
+export class Position {
+ constructor(line, col) {
+ this.line = line
+ this.column = col
+ }
+
+ offset(n) {
+ return new Position(this.line, this.column + n)
+ }
+}
+
+export class SourceLocation {
+ constructor(p, start, end) {
+ 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.
+
+export function getLineInfo(input, offset) {
+ for (let line = 1, cur = 0;;) {
+ lineBreakG.lastIndex = cur
+ let match = lineBreakG.exec(input)
+ if (match && match.index < offset) {
+ ++line
+ cur = match.index + match[0].length
+ } else {
+ return new Position(line, offset - cur)
+ }
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/expression.js b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/expression.js
new file mode 100644
index 0000000000..52f409e5c9
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/expression.js
@@ -0,0 +1,514 @@
+import {LooseParser} from "./state"
+import {isDummy} from "./parseutil"
+import {tokTypes as tt} from "acorn"
+
+const lp = LooseParser.prototype
+
+lp.checkLVal = function(expr) {
+ if (!expr) return expr
+ switch (expr.type) {
+ case "Identifier":
+ case "MemberExpression":
+ return expr
+
+ case "ParenthesizedExpression":
+ expr.expression = this.checkLVal(expr.expression)
+ return expr
+
+ default:
+ return this.dummyIdent()
+ }
+}
+
+lp.parseExpression = function(noIn) {
+ let start = this.storeCurrentPos()
+ let expr = this.parseMaybeAssign(noIn)
+ if (this.tok.type === tt.comma) {
+ let node = this.startNodeAt(start)
+ node.expressions = [expr]
+ while (this.eat(tt.comma)) node.expressions.push(this.parseMaybeAssign(noIn))
+ return this.finishNode(node, "SequenceExpression")
+ }
+ return expr
+}
+
+lp.parseParenExpression = function() {
+ this.pushCx()
+ this.expect(tt.parenL)
+ let val = this.parseExpression()
+ this.popCx()
+ this.expect(tt.parenR)
+ return val
+}
+
+lp.parseMaybeAssign = function(noIn) {
+ if (this.toks.isContextual("yield")) {
+ let node = this.startNode()
+ this.next()
+ if (this.semicolon() || this.canInsertSemicolon() || (this.tok.type != tt.star && !this.tok.type.startsExpr)) {
+ node.delegate = false
+ node.argument = null
+ } else {
+ node.delegate = this.eat(tt.star)
+ node.argument = this.parseMaybeAssign()
+ }
+ return this.finishNode(node, "YieldExpression")
+ }
+
+ let start = this.storeCurrentPos()
+ let left = this.parseMaybeConditional(noIn)
+ if (this.tok.type.isAssign) {
+ let node = this.startNodeAt(start)
+ node.operator = this.tok.value
+ node.left = this.tok.type === tt.eq ? this.toAssignable(left) : this.checkLVal(left)
+ this.next()
+ node.right = this.parseMaybeAssign(noIn)
+ return this.finishNode(node, "AssignmentExpression")
+ }
+ return left
+}
+
+lp.parseMaybeConditional = function(noIn) {
+ let start = this.storeCurrentPos()
+ let expr = this.parseExprOps(noIn)
+ if (this.eat(tt.question)) {
+ let node = this.startNodeAt(start)
+ node.test = expr
+ node.consequent = this.parseMaybeAssign()
+ node.alternate = this.expect(tt.colon) ? this.parseMaybeAssign(noIn) : this.dummyIdent()
+ return this.finishNode(node, "ConditionalExpression")
+ }
+ return expr
+}
+
+lp.parseExprOps = function(noIn) {
+ let start = this.storeCurrentPos()
+ let indent = this.curIndent, line = this.curLineStart
+ return this.parseExprOp(this.parseMaybeUnary(false), start, -1, noIn, indent, line)
+}
+
+lp.parseExprOp = function(left, start, minPrec, noIn, indent, line) {
+ if (this.curLineStart != line && this.curIndent < indent && this.tokenStartsLine()) return left
+ let prec = this.tok.type.binop
+ if (prec != null && (!noIn || this.tok.type !== tt._in)) {
+ if (prec > minPrec) {
+ let node = this.startNodeAt(start)
+ node.left = left
+ node.operator = this.tok.value
+ this.next()
+ if (this.curLineStart != line && this.curIndent < indent && this.tokenStartsLine()) {
+ node.right = this.dummyIdent()
+ } else {
+ let rightStart = this.storeCurrentPos()
+ node.right = this.parseExprOp(this.parseMaybeUnary(false), rightStart, prec, noIn, indent, line)
+ }
+ this.finishNode(node, /&&|\|\|/.test(node.operator) ? "LogicalExpression" : "BinaryExpression")
+ return this.parseExprOp(node, start, minPrec, noIn, indent, line)
+ }
+ }
+ return left
+}
+
+lp.parseMaybeUnary = function(sawUnary) {
+ let start = this.storeCurrentPos(), expr
+ if (this.tok.type.prefix) {
+ let node = this.startNode(), update = this.tok.type === tt.incDec
+ if (!update) sawUnary = true
+ node.operator = this.tok.value
+ node.prefix = true
+ this.next()
+ node.argument = this.parseMaybeUnary(true)
+ if (update) node.argument = this.checkLVal(node.argument)
+ expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression")
+ } else if (this.tok.type === tt.ellipsis) {
+ let node = this.startNode()
+ this.next()
+ node.argument = this.parseMaybeUnary(sawUnary)
+ expr = this.finishNode(node, "SpreadElement")
+ } else {
+ expr = this.parseExprSubscripts()
+ while (this.tok.type.postfix && !this.canInsertSemicolon()) {
+ let node = this.startNodeAt(start)
+ node.operator = this.tok.value
+ node.prefix = false
+ node.argument = this.checkLVal(expr)
+ this.next()
+ expr = this.finishNode(node, "UpdateExpression")
+ }
+ }
+
+ if (!sawUnary && this.eat(tt.starstar)) {
+ let node = this.startNodeAt(start)
+ node.operator = "**"
+ node.left = expr
+ node.right = this.parseMaybeUnary(false)
+ return this.finishNode(node, "BinaryExpression")
+ }
+
+ return expr
+}
+
+lp.parseExprSubscripts = function() {
+ let start = this.storeCurrentPos()
+ return this.parseSubscripts(this.parseExprAtom(), start, false, this.curIndent, this.curLineStart)
+}
+
+lp.parseSubscripts = function(base, start, noCalls, startIndent, line) {
+ for (;;) {
+ if (this.curLineStart != line && this.curIndent <= startIndent && this.tokenStartsLine()) {
+ if (this.tok.type == tt.dot && this.curIndent == startIndent)
+ --startIndent
+ else
+ return base
+ }
+
+ if (this.eat(tt.dot)) {
+ let node = this.startNodeAt(start)
+ node.object = base
+ if (this.curLineStart != line && this.curIndent <= startIndent && this.tokenStartsLine())
+ node.property = this.dummyIdent()
+ else
+ node.property = this.parsePropertyAccessor() || this.dummyIdent()
+ node.computed = false
+ base = this.finishNode(node, "MemberExpression")
+ } else if (this.tok.type == tt.bracketL) {
+ this.pushCx()
+ this.next()
+ let node = this.startNodeAt(start)
+ node.object = base
+ node.property = this.parseExpression()
+ node.computed = true
+ this.popCx()
+ this.expect(tt.bracketR)
+ base = this.finishNode(node, "MemberExpression")
+ } else if (!noCalls && this.tok.type == tt.parenL) {
+ let node = this.startNodeAt(start)
+ node.callee = base
+ node.arguments = this.parseExprList(tt.parenR)
+ base = this.finishNode(node, "CallExpression")
+ } else if (this.tok.type == tt.backQuote) {
+ let node = this.startNodeAt(start)
+ node.tag = base
+ node.quasi = this.parseTemplate()
+ base = this.finishNode(node, "TaggedTemplateExpression")
+ } else {
+ return base
+ }
+ }
+}
+
+lp.parseExprAtom = function() {
+ let node
+ switch (this.tok.type) {
+ case tt._this:
+ case tt._super:
+ let type = this.tok.type === tt._this ? "ThisExpression" : "Super"
+ node = this.startNode()
+ this.next()
+ return this.finishNode(node, type)
+
+ case tt.name:
+ let start = this.storeCurrentPos()
+ let id = this.parseIdent()
+ return this.eat(tt.arrow) ? this.parseArrowExpression(this.startNodeAt(start), [id]) : id
+
+ case tt.regexp:
+ node = this.startNode()
+ let val = this.tok.value
+ node.regex = {pattern: val.pattern, flags: val.flags}
+ node.value = val.value
+ node.raw = this.input.slice(this.tok.start, this.tok.end)
+ this.next()
+ return this.finishNode(node, "Literal")
+
+ case tt.num: case tt.string:
+ node = this.startNode()
+ node.value = this.tok.value
+ node.raw = this.input.slice(this.tok.start, this.tok.end)
+ this.next()
+ return this.finishNode(node, "Literal")
+
+ case tt._null: case tt._true: case tt._false:
+ node = this.startNode()
+ node.value = this.tok.type === tt._null ? null : this.tok.type === tt._true
+ node.raw = this.tok.type.keyword
+ this.next()
+ return this.finishNode(node, "Literal")
+
+ case tt.parenL:
+ let parenStart = this.storeCurrentPos()
+ this.next()
+ let inner = this.parseExpression()
+ this.expect(tt.parenR)
+ if (this.eat(tt.arrow)) {
+ return this.parseArrowExpression(this.startNodeAt(parenStart), inner.expressions || (isDummy(inner) ? [] : [inner]))
+ }
+ if (this.options.preserveParens) {
+ let par = this.startNodeAt(parenStart)
+ par.expression = inner
+ inner = this.finishNode(par, "ParenthesizedExpression")
+ }
+ return inner
+
+ case tt.bracketL:
+ node = this.startNode()
+ node.elements = this.parseExprList(tt.bracketR, true)
+ return this.finishNode(node, "ArrayExpression")
+
+ case tt.braceL:
+ return this.parseObj()
+
+ case tt._class:
+ return this.parseClass()
+
+ case tt._function:
+ node = this.startNode()
+ this.next()
+ return this.parseFunction(node, false)
+
+ case tt._new:
+ return this.parseNew()
+
+ case tt.backQuote:
+ return this.parseTemplate()
+
+ default:
+ return this.dummyIdent()
+ }
+}
+
+lp.parseNew = function() {
+ let node = this.startNode(), startIndent = this.curIndent, line = this.curLineStart
+ let meta = this.parseIdent(true)
+ if (this.options.ecmaVersion >= 6 && this.eat(tt.dot)) {
+ node.meta = meta
+ node.property = this.parseIdent(true)
+ return this.finishNode(node, "MetaProperty")
+ }
+ let start = this.storeCurrentPos()
+ node.callee = this.parseSubscripts(this.parseExprAtom(), start, true, startIndent, line)
+ if (this.tok.type == tt.parenL) {
+ node.arguments = this.parseExprList(tt.parenR)
+ } else {
+ node.arguments = []
+ }
+ return this.finishNode(node, "NewExpression")
+}
+
+lp.parseTemplateElement = function() {
+ let elem = this.startNode()
+ elem.value = {
+ raw: this.input.slice(this.tok.start, this.tok.end).replace(/\r\n?/g, '\n'),
+ cooked: this.tok.value
+ }
+ this.next()
+ elem.tail = this.tok.type === tt.backQuote
+ return this.finishNode(elem, "TemplateElement")
+}
+
+lp.parseTemplate = function() {
+ let node = this.startNode()
+ this.next()
+ node.expressions = []
+ let curElt = this.parseTemplateElement()
+ node.quasis = [curElt]
+ while (!curElt.tail) {
+ this.next()
+ node.expressions.push(this.parseExpression())
+ if (this.expect(tt.braceR)) {
+ curElt = this.parseTemplateElement()
+ } else {
+ curElt = this.startNode()
+ curElt.value = {cooked: '', raw: ''}
+ curElt.tail = true
+ this.finishNode(curElt, "TemplateElement")
+ }
+ node.quasis.push(curElt)
+ }
+ this.expect(tt.backQuote)
+ return this.finishNode(node, "TemplateLiteral")
+}
+
+lp.parseObj = function() {
+ let node = this.startNode()
+ node.properties = []
+ this.pushCx()
+ let indent = this.curIndent + 1, line = this.curLineStart
+ this.eat(tt.braceL)
+ if (this.curIndent + 1 < indent) { indent = this.curIndent; line = this.curLineStart }
+ while (!this.closes(tt.braceR, indent, line)) {
+ let prop = this.startNode(), isGenerator, start
+ if (this.options.ecmaVersion >= 6) {
+ start = this.storeCurrentPos()
+ prop.method = false
+ prop.shorthand = false
+ isGenerator = this.eat(tt.star)
+ }
+ this.parsePropertyName(prop)
+ if (isDummy(prop.key)) { if (isDummy(this.parseMaybeAssign())) this.next(); this.eat(tt.comma); continue }
+ if (this.eat(tt.colon)) {
+ prop.kind = "init"
+ prop.value = this.parseMaybeAssign()
+ } else if (this.options.ecmaVersion >= 6 && (this.tok.type === tt.parenL || this.tok.type === tt.braceL)) {
+ prop.kind = "init"
+ prop.method = true
+ prop.value = this.parseMethod(isGenerator)
+ } else if (this.options.ecmaVersion >= 5 && prop.key.type === "Identifier" &&
+ !prop.computed && (prop.key.name === "get" || prop.key.name === "set") &&
+ (this.tok.type != tt.comma && this.tok.type != tt.braceR)) {
+ prop.kind = prop.key.name
+ this.parsePropertyName(prop)
+ prop.value = this.parseMethod(false)
+ } else {
+ prop.kind = "init"
+ if (this.options.ecmaVersion >= 6) {
+ if (this.eat(tt.eq)) {
+ let assign = this.startNodeAt(start)
+ assign.operator = "="
+ assign.left = prop.key
+ assign.right = this.parseMaybeAssign()
+ prop.value = this.finishNode(assign, "AssignmentExpression")
+ } else {
+ prop.value = prop.key
+ }
+ } else {
+ prop.value = this.dummyIdent()
+ }
+ prop.shorthand = true
+ }
+ node.properties.push(this.finishNode(prop, "Property"))
+ this.eat(tt.comma)
+ }
+ this.popCx()
+ if (!this.eat(tt.braceR)) {
+ // If there is no closing brace, make the node span to the start
+ // of the next token (this is useful for Tern)
+ this.last.end = this.tok.start
+ if (this.options.locations) this.last.loc.end = this.tok.loc.start
+ }
+ return this.finishNode(node, "ObjectExpression")
+}
+
+lp.parsePropertyName = function(prop) {
+ if (this.options.ecmaVersion >= 6) {
+ if (this.eat(tt.bracketL)) {
+ prop.computed = true
+ prop.key = this.parseExpression()
+ this.expect(tt.bracketR)
+ return
+ } else {
+ prop.computed = false
+ }
+ }
+ let key = (this.tok.type === tt.num || this.tok.type === tt.string) ? this.parseExprAtom() : this.parseIdent()
+ prop.key = key || this.dummyIdent()
+}
+
+lp.parsePropertyAccessor = function() {
+ if (this.tok.type === tt.name || this.tok.type.keyword) return this.parseIdent()
+}
+
+lp.parseIdent = function() {
+ let name = this.tok.type === tt.name ? this.tok.value : this.tok.type.keyword
+ if (!name) return this.dummyIdent()
+ let node = this.startNode()
+ this.next()
+ node.name = name
+ return this.finishNode(node, "Identifier")
+}
+
+lp.initFunction = function(node) {
+ node.id = null
+ node.params = []
+ if (this.options.ecmaVersion >= 6) {
+ node.generator = false
+ node.expression = false
+ }
+}
+
+// Convert existing expression atom to assignable pattern
+// if possible.
+
+lp.toAssignable = function(node, binding) {
+ if (!node || node.type == "Identifier" || (node.type == "MemberExpression" && !binding)) {
+ // Okay
+ } else if (node.type == "ParenthesizedExpression") {
+ node.expression = this.toAssignable(node.expression, binding)
+ } else if (this.options.ecmaVersion < 6) {
+ return this.dummyIdent()
+ } else if (node.type == "ObjectExpression") {
+ node.type = "ObjectPattern"
+ let props = node.properties
+ for (let i = 0; i < props.length; i++)
+ props[i].value = this.toAssignable(props[i].value, binding)
+ } else if (node.type == "ArrayExpression") {
+ node.type = "ArrayPattern"
+ this.toAssignableList(node.elements, binding)
+ } else if (node.type == "SpreadElement") {
+ node.type = "RestElement"
+ node.argument = this.toAssignable(node.argument, binding)
+ } else if (node.type == "AssignmentExpression") {
+ node.type = "AssignmentPattern"
+ delete node.operator
+ } else {
+ return this.dummyIdent()
+ }
+ return node
+}
+
+lp.toAssignableList = function(exprList, binding) {
+ for (let i = 0; i < exprList.length; i++)
+ exprList[i] = this.toAssignable(exprList[i], binding)
+ return exprList
+}
+
+lp.parseFunctionParams = function(params) {
+ params = this.parseExprList(tt.parenR)
+ return this.toAssignableList(params, true)
+}
+
+lp.parseMethod = function(isGenerator) {
+ let node = this.startNode()
+ this.initFunction(node)
+ node.params = this.parseFunctionParams()
+ node.generator = isGenerator || false
+ node.expression = this.options.ecmaVersion >= 6 && this.tok.type !== tt.braceL
+ node.body = node.expression ? this.parseMaybeAssign() : this.parseBlock()
+ return this.finishNode(node, "FunctionExpression")
+}
+
+lp.parseArrowExpression = function(node, params) {
+ this.initFunction(node)
+ node.params = this.toAssignableList(params, true)
+ node.expression = this.tok.type !== tt.braceL
+ node.body = node.expression ? this.parseMaybeAssign() : this.parseBlock()
+ return this.finishNode(node, "ArrowFunctionExpression")
+}
+
+lp.parseExprList = function(close, allowEmpty) {
+ this.pushCx()
+ let indent = this.curIndent, line = this.curLineStart, elts = []
+ this.next() // Opening bracket
+ while (!this.closes(close, indent + 1, line)) {
+ if (this.eat(tt.comma)) {
+ elts.push(allowEmpty ? null : this.dummyIdent())
+ continue
+ }
+ let elt = this.parseMaybeAssign()
+ if (isDummy(elt)) {
+ if (this.closes(close, indent, line)) break
+ this.next()
+ } else {
+ elts.push(elt)
+ }
+ this.eat(tt.comma)
+ }
+ this.popCx()
+ if (!this.eat(close)) {
+ // If there is no closing brace, make the node span to the start
+ // of the next token (this is useful for Tern)
+ this.last.end = this.tok.start
+ if (this.options.locations) this.last.loc.end = this.tok.loc.start
+ }
+ return elts
+}
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/index.js b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/index.js
new file mode 100644
index 0000000000..e9e940e75f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/index.js
@@ -0,0 +1,50 @@
+// Acorn: Loose parser
+//
+// This module provides an alternative parser (`parse_dammit`) that
+// exposes that same interface as `parse`, but will try to parse
+// anything as JavaScript, repairing syntax error the best it can.
+// There are circumstances in which it will raise an error and give
+// up, but they are very rare. The resulting AST will be a mostly
+// valid JavaScript AST (as per the [Mozilla parser API][api], except
+// that:
+//
+// - Return outside functions is allowed
+//
+// - Label consistency (no conflicts, break only to existing labels)
+// is not enforced.
+//
+// - Bogus Identifier nodes with a name of `"✖"` are inserted whenever
+// the parser got too confused to return anything meaningful.
+//
+// [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API
+//
+// The expected use for this is to *first* try `acorn.parse`, and only
+// if that fails switch to `parse_dammit`. The loose parser might
+// parse badly indented code incorrectly, so **don't** use it as
+// your default parser.
+//
+// Quite a lot of acorn.js is duplicated here. The alternative was to
+// add a *lot* of extra cruft to that file, making it less readable
+// and slower. Copying and editing the code allowed me to make
+// invasive changes and simplifications without creating a complicated
+// tangle.
+
+import acorn from "acorn"
+import {LooseParser, pluginsLoose} from "./state"
+import "./tokenize"
+import "./statement"
+import "./expression"
+
+export {LooseParser, pluginsLoose} from "./state"
+
+acorn.defaultOptions.tabSize = 4
+
+export function parse_dammit(input, options) {
+ let p = new LooseParser(input, options)
+ p.next()
+ return p.parseTopLevel()
+}
+
+acorn.parse_dammit = parse_dammit
+acorn.LooseParser = LooseParser
+acorn.pluginsLoose = pluginsLoose
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/parseutil.js b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/parseutil.js
new file mode 100644
index 0000000000..c5ee096a1d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/parseutil.js
@@ -0,0 +1 @@
+export function isDummy(node) { return node.name == "✖" } \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/state.js b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/state.js
new file mode 100644
index 0000000000..5101bc4de2
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/state.js
@@ -0,0 +1,160 @@
+import {tokenizer, SourceLocation, tokTypes as tt, Node, lineBreak, isNewLine} from "acorn"
+
+// Registered plugins
+export const pluginsLoose = {}
+
+export class LooseParser {
+ constructor(input, options = {}) {
+ this.toks = tokenizer(input, options)
+ this.options = this.toks.options
+ this.input = this.toks.input
+ this.tok = this.last = {type: tt.eof, start: 0, end: 0}
+ if (this.options.locations) {
+ let here = this.toks.curPosition()
+ this.tok.loc = new SourceLocation(this.toks, here, here)
+ }
+ this.ahead = [] // Tokens ahead
+ this.context = [] // Indentation contexted
+ this.curIndent = 0
+ this.curLineStart = 0
+ this.nextLineStart = this.lineEnd(this.curLineStart) + 1
+ // Load plugins
+ this.options.pluginsLoose = options.pluginsLoose || {}
+ this.loadPlugins(this.options.pluginsLoose)
+ }
+
+ startNode() {
+ return new Node(this.toks, this.tok.start, this.options.locations ? this.tok.loc.start : null)
+ }
+
+ storeCurrentPos() {
+ return this.options.locations ? [this.tok.start, this.tok.loc.start] : this.tok.start
+ }
+
+ startNodeAt(pos) {
+ if (this.options.locations) {
+ return new Node(this.toks, pos[0], pos[1])
+ } else {
+ return new Node(this.toks, pos)
+ }
+ }
+
+ finishNode(node, type) {
+ node.type = type
+ node.end = this.last.end
+ if (this.options.locations)
+ node.loc.end = this.last.loc.end
+ if (this.options.ranges)
+ node.range[1] = this.last.end
+ return node
+ }
+
+ dummyNode(type) {
+ let dummy = this.startNode()
+ dummy.type = type
+ dummy.end = dummy.start
+ if (this.options.locations)
+ dummy.loc.end = dummy.loc.start
+ if (this.options.ranges)
+ dummy.range[1] = dummy.start
+ this.last = {type: tt.name, start: dummy.start, end: dummy.start, loc: dummy.loc}
+ return dummy
+ }
+
+ dummyIdent() {
+ let dummy = this.dummyNode("Identifier")
+ dummy.name = "✖"
+ return dummy
+ }
+
+ dummyString() {
+ let dummy = this.dummyNode("Literal")
+ dummy.value = dummy.raw = "✖"
+ return dummy
+ }
+
+ eat(type) {
+ if (this.tok.type === type) {
+ this.next()
+ return true
+ } else {
+ return false
+ }
+ }
+
+ isContextual(name) {
+ return this.tok.type === tt.name && this.tok.value === name
+ }
+
+ eatContextual(name) {
+ return this.tok.value === name && this.eat(tt.name)
+ }
+
+ canInsertSemicolon() {
+ return this.tok.type === tt.eof || this.tok.type === tt.braceR ||
+ lineBreak.test(this.input.slice(this.last.end, this.tok.start))
+ }
+
+ semicolon() {
+ return this.eat(tt.semi)
+ }
+
+ expect(type) {
+ if (this.eat(type)) return true
+ for (let i = 1; i <= 2; i++) {
+ if (this.lookAhead(i).type == type) {
+ for (let j = 0; j < i; j++) this.next()
+ return true
+ }
+ }
+ }
+
+ pushCx() {
+ this.context.push(this.curIndent)
+ }
+
+ popCx() {
+ this.curIndent = this.context.pop()
+ }
+
+ lineEnd(pos) {
+ while (pos < this.input.length && !isNewLine(this.input.charCodeAt(pos))) ++pos
+ return pos
+ }
+
+ indentationAfter(pos) {
+ for (let count = 0;; ++pos) {
+ let ch = this.input.charCodeAt(pos)
+ if (ch === 32) ++count
+ else if (ch === 9) count += this.options.tabSize
+ else return count
+ }
+ }
+
+ closes(closeTok, indent, line, blockHeuristic) {
+ if (this.tok.type === closeTok || this.tok.type === tt.eof) return true
+ return line != this.curLineStart && this.curIndent < indent && this.tokenStartsLine() &&
+ (!blockHeuristic || this.nextLineStart >= this.input.length ||
+ this.indentationAfter(this.nextLineStart) < indent)
+ }
+
+ tokenStartsLine() {
+ for (let p = this.tok.start - 1; p >= this.curLineStart; --p) {
+ let ch = this.input.charCodeAt(p)
+ if (ch !== 9 && ch !== 32) return false
+ }
+ return true
+ }
+
+ extend(name, f) {
+ this[name] = f(this[name])
+ }
+
+ loadPlugins(pluginConfigs) {
+ for (let name in pluginConfigs) {
+ let plugin = pluginsLoose[name]
+ if (!plugin) throw new Error("Plugin '" + name + "' not found")
+ plugin(this, pluginConfigs[name])
+ }
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/statement.js b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/statement.js
new file mode 100644
index 0000000000..4da72189eb
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/statement.js
@@ -0,0 +1,425 @@
+import {LooseParser} from "./state"
+import {isDummy} from "./parseutil"
+import {getLineInfo, tokTypes as tt} from "acorn"
+
+const lp = LooseParser.prototype
+
+lp.parseTopLevel = function() {
+ let node = this.startNodeAt(this.options.locations ? [0, getLineInfo(this.input, 0)] : 0)
+ node.body = []
+ while (this.tok.type !== tt.eof) node.body.push(this.parseStatement())
+ this.last = this.tok
+ if (this.options.ecmaVersion >= 6) {
+ node.sourceType = this.options.sourceType
+ }
+ return this.finishNode(node, "Program")
+}
+
+lp.parseStatement = function() {
+ let starttype = this.tok.type, node = this.startNode(), kind
+
+ if (this.toks.isLet()) {
+ starttype = tt._var
+ kind = "let"
+ }
+
+ switch (starttype) {
+ case tt._break: case tt._continue:
+ this.next()
+ let isBreak = starttype === tt._break
+ if (this.semicolon() || this.canInsertSemicolon()) {
+ node.label = null
+ } else {
+ node.label = this.tok.type === tt.name ? this.parseIdent() : null
+ this.semicolon()
+ }
+ return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement")
+
+ case tt._debugger:
+ this.next()
+ this.semicolon()
+ return this.finishNode(node, "DebuggerStatement")
+
+ case tt._do:
+ this.next()
+ node.body = this.parseStatement()
+ node.test = this.eat(tt._while) ? this.parseParenExpression() : this.dummyIdent()
+ this.semicolon()
+ return this.finishNode(node, "DoWhileStatement")
+
+ case tt._for:
+ this.next()
+ this.pushCx()
+ this.expect(tt.parenL)
+ if (this.tok.type === tt.semi) return this.parseFor(node, null)
+ let isLet = this.toks.isLet()
+ if (isLet || this.tok.type === tt._var || this.tok.type === tt._const) {
+ let init = this.parseVar(true, isLet ? "let" : this.tok.value)
+ if (init.declarations.length === 1 && (this.tok.type === tt._in || this.isContextual("of"))) {
+ return this.parseForIn(node, init)
+ }
+ return this.parseFor(node, init)
+ }
+ let init = this.parseExpression(true)
+ if (this.tok.type === tt._in || this.isContextual("of"))
+ return this.parseForIn(node, this.toAssignable(init))
+ return this.parseFor(node, init)
+
+ case tt._function:
+ this.next()
+ return this.parseFunction(node, true)
+
+ case tt._if:
+ this.next()
+ node.test = this.parseParenExpression()
+ node.consequent = this.parseStatement()
+ node.alternate = this.eat(tt._else) ? this.parseStatement() : null
+ return this.finishNode(node, "IfStatement")
+
+ case tt._return:
+ this.next()
+ if (this.eat(tt.semi) || this.canInsertSemicolon()) node.argument = null
+ else { node.argument = this.parseExpression(); this.semicolon() }
+ return this.finishNode(node, "ReturnStatement")
+
+ case tt._switch:
+ let blockIndent = this.curIndent, line = this.curLineStart
+ this.next()
+ node.discriminant = this.parseParenExpression()
+ node.cases = []
+ this.pushCx()
+ this.expect(tt.braceL)
+
+ let cur
+ while (!this.closes(tt.braceR, blockIndent, line, true)) {
+ if (this.tok.type === tt._case || this.tok.type === tt._default) {
+ let isCase = this.tok.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 cur.test = null
+ this.expect(tt.colon)
+ } else {
+ if (!cur) {
+ node.cases.push(cur = this.startNode())
+ cur.consequent = []
+ cur.test = null
+ }
+ cur.consequent.push(this.parseStatement())
+ }
+ }
+ if (cur) this.finishNode(cur, "SwitchCase")
+ this.popCx()
+ this.eat(tt.braceR)
+ return this.finishNode(node, "SwitchStatement")
+
+ case tt._throw:
+ this.next()
+ node.argument = this.parseExpression()
+ this.semicolon()
+ return this.finishNode(node, "ThrowStatement")
+
+ case tt._try:
+ this.next()
+ node.block = this.parseBlock()
+ node.handler = null
+ if (this.tok.type === tt._catch) {
+ let clause = this.startNode()
+ this.next()
+ this.expect(tt.parenL)
+ clause.param = this.toAssignable(this.parseExprAtom(), true)
+ this.expect(tt.parenR)
+ clause.body = this.parseBlock()
+ node.handler = this.finishNode(clause, "CatchClause")
+ }
+ node.finalizer = this.eat(tt._finally) ? this.parseBlock() : null
+ if (!node.handler && !node.finalizer) return node.block
+ return this.finishNode(node, "TryStatement")
+
+ case tt._var:
+ case tt._const:
+ return this.parseVar(false, kind || this.tok.value)
+
+ case tt._while:
+ this.next()
+ node.test = this.parseParenExpression()
+ node.body = this.parseStatement()
+ return this.finishNode(node, "WhileStatement")
+
+ case tt._with:
+ this.next()
+ node.object = this.parseParenExpression()
+ node.body = this.parseStatement()
+ return this.finishNode(node, "WithStatement")
+
+ case tt.braceL:
+ return this.parseBlock()
+
+ case tt.semi:
+ this.next()
+ return this.finishNode(node, "EmptyStatement")
+
+ case tt._class:
+ return this.parseClass(true)
+
+ case tt._import:
+ return this.parseImport()
+
+ case tt._export:
+ return this.parseExport()
+
+ default:
+ let expr = this.parseExpression()
+ if (isDummy(expr)) {
+ this.next()
+ if (this.tok.type === tt.eof) return this.finishNode(node, "EmptyStatement")
+ return this.parseStatement()
+ } else if (starttype === tt.name && expr.type === "Identifier" && this.eat(tt.colon)) {
+ node.body = this.parseStatement()
+ node.label = expr
+ return this.finishNode(node, "LabeledStatement")
+ } else {
+ node.expression = expr
+ this.semicolon()
+ return this.finishNode(node, "ExpressionStatement")
+ }
+ }
+}
+
+lp.parseBlock = function() {
+ let node = this.startNode()
+ this.pushCx()
+ this.expect(tt.braceL)
+ let blockIndent = this.curIndent, line = this.curLineStart
+ node.body = []
+ while (!this.closes(tt.braceR, blockIndent, line, true))
+ node.body.push(this.parseStatement())
+ this.popCx()
+ this.eat(tt.braceR)
+ return this.finishNode(node, "BlockStatement")
+}
+
+lp.parseFor = function(node, init) {
+ node.init = init
+ node.test = node.update = null
+ if (this.eat(tt.semi) && this.tok.type !== tt.semi) node.test = this.parseExpression()
+ if (this.eat(tt.semi) && this.tok.type !== tt.parenR) node.update = this.parseExpression()
+ this.popCx()
+ this.expect(tt.parenR)
+ node.body = this.parseStatement()
+ return this.finishNode(node, "ForStatement")
+}
+
+lp.parseForIn = function(node, init) {
+ let type = this.tok.type === tt._in ? "ForInStatement" : "ForOfStatement"
+ this.next()
+ node.left = init
+ node.right = this.parseExpression()
+ this.popCx()
+ this.expect(tt.parenR)
+ node.body = this.parseStatement()
+ return this.finishNode(node, type)
+}
+
+lp.parseVar = function(noIn, kind) {
+ let node = this.startNode()
+ node.kind = kind
+ this.next()
+ node.declarations = []
+ do {
+ let decl = this.startNode()
+ decl.id = this.options.ecmaVersion >= 6 ? this.toAssignable(this.parseExprAtom(), true) : this.parseIdent()
+ decl.init = this.eat(tt.eq) ? this.parseMaybeAssign(noIn) : null
+ node.declarations.push(this.finishNode(decl, "VariableDeclarator"))
+ } while (this.eat(tt.comma))
+ if (!node.declarations.length) {
+ let decl = this.startNode()
+ decl.id = this.dummyIdent()
+ node.declarations.push(this.finishNode(decl, "VariableDeclarator"))
+ }
+ if (!noIn) this.semicolon()
+ return this.finishNode(node, "VariableDeclaration")
+}
+
+lp.parseClass = function(isStatement) {
+ let node = this.startNode()
+ this.next()
+ if (this.tok.type === tt.name) node.id = this.parseIdent()
+ else if (isStatement) node.id = this.dummyIdent()
+ else node.id = null
+ node.superClass = this.eat(tt._extends) ? this.parseExpression() : null
+ node.body = this.startNode()
+ node.body.body = []
+ this.pushCx()
+ let indent = this.curIndent + 1, line = this.curLineStart
+ this.eat(tt.braceL)
+ if (this.curIndent + 1 < indent) { indent = this.curIndent; line = this.curLineStart }
+ while (!this.closes(tt.braceR, indent, line)) {
+ if (this.semicolon()) continue
+ let method = this.startNode(), isGenerator
+ if (this.options.ecmaVersion >= 6) {
+ method.static = false
+ isGenerator = this.eat(tt.star)
+ }
+ this.parsePropertyName(method)
+ if (isDummy(method.key)) { if (isDummy(this.parseMaybeAssign())) this.next(); this.eat(tt.comma); continue }
+ if (method.key.type === "Identifier" && !method.computed && method.key.name === "static" &&
+ (this.tok.type != tt.parenL && this.tok.type != tt.braceL)) {
+ method.static = true
+ isGenerator = this.eat(tt.star)
+ this.parsePropertyName(method)
+ } else {
+ method.static = false
+ }
+ if (this.options.ecmaVersion >= 5 && method.key.type === "Identifier" &&
+ !method.computed && (method.key.name === "get" || method.key.name === "set") &&
+ this.tok.type !== tt.parenL && this.tok.type !== tt.braceL) {
+ method.kind = method.key.name
+ this.parsePropertyName(method)
+ method.value = this.parseMethod(false)
+ } else {
+ if (!method.computed && !method.static && !isGenerator && (
+ method.key.type === "Identifier" && method.key.name === "constructor" ||
+ method.key.type === "Literal" && method.key.value === "constructor")) {
+ method.kind = "constructor"
+ } else {
+ method.kind = "method"
+ }
+ method.value = this.parseMethod(isGenerator)
+ }
+ node.body.body.push(this.finishNode(method, "MethodDefinition"))
+ }
+ this.popCx()
+ if (!this.eat(tt.braceR)) {
+ // If there is no closing brace, make the node span to the start
+ // of the next token (this is useful for Tern)
+ this.last.end = this.tok.start
+ if (this.options.locations) this.last.loc.end = this.tok.loc.start
+ }
+ this.semicolon()
+ this.finishNode(node.body, "ClassBody")
+ return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression")
+}
+
+lp.parseFunction = function(node, isStatement) {
+ this.initFunction(node)
+ if (this.options.ecmaVersion >= 6) {
+ node.generator = this.eat(tt.star)
+ }
+ if (this.tok.type === tt.name) node.id = this.parseIdent()
+ else if (isStatement) node.id = this.dummyIdent()
+ node.params = this.parseFunctionParams()
+ node.body = this.parseBlock()
+ return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression")
+}
+
+lp.parseExport = function() {
+ let node = this.startNode()
+ this.next()
+ if (this.eat(tt.star)) {
+ node.source = this.eatContextual("from") ? this.parseExprAtom() : this.dummyString()
+ return this.finishNode(node, "ExportAllDeclaration")
+ }
+ if (this.eat(tt._default)) {
+ let expr = this.parseMaybeAssign()
+ if (expr.id) {
+ switch (expr.type) {
+ case "FunctionExpression": expr.type = "FunctionDeclaration"; break
+ case "ClassExpression": expr.type = "ClassDeclaration"; break
+ }
+ }
+ node.declaration = expr
+ this.semicolon()
+ return this.finishNode(node, "ExportDefaultDeclaration")
+ }
+ if (this.tok.type.keyword || this.toks.isLet()) {
+ node.declaration = this.parseStatement()
+ node.specifiers = []
+ node.source = null
+ } else {
+ node.declaration = null
+ node.specifiers = this.parseExportSpecifierList()
+ node.source = this.eatContextual("from") ? this.parseExprAtom() : null
+ this.semicolon()
+ }
+ return this.finishNode(node, "ExportNamedDeclaration")
+}
+
+lp.parseImport = function() {
+ let node = this.startNode()
+ this.next()
+ if (this.tok.type === tt.string) {
+ node.specifiers = []
+ node.source = this.parseExprAtom()
+ node.kind = ''
+ } else {
+ let elt
+ if (this.tok.type === tt.name && this.tok.value !== "from") {
+ elt = this.startNode()
+ elt.local = this.parseIdent()
+ this.finishNode(elt, "ImportDefaultSpecifier")
+ this.eat(tt.comma)
+ }
+ node.specifiers = this.parseImportSpecifierList()
+ node.source = this.eatContextual("from") && this.tok.type == tt.string ? this.parseExprAtom() : this.dummyString()
+ if (elt) node.specifiers.unshift(elt)
+ }
+ this.semicolon()
+ return this.finishNode(node, "ImportDeclaration")
+}
+
+lp.parseImportSpecifierList = function() {
+ let elts = []
+ if (this.tok.type === tt.star) {
+ let elt = this.startNode()
+ this.next()
+ elt.local = this.eatContextual("as") ? this.parseIdent() : this.dummyIdent()
+ elts.push(this.finishNode(elt, "ImportNamespaceSpecifier"))
+ } else {
+ let indent = this.curIndent, line = this.curLineStart, continuedLine = this.nextLineStart
+ this.pushCx()
+ this.eat(tt.braceL)
+ if (this.curLineStart > continuedLine) continuedLine = this.curLineStart
+ while (!this.closes(tt.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) {
+ let elt = this.startNode()
+ if (this.eat(tt.star)) {
+ elt.local = this.eatContextual("as") ? this.parseIdent() : this.dummyIdent()
+ this.finishNode(elt, "ImportNamespaceSpecifier")
+ } else {
+ if (this.isContextual("from")) break
+ elt.imported = this.parseIdent()
+ if (isDummy(elt.imported)) break
+ elt.local = this.eatContextual("as") ? this.parseIdent() : elt.imported
+ this.finishNode(elt, "ImportSpecifier")
+ }
+ elts.push(elt)
+ this.eat(tt.comma)
+ }
+ this.eat(tt.braceR)
+ this.popCx()
+ }
+ return elts
+}
+
+lp.parseExportSpecifierList = function() {
+ let elts = []
+ let indent = this.curIndent, line = this.curLineStart, continuedLine = this.nextLineStart
+ this.pushCx()
+ this.eat(tt.braceL)
+ if (this.curLineStart > continuedLine) continuedLine = this.curLineStart
+ while (!this.closes(tt.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) {
+ if (this.isContextual("from")) break
+ let elt = this.startNode()
+ elt.local = this.parseIdent()
+ if (isDummy(elt.local)) break
+ elt.exported = this.eatContextual("as") ? this.parseIdent() : elt.local
+ this.finishNode(elt, "ExportSpecifier")
+ elts.push(elt)
+ this.eat(tt.comma)
+ }
+ this.eat(tt.braceR)
+ this.popCx()
+ return elts
+}
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/tokenize.js b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/tokenize.js
new file mode 100644
index 0000000000..ce5a49a3f4
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/tokenize.js
@@ -0,0 +1,108 @@
+import {tokTypes as tt, Token, isNewLine, SourceLocation, getLineInfo, lineBreakG} from "acorn"
+import {LooseParser} from "./state"
+
+const lp = LooseParser.prototype
+
+function isSpace(ch) {
+ return (ch < 14 && ch > 8) || ch === 32 || ch === 160 || isNewLine(ch)
+}
+
+lp.next = function() {
+ this.last = this.tok
+ if (this.ahead.length)
+ this.tok = this.ahead.shift()
+ else
+ this.tok = this.readToken()
+
+ if (this.tok.start >= this.nextLineStart) {
+ while (this.tok.start >= this.nextLineStart) {
+ this.curLineStart = this.nextLineStart
+ this.nextLineStart = this.lineEnd(this.curLineStart) + 1
+ }
+ this.curIndent = this.indentationAfter(this.curLineStart)
+ }
+}
+
+lp.readToken = function() {
+ for (;;) {
+ try {
+ this.toks.next()
+ if (this.toks.type === tt.dot &&
+ this.input.substr(this.toks.end, 1) === "." &&
+ this.options.ecmaVersion >= 6) {
+ this.toks.end++
+ this.toks.type = tt.ellipsis
+ }
+ return new Token(this.toks)
+ } catch(e) {
+ if (!(e instanceof SyntaxError)) throw e
+
+ // Try to skip some text, based on the error message, and then continue
+ let msg = e.message, pos = e.raisedAt, replace = true
+ if (/unterminated/i.test(msg)) {
+ pos = this.lineEnd(e.pos + 1)
+ if (/string/.test(msg)) {
+ replace = {start: e.pos, end: pos, type: tt.string, value: this.input.slice(e.pos + 1, pos)}
+ } else if (/regular expr/i.test(msg)) {
+ let re = this.input.slice(e.pos, pos)
+ try { re = new RegExp(re) } catch(e) {}
+ replace = {start: e.pos, end: pos, type: tt.regexp, value: re}
+ } else if (/template/.test(msg)) {
+ replace = {start: e.pos, end: pos,
+ type: tt.template,
+ value: this.input.slice(e.pos, pos)}
+ } else {
+ replace = false
+ }
+ } else if (/invalid (unicode|regexp|number)|expecting unicode|octal literal|is reserved|directly after number|expected number in radix/i.test(msg)) {
+ while (pos < this.input.length && !isSpace(this.input.charCodeAt(pos))) ++pos
+ } else if (/character escape|expected hexadecimal/i.test(msg)) {
+ while (pos < this.input.length) {
+ let ch = this.input.charCodeAt(pos++)
+ if (ch === 34 || ch === 39 || isNewLine(ch)) break
+ }
+ } else if (/unexpected character/i.test(msg)) {
+ pos++
+ replace = false
+ } else if (/regular expression/i.test(msg)) {
+ replace = true
+ } else {
+ throw e
+ }
+ this.resetTo(pos)
+ if (replace === true) replace = {start: pos, end: pos, type: tt.name, value: "✖"}
+ if (replace) {
+ if (this.options.locations)
+ replace.loc = new SourceLocation(
+ this.toks,
+ getLineInfo(this.input, replace.start),
+ getLineInfo(this.input, replace.end))
+ return replace
+ }
+ }
+ }
+}
+
+lp.resetTo = function(pos) {
+ this.toks.pos = pos
+ let ch = this.input.charAt(pos - 1)
+ this.toks.exprAllowed = !ch || /[\[\{\(,;:?\/*=+\-~!|&%^<>]/.test(ch) ||
+ /[enwfd]/.test(ch) &&
+ /\b(keywords|case|else|return|throw|new|in|(instance|type)of|delete|void)$/.test(this.input.slice(pos - 10, pos))
+
+ if (this.options.locations) {
+ this.toks.curLine = 1
+ this.toks.lineStart = lineBreakG.lastIndex = 0
+ let match
+ while ((match = lineBreakG.exec(this.input)) && match.index < pos) {
+ ++this.toks.curLine
+ this.toks.lineStart = match.index + match[0].length
+ }
+ }
+}
+
+lp.lookAhead = function(n) {
+ while (n > this.ahead.length)
+ this.ahead.push(this.readToken())
+ return this.ahead[n - 1]
+}
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/lval.js b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/lval.js
new file mode 100644
index 0000000000..a6bc3b7ad2
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/lval.js
@@ -0,0 +1,216 @@
+import {types as tt} from "./tokentype"
+import {Parser} from "./state"
+import {has} from "./util"
+
+const 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":
+ break
+
+ case "ObjectExpression":
+ node.type = "ObjectPattern"
+ for (let i = 0; i < node.properties.length; i++) {
+ let 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) {
+ let end = exprList.length
+ if (end) {
+ let last = exprList[end - 1]
+ if (last && last.type == "RestElement") {
+ --end
+ } else if (last && last.type == "SpreadElement") {
+ last.type = "RestElement"
+ let 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 && last.type === "RestElement" && last.argument.type !== "Identifier")
+ this.unexpected(last.argument.start)
+ }
+ for (let i = 0; i < end; i++) {
+ let elt = exprList[i]
+ if (elt) this.toAssignable(elt, isBinding)
+ }
+ return exprList
+}
+
+// Parses spread element.
+
+pp.parseSpread = function(refDestructuringErrors) {
+ let node = this.startNode()
+ this.next()
+ node.argument = this.parseMaybeAssign(false, refDestructuringErrors)
+ return this.finishNode(node, "SpreadElement")
+}
+
+pp.parseRest = function(allowNonIdent) {
+ let node = this.startNode()
+ this.next()
+
+ // RestElement inside of a function parameter must be an identifier
+ if (allowNonIdent) node.argument = this.type === tt.name ? this.parseIdent() : this.unexpected()
+ else 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:
+ let 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, allowNonIdent) {
+ let 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) {
+ let rest = this.parseRest(allowNonIdent)
+ this.parseBindingListItem(rest)
+ elts.push(rest)
+ if (this.type === tt.comma) this.raise(this.start, "Comma is not permitted after the rest element")
+ this.expect(close)
+ break
+ } else {
+ let 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(tt.eq)) return left
+ let 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.raiseRecoverable(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode")
+ if (checkClashes) {
+ if (has(checkClashes, expr.name))
+ this.raiseRecoverable(expr.start, "Argument name clash")
+ checkClashes[expr.name] = true
+ }
+ break
+
+ case "MemberExpression":
+ if (isBinding) this.raiseRecoverable(expr.start, (isBinding ? "Binding" : "Assigning to") + " member expression")
+ break
+
+ case "ObjectPattern":
+ for (let i = 0; i < expr.properties.length; i++)
+ this.checkLVal(expr.properties[i].value, isBinding, checkClashes)
+ break
+
+ case "ArrayPattern":
+ for (let i = 0; i < expr.elements.length; i++) {
+ let 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")
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/node.js b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/node.js
new file mode 100644
index 0000000000..76b5b09825
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/node.js
@@ -0,0 +1,50 @@
+import {Parser} from "./state"
+import {SourceLocation} from "./locutil"
+
+export class Node {
+ constructor(parser, pos, loc) {
+ this.type = ""
+ this.start = pos
+ this.end = 0
+ if (parser.options.locations)
+ this.loc = new 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.
+
+const pp = 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)
+}
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/options.js b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/options.js
new file mode 100644
index 0000000000..3a1b0df3ad
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/options.js
@@ -0,0 +1,121 @@
+import {has, isArray} from "./util"
+import {SourceLocation} from "./locutil"
+
+// A second optional argument can be given to further configure
+// the parser process. These options are recognized:
+
+export const 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. The default is 6.
+ ecmaVersion: 6,
+ // 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: {}
+}
+
+// Interpret and default an options object
+
+export function getOptions(opts) {
+ let options = {}
+ for (let opt in defaultOptions)
+ options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt]
+ if (options.allowReserved == null)
+ options.allowReserved = options.ecmaVersion < 5
+
+ if (isArray(options.onToken)) {
+ let tokens = options.onToken
+ options.onToken = (token) => 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) {
+ let 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)
+ }
+}
+
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/parseutil.js b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/parseutil.js
new file mode 100644
index 0000000000..04eda2244f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/parseutil.js
@@ -0,0 +1,109 @@
+import {types as tt} from "./tokentype"
+import {Parser} from "./state"
+import {lineBreak} from "./whitespace"
+
+const 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.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 === 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")
+}
+
+export class DestructuringErrors {
+ constructor() {
+ this.shorthandAssign = 0
+ this.trailingComma = 0
+ }
+}
+
+pp.checkPatternErrors = function(refDestructuringErrors, andThrow) {
+ let trailing = refDestructuringErrors && refDestructuringErrors.trailingComma
+ if (!andThrow) return !!trailing
+ if (trailing) this.raise(trailing, "Comma is not permitted after the rest element")
+}
+
+pp.checkExpressionErrors = function(refDestructuringErrors, andThrow) {
+ let pos = refDestructuringErrors && refDestructuringErrors.shorthandAssign
+ if (!andThrow) return !!pos
+ if (pos) this.raise(pos, "Shorthand property assignments are valid only in destructuring patterns")
+}
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/state.js b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/state.js
new file mode 100644
index 0000000000..bddad5f730
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/state.js
@@ -0,0 +1,104 @@
+import {reservedWords, keywords} from "./identifier"
+import {types as tt} from "./tokentype"
+import {lineBreak} from "./whitespace"
+import {getOptions} from "./options"
+
+// Registered plugins
+export const plugins = {}
+
+function keywordRegexp(words) {
+ return new RegExp("^(" + words.replace(/ /g, "|") + ")$")
+}
+
+export class Parser {
+ constructor(options, input, startPos) {
+ this.options = options = getOptions(options)
+ this.sourceFile = options.sourceFile
+ this.keywords = keywordRegexp(keywords[options.ecmaVersion >= 6 ? 6 : 5])
+ let reserved = options.allowReserved ? "" :
+ reservedWords[options.ecmaVersion] + (options.sourceType == "module" ? " await" : "")
+ this.reservedWords = keywordRegexp(reserved)
+ let reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict
+ this.reservedWordsStrict = keywordRegexp(reservedStrict)
+ this.reservedWordsStrictBind = keywordRegexp(reservedStrict + " " + 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(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 = 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
+ isKeyword(word) { return this.keywords.test(word) }
+ isReservedWord(word) { return this.reservedWords.test(word) }
+
+ extend(name, f) {
+ this[name] = f(this[name])
+ }
+
+ loadPlugins(pluginConfigs) {
+ for (let name in pluginConfigs) {
+ let plugin = plugins[name]
+ if (!plugin) throw new Error("Plugin '" + name + "' not found")
+ plugin(this, pluginConfigs[name])
+ }
+ }
+
+ parse() {
+ let node = this.options.program || this.startNode()
+ this.nextToken()
+ return this.parseTopLevel(node)
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/statement.js b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/statement.js
new file mode 100644
index 0000000000..ab5ece0307
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/statement.js
@@ -0,0 +1,654 @@
+import {types as tt} from "./tokentype"
+import {Parser} from "./state"
+import {lineBreak, skipWhiteSpace} from "./whitespace"
+import {isIdentifierStart, isIdentifierChar} from "./identifier"
+import {DestructuringErrors} from "./parseutil"
+
+const 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) {
+ let first = true
+ if (!node.body) node.body = []
+ while (this.type !== tt.eof) {
+ let 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")
+}
+
+const loopLabel = {kind: "loop"}, switchLabel = {kind: "switch"}
+
+pp.isLet = function() {
+ if (this.type !== tt.name || this.options.ecmaVersion < 6 || this.value != "let") return false
+ skipWhiteSpace.lastIndex = this.pos
+ let skip = skipWhiteSpace.exec(this.input)
+ let next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next)
+ if (nextCh === 91 || nextCh == 123) return true // '{' and '['
+ if (isIdentifierStart(nextCh, true)) {
+ for (var pos = next + 1; isIdentifierChar(this.input.charCodeAt(pos), true); ++pos) {}
+ let ident = this.input.slice(next, pos)
+ if (!this.isKeyword(ident)) return true
+ }
+ return false
+}
+
+// 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) {
+ let starttype = this.type, node = this.startNode(), kind
+
+ if (this.isLet()) {
+ starttype = tt._var
+ kind = "let"
+ }
+
+ // 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._const: case tt._var:
+ kind = kind || this.value
+ if (!declaration && kind != "var") this.unexpected()
+ return this.parseVarStatement(node, kind)
+ 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:
+ let 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) {
+ let 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) {
+ let 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)
+ let isLet = this.isLet()
+ if (this.type === tt._var || this.type === tt._const || isLet) {
+ let init = this.startNode(), kind = isLet ? "let" : this.value
+ this.next()
+ this.parseVar(init, true, kind)
+ this.finishNode(init, "VariableDeclaration")
+ if ((this.type === tt._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) && init.declarations.length === 1 &&
+ !(kind !== "var" && init.declarations[0].init))
+ return this.parseForIn(node, init)
+ return this.parseFor(node, init)
+ }
+ let refDestructuringErrors = new DestructuringErrors
+ let init = this.parseExpression(true, refDestructuringErrors)
+ if (this.type === tt._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(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 = false; this.type != tt.braceR;) {
+ if (this.type === tt._case || this.type === tt._default) {
+ let 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.raiseRecoverable(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.
+
+const empty = []
+
+pp.parseTryStatement = function(node) {
+ this.next()
+ node.block = this.parseBlock()
+ node.handler = null
+ if (this.type === tt._catch) {
+ let clause = this.startNode()
+ this.next()
+ this.expect(tt.parenL)
+ clause.param = this.parseBindingAtom()
+ this.checkLVal(clause.param, true)
+ this.expect(tt.parenR)
+ clause.body = this.parseBlock()
+ node.handler = this.finishNode(clause, "CatchClause")
+ }
+ 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 (let i = 0; i < this.labels.length; ++i)
+ if (this.labels[i].name === maybeName) this.raise(expr.start, "Label '" + maybeName + "' is already declared")
+ let kind = this.type.isLoop ? "loop" : this.type === tt._switch ? "switch" : null
+ for (let i = this.labels.length - 1; i >= 0; i--) {
+ let 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) {
+ let node = this.startNode(), first = true, oldStrict
+ node.body = []
+ this.expect(tt.braceL)
+ while (!this.eat(tt.braceR)) {
+ let 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) {
+ let 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
+ for (;;) {
+ let decl = this.startNode()
+ this.parseVarId(decl)
+ if (this.eat(tt.eq)) {
+ decl.init = this.parseMaybeAssign(isFor)
+ } else if (kind === "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)
+ var oldInGen = this.inGenerator
+ this.inGenerator = node.generator
+ if (isStatement || this.type === tt.name)
+ node.id = this.parseIdent()
+ this.parseFunctionParams(node)
+ this.parseFunctionBody(node, allowExpressionBody)
+ this.inGenerator = oldInGen
+ return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression")
+}
+
+pp.parseFunctionParams = function(node) {
+ this.expect(tt.parenL)
+ node.params = this.parseBindingList(tt.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)
+ let classBody = this.startNode()
+ let hadConstructor = false
+ classBody.body = []
+ this.expect(tt.braceL)
+ while (!this.eat(tt.braceR)) {
+ if (this.eat(tt.semi)) continue
+ let method = this.startNode()
+ let isGenerator = this.eat(tt.star)
+ let 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"
+ let isGetSet = false
+ if (!method.computed) {
+ let {key} = method
+ 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)
+ if (isGetSet) {
+ let paramCount = method.kind === "get" ? 0 : 1
+ if (method.value.params.length !== paramCount) {
+ let start = method.value.start
+ if (method.kind === "get")
+ this.raiseRecoverable(start, "getter should have no params")
+ else
+ this.raiseRecoverable(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 === 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 ...
+ let parens = this.type == tt.parenL
+ let expr = this.parseMaybeAssign()
+ let needsSemi = true
+ if (!parens && (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 {
+ // check for keywords used as local names
+ for (let 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 || this.isLet()
+}
+
+// Parses a comma-separated list of module exports.
+
+pp.parseExportSpecifiers = function() {
+ let 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
+
+ let 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()
+ } 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() {
+ let nodes = [], first = true
+ if (this.type === tt.name) {
+ // import defaultObj, { x, y as z } from '...'
+ let 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) {
+ let 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
+
+ let 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
+}
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/tokencontext.js b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/tokencontext.js
new file mode 100644
index 0000000000..911a51563d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/tokencontext.js
@@ -0,0 +1,110 @@
+// 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
+
+import {Parser} from "./state"
+import {types as tt} from "./tokentype"
+import {lineBreak} from "./whitespace"
+
+export class TokContext {
+ constructor(token, isExpr, preserveSpace, override) {
+ this.token = token
+ this.isExpr = !!isExpr
+ this.preserveSpace = !!preserveSpace
+ this.override = override
+ }
+}
+
+export const 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, p => p.readTmplToken()),
+ f_expr: new TokContext("function", true)
+}
+
+const pp = Parser.prototype
+
+pp.initialContext = function() {
+ return [types.b_stat]
+}
+
+pp.braceIsBlock = function(prevType) {
+ if (prevType === tt.colon) {
+ let parent = this.curContext()
+ if (parent === types.b_stat || parent === types.b_expr)
+ 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 || prevType === tt.parenR)
+ return true
+ if (prevType == tt.braceL)
+ return this.curContext() === types.b_stat
+ return !this.exprAllowed
+}
+
+pp.updateContext = function(prevType) {
+ let update, 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
+ }
+ let 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) {
+ let 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() {
+ // tokExprAllowed stays unchanged
+}
+
+tt._function.updateContext = function(prevType) {
+ if (prevType.beforeExpr && prevType !== tt.semi && prevType !== tt._else &&
+ !((prevType === tt.colon || prevType === tt.braceL) && 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
+}
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/tokenize.js b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/tokenize.js
new file mode 100644
index 0000000000..ed97d19fb6
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/tokenize.js
@@ -0,0 +1,696 @@
+import {isIdentifierStart, isIdentifierChar} from "./identifier"
+import {types as tt, keywords as keywordTypes} from "./tokentype"
+import {Parser} from "./state"
+import {SourceLocation} from "./locutil"
+import {lineBreak, lineBreakG, isNewLine, nonASCIIwhitespace} from "./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.
+
+export class Token {
+ constructor(p) {
+ 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
+
+const pp = Parser.prototype
+
+// Are we running under Rhino?
+const 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 () {
+ let self = this
+ return {next: function () {
+ let 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() {
+ let 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() {
+ let code = this.input.charCodeAt(this.pos)
+ if (code <= 0xd7ff || code >= 0xe000) return code
+ let next = this.input.charCodeAt(this.pos + 1)
+ return (code << 10) + next - 0x35fdc00
+}
+
+pp.skipBlockComment = function() {
+ let startLoc = this.options.onComment && this.curPosition()
+ let 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
+ let match
+ 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.curPosition())
+}
+
+pp.skipLineComment = function(startSkip) {
+ let start = this.pos
+ let startLoc = this.options.onComment && this.curPosition()
+ let 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) {
+ let 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 && 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()
+ let 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() {
+ let next = this.input.charCodeAt(this.pos + 1)
+ if (next >= 48 && next <= 57) return this.readNumber(true)
+ let 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() { // '/'
+ let 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_exp = function(code) { // '%*'
+ let next = this.input.charCodeAt(this.pos + 1)
+ let size = 1
+ let tokentype = code === 42 ? tt.star : tt.modulo
+
+ // exponentiation operator ** and **=
+ if (this.options.ecmaVersion >= 7 && next === 42) {
+ ++size
+ tokentype = tt.starstar
+ next = this.input.charCodeAt(this.pos + 2)
+ }
+
+ if (next === 61) return this.finishOp(tt.assign, size + 1)
+ return this.finishOp(tokentype, size)
+}
+
+pp.readToken_pipe_amp = function(code) { // '|&'
+ let 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() { // '^'
+ let 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) { // '+-'
+ let 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) { // '<>'
+ 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()
+ // `<!--`, an XML-style comment that should be interpreted as a line comment
+ this.skipLineComment(4)
+ this.skipSpace()
+ return this.nextToken()
+ }
+ if (next === 61) size = 2
+ return this.finishOp(tt.relational, size)
+}
+
+pp.readToken_eq_excl = function(code) { // '=!'
+ let next = this.input.charCodeAt(this.pos + 1)
+ if (next === 61) return this.finishOp(tt.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2)
+ if (code === 61 && next === 62 && this.options.ecmaVersion >= 6) { // '=>'
+ this.pos += 2
+ return this.finishToken(tt.arrow)
+ }
+ return this.finishOp(code === 61 ? tt.eq : tt.prefix, 1)
+}
+
+pp.getTokenFromCode = function(code) {
+ switch (code) {
+ // The interpretation of a dot depends on whether it is followed
+ // by a digit or another two dots.
+ case 46: // '.'
+ return this.readToken_dot()
+
+ // Punctuation tokens.
+ case 40: ++this.pos; return this.finishToken(tt.parenL)
+ case 41: ++this.pos; return this.finishToken(tt.parenR)
+ case 59: ++this.pos; return this.finishToken(tt.semi)
+ case 44: ++this.pos; return this.finishToken(tt.comma)
+ case 91: ++this.pos; return this.finishToken(tt.bracketL)
+ case 93: ++this.pos; return this.finishToken(tt.bracketR)
+ case 123: ++this.pos; return this.finishToken(tt.braceL)
+ case 125: ++this.pos; return this.finishToken(tt.braceR)
+ case 58: ++this.pos; return this.finishToken(tt.colon)
+ case 63: ++this.pos; return this.finishToken(tt.question)
+
+ case 96: // '`'
+ if (this.options.ecmaVersion < 6) break
+ ++this.pos
+ return this.finishToken(tt.backQuote)
+
+ case 48: // '0'
+ let next = this.input.charCodeAt(this.pos + 1)
+ if (next === 120 || next === 88) return this.readRadixNumber(16) // '0x', '0X' - hex number
+ if (this.options.ecmaVersion >= 6) {
+ if (next === 111 || next === 79) return this.readRadixNumber(8) // '0o', '0O' - octal number
+ if (next === 98 || next === 66) return this.readRadixNumber(2) // '0b', '0B' - binary number
+ }
+ // Anything else beginning with a digit is an integer, octal
+ // number, or float.
+ case 49: case 50: case 51: case 52: case 53: case 54: case 55: case 56: case 57: // 1-9
+ return this.readNumber(false)
+
+ // Quotes produce strings.
+ case 34: case 39: // '"', "'"
+ return this.readString(code)
+
+ // Operators are parsed inline in tiny state machines. '=' (61) is
+ // often referred to. `finishOp` simply skips the amount of
+ // characters it is given as second argument, and returns a token
+ // of the type given by its first argument.
+
+ case 47: // '/'
+ return this.readToken_slash()
+
+ case 37: case 42: // '%*'
+ return this.readToken_mult_modulo_exp(code)
+
+ case 124: case 38: // '|&'
+ return this.readToken_pipe_amp(code)
+
+ case 94: // '^'
+ return this.readToken_caret()
+
+ case 43: case 45: // '+-'
+ return this.readToken_plus_min(code)
+
+ case 60: case 62: // '<>'
+ return this.readToken_lt_gt(code)
+
+ case 61: case 33: // '=!'
+ return this.readToken_eq_excl(code)
+
+ case 126: // '~'
+ return this.finishOp(tt.prefix, 1)
+ }
+
+ this.raise(this.pos, "Unexpected character '" + codePointToString(code) + "'")
+}
+
+pp.finishOp = function(type, size) {
+ let str = this.input.slice(this.pos, this.pos + size)
+ this.pos += size
+ return this.finishToken(type, str)
+}
+
+// Parse a regular expression. Some context-awareness is necessary,
+// since a '/' inside a '[]' set does not end the expression.
+
+function tryCreateRegexp(src, flags, throwErrorAt, parser) {
+ try {
+ return new RegExp(src, flags)
+ } catch (e) {
+ if (throwErrorAt !== undefined) {
+ if (e instanceof SyntaxError) parser.raise(throwErrorAt, "Error parsing regular expression: " + e.message)
+ throw e
+ }
+ }
+}
+
+var regexpUnicodeSupport = !!tryCreateRegexp("\uffff", "u")
+
+pp.readRegexp = function() {
+ let escaped, inClass, start = this.pos
+ for (;;) {
+ if (this.pos >= this.input.length) this.raise(start, "Unterminated regular expression")
+ let ch = this.input.charAt(this.pos)
+ if (lineBreak.test(ch)) this.raise(start, "Unterminated regular expression")
+ if (!escaped) {
+ if (ch === "[") inClass = true
+ else if (ch === "]" && inClass) inClass = false
+ else if (ch === "/" && !inClass) break
+ escaped = ch === "\\"
+ } else escaped = false
+ ++this.pos
+ }
+ let content = this.input.slice(start, this.pos)
+ ++this.pos
+ // Need to use `readWord1` because '\uXXXX' sequences are allowed
+ // here (don't ask).
+ let mods = this.readWord1()
+ let tmp = content, tmpFlags = ""
+ if (mods) {
+ let validFlags = /^[gim]*$/
+ if (this.options.ecmaVersion >= 6) validFlags = /^[gimuy]*$/
+ if (!validFlags.test(mods)) this.raise(start, "Invalid regular expression flag")
+ if (mods.indexOf("u") >= 0) {
+ if (regexpUnicodeSupport) {
+ tmpFlags = "u"
+ } else {
+ // Replace each astral symbol and every Unicode escape sequence that
+ // possibly represents an astral symbol or a paired surrogate with a
+ // single ASCII symbol to avoid throwing on regular expressions that
+ // are only valid in combination with the `/u` flag.
+ // Note: replacing with the ASCII symbol `x` might cause false
+ // negatives in unlikely scenarios. For example, `[\u{61}-b]` is a
+ // perfectly valid pattern that is equivalent to `[a-b]`, but it would
+ // be replaced by `[x-b]` which throws an error.
+ tmp = tmp.replace(/\\u\{([0-9a-fA-F]+)\}/g, (_match, code, offset) => {
+ code = Number("0x" + code)
+ if (code > 0x10FFFF) this.raise(start + offset + 3, "Code point out of bounds")
+ return "x"
+ })
+ tmp = tmp.replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "x")
+ tmpFlags = tmpFlags.replace("u", "")
+ }
+ }
+ }
+ // Detect invalid regular expressions.
+ let value = null
+ // Rhino's regular expression parser is flaky and throws uncatchable exceptions,
+ // so don't do detection if we are running under Rhino
+ if (!isRhino) {
+ tryCreateRegexp(tmp, tmpFlags, start, this)
+ // Get a regular expression object for this pattern-flag pair, or `null` in
+ // case the current environment doesn't support the flags it uses.
+ value = tryCreateRegexp(content, mods)
+ }
+ return this.finishToken(tt.regexp, {pattern: content, flags: mods, value: value})
+}
+
+// Read an integer in the given radix. Return null if zero digits
+// were read, the integer value otherwise. When `len` is given, this
+// will return `null` unless the integer has exactly `len` digits.
+
+pp.readInt = function(radix, len) {
+ let start = this.pos, total = 0
+ for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {
+ let code = this.input.charCodeAt(this.pos), val
+ if (code >= 97) val = code - 97 + 10 // a
+ else if (code >= 65) val = code - 65 + 10 // A
+ else if (code >= 48 && code <= 57) val = code - 48 // 0-9
+ else val = Infinity
+ if (val >= radix) break
+ ++this.pos
+ total = total * radix + val
+ }
+ if (this.pos === start || len != null && this.pos - start !== len) return null
+
+ return total
+}
+
+pp.readRadixNumber = function(radix) {
+ this.pos += 2 // 0x
+ let val = this.readInt(radix)
+ if (val == null) this.raise(this.start + 2, "Expected number in radix " + radix)
+ if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number")
+ return this.finishToken(tt.num, val)
+}
+
+// Read an integer, octal integer, or floating-point number.
+
+pp.readNumber = function(startsWithDot) {
+ let start = this.pos, isFloat = false, octal = this.input.charCodeAt(this.pos) === 48
+ if (!startsWithDot && this.readInt(10) === null) this.raise(start, "Invalid number")
+ let next = this.input.charCodeAt(this.pos)
+ if (next === 46) { // '.'
+ ++this.pos
+ this.readInt(10)
+ isFloat = true
+ next = this.input.charCodeAt(this.pos)
+ }
+ if (next === 69 || next === 101) { // 'eE'
+ next = this.input.charCodeAt(++this.pos)
+ if (next === 43 || next === 45) ++this.pos // '+-'
+ if (this.readInt(10) === null) this.raise(start, "Invalid number")
+ isFloat = true
+ }
+ if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number")
+
+ let str = this.input.slice(start, this.pos), val
+ if (isFloat) val = parseFloat(str)
+ else if (!octal || str.length === 1) val = parseInt(str, 10)
+ else if (/[89]/.test(str) || this.strict) this.raise(start, "Invalid number")
+ else val = parseInt(str, 8)
+ return this.finishToken(tt.num, val)
+}
+
+// Read a string value, interpreting backslash-escapes.
+
+pp.readCodePoint = function() {
+ let ch = this.input.charCodeAt(this.pos), code
+
+ if (ch === 123) {
+ if (this.options.ecmaVersion < 6) this.unexpected()
+ let codePos = ++this.pos
+ code = this.readHexChar(this.input.indexOf('}', this.pos) - this.pos)
+ ++this.pos
+ if (code > 0x10FFFF) this.raise(codePos, "Code point out of bounds")
+ } else {
+ code = this.readHexChar(4)
+ }
+ return code
+}
+
+function codePointToString(code) {
+ // UTF-16 Decoding
+ if (code <= 0xFFFF) return String.fromCharCode(code)
+ code -= 0x10000
+ return String.fromCharCode((code >> 10) + 0xD800, (code & 1023) + 0xDC00)
+}
+
+pp.readString = function(quote) {
+ let out = "", chunkStart = ++this.pos
+ for (;;) {
+ if (this.pos >= this.input.length) this.raise(this.start, "Unterminated string constant")
+ let ch = this.input.charCodeAt(this.pos)
+ if (ch === quote) break
+ if (ch === 92) { // '\'
+ out += this.input.slice(chunkStart, this.pos)
+ out += this.readEscapedChar(false)
+ chunkStart = this.pos
+ } else {
+ if (isNewLine(ch)) this.raise(this.start, "Unterminated string constant")
+ ++this.pos
+ }
+ }
+ out += this.input.slice(chunkStart, this.pos++)
+ return this.finishToken(tt.string, out)
+}
+
+// Reads template string tokens.
+
+pp.readTmplToken = function() {
+ let out = "", chunkStart = this.pos
+ for (;;) {
+ if (this.pos >= this.input.length) this.raise(this.start, "Unterminated template")
+ let ch = this.input.charCodeAt(this.pos)
+ if (ch === 96 || ch === 36 && this.input.charCodeAt(this.pos + 1) === 123) { // '`', '${'
+ if (this.pos === this.start && this.type === tt.template) {
+ if (ch === 36) {
+ this.pos += 2
+ return this.finishToken(tt.dollarBraceL)
+ } else {
+ ++this.pos
+ return this.finishToken(tt.backQuote)
+ }
+ }
+ out += this.input.slice(chunkStart, this.pos)
+ return this.finishToken(tt.template, out)
+ }
+ if (ch === 92) { // '\'
+ out += this.input.slice(chunkStart, this.pos)
+ out += this.readEscapedChar(true)
+ chunkStart = this.pos
+ } else if (isNewLine(ch)) {
+ out += this.input.slice(chunkStart, this.pos)
+ ++this.pos
+ switch (ch) {
+ case 13:
+ if (this.input.charCodeAt(this.pos) === 10) ++this.pos
+ case 10:
+ out += "\n"
+ break
+ default:
+ out += String.fromCharCode(ch)
+ break
+ }
+ if (this.options.locations) {
+ ++this.curLine
+ this.lineStart = this.pos
+ }
+ chunkStart = this.pos
+ } else {
+ ++this.pos
+ }
+ }
+}
+
+// Used to read escaped characters
+
+pp.readEscapedChar = function(inTemplate) {
+ let ch = this.input.charCodeAt(++this.pos)
+ ++this.pos
+ switch (ch) {
+ case 110: return "\n" // 'n' -> '\n'
+ case 114: return "\r" // 'r' -> '\r'
+ case 120: return String.fromCharCode(this.readHexChar(2)) // 'x'
+ case 117: return codePointToString(this.readCodePoint()) // 'u'
+ case 116: return "\t" // 't' -> '\t'
+ case 98: return "\b" // 'b' -> '\b'
+ case 118: return "\u000b" // 'v' -> '\u000b'
+ case 102: return "\f" // 'f' -> '\f'
+ case 13: if (this.input.charCodeAt(this.pos) === 10) ++this.pos // '\r\n'
+ case 10: // ' \n'
+ if (this.options.locations) { this.lineStart = this.pos; ++this.curLine }
+ return ""
+ default:
+ if (ch >= 48 && ch <= 55) {
+ let octalStr = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0]
+ let octal = parseInt(octalStr, 8)
+ if (octal > 255) {
+ octalStr = octalStr.slice(0, -1)
+ octal = parseInt(octalStr, 8)
+ }
+ if (octalStr !== "0" && (this.strict || inTemplate)) {
+ this.raise(this.pos - 2, "Octal literal in strict mode")
+ }
+ this.pos += octalStr.length - 1
+ return String.fromCharCode(octal)
+ }
+ return String.fromCharCode(ch)
+ }
+}
+
+// Used to read character escape sequences ('\x', '\u', '\U').
+
+pp.readHexChar = function(len) {
+ let codePos = this.pos
+ let n = this.readInt(16, len)
+ if (n === null) this.raise(codePos, "Bad character escape sequence")
+ return n
+}
+
+// Read an identifier, and return it as a string. Sets `this.containsEsc`
+// to whether the word contained a '\u' escape.
+//
+// Incrementally adds only escaped chars, adding other chunks as-is
+// as a micro-optimization.
+
+pp.readWord1 = function() {
+ this.containsEsc = false
+ let word = "", first = true, chunkStart = this.pos
+ let astral = this.options.ecmaVersion >= 6
+ while (this.pos < this.input.length) {
+ let ch = this.fullCharCodeAtPos()
+ if (isIdentifierChar(ch, astral)) {
+ this.pos += ch <= 0xffff ? 1 : 2
+ } else if (ch === 92) { // "\"
+ this.containsEsc = true
+ word += this.input.slice(chunkStart, this.pos)
+ let escStart = this.pos
+ if (this.input.charCodeAt(++this.pos) != 117) // "u"
+ this.raise(this.pos, "Expecting Unicode escape sequence \\uXXXX")
+ ++this.pos
+ let esc = this.readCodePoint()
+ if (!(first ? isIdentifierStart : isIdentifierChar)(esc, astral))
+ this.raise(escStart, "Invalid Unicode escape")
+ word += codePointToString(esc)
+ chunkStart = this.pos
+ } else {
+ break
+ }
+ first = false
+ }
+ return word + this.input.slice(chunkStart, this.pos)
+}
+
+// Read an identifier or keyword token. Will check for reserved
+// words when necessary.
+
+pp.readWord = function() {
+ let word = this.readWord1()
+ let type = tt.name
+ if ((this.options.ecmaVersion >= 6 || !this.containsEsc) && this.keywords.test(word))
+ type = keywordTypes[word]
+ return this.finishToken(type, word)
+}
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/tokentype.js b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/tokentype.js
new file mode 100644
index 0000000000..7c36e2d49d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/tokentype.js
@@ -0,0 +1,147 @@
+// ## Token types
+
+// The assignment of fine-grained, information-carrying type objects
+// allows the tokenizer to store the information it has about a
+// token in a way that is very cheap for the parser to look up.
+
+// All token type variables start with an underscore, to make them
+// easy to recognize.
+
+// The `beforeExpr` property is used to disambiguate between regular
+// expressions and divisions. It is set on all token types that can
+// be followed by an expression (thus, a slash after them would be a
+// regular expression).
+//
+// The `startsExpr` property is used to check if the token ends a
+// `yield` expression. It is set on all token types that either can
+// directly start an expression (like a quotation mark) or can
+// continue an expression (like the body of a string).
+//
+// `isLoop` marks a keyword as starting a loop, which is important
+// to know when parsing a label, in order to allow or disallow
+// continue jumps to that label.
+
+export class TokenType {
+ constructor(label, conf = {}) {
+ this.label = label
+ this.keyword = conf.keyword
+ this.beforeExpr = !!conf.beforeExpr
+ this.startsExpr = !!conf.startsExpr
+ this.isLoop = !!conf.isLoop
+ this.isAssign = !!conf.isAssign
+ this.prefix = !!conf.prefix
+ this.postfix = !!conf.postfix
+ this.binop = conf.binop || null
+ this.updateContext = null
+ }
+}
+
+function binop(name, prec) {
+ return new TokenType(name, {beforeExpr: true, binop: prec})
+}
+const beforeExpr = {beforeExpr: true}, startsExpr = {startsExpr: true}
+
+// Map keyword names to token types.
+
+export const keywords = {}
+
+// Succinct definitions of keyword token types
+function kw(name, options = {}) {
+ options.keyword = name
+ return keywords[name] = new TokenType(name, options)
+}
+
+export const types = {
+ num: new TokenType("num", startsExpr),
+ regexp: new TokenType("regexp", startsExpr),
+ string: new TokenType("string", startsExpr),
+ name: new TokenType("name", startsExpr),
+ eof: new TokenType("eof"),
+
+ // Punctuation token types.
+ bracketL: new TokenType("[", {beforeExpr: true, startsExpr: true}),
+ bracketR: new TokenType("]"),
+ braceL: new TokenType("{", {beforeExpr: true, startsExpr: true}),
+ braceR: new TokenType("}"),
+ parenL: new TokenType("(", {beforeExpr: true, startsExpr: true}),
+ parenR: new TokenType(")"),
+ comma: new TokenType(",", beforeExpr),
+ semi: new TokenType(";", beforeExpr),
+ colon: new TokenType(":", beforeExpr),
+ dot: new TokenType("."),
+ question: new TokenType("?", beforeExpr),
+ arrow: new TokenType("=>", beforeExpr),
+ template: new TokenType("template"),
+ ellipsis: new TokenType("...", beforeExpr),
+ backQuote: new TokenType("`", startsExpr),
+ dollarBraceL: new TokenType("${", {beforeExpr: true, startsExpr: true}),
+
+ // Operators. These carry several kinds of properties to help the
+ // parser use them properly (the presence of these properties is
+ // what categorizes them as operators).
+ //
+ // `binop`, when present, specifies that this operator is a binary
+ // operator, and will refer to its precedence.
+ //
+ // `prefix` and `postfix` mark the operator as a prefix or postfix
+ // unary operator.
+ //
+ // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as
+ // binary operators with a very low precedence, that should result
+ // in AssignmentExpression nodes.
+
+ eq: new TokenType("=", {beforeExpr: true, isAssign: true}),
+ assign: new TokenType("_=", {beforeExpr: true, isAssign: true}),
+ incDec: new TokenType("++/--", {prefix: true, postfix: true, startsExpr: true}),
+ prefix: new TokenType("prefix", {beforeExpr: true, prefix: true, startsExpr: true}),
+ logicalOR: binop("||", 1),
+ logicalAND: binop("&&", 2),
+ bitwiseOR: binop("|", 3),
+ bitwiseXOR: binop("^", 4),
+ bitwiseAND: binop("&", 5),
+ equality: binop("==/!=", 6),
+ relational: binop("</>", 7),
+ bitShift: binop("<</>>", 8),
+ plusMin: new TokenType("+/-", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}),
+ modulo: binop("%", 10),
+ star: binop("*", 10),
+ slash: binop("/", 10),
+ starstar: new TokenType("**", {beforeExpr: true}),
+
+ // Keyword token types.
+ _break: kw("break"),
+ _case: kw("case", beforeExpr),
+ _catch: kw("catch"),
+ _continue: kw("continue"),
+ _debugger: kw("debugger"),
+ _default: kw("default", beforeExpr),
+ _do: kw("do", {isLoop: true, beforeExpr: true}),
+ _else: kw("else", beforeExpr),
+ _finally: kw("finally"),
+ _for: kw("for", {isLoop: true}),
+ _function: kw("function", startsExpr),
+ _if: kw("if"),
+ _return: kw("return", beforeExpr),
+ _switch: kw("switch"),
+ _throw: kw("throw", beforeExpr),
+ _try: kw("try"),
+ _var: kw("var"),
+ _const: kw("const"),
+ _while: kw("while", {isLoop: true}),
+ _with: kw("with"),
+ _new: kw("new", {beforeExpr: true, startsExpr: true}),
+ _this: kw("this", startsExpr),
+ _super: kw("super", startsExpr),
+ _class: kw("class"),
+ _extends: kw("extends", beforeExpr),
+ _export: kw("export"),
+ _import: kw("import"),
+ _null: kw("null", startsExpr),
+ _true: kw("true", startsExpr),
+ _false: kw("false", startsExpr),
+ _in: kw("in", {beforeExpr: true, binop: 7}),
+ _instanceof: kw("instanceof", {beforeExpr: true, binop: 7}),
+ _typeof: kw("typeof", {beforeExpr: true, prefix: true, startsExpr: true}),
+ _void: kw("void", {beforeExpr: true, prefix: true, startsExpr: true}),
+ _delete: kw("delete", {beforeExpr: true, prefix: true, startsExpr: true})
+}
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/util.js b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/util.js
new file mode 100644
index 0000000000..3517f8d212
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/util.js
@@ -0,0 +1,9 @@
+export function isArray(obj) {
+ return Object.prototype.toString.call(obj) === "[object Array]"
+}
+
+// Checks if an object has a property.
+
+export function has(obj, propName) {
+ return Object.prototype.hasOwnProperty.call(obj, propName)
+}
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/walk/index.js b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/walk/index.js
new file mode 100644
index 0000000000..68604a88ab
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/walk/index.js
@@ -0,0 +1,342 @@
+// AST walker module for Mozilla Parser API compatible trees
+
+// A simple walk is one where you simply specify callbacks to be
+// called on specific nodes. The last two arguments are optional. A
+// simple use would be
+//
+// walk.simple(myTree, {
+// Expression: function(node) { ... }
+// });
+//
+// to do something with all expressions. All Parser API node types
+// can be used to identify node types, as well as Expression,
+// Statement, and ScopeBody, which denote categories of nodes.
+//
+// The base argument can be used to pass a custom (recursive)
+// walker, and state can be used to give this walked an initial
+// state.
+
+export function simple(node, visitors, base, state, override) {
+ if (!base) base = exports.base
+ ;(function c(node, st, override) {
+ let type = override || node.type, found = visitors[type]
+ base[type](node, st, c)
+ if (found) found(node, st)
+ })(node, state, override)
+}
+
+// An ancestor walk keeps an array of ancestor nodes (including the
+// current node) and passes them to the callback as third parameter
+// (and also as state parameter when no other state is present).
+export function ancestor(node, visitors, base, state) {
+ if (!base) base = exports.base
+ let ancestors = []
+ ;(function c(node, st, override) {
+ let type = override || node.type, found = visitors[type]
+ let isNew = node != ancestors[ancestors.length - 1]
+ if (isNew) ancestors.push(node)
+ base[type](node, st, c)
+ if (found) found(node, st || ancestors, ancestors)
+ if (isNew) ancestors.pop()
+ })(node, state)
+}
+
+// A recursive walk is one where your functions override the default
+// walkers. They can modify and replace the state parameter that's
+// threaded through the walk, and can opt how and whether to walk
+// their child nodes (by calling their third argument on these
+// nodes).
+export function recursive(node, state, funcs, base, override) {
+ let visitor = funcs ? exports.make(funcs, base) : base
+ ;(function c(node, st, override) {
+ visitor[override || node.type](node, st, c)
+ })(node, state, override)
+}
+
+function makeTest(test) {
+ if (typeof test == "string")
+ return type => type == test
+ else if (!test)
+ return () => true
+ else
+ return test
+}
+
+class Found {
+ constructor(node, state) { this.node = node; this.state = state }
+}
+
+// Find a node with a given start, end, and type (all are optional,
+// null can be used as wildcard). Returns a {node, state} object, or
+// undefined when it doesn't find a matching node.
+export function findNodeAt(node, start, end, test, base, state) {
+ test = makeTest(test)
+ if (!base) base = exports.base
+ try {
+ ;(function c(node, st, override) {
+ let type = override || node.type
+ if ((start == null || node.start <= start) &&
+ (end == null || node.end >= end))
+ base[type](node, st, c)
+ if ((start == null || node.start == start) &&
+ (end == null || node.end == end) &&
+ test(type, node))
+ throw new Found(node, st)
+ })(node, state)
+ } catch (e) {
+ if (e instanceof Found) return e
+ throw e
+ }
+}
+
+// Find the innermost node of a given type that contains the given
+// position. Interface similar to findNodeAt.
+export function findNodeAround(node, pos, test, base, state) {
+ test = makeTest(test)
+ if (!base) base = exports.base
+ try {
+ ;(function c(node, st, override) {
+ let type = override || node.type
+ if (node.start > pos || node.end < pos) return
+ base[type](node, st, c)
+ if (test(type, node)) throw new Found(node, st)
+ })(node, state)
+ } catch (e) {
+ if (e instanceof Found) return e
+ throw e
+ }
+}
+
+// Find the outermost matching node after a given position.
+export function findNodeAfter(node, pos, test, base, state) {
+ test = makeTest(test)
+ if (!base) base = exports.base
+ try {
+ ;(function c(node, st, override) {
+ if (node.end < pos) return
+ let type = override || node.type
+ if (node.start >= pos && test(type, node)) throw new Found(node, st)
+ base[type](node, st, c)
+ })(node, state)
+ } catch (e) {
+ if (e instanceof Found) return e
+ throw e
+ }
+}
+
+// Find the outermost matching node before a given position.
+export function findNodeBefore(node, pos, test, base, state) {
+ test = makeTest(test)
+ if (!base) base = exports.base
+ let max
+ ;(function c(node, st, override) {
+ if (node.start > pos) return
+ let type = override || node.type
+ if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node))
+ max = new Found(node, st)
+ base[type](node, st, c)
+ })(node, state)
+ return max
+}
+
+// Fallback to an Object.create polyfill for older environments.
+const create = Object.create || function(proto) {
+ function Ctor() {}
+ Ctor.prototype = proto
+ return new Ctor
+}
+
+// Used to create a custom walker. Will fill in all missing node
+// type properties with the defaults.
+export function make(funcs, base) {
+ if (!base) base = exports.base
+ let visitor = create(base)
+ for (var type in funcs) visitor[type] = funcs[type]
+ return visitor
+}
+
+function skipThrough(node, st, c) { c(node, st) }
+function ignore(_node, _st, _c) {}
+
+// Node walkers.
+
+export const base = {}
+
+base.Program = base.BlockStatement = (node, st, c) => {
+ for (let i = 0; i < node.body.length; ++i)
+ c(node.body[i], st, "Statement")
+}
+base.Statement = skipThrough
+base.EmptyStatement = ignore
+base.ExpressionStatement = base.ParenthesizedExpression =
+ (node, st, c) => c(node.expression, st, "Expression")
+base.IfStatement = (node, st, c) => {
+ c(node.test, st, "Expression")
+ c(node.consequent, st, "Statement")
+ if (node.alternate) c(node.alternate, st, "Statement")
+}
+base.LabeledStatement = (node, st, c) => c(node.body, st, "Statement")
+base.BreakStatement = base.ContinueStatement = ignore
+base.WithStatement = (node, st, c) => {
+ c(node.object, st, "Expression")
+ c(node.body, st, "Statement")
+}
+base.SwitchStatement = (node, st, c) => {
+ c(node.discriminant, st, "Expression")
+ for (let i = 0; i < node.cases.length; ++i) {
+ let cs = node.cases[i]
+ if (cs.test) c(cs.test, st, "Expression")
+ for (let j = 0; j < cs.consequent.length; ++j)
+ c(cs.consequent[j], st, "Statement")
+ }
+}
+base.ReturnStatement = base.YieldExpression = (node, st, c) => {
+ if (node.argument) c(node.argument, st, "Expression")
+}
+base.ThrowStatement = base.SpreadElement =
+ (node, st, c) => c(node.argument, st, "Expression")
+base.TryStatement = (node, st, c) => {
+ c(node.block, st, "Statement")
+ if (node.handler) c(node.handler, st)
+ if (node.finalizer) c(node.finalizer, st, "Statement")
+}
+base.CatchClause = (node, st, c) => {
+ c(node.param, st, "Pattern")
+ c(node.body, st, "ScopeBody")
+}
+base.WhileStatement = base.DoWhileStatement = (node, st, c) => {
+ c(node.test, st, "Expression")
+ c(node.body, st, "Statement")
+}
+base.ForStatement = (node, st, c) => {
+ if (node.init) c(node.init, st, "ForInit")
+ if (node.test) c(node.test, st, "Expression")
+ if (node.update) c(node.update, st, "Expression")
+ c(node.body, st, "Statement")
+}
+base.ForInStatement = base.ForOfStatement = (node, st, c) => {
+ c(node.left, st, "ForInit")
+ c(node.right, st, "Expression")
+ c(node.body, st, "Statement")
+}
+base.ForInit = (node, st, c) => {
+ if (node.type == "VariableDeclaration") c(node, st)
+ else c(node, st, "Expression")
+}
+base.DebuggerStatement = ignore
+
+base.FunctionDeclaration = (node, st, c) => c(node, st, "Function")
+base.VariableDeclaration = (node, st, c) => {
+ for (let i = 0; i < node.declarations.length; ++i)
+ c(node.declarations[i], st)
+}
+base.VariableDeclarator = (node, st, c) => {
+ c(node.id, st, "Pattern")
+ if (node.init) c(node.init, st, "Expression")
+}
+
+base.Function = (node, st, c) => {
+ if (node.id) c(node.id, st, "Pattern")
+ for (let i = 0; i < node.params.length; i++)
+ c(node.params[i], st, "Pattern")
+ c(node.body, st, node.expression ? "ScopeExpression" : "ScopeBody")
+}
+// FIXME drop these node types in next major version
+// (They are awkward, and in ES6 every block can be a scope.)
+base.ScopeBody = (node, st, c) => c(node, st, "Statement")
+base.ScopeExpression = (node, st, c) => c(node, st, "Expression")
+
+base.Pattern = (node, st, c) => {
+ if (node.type == "Identifier")
+ c(node, st, "VariablePattern")
+ else if (node.type == "MemberExpression")
+ c(node, st, "MemberPattern")
+ else
+ c(node, st)
+}
+base.VariablePattern = ignore
+base.MemberPattern = skipThrough
+base.RestElement = (node, st, c) => c(node.argument, st, "Pattern")
+base.ArrayPattern = (node, st, c) => {
+ for (let i = 0; i < node.elements.length; ++i) {
+ let elt = node.elements[i]
+ if (elt) c(elt, st, "Pattern")
+ }
+}
+base.ObjectPattern = (node, st, c) => {
+ for (let i = 0; i < node.properties.length; ++i)
+ c(node.properties[i].value, st, "Pattern")
+}
+
+base.Expression = skipThrough
+base.ThisExpression = base.Super = base.MetaProperty = ignore
+base.ArrayExpression = (node, st, c) => {
+ for (let i = 0; i < node.elements.length; ++i) {
+ let elt = node.elements[i]
+ if (elt) c(elt, st, "Expression")
+ }
+}
+base.ObjectExpression = (node, st, c) => {
+ for (let i = 0; i < node.properties.length; ++i)
+ c(node.properties[i], st)
+}
+base.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration
+base.SequenceExpression = base.TemplateLiteral = (node, st, c) => {
+ for (let i = 0; i < node.expressions.length; ++i)
+ c(node.expressions[i], st, "Expression")
+}
+base.UnaryExpression = base.UpdateExpression = (node, st, c) => {
+ c(node.argument, st, "Expression")
+}
+base.BinaryExpression = base.LogicalExpression = (node, st, c) => {
+ c(node.left, st, "Expression")
+ c(node.right, st, "Expression")
+}
+base.AssignmentExpression = base.AssignmentPattern = (node, st, c) => {
+ c(node.left, st, "Pattern")
+ c(node.right, st, "Expression")
+}
+base.ConditionalExpression = (node, st, c) => {
+ c(node.test, st, "Expression")
+ c(node.consequent, st, "Expression")
+ c(node.alternate, st, "Expression")
+}
+base.NewExpression = base.CallExpression = (node, st, c) => {
+ c(node.callee, st, "Expression")
+ if (node.arguments) for (let i = 0; i < node.arguments.length; ++i)
+ c(node.arguments[i], st, "Expression")
+}
+base.MemberExpression = (node, st, c) => {
+ c(node.object, st, "Expression")
+ if (node.computed) c(node.property, st, "Expression")
+}
+base.ExportNamedDeclaration = base.ExportDefaultDeclaration = (node, st, c) => {
+ if (node.declaration)
+ c(node.declaration, st, node.type == "ExportNamedDeclaration" || node.declaration.id ? "Statement" : "Expression")
+ if (node.source) c(node.source, st, "Expression")
+}
+base.ExportAllDeclaration = (node, st, c) => {
+ c(node.source, st, "Expression")
+}
+base.ImportDeclaration = (node, st, c) => {
+ for (let i = 0; i < node.specifiers.length; i++)
+ c(node.specifiers[i], st)
+ c(node.source, st, "Expression")
+}
+base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.Literal = ignore
+
+base.TaggedTemplateExpression = (node, st, c) => {
+ c(node.tag, st, "Expression")
+ c(node.quasi, st)
+}
+base.ClassDeclaration = base.ClassExpression = (node, st, c) => c(node, st, "Class")
+base.Class = (node, st, c) => {
+ if (node.id) c(node.id, st, "Pattern")
+ if (node.superClass) c(node.superClass, st, "Expression")
+ for (let i = 0; i < node.body.body.length; i++)
+ c(node.body.body[i], st)
+}
+base.MethodDefinition = base.Property = (node, st, c) => {
+ if (node.computed) c(node.key, st, "Expression")
+ c(node.value, st, "Expression")
+}
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/whitespace.js b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/whitespace.js
new file mode 100644
index 0000000000..ee1214a218
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/node_modules/acorn/src/whitespace.js
@@ -0,0 +1,13 @@
+// Matches a whole line break (where CRLF is considered a single
+// line break). Used to count lines.
+
+export const lineBreak = /\r\n?|\n|\u2028|\u2029/
+export const lineBreakG = new RegExp(lineBreak.source, "g")
+
+export function isNewLine(code) {
+ return code === 10 || code === 13 || code === 0x2028 || code == 0x2029
+}
+
+export const nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/
+
+export const skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/package.json b/tools/node_modules/eslint/node_modules/acorn-jsx/package.json
new file mode 100644
index 0000000000..96c127e87b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/package.json
@@ -0,0 +1,56 @@
+{
+ "_from": "acorn-jsx@^3.0.0",
+ "_id": "acorn-jsx@3.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=",
+ "_location": "/eslint/acorn-jsx",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "acorn-jsx@^3.0.0",
+ "name": "acorn-jsx",
+ "escapedName": "acorn-jsx",
+ "rawSpec": "^3.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^3.0.0"
+ },
+ "_requiredBy": [
+ "/eslint/espree"
+ ],
+ "_resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz",
+ "_shasum": "afdf9488fb1ecefc8348f6fb22f464e32a58b36b",
+ "_spec": "acorn-jsx@^3.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/espree",
+ "bugs": {
+ "url": "https://github.com/RReverser/acorn-jsx/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "acorn": "^3.0.4"
+ },
+ "deprecated": false,
+ "description": "Alternative, faster React.js JSX parser",
+ "devDependencies": {
+ "chai": "^3.0.0",
+ "mocha": "^2.2.5"
+ },
+ "homepage": "https://github.com/RReverser/acorn-jsx",
+ "license": "MIT",
+ "maintainers": [
+ {
+ "name": "Ingvar Stepanyan",
+ "email": "me@rreverser.com",
+ "url": "http://rreverser.com/"
+ }
+ ],
+ "name": "acorn-jsx",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/RReverser/acorn-jsx.git"
+ },
+ "scripts": {
+ "test": "node test/run.js"
+ },
+ "version": "3.0.1"
+}
diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/xhtml.js b/tools/node_modules/eslint/node_modules/acorn-jsx/xhtml.js
new file mode 100644
index 0000000000..c1520092f8
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn-jsx/xhtml.js
@@ -0,0 +1,255 @@
+module.exports = {
+ quot: '\u0022',
+ amp: '&',
+ apos: '\u0027',
+ lt: '<',
+ gt: '>',
+ nbsp: '\u00A0',
+ iexcl: '\u00A1',
+ cent: '\u00A2',
+ pound: '\u00A3',
+ curren: '\u00A4',
+ yen: '\u00A5',
+ brvbar: '\u00A6',
+ sect: '\u00A7',
+ uml: '\u00A8',
+ copy: '\u00A9',
+ ordf: '\u00AA',
+ laquo: '\u00AB',
+ not: '\u00AC',
+ shy: '\u00AD',
+ reg: '\u00AE',
+ macr: '\u00AF',
+ deg: '\u00B0',
+ plusmn: '\u00B1',
+ sup2: '\u00B2',
+ sup3: '\u00B3',
+ acute: '\u00B4',
+ micro: '\u00B5',
+ para: '\u00B6',
+ middot: '\u00B7',
+ cedil: '\u00B8',
+ sup1: '\u00B9',
+ ordm: '\u00BA',
+ raquo: '\u00BB',
+ frac14: '\u00BC',
+ frac12: '\u00BD',
+ frac34: '\u00BE',
+ iquest: '\u00BF',
+ Agrave: '\u00C0',
+ Aacute: '\u00C1',
+ Acirc: '\u00C2',
+ Atilde: '\u00C3',
+ Auml: '\u00C4',
+ Aring: '\u00C5',
+ AElig: '\u00C6',
+ Ccedil: '\u00C7',
+ Egrave: '\u00C8',
+ Eacute: '\u00C9',
+ Ecirc: '\u00CA',
+ Euml: '\u00CB',
+ Igrave: '\u00CC',
+ Iacute: '\u00CD',
+ Icirc: '\u00CE',
+ Iuml: '\u00CF',
+ ETH: '\u00D0',
+ Ntilde: '\u00D1',
+ Ograve: '\u00D2',
+ Oacute: '\u00D3',
+ Ocirc: '\u00D4',
+ Otilde: '\u00D5',
+ Ouml: '\u00D6',
+ times: '\u00D7',
+ Oslash: '\u00D8',
+ Ugrave: '\u00D9',
+ Uacute: '\u00DA',
+ Ucirc: '\u00DB',
+ Uuml: '\u00DC',
+ Yacute: '\u00DD',
+ THORN: '\u00DE',
+ szlig: '\u00DF',
+ agrave: '\u00E0',
+ aacute: '\u00E1',
+ acirc: '\u00E2',
+ atilde: '\u00E3',
+ auml: '\u00E4',
+ aring: '\u00E5',
+ aelig: '\u00E6',
+ ccedil: '\u00E7',
+ egrave: '\u00E8',
+ eacute: '\u00E9',
+ ecirc: '\u00EA',
+ euml: '\u00EB',
+ igrave: '\u00EC',
+ iacute: '\u00ED',
+ icirc: '\u00EE',
+ iuml: '\u00EF',
+ eth: '\u00F0',
+ ntilde: '\u00F1',
+ ograve: '\u00F2',
+ oacute: '\u00F3',
+ ocirc: '\u00F4',
+ otilde: '\u00F5',
+ ouml: '\u00F6',
+ divide: '\u00F7',
+ oslash: '\u00F8',
+ ugrave: '\u00F9',
+ uacute: '\u00FA',
+ ucirc: '\u00FB',
+ uuml: '\u00FC',
+ yacute: '\u00FD',
+ thorn: '\u00FE',
+ yuml: '\u00FF',
+ OElig: '\u0152',
+ oelig: '\u0153',
+ Scaron: '\u0160',
+ scaron: '\u0161',
+ Yuml: '\u0178',
+ fnof: '\u0192',
+ circ: '\u02C6',
+ tilde: '\u02DC',
+ Alpha: '\u0391',
+ Beta: '\u0392',
+ Gamma: '\u0393',
+ Delta: '\u0394',
+ Epsilon: '\u0395',
+ Zeta: '\u0396',
+ Eta: '\u0397',
+ Theta: '\u0398',
+ Iota: '\u0399',
+ Kappa: '\u039A',
+ Lambda: '\u039B',
+ Mu: '\u039C',
+ Nu: '\u039D',
+ Xi: '\u039E',
+ Omicron: '\u039F',
+ Pi: '\u03A0',
+ Rho: '\u03A1',
+ Sigma: '\u03A3',
+ Tau: '\u03A4',
+ Upsilon: '\u03A5',
+ Phi: '\u03A6',
+ Chi: '\u03A7',
+ Psi: '\u03A8',
+ Omega: '\u03A9',
+ alpha: '\u03B1',
+ beta: '\u03B2',
+ gamma: '\u03B3',
+ delta: '\u03B4',
+ epsilon: '\u03B5',
+ zeta: '\u03B6',
+ eta: '\u03B7',
+ theta: '\u03B8',
+ iota: '\u03B9',
+ kappa: '\u03BA',
+ lambda: '\u03BB',
+ mu: '\u03BC',
+ nu: '\u03BD',
+ xi: '\u03BE',
+ omicron: '\u03BF',
+ pi: '\u03C0',
+ rho: '\u03C1',
+ sigmaf: '\u03C2',
+ sigma: '\u03C3',
+ tau: '\u03C4',
+ upsilon: '\u03C5',
+ phi: '\u03C6',
+ chi: '\u03C7',
+ psi: '\u03C8',
+ omega: '\u03C9',
+ thetasym: '\u03D1',
+ upsih: '\u03D2',
+ piv: '\u03D6',
+ ensp: '\u2002',
+ emsp: '\u2003',
+ thinsp: '\u2009',
+ zwnj: '\u200C',
+ zwj: '\u200D',
+ lrm: '\u200E',
+ rlm: '\u200F',
+ ndash: '\u2013',
+ mdash: '\u2014',
+ lsquo: '\u2018',
+ rsquo: '\u2019',
+ sbquo: '\u201A',
+ ldquo: '\u201C',
+ rdquo: '\u201D',
+ bdquo: '\u201E',
+ dagger: '\u2020',
+ Dagger: '\u2021',
+ bull: '\u2022',
+ hellip: '\u2026',
+ permil: '\u2030',
+ prime: '\u2032',
+ Prime: '\u2033',
+ lsaquo: '\u2039',
+ rsaquo: '\u203A',
+ oline: '\u203E',
+ frasl: '\u2044',
+ euro: '\u20AC',
+ image: '\u2111',
+ weierp: '\u2118',
+ real: '\u211C',
+ trade: '\u2122',
+ alefsym: '\u2135',
+ larr: '\u2190',
+ uarr: '\u2191',
+ rarr: '\u2192',
+ darr: '\u2193',
+ harr: '\u2194',
+ crarr: '\u21B5',
+ lArr: '\u21D0',
+ uArr: '\u21D1',
+ rArr: '\u21D2',
+ dArr: '\u21D3',
+ hArr: '\u21D4',
+ forall: '\u2200',
+ part: '\u2202',
+ exist: '\u2203',
+ empty: '\u2205',
+ nabla: '\u2207',
+ isin: '\u2208',
+ notin: '\u2209',
+ ni: '\u220B',
+ prod: '\u220F',
+ sum: '\u2211',
+ minus: '\u2212',
+ lowast: '\u2217',
+ radic: '\u221A',
+ prop: '\u221D',
+ infin: '\u221E',
+ ang: '\u2220',
+ and: '\u2227',
+ or: '\u2228',
+ cap: '\u2229',
+ cup: '\u222A',
+ 'int': '\u222B',
+ there4: '\u2234',
+ sim: '\u223C',
+ cong: '\u2245',
+ asymp: '\u2248',
+ ne: '\u2260',
+ equiv: '\u2261',
+ le: '\u2264',
+ ge: '\u2265',
+ sub: '\u2282',
+ sup: '\u2283',
+ nsub: '\u2284',
+ sube: '\u2286',
+ supe: '\u2287',
+ oplus: '\u2295',
+ otimes: '\u2297',
+ perp: '\u22A5',
+ sdot: '\u22C5',
+ lceil: '\u2308',
+ rceil: '\u2309',
+ lfloor: '\u230A',
+ rfloor: '\u230B',
+ lang: '\u2329',
+ rang: '\u232A',
+ loz: '\u25CA',
+ spades: '\u2660',
+ clubs: '\u2663',
+ hearts: '\u2665',
+ diams: '\u2666'
+};
diff --git a/tools/node_modules/eslint/node_modules/acorn/AUTHORS b/tools/node_modules/eslint/node_modules/acorn/AUTHORS
new file mode 100644
index 0000000000..78437f610c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn/AUTHORS
@@ -0,0 +1,69 @@
+List of Acorn contributors. Updated before every release.
+
+Adrian Rakovsky
+Alistair Braidwood
+Amila Welihinda
+Andres Suarez
+Angelo
+Aparajita Fishman
+Arian Stolwijk
+Artem Govorov
+Bradley Heinz
+Brandon Mills
+Charles Hughes
+Conrad Irwin
+Daniel Tschinder
+David Bonnet
+Domenico Matteo
+ehmicky
+Forbes Lindesay
+Gilad Peleg
+impinball
+Ingvar Stepanyan
+Jackson Ray Hamilton
+Jesse McCarthy
+Jiaxing Wang
+Joel Kemp
+Johannes Herr
+John-David Dalton
+Jordan Klassen
+Jürg Lehni
+Kai Cataldo
+keeyipchan
+Keheliya Gallaba
+Kevin Irish
+Kevin Kwok
+krator
+Marek
+Marijn Haverbeke
+Martin Carlberg
+Mat Garcia
+Mathias Bynens
+Mathieu 'p01' Henri
+Matthew Bastien
+Max Schaefer
+Max Zerzouri
+Mihai Bazon
+Mike Rennie
+naoh
+Nicholas C. Zakas
+Nick Fitzgerald
+Olivier Thomann
+Oskar Schöldström
+Paul Harper
+Peter Rust
+PlNG
+Prayag Verma
+ReadmeCritic
+r-e-d
+Richard Gibson
+Rich Harris
+Sebastian McKenzie
+Shahar Soel
+Simen Bekkhus
+Teddy Katz
+Timothy Gu
+Toru Nagashima
+Victor Homyakov
+Wexpo Lyu
+zsjforcn
diff --git a/tools/node_modules/eslint/node_modules/acorn/LICENSE b/tools/node_modules/eslint/node_modules/acorn/LICENSE
new file mode 100644
index 0000000000..3f01865520
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn/LICENSE
@@ -0,0 +1,19 @@
+Copyright (C) 2012-2017 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/tools/node_modules/eslint/node_modules/acorn/README.md b/tools/node_modules/eslint/node_modules/acorn/README.md
new file mode 100644
index 0000000000..ab2c12ea51
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn/README.md
@@ -0,0 +1,452 @@
+# 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)
+[![CDNJS](https://img.shields.io/cdnjs/v/acorn.svg)](https://cdnjs.com/libraries/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, 6 (2015), 7 (2016), 8 (2017), or 9 (2018, partial
+ support). This influences support for strict mode, the set of
+ reserved words, and support for new syntax features. Default is 7.
+
+ **NOTE**: Only 'stage 4' (finalized) ECMAScript features are being
+ implemented by Acorn.
+
+- **sourceType**: Indicate the mode the code should be parsed in. Can be
+ either `"script"` or `"module"`. This influences global strict mode
+ and parsing of `import` and `export` declarations.
+
+- **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 (regardless of the `location` option) 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.)
+
+```js
+const acorn = require("acorn")
+const walk = require("acorn/dist/walk")
+
+walk.simple(acorn.parse("let x = 10"), {
+ Literal(node) {
+ console.log(`Found a literal: ${node.value}`)
+ }
+})
+```
+
+**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 the callbacks as a third parameter.
+
+```js
+const acorn = require("acorn")
+const walk = require("acorn/dist/walk")
+
+walk.ancestor(acorn.parse("foo('hi')"), {
+ Literal(_, ancestors) {
+ console.log("This literal's ancestors are:",
+ ancestors.map(n => n.type))
+ }
+})
+```
+
+**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`.
+
+**full**`(node, callback, base, state)` does a 'full'
+walk over a tree, calling the callback with the arguments (node, state, type)
+for each node
+
+**fullAncestor**`(node, callback, base, state)` does a 'full' walk over
+a tree, building up an array of ancestor nodes (including the current node)
+and passing the array to the callbacks as a third parameter.
+
+```js
+const acorn = require("acorn")
+const walk = require("acorn/dist/walk")
+
+walk.full(acorn.parse("1 + 1"), node => {
+ console.log(`There's a ${node.type} node at ${node.ch}`)
+})
+```
+
+**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|--ecma7|--ecma8|--ecma9`: Sets the ECMAScript version
+ to parse. Default is version 7.
+
+- `--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)
+ }
+})
+```
+
+### Existing plugins
+
+ - [`acorn-jsx`](https://github.com/RReverser/acorn-jsx): Parse [Facebook JSX syntax extensions](https://github.com/facebook/jsx)
+ - [`acorn-es7-plugin`](https://github.com/MatAtBread/acorn-es7-plugin/): Parse [async/await syntax proposal](https://github.com/tc39/ecmascript-asyncawait)
+ - [`acorn-object-spread`](https://github.com/UXtemple/acorn-object-spread): Parse [object spread syntax proposal](https://github.com/sebmarkbage/ecmascript-rest-spread)
+ - [`acorn-es7`](https://www.npmjs.com/package/acorn-es7): Parse [decorator syntax proposal](https://github.com/wycats/javascript-decorators)
+ - [`acorn-objj`](https://www.npmjs.com/package/acorn-objj): [Objective-J](http://www.cappuccino-project.org/learn/objective-j.html) language parser built as Acorn plugin
+ - [`acorn-object-rest-spread`](https://github.com/victor-homyakov/acorn-object-rest-spread) Parse [Object Rest/Spread Properties proposal](https://github.com/tc39/proposal-object-rest-spread), works with latest Acorn version (5.0.3)
+ - [`acorn-static-class-property-initializer`](https://github.com/victor-homyakov/acorn-static-class-property-initializer) Partial support for static class properties from [ES Class Fields & Static Properties Proposal](https://github.com/tc39/proposal-class-public-fields) to support static property initializers in [React components written as ES6+ classes](https://babeljs.io/blog/2015/06/07/react-on-es6-plus)
+
diff --git a/tools/node_modules/eslint/node_modules/acorn/bin/acorn b/tools/node_modules/eslint/node_modules/acorn/bin/acorn
new file mode 100755
index 0000000000..830c389641
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn/bin/acorn
@@ -0,0 +1,69 @@
+#!/usr/bin/env node
+'use strict';
+
+var path = require('path');
+var fs = require('fs');
+var acorn = require('../dist/acorn.js');
+
+var infile;
+var forceFile;
+var silent = false;
+var compact = false;
+var tokenize = false;
+var options = {};
+
+function help(status) {
+ var print = (status == 0) ? console.log : console.error;
+ print("usage: " + path.basename(process.argv[1]) + " [--ecma3|--ecma5|--ecma6|--ecma7|--ecma8|--ecma9|...|--ecma2015|--ecma2016|--ecma2017|--ecma2018|...]");
+ 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 == "--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 {
+ var match = arg.match(/^--ecma(\d+)$/);
+ if (match)
+ { options.ecmaVersion = +match[1]; }
+ else
+ { help(1); }
+ }
+}
+
+function run(code) {
+ var result;
+ try {
+ if (!tokenize) {
+ result = acorn.parse(code, options);
+ } else {
+ result = [];
+ var tokenizer$$1 = acorn.tokenizer(code, options), token;
+ do {
+ token = tokenizer$$1.getToken();
+ result.push(token);
+ } while (token.type != acorn.tokTypes.eof)
+ }
+ } catch (e) {
+ console.error(e.message);
+ process.exit(1);
+ }
+ if (!silent) { console.log(JSON.stringify(result, null, compact ? null : 2)); }
+}
+
+if (forceFile || infile && infile != "-") {
+ run(fs.readFileSync(infile, "utf8"));
+} else {
+ var code = "";
+ process.stdin.resume();
+ process.stdin.on("data", function (chunk) { return code += chunk; });
+ process.stdin.on("end", function () { return run(code); });
+}
diff --git a/tools/node_modules/eslint/node_modules/acorn/dist/.keep b/tools/node_modules/eslint/node_modules/acorn/dist/.keep
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn/dist/.keep
diff --git a/tools/node_modules/eslint/node_modules/acorn/dist/acorn.es.js b/tools/node_modules/eslint/node_modules/acorn/dist/acorn.es.js
new file mode 100644
index 0000000000..d7289102c2
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn/dist/acorn.es.js
@@ -0,0 +1,3734 @@
+// Reserved word lists for various dialects of the language
+
+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"
+};
+
+// 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 + " const class extends export import super"
+};
+
+// ## 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 = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fd5\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ae\ua7b0-\ua7b7\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab65\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc";
+var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d4-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d01-\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1cf8\u1cf9\u1dc0-\u1df5\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua900-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f";
+
+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 bin/generate-identifier-regex.js
+
+// eslint-disable-next-line comma-spacing
+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,19,35,5,35,5,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,66,18,2,1,11,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,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,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,60,67,1213,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,3,5761,10591,541];
+
+// eslint-disable-next-line comma-spacing
+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,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,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,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,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)
+}
+
+// ## Token types
+
+// The assignment of fine-grained, information-carrying type objects
+// allows the tokenizer to store the information it has about a
+// token in a way that is very cheap for the parser to look up.
+
+// All token type variables start with an underscore, to make them
+// easy to recognize.
+
+// The `beforeExpr` property is used to disambiguate between regular
+// expressions and divisions. It is set on all token types that can
+// be followed by an expression (thus, a slash after them would be a
+// regular expression).
+//
+// The `startsExpr` property is used to check if the token ends a
+// `yield` expression. It is set on all token types that either can
+// directly start an expression (like a quotation mark) or can
+// continue an expression (like the body of a string).
+//
+// `isLoop` marks a keyword as starting a loop, which is important
+// to know when parsing a label, in order to allow or disallow
+// continue jumps to that label.
+
+var TokenType = function TokenType(label, conf) {
+ if ( conf === void 0 ) conf = {};
+
+ this.label = label;
+ this.keyword = conf.keyword;
+ this.beforeExpr = !!conf.beforeExpr;
+ this.startsExpr = !!conf.startsExpr;
+ this.isLoop = !!conf.isLoop;
+ this.isAssign = !!conf.isAssign;
+ this.prefix = !!conf.prefix;
+ this.postfix = !!conf.postfix;
+ this.binop = conf.binop || null;
+ this.updateContext = null;
+};
+
+function binop(name, prec) {
+ return new TokenType(name, {beforeExpr: true, binop: prec})
+}
+var beforeExpr = {beforeExpr: true};
+var startsExpr = {startsExpr: true};
+
+// Map keyword names to token types.
+
+var keywords$1 = {};
+
+// Succinct definitions of keyword token types
+function kw(name, options) {
+ if ( options === void 0 ) options = {};
+
+ options.keyword = name;
+ return keywords$1[name] = new TokenType(name, options)
+}
+
+var types = {
+ num: new TokenType("num", startsExpr),
+ regexp: new TokenType("regexp", startsExpr),
+ string: new TokenType("string", startsExpr),
+ name: new TokenType("name", startsExpr),
+ eof: new TokenType("eof"),
+
+ // Punctuation token types.
+ bracketL: new TokenType("[", {beforeExpr: true, startsExpr: true}),
+ bracketR: new TokenType("]"),
+ braceL: new TokenType("{", {beforeExpr: true, startsExpr: true}),
+ braceR: new TokenType("}"),
+ parenL: new TokenType("(", {beforeExpr: true, startsExpr: true}),
+ parenR: new TokenType(")"),
+ comma: new TokenType(",", beforeExpr),
+ semi: new TokenType(";", beforeExpr),
+ colon: new TokenType(":", beforeExpr),
+ dot: new TokenType("."),
+ question: new TokenType("?", beforeExpr),
+ arrow: new TokenType("=>", beforeExpr),
+ template: new TokenType("template"),
+ invalidTemplate: new TokenType("invalidTemplate"),
+ ellipsis: new TokenType("...", beforeExpr),
+ backQuote: new TokenType("`", startsExpr),
+ dollarBraceL: new TokenType("${", {beforeExpr: true, startsExpr: true}),
+
+ // Operators. These carry several kinds of properties to help the
+ // parser use them properly (the presence of these properties is
+ // what categorizes them as operators).
+ //
+ // `binop`, when present, specifies that this operator is a binary
+ // operator, and will refer to its precedence.
+ //
+ // `prefix` and `postfix` mark the operator as a prefix or postfix
+ // unary operator.
+ //
+ // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as
+ // binary operators with a very low precedence, that should result
+ // in AssignmentExpression nodes.
+
+ eq: new TokenType("=", {beforeExpr: true, isAssign: true}),
+ assign: new TokenType("_=", {beforeExpr: true, isAssign: true}),
+ incDec: new TokenType("++/--", {prefix: true, postfix: true, startsExpr: true}),
+ prefix: new TokenType("!/~", {beforeExpr: true, prefix: true, startsExpr: true}),
+ logicalOR: binop("||", 1),
+ logicalAND: binop("&&", 2),
+ bitwiseOR: binop("|", 3),
+ bitwiseXOR: binop("^", 4),
+ bitwiseAND: binop("&", 5),
+ equality: binop("==/!=/===/!==", 6),
+ relational: binop("</>/<=/>=", 7),
+ bitShift: binop("<</>>/>>>", 8),
+ plusMin: new TokenType("+/-", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}),
+ modulo: binop("%", 10),
+ star: binop("*", 10),
+ slash: binop("/", 10),
+ starstar: new TokenType("**", {beforeExpr: true}),
+
+ // Keyword token types.
+ _break: kw("break"),
+ _case: kw("case", beforeExpr),
+ _catch: kw("catch"),
+ _continue: kw("continue"),
+ _debugger: kw("debugger"),
+ _default: kw("default", beforeExpr),
+ _do: kw("do", {isLoop: true, beforeExpr: true}),
+ _else: kw("else", beforeExpr),
+ _finally: kw("finally"),
+ _for: kw("for", {isLoop: true}),
+ _function: kw("function", startsExpr),
+ _if: kw("if"),
+ _return: kw("return", beforeExpr),
+ _switch: kw("switch"),
+ _throw: kw("throw", beforeExpr),
+ _try: kw("try"),
+ _var: kw("var"),
+ _const: kw("const"),
+ _while: kw("while", {isLoop: true}),
+ _with: kw("with"),
+ _new: kw("new", {beforeExpr: true, startsExpr: true}),
+ _this: kw("this", startsExpr),
+ _super: kw("super", startsExpr),
+ _class: kw("class", startsExpr),
+ _extends: kw("extends", beforeExpr),
+ _export: kw("export"),
+ _import: kw("import"),
+ _null: kw("null", startsExpr),
+ _true: kw("true", startsExpr),
+ _false: kw("false", startsExpr),
+ _in: kw("in", {beforeExpr: true, binop: 7}),
+ _instanceof: kw("instanceof", {beforeExpr: true, binop: 7}),
+ _typeof: kw("typeof", {beforeExpr: true, prefix: true, startsExpr: true}),
+ _void: kw("void", {beforeExpr: true, prefix: true, startsExpr: true}),
+ _delete: kw("delete", {beforeExpr: true, prefix: true, startsExpr: true})
+};
+
+// Matches a whole line break (where CRLF is considered a single
+// line break). Used to count lines.
+
+var lineBreak = /\r\n?|\n|\u2028|\u2029/;
+var lineBreakG = new RegExp(lineBreak.source, "g");
+
+function isNewLine(code) {
+ return code === 10 || code === 13 || code === 0x2028 || code === 0x2029
+}
+
+var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;
+
+var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
+
+var ref = Object.prototype;
+var hasOwnProperty = ref.hasOwnProperty;
+var toString = ref.toString;
+
+// Checks if an object has a property.
+
+function has(obj, propName) {
+ return hasOwnProperty.call(obj, propName)
+}
+
+var isArray = Array.isArray || (function (obj) { return (
+ toString.call(obj) === "[object Array]"
+); });
+
+// These are used when `options.locations` is on, for the
+// `startLoc` and `endLoc` properties.
+
+var Position = function Position(line, col) {
+ this.line = line;
+ this.column = col;
+};
+
+Position.prototype.offset = function offset (n) {
+ return new Position(this.line, this.column + n)
+};
+
+var SourceLocation = function SourceLocation(p, start, end) {
+ 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.
+
+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)
+ }
+ }
+}
+
+// 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, 5, 6 (2015), 7 (2016), or 8 (2017). This influences support
+ // for strict mode, the set of reserved words, and support for
+ // new syntax features. The default is 7.
+ ecmaVersion: 7,
+ // `sourceType` indicates the mode the code should be parsed in.
+ // Can be either `"script"` or `"module"`. This influences global
+ // strict mode and parsing of `import` and `export` declarations.
+ 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: {}
+};
+
+// Interpret and default an options object
+
+function getOptions(opts) {
+ var options = {};
+
+ for (var opt in defaultOptions)
+ { options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt]; }
+
+ if (options.ecmaVersion >= 2015)
+ { options.ecmaVersion -= 2009; }
+
+ if (options.allowReserved == null)
+ { options.allowReserved = options.ecmaVersion < 5; }
+
+ if (isArray(options.onToken)) {
+ 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);
+ }
+}
+
+// Registered plugins
+var plugins = {};
+
+function keywordRegexp(words) {
+ return new RegExp("^(?:" + words.replace(/ /g, "|") + ")$")
+}
+
+var Parser = function Parser(options, input, startPos) {
+ this.options = options = getOptions(options);
+ this.sourceFile = options.sourceFile;
+ this.keywords = keywordRegexp(keywords[options.ecmaVersion >= 6 ? 6 : 5]);
+ var reserved = "";
+ if (!options.allowReserved) {
+ for (var v = options.ecmaVersion;; v--)
+ { if (reserved = reservedWords[v]) { break } }
+ if (options.sourceType == "module") { reserved += " await"; }
+ }
+ this.reservedWords = keywordRegexp(reserved);
+ var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict;
+ this.reservedWordsStrict = keywordRegexp(reservedStrict);
+ this.reservedWordsStrictBind = keywordRegexp(reservedStrict + " " + 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 = this.input.lastIndexOf("\n", startPos - 1) + 1;
+ 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 = 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.inModule = options.sourceType === "module";
+ this.strict = this.inModule || this.strictDirective(this.pos);
+
+ // Used to signify the start of a potential arrow function
+ this.potentialArrowAt = -1;
+
+ // Flags to track whether we are in a function, a generator, an async function.
+ this.inFunction = this.inGenerator = this.inAsync = false;
+ // Positions to delayed-check that yield/await does not exist in default parameters.
+ this.yieldPos = this.awaitPos = 0;
+ // 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); }
+
+ // Scope tracking for duplicate variable names (see scope.js)
+ this.scopeStack = [];
+ this.enterFunctionScope();
+};
+
+// 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) {
+ var this$1 = this;
+
+ for (var name in pluginConfigs) {
+ var plugin = plugins[name];
+ if (!plugin) { throw new Error("Plugin '" + name + "' not found") }
+ plugin(this$1, pluginConfigs[name]);
+ }
+};
+
+Parser.prototype.parse = function parse () {
+ var node = this.options.program || this.startNode();
+ this.nextToken();
+ return this.parseTopLevel(node)
+};
+
+var pp = Parser.prototype;
+
+// ## Parser utilities
+
+var literal = /^(?:'((?:\\.|[^'])*?)'|"((?:\\.|[^"])*?)"|;)/;
+pp.strictDirective = function(start) {
+ var this$1 = this;
+
+ for (;;) {
+ skipWhiteSpace.lastIndex = start;
+ start += skipWhiteSpace.exec(this$1.input)[0].length;
+ var match = literal.exec(this$1.input.slice(start));
+ if (!match) { return false }
+ if ((match[1] || match[2]) == "use strict") { return true }
+ start += match[0].length;
+ }
+};
+
+// 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 === types.name && this.value === name
+};
+
+// Consumes contextual keyword if possible.
+
+pp.eatContextual = function(name) {
+ return this.value === name && this.eat(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 === types.eof ||
+ this.type === types.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(types.semi) && !this.insertSemicolon()) { this.unexpected(); }
+};
+
+pp.afterTrailingComma = function(tokType, notNext) {
+ if (this.type == tokType) {
+ if (this.options.onTrailingComma)
+ { this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc); }
+ if (!notNext)
+ { 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");
+};
+
+function DestructuringErrors() {
+ this.shorthandAssign =
+ this.trailingComma =
+ this.parenthesizedAssign =
+ this.parenthesizedBind =
+ -1;
+}
+
+pp.checkPatternErrors = function(refDestructuringErrors, isAssign) {
+ if (!refDestructuringErrors) { return }
+ if (refDestructuringErrors.trailingComma > -1)
+ { this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element"); }
+ var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind;
+ if (parens > -1) { this.raiseRecoverable(parens, "Parenthesized pattern"); }
+};
+
+pp.checkExpressionErrors = function(refDestructuringErrors, andThrow) {
+ var pos = refDestructuringErrors ? refDestructuringErrors.shorthandAssign : -1;
+ if (!andThrow) { return pos >= 0 }
+ if (pos > -1) { this.raise(pos, "Shorthand property assignments are valid only in destructuring patterns"); }
+};
+
+pp.checkYieldAwaitInDefaultParams = function() {
+ if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos))
+ { this.raise(this.yieldPos, "Yield expression cannot be a default value"); }
+ if (this.awaitPos)
+ { this.raise(this.awaitPos, "Await expression cannot be a default value"); }
+};
+
+pp.isSimpleAssignTarget = function(expr) {
+ if (expr.type === "ParenthesizedExpression")
+ { return this.isSimpleAssignTarget(expr.expression) }
+ return expr.type === "Identifier" || expr.type === "MemberExpression"
+};
+
+var pp$1 = 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$1.parseTopLevel = function(node) {
+ var this$1 = this;
+
+ var exports = {};
+ if (!node.body) { node.body = []; }
+ while (this.type !== types.eof) {
+ var stmt = this$1.parseStatement(true, true, exports);
+ node.body.push(stmt);
+ }
+ this.adaptDirectivePrologue(node.body);
+ this.next();
+ if (this.options.ecmaVersion >= 6) {
+ node.sourceType = this.options.sourceType;
+ }
+ return this.finishNode(node, "Program")
+};
+
+var loopLabel = {kind: "loop"};
+var switchLabel = {kind: "switch"};
+
+pp$1.isLet = function() {
+ if (this.type !== types.name || this.options.ecmaVersion < 6 || this.value != "let") { return false }
+ skipWhiteSpace.lastIndex = this.pos;
+ var skip = skipWhiteSpace.exec(this.input);
+ var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next);
+ if (nextCh === 91 || nextCh == 123) { return true } // '{' and '['
+ if (isIdentifierStart(nextCh, true)) {
+ var pos = next + 1;
+ while (isIdentifierChar(this.input.charCodeAt(pos), true)) { ++pos; }
+ var ident = this.input.slice(next, pos);
+ if (!this.isKeyword(ident)) { return true }
+ }
+ return false
+};
+
+// check 'async [no LineTerminator here] function'
+// - 'async /*foo*/ function' is OK.
+// - 'async /*\n*/ function' is invalid.
+pp$1.isAsyncFunction = function() {
+ if (this.type !== types.name || this.options.ecmaVersion < 8 || this.value != "async")
+ { return false }
+
+ skipWhiteSpace.lastIndex = this.pos;
+ var skip = skipWhiteSpace.exec(this.input);
+ var next = this.pos + skip[0].length;
+ return !lineBreak.test(this.input.slice(this.pos, next)) &&
+ this.input.slice(next, next + 8) === "function" &&
+ (next + 8 == this.input.length || !isIdentifierChar(this.input.charAt(next + 8)))
+};
+
+// 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$1.parseStatement = function(declaration, topLevel, exports) {
+ var starttype = this.type, node = this.startNode(), kind;
+
+ if (this.isLet()) {
+ starttype = types._var;
+ kind = "let";
+ }
+
+ // 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 types._break: case types._continue: return this.parseBreakContinueStatement(node, starttype.keyword)
+ case types._debugger: return this.parseDebuggerStatement(node)
+ case types._do: return this.parseDoStatement(node)
+ case types._for: return this.parseForStatement(node)
+ case types._function:
+ if (!declaration && this.options.ecmaVersion >= 6) { this.unexpected(); }
+ return this.parseFunctionStatement(node, false)
+ case types._class:
+ if (!declaration) { this.unexpected(); }
+ return this.parseClass(node, true)
+ case types._if: return this.parseIfStatement(node)
+ case types._return: return this.parseReturnStatement(node)
+ case types._switch: return this.parseSwitchStatement(node)
+ case types._throw: return this.parseThrowStatement(node)
+ case types._try: return this.parseTryStatement(node)
+ case types._const: case types._var:
+ kind = kind || this.value;
+ if (!declaration && kind != "var") { this.unexpected(); }
+ return this.parseVarStatement(node, kind)
+ case types._while: return this.parseWhileStatement(node)
+ case types._with: return this.parseWithStatement(node)
+ case types.braceL: return this.parseBlock()
+ case types.semi: return this.parseEmptyStatement(node)
+ case types._export:
+ case 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 === types._import ? this.parseImport(node) : this.parseExport(node, exports)
+
+ // 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:
+ if (this.isAsyncFunction() && declaration) {
+ this.next();
+ return this.parseFunctionStatement(node, true)
+ }
+
+ var maybeName = this.value, expr = this.parseExpression();
+ if (starttype === types.name && expr.type === "Identifier" && this.eat(types.colon))
+ { return this.parseLabeledStatement(node, maybeName, expr) }
+ else { return this.parseExpressionStatement(node, expr) }
+ }
+};
+
+pp$1.parseBreakContinueStatement = function(node, keyword) {
+ var this$1 = this;
+
+ var isBreak = keyword == "break";
+ this.next();
+ if (this.eat(types.semi) || this.insertSemicolon()) { node.label = null; }
+ else if (this.type !== types.name) { this.unexpected(); }
+ else {
+ node.label = this.parseIdent();
+ this.semicolon();
+ }
+
+ // Verify that there is an actual destination to break or
+ // continue to.
+ var i = 0;
+ for (; i < this.labels.length; ++i) {
+ var lab = this$1.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$1.parseDebuggerStatement = function(node) {
+ this.next();
+ this.semicolon();
+ return this.finishNode(node, "DebuggerStatement")
+};
+
+pp$1.parseDoStatement = function(node) {
+ this.next();
+ this.labels.push(loopLabel);
+ node.body = this.parseStatement(false);
+ this.labels.pop();
+ this.expect(types._while);
+ node.test = this.parseParenExpression();
+ if (this.options.ecmaVersion >= 6)
+ { this.eat(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$1.parseForStatement = function(node) {
+ this.next();
+ this.labels.push(loopLabel);
+ this.enterLexicalScope();
+ this.expect(types.parenL);
+ if (this.type === types.semi) { return this.parseFor(node, null) }
+ var isLet = this.isLet();
+ if (this.type === types._var || this.type === types._const || isLet) {
+ var init$1 = this.startNode(), kind = isLet ? "let" : this.value;
+ this.next();
+ this.parseVar(init$1, true, kind);
+ this.finishNode(init$1, "VariableDeclaration");
+ if ((this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) && init$1.declarations.length === 1 &&
+ !(kind !== "var" && init$1.declarations[0].init))
+ { return this.parseForIn(node, init$1) }
+ return this.parseFor(node, init$1)
+ }
+ var refDestructuringErrors = new DestructuringErrors;
+ var init = this.parseExpression(true, refDestructuringErrors);
+ if (this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
+ this.toAssignable(init);
+ this.checkLVal(init);
+ this.checkPatternErrors(refDestructuringErrors, true);
+ return this.parseForIn(node, init)
+ } else {
+ this.checkExpressionErrors(refDestructuringErrors, true);
+ }
+ return this.parseFor(node, init)
+};
+
+pp$1.parseFunctionStatement = function(node, isAsync) {
+ this.next();
+ return this.parseFunction(node, true, false, isAsync)
+};
+
+pp$1.isFunction = function() {
+ return this.type === types._function || this.isAsyncFunction()
+};
+
+pp$1.parseIfStatement = function(node) {
+ this.next();
+ node.test = this.parseParenExpression();
+ // allow function declarations in branches, but only in non-strict mode
+ node.consequent = this.parseStatement(!this.strict && this.isFunction());
+ node.alternate = this.eat(types._else) ? this.parseStatement(!this.strict && this.isFunction()) : null;
+ return this.finishNode(node, "IfStatement")
+};
+
+pp$1.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(types.semi) || this.insertSemicolon()) { node.argument = null; }
+ else { node.argument = this.parseExpression(); this.semicolon(); }
+ return this.finishNode(node, "ReturnStatement")
+};
+
+pp$1.parseSwitchStatement = function(node) {
+ var this$1 = this;
+
+ this.next();
+ node.discriminant = this.parseParenExpression();
+ node.cases = [];
+ this.expect(types.braceL);
+ this.labels.push(switchLabel);
+ this.enterLexicalScope();
+
+ // Statements under must be grouped (by label) in SwitchCase
+ // nodes. `cur` is used to keep the node that we are currently
+ // adding statements to.
+
+ var cur;
+ for (var sawDefault = false; this.type != types.braceR;) {
+ if (this$1.type === types._case || this$1.type === types._default) {
+ var isCase = this$1.type === types._case;
+ if (cur) { this$1.finishNode(cur, "SwitchCase"); }
+ node.cases.push(cur = this$1.startNode());
+ cur.consequent = [];
+ this$1.next();
+ if (isCase) {
+ cur.test = this$1.parseExpression();
+ } else {
+ if (sawDefault) { this$1.raiseRecoverable(this$1.lastTokStart, "Multiple default clauses"); }
+ sawDefault = true;
+ cur.test = null;
+ }
+ this$1.expect(types.colon);
+ } else {
+ if (!cur) { this$1.unexpected(); }
+ cur.consequent.push(this$1.parseStatement(true));
+ }
+ }
+ this.exitLexicalScope();
+ if (cur) { this.finishNode(cur, "SwitchCase"); }
+ this.next(); // Closing brace
+ this.labels.pop();
+ return this.finishNode(node, "SwitchStatement")
+};
+
+pp$1.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$1.parseTryStatement = function(node) {
+ this.next();
+ node.block = this.parseBlock();
+ node.handler = null;
+ if (this.type === types._catch) {
+ var clause = this.startNode();
+ this.next();
+ this.expect(types.parenL);
+ clause.param = this.parseBindingAtom();
+ this.enterLexicalScope();
+ this.checkLVal(clause.param, "let");
+ this.expect(types.parenR);
+ clause.body = this.parseBlock(false);
+ this.exitLexicalScope();
+ node.handler = this.finishNode(clause, "CatchClause");
+ }
+ node.finalizer = this.eat(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$1.parseVarStatement = function(node, kind) {
+ this.next();
+ this.parseVar(node, false, kind);
+ this.semicolon();
+ return this.finishNode(node, "VariableDeclaration")
+};
+
+pp$1.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$1.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$1.parseEmptyStatement = function(node) {
+ this.next();
+ return this.finishNode(node, "EmptyStatement")
+};
+
+pp$1.parseLabeledStatement = function(node, maybeName, expr) {
+ var this$1 = this;
+
+ for (var i$1 = 0, list = this$1.labels; i$1 < list.length; i$1 += 1)
+ {
+ var label = list[i$1];
+
+ if (label.name === maybeName)
+ { this$1.raise(expr.start, "Label '" + maybeName + "' is already declared");
+ } }
+ var kind = this.type.isLoop ? "loop" : this.type === types._switch ? "switch" : null;
+ for (var i = this.labels.length - 1; i >= 0; i--) {
+ var label$1 = this$1.labels[i];
+ if (label$1.statementStart == node.start) {
+ label$1.statementStart = this$1.start;
+ label$1.kind = kind;
+ } else { break }
+ }
+ this.labels.push({name: maybeName, kind: kind, statementStart: this.start});
+ node.body = this.parseStatement(true);
+ if (node.body.type == "ClassDeclaration" ||
+ node.body.type == "VariableDeclaration" && node.body.kind != "var" ||
+ node.body.type == "FunctionDeclaration" && (this.strict || node.body.generator))
+ { this.raiseRecoverable(node.body.start, "Invalid labeled declaration"); }
+ this.labels.pop();
+ node.label = expr;
+ return this.finishNode(node, "LabeledStatement")
+};
+
+pp$1.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$1.parseBlock = function(createNewLexicalScope) {
+ var this$1 = this;
+ if ( createNewLexicalScope === void 0 ) createNewLexicalScope = true;
+
+ var node = this.startNode();
+ node.body = [];
+ this.expect(types.braceL);
+ if (createNewLexicalScope) {
+ this.enterLexicalScope();
+ }
+ while (!this.eat(types.braceR)) {
+ var stmt = this$1.parseStatement(true);
+ node.body.push(stmt);
+ }
+ if (createNewLexicalScope) {
+ this.exitLexicalScope();
+ }
+ 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$1.parseFor = function(node, init) {
+ node.init = init;
+ this.expect(types.semi);
+ node.test = this.type === types.semi ? null : this.parseExpression();
+ this.expect(types.semi);
+ node.update = this.type === types.parenR ? null : this.parseExpression();
+ this.expect(types.parenR);
+ this.exitLexicalScope();
+ 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$1.parseForIn = function(node, init) {
+ var type = this.type === types._in ? "ForInStatement" : "ForOfStatement";
+ this.next();
+ node.left = init;
+ node.right = this.parseExpression();
+ this.expect(types.parenR);
+ this.exitLexicalScope();
+ node.body = this.parseStatement(false);
+ this.labels.pop();
+ return this.finishNode(node, type)
+};
+
+// Parse a list of variable declarations.
+
+pp$1.parseVar = function(node, isFor, kind) {
+ var this$1 = this;
+
+ node.declarations = [];
+ node.kind = kind;
+ for (;;) {
+ var decl = this$1.startNode();
+ this$1.parseVarId(decl, kind);
+ if (this$1.eat(types.eq)) {
+ decl.init = this$1.parseMaybeAssign(isFor);
+ } else if (kind === "const" && !(this$1.type === types._in || (this$1.options.ecmaVersion >= 6 && this$1.isContextual("of")))) {
+ this$1.unexpected();
+ } else if (decl.id.type != "Identifier" && !(isFor && (this$1.type === types._in || this$1.isContextual("of")))) {
+ this$1.raise(this$1.lastTokEnd, "Complex binding patterns require an initialization value");
+ } else {
+ decl.init = null;
+ }
+ node.declarations.push(this$1.finishNode(decl, "VariableDeclarator"));
+ if (!this$1.eat(types.comma)) { break }
+ }
+ return node
+};
+
+pp$1.parseVarId = function(decl, kind) {
+ decl.id = this.parseBindingAtom(kind);
+ this.checkLVal(decl.id, kind, false);
+};
+
+// Parse a function declaration or literal (depending on the
+// `isStatement` parameter).
+
+pp$1.parseFunction = function(node, isStatement, allowExpressionBody, isAsync) {
+ this.initFunction(node);
+ if (this.options.ecmaVersion >= 6 && !isAsync)
+ { node.generator = this.eat(types.star); }
+ if (this.options.ecmaVersion >= 8)
+ { node.async = !!isAsync; }
+
+ if (isStatement) {
+ node.id = isStatement === "nullableID" && this.type != types.name ? null : this.parseIdent();
+ if (node.id) {
+ this.checkLVal(node.id, "var");
+ }
+ }
+
+ var oldInGen = this.inGenerator, oldInAsync = this.inAsync,
+ oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldInFunc = this.inFunction;
+ this.inGenerator = node.generator;
+ this.inAsync = node.async;
+ this.yieldPos = 0;
+ this.awaitPos = 0;
+ this.inFunction = true;
+ this.enterFunctionScope();
+
+ if (!isStatement)
+ { node.id = this.type == types.name ? this.parseIdent() : null; }
+
+ this.parseFunctionParams(node);
+ this.parseFunctionBody(node, allowExpressionBody);
+
+ this.inGenerator = oldInGen;
+ this.inAsync = oldInAsync;
+ this.yieldPos = oldYieldPos;
+ this.awaitPos = oldAwaitPos;
+ this.inFunction = oldInFunc;
+ return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression")
+};
+
+pp$1.parseFunctionParams = function(node) {
+ this.expect(types.parenL);
+ node.params = this.parseBindingList(types.parenR, false, this.options.ecmaVersion >= 8);
+ this.checkYieldAwaitInDefaultParams();
+};
+
+// Parse a class declaration or literal (depending on the
+// `isStatement` parameter).
+
+pp$1.parseClass = function(node, isStatement) {
+ var this$1 = this;
+
+ this.next();
+
+ this.parseClassId(node, isStatement);
+ this.parseClassSuper(node);
+ var classBody = this.startNode();
+ var hadConstructor = false;
+ classBody.body = [];
+ this.expect(types.braceL);
+ while (!this.eat(types.braceR)) {
+ if (this$1.eat(types.semi)) { continue }
+ var method = this$1.startNode();
+ var isGenerator = this$1.eat(types.star);
+ var isAsync = false;
+ var isMaybeStatic = this$1.type === types.name && this$1.value === "static";
+ this$1.parsePropertyName(method);
+ method.static = isMaybeStatic && this$1.type !== types.parenL;
+ if (method.static) {
+ if (isGenerator) { this$1.unexpected(); }
+ isGenerator = this$1.eat(types.star);
+ this$1.parsePropertyName(method);
+ }
+ if (this$1.options.ecmaVersion >= 8 && !isGenerator && !method.computed &&
+ method.key.type === "Identifier" && method.key.name === "async" && this$1.type !== types.parenL &&
+ !this$1.canInsertSemicolon()) {
+ isAsync = true;
+ this$1.parsePropertyName(method);
+ }
+ method.kind = "method";
+ var isGetSet = false;
+ if (!method.computed) {
+ var key = method.key;
+ if (!isGenerator && !isAsync && key.type === "Identifier" && this$1.type !== types.parenL && (key.name === "get" || key.name === "set")) {
+ isGetSet = true;
+ method.kind = key.name;
+ key = this$1.parsePropertyName(method);
+ }
+ if (!method.static && (key.type === "Identifier" && key.name === "constructor" ||
+ key.type === "Literal" && key.value === "constructor")) {
+ if (hadConstructor) { this$1.raise(key.start, "Duplicate constructor in the same class"); }
+ if (isGetSet) { this$1.raise(key.start, "Constructor can't have get/set modifier"); }
+ if (isGenerator) { this$1.raise(key.start, "Constructor can't be a generator"); }
+ if (isAsync) { this$1.raise(key.start, "Constructor can't be an async method"); }
+ method.kind = "constructor";
+ hadConstructor = true;
+ }
+ }
+ this$1.parseClassMethod(classBody, method, isGenerator, isAsync);
+ 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$1.raiseRecoverable(start, "getter should have no params"); }
+ else
+ { this$1.raiseRecoverable(start, "setter should have exactly one param"); }
+ } else {
+ if (method.kind === "set" && method.value.params[0].type === "RestElement")
+ { this$1.raiseRecoverable(method.value.params[0].start, "Setter cannot use rest params"); }
+ }
+ }
+ }
+ node.body = this.finishNode(classBody, "ClassBody");
+ return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression")
+};
+
+pp$1.parseClassMethod = function(classBody, method, isGenerator, isAsync) {
+ method.value = this.parseMethod(isGenerator, isAsync);
+ classBody.body.push(this.finishNode(method, "MethodDefinition"));
+};
+
+pp$1.parseClassId = function(node, isStatement) {
+ node.id = this.type === types.name ? this.parseIdent() : isStatement === true ? this.unexpected() : null;
+};
+
+pp$1.parseClassSuper = function(node) {
+ node.superClass = this.eat(types._extends) ? this.parseExprSubscripts() : null;
+};
+
+// Parses module export declaration.
+
+pp$1.parseExport = function(node, exports) {
+ var this$1 = this;
+
+ this.next();
+ // export * from '...'
+ if (this.eat(types.star)) {
+ this.expectContextual("from");
+ node.source = this.type === types.string ? this.parseExprAtom() : this.unexpected();
+ this.semicolon();
+ return this.finishNode(node, "ExportAllDeclaration")
+ }
+ if (this.eat(types._default)) { // export default ...
+ this.checkExport(exports, "default", this.lastTokStart);
+ var isAsync;
+ if (this.type === types._function || (isAsync = this.isAsyncFunction())) {
+ var fNode = this.startNode();
+ this.next();
+ if (isAsync) { this.next(); }
+ node.declaration = this.parseFunction(fNode, "nullableID", false, isAsync);
+ } else if (this.type === types._class) {
+ var cNode = this.startNode();
+ node.declaration = this.parseClass(cNode, "nullableID");
+ } else {
+ node.declaration = this.parseMaybeAssign();
+ this.semicolon();
+ }
+ return this.finishNode(node, "ExportDefaultDeclaration")
+ }
+ // export var|const|let|function|class ...
+ if (this.shouldParseExportStatement()) {
+ node.declaration = this.parseStatement(true);
+ if (node.declaration.type === "VariableDeclaration")
+ { this.checkVariableExport(exports, node.declaration.declarations); }
+ else
+ { this.checkExport(exports, node.declaration.id.name, node.declaration.id.start); }
+ node.specifiers = [];
+ node.source = null;
+ } else { // export { x, y as z } [from '...']
+ node.declaration = null;
+ node.specifiers = this.parseExportSpecifiers(exports);
+ if (this.eatContextual("from")) {
+ node.source = this.type === types.string ? this.parseExprAtom() : this.unexpected();
+ } else {
+ // check for keywords used as local names
+ for (var i = 0, list = node.specifiers; i < list.length; i += 1) {
+ var spec = list[i];
+
+ this$1.checkUnreserved(spec.local);
+ }
+
+ node.source = null;
+ }
+ this.semicolon();
+ }
+ return this.finishNode(node, "ExportNamedDeclaration")
+};
+
+pp$1.checkExport = function(exports, name, pos) {
+ if (!exports) { return }
+ if (has(exports, name))
+ { this.raiseRecoverable(pos, "Duplicate export '" + name + "'"); }
+ exports[name] = true;
+};
+
+pp$1.checkPatternExport = function(exports, pat) {
+ var this$1 = this;
+
+ var type = pat.type;
+ if (type == "Identifier")
+ { this.checkExport(exports, pat.name, pat.start); }
+ else if (type == "ObjectPattern")
+ { for (var i = 0, list = pat.properties; i < list.length; i += 1)
+ {
+ var prop = list[i];
+
+ this$1.checkPatternExport(exports, prop.value);
+ } }
+ else if (type == "ArrayPattern")
+ { for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) {
+ var elt = list$1[i$1];
+
+ if (elt) { this$1.checkPatternExport(exports, elt); }
+ } }
+ else if (type == "AssignmentPattern")
+ { this.checkPatternExport(exports, pat.left); }
+ else if (type == "ParenthesizedExpression")
+ { this.checkPatternExport(exports, pat.expression); }
+};
+
+pp$1.checkVariableExport = function(exports, decls) {
+ var this$1 = this;
+
+ if (!exports) { return }
+ for (var i = 0, list = decls; i < list.length; i += 1)
+ {
+ var decl = list[i];
+
+ this$1.checkPatternExport(exports, decl.id);
+ }
+};
+
+pp$1.shouldParseExportStatement = function() {
+ return this.type.keyword === "var" ||
+ this.type.keyword === "const" ||
+ this.type.keyword === "class" ||
+ this.type.keyword === "function" ||
+ this.isLet() ||
+ this.isAsyncFunction()
+};
+
+// Parses a comma-separated list of module exports.
+
+pp$1.parseExportSpecifiers = function(exports) {
+ var this$1 = this;
+
+ var nodes = [], first = true;
+ // export { x, y as z } [from '...']
+ this.expect(types.braceL);
+ while (!this.eat(types.braceR)) {
+ if (!first) {
+ this$1.expect(types.comma);
+ if (this$1.afterTrailingComma(types.braceR)) { break }
+ } else { first = false; }
+
+ var node = this$1.startNode();
+ node.local = this$1.parseIdent(true);
+ node.exported = this$1.eatContextual("as") ? this$1.parseIdent(true) : node.local;
+ this$1.checkExport(exports, node.exported.name, node.exported.start);
+ nodes.push(this$1.finishNode(node, "ExportSpecifier"));
+ }
+ return nodes
+};
+
+// Parses import declaration.
+
+pp$1.parseImport = function(node) {
+ this.next();
+ // import '...'
+ if (this.type === types.string) {
+ node.specifiers = empty;
+ node.source = this.parseExprAtom();
+ } else {
+ node.specifiers = this.parseImportSpecifiers();
+ this.expectContextual("from");
+ node.source = this.type === types.string ? this.parseExprAtom() : this.unexpected();
+ }
+ this.semicolon();
+ return this.finishNode(node, "ImportDeclaration")
+};
+
+// Parses a comma-separated list of module imports.
+
+pp$1.parseImportSpecifiers = function() {
+ var this$1 = this;
+
+ var nodes = [], first = true;
+ if (this.type === types.name) {
+ // import defaultObj, { x, y as z } from '...'
+ var node = this.startNode();
+ node.local = this.parseIdent();
+ this.checkLVal(node.local, "let");
+ nodes.push(this.finishNode(node, "ImportDefaultSpecifier"));
+ if (!this.eat(types.comma)) { return nodes }
+ }
+ if (this.type === types.star) {
+ var node$1 = this.startNode();
+ this.next();
+ this.expectContextual("as");
+ node$1.local = this.parseIdent();
+ this.checkLVal(node$1.local, "let");
+ nodes.push(this.finishNode(node$1, "ImportNamespaceSpecifier"));
+ return nodes
+ }
+ this.expect(types.braceL);
+ while (!this.eat(types.braceR)) {
+ if (!first) {
+ this$1.expect(types.comma);
+ if (this$1.afterTrailingComma(types.braceR)) { break }
+ } else { first = false; }
+
+ var node$2 = this$1.startNode();
+ node$2.imported = this$1.parseIdent(true);
+ if (this$1.eatContextual("as")) {
+ node$2.local = this$1.parseIdent();
+ } else {
+ this$1.checkUnreserved(node$2.imported);
+ node$2.local = node$2.imported;
+ }
+ this$1.checkLVal(node$2.local, "let");
+ nodes.push(this$1.finishNode(node$2, "ImportSpecifier"));
+ }
+ return nodes
+};
+
+// Set `ExpressionStatement#directive` property for directive prologues.
+pp$1.adaptDirectivePrologue = function(statements) {
+ for (var i = 0; i < statements.length && this.isDirectiveCandidate(statements[i]); ++i) {
+ statements[i].directive = statements[i].expression.raw.slice(1, -1);
+ }
+};
+pp$1.isDirectiveCandidate = function(statement) {
+ return (
+ statement.type === "ExpressionStatement" &&
+ statement.expression.type === "Literal" &&
+ typeof statement.expression.value === "string" &&
+ // Reject parenthesized strings.
+ (this.input[statement.start] === "\"" || this.input[statement.start] === "'")
+ )
+};
+
+var pp$2 = Parser.prototype;
+
+// Convert existing expression atom to assignable pattern
+// if possible.
+
+pp$2.toAssignable = function(node, isBinding) {
+ var this$1 = this;
+
+ if (this.options.ecmaVersion >= 6 && node) {
+ switch (node.type) {
+ case "Identifier":
+ if (this.inAsync && node.name === "await")
+ { this.raise(node.start, "Can not use 'await' as identifier inside an async function"); }
+ break
+
+ case "ObjectPattern":
+ case "ArrayPattern":
+ break
+
+ case "ObjectExpression":
+ node.type = "ObjectPattern";
+ for (var i = 0, list = node.properties; i < list.length; i += 1) {
+ var prop = list[i];
+
+ if (prop.kind !== "init") { this$1.raise(prop.key.start, "Object pattern can't contain getter or setter"); }
+ this$1.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;
+ this.toAssignable(node.left, isBinding);
+ // falls through to AssignmentPattern
+ } else {
+ this.raise(node.left.end, "Only '=' operator can be used for specifying default value.");
+ break
+ }
+
+ case "AssignmentPattern":
+ break
+
+ case "ParenthesizedExpression":
+ 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$2.toAssignableList = function(exprList, isBinding) {
+ var this$1 = this;
+
+ 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);
+ --end;
+ }
+
+ if (this.options.ecmaVersion === 6 && isBinding && last && 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$1.toAssignable(elt, isBinding); }
+ }
+ return exprList
+};
+
+// Parses spread element.
+
+pp$2.parseSpread = function(refDestructuringErrors) {
+ var node = this.startNode();
+ this.next();
+ node.argument = this.parseMaybeAssign(false, refDestructuringErrors);
+ return this.finishNode(node, "SpreadElement")
+};
+
+pp$2.parseRestBinding = function() {
+ var node = this.startNode();
+ this.next();
+
+ // RestElement inside of a function parameter must be an identifier
+ if (this.options.ecmaVersion === 6 && this.type !== types.name)
+ { this.unexpected(); }
+
+ node.argument = this.parseBindingAtom();
+
+ return this.finishNode(node, "RestElement")
+};
+
+// Parses lvalue (assignable) atom.
+
+pp$2.parseBindingAtom = function() {
+ if (this.options.ecmaVersion >= 6) {
+ switch (this.type) {
+ case types.bracketL:
+ var node = this.startNode();
+ this.next();
+ node.elements = this.parseBindingList(types.bracketR, true, true);
+ return this.finishNode(node, "ArrayPattern")
+
+ case types.braceL:
+ return this.parseObj(true)
+ }
+ }
+ return this.parseIdent()
+};
+
+pp$2.parseBindingList = function(close, allowEmpty, allowTrailingComma) {
+ var this$1 = this;
+
+ var elts = [], first = true;
+ while (!this.eat(close)) {
+ if (first) { first = false; }
+ else { this$1.expect(types.comma); }
+ if (allowEmpty && this$1.type === types.comma) {
+ elts.push(null);
+ } else if (allowTrailingComma && this$1.afterTrailingComma(close)) {
+ break
+ } else if (this$1.type === types.ellipsis) {
+ var rest = this$1.parseRestBinding();
+ this$1.parseBindingListItem(rest);
+ elts.push(rest);
+ if (this$1.type === types.comma) { this$1.raise(this$1.start, "Comma is not permitted after the rest element"); }
+ this$1.expect(close);
+ break
+ } else {
+ var elem = this$1.parseMaybeDefault(this$1.start, this$1.startLoc);
+ this$1.parseBindingListItem(elem);
+ elts.push(elem);
+ }
+ }
+ return elts
+};
+
+pp$2.parseBindingListItem = function(param) {
+ return param
+};
+
+// Parses assignment pattern around given atom if possible.
+
+pp$2.parseMaybeDefault = function(startPos, startLoc, left) {
+ left = left || this.parseBindingAtom();
+ if (this.options.ecmaVersion < 6 || !this.eat(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.
+// bindingType can be either:
+// 'var' indicating that the lval creates a 'var' binding
+// 'let' indicating that the lval creates a lexical ('let' or 'const') binding
+// 'none' indicating that the binding should be checked for illegal identifiers, but not for duplicate references
+
+pp$2.checkLVal = function(expr, bindingType, checkClashes) {
+ var this$1 = this;
+
+ switch (expr.type) {
+ case "Identifier":
+ if (this.strict && this.reservedWordsStrictBind.test(expr.name))
+ { this.raiseRecoverable(expr.start, (bindingType ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); }
+ if (checkClashes) {
+ if (has(checkClashes, expr.name))
+ { this.raiseRecoverable(expr.start, "Argument name clash"); }
+ checkClashes[expr.name] = true;
+ }
+ if (bindingType && bindingType !== "none") {
+ if (
+ bindingType === "var" && !this.canDeclareVarName(expr.name) ||
+ bindingType !== "var" && !this.canDeclareLexicalName(expr.name)
+ ) {
+ this.raiseRecoverable(expr.start, ("Identifier '" + (expr.name) + "' has already been declared"));
+ }
+ if (bindingType === "var") {
+ this.declareVarName(expr.name);
+ } else {
+ this.declareLexicalName(expr.name);
+ }
+ }
+ break
+
+ case "MemberExpression":
+ if (bindingType) { this.raiseRecoverable(expr.start, (bindingType ? "Binding" : "Assigning to") + " member expression"); }
+ break
+
+ case "ObjectPattern":
+ for (var i = 0, list = expr.properties; i < list.length; i += 1)
+ {
+ var prop = list[i];
+
+ this$1.checkLVal(prop.value, bindingType, checkClashes);
+ }
+ break
+
+ case "ArrayPattern":
+ for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) {
+ var elem = list$1[i$1];
+
+ if (elem) { this$1.checkLVal(elem, bindingType, checkClashes); }
+ }
+ break
+
+ case "AssignmentPattern":
+ this.checkLVal(expr.left, bindingType, checkClashes);
+ break
+
+ case "RestElement":
+ this.checkLVal(expr.argument, bindingType, checkClashes);
+ break
+
+ case "ParenthesizedExpression":
+ this.checkLVal(expr.expression, bindingType, checkClashes);
+ break
+
+ default:
+ this.raise(expr.start, (bindingType ? "Binding" : "Assigning to") + " rvalue");
+ }
+};
+
+// 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
+
+var pp$3 = 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$3.checkPropClash = function(prop, propHash) {
+ if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand))
+ { return }
+ var key = prop.key;
+ var name;
+ 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.raiseRecoverable(key.start, "Redefinition of __proto__ property"); }
+ propHash.proto = true;
+ }
+ return
+ }
+ name = "$" + name;
+ var other = propHash[name];
+ if (other) {
+ var redefinition;
+ if (kind === "init") {
+ redefinition = this.strict && other.init || other.get || other.set;
+ } else {
+ redefinition = other.init || other[kind];
+ }
+ if (redefinition)
+ { this.raiseRecoverable(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$3.parseExpression = function(noIn, refDestructuringErrors) {
+ var this$1 = this;
+
+ var startPos = this.start, startLoc = this.startLoc;
+ var expr = this.parseMaybeAssign(noIn, refDestructuringErrors);
+ if (this.type === types.comma) {
+ var node = this.startNodeAt(startPos, startLoc);
+ node.expressions = [expr];
+ while (this.eat(types.comma)) { node.expressions.push(this$1.parseMaybeAssign(noIn, refDestructuringErrors)); }
+ return this.finishNode(node, "SequenceExpression")
+ }
+ return expr
+};
+
+// Parse an assignment expression. This includes applications of
+// operators like `+=`.
+
+pp$3.parseMaybeAssign = function(noIn, refDestructuringErrors, afterLeftParse) {
+ if (this.inGenerator && this.isContextual("yield")) { return this.parseYield() }
+
+ var ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1;
+ if (refDestructuringErrors) {
+ oldParenAssign = refDestructuringErrors.parenthesizedAssign;
+ oldTrailingComma = refDestructuringErrors.trailingComma;
+ refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = -1;
+ } else {
+ refDestructuringErrors = new DestructuringErrors;
+ ownDestructuringErrors = true;
+ }
+
+ var startPos = this.start, startLoc = this.startLoc;
+ if (this.type == types.parenL || this.type == 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) {
+ this.checkPatternErrors(refDestructuringErrors, true);
+ if (!ownDestructuringErrors) { DestructuringErrors.call(refDestructuringErrors); }
+ var node = this.startNodeAt(startPos, startLoc);
+ node.operator = this.value;
+ node.left = this.type === types.eq ? this.toAssignable(left) : left;
+ refDestructuringErrors.shorthandAssign = -1; // reset because shorthand default was used correctly
+ this.checkLVal(left);
+ this.next();
+ node.right = this.parseMaybeAssign(noIn);
+ return this.finishNode(node, "AssignmentExpression")
+ } else {
+ if (ownDestructuringErrors) { this.checkExpressionErrors(refDestructuringErrors, true); }
+ }
+ if (oldParenAssign > -1) { refDestructuringErrors.parenthesizedAssign = oldParenAssign; }
+ if (oldTrailingComma > -1) { refDestructuringErrors.trailingComma = oldTrailingComma; }
+ return left
+};
+
+// Parse a ternary conditional (`?:`) operator.
+
+pp$3.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(types.question)) {
+ var node = this.startNodeAt(startPos, startLoc);
+ node.test = expr;
+ node.consequent = this.parseMaybeAssign();
+ this.expect(types.colon);
+ node.alternate = this.parseMaybeAssign(noIn);
+ return this.finishNode(node, "ConditionalExpression")
+ }
+ return expr
+};
+
+// Start the precedence parser.
+
+pp$3.parseExprOps = function(noIn, refDestructuringErrors) {
+ var startPos = this.start, startLoc = this.startLoc;
+ var expr = this.parseMaybeUnary(refDestructuringErrors, false);
+ if (this.checkExpressionErrors(refDestructuringErrors)) { return expr }
+ return expr.start == startPos && expr.type === "ArrowFunctionExpression" ? expr : 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$3.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, noIn) {
+ var prec = this.type.binop;
+ if (prec != null && (!noIn || this.type !== types._in)) {
+ if (prec > minPrec) {
+ var logical = this.type === types.logicalOR || this.type === types.logicalAND;
+ var op = this.value;
+ this.next();
+ var startPos = this.start, startLoc = this.startLoc;
+ var right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, noIn);
+ var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical);
+ return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn)
+ }
+ }
+ return left
+};
+
+pp$3.buildBinary = function(startPos, startLoc, left, right, op, logical) {
+ var node = this.startNodeAt(startPos, startLoc);
+ node.left = left;
+ node.operator = op;
+ node.right = right;
+ return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression")
+};
+
+// Parse unary operators, both prefix and postfix.
+
+pp$3.parseMaybeUnary = function(refDestructuringErrors, sawUnary) {
+ var this$1 = this;
+
+ var startPos = this.start, startLoc = this.startLoc, expr;
+ if (this.inAsync && this.isContextual("await")) {
+ expr = this.parseAwait();
+ sawUnary = true;
+ } else if (this.type.prefix) {
+ var node = this.startNode(), update = this.type === types.incDec;
+ node.operator = this.value;
+ node.prefix = true;
+ this.next();
+ node.argument = this.parseMaybeUnary(null, true);
+ this.checkExpressionErrors(refDestructuringErrors, true);
+ if (update) { this.checkLVal(node.argument); }
+ else if (this.strict && node.operator === "delete" &&
+ node.argument.type === "Identifier")
+ { this.raiseRecoverable(node.start, "Deleting local variable in strict mode"); }
+ else { sawUnary = true; }
+ expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression");
+ } else {
+ expr = this.parseExprSubscripts(refDestructuringErrors);
+ if (this.checkExpressionErrors(refDestructuringErrors)) { return expr }
+ while (this.type.postfix && !this.canInsertSemicolon()) {
+ var node$1 = this$1.startNodeAt(startPos, startLoc);
+ node$1.operator = this$1.value;
+ node$1.prefix = false;
+ node$1.argument = expr;
+ this$1.checkLVal(expr);
+ this$1.next();
+ expr = this$1.finishNode(node$1, "UpdateExpression");
+ }
+ }
+
+ if (!sawUnary && this.eat(types.starstar))
+ { return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false), "**", false) }
+ else
+ { return expr }
+};
+
+// Parse call, dot, and `[]`-subscript expressions.
+
+pp$3.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 }
+ var result = this.parseSubscripts(expr, startPos, startLoc);
+ if (refDestructuringErrors && result.type === "MemberExpression") {
+ if (refDestructuringErrors.parenthesizedAssign >= result.start) { refDestructuringErrors.parenthesizedAssign = -1; }
+ if (refDestructuringErrors.parenthesizedBind >= result.start) { refDestructuringErrors.parenthesizedBind = -1; }
+ }
+ return result
+};
+
+pp$3.parseSubscripts = function(base, startPos, startLoc, noCalls) {
+ var this$1 = this;
+
+ var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" &&
+ this.lastTokEnd == base.end && !this.canInsertSemicolon();
+ for (var computed = (void 0);;) {
+ if ((computed = this$1.eat(types.bracketL)) || this$1.eat(types.dot)) {
+ var node = this$1.startNodeAt(startPos, startLoc);
+ node.object = base;
+ node.property = computed ? this$1.parseExpression() : this$1.parseIdent(true);
+ node.computed = !!computed;
+ if (computed) { this$1.expect(types.bracketR); }
+ base = this$1.finishNode(node, "MemberExpression");
+ } else if (!noCalls && this$1.eat(types.parenL)) {
+ var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this$1.yieldPos, oldAwaitPos = this$1.awaitPos;
+ this$1.yieldPos = 0;
+ this$1.awaitPos = 0;
+ var exprList = this$1.parseExprList(types.parenR, this$1.options.ecmaVersion >= 8, false, refDestructuringErrors);
+ if (maybeAsyncArrow && !this$1.canInsertSemicolon() && this$1.eat(types.arrow)) {
+ this$1.checkPatternErrors(refDestructuringErrors, false);
+ this$1.checkYieldAwaitInDefaultParams();
+ this$1.yieldPos = oldYieldPos;
+ this$1.awaitPos = oldAwaitPos;
+ return this$1.parseArrowExpression(this$1.startNodeAt(startPos, startLoc), exprList, true)
+ }
+ this$1.checkExpressionErrors(refDestructuringErrors, true);
+ this$1.yieldPos = oldYieldPos || this$1.yieldPos;
+ this$1.awaitPos = oldAwaitPos || this$1.awaitPos;
+ var node$1 = this$1.startNodeAt(startPos, startLoc);
+ node$1.callee = base;
+ node$1.arguments = exprList;
+ base = this$1.finishNode(node$1, "CallExpression");
+ } else if (this$1.type === types.backQuote) {
+ var node$2 = this$1.startNodeAt(startPos, startLoc);
+ node$2.tag = base;
+ node$2.quasi = this$1.parseTemplate({isTagged: true});
+ base = this$1.finishNode(node$2, "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$3.parseExprAtom = function(refDestructuringErrors) {
+ var node, canBeArrow = this.potentialArrowAt == this.start;
+ switch (this.type) {
+ case types._super:
+ if (!this.inFunction)
+ { this.raise(this.start, "'super' outside of function or class"); }
+ node = this.startNode();
+ this.next();
+ // The `super` keyword can appear at below:
+ // SuperProperty:
+ // super [ Expression ]
+ // super . IdentifierName
+ // SuperCall:
+ // super Arguments
+ if (this.type !== types.dot && this.type !== types.bracketL && this.type !== types.parenL)
+ { this.unexpected(); }
+ return this.finishNode(node, "Super")
+
+ case types._this:
+ node = this.startNode();
+ this.next();
+ return this.finishNode(node, "ThisExpression")
+
+ case types.name:
+ var startPos = this.start, startLoc = this.startLoc;
+ var id = this.parseIdent(this.type !== types.name);
+ if (this.options.ecmaVersion >= 8 && id.name === "async" && !this.canInsertSemicolon() && this.eat(types._function))
+ { return this.parseFunction(this.startNodeAt(startPos, startLoc), false, false, true) }
+ if (canBeArrow && !this.canInsertSemicolon()) {
+ if (this.eat(types.arrow))
+ { return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false) }
+ if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === types.name) {
+ id = this.parseIdent();
+ if (this.canInsertSemicolon() || !this.eat(types.arrow))
+ { this.unexpected(); }
+ return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true)
+ }
+ }
+ return id
+
+ case types.regexp:
+ var value = this.value;
+ node = this.parseLiteral(value.value);
+ node.regex = {pattern: value.pattern, flags: value.flags};
+ return node
+
+ case types.num: case types.string:
+ return this.parseLiteral(this.value)
+
+ case types._null: case types._true: case types._false:
+ node = this.startNode();
+ node.value = this.type === types._null ? null : this.type === types._true;
+ node.raw = this.type.keyword;
+ this.next();
+ return this.finishNode(node, "Literal")
+
+ case types.parenL:
+ var start = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow);
+ if (refDestructuringErrors) {
+ if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr))
+ { refDestructuringErrors.parenthesizedAssign = start; }
+ if (refDestructuringErrors.parenthesizedBind < 0)
+ { refDestructuringErrors.parenthesizedBind = start; }
+ }
+ return expr
+
+ case types.bracketL:
+ node = this.startNode();
+ this.next();
+ node.elements = this.parseExprList(types.bracketR, true, true, refDestructuringErrors);
+ return this.finishNode(node, "ArrayExpression")
+
+ case types.braceL:
+ return this.parseObj(false, refDestructuringErrors)
+
+ case types._function:
+ node = this.startNode();
+ this.next();
+ return this.parseFunction(node, false)
+
+ case types._class:
+ return this.parseClass(this.startNode(), false)
+
+ case types._new:
+ return this.parseNew()
+
+ case types.backQuote:
+ return this.parseTemplate()
+
+ default:
+ this.unexpected();
+ }
+};
+
+pp$3.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$3.parseParenExpression = function() {
+ this.expect(types.parenL);
+ var val = this.parseExpression();
+ this.expect(types.parenR);
+ return val
+};
+
+pp$3.parseParenAndDistinguishExpression = function(canBeArrow) {
+ var this$1 = this;
+
+ var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8;
+ if (this.options.ecmaVersion >= 6) {
+ this.next();
+
+ var innerStartPos = this.start, innerStartLoc = this.startLoc;
+ var exprList = [], first = true, lastIsComma = false;
+ var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart, innerParenStart;
+ this.yieldPos = 0;
+ this.awaitPos = 0;
+ while (this.type !== types.parenR) {
+ first ? first = false : this$1.expect(types.comma);
+ if (allowTrailingComma && this$1.afterTrailingComma(types.parenR, true)) {
+ lastIsComma = true;
+ break
+ } else if (this$1.type === types.ellipsis) {
+ spreadStart = this$1.start;
+ exprList.push(this$1.parseParenItem(this$1.parseRestBinding()));
+ if (this$1.type === types.comma) { this$1.raise(this$1.start, "Comma is not permitted after the rest element"); }
+ break
+ } else {
+ if (this$1.type === types.parenL && !innerParenStart) {
+ innerParenStart = this$1.start;
+ }
+ exprList.push(this$1.parseMaybeAssign(false, refDestructuringErrors, this$1.parseParenItem));
+ }
+ }
+ var innerEndPos = this.start, innerEndLoc = this.startLoc;
+ this.expect(types.parenR);
+
+ if (canBeArrow && !this.canInsertSemicolon() && this.eat(types.arrow)) {
+ this.checkPatternErrors(refDestructuringErrors, false);
+ this.checkYieldAwaitInDefaultParams();
+ if (innerParenStart) { this.unexpected(innerParenStart); }
+ this.yieldPos = oldYieldPos;
+ this.awaitPos = oldAwaitPos;
+ return this.parseParenArrowList(startPos, startLoc, exprList)
+ }
+
+ if (!exprList.length || lastIsComma) { this.unexpected(this.lastTokStart); }
+ if (spreadStart) { this.unexpected(spreadStart); }
+ this.checkExpressionErrors(refDestructuringErrors, true);
+ this.yieldPos = oldYieldPos || this.yieldPos;
+ this.awaitPos = oldAwaitPos || this.awaitPos;
+
+ 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$3.parseParenItem = function(item) {
+ return item
+};
+
+pp$3.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$1 = [];
+
+pp$3.parseNew = function() {
+ var node = this.startNode();
+ var meta = this.parseIdent(true);
+ if (this.options.ecmaVersion >= 6 && this.eat(types.dot)) {
+ node.meta = meta;
+ node.property = this.parseIdent(true);
+ if (node.property.name !== "target")
+ { this.raiseRecoverable(node.property.start, "The only valid meta property for new is new.target"); }
+ if (!this.inFunction)
+ { this.raiseRecoverable(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(types.parenL)) { node.arguments = this.parseExprList(types.parenR, this.options.ecmaVersion >= 8, false); }
+ else { node.arguments = empty$1; }
+ return this.finishNode(node, "NewExpression")
+};
+
+// Parse template expression.
+
+pp$3.parseTemplateElement = function(ref) {
+ var isTagged = ref.isTagged;
+
+ var elem = this.startNode();
+ if (this.type === types.invalidTemplate) {
+ if (!isTagged) {
+ this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal");
+ }
+ elem.value = {
+ raw: this.value,
+ cooked: null
+ };
+ } else {
+ elem.value = {
+ raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"),
+ cooked: this.value
+ };
+ }
+ this.next();
+ elem.tail = this.type === types.backQuote;
+ return this.finishNode(elem, "TemplateElement")
+};
+
+pp$3.parseTemplate = function(ref) {
+ var this$1 = this;
+ if ( ref === void 0 ) ref = {};
+ var isTagged = ref.isTagged; if ( isTagged === void 0 ) isTagged = false;
+
+ var node = this.startNode();
+ this.next();
+ node.expressions = [];
+ var curElt = this.parseTemplateElement({isTagged: isTagged});
+ node.quasis = [curElt];
+ while (!curElt.tail) {
+ this$1.expect(types.dollarBraceL);
+ node.expressions.push(this$1.parseExpression());
+ this$1.expect(types.braceR);
+ node.quasis.push(curElt = this$1.parseTemplateElement({isTagged: isTagged}));
+ }
+ this.next();
+ return this.finishNode(node, "TemplateLiteral")
+};
+
+pp$3.isAsyncProp = function(prop) {
+ return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" &&
+ (this.type === types.name || this.type === types.num || this.type === types.string || this.type === types.bracketL || this.type.keyword) &&
+ !lineBreak.test(this.input.slice(this.lastTokEnd, this.start))
+};
+
+// Parse an object literal or binding pattern.
+
+pp$3.parseObj = function(isPattern, refDestructuringErrors) {
+ var this$1 = this;
+
+ var node = this.startNode(), first = true, propHash = {};
+ node.properties = [];
+ this.next();
+ while (!this.eat(types.braceR)) {
+ if (!first) {
+ this$1.expect(types.comma);
+ if (this$1.afterTrailingComma(types.braceR)) { break }
+ } else { first = false; }
+
+ var prop = this$1.parseProperty(isPattern, refDestructuringErrors);
+ this$1.checkPropClash(prop, propHash);
+ node.properties.push(prop);
+ }
+ return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression")
+};
+
+pp$3.parseProperty = function(isPattern, refDestructuringErrors) {
+ var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc;
+ 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(types.star); }
+ }
+ this.parsePropertyName(prop);
+ if (!isPattern && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) {
+ isAsync = true;
+ this.parsePropertyName(prop, refDestructuringErrors);
+ } else {
+ isAsync = false;
+ }
+ this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors);
+ return this.finishNode(prop, "Property")
+};
+
+pp$3.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors) {
+ if ((isGenerator || isAsync) && this.type === types.colon)
+ { this.unexpected(); }
+
+ if (this.eat(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 === types.parenL) {
+ if (isPattern) { this.unexpected(); }
+ prop.kind = "init";
+ prop.method = true;
+ prop.value = this.parseMethod(isGenerator, isAsync);
+ } else if (!isPattern &&
+ this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" &&
+ (prop.key.name === "get" || prop.key.name === "set") &&
+ (this.type != types.comma && this.type != types.braceR)) {
+ if (isGenerator || isAsync) { 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.raiseRecoverable(start, "getter should have no params"); }
+ else
+ { this.raiseRecoverable(start, "setter should have exactly one param"); }
+ } else {
+ if (prop.kind === "set" && prop.value.params[0].type === "RestElement")
+ { this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params"); }
+ }
+ } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") {
+ this.checkUnreserved(prop.key);
+ prop.kind = "init";
+ if (isPattern) {
+ prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key);
+ } else if (this.type === types.eq && refDestructuringErrors) {
+ if (refDestructuringErrors.shorthandAssign < 0)
+ { refDestructuringErrors.shorthandAssign = this.start; }
+ prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key);
+ } else {
+ prop.value = prop.key;
+ }
+ prop.shorthand = true;
+ } else { this.unexpected(); }
+};
+
+pp$3.parsePropertyName = function(prop) {
+ if (this.options.ecmaVersion >= 6) {
+ if (this.eat(types.bracketL)) {
+ prop.computed = true;
+ prop.key = this.parseMaybeAssign();
+ this.expect(types.bracketR);
+ return prop.key
+ } else {
+ prop.computed = false;
+ }
+ }
+ return prop.key = this.type === types.num || this.type === types.string ? this.parseExprAtom() : this.parseIdent(true)
+};
+
+// Initialize empty function node.
+
+pp$3.initFunction = function(node) {
+ node.id = null;
+ if (this.options.ecmaVersion >= 6) {
+ node.generator = false;
+ node.expression = false;
+ }
+ if (this.options.ecmaVersion >= 8)
+ { node.async = false; }
+};
+
+// Parse object or class method.
+
+pp$3.parseMethod = function(isGenerator, isAsync) {
+ var node = this.startNode(), oldInGen = this.inGenerator, oldInAsync = this.inAsync,
+ oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldInFunc = this.inFunction;
+
+ this.initFunction(node);
+ if (this.options.ecmaVersion >= 6)
+ { node.generator = isGenerator; }
+ if (this.options.ecmaVersion >= 8)
+ { node.async = !!isAsync; }
+
+ this.inGenerator = node.generator;
+ this.inAsync = node.async;
+ this.yieldPos = 0;
+ this.awaitPos = 0;
+ this.inFunction = true;
+ this.enterFunctionScope();
+
+ this.expect(types.parenL);
+ node.params = this.parseBindingList(types.parenR, false, this.options.ecmaVersion >= 8);
+ this.checkYieldAwaitInDefaultParams();
+ this.parseFunctionBody(node, false);
+
+ this.inGenerator = oldInGen;
+ this.inAsync = oldInAsync;
+ this.yieldPos = oldYieldPos;
+ this.awaitPos = oldAwaitPos;
+ this.inFunction = oldInFunc;
+ return this.finishNode(node, "FunctionExpression")
+};
+
+// Parse arrow function expression with given parameters.
+
+pp$3.parseArrowExpression = function(node, params, isAsync) {
+ var oldInGen = this.inGenerator, oldInAsync = this.inAsync,
+ oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldInFunc = this.inFunction;
+
+ this.enterFunctionScope();
+ this.initFunction(node);
+ if (this.options.ecmaVersion >= 8)
+ { node.async = !!isAsync; }
+
+ this.inGenerator = false;
+ this.inAsync = node.async;
+ this.yieldPos = 0;
+ this.awaitPos = 0;
+ this.inFunction = true;
+
+ node.params = this.toAssignableList(params, true);
+ this.parseFunctionBody(node, true);
+
+ this.inGenerator = oldInGen;
+ this.inAsync = oldInAsync;
+ this.yieldPos = oldYieldPos;
+ this.awaitPos = oldAwaitPos;
+ this.inFunction = oldInFunc;
+ return this.finishNode(node, "ArrowFunctionExpression")
+};
+
+// Parse function body and check parameters.
+
+pp$3.parseFunctionBody = function(node, isArrowFunction) {
+ var isExpression = isArrowFunction && this.type !== types.braceL;
+ var oldStrict = this.strict, useStrict = false;
+
+ if (isExpression) {
+ node.body = this.parseMaybeAssign();
+ node.expression = true;
+ this.checkParams(node, false);
+ } else {
+ var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params);
+ if (!oldStrict || nonSimple) {
+ useStrict = this.strictDirective(this.end);
+ // 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 (useStrict && nonSimple)
+ { this.raiseRecoverable(node.start, "Illegal 'use strict' directive in function with non-simple parameter list"); }
+ }
+ // Start a new scope with regard to labels and the `inFunction`
+ // flag (restore them to their old value afterwards).
+ var oldLabels = this.labels;
+ this.labels = [];
+ if (useStrict) { this.strict = true; }
+
+ // Add the params to varDeclaredNames to ensure that an error is thrown
+ // if a let/const declaration in the function clashes with one of the params.
+ this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && this.isSimpleParamList(node.params));
+ node.body = this.parseBlock(false);
+ node.expression = false;
+ this.adaptDirectivePrologue(node.body.body);
+ this.labels = oldLabels;
+ }
+ this.exitFunctionScope();
+
+ if (this.strict && node.id) {
+ // Ensure the function name isn't a forbidden identifier in strict mode, e.g. 'eval'
+ this.checkLVal(node.id, "none");
+ }
+ this.strict = oldStrict;
+};
+
+pp$3.isSimpleParamList = function(params) {
+ for (var i = 0, list = params; i < list.length; i += 1)
+ {
+ var param = list[i];
+
+ if (param.type !== "Identifier") { return false
+ } }
+ return true
+};
+
+// Checks function params for various disallowed patterns such as using "eval"
+// or "arguments" and duplicate parameters.
+
+pp$3.checkParams = function(node, allowDuplicates) {
+ var this$1 = this;
+
+ var nameHash = {};
+ for (var i = 0, list = node.params; i < list.length; i += 1)
+ {
+ var param = list[i];
+
+ this$1.checkLVal(param, "var", allowDuplicates ? null : 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$3.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) {
+ var this$1 = this;
+
+ var elts = [], first = true;
+ while (!this.eat(close)) {
+ if (!first) {
+ this$1.expect(types.comma);
+ if (allowTrailingComma && this$1.afterTrailingComma(close)) { break }
+ } else { first = false; }
+
+ var elt = (void 0);
+ if (allowEmpty && this$1.type === types.comma)
+ { elt = null; }
+ else if (this$1.type === types.ellipsis) {
+ elt = this$1.parseSpread(refDestructuringErrors);
+ if (refDestructuringErrors && this$1.type === types.comma && refDestructuringErrors.trailingComma < 0)
+ { refDestructuringErrors.trailingComma = this$1.start; }
+ } else {
+ elt = this$1.parseMaybeAssign(false, refDestructuringErrors);
+ }
+ elts.push(elt);
+ }
+ return elts
+};
+
+pp$3.checkUnreserved = function(ref) {
+ var start = ref.start;
+ var end = ref.end;
+ var name = ref.name;
+
+ if (this.inGenerator && name === "yield")
+ { this.raiseRecoverable(start, "Can not use 'yield' as identifier inside a generator"); }
+ if (this.inAsync && name === "await")
+ { this.raiseRecoverable(start, "Can not use 'await' as identifier inside an async function"); }
+ if (this.isKeyword(name))
+ { this.raise(start, ("Unexpected keyword '" + name + "'")); }
+ if (this.options.ecmaVersion < 6 &&
+ this.input.slice(start, end).indexOf("\\") != -1) { return }
+ var re = this.strict ? this.reservedWordsStrict : this.reservedWords;
+ if (re.test(name))
+ { this.raiseRecoverable(start, ("The keyword '" + name + "' is reserved")); }
+};
+
+// Parse the next token as an identifier. If `liberal` is true (used
+// when parsing properties), it will also convert keywords into
+// identifiers.
+
+pp$3.parseIdent = function(liberal, isBinding) {
+ var node = this.startNode();
+ if (liberal && this.options.allowReserved == "never") { liberal = false; }
+ if (this.type === types.name) {
+ node.name = this.value;
+ } else if (this.type.keyword) {
+ node.name = this.type.keyword;
+
+ // To fix https://github.com/ternjs/acorn/issues/575
+ // `class` and `function` keywords push new context into this.context.
+ // But there is no chance to pop the context if the keyword is consumed as an identifier such as a property name.
+ // If the previous token is a dot, this does not apply because the context-managing code already ignored the keyword
+ if ((node.name === "class" || node.name === "function") &&
+ (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) {
+ this.context.pop();
+ }
+ } else {
+ this.unexpected();
+ }
+ this.next();
+ this.finishNode(node, "Identifier");
+ if (!liberal) { this.checkUnreserved(node); }
+ return node
+};
+
+// Parses yield expression inside generator.
+
+pp$3.parseYield = function() {
+ if (!this.yieldPos) { this.yieldPos = this.start; }
+
+ var node = this.startNode();
+ this.next();
+ if (this.type == types.semi || this.canInsertSemicolon() || (this.type != types.star && !this.type.startsExpr)) {
+ node.delegate = false;
+ node.argument = null;
+ } else {
+ node.delegate = this.eat(types.star);
+ node.argument = this.parseMaybeAssign();
+ }
+ return this.finishNode(node, "YieldExpression")
+};
+
+pp$3.parseAwait = function() {
+ if (!this.awaitPos) { this.awaitPos = this.start; }
+
+ var node = this.startNode();
+ this.next();
+ node.argument = this.parseMaybeUnary(null, true);
+ return this.finishNode(node, "AwaitExpression")
+};
+
+var pp$4 = 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$4.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$4.raiseRecoverable = pp$4.raise;
+
+pp$4.curPosition = function() {
+ if (this.options.locations) {
+ return new Position(this.curLine, this.pos - this.lineStart)
+ }
+};
+
+var pp$5 = Parser.prototype;
+
+// Object.assign polyfill
+var assign = Object.assign || function(target) {
+ var sources = [], len = arguments.length - 1;
+ while ( len-- > 0 ) sources[ len ] = arguments[ len + 1 ];
+
+ for (var i = 0, list = sources; i < list.length; i += 1) {
+ var source = list[i];
+
+ for (var key in source) {
+ if (has(source, key)) {
+ target[key] = source[key];
+ }
+ }
+ }
+ return target
+};
+
+// The functions in this module keep track of declared variables in the current scope in order to detect duplicate variable names.
+
+pp$5.enterFunctionScope = function() {
+ // var: a hash of var-declared names in the current lexical scope
+ // lexical: a hash of lexically-declared names in the current lexical scope
+ // childVar: a hash of var-declared names in all child lexical scopes of the current lexical scope (within the current function scope)
+ // parentLexical: a hash of lexically-declared names in all parent lexical scopes of the current lexical scope (within the current function scope)
+ this.scopeStack.push({var: {}, lexical: {}, childVar: {}, parentLexical: {}});
+};
+
+pp$5.exitFunctionScope = function() {
+ this.scopeStack.pop();
+};
+
+pp$5.enterLexicalScope = function() {
+ var parentScope = this.scopeStack[this.scopeStack.length - 1];
+ var childScope = {var: {}, lexical: {}, childVar: {}, parentLexical: {}};
+
+ this.scopeStack.push(childScope);
+ assign(childScope.parentLexical, parentScope.lexical, parentScope.parentLexical);
+};
+
+pp$5.exitLexicalScope = function() {
+ var childScope = this.scopeStack.pop();
+ var parentScope = this.scopeStack[this.scopeStack.length - 1];
+
+ assign(parentScope.childVar, childScope.var, childScope.childVar);
+};
+
+/**
+ * A name can be declared with `var` if there are no variables with the same name declared with `let`/`const`
+ * in the current lexical scope or any of the parent lexical scopes in this function.
+ */
+pp$5.canDeclareVarName = function(name) {
+ var currentScope = this.scopeStack[this.scopeStack.length - 1];
+
+ return !has(currentScope.lexical, name) && !has(currentScope.parentLexical, name)
+};
+
+/**
+ * A name can be declared with `let`/`const` if there are no variables with the same name declared with `let`/`const`
+ * in the current scope, and there are no variables with the same name declared with `var` in the current scope or in
+ * any child lexical scopes in this function.
+ */
+pp$5.canDeclareLexicalName = function(name) {
+ var currentScope = this.scopeStack[this.scopeStack.length - 1];
+
+ return !has(currentScope.lexical, name) && !has(currentScope.var, name) && !has(currentScope.childVar, name)
+};
+
+pp$5.declareVarName = function(name) {
+ this.scopeStack[this.scopeStack.length - 1].var[name] = true;
+};
+
+pp$5.declareLexicalName = function(name) {
+ this.scopeStack[this.scopeStack.length - 1].lexical[name] = true;
+};
+
+var Node = function Node(parser, pos, loc) {
+ this.type = "";
+ this.start = pos;
+ this.end = 0;
+ if (parser.options.locations)
+ { this.loc = new 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.
+
+var pp$6 = Parser.prototype;
+
+pp$6.startNode = function() {
+ return new Node(this, this.start, this.startLoc)
+};
+
+pp$6.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$6.finishNode = function(node, type) {
+ return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc)
+};
+
+// Finish node at given position
+
+pp$6.finishNodeAt = function(node, type, pos, loc) {
+ return finishNodeAt.call(this, node, type, pos, loc)
+};
+
+// 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 TokContext = function TokContext(token, isExpr, preserveSpace, override, generator) {
+ this.token = token;
+ this.isExpr = !!isExpr;
+ this.preserveSpace = !!preserveSpace;
+ this.override = override;
+ this.generator = !!generator;
+};
+
+var types$1 = {
+ b_stat: new TokContext("{", false),
+ b_expr: new TokContext("{", true),
+ b_tmpl: new TokContext("${", false),
+ p_stat: new TokContext("(", false),
+ p_expr: new TokContext("(", true),
+ q_tmpl: new TokContext("`", true, true, function (p) { return p.tryReadTemplateToken(); }),
+ f_stat: new TokContext("function", false),
+ f_expr: new TokContext("function", true),
+ f_expr_gen: new TokContext("function", true, false, null, true),
+ f_gen: new TokContext("function", false, false, null, true)
+};
+
+var pp$7 = Parser.prototype;
+
+pp$7.initialContext = function() {
+ return [types$1.b_stat]
+};
+
+pp$7.braceIsBlock = function(prevType) {
+ var parent = this.curContext();
+ if (parent === types$1.f_expr || parent === types$1.f_stat)
+ { return true }
+ if (prevType === types.colon && (parent === types$1.b_stat || parent === types$1.b_expr))
+ { return !parent.isExpr }
+
+ // The check for `tt.name && exprAllowed` detects whether we are
+ // after a `yield` or `of` construct. See the `updateContext` for
+ // `tt.name`.
+ if (prevType === types._return || prevType == types.name && this.exprAllowed)
+ { return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) }
+ if (prevType === types._else || prevType === types.semi || prevType === types.eof || prevType === types.parenR || prevType == types.arrow)
+ { return true }
+ if (prevType == types.braceL)
+ { return parent === types$1.b_stat }
+ if (prevType == types._var || prevType == types.name)
+ { return false }
+ return !this.exprAllowed
+};
+
+pp$7.inGeneratorContext = function() {
+ var this$1 = this;
+
+ for (var i = this.context.length - 1; i >= 1; i--) {
+ var context = this$1.context[i];
+ if (context.token === "function")
+ { return context.generator }
+ }
+ return false
+};
+
+pp$7.updateContext = function(prevType) {
+ var update, type = this.type;
+ if (type.keyword && prevType == types.dot)
+ { this.exprAllowed = false; }
+ else if (update = type.updateContext)
+ { update.call(this, prevType); }
+ else
+ { this.exprAllowed = type.beforeExpr; }
+};
+
+// Token-specific context update code
+
+types.parenR.updateContext = types.braceR.updateContext = function() {
+ if (this.context.length == 1) {
+ this.exprAllowed = true;
+ return
+ }
+ var out = this.context.pop();
+ if (out === types$1.b_stat && this.curContext().token === "function") {
+ out = this.context.pop();
+ }
+ this.exprAllowed = !out.isExpr;
+};
+
+types.braceL.updateContext = function(prevType) {
+ this.context.push(this.braceIsBlock(prevType) ? types$1.b_stat : types$1.b_expr);
+ this.exprAllowed = true;
+};
+
+types.dollarBraceL.updateContext = function() {
+ this.context.push(types$1.b_tmpl);
+ this.exprAllowed = true;
+};
+
+types.parenL.updateContext = function(prevType) {
+ var statementParens = prevType === types._if || prevType === types._for || prevType === types._with || prevType === types._while;
+ this.context.push(statementParens ? types$1.p_stat : types$1.p_expr);
+ this.exprAllowed = true;
+};
+
+types.incDec.updateContext = function() {
+ // tokExprAllowed stays unchanged
+};
+
+types._function.updateContext = types._class.updateContext = function(prevType) {
+ if (prevType.beforeExpr && prevType !== types.semi && prevType !== types._else &&
+ !((prevType === types.colon || prevType === types.braceL) && this.curContext() === types$1.b_stat))
+ { this.context.push(types$1.f_expr); }
+ else
+ { this.context.push(types$1.f_stat); }
+ this.exprAllowed = false;
+};
+
+types.backQuote.updateContext = function() {
+ if (this.curContext() === types$1.q_tmpl)
+ { this.context.pop(); }
+ else
+ { this.context.push(types$1.q_tmpl); }
+ this.exprAllowed = false;
+};
+
+types.star.updateContext = function(prevType) {
+ if (prevType == types._function) {
+ var index = this.context.length - 1;
+ if (this.context[index] === types$1.f_expr)
+ { this.context[index] = types$1.f_expr_gen; }
+ else
+ { this.context[index] = types$1.f_gen; }
+ }
+ this.exprAllowed = true;
+};
+
+types.name.updateContext = function(prevType) {
+ var allowed = false;
+ if (this.options.ecmaVersion >= 6) {
+ if (this.value == "of" && !this.exprAllowed ||
+ this.value == "yield" && this.inGeneratorContext())
+ { allowed = true; }
+ }
+ this.exprAllowed = allowed;
+};
+
+// 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) {
+ 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$8 = 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$8.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$8.getToken = function() {
+ this.next();
+ return new Token(this)
+};
+
+// If we're in an ES6 environment, make parsers iterable
+if (typeof Symbol !== "undefined")
+ { pp$8[Symbol.iterator] = function() {
+ var this$1 = this;
+
+ return {
+ next: function () {
+ var token = this$1.getToken();
+ return {
+ done: token.type === types.eof,
+ value: token
+ }
+ }
+ }
+ }; }
+
+// Toggle strict mode. Re-reads the next number or string to please
+// pedantic tests (`"use strict"; 010;` should fail).
+
+pp$8.curContext = function() {
+ return this.context[this.context.length - 1]
+};
+
+// Read a single token, updating the parser object's token-related
+// properties.
+
+pp$8.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(types.eof) }
+
+ if (curContext.override) { return curContext.override(this) }
+ else { this.readToken(this.fullCharCodeAtPos()); }
+};
+
+pp$8.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$8.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$8.skipBlockComment = function() {
+ var this$1 = this;
+
+ 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) {
+ lineBreakG.lastIndex = start;
+ var match;
+ while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) {
+ ++this$1.curLine;
+ this$1.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$8.skipLineComment = function(startSkip) {
+ var this$1 = this;
+
+ 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 && !isNewLine(ch)) {
+ ch = this$1.input.charCodeAt(++this$1.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$8.skipSpace = function() {
+ var this$1 = this;
+
+ loop: while (this.pos < this.input.length) {
+ var ch = this$1.input.charCodeAt(this$1.pos);
+ switch (ch) {
+ case 32: case 160: // ' '
+ ++this$1.pos;
+ break
+ case 13:
+ if (this$1.input.charCodeAt(this$1.pos + 1) === 10) {
+ ++this$1.pos;
+ }
+ case 10: case 8232: case 8233:
+ ++this$1.pos;
+ if (this$1.options.locations) {
+ ++this$1.curLine;
+ this$1.lineStart = this$1.pos;
+ }
+ break
+ case 47: // '/'
+ switch (this$1.input.charCodeAt(this$1.pos + 1)) {
+ case 42: // '*'
+ this$1.skipBlockComment();
+ break
+ case 47:
+ this$1.skipLineComment(2);
+ break
+ default:
+ break loop
+ }
+ break
+ default:
+ if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) {
+ ++this$1.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$8.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$8.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(types.ellipsis)
+ } else {
+ ++this.pos;
+ return this.finishToken(types.dot)
+ }
+};
+
+pp$8.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(types.assign, 2) }
+ return this.finishOp(types.slash, 1)
+};
+
+pp$8.readToken_mult_modulo_exp = function(code) { // '%*'
+ var next = this.input.charCodeAt(this.pos + 1);
+ var size = 1;
+ var tokentype = code === 42 ? types.star : types.modulo;
+
+ // exponentiation operator ** and **=
+ if (this.options.ecmaVersion >= 7 && code == 42 && next === 42) {
+ ++size;
+ tokentype = types.starstar;
+ next = this.input.charCodeAt(this.pos + 2);
+ }
+
+ if (next === 61) { return this.finishOp(types.assign, size + 1) }
+ return this.finishOp(tokentype, size)
+};
+
+pp$8.readToken_pipe_amp = function(code) { // '|&'
+ var next = this.input.charCodeAt(this.pos + 1);
+ if (next === code) { return this.finishOp(code === 124 ? types.logicalOR : types.logicalAND, 2) }
+ if (next === 61) { return this.finishOp(types.assign, 2) }
+ return this.finishOp(code === 124 ? types.bitwiseOR : types.bitwiseAND, 1)
+};
+
+pp$8.readToken_caret = function() { // '^'
+ var next = this.input.charCodeAt(this.pos + 1);
+ if (next === 61) { return this.finishOp(types.assign, 2) }
+ return this.finishOp(types.bitwiseXOR, 1)
+};
+
+pp$8.readToken_plus_min = function(code) { // '+-'
+ var next = this.input.charCodeAt(this.pos + 1);
+ if (next === code) {
+ if (next == 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) == 62 &&
+ (this.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.lastTokEnd, this.pos)))) {
+ // A `-->` line comment
+ this.skipLineComment(3);
+ this.skipSpace();
+ return this.nextToken()
+ }
+ return this.finishOp(types.incDec, 2)
+ }
+ if (next === 61) { return this.finishOp(types.assign, 2) }
+ return this.finishOp(types.plusMin, 1)
+};
+
+pp$8.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(types.assign, size + 1) }
+ return this.finishOp(types.bitShift, size)
+ }
+ if (next == 33 && code == 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) == 45 &&
+ this.input.charCodeAt(this.pos + 3) == 45) {
+ // `<!--`, an XML-style comment that should be interpreted as a line comment
+ this.skipLineComment(4);
+ this.skipSpace();
+ return this.nextToken()
+ }
+ if (next === 61) { size = 2; }
+ return this.finishOp(types.relational, size)
+};
+
+pp$8.readToken_eq_excl = function(code) { // '=!'
+ var next = this.input.charCodeAt(this.pos + 1);
+ if (next === 61) { return this.finishOp(types.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2) }
+ if (code === 61 && next === 62 && this.options.ecmaVersion >= 6) { // '=>'
+ this.pos += 2;
+ return this.finishToken(types.arrow)
+ }
+ return this.finishOp(code === 61 ? types.eq : types.prefix, 1)
+};
+
+pp$8.getTokenFromCode = function(code) {
+ switch (code) {
+ // The interpretation of a dot depends on whether it is followed
+ // by a digit or another two dots.
+ case 46: // '.'
+ return this.readToken_dot()
+
+ // Punctuation tokens.
+ case 40: ++this.pos; return this.finishToken(types.parenL)
+ case 41: ++this.pos; return this.finishToken(types.parenR)
+ case 59: ++this.pos; return this.finishToken(types.semi)
+ case 44: ++this.pos; return this.finishToken(types.comma)
+ case 91: ++this.pos; return this.finishToken(types.bracketL)
+ case 93: ++this.pos; return this.finishToken(types.bracketR)
+ case 123: ++this.pos; return this.finishToken(types.braceL)
+ case 125: ++this.pos; return this.finishToken(types.braceR)
+ case 58: ++this.pos; return this.finishToken(types.colon)
+ case 63: ++this.pos; return this.finishToken(types.question)
+
+ case 96: // '`'
+ if (this.options.ecmaVersion < 6) { break }
+ ++this.pos;
+ return this.finishToken(types.backQuote)
+
+ case 48: // '0'
+ var next = this.input.charCodeAt(this.pos + 1);
+ if (next === 120 || next === 88) { return this.readRadixNumber(16) } // '0x', '0X' - hex number
+ if (this.options.ecmaVersion >= 6) {
+ if (next === 111 || next === 79) { return this.readRadixNumber(8) } // '0o', '0O' - octal number
+ if (next === 98 || next === 66) { return this.readRadixNumber(2) } // '0b', '0B' - binary number
+ }
+ // Anything else beginning with a digit is an integer, octal
+ // number, or float.
+ case 49: case 50: case 51: case 52: case 53: case 54: case 55: case 56: case 57: // 1-9
+ return this.readNumber(false)
+
+ // Quotes produce strings.
+ case 34: case 39: // '"', "'"
+ return this.readString(code)
+
+ // Operators are parsed inline in tiny state machines. '=' (61) is
+ // often referred to. `finishOp` simply skips the amount of
+ // characters it is given as second argument, and returns a token
+ // of the type given by its first argument.
+
+ case 47: // '/'
+ return this.readToken_slash()
+
+ case 37: case 42: // '%*'
+ return this.readToken_mult_modulo_exp(code)
+
+ case 124: case 38: // '|&'
+ return this.readToken_pipe_amp(code)
+
+ case 94: // '^'
+ return this.readToken_caret()
+
+ case 43: case 45: // '+-'
+ return this.readToken_plus_min(code)
+
+ case 60: case 62: // '<>'
+ return this.readToken_lt_gt(code)
+
+ case 61: case 33: // '=!'
+ return this.readToken_eq_excl(code)
+
+ case 126: // '~'
+ return this.finishOp(types.prefix, 1)
+ }
+
+ this.raise(this.pos, "Unexpected character '" + codePointToString(code) + "'");
+};
+
+pp$8.finishOp = function(type, size) {
+ var str = this.input.slice(this.pos, this.pos + size);
+ this.pos += size;
+ return this.finishToken(type, str)
+};
+
+// Parse a regular expression. Some context-awareness is necessary,
+// since a '/' inside a '[]' set does not end the expression.
+
+function tryCreateRegexp(src, flags, throwErrorAt, parser) {
+ try {
+ return new RegExp(src, flags)
+ } catch (e) {
+ if (throwErrorAt !== undefined) {
+ if (e instanceof SyntaxError) { parser.raise(throwErrorAt, "Error parsing regular expression: " + e.message); }
+ throw e
+ }
+ }
+}
+
+var regexpUnicodeSupport = !!tryCreateRegexp("\uffff", "u");
+
+pp$8.readRegexp = function() {
+ var this$1 = this;
+
+ var escaped, inClass, start = this.pos;
+ for (;;) {
+ if (this$1.pos >= this$1.input.length) { this$1.raise(start, "Unterminated regular expression"); }
+ var ch = this$1.input.charAt(this$1.pos);
+ if (lineBreak.test(ch)) { this$1.raise(start, "Unterminated regular expression"); }
+ if (!escaped) {
+ if (ch === "[") { inClass = true; }
+ else if (ch === "]" && inClass) { inClass = false; }
+ else if (ch === "/" && !inClass) { break }
+ escaped = ch === "\\";
+ } else { escaped = false; }
+ ++this$1.pos;
+ }
+ var content = this.input.slice(start, this.pos);
+ ++this.pos;
+ // Need to use `readWord1` because '\uXXXX' sequences are allowed
+ // here (don't ask).
+ var mods = this.readWord1();
+ var tmp = content, tmpFlags = "";
+ if (mods) {
+ var validFlags = /^[gim]*$/;
+ if (this.options.ecmaVersion >= 6) { validFlags = /^[gimuy]*$/; }
+ if (!validFlags.test(mods)) { this.raise(start, "Invalid regular expression flag"); }
+ if (mods.indexOf("u") >= 0) {
+ if (regexpUnicodeSupport) {
+ tmpFlags = "u";
+ } else {
+ // Replace each astral symbol and every Unicode escape sequence that
+ // possibly represents an astral symbol or a paired surrogate with a
+ // single ASCII symbol to avoid throwing on regular expressions that
+ // are only valid in combination with the `/u` flag.
+ // Note: replacing with the ASCII symbol `x` might cause false
+ // negatives in unlikely scenarios. For example, `[\u{61}-b]` is a
+ // perfectly valid pattern that is equivalent to `[a-b]`, but it would
+ // be replaced by `[x-b]` which throws an error.
+ tmp = tmp.replace(/\\u\{([0-9a-fA-F]+)\}/g, function (_match, code, offset) {
+ code = Number("0x" + code);
+ if (code > 0x10FFFF) { this$1.raise(start + offset + 3, "Code point out of bounds"); }
+ return "x"
+ });
+ tmp = tmp.replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "x");
+ tmpFlags = tmpFlags.replace("u", "");
+ }
+ }
+ }
+ // Detect invalid regular expressions.
+ var value = null;
+ // Rhino's regular expression parser is flaky and throws uncatchable exceptions,
+ // so don't do detection if we are running under Rhino
+ if (!isRhino) {
+ tryCreateRegexp(tmp, tmpFlags, start, this);
+ // Get a regular expression object for this pattern-flag pair, or `null` in
+ // case the current environment doesn't support the flags it uses.
+ value = tryCreateRegexp(content, mods);
+ }
+ return this.finishToken(types.regexp, {pattern: content, flags: mods, value: value})
+};
+
+// Read an integer in the given radix. Return null if zero digits
+// were read, the integer value otherwise. When `len` is given, this
+// will return `null` unless the integer has exactly `len` digits.
+
+pp$8.readInt = function(radix, len) {
+ var this$1 = this;
+
+ var start = this.pos, total = 0;
+ for (var i = 0, e = len == null ? Infinity : len; i < e; ++i) {
+ var code = this$1.input.charCodeAt(this$1.pos), val = (void 0);
+ if (code >= 97) { val = code - 97 + 10; } // a
+ else if (code >= 65) { val = code - 65 + 10; } // A
+ else if (code >= 48 && code <= 57) { val = code - 48; } // 0-9
+ else { val = Infinity; }
+ if (val >= radix) { break }
+ ++this$1.pos;
+ total = total * radix + val;
+ }
+ if (this.pos === start || len != null && this.pos - start !== len) { return null }
+
+ return total
+};
+
+pp$8.readRadixNumber = function(radix) {
+ this.pos += 2; // 0x
+ var val = this.readInt(radix);
+ if (val == null) { this.raise(this.start + 2, "Expected number in radix " + radix); }
+ if (isIdentifierStart(this.fullCharCodeAtPos())) { this.raise(this.pos, "Identifier directly after number"); }
+ return this.finishToken(types.num, val)
+};
+
+// Read an integer, octal integer, or floating-point number.
+
+pp$8.readNumber = function(startsWithDot) {
+ var start = this.pos, isFloat = false, octal = this.input.charCodeAt(this.pos) === 48;
+ if (!startsWithDot && this.readInt(10) === null) { this.raise(start, "Invalid number"); }
+ if (octal && this.pos == start + 1) { octal = false; }
+ var next = this.input.charCodeAt(this.pos);
+ if (next === 46 && !octal) { // '.'
+ ++this.pos;
+ this.readInt(10);
+ isFloat = true;
+ next = this.input.charCodeAt(this.pos);
+ }
+ if ((next === 69 || next === 101) && !octal) { // 'eE'
+ next = this.input.charCodeAt(++this.pos);
+ if (next === 43 || next === 45) { ++this.pos; } // '+-'
+ if (this.readInt(10) === null) { this.raise(start, "Invalid number"); }
+ isFloat = true;
+ }
+ if (isIdentifierStart(this.fullCharCodeAtPos())) { this.raise(this.pos, "Identifier directly after number"); }
+
+ var str = this.input.slice(start, this.pos), val;
+ if (isFloat) { val = parseFloat(str); }
+ else if (!octal || str.length === 1) { val = parseInt(str, 10); }
+ else if (this.strict) { this.raise(start, "Invalid number"); }
+ else if (/[89]/.test(str)) { val = parseInt(str, 10); }
+ else { val = parseInt(str, 8); }
+ return this.finishToken(types.num, val)
+};
+
+// Read a string value, interpreting backslash-escapes.
+
+pp$8.readCodePoint = function() {
+ var ch = this.input.charCodeAt(this.pos), code;
+
+ if (ch === 123) { // '{'
+ if (this.options.ecmaVersion < 6) { this.unexpected(); }
+ var codePos = ++this.pos;
+ code = this.readHexChar(this.input.indexOf("}", this.pos) - this.pos);
+ ++this.pos;
+ if (code > 0x10FFFF) { this.invalidStringToken(codePos, "Code point out of bounds"); }
+ } else {
+ code = this.readHexChar(4);
+ }
+ return code
+};
+
+function codePointToString(code) {
+ // UTF-16 Decoding
+ if (code <= 0xFFFF) { return String.fromCharCode(code) }
+ code -= 0x10000;
+ return String.fromCharCode((code >> 10) + 0xD800, (code & 1023) + 0xDC00)
+}
+
+pp$8.readString = function(quote) {
+ var this$1 = this;
+
+ var out = "", chunkStart = ++this.pos;
+ for (;;) {
+ if (this$1.pos >= this$1.input.length) { this$1.raise(this$1.start, "Unterminated string constant"); }
+ var ch = this$1.input.charCodeAt(this$1.pos);
+ if (ch === quote) { break }
+ if (ch === 92) { // '\'
+ out += this$1.input.slice(chunkStart, this$1.pos);
+ out += this$1.readEscapedChar(false);
+ chunkStart = this$1.pos;
+ } else {
+ if (isNewLine(ch)) { this$1.raise(this$1.start, "Unterminated string constant"); }
+ ++this$1.pos;
+ }
+ }
+ out += this.input.slice(chunkStart, this.pos++);
+ return this.finishToken(types.string, out)
+};
+
+// Reads template string tokens.
+
+var INVALID_TEMPLATE_ESCAPE_ERROR = {};
+
+pp$8.tryReadTemplateToken = function() {
+ this.inTemplateElement = true;
+ try {
+ this.readTmplToken();
+ } catch (err) {
+ if (err === INVALID_TEMPLATE_ESCAPE_ERROR) {
+ this.readInvalidTemplateToken();
+ } else {
+ throw err
+ }
+ }
+
+ this.inTemplateElement = false;
+};
+
+pp$8.invalidStringToken = function(position, message) {
+ if (this.inTemplateElement && this.options.ecmaVersion >= 9) {
+ throw INVALID_TEMPLATE_ESCAPE_ERROR
+ } else {
+ this.raise(position, message);
+ }
+};
+
+pp$8.readTmplToken = function() {
+ var this$1 = this;
+
+ var out = "", chunkStart = this.pos;
+ for (;;) {
+ if (this$1.pos >= this$1.input.length) { this$1.raise(this$1.start, "Unterminated template"); }
+ var ch = this$1.input.charCodeAt(this$1.pos);
+ if (ch === 96 || ch === 36 && this$1.input.charCodeAt(this$1.pos + 1) === 123) { // '`', '${'
+ if (this$1.pos === this$1.start && (this$1.type === types.template || this$1.type === types.invalidTemplate)) {
+ if (ch === 36) {
+ this$1.pos += 2;
+ return this$1.finishToken(types.dollarBraceL)
+ } else {
+ ++this$1.pos;
+ return this$1.finishToken(types.backQuote)
+ }
+ }
+ out += this$1.input.slice(chunkStart, this$1.pos);
+ return this$1.finishToken(types.template, out)
+ }
+ if (ch === 92) { // '\'
+ out += this$1.input.slice(chunkStart, this$1.pos);
+ out += this$1.readEscapedChar(true);
+ chunkStart = this$1.pos;
+ } else if (isNewLine(ch)) {
+ out += this$1.input.slice(chunkStart, this$1.pos);
+ ++this$1.pos;
+ switch (ch) {
+ case 13:
+ if (this$1.input.charCodeAt(this$1.pos) === 10) { ++this$1.pos; }
+ case 10:
+ out += "\n";
+ break
+ default:
+ out += String.fromCharCode(ch);
+ break
+ }
+ if (this$1.options.locations) {
+ ++this$1.curLine;
+ this$1.lineStart = this$1.pos;
+ }
+ chunkStart = this$1.pos;
+ } else {
+ ++this$1.pos;
+ }
+ }
+};
+
+// Reads a template token to search for the end, without validating any escape sequences
+pp$8.readInvalidTemplateToken = function() {
+ var this$1 = this;
+
+ for (; this.pos < this.input.length; this.pos++) {
+ switch (this$1.input[this$1.pos]) {
+ case "\\":
+ ++this$1.pos;
+ break
+
+ case "$":
+ if (this$1.input[this$1.pos + 1] !== "{") {
+ break
+ }
+ // falls through
+
+ case "`":
+ return this$1.finishToken(types.invalidTemplate, this$1.input.slice(this$1.start, this$1.pos))
+
+ // no default
+ }
+ }
+ this.raise(this.start, "Unterminated template");
+};
+
+// Used to read escaped characters
+
+pp$8.readEscapedChar = function(inTemplate) {
+ var ch = this.input.charCodeAt(++this.pos);
+ ++this.pos;
+ switch (ch) {
+ case 110: return "\n" // 'n' -> '\n'
+ case 114: return "\r" // 'r' -> '\r'
+ case 120: return String.fromCharCode(this.readHexChar(2)) // 'x'
+ case 117: return codePointToString(this.readCodePoint()) // 'u'
+ case 116: return "\t" // 't' -> '\t'
+ case 98: return "\b" // 'b' -> '\b'
+ case 118: return "\u000b" // 'v' -> '\u000b'
+ case 102: return "\f" // 'f' -> '\f'
+ case 13: if (this.input.charCodeAt(this.pos) === 10) { ++this.pos; } // '\r\n'
+ case 10: // ' \n'
+ if (this.options.locations) { this.lineStart = this.pos; ++this.curLine; }
+ return ""
+ default:
+ if (ch >= 48 && ch <= 55) {
+ var octalStr = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0];
+ var octal = parseInt(octalStr, 8);
+ if (octal > 255) {
+ octalStr = octalStr.slice(0, -1);
+ octal = parseInt(octalStr, 8);
+ }
+ if (octalStr !== "0" && (this.strict || inTemplate)) {
+ this.invalidStringToken(this.pos - 2, "Octal literal in strict mode");
+ }
+ this.pos += octalStr.length - 1;
+ return String.fromCharCode(octal)
+ }
+ return String.fromCharCode(ch)
+ }
+};
+
+// Used to read character escape sequences ('\x', '\u', '\U').
+
+pp$8.readHexChar = function(len) {
+ var codePos = this.pos;
+ var n = this.readInt(16, len);
+ if (n === null) { this.invalidStringToken(codePos, "Bad character escape sequence"); }
+ return n
+};
+
+// Read an identifier, and return it as a string. Sets `this.containsEsc`
+// to whether the word contained a '\u' escape.
+//
+// Incrementally adds only escaped chars, adding other chunks as-is
+// as a micro-optimization.
+
+pp$8.readWord1 = function() {
+ var this$1 = this;
+
+ this.containsEsc = false;
+ var word = "", first = true, chunkStart = this.pos;
+ var astral = this.options.ecmaVersion >= 6;
+ while (this.pos < this.input.length) {
+ var ch = this$1.fullCharCodeAtPos();
+ if (isIdentifierChar(ch, astral)) {
+ this$1.pos += ch <= 0xffff ? 1 : 2;
+ } else if (ch === 92) { // "\"
+ this$1.containsEsc = true;
+ word += this$1.input.slice(chunkStart, this$1.pos);
+ var escStart = this$1.pos;
+ if (this$1.input.charCodeAt(++this$1.pos) != 117) // "u"
+ { this$1.invalidStringToken(this$1.pos, "Expecting Unicode escape sequence \\uXXXX"); }
+ ++this$1.pos;
+ var esc = this$1.readCodePoint();
+ if (!(first ? isIdentifierStart : isIdentifierChar)(esc, astral))
+ { this$1.invalidStringToken(escStart, "Invalid Unicode escape"); }
+ word += codePointToString(esc);
+ chunkStart = this$1.pos;
+ } else {
+ break
+ }
+ first = false;
+ }
+ return word + this.input.slice(chunkStart, this.pos)
+};
+
+// Read an identifier or keyword token. Will check for reserved
+// words when necessary.
+
+pp$8.readWord = function() {
+ var word = this.readWord1();
+ var type = types.name;
+ if (this.keywords.test(word)) {
+ if (this.containsEsc) { this.raiseRecoverable(this.start, "Escape sequence in keyword " + word); }
+ type = keywords$1[word];
+ }
+ return this.finishToken(type, word)
+};
+
+// 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
+
+var version = "5.2.1";
+
+// 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 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 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 Parser(options, input)
+}
+
+// This is a terrible kludge to support the existing, pre-ES6
+// interface where the loose parser module retroactively adds exports
+// to this module.
+var parse_dammit;
+var LooseParser;
+var pluginsLoose; // eslint-disable-line camelcase
+function addLooseExports(parse, Parser$$1, plugins$$1) {
+ parse_dammit = parse; // eslint-disable-line camelcase
+ LooseParser = Parser$$1;
+ pluginsLoose = plugins$$1;
+}
+
+export { version, parse, parseExpressionAt, tokenizer, parse_dammit, LooseParser, pluginsLoose, addLooseExports, Parser, plugins, defaultOptions, Position, SourceLocation, getLineInfo, Node, TokenType, types as tokTypes, keywords$1 as keywordTypes, TokContext, types$1 as tokContexts, isIdentifierChar, isIdentifierStart, Token, isNewLine, lineBreak, lineBreakG, nonASCIIwhitespace };
diff --git a/tools/node_modules/eslint/node_modules/acorn/dist/acorn.js b/tools/node_modules/eslint/node_modules/acorn/dist/acorn.js
new file mode 100644
index 0000000000..4f0dd5d212
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn/dist/acorn.js
@@ -0,0 +1,3765 @@
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
+ typeof define === 'function' && define.amd ? define(['exports'], factory) :
+ (factory((global.acorn = global.acorn || {})));
+}(this, (function (exports) { 'use strict';
+
+// Reserved word lists for various dialects of the language
+
+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"
+};
+
+// 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 + " const class extends export import super"
+};
+
+// ## 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 = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fd5\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ae\ua7b0-\ua7b7\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab65\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc";
+var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d4-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d01-\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1cf8\u1cf9\u1dc0-\u1df5\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua900-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f";
+
+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 bin/generate-identifier-regex.js
+
+// eslint-disable-next-line comma-spacing
+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,19,35,5,35,5,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,66,18,2,1,11,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,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,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,60,67,1213,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,3,5761,10591,541];
+
+// eslint-disable-next-line comma-spacing
+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,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,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,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,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)
+}
+
+// ## Token types
+
+// The assignment of fine-grained, information-carrying type objects
+// allows the tokenizer to store the information it has about a
+// token in a way that is very cheap for the parser to look up.
+
+// All token type variables start with an underscore, to make them
+// easy to recognize.
+
+// The `beforeExpr` property is used to disambiguate between regular
+// expressions and divisions. It is set on all token types that can
+// be followed by an expression (thus, a slash after them would be a
+// regular expression).
+//
+// The `startsExpr` property is used to check if the token ends a
+// `yield` expression. It is set on all token types that either can
+// directly start an expression (like a quotation mark) or can
+// continue an expression (like the body of a string).
+//
+// `isLoop` marks a keyword as starting a loop, which is important
+// to know when parsing a label, in order to allow or disallow
+// continue jumps to that label.
+
+var TokenType = function TokenType(label, conf) {
+ if ( conf === void 0 ) conf = {};
+
+ this.label = label;
+ this.keyword = conf.keyword;
+ this.beforeExpr = !!conf.beforeExpr;
+ this.startsExpr = !!conf.startsExpr;
+ this.isLoop = !!conf.isLoop;
+ this.isAssign = !!conf.isAssign;
+ this.prefix = !!conf.prefix;
+ this.postfix = !!conf.postfix;
+ this.binop = conf.binop || null;
+ this.updateContext = null;
+};
+
+function binop(name, prec) {
+ return new TokenType(name, {beforeExpr: true, binop: prec})
+}
+var beforeExpr = {beforeExpr: true};
+var startsExpr = {startsExpr: true};
+
+// Map keyword names to token types.
+
+var keywords$1 = {};
+
+// Succinct definitions of keyword token types
+function kw(name, options) {
+ if ( options === void 0 ) options = {};
+
+ options.keyword = name;
+ return keywords$1[name] = new TokenType(name, options)
+}
+
+var types = {
+ num: new TokenType("num", startsExpr),
+ regexp: new TokenType("regexp", startsExpr),
+ string: new TokenType("string", startsExpr),
+ name: new TokenType("name", startsExpr),
+ eof: new TokenType("eof"),
+
+ // Punctuation token types.
+ bracketL: new TokenType("[", {beforeExpr: true, startsExpr: true}),
+ bracketR: new TokenType("]"),
+ braceL: new TokenType("{", {beforeExpr: true, startsExpr: true}),
+ braceR: new TokenType("}"),
+ parenL: new TokenType("(", {beforeExpr: true, startsExpr: true}),
+ parenR: new TokenType(")"),
+ comma: new TokenType(",", beforeExpr),
+ semi: new TokenType(";", beforeExpr),
+ colon: new TokenType(":", beforeExpr),
+ dot: new TokenType("."),
+ question: new TokenType("?", beforeExpr),
+ arrow: new TokenType("=>", beforeExpr),
+ template: new TokenType("template"),
+ invalidTemplate: new TokenType("invalidTemplate"),
+ ellipsis: new TokenType("...", beforeExpr),
+ backQuote: new TokenType("`", startsExpr),
+ dollarBraceL: new TokenType("${", {beforeExpr: true, startsExpr: true}),
+
+ // Operators. These carry several kinds of properties to help the
+ // parser use them properly (the presence of these properties is
+ // what categorizes them as operators).
+ //
+ // `binop`, when present, specifies that this operator is a binary
+ // operator, and will refer to its precedence.
+ //
+ // `prefix` and `postfix` mark the operator as a prefix or postfix
+ // unary operator.
+ //
+ // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as
+ // binary operators with a very low precedence, that should result
+ // in AssignmentExpression nodes.
+
+ eq: new TokenType("=", {beforeExpr: true, isAssign: true}),
+ assign: new TokenType("_=", {beforeExpr: true, isAssign: true}),
+ incDec: new TokenType("++/--", {prefix: true, postfix: true, startsExpr: true}),
+ prefix: new TokenType("!/~", {beforeExpr: true, prefix: true, startsExpr: true}),
+ logicalOR: binop("||", 1),
+ logicalAND: binop("&&", 2),
+ bitwiseOR: binop("|", 3),
+ bitwiseXOR: binop("^", 4),
+ bitwiseAND: binop("&", 5),
+ equality: binop("==/!=/===/!==", 6),
+ relational: binop("</>/<=/>=", 7),
+ bitShift: binop("<</>>/>>>", 8),
+ plusMin: new TokenType("+/-", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}),
+ modulo: binop("%", 10),
+ star: binop("*", 10),
+ slash: binop("/", 10),
+ starstar: new TokenType("**", {beforeExpr: true}),
+
+ // Keyword token types.
+ _break: kw("break"),
+ _case: kw("case", beforeExpr),
+ _catch: kw("catch"),
+ _continue: kw("continue"),
+ _debugger: kw("debugger"),
+ _default: kw("default", beforeExpr),
+ _do: kw("do", {isLoop: true, beforeExpr: true}),
+ _else: kw("else", beforeExpr),
+ _finally: kw("finally"),
+ _for: kw("for", {isLoop: true}),
+ _function: kw("function", startsExpr),
+ _if: kw("if"),
+ _return: kw("return", beforeExpr),
+ _switch: kw("switch"),
+ _throw: kw("throw", beforeExpr),
+ _try: kw("try"),
+ _var: kw("var"),
+ _const: kw("const"),
+ _while: kw("while", {isLoop: true}),
+ _with: kw("with"),
+ _new: kw("new", {beforeExpr: true, startsExpr: true}),
+ _this: kw("this", startsExpr),
+ _super: kw("super", startsExpr),
+ _class: kw("class", startsExpr),
+ _extends: kw("extends", beforeExpr),
+ _export: kw("export"),
+ _import: kw("import"),
+ _null: kw("null", startsExpr),
+ _true: kw("true", startsExpr),
+ _false: kw("false", startsExpr),
+ _in: kw("in", {beforeExpr: true, binop: 7}),
+ _instanceof: kw("instanceof", {beforeExpr: true, binop: 7}),
+ _typeof: kw("typeof", {beforeExpr: true, prefix: true, startsExpr: true}),
+ _void: kw("void", {beforeExpr: true, prefix: true, startsExpr: true}),
+ _delete: kw("delete", {beforeExpr: true, prefix: true, startsExpr: true})
+};
+
+// Matches a whole line break (where CRLF is considered a single
+// line break). Used to count lines.
+
+var lineBreak = /\r\n?|\n|\u2028|\u2029/;
+var lineBreakG = new RegExp(lineBreak.source, "g");
+
+function isNewLine(code) {
+ return code === 10 || code === 13 || code === 0x2028 || code === 0x2029
+}
+
+var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;
+
+var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
+
+var ref = Object.prototype;
+var hasOwnProperty = ref.hasOwnProperty;
+var toString = ref.toString;
+
+// Checks if an object has a property.
+
+function has(obj, propName) {
+ return hasOwnProperty.call(obj, propName)
+}
+
+var isArray = Array.isArray || (function (obj) { return (
+ toString.call(obj) === "[object Array]"
+); });
+
+// These are used when `options.locations` is on, for the
+// `startLoc` and `endLoc` properties.
+
+var Position = function Position(line, col) {
+ this.line = line;
+ this.column = col;
+};
+
+Position.prototype.offset = function offset (n) {
+ return new Position(this.line, this.column + n)
+};
+
+var SourceLocation = function SourceLocation(p, start, end) {
+ 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.
+
+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)
+ }
+ }
+}
+
+// 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, 5, 6 (2015), 7 (2016), or 8 (2017). This influences support
+ // for strict mode, the set of reserved words, and support for
+ // new syntax features. The default is 7.
+ ecmaVersion: 7,
+ // `sourceType` indicates the mode the code should be parsed in.
+ // Can be either `"script"` or `"module"`. This influences global
+ // strict mode and parsing of `import` and `export` declarations.
+ 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: {}
+};
+
+// Interpret and default an options object
+
+function getOptions(opts) {
+ var options = {};
+
+ for (var opt in defaultOptions)
+ { options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt]; }
+
+ if (options.ecmaVersion >= 2015)
+ { options.ecmaVersion -= 2009; }
+
+ if (options.allowReserved == null)
+ { options.allowReserved = options.ecmaVersion < 5; }
+
+ if (isArray(options.onToken)) {
+ 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);
+ }
+}
+
+// Registered plugins
+var plugins = {};
+
+function keywordRegexp(words) {
+ return new RegExp("^(?:" + words.replace(/ /g, "|") + ")$")
+}
+
+var Parser = function Parser(options, input, startPos) {
+ this.options = options = getOptions(options);
+ this.sourceFile = options.sourceFile;
+ this.keywords = keywordRegexp(keywords[options.ecmaVersion >= 6 ? 6 : 5]);
+ var reserved = "";
+ if (!options.allowReserved) {
+ for (var v = options.ecmaVersion;; v--)
+ { if (reserved = reservedWords[v]) { break } }
+ if (options.sourceType == "module") { reserved += " await"; }
+ }
+ this.reservedWords = keywordRegexp(reserved);
+ var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict;
+ this.reservedWordsStrict = keywordRegexp(reservedStrict);
+ this.reservedWordsStrictBind = keywordRegexp(reservedStrict + " " + 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 = this.input.lastIndexOf("\n", startPos - 1) + 1;
+ 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 = 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.inModule = options.sourceType === "module";
+ this.strict = this.inModule || this.strictDirective(this.pos);
+
+ // Used to signify the start of a potential arrow function
+ this.potentialArrowAt = -1;
+
+ // Flags to track whether we are in a function, a generator, an async function.
+ this.inFunction = this.inGenerator = this.inAsync = false;
+ // Positions to delayed-check that yield/await does not exist in default parameters.
+ this.yieldPos = this.awaitPos = 0;
+ // 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); }
+
+ // Scope tracking for duplicate variable names (see scope.js)
+ this.scopeStack = [];
+ this.enterFunctionScope();
+};
+
+// 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) {
+ var this$1 = this;
+
+ for (var name in pluginConfigs) {
+ var plugin = plugins[name];
+ if (!plugin) { throw new Error("Plugin '" + name + "' not found") }
+ plugin(this$1, pluginConfigs[name]);
+ }
+};
+
+Parser.prototype.parse = function parse () {
+ var node = this.options.program || this.startNode();
+ this.nextToken();
+ return this.parseTopLevel(node)
+};
+
+var pp = Parser.prototype;
+
+// ## Parser utilities
+
+var literal = /^(?:'((?:\\.|[^'])*?)'|"((?:\\.|[^"])*?)"|;)/;
+pp.strictDirective = function(start) {
+ var this$1 = this;
+
+ for (;;) {
+ skipWhiteSpace.lastIndex = start;
+ start += skipWhiteSpace.exec(this$1.input)[0].length;
+ var match = literal.exec(this$1.input.slice(start));
+ if (!match) { return false }
+ if ((match[1] || match[2]) == "use strict") { return true }
+ start += match[0].length;
+ }
+};
+
+// 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 === types.name && this.value === name
+};
+
+// Consumes contextual keyword if possible.
+
+pp.eatContextual = function(name) {
+ return this.value === name && this.eat(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 === types.eof ||
+ this.type === types.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(types.semi) && !this.insertSemicolon()) { this.unexpected(); }
+};
+
+pp.afterTrailingComma = function(tokType, notNext) {
+ if (this.type == tokType) {
+ if (this.options.onTrailingComma)
+ { this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc); }
+ if (!notNext)
+ { 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");
+};
+
+function DestructuringErrors() {
+ this.shorthandAssign =
+ this.trailingComma =
+ this.parenthesizedAssign =
+ this.parenthesizedBind =
+ -1;
+}
+
+pp.checkPatternErrors = function(refDestructuringErrors, isAssign) {
+ if (!refDestructuringErrors) { return }
+ if (refDestructuringErrors.trailingComma > -1)
+ { this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element"); }
+ var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind;
+ if (parens > -1) { this.raiseRecoverable(parens, "Parenthesized pattern"); }
+};
+
+pp.checkExpressionErrors = function(refDestructuringErrors, andThrow) {
+ var pos = refDestructuringErrors ? refDestructuringErrors.shorthandAssign : -1;
+ if (!andThrow) { return pos >= 0 }
+ if (pos > -1) { this.raise(pos, "Shorthand property assignments are valid only in destructuring patterns"); }
+};
+
+pp.checkYieldAwaitInDefaultParams = function() {
+ if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos))
+ { this.raise(this.yieldPos, "Yield expression cannot be a default value"); }
+ if (this.awaitPos)
+ { this.raise(this.awaitPos, "Await expression cannot be a default value"); }
+};
+
+pp.isSimpleAssignTarget = function(expr) {
+ if (expr.type === "ParenthesizedExpression")
+ { return this.isSimpleAssignTarget(expr.expression) }
+ return expr.type === "Identifier" || expr.type === "MemberExpression"
+};
+
+var pp$1 = 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$1.parseTopLevel = function(node) {
+ var this$1 = this;
+
+ var exports = {};
+ if (!node.body) { node.body = []; }
+ while (this.type !== types.eof) {
+ var stmt = this$1.parseStatement(true, true, exports);
+ node.body.push(stmt);
+ }
+ this.adaptDirectivePrologue(node.body);
+ this.next();
+ if (this.options.ecmaVersion >= 6) {
+ node.sourceType = this.options.sourceType;
+ }
+ return this.finishNode(node, "Program")
+};
+
+var loopLabel = {kind: "loop"};
+var switchLabel = {kind: "switch"};
+
+pp$1.isLet = function() {
+ if (this.type !== types.name || this.options.ecmaVersion < 6 || this.value != "let") { return false }
+ skipWhiteSpace.lastIndex = this.pos;
+ var skip = skipWhiteSpace.exec(this.input);
+ var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next);
+ if (nextCh === 91 || nextCh == 123) { return true } // '{' and '['
+ if (isIdentifierStart(nextCh, true)) {
+ var pos = next + 1;
+ while (isIdentifierChar(this.input.charCodeAt(pos), true)) { ++pos; }
+ var ident = this.input.slice(next, pos);
+ if (!this.isKeyword(ident)) { return true }
+ }
+ return false
+};
+
+// check 'async [no LineTerminator here] function'
+// - 'async /*foo*/ function' is OK.
+// - 'async /*\n*/ function' is invalid.
+pp$1.isAsyncFunction = function() {
+ if (this.type !== types.name || this.options.ecmaVersion < 8 || this.value != "async")
+ { return false }
+
+ skipWhiteSpace.lastIndex = this.pos;
+ var skip = skipWhiteSpace.exec(this.input);
+ var next = this.pos + skip[0].length;
+ return !lineBreak.test(this.input.slice(this.pos, next)) &&
+ this.input.slice(next, next + 8) === "function" &&
+ (next + 8 == this.input.length || !isIdentifierChar(this.input.charAt(next + 8)))
+};
+
+// 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$1.parseStatement = function(declaration, topLevel, exports) {
+ var starttype = this.type, node = this.startNode(), kind;
+
+ if (this.isLet()) {
+ starttype = types._var;
+ kind = "let";
+ }
+
+ // 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 types._break: case types._continue: return this.parseBreakContinueStatement(node, starttype.keyword)
+ case types._debugger: return this.parseDebuggerStatement(node)
+ case types._do: return this.parseDoStatement(node)
+ case types._for: return this.parseForStatement(node)
+ case types._function:
+ if (!declaration && this.options.ecmaVersion >= 6) { this.unexpected(); }
+ return this.parseFunctionStatement(node, false)
+ case types._class:
+ if (!declaration) { this.unexpected(); }
+ return this.parseClass(node, true)
+ case types._if: return this.parseIfStatement(node)
+ case types._return: return this.parseReturnStatement(node)
+ case types._switch: return this.parseSwitchStatement(node)
+ case types._throw: return this.parseThrowStatement(node)
+ case types._try: return this.parseTryStatement(node)
+ case types._const: case types._var:
+ kind = kind || this.value;
+ if (!declaration && kind != "var") { this.unexpected(); }
+ return this.parseVarStatement(node, kind)
+ case types._while: return this.parseWhileStatement(node)
+ case types._with: return this.parseWithStatement(node)
+ case types.braceL: return this.parseBlock()
+ case types.semi: return this.parseEmptyStatement(node)
+ case types._export:
+ case 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 === types._import ? this.parseImport(node) : this.parseExport(node, exports)
+
+ // 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:
+ if (this.isAsyncFunction() && declaration) {
+ this.next();
+ return this.parseFunctionStatement(node, true)
+ }
+
+ var maybeName = this.value, expr = this.parseExpression();
+ if (starttype === types.name && expr.type === "Identifier" && this.eat(types.colon))
+ { return this.parseLabeledStatement(node, maybeName, expr) }
+ else { return this.parseExpressionStatement(node, expr) }
+ }
+};
+
+pp$1.parseBreakContinueStatement = function(node, keyword) {
+ var this$1 = this;
+
+ var isBreak = keyword == "break";
+ this.next();
+ if (this.eat(types.semi) || this.insertSemicolon()) { node.label = null; }
+ else if (this.type !== types.name) { this.unexpected(); }
+ else {
+ node.label = this.parseIdent();
+ this.semicolon();
+ }
+
+ // Verify that there is an actual destination to break or
+ // continue to.
+ var i = 0;
+ for (; i < this.labels.length; ++i) {
+ var lab = this$1.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$1.parseDebuggerStatement = function(node) {
+ this.next();
+ this.semicolon();
+ return this.finishNode(node, "DebuggerStatement")
+};
+
+pp$1.parseDoStatement = function(node) {
+ this.next();
+ this.labels.push(loopLabel);
+ node.body = this.parseStatement(false);
+ this.labels.pop();
+ this.expect(types._while);
+ node.test = this.parseParenExpression();
+ if (this.options.ecmaVersion >= 6)
+ { this.eat(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$1.parseForStatement = function(node) {
+ this.next();
+ this.labels.push(loopLabel);
+ this.enterLexicalScope();
+ this.expect(types.parenL);
+ if (this.type === types.semi) { return this.parseFor(node, null) }
+ var isLet = this.isLet();
+ if (this.type === types._var || this.type === types._const || isLet) {
+ var init$1 = this.startNode(), kind = isLet ? "let" : this.value;
+ this.next();
+ this.parseVar(init$1, true, kind);
+ this.finishNode(init$1, "VariableDeclaration");
+ if ((this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) && init$1.declarations.length === 1 &&
+ !(kind !== "var" && init$1.declarations[0].init))
+ { return this.parseForIn(node, init$1) }
+ return this.parseFor(node, init$1)
+ }
+ var refDestructuringErrors = new DestructuringErrors;
+ var init = this.parseExpression(true, refDestructuringErrors);
+ if (this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
+ this.toAssignable(init);
+ this.checkLVal(init);
+ this.checkPatternErrors(refDestructuringErrors, true);
+ return this.parseForIn(node, init)
+ } else {
+ this.checkExpressionErrors(refDestructuringErrors, true);
+ }
+ return this.parseFor(node, init)
+};
+
+pp$1.parseFunctionStatement = function(node, isAsync) {
+ this.next();
+ return this.parseFunction(node, true, false, isAsync)
+};
+
+pp$1.isFunction = function() {
+ return this.type === types._function || this.isAsyncFunction()
+};
+
+pp$1.parseIfStatement = function(node) {
+ this.next();
+ node.test = this.parseParenExpression();
+ // allow function declarations in branches, but only in non-strict mode
+ node.consequent = this.parseStatement(!this.strict && this.isFunction());
+ node.alternate = this.eat(types._else) ? this.parseStatement(!this.strict && this.isFunction()) : null;
+ return this.finishNode(node, "IfStatement")
+};
+
+pp$1.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(types.semi) || this.insertSemicolon()) { node.argument = null; }
+ else { node.argument = this.parseExpression(); this.semicolon(); }
+ return this.finishNode(node, "ReturnStatement")
+};
+
+pp$1.parseSwitchStatement = function(node) {
+ var this$1 = this;
+
+ this.next();
+ node.discriminant = this.parseParenExpression();
+ node.cases = [];
+ this.expect(types.braceL);
+ this.labels.push(switchLabel);
+ this.enterLexicalScope();
+
+ // Statements under must be grouped (by label) in SwitchCase
+ // nodes. `cur` is used to keep the node that we are currently
+ // adding statements to.
+
+ var cur;
+ for (var sawDefault = false; this.type != types.braceR;) {
+ if (this$1.type === types._case || this$1.type === types._default) {
+ var isCase = this$1.type === types._case;
+ if (cur) { this$1.finishNode(cur, "SwitchCase"); }
+ node.cases.push(cur = this$1.startNode());
+ cur.consequent = [];
+ this$1.next();
+ if (isCase) {
+ cur.test = this$1.parseExpression();
+ } else {
+ if (sawDefault) { this$1.raiseRecoverable(this$1.lastTokStart, "Multiple default clauses"); }
+ sawDefault = true;
+ cur.test = null;
+ }
+ this$1.expect(types.colon);
+ } else {
+ if (!cur) { this$1.unexpected(); }
+ cur.consequent.push(this$1.parseStatement(true));
+ }
+ }
+ this.exitLexicalScope();
+ if (cur) { this.finishNode(cur, "SwitchCase"); }
+ this.next(); // Closing brace
+ this.labels.pop();
+ return this.finishNode(node, "SwitchStatement")
+};
+
+pp$1.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$1.parseTryStatement = function(node) {
+ this.next();
+ node.block = this.parseBlock();
+ node.handler = null;
+ if (this.type === types._catch) {
+ var clause = this.startNode();
+ this.next();
+ this.expect(types.parenL);
+ clause.param = this.parseBindingAtom();
+ this.enterLexicalScope();
+ this.checkLVal(clause.param, "let");
+ this.expect(types.parenR);
+ clause.body = this.parseBlock(false);
+ this.exitLexicalScope();
+ node.handler = this.finishNode(clause, "CatchClause");
+ }
+ node.finalizer = this.eat(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$1.parseVarStatement = function(node, kind) {
+ this.next();
+ this.parseVar(node, false, kind);
+ this.semicolon();
+ return this.finishNode(node, "VariableDeclaration")
+};
+
+pp$1.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$1.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$1.parseEmptyStatement = function(node) {
+ this.next();
+ return this.finishNode(node, "EmptyStatement")
+};
+
+pp$1.parseLabeledStatement = function(node, maybeName, expr) {
+ var this$1 = this;
+
+ for (var i$1 = 0, list = this$1.labels; i$1 < list.length; i$1 += 1)
+ {
+ var label = list[i$1];
+
+ if (label.name === maybeName)
+ { this$1.raise(expr.start, "Label '" + maybeName + "' is already declared");
+ } }
+ var kind = this.type.isLoop ? "loop" : this.type === types._switch ? "switch" : null;
+ for (var i = this.labels.length - 1; i >= 0; i--) {
+ var label$1 = this$1.labels[i];
+ if (label$1.statementStart == node.start) {
+ label$1.statementStart = this$1.start;
+ label$1.kind = kind;
+ } else { break }
+ }
+ this.labels.push({name: maybeName, kind: kind, statementStart: this.start});
+ node.body = this.parseStatement(true);
+ if (node.body.type == "ClassDeclaration" ||
+ node.body.type == "VariableDeclaration" && node.body.kind != "var" ||
+ node.body.type == "FunctionDeclaration" && (this.strict || node.body.generator))
+ { this.raiseRecoverable(node.body.start, "Invalid labeled declaration"); }
+ this.labels.pop();
+ node.label = expr;
+ return this.finishNode(node, "LabeledStatement")
+};
+
+pp$1.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$1.parseBlock = function(createNewLexicalScope) {
+ var this$1 = this;
+ if ( createNewLexicalScope === void 0 ) createNewLexicalScope = true;
+
+ var node = this.startNode();
+ node.body = [];
+ this.expect(types.braceL);
+ if (createNewLexicalScope) {
+ this.enterLexicalScope();
+ }
+ while (!this.eat(types.braceR)) {
+ var stmt = this$1.parseStatement(true);
+ node.body.push(stmt);
+ }
+ if (createNewLexicalScope) {
+ this.exitLexicalScope();
+ }
+ 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$1.parseFor = function(node, init) {
+ node.init = init;
+ this.expect(types.semi);
+ node.test = this.type === types.semi ? null : this.parseExpression();
+ this.expect(types.semi);
+ node.update = this.type === types.parenR ? null : this.parseExpression();
+ this.expect(types.parenR);
+ this.exitLexicalScope();
+ 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$1.parseForIn = function(node, init) {
+ var type = this.type === types._in ? "ForInStatement" : "ForOfStatement";
+ this.next();
+ node.left = init;
+ node.right = this.parseExpression();
+ this.expect(types.parenR);
+ this.exitLexicalScope();
+ node.body = this.parseStatement(false);
+ this.labels.pop();
+ return this.finishNode(node, type)
+};
+
+// Parse a list of variable declarations.
+
+pp$1.parseVar = function(node, isFor, kind) {
+ var this$1 = this;
+
+ node.declarations = [];
+ node.kind = kind;
+ for (;;) {
+ var decl = this$1.startNode();
+ this$1.parseVarId(decl, kind);
+ if (this$1.eat(types.eq)) {
+ decl.init = this$1.parseMaybeAssign(isFor);
+ } else if (kind === "const" && !(this$1.type === types._in || (this$1.options.ecmaVersion >= 6 && this$1.isContextual("of")))) {
+ this$1.unexpected();
+ } else if (decl.id.type != "Identifier" && !(isFor && (this$1.type === types._in || this$1.isContextual("of")))) {
+ this$1.raise(this$1.lastTokEnd, "Complex binding patterns require an initialization value");
+ } else {
+ decl.init = null;
+ }
+ node.declarations.push(this$1.finishNode(decl, "VariableDeclarator"));
+ if (!this$1.eat(types.comma)) { break }
+ }
+ return node
+};
+
+pp$1.parseVarId = function(decl, kind) {
+ decl.id = this.parseBindingAtom(kind);
+ this.checkLVal(decl.id, kind, false);
+};
+
+// Parse a function declaration or literal (depending on the
+// `isStatement` parameter).
+
+pp$1.parseFunction = function(node, isStatement, allowExpressionBody, isAsync) {
+ this.initFunction(node);
+ if (this.options.ecmaVersion >= 6 && !isAsync)
+ { node.generator = this.eat(types.star); }
+ if (this.options.ecmaVersion >= 8)
+ { node.async = !!isAsync; }
+
+ if (isStatement) {
+ node.id = isStatement === "nullableID" && this.type != types.name ? null : this.parseIdent();
+ if (node.id) {
+ this.checkLVal(node.id, "var");
+ }
+ }
+
+ var oldInGen = this.inGenerator, oldInAsync = this.inAsync,
+ oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldInFunc = this.inFunction;
+ this.inGenerator = node.generator;
+ this.inAsync = node.async;
+ this.yieldPos = 0;
+ this.awaitPos = 0;
+ this.inFunction = true;
+ this.enterFunctionScope();
+
+ if (!isStatement)
+ { node.id = this.type == types.name ? this.parseIdent() : null; }
+
+ this.parseFunctionParams(node);
+ this.parseFunctionBody(node, allowExpressionBody);
+
+ this.inGenerator = oldInGen;
+ this.inAsync = oldInAsync;
+ this.yieldPos = oldYieldPos;
+ this.awaitPos = oldAwaitPos;
+ this.inFunction = oldInFunc;
+ return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression")
+};
+
+pp$1.parseFunctionParams = function(node) {
+ this.expect(types.parenL);
+ node.params = this.parseBindingList(types.parenR, false, this.options.ecmaVersion >= 8);
+ this.checkYieldAwaitInDefaultParams();
+};
+
+// Parse a class declaration or literal (depending on the
+// `isStatement` parameter).
+
+pp$1.parseClass = function(node, isStatement) {
+ var this$1 = this;
+
+ this.next();
+
+ this.parseClassId(node, isStatement);
+ this.parseClassSuper(node);
+ var classBody = this.startNode();
+ var hadConstructor = false;
+ classBody.body = [];
+ this.expect(types.braceL);
+ while (!this.eat(types.braceR)) {
+ if (this$1.eat(types.semi)) { continue }
+ var method = this$1.startNode();
+ var isGenerator = this$1.eat(types.star);
+ var isAsync = false;
+ var isMaybeStatic = this$1.type === types.name && this$1.value === "static";
+ this$1.parsePropertyName(method);
+ method.static = isMaybeStatic && this$1.type !== types.parenL;
+ if (method.static) {
+ if (isGenerator) { this$1.unexpected(); }
+ isGenerator = this$1.eat(types.star);
+ this$1.parsePropertyName(method);
+ }
+ if (this$1.options.ecmaVersion >= 8 && !isGenerator && !method.computed &&
+ method.key.type === "Identifier" && method.key.name === "async" && this$1.type !== types.parenL &&
+ !this$1.canInsertSemicolon()) {
+ isAsync = true;
+ this$1.parsePropertyName(method);
+ }
+ method.kind = "method";
+ var isGetSet = false;
+ if (!method.computed) {
+ var key = method.key;
+ if (!isGenerator && !isAsync && key.type === "Identifier" && this$1.type !== types.parenL && (key.name === "get" || key.name === "set")) {
+ isGetSet = true;
+ method.kind = key.name;
+ key = this$1.parsePropertyName(method);
+ }
+ if (!method.static && (key.type === "Identifier" && key.name === "constructor" ||
+ key.type === "Literal" && key.value === "constructor")) {
+ if (hadConstructor) { this$1.raise(key.start, "Duplicate constructor in the same class"); }
+ if (isGetSet) { this$1.raise(key.start, "Constructor can't have get/set modifier"); }
+ if (isGenerator) { this$1.raise(key.start, "Constructor can't be a generator"); }
+ if (isAsync) { this$1.raise(key.start, "Constructor can't be an async method"); }
+ method.kind = "constructor";
+ hadConstructor = true;
+ }
+ }
+ this$1.parseClassMethod(classBody, method, isGenerator, isAsync);
+ 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$1.raiseRecoverable(start, "getter should have no params"); }
+ else
+ { this$1.raiseRecoverable(start, "setter should have exactly one param"); }
+ } else {
+ if (method.kind === "set" && method.value.params[0].type === "RestElement")
+ { this$1.raiseRecoverable(method.value.params[0].start, "Setter cannot use rest params"); }
+ }
+ }
+ }
+ node.body = this.finishNode(classBody, "ClassBody");
+ return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression")
+};
+
+pp$1.parseClassMethod = function(classBody, method, isGenerator, isAsync) {
+ method.value = this.parseMethod(isGenerator, isAsync);
+ classBody.body.push(this.finishNode(method, "MethodDefinition"));
+};
+
+pp$1.parseClassId = function(node, isStatement) {
+ node.id = this.type === types.name ? this.parseIdent() : isStatement === true ? this.unexpected() : null;
+};
+
+pp$1.parseClassSuper = function(node) {
+ node.superClass = this.eat(types._extends) ? this.parseExprSubscripts() : null;
+};
+
+// Parses module export declaration.
+
+pp$1.parseExport = function(node, exports) {
+ var this$1 = this;
+
+ this.next();
+ // export * from '...'
+ if (this.eat(types.star)) {
+ this.expectContextual("from");
+ node.source = this.type === types.string ? this.parseExprAtom() : this.unexpected();
+ this.semicolon();
+ return this.finishNode(node, "ExportAllDeclaration")
+ }
+ if (this.eat(types._default)) { // export default ...
+ this.checkExport(exports, "default", this.lastTokStart);
+ var isAsync;
+ if (this.type === types._function || (isAsync = this.isAsyncFunction())) {
+ var fNode = this.startNode();
+ this.next();
+ if (isAsync) { this.next(); }
+ node.declaration = this.parseFunction(fNode, "nullableID", false, isAsync);
+ } else if (this.type === types._class) {
+ var cNode = this.startNode();
+ node.declaration = this.parseClass(cNode, "nullableID");
+ } else {
+ node.declaration = this.parseMaybeAssign();
+ this.semicolon();
+ }
+ return this.finishNode(node, "ExportDefaultDeclaration")
+ }
+ // export var|const|let|function|class ...
+ if (this.shouldParseExportStatement()) {
+ node.declaration = this.parseStatement(true);
+ if (node.declaration.type === "VariableDeclaration")
+ { this.checkVariableExport(exports, node.declaration.declarations); }
+ else
+ { this.checkExport(exports, node.declaration.id.name, node.declaration.id.start); }
+ node.specifiers = [];
+ node.source = null;
+ } else { // export { x, y as z } [from '...']
+ node.declaration = null;
+ node.specifiers = this.parseExportSpecifiers(exports);
+ if (this.eatContextual("from")) {
+ node.source = this.type === types.string ? this.parseExprAtom() : this.unexpected();
+ } else {
+ // check for keywords used as local names
+ for (var i = 0, list = node.specifiers; i < list.length; i += 1) {
+ var spec = list[i];
+
+ this$1.checkUnreserved(spec.local);
+ }
+
+ node.source = null;
+ }
+ this.semicolon();
+ }
+ return this.finishNode(node, "ExportNamedDeclaration")
+};
+
+pp$1.checkExport = function(exports, name, pos) {
+ if (!exports) { return }
+ if (has(exports, name))
+ { this.raiseRecoverable(pos, "Duplicate export '" + name + "'"); }
+ exports[name] = true;
+};
+
+pp$1.checkPatternExport = function(exports, pat) {
+ var this$1 = this;
+
+ var type = pat.type;
+ if (type == "Identifier")
+ { this.checkExport(exports, pat.name, pat.start); }
+ else if (type == "ObjectPattern")
+ { for (var i = 0, list = pat.properties; i < list.length; i += 1)
+ {
+ var prop = list[i];
+
+ this$1.checkPatternExport(exports, prop.value);
+ } }
+ else if (type == "ArrayPattern")
+ { for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) {
+ var elt = list$1[i$1];
+
+ if (elt) { this$1.checkPatternExport(exports, elt); }
+ } }
+ else if (type == "AssignmentPattern")
+ { this.checkPatternExport(exports, pat.left); }
+ else if (type == "ParenthesizedExpression")
+ { this.checkPatternExport(exports, pat.expression); }
+};
+
+pp$1.checkVariableExport = function(exports, decls) {
+ var this$1 = this;
+
+ if (!exports) { return }
+ for (var i = 0, list = decls; i < list.length; i += 1)
+ {
+ var decl = list[i];
+
+ this$1.checkPatternExport(exports, decl.id);
+ }
+};
+
+pp$1.shouldParseExportStatement = function() {
+ return this.type.keyword === "var" ||
+ this.type.keyword === "const" ||
+ this.type.keyword === "class" ||
+ this.type.keyword === "function" ||
+ this.isLet() ||
+ this.isAsyncFunction()
+};
+
+// Parses a comma-separated list of module exports.
+
+pp$1.parseExportSpecifiers = function(exports) {
+ var this$1 = this;
+
+ var nodes = [], first = true;
+ // export { x, y as z } [from '...']
+ this.expect(types.braceL);
+ while (!this.eat(types.braceR)) {
+ if (!first) {
+ this$1.expect(types.comma);
+ if (this$1.afterTrailingComma(types.braceR)) { break }
+ } else { first = false; }
+
+ var node = this$1.startNode();
+ node.local = this$1.parseIdent(true);
+ node.exported = this$1.eatContextual("as") ? this$1.parseIdent(true) : node.local;
+ this$1.checkExport(exports, node.exported.name, node.exported.start);
+ nodes.push(this$1.finishNode(node, "ExportSpecifier"));
+ }
+ return nodes
+};
+
+// Parses import declaration.
+
+pp$1.parseImport = function(node) {
+ this.next();
+ // import '...'
+ if (this.type === types.string) {
+ node.specifiers = empty;
+ node.source = this.parseExprAtom();
+ } else {
+ node.specifiers = this.parseImportSpecifiers();
+ this.expectContextual("from");
+ node.source = this.type === types.string ? this.parseExprAtom() : this.unexpected();
+ }
+ this.semicolon();
+ return this.finishNode(node, "ImportDeclaration")
+};
+
+// Parses a comma-separated list of module imports.
+
+pp$1.parseImportSpecifiers = function() {
+ var this$1 = this;
+
+ var nodes = [], first = true;
+ if (this.type === types.name) {
+ // import defaultObj, { x, y as z } from '...'
+ var node = this.startNode();
+ node.local = this.parseIdent();
+ this.checkLVal(node.local, "let");
+ nodes.push(this.finishNode(node, "ImportDefaultSpecifier"));
+ if (!this.eat(types.comma)) { return nodes }
+ }
+ if (this.type === types.star) {
+ var node$1 = this.startNode();
+ this.next();
+ this.expectContextual("as");
+ node$1.local = this.parseIdent();
+ this.checkLVal(node$1.local, "let");
+ nodes.push(this.finishNode(node$1, "ImportNamespaceSpecifier"));
+ return nodes
+ }
+ this.expect(types.braceL);
+ while (!this.eat(types.braceR)) {
+ if (!first) {
+ this$1.expect(types.comma);
+ if (this$1.afterTrailingComma(types.braceR)) { break }
+ } else { first = false; }
+
+ var node$2 = this$1.startNode();
+ node$2.imported = this$1.parseIdent(true);
+ if (this$1.eatContextual("as")) {
+ node$2.local = this$1.parseIdent();
+ } else {
+ this$1.checkUnreserved(node$2.imported);
+ node$2.local = node$2.imported;
+ }
+ this$1.checkLVal(node$2.local, "let");
+ nodes.push(this$1.finishNode(node$2, "ImportSpecifier"));
+ }
+ return nodes
+};
+
+// Set `ExpressionStatement#directive` property for directive prologues.
+pp$1.adaptDirectivePrologue = function(statements) {
+ for (var i = 0; i < statements.length && this.isDirectiveCandidate(statements[i]); ++i) {
+ statements[i].directive = statements[i].expression.raw.slice(1, -1);
+ }
+};
+pp$1.isDirectiveCandidate = function(statement) {
+ return (
+ statement.type === "ExpressionStatement" &&
+ statement.expression.type === "Literal" &&
+ typeof statement.expression.value === "string" &&
+ // Reject parenthesized strings.
+ (this.input[statement.start] === "\"" || this.input[statement.start] === "'")
+ )
+};
+
+var pp$2 = Parser.prototype;
+
+// Convert existing expression atom to assignable pattern
+// if possible.
+
+pp$2.toAssignable = function(node, isBinding) {
+ var this$1 = this;
+
+ if (this.options.ecmaVersion >= 6 && node) {
+ switch (node.type) {
+ case "Identifier":
+ if (this.inAsync && node.name === "await")
+ { this.raise(node.start, "Can not use 'await' as identifier inside an async function"); }
+ break
+
+ case "ObjectPattern":
+ case "ArrayPattern":
+ break
+
+ case "ObjectExpression":
+ node.type = "ObjectPattern";
+ for (var i = 0, list = node.properties; i < list.length; i += 1) {
+ var prop = list[i];
+
+ if (prop.kind !== "init") { this$1.raise(prop.key.start, "Object pattern can't contain getter or setter"); }
+ this$1.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;
+ this.toAssignable(node.left, isBinding);
+ // falls through to AssignmentPattern
+ } else {
+ this.raise(node.left.end, "Only '=' operator can be used for specifying default value.");
+ break
+ }
+
+ case "AssignmentPattern":
+ break
+
+ case "ParenthesizedExpression":
+ 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$2.toAssignableList = function(exprList, isBinding) {
+ var this$1 = this;
+
+ 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);
+ --end;
+ }
+
+ if (this.options.ecmaVersion === 6 && isBinding && last && 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$1.toAssignable(elt, isBinding); }
+ }
+ return exprList
+};
+
+// Parses spread element.
+
+pp$2.parseSpread = function(refDestructuringErrors) {
+ var node = this.startNode();
+ this.next();
+ node.argument = this.parseMaybeAssign(false, refDestructuringErrors);
+ return this.finishNode(node, "SpreadElement")
+};
+
+pp$2.parseRestBinding = function() {
+ var node = this.startNode();
+ this.next();
+
+ // RestElement inside of a function parameter must be an identifier
+ if (this.options.ecmaVersion === 6 && this.type !== types.name)
+ { this.unexpected(); }
+
+ node.argument = this.parseBindingAtom();
+
+ return this.finishNode(node, "RestElement")
+};
+
+// Parses lvalue (assignable) atom.
+
+pp$2.parseBindingAtom = function() {
+ if (this.options.ecmaVersion >= 6) {
+ switch (this.type) {
+ case types.bracketL:
+ var node = this.startNode();
+ this.next();
+ node.elements = this.parseBindingList(types.bracketR, true, true);
+ return this.finishNode(node, "ArrayPattern")
+
+ case types.braceL:
+ return this.parseObj(true)
+ }
+ }
+ return this.parseIdent()
+};
+
+pp$2.parseBindingList = function(close, allowEmpty, allowTrailingComma) {
+ var this$1 = this;
+
+ var elts = [], first = true;
+ while (!this.eat(close)) {
+ if (first) { first = false; }
+ else { this$1.expect(types.comma); }
+ if (allowEmpty && this$1.type === types.comma) {
+ elts.push(null);
+ } else if (allowTrailingComma && this$1.afterTrailingComma(close)) {
+ break
+ } else if (this$1.type === types.ellipsis) {
+ var rest = this$1.parseRestBinding();
+ this$1.parseBindingListItem(rest);
+ elts.push(rest);
+ if (this$1.type === types.comma) { this$1.raise(this$1.start, "Comma is not permitted after the rest element"); }
+ this$1.expect(close);
+ break
+ } else {
+ var elem = this$1.parseMaybeDefault(this$1.start, this$1.startLoc);
+ this$1.parseBindingListItem(elem);
+ elts.push(elem);
+ }
+ }
+ return elts
+};
+
+pp$2.parseBindingListItem = function(param) {
+ return param
+};
+
+// Parses assignment pattern around given atom if possible.
+
+pp$2.parseMaybeDefault = function(startPos, startLoc, left) {
+ left = left || this.parseBindingAtom();
+ if (this.options.ecmaVersion < 6 || !this.eat(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.
+// bindingType can be either:
+// 'var' indicating that the lval creates a 'var' binding
+// 'let' indicating that the lval creates a lexical ('let' or 'const') binding
+// 'none' indicating that the binding should be checked for illegal identifiers, but not for duplicate references
+
+pp$2.checkLVal = function(expr, bindingType, checkClashes) {
+ var this$1 = this;
+
+ switch (expr.type) {
+ case "Identifier":
+ if (this.strict && this.reservedWordsStrictBind.test(expr.name))
+ { this.raiseRecoverable(expr.start, (bindingType ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); }
+ if (checkClashes) {
+ if (has(checkClashes, expr.name))
+ { this.raiseRecoverable(expr.start, "Argument name clash"); }
+ checkClashes[expr.name] = true;
+ }
+ if (bindingType && bindingType !== "none") {
+ if (
+ bindingType === "var" && !this.canDeclareVarName(expr.name) ||
+ bindingType !== "var" && !this.canDeclareLexicalName(expr.name)
+ ) {
+ this.raiseRecoverable(expr.start, ("Identifier '" + (expr.name) + "' has already been declared"));
+ }
+ if (bindingType === "var") {
+ this.declareVarName(expr.name);
+ } else {
+ this.declareLexicalName(expr.name);
+ }
+ }
+ break
+
+ case "MemberExpression":
+ if (bindingType) { this.raiseRecoverable(expr.start, (bindingType ? "Binding" : "Assigning to") + " member expression"); }
+ break
+
+ case "ObjectPattern":
+ for (var i = 0, list = expr.properties; i < list.length; i += 1)
+ {
+ var prop = list[i];
+
+ this$1.checkLVal(prop.value, bindingType, checkClashes);
+ }
+ break
+
+ case "ArrayPattern":
+ for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) {
+ var elem = list$1[i$1];
+
+ if (elem) { this$1.checkLVal(elem, bindingType, checkClashes); }
+ }
+ break
+
+ case "AssignmentPattern":
+ this.checkLVal(expr.left, bindingType, checkClashes);
+ break
+
+ case "RestElement":
+ this.checkLVal(expr.argument, bindingType, checkClashes);
+ break
+
+ case "ParenthesizedExpression":
+ this.checkLVal(expr.expression, bindingType, checkClashes);
+ break
+
+ default:
+ this.raise(expr.start, (bindingType ? "Binding" : "Assigning to") + " rvalue");
+ }
+};
+
+// 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
+
+var pp$3 = 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$3.checkPropClash = function(prop, propHash) {
+ if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand))
+ { return }
+ var key = prop.key;
+ var name;
+ 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.raiseRecoverable(key.start, "Redefinition of __proto__ property"); }
+ propHash.proto = true;
+ }
+ return
+ }
+ name = "$" + name;
+ var other = propHash[name];
+ if (other) {
+ var redefinition;
+ if (kind === "init") {
+ redefinition = this.strict && other.init || other.get || other.set;
+ } else {
+ redefinition = other.init || other[kind];
+ }
+ if (redefinition)
+ { this.raiseRecoverable(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$3.parseExpression = function(noIn, refDestructuringErrors) {
+ var this$1 = this;
+
+ var startPos = this.start, startLoc = this.startLoc;
+ var expr = this.parseMaybeAssign(noIn, refDestructuringErrors);
+ if (this.type === types.comma) {
+ var node = this.startNodeAt(startPos, startLoc);
+ node.expressions = [expr];
+ while (this.eat(types.comma)) { node.expressions.push(this$1.parseMaybeAssign(noIn, refDestructuringErrors)); }
+ return this.finishNode(node, "SequenceExpression")
+ }
+ return expr
+};
+
+// Parse an assignment expression. This includes applications of
+// operators like `+=`.
+
+pp$3.parseMaybeAssign = function(noIn, refDestructuringErrors, afterLeftParse) {
+ if (this.inGenerator && this.isContextual("yield")) { return this.parseYield() }
+
+ var ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1;
+ if (refDestructuringErrors) {
+ oldParenAssign = refDestructuringErrors.parenthesizedAssign;
+ oldTrailingComma = refDestructuringErrors.trailingComma;
+ refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = -1;
+ } else {
+ refDestructuringErrors = new DestructuringErrors;
+ ownDestructuringErrors = true;
+ }
+
+ var startPos = this.start, startLoc = this.startLoc;
+ if (this.type == types.parenL || this.type == 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) {
+ this.checkPatternErrors(refDestructuringErrors, true);
+ if (!ownDestructuringErrors) { DestructuringErrors.call(refDestructuringErrors); }
+ var node = this.startNodeAt(startPos, startLoc);
+ node.operator = this.value;
+ node.left = this.type === types.eq ? this.toAssignable(left) : left;
+ refDestructuringErrors.shorthandAssign = -1; // reset because shorthand default was used correctly
+ this.checkLVal(left);
+ this.next();
+ node.right = this.parseMaybeAssign(noIn);
+ return this.finishNode(node, "AssignmentExpression")
+ } else {
+ if (ownDestructuringErrors) { this.checkExpressionErrors(refDestructuringErrors, true); }
+ }
+ if (oldParenAssign > -1) { refDestructuringErrors.parenthesizedAssign = oldParenAssign; }
+ if (oldTrailingComma > -1) { refDestructuringErrors.trailingComma = oldTrailingComma; }
+ return left
+};
+
+// Parse a ternary conditional (`?:`) operator.
+
+pp$3.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(types.question)) {
+ var node = this.startNodeAt(startPos, startLoc);
+ node.test = expr;
+ node.consequent = this.parseMaybeAssign();
+ this.expect(types.colon);
+ node.alternate = this.parseMaybeAssign(noIn);
+ return this.finishNode(node, "ConditionalExpression")
+ }
+ return expr
+};
+
+// Start the precedence parser.
+
+pp$3.parseExprOps = function(noIn, refDestructuringErrors) {
+ var startPos = this.start, startLoc = this.startLoc;
+ var expr = this.parseMaybeUnary(refDestructuringErrors, false);
+ if (this.checkExpressionErrors(refDestructuringErrors)) { return expr }
+ return expr.start == startPos && expr.type === "ArrowFunctionExpression" ? expr : 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$3.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, noIn) {
+ var prec = this.type.binop;
+ if (prec != null && (!noIn || this.type !== types._in)) {
+ if (prec > minPrec) {
+ var logical = this.type === types.logicalOR || this.type === types.logicalAND;
+ var op = this.value;
+ this.next();
+ var startPos = this.start, startLoc = this.startLoc;
+ var right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, noIn);
+ var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical);
+ return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn)
+ }
+ }
+ return left
+};
+
+pp$3.buildBinary = function(startPos, startLoc, left, right, op, logical) {
+ var node = this.startNodeAt(startPos, startLoc);
+ node.left = left;
+ node.operator = op;
+ node.right = right;
+ return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression")
+};
+
+// Parse unary operators, both prefix and postfix.
+
+pp$3.parseMaybeUnary = function(refDestructuringErrors, sawUnary) {
+ var this$1 = this;
+
+ var startPos = this.start, startLoc = this.startLoc, expr;
+ if (this.inAsync && this.isContextual("await")) {
+ expr = this.parseAwait();
+ sawUnary = true;
+ } else if (this.type.prefix) {
+ var node = this.startNode(), update = this.type === types.incDec;
+ node.operator = this.value;
+ node.prefix = true;
+ this.next();
+ node.argument = this.parseMaybeUnary(null, true);
+ this.checkExpressionErrors(refDestructuringErrors, true);
+ if (update) { this.checkLVal(node.argument); }
+ else if (this.strict && node.operator === "delete" &&
+ node.argument.type === "Identifier")
+ { this.raiseRecoverable(node.start, "Deleting local variable in strict mode"); }
+ else { sawUnary = true; }
+ expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression");
+ } else {
+ expr = this.parseExprSubscripts(refDestructuringErrors);
+ if (this.checkExpressionErrors(refDestructuringErrors)) { return expr }
+ while (this.type.postfix && !this.canInsertSemicolon()) {
+ var node$1 = this$1.startNodeAt(startPos, startLoc);
+ node$1.operator = this$1.value;
+ node$1.prefix = false;
+ node$1.argument = expr;
+ this$1.checkLVal(expr);
+ this$1.next();
+ expr = this$1.finishNode(node$1, "UpdateExpression");
+ }
+ }
+
+ if (!sawUnary && this.eat(types.starstar))
+ { return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false), "**", false) }
+ else
+ { return expr }
+};
+
+// Parse call, dot, and `[]`-subscript expressions.
+
+pp$3.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 }
+ var result = this.parseSubscripts(expr, startPos, startLoc);
+ if (refDestructuringErrors && result.type === "MemberExpression") {
+ if (refDestructuringErrors.parenthesizedAssign >= result.start) { refDestructuringErrors.parenthesizedAssign = -1; }
+ if (refDestructuringErrors.parenthesizedBind >= result.start) { refDestructuringErrors.parenthesizedBind = -1; }
+ }
+ return result
+};
+
+pp$3.parseSubscripts = function(base, startPos, startLoc, noCalls) {
+ var this$1 = this;
+
+ var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" &&
+ this.lastTokEnd == base.end && !this.canInsertSemicolon();
+ for (var computed = (void 0);;) {
+ if ((computed = this$1.eat(types.bracketL)) || this$1.eat(types.dot)) {
+ var node = this$1.startNodeAt(startPos, startLoc);
+ node.object = base;
+ node.property = computed ? this$1.parseExpression() : this$1.parseIdent(true);
+ node.computed = !!computed;
+ if (computed) { this$1.expect(types.bracketR); }
+ base = this$1.finishNode(node, "MemberExpression");
+ } else if (!noCalls && this$1.eat(types.parenL)) {
+ var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this$1.yieldPos, oldAwaitPos = this$1.awaitPos;
+ this$1.yieldPos = 0;
+ this$1.awaitPos = 0;
+ var exprList = this$1.parseExprList(types.parenR, this$1.options.ecmaVersion >= 8, false, refDestructuringErrors);
+ if (maybeAsyncArrow && !this$1.canInsertSemicolon() && this$1.eat(types.arrow)) {
+ this$1.checkPatternErrors(refDestructuringErrors, false);
+ this$1.checkYieldAwaitInDefaultParams();
+ this$1.yieldPos = oldYieldPos;
+ this$1.awaitPos = oldAwaitPos;
+ return this$1.parseArrowExpression(this$1.startNodeAt(startPos, startLoc), exprList, true)
+ }
+ this$1.checkExpressionErrors(refDestructuringErrors, true);
+ this$1.yieldPos = oldYieldPos || this$1.yieldPos;
+ this$1.awaitPos = oldAwaitPos || this$1.awaitPos;
+ var node$1 = this$1.startNodeAt(startPos, startLoc);
+ node$1.callee = base;
+ node$1.arguments = exprList;
+ base = this$1.finishNode(node$1, "CallExpression");
+ } else if (this$1.type === types.backQuote) {
+ var node$2 = this$1.startNodeAt(startPos, startLoc);
+ node$2.tag = base;
+ node$2.quasi = this$1.parseTemplate({isTagged: true});
+ base = this$1.finishNode(node$2, "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$3.parseExprAtom = function(refDestructuringErrors) {
+ var node, canBeArrow = this.potentialArrowAt == this.start;
+ switch (this.type) {
+ case types._super:
+ if (!this.inFunction)
+ { this.raise(this.start, "'super' outside of function or class"); }
+ node = this.startNode();
+ this.next();
+ // The `super` keyword can appear at below:
+ // SuperProperty:
+ // super [ Expression ]
+ // super . IdentifierName
+ // SuperCall:
+ // super Arguments
+ if (this.type !== types.dot && this.type !== types.bracketL && this.type !== types.parenL)
+ { this.unexpected(); }
+ return this.finishNode(node, "Super")
+
+ case types._this:
+ node = this.startNode();
+ this.next();
+ return this.finishNode(node, "ThisExpression")
+
+ case types.name:
+ var startPos = this.start, startLoc = this.startLoc;
+ var id = this.parseIdent(this.type !== types.name);
+ if (this.options.ecmaVersion >= 8 && id.name === "async" && !this.canInsertSemicolon() && this.eat(types._function))
+ { return this.parseFunction(this.startNodeAt(startPos, startLoc), false, false, true) }
+ if (canBeArrow && !this.canInsertSemicolon()) {
+ if (this.eat(types.arrow))
+ { return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false) }
+ if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === types.name) {
+ id = this.parseIdent();
+ if (this.canInsertSemicolon() || !this.eat(types.arrow))
+ { this.unexpected(); }
+ return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true)
+ }
+ }
+ return id
+
+ case types.regexp:
+ var value = this.value;
+ node = this.parseLiteral(value.value);
+ node.regex = {pattern: value.pattern, flags: value.flags};
+ return node
+
+ case types.num: case types.string:
+ return this.parseLiteral(this.value)
+
+ case types._null: case types._true: case types._false:
+ node = this.startNode();
+ node.value = this.type === types._null ? null : this.type === types._true;
+ node.raw = this.type.keyword;
+ this.next();
+ return this.finishNode(node, "Literal")
+
+ case types.parenL:
+ var start = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow);
+ if (refDestructuringErrors) {
+ if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr))
+ { refDestructuringErrors.parenthesizedAssign = start; }
+ if (refDestructuringErrors.parenthesizedBind < 0)
+ { refDestructuringErrors.parenthesizedBind = start; }
+ }
+ return expr
+
+ case types.bracketL:
+ node = this.startNode();
+ this.next();
+ node.elements = this.parseExprList(types.bracketR, true, true, refDestructuringErrors);
+ return this.finishNode(node, "ArrayExpression")
+
+ case types.braceL:
+ return this.parseObj(false, refDestructuringErrors)
+
+ case types._function:
+ node = this.startNode();
+ this.next();
+ return this.parseFunction(node, false)
+
+ case types._class:
+ return this.parseClass(this.startNode(), false)
+
+ case types._new:
+ return this.parseNew()
+
+ case types.backQuote:
+ return this.parseTemplate()
+
+ default:
+ this.unexpected();
+ }
+};
+
+pp$3.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$3.parseParenExpression = function() {
+ this.expect(types.parenL);
+ var val = this.parseExpression();
+ this.expect(types.parenR);
+ return val
+};
+
+pp$3.parseParenAndDistinguishExpression = function(canBeArrow) {
+ var this$1 = this;
+
+ var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8;
+ if (this.options.ecmaVersion >= 6) {
+ this.next();
+
+ var innerStartPos = this.start, innerStartLoc = this.startLoc;
+ var exprList = [], first = true, lastIsComma = false;
+ var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart, innerParenStart;
+ this.yieldPos = 0;
+ this.awaitPos = 0;
+ while (this.type !== types.parenR) {
+ first ? first = false : this$1.expect(types.comma);
+ if (allowTrailingComma && this$1.afterTrailingComma(types.parenR, true)) {
+ lastIsComma = true;
+ break
+ } else if (this$1.type === types.ellipsis) {
+ spreadStart = this$1.start;
+ exprList.push(this$1.parseParenItem(this$1.parseRestBinding()));
+ if (this$1.type === types.comma) { this$1.raise(this$1.start, "Comma is not permitted after the rest element"); }
+ break
+ } else {
+ if (this$1.type === types.parenL && !innerParenStart) {
+ innerParenStart = this$1.start;
+ }
+ exprList.push(this$1.parseMaybeAssign(false, refDestructuringErrors, this$1.parseParenItem));
+ }
+ }
+ var innerEndPos = this.start, innerEndLoc = this.startLoc;
+ this.expect(types.parenR);
+
+ if (canBeArrow && !this.canInsertSemicolon() && this.eat(types.arrow)) {
+ this.checkPatternErrors(refDestructuringErrors, false);
+ this.checkYieldAwaitInDefaultParams();
+ if (innerParenStart) { this.unexpected(innerParenStart); }
+ this.yieldPos = oldYieldPos;
+ this.awaitPos = oldAwaitPos;
+ return this.parseParenArrowList(startPos, startLoc, exprList)
+ }
+
+ if (!exprList.length || lastIsComma) { this.unexpected(this.lastTokStart); }
+ if (spreadStart) { this.unexpected(spreadStart); }
+ this.checkExpressionErrors(refDestructuringErrors, true);
+ this.yieldPos = oldYieldPos || this.yieldPos;
+ this.awaitPos = oldAwaitPos || this.awaitPos;
+
+ 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$3.parseParenItem = function(item) {
+ return item
+};
+
+pp$3.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$1 = [];
+
+pp$3.parseNew = function() {
+ var node = this.startNode();
+ var meta = this.parseIdent(true);
+ if (this.options.ecmaVersion >= 6 && this.eat(types.dot)) {
+ node.meta = meta;
+ node.property = this.parseIdent(true);
+ if (node.property.name !== "target")
+ { this.raiseRecoverable(node.property.start, "The only valid meta property for new is new.target"); }
+ if (!this.inFunction)
+ { this.raiseRecoverable(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(types.parenL)) { node.arguments = this.parseExprList(types.parenR, this.options.ecmaVersion >= 8, false); }
+ else { node.arguments = empty$1; }
+ return this.finishNode(node, "NewExpression")
+};
+
+// Parse template expression.
+
+pp$3.parseTemplateElement = function(ref) {
+ var isTagged = ref.isTagged;
+
+ var elem = this.startNode();
+ if (this.type === types.invalidTemplate) {
+ if (!isTagged) {
+ this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal");
+ }
+ elem.value = {
+ raw: this.value,
+ cooked: null
+ };
+ } else {
+ elem.value = {
+ raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"),
+ cooked: this.value
+ };
+ }
+ this.next();
+ elem.tail = this.type === types.backQuote;
+ return this.finishNode(elem, "TemplateElement")
+};
+
+pp$3.parseTemplate = function(ref) {
+ var this$1 = this;
+ if ( ref === void 0 ) ref = {};
+ var isTagged = ref.isTagged; if ( isTagged === void 0 ) isTagged = false;
+
+ var node = this.startNode();
+ this.next();
+ node.expressions = [];
+ var curElt = this.parseTemplateElement({isTagged: isTagged});
+ node.quasis = [curElt];
+ while (!curElt.tail) {
+ this$1.expect(types.dollarBraceL);
+ node.expressions.push(this$1.parseExpression());
+ this$1.expect(types.braceR);
+ node.quasis.push(curElt = this$1.parseTemplateElement({isTagged: isTagged}));
+ }
+ this.next();
+ return this.finishNode(node, "TemplateLiteral")
+};
+
+pp$3.isAsyncProp = function(prop) {
+ return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" &&
+ (this.type === types.name || this.type === types.num || this.type === types.string || this.type === types.bracketL || this.type.keyword) &&
+ !lineBreak.test(this.input.slice(this.lastTokEnd, this.start))
+};
+
+// Parse an object literal or binding pattern.
+
+pp$3.parseObj = function(isPattern, refDestructuringErrors) {
+ var this$1 = this;
+
+ var node = this.startNode(), first = true, propHash = {};
+ node.properties = [];
+ this.next();
+ while (!this.eat(types.braceR)) {
+ if (!first) {
+ this$1.expect(types.comma);
+ if (this$1.afterTrailingComma(types.braceR)) { break }
+ } else { first = false; }
+
+ var prop = this$1.parseProperty(isPattern, refDestructuringErrors);
+ this$1.checkPropClash(prop, propHash);
+ node.properties.push(prop);
+ }
+ return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression")
+};
+
+pp$3.parseProperty = function(isPattern, refDestructuringErrors) {
+ var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc;
+ 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(types.star); }
+ }
+ this.parsePropertyName(prop);
+ if (!isPattern && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) {
+ isAsync = true;
+ this.parsePropertyName(prop, refDestructuringErrors);
+ } else {
+ isAsync = false;
+ }
+ this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors);
+ return this.finishNode(prop, "Property")
+};
+
+pp$3.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors) {
+ if ((isGenerator || isAsync) && this.type === types.colon)
+ { this.unexpected(); }
+
+ if (this.eat(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 === types.parenL) {
+ if (isPattern) { this.unexpected(); }
+ prop.kind = "init";
+ prop.method = true;
+ prop.value = this.parseMethod(isGenerator, isAsync);
+ } else if (!isPattern &&
+ this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" &&
+ (prop.key.name === "get" || prop.key.name === "set") &&
+ (this.type != types.comma && this.type != types.braceR)) {
+ if (isGenerator || isAsync) { 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.raiseRecoverable(start, "getter should have no params"); }
+ else
+ { this.raiseRecoverable(start, "setter should have exactly one param"); }
+ } else {
+ if (prop.kind === "set" && prop.value.params[0].type === "RestElement")
+ { this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params"); }
+ }
+ } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") {
+ this.checkUnreserved(prop.key);
+ prop.kind = "init";
+ if (isPattern) {
+ prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key);
+ } else if (this.type === types.eq && refDestructuringErrors) {
+ if (refDestructuringErrors.shorthandAssign < 0)
+ { refDestructuringErrors.shorthandAssign = this.start; }
+ prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key);
+ } else {
+ prop.value = prop.key;
+ }
+ prop.shorthand = true;
+ } else { this.unexpected(); }
+};
+
+pp$3.parsePropertyName = function(prop) {
+ if (this.options.ecmaVersion >= 6) {
+ if (this.eat(types.bracketL)) {
+ prop.computed = true;
+ prop.key = this.parseMaybeAssign();
+ this.expect(types.bracketR);
+ return prop.key
+ } else {
+ prop.computed = false;
+ }
+ }
+ return prop.key = this.type === types.num || this.type === types.string ? this.parseExprAtom() : this.parseIdent(true)
+};
+
+// Initialize empty function node.
+
+pp$3.initFunction = function(node) {
+ node.id = null;
+ if (this.options.ecmaVersion >= 6) {
+ node.generator = false;
+ node.expression = false;
+ }
+ if (this.options.ecmaVersion >= 8)
+ { node.async = false; }
+};
+
+// Parse object or class method.
+
+pp$3.parseMethod = function(isGenerator, isAsync) {
+ var node = this.startNode(), oldInGen = this.inGenerator, oldInAsync = this.inAsync,
+ oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldInFunc = this.inFunction;
+
+ this.initFunction(node);
+ if (this.options.ecmaVersion >= 6)
+ { node.generator = isGenerator; }
+ if (this.options.ecmaVersion >= 8)
+ { node.async = !!isAsync; }
+
+ this.inGenerator = node.generator;
+ this.inAsync = node.async;
+ this.yieldPos = 0;
+ this.awaitPos = 0;
+ this.inFunction = true;
+ this.enterFunctionScope();
+
+ this.expect(types.parenL);
+ node.params = this.parseBindingList(types.parenR, false, this.options.ecmaVersion >= 8);
+ this.checkYieldAwaitInDefaultParams();
+ this.parseFunctionBody(node, false);
+
+ this.inGenerator = oldInGen;
+ this.inAsync = oldInAsync;
+ this.yieldPos = oldYieldPos;
+ this.awaitPos = oldAwaitPos;
+ this.inFunction = oldInFunc;
+ return this.finishNode(node, "FunctionExpression")
+};
+
+// Parse arrow function expression with given parameters.
+
+pp$3.parseArrowExpression = function(node, params, isAsync) {
+ var oldInGen = this.inGenerator, oldInAsync = this.inAsync,
+ oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldInFunc = this.inFunction;
+
+ this.enterFunctionScope();
+ this.initFunction(node);
+ if (this.options.ecmaVersion >= 8)
+ { node.async = !!isAsync; }
+
+ this.inGenerator = false;
+ this.inAsync = node.async;
+ this.yieldPos = 0;
+ this.awaitPos = 0;
+ this.inFunction = true;
+
+ node.params = this.toAssignableList(params, true);
+ this.parseFunctionBody(node, true);
+
+ this.inGenerator = oldInGen;
+ this.inAsync = oldInAsync;
+ this.yieldPos = oldYieldPos;
+ this.awaitPos = oldAwaitPos;
+ this.inFunction = oldInFunc;
+ return this.finishNode(node, "ArrowFunctionExpression")
+};
+
+// Parse function body and check parameters.
+
+pp$3.parseFunctionBody = function(node, isArrowFunction) {
+ var isExpression = isArrowFunction && this.type !== types.braceL;
+ var oldStrict = this.strict, useStrict = false;
+
+ if (isExpression) {
+ node.body = this.parseMaybeAssign();
+ node.expression = true;
+ this.checkParams(node, false);
+ } else {
+ var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params);
+ if (!oldStrict || nonSimple) {
+ useStrict = this.strictDirective(this.end);
+ // 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 (useStrict && nonSimple)
+ { this.raiseRecoverable(node.start, "Illegal 'use strict' directive in function with non-simple parameter list"); }
+ }
+ // Start a new scope with regard to labels and the `inFunction`
+ // flag (restore them to their old value afterwards).
+ var oldLabels = this.labels;
+ this.labels = [];
+ if (useStrict) { this.strict = true; }
+
+ // Add the params to varDeclaredNames to ensure that an error is thrown
+ // if a let/const declaration in the function clashes with one of the params.
+ this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && this.isSimpleParamList(node.params));
+ node.body = this.parseBlock(false);
+ node.expression = false;
+ this.adaptDirectivePrologue(node.body.body);
+ this.labels = oldLabels;
+ }
+ this.exitFunctionScope();
+
+ if (this.strict && node.id) {
+ // Ensure the function name isn't a forbidden identifier in strict mode, e.g. 'eval'
+ this.checkLVal(node.id, "none");
+ }
+ this.strict = oldStrict;
+};
+
+pp$3.isSimpleParamList = function(params) {
+ for (var i = 0, list = params; i < list.length; i += 1)
+ {
+ var param = list[i];
+
+ if (param.type !== "Identifier") { return false
+ } }
+ return true
+};
+
+// Checks function params for various disallowed patterns such as using "eval"
+// or "arguments" and duplicate parameters.
+
+pp$3.checkParams = function(node, allowDuplicates) {
+ var this$1 = this;
+
+ var nameHash = {};
+ for (var i = 0, list = node.params; i < list.length; i += 1)
+ {
+ var param = list[i];
+
+ this$1.checkLVal(param, "var", allowDuplicates ? null : 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$3.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) {
+ var this$1 = this;
+
+ var elts = [], first = true;
+ while (!this.eat(close)) {
+ if (!first) {
+ this$1.expect(types.comma);
+ if (allowTrailingComma && this$1.afterTrailingComma(close)) { break }
+ } else { first = false; }
+
+ var elt = (void 0);
+ if (allowEmpty && this$1.type === types.comma)
+ { elt = null; }
+ else if (this$1.type === types.ellipsis) {
+ elt = this$1.parseSpread(refDestructuringErrors);
+ if (refDestructuringErrors && this$1.type === types.comma && refDestructuringErrors.trailingComma < 0)
+ { refDestructuringErrors.trailingComma = this$1.start; }
+ } else {
+ elt = this$1.parseMaybeAssign(false, refDestructuringErrors);
+ }
+ elts.push(elt);
+ }
+ return elts
+};
+
+pp$3.checkUnreserved = function(ref) {
+ var start = ref.start;
+ var end = ref.end;
+ var name = ref.name;
+
+ if (this.inGenerator && name === "yield")
+ { this.raiseRecoverable(start, "Can not use 'yield' as identifier inside a generator"); }
+ if (this.inAsync && name === "await")
+ { this.raiseRecoverable(start, "Can not use 'await' as identifier inside an async function"); }
+ if (this.isKeyword(name))
+ { this.raise(start, ("Unexpected keyword '" + name + "'")); }
+ if (this.options.ecmaVersion < 6 &&
+ this.input.slice(start, end).indexOf("\\") != -1) { return }
+ var re = this.strict ? this.reservedWordsStrict : this.reservedWords;
+ if (re.test(name))
+ { this.raiseRecoverable(start, ("The keyword '" + name + "' is reserved")); }
+};
+
+// Parse the next token as an identifier. If `liberal` is true (used
+// when parsing properties), it will also convert keywords into
+// identifiers.
+
+pp$3.parseIdent = function(liberal, isBinding) {
+ var node = this.startNode();
+ if (liberal && this.options.allowReserved == "never") { liberal = false; }
+ if (this.type === types.name) {
+ node.name = this.value;
+ } else if (this.type.keyword) {
+ node.name = this.type.keyword;
+
+ // To fix https://github.com/ternjs/acorn/issues/575
+ // `class` and `function` keywords push new context into this.context.
+ // But there is no chance to pop the context if the keyword is consumed as an identifier such as a property name.
+ // If the previous token is a dot, this does not apply because the context-managing code already ignored the keyword
+ if ((node.name === "class" || node.name === "function") &&
+ (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) {
+ this.context.pop();
+ }
+ } else {
+ this.unexpected();
+ }
+ this.next();
+ this.finishNode(node, "Identifier");
+ if (!liberal) { this.checkUnreserved(node); }
+ return node
+};
+
+// Parses yield expression inside generator.
+
+pp$3.parseYield = function() {
+ if (!this.yieldPos) { this.yieldPos = this.start; }
+
+ var node = this.startNode();
+ this.next();
+ if (this.type == types.semi || this.canInsertSemicolon() || (this.type != types.star && !this.type.startsExpr)) {
+ node.delegate = false;
+ node.argument = null;
+ } else {
+ node.delegate = this.eat(types.star);
+ node.argument = this.parseMaybeAssign();
+ }
+ return this.finishNode(node, "YieldExpression")
+};
+
+pp$3.parseAwait = function() {
+ if (!this.awaitPos) { this.awaitPos = this.start; }
+
+ var node = this.startNode();
+ this.next();
+ node.argument = this.parseMaybeUnary(null, true);
+ return this.finishNode(node, "AwaitExpression")
+};
+
+var pp$4 = 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$4.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$4.raiseRecoverable = pp$4.raise;
+
+pp$4.curPosition = function() {
+ if (this.options.locations) {
+ return new Position(this.curLine, this.pos - this.lineStart)
+ }
+};
+
+var pp$5 = Parser.prototype;
+
+// Object.assign polyfill
+var assign = Object.assign || function(target) {
+ var sources = [], len = arguments.length - 1;
+ while ( len-- > 0 ) sources[ len ] = arguments[ len + 1 ];
+
+ for (var i = 0, list = sources; i < list.length; i += 1) {
+ var source = list[i];
+
+ for (var key in source) {
+ if (has(source, key)) {
+ target[key] = source[key];
+ }
+ }
+ }
+ return target
+};
+
+// The functions in this module keep track of declared variables in the current scope in order to detect duplicate variable names.
+
+pp$5.enterFunctionScope = function() {
+ // var: a hash of var-declared names in the current lexical scope
+ // lexical: a hash of lexically-declared names in the current lexical scope
+ // childVar: a hash of var-declared names in all child lexical scopes of the current lexical scope (within the current function scope)
+ // parentLexical: a hash of lexically-declared names in all parent lexical scopes of the current lexical scope (within the current function scope)
+ this.scopeStack.push({var: {}, lexical: {}, childVar: {}, parentLexical: {}});
+};
+
+pp$5.exitFunctionScope = function() {
+ this.scopeStack.pop();
+};
+
+pp$5.enterLexicalScope = function() {
+ var parentScope = this.scopeStack[this.scopeStack.length - 1];
+ var childScope = {var: {}, lexical: {}, childVar: {}, parentLexical: {}};
+
+ this.scopeStack.push(childScope);
+ assign(childScope.parentLexical, parentScope.lexical, parentScope.parentLexical);
+};
+
+pp$5.exitLexicalScope = function() {
+ var childScope = this.scopeStack.pop();
+ var parentScope = this.scopeStack[this.scopeStack.length - 1];
+
+ assign(parentScope.childVar, childScope.var, childScope.childVar);
+};
+
+/**
+ * A name can be declared with `var` if there are no variables with the same name declared with `let`/`const`
+ * in the current lexical scope or any of the parent lexical scopes in this function.
+ */
+pp$5.canDeclareVarName = function(name) {
+ var currentScope = this.scopeStack[this.scopeStack.length - 1];
+
+ return !has(currentScope.lexical, name) && !has(currentScope.parentLexical, name)
+};
+
+/**
+ * A name can be declared with `let`/`const` if there are no variables with the same name declared with `let`/`const`
+ * in the current scope, and there are no variables with the same name declared with `var` in the current scope or in
+ * any child lexical scopes in this function.
+ */
+pp$5.canDeclareLexicalName = function(name) {
+ var currentScope = this.scopeStack[this.scopeStack.length - 1];
+
+ return !has(currentScope.lexical, name) && !has(currentScope.var, name) && !has(currentScope.childVar, name)
+};
+
+pp$5.declareVarName = function(name) {
+ this.scopeStack[this.scopeStack.length - 1].var[name] = true;
+};
+
+pp$5.declareLexicalName = function(name) {
+ this.scopeStack[this.scopeStack.length - 1].lexical[name] = true;
+};
+
+var Node = function Node(parser, pos, loc) {
+ this.type = "";
+ this.start = pos;
+ this.end = 0;
+ if (parser.options.locations)
+ { this.loc = new 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.
+
+var pp$6 = Parser.prototype;
+
+pp$6.startNode = function() {
+ return new Node(this, this.start, this.startLoc)
+};
+
+pp$6.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$6.finishNode = function(node, type) {
+ return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc)
+};
+
+// Finish node at given position
+
+pp$6.finishNodeAt = function(node, type, pos, loc) {
+ return finishNodeAt.call(this, node, type, pos, loc)
+};
+
+// 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 TokContext = function TokContext(token, isExpr, preserveSpace, override, generator) {
+ this.token = token;
+ this.isExpr = !!isExpr;
+ this.preserveSpace = !!preserveSpace;
+ this.override = override;
+ this.generator = !!generator;
+};
+
+var types$1 = {
+ b_stat: new TokContext("{", false),
+ b_expr: new TokContext("{", true),
+ b_tmpl: new TokContext("${", false),
+ p_stat: new TokContext("(", false),
+ p_expr: new TokContext("(", true),
+ q_tmpl: new TokContext("`", true, true, function (p) { return p.tryReadTemplateToken(); }),
+ f_stat: new TokContext("function", false),
+ f_expr: new TokContext("function", true),
+ f_expr_gen: new TokContext("function", true, false, null, true),
+ f_gen: new TokContext("function", false, false, null, true)
+};
+
+var pp$7 = Parser.prototype;
+
+pp$7.initialContext = function() {
+ return [types$1.b_stat]
+};
+
+pp$7.braceIsBlock = function(prevType) {
+ var parent = this.curContext();
+ if (parent === types$1.f_expr || parent === types$1.f_stat)
+ { return true }
+ if (prevType === types.colon && (parent === types$1.b_stat || parent === types$1.b_expr))
+ { return !parent.isExpr }
+
+ // The check for `tt.name && exprAllowed` detects whether we are
+ // after a `yield` or `of` construct. See the `updateContext` for
+ // `tt.name`.
+ if (prevType === types._return || prevType == types.name && this.exprAllowed)
+ { return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) }
+ if (prevType === types._else || prevType === types.semi || prevType === types.eof || prevType === types.parenR || prevType == types.arrow)
+ { return true }
+ if (prevType == types.braceL)
+ { return parent === types$1.b_stat }
+ if (prevType == types._var || prevType == types.name)
+ { return false }
+ return !this.exprAllowed
+};
+
+pp$7.inGeneratorContext = function() {
+ var this$1 = this;
+
+ for (var i = this.context.length - 1; i >= 1; i--) {
+ var context = this$1.context[i];
+ if (context.token === "function")
+ { return context.generator }
+ }
+ return false
+};
+
+pp$7.updateContext = function(prevType) {
+ var update, type = this.type;
+ if (type.keyword && prevType == types.dot)
+ { this.exprAllowed = false; }
+ else if (update = type.updateContext)
+ { update.call(this, prevType); }
+ else
+ { this.exprAllowed = type.beforeExpr; }
+};
+
+// Token-specific context update code
+
+types.parenR.updateContext = types.braceR.updateContext = function() {
+ if (this.context.length == 1) {
+ this.exprAllowed = true;
+ return
+ }
+ var out = this.context.pop();
+ if (out === types$1.b_stat && this.curContext().token === "function") {
+ out = this.context.pop();
+ }
+ this.exprAllowed = !out.isExpr;
+};
+
+types.braceL.updateContext = function(prevType) {
+ this.context.push(this.braceIsBlock(prevType) ? types$1.b_stat : types$1.b_expr);
+ this.exprAllowed = true;
+};
+
+types.dollarBraceL.updateContext = function() {
+ this.context.push(types$1.b_tmpl);
+ this.exprAllowed = true;
+};
+
+types.parenL.updateContext = function(prevType) {
+ var statementParens = prevType === types._if || prevType === types._for || prevType === types._with || prevType === types._while;
+ this.context.push(statementParens ? types$1.p_stat : types$1.p_expr);
+ this.exprAllowed = true;
+};
+
+types.incDec.updateContext = function() {
+ // tokExprAllowed stays unchanged
+};
+
+types._function.updateContext = types._class.updateContext = function(prevType) {
+ if (prevType.beforeExpr && prevType !== types.semi && prevType !== types._else &&
+ !((prevType === types.colon || prevType === types.braceL) && this.curContext() === types$1.b_stat))
+ { this.context.push(types$1.f_expr); }
+ else
+ { this.context.push(types$1.f_stat); }
+ this.exprAllowed = false;
+};
+
+types.backQuote.updateContext = function() {
+ if (this.curContext() === types$1.q_tmpl)
+ { this.context.pop(); }
+ else
+ { this.context.push(types$1.q_tmpl); }
+ this.exprAllowed = false;
+};
+
+types.star.updateContext = function(prevType) {
+ if (prevType == types._function) {
+ var index = this.context.length - 1;
+ if (this.context[index] === types$1.f_expr)
+ { this.context[index] = types$1.f_expr_gen; }
+ else
+ { this.context[index] = types$1.f_gen; }
+ }
+ this.exprAllowed = true;
+};
+
+types.name.updateContext = function(prevType) {
+ var allowed = false;
+ if (this.options.ecmaVersion >= 6) {
+ if (this.value == "of" && !this.exprAllowed ||
+ this.value == "yield" && this.inGeneratorContext())
+ { allowed = true; }
+ }
+ this.exprAllowed = allowed;
+};
+
+// 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) {
+ 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$8 = 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$8.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$8.getToken = function() {
+ this.next();
+ return new Token(this)
+};
+
+// If we're in an ES6 environment, make parsers iterable
+if (typeof Symbol !== "undefined")
+ { pp$8[Symbol.iterator] = function() {
+ var this$1 = this;
+
+ return {
+ next: function () {
+ var token = this$1.getToken();
+ return {
+ done: token.type === types.eof,
+ value: token
+ }
+ }
+ }
+ }; }
+
+// Toggle strict mode. Re-reads the next number or string to please
+// pedantic tests (`"use strict"; 010;` should fail).
+
+pp$8.curContext = function() {
+ return this.context[this.context.length - 1]
+};
+
+// Read a single token, updating the parser object's token-related
+// properties.
+
+pp$8.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(types.eof) }
+
+ if (curContext.override) { return curContext.override(this) }
+ else { this.readToken(this.fullCharCodeAtPos()); }
+};
+
+pp$8.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$8.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$8.skipBlockComment = function() {
+ var this$1 = this;
+
+ 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) {
+ lineBreakG.lastIndex = start;
+ var match;
+ while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) {
+ ++this$1.curLine;
+ this$1.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$8.skipLineComment = function(startSkip) {
+ var this$1 = this;
+
+ 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 && !isNewLine(ch)) {
+ ch = this$1.input.charCodeAt(++this$1.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$8.skipSpace = function() {
+ var this$1 = this;
+
+ loop: while (this.pos < this.input.length) {
+ var ch = this$1.input.charCodeAt(this$1.pos);
+ switch (ch) {
+ case 32: case 160: // ' '
+ ++this$1.pos;
+ break
+ case 13:
+ if (this$1.input.charCodeAt(this$1.pos + 1) === 10) {
+ ++this$1.pos;
+ }
+ case 10: case 8232: case 8233:
+ ++this$1.pos;
+ if (this$1.options.locations) {
+ ++this$1.curLine;
+ this$1.lineStart = this$1.pos;
+ }
+ break
+ case 47: // '/'
+ switch (this$1.input.charCodeAt(this$1.pos + 1)) {
+ case 42: // '*'
+ this$1.skipBlockComment();
+ break
+ case 47:
+ this$1.skipLineComment(2);
+ break
+ default:
+ break loop
+ }
+ break
+ default:
+ if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) {
+ ++this$1.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$8.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$8.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(types.ellipsis)
+ } else {
+ ++this.pos;
+ return this.finishToken(types.dot)
+ }
+};
+
+pp$8.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(types.assign, 2) }
+ return this.finishOp(types.slash, 1)
+};
+
+pp$8.readToken_mult_modulo_exp = function(code) { // '%*'
+ var next = this.input.charCodeAt(this.pos + 1);
+ var size = 1;
+ var tokentype = code === 42 ? types.star : types.modulo;
+
+ // exponentiation operator ** and **=
+ if (this.options.ecmaVersion >= 7 && code == 42 && next === 42) {
+ ++size;
+ tokentype = types.starstar;
+ next = this.input.charCodeAt(this.pos + 2);
+ }
+
+ if (next === 61) { return this.finishOp(types.assign, size + 1) }
+ return this.finishOp(tokentype, size)
+};
+
+pp$8.readToken_pipe_amp = function(code) { // '|&'
+ var next = this.input.charCodeAt(this.pos + 1);
+ if (next === code) { return this.finishOp(code === 124 ? types.logicalOR : types.logicalAND, 2) }
+ if (next === 61) { return this.finishOp(types.assign, 2) }
+ return this.finishOp(code === 124 ? types.bitwiseOR : types.bitwiseAND, 1)
+};
+
+pp$8.readToken_caret = function() { // '^'
+ var next = this.input.charCodeAt(this.pos + 1);
+ if (next === 61) { return this.finishOp(types.assign, 2) }
+ return this.finishOp(types.bitwiseXOR, 1)
+};
+
+pp$8.readToken_plus_min = function(code) { // '+-'
+ var next = this.input.charCodeAt(this.pos + 1);
+ if (next === code) {
+ if (next == 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) == 62 &&
+ (this.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.lastTokEnd, this.pos)))) {
+ // A `-->` line comment
+ this.skipLineComment(3);
+ this.skipSpace();
+ return this.nextToken()
+ }
+ return this.finishOp(types.incDec, 2)
+ }
+ if (next === 61) { return this.finishOp(types.assign, 2) }
+ return this.finishOp(types.plusMin, 1)
+};
+
+pp$8.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(types.assign, size + 1) }
+ return this.finishOp(types.bitShift, size)
+ }
+ if (next == 33 && code == 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) == 45 &&
+ this.input.charCodeAt(this.pos + 3) == 45) {
+ // `<!--`, an XML-style comment that should be interpreted as a line comment
+ this.skipLineComment(4);
+ this.skipSpace();
+ return this.nextToken()
+ }
+ if (next === 61) { size = 2; }
+ return this.finishOp(types.relational, size)
+};
+
+pp$8.readToken_eq_excl = function(code) { // '=!'
+ var next = this.input.charCodeAt(this.pos + 1);
+ if (next === 61) { return this.finishOp(types.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2) }
+ if (code === 61 && next === 62 && this.options.ecmaVersion >= 6) { // '=>'
+ this.pos += 2;
+ return this.finishToken(types.arrow)
+ }
+ return this.finishOp(code === 61 ? types.eq : types.prefix, 1)
+};
+
+pp$8.getTokenFromCode = function(code) {
+ switch (code) {
+ // The interpretation of a dot depends on whether it is followed
+ // by a digit or another two dots.
+ case 46: // '.'
+ return this.readToken_dot()
+
+ // Punctuation tokens.
+ case 40: ++this.pos; return this.finishToken(types.parenL)
+ case 41: ++this.pos; return this.finishToken(types.parenR)
+ case 59: ++this.pos; return this.finishToken(types.semi)
+ case 44: ++this.pos; return this.finishToken(types.comma)
+ case 91: ++this.pos; return this.finishToken(types.bracketL)
+ case 93: ++this.pos; return this.finishToken(types.bracketR)
+ case 123: ++this.pos; return this.finishToken(types.braceL)
+ case 125: ++this.pos; return this.finishToken(types.braceR)
+ case 58: ++this.pos; return this.finishToken(types.colon)
+ case 63: ++this.pos; return this.finishToken(types.question)
+
+ case 96: // '`'
+ if (this.options.ecmaVersion < 6) { break }
+ ++this.pos;
+ return this.finishToken(types.backQuote)
+
+ case 48: // '0'
+ var next = this.input.charCodeAt(this.pos + 1);
+ if (next === 120 || next === 88) { return this.readRadixNumber(16) } // '0x', '0X' - hex number
+ if (this.options.ecmaVersion >= 6) {
+ if (next === 111 || next === 79) { return this.readRadixNumber(8) } // '0o', '0O' - octal number
+ if (next === 98 || next === 66) { return this.readRadixNumber(2) } // '0b', '0B' - binary number
+ }
+ // Anything else beginning with a digit is an integer, octal
+ // number, or float.
+ case 49: case 50: case 51: case 52: case 53: case 54: case 55: case 56: case 57: // 1-9
+ return this.readNumber(false)
+
+ // Quotes produce strings.
+ case 34: case 39: // '"', "'"
+ return this.readString(code)
+
+ // Operators are parsed inline in tiny state machines. '=' (61) is
+ // often referred to. `finishOp` simply skips the amount of
+ // characters it is given as second argument, and returns a token
+ // of the type given by its first argument.
+
+ case 47: // '/'
+ return this.readToken_slash()
+
+ case 37: case 42: // '%*'
+ return this.readToken_mult_modulo_exp(code)
+
+ case 124: case 38: // '|&'
+ return this.readToken_pipe_amp(code)
+
+ case 94: // '^'
+ return this.readToken_caret()
+
+ case 43: case 45: // '+-'
+ return this.readToken_plus_min(code)
+
+ case 60: case 62: // '<>'
+ return this.readToken_lt_gt(code)
+
+ case 61: case 33: // '=!'
+ return this.readToken_eq_excl(code)
+
+ case 126: // '~'
+ return this.finishOp(types.prefix, 1)
+ }
+
+ this.raise(this.pos, "Unexpected character '" + codePointToString(code) + "'");
+};
+
+pp$8.finishOp = function(type, size) {
+ var str = this.input.slice(this.pos, this.pos + size);
+ this.pos += size;
+ return this.finishToken(type, str)
+};
+
+// Parse a regular expression. Some context-awareness is necessary,
+// since a '/' inside a '[]' set does not end the expression.
+
+function tryCreateRegexp(src, flags, throwErrorAt, parser) {
+ try {
+ return new RegExp(src, flags)
+ } catch (e) {
+ if (throwErrorAt !== undefined) {
+ if (e instanceof SyntaxError) { parser.raise(throwErrorAt, "Error parsing regular expression: " + e.message); }
+ throw e
+ }
+ }
+}
+
+var regexpUnicodeSupport = !!tryCreateRegexp("\uffff", "u");
+
+pp$8.readRegexp = function() {
+ var this$1 = this;
+
+ var escaped, inClass, start = this.pos;
+ for (;;) {
+ if (this$1.pos >= this$1.input.length) { this$1.raise(start, "Unterminated regular expression"); }
+ var ch = this$1.input.charAt(this$1.pos);
+ if (lineBreak.test(ch)) { this$1.raise(start, "Unterminated regular expression"); }
+ if (!escaped) {
+ if (ch === "[") { inClass = true; }
+ else if (ch === "]" && inClass) { inClass = false; }
+ else if (ch === "/" && !inClass) { break }
+ escaped = ch === "\\";
+ } else { escaped = false; }
+ ++this$1.pos;
+ }
+ var content = this.input.slice(start, this.pos);
+ ++this.pos;
+ // Need to use `readWord1` because '\uXXXX' sequences are allowed
+ // here (don't ask).
+ var mods = this.readWord1();
+ var tmp = content, tmpFlags = "";
+ if (mods) {
+ var validFlags = /^[gim]*$/;
+ if (this.options.ecmaVersion >= 6) { validFlags = /^[gimuy]*$/; }
+ if (!validFlags.test(mods)) { this.raise(start, "Invalid regular expression flag"); }
+ if (mods.indexOf("u") >= 0) {
+ if (regexpUnicodeSupport) {
+ tmpFlags = "u";
+ } else {
+ // Replace each astral symbol and every Unicode escape sequence that
+ // possibly represents an astral symbol or a paired surrogate with a
+ // single ASCII symbol to avoid throwing on regular expressions that
+ // are only valid in combination with the `/u` flag.
+ // Note: replacing with the ASCII symbol `x` might cause false
+ // negatives in unlikely scenarios. For example, `[\u{61}-b]` is a
+ // perfectly valid pattern that is equivalent to `[a-b]`, but it would
+ // be replaced by `[x-b]` which throws an error.
+ tmp = tmp.replace(/\\u\{([0-9a-fA-F]+)\}/g, function (_match, code, offset) {
+ code = Number("0x" + code);
+ if (code > 0x10FFFF) { this$1.raise(start + offset + 3, "Code point out of bounds"); }
+ return "x"
+ });
+ tmp = tmp.replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "x");
+ tmpFlags = tmpFlags.replace("u", "");
+ }
+ }
+ }
+ // Detect invalid regular expressions.
+ var value = null;
+ // Rhino's regular expression parser is flaky and throws uncatchable exceptions,
+ // so don't do detection if we are running under Rhino
+ if (!isRhino) {
+ tryCreateRegexp(tmp, tmpFlags, start, this);
+ // Get a regular expression object for this pattern-flag pair, or `null` in
+ // case the current environment doesn't support the flags it uses.
+ value = tryCreateRegexp(content, mods);
+ }
+ return this.finishToken(types.regexp, {pattern: content, flags: mods, value: value})
+};
+
+// Read an integer in the given radix. Return null if zero digits
+// were read, the integer value otherwise. When `len` is given, this
+// will return `null` unless the integer has exactly `len` digits.
+
+pp$8.readInt = function(radix, len) {
+ var this$1 = this;
+
+ var start = this.pos, total = 0;
+ for (var i = 0, e = len == null ? Infinity : len; i < e; ++i) {
+ var code = this$1.input.charCodeAt(this$1.pos), val = (void 0);
+ if (code >= 97) { val = code - 97 + 10; } // a
+ else if (code >= 65) { val = code - 65 + 10; } // A
+ else if (code >= 48 && code <= 57) { val = code - 48; } // 0-9
+ else { val = Infinity; }
+ if (val >= radix) { break }
+ ++this$1.pos;
+ total = total * radix + val;
+ }
+ if (this.pos === start || len != null && this.pos - start !== len) { return null }
+
+ return total
+};
+
+pp$8.readRadixNumber = function(radix) {
+ this.pos += 2; // 0x
+ var val = this.readInt(radix);
+ if (val == null) { this.raise(this.start + 2, "Expected number in radix " + radix); }
+ if (isIdentifierStart(this.fullCharCodeAtPos())) { this.raise(this.pos, "Identifier directly after number"); }
+ return this.finishToken(types.num, val)
+};
+
+// Read an integer, octal integer, or floating-point number.
+
+pp$8.readNumber = function(startsWithDot) {
+ var start = this.pos, isFloat = false, octal = this.input.charCodeAt(this.pos) === 48;
+ if (!startsWithDot && this.readInt(10) === null) { this.raise(start, "Invalid number"); }
+ if (octal && this.pos == start + 1) { octal = false; }
+ var next = this.input.charCodeAt(this.pos);
+ if (next === 46 && !octal) { // '.'
+ ++this.pos;
+ this.readInt(10);
+ isFloat = true;
+ next = this.input.charCodeAt(this.pos);
+ }
+ if ((next === 69 || next === 101) && !octal) { // 'eE'
+ next = this.input.charCodeAt(++this.pos);
+ if (next === 43 || next === 45) { ++this.pos; } // '+-'
+ if (this.readInt(10) === null) { this.raise(start, "Invalid number"); }
+ isFloat = true;
+ }
+ if (isIdentifierStart(this.fullCharCodeAtPos())) { this.raise(this.pos, "Identifier directly after number"); }
+
+ var str = this.input.slice(start, this.pos), val;
+ if (isFloat) { val = parseFloat(str); }
+ else if (!octal || str.length === 1) { val = parseInt(str, 10); }
+ else if (this.strict) { this.raise(start, "Invalid number"); }
+ else if (/[89]/.test(str)) { val = parseInt(str, 10); }
+ else { val = parseInt(str, 8); }
+ return this.finishToken(types.num, val)
+};
+
+// Read a string value, interpreting backslash-escapes.
+
+pp$8.readCodePoint = function() {
+ var ch = this.input.charCodeAt(this.pos), code;
+
+ if (ch === 123) { // '{'
+ if (this.options.ecmaVersion < 6) { this.unexpected(); }
+ var codePos = ++this.pos;
+ code = this.readHexChar(this.input.indexOf("}", this.pos) - this.pos);
+ ++this.pos;
+ if (code > 0x10FFFF) { this.invalidStringToken(codePos, "Code point out of bounds"); }
+ } else {
+ code = this.readHexChar(4);
+ }
+ return code
+};
+
+function codePointToString(code) {
+ // UTF-16 Decoding
+ if (code <= 0xFFFF) { return String.fromCharCode(code) }
+ code -= 0x10000;
+ return String.fromCharCode((code >> 10) + 0xD800, (code & 1023) + 0xDC00)
+}
+
+pp$8.readString = function(quote) {
+ var this$1 = this;
+
+ var out = "", chunkStart = ++this.pos;
+ for (;;) {
+ if (this$1.pos >= this$1.input.length) { this$1.raise(this$1.start, "Unterminated string constant"); }
+ var ch = this$1.input.charCodeAt(this$1.pos);
+ if (ch === quote) { break }
+ if (ch === 92) { // '\'
+ out += this$1.input.slice(chunkStart, this$1.pos);
+ out += this$1.readEscapedChar(false);
+ chunkStart = this$1.pos;
+ } else {
+ if (isNewLine(ch)) { this$1.raise(this$1.start, "Unterminated string constant"); }
+ ++this$1.pos;
+ }
+ }
+ out += this.input.slice(chunkStart, this.pos++);
+ return this.finishToken(types.string, out)
+};
+
+// Reads template string tokens.
+
+var INVALID_TEMPLATE_ESCAPE_ERROR = {};
+
+pp$8.tryReadTemplateToken = function() {
+ this.inTemplateElement = true;
+ try {
+ this.readTmplToken();
+ } catch (err) {
+ if (err === INVALID_TEMPLATE_ESCAPE_ERROR) {
+ this.readInvalidTemplateToken();
+ } else {
+ throw err
+ }
+ }
+
+ this.inTemplateElement = false;
+};
+
+pp$8.invalidStringToken = function(position, message) {
+ if (this.inTemplateElement && this.options.ecmaVersion >= 9) {
+ throw INVALID_TEMPLATE_ESCAPE_ERROR
+ } else {
+ this.raise(position, message);
+ }
+};
+
+pp$8.readTmplToken = function() {
+ var this$1 = this;
+
+ var out = "", chunkStart = this.pos;
+ for (;;) {
+ if (this$1.pos >= this$1.input.length) { this$1.raise(this$1.start, "Unterminated template"); }
+ var ch = this$1.input.charCodeAt(this$1.pos);
+ if (ch === 96 || ch === 36 && this$1.input.charCodeAt(this$1.pos + 1) === 123) { // '`', '${'
+ if (this$1.pos === this$1.start && (this$1.type === types.template || this$1.type === types.invalidTemplate)) {
+ if (ch === 36) {
+ this$1.pos += 2;
+ return this$1.finishToken(types.dollarBraceL)
+ } else {
+ ++this$1.pos;
+ return this$1.finishToken(types.backQuote)
+ }
+ }
+ out += this$1.input.slice(chunkStart, this$1.pos);
+ return this$1.finishToken(types.template, out)
+ }
+ if (ch === 92) { // '\'
+ out += this$1.input.slice(chunkStart, this$1.pos);
+ out += this$1.readEscapedChar(true);
+ chunkStart = this$1.pos;
+ } else if (isNewLine(ch)) {
+ out += this$1.input.slice(chunkStart, this$1.pos);
+ ++this$1.pos;
+ switch (ch) {
+ case 13:
+ if (this$1.input.charCodeAt(this$1.pos) === 10) { ++this$1.pos; }
+ case 10:
+ out += "\n";
+ break
+ default:
+ out += String.fromCharCode(ch);
+ break
+ }
+ if (this$1.options.locations) {
+ ++this$1.curLine;
+ this$1.lineStart = this$1.pos;
+ }
+ chunkStart = this$1.pos;
+ } else {
+ ++this$1.pos;
+ }
+ }
+};
+
+// Reads a template token to search for the end, without validating any escape sequences
+pp$8.readInvalidTemplateToken = function() {
+ var this$1 = this;
+
+ for (; this.pos < this.input.length; this.pos++) {
+ switch (this$1.input[this$1.pos]) {
+ case "\\":
+ ++this$1.pos;
+ break
+
+ case "$":
+ if (this$1.input[this$1.pos + 1] !== "{") {
+ break
+ }
+ // falls through
+
+ case "`":
+ return this$1.finishToken(types.invalidTemplate, this$1.input.slice(this$1.start, this$1.pos))
+
+ // no default
+ }
+ }
+ this.raise(this.start, "Unterminated template");
+};
+
+// Used to read escaped characters
+
+pp$8.readEscapedChar = function(inTemplate) {
+ var ch = this.input.charCodeAt(++this.pos);
+ ++this.pos;
+ switch (ch) {
+ case 110: return "\n" // 'n' -> '\n'
+ case 114: return "\r" // 'r' -> '\r'
+ case 120: return String.fromCharCode(this.readHexChar(2)) // 'x'
+ case 117: return codePointToString(this.readCodePoint()) // 'u'
+ case 116: return "\t" // 't' -> '\t'
+ case 98: return "\b" // 'b' -> '\b'
+ case 118: return "\u000b" // 'v' -> '\u000b'
+ case 102: return "\f" // 'f' -> '\f'
+ case 13: if (this.input.charCodeAt(this.pos) === 10) { ++this.pos; } // '\r\n'
+ case 10: // ' \n'
+ if (this.options.locations) { this.lineStart = this.pos; ++this.curLine; }
+ return ""
+ default:
+ if (ch >= 48 && ch <= 55) {
+ var octalStr = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0];
+ var octal = parseInt(octalStr, 8);
+ if (octal > 255) {
+ octalStr = octalStr.slice(0, -1);
+ octal = parseInt(octalStr, 8);
+ }
+ if (octalStr !== "0" && (this.strict || inTemplate)) {
+ this.invalidStringToken(this.pos - 2, "Octal literal in strict mode");
+ }
+ this.pos += octalStr.length - 1;
+ return String.fromCharCode(octal)
+ }
+ return String.fromCharCode(ch)
+ }
+};
+
+// Used to read character escape sequences ('\x', '\u', '\U').
+
+pp$8.readHexChar = function(len) {
+ var codePos = this.pos;
+ var n = this.readInt(16, len);
+ if (n === null) { this.invalidStringToken(codePos, "Bad character escape sequence"); }
+ return n
+};
+
+// Read an identifier, and return it as a string. Sets `this.containsEsc`
+// to whether the word contained a '\u' escape.
+//
+// Incrementally adds only escaped chars, adding other chunks as-is
+// as a micro-optimization.
+
+pp$8.readWord1 = function() {
+ var this$1 = this;
+
+ this.containsEsc = false;
+ var word = "", first = true, chunkStart = this.pos;
+ var astral = this.options.ecmaVersion >= 6;
+ while (this.pos < this.input.length) {
+ var ch = this$1.fullCharCodeAtPos();
+ if (isIdentifierChar(ch, astral)) {
+ this$1.pos += ch <= 0xffff ? 1 : 2;
+ } else if (ch === 92) { // "\"
+ this$1.containsEsc = true;
+ word += this$1.input.slice(chunkStart, this$1.pos);
+ var escStart = this$1.pos;
+ if (this$1.input.charCodeAt(++this$1.pos) != 117) // "u"
+ { this$1.invalidStringToken(this$1.pos, "Expecting Unicode escape sequence \\uXXXX"); }
+ ++this$1.pos;
+ var esc = this$1.readCodePoint();
+ if (!(first ? isIdentifierStart : isIdentifierChar)(esc, astral))
+ { this$1.invalidStringToken(escStart, "Invalid Unicode escape"); }
+ word += codePointToString(esc);
+ chunkStart = this$1.pos;
+ } else {
+ break
+ }
+ first = false;
+ }
+ return word + this.input.slice(chunkStart, this.pos)
+};
+
+// Read an identifier or keyword token. Will check for reserved
+// words when necessary.
+
+pp$8.readWord = function() {
+ var word = this.readWord1();
+ var type = types.name;
+ if (this.keywords.test(word)) {
+ if (this.containsEsc) { this.raiseRecoverable(this.start, "Escape sequence in keyword " + word); }
+ type = keywords$1[word];
+ }
+ return this.finishToken(type, word)
+};
+
+// 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
+
+var version = "5.2.1";
+
+// 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 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 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 Parser(options, input)
+}
+
+// This is a terrible kludge to support the existing, pre-ES6
+// interface where the loose parser module retroactively adds exports
+// to this module.
+ // eslint-disable-line camelcase
+function addLooseExports(parse, Parser$$1, plugins$$1) {
+ exports.parse_dammit = parse; // eslint-disable-line camelcase
+ exports.LooseParser = Parser$$1;
+ exports.pluginsLoose = plugins$$1;
+}
+
+exports.version = version;
+exports.parse = parse;
+exports.parseExpressionAt = parseExpressionAt;
+exports.tokenizer = tokenizer;
+exports.addLooseExports = addLooseExports;
+exports.Parser = Parser;
+exports.plugins = plugins;
+exports.defaultOptions = defaultOptions;
+exports.Position = Position;
+exports.SourceLocation = SourceLocation;
+exports.getLineInfo = getLineInfo;
+exports.Node = Node;
+exports.TokenType = TokenType;
+exports.tokTypes = types;
+exports.keywordTypes = keywords$1;
+exports.TokContext = TokContext;
+exports.tokContexts = types$1;
+exports.isIdentifierChar = isIdentifierChar;
+exports.isIdentifierStart = isIdentifierStart;
+exports.Token = Token;
+exports.isNewLine = isNewLine;
+exports.lineBreak = lineBreak;
+exports.lineBreakG = lineBreakG;
+exports.nonASCIIwhitespace = nonASCIIwhitespace;
+
+Object.defineProperty(exports, '__esModule', { value: true });
+
+})));
diff --git a/tools/node_modules/eslint/node_modules/acorn/dist/acorn_loose.es.js b/tools/node_modules/eslint/node_modules/acorn/dist/acorn_loose.es.js
new file mode 100644
index 0000000000..469f73a2ff
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn/dist/acorn_loose.es.js
@@ -0,0 +1,1390 @@
+import { Node, SourceLocation, Token, addLooseExports, defaultOptions, getLineInfo, isNewLine, lineBreak, lineBreakG, tokTypes, tokenizer } from './acorn.es';
+
+// Registered plugins
+var pluginsLoose = {};
+
+var LooseParser = function LooseParser(input, options) {
+ if ( options === void 0 ) options = {};
+
+ this.toks = tokenizer(input, options);
+ this.options = this.toks.options;
+ this.input = this.toks.input;
+ this.tok = this.last = {type: tokTypes.eof, start: 0, end: 0};
+ if (this.options.locations) {
+ var here = this.toks.curPosition();
+ this.tok.loc = new SourceLocation(this.toks, here, here);
+ }
+ this.ahead = []; // Tokens ahead
+ this.context = []; // Indentation contexted
+ this.curIndent = 0;
+ this.curLineStart = 0;
+ this.nextLineStart = this.lineEnd(this.curLineStart) + 1;
+ this.inAsync = false;
+ // Load plugins
+ this.options.pluginsLoose = options.pluginsLoose || {};
+ this.loadPlugins(this.options.pluginsLoose);
+};
+
+LooseParser.prototype.startNode = function startNode () {
+ return new Node(this.toks, this.tok.start, this.options.locations ? this.tok.loc.start : null)
+};
+
+LooseParser.prototype.storeCurrentPos = function storeCurrentPos () {
+ return this.options.locations ? [this.tok.start, this.tok.loc.start] : this.tok.start
+};
+
+LooseParser.prototype.startNodeAt = function startNodeAt (pos) {
+ if (this.options.locations) {
+ return new Node(this.toks, pos[0], pos[1])
+ } else {
+ return new Node(this.toks, pos)
+ }
+};
+
+LooseParser.prototype.finishNode = function finishNode (node, type) {
+ node.type = type;
+ node.end = this.last.end;
+ if (this.options.locations)
+ { node.loc.end = this.last.loc.end; }
+ if (this.options.ranges)
+ { node.range[1] = this.last.end; }
+ return node
+};
+
+LooseParser.prototype.dummyNode = function dummyNode (type) {
+ var dummy = this.startNode();
+ dummy.type = type;
+ dummy.end = dummy.start;
+ if (this.options.locations)
+ { dummy.loc.end = dummy.loc.start; }
+ if (this.options.ranges)
+ { dummy.range[1] = dummy.start; }
+ this.last = {type: tokTypes.name, start: dummy.start, end: dummy.start, loc: dummy.loc};
+ return dummy
+};
+
+LooseParser.prototype.dummyIdent = function dummyIdent () {
+ var dummy = this.dummyNode("Identifier");
+ dummy.name = "✖";
+ return dummy
+};
+
+LooseParser.prototype.dummyString = function dummyString () {
+ var dummy = this.dummyNode("Literal");
+ dummy.value = dummy.raw = "✖";
+ return dummy
+};
+
+LooseParser.prototype.eat = function eat (type) {
+ if (this.tok.type === type) {
+ this.next();
+ return true
+ } else {
+ return false
+ }
+};
+
+LooseParser.prototype.isContextual = function isContextual (name) {
+ return this.tok.type === tokTypes.name && this.tok.value === name
+};
+
+LooseParser.prototype.eatContextual = function eatContextual (name) {
+ return this.tok.value === name && this.eat(tokTypes.name)
+};
+
+LooseParser.prototype.canInsertSemicolon = function canInsertSemicolon () {
+ return this.tok.type === tokTypes.eof || this.tok.type === tokTypes.braceR ||
+ lineBreak.test(this.input.slice(this.last.end, this.tok.start))
+};
+
+LooseParser.prototype.semicolon = function semicolon () {
+ return this.eat(tokTypes.semi)
+};
+
+LooseParser.prototype.expect = function expect (type) {
+ var this$1 = this;
+
+ if (this.eat(type)) { return true }
+ for (var i = 1; i <= 2; i++) {
+ if (this$1.lookAhead(i).type == type) {
+ for (var j = 0; j < i; j++) { this$1.next(); }
+ return true
+ }
+ }
+};
+
+LooseParser.prototype.pushCx = function pushCx () {
+ this.context.push(this.curIndent);
+};
+
+LooseParser.prototype.popCx = function popCx () {
+ this.curIndent = this.context.pop();
+};
+
+LooseParser.prototype.lineEnd = function lineEnd (pos) {
+ while (pos < this.input.length && !isNewLine(this.input.charCodeAt(pos))) { ++pos; }
+ return pos
+};
+
+LooseParser.prototype.indentationAfter = function indentationAfter (pos) {
+ var this$1 = this;
+
+ for (var count = 0;; ++pos) {
+ var ch = this$1.input.charCodeAt(pos);
+ if (ch === 32) { ++count; }
+ else if (ch === 9) { count += this$1.options.tabSize; }
+ else { return count }
+ }
+};
+
+LooseParser.prototype.closes = function closes (closeTok, indent, line, blockHeuristic) {
+ if (this.tok.type === closeTok || this.tok.type === tokTypes.eof) { return true }
+ return line != this.curLineStart && this.curIndent < indent && this.tokenStartsLine() &&
+ (!blockHeuristic || this.nextLineStart >= this.input.length ||
+ this.indentationAfter(this.nextLineStart) < indent)
+};
+
+LooseParser.prototype.tokenStartsLine = function tokenStartsLine () {
+ var this$1 = this;
+
+ for (var p = this.tok.start - 1; p >= this.curLineStart; --p) {
+ var ch = this$1.input.charCodeAt(p);
+ if (ch !== 9 && ch !== 32) { return false }
+ }
+ return true
+};
+
+LooseParser.prototype.extend = function extend (name, f) {
+ this[name] = f(this[name]);
+};
+
+LooseParser.prototype.loadPlugins = function loadPlugins (pluginConfigs) {
+ var this$1 = this;
+
+ for (var name in pluginConfigs) {
+ var plugin = pluginsLoose[name];
+ if (!plugin) { throw new Error("Plugin '" + name + "' not found") }
+ plugin(this$1, pluginConfigs[name]);
+ }
+};
+
+LooseParser.prototype.parse = function parse () {
+ this.next();
+ return this.parseTopLevel()
+};
+
+var lp = LooseParser.prototype;
+
+function isSpace(ch) {
+ return (ch < 14 && ch > 8) || ch === 32 || ch === 160 || isNewLine(ch)
+}
+
+lp.next = function() {
+ var this$1 = this;
+
+ this.last = this.tok;
+ if (this.ahead.length)
+ { this.tok = this.ahead.shift(); }
+ else
+ { this.tok = this.readToken(); }
+
+ if (this.tok.start >= this.nextLineStart) {
+ while (this.tok.start >= this.nextLineStart) {
+ this$1.curLineStart = this$1.nextLineStart;
+ this$1.nextLineStart = this$1.lineEnd(this$1.curLineStart) + 1;
+ }
+ this.curIndent = this.indentationAfter(this.curLineStart);
+ }
+};
+
+lp.readToken = function() {
+ var this$1 = this;
+
+ for (;;) {
+ try {
+ this$1.toks.next();
+ if (this$1.toks.type === tokTypes.dot &&
+ this$1.input.substr(this$1.toks.end, 1) === "." &&
+ this$1.options.ecmaVersion >= 6) {
+ this$1.toks.end++;
+ this$1.toks.type = tokTypes.ellipsis;
+ }
+ return new Token(this$1.toks)
+ } catch (e) {
+ if (!(e instanceof SyntaxError)) { throw e }
+
+ // Try to skip some text, based on the error message, and then continue
+ var msg = e.message, pos = e.raisedAt, replace = true;
+ if (/unterminated/i.test(msg)) {
+ pos = this$1.lineEnd(e.pos + 1);
+ if (/string/.test(msg)) {
+ replace = {start: e.pos, end: pos, type: tokTypes.string, value: this$1.input.slice(e.pos + 1, pos)};
+ } else if (/regular expr/i.test(msg)) {
+ var re = this$1.input.slice(e.pos, pos);
+ try { re = new RegExp(re); } catch (e) { /* ignore compilation error due to new syntax */ }
+ replace = {start: e.pos, end: pos, type: tokTypes.regexp, value: re};
+ } else if (/template/.test(msg)) {
+ replace = {
+ start: e.pos,
+ end: pos,
+ type: tokTypes.template,
+ value: this$1.input.slice(e.pos, pos)
+ };
+ } else {
+ replace = false;
+ }
+ } else if (/invalid (unicode|regexp|number)|expecting unicode|octal literal|is reserved|directly after number|expected number in radix/i.test(msg)) {
+ while (pos < this.input.length && !isSpace(this.input.charCodeAt(pos))) { ++pos; }
+ } else if (/character escape|expected hexadecimal/i.test(msg)) {
+ while (pos < this.input.length) {
+ var ch = this$1.input.charCodeAt(pos++);
+ if (ch === 34 || ch === 39 || isNewLine(ch)) { break }
+ }
+ } else if (/unexpected character/i.test(msg)) {
+ pos++;
+ replace = false;
+ } else if (/regular expression/i.test(msg)) {
+ replace = true;
+ } else {
+ throw e
+ }
+ this$1.resetTo(pos);
+ if (replace === true) { replace = {start: pos, end: pos, type: tokTypes.name, value: "✖"}; }
+ if (replace) {
+ if (this$1.options.locations)
+ { replace.loc = new SourceLocation(
+ this$1.toks,
+ getLineInfo(this$1.input, replace.start),
+ getLineInfo(this$1.input, replace.end)); }
+ return replace
+ }
+ }
+ }
+};
+
+lp.resetTo = function(pos) {
+ var this$1 = this;
+
+ this.toks.pos = pos;
+ var ch = this.input.charAt(pos - 1);
+ this.toks.exprAllowed = !ch || /[[{(,;:?/*=+\-~!|&%^<>]/.test(ch) ||
+ /[enwfd]/.test(ch) &&
+ /\b(keywords|case|else|return|throw|new|in|(instance|type)of|delete|void)$/.test(this.input.slice(pos - 10, pos));
+
+ if (this.options.locations) {
+ this.toks.curLine = 1;
+ this.toks.lineStart = lineBreakG.lastIndex = 0;
+ var match;
+ while ((match = lineBreakG.exec(this.input)) && match.index < pos) {
+ ++this$1.toks.curLine;
+ this$1.toks.lineStart = match.index + match[0].length;
+ }
+ }
+};
+
+lp.lookAhead = function(n) {
+ var this$1 = this;
+
+ while (n > this.ahead.length)
+ { this$1.ahead.push(this$1.readToken()); }
+ return this.ahead[n - 1]
+};
+
+function isDummy(node) { return node.name == "✖" }
+
+var lp$1 = LooseParser.prototype;
+
+lp$1.parseTopLevel = function() {
+ var this$1 = this;
+
+ var node = this.startNodeAt(this.options.locations ? [0, getLineInfo(this.input, 0)] : 0);
+ node.body = [];
+ while (this.tok.type !== tokTypes.eof) { node.body.push(this$1.parseStatement()); }
+ this.toks.adaptDirectivePrologue(node.body);
+ this.last = this.tok;
+ if (this.options.ecmaVersion >= 6) {
+ node.sourceType = this.options.sourceType;
+ }
+ return this.finishNode(node, "Program")
+};
+
+lp$1.parseStatement = function() {
+ var this$1 = this;
+
+ var starttype = this.tok.type, node = this.startNode(), kind;
+
+ if (this.toks.isLet()) {
+ starttype = tokTypes._var;
+ kind = "let";
+ }
+
+ switch (starttype) {
+ case tokTypes._break: case tokTypes._continue:
+ this.next();
+ var isBreak = starttype === tokTypes._break;
+ if (this.semicolon() || this.canInsertSemicolon()) {
+ node.label = null;
+ } else {
+ node.label = this.tok.type === tokTypes.name ? this.parseIdent() : null;
+ this.semicolon();
+ }
+ return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement")
+
+ case tokTypes._debugger:
+ this.next();
+ this.semicolon();
+ return this.finishNode(node, "DebuggerStatement")
+
+ case tokTypes._do:
+ this.next();
+ node.body = this.parseStatement();
+ node.test = this.eat(tokTypes._while) ? this.parseParenExpression() : this.dummyIdent();
+ this.semicolon();
+ return this.finishNode(node, "DoWhileStatement")
+
+ case tokTypes._for:
+ this.next();
+ this.pushCx();
+ this.expect(tokTypes.parenL);
+ if (this.tok.type === tokTypes.semi) { return this.parseFor(node, null) }
+ var isLet = this.toks.isLet();
+ if (isLet || this.tok.type === tokTypes._var || this.tok.type === tokTypes._const) {
+ var init$1 = this.parseVar(true, isLet ? "let" : this.tok.value);
+ if (init$1.declarations.length === 1 && (this.tok.type === tokTypes._in || this.isContextual("of"))) {
+ return this.parseForIn(node, init$1)
+ }
+ return this.parseFor(node, init$1)
+ }
+ var init = this.parseExpression(true);
+ if (this.tok.type === tokTypes._in || this.isContextual("of"))
+ { return this.parseForIn(node, this.toAssignable(init)) }
+ return this.parseFor(node, init)
+
+ case tokTypes._function:
+ this.next();
+ return this.parseFunction(node, true)
+
+ case tokTypes._if:
+ this.next();
+ node.test = this.parseParenExpression();
+ node.consequent = this.parseStatement();
+ node.alternate = this.eat(tokTypes._else) ? this.parseStatement() : null;
+ return this.finishNode(node, "IfStatement")
+
+ case tokTypes._return:
+ this.next();
+ if (this.eat(tokTypes.semi) || this.canInsertSemicolon()) { node.argument = null; }
+ else { node.argument = this.parseExpression(); this.semicolon(); }
+ return this.finishNode(node, "ReturnStatement")
+
+ case tokTypes._switch:
+ var blockIndent = this.curIndent, line = this.curLineStart;
+ this.next();
+ node.discriminant = this.parseParenExpression();
+ node.cases = [];
+ this.pushCx();
+ this.expect(tokTypes.braceL);
+
+ var cur;
+ while (!this.closes(tokTypes.braceR, blockIndent, line, true)) {
+ if (this$1.tok.type === tokTypes._case || this$1.tok.type === tokTypes._default) {
+ var isCase = this$1.tok.type === tokTypes._case;
+ if (cur) { this$1.finishNode(cur, "SwitchCase"); }
+ node.cases.push(cur = this$1.startNode());
+ cur.consequent = [];
+ this$1.next();
+ if (isCase) { cur.test = this$1.parseExpression(); }
+ else { cur.test = null; }
+ this$1.expect(tokTypes.colon);
+ } else {
+ if (!cur) {
+ node.cases.push(cur = this$1.startNode());
+ cur.consequent = [];
+ cur.test = null;
+ }
+ cur.consequent.push(this$1.parseStatement());
+ }
+ }
+ if (cur) { this.finishNode(cur, "SwitchCase"); }
+ this.popCx();
+ this.eat(tokTypes.braceR);
+ return this.finishNode(node, "SwitchStatement")
+
+ case tokTypes._throw:
+ this.next();
+ node.argument = this.parseExpression();
+ this.semicolon();
+ return this.finishNode(node, "ThrowStatement")
+
+ case tokTypes._try:
+ this.next();
+ node.block = this.parseBlock();
+ node.handler = null;
+ if (this.tok.type === tokTypes._catch) {
+ var clause = this.startNode();
+ this.next();
+ this.expect(tokTypes.parenL);
+ clause.param = this.toAssignable(this.parseExprAtom(), true);
+ this.expect(tokTypes.parenR);
+ clause.body = this.parseBlock();
+ node.handler = this.finishNode(clause, "CatchClause");
+ }
+ node.finalizer = this.eat(tokTypes._finally) ? this.parseBlock() : null;
+ if (!node.handler && !node.finalizer) { return node.block }
+ return this.finishNode(node, "TryStatement")
+
+ case tokTypes._var:
+ case tokTypes._const:
+ return this.parseVar(false, kind || this.tok.value)
+
+ case tokTypes._while:
+ this.next();
+ node.test = this.parseParenExpression();
+ node.body = this.parseStatement();
+ return this.finishNode(node, "WhileStatement")
+
+ case tokTypes._with:
+ this.next();
+ node.object = this.parseParenExpression();
+ node.body = this.parseStatement();
+ return this.finishNode(node, "WithStatement")
+
+ case tokTypes.braceL:
+ return this.parseBlock()
+
+ case tokTypes.semi:
+ this.next();
+ return this.finishNode(node, "EmptyStatement")
+
+ case tokTypes._class:
+ return this.parseClass(true)
+
+ case tokTypes._import:
+ return this.parseImport()
+
+ case tokTypes._export:
+ return this.parseExport()
+
+ default:
+ if (this.toks.isAsyncFunction()) {
+ this.next();
+ this.next();
+ return this.parseFunction(node, true, true)
+ }
+ var expr = this.parseExpression();
+ if (isDummy(expr)) {
+ this.next();
+ if (this.tok.type === tokTypes.eof) { return this.finishNode(node, "EmptyStatement") }
+ return this.parseStatement()
+ } else if (starttype === tokTypes.name && expr.type === "Identifier" && this.eat(tokTypes.colon)) {
+ node.body = this.parseStatement();
+ node.label = expr;
+ return this.finishNode(node, "LabeledStatement")
+ } else {
+ node.expression = expr;
+ this.semicolon();
+ return this.finishNode(node, "ExpressionStatement")
+ }
+ }
+};
+
+lp$1.parseBlock = function() {
+ var this$1 = this;
+
+ var node = this.startNode();
+ this.pushCx();
+ this.expect(tokTypes.braceL);
+ var blockIndent = this.curIndent, line = this.curLineStart;
+ node.body = [];
+ while (!this.closes(tokTypes.braceR, blockIndent, line, true))
+ { node.body.push(this$1.parseStatement()); }
+ this.popCx();
+ this.eat(tokTypes.braceR);
+ return this.finishNode(node, "BlockStatement")
+};
+
+lp$1.parseFor = function(node, init) {
+ node.init = init;
+ node.test = node.update = null;
+ if (this.eat(tokTypes.semi) && this.tok.type !== tokTypes.semi) { node.test = this.parseExpression(); }
+ if (this.eat(tokTypes.semi) && this.tok.type !== tokTypes.parenR) { node.update = this.parseExpression(); }
+ this.popCx();
+ this.expect(tokTypes.parenR);
+ node.body = this.parseStatement();
+ return this.finishNode(node, "ForStatement")
+};
+
+lp$1.parseForIn = function(node, init) {
+ var type = this.tok.type === tokTypes._in ? "ForInStatement" : "ForOfStatement";
+ this.next();
+ node.left = init;
+ node.right = this.parseExpression();
+ this.popCx();
+ this.expect(tokTypes.parenR);
+ node.body = this.parseStatement();
+ return this.finishNode(node, type)
+};
+
+lp$1.parseVar = function(noIn, kind) {
+ var this$1 = this;
+
+ var node = this.startNode();
+ node.kind = kind;
+ this.next();
+ node.declarations = [];
+ do {
+ var decl = this$1.startNode();
+ decl.id = this$1.options.ecmaVersion >= 6 ? this$1.toAssignable(this$1.parseExprAtom(), true) : this$1.parseIdent();
+ decl.init = this$1.eat(tokTypes.eq) ? this$1.parseMaybeAssign(noIn) : null;
+ node.declarations.push(this$1.finishNode(decl, "VariableDeclarator"));
+ } while (this.eat(tokTypes.comma))
+ if (!node.declarations.length) {
+ var decl$1 = this.startNode();
+ decl$1.id = this.dummyIdent();
+ node.declarations.push(this.finishNode(decl$1, "VariableDeclarator"));
+ }
+ if (!noIn) { this.semicolon(); }
+ return this.finishNode(node, "VariableDeclaration")
+};
+
+lp$1.parseClass = function(isStatement) {
+ var this$1 = this;
+
+ var node = this.startNode();
+ this.next();
+ if (this.tok.type === tokTypes.name) { node.id = this.parseIdent(); }
+ else if (isStatement === true) { node.id = this.dummyIdent(); }
+ else { node.id = null; }
+ node.superClass = this.eat(tokTypes._extends) ? this.parseExpression() : null;
+ node.body = this.startNode();
+ node.body.body = [];
+ this.pushCx();
+ var indent = this.curIndent + 1, line = this.curLineStart;
+ this.eat(tokTypes.braceL);
+ if (this.curIndent + 1 < indent) { indent = this.curIndent; line = this.curLineStart; }
+ while (!this.closes(tokTypes.braceR, indent, line)) {
+ if (this$1.semicolon()) { continue }
+ var method = this$1.startNode(), isGenerator = (void 0), isAsync = (void 0);
+ if (this$1.options.ecmaVersion >= 6) {
+ method.static = false;
+ isGenerator = this$1.eat(tokTypes.star);
+ }
+ this$1.parsePropertyName(method);
+ if (isDummy(method.key)) { if (isDummy(this$1.parseMaybeAssign())) { this$1.next(); } this$1.eat(tokTypes.comma); continue }
+ if (method.key.type === "Identifier" && !method.computed && method.key.name === "static" &&
+ (this$1.tok.type != tokTypes.parenL && this$1.tok.type != tokTypes.braceL)) {
+ method.static = true;
+ isGenerator = this$1.eat(tokTypes.star);
+ this$1.parsePropertyName(method);
+ } else {
+ method.static = false;
+ }
+ if (!method.computed &&
+ method.key.type === "Identifier" && method.key.name === "async" && this$1.tok.type !== tokTypes.parenL &&
+ !this$1.canInsertSemicolon()) {
+ this$1.parsePropertyName(method);
+ isAsync = true;
+ } else {
+ isAsync = false;
+ }
+ if (this$1.options.ecmaVersion >= 5 && method.key.type === "Identifier" &&
+ !method.computed && (method.key.name === "get" || method.key.name === "set") &&
+ this$1.tok.type !== tokTypes.parenL && this$1.tok.type !== tokTypes.braceL) {
+ method.kind = method.key.name;
+ this$1.parsePropertyName(method);
+ method.value = this$1.parseMethod(false);
+ } else {
+ if (!method.computed && !method.static && !isGenerator && !isAsync && (
+ method.key.type === "Identifier" && method.key.name === "constructor" ||
+ method.key.type === "Literal" && method.key.value === "constructor")) {
+ method.kind = "constructor";
+ } else {
+ method.kind = "method";
+ }
+ method.value = this$1.parseMethod(isGenerator, isAsync);
+ }
+ node.body.body.push(this$1.finishNode(method, "MethodDefinition"));
+ }
+ this.popCx();
+ if (!this.eat(tokTypes.braceR)) {
+ // If there is no closing brace, make the node span to the start
+ // of the next token (this is useful for Tern)
+ this.last.end = this.tok.start;
+ if (this.options.locations) { this.last.loc.end = this.tok.loc.start; }
+ }
+ this.semicolon();
+ this.finishNode(node.body, "ClassBody");
+ return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression")
+};
+
+lp$1.parseFunction = function(node, isStatement, isAsync) {
+ var oldInAsync = this.inAsync;
+ this.initFunction(node);
+ if (this.options.ecmaVersion >= 6) {
+ node.generator = this.eat(tokTypes.star);
+ }
+ if (this.options.ecmaVersion >= 8) {
+ node.async = !!isAsync;
+ }
+ if (this.tok.type === tokTypes.name) { node.id = this.parseIdent(); }
+ else if (isStatement === true) { node.id = this.dummyIdent(); }
+ this.inAsync = node.async;
+ node.params = this.parseFunctionParams();
+ node.body = this.parseBlock();
+ this.toks.adaptDirectivePrologue(node.body.body);
+ this.inAsync = oldInAsync;
+ return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression")
+};
+
+lp$1.parseExport = function() {
+ var node = this.startNode();
+ this.next();
+ if (this.eat(tokTypes.star)) {
+ node.source = this.eatContextual("from") ? this.parseExprAtom() : this.dummyString();
+ return this.finishNode(node, "ExportAllDeclaration")
+ }
+ if (this.eat(tokTypes._default)) {
+ // export default (function foo() {}) // This is FunctionExpression.
+ var isAsync;
+ if (this.tok.type === tokTypes._function || (isAsync = this.toks.isAsyncFunction())) {
+ var fNode = this.startNode();
+ this.next();
+ if (isAsync) { this.next(); }
+ node.declaration = this.parseFunction(fNode, "nullableID", isAsync);
+ } else if (this.tok.type === tokTypes._class) {
+ node.declaration = this.parseClass("nullableID");
+ } else {
+ node.declaration = this.parseMaybeAssign();
+ this.semicolon();
+ }
+ return this.finishNode(node, "ExportDefaultDeclaration")
+ }
+ if (this.tok.type.keyword || this.toks.isLet() || this.toks.isAsyncFunction()) {
+ node.declaration = this.parseStatement();
+ node.specifiers = [];
+ node.source = null;
+ } else {
+ node.declaration = null;
+ node.specifiers = this.parseExportSpecifierList();
+ node.source = this.eatContextual("from") ? this.parseExprAtom() : null;
+ this.semicolon();
+ }
+ return this.finishNode(node, "ExportNamedDeclaration")
+};
+
+lp$1.parseImport = function() {
+ var node = this.startNode();
+ this.next();
+ if (this.tok.type === tokTypes.string) {
+ node.specifiers = [];
+ node.source = this.parseExprAtom();
+ } else {
+ var elt;
+ if (this.tok.type === tokTypes.name && this.tok.value !== "from") {
+ elt = this.startNode();
+ elt.local = this.parseIdent();
+ this.finishNode(elt, "ImportDefaultSpecifier");
+ this.eat(tokTypes.comma);
+ }
+ node.specifiers = this.parseImportSpecifierList();
+ node.source = this.eatContextual("from") && this.tok.type == tokTypes.string ? this.parseExprAtom() : this.dummyString();
+ if (elt) { node.specifiers.unshift(elt); }
+ }
+ this.semicolon();
+ return this.finishNode(node, "ImportDeclaration")
+};
+
+lp$1.parseImportSpecifierList = function() {
+ var this$1 = this;
+
+ var elts = [];
+ if (this.tok.type === tokTypes.star) {
+ var elt = this.startNode();
+ this.next();
+ elt.local = this.eatContextual("as") ? this.parseIdent() : this.dummyIdent();
+ elts.push(this.finishNode(elt, "ImportNamespaceSpecifier"));
+ } else {
+ var indent = this.curIndent, line = this.curLineStart, continuedLine = this.nextLineStart;
+ this.pushCx();
+ this.eat(tokTypes.braceL);
+ if (this.curLineStart > continuedLine) { continuedLine = this.curLineStart; }
+ while (!this.closes(tokTypes.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) {
+ var elt$1 = this$1.startNode();
+ if (this$1.eat(tokTypes.star)) {
+ elt$1.local = this$1.eatContextual("as") ? this$1.parseIdent() : this$1.dummyIdent();
+ this$1.finishNode(elt$1, "ImportNamespaceSpecifier");
+ } else {
+ if (this$1.isContextual("from")) { break }
+ elt$1.imported = this$1.parseIdent();
+ if (isDummy(elt$1.imported)) { break }
+ elt$1.local = this$1.eatContextual("as") ? this$1.parseIdent() : elt$1.imported;
+ this$1.finishNode(elt$1, "ImportSpecifier");
+ }
+ elts.push(elt$1);
+ this$1.eat(tokTypes.comma);
+ }
+ this.eat(tokTypes.braceR);
+ this.popCx();
+ }
+ return elts
+};
+
+lp$1.parseExportSpecifierList = function() {
+ var this$1 = this;
+
+ var elts = [];
+ var indent = this.curIndent, line = this.curLineStart, continuedLine = this.nextLineStart;
+ this.pushCx();
+ this.eat(tokTypes.braceL);
+ if (this.curLineStart > continuedLine) { continuedLine = this.curLineStart; }
+ while (!this.closes(tokTypes.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) {
+ if (this$1.isContextual("from")) { break }
+ var elt = this$1.startNode();
+ elt.local = this$1.parseIdent();
+ if (isDummy(elt.local)) { break }
+ elt.exported = this$1.eatContextual("as") ? this$1.parseIdent() : elt.local;
+ this$1.finishNode(elt, "ExportSpecifier");
+ elts.push(elt);
+ this$1.eat(tokTypes.comma);
+ }
+ this.eat(tokTypes.braceR);
+ this.popCx();
+ return elts
+};
+
+var lp$2 = LooseParser.prototype;
+
+lp$2.checkLVal = function(expr) {
+ if (!expr) { return expr }
+ switch (expr.type) {
+ case "Identifier":
+ case "MemberExpression":
+ return expr
+
+ case "ParenthesizedExpression":
+ expr.expression = this.checkLVal(expr.expression);
+ return expr
+
+ default:
+ return this.dummyIdent()
+ }
+};
+
+lp$2.parseExpression = function(noIn) {
+ var this$1 = this;
+
+ var start = this.storeCurrentPos();
+ var expr = this.parseMaybeAssign(noIn);
+ if (this.tok.type === tokTypes.comma) {
+ var node = this.startNodeAt(start);
+ node.expressions = [expr];
+ while (this.eat(tokTypes.comma)) { node.expressions.push(this$1.parseMaybeAssign(noIn)); }
+ return this.finishNode(node, "SequenceExpression")
+ }
+ return expr
+};
+
+lp$2.parseParenExpression = function() {
+ this.pushCx();
+ this.expect(tokTypes.parenL);
+ var val = this.parseExpression();
+ this.popCx();
+ this.expect(tokTypes.parenR);
+ return val
+};
+
+lp$2.parseMaybeAssign = function(noIn) {
+ if (this.toks.isContextual("yield")) {
+ var node = this.startNode();
+ this.next();
+ if (this.semicolon() || this.canInsertSemicolon() || (this.tok.type != tokTypes.star && !this.tok.type.startsExpr)) {
+ node.delegate = false;
+ node.argument = null;
+ } else {
+ node.delegate = this.eat(tokTypes.star);
+ node.argument = this.parseMaybeAssign();
+ }
+ return this.finishNode(node, "YieldExpression")
+ }
+
+ var start = this.storeCurrentPos();
+ var left = this.parseMaybeConditional(noIn);
+ if (this.tok.type.isAssign) {
+ var node$1 = this.startNodeAt(start);
+ node$1.operator = this.tok.value;
+ node$1.left = this.tok.type === tokTypes.eq ? this.toAssignable(left) : this.checkLVal(left);
+ this.next();
+ node$1.right = this.parseMaybeAssign(noIn);
+ return this.finishNode(node$1, "AssignmentExpression")
+ }
+ return left
+};
+
+lp$2.parseMaybeConditional = function(noIn) {
+ var start = this.storeCurrentPos();
+ var expr = this.parseExprOps(noIn);
+ if (this.eat(tokTypes.question)) {
+ var node = this.startNodeAt(start);
+ node.test = expr;
+ node.consequent = this.parseMaybeAssign();
+ node.alternate = this.expect(tokTypes.colon) ? this.parseMaybeAssign(noIn) : this.dummyIdent();
+ return this.finishNode(node, "ConditionalExpression")
+ }
+ return expr
+};
+
+lp$2.parseExprOps = function(noIn) {
+ var start = this.storeCurrentPos();
+ var indent = this.curIndent, line = this.curLineStart;
+ return this.parseExprOp(this.parseMaybeUnary(false), start, -1, noIn, indent, line)
+};
+
+lp$2.parseExprOp = function(left, start, minPrec, noIn, indent, line) {
+ if (this.curLineStart != line && this.curIndent < indent && this.tokenStartsLine()) { return left }
+ var prec = this.tok.type.binop;
+ if (prec != null && (!noIn || this.tok.type !== tokTypes._in)) {
+ if (prec > minPrec) {
+ var node = this.startNodeAt(start);
+ node.left = left;
+ node.operator = this.tok.value;
+ this.next();
+ if (this.curLineStart != line && this.curIndent < indent && this.tokenStartsLine()) {
+ node.right = this.dummyIdent();
+ } else {
+ var rightStart = this.storeCurrentPos();
+ node.right = this.parseExprOp(this.parseMaybeUnary(false), rightStart, prec, noIn, indent, line);
+ }
+ this.finishNode(node, /&&|\|\|/.test(node.operator) ? "LogicalExpression" : "BinaryExpression");
+ return this.parseExprOp(node, start, minPrec, noIn, indent, line)
+ }
+ }
+ return left
+};
+
+lp$2.parseMaybeUnary = function(sawUnary) {
+ var this$1 = this;
+
+ var start = this.storeCurrentPos(), expr;
+ if (this.options.ecmaVersion >= 8 && this.inAsync && this.toks.isContextual("await")) {
+ expr = this.parseAwait();
+ sawUnary = true;
+ } else if (this.tok.type.prefix) {
+ var node = this.startNode(), update = this.tok.type === tokTypes.incDec;
+ if (!update) { sawUnary = true; }
+ node.operator = this.tok.value;
+ node.prefix = true;
+ this.next();
+ node.argument = this.parseMaybeUnary(true);
+ if (update) { node.argument = this.checkLVal(node.argument); }
+ expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression");
+ } else if (this.tok.type === tokTypes.ellipsis) {
+ var node$1 = this.startNode();
+ this.next();
+ node$1.argument = this.parseMaybeUnary(sawUnary);
+ expr = this.finishNode(node$1, "SpreadElement");
+ } else {
+ expr = this.parseExprSubscripts();
+ while (this.tok.type.postfix && !this.canInsertSemicolon()) {
+ var node$2 = this$1.startNodeAt(start);
+ node$2.operator = this$1.tok.value;
+ node$2.prefix = false;
+ node$2.argument = this$1.checkLVal(expr);
+ this$1.next();
+ expr = this$1.finishNode(node$2, "UpdateExpression");
+ }
+ }
+
+ if (!sawUnary && this.eat(tokTypes.starstar)) {
+ var node$3 = this.startNodeAt(start);
+ node$3.operator = "**";
+ node$3.left = expr;
+ node$3.right = this.parseMaybeUnary(false);
+ return this.finishNode(node$3, "BinaryExpression")
+ }
+
+ return expr
+};
+
+lp$2.parseExprSubscripts = function() {
+ var start = this.storeCurrentPos();
+ return this.parseSubscripts(this.parseExprAtom(), start, false, this.curIndent, this.curLineStart)
+};
+
+lp$2.parseSubscripts = function(base, start, noCalls, startIndent, line) {
+ var this$1 = this;
+
+ for (;;) {
+ if (this$1.curLineStart != line && this$1.curIndent <= startIndent && this$1.tokenStartsLine()) {
+ if (this$1.tok.type == tokTypes.dot && this$1.curIndent == startIndent)
+ { --startIndent; }
+ else
+ { return base }
+ }
+
+ var maybeAsyncArrow = base.type === "Identifier" && base.name === "async" && !this$1.canInsertSemicolon();
+
+ if (this$1.eat(tokTypes.dot)) {
+ var node = this$1.startNodeAt(start);
+ node.object = base;
+ if (this$1.curLineStart != line && this$1.curIndent <= startIndent && this$1.tokenStartsLine())
+ { node.property = this$1.dummyIdent(); }
+ else
+ { node.property = this$1.parsePropertyAccessor() || this$1.dummyIdent(); }
+ node.computed = false;
+ base = this$1.finishNode(node, "MemberExpression");
+ } else if (this$1.tok.type == tokTypes.bracketL) {
+ this$1.pushCx();
+ this$1.next();
+ var node$1 = this$1.startNodeAt(start);
+ node$1.object = base;
+ node$1.property = this$1.parseExpression();
+ node$1.computed = true;
+ this$1.popCx();
+ this$1.expect(tokTypes.bracketR);
+ base = this$1.finishNode(node$1, "MemberExpression");
+ } else if (!noCalls && this$1.tok.type == tokTypes.parenL) {
+ var exprList = this$1.parseExprList(tokTypes.parenR);
+ if (maybeAsyncArrow && this$1.eat(tokTypes.arrow))
+ { return this$1.parseArrowExpression(this$1.startNodeAt(start), exprList, true) }
+ var node$2 = this$1.startNodeAt(start);
+ node$2.callee = base;
+ node$2.arguments = exprList;
+ base = this$1.finishNode(node$2, "CallExpression");
+ } else if (this$1.tok.type == tokTypes.backQuote) {
+ var node$3 = this$1.startNodeAt(start);
+ node$3.tag = base;
+ node$3.quasi = this$1.parseTemplate();
+ base = this$1.finishNode(node$3, "TaggedTemplateExpression");
+ } else {
+ return base
+ }
+ }
+};
+
+lp$2.parseExprAtom = function() {
+ var node;
+ switch (this.tok.type) {
+ case tokTypes._this:
+ case tokTypes._super:
+ var type = this.tok.type === tokTypes._this ? "ThisExpression" : "Super";
+ node = this.startNode();
+ this.next();
+ return this.finishNode(node, type)
+
+ case tokTypes.name:
+ var start = this.storeCurrentPos();
+ var id = this.parseIdent();
+ var isAsync = false;
+ if (id.name === "async" && !this.canInsertSemicolon()) {
+ if (this.eat(tokTypes._function))
+ { return this.parseFunction(this.startNodeAt(start), false, true) }
+ if (this.tok.type === tokTypes.name) {
+ id = this.parseIdent();
+ isAsync = true;
+ }
+ }
+ return this.eat(tokTypes.arrow) ? this.parseArrowExpression(this.startNodeAt(start), [id], isAsync) : id
+
+ case tokTypes.regexp:
+ node = this.startNode();
+ var val = this.tok.value;
+ node.regex = {pattern: val.pattern, flags: val.flags};
+ node.value = val.value;
+ node.raw = this.input.slice(this.tok.start, this.tok.end);
+ this.next();
+ return this.finishNode(node, "Literal")
+
+ case tokTypes.num: case tokTypes.string:
+ node = this.startNode();
+ node.value = this.tok.value;
+ node.raw = this.input.slice(this.tok.start, this.tok.end);
+ this.next();
+ return this.finishNode(node, "Literal")
+
+ case tokTypes._null: case tokTypes._true: case tokTypes._false:
+ node = this.startNode();
+ node.value = this.tok.type === tokTypes._null ? null : this.tok.type === tokTypes._true;
+ node.raw = this.tok.type.keyword;
+ this.next();
+ return this.finishNode(node, "Literal")
+
+ case tokTypes.parenL:
+ var parenStart = this.storeCurrentPos();
+ this.next();
+ var inner = this.parseExpression();
+ this.expect(tokTypes.parenR);
+ if (this.eat(tokTypes.arrow)) {
+ // (a,)=>a // SequenceExpression makes dummy in the last hole. Drop the dummy.
+ var params = inner.expressions || [inner];
+ if (params.length && isDummy(params[params.length - 1]))
+ { params.pop(); }
+ return this.parseArrowExpression(this.startNodeAt(parenStart), params)
+ }
+ if (this.options.preserveParens) {
+ var par = this.startNodeAt(parenStart);
+ par.expression = inner;
+ inner = this.finishNode(par, "ParenthesizedExpression");
+ }
+ return inner
+
+ case tokTypes.bracketL:
+ node = this.startNode();
+ node.elements = this.parseExprList(tokTypes.bracketR, true);
+ return this.finishNode(node, "ArrayExpression")
+
+ case tokTypes.braceL:
+ return this.parseObj()
+
+ case tokTypes._class:
+ return this.parseClass(false)
+
+ case tokTypes._function:
+ node = this.startNode();
+ this.next();
+ return this.parseFunction(node, false)
+
+ case tokTypes._new:
+ return this.parseNew()
+
+ case tokTypes.backQuote:
+ return this.parseTemplate()
+
+ default:
+ return this.dummyIdent()
+ }
+};
+
+lp$2.parseNew = function() {
+ var node = this.startNode(), startIndent = this.curIndent, line = this.curLineStart;
+ var meta = this.parseIdent(true);
+ if (this.options.ecmaVersion >= 6 && this.eat(tokTypes.dot)) {
+ node.meta = meta;
+ node.property = this.parseIdent(true);
+ return this.finishNode(node, "MetaProperty")
+ }
+ var start = this.storeCurrentPos();
+ node.callee = this.parseSubscripts(this.parseExprAtom(), start, true, startIndent, line);
+ if (this.tok.type == tokTypes.parenL) {
+ node.arguments = this.parseExprList(tokTypes.parenR);
+ } else {
+ node.arguments = [];
+ }
+ return this.finishNode(node, "NewExpression")
+};
+
+lp$2.parseTemplateElement = function() {
+ var elem = this.startNode();
+
+ // The loose parser accepts invalid unicode escapes even in untagged templates.
+ if (this.tok.type === tokTypes.invalidTemplate) {
+ elem.value = {
+ raw: this.tok.value,
+ cooked: null
+ };
+ } else {
+ elem.value = {
+ raw: this.input.slice(this.tok.start, this.tok.end).replace(/\r\n?/g, "\n"),
+ cooked: this.tok.value
+ };
+ }
+ this.next();
+ elem.tail = this.tok.type === tokTypes.backQuote;
+ return this.finishNode(elem, "TemplateElement")
+};
+
+lp$2.parseTemplate = function() {
+ var this$1 = this;
+
+ var node = this.startNode();
+ this.next();
+ node.expressions = [];
+ var curElt = this.parseTemplateElement();
+ node.quasis = [curElt];
+ while (!curElt.tail) {
+ this$1.next();
+ node.expressions.push(this$1.parseExpression());
+ if (this$1.expect(tokTypes.braceR)) {
+ curElt = this$1.parseTemplateElement();
+ } else {
+ curElt = this$1.startNode();
+ curElt.value = {cooked: "", raw: ""};
+ curElt.tail = true;
+ this$1.finishNode(curElt, "TemplateElement");
+ }
+ node.quasis.push(curElt);
+ }
+ this.expect(tokTypes.backQuote);
+ return this.finishNode(node, "TemplateLiteral")
+};
+
+lp$2.parseObj = function() {
+ var this$1 = this;
+
+ var node = this.startNode();
+ node.properties = [];
+ this.pushCx();
+ var indent = this.curIndent + 1, line = this.curLineStart;
+ this.eat(tokTypes.braceL);
+ if (this.curIndent + 1 < indent) { indent = this.curIndent; line = this.curLineStart; }
+ while (!this.closes(tokTypes.braceR, indent, line)) {
+ var prop = this$1.startNode(), isGenerator = (void 0), isAsync = (void 0), start = (void 0);
+ if (this$1.options.ecmaVersion >= 6) {
+ start = this$1.storeCurrentPos();
+ prop.method = false;
+ prop.shorthand = false;
+ isGenerator = this$1.eat(tokTypes.star);
+ }
+ this$1.parsePropertyName(prop);
+ if (this$1.toks.isAsyncProp(prop)) {
+ this$1.parsePropertyName(prop);
+ isAsync = true;
+ } else {
+ isAsync = false;
+ }
+ if (isDummy(prop.key)) { if (isDummy(this$1.parseMaybeAssign())) { this$1.next(); } this$1.eat(tokTypes.comma); continue }
+ if (this$1.eat(tokTypes.colon)) {
+ prop.kind = "init";
+ prop.value = this$1.parseMaybeAssign();
+ } else if (this$1.options.ecmaVersion >= 6 && (this$1.tok.type === tokTypes.parenL || this$1.tok.type === tokTypes.braceL)) {
+ prop.kind = "init";
+ prop.method = true;
+ prop.value = this$1.parseMethod(isGenerator, isAsync);
+ } else if (this$1.options.ecmaVersion >= 5 && prop.key.type === "Identifier" &&
+ !prop.computed && (prop.key.name === "get" || prop.key.name === "set") &&
+ (this$1.tok.type != tokTypes.comma && this$1.tok.type != tokTypes.braceR && this$1.tok.type != tokTypes.eq)) {
+ prop.kind = prop.key.name;
+ this$1.parsePropertyName(prop);
+ prop.value = this$1.parseMethod(false);
+ } else {
+ prop.kind = "init";
+ if (this$1.options.ecmaVersion >= 6) {
+ if (this$1.eat(tokTypes.eq)) {
+ var assign = this$1.startNodeAt(start);
+ assign.operator = "=";
+ assign.left = prop.key;
+ assign.right = this$1.parseMaybeAssign();
+ prop.value = this$1.finishNode(assign, "AssignmentExpression");
+ } else {
+ prop.value = prop.key;
+ }
+ } else {
+ prop.value = this$1.dummyIdent();
+ }
+ prop.shorthand = true;
+ }
+ node.properties.push(this$1.finishNode(prop, "Property"));
+ this$1.eat(tokTypes.comma);
+ }
+ this.popCx();
+ if (!this.eat(tokTypes.braceR)) {
+ // If there is no closing brace, make the node span to the start
+ // of the next token (this is useful for Tern)
+ this.last.end = this.tok.start;
+ if (this.options.locations) { this.last.loc.end = this.tok.loc.start; }
+ }
+ return this.finishNode(node, "ObjectExpression")
+};
+
+lp$2.parsePropertyName = function(prop) {
+ if (this.options.ecmaVersion >= 6) {
+ if (this.eat(tokTypes.bracketL)) {
+ prop.computed = true;
+ prop.key = this.parseExpression();
+ this.expect(tokTypes.bracketR);
+ return
+ } else {
+ prop.computed = false;
+ }
+ }
+ var key = (this.tok.type === tokTypes.num || this.tok.type === tokTypes.string) ? this.parseExprAtom() : this.parseIdent();
+ prop.key = key || this.dummyIdent();
+};
+
+lp$2.parsePropertyAccessor = function() {
+ if (this.tok.type === tokTypes.name || this.tok.type.keyword) { return this.parseIdent() }
+};
+
+lp$2.parseIdent = function() {
+ var name = this.tok.type === tokTypes.name ? this.tok.value : this.tok.type.keyword;
+ if (!name) { return this.dummyIdent() }
+ var node = this.startNode();
+ this.next();
+ node.name = name;
+ return this.finishNode(node, "Identifier")
+};
+
+lp$2.initFunction = function(node) {
+ node.id = null;
+ node.params = [];
+ if (this.options.ecmaVersion >= 6) {
+ node.generator = false;
+ node.expression = false;
+ }
+ if (this.options.ecmaVersion >= 8)
+ { node.async = false; }
+};
+
+// Convert existing expression atom to assignable pattern
+// if possible.
+
+lp$2.toAssignable = function(node, binding) {
+ var this$1 = this;
+
+ if (!node || node.type == "Identifier" || (node.type == "MemberExpression" && !binding)) {
+ // Okay
+ } else if (node.type == "ParenthesizedExpression") {
+ this.toAssignable(node.expression, binding);
+ } else if (this.options.ecmaVersion < 6) {
+ return this.dummyIdent()
+ } else if (node.type == "ObjectExpression") {
+ node.type = "ObjectPattern";
+ var props = node.properties;
+ for (var i = 0, list = props; i < list.length; i += 1)
+ {
+ var prop = list[i];
+
+ this$1.toAssignable(prop.value, binding);
+ }
+ } else if (node.type == "ArrayExpression") {
+ node.type = "ArrayPattern";
+ this.toAssignableList(node.elements, binding);
+ } else if (node.type == "SpreadElement") {
+ node.type = "RestElement";
+ this.toAssignable(node.argument, binding);
+ } else if (node.type == "AssignmentExpression") {
+ node.type = "AssignmentPattern";
+ delete node.operator;
+ } else {
+ return this.dummyIdent()
+ }
+ return node
+};
+
+lp$2.toAssignableList = function(exprList, binding) {
+ var this$1 = this;
+
+ for (var i = 0, list = exprList; i < list.length; i += 1)
+ {
+ var expr = list[i];
+
+ this$1.toAssignable(expr, binding);
+ }
+ return exprList
+};
+
+lp$2.parseFunctionParams = function(params) {
+ params = this.parseExprList(tokTypes.parenR);
+ return this.toAssignableList(params, true)
+};
+
+lp$2.parseMethod = function(isGenerator, isAsync) {
+ var node = this.startNode(), oldInAsync = this.inAsync;
+ this.initFunction(node);
+ if (this.options.ecmaVersion >= 6)
+ { node.generator = !!isGenerator; }
+ if (this.options.ecmaVersion >= 8)
+ { node.async = !!isAsync; }
+ this.inAsync = node.async;
+ node.params = this.parseFunctionParams();
+ node.body = this.parseBlock();
+ this.toks.adaptDirectivePrologue(node.body.body);
+ this.inAsync = oldInAsync;
+ return this.finishNode(node, "FunctionExpression")
+};
+
+lp$2.parseArrowExpression = function(node, params, isAsync) {
+ var oldInAsync = this.inAsync;
+ this.initFunction(node);
+ if (this.options.ecmaVersion >= 8)
+ { node.async = !!isAsync; }
+ this.inAsync = node.async;
+ node.params = this.toAssignableList(params, true);
+ node.expression = this.tok.type !== tokTypes.braceL;
+ if (node.expression) {
+ node.body = this.parseMaybeAssign();
+ } else {
+ node.body = this.parseBlock();
+ this.toks.adaptDirectivePrologue(node.body.body);
+ }
+ this.inAsync = oldInAsync;
+ return this.finishNode(node, "ArrowFunctionExpression")
+};
+
+lp$2.parseExprList = function(close, allowEmpty) {
+ var this$1 = this;
+
+ this.pushCx();
+ var indent = this.curIndent, line = this.curLineStart, elts = [];
+ this.next(); // Opening bracket
+ while (!this.closes(close, indent + 1, line)) {
+ if (this$1.eat(tokTypes.comma)) {
+ elts.push(allowEmpty ? null : this$1.dummyIdent());
+ continue
+ }
+ var elt = this$1.parseMaybeAssign();
+ if (isDummy(elt)) {
+ if (this$1.closes(close, indent, line)) { break }
+ this$1.next();
+ } else {
+ elts.push(elt);
+ }
+ this$1.eat(tokTypes.comma);
+ }
+ this.popCx();
+ if (!this.eat(close)) {
+ // If there is no closing brace, make the node span to the start
+ // of the next token (this is useful for Tern)
+ this.last.end = this.tok.start;
+ if (this.options.locations) { this.last.loc.end = this.tok.loc.start; }
+ }
+ return elts
+};
+
+lp$2.parseAwait = function() {
+ var node = this.startNode();
+ this.next();
+ node.argument = this.parseMaybeUnary();
+ return this.finishNode(node, "AwaitExpression")
+};
+
+// Acorn: Loose parser
+//
+// This module provides an alternative parser (`parse_dammit`) that
+// exposes that same interface as `parse`, but will try to parse
+// anything as JavaScript, repairing syntax error the best it can.
+// There are circumstances in which it will raise an error and give
+// up, but they are very rare. The resulting AST will be a mostly
+// valid JavaScript AST (as per the [Mozilla parser API][api], except
+// that:
+//
+// - Return outside functions is allowed
+//
+// - Label consistency (no conflicts, break only to existing labels)
+// is not enforced.
+//
+// - Bogus Identifier nodes with a name of `"✖"` are inserted whenever
+// the parser got too confused to return anything meaningful.
+//
+// [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API
+//
+// The expected use for this is to *first* try `acorn.parse`, and only
+// if that fails switch to `parse_dammit`. The loose parser might
+// parse badly indented code incorrectly, so **don't** use it as
+// your default parser.
+//
+// Quite a lot of acorn.js is duplicated here. The alternative was to
+// add a *lot* of extra cruft to that file, making it less readable
+// and slower. Copying and editing the code allowed me to make
+// invasive changes and simplifications without creating a complicated
+// tangle.
+
+defaultOptions.tabSize = 4;
+
+// eslint-disable-next-line camelcase
+function parse_dammit(input, options) {
+ return new LooseParser(input, options).parse()
+}
+
+addLooseExports(parse_dammit, LooseParser, pluginsLoose);
+
+export { parse_dammit, LooseParser, pluginsLoose };
diff --git a/tools/node_modules/eslint/node_modules/acorn/dist/acorn_loose.js b/tools/node_modules/eslint/node_modules/acorn/dist/acorn_loose.js
new file mode 100644
index 0000000000..d6738db9dc
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn/dist/acorn_loose.js
@@ -0,0 +1,1400 @@
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('./acorn')) :
+ typeof define === 'function' && define.amd ? define(['exports', './acorn'], factory) :
+ (factory((global.acorn = global.acorn || {}, global.acorn.loose = global.acorn.loose || {}),global.acorn));
+}(this, (function (exports,__acorn) { 'use strict';
+
+// Registered plugins
+var pluginsLoose = {};
+
+var LooseParser = function LooseParser(input, options) {
+ if ( options === void 0 ) options = {};
+
+ this.toks = __acorn.tokenizer(input, options);
+ this.options = this.toks.options;
+ this.input = this.toks.input;
+ this.tok = this.last = {type: __acorn.tokTypes.eof, start: 0, end: 0};
+ if (this.options.locations) {
+ var here = this.toks.curPosition();
+ this.tok.loc = new __acorn.SourceLocation(this.toks, here, here);
+ }
+ this.ahead = []; // Tokens ahead
+ this.context = []; // Indentation contexted
+ this.curIndent = 0;
+ this.curLineStart = 0;
+ this.nextLineStart = this.lineEnd(this.curLineStart) + 1;
+ this.inAsync = false;
+ // Load plugins
+ this.options.pluginsLoose = options.pluginsLoose || {};
+ this.loadPlugins(this.options.pluginsLoose);
+};
+
+LooseParser.prototype.startNode = function startNode () {
+ return new __acorn.Node(this.toks, this.tok.start, this.options.locations ? this.tok.loc.start : null)
+};
+
+LooseParser.prototype.storeCurrentPos = function storeCurrentPos () {
+ return this.options.locations ? [this.tok.start, this.tok.loc.start] : this.tok.start
+};
+
+LooseParser.prototype.startNodeAt = function startNodeAt (pos) {
+ if (this.options.locations) {
+ return new __acorn.Node(this.toks, pos[0], pos[1])
+ } else {
+ return new __acorn.Node(this.toks, pos)
+ }
+};
+
+LooseParser.prototype.finishNode = function finishNode (node, type) {
+ node.type = type;
+ node.end = this.last.end;
+ if (this.options.locations)
+ { node.loc.end = this.last.loc.end; }
+ if (this.options.ranges)
+ { node.range[1] = this.last.end; }
+ return node
+};
+
+LooseParser.prototype.dummyNode = function dummyNode (type) {
+ var dummy = this.startNode();
+ dummy.type = type;
+ dummy.end = dummy.start;
+ if (this.options.locations)
+ { dummy.loc.end = dummy.loc.start; }
+ if (this.options.ranges)
+ { dummy.range[1] = dummy.start; }
+ this.last = {type: __acorn.tokTypes.name, start: dummy.start, end: dummy.start, loc: dummy.loc};
+ return dummy
+};
+
+LooseParser.prototype.dummyIdent = function dummyIdent () {
+ var dummy = this.dummyNode("Identifier");
+ dummy.name = "✖";
+ return dummy
+};
+
+LooseParser.prototype.dummyString = function dummyString () {
+ var dummy = this.dummyNode("Literal");
+ dummy.value = dummy.raw = "✖";
+ return dummy
+};
+
+LooseParser.prototype.eat = function eat (type) {
+ if (this.tok.type === type) {
+ this.next();
+ return true
+ } else {
+ return false
+ }
+};
+
+LooseParser.prototype.isContextual = function isContextual (name) {
+ return this.tok.type === __acorn.tokTypes.name && this.tok.value === name
+};
+
+LooseParser.prototype.eatContextual = function eatContextual (name) {
+ return this.tok.value === name && this.eat(__acorn.tokTypes.name)
+};
+
+LooseParser.prototype.canInsertSemicolon = function canInsertSemicolon () {
+ return this.tok.type === __acorn.tokTypes.eof || this.tok.type === __acorn.tokTypes.braceR ||
+ __acorn.lineBreak.test(this.input.slice(this.last.end, this.tok.start))
+};
+
+LooseParser.prototype.semicolon = function semicolon () {
+ return this.eat(__acorn.tokTypes.semi)
+};
+
+LooseParser.prototype.expect = function expect (type) {
+ var this$1 = this;
+
+ if (this.eat(type)) { return true }
+ for (var i = 1; i <= 2; i++) {
+ if (this$1.lookAhead(i).type == type) {
+ for (var j = 0; j < i; j++) { this$1.next(); }
+ return true
+ }
+ }
+};
+
+LooseParser.prototype.pushCx = function pushCx () {
+ this.context.push(this.curIndent);
+};
+
+LooseParser.prototype.popCx = function popCx () {
+ this.curIndent = this.context.pop();
+};
+
+LooseParser.prototype.lineEnd = function lineEnd (pos) {
+ while (pos < this.input.length && !__acorn.isNewLine(this.input.charCodeAt(pos))) { ++pos; }
+ return pos
+};
+
+LooseParser.prototype.indentationAfter = function indentationAfter (pos) {
+ var this$1 = this;
+
+ for (var count = 0;; ++pos) {
+ var ch = this$1.input.charCodeAt(pos);
+ if (ch === 32) { ++count; }
+ else if (ch === 9) { count += this$1.options.tabSize; }
+ else { return count }
+ }
+};
+
+LooseParser.prototype.closes = function closes (closeTok, indent, line, blockHeuristic) {
+ if (this.tok.type === closeTok || this.tok.type === __acorn.tokTypes.eof) { return true }
+ return line != this.curLineStart && this.curIndent < indent && this.tokenStartsLine() &&
+ (!blockHeuristic || this.nextLineStart >= this.input.length ||
+ this.indentationAfter(this.nextLineStart) < indent)
+};
+
+LooseParser.prototype.tokenStartsLine = function tokenStartsLine () {
+ var this$1 = this;
+
+ for (var p = this.tok.start - 1; p >= this.curLineStart; --p) {
+ var ch = this$1.input.charCodeAt(p);
+ if (ch !== 9 && ch !== 32) { return false }
+ }
+ return true
+};
+
+LooseParser.prototype.extend = function extend (name, f) {
+ this[name] = f(this[name]);
+};
+
+LooseParser.prototype.loadPlugins = function loadPlugins (pluginConfigs) {
+ var this$1 = this;
+
+ for (var name in pluginConfigs) {
+ var plugin = pluginsLoose[name];
+ if (!plugin) { throw new Error("Plugin '" + name + "' not found") }
+ plugin(this$1, pluginConfigs[name]);
+ }
+};
+
+LooseParser.prototype.parse = function parse () {
+ this.next();
+ return this.parseTopLevel()
+};
+
+var lp = LooseParser.prototype;
+
+function isSpace(ch) {
+ return (ch < 14 && ch > 8) || ch === 32 || ch === 160 || __acorn.isNewLine(ch)
+}
+
+lp.next = function() {
+ var this$1 = this;
+
+ this.last = this.tok;
+ if (this.ahead.length)
+ { this.tok = this.ahead.shift(); }
+ else
+ { this.tok = this.readToken(); }
+
+ if (this.tok.start >= this.nextLineStart) {
+ while (this.tok.start >= this.nextLineStart) {
+ this$1.curLineStart = this$1.nextLineStart;
+ this$1.nextLineStart = this$1.lineEnd(this$1.curLineStart) + 1;
+ }
+ this.curIndent = this.indentationAfter(this.curLineStart);
+ }
+};
+
+lp.readToken = function() {
+ var this$1 = this;
+
+ for (;;) {
+ try {
+ this$1.toks.next();
+ if (this$1.toks.type === __acorn.tokTypes.dot &&
+ this$1.input.substr(this$1.toks.end, 1) === "." &&
+ this$1.options.ecmaVersion >= 6) {
+ this$1.toks.end++;
+ this$1.toks.type = __acorn.tokTypes.ellipsis;
+ }
+ return new __acorn.Token(this$1.toks)
+ } catch (e) {
+ if (!(e instanceof SyntaxError)) { throw e }
+
+ // Try to skip some text, based on the error message, and then continue
+ var msg = e.message, pos = e.raisedAt, replace = true;
+ if (/unterminated/i.test(msg)) {
+ pos = this$1.lineEnd(e.pos + 1);
+ if (/string/.test(msg)) {
+ replace = {start: e.pos, end: pos, type: __acorn.tokTypes.string, value: this$1.input.slice(e.pos + 1, pos)};
+ } else if (/regular expr/i.test(msg)) {
+ var re = this$1.input.slice(e.pos, pos);
+ try { re = new RegExp(re); } catch (e) { /* ignore compilation error due to new syntax */ }
+ replace = {start: e.pos, end: pos, type: __acorn.tokTypes.regexp, value: re};
+ } else if (/template/.test(msg)) {
+ replace = {
+ start: e.pos,
+ end: pos,
+ type: __acorn.tokTypes.template,
+ value: this$1.input.slice(e.pos, pos)
+ };
+ } else {
+ replace = false;
+ }
+ } else if (/invalid (unicode|regexp|number)|expecting unicode|octal literal|is reserved|directly after number|expected number in radix/i.test(msg)) {
+ while (pos < this.input.length && !isSpace(this.input.charCodeAt(pos))) { ++pos; }
+ } else if (/character escape|expected hexadecimal/i.test(msg)) {
+ while (pos < this.input.length) {
+ var ch = this$1.input.charCodeAt(pos++);
+ if (ch === 34 || ch === 39 || __acorn.isNewLine(ch)) { break }
+ }
+ } else if (/unexpected character/i.test(msg)) {
+ pos++;
+ replace = false;
+ } else if (/regular expression/i.test(msg)) {
+ replace = true;
+ } else {
+ throw e
+ }
+ this$1.resetTo(pos);
+ if (replace === true) { replace = {start: pos, end: pos, type: __acorn.tokTypes.name, value: "✖"}; }
+ if (replace) {
+ if (this$1.options.locations)
+ { replace.loc = new __acorn.SourceLocation(
+ this$1.toks,
+ __acorn.getLineInfo(this$1.input, replace.start),
+ __acorn.getLineInfo(this$1.input, replace.end)); }
+ return replace
+ }
+ }
+ }
+};
+
+lp.resetTo = function(pos) {
+ var this$1 = this;
+
+ this.toks.pos = pos;
+ var ch = this.input.charAt(pos - 1);
+ this.toks.exprAllowed = !ch || /[[{(,;:?/*=+\-~!|&%^<>]/.test(ch) ||
+ /[enwfd]/.test(ch) &&
+ /\b(keywords|case|else|return|throw|new|in|(instance|type)of|delete|void)$/.test(this.input.slice(pos - 10, pos));
+
+ if (this.options.locations) {
+ this.toks.curLine = 1;
+ this.toks.lineStart = __acorn.lineBreakG.lastIndex = 0;
+ var match;
+ while ((match = __acorn.lineBreakG.exec(this.input)) && match.index < pos) {
+ ++this$1.toks.curLine;
+ this$1.toks.lineStart = match.index + match[0].length;
+ }
+ }
+};
+
+lp.lookAhead = function(n) {
+ var this$1 = this;
+
+ while (n > this.ahead.length)
+ { this$1.ahead.push(this$1.readToken()); }
+ return this.ahead[n - 1]
+};
+
+function isDummy(node) { return node.name == "✖" }
+
+var lp$1 = LooseParser.prototype;
+
+lp$1.parseTopLevel = function() {
+ var this$1 = this;
+
+ var node = this.startNodeAt(this.options.locations ? [0, __acorn.getLineInfo(this.input, 0)] : 0);
+ node.body = [];
+ while (this.tok.type !== __acorn.tokTypes.eof) { node.body.push(this$1.parseStatement()); }
+ this.toks.adaptDirectivePrologue(node.body);
+ this.last = this.tok;
+ if (this.options.ecmaVersion >= 6) {
+ node.sourceType = this.options.sourceType;
+ }
+ return this.finishNode(node, "Program")
+};
+
+lp$1.parseStatement = function() {
+ var this$1 = this;
+
+ var starttype = this.tok.type, node = this.startNode(), kind;
+
+ if (this.toks.isLet()) {
+ starttype = __acorn.tokTypes._var;
+ kind = "let";
+ }
+
+ switch (starttype) {
+ case __acorn.tokTypes._break: case __acorn.tokTypes._continue:
+ this.next();
+ var isBreak = starttype === __acorn.tokTypes._break;
+ if (this.semicolon() || this.canInsertSemicolon()) {
+ node.label = null;
+ } else {
+ node.label = this.tok.type === __acorn.tokTypes.name ? this.parseIdent() : null;
+ this.semicolon();
+ }
+ return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement")
+
+ case __acorn.tokTypes._debugger:
+ this.next();
+ this.semicolon();
+ return this.finishNode(node, "DebuggerStatement")
+
+ case __acorn.tokTypes._do:
+ this.next();
+ node.body = this.parseStatement();
+ node.test = this.eat(__acorn.tokTypes._while) ? this.parseParenExpression() : this.dummyIdent();
+ this.semicolon();
+ return this.finishNode(node, "DoWhileStatement")
+
+ case __acorn.tokTypes._for:
+ this.next();
+ this.pushCx();
+ this.expect(__acorn.tokTypes.parenL);
+ if (this.tok.type === __acorn.tokTypes.semi) { return this.parseFor(node, null) }
+ var isLet = this.toks.isLet();
+ if (isLet || this.tok.type === __acorn.tokTypes._var || this.tok.type === __acorn.tokTypes._const) {
+ var init$1 = this.parseVar(true, isLet ? "let" : this.tok.value);
+ if (init$1.declarations.length === 1 && (this.tok.type === __acorn.tokTypes._in || this.isContextual("of"))) {
+ return this.parseForIn(node, init$1)
+ }
+ return this.parseFor(node, init$1)
+ }
+ var init = this.parseExpression(true);
+ if (this.tok.type === __acorn.tokTypes._in || this.isContextual("of"))
+ { return this.parseForIn(node, this.toAssignable(init)) }
+ return this.parseFor(node, init)
+
+ case __acorn.tokTypes._function:
+ this.next();
+ return this.parseFunction(node, true)
+
+ case __acorn.tokTypes._if:
+ this.next();
+ node.test = this.parseParenExpression();
+ node.consequent = this.parseStatement();
+ node.alternate = this.eat(__acorn.tokTypes._else) ? this.parseStatement() : null;
+ return this.finishNode(node, "IfStatement")
+
+ case __acorn.tokTypes._return:
+ this.next();
+ if (this.eat(__acorn.tokTypes.semi) || this.canInsertSemicolon()) { node.argument = null; }
+ else { node.argument = this.parseExpression(); this.semicolon(); }
+ return this.finishNode(node, "ReturnStatement")
+
+ case __acorn.tokTypes._switch:
+ var blockIndent = this.curIndent, line = this.curLineStart;
+ this.next();
+ node.discriminant = this.parseParenExpression();
+ node.cases = [];
+ this.pushCx();
+ this.expect(__acorn.tokTypes.braceL);
+
+ var cur;
+ while (!this.closes(__acorn.tokTypes.braceR, blockIndent, line, true)) {
+ if (this$1.tok.type === __acorn.tokTypes._case || this$1.tok.type === __acorn.tokTypes._default) {
+ var isCase = this$1.tok.type === __acorn.tokTypes._case;
+ if (cur) { this$1.finishNode(cur, "SwitchCase"); }
+ node.cases.push(cur = this$1.startNode());
+ cur.consequent = [];
+ this$1.next();
+ if (isCase) { cur.test = this$1.parseExpression(); }
+ else { cur.test = null; }
+ this$1.expect(__acorn.tokTypes.colon);
+ } else {
+ if (!cur) {
+ node.cases.push(cur = this$1.startNode());
+ cur.consequent = [];
+ cur.test = null;
+ }
+ cur.consequent.push(this$1.parseStatement());
+ }
+ }
+ if (cur) { this.finishNode(cur, "SwitchCase"); }
+ this.popCx();
+ this.eat(__acorn.tokTypes.braceR);
+ return this.finishNode(node, "SwitchStatement")
+
+ case __acorn.tokTypes._throw:
+ this.next();
+ node.argument = this.parseExpression();
+ this.semicolon();
+ return this.finishNode(node, "ThrowStatement")
+
+ case __acorn.tokTypes._try:
+ this.next();
+ node.block = this.parseBlock();
+ node.handler = null;
+ if (this.tok.type === __acorn.tokTypes._catch) {
+ var clause = this.startNode();
+ this.next();
+ this.expect(__acorn.tokTypes.parenL);
+ clause.param = this.toAssignable(this.parseExprAtom(), true);
+ this.expect(__acorn.tokTypes.parenR);
+ clause.body = this.parseBlock();
+ node.handler = this.finishNode(clause, "CatchClause");
+ }
+ node.finalizer = this.eat(__acorn.tokTypes._finally) ? this.parseBlock() : null;
+ if (!node.handler && !node.finalizer) { return node.block }
+ return this.finishNode(node, "TryStatement")
+
+ case __acorn.tokTypes._var:
+ case __acorn.tokTypes._const:
+ return this.parseVar(false, kind || this.tok.value)
+
+ case __acorn.tokTypes._while:
+ this.next();
+ node.test = this.parseParenExpression();
+ node.body = this.parseStatement();
+ return this.finishNode(node, "WhileStatement")
+
+ case __acorn.tokTypes._with:
+ this.next();
+ node.object = this.parseParenExpression();
+ node.body = this.parseStatement();
+ return this.finishNode(node, "WithStatement")
+
+ case __acorn.tokTypes.braceL:
+ return this.parseBlock()
+
+ case __acorn.tokTypes.semi:
+ this.next();
+ return this.finishNode(node, "EmptyStatement")
+
+ case __acorn.tokTypes._class:
+ return this.parseClass(true)
+
+ case __acorn.tokTypes._import:
+ return this.parseImport()
+
+ case __acorn.tokTypes._export:
+ return this.parseExport()
+
+ default:
+ if (this.toks.isAsyncFunction()) {
+ this.next();
+ this.next();
+ return this.parseFunction(node, true, true)
+ }
+ var expr = this.parseExpression();
+ if (isDummy(expr)) {
+ this.next();
+ if (this.tok.type === __acorn.tokTypes.eof) { return this.finishNode(node, "EmptyStatement") }
+ return this.parseStatement()
+ } else if (starttype === __acorn.tokTypes.name && expr.type === "Identifier" && this.eat(__acorn.tokTypes.colon)) {
+ node.body = this.parseStatement();
+ node.label = expr;
+ return this.finishNode(node, "LabeledStatement")
+ } else {
+ node.expression = expr;
+ this.semicolon();
+ return this.finishNode(node, "ExpressionStatement")
+ }
+ }
+};
+
+lp$1.parseBlock = function() {
+ var this$1 = this;
+
+ var node = this.startNode();
+ this.pushCx();
+ this.expect(__acorn.tokTypes.braceL);
+ var blockIndent = this.curIndent, line = this.curLineStart;
+ node.body = [];
+ while (!this.closes(__acorn.tokTypes.braceR, blockIndent, line, true))
+ { node.body.push(this$1.parseStatement()); }
+ this.popCx();
+ this.eat(__acorn.tokTypes.braceR);
+ return this.finishNode(node, "BlockStatement")
+};
+
+lp$1.parseFor = function(node, init) {
+ node.init = init;
+ node.test = node.update = null;
+ if (this.eat(__acorn.tokTypes.semi) && this.tok.type !== __acorn.tokTypes.semi) { node.test = this.parseExpression(); }
+ if (this.eat(__acorn.tokTypes.semi) && this.tok.type !== __acorn.tokTypes.parenR) { node.update = this.parseExpression(); }
+ this.popCx();
+ this.expect(__acorn.tokTypes.parenR);
+ node.body = this.parseStatement();
+ return this.finishNode(node, "ForStatement")
+};
+
+lp$1.parseForIn = function(node, init) {
+ var type = this.tok.type === __acorn.tokTypes._in ? "ForInStatement" : "ForOfStatement";
+ this.next();
+ node.left = init;
+ node.right = this.parseExpression();
+ this.popCx();
+ this.expect(__acorn.tokTypes.parenR);
+ node.body = this.parseStatement();
+ return this.finishNode(node, type)
+};
+
+lp$1.parseVar = function(noIn, kind) {
+ var this$1 = this;
+
+ var node = this.startNode();
+ node.kind = kind;
+ this.next();
+ node.declarations = [];
+ do {
+ var decl = this$1.startNode();
+ decl.id = this$1.options.ecmaVersion >= 6 ? this$1.toAssignable(this$1.parseExprAtom(), true) : this$1.parseIdent();
+ decl.init = this$1.eat(__acorn.tokTypes.eq) ? this$1.parseMaybeAssign(noIn) : null;
+ node.declarations.push(this$1.finishNode(decl, "VariableDeclarator"));
+ } while (this.eat(__acorn.tokTypes.comma))
+ if (!node.declarations.length) {
+ var decl$1 = this.startNode();
+ decl$1.id = this.dummyIdent();
+ node.declarations.push(this.finishNode(decl$1, "VariableDeclarator"));
+ }
+ if (!noIn) { this.semicolon(); }
+ return this.finishNode(node, "VariableDeclaration")
+};
+
+lp$1.parseClass = function(isStatement) {
+ var this$1 = this;
+
+ var node = this.startNode();
+ this.next();
+ if (this.tok.type === __acorn.tokTypes.name) { node.id = this.parseIdent(); }
+ else if (isStatement === true) { node.id = this.dummyIdent(); }
+ else { node.id = null; }
+ node.superClass = this.eat(__acorn.tokTypes._extends) ? this.parseExpression() : null;
+ node.body = this.startNode();
+ node.body.body = [];
+ this.pushCx();
+ var indent = this.curIndent + 1, line = this.curLineStart;
+ this.eat(__acorn.tokTypes.braceL);
+ if (this.curIndent + 1 < indent) { indent = this.curIndent; line = this.curLineStart; }
+ while (!this.closes(__acorn.tokTypes.braceR, indent, line)) {
+ if (this$1.semicolon()) { continue }
+ var method = this$1.startNode(), isGenerator = (void 0), isAsync = (void 0);
+ if (this$1.options.ecmaVersion >= 6) {
+ method.static = false;
+ isGenerator = this$1.eat(__acorn.tokTypes.star);
+ }
+ this$1.parsePropertyName(method);
+ if (isDummy(method.key)) { if (isDummy(this$1.parseMaybeAssign())) { this$1.next(); } this$1.eat(__acorn.tokTypes.comma); continue }
+ if (method.key.type === "Identifier" && !method.computed && method.key.name === "static" &&
+ (this$1.tok.type != __acorn.tokTypes.parenL && this$1.tok.type != __acorn.tokTypes.braceL)) {
+ method.static = true;
+ isGenerator = this$1.eat(__acorn.tokTypes.star);
+ this$1.parsePropertyName(method);
+ } else {
+ method.static = false;
+ }
+ if (!method.computed &&
+ method.key.type === "Identifier" && method.key.name === "async" && this$1.tok.type !== __acorn.tokTypes.parenL &&
+ !this$1.canInsertSemicolon()) {
+ this$1.parsePropertyName(method);
+ isAsync = true;
+ } else {
+ isAsync = false;
+ }
+ if (this$1.options.ecmaVersion >= 5 && method.key.type === "Identifier" &&
+ !method.computed && (method.key.name === "get" || method.key.name === "set") &&
+ this$1.tok.type !== __acorn.tokTypes.parenL && this$1.tok.type !== __acorn.tokTypes.braceL) {
+ method.kind = method.key.name;
+ this$1.parsePropertyName(method);
+ method.value = this$1.parseMethod(false);
+ } else {
+ if (!method.computed && !method.static && !isGenerator && !isAsync && (
+ method.key.type === "Identifier" && method.key.name === "constructor" ||
+ method.key.type === "Literal" && method.key.value === "constructor")) {
+ method.kind = "constructor";
+ } else {
+ method.kind = "method";
+ }
+ method.value = this$1.parseMethod(isGenerator, isAsync);
+ }
+ node.body.body.push(this$1.finishNode(method, "MethodDefinition"));
+ }
+ this.popCx();
+ if (!this.eat(__acorn.tokTypes.braceR)) {
+ // If there is no closing brace, make the node span to the start
+ // of the next token (this is useful for Tern)
+ this.last.end = this.tok.start;
+ if (this.options.locations) { this.last.loc.end = this.tok.loc.start; }
+ }
+ this.semicolon();
+ this.finishNode(node.body, "ClassBody");
+ return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression")
+};
+
+lp$1.parseFunction = function(node, isStatement, isAsync) {
+ var oldInAsync = this.inAsync;
+ this.initFunction(node);
+ if (this.options.ecmaVersion >= 6) {
+ node.generator = this.eat(__acorn.tokTypes.star);
+ }
+ if (this.options.ecmaVersion >= 8) {
+ node.async = !!isAsync;
+ }
+ if (this.tok.type === __acorn.tokTypes.name) { node.id = this.parseIdent(); }
+ else if (isStatement === true) { node.id = this.dummyIdent(); }
+ this.inAsync = node.async;
+ node.params = this.parseFunctionParams();
+ node.body = this.parseBlock();
+ this.toks.adaptDirectivePrologue(node.body.body);
+ this.inAsync = oldInAsync;
+ return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression")
+};
+
+lp$1.parseExport = function() {
+ var node = this.startNode();
+ this.next();
+ if (this.eat(__acorn.tokTypes.star)) {
+ node.source = this.eatContextual("from") ? this.parseExprAtom() : this.dummyString();
+ return this.finishNode(node, "ExportAllDeclaration")
+ }
+ if (this.eat(__acorn.tokTypes._default)) {
+ // export default (function foo() {}) // This is FunctionExpression.
+ var isAsync;
+ if (this.tok.type === __acorn.tokTypes._function || (isAsync = this.toks.isAsyncFunction())) {
+ var fNode = this.startNode();
+ this.next();
+ if (isAsync) { this.next(); }
+ node.declaration = this.parseFunction(fNode, "nullableID", isAsync);
+ } else if (this.tok.type === __acorn.tokTypes._class) {
+ node.declaration = this.parseClass("nullableID");
+ } else {
+ node.declaration = this.parseMaybeAssign();
+ this.semicolon();
+ }
+ return this.finishNode(node, "ExportDefaultDeclaration")
+ }
+ if (this.tok.type.keyword || this.toks.isLet() || this.toks.isAsyncFunction()) {
+ node.declaration = this.parseStatement();
+ node.specifiers = [];
+ node.source = null;
+ } else {
+ node.declaration = null;
+ node.specifiers = this.parseExportSpecifierList();
+ node.source = this.eatContextual("from") ? this.parseExprAtom() : null;
+ this.semicolon();
+ }
+ return this.finishNode(node, "ExportNamedDeclaration")
+};
+
+lp$1.parseImport = function() {
+ var node = this.startNode();
+ this.next();
+ if (this.tok.type === __acorn.tokTypes.string) {
+ node.specifiers = [];
+ node.source = this.parseExprAtom();
+ } else {
+ var elt;
+ if (this.tok.type === __acorn.tokTypes.name && this.tok.value !== "from") {
+ elt = this.startNode();
+ elt.local = this.parseIdent();
+ this.finishNode(elt, "ImportDefaultSpecifier");
+ this.eat(__acorn.tokTypes.comma);
+ }
+ node.specifiers = this.parseImportSpecifierList();
+ node.source = this.eatContextual("from") && this.tok.type == __acorn.tokTypes.string ? this.parseExprAtom() : this.dummyString();
+ if (elt) { node.specifiers.unshift(elt); }
+ }
+ this.semicolon();
+ return this.finishNode(node, "ImportDeclaration")
+};
+
+lp$1.parseImportSpecifierList = function() {
+ var this$1 = this;
+
+ var elts = [];
+ if (this.tok.type === __acorn.tokTypes.star) {
+ var elt = this.startNode();
+ this.next();
+ elt.local = this.eatContextual("as") ? this.parseIdent() : this.dummyIdent();
+ elts.push(this.finishNode(elt, "ImportNamespaceSpecifier"));
+ } else {
+ var indent = this.curIndent, line = this.curLineStart, continuedLine = this.nextLineStart;
+ this.pushCx();
+ this.eat(__acorn.tokTypes.braceL);
+ if (this.curLineStart > continuedLine) { continuedLine = this.curLineStart; }
+ while (!this.closes(__acorn.tokTypes.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) {
+ var elt$1 = this$1.startNode();
+ if (this$1.eat(__acorn.tokTypes.star)) {
+ elt$1.local = this$1.eatContextual("as") ? this$1.parseIdent() : this$1.dummyIdent();
+ this$1.finishNode(elt$1, "ImportNamespaceSpecifier");
+ } else {
+ if (this$1.isContextual("from")) { break }
+ elt$1.imported = this$1.parseIdent();
+ if (isDummy(elt$1.imported)) { break }
+ elt$1.local = this$1.eatContextual("as") ? this$1.parseIdent() : elt$1.imported;
+ this$1.finishNode(elt$1, "ImportSpecifier");
+ }
+ elts.push(elt$1);
+ this$1.eat(__acorn.tokTypes.comma);
+ }
+ this.eat(__acorn.tokTypes.braceR);
+ this.popCx();
+ }
+ return elts
+};
+
+lp$1.parseExportSpecifierList = function() {
+ var this$1 = this;
+
+ var elts = [];
+ var indent = this.curIndent, line = this.curLineStart, continuedLine = this.nextLineStart;
+ this.pushCx();
+ this.eat(__acorn.tokTypes.braceL);
+ if (this.curLineStart > continuedLine) { continuedLine = this.curLineStart; }
+ while (!this.closes(__acorn.tokTypes.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) {
+ if (this$1.isContextual("from")) { break }
+ var elt = this$1.startNode();
+ elt.local = this$1.parseIdent();
+ if (isDummy(elt.local)) { break }
+ elt.exported = this$1.eatContextual("as") ? this$1.parseIdent() : elt.local;
+ this$1.finishNode(elt, "ExportSpecifier");
+ elts.push(elt);
+ this$1.eat(__acorn.tokTypes.comma);
+ }
+ this.eat(__acorn.tokTypes.braceR);
+ this.popCx();
+ return elts
+};
+
+var lp$2 = LooseParser.prototype;
+
+lp$2.checkLVal = function(expr) {
+ if (!expr) { return expr }
+ switch (expr.type) {
+ case "Identifier":
+ case "MemberExpression":
+ return expr
+
+ case "ParenthesizedExpression":
+ expr.expression = this.checkLVal(expr.expression);
+ return expr
+
+ default:
+ return this.dummyIdent()
+ }
+};
+
+lp$2.parseExpression = function(noIn) {
+ var this$1 = this;
+
+ var start = this.storeCurrentPos();
+ var expr = this.parseMaybeAssign(noIn);
+ if (this.tok.type === __acorn.tokTypes.comma) {
+ var node = this.startNodeAt(start);
+ node.expressions = [expr];
+ while (this.eat(__acorn.tokTypes.comma)) { node.expressions.push(this$1.parseMaybeAssign(noIn)); }
+ return this.finishNode(node, "SequenceExpression")
+ }
+ return expr
+};
+
+lp$2.parseParenExpression = function() {
+ this.pushCx();
+ this.expect(__acorn.tokTypes.parenL);
+ var val = this.parseExpression();
+ this.popCx();
+ this.expect(__acorn.tokTypes.parenR);
+ return val
+};
+
+lp$2.parseMaybeAssign = function(noIn) {
+ if (this.toks.isContextual("yield")) {
+ var node = this.startNode();
+ this.next();
+ if (this.semicolon() || this.canInsertSemicolon() || (this.tok.type != __acorn.tokTypes.star && !this.tok.type.startsExpr)) {
+ node.delegate = false;
+ node.argument = null;
+ } else {
+ node.delegate = this.eat(__acorn.tokTypes.star);
+ node.argument = this.parseMaybeAssign();
+ }
+ return this.finishNode(node, "YieldExpression")
+ }
+
+ var start = this.storeCurrentPos();
+ var left = this.parseMaybeConditional(noIn);
+ if (this.tok.type.isAssign) {
+ var node$1 = this.startNodeAt(start);
+ node$1.operator = this.tok.value;
+ node$1.left = this.tok.type === __acorn.tokTypes.eq ? this.toAssignable(left) : this.checkLVal(left);
+ this.next();
+ node$1.right = this.parseMaybeAssign(noIn);
+ return this.finishNode(node$1, "AssignmentExpression")
+ }
+ return left
+};
+
+lp$2.parseMaybeConditional = function(noIn) {
+ var start = this.storeCurrentPos();
+ var expr = this.parseExprOps(noIn);
+ if (this.eat(__acorn.tokTypes.question)) {
+ var node = this.startNodeAt(start);
+ node.test = expr;
+ node.consequent = this.parseMaybeAssign();
+ node.alternate = this.expect(__acorn.tokTypes.colon) ? this.parseMaybeAssign(noIn) : this.dummyIdent();
+ return this.finishNode(node, "ConditionalExpression")
+ }
+ return expr
+};
+
+lp$2.parseExprOps = function(noIn) {
+ var start = this.storeCurrentPos();
+ var indent = this.curIndent, line = this.curLineStart;
+ return this.parseExprOp(this.parseMaybeUnary(false), start, -1, noIn, indent, line)
+};
+
+lp$2.parseExprOp = function(left, start, minPrec, noIn, indent, line) {
+ if (this.curLineStart != line && this.curIndent < indent && this.tokenStartsLine()) { return left }
+ var prec = this.tok.type.binop;
+ if (prec != null && (!noIn || this.tok.type !== __acorn.tokTypes._in)) {
+ if (prec > minPrec) {
+ var node = this.startNodeAt(start);
+ node.left = left;
+ node.operator = this.tok.value;
+ this.next();
+ if (this.curLineStart != line && this.curIndent < indent && this.tokenStartsLine()) {
+ node.right = this.dummyIdent();
+ } else {
+ var rightStart = this.storeCurrentPos();
+ node.right = this.parseExprOp(this.parseMaybeUnary(false), rightStart, prec, noIn, indent, line);
+ }
+ this.finishNode(node, /&&|\|\|/.test(node.operator) ? "LogicalExpression" : "BinaryExpression");
+ return this.parseExprOp(node, start, minPrec, noIn, indent, line)
+ }
+ }
+ return left
+};
+
+lp$2.parseMaybeUnary = function(sawUnary) {
+ var this$1 = this;
+
+ var start = this.storeCurrentPos(), expr;
+ if (this.options.ecmaVersion >= 8 && this.inAsync && this.toks.isContextual("await")) {
+ expr = this.parseAwait();
+ sawUnary = true;
+ } else if (this.tok.type.prefix) {
+ var node = this.startNode(), update = this.tok.type === __acorn.tokTypes.incDec;
+ if (!update) { sawUnary = true; }
+ node.operator = this.tok.value;
+ node.prefix = true;
+ this.next();
+ node.argument = this.parseMaybeUnary(true);
+ if (update) { node.argument = this.checkLVal(node.argument); }
+ expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression");
+ } else if (this.tok.type === __acorn.tokTypes.ellipsis) {
+ var node$1 = this.startNode();
+ this.next();
+ node$1.argument = this.parseMaybeUnary(sawUnary);
+ expr = this.finishNode(node$1, "SpreadElement");
+ } else {
+ expr = this.parseExprSubscripts();
+ while (this.tok.type.postfix && !this.canInsertSemicolon()) {
+ var node$2 = this$1.startNodeAt(start);
+ node$2.operator = this$1.tok.value;
+ node$2.prefix = false;
+ node$2.argument = this$1.checkLVal(expr);
+ this$1.next();
+ expr = this$1.finishNode(node$2, "UpdateExpression");
+ }
+ }
+
+ if (!sawUnary && this.eat(__acorn.tokTypes.starstar)) {
+ var node$3 = this.startNodeAt(start);
+ node$3.operator = "**";
+ node$3.left = expr;
+ node$3.right = this.parseMaybeUnary(false);
+ return this.finishNode(node$3, "BinaryExpression")
+ }
+
+ return expr
+};
+
+lp$2.parseExprSubscripts = function() {
+ var start = this.storeCurrentPos();
+ return this.parseSubscripts(this.parseExprAtom(), start, false, this.curIndent, this.curLineStart)
+};
+
+lp$2.parseSubscripts = function(base, start, noCalls, startIndent, line) {
+ var this$1 = this;
+
+ for (;;) {
+ if (this$1.curLineStart != line && this$1.curIndent <= startIndent && this$1.tokenStartsLine()) {
+ if (this$1.tok.type == __acorn.tokTypes.dot && this$1.curIndent == startIndent)
+ { --startIndent; }
+ else
+ { return base }
+ }
+
+ var maybeAsyncArrow = base.type === "Identifier" && base.name === "async" && !this$1.canInsertSemicolon();
+
+ if (this$1.eat(__acorn.tokTypes.dot)) {
+ var node = this$1.startNodeAt(start);
+ node.object = base;
+ if (this$1.curLineStart != line && this$1.curIndent <= startIndent && this$1.tokenStartsLine())
+ { node.property = this$1.dummyIdent(); }
+ else
+ { node.property = this$1.parsePropertyAccessor() || this$1.dummyIdent(); }
+ node.computed = false;
+ base = this$1.finishNode(node, "MemberExpression");
+ } else if (this$1.tok.type == __acorn.tokTypes.bracketL) {
+ this$1.pushCx();
+ this$1.next();
+ var node$1 = this$1.startNodeAt(start);
+ node$1.object = base;
+ node$1.property = this$1.parseExpression();
+ node$1.computed = true;
+ this$1.popCx();
+ this$1.expect(__acorn.tokTypes.bracketR);
+ base = this$1.finishNode(node$1, "MemberExpression");
+ } else if (!noCalls && this$1.tok.type == __acorn.tokTypes.parenL) {
+ var exprList = this$1.parseExprList(__acorn.tokTypes.parenR);
+ if (maybeAsyncArrow && this$1.eat(__acorn.tokTypes.arrow))
+ { return this$1.parseArrowExpression(this$1.startNodeAt(start), exprList, true) }
+ var node$2 = this$1.startNodeAt(start);
+ node$2.callee = base;
+ node$2.arguments = exprList;
+ base = this$1.finishNode(node$2, "CallExpression");
+ } else if (this$1.tok.type == __acorn.tokTypes.backQuote) {
+ var node$3 = this$1.startNodeAt(start);
+ node$3.tag = base;
+ node$3.quasi = this$1.parseTemplate();
+ base = this$1.finishNode(node$3, "TaggedTemplateExpression");
+ } else {
+ return base
+ }
+ }
+};
+
+lp$2.parseExprAtom = function() {
+ var node;
+ switch (this.tok.type) {
+ case __acorn.tokTypes._this:
+ case __acorn.tokTypes._super:
+ var type = this.tok.type === __acorn.tokTypes._this ? "ThisExpression" : "Super";
+ node = this.startNode();
+ this.next();
+ return this.finishNode(node, type)
+
+ case __acorn.tokTypes.name:
+ var start = this.storeCurrentPos();
+ var id = this.parseIdent();
+ var isAsync = false;
+ if (id.name === "async" && !this.canInsertSemicolon()) {
+ if (this.eat(__acorn.tokTypes._function))
+ { return this.parseFunction(this.startNodeAt(start), false, true) }
+ if (this.tok.type === __acorn.tokTypes.name) {
+ id = this.parseIdent();
+ isAsync = true;
+ }
+ }
+ return this.eat(__acorn.tokTypes.arrow) ? this.parseArrowExpression(this.startNodeAt(start), [id], isAsync) : id
+
+ case __acorn.tokTypes.regexp:
+ node = this.startNode();
+ var val = this.tok.value;
+ node.regex = {pattern: val.pattern, flags: val.flags};
+ node.value = val.value;
+ node.raw = this.input.slice(this.tok.start, this.tok.end);
+ this.next();
+ return this.finishNode(node, "Literal")
+
+ case __acorn.tokTypes.num: case __acorn.tokTypes.string:
+ node = this.startNode();
+ node.value = this.tok.value;
+ node.raw = this.input.slice(this.tok.start, this.tok.end);
+ this.next();
+ return this.finishNode(node, "Literal")
+
+ case __acorn.tokTypes._null: case __acorn.tokTypes._true: case __acorn.tokTypes._false:
+ node = this.startNode();
+ node.value = this.tok.type === __acorn.tokTypes._null ? null : this.tok.type === __acorn.tokTypes._true;
+ node.raw = this.tok.type.keyword;
+ this.next();
+ return this.finishNode(node, "Literal")
+
+ case __acorn.tokTypes.parenL:
+ var parenStart = this.storeCurrentPos();
+ this.next();
+ var inner = this.parseExpression();
+ this.expect(__acorn.tokTypes.parenR);
+ if (this.eat(__acorn.tokTypes.arrow)) {
+ // (a,)=>a // SequenceExpression makes dummy in the last hole. Drop the dummy.
+ var params = inner.expressions || [inner];
+ if (params.length && isDummy(params[params.length - 1]))
+ { params.pop(); }
+ return this.parseArrowExpression(this.startNodeAt(parenStart), params)
+ }
+ if (this.options.preserveParens) {
+ var par = this.startNodeAt(parenStart);
+ par.expression = inner;
+ inner = this.finishNode(par, "ParenthesizedExpression");
+ }
+ return inner
+
+ case __acorn.tokTypes.bracketL:
+ node = this.startNode();
+ node.elements = this.parseExprList(__acorn.tokTypes.bracketR, true);
+ return this.finishNode(node, "ArrayExpression")
+
+ case __acorn.tokTypes.braceL:
+ return this.parseObj()
+
+ case __acorn.tokTypes._class:
+ return this.parseClass(false)
+
+ case __acorn.tokTypes._function:
+ node = this.startNode();
+ this.next();
+ return this.parseFunction(node, false)
+
+ case __acorn.tokTypes._new:
+ return this.parseNew()
+
+ case __acorn.tokTypes.backQuote:
+ return this.parseTemplate()
+
+ default:
+ return this.dummyIdent()
+ }
+};
+
+lp$2.parseNew = function() {
+ var node = this.startNode(), startIndent = this.curIndent, line = this.curLineStart;
+ var meta = this.parseIdent(true);
+ if (this.options.ecmaVersion >= 6 && this.eat(__acorn.tokTypes.dot)) {
+ node.meta = meta;
+ node.property = this.parseIdent(true);
+ return this.finishNode(node, "MetaProperty")
+ }
+ var start = this.storeCurrentPos();
+ node.callee = this.parseSubscripts(this.parseExprAtom(), start, true, startIndent, line);
+ if (this.tok.type == __acorn.tokTypes.parenL) {
+ node.arguments = this.parseExprList(__acorn.tokTypes.parenR);
+ } else {
+ node.arguments = [];
+ }
+ return this.finishNode(node, "NewExpression")
+};
+
+lp$2.parseTemplateElement = function() {
+ var elem = this.startNode();
+
+ // The loose parser accepts invalid unicode escapes even in untagged templates.
+ if (this.tok.type === __acorn.tokTypes.invalidTemplate) {
+ elem.value = {
+ raw: this.tok.value,
+ cooked: null
+ };
+ } else {
+ elem.value = {
+ raw: this.input.slice(this.tok.start, this.tok.end).replace(/\r\n?/g, "\n"),
+ cooked: this.tok.value
+ };
+ }
+ this.next();
+ elem.tail = this.tok.type === __acorn.tokTypes.backQuote;
+ return this.finishNode(elem, "TemplateElement")
+};
+
+lp$2.parseTemplate = function() {
+ var this$1 = this;
+
+ var node = this.startNode();
+ this.next();
+ node.expressions = [];
+ var curElt = this.parseTemplateElement();
+ node.quasis = [curElt];
+ while (!curElt.tail) {
+ this$1.next();
+ node.expressions.push(this$1.parseExpression());
+ if (this$1.expect(__acorn.tokTypes.braceR)) {
+ curElt = this$1.parseTemplateElement();
+ } else {
+ curElt = this$1.startNode();
+ curElt.value = {cooked: "", raw: ""};
+ curElt.tail = true;
+ this$1.finishNode(curElt, "TemplateElement");
+ }
+ node.quasis.push(curElt);
+ }
+ this.expect(__acorn.tokTypes.backQuote);
+ return this.finishNode(node, "TemplateLiteral")
+};
+
+lp$2.parseObj = function() {
+ var this$1 = this;
+
+ var node = this.startNode();
+ node.properties = [];
+ this.pushCx();
+ var indent = this.curIndent + 1, line = this.curLineStart;
+ this.eat(__acorn.tokTypes.braceL);
+ if (this.curIndent + 1 < indent) { indent = this.curIndent; line = this.curLineStart; }
+ while (!this.closes(__acorn.tokTypes.braceR, indent, line)) {
+ var prop = this$1.startNode(), isGenerator = (void 0), isAsync = (void 0), start = (void 0);
+ if (this$1.options.ecmaVersion >= 6) {
+ start = this$1.storeCurrentPos();
+ prop.method = false;
+ prop.shorthand = false;
+ isGenerator = this$1.eat(__acorn.tokTypes.star);
+ }
+ this$1.parsePropertyName(prop);
+ if (this$1.toks.isAsyncProp(prop)) {
+ this$1.parsePropertyName(prop);
+ isAsync = true;
+ } else {
+ isAsync = false;
+ }
+ if (isDummy(prop.key)) { if (isDummy(this$1.parseMaybeAssign())) { this$1.next(); } this$1.eat(__acorn.tokTypes.comma); continue }
+ if (this$1.eat(__acorn.tokTypes.colon)) {
+ prop.kind = "init";
+ prop.value = this$1.parseMaybeAssign();
+ } else if (this$1.options.ecmaVersion >= 6 && (this$1.tok.type === __acorn.tokTypes.parenL || this$1.tok.type === __acorn.tokTypes.braceL)) {
+ prop.kind = "init";
+ prop.method = true;
+ prop.value = this$1.parseMethod(isGenerator, isAsync);
+ } else if (this$1.options.ecmaVersion >= 5 && prop.key.type === "Identifier" &&
+ !prop.computed && (prop.key.name === "get" || prop.key.name === "set") &&
+ (this$1.tok.type != __acorn.tokTypes.comma && this$1.tok.type != __acorn.tokTypes.braceR && this$1.tok.type != __acorn.tokTypes.eq)) {
+ prop.kind = prop.key.name;
+ this$1.parsePropertyName(prop);
+ prop.value = this$1.parseMethod(false);
+ } else {
+ prop.kind = "init";
+ if (this$1.options.ecmaVersion >= 6) {
+ if (this$1.eat(__acorn.tokTypes.eq)) {
+ var assign = this$1.startNodeAt(start);
+ assign.operator = "=";
+ assign.left = prop.key;
+ assign.right = this$1.parseMaybeAssign();
+ prop.value = this$1.finishNode(assign, "AssignmentExpression");
+ } else {
+ prop.value = prop.key;
+ }
+ } else {
+ prop.value = this$1.dummyIdent();
+ }
+ prop.shorthand = true;
+ }
+ node.properties.push(this$1.finishNode(prop, "Property"));
+ this$1.eat(__acorn.tokTypes.comma);
+ }
+ this.popCx();
+ if (!this.eat(__acorn.tokTypes.braceR)) {
+ // If there is no closing brace, make the node span to the start
+ // of the next token (this is useful for Tern)
+ this.last.end = this.tok.start;
+ if (this.options.locations) { this.last.loc.end = this.tok.loc.start; }
+ }
+ return this.finishNode(node, "ObjectExpression")
+};
+
+lp$2.parsePropertyName = function(prop) {
+ if (this.options.ecmaVersion >= 6) {
+ if (this.eat(__acorn.tokTypes.bracketL)) {
+ prop.computed = true;
+ prop.key = this.parseExpression();
+ this.expect(__acorn.tokTypes.bracketR);
+ return
+ } else {
+ prop.computed = false;
+ }
+ }
+ var key = (this.tok.type === __acorn.tokTypes.num || this.tok.type === __acorn.tokTypes.string) ? this.parseExprAtom() : this.parseIdent();
+ prop.key = key || this.dummyIdent();
+};
+
+lp$2.parsePropertyAccessor = function() {
+ if (this.tok.type === __acorn.tokTypes.name || this.tok.type.keyword) { return this.parseIdent() }
+};
+
+lp$2.parseIdent = function() {
+ var name = this.tok.type === __acorn.tokTypes.name ? this.tok.value : this.tok.type.keyword;
+ if (!name) { return this.dummyIdent() }
+ var node = this.startNode();
+ this.next();
+ node.name = name;
+ return this.finishNode(node, "Identifier")
+};
+
+lp$2.initFunction = function(node) {
+ node.id = null;
+ node.params = [];
+ if (this.options.ecmaVersion >= 6) {
+ node.generator = false;
+ node.expression = false;
+ }
+ if (this.options.ecmaVersion >= 8)
+ { node.async = false; }
+};
+
+// Convert existing expression atom to assignable pattern
+// if possible.
+
+lp$2.toAssignable = function(node, binding) {
+ var this$1 = this;
+
+ if (!node || node.type == "Identifier" || (node.type == "MemberExpression" && !binding)) {
+ // Okay
+ } else if (node.type == "ParenthesizedExpression") {
+ this.toAssignable(node.expression, binding);
+ } else if (this.options.ecmaVersion < 6) {
+ return this.dummyIdent()
+ } else if (node.type == "ObjectExpression") {
+ node.type = "ObjectPattern";
+ var props = node.properties;
+ for (var i = 0, list = props; i < list.length; i += 1)
+ {
+ var prop = list[i];
+
+ this$1.toAssignable(prop.value, binding);
+ }
+ } else if (node.type == "ArrayExpression") {
+ node.type = "ArrayPattern";
+ this.toAssignableList(node.elements, binding);
+ } else if (node.type == "SpreadElement") {
+ node.type = "RestElement";
+ this.toAssignable(node.argument, binding);
+ } else if (node.type == "AssignmentExpression") {
+ node.type = "AssignmentPattern";
+ delete node.operator;
+ } else {
+ return this.dummyIdent()
+ }
+ return node
+};
+
+lp$2.toAssignableList = function(exprList, binding) {
+ var this$1 = this;
+
+ for (var i = 0, list = exprList; i < list.length; i += 1)
+ {
+ var expr = list[i];
+
+ this$1.toAssignable(expr, binding);
+ }
+ return exprList
+};
+
+lp$2.parseFunctionParams = function(params) {
+ params = this.parseExprList(__acorn.tokTypes.parenR);
+ return this.toAssignableList(params, true)
+};
+
+lp$2.parseMethod = function(isGenerator, isAsync) {
+ var node = this.startNode(), oldInAsync = this.inAsync;
+ this.initFunction(node);
+ if (this.options.ecmaVersion >= 6)
+ { node.generator = !!isGenerator; }
+ if (this.options.ecmaVersion >= 8)
+ { node.async = !!isAsync; }
+ this.inAsync = node.async;
+ node.params = this.parseFunctionParams();
+ node.body = this.parseBlock();
+ this.toks.adaptDirectivePrologue(node.body.body);
+ this.inAsync = oldInAsync;
+ return this.finishNode(node, "FunctionExpression")
+};
+
+lp$2.parseArrowExpression = function(node, params, isAsync) {
+ var oldInAsync = this.inAsync;
+ this.initFunction(node);
+ if (this.options.ecmaVersion >= 8)
+ { node.async = !!isAsync; }
+ this.inAsync = node.async;
+ node.params = this.toAssignableList(params, true);
+ node.expression = this.tok.type !== __acorn.tokTypes.braceL;
+ if (node.expression) {
+ node.body = this.parseMaybeAssign();
+ } else {
+ node.body = this.parseBlock();
+ this.toks.adaptDirectivePrologue(node.body.body);
+ }
+ this.inAsync = oldInAsync;
+ return this.finishNode(node, "ArrowFunctionExpression")
+};
+
+lp$2.parseExprList = function(close, allowEmpty) {
+ var this$1 = this;
+
+ this.pushCx();
+ var indent = this.curIndent, line = this.curLineStart, elts = [];
+ this.next(); // Opening bracket
+ while (!this.closes(close, indent + 1, line)) {
+ if (this$1.eat(__acorn.tokTypes.comma)) {
+ elts.push(allowEmpty ? null : this$1.dummyIdent());
+ continue
+ }
+ var elt = this$1.parseMaybeAssign();
+ if (isDummy(elt)) {
+ if (this$1.closes(close, indent, line)) { break }
+ this$1.next();
+ } else {
+ elts.push(elt);
+ }
+ this$1.eat(__acorn.tokTypes.comma);
+ }
+ this.popCx();
+ if (!this.eat(close)) {
+ // If there is no closing brace, make the node span to the start
+ // of the next token (this is useful for Tern)
+ this.last.end = this.tok.start;
+ if (this.options.locations) { this.last.loc.end = this.tok.loc.start; }
+ }
+ return elts
+};
+
+lp$2.parseAwait = function() {
+ var node = this.startNode();
+ this.next();
+ node.argument = this.parseMaybeUnary();
+ return this.finishNode(node, "AwaitExpression")
+};
+
+// Acorn: Loose parser
+//
+// This module provides an alternative parser (`parse_dammit`) that
+// exposes that same interface as `parse`, but will try to parse
+// anything as JavaScript, repairing syntax error the best it can.
+// There are circumstances in which it will raise an error and give
+// up, but they are very rare. The resulting AST will be a mostly
+// valid JavaScript AST (as per the [Mozilla parser API][api], except
+// that:
+//
+// - Return outside functions is allowed
+//
+// - Label consistency (no conflicts, break only to existing labels)
+// is not enforced.
+//
+// - Bogus Identifier nodes with a name of `"✖"` are inserted whenever
+// the parser got too confused to return anything meaningful.
+//
+// [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API
+//
+// The expected use for this is to *first* try `acorn.parse`, and only
+// if that fails switch to `parse_dammit`. The loose parser might
+// parse badly indented code incorrectly, so **don't** use it as
+// your default parser.
+//
+// Quite a lot of acorn.js is duplicated here. The alternative was to
+// add a *lot* of extra cruft to that file, making it less readable
+// and slower. Copying and editing the code allowed me to make
+// invasive changes and simplifications without creating a complicated
+// tangle.
+
+__acorn.defaultOptions.tabSize = 4;
+
+// eslint-disable-next-line camelcase
+function parse_dammit(input, options) {
+ return new LooseParser(input, options).parse()
+}
+
+__acorn.addLooseExports(parse_dammit, LooseParser, pluginsLoose);
+
+exports.parse_dammit = parse_dammit;
+exports.LooseParser = LooseParser;
+exports.pluginsLoose = pluginsLoose;
+
+Object.defineProperty(exports, '__esModule', { value: true });
+
+})));
diff --git a/tools/node_modules/eslint/node_modules/acorn/dist/walk.es.js b/tools/node_modules/eslint/node_modules/acorn/dist/walk.es.js
new file mode 100644
index 0000000000..40356507d9
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn/dist/walk.es.js
@@ -0,0 +1,407 @@
+// AST walker module for Mozilla Parser API compatible trees
+
+// A simple walk is one where you simply specify callbacks to be
+// called on specific nodes. The last two arguments are optional. A
+// simple use would be
+//
+// walk.simple(myTree, {
+// Expression: function(node) { ... }
+// });
+//
+// to do something with all expressions. All Parser API node types
+// can be used to identify node types, as well as Expression,
+// Statement, and ScopeBody, which denote categories of nodes.
+//
+// The base argument can be used to pass a custom (recursive)
+// walker, and state can be used to give this walked an initial
+// state.
+
+function simple(node, visitors, base, state, override) {
+ if (!base) { base = exports.base
+ ; }(function c(node, st, override) {
+ var type = override || node.type, found = visitors[type];
+ base[type](node, st, c);
+ if (found) { found(node, st); }
+ })(node, state, override);
+}
+
+// An ancestor walk keeps an array of ancestor nodes (including the
+// current node) and passes them to the callback as third parameter
+// (and also as state parameter when no other state is present).
+function ancestor(node, visitors, base, state) {
+ if (!base) { base = exports.base; }
+ var ancestors = [];(function c(node, st, override) {
+ var type = override || node.type, found = visitors[type];
+ var isNew = node != ancestors[ancestors.length - 1];
+ if (isNew) { ancestors.push(node); }
+ base[type](node, st, c);
+ if (found) { found(node, st || ancestors, ancestors); }
+ if (isNew) { ancestors.pop(); }
+ })(node, state);
+}
+
+// A recursive walk is one where your functions override the default
+// walkers. They can modify and replace the state parameter that's
+// threaded through the walk, and can opt how and whether to walk
+// their child nodes (by calling their third argument on these
+// nodes).
+function recursive(node, state, funcs, base, override) {
+ var visitor = funcs ? exports.make(funcs, base) : base;(function c(node, st, override) {
+ visitor[override || node.type](node, st, c);
+ })(node, state, override);
+}
+
+function makeTest(test) {
+ if (typeof test == "string")
+ { return function (type) { return type == test; } }
+ else if (!test)
+ { return function () { return true; } }
+ else
+ { return test }
+}
+
+var Found = function Found(node, state) { this.node = node; this.state = state; };
+
+// A full walk triggers the callback on each node
+function full(node, callback, base, state, override) {
+ if (!base) { base = exports.base
+ ; }(function c(node, st, override) {
+ var type = override || node.type;
+ base[type](node, st, c);
+ if (!override) { callback(node, st, type); }
+ })(node, state, override);
+}
+
+// An fullAncestor walk is like an ancestor walk, but triggers
+// the callback on each node
+function fullAncestor(node, callback, base, state) {
+ if (!base) { base = exports.base; }
+ var ancestors = [];(function c(node, st, override) {
+ var type = override || node.type;
+ var isNew = node != ancestors[ancestors.length - 1];
+ if (isNew) { ancestors.push(node); }
+ base[type](node, st, c);
+ if (!override) { callback(node, st || ancestors, ancestors, type); }
+ if (isNew) { ancestors.pop(); }
+ })(node, state);
+}
+
+// Find a node with a given start, end, and type (all are optional,
+// null can be used as wildcard). Returns a {node, state} object, or
+// undefined when it doesn't find a matching node.
+function findNodeAt(node, start, end, test, base, state) {
+ test = makeTest(test);
+ if (!base) { base = exports.base; }
+ try {
+ (function c(node, st, override) {
+ var type = override || node.type;
+ if ((start == null || node.start <= start) &&
+ (end == null || node.end >= end))
+ { base[type](node, st, c); }
+ if ((start == null || node.start == start) &&
+ (end == null || node.end == end) &&
+ test(type, node))
+ { throw new Found(node, st) }
+ })(node, state);
+ } catch (e) {
+ if (e instanceof Found) { return e }
+ throw e
+ }
+}
+
+// Find the innermost node of a given type that contains the given
+// position. Interface similar to findNodeAt.
+function findNodeAround(node, pos, test, base, state) {
+ test = makeTest(test);
+ if (!base) { base = exports.base; }
+ try {
+ (function c(node, st, override) {
+ var type = override || node.type;
+ if (node.start > pos || node.end < pos) { return }
+ base[type](node, st, c);
+ if (test(type, node)) { throw new Found(node, st) }
+ })(node, state);
+ } catch (e) {
+ if (e instanceof Found) { return e }
+ throw e
+ }
+}
+
+// Find the outermost matching node after a given position.
+function findNodeAfter(node, pos, test, base, state) {
+ test = makeTest(test);
+ if (!base) { base = exports.base; }
+ try {
+ (function c(node, st, override) {
+ if (node.end < pos) { return }
+ var type = override || node.type;
+ if (node.start >= pos && test(type, node)) { throw new Found(node, st) }
+ base[type](node, st, c);
+ })(node, state);
+ } catch (e) {
+ if (e instanceof Found) { return e }
+ throw e
+ }
+}
+
+// Find the outermost matching node before a given position.
+function findNodeBefore(node, pos, test, base, state) {
+ test = makeTest(test);
+ if (!base) { base = exports.base; }
+ var max;(function c(node, st, override) {
+ if (node.start > pos) { return }
+ var type = override || node.type;
+ if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node))
+ { max = new Found(node, st); }
+ base[type](node, st, c);
+ })(node, state);
+ return max
+}
+
+// Fallback to an Object.create polyfill for older environments.
+var create = Object.create || function(proto) {
+ function Ctor() {}
+ Ctor.prototype = proto;
+ return new Ctor
+};
+
+// Used to create a custom walker. Will fill in all missing node
+// type properties with the defaults.
+function make(funcs, base) {
+ if (!base) { base = exports.base; }
+ var visitor = create(base);
+ for (var type in funcs) { visitor[type] = funcs[type]; }
+ return visitor
+}
+
+function skipThrough(node, st, c) { c(node, st); }
+function ignore(_node, _st, _c) {}
+
+// Node walkers.
+
+var base = {};
+
+base.Program = base.BlockStatement = function (node, st, c) {
+ for (var i = 0, list = node.body; i < list.length; i += 1)
+ {
+ var stmt = list[i];
+
+ c(stmt, st, "Statement");
+ }
+};
+base.Statement = skipThrough;
+base.EmptyStatement = ignore;
+base.ExpressionStatement = base.ParenthesizedExpression =
+ function (node, st, c) { return c(node.expression, st, "Expression"); };
+base.IfStatement = function (node, st, c) {
+ c(node.test, st, "Expression");
+ c(node.consequent, st, "Statement");
+ if (node.alternate) { c(node.alternate, st, "Statement"); }
+};
+base.LabeledStatement = function (node, st, c) { return c(node.body, st, "Statement"); };
+base.BreakStatement = base.ContinueStatement = ignore;
+base.WithStatement = function (node, st, c) {
+ c(node.object, st, "Expression");
+ c(node.body, st, "Statement");
+};
+base.SwitchStatement = function (node, st, c) {
+ c(node.discriminant, st, "Expression");
+ for (var i = 0, list = node.cases; i < list.length; i += 1) {
+ var cs = list[i];
+
+ if (cs.test) { c(cs.test, st, "Expression"); }
+ for (var i$1 = 0, list$1 = cs.consequent; i$1 < list$1.length; i$1 += 1)
+ {
+ var cons = list$1[i$1];
+
+ c(cons, st, "Statement");
+ }
+ }
+};
+base.ReturnStatement = base.YieldExpression = base.AwaitExpression = function (node, st, c) {
+ if (node.argument) { c(node.argument, st, "Expression"); }
+};
+base.ThrowStatement = base.SpreadElement =
+ function (node, st, c) { return c(node.argument, st, "Expression"); };
+base.TryStatement = function (node, st, c) {
+ c(node.block, st, "Statement");
+ if (node.handler) { c(node.handler, st); }
+ if (node.finalizer) { c(node.finalizer, st, "Statement"); }
+};
+base.CatchClause = function (node, st, c) {
+ c(node.param, st, "Pattern");
+ c(node.body, st, "ScopeBody");
+};
+base.WhileStatement = base.DoWhileStatement = function (node, st, c) {
+ c(node.test, st, "Expression");
+ c(node.body, st, "Statement");
+};
+base.ForStatement = function (node, st, c) {
+ if (node.init) { c(node.init, st, "ForInit"); }
+ if (node.test) { c(node.test, st, "Expression"); }
+ if (node.update) { c(node.update, st, "Expression"); }
+ c(node.body, st, "Statement");
+};
+base.ForInStatement = base.ForOfStatement = function (node, st, c) {
+ c(node.left, st, "ForInit");
+ c(node.right, st, "Expression");
+ c(node.body, st, "Statement");
+};
+base.ForInit = function (node, st, c) {
+ if (node.type == "VariableDeclaration") { c(node, st); }
+ else { c(node, st, "Expression"); }
+};
+base.DebuggerStatement = ignore;
+
+base.FunctionDeclaration = function (node, st, c) { return c(node, st, "Function"); };
+base.VariableDeclaration = function (node, st, c) {
+ for (var i = 0, list = node.declarations; i < list.length; i += 1)
+ {
+ var decl = list[i];
+
+ c(decl, st);
+ }
+};
+base.VariableDeclarator = function (node, st, c) {
+ c(node.id, st, "Pattern");
+ if (node.init) { c(node.init, st, "Expression"); }
+};
+
+base.Function = function (node, st, c) {
+ if (node.id) { c(node.id, st, "Pattern"); }
+ for (var i = 0, list = node.params; i < list.length; i += 1)
+ {
+ var param = list[i];
+
+ c(param, st, "Pattern");
+ }
+ c(node.body, st, node.expression ? "ScopeExpression" : "ScopeBody");
+};
+// FIXME drop these node types in next major version
+// (They are awkward, and in ES6 every block can be a scope.)
+base.ScopeBody = function (node, st, c) { return c(node, st, "Statement"); };
+base.ScopeExpression = function (node, st, c) { return c(node, st, "Expression"); };
+
+base.Pattern = function (node, st, c) {
+ if (node.type == "Identifier")
+ { c(node, st, "VariablePattern"); }
+ else if (node.type == "MemberExpression")
+ { c(node, st, "MemberPattern"); }
+ else
+ { c(node, st); }
+};
+base.VariablePattern = ignore;
+base.MemberPattern = skipThrough;
+base.RestElement = function (node, st, c) { return c(node.argument, st, "Pattern"); };
+base.ArrayPattern = function (node, st, c) {
+ for (var i = 0, list = node.elements; i < list.length; i += 1) {
+ var elt = list[i];
+
+ if (elt) { c(elt, st, "Pattern"); }
+ }
+};
+base.ObjectPattern = function (node, st, c) {
+ for (var i = 0, list = node.properties; i < list.length; i += 1)
+ {
+ var prop = list[i];
+
+ c(prop.value, st, "Pattern");
+ }
+};
+
+base.Expression = skipThrough;
+base.ThisExpression = base.Super = base.MetaProperty = ignore;
+base.ArrayExpression = function (node, st, c) {
+ for (var i = 0, list = node.elements; i < list.length; i += 1) {
+ var elt = list[i];
+
+ if (elt) { c(elt, st, "Expression"); }
+ }
+};
+base.ObjectExpression = function (node, st, c) {
+ for (var i = 0, list = node.properties; i < list.length; i += 1)
+ {
+ var prop = list[i];
+
+ c(prop, st);
+ }
+};
+base.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration;
+base.SequenceExpression = base.TemplateLiteral = function (node, st, c) {
+ for (var i = 0, list = node.expressions; i < list.length; i += 1)
+ {
+ var expr = list[i];
+
+ c(expr, st, "Expression");
+ }
+};
+base.UnaryExpression = base.UpdateExpression = function (node, st, c) {
+ c(node.argument, st, "Expression");
+};
+base.BinaryExpression = base.LogicalExpression = function (node, st, c) {
+ c(node.left, st, "Expression");
+ c(node.right, st, "Expression");
+};
+base.AssignmentExpression = base.AssignmentPattern = function (node, st, c) {
+ c(node.left, st, "Pattern");
+ c(node.right, st, "Expression");
+};
+base.ConditionalExpression = function (node, st, c) {
+ c(node.test, st, "Expression");
+ c(node.consequent, st, "Expression");
+ c(node.alternate, st, "Expression");
+};
+base.NewExpression = base.CallExpression = function (node, st, c) {
+ c(node.callee, st, "Expression");
+ if (node.arguments)
+ { for (var i = 0, list = node.arguments; i < list.length; i += 1)
+ {
+ var arg = list[i];
+
+ c(arg, st, "Expression");
+ } }
+};
+base.MemberExpression = function (node, st, c) {
+ c(node.object, st, "Expression");
+ if (node.computed) { c(node.property, st, "Expression"); }
+};
+base.ExportNamedDeclaration = base.ExportDefaultDeclaration = function (node, st, c) {
+ if (node.declaration)
+ { c(node.declaration, st, node.type == "ExportNamedDeclaration" || node.declaration.id ? "Statement" : "Expression"); }
+ if (node.source) { c(node.source, st, "Expression"); }
+};
+base.ExportAllDeclaration = function (node, st, c) {
+ c(node.source, st, "Expression");
+};
+base.ImportDeclaration = function (node, st, c) {
+ for (var i = 0, list = node.specifiers; i < list.length; i += 1)
+ {
+ var spec = list[i];
+
+ c(spec, st);
+ }
+ c(node.source, st, "Expression");
+};
+base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.Literal = ignore;
+
+base.TaggedTemplateExpression = function (node, st, c) {
+ c(node.tag, st, "Expression");
+ c(node.quasi, st);
+};
+base.ClassDeclaration = base.ClassExpression = function (node, st, c) { return c(node, st, "Class"); };
+base.Class = function (node, st, c) {
+ if (node.id) { c(node.id, st, "Pattern"); }
+ if (node.superClass) { c(node.superClass, st, "Expression"); }
+ for (var i = 0, list = node.body.body; i < list.length; i += 1)
+ {
+ var item = list[i];
+
+ c(item, st);
+ }
+};
+base.MethodDefinition = base.Property = function (node, st, c) {
+ if (node.computed) { c(node.key, st, "Expression"); }
+ c(node.value, st, "Expression");
+};
+
+export { simple, ancestor, recursive, full, fullAncestor, findNodeAt, findNodeAround, findNodeAfter, findNodeBefore, make, base };
diff --git a/tools/node_modules/eslint/node_modules/acorn/dist/walk.js b/tools/node_modules/eslint/node_modules/acorn/dist/walk.js
new file mode 100644
index 0000000000..b4fb694053
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn/dist/walk.js
@@ -0,0 +1,427 @@
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
+ typeof define === 'function' && define.amd ? define(['exports'], factory) :
+ (factory((global.acorn = global.acorn || {}, global.acorn.walk = global.acorn.walk || {})));
+}(this, (function (exports) { 'use strict';
+
+// AST walker module for Mozilla Parser API compatible trees
+
+// A simple walk is one where you simply specify callbacks to be
+// called on specific nodes. The last two arguments are optional. A
+// simple use would be
+//
+// walk.simple(myTree, {
+// Expression: function(node) { ... }
+// });
+//
+// to do something with all expressions. All Parser API node types
+// can be used to identify node types, as well as Expression,
+// Statement, and ScopeBody, which denote categories of nodes.
+//
+// The base argument can be used to pass a custom (recursive)
+// walker, and state can be used to give this walked an initial
+// state.
+
+function simple(node, visitors, base, state, override) {
+ if (!base) { base = exports.base
+ ; }(function c(node, st, override) {
+ var type = override || node.type, found = visitors[type];
+ base[type](node, st, c);
+ if (found) { found(node, st); }
+ })(node, state, override);
+}
+
+// An ancestor walk keeps an array of ancestor nodes (including the
+// current node) and passes them to the callback as third parameter
+// (and also as state parameter when no other state is present).
+function ancestor(node, visitors, base, state) {
+ if (!base) { base = exports.base; }
+ var ancestors = [];(function c(node, st, override) {
+ var type = override || node.type, found = visitors[type];
+ var isNew = node != ancestors[ancestors.length - 1];
+ if (isNew) { ancestors.push(node); }
+ base[type](node, st, c);
+ if (found) { found(node, st || ancestors, ancestors); }
+ if (isNew) { ancestors.pop(); }
+ })(node, state);
+}
+
+// A recursive walk is one where your functions override the default
+// walkers. They can modify and replace the state parameter that's
+// threaded through the walk, and can opt how and whether to walk
+// their child nodes (by calling their third argument on these
+// nodes).
+function recursive(node, state, funcs, base, override) {
+ var visitor = funcs ? exports.make(funcs, base) : base;(function c(node, st, override) {
+ visitor[override || node.type](node, st, c);
+ })(node, state, override);
+}
+
+function makeTest(test) {
+ if (typeof test == "string")
+ { return function (type) { return type == test; } }
+ else if (!test)
+ { return function () { return true; } }
+ else
+ { return test }
+}
+
+var Found = function Found(node, state) { this.node = node; this.state = state; };
+
+// A full walk triggers the callback on each node
+function full(node, callback, base, state, override) {
+ if (!base) { base = exports.base
+ ; }(function c(node, st, override) {
+ var type = override || node.type;
+ base[type](node, st, c);
+ if (!override) { callback(node, st, type); }
+ })(node, state, override);
+}
+
+// An fullAncestor walk is like an ancestor walk, but triggers
+// the callback on each node
+function fullAncestor(node, callback, base, state) {
+ if (!base) { base = exports.base; }
+ var ancestors = [];(function c(node, st, override) {
+ var type = override || node.type;
+ var isNew = node != ancestors[ancestors.length - 1];
+ if (isNew) { ancestors.push(node); }
+ base[type](node, st, c);
+ if (!override) { callback(node, st || ancestors, ancestors, type); }
+ if (isNew) { ancestors.pop(); }
+ })(node, state);
+}
+
+// Find a node with a given start, end, and type (all are optional,
+// null can be used as wildcard). Returns a {node, state} object, or
+// undefined when it doesn't find a matching node.
+function findNodeAt(node, start, end, test, base, state) {
+ test = makeTest(test);
+ if (!base) { base = exports.base; }
+ try {
+ (function c(node, st, override) {
+ var type = override || node.type;
+ if ((start == null || node.start <= start) &&
+ (end == null || node.end >= end))
+ { base[type](node, st, c); }
+ if ((start == null || node.start == start) &&
+ (end == null || node.end == end) &&
+ test(type, node))
+ { throw new Found(node, st) }
+ })(node, state);
+ } catch (e) {
+ if (e instanceof Found) { return e }
+ throw e
+ }
+}
+
+// Find the innermost node of a given type that contains the given
+// position. Interface similar to findNodeAt.
+function findNodeAround(node, pos, test, base, state) {
+ test = makeTest(test);
+ if (!base) { base = exports.base; }
+ try {
+ (function c(node, st, override) {
+ var type = override || node.type;
+ if (node.start > pos || node.end < pos) { return }
+ base[type](node, st, c);
+ if (test(type, node)) { throw new Found(node, st) }
+ })(node, state);
+ } catch (e) {
+ if (e instanceof Found) { return e }
+ throw e
+ }
+}
+
+// Find the outermost matching node after a given position.
+function findNodeAfter(node, pos, test, base, state) {
+ test = makeTest(test);
+ if (!base) { base = exports.base; }
+ try {
+ (function c(node, st, override) {
+ if (node.end < pos) { return }
+ var type = override || node.type;
+ if (node.start >= pos && test(type, node)) { throw new Found(node, st) }
+ base[type](node, st, c);
+ })(node, state);
+ } catch (e) {
+ if (e instanceof Found) { return e }
+ throw e
+ }
+}
+
+// Find the outermost matching node before a given position.
+function findNodeBefore(node, pos, test, base, state) {
+ test = makeTest(test);
+ if (!base) { base = exports.base; }
+ var max;(function c(node, st, override) {
+ if (node.start > pos) { return }
+ var type = override || node.type;
+ if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node))
+ { max = new Found(node, st); }
+ base[type](node, st, c);
+ })(node, state);
+ return max
+}
+
+// Fallback to an Object.create polyfill for older environments.
+var create = Object.create || function(proto) {
+ function Ctor() {}
+ Ctor.prototype = proto;
+ return new Ctor
+};
+
+// Used to create a custom walker. Will fill in all missing node
+// type properties with the defaults.
+function make(funcs, base) {
+ if (!base) { base = exports.base; }
+ var visitor = create(base);
+ for (var type in funcs) { visitor[type] = funcs[type]; }
+ return visitor
+}
+
+function skipThrough(node, st, c) { c(node, st); }
+function ignore(_node, _st, _c) {}
+
+// Node walkers.
+
+var base = {};
+
+base.Program = base.BlockStatement = function (node, st, c) {
+ for (var i = 0, list = node.body; i < list.length; i += 1)
+ {
+ var stmt = list[i];
+
+ c(stmt, st, "Statement");
+ }
+};
+base.Statement = skipThrough;
+base.EmptyStatement = ignore;
+base.ExpressionStatement = base.ParenthesizedExpression =
+ function (node, st, c) { return c(node.expression, st, "Expression"); };
+base.IfStatement = function (node, st, c) {
+ c(node.test, st, "Expression");
+ c(node.consequent, st, "Statement");
+ if (node.alternate) { c(node.alternate, st, "Statement"); }
+};
+base.LabeledStatement = function (node, st, c) { return c(node.body, st, "Statement"); };
+base.BreakStatement = base.ContinueStatement = ignore;
+base.WithStatement = function (node, st, c) {
+ c(node.object, st, "Expression");
+ c(node.body, st, "Statement");
+};
+base.SwitchStatement = function (node, st, c) {
+ c(node.discriminant, st, "Expression");
+ for (var i = 0, list = node.cases; i < list.length; i += 1) {
+ var cs = list[i];
+
+ if (cs.test) { c(cs.test, st, "Expression"); }
+ for (var i$1 = 0, list$1 = cs.consequent; i$1 < list$1.length; i$1 += 1)
+ {
+ var cons = list$1[i$1];
+
+ c(cons, st, "Statement");
+ }
+ }
+};
+base.ReturnStatement = base.YieldExpression = base.AwaitExpression = function (node, st, c) {
+ if (node.argument) { c(node.argument, st, "Expression"); }
+};
+base.ThrowStatement = base.SpreadElement =
+ function (node, st, c) { return c(node.argument, st, "Expression"); };
+base.TryStatement = function (node, st, c) {
+ c(node.block, st, "Statement");
+ if (node.handler) { c(node.handler, st); }
+ if (node.finalizer) { c(node.finalizer, st, "Statement"); }
+};
+base.CatchClause = function (node, st, c) {
+ c(node.param, st, "Pattern");
+ c(node.body, st, "ScopeBody");
+};
+base.WhileStatement = base.DoWhileStatement = function (node, st, c) {
+ c(node.test, st, "Expression");
+ c(node.body, st, "Statement");
+};
+base.ForStatement = function (node, st, c) {
+ if (node.init) { c(node.init, st, "ForInit"); }
+ if (node.test) { c(node.test, st, "Expression"); }
+ if (node.update) { c(node.update, st, "Expression"); }
+ c(node.body, st, "Statement");
+};
+base.ForInStatement = base.ForOfStatement = function (node, st, c) {
+ c(node.left, st, "ForInit");
+ c(node.right, st, "Expression");
+ c(node.body, st, "Statement");
+};
+base.ForInit = function (node, st, c) {
+ if (node.type == "VariableDeclaration") { c(node, st); }
+ else { c(node, st, "Expression"); }
+};
+base.DebuggerStatement = ignore;
+
+base.FunctionDeclaration = function (node, st, c) { return c(node, st, "Function"); };
+base.VariableDeclaration = function (node, st, c) {
+ for (var i = 0, list = node.declarations; i < list.length; i += 1)
+ {
+ var decl = list[i];
+
+ c(decl, st);
+ }
+};
+base.VariableDeclarator = function (node, st, c) {
+ c(node.id, st, "Pattern");
+ if (node.init) { c(node.init, st, "Expression"); }
+};
+
+base.Function = function (node, st, c) {
+ if (node.id) { c(node.id, st, "Pattern"); }
+ for (var i = 0, list = node.params; i < list.length; i += 1)
+ {
+ var param = list[i];
+
+ c(param, st, "Pattern");
+ }
+ c(node.body, st, node.expression ? "ScopeExpression" : "ScopeBody");
+};
+// FIXME drop these node types in next major version
+// (They are awkward, and in ES6 every block can be a scope.)
+base.ScopeBody = function (node, st, c) { return c(node, st, "Statement"); };
+base.ScopeExpression = function (node, st, c) { return c(node, st, "Expression"); };
+
+base.Pattern = function (node, st, c) {
+ if (node.type == "Identifier")
+ { c(node, st, "VariablePattern"); }
+ else if (node.type == "MemberExpression")
+ { c(node, st, "MemberPattern"); }
+ else
+ { c(node, st); }
+};
+base.VariablePattern = ignore;
+base.MemberPattern = skipThrough;
+base.RestElement = function (node, st, c) { return c(node.argument, st, "Pattern"); };
+base.ArrayPattern = function (node, st, c) {
+ for (var i = 0, list = node.elements; i < list.length; i += 1) {
+ var elt = list[i];
+
+ if (elt) { c(elt, st, "Pattern"); }
+ }
+};
+base.ObjectPattern = function (node, st, c) {
+ for (var i = 0, list = node.properties; i < list.length; i += 1)
+ {
+ var prop = list[i];
+
+ c(prop.value, st, "Pattern");
+ }
+};
+
+base.Expression = skipThrough;
+base.ThisExpression = base.Super = base.MetaProperty = ignore;
+base.ArrayExpression = function (node, st, c) {
+ for (var i = 0, list = node.elements; i < list.length; i += 1) {
+ var elt = list[i];
+
+ if (elt) { c(elt, st, "Expression"); }
+ }
+};
+base.ObjectExpression = function (node, st, c) {
+ for (var i = 0, list = node.properties; i < list.length; i += 1)
+ {
+ var prop = list[i];
+
+ c(prop, st);
+ }
+};
+base.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration;
+base.SequenceExpression = base.TemplateLiteral = function (node, st, c) {
+ for (var i = 0, list = node.expressions; i < list.length; i += 1)
+ {
+ var expr = list[i];
+
+ c(expr, st, "Expression");
+ }
+};
+base.UnaryExpression = base.UpdateExpression = function (node, st, c) {
+ c(node.argument, st, "Expression");
+};
+base.BinaryExpression = base.LogicalExpression = function (node, st, c) {
+ c(node.left, st, "Expression");
+ c(node.right, st, "Expression");
+};
+base.AssignmentExpression = base.AssignmentPattern = function (node, st, c) {
+ c(node.left, st, "Pattern");
+ c(node.right, st, "Expression");
+};
+base.ConditionalExpression = function (node, st, c) {
+ c(node.test, st, "Expression");
+ c(node.consequent, st, "Expression");
+ c(node.alternate, st, "Expression");
+};
+base.NewExpression = base.CallExpression = function (node, st, c) {
+ c(node.callee, st, "Expression");
+ if (node.arguments)
+ { for (var i = 0, list = node.arguments; i < list.length; i += 1)
+ {
+ var arg = list[i];
+
+ c(arg, st, "Expression");
+ } }
+};
+base.MemberExpression = function (node, st, c) {
+ c(node.object, st, "Expression");
+ if (node.computed) { c(node.property, st, "Expression"); }
+};
+base.ExportNamedDeclaration = base.ExportDefaultDeclaration = function (node, st, c) {
+ if (node.declaration)
+ { c(node.declaration, st, node.type == "ExportNamedDeclaration" || node.declaration.id ? "Statement" : "Expression"); }
+ if (node.source) { c(node.source, st, "Expression"); }
+};
+base.ExportAllDeclaration = function (node, st, c) {
+ c(node.source, st, "Expression");
+};
+base.ImportDeclaration = function (node, st, c) {
+ for (var i = 0, list = node.specifiers; i < list.length; i += 1)
+ {
+ var spec = list[i];
+
+ c(spec, st);
+ }
+ c(node.source, st, "Expression");
+};
+base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.Literal = ignore;
+
+base.TaggedTemplateExpression = function (node, st, c) {
+ c(node.tag, st, "Expression");
+ c(node.quasi, st);
+};
+base.ClassDeclaration = base.ClassExpression = function (node, st, c) { return c(node, st, "Class"); };
+base.Class = function (node, st, c) {
+ if (node.id) { c(node.id, st, "Pattern"); }
+ if (node.superClass) { c(node.superClass, st, "Expression"); }
+ for (var i = 0, list = node.body.body; i < list.length; i += 1)
+ {
+ var item = list[i];
+
+ c(item, st);
+ }
+};
+base.MethodDefinition = base.Property = function (node, st, c) {
+ if (node.computed) { c(node.key, st, "Expression"); }
+ c(node.value, st, "Expression");
+};
+
+exports.simple = simple;
+exports.ancestor = ancestor;
+exports.recursive = recursive;
+exports.full = full;
+exports.fullAncestor = fullAncestor;
+exports.findNodeAt = findNodeAt;
+exports.findNodeAround = findNodeAround;
+exports.findNodeAfter = findNodeAfter;
+exports.findNodeBefore = findNodeBefore;
+exports.make = make;
+exports.base = base;
+
+Object.defineProperty(exports, '__esModule', { value: true });
+
+})));
diff --git a/tools/node_modules/eslint/node_modules/acorn/package.json b/tools/node_modules/eslint/node_modules/acorn/package.json
new file mode 100644
index 0000000000..6109435384
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/acorn/package.json
@@ -0,0 +1,286 @@
+{
+ "_from": "acorn@^5.2.1",
+ "_id": "acorn@5.2.1",
+ "_inBundle": false,
+ "_integrity": "sha512-jG0u7c4Ly+3QkkW18V+NRDN+4bWHdln30NL1ZL2AvFZZmQe/BfopYCtghCKKVBUSetZ4QKcyA0pY6/4Gw8Pv8w==",
+ "_location": "/eslint/acorn",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "acorn@^5.2.1",
+ "name": "acorn",
+ "escapedName": "acorn",
+ "rawSpec": "^5.2.1",
+ "saveSpec": null,
+ "fetchSpec": "^5.2.1"
+ },
+ "_requiredBy": [
+ "/eslint/espree"
+ ],
+ "_resolved": "https://registry.npmjs.org/acorn/-/acorn-5.2.1.tgz",
+ "_shasum": "317ac7821826c22c702d66189ab8359675f135d7",
+ "_spec": "acorn@^5.2.1",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/espree",
+ "bin": {
+ "acorn": "./bin/acorn"
+ },
+ "bugs": {
+ "url": "https://github.com/ternjs/acorn/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "List of Acorn contributors. Updated before every release."
+ },
+ {
+ "name": "Adrian Rakovsky"
+ },
+ {
+ "name": "Alistair Braidwood"
+ },
+ {
+ "name": "Amila Welihinda"
+ },
+ {
+ "name": "Andres Suarez"
+ },
+ {
+ "name": "Angelo"
+ },
+ {
+ "name": "Aparajita Fishman"
+ },
+ {
+ "name": "Arian Stolwijk"
+ },
+ {
+ "name": "Artem Govorov"
+ },
+ {
+ "name": "Bradley Heinz"
+ },
+ {
+ "name": "Brandon Mills"
+ },
+ {
+ "name": "Charles Hughes"
+ },
+ {
+ "name": "Conrad Irwin"
+ },
+ {
+ "name": "Daniel Tschinder"
+ },
+ {
+ "name": "David Bonnet"
+ },
+ {
+ "name": "Domenico Matteo"
+ },
+ {
+ "name": "ehmicky"
+ },
+ {
+ "name": "Forbes Lindesay"
+ },
+ {
+ "name": "Gilad Peleg"
+ },
+ {
+ "name": "impinball"
+ },
+ {
+ "name": "Ingvar Stepanyan"
+ },
+ {
+ "name": "Jackson Ray Hamilton"
+ },
+ {
+ "name": "Jesse McCarthy"
+ },
+ {
+ "name": "Jiaxing Wang"
+ },
+ {
+ "name": "Joel Kemp"
+ },
+ {
+ "name": "Johannes Herr"
+ },
+ {
+ "name": "John-David Dalton"
+ },
+ {
+ "name": "Jordan Klassen"
+ },
+ {
+ "name": "Jürg Lehni"
+ },
+ {
+ "name": "Kai Cataldo"
+ },
+ {
+ "name": "keeyipchan"
+ },
+ {
+ "name": "Keheliya Gallaba"
+ },
+ {
+ "name": "Kevin Irish"
+ },
+ {
+ "name": "Kevin Kwok"
+ },
+ {
+ "name": "krator"
+ },
+ {
+ "name": "Marek"
+ },
+ {
+ "name": "Marijn Haverbeke"
+ },
+ {
+ "name": "Martin Carlberg"
+ },
+ {
+ "name": "Mat Garcia"
+ },
+ {
+ "name": "Mathias Bynens"
+ },
+ {
+ "name": "Mathieu 'p01' Henri"
+ },
+ {
+ "name": "Matthew Bastien"
+ },
+ {
+ "name": "Max Schaefer"
+ },
+ {
+ "name": "Max Zerzouri"
+ },
+ {
+ "name": "Mihai Bazon"
+ },
+ {
+ "name": "Mike Rennie"
+ },
+ {
+ "name": "naoh"
+ },
+ {
+ "name": "Nicholas C. Zakas"
+ },
+ {
+ "name": "Nick Fitzgerald"
+ },
+ {
+ "name": "Olivier Thomann"
+ },
+ {
+ "name": "Oskar Schöldström"
+ },
+ {
+ "name": "Paul Harper"
+ },
+ {
+ "name": "Peter Rust"
+ },
+ {
+ "name": "PlNG"
+ },
+ {
+ "name": "Prayag Verma"
+ },
+ {
+ "name": "ReadmeCritic"
+ },
+ {
+ "name": "r-e-d"
+ },
+ {
+ "name": "Richard Gibson"
+ },
+ {
+ "name": "Rich Harris"
+ },
+ {
+ "name": "Sebastian McKenzie"
+ },
+ {
+ "name": "Shahar Soel"
+ },
+ {
+ "name": "Simen Bekkhus"
+ },
+ {
+ "name": "Teddy Katz"
+ },
+ {
+ "name": "Timothy Gu"
+ },
+ {
+ "name": "Toru Nagashima"
+ },
+ {
+ "name": "Victor Homyakov"
+ },
+ {
+ "name": "Wexpo Lyu"
+ },
+ {
+ "name": "zsjforcn"
+ }
+ ],
+ "deprecated": false,
+ "description": "ECMAScript parser",
+ "devDependencies": {
+ "eslint": "^3.18.0",
+ "eslint-config-standard": "^7.1.0",
+ "eslint-plugin-import": "^2.2.0",
+ "eslint-plugin-promise": "^3.5.0",
+ "eslint-plugin-standard": "^2.1.1",
+ "rollup": "^0.43.0",
+ "rollup-plugin-buble": "^0.15.0",
+ "unicode-9.0.0": "^0.7.0"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ },
+ "homepage": "https://github.com/ternjs/acorn",
+ "license": "MIT",
+ "main": "dist/acorn.js",
+ "maintainers": [
+ {
+ "name": "Marijn Haverbeke",
+ "email": "marijnh@gmail.com",
+ "url": "http://marijnhaverbeke.nl"
+ },
+ {
+ "name": "Ingvar Stepanyan",
+ "email": "me@rreverser.com",
+ "url": "http://rreverser.com/"
+ }
+ ],
+ "module": "dist/acorn.es.js",
+ "name": "acorn",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/ternjs/acorn.git"
+ },
+ "scripts": {
+ "build": "npm run build:main && npm run build:walk && npm run build:loose && npm run build:bin",
+ "build:bin": "rollup -c rollup/config.bin.js",
+ "build:loose": "rollup -c rollup/config.loose.js && rollup -c rollup/config.loose_es.js",
+ "build:main": "rollup -c rollup/config.main.js",
+ "build:walk": "rollup -c rollup/config.walk.js",
+ "lint": "eslint src/",
+ "prepare": "npm test",
+ "pretest": "npm run build:main && npm run build:loose",
+ "test": "node test/run.js && node test/lint.js"
+ },
+ "version": "5.2.1"
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv-keywords/LICENSE b/tools/node_modules/eslint/node_modules/ajv-keywords/LICENSE
new file mode 100644
index 0000000000..90139aa74c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv-keywords/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Evgeny Poberezkin
+
+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/tools/node_modules/eslint/node_modules/ajv-keywords/README.md b/tools/node_modules/eslint/node_modules/ajv-keywords/README.md
new file mode 100644
index 0000000000..0eb4971754
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv-keywords/README.md
@@ -0,0 +1,656 @@
+# ajv-keywords
+
+Custom JSON-Schema keywords for [Ajv](https://github.com/epoberezkin/ajv) validator
+
+[![Build Status](https://travis-ci.org/epoberezkin/ajv-keywords.svg?branch=master)](https://travis-ci.org/epoberezkin/ajv-keywords)
+[![npm version](https://badge.fury.io/js/ajv-keywords.svg)](https://www.npmjs.com/package/ajv-keywords)
+[![npm downloads](https://img.shields.io/npm/dm/ajv-keywords.svg)](https://www.npmjs.com/package/ajv-keywords)
+[![Coverage Status](https://coveralls.io/repos/github/epoberezkin/ajv-keywords/badge.svg?branch=master)](https://coveralls.io/github/epoberezkin/ajv-keywords?branch=master)
+[![Greenkeeper badge](https://badges.greenkeeper.io/epoberezkin/ajv-keywords.svg)](https://greenkeeper.io/)
+[![Gitter](https://img.shields.io/gitter/room/ajv-validator/ajv.svg)](https://gitter.im/ajv-validator/ajv)
+
+
+## Contents
+
+- [Install](#install)
+- [Usage](#usage)
+- [Keywords](#keywords)
+ - [typeof](#typeof)
+ - [instanceof](#instanceof)
+ - [range and exclusiveRange](#range-and-exclusiverange)
+ - [if/then/else](#ifthenelse)
+ - [switch](#switch)
+ - [select/selectCases/selectDefault](#selectselectcasesselectdefault) (BETA)
+ - [patternRequired](#patternrequired)
+ - [prohibited](#prohibited)
+ - [deepProperties](#deepproperties)
+ - [deepRequired](#deeprequired)
+ - [uniqueItemProperties](#uniqueitemproperties)
+ - [regexp](#regexp)
+ - [formatMaximum / formatMinimum and formatExclusiveMaximum / formatExclusiveMinimum](#formatmaximum--formatminimum-and-formatexclusivemaximum--formatexclusiveminimum)
+ - [dynamicDefaults](#dynamicdefaults)
+- [License](#license)
+
+
+## Install
+
+```
+npm install ajv-keywords
+```
+
+
+## Usage
+
+To add all available keywords:
+
+```javascript
+var Ajv = require('ajv');
+var ajv = new Ajv;
+require('ajv-keywords')(ajv);
+
+ajv.validate({ instanceof: 'RegExp' }, /.*/); // true
+ajv.validate({ instanceof: 'RegExp' }, '.*'); // false
+```
+
+To add a single keyword:
+
+```javascript
+require('ajv-keywords')(ajv, 'instanceof');
+```
+
+To add multiple keywords:
+
+```javascript
+require('ajv-keywords')(ajv, ['typeof', 'instanceof']);
+```
+
+To add a single keyword in browser (to avoid adding unused code):
+
+```javascript
+require('ajv-keywords/keywords/instanceof')(ajv);
+```
+
+
+## Keywords
+
+### `typeof`
+
+Based on JavaScript `typeof` operation.
+
+The value of the keyword should be a string (`"undefined"`, `"string"`, `"number"`, `"object"`, `"function"`, `"boolean"` or `"symbol"`) or array of strings.
+
+To pass validation the result of `typeof` operation on the value should be equal to the string (or one of the strings in the array).
+
+```
+ajv.validate({ typeof: 'undefined' }, undefined); // true
+ajv.validate({ typeof: 'undefined' }, null); // false
+ajv.validate({ typeof: ['undefined', 'object'] }, null); // true
+```
+
+
+### `instanceof`
+
+Based on JavaScript `instanceof` operation.
+
+The value of the keyword should be a string (`"Object"`, `"Array"`, `"Function"`, `"Number"`, `"String"`, `"Date"`, `"RegExp"` or `"Buffer"`) or array of strings.
+
+To pass validation the result of `data instanceof ...` operation on the value should be true:
+
+```
+ajv.validate({ instanceof: 'Array' }, []); // true
+ajv.validate({ instanceof: 'Array' }, {}); // false
+ajv.validate({ instanceof: ['Array', 'Function'] }, function(){}); // true
+```
+
+You can add your own constructor function to be recognised by this keyword:
+
+```javascript
+function MyClass() {}
+var instanceofDefinition = require('ajv-keywords').get('instanceof').definition;
+// or require('ajv-keywords/keywords/instanceof').definition;
+instanceofDefinition.CONSTRUCTORS.MyClass = MyClass;
+
+ajv.validate({ instanceof: 'MyClass' }, new MyClass); // true
+```
+
+
+### `range` and `exclusiveRange`
+
+Syntax sugar for the combination of minimum and maximum keywords, also fails schema compilation if there are no numbers in the range.
+
+The value of this keyword must be the array consisting of two numbers, the second must be greater or equal than the first one.
+
+If the validated value is not a number the validation passes, otherwise to pass validation the value should be greater (or equal) than the first number and smaller (or equal) than the second number in the array. If `exclusiveRange` keyword is present in the same schema and its value is true, the validated value must not be equal to the range boundaries.
+
+```javascript
+var schema = { range: [1, 3] };
+ajv.validate(schema, 1); // true
+ajv.validate(schema, 2); // true
+ajv.validate(schema, 3); // true
+ajv.validate(schema, 0.99); // false
+ajv.validate(schema, 3.01); // false
+
+var schema = { range: [1, 3], exclusiveRange: true };
+ajv.validate(schema, 1.01); // true
+ajv.validate(schema, 2); // true
+ajv.validate(schema, 2.99); // true
+ajv.validate(schema, 1); // false
+ajv.validate(schema, 3); // false
+```
+
+
+### `if`/`then`/`else`
+
+These keywords allow to implement conditional validation. Their values should be valid JSON-schemas.
+
+If the data is valid according to the sub-schema in `if` keyword, then the result is equal to the result of data validation against the sub-schema in `then` keyword, otherwise - in `else` keyword (if `else` is absent, the validation succeeds).
+
+```javascript
+require('ajv-keywords')(ajv, 'if');
+
+var schema = {
+ type: 'array',
+ items: {
+ type: 'integer',
+ minimum: 1,
+ if: { maximum: 10 },
+ then: { multipleOf: 2 },
+ else: { multipleOf: 5 }
+ }
+};
+
+var validItems = [ 2, 4, 6, 8, 10, 15, 20, 25 ]; // etc.
+
+var invalidItems = [ 1, 3, 5, 11, 12 ]; // etc.
+
+ajv.validate(schema, validItems); // true
+ajv.validate(schema, invalidItems); // false
+```
+
+This keyword is [proposed](https://github.com/json-schema-org/json-schema-spec/issues/180) for the future version of JSON-Schema standard.
+
+
+### `switch`
+
+This keyword allows to perform advanced conditional validation.
+
+The value of the keyword is the array of if/then clauses. Each clause is the object with the following properties:
+
+- `if` (optional) - the value is JSON-schema
+- `then` (required) - the value is JSON-schema or boolean
+- `continue` (optional) - the value is boolean
+
+The validation process is dynamic; all clauses are executed sequentially in the following way:
+
+1. `if`:
+ 1. `if` property is JSON-schema according to which the data is:
+ 1. valid => go to step 2.
+ 2. invalid => go to the NEXT clause, if this was the last clause the validation of `switch` SUCCEEDS.
+ 2. `if` property is absent => go to step 2.
+2. `then`:
+ 1. `then` property is `true` or it is JSON-schema according to which the data is valid => go to step 3.
+ 2. `then` property is `false` or it is JSON-schema according to which the data is invalid => the validation of `switch` FAILS.
+3. `continue`:
+ 1. `continue` property is `true` => go to the NEXT clause, if this was the last clause the validation of `switch` SUCCEEDS.
+ 2. `continue` property is `false` or absent => validation of `switch` SUCCEEDS.
+
+```javascript
+require('ajv-keywords')(ajv, 'switch');
+
+var schema = {
+ type: 'array',
+ items: {
+ type: 'integer',
+ 'switch': [
+ { if: { not: { minimum: 1 } }, then: false },
+ { if: { maximum: 10 }, then: true },
+ { if: { maximum: 100 }, then: { multipleOf: 10 } },
+ { if: { maximum: 1000 }, then: { multipleOf: 100 } },
+ { then: false }
+ ]
+ }
+};
+
+var validItems = [1, 5, 10, 20, 50, 100, 200, 500, 1000];
+
+var invalidItems = [1, 0, 2000, 11, 57, 123, 'foo'];
+```
+
+__Please note__: this keyword is moved here from Ajv, mainly to preserve backward compatibility. It is unlikely to become a standard. It's preferable to use `if`/`then`/`else` keywords if possible, as they are likely to be added to the standard. The above schema is equivalent to (for example):
+
+```javascript
+{
+ type: 'array',
+ items: {
+ type: 'integer',
+ if: { minimum: 1, maximum: 10 },
+ then: true,
+ else: {
+ if: { maximum: 100 },
+ then: { multipleOf: 10 },
+ else: {
+ if: { maximum: 1000 },
+ then: { multipleOf: 100 },
+ else: false
+ }
+ }
+ }
+}
+```
+
+
+### `select`/`selectCases`/`selectDefault`
+
+These keywords allow to choose the schema to validate the data based on the value of some property in the validated data.
+
+These keywords must be present in the same schema object (`selectDefault` is optional).
+
+The value of `select` keyword should be a [$data reference](https://github.com/epoberezkin/ajv/tree/5.0.2-beta.0#data-reference) that points to any primitive JSON type (string, number, boolean or null) in the data that is validated. You can also use a constant of primitive type as the value of this keyword (e.g., for debugging purposes).
+
+The value of `selectCases` keyword must be an object where each property name is a possible string representation of the value of `select` keyword and each property value is a corresponding schema (from draft-06 it can be boolean) that must be used to validate the data.
+
+The value of `selectDefault` keyword is a schema (from draft-06 it can be boolean) that must be used to validate the data in case `selectCases` has no key equal to the stringified value of `select` keyword.
+
+The validation succeeds in one of the following cases:
+- the validation of data using selected schema succeeds,
+- none of the schemas is selected for validation,
+- the value of select is undefined (no property in the data that the data reference points to).
+
+If `select` value (in data) is not a primitive type the validation fails.
+
+__Please note__: these keywords require Ajv `$data` option to support [$data reference](https://github.com/epoberezkin/ajv/tree/5.0.2-beta.0#data-reference).
+
+
+```javascript
+require('ajv-keywords')(ajv, 'select');
+
+var schema = {
+ type: object,
+ required: ['kind'],
+ properties: {
+ kind: { type: 'string' }
+ },
+ select: { $data: '0/kind' },
+ selectCases: {
+ foo: {
+ required: ['foo'],
+ properties: {
+ kind: {},
+ foo: { type: 'string' }
+ },
+ additionalProperties: false
+ },
+ bar: {
+ required: ['bar'],
+ properties: {
+ kind: {},
+ bar: { type: 'number' }
+ },
+ additionalProperties: false
+ }
+ },
+ selectDefault: {
+ propertyNames: {
+ not: { enum: ['foo', 'bar'] }
+ }
+ }
+};
+
+var validDataList = [
+ { kind: 'foo', foo: 'any' },
+ { kind: 'bar', bar: 1 },
+ { kind: 'anything_else', not_bar_or_foo: 'any value' }
+];
+
+var invalidDataList = [
+ { kind: 'foo' }, // no propery foo
+ { kind: 'bar' }, // no propery bar
+ { kind: 'foo', foo: 'any', another: 'any value' }, // additional property
+ { kind: 'bar', bar: 1, another: 'any value' }, // additional property
+ { kind: 'anything_else', foo: 'any' } // property foo not allowed
+ { kind: 'anything_else', bar: 1 } // property bar not allowed
+];
+```
+
+__Please note__: the current implementation is BETA. It does not allow using relative URIs in $ref keywords in schemas in `selectCases` and `selectDefault` that point outside of these schemas. The workaround is to use absolute URIs (that can point to any (sub-)schema added to Ajv, including those inside the current root schema where `select` is used). See [tests](https://github.com/epoberezkin/ajv-keywords/blob/v2.0.0/spec/tests/select.json#L314).
+
+
+### `patternRequired`
+
+This keyword allows to require the presence of properties that match some pattern(s).
+
+This keyword applies only to objects. If the data is not an object, the validation succeeds.
+
+The value of this keyword should be an array of strings, each string being a regular expression. For data object to be valid each regular expression in this array should match at least one property name in the data object.
+
+If the array contains multiple regular expressions, more than one expression can match the same property name.
+
+```javascript
+var schema = { patternRequired: [ 'f.*o', 'b.*r' ] };
+
+var validData = { foo: 1, bar: 2 };
+var alsoValidData = { foobar: 3 };
+
+var invalidDataList = [ {}, { foo: 1 }, { bar: 2 } ];
+```
+
+
+### `prohibited`
+
+This keyword allows to prohibit that any of the properties in the list is present in the object.
+
+This keyword applies only to objects. If the data is not an object, the validation succeeds.
+
+The value of this keyword should be an array of strings, each string being a property name. For data object to be valid none of the properties in this array should be present in the object.
+
+```
+var schema = { prohibited: ['foo', 'bar']};
+
+var validData = { baz: 1 };
+var alsoValidData = {};
+
+var invalidDataList = [
+ { foo: 1 },
+ { bar: 2 },
+ { foo: 1, bar: 2}
+];
+```
+
+
+### `deepProperties`
+
+This keyword allows to validate deep properties (identified by JSON pointers).
+
+This keyword applies only to objects. If the data is not an object, the validation succeeds.
+
+The value should be an object, where keys are JSON pointers to the data, starting from the current position in data, and the values are JSON schemas. For data object to be valid the value of each JSON pointer should be valid according to the corresponding schema.
+
+```javascript
+var schema = {
+ type: 'object',
+ deepProperties: {
+ "/users/1/role": { "enum": ["admin"] }
+ }
+};
+
+var validData = {
+ users: [
+ {},
+ {
+ id: 123,
+ role: 'admin'
+ }
+ ]
+};
+
+var alsoValidData = {
+ users: {
+ "1": {
+ id: 123,
+ role: 'admin'
+ }
+ }
+};
+
+var invalidData = {
+ users: [
+ {},
+ {
+ id: 123,
+ role: 'user'
+ }
+ ]
+};
+
+var alsoInvalidData = {
+ users: {
+ "1": {
+ id: 123,
+ role: 'user'
+ }
+ }
+};
+```
+
+
+### `deepRequired`
+
+This keyword allows to check that some deep properties (identified by JSON pointers) are available.
+
+This keyword applies only to objects. If the data is not an object, the validation succeeds.
+
+The value should be an array of JSON pointers to the data, starting from the current position in data. For data object to be valid each JSON pointer should be some existing part of the data.
+
+```javascript
+var schema = {
+ type: 'object',
+ deepRequired: ["/users/1/role"]
+};
+
+var validData = {
+ users: [
+ {},
+ {
+ id: 123,
+ role: 'admin'
+ }
+ ]
+};
+
+var invalidData = {
+ users: [
+ {},
+ {
+ id: 123
+ }
+ ]
+};
+```
+
+See [json-schema-org/json-schema-spec#203](https://github.com/json-schema-org/json-schema-spec/issues/203#issue-197211916) for an example of the equivalent schema without `deepRequired` keyword.
+
+
+### `uniqueItemProperties`
+
+The keyword allows to check that some properties in array items are unique.
+
+This keyword applies only to arrays. If the data is not an array, the validation succeeds.
+
+The value of this keyword must be an array of strings - property names that should have unique values across all items.
+
+```javascript
+var schema = { uniqueItemProperties: [ "id", "name" ] };
+
+var validData = [
+ { id: 1 },
+ { id: 2 },
+ { id: 3 }
+];
+
+var invalidData1 = [
+ { id: 1 },
+ { id: 1 },
+ { id: 3 }
+];
+
+var invalidData2 = [
+ { id: 1, name: "taco" },
+ { id: 2, name: "taco" }, // duplicate "name"
+ { id: 3, name: "salsa" }
+];
+```
+
+This keyword is contributed by [@blainesch](https://github.com/blainesch).
+
+
+### `regexp`
+
+This keyword allows to use regular expressions with flags in schemas (the standard `pattern` keyword does not support flags).
+
+This keyword applies only to strings. If the data is not a string, the validation succeeds.
+
+The value of this keyword can be either a string (the result of `regexp.toString()`) or an object with the properties `pattern` and `flags` (the same strings that should be passed to RegExp constructor).
+
+```javascript
+var schema = {
+ type: 'object',
+ properties: {
+ foo: { regexp: '/foo/i' },
+ bar: { regexp: { pattern: 'bar', flags: 'i' } }
+ }
+};
+
+var validData = {
+ foo: 'Food',
+ bar: 'Barmen'
+};
+
+var invalidData = {
+ foo: 'fog',
+ bar: 'bad'
+};
+```
+
+
+### `formatMaximum` / `formatMinimum` and `formatExclusiveMaximum` / `formatExclusiveMinimum`
+
+These keywords allow to define minimum/maximum constraints when the format keyword defines ordering.
+
+These keywords apply only to strings. If the data is not a string, the validation succeeds.
+
+The value of keyword `formatMaximum` (`formatMinimum`) should be a string. This value is the maximum (minimum) allowed value for the data to be valid as determined by `format` keyword.
+
+When this keyword is added, it defines comparison rules for formats `"date"`, `"time"` and `"date-time". Custom formats also can have comparison rules. See [addFormat](https://github.com/epoberezkin/ajv#api-addformat) method.
+
+The value of keyword `formatExclusiveMaximum` (`formatExclusiveMinimum`) should be a boolean value. These keyword cannot be used without `formatMaximum` (`formatMinimum`). If this keyword value is equal to `true`, the data to be valid should not be equal to the value in `formatMaximum` (`formatMinimum`) keyword.
+
+```javascript
+require('ajv-keywords')(ajv, ['formatMinimum', 'formatMaximum']);
+
+var schema = {
+ format: 'date',
+ formatMinimum: '2016-02-06',
+ formatMaximum: '2016-12-27',
+ formatExclusiveMaximum: true
+}
+
+var validDataList = ['2016-02-06', '2016-12-26', 1];
+
+var invalidDataList = ['2016-02-05', '2016-12-27', 'abc'];
+```
+
+
+### `dynamicDefaults`
+
+This keyword allows to assign dynamic defaults to properties, such as timestamps, unique IDs etc.
+
+This keyword only works if `useDefaults` options is used and not inside `anyOf` keywrods etc., in the same way as [default keyword treated by Ajv](https://github.com/epoberezkin/ajv#assigning-defaults).
+
+The keyword should be added on the object level. Its value should be an object with each property corresponding to a property name, in the same way as in standard `properties` keyword. The value of each property can be:
+
+- an identifier of default function (a string)
+- an object with properties `func` (an identifier) and `args` (an object with parameters that will be passed to this function during schema compilation - see examples).
+
+The properties used in `dynamicDefaults` should not be added to `required` keyword (or validation will fail), because unlike `default` this keyword is processed after validation.
+
+There are several predefined dynamic default functions:
+
+- `"timestamp"` - current timestamp in milliseconds
+- `"datetime"` - current date and time as string (ISO, valid according to `date-time` format)
+- `"date"` - current date as string (ISO, valid according to `date` format)
+- `"time"` - current time as string (ISO, valid according to `time` format)
+- `"random"` - pseudo-random number in [0, 1) interval
+- `"randomint"` - pseudo-random integer number. If string is used as a property value, the function will randomly return 0 or 1. If object `{func: 'randomint', max: N}` is used then the default will be an integer number in [0, N) interval.
+- `"seq"` - sequential integer number starting from 0. If string is used as a property value, the default sequence will be used. If object `{func: 'seq', name: 'foo'}` is used then the sequence with name `"foo"` will be used. Sequences are global, even if different ajv instances are used.
+
+```javascript
+var schema = {
+ type: 'object',
+ dynamicDefaults: {
+ ts: 'datetime',
+ r: { func: 'randomint', max: 100 },
+ id: { func: 'seq', name: 'id' }
+ },
+ properties: {
+ ts: {
+ type: 'string',
+ format: 'datetime'
+ },
+ r: {
+ type: 'integer',
+ minimum: 0,
+ maximum: 100,
+ exclusiveMaximum: true
+ },
+ id: {
+ type: 'integer',
+ minimum: 0
+ }
+ }
+};
+
+var data = {};
+ajv.validate(data); // true
+data; // { ts: '2016-12-01T22:07:28.829Z', r: 25, id: 0 }
+
+var data1 = {};
+ajv.validate(data1); // true
+data1; // { ts: '2016-12-01T22:07:29.832Z', r: 68, id: 1 }
+
+ajv.validate(data1); // true
+data1; // didn't change, as all properties were defined
+```
+
+You can add your own dynamic default function to be recognised by this keyword:
+
+```javascript
+var uuid = require('uuid');
+
+function uuidV4() { return uuid.v4(); }
+
+var definition = require('ajv-keywords').get('dynamicDefaults').definition;
+// or require('ajv-keywords/keywords/dynamicDefaults').definition;
+definition.DEFAULTS.uuid = uuidV4;
+
+var schema = {
+ dynamicDefaults: { id: 'uuid' },
+ properties: { id: { type: 'string', format: 'uuid' } }
+};
+
+var data = {};
+ajv.validate(schema, data); // true
+data; // { id: 'a1183fbe-697b-4030-9bcc-cfeb282a9150' };
+
+var data1 = {};
+ajv.validate(schema, data1); // true
+data1; // { id: '5b008de7-1669-467a-a5c6-70fa244d7209' }
+```
+
+You also can define dynamic default that accepts parameters, e.g. version of uuid:
+
+```javascript
+var uuid = require('uuid');
+
+function getUuid(args) {
+ var version = 'v' + (arvs && args.v || 4);
+ return function() {
+ return uuid[version]();
+ };
+}
+
+var definition = require('ajv-keywords').get('dynamicDefaults').definition;
+definition.DEFAULTS.uuid = getUuid;
+
+var schema = {
+ dynamicDefaults: {
+ id1: 'uuid', // v4
+ id2: { func: 'uuid', v: 4 }, // v4
+ id3: { func: 'uuid', v: 1 } // v1
+ }
+};
+```
+
+
+## License
+
+[MIT](https://github.com/epoberezkin/ajv-keywords/blob/master/LICENSE)
diff --git a/tools/node_modules/eslint/node_modules/ajv-keywords/index.js b/tools/node_modules/eslint/node_modules/ajv-keywords/index.js
new file mode 100644
index 0000000000..07a8edabc1
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv-keywords/index.js
@@ -0,0 +1,35 @@
+'use strict';
+
+var KEYWORDS = require('./keywords');
+
+module.exports = defineKeywords;
+
+
+/**
+ * Defines one or several keywords in ajv instance
+ * @param {Ajv} ajv validator instance
+ * @param {String|Array<String>|undefined} keyword keyword(s) to define
+ * @return {Ajv} ajv instance (for chaining)
+ */
+function defineKeywords(ajv, keyword) {
+ if (Array.isArray(keyword)) {
+ for (var i=0; i<keyword.length; i++)
+ get(keyword[i])(ajv);
+ return ajv;
+ }
+ if (keyword) {
+ get(keyword)(ajv);
+ return ajv;
+ }
+ for (keyword in KEYWORDS) get(keyword)(ajv);
+ return ajv;
+}
+
+
+defineKeywords.get = get;
+
+function get(keyword) {
+ var defFunc = KEYWORDS[keyword];
+ if (!defFunc) throw new Error('Unknown keyword ' + keyword);
+ return defFunc;
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/_formatLimit.js b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/_formatLimit.js
new file mode 100644
index 0000000000..2ae8e007c0
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/_formatLimit.js
@@ -0,0 +1,90 @@
+'use strict';
+
+var TIME = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d:\d\d)?$/i;
+var DATE_TIME_SEPARATOR = /t|\s/i;
+
+var COMPARE_FORMATS = {
+ date: compareDate,
+ time: compareTime,
+ 'date-time': compareDateTime
+};
+
+module.exports = function (minMax) {
+ var keyword = 'format' + minMax;
+ return function defFunc(ajv) {
+ defFunc.definition = {
+ type: 'string',
+ inline: require('./dotjs/_formatLimit'),
+ statements: true,
+ errors: 'full',
+ metaSchema: {
+ anyOf: [
+ { type: 'string' },
+ {
+ type: 'object',
+ required: [ '$data' ],
+ properties: {
+ $data: {
+ type: 'string',
+ anyOf: [
+ { format: 'relative-json-pointer' },
+ { format: 'json-pointer' }
+ ]
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ }
+ };
+
+ ajv.addKeyword(keyword, defFunc.definition);
+ ajv.addKeyword('formatExclusive' + minMax);
+ extendFormats(ajv);
+ return ajv;
+ };
+};
+
+
+function extendFormats(ajv) {
+ var formats = ajv._formats;
+ for (var name in COMPARE_FORMATS) {
+ var format = formats[name];
+ // the last condition is needed if it's RegExp from another window
+ if (typeof format != 'object' || format instanceof RegExp || !format.validate)
+ format = formats[name] = { validate: format };
+ if (!format.compare)
+ format.compare = COMPARE_FORMATS[name];
+ }
+}
+
+
+function compareDate(d1, d2) {
+ if (!(d1 && d2)) return;
+ if (d1 > d2) return 1;
+ if (d1 < d2) return -1;
+ if (d1 === d2) return 0;
+}
+
+
+function compareTime(t1, t2) {
+ if (!(t1 && t2)) return;
+ t1 = t1.match(TIME);
+ t2 = t2.match(TIME);
+ if (!(t1 && t2)) return;
+ t1 = t1[1] + t1[2] + t1[3] + (t1[4]||'');
+ t2 = t2[1] + t2[2] + t2[3] + (t2[4]||'');
+ if (t1 > t2) return 1;
+ if (t1 < t2) return -1;
+ if (t1 === t2) return 0;
+}
+
+
+function compareDateTime(dt1, dt2) {
+ if (!(dt1 && dt2)) return;
+ dt1 = dt1.split(DATE_TIME_SEPARATOR);
+ dt2 = dt2.split(DATE_TIME_SEPARATOR);
+ var res = compareDate(dt1[0], dt2[0]);
+ if (res === undefined) return;
+ return res || compareTime(dt1[1], dt2[1]);
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/_util.js b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/_util.js
new file mode 100644
index 0000000000..eebd07aad9
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/_util.js
@@ -0,0 +1,15 @@
+'use strict';
+
+module.exports = {
+ metaSchemaRef: metaSchemaRef
+};
+
+var META_SCHEMA_ID = 'http://json-schema.org/draft-06/schema';
+
+function metaSchemaRef(ajv) {
+ var defaultMeta = ajv._opts.defaultMeta;
+ if (typeof defaultMeta == 'string') return { $ref: defaultMeta };
+ if (ajv.getSchema(META_SCHEMA_ID)) return { $ref: META_SCHEMA_ID };
+ console.warn('meta schema not defined');
+ return {};
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/deepProperties.js b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/deepProperties.js
new file mode 100644
index 0000000000..3dac5fb55f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/deepProperties.js
@@ -0,0 +1,54 @@
+'use strict';
+
+var util = require('./_util');
+
+module.exports = function defFunc(ajv) {
+ defFunc.definition = {
+ type: 'object',
+ macro: function (schema) {
+ var schemas = [];
+ for (var pointer in schema)
+ schemas.push(getSchema(pointer, schema[pointer]));
+ return { 'allOf': schemas };
+ },
+ metaSchema: {
+ type: 'object',
+ propertyNames: {
+ type: 'string',
+ format: 'json-pointer'
+ },
+ additionalProperties: util.metaSchemaRef(ajv)
+ }
+ };
+
+ ajv.addKeyword('deepProperties', defFunc.definition);
+ return ajv;
+};
+
+
+function getSchema(jsonPointer, schema) {
+ var segments = jsonPointer.split('/');
+ var rootSchema = {};
+ var pointerSchema = rootSchema;
+ for (var i=1; i<segments.length; i++) {
+ var segment = segments[i];
+ var isLast = i == segments.length - 1;
+ segment = unescapeJsonPointer(segment);
+ var properties = pointerSchema.properties = {};
+ var items = undefined;
+ if (/[0-9]+/.test(segment)) {
+ var count = +segment;
+ items = pointerSchema.items = [];
+ while (count--) items.push({});
+ }
+ pointerSchema = isLast ? schema : {};
+ properties[segment] = pointerSchema;
+ if (items) items.push(pointerSchema);
+ }
+ return rootSchema;
+}
+
+
+function unescapeJsonPointer(str) {
+ return str.replace(/~1/g, '/').replace(/~0/g, '~');
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/deepRequired.js b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/deepRequired.js
new file mode 100644
index 0000000000..29e8ab5600
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/deepRequired.js
@@ -0,0 +1,57 @@
+'use strict';
+
+module.exports = function defFunc(ajv) {
+ defFunc.definition = {
+ type: 'object',
+ inline: function (it, keyword, schema) {
+ var expr = '';
+ for (var i=0; i<schema.length; i++) {
+ if (i) expr += ' && ';
+ expr += '(' + getData(schema[i], it.dataLevel) + ' !== undefined)';
+ }
+ return expr;
+ },
+ metaSchema: {
+ type: 'array',
+ items: {
+ type: 'string',
+ format: 'json-pointer'
+ }
+ }
+ };
+
+ ajv.addKeyword('deepRequired', defFunc.definition);
+ return ajv;
+};
+
+
+function getData(jsonPointer, lvl) {
+ var data = 'data' + (lvl || '');
+ if (!jsonPointer) return data;
+
+ var expr = data;
+ var segments = jsonPointer.split('/');
+ for (var i=1; i<segments.length; i++) {
+ var segment = segments[i];
+ data += getProperty(unescapeJsonPointer(segment));
+ expr += ' && ' + data;
+ }
+ return expr;
+}
+
+
+var IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
+var INTEGER = /^[0-9]+$/;
+var SINGLE_QUOTE = /'|\\/g;
+function getProperty(key) {
+ return INTEGER.test(key)
+ ? '[' + key + ']'
+ : IDENTIFIER.test(key)
+ ? '.' + key
+ : "['" + key.replace(SINGLE_QUOTE, '\\$&') + "']";
+}
+
+
+function unescapeJsonPointer(str) {
+ return str.replace(/~1/g, '/').replace(/~0/g, '~');
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/dot/_formatLimit.jst b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/dot/_formatLimit.jst
new file mode 100644
index 0000000000..f740965510
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/dot/_formatLimit.jst
@@ -0,0 +1,116 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+
+var {{=$valid}} = undefined;
+
+{{## def.skipFormatLimit:
+ {{=$valid}} = true;
+ {{ return out; }}
+#}}
+
+{{## def.compareFormat:
+ {{? $isData }}
+ if ({{=$schemaValue}} === undefined) {{=$valid}} = true;
+ else if (typeof {{=$schemaValue}} != 'string') {{=$valid}} = false;
+ else {
+ {{ $closingBraces += '}'; }}
+ {{?}}
+
+ {{? $isDataFormat }}
+ if (!{{=$compare}}) {{=$valid}} = true;
+ else {
+ {{ $closingBraces += '}'; }}
+ {{?}}
+
+ var {{=$result}} = {{=$compare}}({{=$data}}, {{# def.schemaValueQS }});
+
+ if ({{=$result}} === undefined) {{=$valid}} = false;
+#}}
+
+
+{{? it.opts.format === false }}{{# def.skipFormatLimit }}{{?}}
+
+{{
+ var $schemaFormat = it.schema.format
+ , $isDataFormat = it.opts.$data && $schemaFormat.$data
+ , $closingBraces = '';
+}}
+
+{{? $isDataFormat }}
+ {{
+ var $schemaValueFormat = it.util.getData($schemaFormat.$data, $dataLvl, it.dataPathArr)
+ , $format = 'format' + $lvl
+ , $compare = 'compare' + $lvl;
+ }}
+
+ var {{=$format}} = formats[{{=$schemaValueFormat}}]
+ , {{=$compare}} = {{=$format}} && {{=$format}}.compare;
+{{??}}
+ {{ var $format = it.formats[$schemaFormat]; }}
+ {{? !($format && $format.compare) }}
+ {{# def.skipFormatLimit }}
+ {{?}}
+ {{ var $compare = 'formats' + it.util.getProperty($schemaFormat) + '.compare'; }}
+{{?}}
+
+{{
+ var $isMax = $keyword == 'formatMaximum'
+ , $exclusiveKeyword = 'formatExclusive' + ($isMax ? 'Maximum' : 'Minimum')
+ , $schemaExcl = it.schema[$exclusiveKeyword]
+ , $isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data
+ , $op = $isMax ? '<' : '>'
+ , $result = 'result' + $lvl;
+}}
+
+{{# def.$data }}
+
+
+{{? $isDataExcl }}
+ {{
+ var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr)
+ , $exclusive = 'exclusive' + $lvl
+ , $opExpr = 'op' + $lvl
+ , $opStr = '\' + ' + $opExpr + ' + \'';
+ }}
+ var schemaExcl{{=$lvl}} = {{=$schemaValueExcl}};
+ {{ $schemaValueExcl = 'schemaExcl' + $lvl; }}
+
+ if (typeof {{=$schemaValueExcl}} != 'boolean' && {{=$schemaValueExcl}} !== undefined) {
+ {{=$valid}} = false;
+ {{ var $errorKeyword = $exclusiveKeyword; }}
+ {{# def.error:'_formatExclusiveLimit' }}
+ }
+
+ {{# def.elseIfValid }}
+
+ {{# def.compareFormat }}
+ var {{=$exclusive}} = {{=$schemaValueExcl}} === true;
+
+ if ({{=$valid}} === undefined) {
+ {{=$valid}} = {{=$exclusive}}
+ ? {{=$result}} {{=$op}} 0
+ : {{=$result}} {{=$op}}= 0;
+ }
+
+ if (!{{=$valid}}) var op{{=$lvl}} = {{=$exclusive}} ? '{{=$op}}' : '{{=$op}}=';
+{{??}}
+ {{
+ var $exclusive = $schemaExcl === true
+ , $opStr = $op; /*used in error*/
+ if (!$exclusive) $opStr += '=';
+ var $opExpr = '\'' + $opStr + '\''; /*used in error*/
+ }}
+
+ {{# def.compareFormat }}
+
+ if ({{=$valid}} === undefined)
+ {{=$valid}} = {{=$result}} {{=$op}}{{?!$exclusive}}={{?}} 0;
+{{?}}
+
+{{= $closingBraces }}
+
+if (!{{=$valid}}) {
+ {{ var $errorKeyword = $keyword; }}
+ {{# def.error:'_formatLimit' }}
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/dot/patternRequired.jst b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/dot/patternRequired.jst
new file mode 100644
index 0000000000..6f82f6265e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/dot/patternRequired.jst
@@ -0,0 +1,33 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+
+{{
+ var $key = 'key' + $lvl
+ , $idx = 'idx' + $lvl
+ , $matched = 'patternMatched' + $lvl
+ , $dataProperties = 'dataProperties' + $lvl
+ , $closingBraces = ''
+ , $ownProperties = it.opts.ownProperties;
+}}
+
+var {{=$valid}} = true;
+{{? $ownProperties }}
+ var {{=$dataProperties}} = undefined;
+{{?}}
+
+{{~ $schema:$pProperty }}
+ var {{=$matched}} = false;
+ {{# def.iterateProperties }}
+ {{=$matched}} = {{= it.usePattern($pProperty) }}.test({{=$key}});
+ if ({{=$matched}}) break;
+ }
+
+ {{ var $missingPattern = it.util.escapeQuotes($pProperty); }}
+ if (!{{=$matched}}) {
+ {{=$valid}} = false;
+ {{# def.addError:'patternRequired' }}
+ } {{# def.elseIfValid }}
+{{~}}
+
+{{= $closingBraces }}
diff --git a/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/dot/switch.jst b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/dot/switch.jst
new file mode 100644
index 0000000000..389678e345
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/dot/switch.jst
@@ -0,0 +1,73 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+
+{{## def.validateIf:
+ {{# def.setCompositeRule }}
+ {{ $it.createErrors = false; }}
+ {{# def._validateSwitchRule:if }}
+ {{ $it.createErrors = true; }}
+ {{# def.resetCompositeRule }}
+ {{=$ifPassed}} = {{=$nextValid}};
+#}}
+
+{{## def.validateThen:
+ {{? typeof $sch.then == 'boolean' }}
+ {{? $sch.then === false }}
+ {{# def.error:'switch' }}
+ {{?}}
+ var {{=$nextValid}} = {{= $sch.then }};
+ {{??}}
+ {{# def._validateSwitchRule:then }}
+ {{?}}
+#}}
+
+{{## def._validateSwitchRule:_clause:
+ {{
+ $it.schema = $sch._clause;
+ $it.schemaPath = $schemaPath + '[' + $caseIndex + ']._clause';
+ $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/_clause';
+ }}
+ {{# def.insertSubschemaCode }}
+#}}
+
+{{## def.switchCase:
+ {{? $sch.if && {{# def.nonEmptySchema:$sch.if }} }}
+ var {{=$errs}} = errors;
+ {{# def.validateIf }}
+ if ({{=$ifPassed}}) {
+ {{# def.validateThen }}
+ } else {
+ {{# def.resetErrors }}
+ }
+ {{??}}
+ {{=$ifPassed}} = true;
+ {{# def.validateThen }}
+ {{?}}
+#}}
+
+
+{{
+ var $ifPassed = 'ifPassed' + it.level
+ , $currentBaseId = $it.baseId
+ , $shouldContinue;
+}}
+var {{=$ifPassed}};
+
+{{~ $schema:$sch:$caseIndex }}
+ {{? $caseIndex && !$shouldContinue }}
+ if (!{{=$ifPassed}}) {
+ {{ $closingBraces+= '}'; }}
+ {{?}}
+
+ {{# def.switchCase }}
+ {{ $shouldContinue = $sch.continue }}
+{{~}}
+
+{{= $closingBraces }}
+
+var {{=$valid}} = {{=$nextValid}};
+
+{{# def.cleanUp }}
diff --git a/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/dotjs/README.md b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/dotjs/README.md
new file mode 100644
index 0000000000..e2846c86bf
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/dotjs/README.md
@@ -0,0 +1,3 @@
+These files are compiled dot templates from dot folder.
+
+Do NOT edit them directly, edit the templates and run `npm run build` from main ajv-keywords folder.
diff --git a/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/dotjs/_formatLimit.js b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/dotjs/_formatLimit.js
new file mode 100644
index 0000000000..fc56e20648
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/dotjs/_formatLimit.js
@@ -0,0 +1,176 @@
+'use strict';
+module.exports = function generate__formatLimit(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ out += 'var ' + ($valid) + ' = undefined;';
+ if (it.opts.format === false) {
+ out += ' ' + ($valid) + ' = true; ';
+ return out;
+ }
+ var $schemaFormat = it.schema.format,
+ $isDataFormat = it.opts.$data && $schemaFormat.$data,
+ $closingBraces = '';
+ if ($isDataFormat) {
+ var $schemaValueFormat = it.util.getData($schemaFormat.$data, $dataLvl, it.dataPathArr),
+ $format = 'format' + $lvl,
+ $compare = 'compare' + $lvl;
+ out += ' var ' + ($format) + ' = formats[' + ($schemaValueFormat) + '] , ' + ($compare) + ' = ' + ($format) + ' && ' + ($format) + '.compare;';
+ } else {
+ var $format = it.formats[$schemaFormat];
+ if (!($format && $format.compare)) {
+ out += ' ' + ($valid) + ' = true; ';
+ return out;
+ }
+ var $compare = 'formats' + it.util.getProperty($schemaFormat) + '.compare';
+ }
+ var $isMax = $keyword == 'formatMaximum',
+ $exclusiveKeyword = 'formatExclusive' + ($isMax ? 'Maximum' : 'Minimum'),
+ $schemaExcl = it.schema[$exclusiveKeyword],
+ $isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data,
+ $op = $isMax ? '<' : '>',
+ $result = 'result' + $lvl;
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ if ($isDataExcl) {
+ var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr),
+ $exclusive = 'exclusive' + $lvl,
+ $opExpr = 'op' + $lvl,
+ $opStr = '\' + ' + $opExpr + ' + \'';
+ out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; ';
+ $schemaValueExcl = 'schemaExcl' + $lvl;
+ out += ' if (typeof ' + ($schemaValueExcl) + ' != \'boolean\' && ' + ($schemaValueExcl) + ' !== undefined) { ' + ($valid) + ' = false; ';
+ var $errorKeyword = $exclusiveKeyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '_formatExclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ $closingBraces += '}';
+ out += ' else { ';
+ }
+ if ($isData) {
+ out += ' if (' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'string\') ' + ($valid) + ' = false; else { ';
+ $closingBraces += '}';
+ }
+ if ($isDataFormat) {
+ out += ' if (!' + ($compare) + ') ' + ($valid) + ' = true; else { ';
+ $closingBraces += '}';
+ }
+ out += ' var ' + ($result) + ' = ' + ($compare) + '(' + ($data) + ', ';
+ if ($isData) {
+ out += '' + ($schemaValue);
+ } else {
+ out += '' + (it.util.toQuotedString($schema));
+ }
+ out += ' ); if (' + ($result) + ' === undefined) ' + ($valid) + ' = false; var ' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true; if (' + ($valid) + ' === undefined) { ' + ($valid) + ' = ' + ($exclusive) + ' ? ' + ($result) + ' ' + ($op) + ' 0 : ' + ($result) + ' ' + ($op) + '= 0; } if (!' + ($valid) + ') var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\';';
+ } else {
+ var $exclusive = $schemaExcl === true,
+ $opStr = $op;
+ if (!$exclusive) $opStr += '=';
+ var $opExpr = '\'' + $opStr + '\'';
+ if ($isData) {
+ out += ' if (' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'string\') ' + ($valid) + ' = false; else { ';
+ $closingBraces += '}';
+ }
+ if ($isDataFormat) {
+ out += ' if (!' + ($compare) + ') ' + ($valid) + ' = true; else { ';
+ $closingBraces += '}';
+ }
+ out += ' var ' + ($result) + ' = ' + ($compare) + '(' + ($data) + ', ';
+ if ($isData) {
+ out += '' + ($schemaValue);
+ } else {
+ out += '' + (it.util.toQuotedString($schema));
+ }
+ out += ' ); if (' + ($result) + ' === undefined) ' + ($valid) + ' = false; if (' + ($valid) + ' === undefined) ' + ($valid) + ' = ' + ($result) + ' ' + ($op);
+ if (!$exclusive) {
+ out += '=';
+ }
+ out += ' 0;';
+ }
+ out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { ';
+ var $errorKeyword = $keyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '_formatLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ';
+ if ($isData) {
+ out += '' + ($schemaValue);
+ } else {
+ out += '' + (it.util.toQuotedString($schema));
+ }
+ out += ' , exclusive: ' + ($exclusive) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be ' + ($opStr) + ' "';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue) + ' + \'';
+ } else {
+ out += '' + (it.util.escapeQuotes($schema));
+ }
+ out += '"\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + (it.util.toQuotedString($schema));
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += '}';
+ return out;
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/dotjs/patternRequired.js b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/dotjs/patternRequired.js
new file mode 100644
index 0000000000..31bd0b683a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/dotjs/patternRequired.js
@@ -0,0 +1,58 @@
+'use strict';
+module.exports = function generate_patternRequired(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $key = 'key' + $lvl,
+ $idx = 'idx' + $lvl,
+ $matched = 'patternMatched' + $lvl,
+ $dataProperties = 'dataProperties' + $lvl,
+ $closingBraces = '',
+ $ownProperties = it.opts.ownProperties;
+ out += 'var ' + ($valid) + ' = true;';
+ if ($ownProperties) {
+ out += ' var ' + ($dataProperties) + ' = undefined;';
+ }
+ var arr1 = $schema;
+ if (arr1) {
+ var $pProperty, i1 = -1,
+ l1 = arr1.length - 1;
+ while (i1 < l1) {
+ $pProperty = arr1[i1 += 1];
+ out += ' var ' + ($matched) + ' = false; ';
+ if ($ownProperties) {
+ out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';
+ } else {
+ out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
+ }
+ out += ' ' + ($matched) + ' = ' + (it.usePattern($pProperty)) + '.test(' + ($key) + '); if (' + ($matched) + ') break; } ';
+ var $missingPattern = it.util.escapeQuotes($pProperty);
+ out += ' if (!' + ($matched) + ') { ' + ($valid) + ' = false; var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('patternRequired') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingPattern: \'' + ($missingPattern) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should have property matching pattern \\\'' + ($missingPattern) + '\\\'\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ';
+ if ($breakOnError) {
+ $closingBraces += '}';
+ out += ' else { ';
+ }
+ }
+ }
+ out += '' + ($closingBraces);
+ return out;
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/dotjs/switch.js b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/dotjs/switch.js
new file mode 100644
index 0000000000..d6de28bf94
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/dotjs/switch.js
@@ -0,0 +1,128 @@
+'use strict';
+module.exports = function generate_switch(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ var $ifPassed = 'ifPassed' + it.level,
+ $currentBaseId = $it.baseId,
+ $shouldContinue;
+ out += 'var ' + ($ifPassed) + ';';
+ var arr1 = $schema;
+ if (arr1) {
+ var $sch, $caseIndex = -1,
+ l1 = arr1.length - 1;
+ while ($caseIndex < l1) {
+ $sch = arr1[$caseIndex += 1];
+ if ($caseIndex && !$shouldContinue) {
+ out += ' if (!' + ($ifPassed) + ') { ';
+ $closingBraces += '}';
+ }
+ if ($sch.if && it.util.schemaHasRules($sch.if, it.RULES.all)) {
+ out += ' var ' + ($errs) + ' = errors; ';
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ $it.createErrors = false;
+ $it.schema = $sch.if;
+ $it.schemaPath = $schemaPath + '[' + $caseIndex + '].if';
+ $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/if';
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ $it.createErrors = true;
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += ' ' + ($ifPassed) + ' = ' + ($nextValid) + '; if (' + ($ifPassed) + ') { ';
+ if (typeof $sch.then == 'boolean') {
+ if ($sch.then === false) {
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('switch') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { caseIndex: ' + ($caseIndex) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should pass "switch" keyword validation\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ }
+ out += ' var ' + ($nextValid) + ' = ' + ($sch.then) + '; ';
+ } else {
+ $it.schema = $sch.then;
+ $it.schemaPath = $schemaPath + '[' + $caseIndex + '].then';
+ $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/then';
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ }
+ out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } } ';
+ } else {
+ out += ' ' + ($ifPassed) + ' = true; ';
+ if (typeof $sch.then == 'boolean') {
+ if ($sch.then === false) {
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('switch') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { caseIndex: ' + ($caseIndex) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should pass "switch" keyword validation\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ }
+ out += ' var ' + ($nextValid) + ' = ' + ($sch.then) + '; ';
+ } else {
+ $it.schema = $sch.then;
+ $it.schemaPath = $schemaPath + '[' + $caseIndex + '].then';
+ $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/then';
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ }
+ }
+ $shouldContinue = $sch.continue
+ }
+ }
+ out += '' + ($closingBraces) + 'var ' + ($valid) + ' = ' + ($nextValid) + '; ';
+ out = it.util.cleanUpCode(out);
+ return out;
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/dynamicDefaults.js b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/dynamicDefaults.js
new file mode 100644
index 0000000000..e6766d1211
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/dynamicDefaults.js
@@ -0,0 +1,68 @@
+'use strict';
+
+var sequences = {};
+
+var DEFAULTS = {
+ timestamp: function() { return Date.now(); },
+ datetime: function() { return (new Date).toISOString(); },
+ date: function() { return (new Date).toISOString().slice(0, 10); },
+ time: function() { return (new Date).toISOString().slice(11); },
+ random: function() { return Math.random(); },
+ randomint: function (args) {
+ var limit = args && args.max || 2;
+ return function() { return Math.floor(Math.random() * limit); };
+ },
+ seq: function (args) {
+ var name = args && args.name || '';
+ sequences[name] = sequences[name] || 0;
+ return function() { return sequences[name]++; };
+ }
+};
+
+module.exports = function defFunc(ajv) {
+ defFunc.definition = {
+ compile: function (schema, parentSchema, it) {
+ var funcs = {};
+
+ for (var key in schema) {
+ var d = schema[key];
+ var func = getDefault(typeof d == 'string' ? d : d.func);
+ funcs[key] = func.length ? func(d.args) : func;
+ }
+
+ return it.opts.useDefaults && !it.compositeRule
+ ? assignDefaults
+ : noop;
+
+ function assignDefaults(data) {
+ for (var prop in schema)
+ if (data[prop] === undefined) data[prop] = funcs[prop]();
+ return true;
+ }
+
+ function noop() { return true; }
+ },
+ DEFAULTS: DEFAULTS,
+ metaSchema: {
+ type: 'object',
+ additionalProperties: {
+ type: ['string', 'object'],
+ additionalProperties: false,
+ required: ['func', 'args'],
+ properties: {
+ func: { type: 'string' },
+ args: { type: 'object' }
+ }
+ }
+ }
+ };
+
+ ajv.addKeyword('dynamicDefaults', defFunc.definition);
+ return ajv;
+
+ function getDefault(d) {
+ var def = DEFAULTS[d];
+ if (def) return def;
+ throw new Error('invalid "dynamicDefaults" keyword property value: ' + d);
+ }
+};
diff --git a/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/formatMaximum.js b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/formatMaximum.js
new file mode 100644
index 0000000000..e7daabf85b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/formatMaximum.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./_formatLimit')('Maximum');
diff --git a/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/formatMinimum.js b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/formatMinimum.js
new file mode 100644
index 0000000000..eddd6e404b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/formatMinimum.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./_formatLimit')('Minimum');
diff --git a/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/if.js b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/if.js
new file mode 100644
index 0000000000..8a8fc95eeb
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/if.js
@@ -0,0 +1,21 @@
+'use strict';
+
+module.exports = function defFunc(ajv) {
+ if (!ajv.RULES.keywords.switch) require('./switch')(ajv);
+
+ defFunc.definition = {
+ macro: function (schema, parentSchema) {
+ if (parentSchema.then === undefined)
+ throw new Error('keyword "then" is absent');
+ var cases = [ { 'if': schema, 'then': parentSchema.then } ];
+ if (parentSchema.else !== undefined)
+ cases[1] = { 'then': parentSchema.else };
+ return { switch: cases };
+ }
+ };
+
+ ajv.addKeyword('if', defFunc.definition);
+ ajv.addKeyword('then');
+ ajv.addKeyword('else');
+ return ajv;
+};
diff --git a/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/index.js b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/index.js
new file mode 100644
index 0000000000..06b68b776b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/index.js
@@ -0,0 +1,19 @@
+'use strict';
+
+module.exports = {
+ 'instanceof': require('./instanceof'),
+ range: require('./range'),
+ regexp: require('./regexp'),
+ 'typeof': require('./typeof'),
+ dynamicDefaults: require('./dynamicDefaults'),
+ 'if': require('./if'),
+ prohibited: require('./prohibited'),
+ uniqueItemProperties: require('./uniqueItemProperties'),
+ deepProperties: require('./deepProperties'),
+ deepRequired: require('./deepRequired'),
+ formatMinimum: require('./formatMinimum'),
+ formatMaximum: require('./formatMaximum'),
+ patternRequired: require('./patternRequired'),
+ 'switch': require('./switch'),
+ select: require('./select')
+};
diff --git a/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/instanceof.js b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/instanceof.js
new file mode 100644
index 0000000000..d02906032e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/instanceof.js
@@ -0,0 +1,54 @@
+'use strict';
+
+var CONSTRUCTORS = {
+ Object: Object,
+ Array: Array,
+ Function: Function,
+ Number: Number,
+ String: String,
+ Date: Date,
+ RegExp: RegExp
+};
+
+module.exports = function defFunc(ajv) {
+ /* istanbul ignore else */
+ if (typeof Buffer != 'undefined')
+ CONSTRUCTORS.Buffer = Buffer;
+
+ defFunc.definition = {
+ compile: function (schema) {
+ if (typeof schema == 'string') {
+ var Constructor = getConstructor(schema);
+ return function (data) {
+ return data instanceof Constructor;
+ };
+ }
+
+ var constructors = schema.map(getConstructor);
+ return function (data) {
+ for (var i=0; i<constructors.length; i++)
+ if (data instanceof constructors[i]) return true;
+ return false;
+ };
+ },
+ CONSTRUCTORS: CONSTRUCTORS,
+ metaSchema: {
+ anyOf: [
+ { type: 'string' },
+ {
+ type: 'array',
+ items: { type: 'string' }
+ }
+ ]
+ }
+ };
+
+ ajv.addKeyword('instanceof', defFunc.definition);
+ return ajv;
+
+ function getConstructor(c) {
+ var Constructor = CONSTRUCTORS[c];
+ if (Constructor) return Constructor;
+ throw new Error('invalid "instanceof" keyword value ' + c);
+ }
+};
diff --git a/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/patternRequired.js b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/patternRequired.js
new file mode 100644
index 0000000000..046f313fd2
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/patternRequired.js
@@ -0,0 +1,21 @@
+'use strict';
+
+module.exports = function defFunc(ajv) {
+ defFunc.definition = {
+ type: 'object',
+ inline: require('./dotjs/patternRequired'),
+ statements: true,
+ errors: 'full',
+ metaSchema: {
+ type: 'array',
+ items: {
+ type: 'string',
+ format: 'regex'
+ },
+ uniqueItems: true
+ }
+ };
+
+ ajv.addKeyword('patternRequired', defFunc.definition);
+ return ajv;
+};
diff --git a/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/prohibited.js b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/prohibited.js
new file mode 100644
index 0000000000..57172af15f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/prohibited.js
@@ -0,0 +1,25 @@
+'use strict';
+
+module.exports = function defFunc(ajv) {
+ defFunc.definition = {
+ type: 'object',
+ macro: function (schema) {
+ if (schema.length == 0) return {};
+ if (schema.length == 1) return { not: { required: schema } };
+ var schemas = schema.map(function (prop) {
+ return { required: [prop] };
+ });
+ return { not: { anyOf: schemas } };
+ },
+ metaSchema: {
+ type: 'array',
+ items: {
+ type: 'string'
+ }
+ }
+ };
+
+ ajv.addKeyword('prohibited', defFunc.definition);
+ return ajv;
+};
+
diff --git a/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/range.js b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/range.js
new file mode 100644
index 0000000000..9c1fd3ffdd
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/range.js
@@ -0,0 +1,36 @@
+'use strict';
+
+module.exports = function defFunc(ajv) {
+ defFunc.definition = {
+ type: 'number',
+ macro: function (schema, parentSchema) {
+ var min = schema[0]
+ , max = schema[1]
+ , exclusive = parentSchema.exclusiveRange;
+
+ validateRangeSchema(min, max, exclusive);
+
+ return exclusive === true
+ ? {exclusiveMinimum: min, exclusiveMaximum: max}
+ : {minimum: min, maximum: max};
+ },
+ metaSchema: {
+ type: 'array',
+ minItems: 2,
+ maxItems: 2,
+ items: { type: 'number' }
+ }
+ };
+
+ ajv.addKeyword('range', defFunc.definition);
+ ajv.addKeyword('exclusiveRange');
+ return ajv;
+
+ function validateRangeSchema(min, max, exclusive) {
+ if (exclusive !== undefined && typeof exclusive != 'boolean')
+ throw new Error('Invalid schema for exclusiveRange keyword, should be boolean');
+
+ if (min > max || (exclusive && min == max))
+ throw new Error('There are no numbers in range');
+ }
+};
diff --git a/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/regexp.js b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/regexp.js
new file mode 100644
index 0000000000..84efbd666a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/regexp.js
@@ -0,0 +1,36 @@
+'use strict';
+
+module.exports = function defFunc(ajv) {
+ defFunc.definition = {
+ type: 'string',
+ inline: function (it, keyword, schema) {
+ return getRegExp() + '.test(data' + (it.dataLevel || '') + ')';
+
+ function getRegExp() {
+ try {
+ if (typeof schema == 'object')
+ return new RegExp(schema.pattern, schema.flags);
+
+ var rx = schema.match(/^\/(.*)\/([gimy]*)$/);
+ if (rx) return new RegExp(rx[1], rx[2]);
+ throw new Error('cannot parse string into RegExp');
+ } catch(e) {
+ console.error('regular expression', schema, 'is invalid');
+ throw e;
+ }
+ }
+ },
+ metaSchema: {
+ type: ['string', 'object'],
+ properties: {
+ pattern: { type: 'string' },
+ flags: { type: 'string' }
+ },
+ required: ['pattern'],
+ additionalProperties: false
+ }
+ };
+
+ ajv.addKeyword('regexp', defFunc.definition);
+ return ajv;
+};
diff --git a/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/select.js b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/select.js
new file mode 100644
index 0000000000..f79c6c7a02
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/select.js
@@ -0,0 +1,79 @@
+'use strict';
+
+var util = require('./_util');
+
+module.exports = function defFunc(ajv) {
+ if (!ajv._opts.$data) {
+ console.warn('keyword select requires $data option');
+ return ajv;
+ }
+ var metaSchemaRef = util.metaSchemaRef(ajv);
+ var compiledCaseSchemas = [];
+
+ defFunc.definition = {
+ validate: function v(schema, data, parentSchema) {
+ if (parentSchema.selectCases === undefined)
+ throw new Error('keyword "selectCases" is absent');
+ var compiled = getCompiledSchemas(parentSchema, false);
+ var validate = compiled.cases[schema];
+ if (validate === undefined) validate = compiled.default;
+ if (typeof validate == 'boolean') return validate;
+ var valid = validate(data);
+ if (!valid) v.errors = validate.errors;
+ return valid;
+ },
+ $data: true,
+ metaSchema: { type: ['string', 'number', 'boolean', 'null'] }
+ };
+
+ ajv.addKeyword('select', defFunc.definition);
+ ajv.addKeyword('selectCases', {
+ compile: function (schemas, parentSchema) {
+ var compiled = getCompiledSchemas(parentSchema);
+ for (var value in schemas)
+ compiled.cases[value] = compileOrBoolean(schemas[value]);
+ return function() { return true; };
+ },
+ valid: true,
+ metaSchema: {
+ type: 'object',
+ additionalProperties: metaSchemaRef
+ }
+ });
+ ajv.addKeyword('selectDefault', {
+ compile: function (schema, parentSchema) {
+ var compiled = getCompiledSchemas(parentSchema);
+ compiled.default = compileOrBoolean(schema);
+ return function() { return true; };
+ },
+ valid: true,
+ metaSchema: metaSchemaRef
+ });
+ return ajv;
+
+
+ function getCompiledSchemas(parentSchema, create) {
+ var compiled;
+ compiledCaseSchemas.some(function (c) {
+ if (c.parentSchema === parentSchema) {
+ compiled = c;
+ return true;
+ }
+ });
+ if (!compiled && create !== false) {
+ compiled = {
+ parentSchema: parentSchema,
+ cases: {},
+ default: true
+ };
+ compiledCaseSchemas.push(compiled);
+ }
+ return compiled;
+ }
+
+ function compileOrBoolean(schema) {
+ return typeof schema == 'boolean'
+ ? schema
+ : ajv.compile(schema);
+ }
+};
diff --git a/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/switch.js b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/switch.js
new file mode 100644
index 0000000000..5b0f3f830b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/switch.js
@@ -0,0 +1,38 @@
+'use strict';
+
+var util = require('./_util');
+
+module.exports = function defFunc(ajv) {
+ if (ajv.RULES.keywords.switch && ajv.RULES.keywords.if) return;
+
+ var metaSchemaRef = util.metaSchemaRef(ajv);
+
+ defFunc.definition = {
+ inline: require('./dotjs/switch'),
+ statements: true,
+ errors: 'full',
+ metaSchema: {
+ type: 'array',
+ items: {
+ required: [ 'then' ],
+ properties: {
+ 'if': metaSchemaRef,
+ 'then': {
+ anyOf: [
+ { type: 'boolean' },
+ metaSchemaRef
+ ]
+ },
+ 'continue': { type: 'boolean' }
+ },
+ additionalProperties: false,
+ dependencies: {
+ 'continue': [ 'if' ]
+ }
+ }
+ }
+ };
+
+ ajv.addKeyword('switch', defFunc.definition);
+ return ajv;
+};
diff --git a/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/typeof.js b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/typeof.js
new file mode 100644
index 0000000000..3a3574d83f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/typeof.js
@@ -0,0 +1,32 @@
+'use strict';
+
+var KNOWN_TYPES = ['undefined', 'string', 'number', 'object', 'function', 'boolean', 'symbol'];
+
+module.exports = function defFunc(ajv) {
+ defFunc.definition = {
+ inline: function (it, keyword, schema) {
+ var data = 'data' + (it.dataLevel || '');
+ if (typeof schema == 'string') return 'typeof ' + data + ' == "' + schema + '"';
+ schema = 'validate.schema' + it.schemaPath + '.' + keyword;
+ return schema + '.indexOf(typeof ' + data + ') >= 0';
+ },
+ metaSchema: {
+ anyOf: [
+ {
+ type: 'string',
+ enum: KNOWN_TYPES
+ },
+ {
+ type: 'array',
+ items: {
+ type: 'string',
+ enum: KNOWN_TYPES
+ }
+ }
+ ]
+ }
+ };
+
+ ajv.addKeyword('typeof', defFunc.definition);
+ return ajv;
+};
diff --git a/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/uniqueItemProperties.js b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/uniqueItemProperties.js
new file mode 100644
index 0000000000..2a8e7e841d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv-keywords/keywords/uniqueItemProperties.js
@@ -0,0 +1,32 @@
+'use strict';
+
+module.exports = function defFunc(ajv) {
+ defFunc.definition = {
+ type: 'array',
+ compile: function(keys, parentSchema, it) {
+ var equal = it.util.equal;
+ return function(data) {
+ if (data.length > 1) {
+ for (var k=0; k < keys.length; k++) {
+ var key = keys[k];
+ for (var i = data.length; i--;) {
+ if (typeof data[i] != 'object') continue;
+ for (var j = i; j--;) {
+ if (typeof data[j] == 'object' && equal(data[i][key], data[j][key]))
+ return false;
+ }
+ }
+ }
+ }
+ return true;
+ };
+ },
+ metaSchema: {
+ type: 'array',
+ items: {type: 'string'}
+ }
+ };
+
+ ajv.addKeyword('uniqueItemProperties', defFunc.definition);
+ return ajv;
+};
diff --git a/tools/node_modules/eslint/node_modules/ajv-keywords/package.json b/tools/node_modules/eslint/node_modules/ajv-keywords/package.json
new file mode 100644
index 0000000000..0afdd4666b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv-keywords/package.json
@@ -0,0 +1,78 @@
+{
+ "_from": "ajv-keywords@^2.1.0",
+ "_id": "ajv-keywords@2.1.1",
+ "_inBundle": false,
+ "_integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=",
+ "_location": "/eslint/ajv-keywords",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "ajv-keywords@^2.1.0",
+ "name": "ajv-keywords",
+ "escapedName": "ajv-keywords",
+ "rawSpec": "^2.1.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.1.0"
+ },
+ "_requiredBy": [
+ "/eslint/table"
+ ],
+ "_resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.1.tgz",
+ "_shasum": "617997fc5f60576894c435f940d819e135b80762",
+ "_spec": "ajv-keywords@^2.1.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/table",
+ "author": {
+ "name": "Evgeny Poberezkin"
+ },
+ "bugs": {
+ "url": "https://github.com/epoberezkin/ajv-keywords/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Custom JSON-Schema keywords for Ajv validator",
+ "devDependencies": {
+ "ajv": "^5.0.0",
+ "ajv-pack": "^0.3.0",
+ "chai": "^4.0.2",
+ "coveralls": "^3.0.0",
+ "dot": "^1.1.1",
+ "eslint": "^4.9.0",
+ "glob": "^7.1.1",
+ "istanbul": "^0.4.3",
+ "js-beautify": "^1.7.4",
+ "json-schema-test": "^1.3.0",
+ "mocha": "^4.0.0",
+ "pre-commit": "^1.1.3",
+ "uuid": "^3.0.1"
+ },
+ "files": [
+ "index.js",
+ "keywords"
+ ],
+ "homepage": "https://github.com/epoberezkin/ajv-keywords#readme",
+ "keywords": [
+ "JSON-Schema",
+ "ajv",
+ "keywords"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "ajv-keywords",
+ "peerDependencies": {
+ "ajv": "^5.0.0"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/epoberezkin/ajv-keywords.git"
+ },
+ "scripts": {
+ "build": "node node_modules/ajv/scripts/compile-dots.js node_modules/ajv/lib keywords",
+ "eslint": "eslint index.js keywords/*.js",
+ "prepublish": "npm run build",
+ "test": "npm run build && npm run eslint && npm run test-cov",
+ "test-cov": "istanbul cover -x 'spec/**' node_modules/mocha/bin/_mocha -- spec/*.spec.js -R spec",
+ "test-spec": "mocha spec/*.spec.js -R spec"
+ },
+ "version": "2.1.1"
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv/.tonic_example.js b/tools/node_modules/eslint/node_modules/ajv/.tonic_example.js
new file mode 100644
index 0000000000..aa11812d87
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/.tonic_example.js
@@ -0,0 +1,20 @@
+var Ajv = require('ajv');
+var ajv = new Ajv({allErrors: true});
+
+var schema = {
+ "properties": {
+ "foo": { "type": "string" },
+ "bar": { "type": "number", "maximum": 3 }
+ }
+};
+
+var validate = ajv.compile(schema);
+
+test({"foo": "abc", "bar": 2});
+test({"foo": 2, "bar": 4});
+
+function test(data) {
+ var valid = validate(data);
+ if (valid) console.log('Valid!');
+ else console.log('Invalid: ' + ajv.errorsText(validate.errors));
+} \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/ajv/LICENSE b/tools/node_modules/eslint/node_modules/ajv/LICENSE
new file mode 100644
index 0000000000..810539685b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Evgeny Poberezkin
+
+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/tools/node_modules/eslint/node_modules/ajv/README.md b/tools/node_modules/eslint/node_modules/ajv/README.md
new file mode 100644
index 0000000000..fdf6144a20
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/README.md
@@ -0,0 +1,1327 @@
+<img align="right" alt="Ajv logo" width="160" src="http://epoberezkin.github.io/ajv/images/ajv_logo.png">
+
+# Ajv: Another JSON Schema Validator
+
+The fastest JSON Schema validator for Node.js and browser with draft 6 support.
+
+
+[![Build Status](https://travis-ci.org/epoberezkin/ajv.svg?branch=master)](https://travis-ci.org/epoberezkin/ajv)
+[![npm version](https://badge.fury.io/js/ajv.svg)](https://www.npmjs.com/package/ajv)
+[![npm@beta](https://img.shields.io/npm/v/ajv/beta.svg)](https://github.com/epoberezkin/ajv/tree/beta)
+[![npm downloads](https://img.shields.io/npm/dm/ajv.svg)](https://www.npmjs.com/package/ajv)
+[![Coverage Status](https://coveralls.io/repos/epoberezkin/ajv/badge.svg?branch=master&service=github)](https://coveralls.io/github/epoberezkin/ajv?branch=master)
+[![Greenkeeper badge](https://badges.greenkeeper.io/epoberezkin/ajv.svg)](https://greenkeeper.io/)
+[![Gitter](https://img.shields.io/gitter/room/ajv-validator/ajv.svg)](https://gitter.im/ajv-validator/ajv)
+
+
+__Please note__: Ajv [version 6](https://github.com/epoberezkin/ajv/tree/beta) with [JSON Schema draft-07](http://json-schema.org/work-in-progress) support is released. Use `npm install ajv@beta` to install.
+
+
+## Using version 5
+
+[JSON Schema draft-06](https://trac.tools.ietf.org/html/draft-wright-json-schema-validation-01) is published.
+
+[Ajv version 5.0.0](https://github.com/epoberezkin/ajv/releases/tag/5.0.0) that supports draft-06 is released. It may require either migrating your schemas or updating your code (to continue using draft-04 and v5 schemas).
+
+__Please note__: To use Ajv with draft-04 schemas you need to explicitly add meta-schema to the validator instance:
+
+```javascript
+ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-04.json'));
+```
+
+
+## Contents
+
+- [Performance](#performance)
+- [Features](#features)
+- [Getting started](#getting-started)
+- [Frequently Asked Questions](https://github.com/epoberezkin/ajv/blob/master/FAQ.md)
+- [Using in browser](#using-in-browser)
+- [Command line interface](#command-line-interface)
+- Validation
+ - [Keywords](#validation-keywords)
+ - [Formats](#formats)
+ - [Combining schemas with $ref](#ref)
+ - [$data reference](#data-reference)
+ - NEW: [$merge and $patch keywords](#merge-and-patch-keywords)
+ - [Defining custom keywords](#defining-custom-keywords)
+ - [Asynchronous schema compilation](#asynchronous-schema-compilation)
+ - [Asynchronous validation](#asynchronous-validation)
+- Modifying data during validation
+ - [Filtering data](#filtering-data)
+ - [Assigning defaults](#assigning-defaults)
+ - [Coercing data types](#coercing-data-types)
+- API
+ - [Methods](#api)
+ - [Options](#options)
+ - [Validation errors](#validation-errors)
+- [Related packages](#related-packages)
+- [Packages using Ajv](#some-packages-using-ajv)
+- [Tests, Contributing, History, License](#tests)
+
+
+## Performance
+
+Ajv generates code using [doT templates](https://github.com/olado/doT) to turn JSON schemas into super-fast validation functions that are efficient for v8 optimization.
+
+Currently Ajv is the fastest and the most standard compliant validator according to these benchmarks:
+
+- [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark) - 50% faster than the second place
+- [jsck benchmark](https://github.com/pandastrike/jsck#benchmarks) - 20-190% faster
+- [z-schema benchmark](https://rawgit.com/zaggino/z-schema/master/benchmark/results.html)
+- [themis benchmark](https://cdn.rawgit.com/playlyfe/themis/master/benchmark/results.html)
+
+
+Performance of different validators by [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark):
+
+[![performance](https://chart.googleapis.com/chart?chxt=x,y&cht=bhs&chco=76A4FB&chls=2.0&chbh=32,4,1&chs=600x416&chxl=-1:%7Cajv%7Cis-my-json-valid%7Cjsen%7Cschemasaurus%7Cthemis%7Cz-schema%7Cjsck%7Cjsonschema%7Cskeemas%7Ctv4%7Cjayschema&chd=t:100,68,61,22.8,17.6,6.6,2.7,0.9,0.7,0.4,0.1)](https://github.com/ebdrup/json-schema-benchmark/blob/master/README.md#performance)
+
+
+## Features
+
+- Ajv implements full JSON Schema [draft 6](http://json-schema.org/) and draft 4 standards:
+ - all validation keywords (see [JSON Schema validation keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md))
+ - full support of remote refs (remote schemas have to be added with `addSchema` or compiled to be available)
+ - support of circular references between schemas
+ - correct string lengths for strings with unicode pairs (can be turned off)
+ - [formats](#formats) defined by JSON Schema draft 4 standard and custom formats (can be turned off)
+ - [validates schemas against meta-schema](#api-validateschema)
+- supports [browsers](#using-in-browser) and Node.js 0.10-8.x
+- [asynchronous loading](#asynchronous-schema-compilation) of referenced schemas during compilation
+- "All errors" validation mode with [option allErrors](#options)
+- [error messages with parameters](#validation-errors) describing error reasons to allow creating custom error messages
+- i18n error messages support with [ajv-i18n](https://github.com/epoberezkin/ajv-i18n) package
+- [filtering data](#filtering-data) from additional properties
+- [assigning defaults](#assigning-defaults) to missing properties and items
+- [coercing data](#coercing-data-types) to the types specified in `type` keywords
+- [custom keywords](#defining-custom-keywords)
+- draft-6 keywords `const`, `contains` and `propertyNames`
+- draft-6 boolean schemas (`true`/`false` as a schema to always pass/fail).
+- keywords `switch`, `patternRequired`, `formatMaximum` / `formatMinimum` and `formatExclusiveMaximum` / `formatExclusiveMinimum` from [JSON-schema extension proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) with [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package
+- [$data reference](#data-reference) to use values from the validated data as values for the schema keywords
+- [asynchronous validation](#asynchronous-validation) of custom formats and keywords
+
+Currently Ajv is the only validator that passes all the tests from [JSON Schema Test Suite](https://github.com/json-schema/JSON-Schema-Test-Suite) (according to [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark), apart from the test that requires that `1.0` is not an integer that is impossible to satisfy in JavaScript).
+
+
+## Install
+
+```
+npm install ajv
+```
+
+or to install [version 6](https://github.com/epoberezkin/ajv/tree/beta):
+
+```
+npm install ajv@beta
+```
+
+
+## <a name="usage"></a>Getting started
+
+Try it in the Node.js REPL: https://tonicdev.com/npm/ajv
+
+
+The fastest validation call:
+
+```javascript
+var Ajv = require('ajv');
+var ajv = new Ajv(); // options can be passed, e.g. {allErrors: true}
+var validate = ajv.compile(schema);
+var valid = validate(data);
+if (!valid) console.log(validate.errors);
+```
+
+or with less code
+
+```javascript
+// ...
+var valid = ajv.validate(schema, data);
+if (!valid) console.log(ajv.errors);
+// ...
+```
+
+or
+
+```javascript
+// ...
+var valid = ajv.addSchema(schema, 'mySchema')
+ .validate('mySchema', data);
+if (!valid) console.log(ajv.errorsText());
+// ...
+```
+
+See [API](#api) and [Options](#options) for more details.
+
+Ajv compiles schemas to functions and caches them in all cases (using schema serialized with [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) or a custom function as a key), so that the next time the same schema is used (not necessarily the same object instance) it won't be compiled again.
+
+The best performance is achieved when using compiled functions returned by `compile` or `getSchema` methods (there is no additional function call).
+
+__Please note__: every time a validation function or `ajv.validate` are called `errors` property is overwritten. You need to copy `errors` array reference to another variable if you want to use it later (e.g., in the callback). See [Validation errors](#validation-errors)
+
+
+## Using in browser
+
+You can require Ajv directly from the code you browserify - in this case Ajv will be a part of your bundle.
+
+If you need to use Ajv in several bundles you can create a separate UMD bundle using `npm run bundle` script (thanks to [siddo420](https://github.com/siddo420)).
+
+Then you need to load Ajv in the browser:
+```html
+<script src="ajv.min.js"></script>
+```
+
+This bundle can be used with different module systems; it creates global `Ajv` if no module system is found.
+
+The browser bundle is available on [cdnjs](https://cdnjs.com/libraries/ajv).
+
+Ajv is tested with these browsers:
+
+[![Sauce Test Status](https://saucelabs.com/browser-matrix/epoberezkin.svg)](https://saucelabs.com/u/epoberezkin)
+
+__Please note__: some frameworks, e.g. Dojo, may redefine global require in such way that is not compatible with CommonJS module format. In such case Ajv bundle has to be loaded before the framework and then you can use global Ajv (see issue [#234](https://github.com/epoberezkin/ajv/issues/234)).
+
+
+## Command line interface
+
+CLI is available as a separate npm package [ajv-cli](https://github.com/jessedc/ajv-cli). It supports:
+
+- compiling JSON-schemas to test their validity
+- BETA: generating standalone module exporting a validation function to be used without Ajv (using [ajv-pack](https://github.com/epoberezkin/ajv-pack))
+- migrate schemas to draft-06 (using [json-schema-migrate](https://github.com/epoberezkin/json-schema-migrate))
+- validating data file(s) against JSON-schema
+- testing expected validity of data against JSON-schema
+- referenced schemas
+- custom meta-schemas
+- files in JSON and JavaScript format
+- all Ajv options
+- reporting changes in data after validation in [JSON-patch](https://tools.ietf.org/html/rfc6902) format
+
+
+## Validation keywords
+
+Ajv supports all validation keywords from draft 4 of JSON-schema standard:
+
+- [type](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#type)
+- [for numbers](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-numbers) - maximum, minimum, exclusiveMaximum, exclusiveMinimum, multipleOf
+- [for strings](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-strings) - maxLength, minLength, pattern, format
+- [for arrays](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-arrays) - maxItems, minItems, uniqueItems, items, additionalItems, [contains](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#contains)
+- [for objects](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-objects) - maxProperties, minProperties, required, properties, patternProperties, additionalProperties, dependencies, [propertyNames](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#propertynames)
+- [for all types](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-all-types) - enum, [const](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#const)
+- [compound keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#compound-keywords) - not, oneOf, anyOf, allOf
+
+With [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package Ajv also supports validation keywords from [JSON Schema extension proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) for JSON-schema standard:
+
+- [switch](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#switch-proposed) - conditional validation with a sequence of if/then clauses
+- [patternRequired](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#patternrequired-proposed) - like `required` but with patterns that some property should match.
+- [formatMaximum, formatMinimum, formatExclusiveMaximum, formatExclusiveMinimum](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#formatmaximum--formatminimum-and-exclusiveformatmaximum--exclusiveformatminimum-proposed) - setting limits for date, time, etc.
+
+See [JSON Schema validation keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md) for more details.
+
+
+## Formats
+
+The following formats are supported for string validation with "format" keyword:
+
+- _date_: full-date according to [RFC3339](http://tools.ietf.org/html/rfc3339#section-5.6).
+- _time_: time with optional time-zone.
+- _date-time_: date-time from the same source (time-zone is mandatory). `date`, `time` and `date-time` validate ranges in `full` mode and only regexp in `fast` mode (see [options](#options)).
+- _uri_: full uri with optional protocol.
+- _url_: [URL record](https://url.spec.whatwg.org/#concept-url).
+- _uri-template_: URI template according to [RFC6570](https://tools.ietf.org/html/rfc6570)
+- _email_: email address.
+- _hostname_: host name according to [RFC1034](http://tools.ietf.org/html/rfc1034#section-3.5).
+- _ipv4_: IP address v4.
+- _ipv6_: IP address v6.
+- _regex_: tests whether a string is a valid regular expression by passing it to RegExp constructor.
+- _uuid_: Universally Unique IDentifier according to [RFC4122](http://tools.ietf.org/html/rfc4122).
+- _json-pointer_: JSON-pointer according to [RFC6901](https://tools.ietf.org/html/rfc6901).
+- _relative-json-pointer_: relative JSON-pointer according to [this draft](http://tools.ietf.org/html/draft-luff-relative-json-pointer-00).
+
+There are two modes of format validation: `fast` and `full`. This mode affects formats `date`, `time`, `date-time`, `uri`, `email`, and `hostname`. See [Options](#options) for details.
+
+You can add additional formats and replace any of the formats above using [addFormat](#api-addformat) method.
+
+The option `unknownFormats` allows changing the default behaviour when an unknown format is encountered. In this case Ajv can either fail schema compilation (default) or ignore it (default in versions before 5.0.0). You also can whitelist specific format(s) to be ignored. See [Options](#options) for details.
+
+You can find patterns used for format validation and the sources that were used in [formats.js](https://github.com/epoberezkin/ajv/blob/master/lib/compile/formats.js).
+
+
+## <a name="ref"></a>Combining schemas with $ref
+
+You can structure your validation logic across multiple schema files and have schemas reference each other using `$ref` keyword.
+
+Example:
+
+```javascript
+var schema = {
+ "$id": "http://example.com/schemas/schema.json",
+ "type": "object",
+ "properties": {
+ "foo": { "$ref": "defs.json#/definitions/int" },
+ "bar": { "$ref": "defs.json#/definitions/str" }
+ }
+};
+
+var defsSchema = {
+ "$id": "http://example.com/schemas/defs.json",
+ "definitions": {
+ "int": { "type": "integer" },
+ "str": { "type": "string" }
+ }
+};
+```
+
+Now to compile your schema you can either pass all schemas to Ajv instance:
+
+```javascript
+var ajv = new Ajv({schemas: [schema, defsSchema]});
+var validate = ajv.getSchema('http://example.com/schemas/schema.json');
+```
+
+or use `addSchema` method:
+
+```javascript
+var ajv = new Ajv;
+var validate = ajv.addSchema(defsSchema)
+ .compile(schema);
+```
+
+See [Options](#options) and [addSchema](#api) method.
+
+__Please note__:
+- `$ref` is resolved as the uri-reference using schema $id as the base URI (see the example).
+- References can be recursive (and mutually recursive) to implement the schemas for different data structures (such as linked lists, trees, graphs, etc.).
+- You don't have to host your schema files at the URIs that you use as schema $id. These URIs are only used to identify the schemas, and according to JSON Schema specification validators should not expect to be able to download the schemas from these URIs.
+- The actual location of the schema file in the file system is not used.
+- You can pass the identifier of the schema as the second parameter of `addSchema` method or as a property name in `schemas` option. This identifier can be used instead of (or in addition to) schema $id.
+- You cannot have the same $id (or the schema identifier) used for more than one schema - the exception will be thrown.
+- You can implement dynamic resolution of the referenced schemas using `compileAsync` method. In this way you can store schemas in any system (files, web, database, etc.) and reference them without explicitly adding to Ajv instance. See [Asynchronous schema compilation](#asynchronous-schema-compilation).
+
+
+## $data reference
+
+With `$data` option you can use values from the validated data as the values for the schema keywords. See [proposal](https://github.com/json-schema/json-schema/wiki/$data-(v5-proposal)) for more information about how it works.
+
+`$data` reference is supported in the keywords: const, enum, format, maximum/minimum, exclusiveMaximum / exclusiveMinimum, maxLength / minLength, maxItems / minItems, maxProperties / minProperties, formatMaximum / formatMinimum, formatExclusiveMaximum / formatExclusiveMinimum, multipleOf, pattern, required, uniqueItems.
+
+The value of "$data" should be a [JSON-pointer](https://tools.ietf.org/html/rfc6901) to the data (the root is always the top level data object, even if the $data reference is inside a referenced subschema) or a [relative JSON-pointer](http://tools.ietf.org/html/draft-luff-relative-json-pointer-00) (it is relative to the current point in data; if the $data reference is inside a referenced subschema it cannot point to the data outside of the root level for this subschema).
+
+Examples.
+
+This schema requires that the value in property `smaller` is less or equal than the value in the property larger:
+
+```javascript
+var ajv = new Ajv({$data: true});
+
+var schema = {
+ "properties": {
+ "smaller": {
+ "type": "number",
+ "maximum": { "$data": "1/larger" }
+ },
+ "larger": { "type": "number" }
+ }
+};
+
+var validData = {
+ smaller: 5,
+ larger: 7
+};
+
+ajv.validate(schema, validData); // true
+```
+
+This schema requires that the properties have the same format as their field names:
+
+```javascript
+var schema = {
+ "additionalProperties": {
+ "type": "string",
+ "format": { "$data": "0#" }
+ }
+};
+
+var validData = {
+ 'date-time': '1963-06-19T08:30:06.283185Z',
+ email: 'joe.bloggs@example.com'
+}
+```
+
+`$data` reference is resolved safely - it won't throw even if some property is undefined. If `$data` resolves to `undefined` the validation succeeds (with the exclusion of `const` keyword). If `$data` resolves to incorrect type (e.g. not "number" for maximum keyword) the validation fails.
+
+
+## $merge and $patch keywords
+
+With the package [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) you can use the keywords `$merge` and `$patch` that allow extending JSON-schemas with patches using formats [JSON Merge Patch (RFC 7396)](https://tools.ietf.org/html/rfc7396) and [JSON Patch (RFC 6902)](https://tools.ietf.org/html/rfc6902).
+
+To add keywords `$merge` and `$patch` to Ajv instance use this code:
+
+```javascript
+require('ajv-merge-patch')(ajv);
+```
+
+Examples.
+
+Using `$merge`:
+
+```json
+{
+ "$merge": {
+ "source": {
+ "type": "object",
+ "properties": { "p": { "type": "string" } },
+ "additionalProperties": false
+ },
+ "with": {
+ "properties": { "q": { "type": "number" } }
+ }
+ }
+}
+```
+
+Using `$patch`:
+
+```json
+{
+ "$patch": {
+ "source": {
+ "type": "object",
+ "properties": { "p": { "type": "string" } },
+ "additionalProperties": false
+ },
+ "with": [
+ { "op": "add", "path": "/properties/q", "value": { "type": "number" } }
+ ]
+ }
+}
+```
+
+The schemas above are equivalent to this schema:
+
+```json
+{
+ "type": "object",
+ "properties": {
+ "p": { "type": "string" },
+ "q": { "type": "number" }
+ },
+ "additionalProperties": false
+}
+```
+
+The properties `source` and `with` in the keywords `$merge` and `$patch` can use absolute or relative `$ref` to point to other schemas previously added to the Ajv instance or to the fragments of the current schema.
+
+See the package [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) for more information.
+
+
+## Defining custom keywords
+
+The advantages of using custom keywords are:
+
+- allow creating validation scenarios that cannot be expressed using JSON Schema
+- simplify your schemas
+- help bringing a bigger part of the validation logic to your schemas
+- make your schemas more expressive, less verbose and closer to your application domain
+- implement custom data processors that modify your data (`modifying` option MUST be used in keyword definition) and/or create side effects while the data is being validated
+
+If a keyword is used only for side-effects and its validation result is pre-defined, use option `valid: true/false` in keyword definition to simplify both generated code (no error handling in case of `valid: true`) and your keyword functions (no need to return any validation result).
+
+The concerns you have to be aware of when extending JSON-schema standard with custom keywords are the portability and understanding of your schemas. You will have to support these custom keywords on other platforms and to properly document these keywords so that everybody can understand them in your schemas.
+
+You can define custom keywords with [addKeyword](#api-addkeyword) method. Keywords are defined on the `ajv` instance level - new instances will not have previously defined keywords.
+
+Ajv allows defining keywords with:
+- validation function
+- compilation function
+- macro function
+- inline compilation function that should return code (as string) that will be inlined in the currently compiled schema.
+
+Example. `range` and `exclusiveRange` keywords using compiled schema:
+
+```javascript
+ajv.addKeyword('range', {
+ type: 'number',
+ compile: function (sch, parentSchema) {
+ var min = sch[0];
+ var max = sch[1];
+
+ return parentSchema.exclusiveRange === true
+ ? function (data) { return data > min && data < max; }
+ : function (data) { return data >= min && data <= max; }
+ }
+});
+
+var schema = { "range": [2, 4], "exclusiveRange": true };
+var validate = ajv.compile(schema);
+console.log(validate(2.01)); // true
+console.log(validate(3.99)); // true
+console.log(validate(2)); // false
+console.log(validate(4)); // false
+```
+
+Several custom keywords (typeof, instanceof, range and propertyNames) are defined in [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package - they can be used for your schemas and as a starting point for your own custom keywords.
+
+See [Defining custom keywords](https://github.com/epoberezkin/ajv/blob/master/CUSTOM.md) for more details.
+
+
+## Asynchronous schema compilation
+
+During asynchronous compilation remote references are loaded using supplied function. See `compileAsync` [method](#api-compileAsync) and `loadSchema` [option](#options).
+
+Example:
+
+```javascript
+var ajv = new Ajv({ loadSchema: loadSchema });
+
+ajv.compileAsync(schema).then(function (validate) {
+ var valid = validate(data);
+ // ...
+});
+
+function loadSchema(uri) {
+ return request.json(uri).then(function (res) {
+ if (res.statusCode >= 400)
+ throw new Error('Loading error: ' + res.statusCode);
+ return res.body;
+ });
+}
+```
+
+__Please note__: [Option](#options) `missingRefs` should NOT be set to `"ignore"` or `"fail"` for asynchronous compilation to work.
+
+
+## Asynchronous validation
+
+Example in Node.js REPL: https://tonicdev.com/esp/ajv-asynchronous-validation
+
+You can define custom formats and keywords that perform validation asynchronously by accessing database or some other service. You should add `async: true` in the keyword or format definition (see [addFormat](#api-addformat), [addKeyword](#api-addkeyword) and [Defining custom keywords](#defining-custom-keywords)).
+
+If your schema uses asynchronous formats/keywords or refers to some schema that contains them it should have `"$async": true` keyword so that Ajv can compile it correctly. If asynchronous format/keyword or reference to asynchronous schema is used in the schema without `$async` keyword Ajv will throw an exception during schema compilation.
+
+__Please note__: all asynchronous subschemas that are referenced from the current or other schemas should have `"$async": true` keyword as well, otherwise the schema compilation will fail.
+
+Validation function for an asynchronous custom format/keyword should return a promise that resolves with `true` or `false` (or rejects with `new Ajv.ValidationError(errors)` if you want to return custom errors from the keyword function). Ajv compiles asynchronous schemas to either [es7 async functions](http://tc39.github.io/ecmascript-asyncawait/) that can optionally be transpiled with [nodent](https://github.com/MatAtBread/nodent) or with [regenerator](https://github.com/facebook/regenerator) or to [generator functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*) that can be optionally transpiled with regenerator as well. You can also supply any other transpiler as a function. See [Options](#options).
+
+The compiled validation function has `$async: true` property (if the schema is asynchronous), so you can differentiate these functions if you are using both synchronous and asynchronous schemas.
+
+If you are using generators, the compiled validation function can be either wrapped with [co](https://github.com/tj/co) (default) or returned as generator function, that can be used directly, e.g. in [koa](http://koajs.com/) 1.0. `co` is a small library, it is included in Ajv (both as npm dependency and in the browser bundle).
+
+Async functions are currently supported in Chrome 55, Firefox 52, Node.js 7 (with --harmony-async-await) and MS Edge 13 (with flag).
+
+Generator functions are currently supported in Chrome, Firefox and Node.js.
+
+If you are using Ajv in other browsers or in older versions of Node.js you should use one of available transpiling options. All provided async modes use global Promise class. If your platform does not have Promise you should use a polyfill that defines it.
+
+Validation result will be a promise that resolves with validated data or rejects with an exception `Ajv.ValidationError` that contains the array of validation errors in `errors` property.
+
+
+Example:
+
+```javascript
+/**
+ * Default mode is non-transpiled generator function wrapped with `co`.
+ * Using package ajv-async (https://github.com/epoberezkin/ajv-async)
+ * you can auto-detect the best async mode.
+ * In this case, without "async" and "transpile" options
+ * (or with option {async: true})
+ * Ajv will choose the first supported/installed option in this order:
+ * 1. native async function
+ * 2. native generator function wrapped with co
+ * 3. es7 async functions transpiled with nodent
+ * 4. es7 async functions transpiled with regenerator
+ */
+
+var setupAsync = require('ajv-async');
+var ajv = setupAsync(new Ajv);
+
+ajv.addKeyword('idExists', {
+ async: true,
+ type: 'number',
+ validate: checkIdExists
+});
+
+
+function checkIdExists(schema, data) {
+ return knex(schema.table)
+ .select('id')
+ .where('id', data)
+ .then(function (rows) {
+ return !!rows.length; // true if record is found
+ });
+}
+
+var schema = {
+ "$async": true,
+ "properties": {
+ "userId": {
+ "type": "integer",
+ "idExists": { "table": "users" }
+ },
+ "postId": {
+ "type": "integer",
+ "idExists": { "table": "posts" }
+ }
+ }
+};
+
+var validate = ajv.compile(schema);
+
+validate({ userId: 1, postId: 19 })
+.then(function (data) {
+ console.log('Data is valid', data); // { userId: 1, postId: 19 }
+})
+.catch(function (err) {
+ if (!(err instanceof Ajv.ValidationError)) throw err;
+ // data is invalid
+ console.log('Validation errors:', err.errors);
+});
+```
+
+### Using transpilers with asynchronous validation functions.
+
+To use a transpiler you should separately install it (or load its bundle in the browser).
+
+Ajv npm package includes minified browser bundles of regenerator and nodent in dist folder.
+
+
+#### Using nodent
+
+```javascript
+var setupAsync = require('ajv-async');
+var ajv = new Ajv({ /* async: 'es7', */ transpile: 'nodent' });
+setupAsync(ajv);
+var validate = ajv.compile(schema); // transpiled es7 async function
+validate(data).then(successFunc).catch(errorFunc);
+```
+
+`npm install nodent` or use `nodent.min.js` from dist folder of npm package.
+
+
+#### Using regenerator
+
+```javascript
+var setupAsync = require('ajv-async');
+var ajv = new Ajv({ /* async: 'es7', */ transpile: 'regenerator' });
+setupAsync(ajv);
+var validate = ajv.compile(schema); // transpiled es7 async function
+validate(data).then(successFunc).catch(errorFunc);
+```
+
+`npm install regenerator` or use `regenerator.min.js` from dist folder of npm package.
+
+
+#### Using other transpilers
+
+```javascript
+var ajv = new Ajv({ async: 'es7', processCode: transpileFunc });
+var validate = ajv.compile(schema); // transpiled es7 async function
+validate(data).then(successFunc).catch(errorFunc);
+```
+
+See [Options](#options).
+
+
+#### Comparison of async modes
+
+|mode|transpile<br>speed*|run-time<br>speed*|bundle<br>size|
+|---|:-:|:-:|:-:|
+|es7 async<br>(native)|-|0.75|-|
+|generators<br>(native)|-|1.0|-|
+|es7.nodent|1.35|1.1|215Kb|
+|es7.regenerator|1.0|2.7|1109Kb|
+|regenerator|1.0|3.2|1109Kb|
+
+\* Relative performance in Node.js 7.x — smaller is better.
+
+[nodent](https://github.com/MatAtBread/nodent) has several advantages:
+
+- much smaller browser bundle than regenerator
+- almost the same performance of generated code as native generators in Node.js and the latest Chrome
+- much better performance than native generators in other browsers
+- works in IE 9 (regenerator does not)
+
+
+## Filtering data
+
+With [option `removeAdditional`](#options) (added by [andyscott](https://github.com/andyscott)) you can filter data during the validation.
+
+This option modifies original data.
+
+Example:
+
+```javascript
+var ajv = new Ajv({ removeAdditional: true });
+var schema = {
+ "additionalProperties": false,
+ "properties": {
+ "foo": { "type": "number" },
+ "bar": {
+ "additionalProperties": { "type": "number" },
+ "properties": {
+ "baz": { "type": "string" }
+ }
+ }
+ }
+}
+
+var data = {
+ "foo": 0,
+ "additional1": 1, // will be removed; `additionalProperties` == false
+ "bar": {
+ "baz": "abc",
+ "additional2": 2 // will NOT be removed; `additionalProperties` != false
+ },
+}
+
+var validate = ajv.compile(schema);
+
+console.log(validate(data)); // true
+console.log(data); // { "foo": 0, "bar": { "baz": "abc", "additional2": 2 }
+```
+
+If `removeAdditional` option in the example above were `"all"` then both `additional1` and `additional2` properties would have been removed.
+
+If the option were `"failing"` then property `additional1` would have been removed regardless of its value and property `additional2` would have been removed only if its value were failing the schema in the inner `additionalProperties` (so in the example above it would have stayed because it passes the schema, but any non-number would have been removed).
+
+__Please note__: If you use `removeAdditional` option with `additionalProperties` keyword inside `anyOf`/`oneOf` keywords your validation can fail with this schema, for example:
+
+```json
+{
+ "type": "object",
+ "oneOf": [
+ {
+ "properties": {
+ "foo": { "type": "string" }
+ },
+ "required": [ "foo" ],
+ "additionalProperties": false
+ },
+ {
+ "properties": {
+ "bar": { "type": "integer" }
+ },
+ "required": [ "bar" ],
+ "additionalProperties": false
+ }
+ ]
+}
+```
+
+The intention of the schema above is to allow objects with either the string property "foo" or the integer property "bar", but not with both and not with any other properties.
+
+With the option `removeAdditional: true` the validation will pass for the object `{ "foo": "abc"}` but will fail for the object `{"bar": 1}`. It happens because while the first subschema in `oneOf` is validated, the property `bar` is removed because it is an additional property according to the standard (because it is not included in `properties` keyword in the same schema).
+
+While this behaviour is unexpected (issues [#129](https://github.com/epoberezkin/ajv/issues/129), [#134](https://github.com/epoberezkin/ajv/issues/134)), it is correct. To have the expected behaviour (both objects are allowed and additional properties are removed) the schema has to be refactored in this way:
+
+```json
+{
+ "type": "object",
+ "properties": {
+ "foo": { "type": "string" },
+ "bar": { "type": "integer" }
+ },
+ "additionalProperties": false,
+ "oneOf": [
+ { "required": [ "foo" ] },
+ { "required": [ "bar" ] }
+ ]
+}
+```
+
+The schema above is also more efficient - it will compile into a faster function.
+
+
+## Assigning defaults
+
+With [option `useDefaults`](#options) Ajv will assign values from `default` keyword in the schemas of `properties` and `items` (when it is the array of schemas) to the missing properties and items.
+
+This option modifies original data.
+
+__Please note__: by default the default value is inserted in the generated validation code as a literal (starting from v4.0), so the value inserted in the data will be the deep clone of the default in the schema.
+
+If you need to insert the default value in the data by reference pass the option `useDefaults: "shared"`.
+
+Inserting defaults by reference can be faster (in case you have an object in `default`) and it allows to have dynamic values in defaults, e.g. timestamp, without recompiling the schema. The side effect is that modifying the default value in any validated data instance will change the default in the schema and in other validated data instances. See example 3 below.
+
+
+Example 1 (`default` in `properties`):
+
+```javascript
+var ajv = new Ajv({ useDefaults: true });
+var schema = {
+ "type": "object",
+ "properties": {
+ "foo": { "type": "number" },
+ "bar": { "type": "string", "default": "baz" }
+ },
+ "required": [ "foo", "bar" ]
+};
+
+var data = { "foo": 1 };
+
+var validate = ajv.compile(schema);
+
+console.log(validate(data)); // true
+console.log(data); // { "foo": 1, "bar": "baz" }
+```
+
+Example 2 (`default` in `items`):
+
+```javascript
+var schema = {
+ "type": "array",
+ "items": [
+ { "type": "number" },
+ { "type": "string", "default": "foo" }
+ ]
+}
+
+var data = [ 1 ];
+
+var validate = ajv.compile(schema);
+
+console.log(validate(data)); // true
+console.log(data); // [ 1, "foo" ]
+```
+
+Example 3 (inserting "defaults" by reference):
+
+```javascript
+var ajv = new Ajv({ useDefaults: 'shared' });
+
+var schema = {
+ properties: {
+ foo: {
+ default: { bar: 1 }
+ }
+ }
+}
+
+var validate = ajv.compile(schema);
+
+var data = {};
+console.log(validate(data)); // true
+console.log(data); // { foo: { bar: 1 } }
+
+data.foo.bar = 2;
+
+var data2 = {};
+console.log(validate(data2)); // true
+console.log(data2); // { foo: { bar: 2 } }
+```
+
+`default` keywords in other cases are ignored:
+
+- not in `properties` or `items` subschemas
+- in schemas inside `anyOf`, `oneOf` and `not` (see [#42](https://github.com/epoberezkin/ajv/issues/42))
+- in `if` subschema of `switch` keyword
+- in schemas generated by custom macro keywords
+
+
+## Coercing data types
+
+When you are validating user inputs all your data properties are usually strings. The option `coerceTypes` allows you to have your data types coerced to the types specified in your schema `type` keywords, both to pass the validation and to use the correctly typed data afterwards.
+
+This option modifies original data.
+
+__Please note__: if you pass a scalar value to the validating function its type will be coerced and it will pass the validation, but the value of the variable you pass won't be updated because scalars are passed by value.
+
+
+Example 1:
+
+```javascript
+var ajv = new Ajv({ coerceTypes: true });
+var schema = {
+ "type": "object",
+ "properties": {
+ "foo": { "type": "number" },
+ "bar": { "type": "boolean" }
+ },
+ "required": [ "foo", "bar" ]
+};
+
+var data = { "foo": "1", "bar": "false" };
+
+var validate = ajv.compile(schema);
+
+console.log(validate(data)); // true
+console.log(data); // { "foo": 1, "bar": false }
+```
+
+Example 2 (array coercions):
+
+```javascript
+var ajv = new Ajv({ coerceTypes: 'array' });
+var schema = {
+ "properties": {
+ "foo": { "type": "array", "items": { "type": "number" } },
+ "bar": { "type": "boolean" }
+ }
+};
+
+var data = { "foo": "1", "bar": ["false"] };
+
+var validate = ajv.compile(schema);
+
+console.log(validate(data)); // true
+console.log(data); // { "foo": [1], "bar": false }
+```
+
+The coercion rules, as you can see from the example, are different from JavaScript both to validate user input as expected and to have the coercion reversible (to correctly validate cases where different types are defined in subschemas of "anyOf" and other compound keywords).
+
+See [Coercion rules](https://github.com/epoberezkin/ajv/blob/master/COERCION.md) for details.
+
+
+## API
+
+##### new Ajv(Object options) -&gt; Object
+
+Create Ajv instance.
+
+
+##### .compile(Object schema) -&gt; Function&lt;Object data&gt;
+
+Generate validating function and cache the compiled schema for future use.
+
+Validating function returns boolean and has properties `errors` with the errors from the last validation (`null` if there were no errors) and `schema` with the reference to the original schema.
+
+Unless the option `validateSchema` is false, the schema will be validated against meta-schema and if schema is invalid the error will be thrown. See [options](#options).
+
+
+##### <a name="api-compileAsync"></a>.compileAsync(Object schema [, Boolean meta] [, Function callback]) -&gt; Promise
+
+Asynchronous version of `compile` method that loads missing remote schemas using asynchronous function in `options.loadSchema`. This function returns a Promise that resolves to a validation function. An optional callback passed to `compileAsync` will be called with 2 parameters: error (or null) and validating function. The returned promise will reject (and the callback will be called with an error) when:
+
+- missing schema can't be loaded (`loadSchema` returns a Promise that rejects).
+- a schema containing a missing reference is loaded, but the reference cannot be resolved.
+- schema (or some loaded/referenced schema) is invalid.
+
+The function compiles schema and loads the first missing schema (or meta-schema) until all missing schemas are loaded.
+
+You can asynchronously compile meta-schema by passing `true` as the second parameter.
+
+See example in [Asynchronous compilation](#asynchronous-schema-compilation).
+
+
+##### .validate(Object schema|String key|String ref, data) -&gt; Boolean
+
+Validate data using passed schema (it will be compiled and cached).
+
+Instead of the schema you can use the key that was previously passed to `addSchema`, the schema id if it was present in the schema or any previously resolved reference.
+
+Validation errors will be available in the `errors` property of Ajv instance (`null` if there were no errors).
+
+__Please note__: every time this method is called the errors are overwritten so you need to copy them to another variable if you want to use them later.
+
+If the schema is asynchronous (has `$async` keyword on the top level) this method returns a Promise. See [Asynchronous validation](#asynchronous-validation).
+
+
+##### .addSchema(Array&lt;Object&gt;|Object schema [, String key]) -&gt; Ajv
+
+Add schema(s) to validator instance. This method does not compile schemas (but it still validates them). Because of that dependencies can be added in any order and circular dependencies are supported. It also prevents unnecessary compilation of schemas that are containers for other schemas but not used as a whole.
+
+Array of schemas can be passed (schemas should have ids), the second parameter will be ignored.
+
+Key can be passed that can be used to reference the schema and will be used as the schema id if there is no id inside the schema. If the key is not passed, the schema id will be used as the key.
+
+
+Once the schema is added, it (and all the references inside it) can be referenced in other schemas and used to validate data.
+
+Although `addSchema` does not compile schemas, explicit compilation is not required - the schema will be compiled when it is used first time.
+
+By default the schema is validated against meta-schema before it is added, and if the schema does not pass validation the exception is thrown. This behaviour is controlled by `validateSchema` option.
+
+__Please note__: Ajv uses the [method chaining syntax](https://en.wikipedia.org/wiki/Method_chaining) for all methods with the prefix `add*` and `remove*`.
+This allows you to do nice things like the following.
+
+```javascript
+var validate = new Ajv().addSchema(schema).addFormat(name, regex).getSchema(uri);
+```
+
+##### .addMetaSchema(Array&lt;Object&gt;|Object schema [, String key]) -&gt; Ajv
+
+Adds meta schema(s) that can be used to validate other schemas. That function should be used instead of `addSchema` because there may be instance options that would compile a meta schema incorrectly (at the moment it is `removeAdditional` option).
+
+There is no need to explicitly add draft 6 meta schema (http://json-schema.org/draft-06/schema and http://json-schema.org/schema) - it is added by default, unless option `meta` is set to `false`. You only need to use it if you have a changed meta-schema that you want to use to validate your schemas. See `validateSchema`.
+
+
+##### <a name="api-validateschema"></a>.validateSchema(Object schema) -&gt; Boolean
+
+Validates schema. This method should be used to validate schemas rather than `validate` due to the inconsistency of `uri` format in JSON Schema standard.
+
+By default this method is called automatically when the schema is added, so you rarely need to use it directly.
+
+If schema doesn't have `$schema` property, it is validated against draft 6 meta-schema (option `meta` should not be false).
+
+If schema has `$schema` property, then the schema with this id (that should be previously added) is used to validate passed schema.
+
+Errors will be available at `ajv.errors`.
+
+
+##### .getSchema(String key) -&gt; Function&lt;Object data&gt;
+
+Retrieve compiled schema previously added with `addSchema` by the key passed to `addSchema` or by its full reference (id). The returned validating function has `schema` property with the reference to the original schema.
+
+
+##### .removeSchema([Object schema|String key|String ref|RegExp pattern]) -&gt; Ajv
+
+Remove added/cached schema. Even if schema is referenced by other schemas it can be safely removed as dependent schemas have local references.
+
+Schema can be removed using:
+- key passed to `addSchema`
+- it's full reference (id)
+- RegExp that should match schema id or key (meta-schemas won't be removed)
+- actual schema object that will be stable-stringified to remove schema from cache
+
+If no parameter is passed all schemas but meta-schemas will be removed and the cache will be cleared.
+
+
+##### <a name="api-addformat"></a>.addFormat(String name, String|RegExp|Function|Object format) -&gt; Ajv
+
+Add custom format to validate strings or numbers. It can also be used to replace pre-defined formats for Ajv instance.
+
+Strings are converted to RegExp.
+
+Function should return validation result as `true` or `false`.
+
+If object is passed it should have properties `validate`, `compare` and `async`:
+
+- _validate_: a string, RegExp or a function as described above.
+- _compare_: an optional comparison function that accepts two strings and compares them according to the format meaning. This function is used with keywords `formatMaximum`/`formatMinimum` (defined in [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package). It should return `1` if the first value is bigger than the second value, `-1` if it is smaller and `0` if it is equal.
+- _async_: an optional `true` value if `validate` is an asynchronous function; in this case it should return a promise that resolves with a value `true` or `false`.
+- _type_: an optional type of data that the format applies to. It can be `"string"` (default) or `"number"` (see https://github.com/epoberezkin/ajv/issues/291#issuecomment-259923858). If the type of data is different, the validation will pass.
+
+Custom formats can be also added via `formats` option.
+
+
+##### <a name="api-addkeyword"></a>.addKeyword(String keyword, Object definition) -&gt; Ajv
+
+Add custom validation keyword to Ajv instance.
+
+Keyword should be different from all standard JSON schema keywords and different from previously defined keywords. There is no way to redefine keywords or to remove keyword definition from the instance.
+
+Keyword must start with a letter, `_` or `$`, and may continue with letters, numbers, `_`, `$`, or `-`.
+It is recommended to use an application-specific prefix for keywords to avoid current and future name collisions.
+
+Example Keywords:
+- `"xyz-example"`: valid, and uses prefix for the xyz project to avoid name collisions.
+- `"example"`: valid, but not recommended as it could collide with future versions of JSON schema etc.
+- `"3-example"`: invalid as numbers are not allowed to be the first character in a keyword
+
+Keyword definition is an object with the following properties:
+
+- _type_: optional string or array of strings with data type(s) that the keyword applies to. If not present, the keyword will apply to all types.
+- _validate_: validating function
+- _compile_: compiling function
+- _macro_: macro function
+- _inline_: compiling function that returns code (as string)
+- _schema_: an optional `false` value used with "validate" keyword to not pass schema
+- _metaSchema_: an optional meta-schema for keyword schema
+- _modifying_: `true` MUST be passed if keyword modifies data
+- _valid_: pass `true`/`false` to pre-define validation result, the result returned from validation function will be ignored. This option cannot be used with macro keywords.
+- _$data_: an optional `true` value to support [$data reference](#data-reference) as the value of custom keyword. The reference will be resolved at validation time. If the keyword has meta-schema it would be extended to allow $data and it will be used to validate the resolved value. Supporting $data reference requires that keyword has validating function (as the only option or in addition to compile, macro or inline function).
+- _async_: an optional `true` value if the validation function is asynchronous (whether it is compiled or passed in _validate_ property); in this case it should return a promise that resolves with a value `true` or `false`. This option is ignored in case of "macro" and "inline" keywords.
+- _errors_: an optional boolean indicating whether keyword returns errors. If this property is not set Ajv will determine if the errors were set in case of failed validation.
+
+_compile_, _macro_ and _inline_ are mutually exclusive, only one should be used at a time. _validate_ can be used separately or in addition to them to support $data reference.
+
+__Please note__: If the keyword is validating data type that is different from the type(s) in its definition, the validation function will not be called (and expanded macro will not be used), so there is no need to check for data type inside validation function or inside schema returned by macro function (unless you want to enforce a specific type and for some reason do not want to use a separate `type` keyword for that). In the same way as standard keywords work, if the keyword does not apply to the data type being validated, the validation of this keyword will succeed.
+
+See [Defining custom keywords](#defining-custom-keywords) for more details.
+
+
+##### .getKeyword(String keyword) -&gt; Object|Boolean
+
+Returns custom keyword definition, `true` for pre-defined keywords and `false` if the keyword is unknown.
+
+
+##### .removeKeyword(String keyword) -&gt; Ajv
+
+Removes custom or pre-defined keyword so you can redefine them.
+
+While this method can be used to extend pre-defined keywords, it can also be used to completely change their meaning - it may lead to unexpected results.
+
+__Please note__: schemas compiled before the keyword is removed will continue to work without changes. To recompile schemas use `removeSchema` method and compile them again.
+
+
+##### .errorsText([Array&lt;Object&gt; errors [, Object options]]) -&gt; String
+
+Returns the text with all errors in a String.
+
+Options can have properties `separator` (string used to separate errors, ", " by default) and `dataVar` (the variable name that dataPaths are prefixed with, "data" by default).
+
+
+## Options
+
+Defaults:
+
+```javascript
+{
+ // validation and reporting options:
+ $data: false,
+ allErrors: false,
+ verbose: false,
+ jsonPointers: false,
+ uniqueItems: true,
+ unicode: true,
+ format: 'fast',
+ formats: {},
+ unknownFormats: true,
+ schemas: {},
+ logger: undefined,
+ // referenced schema options:
+ schemaId: undefined // recommended '$id'
+ missingRefs: true,
+ extendRefs: 'ignore', // recommended 'fail'
+ loadSchema: undefined, // function(uri: string): Promise {}
+ // options to modify validated data:
+ removeAdditional: false,
+ useDefaults: false,
+ coerceTypes: false,
+ // asynchronous validation options:
+ async: 'co*',
+ transpile: undefined, // requires ajv-async package
+ // advanced options:
+ meta: true,
+ validateSchema: true,
+ addUsedSchema: true,
+ inlineRefs: true,
+ passContext: false,
+ loopRequired: Infinity,
+ ownProperties: false,
+ multipleOfPrecision: false,
+ errorDataPath: 'object',
+ messages: true,
+ sourceCode: false,
+ processCode: undefined, // function (str: string): string {}
+ cache: new Cache,
+ serialize: undefined
+}
+```
+
+##### Validation and reporting options
+
+- _$data_: support [$data references](#data-reference). Draft 6 meta-schema that is added by default will be extended to allow them. If you want to use another meta-schema you need to use $dataMetaSchema method to add support for $data reference. See [API](#api).
+- _allErrors_: check all rules collecting all errors. Default is to return after the first error.
+- _verbose_: include the reference to the part of the schema (`schema` and `parentSchema`) and validated data in errors (false by default).
+- _jsonPointers_: set `dataPath` property of errors using [JSON Pointers](https://tools.ietf.org/html/rfc6901) instead of JavaScript property access notation.
+- _uniqueItems_: validate `uniqueItems` keyword (true by default).
+- _unicode_: calculate correct length of strings with unicode pairs (true by default). Pass `false` to use `.length` of strings that is faster, but gives "incorrect" lengths of strings with unicode pairs - each unicode pair is counted as two characters.
+- _format_: formats validation mode ('fast' by default). Pass 'full' for more correct and slow validation or `false` not to validate formats at all. E.g., 25:00:00 and 2015/14/33 will be invalid time and date in 'full' mode but it will be valid in 'fast' mode.
+- _formats_: an object with custom formats. Keys and values will be passed to `addFormat` method.
+- _unknownFormats_: handling of unknown formats. Option values:
+ - `true` (default) - if an unknown format is encountered the exception is thrown during schema compilation. If `format` keyword value is [$data reference](#data-reference) and it is unknown the validation will fail.
+ - `[String]` - an array of unknown format names that will be ignored. This option can be used to allow usage of third party schemas with format(s) for which you don't have definitions, but still fail if another unknown format is used. If `format` keyword value is [$data reference](#data-reference) and it is not in this array the validation will fail.
+ - `"ignore"` - to log warning during schema compilation and always pass validation (the default behaviour in versions before 5.0.0). This option is not recommended, as it allows to mistype format name and it won't be validated without any error message. This behaviour is required by JSON-schema specification.
+- _schemas_: an array or object of schemas that will be added to the instance. In case you pass the array the schemas must have IDs in them. When the object is passed the method `addSchema(value, key)` will be called for each schema in this object.
+- _logger_: sets the logging method. Default is the global `console` object that should have methods `log`, `warn` and `error`. Option values:
+ - custom logger - it should have methods `log`, `warn` and `error`. If any of these methods is missing an exception will be thrown.
+ - `false` - logging is disabled.
+
+
+##### Referenced schema options
+
+- _schemaId_: this option defines which keywords are used as schema URI. Option value:
+ - `"$id"` (recommended) - only use `$id` keyword as schema URI (as specified in JSON Schema draft-06), ignore `id` keyword (if it is present a warning will be logged).
+ - `"id"` - only use `id` keyword as schema URI (as specified in JSON Schema draft-04), ignore `$id` keyword (if it is present a warning will be logged).
+ - `undefined` (default) - use both `$id` and `id` keywords as schema URI. If both are present (in the same schema object) and different the exception will be thrown during schema compilation.
+- _missingRefs_: handling of missing referenced schemas. Option values:
+ - `true` (default) - if the reference cannot be resolved during compilation the exception is thrown. The thrown error has properties `missingRef` (with hash fragment) and `missingSchema` (without it). Both properties are resolved relative to the current base id (usually schema id, unless it was substituted).
+ - `"ignore"` - to log error during compilation and always pass validation.
+ - `"fail"` - to log error and successfully compile schema but fail validation if this rule is checked.
+- _extendRefs_: validation of other keywords when `$ref` is present in the schema. Option values:
+ - `"ignore"` (default) - when `$ref` is used other keywords are ignored (as per [JSON Reference](https://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03#section-3) standard). A warning will be logged during the schema compilation.
+ - `"fail"` (recommended) - if other validation keywords are used together with `$ref` the exception will be thrown when the schema is compiled. This option is recommended to make sure schema has no keywords that are ignored, which can be confusing.
+ - `true` - validate all keywords in the schemas with `$ref` (the default behaviour in versions before 5.0.0).
+- _loadSchema_: asynchronous function that will be used to load remote schemas when `compileAsync` [method](#api-compileAsync) is used and some reference is missing (option `missingRefs` should NOT be 'fail' or 'ignore'). This function should accept remote schema uri as a parameter and return a Promise that resolves to a schema. See example in [Asynchronous compilation](#asynchronous-schema-compilation).
+
+
+##### Options to modify validated data
+
+- _removeAdditional_: remove additional properties - see example in [Filtering data](#filtering-data). This option is not used if schema is added with `addMetaSchema` method. Option values:
+ - `false` (default) - not to remove additional properties
+ - `"all"` - all additional properties are removed, regardless of `additionalProperties` keyword in schema (and no validation is made for them).
+ - `true` - only additional properties with `additionalProperties` keyword equal to `false` are removed.
+ - `"failing"` - additional properties that fail schema validation will be removed (where `additionalProperties` keyword is `false` or schema).
+- _useDefaults_: replace missing properties and items with the values from corresponding `default` keywords. Default behaviour is to ignore `default` keywords. This option is not used if schema is added with `addMetaSchema` method. See examples in [Assigning defaults](#assigning-defaults). Option values:
+ - `false` (default) - do not use defaults
+ - `true` - insert defaults by value (safer and slower, object literal is used).
+ - `"shared"` - insert defaults by reference (faster). If the default is an object, it will be shared by all instances of validated data. If you modify the inserted default in the validated data, it will be modified in the schema as well.
+- _coerceTypes_: change data type of data to match `type` keyword. See the example in [Coercing data types](#coercing-data-types) and [coercion rules](https://github.com/epoberezkin/ajv/blob/master/COERCION.md). Option values:
+ - `false` (default) - no type coercion.
+ - `true` - coerce scalar data types.
+ - `"array"` - in addition to coercions between scalar types, coerce scalar data to an array with one element and vice versa (as required by the schema).
+
+
+##### Asynchronous validation options
+
+- _async_: determines how Ajv compiles asynchronous schemas (see [Asynchronous validation](#asynchronous-validation)) to functions. Option values:
+ - `"*"` / `"co*"` (default) - compile to generator function ("co*" - wrapped with `co.wrap`). If generators are not supported and you don't provide `processCode` option (or `transpile` option if you use [ajv-async](https://github.com/epoberezkin/ajv-async) package), the exception will be thrown when async schema is compiled.
+ - `"es7"` - compile to es7 async function. Unless your platform supports them you need to provide `processCode` or `transpile` option. According to [compatibility table](http://kangax.github.io/compat-table/es7/)) async functions are supported by:
+ - Firefox 52,
+ - Chrome 55,
+ - Node.js 7 (with `--harmony-async-await`),
+ - MS Edge 13 (with flag).
+ - `undefined`/`true` - auto-detect async mode. It requires [ajv-async](https://github.com/epoberezkin/ajv-async) package. If `transpile` option is not passed, ajv-async will choose the first of supported/installed async/transpile modes in this order:
+ - "es7" (native async functions),
+ - "co*" (native generators with co.wrap),
+ - "es7"/"nodent",
+ - "co*"/"regenerator" during the creation of the Ajv instance.
+
+ If none of the options is available the exception will be thrown.
+- _transpile_: Requires [ajv-async](https://github.com/epoberezkin/ajv-async) package. It determines whether Ajv transpiles compiled asynchronous validation function. Option values:
+ - `"nodent"` - transpile with [nodent](https://github.com/MatAtBread/nodent). If nodent is not installed, the exception will be thrown. nodent can only transpile es7 async functions; it will enforce this mode.
+ - `"regenerator"` - transpile with [regenerator](https://github.com/facebook/regenerator). If regenerator is not installed, the exception will be thrown.
+ - a function - this function should accept the code of validation function as a string and return transpiled code. This option allows you to use any other transpiler you prefer. If you are passing a function, you can simply pass it to `processCode` option without using ajv-async.
+
+
+##### Advanced options
+
+- _meta_: add [meta-schema](http://json-schema.org/documentation.html) so it can be used by other schemas (true by default). If an object is passed, it will be used as the default meta-schema for schemas that have no `$schema` keyword. This default meta-schema MUST have `$schema` keyword.
+- _validateSchema_: validate added/compiled schemas against meta-schema (true by default). `$schema` property in the schema can either be http://json-schema.org/schema or http://json-schema.org/draft-04/schema or absent (draft-4 meta-schema will be used) or can be a reference to the schema previously added with `addMetaSchema` method. Option values:
+ - `true` (default) - if the validation fails, throw the exception.
+ - `"log"` - if the validation fails, log error.
+ - `false` - skip schema validation.
+- _addUsedSchema_: by default methods `compile` and `validate` add schemas to the instance if they have `$id` (or `id`) property that doesn't start with "#". If `$id` is present and it is not unique the exception will be thrown. Set this option to `false` to skip adding schemas to the instance and the `$id` uniqueness check when these methods are used. This option does not affect `addSchema` method.
+- _inlineRefs_: Affects compilation of referenced schemas. Option values:
+ - `true` (default) - the referenced schemas that don't have refs in them are inlined, regardless of their size - that substantially improves performance at the cost of the bigger size of compiled schema functions.
+ - `false` - to not inline referenced schemas (they will be compiled as separate functions).
+ - integer number - to limit the maximum number of keywords of the schema that will be inlined.
+- _passContext_: pass validation context to custom keyword functions. If this option is `true` and you pass some context to the compiled validation function with `validate.call(context, data)`, the `context` will be available as `this` in your custom keywords. By default `this` is Ajv instance.
+- _loopRequired_: by default `required` keyword is compiled into a single expression (or a sequence of statements in `allErrors` mode). In case of a very large number of properties in this keyword it may result in a very big validation function. Pass integer to set the number of properties above which `required` keyword will be validated in a loop - smaller validation function size but also worse performance.
+- _ownProperties_: by default Ajv iterates over all enumerable object properties; when this option is `true` only own enumerable object properties (i.e. found directly on the object rather than on its prototype) are iterated. Contributed by @mbroadst.
+- _multipleOfPrecision_: by default `multipleOf` keyword is validated by comparing the result of division with parseInt() of that result. It works for dividers that are bigger than 1. For small dividers such as 0.01 the result of the division is usually not integer (even when it should be integer, see issue [#84](https://github.com/epoberezkin/ajv/issues/84)). If you need to use fractional dividers set this option to some positive integer N to have `multipleOf` validated using this formula: `Math.abs(Math.round(division) - division) < 1e-N` (it is slower but allows for float arithmetics deviations).
+- _errorDataPath_: set `dataPath` to point to 'object' (default) or to 'property' when validating keywords `required`, `additionalProperties` and `dependencies`.
+- _messages_: Include human-readable messages in errors. `true` by default. `false` can be passed when custom messages are used (e.g. with [ajv-i18n](https://github.com/epoberezkin/ajv-i18n)).
+- _sourceCode_: add `sourceCode` property to validating function (for debugging; this code can be different from the result of toString call).
+- _processCode_: an optional function to process generated code before it is passed to Function constructor. It can be used to either beautify (the validating function is generated without line-breaks) or to transpile code. Starting from version 5.0.0 this option replaced options:
+ - `beautify` that formatted the generated function using [js-beautify](https://github.com/beautify-web/js-beautify). If you want to beautify the generated code pass `require('js-beautify').js_beautify`.
+ - `transpile` that transpiled asynchronous validation function. You can still use `transpile` option with [ajv-async](https://github.com/epoberezkin/ajv-async) package. See [Asynchronous validation](#asynchronous-validation) for more information.
+- _cache_: an optional instance of cache to store compiled schemas using stable-stringified schema as a key. For example, set-associative cache [sacjs](https://github.com/epoberezkin/sacjs) can be used. If not passed then a simple hash is used which is good enough for the common use case (a limited number of statically defined schemas). Cache should have methods `put(key, value)`, `get(key)`, `del(key)` and `clear()`.
+- _serialize_: an optional function to serialize schema to cache key. Pass `false` to use schema itself as a key (e.g., if WeakMap used as a cache). By default [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used.
+
+
+## Validation errors
+
+In case of validation failure, Ajv assigns the array of errors to `errors` property of validation function (or to `errors` property of Ajv instance when `validate` or `validateSchema` methods were called). In case of [asynchronous validation](#asynchronous-validation), the returned promise is rejected with exception `Ajv.ValidationError` that has `errors` property.
+
+
+### Error objects
+
+Each error is an object with the following properties:
+
+- _keyword_: validation keyword.
+- _dataPath_: the path to the part of the data that was validated. By default `dataPath` uses JavaScript property access notation (e.g., `".prop[1].subProp"`). When the option `jsonPointers` is true (see [Options](#options)) `dataPath` will be set using JSON pointer standard (e.g., `"/prop/1/subProp"`).
+- _schemaPath_: the path (JSON-pointer as a URI fragment) to the schema of the keyword that failed validation.
+- _params_: the object with the additional information about error that can be used to create custom error messages (e.g., using [ajv-i18n](https://github.com/epoberezkin/ajv-i18n) package). See below for parameters set by all keywords.
+- _message_: the standard error message (can be excluded with option `messages` set to false).
+- _schema_: the schema of the keyword (added with `verbose` option).
+- _parentSchema_: the schema containing the keyword (added with `verbose` option)
+- _data_: the data validated by the keyword (added with `verbose` option).
+
+__Please note__: `propertyNames` keyword schema validation errors have an additional property `propertyName`, `dataPath` points to the object. After schema validation for each property name, if it is invalid an additional error is added with the property `keyword` equal to `"propertyNames"`.
+
+
+### Error parameters
+
+Properties of `params` object in errors depend on the keyword that failed validation.
+
+- `maxItems`, `minItems`, `maxLength`, `minLength`, `maxProperties`, `minProperties` - property `limit` (number, the schema of the keyword).
+- `additionalItems` - property `limit` (the maximum number of allowed items in case when `items` keyword is an array of schemas and `additionalItems` is false).
+- `additionalProperties` - property `additionalProperty` (the property not used in `properties` and `patternProperties` keywords).
+- `dependencies` - properties:
+ - `property` (dependent property),
+ - `missingProperty` (required missing dependency - only the first one is reported currently)
+ - `deps` (required dependencies, comma separated list as a string),
+ - `depsCount` (the number of required dependencies).
+- `format` - property `format` (the schema of the keyword).
+- `maximum`, `minimum` - properties:
+ - `limit` (number, the schema of the keyword),
+ - `exclusive` (boolean, the schema of `exclusiveMaximum` or `exclusiveMinimum`),
+ - `comparison` (string, comparison operation to compare the data to the limit, with the data on the left and the limit on the right; can be "<", "<=", ">", ">=")
+- `multipleOf` - property `multipleOf` (the schema of the keyword)
+- `pattern` - property `pattern` (the schema of the keyword)
+- `required` - property `missingProperty` (required property that is missing).
+- `propertyNames` - property `propertyName` (an invalid property name).
+- `patternRequired` (in ajv-keywords) - property `missingPattern` (required pattern that did not match any property).
+- `type` - property `type` (required type(s), a string, can be a comma-separated list)
+- `uniqueItems` - properties `i` and `j` (indices of duplicate items).
+- `enum` - property `allowedValues` pointing to the array of values (the schema of the keyword).
+- `$ref` - property `ref` with the referenced schema URI.
+- custom keywords (in case keyword definition doesn't create errors) - property `keyword` (the keyword name).
+
+
+## Related packages
+
+- [ajv-async](https://github.com/epoberezkin/ajv-async) - configure async validation mode
+- [ajv-cli](https://github.com/jessedc/ajv-cli) - command line interface
+- [ajv-errors](https://github.com/epoberezkin/ajv-errors) - custom error messages
+- [ajv-i18n](https://github.com/epoberezkin/ajv-i18n) - internationalised error messages
+- [ajv-istanbul](https://github.com/epoberezkin/ajv-istanbul) - instrument generated validation code to measure test coverage of your schemas
+- [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) - custom validation keywords (if/then/else, select, typeof, etc.)
+- [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) - keywords $merge and $patch
+- [ajv-pack](https://github.com/epoberezkin/ajv-pack) - produces a compact module exporting validation functions
+
+
+## Some packages using Ajv
+
+- [webpack](https://github.com/webpack/webpack) - a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser
+- [jsonscript-js](https://github.com/JSONScript/jsonscript-js) - the interpreter for [JSONScript](http://www.jsonscript.org) - scripted processing of existing endpoints and services
+- [osprey-method-handler](https://github.com/mulesoft-labs/osprey-method-handler) - Express middleware for validating requests and responses based on a RAML method object, used in [osprey](https://github.com/mulesoft/osprey) - validating API proxy generated from a RAML definition
+- [har-validator](https://github.com/ahmadnassri/har-validator) - HTTP Archive (HAR) validator
+- [jsoneditor](https://github.com/josdejong/jsoneditor) - a web-based tool to view, edit, format, and validate JSON http://jsoneditoronline.org
+- [JSON Schema Lint](https://github.com/nickcmaynard/jsonschemalint) - a web tool to validate JSON/YAML document against a single JSON-schema http://jsonschemalint.com
+- [objection](https://github.com/vincit/objection.js) - SQL-friendly ORM for Node.js
+- [table](https://github.com/gajus/table) - formats data into a string table
+- [ripple-lib](https://github.com/ripple/ripple-lib) - a JavaScript API for interacting with [Ripple](https://ripple.com) in Node.js and the browser
+- [restbase](https://github.com/wikimedia/restbase) - distributed storage with REST API & dispatcher for backend services built to provide a low-latency & high-throughput API for Wikipedia / Wikimedia content
+- [hippie-swagger](https://github.com/CacheControl/hippie-swagger) - [Hippie](https://github.com/vesln/hippie) wrapper that provides end to end API testing with swagger validation
+- [react-form-controlled](https://github.com/seeden/react-form-controlled) - React controlled form components with validation
+- [rabbitmq-schema](https://github.com/tjmehta/rabbitmq-schema) - a schema definition module for RabbitMQ graphs and messages
+- [@query/schema](https://www.npmjs.com/package/@query/schema) - stream filtering with a URI-safe query syntax parsing to JSON Schema
+- [chai-ajv-json-schema](https://github.com/peon374/chai-ajv-json-schema) - chai plugin to us JSON-schema with expect in mocha tests
+- [grunt-jsonschema-ajv](https://github.com/SignpostMarv/grunt-jsonschema-ajv) - Grunt plugin for validating files against JSON Schema
+- [extract-text-webpack-plugin](https://github.com/webpack-contrib/extract-text-webpack-plugin) - extract text from bundle into a file
+- [electron-builder](https://github.com/electron-userland/electron-builder) - a solution to package and build a ready for distribution Electron app
+- [addons-linter](https://github.com/mozilla/addons-linter) - Mozilla Add-ons Linter
+- [gh-pages-generator](https://github.com/epoberezkin/gh-pages-generator) - multi-page site generator converting markdown files to GitHub pages
+
+
+## Tests
+
+```
+npm install
+git submodule update --init
+npm test
+```
+
+## Contributing
+
+All validation functions are generated using doT templates in [dot](https://github.com/epoberezkin/ajv/tree/master/lib/dot) folder. Templates are precompiled so doT is not a run-time dependency.
+
+`npm run build` - compiles templates to [dotjs](https://github.com/epoberezkin/ajv/tree/master/lib/dotjs) folder.
+
+`npm run watch` - automatically compiles templates when files in dot folder change
+
+Please see [Contributing guidelines](https://github.com/epoberezkin/ajv/blob/master/CONTRIBUTING.md)
+
+
+## Changes history
+
+See https://github.com/epoberezkin/ajv/releases
+
+__Please note__: [Changes in version 5.0.0](https://github.com/epoberezkin/ajv/releases/tag/5.0.0).
+
+[Changes in version 4.6.0](https://github.com/epoberezkin/ajv/releases/tag/4.6.0).
+
+[Changes in version 4.0.0](https://github.com/epoberezkin/ajv/releases/tag/4.0.0).
+
+[Changes in version 3.0.0](https://github.com/epoberezkin/ajv/releases/tag/3.0.0).
+
+[Changes in version 2.0.0](https://github.com/epoberezkin/ajv/releases/tag/2.0.0).
+
+
+## License
+
+[MIT](https://github.com/epoberezkin/ajv/blob/master/LICENSE)
diff --git a/tools/node_modules/eslint/node_modules/ajv/dist/ajv.bundle.js b/tools/node_modules/eslint/node_modules/ajv/dist/ajv.bundle.js
new file mode 100644
index 0000000000..ee5623cb19
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/dist/ajv.bundle.js
@@ -0,0 +1,7345 @@
+(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.Ajv = 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<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
+'use strict';
+
+var KEYWORDS = [
+ 'multipleOf',
+ 'maximum',
+ 'exclusiveMaximum',
+ 'minimum',
+ 'exclusiveMinimum',
+ 'maxLength',
+ 'minLength',
+ 'pattern',
+ 'additionalItems',
+ 'maxItems',
+ 'minItems',
+ 'uniqueItems',
+ 'maxProperties',
+ 'minProperties',
+ 'required',
+ 'additionalProperties',
+ 'enum',
+ 'format',
+ 'const'
+];
+
+module.exports = function (metaSchema, keywordsJsonPointers) {
+ for (var i=0; i<keywordsJsonPointers.length; i++) {
+ metaSchema = JSON.parse(JSON.stringify(metaSchema));
+ var segments = keywordsJsonPointers[i].split('/');
+ var keywords = metaSchema;
+ var j;
+ for (j=1; j<segments.length; j++)
+ keywords = keywords[segments[j]];
+
+ for (j=0; j<KEYWORDS.length; j++) {
+ var key = KEYWORDS[j];
+ var schema = keywords[key];
+ if (schema) {
+ keywords[key] = {
+ anyOf: [
+ schema,
+ { $ref: 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#' }
+ ]
+ };
+ }
+ }
+ }
+
+ return metaSchema;
+};
+
+},{}],2:[function(require,module,exports){
+'use strict';
+
+
+var Cache = module.exports = function Cache() {
+ this._cache = {};
+};
+
+
+Cache.prototype.put = function Cache_put(key, value) {
+ this._cache[key] = value;
+};
+
+
+Cache.prototype.get = function Cache_get(key) {
+ return this._cache[key];
+};
+
+
+Cache.prototype.del = function Cache_del(key) {
+ delete this._cache[key];
+};
+
+
+Cache.prototype.clear = function Cache_clear() {
+ this._cache = {};
+};
+
+},{}],3:[function(require,module,exports){
+'use strict';
+
+//all requires must be explicit because browserify won't work with dynamic requires
+module.exports = {
+ '$ref': require('../dotjs/ref'),
+ allOf: require('../dotjs/allOf'),
+ anyOf: require('../dotjs/anyOf'),
+ const: require('../dotjs/const'),
+ contains: require('../dotjs/contains'),
+ dependencies: require('../dotjs/dependencies'),
+ 'enum': require('../dotjs/enum'),
+ format: require('../dotjs/format'),
+ items: require('../dotjs/items'),
+ maximum: require('../dotjs/_limit'),
+ minimum: require('../dotjs/_limit'),
+ maxItems: require('../dotjs/_limitItems'),
+ minItems: require('../dotjs/_limitItems'),
+ maxLength: require('../dotjs/_limitLength'),
+ minLength: require('../dotjs/_limitLength'),
+ maxProperties: require('../dotjs/_limitProperties'),
+ minProperties: require('../dotjs/_limitProperties'),
+ multipleOf: require('../dotjs/multipleOf'),
+ not: require('../dotjs/not'),
+ oneOf: require('../dotjs/oneOf'),
+ pattern: require('../dotjs/pattern'),
+ properties: require('../dotjs/properties'),
+ propertyNames: require('../dotjs/propertyNames'),
+ required: require('../dotjs/required'),
+ uniqueItems: require('../dotjs/uniqueItems'),
+ validate: require('../dotjs/validate')
+};
+
+},{"../dotjs/_limit":13,"../dotjs/_limitItems":14,"../dotjs/_limitLength":15,"../dotjs/_limitProperties":16,"../dotjs/allOf":17,"../dotjs/anyOf":18,"../dotjs/const":19,"../dotjs/contains":20,"../dotjs/dependencies":22,"../dotjs/enum":23,"../dotjs/format":24,"../dotjs/items":25,"../dotjs/multipleOf":26,"../dotjs/not":27,"../dotjs/oneOf":28,"../dotjs/pattern":29,"../dotjs/properties":30,"../dotjs/propertyNames":31,"../dotjs/ref":32,"../dotjs/required":33,"../dotjs/uniqueItems":34,"../dotjs/validate":35}],4:[function(require,module,exports){
+'use strict';
+
+var MissingRefError = require('./error_classes').MissingRef;
+
+module.exports = compileAsync;
+
+
+/**
+ * Creates validating function for passed schema with asynchronous loading of missing schemas.
+ * `loadSchema` option should be a function that accepts schema uri and returns promise that resolves with the schema.
+ * @this Ajv
+ * @param {Object} schema schema object
+ * @param {Boolean} meta optional true to compile meta-schema; this parameter can be skipped
+ * @param {Function} callback an optional node-style callback, it is called with 2 parameters: error (or null) and validating function.
+ * @return {Promise} promise that resolves with a validating function.
+ */
+function compileAsync(schema, meta, callback) {
+ /* eslint no-shadow: 0 */
+ /* global Promise */
+ /* jshint validthis: true */
+ var self = this;
+ if (typeof this._opts.loadSchema != 'function')
+ throw new Error('options.loadSchema should be a function');
+
+ if (typeof meta == 'function') {
+ callback = meta;
+ meta = undefined;
+ }
+
+ var p = loadMetaSchemaOf(schema).then(function () {
+ var schemaObj = self._addSchema(schema, undefined, meta);
+ return schemaObj.validate || _compileAsync(schemaObj);
+ });
+
+ if (callback) {
+ p.then(
+ function(v) { callback(null, v); },
+ callback
+ );
+ }
+
+ return p;
+
+
+ function loadMetaSchemaOf(sch) {
+ var $schema = sch.$schema;
+ return $schema && !self.getSchema($schema)
+ ? compileAsync.call(self, { $ref: $schema }, true)
+ : Promise.resolve();
+ }
+
+
+ function _compileAsync(schemaObj) {
+ try { return self._compile(schemaObj); }
+ catch(e) {
+ if (e instanceof MissingRefError) return loadMissingSchema(e);
+ throw e;
+ }
+
+
+ function loadMissingSchema(e) {
+ var ref = e.missingSchema;
+ if (added(ref)) throw new Error('Schema ' + ref + ' is loaded but ' + e.missingRef + ' cannot be resolved');
+
+ var schemaPromise = self._loadingSchemas[ref];
+ if (!schemaPromise) {
+ schemaPromise = self._loadingSchemas[ref] = self._opts.loadSchema(ref);
+ schemaPromise.then(removePromise, removePromise);
+ }
+
+ return schemaPromise.then(function (sch) {
+ if (!added(ref)) {
+ return loadMetaSchemaOf(sch).then(function () {
+ if (!added(ref)) self.addSchema(sch, ref, undefined, meta);
+ });
+ }
+ }).then(function() {
+ return _compileAsync(schemaObj);
+ });
+
+ function removePromise() {
+ delete self._loadingSchemas[ref];
+ }
+
+ function added(ref) {
+ return self._refs[ref] || self._schemas[ref];
+ }
+ }
+ }
+}
+
+},{"./error_classes":5}],5:[function(require,module,exports){
+'use strict';
+
+var resolve = require('./resolve');
+
+module.exports = {
+ Validation: errorSubclass(ValidationError),
+ MissingRef: errorSubclass(MissingRefError)
+};
+
+
+function ValidationError(errors) {
+ this.message = 'validation failed';
+ this.errors = errors;
+ this.ajv = this.validation = true;
+}
+
+
+MissingRefError.message = function (baseId, ref) {
+ return 'can\'t resolve reference ' + ref + ' from id ' + baseId;
+};
+
+
+function MissingRefError(baseId, ref, message) {
+ this.message = message || MissingRefError.message(baseId, ref);
+ this.missingRef = resolve.url(baseId, ref);
+ this.missingSchema = resolve.normalizeId(resolve.fullPath(this.missingRef));
+}
+
+
+function errorSubclass(Subclass) {
+ Subclass.prototype = Object.create(Error.prototype);
+ Subclass.prototype.constructor = Subclass;
+ return Subclass;
+}
+
+},{"./resolve":8}],6:[function(require,module,exports){
+'use strict';
+
+var util = require('./util');
+
+var DATE = /^\d\d\d\d-(\d\d)-(\d\d)$/;
+var DAYS = [0,31,29,31,30,31,30,31,31,30,31,30,31];
+var TIME = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d:\d\d)?$/i;
+var HOSTNAME = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*$/i;
+var URI = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
+var URIREF = /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
+// uri-template: https://tools.ietf.org/html/rfc6570
+var URITEMPLATE = /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i;
+// For the source: https://gist.github.com/dperini/729294
+// For test cases: https://mathiasbynens.be/demo/url-regex
+// @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983.
+// var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu;
+var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i;
+var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;
+var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$|^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;
+var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;
+
+
+module.exports = formats;
+
+function formats(mode) {
+ mode = mode == 'full' ? 'full' : 'fast';
+ return util.copy(formats[mode]);
+}
+
+
+formats.fast = {
+ // date: http://tools.ietf.org/html/rfc3339#section-5.6
+ date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/,
+ // date-time: http://tools.ietf.org/html/rfc3339#section-5.6
+ time: /^[0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,
+ 'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s][0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i,
+ // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js
+ uri: /^(?:[a-z][a-z0-9+-.]*)(?::|\/)\/?[^\s]*$/i,
+ 'uri-reference': /^(?:(?:[a-z][a-z0-9+-.]*:)?\/\/)?[^\s]*$/i,
+ 'uri-template': URITEMPLATE,
+ url: URL,
+ // email (sources from jsen validator):
+ // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363
+ // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation')
+ email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,
+ hostname: HOSTNAME,
+ // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html
+ ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,
+ // optimized http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses
+ ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,
+ regex: regex,
+ // uuid: http://tools.ietf.org/html/rfc4122
+ uuid: UUID,
+ // JSON-pointer: https://tools.ietf.org/html/rfc6901
+ // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A
+ 'json-pointer': JSON_POINTER,
+ // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00
+ 'relative-json-pointer': RELATIVE_JSON_POINTER
+};
+
+
+formats.full = {
+ date: date,
+ time: time,
+ 'date-time': date_time,
+ uri: uri,
+ 'uri-reference': URIREF,
+ 'uri-template': URITEMPLATE,
+ url: URL,
+ email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&''*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,
+ hostname: hostname,
+ ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,
+ ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,
+ regex: regex,
+ uuid: UUID,
+ 'json-pointer': JSON_POINTER,
+ 'relative-json-pointer': RELATIVE_JSON_POINTER
+};
+
+
+function date(str) {
+ // full-date from http://tools.ietf.org/html/rfc3339#section-5.6
+ var matches = str.match(DATE);
+ if (!matches) return false;
+
+ var month = +matches[1];
+ var day = +matches[2];
+ return month >= 1 && month <= 12 && day >= 1 && day <= DAYS[month];
+}
+
+
+function time(str, full) {
+ var matches = str.match(TIME);
+ if (!matches) return false;
+
+ var hour = matches[1];
+ var minute = matches[2];
+ var second = matches[3];
+ var timeZone = matches[5];
+ return hour <= 23 && minute <= 59 && second <= 59 && (!full || timeZone);
+}
+
+
+var DATE_TIME_SEPARATOR = /t|\s/i;
+function date_time(str) {
+ // http://tools.ietf.org/html/rfc3339#section-5.6
+ var dateTime = str.split(DATE_TIME_SEPARATOR);
+ return dateTime.length == 2 && date(dateTime[0]) && time(dateTime[1], true);
+}
+
+
+function hostname(str) {
+ // https://tools.ietf.org/html/rfc1034#section-3.5
+ // https://tools.ietf.org/html/rfc1123#section-2
+ return str.length <= 255 && HOSTNAME.test(str);
+}
+
+
+var NOT_URI_FRAGMENT = /\/|:/;
+function uri(str) {
+ // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "."
+ return NOT_URI_FRAGMENT.test(str) && URI.test(str);
+}
+
+
+var Z_ANCHOR = /[^\\]\\Z/;
+function regex(str) {
+ if (Z_ANCHOR.test(str)) return false;
+ try {
+ new RegExp(str);
+ return true;
+ } catch(e) {
+ return false;
+ }
+}
+
+},{"./util":12}],7:[function(require,module,exports){
+'use strict';
+
+var resolve = require('./resolve')
+ , util = require('./util')
+ , errorClasses = require('./error_classes')
+ , stableStringify = require('fast-json-stable-stringify');
+
+var validateGenerator = require('../dotjs/validate');
+
+/**
+ * Functions below are used inside compiled validations function
+ */
+
+var co = require('co');
+var ucs2length = util.ucs2length;
+var equal = require('fast-deep-equal');
+
+// this error is thrown by async schemas to return validation errors via exception
+var ValidationError = errorClasses.Validation;
+
+module.exports = compile;
+
+
+/**
+ * Compiles schema to validation function
+ * @this Ajv
+ * @param {Object} schema schema object
+ * @param {Object} root object with information about the root schema for this schema
+ * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution
+ * @param {String} baseId base ID for IDs in the schema
+ * @return {Function} validation function
+ */
+function compile(schema, root, localRefs, baseId) {
+ /* jshint validthis: true, evil: true */
+ /* eslint no-shadow: 0 */
+ var self = this
+ , opts = this._opts
+ , refVal = [ undefined ]
+ , refs = {}
+ , patterns = []
+ , patternsHash = {}
+ , defaults = []
+ , defaultsHash = {}
+ , customRules = [];
+
+ root = root || { schema: schema, refVal: refVal, refs: refs };
+
+ var c = checkCompiling.call(this, schema, root, baseId);
+ var compilation = this._compilations[c.index];
+ if (c.compiling) return (compilation.callValidate = callValidate);
+
+ var formats = this._formats;
+ var RULES = this.RULES;
+
+ try {
+ var v = localCompile(schema, root, localRefs, baseId);
+ compilation.validate = v;
+ var cv = compilation.callValidate;
+ if (cv) {
+ cv.schema = v.schema;
+ cv.errors = null;
+ cv.refs = v.refs;
+ cv.refVal = v.refVal;
+ cv.root = v.root;
+ cv.$async = v.$async;
+ if (opts.sourceCode) cv.source = v.source;
+ }
+ return v;
+ } finally {
+ endCompiling.call(this, schema, root, baseId);
+ }
+
+ function callValidate() {
+ var validate = compilation.validate;
+ var result = validate.apply(null, arguments);
+ callValidate.errors = validate.errors;
+ return result;
+ }
+
+ function localCompile(_schema, _root, localRefs, baseId) {
+ var isRoot = !_root || (_root && _root.schema == _schema);
+ if (_root.schema != root.schema)
+ return compile.call(self, _schema, _root, localRefs, baseId);
+
+ var $async = _schema.$async === true;
+
+ var sourceCode = validateGenerator({
+ isTop: true,
+ schema: _schema,
+ isRoot: isRoot,
+ baseId: baseId,
+ root: _root,
+ schemaPath: '',
+ errSchemaPath: '#',
+ errorPath: '""',
+ MissingRefError: errorClasses.MissingRef,
+ RULES: RULES,
+ validate: validateGenerator,
+ util: util,
+ resolve: resolve,
+ resolveRef: resolveRef,
+ usePattern: usePattern,
+ useDefault: useDefault,
+ useCustomRule: useCustomRule,
+ opts: opts,
+ formats: formats,
+ logger: self.logger,
+ self: self
+ });
+
+ sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode)
+ + vars(defaults, defaultCode) + vars(customRules, customRuleCode)
+ + sourceCode;
+
+ if (opts.processCode) sourceCode = opts.processCode(sourceCode);
+ // console.log('\n\n\n *** \n', JSON.stringify(sourceCode));
+ var validate;
+ try {
+ var makeValidate = new Function(
+ 'self',
+ 'RULES',
+ 'formats',
+ 'root',
+ 'refVal',
+ 'defaults',
+ 'customRules',
+ 'co',
+ 'equal',
+ 'ucs2length',
+ 'ValidationError',
+ sourceCode
+ );
+
+ validate = makeValidate(
+ self,
+ RULES,
+ formats,
+ root,
+ refVal,
+ defaults,
+ customRules,
+ co,
+ equal,
+ ucs2length,
+ ValidationError
+ );
+
+ refVal[0] = validate;
+ } catch(e) {
+ self.logger.error('Error compiling schema, function code:', sourceCode);
+ throw e;
+ }
+
+ validate.schema = _schema;
+ validate.errors = null;
+ validate.refs = refs;
+ validate.refVal = refVal;
+ validate.root = isRoot ? validate : _root;
+ if ($async) validate.$async = true;
+ if (opts.sourceCode === true) {
+ validate.source = {
+ code: sourceCode,
+ patterns: patterns,
+ defaults: defaults
+ };
+ }
+
+ return validate;
+ }
+
+ function resolveRef(baseId, ref, isRoot) {
+ ref = resolve.url(baseId, ref);
+ var refIndex = refs[ref];
+ var _refVal, refCode;
+ if (refIndex !== undefined) {
+ _refVal = refVal[refIndex];
+ refCode = 'refVal[' + refIndex + ']';
+ return resolvedRef(_refVal, refCode);
+ }
+ if (!isRoot && root.refs) {
+ var rootRefId = root.refs[ref];
+ if (rootRefId !== undefined) {
+ _refVal = root.refVal[rootRefId];
+ refCode = addLocalRef(ref, _refVal);
+ return resolvedRef(_refVal, refCode);
+ }
+ }
+
+ refCode = addLocalRef(ref);
+ var v = resolve.call(self, localCompile, root, ref);
+ if (v === undefined) {
+ var localSchema = localRefs && localRefs[ref];
+ if (localSchema) {
+ v = resolve.inlineRef(localSchema, opts.inlineRefs)
+ ? localSchema
+ : compile.call(self, localSchema, root, localRefs, baseId);
+ }
+ }
+
+ if (v === undefined) {
+ removeLocalRef(ref);
+ } else {
+ replaceLocalRef(ref, v);
+ return resolvedRef(v, refCode);
+ }
+ }
+
+ function addLocalRef(ref, v) {
+ var refId = refVal.length;
+ refVal[refId] = v;
+ refs[ref] = refId;
+ return 'refVal' + refId;
+ }
+
+ function removeLocalRef(ref) {
+ delete refs[ref];
+ }
+
+ function replaceLocalRef(ref, v) {
+ var refId = refs[ref];
+ refVal[refId] = v;
+ }
+
+ function resolvedRef(refVal, code) {
+ return typeof refVal == 'object' || typeof refVal == 'boolean'
+ ? { code: code, schema: refVal, inline: true }
+ : { code: code, $async: refVal && refVal.$async };
+ }
+
+ function usePattern(regexStr) {
+ var index = patternsHash[regexStr];
+ if (index === undefined) {
+ index = patternsHash[regexStr] = patterns.length;
+ patterns[index] = regexStr;
+ }
+ return 'pattern' + index;
+ }
+
+ function useDefault(value) {
+ switch (typeof value) {
+ case 'boolean':
+ case 'number':
+ return '' + value;
+ case 'string':
+ return util.toQuotedString(value);
+ case 'object':
+ if (value === null) return 'null';
+ var valueStr = stableStringify(value);
+ var index = defaultsHash[valueStr];
+ if (index === undefined) {
+ index = defaultsHash[valueStr] = defaults.length;
+ defaults[index] = value;
+ }
+ return 'default' + index;
+ }
+ }
+
+ function useCustomRule(rule, schema, parentSchema, it) {
+ var validateSchema = rule.definition.validateSchema;
+ if (validateSchema && self._opts.validateSchema !== false) {
+ var valid = validateSchema(schema);
+ if (!valid) {
+ var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors);
+ if (self._opts.validateSchema == 'log') self.logger.error(message);
+ else throw new Error(message);
+ }
+ }
+
+ var compile = rule.definition.compile
+ , inline = rule.definition.inline
+ , macro = rule.definition.macro;
+
+ var validate;
+ if (compile) {
+ validate = compile.call(self, schema, parentSchema, it);
+ } else if (macro) {
+ validate = macro.call(self, schema, parentSchema, it);
+ if (opts.validateSchema !== false) self.validateSchema(validate, true);
+ } else if (inline) {
+ validate = inline.call(self, it, rule.keyword, schema, parentSchema);
+ } else {
+ validate = rule.definition.validate;
+ if (!validate) return;
+ }
+
+ if (validate === undefined)
+ throw new Error('custom keyword "' + rule.keyword + '"failed to compile');
+
+ var index = customRules.length;
+ customRules[index] = validate;
+
+ return {
+ code: 'customRule' + index,
+ validate: validate
+ };
+ }
+}
+
+
+/**
+ * Checks if the schema is currently compiled
+ * @this Ajv
+ * @param {Object} schema schema to compile
+ * @param {Object} root root object
+ * @param {String} baseId base schema ID
+ * @return {Object} object with properties "index" (compilation index) and "compiling" (boolean)
+ */
+function checkCompiling(schema, root, baseId) {
+ /* jshint validthis: true */
+ var index = compIndex.call(this, schema, root, baseId);
+ if (index >= 0) return { index: index, compiling: true };
+ index = this._compilations.length;
+ this._compilations[index] = {
+ schema: schema,
+ root: root,
+ baseId: baseId
+ };
+ return { index: index, compiling: false };
+}
+
+
+/**
+ * Removes the schema from the currently compiled list
+ * @this Ajv
+ * @param {Object} schema schema to compile
+ * @param {Object} root root object
+ * @param {String} baseId base schema ID
+ */
+function endCompiling(schema, root, baseId) {
+ /* jshint validthis: true */
+ var i = compIndex.call(this, schema, root, baseId);
+ if (i >= 0) this._compilations.splice(i, 1);
+}
+
+
+/**
+ * Index of schema compilation in the currently compiled list
+ * @this Ajv
+ * @param {Object} schema schema to compile
+ * @param {Object} root root object
+ * @param {String} baseId base schema ID
+ * @return {Integer} compilation index
+ */
+function compIndex(schema, root, baseId) {
+ /* jshint validthis: true */
+ for (var i=0; i<this._compilations.length; i++) {
+ var c = this._compilations[i];
+ if (c.schema == schema && c.root == root && c.baseId == baseId) return i;
+ }
+ return -1;
+}
+
+
+function patternCode(i, patterns) {
+ return 'var pattern' + i + ' = new RegExp(' + util.toQuotedString(patterns[i]) + ');';
+}
+
+
+function defaultCode(i) {
+ return 'var default' + i + ' = defaults[' + i + '];';
+}
+
+
+function refValCode(i, refVal) {
+ return refVal[i] === undefined ? '' : 'var refVal' + i + ' = refVal[' + i + '];';
+}
+
+
+function customRuleCode(i) {
+ return 'var customRule' + i + ' = customRules[' + i + '];';
+}
+
+
+function vars(arr, statement) {
+ if (!arr.length) return '';
+ var code = '';
+ for (var i=0; i<arr.length; i++)
+ code += statement(i, arr);
+ return code;
+}
+
+},{"../dotjs/validate":35,"./error_classes":5,"./resolve":8,"./util":12,"co":40,"fast-deep-equal":41,"fast-json-stable-stringify":42}],8:[function(require,module,exports){
+'use strict';
+
+var url = require('url')
+ , equal = require('fast-deep-equal')
+ , util = require('./util')
+ , SchemaObject = require('./schema_obj')
+ , traverse = require('json-schema-traverse');
+
+module.exports = resolve;
+
+resolve.normalizeId = normalizeId;
+resolve.fullPath = getFullPath;
+resolve.url = resolveUrl;
+resolve.ids = resolveIds;
+resolve.inlineRef = inlineRef;
+resolve.schema = resolveSchema;
+
+/**
+ * [resolve and compile the references ($ref)]
+ * @this Ajv
+ * @param {Function} compile reference to schema compilation funciton (localCompile)
+ * @param {Object} root object with information about the root schema for the current schema
+ * @param {String} ref reference to resolve
+ * @return {Object|Function} schema object (if the schema can be inlined) or validation function
+ */
+function resolve(compile, root, ref) {
+ /* jshint validthis: true */
+ var refVal = this._refs[ref];
+ if (typeof refVal == 'string') {
+ if (this._refs[refVal]) refVal = this._refs[refVal];
+ else return resolve.call(this, compile, root, refVal);
+ }
+
+ refVal = refVal || this._schemas[ref];
+ if (refVal instanceof SchemaObject) {
+ return inlineRef(refVal.schema, this._opts.inlineRefs)
+ ? refVal.schema
+ : refVal.validate || this._compile(refVal);
+ }
+
+ var res = resolveSchema.call(this, root, ref);
+ var schema, v, baseId;
+ if (res) {
+ schema = res.schema;
+ root = res.root;
+ baseId = res.baseId;
+ }
+
+ if (schema instanceof SchemaObject) {
+ v = schema.validate || compile.call(this, schema.schema, root, undefined, baseId);
+ } else if (schema !== undefined) {
+ v = inlineRef(schema, this._opts.inlineRefs)
+ ? schema
+ : compile.call(this, schema, root, undefined, baseId);
+ }
+
+ return v;
+}
+
+
+/**
+ * Resolve schema, its root and baseId
+ * @this Ajv
+ * @param {Object} root root object with properties schema, refVal, refs
+ * @param {String} ref reference to resolve
+ * @return {Object} object with properties schema, root, baseId
+ */
+function resolveSchema(root, ref) {
+ /* jshint validthis: true */
+ var p = url.parse(ref, false, true)
+ , refPath = _getFullPath(p)
+ , baseId = getFullPath(this._getId(root.schema));
+ if (refPath !== baseId) {
+ var id = normalizeId(refPath);
+ var refVal = this._refs[id];
+ if (typeof refVal == 'string') {
+ return resolveRecursive.call(this, root, refVal, p);
+ } else if (refVal instanceof SchemaObject) {
+ if (!refVal.validate) this._compile(refVal);
+ root = refVal;
+ } else {
+ refVal = this._schemas[id];
+ if (refVal instanceof SchemaObject) {
+ if (!refVal.validate) this._compile(refVal);
+ if (id == normalizeId(ref))
+ return { schema: refVal, root: root, baseId: baseId };
+ root = refVal;
+ } else {
+ return;
+ }
+ }
+ if (!root.schema) return;
+ baseId = getFullPath(this._getId(root.schema));
+ }
+ return getJsonPointer.call(this, p, baseId, root.schema, root);
+}
+
+
+/* @this Ajv */
+function resolveRecursive(root, ref, parsedRef) {
+ /* jshint validthis: true */
+ var res = resolveSchema.call(this, root, ref);
+ if (res) {
+ var schema = res.schema;
+ var baseId = res.baseId;
+ root = res.root;
+ var id = this._getId(schema);
+ if (id) baseId = resolveUrl(baseId, id);
+ return getJsonPointer.call(this, parsedRef, baseId, schema, root);
+ }
+}
+
+
+var PREVENT_SCOPE_CHANGE = util.toHash(['properties', 'patternProperties', 'enum', 'dependencies', 'definitions']);
+/* @this Ajv */
+function getJsonPointer(parsedRef, baseId, schema, root) {
+ /* jshint validthis: true */
+ parsedRef.hash = parsedRef.hash || '';
+ if (parsedRef.hash.slice(0,2) != '#/') return;
+ var parts = parsedRef.hash.split('/');
+
+ for (var i = 1; i < parts.length; i++) {
+ var part = parts[i];
+ if (part) {
+ part = util.unescapeFragment(part);
+ schema = schema[part];
+ if (schema === undefined) break;
+ var id;
+ if (!PREVENT_SCOPE_CHANGE[part]) {
+ id = this._getId(schema);
+ if (id) baseId = resolveUrl(baseId, id);
+ if (schema.$ref) {
+ var $ref = resolveUrl(baseId, schema.$ref);
+ var res = resolveSchema.call(this, root, $ref);
+ if (res) {
+ schema = res.schema;
+ root = res.root;
+ baseId = res.baseId;
+ }
+ }
+ }
+ }
+ }
+ if (schema !== undefined && schema !== root.schema)
+ return { schema: schema, root: root, baseId: baseId };
+}
+
+
+var SIMPLE_INLINED = util.toHash([
+ 'type', 'format', 'pattern',
+ 'maxLength', 'minLength',
+ 'maxProperties', 'minProperties',
+ 'maxItems', 'minItems',
+ 'maximum', 'minimum',
+ 'uniqueItems', 'multipleOf',
+ 'required', 'enum'
+]);
+function inlineRef(schema, limit) {
+ if (limit === false) return false;
+ if (limit === undefined || limit === true) return checkNoRef(schema);
+ else if (limit) return countKeys(schema) <= limit;
+}
+
+
+function checkNoRef(schema) {
+ var item;
+ if (Array.isArray(schema)) {
+ for (var i=0; i<schema.length; i++) {
+ item = schema[i];
+ if (typeof item == 'object' && !checkNoRef(item)) return false;
+ }
+ } else {
+ for (var key in schema) {
+ if (key == '$ref') return false;
+ item = schema[key];
+ if (typeof item == 'object' && !checkNoRef(item)) return false;
+ }
+ }
+ return true;
+}
+
+
+function countKeys(schema) {
+ var count = 0, item;
+ if (Array.isArray(schema)) {
+ for (var i=0; i<schema.length; i++) {
+ item = schema[i];
+ if (typeof item == 'object') count += countKeys(item);
+ if (count == Infinity) return Infinity;
+ }
+ } else {
+ for (var key in schema) {
+ if (key == '$ref') return Infinity;
+ if (SIMPLE_INLINED[key]) {
+ count++;
+ } else {
+ item = schema[key];
+ if (typeof item == 'object') count += countKeys(item) + 1;
+ if (count == Infinity) return Infinity;
+ }
+ }
+ }
+ return count;
+}
+
+
+function getFullPath(id, normalize) {
+ if (normalize !== false) id = normalizeId(id);
+ var p = url.parse(id, false, true);
+ return _getFullPath(p);
+}
+
+
+function _getFullPath(p) {
+ var protocolSeparator = p.protocol || p.href.slice(0,2) == '//' ? '//' : '';
+ return (p.protocol||'') + protocolSeparator + (p.host||'') + (p.path||'') + '#';
+}
+
+
+var TRAILING_SLASH_HASH = /#\/?$/;
+function normalizeId(id) {
+ return id ? id.replace(TRAILING_SLASH_HASH, '') : '';
+}
+
+
+function resolveUrl(baseId, id) {
+ id = normalizeId(id);
+ return url.resolve(baseId, id);
+}
+
+
+/* @this Ajv */
+function resolveIds(schema) {
+ var schemaId = normalizeId(this._getId(schema));
+ var baseIds = {'': schemaId};
+ var fullPaths = {'': getFullPath(schemaId, false)};
+ var localRefs = {};
+ var self = this;
+
+ traverse(schema, {allKeys: true}, function(sch, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {
+ if (jsonPtr === '') return;
+ var id = self._getId(sch);
+ var baseId = baseIds[parentJsonPtr];
+ var fullPath = fullPaths[parentJsonPtr] + '/' + parentKeyword;
+ if (keyIndex !== undefined)
+ fullPath += '/' + (typeof keyIndex == 'number' ? keyIndex : util.escapeFragment(keyIndex));
+
+ if (typeof id == 'string') {
+ id = baseId = normalizeId(baseId ? url.resolve(baseId, id) : id);
+
+ var refVal = self._refs[id];
+ if (typeof refVal == 'string') refVal = self._refs[refVal];
+ if (refVal && refVal.schema) {
+ if (!equal(sch, refVal.schema))
+ throw new Error('id "' + id + '" resolves to more than one schema');
+ } else if (id != normalizeId(fullPath)) {
+ if (id[0] == '#') {
+ if (localRefs[id] && !equal(sch, localRefs[id]))
+ throw new Error('id "' + id + '" resolves to more than one schema');
+ localRefs[id] = sch;
+ } else {
+ self._refs[id] = fullPath;
+ }
+ }
+ }
+ baseIds[jsonPtr] = baseId;
+ fullPaths[jsonPtr] = fullPath;
+ });
+
+ return localRefs;
+}
+
+},{"./schema_obj":10,"./util":12,"fast-deep-equal":41,"json-schema-traverse":43,"url":48}],9:[function(require,module,exports){
+'use strict';
+
+var ruleModules = require('./_rules')
+ , toHash = require('./util').toHash;
+
+module.exports = function rules() {
+ var RULES = [
+ { type: 'number',
+ rules: [ { 'maximum': ['exclusiveMaximum'] },
+ { 'minimum': ['exclusiveMinimum'] }, 'multipleOf', 'format'] },
+ { type: 'string',
+ rules: [ 'maxLength', 'minLength', 'pattern', 'format' ] },
+ { type: 'array',
+ rules: [ 'maxItems', 'minItems', 'uniqueItems', 'contains', 'items' ] },
+ { type: 'object',
+ rules: [ 'maxProperties', 'minProperties', 'required', 'dependencies', 'propertyNames',
+ { 'properties': ['additionalProperties', 'patternProperties'] } ] },
+ { rules: [ '$ref', 'const', 'enum', 'not', 'anyOf', 'oneOf', 'allOf' ] }
+ ];
+
+ var ALL = [ 'type' ];
+ var KEYWORDS = [
+ 'additionalItems', '$schema', '$id', 'id', 'title',
+ 'description', 'default', 'definitions'
+ ];
+ var TYPES = [ 'number', 'integer', 'string', 'array', 'object', 'boolean', 'null' ];
+ RULES.all = toHash(ALL);
+ RULES.types = toHash(TYPES);
+
+ RULES.forEach(function (group) {
+ group.rules = group.rules.map(function (keyword) {
+ var implKeywords;
+ if (typeof keyword == 'object') {
+ var key = Object.keys(keyword)[0];
+ implKeywords = keyword[key];
+ keyword = key;
+ implKeywords.forEach(function (k) {
+ ALL.push(k);
+ RULES.all[k] = true;
+ });
+ }
+ ALL.push(keyword);
+ var rule = RULES.all[keyword] = {
+ keyword: keyword,
+ code: ruleModules[keyword],
+ implements: implKeywords
+ };
+ return rule;
+ });
+
+ if (group.type) RULES.types[group.type] = group;
+ });
+
+ RULES.keywords = toHash(ALL.concat(KEYWORDS));
+ RULES.custom = {};
+
+ return RULES;
+};
+
+},{"./_rules":3,"./util":12}],10:[function(require,module,exports){
+'use strict';
+
+var util = require('./util');
+
+module.exports = SchemaObject;
+
+function SchemaObject(obj) {
+ util.copy(obj, this);
+}
+
+},{"./util":12}],11:[function(require,module,exports){
+'use strict';
+
+// https://mathiasbynens.be/notes/javascript-encoding
+// https://github.com/bestiejs/punycode.js - punycode.ucs2.decode
+module.exports = function ucs2length(str) {
+ var length = 0
+ , len = str.length
+ , pos = 0
+ , value;
+ while (pos < len) {
+ length++;
+ value = str.charCodeAt(pos++);
+ if (value >= 0xD800 && value <= 0xDBFF && pos < len) {
+ // high surrogate, and there is a next character
+ value = str.charCodeAt(pos);
+ if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate
+ }
+ }
+ return length;
+};
+
+},{}],12:[function(require,module,exports){
+'use strict';
+
+
+module.exports = {
+ copy: copy,
+ checkDataType: checkDataType,
+ checkDataTypes: checkDataTypes,
+ coerceToTypes: coerceToTypes,
+ toHash: toHash,
+ getProperty: getProperty,
+ escapeQuotes: escapeQuotes,
+ equal: require('fast-deep-equal'),
+ ucs2length: require('./ucs2length'),
+ varOccurences: varOccurences,
+ varReplace: varReplace,
+ cleanUpCode: cleanUpCode,
+ finalCleanUpCode: finalCleanUpCode,
+ schemaHasRules: schemaHasRules,
+ schemaHasRulesExcept: schemaHasRulesExcept,
+ toQuotedString: toQuotedString,
+ getPathExpr: getPathExpr,
+ getPath: getPath,
+ getData: getData,
+ unescapeFragment: unescapeFragment,
+ unescapeJsonPointer: unescapeJsonPointer,
+ escapeFragment: escapeFragment,
+ escapeJsonPointer: escapeJsonPointer
+};
+
+
+function copy(o, to) {
+ to = to || {};
+ for (var key in o) to[key] = o[key];
+ return to;
+}
+
+
+function checkDataType(dataType, data, negate) {
+ var EQUAL = negate ? ' !== ' : ' === '
+ , AND = negate ? ' || ' : ' && '
+ , OK = negate ? '!' : ''
+ , NOT = negate ? '' : '!';
+ switch (dataType) {
+ case 'null': return data + EQUAL + 'null';
+ case 'array': return OK + 'Array.isArray(' + data + ')';
+ case 'object': return '(' + OK + data + AND +
+ 'typeof ' + data + EQUAL + '"object"' + AND +
+ NOT + 'Array.isArray(' + data + '))';
+ case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND +
+ NOT + '(' + data + ' % 1)' +
+ AND + data + EQUAL + data + ')';
+ default: return 'typeof ' + data + EQUAL + '"' + dataType + '"';
+ }
+}
+
+
+function checkDataTypes(dataTypes, data) {
+ switch (dataTypes.length) {
+ case 1: return checkDataType(dataTypes[0], data, true);
+ default:
+ var code = '';
+ var types = toHash(dataTypes);
+ if (types.array && types.object) {
+ code = types.null ? '(': '(!' + data + ' || ';
+ code += 'typeof ' + data + ' !== "object")';
+ delete types.null;
+ delete types.array;
+ delete types.object;
+ }
+ if (types.number) delete types.integer;
+ for (var t in types)
+ code += (code ? ' && ' : '' ) + checkDataType(t, data, true);
+
+ return code;
+ }
+}
+
+
+var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]);
+function coerceToTypes(optionCoerceTypes, dataTypes) {
+ if (Array.isArray(dataTypes)) {
+ var types = [];
+ for (var i=0; i<dataTypes.length; i++) {
+ var t = dataTypes[i];
+ if (COERCE_TO_TYPES[t]) types[types.length] = t;
+ else if (optionCoerceTypes === 'array' && t === 'array') types[types.length] = t;
+ }
+ if (types.length) return types;
+ } else if (COERCE_TO_TYPES[dataTypes]) {
+ return [dataTypes];
+ } else if (optionCoerceTypes === 'array' && dataTypes === 'array') {
+ return ['array'];
+ }
+}
+
+
+function toHash(arr) {
+ var hash = {};
+ for (var i=0; i<arr.length; i++) hash[arr[i]] = true;
+ return hash;
+}
+
+
+var IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
+var SINGLE_QUOTE = /'|\\/g;
+function getProperty(key) {
+ return typeof key == 'number'
+ ? '[' + key + ']'
+ : IDENTIFIER.test(key)
+ ? '.' + key
+ : "['" + escapeQuotes(key) + "']";
+}
+
+
+function escapeQuotes(str) {
+ return str.replace(SINGLE_QUOTE, '\\$&')
+ .replace(/\n/g, '\\n')
+ .replace(/\r/g, '\\r')
+ .replace(/\f/g, '\\f')
+ .replace(/\t/g, '\\t');
+}
+
+
+function varOccurences(str, dataVar) {
+ dataVar += '[^0-9]';
+ var matches = str.match(new RegExp(dataVar, 'g'));
+ return matches ? matches.length : 0;
+}
+
+
+function varReplace(str, dataVar, expr) {
+ dataVar += '([^0-9])';
+ expr = expr.replace(/\$/g, '$$$$');
+ return str.replace(new RegExp(dataVar, 'g'), expr + '$1');
+}
+
+
+var EMPTY_ELSE = /else\s*{\s*}/g
+ , EMPTY_IF_NO_ELSE = /if\s*\([^)]+\)\s*\{\s*\}(?!\s*else)/g
+ , EMPTY_IF_WITH_ELSE = /if\s*\(([^)]+)\)\s*\{\s*\}\s*else(?!\s*if)/g;
+function cleanUpCode(out) {
+ return out.replace(EMPTY_ELSE, '')
+ .replace(EMPTY_IF_NO_ELSE, '')
+ .replace(EMPTY_IF_WITH_ELSE, 'if (!($1))');
+}
+
+
+var ERRORS_REGEXP = /[^v.]errors/g
+ , REMOVE_ERRORS = /var errors = 0;|var vErrors = null;|validate.errors = vErrors;/g
+ , REMOVE_ERRORS_ASYNC = /var errors = 0;|var vErrors = null;/g
+ , RETURN_VALID = 'return errors === 0;'
+ , RETURN_TRUE = 'validate.errors = null; return true;'
+ , RETURN_ASYNC = /if \(errors === 0\) return data;\s*else throw new ValidationError\(vErrors\);/
+ , RETURN_DATA_ASYNC = 'return data;'
+ , ROOTDATA_REGEXP = /[^A-Za-z_$]rootData[^A-Za-z0-9_$]/g
+ , REMOVE_ROOTDATA = /if \(rootData === undefined\) rootData = data;/;
+
+function finalCleanUpCode(out, async) {
+ var matches = out.match(ERRORS_REGEXP);
+ if (matches && matches.length == 2) {
+ out = async
+ ? out.replace(REMOVE_ERRORS_ASYNC, '')
+ .replace(RETURN_ASYNC, RETURN_DATA_ASYNC)
+ : out.replace(REMOVE_ERRORS, '')
+ .replace(RETURN_VALID, RETURN_TRUE);
+ }
+
+ matches = out.match(ROOTDATA_REGEXP);
+ if (!matches || matches.length !== 3) return out;
+ return out.replace(REMOVE_ROOTDATA, '');
+}
+
+
+function schemaHasRules(schema, rules) {
+ if (typeof schema == 'boolean') return !schema;
+ for (var key in schema) if (rules[key]) return true;
+}
+
+
+function schemaHasRulesExcept(schema, rules, exceptKeyword) {
+ if (typeof schema == 'boolean') return !schema && exceptKeyword != 'not';
+ for (var key in schema) if (key != exceptKeyword && rules[key]) return true;
+}
+
+
+function toQuotedString(str) {
+ return '\'' + escapeQuotes(str) + '\'';
+}
+
+
+function getPathExpr(currentPath, expr, jsonPointers, isNumber) {
+ var path = jsonPointers // false by default
+ ? '\'/\' + ' + expr + (isNumber ? '' : '.replace(/~/g, \'~0\').replace(/\\//g, \'~1\')')
+ : (isNumber ? '\'[\' + ' + expr + ' + \']\'' : '\'[\\\'\' + ' + expr + ' + \'\\\']\'');
+ return joinPaths(currentPath, path);
+}
+
+
+function getPath(currentPath, prop, jsonPointers) {
+ var path = jsonPointers // false by default
+ ? toQuotedString('/' + escapeJsonPointer(prop))
+ : toQuotedString(getProperty(prop));
+ return joinPaths(currentPath, path);
+}
+
+
+var JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/;
+var RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
+function getData($data, lvl, paths) {
+ var up, jsonPointer, data, matches;
+ if ($data === '') return 'rootData';
+ if ($data[0] == '/') {
+ if (!JSON_POINTER.test($data)) throw new Error('Invalid JSON-pointer: ' + $data);
+ jsonPointer = $data;
+ data = 'rootData';
+ } else {
+ matches = $data.match(RELATIVE_JSON_POINTER);
+ if (!matches) throw new Error('Invalid JSON-pointer: ' + $data);
+ up = +matches[1];
+ jsonPointer = matches[2];
+ if (jsonPointer == '#') {
+ if (up >= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl);
+ return paths[lvl - up];
+ }
+
+ if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl);
+ data = 'data' + ((lvl - up) || '');
+ if (!jsonPointer) return data;
+ }
+
+ var expr = data;
+ var segments = jsonPointer.split('/');
+ for (var i=0; i<segments.length; i++) {
+ var segment = segments[i];
+ if (segment) {
+ data += getProperty(unescapeJsonPointer(segment));
+ expr += ' && ' + data;
+ }
+ }
+ return expr;
+}
+
+
+function joinPaths (a, b) {
+ if (a == '""') return b;
+ return (a + ' + ' + b).replace(/' \+ '/g, '');
+}
+
+
+function unescapeFragment(str) {
+ return unescapeJsonPointer(decodeURIComponent(str));
+}
+
+
+function escapeFragment(str) {
+ return encodeURIComponent(escapeJsonPointer(str));
+}
+
+
+function escapeJsonPointer(str) {
+ return str.replace(/~/g, '~0').replace(/\//g, '~1');
+}
+
+
+function unescapeJsonPointer(str) {
+ return str.replace(/~1/g, '/').replace(/~0/g, '~');
+}
+
+},{"./ucs2length":11,"fast-deep-equal":41}],13:[function(require,module,exports){
+'use strict';
+module.exports = function generate__limit(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $isMax = $keyword == 'maximum',
+ $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum',
+ $schemaExcl = it.schema[$exclusiveKeyword],
+ $isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data,
+ $op = $isMax ? '<' : '>',
+ $notOp = $isMax ? '>' : '<',
+ $errorKeyword = undefined;
+ if ($isDataExcl) {
+ var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr),
+ $exclusive = 'exclusive' + $lvl,
+ $exclType = 'exclType' + $lvl,
+ $exclIsNumber = 'exclIsNumber' + $lvl,
+ $opExpr = 'op' + $lvl,
+ $opStr = '\' + ' + $opExpr + ' + \'';
+ out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; ';
+ $schemaValueExcl = 'schemaExcl' + $lvl;
+ out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \'boolean\' && ' + ($exclType) + ' != \'undefined\' && ' + ($exclType) + ' != \'number\') { ';
+ var $errorKeyword = $exclusiveKeyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } else if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+ }
+ out += ' ' + ($exclType) + ' == \'number\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\';';
+ } else {
+ var $exclIsNumber = typeof $schemaExcl == 'number',
+ $opStr = $op;
+ if ($exclIsNumber && $isData) {
+ var $opExpr = '\'' + $opStr + '\'';
+ out += ' if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+ }
+ out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { ';
+ } else {
+ if ($exclIsNumber && $schema === undefined) {
+ $exclusive = true;
+ $errorKeyword = $exclusiveKeyword;
+ $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;
+ $schemaValue = $schemaExcl;
+ $notOp += '=';
+ } else {
+ if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema);
+ if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) {
+ $exclusive = true;
+ $errorKeyword = $exclusiveKeyword;
+ $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;
+ $notOp += '=';
+ } else {
+ $exclusive = false;
+ $opStr += '=';
+ }
+ }
+ var $opExpr = '\'' + $opStr + '\'';
+ out += ' if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+ }
+ out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { ';
+ }
+ }
+ $errorKeyword = $errorKeyword || $keyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '_limit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be ' + ($opStr) + ' ';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue);
+ } else {
+ out += '' + ($schemaValue) + '\'';
+ }
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
+
+},{}],14:[function(require,module,exports){
+'use strict';
+module.exports = function generate__limitItems(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $op = $keyword == 'maxItems' ? '>' : '<';
+ out += 'if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+ }
+ out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { ';
+ var $errorKeyword = $keyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '_limitItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT have ';
+ if ($keyword == 'maxItems') {
+ out += 'more';
+ } else {
+ out += 'less';
+ }
+ out += ' than ';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue) + ' + \'';
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' items\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += '} ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
+
+},{}],15:[function(require,module,exports){
+'use strict';
+module.exports = function generate__limitLength(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $op = $keyword == 'maxLength' ? '>' : '<';
+ out += 'if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+ }
+ if (it.opts.unicode === false) {
+ out += ' ' + ($data) + '.length ';
+ } else {
+ out += ' ucs2length(' + ($data) + ') ';
+ }
+ out += ' ' + ($op) + ' ' + ($schemaValue) + ') { ';
+ var $errorKeyword = $keyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '_limitLength') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT be ';
+ if ($keyword == 'maxLength') {
+ out += 'longer';
+ } else {
+ out += 'shorter';
+ }
+ out += ' than ';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue) + ' + \'';
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' characters\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += '} ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
+
+},{}],16:[function(require,module,exports){
+'use strict';
+module.exports = function generate__limitProperties(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $op = $keyword == 'maxProperties' ? '>' : '<';
+ out += 'if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+ }
+ out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { ';
+ var $errorKeyword = $keyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '_limitProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT have ';
+ if ($keyword == 'maxProperties') {
+ out += 'more';
+ } else {
+ out += 'less';
+ }
+ out += ' than ';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue) + ' + \'';
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' properties\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += '} ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
+
+},{}],17:[function(require,module,exports){
+'use strict';
+module.exports = function generate_allOf(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ var $currentBaseId = $it.baseId,
+ $allSchemasEmpty = true;
+ var arr1 = $schema;
+ if (arr1) {
+ var $sch, $i = -1,
+ l1 = arr1.length - 1;
+ while ($i < l1) {
+ $sch = arr1[$i += 1];
+ if (it.util.schemaHasRules($sch, it.RULES.all)) {
+ $allSchemasEmpty = false;
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + '[' + $i + ']';
+ $it.errSchemaPath = $errSchemaPath + '/' + $i;
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ }
+ }
+ if ($breakOnError) {
+ if ($allSchemasEmpty) {
+ out += ' if (true) { ';
+ } else {
+ out += ' ' + ($closingBraces.slice(0, -1)) + ' ';
+ }
+ }
+ out = it.util.cleanUpCode(out);
+ return out;
+}
+
+},{}],18:[function(require,module,exports){
+'use strict';
+module.exports = function generate_anyOf(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ var $noEmptySchema = $schema.every(function($sch) {
+ return it.util.schemaHasRules($sch, it.RULES.all);
+ });
+ if ($noEmptySchema) {
+ var $currentBaseId = $it.baseId;
+ out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; ';
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ var arr1 = $schema;
+ if (arr1) {
+ var $sch, $i = -1,
+ l1 = arr1.length - 1;
+ while ($i < l1) {
+ $sch = arr1[$i += 1];
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + '[' + $i + ']';
+ $it.errSchemaPath = $errSchemaPath + '/' + $i;
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ out += ' ' + ($valid) + ' = ' + ($valid) + ' || ' + ($nextValid) + '; if (!' + ($valid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should match some schema in anyOf\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError(vErrors); ';
+ } else {
+ out += ' validate.errors = vErrors; return false; ';
+ }
+ }
+ out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';
+ if (it.opts.allErrors) {
+ out += ' } ';
+ }
+ out = it.util.cleanUpCode(out);
+ } else {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ }
+ return out;
+}
+
+},{}],19:[function(require,module,exports){
+'use strict';
+module.exports = function generate_const(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ if (!$isData) {
+ out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';';
+ }
+ out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be equal to constant\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' }';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
+
+},{}],20:[function(require,module,exports){
+'use strict';
+module.exports = function generate_contains(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ var $idx = 'i' + $lvl,
+ $dataNxt = $it.dataLevel = it.dataLevel + 1,
+ $nextData = 'data' + $dataNxt,
+ $currentBaseId = it.baseId,
+ $nonEmptySchema = it.util.schemaHasRules($schema, it.RULES.all);
+ out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';
+ if ($nonEmptySchema) {
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { ';
+ $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);
+ var $passData = $data + '[' + $idx + ']';
+ $it.dataPathArr[$dataNxt] = $idx;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ out += ' if (' + ($nextValid) + ') break; } ';
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {';
+ } else {
+ out += ' if (' + ($data) + '.length == 0) {';
+ }
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('contains') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should contain a valid item\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } else { ';
+ if ($nonEmptySchema) {
+ out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';
+ }
+ if (it.opts.allErrors) {
+ out += ' } ';
+ }
+ out = it.util.cleanUpCode(out);
+ return out;
+}
+
+},{}],21:[function(require,module,exports){
+'use strict';
+module.exports = function generate_custom(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $rule = this,
+ $definition = 'definition' + $lvl,
+ $rDef = $rule.definition,
+ $closingBraces = '';
+ var $compile, $inline, $macro, $ruleValidate, $validateCode;
+ if ($isData && $rDef.$data) {
+ $validateCode = 'keywordValidate' + $lvl;
+ var $validateSchema = $rDef.validateSchema;
+ out += ' var ' + ($definition) + ' = RULES.custom[\'' + ($keyword) + '\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;';
+ } else {
+ $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it);
+ if (!$ruleValidate) return;
+ $schemaValue = 'validate.schema' + $schemaPath;
+ $validateCode = $ruleValidate.code;
+ $compile = $rDef.compile;
+ $inline = $rDef.inline;
+ $macro = $rDef.macro;
+ }
+ var $ruleErrs = $validateCode + '.errors',
+ $i = 'i' + $lvl,
+ $ruleErr = 'ruleErr' + $lvl,
+ $asyncKeyword = $rDef.async;
+ if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema');
+ if (!($inline || $macro)) {
+ out += '' + ($ruleErrs) + ' = null;';
+ }
+ out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';
+ if ($isData && $rDef.$data) {
+ $closingBraces += '}';
+ out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { ';
+ if ($validateSchema) {
+ $closingBraces += '}';
+ out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') { ';
+ }
+ }
+ if ($inline) {
+ if ($rDef.statements) {
+ out += ' ' + ($ruleValidate.validate) + ' ';
+ } else {
+ out += ' ' + ($valid) + ' = ' + ($ruleValidate.validate) + '; ';
+ }
+ } else if ($macro) {
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ $it.schema = $ruleValidate.validate;
+ $it.schemaPath = '';
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ var $code = it.validate($it).replace(/validate\.schema/g, $validateCode);
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += ' ' + ($code);
+ } else {
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = '';
+ out += ' ' + ($validateCode) + '.call( ';
+ if (it.opts.passContext) {
+ out += 'this';
+ } else {
+ out += 'self';
+ }
+ if ($compile || $rDef.schema === false) {
+ out += ' , ' + ($data) + ' ';
+ } else {
+ out += ' , ' + ($schemaValue) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' ';
+ }
+ out += ' , (dataPath || \'\')';
+ if (it.errorPath != '""') {
+ out += ' + ' + (it.errorPath);
+ }
+ var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData',
+ $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty';
+ out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ' , rootData ) ';
+ var def_callRuleValidate = out;
+ out = $$outStack.pop();
+ if ($rDef.errors === false) {
+ out += ' ' + ($valid) + ' = ';
+ if ($asyncKeyword) {
+ out += '' + (it.yieldAwait);
+ }
+ out += '' + (def_callRuleValidate) + '; ';
+ } else {
+ if ($asyncKeyword) {
+ $ruleErrs = 'customErrors' + $lvl;
+ out += ' var ' + ($ruleErrs) + ' = null; try { ' + ($valid) + ' = ' + (it.yieldAwait) + (def_callRuleValidate) + '; } catch (e) { ' + ($valid) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } ';
+ } else {
+ out += ' ' + ($ruleErrs) + ' = null; ' + ($valid) + ' = ' + (def_callRuleValidate) + '; ';
+ }
+ }
+ }
+ if ($rDef.modifying) {
+ out += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];';
+ }
+ out += '' + ($closingBraces);
+ if ($rDef.valid) {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ } else {
+ out += ' if ( ';
+ if ($rDef.valid === undefined) {
+ out += ' !';
+ if ($macro) {
+ out += '' + ($nextValid);
+ } else {
+ out += '' + ($valid);
+ }
+ } else {
+ out += ' ' + (!$rDef.valid) + ' ';
+ }
+ out += ') { ';
+ $errorKeyword = $rule.keyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = '';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ var def_customError = out;
+ out = $$outStack.pop();
+ if ($inline) {
+ if ($rDef.errors) {
+ if ($rDef.errors != 'full') {
+ out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '<errors; ' + ($i) + '++) { var ' + ($ruleErr) + ' = vErrors[' + ($i) + ']; if (' + ($ruleErr) + '.dataPath === undefined) ' + ($ruleErr) + '.dataPath = (dataPath || \'\') + ' + (it.errorPath) + '; if (' + ($ruleErr) + '.schemaPath === undefined) { ' + ($ruleErr) + '.schemaPath = "' + ($errSchemaPath) + '"; } ';
+ if (it.opts.verbose) {
+ out += ' ' + ($ruleErr) + '.schema = ' + ($schemaValue) + '; ' + ($ruleErr) + '.data = ' + ($data) + '; ';
+ }
+ out += ' } ';
+ }
+ } else {
+ if ($rDef.errors === false) {
+ out += ' ' + (def_customError) + ' ';
+ } else {
+ out += ' if (' + ($errs) + ' == errors) { ' + (def_customError) + ' } else { for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '<errors; ' + ($i) + '++) { var ' + ($ruleErr) + ' = vErrors[' + ($i) + ']; if (' + ($ruleErr) + '.dataPath === undefined) ' + ($ruleErr) + '.dataPath = (dataPath || \'\') + ' + (it.errorPath) + '; if (' + ($ruleErr) + '.schemaPath === undefined) { ' + ($ruleErr) + '.schemaPath = "' + ($errSchemaPath) + '"; } ';
+ if (it.opts.verbose) {
+ out += ' ' + ($ruleErr) + '.schema = ' + ($schemaValue) + '; ' + ($ruleErr) + '.data = ' + ($data) + '; ';
+ }
+ out += ' } } ';
+ }
+ }
+ } else if ($macro) {
+ out += ' var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError(vErrors); ';
+ } else {
+ out += ' validate.errors = vErrors; return false; ';
+ }
+ }
+ } else {
+ if ($rDef.errors === false) {
+ out += ' ' + (def_customError) + ' ';
+ } else {
+ out += ' if (Array.isArray(' + ($ruleErrs) + ')) { if (vErrors === null) vErrors = ' + ($ruleErrs) + '; else vErrors = vErrors.concat(' + ($ruleErrs) + '); errors = vErrors.length; for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '<errors; ' + ($i) + '++) { var ' + ($ruleErr) + ' = vErrors[' + ($i) + ']; if (' + ($ruleErr) + '.dataPath === undefined) ' + ($ruleErr) + '.dataPath = (dataPath || \'\') + ' + (it.errorPath) + '; ' + ($ruleErr) + '.schemaPath = "' + ($errSchemaPath) + '"; ';
+ if (it.opts.verbose) {
+ out += ' ' + ($ruleErr) + '.schema = ' + ($schemaValue) + '; ' + ($ruleErr) + '.data = ' + ($data) + '; ';
+ }
+ out += ' } } else { ' + (def_customError) + ' } ';
+ }
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ }
+ return out;
+}
+
+},{}],22:[function(require,module,exports){
+'use strict';
+module.exports = function generate_dependencies(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ var $schemaDeps = {},
+ $propertyDeps = {},
+ $ownProperties = it.opts.ownProperties;
+ for ($property in $schema) {
+ var $sch = $schema[$property];
+ var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps;
+ $deps[$property] = $sch;
+ }
+ out += 'var ' + ($errs) + ' = errors;';
+ var $currentErrorPath = it.errorPath;
+ out += 'var missing' + ($lvl) + ';';
+ for (var $property in $propertyDeps) {
+ $deps = $propertyDeps[$property];
+ if ($deps.length) {
+ out += ' if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined ';
+ if ($ownProperties) {
+ out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') ';
+ }
+ if ($breakOnError) {
+ out += ' && ( ';
+ var arr1 = $deps;
+ if (arr1) {
+ var $propertyKey, $i = -1,
+ l1 = arr1.length - 1;
+ while ($i < l1) {
+ $propertyKey = arr1[$i += 1];
+ if ($i) {
+ out += ' || ';
+ }
+ var $prop = it.util.getProperty($propertyKey),
+ $useData = $data + $prop;
+ out += ' ( ( ' + ($useData) + ' === undefined ';
+ if ($ownProperties) {
+ out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ }
+ out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) ';
+ }
+ }
+ out += ')) { ';
+ var $propertyPath = 'missing' + $lvl,
+ $missingProperty = '\' + ' + $propertyPath + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath;
+ }
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should have ';
+ if ($deps.length == 1) {
+ out += 'property ' + (it.util.escapeQuotes($deps[0]));
+ } else {
+ out += 'properties ' + (it.util.escapeQuotes($deps.join(", ")));
+ }
+ out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ } else {
+ out += ' ) { ';
+ var arr2 = $deps;
+ if (arr2) {
+ var $propertyKey, i2 = -1,
+ l2 = arr2.length - 1;
+ while (i2 < l2) {
+ $propertyKey = arr2[i2 += 1];
+ var $prop = it.util.getProperty($propertyKey),
+ $missingProperty = it.util.escapeQuotes($propertyKey),
+ $useData = $data + $prop;
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
+ }
+ out += ' if ( ' + ($useData) + ' === undefined ';
+ if ($ownProperties) {
+ out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ }
+ out += ') { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should have ';
+ if ($deps.length == 1) {
+ out += 'property ' + (it.util.escapeQuotes($deps[0]));
+ } else {
+ out += 'properties ' + (it.util.escapeQuotes($deps.join(", ")));
+ }
+ out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ';
+ }
+ }
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ $closingBraces += '}';
+ out += ' else { ';
+ }
+ }
+ }
+ it.errorPath = $currentErrorPath;
+ var $currentBaseId = $it.baseId;
+ for (var $property in $schemaDeps) {
+ var $sch = $schemaDeps[$property];
+ if (it.util.schemaHasRules($sch, it.RULES.all)) {
+ out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined ';
+ if ($ownProperties) {
+ out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') ';
+ }
+ out += ') { ';
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + it.util.getProperty($property);
+ $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property);
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
+ }
+ out = it.util.cleanUpCode(out);
+ return out;
+}
+
+},{}],23:[function(require,module,exports){
+'use strict';
+module.exports = function generate_enum(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $i = 'i' + $lvl,
+ $vSchema = 'schema' + $lvl;
+ if (!$isData) {
+ out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + ';';
+ }
+ out += 'var ' + ($valid) + ';';
+ if ($isData) {
+ out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {';
+ }
+ out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + '<' + ($vSchema) + '.length; ' + ($i) + '++) if (equal(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + '])) { ' + ($valid) + ' = true; break; }';
+ if ($isData) {
+ out += ' } ';
+ }
+ out += ' if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('enum') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValues: schema' + ($lvl) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be equal to one of the allowed values\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' }';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
+
+},{}],24:[function(require,module,exports){
+'use strict';
+module.exports = function generate_format(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ if (it.opts.format === false) {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ return out;
+ }
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $unknownFormats = it.opts.unknownFormats,
+ $allowUnknown = Array.isArray($unknownFormats);
+ if ($isData) {
+ var $format = 'format' + $lvl,
+ $isObject = 'isObject' + $lvl,
+ $formatType = 'formatType' + $lvl;
+ out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var ' + ($isObject) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; var ' + ($formatType) + ' = ' + ($isObject) + ' && ' + ($format) + '.type || \'string\'; if (' + ($isObject) + ') { ';
+ if (it.async) {
+ out += ' var async' + ($lvl) + ' = ' + ($format) + '.async; ';
+ }
+ out += ' ' + ($format) + ' = ' + ($format) + '.validate; } if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || ';
+ }
+ out += ' (';
+ if ($unknownFormats != 'ignore') {
+ out += ' (' + ($schemaValue) + ' && !' + ($format) + ' ';
+ if ($allowUnknown) {
+ out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 ';
+ }
+ out += ') || ';
+ }
+ out += ' (' + ($format) + ' && ' + ($formatType) + ' == \'' + ($ruleType) + '\' && !(typeof ' + ($format) + ' == \'function\' ? ';
+ if (it.async) {
+ out += ' (async' + ($lvl) + ' ? ' + (it.yieldAwait) + ' ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) ';
+ } else {
+ out += ' ' + ($format) + '(' + ($data) + ') ';
+ }
+ out += ' : ' + ($format) + '.test(' + ($data) + '))))) {';
+ } else {
+ var $format = it.formats[$schema];
+ if (!$format) {
+ if ($unknownFormats == 'ignore') {
+ it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"');
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ return out;
+ } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ return out;
+ } else {
+ throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"');
+ }
+ }
+ var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate;
+ var $formatType = $isObject && $format.type || 'string';
+ if ($isObject) {
+ var $async = $format.async === true;
+ $format = $format.validate;
+ }
+ if ($formatType != $ruleType) {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ return out;
+ }
+ if ($async) {
+ if (!it.async) throw new Error('async format in sync schema');
+ var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate';
+ out += ' if (!(' + (it.yieldAwait) + ' ' + ($formatRef) + '(' + ($data) + '))) { ';
+ } else {
+ out += ' if (! ';
+ var $formatRef = 'formats' + it.util.getProperty($schema);
+ if ($isObject) $formatRef += '.validate';
+ if (typeof $format == 'function') {
+ out += ' ' + ($formatRef) + '(' + ($data) + ') ';
+ } else {
+ out += ' ' + ($formatRef) + '.test(' + ($data) + ') ';
+ }
+ out += ') { ';
+ }
+ }
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: ';
+ if ($isData) {
+ out += '' + ($schemaValue);
+ } else {
+ out += '' + (it.util.toQuotedString($schema));
+ }
+ out += ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should match format "';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue) + ' + \'';
+ } else {
+ out += '' + (it.util.escapeQuotes($schema));
+ }
+ out += '"\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + (it.util.toQuotedString($schema));
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
+
+},{}],25:[function(require,module,exports){
+'use strict';
+module.exports = function generate_items(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ var $idx = 'i' + $lvl,
+ $dataNxt = $it.dataLevel = it.dataLevel + 1,
+ $nextData = 'data' + $dataNxt,
+ $currentBaseId = it.baseId;
+ out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';
+ if (Array.isArray($schema)) {
+ var $additionalItems = it.schema.additionalItems;
+ if ($additionalItems === false) {
+ out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; ';
+ var $currErrSchemaPath = $errSchemaPath;
+ $errSchemaPath = it.errSchemaPath + '/additionalItems';
+ out += ' if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('additionalItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT have more than ' + ($schema.length) + ' items\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ $errSchemaPath = $currErrSchemaPath;
+ if ($breakOnError) {
+ $closingBraces += '}';
+ out += ' else { ';
+ }
+ }
+ var arr1 = $schema;
+ if (arr1) {
+ var $sch, $i = -1,
+ l1 = arr1.length - 1;
+ while ($i < l1) {
+ $sch = arr1[$i += 1];
+ if (it.util.schemaHasRules($sch, it.RULES.all)) {
+ out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { ';
+ var $passData = $data + '[' + $i + ']';
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + '[' + $i + ']';
+ $it.errSchemaPath = $errSchemaPath + '/' + $i;
+ $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true);
+ $it.dataPathArr[$dataNxt] = $i;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ }
+ }
+ if (typeof $additionalItems == 'object' && it.util.schemaHasRules($additionalItems, it.RULES.all)) {
+ $it.schema = $additionalItems;
+ $it.schemaPath = it.schemaPath + '.additionalItems';
+ $it.errSchemaPath = it.errSchemaPath + '/additionalItems';
+ out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var ' + ($idx) + ' = ' + ($schema.length) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { ';
+ $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);
+ var $passData = $data + '[' + $idx + ']';
+ $it.dataPathArr[$dataNxt] = $idx;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ if ($breakOnError) {
+ out += ' if (!' + ($nextValid) + ') break; ';
+ }
+ out += ' } } ';
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ } else if (it.util.schemaHasRules($schema, it.RULES.all)) {
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ out += ' for (var ' + ($idx) + ' = ' + (0) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { ';
+ $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);
+ var $passData = $data + '[' + $idx + ']';
+ $it.dataPathArr[$dataNxt] = $idx;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ if ($breakOnError) {
+ out += ' if (!' + ($nextValid) + ') break; ';
+ }
+ out += ' }';
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
+ }
+ out = it.util.cleanUpCode(out);
+ return out;
+}
+
+},{}],26:[function(require,module,exports){
+'use strict';
+module.exports = function generate_multipleOf(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ out += 'var division' + ($lvl) + ';if (';
+ if ($isData) {
+ out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \'number\' || ';
+ }
+ out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', ';
+ if (it.opts.multipleOfPrecision) {
+ out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' ';
+ } else {
+ out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') ';
+ }
+ out += ' ) ';
+ if ($isData) {
+ out += ' ) ';
+ }
+ out += ' ) { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('multipleOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be multiple of ';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue);
+ } else {
+ out += '' + ($schemaValue) + '\'';
+ }
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += '} ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
+
+},{}],27:[function(require,module,exports){
+'use strict';
+module.exports = function generate_not(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ if (it.util.schemaHasRules($schema, it.RULES.all)) {
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ out += ' var ' + ($errs) + ' = errors; ';
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ $it.createErrors = false;
+ var $allErrorsOption;
+ if ($it.opts.allErrors) {
+ $allErrorsOption = $it.opts.allErrors;
+ $it.opts.allErrors = false;
+ }
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.createErrors = true;
+ if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption;
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += ' if (' + ($nextValid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT be valid\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';
+ if (it.opts.allErrors) {
+ out += ' } ';
+ }
+ } else {
+ out += ' var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT be valid\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ if ($breakOnError) {
+ out += ' if (false) { ';
+ }
+ }
+ return out;
+}
+
+},{}],28:[function(require,module,exports){
+'use strict';
+module.exports = function generate_oneOf(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ out += 'var ' + ($errs) + ' = errors;var prevValid' + ($lvl) + ' = false;var ' + ($valid) + ' = false;';
+ var $currentBaseId = $it.baseId;
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ var arr1 = $schema;
+ if (arr1) {
+ var $sch, $i = -1,
+ l1 = arr1.length - 1;
+ while ($i < l1) {
+ $sch = arr1[$i += 1];
+ if (it.util.schemaHasRules($sch, it.RULES.all)) {
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + '[' + $i + ']';
+ $it.errSchemaPath = $errSchemaPath + '/' + $i;
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ } else {
+ out += ' var ' + ($nextValid) + ' = true; ';
+ }
+ if ($i) {
+ out += ' if (' + ($nextValid) + ' && prevValid' + ($lvl) + ') ' + ($valid) + ' = false; else { ';
+ $closingBraces += '}';
+ }
+ out += ' if (' + ($nextValid) + ') ' + ($valid) + ' = prevValid' + ($lvl) + ' = true;';
+ }
+ }
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should match exactly one schema in oneOf\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError(vErrors); ';
+ } else {
+ out += ' validate.errors = vErrors; return false; ';
+ }
+ }
+ out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }';
+ if (it.opts.allErrors) {
+ out += ' } ';
+ }
+ return out;
+}
+
+},{}],29:[function(require,module,exports){
+'use strict';
+module.exports = function generate_pattern(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema);
+ out += 'if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || ';
+ }
+ out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('pattern') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { pattern: ';
+ if ($isData) {
+ out += '' + ($schemaValue);
+ } else {
+ out += '' + (it.util.toQuotedString($schema));
+ }
+ out += ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should match pattern "';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue) + ' + \'';
+ } else {
+ out += '' + (it.util.escapeQuotes($schema));
+ }
+ out += '"\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + (it.util.toQuotedString($schema));
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += '} ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
+
+},{}],30:[function(require,module,exports){
+'use strict';
+module.exports = function generate_properties(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ var $key = 'key' + $lvl,
+ $idx = 'idx' + $lvl,
+ $dataNxt = $it.dataLevel = it.dataLevel + 1,
+ $nextData = 'data' + $dataNxt,
+ $dataProperties = 'dataProperties' + $lvl;
+ var $schemaKeys = Object.keys($schema || {}),
+ $pProperties = it.schema.patternProperties || {},
+ $pPropertyKeys = Object.keys($pProperties),
+ $aProperties = it.schema.additionalProperties,
+ $someProperties = $schemaKeys.length || $pPropertyKeys.length,
+ $noAdditional = $aProperties === false,
+ $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length,
+ $removeAdditional = it.opts.removeAdditional,
+ $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional,
+ $ownProperties = it.opts.ownProperties,
+ $currentBaseId = it.baseId;
+ var $required = it.schema.required;
+ if ($required && !(it.opts.v5 && $required.$data) && $required.length < it.opts.loopRequired) var $requiredHash = it.util.toHash($required);
+ if (it.opts.patternGroups) {
+ var $pgProperties = it.schema.patternGroups || {},
+ $pgPropertyKeys = Object.keys($pgProperties);
+ }
+ out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;';
+ if ($ownProperties) {
+ out += ' var ' + ($dataProperties) + ' = undefined;';
+ }
+ if ($checkAdditional) {
+ if ($ownProperties) {
+ out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';
+ } else {
+ out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
+ }
+ if ($someProperties) {
+ out += ' var isAdditional' + ($lvl) + ' = !(false ';
+ if ($schemaKeys.length) {
+ if ($schemaKeys.length > 5) {
+ out += ' || validate.schema' + ($schemaPath) + '[' + ($key) + '] ';
+ } else {
+ var arr1 = $schemaKeys;
+ if (arr1) {
+ var $propertyKey, i1 = -1,
+ l1 = arr1.length - 1;
+ while (i1 < l1) {
+ $propertyKey = arr1[i1 += 1];
+ out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' ';
+ }
+ }
+ }
+ }
+ if ($pPropertyKeys.length) {
+ var arr2 = $pPropertyKeys;
+ if (arr2) {
+ var $pProperty, $i = -1,
+ l2 = arr2.length - 1;
+ while ($i < l2) {
+ $pProperty = arr2[$i += 1];
+ out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') ';
+ }
+ }
+ }
+ if (it.opts.patternGroups && $pgPropertyKeys.length) {
+ var arr3 = $pgPropertyKeys;
+ if (arr3) {
+ var $pgProperty, $i = -1,
+ l3 = arr3.length - 1;
+ while ($i < l3) {
+ $pgProperty = arr3[$i += 1];
+ out += ' || ' + (it.usePattern($pgProperty)) + '.test(' + ($key) + ') ';
+ }
+ }
+ }
+ out += ' ); if (isAdditional' + ($lvl) + ') { ';
+ }
+ if ($removeAdditional == 'all') {
+ out += ' delete ' + ($data) + '[' + ($key) + ']; ';
+ } else {
+ var $currentErrorPath = it.errorPath;
+ var $additionalProperty = '\' + ' + $key + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
+ }
+ if ($noAdditional) {
+ if ($removeAdditional) {
+ out += ' delete ' + ($data) + '[' + ($key) + ']; ';
+ } else {
+ out += ' ' + ($nextValid) + ' = false; ';
+ var $currErrSchemaPath = $errSchemaPath;
+ $errSchemaPath = it.errSchemaPath + '/additionalProperties';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('additionalProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \'' + ($additionalProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT have additional properties\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ $errSchemaPath = $currErrSchemaPath;
+ if ($breakOnError) {
+ out += ' break; ';
+ }
+ }
+ } else if ($additionalIsSchema) {
+ if ($removeAdditional == 'failing') {
+ out += ' var ' + ($errs) + ' = errors; ';
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ $it.schema = $aProperties;
+ $it.schemaPath = it.schemaPath + '.additionalProperties';
+ $it.errSchemaPath = it.errSchemaPath + '/additionalProperties';
+ $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
+ var $passData = $data + '[' + $key + ']';
+ $it.dataPathArr[$dataNxt] = $key;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ out += ' if (!' + ($nextValid) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } ';
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ } else {
+ $it.schema = $aProperties;
+ $it.schemaPath = it.schemaPath + '.additionalProperties';
+ $it.errSchemaPath = it.errSchemaPath + '/additionalProperties';
+ $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
+ var $passData = $data + '[' + $key + ']';
+ $it.dataPathArr[$dataNxt] = $key;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ if ($breakOnError) {
+ out += ' if (!' + ($nextValid) + ') break; ';
+ }
+ }
+ }
+ it.errorPath = $currentErrorPath;
+ }
+ if ($someProperties) {
+ out += ' } ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ var $useDefaults = it.opts.useDefaults && !it.compositeRule;
+ if ($schemaKeys.length) {
+ var arr4 = $schemaKeys;
+ if (arr4) {
+ var $propertyKey, i4 = -1,
+ l4 = arr4.length - 1;
+ while (i4 < l4) {
+ $propertyKey = arr4[i4 += 1];
+ var $sch = $schema[$propertyKey];
+ if (it.util.schemaHasRules($sch, it.RULES.all)) {
+ var $prop = it.util.getProperty($propertyKey),
+ $passData = $data + $prop,
+ $hasDefault = $useDefaults && $sch.default !== undefined;
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + $prop;
+ $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey);
+ $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers);
+ $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey);
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ $code = it.util.varReplace($code, $nextData, $passData);
+ var $useData = $passData;
+ } else {
+ var $useData = $nextData;
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ';
+ }
+ if ($hasDefault) {
+ out += ' ' + ($code) + ' ';
+ } else {
+ if ($requiredHash && $requiredHash[$propertyKey]) {
+ out += ' if ( ' + ($useData) + ' === undefined ';
+ if ($ownProperties) {
+ out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ }
+ out += ') { ' + ($nextValid) + ' = false; ';
+ var $currentErrorPath = it.errorPath,
+ $currErrSchemaPath = $errSchemaPath,
+ $missingProperty = it.util.escapeQuotes($propertyKey);
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
+ }
+ $errSchemaPath = it.errSchemaPath + '/required';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is a required property';
+ } else {
+ out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ $errSchemaPath = $currErrSchemaPath;
+ it.errorPath = $currentErrorPath;
+ out += ' } else { ';
+ } else {
+ if ($breakOnError) {
+ out += ' if ( ' + ($useData) + ' === undefined ';
+ if ($ownProperties) {
+ out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ }
+ out += ') { ' + ($nextValid) + ' = true; } else { ';
+ } else {
+ out += ' if (' + ($useData) + ' !== undefined ';
+ if ($ownProperties) {
+ out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ }
+ out += ' ) { ';
+ }
+ }
+ out += ' ' + ($code) + ' } ';
+ }
+ }
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ }
+ }
+ if ($pPropertyKeys.length) {
+ var arr5 = $pPropertyKeys;
+ if (arr5) {
+ var $pProperty, i5 = -1,
+ l5 = arr5.length - 1;
+ while (i5 < l5) {
+ $pProperty = arr5[i5 += 1];
+ var $sch = $pProperties[$pProperty];
+ if (it.util.schemaHasRules($sch, it.RULES.all)) {
+ $it.schema = $sch;
+ $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty);
+ $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty);
+ if ($ownProperties) {
+ out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';
+ } else {
+ out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
+ }
+ out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { ';
+ $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
+ var $passData = $data + '[' + $key + ']';
+ $it.dataPathArr[$dataNxt] = $key;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ if ($breakOnError) {
+ out += ' if (!' + ($nextValid) + ') break; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else ' + ($nextValid) + ' = true; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ }
+ }
+ }
+ if (it.opts.patternGroups && $pgPropertyKeys.length) {
+ var arr6 = $pgPropertyKeys;
+ if (arr6) {
+ var $pgProperty, i6 = -1,
+ l6 = arr6.length - 1;
+ while (i6 < l6) {
+ $pgProperty = arr6[i6 += 1];
+ var $pgSchema = $pgProperties[$pgProperty],
+ $sch = $pgSchema.schema;
+ if (it.util.schemaHasRules($sch, it.RULES.all)) {
+ $it.schema = $sch;
+ $it.schemaPath = it.schemaPath + '.patternGroups' + it.util.getProperty($pgProperty) + '.schema';
+ $it.errSchemaPath = it.errSchemaPath + '/patternGroups/' + it.util.escapeFragment($pgProperty) + '/schema';
+ out += ' var pgPropCount' + ($lvl) + ' = 0; ';
+ if ($ownProperties) {
+ out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';
+ } else {
+ out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
+ }
+ out += ' if (' + (it.usePattern($pgProperty)) + '.test(' + ($key) + ')) { pgPropCount' + ($lvl) + '++; ';
+ $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
+ var $passData = $data + '[' + $key + ']';
+ $it.dataPathArr[$dataNxt] = $key;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ if ($breakOnError) {
+ out += ' if (!' + ($nextValid) + ') break; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else ' + ($nextValid) + ' = true; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $closingBraces += '}';
+ }
+ var $pgMin = $pgSchema.minimum,
+ $pgMax = $pgSchema.maximum;
+ if ($pgMin !== undefined || $pgMax !== undefined) {
+ out += ' var ' + ($valid) + ' = true; ';
+ var $currErrSchemaPath = $errSchemaPath;
+ if ($pgMin !== undefined) {
+ var $limit = $pgMin,
+ $reason = 'minimum',
+ $moreOrLess = 'less';
+ out += ' ' + ($valid) + ' = pgPropCount' + ($lvl) + ' >= ' + ($pgMin) + '; ';
+ $errSchemaPath = it.errSchemaPath + '/patternGroups/minimum';
+ out += ' if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('patternGroups') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { reason: \'' + ($reason) + '\', limit: ' + ($limit) + ', pattern: \'' + (it.util.escapeQuotes($pgProperty)) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT have ' + ($moreOrLess) + ' than ' + ($limit) + ' properties matching pattern "' + (it.util.escapeQuotes($pgProperty)) + '"\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ if ($pgMax !== undefined) {
+ out += ' else ';
+ }
+ }
+ if ($pgMax !== undefined) {
+ var $limit = $pgMax,
+ $reason = 'maximum',
+ $moreOrLess = 'more';
+ out += ' ' + ($valid) + ' = pgPropCount' + ($lvl) + ' <= ' + ($pgMax) + '; ';
+ $errSchemaPath = it.errSchemaPath + '/patternGroups/maximum';
+ out += ' if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('patternGroups') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { reason: \'' + ($reason) + '\', limit: ' + ($limit) + ', pattern: \'' + (it.util.escapeQuotes($pgProperty)) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT have ' + ($moreOrLess) + ' than ' + ($limit) + ' properties matching pattern "' + (it.util.escapeQuotes($pgProperty)) + '"\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ }
+ $errSchemaPath = $currErrSchemaPath;
+ if ($breakOnError) {
+ out += ' if (' + ($valid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ }
+ }
+ }
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
+ }
+ out = it.util.cleanUpCode(out);
+ return out;
+}
+
+},{}],31:[function(require,module,exports){
+'use strict';
+module.exports = function generate_propertyNames(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ if (it.util.schemaHasRules($schema, it.RULES.all)) {
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ var $key = 'key' + $lvl,
+ $idx = 'idx' + $lvl,
+ $i = 'i' + $lvl,
+ $invalidName = '\' + ' + $key + ' + \'',
+ $dataNxt = $it.dataLevel = it.dataLevel + 1,
+ $nextData = 'data' + $dataNxt,
+ $dataProperties = 'dataProperties' + $lvl,
+ $ownProperties = it.opts.ownProperties,
+ $currentBaseId = it.baseId;
+ out += ' var ' + ($errs) + ' = errors; ';
+ if ($ownProperties) {
+ out += ' var ' + ($dataProperties) + ' = undefined; ';
+ }
+ if ($ownProperties) {
+ out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';
+ } else {
+ out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
+ }
+ out += ' var startErrs' + ($lvl) + ' = errors; ';
+ var $passData = $key;
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + '<errors; ' + ($i) + '++) { vErrors[' + ($i) + '].propertyName = ' + ($key) + '; } var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('propertyNames') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { propertyName: \'' + ($invalidName) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'property name \\\'' + ($invalidName) + '\\\' is invalid\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError(vErrors); ';
+ } else {
+ out += ' validate.errors = vErrors; return false; ';
+ }
+ }
+ if ($breakOnError) {
+ out += ' break; ';
+ }
+ out += ' } }';
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
+ }
+ out = it.util.cleanUpCode(out);
+ return out;
+}
+
+},{}],32:[function(require,module,exports){
+'use strict';
+module.exports = function generate_ref(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $async, $refCode;
+ if ($schema == '#' || $schema == '#/') {
+ if (it.isRoot) {
+ $async = it.async;
+ $refCode = 'validate';
+ } else {
+ $async = it.root.schema.$async === true;
+ $refCode = 'root.refVal[0]';
+ }
+ } else {
+ var $refVal = it.resolveRef(it.baseId, $schema, it.isRoot);
+ if ($refVal === undefined) {
+ var $message = it.MissingRefError.message(it.baseId, $schema);
+ if (it.opts.missingRefs == 'fail') {
+ it.logger.error($message);
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('$ref') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { ref: \'' + (it.util.escapeQuotes($schema)) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'can\\\'t resolve reference ' + (it.util.escapeQuotes($schema)) + '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ' + (it.util.toQuotedString($schema)) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ if ($breakOnError) {
+ out += ' if (false) { ';
+ }
+ } else if (it.opts.missingRefs == 'ignore') {
+ it.logger.warn($message);
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ } else {
+ throw new it.MissingRefError(it.baseId, $schema, $message);
+ }
+ } else if ($refVal.inline) {
+ var $it = it.util.copy(it);
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ $it.schema = $refVal.schema;
+ $it.schemaPath = '';
+ $it.errSchemaPath = $schema;
+ var $code = it.validate($it).replace(/validate\.schema/g, $refVal.code);
+ out += ' ' + ($code) + ' ';
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ }
+ } else {
+ $async = $refVal.$async === true;
+ $refCode = $refVal.code;
+ }
+ }
+ if ($refCode) {
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = '';
+ if (it.opts.passContext) {
+ out += ' ' + ($refCode) + '.call(this, ';
+ } else {
+ out += ' ' + ($refCode) + '( ';
+ }
+ out += ' ' + ($data) + ', (dataPath || \'\')';
+ if (it.errorPath != '""') {
+ out += ' + ' + (it.errorPath);
+ }
+ var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData',
+ $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty';
+ out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ', rootData) ';
+ var __callValidate = out;
+ out = $$outStack.pop();
+ if ($async) {
+ if (!it.async) throw new Error('async schema referenced by sync schema');
+ if ($breakOnError) {
+ out += ' var ' + ($valid) + '; ';
+ }
+ out += ' try { ' + (it.yieldAwait) + ' ' + (__callValidate) + '; ';
+ if ($breakOnError) {
+ out += ' ' + ($valid) + ' = true; ';
+ }
+ out += ' } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ';
+ if ($breakOnError) {
+ out += ' ' + ($valid) + ' = false; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' if (' + ($valid) + ') { ';
+ }
+ } else {
+ out += ' if (!' + (__callValidate) + ') { if (vErrors === null) vErrors = ' + ($refCode) + '.errors; else vErrors = vErrors.concat(' + ($refCode) + '.errors); errors = vErrors.length; } ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ }
+ }
+ return out;
+}
+
+},{}],33:[function(require,module,exports){
+'use strict';
+module.exports = function generate_required(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $vSchema = 'schema' + $lvl;
+ if (!$isData) {
+ if ($schema.length < it.opts.loopRequired && it.schema.properties && Object.keys(it.schema.properties).length) {
+ var $required = [];
+ var arr1 = $schema;
+ if (arr1) {
+ var $property, i1 = -1,
+ l1 = arr1.length - 1;
+ while (i1 < l1) {
+ $property = arr1[i1 += 1];
+ var $propertySch = it.schema.properties[$property];
+ if (!($propertySch && it.util.schemaHasRules($propertySch, it.RULES.all))) {
+ $required[$required.length] = $property;
+ }
+ }
+ }
+ } else {
+ var $required = $schema;
+ }
+ }
+ if ($isData || $required.length) {
+ var $currentErrorPath = it.errorPath,
+ $loopRequired = $isData || $required.length >= it.opts.loopRequired,
+ $ownProperties = it.opts.ownProperties;
+ if ($breakOnError) {
+ out += ' var missing' + ($lvl) + '; ';
+ if ($loopRequired) {
+ if (!$isData) {
+ out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; ';
+ }
+ var $i = 'i' + $lvl,
+ $propertyPath = 'schema' + $lvl + '[' + $i + ']',
+ $missingProperty = '\' + ' + $propertyPath + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers);
+ }
+ out += ' var ' + ($valid) + ' = true; ';
+ if ($isData) {
+ out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {';
+ }
+ out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined ';
+ if ($ownProperties) {
+ out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) ';
+ }
+ out += '; if (!' + ($valid) + ') break; } ';
+ if ($isData) {
+ out += ' } ';
+ }
+ out += ' if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is a required property';
+ } else {
+ out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } else { ';
+ } else {
+ out += ' if ( ';
+ var arr2 = $required;
+ if (arr2) {
+ var $propertyKey, $i = -1,
+ l2 = arr2.length - 1;
+ while ($i < l2) {
+ $propertyKey = arr2[$i += 1];
+ if ($i) {
+ out += ' || ';
+ }
+ var $prop = it.util.getProperty($propertyKey),
+ $useData = $data + $prop;
+ out += ' ( ( ' + ($useData) + ' === undefined ';
+ if ($ownProperties) {
+ out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ }
+ out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) ';
+ }
+ }
+ out += ') { ';
+ var $propertyPath = 'missing' + $lvl,
+ $missingProperty = '\' + ' + $propertyPath + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath;
+ }
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is a required property';
+ } else {
+ out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } else { ';
+ }
+ } else {
+ if ($loopRequired) {
+ if (!$isData) {
+ out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; ';
+ }
+ var $i = 'i' + $lvl,
+ $propertyPath = 'schema' + $lvl + '[' + $i + ']',
+ $missingProperty = '\' + ' + $propertyPath + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers);
+ }
+ if ($isData) {
+ out += ' if (' + ($vSchema) + ' && !Array.isArray(' + ($vSchema) + ')) { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is a required property';
+ } else {
+ out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($vSchema) + ' !== undefined) { ';
+ }
+ out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined ';
+ if ($ownProperties) {
+ out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) ';
+ }
+ out += ') { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is a required property';
+ } else {
+ out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ';
+ if ($isData) {
+ out += ' } ';
+ }
+ } else {
+ var arr3 = $required;
+ if (arr3) {
+ var $propertyKey, i3 = -1,
+ l3 = arr3.length - 1;
+ while (i3 < l3) {
+ $propertyKey = arr3[i3 += 1];
+ var $prop = it.util.getProperty($propertyKey),
+ $missingProperty = it.util.escapeQuotes($propertyKey),
+ $useData = $data + $prop;
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
+ }
+ out += ' if ( ' + ($useData) + ' === undefined ';
+ if ($ownProperties) {
+ out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ }
+ out += ') { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is a required property';
+ } else {
+ out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ';
+ }
+ }
+ }
+ }
+ it.errorPath = $currentErrorPath;
+ } else if ($breakOnError) {
+ out += ' if (true) {';
+ }
+ return out;
+}
+
+},{}],34:[function(require,module,exports){
+'use strict';
+module.exports = function generate_uniqueItems(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ if (($schema || $isData) && it.opts.uniqueItems !== false) {
+ if ($isData) {
+ out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'boolean\') ' + ($valid) + ' = false; else { ';
+ }
+ out += ' var ' + ($valid) + ' = true; if (' + ($data) + '.length > 1) { var i = ' + ($data) + '.length, j; outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } } ';
+ if ($isData) {
+ out += ' } ';
+ }
+ out += ' if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('uniqueItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT have duplicate items (items ## \' + j + \' and \' + i + \' are identical)\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ } else {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ }
+ return out;
+}
+
+},{}],35:[function(require,module,exports){
+'use strict';
+module.exports = function generate_validate(it, $keyword, $ruleType) {
+ var out = '';
+ var $async = it.schema.$async === true,
+ $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'),
+ $id = it.self._getId(it.schema);
+ if (it.isTop) {
+ if ($async) {
+ it.async = true;
+ var $es7 = it.opts.async == 'es7';
+ it.yieldAwait = $es7 ? 'await' : 'yield';
+ }
+ out += ' var validate = ';
+ if ($async) {
+ if ($es7) {
+ out += ' (async function ';
+ } else {
+ if (it.opts.async != '*') {
+ out += 'co.wrap';
+ }
+ out += '(function* ';
+ }
+ } else {
+ out += ' (function ';
+ }
+ out += ' (data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; ';
+ if ($id && (it.opts.sourceCode || it.opts.processCode)) {
+ out += ' ' + ('/\*# sourceURL=' + $id + ' */') + ' ';
+ }
+ }
+ if (typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref)) {
+ var $keyword = 'false schema';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ if (it.schema === false) {
+ if (it.isTop) {
+ $breakOnError = true;
+ } else {
+ out += ' var ' + ($valid) + ' = false; ';
+ }
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'false schema') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'boolean schema is false\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ } else {
+ if (it.isTop) {
+ if ($async) {
+ out += ' return data; ';
+ } else {
+ out += ' validate.errors = null; return true; ';
+ }
+ } else {
+ out += ' var ' + ($valid) + ' = true; ';
+ }
+ }
+ if (it.isTop) {
+ out += ' }); return validate; ';
+ }
+ return out;
+ }
+ if (it.isTop) {
+ var $top = it.isTop,
+ $lvl = it.level = 0,
+ $dataLvl = it.dataLevel = 0,
+ $data = 'data';
+ it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema));
+ it.baseId = it.baseId || it.rootId;
+ delete it.isTop;
+ it.dataPathArr = [undefined];
+ out += ' var vErrors = null; ';
+ out += ' var errors = 0; ';
+ out += ' if (rootData === undefined) rootData = data; ';
+ } else {
+ var $lvl = it.level,
+ $dataLvl = it.dataLevel,
+ $data = 'data' + ($dataLvl || '');
+ if ($id) it.baseId = it.resolve.url(it.baseId, $id);
+ if ($async && !it.async) throw new Error('async schema in sync schema');
+ out += ' var errs_' + ($lvl) + ' = errors;';
+ }
+ var $valid = 'valid' + $lvl,
+ $breakOnError = !it.opts.allErrors,
+ $closingBraces1 = '',
+ $closingBraces2 = '';
+ var $errorKeyword;
+ var $typeSchema = it.schema.type,
+ $typeIsArray = Array.isArray($typeSchema);
+ if ($typeIsArray && $typeSchema.length == 1) {
+ $typeSchema = $typeSchema[0];
+ $typeIsArray = false;
+ }
+ if (it.schema.$ref && $refKeywords) {
+ if (it.opts.extendRefs == 'fail') {
+ throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)');
+ } else if (it.opts.extendRefs !== true) {
+ $refKeywords = false;
+ it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"');
+ }
+ }
+ if ($typeSchema) {
+ if (it.opts.coerceTypes) {
+ var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema);
+ }
+ var $rulesGroup = it.RULES.types[$typeSchema];
+ if ($coerceToTypes || $typeIsArray || $rulesGroup === true || ($rulesGroup && !$shouldUseGroup($rulesGroup))) {
+ var $schemaPath = it.schemaPath + '.type',
+ $errSchemaPath = it.errSchemaPath + '/type';
+ var $schemaPath = it.schemaPath + '.type',
+ $errSchemaPath = it.errSchemaPath + '/type',
+ $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType';
+ out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { ';
+ if ($coerceToTypes) {
+ var $dataType = 'dataType' + $lvl,
+ $coerced = 'coerced' + $lvl;
+ out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; ';
+ if (it.opts.coerceTypes == 'array') {
+ out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ')) ' + ($dataType) + ' = \'array\'; ';
+ }
+ out += ' var ' + ($coerced) + ' = undefined; ';
+ var $bracesCoercion = '';
+ var arr1 = $coerceToTypes;
+ if (arr1) {
+ var $type, $i = -1,
+ l1 = arr1.length - 1;
+ while ($i < l1) {
+ $type = arr1[$i += 1];
+ if ($i) {
+ out += ' if (' + ($coerced) + ' === undefined) { ';
+ $bracesCoercion += '}';
+ }
+ if (it.opts.coerceTypes == 'array' && $type != 'array') {
+ out += ' if (' + ($dataType) + ' == \'array\' && ' + ($data) + '.length == 1) { ' + ($coerced) + ' = ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; } ';
+ }
+ if ($type == 'string') {
+ out += ' if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; ';
+ } else if ($type == 'number' || $type == 'integer') {
+ out += ' if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' ';
+ if ($type == 'integer') {
+ out += ' && !(' + ($data) + ' % 1)';
+ }
+ out += ')) ' + ($coerced) + ' = +' + ($data) + '; ';
+ } else if ($type == 'boolean') {
+ out += ' if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; ';
+ } else if ($type == 'null') {
+ out += ' if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; ';
+ } else if (it.opts.coerceTypes == 'array' && $type == 'array') {
+ out += ' if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; ';
+ }
+ }
+ }
+ out += ' ' + ($bracesCoercion) + ' if (' + ($coerced) + ' === undefined) { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \'';
+ if ($typeIsArray) {
+ out += '' + ($typeSchema.join(","));
+ } else {
+ out += '' + ($typeSchema);
+ }
+ out += '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be ';
+ if ($typeIsArray) {
+ out += '' + ($typeSchema.join(","));
+ } else {
+ out += '' + ($typeSchema);
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } else { ';
+ var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData',
+ $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty';
+ out += ' ' + ($data) + ' = ' + ($coerced) + '; ';
+ if (!$dataLvl) {
+ out += 'if (' + ($parentData) + ' !== undefined)';
+ }
+ out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } ';
+ } else {
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \'';
+ if ($typeIsArray) {
+ out += '' + ($typeSchema.join(","));
+ } else {
+ out += '' + ($typeSchema);
+ }
+ out += '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be ';
+ if ($typeIsArray) {
+ out += '' + ($typeSchema.join(","));
+ } else {
+ out += '' + ($typeSchema);
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ }
+ out += ' } ';
+ }
+ }
+ if (it.schema.$ref && !$refKeywords) {
+ out += ' ' + (it.RULES.all.$ref.code(it, '$ref')) + ' ';
+ if ($breakOnError) {
+ out += ' } if (errors === ';
+ if ($top) {
+ out += '0';
+ } else {
+ out += 'errs_' + ($lvl);
+ }
+ out += ') { ';
+ $closingBraces2 += '}';
+ }
+ } else {
+ if (it.opts.v5 && it.schema.patternGroups) {
+ it.logger.warn('keyword "patternGroups" is deprecated and disabled. Use option patternGroups: true to enable.');
+ }
+ var arr2 = it.RULES;
+ if (arr2) {
+ var $rulesGroup, i2 = -1,
+ l2 = arr2.length - 1;
+ while (i2 < l2) {
+ $rulesGroup = arr2[i2 += 1];
+ if ($shouldUseGroup($rulesGroup)) {
+ if ($rulesGroup.type) {
+ out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data)) + ') { ';
+ }
+ if (it.opts.useDefaults && !it.compositeRule) {
+ if ($rulesGroup.type == 'object' && it.schema.properties) {
+ var $schema = it.schema.properties,
+ $schemaKeys = Object.keys($schema);
+ var arr3 = $schemaKeys;
+ if (arr3) {
+ var $propertyKey, i3 = -1,
+ l3 = arr3.length - 1;
+ while (i3 < l3) {
+ $propertyKey = arr3[i3 += 1];
+ var $sch = $schema[$propertyKey];
+ if ($sch.default !== undefined) {
+ var $passData = $data + it.util.getProperty($propertyKey);
+ out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = ';
+ if (it.opts.useDefaults == 'shared') {
+ out += ' ' + (it.useDefault($sch.default)) + ' ';
+ } else {
+ out += ' ' + (JSON.stringify($sch.default)) + ' ';
+ }
+ out += '; ';
+ }
+ }
+ }
+ } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) {
+ var arr4 = it.schema.items;
+ if (arr4) {
+ var $sch, $i = -1,
+ l4 = arr4.length - 1;
+ while ($i < l4) {
+ $sch = arr4[$i += 1];
+ if ($sch.default !== undefined) {
+ var $passData = $data + '[' + $i + ']';
+ out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = ';
+ if (it.opts.useDefaults == 'shared') {
+ out += ' ' + (it.useDefault($sch.default)) + ' ';
+ } else {
+ out += ' ' + (JSON.stringify($sch.default)) + ' ';
+ }
+ out += '; ';
+ }
+ }
+ }
+ }
+ }
+ var arr5 = $rulesGroup.rules;
+ if (arr5) {
+ var $rule, i5 = -1,
+ l5 = arr5.length - 1;
+ while (i5 < l5) {
+ $rule = arr5[i5 += 1];
+ if ($shouldUseRule($rule)) {
+ var $code = $rule.code(it, $rule.keyword, $rulesGroup.type);
+ if ($code) {
+ out += ' ' + ($code) + ' ';
+ if ($breakOnError) {
+ $closingBraces1 += '}';
+ }
+ }
+ }
+ }
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces1) + ' ';
+ $closingBraces1 = '';
+ }
+ if ($rulesGroup.type) {
+ out += ' } ';
+ if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) {
+ out += ' else { ';
+ var $schemaPath = it.schemaPath + '.type',
+ $errSchemaPath = it.errSchemaPath + '/type';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \'';
+ if ($typeIsArray) {
+ out += '' + ($typeSchema.join(","));
+ } else {
+ out += '' + ($typeSchema);
+ }
+ out += '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be ';
+ if ($typeIsArray) {
+ out += '' + ($typeSchema.join(","));
+ } else {
+ out += '' + ($typeSchema);
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ }
+ }
+ if ($breakOnError) {
+ out += ' if (errors === ';
+ if ($top) {
+ out += '0';
+ } else {
+ out += 'errs_' + ($lvl);
+ }
+ out += ') { ';
+ $closingBraces2 += '}';
+ }
+ }
+ }
+ }
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces2) + ' ';
+ }
+ if ($top) {
+ if ($async) {
+ out += ' if (errors === 0) return data; ';
+ out += ' else throw new ValidationError(vErrors); ';
+ } else {
+ out += ' validate.errors = vErrors; ';
+ out += ' return errors === 0; ';
+ }
+ out += ' }); return validate;';
+ } else {
+ out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';';
+ }
+ out = it.util.cleanUpCode(out);
+ if ($top) {
+ out = it.util.finalCleanUpCode(out, $async);
+ }
+
+ function $shouldUseGroup($rulesGroup) {
+ var rules = $rulesGroup.rules;
+ for (var i = 0; i < rules.length; i++)
+ if ($shouldUseRule(rules[i])) return true;
+ }
+
+ function $shouldUseRule($rule) {
+ return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImplementsSomeKeyword($rule));
+ }
+
+ function $ruleImplementsSomeKeyword($rule) {
+ var impl = $rule.implements;
+ for (var i = 0; i < impl.length; i++)
+ if (it.schema[impl[i]] !== undefined) return true;
+ }
+ return out;
+}
+
+},{}],36:[function(require,module,exports){
+'use strict';
+
+var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i;
+var customRuleCode = require('./dotjs/custom');
+
+module.exports = {
+ add: addKeyword,
+ get: getKeyword,
+ remove: removeKeyword
+};
+
+/**
+ * Define custom keyword
+ * @this Ajv
+ * @param {String} keyword custom keyword, should be unique (including different from all standard, custom and macro keywords).
+ * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`.
+ * @return {Ajv} this for method chaining
+ */
+function addKeyword(keyword, definition) {
+ /* jshint validthis: true */
+ /* eslint no-shadow: 0 */
+ var RULES = this.RULES;
+
+ if (RULES.keywords[keyword])
+ throw new Error('Keyword ' + keyword + ' is already defined');
+
+ if (!IDENTIFIER.test(keyword))
+ throw new Error('Keyword ' + keyword + ' is not a valid identifier');
+
+ if (definition) {
+ if (definition.macro && definition.valid !== undefined)
+ throw new Error('"valid" option cannot be used with macro keywords');
+
+ var dataType = definition.type;
+ if (Array.isArray(dataType)) {
+ var i, len = dataType.length;
+ for (i=0; i<len; i++) checkDataType(dataType[i]);
+ for (i=0; i<len; i++) _addRule(keyword, dataType[i], definition);
+ } else {
+ if (dataType) checkDataType(dataType);
+ _addRule(keyword, dataType, definition);
+ }
+
+ var $data = definition.$data === true && this._opts.$data;
+ if ($data && !definition.validate)
+ throw new Error('$data support: "validate" function is not defined');
+
+ var metaSchema = definition.metaSchema;
+ if (metaSchema) {
+ if ($data) {
+ metaSchema = {
+ anyOf: [
+ metaSchema,
+ { '$ref': 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#' }
+ ]
+ };
+ }
+ definition.validateSchema = this.compile(metaSchema, true);
+ }
+ }
+
+ RULES.keywords[keyword] = RULES.all[keyword] = true;
+
+
+ function _addRule(keyword, dataType, definition) {
+ var ruleGroup;
+ for (var i=0; i<RULES.length; i++) {
+ var rg = RULES[i];
+ if (rg.type == dataType) {
+ ruleGroup = rg;
+ break;
+ }
+ }
+
+ if (!ruleGroup) {
+ ruleGroup = { type: dataType, rules: [] };
+ RULES.push(ruleGroup);
+ }
+
+ var rule = {
+ keyword: keyword,
+ definition: definition,
+ custom: true,
+ code: customRuleCode,
+ implements: definition.implements
+ };
+ ruleGroup.rules.push(rule);
+ RULES.custom[keyword] = rule;
+ }
+
+
+ function checkDataType(dataType) {
+ if (!RULES.types[dataType]) throw new Error('Unknown type ' + dataType);
+ }
+
+ return this;
+}
+
+
+/**
+ * Get keyword
+ * @this Ajv
+ * @param {String} keyword pre-defined or custom keyword.
+ * @return {Object|Boolean} custom keyword definition, `true` if it is a predefined keyword, `false` otherwise.
+ */
+function getKeyword(keyword) {
+ /* jshint validthis: true */
+ var rule = this.RULES.custom[keyword];
+ return rule ? rule.definition : this.RULES.keywords[keyword] || false;
+}
+
+
+/**
+ * Remove keyword
+ * @this Ajv
+ * @param {String} keyword pre-defined or custom keyword.
+ * @return {Ajv} this for method chaining
+ */
+function removeKeyword(keyword) {
+ /* jshint validthis: true */
+ var RULES = this.RULES;
+ delete RULES.keywords[keyword];
+ delete RULES.all[keyword];
+ delete RULES.custom[keyword];
+ for (var i=0; i<RULES.length; i++) {
+ var rules = RULES[i].rules;
+ for (var j=0; j<rules.length; j++) {
+ if (rules[j].keyword == keyword) {
+ rules.splice(j, 1);
+ break;
+ }
+ }
+ }
+ return this;
+}
+
+},{"./dotjs/custom":21}],37:[function(require,module,exports){
+'use strict';
+
+var META_SCHEMA_ID = 'http://json-schema.org/draft-06/schema';
+
+module.exports = function (ajv) {
+ var defaultMeta = ajv._opts.defaultMeta;
+ var metaSchemaRef = typeof defaultMeta == 'string'
+ ? { $ref: defaultMeta }
+ : ajv.getSchema(META_SCHEMA_ID)
+ ? { $ref: META_SCHEMA_ID }
+ : {};
+
+ ajv.addKeyword('patternGroups', {
+ // implemented in properties.jst
+ metaSchema: {
+ type: 'object',
+ additionalProperties: {
+ type: 'object',
+ required: [ 'schema' ],
+ properties: {
+ maximum: {
+ type: 'integer',
+ minimum: 0
+ },
+ minimum: {
+ type: 'integer',
+ minimum: 0
+ },
+ schema: metaSchemaRef
+ },
+ additionalProperties: false
+ }
+ }
+ });
+ ajv.RULES.all.properties.implements.push('patternGroups');
+};
+
+},{}],38:[function(require,module,exports){
+module.exports={
+ "$schema": "http://json-schema.org/draft-06/schema#",
+ "$id": "https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#",
+ "description": "Meta-schema for $data reference (JSON-schema extension proposal)",
+ "type": "object",
+ "required": [ "$data" ],
+ "properties": {
+ "$data": {
+ "type": "string",
+ "anyOf": [
+ { "format": "relative-json-pointer" },
+ { "format": "json-pointer" }
+ ]
+ }
+ },
+ "additionalProperties": false
+}
+
+},{}],39:[function(require,module,exports){
+module.exports={
+ "$schema": "http://json-schema.org/draft-06/schema#",
+ "$id": "http://json-schema.org/draft-06/schema#",
+ "title": "Core schema meta-schema",
+ "definitions": {
+ "schemaArray": {
+ "type": "array",
+ "minItems": 1,
+ "items": { "$ref": "#" }
+ },
+ "nonNegativeInteger": {
+ "type": "integer",
+ "minimum": 0
+ },
+ "nonNegativeIntegerDefault0": {
+ "allOf": [
+ { "$ref": "#/definitions/nonNegativeInteger" },
+ { "default": 0 }
+ ]
+ },
+ "simpleTypes": {
+ "enum": [
+ "array",
+ "boolean",
+ "integer",
+ "null",
+ "number",
+ "object",
+ "string"
+ ]
+ },
+ "stringArray": {
+ "type": "array",
+ "items": { "type": "string" },
+ "uniqueItems": true,
+ "default": []
+ }
+ },
+ "type": ["object", "boolean"],
+ "properties": {
+ "$id": {
+ "type": "string",
+ "format": "uri-reference"
+ },
+ "$schema": {
+ "type": "string",
+ "format": "uri"
+ },
+ "$ref": {
+ "type": "string",
+ "format": "uri-reference"
+ },
+ "title": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "default": {},
+ "examples": {
+ "type": "array",
+ "items": {}
+ },
+ "multipleOf": {
+ "type": "number",
+ "exclusiveMinimum": 0
+ },
+ "maximum": {
+ "type": "number"
+ },
+ "exclusiveMaximum": {
+ "type": "number"
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "exclusiveMinimum": {
+ "type": "number"
+ },
+ "maxLength": { "$ref": "#/definitions/nonNegativeInteger" },
+ "minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
+ "pattern": {
+ "type": "string",
+ "format": "regex"
+ },
+ "additionalItems": { "$ref": "#" },
+ "items": {
+ "anyOf": [
+ { "$ref": "#" },
+ { "$ref": "#/definitions/schemaArray" }
+ ],
+ "default": {}
+ },
+ "maxItems": { "$ref": "#/definitions/nonNegativeInteger" },
+ "minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
+ "uniqueItems": {
+ "type": "boolean",
+ "default": false
+ },
+ "contains": { "$ref": "#" },
+ "maxProperties": { "$ref": "#/definitions/nonNegativeInteger" },
+ "minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
+ "required": { "$ref": "#/definitions/stringArray" },
+ "additionalProperties": { "$ref": "#" },
+ "definitions": {
+ "type": "object",
+ "additionalProperties": { "$ref": "#" },
+ "default": {}
+ },
+ "properties": {
+ "type": "object",
+ "additionalProperties": { "$ref": "#" },
+ "default": {}
+ },
+ "patternProperties": {
+ "type": "object",
+ "additionalProperties": { "$ref": "#" },
+ "default": {}
+ },
+ "dependencies": {
+ "type": "object",
+ "additionalProperties": {
+ "anyOf": [
+ { "$ref": "#" },
+ { "$ref": "#/definitions/stringArray" }
+ ]
+ }
+ },
+ "propertyNames": { "$ref": "#" },
+ "const": {},
+ "enum": {
+ "type": "array",
+ "minItems": 1,
+ "uniqueItems": true
+ },
+ "type": {
+ "anyOf": [
+ { "$ref": "#/definitions/simpleTypes" },
+ {
+ "type": "array",
+ "items": { "$ref": "#/definitions/simpleTypes" },
+ "minItems": 1,
+ "uniqueItems": true
+ }
+ ]
+ },
+ "format": { "type": "string" },
+ "allOf": { "$ref": "#/definitions/schemaArray" },
+ "anyOf": { "$ref": "#/definitions/schemaArray" },
+ "oneOf": { "$ref": "#/definitions/schemaArray" },
+ "not": { "$ref": "#" }
+ },
+ "default": {}
+}
+
+},{}],40:[function(require,module,exports){
+
+/**
+ * slice() reference.
+ */
+
+var slice = Array.prototype.slice;
+
+/**
+ * Expose `co`.
+ */
+
+module.exports = co['default'] = co.co = co;
+
+/**
+ * Wrap the given generator `fn` into a
+ * function that returns a promise.
+ * This is a separate function so that
+ * every `co()` call doesn't create a new,
+ * unnecessary closure.
+ *
+ * @param {GeneratorFunction} fn
+ * @return {Function}
+ * @api public
+ */
+
+co.wrap = function (fn) {
+ createPromise.__generatorFunction__ = fn;
+ return createPromise;
+ function createPromise() {
+ return co.call(this, fn.apply(this, arguments));
+ }
+};
+
+/**
+ * Execute the generator function or a generator
+ * and return a promise.
+ *
+ * @param {Function} fn
+ * @return {Promise}
+ * @api public
+ */
+
+function co(gen) {
+ var ctx = this;
+ var args = slice.call(arguments, 1)
+
+ // we wrap everything in a promise to avoid promise chaining,
+ // which leads to memory leak errors.
+ // see https://github.com/tj/co/issues/180
+ return new Promise(function(resolve, reject) {
+ if (typeof gen === 'function') gen = gen.apply(ctx, args);
+ if (!gen || typeof gen.next !== 'function') return resolve(gen);
+
+ onFulfilled();
+
+ /**
+ * @param {Mixed} res
+ * @return {Promise}
+ * @api private
+ */
+
+ function onFulfilled(res) {
+ var ret;
+ try {
+ ret = gen.next(res);
+ } catch (e) {
+ return reject(e);
+ }
+ next(ret);
+ }
+
+ /**
+ * @param {Error} err
+ * @return {Promise}
+ * @api private
+ */
+
+ function onRejected(err) {
+ var ret;
+ try {
+ ret = gen.throw(err);
+ } catch (e) {
+ return reject(e);
+ }
+ next(ret);
+ }
+
+ /**
+ * Get the next value in the generator,
+ * return a promise.
+ *
+ * @param {Object} ret
+ * @return {Promise}
+ * @api private
+ */
+
+ function next(ret) {
+ if (ret.done) return resolve(ret.value);
+ var value = toPromise.call(ctx, ret.value);
+ if (value && isPromise(value)) return value.then(onFulfilled, onRejected);
+ return onRejected(new TypeError('You may only yield a function, promise, generator, array, or object, '
+ + 'but the following object was passed: "' + String(ret.value) + '"'));
+ }
+ });
+}
+
+/**
+ * Convert a `yield`ed value into a promise.
+ *
+ * @param {Mixed} obj
+ * @return {Promise}
+ * @api private
+ */
+
+function toPromise(obj) {
+ if (!obj) return obj;
+ if (isPromise(obj)) return obj;
+ if (isGeneratorFunction(obj) || isGenerator(obj)) return co.call(this, obj);
+ if ('function' == typeof obj) return thunkToPromise.call(this, obj);
+ if (Array.isArray(obj)) return arrayToPromise.call(this, obj);
+ if (isObject(obj)) return objectToPromise.call(this, obj);
+ return obj;
+}
+
+/**
+ * Convert a thunk to a promise.
+ *
+ * @param {Function}
+ * @return {Promise}
+ * @api private
+ */
+
+function thunkToPromise(fn) {
+ var ctx = this;
+ return new Promise(function (resolve, reject) {
+ fn.call(ctx, function (err, res) {
+ if (err) return reject(err);
+ if (arguments.length > 2) res = slice.call(arguments, 1);
+ resolve(res);
+ });
+ });
+}
+
+/**
+ * Convert an array of "yieldables" to a promise.
+ * Uses `Promise.all()` internally.
+ *
+ * @param {Array} obj
+ * @return {Promise}
+ * @api private
+ */
+
+function arrayToPromise(obj) {
+ return Promise.all(obj.map(toPromise, this));
+}
+
+/**
+ * Convert an object of "yieldables" to a promise.
+ * Uses `Promise.all()` internally.
+ *
+ * @param {Object} obj
+ * @return {Promise}
+ * @api private
+ */
+
+function objectToPromise(obj){
+ var results = new obj.constructor();
+ var keys = Object.keys(obj);
+ var promises = [];
+ for (var i = 0; i < keys.length; i++) {
+ var key = keys[i];
+ var promise = toPromise.call(this, obj[key]);
+ if (promise && isPromise(promise)) defer(promise, key);
+ else results[key] = obj[key];
+ }
+ return Promise.all(promises).then(function () {
+ return results;
+ });
+
+ function defer(promise, key) {
+ // predefine the key in the result
+ results[key] = undefined;
+ promises.push(promise.then(function (res) {
+ results[key] = res;
+ }));
+ }
+}
+
+/**
+ * Check if `obj` is a promise.
+ *
+ * @param {Object} obj
+ * @return {Boolean}
+ * @api private
+ */
+
+function isPromise(obj) {
+ return 'function' == typeof obj.then;
+}
+
+/**
+ * Check if `obj` is a generator.
+ *
+ * @param {Mixed} obj
+ * @return {Boolean}
+ * @api private
+ */
+
+function isGenerator(obj) {
+ return 'function' == typeof obj.next && 'function' == typeof obj.throw;
+}
+
+/**
+ * Check if `obj` is a generator function.
+ *
+ * @param {Mixed} obj
+ * @return {Boolean}
+ * @api private
+ */
+function isGeneratorFunction(obj) {
+ var constructor = obj.constructor;
+ if (!constructor) return false;
+ if ('GeneratorFunction' === constructor.name || 'GeneratorFunction' === constructor.displayName) return true;
+ return isGenerator(constructor.prototype);
+}
+
+/**
+ * Check for plain object.
+ *
+ * @param {Mixed} val
+ * @return {Boolean}
+ * @api private
+ */
+
+function isObject(val) {
+ return Object == val.constructor;
+}
+
+},{}],41:[function(require,module,exports){
+'use strict';
+
+module.exports = function equal(a, b) {
+ if (a === b) return true;
+
+ var arrA = Array.isArray(a)
+ , arrB = Array.isArray(b)
+ , i;
+
+ if (arrA && arrB) {
+ if (a.length != b.length) return false;
+ for (i = 0; i < a.length; i++)
+ if (!equal(a[i], b[i])) return false;
+ return true;
+ }
+
+ if (arrA != arrB) return false;
+
+ if (a && b && typeof a === 'object' && typeof b === 'object') {
+ var keys = Object.keys(a);
+ if (keys.length !== Object.keys(b).length) return false;
+
+ var dateA = a instanceof Date
+ , dateB = b instanceof Date;
+ if (dateA && dateB) return a.getTime() == b.getTime();
+ if (dateA != dateB) return false;
+
+ var regexpA = a instanceof RegExp
+ , regexpB = b instanceof RegExp;
+ if (regexpA && regexpB) return a.toString() == b.toString();
+ if (regexpA != regexpB) return false;
+
+ for (i = 0; i < keys.length; i++)
+ if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
+
+ for (i = 0; i < keys.length; i++)
+ if(!equal(a[keys[i]], b[keys[i]])) return false;
+
+ return true;
+ }
+
+ return false;
+};
+
+},{}],42:[function(require,module,exports){
+'use strict';
+
+module.exports = function (data, opts) {
+ if (!opts) opts = {};
+ if (typeof opts === 'function') opts = { cmp: opts };
+ var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false;
+
+ var cmp = opts.cmp && (function (f) {
+ return function (node) {
+ return function (a, b) {
+ var aobj = { key: a, value: node[a] };
+ var bobj = { key: b, value: node[b] };
+ return f(aobj, bobj);
+ };
+ };
+ })(opts.cmp);
+
+ var seen = [];
+ return (function stringify (node) {
+ if (node && node.toJSON && typeof node.toJSON === 'function') {
+ node = node.toJSON();
+ }
+
+ if (node === undefined) return;
+ if (typeof node == 'number') return isFinite(node) ? '' + node : 'null';
+ if (typeof node !== 'object') return JSON.stringify(node);
+
+ var i, out;
+ if (Array.isArray(node)) {
+ out = '[';
+ for (i = 0; i < node.length; i++) {
+ if (i) out += ',';
+ out += stringify(node[i]) || 'null';
+ }
+ return out + ']';
+ }
+
+ if (node === null) return 'null';
+
+ if (seen.indexOf(node) !== -1) {
+ if (cycles) return JSON.stringify('__cycle__');
+ throw new TypeError('Converting circular structure to JSON');
+ }
+
+ var seenIndex = seen.push(node) - 1;
+ var keys = Object.keys(node).sort(cmp && cmp(node));
+ out = '';
+ for (i = 0; i < keys.length; i++) {
+ var key = keys[i];
+ var value = stringify(node[key]);
+
+ if (!value) continue;
+ if (out) out += ',';
+ out += JSON.stringify(key) + ':' + value;
+ }
+ seen.splice(seenIndex, 1);
+ return '{' + out + '}';
+ })(data);
+};
+
+},{}],43:[function(require,module,exports){
+'use strict';
+
+var traverse = module.exports = function (schema, opts, cb) {
+ if (typeof opts == 'function') {
+ cb = opts;
+ opts = {};
+ }
+ _traverse(opts, cb, schema, '', schema);
+};
+
+
+traverse.keywords = {
+ additionalItems: true,
+ items: true,
+ contains: true,
+ additionalProperties: true,
+ propertyNames: true,
+ not: true
+};
+
+traverse.arrayKeywords = {
+ items: true,
+ allOf: true,
+ anyOf: true,
+ oneOf: true
+};
+
+traverse.propsKeywords = {
+ definitions: true,
+ properties: true,
+ patternProperties: true,
+ dependencies: true
+};
+
+traverse.skipKeywords = {
+ enum: true,
+ const: true,
+ required: true,
+ maximum: true,
+ minimum: true,
+ exclusiveMaximum: true,
+ exclusiveMinimum: true,
+ multipleOf: true,
+ maxLength: true,
+ minLength: true,
+ pattern: true,
+ format: true,
+ maxItems: true,
+ minItems: true,
+ uniqueItems: true,
+ maxProperties: true,
+ minProperties: true
+};
+
+
+function _traverse(opts, cb, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {
+ if (schema && typeof schema == 'object' && !Array.isArray(schema)) {
+ cb(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);
+ for (var key in schema) {
+ var sch = schema[key];
+ if (Array.isArray(sch)) {
+ if (key in traverse.arrayKeywords) {
+ for (var i=0; i<sch.length; i++)
+ _traverse(opts, cb, sch[i], jsonPtr + '/' + key + '/' + i, rootSchema, jsonPtr, key, schema, i);
+ }
+ } else if (key in traverse.propsKeywords) {
+ if (sch && typeof sch == 'object') {
+ for (var prop in sch)
+ _traverse(opts, cb, sch[prop], jsonPtr + '/' + key + '/' + escapeJsonPtr(prop), rootSchema, jsonPtr, key, schema, prop);
+ }
+ } else if (key in traverse.keywords || (opts.allKeys && !(key in traverse.skipKeywords))) {
+ _traverse(opts, cb, sch, jsonPtr + '/' + key, rootSchema, jsonPtr, key, schema);
+ }
+ }
+ }
+}
+
+
+function escapeJsonPtr(str) {
+ return str.replace(/~/g, '~0').replace(/\//g, '~1');
+}
+
+},{}],44:[function(require,module,exports){
+(function (global){
+/*! https://mths.be/punycode v1.4.1 by @mathias */
+;(function(root) {
+
+ /** Detect free variables */
+ var freeExports = typeof exports == 'object' && exports &&
+ !exports.nodeType && exports;
+ var freeModule = typeof module == 'object' && module &&
+ !module.nodeType && module;
+ var freeGlobal = typeof global == 'object' && global;
+ if (
+ freeGlobal.global === freeGlobal ||
+ freeGlobal.window === freeGlobal ||
+ freeGlobal.self === freeGlobal
+ ) {
+ root = freeGlobal;
+ }
+
+ /**
+ * The `punycode` object.
+ * @name punycode
+ * @type Object
+ */
+ var punycode,
+
+ /** Highest positive signed 32-bit float value */
+ maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1
+
+ /** Bootstring parameters */
+ base = 36,
+ tMin = 1,
+ tMax = 26,
+ skew = 38,
+ damp = 700,
+ initialBias = 72,
+ initialN = 128, // 0x80
+ delimiter = '-', // '\x2D'
+
+ /** Regular expressions */
+ regexPunycode = /^xn--/,
+ regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars
+ regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators
+
+ /** Error messages */
+ errors = {
+ 'overflow': 'Overflow: input needs wider integers to process',
+ 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
+ 'invalid-input': 'Invalid input'
+ },
+
+ /** Convenience shortcuts */
+ baseMinusTMin = base - tMin,
+ floor = Math.floor,
+ stringFromCharCode = String.fromCharCode,
+
+ /** Temporary variable */
+ key;
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * A generic error utility function.
+ * @private
+ * @param {String} type The error type.
+ * @returns {Error} Throws a `RangeError` with the applicable error message.
+ */
+ function error(type) {
+ throw new RangeError(errors[type]);
+ }
+
+ /**
+ * A generic `Array#map` utility function.
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} callback The function that gets called for every array
+ * item.
+ * @returns {Array} A new array of values returned by the callback function.
+ */
+ function map(array, fn) {
+ var length = array.length;
+ var result = [];
+ while (length--) {
+ result[length] = fn(array[length]);
+ }
+ return result;
+ }
+
+ /**
+ * A simple `Array#map`-like wrapper to work with domain name strings or email
+ * addresses.
+ * @private
+ * @param {String} domain The domain name or email address.
+ * @param {Function} callback The function that gets called for every
+ * character.
+ * @returns {Array} A new string of characters returned by the callback
+ * function.
+ */
+ function mapDomain(string, fn) {
+ var parts = string.split('@');
+ var result = '';
+ if (parts.length > 1) {
+ // In email addresses, only the domain name should be punycoded. Leave
+ // the local part (i.e. everything up to `@`) intact.
+ result = parts[0] + '@';
+ string = parts[1];
+ }
+ // Avoid `split(regex)` for IE8 compatibility. See #17.
+ string = string.replace(regexSeparators, '\x2E');
+ var labels = string.split('.');
+ var encoded = map(labels, fn).join('.');
+ return result + encoded;
+ }
+
+ /**
+ * Creates an array containing the numeric code points of each Unicode
+ * character in the string. While JavaScript uses UCS-2 internally,
+ * this function will convert a pair of surrogate halves (each of which
+ * UCS-2 exposes as separate characters) into a single code point,
+ * matching UTF-16.
+ * @see `punycode.ucs2.encode`
+ * @see <https://mathiasbynens.be/notes/javascript-encoding>
+ * @memberOf punycode.ucs2
+ * @name decode
+ * @param {String} string The Unicode input string (UCS-2).
+ * @returns {Array} The new array of code points.
+ */
+ function ucs2decode(string) {
+ var output = [],
+ counter = 0,
+ length = string.length,
+ value,
+ extra;
+ while (counter < length) {
+ value = string.charCodeAt(counter++);
+ if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
+ // high surrogate, and there is a next character
+ extra = string.charCodeAt(counter++);
+ if ((extra & 0xFC00) == 0xDC00) { // low surrogate
+ output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
+ } else {
+ // unmatched surrogate; only append this code unit, in case the next
+ // code unit is the high surrogate of a surrogate pair
+ output.push(value);
+ counter--;
+ }
+ } else {
+ output.push(value);
+ }
+ }
+ return output;
+ }
+
+ /**
+ * Creates a string based on an array of numeric code points.
+ * @see `punycode.ucs2.decode`
+ * @memberOf punycode.ucs2
+ * @name encode
+ * @param {Array} codePoints The array of numeric code points.
+ * @returns {String} The new Unicode string (UCS-2).
+ */
+ function ucs2encode(array) {
+ return map(array, function(value) {
+ var output = '';
+ if (value > 0xFFFF) {
+ value -= 0x10000;
+ output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
+ value = 0xDC00 | value & 0x3FF;
+ }
+ output += stringFromCharCode(value);
+ return output;
+ }).join('');
+ }
+
+ /**
+ * Converts a basic code point into a digit/integer.
+ * @see `digitToBasic()`
+ * @private
+ * @param {Number} codePoint The basic numeric code point value.
+ * @returns {Number} The numeric value of a basic code point (for use in
+ * representing integers) in the range `0` to `base - 1`, or `base` if
+ * the code point does not represent a value.
+ */
+ function basicToDigit(codePoint) {
+ if (codePoint - 48 < 10) {
+ return codePoint - 22;
+ }
+ if (codePoint - 65 < 26) {
+ return codePoint - 65;
+ }
+ if (codePoint - 97 < 26) {
+ return codePoint - 97;
+ }
+ return base;
+ }
+
+ /**
+ * Converts a digit/integer into a basic code point.
+ * @see `basicToDigit()`
+ * @private
+ * @param {Number} digit The numeric value of a basic code point.
+ * @returns {Number} The basic code point whose value (when used for
+ * representing integers) is `digit`, which needs to be in the range
+ * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
+ * used; else, the lowercase form is used. The behavior is undefined
+ * if `flag` is non-zero and `digit` has no uppercase form.
+ */
+ function digitToBasic(digit, flag) {
+ // 0..25 map to ASCII a..z or A..Z
+ // 26..35 map to ASCII 0..9
+ return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
+ }
+
+ /**
+ * Bias adaptation function as per section 3.4 of RFC 3492.
+ * https://tools.ietf.org/html/rfc3492#section-3.4
+ * @private
+ */
+ function adapt(delta, numPoints, firstTime) {
+ var k = 0;
+ delta = firstTime ? floor(delta / damp) : delta >> 1;
+ delta += floor(delta / numPoints);
+ for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
+ delta = floor(delta / baseMinusTMin);
+ }
+ return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
+ }
+
+ /**
+ * Converts a Punycode string of ASCII-only symbols to a string of Unicode
+ * symbols.
+ * @memberOf punycode
+ * @param {String} input The Punycode string of ASCII-only symbols.
+ * @returns {String} The resulting string of Unicode symbols.
+ */
+ function decode(input) {
+ // Don't use UCS-2
+ var output = [],
+ inputLength = input.length,
+ out,
+ i = 0,
+ n = initialN,
+ bias = initialBias,
+ basic,
+ j,
+ index,
+ oldi,
+ w,
+ k,
+ digit,
+ t,
+ /** Cached calculation results */
+ baseMinusT;
+
+ // Handle the basic code points: let `basic` be the number of input code
+ // points before the last delimiter, or `0` if there is none, then copy
+ // the first basic code points to the output.
+
+ basic = input.lastIndexOf(delimiter);
+ if (basic < 0) {
+ basic = 0;
+ }
+
+ for (j = 0; j < basic; ++j) {
+ // if it's not a basic code point
+ if (input.charCodeAt(j) >= 0x80) {
+ error('not-basic');
+ }
+ output.push(input.charCodeAt(j));
+ }
+
+ // Main decoding loop: start just after the last delimiter if any basic code
+ // points were copied; start at the beginning otherwise.
+
+ for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {
+
+ // `index` is the index of the next character to be consumed.
+ // Decode a generalized variable-length integer into `delta`,
+ // which gets added to `i`. The overflow checking is easier
+ // if we increase `i` as we go, then subtract off its starting
+ // value at the end to obtain `delta`.
+ for (oldi = i, w = 1, k = base; /* no condition */; k += base) {
+
+ if (index >= inputLength) {
+ error('invalid-input');
+ }
+
+ digit = basicToDigit(input.charCodeAt(index++));
+
+ if (digit >= base || digit > floor((maxInt - i) / w)) {
+ error('overflow');
+ }
+
+ i += digit * w;
+ t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
+
+ if (digit < t) {
+ break;
+ }
+
+ baseMinusT = base - t;
+ if (w > floor(maxInt / baseMinusT)) {
+ error('overflow');
+ }
+
+ w *= baseMinusT;
+
+ }
+
+ out = output.length + 1;
+ bias = adapt(i - oldi, out, oldi == 0);
+
+ // `i` was supposed to wrap around from `out` to `0`,
+ // incrementing `n` each time, so we'll fix that now:
+ if (floor(i / out) > maxInt - n) {
+ error('overflow');
+ }
+
+ n += floor(i / out);
+ i %= out;
+
+ // Insert `n` at position `i` of the output
+ output.splice(i++, 0, n);
+
+ }
+
+ return ucs2encode(output);
+ }
+
+ /**
+ * Converts a string of Unicode symbols (e.g. a domain name label) to a
+ * Punycode string of ASCII-only symbols.
+ * @memberOf punycode
+ * @param {String} input The string of Unicode symbols.
+ * @returns {String} The resulting Punycode string of ASCII-only symbols.
+ */
+ function encode(input) {
+ var n,
+ delta,
+ handledCPCount,
+ basicLength,
+ bias,
+ j,
+ m,
+ q,
+ k,
+ t,
+ currentValue,
+ output = [],
+ /** `inputLength` will hold the number of code points in `input`. */
+ inputLength,
+ /** Cached calculation results */
+ handledCPCountPlusOne,
+ baseMinusT,
+ qMinusT;
+
+ // Convert the input in UCS-2 to Unicode
+ input = ucs2decode(input);
+
+ // Cache the length
+ inputLength = input.length;
+
+ // Initialize the state
+ n = initialN;
+ delta = 0;
+ bias = initialBias;
+
+ // Handle the basic code points
+ for (j = 0; j < inputLength; ++j) {
+ currentValue = input[j];
+ if (currentValue < 0x80) {
+ output.push(stringFromCharCode(currentValue));
+ }
+ }
+
+ handledCPCount = basicLength = output.length;
+
+ // `handledCPCount` is the number of code points that have been handled;
+ // `basicLength` is the number of basic code points.
+
+ // Finish the basic string - if it is not empty - with a delimiter
+ if (basicLength) {
+ output.push(delimiter);
+ }
+
+ // Main encoding loop:
+ while (handledCPCount < inputLength) {
+
+ // All non-basic code points < n have been handled already. Find the next
+ // larger one:
+ for (m = maxInt, j = 0; j < inputLength; ++j) {
+ currentValue = input[j];
+ if (currentValue >= n && currentValue < m) {
+ m = currentValue;
+ }
+ }
+
+ // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
+ // but guard against overflow
+ handledCPCountPlusOne = handledCPCount + 1;
+ if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
+ error('overflow');
+ }
+
+ delta += (m - n) * handledCPCountPlusOne;
+ n = m;
+
+ for (j = 0; j < inputLength; ++j) {
+ currentValue = input[j];
+
+ if (currentValue < n && ++delta > maxInt) {
+ error('overflow');
+ }
+
+ if (currentValue == n) {
+ // Represent delta as a generalized variable-length integer
+ for (q = delta, k = base; /* no condition */; k += base) {
+ t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
+ if (q < t) {
+ break;
+ }
+ qMinusT = q - t;
+ baseMinusT = base - t;
+ output.push(
+ stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
+ );
+ q = floor(qMinusT / baseMinusT);
+ }
+
+ output.push(stringFromCharCode(digitToBasic(q, 0)));
+ bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
+ delta = 0;
+ ++handledCPCount;
+ }
+ }
+
+ ++delta;
+ ++n;
+
+ }
+ return output.join('');
+ }
+
+ /**
+ * Converts a Punycode string representing a domain name or an email address
+ * to Unicode. Only the Punycoded parts of the input will be converted, i.e.
+ * it doesn't matter if you call it on a string that has already been
+ * converted to Unicode.
+ * @memberOf punycode
+ * @param {String} input The Punycoded domain name or email address to
+ * convert to Unicode.
+ * @returns {String} The Unicode representation of the given Punycode
+ * string.
+ */
+ function toUnicode(input) {
+ return mapDomain(input, function(string) {
+ return regexPunycode.test(string)
+ ? decode(string.slice(4).toLowerCase())
+ : string;
+ });
+ }
+
+ /**
+ * Converts a Unicode string representing a domain name or an email address to
+ * Punycode. Only the non-ASCII parts of the domain name will be converted,
+ * i.e. it doesn't matter if you call it with a domain that's already in
+ * ASCII.
+ * @memberOf punycode
+ * @param {String} input The domain name or email address to convert, as a
+ * Unicode string.
+ * @returns {String} The Punycode representation of the given domain name or
+ * email address.
+ */
+ function toASCII(input) {
+ return mapDomain(input, function(string) {
+ return regexNonASCII.test(string)
+ ? 'xn--' + encode(string)
+ : string;
+ });
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ /** Define the public API */
+ punycode = {
+ /**
+ * A string representing the current Punycode.js version number.
+ * @memberOf punycode
+ * @type String
+ */
+ 'version': '1.4.1',
+ /**
+ * An object of methods to convert from JavaScript's internal character
+ * representation (UCS-2) to Unicode code points, and back.
+ * @see <https://mathiasbynens.be/notes/javascript-encoding>
+ * @memberOf punycode
+ * @type Object
+ */
+ 'ucs2': {
+ 'decode': ucs2decode,
+ 'encode': ucs2encode
+ },
+ 'decode': decode,
+ 'encode': encode,
+ 'toASCII': toASCII,
+ 'toUnicode': toUnicode
+ };
+
+ /** Expose `punycode` */
+ // Some AMD build optimizers, like r.js, check for specific condition patterns
+ // like the following:
+ if (
+ typeof define == 'function' &&
+ typeof define.amd == 'object' &&
+ define.amd
+ ) {
+ define('punycode', function() {
+ return punycode;
+ });
+ } else if (freeExports && freeModule) {
+ if (module.exports == freeExports) {
+ // in Node.js, io.js, or RingoJS v0.8.0+
+ freeModule.exports = punycode;
+ } else {
+ // in Narwhal or RingoJS v0.7.0-
+ for (key in punycode) {
+ punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);
+ }
+ }
+ } else {
+ // in Rhino or a web browser
+ root.punycode = punycode;
+ }
+
+}(this));
+
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{}],45:[function(require,module,exports){
+// 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.
+
+'use strict';
+
+// If obj.hasOwnProperty has been overridden, then calling
+// obj.hasOwnProperty(prop) will break.
+// See: https://github.com/joyent/node/issues/1707
+function hasOwnProperty(obj, prop) {
+ return Object.prototype.hasOwnProperty.call(obj, prop);
+}
+
+module.exports = function(qs, sep, eq, options) {
+ sep = sep || '&';
+ eq = eq || '=';
+ var obj = {};
+
+ if (typeof qs !== 'string' || qs.length === 0) {
+ return obj;
+ }
+
+ var regexp = /\+/g;
+ qs = qs.split(sep);
+
+ var maxKeys = 1000;
+ if (options && typeof options.maxKeys === 'number') {
+ maxKeys = options.maxKeys;
+ }
+
+ var len = qs.length;
+ // maxKeys <= 0 means that we should not limit keys count
+ if (maxKeys > 0 && len > maxKeys) {
+ len = maxKeys;
+ }
+
+ for (var i = 0; i < len; ++i) {
+ var x = qs[i].replace(regexp, '%20'),
+ idx = x.indexOf(eq),
+ kstr, vstr, k, v;
+
+ if (idx >= 0) {
+ kstr = x.substr(0, idx);
+ vstr = x.substr(idx + 1);
+ } else {
+ kstr = x;
+ vstr = '';
+ }
+
+ k = decodeURIComponent(kstr);
+ v = decodeURIComponent(vstr);
+
+ if (!hasOwnProperty(obj, k)) {
+ obj[k] = v;
+ } else if (isArray(obj[k])) {
+ obj[k].push(v);
+ } else {
+ obj[k] = [obj[k], v];
+ }
+ }
+
+ return obj;
+};
+
+var isArray = Array.isArray || function (xs) {
+ return Object.prototype.toString.call(xs) === '[object Array]';
+};
+
+},{}],46:[function(require,module,exports){
+// 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.
+
+'use strict';
+
+var stringifyPrimitive = function(v) {
+ switch (typeof v) {
+ case 'string':
+ return v;
+
+ case 'boolean':
+ return v ? 'true' : 'false';
+
+ case 'number':
+ return isFinite(v) ? v : '';
+
+ default:
+ return '';
+ }
+};
+
+module.exports = function(obj, sep, eq, name) {
+ sep = sep || '&';
+ eq = eq || '=';
+ if (obj === null) {
+ obj = undefined;
+ }
+
+ if (typeof obj === 'object') {
+ return map(objectKeys(obj), function(k) {
+ var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;
+ if (isArray(obj[k])) {
+ return map(obj[k], function(v) {
+ return ks + encodeURIComponent(stringifyPrimitive(v));
+ }).join(sep);
+ } else {
+ return ks + encodeURIComponent(stringifyPrimitive(obj[k]));
+ }
+ }).join(sep);
+
+ }
+
+ if (!name) return '';
+ return encodeURIComponent(stringifyPrimitive(name)) + eq +
+ encodeURIComponent(stringifyPrimitive(obj));
+};
+
+var isArray = Array.isArray || function (xs) {
+ return Object.prototype.toString.call(xs) === '[object Array]';
+};
+
+function map (xs, f) {
+ if (xs.map) return xs.map(f);
+ var res = [];
+ for (var i = 0; i < xs.length; i++) {
+ res.push(f(xs[i], i));
+ }
+ return res;
+}
+
+var objectKeys = Object.keys || function (obj) {
+ var res = [];
+ for (var key in obj) {
+ if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);
+ }
+ return res;
+};
+
+},{}],47:[function(require,module,exports){
+'use strict';
+
+exports.decode = exports.parse = require('./decode');
+exports.encode = exports.stringify = require('./encode');
+
+},{"./decode":45,"./encode":46}],48:[function(require,module,exports){
+// 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.
+
+'use strict';
+
+var punycode = require('punycode');
+var util = require('./util');
+
+exports.parse = urlParse;
+exports.resolve = urlResolve;
+exports.resolveObject = urlResolveObject;
+exports.format = urlFormat;
+
+exports.Url = Url;
+
+function Url() {
+ this.protocol = null;
+ this.slashes = null;
+ this.auth = null;
+ this.host = null;
+ this.port = null;
+ this.hostname = null;
+ this.hash = null;
+ this.search = null;
+ this.query = null;
+ this.pathname = null;
+ this.path = null;
+ this.href = null;
+}
+
+// Reference: RFC 3986, RFC 1808, RFC 2396
+
+// define these here so at least they only have to be
+// compiled once on the first module load.
+var protocolPattern = /^([a-z0-9.+-]+:)/i,
+ portPattern = /:[0-9]*$/,
+
+ // Special case for a simple path URL
+ simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,
+
+ // RFC 2396: characters reserved for delimiting URLs.
+ // We actually just auto-escape these.
+ delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'],
+
+ // RFC 2396: characters not allowed for various reasons.
+ unwise = ['{', '}', '|', '\\', '^', '`'].concat(delims),
+
+ // Allowed by RFCs, but cause of XSS attacks. Always escape these.
+ autoEscape = ['\''].concat(unwise),
+ // Characters that are never ever allowed in a hostname.
+ // Note that any invalid chars are also handled, but these
+ // are the ones that are *expected* to be seen, so we fast-path
+ // them.
+ nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),
+ hostEndingChars = ['/', '?', '#'],
+ hostnameMaxLen = 255,
+ hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,
+ hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,
+ // protocols that can allow "unsafe" and "unwise" chars.
+ unsafeProtocol = {
+ 'javascript': true,
+ 'javascript:': true
+ },
+ // protocols that never have a hostname.
+ hostlessProtocol = {
+ 'javascript': true,
+ 'javascript:': true
+ },
+ // protocols that always contain a // bit.
+ slashedProtocol = {
+ 'http': true,
+ 'https': true,
+ 'ftp': true,
+ 'gopher': true,
+ 'file': true,
+ 'http:': true,
+ 'https:': true,
+ 'ftp:': true,
+ 'gopher:': true,
+ 'file:': true
+ },
+ querystring = require('querystring');
+
+function urlParse(url, parseQueryString, slashesDenoteHost) {
+ if (url && util.isObject(url) && url instanceof Url) return url;
+
+ var u = new Url;
+ u.parse(url, parseQueryString, slashesDenoteHost);
+ return u;
+}
+
+Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {
+ if (!util.isString(url)) {
+ throw new TypeError("Parameter 'url' must be a string, not " + typeof url);
+ }
+
+ // Copy chrome, IE, opera backslash-handling behavior.
+ // Back slashes before the query string get converted to forward slashes
+ // See: https://code.google.com/p/chromium/issues/detail?id=25916
+ var queryIndex = url.indexOf('?'),
+ splitter =
+ (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#',
+ uSplit = url.split(splitter),
+ slashRegex = /\\/g;
+ uSplit[0] = uSplit[0].replace(slashRegex, '/');
+ url = uSplit.join(splitter);
+
+ var rest = url;
+
+ // trim before proceeding.
+ // This is to support parse stuff like " http://foo.com \n"
+ rest = rest.trim();
+
+ if (!slashesDenoteHost && url.split('#').length === 1) {
+ // Try fast path regexp
+ var simplePath = simplePathPattern.exec(rest);
+ if (simplePath) {
+ this.path = rest;
+ this.href = rest;
+ this.pathname = simplePath[1];
+ if (simplePath[2]) {
+ this.search = simplePath[2];
+ if (parseQueryString) {
+ this.query = querystring.parse(this.search.substr(1));
+ } else {
+ this.query = this.search.substr(1);
+ }
+ } else if (parseQueryString) {
+ this.search = '';
+ this.query = {};
+ }
+ return this;
+ }
+ }
+
+ var proto = protocolPattern.exec(rest);
+ if (proto) {
+ proto = proto[0];
+ var lowerProto = proto.toLowerCase();
+ this.protocol = lowerProto;
+ rest = rest.substr(proto.length);
+ }
+
+ // figure out if it's got a host
+ // user@server is *always* interpreted as a hostname, and url
+ // resolution will treat //foo/bar as host=foo,path=bar because that's
+ // how the browser resolves relative URLs.
+ if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) {
+ var slashes = rest.substr(0, 2) === '//';
+ if (slashes && !(proto && hostlessProtocol[proto])) {
+ rest = rest.substr(2);
+ this.slashes = true;
+ }
+ }
+
+ if (!hostlessProtocol[proto] &&
+ (slashes || (proto && !slashedProtocol[proto]))) {
+
+ // there's a hostname.
+ // the first instance of /, ?, ;, or # ends the host.
+ //
+ // If there is an @ in the hostname, then non-host chars *are* allowed
+ // to the left of the last @ sign, unless some host-ending character
+ // comes *before* the @-sign.
+ // URLs are obnoxious.
+ //
+ // ex:
+ // http://a@b@c/ => user:a@b host:c
+ // http://a@b?@c => user:a host:c path:/?@c
+
+ // v0.12 TODO(isaacs): This is not quite how Chrome does things.
+ // Review our test case against browsers more comprehensively.
+
+ // find the first instance of any hostEndingChars
+ var hostEnd = -1;
+ for (var i = 0; i < hostEndingChars.length; i++) {
+ var hec = rest.indexOf(hostEndingChars[i]);
+ if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))
+ hostEnd = hec;
+ }
+
+ // at this point, either we have an explicit point where the
+ // auth portion cannot go past, or the last @ char is the decider.
+ var auth, atSign;
+ if (hostEnd === -1) {
+ // atSign can be anywhere.
+ atSign = rest.lastIndexOf('@');
+ } else {
+ // atSign must be in auth portion.
+ // http://a@b/c@d => host:b auth:a path:/c@d
+ atSign = rest.lastIndexOf('@', hostEnd);
+ }
+
+ // Now we have a portion which is definitely the auth.
+ // Pull that off.
+ if (atSign !== -1) {
+ auth = rest.slice(0, atSign);
+ rest = rest.slice(atSign + 1);
+ this.auth = decodeURIComponent(auth);
+ }
+
+ // the host is the remaining to the left of the first non-host char
+ hostEnd = -1;
+ for (var i = 0; i < nonHostChars.length; i++) {
+ var hec = rest.indexOf(nonHostChars[i]);
+ if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))
+ hostEnd = hec;
+ }
+ // if we still have not hit it, then the entire thing is a host.
+ if (hostEnd === -1)
+ hostEnd = rest.length;
+
+ this.host = rest.slice(0, hostEnd);
+ rest = rest.slice(hostEnd);
+
+ // pull out port.
+ this.parseHost();
+
+ // we've indicated that there is a hostname,
+ // so even if it's empty, it has to be present.
+ this.hostname = this.hostname || '';
+
+ // if hostname begins with [ and ends with ]
+ // assume that it's an IPv6 address.
+ var ipv6Hostname = this.hostname[0] === '[' &&
+ this.hostname[this.hostname.length - 1] === ']';
+
+ // validate a little.
+ if (!ipv6Hostname) {
+ var hostparts = this.hostname.split(/\./);
+ for (var i = 0, l = hostparts.length; i < l; i++) {
+ var part = hostparts[i];
+ if (!part) continue;
+ if (!part.match(hostnamePartPattern)) {
+ var newpart = '';
+ for (var j = 0, k = part.length; j < k; j++) {
+ if (part.charCodeAt(j) > 127) {
+ // we replace non-ASCII char with a temporary placeholder
+ // we need this to make sure size of hostname is not
+ // broken by replacing non-ASCII by nothing
+ newpart += 'x';
+ } else {
+ newpart += part[j];
+ }
+ }
+ // we test again with ASCII char only
+ if (!newpart.match(hostnamePartPattern)) {
+ var validParts = hostparts.slice(0, i);
+ var notHost = hostparts.slice(i + 1);
+ var bit = part.match(hostnamePartStart);
+ if (bit) {
+ validParts.push(bit[1]);
+ notHost.unshift(bit[2]);
+ }
+ if (notHost.length) {
+ rest = '/' + notHost.join('.') + rest;
+ }
+ this.hostname = validParts.join('.');
+ break;
+ }
+ }
+ }
+ }
+
+ if (this.hostname.length > hostnameMaxLen) {
+ this.hostname = '';
+ } else {
+ // hostnames are always lower case.
+ this.hostname = this.hostname.toLowerCase();
+ }
+
+ if (!ipv6Hostname) {
+ // IDNA Support: Returns a punycoded representation of "domain".
+ // It only converts parts of the domain name that
+ // have non-ASCII characters, i.e. it doesn't matter if
+ // you call it with a domain that already is ASCII-only.
+ this.hostname = punycode.toASCII(this.hostname);
+ }
+
+ var p = this.port ? ':' + this.port : '';
+ var h = this.hostname || '';
+ this.host = h + p;
+ this.href += this.host;
+
+ // strip [ and ] from the hostname
+ // the host field still retains them, though
+ if (ipv6Hostname) {
+ this.hostname = this.hostname.substr(1, this.hostname.length - 2);
+ if (rest[0] !== '/') {
+ rest = '/' + rest;
+ }
+ }
+ }
+
+ // now rest is set to the post-host stuff.
+ // chop off any delim chars.
+ if (!unsafeProtocol[lowerProto]) {
+
+ // First, make 100% sure that any "autoEscape" chars get
+ // escaped, even if encodeURIComponent doesn't think they
+ // need to be.
+ for (var i = 0, l = autoEscape.length; i < l; i++) {
+ var ae = autoEscape[i];
+ if (rest.indexOf(ae) === -1)
+ continue;
+ var esc = encodeURIComponent(ae);
+ if (esc === ae) {
+ esc = escape(ae);
+ }
+ rest = rest.split(ae).join(esc);
+ }
+ }
+
+
+ // chop off from the tail first.
+ var hash = rest.indexOf('#');
+ if (hash !== -1) {
+ // got a fragment string.
+ this.hash = rest.substr(hash);
+ rest = rest.slice(0, hash);
+ }
+ var qm = rest.indexOf('?');
+ if (qm !== -1) {
+ this.search = rest.substr(qm);
+ this.query = rest.substr(qm + 1);
+ if (parseQueryString) {
+ this.query = querystring.parse(this.query);
+ }
+ rest = rest.slice(0, qm);
+ } else if (parseQueryString) {
+ // no query string, but parseQueryString still requested
+ this.search = '';
+ this.query = {};
+ }
+ if (rest) this.pathname = rest;
+ if (slashedProtocol[lowerProto] &&
+ this.hostname && !this.pathname) {
+ this.pathname = '/';
+ }
+
+ //to support http.request
+ if (this.pathname || this.search) {
+ var p = this.pathname || '';
+ var s = this.search || '';
+ this.path = p + s;
+ }
+
+ // finally, reconstruct the href based on what has been validated.
+ this.href = this.format();
+ return this;
+};
+
+// format a parsed object into a url string
+function urlFormat(obj) {
+ // ensure it's an object, and not a string url.
+ // If it's an obj, this is a no-op.
+ // this way, you can call url_format() on strings
+ // to clean up potentially wonky urls.
+ if (util.isString(obj)) obj = urlParse(obj);
+ if (!(obj instanceof Url)) return Url.prototype.format.call(obj);
+ return obj.format();
+}
+
+Url.prototype.format = function() {
+ var auth = this.auth || '';
+ if (auth) {
+ auth = encodeURIComponent(auth);
+ auth = auth.replace(/%3A/i, ':');
+ auth += '@';
+ }
+
+ var protocol = this.protocol || '',
+ pathname = this.pathname || '',
+ hash = this.hash || '',
+ host = false,
+ query = '';
+
+ if (this.host) {
+ host = auth + this.host;
+ } else if (this.hostname) {
+ host = auth + (this.hostname.indexOf(':') === -1 ?
+ this.hostname :
+ '[' + this.hostname + ']');
+ if (this.port) {
+ host += ':' + this.port;
+ }
+ }
+
+ if (this.query &&
+ util.isObject(this.query) &&
+ Object.keys(this.query).length) {
+ query = querystring.stringify(this.query);
+ }
+
+ var search = this.search || (query && ('?' + query)) || '';
+
+ if (protocol && protocol.substr(-1) !== ':') protocol += ':';
+
+ // only the slashedProtocols get the //. Not mailto:, xmpp:, etc.
+ // unless they had them to begin with.
+ if (this.slashes ||
+ (!protocol || slashedProtocol[protocol]) && host !== false) {
+ host = '//' + (host || '');
+ if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;
+ } else if (!host) {
+ host = '';
+ }
+
+ if (hash && hash.charAt(0) !== '#') hash = '#' + hash;
+ if (search && search.charAt(0) !== '?') search = '?' + search;
+
+ pathname = pathname.replace(/[?#]/g, function(match) {
+ return encodeURIComponent(match);
+ });
+ search = search.replace('#', '%23');
+
+ return protocol + host + pathname + search + hash;
+};
+
+function urlResolve(source, relative) {
+ return urlParse(source, false, true).resolve(relative);
+}
+
+Url.prototype.resolve = function(relative) {
+ return this.resolveObject(urlParse(relative, false, true)).format();
+};
+
+function urlResolveObject(source, relative) {
+ if (!source) return relative;
+ return urlParse(source, false, true).resolveObject(relative);
+}
+
+Url.prototype.resolveObject = function(relative) {
+ if (util.isString(relative)) {
+ var rel = new Url();
+ rel.parse(relative, false, true);
+ relative = rel;
+ }
+
+ var result = new Url();
+ var tkeys = Object.keys(this);
+ for (var tk = 0; tk < tkeys.length; tk++) {
+ var tkey = tkeys[tk];
+ result[tkey] = this[tkey];
+ }
+
+ // hash is always overridden, no matter what.
+ // even href="" will remove it.
+ result.hash = relative.hash;
+
+ // if the relative url is empty, then there's nothing left to do here.
+ if (relative.href === '') {
+ result.href = result.format();
+ return result;
+ }
+
+ // hrefs like //foo/bar always cut to the protocol.
+ if (relative.slashes && !relative.protocol) {
+ // take everything except the protocol from relative
+ var rkeys = Object.keys(relative);
+ for (var rk = 0; rk < rkeys.length; rk++) {
+ var rkey = rkeys[rk];
+ if (rkey !== 'protocol')
+ result[rkey] = relative[rkey];
+ }
+
+ //urlParse appends trailing / to urls like http://www.example.com
+ if (slashedProtocol[result.protocol] &&
+ result.hostname && !result.pathname) {
+ result.path = result.pathname = '/';
+ }
+
+ result.href = result.format();
+ return result;
+ }
+
+ if (relative.protocol && relative.protocol !== result.protocol) {
+ // if it's a known url protocol, then changing
+ // the protocol does weird things
+ // first, if it's not file:, then we MUST have a host,
+ // and if there was a path
+ // to begin with, then we MUST have a path.
+ // if it is file:, then the host is dropped,
+ // because that's known to be hostless.
+ // anything else is assumed to be absolute.
+ if (!slashedProtocol[relative.protocol]) {
+ var keys = Object.keys(relative);
+ for (var v = 0; v < keys.length; v++) {
+ var k = keys[v];
+ result[k] = relative[k];
+ }
+ result.href = result.format();
+ return result;
+ }
+
+ result.protocol = relative.protocol;
+ if (!relative.host && !hostlessProtocol[relative.protocol]) {
+ var relPath = (relative.pathname || '').split('/');
+ while (relPath.length && !(relative.host = relPath.shift()));
+ if (!relative.host) relative.host = '';
+ if (!relative.hostname) relative.hostname = '';
+ if (relPath[0] !== '') relPath.unshift('');
+ if (relPath.length < 2) relPath.unshift('');
+ result.pathname = relPath.join('/');
+ } else {
+ result.pathname = relative.pathname;
+ }
+ result.search = relative.search;
+ result.query = relative.query;
+ result.host = relative.host || '';
+ result.auth = relative.auth;
+ result.hostname = relative.hostname || relative.host;
+ result.port = relative.port;
+ // to support http.request
+ if (result.pathname || result.search) {
+ var p = result.pathname || '';
+ var s = result.search || '';
+ result.path = p + s;
+ }
+ result.slashes = result.slashes || relative.slashes;
+ result.href = result.format();
+ return result;
+ }
+
+ var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),
+ isRelAbs = (
+ relative.host ||
+ relative.pathname && relative.pathname.charAt(0) === '/'
+ ),
+ mustEndAbs = (isRelAbs || isSourceAbs ||
+ (result.host && relative.pathname)),
+ removeAllDots = mustEndAbs,
+ srcPath = result.pathname && result.pathname.split('/') || [],
+ relPath = relative.pathname && relative.pathname.split('/') || [],
+ psychotic = result.protocol && !slashedProtocol[result.protocol];
+
+ // if the url is a non-slashed url, then relative
+ // links like ../.. should be able
+ // to crawl up to the hostname, as well. This is strange.
+ // result.protocol has already been set by now.
+ // Later on, put the first path part into the host field.
+ if (psychotic) {
+ result.hostname = '';
+ result.port = null;
+ if (result.host) {
+ if (srcPath[0] === '') srcPath[0] = result.host;
+ else srcPath.unshift(result.host);
+ }
+ result.host = '';
+ if (relative.protocol) {
+ relative.hostname = null;
+ relative.port = null;
+ if (relative.host) {
+ if (relPath[0] === '') relPath[0] = relative.host;
+ else relPath.unshift(relative.host);
+ }
+ relative.host = null;
+ }
+ mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');
+ }
+
+ if (isRelAbs) {
+ // it's absolute.
+ result.host = (relative.host || relative.host === '') ?
+ relative.host : result.host;
+ result.hostname = (relative.hostname || relative.hostname === '') ?
+ relative.hostname : result.hostname;
+ result.search = relative.search;
+ result.query = relative.query;
+ srcPath = relPath;
+ // fall through to the dot-handling below.
+ } else if (relPath.length) {
+ // it's relative
+ // throw away the existing file, and take the new path instead.
+ if (!srcPath) srcPath = [];
+ srcPath.pop();
+ srcPath = srcPath.concat(relPath);
+ result.search = relative.search;
+ result.query = relative.query;
+ } else if (!util.isNullOrUndefined(relative.search)) {
+ // just pull out the search.
+ // like href='?foo'.
+ // Put this after the other two cases because it simplifies the booleans
+ if (psychotic) {
+ result.hostname = result.host = srcPath.shift();
+ //occationaly the auth can get stuck only in host
+ //this especially happens in cases like
+ //url.resolveObject('mailto:local1@domain1', 'local2@domain2')
+ var authInHost = result.host && result.host.indexOf('@') > 0 ?
+ result.host.split('@') : false;
+ if (authInHost) {
+ result.auth = authInHost.shift();
+ result.host = result.hostname = authInHost.shift();
+ }
+ }
+ result.search = relative.search;
+ result.query = relative.query;
+ //to support http.request
+ if (!util.isNull(result.pathname) || !util.isNull(result.search)) {
+ result.path = (result.pathname ? result.pathname : '') +
+ (result.search ? result.search : '');
+ }
+ result.href = result.format();
+ return result;
+ }
+
+ if (!srcPath.length) {
+ // no path at all. easy.
+ // we've already handled the other stuff above.
+ result.pathname = null;
+ //to support http.request
+ if (result.search) {
+ result.path = '/' + result.search;
+ } else {
+ result.path = null;
+ }
+ result.href = result.format();
+ return result;
+ }
+
+ // if a url ENDs in . or .., then it must get a trailing slash.
+ // however, if it ends in anything else non-slashy,
+ // then it must NOT get a trailing slash.
+ var last = srcPath.slice(-1)[0];
+ var hasTrailingSlash = (
+ (result.host || relative.host || srcPath.length > 1) &&
+ (last === '.' || last === '..') || last === '');
+
+ // strip single dots, resolve double dots to parent dir
+ // if the path tries to go above the root, `up` ends up > 0
+ var up = 0;
+ for (var i = srcPath.length; i >= 0; i--) {
+ last = srcPath[i];
+ if (last === '.') {
+ srcPath.splice(i, 1);
+ } else if (last === '..') {
+ srcPath.splice(i, 1);
+ up++;
+ } else if (up) {
+ srcPath.splice(i, 1);
+ up--;
+ }
+ }
+
+ // if the path is allowed to go above the root, restore leading ..s
+ if (!mustEndAbs && !removeAllDots) {
+ for (; up--; up) {
+ srcPath.unshift('..');
+ }
+ }
+
+ if (mustEndAbs && srcPath[0] !== '' &&
+ (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {
+ srcPath.unshift('');
+ }
+
+ if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {
+ srcPath.push('');
+ }
+
+ var isAbsolute = srcPath[0] === '' ||
+ (srcPath[0] && srcPath[0].charAt(0) === '/');
+
+ // put the host back
+ if (psychotic) {
+ result.hostname = result.host = isAbsolute ? '' :
+ srcPath.length ? srcPath.shift() : '';
+ //occationaly the auth can get stuck only in host
+ //this especially happens in cases like
+ //url.resolveObject('mailto:local1@domain1', 'local2@domain2')
+ var authInHost = result.host && result.host.indexOf('@') > 0 ?
+ result.host.split('@') : false;
+ if (authInHost) {
+ result.auth = authInHost.shift();
+ result.host = result.hostname = authInHost.shift();
+ }
+ }
+
+ mustEndAbs = mustEndAbs || (result.host && srcPath.length);
+
+ if (mustEndAbs && !isAbsolute) {
+ srcPath.unshift('');
+ }
+
+ if (!srcPath.length) {
+ result.pathname = null;
+ result.path = null;
+ } else {
+ result.pathname = srcPath.join('/');
+ }
+
+ //to support request.http
+ if (!util.isNull(result.pathname) || !util.isNull(result.search)) {
+ result.path = (result.pathname ? result.pathname : '') +
+ (result.search ? result.search : '');
+ }
+ result.auth = relative.auth || result.auth;
+ result.slashes = result.slashes || relative.slashes;
+ result.href = result.format();
+ return result;
+};
+
+Url.prototype.parseHost = function() {
+ var host = this.host;
+ var port = portPattern.exec(host);
+ if (port) {
+ port = port[0];
+ if (port !== ':') {
+ this.port = port.substr(1);
+ }
+ host = host.substr(0, host.length - port.length);
+ }
+ if (host) this.hostname = host;
+};
+
+},{"./util":49,"punycode":44,"querystring":47}],49:[function(require,module,exports){
+'use strict';
+
+module.exports = {
+ isString: function(arg) {
+ return typeof(arg) === 'string';
+ },
+ isObject: function(arg) {
+ return typeof(arg) === 'object' && arg !== null;
+ },
+ isNull: function(arg) {
+ return arg === null;
+ },
+ isNullOrUndefined: function(arg) {
+ return arg == null;
+ }
+};
+
+},{}],"ajv":[function(require,module,exports){
+'use strict';
+
+var compileSchema = require('./compile')
+ , resolve = require('./compile/resolve')
+ , Cache = require('./cache')
+ , SchemaObject = require('./compile/schema_obj')
+ , stableStringify = require('fast-json-stable-stringify')
+ , formats = require('./compile/formats')
+ , rules = require('./compile/rules')
+ , $dataMetaSchema = require('./$data')
+ , patternGroups = require('./patternGroups')
+ , util = require('./compile/util')
+ , co = require('co');
+
+module.exports = Ajv;
+
+Ajv.prototype.validate = validate;
+Ajv.prototype.compile = compile;
+Ajv.prototype.addSchema = addSchema;
+Ajv.prototype.addMetaSchema = addMetaSchema;
+Ajv.prototype.validateSchema = validateSchema;
+Ajv.prototype.getSchema = getSchema;
+Ajv.prototype.removeSchema = removeSchema;
+Ajv.prototype.addFormat = addFormat;
+Ajv.prototype.errorsText = errorsText;
+
+Ajv.prototype._addSchema = _addSchema;
+Ajv.prototype._compile = _compile;
+
+Ajv.prototype.compileAsync = require('./compile/async');
+var customKeyword = require('./keyword');
+Ajv.prototype.addKeyword = customKeyword.add;
+Ajv.prototype.getKeyword = customKeyword.get;
+Ajv.prototype.removeKeyword = customKeyword.remove;
+
+var errorClasses = require('./compile/error_classes');
+Ajv.ValidationError = errorClasses.Validation;
+Ajv.MissingRefError = errorClasses.MissingRef;
+Ajv.$dataMetaSchema = $dataMetaSchema;
+
+var META_SCHEMA_ID = 'http://json-schema.org/draft-06/schema';
+
+var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes' ];
+var META_SUPPORT_DATA = ['/properties'];
+
+/**
+ * Creates validator instance.
+ * Usage: `Ajv(opts)`
+ * @param {Object} opts optional options
+ * @return {Object} ajv instance
+ */
+function Ajv(opts) {
+ if (!(this instanceof Ajv)) return new Ajv(opts);
+ opts = this._opts = util.copy(opts) || {};
+ setLogger(this);
+ this._schemas = {};
+ this._refs = {};
+ this._fragments = {};
+ this._formats = formats(opts.format);
+ var schemaUriFormat = this._schemaUriFormat = this._formats['uri-reference'];
+ this._schemaUriFormatFunc = function (str) { return schemaUriFormat.test(str); };
+
+ this._cache = opts.cache || new Cache;
+ this._loadingSchemas = {};
+ this._compilations = [];
+ this.RULES = rules();
+ this._getId = chooseGetId(opts);
+
+ opts.loopRequired = opts.loopRequired || Infinity;
+ if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true;
+ if (opts.serialize === undefined) opts.serialize = stableStringify;
+ this._metaOpts = getMetaSchemaOptions(this);
+
+ if (opts.formats) addInitialFormats(this);
+ addDraft6MetaSchema(this);
+ if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta);
+ addInitialSchemas(this);
+ if (opts.patternGroups) patternGroups(this);
+}
+
+
+
+/**
+ * Validate data using schema
+ * Schema will be compiled and cached (using serialized JSON as key. [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize.
+ * @this Ajv
+ * @param {String|Object} schemaKeyRef key, ref or schema object
+ * @param {Any} data to be validated
+ * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`).
+ */
+function validate(schemaKeyRef, data) {
+ var v;
+ if (typeof schemaKeyRef == 'string') {
+ v = this.getSchema(schemaKeyRef);
+ if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"');
+ } else {
+ var schemaObj = this._addSchema(schemaKeyRef);
+ v = schemaObj.validate || this._compile(schemaObj);
+ }
+
+ var valid = v(data);
+ if (v.$async === true)
+ return this._opts.async == '*' ? co(valid) : valid;
+ this.errors = v.errors;
+ return valid;
+}
+
+
+/**
+ * Create validating function for passed schema.
+ * @this Ajv
+ * @param {Object} schema schema object
+ * @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords.
+ * @return {Function} validating function
+ */
+function compile(schema, _meta) {
+ var schemaObj = this._addSchema(schema, undefined, _meta);
+ return schemaObj.validate || this._compile(schemaObj);
+}
+
+
+/**
+ * Adds schema to the instance.
+ * @this Ajv
+ * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored.
+ * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.
+ * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead.
+ * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead.
+ * @return {Ajv} this for method chaining
+ */
+function addSchema(schema, key, _skipValidation, _meta) {
+ if (Array.isArray(schema)){
+ for (var i=0; i<schema.length; i++) this.addSchema(schema[i], undefined, _skipValidation, _meta);
+ return;
+ }
+ var id = this._getId(schema);
+ if (id !== undefined && typeof id != 'string')
+ throw new Error('schema id must be string');
+ key = resolve.normalizeId(key || id);
+ checkUnique(this, key);
+ this._schemas[key] = this._addSchema(schema, _skipValidation, _meta, true);
+ return this;
+}
+
+
+/**
+ * Add schema that will be used to validate other schemas
+ * options in META_IGNORE_OPTIONS are alway set to false
+ * @this Ajv
+ * @param {Object} schema schema object
+ * @param {String} key optional schema key
+ * @param {Boolean} skipValidation true to skip schema validation, can be used to override validateSchema option for meta-schema
+ * @return {Ajv} this for method chaining
+ */
+function addMetaSchema(schema, key, skipValidation) {
+ this.addSchema(schema, key, skipValidation, true);
+ return this;
+}
+
+
+/**
+ * Validate schema
+ * @this Ajv
+ * @param {Object} schema schema to validate
+ * @param {Boolean} throwOrLogError pass true to throw (or log) an error if invalid
+ * @return {Boolean} true if schema is valid
+ */
+function validateSchema(schema, throwOrLogError) {
+ var $schema = schema.$schema;
+ if ($schema !== undefined && typeof $schema != 'string')
+ throw new Error('$schema must be a string');
+ $schema = $schema || this._opts.defaultMeta || defaultMeta(this);
+ if (!$schema) {
+ this.logger.warn('meta-schema not available');
+ this.errors = null;
+ return true;
+ }
+ var currentUriFormat = this._formats.uri;
+ this._formats.uri = typeof currentUriFormat == 'function'
+ ? this._schemaUriFormatFunc
+ : this._schemaUriFormat;
+ var valid;
+ try { valid = this.validate($schema, schema); }
+ finally { this._formats.uri = currentUriFormat; }
+ if (!valid && throwOrLogError) {
+ var message = 'schema is invalid: ' + this.errorsText();
+ if (this._opts.validateSchema == 'log') this.logger.error(message);
+ else throw new Error(message);
+ }
+ return valid;
+}
+
+
+function defaultMeta(self) {
+ var meta = self._opts.meta;
+ self._opts.defaultMeta = typeof meta == 'object'
+ ? self._getId(meta) || meta
+ : self.getSchema(META_SCHEMA_ID)
+ ? META_SCHEMA_ID
+ : undefined;
+ return self._opts.defaultMeta;
+}
+
+
+/**
+ * Get compiled schema from the instance by `key` or `ref`.
+ * @this Ajv
+ * @param {String} keyRef `key` that was passed to `addSchema` or full schema reference (`schema.id` or resolved id).
+ * @return {Function} schema validating function (with property `schema`).
+ */
+function getSchema(keyRef) {
+ var schemaObj = _getSchemaObj(this, keyRef);
+ switch (typeof schemaObj) {
+ case 'object': return schemaObj.validate || this._compile(schemaObj);
+ case 'string': return this.getSchema(schemaObj);
+ case 'undefined': return _getSchemaFragment(this, keyRef);
+ }
+}
+
+
+function _getSchemaFragment(self, ref) {
+ var res = resolve.schema.call(self, { schema: {} }, ref);
+ if (res) {
+ var schema = res.schema
+ , root = res.root
+ , baseId = res.baseId;
+ var v = compileSchema.call(self, schema, root, undefined, baseId);
+ self._fragments[ref] = new SchemaObject({
+ ref: ref,
+ fragment: true,
+ schema: schema,
+ root: root,
+ baseId: baseId,
+ validate: v
+ });
+ return v;
+ }
+}
+
+
+function _getSchemaObj(self, keyRef) {
+ keyRef = resolve.normalizeId(keyRef);
+ return self._schemas[keyRef] || self._refs[keyRef] || self._fragments[keyRef];
+}
+
+
+/**
+ * Remove cached schema(s).
+ * If no parameter is passed all schemas but meta-schemas are removed.
+ * If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed.
+ * Even if schema is referenced by other schemas it still can be removed as other schemas have local references.
+ * @this Ajv
+ * @param {String|Object|RegExp} schemaKeyRef key, ref, pattern to match key/ref or schema object
+ * @return {Ajv} this for method chaining
+ */
+function removeSchema(schemaKeyRef) {
+ if (schemaKeyRef instanceof RegExp) {
+ _removeAllSchemas(this, this._schemas, schemaKeyRef);
+ _removeAllSchemas(this, this._refs, schemaKeyRef);
+ return this;
+ }
+ switch (typeof schemaKeyRef) {
+ case 'undefined':
+ _removeAllSchemas(this, this._schemas);
+ _removeAllSchemas(this, this._refs);
+ this._cache.clear();
+ return this;
+ case 'string':
+ var schemaObj = _getSchemaObj(this, schemaKeyRef);
+ if (schemaObj) this._cache.del(schemaObj.cacheKey);
+ delete this._schemas[schemaKeyRef];
+ delete this._refs[schemaKeyRef];
+ return this;
+ case 'object':
+ var serialize = this._opts.serialize;
+ var cacheKey = serialize ? serialize(schemaKeyRef) : schemaKeyRef;
+ this._cache.del(cacheKey);
+ var id = this._getId(schemaKeyRef);
+ if (id) {
+ id = resolve.normalizeId(id);
+ delete this._schemas[id];
+ delete this._refs[id];
+ }
+ }
+ return this;
+}
+
+
+function _removeAllSchemas(self, schemas, regex) {
+ for (var keyRef in schemas) {
+ var schemaObj = schemas[keyRef];
+ if (!schemaObj.meta && (!regex || regex.test(keyRef))) {
+ self._cache.del(schemaObj.cacheKey);
+ delete schemas[keyRef];
+ }
+ }
+}
+
+
+/* @this Ajv */
+function _addSchema(schema, skipValidation, meta, shouldAddSchema) {
+ if (typeof schema != 'object' && typeof schema != 'boolean')
+ throw new Error('schema should be object or boolean');
+ var serialize = this._opts.serialize;
+ var cacheKey = serialize ? serialize(schema) : schema;
+ var cached = this._cache.get(cacheKey);
+ if (cached) return cached;
+
+ shouldAddSchema = shouldAddSchema || this._opts.addUsedSchema !== false;
+
+ var id = resolve.normalizeId(this._getId(schema));
+ if (id && shouldAddSchema) checkUnique(this, id);
+
+ var willValidate = this._opts.validateSchema !== false && !skipValidation;
+ var recursiveMeta;
+ if (willValidate && !(recursiveMeta = id && id == resolve.normalizeId(schema.$schema)))
+ this.validateSchema(schema, true);
+
+ var localRefs = resolve.ids.call(this, schema);
+
+ var schemaObj = new SchemaObject({
+ id: id,
+ schema: schema,
+ localRefs: localRefs,
+ cacheKey: cacheKey,
+ meta: meta
+ });
+
+ if (id[0] != '#' && shouldAddSchema) this._refs[id] = schemaObj;
+ this._cache.put(cacheKey, schemaObj);
+
+ if (willValidate && recursiveMeta) this.validateSchema(schema, true);
+
+ return schemaObj;
+}
+
+
+/* @this Ajv */
+function _compile(schemaObj, root) {
+ if (schemaObj.compiling) {
+ schemaObj.validate = callValidate;
+ callValidate.schema = schemaObj.schema;
+ callValidate.errors = null;
+ callValidate.root = root ? root : callValidate;
+ if (schemaObj.schema.$async === true)
+ callValidate.$async = true;
+ return callValidate;
+ }
+ schemaObj.compiling = true;
+
+ var currentOpts;
+ if (schemaObj.meta) {
+ currentOpts = this._opts;
+ this._opts = this._metaOpts;
+ }
+
+ var v;
+ try { v = compileSchema.call(this, schemaObj.schema, root, schemaObj.localRefs); }
+ finally {
+ schemaObj.compiling = false;
+ if (schemaObj.meta) this._opts = currentOpts;
+ }
+
+ schemaObj.validate = v;
+ schemaObj.refs = v.refs;
+ schemaObj.refVal = v.refVal;
+ schemaObj.root = v.root;
+ return v;
+
+
+ function callValidate() {
+ var _validate = schemaObj.validate;
+ var result = _validate.apply(null, arguments);
+ callValidate.errors = _validate.errors;
+ return result;
+ }
+}
+
+
+function chooseGetId(opts) {
+ switch (opts.schemaId) {
+ case '$id': return _get$Id;
+ case 'id': return _getId;
+ default: return _get$IdOrId;
+ }
+}
+
+/* @this Ajv */
+function _getId(schema) {
+ if (schema.$id) this.logger.warn('schema $id ignored', schema.$id);
+ return schema.id;
+}
+
+/* @this Ajv */
+function _get$Id(schema) {
+ if (schema.id) this.logger.warn('schema id ignored', schema.id);
+ return schema.$id;
+}
+
+
+function _get$IdOrId(schema) {
+ if (schema.$id && schema.id && schema.$id != schema.id)
+ throw new Error('schema $id is different from id');
+ return schema.$id || schema.id;
+}
+
+
+/**
+ * Convert array of error message objects to string
+ * @this Ajv
+ * @param {Array<Object>} errors optional array of validation errors, if not passed errors from the instance are used.
+ * @param {Object} options optional options with properties `separator` and `dataVar`.
+ * @return {String} human readable string with all errors descriptions
+ */
+function errorsText(errors, options) {
+ errors = errors || this.errors;
+ if (!errors) return 'No errors';
+ options = options || {};
+ var separator = options.separator === undefined ? ', ' : options.separator;
+ var dataVar = options.dataVar === undefined ? 'data' : options.dataVar;
+
+ var text = '';
+ for (var i=0; i<errors.length; i++) {
+ var e = errors[i];
+ if (e) text += dataVar + e.dataPath + ' ' + e.message + separator;
+ }
+ return text.slice(0, -separator.length);
+}
+
+
+/**
+ * Add custom format
+ * @this Ajv
+ * @param {String} name format name
+ * @param {String|RegExp|Function} format string is converted to RegExp; function should return boolean (true when valid)
+ * @return {Ajv} this for method chaining
+ */
+function addFormat(name, format) {
+ if (typeof format == 'string') format = new RegExp(format);
+ this._formats[name] = format;
+ return this;
+}
+
+
+function addDraft6MetaSchema(self) {
+ var $dataSchema;
+ if (self._opts.$data) {
+ $dataSchema = require('./refs/$data.json');
+ self.addMetaSchema($dataSchema, $dataSchema.$id, true);
+ }
+ if (self._opts.meta === false) return;
+ var metaSchema = require('./refs/json-schema-draft-06.json');
+ if (self._opts.$data) metaSchema = $dataMetaSchema(metaSchema, META_SUPPORT_DATA);
+ self.addMetaSchema(metaSchema, META_SCHEMA_ID, true);
+ self._refs['http://json-schema.org/schema'] = META_SCHEMA_ID;
+}
+
+
+function addInitialSchemas(self) {
+ var optsSchemas = self._opts.schemas;
+ if (!optsSchemas) return;
+ if (Array.isArray(optsSchemas)) self.addSchema(optsSchemas);
+ else for (var key in optsSchemas) self.addSchema(optsSchemas[key], key);
+}
+
+
+function addInitialFormats(self) {
+ for (var name in self._opts.formats) {
+ var format = self._opts.formats[name];
+ self.addFormat(name, format);
+ }
+}
+
+
+function checkUnique(self, id) {
+ if (self._schemas[id] || self._refs[id])
+ throw new Error('schema with key or id "' + id + '" already exists');
+}
+
+
+function getMetaSchemaOptions(self) {
+ var metaOpts = util.copy(self._opts);
+ for (var i=0; i<META_IGNORE_OPTIONS.length; i++)
+ delete metaOpts[META_IGNORE_OPTIONS[i]];
+ return metaOpts;
+}
+
+
+function setLogger(self) {
+ var logger = self._opts.logger;
+ if (logger === false) {
+ self.logger = {log: noop, warn: noop, error: noop};
+ } else {
+ if (logger === undefined) logger = console;
+ if (!(typeof logger == 'object' && logger.log && logger.warn && logger.error))
+ throw new Error('logger must implement log, warn and error methods');
+ self.logger = logger;
+ }
+}
+
+
+function noop() {}
+
+},{"./$data":1,"./cache":2,"./compile":7,"./compile/async":4,"./compile/error_classes":5,"./compile/formats":6,"./compile/resolve":8,"./compile/rules":9,"./compile/schema_obj":10,"./compile/util":12,"./keyword":36,"./patternGroups":37,"./refs/$data.json":38,"./refs/json-schema-draft-06.json":39,"co":40,"fast-json-stable-stringify":42}]},{},[])("ajv")
+}); \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/ajv/dist/ajv.min.js b/tools/node_modules/eslint/node_modules/ajv/dist/ajv.min.js
new file mode 100644
index 0000000000..2bc334ced9
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/dist/ajv.min.js
@@ -0,0 +1,3 @@
+/* ajv 5.5.0: Another JSON Schema Validator */
+!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Ajv=e()}}(function(){return function e(r,t,a){function s(i,n){if(!t[i]){if(!r[i]){var l="function"==typeof require&&require;if(!n&&l)return l(i,!0);if(o)return o(i,!0);var h=new Error("Cannot find module '"+i+"'");throw h.code="MODULE_NOT_FOUND",h}var u=t[i]={exports:{}};r[i][0].call(u.exports,function(e){var t=r[i][1][e];return s(t||e)},u,u.exports,e,r,t,a)}return t[i].exports}for(var o="function"==typeof require&&require,i=0;i<a.length;i++)s(a[i]);return s}({1:[function(e,r,t){"use strict";var a=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];r.exports=function(e,r){for(var t=0;t<r.length;t++){e=JSON.parse(JSON.stringify(e));var s,o=r[t].split("/"),i=e;for(s=1;s<o.length;s++)i=i[o[s]];for(s=0;s<a.length;s++){var n=a[s],l=i[n];l&&(i[n]={anyOf:[l,{$ref:"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#"}]})}}return e}},{}],2:[function(e,r,t){"use strict";var a=r.exports=function(){this._cache={}};a.prototype.put=function(e,r){this._cache[e]=r},a.prototype.get=function(e){return this._cache[e]},a.prototype.del=function(e){delete this._cache[e]},a.prototype.clear=function(){this._cache={}}},{}],3:[function(e,r,t){"use strict";r.exports={$ref:e("../dotjs/ref"),allOf:e("../dotjs/allOf"),anyOf:e("../dotjs/anyOf"),const:e("../dotjs/const"),contains:e("../dotjs/contains"),dependencies:e("../dotjs/dependencies"),enum:e("../dotjs/enum"),format:e("../dotjs/format"),items:e("../dotjs/items"),maximum:e("../dotjs/_limit"),minimum:e("../dotjs/_limit"),maxItems:e("../dotjs/_limitItems"),minItems:e("../dotjs/_limitItems"),maxLength:e("../dotjs/_limitLength"),minLength:e("../dotjs/_limitLength"),maxProperties:e("../dotjs/_limitProperties"),minProperties:e("../dotjs/_limitProperties"),multipleOf:e("../dotjs/multipleOf"),not:e("../dotjs/not"),oneOf:e("../dotjs/oneOf"),pattern:e("../dotjs/pattern"),properties:e("../dotjs/properties"),propertyNames:e("../dotjs/propertyNames"),required:e("../dotjs/required"),uniqueItems:e("../dotjs/uniqueItems"),validate:e("../dotjs/validate")}},{"../dotjs/_limit":13,"../dotjs/_limitItems":14,"../dotjs/_limitLength":15,"../dotjs/_limitProperties":16,"../dotjs/allOf":17,"../dotjs/anyOf":18,"../dotjs/const":19,"../dotjs/contains":20,"../dotjs/dependencies":22,"../dotjs/enum":23,"../dotjs/format":24,"../dotjs/items":25,"../dotjs/multipleOf":26,"../dotjs/not":27,"../dotjs/oneOf":28,"../dotjs/pattern":29,"../dotjs/properties":30,"../dotjs/propertyNames":31,"../dotjs/ref":32,"../dotjs/required":33,"../dotjs/uniqueItems":34,"../dotjs/validate":35}],4:[function(e,r,t){"use strict";function a(e,r,t){function o(e){var r=e.$schema;return r&&!n.getSchema(r)?a.call(n,{$ref:r},!0):Promise.resolve()}function i(e){try{return n._compile(e)}catch(t){if(t instanceof s)return function(t){function a(){delete n._loadingSchemas[l]}function s(e){return n._refs[e]||n._schemas[e]}var l=t.missingSchema;if(s(l))throw new Error("Schema "+l+" is loaded but "+t.missingRef+" cannot be resolved");var h=n._loadingSchemas[l];return h||(h=n._loadingSchemas[l]=n._opts.loadSchema(l)).then(a,a),h.then(function(e){if(!s(l))return o(e).then(function(){s(l)||n.addSchema(e,l,void 0,r)})}).then(function(){return i(e)})}(t);throw t}}var n=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof r&&(t=r,r=void 0);var l=o(e).then(function(){var t=n._addSchema(e,void 0,r);return t.validate||i(t)});return t&&l.then(function(e){t(null,e)},t),l}var s=e("./error_classes").MissingRef;r.exports=a},{"./error_classes":5}],5:[function(e,r,t){"use strict";function a(e,r,t){this.message=t||a.message(e,r),this.missingRef=o.url(e,r),this.missingSchema=o.normalizeId(o.fullPath(this.missingRef))}function s(e){return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var o=e("./resolve");r.exports={Validation:s(function(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0}),MissingRef:s(a)},a.message=function(e,r){return"can't resolve reference "+r+" from id "+e}},{"./resolve":8}],6:[function(e,r,t){"use strict";function a(e){return e="full"==e?"full":"fast",n.copy(a[e])}function s(e){var r=e.match(l);if(!r)return!1;var t=+r[1],a=+r[2];return t>=1&&t<=12&&a>=1&&a<=h[t]}function o(e,r){var t=e.match(u);if(!t)return!1;return t[1]<=23&&t[2]<=59&&t[3]<=59&&(!r||t[5])}function i(e){if(E.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}var n=e("./util"),l=/^\d\d\d\d-(\d\d)-(\d\d)$/,h=[0,31,29,31,30,31,30,31,31,30,31,30,31],u=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d:\d\d)?$/i,c=/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*$/i,d=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,f=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,p=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,m=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,v=/^(?:\/(?:[^~/]|~0|~1)*)*$|^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,y=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;r.exports=a,a.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^[0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s][0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i,uri:/^(?:[a-z][a-z0-9+-.]*)(?::|\/)\/?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+-.]*:)?\/\/)?[^\s]*$/i,"uri-template":f,url:p,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:c,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:i,uuid:m,"json-pointer":v,"relative-json-pointer":y},a.full={date:s,time:o,"date-time":function(e){var r=e.split(g);return 2==r.length&&s(r[0])&&o(r[1],!0)},uri:function(e){return P.test(e)&&d.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":f,url:p,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&''*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:function(e){return e.length<=255&&c.test(e)},ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:i,uuid:m,"json-pointer":v,"relative-json-pointer":y};var g=/t|\s/i,P=/\/|:/,E=/[^\\]\\Z/},{"./util":12}],7:[function(e,r,t){"use strict";function a(e,r,t,P){function E(){var e=C.validate,r=e.apply(null,arguments);return E.errors=e.errors,r}function w(e,t,s,f){var P=!t||t&&t.schema==e;if(t.schema!=r.schema)return a.call($,e,t,s,f);var E=!0===e.$async,w=p({isTop:!0,schema:e,isRoot:P,baseId:f,root:t,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:d.MissingRef,RULES:U,validate:p,util:c,resolve:u,resolveRef:b,usePattern:_,useDefault:x,useCustomRule:F,opts:R,formats:Q,logger:$.logger,self:$});w=h(O,n)+h(I,o)+h(k,i)+h(L,l)+w,R.processCode&&(w=R.processCode(w));var S;try{S=new Function("self","RULES","formats","root","refVal","defaults","customRules","co","equal","ucs2length","ValidationError",w)($,U,Q,r,O,k,L,m,y,v,g),O[0]=S}catch(e){throw $.logger.error("Error compiling schema, function code:",w),e}return S.schema=e,S.errors=null,S.refs=D,S.refVal=O,S.root=P?S:t,E&&(S.$async=!0),!0===R.sourceCode&&(S.source={code:w,patterns:I,defaults:k}),S}function b(e,s,o){s=u.url(e,s);var i,n,l=D[s];if(void 0!==l)return i=O[l],n="refVal["+l+"]",j(i,n);if(!o&&r.refs){var h=r.refs[s];if(void 0!==h)return i=r.refVal[h],n=S(s,i),j(i,n)}n=S(s);var c=u.call($,w,r,s);if(void 0===c){var d=t&&t[s];d&&(c=u.inlineRef(d,R.inlineRefs)?d:a.call($,d,r,t,e))}if(void 0!==c)return function(e,r){O[D[e]]=r}(s,c),j(c,n);!function(e){delete D[e]}(s)}function S(e,r){var t=O.length;return O[t]=r,D[e]=t,"refVal"+t}function j(e,r){return"object"==typeof e||"boolean"==typeof e?{code:r,schema:e,inline:!0}:{code:r,$async:e&&e.$async}}function _(e){var r=A[e];return void 0===r&&(r=A[e]=I.length,I[r]=e),"pattern"+r}function x(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return c.toQuotedString(e);case"object":if(null===e)return"null";var r=f(e),t=q[r];return void 0===t&&(t=q[r]=k.length,k[t]=e),"default"+t}}function F(e,r,t,a){var s=e.definition.validateSchema;if(s&&!1!==$._opts.validateSchema){if(!s(r)){var o="keyword schema is invalid: "+$.errorsText(s.errors);if("log"!=$._opts.validateSchema)throw new Error(o);$.logger.error(o)}}var i,n=e.definition.compile,l=e.definition.inline,h=e.definition.macro;if(n)i=n.call($,r,t,a);else if(h)i=h.call($,r,t,a),!1!==R.validateSchema&&$.validateSchema(i,!0);else if(l)i=l.call($,a,e.keyword,r,t);else if(!(i=e.definition.validate))return;if(void 0===i)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var u=L.length;return L[u]=i,{code:"customRule"+u,validate:i}}var $=this,R=this._opts,O=[void 0],D={},I=[],A={},k=[],q={},L=[],z=function(e,r,t){var a=s.call(this,e,r,t);return a>=0?{index:a,compiling:!0}:(a=this._compilations.length,this._compilations[a]={schema:e,root:r,baseId:t},{index:a,compiling:!1})}.call(this,e,r=r||{schema:e,refVal:O,refs:D},P),C=this._compilations[z.index];if(z.compiling)return C.callValidate=E;var Q=this._formats,U=this.RULES;try{var V=w(e,r,t,P);C.validate=V;var N=C.callValidate;return N&&(N.schema=V.schema,N.errors=null,N.refs=V.refs,N.refVal=V.refVal,N.root=V.root,N.$async=V.$async,R.sourceCode&&(N.source=V.source)),V}finally{(function(e,r,t){var a=s.call(this,e,r,t);a>=0&&this._compilations.splice(a,1)}).call(this,e,r,P)}}function s(e,r,t){for(var a=0;a<this._compilations.length;a++){var s=this._compilations[a];if(s.schema==e&&s.root==r&&s.baseId==t)return a}return-1}function o(e,r){return"var pattern"+e+" = new RegExp("+c.toQuotedString(r[e])+");"}function i(e){return"var default"+e+" = defaults["+e+"];"}function n(e,r){return void 0===r[e]?"":"var refVal"+e+" = refVal["+e+"];"}function l(e){return"var customRule"+e+" = customRules["+e+"];"}function h(e,r){if(!e.length)return"";for(var t="",a=0;a<e.length;a++)t+=r(a,e);return t}var u=e("./resolve"),c=e("./util"),d=e("./error_classes"),f=e("fast-json-stable-stringify"),p=e("../dotjs/validate"),m=e("co"),v=c.ucs2length,y=e("fast-deep-equal"),g=d.Validation;r.exports=a},{"../dotjs/validate":35,"./error_classes":5,"./resolve":8,"./util":12,co:40,"fast-deep-equal":41,"fast-json-stable-stringify":42}],8:[function(e,r,t){"use strict";function a(e,r,t){var o=this._refs[t];if("string"==typeof o){if(!this._refs[o])return a.call(this,e,r,o);o=this._refs[o]}if((o=o||this._schemas[t])instanceof v)return i(o.schema,this._opts.inlineRefs)?o.schema:o.validate||this._compile(o);var n,l,h,u=s.call(this,r,t);return u&&(n=u.schema,r=u.root,h=u.baseId),n instanceof v?l=n.validate||e.call(this,n.schema,r,void 0,h):void 0!==n&&(l=i(n,this._opts.inlineRefs)?n:e.call(this,n,r,void 0,h)),l}function s(e,r){var t=f.parse(r,!1,!0),a=u(t),i=h(this._getId(e.schema));if(a!==i){var n=c(a),l=this._refs[n];if("string"==typeof l)return function(e,r,t){var a=s.call(this,e,r);if(a){var i=a.schema,n=a.baseId;e=a.root;var l=this._getId(i);return l&&(n=d(n,l)),o.call(this,t,n,i,e)}}.call(this,e,l,t);if(l instanceof v)l.validate||this._compile(l),e=l;else{if(!((l=this._schemas[n])instanceof v))return;if(l.validate||this._compile(l),n==c(r))return{schema:l,root:e,baseId:i};e=l}if(!e.schema)return;i=h(this._getId(e.schema))}return o.call(this,t,i,e.schema,e)}function o(e,r,t,a){if(e.hash=e.hash||"","#/"==e.hash.slice(0,2)){for(var o=e.hash.split("/"),i=1;i<o.length;i++){var n=o[i];if(n){if(n=m.unescapeFragment(n),void 0===(t=t[n]))break;var l;if(!g[n]&&((l=this._getId(t))&&(r=d(r,l)),t.$ref)){var h=d(r,t.$ref),u=s.call(this,a,h);u&&(t=u.schema,a=u.root,r=u.baseId)}}}return void 0!==t&&t!==a.schema?{schema:t,root:a,baseId:r}:void 0}}function i(e,r){return!1!==r&&(void 0===r||!0===r?n(e):r?l(e)<=r:void 0)}function n(e){var r;if(Array.isArray(e)){for(var t=0;t<e.length;t++)if("object"==typeof(r=e[t])&&!n(r))return!1}else for(var a in e){if("$ref"==a)return!1;if("object"==typeof(r=e[a])&&!n(r))return!1}return!0}function l(e){var r,t=0;if(Array.isArray(e)){for(var a=0;a<e.length;a++)if("object"==typeof(r=e[a])&&(t+=l(r)),t==1/0)return 1/0}else for(var s in e){if("$ref"==s)return 1/0;if(P[s])t++;else if("object"==typeof(r=e[s])&&(t+=l(r)+1),t==1/0)return 1/0}return t}function h(e,r){!1!==r&&(e=c(e));return u(f.parse(e,!1,!0))}function u(e){var r=e.protocol||"//"==e.href.slice(0,2)?"//":"";return(e.protocol||"")+r+(e.host||"")+(e.path||"")+"#"}function c(e){return e?e.replace(E,""):""}function d(e,r){return r=c(r),f.resolve(e,r)}var f=e("url"),p=e("fast-deep-equal"),m=e("./util"),v=e("./schema_obj"),y=e("json-schema-traverse");r.exports=a,a.normalizeId=c,a.fullPath=h,a.url=d,a.ids=function(e){var r=c(this._getId(e)),t={"":r},a={"":h(r,!1)},s={},o=this;return y(e,{allKeys:!0},function(e,r,i,n,l,h,u){if(""!==r){var d=o._getId(e),v=t[n],y=a[n]+"/"+l;if(void 0!==u&&(y+="/"+("number"==typeof u?u:m.escapeFragment(u))),"string"==typeof d){d=v=c(v?f.resolve(v,d):d);var g=o._refs[d];if("string"==typeof g&&(g=o._refs[g]),g&&g.schema){if(!p(e,g.schema))throw new Error('id "'+d+'" resolves to more than one schema')}else if(d!=c(y))if("#"==d[0]){if(s[d]&&!p(e,s[d]))throw new Error('id "'+d+'" resolves to more than one schema');s[d]=e}else o._refs[d]=y}t[r]=v,a[r]=y}}),s},a.inlineRef=i,a.schema=s;var g=m.toHash(["properties","patternProperties","enum","dependencies","definitions"]),P=m.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]),E=/#\/?$/},{"./schema_obj":10,"./util":12,"fast-deep-equal":41,"json-schema-traverse":43,url:48}],9:[function(e,r,t){"use strict";var a=e("./_rules"),s=e("./util").toHash;r.exports=function(){var e=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","uniqueItems","contains","items"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf"]}],r=["type"];return e.all=s(r),e.types=s(["number","integer","string","array","object","boolean","null"]),e.forEach(function(t){t.rules=t.rules.map(function(t){var s;if("object"==typeof t){var o=Object.keys(t)[0];s=t[o],t=o,s.forEach(function(t){r.push(t),e.all[t]=!0})}r.push(t);return e.all[t]={keyword:t,code:a[t],implements:s}}),t.type&&(e.types[t.type]=t)}),e.keywords=s(r.concat(["additionalItems","$schema","$id","id","title","description","default","definitions"])),e.custom={},e}},{"./_rules":3,"./util":12}],10:[function(e,r,t){"use strict";var a=e("./util");r.exports=function(e){a.copy(e,this)}},{"./util":12}],11:[function(e,r,t){"use strict";r.exports=function(e){for(var r,t=0,a=e.length,s=0;s<a;)t++,(r=e.charCodeAt(s++))>=55296&&r<=56319&&s<a&&56320==(64512&(r=e.charCodeAt(s)))&&s++;return t}},{}],12:[function(e,r,t){"use strict";function a(e,r,t){var a=t?" !== ":" === ",s=t?" || ":" && ",o=t?"!":"",i=t?"":"!";switch(e){case"null":return r+a+"null";case"array":return o+"Array.isArray("+r+")";case"object":return"("+o+r+s+"typeof "+r+a+'"object"'+s+i+"Array.isArray("+r+"))";case"integer":return"(typeof "+r+a+'"number"'+s+i+"("+r+" % 1)"+s+r+a+r+")";default:return"typeof "+r+a+'"'+e+'"'}}function s(e){for(var r={},t=0;t<e.length;t++)r[e[t]]=!0;return r}function o(e){return"number"==typeof e?"["+e+"]":d.test(e)?"."+e:"['"+i(e)+"']"}function i(e){return e.replace(f,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function n(e){return"'"+i(e)+"'"}function l(e,r){return'""'==e?r:(e+" + "+r).replace(/' \+ '/g,"")}function h(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function u(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}r.exports={copy:function(e,r){r=r||{};for(var t in e)r[t]=e[t];return r},checkDataType:a,checkDataTypes:function(e,r){switch(e.length){case 1:return a(e[0],r,!0);default:var t="",o=s(e);o.array&&o.object&&(t=o.null?"(":"(!"+r+" || ",t+="typeof "+r+' !== "object")',delete o.null,delete o.array,delete o.object),o.number&&delete o.integer;for(var i in o)t+=(t?" && ":"")+a(i,r,!0);return t}},coerceToTypes:function(e,r){if(Array.isArray(r)){for(var t=[],a=0;a<r.length;a++){var s=r[a];c[s]?t[t.length]=s:"array"===e&&"array"===s&&(t[t.length]=s)}if(t.length)return t}else{if(c[r])return[r];if("array"===e&&"array"===r)return["array"]}},toHash:s,getProperty:o,escapeQuotes:i,equal:e("fast-deep-equal"),ucs2length:e("./ucs2length"),varOccurences:function(e,r){r+="[^0-9]";var t=e.match(new RegExp(r,"g"));return t?t.length:0},varReplace:function(e,r,t){return r+="([^0-9])",t=t.replace(/\$/g,"$$$$"),e.replace(new RegExp(r,"g"),t+"$1")},cleanUpCode:function(e){return e.replace(p,"").replace(m,"").replace(v,"if (!($1))")},finalCleanUpCode:function(e,r){var t=e.match(y);return t&&2==t.length&&(e=r?e.replace(P,"").replace(b,S):e.replace(g,"").replace(E,w)),(t=e.match(j))&&3===t.length?e.replace(_,""):e},schemaHasRules:function(e,r){if("boolean"==typeof e)return!e;for(var t in e)if(r[t])return!0},schemaHasRulesExcept:function(e,r,t){if("boolean"==typeof e)return!e&&"not"!=t;for(var a in e)if(a!=t&&r[a])return!0},toQuotedString:n,getPathExpr:function(e,r,t,a){return l(e,t?"'/' + "+r+(a?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):a?"'[' + "+r+" + ']'":"'[\\'' + "+r+" + '\\']'")},getPath:function(e,r,t){return l(e,n(t?"/"+h(r):o(r)))},getData:function(e,r,t){var a,s,i,n;if(""===e)return"rootData";if("/"==e[0]){if(!x.test(e))throw new Error("Invalid JSON-pointer: "+e);s=e,i="rootData"}else{if(!(n=e.match(F)))throw new Error("Invalid JSON-pointer: "+e);if(a=+n[1],"#"==(s=n[2])){if(a>=r)throw new Error("Cannot access property/index "+a+" levels up, current level is "+r);return t[r-a]}if(a>r)throw new Error("Cannot access data "+a+" levels up, current level is "+r);if(i="data"+(r-a||""),!s)return i}for(var l=i,h=s.split("/"),c=0;c<h.length;c++){var d=h[c];d&&(l+=" && "+(i+=o(u(d))))}return l},unescapeFragment:function(e){return u(decodeURIComponent(e))},unescapeJsonPointer:u,escapeFragment:function(e){return encodeURIComponent(h(e))},escapeJsonPointer:h};var c=s(["string","number","integer","boolean","null"]),d=/^[a-z$_][a-z$_0-9]*$/i,f=/'|\\/g,p=/else\s*{\s*}/g,m=/if\s*\([^)]+\)\s*\{\s*\}(?!\s*else)/g,v=/if\s*\(([^)]+)\)\s*\{\s*\}\s*else(?!\s*if)/g,y=/[^v.]errors/g,g=/var errors = 0;|var vErrors = null;|validate.errors = vErrors;/g,P=/var errors = 0;|var vErrors = null;/g,E="return errors === 0;",w="validate.errors = null; return true;",b=/if \(errors === 0\) return data;\s*else throw new ValidationError\(vErrors\);/,S="return data;",j=/[^A-Za-z_$]rootData[^A-Za-z0-9_$]/g,_=/if \(rootData === undefined\) rootData = data;/,x=/^\/(?:[^~]|~0|~1)*$/,F=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/},{"./ucs2length":11,"fast-deep-equal":41}],13:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),h=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n;var f="maximum"==r,p=f?"exclusiveMaximum":"exclusiveMinimum",m=e.schema[p],v=f?"<":">",y=f?">":"<",g=void 0;if(e.opts.$data&&m&&m.$data){var P=e.util.getData(m.$data,i,e.dataPathArr),E="exclusive"+o,w="exclType"+o,b="exclIsNumber"+o,S="' + "+(j="op"+o)+" + '";s+=" var schemaExcl"+o+" = "+P+"; ",s+=" var "+E+"; var "+w+" = typeof "+(P="schemaExcl"+o)+"; if ("+w+" != 'boolean' && "+w+" != 'undefined' && "+w+" != 'number') { ";g=p;(_=_||[]).push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(g||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: {} ",!1!==e.opts.messages&&(s+=" , message: '"+p+" should be boolean' "),e.opts.verbose&&(s+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";x=s;s=_.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+x+"]); ":" validate.errors = ["+x+"]; return false; ":" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } else if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" "+w+" == 'number' ? ( ("+E+" = "+a+" === undefined || "+P+" "+v+"= "+a+") ? "+c+" "+y+"= "+P+" : "+c+" "+y+" "+a+" ) : ( ("+E+" = "+P+" === true) ? "+c+" "+y+"= "+a+" : "+c+" "+y+" "+a+" ) || "+c+" !== "+c+") { var op"+o+" = "+E+" ? '"+v+"' : '"+v+"=';"}else{S=v;if((b="number"==typeof m)&&d){j="'"+S+"'";s+=" if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" ( "+a+" === undefined || "+m+" "+v+"= "+a+" ? "+c+" "+y+"= "+m+" : "+c+" "+y+" "+a+" ) || "+c+" !== "+c+") { "}else{b&&void 0===n?(E=!0,g=p,h=e.errSchemaPath+"/"+p,a=m,y+="="):(b&&(a=Math[f?"min":"max"](m,n)),m===(!b||a)?(E=!0,g=p,h=e.errSchemaPath+"/"+p,y+="="):(E=!1,S+="="));var j="'"+S+"'";s+=" if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" "+c+" "+y+" "+a+" || "+c+" !== "+c+") { "}}g=g||r;var _=_||[];_.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(g||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { comparison: "+j+", limit: "+a+", exclusive: "+E+" } ",!1!==e.opts.messages&&(s+=" , message: 'should be "+S+" ",s+=d?"' + "+a:a+"'"),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";var x=s;return s=_.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+x+"]); ":" validate.errors = ["+x+"]; return false; ":" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } ",u&&(s+=" else { "),s}},{}],14:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),h=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n;s+="if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" "+c+".length "+("maxItems"==r?">":"<")+" "+a+") { ";var f=r,p=p||[];p.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(f||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have ",s+="maxItems"==r?"more":"less",s+=" than ",s+=d?"' + "+a+" + '":""+n,s+=" items' "),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",u&&(s+=" else { "),s}},{}],15:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),h=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n;s+="if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=!1===e.opts.unicode?" "+c+".length ":" ucs2length("+c+") ",s+=" "+("maxLength"==r?">":"<")+" "+a+") { ";var f=r,p=p||[];p.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(f||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT be ",s+="maxLength"==r?"longer":"shorter",s+=" than ",s+=d?"' + "+a+" + '":""+n,s+=" characters' "),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",u&&(s+=" else { "),s}},{}],16:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),h=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n;s+="if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" Object.keys("+c+").length "+("maxProperties"==r?">":"<")+" "+a+") { ";var f=r,p=p||[];p.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(f||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have ",s+="maxProperties"==r?"more":"less",s+=" than ",s+=d?"' + "+a+" + '":""+n,s+=" properties' "),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",u&&(s+=" else { "),s}},{}],17:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.schema[r],o=e.schemaPath+e.util.getProperty(r),i=e.errSchemaPath+"/"+r,n=!e.opts.allErrors,l=e.util.copy(e),h="";l.level++;var u="valid"+l.level,c=l.baseId,d=!0,f=s;if(f)for(var p,m=-1,v=f.length-1;m<v;)p=f[m+=1],e.util.schemaHasRules(p,e.RULES.all)&&(d=!1,l.schema=p,l.schemaPath=o+"["+m+"]",l.errSchemaPath=i+"/"+m,a+=" "+e.validate(l)+" ",l.baseId=c,n&&(a+=" if ("+u+") { ",h+="}"));return n&&(a+=d?" if (true) { ":" "+h.slice(0,-1)+" "),a=e.util.cleanUpCode(a)}},{}],18:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(o||""),c="valid"+s,d="errs__"+s,f=e.util.copy(e),p="";f.level++;var m="valid"+f.level;if(i.every(function(r){return e.util.schemaHasRules(r,e.RULES.all)})){var v=f.baseId;a+=" var "+d+" = errors; var "+c+" = false; ";var y=e.compositeRule;e.compositeRule=f.compositeRule=!0;var g=i;if(g)for(var P,E=-1,w=g.length-1;E<w;)P=g[E+=1],f.schema=P,f.schemaPath=n+"["+E+"]",f.errSchemaPath=l+"/"+E,a+=" "+e.validate(f)+" ",f.baseId=v,a+=" "+c+" = "+c+" || "+m+"; if (!"+c+") { ",p+="}";e.compositeRule=f.compositeRule=y,a+=" "+p+" if (!"+c+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&h&&(a+=e.async?" throw new ValidationError(vErrors); ":" validate.errors = vErrors; return false; "),a+=" } else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } "),a=e.util.cleanUpCode(a)}else h&&(a+=" if (true) { ");return a}},{}],19:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(o||""),c="valid"+s,d=e.opts.$data&&i&&i.$data;d&&(a+=" var schema"+s+" = "+e.util.getData(i.$data,o,e.dataPathArr)+"; "),d||(a+=" var schema"+s+" = validate.schema"+n+";"),a+="var "+c+" = equal("+u+", schema"+s+"); if (!"+c+") { ";var f=f||[];f.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to constant' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var p=a;return a=f.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+p+"]); ":" validate.errors = ["+p+"]; return false; ":" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",h&&(a+=" else { "),a}},{}],20:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(o||""),c="valid"+s,d="errs__"+s,f=e.util.copy(e);f.level++;var p="valid"+f.level,m="i"+s,v=f.dataLevel=e.dataLevel+1,y="data"+v,g=e.baseId,P=e.util.schemaHasRules(i,e.RULES.all);if(a+="var "+d+" = errors;var "+c+";",P){var E=e.compositeRule;e.compositeRule=f.compositeRule=!0,f.schema=i,f.schemaPath=n,f.errSchemaPath=l,a+=" var "+p+" = false; for (var "+m+" = 0; "+m+" < "+u+".length; "+m+"++) { ",f.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0);var w=u+"["+m+"]";f.dataPathArr[v]=m;var b=e.validate(f);f.baseId=g,e.util.varOccurences(b,y)<2?a+=" "+e.util.varReplace(b,y,w)+" ":a+=" var "+y+" = "+w+"; "+b+" ",a+=" if ("+p+") break; } ",e.compositeRule=f.compositeRule=E,a+=" if (!"+p+") {"}else a+=" if ("+u+".length == 0) {";var S=S||[];S.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should contain a valid item' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var j=a;return a=S.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+j+"]); ":" validate.errors = ["+j+"]; return false; ":" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ",P&&(a+=" errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } "),e.opts.allErrors&&(a+=" } "),a=e.util.cleanUpCode(a)}},{}],21:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s,o=" ",i=e.level,n=e.dataLevel,l=e.schema[r],h=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(n||""),f="valid"+i,p="errs__"+i,m=e.opts.$data&&l&&l.$data;m?(o+=" var schema"+i+" = "+e.util.getData(l.$data,n,e.dataPathArr)+"; ",s="schema"+i):s=l;var v,y,g,P,E,w="definition"+i,b=this.definition,S="";if(m&&b.$data){var j=b.validateSchema;o+=" var "+w+" = RULES.custom['"+r+"'].definition; var "+(E="keywordValidate"+i)+" = "+w+".validate;"}else{if(!(P=e.useCustomRule(this,l,e.schema,e)))return;s="validate.schema"+h,E=P.code,v=b.compile,y=b.inline,g=b.macro}var _=E+".errors",x="i"+i,F="ruleErr"+i,$=b.async;if($&&!e.async)throw new Error("async keyword in sync schema");if(y||g||(o+=_+" = null;"),o+="var "+p+" = errors;var "+f+";",m&&b.$data&&(S+="}",o+=" if ("+s+" === undefined) { "+f+" = true; } else { ",j&&(S+="}",o+=" "+f+" = "+w+".validateSchema("+s+"); if ("+f+") { ")),y)o+=b.statements?" "+P.validate+" ":" "+f+" = "+P.validate+"; ";else if(g){var R=e.util.copy(e),S="";R.level++;var O="valid"+R.level;R.schema=P.validate,R.schemaPath="";var D=e.compositeRule;e.compositeRule=R.compositeRule=!0;var I=e.validate(R).replace(/validate\.schema/g,E);e.compositeRule=R.compositeRule=D,o+=" "+I}else{(L=L||[]).push(o),o="",o+=" "+E+".call( ",o+=e.opts.passContext?"this":"self",o+=v||!1===b.schema?" , "+d+" ":" , "+s+" , "+d+" , validate.schema"+e.schemaPath+" ",o+=" , (dataPath || '')",'""'!=e.errorPath&&(o+=" + "+e.errorPath);var A=n?"data"+(n-1||""):"parentData",k=n?e.dataPathArr[n]:"parentDataProperty",q=o+=" , "+A+" , "+k+" , rootData ) ";o=L.pop(),!1===b.errors?(o+=" "+f+" = ",$&&(o+=""+e.yieldAwait),o+=q+"; "):o+=$?" var "+(_="customErrors"+i)+" = null; try { "+f+" = "+e.yieldAwait+q+"; } catch (e) { "+f+" = false; if (e instanceof ValidationError) "+_+" = e.errors; else throw e; } ":" "+_+" = null; "+f+" = "+q+"; "}if(b.modifying&&(o+=" if ("+A+") "+d+" = "+A+"["+k+"];"),o+=""+S,b.valid)c&&(o+=" if (true) { ");else{o+=" if ( ",void 0===b.valid?(o+=" !",o+=g?""+O:""+f):o+=" "+!b.valid+" ",o+=") { ",a=this.keyword;L=L||[];L.push(o),o="";var L;(L=L||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(o+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(o+=" , schema: validate.schema"+h+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var z=o;o=L.pop();var C=o+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+z+"]); ":" validate.errors = ["+z+"]; return false; ":" var err = "+z+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";o=L.pop(),y?b.errors?"full"!=b.errors&&(o+=" for (var "+x+"="+p+"; "+x+"<errors; "+x+"++) { var "+F+" = vErrors["+x+"]; if ("+F+".dataPath === undefined) "+F+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+F+".schemaPath === undefined) { "+F+'.schemaPath = "'+u+'"; } ',e.opts.verbose&&(o+=" "+F+".schema = "+s+"; "+F+".data = "+d+"; "),o+=" } "):!1===b.errors?o+=" "+C+" ":(o+=" if ("+p+" == errors) { "+C+" } else { for (var "+x+"="+p+"; "+x+"<errors; "+x+"++) { var "+F+" = vErrors["+x+"]; if ("+F+".dataPath === undefined) "+F+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+F+".schemaPath === undefined) { "+F+'.schemaPath = "'+u+'"; } ',e.opts.verbose&&(o+=" "+F+".schema = "+s+"; "+F+".data = "+d+"; "),o+=" } } "):g?(o+=" var err = ",!1!==e.createErrors?(o+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(o+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(o+=" , schema: validate.schema"+h+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ",o+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(o+=e.async?" throw new ValidationError(vErrors); ":" validate.errors = vErrors; return false; ")):!1===b.errors?o+=" "+C+" ":(o+=" if (Array.isArray("+_+")) { if (vErrors === null) vErrors = "+_+"; else vErrors = vErrors.concat("+_+"); errors = vErrors.length; for (var "+x+"="+p+"; "+x+"<errors; "+x+"++) { var "+F+" = vErrors["+x+"]; if ("+F+".dataPath === undefined) "+F+".dataPath = (dataPath || '') + "+e.errorPath+"; "+F+'.schemaPath = "'+u+'"; ',e.opts.verbose&&(o+=" "+F+".schema = "+s+"; "+F+".data = "+d+"; "),o+=" } } else { "+C+" } "),o+=" } ",c&&(o+=" else { ")}return o}},{}],22:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(o||""),c="errs__"+s,d=e.util.copy(e),f="";d.level++;var p="valid"+d.level,m={},v={},y=e.opts.ownProperties;for(w in i){var g=i[w],P=Array.isArray(g)?v:m;P[w]=g}a+="var "+c+" = errors;";var E=e.errorPath;a+="var missing"+s+";";for(var w in v)if((P=v[w]).length){if(a+=" if ( "+u+e.util.getProperty(w)+" !== undefined ",y&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(w)+"') "),h){a+=" && ( ";var b=P;if(b)for(var S=-1,j=b.length-1;S<j;){O=b[S+=1],S&&(a+=" || ");a+=" ( ( "+(k=u+(A=e.util.getProperty(O)))+" === undefined ",y&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(O)+"') "),a+=") && (missing"+s+" = "+e.util.toQuotedString(e.opts.jsonPointers?O:A)+") ) "}a+=")) { ";var _="missing"+s,x="' + "+_+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(E,_,!0):E+" + "+_);var F=F||[];F.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+x+"', depsCount: "+P.length+", deps: '"+e.util.escapeQuotes(1==P.length?P[0]:P.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",a+=1==P.length?"property "+e.util.escapeQuotes(P[0]):"properties "+e.util.escapeQuotes(P.join(", ")),a+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var $=a;a=F.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+$+"]); ":" validate.errors = ["+$+"]; return false; ":" var err = "+$+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{a+=" ) { ";var R=P;if(R)for(var O,D=-1,I=R.length-1;D<I;){O=R[D+=1];var A=e.util.getProperty(O),x=e.util.escapeQuotes(O),k=u+A;e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(E,O,e.opts.jsonPointers)),a+=" if ( "+k+" === undefined ",y&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(O)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+x+"', depsCount: "+P.length+", deps: '"+e.util.escapeQuotes(1==P.length?P[0]:P.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",a+=1==P.length?"property "+e.util.escapeQuotes(P[0]):"properties "+e.util.escapeQuotes(P.join(", ")),a+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}a+=" } ",h&&(f+="}",a+=" else { ")}e.errorPath=E;var q=d.baseId;for(var w in m){e.util.schemaHasRules(g=m[w],e.RULES.all)&&(a+=" "+p+" = true; if ( "+u+e.util.getProperty(w)+" !== undefined ",y&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(w)+"') "),a+=") { ",d.schema=g,d.schemaPath=n+e.util.getProperty(w),d.errSchemaPath=l+"/"+e.util.escapeFragment(w),a+=" "+e.validate(d)+" ",d.baseId=q,a+=" } ",h&&(a+=" if ("+p+") { ",f+="}"))}return h&&(a+=" "+f+" if ("+c+" == errors) {"),a=e.util.cleanUpCode(a)}},{}],23:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(o||""),c="valid"+s,d=e.opts.$data&&i&&i.$data;d&&(a+=" var schema"+s+" = "+e.util.getData(i.$data,o,e.dataPathArr)+"; ");var f="i"+s,p="schema"+s;d||(a+=" var "+p+" = validate.schema"+n+";"),a+="var "+c+";",d&&(a+=" if (schema"+s+" === undefined) "+c+" = true; else if (!Array.isArray(schema"+s+")) "+c+" = false; else {"),a+=c+" = false;for (var "+f+"=0; "+f+"<"+p+".length; "+f+"++) if (equal("+u+", "+p+"["+f+"])) { "+c+" = true; break; }",d&&(a+=" } "),a+=" if (!"+c+") { ";var m=m||[];m.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValues: schema"+s+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var v=a;return a=m.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+v+"]); ":" validate.errors = ["+v+"]; return false; ":" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",h&&(a+=" else { "),a}},{}],24:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(o||"");if(!1===e.opts.format)return h&&(a+=" if (true) { "),a;var c,d=e.opts.$data&&i&&i.$data;d?(a+=" var schema"+s+" = "+e.util.getData(i.$data,o,e.dataPathArr)+"; ",c="schema"+s):c=i;var f=e.opts.unknownFormats,p=Array.isArray(f);if(d){a+=" var "+(m="format"+s)+" = formats["+c+"]; var "+(v="isObject"+s)+" = typeof "+m+" == 'object' && !("+m+" instanceof RegExp) && "+m+".validate; var "+(y="formatType"+s)+" = "+v+" && "+m+".type || 'string'; if ("+v+") { ",e.async&&(a+=" var async"+s+" = "+m+".async; "),a+=" "+m+" = "+m+".validate; } if ( ",d&&(a+=" ("+c+" !== undefined && typeof "+c+" != 'string') || "),a+=" (","ignore"!=f&&(a+=" ("+c+" && !"+m+" ",p&&(a+=" && self._opts.unknownFormats.indexOf("+c+") == -1 "),a+=") || "),a+=" ("+m+" && "+y+" == '"+t+"' && !(typeof "+m+" == 'function' ? ",a+=e.async?" (async"+s+" ? "+e.yieldAwait+" "+m+"("+u+") : "+m+"("+u+")) ":" "+m+"("+u+") ",a+=" : "+m+".test("+u+"))))) {"}else{var m=e.formats[i];if(!m){if("ignore"==f)return e.logger.warn('unknown format "'+i+'" ignored in schema at path "'+e.errSchemaPath+'"'),h&&(a+=" if (true) { "),a;if(p&&f.indexOf(i)>=0)return h&&(a+=" if (true) { "),a;throw new Error('unknown format "'+i+'" is used in schema at path "'+e.errSchemaPath+'"')}var v="object"==typeof m&&!(m instanceof RegExp)&&m.validate,y=v&&m.type||"string";if(v){var g=!0===m.async;m=m.validate}if(y!=t)return h&&(a+=" if (true) { "),a;if(g){if(!e.async)throw new Error("async format in sync schema");P="formats"+e.util.getProperty(i)+".validate";a+=" if (!("+e.yieldAwait+" "+P+"("+u+"))) { "}else{a+=" if (! ";var P="formats"+e.util.getProperty(i);v&&(P+=".validate"),a+="function"==typeof m?" "+P+"("+u+") ":" "+P+".test("+u+") ",a+=") { "}}var E=E||[];E.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format: ",a+=d?""+c:""+e.util.toQuotedString(i),a+=" } ",!1!==e.opts.messages&&(a+=" , message: 'should match format \"",a+=d?"' + "+c+" + '":""+e.util.escapeQuotes(i),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",a+=d?"validate.schema"+n:""+e.util.toQuotedString(i),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var w=a;return a=E.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+w+"]); ":" validate.errors = ["+w+"]; return false; ":" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",h&&(a+=" else { "),a}},{}],25:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(o||""),c="valid"+s,d="errs__"+s,f=e.util.copy(e),p="";f.level++;var m="valid"+f.level,v="i"+s,y=f.dataLevel=e.dataLevel+1,g="data"+y,P=e.baseId;if(a+="var "+d+" = errors;var "+c+";",Array.isArray(i)){var E=e.schema.additionalItems;if(!1===E){a+=" "+c+" = "+u+".length <= "+i.length+"; ";var w=l;l=e.errSchemaPath+"/additionalItems",a+=" if (!"+c+") { ";var b=b||[];b.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+i.length+" } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have more than "+i.length+" items' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var S=a;a=b.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+S+"]); ":" validate.errors = ["+S+"]; return false; ":" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",l=w,h&&(p+="}",a+=" else { ")}var j=i;if(j)for(var _,x=-1,F=j.length-1;x<F;)if(_=j[x+=1],e.util.schemaHasRules(_,e.RULES.all)){a+=" "+m+" = true; if ("+u+".length > "+x+") { ";$=u+"["+x+"]";f.schema=_,f.schemaPath=n+"["+x+"]",f.errSchemaPath=l+"/"+x,f.errorPath=e.util.getPathExpr(e.errorPath,x,e.opts.jsonPointers,!0),f.dataPathArr[y]=x;R=e.validate(f);f.baseId=P,e.util.varOccurences(R,g)<2?a+=" "+e.util.varReplace(R,g,$)+" ":a+=" var "+g+" = "+$+"; "+R+" ",a+=" } ",h&&(a+=" if ("+m+") { ",p+="}")}if("object"==typeof E&&e.util.schemaHasRules(E,e.RULES.all)){f.schema=E,f.schemaPath=e.schemaPath+".additionalItems",f.errSchemaPath=e.errSchemaPath+"/additionalItems",a+=" "+m+" = true; if ("+u+".length > "+i.length+") { for (var "+v+" = "+i.length+"; "+v+" < "+u+".length; "+v+"++) { ",f.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);$=u+"["+v+"]";f.dataPathArr[y]=v;R=e.validate(f);f.baseId=P,e.util.varOccurences(R,g)<2?a+=" "+e.util.varReplace(R,g,$)+" ":a+=" var "+g+" = "+$+"; "+R+" ",h&&(a+=" if (!"+m+") break; "),a+=" } } ",h&&(a+=" if ("+m+") { ",p+="}")}}else if(e.util.schemaHasRules(i,e.RULES.all)){f.schema=i,f.schemaPath=n,f.errSchemaPath=l,a+=" for (var "+v+" = 0; "+v+" < "+u+".length; "+v+"++) { ",f.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);var $=u+"["+v+"]";f.dataPathArr[y]=v;var R=e.validate(f);f.baseId=P,e.util.varOccurences(R,g)<2?a+=" "+e.util.varReplace(R,g,$)+" ":a+=" var "+g+" = "+$+"; "+R+" ",h&&(a+=" if (!"+m+") break; "),a+=" }"}return h&&(a+=" "+p+" if ("+d+" == errors) {"),a=e.util.cleanUpCode(a)}},{}],26:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),h=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n,s+="var division"+o+";if (",d&&(s+=" "+a+" !== undefined && ( typeof "+a+" != 'number' || "),s+=" (division"+o+" = "+c+" / "+a+", ",s+=e.opts.multipleOfPrecision?" Math.abs(Math.round(division"+o+") - division"+o+") > 1e-"+e.opts.multipleOfPrecision+" ":" division"+o+" !== parseInt(division"+o+") ",s+=" ) ",d&&(s+=" ) "),s+=" ) { ";var f=f||[];f.push(s),s="",!1!==e.createErrors?(s+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { multipleOf: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should be multiple of ",s+=d?"' + "+a:a+"'"),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";var p=s;return s=f.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+p+"]); ":" validate.errors = ["+p+"]; return false; ":" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",u&&(s+=" else { "),s}},{}],27:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(o||""),c="errs__"+s,d=e.util.copy(e);d.level++;var f="valid"+d.level;if(e.util.schemaHasRules(i,e.RULES.all)){d.schema=i,d.schemaPath=n,d.errSchemaPath=l,a+=" var "+c+" = errors; ";var p=e.compositeRule;e.compositeRule=d.compositeRule=!0,d.createErrors=!1;var m;d.opts.allErrors&&(m=d.opts.allErrors,d.opts.allErrors=!1),a+=" "+e.validate(d)+" ",d.createErrors=!0,m&&(d.opts.allErrors=m),e.compositeRule=d.compositeRule=p,a+=" if ("+f+") { ";var v=v||[];v.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var y=a;a=v.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+y+"]); ":" validate.errors = ["+y+"]; return false; ":" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+c+"; if (vErrors !== null) { if ("+c+") vErrors.length = "+c+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else a+=" var err = ",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",h&&(a+=" if (false) { ");return a}},{}],28:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(o||""),c="valid"+s,d="errs__"+s,f=e.util.copy(e),p="";f.level++;var m="valid"+f.level;a+="var "+d+" = errors;var prevValid"+s+" = false;var "+c+" = false;";var v=f.baseId,y=e.compositeRule;e.compositeRule=f.compositeRule=!0;var g=i;if(g)for(var P,E=-1,w=g.length-1;E<w;)P=g[E+=1],e.util.schemaHasRules(P,e.RULES.all)?(f.schema=P,f.schemaPath=n+"["+E+"]",f.errSchemaPath=l+"/"+E,a+=" "+e.validate(f)+" ",f.baseId=v):a+=" var "+m+" = true; ",E&&(a+=" if ("+m+" && prevValid"+s+") "+c+" = false; else { ",p+="}"),a+=" if ("+m+") "+c+" = prevValid"+s+" = true;";return e.compositeRule=f.compositeRule=y,a+=p+"if (!"+c+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&h&&(a+=e.async?" throw new ValidationError(vErrors); ":" validate.errors = vErrors; return false; "),a+="} else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; }",e.opts.allErrors&&(a+=" } "),a}},{}],29:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),h=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n;var f=d?"(new RegExp("+a+"))":e.usePattern(n);s+="if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'string') || "),s+=" !"+f+".test("+c+") ) { ";var p=p||[];p.push(s),s="",!1!==e.createErrors?(s+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { pattern: ",s+=d?""+a:""+e.util.toQuotedString(n),s+=" } ",!1!==e.opts.messages&&(s+=" , message: 'should match pattern \"",s+=d?"' + "+a+" + '":""+e.util.escapeQuotes(n),s+="\"' "),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+e.util.toQuotedString(n),s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",u&&(s+=" else { "),s}},{}],30:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(o||""),c="valid"+s,d="errs__"+s,f=e.util.copy(e),p="";f.level++;var m="valid"+f.level,v="key"+s,y="idx"+s,g=f.dataLevel=e.dataLevel+1,P="data"+g,E="dataProperties"+s,w=Object.keys(i||{}),b=e.schema.patternProperties||{},S=Object.keys(b),j=e.schema.additionalProperties,_=w.length||S.length,x=!1===j,F="object"==typeof j&&Object.keys(j).length,$=e.opts.removeAdditional,R=x||F||$,O=e.opts.ownProperties,D=e.baseId,I=e.schema.required;if(I&&(!e.opts.v5||!I.$data)&&I.length<e.opts.loopRequired)var A=e.util.toHash(I);if(e.opts.patternGroups)var k=e.schema.patternGroups||{},q=Object.keys(k);if(a+="var "+d+" = errors;var "+m+" = true;",O&&(a+=" var "+E+" = undefined;"),R){if(a+=O?" "+E+" = "+E+" || Object.keys("+u+"); for (var "+y+"=0; "+y+"<"+E+".length; "+y+"++) { var "+v+" = "+E+"["+y+"]; ":" for (var "+v+" in "+u+") { ",_){if(a+=" var isAdditional"+s+" = !(false ",w.length)if(w.length>5)a+=" || validate.schema"+n+"["+v+"] ";else{var L=w;if(L)for(var z=-1,C=L.length-1;z<C;)J=L[z+=1],a+=" || "+v+" == "+e.util.toQuotedString(J)+" "}if(S.length){var Q=S;if(Q)for(var U=-1,V=Q.length-1;U<V;)oe=Q[U+=1],a+=" || "+e.usePattern(oe)+".test("+v+") "}if(e.opts.patternGroups&&q.length){var N=q;if(N)for(var U=-1,T=N.length-1;U<T;)he=N[U+=1],a+=" || "+e.usePattern(he)+".test("+v+") "}a+=" ); if (isAdditional"+s+") { "}if("all"==$)a+=" delete "+u+"["+v+"]; ";else{var M=e.errorPath,H="' + "+v+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers)),x)if($)a+=" delete "+u+"["+v+"]; ";else{a+=" "+m+" = false; ";te=l;l=e.errSchemaPath+"/additionalProperties";(Ee=Ee||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { additionalProperty: '"+H+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have additional properties' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";we=a;a=Ee.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+we+"]); ":" validate.errors = ["+we+"]; return false; ":" var err = "+we+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=te,h&&(a+=" break; ")}else if(F)if("failing"==$){a+=" var "+d+" = errors; ";var K=e.compositeRule;e.compositeRule=f.compositeRule=!0,f.schema=j,f.schemaPath=e.schemaPath+".additionalProperties",f.errSchemaPath=e.errSchemaPath+"/additionalProperties",f.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers);X=u+"["+v+"]";f.dataPathArr[g]=v;pe=e.validate(f);f.baseId=D,e.util.varOccurences(pe,P)<2?a+=" "+e.util.varReplace(pe,P,X)+" ":a+=" var "+P+" = "+X+"; "+pe+" ",a+=" if (!"+m+") { errors = "+d+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+u+"["+v+"]; } ",e.compositeRule=f.compositeRule=K}else{f.schema=j,f.schemaPath=e.schemaPath+".additionalProperties",f.errSchemaPath=e.errSchemaPath+"/additionalProperties",f.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers);X=u+"["+v+"]";f.dataPathArr[g]=v;pe=e.validate(f);f.baseId=D,e.util.varOccurences(pe,P)<2?a+=" "+e.util.varReplace(pe,P,X)+" ":a+=" var "+P+" = "+X+"; "+pe+" ",h&&(a+=" if (!"+m+") break; ")}e.errorPath=M}_&&(a+=" } "),a+=" } ",h&&(a+=" if ("+m+") { ",p+="}")}var B=e.opts.useDefaults&&!e.compositeRule;if(w.length){var G=w;if(G)for(var J,Z=-1,Y=G.length-1;Z<Y;){J=G[Z+=1];if(e.util.schemaHasRules(fe=i[J],e.RULES.all)){var W=e.util.getProperty(J),X=u+W,ee=B&&void 0!==fe.default;f.schema=fe,f.schemaPath=n+W,f.errSchemaPath=l+"/"+e.util.escapeFragment(J),f.errorPath=e.util.getPath(e.errorPath,J,e.opts.jsonPointers),f.dataPathArr[g]=e.util.toQuotedString(J);pe=e.validate(f);if(f.baseId=D,e.util.varOccurences(pe,P)<2){pe=e.util.varReplace(pe,P,X);re=X}else{var re=P;a+=" var "+P+" = "+X+"; "}if(ee)a+=" "+pe+" ";else{if(A&&A[J]){a+=" if ( "+re+" === undefined ",O&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(J)+"') "),a+=") { "+m+" = false; ";var M=e.errorPath,te=l,ae=e.util.escapeQuotes(J);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(M,J,e.opts.jsonPointers)),l=e.errSchemaPath+"/required";(Ee=Ee||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+ae+"' } ",!1!==e.opts.messages&&(a+=" , message: '",a+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+ae+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";we=a;a=Ee.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+we+"]); ":" validate.errors = ["+we+"]; return false; ":" var err = "+we+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=te,e.errorPath=M,a+=" } else { "}else h?(a+=" if ( "+re+" === undefined ",O&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(J)+"') "),a+=") { "+m+" = true; } else { "):(a+=" if ("+re+" !== undefined ",O&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(J)+"') "),a+=" ) { ");a+=" "+pe+" } "}}h&&(a+=" if ("+m+") { ",p+="}")}}if(S.length){var se=S;if(se)for(var oe,ie=-1,ne=se.length-1;ie<ne;){oe=se[ie+=1];if(e.util.schemaHasRules(fe=b[oe],e.RULES.all)){f.schema=fe,f.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(oe),f.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(oe),a+=O?" "+E+" = "+E+" || Object.keys("+u+"); for (var "+y+"=0; "+y+"<"+E+".length; "+y+"++) { var "+v+" = "+E+"["+y+"]; ":" for (var "+v+" in "+u+") { ",a+=" if ("+e.usePattern(oe)+".test("+v+")) { ",f.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers);X=u+"["+v+"]";f.dataPathArr[g]=v;pe=e.validate(f);f.baseId=D,e.util.varOccurences(pe,P)<2?a+=" "+e.util.varReplace(pe,P,X)+" ":a+=" var "+P+" = "+X+"; "+pe+" ",h&&(a+=" if (!"+m+") break; "),a+=" } ",h&&(a+=" else "+m+" = true; "),a+=" } ",h&&(a+=" if ("+m+") { ",p+="}")}}}if(e.opts.patternGroups&&q.length){var le=q;if(le)for(var he,ue=-1,ce=le.length-1;ue<ce;){var de=k[he=le[ue+=1]],fe=de.schema;if(e.util.schemaHasRules(fe,e.RULES.all)){f.schema=fe,f.schemaPath=e.schemaPath+".patternGroups"+e.util.getProperty(he)+".schema",f.errSchemaPath=e.errSchemaPath+"/patternGroups/"+e.util.escapeFragment(he)+"/schema",a+=" var pgPropCount"+s+" = 0; ",a+=O?" "+E+" = "+E+" || Object.keys("+u+"); for (var "+y+"=0; "+y+"<"+E+".length; "+y+"++) { var "+v+" = "+E+"["+y+"]; ":" for (var "+v+" in "+u+") { ",a+=" if ("+e.usePattern(he)+".test("+v+")) { pgPropCount"+s+"++; ",f.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers);X=u+"["+v+"]";f.dataPathArr[g]=v;var pe=e.validate(f);f.baseId=D,e.util.varOccurences(pe,P)<2?a+=" "+e.util.varReplace(pe,P,X)+" ":a+=" var "+P+" = "+X+"; "+pe+" ",h&&(a+=" if (!"+m+") break; "),a+=" } ",h&&(a+=" else "+m+" = true; "),a+=" } ",h&&(a+=" if ("+m+") { ",p+="}");var me=de.minimum,ve=de.maximum;if(void 0!==me||void 0!==ve){a+=" var "+c+" = true; ";te=l;if(void 0!==me){var ye=me,ge="minimum",Pe="less";a+=" "+c+" = pgPropCount"+s+" >= "+me+"; ",l=e.errSchemaPath+"/patternGroups/minimum",a+=" if (!"+c+") { ";(Ee=Ee||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'patternGroups' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { reason: '"+ge+"', limit: "+ye+", pattern: '"+e.util.escapeQuotes(he)+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have "+Pe+" than "+ye+' properties matching pattern "'+e.util.escapeQuotes(he)+"\"' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";we=a;a=Ee.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+we+"]); ":" validate.errors = ["+we+"]; return false; ":" var err = "+we+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",void 0!==ve&&(a+=" else ")}if(void 0!==ve){var ye=ve,ge="maximum",Pe="more";a+=" "+c+" = pgPropCount"+s+" <= "+ve+"; ",l=e.errSchemaPath+"/patternGroups/maximum",a+=" if (!"+c+") { ";var Ee=Ee||[];Ee.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'patternGroups' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { reason: '"+ge+"', limit: "+ye+", pattern: '"+e.util.escapeQuotes(he)+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have "+Pe+" than "+ye+' properties matching pattern "'+e.util.escapeQuotes(he)+"\"' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var we=a;a=Ee.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+we+"]); ":" validate.errors = ["+we+"]; return false; ":" var err = "+we+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } "}l=te,h&&(a+=" if ("+c+") { ",p+="}")}}}}return h&&(a+=" "+p+" if ("+d+" == errors) {"),a=e.util.cleanUpCode(a)}},{}],31:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(o||""),c="errs__"+s,d=e.util.copy(e);d.level++;var f="valid"+d.level;if(e.util.schemaHasRules(i,e.RULES.all)){d.schema=i,d.schemaPath=n,d.errSchemaPath=l;var p="key"+s,m="idx"+s,v="i"+s,y="' + "+p+" + '",g="data"+(d.dataLevel=e.dataLevel+1),P="dataProperties"+s,E=e.opts.ownProperties,w=e.baseId;a+=" var "+c+" = errors; ",E&&(a+=" var "+P+" = undefined; "),a+=E?" "+P+" = "+P+" || Object.keys("+u+"); for (var "+m+"=0; "+m+"<"+P+".length; "+m+"++) { var "+p+" = "+P+"["+m+"]; ":" for (var "+p+" in "+u+") { ",a+=" var startErrs"+s+" = errors; ";var b=p,S=e.compositeRule;e.compositeRule=d.compositeRule=!0;var j=e.validate(d);d.baseId=w,e.util.varOccurences(j,g)<2?a+=" "+e.util.varReplace(j,g,b)+" ":a+=" var "+g+" = "+b+"; "+j+" ",e.compositeRule=d.compositeRule=S,a+=" if (!"+f+") { for (var "+v+"=startErrs"+s+"; "+v+"<errors; "+v+"++) { vErrors["+v+"].propertyName = "+p+"; } var err = ",!1!==e.createErrors?(a+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { propertyName: '"+y+"' } ",!1!==e.opts.messages&&(a+=" , message: 'property name \\'"+y+"\\' is invalid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&h&&(a+=e.async?" throw new ValidationError(vErrors); ":" validate.errors = vErrors; return false; "),h&&(a+=" break; "),a+=" } }"}return h&&(a+=" if ("+c+" == errors) {"),a=e.util.cleanUpCode(a)}},{}],32:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s,o=" ",i=e.dataLevel,n=e.schema[r],l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(i||""),c="valid"+e.level;if("#"==n||"#/"==n)e.isRoot?(a=e.async,s="validate"):(a=!0===e.root.schema.$async,s="root.refVal[0]");else{var d=e.resolveRef(e.baseId,n,e.isRoot);if(void 0===d){var f=e.MissingRefError.message(e.baseId,n);if("fail"==e.opts.missingRefs){e.logger.error(f);(y=y||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { ref: '"+e.util.escapeQuotes(n)+"' } ",!1!==e.opts.messages&&(o+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(n)+"' "),e.opts.verbose&&(o+=" , schema: "+e.util.toQuotedString(n)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),o+=" } "):o+=" {} ";var p=o;o=y.pop(),o+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+p+"]); ":" validate.errors = ["+p+"]; return false; ":" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",h&&(o+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,n,f);e.logger.warn(f),h&&(o+=" if (true) { ")}}else if(d.inline){var m=e.util.copy(e);m.level++;var v="valid"+m.level;m.schema=d.schema,m.schemaPath="",m.errSchemaPath=n;o+=" "+e.validate(m).replace(/validate\.schema/g,d.code)+" ",h&&(o+=" if ("+v+") { ")}else a=!0===d.$async,s=d.code}if(s){var y=y||[];y.push(o),o="",o+=e.opts.passContext?" "+s+".call(this, ":" "+s+"( ",o+=" "+u+", (dataPath || '')",'""'!=e.errorPath&&(o+=" + "+e.errorPath);var g=o+=" , "+(i?"data"+(i-1||""):"parentData")+" , "+(i?e.dataPathArr[i]:"parentDataProperty")+", rootData) ";if(o=y.pop(),a){if(!e.async)throw new Error("async schema referenced by sync schema");h&&(o+=" var "+c+"; "),o+=" try { "+e.yieldAwait+" "+g+"; ",h&&(o+=" "+c+" = true; "),o+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",h&&(o+=" "+c+" = false; "),o+=" } ",h&&(o+=" if ("+c+") { ")}else o+=" if (!"+g+") { if (vErrors === null) vErrors = "+s+".errors; else vErrors = vErrors.concat("+s+".errors); errors = vErrors.length; } ",h&&(o+=" else { ")}return o}},{}],33:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(o||""),c="valid"+s,d=e.opts.$data&&i&&i.$data;d&&(a+=" var schema"+s+" = "+e.util.getData(i.$data,o,e.dataPathArr)+"; ");var f="schema"+s;if(!d)if(i.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var p=[],m=i;if(m)for(var v,y=-1,g=m.length-1;y<g;){v=m[y+=1];var P=e.schema.properties[v];P&&e.util.schemaHasRules(P,e.RULES.all)||(p[p.length]=v)}}else p=i;if(d||p.length){var E=e.errorPath,w=d||p.length>=e.opts.loopRequired,b=e.opts.ownProperties;if(h)if(a+=" var missing"+s+"; ",w){d||(a+=" var "+f+" = validate.schema"+n+"; ");R="' + "+($="schema"+s+"["+(j="i"+s)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(E,$,e.opts.jsonPointers)),a+=" var "+c+" = true; ",d&&(a+=" if (schema"+s+" === undefined) "+c+" = true; else if (!Array.isArray(schema"+s+")) "+c+" = false; else {"),a+=" for (var "+j+" = 0; "+j+" < "+f+".length; "+j+"++) { "+c+" = "+u+"["+f+"["+j+"]] !== undefined ",b&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", "+f+"["+j+"]) "),a+="; if (!"+c+") break; } ",d&&(a+=" } "),a+=" if (!"+c+") { ";(x=x||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+R+"' } ",!1!==e.opts.messages&&(a+=" , message: '",a+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+R+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";F=a;a=x.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+F+"]); ":" validate.errors = ["+F+"]; return false; ":" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var S=p;if(S)for(var j=-1,_=S.length-1;j<_;){D=S[j+=1],j&&(a+=" || ");a+=" ( ( "+(q=u+(k=e.util.getProperty(D)))+" === undefined ",b&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(D)+"') "),a+=") && (missing"+s+" = "+e.util.toQuotedString(e.opts.jsonPointers?D:k)+") ) "}a+=") { ";R="' + "+($="missing"+s)+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(E,$,!0):E+" + "+$);var x=x||[];x.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+R+"' } ",!1!==e.opts.messages&&(a+=" , message: '",a+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+R+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var F=a;a=x.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+F+"]); ":" validate.errors = ["+F+"]; return false; ":" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else if(w){d||(a+=" var "+f+" = validate.schema"+n+"; ");var $="schema"+s+"["+(j="i"+s)+"]",R="' + "+$+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(E,$,e.opts.jsonPointers)),d&&(a+=" if ("+f+" && !Array.isArray("+f+")) { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+R+"' } ",!1!==e.opts.messages&&(a+=" , message: '",a+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+R+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+f+" !== undefined) { "),a+=" for (var "+j+" = 0; "+j+" < "+f+".length; "+j+"++) { if ("+u+"["+f+"["+j+"]] === undefined ",b&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", "+f+"["+j+"]) "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+R+"' } ",!1!==e.opts.messages&&(a+=" , message: '",a+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+R+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",d&&(a+=" } ")}else{var O=p;if(O)for(var D,I=-1,A=O.length-1;I<A;){D=O[I+=1];var k=e.util.getProperty(D),R=e.util.escapeQuotes(D),q=u+k;e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(E,D,e.opts.jsonPointers)),a+=" if ( "+q+" === undefined ",b&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(D)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+R+"' } ",!1!==e.opts.messages&&(a+=" , message: '",a+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+R+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=E}else h&&(a+=" if (true) {");return a}},{}],34:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),h=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(i||""),d="valid"+o,f=e.opts.$data&&n&&n.$data;if(f?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n,(n||f)&&!1!==e.opts.uniqueItems){f&&(s+=" var "+d+"; if ("+a+" === false || "+a+" === undefined) "+d+" = true; else if (typeof "+a+" != 'boolean') "+d+" = false; else { "),s+=" var "+d+" = true; if ("+c+".length > 1) { var i = "+c+".length, j; outer: for (;i--;) { for (j = i; j--;) { if (equal("+c+"[i], "+c+"[j])) { "+d+" = false; break outer; } } } } ",f&&(s+=" } "),s+=" if (!"+d+") { ";var p=p||[];p.push(s),s="",!1!==e.createErrors?(s+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(s+=" , schema: ",s+=f?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";var m=s;s=p.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } ",u&&(s+=" else { ")}else u&&(s+=" if (true) { ");return s}},{}],35:[function(e,r,t){"use strict";r.exports=function(e,r,t){function a(e){for(var r=e.rules,t=0;t<r.length;t++)if(s(r[t]))return!0}function s(r){return void 0!==e.schema[r.keyword]||r.implements&&function(r){for(var t=r.implements,a=0;a<t.length;a++)if(void 0!==e.schema[t[a]])return!0}(r)}var o="",i=!0===e.schema.$async,n=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),l=e.self._getId(e.schema);if(e.isTop){if(i){e.async=!0;var h="es7"==e.opts.async;e.yieldAwait=h?"await":"yield"}o+=" var validate = ",i?h?o+=" (async function ":("*"!=e.opts.async&&(o+="co.wrap"),o+="(function* "):o+=" (function ",o+=" (data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",l&&(e.opts.sourceCode||e.opts.processCode)&&(o+=" /*# sourceURL="+l+" */ ")}if("boolean"==typeof e.schema||!n&&!e.schema.$ref){var u=e.level,c=e.dataLevel,d=e.schema["false schema"],f=e.schemaPath+e.util.getProperty("false schema"),p=e.errSchemaPath+"/false schema",m=!e.opts.allErrors,v="data"+(c||""),y="valid"+u;if(!1===e.schema){e.isTop?m=!0:o+=" var "+y+" = false; ";(Z=Z||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(P||"false schema")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: {} ",!1!==e.opts.messages&&(o+=" , message: 'boolean schema is false' "),e.opts.verbose&&(o+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),o+=" } "):o+=" {} ";Y=o;o=Z.pop(),o+=!e.compositeRule&&m?e.async?" throw new ValidationError(["+Y+"]); ":" validate.errors = ["+Y+"]; return false; ":" var err = "+Y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else o+=e.isTop?i?" return data; ":" validate.errors = null; return true; ":" var "+y+" = true; ";return e.isTop&&(o+=" }); return validate; "),o}if(e.isTop){var g=e.isTop,u=e.level=0,c=e.dataLevel=0,v="data";e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[void 0],o+=" var vErrors = null; ",o+=" var errors = 0; ",o+=" if (rootData === undefined) rootData = data; "}else{var u=e.level,v="data"+((c=e.dataLevel)||"");if(l&&(e.baseId=e.resolve.url(e.baseId,l)),i&&!e.async)throw new Error("async schema in sync schema");o+=" var errs_"+u+" = errors;"}var P,y="valid"+u,m=!e.opts.allErrors,E="",w="",b=e.schema.type,S=Array.isArray(b);if(S&&1==b.length&&(b=b[0],S=!1),e.schema.$ref&&n){if("fail"==e.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');!0!==e.opts.extendRefs&&(n=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(b){if(e.opts.coerceTypes)var j=e.util.coerceToTypes(e.opts.coerceTypes,b);k=e.RULES.types[b];if(j||S||!0===k||k&&!a(k)){var f=e.schemaPath+".type",p=e.errSchemaPath+"/type",f=e.schemaPath+".type",p=e.errSchemaPath+"/type";if(o+=" if ("+e.util[S?"checkDataTypes":"checkDataType"](b,v,!0)+") { ",j){var _="dataType"+u,x="coerced"+u;o+=" var "+_+" = typeof "+v+"; ","array"==e.opts.coerceTypes&&(o+=" if ("+_+" == 'object' && Array.isArray("+v+")) "+_+" = 'array'; "),o+=" var "+x+" = undefined; ";var F="",$=j;if($)for(var R,O=-1,D=$.length-1;O<D;)R=$[O+=1],O&&(o+=" if ("+x+" === undefined) { ",F+="}"),"array"==e.opts.coerceTypes&&"array"!=R&&(o+=" if ("+_+" == 'array' && "+v+".length == 1) { "+x+" = "+v+" = "+v+"[0]; "+_+" = typeof "+v+"; } "),"string"==R?o+=" if ("+_+" == 'number' || "+_+" == 'boolean') "+x+" = '' + "+v+"; else if ("+v+" === null) "+x+" = ''; ":"number"==R||"integer"==R?(o+=" if ("+_+" == 'boolean' || "+v+" === null || ("+_+" == 'string' && "+v+" && "+v+" == +"+v+" ","integer"==R&&(o+=" && !("+v+" % 1)"),o+=")) "+x+" = +"+v+"; "):"boolean"==R?o+=" if ("+v+" === 'false' || "+v+" === 0 || "+v+" === null) "+x+" = false; else if ("+v+" === 'true' || "+v+" === 1) "+x+" = true; ":"null"==R?o+=" if ("+v+" === '' || "+v+" === 0 || "+v+" === false) "+x+" = null; ":"array"==e.opts.coerceTypes&&"array"==R&&(o+=" if ("+_+" == 'string' || "+_+" == 'number' || "+_+" == 'boolean' || "+v+" == null) "+x+" = ["+v+"]; ");o+=" "+F+" if ("+x+" === undefined) { ";(Z=Z||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(P||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",o+=S?""+b.join(","):""+b,o+="' } ",!1!==e.opts.messages&&(o+=" , message: 'should be ",o+=S?""+b.join(","):""+b,o+="' "),e.opts.verbose&&(o+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),o+=" } "):o+=" {} ";Y=o;o=Z.pop(),o+=!e.compositeRule&&m?e.async?" throw new ValidationError(["+Y+"]); ":" validate.errors = ["+Y+"]; return false; ":" var err = "+Y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } else { ";var I=c?"data"+(c-1||""):"parentData";o+=" "+v+" = "+x+"; ",c||(o+="if ("+I+" !== undefined)"),o+=" "+I+"["+(c?e.dataPathArr[c]:"parentDataProperty")+"] = "+x+"; } "}else{(Z=Z||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(P||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",o+=S?""+b.join(","):""+b,o+="' } ",!1!==e.opts.messages&&(o+=" , message: 'should be ",o+=S?""+b.join(","):""+b,o+="' "),e.opts.verbose&&(o+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),o+=" } "):o+=" {} ";Y=o;o=Z.pop(),o+=!e.compositeRule&&m?e.async?" throw new ValidationError(["+Y+"]); ":" validate.errors = ["+Y+"]; return false; ":" var err = "+Y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}o+=" } "}}if(e.schema.$ref&&!n)o+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",m&&(o+=" } if (errors === ",o+=g?"0":"errs_"+u,o+=") { ",w+="}");else{e.opts.v5&&e.schema.patternGroups&&e.logger.warn('keyword "patternGroups" is deprecated and disabled. Use option patternGroups: true to enable.');var A=e.RULES;if(A)for(var k,q=-1,L=A.length-1;q<L;)if(k=A[q+=1],a(k)){if(k.type&&(o+=" if ("+e.util.checkDataType(k.type,v)+") { "),e.opts.useDefaults&&!e.compositeRule)if("object"==k.type&&e.schema.properties){var d=e.schema.properties,z=Object.keys(d);if(z)for(var C,Q=-1,U=z.length-1;Q<U;){if(void 0!==(N=d[C=z[Q+=1]]).default){o+=" if ("+(M=v+e.util.getProperty(C))+" === undefined) "+M+" = ",o+="shared"==e.opts.useDefaults?" "+e.useDefault(N.default)+" ":" "+JSON.stringify(N.default)+" ",o+="; "}}}else if("array"==k.type&&Array.isArray(e.schema.items)){var V=e.schema.items;if(V)for(var N,O=-1,T=V.length-1;O<T;)if(void 0!==(N=V[O+=1]).default){var M=v+"["+O+"]";o+=" if ("+M+" === undefined) "+M+" = ",o+="shared"==e.opts.useDefaults?" "+e.useDefault(N.default)+" ":" "+JSON.stringify(N.default)+" ",o+="; "}}var H=k.rules;if(H)for(var K,B=-1,G=H.length-1;B<G;)if(K=H[B+=1],s(K)){var J=K.code(e,K.keyword,k.type);J&&(o+=" "+J+" ",m&&(E+="}"))}if(m&&(o+=" "+E+" ",E=""),k.type&&(o+=" } ",b&&b===k.type&&!j)){o+=" else { ";var f=e.schemaPath+".type",p=e.errSchemaPath+"/type",Z=Z||[];Z.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(P||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",o+=S?""+b.join(","):""+b,o+="' } ",!1!==e.opts.messages&&(o+=" , message: 'should be ",o+=S?""+b.join(","):""+b,o+="' "),e.opts.verbose&&(o+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),o+=" } "):o+=" {} ";var Y=o;o=Z.pop(),o+=!e.compositeRule&&m?e.async?" throw new ValidationError(["+Y+"]); ":" validate.errors = ["+Y+"]; return false; ":" var err = "+Y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } "}m&&(o+=" if (errors === ",o+=g?"0":"errs_"+u,o+=") { ",w+="}")}}return m&&(o+=" "+w+" "),g?(i?(o+=" if (errors === 0) return data; ",o+=" else throw new ValidationError(vErrors); "):(o+=" validate.errors = vErrors; ",o+=" return errors === 0; "),o+=" }); return validate;"):o+=" var "+y+" = errors === errs_"+u+";",o=e.util.cleanUpCode(o),g&&(o=e.util.finalCleanUpCode(o,i)),o}},{}],36:[function(e,r,t){"use strict";var a=/^[a-z_$][a-z0-9_$-]*$/i,s=e("./dotjs/custom");r.exports={add:function(e,r){function t(e,r,t){for(var a,o=0;o<i.length;o++){var n=i[o];if(n.type==r){a=n;break}}a||i.push(a={type:r,rules:[]});var l={keyword:e,definition:t,custom:!0,code:s,implements:t.implements};a.rules.push(l),i.custom[e]=l}function o(e){if(!i.types[e])throw new Error("Unknown type "+e)}var i=this.RULES;if(i.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!a.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(r){if(r.macro&&void 0!==r.valid)throw new Error('"valid" option cannot be used with macro keywords');var n=r.type;if(Array.isArray(n)){var l,h=n.length;for(l=0;l<h;l++)o(n[l]);for(l=0;l<h;l++)t(e,n[l],r)}else n&&o(n),t(e,n,r);var u=!0===r.$data&&this._opts.$data;if(u&&!r.validate)throw new Error('$data support: "validate" function is not defined');var c=r.metaSchema;c&&(u&&(c={anyOf:[c,{$ref:"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#"}]}),r.validateSchema=this.compile(c,!0))}return i.keywords[e]=i.all[e]=!0,this},get:function(e){var r=this.RULES.custom[e];return r?r.definition:this.RULES.keywords[e]||!1},remove:function(e){var r=this.RULES;delete r.keywords[e],delete r.all[e],delete r.custom[e];for(var t=0;t<r.length;t++)for(var a=r[t].rules,s=0;s<a.length;s++)if(a[s].keyword==e){a.splice(s,1);break}return this}}},{"./dotjs/custom":21}],37:[function(e,r,t){"use strict";r.exports=function(e){var r=e._opts.defaultMeta,t="string"==typeof r?{$ref:r}:e.getSchema("http://json-schema.org/draft-06/schema")?{$ref:"http://json-schema.org/draft-06/schema"}:{};e.addKeyword("patternGroups",{metaSchema:{type:"object",additionalProperties:{type:"object",required:["schema"],properties:{maximum:{type:"integer",minimum:0},minimum:{type:"integer",minimum:0},schema:t},additionalProperties:!1}}}),e.RULES.all.properties.implements.push("patternGroups")}},{}],38:[function(e,r,t){r.exports={$schema:"http://json-schema.org/draft-06/schema#",$id:"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#",description:"Meta-schema for $data reference (JSON-schema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}},{}],39:[function(e,r,t){r.exports={$schema:"http://json-schema.org/draft-06/schema#",$id:"http://json-schema.org/draft-06/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},title:{type:"string"},description:{type:"string"},default:{},examples:{type:"array",items:{}},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:{},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:{}}},{}],40:[function(e,r,t){function a(e){var r=this,t=n.call(arguments,1);return new Promise(function(a,i){function n(r){var t;try{t=e.next(r)}catch(e){return i(e)}h(t)}function l(r){var t;try{t=e.throw(r)}catch(e){return i(e)}h(t)}function h(e){if(e.done)return a(e.value);var t=s.call(r,e.value);return t&&o(t)?t.then(n,l):l(new TypeError('You may only yield a function, promise, generator, array, or object, but the following object was passed: "'+String(e.value)+'"'))}if("function"==typeof e&&(e=e.apply(r,t)),!e||"function"!=typeof e.next)return a(e);n()})}function s(e){return e?o(e)?e:function(e){var r=e.constructor;return!!r&&("GeneratorFunction"===r.name||"GeneratorFunction"===r.displayName||i(r.prototype))}(e)||i(e)?a.call(this,e):"function"==typeof e?function(e){var r=this;return new Promise(function(t,a){e.call(r,function(e,r){if(e)return a(e);arguments.length>2&&(r=n.call(arguments,1)),t(r)})})}.call(this,e):Array.isArray(e)?function(e){return Promise.all(e.map(s,this))}.call(this,e):function(e){return Object==e.constructor}(e)?function(e){for(var r=new e.constructor,t=Object.keys(e),a=[],i=0;i<t.length;i++){var n=t[i],l=s.call(this,e[n]);l&&o(l)?function(e,t){r[t]=void 0,a.push(e.then(function(e){r[t]=e}))}(l,n):r[n]=e[n]}return Promise.all(a).then(function(){return r})}.call(this,e):e:e}function o(e){return"function"==typeof e.then}function i(e){return"function"==typeof e.next&&"function"==typeof e.throw}var n=Array.prototype.slice;r.exports=a.default=a.co=a,a.wrap=function(e){function r(){return a.call(this,e.apply(this,arguments))}return r.__generatorFunction__=e,r}},{}],41:[function(e,r,t){"use strict";r.exports=function e(r,t){if(r===t)return!0;var a,s=Array.isArray(r),o=Array.isArray(t);if(s&&o){if(r.length!=t.length)return!1;for(a=0;a<r.length;a++)if(!e(r[a],t[a]))return!1;return!0}if(s!=o)return!1;if(r&&t&&"object"==typeof r&&"object"==typeof t){var i=Object.keys(r);if(i.length!==Object.keys(t).length)return!1;var n=r instanceof Date,l=t instanceof Date;if(n&&l)return r.getTime()==t.getTime();if(n!=l)return!1;var h=r instanceof RegExp,u=t instanceof RegExp;if(h&&u)return r.toString()==t.toString();if(h!=u)return!1;for(a=0;a<i.length;a++)if(!Object.prototype.hasOwnProperty.call(t,i[a]))return!1;for(a=0;a<i.length;a++)if(!e(r[i[a]],t[i[a]]))return!1;return!0}return!1}},{}],42:[function(e,r,t){"use strict";r.exports=function(e,r){r||(r={}),"function"==typeof r&&(r={cmp:r});var t="boolean"==typeof r.cycles&&r.cycles,a=r.cmp&&function(e){return function(r){return function(t,a){return e({key:t,value:r[t]},{key:a,value:r[a]})}}}(r.cmp),s=[];return function e(r){if(r&&r.toJSON&&"function"==typeof r.toJSON&&(r=r.toJSON()),void 0!==r){if("number"==typeof r)return isFinite(r)?""+r:"null";if("object"!=typeof r)return JSON.stringify(r);var o,i;if(Array.isArray(r)){for(i="[",o=0;o<r.length;o++)o&&(i+=","),i+=e(r[o])||"null";return i+"]"}if(null===r)return"null";if(-1!==s.indexOf(r)){if(t)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var n=s.push(r)-1,l=Object.keys(r).sort(a&&a(r));for(i="",o=0;o<l.length;o++){var h=l[o],u=e(r[h]);u&&(i&&(i+=","),i+=JSON.stringify(h)+":"+u)}return s.splice(n,1),"{"+i+"}"}}(e)}},{}],43:[function(e,r,t){"use strict";function a(e,r,t,o,i,n,l,h,u){if(t&&"object"==typeof t&&!Array.isArray(t)){r(t,o,i,n,l,h,u);for(var c in t){var d=t[c];if(Array.isArray(d)){if(c in s.arrayKeywords)for(var f=0;f<d.length;f++)a(e,r,d[f],o+"/"+c+"/"+f,i,o,c,t,f)}else if(c in s.propsKeywords){if(d&&"object"==typeof d)for(var p in d)a(e,r,d[p],o+"/"+c+"/"+function(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}(p),i,o,c,t,p)}else(c in s.keywords||e.allKeys&&!(c in s.skipKeywords))&&a(e,r,d,o+"/"+c,i,o,c,t)}}}var s=r.exports=function(e,r,t){"function"==typeof r&&(t=r,r={}),a(r,t,e,"",e)};s.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},s.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},s.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},s.skipKeywords={enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}},{}],44:[function(e,r,t){(function(e){!function(a){function s(e){throw new RangeError(D[e])}function o(e,r){for(var t=e.length,a=[];t--;)a[t]=r(e[t]);return a}function i(e,r){var t=e.split("@"),a="";t.length>1&&(a=t[0]+"@",e=t[1]);return a+o((e=e.replace(O,".")).split("."),r).join(".")}function n(e){for(var r,t,a=[],s=0,o=e.length;s<o;)(r=e.charCodeAt(s++))>=55296&&r<=56319&&s<o?56320==(64512&(t=e.charCodeAt(s++)))?a.push(((1023&r)<<10)+(1023&t)+65536):(a.push(r),s--):a.push(r);return a}function l(e){return o(e,function(e){var r="";return e>65535&&(r+=k((e-=65536)>>>10&1023|55296),e=56320|1023&e),r+=k(e)}).join("")}function h(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:E}function u(e,r){return e+22+75*(e<26)-((0!=r)<<5)}function c(e,r,t){var a=0;for(e=t?A(e/j):e>>1,e+=A(e/r);e>I*b>>1;a+=E)e=A(e/I);return A(a+(I+1)*e/(e+S))}function d(e){var r,t,a,o,i,n,u,d,f,p,m=[],v=e.length,y=0,g=x,S=_;for((t=e.lastIndexOf(F))<0&&(t=0),a=0;a<t;++a)e.charCodeAt(a)>=128&&s("not-basic"),m.push(e.charCodeAt(a));for(o=t>0?t+1:0;o<v;){for(i=y,n=1,u=E;o>=v&&s("invalid-input"),((d=h(e.charCodeAt(o++)))>=E||d>A((P-y)/n))&&s("overflow"),y+=d*n,f=u<=S?w:u>=S+b?b:u-S,!(d<f);u+=E)n>A(P/(p=E-f))&&s("overflow"),n*=p;S=c(y-i,r=m.length+1,0==i),A(y/r)>P-g&&s("overflow"),g+=A(y/r),y%=r,m.splice(y++,0,g)}return l(m)}function f(e){var r,t,a,o,i,l,h,d,f,p,m,v,y,g,S,j=[];for(v=(e=n(e)).length,r=x,t=0,i=_,l=0;l<v;++l)(m=e[l])<128&&j.push(k(m));for(a=o=j.length,o&&j.push(F);a<v;){for(h=P,l=0;l<v;++l)(m=e[l])>=r&&m<h&&(h=m);for(h-r>A((P-t)/(y=a+1))&&s("overflow"),t+=(h-r)*y,r=h,l=0;l<v;++l)if((m=e[l])<r&&++t>P&&s("overflow"),m==r){for(d=t,f=E;p=f<=i?w:f>=i+b?b:f-i,!(d<p);f+=E)j.push(k(u(p+(S=d-p)%(g=E-p),0))),d=A(S/g);j.push(k(u(d,0))),i=c(t,y,a==o),t=0,++a}++t,++r}return j.join("")}var p="object"==typeof t&&t&&!t.nodeType&&t,m="object"==typeof r&&r&&!r.nodeType&&r,v="object"==typeof e&&e;v.global!==v&&v.window!==v&&v.self!==v||(a=v);var y,g,P=2147483647,E=36,w=1,b=26,S=38,j=700,_=72,x=128,F="-",$=/^xn--/,R=/[^\x20-\x7E]/,O=/[\x2E\u3002\uFF0E\uFF61]/g,D={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},I=E-w,A=Math.floor,k=String.fromCharCode;if(y={version:"1.4.1",ucs2:{decode:n,encode:l},decode:d,encode:f,toASCII:function(e){return i(e,function(e){return R.test(e)?"xn--"+f(e):e})},toUnicode:function(e){return i(e,function(e){return $.test(e)?d(e.slice(4).toLowerCase()):e})}},p&&m)if(r.exports==p)m.exports=y;else for(g in y)y.hasOwnProperty(g)&&(p[g]=y[g]);else a.punycode=y}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],45:[function(e,r,t){"use strict";function a(e,r){return Object.prototype.hasOwnProperty.call(e,r)}r.exports=function(e,r,t,o){r=r||"&",t=t||"=";var i={};if("string"!=typeof e||0===e.length)return i;var n=/\+/g;e=e.split(r);var l=1e3;o&&"number"==typeof o.maxKeys&&(l=o.maxKeys);var h=e.length;l>0&&h>l&&(h=l);for(var u=0;u<h;++u){var c,d,f,p,m=e[u].replace(n,"%20"),v=m.indexOf(t);v>=0?(c=m.substr(0,v),d=m.substr(v+1)):(c=m,d=""),f=decodeURIComponent(c),p=decodeURIComponent(d),a(i,f)?s(i[f])?i[f].push(p):i[f]=[i[f],p]:i[f]=p}return i};var s=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],46:[function(e,r,t){"use strict";function a(e,r){if(e.map)return e.map(r);for(var t=[],a=0;a<e.length;a++)t.push(r(e[a],a));return t}var s=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};r.exports=function(e,r,t,n){return r=r||"&",t=t||"=",null===e&&(e=void 0),"object"==typeof e?a(i(e),function(i){var n=encodeURIComponent(s(i))+t;return o(e[i])?a(e[i],function(e){return n+encodeURIComponent(s(e))}).join(r):n+encodeURIComponent(s(e[i]))}).join(r):n?encodeURIComponent(s(n))+t+encodeURIComponent(s(e)):""};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},i=Object.keys||function(e){var r=[];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.push(t);return r}},{}],47:[function(e,r,t){"use strict";t.decode=t.parse=e("./decode"),t.encode=t.stringify=e("./encode")},{"./decode":45,"./encode":46}],48:[function(e,r,t){"use strict";function a(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function s(e,r,t){if(e&&i.isObject(e)&&e instanceof a)return e;var s=new a;return s.parse(e,r,t),s}var o=e("punycode"),i=e("./util");t.parse=s,t.resolve=function(e,r){return s(e,!1,!0).resolve(r)},t.resolveObject=function(e,r){return e?s(e,!1,!0).resolveObject(r):r},t.format=function(e){return i.isString(e)&&(e=s(e)),e instanceof a?e.format():a.prototype.format.call(e)},t.Url=a;var n=/^([a-z0-9.+-]+:)/i,l=/:[0-9]*$/,h=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(u),d=["%","/","?",";","#"].concat(c),f=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,m=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},P=e("querystring");a.prototype.parse=function(e,r,t){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var a=e.indexOf("?"),s=-1!==a&&a<e.indexOf("#")?"?":"#",l=e.split(s);l[0]=l[0].replace(/\\/g,"/");var u=e=l.join(s);if(u=u.trim(),!t&&1===e.split("#").length){var E=h.exec(u);if(E)return this.path=u,this.href=u,this.pathname=E[1],E[2]?(this.search=E[2],this.query=r?P.parse(this.search.substr(1)):this.search.substr(1)):r&&(this.search="",this.query={}),this}var w=n.exec(u);if(w){var b=(w=w[0]).toLowerCase();this.protocol=b,u=u.substr(w.length)}if(t||w||u.match(/^\/\/[^@\/]+@[^@\/]+/)){var S="//"===u.substr(0,2);!S||w&&y[w]||(u=u.substr(2),this.slashes=!0)}if(!y[w]&&(S||w&&!g[w])){for(var j=-1,_=0;_<f.length;_++){-1!==($=u.indexOf(f[_]))&&(-1===j||$<j)&&(j=$)}var x,F;-1!==(F=-1===j?u.lastIndexOf("@"):u.lastIndexOf("@",j))&&(x=u.slice(0,F),u=u.slice(F+1),this.auth=decodeURIComponent(x)),j=-1;for(_=0;_<d.length;_++){var $=u.indexOf(d[_]);-1!==$&&(-1===j||$<j)&&(j=$)}-1===j&&(j=u.length),this.host=u.slice(0,j),u=u.slice(j),this.parseHost(),this.hostname=this.hostname||"";var R="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!R)for(var O=this.hostname.split(/\./),_=0,D=O.length;_<D;_++){var I=O[_];if(I&&!I.match(p)){for(var A="",k=0,q=I.length;k<q;k++)I.charCodeAt(k)>127?A+="x":A+=I[k];if(!A.match(p)){var L=O.slice(0,_),z=O.slice(_+1),C=I.match(m);C&&(L.push(C[1]),z.unshift(C[2])),z.length&&(u="/"+z.join(".")+u),this.hostname=L.join(".");break}}}this.hostname=this.hostname.length>255?"":this.hostname.toLowerCase(),R||(this.hostname=o.toASCII(this.hostname));T=this.port?":"+this.port:"";this.host=(this.hostname||"")+T,this.href+=this.host,R&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==u[0]&&(u="/"+u))}if(!v[b])for(var _=0,D=c.length;_<D;_++){var Q=c[_];if(-1!==u.indexOf(Q)){var U=encodeURIComponent(Q);U===Q&&(U=escape(Q)),u=u.split(Q).join(U)}}var V=u.indexOf("#");-1!==V&&(this.hash=u.substr(V),u=u.slice(0,V));var N=u.indexOf("?");if(-1!==N?(this.search=u.substr(N),this.query=u.substr(N+1),r&&(this.query=P.parse(this.query)),u=u.slice(0,N)):r&&(this.search="",this.query={}),u&&(this.pathname=u),g[b]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var T;this.path=(T=this.pathname||"")+(this.search||"")}return this.href=this.format(),this},a.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var r=this.protocol||"",t=this.pathname||"",a=this.hash||"",s=!1,o="";this.host?s=e+this.host:this.hostname&&(s=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(s+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(o=P.stringify(this.query));var n=this.search||o&&"?"+o||"";return r&&":"!==r.substr(-1)&&(r+=":"),this.slashes||(!r||g[r])&&!1!==s?(s="//"+(s||""),t&&"/"!==t.charAt(0)&&(t="/"+t)):s||(s=""),a&&"#"!==a.charAt(0)&&(a="#"+a),n&&"?"!==n.charAt(0)&&(n="?"+n),t=t.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),n=n.replace("#","%23"),r+s+t+n+a},a.prototype.resolve=function(e){return this.resolveObject(s(e,!1,!0)).format()},a.prototype.resolveObject=function(e){if(i.isString(e)){var r=new a;r.parse(e,!1,!0),e=r}for(var t=new a,s=Object.keys(this),o=0;o<s.length;o++){var n=s[o];t[n]=this[n]}if(t.hash=e.hash,""===e.href)return t.href=t.format(),t;if(e.slashes&&!e.protocol){for(var l=Object.keys(e),h=0;h<l.length;h++){var u=l[h];"protocol"!==u&&(t[u]=e[u])}return g[t.protocol]&&t.hostname&&!t.pathname&&(t.path=t.pathname="/"),t.href=t.format(),t}if(e.protocol&&e.protocol!==t.protocol){if(!g[e.protocol]){for(var c=Object.keys(e),d=0;d<c.length;d++){var f=c[d];t[f]=e[f]}return t.href=t.format(),t}if(t.protocol=e.protocol,e.host||y[e.protocol])t.pathname=e.pathname;else{for(w=(e.pathname||"").split("/");w.length&&!(e.host=w.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==w[0]&&w.unshift(""),w.length<2&&w.unshift(""),t.pathname=w.join("/")}if(t.search=e.search,t.query=e.query,t.host=e.host||"",t.auth=e.auth,t.hostname=e.hostname||e.host,t.port=e.port,t.pathname||t.search){t.path=(t.pathname||"")+(t.search||"")}return t.slashes=t.slashes||e.slashes,t.href=t.format(),t}var p=t.pathname&&"/"===t.pathname.charAt(0),m=e.host||e.pathname&&"/"===e.pathname.charAt(0),v=m||p||t.host&&e.pathname,P=v,E=t.pathname&&t.pathname.split("/")||[],w=e.pathname&&e.pathname.split("/")||[],b=t.protocol&&!g[t.protocol];if(b&&(t.hostname="",t.port=null,t.host&&(""===E[0]?E[0]=t.host:E.unshift(t.host)),t.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===w[0]?w[0]=e.host:w.unshift(e.host)),e.host=null),v=v&&(""===w[0]||""===E[0])),m)t.host=e.host||""===e.host?e.host:t.host,t.hostname=e.hostname||""===e.hostname?e.hostname:t.hostname,t.search=e.search,t.query=e.query,E=w;else if(w.length)E||(E=[]),E.pop(),E=E.concat(w),t.search=e.search,t.query=e.query;else if(!i.isNullOrUndefined(e.search)){if(b){t.hostname=t.host=E.shift();($=!!(t.host&&t.host.indexOf("@")>0)&&t.host.split("@"))&&(t.auth=$.shift(),t.host=t.hostname=$.shift())}return t.search=e.search,t.query=e.query,i.isNull(t.pathname)&&i.isNull(t.search)||(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.href=t.format(),t}if(!E.length)return t.pathname=null,t.path=t.search?"/"+t.search:null,t.href=t.format(),t;for(var S=E.slice(-1)[0],j=(t.host||e.host||E.length>1)&&("."===S||".."===S)||""===S,_=0,x=E.length;x>=0;x--)"."===(S=E[x])?E.splice(x,1):".."===S?(E.splice(x,1),_++):_&&(E.splice(x,1),_--);if(!v&&!P)for(;_--;_)E.unshift("..");!v||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),j&&"/"!==E.join("/").substr(-1)&&E.push("");var F=""===E[0]||E[0]&&"/"===E[0].charAt(0);if(b){t.hostname=t.host=F?"":E.length?E.shift():"";var $=!!(t.host&&t.host.indexOf("@")>0)&&t.host.split("@");$&&(t.auth=$.shift(),t.host=t.hostname=$.shift())}return(v=v||t.host&&E.length)&&!F&&E.unshift(""),E.length?t.pathname=E.join("/"):(t.pathname=null,t.path=null),i.isNull(t.pathname)&&i.isNull(t.search)||(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.auth=e.auth||t.auth,t.slashes=t.slashes||e.slashes,t.href=t.format(),t},a.prototype.parseHost=function(){var e=this.host,r=l.exec(e);r&&(":"!==(r=r[0])&&(this.port=r.substr(1)),e=e.substr(0,e.length-r.length)),e&&(this.hostname=e)}},{"./util":49,punycode:44,querystring:47}],49:[function(e,r,t){"use strict";r.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},{}],ajv:[function(e,r,t){"use strict";function a(r){if(!(this instanceof a))return new a(r);r=this._opts=E.copy(r)||{},function(e){var r=e._opts.logger;if(!1===r)e.logger={log:u,warn:u,error:u};else{if(void 0===r&&(r=console),!("object"==typeof r&&r.log&&r.warn&&r.error))throw new Error("logger must implement log, warn and error methods");e.logger=r}}(this),this._schemas={},this._refs={},this._fragments={},this._formats=v(r.format);var t=this._schemaUriFormat=this._formats["uri-reference"];this._schemaUriFormatFunc=function(e){return t.test(e)},this._cache=r.cache||new f,this._loadingSchemas={},this._compilations=[],this.RULES=y(),this._getId=function(e){switch(e.schemaId){case"$id":return n;case"id":return i;default:return l}}(r),r.loopRequired=r.loopRequired||1/0,"property"==r.errorDataPath&&(r._errorDataPathProperty=!0),void 0===r.serialize&&(r.serialize=m),this._metaOpts=function(e){for(var r=E.copy(e._opts),t=0;t<_.length;t++)delete r[_[t]];return r}(this),r.formats&&function(e){for(var r in e._opts.formats){e.addFormat(r,e._opts.formats[r])}}(this),function(r){var t;r._opts.$data&&(t=e("./refs/$data.json"),r.addMetaSchema(t,t.$id,!0));if(!1===r._opts.meta)return;var a=e("./refs/json-schema-draft-06.json");r._opts.$data&&(a=g(a,x));r.addMetaSchema(a,j,!0),r._refs["http://json-schema.org/schema"]=j}(this),"object"==typeof r.meta&&this.addMetaSchema(r.meta),function(e){var r=e._opts.schemas;if(!r)return;if(Array.isArray(r))e.addSchema(r);else for(var t in r)e.addSchema(r[t],t)}(this),r.patternGroups&&P(this)}function s(e,r){return r=d.normalizeId(r),e._schemas[r]||e._refs[r]||e._fragments[r]}function o(e,r,t){for(var a in r){var s=r[a];s.meta||t&&!t.test(a)||(e._cache.del(s.cacheKey),delete r[a])}}function i(e){return e.$id&&this.logger.warn("schema $id ignored",e.$id),e.id}function n(e){return e.id&&this.logger.warn("schema id ignored",e.id),e.$id}function l(e){if(e.$id&&e.id&&e.$id!=e.id)throw new Error("schema $id is different from id");return e.$id||e.id}function h(e,r){if(e._schemas[r]||e._refs[r])throw new Error('schema with key or id "'+r+'" already exists')}function u(){}var c=e("./compile"),d=e("./compile/resolve"),f=e("./cache"),p=e("./compile/schema_obj"),m=e("fast-json-stable-stringify"),v=e("./compile/formats"),y=e("./compile/rules"),g=e("./$data"),P=e("./patternGroups"),E=e("./compile/util"),w=e("co");r.exports=a,a.prototype.validate=function(e,r){var t;if("string"==typeof e){if(!(t=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var a=this._addSchema(e);t=a.validate||this._compile(a)}var s=t(r);return!0===t.$async?"*"==this._opts.async?w(s):s:(this.errors=t.errors,s)},a.prototype.compile=function(e,r){var t=this._addSchema(e,void 0,r);return t.validate||this._compile(t)},a.prototype.addSchema=function(e,r,t,a){if(!Array.isArray(e)){var s=this._getId(e);if(void 0!==s&&"string"!=typeof s)throw new Error("schema id must be string");return r=d.normalizeId(r||s),h(this,r),this._schemas[r]=this._addSchema(e,t,a,!0),this}for(var o=0;o<e.length;o++)this.addSchema(e[o],void 0,t,a)},a.prototype.addMetaSchema=function(e,r,t){return this.addSchema(e,r,t,!0),this},a.prototype.validateSchema=function(e,r){var t=e.$schema;if(void 0!==t&&"string"!=typeof t)throw new Error("$schema must be a string");if(!(t=t||this._opts.defaultMeta||function(e){var r=e._opts.meta;return e._opts.defaultMeta="object"==typeof r?e._getId(r)||r:e.getSchema(j)?j:void 0,e._opts.defaultMeta}(this)))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var a=this._formats.uri;this._formats.uri="function"==typeof a?this._schemaUriFormatFunc:this._schemaUriFormat;var s;try{s=this.validate(t,e)}finally{this._formats.uri=a}if(!s&&r){var o="schema is invalid: "+this.errorsText();if("log"!=this._opts.validateSchema)throw new Error(o);this.logger.error(o)}return s},a.prototype.getSchema=function(e){var r=s(this,e);switch(typeof r){case"object":return r.validate||this._compile(r);case"string":return this.getSchema(r);case"undefined":return function(e,r){var t=d.schema.call(e,{schema:{}},r);if(t){var a=t.schema,s=t.root,o=t.baseId,i=c.call(e,a,s,void 0,o);return e._fragments[r]=new p({ref:r,fragment:!0,schema:a,root:s,baseId:o,validate:i}),i}}(this,e)}},a.prototype.removeSchema=function(e){if(e instanceof RegExp)return o(this,this._schemas,e),o(this,this._refs,e),this;switch(typeof e){case"undefined":return o(this,this._schemas),o(this,this._refs),this._cache.clear(),this;case"string":var r=s(this,e);return r&&this._cache.del(r.cacheKey),delete this._schemas[e],delete this._refs[e],this;case"object":var t=this._opts.serialize,a=t?t(e):e;this._cache.del(a);var i=this._getId(e);i&&(i=d.normalizeId(i),delete this._schemas[i],delete this._refs[i])}return this},a.prototype.addFormat=function(e,r){return"string"==typeof r&&(r=new RegExp(r)),this._formats[e]=r,this},a.prototype.errorsText=function(e,r){if(!(e=e||this.errors))return"No errors";for(var t=void 0===(r=r||{}).separator?", ":r.separator,a=void 0===r.dataVar?"data":r.dataVar,s="",o=0;o<e.length;o++){var i=e[o];i&&(s+=a+i.dataPath+" "+i.message+t)}return s.slice(0,-t.length)},a.prototype._addSchema=function(e,r,t,a){if("object"!=typeof e&&"boolean"!=typeof e)throw new Error("schema should be object or boolean");var s=this._opts.serialize,o=s?s(e):e,i=this._cache.get(o);if(i)return i;a=a||!1!==this._opts.addUsedSchema;var n=d.normalizeId(this._getId(e));n&&a&&h(this,n);var l,u=!1!==this._opts.validateSchema&&!r;u&&!(l=n&&n==d.normalizeId(e.$schema))&&this.validateSchema(e,!0);var c=d.ids.call(this,e),f=new p({id:n,schema:e,localRefs:c,cacheKey:o,meta:t});return"#"!=n[0]&&a&&(this._refs[n]=f),this._cache.put(o,f),u&&l&&this.validateSchema(e,!0),f},a.prototype._compile=function(e,r){function t(){var r=e.validate,a=r.apply(null,arguments);return t.errors=r.errors,a}if(e.compiling)return e.validate=t,t.schema=e.schema,t.errors=null,t.root=r||t,!0===e.schema.$async&&(t.$async=!0),t;e.compiling=!0;var a;e.meta&&(a=this._opts,this._opts=this._metaOpts);var s;try{s=c.call(this,e.schema,r,e.localRefs)}finally{e.compiling=!1,e.meta&&(this._opts=a)}return e.validate=s,e.refs=s.refs,e.refVal=s.refVal,e.root=s.root,s},a.prototype.compileAsync=e("./compile/async");var b=e("./keyword");a.prototype.addKeyword=b.add,a.prototype.getKeyword=b.get,a.prototype.removeKeyword=b.remove;var S=e("./compile/error_classes");a.ValidationError=S.Validation,a.MissingRefError=S.MissingRef,a.$dataMetaSchema=g;var j="http://json-schema.org/draft-06/schema",_=["removeAdditional","useDefaults","coerceTypes"],x=["/properties"]},{"./$data":1,"./cache":2,"./compile":7,"./compile/async":4,"./compile/error_classes":5,"./compile/formats":6,"./compile/resolve":8,"./compile/rules":9,"./compile/schema_obj":10,"./compile/util":12,"./keyword":36,"./patternGroups":37,"./refs/$data.json":38,"./refs/json-schema-draft-06.json":39,co:40,"fast-json-stable-stringify":42}]},{},[])("ajv")});
+//# sourceMappingURL=ajv.min.js.map \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/ajv/dist/ajv.min.js.map b/tools/node_modules/eslint/node_modules/ajv/dist/ajv.min.js.map
new file mode 100644
index 0000000000..9a26ef934f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/dist/ajv.min.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["0"],"names":["f","exports","module","define","amd","window","global","self","this","Ajv","e","t","n","r","s","o","u","a","require","i","Error","code","l","call","length","1","KEYWORDS","metaSchema","keywordsJsonPointers","JSON","parse","stringify","j","segments","split","keywords","key","schema","anyOf","$ref","2","Cache","_cache","prototype","put","value","get","del","clear","3","allOf","const","contains","dependencies","enum","format","items","maximum","minimum","maxItems","minItems","maxLength","minLength","maxProperties","minProperties","multipleOf","not","oneOf","pattern","properties","propertyNames","required","uniqueItems","validate","../dotjs/_limit","../dotjs/_limitItems","../dotjs/_limitLength","../dotjs/_limitProperties","../dotjs/allOf","../dotjs/anyOf","../dotjs/const","../dotjs/contains","../dotjs/dependencies","../dotjs/enum","../dotjs/format","../dotjs/items","../dotjs/multipleOf","../dotjs/not","../dotjs/oneOf","../dotjs/pattern","../dotjs/properties","../dotjs/propertyNames","../dotjs/ref","../dotjs/required","../dotjs/uniqueItems","../dotjs/validate","4","compileAsync","meta","callback","loadMetaSchemaOf","sch","$schema","getSchema","Promise","resolve","_compileAsync","schemaObj","_compile","MissingRefError","removePromise","_loadingSchemas","ref","added","_refs","_schemas","missingSchema","missingRef","schemaPromise","_opts","loadSchema","then","addSchema","undefined","loadMissingSchema","p","_addSchema","v","MissingRef","./error_classes","5","baseId","message","url","normalizeId","fullPath","errorSubclass","Subclass","Object","create","constructor","Validation","errors","ajv","validation","./resolve","6","formats","mode","util","copy","date","str","matches","match","DATE","month","day","DAYS","time","full","TIME","regex","Z_ANCHOR","test","RegExp","HOSTNAME","URI","URITEMPLATE","URL","UUID","JSON_POINTER","RELATIVE_JSON_POINTER","fast","date-time","uri","uri-reference","uri-template","email","hostname","ipv4","ipv6","uuid","json-pointer","relative-json-pointer","dateTime","DATE_TIME_SEPARATOR","NOT_URI_FRAGMENT","./util","7","compile","root","localRefs","callValidate","compilation","result","apply","arguments","localCompile","_schema","_root","isRoot","$async","sourceCode","validateGenerator","isTop","schemaPath","errSchemaPath","errorPath","errorClasses","RULES","resolveRef","usePattern","useDefault","useCustomRule","opts","logger","vars","refVal","refValCode","patterns","patternCode","defaults","defaultCode","customRules","customRuleCode","processCode","Function","makeValidate","co","equal","ucs2length","ValidationError","error","refs","source","_refVal","refCode","refIndex","resolvedRef","rootRefId","addLocalRef","localSchema","inlineRef","inlineRefs","replaceLocalRef","removeLocalRef","refId","inline","regexStr","index","patternsHash","toQuotedString","valueStr","stableStringify","defaultsHash","rule","parentSchema","it","validateSchema","definition","errorsText","macro","keyword","c","compIndex","compiling","_compilations","_formats","cv","splice","arr","statement","fast-deep-equal","fast-json-stable-stringify","8","SchemaObject","res","resolveSchema","refPath","_getFullPath","getFullPath","_getId","id","parsedRef","resolveUrl","getJsonPointer","hash","slice","parts","part","unescapeFragment","PREVENT_SCOPE_CHANGE","limit","checkNoRef","countKeys","item","Array","isArray","count","Infinity","SIMPLE_INLINED","normalize","protocolSeparator","protocol","href","host","path","replace","TRAILING_SLASH_HASH","traverse","ids","schemaId","baseIds","","fullPaths","allKeys","jsonPtr","rootSchema","parentJsonPtr","parentKeyword","keyIndex","escapeFragment","toHash","./schema_obj","json-schema-traverse","9","ruleModules","type","rules","ALL","all","types","forEach","group","map","implKeywords","keys","k","push","implements","concat","custom","./_rules","10","obj","11","len","pos","charCodeAt","12","checkDataType","dataType","data","negate","EQUAL","AND","OK","NOT","getProperty","IDENTIFIER","escapeQuotes","SINGLE_QUOTE","joinPaths","b","escapeJsonPointer","unescapeJsonPointer","to","checkDataTypes","dataTypes","array","object","null","number","integer","coerceToTypes","optionCoerceTypes","COERCE_TO_TYPES","varOccurences","dataVar","varReplace","expr","cleanUpCode","out","EMPTY_ELSE","EMPTY_IF_NO_ELSE","EMPTY_IF_WITH_ELSE","finalCleanUpCode","async","ERRORS_REGEXP","REMOVE_ERRORS_ASYNC","RETURN_ASYNC","RETURN_DATA_ASYNC","REMOVE_ERRORS","RETURN_VALID","RETURN_TRUE","ROOTDATA_REGEXP","REMOVE_ROOTDATA","schemaHasRules","schemaHasRulesExcept","exceptKeyword","getPathExpr","currentPath","jsonPointers","isNumber","getPath","prop","getData","$data","lvl","paths","up","jsonPointer","segment","decodeURIComponent","encodeURIComponent","./ucs2length","13","$keyword","$ruleType","$schemaValue","$lvl","level","$dataLvl","dataLevel","$schemaPath","$errSchemaPath","$breakOnError","allErrors","$isData","dataPathArr","$isMax","$exclusiveKeyword","$schemaExcl","$op","$notOp","$errorKeyword","$schemaValueExcl","$exclusive","$exclType","$exclIsNumber","$opStr","$opExpr","$$outStack","createErrors","messages","verbose","__err","pop","compositeRule","Math","14","15","unicode","16","17","$it","$closingBraces","$nextValid","$currentBaseId","$allSchemasEmpty","arr1","$sch","$i","l1","18","$valid","$errs","every","$wasComposite","19","20","$idx","$dataNxt","$nextData","$nonEmptySchema","$passData","$code","21","$compile","$inline","$macro","$ruleValidate","$validateCode","$definition","$rDef","$validateSchema","$ruleErrs","$ruleErr","$asyncKeyword","statements","passContext","$parentData","$parentDataProperty","def_callRuleValidate","modifying","valid","def_customError","22","$schemaDeps","$propertyDeps","$ownProperties","ownProperties","$property","$deps","$currentErrorPath","$propertyKey","$useData","$prop","$propertyPath","$missingProperty","_errorDataPathProperty","join","arr2","i2","l2","23","$vSchema","24","$unknownFormats","unknownFormats","$allowUnknown","$format","$isObject","$formatType","warn","indexOf","$formatRef","25","$additionalItems","additionalItems","$currErrSchemaPath","26","multipleOfPrecision","27","$allErrorsOption","28","29","$regexp","30","$key","$dataProperties","$schemaKeys","$pProperties","patternProperties","$pPropertyKeys","$aProperties","additionalProperties","$someProperties","$noAdditional","$additionalIsSchema","$removeAdditional","removeAdditional","$checkAdditional","$required","v5","loopRequired","$requiredHash","patternGroups","$pgProperties","$pgPropertyKeys","i1","$pProperty","arr3","l3","$pgProperty","$additionalProperty","$useDefaults","useDefaults","arr4","i4","l4","$hasDefault","default","arr5","i5","l5","arr6","i6","l6","$pgSchema","$pgMin","$pgMax","$limit","$reason","$moreOrLess","31","$invalidName","32","$refCode","$refVal","$message","missingRefs","__callValidate","33","$propertySch","$loopRequired","i3","34","35","$shouldUseGroup","$rulesGroup","$shouldUseRule","$rule","impl","$ruleImplementsSomeKeyword","$refKeywords","$id","$es7","yieldAwait","$top","rootId","$closingBraces1","$closingBraces2","$typeSchema","$typeIsArray","extendRefs","coerceTypes","$coerceToTypes","$dataType","$coerced","$bracesCoercion","$type","36","add","_addRule","ruleGroup","rg","remove","./dotjs/custom","37","defaultMeta","metaSchemaRef","addKeyword","38","description","39","title","definitions","schemaArray","nonNegativeInteger","nonNegativeIntegerDefault0","simpleTypes","stringArray","examples","exclusiveMinimum","exclusiveMaximum","40","gen","ctx","args","reject","onFulfilled","ret","next","onRejected","err","throw","done","toPromise","isPromise","TypeError","String","name","displayName","isGenerator","isGeneratorFunction","fn","val","isObject","results","promises","promise","defer","wrap","createPromise","__generatorFunction__","41","arrA","arrB","dateA","Date","dateB","getTime","regexpA","regexpB","toString","hasOwnProperty","42","cmp","cycles","node","seen","toJSON","isFinite","seenIndex","sort","43","_traverse","cb","arrayKeywords","propsKeywords","escapeJsonPtr","skipKeywords","44","RangeError","mapDomain","string","regexSeparators","ucs2decode","extra","output","counter","ucs2encode","stringFromCharCode","basicToDigit","codePoint","base","digitToBasic","digit","flag","adapt","delta","numPoints","firstTime","floor","damp","baseMinusTMin","tMax","skew","decode","input","basic","oldi","w","baseMinusT","inputLength","initialN","bias","initialBias","lastIndexOf","delimiter","maxInt","tMin","encode","handledCPCount","basicLength","m","q","currentValue","handledCPCountPlusOne","qMinusT","freeExports","nodeType","freeModule","freeGlobal","punycode","regexPunycode","regexNonASCII","overflow","not-basic","invalid-input","fromCharCode","version","ucs2","toASCII","toUnicode","toLowerCase","45","qs","sep","eq","options","regexp","maxKeys","kstr","vstr","x","idx","substr","xs","46","stringifyPrimitive","objectKeys","ks","47","./decode","./encode","48","Url","slashes","auth","port","search","query","pathname","urlParse","parseQueryString","slashesDenoteHost","relative","resolveObject","isString","protocolPattern","portPattern","simplePathPattern","unwise","autoEscape","nonHostChars","hostEndingChars","hostnamePartPattern","hostnamePartStart","unsafeProtocol","javascript","javascript:","hostlessProtocol","slashedProtocol","http","https","ftp","gopher","file","http:","https:","ftp:","gopher:","file:","querystring","queryIndex","splitter","uSplit","rest","trim","simplePath","exec","proto","lowerProto","hostEnd","hec","atSign","parseHost","ipv6Hostname","hostparts","newpart","validParts","notHost","bit","unshift","ae","esc","escape","qm","charAt","rel","tkeys","tk","tkey","rkeys","rk","rkey","relPath","shift","isSourceAbs","isRelAbs","mustEndAbs","removeAllDots","srcPath","psychotic","isNullOrUndefined","authInHost","isNull","last","hasTrailingSlash","isAbsolute","49","arg","log","noop","console","setLogger","_fragments","schemaUriFormat","_schemaUriFormat","_schemaUriFormatFunc","cache","_get$Id","_get$IdOrId","chooseGetId","errorDataPath","serialize","_metaOpts","metaOpts","META_IGNORE_OPTIONS","getMetaSchemaOptions","addFormat","addInitialFormats","$dataSchema","addMetaSchema","$dataMetaSchema","META_SUPPORT_DATA","META_SCHEMA_ID","addDraft6MetaSchema","optsSchemas","schemas","addInitialSchemas","_getSchemaObj","keyRef","_removeAllSchemas","cacheKey","checkUnique","compileSchema","schemaKeyRef","_meta","_skipValidation","skipValidation","throwOrLogError","currentUriFormat","fragment","_getSchemaFragment","removeSchema","separator","text","dataPath","shouldAddSchema","cached","addUsedSchema","recursiveMeta","willValidate","_validate","currentOpts","customKeyword","getKeyword","removeKeyword","./$data","./cache","./compile","./compile/async","./compile/error_classes","./compile/formats","./compile/resolve","./compile/rules","./compile/schema_obj","./compile/util","./keyword","./patternGroups","./refs/$data.json","./refs/json-schema-draft-06.json"],"mappings":";CAAA,SAAUA,GAAG,GAAoB,iBAAVC,SAAoC,oBAATC,OAAsBA,OAAOD,QAAQD,SAAS,GAAmB,mBAATG,QAAqBA,OAAOC,IAAKD,UAAUH,OAAO,EAA0B,oBAATK,OAAwBA,OAA+B,oBAATC,OAAwBA,OAA6B,oBAAPC,KAAsBA,KAAYC,MAAOC,IAAMT,KAAxT,CAA+T,WAAqC,OAAO,SAAUU,EAAEC,EAAEC,EAAEC,GAAG,SAASC,EAAEC,EAAEC,GAAG,IAAIJ,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,CAAC,IAAIE,EAAkB,mBAATC,SAAqBA,QAAQ,IAAIF,GAAGC,EAAE,OAAOA,EAAEF,GAAE,GAAI,GAAGI,EAAE,OAAOA,EAAEJ,GAAE,GAAI,IAAIf,EAAE,IAAIoB,MAAM,uBAAuBL,EAAE,KAAK,MAAMf,EAAEqB,KAAK,mBAAmBrB,EAAE,IAAIsB,EAAEV,EAAEG,IAAId,YAAYU,EAAEI,GAAG,GAAGQ,KAAKD,EAAErB,QAAQ,SAASS,GAAG,IAAIE,EAAED,EAAEI,GAAG,GAAGL,GAAG,OAAOI,EAAEF,GAAIF,IAAIY,EAAEA,EAAErB,QAAQS,EAAEC,EAAEC,EAAEC,GAAG,OAAOD,EAAEG,GAAGd,QAAkD,IAAI,IAA1CkB,EAAkB,mBAATD,SAAqBA,QAAgBH,EAAE,EAAEA,EAAEF,EAAEW,OAAOT,IAAID,EAAED,EAAEE,IAAI,OAAOD,EAAvb,EAA4bW,GAAG,SAASP,EAAQhB,EAAOD,GACl0B,aAEA,IAAIyB,GACF,aACA,UACA,mBACA,UACA,mBACA,YACA,YACA,UACA,kBACA,WACA,WACA,cACA,gBACA,gBACA,WACA,uBACA,OACA,SACA,SAGFxB,EAAOD,QAAU,SAAU0B,EAAYC,GACrC,IAAK,IAAIT,EAAE,EAAGA,EAAES,EAAqBJ,OAAQL,IAAK,CAChDQ,EAAaE,KAAKC,MAAMD,KAAKE,UAAUJ,IACvC,IAEIK,EAFAC,EAAWL,EAAqBT,GAAGe,MAAM,KACzCC,EAAWR,EAEf,IAAKK,EAAE,EAAGA,EAAEC,EAAST,OAAQQ,IAC3BG,EAAWA,EAASF,EAASD,IAE/B,IAAKA,EAAE,EAAGA,EAAEN,EAASF,OAAQQ,IAAK,CAChC,IAAII,EAAMV,EAASM,GACfK,EAASF,EAASC,GAClBC,IACFF,EAASC,IACPE,OACED,GACEE,KAAM,qFAOlB,OAAOZ,QAGHa,GAAG,SAAStB,EAAQhB,EAAOD,GACjC,aAGA,IAAIwC,EAAQvC,EAAOD,QAAU,WAC3BO,KAAKkC,WAIPD,EAAME,UAAUC,IAAM,SAAmBR,EAAKS,GAC5CrC,KAAKkC,OAAON,GAAOS,GAIrBJ,EAAME,UAAUG,IAAM,SAAmBV,GACvC,OAAO5B,KAAKkC,OAAON,IAIrBK,EAAME,UAAUI,IAAM,SAAmBX,UAChC5B,KAAKkC,OAAON,IAIrBK,EAAME,UAAUK,MAAQ,WACtBxC,KAAKkC,gBAGDO,GAAG,SAAS/B,EAAQhB,EAAOD,GACjC,aAGAC,EAAOD,SACLsC,KAAQrB,EAAQ,gBAChBgC,MAAOhC,EAAQ,kBACfoB,MAAOpB,EAAQ,kBACfiC,MAAOjC,EAAQ,kBACfkC,SAAUlC,EAAQ,qBAClBmC,aAAcnC,EAAQ,yBACtBoC,KAAQpC,EAAQ,iBAChBqC,OAAQrC,EAAQ,mBAChBsC,MAAOtC,EAAQ,kBACfuC,QAASvC,EAAQ,mBACjBwC,QAASxC,EAAQ,mBACjByC,SAAUzC,EAAQ,wBAClB0C,SAAU1C,EAAQ,wBAClB2C,UAAW3C,EAAQ,yBACnB4C,UAAW5C,EAAQ,yBACnB6C,cAAe7C,EAAQ,6BACvB8C,cAAe9C,EAAQ,6BACvB+C,WAAY/C,EAAQ,uBACpBgD,IAAKhD,EAAQ,gBACbiD,MAAOjD,EAAQ,kBACfkD,QAASlD,EAAQ,oBACjBmD,WAAYnD,EAAQ,uBACpBoD,cAAepD,EAAQ,0BACvBqD,SAAUrD,EAAQ,qBAClBsD,YAAatD,EAAQ,wBACrBuD,SAAUvD,EAAQ,wBAGjBwD,kBAAkB,GAAGC,uBAAuB,GAAGC,wBAAwB,GAAGC,4BAA4B,GAAGC,iBAAiB,GAAGC,iBAAiB,GAAGC,iBAAiB,GAAGC,oBAAoB,GAAGC,wBAAwB,GAAGC,gBAAgB,GAAGC,kBAAkB,GAAGC,iBAAiB,GAAGC,sBAAsB,GAAGC,eAAe,GAAGC,iBAAiB,GAAGC,mBAAmB,GAAGC,sBAAsB,GAAGC,yBAAyB,GAAGC,eAAe,GAAGC,oBAAoB,GAAGC,uBAAuB,GAAGC,oBAAoB,KAAKC,GAAG,SAAS9E,EAAQhB,EAAOD,GACvhB,aAgBA,SAASgG,EAAa5D,EAAQ6D,EAAMC,GA4BlC,SAASC,EAAiBC,GACxB,IAAIC,EAAUD,EAAIC,QAClB,OAAOA,IAAY/F,EAAKgG,UAAUD,GACxBL,EAAa1E,KAAKhB,GAAQgC,KAAM+D,IAAW,GAC3CE,QAAQC,UAIpB,SAASC,EAAcC,GACrB,IAAM,OAAOpG,EAAKqG,SAASD,GAC3B,MAAMjG,GACJ,GAAIA,aAAamG,EAAiB,OAKpC,SAA2BnG,GAoBzB,SAASoG,WACAvG,EAAKwG,gBAAgBC,GAG9B,SAASC,EAAMD,GACb,OAAOzG,EAAK2G,MAAMF,IAAQzG,EAAK4G,SAASH,GAxB1C,IAAIA,EAAMtG,EAAE0G,cACZ,GAAIH,EAAMD,GAAM,MAAM,IAAI5F,MAAM,UAAY4F,EAAM,kBAAoBtG,EAAE2G,WAAa,uBAErF,IAAIC,EAAgB/G,EAAKwG,gBAAgBC,GAMzC,OALKM,IACHA,EAAgB/G,EAAKwG,gBAAgBC,GAAOzG,EAAKgH,MAAMC,WAAWR,IACpDS,KAAKX,EAAeA,GAG7BQ,EAAcG,KAAK,SAAUpB,GAClC,IAAKY,EAAMD,GACT,OAAOZ,EAAiBC,GAAKoB,KAAK,WAC3BR,EAAMD,IAAMzG,EAAKmH,UAAUrB,EAAKW,OAAKW,EAAWzB,OAGxDuB,KAAK,WACN,OAAOf,EAAcC,KAtBkBiB,CAAkBlH,GAC3D,MAAMA,GApCV,IAAIH,EAAOC,KACX,GAAoC,mBAAzBA,KAAK+G,MAAMC,WACpB,MAAM,IAAIpG,MAAM,2CAEC,mBAAR8E,IACTC,EAAWD,EACXA,OAAOyB,GAGT,IAAIE,EAAIzB,EAAiB/D,GAAQoF,KAAK,WACpC,IAAId,EAAYpG,EAAKuH,WAAWzF,OAAQsF,EAAWzB,GACnD,OAAOS,EAAUlC,UAAYiC,EAAcC,KAU7C,OAPIR,GACF0B,EAAEJ,KACA,SAASM,GAAK5B,EAAS,KAAM4B,IAC7B5B,GAIG0B,EAvCT,IAAIhB,EAAkB3F,EAAQ,mBAAmB8G,WAEjD9H,EAAOD,QAAUgG,IAuFdgC,kBAAkB,IAAIC,GAAG,SAAShH,EAAQhB,EAAOD,GACpD,aAsBA,SAAS4G,EAAgBsB,EAAQnB,EAAKoB,GACpC5H,KAAK4H,QAAUA,GAAWvB,EAAgBuB,QAAQD,EAAQnB,GAC1DxG,KAAK6G,WAAaZ,EAAQ4B,IAAIF,EAAQnB,GACtCxG,KAAK4G,cAAgBX,EAAQ6B,YAAY7B,EAAQ8B,SAAS/H,KAAK6G,aAIjE,SAASmB,EAAcC,GAGrB,OAFAA,EAAS9F,UAAY+F,OAAOC,OAAOvH,MAAMuB,WACzC8F,EAAS9F,UAAUiG,YAAcH,EAC1BA,EA9BT,IAAIhC,EAAUvF,EAAQ,aAEtBhB,EAAOD,SACL4I,WAAYL,EAKd,SAAyBM,GACvBtI,KAAK4H,QAAU,oBACf5H,KAAKsI,OAASA,EACdtI,KAAKuI,IAAMvI,KAAKwI,YAAa,IAP7BhB,WAAYQ,EAAc3B,IAW5BA,EAAgBuB,QAAU,SAAUD,EAAQnB,GAC1C,MAAO,2BAA8BA,EAAM,YAAcmB,KAiBxDc,YAAY,IAAIC,GAAG,SAAShI,EAAQhB,EAAOD,GAC9C,aAwBA,SAASkJ,EAAQC,GAEf,OADAA,EAAe,QAARA,EAAiB,OAAS,OAC1BC,EAAKC,KAAKH,EAAQC,IAsD3B,SAASG,EAAKC,GAEZ,IAAIC,EAAUD,EAAIE,MAAMC,GACxB,IAAKF,EAAS,OAAO,EAErB,IAAIG,GAASH,EAAQ,GACjBI,GAAOJ,EAAQ,GACnB,OAAOG,GAAS,GAAKA,GAAS,IAAMC,GAAO,GAAKA,GAAOC,EAAKF,GAI9D,SAASG,EAAKP,EAAKQ,GACjB,IAAIP,EAAUD,EAAIE,MAAMO,GACxB,IAAKR,EAAS,OAAO,EAMrB,OAJWA,EAAQ,IAIJ,IAHFA,EAAQ,IAGU,IAFlBA,EAAQ,IAE0B,MAAQO,GADxCP,EAAQ,IA4BzB,SAASS,EAAMV,GACb,GAAIW,EAASC,KAAKZ,GAAM,OAAO,EAC/B,IAEE,OADA,IAAIa,OAAOb,IACJ,EACP,MAAM9I,GACN,OAAO,GAlIX,IAAI2I,EAAOnI,EAAQ,UAEfyI,EAAO,2BACPG,GAAQ,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAC3CG,EAAO,oDACPK,EAAW,qFACXC,EAAM,+nCAGNC,EAAc,oLAKdC,EAAM,4rDACNC,EAAO,+DACPC,EAAe,yFACfC,EAAwB,mDAG5B1K,EAAOD,QAAUkJ,EAQjBA,EAAQ0B,MAENtB,KAAM,6BAENQ,KAAM,2DACNe,YAAa,uFAEbC,IAAK,4CACLC,gBAAiB,4CACjBC,eAAgBT,EAChBnC,IAAKoC,EAILS,MAAO,mHACPC,SAAUb,EAEVc,KAAM,4EAENC,KAAM,qpCACNnB,MAAOA,EAEPoB,KAAMZ,EAGNa,eAAgBZ,EAEhBa,wBAAyBZ,GAI3BzB,EAAQa,MACNT,KAAMA,EACNQ,KAAMA,EACNe,YAwCF,SAAmBtB,GAEjB,IAAIiC,EAAWjC,EAAItH,MAAMwJ,GACzB,OAA0B,GAAnBD,EAASjK,QAAe+H,EAAKkC,EAAS,KAAO1B,EAAK0B,EAAS,IAAI,IA1CtEV,IAsDF,SAAavB,GAEX,OAAOmC,EAAiBvB,KAAKZ,IAAQe,EAAIH,KAAKZ,IAvD9CwB,gBAzDW,yoCA0DXC,eAAgBT,EAChBnC,IAAKoC,EACLS,MAAO,4IACPC,SAyCF,SAAkB3B,GAGhB,OAAOA,EAAIhI,QAAU,KAAO8I,EAASF,KAAKZ,IA3C1C4B,KAAM,4EACNC,KAAM,qpCACNnB,MAAOA,EACPoB,KAAMZ,EACNa,eAAgBZ,EAChBa,wBAAyBZ,GA2B3B,IAAIc,EAAsB,QAetBC,EAAmB,OAOnBxB,EAAW,aAWZyB,SAAS,KAAKC,GAAG,SAAS3K,EAAQhB,EAAOD,GAC5C,aAgCA,SAAS6L,EAAQzJ,EAAQ0J,EAAMC,EAAW7D,GAwCxC,SAAS8D,IACP,IAAIxH,EAAWyH,EAAYzH,SACvB0H,EAAS1H,EAAS2H,MAAM,KAAMC,WAElC,OADAJ,EAAanD,OAASrE,EAASqE,OACxBqD,EAGT,SAASG,EAAaC,EAASC,EAAOR,EAAW7D,GAC/C,IAAIsE,GAAUD,GAAUA,GAASA,EAAMnK,QAAUkK,EACjD,GAAIC,EAAMnK,QAAU0J,EAAK1J,OACvB,OAAOyJ,EAAQvK,KAAKhB,EAAMgM,EAASC,EAAOR,EAAW7D,GAEvD,IAAIuE,GAA4B,IAAnBH,EAAQG,OAEjBC,EAAaC,GACfC,OAAO,EACPxK,OAAQkK,EACRE,OAAQA,EACRtE,OAAQA,EACR4D,KAAMS,EACNM,WAAY,GACZC,cAAe,IACfC,UAAW,KACXnG,gBAAiBoG,EAAajF,WAC9BkF,MAAOA,EACPzI,SAAUmI,EACVvD,KAAMA,EACN5C,QAASA,EACT0G,WAAYA,EACZC,WAAYA,EACZC,WAAYA,EACZC,cAAeA,EACfC,KAAMA,EACNpE,QAASA,EACTqE,OAAQjN,EAAKiN,OACbjN,KAAMA,IAGRoM,EAAac,EAAKC,EAAQC,GAAcF,EAAKG,EAAUC,GACtCJ,EAAKK,EAAUC,GAAeN,EAAKO,EAAaC,GAChDtB,EAEbY,EAAKW,cAAavB,EAAaY,EAAKW,YAAYvB,IAEpD,IAAIlI,EACJ,IAgBEA,EAfmB,IAAI0J,SACrB,OACA,QACA,UACA,OACA,SACA,WACA,cACA,KACA,QACA,aACA,kBACAxB,EAGSyB,CACT7N,EACA2M,EACA/D,EACA4C,EACA2B,EACAI,EACAE,EACAK,EACAC,EACAC,EACAC,GAGFd,EAAO,GAAKjJ,EACZ,MAAM/D,GAEN,MADAH,EAAKiN,OAAOiB,MAAM,yCAA0C9B,GACtDjM,EAiBR,OAdA+D,EAASpC,OAASkK,EAClB9H,EAASqE,OAAS,KAClBrE,EAASiK,KAAOA,EAChBjK,EAASiJ,OAASA,EAClBjJ,EAASsH,KAAOU,EAAShI,EAAW+H,EAChCE,IAAQjI,EAASiI,QAAS,IACN,IAApBa,EAAKZ,aACPlI,EAASkK,QACPtN,KAAMsL,EACNiB,SAAUA,EACVE,SAAUA,IAIPrJ,EAGT,SAAS0I,EAAWhF,EAAQnB,EAAKyF,GAC/BzF,EAAMP,EAAQ4B,IAAIF,EAAQnB,GAC1B,IACI4H,EAASC,EADTC,EAAWJ,EAAK1H,GAEpB,QAAiBW,IAAbmH,EAGF,OAFAF,EAAUlB,EAAOoB,GACjBD,EAAU,UAAYC,EAAW,IAC1BC,EAAYH,EAASC,GAE9B,IAAKpC,GAAUV,EAAK2C,KAAM,CACxB,IAAIM,EAAYjD,EAAK2C,KAAK1H,GAC1B,QAAkBW,IAAdqH,EAGF,OAFAJ,EAAU7C,EAAK2B,OAAOsB,GACtBH,EAAUI,EAAYjI,EAAK4H,GACpBG,EAAYH,EAASC,GAIhCA,EAAUI,EAAYjI,GACtB,IAAIe,EAAItB,EAAQlF,KAAKhB,EAAM+L,EAAcP,EAAM/E,GAC/C,QAAUW,IAANI,EAAiB,CACnB,IAAImH,EAAclD,GAAaA,EAAUhF,GACrCkI,IACFnH,EAAItB,EAAQ0I,UAAUD,EAAa3B,EAAK6B,YAClCF,EACApD,EAAQvK,KAAKhB,EAAM2O,EAAanD,EAAMC,EAAW7D,IAI3D,QAAUR,IAANI,EAIF,OAeJ,SAAyBf,EAAKe,GAE5B2F,EADYgB,EAAK1H,IACDe,EAlBdsH,CAAgBrI,EAAKe,GACdgH,EAAYhH,EAAG8G,IAW1B,SAAwB7H,UACf0H,EAAK1H,GAfVsI,CAAetI,GAOnB,SAASiI,EAAYjI,EAAKe,GACxB,IAAIwH,EAAQ7B,EAAOlM,OAGnB,OAFAkM,EAAO6B,GAASxH,EAChB2G,EAAK1H,GAAOuI,EACL,SAAWA,EAYpB,SAASR,EAAYrB,EAAQrM,GAC3B,MAAwB,iBAAVqM,GAAuC,kBAAVA,GAC/BrM,KAAMA,EAAMgB,OAAQqL,EAAQ8B,QAAQ,IACpCnO,KAAMA,EAAMqL,OAAQgB,GAAUA,EAAOhB,QAGnD,SAASU,EAAWqC,GAClB,IAAIC,EAAQC,EAAaF,GAKzB,YAJc9H,IAAV+H,IACFA,EAAQC,EAAaF,GAAY7B,EAASpM,OAC1CoM,EAAS8B,GAASD,GAEb,UAAYC,EAGrB,SAASrC,EAAWxK,GAClB,cAAeA,GACb,IAAK,UACL,IAAK,SACH,MAAO,GAAKA,EACd,IAAK,SACH,OAAOwG,EAAKuG,eAAe/M,GAC7B,IAAK,SACH,GAAc,OAAVA,EAAgB,MAAO,OAC3B,IAAIgN,EAAWC,EAAgBjN,GAC3B6M,EAAQK,EAAaF,GAKzB,YAJclI,IAAV+H,IACFA,EAAQK,EAAaF,GAAY/B,EAAStM,OAC1CsM,EAAS4B,GAAS7M,GAEb,UAAY6M,GAIzB,SAASpC,EAAc0C,EAAM3N,EAAQ4N,EAAcC,GACjD,IAAIC,EAAiBH,EAAKI,WAAWD,eACrC,GAAIA,IAAgD,IAA9B5P,EAAKgH,MAAM4I,eAA0B,CAEzD,IADYA,EAAe9N,GACf,CACV,IAAI+F,EAAU,8BAAgC7H,EAAK8P,WAAWF,EAAerH,QAC7E,GAAiC,OAA7BvI,EAAKgH,MAAM4I,eACV,MAAM,IAAI/O,MAAMgH,GADmB7H,EAAKiN,OAAOiB,MAAMrG,IAK9D,IAII3D,EAJAqH,EAAUkE,EAAKI,WAAWtE,QAC1B0D,EAASQ,EAAKI,WAAWZ,OACzBc,EAAQN,EAAKI,WAAWE,MAG5B,GAAIxE,EACFrH,EAAWqH,EAAQvK,KAAKhB,EAAM8B,EAAQ4N,EAAcC,QAC/C,GAAII,EACT7L,EAAW6L,EAAM/O,KAAKhB,EAAM8B,EAAQ4N,EAAcC,IACtB,IAAxB3C,EAAK4C,gBAA0B5P,EAAK4P,eAAe1L,GAAU,QAC5D,GAAI+K,EACT/K,EAAW+K,EAAOjO,KAAKhB,EAAM2P,EAAIF,EAAKO,QAASlO,EAAQ4N,QAGvD,KADAxL,EAAWuL,EAAKI,WAAW3L,UACZ,OAGjB,QAAiBkD,IAAblD,EACF,MAAM,IAAIrD,MAAM,mBAAqB4O,EAAKO,QAAU,sBAEtD,IAAIb,EAAQ1B,EAAYxM,OAGxB,OAFAwM,EAAY0B,GAASjL,GAGnBpD,KAAM,aAAeqO,EACrBjL,SAAUA,GAlQd,IAAIlE,EAAOC,KACP+M,EAAO/M,KAAK+G,MACZmG,QAAW/F,GACX+G,KACAd,KACA+B,KACA7B,KACAiC,KACA/B,KAIAwC,EAoQN,SAAwBnO,EAAQ0J,EAAM5D,GAEpC,IAAIuH,EAAQe,EAAUlP,KAAKf,KAAM6B,EAAQ0J,EAAM5D,GAC/C,OAAIuH,GAAS,GAAYA,MAAOA,EAAOgB,WAAW,IAClDhB,EAAQlP,KAAKmQ,cAAcnP,OAC3BhB,KAAKmQ,cAAcjB,IACjBrN,OAAQA,EACR0J,KAAMA,EACN5D,OAAQA,IAEDuH,MAAOA,EAAOgB,WAAW,KA9QXnP,KAAKf,KAAM6B,EAFlC0J,EAAOA,IAAU1J,OAAQA,EAAQqL,OAAQA,EAAQgB,KAAMA,GAEPvG,GAC5C+D,EAAc1L,KAAKmQ,cAAcH,EAAEd,OACvC,GAAIc,EAAEE,UAAW,OAAQxE,EAAYD,aAAeA,EAEpD,IAAI9C,EAAU3I,KAAKoQ,SACf1D,EAAQ1M,KAAK0M,MAEjB,IACE,IAAInF,EAAIuE,EAAajK,EAAQ0J,EAAMC,EAAW7D,GAC9C+D,EAAYzH,SAAWsD,EACvB,IAAI8I,EAAK3E,EAAYD,aAUrB,OATI4E,IACFA,EAAGxO,OAAS0F,EAAE1F,OACdwO,EAAG/H,OAAS,KACZ+H,EAAGnC,KAAO3G,EAAE2G,KACZmC,EAAGnD,OAAS3F,EAAE2F,OACdmD,EAAG9E,KAAOhE,EAAEgE,KACZ8E,EAAGnE,OAAS3E,EAAE2E,OACVa,EAAKZ,aAAYkE,EAAGlC,OAAS5G,EAAE4G,SAE9B5G,EACP,SAoQJ,SAAsB1F,EAAQ0J,EAAM5D,GAElC,IAAIhH,EAAIsP,EAAUlP,KAAKf,KAAM6B,EAAQ0J,EAAM5D,GACvChH,GAAK,GAAGX,KAAKmQ,cAAcG,OAAO3P,EAAG,KAtQ1BI,KAAKf,KAAM6B,EAAQ0J,EAAM5D,IAkR1C,SAASsI,EAAUpO,EAAQ0J,EAAM5D,GAE/B,IAAK,IAAIhH,EAAE,EAAGA,EAAEX,KAAKmQ,cAAcnP,OAAQL,IAAK,CAC9C,IAAIqP,EAAIhQ,KAAKmQ,cAAcxP,GAC3B,GAAIqP,EAAEnO,QAAUA,GAAUmO,EAAEzE,MAAQA,GAAQyE,EAAErI,QAAUA,EAAQ,OAAOhH,EAEzE,OAAQ,EAIV,SAAS0M,EAAY1M,EAAGyM,GACtB,MAAO,cAAgBzM,EAAI,iBAAmBkI,EAAKuG,eAAehC,EAASzM,IAAM,KAInF,SAAS4M,EAAY5M,GACnB,MAAO,cAAgBA,EAAI,eAAiBA,EAAI,KAIlD,SAASwM,EAAWxM,EAAGuM,GACrB,YAAqB/F,IAAd+F,EAAOvM,GAAmB,GAAK,aAAeA,EAAI,aAAeA,EAAI,KAI9E,SAAS8M,EAAe9M,GACtB,MAAO,iBAAmBA,EAAI,kBAAoBA,EAAI,KAIxD,SAASsM,EAAKsD,EAAKC,GACjB,IAAKD,EAAIvP,OAAQ,MAAO,GAExB,IAAK,IADDH,EAAO,GACFF,EAAE,EAAGA,EAAE4P,EAAIvP,OAAQL,IAC1BE,GAAQ2P,EAAU7P,EAAG4P,GACvB,OAAO1P,EAxXT,IAAIoF,EAAUvF,EAAQ,aAClBmI,EAAOnI,EAAQ,UACf+L,EAAe/L,EAAQ,mBACvB4O,EAAkB5O,EAAQ,8BAE1B0L,EAAoB1L,EAAQ,qBAM5BmN,EAAKnN,EAAQ,MACbqN,EAAalF,EAAKkF,WAClBD,EAAQpN,EAAQ,mBAGhBsN,EAAkBvB,EAAapE,WAEnC3I,EAAOD,QAAU6L,IAyWd/F,oBAAoB,GAAGkC,kBAAkB,EAAEgB,YAAY,EAAE2C,SAAS,GAAGyC,GAAK,GAAG4C,kBAAkB,GAAGC,6BAA6B,KAAKC,GAAG,SAASjQ,EAAQhB,EAAOD,GAClK,aAyBA,SAASwG,EAAQqF,EAASC,EAAM/E,GAE9B,IAAI0G,EAASlN,KAAK0G,MAAMF,GACxB,GAAqB,iBAAV0G,EAAoB,CAC7B,IAAIlN,KAAK0G,MAAMwG,GACV,OAAOjH,EAAQlF,KAAKf,KAAMsL,EAASC,EAAM2B,GADtBA,EAASlN,KAAK0G,MAAMwG,GAK9C,IADAA,EAASA,GAAUlN,KAAK2G,SAASH,cACXoK,EACpB,OAAOjC,EAAUzB,EAAOrL,OAAQ7B,KAAK+G,MAAM6H,YACjC1B,EAAOrL,OACPqL,EAAOjJ,UAAYjE,KAAKoG,SAAS8G,GAG7C,IACIrL,EAAQ0F,EAAGI,EADXkJ,EAAMC,EAAc/P,KAAKf,KAAMuL,EAAM/E,GAgBzC,OAdIqK,IACFhP,EAASgP,EAAIhP,OACb0J,EAAOsF,EAAItF,KACX5D,EAASkJ,EAAIlJ,QAGX9F,aAAkB+O,EACpBrJ,EAAI1F,EAAOoC,UAAYqH,EAAQvK,KAAKf,KAAM6B,EAAOA,OAAQ0J,OAAMpE,EAAWQ,QACtDR,IAAXtF,IACT0F,EAAIoH,EAAU9M,EAAQ7B,KAAK+G,MAAM6H,YAC3B/M,EACAyJ,EAAQvK,KAAKf,KAAM6B,EAAQ0J,OAAMpE,EAAWQ,IAG7CJ,EAWT,SAASuJ,EAAcvF,EAAM/E,GAE3B,IAAIa,EAAIQ,EAAIvG,MAAMkF,GAAK,GAAO,GAC1BuK,EAAUC,EAAa3J,GACvBM,EAASsJ,EAAYjR,KAAKkR,OAAO3F,EAAK1J,SAC1C,GAAIkP,IAAYpJ,EAAQ,CACtB,IAAIwJ,EAAKrJ,EAAYiJ,GACjB7D,EAASlN,KAAK0G,MAAMyK,GACxB,GAAqB,iBAAVjE,EACT,OAuBN,SAA0B3B,EAAM/E,EAAK4K,GAEnC,IAAIP,EAAMC,EAAc/P,KAAKf,KAAMuL,EAAM/E,GACzC,GAAIqK,EAAK,CACP,IAAIhP,EAASgP,EAAIhP,OACb8F,EAASkJ,EAAIlJ,OACjB4D,EAAOsF,EAAItF,KACX,IAAI4F,EAAKnR,KAAKkR,OAAOrP,GAErB,OADIsP,IAAIxJ,EAAS0J,EAAW1J,EAAQwJ,IAC7BG,EAAevQ,KAAKf,KAAMoR,EAAWzJ,EAAQ9F,EAAQ0J,KAhClCxK,KAAKf,KAAMuL,EAAM2B,EAAQ7F,GAC5C,GAAI6F,aAAkB0D,EACtB1D,EAAOjJ,UAAUjE,KAAKoG,SAAS8G,GACpC3B,EAAO2B,MACF,CAEL,MADAA,EAASlN,KAAK2G,SAASwK,cACDP,GAMpB,OAJA,GADK1D,EAAOjJ,UAAUjE,KAAKoG,SAAS8G,GAChCiE,GAAMrJ,EAAYtB,GACpB,OAAS3E,OAAQqL,EAAQ3B,KAAMA,EAAM5D,OAAQA,GAC/C4D,EAAO2B,EAKX,IAAK3B,EAAK1J,OAAQ,OAClB8F,EAASsJ,EAAYjR,KAAKkR,OAAO3F,EAAK1J,SAExC,OAAOyP,EAAevQ,KAAKf,KAAMqH,EAAGM,EAAQ4D,EAAK1J,OAAQ0J,GAqB3D,SAAS+F,EAAeF,EAAWzJ,EAAQ9F,EAAQ0J,GAGjD,GADA6F,EAAUG,KAAOH,EAAUG,MAAQ,GACF,MAA7BH,EAAUG,KAAKC,MAAM,EAAE,GAA3B,CAGA,IAAK,IAFDC,EAAQL,EAAUG,KAAK7P,MAAM,KAExBf,EAAI,EAAGA,EAAI8Q,EAAMzQ,OAAQL,IAAK,CACrC,IAAI+Q,EAAOD,EAAM9Q,GACjB,GAAI+Q,EAAM,CAGR,GAFAA,EAAO7I,EAAK8I,iBAAiBD,QAEdvK,KADftF,EAASA,EAAO6P,IACU,MAC1B,IAAIP,EACJ,IAAKS,EAAqBF,MACxBP,EAAKnR,KAAKkR,OAAOrP,MACT8F,EAAS0J,EAAW1J,EAAQwJ,IAChCtP,EAAOE,MAAM,CACf,IAAIA,EAAOsP,EAAW1J,EAAQ9F,EAAOE,MACjC8O,EAAMC,EAAc/P,KAAKf,KAAMuL,EAAMxJ,GACrC8O,IACFhP,EAASgP,EAAIhP,OACb0J,EAAOsF,EAAItF,KACX5D,EAASkJ,EAAIlJ,UAMvB,YAAeR,IAAXtF,GAAwBA,IAAW0J,EAAK1J,QACjCA,OAAQA,EAAQ0J,KAAMA,EAAM5D,OAAQA,QAD/C,GAcF,SAASgH,EAAU9M,EAAQgQ,GACzB,OAAc,IAAVA,SACU1K,IAAV0K,IAAiC,IAAVA,EAAuBC,EAAWjQ,GACpDgQ,EAAcE,EAAUlQ,IAAWgQ,OAAvC,GAIP,SAASC,EAAWjQ,GAClB,IAAImQ,EACJ,GAAIC,MAAMC,QAAQrQ,IAChB,IAAK,IAAIlB,EAAE,EAAGA,EAAEkB,EAAOb,OAAQL,IAE7B,GAAmB,iBADnBqR,EAAOnQ,EAAOlB,MACkBmR,EAAWE,GAAO,OAAO,OAG3D,IAAK,IAAIpQ,KAAOC,EAAQ,CACtB,GAAW,QAAPD,EAAe,OAAO,EAE1B,GAAmB,iBADnBoQ,EAAOnQ,EAAOD,MACkBkQ,EAAWE,GAAO,OAAO,EAG7D,OAAO,EAIT,SAASD,EAAUlQ,GACjB,IAAemQ,EAAXG,EAAQ,EACZ,GAAIF,MAAMC,QAAQrQ,IAChB,IAAK,IAAIlB,EAAE,EAAGA,EAAEkB,EAAOb,OAAQL,IAG7B,GADmB,iBADnBqR,EAAOnQ,EAAOlB,MACewR,GAASJ,EAAUC,IAC5CG,GAASC,EAAAA,EAAU,OAAOA,EAAAA,OAGhC,IAAK,IAAIxQ,KAAOC,EAAQ,CACtB,GAAW,QAAPD,EAAe,OAAOwQ,EAAAA,EAC1B,GAAIC,EAAezQ,GACjBuQ,SAIA,GADmB,iBADnBH,EAAOnQ,EAAOD,MACeuQ,GAASJ,EAAUC,GAAQ,GACpDG,GAASC,EAAAA,EAAU,OAAOA,EAAAA,EAIpC,OAAOD,EAIT,SAASlB,EAAYE,EAAImB,IACL,IAAdA,IAAqBnB,EAAKrJ,EAAYqJ,IAE1C,OAAOH,EADCnJ,EAAIvG,MAAM6P,GAAI,GAAO,IAK/B,SAASH,EAAa3J,GACpB,IAAIkL,EAAoBlL,EAAEmL,UAAiC,MAArBnL,EAAEoL,KAAKjB,MAAM,EAAE,GAAa,KAAO,GACzE,OAAQnK,EAAEmL,UAAU,IAAMD,GAAqBlL,EAAEqL,MAAM,KAAOrL,EAAEsL,MAAM,IAAO,IAK/E,SAAS7K,EAAYqJ,GACnB,OAAOA,EAAKA,EAAGyB,QAAQC,EAAqB,IAAM,GAIpD,SAASxB,EAAW1J,EAAQwJ,GAE1B,OADAA,EAAKrJ,EAAYqJ,GACVtJ,EAAI5B,QAAQ0B,EAAQwJ,GAjO7B,IAAItJ,EAAMnH,EAAQ,OACdoN,EAAQpN,EAAQ,mBAChBmI,EAAOnI,EAAQ,UACfkQ,EAAelQ,EAAQ,gBACvBoS,EAAWpS,EAAQ,wBAEvBhB,EAAOD,QAAUwG,EAEjBA,EAAQ6B,YAAcA,EACtB7B,EAAQ8B,SAAWkJ,EACnBhL,EAAQ4B,IAAMwJ,EACdpL,EAAQ8M,IA2NR,SAAoBlR,GAClB,IAAImR,EAAWlL,EAAY9H,KAAKkR,OAAOrP,IACnCoR,GAAWC,GAAIF,GACfG,GAAaD,GAAIjC,EAAY+B,GAAU,IACvCxH,KACAzL,EAAOC,KAgCX,OA9BA8S,EAASjR,GAASuR,SAAS,GAAO,SAASvN,EAAKwN,EAASC,EAAYC,EAAeC,EAAe/D,EAAcgE,GAC/G,GAAgB,KAAZJ,EAAJ,CACA,IAAIlC,EAAKpR,EAAKmR,OAAOrL,GACjB8B,EAASsL,EAAQM,GACjBxL,EAAWoL,EAAUI,GAAiB,IAAMC,EAIhD,QAHiBrM,IAAbsM,IACF1L,GAAY,KAA0B,iBAAZ0L,EAAuBA,EAAW5K,EAAK6K,eAAeD,KAEjE,iBAANtC,EAAgB,CACzBA,EAAKxJ,EAASG,EAAYH,EAASE,EAAI5B,QAAQ0B,EAAQwJ,GAAMA,GAE7D,IAAIjE,EAASnN,EAAK2G,MAAMyK,GAExB,GADqB,iBAAVjE,IAAoBA,EAASnN,EAAK2G,MAAMwG,IAC/CA,GAAUA,EAAOrL,QACnB,IAAKiM,EAAMjI,EAAKqH,EAAOrL,QACrB,MAAM,IAAIjB,MAAM,OAASuQ,EAAK,2CAC3B,GAAIA,GAAMrJ,EAAYC,GAC3B,GAAa,KAAToJ,EAAG,GAAW,CAChB,GAAI3F,EAAU2F,KAAQrD,EAAMjI,EAAK2F,EAAU2F,IACzC,MAAM,IAAIvQ,MAAM,OAASuQ,EAAK,sCAChC3F,EAAU2F,GAAMtL,OAEhB9F,EAAK2G,MAAMyK,GAAMpJ,EAIvBkL,EAAQI,GAAW1L,EACnBwL,EAAUE,GAAWtL,KAGhByD,GA/PTvF,EAAQ0I,UAAYA,EACpB1I,EAAQpE,OAASiP,EAkGjB,IAAIc,EAAuB/I,EAAK8K,QAAQ,aAAc,oBAAqB,OAAQ,eAAgB,gBAmC/FtB,EAAiBxJ,EAAK8K,QACxB,OAAQ,SAAU,UAClB,YAAa,YACb,gBAAiB,gBACjB,WAAY,WACZ,UAAW,UACX,cAAe,aACf,WAAY,SAgEVd,EAAsB,UAqDvBe,eAAe,GAAGxI,SAAS,GAAGqF,kBAAkB,GAAGoD,uBAAuB,GAAGhM,IAAM,KAAKiM,GAAG,SAASpT,EAAQhB,EAAOD,GACtH,aAEA,IAAIsU,EAAcrT,EAAQ,YACtBiT,EAASjT,EAAQ,UAAUiT,OAE/BjU,EAAOD,QAAU,WACf,IAAIiN,IACAsH,KAAM,SACNC,QAAWhR,SAAY,sBACZC,SAAY,qBAAuB,aAAc,YAC5D8Q,KAAM,SACNC,OAAS,YAAa,YAAa,UAAW,YAC9CD,KAAM,QACNC,OAAS,WAAY,WAAY,cAAe,WAAY,WAC5DD,KAAM,SACNC,OAAS,gBAAiB,gBAAiB,WAAY,eAAgB,iBAC5DpQ,YAAe,uBAAwB,yBAClDoQ,OAAS,OAAQ,QAAS,OAAQ,MAAO,QAAS,QAAS,WAG3DC,GAAQ,QAoCZ,OA9BAxH,EAAMyH,IAAMR,EAAOO,GACnBxH,EAAM0H,MAAQT,GAFA,SAAU,UAAW,SAAU,QAAS,SAAU,UAAW,SAI3EjH,EAAM2H,QAAQ,SAAUC,GACtBA,EAAML,MAAQK,EAAML,MAAMM,IAAI,SAAUxE,GACtC,IAAIyE,EACJ,GAAsB,iBAAXzE,EAAqB,CAC9B,IAAInO,EAAMsG,OAAOuM,KAAK1E,GAAS,GAC/ByE,EAAezE,EAAQnO,GACvBmO,EAAUnO,EACV4S,EAAaH,QAAQ,SAAUK,GAC7BR,EAAIS,KAAKD,GACThI,EAAMyH,IAAIO,IAAK,IAGnBR,EAAIS,KAAK5E,GAMT,OALWrD,EAAMyH,IAAIpE,IACnBA,QAASA,EACTlP,KAAMkT,EAAYhE,GAClB6E,WAAYJ,KAKZF,EAAMN,OAAMtH,EAAM0H,MAAME,EAAMN,MAAQM,KAG5C5H,EAAM/K,SAAWgS,EAAOO,EAAIW,QA/B1B,kBAAmB,UAAW,MAAO,KAAM,QAC3C,cAAe,UAAW,iBA+B5BnI,EAAMoI,UAECpI,KAGNqI,WAAW,EAAE3J,SAAS,KAAK4J,IAAI,SAAStU,EAAQhB,EAAOD,GAC1D,aAEA,IAAIoJ,EAAOnI,EAAQ,UAEnBhB,EAAOD,QAEP,SAAsBwV,GACpBpM,EAAKC,KAAKmM,EAAKjV,SAGdoL,SAAS,KAAK8J,IAAI,SAASxU,EAAQhB,EAAOD,GAC7C,aAIAC,EAAOD,QAAU,SAAoBuJ,GAKnC,IAJA,IAGI3G,EAHArB,EAAS,EACTmU,EAAMnM,EAAIhI,OACVoU,EAAM,EAEHA,EAAMD,GACXnU,KACAqB,EAAQ2G,EAAIqM,WAAWD,OACV,OAAU/S,GAAS,OAAU+S,EAAMD,GAGtB,QAAX,OADb9S,EAAQ2G,EAAIqM,WAAWD,MACSA,IAGpC,OAAOpU,QAGHsU,IAAI,SAAS5U,EAAQhB,EAAOD,GAClC,aAqCA,SAAS8V,EAAcC,EAAUC,EAAMC,GACrC,IAAIC,EAAQD,EAAS,QAAU,QAC3BE,EAAMF,EAAS,OAAS,OACxBG,EAAKH,EAAS,IAAM,GACpBI,EAAMJ,EAAS,GAAK,IACxB,OAAQF,GACN,IAAK,OAAQ,OAAOC,EAAOE,EAAQ,OACnC,IAAK,QAAS,OAAOE,EAAK,iBAAmBJ,EAAO,IACpD,IAAK,SAAU,MAAO,IAAMI,EAAKJ,EAAOG,EAClB,UAAYH,EAAOE,EAAQ,WAAaC,EACxCE,EAAM,iBAAmBL,EAAO,KACtD,IAAK,UAAW,MAAO,WAAaA,EAAOE,EAAQ,WAAaC,EACzCE,EAAM,IAAML,EAAO,QACnBG,EAAMH,EAAOE,EAAQF,EAAO,IACnD,QAAS,MAAO,UAAYA,EAAOE,EAAQ,IAAMH,EAAW,KA6ChE,SAAS7B,EAAOpD,GAEd,IAAK,IADDgB,KACK5Q,EAAE,EAAGA,EAAE4P,EAAIvP,OAAQL,IAAK4Q,EAAKhB,EAAI5P,KAAM,EAChD,OAAO4Q,EAMT,SAASwE,EAAYnU,GACnB,MAAqB,iBAAPA,EACJ,IAAMA,EAAM,IACZoU,EAAWpM,KAAKhI,GACd,IAAMA,EACN,KAAOqU,EAAarU,GAAO,KAIzC,SAASqU,EAAajN,GACpB,OAAOA,EAAI4J,QAAQsD,EAAc,QACtBtD,QAAQ,MAAO,OACfA,QAAQ,MAAO,OACfA,QAAQ,MAAO,OACfA,QAAQ,MAAO,OAkE5B,SAASxD,EAAepG,GACtB,MAAO,IAAOiN,EAAajN,GAAO,IAyDpC,SAASmN,EAAW1V,EAAG2V,GACrB,MAAS,MAAL3V,EAAkB2V,GACd3V,EAAI,MAAQ2V,GAAGxD,QAAQ,UAAW,IAc5C,SAASyD,EAAkBrN,GACzB,OAAOA,EAAI4J,QAAQ,KAAM,MAAMA,QAAQ,MAAO,MAIhD,SAAS0D,EAAoBtN,GAC3B,OAAOA,EAAI4J,QAAQ,MAAO,KAAKA,QAAQ,MAAO,KAtQhDlT,EAAOD,SACLqJ,KA0BF,SAAcvI,EAAGgW,GACfA,EAAKA,MACL,IAAK,IAAI3U,KAAOrB,EAAGgW,EAAG3U,GAAOrB,EAAEqB,GAC/B,OAAO2U,GA5BPhB,cAAeA,EACfiB,eAkDF,SAAwBC,EAAWhB,GACjC,OAAQgB,EAAUzV,QAChB,KAAK,EAAG,OAAOuU,EAAckB,EAAU,GAAIhB,GAAM,GACjD,QACE,IAAI5U,EAAO,GACPuT,EAAQT,EAAO8C,GACfrC,EAAMsC,OAAStC,EAAMuC,SACvB9V,EAAOuT,EAAMwC,KAAO,IAAK,KAAOnB,EAAO,OACvC5U,GAAQ,UAAY4U,EAAO,wBACpBrB,EAAMwC,YACNxC,EAAMsC,aACNtC,EAAMuC,QAEXvC,EAAMyC,eAAezC,EAAM0C,QAC/B,IAAK,IAAI3W,KAAKiU,EACZvT,IAASA,EAAO,OAAS,IAAO0U,EAAcpV,EAAGsV,GAAM,GAEzD,OAAO5U,IAlEXkW,cAwEF,SAAuBC,EAAmBP,GACxC,GAAIxE,MAAMC,QAAQuE,GAAY,CAE5B,IAAK,IADDrC,KACKzT,EAAE,EAAGA,EAAE8V,EAAUzV,OAAQL,IAAK,CACrC,IAAIR,EAAIsW,EAAU9V,GACdsW,EAAgB9W,GAAIiU,EAAMA,EAAMpT,QAAUb,EACf,UAAtB6W,GAAuC,UAAN7W,IAAeiU,EAAMA,EAAMpT,QAAUb,GAEjF,GAAIiU,EAAMpT,OAAQ,OAAOoT,MACpB,CAAA,GAAI6C,EAAgBR,GACzB,OAAQA,GACH,GAA0B,UAAtBO,GAA+C,UAAdP,EAC1C,OAAQ,WAnFV9C,OAAQA,EACRoC,YAAaA,EACbE,aAAcA,EACdnI,MAAOpN,EAAQ,mBACfqN,WAAYrN,EAAQ,gBACpBwW,cA8GF,SAAuBlO,EAAKmO,GAC1BA,GAAW,SACX,IAAIlO,EAAUD,EAAIE,MAAM,IAAIW,OAAOsN,EAAS,MAC5C,OAAOlO,EAAUA,EAAQjI,OAAS,GAhHlCoW,WAoHF,SAAoBpO,EAAKmO,EAASE,GAGhC,OAFAF,GAAW,WACXE,EAAOA,EAAKzE,QAAQ,MAAO,QACpB5J,EAAI4J,QAAQ,IAAI/I,OAAOsN,EAAS,KAAME,EAAO,OAtHpDC,YA6HF,SAAqBC,GACnB,OAAOA,EAAI3E,QAAQ4E,EAAY,IACpB5E,QAAQ6E,EAAkB,IAC1B7E,QAAQ8E,EAAoB,eA/HvCC,iBA6IF,SAA0BJ,EAAKK,GAC7B,IAAI3O,EAAUsO,EAAIrO,MAAM2O,GAUxB,OATI5O,GAA6B,GAAlBA,EAAQjI,SACrBuW,EAAMK,EACEL,EAAI3E,QAAQkF,EAAqB,IAC7BlF,QAAQmF,EAAcC,GAC1BT,EAAI3E,QAAQqF,EAAe,IACvBrF,QAAQsF,EAAcC,KAGpClP,EAAUsO,EAAIrO,MAAMkP,KACe,IAAnBnP,EAAQjI,OACjBuW,EAAI3E,QAAQyF,EAAiB,IADSd,GAvJ7Ce,eA4JF,SAAwBzW,EAAQoS,GAC9B,GAAqB,kBAAVpS,EAAqB,OAAQA,EACxC,IAAK,IAAID,KAAOC,EAAQ,GAAIoS,EAAMrS,GAAM,OAAO,GA7J/C2W,qBAiKF,SAA8B1W,EAAQoS,EAAOuE,GAC3C,GAAqB,kBAAV3W,EAAqB,OAAQA,GAA2B,OAAjB2W,EAClD,IAAK,IAAI5W,KAAOC,EAAQ,GAAID,GAAO4W,GAAiBvE,EAAMrS,GAAM,OAAO,GAlKvEwN,eAAgBA,EAChBqJ,YA0KF,SAAqBC,EAAarB,EAAMsB,EAAcC,GAIpD,OAAOzC,EAAUuC,EAHNC,EACG,SAAatB,GAAQuB,EAAW,GAAK,8CACpCA,EAAW,SAAavB,EAAO,SAAa,YAAiBA,EAAO,cA5KnFwB,QAiLF,SAAiBH,EAAaI,EAAMH,GAIlC,OAAOxC,EAAUuC,EAFHtJ,EADHuJ,EACkB,IAAMtC,EAAkByC,GACxB/C,EAAY+C,MAnLzCC,QA0LF,SAAiBC,EAAOC,EAAKC,GAC3B,IAAIC,EAAIC,EAAa3D,EAAMxM,EAC3B,GAAc,KAAV+P,EAAc,MAAO,WACzB,GAAgB,KAAZA,EAAM,GAAW,CACnB,IAAK7O,EAAaP,KAAKoP,GAAQ,MAAM,IAAIpY,MAAM,yBAA2BoY,GAC1EI,EAAcJ,EACdvD,EAAO,eACF,CAEL,KADAxM,EAAU+P,EAAM9P,MAAMkB,IACR,MAAM,IAAIxJ,MAAM,yBAA2BoY,GAGzD,GAFAG,GAAMlQ,EAAQ,GAEK,MADnBmQ,EAAcnQ,EAAQ,IACE,CACtB,GAAIkQ,GAAMF,EAAK,MAAM,IAAIrY,MAAM,gCAAkCuY,EAAK,gCAAkCF,GACxG,OAAOC,EAAMD,EAAME,GAGrB,GAAIA,EAAKF,EAAK,MAAM,IAAIrY,MAAM,sBAAwBuY,EAAK,gCAAkCF,GAE7F,GADAxD,EAAO,QAAWwD,EAAME,GAAO,KAC1BC,EAAa,OAAO3D,EAK3B,IAAK,IAFD4B,EAAO5B,EACPhU,EAAW2X,EAAY1X,MAAM,KACxBf,EAAE,EAAGA,EAAEc,EAAST,OAAQL,IAAK,CACpC,IAAI0Y,EAAU5X,EAASd,GACnB0Y,IAEFhC,GAAQ,QADR5B,GAAQM,EAAYO,EAAoB+C,MAI5C,OAAOhC,GAxNP1F,iBAkOF,SAA0B3I,GACxB,OAAOsN,EAAoBgD,mBAAmBtQ,KAlO9CsN,oBAAqBA,EACrB5C,eAqOF,SAAwB1K,GACtB,OAAOuQ,mBAAmBlD,EAAkBrN,KArO5CqN,kBAAmBA,GAoDrB,IAAIY,EAAkBtD,GAAS,SAAU,SAAU,UAAW,UAAW,SAyBrEqC,EAAa,wBACbE,EAAe,QAiCfsB,EAAa,gBACbC,EAAmB,uCACnBC,EAAqB,8CAQrBG,EAAgB,eAChBI,EAAgB,kEAChBH,EAAsB,uCACtBI,EAAe,uBACfC,EAAc,uCACdJ,EAAe,gFACfC,EAAoB,eACpBI,EAAkB,qCAClBC,EAAkB,iDAmDlBlO,EAAe,sBACfC,EAAwB,qCA6DzBoP,eAAe,GAAG/I,kBAAkB,KAAKgJ,IAAI,SAAS/Y,EAAQhB,EAAOD,GACxE,aACAC,EAAOD,QAAU,SAAyBiQ,EAAIgK,EAAUC,GACtD,IAUEC,EAVErC,EAAM,IACNsC,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdlU,EAAU4J,EAAG7N,OAAO6X,GACpBO,EAAcvK,EAAGpD,WAAaoD,EAAG7G,KAAKkN,YAAY2D,GAClDQ,EAAiBxK,EAAGnD,cAAgB,IAAMmN,EAC1CS,GAAiBzK,EAAG3C,KAAKqN,UAEzBpB,EAAQ,QAAUe,GAAY,IAC9BM,EAAU3K,EAAG3C,KAAKiM,OAASlT,GAAWA,EAAQkT,MAE9CqB,GACF9C,GAAO,cAAgB,EAAS,MAAS7H,EAAG7G,KAAKkQ,QAAQjT,EAAQkT,MAAOe,EAAUrK,EAAG4K,aAAgB,KACrGV,EAAe,SAAWC,GAE1BD,EAAe9T,EAEjB,IAAIyU,EAAqB,WAAZb,EACXc,EAAoBD,EAAS,mBAAqB,mBAClDE,EAAc/K,EAAG7N,OAAO2Y,GAExBE,EAAMH,EAAS,IAAM,IACrBI,EAASJ,EAAS,IAAM,IACxBK,OAAgBzT,EAClB,GAJgBuI,EAAG3C,KAAKiM,OAASyB,GAAeA,EAAYzB,MAI3C,CACf,IAAI6B,EAAmBnL,EAAG7G,KAAKkQ,QAAQ0B,EAAYzB,MAAOe,EAAUrK,EAAG4K,aACrEQ,EAAa,YAAcjB,EAC3BkB,EAAY,WAAalB,EACzBmB,EAAgB,eAAiBnB,EAEjCoB,EAAS,QADTC,EAAU,KAAOrB,GACY,OAC/BtC,GAAO,kBAAoB,EAAS,MAAQ,EAAqB,KAEjEA,GAAO,QAAU,EAAe,SAAW,EAAc,cADzDsD,EAAmB,aAAehB,GAC2D,SAAW,EAAc,oBAAwB,EAAc,sBAA0B,EAAc,mBAChMe,EAAgBJ,GAChBW,EAAaA,OACNxG,KAAK4C,GAChBA,EAAM,IACkB,IAApB7H,EAAG0L,cACL7D,GAAO,iBAAoBqD,GAAiB,mBAAqB,oCAA0ClL,EAAY,UAAI,kBAAqBA,EAAG7G,KAAKuG,eAAe8K,GAAmB,kBACjK,IAArBxK,EAAG3C,KAAKsO,WACV9D,GAAO,gBAAmB,EAAsB,wBAE9C7H,EAAG3C,KAAKuO,UACV/D,GAAO,6BAA+B,EAAgB,mCAAsC7H,EAAa,WAAI,YAAc,EAAU,KAEvI6H,GAAO,OAEPA,GAAO,OAELgE,EAAQhE,EACZA,EAAM4D,EAAWK,MAGbjE,IAFC7H,EAAG+L,eAAiBtB,EACnBzK,EAAGkI,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCL,GAAO,gBACH8C,IACF9C,GAAO,KAAO,EAAiB,4BAA8B,EAAiB,qBAEhFA,GAAO,IAAM,EAAc,qBAAyB,EAAe,MAAQ,EAAiB,qBAAuB,EAAqB,IAAM,EAAQ,KAAO,EAAiB,OAAS,EAAU,IAAM,EAAW,KAAO,EAAqB,MAAQ,EAAU,IAAM,EAAW,IAAM,EAAiB,WAAa,EAAe,MAAQ,EAAqB,gBAAkB,EAAU,IAAM,EAAW,KAAO,EAAiB,MAAQ,EAAU,IAAM,EAAW,IAAM,EAAiB,SAAW,EAAU,QAAU,EAAU,aAAe,EAAS,MAAQ,EAAe,OAAU,EAAQ,QAAY,EAAQ,UACzlB,CAEH0D,EAASP,EACX,IAFIM,EAAsC,iBAAfP,IAENJ,EAAS,CACxBa,EAAU,IAAOD,EAAS,IAC9B1D,GAAO,SACH8C,IACF9C,GAAO,KAAO,EAAiB,4BAA8B,EAAiB,qBAEhFA,GAAO,MAAQ,EAAiB,qBAAuB,EAAgB,IAAM,EAAQ,KAAO,EAAiB,MAAQ,EAAU,IAAM,EAAW,KAAO,EAAgB,MAAQ,EAAU,IAAM,EAAW,IAAM,EAAiB,SAAW,EAAU,QAAU,EAAU,WACrQ,CACDyD,QAA6B7T,IAAZrB,GACnBgV,GAAa,EACbF,EAAgBJ,EAChBN,EAAiBxK,EAAGnD,cAAgB,IAAMiO,EAC1CZ,EAAea,EACfE,GAAU,MAENK,IAAepB,EAAe8B,KAAKnB,EAAS,MAAQ,OAAOE,EAAa3U,IACxE2U,MAAiBO,GAAgBpB,IACnCkB,GAAa,EACbF,EAAgBJ,EAChBN,EAAiBxK,EAAGnD,cAAgB,IAAMiO,EAC1CG,GAAU,MAEVG,GAAa,EACbG,GAAU,MAGd,IAAIC,EAAU,IAAOD,EAAS,IAC9B1D,GAAO,SACH8C,IACF9C,GAAO,KAAO,EAAiB,4BAA8B,EAAiB,qBAEhFA,GAAO,IAAM,EAAU,IAAM,EAAW,IAAM,EAAiB,OAAS,EAAU,QAAU,EAAU,QAG1GqD,EAAgBA,GAAiBlB,EACjC,IAAIyB,EAAaA,MACjBA,EAAWxG,KAAK4C,GAChBA,EAAM,IACkB,IAApB7H,EAAG0L,cACL7D,GAAO,iBAAoBqD,GAAiB,UAAY,oCAA0ClL,EAAY,UAAI,kBAAqBA,EAAG7G,KAAKuG,eAAe8K,GAAmB,4BAA8B,EAAY,YAAc,EAAiB,gBAAkB,EAAe,OAClQ,IAArBxK,EAAG3C,KAAKsO,WACV9D,GAAO,0BAA6B,EAAW,IAE7CA,GADE8C,EACK,OAAU,EAEL,EAAiB,KAG7B3K,EAAG3C,KAAKuO,UACV/D,GAAO,eAELA,GADE8C,EACK,kBAAoB,EAEpB,GAAK,EAEd9C,GAAO,2CAA8C7H,EAAa,WAAI,YAAc,EAAU,KAEhG6H,GAAO,OAEPA,GAAO,OAET,IAAIgE,EAAQhE,EAeZ,OAdAA,EAAM4D,EAAWK,MAGbjE,IAFC7H,EAAG+L,eAAiBtB,EACnBzK,EAAGkI,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCL,GAAO,MACH4C,IACF5C,GAAO,YAEFA,QAGHoE,IAAI,SAASjb,EAAQhB,EAAOD,GAClC,aACAC,EAAOD,QAAU,SAA8BiQ,EAAIgK,EAAUC,GAC3D,IAUEC,EAVErC,EAAM,IACNsC,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdlU,EAAU4J,EAAG7N,OAAO6X,GACpBO,EAAcvK,EAAGpD,WAAaoD,EAAG7G,KAAKkN,YAAY2D,GAClDQ,EAAiBxK,EAAGnD,cAAgB,IAAMmN,EAC1CS,GAAiBzK,EAAG3C,KAAKqN,UAEzBpB,EAAQ,QAAUe,GAAY,IAC9BM,EAAU3K,EAAG3C,KAAKiM,OAASlT,GAAWA,EAAQkT,MAE9CqB,GACF9C,GAAO,cAAgB,EAAS,MAAS7H,EAAG7G,KAAKkQ,QAAQjT,EAAQkT,MAAOe,EAAUrK,EAAG4K,aAAgB,KACrGV,EAAe,SAAWC,GAE1BD,EAAe9T,EAGjByR,GAAO,QACH8C,IACF9C,GAAO,KAAO,EAAiB,4BAA8B,EAAiB,qBAEhFA,GAAO,IAAM,EAAU,YALD,YAAZmC,EAAyB,IAAM,KAKG,IAAM,EAAiB,OACnE,IAAIkB,EAAgBlB,EAChByB,EAAaA,MACjBA,EAAWxG,KAAK4C,GAChBA,EAAM,IACkB,IAApB7H,EAAG0L,cACL7D,GAAO,iBAAoBqD,GAAiB,eAAiB,oCAA0ClL,EAAY,UAAI,kBAAqBA,EAAG7G,KAAKuG,eAAe8K,GAAmB,uBAAyB,EAAiB,OACvM,IAArBxK,EAAG3C,KAAKsO,WACV9D,GAAO,gCAELA,GADc,YAAZmC,EACK,OAEA,OAETnC,GAAO,SAELA,GADE8C,EACK,OAAU,EAAiB,OAE3B,GAAK,EAEd9C,GAAO,YAEL7H,EAAG3C,KAAKuO,UACV/D,GAAO,eAELA,GADE8C,EACK,kBAAoB,EAEpB,GAAK,EAEd9C,GAAO,2CAA8C7H,EAAa,WAAI,YAAc,EAAU,KAEhG6H,GAAO,OAEPA,GAAO,OAET,IAAIgE,EAAQhE,EAeZ,OAdAA,EAAM4D,EAAWK,MAGbjE,IAFC7H,EAAG+L,eAAiBtB,EACnBzK,EAAGkI,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCL,GAAO,KACH4C,IACF5C,GAAO,YAEFA,QAGHqE,IAAI,SAASlb,EAAQhB,EAAOD,GAClC,aACAC,EAAOD,QAAU,SAA+BiQ,EAAIgK,EAAUC,GAC5D,IAUEC,EAVErC,EAAM,IACNsC,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdlU,EAAU4J,EAAG7N,OAAO6X,GACpBO,EAAcvK,EAAGpD,WAAaoD,EAAG7G,KAAKkN,YAAY2D,GAClDQ,EAAiBxK,EAAGnD,cAAgB,IAAMmN,EAC1CS,GAAiBzK,EAAG3C,KAAKqN,UAEzBpB,EAAQ,QAAUe,GAAY,IAC9BM,EAAU3K,EAAG3C,KAAKiM,OAASlT,GAAWA,EAAQkT,MAE9CqB,GACF9C,GAAO,cAAgB,EAAS,MAAS7H,EAAG7G,KAAKkQ,QAAQjT,EAAQkT,MAAOe,EAAUrK,EAAG4K,aAAgB,KACrGV,EAAe,SAAWC,GAE1BD,EAAe9T,EAGjByR,GAAO,QACH8C,IACF9C,GAAO,KAAO,EAAiB,4BAA8B,EAAiB,qBAG9EA,IADsB,IAApB7H,EAAG3C,KAAK8O,QACH,IAAM,EAAU,WAEhB,eAAiB,EAAU,KAEpCtE,GAAO,KAVe,aAAZmC,EAA0B,IAAM,KAUrB,IAAM,EAAiB,OAC5C,IAAIkB,EAAgBlB,EAChByB,EAAaA,MACjBA,EAAWxG,KAAK4C,GAChBA,EAAM,IACkB,IAApB7H,EAAG0L,cACL7D,GAAO,iBAAoBqD,GAAiB,gBAAkB,oCAA0ClL,EAAY,UAAI,kBAAqBA,EAAG7G,KAAKuG,eAAe8K,GAAmB,uBAAyB,EAAiB,OACxM,IAArBxK,EAAG3C,KAAKsO,WACV9D,GAAO,8BAELA,GADc,aAAZmC,EACK,SAEA,UAETnC,GAAO,SAELA,GADE8C,EACK,OAAU,EAAiB,OAE3B,GAAK,EAEd9C,GAAO,iBAEL7H,EAAG3C,KAAKuO,UACV/D,GAAO,eAELA,GADE8C,EACK,kBAAoB,EAEpB,GAAK,EAEd9C,GAAO,2CAA8C7H,EAAa,WAAI,YAAc,EAAU,KAEhG6H,GAAO,OAEPA,GAAO,OAET,IAAIgE,EAAQhE,EAeZ,OAdAA,EAAM4D,EAAWK,MAGbjE,IAFC7H,EAAG+L,eAAiBtB,EACnBzK,EAAGkI,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCL,GAAO,KACH4C,IACF5C,GAAO,YAEFA,QAGHuE,IAAI,SAASpb,EAAQhB,EAAOD,GAClC,aACAC,EAAOD,QAAU,SAAmCiQ,EAAIgK,EAAUC,GAChE,IAUEC,EAVErC,EAAM,IACNsC,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdlU,EAAU4J,EAAG7N,OAAO6X,GACpBO,EAAcvK,EAAGpD,WAAaoD,EAAG7G,KAAKkN,YAAY2D,GAClDQ,EAAiBxK,EAAGnD,cAAgB,IAAMmN,EAC1CS,GAAiBzK,EAAG3C,KAAKqN,UAEzBpB,EAAQ,QAAUe,GAAY,IAC9BM,EAAU3K,EAAG3C,KAAKiM,OAASlT,GAAWA,EAAQkT,MAE9CqB,GACF9C,GAAO,cAAgB,EAAS,MAAS7H,EAAG7G,KAAKkQ,QAAQjT,EAAQkT,MAAOe,EAAUrK,EAAG4K,aAAgB,KACrGV,EAAe,SAAWC,GAE1BD,EAAe9T,EAGjByR,GAAO,QACH8C,IACF9C,GAAO,KAAO,EAAiB,4BAA8B,EAAiB,qBAEhFA,GAAO,gBAAkB,EAAU,aALb,iBAAZmC,EAA8B,IAAM,KAKW,IAAM,EAAiB,OAChF,IAAIkB,EAAgBlB,EAChByB,EAAaA,MACjBA,EAAWxG,KAAK4C,GAChBA,EAAM,IACkB,IAApB7H,EAAG0L,cACL7D,GAAO,iBAAoBqD,GAAiB,oBAAsB,oCAA0ClL,EAAY,UAAI,kBAAqBA,EAAG7G,KAAKuG,eAAe8K,GAAmB,uBAAyB,EAAiB,OAC5M,IAArBxK,EAAG3C,KAAKsO,WACV9D,GAAO,gCAELA,GADc,iBAAZmC,EACK,OAEA,OAETnC,GAAO,SAELA,GADE8C,EACK,OAAU,EAAiB,OAE3B,GAAK,EAEd9C,GAAO,iBAEL7H,EAAG3C,KAAKuO,UACV/D,GAAO,eAELA,GADE8C,EACK,kBAAoB,EAEpB,GAAK,EAEd9C,GAAO,2CAA8C7H,EAAa,WAAI,YAAc,EAAU,KAEhG6H,GAAO,OAEPA,GAAO,OAET,IAAIgE,EAAQhE,EAeZ,OAdAA,EAAM4D,EAAWK,MAGbjE,IAFC7H,EAAG+L,eAAiBtB,EACnBzK,EAAGkI,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCL,GAAO,KACH4C,IACF5C,GAAO,YAEFA,QAGHwE,IAAI,SAASrb,EAAQhB,EAAOD,GAClC,aACAC,EAAOD,QAAU,SAAwBiQ,EAAIgK,EAAUC,GACrD,IAAIpC,EAAM,IACNzR,EAAU4J,EAAG7N,OAAO6X,GACpBO,EAAcvK,EAAGpD,WAAaoD,EAAG7G,KAAKkN,YAAY2D,GAClDQ,EAAiBxK,EAAGnD,cAAgB,IAAMmN,EAC1CS,GAAiBzK,EAAG3C,KAAKqN,UACzB4B,EAAMtM,EAAG7G,KAAKC,KAAK4G,GACnBuM,EAAiB,GACrBD,EAAIlC,QACJ,IAAIoC,EAAa,QAAUF,EAAIlC,MAC3BqC,EAAiBH,EAAIrU,OACvByU,GAAmB,EACjBC,EAAOvW,EACX,GAAIuW,EAGF,IAFA,IAAIC,EAAMC,GAAM,EACdC,EAAKH,EAAKrb,OAAS,EACdub,EAAKC,GACVF,EAAOD,EAAKE,GAAM,GACd7M,EAAG7G,KAAKyP,eAAegE,EAAM5M,EAAGhD,MAAMyH,OACxCiI,GAAmB,EACnBJ,EAAIna,OAASya,EACbN,EAAI1P,WAAa2N,EAAc,IAAMsC,EAAK,IAC1CP,EAAIzP,cAAgB2N,EAAiB,IAAMqC,EAC3ChF,GAAO,KAAQ7H,EAAGzL,SAAS+X,GAAQ,IACnCA,EAAIrU,OAASwU,EACThC,IACF5C,GAAO,QAAU,EAAe,OAChC0E,GAAkB,MAa1B,OARI9B,IAEA5C,GADE6E,EACK,gBAEA,IAAOH,EAAezK,MAAM,GAAI,GAAM,KAGjD+F,EAAM7H,EAAG7G,KAAKyO,YAAYC,SAItBkF,IAAI,SAAS/b,EAAQhB,EAAOD,GAClC,aACAC,EAAOD,QAAU,SAAwBiQ,EAAIgK,EAAUC,GACrD,IAAIpC,EAAM,IACNsC,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdlU,EAAU4J,EAAG7N,OAAO6X,GACpBO,EAAcvK,EAAGpD,WAAaoD,EAAG7G,KAAKkN,YAAY2D,GAClDQ,EAAiBxK,EAAGnD,cAAgB,IAAMmN,EAC1CS,GAAiBzK,EAAG3C,KAAKqN,UACzBpB,EAAQ,QAAUe,GAAY,IAC9B2C,EAAS,QAAU7C,EACnB8C,EAAQ,SAAW9C,EACnBmC,EAAMtM,EAAG7G,KAAKC,KAAK4G,GACnBuM,EAAiB,GACrBD,EAAIlC,QACJ,IAAIoC,EAAa,QAAUF,EAAIlC,MAI/B,GAHqBhU,EAAQ8W,MAAM,SAASN,GAC1C,OAAO5M,EAAG7G,KAAKyP,eAAegE,EAAM5M,EAAGhD,MAAMyH,OAE3B,CAClB,IAAIgI,EAAiBH,EAAIrU,OACzB4P,GAAO,QAAU,EAAU,kBAAoB,EAAW,cAC1D,IAAIsF,EAAgBnN,EAAG+L,cACvB/L,EAAG+L,cAAgBO,EAAIP,eAAgB,EACvC,IAAIY,EAAOvW,EACX,GAAIuW,EAGF,IAFA,IAAIC,EAAMC,GAAM,EACdC,EAAKH,EAAKrb,OAAS,EACdub,EAAKC,GACVF,EAAOD,EAAKE,GAAM,GAClBP,EAAIna,OAASya,EACbN,EAAI1P,WAAa2N,EAAc,IAAMsC,EAAK,IAC1CP,EAAIzP,cAAgB2N,EAAiB,IAAMqC,EAC3ChF,GAAO,KAAQ7H,EAAGzL,SAAS+X,GAAQ,IACnCA,EAAIrU,OAASwU,EACb5E,GAAO,IAAM,EAAW,MAAQ,EAAW,OAAS,EAAe,UAAY,EAAW,OAC1F0E,GAAkB,IAGtBvM,EAAG+L,cAAgBO,EAAIP,cAAgBoB,EACvCtF,GAAO,IAAM,EAAmB,SAAW,EAAW,sBAC9B,IAApB7H,EAAG0L,cACL7D,GAAO,sDAAyE7H,EAAY,UAAI,kBAAqBA,EAAG7G,KAAKuG,eAAe8K,GAAmB,kBACtI,IAArBxK,EAAG3C,KAAKsO,WACV9D,GAAO,oDAEL7H,EAAG3C,KAAKuO,UACV/D,GAAO,6BAA+B,EAAgB,mCAAsC7H,EAAa,WAAI,YAAc,EAAU,KAEvI6H,GAAO,OAEPA,GAAO,OAETA,GAAO,gFACF7H,EAAG+L,eAAiBtB,IAErB5C,GADE7H,EAAGkI,MACE,wCAEA,8CAGXL,GAAO,uBAAyB,EAAU,iCAAmC,EAAU,sBAAwB,EAAU,4BACrH7H,EAAG3C,KAAKqN,YACV7C,GAAO,OAETA,EAAM7H,EAAG7G,KAAKyO,YAAYC,QAEtB4C,IACF5C,GAAO,iBAGX,OAAOA,QAGHuF,IAAI,SAASpc,EAAQhB,EAAOD,GAClC,aACAC,EAAOD,QAAU,SAAwBiQ,EAAIgK,EAAUC,GACrD,IAAIpC,EAAM,IACNsC,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdlU,EAAU4J,EAAG7N,OAAO6X,GACpBO,EAAcvK,EAAGpD,WAAaoD,EAAG7G,KAAKkN,YAAY2D,GAClDQ,EAAiBxK,EAAGnD,cAAgB,IAAMmN,EAC1CS,GAAiBzK,EAAG3C,KAAKqN,UACzBpB,EAAQ,QAAUe,GAAY,IAC9B2C,EAAS,QAAU7C,EACnBQ,EAAU3K,EAAG3C,KAAKiM,OAASlT,GAAWA,EAAQkT,MAE9CqB,IACF9C,GAAO,cAAgB,EAAS,MAAS7H,EAAG7G,KAAKkQ,QAAQjT,EAAQkT,MAAOe,EAAUrK,EAAG4K,aAAgB,MAKlGD,IACH9C,GAAO,cAAgB,EAAS,qBAAuB,EAAgB,KAEzEA,GAAO,OAAS,EAAW,YAAc,EAAU,WAAa,EAAS,WAAa,EAAW,SACjG,IAAI4D,EAAaA,MACjBA,EAAWxG,KAAK4C,GAChBA,EAAM,IACkB,IAApB7H,EAAG0L,cACL7D,GAAO,sDAAyE7H,EAAY,UAAI,kBAAqBA,EAAG7G,KAAKuG,eAAe8K,GAAmB,kBACtI,IAArBxK,EAAG3C,KAAKsO,WACV9D,GAAO,8CAEL7H,EAAG3C,KAAKuO,UACV/D,GAAO,6BAA+B,EAAgB,mCAAsC7H,EAAa,WAAI,YAAc,EAAU,KAEvI6H,GAAO,OAEPA,GAAO,OAET,IAAIgE,EAAQhE,EAeZ,OAdAA,EAAM4D,EAAWK,MAGbjE,IAFC7H,EAAG+L,eAAiBtB,EACnBzK,EAAGkI,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCL,GAAO,KACH4C,IACF5C,GAAO,YAEFA,QAGHwF,IAAI,SAASrc,EAAQhB,EAAOD,GAClC,aACAC,EAAOD,QAAU,SAA2BiQ,EAAIgK,EAAUC,GACxD,IAAIpC,EAAM,IACNsC,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdlU,EAAU4J,EAAG7N,OAAO6X,GACpBO,EAAcvK,EAAGpD,WAAaoD,EAAG7G,KAAKkN,YAAY2D,GAClDQ,EAAiBxK,EAAGnD,cAAgB,IAAMmN,EAC1CS,GAAiBzK,EAAG3C,KAAKqN,UACzBpB,EAAQ,QAAUe,GAAY,IAC9B2C,EAAS,QAAU7C,EACnB8C,EAAQ,SAAW9C,EACnBmC,EAAMtM,EAAG7G,KAAKC,KAAK4G,GAEvBsM,EAAIlC,QACJ,IAAIoC,EAAa,QAAUF,EAAIlC,MAC3BkD,EAAO,IAAMnD,EACfoD,EAAWjB,EAAIhC,UAAYtK,EAAGsK,UAAY,EAC1CkD,EAAY,OAASD,EACrBd,EAAiBzM,EAAG/H,OACpBwV,EAAkBzN,EAAG7G,KAAKyP,eAAexS,EAAS4J,EAAGhD,MAAMyH,KAE7D,GADAoD,GAAO,OAAS,EAAU,iBAAmB,EAAW,IACpD4F,EAAiB,CACnB,IAAIN,EAAgBnN,EAAG+L,cACvB/L,EAAG+L,cAAgBO,EAAIP,eAAgB,EACvCO,EAAIna,OAASiE,EACbkW,EAAI1P,WAAa2N,EACjB+B,EAAIzP,cAAgB2N,EACpB3C,GAAO,QAAU,EAAe,sBAAwB,EAAS,SAAW,EAAS,MAAQ,EAAU,YAAc,EAAS,SAC9HyE,EAAIxP,UAAYkD,EAAG7G,KAAK4P,YAAY/I,EAAGlD,UAAWwQ,EAAMtN,EAAG3C,KAAK4L,cAAc,GAC9E,IAAIyE,EAAYpE,EAAQ,IAAMgE,EAAO,IACrChB,EAAI1B,YAAY2C,GAAYD,EAC5B,IAAIK,EAAQ3N,EAAGzL,SAAS+X,GACxBA,EAAIrU,OAASwU,EACTzM,EAAG7G,KAAKqO,cAAcmG,EAAOH,GAAa,EAC5C3F,GAAO,IAAO7H,EAAG7G,KAAKuO,WAAWiG,EAAOH,EAAWE,GAAc,IAEjE7F,GAAO,QAAU,EAAc,MAAQ,EAAc,KAAO,EAAU,IAExEA,GAAO,QAAU,EAAe,eAChC7H,EAAG+L,cAAgBO,EAAIP,cAAgBoB,EACvCtF,GAAO,UAAoC,EAAe,WAE1DA,GAAO,QAAU,EAAU,kBAE7B,IAAI4D,EAAaA,MACjBA,EAAWxG,KAAK4C,GAChBA,EAAM,IACkB,IAApB7H,EAAG0L,cACL7D,GAAO,yDAA4E7H,EAAY,UAAI,kBAAqBA,EAAG7G,KAAKuG,eAAe8K,GAAmB,kBACzI,IAArBxK,EAAG3C,KAAKsO,WACV9D,GAAO,8CAEL7H,EAAG3C,KAAKuO,UACV/D,GAAO,6BAA+B,EAAgB,mCAAsC7H,EAAa,WAAI,YAAc,EAAU,KAEvI6H,GAAO,OAEPA,GAAO,OAET,IAAIgE,EAAQhE,EAmBZ,OAlBAA,EAAM4D,EAAWK,MAGbjE,IAFC7H,EAAG+L,eAAiBtB,EACnBzK,EAAGkI,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCL,GAAO,aACH4F,IACF5F,GAAO,cAAgB,EAAU,iCAAmC,EAAU,sBAAwB,EAAU,6BAE9G7H,EAAG3C,KAAKqN,YACV7C,GAAO,OAETA,EAAM7H,EAAG7G,KAAKyO,YAAYC,SAItB+F,IAAI,SAAS5c,EAAQhB,EAAOD,GAClC,aACAC,EAAOD,QAAU,SAAyBiQ,EAAIgK,EAAUC,GACtD,IAOIiB,EAKFhB,EAZErC,EAAM,IACNsC,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdlU,EAAU4J,EAAG7N,OAAO6X,GACpBO,EAAcvK,EAAGpD,WAAaoD,EAAG7G,KAAKkN,YAAY2D,GAClDQ,EAAiBxK,EAAGnD,cAAgB,IAAMmN,EAC1CS,GAAiBzK,EAAG3C,KAAKqN,UAEzBpB,EAAQ,QAAUe,GAAY,IAC9B2C,EAAS,QAAU7C,EACnB8C,EAAQ,SAAW9C,EACnBQ,EAAU3K,EAAG3C,KAAKiM,OAASlT,GAAWA,EAAQkT,MAE9CqB,GACF9C,GAAO,cAAgB,EAAS,MAAS7H,EAAG7G,KAAKkQ,QAAQjT,EAAQkT,MAAOe,EAAUrK,EAAG4K,aAAgB,KACrGV,EAAe,SAAWC,GAE1BD,EAAe9T,EAEjB,IAIIyX,EAAUC,EAASC,EAAQC,EAAeC,EAH5CC,EAAc,aAAe/D,EAC7BgE,EAFU7d,KAEI4P,WACdqM,EAAiB,GAEnB,GAAI5B,GAAWwD,EAAM7E,MAAO,CAE1B,IAAI8E,EAAkBD,EAAMlO,eAC5B4H,GAAO,QAAU,EAAgB,oBAAuB,EAAa,uBAFrEoG,EAAgB,kBAAoB9D,GAE4E,MAAQ,EAAgB,iBACnI,CAEL,KADA6D,EAAgBhO,EAAG5C,cAVT9M,KAU8B8F,EAAS4J,EAAG7N,OAAQ6N,IACxC,OACpBkK,EAAe,kBAAoBK,EACnC0D,EAAgBD,EAAc7c,KAC9B0c,EAAWM,EAAMvS,QACjBkS,EAAUK,EAAM7O,OAChByO,EAASI,EAAM/N,MAEjB,IAAIiO,EAAYJ,EAAgB,UAC9BpB,EAAK,IAAM1C,EACXmE,EAAW,UAAYnE,EACvBoE,EAAgBJ,EAAMjG,MACxB,GAAIqG,IAAkBvO,EAAGkI,MAAO,MAAM,IAAIhX,MAAM,gCAahD,GAZM4c,GAAWC,IACflG,GAAY,EAAc,YAE5BA,GAAO,OAAS,EAAU,iBAAmB,EAAW,IACpD8C,GAAWwD,EAAM7E,QACnBiD,GAAkB,IAClB1E,GAAO,QAAU,EAAiB,qBAAuB,EAAW,qBAChEuG,IACF7B,GAAkB,IAClB1E,GAAO,IAAM,EAAW,MAAQ,EAAgB,mBAAqB,EAAiB,UAAY,EAAW,SAG7GiG,EAEAjG,GADEsG,EAAMK,WACD,IAAOR,EAAsB,SAAI,IAEjC,IAAM,EAAW,MAASA,EAAsB,SAAI,UAExD,GAAID,EAAQ,CACjB,IAAIzB,EAAMtM,EAAG7G,KAAKC,KAAK4G,GACnBuM,EAAiB,GACrBD,EAAIlC,QACJ,IAAIoC,EAAa,QAAUF,EAAIlC,MAC/BkC,EAAIna,OAAS6b,EAAczZ,SAC3B+X,EAAI1P,WAAa,GACjB,IAAIuQ,EAAgBnN,EAAG+L,cACvB/L,EAAG+L,cAAgBO,EAAIP,eAAgB,EACvC,IAAI4B,EAAQ3N,EAAGzL,SAAS+X,GAAKpJ,QAAQ,oBAAqB+K,GAC1DjO,EAAG+L,cAAgBO,EAAIP,cAAgBoB,EACvCtF,GAAO,IAAM,MACR,EACD4D,EAAaA,OACNxG,KAAK4C,GAChBA,EAAM,GACNA,GAAO,KAAO,EAAkB,UAE9BA,GADE7H,EAAG3C,KAAKoR,YACH,OAEA,OAGP5G,GADEgG,IAA6B,IAAjBM,EAAMhc,OACb,MAAQ,EAAU,IAElB,MAAQ,EAAiB,MAAQ,EAAU,qBAAwB6N,EAAa,WAAI,IAE7F6H,GAAO,sBACa,MAAhB7H,EAAGlD,YACL+K,GAAO,MAAS7H,EAAY,WAE9B,IAAI0O,EAAcrE,EAAW,QAAWA,EAAW,GAAM,IAAM,aAC7DsE,EAAsBtE,EAAWrK,EAAG4K,YAAYP,GAAY,qBAE1DuE,EADJ/G,GAAO,MAAQ,EAAgB,MAAQ,EAAwB,kBAE/DA,EAAM4D,EAAWK,OACI,IAAjBqC,EAAMvV,QACRiP,GAAO,IAAM,EAAW,MACpB0G,IACF1G,GAAO,GAAM7H,EAAa,YAE5B6H,GAAY,EAAyB,MAInCA,GAFE0G,EAEK,SADPF,EAAY,eAAiBlE,GACE,kBAAoB,EAAW,MAASnK,EAAa,WAAI,EAAyB,mBAAqB,EAAW,+CAAiD,EAAc,gCAEzM,IAAM,EAAc,YAAc,EAAW,MAAQ,EAAyB,KAQ3F,GAJImO,EAAMU,YACRhH,GAAO,QAAU,EAAgB,KAAO,EAAU,MAAQ,EAAgB,IAAM,EAAwB,MAE1GA,GAAO,GAAK,EACRsG,EAAMW,MACJrE,IACF5C,GAAO,qBAEJ,CACLA,GAAO,cACapQ,IAAhB0W,EAAMW,OACRjH,GAAO,KAELA,GADEkG,EACK,GAAK,EAEL,GAAK,GAGdlG,GAAO,KAAQsG,EAAMW,MAAS,IAEhCjH,GAAO,OACPqD,EAjHU5a,KAiHY+P,QAClBoL,EAAaA,MACjBA,EAAWxG,KAAK4C,GAChBA,EAAM,GACN,IAAI4D,GAAAA,EAAaA,OACNxG,KAAK4C,GAChBA,EAAM,IACkB,IAApB7H,EAAG0L,cACL7D,GAAO,iBAAoBqD,GAAiB,UAAY,oCAA0ClL,EAAY,UAAI,kBAAqBA,EAAG7G,KAAKuG,eAAe8K,GAAmB,0BAzHzKla,KAyHoN,QAAI,QACvM,IAArB0P,EAAG3C,KAAKsO,WACV9D,GAAO,8BA3HDvX,KA2H+C,QAAI,2BAEvD0P,EAAG3C,KAAKuO,UACV/D,GAAO,6BAA+B,EAAgB,mCAAsC7H,EAAa,WAAI,YAAc,EAAU,KAEvI6H,GAAO,OAEPA,GAAO,OAET,IAAIgE,EAAQhE,EACZA,EAAM4D,EAAWK,MAUjB,IAAIiD,EAPAlH,IAFC7H,EAAG+L,eAAiBtB,EACnBzK,EAAGkI,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAGnCL,EAAM4D,EAAWK,MACbgC,EACEK,EAAMvV,OACY,QAAhBuV,EAAMvV,SACRiP,GAAO,cAAgB,EAAO,IAAM,EAAU,KAAO,EAAO,YAAc,EAAO,aAAe,EAAa,cAAgB,EAAO,UAAY,EAAa,4BAA8B,EAAa,kCAAuC7H,EAAY,UAAI,SAAW,EAAa,gCAAkC,EAAa,kBAAoB,EAAmB,QACzWA,EAAG3C,KAAKuO,UACV/D,GAAO,IAAM,EAAa,aAAe,EAAiB,KAAO,EAAa,WAAa,EAAU,MAEvGA,GAAO,QAGY,IAAjBsG,EAAMvV,OACRiP,GAAO,IAAM,EAAoB,KAEjCA,GAAO,QAAU,EAAU,iBAAmB,EAAoB,uBAAyB,EAAO,IAAM,EAAU,KAAO,EAAO,YAAc,EAAO,aAAe,EAAa,cAAgB,EAAO,UAAY,EAAa,4BAA8B,EAAa,kCAAuC7H,EAAY,UAAI,SAAW,EAAa,gCAAkC,EAAa,kBAAoB,EAAmB,QAC7aA,EAAG3C,KAAKuO,UACV/D,GAAO,IAAM,EAAa,aAAe,EAAiB,KAAO,EAAa,WAAa,EAAU,MAEvGA,GAAO,SAGFkG,GACTlG,GAAO,mBACiB,IAApB7H,EAAG0L,cACL7D,GAAO,iBAAoBqD,GAAiB,UAAY,oCAA0ClL,EAAY,UAAI,kBAAqBA,EAAG7G,KAAKuG,eAAe8K,GAAmB,0BAxK3Kla,KAwKsN,QAAI,QACvM,IAArB0P,EAAG3C,KAAKsO,WACV9D,GAAO,8BA1KHvX,KA0KiD,QAAI,2BAEvD0P,EAAG3C,KAAKuO,UACV/D,GAAO,6BAA+B,EAAgB,mCAAsC7H,EAAa,WAAI,YAAc,EAAU,KAEvI6H,GAAO,OAEPA,GAAO,OAETA,GAAO,gFACF7H,EAAG+L,eAAiBtB,IAErB5C,GADE7H,EAAGkI,MACE,wCAEA,gDAIU,IAAjBiG,EAAMvV,OACRiP,GAAO,IAAM,EAAoB,KAEjCA,GAAO,sBAAwB,EAAc,wCAA0C,EAAc,mCAAqC,EAAc,yCAA2C,EAAO,IAAM,EAAU,KAAO,EAAO,YAAc,EAAO,aAAe,EAAa,cAAgB,EAAO,UAAY,EAAa,4BAA8B,EAAa,kCAAuC7H,EAAY,UAAI,MAAQ,EAAa,kBAAoB,EAAmB,OACneA,EAAG3C,KAAKuO,UACV/D,GAAO,IAAM,EAAa,aAAe,EAAiB,KAAO,EAAa,WAAa,EAAU,MAEvGA,GAAO,eAAiB,EAAoB,OAGhDA,GAAO,MACH4C,IACF5C,GAAO,YAGX,OAAOA,QAGHmH,IAAI,SAAShe,EAAQhB,EAAOD,GAClC,aACAC,EAAOD,QAAU,SAA+BiQ,EAAIgK,EAAUC,GAC5D,IAAIpC,EAAM,IACNsC,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdlU,EAAU4J,EAAG7N,OAAO6X,GACpBO,EAAcvK,EAAGpD,WAAaoD,EAAG7G,KAAKkN,YAAY2D,GAClDQ,EAAiBxK,EAAGnD,cAAgB,IAAMmN,EAC1CS,GAAiBzK,EAAG3C,KAAKqN,UACzBpB,EAAQ,QAAUe,GAAY,IAC9B4C,EAAQ,SAAW9C,EACnBmC,EAAMtM,EAAG7G,KAAKC,KAAK4G,GACnBuM,EAAiB,GACrBD,EAAIlC,QACJ,IAAIoC,EAAa,QAAUF,EAAIlC,MAC3B6E,KACFC,KACAC,EAAiBnP,EAAG3C,KAAK+R,cAC3B,IAAKC,KAAajZ,EAAS,CACzB,IAAIwW,EAAOxW,EAAQiZ,GACfC,EAAQ/M,MAAMC,QAAQoK,GAAQsC,EAAgBD,EAClDK,EAAMD,GAAazC,EAErB/E,GAAO,OAAS,EAAU,aAC1B,IAAI0H,EAAoBvP,EAAGlD,UAC3B+K,GAAO,cAAgB,EAAS,IAChC,IAAK,IAAIwH,KAAaH,EAEpB,IADAI,EAAQJ,EAAcG,IACZ/d,OAAQ,CAKhB,GAJAuW,GAAO,SAAW,EAAW7H,EAAG7G,KAAKkN,YAAYgJ,GAAc,kBAC3DF,IACFtH,GAAO,4CAA8C,EAAU,MAAU7H,EAAG7G,KAAKoN,aAAa8I,GAAc,OAE1G5E,EAAe,CACjB5C,GAAO,SACP,IAAI8E,EAAO2C,EACX,GAAI3C,EAGF,IAFA,IAAkBE,GAAM,EACtBC,EAAKH,EAAKrb,OAAS,EACdub,EAAKC,GAAI,CACd0C,EAAe7C,EAAKE,GAAM,GACtBA,IACFhF,GAAO,QAITA,GAAO,SADL4H,EAAWnG,GADToG,EAAQ1P,EAAG7G,KAAKkN,YAAYmJ,KAEF,kBAC1BL,IACFtH,GAAO,8CAAgD,EAAU,MAAU7H,EAAG7G,KAAKoN,aAAaiJ,GAAiB,OAEnH3H,GAAO,gBAAkB,EAAS,MAAS7H,EAAG7G,KAAKuG,eAAeM,EAAG3C,KAAK4L,aAAeuG,EAAeE,GAAU,OAGtH7H,GAAO,SACP,IAAI8H,EAAgB,UAAYxF,EAC9ByF,EAAmB,OAAUD,EAAgB,OAC3C3P,EAAG3C,KAAKwS,yBACV7P,EAAGlD,UAAYkD,EAAG3C,KAAK4L,aAAejJ,EAAG7G,KAAK4P,YAAYwG,EAAmBI,GAAe,GAAQJ,EAAoB,MAAQI,GAElI,IAAIlE,EAAaA,MACjBA,EAAWxG,KAAK4C,GAChBA,EAAM,IACkB,IAApB7H,EAAG0L,cACL7D,GAAO,6DAAgF7H,EAAY,UAAI,kBAAqBA,EAAG7G,KAAKuG,eAAe8K,GAAmB,2BAA+BxK,EAAG7G,KAAKoN,aAAa8I,GAAc,wBAA4B,EAAqB,iBAAqBC,EAAY,OAAI,YAAgBtP,EAAG7G,KAAKoN,aAA6B,GAAhB+I,EAAMhe,OAAcge,EAAM,GAAKA,EAAMQ,KAAK,OAAU,QAC9X,IAArB9P,EAAG3C,KAAKsO,WACV9D,GAAO,4BAELA,GADkB,GAAhByH,EAAMhe,OACD,YAAe0O,EAAG7G,KAAKoN,aAAa+I,EAAM,IAE1C,cAAiBtP,EAAG7G,KAAKoN,aAAa+I,EAAMQ,KAAK,OAE1DjI,GAAO,kBAAqB7H,EAAG7G,KAAKoN,aAAa8I,GAAc,iBAE7DrP,EAAG3C,KAAKuO,UACV/D,GAAO,6BAA+B,EAAgB,mCAAsC7H,EAAa,WAAI,YAAc,EAAU,KAEvI6H,GAAO,OAEPA,GAAO,OAET,IAAIgE,EAAQhE,EACZA,EAAM4D,EAAWK,MAGbjE,IAFC7H,EAAG+L,eAAiBtB,EACnBzK,EAAGkI,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,mFAE9B,CACLL,GAAO,QACP,IAAIkI,EAAOT,EACX,GAAIS,EAGF,IAFA,IAAIP,EAAcQ,GAAM,EACtBC,EAAKF,EAAKze,OAAS,EACd0e,EAAKC,GAAI,CACdT,EAAeO,EAAKC,GAAM,GAC1B,IAAIN,EAAQ1P,EAAG7G,KAAKkN,YAAYmJ,GAC9BI,EAAmB5P,EAAG7G,KAAKoN,aAAaiJ,GACxCC,EAAWnG,EAAQoG,EACjB1P,EAAG3C,KAAKwS,yBACV7P,EAAGlD,UAAYkD,EAAG7G,KAAKgQ,QAAQoG,EAAmBC,EAAcxP,EAAG3C,KAAK4L,eAE1EpB,GAAO,SAAW,EAAa,kBAC3BsH,IACFtH,GAAO,8CAAgD,EAAU,MAAU7H,EAAG7G,KAAKoN,aAAaiJ,GAAiB,OAEnH3H,GAAO,qBACiB,IAApB7H,EAAG0L,cACL7D,GAAO,6DAAgF7H,EAAY,UAAI,kBAAqBA,EAAG7G,KAAKuG,eAAe8K,GAAmB,2BAA+BxK,EAAG7G,KAAKoN,aAAa8I,GAAc,wBAA4B,EAAqB,iBAAqBC,EAAY,OAAI,YAAgBtP,EAAG7G,KAAKoN,aAA6B,GAAhB+I,EAAMhe,OAAcge,EAAM,GAAKA,EAAMQ,KAAK,OAAU,QAC9X,IAArB9P,EAAG3C,KAAKsO,WACV9D,GAAO,4BAELA,GADkB,GAAhByH,EAAMhe,OACD,YAAe0O,EAAG7G,KAAKoN,aAAa+I,EAAM,IAE1C,cAAiBtP,EAAG7G,KAAKoN,aAAa+I,EAAMQ,KAAK,OAE1DjI,GAAO,kBAAqB7H,EAAG7G,KAAKoN,aAAa8I,GAAc,iBAE7DrP,EAAG3C,KAAKuO,UACV/D,GAAO,6BAA+B,EAAgB,mCAAsC7H,EAAa,WAAI,YAAc,EAAU,KAEvI6H,GAAO,OAEPA,GAAO,OAETA,GAAO,kFAIbA,GAAO,QACH4C,IACF8B,GAAkB,IAClB1E,GAAO,YAIb7H,EAAGlD,UAAYyS,EACf,IAAI9C,EAAiBH,EAAIrU,OACzB,IAAK,IAAIoX,KAAaJ,EAAa,CAE7BjP,EAAG7G,KAAKyP,eADRgE,EAAOqC,EAAYI,GACUrP,EAAGhD,MAAMyH,OACxCoD,GAAO,IAAM,EAAe,iBAAmB,EAAW7H,EAAG7G,KAAKkN,YAAYgJ,GAAc,kBACxFF,IACFtH,GAAO,4CAA8C,EAAU,MAAU7H,EAAG7G,KAAKoN,aAAa8I,GAAc,OAE9GxH,GAAO,OACPyE,EAAIna,OAASya,EACbN,EAAI1P,WAAa2N,EAAcvK,EAAG7G,KAAKkN,YAAYgJ,GACnD/C,EAAIzP,cAAgB2N,EAAiB,IAAMxK,EAAG7G,KAAK6K,eAAeqL,GAClExH,GAAO,KAAQ7H,EAAGzL,SAAS+X,GAAQ,IACnCA,EAAIrU,OAASwU,EACb5E,GAAO,OACH4C,IACF5C,GAAO,QAAU,EAAe,OAChC0E,GAAkB,MAQxB,OAJI9B,IACF5C,GAAO,MAAQ,EAAmB,QAAU,EAAU,iBAExDA,EAAM7H,EAAG7G,KAAKyO,YAAYC,SAItBqI,IAAI,SAASlf,EAAQhB,EAAOD,GAClC,aACAC,EAAOD,QAAU,SAAuBiQ,EAAIgK,EAAUC,GACpD,IAAIpC,EAAM,IACNsC,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdlU,EAAU4J,EAAG7N,OAAO6X,GACpBO,EAAcvK,EAAGpD,WAAaoD,EAAG7G,KAAKkN,YAAY2D,GAClDQ,EAAiBxK,EAAGnD,cAAgB,IAAMmN,EAC1CS,GAAiBzK,EAAG3C,KAAKqN,UACzBpB,EAAQ,QAAUe,GAAY,IAC9B2C,EAAS,QAAU7C,EACnBQ,EAAU3K,EAAG3C,KAAKiM,OAASlT,GAAWA,EAAQkT,MAE9CqB,IACF9C,GAAO,cAAgB,EAAS,MAAS7H,EAAG7G,KAAKkQ,QAAQjT,EAAQkT,MAAOe,EAAUrK,EAAG4K,aAAgB,MAKvG,IAAIiC,EAAK,IAAM1C,EACbgG,EAAW,SAAWhG,EACnBQ,IACH9C,GAAO,QAAU,EAAa,qBAAuB,EAAgB,KAEvEA,GAAO,OAAS,EAAW,IACvB8C,IACF9C,GAAO,cAAgB,EAAS,mBAAqB,EAAW,0CAA4C,EAAS,MAAQ,EAAW,oBAE1IA,GAAY,EAAW,qBAAuB,EAAO,OAAS,EAAO,IAAM,EAAa,YAAc,EAAO,iBAAmB,EAAU,KAAO,EAAa,IAAM,EAAO,SAAW,EAAW,oBAC7L8C,IACF9C,GAAO,SAETA,GAAO,SAAW,EAAW,SAC7B,IAAI4D,EAAaA,MACjBA,EAAWxG,KAAK4C,GAChBA,EAAM,IACkB,IAApB7H,EAAG0L,cACL7D,GAAO,qDAAwE7H,EAAY,UAAI,kBAAqBA,EAAG7G,KAAKuG,eAAe8K,GAAmB,qCAAuC,EAAS,OACrL,IAArBxK,EAAG3C,KAAKsO,WACV9D,GAAO,+DAEL7H,EAAG3C,KAAKuO,UACV/D,GAAO,6BAA+B,EAAgB,mCAAsC7H,EAAa,WAAI,YAAc,EAAU,KAEvI6H,GAAO,OAEPA,GAAO,OAET,IAAIgE,EAAQhE,EAeZ,OAdAA,EAAM4D,EAAWK,MAGbjE,IAFC7H,EAAG+L,eAAiBtB,EACnBzK,EAAGkI,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCL,GAAO,KACH4C,IACF5C,GAAO,YAEFA,QAGHuI,IAAI,SAASpf,EAAQhB,EAAOD,GAClC,aACAC,EAAOD,QAAU,SAAyBiQ,EAAIgK,EAAUC,GACtD,IAAIpC,EAAM,IACNsC,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdlU,EAAU4J,EAAG7N,OAAO6X,GACpBO,EAAcvK,EAAGpD,WAAaoD,EAAG7G,KAAKkN,YAAY2D,GAClDQ,EAAiBxK,EAAGnD,cAAgB,IAAMmN,EAC1CS,GAAiBzK,EAAG3C,KAAKqN,UACzBpB,EAAQ,QAAUe,GAAY,IAClC,IAAuB,IAAnBrK,EAAG3C,KAAKhK,OAIV,OAHIoX,IACF5C,GAAO,iBAEFA,EAET,IACEqC,EADES,EAAU3K,EAAG3C,KAAKiM,OAASlT,GAAWA,EAAQkT,MAE9CqB,GACF9C,GAAO,cAAgB,EAAS,MAAS7H,EAAG7G,KAAKkQ,QAAQjT,EAAQkT,MAAOe,EAAUrK,EAAG4K,aAAgB,KACrGV,EAAe,SAAWC,GAE1BD,EAAe9T,EAEjB,IAAIia,EAAkBrQ,EAAG3C,KAAKiT,eAC5BC,EAAgBhO,MAAMC,QAAQ6N,GAChC,GAAI1F,EAAS,CAIX9C,GAAO,SAHH2I,EAAU,SAAWrG,GAGI,cAAgB,EAAiB,WAF5DsG,EAAY,WAAatG,GAE6D,aAAe,EAAY,qBAAyB,EAAY,0BAA4B,EAAY,mBAD9LuG,EAAc,aAAevG,GACqM,MAAQ,EAAc,OAAS,EAAY,0BAA8B,EAAc,OACvTnK,EAAGkI,QACLL,GAAO,aAAe,EAAS,MAAQ,EAAY,YAErDA,GAAO,IAAM,EAAY,MAAQ,EAAY,sBACzC8C,IACF9C,GAAO,KAAO,EAAiB,4BAA8B,EAAiB,qBAEhFA,GAAO,KACgB,UAAnBwI,IACFxI,GAAO,KAAO,EAAiB,QAAU,EAAY,IACjD0I,IACF1I,GAAO,yCAA2C,EAAiB,YAErEA,GAAO,SAETA,GAAO,KAAO,EAAY,OAAS,EAAgB,QAAW,EAAc,iBAAoB,EAAY,oBAE1GA,GADE7H,EAAGkI,MACE,UAAY,EAAS,MAASlI,EAAa,WAAI,IAAM,EAAY,IAAM,EAAU,OAAS,EAAY,IAAM,EAAU,MAEtH,IAAM,EAAY,IAAM,EAAU,KAE3C6H,GAAO,MAAQ,EAAY,SAAW,EAAU,cAC3C,CACL,IAAI2I,EAAUxQ,EAAG/G,QAAQ7C,GACzB,IAAKoa,EAAS,CACZ,GAAuB,UAAnBH,EAKF,OAJArQ,EAAG1C,OAAOqT,KAAK,mBAAqBva,EAAU,gCAAkC4J,EAAGnD,cAAgB,KAC/F4N,IACF5C,GAAO,iBAEFA,EACF,GAAI0I,GAAiBF,EAAgBO,QAAQxa,IAAY,EAI9D,OAHIqU,IACF5C,GAAO,iBAEFA,EAEP,MAAM,IAAI3W,MAAM,mBAAqBkF,EAAU,gCAAkC4J,EAAGnD,cAAgB,KAGxG,IAAI4T,EAA8B,iBAAXD,KAAyBA,aAAmBrW,SAAWqW,EAAQjc,SAClFmc,EAAcD,GAAaD,EAAQlM,MAAQ,SAC/C,GAAImM,EAAW,CACb,IAAIjU,GAA2B,IAAlBgU,EAAQtI,MACrBsI,EAAUA,EAAQjc,SAEpB,GAAImc,GAAezG,EAIjB,OAHIQ,IACF5C,GAAO,iBAEFA,EAET,GAAIrL,EAAQ,CACV,IAAKwD,EAAGkI,MAAO,MAAM,IAAIhX,MAAM,+BAC3B2f,EAAa,UAAY7Q,EAAG7G,KAAKkN,YAAYjQ,GAAW,YAC5DyR,GAAO,UAAa7H,EAAa,WAAI,IAAM,EAAe,IAAM,EAAU,aACrE,CACL6H,GAAO,UACP,IAAIgJ,EAAa,UAAY7Q,EAAG7G,KAAKkN,YAAYjQ,GAC7Cqa,IAAWI,GAAc,aAE3BhJ,GADoB,mBAAX2I,EACF,IAAM,EAAe,IAAM,EAAU,KAErC,IAAM,EAAe,SAAW,EAAU,KAEnD3I,GAAO,QAGX,IAAI4D,EAAaA,MACjBA,EAAWxG,KAAK4C,GAChBA,EAAM,IACkB,IAApB7H,EAAG0L,cACL7D,GAAO,uDAA0E7H,EAAY,UAAI,kBAAqBA,EAAG7G,KAAKuG,eAAe8K,GAAmB,yBAE9J3C,GADE8C,EACK,GAAK,EAEL,GAAM3K,EAAG7G,KAAKuG,eAAetJ,GAEtCyR,GAAO,QACkB,IAArB7H,EAAG3C,KAAKsO,WACV9D,GAAO,sCAELA,GADE8C,EACK,OAAU,EAAiB,OAE3B,GAAM3K,EAAG7G,KAAKoN,aAAanQ,GAEpCyR,GAAO,QAEL7H,EAAG3C,KAAKuO,UACV/D,GAAO,eAELA,GADE8C,EACK,kBAAoB,EAEpB,GAAM3K,EAAG7G,KAAKuG,eAAetJ,GAEtCyR,GAAO,2CAA8C7H,EAAa,WAAI,YAAc,EAAU,KAEhG6H,GAAO,OAEPA,GAAO,OAET,IAAIgE,EAAQhE,EAeZ,OAdAA,EAAM4D,EAAWK,MAGbjE,IAFC7H,EAAG+L,eAAiBtB,EACnBzK,EAAGkI,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCL,GAAO,MACH4C,IACF5C,GAAO,YAEFA,QAGHiJ,IAAI,SAAS9f,EAAQhB,EAAOD,GAClC,aACAC,EAAOD,QAAU,SAAwBiQ,EAAIgK,EAAUC,GACrD,IAAIpC,EAAM,IACNsC,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdlU,EAAU4J,EAAG7N,OAAO6X,GACpBO,EAAcvK,EAAGpD,WAAaoD,EAAG7G,KAAKkN,YAAY2D,GAClDQ,EAAiBxK,EAAGnD,cAAgB,IAAMmN,EAC1CS,GAAiBzK,EAAG3C,KAAKqN,UACzBpB,EAAQ,QAAUe,GAAY,IAC9B2C,EAAS,QAAU7C,EACnB8C,EAAQ,SAAW9C,EACnBmC,EAAMtM,EAAG7G,KAAKC,KAAK4G,GACnBuM,EAAiB,GACrBD,EAAIlC,QACJ,IAAIoC,EAAa,QAAUF,EAAIlC,MAC3BkD,EAAO,IAAMnD,EACfoD,EAAWjB,EAAIhC,UAAYtK,EAAGsK,UAAY,EAC1CkD,EAAY,OAASD,EACrBd,EAAiBzM,EAAG/H,OAEtB,GADA4P,GAAO,OAAS,EAAU,iBAAmB,EAAW,IACpDtF,MAAMC,QAAQpM,GAAU,CAC1B,IAAI2a,EAAmB/Q,EAAG7N,OAAO6e,gBACjC,IAAyB,IAArBD,EAA4B,CAC9BlJ,GAAO,IAAM,EAAW,MAAQ,EAAU,cAAiBzR,EAAc,OAAI,KAC7E,IAAI6a,EAAqBzG,EACzBA,EAAiBxK,EAAGnD,cAAgB,mBACpCgL,GAAO,UAAY,EAAW,SAC9B,IAAI4D,EAAaA,MACjBA,EAAWxG,KAAK4C,GAChBA,EAAM,IACkB,IAApB7H,EAAG0L,cACL7D,GAAO,gEAAmF7H,EAAY,UAAI,kBAAqBA,EAAG7G,KAAKuG,eAAe8K,GAAmB,uBAA0BpU,EAAc,OAAI,OAC5L,IAArB4J,EAAG3C,KAAKsO,WACV9D,GAAO,0CAA8CzR,EAAc,OAAI,YAErE4J,EAAG3C,KAAKuO,UACV/D,GAAO,mDAAsD7H,EAAa,WAAI,YAAc,EAAU,KAExG6H,GAAO,OAEPA,GAAO,OAET,IAAIgE,EAAQhE,EACZA,EAAM4D,EAAWK,MAGbjE,IAFC7H,EAAG+L,eAAiBtB,EACnBzK,EAAGkI,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCL,GAAO,MACP2C,EAAiByG,EACbxG,IACF8B,GAAkB,IAClB1E,GAAO,YAGX,IAAI8E,EAAOvW,EACX,GAAIuW,EAGF,IAFA,IAAIC,EAAMC,GAAM,EACdC,EAAKH,EAAKrb,OAAS,EACdub,EAAKC,GAEV,GADAF,EAAOD,EAAKE,GAAM,GACd7M,EAAG7G,KAAKyP,eAAegE,EAAM5M,EAAGhD,MAAMyH,KAAM,CAC9CoD,GAAO,IAAM,EAAe,gBAAkB,EAAU,aAAe,EAAO,OAC1E6F,EAAYpE,EAAQ,IAAMuD,EAAK,IACnCP,EAAIna,OAASya,EACbN,EAAI1P,WAAa2N,EAAc,IAAMsC,EAAK,IAC1CP,EAAIzP,cAAgB2N,EAAiB,IAAMqC,EAC3CP,EAAIxP,UAAYkD,EAAG7G,KAAK4P,YAAY/I,EAAGlD,UAAW+P,EAAI7M,EAAG3C,KAAK4L,cAAc,GAC5EqD,EAAI1B,YAAY2C,GAAYV,EACxBc,EAAQ3N,EAAGzL,SAAS+X,GACxBA,EAAIrU,OAASwU,EACTzM,EAAG7G,KAAKqO,cAAcmG,EAAOH,GAAa,EAC5C3F,GAAO,IAAO7H,EAAG7G,KAAKuO,WAAWiG,EAAOH,EAAWE,GAAc,IAEjE7F,GAAO,QAAU,EAAc,MAAQ,EAAc,KAAO,EAAU,IAExEA,GAAO,OACH4C,IACF5C,GAAO,QAAU,EAAe,OAChC0E,GAAkB,KAK1B,GAA+B,iBAApBwE,GAAgC/Q,EAAG7G,KAAKyP,eAAemI,EAAkB/Q,EAAGhD,MAAMyH,KAAM,CACjG6H,EAAIna,OAAS4e,EACbzE,EAAI1P,WAAaoD,EAAGpD,WAAa,mBACjC0P,EAAIzP,cAAgBmD,EAAGnD,cAAgB,mBACvCgL,GAAO,IAAM,EAAe,gBAAkB,EAAU,aAAgBzR,EAAc,OAAI,iBAAmB,EAAS,MAASA,EAAc,OAAI,KAAO,EAAS,MAAQ,EAAU,YAAc,EAAS,SAC1MkW,EAAIxP,UAAYkD,EAAG7G,KAAK4P,YAAY/I,EAAGlD,UAAWwQ,EAAMtN,EAAG3C,KAAK4L,cAAc,GAC1EyE,EAAYpE,EAAQ,IAAMgE,EAAO,IACrChB,EAAI1B,YAAY2C,GAAYD,EACxBK,EAAQ3N,EAAGzL,SAAS+X,GACxBA,EAAIrU,OAASwU,EACTzM,EAAG7G,KAAKqO,cAAcmG,EAAOH,GAAa,EAC5C3F,GAAO,IAAO7H,EAAG7G,KAAKuO,WAAWiG,EAAOH,EAAWE,GAAc,IAEjE7F,GAAO,QAAU,EAAc,MAAQ,EAAc,KAAO,EAAU,IAEpE4C,IACF5C,GAAO,SAAW,EAAe,aAEnCA,GAAO,SACH4C,IACF5C,GAAO,QAAU,EAAe,OAChC0E,GAAkB,WAGjB,GAAIvM,EAAG7G,KAAKyP,eAAexS,EAAS4J,EAAGhD,MAAMyH,KAAM,CACxD6H,EAAIna,OAASiE,EACbkW,EAAI1P,WAAa2N,EACjB+B,EAAIzP,cAAgB2N,EACpB3C,GAAO,cAAgB,EAAS,SAAqB,EAAS,MAAQ,EAAU,YAAc,EAAS,SACvGyE,EAAIxP,UAAYkD,EAAG7G,KAAK4P,YAAY/I,EAAGlD,UAAWwQ,EAAMtN,EAAG3C,KAAK4L,cAAc,GAC9E,IAAIyE,EAAYpE,EAAQ,IAAMgE,EAAO,IACrChB,EAAI1B,YAAY2C,GAAYD,EAC5B,IAAIK,EAAQ3N,EAAGzL,SAAS+X,GACxBA,EAAIrU,OAASwU,EACTzM,EAAG7G,KAAKqO,cAAcmG,EAAOH,GAAa,EAC5C3F,GAAO,IAAO7H,EAAG7G,KAAKuO,WAAWiG,EAAOH,EAAWE,GAAc,IAEjE7F,GAAO,QAAU,EAAc,MAAQ,EAAc,KAAO,EAAU,IAEpE4C,IACF5C,GAAO,SAAW,EAAe,aAEnCA,GAAO,KAMT,OAJI4C,IACF5C,GAAO,IAAM,EAAmB,QAAU,EAAU,iBAEtDA,EAAM7H,EAAG7G,KAAKyO,YAAYC,SAItBqJ,IAAI,SAASlgB,EAAQhB,EAAOD,GAClC,aACAC,EAAOD,QAAU,SAA6BiQ,EAAIgK,EAAUC,GAC1D,IASEC,EATErC,EAAM,IACNsC,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdlU,EAAU4J,EAAG7N,OAAO6X,GACpBO,EAAcvK,EAAGpD,WAAaoD,EAAG7G,KAAKkN,YAAY2D,GAClDQ,EAAiBxK,EAAGnD,cAAgB,IAAMmN,EAC1CS,GAAiBzK,EAAG3C,KAAKqN,UACzBpB,EAAQ,QAAUe,GAAY,IAC9BM,EAAU3K,EAAG3C,KAAKiM,OAASlT,GAAWA,EAAQkT,MAE9CqB,GACF9C,GAAO,cAAgB,EAAS,MAAS7H,EAAG7G,KAAKkQ,QAAQjT,EAAQkT,MAAOe,EAAUrK,EAAG4K,aAAgB,KACrGV,EAAe,SAAWC,GAE1BD,EAAe9T,EAEjByR,GAAO,eAAiB,EAAS,QAC7B8C,IACF9C,GAAO,IAAM,EAAiB,8BAAgC,EAAiB,oBAEjFA,GAAO,aAAe,EAAS,MAAQ,EAAU,MAAQ,EAAiB,KAExEA,GADE7H,EAAG3C,KAAK8T,oBACH,gCAAkC,EAAS,eAAiB,EAAS,UAAanR,EAAG3C,KAAwB,oBAAI,IAEjH,YAAc,EAAS,yBAA2B,EAAS,KAEpEwK,GAAO,MACH8C,IACF9C,GAAO,SAETA,GAAO,UACP,IAAI4D,EAAaA,MACjBA,EAAWxG,KAAK4C,GAChBA,EAAM,IACkB,IAApB7H,EAAG0L,cACL7D,GAAO,2DAA8E7H,EAAY,UAAI,kBAAqBA,EAAG7G,KAAKuG,eAAe8K,GAAmB,4BAA8B,EAAiB,OAC1L,IAArBxK,EAAG3C,KAAKsO,WACV9D,GAAO,sCAELA,GADE8C,EACK,OAAU,EAEL,EAAiB,KAG7B3K,EAAG3C,KAAKuO,UACV/D,GAAO,eAELA,GADE8C,EACK,kBAAoB,EAEpB,GAAK,EAEd9C,GAAO,2CAA8C7H,EAAa,WAAI,YAAc,EAAU,KAEhG6H,GAAO,OAEPA,GAAO,OAET,IAAIgE,EAAQhE,EAeZ,OAdAA,EAAM4D,EAAWK,MAGbjE,IAFC7H,EAAG+L,eAAiBtB,EACnBzK,EAAGkI,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCL,GAAO,KACH4C,IACF5C,GAAO,YAEFA,QAGHuJ,IAAI,SAASpgB,EAAQhB,EAAOD,GAClC,aACAC,EAAOD,QAAU,SAAsBiQ,EAAIgK,EAAUC,GACnD,IAAIpC,EAAM,IACNsC,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdlU,EAAU4J,EAAG7N,OAAO6X,GACpBO,EAAcvK,EAAGpD,WAAaoD,EAAG7G,KAAKkN,YAAY2D,GAClDQ,EAAiBxK,EAAGnD,cAAgB,IAAMmN,EAC1CS,GAAiBzK,EAAG3C,KAAKqN,UACzBpB,EAAQ,QAAUe,GAAY,IAC9B4C,EAAQ,SAAW9C,EACnBmC,EAAMtM,EAAG7G,KAAKC,KAAK4G,GACvBsM,EAAIlC,QACJ,IAAIoC,EAAa,QAAUF,EAAIlC,MAC/B,GAAIpK,EAAG7G,KAAKyP,eAAexS,EAAS4J,EAAGhD,MAAMyH,KAAM,CACjD6H,EAAIna,OAASiE,EACbkW,EAAI1P,WAAa2N,EACjB+B,EAAIzP,cAAgB2N,EACpB3C,GAAO,QAAU,EAAU,eAC3B,IAAIsF,EAAgBnN,EAAG+L,cACvB/L,EAAG+L,cAAgBO,EAAIP,eAAgB,EACvCO,EAAIZ,cAAe,EACnB,IAAI2F,EACA/E,EAAIjP,KAAKqN,YACX2G,EAAmB/E,EAAIjP,KAAKqN,UAC5B4B,EAAIjP,KAAKqN,WAAY,GAEvB7C,GAAO,IAAO7H,EAAGzL,SAAS+X,GAAQ,IAClCA,EAAIZ,cAAe,EACf2F,IAAkB/E,EAAIjP,KAAKqN,UAAY2G,GAC3CrR,EAAG+L,cAAgBO,EAAIP,cAAgBoB,EACvCtF,GAAO,QAAU,EAAe,SAChC,IAAI4D,EAAaA,MACjBA,EAAWxG,KAAK4C,GAChBA,EAAM,IACkB,IAApB7H,EAAG0L,cACL7D,GAAO,oDAAuE7H,EAAY,UAAI,kBAAqBA,EAAG7G,KAAKuG,eAAe8K,GAAmB,kBACpI,IAArBxK,EAAG3C,KAAKsO,WACV9D,GAAO,sCAEL7H,EAAG3C,KAAKuO,UACV/D,GAAO,6BAA+B,EAAgB,mCAAsC7H,EAAa,WAAI,YAAc,EAAU,KAEvI6H,GAAO,OAEPA,GAAO,OAET,IAAIgE,EAAQhE,EACZA,EAAM4D,EAAWK,MAGbjE,IAFC7H,EAAG+L,eAAiBtB,EACnBzK,EAAGkI,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCL,GAAO,uBAAyB,EAAU,iCAAmC,EAAU,sBAAwB,EAAU,4BACrH7H,EAAG3C,KAAKqN,YACV7C,GAAO,YAGTA,GAAO,kBACiB,IAApB7H,EAAG0L,cACL7D,GAAO,oDAAuE7H,EAAY,UAAI,kBAAqBA,EAAG7G,KAAKuG,eAAe8K,GAAmB,kBACpI,IAArBxK,EAAG3C,KAAKsO,WACV9D,GAAO,sCAEL7H,EAAG3C,KAAKuO,UACV/D,GAAO,6BAA+B,EAAgB,mCAAsC7H,EAAa,WAAI,YAAc,EAAU,KAEvI6H,GAAO,OAEPA,GAAO,OAETA,GAAO,+EACH4C,IACF5C,GAAO,kBAGX,OAAOA,QAGHyJ,IAAI,SAAStgB,EAAQhB,EAAOD,GAClC,aACAC,EAAOD,QAAU,SAAwBiQ,EAAIgK,EAAUC,GACrD,IAAIpC,EAAM,IACNsC,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdlU,EAAU4J,EAAG7N,OAAO6X,GACpBO,EAAcvK,EAAGpD,WAAaoD,EAAG7G,KAAKkN,YAAY2D,GAClDQ,EAAiBxK,EAAGnD,cAAgB,IAAMmN,EAC1CS,GAAiBzK,EAAG3C,KAAKqN,UACzBpB,EAAQ,QAAUe,GAAY,IAC9B2C,EAAS,QAAU7C,EACnB8C,EAAQ,SAAW9C,EACnBmC,EAAMtM,EAAG7G,KAAKC,KAAK4G,GACnBuM,EAAiB,GACrBD,EAAIlC,QACJ,IAAIoC,EAAa,QAAUF,EAAIlC,MAC/BvC,GAAO,OAAS,EAAU,0BAA4B,EAAS,gBAAkB,EAAW,YAC5F,IAAI4E,EAAiBH,EAAIrU,OACrBkV,EAAgBnN,EAAG+L,cACvB/L,EAAG+L,cAAgBO,EAAIP,eAAgB,EACvC,IAAIY,EAAOvW,EACX,GAAIuW,EAGF,IAFA,IAAIC,EAAMC,GAAM,EACdC,EAAKH,EAAKrb,OAAS,EACdub,EAAKC,GACVF,EAAOD,EAAKE,GAAM,GACd7M,EAAG7G,KAAKyP,eAAegE,EAAM5M,EAAGhD,MAAMyH,MACxC6H,EAAIna,OAASya,EACbN,EAAI1P,WAAa2N,EAAc,IAAMsC,EAAK,IAC1CP,EAAIzP,cAAgB2N,EAAiB,IAAMqC,EAC3ChF,GAAO,KAAQ7H,EAAGzL,SAAS+X,GAAQ,IACnCA,EAAIrU,OAASwU,GAEb5E,GAAO,QAAU,EAAe,YAE9BgF,IACFhF,GAAO,QAAU,EAAe,gBAAkB,EAAS,KAAO,EAAW,oBAC7E0E,GAAkB,KAEpB1E,GAAO,QAAU,EAAe,KAAO,EAAW,eAAiB,EAAS,WA6BhF,OA1BA7H,EAAG+L,cAAgBO,EAAIP,cAAgBoB,EACvCtF,GAAY,EAAmB,QAAU,EAAW,sBAC5B,IAApB7H,EAAG0L,cACL7D,GAAO,sDAAyE7H,EAAY,UAAI,kBAAqBA,EAAG7G,KAAKuG,eAAe8K,GAAmB,kBACtI,IAArBxK,EAAG3C,KAAKsO,WACV9D,GAAO,2DAEL7H,EAAG3C,KAAKuO,UACV/D,GAAO,6BAA+B,EAAgB,mCAAsC7H,EAAa,WAAI,YAAc,EAAU,KAEvI6H,GAAO,OAEPA,GAAO,OAETA,GAAO,gFACF7H,EAAG+L,eAAiBtB,IAErB5C,GADE7H,EAAGkI,MACE,wCAEA,8CAGXL,GAAO,sBAAwB,EAAU,iCAAmC,EAAU,sBAAwB,EAAU,2BACpH7H,EAAG3C,KAAKqN,YACV7C,GAAO,OAEFA,QAGH0J,IAAI,SAASvgB,EAAQhB,EAAOD,GAClC,aACAC,EAAOD,QAAU,SAA0BiQ,EAAIgK,EAAUC,GACvD,IASEC,EATErC,EAAM,IACNsC,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdlU,EAAU4J,EAAG7N,OAAO6X,GACpBO,EAAcvK,EAAGpD,WAAaoD,EAAG7G,KAAKkN,YAAY2D,GAClDQ,EAAiBxK,EAAGnD,cAAgB,IAAMmN,EAC1CS,GAAiBzK,EAAG3C,KAAKqN,UACzBpB,EAAQ,QAAUe,GAAY,IAC9BM,EAAU3K,EAAG3C,KAAKiM,OAASlT,GAAWA,EAAQkT,MAE9CqB,GACF9C,GAAO,cAAgB,EAAS,MAAS7H,EAAG7G,KAAKkQ,QAAQjT,EAAQkT,MAAOe,EAAUrK,EAAG4K,aAAgB,KACrGV,EAAe,SAAWC,GAE1BD,EAAe9T,EAEjB,IAAIob,EAAU7G,EAAU,eAAiBT,EAAe,KAAOlK,EAAG9C,WAAW9G,GAC7EyR,GAAO,QACH8C,IACF9C,GAAO,KAAO,EAAiB,4BAA8B,EAAiB,qBAEhFA,GAAO,KAAO,EAAY,SAAW,EAAU,WAC/C,IAAI4D,EAAaA,MACjBA,EAAWxG,KAAK4C,GAChBA,EAAM,IACkB,IAApB7H,EAAG0L,cACL7D,GAAO,wDAA2E7H,EAAY,UAAI,kBAAqBA,EAAG7G,KAAKuG,eAAe8K,GAAmB,0BAE/J3C,GADE8C,EACK,GAAK,EAEL,GAAM3K,EAAG7G,KAAKuG,eAAetJ,GAEtCyR,GAAO,QACkB,IAArB7H,EAAG3C,KAAKsO,WACV9D,GAAO,uCAELA,GADE8C,EACK,OAAU,EAAiB,OAE3B,GAAM3K,EAAG7G,KAAKoN,aAAanQ,GAEpCyR,GAAO,QAEL7H,EAAG3C,KAAKuO,UACV/D,GAAO,eAELA,GADE8C,EACK,kBAAoB,EAEpB,GAAM3K,EAAG7G,KAAKuG,eAAetJ,GAEtCyR,GAAO,2CAA8C7H,EAAa,WAAI,YAAc,EAAU,KAEhG6H,GAAO,OAEPA,GAAO,OAET,IAAIgE,EAAQhE,EAeZ,OAdAA,EAAM4D,EAAWK,MAGbjE,IAFC7H,EAAG+L,eAAiBtB,EACnBzK,EAAGkI,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCL,GAAO,KACH4C,IACF5C,GAAO,YAEFA,QAGH4J,IAAI,SAASzgB,EAAQhB,EAAOD,GAClC,aACAC,EAAOD,QAAU,SAA6BiQ,EAAIgK,EAAUC,GAC1D,IAAIpC,EAAM,IACNsC,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdlU,EAAU4J,EAAG7N,OAAO6X,GACpBO,EAAcvK,EAAGpD,WAAaoD,EAAG7G,KAAKkN,YAAY2D,GAClDQ,EAAiBxK,EAAGnD,cAAgB,IAAMmN,EAC1CS,GAAiBzK,EAAG3C,KAAKqN,UACzBpB,EAAQ,QAAUe,GAAY,IAC9B2C,EAAS,QAAU7C,EACnB8C,EAAQ,SAAW9C,EACnBmC,EAAMtM,EAAG7G,KAAKC,KAAK4G,GACnBuM,EAAiB,GACrBD,EAAIlC,QACJ,IAAIoC,EAAa,QAAUF,EAAIlC,MAC3BsH,EAAO,MAAQvH,EACjBmD,EAAO,MAAQnD,EACfoD,EAAWjB,EAAIhC,UAAYtK,EAAGsK,UAAY,EAC1CkD,EAAY,OAASD,EACrBoE,EAAkB,iBAAmBxH,EACnCyH,EAAcpZ,OAAOuM,KAAK3O,OAC5Byb,EAAe7R,EAAG7N,OAAO2f,sBACzBC,EAAiBvZ,OAAOuM,KAAK8M,GAC7BG,EAAehS,EAAG7N,OAAO8f,qBACzBC,EAAkBN,EAAYtgB,QAAUygB,EAAezgB,OACvD6gB,GAAiC,IAAjBH,EAChBI,EAA6C,iBAAhBJ,GAA4BxZ,OAAOuM,KAAKiN,GAAc1gB,OACnF+gB,EAAoBrS,EAAG3C,KAAKiV,iBAC5BC,EAAmBJ,GAAiBC,GAAuBC,EAC3DlD,EAAiBnP,EAAG3C,KAAK+R,cACzB3C,EAAiBzM,EAAG/H,OAClBua,EAAYxS,EAAG7N,OAAOkC,SAC1B,GAAIme,KAAexS,EAAG3C,KAAKoV,KAAMD,EAAUlJ,QAAUkJ,EAAUlhB,OAAS0O,EAAG3C,KAAKqV,aAAc,IAAIC,EAAgB3S,EAAG7G,KAAK8K,OAAOuO,GACjI,GAAIxS,EAAG3C,KAAKuV,cACV,IAAIC,EAAgB7S,EAAG7N,OAAOygB,kBAC5BE,EAAkBta,OAAOuM,KAAK8N,GAMlC,GAJAhL,GAAO,OAAS,EAAU,iBAAmB,EAAe,WACxDsH,IACFtH,GAAO,QAAU,EAAoB,iBAEnC0K,EAAkB,CAMpB,GAJE1K,GADEsH,EACK,IAAM,EAAoB,MAAQ,EAAoB,mBAAqB,EAAU,eAAiB,EAAS,OAAS,EAAS,IAAM,EAAoB,YAAc,EAAS,aAAe,EAAS,MAAQ,EAAoB,IAAM,EAAS,MAErP,aAAe,EAAS,OAAS,EAAU,OAEhD+C,EAAiB,CAEnB,GADArK,GAAO,oBAAsB,EAAS,cAClC+J,EAAYtgB,OACd,GAAIsgB,EAAYtgB,OAAS,EACvBuW,GAAO,sBAAwB,EAAgB,IAAM,EAAS,SACzD,CACL,IAAI8E,EAAOiF,EACX,GAAIjF,EAGF,IAFA,IAAkBoG,GAAM,EACtBjG,EAAKH,EAAKrb,OAAS,EACdyhB,EAAKjG,GACV0C,EAAe7C,EAAKoG,GAAM,GAC1BlL,GAAO,OAAS,EAAS,OAAU7H,EAAG7G,KAAKuG,eAAe8P,GAAiB,IAKnF,GAAIuC,EAAezgB,OAAQ,CACzB,IAAIye,EAAOgC,EACX,GAAIhC,EAGF,IAFA,IAAgBlD,GAAM,EACpBoD,EAAKF,EAAKze,OAAS,EACdub,EAAKoD,GACV+C,GAAajD,EAAKlD,GAAM,GACxBhF,GAAO,OAAU7H,EAAG9C,WAAW8V,IAAe,SAAW,EAAS,KAIxE,GAAIhT,EAAG3C,KAAKuV,eAAiBE,EAAgBxhB,OAAQ,CACnD,IAAI2hB,EAAOH,EACX,GAAIG,EAGF,IAFA,IAAiBpG,GAAM,EACrBqG,EAAKD,EAAK3hB,OAAS,EACdub,EAAKqG,GACVC,GAAcF,EAAKpG,GAAM,GACzBhF,GAAO,OAAU7H,EAAG9C,WAAWiW,IAAgB,SAAW,EAAS,KAIzEtL,GAAO,uBAAyB,EAAS,OAE3C,GAAyB,OAArBwK,EACFxK,GAAO,WAAa,EAAU,IAAM,EAAS,UACxC,CACL,IAAI0H,EAAoBvP,EAAGlD,UACvBsW,EAAsB,OAAU1B,EAAO,OAI3C,GAHI1R,EAAG3C,KAAKwS,yBACV7P,EAAGlD,UAAYkD,EAAG7G,KAAK4P,YAAY/I,EAAGlD,UAAW4U,EAAM1R,EAAG3C,KAAK4L,eAE7DkJ,EACF,GAAIE,EACFxK,GAAO,WAAa,EAAU,IAAM,EAAS,UACxC,CACLA,GAAO,IAAM,EAAe,aACxBoJ,GAAqBzG,EACzBA,EAAiBxK,EAAGnD,cAAgB,yBAChC4O,GAAaA,QACNxG,KAAK4C,GAChBA,EAAM,IACkB,IAApB7H,EAAG0L,cACL7D,GAAO,qEAAwF7H,EAAY,UAAI,kBAAqBA,EAAG7G,KAAKuG,eAAe8K,GAAmB,qCAAwC,EAAwB,QACrN,IAArBxK,EAAG3C,KAAKsO,WACV9D,GAAO,wDAEL7H,EAAG3C,KAAKuO,UACV/D,GAAO,mDAAsD7H,EAAa,WAAI,YAAc,EAAU,KAExG6H,GAAO,OAEPA,GAAO,OAELgE,GAAQhE,EACZA,EAAM4D,GAAWK,MAGbjE,IAFC7H,EAAG+L,eAAiBtB,EACnBzK,EAAGkI,MACE,+BAAiC,GAAU,OAE3C,uBAAyB,GAAU,oBAGrC,cAAgB,GAAU,+EAEnCsC,EAAiByG,GACbxG,IACF5C,GAAO,iBAGN,GAAIuK,EACT,GAAyB,WAArBC,EAAgC,CAClCxK,GAAO,QAAU,EAAU,eAC3B,IAAIsF,EAAgBnN,EAAG+L,cACvB/L,EAAG+L,cAAgBO,EAAIP,eAAgB,EACvCO,EAAIna,OAAS6f,EACb1F,EAAI1P,WAAaoD,EAAGpD,WAAa,wBACjC0P,EAAIzP,cAAgBmD,EAAGnD,cAAgB,wBACvCyP,EAAIxP,UAAYkD,EAAG3C,KAAKwS,uBAAyB7P,EAAGlD,UAAYkD,EAAG7G,KAAK4P,YAAY/I,EAAGlD,UAAW4U,EAAM1R,EAAG3C,KAAK4L,cAC5GyE,EAAYpE,EAAQ,IAAMoI,EAAO,IACrCpF,EAAI1B,YAAY2C,GAAYmE,EACxB/D,GAAQ3N,EAAGzL,SAAS+X,GACxBA,EAAIrU,OAASwU,EACTzM,EAAG7G,KAAKqO,cAAcmG,GAAOH,GAAa,EAC5C3F,GAAO,IAAO7H,EAAG7G,KAAKuO,WAAWiG,GAAOH,EAAWE,GAAc,IAEjE7F,GAAO,QAAU,EAAc,MAAQ,EAAc,KAAO,GAAU,IAExEA,GAAO,SAAW,EAAe,gBAAkB,EAAU,wHAA0H,EAAU,IAAM,EAAS,SAChN7H,EAAG+L,cAAgBO,EAAIP,cAAgBoB,MAClC,CACLb,EAAIna,OAAS6f,EACb1F,EAAI1P,WAAaoD,EAAGpD,WAAa,wBACjC0P,EAAIzP,cAAgBmD,EAAGnD,cAAgB,wBACvCyP,EAAIxP,UAAYkD,EAAG3C,KAAKwS,uBAAyB7P,EAAGlD,UAAYkD,EAAG7G,KAAK4P,YAAY/I,EAAGlD,UAAW4U,EAAM1R,EAAG3C,KAAK4L,cAC5GyE,EAAYpE,EAAQ,IAAMoI,EAAO,IACrCpF,EAAI1B,YAAY2C,GAAYmE,EACxB/D,GAAQ3N,EAAGzL,SAAS+X,GACxBA,EAAIrU,OAASwU,EACTzM,EAAG7G,KAAKqO,cAAcmG,GAAOH,GAAa,EAC5C3F,GAAO,IAAO7H,EAAG7G,KAAKuO,WAAWiG,GAAOH,EAAWE,GAAc,IAEjE7F,GAAO,QAAU,EAAc,MAAQ,EAAc,KAAO,GAAU,IAEpE4C,IACF5C,GAAO,SAAW,EAAe,aAIvC7H,EAAGlD,UAAYyS,EAEb2C,IACFrK,GAAO,OAETA,GAAO,OACH4C,IACF5C,GAAO,QAAU,EAAe,OAChC0E,GAAkB,KAGtB,IAAI8G,EAAerT,EAAG3C,KAAKiW,cAAgBtT,EAAG+L,cAC9C,GAAI6F,EAAYtgB,OAAQ,CACtB,IAAIiiB,EAAO3B,EACX,GAAI2B,EAGF,IAFA,IAAI/D,EAAcgE,GAAM,EACtBC,EAAKF,EAAKjiB,OAAS,EACdkiB,EAAKC,GAAI,CACdjE,EAAe+D,EAAKC,GAAM,GAE1B,GAAIxT,EAAG7G,KAAKyP,eADRgE,GAAOxW,EAAQoZ,GACcxP,EAAGhD,MAAMyH,KAAM,CAC9C,IAAIiL,EAAQ1P,EAAG7G,KAAKkN,YAAYmJ,GAC9B9B,EAAYpE,EAAQoG,EACpBgE,GAAcL,QAAiC5b,IAAjBmV,GAAK+G,QACrCrH,EAAIna,OAASya,GACbN,EAAI1P,WAAa2N,EAAcmF,EAC/BpD,EAAIzP,cAAgB2N,EAAiB,IAAMxK,EAAG7G,KAAK6K,eAAewL,GAClElD,EAAIxP,UAAYkD,EAAG7G,KAAKgQ,QAAQnJ,EAAGlD,UAAW0S,EAAcxP,EAAG3C,KAAK4L,cACpEqD,EAAI1B,YAAY2C,GAAYvN,EAAG7G,KAAKuG,eAAe8P,GAC/C7B,GAAQ3N,EAAGzL,SAAS+X,GAExB,GADAA,EAAIrU,OAASwU,EACTzM,EAAG7G,KAAKqO,cAAcmG,GAAOH,GAAa,EAAG,CAC/CG,GAAQ3N,EAAG7G,KAAKuO,WAAWiG,GAAOH,EAAWE,GACzC+B,GAAW/B,MACV,CACL,IAAI+B,GAAWjC,EACf3F,GAAO,QAAU,EAAc,MAAQ,EAAc,KAEvD,GAAI6L,GACF7L,GAAO,IAAM,GAAU,QAClB,CACL,GAAI8K,GAAiBA,EAAcnD,GAAe,CAChD3H,GAAO,SAAW,GAAa,kBAC3BsH,IACFtH,GAAO,8CAAgD,EAAU,MAAU7H,EAAG7G,KAAKoN,aAAaiJ,GAAiB,OAEnH3H,GAAO,OAAS,EAAe,aAC/B,IAAI0H,EAAoBvP,EAAGlD,UACzBmU,GAAqBzG,EACrBoF,GAAmB5P,EAAG7G,KAAKoN,aAAaiJ,GACtCxP,EAAG3C,KAAKwS,yBACV7P,EAAGlD,UAAYkD,EAAG7G,KAAKgQ,QAAQoG,EAAmBC,EAAcxP,EAAG3C,KAAK4L,eAE1EuB,EAAiBxK,EAAGnD,cAAgB,aAChC4O,GAAaA,QACNxG,KAAK4C,GAChBA,EAAM,IACkB,IAApB7H,EAAG0L,cACL7D,GAAO,yDAA4E7H,EAAY,UAAI,kBAAqBA,EAAG7G,KAAKuG,eAAe8K,GAAmB,kCAAqC,GAAqB,QACnM,IAArBxK,EAAG3C,KAAKsO,WACV9D,GAAO,gBAELA,GADE7H,EAAG3C,KAAKwS,uBACH,yBAEA,oCAAuC,GAAqB,MAErEhI,GAAO,MAEL7H,EAAG3C,KAAKuO,UACV/D,GAAO,6BAA+B,EAAgB,mCAAsC7H,EAAa,WAAI,YAAc,EAAU,KAEvI6H,GAAO,OAEPA,GAAO,OAELgE,GAAQhE,EACZA,EAAM4D,GAAWK,MAGbjE,IAFC7H,EAAG+L,eAAiBtB,EACnBzK,EAAGkI,MACE,+BAAiC,GAAU,OAE3C,uBAAyB,GAAU,oBAGrC,cAAgB,GAAU,+EAEnCsC,EAAiByG,GACjBjR,EAAGlD,UAAYyS,EACf1H,GAAO,kBAEH4C,GACF5C,GAAO,SAAW,GAAa,kBAC3BsH,IACFtH,GAAO,8CAAgD,EAAU,MAAU7H,EAAG7G,KAAKoN,aAAaiJ,GAAiB,OAEnH3H,GAAO,OAAS,EAAe,uBAE/BA,GAAO,QAAU,GAAa,kBAC1BsH,IACFtH,GAAO,8CAAgD,EAAU,MAAU7H,EAAG7G,KAAKoN,aAAaiJ,GAAiB,OAEnH3H,GAAO,SAGXA,GAAO,IAAM,GAAU,OAGvB4C,IACF5C,GAAO,QAAU,EAAe,OAChC0E,GAAkB,MAK1B,GAAIwF,EAAezgB,OAAQ,CACzB,IAAIsiB,GAAO7B,EACX,GAAI6B,GAGF,IAFA,IAAIZ,GAAYa,IAAM,EACpBC,GAAKF,GAAKtiB,OAAS,EACduiB,GAAKC,IAAI,CACdd,GAAaY,GAAKC,IAAM,GAExB,GAAI7T,EAAG7G,KAAKyP,eADRgE,GAAOiF,EAAamB,IACShT,EAAGhD,MAAMyH,KAAM,CAC9C6H,EAAIna,OAASya,GACbN,EAAI1P,WAAaoD,EAAGpD,WAAa,qBAAuBoD,EAAG7G,KAAKkN,YAAY2M,IAC5E1G,EAAIzP,cAAgBmD,EAAGnD,cAAgB,sBAAwBmD,EAAG7G,KAAK6K,eAAegP,IAEpFnL,GADEsH,EACK,IAAM,EAAoB,MAAQ,EAAoB,mBAAqB,EAAU,eAAiB,EAAS,OAAS,EAAS,IAAM,EAAoB,YAAc,EAAS,aAAe,EAAS,MAAQ,EAAoB,IAAM,EAAS,MAErP,aAAe,EAAS,OAAS,EAAU,OAEpDtH,GAAO,QAAW7H,EAAG9C,WAAW8V,IAAe,SAAW,EAAS,QACnE1G,EAAIxP,UAAYkD,EAAG7G,KAAK4P,YAAY/I,EAAGlD,UAAW4U,EAAM1R,EAAG3C,KAAK4L,cAC5DyE,EAAYpE,EAAQ,IAAMoI,EAAO,IACrCpF,EAAI1B,YAAY2C,GAAYmE,EACxB/D,GAAQ3N,EAAGzL,SAAS+X,GACxBA,EAAIrU,OAASwU,EACTzM,EAAG7G,KAAKqO,cAAcmG,GAAOH,GAAa,EAC5C3F,GAAO,IAAO7H,EAAG7G,KAAKuO,WAAWiG,GAAOH,EAAWE,GAAc,IAEjE7F,GAAO,QAAU,EAAc,MAAQ,EAAc,KAAO,GAAU,IAEpE4C,IACF5C,GAAO,SAAW,EAAe,aAEnCA,GAAO,MACH4C,IACF5C,GAAO,SAAW,EAAe,aAEnCA,GAAO,OACH4C,IACF5C,GAAO,QAAU,EAAe,OAChC0E,GAAkB,OAM5B,GAAIvM,EAAG3C,KAAKuV,eAAiBE,EAAgBxhB,OAAQ,CACnD,IAAIyiB,GAAOjB,EACX,GAAIiB,GAGF,IAFA,IAAIZ,GAAaa,IAAM,EACrBC,GAAKF,GAAKziB,OAAS,EACd0iB,GAAKC,IAAI,CAEd,IAAIC,GAAYrB,EADhBM,GAAcY,GAAKC,IAAM,IAEvBpH,GAAOsH,GAAU/hB,OACnB,GAAI6N,EAAG7G,KAAKyP,eAAegE,GAAM5M,EAAGhD,MAAMyH,KAAM,CAC9C6H,EAAIna,OAASya,GACbN,EAAI1P,WAAaoD,EAAGpD,WAAa,iBAAmBoD,EAAG7G,KAAKkN,YAAY8M,IAAe,UACvF7G,EAAIzP,cAAgBmD,EAAGnD,cAAgB,kBAAoBmD,EAAG7G,KAAK6K,eAAemP,IAAe,UACjGtL,GAAO,mBAAqB,EAAS,UAEnCA,GADEsH,EACK,IAAM,EAAoB,MAAQ,EAAoB,mBAAqB,EAAU,eAAiB,EAAS,OAAS,EAAS,IAAM,EAAoB,YAAc,EAAS,aAAe,EAAS,MAAQ,EAAoB,IAAM,EAAS,MAErP,aAAe,EAAS,OAAS,EAAU,OAEpDtH,GAAO,QAAW7H,EAAG9C,WAAWiW,IAAgB,SAAW,EAAS,mBAAqB,EAAS,OAClG7G,EAAIxP,UAAYkD,EAAG7G,KAAK4P,YAAY/I,EAAGlD,UAAW4U,EAAM1R,EAAG3C,KAAK4L,cAC5DyE,EAAYpE,EAAQ,IAAMoI,EAAO,IACrCpF,EAAI1B,YAAY2C,GAAYmE,EAC5B,IAAI/D,GAAQ3N,EAAGzL,SAAS+X,GACxBA,EAAIrU,OAASwU,EACTzM,EAAG7G,KAAKqO,cAAcmG,GAAOH,GAAa,EAC5C3F,GAAO,IAAO7H,EAAG7G,KAAKuO,WAAWiG,GAAOH,EAAWE,GAAc,IAEjE7F,GAAO,QAAU,EAAc,MAAQ,EAAc,KAAO,GAAU,IAEpE4C,IACF5C,GAAO,SAAW,EAAe,aAEnCA,GAAO,MACH4C,IACF5C,GAAO,SAAW,EAAe,aAEnCA,GAAO,OACH4C,IACF5C,GAAO,QAAU,EAAe,OAChC0E,GAAkB,KAEpB,IAAI4H,GAASD,GAAU1gB,QACrB4gB,GAASF,GAAU3gB,QACrB,QAAekE,IAAX0c,SAAmC1c,IAAX2c,GAAsB,CAChDvM,GAAO,QAAU,EAAW,YACxBoJ,GAAqBzG,EACzB,QAAe/S,IAAX0c,GAAsB,CACxB,IAAIE,GAASF,GACXG,GAAU,UACVC,GAAc,OAChB1M,GAAO,IAAM,EAAW,iBAAmB,EAAS,OAAS,GAAW,KACxE2C,EAAiBxK,EAAGnD,cAAgB,yBACpCgL,GAAO,UAAY,EAAW,UAC1B4D,GAAaA,QACNxG,KAAK4C,GAChBA,EAAM,IACkB,IAApB7H,EAAG0L,cACL7D,GAAO,8DAAiF7H,EAAY,UAAI,kBAAqBA,EAAG7G,KAAKuG,eAAe8K,GAAmB,yBAA4B,GAAY,aAAgB,GAAW,eAAmBxK,EAAG7G,KAAKoN,aAAa4M,IAAgB,QACzQ,IAArBnT,EAAG3C,KAAKsO,WACV9D,GAAO,gCAAmC,GAAgB,SAAW,GAAW,iCAAoC7H,EAAG7G,KAAKoN,aAAa4M,IAAgB,QAEvJnT,EAAG3C,KAAKuO,UACV/D,GAAO,6BAA+B,EAAgB,mCAAsC7H,EAAa,WAAI,YAAc,EAAU,KAEvI6H,GAAO,OAEPA,GAAO,OAELgE,GAAQhE,EACZA,EAAM4D,GAAWK,MAGbjE,IAFC7H,EAAG+L,eAAiBtB,EACnBzK,EAAGkI,MACE,+BAAiC,GAAU,OAE3C,uBAAyB,GAAU,oBAGrC,cAAgB,GAAU,+EAEnCL,GAAO,WACQpQ,IAAX2c,KACFvM,GAAO,UAGX,QAAepQ,IAAX2c,GAAsB,CACxB,IAAIC,GAASD,GACXE,GAAU,UACVC,GAAc,OAChB1M,GAAO,IAAM,EAAW,iBAAmB,EAAS,OAAS,GAAW,KACxE2C,EAAiBxK,EAAGnD,cAAgB,yBACpCgL,GAAO,UAAY,EAAW,SAC9B,IAAI4D,GAAaA,OACjBA,GAAWxG,KAAK4C,GAChBA,EAAM,IACkB,IAApB7H,EAAG0L,cACL7D,GAAO,8DAAiF7H,EAAY,UAAI,kBAAqBA,EAAG7G,KAAKuG,eAAe8K,GAAmB,yBAA4B,GAAY,aAAgB,GAAW,eAAmBxK,EAAG7G,KAAKoN,aAAa4M,IAAgB,QACzQ,IAArBnT,EAAG3C,KAAKsO,WACV9D,GAAO,gCAAmC,GAAgB,SAAW,GAAW,iCAAoC7H,EAAG7G,KAAKoN,aAAa4M,IAAgB,QAEvJnT,EAAG3C,KAAKuO,UACV/D,GAAO,6BAA+B,EAAgB,mCAAsC7H,EAAa,WAAI,YAAc,EAAU,KAEvI6H,GAAO,OAEPA,GAAO,OAET,IAAIgE,GAAQhE,EACZA,EAAM4D,GAAWK,MAGbjE,IAFC7H,EAAG+L,eAAiBtB,EACnBzK,EAAGkI,MACE,+BAAiC,GAAU,OAE3C,uBAAyB,GAAU,oBAGrC,cAAgB,GAAU,+EAEnCL,GAAO,MAET2C,EAAiByG,GACbxG,IACF5C,GAAO,QAAU,EAAW,OAC5B0E,GAAkB,QAW9B,OAJI9B,IACF5C,GAAO,IAAM,EAAmB,QAAU,EAAU,iBAEtDA,EAAM7H,EAAG7G,KAAKyO,YAAYC,SAItB2M,IAAI,SAASxjB,EAAQhB,EAAOD,GAClC,aACAC,EAAOD,QAAU,SAAgCiQ,EAAIgK,EAAUC,GAC7D,IAAIpC,EAAM,IACNsC,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdlU,EAAU4J,EAAG7N,OAAO6X,GACpBO,EAAcvK,EAAGpD,WAAaoD,EAAG7G,KAAKkN,YAAY2D,GAClDQ,EAAiBxK,EAAGnD,cAAgB,IAAMmN,EAC1CS,GAAiBzK,EAAG3C,KAAKqN,UACzBpB,EAAQ,QAAUe,GAAY,IAC9B4C,EAAQ,SAAW9C,EACnBmC,EAAMtM,EAAG7G,KAAKC,KAAK4G,GAEvBsM,EAAIlC,QACJ,IAAIoC,EAAa,QAAUF,EAAIlC,MAC/B,GAAIpK,EAAG7G,KAAKyP,eAAexS,EAAS4J,EAAGhD,MAAMyH,KAAM,CACjD6H,EAAIna,OAASiE,EACbkW,EAAI1P,WAAa2N,EACjB+B,EAAIzP,cAAgB2N,EACpB,IAAIkH,EAAO,MAAQvH,EACjBmD,EAAO,MAAQnD,EACf0C,EAAK,IAAM1C,EACXsK,EAAe,OAAU/C,EAAO,OAEhClE,EAAY,QADDlB,EAAIhC,UAAYtK,EAAGsK,UAAY,GAE1CqH,EAAkB,iBAAmBxH,EACrCgF,EAAiBnP,EAAG3C,KAAK+R,cACzB3C,EAAiBzM,EAAG/H,OACtB4P,GAAO,QAAU,EAAU,cACvBsH,IACFtH,GAAO,QAAU,EAAoB,kBAGrCA,GADEsH,EACK,IAAM,EAAoB,MAAQ,EAAoB,mBAAqB,EAAU,eAAiB,EAAS,OAAS,EAAS,IAAM,EAAoB,YAAc,EAAS,aAAe,EAAS,MAAQ,EAAoB,IAAM,EAAS,MAErP,aAAe,EAAS,OAAS,EAAU,OAEpDtH,GAAO,iBAAmB,EAAS,cACnC,IAAI6F,EAAYgE,EACZvE,EAAgBnN,EAAG+L,cACvB/L,EAAG+L,cAAgBO,EAAIP,eAAgB,EACvC,IAAI4B,EAAQ3N,EAAGzL,SAAS+X,GACxBA,EAAIrU,OAASwU,EACTzM,EAAG7G,KAAKqO,cAAcmG,EAAOH,GAAa,EAC5C3F,GAAO,IAAO7H,EAAG7G,KAAKuO,WAAWiG,EAAOH,EAAWE,GAAc,IAEjE7F,GAAO,QAAU,EAAc,MAAQ,EAAc,KAAO,EAAU,IAExE7H,EAAG+L,cAAgBO,EAAIP,cAAgBoB,EACvCtF,GAAO,SAAW,EAAe,gBAAkB,EAAO,aAAe,EAAS,KAAO,EAAO,YAAc,EAAO,iBAAmB,EAAO,oBAAsB,EAAS,sBACtJ,IAApB7H,EAAG0L,cACL7D,GAAO,8DAAiF7H,EAAY,UAAI,kBAAqBA,EAAG7G,KAAKuG,eAAe8K,GAAmB,+BAAkC,EAAiB,QACjM,IAArBxK,EAAG3C,KAAKsO,WACV9D,GAAO,iCAAqC,EAAiB,oBAE3D7H,EAAG3C,KAAKuO,UACV/D,GAAO,6BAA+B,EAAgB,mCAAsC7H,EAAa,WAAI,YAAc,EAAU,KAEvI6H,GAAO,OAEPA,GAAO,OAETA,GAAO,gFACF7H,EAAG+L,eAAiBtB,IAErB5C,GADE7H,EAAGkI,MACE,wCAEA,8CAGPuC,IACF5C,GAAO,YAETA,GAAO,OAMT,OAJI4C,IACF5C,GAAO,SAAmC,EAAU,iBAEtDA,EAAM7H,EAAG7G,KAAKyO,YAAYC,SAItB6M,IAAI,SAAS1jB,EAAQhB,EAAOD,GAClC,aACAC,EAAOD,QAAU,SAAsBiQ,EAAIgK,EAAUC,GACnD,IAQIzN,EAAQmY,EARR9M,EAAM,IAENwC,EAAWrK,EAAGsK,UACdlU,EAAU4J,EAAG7N,OAAO6X,GACpBQ,EAAiBxK,EAAGnD,cAAgB,IAAMmN,EAC1CS,GAAiBzK,EAAG3C,KAAKqN,UACzBpB,EAAQ,QAAUe,GAAY,IAC9B2C,EAAS,QANFhN,EAAGoK,MAQd,GAAe,KAAXhU,GAA6B,MAAXA,EAChB4J,EAAGzD,QACLC,EAASwD,EAAGkI,MACZyM,EAAW,aAEXnY,GAAmC,IAA1BwD,EAAGnE,KAAK1J,OAAOqK,OACxBmY,EAAW,sBAER,CACL,IAAIC,EAAU5U,EAAG/C,WAAW+C,EAAG/H,OAAQ7B,EAAS4J,EAAGzD,QACnD,QAAgB9E,IAAZmd,EAAuB,CACzB,IAAIC,EAAW7U,EAAGrJ,gBAAgBuB,QAAQ8H,EAAG/H,OAAQ7B,GACrD,GAA2B,QAAvB4J,EAAG3C,KAAKyX,YAAuB,CACjC9U,EAAG1C,OAAOiB,MAAMsW,IACZpJ,EAAaA,OACNxG,KAAK4C,GAChBA,EAAM,IACkB,IAApB7H,EAAG0L,cACL7D,GAAO,qDAAwE7H,EAAY,UAAI,kBAAqBA,EAAG7G,KAAKuG,eAAe8K,GAAmB,sBAA0BxK,EAAG7G,KAAKoN,aAAanQ,GAAY,QAChM,IAArB4J,EAAG3C,KAAKsO,WACV9D,GAAO,0CAA+C7H,EAAG7G,KAAKoN,aAAanQ,GAAY,MAErF4J,EAAG3C,KAAKuO,UACV/D,GAAO,cAAiB7H,EAAG7G,KAAKuG,eAAetJ,GAAY,mCAAsC4J,EAAa,WAAI,YAAc,EAAU,KAE5I6H,GAAO,OAEPA,GAAO,OAET,IAAIgE,EAAQhE,EACZA,EAAM4D,EAAWK,MAGbjE,IAFC7H,EAAG+L,eAAiBtB,EACnBzK,EAAGkI,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAE/BuC,IACF5C,GAAO,sBAEJ,CAAA,GAA2B,UAAvB7H,EAAG3C,KAAKyX,YAMjB,MAAM,IAAI9U,EAAGrJ,gBAAgBqJ,EAAG/H,OAAQ7B,EAASye,GALjD7U,EAAG1C,OAAOqT,KAAKkE,GACXpK,IACF5C,GAAO,uBAKN,GAAI+M,EAAQtV,OAAQ,CACzB,IAAIgN,EAAMtM,EAAG7G,KAAKC,KAAK4G,GACvBsM,EAAIlC,QACJ,IAAIoC,EAAa,QAAUF,EAAIlC,MAC/BkC,EAAIna,OAASyiB,EAAQziB,OACrBma,EAAI1P,WAAa,GACjB0P,EAAIzP,cAAgBzG,EAEpByR,GAAO,IADK7H,EAAGzL,SAAS+X,GAAKpJ,QAAQ,oBAAqB0R,EAAQzjB,MAC3C,IACnBsZ,IACF5C,GAAO,QAAU,EAAe,aAGlCrL,GAA4B,IAAnBoY,EAAQpY,OACjBmY,EAAWC,EAAQzjB,KAGvB,GAAIwjB,EAAU,CACZ,IAAIlJ,EAAaA,MACjBA,EAAWxG,KAAK4C,GAChBA,EAAM,GAEJA,GADE7H,EAAG3C,KAAKoR,YACH,IAAM,EAAa,eAEnB,IAAM,EAAa,KAE5B5G,GAAO,IAAM,EAAU,qBACH,MAAhB7H,EAAGlD,YACL+K,GAAO,MAAS7H,EAAY,WAE9B,IAGI+U,EADJlN,GAAO,OAFWwC,EAAW,QAAWA,EAAW,GAAM,IAAM,cAEhC,OADPA,EAAWrK,EAAG4K,YAAYP,GAAY,sBACC,gBAG/D,GADAxC,EAAM4D,EAAWK,MACbtP,EAAQ,CACV,IAAKwD,EAAGkI,MAAO,MAAM,IAAIhX,MAAM,0CAC3BuZ,IACF5C,GAAO,QAAU,EAAW,MAE9BA,GAAO,UAAa7H,EAAa,WAAI,IAAM,EAAmB,KAC1DyK,IACF5C,GAAO,IAAM,EAAW,aAE1BA,GAAO,4KACH4C,IACF5C,GAAO,IAAM,EAAW,cAE1BA,GAAO,MACH4C,IACF5C,GAAO,QAAU,EAAW,aAG9BA,GAAO,SAAW,EAAmB,uCAAyC,EAAa,0CAA4C,EAAa,wCAChJ4C,IACF5C,GAAO,YAIb,OAAOA,QAGHmN,IAAI,SAAShkB,EAAQhB,EAAOD,GAClC,aACAC,EAAOD,QAAU,SAA2BiQ,EAAIgK,EAAUC,GACxD,IAAIpC,EAAM,IACNsC,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdlU,EAAU4J,EAAG7N,OAAO6X,GACpBO,EAAcvK,EAAGpD,WAAaoD,EAAG7G,KAAKkN,YAAY2D,GAClDQ,EAAiBxK,EAAGnD,cAAgB,IAAMmN,EAC1CS,GAAiBzK,EAAG3C,KAAKqN,UACzBpB,EAAQ,QAAUe,GAAY,IAC9B2C,EAAS,QAAU7C,EACnBQ,EAAU3K,EAAG3C,KAAKiM,OAASlT,GAAWA,EAAQkT,MAE9CqB,IACF9C,GAAO,cAAgB,EAAS,MAAS7H,EAAG7G,KAAKkQ,QAAQjT,EAAQkT,MAAOe,EAAUrK,EAAG4K,aAAgB,MAKvG,IAAIuF,EAAW,SAAWhG,EAC1B,IAAKQ,EACH,GAAIvU,EAAQ9E,OAAS0O,EAAG3C,KAAKqV,cAAgB1S,EAAG7N,OAAOgC,YAAcqE,OAAOuM,KAAK/E,EAAG7N,OAAOgC,YAAY7C,OAAQ,CAC7G,IAAIkhB,KACA7F,EAAOvW,EACX,GAAIuW,EAGF,IAFA,IAAI0C,EAAW0D,GAAM,EACnBjG,EAAKH,EAAKrb,OAAS,EACdyhB,EAAKjG,GAAI,CACduC,EAAY1C,EAAKoG,GAAM,GACvB,IAAIkC,EAAejV,EAAG7N,OAAOgC,WAAWkb,GAClC4F,GAAgBjV,EAAG7G,KAAKyP,eAAeqM,EAAcjV,EAAGhD,MAAMyH,OAClE+N,EAAUA,EAAUlhB,QAAU+d,SAKhCmD,EAAYpc,EAGpB,GAAIuU,GAAW6H,EAAUlhB,OAAQ,CAC/B,IAAIie,EAAoBvP,EAAGlD,UACzBoY,EAAgBvK,GAAW6H,EAAUlhB,QAAU0O,EAAG3C,KAAKqV,aACvDvD,EAAiBnP,EAAG3C,KAAK+R,cAC3B,GAAI3E,EAEF,GADA5C,GAAO,eAAiB,EAAS,KAC7BqN,EAAe,CACZvK,IACH9C,GAAO,QAAU,EAAa,qBAAuB,EAAgB,MAIrE+H,EAAmB,QADnBD,EAAgB,SAAWxF,EAAO,KADhC0C,EAAK,IAAM1C,GACgC,KACA,OAC3CnK,EAAG3C,KAAKwS,yBACV7P,EAAGlD,UAAYkD,EAAG7G,KAAK4P,YAAYwG,EAAmBI,EAAe3P,EAAG3C,KAAK4L,eAE/EpB,GAAO,QAAU,EAAW,YACxB8C,IACF9C,GAAO,cAAgB,EAAS,mBAAqB,EAAW,0CAA4C,EAAS,MAAQ,EAAW,oBAE1IA,GAAO,aAAe,EAAO,SAAW,EAAO,MAAQ,EAAa,YAAc,EAAO,SAAW,EAAW,MAAQ,EAAU,IAAM,EAAa,IAAM,EAAO,oBAC7JsH,IACFtH,GAAO,8CAAgD,EAAU,KAAO,EAAa,IAAM,EAAO,OAEpGA,GAAO,UAAY,EAAW,cAC1B8C,IACF9C,GAAO,SAETA,GAAO,UAAY,EAAW,UAC1B4D,EAAaA,OACNxG,KAAK4C,GAChBA,EAAM,IACkB,IAApB7H,EAAG0L,cACL7D,GAAO,yDAA4E7H,EAAY,UAAI,kBAAqBA,EAAG7G,KAAKuG,eAAe8K,GAAmB,kCAAqC,EAAqB,QACnM,IAArBxK,EAAG3C,KAAKsO,WACV9D,GAAO,gBAELA,GADE7H,EAAG3C,KAAKwS,uBACH,yBAEA,oCAAuC,EAAqB,MAErEhI,GAAO,MAEL7H,EAAG3C,KAAKuO,UACV/D,GAAO,6BAA+B,EAAgB,mCAAsC7H,EAAa,WAAI,YAAc,EAAU,KAEvI6H,GAAO,OAEPA,GAAO,OAELgE,EAAQhE,EACZA,EAAM4D,EAAWK,MAGbjE,IAFC7H,EAAG+L,eAAiBtB,EACnBzK,EAAGkI,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCL,GAAO,iBACF,CACLA,GAAO,SACP,IAAIkI,EAAOyC,EACX,GAAIzC,EAGF,IAFA,IAAkBlD,GAAM,EACtBoD,EAAKF,EAAKze,OAAS,EACdub,EAAKoD,GAAI,CACdT,EAAeO,EAAKlD,GAAM,GACtBA,IACFhF,GAAO,QAITA,GAAO,SADL4H,EAAWnG,GADToG,EAAQ1P,EAAG7G,KAAKkN,YAAYmJ,KAEF,kBAC1BL,IACFtH,GAAO,8CAAgD,EAAU,MAAU7H,EAAG7G,KAAKoN,aAAaiJ,GAAiB,OAEnH3H,GAAO,gBAAkB,EAAS,MAAS7H,EAAG7G,KAAKuG,eAAeM,EAAG3C,KAAK4L,aAAeuG,EAAeE,GAAU,OAGtH7H,GAAO,QAEL+H,EAAmB,QADjBD,EAAgB,UAAYxF,GACe,OAC3CnK,EAAG3C,KAAKwS,yBACV7P,EAAGlD,UAAYkD,EAAG3C,KAAK4L,aAAejJ,EAAG7G,KAAK4P,YAAYwG,EAAmBI,GAAe,GAAQJ,EAAoB,MAAQI,GAElI,IAAIlE,EAAaA,MACjBA,EAAWxG,KAAK4C,GAChBA,EAAM,IACkB,IAApB7H,EAAG0L,cACL7D,GAAO,yDAA4E7H,EAAY,UAAI,kBAAqBA,EAAG7G,KAAKuG,eAAe8K,GAAmB,kCAAqC,EAAqB,QACnM,IAArBxK,EAAG3C,KAAKsO,WACV9D,GAAO,gBAELA,GADE7H,EAAG3C,KAAKwS,uBACH,yBAEA,oCAAuC,EAAqB,MAErEhI,GAAO,MAEL7H,EAAG3C,KAAKuO,UACV/D,GAAO,6BAA+B,EAAgB,mCAAsC7H,EAAa,WAAI,YAAc,EAAU,KAEvI6H,GAAO,OAEPA,GAAO,OAET,IAAIgE,EAAQhE,EACZA,EAAM4D,EAAWK,MAGbjE,IAFC7H,EAAG+L,eAAiBtB,EACnBzK,EAAGkI,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCL,GAAO,kBAGT,GAAIqN,EAAe,CACZvK,IACH9C,GAAO,QAAU,EAAa,qBAAuB,EAAgB,MAEvE,IACE8H,EAAgB,SAAWxF,EAAO,KADhC0C,EAAK,IAAM1C,GACgC,IAC7CyF,EAAmB,OAAUD,EAAgB,OAC3C3P,EAAG3C,KAAKwS,yBACV7P,EAAGlD,UAAYkD,EAAG7G,KAAK4P,YAAYwG,EAAmBI,EAAe3P,EAAG3C,KAAK4L,eAE3E0B,IACF9C,GAAO,QAAU,EAAa,sBAAwB,EAAa,sBAC3C,IAApB7H,EAAG0L,cACL7D,GAAO,yDAA4E7H,EAAY,UAAI,kBAAqBA,EAAG7G,KAAKuG,eAAe8K,GAAmB,kCAAqC,EAAqB,QACnM,IAArBxK,EAAG3C,KAAKsO,WACV9D,GAAO,gBAELA,GADE7H,EAAG3C,KAAKwS,uBACH,yBAEA,oCAAuC,EAAqB,MAErEhI,GAAO,MAEL7H,EAAG3C,KAAKuO,UACV/D,GAAO,6BAA+B,EAAgB,mCAAsC7H,EAAa,WAAI,YAAc,EAAU,KAEvI6H,GAAO,OAEPA,GAAO,OAETA,GAAO,0FAA4F,EAAa,sBAElHA,GAAO,aAAe,EAAO,SAAW,EAAO,MAAQ,EAAa,YAAc,EAAO,aAAe,EAAU,IAAM,EAAa,IAAM,EAAO,oBAC9IsH,IACFtH,GAAO,8CAAgD,EAAU,KAAO,EAAa,IAAM,EAAO,OAEpGA,GAAO,qBACiB,IAApB7H,EAAG0L,cACL7D,GAAO,yDAA4E7H,EAAY,UAAI,kBAAqBA,EAAG7G,KAAKuG,eAAe8K,GAAmB,kCAAqC,EAAqB,QACnM,IAArBxK,EAAG3C,KAAKsO,WACV9D,GAAO,gBAELA,GADE7H,EAAG3C,KAAKwS,uBACH,yBAEA,oCAAuC,EAAqB,MAErEhI,GAAO,MAEL7H,EAAG3C,KAAKuO,UACV/D,GAAO,6BAA+B,EAAgB,mCAAsC7H,EAAa,WAAI,YAAc,EAAU,KAEvI6H,GAAO,OAEPA,GAAO,OAETA,GAAO,mFACH8C,IACF9C,GAAO,aAEJ,CACL,IAAIoL,EAAOT,EACX,GAAIS,EAGF,IAFA,IAAIzD,EAAc2F,GAAM,EACtBjC,EAAKD,EAAK3hB,OAAS,EACd6jB,EAAKjC,GAAI,CACd1D,EAAeyD,EAAKkC,GAAM,GAC1B,IAAIzF,EAAQ1P,EAAG7G,KAAKkN,YAAYmJ,GAC9BI,EAAmB5P,EAAG7G,KAAKoN,aAAaiJ,GACxCC,EAAWnG,EAAQoG,EACjB1P,EAAG3C,KAAKwS,yBACV7P,EAAGlD,UAAYkD,EAAG7G,KAAKgQ,QAAQoG,EAAmBC,EAAcxP,EAAG3C,KAAK4L,eAE1EpB,GAAO,SAAW,EAAa,kBAC3BsH,IACFtH,GAAO,8CAAgD,EAAU,MAAU7H,EAAG7G,KAAKoN,aAAaiJ,GAAiB,OAEnH3H,GAAO,qBACiB,IAApB7H,EAAG0L,cACL7D,GAAO,yDAA4E7H,EAAY,UAAI,kBAAqBA,EAAG7G,KAAKuG,eAAe8K,GAAmB,kCAAqC,EAAqB,QACnM,IAArBxK,EAAG3C,KAAKsO,WACV9D,GAAO,gBAELA,GADE7H,EAAG3C,KAAKwS,uBACH,yBAEA,oCAAuC,EAAqB,MAErEhI,GAAO,MAEL7H,EAAG3C,KAAKuO,UACV/D,GAAO,6BAA+B,EAAgB,mCAAsC7H,EAAa,WAAI,YAAc,EAAU,KAEvI6H,GAAO,OAEPA,GAAO,OAETA,GAAO,kFAKf7H,EAAGlD,UAAYyS,OACN9E,IACT5C,GAAO,gBAET,OAAOA,QAGHuN,IAAI,SAASpkB,EAAQhB,EAAOD,GAClC,aACAC,EAAOD,QAAU,SAA8BiQ,EAAIgK,EAAUC,GAC3D,IAUEC,EAVErC,EAAM,IACNsC,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdlU,EAAU4J,EAAG7N,OAAO6X,GACpBO,EAAcvK,EAAGpD,WAAaoD,EAAG7G,KAAKkN,YAAY2D,GAClDQ,EAAiBxK,EAAGnD,cAAgB,IAAMmN,EAC1CS,GAAiBzK,EAAG3C,KAAKqN,UACzBpB,EAAQ,QAAUe,GAAY,IAC9B2C,EAAS,QAAU7C,EACnBQ,EAAU3K,EAAG3C,KAAKiM,OAASlT,GAAWA,EAAQkT,MAQlD,GANIqB,GACF9C,GAAO,cAAgB,EAAS,MAAS7H,EAAG7G,KAAKkQ,QAAQjT,EAAQkT,MAAOe,EAAUrK,EAAG4K,aAAgB,KACrGV,EAAe,SAAWC,GAE1BD,EAAe9T,GAEZA,GAAWuU,KAAoC,IAAxB3K,EAAG3C,KAAK/I,YAAuB,CACrDqW,IACF9C,GAAO,QAAU,EAAW,SAAW,EAAiB,iBAAmB,EAAiB,mBAAqB,EAAW,4BAA8B,EAAiB,kBAAsB,EAAW,qBAE9MA,GAAO,QAAU,EAAW,gBAAkB,EAAU,0BAA4B,EAAU,kEAAoE,EAAU,QAAU,EAAU,WAAa,EAAW,kCACpN8C,IACF9C,GAAO,SAETA,GAAO,SAAW,EAAW,SAC7B,IAAI4D,EAAaA,MACjBA,EAAWxG,KAAK4C,GAChBA,EAAM,IACkB,IAApB7H,EAAG0L,cACL7D,GAAO,4DAA+E7H,EAAY,UAAI,kBAAqBA,EAAG7G,KAAKuG,eAAe8K,GAAmB,8BAC5I,IAArBxK,EAAG3C,KAAKsO,WACV9D,GAAO,mGAEL7H,EAAG3C,KAAKuO,UACV/D,GAAO,eAELA,GADE8C,EACK,kBAAoB,EAEpB,GAAK,EAEd9C,GAAO,2CAA8C7H,EAAa,WAAI,YAAc,EAAU,KAEhG6H,GAAO,OAEPA,GAAO,OAET,IAAIgE,EAAQhE,EACZA,EAAM4D,EAAWK,MAGbjE,IAFC7H,EAAG+L,eAAiBtB,EACnBzK,EAAGkI,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCL,GAAO,MACH4C,IACF5C,GAAO,iBAGL4C,IACF5C,GAAO,iBAGX,OAAOA,QAGHwN,IAAI,SAASrkB,EAAQhB,EAAOD,GAClC,aACAC,EAAOD,QAAU,SAA2BiQ,EAAIgK,EAAUC,GAwbxD,SAASqL,EAAgBC,GAEvB,IAAK,IADDhR,EAAQgR,EAAYhR,MACftT,EAAI,EAAGA,EAAIsT,EAAMjT,OAAQL,IAChC,GAAIukB,EAAejR,EAAMtT,IAAK,OAAO,EAGzC,SAASukB,EAAeC,GACtB,YAAoChe,IAA7BuI,EAAG7N,OAAOsjB,EAAMpV,UAA2BoV,EAAMvQ,YAG1D,SAAoCuQ,GAElC,IAAK,IADDC,EAAOD,EAAMvQ,WACRjU,EAAI,EAAGA,EAAIykB,EAAKpkB,OAAQL,IAC/B,QAA2BwG,IAAvBuI,EAAG7N,OAAOujB,EAAKzkB,IAAmB,OAAO,EANuB0kB,CAA2BF,GA9bnG,IAAI5N,EAAM,GACNrL,GAA8B,IAArBwD,EAAG7N,OAAOqK,OACrBoZ,EAAe5V,EAAG7G,KAAK0P,qBAAqB7I,EAAG7N,OAAQ6N,EAAGhD,MAAMyH,IAAK,QACrEoR,EAAM7V,EAAG3P,KAAKmR,OAAOxB,EAAG7N,QAC1B,GAAI6N,EAAGrD,MAAO,CACZ,GAAIH,EAAQ,CACVwD,EAAGkI,OAAQ,EACX,IAAI4N,EAAwB,OAAjB9V,EAAG3C,KAAK6K,MACnBlI,EAAG+V,WAAaD,EAAO,QAAU,QAEnCjO,GAAO,mBACHrL,EACEsZ,EACFjO,GAAO,qBAEc,KAAjB7H,EAAG3C,KAAK6K,QACVL,GAAO,WAETA,GAAO,eAGTA,GAAO,cAETA,GAAO,+EACHgO,IAAQ7V,EAAG3C,KAAKZ,YAAcuD,EAAG3C,KAAKW,eACxC6J,GAAO,kBAA2BgO,EAAM,QAG5C,GAAwB,kBAAb7V,EAAG7N,SAAyByjB,IAAgB5V,EAAG7N,OAAOE,KAAO,CACtE,IACI8X,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdlU,EAAU4J,EAAG7N,OAHF,gBAIXoY,EAAcvK,EAAGpD,WAAaoD,EAAG7G,KAAKkN,YAJ3B,gBAKXmE,EAAiBxK,EAAGnD,cAAgB,gBACpC4N,GAAiBzK,EAAG3C,KAAKqN,UAEzBpB,EAAQ,QAAUe,GAAY,IAC9B2C,EAAS,QAAU7C,EACvB,IAAkB,IAAdnK,EAAG7N,OAAkB,CACnB6N,EAAGrD,MACL8N,GAAgB,EAEhB5C,GAAO,QAAU,EAAW,cAE1B4D,EAAaA,OACNxG,KAAK4C,GAChBA,EAAM,IACkB,IAApB7H,EAAG0L,cACL7D,GAAO,iBAAoBqD,GAAiB,gBAAkB,oCAA0ClL,EAAY,UAAI,kBAAqBA,EAAG7G,KAAKuG,eAAe8K,GAAmB,kBAC9J,IAArBxK,EAAG3C,KAAKsO,WACV9D,GAAO,0CAEL7H,EAAG3C,KAAKuO,UACV/D,GAAO,mDAAsD7H,EAAa,WAAI,YAAc,EAAU,KAExG6H,GAAO,OAEPA,GAAO,OAELgE,EAAQhE,EACZA,EAAM4D,EAAWK,MAGbjE,IAFC7H,EAAG+L,eAAiBtB,EACnBzK,EAAGkI,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,oFAK/BL,GAFA7H,EAAGrD,MACDH,EACK,iBAEA,yCAGF,QAAU,EAAW,YAMhC,OAHIwD,EAAGrD,QACLkL,GAAO,0BAEFA,EAET,GAAI7H,EAAGrD,MAAO,CACZ,IAAIqZ,EAAOhW,EAAGrD,MACZwN,EAAOnK,EAAGoK,MAAQ,EAClBC,EAAWrK,EAAGsK,UAAY,EAC1BhB,EAAQ,OACVtJ,EAAGiW,OAASjW,EAAGzJ,QAAQ8B,SAAS2H,EAAG3P,KAAKmR,OAAOxB,EAAGnE,KAAK1J,SACvD6N,EAAG/H,OAAS+H,EAAG/H,QAAU+H,EAAGiW,cACrBjW,EAAGrD,MACVqD,EAAG4K,kBAAenT,GAClBoQ,GAAO,wBACPA,GAAO,wBACPA,GAAO,qDACF,CACL,IAAIsC,EAAOnK,EAAGoK,MAEZd,EAAQ,SADRe,EAAWrK,EAAGsK,YACgB,IAEhC,GADIuL,IAAK7V,EAAG/H,OAAS+H,EAAGzJ,QAAQ4B,IAAI6H,EAAG/H,OAAQ4d,IAC3CrZ,IAAWwD,EAAGkI,MAAO,MAAM,IAAIhX,MAAM,+BACzC2W,GAAO,aAAe,EAAS,aAEjC,IAIIqD,EAJA8B,EAAS,QAAU7C,EACrBM,GAAiBzK,EAAG3C,KAAKqN,UACzBwL,EAAkB,GAClBC,EAAkB,GAEhBC,EAAcpW,EAAG7N,OAAOmS,KAC1B+R,EAAe9T,MAAMC,QAAQ4T,GAK/B,GAJIC,GAAsC,GAAtBD,EAAY9kB,SAC9B8kB,EAAcA,EAAY,GAC1BC,GAAe,GAEbrW,EAAG7N,OAAOE,MAAQujB,EAAc,CAClC,GAA0B,QAAtB5V,EAAG3C,KAAKiZ,WACV,MAAM,IAAIplB,MAAM,qDAAuD8O,EAAGnD,cAAgB,8BAC1D,IAAvBmD,EAAG3C,KAAKiZ,aACjBV,GAAe,EACf5V,EAAG1C,OAAOqT,KAAK,6CAA+C3Q,EAAGnD,cAAgB,MAGrF,GAAIuZ,EAAa,CACf,GAAIpW,EAAG3C,KAAKkZ,YACV,IAAIC,EAAiBxW,EAAG7G,KAAKkO,cAAcrH,EAAG3C,KAAKkZ,YAAaH,GAE9Db,EAAcvV,EAAGhD,MAAM0H,MAAM0R,GACjC,GAAII,GAAkBH,IAAgC,IAAhBd,GAAyBA,IAAgBD,EAAgBC,GAAe,CAC5G,IAAIhL,EAAcvK,EAAGpD,WAAa,QAChC4N,EAAiBxK,EAAGnD,cAAgB,QAClC0N,EAAcvK,EAAGpD,WAAa,QAChC4N,EAAiBxK,EAAGnD,cAAgB,QAGtC,GADAgL,GAAO,QAAW7H,EAAG7G,KADTkd,EAAe,iBAAmB,iBACXD,EAAa9M,GAAO,GAAS,OAC5DkN,EAAgB,CAClB,IAAIC,EAAY,WAAatM,EAC3BuM,EAAW,UAAYvM,EACzBtC,GAAO,QAAU,EAAc,aAAe,EAAU,KAC7B,SAAvB7H,EAAG3C,KAAKkZ,cACV1O,GAAO,QAAU,EAAc,iCAAqC,EAAU,MAAQ,EAAc,gBAEtGA,GAAO,QAAU,EAAa,iBAC9B,IAAI8O,EAAkB,GAClBhK,EAAO6J,EACX,GAAI7J,EAGF,IAFA,IAAIiK,EAAO/J,GAAM,EACfC,EAAKH,EAAKrb,OAAS,EACdub,EAAKC,GACV8J,EAAQjK,EAAKE,GAAM,GACfA,IACFhF,GAAO,QAAU,EAAa,qBAC9B8O,GAAmB,KAEM,SAAvB3W,EAAG3C,KAAKkZ,aAAmC,SAATK,IACpC/O,GAAO,QAAU,EAAc,kBAAsB,EAAU,mBAAqB,EAAa,MAAQ,EAAU,MAAQ,EAAU,QAAU,EAAc,aAAe,EAAU,SAE3K,UAAT+O,EACF/O,GAAO,QAAU,EAAc,mBAAuB,EAAc,kBAAsB,EAAa,WAAe,EAAU,cAAgB,EAAU,cAAgB,EAAa,UACrK,UAAT+O,GAA8B,WAATA,GAC9B/O,GAAO,QAAU,EAAc,oBAAwB,EAAU,iBAAmB,EAAc,mBAAuB,EAAU,OAAS,EAAU,QAAU,EAAU,IAC7J,WAAT+O,IACF/O,GAAO,SAAW,EAAU,SAE9BA,GAAO,MAAQ,EAAa,OAAS,EAAU,MAC7B,WAAT+O,EACT/O,GAAO,QAAU,EAAU,mBAAuB,EAAU,aAAe,EAAU,cAAgB,EAAa,sBAAwB,EAAU,kBAAsB,EAAU,WAAa,EAAa,YAC5L,QAAT+O,EACT/O,GAAO,QAAU,EAAU,cAAkB,EAAU,aAAe,EAAU,eAAiB,EAAa,YAC9E,SAAvB7H,EAAG3C,KAAKkZ,aAAmC,SAATK,IAC3C/O,GAAO,QAAU,EAAc,mBAAuB,EAAc,mBAAuB,EAAc,oBAAwB,EAAU,aAAe,EAAa,OAAS,EAAU,OAIhMA,GAAO,IAAM,EAAoB,QAAU,EAAa,wBACpD4D,EAAaA,OACNxG,KAAK4C,GAChBA,EAAM,IACkB,IAApB7H,EAAG0L,cACL7D,GAAO,iBAAoBqD,GAAiB,QAAU,oCAA0ClL,EAAY,UAAI,kBAAqBA,EAAG7G,KAAKuG,eAAe8K,GAAmB,uBAE7K3C,GADEwO,EACK,GAAMD,EAAYtG,KAAK,KAEvB,GAAK,EAEdjI,GAAO,QACkB,IAArB7H,EAAG3C,KAAKsO,WACV9D,GAAO,0BAELA,GADEwO,EACK,GAAMD,EAAYtG,KAAK,KAEvB,GAAK,EAEdjI,GAAO,MAEL7H,EAAG3C,KAAKuO,UACV/D,GAAO,6BAA+B,EAAgB,mCAAsC7H,EAAa,WAAI,YAAc,EAAU,KAEvI6H,GAAO,OAEPA,GAAO,OAELgE,EAAQhE,EACZA,EAAM4D,EAAWK,MAGbjE,IAFC7H,EAAG+L,eAAiBtB,EACnBzK,EAAGkI,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCL,GAAO,cACP,IAAI6G,EAAcrE,EAAW,QAAWA,EAAW,GAAM,IAAM,aAE/DxC,GAAO,IAAM,EAAU,MAAQ,EAAa,KACvCwC,IACHxC,GAAO,OAAS,EAAgB,mBAElCA,GAAO,IAAM,EAAgB,KALLwC,EAAWrK,EAAG4K,YAAYP,GAAY,sBAKH,OAAS,EAAa,WAC5E,EACDoB,EAAaA,OACNxG,KAAK4C,GAChBA,EAAM,IACkB,IAApB7H,EAAG0L,cACL7D,GAAO,iBAAoBqD,GAAiB,QAAU,oCAA0ClL,EAAY,UAAI,kBAAqBA,EAAG7G,KAAKuG,eAAe8K,GAAmB,uBAE7K3C,GADEwO,EACK,GAAMD,EAAYtG,KAAK,KAEvB,GAAK,EAEdjI,GAAO,QACkB,IAArB7H,EAAG3C,KAAKsO,WACV9D,GAAO,0BAELA,GADEwO,EACK,GAAMD,EAAYtG,KAAK,KAEvB,GAAK,EAEdjI,GAAO,MAEL7H,EAAG3C,KAAKuO,UACV/D,GAAO,6BAA+B,EAAgB,mCAAsC7H,EAAa,WAAI,YAAc,EAAU,KAEvI6H,GAAO,OAEPA,GAAO,OAELgE,EAAQhE,EACZA,EAAM4D,EAAWK,MAGbjE,IAFC7H,EAAG+L,eAAiBtB,EACnBzK,EAAGkI,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAGrCL,GAAO,OAGX,GAAI7H,EAAG7N,OAAOE,OAASujB,EACrB/N,GAAO,IAAO7H,EAAGhD,MAAMyH,IAAIpS,KAAKlB,KAAK6O,EAAI,QAAW,IAChDyK,IACF5C,GAAO,qBAELA,GADEmO,EACK,IAEA,QAAU,EAEnBnO,GAAO,OACPsO,GAAmB,SAEhB,CACDnW,EAAG3C,KAAKoV,IAAMzS,EAAG7N,OAAOygB,eAC1B5S,EAAG1C,OAAOqT,KAAK,iGAEjB,IAAIZ,EAAO/P,EAAGhD,MACd,GAAI+S,EAGF,IAFA,IAAIwF,EAAavF,GAAM,EACrBC,EAAKF,EAAKze,OAAS,EACd0e,EAAKC,GAEV,GADAsF,EAAcxF,EAAKC,GAAM,GACrBsF,EAAgBC,GAAc,CAIhC,GAHIA,EAAYjR,OACduD,GAAO,QAAW7H,EAAG7G,KAAK0M,cAAc0P,EAAYjR,KAAMgF,GAAU,QAElEtJ,EAAG3C,KAAKiW,cAAgBtT,EAAG+L,cAC7B,GAAwB,UAApBwJ,EAAYjR,MAAoBtE,EAAG7N,OAAOgC,WAAY,CACxD,IAAIiC,EAAU4J,EAAG7N,OAAOgC,WAEpB8e,EADYza,OAAOuM,KAAK3O,GAE5B,GAAI6c,EAGF,IAFA,IAAIzD,EAAc2F,GAAM,EACtBjC,EAAKD,EAAK3hB,OAAS,EACd6jB,EAAKjC,GAAI,CAGd,QAAqBzb,KADjBmV,EAAOxW,EADXoZ,EAAeyD,EAAKkC,GAAM,KAEjBxB,QAAuB,CAE9B9L,GAAO,UADH6F,EAAYpE,EAAQtJ,EAAG7G,KAAKkN,YAAYmJ,IACZ,mBAAqB,EAAc,MAEjE3H,GADyB,UAAvB7H,EAAG3C,KAAKiW,YACH,IAAOtT,EAAG7C,WAAWyP,EAAK+G,SAAY,IAEtC,IAAOhiB,KAAKE,UAAU+a,EAAK+G,SAAY,IAEhD9L,GAAO,YAIR,GAAwB,SAApB0N,EAAYjR,MAAmB/B,MAAMC,QAAQxC,EAAG7N,OAAOmB,OAAQ,CACxE,IAAIigB,EAAOvT,EAAG7N,OAAOmB,MACrB,GAAIigB,EAGF,IAFA,IAAI3G,EAAMC,GAAM,EACd4G,EAAKF,EAAKjiB,OAAS,EACdub,EAAK4G,GAEV,QAAqBhc,KADrBmV,EAAO2G,EAAK1G,GAAM,IACT8G,QAAuB,CAC9B,IAAIjG,EAAYpE,EAAQ,IAAMuD,EAAK,IACnChF,GAAO,SAAW,EAAc,mBAAqB,EAAc,MAEjEA,GADyB,UAAvB7H,EAAG3C,KAAKiW,YACH,IAAOtT,EAAG7C,WAAWyP,EAAK+G,SAAY,IAEtC,IAAOhiB,KAAKE,UAAU+a,EAAK+G,SAAY,IAEhD9L,GAAO,MAMjB,IAAI+L,EAAO2B,EAAYhR,MACvB,GAAIqP,EAGF,IAFA,IAAI6B,EAAO5B,GAAM,EACfC,EAAKF,EAAKtiB,OAAS,EACduiB,EAAKC,GAEV,GADA2B,EAAQ7B,EAAKC,GAAM,GACf2B,EAAeC,GAAQ,CACzB,IAAI9H,EAAQ8H,EAAMtkB,KAAK6O,EAAIyV,EAAMpV,QAASkV,EAAYjR,MAClDqJ,IACF9F,GAAO,IAAM,EAAU,IACnB4C,IACFyL,GAAmB,MAU7B,GAJIzL,IACF5C,GAAO,IAAM,EAAoB,IACjCqO,EAAkB,IAEhBX,EAAYjR,OACduD,GAAO,MACHuO,GAAeA,IAAgBb,EAAYjR,OAASkS,GAAgB,CACtE3O,GAAO,WACP,IAAI0C,EAAcvK,EAAGpD,WAAa,QAChC4N,EAAiBxK,EAAGnD,cAAgB,QAClC4O,EAAaA,MACjBA,EAAWxG,KAAK4C,GAChBA,EAAM,IACkB,IAApB7H,EAAG0L,cACL7D,GAAO,iBAAoBqD,GAAiB,QAAU,oCAA0ClL,EAAY,UAAI,kBAAqBA,EAAG7G,KAAKuG,eAAe8K,GAAmB,uBAE7K3C,GADEwO,EACK,GAAMD,EAAYtG,KAAK,KAEvB,GAAK,EAEdjI,GAAO,QACkB,IAArB7H,EAAG3C,KAAKsO,WACV9D,GAAO,0BAELA,GADEwO,EACK,GAAMD,EAAYtG,KAAK,KAEvB,GAAK,EAEdjI,GAAO,MAEL7H,EAAG3C,KAAKuO,UACV/D,GAAO,6BAA+B,EAAgB,mCAAsC7H,EAAa,WAAI,YAAc,EAAU,KAEvI6H,GAAO,OAEPA,GAAO,OAET,IAAIgE,EAAQhE,EACZA,EAAM4D,EAAWK,MAGbjE,IAFC7H,EAAG+L,eAAiBtB,EACnBzK,EAAGkI,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCL,GAAO,MAGP4C,IACF5C,GAAO,mBAELA,GADEmO,EACK,IAEA,QAAU,EAEnBnO,GAAO,OACPsO,GAAmB,MAyC7B,OAnCI1L,IACF5C,GAAO,IAAM,EAAoB,KAE/BmO,GACExZ,GACFqL,GAAO,6CACPA,GAAO,+CAEPA,GAAO,+BACPA,GAAO,gCAETA,GAAO,yBAEPA,GAAO,QAAU,EAAW,sBAAwB,EAAS,IAE/DA,EAAM7H,EAAG7G,KAAKyO,YAAYC,GACtBmO,IACFnO,EAAM7H,EAAG7G,KAAK8O,iBAAiBJ,EAAKrL,IAkB/BqL,QAGHgP,IAAI,SAAS7lB,EAAQhB,EAAOD,GAClC,aAEA,IAAIuW,EAAa,yBACbvI,EAAiB/M,EAAQ,kBAE7BhB,EAAOD,SACL+mB,IAYF,SAAoBzW,EAASH,GA8C3B,SAAS6W,EAAS1W,EAASyF,EAAU5F,GAEnC,IAAK,IADD8W,EACK/lB,EAAE,EAAGA,EAAE+L,EAAM1L,OAAQL,IAAK,CACjC,IAAIgmB,EAAKja,EAAM/L,GACf,GAAIgmB,EAAG3S,MAAQwB,EAAU,CACvBkR,EAAYC,EACZ,OAICD,GAEHha,EAAMiI,KADN+R,GAAc1S,KAAMwB,EAAUvB,WAIhC,IAAIzE,GACFO,QAASA,EACTH,WAAYA,EACZkF,QAAQ,EACRjU,KAAM4M,EACNmH,WAAYhF,EAAWgF,YAEzB8R,EAAUzS,MAAMU,KAAKnF,GACrB9C,EAAMoI,OAAO/E,GAAWP,EAI1B,SAAS+F,EAAcC,GACrB,IAAK9I,EAAM0H,MAAMoB,GAAW,MAAM,IAAI5U,MAAM,gBAAkB4U,GAvEhE,IAAI9I,EAAQ1M,KAAK0M,MAEjB,GAAIA,EAAM/K,SAASoO,GACjB,MAAM,IAAInP,MAAM,WAAamP,EAAU,uBAEzC,IAAKiG,EAAWpM,KAAKmG,GACnB,MAAM,IAAInP,MAAM,WAAamP,EAAU,8BAEzC,GAAIH,EAAY,CACd,GAAIA,EAAWE,YAA8B3I,IAArByI,EAAW4O,MACjC,MAAM,IAAI5d,MAAM,qDAElB,IAAI4U,EAAW5F,EAAWoE,KAC1B,GAAI/B,MAAMC,QAAQsD,GAAW,CAC3B,IAAI7U,EAAGwU,EAAMK,EAASxU,OACtB,IAAKL,EAAE,EAAGA,EAAEwU,EAAKxU,IAAK4U,EAAcC,EAAS7U,IAC7C,IAAKA,EAAE,EAAGA,EAAEwU,EAAKxU,IAAK8lB,EAAS1W,EAASyF,EAAS7U,GAAIiP,QAEjD4F,GAAUD,EAAcC,GAC5BiR,EAAS1W,EAASyF,EAAU5F,GAG9B,IAAIoJ,GAA6B,IAArBpJ,EAAWoJ,OAAkBhZ,KAAK+G,MAAMiS,MACpD,GAAIA,IAAUpJ,EAAW3L,SACvB,MAAM,IAAIrD,MAAM,qDAElB,IAAIO,EAAayO,EAAWzO,WACxBA,IACE6X,IACF7X,GACEW,OACEX,GACEY,KAAQ,oFAIhB6N,EAAWD,eAAiB3P,KAAKsL,QAAQnK,GAAY,IAsCzD,OAlCAuL,EAAM/K,SAASoO,GAAWrD,EAAMyH,IAAIpE,IAAW,EAkCxC/P,MAxFPsC,IAkGF,SAAoByN,GAElB,IAAIP,EAAOxP,KAAK0M,MAAMoI,OAAO/E,GAC7B,OAAOP,EAAOA,EAAKI,WAAa5P,KAAK0M,MAAM/K,SAASoO,KAAY,GApGhE6W,OA8GF,SAAuB7W,GAErB,IAAIrD,EAAQ1M,KAAK0M,aACVA,EAAM/K,SAASoO,UACfrD,EAAMyH,IAAIpE,UACVrD,EAAMoI,OAAO/E,GACpB,IAAK,IAAIpP,EAAE,EAAGA,EAAE+L,EAAM1L,OAAQL,IAE5B,IAAK,IADDsT,EAAQvH,EAAM/L,GAAGsT,MACZzS,EAAE,EAAGA,EAAEyS,EAAMjT,OAAQQ,IAC5B,GAAIyS,EAAMzS,GAAGuO,SAAWA,EAAS,CAC/BkE,EAAM3D,OAAO9O,EAAG,GAChB,MAIN,OAAOxB,SAGN6mB,iBAAiB,KAAKC,IAAI,SAASpmB,EAAQhB,EAAOD,GACrD,aAIAC,EAAOD,QAAU,SAAU8I,GACzB,IAAIwe,EAAcxe,EAAIxB,MAAMggB,YACxBC,EAAsC,iBAAfD,GACHhlB,KAAMglB,GACRxe,EAAIxC,UANP,2CAOOhE,KAPP,6CAUnBwG,EAAI0e,WAAW,iBAEb9lB,YACE6S,KAAM,SACN2N,sBACE3N,KAAM,SACNjQ,UAAY,UACZF,YACEZ,SACE+Q,KAAM,UACN9Q,QAAS,GAEXA,SACE8Q,KAAM,UACN9Q,QAAS,GAEXrB,OAAQmlB,GAEVrF,sBAAsB,MAI5BpZ,EAAImE,MAAMyH,IAAItQ,WAAW+Q,WAAWD,KAAK,uBAGrCuS,IAAI,SAASxmB,EAAQhB,EAAOD,GAClCC,EAAOD,SACHqG,QAAW,0CACXyf,IAAO,gFACP4B,YAAe,mEACfnT,KAAQ,SACRjQ,UAAc,SACdF,YACImV,OACIhF,KAAQ,SACRlS,QACMiB,OAAU,0BACVA,OAAU,mBAIxB4e,sBAAwB,QAGtByF,IAAI,SAAS1mB,EAAQhB,EAAOD,GAClCC,EAAOD,SACHqG,QAAW,0CACXyf,IAAO,0CACP8B,MAAS,0BACTC,aACIC,aACIvT,KAAQ,QACR5Q,SAAY,EACZJ,OAAWjB,KAAQ,MAEvBylB,oBACIxT,KAAQ,UACR9Q,QAAW,GAEfukB,4BACI/kB,QACMX,KAAQ,qCACRshB,QAAW,KAGrBqE,aACI5kB,MACI,QACA,UACA,UACA,OACA,SACA,SACA,WAGR6kB,aACI3T,KAAQ,QACRhR,OAAWgR,KAAQ,UACnBhQ,aAAe,EACfqf,aAGRrP,MAAS,SAAU,WACnBnQ,YACI0hB,KACIvR,KAAQ,SACRjR,OAAU,iBAEd+C,SACIkO,KAAQ,SACRjR,OAAU,OAEdhB,MACIiS,KAAQ,SACRjR,OAAU,iBAEdskB,OACIrT,KAAQ,UAEZmT,aACInT,KAAQ,UAEZqP,WACAuE,UACI5T,KAAQ,QACRhR,UAEJS,YACIuQ,KAAQ,SACR6T,iBAAoB,GAExB5kB,SACI+Q,KAAQ,UAEZ8T,kBACI9T,KAAQ,UAEZ9Q,SACI8Q,KAAQ,UAEZ6T,kBACI7T,KAAQ,UAEZ3Q,WAAetB,KAAQ,oCACvBuB,WAAevB,KAAQ,4CACvB6B,SACIoQ,KAAQ,SACRjR,OAAU,SAEd2d,iBAAqB3e,KAAQ,KAC7BiB,OACIlB,QACMC,KAAQ,MACRA,KAAQ,8BAEdshB,YAEJlgB,UAAcpB,KAAQ,oCACtBqB,UAAcrB,KAAQ,4CACtBiC,aACIgQ,KAAQ,UACRqP,SAAW,GAEfzgB,UAAcb,KAAQ,KACtBwB,eAAmBxB,KAAQ,oCAC3ByB,eAAmBzB,KAAQ,4CAC3BgC,UAAchC,KAAQ,6BACtB4f,sBAA0B5f,KAAQ,KAClCulB,aACItT,KAAQ,SACR2N,sBAA0B5f,KAAQ,KAClCshB,YAEJxf,YACImQ,KAAQ,SACR2N,sBAA0B5f,KAAQ,KAClCshB,YAEJ7B,mBACIxN,KAAQ,SACR2N,sBAA0B5f,KAAQ,KAClCshB,YAEJxgB,cACImR,KAAQ,SACR2N,sBACI7f,QACMC,KAAQ,MACRA,KAAQ,gCAItB+B,eAAmB/B,KAAQ,KAC3BY,SACAG,MACIkR,KAAQ,QACR5Q,SAAY,EACZY,aAAe,GAEnBgQ,MACIlS,QACMC,KAAQ,8BAENiS,KAAQ,QACRhR,OAAWjB,KAAQ,6BACnBqB,SAAY,EACZY,aAAe,KAI3BjB,QAAYiR,KAAQ,UACpBtR,OAAWX,KAAQ,6BACnBD,OAAWC,KAAQ,6BACnB4B,OAAW5B,KAAQ,6BACnB2B,KAAS3B,KAAQ,MAErBshB,iBAGE0E,IAAI,SAASrnB,EAAQhB,EAAOD,GA2ClC,SAASoO,EAAGma,GACV,IAAIC,EAAMjoB,KACNkoB,EAAO1W,EAAMzQ,KAAK8K,UAAW,GAKjC,OAAO,IAAI7F,QAAQ,SAASC,EAASkiB,GAYnC,SAASC,EAAYvX,GACnB,IAAIwX,EACJ,IACEA,EAAML,EAAIM,KAAKzX,GACf,MAAO3Q,GACP,OAAOioB,EAAOjoB,GAEhBooB,EAAKD,GASP,SAASE,EAAWC,GAClB,IAAIH,EACJ,IACEA,EAAML,EAAIS,MAAMD,GAChB,MAAOtoB,GACP,OAAOioB,EAAOjoB,GAEhBooB,EAAKD,GAYP,SAASC,EAAKD,GACZ,GAAIA,EAAIK,KAAM,OAAOziB,EAAQoiB,EAAIhmB,OACjC,IAAIA,EAAQsmB,EAAU5nB,KAAKknB,EAAKI,EAAIhmB,OACpC,OAAIA,GAASumB,EAAUvmB,GAAeA,EAAM4E,KAAKmhB,EAAaG,GACvDA,EAAW,IAAIM,UAAU,8GACeC,OAAOT,EAAIhmB,OAAS,MAlDrE,GADmB,mBAAR2lB,IAAoBA,EAAMA,EAAIpc,MAAMqc,EAAKC,KAC/CF,GAA2B,mBAAbA,EAAIM,KAAqB,OAAOriB,EAAQ+hB,GAE3DI,MA6DJ,SAASO,EAAU1T,GACjB,OAAKA,EACD2T,EAAU3T,GAAaA,EAuG7B,SAA6BA,GAC3B,IAAI7M,EAAc6M,EAAI7M,YACtB,QAAKA,IACD,sBAAwBA,EAAY2gB,MAAQ,sBAAwB3gB,EAAY4gB,aAC7EC,EAAY7gB,EAAYjG,YA1G3B+mB,CAAoBjU,IAAQgU,EAAYhU,GAAapH,EAAG9M,KAAKf,KAAMiV,GACnE,mBAAqBA,EAc3B,SAAwBkU,GACtB,IAAIlB,EAAMjoB,KACV,OAAO,IAAIgG,QAAQ,SAAUC,EAASkiB,GACpCgB,EAAGpoB,KAAKknB,EAAK,SAAUO,EAAK3X,GAC1B,GAAI2X,EAAK,OAAOL,EAAOK,GACnB3c,UAAU7K,OAAS,IAAG6P,EAAMW,EAAMzQ,KAAK8K,UAAW,IACtD5F,EAAQ4K,QApBwC9P,KAAKf,KAAMiV,GAC3DhD,MAAMC,QAAQ+C,GAiCpB,SAAwBA,GACtB,OAAOjP,QAAQmO,IAAIc,EAAIV,IAAIoU,EAAW3oB,QAlCQe,KAAKf,KAAMiV,GAmH3D,SAAkBmU,GAChB,OAAOlhB,QAAUkhB,EAAIhhB,YAnHjBihB,CAASpU,GA6Cf,SAAyBA,GAIvB,IAAK,IAHDqU,EAAU,IAAIrU,EAAI7M,YAClBqM,EAAOvM,OAAOuM,KAAKQ,GACnBsU,KACK5oB,EAAI,EAAGA,EAAI8T,EAAKzT,OAAQL,IAAK,CACpC,IAAIiB,EAAM6S,EAAK9T,GACX6oB,EAAUb,EAAU5nB,KAAKf,KAAMiV,EAAIrT,IACnC4nB,GAAWZ,EAAUY,GAO3B,SAAeA,EAAS5nB,GAEtB0nB,EAAQ1nB,QAAOuF,EACfoiB,EAAS5U,KAAK6U,EAAQviB,KAAK,SAAU4J,GACnCyY,EAAQ1nB,GAAOiP,KAXkB4Y,CAAMD,EAAS5nB,GAC7C0nB,EAAQ1nB,GAAOqT,EAAIrT,GAE1B,OAAOoE,QAAQmO,IAAIoV,GAAUtiB,KAAK,WAChC,OAAOqiB,KAxDiCvoB,KAAKf,KAAMiV,GAC9CA,EANUA,EAiFnB,SAAS2T,EAAU3T,GACjB,MAAO,mBAAqBA,EAAIhO,KAWlC,SAASgiB,EAAYhU,GACnB,MAAO,mBAAqBA,EAAIqT,MAAQ,mBAAqBrT,EAAIwT,MA5MnE,IAAIjX,EAAQS,MAAM9P,UAAUqP,MAM5B9R,EAAOD,QAAUoO,EAAY,QAAIA,EAAGA,GAAKA,EAczCA,EAAG6b,KAAO,SAAUP,GAGlB,SAASQ,IACP,OAAO9b,EAAG9M,KAAKf,KAAMmpB,EAAGvd,MAAM5L,KAAM6L,YAFtC,OADA8d,EAAcC,sBAAwBT,EAC/BQ,QAmNHE,IAAI,SAASnpB,EAAQhB,EAAOD,GAClC,aAEAC,EAAOD,QAAU,SAASqO,EAAMrN,EAAG2V,GACjC,GAAI3V,IAAM2V,EAAG,OAAO,EAEpB,IAEIzV,EAFAmpB,EAAO7X,MAAMC,QAAQzR,GACrBspB,EAAO9X,MAAMC,QAAQkE,GAGzB,GAAI0T,GAAQC,EAAM,CAChB,GAAItpB,EAAEO,QAAUoV,EAAEpV,OAAQ,OAAO,EACjC,IAAKL,EAAI,EAAGA,EAAIF,EAAEO,OAAQL,IACxB,IAAKmN,EAAMrN,EAAEE,GAAIyV,EAAEzV,IAAK,OAAO,EACjC,OAAO,EAGT,GAAImpB,GAAQC,EAAM,OAAO,EAEzB,GAAItpB,GAAK2V,GAAkB,iBAAN3V,GAA+B,iBAAN2V,EAAgB,CAC5D,IAAI3B,EAAOvM,OAAOuM,KAAKhU,GACvB,GAAIgU,EAAKzT,SAAWkH,OAAOuM,KAAK2B,GAAGpV,OAAQ,OAAO,EAElD,IAAIgpB,EAAQvpB,aAAawpB,KACrBC,EAAQ9T,aAAa6T,KACzB,GAAID,GAASE,EAAO,OAAOzpB,EAAE0pB,WAAa/T,EAAE+T,UAC5C,GAAIH,GAASE,EAAO,OAAO,EAE3B,IAAIE,EAAU3pB,aAAaoJ,OACvBwgB,EAAUjU,aAAavM,OAC3B,GAAIugB,GAAWC,EAAS,OAAO5pB,EAAE6pB,YAAclU,EAAEkU,WACjD,GAAIF,GAAWC,EAAS,OAAO,EAE/B,IAAK1pB,EAAI,EAAGA,EAAI8T,EAAKzT,OAAQL,IAC3B,IAAKuH,OAAO/F,UAAUooB,eAAexpB,KAAKqV,EAAG3B,EAAK9T,IAAK,OAAO,EAEhE,IAAKA,EAAI,EAAGA,EAAI8T,EAAKzT,OAAQL,IAC3B,IAAImN,EAAMrN,EAAEgU,EAAK9T,IAAKyV,EAAE3B,EAAK9T,KAAM,OAAO,EAE5C,OAAO,EAGT,OAAO,QAGH6pB,IAAI,SAAS9pB,EAAQhB,EAAOD,GAClC,aAEAC,EAAOD,QAAU,SAAUgW,EAAM1I,GACxBA,IAAMA,MACS,mBAATA,IAAqBA,GAAS0d,IAAK1d,IAC9C,IAAI2d,EAAiC,kBAAhB3d,EAAK2d,QAAwB3d,EAAK2d,OAEnDD,EAAM1d,EAAK0d,KAAO,SAAWjrB,GAC7B,OAAO,SAAUmrB,GACb,OAAO,SAAUlqB,EAAG2V,GAGhB,OAAO5W,GAFMoC,IAAKnB,EAAG4B,MAAOsoB,EAAKlqB,KACpBmB,IAAKwU,EAAG/T,MAAOsoB,EAAKvU,OAJvB,CAQnBrJ,EAAK0d,KAEJG,KACJ,OAAO,SAAUrpB,EAAWopB,GAKxB,GAJIA,GAAQA,EAAKE,QAAiC,mBAAhBF,EAAKE,SACnCF,EAAOA,EAAKE,eAGH1jB,IAATwjB,EAAJ,CACA,GAAmB,iBAARA,EAAkB,OAAOG,SAASH,GAAQ,GAAKA,EAAO,OACjE,GAAoB,iBAATA,EAAmB,OAAOtpB,KAAKE,UAAUopB,GAEpD,IAAIhqB,EAAG4W,EACP,GAAItF,MAAMC,QAAQyY,GAAO,CAErB,IADApT,EAAM,IACD5W,EAAI,EAAGA,EAAIgqB,EAAK3pB,OAAQL,IACrBA,IAAG4W,GAAO,KACdA,GAAOhW,EAAUopB,EAAKhqB,KAAO,OAEjC,OAAO4W,EAAM,IAGjB,GAAa,OAAToT,EAAe,MAAO,OAE1B,IAA4B,IAAxBC,EAAKtK,QAAQqK,GAAc,CAC3B,GAAID,EAAQ,OAAOrpB,KAAKE,UAAU,aAClC,MAAM,IAAIsnB,UAAU,yCAGxB,IAAIkC,EAAYH,EAAKjW,KAAKgW,GAAQ,EAC9BlW,EAAOvM,OAAOuM,KAAKkW,GAAMK,KAAKP,GAAOA,EAAIE,IAE7C,IADApT,EAAM,GACD5W,EAAI,EAAGA,EAAI8T,EAAKzT,OAAQL,IAAK,CAC9B,IAAIiB,EAAM6S,EAAK9T,GACX0B,EAAQd,EAAUopB,EAAK/oB,IAEtBS,IACDkV,IAAKA,GAAO,KAChBA,GAAOlW,KAAKE,UAAUK,GAAO,IAAMS,GAGvC,OADAuoB,EAAKta,OAAOya,EAAW,GAChB,IAAMxT,EAAM,KAtChB,CAuCJ9B,SAGDwV,IAAI,SAASvqB,EAAQhB,EAAOD,GAClC,aAuDA,SAASyrB,EAAUne,EAAMoe,EAAItpB,EAAQwR,EAASC,EAAYC,EAAeC,EAAe/D,EAAcgE,GACpG,GAAI5R,GAA2B,iBAAVA,IAAuBoQ,MAAMC,QAAQrQ,GAAS,CACjEspB,EAAGtpB,EAAQwR,EAASC,EAAYC,EAAeC,EAAe/D,EAAcgE,GAC5E,IAAK,IAAI7R,KAAOC,EAAQ,CACtB,IAAIgE,EAAMhE,EAAOD,GACjB,GAAIqQ,MAAMC,QAAQrM,IAChB,GAAIjE,KAAOkR,EAASsY,cAClB,IAAK,IAAIzqB,EAAE,EAAGA,EAAEkF,EAAI7E,OAAQL,IAC1BuqB,EAAUne,EAAMoe,EAAItlB,EAAIlF,GAAI0S,EAAU,IAAMzR,EAAM,IAAMjB,EAAG2S,EAAYD,EAASzR,EAAKC,EAAQlB,QAE5F,GAAIiB,KAAOkR,EAASuY,eACzB,GAAIxlB,GAAqB,iBAAPA,EAChB,IAAK,IAAIiT,KAAQjT,EACfqlB,EAAUne,EAAMoe,EAAItlB,EAAIiT,GAAOzF,EAAU,IAAMzR,EAAM,IAUjE,SAAuBoH,GACrB,OAAOA,EAAI4J,QAAQ,KAAM,MAAMA,QAAQ,MAAO,MAXuB0Y,CAAcxS,GAAOxF,EAAYD,EAASzR,EAAKC,EAAQiX,QAE7GlX,KAAOkR,EAASnR,UAAaoL,EAAKqG,WAAaxR,KAAOkR,EAASyY,gBACxEL,EAAUne,EAAMoe,EAAItlB,EAAKwN,EAAU,IAAMzR,EAAK0R,EAAYD,EAASzR,EAAKC,KArEhF,IAAIiR,EAAWpT,EAAOD,QAAU,SAAUoC,EAAQkL,EAAMoe,GACnC,mBAARpe,IACToe,EAAKpe,EACLA,MAEFme,EAAUne,EAAMoe,EAAItpB,EAAQ,GAAIA,IAIlCiR,EAASnR,UACP+e,iBAAiB,EACjB1d,OAAO,EACPJ,UAAU,EACV+e,sBAAsB,EACtB7d,eAAe,EACfJ,KAAK,GAGPoP,EAASsY,eACPpoB,OAAO,EACPN,OAAO,EACPZ,OAAO,EACP6B,OAAO,GAGTmP,EAASuY,eACP/D,aAAa,EACbzjB,YAAY,EACZ2d,mBAAmB,EACnB3e,cAAc,GAGhBiQ,EAASyY,cACPzoB,MAAM,EACNH,OAAO,EACPoB,UAAU,EACVd,SAAS,EACTC,SAAS,EACT4kB,kBAAkB,EAClBD,kBAAkB,EAClBpkB,YAAY,EACZJ,WAAW,EACXC,WAAW,EACXM,SAAS,EACTb,QAAQ,EACRI,UAAU,EACVC,UAAU,EACVY,aAAa,EACbT,eAAe,EACfC,eAAe,QA+BXgoB,IAAI,SAAS9qB,EAAQhB,EAAOD,IAClC,SAAWK,IAET,SAASyL,GAgEV,SAAS0C,EAAM+F,GACd,MAAM,IAAIyX,WAAWnjB,EAAO0L,IAW7B,SAASO,EAAImC,EAAOyS,GAGnB,IAFA,IAAInoB,EAAS0V,EAAM1V,OACf2K,KACG3K,KACN2K,EAAO3K,GAAUmoB,EAAGzS,EAAM1V,IAE3B,OAAO2K,EAaR,SAAS+f,EAAUC,EAAQxC,GAC1B,IAAI1X,EAAQka,EAAOjqB,MAAM,KACrBiK,EAAS,GACT8F,EAAMzQ,OAAS,IAGlB2K,EAAS8F,EAAM,GAAK,IACpBka,EAASla,EAAM,IAMhB,OAAO9F,EADO4I,GAFdoX,EAASA,EAAO/Y,QAAQgZ,EAAiB,MACrBlqB,MAAM,KACAynB,GAAI3J,KAAK,KAiBpC,SAASqM,EAAWF,GAMnB,IALA,IAGItpB,EACAypB,EAJAC,KACAC,EAAU,EACVhrB,EAAS2qB,EAAO3qB,OAGbgrB,EAAUhrB,IAChBqB,EAAQspB,EAAOtW,WAAW2W,OACb,OAAU3pB,GAAS,OAAU2pB,EAAUhrB,EAG3B,QAAX,OADb8qB,EAAQH,EAAOtW,WAAW2W,OAEzBD,EAAOpX,OAAe,KAARtS,IAAkB,KAAe,KAARypB,GAAiB,QAIxDC,EAAOpX,KAAKtS,GACZ2pB,KAGDD,EAAOpX,KAAKtS,GAGd,OAAO0pB,EAWR,SAASE,EAAWvV,GACnB,OAAOnC,EAAImC,EAAO,SAASrU,GAC1B,IAAI0pB,EAAS,GAOb,OANI1pB,EAAQ,QAEX0pB,GAAUG,GADV7pB,GAAS,SAC8B,GAAK,KAAQ,OACpDA,EAAQ,MAAiB,KAARA,GAElB0pB,GAAUG,EAAmB7pB,KAE3Bmd,KAAK,IAYT,SAAS2M,EAAaC,GACrB,OAAIA,EAAY,GAAK,GACbA,EAAY,GAEhBA,EAAY,GAAK,GACbA,EAAY,GAEhBA,EAAY,GAAK,GACbA,EAAY,GAEbC,EAcR,SAASC,EAAaC,EAAOC,GAG5B,OAAOD,EAAQ,GAAK,IAAMA,EAAQ,MAAgB,GAARC,IAAc,GAQzD,SAASC,EAAMC,EAAOC,EAAWC,GAChC,IAAIlY,EAAI,EAGR,IAFAgY,EAAQE,EAAYC,EAAMH,EAAQI,GAAQJ,GAAS,EACnDA,GAASG,EAAMH,EAAQC,GACOD,EAAQK,EAAgBC,GAAQ,EAAGtY,GAAK2X,EACrEK,EAAQG,EAAMH,EAAQK,GAEvB,OAAOF,EAAMnY,GAAKqY,EAAgB,GAAKL,GAASA,EAAQO,IAUzD,SAASC,EAAOC,GAEf,IAEI5V,EAIA6V,EACA5rB,EACA0N,EACAme,EACAC,EACA5Y,EACA6X,EACApsB,EAEAotB,EAfAxB,KACAyB,EAAcL,EAAMnsB,OAEpBL,EAAI,EACJP,EAAIqtB,EACJC,EAAOC,EAqBX,KALAP,EAAQD,EAAMS,YAAYC,IACd,IACXT,EAAQ,GAGJ5rB,EAAI,EAAGA,EAAI4rB,IAAS5rB,EAEpB2rB,EAAM9X,WAAW7T,IAAM,KAC1ByM,EAAM,aAEP8d,EAAOpX,KAAKwY,EAAM9X,WAAW7T,IAM9B,IAAK0N,EAAQke,EAAQ,EAAIA,EAAQ,EAAI,EAAGle,EAAQse,GAAwC,CAOvF,IAAKH,EAAO1sB,EAAG2sB,EAAI,EAAG5Y,EAAI2X,EAErBnd,GAASse,GACZvf,EAAM,mBAGPse,EAAQJ,EAAagB,EAAM9X,WAAWnG,QAEzBmd,GAAQE,EAAQM,GAAOiB,EAASntB,GAAK2sB,KACjDrf,EAAM,YAGPtN,GAAK4rB,EAAQe,EACbntB,EAAIuU,GAAKgZ,EAAOK,EAAQrZ,GAAKgZ,EAAOV,EAAOA,EAAOtY,EAAIgZ,IAElDnB,EAAQpsB,GAfuCuU,GAAK2X,EAoBpDiB,EAAIT,EAAMiB,GADdP,EAAalB,EAAOlsB,KAEnB8N,EAAM,YAGPqf,GAAKC,EAKNG,EAAOjB,EAAM9rB,EAAI0sB,EADjB9V,EAAMwU,EAAO/qB,OAAS,EACc,GAARqsB,GAIxBR,EAAMlsB,EAAI4W,GAAOuW,EAAS1tB,GAC7B6N,EAAM,YAGP7N,GAAKysB,EAAMlsB,EAAI4W,GACf5W,GAAK4W,EAGLwU,EAAOzb,OAAO3P,IAAK,EAAGP,GAIvB,OAAO6rB,EAAWF,GAUnB,SAASiC,EAAOb,GACf,IAAI/sB,EACAssB,EACAuB,EACAC,EACAR,EACAlsB,EACA2sB,EACAC,EACA1Z,EACAvU,EACAkuB,EAGAb,EAEAc,EACAf,EACAgB,EANAxC,KAoBJ,IARAyB,GAHAL,EAAQtB,EAAWsB,IAGCnsB,OAGpBZ,EAAIqtB,EACJf,EAAQ,EACRgB,EAAOC,EAGFnsB,EAAI,EAAGA,EAAIgsB,IAAehsB,GAC9B6sB,EAAelB,EAAM3rB,IACF,KAClBuqB,EAAOpX,KAAKuX,EAAmBmC,IAejC,IAXAJ,EAAiBC,EAAcnC,EAAO/qB,OAMlCktB,GACHnC,EAAOpX,KAAKkZ,GAINI,EAAiBT,GAAa,CAIpC,IAAKW,EAAIL,EAAQtsB,EAAI,EAAGA,EAAIgsB,IAAehsB,GAC1C6sB,EAAelB,EAAM3rB,KACDpB,GAAKiuB,EAAeF,IACvCA,EAAIE,GAcN,IAPIF,EAAI/tB,EAAIysB,GAAOiB,EAASpB,IAD5B4B,EAAwBL,EAAiB,KAExChgB,EAAM,YAGPye,IAAUyB,EAAI/tB,GAAKkuB,EACnBluB,EAAI+tB,EAEC3sB,EAAI,EAAGA,EAAIgsB,IAAehsB,EAO9B,IANA6sB,EAAelB,EAAM3rB,IAEFpB,KAAOssB,EAAQoB,GACjC7f,EAAM,YAGHogB,GAAgBjuB,EAAG,CAEtB,IAAKguB,EAAI1B,EAAOhY,EAAI2X,EACnBlsB,EAAIuU,GAAKgZ,EAAOK,EAAQrZ,GAAKgZ,EAAOV,EAAOA,EAAOtY,EAAIgZ,IAClDU,EAAIjuB,GAFqCuU,GAAK2X,EAOlDN,EAAOpX,KACNuX,EAAmBI,EAAansB,GAHjCouB,EAAUH,EAAIjuB,IACdotB,EAAalB,EAAOlsB,GAEuC,KAE3DiuB,EAAIvB,EAAM0B,EAAUhB,GAGrBxB,EAAOpX,KAAKuX,EAAmBI,EAAa8B,EAAG,KAC/CV,EAAOjB,EAAMC,EAAO4B,EAAuBL,GAAkBC,GAC7DxB,EAAQ,IACNuB,IAIFvB,IACAtsB,EAGH,OAAO2rB,EAAOvM,KAAK,IAlbpB,IAAIgP,EAAgC,iBAAX/uB,GAAuBA,IAC9CA,EAAQgvB,UAAYhvB,EAClBivB,EAA8B,iBAAVhvB,GAAsBA,IAC5CA,EAAO+uB,UAAY/uB,EACjBivB,EAA8B,iBAAV7uB,GAAsBA,EAE7C6uB,EAAW7uB,SAAW6uB,GACtBA,EAAW9uB,SAAW8uB,GACtBA,EAAW5uB,OAAS4uB,IAEpBpjB,EAAOojB,GAQR,IAAIC,EAiCJhtB,EA9BAksB,EAAS,WAGTzB,EAAO,GACP0B,EAAO,EACPf,EAAO,GACPC,EAAO,GACPH,EAAO,IACPa,EAAc,GACdF,EAAW,IACXI,EAAY,IAGZgB,EAAgB,QAChBC,EAAgB,eAChBlD,EAAkB,4BAGlBtjB,GACCymB,SAAY,kDACZC,YAAa,iDACbC,gBAAiB,iBAIlBlC,EAAgBV,EAAO0B,EACvBlB,EAAQnR,KAAKmR,MACbX,EAAqBpD,OAAOoG,aAidrB,GAnCPN,GAMCO,QAAW,QAQXC,MACClC,OAAUrB,EACVmC,OAAU/B,GAEXiB,OAAUA,EACVc,OAAUA,EACVqB,QA/BD,SAAiBlC,GAChB,OAAOzB,EAAUyB,EAAO,SAASxB,GAChC,OAAOmD,EAAcllB,KAAK+hB,GACvB,OAASqC,EAAOrC,GAChBA,KA4BJ2D,UAnDD,SAAmBnC,GAClB,OAAOzB,EAAUyB,EAAO,SAASxB,GAChC,OAAOkD,EAAcjlB,KAAK+hB,GACvBuB,EAAOvB,EAAOna,MAAM,GAAG+d,eACvB5D,MA6DM6C,GAAeE,EACzB,GAAIhvB,EAAOD,SAAW+uB,EAErBE,EAAWjvB,QAAUmvB,OAGrB,IAAKhtB,KAAOgtB,EACXA,EAASrE,eAAe3oB,KAAS4sB,EAAY5sB,GAAOgtB,EAAShtB,SAK/D2J,EAAKqjB,SAAWA,EAhhBjB,CAmhBC5uB,QAECe,KAAKf,KAAuB,oBAAXF,OAAyBA,OAAyB,oBAATC,KAAuBA,KAAyB,oBAAXF,OAAyBA,gBACrH2vB,IAAI,SAAS9uB,EAAQhB,EAAOD,GAsBlC,aAKA,SAAS8qB,EAAetV,EAAK6D,GAC3B,OAAO5Q,OAAO/F,UAAUooB,eAAexpB,KAAKkU,EAAK6D,GAGnDpZ,EAAOD,QAAU,SAASgwB,EAAIC,EAAKC,EAAIC,GACrCF,EAAMA,GAAO,IACbC,EAAKA,GAAM,IACX,IAAI1a,KAEJ,GAAkB,iBAAPwa,GAAiC,IAAdA,EAAGzuB,OAC/B,OAAOiU,EAGT,IAAI4a,EAAS,MACbJ,EAAKA,EAAG/tB,MAAMguB,GAEd,IAAII,EAAU,IACVF,GAAsC,iBAApBA,EAAQE,UAC5BA,EAAUF,EAAQE,SAGpB,IAAI3a,EAAMsa,EAAGzuB,OAET8uB,EAAU,GAAK3a,EAAM2a,IACvB3a,EAAM2a,GAGR,IAAK,IAAInvB,EAAI,EAAGA,EAAIwU,IAAOxU,EAAG,CAC5B,IAEIovB,EAAMC,EAAMtb,EAAGnN,EAFf0oB,EAAIR,EAAG9uB,GAAGiS,QAAQid,EAAQ,OAC1BK,EAAMD,EAAE3P,QAAQqP,GAGhBO,GAAO,GACTH,EAAOE,EAAEE,OAAO,EAAGD,GACnBF,EAAOC,EAAEE,OAAOD,EAAM,KAEtBH,EAAOE,EACPD,EAAO,IAGTtb,EAAI4E,mBAAmByW,GACvBxoB,EAAI+R,mBAAmB0W,GAElBzF,EAAetV,EAAKP,GAEdxC,EAAQ+C,EAAIP,IACrBO,EAAIP,GAAGC,KAAKpN,GAEZ0N,EAAIP,IAAMO,EAAIP,GAAInN,GAJlB0N,EAAIP,GAAKnN,EAQb,OAAO0N,GAGT,IAAI/C,EAAUD,MAAMC,SAAW,SAAUke,GACvC,MAA8C,mBAAvCloB,OAAO/F,UAAUmoB,SAASvpB,KAAKqvB,SAGlCC,IAAI,SAAS3vB,EAAQhB,EAAOD,GAsBlC,aAgDA,SAAS8U,EAAK6b,EAAI5wB,GAChB,GAAI4wB,EAAG7b,IAAK,OAAO6b,EAAG7b,IAAI/U,GAE1B,IAAK,IADDqR,KACKlQ,EAAI,EAAGA,EAAIyvB,EAAGpvB,OAAQL,IAC7BkQ,EAAI8D,KAAKnV,EAAE4wB,EAAGzvB,GAAIA,IAEpB,OAAOkQ,EApDT,IAAIyf,EAAqB,SAAS/oB,GAChC,cAAeA,GACb,IAAK,SACH,OAAOA,EAET,IAAK,UACH,OAAOA,EAAI,OAAS,QAEtB,IAAK,SACH,OAAOujB,SAASvjB,GAAKA,EAAI,GAE3B,QACE,MAAO,KAIb7H,EAAOD,QAAU,SAASwV,EAAKya,EAAKC,EAAI5G,GAOtC,OANA2G,EAAMA,GAAO,IACbC,EAAKA,GAAM,IACC,OAAR1a,IACFA,OAAM9N,GAGW,iBAAR8N,EACFV,EAAIgc,EAAWtb,GAAM,SAASP,GACnC,IAAI8b,EAAKjX,mBAAmB+W,EAAmB5b,IAAMib,EACrD,OAAIzd,EAAQ+C,EAAIP,IACPH,EAAIU,EAAIP,GAAI,SAASnN,GAC1B,OAAOipB,EAAKjX,mBAAmB+W,EAAmB/oB,MACjDiY,KAAKkQ,GAEDc,EAAKjX,mBAAmB+W,EAAmBrb,EAAIP,OAEvD8K,KAAKkQ,GAIL3G,EACExP,mBAAmB+W,EAAmBvH,IAAS4G,EAC/CpW,mBAAmB+W,EAAmBrb,IAF3B,IAKpB,IAAI/C,EAAUD,MAAMC,SAAW,SAAUke,GACvC,MAA8C,mBAAvCloB,OAAO/F,UAAUmoB,SAASvpB,KAAKqvB,IAYpCG,EAAaroB,OAAOuM,MAAQ,SAAUQ,GACxC,IAAIpE,KACJ,IAAK,IAAIjP,KAAOqT,EACV/M,OAAO/F,UAAUooB,eAAexpB,KAAKkU,EAAKrT,IAAMiP,EAAI8D,KAAK/S,GAE/D,OAAOiP,QAGH4f,IAAI,SAAS/vB,EAAQhB,EAAOD,GAClC,aAEAA,EAAQytB,OAASztB,EAAQ6B,MAAQZ,EAAQ,YACzCjB,EAAQuuB,OAASvuB,EAAQ8B,UAAYb,EAAQ,cAE1CgwB,WAAW,GAAGC,WAAW,KAAKC,IAAI,SAASlwB,EAAQhB,EAAOD,GAsB7D,aAYA,SAASoxB,IACP7wB,KAAKwS,SAAW,KAChBxS,KAAK8wB,QAAU,KACf9wB,KAAK+wB,KAAO,KACZ/wB,KAAK0S,KAAO,KACZ1S,KAAKgxB,KAAO,KACZhxB,KAAK2K,SAAW,KAChB3K,KAAKuR,KAAO,KACZvR,KAAKixB,OAAS,KACdjxB,KAAKkxB,MAAQ,KACblxB,KAAKmxB,SAAW,KAChBnxB,KAAK2S,KAAO,KACZ3S,KAAKyS,KAAO,KAwDd,SAAS2e,EAASvpB,EAAKwpB,EAAkBC,GACvC,GAAIzpB,GAAOgB,EAAKwgB,SAASxhB,IAAQA,aAAegpB,EAAK,OAAOhpB,EAE5D,IAAIrH,EAAI,IAAIqwB,EAEZ,OADArwB,EAAEc,MAAMuG,EAAKwpB,EAAkBC,GACxB9wB,EAnFT,IAAIouB,EAAWluB,EAAQ,YACnBmI,EAAOnI,EAAQ,UAEnBjB,EAAQ6B,MAAQ8vB,EAChB3xB,EAAQwG,QA0ZR,SAAoBkI,EAAQojB,GAC1B,OAAOH,EAASjjB,GAAQ,GAAO,GAAMlI,QAAQsrB,IA1Z/C9xB,EAAQ+xB,cAiaR,SAA0BrjB,EAAQojB,GAChC,OAAKpjB,EACEijB,EAASjjB,GAAQ,GAAO,GAAMqjB,cAAcD,GAD/BA,GAjatB9xB,EAAQsD,OAsVR,SAAmBkS,GAMjB,OADIpM,EAAK4oB,SAASxc,KAAMA,EAAMmc,EAASnc,IACjCA,aAAe4b,EACd5b,EAAIlS,SADuB8tB,EAAI1uB,UAAUY,OAAOhC,KAAKkU,IA1V9DxV,EAAQoxB,IAAMA,EAqBd,IAAIa,EAAkB,oBAClBC,EAAc,WAGdC,EAAoB,qCAOpBC,GAAU,IAAK,IAAK,IAAK,KAAM,IAAK,KAAKhd,QAH/B,IAAK,IAAK,IAAK,IAAK,IAAK,KAAM,KAAM,OAM/Cid,GAAc,KAAMjd,OAAOgd,GAK3BE,GAAgB,IAAK,IAAK,IAAK,IAAK,KAAKld,OAAOid,GAChDE,GAAmB,IAAK,IAAK,KAE7BC,EAAsB,yBACtBC,EAAoB,+BAEpBC,GACEC,YAAc,EACdC,eAAe,GAGjBC,GACEF,YAAc,EACdC,eAAe,GAGjBE,GACEC,MAAQ,EACRC,OAAS,EACTC,KAAO,EACPC,QAAU,EACVC,MAAQ,EACRC,SAAS,EACTC,UAAU,EACVC,QAAQ,EACRC,WAAW,EACXC,SAAS,GAEXC,EAAcxyB,EAAQ,eAU1BmwB,EAAI1uB,UAAUb,MAAQ,SAASuG,EAAKwpB,EAAkBC,GACpD,IAAKzoB,EAAK4oB,SAAS5pB,GACjB,MAAM,IAAIghB,UAAU,gDAAkDhhB,GAMxE,IAAIsrB,EAAatrB,EAAIyY,QAAQ,KACzB8S,GACqB,IAAhBD,GAAqBA,EAAatrB,EAAIyY,QAAQ,KAAQ,IAAM,IACjE+S,EAASxrB,EAAInG,MAAM0xB,GAEvBC,EAAO,GAAKA,EAAO,GAAGzgB,QADL,MACyB,KAG1C,IAAI0gB,EAFJzrB,EAAMwrB,EAAO7T,KAAK4T,GAQlB,GAFAE,EAAOA,EAAKC,QAEPjC,GAA+C,IAA1BzpB,EAAInG,MAAM,KAAKV,OAAc,CAErD,IAAIwyB,EAAa5B,EAAkB6B,KAAKH,GACxC,GAAIE,EAeF,OAdAxzB,KAAK2S,KAAO2gB,EACZtzB,KAAKyS,KAAO6gB,EACZtzB,KAAKmxB,SAAWqC,EAAW,GACvBA,EAAW,IACbxzB,KAAKixB,OAASuC,EAAW,GAEvBxzB,KAAKkxB,MADHG,EACW6B,EAAY5xB,MAAMtB,KAAKixB,OAAOd,OAAO,IAErCnwB,KAAKixB,OAAOd,OAAO,IAEzBkB,IACTrxB,KAAKixB,OAAS,GACdjxB,KAAKkxB,UAEAlxB,KAIX,IAAI0zB,EAAQhC,EAAgB+B,KAAKH,GACjC,GAAII,EAAO,CAET,IAAIC,GADJD,EAAQA,EAAM,IACSnE,cACvBvvB,KAAKwS,SAAWmhB,EAChBL,EAAOA,EAAKnD,OAAOuD,EAAM1yB,QAO3B,GAAIswB,GAAqBoC,GAASJ,EAAKpqB,MAAM,wBAAyB,CACpE,IAAI4nB,EAAgC,OAAtBwC,EAAKnD,OAAO,EAAG,IACzBW,GAAa4C,GAASpB,EAAiBoB,KACzCJ,EAAOA,EAAKnD,OAAO,GACnBnwB,KAAK8wB,SAAU,GAInB,IAAKwB,EAAiBoB,KACjB5C,GAAY4C,IAAUnB,EAAgBmB,IAAU,CAmBnD,IAAK,IADDE,GAAW,EACNjzB,EAAI,EAAGA,EAAIqxB,EAAgBhxB,OAAQL,IAAK,EAElC,KADTkzB,EAAMP,EAAKhT,QAAQ0R,EAAgBrxB,QACP,IAAbizB,GAAkBC,EAAMD,KACzCA,EAAUC,GAKd,IAAI9C,EAAM+C,GAYM,KATdA,GAFe,IAAbF,EAEON,EAAK1F,YAAY,KAIjB0F,EAAK1F,YAAY,IAAKgG,MAM/B7C,EAAOuC,EAAK9hB,MAAM,EAAGsiB,GACrBR,EAAOA,EAAK9hB,MAAMsiB,EAAS,GAC3B9zB,KAAK+wB,KAAOzX,mBAAmByX,IAIjC6C,GAAW,EACX,IAASjzB,EAAI,EAAGA,EAAIoxB,EAAa/wB,OAAQL,IAAK,CAC5C,IAAIkzB,EAAMP,EAAKhT,QAAQyR,EAAapxB,KACvB,IAATkzB,KAA4B,IAAbD,GAAkBC,EAAMD,KACzCA,EAAUC,IAGG,IAAbD,IACFA,EAAUN,EAAKtyB,QAEjBhB,KAAK0S,KAAO4gB,EAAK9hB,MAAM,EAAGoiB,GAC1BN,EAAOA,EAAK9hB,MAAMoiB,GAGlB5zB,KAAK+zB,YAIL/zB,KAAK2K,SAAW3K,KAAK2K,UAAY,GAIjC,IAAIqpB,EAAoC,MAArBh0B,KAAK2K,SAAS,IACe,MAA5C3K,KAAK2K,SAAS3K,KAAK2K,SAAS3J,OAAS,GAGzC,IAAKgzB,EAEH,IAAK,IADDC,EAAYj0B,KAAK2K,SAASjJ,MAAM,MAC3Bf,EAAI,EAAGG,EAAImzB,EAAUjzB,OAAQL,EAAIG,EAAGH,IAAK,CAChD,IAAI+Q,EAAOuiB,EAAUtzB,GACrB,GAAK+Q,IACAA,EAAKxI,MAAM+oB,GAAsB,CAEpC,IAAK,IADDiC,EAAU,GACL1yB,EAAI,EAAGkT,EAAIhD,EAAK1Q,OAAQQ,EAAIkT,EAAGlT,IAClCkQ,EAAK2D,WAAW7T,GAAK,IAIvB0yB,GAAW,IAEXA,GAAWxiB,EAAKlQ,GAIpB,IAAK0yB,EAAQhrB,MAAM+oB,GAAsB,CACvC,IAAIkC,EAAaF,EAAUziB,MAAM,EAAG7Q,GAChCyzB,EAAUH,EAAUziB,MAAM7Q,EAAI,GAC9B0zB,EAAM3iB,EAAKxI,MAAMgpB,GACjBmC,IACFF,EAAWxf,KAAK0f,EAAI,IACpBD,EAAQE,QAAQD,EAAI,KAElBD,EAAQpzB,SACVsyB,EAAO,IAAMc,EAAQ5U,KAAK,KAAO8T,GAEnCtzB,KAAK2K,SAAWwpB,EAAW3U,KAAK,KAChC,QAONxf,KAAK2K,SADH3K,KAAK2K,SAAS3J,OAjND,IAkNC,GAGAhB,KAAK2K,SAAS4kB,cAG3ByE,IAKHh0B,KAAK2K,SAAWikB,EAASS,QAAQrvB,KAAK2K,WAGpCtD,EAAIrH,KAAKgxB,KAAO,IAAMhxB,KAAKgxB,KAAO,GAEtChxB,KAAK0S,MADG1S,KAAK2K,UAAY,IACTtD,EAChBrH,KAAKyS,MAAQzS,KAAK0S,KAIdshB,IACFh0B,KAAK2K,SAAW3K,KAAK2K,SAASwlB,OAAO,EAAGnwB,KAAK2K,SAAS3J,OAAS,GAC/C,MAAZsyB,EAAK,KACPA,EAAO,IAAMA,IAOnB,IAAKnB,EAAewB,GAKlB,IAAK,IAAIhzB,EAAI,EAAGG,EAAIgxB,EAAW9wB,OAAQL,EAAIG,EAAGH,IAAK,CACjD,IAAI4zB,EAAKzC,EAAWnxB,GACpB,IAA0B,IAAtB2yB,EAAKhT,QAAQiU,GAAjB,CAEA,IAAIC,EAAMjb,mBAAmBgb,GACzBC,IAAQD,IACVC,EAAMC,OAAOF,IAEfjB,EAAOA,EAAK5xB,MAAM6yB,GAAI/U,KAAKgV,IAM/B,IAAIjjB,EAAO+hB,EAAKhT,QAAQ,MACV,IAAV/O,IAEFvR,KAAKuR,KAAO+hB,EAAKnD,OAAO5e,GACxB+hB,EAAOA,EAAK9hB,MAAM,EAAGD,IAEvB,IAAImjB,EAAKpB,EAAKhT,QAAQ,KAoBtB,IAnBY,IAARoU,GACF10B,KAAKixB,OAASqC,EAAKnD,OAAOuE,GAC1B10B,KAAKkxB,MAAQoC,EAAKnD,OAAOuE,EAAK,GAC1BrD,IACFrxB,KAAKkxB,MAAQgC,EAAY5xB,MAAMtB,KAAKkxB,QAEtCoC,EAAOA,EAAK9hB,MAAM,EAAGkjB,IACZrD,IAETrxB,KAAKixB,OAAS,GACdjxB,KAAKkxB,UAEHoC,IAAMtzB,KAAKmxB,SAAWmC,GACtBf,EAAgBoB,IAChB3zB,KAAK2K,WAAa3K,KAAKmxB,WACzBnxB,KAAKmxB,SAAW,KAIdnxB,KAAKmxB,UAAYnxB,KAAKixB,OAAQ,CAChC,IAAI5pB,EAEJrH,KAAK2S,MAFDtL,EAAIrH,KAAKmxB,UAAY,KACjBnxB,KAAKixB,QAAU,IAMzB,OADAjxB,KAAKyS,KAAOzS,KAAK+C,SACV/C,MAcT6wB,EAAI1uB,UAAUY,OAAS,WACrB,IAAIguB,EAAO/wB,KAAK+wB,MAAQ,GACpBA,IAEFA,GADAA,EAAOxX,mBAAmBwX,IACdne,QAAQ,OAAQ,KAC5Bme,GAAQ,KAGV,IAAIve,EAAWxS,KAAKwS,UAAY,GAC5B2e,EAAWnxB,KAAKmxB,UAAY,GAC5B5f,EAAOvR,KAAKuR,MAAQ,GACpBmB,GAAO,EACPwe,EAAQ,GAERlxB,KAAK0S,KACPA,EAAOqe,EAAO/wB,KAAK0S,KACV1S,KAAK2K,WACd+H,EAAOqe,IAAwC,IAAhC/wB,KAAK2K,SAAS2V,QAAQ,KACjCtgB,KAAK2K,SACL,IAAM3K,KAAK2K,SAAW,KACtB3K,KAAKgxB,OACPte,GAAQ,IAAM1S,KAAKgxB,OAInBhxB,KAAKkxB,OACLroB,EAAKwgB,SAASrpB,KAAKkxB,QACnBhpB,OAAOuM,KAAKzU,KAAKkxB,OAAOlwB,SAC1BkwB,EAAQgC,EAAY3xB,UAAUvB,KAAKkxB,QAGrC,IAAID,EAASjxB,KAAKixB,QAAWC,GAAU,IAAMA,GAAW,GAsBxD,OApBI1e,GAAoC,MAAxBA,EAAS2d,QAAQ,KAAY3d,GAAY,KAIrDxS,KAAK8wB,WACHte,GAAY+f,EAAgB/f,MAAuB,IAATE,GAC9CA,EAAO,MAAQA,GAAQ,IACnBye,GAAmC,MAAvBA,EAASwD,OAAO,KAAYxD,EAAW,IAAMA,IACnDze,IACVA,EAAO,IAGLnB,GAA2B,MAAnBA,EAAKojB,OAAO,KAAYpjB,EAAO,IAAMA,GAC7C0f,GAA+B,MAArBA,EAAO0D,OAAO,KAAY1D,EAAS,IAAMA,GAEvDE,EAAWA,EAASve,QAAQ,QAAS,SAAS1J,GAC5C,OAAOqQ,mBAAmBrQ,KAE5B+nB,EAASA,EAAOre,QAAQ,IAAK,OAEtBJ,EAAWE,EAAOye,EAAWF,EAAS1f,GAO/Csf,EAAI1uB,UAAU8D,QAAU,SAASsrB,GAC/B,OAAOvxB,KAAKwxB,cAAcJ,EAASG,GAAU,GAAO,IAAOxuB,UAQ7D8tB,EAAI1uB,UAAUqvB,cAAgB,SAASD,GACrC,GAAI1oB,EAAK4oB,SAASF,GAAW,CAC3B,IAAIqD,EAAM,IAAI/D,EACd+D,EAAItzB,MAAMiwB,GAAU,GAAO,GAC3BA,EAAWqD,EAKb,IAAK,IAFDjpB,EAAS,IAAIklB,EACbgE,EAAQ3sB,OAAOuM,KAAKzU,MACf80B,EAAK,EAAGA,EAAKD,EAAM7zB,OAAQ8zB,IAAM,CACxC,IAAIC,EAAOF,EAAMC,GACjBnpB,EAAOopB,GAAQ/0B,KAAK+0B,GAQtB,GAHAppB,EAAO4F,KAAOggB,EAAShgB,KAGD,KAAlBggB,EAAS9e,KAEX,OADA9G,EAAO8G,KAAO9G,EAAO5I,SACd4I,EAIT,GAAI4lB,EAAST,UAAYS,EAAS/e,SAAU,CAG1C,IAAK,IADDwiB,EAAQ9sB,OAAOuM,KAAK8c,GACf0D,EAAK,EAAGA,EAAKD,EAAMh0B,OAAQi0B,IAAM,CACxC,IAAIC,EAAOF,EAAMC,GACJ,aAATC,IACFvpB,EAAOupB,GAAQ3D,EAAS2D,IAU5B,OANI3C,EAAgB5mB,EAAO6G,WACvB7G,EAAOhB,WAAagB,EAAOwlB,WAC7BxlB,EAAOgH,KAAOhH,EAAOwlB,SAAW,KAGlCxlB,EAAO8G,KAAO9G,EAAO5I,SACd4I,EAGT,GAAI4lB,EAAS/e,UAAY+e,EAAS/e,WAAa7G,EAAO6G,SAAU,CAS9D,IAAK+f,EAAgBhB,EAAS/e,UAAW,CAEvC,IAAK,IADDiC,EAAOvM,OAAOuM,KAAK8c,GACdhqB,EAAI,EAAGA,EAAIkN,EAAKzT,OAAQuG,IAAK,CACpC,IAAImN,EAAID,EAAKlN,GACboE,EAAO+I,GAAK6c,EAAS7c,GAGvB,OADA/I,EAAO8G,KAAO9G,EAAO5I,SACd4I,EAIT,GADAA,EAAO6G,SAAW+e,EAAS/e,SACtB+e,EAAS7e,MAAS4f,EAAiBf,EAAS/e,UAS/C7G,EAAOwlB,SAAWI,EAASJ,aAT+B,CAE1D,IADIgE,GAAW5D,EAASJ,UAAY,IAAIzvB,MAAM,KACvCyzB,EAAQn0B,UAAYuwB,EAAS7e,KAAOyiB,EAAQC,WAC9C7D,EAAS7e,OAAM6e,EAAS7e,KAAO,IAC/B6e,EAAS5mB,WAAU4mB,EAAS5mB,SAAW,IACzB,KAAfwqB,EAAQ,IAAWA,EAAQb,QAAQ,IACnCa,EAAQn0B,OAAS,GAAGm0B,EAAQb,QAAQ,IACxC3oB,EAAOwlB,SAAWgE,EAAQ3V,KAAK,KAWjC,GAPA7T,EAAOslB,OAASM,EAASN,OACzBtlB,EAAOulB,MAAQK,EAASL,MACxBvlB,EAAO+G,KAAO6e,EAAS7e,MAAQ,GAC/B/G,EAAOolB,KAAOQ,EAASR,KACvBplB,EAAOhB,SAAW4mB,EAAS5mB,UAAY4mB,EAAS7e,KAChD/G,EAAOqlB,KAAOO,EAASP,KAEnBrlB,EAAOwlB,UAAYxlB,EAAOslB,OAAQ,CAGpCtlB,EAAOgH,MAFChH,EAAOwlB,UAAY,KACnBxlB,EAAOslB,QAAU,IAK3B,OAFAtlB,EAAOmlB,QAAUnlB,EAAOmlB,SAAWS,EAAST,QAC5CnlB,EAAO8G,KAAO9G,EAAO5I,SACd4I,EAGT,IAAI0pB,EAAe1pB,EAAOwlB,UAA0C,MAA9BxlB,EAAOwlB,SAASwD,OAAO,GACzDW,EACI/D,EAAS7e,MACT6e,EAASJ,UAA4C,MAAhCI,EAASJ,SAASwD,OAAO,GAElDY,EAAcD,GAAYD,GACX1pB,EAAO+G,MAAQ6e,EAASJ,SACvCqE,EAAgBD,EAChBE,EAAU9pB,EAAOwlB,UAAYxlB,EAAOwlB,SAASzvB,MAAM,SACnDyzB,EAAU5D,EAASJ,UAAYI,EAASJ,SAASzvB,MAAM,SACvDg0B,EAAY/pB,EAAO6G,WAAa+f,EAAgB5mB,EAAO6G,UA2B3D,GApBIkjB,IACF/pB,EAAOhB,SAAW,GAClBgB,EAAOqlB,KAAO,KACVrlB,EAAO+G,OACU,KAAf+iB,EAAQ,GAAWA,EAAQ,GAAK9pB,EAAO+G,KACtC+iB,EAAQnB,QAAQ3oB,EAAO+G,OAE9B/G,EAAO+G,KAAO,GACV6e,EAAS/e,WACX+e,EAAS5mB,SAAW,KACpB4mB,EAASP,KAAO,KACZO,EAAS7e,OACQ,KAAfyiB,EAAQ,GAAWA,EAAQ,GAAK5D,EAAS7e,KACxCyiB,EAAQb,QAAQ/C,EAAS7e,OAEhC6e,EAAS7e,KAAO,MAElB6iB,EAAaA,IAA8B,KAAfJ,EAAQ,IAA4B,KAAfM,EAAQ,KAGvDH,EAEF3pB,EAAO+G,KAAQ6e,EAAS7e,MAA0B,KAAlB6e,EAAS7e,KAC3B6e,EAAS7e,KAAO/G,EAAO+G,KACrC/G,EAAOhB,SAAY4mB,EAAS5mB,UAAkC,KAAtB4mB,EAAS5mB,SAC/B4mB,EAAS5mB,SAAWgB,EAAOhB,SAC7CgB,EAAOslB,OAASM,EAASN,OACzBtlB,EAAOulB,MAAQK,EAASL,MACxBuE,EAAUN,OAEL,GAAIA,EAAQn0B,OAGZy0B,IAASA,MACdA,EAAQja,MACRia,EAAUA,EAAQ5gB,OAAOsgB,GACzBxpB,EAAOslB,OAASM,EAASN,OACzBtlB,EAAOulB,MAAQK,EAASL,WACnB,IAAKroB,EAAK8sB,kBAAkBpE,EAASN,QAAS,CAInD,GAAIyE,EAAW,CACb/pB,EAAOhB,SAAWgB,EAAO+G,KAAO+iB,EAAQL,SAIpCQ,KAAajqB,EAAO+G,MAAQ/G,EAAO+G,KAAK4N,QAAQ,KAAO,IAC1C3U,EAAO+G,KAAKhR,MAAM,QAEjCiK,EAAOolB,KAAO6E,EAAWR,QACzBzpB,EAAO+G,KAAO/G,EAAOhB,SAAWirB,EAAWR,SAW/C,OARAzpB,EAAOslB,OAASM,EAASN,OACzBtlB,EAAOulB,MAAQK,EAASL,MAEnBroB,EAAKgtB,OAAOlqB,EAAOwlB,WAActoB,EAAKgtB,OAAOlqB,EAAOslB,UACvDtlB,EAAOgH,MAAQhH,EAAOwlB,SAAWxlB,EAAOwlB,SAAW,KACpCxlB,EAAOslB,OAAStlB,EAAOslB,OAAS,KAEjDtlB,EAAO8G,KAAO9G,EAAO5I,SACd4I,EAGT,IAAK8pB,EAAQz0B,OAWX,OARA2K,EAAOwlB,SAAW,KAGhBxlB,EAAOgH,KADLhH,EAAOslB,OACK,IAAMtlB,EAAOslB,OAEb,KAEhBtlB,EAAO8G,KAAO9G,EAAO5I,SACd4I,EAcT,IAAK,IARDmqB,EAAOL,EAAQjkB,OAAO,GAAG,GACzBukB,GACCpqB,EAAO+G,MAAQ6e,EAAS7e,MAAQ+iB,EAAQz0B,OAAS,KACxC,MAAT80B,GAAyB,OAATA,IAA2B,KAATA,EAInC3c,EAAK,EACAxY,EAAI80B,EAAQz0B,OAAQL,GAAK,EAAGA,IAEtB,OADbm1B,EAAOL,EAAQ90B,IAEb80B,EAAQnlB,OAAO3P,EAAG,GACA,OAATm1B,GACTL,EAAQnlB,OAAO3P,EAAG,GAClBwY,KACSA,IACTsc,EAAQnlB,OAAO3P,EAAG,GAClBwY,KAKJ,IAAKoc,IAAeC,EAClB,KAAOrc,IAAMA,EACXsc,EAAQnB,QAAQ,OAIhBiB,GAA6B,KAAfE,EAAQ,IACpBA,EAAQ,IAA+B,MAAzBA,EAAQ,GAAGd,OAAO,IACpCc,EAAQnB,QAAQ,IAGdyB,GAAsD,MAAjCN,EAAQjW,KAAK,KAAK2Q,QAAQ,IACjDsF,EAAQ9gB,KAAK,IAGf,IAAIqhB,EAA4B,KAAfP,EAAQ,IACpBA,EAAQ,IAA+B,MAAzBA,EAAQ,GAAGd,OAAO,GAGrC,GAAIe,EAAW,CACb/pB,EAAOhB,SAAWgB,EAAO+G,KAAOsjB,EAAa,GACbP,EAAQz0B,OAASy0B,EAAQL,QAAU,GAInE,IAAIQ,KAAajqB,EAAO+G,MAAQ/G,EAAO+G,KAAK4N,QAAQ,KAAO,IAC1C3U,EAAO+G,KAAKhR,MAAM,KAC/Bk0B,IACFjqB,EAAOolB,KAAO6E,EAAWR,QACzBzpB,EAAO+G,KAAO/G,EAAOhB,SAAWirB,EAAWR,SAyB/C,OArBAG,EAAaA,GAAe5pB,EAAO+G,MAAQ+iB,EAAQz0B,UAEhCg1B,GACjBP,EAAQnB,QAAQ,IAGbmB,EAAQz0B,OAIX2K,EAAOwlB,SAAWsE,EAAQjW,KAAK,MAH/B7T,EAAOwlB,SAAW,KAClBxlB,EAAOgH,KAAO,MAMX9J,EAAKgtB,OAAOlqB,EAAOwlB,WAActoB,EAAKgtB,OAAOlqB,EAAOslB,UACvDtlB,EAAOgH,MAAQhH,EAAOwlB,SAAWxlB,EAAOwlB,SAAW,KACpCxlB,EAAOslB,OAAStlB,EAAOslB,OAAS,KAEjDtlB,EAAOolB,KAAOQ,EAASR,MAAQplB,EAAOolB,KACtCplB,EAAOmlB,QAAUnlB,EAAOmlB,SAAWS,EAAST,QAC5CnlB,EAAO8G,KAAO9G,EAAO5I,SACd4I,GAGTklB,EAAI1uB,UAAU4xB,UAAY,WACxB,IAAIrhB,EAAO1S,KAAK0S,KACZse,EAAOW,EAAY8B,KAAK/gB,GACxBse,IAEW,OADbA,EAAOA,EAAK,MAEVhxB,KAAKgxB,KAAOA,EAAKb,OAAO,IAE1Bzd,EAAOA,EAAKyd,OAAO,EAAGzd,EAAK1R,OAASgwB,EAAKhwB,SAEvC0R,IAAM1S,KAAK2K,SAAW+H,MAGzBtH,SAAS,GAAGwjB,SAAW,GAAGsE,YAAc,KAAK+C,IAAI,SAASv1B,EAAQhB,EAAOD,GAC5E,aAEAC,EAAOD,SACLgyB,SAAU,SAASyE,GACjB,MAAuB,iBAAV,GAEf7M,SAAU,SAAS6M,GACjB,MAAuB,iBAAV,GAA8B,OAARA,GAErCL,OAAQ,SAASK,GACf,OAAe,OAARA,GAETP,kBAAmB,SAASO,GAC1B,OAAc,MAAPA,SAIL3tB,KAAO,SAAS7H,EAAQhB,EAAOD,GACrC,aAmDA,SAASQ,EAAI8M,GACX,KAAM/M,gBAAgBC,GAAM,OAAO,IAAIA,EAAI8M,GAC3CA,EAAO/M,KAAK+G,MAAQ8B,EAAKC,KAAKiE,OAmbhC,SAAmBhN,GACjB,IAAIiN,EAASjN,EAAKgH,MAAMiG,OACxB,IAAe,IAAXA,EACFjN,EAAKiN,QAAUmpB,IAAKC,EAAM/V,KAAM+V,EAAMnoB,MAAOmoB,OACxC,CAEL,QADejvB,IAAX6F,IAAsBA,EAASqpB,WACZ,iBAAVrpB,GAAsBA,EAAOmpB,KAAOnpB,EAAOqT,MAAQrT,EAAOiB,OACrE,MAAM,IAAIrN,MAAM,qDAClBb,EAAKiN,OAASA,GA1bhBspB,CAAUt2B,MACVA,KAAK2G,YACL3G,KAAK0G,SACL1G,KAAKu2B,cACLv2B,KAAKoQ,SAAWzH,EAAQoE,EAAKhK,QAC7B,IAAIyzB,EAAkBx2B,KAAKy2B,iBAAmBz2B,KAAKoQ,SAAS,iBAC5DpQ,KAAK02B,qBAAuB,SAAU1tB,GAAO,OAAOwtB,EAAgB5sB,KAAKZ,IAEzEhJ,KAAKkC,OAAS6K,EAAK4pB,OAAS,IAAI10B,EAChCjC,KAAKuG,mBACLvG,KAAKmQ,iBACLnQ,KAAK0M,MAAQuH,IACbjU,KAAKkR,OAyTP,SAAqBnE,GACnB,OAAQA,EAAKiG,UACX,IAAK,MAAO,OAAO4jB,EACnB,IAAK,KAAM,OAAO1lB,EAClB,QAAS,OAAO2lB,GA7TJC,CAAY/pB,GAE1BA,EAAKqV,aAAerV,EAAKqV,cAAgBhQ,EAAAA,EACf,YAAtBrF,EAAKgqB,gBAA6BhqB,EAAKwS,wBAAyB,QAC7CpY,IAAnB4F,EAAKiqB,YAAyBjqB,EAAKiqB,UAAY1nB,GACnDtP,KAAKi3B,UAyZP,SAA8Bl3B,GAE5B,IAAK,IADDm3B,EAAWruB,EAAKC,KAAK/I,EAAKgH,OACrBpG,EAAE,EAAGA,EAAEw2B,EAAoBn2B,OAAQL,WACnCu2B,EAASC,EAAoBx2B,IACtC,OAAOu2B,EA7ZUE,CAAqBp3B,MAElC+M,EAAKpE,SAyYX,SAA2B5I,GACzB,IAAK,IAAIgpB,KAAQhpB,EAAKgH,MAAM4B,QAAS,CAEnC5I,EAAKs3B,UAAUtO,EADFhpB,EAAKgH,MAAM4B,QAAQogB,KA3YhBuO,CAAkBt3B,MAmXtC,SAA6BD,GAC3B,IAAIw3B,EACAx3B,EAAKgH,MAAMiS,QACbue,EAAc72B,EAAQ,qBACtBX,EAAKy3B,cAAcD,EAAaA,EAAYhS,KAAK,IAEnD,IAAwB,IAApBxlB,EAAKgH,MAAMrB,KAAgB,OAC/B,IAAIvE,EAAaT,EAAQ,oCACrBX,EAAKgH,MAAMiS,QAAO7X,EAAas2B,EAAgBt2B,EAAYu2B,IAC/D33B,EAAKy3B,cAAcr2B,EAAYw2B,GAAgB,GAC/C53B,EAAK2G,MAAM,iCAAmCixB,EA5X9CC,CAAoB53B,MACI,iBAAb+M,EAAKrH,MAAkB1F,KAAKw3B,cAAczqB,EAAKrH,MA+X5D,SAA2B3F,GACzB,IAAI83B,EAAc93B,EAAKgH,MAAM+wB,QAC7B,IAAKD,EAAa,OAClB,GAAI5lB,MAAMC,QAAQ2lB,GAAc93B,EAAKmH,UAAU2wB,QAC1C,IAAK,IAAIj2B,KAAOi2B,EAAa93B,EAAKmH,UAAU2wB,EAAYj2B,GAAMA,GAlYnEm2B,CAAkB/3B,MACd+M,EAAKuV,eAAeA,EAActiB,MAmKxC,SAASg4B,EAAcj4B,EAAMk4B,GAE3B,OADAA,EAAShyB,EAAQ6B,YAAYmwB,GACtBl4B,EAAK4G,SAASsxB,IAAWl4B,EAAK2G,MAAMuxB,IAAWl4B,EAAKw2B,WAAW0B,GA8CxE,SAASC,EAAkBn4B,EAAM+3B,EAASpuB,GACxC,IAAK,IAAIuuB,KAAUH,EAAS,CAC1B,IAAI3xB,EAAY2xB,EAAQG,GACnB9xB,EAAUT,MAAUgE,IAASA,EAAME,KAAKquB,KAC3Cl4B,EAAKmC,OAAOK,IAAI4D,EAAUgyB,iBACnBL,EAAQG,KA+FrB,SAAS/mB,EAAOrP,GAEd,OADIA,EAAO0jB,KAAKvlB,KAAKgN,OAAOqT,KAAK,qBAAsBxe,EAAO0jB,KACvD1jB,EAAOsP,GAIhB,SAASylB,EAAQ/0B,GAEf,OADIA,EAAOsP,IAAInR,KAAKgN,OAAOqT,KAAK,oBAAqBxe,EAAOsP,IACrDtP,EAAO0jB,IAIhB,SAASsR,EAAYh1B,GACnB,GAAIA,EAAO0jB,KAAO1jB,EAAOsP,IAAMtP,EAAO0jB,KAAO1jB,EAAOsP,GAClD,MAAM,IAAIvQ,MAAM,mCAClB,OAAOiB,EAAO0jB,KAAO1jB,EAAOsP,GAuE9B,SAASinB,EAAYr4B,EAAMoR,GACzB,GAAIpR,EAAK4G,SAASwK,IAAOpR,EAAK2G,MAAMyK,GAClC,MAAM,IAAIvQ,MAAM,0BAA4BuQ,EAAK,oBAyBrD,SAASilB,KAnfT,IAAIiC,EAAgB33B,EAAQ,aACxBuF,EAAUvF,EAAQ,qBAClBuB,EAAQvB,EAAQ,WAChBkQ,EAAelQ,EAAQ,wBACvB4O,EAAkB5O,EAAQ,8BAC1BiI,EAAUjI,EAAQ,qBAClBuT,EAAQvT,EAAQ,mBAChB+2B,EAAkB/2B,EAAQ,WAC1B4hB,EAAgB5hB,EAAQ,mBACxBmI,EAAOnI,EAAQ,kBACfmN,EAAKnN,EAAQ,MAEjBhB,EAAOD,QAAUQ,EAEjBA,EAAIkC,UAAU8B,SA0Ed,SAAkBq0B,EAAc7iB,GAC9B,IAAIlO,EACJ,GAA2B,iBAAhB+wB,GAET,KADA/wB,EAAIvH,KAAK+F,UAAUuyB,IACX,MAAM,IAAI13B,MAAM,8BAAgC03B,EAAe,SAClE,CACL,IAAInyB,EAAYnG,KAAKsH,WAAWgxB,GAChC/wB,EAAIpB,EAAUlC,UAAYjE,KAAKoG,SAASD,GAG1C,IAAIqY,EAAQjX,EAAEkO,GACd,OAAiB,IAAblO,EAAE2E,OACuB,KAApBlM,KAAK+G,MAAM6Q,MAAe/J,EAAG2Q,GAASA,GAC/Cxe,KAAKsI,OAASf,EAAEe,OACTkW,IAvFTve,EAAIkC,UAAUmJ,QAkGd,SAAiBzJ,EAAQ02B,GACvB,IAAIpyB,EAAYnG,KAAKsH,WAAWzF,OAAQsF,EAAWoxB,GACnD,OAAOpyB,EAAUlC,UAAYjE,KAAKoG,SAASD,IAnG7ClG,EAAIkC,UAAU+E,UAgHd,SAAmBrF,EAAQD,EAAK42B,EAAiBD,GAC/C,IAAItmB,MAAMC,QAAQrQ,GAAlB,CAIA,IAAIsP,EAAKnR,KAAKkR,OAAOrP,GACrB,QAAWsF,IAAPgK,GAAiC,iBAANA,EAC7B,MAAM,IAAIvQ,MAAM,4BAIlB,OAHAgB,EAAMqE,EAAQ6B,YAAYlG,GAAOuP,GACjCinB,EAAYp4B,KAAM4B,GAClB5B,KAAK2G,SAAS/E,GAAO5B,KAAKsH,WAAWzF,EAAQ22B,EAAiBD,GAAO,GAC9Dv4B,KATL,IAAK,IAAIW,EAAE,EAAGA,EAAEkB,EAAOb,OAAQL,IAAKX,KAAKkH,UAAUrF,EAAOlB,QAAIwG,EAAWqxB,EAAiBD,IAjH9Ft4B,EAAIkC,UAAUq1B,cAuId,SAAuB31B,EAAQD,EAAK62B,GAElC,OADAz4B,KAAKkH,UAAUrF,EAAQD,EAAK62B,GAAgB,GACrCz4B,MAxITC,EAAIkC,UAAUwN,eAmJd,SAAwB9N,EAAQ62B,GAC9B,IAAI5yB,EAAUjE,EAAOiE,QACrB,QAAgBqB,IAAZrB,GAA2C,iBAAXA,EAClC,MAAM,IAAIlF,MAAM,4BAElB,KADAkF,EAAUA,GAAW9F,KAAK+G,MAAMggB,aAsBlC,SAAqBhnB,GACnB,IAAI2F,EAAO3F,EAAKgH,MAAMrB,KAMtB,OALA3F,EAAKgH,MAAMggB,YAA6B,iBAARrhB,EACJ3F,EAAKmR,OAAOxL,IAASA,EACrB3F,EAAKgG,UAAU4xB,GACbA,OACAxwB,EACvBpH,EAAKgH,MAAMggB,YA7B6BA,CAAY/mB,OAIzD,OAFAA,KAAKgN,OAAOqT,KAAK,6BACjBrgB,KAAKsI,OAAS,MACP,EAET,IAAIqwB,EAAmB34B,KAAKoQ,SAAS7F,IACrCvK,KAAKoQ,SAAS7F,IAAiC,mBAApBouB,EACL34B,KAAK02B,qBACL12B,KAAKy2B,iBAC3B,IAAIjY,EACJ,IAAMA,EAAQxe,KAAKiE,SAAS6B,EAASjE,GACrC,QAAU7B,KAAKoQ,SAAS7F,IAAMouB,EAC9B,IAAKna,GAASka,EAAiB,CAC7B,IAAI9wB,EAAU,sBAAwB5H,KAAK6P,aAC3C,GAAiC,OAA7B7P,KAAK+G,MAAM4I,eACV,MAAM,IAAI/O,MAAMgH,GADmB5H,KAAKgN,OAAOiB,MAAMrG,GAG5D,OAAO4W,GAxKTve,EAAIkC,UAAU4D,UA6Ld,SAAmBkyB,GACjB,IAAI9xB,EAAY6xB,EAAch4B,KAAMi4B,GACpC,cAAe9xB,GACb,IAAK,SAAU,OAAOA,EAAUlC,UAAYjE,KAAKoG,SAASD,GAC1D,IAAK,SAAU,OAAOnG,KAAK+F,UAAUI,GACrC,IAAK,YAAa,OAKtB,SAA4BpG,EAAMyG,GAChC,IAAIqK,EAAM5K,EAAQpE,OAAOd,KAAKhB,GAAQ8B,WAAc2E,GACpD,GAAIqK,EAAK,CACP,IAAIhP,EAASgP,EAAIhP,OACb0J,EAAOsF,EAAItF,KACX5D,EAASkJ,EAAIlJ,OACbJ,EAAI8wB,EAAct3B,KAAKhB,EAAM8B,EAAQ0J,OAAMpE,EAAWQ,GAS1D,OARA5H,EAAKw2B,WAAW/vB,GAAO,IAAIoK,GACzBpK,IAAKA,EACLoyB,UAAU,EACV/2B,OAAQA,EACR0J,KAAMA,EACN5D,OAAQA,EACR1D,SAAUsD,IAELA,GApBkBsxB,CAAmB74B,KAAMi4B,KAjMtDh4B,EAAIkC,UAAU22B,aAyOd,SAAsBR,GACpB,GAAIA,aAAwBzuB,OAG1B,OAFAquB,EAAkBl4B,KAAMA,KAAK2G,SAAU2xB,GACvCJ,EAAkBl4B,KAAMA,KAAK0G,MAAO4xB,GAC7Bt4B,KAET,cAAes4B,GACb,IAAK,YAIH,OAHAJ,EAAkBl4B,KAAMA,KAAK2G,UAC7BuxB,EAAkBl4B,KAAMA,KAAK0G,OAC7B1G,KAAKkC,OAAOM,QACLxC,KACT,IAAK,SACH,IAAImG,EAAY6xB,EAAch4B,KAAMs4B,GAIpC,OAHInyB,GAAWnG,KAAKkC,OAAOK,IAAI4D,EAAUgyB,iBAClCn4B,KAAK2G,SAAS2xB,UACdt4B,KAAK0G,MAAM4xB,GACXt4B,KACT,IAAK,SACH,IAAIg3B,EAAYh3B,KAAK+G,MAAMiwB,UACvBmB,EAAWnB,EAAYA,EAAUsB,GAAgBA,EACrDt4B,KAAKkC,OAAOK,IAAI41B,GAChB,IAAIhnB,EAAKnR,KAAKkR,OAAOonB,GACjBnnB,IACFA,EAAKlL,EAAQ6B,YAAYqJ,UAClBnR,KAAK2G,SAASwK,UACdnR,KAAK0G,MAAMyK,IAGxB,OAAOnR,MArQTC,EAAIkC,UAAUk1B,UA8Zd,SAAmBtO,EAAMhmB,GAGvB,MAFqB,iBAAVA,IAAoBA,EAAS,IAAI8G,OAAO9G,IACnD/C,KAAKoQ,SAAS2Y,GAAQhmB,EACf/C,MAhaTC,EAAIkC,UAAU0N,WAsYd,SAAoBvH,EAAQsnB,GAE1B,KADAtnB,EAASA,GAAUtI,KAAKsI,QACX,MAAO,YAMpB,IAAK,IAJDywB,OAAkC5xB,KADtCyoB,EAAUA,OACcmJ,UAA0B,KAAOnJ,EAAQmJ,UAC7D5hB,OAA8BhQ,IAApByoB,EAAQzY,QAAwB,OAASyY,EAAQzY,QAE3D6hB,EAAO,GACFr4B,EAAE,EAAGA,EAAE2H,EAAOtH,OAAQL,IAAK,CAClC,IAAIT,EAAIoI,EAAO3H,GACXT,IAAG84B,GAAQ7hB,EAAUjX,EAAE+4B,SAAW,IAAM/4B,EAAE0H,QAAUmxB,GAE1D,OAAOC,EAAKxnB,MAAM,GAAIunB,EAAU/3B,SAhZlCf,EAAIkC,UAAUmF,WAkRd,SAAoBzF,EAAQ42B,EAAgB/yB,EAAMwzB,GAChD,GAAqB,iBAAVr3B,GAAuC,kBAAVA,EACtC,MAAM,IAAIjB,MAAM,sCAClB,IAAIo2B,EAAYh3B,KAAK+G,MAAMiwB,UACvBmB,EAAWnB,EAAYA,EAAUn1B,GAAUA,EAC3Cs3B,EAASn5B,KAAKkC,OAAOI,IAAI61B,GAC7B,GAAIgB,EAAQ,OAAOA,EAEnBD,EAAkBA,IAAgD,IAA7Bl5B,KAAK+G,MAAMqyB,cAEhD,IAAIjoB,EAAKlL,EAAQ6B,YAAY9H,KAAKkR,OAAOrP,IACrCsP,GAAM+nB,GAAiBd,EAAYp4B,KAAMmR,GAE7C,IACIkoB,EADAC,GAA6C,IAA9Bt5B,KAAK+G,MAAM4I,iBAA6B8oB,EAEvDa,KAAkBD,EAAgBloB,GAAMA,GAAMlL,EAAQ6B,YAAYjG,EAAOiE,WAC3E9F,KAAK2P,eAAe9N,GAAQ,GAE9B,IAAI2J,EAAYvF,EAAQ8M,IAAIhS,KAAKf,KAAM6B,GAEnCsE,EAAY,IAAIyK,GAClBO,GAAIA,EACJtP,OAAQA,EACR2J,UAAWA,EACX2sB,SAAUA,EACVzyB,KAAMA,IAQR,MALa,KAATyL,EAAG,IAAa+nB,IAAiBl5B,KAAK0G,MAAMyK,GAAMhL,GACtDnG,KAAKkC,OAAOE,IAAI+1B,EAAUhyB,GAEtBmzB,GAAgBD,GAAer5B,KAAK2P,eAAe9N,GAAQ,GAExDsE,GAlTTlG,EAAIkC,UAAUiE,SAuTd,SAAkBD,EAAWoF,GAgC3B,SAASE,IACP,IAAI8tB,EAAYpzB,EAAUlC,SACtB0H,EAAS4tB,EAAU3tB,MAAM,KAAMC,WAEnC,OADAJ,EAAanD,OAASixB,EAAUjxB,OACzBqD,EAnCT,GAAIxF,EAAU+J,UAOZ,OANA/J,EAAUlC,SAAWwH,EACrBA,EAAa5J,OAASsE,EAAUtE,OAChC4J,EAAanD,OAAS,KACtBmD,EAAaF,KAAOA,GAAcE,GACF,IAA5BtF,EAAUtE,OAAOqK,SACnBT,EAAaS,QAAS,GACjBT,EAETtF,EAAU+J,WAAY,EAEtB,IAAIspB,EACArzB,EAAUT,OACZ8zB,EAAcx5B,KAAK+G,MACnB/G,KAAK+G,MAAQ/G,KAAKi3B,WAGpB,IAAI1vB,EACJ,IAAMA,EAAI8wB,EAAct3B,KAAKf,KAAMmG,EAAUtE,OAAQ0J,EAAMpF,EAAUqF,WACrE,QACErF,EAAU+J,WAAY,EAClB/J,EAAUT,OAAM1F,KAAK+G,MAAQyyB,GAOnC,OAJArzB,EAAUlC,SAAWsD,EACrBpB,EAAU+H,KAAO3G,EAAE2G,KACnB/H,EAAU+G,OAAS3F,EAAE2F,OACrB/G,EAAUoF,KAAOhE,EAAEgE,KACZhE,GAlVTtH,EAAIkC,UAAUsD,aAAe/E,EAAQ,mBACrC,IAAI+4B,EAAgB/4B,EAAQ,aAC5BT,EAAIkC,UAAU8kB,WAAawS,EAAcjT,IACzCvmB,EAAIkC,UAAUu3B,WAAaD,EAAcn3B,IACzCrC,EAAIkC,UAAUw3B,cAAgBF,EAAc7S,OAE5C,IAAIna,EAAe/L,EAAQ,2BAC3BT,EAAI+N,gBAAkBvB,EAAapE,WACnCpI,EAAIoG,gBAAkBoG,EAAajF,WACnCvH,EAAIw3B,gBAAkBA,EAEtB,IAAIE,EAAiB,yCAEjBR,GAAwB,mBAAoB,cAAe,eAC3DO,GAAqB,iBA4ctBkC,UAAU,EAAEC,UAAU,EAAEC,YAAY,EAAEC,kBAAkB,EAAEC,0BAA0B,EAAEC,oBAAoB,EAAEC,oBAAoB,EAAEC,kBAAkB,EAAEC,uBAAuB,GAAGC,iBAAiB,GAAGC,YAAY,GAAGC,kBAAkB,GAAGC,oBAAoB,GAAGC,mCAAmC,GAAG5sB,GAAK,GAAG6C,6BAA6B,YA/qO8B,CA+qOjB","file":"ajv.min.js"} \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/ajv/dist/nodent.min.js b/tools/node_modules/eslint/node_modules/ajv/dist/nodent.min.js
new file mode 100644
index 0000000000..3c1ece5f66
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/dist/nodent.min.js
@@ -0,0 +1,2 @@
+/* nodent 3.1.3: NoDent - Asynchronous Javascript language extensions */
+require=function e(t,n,r){function i(o,a){if(!n[o]){if(!t[o]){var u="function"==typeof require&&require;if(!a&&u)return u(o,!0);if(s)return s(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return i(n||e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var s="function"==typeof require&&require,o=0;o<r.length;o++)i(r[o]);return i}({1:[function(e,t,n){t.exports=function(t){switch(parseInt(t.version)){case 2:case 3:t.plugins.asyncawait=e("./acorn-v3");break;case 4:case 5:t.plugins.asyncawait=e("./acorn-v4");break;default:throw new Error("acorn-es7-plugin requires Acorn v2, 3, 4 or 5")}return t}},{"./acorn-v3":2,"./acorn-v4":3}],2:[function(e,t,n){function r(e,t){return e.lineStart>=t}function i(e,t,n){var r=t.input.slice(t.start);return n&&(r=r.replace(l,"$1 $3")),e.test(r)}function s(e,t,n,r){var i=new e.constructor(e.options,e.input,t);if(n)for(var s in n)i[s]=n[s];var o=e,a=i;return["inFunction","inAsyncFunction","inAsync","inGenerator","inModule"].forEach(function(e){e in o&&(a[e]=o[e])}),r&&(i.options.preserveParens=!0),i.nextToken(),i}var o={},a=/^async[\t ]+(return|throw)/,u=/^async[\t ]+function/,c=/^\s*[():;]/,l=/([^\n])\/\*(\*(?!\/)|[^\n*])*\*\/([^\n])/g,p=/\s*(get|set)\s*\(/;t.exports=function(e,t){var n=function(){};e.extend("initialContext",function(r){return function(){return this.options.ecmaVersion<7&&(n=function(t){e.raise(t.start,"async/await keywords only available when ecmaVersion>=7")}),this.reservedWords=new RegExp(this.reservedWords.toString().replace(/await|async/g,"").replace("|/","/").replace("/|","/").replace("||","|")),this.reservedWordsStrict=new RegExp(this.reservedWordsStrict.toString().replace(/await|async/g,"").replace("|/","/").replace("/|","/").replace("||","|")),this.reservedWordsStrictBind=new RegExp(this.reservedWordsStrictBind.toString().replace(/await|async/g,"").replace("|/","/").replace("/|","/").replace("||","|")),this.inAsyncFunction=t.inAsyncFunction,t.awaitAnywhere&&t.inAsyncFunction&&e.raise(node.start,"The options awaitAnywhere and inAsyncFunction are mutually exclusive"),r.apply(this,arguments)}}),e.extend("shouldParseExportStatement",function(e){return function(){return!("name"!==this.type.label||"async"!==this.value||!i(u,this))||e.apply(this,arguments)}}),e.extend("parseStatement",function(e){return function(n,r){var s=this.start,o=this.startLoc;if("name"===this.type.label)if(i(u,this,!0)){var c=this.inAsyncFunction;try{return this.inAsyncFunction=!0,this.next(),(l=this.parseStatement(n,r)).async=!0,l.start=s,l.loc&&(l.loc.start=o),l.range&&(l.range[0]=s),l}finally{this.inAsyncFunction=c}}else if("object"==typeof t&&t.asyncExits&&i(a,this)){this.next();var l=this.parseStatement(n,r);return l.async=!0,l.start=s,l.loc&&(l.loc.start=o),l.range&&(l.range[0]=s),l}return e.apply(this,arguments)}}),e.extend("parseIdent",function(e){return function(t){var n=e.apply(this,arguments);return this.inAsyncFunction&&"await"===n.name&&0===arguments.length&&this.raise(n.start,"'await' is reserved within async functions"),n}}),e.extend("parseExprAtom",function(e){return function(i){var a,u=this.start,l=this.startLoc,p=e.apply(this,arguments);if("Identifier"===p.type)if("async"!==p.name||r(this,p.end)){if("await"===p.name){var h=this.startNodeAt(p.start,p.loc&&p.loc.start);if(this.inAsyncFunction)return a=this.parseExprSubscripts(),h.operator="await",h.argument=a,h=this.finishNodeAt(h,"AwaitExpression",a.end,a.loc&&a.loc.end),n(h),h;if(this.input.slice(p.end).match(c))return t.awaitAnywhere||"module"!==this.options.sourceType?p:this.raise(p.start,"'await' is reserved within modules");if("object"==typeof t&&t.awaitAnywhere&&(u=this.start,(a=s(this,u-4).parseExprSubscripts()).end<=u))return a=s(this,u).parseExprSubscripts(),h.operator="await",h.argument=a,h=this.finishNodeAt(h,"AwaitExpression",a.end,a.loc&&a.loc.end),this.pos=a.end,this.end=a.end,this.endLoc=a.endLoc,this.next(),n(h),h;if(!t.awaitAnywhere&&"module"===this.options.sourceType)return this.raise(p.start,"'await' is reserved within modules")}}else{var f=this.inAsyncFunction;try{this.inAsyncFunction=!0;var d=this,y=!1,m={parseFunctionBody:function(e,t){try{var n=y;return y=!0,d.parseFunctionBody.apply(this,arguments)}finally{y=n}},raise:function(){try{return d.raise.apply(this,arguments)}catch(e){throw y?e:o}}};if("SequenceExpression"===(a=s(this,this.start,m,!0).parseExpression()).type&&(a=a.expressions[0]),"CallExpression"===a.type&&(a=a.callee),"FunctionExpression"===a.type||"FunctionDeclaration"===a.type||"ArrowFunctionExpression"===a.type)return"SequenceExpression"===(a=s(this,this.start,m).parseExpression()).type&&(a=a.expressions[0]),"CallExpression"===a.type&&(a=a.callee),a.async=!0,a.start=u,a.loc&&(a.loc.start=l),a.range&&(a.range[0]=u),this.pos=a.end,this.end=a.end,this.endLoc=a.endLoc,this.next(),n(a),a}catch(e){if(e!==o)throw e}finally{this.inAsyncFunction=f}}return p}}),e.extend("finishNodeAt",function(e){return function(t,n,r,i){return t.__asyncValue&&(delete t.__asyncValue,t.value.async=!0),e.apply(this,arguments)}}),e.extend("finishNode",function(e){return function(t,n){return t.__asyncValue&&(delete t.__asyncValue,t.value.async=!0),e.apply(this,arguments)}}),e.extend("parsePropertyName",function(e){return function(t){t.key&&t.key.name;var i=e.apply(this,arguments);return"Identifier"!==i.type||"async"!==i.name||r(this,i.end)||this.input.slice(i.end).match(c)||(p.test(this.input.slice(i.end))?(i=e.apply(this,arguments),t.__asyncValue=!0):(n(t),"set"===t.kind&&this.raise(i.start,"'set <member>(value)' cannot be be async"),"Identifier"===(i=e.apply(this,arguments)).type&&"set"===i.name&&this.raise(i.start,"'set <member>(value)' cannot be be async"),t.__asyncValue=!0)),i}}),e.extend("parseClassMethod",function(e){return function(t,n,r){var i;n.__asyncValue&&("constructor"===n.kind&&this.raise(n.start,"class constructor() cannot be be async"),i=this.inAsyncFunction,this.inAsyncFunction=!0);var s=e.apply(this,arguments);return this.inAsyncFunction=i,s}}),e.extend("parseMethod",function(e){return function(t){var n;this.__currentProperty&&this.__currentProperty.__asyncValue&&(n=this.inAsyncFunction,this.inAsyncFunction=!0);var r=e.apply(this,arguments);return this.inAsyncFunction=n,r}}),e.extend("parsePropertyValue",function(e){return function(t,n,r,i,s,o){var a=this.__currentProperty;this.__currentProperty=t;var u;t.__asyncValue&&(u=this.inAsyncFunction,this.inAsyncFunction=!0);var c=e.apply(this,arguments);return this.inAsyncFunction=u,this.__currentProperty=a,c}})}},{}],3:[function(e,t,n){function r(e,t,n){var r=new e.constructor(e.options,e.input,t);if(n)for(var i in n)r[i]=n[i];var s=e,o=r;return["inFunction","inAsync","inGenerator","inModule"].forEach(function(e){e in s&&(o[e]=s[e])}),r.nextToken(),r}var i=/^async[\t ]+(return|throw)/,s=/^\s*[):;]/,o=/([^\n])\/\*(\*(?!\/)|[^\n*])*\*\/([^\n])/g;t.exports=function(e,t){t&&"object"==typeof t||(t={}),e.extend("parse",function(n){return function(){return this.inAsync=t.inAsyncFunction,t.awaitAnywhere&&t.inAsyncFunction&&e.raise(node.start,"The options awaitAnywhere and inAsyncFunction are mutually exclusive"),n.apply(this,arguments)}}),e.extend("parseStatement",function(e){return function(n,r){var s=this.start,a=this.startLoc;if("name"===this.type.label&&t.asyncExits&&function(e,t,n){var r=t.input.slice(t.start);return n&&(r=r.replace(o,"$1 $3")),e.test(r)}(i,this)){this.next();var u=this.parseStatement(n,r);return u.async=!0,u.start=s,u.loc&&(u.loc.start=a),u.range&&(u.range[0]=s),u}return e.apply(this,arguments)}}),e.extend("parseIdent",function(e){return function(n){return"module"===this.options.sourceType&&this.options.ecmaVersion>=8&&t.awaitAnywhere?e.call(this,!0):e.apply(this,arguments)}}),e.extend("parseExprAtom",function(e){var n={};return function(i){var s,o=this.start,a=(this.startLoc,e.apply(this,arguments));if("Identifier"===a.type&&"await"===a.name&&!this.inAsync&&t.awaitAnywhere){var u=this.startNodeAt(a.start,a.loc&&a.loc.start);o=this.start;var c={raise:function(){try{return pp.raise.apply(this,arguments)}catch(e){throw n}}};try{if((s=r(this,o-4,c).parseExprSubscripts()).end<=o)return s=r(this,o,c).parseExprSubscripts(),u.argument=s,u=this.finishNodeAt(u,"AwaitExpression",s.end,s.loc&&s.loc.end),this.pos=s.end,this.end=s.end,this.endLoc=s.endLoc,this.next(),u}catch(e){if(e===n)return a;throw e}}return a}});var n={undefined:!0,get:!0,set:!0,static:!0,async:!0,constructor:!0};e.extend("parsePropertyName",function(e){return function(t){var r=t.key&&t.key.name,i=e.apply(this,arguments);return"get"===this.value&&(t.__maybeStaticAsyncGetter=!0),n[this.value]?i:("Identifier"!==i.type||"async"!==i.name&&"async"!==r||function(e,t){return e.lineStart>=t}(this,i.end)||this.input.slice(i.end).match(s)?delete t.__maybeStaticAsyncGetter:"set"===t.kind||"set"===i.name?this.raise(i.start,"'set <member>(value)' cannot be be async"):(this.__isAsyncProp=!0,"Identifier"===(i=e.apply(this,arguments)).type&&"set"===i.name&&this.raise(i.start,"'set <member>(value)' cannot be be async")),i)}}),e.extend("parseClassMethod",function(e){return function(t,n,r){var i=e.apply(this,arguments);return n.__maybeStaticAsyncGetter&&(delete n.__maybeStaticAsyncGetter,"get"!==n.key.name&&(n.kind="get")),i}}),e.extend("parseFunctionBody",function(e){return function(t,n){var r=this.inAsync;this.__isAsyncProp&&(t.async=!0,this.inAsync=!0,delete this.__isAsyncProp);var i=e.apply(this,arguments);return this.inAsync=r,i}})}},{}],4:[function(e,t,n){!function(e,r){"object"==typeof n&&void 0!==t?r(n):"function"==typeof define&&define.amd?define(["exports"],r):r(e.acorn=e.acorn||{})}(this,function(e){"use strict";function t(e,t){for(var n=65536,r=0;r<t.length;r+=2){if((n+=t[r])>e)return!1;if((n+=t[r+1])>=e)return!0}}function n(e,n){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&x.test(String.fromCharCode(e)):!1!==n&&t(e,E)))}function r(e,n){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&w.test(String.fromCharCode(e)):!1!==n&&(t(e,E)||t(e,S)))))}function i(e,t){return new k(e,{beforeExpr:!0,binop:t})}function s(e,t){return void 0===t&&(t={}),t.keyword=e,_[e]=new k(e,t)}function o(e){return 10===e||13===e||8232===e||8233===e}function a(e,t){return $.call(e,t)}function u(e,t){for(var n=1,r=0;;){T.lastIndex=r;var i=T.exec(e);if(!(i&&i.index<t))return new I(n,t-r);++n,r=i.index+i[0].length}}function c(e){var t={};for(var n in D)t[n]=e&&a(e,n)?e[n]:D[n];if(t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),R(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}return R(t.onComment)&&(t.onComment=function(e,t){return function(n,r,i,s,o,a){var u={type:n?"Block":"Line",value:r,start:i,end:s};e.locations&&(u.loc=new j(this,o,a)),e.ranges&&(u.range=[i,s]),t.push(u)}}(t,t.onComment)),t}function l(e){return new RegExp("^(?:"+e.replace(/ /g,"|")+")$")}function p(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=-1}function h(e,t,n,r){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=n),e}function f(e,t,n,r){try{return new RegExp(e,t)}catch(e){if(void 0!==n)throw e instanceof SyntaxError&&r.raise(n,"Error parsing regular expression: "+e.message),e}}function d(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}var y={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"},m="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",g={5:m,6:m+" const class extends export import super"},v="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿕ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞮꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",b="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣔ-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",x=new RegExp("["+v+"]"),w=new RegExp("["+v+b+"]");v=b=null;var E=[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,19,35,5,35,5,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,66,18,2,1,11,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,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,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,60,67,1213,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,3,5761,10591,541],S=[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,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,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,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239],k=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null},A={beforeExpr:!0},C={startsExpr:!0},_={},L={num:new k("num",C),regexp:new k("regexp",C),string:new k("string",C),name:new k("name",C),eof:new k("eof"),bracketL:new k("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new k("]"),braceL:new k("{",{beforeExpr:!0,startsExpr:!0}),braceR:new k("}"),parenL:new k("(",{beforeExpr:!0,startsExpr:!0}),parenR:new k(")"),comma:new k(",",A),semi:new k(";",A),colon:new k(":",A),dot:new k("."),question:new k("?",A),arrow:new k("=>",A),template:new k("template"),invalidTemplate:new k("invalidTemplate"),ellipsis:new k("...",A),backQuote:new k("`",C),dollarBraceL:new k("${",{beforeExpr:!0,startsExpr:!0}),eq:new k("=",{beforeExpr:!0,isAssign:!0}),assign:new k("_=",{beforeExpr:!0,isAssign:!0}),incDec:new k("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new k("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:i("||",1),logicalAND:i("&&",2),bitwiseOR:i("|",3),bitwiseXOR:i("^",4),bitwiseAND:i("&",5),equality:i("==/!=/===/!==",6),relational:i("</>/<=/>=",7),bitShift:i("<</>>/>>>",8),plusMin:new k("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:i("%",10),star:i("*",10),slash:i("/",10),starstar:new k("**",{beforeExpr:!0}),_break:s("break"),_case:s("case",A),_catch:s("catch"),_continue:s("continue"),_debugger:s("debugger"),_default:s("default",A),_do:s("do",{isLoop:!0,beforeExpr:!0}),_else:s("else",A),_finally:s("finally"),_for:s("for",{isLoop:!0}),_function:s("function",C),_if:s("if"),_return:s("return",A),_switch:s("switch"),_throw:s("throw",A),_try:s("try"),_var:s("var"),_const:s("const"),_while:s("while",{isLoop:!0}),_with:s("with"),_new:s("new",{beforeExpr:!0,startsExpr:!0}),_this:s("this",C),_super:s("super",C),_class:s("class",C),_extends:s("extends",A),_export:s("export"),_import:s("import"),_null:s("null",C),_true:s("true",C),_false:s("false",C),_in:s("in",{beforeExpr:!0,binop:7}),_instanceof:s("instanceof",{beforeExpr:!0,binop:7}),_typeof:s("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:s("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:s("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},O=/\r\n?|\n|\u2028|\u2029/,T=new RegExp(O.source,"g"),N=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,P=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,F=Object.prototype,$=F.hasOwnProperty,B=F.toString,R=Array.isArray||function(e){return"[object Array]"===B.call(e)},I=function(e,t){this.line=e,this.column=t};I.prototype.offset=function(e){return new I(this.line,this.column+e)};var j=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)},D={ecmaVersion:7,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1,plugins:{}},M={},q=function(e,t,n){this.options=e=c(e),this.sourceFile=e.sourceFile,this.keywords=l(g[e.ecmaVersion>=6?6:5]);var r="";if(!e.allowReserved){for(var i=e.ecmaVersion;!(r=y[i]);i--);"module"==e.sourceType&&(r+=" await")}this.reservedWords=l(r);var s=(r?r+" ":"")+y.strict;this.reservedWordsStrict=l(s),this.reservedWordsStrictBind=l(s+" "+y.strictBind),this.input=String(t),this.containsEsc=!1,this.loadPlugins(e.plugins),n?(this.pos=n,this.lineStart=this.input.lastIndexOf("\n",n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(O).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=L.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.inFunction=this.inGenerator=this.inAsync=!1,this.yieldPos=this.awaitPos=0,this.labels=[],0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterFunctionScope()};q.prototype.isKeyword=function(e){return this.keywords.test(e)},q.prototype.isReservedWord=function(e){return this.reservedWords.test(e)},q.prototype.extend=function(e,t){this[e]=t(this[e])},q.prototype.loadPlugins=function(e){for(var t in e){var n=M[t];if(!n)throw new Error("Plugin '"+t+"' not found");n(this,e[t])}},q.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)};var V=q.prototype,U=/^(?:'((?:\\.|[^'])*?)'|"((?:\\.|[^"])*?)"|;)/;V.strictDirective=function(e){for(;;){P.lastIndex=e,e+=P.exec(this.input)[0].length;var t=U.exec(this.input.slice(e));if(!t)return!1;if("use strict"==(t[1]||t[2]))return!0;e+=t[0].length}},V.eat=function(e){return this.type===e&&(this.next(),!0)},V.isContextual=function(e){return this.type===L.name&&this.value===e},V.eatContextual=function(e){return this.value===e&&this.eat(L.name)},V.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},V.canInsertSemicolon=function(){return this.type===L.eof||this.type===L.braceR||O.test(this.input.slice(this.lastTokEnd,this.start))},V.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},V.semicolon=function(){this.eat(L.semi)||this.insertSemicolon()||this.unexpected()},V.afterTrailingComma=function(e,t){if(this.type==e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},V.expect=function(e){this.eat(e)||this.unexpected()},V.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")},V.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,"Parenthesized pattern")}},V.checkExpressionErrors=function(e,t){var n=e?e.shorthandAssign:-1;if(!t)return n>=0;n>-1&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns")},V.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},V.isSimpleAssignTarget=function(e){return"ParenthesizedExpression"===e.type?this.isSimpleAssignTarget(e.expression):"Identifier"===e.type||"MemberExpression"===e.type};var z=q.prototype;z.parseTopLevel=function(e){var t={};for(e.body||(e.body=[]);this.type!==L.eof;){var n=this.parseStatement(!0,!0,t);e.body.push(n)}return this.adaptDirectivePrologue(e.body),this.next(),this.options.ecmaVersion>=6&&(e.sourceType=this.options.sourceType),this.finishNode(e,"Program")};var W={kind:"loop"},G={kind:"switch"};z.isLet=function(){if(this.type!==L.name||this.options.ecmaVersion<6||"let"!=this.value)return!1;P.lastIndex=this.pos;var e=P.exec(this.input),t=this.pos+e[0].length,i=this.input.charCodeAt(t);if(91===i||123==i)return!0;if(n(i,!0)){for(var s=t+1;r(this.input.charCodeAt(s),!0);)++s;var o=this.input.slice(t,s);if(!this.isKeyword(o))return!0}return!1},z.isAsyncFunction=function(){if(this.type!==L.name||this.options.ecmaVersion<8||"async"!=this.value)return!1;P.lastIndex=this.pos;var e=P.exec(this.input),t=this.pos+e[0].length;return!(O.test(this.input.slice(this.pos,t))||"function"!==this.input.slice(t,t+8)||t+8!=this.input.length&&r(this.input.charAt(t+8)))},z.parseStatement=function(e,t,n){var r,i=this.type,s=this.startNode();switch(this.isLet()&&(i=L._var,r="let"),i){case L._break:case L._continue:return this.parseBreakContinueStatement(s,i.keyword);case L._debugger:return this.parseDebuggerStatement(s);case L._do:return this.parseDoStatement(s);case L._for:return this.parseForStatement(s);case L._function:return!e&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(s,!1);case L._class:return e||this.unexpected(),this.parseClass(s,!0);case L._if:return this.parseIfStatement(s);case L._return:return this.parseReturnStatement(s);case L._switch:return this.parseSwitchStatement(s);case L._throw:return this.parseThrowStatement(s);case L._try:return this.parseTryStatement(s);case L._const:case L._var:return r=r||this.value,e||"var"==r||this.unexpected(),this.parseVarStatement(s,r);case L._while:return this.parseWhileStatement(s);case L._with:return this.parseWithStatement(s);case L.braceL:return this.parseBlock();case L.semi:return this.parseEmptyStatement(s);case L._export:case L._import:return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),i===L._import?this.parseImport(s):this.parseExport(s,n);default:if(this.isAsyncFunction()&&e)return this.next(),this.parseFunctionStatement(s,!0);var o=this.value,a=this.parseExpression();return i===L.name&&"Identifier"===a.type&&this.eat(L.colon)?this.parseLabeledStatement(s,o,a):this.parseExpressionStatement(s,a)}},z.parseBreakContinueStatement=function(e,t){var n="break"==t;this.next(),this.eat(L.semi)||this.insertSemicolon()?e.label=null:this.type!==L.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var r=0;r<this.labels.length;++r){var i=this.labels[r];if(null==e.label||i.name===e.label.name){if(null!=i.kind&&(n||"loop"===i.kind))break;if(e.label&&n)break}}return r===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,n?"BreakStatement":"ContinueStatement")},z.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},z.parseDoStatement=function(e){return this.next(),this.labels.push(W),e.body=this.parseStatement(!1),this.labels.pop(),this.expect(L._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(L.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},z.parseForStatement=function(e){if(this.next(),this.labels.push(W),this.enterLexicalScope(),this.expect(L.parenL),this.type===L.semi)return this.parseFor(e,null);var t=this.isLet();if(this.type===L._var||this.type===L._const||t){var n=this.startNode(),r=t?"let":this.value;return this.next(),this.parseVar(n,!0,r),this.finishNode(n,"VariableDeclaration"),!(this.type===L._in||this.options.ecmaVersion>=6&&this.isContextual("of"))||1!==n.declarations.length||"var"!==r&&n.declarations[0].init?this.parseFor(e,n):this.parseForIn(e,n)}var i=new p,s=this.parseExpression(!0,i);return this.type===L._in||this.options.ecmaVersion>=6&&this.isContextual("of")?(this.toAssignable(s),this.checkLVal(s),this.checkPatternErrors(i,!0),this.parseForIn(e,s)):(this.checkExpressionErrors(i,!0),this.parseFor(e,s))},z.parseFunctionStatement=function(e,t){return this.next(),this.parseFunction(e,!0,!1,t)},z.isFunction=function(){return this.type===L._function||this.isAsyncFunction()},z.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(!this.strict&&this.isFunction()),e.alternate=this.eat(L._else)?this.parseStatement(!this.strict&&this.isFunction()):null,this.finishNode(e,"IfStatement")},z.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(L.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},z.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(L.braceL),this.labels.push(G),this.enterLexicalScope();for(var t,n=!1;this.type!=L.braceR;)if(this.type===L._case||this.type===L._default){var r=this.type===L._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),n=!0,t.test=null),this.expect(L.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(!0));return this.exitLexicalScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},z.parseThrowStatement=function(e){return this.next(),O.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var J=[];z.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===L._catch){var t=this.startNode();this.next(),this.expect(L.parenL),t.param=this.parseBindingAtom(),this.enterLexicalScope(),this.checkLVal(t.param,"let"),this.expect(L.parenR),t.body=this.parseBlock(!1),this.exitLexicalScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(L._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},z.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},z.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(W),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,"WhileStatement")},z.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement(!1),this.finishNode(e,"WithStatement")},z.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},z.parseLabeledStatement=function(e,t,n){for(var r=0,i=this.labels;r<i.length;r+=1){i[r].name===t&&this.raise(n.start,"Label '"+t+"' is already declared")}for(var s=this.type.isLoop?"loop":this.type===L._switch?"switch":null,o=this.labels.length-1;o>=0;o--){var a=this.labels[o];if(a.statementStart!=e.start)break;a.statementStart=this.start,a.kind=s}return this.labels.push({name:t,kind:s,statementStart:this.start}),e.body=this.parseStatement(!0),("ClassDeclaration"==e.body.type||"VariableDeclaration"==e.body.type&&"var"!=e.body.kind||"FunctionDeclaration"==e.body.type&&(this.strict||e.body.generator))&&this.raiseRecoverable(e.body.start,"Invalid labeled declaration"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")},z.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},z.parseBlock=function(e){void 0===e&&(e=!0);var t=this.startNode();for(t.body=[],this.expect(L.braceL),e&&this.enterLexicalScope();!this.eat(L.braceR);){var n=this.parseStatement(!0);t.body.push(n)}return e&&this.exitLexicalScope(),this.finishNode(t,"BlockStatement")},z.parseFor=function(e,t){return e.init=t,this.expect(L.semi),e.test=this.type===L.semi?null:this.parseExpression(),this.expect(L.semi),e.update=this.type===L.parenR?null:this.parseExpression(),this.expect(L.parenR),this.exitLexicalScope(),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,"ForStatement")},z.parseForIn=function(e,t){var n=this.type===L._in?"ForInStatement":"ForOfStatement";return this.next(),e.left=t,e.right=this.parseExpression(),this.expect(L.parenR),this.exitLexicalScope(),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,n)},z.parseVar=function(e,t,n){for(e.declarations=[],e.kind=n;;){var r=this.startNode();if(this.parseVarId(r,n),this.eat(L.eq)?r.init=this.parseMaybeAssign(t):"const"!==n||this.type===L._in||this.options.ecmaVersion>=6&&this.isContextual("of")?"Identifier"==r.id.type||t&&(this.type===L._in||this.isContextual("of"))?r.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(r,"VariableDeclarator")),!this.eat(L.comma))break}return e},z.parseVarId=function(e,t){e.id=this.parseBindingAtom(t),this.checkLVal(e.id,t,!1)},z.parseFunction=function(e,t,n,r){this.initFunction(e),this.options.ecmaVersion>=6&&!r&&(e.generator=this.eat(L.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&&(e.id="nullableID"===t&&this.type!=L.name?null:this.parseIdent(),e.id&&this.checkLVal(e.id,"var"));var i=this.inGenerator,s=this.inAsync,o=this.yieldPos,a=this.awaitPos,u=this.inFunction;return this.inGenerator=e.generator,this.inAsync=e.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,this.enterFunctionScope(),t||(e.id=this.type==L.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n),this.inGenerator=i,this.inAsync=s,this.yieldPos=o,this.awaitPos=a,this.inFunction=u,this.finishNode(e,t?"FunctionDeclaration":"FunctionExpression")},z.parseFunctionParams=function(e){this.expect(L.parenL),e.params=this.parseBindingList(L.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},z.parseClass=function(e,t){this.next(),this.parseClassId(e,t),this.parseClassSuper(e);var n=this.startNode(),r=!1;for(n.body=[],this.expect(L.braceL);!this.eat(L.braceR);)if(!this.eat(L.semi)){var i=this.startNode(),s=this.eat(L.star),o=!1,a=this.type===L.name&&"static"===this.value;this.parsePropertyName(i),i.static=a&&this.type!==L.parenL,i.static&&(s&&this.unexpected(),s=this.eat(L.star),this.parsePropertyName(i)),this.options.ecmaVersion>=8&&!s&&!i.computed&&"Identifier"===i.key.type&&"async"===i.key.name&&this.type!==L.parenL&&!this.canInsertSemicolon()&&(o=!0,this.parsePropertyName(i)),i.kind="method";var u=!1;if(!i.computed){var c=i.key;s||o||"Identifier"!==c.type||this.type===L.parenL||"get"!==c.name&&"set"!==c.name||(u=!0,i.kind=c.name,c=this.parsePropertyName(i)),!i.static&&("Identifier"===c.type&&"constructor"===c.name||"Literal"===c.type&&"constructor"===c.value)&&(r&&this.raise(c.start,"Duplicate constructor in the same class"),u&&this.raise(c.start,"Constructor can't have get/set modifier"),s&&this.raise(c.start,"Constructor can't be a generator"),o&&this.raise(c.start,"Constructor can't be an async method"),i.kind="constructor",r=!0)}if(this.parseClassMethod(n,i,s,o),u){var l="get"===i.kind?0:1;if(i.value.params.length!==l){var p=i.value.start;"get"===i.kind?this.raiseRecoverable(p,"getter should have no params"):this.raiseRecoverable(p,"setter should have exactly one param")}else"set"===i.kind&&"RestElement"===i.value.params[0].type&&this.raiseRecoverable(i.value.params[0].start,"Setter cannot use rest params")}}return e.body=this.finishNode(n,"ClassBody"),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},z.parseClassMethod=function(e,t,n,r){t.value=this.parseMethod(n,r),e.body.push(this.finishNode(t,"MethodDefinition"))},z.parseClassId=function(e,t){e.id=this.type===L.name?this.parseIdent():!0===t?this.unexpected():null},z.parseClassSuper=function(e){e.superClass=this.eat(L._extends)?this.parseExprSubscripts():null},z.parseExport=function(e,t){if(this.next(),this.eat(L.star))return this.expectContextual("from"),e.source=this.type===L.string?this.parseExprAtom():this.unexpected(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(L._default)){this.checkExport(t,"default",this.lastTokStart);var n;if(this.type===L._function||(n=this.isAsyncFunction())){var r=this.startNode();this.next(),n&&this.next(),e.declaration=this.parseFunction(r,"nullableID",!1,n)}else if(this.type===L._class){var i=this.startNode();e.declaration=this.parseClass(i,"nullableID")}else e.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(!0),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id.name,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))e.source=this.type===L.string?this.parseExprAtom():this.unexpected();else{for(var s=0,o=e.specifiers;s<o.length;s+=1){var a=o[s];this.checkUnreserved(a.local)}e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")},z.checkExport=function(e,t,n){e&&(a(e,t)&&this.raiseRecoverable(n,"Duplicate export '"+t+"'"),e[t]=!0)},z.checkPatternExport=function(e,t){var n=t.type;if("Identifier"==n)this.checkExport(e,t.name,t.start);else if("ObjectPattern"==n)for(var r=0,i=t.properties;r<i.length;r+=1){var s=i[r];this.checkPatternExport(e,s.value)}else if("ArrayPattern"==n)for(var o=0,a=t.elements;o<a.length;o+=1){var u=a[o];u&&this.checkPatternExport(e,u)}else"AssignmentPattern"==n?this.checkPatternExport(e,t.left):"ParenthesizedExpression"==n&&this.checkPatternExport(e,t.expression)},z.checkVariableExport=function(e,t){if(e)for(var n=0,r=t;n<r.length;n+=1){var i=r[n];this.checkPatternExport(e,i.id)}},z.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},z.parseExportSpecifiers=function(e){var t=[],n=!0;for(this.expect(L.braceL);!this.eat(L.braceR);){if(n)n=!1;else if(this.expect(L.comma),this.afterTrailingComma(L.braceR))break;var r=this.startNode();r.local=this.parseIdent(!0),r.exported=this.eatContextual("as")?this.parseIdent(!0):r.local,this.checkExport(e,r.exported.name,r.exported.start),t.push(this.finishNode(r,"ExportSpecifier"))}return t},z.parseImport=function(e){return this.next(),this.type===L.string?(e.specifiers=J,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===L.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},z.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===L.name){var n=this.startNode();if(n.local=this.parseIdent(),this.checkLVal(n.local,"let"),e.push(this.finishNode(n,"ImportDefaultSpecifier")),!this.eat(L.comma))return e}if(this.type===L.star){var r=this.startNode();return this.next(),this.expectContextual("as"),r.local=this.parseIdent(),this.checkLVal(r.local,"let"),e.push(this.finishNode(r,"ImportNamespaceSpecifier")),e}for(this.expect(L.braceL);!this.eat(L.braceR);){if(t)t=!1;else if(this.expect(L.comma),this.afterTrailingComma(L.braceR))break;var i=this.startNode();i.imported=this.parseIdent(!0),this.eatContextual("as")?i.local=this.parseIdent():(this.checkUnreserved(i.imported),i.local=i.imported),this.checkLVal(i.local,"let"),e.push(this.finishNode(i,"ImportSpecifier"))}return e},z.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)},z.isDirectiveCandidate=function(e){return"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&('"'===this.input[e.start]||"'"===this.input[e.start])};var H=q.prototype;H.toAssignable=function(e,t){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Can not use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":break;case"ObjectExpression":e.type="ObjectPattern";for(var n=0,r=e.properties;n<r.length;n+=1){var i=r[n];"init"!==i.kind&&this.raise(i.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(i.value,t)}break;case"ArrayExpression":e.type="ArrayPattern",this.toAssignableList(e.elements,t);break;case"AssignmentExpression":if("="!==e.operator){this.raise(e.left.end,"Only '=' operator can be used for specifying default value.");break}e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);case"AssignmentPattern":break;case"ParenthesizedExpression":this.toAssignable(e.expression,t);break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}return e},H.toAssignableList=function(e,t){var n=e.length;if(n){var r=e[n-1];if(r&&"RestElement"==r.type)--n;else if(r&&"SpreadElement"==r.type){r.type="RestElement";var i=r.argument;this.toAssignable(i,t),--n}6===this.options.ecmaVersion&&t&&r&&"RestElement"===r.type&&"Identifier"!==r.argument.type&&this.unexpected(r.argument.start)}for(var s=0;s<n;s++){var o=e[s];o&&this.toAssignable(o,t)}return e},H.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},H.parseRestBinding=function(){var e=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==L.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")},H.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case L.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(L.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case L.braceL:return this.parseObj(!0)}return this.parseIdent()},H.parseBindingList=function(e,t,n){for(var r=[],i=!0;!this.eat(e);)if(i?i=!1:this.expect(L.comma),t&&this.type===L.comma)r.push(null);else{if(n&&this.afterTrailingComma(e))break;if(this.type===L.ellipsis){var s=this.parseRestBinding();this.parseBindingListItem(s),r.push(s),this.type===L.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}var o=this.parseMaybeDefault(this.start,this.startLoc);this.parseBindingListItem(o),r.push(o)}return r},H.parseBindingListItem=function(e){return e},H.parseMaybeDefault=function(e,t,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(L.eq))return n;var r=this.startNodeAt(e,t);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")},H.checkLVal=function(e,t,n){switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(t?"Binding ":"Assigning to ")+e.name+" in strict mode"),n&&(a(n,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),n[e.name]=!0),t&&"none"!==t&&(("var"===t&&!this.canDeclareVarName(e.name)||"var"!==t&&!this.canDeclareLexicalName(e.name))&&this.raiseRecoverable(e.start,"Identifier '"+e.name+"' has already been declared"),"var"===t?this.declareVarName(e.name):this.declareLexicalName(e.name));break;case"MemberExpression":t&&this.raiseRecoverable(e.start,(t?"Binding":"Assigning to")+" member expression");break;case"ObjectPattern":for(var r=0,i=e.properties;r<i.length;r+=1){var s=i[r];this.checkLVal(s.value,t,n)}break;case"ArrayPattern":for(var o=0,u=e.elements;o<u.length;o+=1){var c=u[o];c&&this.checkLVal(c,t,n)}break;case"AssignmentPattern":this.checkLVal(e.left,t,n);break;case"RestElement":this.checkLVal(e.argument,t,n);break;case"ParenthesizedExpression":this.checkLVal(e.expression,t,n);break;default:this.raise(e.start,(t?"Binding":"Assigning to")+" rvalue")}};var Y=q.prototype;Y.checkPropClash=function(e,t){if(!(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var n,r=e.key;switch(r.type){case"Identifier":n=r.name;break;case"Literal":n=String(r.value);break;default:return}var i=e.kind;if(this.options.ecmaVersion>=6)"__proto__"===n&&"init"===i&&(t.proto&&this.raiseRecoverable(r.start,"Redefinition of __proto__ property"),t.proto=!0);else{var s=t[n="$"+n];if(s){("init"===i?this.strict&&s.init||s.get||s.set:s.init||s[i])&&this.raiseRecoverable(r.start,"Redefinition of property")}else s=t[n]={init:!1,get:!1,set:!1};s[i]=!0}}},Y.parseExpression=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===L.comma){var s=this.startNodeAt(n,r);for(s.expressions=[i];this.eat(L.comma);)s.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(s,"SequenceExpression")}return i},Y.parseMaybeAssign=function(e,t,n){if(this.inGenerator&&this.isContextual("yield"))return this.parseYield();var r=!1,i=-1,s=-1;t?(i=t.parenthesizedAssign,s=t.trailingComma,t.parenthesizedAssign=t.trailingComma=-1):(t=new p,r=!0);var o=this.start,a=this.startLoc;this.type!=L.parenL&&this.type!=L.name||(this.potentialArrowAt=this.start);var u=this.parseMaybeConditional(e,t);if(n&&(u=n.call(this,u,o,a)),this.type.isAssign){this.checkPatternErrors(t,!0),r||p.call(t);var c=this.startNodeAt(o,a);return c.operator=this.value,c.left=this.type===L.eq?this.toAssignable(u):u,t.shorthandAssign=-1,this.checkLVal(u),this.next(),c.right=this.parseMaybeAssign(e),this.finishNode(c,"AssignmentExpression")}return r&&this.checkExpressionErrors(t,!0),i>-1&&(t.parenthesizedAssign=i),s>-1&&(t.trailingComma=s),u},Y.parseMaybeConditional=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(L.question)){var s=this.startNodeAt(n,r);return s.test=i,s.consequent=this.parseMaybeAssign(),this.expect(L.colon),s.alternate=this.parseMaybeAssign(e),this.finishNode(s,"ConditionalExpression")}return i},Y.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1);return this.checkExpressionErrors(t)?i:i.start==n&&"ArrowFunctionExpression"===i.type?i:this.parseExprOp(i,n,r,-1,e)},Y.parseExprOp=function(e,t,n,r,i){var s=this.type.binop;if(null!=s&&(!i||this.type!==L._in)&&s>r){var o=this.type===L.logicalOR||this.type===L.logicalAND,a=this.value;this.next();var u=this.start,c=this.startLoc,l=this.parseExprOp(this.parseMaybeUnary(null,!1),u,c,s,i),p=this.buildBinary(t,n,e,l,a,o);return this.parseExprOp(p,t,n,r,i)}return e},Y.buildBinary=function(e,t,n,r,i,s){var o=this.startNodeAt(e,t);return o.left=n,o.operator=i,o.right=r,this.finishNode(o,s?"LogicalExpression":"BinaryExpression")},Y.parseMaybeUnary=function(e,t){var n,r=this.start,i=this.startLoc;if(this.inAsync&&this.isContextual("await"))n=this.parseAwait(),t=!0;else if(this.type.prefix){var s=this.startNode(),o=this.type===L.incDec;s.operator=this.value,s.prefix=!0,this.next(),s.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),o?this.checkLVal(s.argument):this.strict&&"delete"===s.operator&&"Identifier"===s.argument.type?this.raiseRecoverable(s.start,"Deleting local variable in strict mode"):t=!0,n=this.finishNode(s,o?"UpdateExpression":"UnaryExpression")}else{if(n=this.parseExprSubscripts(e),this.checkExpressionErrors(e))return n;for(;this.type.postfix&&!this.canInsertSemicolon();){var a=this.startNodeAt(r,i);a.operator=this.value,a.prefix=!1,a.argument=n,this.checkLVal(n),this.next(),n=this.finishNode(a,"UpdateExpression")}}return!t&&this.eat(L.starstar)?this.buildBinary(r,i,n,this.parseMaybeUnary(null,!1),"**",!1):n},Y.parseExprSubscripts=function(e){var t=this.start,n=this.startLoc,r=this.parseExprAtom(e),i="ArrowFunctionExpression"===r.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd);if(this.checkExpressionErrors(e)||i)return r;var s=this.parseSubscripts(r,t,n);return e&&"MemberExpression"===s.type&&(e.parenthesizedAssign>=s.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=s.start&&(e.parenthesizedBind=-1)),s},Y.parseSubscripts=function(e,t,n,r){for(var i=this.options.ecmaVersion>=8&&"Identifier"===e.type&&"async"===e.name&&this.lastTokEnd==e.end&&!this.canInsertSemicolon(),s=void 0;;)if((s=this.eat(L.bracketL))||this.eat(L.dot)){var o=this.startNodeAt(t,n);o.object=e,o.property=s?this.parseExpression():this.parseIdent(!0),o.computed=!!s,s&&this.expect(L.bracketR),e=this.finishNode(o,"MemberExpression")}else if(!r&&this.eat(L.parenL)){var a=new p,u=this.yieldPos,c=this.awaitPos;this.yieldPos=0,this.awaitPos=0;var l=this.parseExprList(L.parenR,this.options.ecmaVersion>=8,!1,a);if(i&&!this.canInsertSemicolon()&&this.eat(L.arrow))return this.checkPatternErrors(a,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=u,this.awaitPos=c,this.parseArrowExpression(this.startNodeAt(t,n),l,!0);this.checkExpressionErrors(a,!0),this.yieldPos=u||this.yieldPos,this.awaitPos=c||this.awaitPos;var h=this.startNodeAt(t,n);h.callee=e,h.arguments=l,e=this.finishNode(h,"CallExpression")}else{if(this.type!==L.backQuote)return e;var f=this.startNodeAt(t,n);f.tag=e,f.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(f,"TaggedTemplateExpression")}},Y.parseExprAtom=function(e){var t,n=this.potentialArrowAt==this.start;switch(this.type){case L._super:return this.inFunction||this.raise(this.start,"'super' outside of function or class"),t=this.startNode(),this.next(),this.type!==L.dot&&this.type!==L.bracketL&&this.type!==L.parenL&&this.unexpected(),this.finishNode(t,"Super");case L._this:return t=this.startNode(),this.next(),this.finishNode(t,"ThisExpression");case L.name:var r=this.start,i=this.startLoc,s=this.parseIdent(this.type!==L.name);if(this.options.ecmaVersion>=8&&"async"===s.name&&!this.canInsertSemicolon()&&this.eat(L._function))return this.parseFunction(this.startNodeAt(r,i),!1,!1,!0);if(n&&!this.canInsertSemicolon()){if(this.eat(L.arrow))return this.parseArrowExpression(this.startNodeAt(r,i),[s],!1);if(this.options.ecmaVersion>=8&&"async"===s.name&&this.type===L.name)return s=this.parseIdent(),!this.canInsertSemicolon()&&this.eat(L.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(r,i),[s],!0)}return s;case L.regexp:var o=this.value;return t=this.parseLiteral(o.value),t.regex={pattern:o.pattern,flags:o.flags},t;case L.num:case L.string:return this.parseLiteral(this.value);case L._null:case L._true:case L._false:return t=this.startNode(),t.value=this.type===L._null?null:this.type===L._true,t.raw=this.type.keyword,this.next(),this.finishNode(t,"Literal");case L.parenL:var a=this.start,u=this.parseParenAndDistinguishExpression(n);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(u)&&(e.parenthesizedAssign=a),e.parenthesizedBind<0&&(e.parenthesizedBind=a)),u;case L.bracketL:return t=this.startNode(),this.next(),t.elements=this.parseExprList(L.bracketR,!0,!0,e),this.finishNode(t,"ArrayExpression");case L.braceL:return this.parseObj(!1,e);case L._function:return t=this.startNode(),this.next(),this.parseFunction(t,!1);case L._class:return this.parseClass(this.startNode(),!1);case L._new:return this.parseNew();case L.backQuote:return this.parseTemplate();default:this.unexpected()}},Y.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),this.next(),this.finishNode(t,"Literal")},Y.parseParenExpression=function(){this.expect(L.parenL);var e=this.parseExpression();return this.expect(L.parenR),e},Y.parseParenAndDistinguishExpression=function(e){var t,n=this.start,r=this.startLoc,i=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var s,o,a=this.start,u=this.startLoc,c=[],l=!0,h=!1,f=new p,d=this.yieldPos,y=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==L.parenR;){if(l?l=!1:this.expect(L.comma),i&&this.afterTrailingComma(L.parenR,!0)){h=!0;break}if(this.type===L.ellipsis){s=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===L.comma&&this.raise(this.start,"Comma is not permitted after the rest element");break}this.type!==L.parenL||o||(o=this.start),c.push(this.parseMaybeAssign(!1,f,this.parseParenItem))}var m=this.start,g=this.startLoc;if(this.expect(L.parenR),e&&!this.canInsertSemicolon()&&this.eat(L.arrow))return this.checkPatternErrors(f,!1),this.checkYieldAwaitInDefaultParams(),o&&this.unexpected(o),this.yieldPos=d,this.awaitPos=y,this.parseParenArrowList(n,r,c);c.length&&!h||this.unexpected(this.lastTokStart),s&&this.unexpected(s),this.checkExpressionErrors(f,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=y||this.awaitPos,c.length>1?((t=this.startNodeAt(a,u)).expressions=c,this.finishNodeAt(t,"SequenceExpression",m,g)):t=c[0]}else t=this.parseParenExpression();if(this.options.preserveParens){var v=this.startNodeAt(n,r);return v.expression=t,this.finishNode(v,"ParenthesizedExpression")}return t},Y.parseParenItem=function(e){return e},Y.parseParenArrowList=function(e,t,n){return this.parseArrowExpression(this.startNodeAt(e,t),n)};var Z=[];Y.parseNew=function(){var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(L.dot))return e.meta=t,e.property=this.parseIdent(!0),"target"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is new.target"),this.inFunction||this.raiseRecoverable(e.start,"new.target can only be used in functions"),this.finishNode(e,"MetaProperty");var n=this.start,r=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(),n,r,!0),this.eat(L.parenL)?e.arguments=this.parseExprList(L.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Z,this.finishNode(e,"NewExpression")},Y.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===L.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),n.value={raw:this.value,cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),n.tail=this.type===L.backQuote,this.finishNode(n,"TemplateElement")},Y.parseTemplate=function(e){void 0===e&&(e={});var t=e.isTagged;void 0===t&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(n.quasis=[r];!r.tail;)this.expect(L.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(L.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,"TemplateLiteral")},Y.isAsyncProp=function(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.type===L.name||this.type===L.num||this.type===L.string||this.type===L.bracketL||this.type.keyword)&&!O.test(this.input.slice(this.lastTokEnd,this.start))},Y.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};for(n.properties=[],this.next();!this.eat(L.braceR);){if(r)r=!1;else if(this.expect(L.comma),this.afterTrailingComma(L.braceR))break;var s=this.parseProperty(e,t);this.checkPropClash(s,i),n.properties.push(s)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")},Y.parseProperty=function(e,t){var n,r,i,s,o=this.startNode();return this.options.ecmaVersion>=6&&(o.method=!1,o.shorthand=!1,(e||t)&&(i=this.start,s=this.startLoc),e||(n=this.eat(L.star))),this.parsePropertyName(o),!e&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(o)?(r=!0,this.parsePropertyName(o,t)):r=!1,this.parsePropertyValue(o,e,n,r,i,s,t),this.finishNode(o,"Property")},Y.parsePropertyValue=function(e,t,n,r,i,s,o){if((n||r)&&this.type===L.colon&&this.unexpected(),this.eat(L.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===L.parenL)t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(n,r);else if(t||!(this.options.ecmaVersion>=5)||e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||this.type==L.comma||this.type==L.braceR)this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?(this.checkUnreserved(e.key),e.kind="init",t?e.value=this.parseMaybeDefault(i,s,e.key):this.type===L.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,s,e.key)):e.value=e.key,e.shorthand=!0):this.unexpected();else{(n||r)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var a="get"===e.kind?0:1;if(e.value.params.length!==a){var u=e.value.start;"get"===e.kind?this.raiseRecoverable(u,"getter should have no params"):this.raiseRecoverable(u,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}},Y.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(L.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(L.bracketR),e.key;e.computed=!1}return e.key=this.type===L.num||this.type===L.string?this.parseExprAtom():this.parseIdent(!0)},Y.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=!1,e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},Y.parseMethod=function(e,t){var n=this.startNode(),r=this.inGenerator,i=this.inAsync,s=this.yieldPos,o=this.awaitPos,a=this.inFunction;return this.initFunction(n),this.options.ecmaVersion>=6&&(n.generator=e),this.options.ecmaVersion>=8&&(n.async=!!t),this.inGenerator=n.generator,this.inAsync=n.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,this.enterFunctionScope(),this.expect(L.parenL),n.params=this.parseBindingList(L.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(n,!1),this.inGenerator=r,this.inAsync=i,this.yieldPos=s,this.awaitPos=o,this.inFunction=a,this.finishNode(n,"FunctionExpression")},Y.parseArrowExpression=function(e,t,n){var r=this.inGenerator,i=this.inAsync,s=this.yieldPos,o=this.awaitPos,a=this.inFunction;return this.enterFunctionScope(),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.inGenerator=!1,this.inAsync=e.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0),this.inGenerator=r,this.inAsync=i,this.yieldPos=s,this.awaitPos=o,this.inFunction=a,this.finishNode(e,"ArrowFunctionExpression")},Y.parseFunctionBody=function(e,t){var n=t&&this.type!==L.braceL,r=this.strict,i=!1;if(n)e.body=this.parseMaybeAssign(),e.expression=!0,this.checkParams(e,!1);else{var s=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);r&&!s||(i=this.strictDirective(this.end))&&s&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var o=this.labels;this.labels=[],i&&(this.strict=!0),this.checkParams(e,!r&&!i&&!t&&this.isSimpleParamList(e.params)),e.body=this.parseBlock(!1),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=o}this.exitFunctionScope(),this.strict&&e.id&&this.checkLVal(e.id,"none"),this.strict=r},Y.isSimpleParamList=function(e){for(var t=0,n=e;t<n.length;t+=1){if("Identifier"!==n[t].type)return!1}return!0},Y.checkParams=function(e,t){for(var n={},r=0,i=e.params;r<i.length;r+=1){var s=i[r];this.checkLVal(s,"var",t?null:n)}},Y.parseExprList=function(e,t,n,r){for(var i=[],s=!0;!this.eat(e);){if(s)s=!1;else if(this.expect(L.comma),t&&this.afterTrailingComma(e))break;var o=void 0;n&&this.type===L.comma?o=null:this.type===L.ellipsis?(o=this.parseSpread(r),r&&this.type===L.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):o=this.parseMaybeAssign(!1,r),i.push(o)}return i},Y.checkUnreserved=function(e){var t=e.start,n=e.end,r=e.name;if(this.inGenerator&&"yield"===r&&this.raiseRecoverable(t,"Can not use 'yield' as identifier inside a generator"),this.inAsync&&"await"===r&&this.raiseRecoverable(t,"Can not use 'await' as identifier inside an async function"),this.isKeyword(r)&&this.raise(t,"Unexpected keyword '"+r+"'"),!(this.options.ecmaVersion<6&&-1!=this.input.slice(t,n).indexOf("\\"))){(this.strict?this.reservedWordsStrict:this.reservedWords).test(r)&&this.raiseRecoverable(t,"The keyword '"+r+"' is reserved")}},Y.parseIdent=function(e,t){var n=this.startNode();return e&&"never"==this.options.allowReserved&&(e=!1),this.type===L.name?n.name=this.value:this.type.keyword?(n.name=this.type.keyword,"class"!==n.name&&"function"!==n.name||this.lastTokEnd===this.lastTokStart+1&&46===this.input.charCodeAt(this.lastTokStart)||this.context.pop()):this.unexpected(),this.next(),this.finishNode(n,"Identifier"),e||this.checkUnreserved(n),n},Y.parseYield=function(){this.yieldPos||(this.yieldPos=this.start);var e=this.startNode();return this.next(),this.type==L.semi||this.canInsertSemicolon()||this.type!=L.star&&!this.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(L.star),e.argument=this.parseMaybeAssign()),this.finishNode(e,"YieldExpression")},Y.parseAwait=function(){this.awaitPos||(this.awaitPos=this.start);var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!0),this.finishNode(e,"AwaitExpression")};var X=q.prototype;X.raise=function(e,t){var n=u(this.input,e);t+=" ("+n.line+":"+n.column+")";var r=new SyntaxError(t);throw r.pos=e,r.loc=n,r.raisedAt=this.pos,r},X.raiseRecoverable=X.raise,X.curPosition=function(){if(this.options.locations)return new I(this.curLine,this.pos-this.lineStart)};var Q=q.prototype,K=Object.assign||function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];for(var r=0,i=t;r<i.length;r+=1){var s=i[r];for(var o in s)a(s,o)&&(e[o]=s[o])}return e};Q.enterFunctionScope=function(){this.scopeStack.push({var:{},lexical:{},childVar:{},parentLexical:{}})},Q.exitFunctionScope=function(){this.scopeStack.pop()},Q.enterLexicalScope=function(){var e=this.scopeStack[this.scopeStack.length-1],t={var:{},lexical:{},childVar:{},parentLexical:{}};this.scopeStack.push(t),K(t.parentLexical,e.lexical,e.parentLexical)},Q.exitLexicalScope=function(){var e=this.scopeStack.pop(),t=this.scopeStack[this.scopeStack.length-1];K(t.childVar,e.var,e.childVar)},Q.canDeclareVarName=function(e){var t=this.scopeStack[this.scopeStack.length-1];return!a(t.lexical,e)&&!a(t.parentLexical,e)},Q.canDeclareLexicalName=function(e){var t=this.scopeStack[this.scopeStack.length-1];return!a(t.lexical,e)&&!a(t.var,e)&&!a(t.childVar,e)},Q.declareVarName=function(e){this.scopeStack[this.scopeStack.length-1].var[e]=!0},Q.declareLexicalName=function(e){this.scopeStack[this.scopeStack.length-1].lexical[e]=!0};var ee=function(e,t,n){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new j(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},te=q.prototype;te.startNode=function(){return new ee(this,this.start,this.startLoc)},te.startNodeAt=function(e,t){return new ee(this,e,t)},te.finishNode=function(e,t){return h.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},te.finishNodeAt=function(e,t,n,r){return h.call(this,e,t,n,r)};var ne=function(e,t,n,r,i){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=r,this.generator=!!i},re={b_stat:new ne("{",!1),b_expr:new ne("{",!0),b_tmpl:new ne("${",!1),p_stat:new ne("(",!1),p_expr:new ne("(",!0),q_tmpl:new ne("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new ne("function",!1),f_expr:new ne("function",!0),f_expr_gen:new ne("function",!0,!1,null,!0),f_gen:new ne("function",!1,!1,null,!0)},ie=q.prototype;ie.initialContext=function(){return[re.b_stat]},ie.braceIsBlock=function(e){var t=this.curContext();return t===re.f_expr||t===re.f_stat||(e!==L.colon||t!==re.b_stat&&t!==re.b_expr?e===L._return||e==L.name&&this.exprAllowed?O.test(this.input.slice(this.lastTokEnd,this.start)):e===L._else||e===L.semi||e===L.eof||e===L.parenR||e==L.arrow||(e==L.braceL?t===re.b_stat:e!=L._var&&e!=L.name&&!this.exprAllowed):!t.isExpr)},ie.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if("function"===t.token)return t.generator}return!1},ie.updateContext=function(e){var t,n=this.type;n.keyword&&e==L.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},L.parenR.updateContext=L.braceR.updateContext=function(){if(1!=this.context.length){var e=this.context.pop();e===re.b_stat&&"function"===this.curContext().token&&(e=this.context.pop()),this.exprAllowed=!e.isExpr}else this.exprAllowed=!0},L.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?re.b_stat:re.b_expr),this.exprAllowed=!0},L.dollarBraceL.updateContext=function(){this.context.push(re.b_tmpl),this.exprAllowed=!0},L.parenL.updateContext=function(e){var t=e===L._if||e===L._for||e===L._with||e===L._while;this.context.push(t?re.p_stat:re.p_expr),this.exprAllowed=!0},L.incDec.updateContext=function(){},L._function.updateContext=L._class.updateContext=function(e){e.beforeExpr&&e!==L.semi&&e!==L._else&&(e!==L.colon&&e!==L.braceL||this.curContext()!==re.b_stat)?this.context.push(re.f_expr):this.context.push(re.f_stat),this.exprAllowed=!1},L.backQuote.updateContext=function(){this.curContext()===re.q_tmpl?this.context.pop():this.context.push(re.q_tmpl),this.exprAllowed=!1},L.star.updateContext=function(e){if(e==L._function){var t=this.context.length-1;this.context[t]===re.f_expr?this.context[t]=re.f_expr_gen:this.context[t]=re.f_gen}this.exprAllowed=!0},L.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&("of"==this.value&&!this.exprAllowed||"yield"==this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var se=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new j(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},oe=q.prototype,ae="object"==typeof Packages&&"[object JavaPackage]"==Object.prototype.toString.call(Packages);oe.next=function(){this.options.onToken&&this.options.onToken(new se(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},oe.getToken=function(){return this.next(),new se(this)},"undefined"!=typeof Symbol&&(oe[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===L.eof,value:t}}}}),oe.curContext=function(){return this.context[this.context.length-1]},oe.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(L.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},oe.readToken=function(e){return n(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},oe.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=57344)return e;return(e<<10)+this.input.charCodeAt(this.pos+1)-56613888},oe.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,n=this.input.indexOf("*/",this.pos+=2);if(-1===n&&this.raise(this.pos-2,"Unterminated comment"),this.pos=n+2,this.options.locations){T.lastIndex=t;for(var r;(r=T.exec(this.input))&&r.index<this.pos;)++this.curLine,this.lineStart=r.index+r[0].length}this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,n),t,this.pos,e,this.curPosition())},oe.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!o(r);)r=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,n,this.curPosition())},oe.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++this.pos,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 e}break;default:if(!(e>8&&e<14||e>=5760&&N.test(String.fromCharCode(e))))break e;++this.pos}}},oe.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},oe.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(L.ellipsis)):(++this.pos,this.finishToken(L.dot))},oe.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(L.assign,2):this.finishOp(L.slash,1)},oe.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=42===e?L.star:L.modulo;return this.options.ecmaVersion>=7&&42==e&&42===t&&(++n,r=L.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(L.assign,n+1):this.finishOp(r,n)},oe.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.finishOp(124===e?L.logicalOR:L.logicalAND,2):61===t?this.finishOp(L.assign,2):this.finishOp(124===e?L.bitwiseOR:L.bitwiseAND,1)},oe.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(L.assign,2):this.finishOp(L.bitwiseXOR,1)},oe.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45!=t||this.inModule||62!=this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!O.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(L.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===t?this.finishOp(L.assign,2):this.finishOp(L.plusMin,1)},oe.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+n)?this.finishOp(L.assign,n+1):this.finishOp(L.bitShift,n)):33!=t||60!=e||this.inModule||45!=this.input.charCodeAt(this.pos+2)||45!=this.input.charCodeAt(this.pos+3)?(61===t&&(n=2),this.finishOp(L.relational,n)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},oe.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(L.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(L.arrow)):this.finishOp(61===e?L.eq:L.prefix,1)},oe.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(L.parenL);case 41:return++this.pos,this.finishToken(L.parenR);case 59:return++this.pos,this.finishToken(L.semi);case 44:return++this.pos,this.finishToken(L.comma);case 91:return++this.pos,this.finishToken(L.bracketL);case 93:return++this.pos,this.finishToken(L.bracketR);case 123:return++this.pos,this.finishToken(L.braceL);case 125:return++this.pos,this.finishToken(L.braceR);case 58:return++this.pos,this.finishToken(L.colon);case 63:return++this.pos,this.finishToken(L.question);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(L.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 126:return this.finishOp(L.prefix,1)}this.raise(this.pos,"Unexpected character '"+d(e)+"'")},oe.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)};var ue=!!f("￿","u");oe.readRegexp=function(){for(var e,t,n=this,r=this.pos;;){n.pos>=n.input.length&&n.raise(r,"Unterminated regular expression");var i=n.input.charAt(n.pos);if(O.test(i)&&n.raise(r,"Unterminated regular expression"),e)e=!1;else{if("["===i)t=!0;else if("]"===i&&t)t=!1;else if("/"===i&&!t)break;e="\\"===i}++n.pos}var s=this.input.slice(r,this.pos);++this.pos;var o=this.readWord1(),a=s,u="";if(o){var c=/^[gim]*$/;this.options.ecmaVersion>=6&&(c=/^[gimuy]*$/),c.test(o)||this.raise(r,"Invalid regular expression flag"),o.indexOf("u")>=0&&(ue?u="u":(a=(a=a.replace(/\\u\{([0-9a-fA-F]+)\}/g,function(e,t,i){return(t=Number("0x"+t))>1114111&&n.raise(r+i+3,"Code point out of bounds"),"x"})).replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"),u=u.replace("u","")))}var l=null;return ae||(f(a,u,r,this),l=f(s,o)),this.finishToken(L.regexp,{pattern:s,flags:o,value:l})},oe.readInt=function(e,t){for(var n=this.pos,r=0,i=0,s=null==t?1/0:t;i<s;++i){var o=this.input.charCodeAt(this.pos),a=void 0;if((a=o>=97?o-97+10:o>=65?o-65+10:o>=48&&o<=57?o-48:1/0)>=e)break;++this.pos,r=r*e+a}return this.pos===n||null!=t&&this.pos-n!==t?null:r},oe.readRadixNumber=function(e){this.pos+=2;var t=this.readInt(e);return null==t&&this.raise(this.start+2,"Expected number in radix "+e),n(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(L.num,t)},oe.readNumber=function(e){var t=this.pos,r=!1,i=48===this.input.charCodeAt(this.pos);e||null!==this.readInt(10)||this.raise(t,"Invalid number"),i&&this.pos==t+1&&(i=!1);var s=this.input.charCodeAt(this.pos);46!==s||i||(++this.pos,this.readInt(10),r=!0,s=this.input.charCodeAt(this.pos)),69!==s&&101!==s||i||(43!==(s=this.input.charCodeAt(++this.pos))&&45!==s||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number"),r=!0),n(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var o,a=this.input.slice(t,this.pos);return r?o=parseFloat(a):i&&1!==a.length?this.strict?this.raise(t,"Invalid number"):o=/[89]/.test(a)?parseInt(a,10):parseInt(a,8):o=parseInt(a,10),this.finishToken(L.num,o)},oe.readCodePoint=function(){var e;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(t,"Code point out of bounds")}else e=this.readHexChar(4);return e},oe.readString=function(e){for(var t="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===e)break;92===r?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):(o(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(L.string,t)};var ce={};oe.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e!==ce)throw e;this.readInvalidTemplateToken()}this.inTemplateElement=!1},oe.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw ce;this.raise(e,t)},oe.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==L.template&&this.type!==L.invalidTemplate?(e+=this.input.slice(t,this.pos),this.finishToken(L.template,e)):36===n?(this.pos+=2,this.finishToken(L.dollarBraceL)):(++this.pos,this.finishToken(L.backQuote));if(92===n)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(o(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(n)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},oe.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if("{"!==this.input[this.pos+1])break;case"`":return this.finishToken(L.invalidTemplate,this.input.slice(this.start,this.pos))}this.raise(this.start,"Unterminated template")},oe.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return d(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";default:if(t>=48&&t<=55){var n=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(n,8);return r>255&&(n=n.slice(0,-1),r=parseInt(n,8)),"0"!==n&&(this.strict||e)&&this.invalidStringToken(this.pos-2,"Octal literal in strict mode"),this.pos+=n.length-1,String.fromCharCode(r)}return String.fromCharCode(t)}},oe.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.invalidStringToken(t,"Bad character escape sequence"),n},oe.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,i=this.pos,s=this.options.ecmaVersion>=6;this.pos<this.input.length;){var o=this.fullCharCodeAtPos();if(r(o,s))this.pos+=o<=65535?1:2;else{if(92!==o)break;this.containsEsc=!0,e+=this.input.slice(i,this.pos);var a=this.pos;117!=this.input.charCodeAt(++this.pos)&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var u=this.readCodePoint();(t?n:r)(u,s)||this.invalidStringToken(a,"Invalid Unicode escape"),e+=d(u),i=this.pos}t=!1}return e+this.input.slice(i,this.pos)},oe.readWord=function(){var e=this.readWord1(),t=L.name;return this.keywords.test(e)&&(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+e),t=_[e]),this.finishToken(t,e)};e.version="5.2.1",e.parse=function(e,t){return new q(t,e).parse()},e.parseExpressionAt=function(e,t,n){var r=new q(n,e,t);return r.nextToken(),r.parseExpression()},e.tokenizer=function(e,t){return new q(t,e)},e.addLooseExports=function(t,n,r){e.parse_dammit=t,e.LooseParser=n,e.pluginsLoose=r},e.Parser=q,e.plugins=M,e.defaultOptions=D,e.Position=I,e.SourceLocation=j,e.getLineInfo=u,e.Node=ee,e.TokenType=k,e.tokTypes=L,e.keywordTypes=_,e.TokContext=ne,e.tokContexts=re,e.isIdentifierChar=r,e.isIdentifierStart=n,e.Token=se,e.isNewLine=o,e.lineBreak=O,e.lineBreakG=T,e.nonASCIIwhitespace=N,Object.defineProperty(e,"__esModule",{value:!0})})},{}],5:[function(e,t,n){!function(e,r){"object"==typeof n&&void 0!==t?r(n):"function"==typeof define&&define.amd?define(["exports"],r):r((e.acorn=e.acorn||{},e.acorn.walk=e.acorn.walk||{}))}(this,function(e){"use strict";function t(e){return"string"==typeof e?function(t){return t==e}:e||function(){return!0}}function n(e,t,n){n(e,t)}function r(e,t,n){}var i=function(e,t){this.node=e,this.state=t},s=Object.create||function(e){function t(){}return t.prototype=e,new t},o={};o.Program=o.BlockStatement=function(e,t,n){for(var r=0,i=e.body;r<i.length;r+=1){n(i[r],t,"Statement")}},o.Statement=n,o.EmptyStatement=r,o.ExpressionStatement=o.ParenthesizedExpression=function(e,t,n){return n(e.expression,t,"Expression")},o.IfStatement=function(e,t,n){n(e.test,t,"Expression"),n(e.consequent,t,"Statement"),e.alternate&&n(e.alternate,t,"Statement")},o.LabeledStatement=function(e,t,n){return n(e.body,t,"Statement")},o.BreakStatement=o.ContinueStatement=r,o.WithStatement=function(e,t,n){n(e.object,t,"Expression"),n(e.body,t,"Statement")},o.SwitchStatement=function(e,t,n){n(e.discriminant,t,"Expression");for(var r=0,i=e.cases;r<i.length;r+=1){var s=i[r];s.test&&n(s.test,t,"Expression");for(var o=0,a=s.consequent;o<a.length;o+=1){n(a[o],t,"Statement")}}},o.ReturnStatement=o.YieldExpression=o.AwaitExpression=function(e,t,n){e.argument&&n(e.argument,t,"Expression")},o.ThrowStatement=o.SpreadElement=function(e,t,n){return n(e.argument,t,"Expression")},o.TryStatement=function(e,t,n){n(e.block,t,"Statement"),e.handler&&n(e.handler,t),e.finalizer&&n(e.finalizer,t,"Statement")},o.CatchClause=function(e,t,n){n(e.param,t,"Pattern"),n(e.body,t,"ScopeBody")},o.WhileStatement=o.DoWhileStatement=function(e,t,n){n(e.test,t,"Expression"),n(e.body,t,"Statement")},o.ForStatement=function(e,t,n){e.init&&n(e.init,t,"ForInit"),e.test&&n(e.test,t,"Expression"),e.update&&n(e.update,t,"Expression"),n(e.body,t,"Statement")},o.ForInStatement=o.ForOfStatement=function(e,t,n){n(e.left,t,"ForInit"),n(e.right,t,"Expression"),n(e.body,t,"Statement")},o.ForInit=function(e,t,n){"VariableDeclaration"==e.type?n(e,t):n(e,t,"Expression")},o.DebuggerStatement=r,o.FunctionDeclaration=function(e,t,n){return n(e,t,"Function")},o.VariableDeclaration=function(e,t,n){for(var r=0,i=e.declarations;r<i.length;r+=1){n(i[r],t)}},o.VariableDeclarator=function(e,t,n){n(e.id,t,"Pattern"),e.init&&n(e.init,t,"Expression")},o.Function=function(e,t,n){e.id&&n(e.id,t,"Pattern");for(var r=0,i=e.params;r<i.length;r+=1){n(i[r],t,"Pattern")}n(e.body,t,e.expression?"ScopeExpression":"ScopeBody")},o.ScopeBody=function(e,t,n){return n(e,t,"Statement")},o.ScopeExpression=function(e,t,n){return n(e,t,"Expression")},o.Pattern=function(e,t,n){"Identifier"==e.type?n(e,t,"VariablePattern"):"MemberExpression"==e.type?n(e,t,"MemberPattern"):n(e,t)},o.VariablePattern=r,o.MemberPattern=n,o.RestElement=function(e,t,n){return n(e.argument,t,"Pattern")},o.ArrayPattern=function(e,t,n){for(var r=0,i=e.elements;r<i.length;r+=1){var s=i[r];s&&n(s,t,"Pattern")}},o.ObjectPattern=function(e,t,n){for(var r=0,i=e.properties;r<i.length;r+=1){n(i[r].value,t,"Pattern")}},o.Expression=n,o.ThisExpression=o.Super=o.MetaProperty=r,o.ArrayExpression=function(e,t,n){for(var r=0,i=e.elements;r<i.length;r+=1){var s=i[r];s&&n(s,t,"Expression")}},o.ObjectExpression=function(e,t,n){for(var r=0,i=e.properties;r<i.length;r+=1){n(i[r],t)}},o.FunctionExpression=o.ArrowFunctionExpression=o.FunctionDeclaration,o.SequenceExpression=o.TemplateLiteral=function(e,t,n){for(var r=0,i=e.expressions;r<i.length;r+=1){n(i[r],t,"Expression")}},o.UnaryExpression=o.UpdateExpression=function(e,t,n){n(e.argument,t,"Expression")},o.BinaryExpression=o.LogicalExpression=function(e,t,n){n(e.left,t,"Expression"),n(e.right,t,"Expression")},o.AssignmentExpression=o.AssignmentPattern=function(e,t,n){n(e.left,t,"Pattern"),n(e.right,t,"Expression")},o.ConditionalExpression=function(e,t,n){n(e.test,t,"Expression"),n(e.consequent,t,"Expression"),n(e.alternate,t,"Expression")},o.NewExpression=o.CallExpression=function(e,t,n){if(n(e.callee,t,"Expression"),e.arguments)for(var r=0,i=e.arguments;r<i.length;r+=1){n(i[r],t,"Expression")}},o.MemberExpression=function(e,t,n){n(e.object,t,"Expression"),e.computed&&n(e.property,t,"Expression")},o.ExportNamedDeclaration=o.ExportDefaultDeclaration=function(e,t,n){e.declaration&&n(e.declaration,t,"ExportNamedDeclaration"==e.type||e.declaration.id?"Statement":"Expression"),e.source&&n(e.source,t,"Expression")},o.ExportAllDeclaration=function(e,t,n){n(e.source,t,"Expression")},o.ImportDeclaration=function(e,t,n){for(var r=0,i=e.specifiers;r<i.length;r+=1){n(i[r],t)}n(e.source,t,"Expression")},o.ImportSpecifier=o.ImportDefaultSpecifier=o.ImportNamespaceSpecifier=o.Identifier=o.Literal=r,o.TaggedTemplateExpression=function(e,t,n){n(e.tag,t,"Expression"),n(e.quasi,t)},o.ClassDeclaration=o.ClassExpression=function(e,t,n){return n(e,t,"Class")},o.Class=function(e,t,n){e.id&&n(e.id,t,"Pattern"),e.superClass&&n(e.superClass,t,"Expression");for(var r=0,i=e.body.body;r<i.length;r+=1){n(i[r],t)}},o.MethodDefinition=o.Property=function(e,t,n){e.computed&&n(e.key,t,"Expression"),n(e.value,t,"Expression")},e.simple=function(t,n,r,i,s){r||(r=e.base),function e(t,i,s){var o=s||t.type,a=n[o];r[o](t,i,e),a&&a(t,i)}(t,i,s)},e.ancestor=function(t,n,r,i){r||(r=e.base);var s=[];!function e(t,i,o){var a=o||t.type,u=n[a],c=t!=s[s.length-1];c&&s.push(t),r[a](t,i,e),u&&u(t,i||s,s),c&&s.pop()}(t,i)},e.recursive=function(t,n,r,i,s){var o=r?e.make(r,i):i;!function e(t,n,r){o[r||t.type](t,n,e)}(t,n,s)},e.full=function(t,n,r,i,s){r||(r=e.base),function e(t,i,s){var o=s||t.type;r[o](t,i,e),s||n(t,i,o)}(t,i,s)},e.fullAncestor=function(t,n,r,i){r||(r=e.base);var s=[];!function e(t,i,o){var a=o||t.type,u=t!=s[s.length-1];u&&s.push(t),r[a](t,i,e),o||n(t,i||s,s,a),u&&s.pop()}(t,i)},e.findNodeAt=function(n,r,s,o,a,u){o=t(o),a||(a=e.base);try{!function e(t,n,u){var c=u||t.type;if((null==r||t.start<=r)&&(null==s||t.end>=s)&&a[c](t,n,e),(null==r||t.start==r)&&(null==s||t.end==s)&&o(c,t))throw new i(t,n)}(n,u)}catch(e){if(e instanceof i)return e;throw e}},e.findNodeAround=function(n,r,s,o,a){s=t(s),o||(o=e.base);try{!function e(t,n,a){var u=a||t.type;if(!(t.start>r||t.end<r)&&(o[u](t,n,e),s(u,t)))throw new i(t,n)}(n,a)}catch(e){if(e instanceof i)return e;throw e}},e.findNodeAfter=function(n,r,s,o,a){s=t(s),o||(o=e.base);try{!function e(t,n,a){if(!(t.end<r)){var u=a||t.type;if(t.start>=r&&s(u,t))throw new i(t,n);o[u](t,n,e)}}(n,a)}catch(e){if(e instanceof i)return e;throw e}},e.findNodeBefore=function(n,r,s,o,a){s=t(s),o||(o=e.base);var u;return function e(t,n,a){if(!(t.start>r)){var c=a||t.type;t.end<=r&&(!u||u.node.end<t.end)&&s(c,t)&&(u=new i(t,n)),o[c](t,n,e)}}(n,a),u},e.make=function(t,n){n||(n=e.base);var r=s(n);for(var i in t)r[i]=t[i];return r},e.base=o,Object.defineProperty(e,"__esModule",{value:!0})})},{}],6:[function(e,t,n){"use strict";function r(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function i(e){return o[e>>18&63]+o[e>>12&63]+o[e>>6&63]+o[63&e]}function s(e,t,n){for(var r,s=[],o=t;o<n;o+=3)r=(e[o]<<16)+(e[o+1]<<8)+e[o+2],s.push(i(r));return s.join("")}n.byteLength=function(e){return 3*e.length/4-r(e)},n.toByteArray=function(e){var t,n,i,s,o,c=e.length;s=r(e),o=new u(3*c/4-s),n=s>0?c-4:c;var l=0;for(t=0;t<n;t+=4)i=a[e.charCodeAt(t)]<<18|a[e.charCodeAt(t+1)]<<12|a[e.charCodeAt(t+2)]<<6|a[e.charCodeAt(t+3)],o[l++]=i>>16&255,o[l++]=i>>8&255,o[l++]=255&i;return 2===s?(i=a[e.charCodeAt(t)]<<2|a[e.charCodeAt(t+1)]>>4,o[l++]=255&i):1===s&&(i=a[e.charCodeAt(t)]<<10|a[e.charCodeAt(t+1)]<<4|a[e.charCodeAt(t+2)]>>2,o[l++]=i>>8&255,o[l++]=255&i),o},n.fromByteArray=function(e){for(var t,n=e.length,r=n%3,i="",a=[],u=0,c=n-r;u<c;u+=16383)a.push(s(e,u,u+16383>c?c:u+16383));return 1===r?(t=e[n-1],i+=o[t>>2],i+=o[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=o[t>>10],i+=o[t>>4&63],i+=o[t<<2&63],i+="="),a.push(i),a.join("")};for(var o=[],a=[],u="undefined"!=typeof Uint8Array?Uint8Array:Array,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,p=c.length;l<p;++l)o[l]=c[l],a[c.charCodeAt(l)]=l;a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},{}],7:[function(e,t,n){},{}],8:[function(e,t,n){"use strict";function r(e){if(e>B)throw new RangeError("Invalid typed array length");var t=new Uint8Array(e);return t.__proto__=i.prototype,t}function i(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return a(e)}return s(e,t,n)}function s(e,t,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return T(e)?function(e,t,n){if(t<0||e.byteLength<t)throw new RangeError("'offset' is out of bounds");if(e.byteLength<t+(n||0))throw new RangeError("'length' is out of bounds");var r;r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n);return r.__proto__=i.prototype,r}(e,t,n):"string"==typeof e?function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!i.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var n=0|l(e,t),s=r(n),o=s.write(e,t);o!==n&&(s=s.slice(0,o));return s}(e,t):function(e){if(i.isBuffer(e)){var t=0|c(e.length),n=r(t);return 0===n.length?n:(e.copy(n,0,0,t),n)}if(e){if(N(e)||"length"in e)return"number"!=typeof e.length||P(e.length)?r(0):u(e);if("Buffer"===e.type&&Array.isArray(e.data))return u(e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e)}function o(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function a(e){return o(e),r(e<0?0:0|c(e))}function u(e){for(var t=e.length<0?0:0|c(e.length),n=r(t),i=0;i<t;i+=1)n[i]=255&e[i];return n}function c(e){if(e>=B)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+B.toString(16)+" bytes");return 0|e}function l(e,t){if(i.isBuffer(e))return e.length;if(N(e)||T(e))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return _(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return L(e).length;default:if(r)return _(e).length;t=(""+t).toLowerCase(),r=!0}}function p(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,n){var r=e.length;(!t||t<0)&&(t=0);(!n||n<0||n>r)&&(n=r);for(var i="",s=t;s<n;++s)i+=function(e){return e<16?"0"+e.toString(16):e.toString(16)}(e[s]);return i}(this,t,n);case"utf8":case"utf-8":return w(this,t,n);case"ascii":return function(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}(this,t,n);case"latin1":case"binary":return function(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}(this,t,n);case"base64":return function(e,t,n){return 0===t&&n===e.length?F.fromByteArray(e):F.fromByteArray(e.slice(t,n))}(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,n){for(var r=e.slice(t,n),i="",s=0;s<r.length;s+=2)i+=String.fromCharCode(r[s]+256*r[s+1]);return i}(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function h(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function f(e,t,n,r,s){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,P(n)&&(n=s?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(s)return-1;n=e.length-1}else if(n<0){if(!s)return-1;n=0}if("string"==typeof t&&(t=i.from(t,r)),i.isBuffer(t))return 0===t.length?-1:d(e,t,n,r,s);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):d(e,[t],n,r,s);throw new TypeError("val must be string, number or Buffer")}function d(e,t,n,r,i){function s(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}var o=1,a=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,a/=2,u/=2,n/=2}var c;if(i){var l=-1;for(c=n;c<a;c++)if(s(e,c)===s(t,-1===l?0:c-l)){if(-1===l&&(l=c),c-l+1===u)return l*o}else-1!==l&&(c-=c-l),l=-1}else for(n+u>a&&(n=a-u),c=n;c>=0;c--){for(var p=!0,h=0;h<u;h++)if(s(e,c+h)!==s(t,h)){p=!1;break}if(p)return c}return-1}function y(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var s=t.length;if(s%2!=0)throw new TypeError("Invalid hex string");r>s/2&&(r=s/2);for(var o=0;o<r;++o){var a=parseInt(t.substr(2*o,2),16);if(P(a))return o;e[n+o]=a}return o}function m(e,t,n,r){return O(_(t,e.length-n),e,n,r)}function g(e,t,n,r){return O(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function v(e,t,n,r){return g(e,t,n,r)}function b(e,t,n,r){return O(L(t),e,n,r)}function x(e,t,n,r){return O(function(e,t){for(var n,r,i,s=[],o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,s.push(i),s.push(r);return s}(t,e.length-n),e,n,r)}function w(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var s=e[i],o=null,a=s>239?4:s>223?3:s>191?2:1;if(i+a<=n){var u,c,l,p;switch(a){case 1:s<128&&(o=s);break;case 2:128==(192&(u=e[i+1]))&&(p=(31&s)<<6|63&u)>127&&(o=p);break;case 3:u=e[i+1],c=e[i+2],128==(192&u)&&128==(192&c)&&(p=(15&s)<<12|(63&u)<<6|63&c)>2047&&(p<55296||p>57343)&&(o=p);break;case 4:u=e[i+1],c=e[i+2],l=e[i+3],128==(192&u)&&128==(192&c)&&128==(192&l)&&(p=(15&s)<<18|(63&u)<<12|(63&c)<<6|63&l)>65535&&p<1114112&&(o=p)}}null===o?(o=65533,a=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=a}return function(e){var t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=R));return n}(r)}function E(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function S(e,t,n,r,s,o){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>s||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function k(e,t,n,r,i,s){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function A(e,t,n,r,i){return t=+t,n>>>=0,i||k(e,0,n,4),$.write(e,t,n,r,23,4),n+4}function C(e,t,n,r,i){return t=+t,n>>>=0,i||k(e,0,n,8),$.write(e,t,n,r,52,8),n+8}function _(e,t){t=t||1/0;for(var n,r=e.length,i=null,s=[],o=0;o<r;++o){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&s.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&s.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;s.push(n)}else if(n<2048){if((t-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function L(e){return F.toByteArray(function(e){if((e=e.trim().replace(I,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function O(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function T(e){return e instanceof ArrayBuffer||null!=e&&null!=e.constructor&&"ArrayBuffer"===e.constructor.name&&"number"==typeof e.byteLength}function N(e){return"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(e)}function P(e){return e!=e}var F=e("base64-js"),$=e("ieee754");n.Buffer=i,n.SlowBuffer=function(e){return+e!=e&&(e=0),i.alloc(+e)},n.INSPECT_MAX_BYTES=50;var B=2147483647;n.kMaxLength=B,(i.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}())||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),i.poolSize=8192,i.from=function(e,t,n){return s(e,t,n)},i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,i.alloc=function(e,t,n){return function(e,t,n){return o(e),e<=0?r(e):void 0!==t?"string"==typeof n?r(e).fill(t,n):r(e).fill(t):r(e)}(e,t,n)},i.allocUnsafe=function(e){return a(e)},i.allocUnsafeSlow=function(e){return a(e)},i.isBuffer=function(e){return null!=e&&!0===e._isBuffer},i.compare=function(e,t){if(!i.isBuffer(e)||!i.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,s=0,o=Math.min(n,r);s<o;++s)if(e[s]!==t[s]){n=e[s],r=t[s];break}return n<r?-1:r<n?1:0},i.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},i.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return i.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=i.allocUnsafe(t),s=0;for(n=0;n<e.length;++n){var o=e[n];if(!i.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,s),s+=o.length}return r},i.byteLength=l,i.prototype._isBuffer=!0,i.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)h(this,t,t+1);return this},i.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)h(this,t,t+3),h(this,t+1,t+2);return this},i.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)h(this,t,t+7),h(this,t+1,t+6),h(this,t+2,t+5),h(this,t+3,t+4);return this},i.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?w(this,0,e):p.apply(this,arguments)},i.prototype.equals=function(e){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===i.compare(this,e)},i.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},i.prototype.compare=function(e,t,n,r,s){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===s&&(s=this.length),t<0||n>e.length||r<0||s>this.length)throw new RangeError("out of range index");if(r>=s&&t>=n)return 0;if(r>=s)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,s>>>=0,this===e)return 0;for(var o=s-r,a=n-t,u=Math.min(o,a),c=this.slice(r,s),l=e.slice(t,n),p=0;p<u;++p)if(c[p]!==l[p]){o=c[p],a=l[p];break}return o<a?-1:a<o?1:0},i.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},i.prototype.indexOf=function(e,t,n){return f(this,e,t,n,!0)},i.prototype.lastIndexOf=function(e,t,n){return f(this,e,t,n,!1)},i.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var s=!1;;)switch(r){case"hex":return y(this,e,t,n);case"utf8":case"utf-8":return m(this,e,t,n);case"ascii":return g(this,e,t,n);case"latin1":case"binary":return v(this,e,t,n);case"base64":return b(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,n);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var R=4096;i.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);var r=this.subarray(e,t);return r.__proto__=i.prototype,r},i.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||E(e,t,this.length);for(var r=this[e],i=1,s=0;++s<t&&(i*=256);)r+=this[e+s]*i;return r},i.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||E(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},i.prototype.readUInt8=function(e,t){return e>>>=0,t||E(e,1,this.length),this[e]},i.prototype.readUInt16LE=function(e,t){return e>>>=0,t||E(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUInt16BE=function(e,t){return e>>>=0,t||E(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUInt32LE=function(e,t){return e>>>=0,t||E(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUInt32BE=function(e,t){return e>>>=0,t||E(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||E(e,t,this.length);for(var r=this[e],i=1,s=0;++s<t&&(i*=256);)r+=this[e+s]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*t)),r},i.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||E(e,t,this.length);for(var r=t,i=1,s=this[e+--r];r>0&&(i*=256);)s+=this[e+--r]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*t)),s},i.prototype.readInt8=function(e,t){return e>>>=0,t||E(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,t){e>>>=0,t||E(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt16BE=function(e,t){e>>>=0,t||E(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt32LE=function(e,t){return e>>>=0,t||E(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return e>>>=0,t||E(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,t){return e>>>=0,t||E(e,4,this.length),$.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return e>>>=0,t||E(e,4,this.length),$.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return e>>>=0,t||E(e,8,this.length),$.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return e>>>=0,t||E(e,8,this.length),$.read(this,e,!1,52,8)},i.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){S(this,e,t,n,Math.pow(2,8*n)-1,0)}var i=1,s=0;for(this[t]=255&e;++s<n&&(i*=256);)this[t+s]=e/i&255;return t+n},i.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){S(this,e,t,n,Math.pow(2,8*n)-1,0)}var i=n-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+n},i.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,1,255,0),this[t]=255&e,t+1},i.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},i.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);S(this,e,t,n,i-1,-i)}var s=0,o=1,a=0;for(this[t]=255&e;++s<n&&(o*=256);)e<0&&0===a&&0!==this[t+s-1]&&(a=1),this[t+s]=(e/o>>0)-a&255;return t+n},i.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);S(this,e,t,n,i-1,-i)}var s=n-1,o=1,a=0;for(this[t+s]=255&e;--s>=0&&(o*=256);)e<0&&0===a&&0!==this[t+s+1]&&(a=1),this[t+s]=(e/o>>0)-a&255;return t+n},i.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},i.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},i.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeFloatLE=function(e,t,n){return A(this,e,t,!0,n)},i.prototype.writeFloatBE=function(e,t,n){return A(this,e,t,!1,n)},i.prototype.writeDoubleLE=function(e,t,n){return C(this,e,t,!0,n)},i.prototype.writeDoubleBE=function(e,t,n){return C(this,e,t,!1,n)},i.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,s=r-n;if(this===e&&n<t&&t<r)for(i=s-1;i>=0;--i)e[i+t]=this[i+n];else if(s<1e3)for(i=0;i<s;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+s),t);return s},i.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var s=e.charCodeAt(0);s<256&&(e=s)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!i.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var o;if("number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var a=i.isBuffer(e)?e:new i(e,r),u=a.length;for(o=0;o<n-t;++o)this[o+t]=a[o%u]}return this};var I=/[^+/0-9A-Za-z-_]/g},{"base64-js":6,ieee754:9}],9:[function(e,t,n){n.read=function(e,t,n,r,i){var s,o,a=8*i-r-1,u=(1<<a)-1,c=u>>1,l=-7,p=n?i-1:0,h=n?-1:1,f=e[t+p];for(p+=h,s=f&(1<<-l)-1,f>>=-l,l+=a;l>0;s=256*s+e[t+p],p+=h,l-=8);for(o=s&(1<<-l)-1,s>>=-l,l+=r;l>0;o=256*o+e[t+p],p+=h,l-=8);if(0===s)s=1-c;else{if(s===u)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,r),s-=c}return(f?-1:1)*o*Math.pow(2,s-r)},n.write=function(e,t,n,r,i,s){var o,a,u,c=8*s-i-1,l=(1<<c)-1,p=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:s-1,d=r?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),(t+=o+p>=1?h/u:h*Math.pow(2,1-p))*u>=2&&(o++,u/=2),o+p>=l?(a=0,o=l):o+p>=1?(a=(t*u-1)*Math.pow(2,i),o+=p):(a=t*Math.pow(2,p-1)*Math.pow(2,i),o=0));i>=8;e[n+f]=255&a,f+=d,a/=256,i-=8);for(o=o<<i|a,c+=i;c>0;e[n+f]=255&o,f+=d,o/=256,c-=8);e[n+f-d]|=128*y}},{}],10:[function(e,t,n){(function(n){function r(){}function i(e){this.covers={},this._ident=i.prototype.version+"_"+Math.random(),this.setOptions(e||{})}var s=e("./lib/parser"),o=e("./lib/arboriculture"),a=e("./lib/output");i.prototype.smCache={},i.prototype.setOptions=function(e){return this.log=!1===e.log?r:e.log||this.log,this.options=function(e){var t={};return e.forEach(function(e){if(e&&"object"==typeof e)for(var n in e)t[n]=e[n]}),t}([this.options,e]),delete this.options.log,this},i.prototype.version=e("./package.json").version,i.prototype.isThenable=function(e){return e&&e instanceof Object&&"function"==typeof e.then},i.prototype.compile=function(e,t,n,s){"object"==typeof n&&void 0===s&&(s=n),s=s||{};for(var o in i.initialCodeGenOpts)o in s||(s[o]=i.initialCodeGenOpts[o]);var a=this.parse(e,t,null,s);return this.asynchronize(a,null,s,this.log||r),this.prettyPrint(a,s),a},i.prototype.parse=function(e,t,n,r){"object"==typeof n&&void 0===r&&(r=n);var i={origCode:e.toString(),filename:t};try{return i.ast=s.parse(i.origCode,r&&r.parser),r.babelTree&&s.treeWalker(i.ast,function(e,t,n){"Literal"===e.type?n[0].replace(o.babelLiteralNode(e.value)):"Property"===e.type&&("ClassBody"===n[0].parent.type?e.type="ClassProperty":e.type="ObjectProperty"),t()}),i}catch(e){if(e instanceof SyntaxError){var a=i.origCode.substr(e.pos-e.loc.column);a=a.split("\n")[0],e.message+=" "+t+" (nodent)\n"+a+"\n"+a.replace(/[\S ]/g,"-").substring(0,e.loc.column)+"^",e.stack=""}throw e}},i.prototype.asynchronize=o.asynchronize,i.prototype.printNode=o.printNode,i.prototype.prettyPrint=function(t,r){var i=t.filename?t.filename.split("/"):["anonymous"],s=i.pop(),o=a(t.ast,r&&r.sourcemap?{map:{startLine:r.mapStartLine||0,file:s+"(original)",sourceMapRoot:i.join("/"),sourceContent:t.origCode}}:null,t.origCode);if(r&&r.sourcemap)try{var u="",c=o.map.toJSON();if(c){var l=e("source-map").SourceMapConsumer;t.sourcemap=c,this.smCache[t.filename]={map:c,smc:new l(c)},u="\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,"+function(e){return(e instanceof n?e:new n(e.toString(),"binary")).toString("base64")}(JSON.stringify(c))+"\n"}t.code=o.code+u}catch(e){t.code=o}else t.code=o;return t},i.prototype.getDefaultCompileOptions=void 0,Object.defineProperty(i.prototype,"Promise",{get:function(){return initOpts.log("Warning: nodent.Promise is deprecated. Use nodent.Thenable instead"),Thenable},enumerable:!1,configurable:!1}),i.initialCodeGenOpts={noRuntime:!1,lazyThenables:!1,es6target:!1,noUseDirective:!1,wrapAwait:null,mapStartLine:0,sourcemap:!0,engine:!1,parser:{sourceType:"script"},$return:"$return",$error:"$error",$arguments:"$args",$asyncspawn:"$asyncspawn",$asyncbind:"$asyncbind",generatedSymbolPrefix:"$",$makeThenable:"$makeThenable"},t.exports=i}).call(this,e("buffer").Buffer)},{"./lib/arboriculture":11,"./lib/output":12,"./lib/parser":13,"./package.json":25,buffer:8,"source-map":24}],11:[function(e,t,n){"use strict";function r(e){if(!e)return"";if(Array.isArray(e))return e.map(r).join("|\n");try{return m(e)}catch(t){return t.message+": "+(e&&e.type)}}function i(e){if(Array.isArray(e))return e.map(function(e){return i(e)});var t={};return Object.keys(e).forEach(function(n){t[n]=e[n]}),t}function s(e,t){e!==t&&(e.__proto__=Object.getPrototypeOf(t),Object.keys(e).forEach(function(t){t in g||delete e[t]}),Object.keys(t).forEach(function(n){n in e||(e[n]=t[n])}))}function o(){}function a(e){return e?(b.node=e,b):{}}function u(e,t,n){if(!e)return null;if(t&&"object"==typeof t){var r=Object.keys(t);return u(e,function(e){return r.every(function(n){return e[n]==t[n]})})}var i,s={};if(Array.isArray(e)){for(var o=0;o<e.length;o++)if(i=u(e[o],t))return i;return null}var c=n;"function"!=typeof n&&(c=n?function(e){return!0}:function(e){return!a(e).isScope});try{y.treeWalker(e,function(n,r,i){if(t(n))throw s.path=i,s;(n===e||c(n))&&r()})}catch(e){if(e===s)return s.path;throw e}return null}function c(e){return u(e,function(e){return"AwaitExpression"===e.type&&!e.$hidden})}function l(e){return u(e,function(e){return"AwaitExpression"===e.type&&!e.$hidden},function(e){var t=a(e);return!t.isBlockStatement&&!t.isScope})}function p(e){if(null===e)return{type:"NullLiteral",value:null,raw:"null"};if(!0===e||!1===e)return{type:"BooleanLiteral",value:e,raw:JSON.stringify(e)};if(e instanceof RegExp){var t=e.toString(),n=t.split("/");return{type:"RegExpLiteral",value:e,raw:t,pattern:n[1],flags:n[2]}}return"number"==typeof e?{type:"NumericLiteral",value:e,raw:JSON.stringify(e)}:{type:"StringLiteral",value:e,raw:JSON.stringify(e)}}function h(e,t){return{type:"Identifier",name:e,loc:t}}function f(e){var t={};for(var n in e)t[n]="string"==typeof e[n]?h(e[n]):e[n];return t}function d(e,t,n,d){function m(e,t){if(n.es6target&&!e.id&&!t&&0===e.type.indexOf("Function"))return e.type="ArrowFunctionExpression",e;if(n.noRuntime){if(t){if(a(t).isLiteral)throw new Error("Nodent: 'noRuntime' option only compatible with -promise and -engine modes");e.body.body=y.part("try {$:0} catch($2) {return $1($2)}",[i(e.body),t,h("$boundEx")]).body}else if(n.es6target&&!e.id&&0===e.type.indexOf("Function"))return e.type="ArrowFunctionExpression",e;return n.es6target&&!e.id?(e.type="ArrowFunctionExpression",e):y.part("$0.bind(this)",[e]).expr}return t?y.part("$0.$1(this,$2)",[e,pe.asyncbind,t]).expr:y.part("$0.$1(this)",[e,pe.asyncbind]).expr}function g(e,t,n,r){return y.part("var $0 = $1",[h(e),m({type:"FunctionExpression",id:null,generator:!1,expression:!1,params:n||[],body:Array.isArray(t)?{type:"BlockStatement",body:t}:t},r)]).body[0]}function v(t){return e.filename+(t&&t.loc&&t.loc.start?"("+t.loc.start.line+":"+t.loc.start.column+")\t":"\t")}function b(e){return n.babelTree?p(e):{type:"Literal",value:e,raw:JSON.stringify(e)}}function x(e){return e?!n.babelTree||"ClassMethod"!==e.type&&"ObjectMethod"!==e.type?(!n.babelTree&&"MethodDefinition"===e.type||"Property"===e.type&&(e.method||"get"==e.kind||"set"==e.kind))&&a(e.value).isFunction?e.value:null:e:null}function w(e,t){if(!a(e).isFunction)throw new Error("Can only replace 'arguments' in functions");return"$usesArguments"in e||(y.treeWalker(e,function(t,r,i){"Identifier"===t.type&&"arguments"===t.name?(i[0].parent.shorthand&&(i[0].parent.shorthand=!1,i[0].parent.key=h("arguments"),e.$usesArguments=!0),"key"!==i[0].field&&(t.name=n.$arguments,e.$usesArguments=!0)):t!==e&&a(t).isFunction?"ArrowFunctionExpression"===t.type&&(w(t),e.$usesArguments=e.$usesArguments||t.$usesArguments):r()}),e.$usesArguments=e.$usesArguments||!1),e.$usesArguments&&"ArrowFunctionExpression"!==e.type}function E(e){return"string"!=typeof e&&(e=e.type.replace(/Statement|Expression/g,"")),n.generatedSymbolPrefix+e+"_"+le++}function S(e,t){return e&&(e.$exit=f({$error:t.$error,$return:t.$return})),e}function k(e,t){var n=function(e){for(var t=0;t<e.length;t++){if(e[t].self.$exit)return e[t].self;if(e[t].parent&&e[t].parent.$exit)return e[t].parent}return null}(e);if(n)return n.$exit;if(t)for(var r=0;r<t.length;r++)if(t[r])return f(t[r]);return null}function A(e,t){var r=!(n.promises||n.generators||n.engine)&&n.lazyThenables;ie(e),ne(e),j(e),H(e),J(e),(r?function(e,t){return y.treeWalker(e,function(e,t,r){function o(e){return{type:"ReturnStatement",argument:{type:"UnaryExpression",operator:"void",prefix:!0,argument:L(e||S)}}}function l(e,t){if("BreakStatement"===e.type)s(e,i(A(e.label&&n.generatedSymbolPrefix+"Loop_"+e.label.name+"_exit")));else if("ContinueStatement"===e.type)s(e,i(o(e.label&&n.generatedSymbolPrefix+"Loop_"+e.label.name+"_next")));else if(a(e).isFunction)return!0;t()}"ForInStatement"===e.type&&c(e)?U(e,r):"ForOfStatement"===e.type&&c(e)&&z(e,r),t();var p;if(a(e).isLoop&&c(e)){var f=e.init,d=e.test||b(!0),g=e.update,v=e.body,x=u(v,{type:"ThisExpression"});f&&(a(f).isStatement||(f={type:"ExpressionStatement",expression:f})),g=g&&{type:"ExpressionStatement",expression:g},v=a(v).isBlockStatement?i(v).body:[i(v)];var w=e.$label&&e.$label.name;w="Loop_"+(w||le++);var E=n.generatedSymbolPrefix+(w+"_exit"),S=n.generatedSymbolPrefix+(w+"_next"),k=h(n.generatedSymbolPrefix+w),A=function(e){return{type:"ReturnStatement",argument:{type:"UnaryExpression",operator:"void",prefix:!0,argument:{type:"CallExpression",callee:h(e||E),arguments:[]}}}},_=C(S,[{type:"ReturnStatement",argument:{type:"CallExpression",callee:x?m(k):k,arguments:[h(E),pe.error]}}]);g&&_.body.body.unshift(g);for(var O=0;O<v.length;O++)y.treeWalker(v[O],l);v.push(i(o()));var T={type:"FunctionExpression",id:k,params:[h(E),pe.error],body:{type:"BlockStatement",body:[_]}};if("DoWhileStatement"===e.type)_.body.body=[{type:"IfStatement",test:i(d),consequent:{type:"BlockStatement",body:i(_.body.body)},alternate:{type:"ReturnStatement",argument:{type:"CallExpression",callee:h(E),arguments:[]}}}],T.body.body=[_].concat(v);else{var N={type:"IfStatement",test:i(d),consequent:{type:"BlockStatement",body:v},alternate:i(A())};T.body.body.push(N)}var P={type:"ExpressionStatement",expression:{type:"AwaitExpression",argument:m(T,b(0))}};for(!f||"VariableDeclaration"!==f.type||"let"!==f.kind&&"const"!==f.kind||("const"===f.kind&&(f.kind="let"),P={type:"BlockStatement",body:[i(f),P]},f=null),p=0;p<r.length;p++){var F=r[p];if("index"in F)return f?F.parent[F.field].splice(F.index,1,i(f),P):F.parent[F.field][F.index]=P,!0}}return!0},t),e}:o)(e),F(e),P(e),q(e,[M,r?o:W,B,R,$]),V(e,t),se(e),ue(e)}function C(e,t){var n={$continuation:!0,type:e?"FunctionDeclaration":"FunctionExpression",id:e?"string"==typeof e?h(e):e:void 0,params:[],body:{type:"BlockStatement",body:i(t)}};return e&&(ce[e]={def:n}),n}function _(e){return{type:"AwaitExpression",argument:H({type:"FunctionExpression",generator:!1,expression:!1,async:!0,params:[],body:{type:"BlockStatement",body:e}}).body.body[0].argument}}function L(e,t){"string"==typeof e&&(e=h(e));var n=y.part("$0.call($1)",[e,[{type:"ThisExpression"}].concat(t||[])]).expr;return e.$thisCall=n,n.$thisCallName=e.name,n}function O(e,t){return{type:"ReturnStatement",argument:L(e,t)}}function T(e,t){return{type:"CallExpression",callee:h(e.$seh+"Finally"),arguments:t?[t]:[]}}function N(e,t){if(Array.isArray(e))return e.map(function(e){return N(e,t)});var r=0,i=0;return y.treeWalker(e,function(e,t,s){if("ReturnStatement"!==e.type||e.$mapped){if("ThrowStatement"===e.type){var o=a(e).isAsync;if(r>0){if(!o)return t(e);delete e.async}return void(!o&&i?t():(e.type="ReturnStatement",e.$mapped=!0,e.argument={type:"CallExpression",callee:k(s,[n]).$error,arguments:[e.argument]}))}return"TryStatement"===e.type?(i++,t(e),void i--):a(e).isFunction?(r++,t(e),void r--):void t(e)}if(r>0){if(!a(e).isAsync)return t(e);delete e.async}return e.$mapped=!0,void(a(e.argument).isUnaryExpression&&"void"===e.argument.operator?e.argument=e.argument.argument:e.argument={type:"CallExpression",callee:k(s,[n]).$return,arguments:e.argument?[e.argument]:[]})},t)}function P(e,t){return Array.isArray(e)?e.map(function(e){return P(e,t)}):(y.treeWalker(e,function(e,t,n){if(t(),"ConditionalExpression"===e.type&&(c(e.alternate)||c(e.consequent))){h(E("condOp"));s(e,_(y.part("if ($0) return $1 ; return $2",[e.test,e.consequent,e.alternate]).body))}},t),e)}function F(e,t){return Array.isArray(e)?e.map(function(e){return F(e,t)}):(y.treeWalker(e,function(e,t,n){if(t(),"LogicalExpression"===e.type&&c(e.right)){var r,i=h(E("logical"+("&&"===e.operator?"And":"Or")));if("||"===e.operator)r="var $0; if (!($0 = $1)) {$0 = $2} return $0";else{if("&&"!==e.operator)throw new Error(v(e)+"Illegal logical operator: "+e.operator);r="var $0; if ($0 = $1) {$0 = $2} return $0"}s(e,_(y.part(r,[i,e.left,e.right]).body))}},t),e)}function $(e,t,n){if("SwitchCase"!==e.type&&a(e).isBlockStatement)for(var r=0;r<e.body.length;){var i=e.body[r];if("SwitchCase"!==i.type&&a(i).isBlockStatement){if(ae(i.body))if(l(i)){var s=E(i),o=e.body.splice(r+1,e.body.length-(r+1));if(o.length){var u=C(s,o);delete ce[s],i.body.push(O(s)),e.body.push(u),r++}else r++}else r++;else e.body.splice.apply(e.body,[r,1].concat(i.body))}else r++}}function B(e,t,n){if("IfStatement"===e.type&&c([e.consequent,e.alternate])){var r=E(e),o=t[0],u={type:"BlockStatement",body:[e]};if("index"in o){var l=o.index,p=o.parent[o.field].splice(l+1,o.parent[o.field].length-(l+1));if(o.replace(u),p.length){var h=O(r);u.body.push(n(C(r,p))),[e.consequent,e.alternate].forEach(function(e){if(e){var t;(t=a(e).isBlockStatement?e.body[e.body.length-1]:e)&&"ReturnStatement"===t.type||("BlockStatement"!==e.type&&s(e,{type:"BlockStatement",body:[i(e)]}),e.$deferred=!0,e.body.push(i(h))),n(e)}}),e.consequent&&e.alternate&&e.consequent.$deferred&&e.alternate.$deferred||u.body.push(i(h))}}else o.parent[o.field]=u}}function R(e,t,n){if(!e.$switched&&"SwitchStatement"===e.type&&c(e.cases)){e.$switched=!0;var r,s,o,a=t[0];if("index"in a){var u=a.index+1;(o=a.parent[a.field].splice(u,a.parent[a.field].length-u)).length&&"BreakStatement"===o[o.length-1].type&&a.parent[a.field].push(o.pop()),r=E(e),s=O(r),a.parent[a.field].unshift(C(r,o)),a.parent[a.field].push(i(s))}return e.cases.forEach(function(e,t){if("SwitchCase"!==e.type)throw new Error("switch contains non-case/default statement: "+e.type);if(c(e.consequent)){var n=e.consequent[e.consequent.length-1];"BreakStatement"===n.type?e.consequent[e.consequent.length-1]=i(s):"ReturnStatement"===n.type||"ThrowStatement"===n.type||(d(v(e)+"switch-case fall-through not supported - added break. See https://github.com/MatAtBread/nodent#differences-from-the-es7-specification"),e.consequent.push(i(s)))}}),!0}}function I(e){return"ReturnStatement"===e.type||"ThrowStatement"===e.type}function j(t,r){return y.treeWalker(t,function(t,i,s){if("TryStatement"===t.type&&!t.$seh&&(a(s[0].parent).isBlockStatement||(s[0].parent[s[0].field]={type:"BlockStatement",body:[t]}),t.$seh=E("Try")+"_",t.$containedAwait=!!c(t),t.$finallyExit=t.finalizer&&function(e){for(var t=0;t<e.length;t++)if(a(e[t].self).isFunction)return e[t].self.async||e[t].self.$wasAsync;return!1}(s)&&!!u(t.finalizer.body,I),t.$containedAwait||t.$finallyExit)){t.$needsMapping=!r||!t.$finallyExit;var o=k(s,[n]);if(t.finalizer&&!t.handler){var l=h(E("exception"));t.handler={type:"CatchClause",param:l,body:{type:"BlockStatement",body:[{type:"ThrowStatement",argument:l}]}}}if(!t.handler&&!t.finalizer){var p=new SyntaxError(v(t.value)+"try requires catch and/or finally clause",e.filename,t.start);throw p.pos=t.start,p.loc=t.loc.start,p}t.finalizer?(S(t.block,{$error:t.$seh+"Catch",$return:T(t,o.$return)}),S(t.handler,{$error:T(t,o.$error),$return:T(t,o.$return)})):S(t.block,{$error:t.$seh+"Catch",$return:o.$return})}i()}),t}function D(e,t){for(var n=0;n<e.length;n++)if(!a(e[n]).isDirective)return void e.splice.apply(e,[n,0].concat(t));e.splice.apply(e,[e.length,0].concat(t))}function M(t,r,s){if(t.$needsMapping){var o,a,u,c=r[0];if(!("index"in c))throw new Error(e.filename+" - malformed try/catch blocks");var l=c.index+1,p=c.parent[c.field].splice(l,c.parent[c.field].length-l);if(p.length){var f=s(g(a=t.$seh+"Post",p,[],k(r,[n]).$error));c.parent[c.field].splice(c.index,0,f),o=y.part("return $0()",[t.finalizer?T(t,h(a)):h(a)]).body[0]}else t.finalizer&&(o=O(T(t)));t.$mapped=!0,o&&(t.block.body.push(i(o)),t.handler.body.body.push(i(o)));var d=k(r,[n]);if(t.handler){var v=h(t.$seh+"Catch");u=i(t.handler.body);var b=g(v.name,u,[i(t.handler.param)],t.finalizer?T(t,d.$error):d.$error);t.handler.body.body=[{type:"CallExpression",callee:v,arguments:[i(t.handler.param)]}],c.parent[c.field].splice(c.index,0,b)}if(t.finalizer){s(t.finalizer);var x={exit:h(t.$seh+"Exit"),value:h(t.$seh+"Value"),body:i(t.finalizer.body)},w=y.part("(function ($value) { $:body; return $exit && ($exit.call(this, $value)); })",x).expr,E={type:"VariableDeclaration",kind:"var",declarations:[{type:"VariableDeclarator",id:h(t.$seh+"Finally"),init:m({type:"FunctionExpression",params:[x.exit],id:null,body:{type:"BlockStatement",body:[{type:"ReturnStatement",argument:m(w,d.$error)}]}})}]};D(c.parent[c.field],[E]);var S=y.part("return $0()",[t.finalizer?T(t,h(a)):h(a)]).body[0];u.body[u.length-1]=S,t.block.body[t.block.body.length-1]=S,delete t.finalizer}}}function q(e,t,n){function r(e,n){return y.treeWalker(e,function(e,n,s){function o(e){return r(e,s)}i.indexOf(e)<0&&(i.push(e),t.forEach(function(t){t(e,s,o)})),n()},n)}var i=[];return r(e,n),e}function V(e,t,o){return y.treeWalker(e,function(e,u,l){if("IfStatement"==e.type&&("BlockStatement"!=e.consequent.type&&c(e.consequent)&&(e.consequent={type:"BlockStatement",body:[e.consequent]}),e.alternate&&"BlockStatement"!=e.alternate.type&&c(e.alternate)&&(e.alternate={type:"BlockStatement",body:[e.alternate]})),u(),a(e).isAwait){var p=e.loc;if(!(t=t||l.some(function(e){return e.self&&e.self.$wasAsync}))||"warn"===t){var f=v(e)+"'await' used inside non-async function. ";n.promises?f+="'return' value Promise runtime-specific":f+="'return' value from await is synchronous",d(f+". See https://github.com/MatAtBread/nodent#differences-from-the-es7-specification")}var y=l[0].parent;"LogicalExpression"===y.type&&y.right===e&&d(v(e.argument)+"'"+r(y)+"' on right of "+y.operator+" will always evaluate '"+r(e.argument)+"'"),"ConditionalExpression"===y.type&&y.test!==e&&d(v(e.argument)+"'"+r(y)+"' will always evaluate '"+r(e.argument)+"'");var g=h(E("await")),b=i(e.argument);s(e,g);for(var x,w,S=1;S<l.length;S++)if(w=a(l[S].self).isBlockStatement){x=l[S-1];break}if(!x)throw new Error(v(e)+"Illegal await not contained in a statement");var A,C,_=k(l,[o,n]),L=x.index,O=w.splice(L,w.length-L).slice(1);"ReturnStatement"===x.self.type&&"CallExpression"===x.self.argument.type&&1===x.self.argument.arguments.length&&x.self.argument.arguments[0].name===g.name?C=A=x.self.argument.callee:"Identifier"===x.self.type||x.self.name===g.name||"ExpressionStatement"===x.self.type&&"Identifier"===x.self.expression.type&&x.self.expression.name===g.name?A=O.length?{type:"FunctionExpression",params:[i(g)],body:V({type:"BlockStatement",body:i(O)},t,_)}:{type:"FunctionExpression",params:[],body:{type:"BlockStatement",body:[]}}:(O.unshift(x.self),A={type:"FunctionExpression",params:[i(g)],body:V({type:"BlockStatement",body:i(O)},t,_)}),C||(C=A?m(A,_.$error):{type:"FunctionExpression",params:[],body:{type:"BlockStatement",body:[]}}),n.wrapAwait&&(b={type:"CallExpression",arguments:[b],callee:n.promises||n.generators?{type:"MemberExpression",object:h("Promise"),property:h("resolve")}:{type:"MemberExpression",object:h("Object"),property:h("$makeThenable")}});var T={type:"CallExpression",callee:{type:"MemberExpression",object:b,property:h("then",p),computed:!1},arguments:[C,_.$error]};w.push({loc:p,type:"ReturnStatement",argument:T})}return!0}),e}function U(e,t){var n=e.$label;delete e.$label;var r=h(E("idx")),i=h(E("in")),o=y.part("var $0,$1 = [];for ($0 in $2) $1.push($0)",[r,i,e.right]).body,u=y.part("for ($0; $1.length;){ $2 = $1.shift(); $:3 ; }",[e.left,i,"VariableDeclaration"===e.left.type?e.left.declarations[0].id:e.left,e.body]).body[0];u.$label=n;for(var c=0;c<t.length;c++)if(a(t[c].parent).isBlockStatement){t[c].parent[t[c].field].splice(t[c].index,0,o[0],o[1]);break}s(e,u)}function z(e,t){"BlockStatement"!==e.body.type&&(e.body={type:"BlockStatement",body:[e.body]});var n,r,i=y.part("[$0[Symbol.iterator]()]",[e.right]).expr;if("VariableDeclaration"===e.left.type){"const"===e.left.kind&&(e.left.kind="let"),n=e.left.declarations[0].id;var s=te(e.left.declarations[0].id);r=h(E("iterator_"+s.join("_"))),e.left.declarations=s.map(function(e){return{type:"VariableDeclarator",id:h(e)}}),e.left.declarations.push({type:"VariableDeclarator",id:r,init:i}),e.init=e.left}else{var o={type:"VariableDeclaration",kind:"var",declarations:[{type:"VariableDeclarator",id:r=h(E("iterator_"+(n=e.left).name)),init:i}]};e.init=o}e.type="ForStatement",e.test=y.part("!($0[1] = $0[0].next()).done && (($1 = $0[1].value) || true)",[r,n]).expr,delete e.left,delete e.right}function W(e,t,r){var i=e.$depth;"ForInStatement"===e.type&&c(e)?U(e,t):"ForOfStatement"===e.type&&c(e)&&z(e);var s=t.some(function(e){return"$label"in e.self&&"ForStatement"===e.self.type&&e.self.$mapped});if(!e.$mapped&&a(e).isLoop&&u(e,function(e){return"AwaitExpression"===e.type&&!e.$hidden||s&&("BreakStatement"===e.type||"ContinueStatement"===e.type)&&e.label})){t[0].self.$mapped=!0;var o=[],l=e.init,p=e.test||b(!0),f=e.update,d=e.body;f&&(f={type:"ExpressionStatement",expression:f}),l&&(a(l).isStatement||(l={type:"ExpressionStatement",expression:l}),o.push(l));var m,g;e.$label?(g=e.$label.name,m=t[1]):(g=le++,m=t[0]);var v,x,w=h((g=n.generatedSymbolPrefix+"Loop_"+g)+"_trampoline"),E=h(g),S=f?h(g+"_step"):E,A=h(g+"_exit");h("q"),h("$exception");if("index"in m){var _=m.index;x=m.parent[m.field].splice(_+1,m.parent[m.field].length-(_+1))}else x=[];v=C(A,x);var L={type:"ReturnStatement",argument:E},O={type:"ReturnStatement",argument:S},T={type:"ReturnStatement",argument:{type:"ArrayExpression",elements:[b(1)]}};y.treeWalker(d,function(e,t,n){if(a(e).isFunction||a(e).isLoop)return!0;if("BreakStatement"===e.type||"ContinueStatement"===e.type)if(e.label)for(var r=n.filter(function(e){return"$label"in e.self}).map(function(e,t){return e.self.$label&&e.self.$label.name}),i=[],s=0;s<r.length;s++){if(r[s]===e.label.name){"BreakStatement"===e.type&&i.push(b(1)),n[0].replace({type:"ReturnStatement",argument:{type:"ArrayExpression",elements:i.reverse()}});break}i.push(b(0))}else"BreakStatement"===e.type?n[0].replace(T):n[0].replace(O);else t()},t),d="BlockStatement"===d.type?d.body.slice(0):[d],d="DoWhileStatement"===e.type?d.concat({type:"IfStatement",test:{type:"UnaryExpression",argument:p,prefix:!0,operator:"!"},consequent:T,alternate:O}):[{type:"IfStatement",test:p,consequent:{type:"BlockStatement",body:d.concat(O)},alternate:T}],n.noRuntime&&o.push({type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:w}],kind:"var"});var N,P=k(t,[n]).$error;N=n.noRuntime?y.part(n.es6target?"($idTrampoline = ((q) => { $$setMapped: while (q) { if (q.then) "+(1===i?" return void q.then($idTrampoline, $exit); ":" return q.then($idTrampoline, $exit); ")+" try { if (q.pop) if (q.length) return q.pop() ? $idContinuation.call(this) : q; else q = $idStep; else q = q.call(this) } catch (_exception) { return $exit(_exception); } } }))($idIter)":"($idTrampoline = (function (q) { $$setMapped: while (q) { if (q.then) "+(1===i?" return void q.then($idTrampoline, $exit); ":" return q.then($idTrampoline, $exit); ")+" try { if (q.pop) if (q.length) return q.pop() ? $idContinuation.call(this) : q; else q = $idStep; else q = q.call(this) } catch (_exception) { return $exit(_exception); } } }).bind(this))($idIter)",{setMapped:function(e){return e.$mapped=!0,e},idTrampoline:w,exit:P,idIter:E,idContinuation:A,idStep:S}).expr:y.part("(Function.$0.trampoline(this,$1,$2,$3,$5)($4))",[pe.asyncbind,A,S,P,E,b(1===i)]).expr,o.push({type:"ReturnStatement",argument:N}),o.push({$label:e.$label,type:"FunctionDeclaration",id:E,params:[],body:{type:"BlockStatement",body:d}}),f&&o.push({type:"FunctionDeclaration",id:S,params:[],body:{type:"BlockStatement",body:[f,L]}}),!l||"VariableDeclaration"!==l.type||"let"!==l.kind&&"const"!==l.kind?(o.push(v),t[0].replace(o.map(r))):("const"===l.kind&&(l.kind="let"),t[0].replace([{type:"BlockStatement",body:o.map(r)},r(v)]))}}function G(e){if(!a(e).isFunction)throw new Error("Cannot examine non-Function node types for async exits");return u(e.body,function(e){return"Identifier"===e.type&&(e.name===n.$return||e.name===n.$error)||I(e)&&a(e).isAsync},function(e){return!(a(e).isFunction&&(e.$wasAsync||a(e).isAsync))})}function J(t){return y.treeWalker(t,function(t,r,i){var s=x(t);if(r(),s&&a(s).isAsync){if("set"==t.kind){var o=new SyntaxError(v(s)+"method 'async set' cannot be invoked",e.filename,t.start);throw o.pos=t.start,o.loc=t.loc.start,o}s.async=!1;var u=w(s);G(s)||0!==s.body.body.length&&"ReturnStatement"===s.body.body[s.body.body.length-1].type||s.body.body.push({type:"ReturnStatement"});var c=m(S({type:"FunctionExpression",params:[pe.return,pe.error],body:J(N(s.body,i)),$wasAsync:!0},n),n.promises||n.generators||n.engine?null:b(!n.lazyThenables||0));n.promises?s.body={type:"BlockStatement",body:[{type:"ReturnStatement",argument:{type:"NewExpression",callee:h("Promise"),arguments:[c]}}]}:s.body={type:"BlockStatement",body:[{type:"ReturnStatement",argument:c}]},u&&D(s.body.body,[he])}})}function H(e){return y.treeWalker(e,function(e,t,r){if(t(),a(e).isAsync&&a(e).isFunction){var i;(i=x(r[0].parent))&&a(i).isAsync&&"get"===r[0].parent.kind&&X(r[0].parent.key),delete e.async;var s=w(e),o=S({type:"FunctionExpression",params:[pe.return,pe.error],$wasAsync:!0},n),u=[{self:o}].concat(r);return a(e.body).isBlockStatement?(G(e)||0!==e.body.body.length&&"ReturnStatement"===e.body.body[e.body.body.length-1].type||e.body.body.push({type:"ReturnStatement"}),o.body={type:"BlockStatement",body:e.body.body.map(function(e){return N(e,u)})}):(o.body={type:"BlockStatement",body:[N({type:"ReturnStatement",argument:e.body},u)]},e.expression=!1),o=m(o,n.promises||n.generators||n.engine?null:b(!n.lazyThenables||0)),n.promises&&(o={type:"NewExpression",callee:h("Promise"),arguments:[o]}),o={type:"BlockStatement",body:[{type:"ReturnStatement",loc:e.loc,argument:o}]},s&&D(o.body,[he]),void(e.body=o)}}),e}function Y(e){if(Array.isArray(e))return e.map(Y);var t=0;return y.treeWalker(e,function(e,n,r){if("ThrowStatement"!==e.type&&"ReturnStatement"!==e.type||e.$mapped){if(a(e).isFunction)return t++,n(e),void t--}else if(t>0&&a(e).isAsync)return delete e.async,e.argument={type:"CallExpression",callee:"ThrowStatement"===e.type?pe.error:pe.return,arguments:e.argument?[e.argument]:[]},void(e.type="ReturnStatement");n(e)})}function Z(e,t){if(n.noRuntime)throw new Error("Nodent: 'noRuntime' option only compatible with -promise and -engine modes");return y.part("{ return (function*($return,$error){ $:body }).$asyncspawn(Promise,this) }",{return:pe.return,error:pe.error,asyncspawn:pe.asyncspawn,body:Y(e).concat(t?[{type:"ReturnStatement",argument:pe.return}]:[])}).body[0]}function X(e){e.$asyncgetwarninig||(e.$asyncgetwarninig=!0,d(v(e)+"'async get "+r(e)+"(){...}' is non-standard. See https://github.com/MatAtBread/nodent#differences-from-the-es7-specification"))}function Q(e,t){function r(e,t){y.treeWalker(e,function(n,r,i){n!==e&&a(n).isFunction||(a(n).isAwait?t?(n.$hidden=!0,r()):(delete n.operator,n.delegate=!1,n.type="YieldExpression",r()):r())})}function o(e){var t=n.promises;n.promises=!0,A(e,!0),n.promises=t}function u(e){return"BlockStatement"!==e.body.type&&(e.body={type:"BlockStatement",body:[{type:"ReturnStatement",argument:e.body}]}),e}function c(e,n){n.$asyncexitwarninig||(n.$asyncexitwarninig=!0,d(v(e)+"'async "+{ReturnStatement:"return",ThrowStatement:"throw"}[e.type]+"' not possible in "+(t?"engine":"generator")+" mode. Using Promises for function at "+v(n)))}y.treeWalker(e,function(e,n,i){n();var l,p,h;if(a(e).isAsync&&a(e).isFunction){var f;(f=x(i[0].parent))&&a(f).isAsync&&"get"===i[0].parent.kind&&X(i[0].parent.key),(p=G(e))?(c(p,e.body),o(e)):t?"get"!==i[0].parent.kind&&r(e,!0):(delete(l=e).async,h=w(l),r(l,!1),(l=u(l)).body=Z(l.body.body,p),h&&D(l.body.body,[he]),l.id&&"ExpressionStatement"===i[0].parent.type?(l.type="FunctionDeclaration",i[1].replace(l)):i[0].replace(l))}else(l=x(e))&&a(l).isAsync&&((p=G(l))?(c(p,l),o(e)):t&&"get"!==e.kind||(t?o(e):(e.async=!1,h=w(l),r(l,!1),s(l,u(l)),l.body=Z(l.body.body,p)),h&&D(l.body.body,[he])))});var l=i(n);return n.engine=!1,n.generators=!1,ie(e),ne(e),j(e,l.engine),F(e),P(e),q(e,[M,W,B,R,$]),V(e,"warn"),n.engine=l.engine,n.generators=l.generators,e}function K(e,t,n){var r=[];return y.treeWalker(e,function(i,s,o){if(i===e)return s();t(i,o)?r.push([].concat(o)):n||a(i).isScope||s()}),r}function ee(e,t){var n=[],r={};if((e=e.filter(function(e){return"ExportNamedDeclaration"!==e[0].parent.type})).length){var s={};e.forEach(function(e){function t(e){e in s?r[e]=o.declarations[u]:s[e]=o.declarations[u]}for(var n=e[0],o=n.self,a=(o.kind,[]),u=0;u<o.declarations.length;u++){var c=o.declarations[u];if(te(c.id).forEach(t),c.init){var l={type:"AssignmentExpression",left:i(c.id),operator:"=",right:i(c.init)};a.push(l)}}if(0==a.length)n.remove();else{var p=a.length>1?{type:"SequenceExpression",expressions:a}:a[0];"For"!==n.parent.type.slice(0,3)&&(p={type:"ExpressionStatement",expression:p}),n.replace(p)}});var o=Object.keys(s);o.length&&(o=o.map(function(e){return{type:"VariableDeclarator",id:h(e),loc:s[e].loc,start:s[e].start,end:s[e].end}}),n[0]&&"VariableDeclaration"===n[0].type?n[0].declarations=n[0].declarations.concat(o):n.unshift({type:"VariableDeclaration",kind:t,declarations:o}))}return{decls:n,duplicates:r}}function te(e){if(!e)return[];if(Array.isArray(e))return e.reduce(function(e,t){return e.concat(te(t.id))},[]);switch(e.type){case"Identifier":return[e.name];case"AssignmentPattern":return te(e.left);case"ArrayPattern":return e.elements.reduce(function(e,t){return e.concat(te(t))},[]);case"ObjectPattern":return e.properties.reduce(function(e,t){return e.concat(te(t))},[]);case"ObjectProperty":case"Property":return te(e.value);case"RestElement":case"RestProperty":return te(e.argument)}}function ne(e){function t(e){return u(e,function(e){return"AssignmentExpression"===e.type})}function n(e){return function(t,n){if("VariableDeclaration"===t.type&&(t.kind=t.kind||"var")&&e.indexOf(t.kind)>=0){var r=n[0];return("left"!=r.field||"ForInStatement"!==r.parent.type&&"ForOfStatement"!==r.parent.type)&&("init"!=r.field||"ForStatement"!==r.parent.type||"const"!==t.kind&&"let"!==t.kind)}}}function o(e,t){return!("FunctionDeclaration"!==e.type||!e.id)&&(a(e).isAsync||!e.$continuation)}var l={TemplateLiteral:function(e){return e.expressions},NewExpression:function(e){return e.arguments},CallExpression:function(e){return e.arguments},SequenceExpression:function(e){return e.expressions},ArrayExpression:function(e){return e.elements},ObjectExpression:function(e){return e.properties.map(function(e){return e.value})}};y.treeWalker(e,function(e,n,r){function o(e){h.length&&(e.argument={type:"SequenceExpression",expressions:h.map(function(e){var t=i(e);return s(e,e.left),t}).concat(e.argument)},h=[])}var u;if(n(),e.type in l&&!e.$hoisted){var p=l[e.type](e),h=[];for(u=0;u<p.length;u++)if(!a(p[u]).isScope){if((r=c(p[u]))&&o(r[0].self),!c(p.slice(u+1)))break;(r=t(p[u]))&&h.push(r[0].self)}}else if("VariableDeclaration"===e.type)for(u=e.declarations.length-1;u>0;u--)if(e.declarations[u]&&e.declarations[u].init&&c(e.declarations[u].init)){var f={type:"VariableDeclaration",kind:e.kind,declarations:e.declarations.splice(u)},d=r[0];if(!("index"in d))throw new Error("VariableDeclaration not in a block");d.parent[d.field].splice(d.index+1,0,f)}}),function(e){function t(e){d(v(e)+"Possible assignment to 'const "+r(e)+"'")}function n(e){switch(e.type){case"Identifier":"const"===i[e.name]&&t(e);break;case"ArrayPattern":e.elements.forEach(function(e){"const"===i[e.name]&&t(e)});break;case"ObjectPattern":e.properties.forEach(function(e){"const"===i[e.key.name]&&t(e)})}}var i={};y.treeWalker(e,function(e,t,r){var s=a(e).isBlockStatement;if(s){i=Object.create(i);for(var o=0;o<s.length;o++)if("VariableDeclaration"===s[o].type)for(var u=0;u<s[o].declarations.length;u++)te(s[o].declarations[u].id).forEach(function(e){i[e]=s[o].kind})}t(),"AssignmentExpression"===e.type?n(e.left):"UpdateExpression"===e.type&&n(e.argument),s&&(i=Object.getPrototypeOf(i))})}(e);var p=!1;return y.treeWalker(e,function(e,t,i){var s=p;if(p=p||oe(e),a(e).isBlockStatement){if(c(e)){var u,l,f,y,m;if(!i[0].parent||a(i[0].parent).isScope){var g={},b={};(l=K(e,n(["const"]),!1)).forEach(function(e){e[0].self.declarations.forEach(function(e){te(e.id).forEach(function(t){g[t]||b[t]?(delete g[t],b[t]=e):g[t]=e})})}),l.forEach(function(e){for(var t=0;t<e.length&&!a(e[t].parent).isBlockStatement;t++);var n=e[t];n.append({type:"ExpressionStatement",expression:{type:"SequenceExpression",expressions:e[0].self.declarations.map(function(e){var t={type:"AssignmentExpression",operator:"=",left:e.id,right:e.init};return e.init=null,t})}});var r=te(e[0].self.declarations),i=r.filter(function(e){return e in b});i.length&&e[0].append({type:"VariableDeclaration",kind:"let",declarations:i.map(function(e){return{type:"VariableDeclarator",id:h(e)}})}),e[0].self.kind="var",(i=r.filter(function(e){return e in g})).length?e[0].self.declarations=i.map(function(e){return{type:"VariableDeclarator",id:h(e)}}):n.remove()}),f=K(e,n(["var"]),!1),y=[]}else y=K(e,n(["const"]),!0);y=y.concat(K(e,n(["let"]),!0)),u=K(e,function(e){return a(e).isDirective},!0),m=K(e,o,p),f=f?ee(f,"var"):{duplicates:{},decls:[]},y=y?ee(y,"let"):{duplicates:{},decls:[]},Object.keys(f.duplicates).forEach(function(e){d(v(f.duplicates[e])+"Duplicate declaration '"+r(f.duplicates[e])+"'")}),Object.keys(y.duplicates).forEach(function(e){d(v(y.duplicates[e])+"Duplicate declaration '"+r(y.duplicates[e])+"'")}),m=m.map(function(e){var t,n=e[0];if(a(n.self).isAsync)return t=n.self.id.name,a(n.parent).isBlockStatement?(n.self.type="FunctionDeclaration",n.remove(),n.self):n.replace(h(t));t=n.self.id.name;return"FunctionDeclaration"===n.self.type?n.remove():n.replace(h(t))}),((u=u.map(function(e){return e[0].remove()})).length||f.decls.length||y.decls.length||m.length)&&(e.body=u.concat(f.decls).concat(y.decls).concat(m).concat(e.body))}p=s}if(t(),"ForOfStatement"===e.type||"ForInStatement"===e.type||a(e).isLoop){for(var x=0,w=0;w<i.length;w++)if("ForOfStatement"===i[w].self.type||"ForInStatement"===i[w].self.type||a(i[w].self).isLoop)x+=1;else if(a(i[w].self).isFunction)break;e.$depth=x,"LabeledStatement"===i[0].parent.type?e.$label=i[0].parent.label:e.$label=null}return!0}),e}function re(e,t){return y.treeWalker(e,function(e,r,i){if(r(),("ClassDeclaration"===e.type||"ClassExpression"===e.type)&&(e.body.body.forEach(function(e,t){function n(){return e.$superID=e.$superID||h("$super$"+le++)}return function(e){(e=x(e))&&a(e).isAsync&&(!t||"get"===e.kind||u(e,function(e){return a(e).isFunction&&u(e,function(e){return"Super"===e.type})&&u(e,function(e){return e.async&&("ReturnStatement"===e.type||"ThrowStatement"===e.type)})},!0))&&y.treeWalker(e.body,function(e,t,r){var i;a(e).isClass||(t(),"Super"===e.type&&("MemberExpression"===r[0].parent.type?"CallExpression"===r[1].parent.type&&"callee"===r[1].field?(i=y.part("this.$super($field).call(this,$args)",{super:n(),field:r[0].parent.computed?r[0].parent.property:b(r[0].parent.property.name),args:r[1].parent.arguments}).expr,r[2].replace(i)):(i=y.part("this.$super($field)",{super:n(),field:r[0].parent.computed?r[0].parent.property:b(r[0].parent.property.name)}).expr,r[1].replace(i)):d(v(e)+"'super' in async methods must be deferenced. 'async constructor()'/'await super()' not valid.")))})}}(e,t)),e.$superID)){var s=y.part("(function($field) { return super[$field] })",{field:h("$field")}).expr;n.babelTree?(s.type="ClassMethod",s.key=e.$superID,s.kind="method",e.body.body.push(s)):e.body.body.push({type:"MethodDefinition",key:e.$superID,kind:"method",value:s})}})}function ie(e){return y.treeWalker(e,function(e,t,n){return c(e)&&"ArrowFunctionExpression"===e.type&&"BlockStatement"!==e.body.type&&(e.body={type:"BlockStatement",body:[{type:"ReturnStatement",argument:e.body}]}),t(),!0}),e}function se(e){return y.treeWalker(e,function(e,t,r){t(),"Identifier"===e.type&&"__nodent"===e.name&&s(e,b(n))}),e}function oe(e){if("Program"===e.type&&"module"===e.sourceType)return!0;var t;if("Program"===e.type)t=e.body;else{if(!a(e).isFunction)return!1;t=e.body.body}if(t)for(var n=0;n<t.length;n++)if(a(t[n]).isDirective&&t[n].expression.value.match(/^\s*use\s+strict\s*$/))return!0;return!1}function ae(e){for(var t=0;t<e.length;t++){var n=e[t];if("ClassDeclaration"===n.type||"VariableDeclaration"===n.type&&("let"===n.kind||"const"===n.kind)||"FunctionDeclaration"===n.type&&n.id&&n.id.name&&!n.$continuation)return!0}return!1}function ue(e){y.treeWalker(e,function(e,t,n){if(t(),"ArrowFunctionExpression"===e.type&&"BlockStatement"===e.body.type&&1===e.body.body.length&&"ReturnStatement"===e.body.body[0].type)e.body=e.body.body[0].argument;else{var r,i;if(r=a(e).isBlockStatement)for(var s=0;s<r.length;s++)(i=a(r[s]).isBlockStatement)&&!ae(i)&&(ae(r[s])||[].splice.apply(r,[s,1].concat(i)))}}),y.treeWalker(e,function(e,t,n){if(t(),a(e).isJump){var r=n[0];if("index"in r)for(var i=r.index+1,s=r.parent[r.field];i<s.length;)"VariableDeclaration"===s[i].type||a(s[i]).isFunction&&s[i].id?i+=1:s.splice(i,1)}}),y.treeWalker(e,function(e,t,n){t(),e.$thisCall&&ce[e.name]&&(ce[e.name].ref?delete ce[e.name]:ce[e.name].ref=e.$thisCall)});var t=Object.keys(ce).map(function(e){return ce[e].ref});if(t.length){y.treeWalker(e,function(e,n,r){if(n(),t.indexOf(e)>=0&&"ReturnStatement"===r[1].self.type){var s=e.$thisCallName,o=i(ce[s].def.body.body);ce[s].$inlined=!0,a(r[1].self).isJump||o.push({type:"ReturnStatement"}),r[1].replace(o)}});var n=Object.keys(ce).map(function(e){return ce[e].$inlined&&ce[e].def});y.treeWalker(e,function(e,t,r){t(),n.indexOf(e)>=0&&r[0].remove()})}if(!("Program"===e.type&&"module"===e.sourceType||u(e,function(e){return a(e).isES6},!0))){var r=oe(e);!function(e){y.treeWalker(e,function(e,t,n){if("Program"===e.type||"FunctionDeclaration"===e.type||"FunctionExpression"===e.type){var i=r;if(r=r||oe(e)){t();var s="Program"===e.type?e:e.body,o=K(s,function(e,t){if("FunctionDeclaration"===e.type)return t[0].parent!==s});o=o.map(function(e){return e[0].remove()}),[].push.apply(s.body,o)}else t();r=i}else t()})}(e)}return y.treeWalker(e,function(e,t,n){t(),Object.keys(e).filter(function(e){return"$"===e[0]}).forEach(function(t){delete e[t]})}),e}var ce={},le=1,pe={};Object.keys(n).filter(function(e){return"$"===e[0]}).forEach(function(e){pe[e.slice(1)]=h(n[e])});var he=y.part("var $0 = arguments",[pe.arguments]).body[0];return n.engine?(e.ast=re(e.ast,!0),e.ast=Q(e.ast,n.engine),e.ast=se(e.ast),ue(e.ast)):n.generators?(e.ast=re(e.ast),e.ast=Q(e.ast),e.ast=se(e.ast),ue(e.ast)):(e.ast=re(e.ast),A(e.ast)),n.babelTree&&y.treeWalker(e.ast,function(e,t,n){t(),"Literal"===e.type&&s(e,b(e.value))}),e}var y=e("./parser"),m=e("./output"),g={start:!0,end:!0,loc:!0,range:!0},v={getScope:function(){return"FunctionDeclaration"===this.node.type||"FunctionExpression"===this.node.type||"Function"===this.node.type||"ObjectMethod"===this.node.type||"ClassMethod"===this.node.type||"ArrowFunctionExpression"===this.node.type&&"BlockStatement"===this.node.body.type?this.node.body.body:"Program"===this.node.type?this.node.body:null},isScope:function(){return"FunctionDeclaration"===this.node.type||"FunctionExpression"===this.node.type||"Function"===this.node.type||"Program"===this.node.type||"ObjectMethod"===this.node.type||"ClassMethod"===this.node.type||"ArrowFunctionExpression"===this.node.type&&"BlockStatement"===this.node.body.type},isFunction:function(){return"FunctionDeclaration"===this.node.type||"FunctionExpression"===this.node.type||"Function"===this.node.type||"ObjectMethod"===this.node.type||"ClassMethod"===this.node.type||"ArrowFunctionExpression"===this.node.type},isClass:function(){return"ClassDeclaration"===this.node.type||"ClassExpression"===this.node.type},isBlockStatement:function(){return"ClassBody"===this.node.type||"Program"===this.node.type||"BlockStatement"===this.node.type?this.node.body:"SwitchCase"===this.node.type&&this.node.consequent},isExpressionStatement:function(){return"ExpressionStatement"===this.node.type},isLiteral:function(){return"Literal"===this.node.type||"BooleanLiteral"===this.node.type||"RegExpLiteral"===this.node.type||"NumericLiteral"===this.node.type||"StringLiteral"===this.node.type||"NullLiteral"===this.node.type},isDirective:function(){return"ExpressionStatement"===this.node.type&&("StringLiteral"===this.node.expression.type||"Literal"===this.node.expression.type&&"string"==typeof this.node.expression.value)},isUnaryExpression:function(){return"UnaryExpression"===this.node.type},isAwait:function(){return"AwaitExpression"===this.node.type&&!this.node.$hidden},isAsync:function(){return this.node.async},isStatement:function(){return null!==this.node.type.match(/[a-zA-Z]+Declaration/)||null!==this.node.type.match(/[a-zA-Z]+Statement/)},isExpression:function(){return null!==this.node.type.match(/[a-zA-Z]+Expression/)},isLoop:function(){return"ForStatement"===this.node.type||"WhileStatement"===this.node.type||"DoWhileStatement"===this.node.type},isJump:function(){return"ReturnStatement"===this.node.type||"ThrowStatement"===this.node.type||"BreakStatement"===this.node.type||"ContinueStatement"===this.node.type},isES6:function(){switch(this.node.type){case"ExportNamedDeclaration":case"ExportSpecifier":case"ExportDefaultDeclaration":case"ExportAllDeclaration":case"ImportDeclaration":case"ImportSpecifier":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ArrowFunctionExpression":case"ForOfStatement":case"YieldExpression":case"Super":case"RestElement":case"RestProperty":case"SpreadElement":case"TemplateLiteral":case"ClassDeclaration":case"ClassExpression":return!0;case"VariableDeclaration":return this.node.kind&&"var"!==this.node.kind;case"FunctionDeclaration":case"FunctionExpression":return!!this.node.generator}}},b={};Object.keys(v).forEach(function(e){Object.defineProperty(b,e,{get:v[e]})}),t.exports={printNode:r,babelLiteralNode:p,asynchronize:function(e,t,n,r){try{return d(e,0,n,r)}catch(t){if(t instanceof SyntaxError){var i=e.origCode.substr(t.pos-t.loc.column);i=i.split("\n")[0],t.message+=" (nodent)\n"+i+"\n"+i.replace(/[\S ]/g,"-").substring(0,t.loc.column)+"^",t.stack=""}throw t}}}},{"./output":12,"./parser":13}],12:[function(e,t,n){"use strict";function r(e){if("NewExpression"===e.type&&e.arguments&&e.arguments.length)return 19;var t=h[e.type]||h[e.type+e.operator]||h[e.type+e.operator+(e.prefix?"prefix":"")];return void 0!==t?t:20}var i,s,o,a,u,c,l=e("source-map").SourceMapGenerator;if("".repeat)c=function(e,t){return t&&e?e.repeat(t):""};else{var p={};c=function(e,t){if(!t||!e)return"";var n=""+e+t;if(!p[n]){for(var r=[];t--;)r.push(e);p[n]=r.join("")}return p[n]}}var h={ExpressionStatement:-1,Identifier:21,Literal:21,BooleanLiteral:21,RegExpLiteral:21,NumericLiteral:21,StringLiteral:21,NullLiteral:21,ThisExpression:21,SuperExpression:21,ObjectExpression:21,ClassExpression:21,MemberExpression:19,CallExpression:18,NewExpression:18,ArrayExpression:17.5,FunctionExpression:17.5,FunctionDeclaration:17.5,ArrowFunctionExpression:17.5,"UpdateExpression++":17,"UpdateExpression--":17,"UpdateExpression++prefix":16,"UpdateExpression--prefix":16,UnaryExpression:16,AwaitExpression:16,"BinaryExpression**":15,"BinaryExpression*":15,"BinaryExpression/":15,"BinaryExpression%":15,"BinaryExpression+":14,"BinaryExpression-":14,"BinaryExpression<<":13,"BinaryExpression>>":13,"BinaryExpression>>>":13,"BinaryExpression<":12,"BinaryExpression<=":12,"BinaryExpression>":12,"BinaryExpression>=":12,BinaryExpressionin:12,BinaryExpressioninstanceof:12,"BinaryExpression==":11,"BinaryExpression===":11,"BinaryExpression!=":11,"BinaryExpression!==":11,"BinaryExpression&":10,"BinaryExpression^":9,"BinaryExpression|":8,"LogicalExpression&&":7,"LogicalExpression||":6,ConditionalExpression:5,AssignmentPattern:4,AssignmentExpression:4,yield:3,YieldExpression:3,SpreadElement:2,"comma-separated-list":1.5,SequenceExpression:1},f={type:"comma-separated-list"},d={out:function(e,t,n){var r=this[n||e.type];r?r.call(this,e,t):t.write(e,"/*"+e.type+"?*/ "+t.sourceAt(e.start,e.end))},expr:function(e,t,n,i){2===i||r(n)<r(t)||r(n)==r(t)&&(i||t.right===n)?(e.write(null,"("),this.out(n,e,n.type),e.write(null,")")):this.out(n,e,n.type)},argumentList:function(e,t){t.write(e,"(");var n=e.arguments;if(n.length>0)for(var r=n.length,i=0;i<r;i++)0!=i&&t.write(null,", "),this.expr(t,f,n[i]);t.write(null,")")},formatParameters:function(e,t){var n;if(t.write(null,"("),null!=e&&e.length>0){this.out(e[0],t,e[0].type);for(var r=1,i=e.length;r<i;r++)n=e[r],t.write(n,", "),this.out(n,t,n.type)}t.write(null,") ")},Program:function(e,t){for(var n,r,i=c(t.indent,t.indentLevel),s=t.lineEnd,o=0,a=(n=e.body).length;o<a;o++)r=n[o],t.write(null,i),this.out(r,t,r.type),t.write(null,s)},BlockStatement:u=function(e,t){var n,r,i=c(t.indent,t.indentLevel++),s=t.lineEnd,o=i+t.indent;if(t.write(e,"{"),null!=(n=e.body)&&n.length>0){t.write(null,s);for(var a=0,u=n.length;a<u;a++)r=n[a],t.write(null,o),this.out(r,t,r.type),t.write(null,s);t.write(null,i)}t.write(e.loc?{loc:{start:{line:e.loc.end.line,column:0}}}:null,"}"),t.indentLevel--},ClassBody:u,EmptyStatement:function(e,t){t.write(e,";")},ParenthesizedExpression:function(e,t){this.expr(t,e,e.expression,2)},ExpressionStatement:function(e,t){"FunctionExpression"===e.expression.type||"ObjectExpression"===e.expression.type?(t.write(null,"("),this.expr(t,e,e.expression),t.write(null,")")):this.expr(t,e,e.expression),t.write(null,";")},IfStatement:function(e,t){t.write(e,"if ("),this.out(e.test,t,e.test.type),t.write(null,") "),"BlockStatement"!==e.consequent.type&&t.write(null,t.lineEnd,c(t.indent,t.indentLevel+1)),this.out(e.consequent,t,e.consequent.type),null!=e.alternate&&("BlockStatement"!==e.consequent.type&&t.write(null,t.lineEnd,c(t.indent,t.indentLevel)),t.write(null," else "),"BlockStatement"!==e.alternate.type&&"IfStatement"!==e.alternate.type&&t.write(null,t.lineEnd,c(t.indent,t.indentLevel+1)),this.out(e.alternate,t,e.alternate.type))},LabeledStatement:function(e,t){this.out(e.label,t,e.label.type),t.write(null,":"),this.out(e.body,t,e.body.type)},BreakStatement:function(e,t){t.write(e,"break"),e.label&&(t.write(null," "),this.out(e.label,t,e.label.type)),t.write(null,";")},ContinueStatement:function(e,t){t.write(e,"continue"),e.label&&(t.write(null," "),this.out(e.label,t,e.label.type)),t.write(null,";")},WithStatement:function(e,t){t.write(e,"with ("),this.out(e.object,t,e.object.type),t.write(null,") "),this.out(e.body,t,e.body.type)},SwitchStatement:function(e,t){var n,r,i,s=c(t.indent,t.indentLevel++),o=t.lineEnd;t.indentLevel++;var a=s+t.indent,u=a+t.indent;t.write(e,"switch ("),this.out(e.discriminant,t,e.discriminant.type),t.write(null,") {",o);for(var l=e.cases,p=0;p<l.length;p++){(n=l[p]).test?(t.write(n,a,"case "),this.out(n.test,t,n.test.type),t.write(null,":",o)):t.write(n,a,"default:",o),r=n.consequent;for(var h=0;h<r.length;h++)i=r[h],t.write(null,u),this.out(i,t,i.type),t.write(null,o)}t.indentLevel-=2,t.write(null,s,"}")},ReturnStatement:function(e,t){e.async&&t.write(e," async "),t.write(e,"return"),e.argument&&(t.write(null," "),this.out(e.argument,t,e.argument.type)),t.write(null,";")},ThrowStatement:function(e,t){e.async&&t.write(e," async "),t.write(e,"throw "),this.out(e.argument,t,e.argument.type),t.write(null,";")},TryStatement:function(e,t){t.write(e,"try "),this.out(e.block,t,e.block.type),e.handler&&this.out(e.handler,t,e.handler.type),e.finalizer&&(t.write(e.finalizer," finally "),this.out(e.finalizer,t,e.finalizer.type))},CatchClause:function(e,t){t.write(e," catch ("),this.out(e.param,t,e.param.type),t.write(null,") "),this.out(e.body,t,e.body.type)},WhileStatement:function(e,t){t.write(e,"while ("),this.out(e.test,t,e.test.type),t.write(null,") "),"BlockStatement"!==e.body.type&&t.write(null,t.lineEnd,c(t.indent,t.indentLevel+1)),this.out(e.body,t,e.body.type)},DoWhileStatement:function(e,t){t.write(e,"do "),"BlockStatement"!==e.body.type&&t.write(null,t.lineEnd,c(t.indent,t.indentLevel+1)),this.out(e.body,t,e.body.type),t.write(null," while ("),this.out(e.test,t,e.test.type),t.write(null,");")},ForStatement:function(e,t){if(t.write(e,"for ("),null!=e.init){var n=e.init,r=n.type;t.inForInit++,this.out(n,t,r),t.inForInit--,"VariableDeclaration"!==r&&t.write(null,"; ")}else t.write(null,"; ");e.test&&this.out(e.test,t,e.test.type),t.write(null,"; "),e.update&&this.out(e.update,t,e.update.type),t.write(null,") "),"BlockStatement"!==e.body.type&&t.write(null,t.lineEnd,c(t.indent,t.indentLevel+1)),this.out(e.body,t,e.body.type)},ForInStatement:i=function(e,t){t.write(e,"for (");var n=e.left,r=n.type;t.inForInit++,this.out(n,t,r),"V"===r[0]&&19===r.length&&t.back(),t.inForInit--,t.write(null,"I"===e.type[3]?" in ":" of "),this.out(e.right,t,e.right.type),t.write(null,") "),"BlockStatement"!==e.body.type&&t.write(null,t.lineEnd,c(t.indent,t.indentLevel+1)),this.out(e.body,t,e.body.type)},ForOfStatement:i,DebuggerStatement:function(e,t){t.write(e,"debugger;")},Function:function(e,t){e.async&&t.write(e,"async "),t.write(e,e.generator?"function* ":"function "),e.id&&t.write(e.id,e.id.name),this.formatParameters(e.params,t),this.out(e.body,t,e.body.type)},FunctionDeclaration:function(e,t){this.Function(e,t),t.write(null,t.lineEnd,c(t.indent,t.indentLevel))},FunctionExpression:function(e,t){this.Function(e,t)},VariableDeclaration:function(e,t){var n=e.declarations;t.write(e,e.kind," ");var r=n.length;if(r>0){this.out(n[0],t,"VariableDeclarator");for(var i=1;i<r;i++)t.write(null,", "),this.out(n[i],t,"VariableDeclarator")}t.write(null,";")},VariableDeclarator:function(e,t){this.out(e.id,t,e.id.type),null!=e.init&&(t.write(null," = "),this.expr(t,f,e.init))},ClassDeclaration:function(e,t){t.write(e,"class "),e.id&&t.write(e.id,e.id.name+" "),e.superClass&&(t.write(null,"extends "),this.out(e.superClass,t,e.superClass.type),t.write(null," ")),this.out(e.body,t,"BlockStatement")},ImportSpecifier:function(e,t){e.local.name==e.imported.name?this.out(e.local,t,e.local.type):(this.out(e.imported,t,e.imported.type),t.write(null," as "),this.out(e.local,t,e.local.type))},ImportDefaultSpecifier:function(e,t){this.out(e.local,t,e.local.type)},ImportNamespaceSpecifier:function(e,t){t.write(null,"* as "),this.out(e.local,t,e.local.type)},ImportDeclaration:function(e,t){t.write(e,"import ");var n=e.specifiers,r=n.length,i=!0;if(r>0){for(var s=0;s<r;s++)"ImportSpecifier"===n[s].type&&i&&(i=!1,t.write(null,"{")),this.out(n[s],t,n[s].type),s<r-1&&t.write(null,", ");"ImportSpecifier"===n[r-1].type&&t.write(null,"}"),t.write(null," from ")}t.write(e.source,e.source.raw),t.write(null,";")},ExportDefaultDeclaration:function(e,t){t.write(e,"export default "),this.out(e.declaration,t,e.declaration.type)},ExportSpecifier:function(e,t){e.local.name==e.exported.name?this.out(e.local,t,e.local.type):(this.out(e.local,t,e.local.type),t.write(null," as "),this.out(e.exported,t,e.exported.type))},ExportNamedDeclaration:function(e,t){if(t.write(e,"export "),e.declaration)this.out(e.declaration,t,e.declaration.type);else{var n=e.specifiers;if(t.write(e,"{"),n&&n.length>0)for(var r=0;r<n.length;r++)this.out(n[r],t,n[r].type),r<n.length-1&&t.write(null,", ");t.write(null,"}"),e.source&&t.write(e.source," from ",e.source.raw),t.write(null,";")}},ExportAllDeclaration:function(e,t){t.write(e,"export * from "),t.write(e.source,e.source.raw,";")},MethodDefinition:function(e,t){switch(e.value.async&&t.write(e,"async "),e.static&&t.write(e,"static "),e.kind){case"get":case"set":t.write(e,e.kind," ")}e.value.generator&&t.write(null,"*"),e.computed?(t.write(null,"["),this.out(e.key,t,e.key.type),t.write(null,"]")):this.out(e.key,t,e.key.type),this.formatParameters(e.value.params,t),this.out(e.value.body,t,e.value.body.type)},ClassMethod:function(e,t){switch(e.async&&t.write(e,"async "),e.static&&t.write(e,"static "),e.kind){case"get":case"set":t.write(e,e.kind," ")}e.generator&&t.write(null,"*"),e.computed?(t.write(null,"["),this.out(e.key,t,e.key.type),t.write(null,"]")):this.out(e.key,t,e.key.type),this.formatParameters(e.params,t),this.out(e.body,t,e.body.type)},ClassExpression:function(e,t){this.out(e,t,"ClassDeclaration")},ArrowFunctionExpression:function(e,t){e.async&&t.write(e,"async "),1===e.params.length&&"Identifier"===e.params[0].type?(this.out(e.params[0],t,e.params[0].type),t.write(e," => ")):(this.formatParameters(e.params,t),t.write(e,"=> ")),"ObjectExpression"===e.body.type||"SequenceExpression"===e.body.type?(t.write(null,"("),this.out(e.body,t,e.body.type),t.write(null,")")):this.out(e.body,t,e.body.type)},ThisExpression:function(e,t){t.write(e,"this")},Super:function(e,t){t.write(e,"super")},RestElement:s=function(e,t){t.write(e,"..."),this.out(e.argument,t,e.argument.type)},SpreadElement:s,YieldExpression:function(e,t){t.write(e,e.delegate?"yield*":"yield"),e.argument&&(t.write(null," "),this.expr(t,e,e.argument))},AwaitExpression:function(e,t){t.write(e,"await "),this.expr(t,e,e.argument)},TemplateLiteral:function(e,t){var n,r=e.quasis,i=e.expressions;t.write(e,"`");for(var s=0,o=i.length;s<o;s++)n=i[s],t.write(r[s].value,r[s].value.raw),t.write(null,"${"),this.out(n,t,n.type),t.write(null,"}");t.write(r[r.length-1].value,r[r.length-1].value.raw),t.write(e,"`")},TaggedTemplateExpression:function(e,t){this.out(e.tag,t,e.tag.type),this.out(e.quasi,t,e.quasi.type)},ArrayExpression:a=function(e,t){if(t.write(e,"["),e.elements.length>0)for(var n=e.elements,r=n.length,i=0;;){var s=n[i];if(s&&this.expr(t,f,s),((i+=1)<r||null===s)&&t.write(null,","),i>=r)break;t.lineLength()>t.wrapColumn&&t.write(null,t.lineEnd,c(t.indent,t.indentLevel+1))}t.write(null,"]")},ArrayPattern:a,ObjectExpression:function(e,t){var n,r=c(t.indent,t.indentLevel++),i=t.lineEnd,s=r+t.indent;if(t.write(e,"{"),e.properties.length>0){t.write(null,i);for(var o=e.properties,a=o.length,u=0;n=o[u],t.write(null,s),this.out(n,t,"Property"),++u<a;)t.write(e,",",i),t.lineLength()>t.wrapColumn&&t.write(null,t.lineEnd,c(t.indent,t.indentLevel+1));t.write(null,i,r,"}")}else t.write(null,"}");t.indentLevel--},Property:function(e,t){e.method||"get"===e.kind||"set"===e.kind?this.MethodDefinition(e,t):(e.shorthand||(e.computed?(t.write(null,"["),this.out(e.key,t,e.key.type),t.write(null,"]")):this.out(e.key,t,e.key.type),t.write(null,": ")),this.expr(t,f,e.value))},ObjectPattern:function(e,t){if(t.write(e,"{"),e.properties.length>0)for(var n=e.properties,r=n.length,i=0;this.out(n[i],t,"Property"),++i<r;)t.write(null,", ");t.write(null,"}")},SequenceExpression:function(e,t){var n,r=e.expressions;if(r.length>0)for(var i=r.length,s=0;s<i;s++)n=r[s],s&&t.write(null,", "),this.expr(t,f,n)},UnaryExpression:function(e,t){e.prefix?(t.write(e,e.operator),e.operator.length>1&&t.write(e," "),this.expr(t,e,e.argument,!0)):(this.expr(t,e,e.argument),t.write(e,e.operator))},UpdateExpression:function(e,t){e.prefix?(t.write(e,e.operator),this.out(e.argument,t,e.argument.type)):(this.out(e.argument,t,e.argument.type),t.write(e,e.operator))},BinaryExpression:o=function(e,t){var n=e.operator;"in"===n&&t.inForInit&&t.write(null,"("),this.expr(t,e,e.left),t.write(e," ",n," "),this.expr(t,e,e.right,"ArrowFunctionExpression"===e.right.type?2:0),"in"===n&&t.inForInit&&t.write(null,")")},LogicalExpression:o,AssignmentExpression:function(e,t){"ObjectPattern"===e.left.type&&t.write(null,"("),this.BinaryExpression(e,t),"ObjectPattern"===e.left.type&&t.write(null,")")},AssignmentPattern:function(e,t){this.expr(t,e,e.left),t.write(e," = "),this.expr(t,e,e.right)},ConditionalExpression:function(e,t){this.expr(t,e,e.test,!0),t.write(e," ? "),this.expr(t,e,e.consequent),t.write(null," : "),this.expr(t,e,e.alternate)},NewExpression:function(e,t){t.write(e,"new "),this.expr(t,e,e.callee,"CallExpression"===e.callee.type||"ObjectExpression"===e.callee.type?2:0),this.argumentList(e,t)},CallExpression:function(e,t){this.expr(t,e,e.callee,"ObjectExpression"===e.callee.type?2:0),this.argumentList(e,t)},MemberExpression:function(e,t){!("ObjectExpression"===e.object.type||e.object.type.match(/Literal$/)&&e.object.raw&&e.object.raw.match(/^[0-9]/))&&("ArrayExpression"===e.object.type||"CallExpression"===e.object.type||"NewExpression"===e.object.type||r(e)<=r(e.object))?this.out(e.object,t,e.object.type):(t.write(null,"("),this.out(e.object,t,e.object.type),t.write(null,")")),e.computed?(t.write(e,"["),this.out(e.property,t,e.property.type),t.write(null,"]")):(t.write(e,"."),this.out(e.property,t,e.property.type))},Identifier:function(e,t){t.write(e,e.name)},Literal:function(e,t){t.write(e,e.raw)},NullLiteral:function(e,t){t.write(e,"null")},BooleanLiteral:function(e,t){t.write(e,JSON.stringify(e.value))},StringLiteral:function(e,t){t.write(e,JSON.stringify(e.value))},RegExpLiteral:function(e,t){t.write(e,e.extra.raw||"/"+e.pattern+"/"+e.flags)},NumericLiteral:function(e,t){t.write(e,JSON.stringify(e.value))}};t.exports=function(e,t,n){var r="",i=[],s=(t=t||{}).map&&new l(t.map);s&&t.map.sourceContent&&s.setSourceContent(t.map.file,t.map.sourceContent);var o="",a=[],u=[],p={inForInit:0,lineLength:function(){return r.length},sourceAt:function(e,t){return n?n.substring(e,t):"/* Omitted Non-standard node */"},write:function(e){o=arguments[arguments.length-1];for(var n=1;n<arguments.length;n++)if(s&&e&&e.loc&&e.loc.start&&s.addMapping({source:t.map.file,original:{line:e.loc.start.line,column:e.loc.start.column},generated:{line:t.map.startLine+i.length+1,column:r.length}}),arguments[n]===p.lineEnd){if(u.length&&(u.forEach(function(e){"Line"===e.type?r+=" // "+e.value:((" /*"+e.value+"*/").split("\n").forEach(function(e){r+=e,i.push(r),r=""}),r=i.pop())}),u=[]),i.push(r),r="",a.length){var l=i.pop();a.forEach(function(e){var t=c(p.indent,e.indent);"Line"===e.type?i.push(t+"//"+e.value):(t+"/*"+e.value+"*/").split("\n").forEach(function(e){i.push(e)})}),i.push(l),a=[]}}else r+=arguments[n],e&&e.$comments&&(e.$comments.forEach(function(t){var n=e.loc.start.column<t.loc.start.column;t.indent=p.indentLevel,n?u.push(t):a.push(t)}),e.$comments=null)},back:function(){r=r.substring(0,r.length-o.length)},indent:" ",lineEnd:"\n",indentLevel:0,wrapColumn:80};d.out(e,p),u=e.$comments||[],p.write(e,p.lineEnd);var h=i.join(p.lineEnd);return t&&t.map?{code:h,map:s}:h}},{"source-map":24}],13:[function(e,t,n){"use strict";function r(e,t){["start","end","loc","range"].forEach(function(n){n in e&&!(n in t)&&(t[n]=e[n])})}function i(e,t,n){function r(e){e.replace=u.replace,e.append=u.append,e.index?(Object.defineProperties(e,{index:{enumerable:!0,get:u.index}}),e.remove=u.removeElement):e.remove=u.removeNode,n.unshift(e),i(e.self,t,n),n.shift()}return n||((n=[{self:e}]).replace=function(e,t){n[e].replace(t)}),t(e,function(){e.type in a&&a[e.type](e,n,function t(i,s,o){if(i===e)return a[o||e.type](e,n,t);for(var u=Object.keys(e),c=0;c<u.length;c++){var l=e[u[c]];Array.isArray(l)?l.indexOf(i)>=0&&r({self:i,parent:e,field:u[c],index:!0}):l instanceof Object&&i===l&&r({self:i,parent:e,field:u[c]})}})},n),e}function s(t,n){var r=[],s={ecmaVersion:8,allowHashBang:!0,allowReturnOutsideFunction:!0,allowImportExportEverywhere:!0,locations:!0,onComment:r};if((!n||!n.noNodentExtensions||parseInt(o.version)<4)&&(c||(parseInt(o.version)<4&&console.warn("Nodent: Warning - noNodentExtensions option requires acorn >=v4.x. Extensions installed."),e("acorn-es7-plugin")(o),c=!0),s.plugins=s.plugins||{},s.plugins.asyncawait={asyncExits:!0,awaitAnywhere:!0}),n)for(var a in n)"noNodentExtensions"!==a&&(s[a]=n[a]);var u=o.parse(t,s);return i(u,function(e,t,n){for(t();r.length&&e.loc&&e.loc.start.line>=r[0].loc.start.line&&e.loc.end.line>=r[0].loc.end.line;)e.$comments=e.$comments||[],e.$comments.push(r.shift())}),u}var o=e("acorn"),a=e("acorn/dist/walk").make({AwaitExpression:function(e,t,n){n(e.argument,t,"Expression")},SwitchStatement:function(e,t,n){n(e.discriminant,t,"Expression");for(var r=0;r<e.cases.length;++r)n(e.cases[r],t)},SwitchCase:function(e,t,n){e.test&&n(e.test,t,"Expression");for(var r=0;r<e.consequent.length;++r)n(e.consequent[r],t,"Statement")},TryStatement:function(e,t,n){n(e.block,t,"Statement"),e.handler&&n(e.handler,t,"Statement"),e.finalizer&&n(e.finalizer,t,"Statement")},CatchClause:function(e,t,n){n(e.param,t,"Pattern"),n(e.body,t,"ScopeBody")},Class:function(e,t,n){e.id&&n(e.id,t,"Pattern"),e.superClass&&n(e.superClass,t,"Expression"),n(e.body,t)},ClassBody:function(e,t,n){for(var r=0;r<e.body.length;r++)n(e.body[r],t)},ObjectPattern:function(e,t,n){for(var r=0,i=e.properties;r<i.length;r+=1)n(i[r],t,"Property")},ClassProperty:function(e,t,n){e.key&&n(e.key,t,"Expression"),e.value&&n(e.value,t,"Expression")},ClassMethod:function(e,t,n){e.key&&n(e.key,t,"Expression"),n(e,t,"Function")},ObjectProperty:function(e,t,n){e.key&&n(e.key,t,"Expression"),e.value&&n(e.value,t,"Expression")},ObjectMethod:function(e,t,n){e.key&&n(e.key,t,"Expression"),n(e,t,"Function")}}),u={replace:function(e){return Array.isArray(e)&&1===e.length&&(e=e[0]),"index"in this?(r(this.parent[this.field][this.index],e),Array.isArray(e)?[].splice.apply(this.parent[this.field],[this.index,1].concat(e)):this.parent[this.field][this.index]=e):(r(this.parent[this.field],e),Array.isArray(e)?this.parent[this.field]={type:"BlockStatement",body:e}:this.parent[this.field]=e),this.self},append:function(e){if(Array.isArray(e)&&1===e.length&&(e=e[0]),!("index"in this))throw new Error("Cannot append Element node to non-array");return Array.isArray(e)?[].splice.apply(this.parent[this.field],[this.index+1,0].concat(e)):this.parent[this.field].splice(this.index+1,0,e),this.self},index:function(){return this.parent[this.field].indexOf(this.self)},removeElement:function(){return this.parent[this.field].splice(this.index,1)[0]},removeNode:function(){var e=this.parent[this.field];return delete this.parent[this.field],e}},c=!1,l={};t.exports={part:function(e,t){function n(e,r){if(Array.isArray(r)&&!Array.isArray(e))throw new Error("Can't substitute an array for a node");return r=r||{},Object.keys(e).forEach(function(i){if(!(e[i]instanceof Object))return r[i]=e[i];if(Array.isArray(e[i]))return r[i]=n(e[i],[]);var s;if(s=Array.isArray(r)?function(e){return"function"==typeof e&&(e=e()),r=r.concat(e)}:function(e){return"function"==typeof e&&(e=e()),r[i]=e,r},"Identifier"===e[i].type&&"$"===e[i].name[0])return s(t[e[i].name.slice(1)]);if("LabeledStatement"===e[i].type&&"$"===e[i].label.name){var o=e[i].body.expression;return s(t[o.name||o.value])}return s("LabeledStatement"===e[i].type&&"$$"===e[i].label.name.slice(0,2)?t[e[i].label.name.slice(2)](n(e[i]).body):n(e[i]))}),r}l[e]||(l[e]=s(e,{noNodentExtensions:!0,locations:!1,ranges:!1,onComment:null}));var r=n(l[e]);return{body:r.body,expr:"ExpressionStatement"===r.body[0].type?r.body[0].expression:null}},parse:s,treeWalker:i}},{acorn:4,"acorn-es7-plugin":1,"acorn/dist/walk":5}],14:[function(e,t,n){function r(){this._array=[],this._set=o?new Map:Object.create(null)}var i=e("./util"),s=Object.prototype.hasOwnProperty,o="undefined"!=typeof Map;r.fromArray=function(e,t){for(var n=new r,i=0,s=e.length;i<s;i++)n.add(e[i],t);return n},r.prototype.size=function(){return o?this._set.size:Object.getOwnPropertyNames(this._set).length},r.prototype.add=function(e,t){var n=o?e:i.toSetString(e),r=o?this.has(e):s.call(this._set,n),a=this._array.length;r&&!t||this._array.push(e),r||(o?this._set.set(e,a):this._set[n]=a)},r.prototype.has=function(e){if(o)return this._set.has(e);var t=i.toSetString(e);return s.call(this._set,t)},r.prototype.indexOf=function(e){if(o){var t=this._set.get(e);if(t>=0)return t}else{var n=i.toSetString(e);if(s.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')},r.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},r.prototype.toArray=function(){return this._array.slice()},n.ArraySet=r},{"./util":23}],15:[function(e,t,n){var r=e("./base64");n.encode=function(e){var t,n="",i=function(e){return e<0?1+(-e<<1):0+(e<<1)}(e);do{t=31&i,(i>>>=5)>0&&(t|=32),n+=r.encode(t)}while(i>0);return n},n.decode=function(e,t,n){var i,s,o=e.length,a=0,u=0;do{if(t>=o)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(s=r.decode(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));i=!!(32&s),a+=(s&=31)<<u,u+=5}while(i);n.value=function(e){var t=e>>1;return 1==(1&e)?-t:t}(a),n.rest=t}},{"./base64":16}],16:[function(e,t,n){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");n.encode=function(e){if(0<=e&&e<r.length)return r[e];throw new TypeError("Must be between 0 and 63: "+e)},n.decode=function(e){return 65<=e&&e<=90?e-65:97<=e&&e<=122?e-97+26:48<=e&&e<=57?e-48+52:43==e?62:47==e?63:-1}},{}],17:[function(e,t,n){function r(e,t,i,s,o,a){var u=Math.floor((t-e)/2)+e,c=o(i,s[u],!0);return 0===c?u:c>0?t-u>1?r(u,t,i,s,o,a):a==n.LEAST_UPPER_BOUND?t<s.length?t:-1:u:u-e>1?r(e,u,i,s,o,a):a==n.LEAST_UPPER_BOUND?u:e<0?-1:e}n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,t,i,s){if(0===t.length)return-1;var o=r(-1,t.length,e,t,i,s||n.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&0===i(t[o],t[o-1],!0);)--o;return o}},{}],18:[function(e,t,n){function r(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var i=e("./util");r.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},r.prototype.add=function(e){!function(e,t){var n=e.generatedLine,r=t.generatedLine,s=e.generatedColumn,o=t.generatedColumn;return r>n||r==n&&o>=s||i.compareByGeneratedPositionsInflated(e,t)<=0}(this._last,e)?(this._sorted=!1,this._array.push(e)):(this._last=e,this._array.push(e))},r.prototype.toArray=function(){return this._sorted||(this._array.sort(i.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},n.MappingList=r},{"./util":23}],19:[function(e,t,n){function r(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function i(e,t,n,s){if(n<s){var o=n-1;r(e,function(e,t){return Math.round(e+Math.random()*(t-e))}(n,s),s);for(var a=e[s],u=n;u<s;u++)t(e[u],a)<=0&&r(e,o+=1,u);r(e,o+1,u);var c=o+1;i(e,t,n,c-1),i(e,t,c+1,s)}}n.quickSort=function(e,t){i(e,t,0,e.length-1)}},{}],20:[function(e,t,n){function r(e){var t=e;return"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=t.sections?new o(t):new i(t)}function i(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var n=a.getArg(t,"version"),r=a.getArg(t,"sources"),i=a.getArg(t,"names",[]),s=a.getArg(t,"sourceRoot",null),o=a.getArg(t,"sourcesContent",null),u=a.getArg(t,"mappings"),l=a.getArg(t,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);r=r.map(String).map(a.normalize).map(function(e){return s&&a.isAbsolute(s)&&a.isAbsolute(e)?a.relative(s,e):e}),this._names=c.fromArray(i.map(String),!0),this._sources=c.fromArray(r,!0),this.sourceRoot=s,this.sourcesContent=o,this._mappings=u,this.file=l}function s(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function o(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var n=a.getArg(t,"version"),i=a.getArg(t,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new c,this._names=new c;var s={line:-1,column:0};this._sections=i.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var t=a.getArg(e,"offset"),n=a.getArg(t,"line"),i=a.getArg(t,"column");if(n<s.line||n===s.line&&i<s.column)throw new Error("Section offsets must be ordered and non-overlapping.");return s=t,{generatedOffset:{generatedLine:n+1,generatedColumn:i+1},consumer:new r(a.getArg(e,"map"))}})}var a=e("./util"),u=e("./binary-search"),c=e("./array-set").ArraySet,l=e("./base64-vlq"),p=e("./quick-sort").quickSort;r.fromSourceMap=function(e){return i.fromSourceMap(e)},r.prototype._version=3,r.prototype.__generatedMappings=null,Object.defineProperty(r.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),r.prototype.__originalMappings=null,Object.defineProperty(r.prototype,"_originalMappings",{get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),r.prototype._charIsMappingSeparator=function(e,t){var n=e.charAt(t);return";"===n||","===n},r.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")},r.GENERATED_ORDER=1,r.ORIGINAL_ORDER=2,r.GREATEST_LOWER_BOUND=1,r.LEAST_UPPER_BOUND=2,r.prototype.eachMapping=function(e,t,n){var i,s=t||null;switch(n||r.GENERATED_ORDER){case r.GENERATED_ORDER:i=this._generatedMappings;break;case r.ORIGINAL_ORDER:i=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var o=this.sourceRoot;i.map(function(e){var t=null===e.source?null:this._sources.at(e.source);return null!=t&&null!=o&&(t=a.join(o,t)),{source:t,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:null===e.name?null:this._names.at(e.name)}},this).forEach(e,s)},r.prototype.allGeneratedPositionsFor=function(e){var t=a.getArg(e,"line"),n={source:a.getArg(e,"source"),originalLine:t,originalColumn:a.getArg(e,"column",0)};if(null!=this.sourceRoot&&(n.source=a.relative(this.sourceRoot,n.source)),!this._sources.has(n.source))return[];n.source=this._sources.indexOf(n.source);var r=[],i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",a.compareByOriginalPositions,u.LEAST_UPPER_BOUND);if(i>=0){var s=this._originalMappings[i];if(void 0===e.column)for(var o=s.originalLine;s&&s.originalLine===o;)r.push({line:a.getArg(s,"generatedLine",null),column:a.getArg(s,"generatedColumn",null),lastColumn:a.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i];else for(var c=s.originalColumn;s&&s.originalLine===t&&s.originalColumn==c;)r.push({line:a.getArg(s,"generatedLine",null),column:a.getArg(s,"generatedColumn",null),lastColumn:a.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i]}return r},n.SourceMapConsumer=r,(i.prototype=Object.create(r.prototype)).consumer=r,i.fromSourceMap=function(e){var t=Object.create(i.prototype),n=t._names=c.fromArray(e._names.toArray(),!0),r=t._sources=c.fromArray(e._sources.toArray(),!0);t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file;for(var o=e._mappings.toArray().slice(),u=t.__generatedMappings=[],l=t.__originalMappings=[],h=0,f=o.length;h<f;h++){var d=o[h],y=new s;y.generatedLine=d.generatedLine,y.generatedColumn=d.generatedColumn,d.source&&(y.source=r.indexOf(d.source),y.originalLine=d.originalLine,y.originalColumn=d.originalColumn,d.name&&(y.name=n.indexOf(d.name)),l.push(y)),u.push(y)}return p(t.__originalMappings,a.compareByOriginalPositions),t},i.prototype._version=3,Object.defineProperty(i.prototype,"sources",{get:function(){return this._sources.toArray().map(function(e){return null!=this.sourceRoot?a.join(this.sourceRoot,e):e},this)}}),i.prototype._parseMappings=function(e,t){for(var n,r,i,o,u,c=1,h=0,f=0,d=0,y=0,m=0,g=e.length,v=0,b={},x={},w=[],E=[];v<g;)if(";"===e.charAt(v))c++,v++,h=0;else if(","===e.charAt(v))v++;else{for((n=new s).generatedLine=c,o=v;o<g&&!this._charIsMappingSeparator(e,o);o++);if(r=e.slice(v,o),i=b[r])v+=r.length;else{for(i=[];v<o;)l.decode(e,v,x),u=x.value,v=x.rest,i.push(u);if(2===i.length)throw new Error("Found a source, but no line and column");if(3===i.length)throw new Error("Found a source and line, but no column");b[r]=i}n.generatedColumn=h+i[0],h=n.generatedColumn,i.length>1&&(n.source=y+i[1],y+=i[1],n.originalLine=f+i[2],f=n.originalLine,n.originalLine+=1,n.originalColumn=d+i[3],d=n.originalColumn,i.length>4&&(n.name=m+i[4],m+=i[4])),E.push(n),"number"==typeof n.originalLine&&w.push(n)}p(E,a.compareByGeneratedPositionsDeflated),this.__generatedMappings=E,p(w,a.compareByOriginalPositions),this.__originalMappings=w},i.prototype._findMapping=function(e,t,n,r,i,s){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[r]);return u.search(e,t,i,s)},i.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var n=this._generatedMappings[e+1];if(t.generatedLine===n.generatedLine){t.lastGeneratedColumn=n.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}},i.prototype.originalPositionFor=function(e){var t={generatedLine:a.getArg(e,"line"),generatedColumn:a.getArg(e,"column")},n=this._findMapping(t,this._generatedMappings,"generatedLine","generatedColumn",a.compareByGeneratedPositionsDeflated,a.getArg(e,"bias",r.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===t.generatedLine){var s=a.getArg(i,"source",null);null!==s&&(s=this._sources.at(s),null!=this.sourceRoot&&(s=a.join(this.sourceRoot,s)));var o=a.getArg(i,"name",null);return null!==o&&(o=this._names.at(o)),{source:s,line:a.getArg(i,"originalLine",null),column:a.getArg(i,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}},i.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},i.prototype.sourceContentFor=function(e,t){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 n;if(null!=this.sourceRoot&&(n=a.urlParse(this.sourceRoot))){var r=e.replace(/^file:\/\//,"");if("file"==n.scheme&&this._sources.has(r))return this.sourcesContent[this._sources.indexOf(r)];if((!n.path||"/"==n.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},i.prototype.generatedPositionFor=function(e){var t=a.getArg(e,"source");if(null!=this.sourceRoot&&(t=a.relative(this.sourceRoot,t)),!this._sources.has(t))return{line:null,column:null,lastColumn:null};var n={source:t=this._sources.indexOf(t),originalLine:a.getArg(e,"line"),originalColumn:a.getArg(e,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",a.compareByOriginalPositions,a.getArg(e,"bias",r.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===n.source)return{line:a.getArg(s,"generatedLine",null),column:a.getArg(s,"generatedColumn",null),lastColumn:a.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=i,(o.prototype=Object.create(r.prototype)).constructor=r,o.prototype._version=3,Object.defineProperty(o.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var n=0;n<this._sections[t].consumer.sources.length;n++)e.push(this._sections[t].consumer.sources[n]);return e}}),o.prototype.originalPositionFor=function(e){var t={generatedLine:a.getArg(e,"line"),generatedColumn:a.getArg(e,"column")},n=u.search(t,this._sections,function(e,t){var n=e.generatedLine-t.generatedOffset.generatedLine;return n||e.generatedColumn-t.generatedOffset.generatedColumn}),r=this._sections[n];return r?r.consumer.originalPositionFor({line:t.generatedLine-(r.generatedOffset.generatedLine-1),column:t.generatedColumn-(r.generatedOffset.generatedLine===t.generatedLine?r.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},o.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})},o.prototype.sourceContentFor=function(e,t){for(var n=0;n<this._sections.length;n++){var r=this._sections[n].consumer.sourceContentFor(e,!0);if(r)return r}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},o.prototype.generatedPositionFor=function(e){for(var t=0;t<this._sections.length;t++){var n=this._sections[t];if(-1!==n.consumer.sources.indexOf(a.getArg(e,"source"))){var r=n.consumer.generatedPositionFor(e);if(r){return{line:r.line+(n.generatedOffset.generatedLine-1),column:r.column+(n.generatedOffset.generatedLine===r.line?n.generatedOffset.generatedColumn-1:0)}}}}return{line:null,column:null}},o.prototype._parseMappings=function(e,t){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var r=this._sections[n],i=r.consumer._generatedMappings,s=0;s<i.length;s++){var o=i[s],u=r.consumer._sources.at(o.source);null!==r.consumer.sourceRoot&&(u=a.join(r.consumer.sourceRoot,u)),this._sources.add(u),u=this._sources.indexOf(u);var c=r.consumer._names.at(o.name);this._names.add(c),c=this._names.indexOf(c);var l={source:u,generatedLine:o.generatedLine+(r.generatedOffset.generatedLine-1),generatedColumn:o.generatedColumn+(r.generatedOffset.generatedLine===o.generatedLine?r.generatedOffset.generatedColumn-1:0),originalLine:o.originalLine,originalColumn:o.originalColumn,name:c};this.__generatedMappings.push(l),"number"==typeof l.originalLine&&this.__originalMappings.push(l)}p(this.__generatedMappings,a.compareByGeneratedPositionsDeflated),p(this.__originalMappings,a.compareByOriginalPositions)},n.IndexedSourceMapConsumer=o},{"./array-set":14,"./base64-vlq":15,"./binary-search":17,"./quick-sort":19,"./util":23}],21:[function(e,t,n){function r(e){e||(e={}),this._file=s.getArg(e,"file",null),this._sourceRoot=s.getArg(e,"sourceRoot",null),this._skipValidation=s.getArg(e,"skipValidation",!1),this._sources=new o,this._names=new o,this._mappings=new a,this._sourcesContents=null}var i=e("./base64-vlq"),s=e("./util"),o=e("./array-set").ArraySet,a=e("./mapping-list").MappingList;r.prototype._version=3,r.fromSourceMap=function(e){var t=e.sourceRoot,n=new r({file:e.file,sourceRoot:t});return e.eachMapping(function(e){var r={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(r.source=e.source,null!=t&&(r.source=s.relative(t,r.source)),r.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(r.name=e.name)),n.addMapping(r)}),e.sources.forEach(function(t){var r=e.sourceContentFor(t);null!=r&&n.setSourceContent(t,r)}),n},r.prototype.addMapping=function(e){var t=s.getArg(e,"generated"),n=s.getArg(e,"original",null),r=s.getArg(e,"source",null),i=s.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,n,r,i),null!=r&&(r=String(r),this._sources.has(r)||this._sources.add(r)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=n&&n.line,originalColumn:null!=n&&n.column,source:r,name:i})},r.prototype.setSourceContent=function(e,t){var n=e;null!=this._sourceRoot&&(n=s.relative(this._sourceRoot,n)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[s.toSetString(n)]=t):this._sourcesContents&&(delete this._sourcesContents[s.toSetString(n)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},r.prototype.applySourceMap=function(e,t,n){var r=t;if(null==t){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.');r=e.file}var i=this._sourceRoot;null!=i&&(r=s.relative(i,r));var a=new o,u=new o;this._mappings.unsortedForEach(function(t){if(t.source===r&&null!=t.originalLine){var o=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=o.source&&(t.source=o.source,null!=n&&(t.source=s.join(n,t.source)),null!=i&&(t.source=s.relative(i,t.source)),t.originalLine=o.line,t.originalColumn=o.column,null!=o.name&&(t.name=o.name))}var c=t.source;null==c||a.has(c)||a.add(c);var l=t.name;null==l||u.has(l)||u.add(l)},this),this._sources=a,this._names=u,e.sources.forEach(function(t){var r=e.sourceContentFor(t);null!=r&&(null!=n&&(t=s.join(n,t)),null!=i&&(t=s.relative(i,t)),this.setSourceContent(t,r))},this)},r.prototype._validateMapping=function(e,t,n,r){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||n||r)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))},r.prototype._serializeMappings=function(){for(var e,t,n,r,o=0,a=1,u=0,c=0,l=0,p=0,h="",f=this._mappings.toArray(),d=0,y=f.length;d<y;d++){if(t=f[d],e="",t.generatedLine!==a)for(o=0;t.generatedLine!==a;)e+=";",a++;else if(d>0){if(!s.compareByGeneratedPositionsInflated(t,f[d-1]))continue;e+=","}e+=i.encode(t.generatedColumn-o),o=t.generatedColumn,null!=t.source&&(r=this._sources.indexOf(t.source),e+=i.encode(r-p),p=r,e+=i.encode(t.originalLine-1-c),c=t.originalLine-1,e+=i.encode(t.originalColumn-u),u=t.originalColumn,null!=t.name&&(n=this._names.indexOf(t.name),e+=i.encode(n-l),l=n)),h+=e}return h},r.prototype._generateSourcesContent=function(e,t){return e.map(function(e){if(!this._sourcesContents)return null;null!=t&&(e=s.relative(t,e));var n=s.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null},this)},r.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},r.prototype.toString=function(){return JSON.stringify(this.toJSON())},n.SourceMapGenerator=r},{"./array-set":14,"./base64-vlq":15,"./mapping-list":18,"./util":23}],22:[function(e,t,n){function r(e,t,n,r,i){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==n?null:n,this.name=null==i?null:i,this[a]=!0,null!=r&&this.add(r)}var i=e("./source-map-generator").SourceMapGenerator,s=e("./util"),o=/(\r?\n)/,a="$$$isSourceNode$$$";r.fromStringWithSourceMap=function(e,t,n){function i(e,t){if(null===e||void 0===e.source)a.add(t);else{var i=n?s.join(n,e.source):e.source;a.add(new r(e.originalLine,e.originalColumn,i,t,e.name))}}var a=new r,u=e.split(o),c=0,l=function(){function e(){return c<u.length?u[c++]:void 0}return e()+(e()||"")},p=1,h=0,f=null;return t.eachMapping(function(e){if(null!==f){if(!(p<e.generatedLine)){var t=(n=u[c]).substr(0,e.generatedColumn-h);return u[c]=n.substr(e.generatedColumn-h),h=e.generatedColumn,i(f,t),void(f=e)}i(f,l()),p++,h=0}for(;p<e.generatedLine;)a.add(l()),p++;if(h<e.generatedColumn){var n=u[c];a.add(n.substr(0,e.generatedColumn)),u[c]=n.substr(e.generatedColumn),h=e.generatedColumn}f=e},this),c<u.length&&(f&&i(f,l()),a.add(u.splice(c).join(""))),t.sources.forEach(function(e){var r=t.sourceContentFor(e);null!=r&&(null!=n&&(e=s.join(n,e)),a.setSourceContent(e,r))}),a},r.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else{if(!e[a]&&"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},r.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else{if(!e[a]&&"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},r.prototype.walk=function(e){for(var t,n=0,r=this.children.length;n<r;n++)(t=this.children[n])[a]?t.walk(e):""!==t&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})},r.prototype.join=function(e){var t,n,r=this.children.length;if(r>0){for(t=[],n=0;n<r-1;n++)t.push(this.children[n]),t.push(e);t.push(this.children[n]),this.children=t}return this},r.prototype.replaceRight=function(e,t){var n=this.children[this.children.length-1];return n[a]?n.replaceRight(e,t):"string"==typeof n?this.children[this.children.length-1]=n.replace(e,t):this.children.push("".replace(e,t)),this},r.prototype.setSourceContent=function(e,t){this.sourceContents[s.toSetString(e)]=t},r.prototype.walkSourceContents=function(e){for(var t=0,n=this.children.length;t<n;t++)this.children[t][a]&&this.children[t].walkSourceContents(e);for(var r=Object.keys(this.sourceContents),t=0,n=r.length;t<n;t++)e(s.fromSetString(r[t]),this.sourceContents[r[t]])},r.prototype.toString=function(){var e="";return this.walk(function(t){e+=t}),e},r.prototype.toStringWithSourceMap=function(e){var t={code:"",line:1,column:0},n=new i(e),r=!1,s=null,o=null,a=null,u=null;return this.walk(function(e,i){t.code+=e,null!==i.source&&null!==i.line&&null!==i.column?(s===i.source&&o===i.line&&a===i.column&&u===i.name||n.addMapping({source:i.source,original:{line:i.line,column:i.column},generated:{line:t.line,column:t.column},name:i.name}),s=i.source,o=i.line,a=i.column,u=i.name,r=!0):r&&(n.addMapping({generated:{line:t.line,column:t.column}}),s=null,r=!1);for(var c=0,l=e.length;c<l;c++)10===e.charCodeAt(c)?(t.line++,t.column=0,c+1===l?(s=null,r=!1):r&&n.addMapping({source:i.source,original:{line:i.line,column:i.column},generated:{line:t.line,column:t.column},name:i.name})):t.column++}),this.walkSourceContents(function(e,t){n.setSourceContent(e,t)}),{code:t.code,map:n}},n.SourceNode=r},{"./source-map-generator":21,"./util":23}],23:[function(e,t,n){function r(e){var t=e.match(c);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function i(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function s(e){var t=e,s=r(e);if(s){if(!s.path)return e;t=s.path}for(var o,a=n.isAbsolute(t),u=t.split(/\/+/),c=0,l=u.length-1;l>=0;l--)"."===(o=u[l])?u.splice(l,1):".."===o?c++:c>0&&(""===o?(u.splice(l+1,c),c=0):(u.splice(l,2),c--));return""===(t=u.join("/"))&&(t=a?"/":"."),s?(s.path=t,i(s)):t}function o(e){return e}function a(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var n=t-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function u(e,t){return e===t?0:e>t?1:-1}n.getArg=function(e,t,n){if(t in e)return e[t];if(3===arguments.length)return n;throw new Error('"'+t+'" is a required argument.')};var c=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,l=/^data:.+\,.+$/;n.urlParse=r,n.urlGenerate=i,n.normalize=s,n.join=function(e,t){""===e&&(e="."),""===t&&(t=".");var n=r(t),o=r(e);if(o&&(e=o.path||"/"),n&&!n.scheme)return o&&(n.scheme=o.scheme),i(n);if(n||t.match(l))return t;if(o&&!o.host&&!o.path)return o.host=t,i(o);var a="/"===t.charAt(0)?t:s(e.replace(/\/+$/,"")+"/"+t);return o?(o.path=a,i(o)):a},n.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(c)},n.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==t.indexOf(e+"/");){var r=e.lastIndexOf("/");if(r<0)return t;if((e=e.slice(0,r)).match(/^([^\/]+:\/)?\/*$/))return t;++n}return Array(n+1).join("../")+t.substr(e.length+1)};var p=!("__proto__"in Object.create(null));n.toSetString=p?o:function(e){return a(e)?"$"+e:e},n.fromSetString=p?o:function(e){return a(e)?e.slice(1):e},n.compareByOriginalPositions=function(e,t,n){var r=e.source-t.source;return 0!==r?r:0!=(r=e.originalLine-t.originalLine)?r:0!=(r=e.originalColumn-t.originalColumn)||n?r:0!=(r=e.generatedColumn-t.generatedColumn)?r:0!=(r=e.generatedLine-t.generatedLine)?r:e.name-t.name},n.compareByGeneratedPositionsDeflated=function(e,t,n){var r=e.generatedLine-t.generatedLine;return 0!==r?r:0!=(r=e.generatedColumn-t.generatedColumn)||n?r:0!=(r=e.source-t.source)?r:0!=(r=e.originalLine-t.originalLine)?r:0!=(r=e.originalColumn-t.originalColumn)?r:e.name-t.name},n.compareByGeneratedPositionsInflated=function(e,t){var n=e.generatedLine-t.generatedLine;return 0!==n?n:0!=(n=e.generatedColumn-t.generatedColumn)?n:0!==(n=u(e.source,t.source))?n:0!=(n=e.originalLine-t.originalLine)?n:0!=(n=e.originalColumn-t.originalColumn)?n:u(e.name,t.name)}},{}],24:[function(e,t,n){n.SourceMapGenerator=e("./lib/source-map-generator").SourceMapGenerator,n.SourceMapConsumer=e("./lib/source-map-consumer").SourceMapConsumer,n.SourceNode=e("./lib/source-node").SourceNode},{"./lib/source-map-consumer":20,"./lib/source-map-generator":21,"./lib/source-node":22}],25:[function(e,t,n){t.exports={_args:[[{raw:"nodent-compiler@>=3.1.3",scope:null,escapedName:"nodent-compiler",name:"nodent-compiler",rawSpec:">=3.1.3",spec:">=3.1.3",type:"range"},"/Users/evgenypoberezkin/Documents/JSON/ajv/node_modules/nodent"]],_from:"nodent-compiler@>=3.1.3",_id:"nodent-compiler@3.1.3",_inCache:!0,_location:"/nodent-compiler",_nodeVersion:"8.4.0",_npmOperationalInternal:{host:"s3://npm-registry-packages",tmp:"tmp/nodent-compiler-3.1.3.tgz_1504874988276_0.6329000329133123"},_npmUser:{name:"matatbread",email:"npm@mailed.me.uk"},_npmVersion:"5.3.0",_phantomChildren:{},_requested:{raw:"nodent-compiler@>=3.1.3",scope:null,escapedName:"nodent-compiler",name:"nodent-compiler",rawSpec:">=3.1.3",spec:">=3.1.3",type:"range"},_requiredBy:["/nodent"],_resolved:"https://registry.npmjs.org/nodent-compiler/-/nodent-compiler-3.1.3.tgz",_shasum:"6f0f1f8098db251ec773742bb4f33cd0266434b2",_shrinkwrap:null,_spec:"nodent-compiler@>=3.1.3",_where:"/Users/evgenypoberezkin/Documents/JSON/ajv/node_modules/nodent",author:{name:"Mat At Bread",email:"nodent@mailed.me.uk"},bugs:{url:"https://github.com/MatAtBread/nodent/issues"},dependencies:{acorn:">=2.5.2","acorn-es7-plugin":">=1.1.6","source-map":"^0.5.6"},description:"NoDent - Asynchronous Javascript language extensions",devDependencies:{},directories:{},dist:{integrity:"sha512-pcUC9gIgXXI3mbGjESZfVZO4Vgarw63xYZFRdkqxCDnygvvpiAwzwvvJ7rWqskp72Nk3cxWZY/rYxUIkPT14lw==",shasum:"6f0f1f8098db251ec773742bb4f33cd0266434b2",tarball:"https://registry.npmjs.org/nodent-compiler/-/nodent-compiler-3.1.3.tgz"},engines:"node >= 0.10.0",gitHead:"d72c5767ca302884c3215e6267d4910239add177",homepage:"https://github.com/MatAtBread/nodent-compiler#readme",keywords:["Javascript","ES7","async","await","language","extensions","Node","callback","generator","Promise","asynchronous"],license:"BSD-2-Clause",main:"compiler.js",maintainers:[{name:"matatbread",email:"npm@mailed.me.uk"}],name:"nodent-compiler",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git+https://github.com/MatAtBread/nodent-compiler.git"},scripts:{test:"node tests/basic.js # Please install 'nodent' and test the compiler fully from there."},version:"3.1.3"}},{}],26:[function(e,t,n){"use strict";function r(e,t){if(Function.prototype.$asyncspawn||Object.defineProperty(Function.prototype,"$asyncspawn",{value:r,enumerable:!1,configurable:!0,writable:!0}),this instanceof Function){var n=this;return new e(function(e,r){function i(t,n){var o;try{if((o=t.call(s,n)).done){if(o.value!==e){if(o.value&&o.value===o.value.then)return o.value(e,r);e&&e(o.value),e=null}return}o.value.then?o.value.then(function(e){i(s.next,e)},function(e){i(s.throw,e)}):i(s.next,o.value)}catch(e){return r&&r(e),void(r=null)}}var s=n.call(t,e,r);i(s.next)})}}var i=function(e,t){for(var n=t.toString(),r="return "+n,i=n.match(/.*\(([^)]*)\)/)[1],s=/['"]!!!([^'"]*)['"]/g,o=[];;){var a=s.exec(r);if(!a)break;o.push(a)}return o.reverse().forEach(function(t){r=r.slice(0,t.index)+e[t[1]]+r.substr(t.index+t[0].length)}),r=r.replace(/\/\*[^*]*\*\//g," ").replace(/\s+/g," "),new Function(i,r)()}({zousan:e("./zousan").toString(),thenable:e("./thenableFactory").toString()},function e(t,n){function r(){return i.apply(t,arguments)}Function.prototype.$asyncbind||Object.defineProperty(Function.prototype,"$asyncbind",{value:e,enumerable:!1,configurable:!0,writable:!0}),e.trampoline||(e.trampoline=function(e,t,n,r,i){return function s(o){for(;o;){if(o.then)return o=o.then(s,r),i?void 0:o;try{if(o.pop){if(o.length)return o.pop()?t.call(e):o;o=n}else o=o.call(e)}catch(e){return r(e)}}}}),e.LazyThenable||(e.LazyThenable="!!!thenable"(),e.EagerThenable=e.Thenable=(e.EagerThenableFactory="!!!zousan")());var i=this;switch(n){case!0:return new e.Thenable(r);case 0:return new e.LazyThenable(r);case void 0:return r.then=r,r;default:return function(){try{return i.apply(t,arguments)}catch(e){return n(e)}}}});i(),r(),t.exports={$asyncbind:i,$asyncspawn:r}},{"./thenableFactory":27,"./zousan":28}],27:[function(e,t,n){t.exports=function(){function e(e){return e&&e instanceof Object&&"function"==typeof e.then}function t(n,r,i){try{var s=i?i(r):r;if(n===s)return n.reject(new TypeError("Promise resolution loop"));e(s)?s.then(function(e){t(n,e)},function(e){n.reject(e)}):n.resolve(s)}catch(e){n.reject(e)}}function n(){}function r(e){}function i(r,i){var s=new n;try{this._resolver(function(n){return e(n)?n.then(r,i):t(s,n,r)},function(e){t(s,e,i)})}catch(e){t(s,e,i)}return s}function s(e){this._resolver=e,this.then=i}return n.prototype={resolve:r,reject:r,then:function(e,t){this.resolve=e,this.reject=t}},s.resolve=function(e){return s.isThenable(e)?e:{then:function(t){return t(e)}}},s.isThenable=e,s}},{}],28:[function(e,t,n){(function(e){"use strict";t.exports=function(t){function n(e){if(e){var t=this;e(function(e){t.resolve(e)},function(e){t.reject(e)})}}function r(e,t){if("function"==typeof e.y)try{var n=e.y.call(void 0,t);e.p.resolve(n)}catch(t){e.p.reject(t)}else e.p.resolve(t)}function i(e,t){if("function"==typeof e.n)try{var n=e.n.call(void 0,t);e.p.resolve(n)}catch(t){e.p.reject(t)}else e.p.reject(t)}t=t||"object"==typeof e&&e.nextTick||"function"==typeof setImmediate&&setImmediate||function(e){setTimeout(e,0)};var s=function(){function e(){for(;n.length-r;){try{n[r]()}catch(e){}n[r++]=void 0,r===i&&(n.splice(0,i),r=0)}}var n=[],r=0,i=1024;return function(i){n.push(i),n.length-r==1&&t(e)}}();return n.prototype={resolve:function(e){if(void 0===this.state){if(e===this)return this.reject(new TypeError("Attempt to resolve promise with self"));var t=this;if(e&&("function"==typeof e||"object"==typeof e))try{var n=0,i=e.then;if("function"==typeof i)return void i.call(e,function(e){n++||t.resolve(e)},function(e){n++||t.reject(e)})}catch(e){return void(n||this.reject(e))}this.state=r,this.v=e,t.c&&s(function(){for(var n=0,i=t.c.length;n<i;n++)r(t.c[n],e)})}},reject:function(e){if(void 0===this.state){this.state=i,this.v=e;var t=this.c;t&&s(function(){for(var n=0,r=t.length;n<r;n++)i(t[n],e)})}},then:function(e,t){var r=new n,i={y:e,n:t,p:r};if(void 0===this.state)this.c?this.c.push(i):this.c=[i];else{var o=this.state,a=this.v;s(function(){o(i,a)})}return r}},n.resolve=function(e){if(e&&e instanceof n)return e;var t=new n;return t.resolve(e),t},n.reject=function(e){if(e&&e instanceof n)return e;var t=new n;return t.reject(e),t},n.version="2.3.3-nodent",n}}).call(this,e("_process"))},{_process:32}],29:[function(e,t,n){t.exports=function(e,t,n,r){var i=[[],[]],s=[/(.*)(<script[^>]*>)(.*)/i,/(.*)(<\/script>)(.*)/i],o=0,a=!0;t=t.split("\n");for(var u=0;u<t.length;){var c=s[o].exec(t[u]);c&&0==o&&c[2].match("src=")&&(c=null),c?(1==o?(i[o].push(c[1]),pr=e.compile(i[1].join("\n"),n,3,r.compiler).code,a&&r.runtime&&(a=!1,r.runtime&&i[0].push("Function.prototype.$asyncbind = "+e.$asyncbind.toString()+";\n")),i[0].push(pr),i[1]=[],i[o=0].push(c[2])):(i[o].push(c[1]),i[o].push(c[2]),o=1),t[u]=c[3]):i[o].push(t[u++])}return i[0].join("\n")}},{}],30:[function(e,t,n){(function(e){function t(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,s=function(e){return i.exec(e).slice(1)};n.resolve=function(){for(var n="",i=!1,s=arguments.length-1;s>=-1&&!i;s--){var o=s>=0?arguments[s]:e.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(n=o+"/"+n,i="/"===o.charAt(0))}return n=t(r(n.split("/"),function(e){return!!e}),!i).join("/"),(i?"/":"")+n||"."},n.normalize=function(e){var i=n.isAbsolute(e),s="/"===o(e,-1);return(e=t(r(e.split("/"),function(e){return!!e}),!i).join("/"))||i||(e="."),e&&s&&(e+="/"),(i?"/":"")+e},n.isAbsolute=function(e){return"/"===e.charAt(0)},n.join=function(){var e=Array.prototype.slice.call(arguments,0);return n.normalize(r(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},n.relative=function(e,t){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=n.resolve(e).substr(1),t=n.resolve(t).substr(1);for(var i=r(e.split("/")),s=r(t.split("/")),o=Math.min(i.length,s.length),a=o,u=0;u<o;u++)if(i[u]!==s[u]){a=u;break}for(var c=[],u=a;u<i.length;u++)c.push("..");return(c=c.concat(s.slice(a))).join("/")},n.sep="/",n.delimiter=":",n.dirname=function(e){var t=s(e),n=t[0],r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},n.basename=function(e,t){var n=s(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},n.extname=function(e){return s(e)[3]};var o="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,e("_process"))},{_process:32}],31:[function(e,t,n){(function(e){"use strict";var n="win32"===e.platform,r=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,i=/^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/,s={};s.parse=function(e){if("string"!=typeof e)throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t=function(e){var t=r.exec(e),n=(t[1]||"")+(t[2]||""),s=t[3]||"",o=i.exec(s);return[n,o[1],o[2],o[3]]}(e);if(!t||4!==t.length)throw new TypeError("Invalid path '"+e+"'");return{root:t[0],dir:t[0]+t[1].slice(0,-1),base:t[2],ext:t[3],name:t[2].slice(0,t[2].length-t[3].length)}};var o=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,a={};a.parse=function(e){if("string"!=typeof e)throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t=function(e){return o.exec(e).slice(1)}(e);if(!t||4!==t.length)throw new TypeError("Invalid path '"+e+"'");return t[1]=t[1]||"",t[2]=t[2]||"",t[3]=t[3]||"",{root:t[0],dir:t[0]+t[1].slice(0,-1),base:t[2],ext:t[3],name:t[2].slice(0,t[2].length-t[3].length)}},t.exports=n?s.parse:a.parse,t.exports.posix=a.parse,t.exports.win32=s.parse}).call(this,e("_process"))},{_process:32}],32:[function(e,t,n){function r(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(l===setTimeout)return setTimeout(e,0);if((l===r||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function o(){y&&f&&(y=!1,f.length?d=f.concat(d):m=-1,d.length&&a())}function a(){if(!y){var e=s(o);y=!0;for(var t=d.length;t;){for(f=d,d=[];++m<t;)f&&f[m].run();m=-1,t=d.length}f=null,y=!1,function(e){if(p===clearTimeout)return clearTimeout(e);if((p===i||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}(e)}}function u(e,t){this.fun=e,this.array=t}function c(){}var l,p,h=t.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:r}catch(e){l=r}try{p="function"==typeof clearTimeout?clearTimeout:i}catch(e){p=i}}();var f,d=[],y=!1,m=-1;h.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];d.push(new u(e,t)),1!==d.length||y||s(a)},u.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=c,h.addListener=c,h.once=c,h.off=c,h.removeListener=c,h.removeAllListeners=c,h.emit=c,h.prependListener=c,h.prependOnceListener=c,h.listeners=function(e){return[]},h.binding=function(e){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(e){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},{}],33:[function(e,t,n){var r=e("./lib/core"),i=e("./lib/async");i.core=r,i.isCore=function(e){return r[e]},i.sync=e("./lib/sync"),t.exports=i},{"./lib/async":34,"./lib/core":37,"./lib/sync":39}],34:[function(e,t,n){(function(n){var r=e("./core"),i=e("fs"),s=e("path"),o=e("./caller.js"),a=e("./node-modules-paths.js");t.exports=function(e,t,u){function c(t,n,r){t?d(t):n?d(null,n,r):h(w,function(t,n,r){if(t)d(t);else if(n)d(null,n,r);else{var i=new Error("Cannot find module '"+e+"' from '"+x+"'");i.code="MODULE_NOT_FOUND",d(i)}})}function l(e,t,n){function r(e,t,n){function i(n,i,l){if(c=i,n)return o(n);if(l&&c&&y.pathFilter){var p=s.relative(l,u),h=p.slice(0,p.length-e[0].length),f=y.pathFilter(c,t,h);if(f)return r([""].concat(b.slice()),s.resolve(l,f),c)}g(u,a)}function a(n,i){return n?o(n):i?o(null,u,c):void r(e.slice(1),t,c)}if(0===e.length)return o(null,void 0,n);var u=t+e[0],c=n;c?i(null,c):p(s.dirname(u),i)}var i=t,o=n;"function"==typeof i&&(o=i,i=void 0);r([""].concat(b),e,i)}function p(e,t){if(""===e||"/"===e)return t(null);if("win32"===n.platform&&/^\w:[/\\]*$/.test(e))return t(null);if(/[/\\]node_modules[/\\]*$/.test(e))return t(null);var r=s.join(e,"package.json");g(r,function(n,i){if(!i)return p(s.dirname(e),t);v(r,function(n,i){n&&t(n);try{var s=JSON.parse(i)}catch(e){}s&&y.packageFilter&&(s=y.packageFilter(s,r)),t(null,s,e)})})}function h(e,t,n){var r=n,i=t;"function"==typeof i&&(r=i,i=y.package);var o=s.join(e,"package.json");g(o,function(t,n){return t?r(t):n?void v(o,function(t,n){if(t)return r(t);try{var i=JSON.parse(n)}catch(e){}if(y.packageFilter&&(i=y.packageFilter(i,o)),i.main)return"."!==i.main&&"./"!==i.main||(i.main="index"),void l(s.resolve(e,i.main),i,function(t,n,i){if(t)return r(t);if(n)return r(null,n,i);if(!i)return l(s.join(e,"index"),i,r);h(s.resolve(e,i.main),i,function(t,n,i){return t?r(t):n?r(null,n,i):void l(s.join(e,"index"),i,r)})});l(s.join(e,"/index"),i,r)}):l(s.join(e,"index"),i,r)})}function f(t,n){function r(e,r,i){return e?t(e):r?t(null,r,i):void f(t,n.slice(1))}if(0===n.length)return t(null,void 0);var i=n[0];l(s.join(i,e),void 0,function(n,o,a){return n?t(n):o?t(null,o,a):void h(s.join(i,e),void 0,r)})}var d=u,y=t||{};if("function"==typeof y&&(d=y,y={}),"string"!=typeof e){var m=new TypeError("Path must be a string.");return n.nextTick(function(){d(m)})}var g=y.isFile||function(e,t){i.stat(e,function(e,n){return e?"ENOENT"===e.code||"ENOTDIR"===e.code?t(null,!1):t(e):t(null,n.isFile()||n.isFIFO())})},v=y.readFile||i.readFile,b=y.extensions||[".js"],x=y.basedir||s.dirname(o());if(y.paths=y.paths||[],/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(e)){var w=s.resolve(x,e);".."!==e&&"/"!==e.slice(-1)||(w+="/"),/\/$/.test(e)&&w===x?h(w,y.package,c):l(w,y.package,c)}else!function(e,t,n){f(n,a(t,y))}(0,x,function(t,n,i){if(t)d(t);else if(n)d(null,n,i);else{if(r[e])return d(null,e);var s=new Error("Cannot find module '"+e+"' from '"+x+"'");s.code="MODULE_NOT_FOUND",d(s)}})}}).call(this,e("_process"))},{"./caller.js":35,"./core":37,"./node-modules-paths.js":38,_process:32,fs:7,path:30}],35:[function(e,t,n){t.exports=function(){var e=Error.prepareStackTrace;Error.prepareStackTrace=function(e,t){return t};var t=(new Error).stack;return Error.prepareStackTrace=e,t[2].getFileName()}},{}],36:[function(e,t,n){t.exports={assert:!0,buffer_ieee754:"< 0.9.7",buffer:!0,child_process:!0,cluster:!0,console:!0,constants:!0,crypto:!0,_debugger:"< 8",dgram:!0,dns:!0,domain:!0,events:!0,freelist:"< 6",fs:!0,http:!0,http2:">= 8.8",https:!0,_http_server:">= 0.11",_linklist:"< 8",module:!0,net:!0,os:!0,path:!0,perf_hooks:">= 8.5",process:">= 1",punycode:!0,querystring:!0,readline:!0,repl:!0,stream:!0,string_decoder:!0,sys:!0,timers:!0,tls:!0,tty:!0,url:!0,util:!0,v8:">= 1",vm:!0,zlib:!0}},{}],37:[function(e,t,n){(function(n){function r(e){if(!0===e)return!0;for(var t=e.split(" "),n=t[0],r=t[1].split("."),s=0;s<3;++s){var o=Number(i[s]||0),a=Number(r[s]||0);if(o!==a)return"<"===n?o<a:">="===n&&o>=a}return!1}var i=n.versions&&n.versions.node&&n.versions.node.split(".")||[],s=e("./core.json"),o={};for(var a in s)Object.prototype.hasOwnProperty.call(s,a)&&(o[a]=r(s[a]));t.exports=o}).call(this,e("_process"))},{"./core.json":36,_process:32}],38:[function(e,t,n){var r=e("path"),i=e("fs"),s=r.parse||e("path-parse");t.exports=function(e,t){var n=t&&t.moduleDirectory?[].concat(t.moduleDirectory):["node_modules"],o=r.resolve(e);if(t&&!1===t.preserveSymlinks)try{o=i.realpathSync(o)}catch(e){if("ENOENT"!==e.code)throw e}var a="/";/^([A-Za-z]:)/.test(o)?a="":/^\\\\/.test(o)&&(a="\\\\");for(var u=[o],c=s(o);c.dir!==u[u.length-1];)u.push(c.dir),c=s(c.dir);var l=u.reduce(function(e,t){return e.concat(n.map(function(e){return r.join(a,t,e)}))},[]);return t&&t.paths?l.concat(t.paths):l}},{fs:7,path:30,"path-parse":31}],39:[function(e,t,n){var r=e("./core"),i=e("fs"),s=e("path"),o=e("./caller.js"),a=e("./node-modules-paths.js");t.exports=function(e,t){function n(e){if(l(e))return e;for(var t=0;t<h.length;t++){var n=e+h[t];if(l(n))return n}}function u(e){var t=s.join(e,"/package.json");if(l(t))try{var r=p(t,"UTF8"),i=JSON.parse(r);if(c.packageFilter&&(i=c.packageFilter(i,e)),i.main){"."!==i.main&&"./"!==i.main||(i.main="index");var o=n(s.resolve(e,i.main));if(o)return o;var a=u(s.resolve(e,i.main));if(a)return a}}catch(e){}return n(s.join(e,"/index"))}if("string"!=typeof e)throw new TypeError("Path must be a string.");var c=t||{},l=c.isFile||function(e){try{var t=i.statSync(e)}catch(e){if(e&&("ENOENT"===e.code||"ENOTDIR"===e.code))return!1;throw e}return t.isFile()||t.isFIFO()},p=c.readFileSync||i.readFileSync,h=c.extensions||[".js"],f=c.basedir||s.dirname(o());if(c.paths=c.paths||[],/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(e)){var d=s.resolve(f,e);".."!==e&&"/"!==e.slice(-1)||(d+="/");var y=n(d)||u(d);if(y)return y}else{var m=function(e,t){for(var r=a(t,c),i=0;i<r.length;i++){var o=r[i],l=n(s.join(o,"/",e));if(l)return l;var p=u(s.join(o,"/",e));if(p)return p}}(e,f);if(m)return m}if(r[e])return e;var g=new Error("Cannot find module '"+e+"' from '"+f+"'");throw g.code="MODULE_NOT_FOUND",g}},{"./caller.js":35,"./core":37,"./node-modules-paths.js":38,fs:7,path:30}],nodent:[function(require,module,exports){(function(process,global,__dirname){"use strict";function copyObj(e){var t={};return e.forEach(function(e){if(e&&"object"==typeof e)for(var n in e)t[n]=e[n]}),t}function globalErrorHandler(e){throw e}function isDirective(e){return"ExpressionStatement"===e.type&&("StringLiteral"===e.expression.type||"Literal"===e.expression.type&&"string"==typeof e.expression.value)}function parseCompilerOptions(code,log,filename){log||(log=console.warn.bind(console));var regex,set,parseOpts={};if("string"==typeof code)(regex=code.match(useDirective))&&(set=regex[1]||"default");else for(var i=0;i<code.body.length&&isDirective(code.body[i].type);i++){var test="'"+code.body[i].value+"'";if(regex=test.match(useDirective)){set=regex[1]||"default";break}}if(!regex){if(!defaultCodeGenOpts.noUseDirective)return null;set="default",regex=[null,null,"{}"]}if(set)try{filename?require("fs").lstatSync(filename).isDirectory()||(filename=require("path").dirname(filename)):filename=require("path").resolve(".");var packagePath=require("resolve").sync("package.json",{moduleDirectory:[""],extensions:[""],basedir:filename}),packageOptions=JSON.parse(fs.readFileSync(packagePath)).nodent.directive[set]}catch(e){}try{parseOpts=copyObj([optionSets[set],packageOptions,regex[2]&&JSON.parse(regex[2])])}catch(e){log("Invalid literal compiler option: "+(regex&&regex[0]||"<no options found>"))}return Object.keys(hostOptions).forEach(function(k){"host"===parseOpts[k]&&(parseOpts[k]=function(){try{return eval(hostOptions[k]),!0}catch(e){return!1}}())}),parseOpts.promises||parseOpts.es7||parseOpts.generators||parseOpts.engine?((parseOpts.promises||parseOpts.es7)&&parseOpts.generators&&(log("No valid 'use nodent' directive, assumed -es7 mode"),parseOpts=optionSets.es7),(parseOpts.generators||parseOpts.engine)&&(parseOpts.promises=!0),parseOpts.promises&&(parseOpts.es7=!0),parseOpts):null}function stripBOM(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),"#!"===e.substring(0,2)&&(e="//"+e),e}function compileNodentedFile(e,t){return t=t||e.log,function(n,r,i){var s=stripBOM(fs.readFileSync(r,"utf8")),o=e.parse(s,r,i);i=i||parseCompilerOptions(o.ast,t,r),e.asynchronize(o,void 0,i,t),e.prettyPrint(o,i),n._compile(o.code,o.filename)}}function asyncify(e){return e=e||Thenable,function(t,n,r){if(Array.isArray(n)){var i=n;n=function(e,t){return i.indexOf(e)>=0}}else n=n||function(e,t){return!(e.match(/Sync$/)&&e.replace(/Sync$/,"")in t)};r||(r="");var s=Object.create(t);for(var o in s)!function(){var i=o;try{"function"!=typeof t[i]||s[i+r]&&s[i+r].isAsync||!n(i,s)||(s[i+r]=function(){var n=Array.prototype.slice.call(arguments);return new e(function(e,r){var s=function(t,n){if(t)return r(t);switch(arguments.length){case 0:return e();case 2:return e(n);default:return e(Array.prototype.slice.call(arguments,1))}};n.length>t[i].length?n.push(s):n[t[i].length-1]=s;t[i].apply(t,n)})},s[i+r].isAsync=!0)}catch(e){}}();return s.super=t,s}}function generateRequestHandler(e,t,n){var r={},i=this;t||(t=/\.njs$/),n?n.compiler||(n.compiler={}):n={compiler:{}};var s=copyObj([NodentCompiler.initialCodeGenOpts,n.compiler]);return function(o,a,u){function c(e){a.statusCode=500,a.write(e.toString()),a.end()}if(r[o.url])return a.setHeader("Content-Type",r[o.url].contentType),n.setHeaders&&n.setHeaders(a),a.write(r[o.url].output),void a.end();if(!(o.url.match(t)||n.htmlScriptRegex&&o.url.match(n.htmlScriptRegex)))return u&&u();var l=e+o.url;if(n.extensions&&!fs.existsSync(l))for(var p=0;p<n.extensions.length;p++)if(fs.existsSync(l+"."+n.extensions[p])){l=l+"."+n.extensions[p];break}fs.readFile(l,function(e,t){if(e)return c(e);try{var u,l;n.htmlScriptRegex&&o.url.match(n.htmlScriptRegex)?(u=require("./htmlScriptParser")(i,t.toString(),o.url,n),l="text/html"):(n.runtime?(u="Function.prototype."+s.$asyncbind+" = "+$asyncbind.toString()+";",s.generators&&(u+="Function.prototype."+s.$asyncspawn+" = "+$asyncspawn.toString()+";"),s.wrapAwait&&!s.promises&&(u+="Object."+s.$makeThenable+" = "+Thenable.resolve.toString()+";"),s.mapStartLine=u.split("\n").length,u+="\n"):u="",u+=i.compile(t.toString(),o.url,null,s).code,l="application/javascript"),a.setHeader("Content-Type",l),n.enableCache&&(r[o.url]={output:u,contentType:l}),n.setHeaders&&n.setHeaders(a),a.write(u),a.end()}catch(e){return c(e)}})}}function requireCover(e,t){t=t||{};var n=e+"|"+Object.keys(t).sort().reduce(function(e,n){return e+n+JSON.stringify(t[n])},"");return this.covers[n]||(e.indexOf("/")>=0?this.covers[n]=require(e):this.covers[n]=require(__dirname+"/covers/"+e)),this.covers[n](this,t)}function prepareMappedStackTrace(e,t){return e+t.map(function(e){var t=e.getFileName();if(t&&NodentCompiler.prototype.smCache[t]){var n=NodentCompiler.prototype.smCache[t].smc.originalPositionFor({line:e.getLineNumber(),column:e.getColumnNumber()});if(n&&n.line){var r=e.toString();return"\n at "+r.substring(0,r.length-1)+" => …"+n.source+":"+n.line+":"+n.column+(e.getFunctionName()?")":"")}}return"\n at "+e}).join("")}function setGlobalEnvironment(e){var t={};t[defaultCodeGenOpts.$asyncbind]={value:$asyncbind,writable:!0,enumerable:!1,configurable:!0},t[defaultCodeGenOpts.$asyncspawn]={value:$asyncspawn,writable:!0,enumerable:!1,configurable:!0};try{Object.defineProperties(Function.prototype,t)}catch(t){e.log("Function prototypes already assigned: ",t.messsage)}defaultCodeGenOpts[defaultCodeGenOpts.$error]in global||(global[defaultCodeGenOpts[defaultCodeGenOpts.$error]]=globalErrorHandler),e.augmentObject&&Object.defineProperties(Object.prototype,{asyncify:{value:function(e,t,n){return asyncify(e)(this,t,n)},writable:!0,configurable:!0},isThenable:{value:function(){return Thenable.isThenable(this)},writable:!0,configurable:!0}}),Object[defaultCodeGenOpts.$makeThenable]=Thenable.resolve}function initialize(e){function t(n,r){if(!r.match(/nodent\/nodent\.js$/)){if(r.match(/node_modules\/nodent\/.*\.js$/))return stdJSLoader(n,r);for(var o=0;o<i.length;o++)if(r.slice(0,i[o].path.length)==i[o].path){if(i[o].jsCompiler){if(i[o].jsCompiler===t)break;return i[o].jsCompiler.apply(this,arguments)}return stdJSLoader(n,r)}var a=parseCompilerOptions(stripBOM(fs.readFileSync(r,"utf8")),e.log,r);return a?s(n,r,a):stdJSLoader(n,r)}var u={path:r.replace(/\/node_modules\/nodent\/nodent\.js$/,"")};u.path&&(u.version=JSON.parse(fs.readFileSync(r.replace(/nodent\.js$/,"package.json"))).version,stdJSLoader(n,r),function(e,t){e=e.split("."),t=t.split(".");for(var n=0;n<3;n++){if(e[n]<t[n])return-1;if(e[n]>t[n])return 1}return 0}(u.version,NodentCompiler.prototype.version)<0&&(u.originalNodentLoader=n.exports,n.exports=function(){var t=require.extensions[".js"],n=u.originalNodentLoader.apply(this,arguments);return u.jsCompiler=require.extensions[".js"],require.extensions[".js"]=t,setGlobalEnvironment(e),n},Object.keys(u.originalNodentLoader).forEach(function(e){n.exports[e]=u.originalNodentLoader[e]}),i.push(u),i=i.sort(function(e,t){return t.path.length-e.path.length})))}function n(t){if(Array.isArray(t))return t.forEach(n);if(require.extensions[t]){Object.keys(e).filter(function(t){return compiler[t]!=e[t]}).length&&e.log("File extension "+t+" already configured for async/await compilation.")}require.extensions[t]=compileNodentedFile(compiler,e.log)}if(e){for(var r in e)if("use"!==r&&!config.hasOwnProperty(r))throw new Error("NoDent: unknown option: "+r+"="+JSON.stringify(e[r]))}else e={};compiler?compiler.setOptions(e):(Object.keys(config).forEach(function(t){t in e||(e[t]=config[t])}),compiler=new NodentCompiler(e)),e.dontMapStackTraces||(Error.prepareStackTrace=prepareMappedStackTrace),setGlobalEnvironment(e);var i=[];if(!e.dontInstallRequireHook){if(!stdJSLoader){stdJSLoader=require.extensions[".js"];var s=compileNodentedFile(compiler,e.log);require.extensions[".js"]=t}e.extension&&n(e.extension)}return e.use&&(Array.isArray(e.use)?(e.log("Warning: nodent({use:[...]}) is deprecated. Use nodent.require(module,options)\n"+(new Error).stack.split("\n")[2]),e.use.length&&e.use.forEach(function(e){compiler[e]=compiler.require(e)})):(e.log("Warning: nodent({use:{...}}) is deprecated. Use nodent.require(module,options)\n"+(new Error).stack.split("\n")[2]),Object.keys(e.use).forEach(function(t){compiler[t]=compiler.require(t,e.use[t])}))),compiler}function runFromCLI(){function e(e,n){try{var s,o;if(r.fromast){if(e=JSON.parse(e),s={origCode:"",filename:t,ast:e},!(o=parseCompilerOptions(e,i.log))){var a=r.use?'"use nodent-'+r.use+'";':'"use nodent";';o=parseCompilerOptions(a,i.log),console.warn("/* "+t+": No 'use nodent*' directive, assumed "+a+" */")}}else(o=parseCompilerOptions(r.use?'"use nodent-'+r.use+'";':e,i.log))||(o=parseCompilerOptions('"use nodent";',i.log),r.dest||console.warn("/* "+t+": 'use nodent*' directive missing/ignored, assumed 'use nodent;' */")),s=i.parse(e,t,o);if(r.parseast||r.pretty||i.asynchronize(s,void 0,o,i.log),i.prettyPrint(s,o),r.out||r.pretty||r.dest){if(r.dest&&!n)throw new Error("Can't write unknown file to "+r.dest);var u="";r.runtime&&(u+="Function.prototype.$asyncbind = "+Function.prototype.$asyncbind.toString()+";\n",u+="global.$error = global.$error || "+global.$error.toString()+";\n"),u+=s.code,n&&r.dest?(fs.writeFileSync(r.dest+n,u),console.log("Compiled",r.dest+n)):console.log(u)}(r.minast||r.parseast)&&console.log(JSON.stringify(s.ast,function(e,t){return"$"===e[0]||e.match(/^(start|end|loc)$/)?void 0:t},2,null)),r.ast&&console.log(JSON.stringify(s.ast,function(e,t){return"$"===e[0]?void 0:t},0)),r.exec&&new Function(s.code)()}catch(e){console.error(e)}}var t,n=require("path"),r=(process.env.NODENT_OPTS&&JSON.parse(process.env.NODENT_OPTS),function(e){for(var t=[],n=e||2;n<process.argv.length;n++)if("--"===process.argv[n].slice(0,2)){var r=process.argv[n].slice(2).split("=");t[r[0]]=r[1]||!0}else t.push(process.argv[n]);return t}());initialize.setDefaultCompileOptions({sourcemap:r.sourcemap,wrapAwait:r.wrapAwait,lazyThenables:r.lazyThenables,noRuntime:r.noruntime,es6target:r.es6target,parser:r.noextensions?{noNodentExtensions:!0}:void 0});var i=initialize({augmentObject:!0});if(!(r.fromast||r.parseast||r.pretty||r.out||r.dest||r.ast||r.minast||r.exec))try{var s=n.resolve(r[0]);return require(s)}catch(e){throw e&&(e.message=r[0]+": "+e.message),e}if(0==r.length||"-"===r[0])return t="(stdin)",function(e){return new Thenable(function(t,n){var r=[];e.on("data",function(e){r.push(e)}),e.on("end",function(){var e=r.map(function(e){return e.toString()}).join("");return t(e)}),e.on("error",n)}.$asyncbind(this))}(process.stdin).then(e,globalErrorHandler);for(var o=0;o<r.length;o++)t=n.resolve(r[o]),e(stripBOM(fs.readFileSync(t,"utf8")),r[o])}var stdJSLoader,fs=require("fs"),NodentCompiler=require("nodent-compiler"),config={log:function(e){console.warn("Nodent: "+e)},augmentObject:!1,extension:".njs",dontMapStackTraces:!1,asyncStackTrace:!1,babelTree:!1,dontInstallRequireHook:!1},defaultCodeGenOpts=Object.create(NodentCompiler.initialCodeGenOpts,{es7:{value:!0,writable:!0,enumerable:!0}}),optionSets={default:defaultCodeGenOpts,es7:Object.create(defaultCodeGenOpts),promise:Object.create(defaultCodeGenOpts,{promises:{value:!0,writable:!0,enumerable:!0}}),generator:Object.create(defaultCodeGenOpts,{generators:{value:!0,writable:!0,enumerable:!0},es7:{value:!1,writable:!0,enumerable:!0}}),engine:Object.create(defaultCodeGenOpts,{engine:{value:!0,writable:!0,enumerable:!0},promises:{value:!0,writable:!0,enumerable:!0}}),host:Object.create(defaultCodeGenOpts,{promises:{value:"host",writable:!0,enumerable:!0},es6target:{value:"host",writable:!0,enumerable:!0},engine:{value:"host",writable:!0,enumerable:!0}})};optionSets.promises=optionSets.promise,optionSets.generators=optionSets.generator;var useDirective=/^\s*['"]use\s+nodent-?([a-zA-Z0-9]*)?(\s*.*)?['"]\s*;/,runtimes=require("nodent-runtime"),$asyncbind=runtimes.$asyncbind,$asyncspawn=runtimes.$asyncspawn,Thenable=$asyncbind.Thenable,hostOptions={promises:"Promise",es6target:"()=>0",engine:"(async ()=>0)",noRuntime:"Promise"};NodentCompiler.prototype.Thenable=Thenable,NodentCompiler.prototype.EagerThenable=$asyncbind.EagerThenableFactory,NodentCompiler.prototype.asyncify=asyncify,NodentCompiler.prototype.require=requireCover,NodentCompiler.prototype.generateRequestHandler=generateRequestHandler,NodentCompiler.prototype.$asyncspawn=$asyncspawn,NodentCompiler.prototype.$asyncbind=$asyncbind,NodentCompiler.prototype.parseCompilerOptions=parseCompilerOptions,$asyncbind.call($asyncbind);var compiler;initialize.setDefaultCompileOptions=function(e,t){return e&&Object.keys(e).forEach(function(t){if(!(t in defaultCodeGenOpts))throw new Error("NoDent: unknown compiler option: "+t);defaultCodeGenOpts[t]=e[t]}),t&&Object.keys(t).forEach(function(e){if(!(e in t))throw new Error("NoDent: unknown configuration option: "+e);config[e]=t[e]}),initialize},initialize.setCompileOptions=function(e,t){return optionSet[e]=optionSet[e]||copyObj([defaultCodeGenOpts]),t&&Object.keys(t).forEach(function(n){if(!(n in defaultCodeGenOpts))throw new Error("NoDent: unknown compiler option: "+n);optionSet[e][n]=t[n]}),initialize},initialize.asyncify=asyncify,initialize.Thenable=$asyncbind.Thenable,initialize.EagerThenable=$asyncbind.EagerThenableFactory,module.exports=initialize,require.main===module&&process.argv.length>=3&&runFromCLI()}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},"/node_modules/nodent")},{"./htmlScriptParser":29,_process:32,fs:7,"nodent-compiler":10,"nodent-runtime":26,path:30,resolve:33}]},{},[]); \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/ajv/dist/regenerator.min.js b/tools/node_modules/eslint/node_modules/ajv/dist/regenerator.min.js
new file mode 100644
index 0000000000..0b05fb9cf6
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/dist/regenerator.min.js
@@ -0,0 +1,2 @@
+/* regenerator 0.10.0: Source transformer enabling ECMAScript 6 generator functions (yield) in JavaScript-of-today (ES5) */
+require=function e(t,r,n){function i(a,o){if(!r[a]){if(!t[a]){var u="function"==typeof require&&require;if(!o&&u)return u(a,!0);if(s)return s(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[a]={exports:{}};t[a][0].call(c.exports,function(e){var r=t[a][1][e];return i(r||e)},c,c.exports,e,t,r,n)}return r[a].exports}for(var s="function"==typeof require&&require,a=0;a<n.length;a++)i(n[a]);return i}({1:[function(e,t,r){(function(r){"use strict";function n(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,s=Math.min(r,n);i<s;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0}function i(e){return r.Buffer&&"function"==typeof r.Buffer.isBuffer?r.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}function s(e){return Object.prototype.toString.call(e)}function a(e){return!i(e)&&("function"==typeof r.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer))))}function o(e){if(g.isFunction(e)){if(x)return e.name;var t=e.toString().match(A);return t&&t[1]}}function u(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function l(e){if(x||!g.isFunction(e))return g.inspect(e);var t=o(e);return"[Function"+(t?": "+t:"")+"]"}function c(e,t,r,n,i){throw new E.AssertionError({message:r,actual:e,expected:t,operator:n,stackStartFunction:i})}function p(e,t){e||c(e,!0,t,"==",E.ok)}function h(e,t,r,o){if(e===t)return!0;if(i(e)&&i(t))return 0===n(e,t);if(g.isDate(e)&&g.isDate(t))return e.getTime()===t.getTime();if(g.isRegExp(e)&&g.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(a(e)&&a(t)&&s(e)===s(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===n(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(i(e)!==i(t))return!1;var u=(o=o||{actual:[],expected:[]}).actual.indexOf(e);return-1!==u&&u===o.expected.indexOf(t)||(o.actual.push(e),o.expected.push(t),function(e,t,r,n){if(null===e||void 0===e||null===t||void 0===t)return!1;if(g.isPrimitive(e)||g.isPrimitive(t))return e===t;if(r&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var i=f(e),s=f(t);if(i&&!s||!i&&s)return!1;if(i)return e=v.call(e),t=v.call(t),h(e,t,r);var a,o,u=D(e),l=D(t);if(u.length!==l.length)return!1;for(u.sort(),l.sort(),o=u.length-1;o>=0;o--)if(u[o]!==l[o])return!1;for(o=u.length-1;o>=0;o--)if(a=u[o],!h(e[a],t[a],r,n))return!1;return!0}(e,t,r,o))}return r?e===t:e==t}function f(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function d(e,t,r){h(e,t,!0)&&c(e,t,r,"notDeepStrictEqual",d)}function m(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function y(e,t,r,n){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&c(i,r,"Missing expected exception"+n);var s="string"==typeof n,a=!e&&g.isError(i),o=!e&&i&&!r;if((a&&s&&m(i,r)||o)&&c(i,r,"Got unwanted exception"+n),e&&i&&r&&!m(i,r)||!e&&i)throw i}var g=e("util/"),b=Object.prototype.hasOwnProperty,v=Array.prototype.slice,x="foo"===function(){}.name,E=t.exports=p,A=/\s*function\s+([^\(\s]*)\s*/;E.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return u(l(e.actual),128)+" "+e.operator+" "+u(l(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||c;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,i=o(t),s=n.indexOf("\n"+i);if(s>=0){var a=n.indexOf("\n",s+1);n=n.substring(a+1)}this.stack=n}}},g.inherits(E.AssertionError,Error),E.fail=c,E.ok=p,E.equal=function(e,t,r){e!=t&&c(e,t,r,"==",E.equal)},E.notEqual=function(e,t,r){e==t&&c(e,t,r,"!=",E.notEqual)},E.deepEqual=function(e,t,r){h(e,t,!1)||c(e,t,r,"deepEqual",E.deepEqual)},E.deepStrictEqual=function(e,t,r){h(e,t,!0)||c(e,t,r,"deepStrictEqual",E.deepStrictEqual)},E.notDeepEqual=function(e,t,r){h(e,t,!1)&&c(e,t,r,"notDeepEqual",E.notDeepEqual)},E.notDeepStrictEqual=d,E.strictEqual=function(e,t,r){e!==t&&c(e,t,r,"===",E.strictEqual)},E.notStrictEqual=function(e,t,r){e===t&&c(e,t,r,"!==",E.notStrictEqual)},E.throws=function(e,t,r){y(!0,e,t,r)},E.doesNotThrow=function(e,t,r){y(!1,e,t,r)},E.ifError=function(e){if(e)throw e};var D=Object.keys||function(e){var t=[];for(var r in e)b.call(e,r)&&t.push(r);return t}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"util/":613}],2:[function(e,t,r){t.exports=function(t){t.use(e("./es7"));var r=t.use(e("../lib/types")),n=t.use(e("../lib/shared")).defaults,i=r.Type.def,s=r.Type.or;i("Noop").bases("Node").build(),i("DoExpression").bases("Expression").build("body").field("body",[i("Statement")]),i("Super").bases("Expression").build(),i("BindExpression").bases("Expression").build("object","callee").field("object",s(i("Expression"),null)).field("callee",i("Expression")),i("Decorator").bases("Node").build("expression").field("expression",i("Expression")),i("Property").field("decorators",s([i("Decorator")],null),n.null),i("MethodDefinition").field("decorators",s([i("Decorator")],null),n.null),i("MetaProperty").bases("Expression").build("meta","property").field("meta",i("Identifier")).field("property",i("Identifier")),i("ParenthesizedExpression").bases("Expression").build("expression").field("expression",i("Expression")),i("ImportSpecifier").bases("ModuleSpecifier").build("imported","local").field("imported",i("Identifier")),i("ImportDefaultSpecifier").bases("ModuleSpecifier").build("local"),i("ImportNamespaceSpecifier").bases("ModuleSpecifier").build("local"),i("ExportDefaultDeclaration").bases("Declaration").build("declaration").field("declaration",s(i("Declaration"),i("Expression"))),i("ExportNamedDeclaration").bases("Declaration").build("declaration","specifiers","source").field("declaration",s(i("Declaration"),null)).field("specifiers",[i("ExportSpecifier")],n.emptyArray).field("source",s(i("Literal"),null),n.null),i("ExportSpecifier").bases("ModuleSpecifier").build("local","exported").field("exported",i("Identifier")),i("ExportNamespaceSpecifier").bases("Specifier").build("exported").field("exported",i("Identifier")),i("ExportDefaultSpecifier").bases("Specifier").build("exported").field("exported",i("Identifier")),i("ExportAllDeclaration").bases("Declaration").build("exported","source").field("exported",s(i("Identifier"),null)).field("source",i("Literal")),i("CommentBlock").bases("Comment").build("value","leading","trailing"),i("CommentLine").bases("Comment").build("value","leading","trailing")}},{"../lib/shared":18,"../lib/types":19,"./es7":7}],3:[function(e,t,r){t.exports=function(t){t.use(e("./babel")),t.use(e("./flow"));var r=t.use(e("../lib/types")),n=t.use(e("../lib/shared")).defaults,i=r.Type.def,s=r.Type.or;i("Directive").bases("Node").build("value").field("value",i("DirectiveLiteral")),i("DirectiveLiteral").bases("Node","Expression").build("value").field("value",String,n["use strict"]),i("BlockStatement").bases("Statement").build("body").field("body",[i("Statement")]).field("directives",[i("Directive")],n.emptyArray),i("Program").bases("Node").build("body").field("body",[i("Statement")]).field("directives",[i("Directive")],n.emptyArray),i("StringLiteral").bases("Literal").build("value").field("value",String),i("NumericLiteral").bases("Literal").build("value").field("value",Number),i("NullLiteral").bases("Literal").build(),i("BooleanLiteral").bases("Literal").build("value").field("value",Boolean),i("RegExpLiteral").bases("Literal").build("pattern","flags").field("pattern",String).field("flags",String);var a=s(i("Property"),i("ObjectMethod"),i("ObjectProperty"),i("SpreadProperty"));i("ObjectExpression").bases("Expression").build("properties").field("properties",[a]),i("ObjectMethod").bases("Node","Function").build("kind","key","params","body","computed").field("kind",s("method","get","set")).field("key",s(i("Literal"),i("Identifier"),i("Expression"))).field("params",[i("Pattern")]).field("body",i("BlockStatement")).field("computed",Boolean,n.false).field("generator",Boolean,n.false).field("async",Boolean,n.false).field("decorators",s([i("Decorator")],null),n.null),i("ObjectProperty").bases("Node").build("key","value").field("key",s(i("Literal"),i("Identifier"),i("Expression"))).field("value",s(i("Expression"),i("Pattern"))).field("computed",Boolean,n.false);var o=s(i("MethodDefinition"),i("VariableDeclarator"),i("ClassPropertyDefinition"),i("ClassProperty"),i("ClassMethod"));i("ClassBody").bases("Declaration").build("body").field("body",[o]),i("ClassMethod").bases("Declaration","Function").build("kind","key","params","body","computed","static").field("kind",s("get","set","method","constructor")).field("key",s(i("Literal"),i("Identifier"),i("Expression"))).field("params",[i("Pattern")]).field("body",i("BlockStatement")).field("computed",Boolean,n.false).field("static",Boolean,n.false).field("generator",Boolean,n.false).field("async",Boolean,n.false).field("decorators",s([i("Decorator")],null),n.null);var u=s(i("Property"),i("PropertyPattern"),i("SpreadPropertyPattern"),i("SpreadProperty"),i("ObjectProperty"),i("RestProperty"));i("ObjectPattern").bases("Pattern").build("properties").field("properties",[u]).field("decorators",s([i("Decorator")],null),n.null),i("SpreadProperty").bases("Node").build("argument").field("argument",i("Expression")),i("RestProperty").bases("Node").build("argument").field("argument",i("Expression")),i("ForAwaitStatement").bases("Statement").build("left","right","body").field("left",s(i("VariableDeclaration"),i("Expression"))).field("right",i("Expression")).field("body",i("Statement")),i("Import").bases("Expression").build()}},{"../lib/shared":18,"../lib/types":19,"./babel":2,"./flow":9}],4:[function(e,t,r){t.exports=function(t){var r=t.use(e("../lib/types")).Type,n=r.def,i=r.or,s=t.use(e("../lib/shared")),a=s.defaults,o=s.geq;n("Printable").field("loc",i(n("SourceLocation"),null),a.null,!0),n("Node").bases("Printable").field("type",String).field("comments",i([n("Comment")],null),a.null,!0),n("SourceLocation").build("start","end","source").field("start",n("Position")).field("end",n("Position")).field("source",i(String,null),a.null),n("Position").build("line","column").field("line",o(1)).field("column",o(0)),n("File").bases("Node").build("program","name").field("program",n("Program")).field("name",i(String,null),a.null),n("Program").bases("Node").build("body").field("body",[n("Statement")]),n("Function").bases("Node").field("id",i(n("Identifier"),null),a.null).field("params",[n("Pattern")]).field("body",n("BlockStatement")),n("Statement").bases("Node"),n("EmptyStatement").bases("Statement").build(),n("BlockStatement").bases("Statement").build("body").field("body",[n("Statement")]),n("ExpressionStatement").bases("Statement").build("expression").field("expression",n("Expression")),n("IfStatement").bases("Statement").build("test","consequent","alternate").field("test",n("Expression")).field("consequent",n("Statement")).field("alternate",i(n("Statement"),null),a.null),n("LabeledStatement").bases("Statement").build("label","body").field("label",n("Identifier")).field("body",n("Statement")),n("BreakStatement").bases("Statement").build("label").field("label",i(n("Identifier"),null),a.null),n("ContinueStatement").bases("Statement").build("label").field("label",i(n("Identifier"),null),a.null),n("WithStatement").bases("Statement").build("object","body").field("object",n("Expression")).field("body",n("Statement")),n("SwitchStatement").bases("Statement").build("discriminant","cases","lexical").field("discriminant",n("Expression")).field("cases",[n("SwitchCase")]).field("lexical",Boolean,a.false),n("ReturnStatement").bases("Statement").build("argument").field("argument",i(n("Expression"),null)),n("ThrowStatement").bases("Statement").build("argument").field("argument",n("Expression")),n("TryStatement").bases("Statement").build("block","handler","finalizer").field("block",n("BlockStatement")).field("handler",i(n("CatchClause"),null),function(){return this.handlers&&this.handlers[0]||null}).field("handlers",[n("CatchClause")],function(){return this.handler?[this.handler]:[]},!0).field("guardedHandlers",[n("CatchClause")],a.emptyArray).field("finalizer",i(n("BlockStatement"),null),a.null),n("CatchClause").bases("Node").build("param","guard","body").field("param",n("Pattern")).field("guard",i(n("Expression"),null),a.null).field("body",n("BlockStatement")),n("WhileStatement").bases("Statement").build("test","body").field("test",n("Expression")).field("body",n("Statement")),n("DoWhileStatement").bases("Statement").build("body","test").field("body",n("Statement")).field("test",n("Expression")),n("ForStatement").bases("Statement").build("init","test","update","body").field("init",i(n("VariableDeclaration"),n("Expression"),null)).field("test",i(n("Expression"),null)).field("update",i(n("Expression"),null)).field("body",n("Statement")),n("ForInStatement").bases("Statement").build("left","right","body").field("left",i(n("VariableDeclaration"),n("Expression"))).field("right",n("Expression")).field("body",n("Statement")),n("DebuggerStatement").bases("Statement").build(),n("Declaration").bases("Statement"),n("FunctionDeclaration").bases("Function","Declaration").build("id","params","body").field("id",n("Identifier")),n("FunctionExpression").bases("Function","Expression").build("id","params","body"),n("VariableDeclaration").bases("Declaration").build("kind","declarations").field("kind",i("var","let","const")).field("declarations",[n("VariableDeclarator")]),n("VariableDeclarator").bases("Node").build("id","init").field("id",n("Pattern")).field("init",i(n("Expression"),null)),n("Expression").bases("Node","Pattern"),n("ThisExpression").bases("Expression").build(),n("ArrayExpression").bases("Expression").build("elements").field("elements",[i(n("Expression"),null)]),n("ObjectExpression").bases("Expression").build("properties").field("properties",[n("Property")]),n("Property").bases("Node").build("kind","key","value").field("kind",i("init","get","set")).field("key",i(n("Literal"),n("Identifier"))).field("value",n("Expression")),n("SequenceExpression").bases("Expression").build("expressions").field("expressions",[n("Expression")]);var u=i("-","+","!","~","typeof","void","delete");n("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",u).field("argument",n("Expression")).field("prefix",Boolean,a.true);var l=i("==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof","..");n("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",l).field("left",n("Expression")).field("right",n("Expression"));var c=i("=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=");n("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",c).field("left",n("Pattern")).field("right",n("Expression"));var p=i("++","--");n("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",p).field("argument",n("Expression")).field("prefix",Boolean);var h=i("||","&&");n("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",h).field("left",n("Expression")).field("right",n("Expression")),n("ConditionalExpression").bases("Expression").build("test","consequent","alternate").field("test",n("Expression")).field("consequent",n("Expression")).field("alternate",n("Expression")),n("NewExpression").bases("Expression").build("callee","arguments").field("callee",n("Expression")).field("arguments",[n("Expression")]),n("CallExpression").bases("Expression").build("callee","arguments").field("callee",n("Expression")).field("arguments",[n("Expression")]),n("MemberExpression").bases("Expression").build("object","property","computed").field("object",n("Expression")).field("property",i(n("Identifier"),n("Expression"))).field("computed",Boolean,function(){var e=this.property.type;return"Literal"===e||"MemberExpression"===e||"BinaryExpression"===e}),n("Pattern").bases("Node"),n("SwitchCase").bases("Node").build("test","consequent").field("test",i(n("Expression"),null)).field("consequent",[n("Statement")]),n("Identifier").bases("Node","Expression","Pattern").build("name").field("name",String),n("Literal").bases("Node","Expression").build("value").field("value",i(String,Boolean,null,Number,RegExp)).field("regex",i({pattern:String,flags:String},null),function(){if(this.value instanceof RegExp){var e="";return this.value.ignoreCase&&(e+="i"),this.value.multiline&&(e+="m"),this.value.global&&(e+="g"),{pattern:this.value.source,flags:e}}return null}),n("Comment").bases("Printable").field("value",String).field("leading",Boolean,a.true).field("trailing",Boolean,a.false)}},{"../lib/shared":18,"../lib/types":19}],5:[function(e,t,r){t.exports=function(t){t.use(e("./core"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or;n("XMLDefaultDeclaration").bases("Declaration").field("namespace",n("Expression")),n("XMLAnyName").bases("Expression"),n("XMLQualifiedIdentifier").bases("Expression").field("left",i(n("Identifier"),n("XMLAnyName"))).field("right",i(n("Identifier"),n("Expression"))).field("computed",Boolean),n("XMLFunctionQualifiedIdentifier").bases("Expression").field("right",i(n("Identifier"),n("Expression"))).field("computed",Boolean),n("XMLAttributeSelector").bases("Expression").field("attribute",n("Expression")),n("XMLFilterExpression").bases("Expression").field("left",n("Expression")).field("right",n("Expression")),n("XMLElement").bases("XML","Expression").field("contents",[n("XML")]),n("XMLList").bases("XML","Expression").field("contents",[n("XML")]),n("XML").bases("Node"),n("XMLEscape").bases("XML").field("expression",n("Expression")),n("XMLText").bases("XML").field("text",String),n("XMLStartTag").bases("XML").field("contents",[n("XML")]),n("XMLEndTag").bases("XML").field("contents",[n("XML")]),n("XMLPointTag").bases("XML").field("contents",[n("XML")]),n("XMLName").bases("XML").field("contents",i(String,[n("XML")])),n("XMLAttribute").bases("XML").field("value",String),n("XMLCdata").bases("XML").field("contents",String),n("XMLComment").bases("XML").field("contents",String),n("XMLProcessingInstruction").bases("XML").field("target",String).field("contents",i(String,null))}},{"../lib/types":19,"./core":4}],6:[function(e,t,r){t.exports=function(t){t.use(e("./core"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=t.use(e("../lib/shared")).defaults;n("Function").field("generator",Boolean,s.false).field("expression",Boolean,s.false).field("defaults",[i(n("Expression"),null)],s.emptyArray).field("rest",i(n("Identifier"),null),s.null),n("RestElement").bases("Pattern").build("argument").field("argument",n("Pattern")),n("SpreadElementPattern").bases("Pattern").build("argument").field("argument",n("Pattern")),n("FunctionDeclaration").build("id","params","body","generator","expression"),n("FunctionExpression").build("id","params","body","generator","expression"),n("ArrowFunctionExpression").bases("Function","Expression").build("params","body","expression").field("id",null,s.null).field("body",i(n("BlockStatement"),n("Expression"))).field("generator",!1,s.false),n("YieldExpression").bases("Expression").build("argument","delegate").field("argument",i(n("Expression"),null)).field("delegate",Boolean,s.false),n("GeneratorExpression").bases("Expression").build("body","blocks","filter").field("body",n("Expression")).field("blocks",[n("ComprehensionBlock")]).field("filter",i(n("Expression"),null)),n("ComprehensionExpression").bases("Expression").build("body","blocks","filter").field("body",n("Expression")).field("blocks",[n("ComprehensionBlock")]).field("filter",i(n("Expression"),null)),n("ComprehensionBlock").bases("Node").build("left","right","each").field("left",n("Pattern")).field("right",n("Expression")).field("each",Boolean),n("Property").field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("value",i(n("Expression"),n("Pattern"))).field("method",Boolean,s.false).field("shorthand",Boolean,s.false).field("computed",Boolean,s.false),n("PropertyPattern").bases("Pattern").build("key","pattern").field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("pattern",n("Pattern")).field("computed",Boolean,s.false),n("ObjectPattern").bases("Pattern").build("properties").field("properties",[i(n("PropertyPattern"),n("Property"))]),n("ArrayPattern").bases("Pattern").build("elements").field("elements",[i(n("Pattern"),null)]),n("MethodDefinition").bases("Declaration").build("kind","key","value","static").field("kind",i("constructor","method","get","set")).field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("value",n("Function")).field("computed",Boolean,s.false).field("static",Boolean,s.false),n("SpreadElement").bases("Node").build("argument").field("argument",n("Expression")),n("ArrayExpression").field("elements",[i(n("Expression"),n("SpreadElement"),n("RestElement"),null)]),n("NewExpression").field("arguments",[i(n("Expression"),n("SpreadElement"))]),n("CallExpression").field("arguments",[i(n("Expression"),n("SpreadElement"))]),n("AssignmentPattern").bases("Pattern").build("left","right").field("left",n("Pattern")).field("right",n("Expression"));var a=i(n("MethodDefinition"),n("VariableDeclarator"),n("ClassPropertyDefinition"),n("ClassProperty"));n("ClassProperty").bases("Declaration").build("key").field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("computed",Boolean,s.false),n("ClassPropertyDefinition").bases("Declaration").build("definition").field("definition",a),n("ClassBody").bases("Declaration").build("body").field("body",[a]),n("ClassDeclaration").bases("Declaration").build("id","body","superClass").field("id",i(n("Identifier"),null)).field("body",n("ClassBody")).field("superClass",i(n("Expression"),null),s.null),n("ClassExpression").bases("Expression").build("id","body","superClass").field("id",i(n("Identifier"),null),s.null).field("body",n("ClassBody")).field("superClass",i(n("Expression"),null),s.null).field("implements",[n("ClassImplements")],s.emptyArray),n("ClassImplements").bases("Node").build("id").field("id",n("Identifier")).field("superClass",i(n("Expression"),null),s.null),n("Specifier").bases("Node"),n("ModuleSpecifier").bases("Specifier").field("local",i(n("Identifier"),null),s.null).field("id",i(n("Identifier"),null),s.null).field("name",i(n("Identifier"),null),s.null),n("TaggedTemplateExpression").bases("Expression").build("tag","quasi").field("tag",n("Expression")).field("quasi",n("TemplateLiteral")),n("TemplateLiteral").bases("Expression").build("quasis","expressions").field("quasis",[n("TemplateElement")]).field("expressions",[n("Expression")]),n("TemplateElement").bases("Node").build("value","tail").field("value",{cooked:String,raw:String}).field("tail",Boolean)}},{"../lib/shared":18,"../lib/types":19,"./core":4}],7:[function(e,t,r){t.exports=function(t){t.use(e("./es6"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=(r.builtInTypes,t.use(e("../lib/shared")).defaults);n("Function").field("async",Boolean,s.false),n("SpreadProperty").bases("Node").build("argument").field("argument",n("Expression")),n("ObjectExpression").field("properties",[i(n("Property"),n("SpreadProperty"))]),n("SpreadPropertyPattern").bases("Pattern").build("argument").field("argument",n("Pattern")),n("ObjectPattern").field("properties",[i(n("Property"),n("PropertyPattern"),n("SpreadPropertyPattern"))]),n("AwaitExpression").bases("Expression").build("argument","all").field("argument",i(n("Expression"),null)).field("all",Boolean,s.false)}},{"../lib/shared":18,"../lib/types":19,"./es6":6}],8:[function(e,t,r){t.exports=function(t){t.use(e("./es7"));var r=t.use(e("../lib/types")),n=t.use(e("../lib/shared")).defaults,i=r.Type.def,s=r.Type.or;i("VariableDeclaration").field("declarations",[s(i("VariableDeclarator"),i("Identifier"))]),i("Property").field("value",s(i("Expression"),i("Pattern"))),i("ArrayPattern").field("elements",[s(i("Pattern"),i("SpreadElement"),null)]),i("ObjectPattern").field("properties",[s(i("Property"),i("PropertyPattern"),i("SpreadPropertyPattern"),i("SpreadProperty"))]),i("ExportSpecifier").bases("ModuleSpecifier").build("id","name"),i("ExportBatchSpecifier").bases("Specifier").build(),i("ImportSpecifier").bases("ModuleSpecifier").build("id","name"),i("ImportNamespaceSpecifier").bases("ModuleSpecifier").build("id"),i("ImportDefaultSpecifier").bases("ModuleSpecifier").build("id"),i("ExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",s(i("Declaration"),i("Expression"),null)).field("specifiers",[s(i("ExportSpecifier"),i("ExportBatchSpecifier"))],n.emptyArray).field("source",s(i("Literal"),null),n.null),i("ImportDeclaration").bases("Declaration").build("specifiers","source","importKind").field("specifiers",[s(i("ImportSpecifier"),i("ImportNamespaceSpecifier"),i("ImportDefaultSpecifier"))],n.emptyArray).field("source",i("Literal")).field("importKind",s("value","type"),function(){return"value"}),i("Block").bases("Comment").build("value","leading","trailing"),i("Line").bases("Comment").build("value","leading","trailing")}},{"../lib/shared":18,"../lib/types":19,"./es7":7}],9:[function(e,t,r){t.exports=function(t){t.use(e("./es7"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=t.use(e("../lib/shared")).defaults;n("Type").bases("Node"),n("AnyTypeAnnotation").bases("Type").build(),n("EmptyTypeAnnotation").bases("Type").build(),n("MixedTypeAnnotation").bases("Type").build(),n("VoidTypeAnnotation").bases("Type").build(),n("NumberTypeAnnotation").bases("Type").build(),n("NumberLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",Number).field("raw",String),n("NumericLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",Number).field("raw",String),n("StringTypeAnnotation").bases("Type").build(),n("StringLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",String).field("raw",String),n("BooleanTypeAnnotation").bases("Type").build(),n("BooleanLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",Boolean).field("raw",String),n("TypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",n("Type")),n("NullableTypeAnnotation").bases("Type").build("typeAnnotation").field("typeAnnotation",n("Type")),n("NullLiteralTypeAnnotation").bases("Type").build(),n("NullTypeAnnotation").bases("Type").build(),n("ThisTypeAnnotation").bases("Type").build(),n("ExistsTypeAnnotation").bases("Type").build(),n("ExistentialTypeParam").bases("Type").build(),n("FunctionTypeAnnotation").bases("Type").build("params","returnType","rest","typeParameters").field("params",[n("FunctionTypeParam")]).field("returnType",n("Type")).field("rest",i(n("FunctionTypeParam"),null)).field("typeParameters",i(n("TypeParameterDeclaration"),null)),n("FunctionTypeParam").bases("Node").build("name","typeAnnotation","optional").field("name",n("Identifier")).field("typeAnnotation",n("Type")).field("optional",Boolean),n("ArrayTypeAnnotation").bases("Type").build("elementType").field("elementType",n("Type")),n("ObjectTypeAnnotation").bases("Type").build("properties","indexers","callProperties").field("properties",[n("ObjectTypeProperty")]).field("indexers",[n("ObjectTypeIndexer")],s.emptyArray).field("callProperties",[n("ObjectTypeCallProperty")],s.emptyArray).field("exact",Boolean,s.false),n("ObjectTypeProperty").bases("Node").build("key","value","optional").field("key",i(n("Literal"),n("Identifier"))).field("value",n("Type")).field("optional",Boolean).field("variance",i("plus","minus",null),s.null),n("ObjectTypeIndexer").bases("Node").build("id","key","value").field("id",n("Identifier")).field("key",n("Type")).field("value",n("Type")).field("variance",i("plus","minus",null),s.null),n("ObjectTypeCallProperty").bases("Node").build("value").field("value",n("FunctionTypeAnnotation")).field("static",Boolean,s.false),n("QualifiedTypeIdentifier").bases("Node").build("qualification","id").field("qualification",i(n("Identifier"),n("QualifiedTypeIdentifier"))).field("id",n("Identifier")),n("GenericTypeAnnotation").bases("Type").build("id","typeParameters").field("id",i(n("Identifier"),n("QualifiedTypeIdentifier"))).field("typeParameters",i(n("TypeParameterInstantiation"),null)),n("MemberTypeAnnotation").bases("Type").build("object","property").field("object",n("Identifier")).field("property",i(n("MemberTypeAnnotation"),n("GenericTypeAnnotation"))),n("UnionTypeAnnotation").bases("Type").build("types").field("types",[n("Type")]),n("IntersectionTypeAnnotation").bases("Type").build("types").field("types",[n("Type")]),n("TypeofTypeAnnotation").bases("Type").build("argument").field("argument",n("Type")),n("Identifier").field("typeAnnotation",i(n("TypeAnnotation"),null),s.null),n("TypeParameterDeclaration").bases("Node").build("params").field("params",[n("TypeParameter")]),n("TypeParameterInstantiation").bases("Node").build("params").field("params",[n("Type")]),n("TypeParameter").bases("Type").build("name","variance","bound").field("name",String).field("variance",i("plus","minus",null),s.null).field("bound",i(n("TypeAnnotation"),null),s.null),n("Function").field("returnType",i(n("TypeAnnotation"),null),s.null).field("typeParameters",i(n("TypeParameterDeclaration"),null),s.null),n("ClassProperty").build("key","value","typeAnnotation","static").field("value",i(n("Expression"),null)).field("typeAnnotation",i(n("TypeAnnotation"),null)).field("static",Boolean,s.false).field("variance",i("plus","minus",null),s.null),n("ClassImplements").field("typeParameters",i(n("TypeParameterInstantiation"),null),s.null),n("InterfaceDeclaration").bases("Declaration").build("id","body","extends").field("id",n("Identifier")).field("typeParameters",i(n("TypeParameterDeclaration"),null),s.null).field("body",n("ObjectTypeAnnotation")).field("extends",[n("InterfaceExtends")]),n("DeclareInterface").bases("InterfaceDeclaration").build("id","body","extends"),n("InterfaceExtends").bases("Node").build("id").field("id",n("Identifier")).field("typeParameters",i(n("TypeParameterInstantiation"),null)),n("TypeAlias").bases("Declaration").build("id","typeParameters","right").field("id",n("Identifier")).field("typeParameters",i(n("TypeParameterDeclaration"),null)).field("right",n("Type")),n("DeclareTypeAlias").bases("TypeAlias").build("id","typeParameters","right"),n("TypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",n("Expression")).field("typeAnnotation",n("TypeAnnotation")),n("TupleTypeAnnotation").bases("Type").build("types").field("types",[n("Type")]),n("DeclareVariable").bases("Statement").build("id").field("id",n("Identifier")),n("DeclareFunction").bases("Statement").build("id").field("id",n("Identifier")),n("DeclareClass").bases("InterfaceDeclaration").build("id"),n("DeclareModule").bases("Statement").build("id","body").field("id",i(n("Identifier"),n("Literal"))).field("body",n("BlockStatement")),n("DeclareModuleExports").bases("Statement").build("typeAnnotation").field("typeAnnotation",n("Type")),n("DeclareExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",i(n("DeclareVariable"),n("DeclareFunction"),n("DeclareClass"),n("Type"),null)).field("specifiers",[i(n("ExportSpecifier"),n("ExportBatchSpecifier"))],s.emptyArray).field("source",i(n("Literal"),null),s.null),n("DeclareExportAllDeclaration").bases("Declaration").build("source").field("source",i(n("Literal"),null),s.null)}},{"../lib/shared":18,"../lib/types":19,"./es7":7}],10:[function(e,t,r){t.exports=function(t){t.use(e("./es7"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=t.use(e("../lib/shared")).defaults;n("JSXAttribute").bases("Node").build("name","value").field("name",i(n("JSXIdentifier"),n("JSXNamespacedName"))).field("value",i(n("Literal"),n("JSXExpressionContainer"),null),s.null),n("JSXIdentifier").bases("Identifier").build("name").field("name",String),n("JSXNamespacedName").bases("Node").build("namespace","name").field("namespace",n("JSXIdentifier")).field("name",n("JSXIdentifier")),n("JSXMemberExpression").bases("MemberExpression").build("object","property").field("object",i(n("JSXIdentifier"),n("JSXMemberExpression"))).field("property",n("JSXIdentifier")).field("computed",Boolean,s.false);var a=i(n("JSXIdentifier"),n("JSXNamespacedName"),n("JSXMemberExpression"));n("JSXSpreadAttribute").bases("Node").build("argument").field("argument",n("Expression"));var o=[i(n("JSXAttribute"),n("JSXSpreadAttribute"))];n("JSXExpressionContainer").bases("Expression").build("expression").field("expression",n("Expression")),n("JSXElement").bases("Expression").build("openingElement","closingElement","children").field("openingElement",n("JSXOpeningElement")).field("closingElement",i(n("JSXClosingElement"),null),s.null).field("children",[i(n("JSXElement"),n("JSXExpressionContainer"),n("JSXText"),n("Literal"))],s.emptyArray).field("name",a,function(){return this.openingElement.name},!0).field("selfClosing",Boolean,function(){return this.openingElement.selfClosing},!0).field("attributes",o,function(){return this.openingElement.attributes},!0),n("JSXOpeningElement").bases("Node").build("name","attributes","selfClosing").field("name",a).field("attributes",o,s.emptyArray).field("selfClosing",Boolean,s.false),n("JSXClosingElement").bases("Node").build("name").field("name",a),n("JSXText").bases("Literal").build("value").field("value",String),n("JSXEmptyExpression").bases("Expression").build()}},{"../lib/shared":18,"../lib/types":19,"./es7":7}],11:[function(e,t,r){t.exports=function(t){t.use(e("./core"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=t.use(e("../lib/shared")),a=s.geq,o=s.defaults;n("Function").field("body",i(n("BlockStatement"),n("Expression"))),n("ForInStatement").build("left","right","body","each").field("each",Boolean,o.false),n("ForOfStatement").bases("Statement").build("left","right","body").field("left",i(n("VariableDeclaration"),n("Expression"))).field("right",n("Expression")).field("body",n("Statement")),n("LetStatement").bases("Statement").build("head","body").field("head",[n("VariableDeclarator")]).field("body",n("Statement")),n("LetExpression").bases("Expression").build("head","body").field("head",[n("VariableDeclarator")]).field("body",n("Expression")),n("GraphExpression").bases("Expression").build("index","expression").field("index",a(0)).field("expression",n("Literal")),n("GraphIndexExpression").bases("Expression").build("index").field("index",a(0))}},{"../lib/shared":18,"../lib/types":19,"./core":4}],12:[function(e,t,r){t.exports=function(t){function r(e){var t=n.indexOf(e);return-1===t&&(t=n.length,n.push(e),i[t]=e(s)),i[t]}var n=[],i=[],s={};s.use=r;var a=r(e("./lib/types"));t.forEach(r),a.finalize();var o={Type:a.Type,builtInTypes:a.builtInTypes,namedTypes:a.namedTypes,builders:a.builders,defineMethod:a.defineMethod,getFieldNames:a.getFieldNames,getFieldValue:a.getFieldValue,eachField:a.eachField,someField:a.someField,getSupertypeNames:a.getSupertypeNames,astNodesAreEquivalent:r(e("./lib/equiv")),finalize:a.finalize,Path:r(e("./lib/path")),NodePath:r(e("./lib/node-path")),PathVisitor:r(e("./lib/path-visitor")),use:r};return o.visit=o.PathVisitor.visit,o}},{"./lib/equiv":13,"./lib/node-path":14,"./lib/path":16,"./lib/path-visitor":15,"./lib/types":19}],13:[function(e,t,r){t.exports=function(t){function r(e,t,r){return u.check(r)?r.length=0:r=null,i(e,t,r)}function n(e){return/[_$a-z][_$a-z0-9]*/i.test(e)?"."+e:"["+JSON.stringify(e)+"]"}function i(e,t,r){return e===t||(u.check(e)?function(e,t,r){u.assert(e);var n=e.length;if(!u.check(t)||t.length!==n)return r&&r.push("length"),!1;for(var s=0;s<n;++s){if(r&&r.push(s),s in e!=s in t)return!1;if(!i(e[s],t[s],r))return!1;if(r){var a=r.pop();if(a!==s)throw new Error(""+a)}}return!0}(e,t,r):l.check(e)?function(e,t,r){if(l.assert(e),!l.check(t))return!1;if(e.type!==t.type)return r&&r.push("type"),!1;var n=a(e),s=n.length,u=a(t),c=u.length;if(s===c){for(var p=0;p<s;++p){var f=n[p],d=o(e,f),m=o(t,f);if(r&&r.push(f),!i(d,m,r))return!1;if(r){var y=r.pop();if(y!==f)throw new Error(""+y)}}return!0}if(!r)return!1;var g=Object.create(null);for(p=0;p<s;++p)g[n[p]]=!0;for(p=0;p<c;++p){if(f=u[p],!h.call(g,f))return r.push(f),!1;delete g[f]}for(f in g){r.push(f);break}return!1}(e,t,r):c.check(e)?c.check(t)&&+e==+t:p.check(e)?p.check(t)&&e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.ignoreCase===t.ignoreCase:e==t)}var s=t.use(e("../lib/types")),a=s.getFieldNames,o=s.getFieldValue,u=s.builtInTypes.array,l=s.builtInTypes.object,c=s.builtInTypes.Date,p=s.builtInTypes.RegExp,h=Object.prototype.hasOwnProperty;return r.assert=function(e,t){var i=[];if(!r(e,t,i)){if(0!==i.length)throw new Error("Nodes differ in the following path: "+i.map(n).join(""));if(e!==t)throw new Error("Nodes must be equal")}},r}},{"../lib/types":19}],14:[function(e,t,r){t.exports=function(t){function r(e,t,n){if(!(this instanceof r))throw new Error("NodePath constructor cannot be invoked without 'new'");p.call(this,e,t,n)}function n(e){return o.BinaryExpression.check(e)||o.LogicalExpression.check(e)}function i(e){return!!o.CallExpression.check(e)||(c.check(e)?e.some(i):!!o.Node.check(e)&&a.someField(e,function(e,t){return i(t)}))}function s(e){if(o.VariableDeclaration.check(e.node)){var t=e.get("declarations").value;if(!t||0===t.length)return e.prune()}else if(o.ExpressionStatement.check(e.node)){if(!e.get("expression").value)return e.prune()}else o.IfStatement.check(e.node)&&function(e){var t=e.get("test").value,r=e.get("alternate").value,n=e.get("consequent").value;if(n||r){if(!n&&r){var i=u.unaryExpression("!",t,!0);o.UnaryExpression.check(t)&&"!"===t.operator&&(i=t.argument),e.get("test").replace(i),e.get("consequent").replace(r),e.get("alternate").replace()}}else{var s=u.expressionStatement(t);e.replace(s)}}(e);return e}var a=t.use(e("./types")),o=a.namedTypes,u=a.builders,l=a.builtInTypes.number,c=a.builtInTypes.array,p=t.use(e("./path")),h=t.use(e("./scope")),f=r.prototype=Object.create(p.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}});Object.defineProperties(f,{node:{get:function(){return Object.defineProperty(this,"node",{configurable:!0,value:this._computeNode()}),this.node}},parent:{get:function(){return Object.defineProperty(this,"parent",{configurable:!0,value:this._computeParent()}),this.parent}},scope:{get:function(){return Object.defineProperty(this,"scope",{configurable:!0,value:this._computeScope()}),this.scope}}}),f.replace=function(){return delete this.node,delete this.parent,delete this.scope,p.prototype.replace.apply(this,arguments)},f.prune=function(){var e=this.parent;return this.replace(),s(e)},f._computeNode=function(){var e=this.value;if(o.Node.check(e))return e;var t=this.parentPath;return t&&t.node||null},f._computeParent=function(){var e=this.value,t=this.parentPath;if(!o.Node.check(e)){for(;t&&!o.Node.check(t.value);)t=t.parentPath;t&&(t=t.parentPath)}for(;t&&!o.Node.check(t.value);)t=t.parentPath;return t||null},f._computeScope=function(){var e=this.value,t=this.parentPath,r=t&&t.scope;return o.Node.check(e)&&h.isEstablishedBy(e)&&(r=new h(this,r)),r||null},f.getValueProperty=function(e){return a.getFieldValue(this.value,e)},f.needsParens=function(e){if(!(s=this.parentPath))return!1;var t=this.value;if(!o.Expression.check(t))return!1;if("Identifier"===t.type)return!1;for(;!o.Node.check(s.value);)if(!(s=s.parentPath))return!1;var r=s.value;switch(t.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return"MemberExpression"===r.type&&"object"===this.name&&r.object===t;case"BinaryExpression":case"LogicalExpression":switch(r.type){case"CallExpression":return"callee"===this.name&&r.callee===t;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return!0;case"MemberExpression":return"object"===this.name&&r.object===t;case"BinaryExpression":case"LogicalExpression":var n=r.operator,s=d[n],a=t.operator,u=d[a];if(s>u)return!0;if(s===u&&"right"===this.name){if(r.right!==t)throw new Error("Nodes must be equal");return!0}default:return!1}case"SequenceExpression":switch(r.type){case"ForStatement":return!1;case"ExpressionStatement":return"expression"!==this.name;default:return!0}case"YieldExpression":switch(r.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return!0;default:return!1}case"Literal":return"MemberExpression"===r.type&&l.check(t.value)&&"object"===this.name&&r.object===t;case"AssignmentExpression":case"ConditionalExpression":switch(r.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":return"callee"===this.name&&r.callee===t;case"ConditionalExpression":return"test"===this.name&&r.test===t;case"MemberExpression":return"object"===this.name&&r.object===t;default:return!1}default:if("NewExpression"===r.type&&"callee"===this.name&&r.callee===t)return i(t)}return!(!0===e||this.canBeFirstInStatement()||!this.firstInStatement())};var d={};return[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(e,t){e.forEach(function(e){d[e]=t})}),f.canBeFirstInStatement=function(){var e=this.node;return!o.FunctionExpression.check(e)&&!o.ObjectExpression.check(e)},f.firstInStatement=function(){return function(e){for(var t,r;e.parent;e=e.parent){if(t=e.node,r=e.parent.node,o.BlockStatement.check(r)&&"body"===e.parent.name&&0===e.name){if(r.body[0]!==t)throw new Error("Nodes must be equal");return!0}if(o.ExpressionStatement.check(r)&&"expression"===e.name){if(r.expression!==t)throw new Error("Nodes must be equal");return!0}if(o.SequenceExpression.check(r)&&"expressions"===e.parent.name&&0===e.name){if(r.expressions[0]!==t)throw new Error("Nodes must be equal")}else if(o.CallExpression.check(r)&&"callee"===e.name){if(r.callee!==t)throw new Error("Nodes must be equal")}else if(o.MemberExpression.check(r)&&"object"===e.name){if(r.object!==t)throw new Error("Nodes must be equal")}else if(o.ConditionalExpression.check(r)&&"test"===e.name){if(r.test!==t)throw new Error("Nodes must be equal")}else if(n(r)&&"left"===e.name){if(r.left!==t)throw new Error("Nodes must be equal")}else{if(!o.UnaryExpression.check(r)||r.prefix||"argument"!==e.name)return!1;if(r.argument!==t)throw new Error("Nodes must be equal")}}return!0}(this)},r}},{"./path":16,"./scope":17,"./types":19}],15:[function(e,t,r){var n=Object.prototype.hasOwnProperty;t.exports=function(t){function r(){if(!(this instanceof r))throw new Error("PathVisitor constructor cannot be invoked without 'new'");this._reusableContextStack=[],this._methodNameTable=function(e){r=Object.create(null);for(var t in e)/^visit[A-Z]/.test(t)&&(r[t.slice("visit".length)]=!0);for(var r,n=a.computeSupertypeLookupTable(r),i=Object.create(null),s=(r=Object.keys(n)).length,o=0;o<s;++o){var u=r[o];t="visit"+n[u],c.check(e[t])&&(i[u]=t)}return i}(this),this._shouldVisitComments=n.call(this._methodNameTable,"Block")||n.call(this._methodNameTable,"Line"),this.Context=function(e){function t(n){if(!(this instanceof t))throw new Error("");if(!(this instanceof r))throw new Error("");if(!(n instanceof o))throw new Error("");Object.defineProperty(this,"visitor",{value:e,writable:!1,enumerable:!0,configurable:!1}),this.currentPath=n,this.needToCallTraverse=!0,Object.seal(this)}if(!(e instanceof r))throw new Error("");var n=t.prototype=Object.create(e);return n.constructor=t,i(n,h),t}(this),this._visiting=!1,this._changeReported=!1}function i(e,t){for(var r in t)n.call(t,r)&&(e[r]=t[r]);return e}function s(e,t){if(!(e instanceof o))throw new Error("");if(!(t instanceof r))throw new Error("");var i=e.value;if(u.check(i))e.each(t.visitWithoutReset,t);else if(l.check(i)){var s=a.getFieldNames(i);t._shouldVisitComments&&i.comments&&s.indexOf("comments")<0&&s.push("comments");for(var c=s.length,p=[],h=0;h<c;++h){var f=s[h];n.call(i,f)||(i[f]=a.getFieldValue(i,f)),p.push(e.get(f))}for(h=0;h<c;++h)t.visitWithoutReset(p[h])}else;return e.value}var a=t.use(e("./types")),o=t.use(e("./node-path")),u=(a.namedTypes.Printable,a.builtInTypes.array),l=a.builtInTypes.object,c=a.builtInTypes.function;r.fromMethodsObject=function(e){function t(){if(!(this instanceof t))throw new Error("Visitor constructor cannot be invoked without 'new'");r.call(this)}if(e instanceof r)return e;if(!l.check(e))return new r;var n=t.prototype=Object.create(p);return n.constructor=t,i(n,e),i(t,r),c.assert(t.fromMethodsObject),c.assert(t.visit),new t},r.visit=function(e,t){return r.fromMethodsObject(t).visit(e)};var p=r.prototype;p.visit=function(){if(this._visiting)throw new Error("Recursively calling visitor.visit(path) resets visitor state. Try this.visit(path) or this.traverse(path) instead.");this._visiting=!0,this._changeReported=!1,this._abortRequested=!1;for(var e=arguments.length,t=new Array(e),r=0;r<e;++r)t[r]=arguments[r];t[0]instanceof o||(t[0]=new o({root:t[0]}).get("root")),this.reset.apply(this,t);try{var n=this.visitWithoutReset(t[0]),i=!0}finally{if(this._visiting=!1,!i&&this._abortRequested)return t[0].value}return n},p.AbortRequest=function(){},p.abort=function(){var e=this;e._abortRequested=!0;var t=new e.AbortRequest;throw t.cancel=function(){e._abortRequested=!1},t},p.reset=function(e){},p.visitWithoutReset=function(e){if(this instanceof this.Context)return this.visitor.visitWithoutReset(e);if(!(e instanceof o))throw new Error("");var t=e.value,r=t&&"object"==typeof t&&"string"==typeof t.type&&this._methodNameTable[t.type];if(!r)return s(e,this);var n=this.acquireContext(e);try{return n.invokeVisitorMethod(r)}finally{this.releaseContext(n)}},p.acquireContext=function(e){return 0===this._reusableContextStack.length?new this.Context(e):this._reusableContextStack.pop().reset(e)},p.releaseContext=function(e){if(!(e instanceof this.Context))throw new Error("");this._reusableContextStack.push(e),e.currentPath=null},p.reportChanged=function(){this._changeReported=!0},p.wasChangeReported=function(){return this._changeReported};var h=Object.create(null);return h.reset=function(e){if(!(this instanceof this.Context))throw new Error("");if(!(e instanceof o))throw new Error("");return this.currentPath=e,this.needToCallTraverse=!0,this},h.invokeVisitorMethod=function(e){if(!(this instanceof this.Context))throw new Error("");if(!(this.currentPath instanceof o))throw new Error("");var t=this.visitor[e].call(this,this.currentPath);if(!1===t?this.needToCallTraverse=!1:void 0!==t&&(this.currentPath=this.currentPath.replace(t)[0],this.needToCallTraverse&&this.traverse(this.currentPath)),!1!==this.needToCallTraverse)throw new Error("Must either call this.traverse or return false in "+e);var r=this.currentPath;return r&&r.value},h.traverse=function(e,t){if(!(this instanceof this.Context))throw new Error("");if(!(e instanceof o))throw new Error("");if(!(this.currentPath instanceof o))throw new Error("");return this.needToCallTraverse=!1,s(e,r.fromMethodsObject(t||this.visitor))},h.visit=function(e,t){if(!(this instanceof this.Context))throw new Error("");if(!(e instanceof o))throw new Error("");if(!(this.currentPath instanceof o))throw new Error("");return this.needToCallTraverse=!1,r.fromMethodsObject(t||this.visitor).visitWithoutReset(e)},h.reportChanged=function(){this.visitor.reportChanged()},h.abort=function(){this.needToCallTraverse=!1,this.visitor.abort()},r}},{"./node-path":14,"./types":19}],16:[function(e,t,r){var n=Array.prototype,i=(n.slice,n.map,Object.prototype.hasOwnProperty);t.exports=function(t){function r(e,t,n){if(!(this instanceof r))throw new Error("Path constructor cannot be invoked without 'new'");if(t){if(!(t instanceof r))throw new Error("")}else t=null,n=null;this.value=e,this.parentPath=t,this.name=n,this.__childCache=null}function n(e){return e.__childCache||(e.__childCache=Object.create(null))}function s(e,t){var r=n(e),s=e.getValueProperty(t),a=r[t];return i.call(r,t)&&a.value===s||(a=r[t]=new e.constructor(s,e,t)),a}function a(){}function o(e,t,r,s){if(l.assert(e.value),0===t)return a;var o=e.value.length;if(o<1)return a;var u=arguments.length;2===u?(r=0,s=o):3===u?(r=Math.max(r,0),s=o):(r=Math.max(r,0),s=Math.min(s,o)),c.assert(r),c.assert(s);for(var p=Object.create(null),h=n(e),f=r;f<s;++f)if(i.call(e.value,f)){var d=e.get(f);if(d.name!==f)throw new Error("");var m=f+t;d.name=m,p[m]=d,delete h[f]}return delete h.length,function(){for(var t in p){var r=p[t];if(r.name!==+t)throw new Error("");h[t]=r,e.value[t]=r.value}}}var u=t.use(e("./types")),l=u.builtInTypes.array,c=u.builtInTypes.number,p=r.prototype;return p.getValueProperty=function(e){return this.value[e]},p.get=function(e){for(var t=this,r=arguments,n=r.length,i=0;i<n;++i)t=s(t,r[i]);return t},p.each=function(e,t){for(var r=[],n=this.value.length,s=0,s=0;s<n;++s)i.call(this.value,s)&&(r[s]=this.get(s));for(t=t||this,s=0;s<n;++s)i.call(r,s)&&e.call(t,r[s])},p.map=function(e,t){var r=[];return this.each(function(t){r.push(e.call(this,t))},t),r},p.filter=function(e,t){var r=[];return this.each(function(t){e.call(this,t)&&r.push(t)},t),r},p.shift=function(){var e=o(this,-1),t=this.value.shift();return e(),t},p.unshift=function(e){var t=o(this,arguments.length),r=this.value.unshift.apply(this.value,arguments);return t(),r},p.push=function(e){return l.assert(this.value),delete n(this).length,this.value.push.apply(this.value,arguments)},p.pop=function(){l.assert(this.value);var e=n(this);return delete e[this.value.length-1],delete e.length,this.value.pop()},p.insertAt=function(e,t){var r=arguments.length,n=o(this,r-1,e);if(n===a)return this;e=Math.max(e,0);for(var i=1;i<r;++i)this.value[e+i-1]=arguments[i];return n(),this},p.insertBefore=function(e){for(var t=this.parentPath,r=arguments.length,n=[this.name],i=0;i<r;++i)n.push(arguments[i]);return t.insertAt.apply(t,n)},p.insertAfter=function(e){for(var t=this.parentPath,r=arguments.length,n=[this.name+1],i=0;i<r;++i)n.push(arguments[i]);return t.insertAt.apply(t,n)},p.replace=function(e){var t=[],i=this.parentPath.value,s=n(this.parentPath),a=arguments.length;if(function(e){if(!(e instanceof r))throw new Error("");var t=e.parentPath;if(!t)return e;var i=t.value,s=n(t);if(i[e.name]===e.value)s[e.name]=e;else if(l.check(i)){var a=i.indexOf(e.value);a>=0&&(s[e.name=a]=e)}else i[e.name]=e.value,s[e.name]=e;if(i[e.name]!==e.value)throw new Error("");if(e.parentPath.get(e.name)!==e)throw new Error("")}(this),l.check(i)){for(var u=i.length,c=o(this.parentPath,a-1,this.name+1),p=[this.name,1],h=0;h<a;++h)p.push(arguments[h]);if(i.splice.apply(i,p)[0]!==this.value)throw new Error("");if(i.length!==u-1+a)throw new Error("");if(c(),0===a)delete this.value,delete s[this.name],this.__childCache=null;else{if(i[this.name]!==e)throw new Error("");for(this.value!==e&&(this.value=e,this.__childCache=null),h=0;h<a;++h)t.push(this.parentPath.get(this.name+h));if(t[0]!==this)throw new Error("")}}else if(1===a)this.value!==e&&(this.__childCache=null),this.value=i[this.name]=e,t.push(this);else{if(0!==a)throw new Error("Could not replace path");delete i[this.name],delete this.value,this.__childCache=null}return t},r}},{"./types":19}],17:[function(e,t,r){var n=Object.prototype.hasOwnProperty;t.exports=function(t){function r(n,i){if(!(this instanceof r))throw new Error("Scope constructor cannot be invoked without 'new'");if(!(n instanceof t.use(e("./node-path"))))throw new Error("");m.assert(n.value);var s;if(i){if(!(i instanceof r))throw new Error("");s=i.depth+1}else i=null,s=0;Object.defineProperties(this,{path:{value:n},node:{value:n.value},isGlobal:{value:!i,enumerable:!0},depth:{value:s},parent:{value:i},bindings:{value:{}},types:{value:{}}})}function i(e,t,r){var i=e.value;e.parent&&l.FunctionExpression.check(e.parent.node)&&e.parent.node.id&&a(e.parent.get("id"),t),i&&(h.check(i)?e.each(function(e){s(e,t,r)}):l.Function.check(i)?(e.get("params").each(function(e){a(e,t)}),s(e.get("body"),t,r)):l.TypeAlias&&l.TypeAlias.check(i)?function(e,t){var r=e.value;l.Pattern.assert(r),l.Identifier.check(r)&&(n.call(t,r.name)?t[r.name].push(e):t[r.name]=[e])}(e.get("id"),r):l.VariableDeclarator.check(i)?(a(e.get("id"),t),s(e.get("init"),t,r)):"ImportSpecifier"===i.type||"ImportNamespaceSpecifier"===i.type||"ImportDefaultSpecifier"===i.type?a(e.get(i.local?"local":i.name?"name":"id"),t):c.check(i)&&!p.check(i)&&o.eachField(i,function(n,i){var a=e.get(n);if(!function(e,t){if(e.value===t)return!0;if(Array.isArray(e.value)&&0===e.value.length&&Array.isArray(t)&&0===t.length)return!0;return!1}(a,i))throw new Error("");s(a,t,r)}))}function s(e,t,r){var s=e.value;if(!s||p.check(s));else if(l.FunctionDeclaration.check(s)&&null!==s.id)a(e.get("id"),t);else if(l.ClassDeclaration&&l.ClassDeclaration.check(s))a(e.get("id"),t);else if(m.check(s)){if(l.CatchClause.check(s)){var o=s.param.name,u=n.call(t,o);i(e.get("body"),t,r),u||delete t[o]}}else i(e,t,r)}function a(e,t){var r=e.value;l.Pattern.assert(r),l.Identifier.check(r)?n.call(t,r.name)?t[r.name].push(e):t[r.name]=[e]:l.ObjectPattern&&l.ObjectPattern.check(r)?e.get("properties").each(function(e){var r=e.value;l.Pattern.check(r)?a(e,t):l.Property.check(r)?a(e.get("value"),t):l.SpreadProperty&&l.SpreadProperty.check(r)&&a(e.get("argument"),t)}):l.ArrayPattern&&l.ArrayPattern.check(r)?e.get("elements").each(function(e){var r=e.value;l.Pattern.check(r)?a(e,t):l.SpreadElement&&l.SpreadElement.check(r)&&a(e.get("argument"),t)}):l.PropertyPattern&&l.PropertyPattern.check(r)?a(e.get("pattern"),t):(l.SpreadElementPattern&&l.SpreadElementPattern.check(r)||l.SpreadPropertyPattern&&l.SpreadPropertyPattern.check(r))&&a(e.get("argument"),t)}var o=t.use(e("./types")),u=o.Type,l=o.namedTypes,c=l.Node,p=l.Expression,h=o.builtInTypes.array,f=o.builders,d=[l.Program,l.Function,l.CatchClause],m=u.or.apply(u,d);r.isEstablishedBy=function(e){return m.check(e)};var y=r.prototype;return y.didScan=!1,y.declares=function(e){return this.scan(),n.call(this.bindings,e)},y.declaresType=function(e){return this.scan(),n.call(this.types,e)},y.declareTemporary=function(e){if(e){if(!/^[a-z$_]/i.test(e))throw new Error("")}else e="t$";e+=this.depth.toString(36)+"$",this.scan();for(var t=0;this.declares(e+t);)++t;var r=e+t;return this.bindings[r]=o.builders.identifier(r)},y.injectTemporary=function(e,t){e||(e=this.declareTemporary());var r=this.path.get("body");return l.BlockStatement.check(r.value)&&(r=r.get("body")),r.unshift(f.variableDeclaration("var",[f.variableDeclarator(e,t||null)])),e},y.scan=function(e){if(e||!this.didScan){for(var t in this.bindings)delete this.bindings[t];!function(e,t,r){var n=e.value;m.assert(n),l.CatchClause.check(n)?a(e.get("param"),t):i(e,t,r)}(this.path,this.bindings,this.types),this.didScan=!0}},y.getBindings=function(){return this.scan(),this.bindings},y.getTypes=function(){return this.scan(),this.types},y.lookup=function(e){for(var t=this;t&&!t.declares(e);t=t.parent);return t},y.lookupType=function(e){for(var t=this;t&&!t.declaresType(e);t=t.parent);return t},y.getGlobalScope=function(){for(var e=this;!e.isGlobal;)e=e.parent;return e},r}},{"./node-path":14,"./types":19}],18:[function(e,t,r){t.exports=function(t){var r={},n=t.use(e("../lib/types")),i=n.Type,s=n.builtInTypes,a=s.number;r.geq=function(e){return new i(function(t){return a.check(t)&&t>=e},a+" >= "+e)},r.defaults={null:function(){return null},emptyArray:function(){return[]},false:function(){return!1},true:function(){return!0},undefined:function(){}};var o=i.or(s.string,s.number,s.boolean,s.null,s.undefined);return r.isPrimitive=new i(function(e){if(null===e)return!0;var t=typeof e;return!("object"===t||"function"===t)},o.toString()),r}},{"../lib/types":19}],19:[function(e,t,r){var n=Array.prototype,i=n.slice,s=(n.map,n.forEach,Object.prototype),a=s.toString,o=a.call(function(){}),u=a.call(""),l=s.hasOwnProperty;t.exports=function(){function e(t,r){var n=this;if(!(n instanceof e))throw new Error("Type constructor cannot be invoked without 'new'");if(a.call(t)!==o)throw new Error(t+" is not a function");var i=a.call(r);if(i!==o&&i!==u)throw new Error(r+" is neither a function nor a string");Object.defineProperties(n,{name:{value:r},check:{value:function(e,r){var i=t.call(n,e,r);return!i&&r&&a.call(r)===o&&r(n,e),i}}})}function t(e){return C.check(e)?"{"+Object.keys(e).map(function(t){return t+": "+e[t]}).join(", ")+"}":D.check(e)?"["+e.map(t).join(", ")+"]":JSON.stringify(e)}function r(t,r){var n=a.call(t),i=new e(function(e){return a.call(e)===n},r);return x[r]=i,t&&"function"==typeof t.constructor&&(b.push(t.constructor),v.push(i)),i}function n(t,r){if(t instanceof e)return t;if(t instanceof c)return t.type;if(D.check(t))return e.fromArray(t);if(C.check(t))return e.fromObject(t);if(A.check(t)){var n=b.indexOf(t);return n>=0?v[n]:new e(t,r)}return new e(function(e){return e===t},_.check(r)?function(){return t+""}:r)}function s(e,t,r,i){if(!(this instanceof s))throw new Error("Field constructor cannot be invoked without 'new'");E.assert(e);var a={name:{value:e},type:{value:t=n(t)},hidden:{value:!!i}};A.check(r)&&(a.defaultFn={value:r}),Object.defineProperties(this,a)}function c(t){var r=this;if(!(r instanceof c))throw new Error("Def constructor cannot be invoked without 'new'");Object.defineProperties(r,{typeName:{value:t},baseNames:{value:[]},ownFields:{value:Object.create(null)},allSupertypes:{value:Object.create(null)},supertypeList:{value:[]},allFields:{value:Object.create(null)},fieldNames:{value:[]},type:{value:new e(function(e,t){return r.check(e,t)},t)}})}function p(e){return e.replace(/^[A-Z]+/,function(e){var t=e.length;switch(t){case 0:return"";case 1:return e.toLowerCase();default:return e.slice(0,t-1).toLowerCase()+e.charAt(t-1)}})}function h(e){return(e=p(e)).replace(/(Expression)?$/,"Statement")}function f(e){var t=c.fromValue(e);if(t)return t.fieldNames.slice(0);if("type"in e)throw new Error("did not recognize object of type "+JSON.stringify(e.type));return Object.keys(e)}function d(e,t){var r=c.fromValue(e);if(r){var n=r.allFields[t];if(n)return n.getValue(e)}return e&&e[t]}function m(e,t){return Object.keys(t).forEach(function(r){e[r]=t[r]}),e}var y={},g=e.prototype;y.Type=e,g.assert=function(e,r){if(!this.check(e,r)){var n=t(e);throw new Error(n+" does not match type "+this)}return!0},g.toString=function(){var e=this.name;return E.check(e)?e:A.check(e)?e.call(this)+"":e+" type"};var b=[],v=[],x={};y.builtInTypes=x;var E=r("truthy","string"),A=r(function(){},"function"),D=r([],"array"),C=r({},"object"),S=(r(/./,"RegExp"),r(new Date,"Date"),r(3,"number")),_=(r(!0,"boolean"),r(null,"null"),r(void 0,"undefined"));e.or=function(){for(var t=[],r=arguments.length,i=0;i<r;++i)t.push(n(arguments[i]));return new e(function(e,n){for(var i=0;i<r;++i)if(t[i].check(e,n))return!0;return!1},function(){return t.join(" | ")})},e.fromArray=function(e){if(!D.check(e))throw new Error("");if(1!==e.length)throw new Error("only one element type is permitted for typed arrays");return n(e[0]).arrayOf()},g.arrayOf=function(){var t=this;return new e(function(e,r){return D.check(e)&&e.every(function(e){return t.check(e,r)})},function(){return"["+t+"]"})},e.fromObject=function(t){var r=Object.keys(t).map(function(e){return new s(e,t[e])});return new e(function(e,t){return C.check(e)&&r.every(function(r){return r.type.check(e[r.name],t)})},function(){return"{ "+r.join(", ")+" }"})};var w=s.prototype;w.toString=function(){return JSON.stringify(this.name)+": "+this.type},w.getValue=function(e){var t=e[this.name];return _.check(t)?(this.defaultFn&&(t=this.defaultFn.call(e)),t):t},e.def=function(e){return E.assert(e),l.call(k,e)?k[e]:k[e]=new c(e)};var k=Object.create(null);c.fromValue=function(e){if(e&&"object"==typeof e){var t=e.type;if("string"==typeof t&&l.call(k,t)){var r=k[t];if(r.finalized)return r}}return null};var F=c.prototype;F.isSupertypeOf=function(e){if(e instanceof c){if(!0!==this.finalized||!0!==e.finalized)throw new Error("");return l.call(e.allSupertypes,this.typeName)}throw new Error(e+" is not a Def")},y.getSupertypeNames=function(e){if(!l.call(k,e))throw new Error("");var t=k[e];if(!0!==t.finalized)throw new Error("");return t.supertypeList.slice(1)},y.computeSupertypeLookupTable=function(e){for(var t={},r=Object.keys(k),n=r.length,i=0;i<n;++i){var s=r[i],a=k[s];if(!0!==a.finalized)throw new Error(""+s);for(var o=0;o<a.supertypeList.length;++o){var u=a.supertypeList[o];if(l.call(e,u)){t[s]=u;break}}}return t},F.checkAllFields=function(e,t){var r=this.allFields;if(!0!==this.finalized)throw new Error(""+this.typeName);return C.check(e)&&Object.keys(r).every(function(n){var i=r[n],s=i.type,a=i.getValue(e);return s.check(a,t)})},F.check=function(e,t){if(!0!==this.finalized)throw new Error("prematurely checking unfinalized type "+this.typeName);if(!C.check(e))return!1;var r=c.fromValue(e);return r?t&&r===this?this.checkAllFields(e,t):!!this.isSupertypeOf(r)&&(!t||r.checkAllFields(e,t)&&this.checkAllFields(e,!1)):("SourceLocation"===this.typeName||"Position"===this.typeName)&&this.checkAllFields(e,t)},F.bases=function(){var e=i.call(arguments),t=this.baseNames;if(this.finalized){if(e.length!==t.length)throw new Error("");for(var r=0;r<e.length;r++)if(e[r]!==t[r])throw new Error("");return this}return e.forEach(function(e){E.assert(e),t.indexOf(e)<0&&t.push(e)}),this},Object.defineProperty(F,"buildable",{value:!1});var T={};y.builders=T;var P={};y.defineMethod=function(e,t){var r=P[e];return _.check(t)?delete P[e]:(A.assert(t),Object.defineProperty(P,e,{enumerable:!0,configurable:!0,value:t})),r};var B=E.arrayOf();F.build=function(){var e=this,r=i.call(arguments);return B.assert(r),Object.defineProperty(e,"buildParams",{value:r,writable:!1,enumerable:!1,configurable:!0}),e.buildable?e:(e.field("type",String,function(){return e.typeName}),Object.defineProperty(e,"buildable",{value:!0}),Object.defineProperty(T,p(e.typeName),{enumerable:!0,value:function(){function r(r,a){if(!l.call(s,r)){var o=e.allFields;if(!l.call(o,r))throw new Error(""+r);var u,c=o[r],p=c.type;if(S.check(a)&&a<i)u=n[a];else{if(!c.defaultFn){var h="no value or default function given for field "+JSON.stringify(r)+" of "+e.typeName+"("+e.buildParams.map(function(e){return o[e]}).join(", ")+")";throw new Error(h)}u=c.defaultFn.call(s)}if(!p.check(u))throw new Error(t(u)+" does not match field "+c+" of type "+e.typeName);s[r]=u}}var n=arguments,i=n.length,s=Object.create(P);if(!e.finalized)throw new Error("attempting to instantiate unfinalized type "+e.typeName);if(e.buildParams.forEach(function(e,t){r(e,t)}),Object.keys(e.allFields).forEach(function(e){r(e)}),s.type!==e.typeName)throw new Error("");return s}}),e)},y.getBuilderName=p,y.getStatementBuilderName=h,F.field=function(e,t,r,n){return this.finalized?(console.error("Ignoring attempt to redefine field "+JSON.stringify(e)+" of finalized type "+JSON.stringify(this.typeName)),this):(this.ownFields[e]=new s(e,t,r,n),this)};var O={};return y.namedTypes=O,y.getFieldNames=f,y.getFieldValue=d,y.eachField=function(e,t,r){f(e).forEach(function(r){t.call(this,r,d(e,r))},r)},y.someField=function(e,t,r){return f(e).some(function(r){return t.call(this,r,d(e,r))},r)},Object.defineProperty(F,"finalized",{value:!1}),F.finalize=function(){var e=this;if(!e.finalized){var t=e.allFields,r=e.allSupertypes;e.baseNames.forEach(function(n){var i=k[n];if(!(i instanceof c)){var s="unknown supertype name "+JSON.stringify(n)+" for subtype "+JSON.stringify(e.typeName);throw new Error(s)}i.finalize(),m(t,i.allFields),m(r,i.allSupertypes)}),m(t,e.ownFields),r[e.typeName]=e,e.fieldNames.length=0;for(var n in t)l.call(t,n)&&!t[n].hidden&&e.fieldNames.push(n);Object.defineProperty(O,e.typeName,{enumerable:!0,value:e.type}),Object.defineProperty(e,"finalized",{value:!0}),function(e,t){t.length=0,t.push(e);for(var r=Object.create(null),n=0;n<t.length;++n){e=t[n];var i=k[e];if(!0!==i.finalized)throw new Error("");l.call(r,e)&&delete t[r[e]],r[e]=n,t.push.apply(t,i.baseNames)}for(var s=0,a=s,o=t.length;a<o;++a)l.call(t,a)&&(t[s++]=t[a]);t.length=s}(e.typeName,e.supertypeList),e.buildable&&e.supertypeList.lastIndexOf("Expression")>=0&&function(e){var t=h(e);if(!T[t]){var r=T[p(e)];r&&(T[t]=function(){return T.expressionStatement(r.apply(T,arguments))})}}(e.typeName)}},y.finalize=function(){Object.keys(k).forEach(function(e){k[e].finalize()})},y}},{}],20:[function(e,t,r){t.exports=e("./fork")([e("./def/core"),e("./def/es6"),e("./def/es7"),e("./def/mozilla"),e("./def/e4x"),e("./def/jsx"),e("./def/flow"),e("./def/esprima"),e("./def/babel"),e("./def/babel6")])},{"./def/babel":2,"./def/babel6":3,"./def/core":4,"./def/e4x":5,"./def/es6":6,"./def/es7":7,"./def/esprima":8,"./def/flow":9,"./def/jsx":10,"./def/mozilla":11,"./fork":12}],21:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return t.replace(a.default,function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=function(e){var t=e.slice(-2),r=t[0],n=t[1],i=(0,s.matchToToken)(e);if("name"===i.type){if(o.default.keyword.isReservedWordES6(i.value))return"keyword";if(c.test(i.value)&&("<"===n[r-1]||"</"==n.substr(r-2,2)))return"jsx_tag";if(i.value[0]!==i.value[0].toLowerCase())return"capitalized"}return"punctuator"===i.type&&p.test(i.value)?"bracket":i.type}(r),a=e[i];return a?r[0].split(l).map(function(e){return a(e)}).join("\n"):r[0]})}r.__esModule=!0,r.default=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};r=Math.max(r,0);var s=n.highlightCode&&u.default.supportsColor||n.forceColor,a=u.default;n.forceColor&&(a=new u.default.constructor({enabled:!0}));var o=function(e,t){return s?e(t):t},c=function(e){return{keyword:e.cyan,capitalized:e.yellow,jsx_tag:e.yellow,punctuator:e.yellow,number:e.magenta,string:e.green,regex:e.magenta,comment:e.grey,invalid:e.white.bgRed.bold,gutter:e.grey,marker:e.red.bold}}(a);s&&(e=i(c,e));var p=n.linesAbove||2,h=n.linesBelow||3,f=e.split(l),d=Math.max(t-(p+1),0),m=Math.min(f.length,t+h);t||r||(d=0,m=f.length);var y=String(m).length,g=f.slice(d,m).map(function(e,n){var i=d+1+n,s=" "+(" "+i).slice(-y)+" | ";if(i===t){var a="";if(r){var u=e.slice(0,r-1).replace(/[^\t]/g," ");a=["\n ",o(c.gutter,s.replace(/\d/g," ")),u,o(c.marker,"^")].join("")}return[o(c.marker,">"),o(c.gutter,s),e,a].join("")}return" "+o(c.gutter,s)+e}).join("\n");return s?a.reset(g):g};var s=e("js-tokens"),a=n(s),o=n(e("esutils")),u=n(e("chalk")),l=/\r\n|[\n\r\u2028\u2029]/,c=/^[a-z][\w-]*$/i,p=/^[()\[\]{}]$/;t.exports=r.default},{chalk:24,esutils:28,"js-tokens":322}],22:[function(e,t,r){"use strict";t.exports=function(){return/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g}},{}],23:[function(e,t,r){"use strict";Object.defineProperty(t,"exports",{enumerable:!0,get:function(){var e={modifiers:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},colors:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39]},bgColors:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49]}};return e.colors.grey=e.colors.gray,Object.keys(e).forEach(function(t){var r=e[t];Object.keys(r).forEach(function(t){var n=r[t];e[t]=r[t]={open:"["+n[0]+"m",close:"["+n[1]+"m"}}),Object.defineProperty(e,t,{value:r,enumerable:!1})}),e}})},{}],24:[function(e,t,r){(function(r){"use strict";function n(e){this.enabled=e&&void 0!==e.enabled?e.enabled:l}function i(e){var t=function(){return function(){var e=arguments,t=e.length,r=0!==t&&String(arguments[0]);if(t>1)for(var n=1;n<t;n++)r+=" "+e[n];if(!this.enabled||!r)return r;var i=this._styles,s=i.length,o=a.dim.open;!p||-1===i.indexOf("gray")&&-1===i.indexOf("grey")||(a.dim.open="");for(;s--;){var u=a[i[s]];r=u.open+r.replace(u.closeRe,u.open)+u.close}return a.dim.open=o,r}.apply(t,arguments)};return t._styles=e,t.enabled=this.enabled,t.__proto__=f,t}var s=e("escape-string-regexp"),a=e("ansi-styles"),o=e("strip-ansi"),u=e("has-ansi"),l=e("supports-color"),c=Object.defineProperties,p="win32"===r.platform&&!/^xterm/i.test(r.env.TERM);p&&(a.blue.open="");var h=function(){var e={};return Object.keys(a).forEach(function(t){a[t].closeRe=new RegExp(s(a[t].close),"g"),e[t]={get:function(){return i.call(this,this._styles.concat(t))}}}),e}(),f=c(function(){},h);c(n.prototype,function(){var e={};return Object.keys(h).forEach(function(t){e[t]={get:function(){return i.call(this,[t])}}}),e}()),t.exports=new n,t.exports.styles=a,t.exports.hasColor=u,t.exports.stripColor=o,t.exports.supportsColor=l}).call(this,e("_process"))},{_process:550,"ansi-styles":23,"escape-string-regexp":310,"has-ansi":314,"strip-ansi":29,"supports-color":30}],25:[function(e,t,r){!function(){"use strict";function e(e){if(null==e)return!1;switch(e.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function r(e){switch(e.type){case"IfStatement":return null!=e.alternate?e.alternate:e.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return e.body}return null}t.exports={isExpression:function(e){if(null==e)return!1;switch(e.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1},isStatement:e,isIterationStatement:function(e){if(null==e)return!1;switch(e.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1},isSourceElement:function(t){return e(t)||null!=t&&"FunctionDeclaration"===t.type},isProblematicIfStatement:function(e){var t;if("IfStatement"!==e.type)return!1;if(null==e.alternate)return!1;t=e.consequent;do{if("IfStatement"===t.type&&null==t.alternate)return!0;t=r(t)}while(t);return!1},trailingStatement:r}}()},{}],26:[function(e,t,r){!function(){"use strict";function e(e){if(e<=65535)return String.fromCharCode(e);return String.fromCharCode(Math.floor((e-65536)/1024)+55296)+String.fromCharCode((e-65536)%1024+56320)}var r,n,i,s,a,o;for(n={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/},r={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},i=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],s=new Array(128),o=0;o<128;++o)s[o]=o>=97&&o<=122||o>=65&&o<=90||36===o||95===o;for(a=new Array(128),o=0;o<128;++o)a[o]=o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||36===o||95===o;t.exports={isDecimalDigit:function(e){return 48<=e&&e<=57},isHexDigit:function(e){return 48<=e&&e<=57||97<=e&&e<=102||65<=e&&e<=70},isOctalDigit:function(e){return e>=48&&e<=55},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&i.indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStartES5:function(t){return t<128?s[t]:n.NonAsciiIdentifierStart.test(e(t))},isIdentifierPartES5:function(t){return t<128?a[t]:n.NonAsciiIdentifierPart.test(e(t))},isIdentifierStartES6:function(t){return t<128?s[t]:r.NonAsciiIdentifierStart.test(e(t))},isIdentifierPartES6:function(t){return t<128?a[t]:r.NonAsciiIdentifierPart.test(e(t))}}}()},{}],27:[function(e,t,r){!function(){"use strict";function r(e,t){return!(!t&&"yield"===e)&&n(e,t)}function n(e,t){if(t&&function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}function i(e,t){return"null"===e||"true"===e||"false"===e||r(e,t)}function s(e,t){return"null"===e||"true"===e||"false"===e||n(e,t)}function a(e){var t,r,n;if(0===e.length)return!1;if(n=e.charCodeAt(0),!l.isIdentifierStartES5(n))return!1;for(t=1,r=e.length;t<r;++t)if(n=e.charCodeAt(t),!l.isIdentifierPartES5(n))return!1;return!0}function o(e,t){return 1024*(e-55296)+(t-56320)+65536}function u(e){var t,r,n,i,s;if(0===e.length)return!1;for(s=l.isIdentifierStartES6,t=0,r=e.length;t<r;++t){if(55296<=(n=e.charCodeAt(t))&&n<=56319){if(++t>=r)return!1;if(!(56320<=(i=e.charCodeAt(t))&&i<=57343))return!1;n=o(n,i)}if(!s(n))return!1;s=l.isIdentifierPartES6}return!0}var l=e("./code");t.exports={isKeywordES5:r,isKeywordES6:n,isReservedWordES5:i,isReservedWordES6:s,isRestrictedWord:function(e){return"eval"===e||"arguments"===e},isIdentifierNameES5:a,isIdentifierNameES6:u,isIdentifierES5:function(e,t){return a(e)&&!i(e,t)},isIdentifierES6:function(e,t){return u(e)&&!s(e,t)}}}()},{"./code":26}],28:[function(e,t,r){!function(){"use strict";r.ast=e("./ast"),r.code=e("./code"),r.keyword=e("./keyword")}()},{"./ast":25,"./code":26,"./keyword":27}],29:[function(e,t,r){"use strict";var n=e("ansi-regex")();t.exports=function(e){return"string"==typeof e?e.replace(n,""):e}},{"ansi-regex":22}],30:[function(e,t,r){(function(e){"use strict";var r=e.argv,n=r.indexOf("--"),i=function(e){e="--"+e;var t=r.indexOf(e);return-1!==t&&(-1===n||t<n)};t.exports="FORCE_COLOR"in e.env||!(i("no-color")||i("no-colors")||i("color=false"))&&(!!(i("color")||i("colors")||i("color=true")||i("color=always"))||!(e.stdout&&!e.stdout.isTTY)&&("win32"===e.platform||("COLORTERM"in e.env||"dumb"!==e.env.TERM&&!!/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(e.env.TERM))))}).call(this,e("_process"))},{_process:550}],31:[function(e,t,r){t.exports=e("./lib/api/node.js")},{"./lib/api/node.js":32}],32:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0,r.transformFromAst=r.transform=r.analyse=r.Pipeline=r.OptionManager=r.traverse=r.types=r.messages=r.util=r.version=r.resolvePreset=r.resolvePlugin=r.template=r.buildExternalHelpers=r.options=r.File=void 0;var s=e("../transformation/file");Object.defineProperty(r,"File",{enumerable:!0,get:function(){return i(s).default}});var a=e("../transformation/file/options/config");Object.defineProperty(r,"options",{enumerable:!0,get:function(){return i(a).default}});var o=e("../tools/build-external-helpers");Object.defineProperty(r,"buildExternalHelpers",{enumerable:!0,get:function(){return i(o).default}});var u=e("babel-template");Object.defineProperty(r,"template",{enumerable:!0,get:function(){return i(u).default}});var l=e("../helpers/resolve-plugin");Object.defineProperty(r,"resolvePlugin",{enumerable:!0,get:function(){return i(l).default}});var c=e("../helpers/resolve-preset");Object.defineProperty(r,"resolvePreset",{enumerable:!0,get:function(){return i(c).default}});var p=e("../../package");Object.defineProperty(r,"version",{enumerable:!0,get:function(){return p.version}}),r.Plugin=function(e){throw new Error("The ("+e+") Babel 5 plugin is being run with Babel 6.")},r.transformFile=function(e,t,r){"function"==typeof t&&(r=t,t={}),t.filename=e,h.default.readFile(e,function(e,n){var i=void 0;if(!e)try{i=x(n,t)}catch(t){e=t}e?r(e):r(null,i)})},r.transformFileSync=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.filename=e,x(h.default.readFileSync(e,"utf8"),t)};var h=i(e("fs")),f=n(e("../util")),d=n(e("babel-messages")),m=n(e("babel-types")),y=i(e("babel-traverse")),g=i(e("../transformation/file/options/option-manager")),b=i(e("../transformation/pipeline"));r.util=f,r.messages=d,r.types=m,r.traverse=y.default,r.OptionManager=g.default,r.Pipeline=b.default;var v=new b.default,x=(r.analyse=v.analyse.bind(v),r.transform=v.transform.bind(v));r.transformFromAst=v.transformFromAst.bind(v)},{"../../package":73,"../helpers/resolve-plugin":38,"../helpers/resolve-preset":39,"../tools/build-external-helpers":42,"../transformation/file":43,"../transformation/file/options/config":47,"../transformation/file/options/option-manager":49,"../transformation/pipeline":54,"../util":57,"babel-messages":110,"babel-template":139,"babel-traverse":143,"babel-types":178,fs:191}],33:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e){return["babel-plugin-"+e,e]},t.exports=r.default},{}],34:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e){var t=["babel-preset-"+e,e],r=e.match(/^(@[^/]+)\/(.+)$/);if(r){var n=r[1],i=r[2];t.push(n+"/babel-preset-"+i)}return t},t.exports=r.default},{}],35:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/get-iterator"));r.default=function(e,t){if(e&&t)return(0,s.default)(e,t,function(e,t){if(t&&Array.isArray(e)){for(var r=t.slice(0),n=e,s=Array.isArray(n),a=0,n=s?n:(0,i.default)(n);;){var o;if(s){if(a>=n.length)break;o=n[a++]}else{if((a=n.next()).done)break;o=a.value}var u=o;r.indexOf(u)<0&&r.push(u)}return r}})};var s=n(e("lodash/mergeWith"));t.exports=r.default},{"babel-runtime/core-js/get-iterator":120,"lodash/mergeWith":527}],36:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t,r){if(e){if("Program"===e.type)return n.file(e,t||[],r||[]);if("File"===e.type)return e}throw new Error("Not a valid ast?")};var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));t.exports=r.default},{"babel-types":178}],37:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t){return e.reduce(function(e,r){return e||(0,n.default)(r,t)},null)};var n=function(e){return e&&e.__esModule?e:{default:e}}(e("./resolve"));t.exports=r.default},{"./resolve":40}],38:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0,r.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.cwd();return(0,s.default)((0,a.default)(e),t)};var s=i(e("./resolve-from-possible-names")),a=i(e("./get-possible-plugin-names"));t.exports=r.default}).call(this,e("_process"))},{"./get-possible-plugin-names":33,"./resolve-from-possible-names":37,_process:550}],39:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0,r.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.cwd();return(0,s.default)((0,a.default)(e),t)};var s=i(e("./resolve-from-possible-names")),a=i(e("./get-possible-preset-names"));t.exports=r.default}).call(this,e("_process"))},{"./get-possible-preset-names":34,"./resolve-from-possible-names":37,_process:550}],40:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var s=i(e("babel-runtime/helpers/typeof"));r.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.cwd();if("object"===(void 0===a.default?"undefined":(0,s.default)(a.default)))return null;var r=u[t];if(!r){r=new a.default;var i=o.default.join(t,".babelrc");r.id=i,r.filename=i,r.paths=a.default._nodeModulePaths(t),u[t]=r}try{return a.default._resolveFilename(e,r)}catch(e){return null}};var a=i(e("module")),o=i(e("path")),u={};t.exports=r.default}).call(this,e("_process"))},{_process:550,"babel-runtime/helpers/typeof":138,module:191,path:546}],41:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/map")),s=n(e("babel-runtime/helpers/classCallCheck")),a=n(e("babel-runtime/helpers/possibleConstructorReturn")),o=n(e("babel-runtime/helpers/inherits")),u=function(e){function t(){(0,s.default)(this,t);var r=(0,a.default)(this,e.call(this));return r.dynamicData={},r}return(0,o.default)(t,e),t.prototype.setDynamic=function(e,t){this.dynamicData[e]=t},t.prototype.get=function(t){if(this.has(t))return e.prototype.get.call(this,t);if(Object.prototype.hasOwnProperty.call(this.dynamicData,t)){var r=this.dynamicData[t]();return this.set(t,r),r}},t}(i.default);r.default=u,t.exports=r.default},{"babel-runtime/core-js/map":122,"babel-runtime/helpers/classCallCheck":134,"babel-runtime/helpers/inherits":135,"babel-runtime/helpers/possibleConstructorReturn":137}],42:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function s(e,t){var r=[],n=h.functionExpression(null,[h.identifier("global")],h.blockStatement(r)),i=h.program([h.expressionStatement(h.callExpression(n,[u.get("selfGlobal")]))]);return r.push(h.variableDeclaration("var",[h.variableDeclarator(e,h.assignmentExpression("=",h.memberExpression(h.identifier("global"),e),h.objectExpression([])))])),t(r),i}function a(e,t){var r=[];return r.push(h.variableDeclaration("var",[h.variableDeclarator(e,h.identifier("global"))])),t(r),h.program([f({FACTORY_PARAMETERS:h.identifier("global"),BROWSER_ARGUMENTS:h.assignmentExpression("=",h.memberExpression(h.identifier("root"),e),h.objectExpression([])),COMMON_ARGUMENTS:h.identifier("exports"),AMD_ARGUMENTS:h.arrayExpression([h.stringLiteral("exports")]),FACTORY_BODY:r,UMD_ROOT:h.identifier("this")})])}function o(e,t){var r=[];return r.push(h.variableDeclaration("var",[h.variableDeclarator(e,h.objectExpression([]))])),t(r),r.push(h.expressionStatement(e)),h.program(r)}r.__esModule=!0,r.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"global",r=h.identifier("babelHelpers"),n=void 0,i={global:s,umd:a,var:o}[t];if(!i)throw new Error(c.get("unsupportedOutputType",t));return n=i(r,function(t){return function(e,t,r){u.list.forEach(function(n){if(!(r&&r.indexOf(n)<0)){var i=h.identifier(n);e.push(h.expressionStatement(h.assignmentExpression("=",h.memberExpression(t,i),u.get(n))))}})}(t,r,e)}),(0,l.default)(n).code};var u=i(e("babel-helpers")),l=n(e("babel-generator")),c=i(e("babel-messages")),p=n(e("babel-template")),h=i(e("babel-types")),f=(0,p.default)('\n (function (root, factory) {\n if (typeof define === "function" && define.amd) {\n define(AMD_ARGUMENTS, factory);\n } else if (typeof exports === "object") {\n factory(COMMON_ARGUMENTS);\n } else {\n factory(BROWSER_ARGUMENTS);\n }\n })(UMD_ROOT, function (FACTORY_PARAMETERS) {\n FACTORY_BODY\n });\n');t.exports=r.default},{"babel-generator":85,"babel-helpers":109,"babel-messages":110,"babel-template":139,"babel-types":178}],43:[function(e,t,r){(function(t){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0,r.File=void 0;var s=i(e("babel-runtime/core-js/get-iterator")),a=i(e("babel-runtime/core-js/object/create")),o=i(e("babel-runtime/core-js/object/assign")),u=i(e("babel-runtime/helpers/classCallCheck")),l=i(e("babel-runtime/helpers/possibleConstructorReturn")),c=i(e("babel-runtime/helpers/inherits")),p=i(e("babel-helpers")),h=n(e("./metadata")),f=i(e("convert-source-map")),d=i(e("./options/option-manager")),m=i(e("../plugin-pass")),y=e("babel-traverse"),g=i(y),b=i(e("source-map")),v=i(e("babel-generator")),x=i(e("babel-code-frame")),E=i(e("lodash/defaults")),A=i(e("./logger")),D=i(e("../../store")),C=e("babylon"),S=n(e("../../util")),_=i(e("path")),w=n(e("babel-types")),k=i(e("../../helpers/resolve")),F=i(e("../internal-plugins/block-hoist")),T=i(e("../internal-plugins/shadow-functions")),P=/^#!.*/,B=[[F.default],[T.default]],O={enter:function(e,t){var r=e.node.loc;r&&(t.loc=r,e.stop())}},j=function(r){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];(0,u.default)(this,n);var i=(0,l.default)(this,r.call(this));return i.pipeline=t,i.log=new A.default(i,e.filename||"unknown"),i.opts=i.initOptions(e),i.parserOpts={sourceType:i.opts.sourceType,sourceFileName:i.opts.filename,plugins:[]},i.pluginVisitors=[],i.pluginPasses=[],i.buildPluginsForOptions(i.opts),i.opts.passPerPreset&&(i.perPresetOpts=[],i.opts.presets.forEach(function(e){var t=(0,o.default)((0,a.default)(i.opts),e);i.perPresetOpts.push(t),i.buildPluginsForOptions(t)})),i.metadata={usedHelpers:[],marked:[],modules:{imports:[],exports:{exported:[],specifiers:[]}}},i.dynamicImportTypes={},i.dynamicImportIds={},i.dynamicImports=[],i.declarations={},i.usedHelpers={},i.path=null,i.ast={},i.code="",i.shebang="",i.hub=new y.Hub(i),i}return(0,c.default)(n,r),n.prototype.getMetadata=function(){for(var e=!1,t=this.ast.program.body,r=Array.isArray(t),n=0,t=r?t:(0,s.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var a=i;if(w.isModuleDeclaration(a)){e=!0;break}}e&&this.path.traverse(h,this)},n.prototype.initOptions=function(e){(e=new d.default(this.log,this.pipeline).init(e)).inputSourceMap&&(e.sourceMaps=!0),e.moduleId&&(e.moduleIds=!0),e.basename=_.default.basename(e.filename,_.default.extname(e.filename)),e.ignore=S.arrayify(e.ignore,S.regexify),e.only&&(e.only=S.arrayify(e.only,S.regexify)),(0,E.default)(e,{moduleRoot:e.sourceRoot}),(0,E.default)(e,{sourceRoot:e.moduleRoot}),(0,E.default)(e,{filenameRelative:e.filename});var t=_.default.basename(e.filenameRelative);return(0,E.default)(e,{sourceFileName:t,sourceMapTarget:t}),e},n.prototype.buildPluginsForOptions=function(e){if(Array.isArray(e.plugins)){for(var t=[],r=[],n=e.plugins.concat(B),i=Array.isArray(n),a=0,n=i?n:(0,s.default)(n);;){var o;if(i){if(a>=n.length)break;o=n[a++]}else{if((a=n.next()).done)break;o=a.value}var u=o,l=u[0],c=u[1];t.push(l.visitor),r.push(new m.default(this,l,c)),l.manipulateOptions&&l.manipulateOptions(e,this.parserOpts,this)}this.pluginVisitors.push(t),this.pluginPasses.push(r)}},n.prototype.getModuleName=function(){var e=this.opts;if(!e.moduleIds)return null;if(null!=e.moduleId&&!e.getModuleId)return e.moduleId;var t=e.filenameRelative,r="";if(null!=e.moduleRoot&&(r=e.moduleRoot+"/"),!e.filenameRelative)return r+e.filename.replace(/^\//,"");if(null!=e.sourceRoot){var n=new RegExp("^"+e.sourceRoot+"/?");t=t.replace(n,"")}return t=t.replace(/\.(\w*?)$/,""),r+=t,r=r.replace(/\\/g,"/"),e.getModuleId?e.getModuleId(r)||r:r},n.prototype.resolveModuleSource=function(e){var t=this.opts.resolveModuleSource;return t&&(e=t(e,this.opts.filename)),e},n.prototype.addImport=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,n=e+":"+t,i=this.dynamicImportIds[n];if(!i){e=this.resolveModuleSource(e),i=this.dynamicImportIds[n]=this.scope.generateUidIdentifier(r);var s=[];"*"===t?s.push(w.importNamespaceSpecifier(i)):"default"===t?s.push(w.importDefaultSpecifier(i)):s.push(w.importSpecifier(i,w.identifier(t)));var a=w.importDeclaration(s,w.stringLiteral(e));a._blockHoist=3,this.path.unshiftContainer("body",a)}return i},n.prototype.addHelper=function(e){var t=this.declarations[e];if(t)return t;this.usedHelpers[e]||(this.metadata.usedHelpers.push(e),this.usedHelpers[e]=!0);var r=this.get("helperGenerator"),n=this.get("helpersNamespace");if(r){var i=r(e);if(i)return i}else if(n)return w.memberExpression(n,w.identifier(e));var s=(0,p.default)(e),a=this.declarations[e]=this.scope.generateUidIdentifier(e);return w.isFunctionExpression(s)&&!s.id?(s.body._compact=!0,s._generated=!0,s.id=a,s.type="FunctionDeclaration",this.path.unshiftContainer("body",s)):(s._compact=!0,this.scope.push({id:a,init:s,unique:!0})),a},n.prototype.addTemplateObject=function(e,t,r){var n=r.elements.map(function(e){return e.value}),i=e+"_"+r.elements.length+"_"+n.join(","),s=this.declarations[i];if(s)return s;var a=this.declarations[i]=this.scope.generateUidIdentifier("templateObject"),o=this.addHelper(e),u=w.callExpression(o,[t,r]);return u._compact=!0,this.scope.push({id:a,init:u,_blockHoist:1.9}),a},n.prototype.buildCodeFrameError=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:SyntaxError,n=e&&(e.loc||e._loc),i=new r(t);return n?i.loc=n.start:((0,g.default)(e,O,this.scope,i),i.message+=" (This is an error on an internal node. Probably an internal error",i.loc&&(i.message+=". Location has been estimated."),i.message+=")"),i},n.prototype.mergeSourceMap=function(e){var t=this.opts.inputSourceMap;if(t){var r=new b.default.SourceMapConsumer(t),n=new b.default.SourceMapConsumer(e),i=new b.default.SourceMapGenerator({file:r.file,sourceRoot:r.sourceRoot}),s=n.sources[0];r.eachMapping(function(e){var t=n.generatedPositionFor({line:e.generatedLine,column:e.generatedColumn,source:s});null!=t.column&&i.addMapping({source:e.source,original:null==e.source?null:{line:e.originalLine,column:e.originalColumn},generated:t})});var a=i.toJSON();return t.mappings=a.mappings,t}return e},n.prototype.parse=function(r){var n=C.parse,i=this.opts.parserOpts;if(i&&(i=(0,o.default)({},this.parserOpts,i)).parser){if("string"==typeof i.parser){var s=_.default.dirname(this.opts.filename)||t.cwd(),a=(0,k.default)(i.parser,s);if(!a)throw new Error("Couldn't find parser "+i.parser+' with "parse" method relative to directory '+s);n=e(a).parse}else n=i.parser;i.parser={parse:function(e){return(0,C.parse)(e,i)}}}this.log.debug("Parse start");var u=n(r,i||this.parserOpts);return this.log.debug("Parse stop"),u},n.prototype._addAst=function(e){this.path=y.NodePath.get({hub:this.hub,parentPath:null,parent:e,container:e,key:"program"}).setContext(),this.scope=this.path.scope,this.ast=e,this.getMetadata()},n.prototype.addAst=function(e){this.log.debug("Start set AST"),this._addAst(e),this.log.debug("End set AST")},n.prototype.transform=function(){for(var e=0;e<this.pluginPasses.length;e++){var t=this.pluginPasses[e];this.call("pre",t),this.log.debug("Start transform traverse");var r=g.default.visitors.merge(this.pluginVisitors[e],t,this.opts.wrapPluginVisitorMethod);(0,g.default)(this.ast,r,this.scope),this.log.debug("End transform traverse"),this.call("post",t)}return this.generate()},n.prototype.wrap=function(e,r){e+="";try{return this.shouldIgnore()?this.makeResult({code:e,ignored:!0}):r()}catch(r){if(r._babel)throw r;r._babel=!0;var n=r.message=this.opts.filename+": "+r.message,i=r.loc;if(i&&(r.codeFrame=(0,x.default)(e,i.line,i.column+1,this.opts),n+="\n"+r.codeFrame),t.browser&&(r.message=n),r.stack){var s=r.stack.replace(r.message,n);r.stack=s}throw r}},n.prototype.addCode=function(e){e=(e||"")+"",e=this.parseInputSourceMap(e),this.code=e},n.prototype.parseCode=function(){this.parseShebang();var e=this.parse(this.code);this.addAst(e)},n.prototype.shouldIgnore=function(){var e=this.opts;return S.shouldIgnore(e.filename,e.ignore,e.only)},n.prototype.call=function(e,t){for(var r=t,n=Array.isArray(r),i=0,r=n?r:(0,s.default)(r);;){var a;if(n){if(i>=r.length)break;a=r[i++]}else{if((i=r.next()).done)break;a=i.value}var o=a,u=o.plugin[e];u&&u.call(o,this)}},n.prototype.parseInputSourceMap=function(e){var t=this.opts;if(!1!==t.inputSourceMap){var r=f.default.fromSource(e);r&&(t.inputSourceMap=r.toObject(),e=f.default.removeComments(e))}return e},n.prototype.parseShebang=function(){var e=P.exec(this.code);e&&(this.shebang=e[0],this.code=this.code.replace(P,""))},n.prototype.makeResult=function(e){var t=e.code,r=e.map,n=e.ast,i=e.ignored,s={metadata:null,options:this.opts,ignored:!!i,code:null,ast:null,map:r||null};return this.opts.code&&(s.code=t),this.opts.ast&&(s.ast=n),this.opts.metadata&&(s.metadata=this.metadata),s},n.prototype.generate=function(){var r=this.opts,n=this.ast,i={ast:n};if(!r.code)return this.makeResult(i);var s=v.default;if(r.generatorOpts.generator&&"string"==typeof(s=r.generatorOpts.generator)){var a=_.default.dirname(this.opts.filename)||t.cwd(),u=(0,k.default)(s,a);if(!u)throw new Error("Couldn't find generator "+s+' with "print" method relative to directory '+a);s=e(u).print}this.log.debug("Generation start");var l=s(n,r.generatorOpts?(0,o.default)(r,r.generatorOpts):r,this.code);return i.code=l.code,i.map=l.map,this.log.debug("Generation end"),this.shebang&&(i.code=this.shebang+"\n"+i.code),i.map&&(i.map=this.mergeSourceMap(i.map)),"inline"!==r.sourceMaps&&"both"!==r.sourceMaps||(i.code+="\n"+f.default.fromObject(i.map).toComment()),"inline"===r.sourceMaps&&(i.map=null),this.makeResult(i)},n}(D.default);r.default=j,r.File=j}).call(this,e("_process"))},{"../../helpers/resolve":40,"../../store":41,"../../util":57,"../internal-plugins/block-hoist":52,"../internal-plugins/shadow-functions":53,"../plugin-pass":55,"./logger":44,"./metadata":45,"./options/option-manager":49,_process:550,"babel-code-frame":21,"babel-generator":85,"babel-helpers":109,"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/object/assign":124,"babel-runtime/core-js/object/create":125,"babel-runtime/helpers/classCallCheck":134,"babel-runtime/helpers/inherits":135,"babel-runtime/helpers/possibleConstructorReturn":137,"babel-traverse":143,"babel-types":178,babylon:186,"convert-source-map":58,"lodash/defaults":495,path:546,"source-map":72}],44:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/helpers/classCallCheck")),s=n(e("debug/node")),a=(0,s.default)("babel:verbose"),o=(0,s.default)("babel"),u=[],l=function(){function e(t,r){(0,i.default)(this,e),this.filename=r,this.file=t}return e.prototype._buildMessage=function(e){var t="[BABEL] "+this.filename;return e&&(t+=": "+e),t},e.prototype.warn=function(e){console.warn(this._buildMessage(e))},e.prototype.error=function(e){throw new(arguments.length>1&&void 0!==arguments[1]?arguments[1]:Error)(this._buildMessage(e))},e.prototype.deprecate=function(e){this.file.opts&&this.file.opts.suppressDeprecationMessages||(e=this._buildMessage(e),u.indexOf(e)>=0||(u.push(e),console.error(e)))},e.prototype.verbose=function(e){a.enabled&&a(this._buildMessage(e))},e.prototype.debug=function(e){o.enabled&&o(this._buildMessage(e))},e.prototype.deopt=function(e,t){this.debug(t)},e}();r.default=l,t.exports=r.default},{"babel-runtime/helpers/classCallCheck":134,"debug/node":59}],45:[function(e,t,r){"use strict";r.__esModule=!0,r.ImportDeclaration=r.ModuleDeclaration=void 0;var n=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/get-iterator"));r.ExportDeclaration=function(e,t){var r=e.node,s=r.source?r.source.value:null,a=t.metadata.modules.exports,o=e.get("declaration");if(o.isStatement()){var u=o.getBindingIdentifiers();for(var l in u)a.exported.push(l),a.specifiers.push({kind:"local",local:l,exported:e.isExportDefaultDeclaration()?"default":l})}if(e.isExportNamedDeclaration()&&r.specifiers)for(var c=r.specifiers,p=Array.isArray(c),h=0,c=p?c:(0,n.default)(c);;){var f;if(p){if(h>=c.length)break;f=c[h++]}else{if((h=c.next()).done)break;f=h.value}var d=f,m=d.exported.name;a.exported.push(m),i.isExportDefaultSpecifier(d)&&a.specifiers.push({kind:"external",local:m,exported:m,source:s}),i.isExportNamespaceSpecifier(d)&&a.specifiers.push({kind:"external-namespace",exported:m,source:s});var y=d.local;y&&(s&&a.specifiers.push({kind:"external",local:y.name,exported:m,source:s}),s||a.specifiers.push({kind:"local",local:y.name,exported:m}))}e.isExportAllDeclaration()&&a.specifiers.push({kind:"external-all",source:s})},r.Scope=function(e){e.skip()};var i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));r.ModuleDeclaration={enter:function(e,t){var r=e.node;r.source&&(r.source.value=t.resolveModuleSource(r.source.value))}},r.ImportDeclaration={exit:function(e,t){var r=e.node,i=[],s=[];t.metadata.modules.imports.push({source:r.source.value,imported:s,specifiers:i});for(var a=e.get("specifiers"),o=Array.isArray(a),u=0,a=o?a:(0,n.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if((u=a.next()).done)break;l=u.value}var c=l,p=c.node.local.name;if(c.isImportDefaultSpecifier()&&(s.push("default"),i.push({kind:"named",imported:"default",local:p})),c.isImportSpecifier()){var h=c.node.imported.name;s.push(h),i.push({kind:"named",imported:h,local:p})}c.isImportNamespaceSpecifier()&&(s.push("*"),i.push({kind:"namespace",local:p}))}}}},{"babel-runtime/core-js/get-iterator":120,"babel-types":178}],46:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=f[e];return null==t?f[e]=h.default.existsSync(e):t}r.__esModule=!0;var a=i(e("babel-runtime/core-js/object/assign")),o=i(e("babel-runtime/helpers/classCallCheck"));r.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1],r=e.filename,n=new m(t);return!1!==e.babelrc&&n.findConfigs(r),n.mergeConfig({options:e,alias:"base",dirname:r&&p.default.dirname(r)}),n.configs};var u=i(e("../../../helpers/resolve")),l=i(e("json5")),c=i(e("path-is-absolute")),p=i(e("path")),h=i(e("fs")),f={},d={},m=function(){function e(t){(0,o.default)(this,e),this.resolvedConfigs=[],this.configs=[],this.log=t}return e.prototype.findConfigs=function(e){if(e){(0,c.default)(e)||(e=p.default.join(n.cwd(),e));for(var t=!1,r=!1;e!==(e=p.default.dirname(e));){if(!t){var i=p.default.join(e,".babelrc");s(i)&&(this.addConfig(i),t=!0);var a=p.default.join(e,"package.json");!t&&s(a)&&(t=this.addConfig(a,"babel",JSON))}if(!r){var o=p.default.join(e,".babelignore");s(o)&&(this.addIgnoreConfig(o),r=!0)}if(r&&t)return}}},e.prototype.addIgnoreConfig=function(e){var t=h.default.readFileSync(e,"utf8").split("\n");(t=t.map(function(e){return e.replace(/#(.*?)$/,"").trim()}).filter(function(e){return!!e})).length&&this.mergeConfig({options:{ignore:t},alias:e,dirname:p.default.dirname(e)})},e.prototype.addConfig=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default;if(this.resolvedConfigs.indexOf(e)>=0)return!1;this.resolvedConfigs.push(e);var n=h.default.readFileSync(e,"utf8"),i=void 0;try{i=d[n]=d[n]||r.parse(n),t&&(i=i[t])}catch(t){throw t.message=e+": Error while parsing JSON - "+t.message,t}return this.mergeConfig({options:i,alias:e,dirname:p.default.dirname(e)}),!!i},e.prototype.mergeConfig=function(e){var t=e.options,r=e.alias,i=e.loc,s=e.dirname;if(!t)return!1;if(t=(0,a.default)({},t),s=s||n.cwd(),i=i||r,t.extends){var o=(0,u.default)(t.extends,s);o?this.addConfig(o):this.log&&this.log.error("Couldn't resolve extends clause of "+t.extends+" in "+r),delete t.extends}this.configs.push({options:t,alias:r,loc:i,dirname:s});var l=void 0,c=n.env.BABEL_ENV||n.env.NODE_ENV||"development";t.env&&(l=t.env[c],delete t.env),this.mergeConfig({options:l,alias:r+".env."+c,dirname:s})},e}();t.exports=r.default}).call(this,e("_process"))},{"../../../helpers/resolve":40,_process:550,"babel-runtime/core-js/object/assign":124,"babel-runtime/helpers/classCallCheck":134,fs:191,json5:324,path:546,"path-is-absolute":547}],47:[function(e,t,r){"use strict";t.exports={filename:{type:"filename",description:"filename to use when reading from stdin - this will be used in source-maps, errors etc",default:"unknown",shorthand:"f"},filenameRelative:{hidden:!0,type:"string"},inputSourceMap:{hidden:!0},env:{hidden:!0,default:{}},mode:{description:"",hidden:!0},retainLines:{type:"boolean",default:!1,description:"retain line numbers - will result in really ugly code"},highlightCode:{description:"enable/disable ANSI syntax highlighting of code frames (on by default)",type:"boolean",default:!0},suppressDeprecationMessages:{type:"boolean",default:!1,hidden:!0},presets:{type:"list",description:"",default:[]},plugins:{type:"list",default:[],description:""},ignore:{type:"list",description:"list of glob paths to **not** compile",default:[]},only:{type:"list",description:"list of glob paths to **only** compile"},code:{hidden:!0,default:!0,type:"boolean"},metadata:{hidden:!0,default:!0,type:"boolean"},ast:{hidden:!0,default:!0,type:"boolean"},extends:{type:"string",hidden:!0},comments:{type:"boolean",default:!0,description:"write comments to generated output (true by default)"},shouldPrintComment:{hidden:!0,description:"optional callback to control whether a comment should be inserted, when this is used the comments option is ignored"},wrapPluginVisitorMethod:{hidden:!0,description:"optional callback to wrap all visitor methods"},compact:{type:"booleanString",default:"auto",description:"do not include superfluous whitespace characters and line terminators [true|false|auto]"},minified:{type:"boolean",default:!1,description:"save as much bytes when printing [true|false]"},sourceMap:{alias:"sourceMaps",hidden:!0},sourceMaps:{type:"booleanString",description:"[true|false|inline]",default:!1,shorthand:"s"},sourceMapTarget:{type:"string",description:"set `file` on returned source map"},sourceFileName:{type:"string",description:"set `sources[0]` on returned source map"},sourceRoot:{type:"filename",description:"the root from which all sources are relative"},babelrc:{description:"Whether or not to look up .babelrc and .babelignore files",type:"boolean",default:!0},sourceType:{description:"",default:"module"},auxiliaryCommentBefore:{type:"string",description:"print a comment before any injected non-user code"},auxiliaryCommentAfter:{type:"string",description:"print a comment after any injected non-user code"},resolveModuleSource:{hidden:!0},getModuleId:{hidden:!0},moduleRoot:{type:"filename",description:"optional prefix for the AMD module formatter that will be prepend to the filename on module definitions"},moduleIds:{type:"boolean",default:!1,shorthand:"M",description:"insert an explicit id for modules"},moduleId:{description:"specify a custom name for module ids",type:"string"},passPerPreset:{description:"Whether to spawn a traversal pass per a preset. By default all presets are merged.",type:"boolean",default:!1,hidden:!0},parserOpts:{description:"Options to pass into the parser, or to change parsers (parserOpts.parser)",default:!1},generatorOpts:{description:"Options to pass into the generator, or to change generators (generatorOpts.generator)",default:!1}}},{}],48:[function(e,t,r){"use strict";r.__esModule=!0,r.config=void 0,r.normaliseOptions=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var t in e){var r=e[t];if(null!=r){var s=i.default[t];if(s&&s.alias&&(s=i.default[s.alias]),s){var a=n[s.type];a&&(r=a(r)),e[t]=r}}}return e};var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("./parsers")),i=function(e){return e&&e.__esModule?e:{default:e}}(e("./config"));r.config=i.default},{"./config":47,"./parsers":50}],49:[function(e,t,r){(function(n){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function s(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var a=s(e("babel-runtime/helpers/objectWithoutProperties")),o=s(e("babel-runtime/core-js/json/stringify")),u=s(e("babel-runtime/core-js/object/assign")),l=s(e("babel-runtime/core-js/get-iterator")),c=s(e("babel-runtime/helpers/typeof")),p=s(e("babel-runtime/helpers/classCallCheck")),h=i(e("../../../api/node")),f=s(e("../../plugin")),d=i(e("babel-messages")),m=e("./index"),y=s(e("../../../helpers/resolve-plugin")),g=s(e("../../../helpers/resolve-preset")),b=s(e("lodash/cloneDeepWith")),v=s(e("lodash/clone")),x=s(e("../../../helpers/merge")),E=s(e("./config")),A=s(e("./removed")),D=s(e("./build-config-chain")),C=s(e("path")),S=function(){function t(e){(0,p.default)(this,t),this.resolvedConfigs=[],this.options=t.createBareOptions(),this.log=e}return t.memoisePluginContainer=function(e,r,n,i){for(var s=t.memoisedPlugins,a=Array.isArray(s),o=0,s=a?s:(0,l.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if((o=s.next()).done)break;u=o.value}var p=u;if(p.container===e)return p.plugin}var m=void 0;if("object"===(void 0===(m="function"==typeof e?e(h):e)?"undefined":(0,c.default)(m))){var y=new f.default(m,i);return t.memoisedPlugins.push({container:e,plugin:y}),y}throw new TypeError(d.get("pluginNotObject",r,n,void 0===m?"undefined":(0,c.default)(m))+r+n)},t.createBareOptions=function(){var e={};for(var t in E.default){var r=E.default[t];e[t]=(0,v.default)(r.default)}return e},t.normalisePlugin=function(e,r,n,i){if(!((e=e.__esModule?e.default:e)instanceof f.default)){if("function"!=typeof e&&"object"!==(void 0===e?"undefined":(0,c.default)(e)))throw new TypeError(d.get("pluginNotFunction",r,n,void 0===e?"undefined":(0,c.default)(e)));e=t.memoisePluginContainer(e,r,n,i)}return e.init(r,n),e},t.normalisePlugins=function(r,n,i){return i.map(function(i,s){var a=void 0,o=void 0;if(!i)throw new TypeError("Falsy value found in plugins");Array.isArray(i)?(a=i[0],o=i[1]):a=i;var u="string"==typeof a?a:r+"$"+s;if("string"==typeof a){var l=(0,y.default)(a,n);if(!l)throw new ReferenceError(d.get("pluginUnknown",a,r,s,n));a=e(l)}return a=t.normalisePlugin(a,r,s,u),[a,o]})},t.prototype.mergeOptions=function(e){var r=this,i=e.options,s=e.extending,a=e.alias,o=e.loc,l=e.dirname;if(a=a||"foreign",i){("object"!==(void 0===i?"undefined":(0,c.default)(i))||Array.isArray(i))&&this.log.error("Invalid options type for "+a,TypeError);var p=(0,b.default)(i,function(e){if(e instanceof f.default)return e});l=l||n.cwd(),o=o||a;for(var h in p){if(!E.default[h]&&this.log)if(A.default[h])this.log.error("Using removed Babel 5 option: "+a+"."+h+" - "+A.default[h].message,ReferenceError);else{var d="Unknown option: "+a+"."+h+". Check out http://babeljs.io/docs/usage/options/ for more information about options.";this.log.error(d+"\n\nA common cause of this error is the presence of a configuration options object without the corresponding preset name. Example:\n\nInvalid:\n `{ presets: [{option: value}] }`\nValid:\n `{ presets: [['presetName', {option: value}]] }`\n\nFor more detailed information on preset configuration, please see http://babeljs.io/docs/plugins/#pluginpresets-options.",ReferenceError)}}(0,m.normaliseOptions)(p),p.plugins&&(p.plugins=t.normalisePlugins(o,l,p.plugins)),p.presets&&(p.passPerPreset?p.presets=this.resolvePresets(p.presets,l,function(e,t){r.mergeOptions({options:e,extending:e,alias:t,loc:t,dirname:l})}):(this.mergePresets(p.presets,l),delete p.presets)),i===s?(0,u.default)(s,p):(0,x.default)(s||this.options,p)}},t.prototype.mergePresets=function(e,t){var r=this;this.resolvePresets(e,t,function(e,t){r.mergeOptions({options:e,alias:t,loc:t,dirname:C.default.dirname(t||"")})})},t.prototype.resolvePresets=function(t,r,n){return t.map(function(t){var i=void 0;if(Array.isArray(t)){if(t.length>2)throw new Error("Unexpected extra options "+(0,o.default)(t.slice(2))+" passed to preset.");var s=t;t=s[0],i=s[1]}var u=void 0;try{if("string"==typeof t){if(!(u=(0,g.default)(t,r)))throw new Error("Couldn't find preset "+(0,o.default)(t)+" relative to directory "+(0,o.default)(r));t=e(u)}if("object"===(void 0===t?"undefined":(0,c.default)(t))&&t.__esModule)if(t.default)t=t.default;else{var l=t;l.__esModule;t=(0,a.default)(l,["__esModule"])}if("object"===(void 0===t?"undefined":(0,c.default)(t))&&t.buildPreset&&(t=t.buildPreset),"function"!=typeof t&&void 0!==i)throw new Error("Options "+(0,o.default)(i)+" passed to "+(u||"a preset")+" which does not accept options.");if("function"==typeof t&&(t=t(h,i,{dirname:r})),"object"!==(void 0===t?"undefined":(0,c.default)(t)))throw new Error("Unsupported preset format: "+t+".");n&&n(t,u)}catch(e){throw u&&(e.message+=" (While processing preset: "+(0,o.default)(u)+")"),e}return t})},t.prototype.normaliseOptions=function(){var e=this.options;for(var t in E.default){var r=E.default[t],n=e[t];!n&&r.optional||(r.alias?e[r.alias]=e[r.alias]||n:e[t]=n)}},t.prototype.init=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,D.default)(e,this.log),r=Array.isArray(t),n=0,t=r?t:(0,l.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i;this.mergeOptions(s)}return this.normaliseOptions(e),this.options},t}();r.default=S,S.memoisedPlugins=[],t.exports=r.default}).call(this,e("_process"))},{"../../../api/node":32,"../../../helpers/merge":35,"../../../helpers/resolve-plugin":38,"../../../helpers/resolve-preset":39,"../../plugin":56,"./build-config-chain":46,"./config":47,"./index":48,"./removed":51,_process:550,"babel-messages":110,"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/json/stringify":121,"babel-runtime/core-js/object/assign":124,"babel-runtime/helpers/classCallCheck":134,"babel-runtime/helpers/objectWithoutProperties":136,"babel-runtime/helpers/typeof":138,"lodash/clone":491,"lodash/cloneDeepWith":493,path:546}],50:[function(e,t,r){"use strict";r.__esModule=!0,r.filename=void 0,r.boolean=function(e){return!!e},r.booleanString=function(e){return i.booleanify(e)},r.list=function(e){return i.list(e)};var n=function(e){return e&&e.__esModule?e:{default:e}}(e("slash")),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("../../../util"));r.filename=n.default},{"../../../util":57,slash:603}],51:[function(e,t,r){"use strict";t.exports={auxiliaryComment:{message:"Use `auxiliaryCommentBefore` or `auxiliaryCommentAfter`"},blacklist:{message:"Put the specific transforms you want in the `plugins` option"},breakConfig:{message:"This is not a necessary option in Babel 6"},experimental:{message:"Put the specific transforms you want in the `plugins` option"},externalHelpers:{message:"Use the `external-helpers` plugin instead. Check out http://babeljs.io/docs/plugins/external-helpers/"},extra:{message:""},jsxPragma:{message:"use the `pragma` option in the `react-jsx` plugin . Check out http://babeljs.io/docs/plugins/transform-react-jsx/"},loose:{message:"Specify the `loose` option for the relevant plugin you are using or use a preset that sets the option."},metadataUsedHelpers:{message:"Not required anymore as this is enabled by default"},modules:{message:"Use the corresponding module transform plugin in the `plugins` option. Check out http://babeljs.io/docs/plugins/#modules"},nonStandard:{message:"Use the `react-jsx` and `flow-strip-types` plugins to support JSX and Flow. Also check out the react preset http://babeljs.io/docs/plugins/preset-react/"},optional:{message:"Put the specific transforms you want in the `plugins` option"},sourceMapName:{message:"Use the `sourceMapTarget` option"},stage:{message:"Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets"},whitelist:{message:"Put the specific transforms you want in the `plugins` option"}}},{}],52:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("../plugin")),s=n(e("lodash/sortBy"));r.default=new i.default({name:"internal.blockHoist",visitor:{Block:{exit:function(e){for(var t=e.node,r=!1,n=0;n<t.body.length;n++){var i=t.body[n];if(i&&null!=i._blockHoist){r=!0;break}}r&&(t.body=(0,s.default)(t.body,function(e){var t=e&&e._blockHoist;return null==t&&(t=1),!0===t&&(t=2),-1*t}))}}}}),t.exports=r.default},{"../plugin":56,"lodash/sortBy":531}],53:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var r=e.inShadow(t);if(function(e,t){return!!e.is("_forceShadow")||t}(e,r)){var n=e.node._shadowedFunctionLiteral,i=void 0,s=!1,a=e.find(function(t){if(t.parentPath&&t.parentPath.isClassProperty()&&"value"===t.key)return!0;if(e===t)return!1;if((t.isProgram()||t.isFunction())&&(i=i||t),t.isProgram())return s=!0,!0;if(t.isFunction()&&!t.isArrowFunctionExpression()){if(n){if(t===n||t.node===n.node)return!0}else if(!t.is("shadow"))return!0;return s=!0,!1}return!1});if(n&&a.isProgram()&&!n.isProgram()&&(a=e.findParent(function(e){return e.isProgram()||e.isFunction()})),a!==i&&s){var u=a.getData(t);if(u)return e.replaceWith(u);var c=e.scope.generateUidIdentifier(t);a.setData(t,c);var p=a.findParent(function(e){return e.isClass()}),h=!!(p&&p.node&&p.node.superClass);if("this"===t&&a.isMethod({kind:"constructor"})&&h)a.scope.push({id:c}),a.traverse(l,{id:c});else{var f="this"===t?o.thisExpression():o.identifier(t);n&&(f._shadowedFunctionLiteral=n),a.scope.push({id:c,init:f})}return e.replaceWith(c)}}}r.__esModule=!0;var s=n(e("babel-runtime/core-js/symbol")),a=n(e("../plugin")),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types")),u=(0,s.default)("super this bound"),l={CallExpression:function(e){if(e.get("callee").isSuper()){var t=e.node;t[u]||(t[u]=!0,e.replaceWith(o.assignmentExpression("=",this.id,t)))}}};r.default=new a.default({name:"internal.shadowFunctions",visitor:{ThisExpression:function(e){i(e,"this")},ReferencedIdentifier:function(e){"arguments"===e.node.name&&i(e,"arguments")}}}),t.exports=r.default},{"../plugin":56,"babel-runtime/core-js/symbol":129,"babel-types":178}],54:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/helpers/classCallCheck")),s=n(e("../helpers/normalize-ast")),a=n(e("./plugin")),o=n(e("./file")),u=function(){function e(){(0,i.default)(this,e)}return e.prototype.lint=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.code=!1,t.mode="lint",this.transform(e,t)},e.prototype.pretransform=function(e,t){var r=new o.default(t,this);return r.wrap(e,function(){return r.addCode(e),r.parseCode(e),r})},e.prototype.transform=function(e,t){var r=new o.default(t,this);return r.wrap(e,function(){return r.addCode(e),r.parseCode(e),r.transform()})},e.prototype.analyse=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments[2];return t.code=!1,r&&(t.plugins=t.plugins||[],t.plugins.push(new a.default({visitor:r}))),this.transform(e,t).metadata},e.prototype.transformFromAst=function(e,t,r){e=(0,s.default)(e);var n=new o.default(r,this);return n.wrap(t,function(){return n.addCode(t),n.addAst(e),n.transform()})},e}();r.default=u,t.exports=r.default},{"../helpers/normalize-ast":36,"./file":43,"./plugin":56,"babel-runtime/helpers/classCallCheck":134}],55:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/helpers/classCallCheck")),s=n(e("babel-runtime/helpers/possibleConstructorReturn")),a=n(e("babel-runtime/helpers/inherits")),o=n(e("../store")),u=(n(e("./file")),function(e){function t(r,n){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,i.default)(this,t);var o=(0,s.default)(this,e.call(this));return o.plugin=n,o.key=n.key,o.file=r,o.opts=a,o}return(0,a.default)(t,e),t.prototype.addHelper=function(){var e;return(e=this.file).addHelper.apply(e,arguments)},t.prototype.addImport=function(){var e;return(e=this.file).addImport.apply(e,arguments)},t.prototype.getModuleName=function(){var e;return(e=this.file).getModuleName.apply(e,arguments)},t.prototype.buildCodeFrameError=function(){var e;return(e=this.file).buildCodeFrameError.apply(e,arguments)},t}(o.default));r.default=u,t.exports=r.default},{"../store":41,"./file":43,"babel-runtime/helpers/classCallCheck":134,"babel-runtime/helpers/inherits":135,"babel-runtime/helpers/possibleConstructorReturn":137}],56:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/get-iterator")),s=n(e("babel-runtime/helpers/classCallCheck")),a=n(e("babel-runtime/helpers/possibleConstructorReturn")),o=n(e("babel-runtime/helpers/inherits")),u=n(e("./file/options/option-manager")),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-messages")),c=n(e("../store")),p=n(e("babel-traverse")),h=n(e("lodash/assign")),f=n(e("lodash/clone")),d=["enter","exit"],m=function(e){function t(r,n){(0,s.default)(this,t);var i=(0,a.default)(this,e.call(this));return i.initialized=!1,i.raw=(0,h.default)({},r),i.key=i.take("name")||n,i.manipulateOptions=i.take("manipulateOptions"),i.post=i.take("post"),i.pre=i.take("pre"),i.visitor=i.normaliseVisitor((0,f.default)(i.take("visitor"))||{}),i}return(0,o.default)(t,e),t.prototype.take=function(e){var t=this.raw[e];return delete this.raw[e],t},t.prototype.chain=function(e,t){if(!e[t])return this[t];if(!this[t])return e[t];var r=[e[t],this[t]];return function(){for(var e=void 0,t=arguments.length,n=Array(t),s=0;s<t;s++)n[s]=arguments[s];for(var a=r,o=Array.isArray(a),u=0,a=o?a:(0,i.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if((u=a.next()).done)break;l=u.value}if(l){var c=l.apply(this,n);null!=c&&(e=c)}}return e}},t.prototype.maybeInherit=function(e){var t=this.take("inherits");t&&(t=u.default.normalisePlugin(t,e,"inherits"),this.manipulateOptions=this.chain(t,"manipulateOptions"),this.post=this.chain(t,"post"),this.pre=this.chain(t,"pre"),this.visitor=p.default.visitors.merge([t.visitor,this.visitor]))},t.prototype.init=function(e,t){if(!this.initialized){this.initialized=!0,this.maybeInherit(e);for(var r in this.raw)throw new Error(l.get("pluginInvalidProperty",e,t,r))}},t.prototype.normaliseVisitor=function(e){for(var t=d,r=Array.isArray(t),n=0,t=r?t:(0,i.default)(t);;){var s;if(r){if(n>=t.length)break;s=t[n++]}else{if((n=t.next()).done)break;s=n.value}if(e[s])throw new Error("Plugins aren't allowed to specify catch-all enter/exit handlers. Please target individual nodes.")}return p.default.explode(e),e},t}(c.default);r.default=m,t.exports=r.default},{"../store":41,"./file/options/option-manager":49,"babel-messages":110,"babel-runtime/core-js/get-iterator":120,"babel-runtime/helpers/classCallCheck":134,"babel-runtime/helpers/inherits":135,"babel-runtime/helpers/possibleConstructorReturn":137,"babel-traverse":143,"lodash/assign":488,"lodash/clone":491}],57:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var r=t||i.EXTENSIONS,n=m.default.extname(e);return(0,f.default)(r,n)}function s(e){return e?Array.isArray(e)?e:"string"==typeof e?e.split(","):[e]:[]}function a(e,t){return e?"boolean"==typeof e?a([e],t):"string"==typeof e?a(s(e),t):Array.isArray(e)?(t&&(e=e.map(t)),e):[e]:[]}function o(e,t){return"function"==typeof e?e(t):e.test(t)}r.__esModule=!0,r.inspect=r.inherits=void 0;var u=n(e("babel-runtime/core-js/get-iterator")),l=e("util");Object.defineProperty(r,"inherits",{enumerable:!0,get:function(){return l.inherits}}),Object.defineProperty(r,"inspect",{enumerable:!0,get:function(){return l.inspect}}),r.canCompile=i,r.list=s,r.regexify=function(e){if(!e)return new RegExp(/.^/);if(Array.isArray(e)&&(e=new RegExp(e.map(c.default).join("|"),"i")),"string"==typeof e){e=(0,y.default)(e),((0,p.default)(e,"./")||(0,p.default)(e,"*/"))&&(e=e.slice(2)),(0,p.default)(e,"**/")&&(e=e.slice(3));var t=h.default.makeRe(e,{nocase:!0});return new RegExp(t.source.slice(1,-1),"i")}if((0,d.default)(e))return e;throw new TypeError("illegal type for regexify")},r.arrayify=a,r.booleanify=function(e){return"true"===e||1==e||!("false"===e||0==e||!e)&&e},r.shouldIgnore=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments[2];if(e=e.replace(/\\/g,"/"),r){for(var n=r,i=Array.isArray(n),s=0,n=i?n:(0,u.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}if(o(a,e))return!1}return!0}if(t.length)for(var l=t,c=Array.isArray(l),p=0,l=c?l:(0,u.default)(l);;){var h;if(c){if(p>=l.length)break;h=l[p++]}else{if((p=l.next()).done)break;h=p.value}if(o(h,e))return!0}return!1};var c=n(e("lodash/escapeRegExp")),p=n(e("lodash/startsWith")),h=n(e("minimatch")),f=n(e("lodash/includes")),d=n(e("lodash/isRegExp")),m=n(e("path")),y=n(e("slash"));i.EXTENSIONS=[".js",".jsx",".es6",".es"]},{"babel-runtime/core-js/get-iterator":120,"lodash/escapeRegExp":497,"lodash/includes":507,"lodash/isRegExp":519,"lodash/startsWith":532,minimatch:542,path:546,slash:603,util:613}],58:[function(e,t,r){(function(t){"use strict";function n(e,n){(n=n||{}).isFileComment&&(e=function(e,t){var n=r.mapFileCommentRegex.exec(e),a=n[1]||n[2],o=s.resolve(t,a);try{return i.readFileSync(o,"utf8")}catch(e){throw new Error("An error occurred while trying to read the map file at "+o+"\n"+e)}}(e,n.commentFileDir)),n.hasComment&&(e=function(e){return e.split(",").pop()}(e)),n.isEncoded&&(e=function(e){return new t(e,"base64").toString()}(e)),(n.isJSON||n.isEncoded)&&(e=JSON.parse(e)),this.sourcemap=e}var i=e("fs"),s=e("path");Object.defineProperty(r,"commentRegex",{get:function(){return/^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,(?:.*)$/gm}}),Object.defineProperty(r,"mapFileCommentRegex",{get:function(){return/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/gm}}),n.prototype.toJSON=function(e){return JSON.stringify(this.sourcemap,null,e)},n.prototype.toBase64=function(){var e=this.toJSON();return new t(e).toString("base64")},n.prototype.toComment=function(e){var t="sourceMappingURL=data:application/json;charset=utf-8;base64,"+this.toBase64();return e&&e.multiline?"/*# "+t+" */":"//# "+t},n.prototype.toObject=function(){return JSON.parse(this.toJSON())},n.prototype.addProperty=function(e,t){if(this.sourcemap.hasOwnProperty(e))throw new Error("property %s already exists on the sourcemap, use set property instead");return this.setProperty(e,t)},n.prototype.setProperty=function(e,t){return this.sourcemap[e]=t,this},n.prototype.getProperty=function(e){return this.sourcemap[e]},r.fromObject=function(e){return new n(e)},r.fromJSON=function(e){return new n(e,{isJSON:!0})},r.fromBase64=function(e){return new n(e,{isEncoded:!0})},r.fromComment=function(e){return e=e.replace(/^\/\*/g,"//").replace(/\*\/$/g,""),new n(e,{isEncoded:!0,hasComment:!0})},r.fromMapFileComment=function(e,t){return new n(e,{commentFileDir:t,isFileComment:!0,isJSON:!0})},r.fromSource=function(e){var t=e.match(r.commentRegex);return t?r.fromComment(t.pop()):null},r.fromMapFileSource=function(e,t){var n=e.match(r.mapFileCommentRegex);return n?r.fromMapFileComment(n.pop(),t):null},r.removeComments=function(e){return e.replace(r.commentRegex,"")},r.removeMapFileComments=function(e){return e.replace(r.mapFileCommentRegex,"")},r.generateMapFileComment=function(e,t){var r="sourceMappingURL="+e;return t&&t.multiline?"/*# "+r+" */":"//# "+r}}).call(this,e("buffer").Buffer)},{buffer:192,fs:191,path:546}],59:[function(e,t,r){t.exports=e("./src/node")},{"./src/node":61}],60:[function(e,t,r){function n(e){function t(){if(t.enabled){var e=t,n=+new Date,s=n-(i||n);e.diff=s,e.prev=i,e.curr=n,i=n;for(var a=new Array(arguments.length),o=0;o<a.length;o++)a[o]=arguments[o];a[0]=r.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");var u=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,function(t,n){if("%%"===t)return t;u++;var i=r.formatters[n];if("function"==typeof i){var s=a[u];t=i.call(e,s),a.splice(u,1),u--}return t}),r.formatArgs.call(e,a);(t.log||r.log||console.log.bind(console)).apply(e,a)}}return t.namespace=e,t.enabled=r.enabled(e),t.useColors=r.useColors(),t.color=function(e){var t,n=0;for(t in e)n=(n<<5)-n+e.charCodeAt(t),n|=0;return r.colors[Math.abs(n)%r.colors.length]}(e),"function"==typeof r.init&&r.init(t),t}(r=t.exports=n.debug=n.default=n).coerce=function(e){return e instanceof Error?e.stack||e.message:e},r.disable=function(){r.enable("")},r.enable=function(e){r.save(e),r.names=[],r.skips=[];for(var t=("string"==typeof e?e:"").split(/[\s,]+/),n=t.length,i=0;i<n;i++)t[i]&&("-"===(e=t[i].replace(/\*/g,".*?"))[0]?r.skips.push(new RegExp("^"+e.substr(1)+"$")):r.names.push(new RegExp("^"+e+"$")))},r.enabled=function(e){var t,n;for(t=0,n=r.skips.length;t<n;t++)if(r.skips[t].test(e))return!1;for(t=0,n=r.names.length;t<n;t++)if(r.names[t].test(e))return!0;return!1},r.humanize=e("ms"),r.names=[],r.skips=[],r.formatters={};var i},{ms:543}],61:[function(e,t,r){(function(n){function i(){return n.env.DEBUG}var s=e("tty"),a=e("util");(r=t.exports=e("./debug")).init=function(e){e.inspectOpts={};for(var t=Object.keys(r.inspectOpts),n=0;n<t.length;n++)e.inspectOpts[t[n]]=r.inspectOpts[t[n]]},r.log=function(){return u.write(a.format.apply(a,arguments)+"\n")},r.formatArgs=function(e){var t=this.namespace;if(this.useColors){var n=this.color,i=" [3"+n+";1m"+t+" ";e[0]=i+e[0].split("\n").join("\n"+i),e.push("[3"+n+"m+"+r.humanize(this.diff)+"")}else e[0]=(new Date).toUTCString()+" "+t+" "+e[0]},r.save=function(e){null==e?delete n.env.DEBUG:n.env.DEBUG=e},r.load=i,r.useColors=function(){return"colors"in r.inspectOpts?Boolean(r.inspectOpts.colors):s.isatty(o)},r.colors=[6,2,3,4,5,1],r.inspectOpts=Object.keys(n.env).filter(function(e){return/^debug_/i.test(e)}).reduce(function(e,t){var r=t.substring(6).toLowerCase().replace(/_([a-z])/g,function(e,t){return t.toUpperCase()}),i=n.env[t];return i=!!/^(yes|on|true|enabled)$/i.test(i)||!/^(no|off|false|disabled)$/i.test(i)&&("null"===i?null:Number(i)),e[r]=i,e},{});var o=parseInt(n.env.DEBUG_FD,10)||2;1!==o&&2!==o&&a.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 u=1===o?n.stdout:2===o?n.stderr:function(t){var r;switch(n.binding("tty_wrap").guessHandleType(t)){case"TTY":(r=new s.WriteStream(t))._type="tty",r._handle&&r._handle.unref&&r._handle.unref();break;case"FILE":(r=new(e("fs").SyncWriteStream)(t,{autoClose:!1}))._type="fs";break;case"PIPE":case"TCP":(r=new(e("net").Socket)({fd:t,readable:!1,writable:!0})).readable=!1,r.read=null,r._type="pipe",r._handle&&r._handle.unref&&r._handle.unref();break;default:throw new Error("Implement me. Unknown stream file type!")}return r.fd=t,r._isStdio=!0,r}(o);r.formatters.o=function(e){return this.inspectOpts.colors=this.useColors,a.inspect(e,this.inspectOpts).split("\n").map(function(e){return e.trim()}).join(" ")},r.formatters.O=function(e){return this.inspectOpts.colors=this.useColors,a.inspect(e,this.inspectOpts)},r.enable(i())}).call(this,e("_process"))},{"./debug":60,_process:550,fs:191,net:191,tty:609,util:613}],62:[function(e,t,r){function n(){this._array=[],this._set=a?new Map:Object.create(null)}var i=e("./util"),s=Object.prototype.hasOwnProperty,a="undefined"!=typeof Map;n.fromArray=function(e,t){for(var r=new n,i=0,s=e.length;i<s;i++)r.add(e[i],t);return r},n.prototype.size=function(){return a?this._set.size:Object.getOwnPropertyNames(this._set).length},n.prototype.add=function(e,t){var r=a?e:i.toSetString(e),n=a?this.has(e):s.call(this._set,r),o=this._array.length;n&&!t||this._array.push(e),n||(a?this._set.set(e,o):this._set[r]=o)},n.prototype.has=function(e){if(a)return this._set.has(e);var t=i.toSetString(e);return s.call(this._set,t)},n.prototype.indexOf=function(e){if(a){var t=this._set.get(e);if(t>=0)return t}else{var r=i.toSetString(e);if(s.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')},n.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},n.prototype.toArray=function(){return this._array.slice()},r.ArraySet=n},{"./util":71}],63:[function(e,t,r){var n=e("./base64");r.encode=function(e){var t,r="",i=function(e){return e<0?1+(-e<<1):0+(e<<1)}(e);do{t=31&i,(i>>>=5)>0&&(t|=32),r+=n.encode(t)}while(i>0);return r},r.decode=function(e,t,r){var i,s,a=e.length,o=0,u=0;do{if(t>=a)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(s=n.decode(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));i=!!(32&s),o+=(s&=31)<<u,u+=5}while(i);r.value=function(e){var t=e>>1;return 1==(1&e)?-t:t}(o),r.rest=t}},{"./base64":64}],64:[function(e,t,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");r.encode=function(e){if(0<=e&&e<n.length)return n[e];throw new TypeError("Must be between 0 and 63: "+e)},r.decode=function(e){return 65<=e&&e<=90?e-65:97<=e&&e<=122?e-97+26:48<=e&&e<=57?e-48+52:43==e?62:47==e?63:-1}},{}],65:[function(e,t,r){function n(e,t,i,s,a,o){var u=Math.floor((t-e)/2)+e,l=a(i,s[u],!0);return 0===l?u:l>0?t-u>1?n(u,t,i,s,a,o):o==r.LEAST_UPPER_BOUND?t<s.length?t:-1:u:u-e>1?n(e,u,i,s,a,o):o==r.LEAST_UPPER_BOUND?u:e<0?-1:e}r.GREATEST_LOWER_BOUND=1,r.LEAST_UPPER_BOUND=2,r.search=function(e,t,i,s){if(0===t.length)return-1;var a=n(-1,t.length,e,t,i,s||r.GREATEST_LOWER_BOUND);if(a<0)return-1;for(;a-1>=0&&0===i(t[a],t[a-1],!0);)--a;return a}},{}],66:[function(e,t,r){function n(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var i=e("./util");n.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},n.prototype.add=function(e){!function(e,t){var r=e.generatedLine,n=t.generatedLine,s=e.generatedColumn,a=t.generatedColumn;return n>r||n==r&&a>=s||i.compareByGeneratedPositionsInflated(e,t)<=0}(this._last,e)?(this._sorted=!1,this._array.push(e)):(this._last=e,this._array.push(e))},n.prototype.toArray=function(){return this._sorted||(this._array.sort(i.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},r.MappingList=n},{"./util":71}],67:[function(e,t,r){function n(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function i(e,t,r,s){if(r<s){var a=r-1;n(e,function(e,t){return Math.round(e+Math.random()*(t-e))}(r,s),s);for(var o=e[s],u=r;u<s;u++)t(e[u],o)<=0&&n(e,a+=1,u);n(e,a+1,u);var l=a+1;i(e,t,r,l-1),i(e,t,l+1,s)}}r.quickSort=function(e,t){i(e,t,0,e.length-1)}},{}],68:[function(e,t,r){function n(e){var t=e;return"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=t.sections?new a(t):new i(t)}function i(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=o.getArg(t,"version"),n=o.getArg(t,"sources"),i=o.getArg(t,"names",[]),s=o.getArg(t,"sourceRoot",null),a=o.getArg(t,"sourcesContent",null),u=o.getArg(t,"mappings"),c=o.getArg(t,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);n=n.map(String).map(o.normalize).map(function(e){return s&&o.isAbsolute(s)&&o.isAbsolute(e)?o.relative(s,e):e}),this._names=l.fromArray(i.map(String),!0),this._sources=l.fromArray(n,!0),this.sourceRoot=s,this.sourcesContent=a,this._mappings=u,this.file=c}function s(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function a(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=o.getArg(t,"version"),i=o.getArg(t,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new l,this._names=new l;var s={line:-1,column:0};this._sections=i.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var t=o.getArg(e,"offset"),r=o.getArg(t,"line"),i=o.getArg(t,"column");if(r<s.line||r===s.line&&i<s.column)throw new Error("Section offsets must be ordered and non-overlapping.");return s=t,{generatedOffset:{generatedLine:r+1,generatedColumn:i+1},consumer:new n(o.getArg(e,"map"))}})}var o=e("./util"),u=e("./binary-search"),l=e("./array-set").ArraySet,c=e("./base64-vlq"),p=e("./quick-sort").quickSort;n.fromSourceMap=function(e){return i.fromSourceMap(e)},n.prototype._version=3,n.prototype.__generatedMappings=null,Object.defineProperty(n.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),n.prototype.__originalMappings=null,Object.defineProperty(n.prototype,"_originalMappings",{get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),n.prototype._charIsMappingSeparator=function(e,t){var r=e.charAt(t);return";"===r||","===r},n.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")},n.GENERATED_ORDER=1,n.ORIGINAL_ORDER=2,n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.prototype.eachMapping=function(e,t,r){var i,s=t||null;switch(r||n.GENERATED_ORDER){case n.GENERATED_ORDER:i=this._generatedMappings;break;case n.ORIGINAL_ORDER:i=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var a=this.sourceRoot;i.map(function(e){var t=null===e.source?null:this._sources.at(e.source);return null!=t&&null!=a&&(t=o.join(a,t)),{source:t,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:null===e.name?null:this._names.at(e.name)}},this).forEach(e,s)},n.prototype.allGeneratedPositionsFor=function(e){var t=o.getArg(e,"line"),r={source:o.getArg(e,"source"),originalLine:t,originalColumn:o.getArg(e,"column",0)};if(null!=this.sourceRoot&&(r.source=o.relative(this.sourceRoot,r.source)),!this._sources.has(r.source))return[];r.source=this._sources.indexOf(r.source);var n=[],i=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,u.LEAST_UPPER_BOUND);if(i>=0){var s=this._originalMappings[i];if(void 0===e.column)for(var a=s.originalLine;s&&s.originalLine===a;)n.push({line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i];else for(var l=s.originalColumn;s&&s.originalLine===t&&s.originalColumn==l;)n.push({line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i]}return n},r.SourceMapConsumer=n,(i.prototype=Object.create(n.prototype)).consumer=n,i.fromSourceMap=function(e){var t=Object.create(i.prototype),r=t._names=l.fromArray(e._names.toArray(),!0),n=t._sources=l.fromArray(e._sources.toArray(),!0);t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file;for(var a=e._mappings.toArray().slice(),u=t.__generatedMappings=[],c=t.__originalMappings=[],h=0,f=a.length;h<f;h++){var d=a[h],m=new s;m.generatedLine=d.generatedLine,m.generatedColumn=d.generatedColumn,d.source&&(m.source=n.indexOf(d.source),m.originalLine=d.originalLine,m.originalColumn=d.originalColumn,d.name&&(m.name=r.indexOf(d.name)),c.push(m)),u.push(m)}return p(t.__originalMappings,o.compareByOriginalPositions),t},i.prototype._version=3,Object.defineProperty(i.prototype,"sources",{get:function(){return this._sources.toArray().map(function(e){return null!=this.sourceRoot?o.join(this.sourceRoot,e):e},this)}}),i.prototype._parseMappings=function(e,t){for(var r,n,i,a,u,l=1,h=0,f=0,d=0,m=0,y=0,g=e.length,b=0,v={},x={},E=[],A=[];b<g;)if(";"===e.charAt(b))l++,b++,h=0;else if(","===e.charAt(b))b++;else{for((r=new s).generatedLine=l,a=b;a<g&&!this._charIsMappingSeparator(e,a);a++);if(n=e.slice(b,a),i=v[n])b+=n.length;else{for(i=[];b<a;)c.decode(e,b,x),u=x.value,b=x.rest,i.push(u);if(2===i.length)throw new Error("Found a source, but no line and column");if(3===i.length)throw new Error("Found a source and line, but no column");v[n]=i}r.generatedColumn=h+i[0],h=r.generatedColumn,i.length>1&&(r.source=m+i[1],m+=i[1],r.originalLine=f+i[2],f=r.originalLine,r.originalLine+=1,r.originalColumn=d+i[3],d=r.originalColumn,i.length>4&&(r.name=y+i[4],y+=i[4])),A.push(r),"number"==typeof r.originalLine&&E.push(r)}p(A,o.compareByGeneratedPositionsDeflated),this.__generatedMappings=A,p(E,o.compareByOriginalPositions),this.__originalMappings=E},i.prototype._findMapping=function(e,t,r,n,i,s){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[n]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[n]);return u.search(e,t,i,s)},i.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var r=this._generatedMappings[e+1];if(t.generatedLine===r.generatedLine){t.lastGeneratedColumn=r.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}},i.prototype.originalPositionFor=function(e){var t={generatedLine:o.getArg(e,"line"),generatedColumn:o.getArg(e,"column")},r=this._findMapping(t,this._generatedMappings,"generatedLine","generatedColumn",o.compareByGeneratedPositionsDeflated,o.getArg(e,"bias",n.GREATEST_LOWER_BOUND));if(r>=0){var i=this._generatedMappings[r];if(i.generatedLine===t.generatedLine){var s=o.getArg(i,"source",null);null!==s&&(s=this._sources.at(s),null!=this.sourceRoot&&(s=o.join(this.sourceRoot,s)));var a=o.getArg(i,"name",null);return null!==a&&(a=this._names.at(a)),{source:s,line:o.getArg(i,"originalLine",null),column:o.getArg(i,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}},i.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},i.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=o.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var r;if(null!=this.sourceRoot&&(r=o.urlParse(this.sourceRoot))){var n=e.replace(/^file:\/\//,"");if("file"==r.scheme&&this._sources.has(n))return this.sourcesContent[this._sources.indexOf(n)];if((!r.path||"/"==r.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},i.prototype.generatedPositionFor=function(e){var t=o.getArg(e,"source");if(null!=this.sourceRoot&&(t=o.relative(this.sourceRoot,t)),!this._sources.has(t))return{line:null,column:null,lastColumn:null};var r={source:t=this._sources.indexOf(t),originalLine:o.getArg(e,"line"),originalColumn:o.getArg(e,"column")},i=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,o.getArg(e,"bias",n.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===r.source)return{line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},r.BasicSourceMapConsumer=i,(a.prototype=Object.create(n.prototype)).constructor=n,a.prototype._version=3,Object.defineProperty(a.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var r=0;r<this._sections[t].consumer.sources.length;r++)e.push(this._sections[t].consumer.sources[r]);return e}}),a.prototype.originalPositionFor=function(e){var t={generatedLine:o.getArg(e,"line"),generatedColumn:o.getArg(e,"column")},r=u.search(t,this._sections,function(e,t){var r=e.generatedLine-t.generatedOffset.generatedLine;return r||e.generatedColumn-t.generatedOffset.generatedColumn}),n=this._sections[r];return n?n.consumer.originalPositionFor({line:t.generatedLine-(n.generatedOffset.generatedLine-1),column:t.generatedColumn-(n.generatedOffset.generatedLine===t.generatedLine?n.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},a.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})},a.prototype.sourceContentFor=function(e,t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r].consumer.sourceContentFor(e,!0);if(n)return n}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},a.prototype.generatedPositionFor=function(e){for(var t=0;t<this._sections.length;t++){var r=this._sections[t];if(-1!==r.consumer.sources.indexOf(o.getArg(e,"source"))){var n=r.consumer.generatedPositionFor(e);if(n){return{line:n.line+(r.generatedOffset.generatedLine-1),column:n.column+(r.generatedOffset.generatedLine===n.line?r.generatedOffset.generatedColumn-1:0)}}}}return{line:null,column:null}},a.prototype._parseMappings=function(e,t){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var n=this._sections[r],i=n.consumer._generatedMappings,s=0;s<i.length;s++){var a=i[s],u=n.consumer._sources.at(a.source);null!==n.consumer.sourceRoot&&(u=o.join(n.consumer.sourceRoot,u)),this._sources.add(u),u=this._sources.indexOf(u);var l=n.consumer._names.at(a.name);this._names.add(l),l=this._names.indexOf(l);var c={source:u,generatedLine:a.generatedLine+(n.generatedOffset.generatedLine-1),generatedColumn:a.generatedColumn+(n.generatedOffset.generatedLine===a.generatedLine?n.generatedOffset.generatedColumn-1:0),originalLine:a.originalLine,originalColumn:a.originalColumn,name:l};this.__generatedMappings.push(c),"number"==typeof c.originalLine&&this.__originalMappings.push(c)}p(this.__generatedMappings,o.compareByGeneratedPositionsDeflated),p(this.__originalMappings,o.compareByOriginalPositions)},r.IndexedSourceMapConsumer=a},{"./array-set":62,"./base64-vlq":63,"./binary-search":65,"./quick-sort":67,"./util":71}],69:[function(e,t,r){function n(e){e||(e={}),this._file=s.getArg(e,"file",null),this._sourceRoot=s.getArg(e,"sourceRoot",null),this._skipValidation=s.getArg(e,"skipValidation",!1),this._sources=new a,this._names=new a,this._mappings=new o,this._sourcesContents=null}var i=e("./base64-vlq"),s=e("./util"),a=e("./array-set").ArraySet,o=e("./mapping-list").MappingList;n.prototype._version=3,n.fromSourceMap=function(e){var t=e.sourceRoot,r=new n({file:e.file,sourceRoot:t});return e.eachMapping(function(e){var n={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(n.source=e.source,null!=t&&(n.source=s.relative(t,n.source)),n.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(n.name=e.name)),r.addMapping(n)}),e.sources.forEach(function(t){var n=e.sourceContentFor(t);null!=n&&r.setSourceContent(t,n)}),r},n.prototype.addMapping=function(e){var t=s.getArg(e,"generated"),r=s.getArg(e,"original",null),n=s.getArg(e,"source",null),i=s.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,r,n,i),null!=n&&(n=String(n),this._sources.has(n)||this._sources.add(n)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:n,name:i})},n.prototype.setSourceContent=function(e,t){var r=e;null!=this._sourceRoot&&(r=s.relative(this._sourceRoot,r)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[s.toSetString(r)]=t):this._sourcesContents&&(delete this._sourcesContents[s.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},n.prototype.applySourceMap=function(e,t,r){var n=t;if(null==t){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.');n=e.file}var i=this._sourceRoot;null!=i&&(n=s.relative(i,n));var o=new a,u=new a;this._mappings.unsortedForEach(function(t){if(t.source===n&&null!=t.originalLine){var a=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=a.source&&(t.source=a.source,null!=r&&(t.source=s.join(r,t.source)),null!=i&&(t.source=s.relative(i,t.source)),t.originalLine=a.line,t.originalColumn=a.column,null!=a.name&&(t.name=a.name))}var l=t.source;null==l||o.has(l)||o.add(l);var c=t.name;null==c||u.has(c)||u.add(c)},this),this._sources=o,this._names=u,e.sources.forEach(function(t){var n=e.sourceContentFor(t);null!=n&&(null!=r&&(t=s.join(r,t)),null!=i&&(t=s.relative(i,t)),this.setSourceContent(t,n))},this)},n.prototype._validateMapping=function(e,t,r,n){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||r||n)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:t,name:n}))},n.prototype._serializeMappings=function(){for(var e,t,r,n,a=0,o=1,u=0,l=0,c=0,p=0,h="",f=this._mappings.toArray(),d=0,m=f.length;d<m;d++){if(t=f[d],e="",t.generatedLine!==o)for(a=0;t.generatedLine!==o;)e+=";",o++;else if(d>0){if(!s.compareByGeneratedPositionsInflated(t,f[d-1]))continue;e+=","}e+=i.encode(t.generatedColumn-a),a=t.generatedColumn,null!=t.source&&(n=this._sources.indexOf(t.source),e+=i.encode(n-p),p=n,e+=i.encode(t.originalLine-1-l),l=t.originalLine-1,e+=i.encode(t.originalColumn-u),u=t.originalColumn,null!=t.name&&(r=this._names.indexOf(t.name),e+=i.encode(r-c),c=r)),h+=e}return h},n.prototype._generateSourcesContent=function(e,t){return e.map(function(e){if(!this._sourcesContents)return null;null!=t&&(e=s.relative(t,e));var r=s.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},n.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},n.prototype.toString=function(){return JSON.stringify(this.toJSON())},r.SourceMapGenerator=n},{"./array-set":62,"./base64-vlq":63,"./mapping-list":66,"./util":71}],70:[function(e,t,r){function n(e,t,r,n,i){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==r?null:r,this.name=null==i?null:i,this[o]=!0,null!=n&&this.add(n)}var i=e("./source-map-generator").SourceMapGenerator,s=e("./util"),a=/(\r?\n)/,o="$$$isSourceNode$$$";n.fromStringWithSourceMap=function(e,t,r){function i(e,t){if(null===e||void 0===e.source)o.add(t);else{var i=r?s.join(r,e.source):e.source;o.add(new n(e.originalLine,e.originalColumn,i,t,e.name))}}var o=new n,u=e.split(a),l=0,c=function(){function e(){return l<u.length?u[l++]:void 0}return e()+(e()||"")},p=1,h=0,f=null;return t.eachMapping(function(e){if(null!==f){if(!(p<e.generatedLine)){var t=(r=u[l]).substr(0,e.generatedColumn-h);return u[l]=r.substr(e.generatedColumn-h),h=e.generatedColumn,i(f,t),void(f=e)}i(f,c()),p++,h=0}for(;p<e.generatedLine;)o.add(c()),p++;if(h<e.generatedColumn){var r=u[l];o.add(r.substr(0,e.generatedColumn)),u[l]=r.substr(e.generatedColumn),h=e.generatedColumn}f=e},this),l<u.length&&(f&&i(f,c()),o.add(u.splice(l).join(""))),t.sources.forEach(function(e){var n=t.sourceContentFor(e);null!=n&&(null!=r&&(e=s.join(r,e)),o.setSourceContent(e,n))}),o},n.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else{if(!e[o]&&"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},n.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else{if(!e[o]&&"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},n.prototype.walk=function(e){for(var t,r=0,n=this.children.length;r<n;r++)(t=this.children[r])[o]?t.walk(e):""!==t&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})},n.prototype.join=function(e){var t,r,n=this.children.length;if(n>0){for(t=[],r=0;r<n-1;r++)t.push(this.children[r]),t.push(e);t.push(this.children[r]),this.children=t}return this},n.prototype.replaceRight=function(e,t){var r=this.children[this.children.length-1];return r[o]?r.replaceRight(e,t):"string"==typeof r?this.children[this.children.length-1]=r.replace(e,t):this.children.push("".replace(e,t)),this},n.prototype.setSourceContent=function(e,t){this.sourceContents[s.toSetString(e)]=t},n.prototype.walkSourceContents=function(e){for(var t=0,r=this.children.length;t<r;t++)this.children[t][o]&&this.children[t].walkSourceContents(e);for(var n=Object.keys(this.sourceContents),t=0,r=n.length;t<r;t++)e(s.fromSetString(n[t]),this.sourceContents[n[t]])},n.prototype.toString=function(){var e="";return this.walk(function(t){e+=t}),e},n.prototype.toStringWithSourceMap=function(e){var t={code:"",line:1,column:0},r=new i(e),n=!1,s=null,a=null,o=null,u=null;return this.walk(function(e,i){t.code+=e,null!==i.source&&null!==i.line&&null!==i.column?(s===i.source&&a===i.line&&o===i.column&&u===i.name||r.addMapping({source:i.source,original:{line:i.line,column:i.column},generated:{line:t.line,column:t.column},name:i.name}),s=i.source,a=i.line,o=i.column,u=i.name,n=!0):n&&(r.addMapping({generated:{line:t.line,column:t.column}}),s=null,n=!1);for(var l=0,c=e.length;l<c;l++)10===e.charCodeAt(l)?(t.line++,t.column=0,l+1===c?(s=null,n=!1):n&&r.addMapping({source:i.source,original:{line:i.line,column:i.column},generated:{line:t.line,column:t.column},name:i.name})):t.column++}),this.walkSourceContents(function(e,t){r.setSourceContent(e,t)}),{code:t.code,map:r}},r.SourceNode=n},{"./source-map-generator":69,"./util":71}],71:[function(e,t,r){function n(e){var t=e.match(l);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function i(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function s(e){var t=e,s=n(e);if(s){if(!s.path)return e;t=s.path}for(var a,o=r.isAbsolute(t),u=t.split(/\/+/),l=0,c=u.length-1;c>=0;c--)"."===(a=u[c])?u.splice(c,1):".."===a?l++:l>0&&(""===a?(u.splice(c+1,l),l=0):(u.splice(c,2),l--));return""===(t=u.join("/"))&&(t=o?"/":"."),s?(s.path=t,i(s)):t}function a(e){return e}function o(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var r=t-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function u(e,t){return e===t?0:e>t?1:-1}r.getArg=function(e,t,r){if(t in e)return e[t];if(3===arguments.length)return r;throw new Error('"'+t+'" is a required argument.')};var l=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,c=/^data:.+\,.+$/;r.urlParse=n,r.urlGenerate=i,r.normalize=s,r.join=function(e,t){""===e&&(e="."),""===t&&(t=".");var r=n(t),a=n(e);if(a&&(e=a.path||"/"),r&&!r.scheme)return a&&(r.scheme=a.scheme),i(r);if(r||t.match(c))return t;if(a&&!a.host&&!a.path)return a.host=t,i(a);var o="/"===t.charAt(0)?t:s(e.replace(/\/+$/,"")+"/"+t);return a?(a.path=o,i(a)):o},r.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(l)},r.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==t.indexOf(e+"/");){var n=e.lastIndexOf("/");if(n<0)return t;if((e=e.slice(0,n)).match(/^([^\/]+:\/)?\/*$/))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)};var p=!("__proto__"in Object.create(null));r.toSetString=p?a:function(e){return o(e)?"$"+e:e},r.fromSetString=p?a:function(e){return o(e)?e.slice(1):e},r.compareByOriginalPositions=function(e,t,r){var n=e.source-t.source;return 0!==n?n:0!=(n=e.originalLine-t.originalLine)?n:0!=(n=e.originalColumn-t.originalColumn)||r?n:0!=(n=e.generatedColumn-t.generatedColumn)?n:0!=(n=e.generatedLine-t.generatedLine)?n:e.name-t.name},r.compareByGeneratedPositionsDeflated=function(e,t,r){var n=e.generatedLine-t.generatedLine;return 0!==n?n:0!=(n=e.generatedColumn-t.generatedColumn)||r?n:0!=(n=e.source-t.source)?n:0!=(n=e.originalLine-t.originalLine)?n:0!=(n=e.originalColumn-t.originalColumn)?n:e.name-t.name},r.compareByGeneratedPositionsInflated=function(e,t){var r=e.generatedLine-t.generatedLine;return 0!==r?r:0!=(r=e.generatedColumn-t.generatedColumn)?r:0!==(r=u(e.source,t.source))?r:0!=(r=e.originalLine-t.originalLine)?r:0!=(r=e.originalColumn-t.originalColumn)?r:u(e.name,t.name)}},{}],72:[function(e,t,r){r.SourceMapGenerator=e("./lib/source-map-generator").SourceMapGenerator,r.SourceMapConsumer=e("./lib/source-map-consumer").SourceMapConsumer,r.SourceNode=e("./lib/source-node").SourceNode},{"./lib/source-map-consumer":68,"./lib/source-map-generator":69,"./lib/source-node":70}],73:[function(e,t,r){t.exports={_args:[[{raw:"babel-core@^6.18.2",scope:null,escapedName:"babel-core",name:"babel-core",rawSpec:"^6.18.2",spec:">=6.18.2 <7.0.0",type:"range"},"/Users/evgenypoberezkin/Documents/JSON/ajv/node_modules/regenerator"]],_from:"babel-core@>=6.18.2 <7.0.0",_id:"babel-core@6.26.0",_inCache:!0,_location:"/babel-core",_nodeVersion:"6.9.0",_npmOperationalInternal:{host:"s3://npm-registry-packages",tmp:"tmp/babel-core-6.26.0.tgz_1502898861183_0.43529116874560714"},_npmUser:{name:"hzoo",email:"hi@henryzoo.com"},_npmVersion:"4.6.1",_phantomChildren:{ms:"2.0.0"},_requested:{raw:"babel-core@^6.18.2",scope:null,escapedName:"babel-core",name:"babel-core",rawSpec:"^6.18.2",spec:">=6.18.2 <7.0.0",type:"range"},_requiredBy:["/babel-register","/regenerator"],_resolved:"https://registry.npmjs.org/babel-core/-/babel-core-6.26.0.tgz",_shasum:"af32f78b31a6fcef119c87b0fd8d9753f03a0bb8",_shrinkwrap:null,_spec:"babel-core@^6.18.2",_where:"/Users/evgenypoberezkin/Documents/JSON/ajv/node_modules/regenerator",author:{name:"Sebastian McKenzie",email:"sebmck@gmail.com"},dependencies:{"babel-code-frame":"^6.26.0","babel-generator":"^6.26.0","babel-helpers":"^6.24.1","babel-messages":"^6.23.0","babel-register":"^6.26.0","babel-runtime":"^6.26.0","babel-template":"^6.26.0","babel-traverse":"^6.26.0","babel-types":"^6.26.0",babylon:"^6.18.0","convert-source-map":"^1.5.0",debug:"^2.6.8",json5:"^0.5.1",lodash:"^4.17.4",minimatch:"^3.0.4","path-is-absolute":"^1.0.1",private:"^0.1.7",slash:"^1.0.0","source-map":"^0.5.6"},description:"Babel compiler core.",devDependencies:{"babel-helper-fixtures":"^6.26.0","babel-helper-transform-fixture-test-runner":"^6.26.0","babel-polyfill":"^6.26.0"},directories:{},dist:{shasum:"af32f78b31a6fcef119c87b0fd8d9753f03a0bb8",tarball:"https://registry.npmjs.org/babel-core/-/babel-core-6.26.0.tgz"},homepage:"https://babeljs.io/",keywords:["6to5","babel","classes","const","es6","harmony","let","modules","transpile","transpiler","var","babel-core","compiler"],license:"MIT",maintainers:[{name:"thejameskyle",email:"me@thejameskyle.com"},{name:"sebmck",email:"sebmck@gmail.com"},{name:"danez",email:"daniel@tschinder.de"},{name:"hzoo",email:"hi@henryzoo.com"},{name:"loganfsmyth",email:"loganfsmyth@gmail.com"}],name:"babel-core",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"https://github.com/babel/babel/tree/master/packages/babel-core"},scripts:{bench:"make bench",test:"make test"},version:"6.26.0"}},{}],74:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/helpers/classCallCheck")),s=n(e("trim-right")),a=/^[ \t]+$/,o=function(){function e(t){(0,i.default)(this,e),this._map=null,this._buf=[],this._last="",this._queue=[],this._position={line:1,column:0},this._sourcePosition={identifierName:null,line:null,column:null,filename:null},this._map=t}return e.prototype.get=function(){this._flush();var e=this._map,t={code:(0,s.default)(this._buf.join("")),map:null,rawMappings:e&&e.getRawMappings()};return e&&Object.defineProperty(t,"map",{configurable:!0,enumerable:!0,get:function(){return this.map=e.get()},set:function(e){Object.defineProperty(this,"map",{value:e,writable:!0})}}),t},e.prototype.append=function(e){this._flush();var t=this._sourcePosition,r=t.line,n=t.column,i=t.filename,s=t.identifierName;this._append(e,r,n,s,i)},e.prototype.queue=function(e){if("\n"===e)for(;this._queue.length>0&&a.test(this._queue[0][0]);)this._queue.shift();var t=this._sourcePosition,r=t.line,n=t.column,i=t.filename,s=t.identifierName;this._queue.unshift([e,r,n,s,i])},e.prototype._flush=function(){for(var e=void 0;e=this._queue.pop();)this._append.apply(this,e)},e.prototype._append=function(e,t,r,n,i){this._map&&"\n"!==e[0]&&this._map.mark(this._position.line,this._position.column,t,r,n,i),this._buf.push(e),this._last=e[e.length-1];for(var s=0;s<e.length;s++)"\n"===e[s]?(this._position.line++,this._position.column=0):this._position.column++},e.prototype.removeTrailingNewline=function(){this._queue.length>0&&"\n"===this._queue[0][0]&&this._queue.shift()},e.prototype.removeLastSemicolon=function(){this._queue.length>0&&";"===this._queue[0][0]&&this._queue.shift()},e.prototype.endsWith=function(e){if(1===e.length){var t=void 0;if(this._queue.length>0){var r=this._queue[0][0];t=r[r.length-1]}else t=this._last;return t===e}var n=this._last+this._queue.reduce(function(e,t){return t[0]+e},"");return e.length<=n.length&&n.slice(-e.length)===e},e.prototype.hasContent=function(){return this._queue.length>0||!!this._last},e.prototype.source=function(e,t){if(!e||t){var r=t?t[e]:null;this._sourcePosition.identifierName=t&&t.identifierName||null,this._sourcePosition.line=r?r.line:null,this._sourcePosition.column=r?r.column:null,this._sourcePosition.filename=t&&t.filename||null}},e.prototype.withSource=function(e,t,r){if(!this._map)return r();var n=this._sourcePosition.line,i=this._sourcePosition.column,s=this._sourcePosition.filename,a=this._sourcePosition.identifierName;this.source(e,t),r(),this._sourcePosition.line=n,this._sourcePosition.column=i,this._sourcePosition.filename=s,this._sourcePosition.identifierName=a},e.prototype.getCurrentColumn=function(){var e=this._queue.reduce(function(e,t){return t[0]+e},""),t=e.lastIndexOf("\n");return-1===t?this._position.column+e.length:e.length-1-t},e.prototype.getCurrentLine=function(){for(var e=this._queue.reduce(function(e,t){return t[0]+e},""),t=0,r=0;r<e.length;r++)"\n"===e[r]&&t++;return this._position.line+t},e}();r.default=o,t.exports=r.default},{"babel-runtime/helpers/classCallCheck":134,"trim-right":608}],75:[function(e,t,r){"use strict";r.__esModule=!0,r.File=function(e){this.print(e.program,e)},r.Program=function(e){this.printInnerComments(e,!1),this.printSequence(e.directives,e),e.directives&&e.directives.length&&this.newline(),this.printSequence(e.body,e)},r.BlockStatement=function(e){this.token("{"),this.printInnerComments(e);var t=e.directives&&e.directives.length;e.body.length||t?(this.newline(),this.printSequence(e.directives,e,{indent:!0}),t&&this.newline(),this.printSequence(e.body,e,{indent:!0}),this.removeTrailingNewline(),this.source("end",e.loc),this.endsWith("\n")||this.newline(),this.rightBrace()):(this.source("end",e.loc),this.token("}"))},r.Noop=function(){},r.Directive=function(e){this.print(e.value,e),this.semicolon()};var n=e("./types");Object.defineProperty(r,"DirectiveLiteral",{enumerable:!0,get:function(){return n.StringLiteral}})},{"./types":84}],76:[function(e,t,r){"use strict";function n(e){this.printJoin(e.decorators,e),this.word("class"),e.id&&(this.space(),this.print(e.id,e)),this.print(e.typeParameters,e),e.superClass&&(this.space(),this.word("extends"),this.space(),this.print(e.superClass,e),this.print(e.superTypeParameters,e)),e.implements&&(this.space(),this.word("implements"),this.space(),this.printList(e.implements,e)),this.space(),this.print(e.body,e)}r.__esModule=!0,r.ClassDeclaration=n,r.ClassBody=function(e){this.token("{"),this.printInnerComments(e),0===e.body.length?this.token("}"):(this.newline(),this.indent(),this.printSequence(e.body,e),this.dedent(),this.endsWith("\n")||this.newline(),this.rightBrace())},r.ClassProperty=function(e){this.printJoin(e.decorators,e),e.static&&(this.word("static"),this.space()),e.computed?(this.token("["),this.print(e.key,e),this.token("]")):(this._variance(e),this.print(e.key,e)),this.print(e.typeAnnotation,e),e.value&&(this.space(),this.token("="),this.space(),this.print(e.value,e)),this.semicolon()},r.ClassMethod=function(e){this.printJoin(e.decorators,e),e.static&&(this.word("static"),this.space()),"constructorCall"===e.kind&&(this.word("call"),this.space()),this._method(e)},r.ClassExpression=n},{}],77:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(){this.token(","),this.newline(),this.endsWith("\n")||this.space()}function s(e){return function(t){if(this.word(e),t.delegate&&this.token("*"),t.argument){this.space();var r=this.startTerminatorless();this.print(t.argument,t),this.endTerminatorless(r)}}}function a(e,t){var r=this.inForStatementInitCounter&&"in"===e.operator&&!u.needsParens(e,t);r&&this.token("("),this.print(e.left,e),this.space(),"in"===e.operator||"instanceof"===e.operator?this.word(e.operator):this.token(e.operator),this.space(),this.print(e.right,e),r&&this.token(")")}r.__esModule=!0,r.LogicalExpression=r.BinaryExpression=r.AwaitExpression=r.YieldExpression=void 0,r.UnaryExpression=function(e){"void"===e.operator||"delete"===e.operator||"typeof"===e.operator?(this.word(e.operator),this.space()):this.token(e.operator),this.print(e.argument,e)},r.DoExpression=function(e){this.word("do"),this.space(),this.print(e.body,e)},r.ParenthesizedExpression=function(e){this.token("("),this.print(e.expression,e),this.token(")")},r.UpdateExpression=function(e){e.prefix?(this.token(e.operator),this.print(e.argument,e)):(this.print(e.argument,e),this.token(e.operator))},r.ConditionalExpression=function(e){this.print(e.test,e),this.space(),this.token("?"),this.space(),this.print(e.consequent,e),this.space(),this.token(":"),this.space(),this.print(e.alternate,e)},r.NewExpression=function(e,t){this.word("new"),this.space(),this.print(e.callee,e),(0!==e.arguments.length||!this.format.minified||o.isCallExpression(t,{callee:e})||o.isMemberExpression(t)||o.isNewExpression(t))&&(this.token("("),this.printList(e.arguments,e),this.token(")"))},r.SequenceExpression=function(e){this.printList(e.expressions,e)},r.ThisExpression=function(){this.word("this")},r.Super=function(){this.word("super")},r.Decorator=function(e){this.token("@"),this.print(e.expression,e),this.newline()},r.CallExpression=function(e){this.print(e.callee,e),this.token("(");var t=e._prettyCall,r=void 0;t&&(r=i,this.newline(),this.indent()),this.printList(e.arguments,e,{separator:r}),t&&(this.newline(),this.dedent()),this.token(")")},r.Import=function(){this.word("import")},r.EmptyStatement=function(){this.semicolon(!0)},r.ExpressionStatement=function(e){this.print(e.expression,e),this.semicolon()},r.AssignmentPattern=function(e){this.print(e.left,e),e.left.optional&&this.token("?"),this.print(e.left.typeAnnotation,e),this.space(),this.token("="),this.space(),this.print(e.right,e)},r.AssignmentExpression=a,r.BindExpression=function(e){this.print(e.object,e),this.token("::"),this.print(e.callee,e)},r.MemberExpression=function(e){if(this.print(e.object,e),!e.computed&&o.isMemberExpression(e.property))throw new TypeError("Got a MemberExpression for MemberExpression property");var t=e.computed;o.isLiteral(e.property)&&"number"==typeof e.property.value&&(t=!0),t?(this.token("["),this.print(e.property,e),this.token("]")):(this.token("."),this.print(e.property,e))},r.MetaProperty=function(e){this.print(e.meta,e),this.token("."),this.print(e.property,e)};var o=n(e("babel-types")),u=n(e("../node"));r.YieldExpression=s("yield"),r.AwaitExpression=s("await");r.BinaryExpression=a,r.LogicalExpression=a},{"../node":86,"babel-types":178}],78:[function(e,t,r){"use strict";function n(e){this.print(e.id,e),this.print(e.typeParameters,e)}function i(){this.space(),this.token("&"),this.space()}function s(e){this.token("<"),this.printList(e.params,e,{}),this.token(">")}function a(){this.space(),this.token("|"),this.space()}r.__esModule=!0,r.TypeParameterDeclaration=r.StringLiteralTypeAnnotation=r.NumericLiteralTypeAnnotation=r.GenericTypeAnnotation=r.ClassImplements=void 0,r.AnyTypeAnnotation=function(){this.word("any")},r.ArrayTypeAnnotation=function(e){this.print(e.elementType,e),this.token("["),this.token("]")},r.BooleanTypeAnnotation=function(){this.word("boolean")},r.BooleanLiteralTypeAnnotation=function(e){this.word(e.value?"true":"false")},r.NullLiteralTypeAnnotation=function(){this.word("null")},r.DeclareClass=function(e,t){u.isDeclareExportDeclaration(t)||(this.word("declare"),this.space()),this.word("class"),this.space(),this._interfaceish(e)},r.DeclareFunction=function(e,t){u.isDeclareExportDeclaration(t)||(this.word("declare"),this.space()),this.word("function"),this.space(),this.print(e.id,e),this.print(e.id.typeAnnotation.typeAnnotation,e),this.semicolon()},r.DeclareInterface=function(e){this.word("declare"),this.space(),this.InterfaceDeclaration(e)},r.DeclareModule=function(e){this.word("declare"),this.space(),this.word("module"),this.space(),this.print(e.id,e),this.space(),this.print(e.body,e)},r.DeclareModuleExports=function(e){this.word("declare"),this.space(),this.word("module"),this.token("."),this.word("exports"),this.print(e.typeAnnotation,e)},r.DeclareTypeAlias=function(e){this.word("declare"),this.space(),this.TypeAlias(e)},r.DeclareOpaqueType=function(e,t){u.isDeclareExportDeclaration(t)||(this.word("declare"),this.space()),this.OpaqueType(e)},r.DeclareVariable=function(e,t){u.isDeclareExportDeclaration(t)||(this.word("declare"),this.space()),this.word("var"),this.space(),this.print(e.id,e),this.print(e.id.typeAnnotation,e),this.semicolon()},r.DeclareExportDeclaration=function(e){this.word("declare"),this.space(),this.word("export"),this.space(),e.default&&(this.word("default"),this.space()),function(e){if(e.declaration){var t=e.declaration;this.print(t,e),u.isStatement(t)||this.semicolon()}else this.token("{"),e.specifiers.length&&(this.space(),this.printList(e.specifiers,e),this.space()),this.token("}"),e.source&&(this.space(),this.word("from"),this.space(),this.print(e.source,e)),this.semicolon()}.apply(this,arguments)},r.ExistentialTypeParam=function(){this.token("*")},r.FunctionTypeAnnotation=function(e,t){this.print(e.typeParameters,e),this.token("("),this.printList(e.params,e),e.rest&&(e.params.length&&(this.token(","),this.space()),this.token("..."),this.print(e.rest,e)),this.token(")"),"ObjectTypeCallProperty"===t.type||"DeclareFunction"===t.type?this.token(":"):(this.space(),this.token("=>")),this.space(),this.print(e.returnType,e)},r.FunctionTypeParam=function(e){this.print(e.name,e),e.optional&&this.token("?"),this.token(":"),this.space(),this.print(e.typeAnnotation,e)},r.InterfaceExtends=n,r._interfaceish=function(e){this.print(e.id,e),this.print(e.typeParameters,e),e.extends.length&&(this.space(),this.word("extends"),this.space(),this.printList(e.extends,e)),e.mixins&&e.mixins.length&&(this.space(),this.word("mixins"),this.space(),this.printList(e.mixins,e)),this.space(),this.print(e.body,e)},r._variance=function(e){"plus"===e.variance?this.token("+"):"minus"===e.variance&&this.token("-")},r.InterfaceDeclaration=function(e){this.word("interface"),this.space(),this._interfaceish(e)},r.IntersectionTypeAnnotation=function(e){this.printJoin(e.types,e,{separator:i})},r.MixedTypeAnnotation=function(){this.word("mixed")},r.EmptyTypeAnnotation=function(){this.word("empty")},r.NullableTypeAnnotation=function(e){this.token("?"),this.print(e.typeAnnotation,e)};var o=e("./types");Object.defineProperty(r,"NumericLiteralTypeAnnotation",{enumerable:!0,get:function(){return o.NumericLiteral}}),Object.defineProperty(r,"StringLiteralTypeAnnotation",{enumerable:!0,get:function(){return o.StringLiteral}}),r.NumberTypeAnnotation=function(){this.word("number")},r.StringTypeAnnotation=function(){this.word("string")},r.ThisTypeAnnotation=function(){this.word("this")},r.TupleTypeAnnotation=function(e){this.token("["),this.printList(e.types,e),this.token("]")},r.TypeofTypeAnnotation=function(e){this.word("typeof"),this.space(),this.print(e.argument,e)},r.TypeAlias=function(e){this.word("type"),this.space(),this.print(e.id,e),this.print(e.typeParameters,e),this.space(),this.token("="),this.space(),this.print(e.right,e),this.semicolon()},r.OpaqueType=function(e){this.word("opaque"),this.space(),this.word("type"),this.space(),this.print(e.id,e),this.print(e.typeParameters,e),e.supertype&&(this.token(":"),this.space(),this.print(e.supertype,e)),e.impltype&&(this.space(),this.token("="),this.space(),this.print(e.impltype,e)),this.semicolon()},r.TypeAnnotation=function(e){this.token(":"),this.space(),e.optional&&this.token("?"),this.print(e.typeAnnotation,e)},r.TypeParameter=function(e){this._variance(e),this.word(e.name),e.bound&&this.print(e.bound,e),e.default&&(this.space(),this.token("="),this.space(),this.print(e.default,e))},r.TypeParameterInstantiation=s,r.ObjectTypeAnnotation=function(e){var t=this;e.exact?this.token("{|"):this.token("{");var r=e.properties.concat(e.callProperties,e.indexers);r.length&&(this.space(),this.printJoin(r,e,{addNewlines:function(e){if(e&&!r[0])return 1},indent:!0,statement:!0,iterator:function(){1!==r.length&&(t.format.flowCommaSeparator?t.token(","):t.semicolon(),t.space())}}),this.space()),e.exact?this.token("|}"):this.token("}")},r.ObjectTypeCallProperty=function(e){e.static&&(this.word("static"),this.space()),this.print(e.value,e)},r.ObjectTypeIndexer=function(e){e.static&&(this.word("static"),this.space()),this._variance(e),this.token("["),this.print(e.id,e),this.token(":"),this.space(),this.print(e.key,e),this.token("]"),this.token(":"),this.space(),this.print(e.value,e)},r.ObjectTypeProperty=function(e){e.static&&(this.word("static"),this.space()),this._variance(e),this.print(e.key,e),e.optional&&this.token("?"),this.token(":"),this.space(),this.print(e.value,e)},r.ObjectTypeSpreadProperty=function(e){this.token("..."),this.print(e.argument,e)},r.QualifiedTypeIdentifier=function(e){this.print(e.qualification,e),this.token("."),this.print(e.id,e)},r.UnionTypeAnnotation=function(e){this.printJoin(e.types,e,{separator:a})},r.TypeCastExpression=function(e){this.token("("),this.print(e.expression,e),this.print(e.typeAnnotation,e),this.token(")")},r.VoidTypeAnnotation=function(){this.word("void")};var u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));r.ClassImplements=n,r.GenericTypeAnnotation=n,r.TypeParameterDeclaration=s},{"./types":84,"babel-types":178}],79:[function(e,t,r){"use strict";function n(){this.space()}r.__esModule=!0;var i=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/get-iterator"));r.JSXAttribute=function(e){this.print(e.name,e),e.value&&(this.token("="),this.print(e.value,e))},r.JSXIdentifier=function(e){this.word(e.name)},r.JSXNamespacedName=function(e){this.print(e.namespace,e),this.token(":"),this.print(e.name,e)},r.JSXMemberExpression=function(e){this.print(e.object,e),this.token("."),this.print(e.property,e)},r.JSXSpreadAttribute=function(e){this.token("{"),this.token("..."),this.print(e.argument,e),this.token("}")},r.JSXExpressionContainer=function(e){this.token("{"),this.print(e.expression,e),this.token("}")},r.JSXSpreadChild=function(e){this.token("{"),this.token("..."),this.print(e.expression,e),this.token("}")},r.JSXText=function(e){this.token(e.value)},r.JSXElement=function(e){var t=e.openingElement;if(this.print(t,e),!t.selfClosing){this.indent();for(var r=e.children,n=Array.isArray(r),s=0,r=n?r:(0,i.default)(r);;){var a;if(n){if(s>=r.length)break;a=r[s++]}else{if((s=r.next()).done)break;a=s.value}var o=a;this.print(o,e)}this.dedent(),this.print(e.closingElement,e)}},r.JSXOpeningElement=function(e){this.token("<"),this.print(e.name,e),e.attributes.length>0&&(this.space(),this.printJoin(e.attributes,e,{separator:n})),e.selfClosing?(this.space(),this.token("/>")):this.token(">")},r.JSXClosingElement=function(e){this.token("</"),this.print(e.name,e),this.token(">")},r.JSXEmptyExpression=function(){}},{"babel-runtime/core-js/get-iterator":120}],80:[function(e,t,r){"use strict";function n(e){e.async&&(this.word("async"),this.space()),this.word("function"),e.generator&&this.token("*"),e.id?(this.space(),this.print(e.id,e)):this.space(),this._params(e),this.space(),this.print(e.body,e)}r.__esModule=!0,r.FunctionDeclaration=void 0,r._params=function(e){var t=this;this.print(e.typeParameters,e),this.token("("),this.printList(e.params,e,{iterator:function(e){e.optional&&t.token("?"),t.print(e.typeAnnotation,e)}}),this.token(")"),e.returnType&&this.print(e.returnType,e)},r._method=function(e){var t=e.kind,r=e.key;"method"!==t&&"init"!==t||e.generator&&this.token("*"),"get"!==t&&"set"!==t||(this.word(t),this.space()),e.async&&(this.word("async"),this.space()),e.computed?(this.token("["),this.print(r,e),this.token("]")):this.print(r,e),this._params(e),this.space(),this.print(e.body,e)},r.FunctionExpression=n,r.ArrowFunctionExpression=function(e){e.async&&(this.word("async"),this.space());var t=e.params[0];1===e.params.length&&i.isIdentifier(t)&&!function(e,t){return e.typeParameters||e.returnType||t.typeAnnotation||t.optional||t.trailingComments}(e,t)?this.print(t,e):this._params(e),this.space(),this.token("=>"),this.space(),this.print(e.body,e)};var i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));r.FunctionDeclaration=n},{"babel-types":178}],81:[function(e,t,r){"use strict";function n(e){if(e.declaration){var t=e.declaration;this.print(t,e),i.isStatement(t)||this.semicolon()}else{"type"===e.exportKind&&(this.word("type"),this.space());for(var r=e.specifiers.slice(0),n=!1;;){var s=r[0];if(!i.isExportDefaultSpecifier(s)&&!i.isExportNamespaceSpecifier(s))break;n=!0,this.print(r.shift(),e),r.length&&(this.token(","),this.space())}(r.length||!r.length&&!n)&&(this.token("{"),r.length&&(this.space(),this.printList(r,e),this.space()),this.token("}")),e.source&&(this.space(),this.word("from"),this.space(),this.print(e.source,e)),this.semicolon()}}r.__esModule=!0,r.ImportSpecifier=function(e){"type"!==e.importKind&&"typeof"!==e.importKind||(this.word(e.importKind),this.space()),this.print(e.imported,e),e.local&&e.local.name!==e.imported.name&&(this.space(),this.word("as"),this.space(),this.print(e.local,e))},r.ImportDefaultSpecifier=function(e){this.print(e.local,e)},r.ExportDefaultSpecifier=function(e){this.print(e.exported,e)},r.ExportSpecifier=function(e){this.print(e.local,e),e.exported&&e.local.name!==e.exported.name&&(this.space(),this.word("as"),this.space(),this.print(e.exported,e))},r.ExportNamespaceSpecifier=function(e){this.token("*"),this.space(),this.word("as"),this.space(),this.print(e.exported,e)},r.ExportAllDeclaration=function(e){this.word("export"),this.space(),this.token("*"),this.space(),this.word("from"),this.space(),this.print(e.source,e),this.semicolon()},r.ExportNamedDeclaration=function(){this.word("export"),this.space(),n.apply(this,arguments)},r.ExportDefaultDeclaration=function(){this.word("export"),this.space(),this.word("default"),this.space(),n.apply(this,arguments)},r.ImportDeclaration=function(e){this.word("import"),this.space(),"type"!==e.importKind&&"typeof"!==e.importKind||(this.word(e.importKind),this.space());var t=e.specifiers.slice(0);if(t&&t.length){for(;;){var r=t[0];if(!i.isImportDefaultSpecifier(r)&&!i.isImportNamespaceSpecifier(r))break;this.print(t.shift(),e),t.length&&(this.token(","),this.space())}t.length&&(this.token("{"),this.space(),this.printList(t,e),this.space(),this.token("}")),this.space(),this.word("from"),this.space()}this.print(e.source,e),this.semicolon()},r.ImportNamespaceSpecifier=function(e){this.token("*"),this.space(),this.word("as"),this.space(),this.print(e.local,e)};var i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"))},{"babel-types":178}],82:[function(e,t,r){"use strict";function n(e){return a.isStatement(e.body)?n(e.body):e}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"label";return function(r){this.word(e);var n=r[t];if(n){this.space();var i=this.startTerminatorless();this.print(n,r),this.endTerminatorless(i)}this.semicolon()}}r.__esModule=!0,r.ThrowStatement=r.BreakStatement=r.ReturnStatement=r.ContinueStatement=r.ForAwaitStatement=r.ForOfStatement=r.ForInStatement=void 0;var s=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/get-iterator"));r.WithStatement=function(e){this.word("with"),this.space(),this.token("("),this.print(e.object,e),this.token(")"),this.printBlock(e)},r.IfStatement=function(e){this.word("if"),this.space(),this.token("("),this.print(e.test,e),this.token(")"),this.space();var t=e.alternate&&a.isIfStatement(n(e.consequent));t&&(this.token("{"),this.newline(),this.indent()),this.printAndIndentOnComments(e.consequent,e),t&&(this.dedent(),this.newline(),this.token("}")),e.alternate&&(this.endsWith("}")&&this.space(),this.word("else"),this.space(),this.printAndIndentOnComments(e.alternate,e))},r.ForStatement=function(e){this.word("for"),this.space(),this.token("("),this.inForStatementInitCounter++,this.print(e.init,e),this.inForStatementInitCounter--,this.token(";"),e.test&&(this.space(),this.print(e.test,e)),this.token(";"),e.update&&(this.space(),this.print(e.update,e)),this.token(")"),this.printBlock(e)},r.WhileStatement=function(e){this.word("while"),this.space(),this.token("("),this.print(e.test,e),this.token(")"),this.printBlock(e)},r.DoWhileStatement=function(e){this.word("do"),this.space(),this.print(e.body,e),this.space(),this.word("while"),this.space(),this.token("("),this.print(e.test,e),this.token(")"),this.semicolon()},r.LabeledStatement=function(e){this.print(e.label,e),this.token(":"),this.space(),this.print(e.body,e)},r.TryStatement=function(e){this.word("try"),this.space(),this.print(e.block,e),this.space(),e.handlers?this.print(e.handlers[0],e):this.print(e.handler,e),e.finalizer&&(this.space(),this.word("finally"),this.space(),this.print(e.finalizer,e))},r.CatchClause=function(e){this.word("catch"),this.space(),this.token("("),this.print(e.param,e),this.token(")"),this.space(),this.print(e.body,e)},r.SwitchStatement=function(e){this.word("switch"),this.space(),this.token("("),this.print(e.discriminant,e),this.token(")"),this.space(),this.token("{"),this.printSequence(e.cases,e,{indent:!0,addNewlines:function(t,r){if(!t&&e.cases[e.cases.length-1]===r)return-1}}),this.token("}")},r.SwitchCase=function(e){e.test?(this.word("case"),this.space(),this.print(e.test,e),this.token(":")):(this.word("default"),this.token(":")),e.consequent.length&&(this.newline(),this.printSequence(e.consequent,e,{indent:!0}))},r.DebuggerStatement=function(){this.word("debugger"),this.semicolon()},r.VariableDeclaration=function(e,t){this.word(e.kind),this.space();var r=!1;if(!a.isFor(t))for(var n=e.declarations,i=Array.isArray(n),o=0,n=i?n:(0,s.default)(n);;){var u;if(i){if(o>=n.length)break;u=n[o++]}else{if((o=n.next()).done)break;u=o.value}u.init&&(r=!0)}var l=void 0;r&&(l="const"===e.kind?function(){if(this.token(","),this.newline(),this.endsWith("\n"))for(var e=0;e<6;e++)this.space(!0)}:function(){if(this.token(","),this.newline(),this.endsWith("\n"))for(var e=0;e<4;e++)this.space(!0)}),this.printList(e.declarations,e,{separator:l}),(!a.isFor(t)||t.left!==e&&t.init!==e)&&this.semicolon()},r.VariableDeclarator=function(e){this.print(e.id,e),this.print(e.id.typeAnnotation,e),e.init&&(this.space(),this.token("="),this.space(),this.print(e.init,e))};var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types")),o=function(e){return function(t){this.word("for"),this.space(),"await"===e&&(this.word("await"),this.space()),this.token("("),this.print(t.left,t),this.space(),this.word("await"===e?"of":e),this.space(),this.print(t.right,t),this.token(")"),this.printBlock(t)}};r.ForInStatement=o("in"),r.ForOfStatement=o("of"),r.ForAwaitStatement=o("await"),r.ContinueStatement=i("continue"),r.ReturnStatement=i("return","argument"),r.BreakStatement=i("break"),r.ThrowStatement=i("throw","argument")},{"babel-runtime/core-js/get-iterator":120,"babel-types":178}],83:[function(e,t,r){"use strict";r.__esModule=!0,r.TaggedTemplateExpression=function(e){this.print(e.tag,e),this.print(e.quasi,e)},r.TemplateElement=function(e,t){var r=t.quasis[0]===e,n=t.quasis[t.quasis.length-1]===e,i=(r?"`":"}")+e.value.raw+(n?"`":"${");this.token(i)},r.TemplateLiteral=function(e){for(var t=e.quasis,r=0;r<t.length;r++)this.print(t[r],e),r+1<t.length&&this.print(e.expressions[r],e)}},{}],84:[function(e,t,r){"use strict";function n(e){this.token("..."),this.print(e.argument,e)}function i(e){var t=e.properties;this.token("{"),this.printInnerComments(e),t.length&&(this.space(),this.printList(t,e,{indent:!0,statement:!0}),this.space()),this.token("}")}function s(e){var t=e.elements,r=t.length;this.token("["),this.printInnerComments(e);for(var n=0;n<t.length;n++){var i=t[n];i?(n>0&&this.space(),this.print(i,e),n<r-1&&this.token(",")):this.token(",")}this.token("]")}r.__esModule=!0,r.ArrayPattern=r.ObjectPattern=r.RestProperty=r.SpreadProperty=r.SpreadElement=void 0,r.Identifier=function(e){e.variance&&("plus"===e.variance?this.token("+"):"minus"===e.variance&&this.token("-")),this.word(e.name)},r.RestElement=n,r.ObjectExpression=i,r.ObjectMethod=function(e){this.printJoin(e.decorators,e),this._method(e)},r.ObjectProperty=function(e){if(this.printJoin(e.decorators,e),e.computed)this.token("["),this.print(e.key,e),this.token("]");else{if(a.isAssignmentPattern(e.value)&&a.isIdentifier(e.key)&&e.key.name===e.value.left.name)return void this.print(e.value,e);if(this.print(e.key,e),e.shorthand&&a.isIdentifier(e.key)&&a.isIdentifier(e.value)&&e.key.name===e.value.name)return}this.token(":"),this.space(),this.print(e.value,e)},r.ArrayExpression=s,r.RegExpLiteral=function(e){this.word("/"+e.pattern+"/"+e.flags)},r.BooleanLiteral=function(e){this.word(e.value?"true":"false")},r.NullLiteral=function(){this.word("null")},r.NumericLiteral=function(e){var t=this.getPossibleRaw(e),r=e.value+"";null==t?this.number(r):this.format.minified?this.number(t.length<r.length?t:r):this.number(t)},r.StringLiteral=function(e,t){var r=this.getPossibleRaw(e);if(this.format.minified||null==r){var n={quotes:a.isJSX(t)?"double":this.format.quotes,wrap:!0};this.format.jsonCompatibleStrings&&(n.json=!0);var i=(0,o.default)(e.value,n);return this.token(i)}this.token(r)};var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types")),o=function(e){return e&&e.__esModule?e:{default:e}}(e("jsesc"));r.SpreadElement=n,r.SpreadProperty=n,r.RestProperty=n,r.ObjectPattern=i,r.ArrayPattern=s},{"babel-types":178,jsesc:323}],85:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0,r.CodeGenerator=void 0;var i=n(e("babel-runtime/helpers/classCallCheck")),s=n(e("babel-runtime/helpers/possibleConstructorReturn")),a=n(e("babel-runtime/helpers/inherits"));r.default=function(e,t,r){return new c(e,t,r).generate()};var o=n(e("detect-indent")),u=n(e("./source-map")),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-messages")),c=function(e){function t(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments[2];(0,i.default)(this,t);var c=r.tokens||[],p=function(e,t,r){var n=" ";if(e&&"string"==typeof e){var i=(0,o.default)(e).indent;i&&" "!==i&&(n=i)}var s={auxiliaryCommentBefore:t.auxiliaryCommentBefore,auxiliaryCommentAfter:t.auxiliaryCommentAfter,shouldPrintComment:t.shouldPrintComment,retainLines:t.retainLines,retainFunctionParens:t.retainFunctionParens,comments:null==t.comments||t.comments,compact:t.compact,minified:t.minified,concise:t.concise,quotes:t.quotes||function(e,t){if(!e)return"double";for(var r={single:0,double:0},n=0,i=0;i<t.length;i++){var s=t[i];if("string"===s.type.label&&("'"===e.slice(s.start,s.end)[0]?r.single++:r.double++,++n>=3))break}return r.single>r.double?"single":"double"}(e,r),jsonCompatibleStrings:t.jsonCompatibleStrings,indent:{adjustMultilineComment:!0,style:n,base:0},flowCommaSeparator:t.flowCommaSeparator};return s.minified?(s.compact=!0,s.shouldPrintComment=s.shouldPrintComment||function(){return s.comments}):s.shouldPrintComment=s.shouldPrintComment||function(e){return s.comments||e.indexOf("@license")>=0||e.indexOf("@preserve")>=0},"auto"===s.compact&&(s.compact=e.length>5e5,s.compact&&console.error("[BABEL] "+l.get("codeGeneratorDeopt",t.filename,"500KB"))),s.compact&&(s.indent.adjustMultilineComment=!1),s}(a,n,c),h=n.sourceMaps?new u.default(n,a):null,f=(0,s.default)(this,e.call(this,p,h,c));return f.ast=r,f}return(0,a.default)(t,e),t.prototype.generate=function(){return e.prototype.generate.call(this,this.ast)},t}(n(e("./printer")).default);r.CodeGenerator=function(){function e(t,r,n){(0,i.default)(this,e),this._generator=new c(t,r,n)}return e.prototype.generate=function(){return this._generator.generate()},e}()},{"./printer":89,"./source-map":90,"babel-messages":110,"babel-runtime/helpers/classCallCheck":134,"babel-runtime/helpers/inherits":135,"babel-runtime/helpers/possibleConstructorReturn":137,"detect-indent":309}],86:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){function t(e,t){var n=r[e];r[e]=n?function(e,r,i){var s=n(e,r,i);return null==s?t(e,r,i):s}:t}for(var r={},n=(0,c.default)(e),i=Array.isArray(n),s=0,n=i?n:(0,l.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}var o=a,u=f.FLIPPED_ALIAS_KEYS[o];if(u)for(var p=u,h=Array.isArray(p),d=0,p=h?p:(0,l.default)(p);;){var m;if(h){if(d>=p.length)break;m=p[d++]}else{if((d=p.next()).done)break;m=d.value}t(m,e[o])}else t(o,e[o])}return r}function a(e,t,r,n){var i=e[t.type];return i?i(t,r,n):null}function o(e){return!!f.isCallExpression(e)||!!f.isMemberExpression(e)&&(o(e.object)||!e.computed&&o(e.property))}function u(e,t,r){if(!e)return 0;f.isExpressionStatement(e)&&(e=e.expression);var n=a(m,e,t);if(!n){var i=a(y,e,t);if(i)for(var s=0;s<i.length&&!(n=u(i[s],e,r));s++);}return n&&n[r]||0}r.__esModule=!0;var l=i(e("babel-runtime/core-js/get-iterator")),c=i(e("babel-runtime/core-js/object/keys"));r.needsWhitespace=u,r.needsWhitespaceBefore=function(e,t){return u(e,t,"before")},r.needsWhitespaceAfter=function(e,t){return u(e,t,"after")},r.needsParens=function(e,t,r){return!!t&&(!(!f.isNewExpression(t)||t.callee!==e||!o(e))||a(d,e,t,r))};var p=i(e("./whitespace")),h=n(e("./parentheses")),f=n(e("babel-types")),d=s(h),m=s(p.default.nodes),y=s(p.default.list)},{"./parentheses":87,"./whitespace":88,"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/object/keys":127,"babel-types":178}],87:[function(e,t,r){"use strict";function n(e,t){return u.isArrayTypeAnnotation(t)}function i(e,t){return u.isBinary(t)||u.isUnaryLike(t)||u.isCallExpression(t)||u.isMemberExpression(t)||u.isNewExpression(t)||u.isConditionalExpression(t)&&e===t.test}function s(e,t){return u.isMemberExpression(t,{object:e})||u.isCallExpression(t,{callee:e})||u.isNewExpression(t,{callee:e})}function a(e,t){return!!(u.isUnaryLike(t)||u.isBinary(t)||u.isConditionalExpression(t,{test:e})||u.isAwaitExpression(t))||s(e,t)}function o(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.considerArrow,n=void 0!==r&&r,i=t.considerDefaultExports,s=void 0!==i&&i,a=e.length-1,o=e[a],l=e[--a];a>0;){if(u.isExpressionStatement(l,{expression:o})||u.isTaggedTemplateExpression(l)||s&&u.isExportDefaultDeclaration(l,{declaration:o})||n&&u.isArrowFunctionExpression(l,{body:o}))return!0;if(!(u.isCallExpression(l,{callee:o})||u.isSequenceExpression(l)&&l.expressions[0]===o||u.isMemberExpression(l,{object:o})||u.isConditional(l,{test:o})||u.isBinary(l,{left:o})||u.isAssignmentExpression(l,{left:o})))return!1;o=l,l=e[--a]}return!1}r.__esModule=!0,r.AwaitExpression=r.FunctionTypeAnnotation=void 0,r.NullableTypeAnnotation=n,r.UpdateExpression=function(e,t){return u.isMemberExpression(t)&&t.object===e},r.ObjectExpression=function(e,t,r){return o(r,{considerArrow:!0})},r.DoExpression=function(e,t,r){return o(r)},r.Binary=function(e,t){if((u.isCallExpression(t)||u.isNewExpression(t))&&t.callee===e||u.isUnaryLike(t)||u.isMemberExpression(t)&&t.object===e||u.isAwaitExpression(t))return!0;if(u.isBinary(t)){var r=t.operator,n=l[r],i=e.operator,s=l[i];if(n===s&&t.right===e&&!u.isLogicalExpression(t)||n>s)return!0}return!1},r.BinaryExpression=function(e,t){return"in"===e.operator&&(u.isVariableDeclarator(t)||u.isFor(t))},r.SequenceExpression=function(e,t){return!(u.isForStatement(t)||u.isThrowStatement(t)||u.isReturnStatement(t)||u.isIfStatement(t)&&t.test===e||u.isWhileStatement(t)&&t.test===e||u.isForInStatement(t)&&t.right===e||u.isSwitchStatement(t)&&t.discriminant===e||u.isExpressionStatement(t)&&t.expression===e)},r.YieldExpression=i,r.ClassExpression=function(e,t,r){return o(r,{considerDefaultExports:!0})},r.UnaryLike=s,r.FunctionExpression=function(e,t,r){return o(r,{considerDefaultExports:!0})},r.ArrowFunctionExpression=function(e,t){return!!(u.isExportDeclaration(t)||u.isBinaryExpression(t)||u.isLogicalExpression(t)||u.isUnaryExpression(t)||u.isTaggedTemplateExpression(t))||s(e,t)},r.ConditionalExpression=a,r.AssignmentExpression=function(e){return!!u.isObjectPattern(e.left)||a.apply(void 0,arguments)};var u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types")),l={"||":0,"&&":1,"|":2,"^":3,"&":4,"==":5,"===":5,"!=":5,"!==":5,"<":6,">":6,"<=":6,">=":6,in:6,instanceof:6,">>":7,"<<":7,">>>":7,"+":8,"-":8,"*":9,"/":9,"%":9,"**":10};r.FunctionTypeAnnotation=n,r.AwaitExpression=i},{"babel-types":178}],88:[function(e,t,r){"use strict";function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o.isMemberExpression(e)?(n(e.object,t),e.computed&&n(e.property,t)):o.isBinary(e)||o.isAssignmentExpression(e)?(n(e.left,t),n(e.right,t)):o.isCallExpression(e)?(t.hasCall=!0,n(e.callee,t)):o.isFunction(e)?t.hasFunction=!0:o.isIdentifier(e)&&(t.hasHelper=t.hasHelper||i(e.callee)),t}function i(e){return o.isMemberExpression(e)?i(e.object)||i(e.property):o.isIdentifier(e)?"require"===e.name||"_"===e.name[0]:o.isCallExpression(e)?i(e.callee):!(!o.isBinary(e)&&!o.isAssignmentExpression(e))&&(o.isIdentifier(e.left)&&i(e.left)||i(e.right))}function s(e){return o.isLiteral(e)||o.isObjectExpression(e)||o.isArrayExpression(e)||o.isIdentifier(e)||o.isMemberExpression(e)}var a=function(e){return e&&e.__esModule?e:{default:e}}(e("lodash/map")),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));r.nodes={AssignmentExpression:function(e){var t=n(e.right);if(t.hasCall&&t.hasHelper||t.hasFunction)return{before:t.hasFunction,after:!0}},SwitchCase:function(e,t){return{before:e.consequent.length||t.cases[0]===e}},LogicalExpression:function(e){if(o.isFunction(e.left)||o.isFunction(e.right))return{after:!0}},Literal:function(e){if("use strict"===e.value)return{after:!0}},CallExpression:function(e){if(o.isFunction(e.callee)||i(e))return{before:!0,after:!0}},VariableDeclaration:function(e){for(var t=0;t<e.declarations.length;t++){var r=e.declarations[t],a=i(r.id)&&!s(r.init);if(!a){var o=n(r.init);a=i(r.init)&&o.hasCall||o.hasFunction}if(a)return{before:!0,after:!0}}},IfStatement:function(e){if(o.isBlockStatement(e.consequent))return{before:!0,after:!0}}},r.nodes.ObjectProperty=r.nodes.ObjectTypeProperty=r.nodes.ObjectMethod=r.nodes.SpreadProperty=function(e,t){if(t.properties[0]===e)return{before:!0}},r.list={VariableDeclaration:function(e){return(0,a.default)(e.declarations,"init")},ArrayExpression:function(e){return e.elements},ObjectExpression:function(e){return e.properties}},[["Function",!0],["Class",!0],["Loop",!0],["LabeledStatement",!0],["SwitchStatement",!0],["TryStatement",!0]].forEach(function(e){var t=e[0],n=e[1];"boolean"==typeof n&&(n={after:n,before:n}),[t].concat(o.FLIPPED_ALIAS_KEYS[t]||[]).forEach(function(e){r.nodes[e]=function(){return n}})})},{"babel-types":178,"lodash/map":525}],89:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(){this.token(","),this.space()}r.__esModule=!0;var a=i(e("babel-runtime/core-js/object/assign")),o=i(e("babel-runtime/core-js/get-iterator")),u=i(e("babel-runtime/core-js/json/stringify")),l=i(e("babel-runtime/core-js/weak-set")),c=i(e("babel-runtime/helpers/classCallCheck")),p=i(e("lodash/find")),h=i(e("lodash/findLast")),f=i(e("lodash/isInteger")),d=i(e("lodash/repeat")),m=i(e("./buffer")),y=n(e("./node")),g=i(e("./whitespace")),b=n(e("babel-types")),v=/e/i,x=/\.0+$/,E=/^0[box]/,A=function(){function e(t,r,n){(0,c.default)(this,e),this.inForStatementInitCounter=0,this._printStack=[],this._indent=0,this._insideAux=!1,this._printedCommentStarts={},this._parenPushNewlineState=null,this._printAuxAfterOnNextUserNode=!1,this._printedComments=new l.default,this._endsWithInteger=!1,this._endsWithWord=!1,this.format=t||{},this._buf=new m.default(r),this._whitespace=n.length>0?new g.default(n):null}return e.prototype.generate=function(e){return this.print(e),this._maybeAddAuxComment(),this._buf.get()},e.prototype.indent=function(){this.format.compact||this.format.concise||this._indent++},e.prototype.dedent=function(){this.format.compact||this.format.concise||this._indent--},e.prototype.semicolon=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._maybeAddAuxComment(),this._append(";",!e)},e.prototype.rightBrace=function(){this.format.minified&&this._buf.removeLastSemicolon(),this.token("}")},e.prototype.space=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.format.compact||(this._buf.hasContent()&&!this.endsWith(" ")&&!this.endsWith("\n")||e)&&this._space()},e.prototype.word=function(e){this._endsWithWord&&this._space(),this._maybeAddAuxComment(),this._append(e),this._endsWithWord=!0},e.prototype.number=function(e){this.word(e),this._endsWithInteger=(0,f.default)(+e)&&!E.test(e)&&!v.test(e)&&!x.test(e)&&"."!==e[e.length-1]},e.prototype.token=function(e){("--"===e&&this.endsWith("!")||"+"===e[0]&&this.endsWith("+")||"-"===e[0]&&this.endsWith("-")||"."===e[0]&&this._endsWithInteger)&&this._space(),this._maybeAddAuxComment(),this._append(e)},e.prototype.newline=function(e){if(!this.format.retainLines&&!this.format.compact)if(this.format.concise)this.space();else if(!(this.endsWith("\n\n")||("number"!=typeof e&&(e=1),e=Math.min(2,e),(this.endsWith("{\n")||this.endsWith(":\n"))&&e--,e<=0)))for(var t=0;t<e;t++)this._newline()},e.prototype.endsWith=function(e){return this._buf.endsWith(e)},e.prototype.removeTrailingNewline=function(){this._buf.removeTrailingNewline()},e.prototype.source=function(e,t){this._catchUp(e,t),this._buf.source(e,t)},e.prototype.withSource=function(e,t,r){this._catchUp(e,t),this._buf.withSource(e,t,r)},e.prototype._space=function(){this._append(" ",!0)},e.prototype._newline=function(){this._append("\n",!0)},e.prototype._append=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._maybeAddParen(e),this._maybeIndent(e),t?this._buf.queue(e):this._buf.append(e),this._endsWithWord=!1,this._endsWithInteger=!1},e.prototype._maybeIndent=function(e){this._indent&&this.endsWith("\n")&&"\n"!==e[0]&&this._buf.queue(this._getIndent())},e.prototype._maybeAddParen=function(e){var t=this._parenPushNewlineState;if(t){this._parenPushNewlineState=null;var r=void 0;for(r=0;r<e.length&&" "===e[r];r++);if(r!==e.length){var n=e[r];"\n"!==n&&"/"!==n||(this.token("("),this.indent(),t.printed=!0)}}},e.prototype._catchUp=function(e,t){if(this.format.retainLines){var r=t?t[e]:null;if(r&&null!==r.line)for(var n=r.line-this._buf.getCurrentLine(),i=0;i<n;i++)this._newline()}},e.prototype._getIndent=function(){return(0,d.default)(this.format.indent.style,this._indent)},e.prototype.startTerminatorless=function(){return this._parenPushNewlineState={printed:!1}},e.prototype.endTerminatorless=function(e){e.printed&&(this.dedent(),this.newline(),this.token(")"))},e.prototype.print=function(e,t){var r=this;if(e){var n=this.format.concise;e._compact&&(this.format.concise=!0);if(!this[e.type])throw new ReferenceError("unknown node of type "+(0,u.default)(e.type)+" with constructor "+(0,u.default)(e&&e.constructor.name));this._printStack.push(e);var i=this._insideAux;this._insideAux=!e.loc,this._maybeAddAuxComment(this._insideAux&&!i);var s=y.needsParens(e,t,this._printStack);this.format.retainFunctionParens&&"FunctionExpression"===e.type&&e.extra&&e.extra.parenthesized&&(s=!0),s&&this.token("("),this._printLeadingComments(e,t);var a=b.isProgram(e)||b.isFile(e)?null:e.loc;this.withSource("start",a,function(){r[e.type](e,t)}),this._printTrailingComments(e,t),s&&this.token(")"),this._printStack.pop(),this.format.concise=n,this._insideAux=i}},e.prototype._maybeAddAuxComment=function(e){e&&this._printAuxBeforeComment(),this._insideAux||this._printAuxAfterComment()},e.prototype._printAuxBeforeComment=function(){if(!this._printAuxAfterOnNextUserNode){this._printAuxAfterOnNextUserNode=!0;var e=this.format.auxiliaryCommentBefore;e&&this._printComment({type:"CommentBlock",value:e})}},e.prototype._printAuxAfterComment=function(){if(this._printAuxAfterOnNextUserNode){this._printAuxAfterOnNextUserNode=!1;var e=this.format.auxiliaryCommentAfter;e&&this._printComment({type:"CommentBlock",value:e})}},e.prototype.getPossibleRaw=function(e){var t=e.extra;if(t&&null!=t.raw&&null!=t.rawValue&&e.value===t.rawValue)return t.raw},e.prototype.printJoin=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e&&e.length){r.indent&&this.indent();for(var n={addNewlines:r.addNewlines},i=0;i<e.length;i++){var s=e[i];s&&(r.statement&&this._printNewline(!0,s,t,n),this.print(s,t),r.iterator&&r.iterator(s,i),r.separator&&i<e.length-1&&r.separator.call(this),r.statement&&this._printNewline(!1,s,t,n))}r.indent&&this.dedent()}},e.prototype.printAndIndentOnComments=function(e,t){var r=!!e.leadingComments;r&&this.indent(),this.print(e,t),r&&this.dedent()},e.prototype.printBlock=function(e){var t=e.body;b.isEmptyStatement(t)||this.space(),this.print(t,e)},e.prototype._printTrailingComments=function(e,t){this._printComments(this._getComments(!1,e,t))},e.prototype._printLeadingComments=function(e,t){this._printComments(this._getComments(!0,e,t))},e.prototype.printInnerComments=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.innerComments&&(t&&this.indent(),this._printComments(e.innerComments),t&&this.dedent())},e.prototype.printSequence=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r.statement=!0,this.printJoin(e,t,r)},e.prototype.printList=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return null==r.separator&&(r.separator=s),this.printJoin(e,t,r)},e.prototype._printNewline=function(e,t,r,n){var i=this;if(!this.format.retainLines&&!this.format.compact)if(this.format.concise)this.space();else{var s=0;if(null!=t.start&&!t._ignoreUserWhitespace&&this._whitespace)if(e){var a=t.leadingComments,o=a&&(0,p.default)(a,function(e){return!!e.loc&&i.format.shouldPrintComment(e.value)});s=this._whitespace.getNewlinesBefore(o||t)}else{var u=t.trailingComments,l=u&&(0,h.default)(u,function(e){return!!e.loc&&i.format.shouldPrintComment(e.value)});s=this._whitespace.getNewlinesAfter(l||t)}else{e||s++,n.addNewlines&&(s+=n.addNewlines(e,t)||0);var c=y.needsWhitespaceAfter;e&&(c=y.needsWhitespaceBefore),c(t,r)&&s++,this._buf.hasContent()||(s=0)}this.newline(s)}},e.prototype._getComments=function(e,t){return t&&(e?t.leadingComments:t.trailingComments)||[]},e.prototype._printComment=function(e){var t=this;if(this.format.shouldPrintComment(e.value)&&!e.ignore&&!this._printedComments.has(e)){if(this._printedComments.add(e),null!=e.start){if(this._printedCommentStarts[e.start])return;this._printedCommentStarts[e.start]=!0}this.newline(this._whitespace?this._whitespace.getNewlinesBefore(e):0),this.endsWith("[")||this.endsWith("{")||this.space();var r="CommentLine"===e.type?"//"+e.value+"\n":"/*"+e.value+"*/";if("CommentBlock"===e.type&&this.format.indent.adjustMultilineComment){var n=e.loc&&e.loc.start.column;if(n){var i=new RegExp("\\n\\s{1,"+n+"}","g");r=r.replace(i,"\n")}var s=Math.max(this._getIndent().length,this._buf.getCurrentColumn());r=r.replace(/\n(?!$)/g,"\n"+(0,d.default)(" ",s))}this.withSource("start",e.loc,function(){t._append(r)}),this.newline((this._whitespace?this._whitespace.getNewlinesAfter(e):0)+("CommentLine"===e.type?-1:0))}},e.prototype._printComments=function(e){if(e&&e.length)for(var t=e,r=Array.isArray(t),n=0,t=r?t:(0,o.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i;this._printComment(s)}},e}();r.default=A;for(var D=[e("./generators/template-literals"),e("./generators/expressions"),e("./generators/statements"),e("./generators/classes"),e("./generators/methods"),e("./generators/modules"),e("./generators/types"),e("./generators/flow"),e("./generators/base"),e("./generators/jsx")],C=0;C<D.length;C++){var S=D[C];(0,a.default)(A.prototype,S)}t.exports=r.default},{"./buffer":74,"./generators/base":75,"./generators/classes":76,"./generators/expressions":77,"./generators/flow":78,"./generators/jsx":79,"./generators/methods":80,"./generators/modules":81,"./generators/statements":82,"./generators/template-literals":83,"./generators/types":84,"./node":86,"./whitespace":91,"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/json/stringify":121,"babel-runtime/core-js/object/assign":124,"babel-runtime/core-js/weak-set":133,"babel-runtime/helpers/classCallCheck":134,"babel-types":178,"lodash/find":499,"lodash/findLast":501,"lodash/isInteger":514,"lodash/repeat":530}],90:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/object/keys")),s=n(e("babel-runtime/helpers/typeof")),a=n(e("babel-runtime/helpers/classCallCheck")),o=n(e("source-map")),u=function(){function e(t,r){(0,a.default)(this,e),this._cachedMap=null,this._code=r,this._opts=t,this._rawMappings=[]}return e.prototype.get=function(){if(!this._cachedMap){var e=this._cachedMap=new o.default.SourceMapGenerator({file:this._opts.sourceMapTarget,sourceRoot:this._opts.sourceRoot}),t=this._code;"string"==typeof t?e.setSourceContent(this._opts.sourceFileName,t):"object"===(void 0===t?"undefined":(0,s.default)(t))&&(0,i.default)(t).forEach(function(r){e.setSourceContent(r,t[r])}),this._rawMappings.forEach(e.addMapping,e)}return this._cachedMap.toJSON()},e.prototype.getRawMappings=function(){return this._rawMappings.slice()},e.prototype.mark=function(e,t,r,n,i,s){this._lastGenLine!==e&&null===r||this._lastGenLine===e&&this._lastSourceLine===r&&this._lastSourceColumn===n||(this._cachedMap=null,this._lastGenLine=e,this._lastSourceLine=r,this._lastSourceColumn=n,this._rawMappings.push({name:i||void 0,generated:{line:e,column:t},source:null==r?void 0:s||this._opts.sourceFileName,original:null==r?void 0:{line:r,column:n}}))},e}();r.default=u,t.exports=r.default},{"babel-runtime/core-js/object/keys":127,"babel-runtime/helpers/classCallCheck":134,"babel-runtime/helpers/typeof":138,"source-map":102}],91:[function(e,t,r){"use strict";r.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/helpers/classCallCheck")),i=function(){function e(t){(0,n.default)(this,e),this.tokens=t,this.used={}}return e.prototype.getNewlinesBefore=function(e){var t=void 0,r=void 0,n=this.tokens,i=this._findToken(function(t){return t.start-e.start},0,n.length);if(i>=0){for(;i&&e.start===n[i-1].start;)--i;t=n[i-1],r=n[i]}return this._getNewlinesBetween(t,r)},e.prototype.getNewlinesAfter=function(e){var t=void 0,r=void 0,n=this.tokens,i=this._findToken(function(t){return t.end-e.end},0,n.length);if(i>=0){for(;i&&e.end===n[i-1].end;)--i;t=n[i],","===(r=n[i+1]).type.label&&(r=n[i+2])}return r&&"eof"===r.type.label?1:this._getNewlinesBetween(t,r)},e.prototype._getNewlinesBetween=function(e,t){if(!t||!t.loc)return 0;for(var r=e?e.loc.end.line:1,n=t.loc.start.line,i=0,s=r;s<n;s++)void 0===this.used[s]&&(this.used[s]=!0,i++);return i},e.prototype._findToken=function(e,t,r){if(t>=r)return-1;var n=t+r>>>1,i=e(this.tokens[n]);return i<0?this._findToken(e,n+1,r):i>0?this._findToken(e,t,n):0===i?n:-1},e}();r.default=i,t.exports=r.default},{"babel-runtime/helpers/classCallCheck":134}],92:[function(e,t,r){arguments[4][62][0].apply(r,arguments)},{"./util":101,dup:62}],93:[function(e,t,r){arguments[4][63][0].apply(r,arguments)},{"./base64":94,dup:63}],94:[function(e,t,r){arguments[4][64][0].apply(r,arguments)},{dup:64}],95:[function(e,t,r){arguments[4][65][0].apply(r,arguments)},{dup:65}],96:[function(e,t,r){arguments[4][66][0].apply(r,arguments)},{"./util":101,dup:66}],97:[function(e,t,r){arguments[4][67][0].apply(r,arguments)},{dup:67}],98:[function(e,t,r){arguments[4][68][0].apply(r,arguments)},{"./array-set":92,"./base64-vlq":93,"./binary-search":95,"./quick-sort":97,"./util":101,dup:68}],99:[function(e,t,r){arguments[4][69][0].apply(r,arguments)},{"./array-set":92,"./base64-vlq":93,"./mapping-list":96,"./util":101,dup:69}],100:[function(e,t,r){arguments[4][70][0].apply(r,arguments)},{"./source-map-generator":99,"./util":101,dup:70}],101:[function(e,t,r){arguments[4][71][0].apply(r,arguments)},{dup:71}],102:[function(e,t,r){arguments[4][72][0].apply(r,arguments)},{"./lib/source-map-consumer":98,"./lib/source-map-generator":99,"./lib/source-node":100,dup:72}],103:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=u.objectExpression([]);return(0,s.default)(e).forEach(function(r){var n=e[r],i=u.objectExpression([]),a=u.objectProperty(n._key,i,n._computed);(0,s.default)(n).forEach(function(e){var t=n[e];if("_"!==e[0]){var r=t;(u.isClassMethod(t)||u.isClassProperty(t))&&(t=t.value);var s=u.objectProperty(u.identifier(e),t);u.inheritsComments(s,r),u.removeComments(r),i.properties.push(s)}}),t.properties.push(a)}),t}r.__esModule=!0;var s=n(e("babel-runtime/core-js/object/keys"));r.push=function(e,t,r,n,i){var s=u.toKeyAlias(t),l={};if((0,o.default)(e,s)&&(l=e[s]),e[s]=l,l._inherits=l._inherits||[],l._inherits.push(t),l._key=t.key,t.computed&&(l._computed=!0),t.decorators){var c=l.decorators=l.decorators||u.arrayExpression([]);c.elements=c.elements.concat(t.decorators.map(function(e){return e.expression}).reverse())}if(l.value||l.initializer)throw n.buildCodeFrameError(t,"Key conflict with sibling node");var p=void 0,h=void 0;(u.isObjectProperty(t)||u.isObjectMethod(t)||u.isClassMethod(t))&&(p=u.toComputedKey(t,t.key)),u.isObjectProperty(t)||u.isClassProperty(t)?h=t.value:(u.isObjectMethod(t)||u.isClassMethod(t))&&((h=u.functionExpression(null,t.params,t.body,t.generator,t.async)).returnType=t.returnType);var f=function(e){return!u.isClassMethod(e)&&!u.isObjectMethod(e)||"get"!==e.kind&&"set"!==e.kind?"value":e.kind}(t);return r&&"value"===f||(r=f),i&&u.isStringLiteral(p)&&("value"===r||"initializer"===r)&&u.isFunctionExpression(h)&&(h=(0,a.default)({id:p,node:h,scope:i})),h&&(u.inheritsComments(h,t),l[r]=h),l},r.hasComputed=function(e){for(var t in e)if(e[t]._computed)return!0;return!1},r.toComputedObjectFromClass=function(e){for(var t=u.arrayExpression([]),r=0;r<e.properties.length;r++){var n=e.properties[r],i=n.value;i.properties.unshift(u.objectProperty(u.identifier("key"),u.toComputedKey(n))),t.elements.push(i)}return t},r.toClassObject=i,r.toDefineObject=function(e){return(0,s.default)(e).forEach(function(t){var r=e[t];r.value&&(r.writable=u.booleanLiteral(!0)),r.configurable=u.booleanLiteral(!0),r.enumerable=u.booleanLiteral(!0)}),i(e)};var a=n(e("babel-helper-function-name")),o=n(e("lodash/has")),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"))},{"babel-helper-function-name":104,"babel-runtime/core-js/object/keys":127,"babel-types":178,"lodash/has":504}],104:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0,r.default=function(e){var t=e.node,r=e.parent,n=e.scope,s=e.id;if(!t.id){if(!a.isObjectProperty(r)&&!a.isObjectMethod(r,{kind:"method"})||r.computed&&!a.isLiteral(r.key)){if(a.isVariableDeclarator(r)){if(s=r.id,a.isIdentifier(s)){var c=n.parent.getBinding(s.name);if(c&&c.constant&&n.getBinding(s.name)===c)return t.id=s,void(t.id[a.NOT_LOCAL_BINDING]=!0)}}else if(a.isAssignmentExpression(r))s=r.left;else if(!s)return}else s=r.key;var p=void 0;if(s&&a.isLiteral(s))p=s.value;else{if(!s||!a.isIdentifier(s))return;p=s.name}p=a.toBindingIdentifierName(p),(s=a.identifier(p))[a.NOT_LOCAL_BINDING]=!0;return function(e,t,r,n){if(e.selfReference){if(!n.hasBinding(r.name)||n.hasGlobal(r.name)){if(!a.isFunction(t))return;var s=o;t.generator&&(s=u);var l=s({FUNCTION:t,FUNCTION_ID:r,FUNCTION_KEY:n.generateUidIdentifier(r.name)}).expression;l.callee._skipModulesRemap=!0;for(var c=l.callee.body.body[0].params,p=0,h=(0,i.default)(t);p<h;p++)c.push(n.generateUidIdentifier("x"));return l}n.rename(r.name)}t.id=r,n.getProgramParent().references[r.name]=!0}(function(e,t,r){var n={selfAssignment:!1,selfReference:!1,outerDeclar:r.getBindingIdentifier(t),references:[],name:t},i=r.getOwnBinding(t);return i?"param"===i.kind&&(n.selfReference=!0):(n.outerDeclar||r.hasGlobal(t))&&r.traverse(e,l,n),n}(t,p,n),t,s,n)||t}};var i=n(e("babel-helper-get-function-arity")),s=n(e("babel-template")),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types")),o=(0,s.default)("\n (function (FUNCTION_KEY) {\n function FUNCTION_ID() {\n return FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n }\n\n return FUNCTION_ID;\n })(FUNCTION)\n"),u=(0,s.default)("\n (function (FUNCTION_KEY) {\n function* FUNCTION_ID() {\n return yield* FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n };\n\n return FUNCTION_ID;\n })(FUNCTION)\n"),l={"ReferencedIdentifier|BindingIdentifier":function(e,t){if(e.node.name===t.name){e.scope.getBindingIdentifier(t.name)===t.outerDeclar&&(t.selfReference=!0,e.stop())}}};t.exports=r.default},{"babel-helper-get-function-arity":105,"babel-template":139,"babel-types":178}],105:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e){for(var t=e.params,r=0;r<t.length;r++){var i=t[r];if(n.isAssignmentPattern(i)||n.isRestElement(i))return r}return t.length};var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));t.exports=r.default},{"babel-types":178}],106:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t,r){return 1===r.length&&n.isSpreadElement(r[0])&&n.isIdentifier(r[0].argument,{name:"arguments"})?n.callExpression(n.memberExpression(e,n.identifier("apply")),[t,r[0].argument]):n.callExpression(n.memberExpression(e,n.identifier("call")),[t].concat(r))};var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));t.exports=r.default},{"babel-types":178}],107:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){return p.isMemberExpression(e)&&p.isSuper(e.object)}function a(e,t){var r=t?e:p.memberExpression(e,p.identifier("prototype"));return p.logicalExpression("||",p.memberExpression(r,p.identifier("__proto__")),p.callExpression(p.memberExpression(p.identifier("Object"),p.identifier("getPrototypeOf")),[r]))}r.__esModule=!0;var o=i(e("babel-runtime/helpers/classCallCheck")),u=i(e("babel-runtime/core-js/symbol")),l=i(e("babel-helper-optimise-call-expression")),c=n(e("babel-messages")),p=n(e("babel-types")),h=(0,u.default)(),f={Function:function(e){e.inShadow("this")||e.skip()},ReturnStatement:function(e,t){e.inShadow("this")||t.returns.push(e)},ThisExpression:function(e,t){e.node[h]||t.thises.push(e)},enter:function(e,t){var r=t.specHandle;t.isLoose&&(r=t.looseHandle);var n=e.isCallExpression()&&e.get("callee").isSuper(),i=r.call(t,e);i&&(t.hasSuper=!0),n&&t.bareSupers.push(e),!0===i&&e.requeue(),!0!==i&&i&&(Array.isArray(i)?e.replaceWithMultiple(i):e.replaceWith(i))}},d=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(0,o.default)(this,e),this.forceSuperMemoisation=t.forceSuperMemoisation,this.methodPath=t.methodPath,this.methodNode=t.methodNode,this.superRef=t.superRef,this.isStatic=t.isStatic,this.hasSuper=!1,this.inClass=r,this.isLoose=t.isLoose,this.scope=this.methodPath.scope,this.file=t.file,this.opts=t,this.bareSupers=[],this.returns=[],this.thises=[]}return e.prototype.getObjectRef=function(){return this.opts.objectRef||this.opts.getObjectRef()},e.prototype.setSuperProperty=function(e,t,r){return p.callExpression(this.file.addHelper("set"),[a(this.getObjectRef(),this.isStatic),r?e:p.stringLiteral(e.name),t,p.thisExpression()])},e.prototype.getSuperProperty=function(e,t){return p.callExpression(this.file.addHelper("get"),[a(this.getObjectRef(),this.isStatic),t?e:p.stringLiteral(e.name),p.thisExpression()])},e.prototype.replace=function(){this.methodPath.traverse(f,this)},e.prototype.getLooseSuperProperty=function(e,t){var r=this.methodNode,n=this.superRef||p.identifier("Function");return t.property===e?void 0:p.isCallExpression(t,{callee:e})?void 0:p.isMemberExpression(t)&&!r.static?p.memberExpression(n,p.identifier("prototype")):n},e.prototype.looseHandle=function(e){var t=e.node;if(e.isSuper())return this.getLooseSuperProperty(t,e.parent);if(e.isCallExpression()){var r=t.callee;if(!p.isMemberExpression(r))return;if(!p.isSuper(r.object))return;return p.appendToMemberExpression(r,p.identifier("call")),t.arguments.unshift(p.thisExpression()),!0}},e.prototype.specHandleAssignmentExpression=function(e,t,r){return"="===r.operator?this.setSuperProperty(r.left.property,r.right,r.left.computed):(e=e||t.scope.generateUidIdentifier("ref"),[p.variableDeclaration("var",[p.variableDeclarator(e,r.left)]),p.expressionStatement(p.assignmentExpression("=",r.left,p.binaryExpression(r.operator[0],e,r.right)))])},e.prototype.specHandle=function(e){var t=void 0,r=void 0,n=void 0,i=e.parent,a=e.node;if(function(e,t){return!!p.isSuper(e)&&!p.isMemberExpression(t,{computed:!1})&&!p.isCallExpression(t,{callee:e})}(a,i))throw e.buildCodeFrameError(c.get("classesIllegalBareSuper"));if(p.isCallExpression(a)){var o=a.callee;if(p.isSuper(o))return;s(o)&&(t=o.property,r=o.computed,n=a.arguments)}else if(p.isMemberExpression(a)&&p.isSuper(a.object))t=a.property,r=a.computed;else{if(p.isUpdateExpression(a)&&s(a.argument)){var u=p.binaryExpression(a.operator[0],a.argument,p.numericLiteral(1));if(a.prefix)return this.specHandleAssignmentExpression(null,e,u);var l=e.scope.generateUidIdentifier("ref");return this.specHandleAssignmentExpression(l,e,u).concat(p.expressionStatement(l))}if(p.isAssignmentExpression(a)&&s(a.left))return this.specHandleAssignmentExpression(null,e,a)}if(t){var h=this.getSuperProperty(t,r);return n?this.optimiseCall(h,n):h}},e.prototype.optimiseCall=function(e,t){var r=p.thisExpression();return r[h]=!0,(0,l.default)(e,r,t)},e}();r.default=d,t.exports=r.default},{"babel-helper-optimise-call-expression":106,"babel-messages":110,"babel-runtime/core-js/symbol":129,"babel-runtime/helpers/classCallCheck":134,"babel-types":178}],108:[function(e,t,r){"use strict";r.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-template")),i={};r.default=i,i.typeof=(0,n.default)('\n (typeof Symbol === "function" && typeof Symbol.iterator === "symbol")\n ? function (obj) { return typeof obj; }\n : function (obj) {\n return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype\n ? "symbol"\n : typeof obj;\n };\n'),i.jsx=(0,n.default)('\n (function () {\n var REACT_ELEMENT_TYPE = (typeof Symbol === "function" && Symbol.for && Symbol.for("react.element")) || 0xeac7;\n\n return function createRawReactElement (type, props, key, children) {\n var defaultProps = type && type.defaultProps;\n var childrenLength = arguments.length - 3;\n\n if (!props && childrenLength !== 0) {\n // If we\'re going to assign props.children, we create a new object now\n // to avoid mutating defaultProps.\n props = {};\n }\n if (props && defaultProps) {\n for (var propName in defaultProps) {\n if (props[propName] === void 0) {\n props[propName] = defaultProps[propName];\n }\n }\n } else if (!props) {\n props = defaultProps || {};\n }\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 3];\n }\n props.children = childArray;\n }\n\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key === undefined ? null : \'\' + key,\n ref: null,\n props: props,\n _owner: null,\n };\n };\n\n })()\n'),i.asyncIterator=(0,n.default)('\n (function (iterable) {\n if (typeof Symbol === "function") {\n if (Symbol.asyncIterator) {\n var method = iterable[Symbol.asyncIterator];\n if (method != null) return method.call(iterable);\n }\n if (Symbol.iterator) {\n return iterable[Symbol.iterator]();\n }\n }\n throw new TypeError("Object is not async iterable");\n })\n'),i.asyncGenerator=(0,n.default)('\n (function () {\n function AwaitValue(value) {\n this.value = value;\n }\n\n function AsyncGenerator(gen) {\n var front, back;\n\n function send(key, arg) {\n return new Promise(function (resolve, reject) {\n var request = {\n key: key,\n arg: arg,\n resolve: resolve,\n reject: reject,\n next: null\n };\n\n if (back) {\n back = back.next = request;\n } else {\n front = back = request;\n resume(key, arg);\n }\n });\n }\n\n function resume(key, arg) {\n try {\n var result = gen[key](arg)\n var value = result.value;\n if (value instanceof AwaitValue) {\n Promise.resolve(value.value).then(\n function (arg) { resume("next", arg); },\n function (arg) { resume("throw", arg); });\n } else {\n settle(result.done ? "return" : "normal", result.value);\n }\n } catch (err) {\n settle("throw", err);\n }\n }\n\n function settle(type, value) {\n switch (type) {\n case "return":\n front.resolve({ value: value, done: true });\n break;\n case "throw":\n front.reject(value);\n break;\n default:\n front.resolve({ value: value, done: false });\n break;\n }\n\n front = front.next;\n if (front) {\n resume(front.key, front.arg);\n } else {\n back = null;\n }\n }\n\n this._invoke = send;\n\n // Hide "return" method if generator return is not supported\n if (typeof gen.return !== "function") {\n this.return = undefined;\n }\n }\n\n if (typeof Symbol === "function" && Symbol.asyncIterator) {\n AsyncGenerator.prototype[Symbol.asyncIterator] = function () { return this; };\n }\n\n AsyncGenerator.prototype.next = function (arg) { return this._invoke("next", arg); };\n AsyncGenerator.prototype.throw = function (arg) { return this._invoke("throw", arg); };\n AsyncGenerator.prototype.return = function (arg) { return this._invoke("return", arg); };\n\n return {\n wrap: function (fn) {\n return function () {\n return new AsyncGenerator(fn.apply(this, arguments));\n };\n },\n await: function (value) {\n return new AwaitValue(value);\n }\n };\n\n })()\n'),i.asyncGeneratorDelegate=(0,n.default)('\n (function (inner, awaitWrap) {\n var iter = {}, waiting = false;\n\n function pump(key, value) {\n waiting = true;\n value = new Promise(function (resolve) { resolve(inner[key](value)); });\n return { done: false, value: awaitWrap(value) };\n };\n\n if (typeof Symbol === "function" && Symbol.iterator) {\n iter[Symbol.iterator] = function () { return this; };\n }\n\n iter.next = function (value) {\n if (waiting) {\n waiting = false;\n return value;\n }\n return pump("next", value);\n };\n\n if (typeof inner.throw === "function") {\n iter.throw = function (value) {\n if (waiting) {\n waiting = false;\n throw value;\n }\n return pump("throw", value);\n };\n }\n\n if (typeof inner.return === "function") {\n iter.return = function (value) {\n return pump("return", value);\n };\n }\n\n return iter;\n })\n'),i.asyncToGenerator=(0,n.default)('\n (function (fn) {\n return function () {\n var gen = fn.apply(this, arguments);\n return new Promise(function (resolve, reject) {\n function step(key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n return Promise.resolve(value).then(function (value) {\n step("next", value);\n }, function (err) {\n step("throw", err);\n });\n }\n }\n\n return step("next");\n });\n };\n })\n'),i.classCallCheck=(0,n.default)('\n (function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError("Cannot call a class as a function");\n }\n });\n'),i.createClass=(0,n.default)('\n (function() {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i ++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ("value" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n })()\n'),i.defineEnumerableProperties=(0,n.default)('\n (function (obj, descs) {\n for (var key in descs) {\n var desc = descs[key];\n desc.configurable = desc.enumerable = true;\n if ("value" in desc) desc.writable = true;\n Object.defineProperty(obj, key, desc);\n }\n return obj;\n })\n'),i.defaults=(0,n.default)("\n (function (obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }\n return obj;\n })\n"),i.defineProperty=(0,n.default)("\n (function (obj, key, value) {\n // Shortcircuit the slow defineProperty path when possible.\n // We are trying to avoid issues where setters defined on the\n // prototype cause side effects under the fast path of simple\n // assignment. By checking for existence of the property with\n // the in operator, we can optimize most of this overhead away.\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n });\n"),i.extends=(0,n.default)("\n Object.assign || (function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n })\n"),i.get=(0,n.default)('\n (function get(object, property, receiver) {\n if (object === null) object = Function.prototype;\n\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent === null) {\n return undefined;\n } else {\n return get(parent, property, receiver);\n }\n } else if ("value" in desc) {\n return desc.value;\n } else {\n var getter = desc.get;\n\n if (getter === undefined) {\n return undefined;\n }\n\n return getter.call(receiver);\n }\n });\n'),i.inherits=(0,n.default)('\n (function (subClass, superClass) {\n if (typeof superClass !== "function" && superClass !== null) {\n throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n })\n'),i.instanceof=(0,n.default)('\n (function (left, right) {\n if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {\n return right[Symbol.hasInstance](left);\n } else {\n return left instanceof right;\n }\n });\n'),i.interopRequireDefault=(0,n.default)("\n (function (obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n })\n"),i.interopRequireWildcard=(0,n.default)("\n (function (obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n newObj.default = obj;\n return newObj;\n }\n })\n"),i.newArrowCheck=(0,n.default)('\n (function (innerThis, boundThis) {\n if (innerThis !== boundThis) {\n throw new TypeError("Cannot instantiate an arrow function");\n }\n });\n'),i.objectDestructuringEmpty=(0,n.default)('\n (function (obj) {\n if (obj == null) throw new TypeError("Cannot destructure undefined");\n });\n'),i.objectWithoutProperties=(0,n.default)("\n (function (obj, keys) {\n var target = {};\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n return target;\n })\n"),i.possibleConstructorReturn=(0,n.default)('\n (function (self, call) {\n if (!self) {\n throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");\n }\n return call && (typeof call === "object" || typeof call === "function") ? call : self;\n });\n'),i.selfGlobal=(0,n.default)('\n typeof global === "undefined" ? self : global\n'),i.set=(0,n.default)('\n (function set(object, property, value, receiver) {\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent !== null) {\n set(parent, property, value, receiver);\n }\n } else if ("value" in desc && desc.writable) {\n desc.value = value;\n } else {\n var setter = desc.set;\n\n if (setter !== undefined) {\n setter.call(receiver, value);\n }\n }\n\n return value;\n });\n'),i.slicedToArray=(0,n.default)('\n (function () {\n // Broken out into a separate function to avoid deoptimizations due to the try/catch for the\n // array iterator case.\n function sliceIterator(arr, i) {\n // this is an expanded form of `for...of` that properly supports abrupt completions of\n // iterators etc. variable names have been minimised to reduce the size of this massive\n // helper. sometimes spec compliancy is annoying :(\n //\n // _n = _iteratorNormalCompletion\n // _d = _didIteratorError\n // _e = _iteratorError\n // _i = _iterator\n // _s = _step\n\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i["return"]) _i["return"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n }\n\n return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError("Invalid attempt to destructure non-iterable instance");\n }\n };\n })();\n'),i.slicedToArrayLoose=(0,n.default)('\n (function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n var _arr = [];\n for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) {\n _arr.push(_step.value);\n if (i && _arr.length === i) break;\n }\n return _arr;\n } else {\n throw new TypeError("Invalid attempt to destructure non-iterable instance");\n }\n });\n'),i.taggedTemplateLiteral=(0,n.default)("\n (function (strings, raw) {\n return Object.freeze(Object.defineProperties(strings, {\n raw: { value: Object.freeze(raw) }\n }));\n });\n"),i.taggedTemplateLiteralLoose=(0,n.default)("\n (function (strings, raw) {\n strings.raw = raw;\n return strings;\n });\n"),i.temporalRef=(0,n.default)('\n (function (val, name, undef) {\n if (val === undef) {\n throw new ReferenceError(name + " is not defined - temporal dead zone");\n } else {\n return val;\n }\n })\n'),i.temporalUndefined=(0,n.default)("\n ({})\n"),i.toArray=(0,n.default)("\n (function (arr) {\n return Array.isArray(arr) ? arr : Array.from(arr);\n });\n"),i.toConsumableArray=(0,n.default)("\n (function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n return arr2;\n } else {\n return Array.from(arr);\n }\n });\n"),t.exports=r.default},{"babel-template":139}],109:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=a.default[e];if(!t)throw new ReferenceError("Unknown helper "+e);return t().expression}r.__esModule=!0,r.list=void 0;var s=n(e("babel-runtime/core-js/object/keys"));r.get=i;var a=n(e("./helpers"));r.list=(0,s.default)(a.default).map(function(e){return e.replace(/^_/,"")}).filter(function(e){return"__esModule"!==e});r.default=i},{"./helpers":108,"babel-runtime/core-js/object/keys":127}],110:[function(e,t,r){"use strict";function n(e){return e.map(function(e){if(null!=e&&e.inspect)return e.inspect();try{return(0,i.default)(e)||e+""}catch(t){return s.inspect(e)}})}r.__esModule=!0,r.MESSAGES=void 0;var i=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/json/stringify"));r.get=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),s=1;s<t;s++)r[s-1]=arguments[s];var o=a[e];if(!o)throw new ReferenceError("Unknown message "+(0,i.default)(e));return r=n(r),o.replace(/\$(\d+)/g,function(e,t){return r[t-1]})},r.parseArgs=n;var s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("util")),a=r.MESSAGES={tailCallReassignmentDeopt:"Function reference has been reassigned, so it will probably be dereferenced, therefore we can't optimise this with confidence",classesIllegalBareSuper:"Illegal use of bare super",classesIllegalSuperCall:"Direct super call is illegal in non-constructor, use super.$1() instead",scopeDuplicateDeclaration:"Duplicate declaration $1",settersNoRest:"Setters aren't allowed to have a rest",noAssignmentsInForHead:"No assignments allowed in for-in/of head",expectedMemberExpressionOrIdentifier:"Expected type MemberExpression or Identifier",invalidParentForThisNode:"We don't know how to handle this node within the current parent - please open an issue",readOnly:"$1 is read-only",unknownForHead:"Unknown node type $1 in ForStatement",didYouMean:"Did you mean $1?",codeGeneratorDeopt:"Note: The code generator has deoptimised the styling of $1 as it exceeds the max of $2.",missingTemplatesDirectory:"no templates directory - this is most likely the result of a broken `npm publish`. Please report to https://github.com/babel/babel/issues",unsupportedOutputType:"Unsupported output type $1",illegalMethodName:"Illegal method name $1",lostTrackNodePath:"We lost track of this node's position, likely because the AST was directly manipulated",modulesIllegalExportName:"Illegal export $1",modulesDuplicateDeclarations:"Duplicate module declarations with the same source but in different scopes",undeclaredVariable:"Reference to undeclared variable $1",undeclaredVariableType:"Referencing a type alias outside of a type annotation",undeclaredVariableSuggestion:"Reference to undeclared variable $1 - did you mean $2?",traverseNeedsParent:"You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a $1 node without passing scope and parentPath.",traverseVerifyRootFunction:"You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?",traverseVerifyVisitorProperty:"You passed `traverse()` a visitor object with the property $1 that has the invalid property $2",traverseVerifyNodeType:"You gave us a visitor for the node type $1 but it's not a valid type",pluginNotObject:"Plugin $2 specified in $1 was expected to return an object when invoked but returned $3",pluginNotFunction:"Plugin $2 specified in $1 was expected to return a function but returned $3",pluginUnknown:"Unknown plugin $1 specified in $2 at $3, attempted to resolve relative to $4",pluginInvalidProperty:"Plugin $2 specified in $1 provided an invalid property of $3"}},{"babel-runtime/core-js/json/stringify":121,util:613}],111:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("asyncFunctions")}}},t.exports=r.default},{}],112:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("asyncGenerators")}}},t.exports=r.default},{}],113:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e){var t=e.types;return{visitor:{ArrowFunctionExpression:function(e,r){if(r.opts.spec){var n=e.node;if(n.shadow)return;n.shadow={this:!1},n.type="FunctionExpression";var i=t.thisExpression();i._forceShadow=e,e.ensureBlock(),e.get("body").unshiftContainer("body",t.expressionStatement(t.callExpression(r.addHelper("newArrowCheck"),[t.thisExpression(),i]))),e.replaceWith(t.callExpression(t.memberExpression(n,t.identifier("bind")),[t.thisExpression()]))}else e.arrowFunctionToShadowed()}}}},t.exports=r.default},{}],114:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){return!!h.isVariableDeclaration(e)&&(!!e[h.BLOCK_SCOPED_SYMBOL]||("let"===e.kind||"const"===e.kind))}function s(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(t||(t=e.node),!h.isFor(r))for(var s=0;s<t.declarations.length;s++){var a=t.declarations[s];a.init=a.init||n.buildUndefinedNode()}if(t[h.BLOCK_SCOPED_SYMBOL]=!0,t.kind="var",i){var o=n.getFunctionParent(),u=e.getBindingIdentifiers();for(var l in u){var c=n.getOwnBinding(l);c&&(c.kind="var"),n.moveBindingTo(l,o)}}}function a(e){return h.isVariableDeclaration(e,{kind:"var"})&&!i(e)}r.__esModule=!0;var o=n(e("babel-runtime/core-js/symbol")),u=n(e("babel-runtime/core-js/object/create")),l=n(e("babel-runtime/helpers/classCallCheck"));r.default=function(){return{visitor:{VariableDeclaration:function(e,t){var r=e.node,n=e.parent,a=e.scope;if(i(r)&&(s(e,null,n,a,!0),r._tdzThis)){for(var o=[r],u=0;u<r.declarations.length;u++){var l=r.declarations[u];if(l.init){var c=h.assignmentExpression("=",l.id,l.init);c._ignoreBlockScopingTDZ=!0,o.push(h.expressionStatement(c))}l.init=t.addHelper("temporalUndefined")}r._blockHoist=2,e.isCompletionRecord()&&o.push(h.expressionStatement(a.buildUndefinedNode())),e.replaceWithMultiple(o)}},Loop:function(e,t){var r=e.node,n=e.parent,i=e.scope;h.ensureBlock(r);var s=new A(e,e.get("body"),n,i,t).run();s&&e.replaceWith(s)},CatchClause:function(e,t){var r=e.parent,n=e.scope;new A(null,e.get("body"),r,n,t).run()},"BlockStatement|SwitchStatement|Program":function(e,t){if(!function(e){return h.isLoop(e.parent)||h.isCatchClause(e.parent)}(e)){new A(null,e,e.parent,e.scope,t).run()}}}}};var c=n(e("babel-traverse")),p=e("./tdz"),h=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types")),f=n(e("lodash/values")),d=n(e("lodash/extend")),m=(0,n(e("babel-template")).default)('\n if (typeof RETURN === "object") return RETURN.v;\n'),y=c.default.visitors.merge([{Loop:{enter:function(e,t){t.loopDepth++},exit:function(e,t){t.loopDepth--}},Function:function(e,t){return t.loopDepth>0&&e.traverse(g,t),e.skip()}},p.visitor]),g=c.default.visitors.merge([{ReferencedIdentifier:function(e,t){var r=t.letReferences[e.node.name];if(r){var n=e.scope.getBindingIdentifier(e.node.name);n&&n!==r||(t.closurify=!0)}}},p.visitor]),b={enter:function(e,t){var r=e.node;e.parent;if(e.isForStatement()){if(a(r.init)){var n=t.pushDeclar(r.init);1===n.length?r.init=n[0]:r.init=h.sequenceExpression(n)}}else if(e.isFor())a(r.left)&&(t.pushDeclar(r.left),r.left=r.left.declarations[0].id);else if(a(r))e.replaceWithMultiple(t.pushDeclar(r).map(function(e){return h.expressionStatement(e)}));else if(e.isFunction())return e.skip()}},v={LabeledStatement:function(e,t){var r=e.node;t.innerLabels.push(r.label.name)}},x={enter:function(e,t){if(e.isAssignmentExpression()||e.isUpdateExpression()){var r=e.getBindingIdentifiers();for(var n in r)t.outsideReferences[n]===e.scope.getBindingIdentifier(n)&&(t.reassignments[n]=!0)}}},E={Loop:function(e,t){var r=t.ignoreLabeless;t.ignoreLabeless=!0,e.traverse(E,t),t.ignoreLabeless=r,e.skip()},Function:function(e){e.skip()},SwitchCase:function(e,t){var r=t.inSwitchCase;t.inSwitchCase=!0,e.traverse(E,t),t.inSwitchCase=r,e.skip()},"BreakStatement|ContinueStatement|ReturnStatement":function(e,t){var r=e.node,n=e.parent,i=e.scope;if(!r[this.LOOP_IGNORE]){var s=void 0,a=function(e){return h.isBreakStatement(e)?"break":h.isContinueStatement(e)?"continue":void 0}(r);if(a){if(r.label){if(t.innerLabels.indexOf(r.label.name)>=0)return;a=a+"|"+r.label.name}else{if(t.ignoreLabeless)return;if(t.inSwitchCase)return;if(h.isBreakStatement(r)&&h.isSwitchCase(n))return}t.hasBreakContinue=!0,t.map[a]=r,s=h.stringLiteral(a)}e.isReturnStatement()&&(t.hasReturn=!0,s=h.objectExpression([h.objectProperty(h.identifier("v"),r.argument||i.buildUndefinedNode())])),s&&((s=h.returnStatement(s))[this.LOOP_IGNORE]=!0,e.skip(),e.replaceWith(h.inherits(s,r)))}}},A=function(){function e(t,r,n,i,s){(0,l.default)(this,e),this.parent=n,this.scope=i,this.file=s,this.blockPath=r,this.block=r.node,this.outsideLetReferences=(0,u.default)(null),this.hasLetReferences=!1,this.letReferences=(0,u.default)(null),this.body=[],t&&(this.loopParent=t.parent,this.loopLabel=h.isLabeledStatement(this.loopParent)&&this.loopParent.label,this.loopPath=t,this.loop=t.node)}return e.prototype.run=function(){var e=this.block;if(!e._letDone){e._letDone=!0;var t=this.getLetReferences();if(h.isFunction(this.parent)||h.isProgram(this.block))this.updateScopeInfo();else if(this.hasLetReferences)return t?this.wrapClosure():this.remap(),this.updateScopeInfo(t),this.loopLabel&&!h.isLabeledStatement(this.loopParent)?h.labeledStatement(this.loopLabel,this.loop):void 0}},e.prototype.updateScopeInfo=function(e){var t=this.scope,r=t.getFunctionParent(),n=this.letReferences;for(var i in n){var s=n[i],a=t.getBinding(s.name);a&&("let"!==a.kind&&"const"!==a.kind||(a.kind="var",e?t.removeBinding(s.name):t.moveBindingTo(s.name,r)))}},e.prototype.remap=function(){var e=this.letReferences,t=this.scope;for(var r in e){var n=e[r];(t.parentHasBinding(r)||t.hasGlobal(r))&&(t.hasOwnBinding(r)&&t.rename(n.name),this.blockPath.scope.hasOwnBinding(r)&&this.blockPath.scope.rename(n.name))}},e.prototype.wrapClosure=function(){if(this.file.opts.throwIfClosureRequired)throw this.blockPath.buildCodeFrameError("Compiling let/const in this block would add a closure (throwIfClosureRequired).");var e=this.block,t=this.outsideLetReferences;if(this.loop)for(var r in t){var n=t[r];(this.scope.hasGlobal(n.name)||this.scope.parentHasBinding(n.name))&&(delete t[n.name],delete this.letReferences[n.name],this.scope.rename(n.name),this.letReferences[n.name]=n,t[n.name]=n)}this.has=this.checkLoop(),this.hoistVarDeclarations();var i=(0,f.default)(t),s=(0,f.default)(t),a=this.blockPath.isSwitchStatement(),o=h.functionExpression(null,i,h.blockStatement(a?[e]:e.body));o.shadow=!0,this.addContinuations(o);var u=o;this.loop&&(u=this.scope.generateUidIdentifier("loop"),this.loopPath.insertBefore(h.variableDeclaration("var",[h.variableDeclarator(u,o)])));var l=h.callExpression(u,s),p=this.scope.generateUidIdentifier("ret");c.default.hasType(o.body,this.scope,"YieldExpression",h.FUNCTION_TYPES)&&(o.generator=!0,l=h.yieldExpression(l,!0));c.default.hasType(o.body,this.scope,"AwaitExpression",h.FUNCTION_TYPES)&&(o.async=!0,l=h.awaitExpression(l)),this.buildClosure(p,l),a?this.blockPath.replaceWithMultiple(this.body):e.body=this.body},e.prototype.buildClosure=function(e,t){var r=this.has;r.hasReturn||r.hasBreakContinue?this.buildHas(e,t):this.body.push(h.expressionStatement(t))},e.prototype.addContinuations=function(e){var t={reassignments:{},outsideReferences:this.outsideLetReferences};this.scope.traverse(e,x,t);for(var r=0;r<e.params.length;r++){var n=e.params[r];if(t.reassignments[n.name]){var i=this.scope.generateUidIdentifier(n.name);e.params[r]=i,this.scope.rename(n.name,i.name,e),e.body.body.push(h.expressionStatement(h.assignmentExpression("=",n,i)))}}},e.prototype.getLetReferences=function(){var e=this,t=this.block,r=[];if(this.loop){var n=this.loop.left||this.loop.init;i(n)&&(r.push(n),(0,d.default)(this.outsideLetReferences,h.getBindingIdentifiers(n)))}var a=function n(a,o){o=o||a.node,(h.isClassDeclaration(o)||h.isFunctionDeclaration(o)||i(o))&&(i(o)&&s(a,o,t,e.scope),r=r.concat(o.declarations||o)),h.isLabeledStatement(o)&&n(a.get("body"),o.body)};if(t.body)for(var o=0;o<t.body.length;o++){a(this.blockPath.get("body")[o])}if(t.cases)for(var u=0;u<t.cases.length;u++)for(var l=t.cases[u].consequent,c=0;c<l.length;c++){a(this.blockPath.get("cases")[u],l[c])}for(var p=0;p<r.length;p++){var f=r[p],m=h.getBindingIdentifiers(f,!1,!0);(0,d.default)(this.letReferences,m),this.hasLetReferences=!0}if(this.hasLetReferences){var g={letReferences:this.letReferences,closurify:!1,file:this.file,loopDepth:0},b=this.blockPath.find(function(e){return e.isLoop()||e.isFunction()});return b&&b.isLoop()&&g.loopDepth++,this.blockPath.traverse(y,g),g.closurify}},e.prototype.checkLoop=function(){var e={hasBreakContinue:!1,ignoreLabeless:!1,inSwitchCase:!1,innerLabels:[],hasReturn:!1,isLoop:!!this.loop,map:{},LOOP_IGNORE:(0,o.default)()};return this.blockPath.traverse(v,e),this.blockPath.traverse(E,e),e},e.prototype.hoistVarDeclarations=function(){this.blockPath.traverse(b,this)},e.prototype.pushDeclar=function(e){var t=[],r=h.getBindingIdentifiers(e);for(var n in r)t.push(h.variableDeclarator(r[n]));this.body.push(h.variableDeclaration(e.kind,t));for(var i=[],s=0;s<e.declarations.length;s++){var a=e.declarations[s];if(a.init){var o=h.assignmentExpression("=",a.id,a.init);i.push(h.inherits(o,a))}}return i},e.prototype.buildHas=function(e,t){var r=this.body;r.push(h.variableDeclaration("var",[h.variableDeclarator(e,t)]));var n=void 0,i=this.has,s=[];if(i.hasReturn&&(n=m({RETURN:e})),i.hasBreakContinue){for(var a in i.map)s.push(h.switchCase(h.stringLiteral(a),[i.map[a]]));if(i.hasReturn&&s.push(h.switchCase(null,[n])),1===s.length){var o=s[0];r.push(h.ifStatement(h.binaryExpression("===",e,o.test),o.consequent[0]))}else{if(this.loop)for(var u=0;u<s.length;u++){var l=s[u].consequent[0];h.isBreakStatement(l)&&!l.label&&(l.label=this.loopLabel=this.loopLabel||this.scope.generateUidIdentifier("loop"))}r.push(h.switchStatement(e,s))}}else i.hasReturn&&r.push(n)},e}();t.exports=r.default},{"./tdz":115,"babel-runtime/core-js/object/create":125,"babel-runtime/core-js/symbol":129,"babel-runtime/helpers/classCallCheck":134,"babel-template":139,"babel-traverse":143,"babel-types":178,"lodash/extend":498,"lodash/values":541}],115:[function(e,t,r){"use strict";function n(e,t){return s.callExpression(t.addHelper("temporalRef"),[e,s.stringLiteral(e.name),t.addHelper("temporalUndefined")])}function i(e,t,r){var n=r.letReferences[e.name];return!!n&&t.getBindingIdentifier(e.name)===n}r.__esModule=!0,r.visitor=void 0;var s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));r.visitor={ReferencedIdentifier:function(e,t){if(this.file.opts.tdz){var r=e.node,a=e.parent,o=e.scope;if(!e.parentPath.isFor({left:r})&&i(r,o,t)){var u=o.getBinding(r.name).path,l=function(e,t){var r=t._guessExecutionStatusRelativeTo(e);return"before"===r?"inside":"after"===r?"outside":"maybe"}(e,u);if("inside"!==l)if("maybe"===l){var c=n(r,t.file);if(u.parent._tdzThis=!0,e.skip(),e.parentPath.isUpdateExpression()){if(a._ignoreBlockScopingTDZ)return;e.parentPath.replaceWith(s.sequenceExpression([c,a]))}else e.replaceWith(c)}else"outside"===l&&e.replaceWith(s.throwStatement(s.inherits(s.newExpression(s.identifier("ReferenceError"),[s.stringLiteral(r.name+" is not defined - temporal dead zone")]),r)))}}},AssignmentExpression:{exit:function(e,t){if(this.file.opts.tdz){var r=e.node;if(!r._ignoreBlockScopingTDZ){var a=[],o=e.getBindingIdentifiers();for(var u in o){var l=o[u];i(l,e.scope,t)&&a.push(n(l,t.file))}a.length&&(r._ignoreBlockScopingTDZ=!0,a.push(r),e.replaceWithMultiple(a.map(s.expressionStatement)))}}}}}},{"babel-types":178}],116:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/symbol"));r.default=function(e){var t=e.types,r=(0,i.default)();return{visitor:{ExportDefaultDeclaration:function(e){if(e.get("declaration").isClassDeclaration()){var r=e.node,n=r.declaration.id||e.scope.generateUidIdentifier("class");r.declaration.id=n,e.replaceWith(r.declaration),e.insertAfter(t.exportDefaultDeclaration(n))}},ClassDeclaration:function(e){var r=e.node,n=r.id||e.scope.generateUidIdentifier("class");e.replaceWith(t.variableDeclaration("let",[t.variableDeclarator(n,t.toExpression(r))]))},ClassExpression:function(e,t){var n=e.node;if(!n[r]){var i=(0,o.default)(e);if(i&&i!==n)return e.replaceWith(i);n[r]=!0;var u=a.default;t.opts.loose&&(u=s.default),e.replaceWith(new u(e,t.file).run())}}}}};var s=n(e("./loose")),a=n(e("./vanilla")),o=n(e("babel-helper-function-name"));t.exports=r.default},{"./loose":117,"./vanilla":118,"babel-helper-function-name":104,"babel-runtime/core-js/symbol":129}],117:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/helpers/classCallCheck")),s=n(e("babel-runtime/helpers/possibleConstructorReturn")),a=n(e("babel-runtime/helpers/inherits")),o=n(e("babel-helper-function-name")),u=n(e("./vanilla")),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types")),c=function(e){function t(){(0,i.default)(this,t);var r=(0,s.default)(this,e.apply(this,arguments));return r.isLoose=!0,r}return(0,a.default)(t,e),t.prototype._processMethod=function(e,t){if(!e.decorators){var r=this.classRef;e.static||(r=l.memberExpression(r,l.identifier("prototype")));var n=l.memberExpression(r,e.key,e.computed||l.isLiteral(e.key)),i=l.functionExpression(null,e.params,e.body,e.generator,e.async);i.returnType=e.returnType;var s=l.toComputedKey(e,e.key);l.isStringLiteral(s)&&(i=(0,o.default)({node:i,id:s,scope:t}));var a=l.expressionStatement(l.assignmentExpression("=",n,i));return l.inheritsComments(a,e),this.body.push(a),!0}},t}(u.default);r.default=c,t.exports=r.default},{"./vanilla":118,"babel-helper-function-name":104,"babel-runtime/helpers/classCallCheck":134,"babel-runtime/helpers/inherits":135,"babel-runtime/helpers/possibleConstructorReturn":137,"babel-types":178}],118:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var s=i(e("babel-runtime/core-js/get-iterator")),a=i(e("babel-runtime/helpers/classCallCheck")),o=e("babel-traverse"),u=i(e("babel-helper-replace-supers")),l=i(e("babel-helper-optimise-call-expression")),c=n(e("babel-helper-define-map")),p=i(e("babel-template")),h=n(e("babel-types")),f=(0,p.default)("\n (function () {\n super(...arguments);\n })\n"),d={"FunctionExpression|FunctionDeclaration":function(e){e.is("shadow")||e.skip()},Method:function(e){e.skip()}},m=o.visitors.merge([d,{Super:function(e){if(this.isDerived&&!this.hasBareSuper&&!e.parentPath.isCallExpression({callee:e.node}))throw e.buildCodeFrameError("'super.*' is not allowed before super()")},CallExpression:{exit:function(e){if(e.get("callee").isSuper()&&(this.hasBareSuper=!0,!this.isDerived))throw e.buildCodeFrameError("super() is only allowed in a derived constructor")}},ThisExpression:function(e){if(this.isDerived&&!this.hasBareSuper&&!e.inShadow("this"))throw e.buildCodeFrameError("'this' is not allowed before super()")}}]),y=o.visitors.merge([d,{ThisExpression:function(e){this.superThises.push(e)}}]),g=function(){function e(t,r){(0,a.default)(this,e),this.parent=t.parent,this.scope=t.scope,this.node=t.node,this.path=t,this.file=r,this.clearDescriptors(),this.instancePropBody=[],this.instancePropRefs={},this.staticPropBody=[],this.body=[],this.bareSuperAfter=[],this.bareSupers=[],this.pushedConstructor=!1,this.pushedInherits=!1,this.isLoose=!1,this.superThises=[],this.classId=this.node.id,this.classRef=this.node.id?h.identifier(this.node.id.name):this.scope.generateUidIdentifier("class"),this.superName=this.node.superClass||h.identifier("Function"),this.isDerived=!!this.node.superClass}return e.prototype.run=function(){var e=this,t=this.superName,r=this.file,n=this.body,i=this.constructorBody=h.blockStatement([]);this.constructor=this.buildConstructor();var s=[],a=[];if(this.isDerived&&(a.push(t),t=this.scope.generateUidIdentifierBasedOnNode(t),s.push(t),this.superName=t),this.buildBody(),i.body.unshift(h.expressionStatement(h.callExpression(r.addHelper("classCallCheck"),[h.thisExpression(),this.classRef]))),n=n.concat(this.staticPropBody.map(function(t){return t(e.classRef)})),this.classId&&1===n.length)return h.toExpression(n[0]);n.push(h.returnStatement(this.classRef));var o=h.functionExpression(null,s,h.blockStatement(n));return o.shadow=!0,h.callExpression(o,a)},e.prototype.buildConstructor=function(){var e=h.functionDeclaration(this.classRef,[],this.constructorBody);return h.inherits(e,this.node),e},e.prototype.pushToMap=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"value",n=arguments[3],i=void 0;e.static?(this.hasStaticDescriptors=!0,i=this.staticMutatorMap):(this.hasInstanceDescriptors=!0,i=this.instanceMutatorMap);var s=c.push(i,e,r,this.file,n);return t&&(s.enumerable=h.booleanLiteral(!0)),s},e.prototype.constructorMeMaybe=function(){for(var e=!1,t=this.path.get("body.body"),r=Array.isArray(t),n=0,t=r?t:(0,s.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}if(e=i.equals("kind","constructor"))break}if(!e){var a=void 0,o=void 0;if(this.isDerived){var u=f().expression;a=u.params,o=u.body}else a=[],o=h.blockStatement([]);this.path.get("body").unshiftContainer("body",h.classMethod("constructor",h.identifier("constructor"),a,o))}},e.prototype.buildBody=function(){if(this.constructorMeMaybe(),this.pushBody(),this.verifyConstructor(),this.userConstructor){var e=this.constructorBody;e.body=e.body.concat(this.userConstructor.body.body),h.inherits(this.constructor,this.userConstructor),h.inherits(e,this.userConstructor.body)}this.pushDescriptors()},e.prototype.pushBody=function(){for(var e=this.path.get("body.body"),t=Array.isArray(e),r=0,e=t?e:(0,s.default)(e);;){var n;if(t){if(r>=e.length)break;n=e[r++]}else{if((r=e.next()).done)break;n=r.value}var i=n,a=i.node;if(i.isClassProperty())throw i.buildCodeFrameError("Missing class properties transform.");if(a.decorators)throw i.buildCodeFrameError("Method has decorators, put the decorator plugin before the classes one.");if(h.isClassMethod(a)){var o="constructor"===a.kind;if(o&&(i.traverse(m,this),!this.hasBareSuper&&this.isDerived))throw i.buildCodeFrameError("missing super() call in constructor");var l=new u.default({forceSuperMemoisation:o,methodPath:i,methodNode:a,objectRef:this.classRef,superRef:this.superName,isStatic:a.static,isLoose:this.isLoose,scope:this.scope,file:this.file},!0);l.replace(),o?this.pushConstructor(l,a,i):this.pushMethod(a,i)}}},e.prototype.clearDescriptors=function(){this.hasInstanceDescriptors=!1,this.hasStaticDescriptors=!1,this.instanceMutatorMap={},this.staticMutatorMap={}},e.prototype.pushDescriptors=function(){this.pushInherits();var e=this.body,t=void 0,r=void 0;if(this.hasInstanceDescriptors&&(t=c.toClassObject(this.instanceMutatorMap)),this.hasStaticDescriptors&&(r=c.toClassObject(this.staticMutatorMap)),t||r){t&&(t=c.toComputedObjectFromClass(t)),r&&(r=c.toComputedObjectFromClass(r));var n=h.nullLiteral(),i=[this.classRef,n,n,n,n];t&&(i[1]=t),r&&(i[2]=r),this.instanceInitializersId&&(i[3]=this.instanceInitializersId,e.unshift(this.buildObjectAssignment(this.instanceInitializersId))),this.staticInitializersId&&(i[4]=this.staticInitializersId,e.unshift(this.buildObjectAssignment(this.staticInitializersId)));for(var s=0,a=0;a<i.length;a++)i[a]!==n&&(s=a);i=i.slice(0,s+1),e.push(h.expressionStatement(h.callExpression(this.file.addHelper("createClass"),i)))}this.clearDescriptors()},e.prototype.buildObjectAssignment=function(e){return h.variableDeclaration("var",[h.variableDeclarator(e,h.objectExpression([]))])},e.prototype.wrapSuperCall=function(e,t,r,n){var i=e.node;this.isLoose?(i.arguments.unshift(h.thisExpression()),2===i.arguments.length&&h.isSpreadElement(i.arguments[1])&&h.isIdentifier(i.arguments[1].argument,{name:"arguments"})?(i.arguments[1]=i.arguments[1].argument,i.callee=h.memberExpression(t,h.identifier("apply"))):i.callee=h.memberExpression(t,h.identifier("call"))):i=(0,l.default)(h.logicalExpression("||",h.memberExpression(this.classRef,h.identifier("__proto__")),h.callExpression(h.memberExpression(h.identifier("Object"),h.identifier("getPrototypeOf")),[this.classRef])),h.thisExpression(),i.arguments);var s=h.callExpression(this.file.addHelper("possibleConstructorReturn"),[h.thisExpression(),i]),a=this.bareSuperAfter.map(function(e){return e(r)});e.parentPath.isExpressionStatement()&&e.parentPath.container===n.node.body&&n.node.body.length-1===e.parentPath.key?((this.superThises.length||a.length)&&(e.scope.push({id:r}),s=h.assignmentExpression("=",r,s)),a.length&&(s=h.toSequenceExpression([s].concat(a,[r]))),e.parentPath.replaceWith(h.returnStatement(s))):e.replaceWithMultiple([h.variableDeclaration("var",[h.variableDeclarator(r,s)])].concat(a,[h.expressionStatement(r)]))},e.prototype.verifyConstructor=function(){var e=this;if(this.isDerived){var t=this.userConstructorPath,r=t.get("body");t.traverse(y,this);for(var n=!!this.bareSupers.length,i=this.superName||h.identifier("Function"),a=t.scope.generateUidIdentifier("this"),o=this.bareSupers,u=Array.isArray(o),l=0,o=u?o:(0,s.default)(o);;){var c;if(u){if(l>=o.length)break;c=o[l++]}else{if((l=o.next()).done)break;c=l.value}var p=c;this.wrapSuperCall(p,i,a,r),n&&p.find(function(e){return e===t||(e.isLoop()||e.isConditional()?(n=!1,!0):void 0)})}for(var f=this.superThises,d=Array.isArray(f),m=0,f=d?f:(0,s.default)(f);;){var g;if(d){if(m>=f.length)break;g=f[m++]}else{if((m=f.next()).done)break;g=m.value}g.replaceWith(a)}var b=function(t){return h.callExpression(e.file.addHelper("possibleConstructorReturn"),[a].concat(t||[]))},v=r.get("body");v.length&&!v.pop().isReturnStatement()&&r.pushContainer("body",h.returnStatement(n?a:b()));for(var x=this.superReturns,E=Array.isArray(x),A=0,x=E?x:(0,s.default)(x);;){var D;if(E){if(A>=x.length)break;D=x[A++]}else{if((A=x.next()).done)break;D=A.value}var C=D;if(C.node.argument){var S=C.scope.generateDeclaredUidIdentifier("ret");C.get("argument").replaceWithMultiple([h.assignmentExpression("=",S,C.node.argument),b(S)])}else C.get("argument").replaceWith(b())}}},e.prototype.pushMethod=function(e,t){var r=t?t.scope:this.scope;"method"===e.kind&&this._processMethod(e,r)||this.pushToMap(e,!1,null,r)},e.prototype._processMethod=function(){return!1},e.prototype.pushConstructor=function(e,t,r){this.bareSupers=e.bareSupers,this.superReturns=e.returns,r.scope.hasOwnBinding(this.classRef.name)&&r.scope.rename(this.classRef.name);var n=this.constructor;this.userConstructorPath=r,this.userConstructor=t,this.hasConstructor=!0,h.inheritsComments(n,t),n._ignoreUserWhitespace=!0,n.params=t.params,h.inherits(n.body,t.body),n.body.directives=t.body.directives,this._pushConstructor()},e.prototype._pushConstructor=function(){this.pushedConstructor||(this.pushedConstructor=!0,(this.hasInstanceDescriptors||this.hasStaticDescriptors)&&this.pushDescriptors(),this.body.push(this.constructor),this.pushInherits())},e.prototype.pushInherits=function(){this.isDerived&&!this.pushedInherits&&(this.pushedInherits=!0,this.body.unshift(h.expressionStatement(h.callExpression(this.file.addHelper("inherits"),[this.classRef,this.superName]))))},e}();r.default=g,t.exports=r.default},{"babel-helper-define-map":103,"babel-helper-optimise-call-expression":106,"babel-helper-replace-supers":107,"babel-runtime/core-js/get-iterator":120,"babel-runtime/helpers/classCallCheck":134,"babel-template":139,"babel-traverse":143,"babel-types":178}],119:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e){function t(e){var t=e.node,r=e.scope,n=[],i=t.right;if(!a.isIdentifier(i)||!r.hasBinding(i.name)){var s=r.generateUidIdentifier("arr");n.push(a.variableDeclaration("var",[a.variableDeclarator(s,i)])),i=s}var u=r.generateUidIdentifier("i"),l=o({BODY:t.body,KEY:u,ARR:i});a.inherits(l,t),a.ensureBlock(l);var c=a.memberExpression(i,u,!0),p=t.left;return a.isVariableDeclaration(p)?(p.declarations[0].init=c,l.body.body.unshift(p)):l.body.body.unshift(a.expressionStatement(a.assignmentExpression("=",p,c))),e.parentPath.isLabeledStatement()&&(l=a.labeledStatement(e.parentPath.node.label,l)),n.push(l),n}function r(e,t){var r=e.node,n=e.scope,s=e.parent,o=r.left,l=void 0,c=void 0;if(a.isIdentifier(o)||a.isPattern(o)||a.isMemberExpression(o))c=o;else{if(!a.isVariableDeclaration(o))throw t.buildCodeFrameError(o,i.get("unknownForHead",o.type));c=n.generateUidIdentifier("ref"),l=a.variableDeclaration(o.kind,[a.variableDeclarator(o.declarations[0].id,c)])}var p=n.generateUidIdentifier("iterator"),h=n.generateUidIdentifier("isArray"),f=u({LOOP_OBJECT:p,IS_ARRAY:h,OBJECT:r.right,INDEX:n.generateUidIdentifier("i"),ID:c});l||f.body.body.shift();var d=a.isLabeledStatement(s),m=void 0;return d&&(m=a.labeledStatement(s.label,f)),{replaceParent:d,declar:l,node:m||f,loop:f}}function n(e,t){var r=e.node,n=e.scope,s=e.parent,o=r.left,u=void 0,c=n.generateUidIdentifier("step"),p=a.memberExpression(c,a.identifier("value"));if(a.isIdentifier(o)||a.isPattern(o)||a.isMemberExpression(o))u=a.expressionStatement(a.assignmentExpression("=",o,p));else{if(!a.isVariableDeclaration(o))throw t.buildCodeFrameError(o,i.get("unknownForHead",o.type));u=a.variableDeclaration(o.kind,[a.variableDeclarator(o.declarations[0].id,p)])}var h=n.generateUidIdentifier("iterator"),f=l({ITERATOR_HAD_ERROR_KEY:n.generateUidIdentifier("didIteratorError"),ITERATOR_COMPLETION:n.generateUidIdentifier("iteratorNormalCompletion"),ITERATOR_ERROR_KEY:n.generateUidIdentifier("iteratorError"),ITERATOR_KEY:h,STEP_KEY:c,OBJECT:r.right,BODY:null}),d=a.isLabeledStatement(s),m=f[3].block.body,y=m[0];return d&&(m[0]=a.labeledStatement(s.label,y)),{replaceParent:d,declar:u,loop:y,node:f}}var i=e.messages,s=e.template,a=e.types,o=s("\n for (var KEY = 0; KEY < ARR.length; KEY++) BODY;\n "),u=s("\n for (var LOOP_OBJECT = OBJECT,\n IS_ARRAY = Array.isArray(LOOP_OBJECT),\n INDEX = 0,\n LOOP_OBJECT = IS_ARRAY ? LOOP_OBJECT : LOOP_OBJECT[Symbol.iterator]();;) {\n var ID;\n if (IS_ARRAY) {\n if (INDEX >= LOOP_OBJECT.length) break;\n ID = LOOP_OBJECT[INDEX++];\n } else {\n INDEX = LOOP_OBJECT.next();\n if (INDEX.done) break;\n ID = INDEX.value;\n }\n }\n "),l=s("\n var ITERATOR_COMPLETION = true;\n var ITERATOR_HAD_ERROR_KEY = false;\n var ITERATOR_ERROR_KEY = undefined;\n try {\n for (var ITERATOR_KEY = OBJECT[Symbol.iterator](), STEP_KEY; !(ITERATOR_COMPLETION = (STEP_KEY = ITERATOR_KEY.next()).done); ITERATOR_COMPLETION = true) {\n }\n } catch (err) {\n ITERATOR_HAD_ERROR_KEY = true;\n ITERATOR_ERROR_KEY = err;\n } finally {\n try {\n if (!ITERATOR_COMPLETION && ITERATOR_KEY.return) {\n ITERATOR_KEY.return();\n }\n } finally {\n if (ITERATOR_HAD_ERROR_KEY) {\n throw ITERATOR_ERROR_KEY;\n }\n }\n }\n ");return{visitor:{ForOfStatement:function(e,i){if(e.get("right").isArrayExpression())return e.parentPath.isLabeledStatement()?e.parentPath.replaceWithMultiple(t(e)):e.replaceWithMultiple(t(e));var s=n;i.opts.loose&&(s=r);var o=e.node,u=s(e,i),l=u.declar,c=u.loop,p=c.body;e.ensureBlock(),l&&p.body.push(l),p.body=p.body.concat(o.body.body),a.inherits(c,o),a.inherits(c.body,o.body),u.replaceParent?(e.parentPath.replaceWithMultiple(u.node),e.remove()):e.replaceWithMultiple(u.node)}}}},t.exports=r.default},{}],120:[function(e,t,r){t.exports={default:e("core-js/library/fn/get-iterator"),__esModule:!0}},{"core-js/library/fn/get-iterator":194}],121:[function(e,t,r){t.exports={default:e("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":195}],122:[function(e,t,r){t.exports={default:e("core-js/library/fn/map"),__esModule:!0}},{"core-js/library/fn/map":196}],123:[function(e,t,r){t.exports={default:e("core-js/library/fn/number/max-safe-integer"),__esModule:!0}},{"core-js/library/fn/number/max-safe-integer":197}],124:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":198}],125:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":199}],126:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/get-own-property-symbols"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-symbols":200}],127:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":201}],128:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/set-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/set-prototype-of":202}],129:[function(e,t,r){t.exports={default:e("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":204}],130:[function(e,t,r){t.exports={default:e("core-js/library/fn/symbol/for"),__esModule:!0}},{"core-js/library/fn/symbol/for":203}],131:[function(e,t,r){t.exports={default:e("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":205}],132:[function(e,t,r){t.exports={default:e("core-js/library/fn/weak-map"),__esModule:!0}},{"core-js/library/fn/weak-map":206}],133:[function(e,t,r){t.exports={default:e("core-js/library/fn/weak-set"),__esModule:!0}},{"core-js/library/fn/weak-set":207}],134:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},{}],135:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("../core-js/object/set-prototype-of")),s=n(e("../core-js/object/create")),a=n(e("../helpers/typeof"));r.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,a.default)(t)));e.prototype=(0,s.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.default?(0,i.default)(e,t):e.__proto__=t)}},{"../core-js/object/create":125,"../core-js/object/set-prototype-of":128,"../helpers/typeof":138}],136:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}},{}],137:[function(e,t,r){"use strict";r.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(e("../helpers/typeof"));r.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,n.default)(t))&&"function"!=typeof t?e:t}},{"../helpers/typeof":138}],138:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("../core-js/symbol/iterator")),s=n(e("../core-js/symbol")),a="function"==typeof s.default&&"symbol"==typeof i.default?function(e){return typeof e}:function(e){return e&&"function"==typeof s.default&&e.constructor===s.default&&e!==s.default.prototype?"symbol":typeof e};r.default="function"==typeof s.default&&"symbol"===a(i.default)?function(e){return void 0===e?"undefined":a(e)}:function(e){return e&&"function"==typeof s.default&&e.constructor===s.default&&e!==s.default.prototype?"symbol":void 0===e?"undefined":a(e)}},{"../core-js/symbol":129,"../core-js/symbol/iterator":131}],139:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var s=i(e("babel-runtime/core-js/symbol"));r.default=function(e,t){var r=void 0;try{throw new Error}catch(e){e.stack&&(r=e.stack.split("\n").slice(1).join("\n"))}t=(0,o.default)({allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,preserveComments:!1},t);var n=function(){var i=void 0;try{i=c.parse(e,t),i=l.default.removeProperties(i,{preserveComments:t.preserveComments}),l.default.cheap(i,function(e){e[h]=!0})}catch(e){throw e.stack=e.stack+"from\n"+r,e}return n=function(){return i},i};return function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e,t){var r=(e=(0,a.default)(e)).program;return t.length&&(0,l.default)(e,d,null,t),r.body.length>1?r.body:r.body[0]}(n(),t)}};var a=i(e("lodash/cloneDeep")),o=i(e("lodash/assign")),u=i(e("lodash/has")),l=i(e("babel-traverse")),c=n(e("babylon")),p=n(e("babel-types")),h="_fromTemplate",f=(0,s.default)(),d={noScope:!0,enter:function(e,t){var r=e.node;if(r[f])return e.skip();p.isExpressionStatement(r)&&(r=r.expression);var n=void 0;if(p.isIdentifier(r)&&r[h])if((0,u.default)(t[0],r.name))n=t[0][r.name];else if("$"===r.name[0]){var i=+r.name.slice(1);t[i]&&(n=t[i])}null===n&&e.remove(),n&&(n[f]=!0,e.replaceInline(n))},exit:function(e){var t=e.node;t.loc||l.default.clearNode(t)}};t.exports=r.default},{"babel-runtime/core-js/symbol":129,"babel-traverse":143,"babel-types":178,babylon:186,"lodash/assign":488,"lodash/cloneDeep":492,"lodash/has":504}],140:[function(e,t,r){"use strict";function n(){r.path=a=new s.default}function i(){r.scope=o=new s.default}r.__esModule=!0,r.scope=r.path=void 0;var s=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/weak-map"));r.clear=function(){n(),i()},r.clearPath=n,r.clearScope=i;var a=r.path=new s.default,o=r.scope=new s.default},{"babel-runtime/core-js/weak-map":132}],141:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var s=i(e("babel-runtime/core-js/get-iterator")),a=i(e("babel-runtime/helpers/classCallCheck")),o=i(e("./path")),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types")),l="test"===n.env.NODE_ENV,c=function(){function e(t,r,n,i){(0,a.default)(this,e),this.queue=null,this.parentPath=i,this.scope=t,this.state=n,this.opts=r}return e.prototype.shouldVisit=function(e){var t=this.opts;if(t.enter||t.exit)return!0;if(t[e.type])return!0;var r=u.VISITOR_KEYS[e.type];if(!r||!r.length)return!1;for(var n=r,i=Array.isArray(n),a=0,n=i?n:(0,s.default)(n);;){var o;if(i){if(a>=n.length)break;o=n[a++]}else{if((a=n.next()).done)break;o=a.value}if(e[o])return!0}return!1},e.prototype.create=function(e,t,r,n){return o.default.get({parentPath:this.parentPath,parent:e,container:t,key:r,listKey:n})},e.prototype.maybeQueue=function(e,t){if(this.trap)throw new Error("Infinite cycle detected");this.queue&&(t?this.queue.push(e):this.priorityQueue.push(e))},e.prototype.visitMultiple=function(e,t,r){if(0===e.length)return!1;for(var n=[],i=0;i<e.length;i++){var s=e[i];s&&this.shouldVisit(s)&&n.push(this.create(t,e,i,r))}return this.visitQueue(n)},e.prototype.visitSingle=function(e,t){return!!this.shouldVisit(e[t])&&this.visitQueue([this.create(e,e,t)])},e.prototype.visitQueue=function(e){this.queue=e,this.priorityQueue=[];for(var t=[],r=!1,n=e,i=Array.isArray(n),a=0,n=i?n:(0,s.default)(n);;){var o;if(i){if(a>=n.length)break;o=n[a++]}else{if((a=n.next()).done)break;o=a.value}var u=o;if(u.resync(),0!==u.contexts.length&&u.contexts[u.contexts.length-1]===this||u.pushContext(this),null!==u.key&&(l&&e.length>=1e4&&(this.trap=!0),!(t.indexOf(u.node)>=0))){if(t.push(u.node),u.visit()){r=!0;break}if(this.priorityQueue.length&&(r=this.visitQueue(this.priorityQueue),this.priorityQueue=[],this.queue=e,r))break}}for(var c=e,p=Array.isArray(c),h=0,c=p?c:(0,s.default)(c);;){var f;if(p){if(h>=c.length)break;f=c[h++]}else{if((h=c.next()).done)break;f=h.value}f.popContext()}return this.queue=null,r},e.prototype.visit=function(e,t){var r=e[t];return!!r&&(Array.isArray(r)?this.visitMultiple(r,e,t):this.visitSingle(e,t))},e}();r.default=c,t.exports=r.default}).call(this,e("_process"))},{"./path":150,_process:550,"babel-runtime/core-js/get-iterator":120,"babel-runtime/helpers/classCallCheck":134,"babel-types":178}],142:[function(e,t,r){"use strict";r.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/helpers/classCallCheck"));r.default=function e(t,r){(0,n.default)(this,e),this.file=t,this.options=r},t.exports=r.default},{"babel-runtime/helpers/classCallCheck":134}],143:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t,r,n,i){if(e){if(t||(t={}),!t.noScope&&!r&&"Program"!==e.type&&"File"!==e.type)throw new Error(f.get("traverseNeedsParent",e.type));h.explode(t),s.node(e,t,r,n,i)}}function a(e,t){e.node.type===t.type&&(t.has=!0,e.stop())}r.__esModule=!0,r.visitors=r.Hub=r.Scope=r.NodePath=void 0;var o=i(e("babel-runtime/core-js/get-iterator")),u=e("./path");Object.defineProperty(r,"NodePath",{enumerable:!0,get:function(){return i(u).default}});var l=e("./scope");Object.defineProperty(r,"Scope",{enumerable:!0,get:function(){return i(l).default}});var c=e("./hub");Object.defineProperty(r,"Hub",{enumerable:!0,get:function(){return i(c).default}}),r.default=s;var p=i(e("./context")),h=n(e("./visitors")),f=n(e("babel-messages")),d=i(e("lodash/includes")),m=n(e("babel-types")),y=n(e("./cache"));r.visitors=h,s.visitors=h,s.verify=h.verify,s.explode=h.explode,s.NodePath=e("./path"),s.Scope=e("./scope"),s.Hub=e("./hub"),s.cheap=function(e,t){return m.traverseFast(e,t)},s.node=function(e,t,r,n,i,s){var a=m.VISITOR_KEYS[e.type];if(a)for(var u=new p.default(r,t,n,i),l=a,c=Array.isArray(l),h=0,l=c?l:(0,o.default)(l);;){var f;if(c){if(h>=l.length)break;f=l[h++]}else{if((h=l.next()).done)break;f=h.value}var d=f;if((!s||!s[d])&&u.visit(e,d))return}},s.clearNode=function(e,t){m.removeProperties(e,t),y.path.delete(e)},s.removeProperties=function(e,t){return m.traverseFast(e,s.clearNode,t),e},s.hasType=function(e,t,r,n){if((0,d.default)(n,e.type))return!1;if(e.type===r)return!0;var i={has:!1,type:r};return s(e,{blacklist:n,enter:a},t,i),i.has},(s.clearCache=function(){y.clear()}).clearPath=y.clearPath,s.clearCache.clearScope=y.clearScope,s.copyCache=function(e,t){y.path.has(e)&&y.path.set(t,y.path.get(e))}},{"./cache":140,"./context":141,"./hub":142,"./path":150,"./scope":162,"./visitors":164,"babel-messages":110,"babel-runtime/core-js/get-iterator":120,"babel-types":178,"lodash/includes":507}],144:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/get-iterator"));r.findParent=function(e){for(var t=this;t=t.parentPath;)if(e(t))return t;return null},r.find=function(e){var t=this;do{if(e(t))return t}while(t=t.parentPath);return null},r.getFunctionParent=function(){return this.findParent(function(e){return e.isFunction()||e.isProgram()})},r.getStatementParent=function(){var e=this;do{if(Array.isArray(e.container))return e}while(e=e.parentPath)},r.getEarliestCommonAncestorFrom=function(e){return this.getDeepestCommonAncestorFrom(e,function(e,t,r){for(var n=void 0,a=s.VISITOR_KEYS[e.type],o=r,u=Array.isArray(o),l=0,o=u?o:(0,i.default)(o);;){var c;if(u){if(l>=o.length)break;c=o[l++]}else{if((l=o.next()).done)break;c=l.value}var p=c[t+1];n?p.listKey&&n.listKey===p.listKey&&p.key<n.key?n=p:a.indexOf(n.parentKey)>a.indexOf(p.parentKey)&&(n=p):n=p}return n})},r.getDeepestCommonAncestorFrom=function(e,t){var r=this;if(!e.length)return this;if(1===e.length)return e[0];var n=1/0,s=void 0,a=void 0,o=e.map(function(e){var t=[];do{t.unshift(e)}while((e=e.parentPath)&&e!==r);return t.length<n&&(n=t.length),t}),u=o[0];e:for(var l=0;l<n;l++){for(var c=u[l],p=o,h=Array.isArray(p),f=0,p=h?p:(0,i.default)(p);;){var d;if(h){if(f>=p.length)break;d=p[f++]}else{if((f=p.next()).done)break;d=f.value}if(d[l]!==c)break e}s=l,a=c}if(a)return t?t(a,s,o):a;throw new Error("Couldn't find intersection")},r.getAncestry=function(){var e=this,t=[];do{t.push(e)}while(e=e.parentPath);return t},r.isAncestor=function(e){return e.isDescendant(this)},r.isDescendant=function(e){return!!this.findParent(function(t){return t===e})},r.inType=function(){for(var e=this;e;){for(var t=arguments,r=Array.isArray(t),n=0,t=r?t:(0,i.default)(t);;){var s;if(r){if(n>=t.length)break;s=t[n++]}else{if((n=t.next()).done)break;s=n.value}var a=s;if(e.node.type===a)return!0}e=e.parentPath}return!1},r.inShadow=function(e){var t=this.isFunction()?this:this.findParent(function(e){return e.isFunction()});if(t){if(t.isFunctionExpression()||t.isFunctionDeclaration()){var r=t.node.shadow;if(r&&(!e||!1!==r[e]))return t}else if(t.isArrowFunctionExpression())return t;return null}};var s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));n(e("./index"))},{"./index":150,"babel-runtime/core-js/get-iterator":120,"babel-types":178}],145:[function(e,t,r){"use strict";r.__esModule=!0,r.shareCommentsWithSiblings=function(){if("string"!=typeof this.key){var e=this.node;if(e){var t=e.trailingComments,r=e.leadingComments;if(t||r){var n=this.getSibling(this.key-1),i=this.getSibling(this.key+1);n.node||(n=i),i.node||(i=n),n.addComments("trailing",r),i.addComments("leading",t)}}}},r.addComment=function(e,t,r){this.addComments(e,[{type:r?"CommentLine":"CommentBlock",value:t}])},r.addComments=function(e,t){if(t){var r=this.node;if(r){var n=e+"Comments";r[n]?r[n]=r[n].concat(t):r[n]=t}}}},{}],146:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/get-iterator"));r.call=function(e){var t=this.opts;return this.debug(function(){return e}),!(!this.node||!this._call(t[e]))||!!this.node&&this._call(t[this.node.type]&&t[this.node.type][e])},r._call=function(e){if(!e)return!1;for(var t=e,r=Array.isArray(t),n=0,t=r?t:(0,i.default)(t);;){var s;if(r){if(n>=t.length)break;s=t[n++]}else{if((n=t.next()).done)break;s=n.value}var a=s;if(a){var o=this.node;if(!o)return!0;if(a.call(this.state,this,this.state))throw new Error("Unexpected return value from visitor method "+a);if(this.node!==o)return!0;if(this.shouldStop||this.shouldSkip||this.removed)return!0}}return!1},r.isBlacklisted=function(){var e=this.opts.blacklist;return e&&e.indexOf(this.node.type)>-1},r.visit=function(){return!!this.node&&!this.isBlacklisted()&&(!this.opts.shouldSkip||!this.opts.shouldSkip(this))&&(this.call("enter")||this.shouldSkip?(this.debug(function(){return"Skip..."}),this.shouldStop):(this.debug(function(){return"Recursing into..."}),s.default.node(this.node,this.opts,this.scope,this.state,this,this.skipKeys),this.call("exit"),this.shouldStop))},r.skip=function(){this.shouldSkip=!0},r.skipKey=function(e){this.skipKeys[e]=!0},r.stop=function(){this.shouldStop=!0,this.shouldSkip=!0},r.setScope=function(){if(!this.opts||!this.opts.noScope){var e=this.context&&this.context.scope;if(!e)for(var t=this.parentPath;t&&!e;){if(t.opts&&t.opts.noScope)return;e=t.scope,t=t.parentPath}this.scope=this.getScope(e),this.scope&&this.scope.init()}},r.setContext=function(e){return this.shouldSkip=!1,this.shouldStop=!1,this.removed=!1,this.skipKeys={},e&&(this.context=e,this.state=e.state,this.opts=e.opts),this.setScope(),this},r.resync=function(){this.removed||(this._resyncParent(),this._resyncList(),this._resyncKey())},r._resyncParent=function(){this.parentPath&&(this.parent=this.parentPath.node)},r._resyncKey=function(){if(this.container&&this.node!==this.container[this.key]){if(Array.isArray(this.container)){for(var e=0;e<this.container.length;e++)if(this.container[e]===this.node)return this.setKey(e)}else for(var t in this.container)if(this.container[t]===this.node)return this.setKey(t);this.key=null}},r._resyncList=function(){if(this.parent&&this.inList){var e=this.parent[this.listKey];this.container!==e&&(this.container=e||null)}},r._resyncRemoved=function(){null!=this.key&&this.container&&this.container[this.key]===this.node||this._markRemoved()},r.popContext=function(){this.contexts.pop(),this.setContext(this.contexts[this.contexts.length-1])},r.pushContext=function(e){this.contexts.push(e),this.setContext(e)},r.setup=function(e,t,r,n){this.inList=!!r,this.listKey=r,this.parentKey=r||n,this.container=t,this.parentPath=e||this.parentPath,this.setKey(n)},r.setKey=function(e){this.key=e,this.node=this.container[this.key],this.type=this.node&&this.node.type},r.requeue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this;if(!e.removed)for(var t=this.contexts,r=Array.isArray(t),n=0,t=r?t:(0,i.default)(t);;){var s;if(r){if(n>=t.length)break;s=t[n++]}else{if((n=t.next()).done)break;s=n.value}s.maybeQueue(e)}},r._getQueueContexts=function(){for(var e=this,t=this.contexts;!t.length;)t=(e=e.parentPath).contexts;return t};var s=n(e("../index"))},{"../index":143,"babel-runtime/core-js/get-iterator":120}],147:[function(e,t,r){"use strict";r.__esModule=!0,r.toComputedKey=function(){var e=this.node,t=void 0;if(this.isMemberExpression())t=e.property;else{if(!this.isProperty()&&!this.isMethod())throw new ReferenceError("todo");t=e.key}return e.computed||n.isIdentifier(t)&&(t=n.stringLiteral(t.name)),t},r.ensureBlock=function(){return n.ensureBlock(this.node)},r.arrowFunctionToShadowed=function(){if(this.isArrowFunctionExpression()){this.ensureBlock();var e=this.node;e.expression=!1,e.type="FunctionExpression",e.shadow=e.shadow||!0}};var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"))},{"babel-types":178}],148:[function(e,t,r){(function(t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/helpers/typeof")),s=n(e("babel-runtime/core-js/get-iterator")),a=n(e("babel-runtime/core-js/map"));r.evaluateTruthy=function(){var e=this.evaluate();if(e.confident)return!!e.value},r.evaluate=function(){function e(e){n&&(l=e,n=!1)}function r(a){var l=a.node;if(c.has(l)){var p=c.get(l);return p.resolved?p.value:void e(a)}var h={resolved:!1};c.set(l,h);var f=function(a){if(n){var l=a.node;if(a.isSequenceExpression()){var c=a.get("expressions");return r(c[c.length-1])}if(a.isStringLiteral()||a.isNumericLiteral()||a.isBooleanLiteral())return l.value;if(a.isNullLiteral())return null;if(a.isTemplateLiteral()){for(var p="",h=0,f=a.get("expressions"),d=l.quasis,m=Array.isArray(d),y=0,d=m?d:(0,s.default)(d);;){var g;if(m){if(y>=d.length)break;g=d[y++]}else{if((y=d.next()).done)break;g=y.value}if(!n)break;p+=g.value.cooked;var b=f[h++];b&&(p+=String(r(b)))}if(!n)return;return p}if(a.isConditionalExpression()){var v=r(a.get("test"));if(!n)return;return r(v?a.get("consequent"):a.get("alternate"))}if(a.isExpressionWrapper())return r(a.get("expression"));if(a.isMemberExpression()&&!a.parentPath.isCallExpression({callee:l})){var x=a.get("property"),E=a.get("object");if(E.isLiteral()&&x.isIdentifier()){var A=E.node.value,D=void 0===A?"undefined":(0,i.default)(A);if("number"===D||"string"===D)return A[x.node.name]}}if(a.isReferencedIdentifier()){var C=a.scope.getBinding(l.name);if(C&&C.constantViolations.length>0)return e(C.path);if(C&&a.node.start<C.path.node.end)return e(C.path);if(C&&C.hasValue)return C.value;if("undefined"===l.name)return C?e(C.path):void 0;if("Infinity"===l.name)return C?e(C.path):1/0;if("NaN"===l.name)return C?e(C.path):NaN;var S=a.resolve();return S===a?e(a):r(S)}if(a.isUnaryExpression({prefix:!0})){if("void"===l.operator)return;var _=a.get("argument");if("typeof"===l.operator&&(_.isFunction()||_.isClass()))return"function";var w=r(_);if(!n)return;switch(l.operator){case"!":return!w;case"+":return+w;case"-":return-w;case"~":return~w;case"typeof":return void 0===w?"undefined":(0,i.default)(w)}}if(a.isArrayExpression()){for(var k=[],F=a.get("elements"),T=Array.isArray(F),P=0,F=T?F:(0,s.default)(F);;){var B;if(T){if(P>=F.length)break;B=F[P++]}else{if((P=F.next()).done)break;B=P.value}var O=B;if(!(O=O.evaluate()).confident)return e(O);k.push(O.value)}return k}if(a.isObjectExpression()){for(var j={},N=a.get("properties"),I=Array.isArray(N),L=0,N=I?N:(0,s.default)(N);;){var M;if(I){if(L>=N.length)break;M=N[L++]}else{if((L=N.next()).done)break;M=L.value}var R=M;if(R.isObjectMethod()||R.isSpreadProperty())return e(R);var V=R.get("key"),U=V;if(R.node.computed){if(!(U=U.evaluate()).confident)return e(V);U=U.value}else U=U.isIdentifier()?U.node.name:U.node.value;var q=R.get("value"),G=q.evaluate();if(!G.confident)return e(q);G=G.value,j[U]=G}return j}if(a.isLogicalExpression()){var X=n,W=r(a.get("left")),J=n;n=X;var K=r(a.get("right")),z=n;switch(n=J&&z,l.operator){case"||":if(W&&J)return n=!0,W;if(!n)return;return W||K;case"&&":if((!W&&J||!K&&z)&&(n=!0),!n)return;return W&&K}}if(a.isBinaryExpression()){var Y=r(a.get("left"));if(!n)return;var H=r(a.get("right"));if(!n)return;switch(l.operator){case"-":return Y-H;case"+":return Y+H;case"/":return Y/H;case"*":return Y*H;case"%":return Y%H;case"**":return Math.pow(Y,H);case"<":return Y<H;case">":return Y>H;case"<=":return Y<=H;case">=":return Y>=H;case"==":return Y==H;case"!=":return Y!=H;case"===":return Y===H;case"!==":return Y!==H;case"|":return Y|H;case"&":return Y&H;case"^":return Y^H;case"<<":return Y<<H;case">>":return Y>>H;case">>>":return Y>>>H}}if(a.isCallExpression()){var $=a.get("callee"),Q=void 0,Z=void 0;if($.isIdentifier()&&!a.scope.getBinding($.node.name,!0)&&o.indexOf($.node.name)>=0&&(Z=t[l.callee.name]),$.isMemberExpression()){var ee=$.get("object"),te=$.get("property");if(ee.isIdentifier()&&te.isIdentifier()&&o.indexOf(ee.node.name)>=0&&u.indexOf(te.node.name)<0&&(Q=t[ee.node.name],Z=Q[te.node.name]),ee.isLiteral()&&te.isIdentifier()){var re=(0,i.default)(ee.node.value);"string"!==re&&"number"!==re||(Q=ee.node.value,Z=Q[te.node.name])}}if(Z){var ne=a.get("arguments").map(r);if(!n)return;return Z.apply(Q,ne)}}e(a)}}(a);return n&&(h.resolved=!0,h.value=f),f}var n=!0,l=void 0,c=new a.default,p=r(this);return n||(p=void 0),{confident:n,deopt:l,value:p}};var o=["String","Number","Math"],u=["random"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/map":122,"babel-runtime/helpers/typeof":138}],149:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/object/create")),s=n(e("babel-runtime/core-js/get-iterator"));r.getStatementParent=function(){var e=this;do{if(!e.parentPath||Array.isArray(e.container)&&e.isStatement())break;e=e.parentPath}while(e);if(e&&(e.isProgram()||e.isFile()))throw new Error("File/Program node, we can't possibly find a statement parent to this");return e},r.getOpposite=function(){return"left"===this.key?this.getSibling("right"):"right"===this.key?this.getSibling("left"):void 0},r.getCompletionRecords=function(){var e=[],t=function(t){t&&(e=e.concat(t.getCompletionRecords()))};if(this.isIfStatement())t(this.get("consequent")),t(this.get("alternate"));else if(this.isDoExpression()||this.isFor()||this.isWhile())t(this.get("body"));else if(this.isProgram()||this.isBlockStatement())t(this.get("body").pop());else{if(this.isFunction())return this.get("body").getCompletionRecords();this.isTryStatement()?(t(this.get("block")),t(this.get("handler")),t(this.get("finalizer"))):e.push(this)}return e},r.getSibling=function(e){return a.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:e})},r.getPrevSibling=function(){return this.getSibling(this.key-1)},r.getNextSibling=function(){return this.getSibling(this.key+1)},r.getAllNextSiblings=function(){for(var e=this.key,t=this.getSibling(++e),r=[];t.node;)r.push(t),t=this.getSibling(++e);return r},r.getAllPrevSiblings=function(){for(var e=this.key,t=this.getSibling(--e),r=[];t.node;)r.push(t),t=this.getSibling(--e);return r},r.get=function(e,t){!0===t&&(t=this.context);var r=e.split(".");return 1===r.length?this._getKey(e,t):this._getPattern(r,t)},r._getKey=function(e,t){var r=this,n=this.node,i=n[e];return Array.isArray(i)?i.map(function(s,o){return a.default.get({listKey:e,parentPath:r,parent:n,container:i,key:o}).setContext(t)}):a.default.get({parentPath:this,parent:n,container:n,key:e}).setContext(t)},r._getPattern=function(e,t){for(var r=this,n=e,i=Array.isArray(n),a=0,n=i?n:(0,s.default)(n);;){var o;if(i){if(a>=n.length)break;o=n[a++]}else{if((a=n.next()).done)break;o=a.value}var u=o;r="."===u?r.parentPath:Array.isArray(r)?r[u]:r.get(u,t)}return r},r.getBindingIdentifiers=function(e){return o.getBindingIdentifiers(this.node,e)},r.getOuterBindingIdentifiers=function(e){return o.getOuterBindingIdentifiers(this.node,e)},r.getBindingIdentifierPaths=function(){for(var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=[].concat(this),n=(0,i.default)(null);r.length;){var s=r.shift();if(s&&s.node){var a=o.getBindingIdentifiers.keys[s.node.type];if(s.isIdentifier())e?(n[s.node.name]=n[s.node.name]||[]).push(s):n[s.node.name]=s;else if(s.isExportDeclaration()){var u=s.get("declaration");u.isDeclaration()&&r.push(u)}else{if(t){if(s.isFunctionDeclaration()){r.push(s.get("id"));continue}if(s.isFunctionExpression())continue}if(a)for(var l=0;l<a.length;l++){var c=a[l],p=s.get(c);(Array.isArray(p)||p.node)&&(r=r.concat(p))}}}}return n},r.getOuterBindingIdentifierPaths=function(e){return this.getBindingIdentifierPaths(e,!0)};var a=n(e("./index")),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"))},{"./index":150,"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/object/create":125,"babel-types":178}],150:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var s=i(e("babel-runtime/core-js/get-iterator")),a=i(e("babel-runtime/helpers/classCallCheck")),o=n(e("./lib/virtual-types")),u=i(e("debug")),l=i(e("invariant")),c=i(e("../index")),p=i(e("lodash/assign")),h=i(e("../scope")),f=n(e("babel-types")),d=e("../cache"),m=(0,u.default)("babel"),y=function(){function e(t,r){(0,a.default)(this,e),this.parent=r,this.hub=t,this.contexts=[],this.data={},this.shouldSkip=!1,this.shouldStop=!1,this.removed=!1,this.state=null,this.opts=null,this.skipKeys=null,this.parentPath=null,this.context=null,this.container=null,this.listKey=null,this.inList=!1,this.parentKey=null,this.key=null,this.node=null,this.scope=null,this.type=null,this.typeAnnotation=null}return e.get=function(t){var r=t.hub,n=t.parentPath,i=t.parent,s=t.container,a=t.listKey,o=t.key;!r&&n&&(r=n.hub),(0,l.default)(i,"To get a node path the parent needs to exist");var u=s[o],c=d.path.get(i)||[];d.path.has(i)||d.path.set(i,c);for(var p=void 0,h=0;h<c.length;h++){var f=c[h];if(f.node===u){p=f;break}}return p||(p=new e(r,i),c.push(p)),p.setup(n,s,a,o),p},e.prototype.getScope=function(e){var t=e;return this.isScope()&&(t=new h.default(this,e)),t},e.prototype.setData=function(e,t){return this.data[e]=t},e.prototype.getData=function(e,t){var r=this.data[e];return!r&&t&&(r=this.data[e]=t),r},e.prototype.buildCodeFrameError=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:SyntaxError;return this.hub.file.buildCodeFrameError(this.node,e,t)},e.prototype.traverse=function(e,t){(0,c.default)(this.node,e,this.scope,t,this)},e.prototype.mark=function(e,t){this.hub.file.metadata.marked.push({type:e,message:t,loc:this.node.loc})},e.prototype.set=function(e,t){f.validate(this.node,e,t),this.node[e]=t},e.prototype.getPathLocation=function(){var e=[],t=this;do{var r=t.key;t.inList&&(r=t.listKey+"["+r+"]"),e.unshift(r)}while(t=t.parentPath);return e.join(".")},e.prototype.debug=function(e){m.enabled&&m(this.getPathLocation()+" "+this.type+": "+e())},e}();r.default=y,(0,p.default)(y.prototype,e("./ancestry")),(0,p.default)(y.prototype,e("./inference")),(0,p.default)(y.prototype,e("./replacement")),(0,p.default)(y.prototype,e("./evaluation")),(0,p.default)(y.prototype,e("./conversion")),(0,p.default)(y.prototype,e("./introspection")),(0,p.default)(y.prototype,e("./context")),(0,p.default)(y.prototype,e("./removal")),(0,p.default)(y.prototype,e("./modification")),(0,p.default)(y.prototype,e("./family")),(0,p.default)(y.prototype,e("./comments"));for(var g=function(){if(v){if(x>=b.length)return"break";E=b[x++]}else{if((x=b.next()).done)return"break";E=x.value}var e=E,t="is"+e;y.prototype[t]=function(e){return f[t](this.node,e)},y.prototype["assert"+e]=function(r){if(!this[t](r))throw new TypeError("Expected node path of type "+e)}},b=f.TYPES,v=Array.isArray(b),x=0,b=v?b:(0,s.default)(b);;){var E;if("break"===g())break}var A=function(e){if("_"===e[0])return"continue";f.TYPES.indexOf(e)<0&&f.TYPES.push(e);var t=o[e];y.prototype["is"+e]=function(e){return t.checkPath(this,e)}};for(var D in o){A(D)}t.exports=r.default},{"../cache":140,"../index":143,"../scope":162,"./ancestry":144,"./comments":145,"./context":146,"./conversion":147,"./evaluation":148,"./family":149,"./inference":151,"./introspection":154,"./lib/virtual-types":157,"./modification":158,"./removal":159,"./replacement":160,"babel-runtime/core-js/get-iterator":120,"babel-runtime/helpers/classCallCheck":134,"babel-types":178,debug:165,invariant:318,"lodash/assign":488}],151:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e,t,r){if("string"===e)return o.isStringTypeAnnotation(t);if("number"===e)return o.isNumberTypeAnnotation(t);if("boolean"===e)return o.isBooleanTypeAnnotation(t);if("any"===e)return o.isAnyTypeAnnotation(t);if("mixed"===e)return o.isMixedTypeAnnotation(t);if("empty"===e)return o.isEmptyTypeAnnotation(t);if("void"===e)return o.isVoidTypeAnnotation(t);if(r)return!1;throw new Error("Unknown base type "+e)}r.__esModule=!0;var s=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/get-iterator"));r.getTypeAnnotation=function(){if(this.typeAnnotation)return this.typeAnnotation;var e=this._getTypeAnnotation()||o.anyTypeAnnotation();return o.isTypeAnnotation(e)&&(e=e.typeAnnotation),this.typeAnnotation=e},r._getTypeAnnotation=function(){var e=this.node;if(e){if(e.typeAnnotation)return e.typeAnnotation;var t=a[e.type];return t?t.call(this,e):(t=a[this.parentPath.type])&&t.validParent?this.parentPath.getTypeAnnotation():void 0}if("init"===this.key&&this.parentPath.isVariableDeclarator()){var r=this.parentPath.parentPath,n=r.parentPath;return"left"===r.key&&n.isForInStatement()?o.stringTypeAnnotation():"left"===r.key&&n.isForOfStatement()?o.anyTypeAnnotation():o.voidTypeAnnotation()}},r.isBaseType=function(e,t){return i(e,this.getTypeAnnotation(),t)},r.couldBeBaseType=function(e){var t=this.getTypeAnnotation();if(o.isAnyTypeAnnotation(t))return!0;if(o.isUnionTypeAnnotation(t)){for(var r=t.types,n=Array.isArray(r),a=0,r=n?r:(0,s.default)(r);;){var u;if(n){if(a>=r.length)break;u=r[a++]}else{if((a=r.next()).done)break;u=a.value}var l=u;if(o.isAnyTypeAnnotation(l)||i(e,l,!0))return!0}return!1}return i(e,t,!0)},r.baseTypeStrictlyMatches=function(e){var t=this.getTypeAnnotation();if(e=e.getTypeAnnotation(),!o.isAnyTypeAnnotation(t)&&o.isFlowBaseAnnotation(t))return e.type===t.type},r.isGenericType=function(e){var t=this.getTypeAnnotation();return o.isGenericTypeAnnotation(t)&&o.isIdentifier(t.id,{name:e})};var a=n(e("./inferers")),o=n(e("babel-types"))},{"./inferers":153,"babel-runtime/core-js/get-iterator":120,"babel-types":178}],152:[function(e,t,r){"use strict";function n(e,t,r){var n=e.constantViolations.slice();return n.unshift(e.path),n.filter(function(e){var n=(e=e.resolve())._guessExecutionStatusRelativeTo(t);return r&&"function"===n&&r.push(e),"before"===n})}function i(e,t){var r=t.node.operator,n=t.get("right").resolve(),i=t.get("left").resolve(),s=void 0;if(i.isIdentifier({name:e})?s=n:n.isIdentifier({name:e})&&(s=i),s)return"==="===r?s.getTypeAnnotation():o.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(r)>=0?o.numberTypeAnnotation():void 0;if("==="===r){var a=void 0,u=void 0;if(i.isUnaryExpression({operator:"typeof"})?(a=i,u=n):n.isUnaryExpression({operator:"typeof"})&&(a=n,u=i),(u||a)&&(u=u.resolve()).isLiteral()){if("string"==typeof u.node.value&&a.get("argument").isIdentifier({name:e}))return o.createTypeAnnotationBasedOnTypeof(u.node.value)}}}function s(e,t){var r=function(e){for(var t=void 0;t=e.parentPath;){if(t.isIfStatement()||t.isConditionalExpression())return"test"===e.key?void 0:t;e=t}}(e);if(r){var n=[r.get("test")],a=[];do{var u=n.shift().resolve();if(u.isLogicalExpression()&&(n.push(u.get("left")),n.push(u.get("right"))),u.isBinaryExpression()){var l=i(t,u);l&&a.push(l)}}while(n.length);return a.length?{typeAnnotation:o.createUnionTypeAnnotation(a),ifStatement:r}:s(r,t)}}r.__esModule=!0;var a=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/get-iterator"));r.default=function(e){if(this.isReferenced()){var t=this.scope.getBinding(e.name);return t?t.identifier.typeAnnotation?t.identifier.typeAnnotation:function(e,t){var r=e.scope.getBinding(t),i=[];e.typeAnnotation=o.unionTypeAnnotation(i);var u=[],l=n(r,e,u),c=s(e,t);if(c){var p=n(r,c.ifStatement);l=l.filter(function(e){return p.indexOf(e)<0}),i.push(c.typeAnnotation)}if(l.length)for(var h=l=l.concat(u),f=Array.isArray(h),d=0,h=f?h:(0,a.default)(h);;){var m;if(f){if(d>=h.length)break;m=h[d++]}else{if((d=h.next()).done)break;m=d.value}var y=m;i.push(y.getTypeAnnotation())}if(i.length)return o.createUnionTypeAnnotation(i)}(this,e.name):"undefined"===e.name?o.voidTypeAnnotation():"NaN"===e.name||"Infinity"===e.name?o.numberTypeAnnotation():void e.name}};var o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));t.exports=r.default},{"babel-runtime/core-js/get-iterator":120,"babel-types":178}],153:[function(e,t,r){"use strict";function n(e){return e.typeAnnotation}function i(){return l.genericTypeAnnotation(l.identifier("Array"))}function s(){return i()}function a(){return l.genericTypeAnnotation(l.identifier("Function"))}function o(e){if((e=e.resolve()).isFunction()){if(e.is("async"))return e.is("generator")?l.genericTypeAnnotation(l.identifier("AsyncIterator")):l.genericTypeAnnotation(l.identifier("Promise"));if(e.node.returnType)return e.node.returnType}}r.__esModule=!0,r.ClassDeclaration=r.ClassExpression=r.FunctionDeclaration=r.ArrowFunctionExpression=r.FunctionExpression=r.Identifier=void 0;var u=e("./inferer-reference");Object.defineProperty(r,"Identifier",{enumerable:!0,get:function(){return function(e){return e&&e.__esModule?e:{default:e}}(u).default}}),r.VariableDeclarator=function(){return this.get("id").isIdentifier()?this.get("init").getTypeAnnotation():void 0},r.TypeCastExpression=n,r.NewExpression=function(e){if(this.get("callee").isIdentifier())return l.genericTypeAnnotation(e.callee)},r.TemplateLiteral=function(){return l.stringTypeAnnotation()},r.UnaryExpression=function(e){var t=e.operator;return"void"===t?l.voidTypeAnnotation():l.NUMBER_UNARY_OPERATORS.indexOf(t)>=0?l.numberTypeAnnotation():l.STRING_UNARY_OPERATORS.indexOf(t)>=0?l.stringTypeAnnotation():l.BOOLEAN_UNARY_OPERATORS.indexOf(t)>=0?l.booleanTypeAnnotation():void 0},r.BinaryExpression=function(e){var t=e.operator;if(l.NUMBER_BINARY_OPERATORS.indexOf(t)>=0)return l.numberTypeAnnotation();if(l.BOOLEAN_BINARY_OPERATORS.indexOf(t)>=0)return l.booleanTypeAnnotation();if("+"===t){var r=this.get("right"),n=this.get("left");return n.isBaseType("number")&&r.isBaseType("number")?l.numberTypeAnnotation():n.isBaseType("string")||r.isBaseType("string")?l.stringTypeAnnotation():l.unionTypeAnnotation([l.stringTypeAnnotation(),l.numberTypeAnnotation()])}},r.LogicalExpression=function(){return l.createUnionTypeAnnotation([this.get("left").getTypeAnnotation(),this.get("right").getTypeAnnotation()])},r.ConditionalExpression=function(){return l.createUnionTypeAnnotation([this.get("consequent").getTypeAnnotation(),this.get("alternate").getTypeAnnotation()])},r.SequenceExpression=function(){return this.get("expressions").pop().getTypeAnnotation()},r.AssignmentExpression=function(){return this.get("right").getTypeAnnotation()},r.UpdateExpression=function(e){var t=e.operator;if("++"===t||"--"===t)return l.numberTypeAnnotation()},r.StringLiteral=function(){return l.stringTypeAnnotation()},r.NumericLiteral=function(){return l.numberTypeAnnotation()},r.BooleanLiteral=function(){return l.booleanTypeAnnotation()},r.NullLiteral=function(){return l.nullLiteralTypeAnnotation()},r.RegExpLiteral=function(){return l.genericTypeAnnotation(l.identifier("RegExp"))},r.ObjectExpression=function(){return l.genericTypeAnnotation(l.identifier("Object"))},r.ArrayExpression=i,r.RestElement=s,r.CallExpression=function(){return o(this.get("callee"))},r.TaggedTemplateExpression=function(){return o(this.get("tag"))};var l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));n.validParent=!0,s.validParent=!0,r.FunctionExpression=a,r.ArrowFunctionExpression=a,r.FunctionDeclaration=a,r.ClassExpression=a,r.ClassDeclaration=a},{"./inferer-reference":152,"babel-types":178}],154:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=this.node&&this.node[e];return t&&Array.isArray(t)?!!t.length:!!t}r.__esModule=!0,r.is=void 0;var s=n(e("babel-runtime/core-js/get-iterator"));r.matchesPattern=function(e,t){function r(e){var t=n[s];return"*"===t||e===t}if(!this.isMemberExpression())return!1;for(var n=e.split("."),i=[this.node],s=0;i.length;){var a=i.shift();if(t&&s===n.length)return!0;if(o.isIdentifier(a)){if(!r(a.name))return!1}else if(o.isLiteral(a)){if(!r(a.value))return!1}else{if(o.isMemberExpression(a)){if(a.computed&&!o.isLiteral(a.property))return!1;i.unshift(a.property),i.unshift(a.object);continue}if(!o.isThisExpression(a))return!1;if(!r("this"))return!1}if(++s>n.length)return!1}return s===n.length},r.has=i,r.isStatic=function(){return this.scope.isStatic(this.node)},r.isnt=function(e){return!this.has(e)},r.equals=function(e,t){return this.node[e]===t},r.isNodeType=function(e){return o.isType(this.type,e)},r.canHaveVariableDeclarationOrExpression=function(){return("init"===this.key||"left"===this.key)&&this.parentPath.isFor()},r.canSwapBetweenExpressionAndStatement=function(e){return!("body"!==this.key||!this.parentPath.isArrowFunctionExpression())&&(this.isExpression()?o.isBlockStatement(e):!!this.isBlockStatement()&&o.isExpression(e))},r.isCompletionRecord=function(e){var t=this,r=!0;do{var n=t.container;if(t.isFunction()&&!r)return!!e;if(r=!1,Array.isArray(n)&&t.key!==n.length-1)return!1}while((t=t.parentPath)&&!t.isProgram());return!0},r.isStatementOrBlock=function(){return!this.parentPath.isLabeledStatement()&&!o.isBlockStatement(this.container)&&(0,a.default)(o.STATEMENT_OR_BLOCK_KEYS,this.key)},r.referencesImport=function(e,t){if(!this.isReferencedIdentifier())return!1;var r=this.scope.getBinding(this.node.name);if(!r||"module"!==r.kind)return!1;var n=r.path,i=n.parentPath;return!(!i.isImportDeclaration()||i.node.source.value!==e||t&&(!n.isImportDefaultSpecifier()||"default"!==t)&&(!n.isImportNamespaceSpecifier()||"*"!==t)&&(!n.isImportSpecifier()||n.node.imported.name!==t))},r.getSource=function(){var e=this.node;return e.end?this.hub.file.code.slice(e.start,e.end):""},r.willIMaybeExecuteBefore=function(e){return"after"!==this._guessExecutionStatusRelativeTo(e)},r._guessExecutionStatusRelativeTo=function(e){var t=e.scope.getFunctionParent(),r=this.scope.getFunctionParent();if(t.node!==r.node){var n=this._guessExecutionStatusRelativeToDifferentFunctions(t);if(n)return n;e=t.path}var i=e.getAncestry();if(i.indexOf(this)>=0)return"after";var s=this.getAncestry(),a=void 0,u=void 0,l=void 0;for(l=0;l<s.length;l++){var c=s[l];if((u=i.indexOf(c))>=0){a=c;break}}if(!a)return"before";var p=i[u-1],h=s[l-1];return p&&h?p.listKey&&p.container===h.container?p.key>h.key?"before":"after":o.VISITOR_KEYS[p.type].indexOf(p.key)>o.VISITOR_KEYS[h.type].indexOf(h.key)?"before":"after":"before"},r._guessExecutionStatusRelativeToDifferentFunctions=function(e){var t=e.path;if(t.isFunctionDeclaration()){var r=t.scope.getBinding(t.node.id.name);if(!r.references)return"before";for(var n=r.referencePaths,i=n,a=Array.isArray(i),o=0,i=a?i:(0,s.default)(i);;){var u;if(a){if(o>=i.length)break;u=i[o++]}else{if((o=i.next()).done)break;u=o.value}var l=u;if("callee"!==l.key||!l.parentPath.isCallExpression())return}for(var c=void 0,p=n,h=Array.isArray(p),f=0,p=h?p:(0,s.default)(p);;){var d;if(h){if(f>=p.length)break;d=p[f++]}else{if((f=p.next()).done)break;d=f.value}var m=d;if(!m.find(function(e){return e.node===t.node})){var y=this._guessExecutionStatusRelativeTo(m);if(c){if(c!==y)return}else c=y}}return c}},r.resolve=function(e,t){return this._resolve(e,t)||this},r._resolve=function(e,t){if(!(t&&t.indexOf(this)>=0))if((t=t||[]).push(this),this.isVariableDeclarator()){if(this.get("id").isIdentifier())return this.get("init").resolve(e,t)}else if(this.isReferencedIdentifier()){var r=this.scope.getBinding(this.node.name);if(!r)return;if(!r.constant)return;if("module"===r.kind)return;if(r.path!==this){var n=r.path.resolve(e,t);if(this.find(function(e){return e.node===n.node}))return;return n}}else{if(this.isTypeCastExpression())return this.get("expression").resolve(e,t);if(e&&this.isMemberExpression()){var i=this.toComputedKey();if(!o.isLiteral(i))return;var a=i.value,u=this.get("object").resolve(e,t);if(u.isObjectExpression())for(var l=u.get("properties"),c=Array.isArray(l),p=0,l=c?l:(0,s.default)(l);;){var h;if(c){if(p>=l.length)break;h=l[p++]}else{if((p=l.next()).done)break;h=p.value}var f=h;if(f.isProperty()){var d=f.get("key"),m=f.isnt("computed")&&d.isIdentifier({name:a});if(m=m||d.isLiteral({value:a}))return f.get("value").resolve(e,t)}}else if(u.isArrayExpression()&&!isNaN(+a)){var y=u.get("elements")[a];if(y)return y.resolve(e,t)}}}};var a=n(e("lodash/includes")),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));r.is=i},{"babel-runtime/core-js/get-iterator":120,"babel-types":178,"lodash/includes":507}],155:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/get-iterator")),s=n(e("babel-runtime/helpers/classCallCheck")),a=e("babel-types"),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(a),u={ReferencedIdentifier:function(e,t){if(!e.isJSXIdentifier()||!a.react.isCompatTag(e.node.name)||e.parentPath.isJSXMemberExpression()){if("this"===e.node.name){var r=e.scope;do{if(r.path.isFunction()&&!r.path.isArrowFunctionExpression())break}while(r=r.parent);r&&t.breakOnScopePaths.push(r.path)}var n=e.scope.getBinding(e.node.name);n&&n===t.scope.getBinding(e.node.name)&&(t.bindings[e.node.name]=n)}}},l=function(){function e(t,r){(0,s.default)(this,e),this.breakOnScopePaths=[],this.bindings={},this.scopes=[],this.scope=r,this.path=t,this.attachAfter=!1}return e.prototype.isCompatibleScope=function(e){for(var t in this.bindings){var r=this.bindings[t];if(!e.bindingIdentifierEquals(t,r.identifier))return!1}return!0},e.prototype.getCompatibleScopes=function(){var e=this.path.scope;do{if(!this.isCompatibleScope(e))break;if(this.scopes.push(e),this.breakOnScopePaths.indexOf(e.path)>=0)break}while(e=e.parent)},e.prototype.getAttachmentPath=function(){var e=this._getAttachmentPath();if(e){var t=e.scope;if(t.path===e&&(t=e.scope.parent),t.path.isProgram()||t.path.isFunction())for(var r in this.bindings)if(t.hasOwnBinding(r)){var n=this.bindings[r];if("param"!==n.kind&&this.getAttachmentParentForPath(n.path).key>e.key){this.attachAfter=!0,e=n.path;for(var s=n.constantViolations,a=Array.isArray(s),o=0,s=a?s:(0,i.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if((o=s.next()).done)break;u=o.value}var l=u;this.getAttachmentParentForPath(l).key>e.key&&(e=l)}}}return e.parentPath.isExportDeclaration()&&(e=e.parentPath),e}},e.prototype._getAttachmentPath=function(){var e=this.scopes.pop();if(e){if(e.path.isFunction()){if(this.hasOwnParamBindings(e)){if(this.scope===e)return;return e.path.get("body").get("body")[0]}return this.getNextScopeAttachmentParent()}return e.path.isProgram()?this.getNextScopeAttachmentParent():void 0}},e.prototype.getNextScopeAttachmentParent=function(){var e=this.scopes.pop();if(e)return this.getAttachmentParentForPath(e.path)},e.prototype.getAttachmentParentForPath=function(e){do{if(!e.parentPath||Array.isArray(e.container)&&e.isStatement()||e.isVariableDeclarator()&&null!==e.parentPath.node&&e.parentPath.node.declarations.length>1)return e}while(e=e.parentPath)},e.prototype.hasOwnParamBindings=function(e){for(var t in this.bindings)if(e.hasOwnBinding(t)){var r=this.bindings[t];if("param"===r.kind&&r.constant)return!0}return!1},e.prototype.run=function(){var e=this.path.node;if(!e._hoisted){e._hoisted=!0,this.path.traverse(u,this),this.getCompatibleScopes();var t=this.getAttachmentPath();if(t&&t.getFunctionParent()!==this.path.getFunctionParent()){var r=t.scope.generateUidIdentifier("ref"),n=o.variableDeclarator(r,this.path.node);t[this.attachAfter?"insertAfter":"insertBefore"]([t.isVariableDeclarator()?n:o.variableDeclaration("var",[n])]);var i=this.path.parentPath;i.isJSXElement()&&this.path.container===i.node.children&&(r=o.JSXExpressionContainer(r)),this.path.replaceWith(r)}}},e}();r.default=l,t.exports=r.default},{"babel-runtime/core-js/get-iterator":120,"babel-runtime/helpers/classCallCheck":134,"babel-types":178}],156:[function(e,t,r){"use strict";r.__esModule=!0;r.hooks=[function(e,t){if("test"===e.key&&(t.isWhile()||t.isSwitchCase())||"declaration"===e.key&&t.isExportDeclaration()||"body"===e.key&&t.isLabeledStatement()||"declarations"===e.listKey&&t.isVariableDeclaration()&&1===t.node.declarations.length||"expression"===e.key&&t.isExpressionStatement())return t.remove(),!0},function(e,t){if(t.isSequenceExpression()&&1===t.node.expressions.length)return t.replaceWith(t.node.expressions[0]),!0},function(e,t){if(t.isBinary())return"left"===e.key?t.replaceWith(t.node.right):t.replaceWith(t.node.left),!0},function(e,t){if(t.isIfStatement()&&("consequent"===e.key||"alternate"===e.key)||"body"===e.key&&(t.isLoop()||t.isArrowFunctionExpression()))return e.replaceWith({type:"BlockStatement",body:[]}),!0}]},{}],157:[function(e,t,r){"use strict";r.__esModule=!0,r.Flow=r.Pure=r.Generated=r.User=r.Var=r.BlockScoped=r.Referenced=r.Scope=r.Expression=r.Statement=r.BindingIdentifier=r.ReferencedMemberExpression=r.ReferencedIdentifier=void 0;var n=e("babel-types"),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(n);r.ReferencedIdentifier={types:["Identifier","JSXIdentifier"],checkPath:function(e,t){var r=e.node,s=e.parent;if(!i.isIdentifier(r,t)&&!i.isJSXMemberExpression(s,t)){if(!i.isJSXIdentifier(r,t))return!1;if(n.react.isCompatTag(r.name))return!1}return i.isReferenced(r,s)}},r.ReferencedMemberExpression={types:["MemberExpression"],checkPath:function(e){var t=e.node,r=e.parent;return i.isMemberExpression(t)&&i.isReferenced(t,r)}},r.BindingIdentifier={types:["Identifier"],checkPath:function(e){var t=e.node,r=e.parent;return i.isIdentifier(t)&&i.isBinding(t,r)}},r.Statement={types:["Statement"],checkPath:function(e){var t=e.node,r=e.parent;if(i.isStatement(t)){if(i.isVariableDeclaration(t)){if(i.isForXStatement(r,{left:t}))return!1;if(i.isForStatement(r,{init:t}))return!1}return!0}return!1}},r.Expression={types:["Expression"],checkPath:function(e){return e.isIdentifier()?e.isReferencedIdentifier():i.isExpression(e.node)}},r.Scope={types:["Scopable"],checkPath:function(e){return i.isScope(e.node,e.parent)}},r.Referenced={checkPath:function(e){return i.isReferenced(e.node,e.parent)}},r.BlockScoped={checkPath:function(e){return i.isBlockScoped(e.node)}},r.Var={types:["VariableDeclaration"],checkPath:function(e){return i.isVar(e.node)}},r.User={checkPath:function(e){return e.node&&!!e.node.loc}},r.Generated={checkPath:function(e){return!e.isUser()}},r.Pure={checkPath:function(e,t){return e.scope.isPure(e.node,t)}},r.Flow={types:["Flow","ImportDeclaration","ExportDeclaration","ImportSpecifier"],checkPath:function(e){var t=e.node;return!!i.isFlow(t)||(i.isImportDeclaration(t)?"type"===t.importKind||"typeof"===t.importKind:i.isExportDeclaration(t)?"type"===t.exportKind:!!i.isImportSpecifier(t)&&("type"===t.importKind||"typeof"===t.importKind))}}},{"babel-types":178}],158:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/helpers/typeof")),s=n(e("babel-runtime/core-js/get-iterator"));r.insertBefore=function(e){if(this._assertUnremoved(),e=this._verifyNodeList(e),this.parentPath.isExpressionStatement()||this.parentPath.isLabeledStatement())return this.parentPath.insertBefore(e);if(this.isNodeType("Expression")||this.parentPath.isForStatement()&&"init"===this.key)this.node&&e.push(this.node),this.replaceExpressionWithStatements(e);else{if(this._maybePopFromStatements(e),Array.isArray(this.container))return this._containerInsertBefore(e);if(!this.isStatementOrBlock())throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?");this.node&&e.push(this.node),this._replaceWith(l.blockStatement(e))}return[this]},r._containerInsert=function(e,t){this.updateSiblingKeys(e,t.length);for(var r=[],n=0;n<t.length;n++){var i=e+n,a=t[n];if(this.container.splice(i,0,a),this.context){var o=this.context.create(this.parent,this.container,i,this.listKey);this.context.queue&&o.pushContext(this.context),r.push(o)}else r.push(u.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:i}))}for(var l=this._getQueueContexts(),c=r,p=Array.isArray(c),h=0,c=p?c:(0,s.default)(c);;){var f;if(p){if(h>=c.length)break;f=c[h++]}else{if((h=c.next()).done)break;f=h.value}var d=f;d.setScope(),d.debug(function(){return"Inserted."});for(var m=l,y=Array.isArray(m),g=0,m=y?m:(0,s.default)(m);;){var b;if(y){if(g>=m.length)break;b=m[g++]}else{if((g=m.next()).done)break;b=g.value}b.maybeQueue(d,!0)}}return r},r._containerInsertBefore=function(e){return this._containerInsert(this.key,e)},r._containerInsertAfter=function(e){return this._containerInsert(this.key+1,e)},r._maybePopFromStatements=function(e){var t=e[e.length-1];(l.isIdentifier(t)||l.isExpressionStatement(t)&&l.isIdentifier(t.expression))&&!this.isCompletionRecord()&&e.pop()},r.insertAfter=function(e){if(this._assertUnremoved(),e=this._verifyNodeList(e),this.parentPath.isExpressionStatement()||this.parentPath.isLabeledStatement())return this.parentPath.insertAfter(e);if(this.isNodeType("Expression")||this.parentPath.isForStatement()&&"init"===this.key){if(this.node){var t=this.scope.generateDeclaredUidIdentifier();e.unshift(l.expressionStatement(l.assignmentExpression("=",t,this.node))),e.push(l.expressionStatement(t))}this.replaceExpressionWithStatements(e)}else{if(this._maybePopFromStatements(e),Array.isArray(this.container))return this._containerInsertAfter(e);if(!this.isStatementOrBlock())throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?");this.node&&e.unshift(this.node),this._replaceWith(l.blockStatement(e))}return[this]},r.updateSiblingKeys=function(e,t){if(this.parent)for(var r=a.path.get(this.parent),n=0;n<r.length;n++){var i=r[n];i.key>=e&&(i.key+=t)}},r._verifyNodeList=function(e){if(!e)return[];e.constructor!==Array&&(e=[e]);for(var t=0;t<e.length;t++){var r=e[t],n=void 0;if(r?"object"!==(void 0===r?"undefined":(0,i.default)(r))?n="contains a non-object node":r.type?r instanceof u.default&&(n="has a NodePath when it expected a raw object"):n="without a type":n="has falsy node",n){var s=Array.isArray(r)?"array":void 0===r?"undefined":(0,i.default)(r);throw new Error("Node list "+n+" with the index of "+t+" and type of "+s)}}return e},r.unshiftContainer=function(e,t){return this._assertUnremoved(),t=this._verifyNodeList(t),u.default.get({parentPath:this,parent:this.node,container:this.node[e],listKey:e,key:0}).insertBefore(t)},r.pushContainer=function(e,t){this._assertUnremoved(),t=this._verifyNodeList(t);var r=this.node[e];return u.default.get({parentPath:this,parent:this.node,container:r,listKey:e,key:r.length}).replaceWithMultiple(t)},r.hoist=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.scope;return new o.default(this,e).run()};var a=e("../cache"),o=n(e("./lib/hoister")),u=n(e("./index")),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"))},{"../cache":140,"./index":150,"./lib/hoister":155,"babel-runtime/core-js/get-iterator":120,"babel-runtime/helpers/typeof":138,"babel-types":178}],159:[function(e,t,r){"use strict";r.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/get-iterator"));r.remove=function(){this._assertUnremoved(),this.resync(),this._callRemovalHooks()?this._markRemoved():(this.shareCommentsWithSiblings(),this._remove(),this._markRemoved())},r._callRemovalHooks=function(){for(var e=i.hooks,t=Array.isArray(e),r=0,e=t?e:(0,n.default)(e);;){var s;if(t){if(r>=e.length)break;s=e[r++]}else{if((r=e.next()).done)break;s=r.value}if(s(this,this.parentPath))return!0}},r._remove=function(){Array.isArray(this.container)?(this.container.splice(this.key,1),this.updateSiblingKeys(this.key,-1)):this._replaceWith(null)},r._markRemoved=function(){this.shouldSkip=!0,this.removed=!0,this.node=null},r._assertUnremoved=function(){if(this.removed)throw this.buildCodeFrameError("NodePath has been removed so is read-only.")};var i=e("./lib/removal-hooks")},{"./lib/removal-hooks":156,"babel-runtime/core-js/get-iterator":120}],160:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/get-iterator"));r.replaceWithMultiple=function(e){this.resync(),e=this._verifyNodeList(e),l.inheritLeadingComments(e[0],this.node),l.inheritTrailingComments(e[e.length-1],this.node),this.node=this.container[this.key]=null,this.insertAfter(e),this.node?this.requeue():this.remove()},r.replaceWithSourceString=function(e){this.resync();try{e="("+e+")",e=(0,u.parse)(e)}catch(r){var t=r.loc;throw t&&(r.message+=" - make sure this is an expression.",r.message+="\n"+(0,s.default)(e,t.line,t.column+1)),r}return e=e.program.body[0].expression,a.default.removeProperties(e),this.replaceWith(e)},r.replaceWith=function(e){if(this.resync(),this.removed)throw new Error("You can't replace this node, we've already removed it");if(e instanceof o.default&&(e=e.node),!e)throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead");if(this.node!==e){if(this.isProgram()&&!l.isProgram(e))throw new Error("You can only replace a Program root node with another Program node");if(Array.isArray(e))throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`");if("string"==typeof e)throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`");if(this.isNodeType("Statement")&&l.isExpression(e)&&(this.canHaveVariableDeclarationOrExpression()||this.canSwapBetweenExpressionAndStatement(e)||this.parentPath.isExportDefaultDeclaration()||(e=l.expressionStatement(e))),this.isNodeType("Expression")&&l.isStatement(e)&&!this.canHaveVariableDeclarationOrExpression()&&!this.canSwapBetweenExpressionAndStatement(e))return this.replaceExpressionWithStatements([e]);var t=this.node;t&&(l.inheritsComments(e,t),l.removeComments(t)),this._replaceWith(e),this.type=e.type,this.setScope(),this.requeue()}},r._replaceWith=function(e){if(!this.container)throw new ReferenceError("Container is falsy");this.inList?l.validate(this.parent,this.key,[e]):l.validate(this.parent,this.key,e),this.debug(function(){return"Replace with "+(e&&e.type)}),this.node=this.container[this.key]=e},r.replaceExpressionWithStatements=function(e){this.resync();var t=l.toSequenceExpression(e,this.scope);if(l.isSequenceExpression(t)){var r=t.expressions;r.length>=2&&this.parentPath.isExpressionStatement()&&this._maybePopFromStatements(r),1===r.length?this.replaceWith(r[0]):this.replaceWith(t)}else{if(!t){var n=l.functionExpression(null,[],l.blockStatement(e));n.shadow=!0,this.replaceWith(l.callExpression(n,[])),this.traverse(c);for(var s=this.get("callee").getCompletionRecords(),a=Array.isArray(s),o=0,s=a?s:(0,i.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if((o=s.next()).done)break;u=o.value}var p=u;if(p.isExpressionStatement()){var h=p.findParent(function(e){return e.isLoop()});if(h){var f=h.getData("expressionReplacementReturnUid");if(f)f=l.identifier(f.name);else{var d=this.get("callee");f=d.scope.generateDeclaredUidIdentifier("ret"),d.get("body").pushContainer("body",l.returnStatement(f)),h.setData("expressionReplacementReturnUid",f)}p.get("expression").replaceWith(l.assignmentExpression("=",f,p.node.expression))}else p.replaceWith(l.returnStatement(p.node.expression))}}return this.node}this.replaceWith(t)}},r.replaceInline=function(e){return this.resync(),Array.isArray(e)?Array.isArray(this.container)?(e=this._verifyNodeList(e),this._containerInsertAfter(e),this.remove()):this.replaceWithMultiple(e):this.replaceWith(e)};var s=n(e("babel-code-frame")),a=n(e("../index")),o=n(e("./index")),u=e("babylon"),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types")),c={Function:function(e){e.skip()},VariableDeclaration:function(e){if("var"===e.node.kind){var t=e.getBindingIdentifiers();for(var r in t)e.scope.push({id:t[r]});for(var n=[],s=e.node.declarations,a=Array.isArray(s),o=0,s=a?s:(0,i.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if((o=s.next()).done)break;u=o.value}var c=u;c.init&&n.push(l.expressionStatement(l.assignmentExpression("=",c.id,c.init)))}e.replaceWithMultiple(n)}}}},{"../index":143,"./index":150,"babel-code-frame":21,"babel-runtime/core-js/get-iterator":120,"babel-types":178,babylon:186}],161:[function(e,t,r){"use strict";r.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/helpers/classCallCheck")),i=function(){function e(t){var r=t.existing,i=t.identifier,s=t.scope,a=t.path,o=t.kind;(0,n.default)(this,e),this.identifier=i,this.scope=s,this.path=a,this.kind=o,this.constantViolations=[],this.constant=!0,this.referencePaths=[],this.referenced=!1,this.references=0,this.clearValue(),r&&(this.constantViolations=[].concat(r.path,r.constantViolations,this.constantViolations))}return e.prototype.deoptValue=function(){this.clearValue(),this.hasDeoptedValue=!0},e.prototype.setValue=function(e){this.hasDeoptedValue||(this.hasValue=!0,this.value=e)},e.prototype.clearValue=function(){this.hasDeoptedValue=!1,this.hasValue=!1,this.value=null},e.prototype.reassign=function(e){this.constant=!1,-1===this.constantViolations.indexOf(e)&&this.constantViolations.push(e)},e.prototype.reference=function(e){-1===this.referencePaths.indexOf(e)&&(this.referenced=!0,this.references++,this.referencePaths.push(e))},e.prototype.dereference=function(){this.references--,this.referenced=!!this.references},e}();r.default=i,t.exports=r.default},{"babel-runtime/helpers/classCallCheck":134}],162:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(v.isModuleDeclaration(e))if(e.source)s(e.source,t);else if(e.specifiers&&e.specifiers.length)for(var r=e.specifiers,n=Array.isArray(r),i=0,r=n?r:(0,c.default)(r);;){var a;if(n){if(i>=r.length)break;a=r[i++]}else{if((i=r.next()).done)break;a=i.value}s(a,t)}else e.declaration&&s(e.declaration,t);else if(v.isModuleSpecifier(e))s(e.local,t);else if(v.isMemberExpression(e))s(e.object,t),s(e.property,t);else if(v.isIdentifier(e))t.push(e.name);else if(v.isLiteral(e))t.push(e.value);else if(v.isCallExpression(e))s(e.callee,t);else if(v.isObjectExpression(e)||v.isObjectPattern(e))for(var o=e.properties,u=Array.isArray(o),l=0,o=u?o:(0,c.default)(o);;){var p;if(u){if(l>=o.length)break;p=o[l++]}else{if((l=o.next()).done)break;p=l.value}var h=p;s(h.key||h.argument,t)}}r.__esModule=!0;var a=i(e("babel-runtime/core-js/object/keys")),o=i(e("babel-runtime/core-js/object/create")),u=i(e("babel-runtime/core-js/map")),l=i(e("babel-runtime/helpers/classCallCheck")),c=i(e("babel-runtime/core-js/get-iterator")),p=i(e("lodash/includes")),h=i(e("lodash/repeat")),f=i(e("./lib/renamer")),d=i(e("../index")),m=i(e("lodash/defaults")),y=n(e("babel-messages")),g=i(e("./binding")),b=i(e("globals")),v=n(e("babel-types")),x=e("../cache"),E=0,A={For:function(e){for(var t=v.FOR_INIT_KEYS,r=Array.isArray(t),n=0,t=r?t:(0,c.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i,a=e.get(s);a.isVar()&&e.scope.getFunctionParent().registerBinding("var",a)}},Declaration:function(e){e.isBlockScoped()||e.isExportDeclaration()&&e.get("declaration").isDeclaration()||e.scope.getFunctionParent().registerDeclaration(e)},ReferencedIdentifier:function(e,t){t.references.push(e)},ForXStatement:function(e,t){var r=e.get("left");(r.isPattern()||r.isIdentifier())&&t.constantViolations.push(r)},ExportDeclaration:{exit:function(e){var t=e.node,r=e.scope,n=t.declaration;if(v.isClassDeclaration(n)||v.isFunctionDeclaration(n)){var i=n.id;if(!i)return;var s=r.getBinding(i.name);s&&s.reference(e)}else if(v.isVariableDeclaration(n))for(var a=n.declarations,o=Array.isArray(a),u=0,a=o?a:(0,c.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if((u=a.next()).done)break;l=u.value}var p=l,h=v.getBindingIdentifiers(p);for(var f in h){var d=r.getBinding(f);d&&d.reference(e)}}}},LabeledStatement:function(e){e.scope.getProgramParent().addGlobal(e.node),e.scope.getBlockParent().registerDeclaration(e)},AssignmentExpression:function(e,t){t.assignments.push(e)},UpdateExpression:function(e,t){t.constantViolations.push(e.get("argument"))},UnaryExpression:function(e,t){"delete"===e.node.operator&&t.constantViolations.push(e.get("argument"))},BlockScoped:function(e){var t=e.scope;t.path===e&&(t=t.parent),t.getBlockParent().registerDeclaration(e)},ClassDeclaration:function(e){var t=e.node.id;if(t){var r=t.name;e.scope.bindings[r]=e.scope.getBinding(r)}},Block:function(e){for(var t=e.get("body"),r=Array.isArray(t),n=0,t=r?t:(0,c.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i;s.isFunctionDeclaration()&&e.scope.getBlockParent().registerDeclaration(s)}}},D=0,C=function(){function e(t,r){if((0,l.default)(this,e),r&&r.block===t.node)return r;var n=function(e,t,r){for(var n=x.scope.get(e.node)||[],i=n,s=Array.isArray(i),a=0,i=s?i:(0,c.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if((a=i.next()).done)break;o=a.value}var u=o;if(u.parent===t&&u.path===e)return u}n.push(r),x.scope.has(e.node)||x.scope.set(e.node,n)}(t,r,this);if(n)return n;this.uid=D++,this.parent=r,this.hub=t.hub,this.parentBlock=t.parent,this.block=t.node,this.path=t,this.labels=new u.default}return e.prototype.traverse=function(e,t,r){(0,d.default)(e,t,this,r,this.path)},e.prototype.generateDeclaredUidIdentifier=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"temp",t=this.generateUidIdentifier(e);return this.push({id:t}),t},e.prototype.generateUidIdentifier=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"temp";return v.identifier(this.generateUid(e))},e.prototype.generateUid=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"temp";e=v.toIdentifier(e).replace(/^_+/,"").replace(/[0-9]+$/g,"");var t=void 0,r=0;do{t=this._generateUid(e,r),r++}while(this.hasLabel(t)||this.hasBinding(t)||this.hasGlobal(t)||this.hasReference(t));var n=this.getProgramParent();return n.references[t]=!0,n.uids[t]=!0,t},e.prototype._generateUid=function(e,t){var r=e;return t>1&&(r+=t),"_"+r},e.prototype.generateUidIdentifierBasedOnNode=function(e,t){var r=e;v.isAssignmentExpression(e)?r=e.left:v.isVariableDeclarator(e)?r=e.id:(v.isObjectProperty(r)||v.isObjectMethod(r))&&(r=r.key);var n=[];s(r,n);var i=n.join("$");return i=i.replace(/^_/,"")||t||"ref",this.generateUidIdentifier(i.slice(0,20))},e.prototype.isStatic=function(e){if(v.isThisExpression(e)||v.isSuper(e))return!0;if(v.isIdentifier(e)){var t=this.getBinding(e.name);return t?t.constant:this.hasBinding(e.name)}return!1},e.prototype.maybeGenerateMemoised=function(e,t){if(this.isStatic(e))return null;var r=this.generateUidIdentifierBasedOnNode(e);return t||this.push({id:r}),r},e.prototype.checkBlockScopedCollisions=function(e,t,r,n){if("param"!==t&&("hoisted"!==t||"let"!==e.kind)){if("let"===t||"let"===e.kind||"const"===e.kind||"module"===e.kind||"param"===e.kind&&("let"===t||"const"===t))throw this.hub.file.buildCodeFrameError(n,y.get("scopeDuplicateDeclaration",r),TypeError)}},e.prototype.rename=function(e,t,r){var n=this.getBinding(e);if(n)return t=t||this.generateUidIdentifier(e).name,new f.default(n,e,t).rename(r)},e.prototype._renameFromMap=function(e,t,r,n){e[t]&&(e[r]=n,e[t]=null)},e.prototype.dump=function(){var e=(0,h.default)("-",60);console.log(e);var t=this;do{console.log("#",t.block.type);for(var r in t.bindings){var n=t.bindings[r];console.log(" -",r,{constant:n.constant,references:n.references,violations:n.constantViolations.length,kind:n.kind})}}while(t=t.parent);console.log(e)},e.prototype.toArray=function(e,t){var r=this.hub.file;if(v.isIdentifier(e)){var n=this.getBinding(e.name);if(n&&n.constant&&n.path.isGenericType("Array"))return e}if(v.isArrayExpression(e))return e;if(v.isIdentifier(e,{name:"arguments"}))return v.callExpression(v.memberExpression(v.memberExpression(v.memberExpression(v.identifier("Array"),v.identifier("prototype")),v.identifier("slice")),v.identifier("call")),[e]);var i="toArray",s=[e];return!0===t?i="toConsumableArray":t&&(s.push(v.numericLiteral(t)),i="slicedToArray"),v.callExpression(r.addHelper(i),s)},e.prototype.hasLabel=function(e){return!!this.getLabel(e)},e.prototype.getLabel=function(e){return this.labels.get(e)},e.prototype.registerLabel=function(e){this.labels.set(e.node.label.name,e)},e.prototype.registerDeclaration=function(e){if(e.isLabeledStatement())this.registerLabel(e);else if(e.isFunctionDeclaration())this.registerBinding("hoisted",e.get("id"),e);else if(e.isVariableDeclaration())for(var t=e.get("declarations"),r=Array.isArray(t),n=0,t=r?t:(0,c.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i;this.registerBinding(e.node.kind,s)}else if(e.isClassDeclaration())this.registerBinding("let",e);else if(e.isImportDeclaration())for(var a=e.get("specifiers"),o=Array.isArray(a),u=0,a=o?a:(0,c.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if((u=a.next()).done)break;l=u.value}var p=l;this.registerBinding("module",p)}else if(e.isExportDeclaration()){var h=e.get("declaration");(h.isClassDeclaration()||h.isFunctionDeclaration()||h.isVariableDeclaration())&&this.registerDeclaration(h)}else this.registerBinding("unknown",e)},e.prototype.buildUndefinedNode=function(){return this.hasBinding("undefined")?v.unaryExpression("void",v.numericLiteral(0),!0):v.identifier("undefined")},e.prototype.registerConstantViolation=function(e){var t=e.getBindingIdentifiers();for(var r in t){var n=this.getBinding(r);n&&n.reassign(e)}},e.prototype.registerBinding=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;if(!e)throw new ReferenceError("no `kind`");if(t.isVariableDeclaration())for(var n=t.get("declarations"),i=Array.isArray(n),s=0,n=i?n:(0,c.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}var o=a;this.registerBinding(e,o)}else{var u=this.getProgramParent(),l=t.getBindingIdentifiers(!0);for(var p in l)for(var h=l[p],f=Array.isArray(h),d=0,h=f?h:(0,c.default)(h);;){var m;if(f){if(d>=h.length)break;m=h[d++]}else{if((d=h.next()).done)break;m=d.value}var y=m,b=this.getOwnBinding(p);if(b){if(b.identifier===y)continue;this.checkBlockScopedCollisions(b,e,p,y)}b&&b.path.isFlow()&&(b=null),u.references[p]=!0,this.bindings[p]=new g.default({identifier:y,existing:b,scope:this,path:r,kind:e})}}},e.prototype.addGlobal=function(e){this.globals[e.name]=e},e.prototype.hasUid=function(e){var t=this;do{if(t.uids[e])return!0}while(t=t.parent);return!1},e.prototype.hasGlobal=function(e){var t=this;do{if(t.globals[e])return!0}while(t=t.parent);return!1},e.prototype.hasReference=function(e){var t=this;do{if(t.references[e])return!0}while(t=t.parent);return!1},e.prototype.isPure=function(e,t){if(v.isIdentifier(e)){var r=this.getBinding(e.name);return!!r&&(!t||r.constant)}if(v.isClass(e))return!(e.superClass&&!this.isPure(e.superClass,t))&&this.isPure(e.body,t);if(v.isClassBody(e)){for(var n=e.body,i=Array.isArray(n),s=0,n=i?n:(0,c.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}var o=a;if(!this.isPure(o,t))return!1}return!0}if(v.isBinary(e))return this.isPure(e.left,t)&&this.isPure(e.right,t);if(v.isArrayExpression(e)){for(var u=e.elements,l=Array.isArray(u),p=0,u=l?u:(0,c.default)(u);;){var h;if(l){if(p>=u.length)break;h=u[p++]}else{if((p=u.next()).done)break;h=p.value}var f=h;if(!this.isPure(f,t))return!1}return!0}if(v.isObjectExpression(e)){for(var d=e.properties,m=Array.isArray(d),y=0,d=m?d:(0,c.default)(d);;){var g;if(m){if(y>=d.length)break;g=d[y++]}else{if((y=d.next()).done)break;g=y.value}var b=g;if(!this.isPure(b,t))return!1}return!0}return v.isClassMethod(e)?!(e.computed&&!this.isPure(e.key,t))&&("get"!==e.kind&&"set"!==e.kind):v.isClassProperty(e)||v.isObjectProperty(e)?!(e.computed&&!this.isPure(e.key,t))&&this.isPure(e.value,t):v.isUnaryExpression(e)?this.isPure(e.argument,t):v.isPureish(e)},e.prototype.setData=function(e,t){return this.data[e]=t},e.prototype.getData=function(e){var t=this;do{var r=t.data[e];if(null!=r)return r}while(t=t.parent)},e.prototype.removeData=function(e){var t=this;do{null!=t.data[e]&&(t.data[e]=null)}while(t=t.parent)},e.prototype.init=function(){this.references||this.crawl()},e.prototype.crawl=function(){E++,this._crawl(),E--},e.prototype._crawl=function(){var e=this.path;if(this.references=(0,o.default)(null),this.bindings=(0,o.default)(null),this.globals=(0,o.default)(null),this.uids=(0,o.default)(null),this.data=(0,o.default)(null),e.isLoop())for(var t=v.FOR_INIT_KEYS,r=Array.isArray(t),n=0,t=r?t:(0,c.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i,a=e.get(s);a.isBlockScoped()&&this.registerBinding(a.node.kind,a)}if(e.isFunctionExpression()&&e.has("id")&&(e.get("id").node[v.NOT_LOCAL_BINDING]||this.registerBinding("local",e.get("id"),e)),e.isClassExpression()&&e.has("id")&&(e.get("id").node[v.NOT_LOCAL_BINDING]||this.registerBinding("local",e)),e.isFunction())for(var u=e.get("params"),l=Array.isArray(u),p=0,u=l?u:(0,c.default)(u);;){var h;if(l){if(p>=u.length)break;h=u[p++]}else{if((p=u.next()).done)break;h=p.value}var f=h;this.registerBinding("param",f)}e.isCatchClause()&&this.registerBinding("let",e);if(!this.getProgramParent().crawling){var d={references:[],constantViolations:[],assignments:[]};this.crawling=!0,e.traverse(A,d),this.crawling=!1;for(var m=d.assignments,y=Array.isArray(m),g=0,m=y?m:(0,c.default)(m);;){var b;if(y){if(g>=m.length)break;b=m[g++]}else{if((g=m.next()).done)break;b=g.value}var x=b,E=x.getBindingIdentifiers(),D=void 0;for(var C in E)x.scope.getBinding(C)||(D=D||x.scope.getProgramParent()).addGlobal(E[C]);x.scope.registerConstantViolation(x)}for(var S=d.references,_=Array.isArray(S),w=0,S=_?S:(0,c.default)(S);;){var k;if(_){if(w>=S.length)break;k=S[w++]}else{if((w=S.next()).done)break;k=w.value}var F=k,T=F.scope.getBinding(F.node.name);T?T.reference(F):F.scope.getProgramParent().addGlobal(F.node)}for(var P=d.constantViolations,B=Array.isArray(P),O=0,P=B?P:(0,c.default)(P);;){var j;if(B){if(O>=P.length)break;j=P[O++]}else{if((O=P.next()).done)break;j=O.value}var N=j;N.scope.registerConstantViolation(N)}}},e.prototype.push=function(e){var t=this.path;t.isBlockStatement()||t.isProgram()||(t=this.getBlockParent().path),t.isSwitchStatement()&&(t=this.getFunctionParent().path),(t.isLoop()||t.isCatchClause()||t.isFunction())&&(v.ensureBlock(t.node),t=t.get("body"));var r=e.unique,n=e.kind||"var",i=null==e._blockHoist?2:e._blockHoist,s="declaration:"+n+":"+i,a=!r&&t.getData(s);if(!a){var o=v.variableDeclaration(n,[]);o._generated=!0,o._blockHoist=i;a=t.unshiftContainer("body",[o])[0],r||t.setData(s,a)}var u=v.variableDeclarator(e.id,e.init);a.node.declarations.push(u),this.registerBinding(n,a.get("declarations").pop())},e.prototype.getProgramParent=function(){var e=this;do{if(e.path.isProgram())return e}while(e=e.parent);throw new Error("We couldn't find a Function or Program...")},e.prototype.getFunctionParent=function(){var e=this;do{if(e.path.isFunctionParent())return e}while(e=e.parent);throw new Error("We couldn't find a Function or Program...")},e.prototype.getBlockParent=function(){var e=this;do{if(e.path.isBlockParent())return e}while(e=e.parent);throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...")},e.prototype.getAllBindings=function(){var e=(0,o.default)(null),t=this;do{(0,m.default)(e,t.bindings),t=t.parent}while(t);return e},e.prototype.getAllBindingsOfKind=function(){for(var e=(0,o.default)(null),t=arguments,r=Array.isArray(t),n=0,t=r?t:(0,c.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i,a=this;do{for(var u in a.bindings){var l=a.bindings[u];l.kind===s&&(e[u]=l)}a=a.parent}while(a)}return e},e.prototype.bindingIdentifierEquals=function(e,t){return this.getBindingIdentifier(e)===t},e.prototype.warnOnFlowBinding=function(e){return 0===E&&e&&e.path.isFlow()&&console.warn("\n You or one of the Babel plugins you are using are using Flow declarations as bindings.\n Support for this will be removed in version 7. To find out the caller, grep for this\n message and change it to a `console.trace()`.\n "),e},e.prototype.getBinding=function(e){var t=this;do{var r=t.getOwnBinding(e);if(r)return this.warnOnFlowBinding(r)}while(t=t.parent)},e.prototype.getOwnBinding=function(e){return this.warnOnFlowBinding(this.bindings[e])},e.prototype.getBindingIdentifier=function(e){var t=this.getBinding(e);return t&&t.identifier},e.prototype.getOwnBindingIdentifier=function(e){var t=this.bindings[e];return t&&t.identifier},e.prototype.hasOwnBinding=function(e){return!!this.getOwnBinding(e)},e.prototype.hasBinding=function(t,r){return!!t&&(!!this.hasOwnBinding(t)||(!!this.parentHasBinding(t,r)||(!!this.hasUid(t)||(!(r||!(0,p.default)(e.globals,t))||!(r||!(0,p.default)(e.contextVariables,t))))))},e.prototype.parentHasBinding=function(e,t){return this.parent&&this.parent.hasBinding(e,t)},e.prototype.moveBindingTo=function(e,t){var r=this.getBinding(e);r&&(r.scope.removeOwnBinding(e),r.scope=t,t.bindings[e]=r)},e.prototype.removeOwnBinding=function(e){delete this.bindings[e]},e.prototype.removeBinding=function(e){var t=this.getBinding(e);t&&t.scope.removeOwnBinding(e);var r=this;do{r.uids[e]&&(r.uids[e]=!1)}while(r=r.parent)},e}();C.globals=(0,a.default)(b.default.builtin),C.contextVariables=["arguments","undefined","Infinity","NaN"],r.default=C,t.exports=r.default},{"../cache":140,"../index":143,"./binding":161,"./lib/renamer":163,"babel-messages":110,"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/map":122,"babel-runtime/core-js/object/create":125,"babel-runtime/core-js/object/keys":127,"babel-runtime/helpers/classCallCheck":134,"babel-types":178,globals:313,"lodash/defaults":495,"lodash/includes":507,"lodash/repeat":530}],163:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/helpers/classCallCheck")),s=(n(e("../binding")),function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"))),a={ReferencedIdentifier:function(e,t){var r=e.node;r.name===t.oldName&&(r.name=t.newName)},Scope:function(e,t){e.scope.bindingIdentifierEquals(t.oldName,t.binding.identifier)||e.skip()},"AssignmentExpression|Declaration":function(e,t){var r=e.getOuterBindingIdentifiers();for(var n in r)n===t.oldName&&(r[n].name=t.newName)}},o=function(){function e(t,r,n){(0,i.default)(this,e),this.newName=n,this.oldName=r,this.binding=t}return e.prototype.maybeConvertFromExportDeclaration=function(e){var t=e.parentPath.isExportDeclaration()&&e.parentPath;if(t){var r=t.isExportDefaultDeclaration();r&&(e.isFunctionDeclaration()||e.isClassDeclaration())&&!e.node.id&&(e.node.id=e.scope.generateUidIdentifier("default"));var n=e.getOuterBindingIdentifiers(),i=[];for(var a in n){var o=a===this.oldName?this.newName:a,u=r?"default":a;i.push(s.exportSpecifier(s.identifier(o),s.identifier(u)))}if(i.length){var l=s.exportNamedDeclaration(null,i);e.isFunctionDeclaration()&&(l._blockHoist=3),t.insertAfter(l),t.replaceWith(e.node)}}},e.prototype.rename=function(e){var t=this.binding,r=this.oldName,n=this.newName,i=t.scope,s=t.path.find(function(e){return e.isDeclaration()||e.isFunctionExpression()});s&&this.maybeConvertFromExportDeclaration(s),i.traverse(e||i.block,a,this),e||(i.removeOwnBinding(r),i.bindings[n]=t,this.binding.identifier.name=n),t.type},e}();r.default=o,t.exports=r.default},{"../binding":161,"babel-runtime/helpers/classCallCheck":134,"babel-types":178}],164:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){if(e._exploded)return e;e._exploded=!0;for(var t in e)if(!l(t)){var r=t.split("|");if(1!==r.length){var n=e[t];delete e[t];for(var i=r,s=Array.isArray(i),o=0,i=s?i:(0,f.default)(i);;){var p;if(s){if(o>=i.length)break;p=i[o++]}else{if((o=i.next()).done)break;p=o.value}e[p]=n}}}a(e),delete e.__esModule,function(e){for(var t in e)if(!l(t)){var r=e[t];"function"==typeof r&&(e[t]={enter:r})}}(e),u(e);for(var m=(0,h.default)(e),b=Array.isArray(m),v=0,m=b?m:(0,f.default)(m);;){var x;if(b){if(v>=m.length)break;x=m[v++]}else{if((v=m.next()).done)break;x=v.value}var E=x;if(!l(E)){var A=d[E];if(A){var D=e[E];for(var C in D)D[C]=function(e,t){var r=function(r){if(e.checkPath(r))return t.apply(this,arguments)};return r.toString=function(){return t.toString()},r}(A,D[C]);if(delete e[E],A.types)for(var S=A.types,_=Array.isArray(S),w=0,S=_?S:(0,f.default)(S);;){var k;if(_){if(w>=S.length)break;k=S[w++]}else{if((w=S.next()).done)break;k=w.value}var F=k;e[F]?c(e[F],D):e[F]=D}else c(e,D)}}}for(var T in e)if(!l(T)){var P=e[T],B=y.FLIPPED_ALIAS_KEYS[T],O=y.DEPRECATED_KEYS[T];if(O&&(console.trace("Visitor defined for "+T+" but it has been renamed to "+O),B=[O]),B){delete e[T];for(var j=B,N=Array.isArray(j),I=0,j=N?j:(0,f.default)(j);;){var L;if(N){if(I>=j.length)break;L=j[I++]}else{if((I=j.next()).done)break;L=I.value}var M=L,R=e[M];R?c(R,P):e[M]=(0,g.default)(P)}}}for(var V in e)l(V)||u(e[V]);return e}function a(e){if(!e._verified){if("function"==typeof e)throw new Error(m.get("traverseVerifyRootFunction"));for(var t in e)if("enter"!==t&&"exit"!==t||o(t,e[t]),!l(t)){if(y.TYPES.indexOf(t)<0)throw new Error(m.get("traverseVerifyNodeType",t));var r=e[t];if("object"===(void 0===r?"undefined":(0,p.default)(r)))for(var n in r){if("enter"!==n&&"exit"!==n)throw new Error(m.get("traverseVerifyVisitorProperty",t,n));o(t+"."+n,r[n])}}e._verified=!0}}function o(e,t){for(var r=[].concat(t),n=Array.isArray(r),i=0,r=n?r:(0,f.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}var a=s;if("function"!=typeof a)throw new TypeError("Non-function found defined in "+e+" with type "+(void 0===a?"undefined":(0,p.default)(a)))}}function u(e){e.enter&&!Array.isArray(e.enter)&&(e.enter=[e.enter]),e.exit&&!Array.isArray(e.exit)&&(e.exit=[e.exit])}function l(e){return"_"===e[0]||("enter"===e||"exit"===e||"shouldSkip"===e||("blacklist"===e||"noScope"===e||"skipKeys"===e))}function c(e,t){for(var r in t)e[r]=[].concat(e[r]||[],t[r])}r.__esModule=!0;var p=i(e("babel-runtime/helpers/typeof")),h=i(e("babel-runtime/core-js/object/keys")),f=i(e("babel-runtime/core-js/get-iterator"));r.explode=s,r.verify=a,r.merge=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments[2],n={},i=0;i<e.length;i++){var a=e[i],o=t[i];s(a);for(var u in a){var l=a[u];(o||r)&&(l=function(e,t,r){var n={},i=function(i){var s=e[i];if(!Array.isArray(s))return"continue";s=s.map(function(e){var n=e;return t&&(n=function(r){return e.call(t,r,t)}),r&&(n=r(t.key,i,n)),n}),n[i]=s};for(var s in e)i(s);return n}(l,o,r)),c(n[u]=n[u]||{},l)}}return n};var d=n(e("./path/lib/virtual-types")),m=n(e("babel-messages")),y=n(e("babel-types")),g=i(e("lodash/clone"))},{"./path/lib/virtual-types":157,"babel-messages":110,"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/object/keys":127,"babel-runtime/helpers/typeof":138,"babel-types":178,"lodash/clone":491}],165:[function(e,t,r){(function(n){function i(){var e;try{e=r.storage.debug}catch(e){}return!e&&void 0!==n&&"env"in n&&(e=n.env.DEBUG),e}(r=t.exports=e("./debug")).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},r.formatArgs=function(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+r.humanize(this.diff),t){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var i=0,s=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(s=i))}),e.splice(s,0,n)}},r.save=function(e){try{null==e?r.storage.removeItem("debug"):r.storage.debug=e}catch(e){}},r.load=i,r.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},r.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),r.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],r.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},r.enable(i())}).call(this,e("_process"))},{"./debug":166,_process:550}],166:[function(e,t,r){arguments[4][60][0].apply(r,arguments)},{dup:60,ms:543}],167:[function(e,t,r){"use strict";r.__esModule=!0,r.NOT_LOCAL_BINDING=r.BLOCK_SCOPED_SYMBOL=r.INHERIT_KEYS=r.UNARY_OPERATORS=r.STRING_UNARY_OPERATORS=r.NUMBER_UNARY_OPERATORS=r.BOOLEAN_UNARY_OPERATORS=r.BINARY_OPERATORS=r.NUMBER_BINARY_OPERATORS=r.BOOLEAN_BINARY_OPERATORS=r.COMPARISON_BINARY_OPERATORS=r.EQUALITY_BINARY_OPERATORS=r.BOOLEAN_NUMBER_BINARY_OPERATORS=r.UPDATE_OPERATORS=r.LOGICAL_OPERATORS=r.COMMENT_KEYS=r.FOR_INIT_KEYS=r.FLATTENABLE_KEYS=r.STATEMENT_OR_BLOCK_KEYS=void 0;var n=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/symbol/for")),i=(r.STATEMENT_OR_BLOCK_KEYS=["consequent","body","alternate"],r.FLATTENABLE_KEYS=["body","expressions"],r.FOR_INIT_KEYS=["left","init"],r.COMMENT_KEYS=["leadingComments","trailingComments","innerComments"],r.LOGICAL_OPERATORS=["||","&&"],r.UPDATE_OPERATORS=["++","--"],r.BOOLEAN_NUMBER_BINARY_OPERATORS=[">","<",">=","<="]),s=r.EQUALITY_BINARY_OPERATORS=["==","===","!=","!=="],a=r.COMPARISON_BINARY_OPERATORS=[].concat(s,["in","instanceof"]),o=r.BOOLEAN_BINARY_OPERATORS=[].concat(a,i),u=r.NUMBER_BINARY_OPERATORS=["-","/","%","*","**","&","|",">>",">>>","<<","^"],l=(r.BINARY_OPERATORS=["+"].concat(u,o),r.BOOLEAN_UNARY_OPERATORS=["delete","!"]),c=r.NUMBER_UNARY_OPERATORS=["+","-","++","--","~"],p=r.STRING_UNARY_OPERATORS=["typeof"];r.UNARY_OPERATORS=["void"].concat(l,c,p),r.INHERIT_KEYS={optional:["typeAnnotation","typeParameters","returnType"],force:["start","loc","end"]},r.BLOCK_SCOPED_SYMBOL=(0,n.default)("var used to be block scoped"),r.NOT_LOCAL_BINDING=(0,n.default)("should not be considered a local binding")},{"babel-runtime/core-js/symbol/for":130}],168:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t,r){for(var n=[],s=!0,a=e,o=Array.isArray(a),u=0,a=o?a:(0,l.default)(a);;){var c;if(o){if(u>=a.length)break;c=a[u++]}else{if((u=a.next()).done)break;c=u.value}var p=c;if(s=!1,h.isExpression(p))n.push(p);else if(h.isExpressionStatement(p))n.push(p.expression);else if(h.isVariableDeclaration(p)){if("var"!==p.kind)return;for(var f=p.declarations,d=Array.isArray(f),m=0,f=d?f:(0,l.default)(f);;){var y;if(d){if(m>=f.length)break;y=f[m++]}else{if((m=f.next()).done)break;y=m.value}var g=y,b=h.getBindingIdentifiers(g);for(var v in b)r.push({kind:p.kind,id:b[v]});g.init&&n.push(h.assignmentExpression("=",g.id,g.init))}s=!0}else if(h.isIfStatement(p)){var x=p.consequent?i([p.consequent],t,r):t.buildUndefinedNode(),E=p.alternate?i([p.alternate],t,r):t.buildUndefinedNode();if(!x||!E)return;n.push(h.conditionalExpression(p.test,x,E))}else if(h.isBlockStatement(p)){var A=i(p.body,t,r);if(!A)return;n.push(A)}else{if(!h.isEmptyStatement(p))return;s=!0}}return s&&n.push(t.buildUndefinedNode()),1===n.length?n[0]:h.sequenceExpression(n)}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.key,r=void 0;return"method"===e.kind?s.increment()+"":(r=h.isIdentifier(t)?t.name:h.isStringLiteral(t)?(0,u.default)(t.value):(0,u.default)(h.removePropertiesDeep(h.cloneDeep(t))),e.computed&&(r="["+r+"]"),e.static&&(r="static:"+r),r)}function a(e){return e+="",e=e.replace(/[^a-zA-Z0-9$_]/g,"-"),e=e.replace(/^[-0-9]+/,""),e=e.replace(/[-\s]+(.)?/g,function(e,t){return t?t.toUpperCase():""}),h.isValidIdentifier(e)||(e="_"+e),e||"_"}r.__esModule=!0;var o=n(e("babel-runtime/core-js/number/max-safe-integer")),u=n(e("babel-runtime/core-js/json/stringify")),l=n(e("babel-runtime/core-js/get-iterator"));r.toComputedKey=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.key||e.property;return e.computed||h.isIdentifier(t)&&(t=h.stringLiteral(t.name)),t},r.toSequenceExpression=function(e,t){if(e&&e.length){var r=[],n=i(e,t,r);if(n){for(var s=r,a=Array.isArray(s),o=0,s=a?s:(0,l.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if((o=s.next()).done)break;u=o.value}var c=u;t.push(c)}return n}}},r.toKeyAlias=s,r.toIdentifier=a,r.toBindingIdentifierName=function(e){return"eval"!==(e=a(e))&&"arguments"!==e||(e="_"+e),e},r.toStatement=function(e,t){if(h.isStatement(e))return e;var r=!1,n=void 0;if(h.isClass(e))r=!0,n="ClassDeclaration";else if(h.isFunction(e))r=!0,n="FunctionDeclaration";else if(h.isAssignmentExpression(e))return h.expressionStatement(e);if(r&&!e.id&&(n=!1),!n){if(t)return!1;throw new Error("cannot turn "+e.type+" to a statement")}return e.type=n,e},r.toExpression=function(e){if(h.isExpressionStatement(e)&&(e=e.expression),h.isExpression(e))return e;if(h.isClass(e)?e.type="ClassExpression":h.isFunction(e)&&(e.type="FunctionExpression"),!h.isExpression(e))throw new Error("cannot turn "+e.type+" to an expression");return e},r.toBlock=function(e,t){return h.isBlockStatement(e)?e:(h.isEmptyStatement(e)&&(e=[]),Array.isArray(e)||(h.isStatement(e)||(e=h.isFunction(t)?h.returnStatement(e):h.expressionStatement(e)),e=[e]),h.blockStatement(e))},r.valueToNode=function(e){if(void 0===e)return h.identifier("undefined");if(!0===e||!1===e)return h.booleanLiteral(e);if(null===e)return h.nullLiteral();if("string"==typeof e)return h.stringLiteral(e);if("number"==typeof e)return h.numericLiteral(e);if((0,p.default)(e)){var t=e.source,r=e.toString().match(/\/([a-z]+|)$/)[1];return h.regExpLiteral(t,r)}if(Array.isArray(e))return h.arrayExpression(e.map(h.valueToNode));if((0,c.default)(e)){var n=[];for(var i in e){var s=void 0;s=h.isValidIdentifier(i)?h.identifier(i):h.stringLiteral(i),n.push(h.objectProperty(s,h.valueToNode(e[i])))}return h.objectExpression(n)}throw new Error("don't know how to turn this value into a node")};var c=n(e("lodash/isPlainObject")),p=n(e("lodash/isRegExp")),h=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("./index"));s.uid=0,s.increment=function(){return s.uid>=o.default?s.uid=0:s.uid++}},{"./index":178,"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/json/stringify":121,"babel-runtime/core-js/number/max-safe-integer":123,"lodash/isPlainObject":518,"lodash/isRegExp":519}],169:[function(e,t,r){"use strict";var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("../index")),i=e("../constants"),s=e("./index"),a=function(e){return e&&e.__esModule?e:{default:e}}(s);(0,a.default)("ArrayExpression",{fields:{elements:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeOrValueType)("null","Expression","SpreadElement"))),default:[]}},visitor:["elements"],aliases:["Expression"]}),(0,a.default)("AssignmentExpression",{fields:{operator:{validate:(0,s.assertValueType)("string")},left:{validate:(0,s.assertNodeType)("LVal")},right:{validate:(0,s.assertNodeType)("Expression")}},builder:["operator","left","right"],visitor:["left","right"],aliases:["Expression"]}),(0,a.default)("BinaryExpression",{builder:["operator","left","right"],fields:{operator:{validate:s.assertOneOf.apply(void 0,i.BINARY_OPERATORS)},left:{validate:(0,s.assertNodeType)("Expression")},right:{validate:(0,s.assertNodeType)("Expression")}},visitor:["left","right"],aliases:["Binary","Expression"]}),(0,a.default)("Directive",{visitor:["value"],fields:{value:{validate:(0,s.assertNodeType)("DirectiveLiteral")}}}),(0,a.default)("DirectiveLiteral",{builder:["value"],fields:{value:{validate:(0,s.assertValueType)("string")}}}),(0,a.default)("BlockStatement",{builder:["body","directives"],visitor:["directives","body"],fields:{directives:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Directive"))),default:[]},body:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent","Block","Statement"]}),(0,a.default)("BreakStatement",{visitor:["label"],fields:{label:{validate:(0,s.assertNodeType)("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]}),(0,a.default)("CallExpression",{visitor:["callee","arguments"],fields:{callee:{validate:(0,s.assertNodeType)("Expression")},arguments:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Expression","SpreadElement")))}},aliases:["Expression"]}),(0,a.default)("CatchClause",{visitor:["param","body"],fields:{param:{validate:(0,s.assertNodeType)("Identifier")},body:{validate:(0,s.assertNodeType)("BlockStatement")}},aliases:["Scopable"]}),(0,a.default)("ConditionalExpression",{visitor:["test","consequent","alternate"],fields:{test:{validate:(0,s.assertNodeType)("Expression")},consequent:{validate:(0,s.assertNodeType)("Expression")},alternate:{validate:(0,s.assertNodeType)("Expression")}},aliases:["Expression","Conditional"]}),(0,a.default)("ContinueStatement",{visitor:["label"],fields:{label:{validate:(0,s.assertNodeType)("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]}),(0,a.default)("DebuggerStatement",{aliases:["Statement"]}),(0,a.default)("DoWhileStatement",{visitor:["test","body"],fields:{test:{validate:(0,s.assertNodeType)("Expression")},body:{validate:(0,s.assertNodeType)("Statement")}},aliases:["Statement","BlockParent","Loop","While","Scopable"]}),(0,a.default)("EmptyStatement",{aliases:["Statement"]}),(0,a.default)("ExpressionStatement",{visitor:["expression"],fields:{expression:{validate:(0,s.assertNodeType)("Expression")}},aliases:["Statement","ExpressionWrapper"]}),(0,a.default)("File",{builder:["program","comments","tokens"],visitor:["program"],fields:{program:{validate:(0,s.assertNodeType)("Program")}}}),(0,a.default)("ForInStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:(0,s.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,s.assertNodeType)("Expression")},body:{validate:(0,s.assertNodeType)("Statement")}}}),(0,a.default)("ForStatement",{visitor:["init","test","update","body"],aliases:["Scopable","Statement","For","BlockParent","Loop"],fields:{init:{validate:(0,s.assertNodeType)("VariableDeclaration","Expression"),optional:!0},test:{validate:(0,s.assertNodeType)("Expression"),optional:!0},update:{validate:(0,s.assertNodeType)("Expression"),optional:!0},body:{validate:(0,s.assertNodeType)("Statement")}}}),(0,a.default)("FunctionDeclaration",{builder:["id","params","body","generator","async"],visitor:["id","params","body","returnType","typeParameters"],fields:{id:{validate:(0,s.assertNodeType)("Identifier")},params:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("LVal")))},body:{validate:(0,s.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,s.assertValueType)("boolean")},async:{default:!1,validate:(0,s.assertValueType)("boolean")}},aliases:["Scopable","Function","BlockParent","FunctionParent","Statement","Pureish","Declaration"]}),(0,a.default)("FunctionExpression",{inherits:"FunctionDeclaration",aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{id:{validate:(0,s.assertNodeType)("Identifier"),optional:!0},params:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("LVal")))},body:{validate:(0,s.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,s.assertValueType)("boolean")},async:{default:!1,validate:(0,s.assertValueType)("boolean")}}}),(0,a.default)("Identifier",{builder:["name"],visitor:["typeAnnotation"],aliases:["Expression","LVal"],fields:{name:{validate:function(e,t,r){n.isValidIdentifier(r)}},decorators:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Decorator")))}}}),(0,a.default)("IfStatement",{visitor:["test","consequent","alternate"],aliases:["Statement","Conditional"],fields:{test:{validate:(0,s.assertNodeType)("Expression")},consequent:{validate:(0,s.assertNodeType)("Statement")},alternate:{optional:!0,validate:(0,s.assertNodeType)("Statement")}}}),(0,a.default)("LabeledStatement",{visitor:["label","body"],aliases:["Statement"],fields:{label:{validate:(0,s.assertNodeType)("Identifier")},body:{validate:(0,s.assertNodeType)("Statement")}}}),(0,a.default)("StringLiteral",{builder:["value"],fields:{value:{validate:(0,s.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,a.default)("NumericLiteral",{builder:["value"],deprecatedAlias:"NumberLiteral",fields:{value:{validate:(0,s.assertValueType)("number")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,a.default)("NullLiteral",{aliases:["Expression","Pureish","Literal","Immutable"]}),(0,a.default)("BooleanLiteral",{builder:["value"],fields:{value:{validate:(0,s.assertValueType)("boolean")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,a.default)("RegExpLiteral",{builder:["pattern","flags"],deprecatedAlias:"RegexLiteral",aliases:["Expression","Literal"],fields:{pattern:{validate:(0,s.assertValueType)("string")},flags:{validate:(0,s.assertValueType)("string"),default:""}}}),(0,a.default)("LogicalExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"],fields:{operator:{validate:s.assertOneOf.apply(void 0,i.LOGICAL_OPERATORS)},left:{validate:(0,s.assertNodeType)("Expression")},right:{validate:(0,s.assertNodeType)("Expression")}}}),(0,a.default)("MemberExpression",{builder:["object","property","computed"],visitor:["object","property"],aliases:["Expression","LVal"],fields:{object:{validate:(0,s.assertNodeType)("Expression")},property:{validate:function(e,t,r){var n=e.computed?"Expression":"Identifier";(0,s.assertNodeType)(n)(e,t,r)}},computed:{default:!1}}}),(0,a.default)("NewExpression",{visitor:["callee","arguments"],aliases:["Expression"],fields:{callee:{validate:(0,s.assertNodeType)("Expression")},arguments:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Expression","SpreadElement")))}}}),(0,a.default)("Program",{visitor:["directives","body"],builder:["body","directives"],fields:{directives:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Directive"))),default:[]},body:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent","Block","FunctionParent"]}),(0,a.default)("ObjectExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("ObjectMethod","ObjectProperty","SpreadProperty")))}}}),(0,a.default)("ObjectMethod",{builder:["kind","key","params","body","computed"],fields:{kind:{validate:(0,s.chain)((0,s.assertValueType)("string"),(0,s.assertOneOf)("method","get","set")),default:"method"},computed:{validate:(0,s.assertValueType)("boolean"),default:!1},key:{validate:function(e,t,r){var n=e.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];s.assertNodeType.apply(void 0,n)(e,t,r)}},decorators:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Decorator")))},body:{validate:(0,s.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,s.assertValueType)("boolean")},async:{default:!1,validate:(0,s.assertValueType)("boolean")}},visitor:["key","params","body","decorators","returnType","typeParameters"],aliases:["UserWhitespacable","Function","Scopable","BlockParent","FunctionParent","Method","ObjectMember"]}),(0,a.default)("ObjectProperty",{builder:["key","value","computed","shorthand","decorators"],fields:{computed:{validate:(0,s.assertValueType)("boolean"),default:!1},key:{validate:function(e,t,r){var n=e.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];s.assertNodeType.apply(void 0,n)(e,t,r)}},value:{validate:(0,s.assertNodeType)("Expression","Pattern","RestElement")},shorthand:{validate:(0,s.assertValueType)("boolean"),default:!1},decorators:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Decorator"))),optional:!0}},visitor:["key","value","decorators"],aliases:["UserWhitespacable","Property","ObjectMember"]}),(0,a.default)("RestElement",{visitor:["argument","typeAnnotation"],aliases:["LVal"],fields:{argument:{validate:(0,s.assertNodeType)("LVal")},decorators:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Decorator")))}}}),(0,a.default)("ReturnStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,s.assertNodeType)("Expression"),optional:!0}}}),(0,a.default)("SequenceExpression",{visitor:["expressions"],fields:{expressions:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Expression")))}},aliases:["Expression"]}),(0,a.default)("SwitchCase",{visitor:["test","consequent"],fields:{test:{validate:(0,s.assertNodeType)("Expression"),optional:!0},consequent:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Statement")))}}}),(0,a.default)("SwitchStatement",{visitor:["discriminant","cases"],aliases:["Statement","BlockParent","Scopable"],fields:{discriminant:{validate:(0,s.assertNodeType)("Expression")},cases:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("SwitchCase")))}}}),(0,a.default)("ThisExpression",{aliases:["Expression"]}),(0,a.default)("ThrowStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,s.assertNodeType)("Expression")}}}),(0,a.default)("TryStatement",{visitor:["block","handler","finalizer"],aliases:["Statement"],fields:{body:{validate:(0,s.assertNodeType)("BlockStatement")},handler:{optional:!0,handler:(0,s.assertNodeType)("BlockStatement")},finalizer:{optional:!0,validate:(0,s.assertNodeType)("BlockStatement")}}}),(0,a.default)("UnaryExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!0},argument:{validate:(0,s.assertNodeType)("Expression")},operator:{validate:s.assertOneOf.apply(void 0,i.UNARY_OPERATORS)}},visitor:["argument"],aliases:["UnaryLike","Expression"]}),(0,a.default)("UpdateExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!1},argument:{validate:(0,s.assertNodeType)("Expression")},operator:{validate:s.assertOneOf.apply(void 0,i.UPDATE_OPERATORS)}},visitor:["argument"],aliases:["Expression"]}),(0,a.default)("VariableDeclaration",{builder:["kind","declarations"],visitor:["declarations"],aliases:["Statement","Declaration"],fields:{kind:{validate:(0,s.chain)((0,s.assertValueType)("string"),(0,s.assertOneOf)("var","let","const"))},declarations:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("VariableDeclarator")))}}}),(0,a.default)("VariableDeclarator",{visitor:["id","init"],fields:{id:{validate:(0,s.assertNodeType)("LVal")},init:{optional:!0,validate:(0,s.assertNodeType)("Expression")}}}),(0,a.default)("WhileStatement",{visitor:["test","body"],aliases:["Statement","BlockParent","Loop","While","Scopable"],fields:{test:{validate:(0,s.assertNodeType)("Expression")},body:{validate:(0,s.assertNodeType)("BlockStatement","Statement")}}}),(0,a.default)("WithStatement",{visitor:["object","body"],aliases:["Statement"],fields:{object:{object:(0,s.assertNodeType)("Expression")},body:{validate:(0,s.assertNodeType)("BlockStatement","Statement")}}})},{"../constants":167,"../index":178,"./index":173}],170:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("AssignmentPattern",{visitor:["left","right"],aliases:["Pattern","LVal"],fields:{left:{validate:(0,n.assertNodeType)("Identifier")},right:{validate:(0,n.assertNodeType)("Expression")},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("ArrayPattern",{visitor:["elements","typeAnnotation"],aliases:["Pattern","LVal"],fields:{elements:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Identifier","Pattern","RestElement")))},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("ArrowFunctionExpression",{builder:["params","body","async"],visitor:["params","body","returnType","typeParameters"],aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{params:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("LVal")))},body:{validate:(0,n.assertNodeType)("BlockStatement","Expression")},async:{validate:(0,n.assertValueType)("boolean"),default:!1}}}),(0,i.default)("ClassBody",{visitor:["body"],fields:{body:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("ClassMethod","ClassProperty")))}}}),(0,i.default)("ClassDeclaration",{builder:["id","superClass","body","decorators"],visitor:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators"],aliases:["Scopable","Class","Statement","Declaration","Pureish"],fields:{id:{validate:(0,n.assertNodeType)("Identifier")},body:{validate:(0,n.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,n.assertNodeType)("Expression")},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("ClassExpression",{inherits:"ClassDeclaration",aliases:["Scopable","Class","Expression","Pureish"],fields:{id:{optional:!0,validate:(0,n.assertNodeType)("Identifier")},body:{validate:(0,n.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,n.assertNodeType)("Expression")},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("ExportAllDeclaration",{visitor:["source"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{source:{validate:(0,n.assertNodeType)("StringLiteral")}}}),(0,i.default)("ExportDefaultDeclaration",{visitor:["declaration"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{declaration:{validate:(0,n.assertNodeType)("FunctionDeclaration","ClassDeclaration","Expression")}}}),(0,i.default)("ExportNamedDeclaration",{visitor:["declaration","specifiers","source"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{declaration:{validate:(0,n.assertNodeType)("Declaration"),optional:!0},specifiers:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("ExportSpecifier")))},source:{validate:(0,n.assertNodeType)("StringLiteral"),optional:!0}}}),(0,i.default)("ExportSpecifier",{visitor:["local","exported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,n.assertNodeType)("Identifier")},exported:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("ForOfStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:(0,n.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,n.assertNodeType)("Expression")},body:{validate:(0,n.assertNodeType)("Statement")}}}),(0,i.default)("ImportDeclaration",{visitor:["specifiers","source"],aliases:["Statement","Declaration","ModuleDeclaration"],fields:{specifiers:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier")))},source:{validate:(0,n.assertNodeType)("StringLiteral")}}}),(0,i.default)("ImportDefaultSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("ImportNamespaceSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("ImportSpecifier",{visitor:["local","imported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,n.assertNodeType)("Identifier")},imported:{validate:(0,n.assertNodeType)("Identifier")},importKind:{validate:(0,n.assertOneOf)(null,"type","typeof")}}}),(0,i.default)("MetaProperty",{visitor:["meta","property"],aliases:["Expression"],fields:{meta:{validate:(0,n.assertValueType)("string")},property:{validate:(0,n.assertValueType)("string")}}}),(0,i.default)("ClassMethod",{aliases:["Function","Scopable","BlockParent","FunctionParent","Method"],builder:["kind","key","params","body","computed","static"],visitor:["key","params","body","decorators","returnType","typeParameters"],fields:{kind:{validate:(0,n.chain)((0,n.assertValueType)("string"),(0,n.assertOneOf)("get","set","method","constructor")),default:"method"},computed:{default:!1,validate:(0,n.assertValueType)("boolean")},static:{default:!1,validate:(0,n.assertValueType)("boolean")},key:{validate:function(e,t,r){var i=e.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];n.assertNodeType.apply(void 0,i)(e,t,r)}},params:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("LVal")))},body:{validate:(0,n.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,n.assertValueType)("boolean")},async:{default:!1,validate:(0,n.assertValueType)("boolean")}}}),(0,i.default)("ObjectPattern",{visitor:["properties","typeAnnotation"],aliases:["Pattern","LVal"],fields:{properties:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("RestProperty","Property")))},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("SpreadElement",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("Super",{aliases:["Expression"]}),(0,i.default)("TaggedTemplateExpression",{visitor:["tag","quasi"],aliases:["Expression"],fields:{tag:{validate:(0,n.assertNodeType)("Expression")},quasi:{validate:(0,n.assertNodeType)("TemplateLiteral")}}}),(0,i.default)("TemplateElement",{builder:["value","tail"],fields:{value:{},tail:{validate:(0,n.assertValueType)("boolean"),default:!1}}}),(0,i.default)("TemplateLiteral",{visitor:["quasis","expressions"],aliases:["Expression","Literal"],fields:{quasis:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("TemplateElement")))},expressions:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Expression")))}}}),(0,i.default)("YieldExpression",{builder:["argument","delegate"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{delegate:{validate:(0,n.assertValueType)("boolean"),default:!1},argument:{optional:!0,validate:(0,n.assertNodeType)("Expression")}}})},{"./index":173}],171:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("ForAwaitStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:(0,n.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,n.assertNodeType)("Expression")},body:{validate:(0,n.assertNodeType)("Statement")}}}),(0,i.default)("BindExpression",{visitor:["object","callee"],aliases:["Expression"],fields:{}}),(0,i.default)("Import",{aliases:["Expression"]}),(0,i.default)("Decorator",{visitor:["expression"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("DoExpression",{visitor:["body"],aliases:["Expression"],fields:{body:{validate:(0,n.assertNodeType)("BlockStatement")}}}),(0,i.default)("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("RestProperty",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,n.assertNodeType)("LVal")}}}),(0,i.default)("SpreadProperty",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}})},{"./index":173}],172:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("AnyTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["Flow"],fields:{}}),(0,i.default)("BooleanTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("BooleanLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,i.default)("NullLiteralTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("ClassImplements",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,i.default)("ClassProperty",{visitor:["key","value","typeAnnotation","decorators"],builder:["key","value","typeAnnotation","decorators","computed"],aliases:["Property"],fields:{computed:{validate:(0,n.assertValueType)("boolean"),default:!1}}}),(0,i.default)("DeclareClass",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareFunction",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareInterface",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareModule",{visitor:["id","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareModuleExports",{visitor:["typeAnnotation"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareOpaqueType",{visitor:["id","typeParameters","supertype"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareVariable",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareExportDeclaration",{visitor:["declaration","specifiers","source"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("ExistentialTypeParam",{aliases:["Flow"]}),(0,i.default)("FunctionTypeAnnotation",{visitor:["typeParameters","params","rest","returnType"],aliases:["Flow"],fields:{}}),(0,i.default)("FunctionTypeParam",{visitor:["name","typeAnnotation"],aliases:["Flow"],fields:{}}),(0,i.default)("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,i.default)("InterfaceExtends",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,i.default)("InterfaceDeclaration",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("IntersectionTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),(0,i.default)("MixedTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"]}),(0,i.default)("EmptyTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"]}),(0,i.default)("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow"],fields:{}}),(0,i.default)("NumericLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,i.default)("NumberTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("StringLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,i.default)("StringTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("ThisTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("TupleTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeofTypeAnnotation",{visitor:["argument"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("OpaqueType",{visitor:["id","typeParameters","impltype","supertype"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("TypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["Flow","ExpressionWrapper","Expression"],fields:{}}),(0,i.default)("TypeParameter",{visitor:["bound"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeParameterDeclaration",{visitor:["params"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeParameterInstantiation",{visitor:["params"],aliases:["Flow"],fields:{}}),(0,i.default)("ObjectTypeAnnotation",{visitor:["properties","indexers","callProperties"],aliases:["Flow"],fields:{}}),(0,i.default)("ObjectTypeCallProperty",{visitor:["value"],aliases:["Flow","UserWhitespacable"],fields:{}}),(0,i.default)("ObjectTypeIndexer",{visitor:["id","key","value"],aliases:["Flow","UserWhitespacable"],fields:{}}),(0,i.default)("ObjectTypeProperty",{visitor:["key","value"],aliases:["Flow","UserWhitespacable"],fields:{}}),(0,i.default)("ObjectTypeSpreadProperty",{visitor:["argument"],aliases:["Flow","UserWhitespacable"],fields:{}}),(0,i.default)("QualifiedTypeIdentifier",{visitor:["id","qualification"],aliases:["Flow"],fields:{}}),(0,i.default)("UnionTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),(0,i.default)("VoidTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}})},{"./index":173}],173:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){return Array.isArray(e)?"array":null===e?"null":void 0===e?"undefined":void 0===e?"undefined":(0,u.default)(e)}function s(e){function t(t,r,n){if(!(i(n)===e))throw new TypeError("Property "+r+" expected type of "+e+" but got "+i(n))}return t.type=e,t}r.__esModule=!0,r.DEPRECATED_KEYS=r.BUILDER_KEYS=r.NODE_FIELDS=r.ALIAS_KEYS=r.VISITOR_KEYS=void 0;var a=n(e("babel-runtime/core-js/get-iterator")),o=n(e("babel-runtime/core-js/json/stringify")),u=n(e("babel-runtime/helpers/typeof"));r.assertEach=function(e){function t(t,r,n){if(Array.isArray(n))for(var i=0;i<n.length;i++)e(t,r+"["+i+"]",n[i])}return t.each=e,t},r.assertOneOf=function(){function e(e,t,n){if(r.indexOf(n)<0)throw new TypeError("Property "+t+" expected value to be one of "+(0,o.default)(r)+" but got "+(0,o.default)(n))}for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.oneOf=r,e},r.assertNodeType=function(){function e(e,t,n){for(var i=!1,s=r,u=Array.isArray(s),c=0,s=u?s:(0,a.default)(s);;){var p;if(u){if(c>=s.length)break;p=s[c++]}else{if((c=s.next()).done)break;p=c.value}var h=p;if(l.is(h,n)){i=!0;break}}if(!i)throw new TypeError("Property "+t+" of "+e.type+" expected node to be of a type "+(0,o.default)(r)+" but instead got "+(0,o.default)(n&&n.type))}for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.oneOfNodeTypes=r,e},r.assertNodeOrValueType=function(){function e(e,t,n){for(var s=!1,u=r,c=Array.isArray(u),p=0,u=c?u:(0,a.default)(u);;){var h;if(c){if(p>=u.length)break;h=u[p++]}else{if((p=u.next()).done)break;h=p.value}var f=h;if(i(n)===f||l.is(f,n)){s=!0;break}}if(!s)throw new TypeError("Property "+t+" of "+e.type+" expected node to be of a type "+(0,o.default)(r)+" but instead got "+(0,o.default)(n&&n.type))}for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.oneOfNodeOrValueTypes=r,e},r.assertValueType=s,r.chain=function(){function e(){for(var e=r,t=Array.isArray(e),n=0,e=t?e:(0,a.default)(e);;){var i;if(t){if(n>=e.length)break;i=e[n++]}else{if((n=e.next()).done)break;i=n.value}i.apply(void 0,arguments)}}for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.chainOf=r,e},r.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.inherits&&m[t.inherits]||{};t.fields=t.fields||r.fields||{},t.visitor=t.visitor||r.visitor||[],t.aliases=t.aliases||r.aliases||[],t.builder=t.builder||r.builder||t.visitor||[],t.deprecatedAlias&&(d[t.deprecatedAlias]=e);for(var n=t.visitor.concat(t.builder),o=Array.isArray(n),u=0,n=o?n:(0,a.default)(n);;){var l;if(o){if(u>=n.length)break;l=n[u++]}else{if((u=n.next()).done)break;l=u.value}var y=l;t.fields[y]=t.fields[y]||{}}for(var g in t.fields){var b=t.fields[g];-1===t.builder.indexOf(g)&&(b.optional=!0),void 0===b.default?b.default=null:b.validate||(b.validate=s(i(b.default)))}c[e]=t.visitor,f[e]=t.builder,h[e]=t.fields,p[e]=t.aliases,m[e]=t};var l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("../index")),c=r.VISITOR_KEYS={},p=r.ALIAS_KEYS={},h=r.NODE_FIELDS={},f=r.BUILDER_KEYS={},d=r.DEPRECATED_KEYS={},m={}},{"../index":178,"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/json/stringify":121,"babel-runtime/helpers/typeof":138}],174:[function(e,t,r){"use strict";e("./index"),e("./core"),e("./es2015"),e("./flow"),e("./jsx"),e("./misc"),e("./experimental")},{"./core":169,"./es2015":170,"./experimental":171,"./flow":172,"./index":173,"./jsx":175,"./misc":176}],175:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("JSXAttribute",{visitor:["name","value"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,n.assertNodeType)("JSXIdentifier","JSXNamespacedName")},value:{optional:!0,validate:(0,n.assertNodeType)("JSXElement","StringLiteral","JSXExpressionContainer")}}}),(0,i.default)("JSXClosingElement",{visitor:["name"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,n.assertNodeType)("JSXIdentifier","JSXMemberExpression")}}}),(0,i.default)("JSXElement",{builder:["openingElement","closingElement","children","selfClosing"],visitor:["openingElement","children","closingElement"],aliases:["JSX","Immutable","Expression"],fields:{openingElement:{validate:(0,n.assertNodeType)("JSXOpeningElement")},closingElement:{optional:!0,validate:(0,n.assertNodeType)("JSXClosingElement")},children:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement")))}}}),(0,i.default)("JSXEmptyExpression",{aliases:["JSX","Expression"]}),(0,i.default)("JSXExpressionContainer",{visitor:["expression"],aliases:["JSX","Immutable"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("JSXSpreadChild",{visitor:["expression"],aliases:["JSX","Immutable"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("JSXIdentifier",{builder:["name"],aliases:["JSX","Expression"],fields:{name:{validate:(0,n.assertValueType)("string")}}}),(0,i.default)("JSXMemberExpression",{visitor:["object","property"],aliases:["JSX","Expression"],fields:{object:{validate:(0,n.assertNodeType)("JSXMemberExpression","JSXIdentifier")},property:{validate:(0,n.assertNodeType)("JSXIdentifier")}}}),(0,i.default)("JSXNamespacedName",{visitor:["namespace","name"],aliases:["JSX"],fields:{namespace:{validate:(0,n.assertNodeType)("JSXIdentifier")},name:{validate:(0,n.assertNodeType)("JSXIdentifier")}}}),(0,i.default)("JSXOpeningElement",{builder:["name","attributes","selfClosing"],visitor:["name","attributes"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,n.assertNodeType)("JSXIdentifier","JSXMemberExpression")},selfClosing:{default:!1,validate:(0,n.assertValueType)("boolean")},attributes:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("JSXAttribute","JSXSpreadAttribute")))}}}),(0,i.default)("JSXSpreadAttribute",{visitor:["argument"],aliases:["JSX"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("JSXText",{aliases:["JSX","Immutable"],builder:["value"],fields:{value:{validate:(0,n.assertValueType)("string")}}})},{"./index":173}],176:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("Noop",{visitor:[]}),(0,i.default)("ParenthesizedExpression",{visitor:["expression"],aliases:["Expression","ExpressionWrapper"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}})},{"./index":173}],177:[function(e,t,r){"use strict";function n(e){for(var t={},r={},s=[],a=[],o=0;o<e.length;o++){var u=e[o];if(u&&!(a.indexOf(u)>=0)){if(i.isAnyTypeAnnotation(u))return[u];if(i.isFlowBaseAnnotation(u))r[u.type]=u;else if(i.isUnionTypeAnnotation(u))s.indexOf(u.types)<0&&(e=e.concat(u.types),s.push(u.types));else if(i.isGenericTypeAnnotation(u)){var l=u.id.name;if(t[l]){var c=t[l];c.typeParameters?u.typeParameters&&(c.typeParameters.params=n(c.typeParameters.params.concat(u.typeParameters.params))):c=u.typeParameters}else t[l]=u}else a.push(u)}}for(var p in r)a.push(r[p]);for(var h in t)a.push(t[h]);return a}r.__esModule=!0,r.createUnionTypeAnnotation=function(e){var t=n(e);return 1===t.length?t[0]:i.unionTypeAnnotation(t)},r.removeTypeDuplicates=n,r.createTypeAnnotationBasedOnTypeof=function(e){if("string"===e)return i.stringTypeAnnotation();if("number"===e)return i.numberTypeAnnotation();if("undefined"===e)return i.voidTypeAnnotation();if("boolean"===e)return i.booleanTypeAnnotation();if("function"===e)return i.genericTypeAnnotation(i.identifier("Function"));if("object"===e)return i.genericTypeAnnotation(i.identifier("Object"));if("symbol"===e)return i.genericTypeAnnotation(i.identifier("Symbol"));throw new Error("Invalid typeof value")};var i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("./index"))},{"./index":178}],178:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=F["is"+e];t||(t=F["is"+e]=function(t,r){return F.is(e,t,r)}),F["assert"+e]=function(r,n){if(n=n||{},!t(r,n))throw new Error("Expected type "+(0,b.default)(e)+" with option "+(0,b.default)(n))}}function s(e,t){if(e===t)return!0;if(F.ALIAS_KEYS[t])return!1;var r=F.FLIPPED_ALIAS_KEYS[t];if(r){if(r[0]===e)return!0;for(var n=r,i=Array.isArray(n),s=0,n=i?n:(0,y.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}if(e===a)return!0}}return!1}function a(e,t,r){if(e){var n=F.NODE_FIELDS[e.type];if(n){var i=n[t];i&&i.validate&&(i.optional&&null==r||i.validate(e,t,r))}}}function o(e){if(!e)return e;var t={};for(var r in e)"_"!==r[0]&&(t[r]=e[r]);return t}function u(e,t){p("trailingComments",e,t)}function l(e,t){p("leadingComments",e,t)}function c(e,t){p("innerComments",e,t)}function p(e,t,r){t&&r&&(t[e]=(0,_.default)([].concat(t[e],r[e]).filter(Boolean)))}function h(e){return!(!e||!w.VISITOR_KEYS[e.type])}function f(e,t,r){if(e){var n=F.VISITOR_KEYS[e.type];if(n){t(e,r=r||{});for(var i=n,s=Array.isArray(i),a=0,i=s?i:(0,y.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if((a=i.next()).done)break;o=a.value}var u=e[o];if(Array.isArray(u))for(var l=u,c=Array.isArray(l),p=0,l=c?l:(0,y.default)(l);;){var h;if(c){if(p>=l.length)break;h=l[p++]}else{if((p=l.next()).done)break;h=p.value}f(h,t,r)}else f(u,t,r)}}}}function d(e,t){for(var r=(t=t||{}).preserveComments?O:j,n=Array.isArray(r),i=0,r=n?r:(0,y.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}var a=s;null!=e[a]&&(e[a]=void 0)}for(var o in e)"_"===o[0]&&null!=e[o]&&(e[o]=void 0);for(var u=(0,m.default)(e),l=Array.isArray(u),c=0,u=l?u:(0,y.default)(u);;){var p;if(l){if(c>=u.length)break;p=u[c++]}else{if((c=u.next()).done)break;p=c.value}e[p]=null}}r.__esModule=!0,r.createTypeAnnotationBasedOnTypeof=r.removeTypeDuplicates=r.createUnionTypeAnnotation=r.valueToNode=r.toBlock=r.toExpression=r.toStatement=r.toBindingIdentifierName=r.toIdentifier=r.toKeyAlias=r.toSequenceExpression=r.toComputedKey=r.isNodesEquivalent=r.isImmutable=r.isScope=r.isSpecifierDefault=r.isVar=r.isBlockScoped=r.isLet=r.isValidIdentifier=r.isReferenced=r.isBinding=r.getOuterBindingIdentifiers=r.getBindingIdentifiers=r.TYPES=r.react=r.DEPRECATED_KEYS=r.BUILDER_KEYS=r.NODE_FIELDS=r.ALIAS_KEYS=r.VISITOR_KEYS=r.NOT_LOCAL_BINDING=r.BLOCK_SCOPED_SYMBOL=r.INHERIT_KEYS=r.UNARY_OPERATORS=r.STRING_UNARY_OPERATORS=r.NUMBER_UNARY_OPERATORS=r.BOOLEAN_UNARY_OPERATORS=r.BINARY_OPERATORS=r.NUMBER_BINARY_OPERATORS=r.BOOLEAN_BINARY_OPERATORS=r.COMPARISON_BINARY_OPERATORS=r.EQUALITY_BINARY_OPERATORS=r.BOOLEAN_NUMBER_BINARY_OPERATORS=r.UPDATE_OPERATORS=r.LOGICAL_OPERATORS=r.COMMENT_KEYS=r.FOR_INIT_KEYS=r.FLATTENABLE_KEYS=r.STATEMENT_OR_BLOCK_KEYS=void 0;var m=n(e("babel-runtime/core-js/object/get-own-property-symbols")),y=n(e("babel-runtime/core-js/get-iterator")),g=n(e("babel-runtime/core-js/object/keys")),b=n(e("babel-runtime/core-js/json/stringify")),v=e("./constants");Object.defineProperty(r,"STATEMENT_OR_BLOCK_KEYS",{enumerable:!0,get:function(){return v.STATEMENT_OR_BLOCK_KEYS}}),Object.defineProperty(r,"FLATTENABLE_KEYS",{enumerable:!0,get:function(){return v.FLATTENABLE_KEYS}}),Object.defineProperty(r,"FOR_INIT_KEYS",{enumerable:!0,get:function(){return v.FOR_INIT_KEYS}}),Object.defineProperty(r,"COMMENT_KEYS",{enumerable:!0,get:function(){return v.COMMENT_KEYS}}),Object.defineProperty(r,"LOGICAL_OPERATORS",{enumerable:!0,get:function(){return v.LOGICAL_OPERATORS}}),Object.defineProperty(r,"UPDATE_OPERATORS",{enumerable:!0,get:function(){return v.UPDATE_OPERATORS}}),Object.defineProperty(r,"BOOLEAN_NUMBER_BINARY_OPERATORS",{enumerable:!0,get:function(){return v.BOOLEAN_NUMBER_BINARY_OPERATORS}}),Object.defineProperty(r,"EQUALITY_BINARY_OPERATORS",{enumerable:!0,get:function(){return v.EQUALITY_BINARY_OPERATORS}}),Object.defineProperty(r,"COMPARISON_BINARY_OPERATORS",{enumerable:!0,get:function(){return v.COMPARISON_BINARY_OPERATORS}}),Object.defineProperty(r,"BOOLEAN_BINARY_OPERATORS",{enumerable:!0,get:function(){return v.BOOLEAN_BINARY_OPERATORS}}),Object.defineProperty(r,"NUMBER_BINARY_OPERATORS",{enumerable:!0,get:function(){return v.NUMBER_BINARY_OPERATORS}}),Object.defineProperty(r,"BINARY_OPERATORS",{enumerable:!0,get:function(){return v.BINARY_OPERATORS}}),Object.defineProperty(r,"BOOLEAN_UNARY_OPERATORS",{enumerable:!0,get:function(){return v.BOOLEAN_UNARY_OPERATORS}}),Object.defineProperty(r,"NUMBER_UNARY_OPERATORS",{enumerable:!0,get:function(){return v.NUMBER_UNARY_OPERATORS}}),Object.defineProperty(r,"STRING_UNARY_OPERATORS",{enumerable:!0,get:function(){return v.STRING_UNARY_OPERATORS}}),Object.defineProperty(r,"UNARY_OPERATORS",{enumerable:!0,get:function(){return v.UNARY_OPERATORS}}),Object.defineProperty(r,"INHERIT_KEYS",{enumerable:!0,get:function(){return v.INHERIT_KEYS}}),Object.defineProperty(r,"BLOCK_SCOPED_SYMBOL",{enumerable:!0,get:function(){return v.BLOCK_SCOPED_SYMBOL}}),Object.defineProperty(r,"NOT_LOCAL_BINDING",{enumerable:!0,get:function(){return v.NOT_LOCAL_BINDING}}),r.is=function(e,t,r){return!!t&&!!s(t.type,e)&&(void 0===r||F.shallowEqual(t,r))},r.isType=s,r.validate=a,r.shallowEqual=function(e,t){for(var r=(0,g.default)(t),n=Array.isArray(r),i=0,r=n?r:(0,y.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}var a=s;if(e[a]!==t[a])return!1}return!0},r.appendToMemberExpression=function(e,t,r){return e.object=F.memberExpression(e.object,e.property,e.computed),e.property=t,e.computed=!!r,e},r.prependToMemberExpression=function(e,t){return e.object=F.memberExpression(t,e.object),e},r.ensureBlock=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"body";return e[t]=F.toBlock(e[t],e)},r.clone=o,r.cloneWithoutLoc=function(e){var t=o(e);return delete t.loc,t},r.cloneDeep=function(e){if(!e)return e;var t={};for(var r in e)if("_"!==r[0]){var n=e[r];n&&(n.type?n=F.cloneDeep(n):Array.isArray(n)&&(n=n.map(F.cloneDeep))),t[r]=n}return t},r.buildMatchMemberExpression=function(e,t){var r=e.split(".");return function(e){if(!F.isMemberExpression(e))return!1;for(var n=[e],i=0;n.length;){var s=n.shift();if(t&&i===r.length)return!0;if(F.isIdentifier(s)){if(r[i]!==s.name)return!1}else{if(!F.isStringLiteral(s)){if(F.isMemberExpression(s)){if(s.computed&&!F.isStringLiteral(s.property))return!1;n.push(s.object),n.push(s.property);continue}return!1}if(r[i]!==s.value)return!1}if(++i>r.length)return!1}return!0}},r.removeComments=function(e){for(var t=F.COMMENT_KEYS,r=Array.isArray(t),n=0,t=r?t:(0,y.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}delete e[i]}return e},r.inheritsComments=function(e,t){return u(e,t),l(e,t),c(e,t),e},r.inheritTrailingComments=u,r.inheritLeadingComments=l,r.inheritInnerComments=c,r.inherits=function(e,t){if(!e||!t)return e;for(var r=F.INHERIT_KEYS.optional,n=Array.isArray(r),i=0,r=n?r:(0,y.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}var a=s;null==e[a]&&(e[a]=t[a])}for(var o in t)"_"===o[0]&&(e[o]=t[o]);for(var u=F.INHERIT_KEYS.force,l=Array.isArray(u),c=0,u=l?u:(0,y.default)(u);;){var p;if(l){if(c>=u.length)break;p=u[c++]}else{if((c=u.next()).done)break;p=c.value}var h=p;e[h]=t[h]}return F.inheritsComments(e,t),e},r.assertNode=function(e){if(!h(e))throw new TypeError("Not a valid node "+(e&&e.type))},r.isNode=h,r.traverseFast=f,r.removeProperties=d,r.removePropertiesDeep=function(e,t){return f(e,d,t),e};var x=e("./retrievers");Object.defineProperty(r,"getBindingIdentifiers",{enumerable:!0,get:function(){return x.getBindingIdentifiers}}),Object.defineProperty(r,"getOuterBindingIdentifiers",{enumerable:!0,get:function(){return x.getOuterBindingIdentifiers}});var E=e("./validators");Object.defineProperty(r,"isBinding",{enumerable:!0,get:function(){return E.isBinding}}),Object.defineProperty(r,"isReferenced",{enumerable:!0,get:function(){return E.isReferenced}}),Object.defineProperty(r,"isValidIdentifier",{enumerable:!0,get:function(){return E.isValidIdentifier}}),Object.defineProperty(r,"isLet",{enumerable:!0,get:function(){return E.isLet}}),Object.defineProperty(r,"isBlockScoped",{enumerable:!0,get:function(){return E.isBlockScoped}}),Object.defineProperty(r,"isVar",{enumerable:!0,get:function(){return E.isVar}}),Object.defineProperty(r,"isSpecifierDefault",{enumerable:!0,get:function(){return E.isSpecifierDefault}}),Object.defineProperty(r,"isScope",{enumerable:!0,get:function(){return E.isScope}}),Object.defineProperty(r,"isImmutable",{enumerable:!0,get:function(){return E.isImmutable}}),Object.defineProperty(r,"isNodesEquivalent",{enumerable:!0,get:function(){return E.isNodesEquivalent}});var A=e("./converters");Object.defineProperty(r,"toComputedKey",{enumerable:!0,get:function(){return A.toComputedKey}}),Object.defineProperty(r,"toSequenceExpression",{enumerable:!0,get:function(){return A.toSequenceExpression}}),Object.defineProperty(r,"toKeyAlias",{enumerable:!0,get:function(){return A.toKeyAlias}}),Object.defineProperty(r,"toIdentifier",{enumerable:!0,get:function(){return A.toIdentifier}}),Object.defineProperty(r,"toBindingIdentifierName",{enumerable:!0,get:function(){return A.toBindingIdentifierName}}),Object.defineProperty(r,"toStatement",{enumerable:!0,get:function(){return A.toStatement}}),Object.defineProperty(r,"toExpression",{enumerable:!0,get:function(){return A.toExpression}}),Object.defineProperty(r,"toBlock",{enumerable:!0,get:function(){return A.toBlock}}),Object.defineProperty(r,"valueToNode",{enumerable:!0,get:function(){return A.valueToNode}});var D=e("./flow");Object.defineProperty(r,"createUnionTypeAnnotation",{enumerable:!0,get:function(){return D.createUnionTypeAnnotation}}),Object.defineProperty(r,"removeTypeDuplicates",{enumerable:!0,get:function(){return D.removeTypeDuplicates}}),Object.defineProperty(r,"createTypeAnnotationBasedOnTypeof",{enumerable:!0,get:function(){return D.createTypeAnnotationBasedOnTypeof}});var C=n(e("to-fast-properties")),S=n(e("lodash/clone")),_=n(e("lodash/uniq"));e("./definitions/init");var w=e("./definitions"),k=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("./react")),F=r;r.VISITOR_KEYS=w.VISITOR_KEYS,r.ALIAS_KEYS=w.ALIAS_KEYS,r.NODE_FIELDS=w.NODE_FIELDS,r.BUILDER_KEYS=w.BUILDER_KEYS,r.DEPRECATED_KEYS=w.DEPRECATED_KEYS,r.react=k;for(var T in F.VISITOR_KEYS)i(T);F.FLIPPED_ALIAS_KEYS={},(0,g.default)(F.ALIAS_KEYS).forEach(function(e){F.ALIAS_KEYS[e].forEach(function(t){(F.FLIPPED_ALIAS_KEYS[t]=F.FLIPPED_ALIAS_KEYS[t]||[]).push(e)})}),(0,g.default)(F.FLIPPED_ALIAS_KEYS).forEach(function(e){F[e.toUpperCase()+"_TYPES"]=F.FLIPPED_ALIAS_KEYS[e],i(e)});r.TYPES=(0,g.default)(F.VISITOR_KEYS).concat((0,g.default)(F.FLIPPED_ALIAS_KEYS)).concat((0,g.default)(F.DEPRECATED_KEYS));(0,g.default)(F.BUILDER_KEYS).forEach(function(e){function t(){if(arguments.length>r.length)throw new Error("t."+e+": Too many arguments passed. Received "+arguments.length+" but can receive no more than "+r.length);var t={};t.type=e;for(var n=0,i=r,s=Array.isArray(i),o=0,i=s?i:(0,y.default)(i);;){var u;if(s){if(o>=i.length)break;u=i[o++]}else{if((o=i.next()).done)break;u=o.value}var l=u,c=F.NODE_FIELDS[e][l],p=arguments[n++];void 0===p&&(p=(0,S.default)(c.default)),t[l]=p}for(var h in t)a(t,h,t[h]);return t}var r=F.BUILDER_KEYS[e];F[e]=t,F[e[0].toLowerCase()+e.slice(1)]=t});var P=function(e){function t(t){return function(){return console.trace("The node type "+e+" has been renamed to "+r),t.apply(this,arguments)}}var r=F.DEPRECATED_KEYS[e];F[e]=F[e[0].toLowerCase()+e.slice(1)]=t(F[r]),F["is"+e]=t(F["is"+r]),F["assert"+e]=t(F["assert"+r])};for(var B in F.DEPRECATED_KEYS)P(B);(0,C.default)(F),(0,C.default)(F.VISITOR_KEYS);var O=["tokens","start","end","loc","raw","rawValue"],j=F.COMMENT_KEYS.concat(["comments"]).concat(O)},{"./constants":167,"./converters":168,"./definitions":173,"./definitions/init":174,"./flow":177,"./react":179,"./retrievers":180,"./validators":181,"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/json/stringify":121,"babel-runtime/core-js/object/get-own-property-symbols":126,"babel-runtime/core-js/object/keys":127,"lodash/clone":491,"lodash/uniq":540,"to-fast-properties":607}],179:[function(e,t,r){"use strict";function n(e,t){for(var r=e.value.split(/\r\n|\n|\r/),n=0,s=0;s<r.length;s++)r[s].match(/[^ \t]/)&&(n=s);for(var a="",o=0;o<r.length;o++){var u=r[o],l=0===o,c=o===r.length-1,p=o===n,h=u.replace(/\t/g," ");l||(h=h.replace(/^[ ]+/,"")),c||(h=h.replace(/[ ]+$/,"")),h&&(p||(h+=" "),a+=h)}a&&t.push(i.stringLiteral(a))}r.__esModule=!0,r.isReactComponent=void 0,r.isCompatTag=function(e){return!!e&&/^[a-z]|\-/.test(e)},r.buildChildren=function(e){for(var t=[],r=0;r<e.children.length;r++){var s=e.children[r];i.isJSXText(s)?n(s,t):(i.isJSXExpressionContainer(s)&&(s=s.expression),i.isJSXEmptyExpression(s)||t.push(s))}return t};var i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("./index"));r.isReactComponent=i.buildMatchMemberExpression("React.Component")},{"./index":178}],180:[function(e,t,r){"use strict";function n(e,t,r){for(var n=[].concat(e),a=(0,i.default)(null);n.length;){var o=n.shift();if(o){var u=s.getBindingIdentifiers.keys[o.type];if(s.isIdentifier(o))if(t){(a[o.name]=a[o.name]||[]).push(o)}else a[o.name]=o;else if(s.isExportDeclaration(o))s.isDeclaration(o.declaration)&&n.push(o.declaration);else{if(r){if(s.isFunctionDeclaration(o)){n.push(o.id);continue}if(s.isFunctionExpression(o))continue}if(u)for(var l=0;l<u.length;l++){var c=u[l];o[c]&&(n=n.concat(o[c]))}}}}return a}r.__esModule=!0;var i=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/object/create"));r.getBindingIdentifiers=n,r.getOuterBindingIdentifiers=function(e,t){return n(e,t,!0)};var s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("./index"));n.keys={DeclareClass:["id"],DeclareFunction:["id"],DeclareModule:["id"],DeclareVariable:["id"],InterfaceDeclaration:["id"],TypeAlias:["id"],OpaqueType:["id"],CatchClause:["param"],LabeledStatement:["label"],UnaryExpression:["argument"],AssignmentExpression:["left"],ImportSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportDefaultSpecifier:["local"],ImportDeclaration:["specifiers"],ExportSpecifier:["exported"],ExportNamespaceSpecifier:["exported"],ExportDefaultSpecifier:["exported"],FunctionDeclaration:["id","params"],FunctionExpression:["id","params"],ClassDeclaration:["id"],ClassExpression:["id"],RestElement:["argument"],UpdateExpression:["argument"],RestProperty:["argument"],ObjectProperty:["value"],AssignmentPattern:["left"],ArrayPattern:["elements"],ObjectPattern:["properties"],VariableDeclaration:["declarations"],VariableDeclarator:["id"]}},{"./index":178,"babel-runtime/core-js/object/create":125}],181:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if("object"!==(void 0===e?"undefined":(0,a.default)(e))||"object"!==(void 0===e?"undefined":(0,a.default)(e))||null==e||null==t)return e===t;if(e.type!==t.type)return!1;for(var r=(0,s.default)(c.NODE_FIELDS[e.type]||e.type),n=Array.isArray(r),u=0,r=n?r:(0,o.default)(r);;){var l;if(n){if(u>=r.length)break;l=r[u++]}else{if((u=r.next()).done)break;l=u.value}var p=l;if((0,a.default)(e[p])!==(0,a.default)(t[p]))return!1;if(Array.isArray(e[p])){if(!Array.isArray(t[p]))return!1;if(e[p].length!==t[p].length)return!1;for(var h=0;h<e[p].length;h++)if(!i(e[p][h],t[p][h]))return!1}else if(!i(e[p],t[p]))return!1}return!0}r.__esModule=!0;var s=n(e("babel-runtime/core-js/object/keys")),a=n(e("babel-runtime/helpers/typeof")),o=n(e("babel-runtime/core-js/get-iterator"));r.isBinding=function(e,t){var r=u.getBindingIdentifiers.keys[t.type];if(r)for(var n=0;n<r.length;n++){var i=t[r[n]];if(Array.isArray(i)){if(i.indexOf(e)>=0)return!0}else if(i===e)return!0}return!1},r.isReferenced=function(e,t){switch(t.type){case"BindExpression":return t.object===e||t.callee===e;case"MemberExpression":case"JSXMemberExpression":return!(t.property!==e||!t.computed)||t.object===e;case"MetaProperty":return!1;case"ObjectProperty":if(t.key===e)return t.computed;case"VariableDeclarator":return t.id!==e;case"ArrowFunctionExpression":case"FunctionDeclaration":case"FunctionExpression":for(var r=t.params,n=Array.isArray(r),i=0,r=n?r:(0,o.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}if(s===e)return!1}return t.id!==e;case"ExportSpecifier":return!t.source&&t.local===e;case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":return!1;case"JSXAttribute":return t.name!==e;case"ClassProperty":return t.key===e?t.computed:t.value===e;case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":return!1;case"ClassDeclaration":case"ClassExpression":return t.id!==e;case"ClassMethod":case"ObjectMethod":return t.key===e&&t.computed;case"LabeledStatement":return!1;case"CatchClause":return t.param!==e;case"RestElement":return!1;case"AssignmentExpression":case"AssignmentPattern":return t.right===e;case"ObjectPattern":case"ArrayPattern":return!1}return!0},r.isValidIdentifier=function(e){return"string"==typeof e&&!l.default.keyword.isReservedWordES6(e,!0)&&"await"!==e&&l.default.keyword.isIdentifierNameES6(e)},r.isLet=function(e){return c.isVariableDeclaration(e)&&("var"!==e.kind||e[p.BLOCK_SCOPED_SYMBOL])},r.isBlockScoped=function(e){return c.isFunctionDeclaration(e)||c.isClassDeclaration(e)||c.isLet(e)},r.isVar=function(e){return c.isVariableDeclaration(e,{kind:"var"})&&!e[p.BLOCK_SCOPED_SYMBOL]},r.isSpecifierDefault=function(e){return c.isImportDefaultSpecifier(e)||c.isIdentifier(e.imported||e.exported,{name:"default"})},r.isScope=function(e,t){return(!c.isBlockStatement(e)||!c.isFunction(t,{body:e}))&&c.isScopable(e)},r.isImmutable=function(e){return!!c.isType(e.type,"Immutable")||!!c.isIdentifier(e)&&"undefined"===e.name},r.isNodesEquivalent=i;var u=e("./retrievers"),l=n(e("esutils")),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("./index")),p=e("./constants")},{"./constants":167,"./index":178,"./retrievers":180,"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/object/keys":127,"babel-runtime/helpers/typeof":138,esutils:185}],182:[function(e,t,r){arguments[4][25][0].apply(r,arguments)},{dup:25}],183:[function(e,t,r){arguments[4][26][0].apply(r,arguments)},{dup:26}],184:[function(e,t,r){arguments[4][27][0].apply(r,arguments)},{"./code":183,dup:27}],185:[function(e,t,r){arguments[4][28][0].apply(r,arguments)},{"./ast":182,"./code":183,"./keyword":184,dup:28}],186:[function(e,t,r){"use strict";function n(e){return e=e.split(" "),function(t){return e.indexOf(t)>=0}}function i(e,t){for(var r=65536,n=0;n<t.length;n+=2){if((r+=t[n])>e)return!1;if((r+=t[n+1])>=e)return!0}}function s(e){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&g.test(String.fromCharCode(e)):i(e,v)))}function a(e){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&b.test(String.fromCharCode(e)):i(e,v)||i(e,x))))}function o(e){return 10===e||13===e||8232===e||8233===e}function u(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}function l(e,t,r,n){return e.type=t,e.end=r,e.loc.end=n,this.processComment(e),e}function c(e){return e[e.length-1]}function p(e){return e&&"Property"===e.type&&"init"===e.kind&&!1===e.method}function h(e){return"JSXIdentifier"===e.type?e.name:"JSXNamespacedName"===e.type?e.namespace.name+":"+e.name.name:"JSXMemberExpression"===e.type?h(e.object)+"."+h(e.property):void 0}Object.defineProperty(r,"__esModule",{value:!0});var f={6:n("enum await"),strict:n("implements interface let package private protected public static yield"),strictBind:n("eval arguments")},d=n("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 let const class extends export import yield super"),m="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿕ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞮꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",y="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣔ-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",g=new RegExp("["+m+"]"),b=new RegExp("["+m+y+"]");m=y=null;var v=[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,19,35,5,35,5,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,66,18,2,1,11,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,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,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,60,67,1213,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,3,5761,10591,541],x=[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,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,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,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239],E={sourceType:"script",sourceFilename:void 0,startLine:1,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,plugins:[],strictMode:null},A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},C=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},S=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},_=!0,w=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};D(this,e),this.label=t,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.rightAssociative=!!r.rightAssociative,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop||null,this.updateContext=null},k=function(e){function t(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return D(this,t),n.keyword=r,S(this,e.call(this,r,n))}return C(t,e),t}(w),F=function(e){function t(r,n){return D(this,t),S(this,e.call(this,r,{beforeExpr:_,binop:n}))}return C(t,e),t}(w),T={num:new w("num",{startsExpr:!0}),regexp:new w("regexp",{startsExpr:!0}),string:new w("string",{startsExpr:!0}),name:new w("name",{startsExpr:!0}),eof:new w("eof"),bracketL:new w("[",{beforeExpr:_,startsExpr:!0}),bracketR:new w("]"),braceL:new w("{",{beforeExpr:_,startsExpr:!0}),braceBarL:new w("{|",{beforeExpr:_,startsExpr:!0}),braceR:new w("}"),braceBarR:new w("|}"),parenL:new w("(",{beforeExpr:_,startsExpr:!0}),parenR:new w(")"),comma:new w(",",{beforeExpr:_}),semi:new w(";",{beforeExpr:_}),colon:new w(":",{beforeExpr:_}),doubleColon:new w("::",{beforeExpr:_}),dot:new w("."),question:new w("?",{beforeExpr:_}),arrow:new w("=>",{beforeExpr:_}),template:new w("template"),ellipsis:new w("...",{beforeExpr:_}),backQuote:new w("`",{startsExpr:!0}),dollarBraceL:new w("${",{beforeExpr:_,startsExpr:!0}),at:new w("@"),eq:new w("=",{beforeExpr:_,isAssign:!0}),assign:new w("_=",{beforeExpr:_,isAssign:!0}),incDec:new w("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new w("prefix",{beforeExpr:_,prefix:!0,startsExpr:!0}),logicalOR:new F("||",1),logicalAND:new F("&&",2),bitwiseOR:new F("|",3),bitwiseXOR:new F("^",4),bitwiseAND:new F("&",5),equality:new F("==/!=",6),relational:new F("</>",7),bitShift:new F("<</>>",8),plusMin:new w("+/-",{beforeExpr:_,binop:9,prefix:!0,startsExpr:!0}),modulo:new F("%",10),star:new F("*",10),slash:new F("/",10),exponent:new w("**",{beforeExpr:_,binop:11,rightAssociative:!0})},P={break:new k("break"),case:new k("case",{beforeExpr:_}),catch:new k("catch"),continue:new k("continue"),debugger:new k("debugger"),default:new k("default",{beforeExpr:_}),do:new k("do",{isLoop:!0,beforeExpr:_}),else:new k("else",{beforeExpr:_}),finally:new k("finally"),for:new k("for",{isLoop:!0}),function:new k("function",{startsExpr:!0}),if:new k("if"),return:new k("return",{beforeExpr:_}),switch:new k("switch"),throw:new k("throw",{beforeExpr:_}),try:new k("try"),var:new k("var"),let:new k("let"),const:new k("const"),while:new k("while",{isLoop:!0}),with:new k("with"),new:new k("new",{beforeExpr:_,startsExpr:!0}),this:new k("this",{startsExpr:!0}),super:new k("super",{startsExpr:!0}),class:new k("class"),extends:new k("extends",{beforeExpr:_}),export:new k("export"),import:new k("import",{startsExpr:!0}),yield:new k("yield",{beforeExpr:_,startsExpr:!0}),null:new k("null",{startsExpr:!0}),true:new k("true",{startsExpr:!0}),false:new k("false",{startsExpr:!0}),in:new k("in",{beforeExpr:_,binop:7}),instanceof:new k("instanceof",{beforeExpr:_,binop:7}),typeof:new k("typeof",{beforeExpr:_,prefix:!0,startsExpr:!0}),void:new k("void",{beforeExpr:_,prefix:!0,startsExpr:!0}),delete:new k("delete",{beforeExpr:_,prefix:!0,startsExpr:!0})};Object.keys(P).forEach(function(e){T["_"+e]=P[e]});var B=/\r\n?|\n|\u2028|\u2029/,O=new RegExp(B.source,"g"),j=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,N=function e(t,r,n,i){D(this,e),this.token=t,this.isExpr=!!r,this.preserveSpace=!!n,this.override=i},I={braceStatement:new N("{",!1),braceExpression:new N("{",!0),templateQuasi:new N("${",!0),parenStatement:new N("(",!1),parenExpression:new N("(",!0),template:new N("`",!0,!0,function(e){return e.readTmplToken()}),functionExpression:new N("function",!0)};T.parenR.updateContext=T.braceR.updateContext=function(){if(1!==this.state.context.length){var e=this.state.context.pop();e===I.braceStatement&&this.curContext()===I.functionExpression?(this.state.context.pop(),this.state.exprAllowed=!1):e===I.templateQuasi?this.state.exprAllowed=!0:this.state.exprAllowed=!e.isExpr}else this.state.exprAllowed=!0},T.name.updateContext=function(e){this.state.exprAllowed=!1,e!==T._let&&e!==T._const&&e!==T._var||B.test(this.input.slice(this.state.end))&&(this.state.exprAllowed=!0)},T.braceL.updateContext=function(e){this.state.context.push(this.braceIsBlock(e)?I.braceStatement:I.braceExpression),this.state.exprAllowed=!0},T.dollarBraceL.updateContext=function(){this.state.context.push(I.templateQuasi),this.state.exprAllowed=!0},T.parenL.updateContext=function(e){var t=e===T._if||e===T._for||e===T._with||e===T._while;this.state.context.push(t?I.parenStatement:I.parenExpression),this.state.exprAllowed=!0},T.incDec.updateContext=function(){},T._function.updateContext=function(){this.curContext()!==I.braceStatement&&this.state.context.push(I.functionExpression),this.state.exprAllowed=!1},T.backQuote.updateContext=function(){this.curContext()===I.template?this.state.context.pop():this.state.context.push(I.template),this.state.exprAllowed=!1};var L=function e(t,r){D(this,e),this.line=t,this.column=r},M=function e(t,r){D(this,e),this.start=t,this.end=r},R=function(){function e(){D(this,e)}return e.prototype.init=function(e,t){return this.strict=!1!==e.strictMode&&"module"===e.sourceType,this.input=t,this.potentialArrowAt=-1,this.inMethod=this.inFunction=this.inGenerator=this.inAsync=this.inPropertyName=this.inType=this.inClassProperty=this.noAnonFunctionType=!1,this.labels=[],this.decorators=[],this.tokens=[],this.comments=[],this.trailingComments=[],this.leadingComments=[],this.commentStack=[],this.pos=this.lineStart=0,this.curLine=e.startLine,this.type=T.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=[I.braceStatement],this.exprAllowed=!0,this.containsEsc=this.containsOctal=!1,this.octalPosition=null,this.invalidTemplateEscapePosition=null,this.exportedIdentifiers=[],this},e.prototype.curPosition=function(){return new L(this.curLine,this.pos-this.lineStart)},e.prototype.clone=function(t){var r=new e;for(var n in this){var i=this[n];t&&"context"!==n||!Array.isArray(i)||(i=i.slice()),r[n]=i}return r},e}(),V={},U=["jsx","doExpressions","objectRestSpread","decorators","classProperties","exportExtensions","asyncGenerators","functionBind","functionSent","dynamicImport","flow"],q=function(e){function t(r,n){D(this,t),r=function(e){var t={};for(var r in E)t[r]=e&&r in e?e[r]:E[r];return t}(r);var i=S(this,e.call(this,r,n));return i.options=r,i.inModule="module"===i.options.sourceType,i.input=n,i.plugins=i.loadPlugins(i.options.plugins),i.filename=r.sourceFilename,0===i.state.pos&&"#"===i.input[0]&&"!"===i.input[1]&&i.skipLineComment(2),i}return C(t,e),t.prototype.isReservedWord=function(e){return"await"===e?this.inModule:f[6](e)},t.prototype.hasPlugin=function(e){return!!(this.plugins["*"]&&U.indexOf(e)>-1)||!!this.plugins[e]},t.prototype.extend=function(e,t){this[e]=t(this[e])},t.prototype.loadAllPlugins=function(){var e=this,t=Object.keys(V).filter(function(e){return"flow"!==e&&"estree"!==e});t.push("flow"),t.forEach(function(t){var r=V[t];r&&r(e)})},t.prototype.loadPlugins=function(e){if(e.indexOf("*")>=0)return this.loadAllPlugins(),{"*":!0};var t={};e.indexOf("flow")>=0&&(e=e.filter(function(e){return"flow"!==e})).push("flow"),e.indexOf("estree")>=0&&(e=e.filter(function(e){return"estree"!==e})).unshift("estree");for(var r=e,n=Array.isArray(r),i=0,r=n?r:r[Symbol.iterator]();;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}var a=s;if(!t[a]){t[a]=!0;var o=V[a];o&&o(this)}}return t},t.prototype.parse=function(){var e=this.startNode(),t=this.startNode();return this.nextToken(),this.parseTopLevel(e,t)},t}(function(){function e(t,r){D(this,e),this.state=new R,this.state.init(t,r)}return e.prototype.next=function(){this.isLookahead||this.state.tokens.push(new function e(t){D(this,e),this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new M(t.startLoc,t.endLoc)}(this.state)),this.state.lastTokEnd=this.state.end,this.state.lastTokStart=this.state.start,this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()},e.prototype.eat=function(e){return!!this.match(e)&&(this.next(),!0)},e.prototype.match=function(e){return this.state.type===e},e.prototype.isKeyword=function(e){return d(e)},e.prototype.lookahead=function(){var e=this.state;this.state=e.clone(!0),this.isLookahead=!0,this.next(),this.isLookahead=!1;var t=this.state.clone(!0);return this.state=e,t},e.prototype.setStrict=function(e){if(this.state.strict=e,this.match(T.num)||this.match(T.string)){for(this.state.pos=this.state.start;this.state.pos<this.state.lineStart;)this.state.lineStart=this.input.lastIndexOf("\n",this.state.lineStart-2)+1,--this.state.curLine;this.nextToken()}},e.prototype.curContext=function(){return this.state.context[this.state.context.length-1]},e.prototype.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.state.containsOctal=!1,this.state.octalPosition=null,this.state.start=this.state.pos,this.state.startLoc=this.state.curPosition(),this.state.pos>=this.input.length?this.finishToken(T.eof):e.override?e.override(this):this.readToken(this.fullCharCodeAtPos())},e.prototype.readToken=function(e){return s(e)||92===e?this.readWord():this.getTokenFromCode(e)},e.prototype.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.state.pos);if(e<=55295||e>=57344)return e;return(e<<10)+this.input.charCodeAt(this.state.pos+1)-56613888},e.prototype.pushComment=function(e,t,r,n,i,s){var a={type:e?"CommentBlock":"CommentLine",value:t,start:r,end:n,loc:new M(i,s)};this.isLookahead||(this.state.tokens.push(a),this.state.comments.push(a),this.addComment(a))},e.prototype.skipBlockComment=function(){var e=this.state.curPosition(),t=this.state.pos,r=this.input.indexOf("*/",this.state.pos+=2);-1===r&&this.raise(this.state.pos-2,"Unterminated comment"),this.state.pos=r+2,O.lastIndex=t;for(var n=void 0;(n=O.exec(this.input))&&n.index<this.state.pos;)++this.state.curLine,this.state.lineStart=n.index+n[0].length;this.pushComment(!0,this.input.slice(t+2,r),t,this.state.pos,e,this.state.curPosition())},e.prototype.skipLineComment=function(e){for(var t=this.state.pos,r=this.state.curPosition(),n=this.input.charCodeAt(this.state.pos+=e);this.state.pos<this.input.length&&10!==n&&13!==n&&8232!==n&&8233!==n;)++this.state.pos,n=this.input.charCodeAt(this.state.pos);this.pushComment(!1,this.input.slice(t+e,this.state.pos),t,this.state.pos,r,this.state.curPosition())},e.prototype.skipSpace=function(){e:for(;this.state.pos<this.input.length;){var e=this.input.charCodeAt(this.state.pos);switch(e){case 32:case 160:++this.state.pos;break;case 13:10===this.input.charCodeAt(this.state.pos+1)&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(!(e>8&&e<14||e>=5760&&j.test(String.fromCharCode(e))))break e;++this.state.pos}}},e.prototype.finishToken=function(e,t){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();var r=this.state.type;this.state.type=e,this.state.value=t,this.updateContext(r)},e.prototype.readToken_dot=function(){var e=this.input.charCodeAt(this.state.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.state.pos+2);return 46===e&&46===t?(this.state.pos+=3,this.finishToken(T.ellipsis)):(++this.state.pos,this.finishToken(T.dot))},e.prototype.readToken_slash=function(){if(this.state.exprAllowed)return++this.state.pos,this.readRegexp();return 61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(T.assign,2):this.finishOp(T.slash,1)},e.prototype.readToken_mult_modulo=function(e){var t=42===e?T.star:T.modulo,r=1,n=this.input.charCodeAt(this.state.pos+1);return 42===n&&(r++,n=this.input.charCodeAt(this.state.pos+2),t=T.exponent),61===n&&(r++,t=T.assign),this.finishOp(t,r)},e.prototype.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.state.pos+1);return t===e?this.finishOp(124===e?T.logicalOR:T.logicalAND,2):61===t?this.finishOp(T.assign,2):124===e&&125===t&&this.hasPlugin("flow")?this.finishOp(T.braceBarR,2):this.finishOp(124===e?T.bitwiseOR:T.bitwiseAND,1)},e.prototype.readToken_caret=function(){return 61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(T.assign,2):this.finishOp(T.bitwiseXOR,1)},e.prototype.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.state.pos+1);return t===e?45===t&&62===this.input.charCodeAt(this.state.pos+2)&&B.test(this.input.slice(this.state.lastTokEnd,this.state.pos))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(T.incDec,2):61===t?this.finishOp(T.assign,2):this.finishOp(T.plusMin,1)},e.prototype.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.state.pos+1),r=1;return t===e?(r=62===e&&62===this.input.charCodeAt(this.state.pos+2)?3:2,61===this.input.charCodeAt(this.state.pos+r)?this.finishOp(T.assign,r+1):this.finishOp(T.bitShift,r)):33===t&&60===e&&45===this.input.charCodeAt(this.state.pos+2)&&45===this.input.charCodeAt(this.state.pos+3)?(this.inModule&&this.unexpected(),this.skipLineComment(4),this.skipSpace(),this.nextToken()):(61===t&&(r=2),this.finishOp(T.relational,r))},e.prototype.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.state.pos+1);return 61===t?this.finishOp(T.equality,61===this.input.charCodeAt(this.state.pos+2)?3:2):61===e&&62===t?(this.state.pos+=2,this.finishToken(T.arrow)):this.finishOp(61===e?T.eq:T.prefix,1)},e.prototype.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.state.pos,this.finishToken(T.parenL);case 41:return++this.state.pos,this.finishToken(T.parenR);case 59:return++this.state.pos,this.finishToken(T.semi);case 44:return++this.state.pos,this.finishToken(T.comma);case 91:return++this.state.pos,this.finishToken(T.bracketL);case 93:return++this.state.pos,this.finishToken(T.bracketR);case 123:return this.hasPlugin("flow")&&124===this.input.charCodeAt(this.state.pos+1)?this.finishOp(T.braceBarL,2):(++this.state.pos,this.finishToken(T.braceL));case 125:return++this.state.pos,this.finishToken(T.braceR);case 58:return this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(T.doubleColon,2):(++this.state.pos,this.finishToken(T.colon));case 63:return++this.state.pos,this.finishToken(T.question);case 64:return++this.state.pos,this.finishToken(T.at);case 96:return++this.state.pos,this.finishToken(T.backQuote);case 48:var t=this.input.charCodeAt(this.state.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2);case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 126:return this.finishOp(T.prefix,1)}this.raise(this.state.pos,"Unexpected character '"+u(e)+"'")},e.prototype.finishOp=function(e,t){var r=this.input.slice(this.state.pos,this.state.pos+t);return this.state.pos+=t,this.finishToken(e,r)},e.prototype.readRegexp=function(){for(var e=this.state.pos,t=void 0,r=void 0;;){this.state.pos>=this.input.length&&this.raise(e,"Unterminated regular expression");var n=this.input.charAt(this.state.pos);if(B.test(n)&&this.raise(e,"Unterminated regular expression"),t)t=!1;else{if("["===n)r=!0;else if("]"===n&&r)r=!1;else if("/"===n&&!r)break;t="\\"===n}++this.state.pos}var i=this.input.slice(e,this.state.pos);++this.state.pos;var s=this.readWord1();if(s){/^[gmsiyu]*$/.test(s)||this.raise(e,"Invalid regular expression flag")}return this.finishToken(T.regexp,{pattern:i,flags:s})},e.prototype.readInt=function(e,t){for(var r=this.state.pos,n=0,i=0,s=null==t?1/0:t;i<s;++i){var a=this.input.charCodeAt(this.state.pos),o=void 0;if((o=a>=97?a-97+10:a>=65?a-65+10:a>=48&&a<=57?a-48:1/0)>=e)break;++this.state.pos,n=n*e+o}return this.state.pos===r||null!=t&&this.state.pos-r!==t?null:n},e.prototype.readRadixNumber=function(e){this.state.pos+=2;var t=this.readInt(e);return null==t&&this.raise(this.state.start+2,"Expected number in radix "+e),s(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number"),this.finishToken(T.num,t)},e.prototype.readNumber=function(e){var t=this.state.pos,r=48===this.input.charCodeAt(t),n=!1;e||null!==this.readInt(10)||this.raise(t,"Invalid number"),r&&this.state.pos==t+1&&(r=!1);var i=this.input.charCodeAt(this.state.pos);46!==i||r||(++this.state.pos,this.readInt(10),n=!0,i=this.input.charCodeAt(this.state.pos)),69!==i&&101!==i||r||(43!==(i=this.input.charCodeAt(++this.state.pos))&&45!==i||++this.state.pos,null===this.readInt(10)&&this.raise(t,"Invalid number"),n=!0),s(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number");var a=this.input.slice(t,this.state.pos),o=void 0;return n?o=parseFloat(a):r&&1!==a.length?this.state.strict?this.raise(t,"Invalid number"):o=/[89]/.test(a)?parseInt(a,10):parseInt(a,8):o=parseInt(a,10),this.finishToken(T.num,o)},e.prototype.readCodePoint=function(e){var t=void 0;if(123===this.input.charCodeAt(this.state.pos)){var r=++this.state.pos;if(t=this.readHexChar(this.input.indexOf("}",this.state.pos)-this.state.pos,e),++this.state.pos,null===t)--this.state.invalidTemplateEscapePosition;else if(t>1114111){if(!e)return this.state.invalidTemplateEscapePosition=r-2,null;this.raise(r,"Code point out of bounds")}}else t=this.readHexChar(4,e);return t},e.prototype.readString=function(e){for(var t="",r=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var n=this.input.charCodeAt(this.state.pos);if(n===e)break;92===n?(t+=this.input.slice(r,this.state.pos),t+=this.readEscapedChar(!1),r=this.state.pos):(o(n)&&this.raise(this.state.start,"Unterminated string constant"),++this.state.pos)}return t+=this.input.slice(r,this.state.pos++),this.finishToken(T.string,t)},e.prototype.readTmplToken=function(){for(var e="",t=this.state.pos,r=!1;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated template");var n=this.input.charCodeAt(this.state.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.state.pos+1))return this.state.pos===this.state.start&&this.match(T.template)?36===n?(this.state.pos+=2,this.finishToken(T.dollarBraceL)):(++this.state.pos,this.finishToken(T.backQuote)):(e+=this.input.slice(t,this.state.pos),this.finishToken(T.template,r?null:e));if(92===n){e+=this.input.slice(t,this.state.pos);var i=this.readEscapedChar(!0);null===i?r=!0:e+=i,t=this.state.pos}else if(o(n)){switch(e+=this.input.slice(t,this.state.pos),++this.state.pos,n){case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(n)}++this.state.curLine,this.state.lineStart=this.state.pos,t=this.state.pos}else++this.state.pos}},e.prototype.readEscapedChar=function(e){var t=!e,r=this.input.charCodeAt(++this.state.pos);switch(++this.state.pos,r){case 110:return"\n";case 114:return"\r";case 120:var n=this.readHexChar(2,t);return null===n?null:String.fromCharCode(n);case 117:var i=this.readCodePoint(t);return null===i?null:u(i);case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:return this.state.lineStart=this.state.pos,++this.state.curLine,"";default:if(r>=48&&r<=55){var s=this.state.pos-1,a=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0],o=parseInt(a,8);if(o>255&&(a=a.slice(0,-1),o=parseInt(a,8)),o>0){if(e)return this.state.invalidTemplateEscapePosition=s,null;this.state.strict?this.raise(s,"Octal literal in strict mode"):this.state.containsOctal||(this.state.containsOctal=!0,this.state.octalPosition=s)}return this.state.pos+=a.length-1,String.fromCharCode(o)}return String.fromCharCode(r)}},e.prototype.readHexChar=function(e,t){var r=this.state.pos,n=this.readInt(16,e);return null===n&&(t?this.raise(r,"Bad character escape sequence"):(this.state.pos=r-1,this.state.invalidTemplateEscapePosition=r-1)),n},e.prototype.readWord1=function(){this.state.containsEsc=!1;for(var e="",t=!0,r=this.state.pos;this.state.pos<this.input.length;){var n=this.fullCharCodeAtPos();if(a(n))this.state.pos+=n<=65535?1:2;else{if(92!==n)break;this.state.containsEsc=!0,e+=this.input.slice(r,this.state.pos);var i=this.state.pos;117!==this.input.charCodeAt(++this.state.pos)&&this.raise(this.state.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.state.pos;var o=this.readCodePoint(!0);(t?s:a)(o,!0)||this.raise(i,"Invalid Unicode escape"),e+=u(o),r=this.state.pos}t=!1}return e+this.input.slice(r,this.state.pos)},e.prototype.readWord=function(){var e=this.readWord1(),t=T.name;return!this.state.containsEsc&&this.isKeyword(e)&&(t=P[e]),this.finishToken(t,e)},e.prototype.braceIsBlock=function(e){if(e===T.colon){var t=this.curContext();if(t===I.braceStatement||t===I.braceExpression)return!t.isExpr}return e===T._return?B.test(this.input.slice(this.state.lastTokEnd,this.state.start)):e===T._else||e===T.semi||e===T.eof||e===T.parenR||(e===T.braceL?this.curContext()===I.braceStatement:!this.state.exprAllowed)},e.prototype.updateContext=function(e){var t=this.state.type,r=void 0;t.keyword&&e===T.dot?this.state.exprAllowed=!1:(r=t.updateContext)?r.call(this,e):this.state.exprAllowed=t.beforeExpr},e}()),G=q.prototype;G.addExtra=function(e,t,r){if(e){(e.extra=e.extra||{})[t]=r}},G.isRelational=function(e){return this.match(T.relational)&&this.state.value===e},G.expectRelational=function(e){this.isRelational(e)?this.next():this.unexpected(null,T.relational)},G.isContextual=function(e){return this.match(T.name)&&this.state.value===e},G.eatContextual=function(e){return this.state.value===e&&this.eat(T.name)},G.expectContextual=function(e,t){this.eatContextual(e)||this.unexpected(null,t)},G.canInsertSemicolon=function(){return this.match(T.eof)||this.match(T.braceR)||B.test(this.input.slice(this.state.lastTokEnd,this.state.start))},G.isLineTerminator=function(){return this.eat(T.semi)||this.canInsertSemicolon()},G.semicolon=function(){this.isLineTerminator()||this.unexpected(null,T.semi)},G.expect=function(e,t){return this.eat(e)||this.unexpected(t,e)},G.unexpected=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Unexpected token";t&&"object"===(void 0===t?"undefined":A(t))&&t.label&&(t="Unexpected token, expected "+t.label),this.raise(null!=e?e:this.state.start,t)};var X=q.prototype;X.parseTopLevel=function(e,t){return t.sourceType=this.options.sourceType,this.parseBlockBody(t,!0,!0,T.eof),e.program=this.finishNode(t,"Program"),e.comments=this.state.comments,e.tokens=this.state.tokens,this.finishNode(e,"File")};var W={kind:"loop"},J={kind:"switch"};X.stmtToDirective=function(e){var t=e.expression,r=this.startNodeAt(t.start,t.loc.start),n=this.startNodeAt(e.start,e.loc.start),i=this.input.slice(t.start,t.end),s=r.value=i.slice(1,-1);return this.addExtra(r,"raw",i),this.addExtra(r,"rawValue",s),n.value=this.finishNodeAt(r,"DirectiveLiteral",t.end,t.loc.end),this.finishNodeAt(n,"Directive",e.end,e.loc.end)},X.parseStatement=function(e,t){this.match(T.at)&&this.parseDecorators(!0);var r=this.state.type,n=this.startNode();switch(r){case T._break:case T._continue:return this.parseBreakContinueStatement(n,r.keyword);case T._debugger:return this.parseDebuggerStatement(n);case T._do:return this.parseDoStatement(n);case T._for:return this.parseForStatement(n);case T._function:return e||this.unexpected(),this.parseFunctionStatement(n);case T._class:return e||this.unexpected(),this.parseClass(n,!0);case T._if:return this.parseIfStatement(n);case T._return:return this.parseReturnStatement(n);case T._switch:return this.parseSwitchStatement(n);case T._throw:return this.parseThrowStatement(n);case T._try:return this.parseTryStatement(n);case T._let:case T._const:e||this.unexpected();case T._var:return this.parseVarStatement(n,r);case T._while:return this.parseWhileStatement(n);case T._with:return this.parseWithStatement(n);case T.braceL:return this.parseBlock();case T.semi:return this.parseEmptyStatement(n);case T._export:case T._import:if(this.hasPlugin("dynamicImport")&&this.lookahead().type===T.parenL)break;return this.options.allowImportExportEverywhere||(t||this.raise(this.state.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.state.start,"'import' and 'export' may appear only with 'sourceType: \"module\"'")),r===T._import?this.parseImport(n):this.parseExport(n);case T.name:if("async"===this.state.value){var i=this.state.clone();if(this.next(),this.match(T._function)&&!this.canInsertSemicolon())return this.expect(T._function),this.parseFunction(n,!0,!1,!0);this.state=i}}var s=this.state.value,a=this.parseExpression();return r===T.name&&"Identifier"===a.type&&this.eat(T.colon)?this.parseLabeledStatement(n,s,a):this.parseExpressionStatement(n,a)},X.takeDecorators=function(e){this.state.decorators.length&&(e.decorators=this.state.decorators,this.state.decorators=[])},X.parseDecorators=function(e){for(;this.match(T.at);){var t=this.parseDecorator();this.state.decorators.push(t)}e&&this.match(T._export)||this.match(T._class)||this.raise(this.state.start,"Leading decorators must be attached to a class declaration")},X.parseDecorator=function(){this.hasPlugin("decorators")||this.unexpected();var e=this.startNode();return this.next(),e.expression=this.parseMaybeAssign(),this.finishNode(e,"Decorator")},X.parseBreakContinueStatement=function(e,t){var r="break"===t;this.next(),this.isLineTerminator()?e.label=null:this.match(T.name)?(e.label=this.parseIdentifier(),this.semicolon()):this.unexpected();var n=void 0;for(n=0;n<this.state.labels.length;++n){var i=this.state.labels[n];if(null==e.label||i.name===e.label.name){if(null!=i.kind&&(r||"loop"===i.kind))break;if(e.label&&r)break}}return n===this.state.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,r?"BreakStatement":"ContinueStatement")},X.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},X.parseDoStatement=function(e){return this.next(),this.state.labels.push(W),e.body=this.parseStatement(!1),this.state.labels.pop(),this.expect(T._while),e.test=this.parseParenExpression(),this.eat(T.semi),this.finishNode(e,"DoWhileStatement")},X.parseForStatement=function(e){this.next(),this.state.labels.push(W);var t=!1;if(this.hasPlugin("asyncGenerators")&&this.state.inAsync&&this.isContextual("await")&&(t=!0,this.next()),this.expect(T.parenL),this.match(T.semi))return t&&this.unexpected(),this.parseFor(e,null);if(this.match(T._var)||this.match(T._let)||this.match(T._const)){var r=this.startNode(),n=this.state.type;return this.next(),this.parseVar(r,!0,n),this.finishNode(r,"VariableDeclaration"),!this.match(T._in)&&!this.isContextual("of")||1!==r.declarations.length||r.declarations[0].init?(t&&this.unexpected(),this.parseFor(e,r)):this.parseForIn(e,r,t)}var i={start:0},s=this.parseExpression(!0,i);if(this.match(T._in)||this.isContextual("of")){var a=this.isContextual("of")?"for-of statement":"for-in statement";return this.toAssignable(s,void 0,a),this.checkLVal(s,void 0,void 0,a),this.parseForIn(e,s,t)}return i.start&&this.unexpected(i.start),t&&this.unexpected(),this.parseFor(e,s)},X.parseFunctionStatement=function(e){return this.next(),this.parseFunction(e,!0)},X.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(!1),e.alternate=this.eat(T._else)?this.parseStatement(!1):null,this.finishNode(e,"IfStatement")},X.parseReturnStatement=function(e){return this.state.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.state.start,"'return' outside of function"),this.next(),this.isLineTerminator()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},X.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(T.braceL),this.state.labels.push(J);for(var t,r=void 0;!this.match(T.braceR);)if(this.match(T._case)||this.match(T._default)){var n=this.match(T._case);r&&this.finishNode(r,"SwitchCase"),e.cases.push(r=this.startNode()),r.consequent=[],this.next(),n?r.test=this.parseExpression():(t&&this.raise(this.state.lastTokStart,"Multiple default clauses"),t=!0,r.test=null),this.expect(T.colon)}else r?r.consequent.push(this.parseStatement(!0)):this.unexpected();return r&&this.finishNode(r,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(e,"SwitchStatement")},X.parseThrowStatement=function(e){return this.next(),B.test(this.input.slice(this.state.lastTokEnd,this.state.start))&&this.raise(this.state.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var K=[];X.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.match(T._catch)){var t=this.startNode();this.next(),this.expect(T.parenL),t.param=this.parseBindingAtom(),this.checkLVal(t.param,!0,Object.create(null),"catch clause"),this.expect(T.parenR),t.body=this.parseBlock(),e.handler=this.finishNode(t,"CatchClause")}return e.guardedHandlers=K,e.finalizer=this.eat(T._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},X.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},X.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.state.labels.push(W),e.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(e,"WhileStatement")},X.parseWithStatement=function(e){return this.state.strict&&this.raise(this.state.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement(!1),this.finishNode(e,"WithStatement")},X.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},X.parseLabeledStatement=function(e,t,r){for(var n=this.state.labels,i=Array.isArray(n),s=0,n=i?n:n[Symbol.iterator]();;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}a.name===t&&this.raise(r.start,"Label '"+t+"' is already declared")}for(var o=this.state.type.isLoop?"loop":this.match(T._switch)?"switch":null,u=this.state.labels.length-1;u>=0;u--){var l=this.state.labels[u];if(l.statementStart!==e.start)break;l.statementStart=this.state.start,l.kind=o}return this.state.labels.push({name:t,kind:o,statementStart:this.state.start}),e.body=this.parseStatement(!0),this.state.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")},X.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},X.parseBlock=function(e){var t=this.startNode();return this.expect(T.braceL),this.parseBlockBody(t,e,!1,T.braceR),this.finishNode(t,"BlockStatement")},X.isValidDirective=function(e){return"ExpressionStatement"===e.type&&"StringLiteral"===e.expression.type&&!e.expression.extra.parenthesized},X.parseBlockBody=function(e,t,r,n){e.body=[],e.directives=[];for(var i=!1,s=void 0,a=void 0;!this.eat(n);){i||!this.state.containsOctal||a||(a=this.state.octalPosition);var o=this.parseStatement(!0,r);if(t&&!i&&this.isValidDirective(o)){var u=this.stmtToDirective(o);e.directives.push(u),void 0===s&&"use strict"===u.value.value&&(s=this.state.strict,this.setStrict(!0),a&&this.raise(a,"Octal literal in strict mode"))}else i=!0,e.body.push(o)}!1===s&&this.setStrict(!1)},X.parseFor=function(e,t){return e.init=t,this.expect(T.semi),e.test=this.match(T.semi)?null:this.parseExpression(),this.expect(T.semi),e.update=this.match(T.parenR)?null:this.parseExpression(),this.expect(T.parenR),e.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(e,"ForStatement")},X.parseForIn=function(e,t,r){var n=void 0;return r?(this.eatContextual("of"),n="ForAwaitStatement"):(n=this.match(T._in)?"ForInStatement":"ForOfStatement",this.next()),e.left=t,e.right=this.parseExpression(),this.expect(T.parenR),e.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(e,n)},X.parseVar=function(e,t,r){for(e.declarations=[],e.kind=r.keyword;;){var n=this.startNode();if(this.parseVarHead(n),this.eat(T.eq)?n.init=this.parseMaybeAssign(t):r!==T._const||this.match(T._in)||this.isContextual("of")?"Identifier"===n.id.type||t&&(this.match(T._in)||this.isContextual("of"))?n.init=null:this.raise(this.state.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(n,"VariableDeclarator")),!this.eat(T.comma))break}return e},X.parseVarHead=function(e){e.id=this.parseBindingAtom(),this.checkLVal(e.id,!0,void 0,"variable declaration")},X.parseFunction=function(e,t,r,n,i){var s=this.state.inMethod;return this.state.inMethod=!1,this.initFunction(e,n),this.match(T.star)&&(e.async&&!this.hasPlugin("asyncGenerators")?this.unexpected():(e.generator=!0,this.next())),!t||i||this.match(T.name)||this.match(T._yield)||this.unexpected(),(this.match(T.name)||this.match(T._yield))&&(e.id=this.parseBindingIdentifier()),this.parseFunctionParams(e),this.parseFunctionBody(e,r),this.state.inMethod=s,this.finishNode(e,t?"FunctionDeclaration":"FunctionExpression")},X.parseFunctionParams=function(e){this.expect(T.parenL),e.params=this.parseBindingList(T.parenR)},X.parseClass=function(e,t,r){return this.next(),this.takeDecorators(e),this.parseClassId(e,t,r),this.parseClassSuper(e),this.parseClassBody(e),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},X.isClassProperty=function(){return this.match(T.eq)||this.match(T.semi)||this.match(T.braceR)},X.isClassMethod=function(){return this.match(T.parenL)},X.isNonstaticConstructor=function(e){return!(e.computed||e.static||"constructor"!==e.key.name&&"constructor"!==e.key.value)},X.parseClassBody=function(e){var t=this.state.strict;this.state.strict=!0;var r=!1,n=!1,i=[],s=this.startNode();for(s.body=[],this.expect(T.braceL);!this.eat(T.braceR);)if(this.eat(T.semi))i.length>0&&this.raise(this.state.lastTokEnd,"Decorators must not be followed by a semicolon");else if(this.match(T.at))i.push(this.parseDecorator());else{var a=this.startNode();if(i.length&&(a.decorators=i,i=[]),a.static=!1,this.match(T.name)&&"static"===this.state.value){var o=this.parseIdentifier(!0);if(this.isClassMethod()){a.kind="method",a.computed=!1,a.key=o,this.parseClassMethod(s,a,!1,!1);continue}if(this.isClassProperty()){a.computed=!1,a.key=o,s.body.push(this.parseClassProperty(a));continue}a.static=!0}if(this.eat(T.star))a.kind="method",this.parsePropertyName(a),this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Constructor can't be a generator"),a.computed||!a.static||"prototype"!==a.key.name&&"prototype"!==a.key.value||this.raise(a.key.start,"Classes may not have static property named prototype"),this.parseClassMethod(s,a,!0,!1);else{var u=this.match(T.name),l=this.parsePropertyName(a);if(a.computed||!a.static||"prototype"!==a.key.name&&"prototype"!==a.key.value||this.raise(a.key.start,"Classes may not have static property named prototype"),this.isClassMethod())this.isNonstaticConstructor(a)?(n?this.raise(l.start,"Duplicate constructor in the same class"):a.decorators&&this.raise(a.start,"You can't attach decorators to a class constructor"),n=!0,a.kind="constructor"):a.kind="method",this.parseClassMethod(s,a,!1,!1);else if(this.isClassProperty())this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Classes may not have a non-static field named 'constructor'"),s.body.push(this.parseClassProperty(a));else if(u&&"async"===l.name&&!this.isLineTerminator()){var c=this.hasPlugin("asyncGenerators")&&this.eat(T.star);a.kind="method",this.parsePropertyName(a),this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Constructor can't be an async function"),this.parseClassMethod(s,a,c,!0)}else!u||"get"!==l.name&&"set"!==l.name||this.isLineTerminator()&&this.match(T.star)?this.hasPlugin("classConstructorCall")&&u&&"call"===l.name&&this.match(T.name)&&"constructor"===this.state.value?(r?this.raise(a.start,"Duplicate constructor call in the same class"):a.decorators&&this.raise(a.start,"You can't attach decorators to a class constructor"),r=!0,a.kind="constructorCall",this.parsePropertyName(a),this.parseClassMethod(s,a,!1,!1)):this.isLineTerminator()?(this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Classes may not have a non-static field named 'constructor'"),s.body.push(this.parseClassProperty(a))):this.unexpected():(a.kind=l.name,this.parsePropertyName(a),this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Constructor can't have get/set modifier"),this.parseClassMethod(s,a,!1,!1),this.checkGetterSetterParamCount(a))}}i.length&&this.raise(this.state.start,"You have trailing decorators with no method"),e.body=this.finishNode(s,"ClassBody"),this.state.strict=t},X.parseClassProperty=function(e){return this.state.inClassProperty=!0,this.match(T.eq)?(this.hasPlugin("classProperties")||this.unexpected(),this.next(),e.value=this.parseMaybeAssign()):e.value=null,this.semicolon(),this.state.inClassProperty=!1,this.finishNode(e,"ClassProperty")},X.parseClassMethod=function(e,t,r,n){this.parseMethod(t,r,n),e.body.push(this.finishNode(t,"ClassMethod"))},X.parseClassId=function(e,t,r){this.match(T.name)?e.id=this.parseIdentifier():r||!t?e.id=null:this.unexpected()},X.parseClassSuper=function(e){e.superClass=this.eat(T._extends)?this.parseExprSubscripts():null},X.parseExport=function(e){if(this.next(),this.match(T.star)){var t=this.startNode();if(this.next(),!this.hasPlugin("exportExtensions")||!this.eatContextual("as"))return this.parseExportFrom(e,!0),this.finishNode(e,"ExportAllDeclaration");t.exported=this.parseIdentifier(),e.specifiers=[this.finishNode(t,"ExportNamespaceSpecifier")],this.parseExportSpecifiersMaybe(e),this.parseExportFrom(e,!0)}else if(this.hasPlugin("exportExtensions")&&this.isExportDefaultSpecifier()){var r=this.startNode();if(r.exported=this.parseIdentifier(!0),e.specifiers=[this.finishNode(r,"ExportDefaultSpecifier")],this.match(T.comma)&&this.lookahead().type===T.star){this.expect(T.comma);var n=this.startNode();this.expect(T.star),this.expectContextual("as"),n.exported=this.parseIdentifier(),e.specifiers.push(this.finishNode(n,"ExportNamespaceSpecifier"))}else this.parseExportSpecifiersMaybe(e);this.parseExportFrom(e,!0)}else{if(this.eat(T._default)){var i=this.startNode(),s=!1;return this.eat(T._function)?i=this.parseFunction(i,!0,!1,!1,!0):this.match(T._class)?i=this.parseClass(i,!0,!0):(s=!0,i=this.parseMaybeAssign()),e.declaration=i,s&&this.semicolon(),this.checkExport(e,!0,!0),this.finishNode(e,"ExportDefaultDeclaration")}this.shouldParseExportDeclaration()?(e.specifiers=[],e.source=null,e.declaration=this.parseExportDeclaration(e)):(e.declaration=null,e.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(e))}return this.checkExport(e,!0),this.finishNode(e,"ExportNamedDeclaration")},X.parseExportDeclaration=function(){return this.parseStatement(!0)},X.isExportDefaultSpecifier=function(){if(this.match(T.name))return"async"!==this.state.value;if(!this.match(T._default))return!1;var e=this.lookahead();return e.type===T.comma||e.type===T.name&&"from"===e.value},X.parseExportSpecifiersMaybe=function(e){this.eat(T.comma)&&(e.specifiers=e.specifiers.concat(this.parseExportSpecifiers()))},X.parseExportFrom=function(e,t){this.eatContextual("from")?(e.source=this.match(T.string)?this.parseExprAtom():this.unexpected(),this.checkExport(e)):t?this.unexpected():e.source=null,this.semicolon()},X.shouldParseExportDeclaration=function(){return"var"===this.state.type.keyword||"const"===this.state.type.keyword||"let"===this.state.type.keyword||"function"===this.state.type.keyword||"class"===this.state.type.keyword||this.isContextual("async")},X.checkExport=function(e,t,r){if(t)if(r)this.checkDuplicateExports(e,"default");else if(e.specifiers&&e.specifiers.length)for(var n=e.specifiers,i=Array.isArray(n),s=0,n=i?n:n[Symbol.iterator]();;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}var o=a;this.checkDuplicateExports(o,o.exported.name)}else if(e.declaration)if("FunctionDeclaration"===e.declaration.type||"ClassDeclaration"===e.declaration.type)this.checkDuplicateExports(e,e.declaration.id.name);else if("VariableDeclaration"===e.declaration.type)for(var u=e.declaration.declarations,l=Array.isArray(u),c=0,u=l?u:u[Symbol.iterator]();;){var p;if(l){if(c>=u.length)break;p=u[c++]}else{if((c=u.next()).done)break;p=c.value}var h=p;this.checkDeclaration(h.id)}if(this.state.decorators.length){var f=e.declaration&&("ClassDeclaration"===e.declaration.type||"ClassExpression"===e.declaration.type);e.declaration&&f||this.raise(e.start,"You can only use decorators on an export when exporting a class"),this.takeDecorators(e.declaration)}},X.checkDeclaration=function(e){if("ObjectPattern"===e.type)for(var t=e.properties,r=Array.isArray(t),n=0,t=r?t:t[Symbol.iterator]();;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i;this.checkDeclaration(s)}else if("ArrayPattern"===e.type)for(var a=e.elements,o=Array.isArray(a),u=0,a=o?a:a[Symbol.iterator]();;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if((u=a.next()).done)break;l=u.value}var c=l;c&&this.checkDeclaration(c)}else"ObjectProperty"===e.type?this.checkDeclaration(e.value):"RestElement"===e.type||"RestProperty"===e.type?this.checkDeclaration(e.argument):"Identifier"===e.type&&this.checkDuplicateExports(e,e.name)},X.checkDuplicateExports=function(e,t){this.state.exportedIdentifiers.indexOf(t)>-1&&this.raiseDuplicateExportError(e,t),this.state.exportedIdentifiers.push(t)},X.raiseDuplicateExportError=function(e,t){this.raise(e.start,"default"===t?"Only one default export allowed per module.":"`"+t+"` has already been exported. Exported identifiers must be unique.")},X.parseExportSpecifiers=function(){var e=[],t=!0,r=void 0;for(this.expect(T.braceL);!this.eat(T.braceR);){if(t)t=!1;else if(this.expect(T.comma),this.eat(T.braceR))break;var n=this.match(T._default);n&&!r&&(r=!0);var i=this.startNode();i.local=this.parseIdentifier(n),i.exported=this.eatContextual("as")?this.parseIdentifier(!0):i.local.__clone(),e.push(this.finishNode(i,"ExportSpecifier"))}return r&&!this.isContextual("from")&&this.unexpected(),e},X.parseImport=function(e){return this.eat(T._import),this.match(T.string)?(e.specifiers=[],e.source=this.parseExprAtom()):(e.specifiers=[],this.parseImportSpecifiers(e),this.expectContextual("from"),e.source=this.match(T.string)?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},X.parseImportSpecifiers=function(e){var t=!0;if(this.match(T.name)){var r=this.state.start,n=this.state.startLoc;if(e.specifiers.push(this.parseImportSpecifierDefault(this.parseIdentifier(),r,n)),!this.eat(T.comma))return}if(this.match(T.star)){var i=this.startNode();return this.next(),this.expectContextual("as"),i.local=this.parseIdentifier(),this.checkLVal(i.local,!0,void 0,"import namespace specifier"),void e.specifiers.push(this.finishNode(i,"ImportNamespaceSpecifier"))}for(this.expect(T.braceL);!this.eat(T.braceR);){if(t)t=!1;else if(this.eat(T.colon)&&this.unexpected(null,"ES2015 named imports do not destructure. Use another statement for destructuring after the import."),this.expect(T.comma),this.eat(T.braceR))break;this.parseImportSpecifier(e)}},X.parseImportSpecifier=function(e){var t=this.startNode();t.imported=this.parseIdentifier(!0),this.eatContextual("as")?t.local=this.parseIdentifier():(this.checkReservedWord(t.imported.name,t.start,!0,!0),t.local=t.imported.__clone()),this.checkLVal(t.local,!0,void 0,"import specifier"),e.specifiers.push(this.finishNode(t,"ImportSpecifier"))},X.parseImportSpecifierDefault=function(e,t,r){var n=this.startNodeAt(t,r);return n.local=e,this.checkLVal(n.local,!0,void 0,"default import specifier"),this.finishNode(n,"ImportDefaultSpecifier")};var z=q.prototype;z.toAssignable=function(e,t,r){if(e)switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":e.type="ObjectPattern";for(var n=e.properties,i=Array.isArray(n),s=0,n=i?n:n[Symbol.iterator]();;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}var o=a;"ObjectMethod"===o.type?"get"===o.kind||"set"===o.kind?this.raise(o.key.start,"Object pattern can't contain getter or setter"):this.raise(o.key.start,"Object pattern can't contain methods"):this.toAssignable(o,t,"object destructuring pattern")}break;case"ObjectProperty":this.toAssignable(e.value,t,r);break;case"SpreadProperty":e.type="RestProperty";var u=e.argument;this.toAssignable(u,t,r);break;case"ArrayExpression":e.type="ArrayPattern",this.toAssignableList(e.elements,t,r);break;case"AssignmentExpression":"="===e.operator?(e.type="AssignmentPattern",delete e.operator):this.raise(e.left.end,"Only '=' operator can be used for specifying default value.");break;case"MemberExpression":if(!t)break;default:var l="Invalid left-hand side"+(r?" in "+r:"expression");this.raise(e.start,l)}return e},z.toAssignableList=function(e,t,r){var n=e.length;if(n){var i=e[n-1];if(i&&"RestElement"===i.type)--n;else if(i&&"SpreadElement"===i.type){i.type="RestElement";var s=i.argument;this.toAssignable(s,t,r),"Identifier"!==s.type&&"MemberExpression"!==s.type&&"ArrayPattern"!==s.type&&this.unexpected(s.start),--n}}for(var a=0;a<n;a++){var o=e[a];o&&this.toAssignable(o,t,r)}return e},z.toReferencedList=function(e){return e},z.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},z.parseRest=function(){var e=this.startNode();return this.next(),e.argument=this.parseBindingIdentifier(),this.finishNode(e,"RestElement")},z.shouldAllowYieldIdentifier=function(){return this.match(T._yield)&&!this.state.strict&&!this.state.inGenerator},z.parseBindingIdentifier=function(){return this.parseIdentifier(this.shouldAllowYieldIdentifier())},z.parseBindingAtom=function(){switch(this.state.type){case T._yield:(this.state.strict||this.state.inGenerator)&&this.unexpected();case T.name:return this.parseIdentifier(!0);case T.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(T.bracketR,!0),this.finishNode(e,"ArrayPattern");case T.braceL:return this.parseObj(!0);default:this.unexpected()}},z.parseBindingList=function(e,t){for(var r=[],n=!0;!this.eat(e);)if(n?n=!1:this.expect(T.comma),t&&this.match(T.comma))r.push(null);else{if(this.eat(e))break;if(this.match(T.ellipsis)){r.push(this.parseAssignableListItemTypes(this.parseRest())),this.expect(e);break}for(var i=[];this.match(T.at);)i.push(this.parseDecorator());var s=this.parseMaybeDefault();i.length&&(s.decorators=i),this.parseAssignableListItemTypes(s),r.push(this.parseMaybeDefault(s.start,s.loc.start,s))}return r},z.parseAssignableListItemTypes=function(e){return e},z.parseMaybeDefault=function(e,t,r){if(t=t||this.state.startLoc,e=e||this.state.start,r=r||this.parseBindingAtom(),!this.eat(T.eq))return r;var n=this.startNodeAt(e,t);return n.left=r,n.right=this.parseMaybeAssign(),this.finishNode(n,"AssignmentPattern")},z.checkLVal=function(e,t,r,n){switch(e.type){case"Identifier":if(this.checkReservedWord(e.name,e.start,!1,!0),r){var i="_"+e.name;r[i]?this.raise(e.start,"Argument name clash in strict mode"):r[i]=!0}break;case"MemberExpression":t&&this.raise(e.start,(t?"Binding":"Assigning to")+" member expression");break;case"ObjectPattern":for(var s=e.properties,a=Array.isArray(s),o=0,s=a?s:s[Symbol.iterator]();;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if((o=s.next()).done)break;u=o.value}var l=u;"ObjectProperty"===l.type&&(l=l.value),this.checkLVal(l,t,r,"object destructuring pattern")}break;case"ArrayPattern":for(var c=e.elements,p=Array.isArray(c),h=0,c=p?c:c[Symbol.iterator]();;){var f;if(p){if(h>=c.length)break;f=c[h++]}else{if((h=c.next()).done)break;f=h.value}var d=f;d&&this.checkLVal(d,t,r,"array destructuring pattern")}break;case"AssignmentPattern":this.checkLVal(e.left,t,r,"assignment pattern");break;case"RestProperty":this.checkLVal(e.argument,t,r,"rest property");break;case"RestElement":this.checkLVal(e.argument,t,r,"rest element");break;default:var m=(t?"Binding invalid":"Invalid")+" left-hand side"+(n?" in "+n:"expression");this.raise(e.start,m)}};var Y=q.prototype;Y.checkPropClash=function(e,t){if(!e.computed&&!e.kind){var r=e.key;"__proto__"===("Identifier"===r.type?r.name:String(r.value))&&(t.proto&&this.raise(r.start,"Redefinition of __proto__ property"),t.proto=!0)}},Y.getExpression=function(){this.nextToken();var e=this.parseExpression();return this.match(T.eof)||this.unexpected(),e},Y.parseExpression=function(e,t){var r=this.state.start,n=this.state.startLoc,i=this.parseMaybeAssign(e,t);if(this.match(T.comma)){var s=this.startNodeAt(r,n);for(s.expressions=[i];this.eat(T.comma);)s.expressions.push(this.parseMaybeAssign(e,t));return this.toReferencedList(s.expressions),this.finishNode(s,"SequenceExpression")}return i},Y.parseMaybeAssign=function(e,t,r,n){var i=this.state.start,s=this.state.startLoc;if(this.match(T._yield)&&this.state.inGenerator){var a=this.parseYield();return r&&(a=r.call(this,a,i,s)),a}var o=void 0;t?o=!1:(t={start:0},o=!0),(this.match(T.parenL)||this.match(T.name))&&(this.state.potentialArrowAt=this.state.start);var u=this.parseMaybeConditional(e,t,n);if(r&&(u=r.call(this,u,i,s)),this.state.type.isAssign){var l=this.startNodeAt(i,s);if(l.operator=this.state.value,l.left=this.match(T.eq)?this.toAssignable(u,void 0,"assignment expression"):u,t.start=0,this.checkLVal(u,void 0,void 0,"assignment expression"),u.extra&&u.extra.parenthesized){var c=void 0;"ObjectPattern"===u.type?c="`({a}) = 0` use `({a} = 0)`":"ArrayPattern"===u.type&&(c="`([a]) = 0` use `([a] = 0)`"),c&&this.raise(u.start,"You're trying to assign to a parenthesized expression, eg. instead of "+c)}return this.next(),l.right=this.parseMaybeAssign(e),this.finishNode(l,"AssignmentExpression")}return o&&t.start&&this.unexpected(t.start),u},Y.parseMaybeConditional=function(e,t,r){var n=this.state.start,i=this.state.startLoc,s=this.parseExprOps(e,t);return t&&t.start?s:this.parseConditional(s,e,n,i,r)},Y.parseConditional=function(e,t,r,n){if(this.eat(T.question)){var i=this.startNodeAt(r,n);return i.test=e,i.consequent=this.parseMaybeAssign(),this.expect(T.colon),i.alternate=this.parseMaybeAssign(t),this.finishNode(i,"ConditionalExpression")}return e},Y.parseExprOps=function(e,t){var r=this.state.start,n=this.state.startLoc,i=this.parseMaybeUnary(t);return t&&t.start?i:this.parseExprOp(i,r,n,-1,e)},Y.parseExprOp=function(e,t,r,n,i){var s=this.state.type.binop;if(!(null==s||i&&this.match(T._in))&&s>n){var a=this.startNodeAt(t,r);a.left=e,a.operator=this.state.value,"**"!==a.operator||"UnaryExpression"!==e.type||!e.extra||e.extra.parenthesizedArgument||e.extra.parenthesized||this.raise(e.argument.start,"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.");var o=this.state.type;this.next();var u=this.state.start,l=this.state.startLoc;return a.right=this.parseExprOp(this.parseMaybeUnary(),u,l,o.rightAssociative?s-1:s,i),this.finishNode(a,o===T.logicalOR||o===T.logicalAND?"LogicalExpression":"BinaryExpression"),this.parseExprOp(a,t,r,n,i)}return e},Y.parseMaybeUnary=function(e){if(this.state.type.prefix){var t=this.startNode(),r=this.match(T.incDec);t.operator=this.state.value,t.prefix=!0,this.next();var n=this.state.type;return t.argument=this.parseMaybeUnary(),this.addExtra(t,"parenthesizedArgument",!(n!==T.parenL||t.argument.extra&&t.argument.extra.parenthesized)),e&&e.start&&this.unexpected(e.start),r?this.checkLVal(t.argument,void 0,void 0,"prefix operation"):this.state.strict&&"delete"===t.operator&&"Identifier"===t.argument.type&&this.raise(t.start,"Deleting local variable in strict mode"),this.finishNode(t,r?"UpdateExpression":"UnaryExpression")}var i=this.state.start,s=this.state.startLoc,a=this.parseExprSubscripts(e);if(e&&e.start)return a;for(;this.state.type.postfix&&!this.canInsertSemicolon();){var o=this.startNodeAt(i,s);o.operator=this.state.value,o.prefix=!1,o.argument=a,this.checkLVal(a,void 0,void 0,"postfix operation"),this.next(),a=this.finishNode(o,"UpdateExpression")}return a},Y.parseExprSubscripts=function(e){var t=this.state.start,r=this.state.startLoc,n=this.state.potentialArrowAt,i=this.parseExprAtom(e);return"ArrowFunctionExpression"===i.type&&i.start===n?i:e&&e.start?i:this.parseSubscripts(i,t,r)},Y.parseSubscripts=function(e,t,r,n){for(;;){if(!n&&this.eat(T.doubleColon)){var i=this.startNodeAt(t,r);return i.object=e,i.callee=this.parseNoCallExpr(),this.parseSubscripts(this.finishNode(i,"BindExpression"),t,r,n)}if(this.eat(T.dot)){var s=this.startNodeAt(t,r);s.object=e,s.property=this.parseIdentifier(!0),s.computed=!1,e=this.finishNode(s,"MemberExpression")}else if(this.eat(T.bracketL)){var a=this.startNodeAt(t,r);a.object=e,a.property=this.parseExpression(),a.computed=!0,this.expect(T.bracketR),e=this.finishNode(a,"MemberExpression")}else if(!n&&this.match(T.parenL)){var o=this.state.potentialArrowAt===e.start&&"Identifier"===e.type&&"async"===e.name&&!this.canInsertSemicolon();this.next();var u=this.startNodeAt(t,r);if(u.callee=e,u.arguments=this.parseCallExpressionArguments(T.parenR,o),"Import"===u.callee.type&&1!==u.arguments.length&&this.raise(u.start,"import() requires exactly one argument"),e=this.finishNode(u,"CallExpression"),o&&this.shouldParseAsyncArrow())return this.parseAsyncArrowFromCallExpression(this.startNodeAt(t,r),u);this.toReferencedList(u.arguments)}else{if(!this.match(T.backQuote))return e;var l=this.startNodeAt(t,r);l.tag=e,l.quasi=this.parseTemplate(!0),e=this.finishNode(l,"TaggedTemplateExpression")}}},Y.parseCallExpressionArguments=function(e,t){for(var r=[],n=void 0,i=!0;!this.eat(e);){if(i)i=!1;else if(this.expect(T.comma),this.eat(e))break;this.match(T.parenL)&&!n&&(n=this.state.start),r.push(this.parseExprListItem(!1,t?{start:0}:void 0,t?{start:0}:void 0))}return t&&n&&this.shouldParseAsyncArrow()&&this.unexpected(),r},Y.shouldParseAsyncArrow=function(){return this.match(T.arrow)},Y.parseAsyncArrowFromCallExpression=function(e,t){return this.expect(T.arrow),this.parseArrowExpression(e,t.arguments,!0)},Y.parseNoCallExpr=function(){var e=this.state.start,t=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,t,!0)},Y.parseExprAtom=function(e){var t=this.state.potentialArrowAt===this.state.start,r=void 0;switch(this.state.type){case T._super:return this.state.inMethod||this.state.inClassProperty||this.options.allowSuperOutsideMethod||this.raise(this.state.start,"'super' outside of function or class"),r=this.startNode(),this.next(),this.match(T.parenL)||this.match(T.bracketL)||this.match(T.dot)||this.unexpected(),this.match(T.parenL)&&"constructor"!==this.state.inMethod&&!this.options.allowSuperOutsideMethod&&this.raise(r.start,"super() outside of class constructor"),this.finishNode(r,"Super");case T._import:return this.hasPlugin("dynamicImport")||this.unexpected(),r=this.startNode(),this.next(),this.match(T.parenL)||this.unexpected(null,T.parenL),this.finishNode(r,"Import");case T._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case T._yield:this.state.inGenerator&&this.unexpected();case T.name:r=this.startNode();var n="await"===this.state.value&&this.state.inAsync,i=this.shouldAllowYieldIdentifier(),s=this.parseIdentifier(n||i);if("await"===s.name){if(this.state.inAsync||this.inModule)return this.parseAwait(r)}else{if("async"===s.name&&this.match(T._function)&&!this.canInsertSemicolon())return this.next(),this.parseFunction(r,!1,!1,!0);if(t&&"async"===s.name&&this.match(T.name)){var a=[this.parseIdentifier()];return this.expect(T.arrow),this.parseArrowExpression(r,a,!0)}}return t&&!this.canInsertSemicolon()&&this.eat(T.arrow)?this.parseArrowExpression(r,[s]):s;case T._do:if(this.hasPlugin("doExpressions")){var o=this.startNode();this.next();var u=this.state.inFunction,l=this.state.labels;return this.state.labels=[],this.state.inFunction=!1,o.body=this.parseBlock(!1,!0),this.state.inFunction=u,this.state.labels=l,this.finishNode(o,"DoExpression")}case T.regexp:var c=this.state.value;return r=this.parseLiteral(c.value,"RegExpLiteral"),r.pattern=c.pattern,r.flags=c.flags,r;case T.num:return this.parseLiteral(this.state.value,"NumericLiteral");case T.string:return this.parseLiteral(this.state.value,"StringLiteral");case T._null:return r=this.startNode(),this.next(),this.finishNode(r,"NullLiteral");case T._true:case T._false:return r=this.startNode(),r.value=this.match(T._true),this.next(),this.finishNode(r,"BooleanLiteral");case T.parenL:return this.parseParenAndDistinguishExpression(null,null,t);case T.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(T.bracketR,!0,e),this.toReferencedList(r.elements),this.finishNode(r,"ArrayExpression");case T.braceL:return this.parseObj(!1,e);case T._function:return this.parseFunctionExpression();case T.at:this.parseDecorators();case T._class:return r=this.startNode(),this.takeDecorators(r),this.parseClass(r,!1);case T._new:return this.parseNew();case T.backQuote:return this.parseTemplate(!1);case T.doubleColon:r=this.startNode(),this.next(),r.object=null;var p=r.callee=this.parseNoCallExpr();if("MemberExpression"===p.type)return this.finishNode(r,"BindExpression");this.raise(p.start,"Binding should be performed on object property.");default:this.unexpected()}},Y.parseFunctionExpression=function(){var e=this.startNode(),t=this.parseIdentifier(!0);return this.state.inGenerator&&this.eat(T.dot)&&this.hasPlugin("functionSent")?this.parseMetaProperty(e,t,"sent"):this.parseFunction(e,!1)},Y.parseMetaProperty=function(e,t,r){return e.meta=t,e.property=this.parseIdentifier(!0),e.property.name!==r&&this.raise(e.property.start,"The only valid meta property for new is "+t.name+"."+r),this.finishNode(e,"MetaProperty")},Y.parseLiteral=function(e,t,r,n){r=r||this.state.start,n=n||this.state.startLoc;var i=this.startNodeAt(r,n);return this.addExtra(i,"rawValue",e),this.addExtra(i,"raw",this.input.slice(r,this.state.end)),i.value=e,this.next(),this.finishNode(i,t)},Y.parseParenExpression=function(){this.expect(T.parenL);var e=this.parseExpression();return this.expect(T.parenR),e},Y.parseParenAndDistinguishExpression=function(e,t,r){e=e||this.state.start,t=t||this.state.startLoc;var n=void 0;this.expect(T.parenL);for(var i=this.state.start,s=this.state.startLoc,a=[],o={start:0},u={start:0},l=!0,c=void 0,p=void 0;!this.match(T.parenR);){if(l)l=!1;else if(this.expect(T.comma,u.start||null),this.match(T.parenR)){p=this.state.start;break}if(this.match(T.ellipsis)){var h=this.state.start,f=this.state.startLoc;c=this.state.start,a.push(this.parseParenItem(this.parseRest(),h,f));break}a.push(this.parseMaybeAssign(!1,o,this.parseParenItem,u))}var d=this.state.start,m=this.state.startLoc;this.expect(T.parenR);var y=this.startNodeAt(e,t);if(r&&this.shouldParseArrow()&&(y=this.parseArrow(y))){for(var g=a,b=Array.isArray(g),v=0,g=b?g:g[Symbol.iterator]();;){var x;if(b){if(v>=g.length)break;x=g[v++]}else{if((v=g.next()).done)break;x=v.value}var E=x;E.extra&&E.extra.parenthesized&&this.unexpected(E.extra.parenStart)}return this.parseArrowExpression(y,a)}return a.length||this.unexpected(this.state.lastTokStart),p&&this.unexpected(p),c&&this.unexpected(c),o.start&&this.unexpected(o.start),u.start&&this.unexpected(u.start),a.length>1?((n=this.startNodeAt(i,s)).expressions=a,this.toReferencedList(n.expressions),this.finishNodeAt(n,"SequenceExpression",d,m)):n=a[0],this.addExtra(n,"parenthesized",!0),this.addExtra(n,"parenStart",e),n},Y.shouldParseArrow=function(){return!this.canInsertSemicolon()},Y.parseArrow=function(e){if(this.eat(T.arrow))return e},Y.parseParenItem=function(e){return e},Y.parseNew=function(){var e=this.startNode(),t=this.parseIdentifier(!0);if(this.eat(T.dot)){var r=this.parseMetaProperty(e,t,"target");return this.state.inFunction||this.raise(r.property.start,"new.target can only be used in functions"),r}return e.callee=this.parseNoCallExpr(),this.eat(T.parenL)?(e.arguments=this.parseExprList(T.parenR),this.toReferencedList(e.arguments)):e.arguments=[],this.finishNode(e,"NewExpression")},Y.parseTemplateElement=function(e){var t=this.startNode();return null===this.state.value&&(e&&this.hasPlugin("templateInvalidEscapes")?this.state.invalidTemplateEscapePosition=null:this.raise(this.state.invalidTemplateEscapePosition,"Invalid escape sequence in template")),t.value={raw:this.input.slice(this.state.start,this.state.end).replace(/\r\n?/g,"\n"),cooked:this.state.value},this.next(),t.tail=this.match(T.backQuote),this.finishNode(t,"TemplateElement")},Y.parseTemplate=function(e){var t=this.startNode();this.next(),t.expressions=[];var r=this.parseTemplateElement(e);for(t.quasis=[r];!r.tail;)this.expect(T.dollarBraceL),t.expressions.push(this.parseExpression()),this.expect(T.braceR),t.quasis.push(r=this.parseTemplateElement(e));return this.next(),this.finishNode(t,"TemplateLiteral")},Y.parseObj=function(e,t){var r=[],n=Object.create(null),i=!0,s=this.startNode();s.properties=[],this.next();for(var a=null;!this.eat(T.braceR);){if(i)i=!1;else if(this.expect(T.comma),this.eat(T.braceR))break;for(;this.match(T.at);)r.push(this.parseDecorator());var o=this.startNode(),u=!1,l=!1,c=void 0,p=void 0;if(r.length&&(o.decorators=r,r=[]),this.hasPlugin("objectRestSpread")&&this.match(T.ellipsis)){if(o=this.parseSpread(e?{start:0}:void 0),o.type=e?"RestProperty":"SpreadProperty",e&&this.toAssignable(o.argument,!0,"object pattern"),s.properties.push(o),!e)continue;var h=this.state.start;if(null===a){if(this.eat(T.braceR))break;if(this.match(T.comma)&&this.lookahead().type===T.braceR)continue;a=h;continue}this.unexpected(a,"Cannot have multiple rest elements when destructuring")}if(o.method=!1,o.shorthand=!1,(e||t)&&(c=this.state.start,p=this.state.startLoc),e||(u=this.eat(T.star)),!e&&this.isContextual("async")){u&&this.unexpected();var f=this.parseIdentifier();this.match(T.colon)||this.match(T.parenL)||this.match(T.braceR)||this.match(T.eq)||this.match(T.comma)?(o.key=f,o.computed=!1):(l=!0,this.hasPlugin("asyncGenerators")&&(u=this.eat(T.star)),this.parsePropertyName(o))}else this.parsePropertyName(o);this.parseObjPropValue(o,c,p,u,l,e,t),this.checkPropClash(o,n),o.shorthand&&this.addExtra(o,"shorthand",!0),s.properties.push(o)}return null!==a&&this.unexpected(a,"The rest element has to be the last element when destructuring"),r.length&&this.raise(this.state.start,"You have trailing decorators with no property"),this.finishNode(s,e?"ObjectPattern":"ObjectExpression")},Y.isGetterOrSetterMethod=function(e,t){return!t&&!e.computed&&"Identifier"===e.key.type&&("get"===e.key.name||"set"===e.key.name)&&(this.match(T.string)||this.match(T.num)||this.match(T.bracketL)||this.match(T.name)||this.state.type.keyword)},Y.checkGetterSetterParamCount=function(e){var t="get"===e.kind?0:1;if(e.params.length!==t){var r=e.start;"get"===e.kind?this.raise(r,"getter should have no params"):this.raise(r,"setter should have exactly one param")}},Y.parseObjectMethod=function(e,t,r,n){return r||t||this.match(T.parenL)?(n&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,r),this.finishNode(e,"ObjectMethod")):this.isGetterOrSetterMethod(e,n)?((t||r)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),this.parseMethod(e),this.checkGetterSetterParamCount(e),this.finishNode(e,"ObjectMethod")):void 0},Y.parseObjectProperty=function(e,t,r,n,i){return this.eat(T.colon)?(e.value=n?this.parseMaybeDefault(this.state.start,this.state.startLoc):this.parseMaybeAssign(!1,i),this.finishNode(e,"ObjectProperty")):e.computed||"Identifier"!==e.key.type?void 0:(this.checkReservedWord(e.key.name,e.key.start,!0,!0),n?e.value=this.parseMaybeDefault(t,r,e.key.__clone()):this.match(T.eq)&&i?(i.start||(i.start=this.state.start),e.value=this.parseMaybeDefault(t,r,e.key.__clone())):e.value=e.key.__clone(),e.shorthand=!0,this.finishNode(e,"ObjectProperty"))},Y.parseObjPropValue=function(e,t,r,n,i,s,a){var o=this.parseObjectMethod(e,n,i,s)||this.parseObjectProperty(e,t,r,s,a);return o||this.unexpected(),o},Y.parsePropertyName=function(e){if(this.eat(T.bracketL))e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(T.bracketR);else{e.computed=!1;var t=this.state.inPropertyName;this.state.inPropertyName=!0,e.key=this.match(T.num)||this.match(T.string)?this.parseExprAtom():this.parseIdentifier(!0),this.state.inPropertyName=t}return e.key},Y.initFunction=function(e,t){e.id=null,e.generator=!1,e.expression=!1,e.async=!!t},Y.parseMethod=function(e,t,r){var n=this.state.inMethod;return this.state.inMethod=e.kind||!0,this.initFunction(e,r),this.expect(T.parenL),e.params=this.parseBindingList(T.parenR),e.generator=!!t,this.parseFunctionBody(e),this.state.inMethod=n,e},Y.parseArrowExpression=function(e,t,r){return this.initFunction(e,r),e.params=this.toAssignableList(t,!0,"arrow function parameters"),this.parseFunctionBody(e,!0),this.finishNode(e,"ArrowFunctionExpression")},Y.isStrictBody=function(e,t){if(!t&&e.body.directives.length)for(var r=e.body.directives,n=Array.isArray(r),i=0,r=n?r:r[Symbol.iterator]();;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}if("use strict"===s.value.value)return!0}return!1},Y.parseFunctionBody=function(e,t){var r=t&&!this.match(T.braceL),n=this.state.inAsync;if(this.state.inAsync=e.async,r)e.body=this.parseMaybeAssign(),e.expression=!0;else{var i=this.state.inFunction,s=this.state.inGenerator,a=this.state.labels;this.state.inFunction=!0,this.state.inGenerator=e.generator,this.state.labels=[],e.body=this.parseBlock(!0),e.expression=!1,this.state.inFunction=i,this.state.inGenerator=s,this.state.labels=a}this.state.inAsync=n;var o=this.isStrictBody(e,r),u=this.state.strict||t||o;if(o&&e.id&&"Identifier"===e.id.type&&"yield"===e.id.name&&this.raise(e.id.start,"Binding yield in strict mode"),u){var l=Object.create(null),c=this.state.strict;o&&(this.state.strict=!0),e.id&&this.checkLVal(e.id,!0,void 0,"function name");for(var p=e.params,h=Array.isArray(p),f=0,p=h?p:p[Symbol.iterator]();;){var d;if(h){if(f>=p.length)break;d=p[f++]}else{if((f=p.next()).done)break;d=f.value}var m=d;o&&"Identifier"!==m.type&&this.raise(m.start,"Non-simple parameter in strict mode"),this.checkLVal(m,!0,l,"function parameter list")}this.state.strict=c}},Y.parseExprList=function(e,t,r){for(var n=[],i=!0;!this.eat(e);){if(i)i=!1;else if(this.expect(T.comma),this.eat(e))break;n.push(this.parseExprListItem(t,r))}return n},Y.parseExprListItem=function(e,t,r){return e&&this.match(T.comma)?null:this.match(T.ellipsis)?this.parseSpread(t):this.parseMaybeAssign(!1,t,this.parseParenItem,r)},Y.parseIdentifier=function(e){var t=this.startNode();return e||this.checkReservedWord(this.state.value,this.state.start,!!this.state.type.keyword,!1),this.match(T.name)?t.name=this.state.value:this.state.type.keyword?t.name=this.state.type.keyword:this.unexpected(),!e&&"await"===t.name&&this.state.inAsync&&this.raise(t.start,"invalid use of await inside of an async function"),t.loc.identifierName=t.name,this.next(),this.finishNode(t,"Identifier")},Y.checkReservedWord=function(e,t,r,n){(this.isReservedWord(e)||r&&this.isKeyword(e))&&this.raise(t,e+" is a reserved word"),this.state.strict&&(f.strict(e)||n&&f.strictBind(e))&&this.raise(t,e+" is a reserved word in strict mode")},Y.parseAwait=function(e){return this.state.inAsync||this.unexpected(),this.match(T.star)&&this.raise(e.start,"await* has been removed from the async functions proposal. Use Promise.all() instead."),e.argument=this.parseMaybeUnary(),this.finishNode(e,"AwaitExpression")},Y.parseYield=function(){var e=this.startNode();return this.next(),this.match(T.semi)||this.canInsertSemicolon()||!this.match(T.star)&&!this.state.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(T.star),e.argument=this.parseMaybeAssign()),this.finishNode(e,"YieldExpression")};var H=q.prototype,$=["leadingComments","trailingComments","innerComments"],Q=function(){function e(t,r,n){D(this,e),this.type="",this.start=t,this.end=0,this.loc=new M(r),n&&(this.loc.filename=n)}return e.prototype.__clone=function(){var t=new e;for(var r in this)$.indexOf(r)<0&&(t[r]=this[r]);return t},e}();H.startNode=function(){return new Q(this.state.start,this.state.startLoc,this.filename)},H.startNodeAt=function(e,t){return new Q(e,t,this.filename)},H.finishNode=function(e,t){return l.call(this,e,t,this.state.lastTokEnd,this.state.lastTokEndLoc)},H.finishNodeAt=function(e,t,r,n){return l.call(this,e,t,r,n)};q.prototype.raise=function(e,t){var r=function(e,t){for(var r=1,n=0;;){O.lastIndex=n;var i=O.exec(e);if(!(i&&i.index<t))return new L(r,t-n);++r,n=i.index+i[0].length}}(this.input,e);t+=" ("+r.line+":"+r.column+")";var n=new SyntaxError(t);throw n.pos=e,n.loc=r,n};var Z=q.prototype;Z.addComment=function(e){this.filename&&(e.loc.filename=this.filename),this.state.trailingComments.push(e),this.state.leadingComments.push(e)},Z.processComment=function(e){if(!("Program"===e.type&&e.body.length>0)){var t=this.state.commentStack,r=void 0,n=void 0,i=void 0,s=void 0,a=void 0;if(this.state.trailingComments.length>0)this.state.trailingComments[0].start>=e.end?(i=this.state.trailingComments,this.state.trailingComments=[]):this.state.trailingComments.length=0;else{var o=c(t);t.length>0&&o.trailingComments&&o.trailingComments[0].start>=e.end&&(i=o.trailingComments,o.trailingComments=null)}for(t.length>0&&c(t).start>=e.start&&(r=t.pop());t.length>0&&c(t).start>=e.start;)n=t.pop();if(!n&&r&&(n=r),r&&this.state.leadingComments.length>0){var u=c(this.state.leadingComments);if("ObjectProperty"===r.type){if(u.start>=e.start&&this.state.commentPreviousNode){for(a=0;a<this.state.leadingComments.length;a++)this.state.leadingComments[a].end<this.state.commentPreviousNode.end&&(this.state.leadingComments.splice(a,1),a--);this.state.leadingComments.length>0&&(r.trailingComments=this.state.leadingComments,this.state.leadingComments=[])}}else if("CallExpression"===e.type&&e.arguments&&e.arguments.length){var l=c(e.arguments);l&&u.start>=l.start&&u.end<=e.end&&this.state.commentPreviousNode&&this.state.leadingComments.length>0&&(l.trailingComments=this.state.leadingComments,this.state.leadingComments=[])}}if(n){if(n.leadingComments)if(n!==e&&c(n.leadingComments).end<=e.start)e.leadingComments=n.leadingComments,n.leadingComments=null;else for(s=n.leadingComments.length-2;s>=0;--s)if(n.leadingComments[s].end<=e.start){e.leadingComments=n.leadingComments.splice(0,s+1);break}}else if(this.state.leadingComments.length>0)if(c(this.state.leadingComments).end<=e.start){if(this.state.commentPreviousNode)for(a=0;a<this.state.leadingComments.length;a++)this.state.leadingComments[a].end<this.state.commentPreviousNode.end&&(this.state.leadingComments.splice(a,1),a--);this.state.leadingComments.length>0&&(e.leadingComments=this.state.leadingComments,this.state.leadingComments=[])}else{for(s=0;s<this.state.leadingComments.length&&!(this.state.leadingComments[s].end>e.start);s++);e.leadingComments=this.state.leadingComments.slice(0,s),0===e.leadingComments.length&&(e.leadingComments=null),0===(i=this.state.leadingComments.slice(s)).length&&(i=null)}this.state.commentPreviousNode=e,i&&(i.length&&i[0].start>=e.start&&c(i).end<=e.end?e.innerComments=i:e.trailingComments=i),t.push(e)}};var ee=q.prototype;ee.estreeParseRegExpLiteral=function(e){var t=e.pattern,r=e.flags,n=null;try{n=new RegExp(t,r)}catch(e){}var i=this.estreeParseLiteral(n);return i.regex={pattern:t,flags:r},i},ee.estreeParseLiteral=function(e){return this.parseLiteral(e,"Literal")},ee.directiveToStmt=function(e){var t=e.value,r=this.startNodeAt(e.start,e.loc.start),n=this.startNodeAt(t.start,t.loc.start);return n.value=t.value,n.raw=t.extra.raw,r.expression=this.finishNodeAt(n,"Literal",t.end,t.loc.end),r.directive=t.extra.raw.slice(1,-1),this.finishNodeAt(r,"ExpressionStatement",e.end,e.loc.end)};var te=["any","mixed","empty","bool","boolean","number","string","void","null"],re=q.prototype;re.flowParseTypeInitialiser=function(e){var t=this.state.inType;this.state.inType=!0,this.expect(e||T.colon);var r=this.flowParseType();return this.state.inType=t,r},re.flowParsePredicate=function(){var e=this.startNode(),t=this.state.startLoc,r=this.state.start;this.expect(T.modulo);var n=this.state.startLoc;return this.expectContextual("checks"),t.line===n.line&&t.column===n.column-1||this.raise(r,"Spaces between ´%´ and ´checks´ are not allowed here."),this.eat(T.parenL)?(e.expression=this.parseExpression(),this.expect(T.parenR),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")},re.flowParseTypeAndPredicateInitialiser=function(){var e=this.state.inType;this.state.inType=!0,this.expect(T.colon);var t=null,r=null;return this.match(T.modulo)?(this.state.inType=e,r=this.flowParsePredicate()):(t=this.flowParseType(),this.state.inType=e,this.match(T.modulo)&&(r=this.flowParsePredicate())),[t,r]},re.flowParseDeclareClass=function(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")},re.flowParseDeclareFunction=function(e){this.next();var t=e.id=this.parseIdentifier(),r=this.startNode(),n=this.startNode();this.isRelational("<")?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,this.expect(T.parenL);var i=this.flowParseFunctionTypeParams();r.params=i.params,r.rest=i.rest,this.expect(T.parenR);var s=null,a=this.flowParseTypeAndPredicateInitialiser();return r.returnType=a[0],s=a[1],n.typeAnnotation=this.finishNode(r,"FunctionTypeAnnotation"),n.predicate=s,t.typeAnnotation=this.finishNode(n,"TypeAnnotation"),this.finishNode(t,t.type),this.semicolon(),this.finishNode(e,"DeclareFunction")},re.flowParseDeclare=function(e){return this.match(T._class)?this.flowParseDeclareClass(e):this.match(T._function)?this.flowParseDeclareFunction(e):this.match(T._var)?this.flowParseDeclareVariable(e):this.isContextual("module")?this.lookahead().type===T.dot?this.flowParseDeclareModuleExports(e):this.flowParseDeclareModule(e):this.isContextual("type")?this.flowParseDeclareTypeAlias(e):this.isContextual("opaque")?this.flowParseDeclareOpaqueType(e):this.isContextual("interface")?this.flowParseDeclareInterface(e):this.match(T._export)?this.flowParseDeclareExportDeclaration(e):void this.unexpected()},re.flowParseDeclareExportDeclaration=function(e){if(this.expect(T._export),this.isContextual("opaque"))return e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,"DeclareExportDeclaration");throw this.unexpected()},re.flowParseDeclareVariable=function(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(),this.semicolon(),this.finishNode(e,"DeclareVariable")},re.flowParseDeclareModule=function(e){this.next(),this.match(T.string)?e.id=this.parseExprAtom():e.id=this.parseIdentifier();var t=e.body=this.startNode(),r=t.body=[];for(this.expect(T.braceL);!this.match(T.braceR);){var n=this.startNode();if(this.match(T._import)){var i=this.lookahead();"type"!==i.value&&"typeof"!==i.value&&this.unexpected(null,"Imports within a `declare module` body must always be `import type` or `import typeof`"),this.parseImport(n)}else this.expectContextual("declare","Only declares and type imports are allowed inside declare module"),n=this.flowParseDeclare(n,!0);r.push(n)}return this.expect(T.braceR),this.finishNode(t,"BlockStatement"),this.finishNode(e,"DeclareModule")},re.flowParseDeclareModuleExports=function(e){return this.expectContextual("module"),this.expect(T.dot),this.expectContextual("exports"),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")},re.flowParseDeclareTypeAlias=function(e){return this.next(),this.flowParseTypeAlias(e),this.finishNode(e,"DeclareTypeAlias")},re.flowParseDeclareOpaqueType=function(e){return this.next(),this.flowParseOpaqueType(e,!0),this.finishNode(e,"DeclareOpaqueType")},re.flowParseDeclareInterface=function(e){return this.next(),this.flowParseInterfaceish(e),this.finishNode(e,"DeclareInterface")},re.flowParseInterfaceish=function(e){if(e.id=this.parseIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],e.mixins=[],this.eat(T._extends))do{e.extends.push(this.flowParseInterfaceExtends())}while(this.eat(T.comma));if(this.isContextual("mixins")){this.next();do{e.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(T.comma))}e.body=this.flowParseObjectType(!0,!1,!1)},re.flowParseInterfaceExtends=function(){var e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")},re.flowParseInterface=function(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")},re.flowParseRestrictedIdentifier=function(e){return te.indexOf(this.state.value)>-1&&this.raise(this.state.start,"Cannot overwrite primitive type "+this.state.value),this.parseIdentifier(e)},re.flowParseTypeAlias=function(e){return e.id=this.flowParseRestrictedIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(T.eq),this.semicolon(),this.finishNode(e,"TypeAlias")},re.flowParseOpaqueType=function(e,t){return this.expectContextual("type"),e.id=this.flowParseRestrictedIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(T.colon)&&(e.supertype=this.flowParseTypeInitialiser(T.colon)),e.impltype=null,t||(e.impltype=this.flowParseTypeInitialiser(T.eq)),this.semicolon(),this.finishNode(e,"OpaqueType")},re.flowParseTypeParameter=function(){var e=this.startNode(),t=this.flowParseVariance(),r=this.flowParseTypeAnnotatableIdentifier();return e.name=r.name,e.variance=t,e.bound=r.typeAnnotation,this.match(T.eq)&&(this.eat(T.eq),e.default=this.flowParseType()),this.finishNode(e,"TypeParameter")},re.flowParseTypeParameterDeclaration=function(){var e=this.state.inType,t=this.startNode();t.params=[],this.state.inType=!0,this.isRelational("<")||this.match(T.jsxTagStart)?this.next():this.unexpected();do{t.params.push(this.flowParseTypeParameter()),this.isRelational(">")||this.expect(T.comma)}while(!this.isRelational(">"));return this.expectRelational(">"),this.state.inType=e,this.finishNode(t,"TypeParameterDeclaration")},re.flowParseTypeParameterInstantiation=function(){var e=this.startNode(),t=this.state.inType;for(e.params=[],this.state.inType=!0,this.expectRelational("<");!this.isRelational(">");)e.params.push(this.flowParseType()),this.isRelational(">")||this.expect(T.comma);return this.expectRelational(">"),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")},re.flowParseObjectPropertyKey=function(){return this.match(T.num)||this.match(T.string)?this.parseExprAtom():this.parseIdentifier(!0)},re.flowParseObjectTypeIndexer=function(e,t,r){return e.static=t,this.expect(T.bracketL),this.lookahead().type===T.colon?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(T.bracketR),e.value=this.flowParseTypeInitialiser(),e.variance=r,this.flowObjectTypeSemicolon(),this.finishNode(e,"ObjectTypeIndexer")},re.flowParseObjectTypeMethodish=function(e){for(e.params=[],e.rest=null,e.typeParameters=null,this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(T.parenL);!this.match(T.parenR)&&!this.match(T.ellipsis);)e.params.push(this.flowParseFunctionTypeParam()),this.match(T.parenR)||this.expect(T.comma);return this.eat(T.ellipsis)&&(e.rest=this.flowParseFunctionTypeParam()),this.expect(T.parenR),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")},re.flowParseObjectTypeMethod=function(e,t,r,n){var i=this.startNodeAt(e,t);return i.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e,t)),i.static=r,i.key=n,i.optional=!1,this.flowObjectTypeSemicolon(),this.finishNode(i,"ObjectTypeProperty")},re.flowParseObjectTypeCallProperty=function(e,t){var r=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(r),this.flowObjectTypeSemicolon(),this.finishNode(e,"ObjectTypeCallProperty")},re.flowParseObjectType=function(e,t,r){var n=this.state.inType;this.state.inType=!0;var i=this.startNode(),s=void 0,a=void 0,o=!1;i.callProperties=[],i.properties=[],i.indexers=[];var u=void 0,l=void 0;for(t&&this.match(T.braceBarL)?(this.expect(T.braceBarL),u=T.braceBarR,l=!0):(this.expect(T.braceL),u=T.braceR,l=!1),i.exact=l;!this.match(u);){var c=!1,p=this.state.start,h=this.state.startLoc;s=this.startNode(),e&&this.isContextual("static")&&this.lookahead().type!==T.colon&&(this.next(),o=!0);var f=this.state.start,d=this.flowParseVariance();this.match(T.bracketL)?i.indexers.push(this.flowParseObjectTypeIndexer(s,o,d)):this.match(T.parenL)||this.isRelational("<")?(d&&this.unexpected(f),i.callProperties.push(this.flowParseObjectTypeCallProperty(s,o))):this.match(T.ellipsis)?(r||this.unexpected(null,"Spread operator cannot appear in class or interface definitions"),d&&this.unexpected(d.start,"Spread properties cannot have variance"),this.expect(T.ellipsis),s.argument=this.flowParseType(),this.flowObjectTypeSemicolon(),i.properties.push(this.finishNode(s,"ObjectTypeSpreadProperty"))):(a=this.flowParseObjectPropertyKey(),this.isRelational("<")||this.match(T.parenL)?(d&&this.unexpected(d.start),i.properties.push(this.flowParseObjectTypeMethod(p,h,o,a))):(this.eat(T.question)&&(c=!0),s.key=a,s.value=this.flowParseTypeInitialiser(),s.optional=c,s.static=o,s.variance=d,this.flowObjectTypeSemicolon(),i.properties.push(this.finishNode(s,"ObjectTypeProperty")))),o=!1}this.expect(u);var m=this.finishNode(i,"ObjectTypeAnnotation");return this.state.inType=n,m},re.flowObjectTypeSemicolon=function(){this.eat(T.semi)||this.eat(T.comma)||this.match(T.braceR)||this.match(T.braceBarR)||this.unexpected()},re.flowParseQualifiedTypeIdentifier=function(e,t,r){e=e||this.state.start,t=t||this.state.startLoc;for(var n=r||this.parseIdentifier();this.eat(T.dot);){var i=this.startNodeAt(e,t);i.qualification=n,i.id=this.parseIdentifier(),n=this.finishNode(i,"QualifiedTypeIdentifier")}return n},re.flowParseGenericType=function(e,t,r){var n=this.startNodeAt(e,t);return n.typeParameters=null,n.id=this.flowParseQualifiedTypeIdentifier(e,t,r),this.isRelational("<")&&(n.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(n,"GenericTypeAnnotation")},re.flowParseTypeofType=function(){var e=this.startNode();return this.expect(T._typeof),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")},re.flowParseTupleType=function(){var e=this.startNode();for(e.types=[],this.expect(T.bracketL);this.state.pos<this.input.length&&!this.match(T.bracketR)&&(e.types.push(this.flowParseType()),!this.match(T.bracketR));)this.expect(T.comma);return this.expect(T.bracketR),this.finishNode(e,"TupleTypeAnnotation")},re.flowParseFunctionTypeParam=function(){var e=null,t=!1,r=null,n=this.startNode(),i=this.lookahead();return i.type===T.colon||i.type===T.question?(e=this.parseIdentifier(),this.eat(T.question)&&(t=!0),r=this.flowParseTypeInitialiser()):r=this.flowParseType(),n.name=e,n.optional=t,n.typeAnnotation=r,this.finishNode(n,"FunctionTypeParam")},re.reinterpretTypeAsFunctionTypeParam=function(e){var t=this.startNodeAt(e.start,e.loc.start);return t.name=null,t.optional=!1,t.typeAnnotation=e,this.finishNode(t,"FunctionTypeParam")},re.flowParseFunctionTypeParams=function(){for(var e={params:arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],rest:null};!this.match(T.parenR)&&!this.match(T.ellipsis);)e.params.push(this.flowParseFunctionTypeParam()),this.match(T.parenR)||this.expect(T.comma);return this.eat(T.ellipsis)&&(e.rest=this.flowParseFunctionTypeParam()),e},re.flowIdentToTypeAnnotation=function(e,t,r,n){switch(n.name){case"any":return this.finishNode(r,"AnyTypeAnnotation");case"void":return this.finishNode(r,"VoidTypeAnnotation");case"bool":case"boolean":return this.finishNode(r,"BooleanTypeAnnotation");case"mixed":return this.finishNode(r,"MixedTypeAnnotation");case"empty":return this.finishNode(r,"EmptyTypeAnnotation");case"number":return this.finishNode(r,"NumberTypeAnnotation");case"string":return this.finishNode(r,"StringTypeAnnotation");default:return this.flowParseGenericType(e,t,n)}},re.flowParsePrimaryType=function(){var e=this.state.start,t=this.state.startLoc,r=this.startNode(),n=void 0,i=void 0,s=!1,a=this.state.noAnonFunctionType;switch(this.state.type){case T.name:return this.flowIdentToTypeAnnotation(e,t,r,this.parseIdentifier());case T.braceL:return this.flowParseObjectType(!1,!1,!0);case T.braceBarL:return this.flowParseObjectType(!1,!0,!0);case T.bracketL:return this.flowParseTupleType();case T.relational:if("<"===this.state.value)return r.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(T.parenL),n=this.flowParseFunctionTypeParams(),r.params=n.params,r.rest=n.rest,this.expect(T.parenR),this.expect(T.arrow),r.returnType=this.flowParseType(),this.finishNode(r,"FunctionTypeAnnotation");break;case T.parenL:if(this.next(),!this.match(T.parenR)&&!this.match(T.ellipsis))if(this.match(T.name)){var o=this.lookahead().type;s=o!==T.question&&o!==T.colon}else s=!0;if(s){if(this.state.noAnonFunctionType=!1,i=this.flowParseType(),this.state.noAnonFunctionType=a,this.state.noAnonFunctionType||!(this.match(T.comma)||this.match(T.parenR)&&this.lookahead().type===T.arrow))return this.expect(T.parenR),i;this.eat(T.comma)}return n=i?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(i)]):this.flowParseFunctionTypeParams(),r.params=n.params,r.rest=n.rest,this.expect(T.parenR),this.expect(T.arrow),r.returnType=this.flowParseType(),r.typeParameters=null,this.finishNode(r,"FunctionTypeAnnotation");case T.string:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case T._true:case T._false:return r.value=this.match(T._true),this.next(),this.finishNode(r,"BooleanLiteralTypeAnnotation");case T.plusMin:if("-"===this.state.value)return this.next(),this.match(T.num)||this.unexpected(null,"Unexpected token, expected number"),this.parseLiteral(-this.state.value,"NumericLiteralTypeAnnotation",r.start,r.loc.start);this.unexpected();case T.num:return this.parseLiteral(this.state.value,"NumericLiteralTypeAnnotation");case T._null:return r.value=this.match(T._null),this.next(),this.finishNode(r,"NullLiteralTypeAnnotation");case T._this:return r.value=this.match(T._this),this.next(),this.finishNode(r,"ThisTypeAnnotation");case T.star:return this.next(),this.finishNode(r,"ExistentialTypeParam");default:if("typeof"===this.state.type.keyword)return this.flowParseTypeofType()}this.unexpected()},re.flowParsePostfixType=function(){for(var e=this.state.start,t=this.state.startLoc,r=this.flowParsePrimaryType();!this.canInsertSemicolon()&&this.match(T.bracketL);){var n=this.startNodeAt(e,t);n.elementType=r,this.expect(T.bracketL),this.expect(T.bracketR),r=this.finishNode(n,"ArrayTypeAnnotation")}return r},re.flowParsePrefixType=function(){var e=this.startNode();return this.eat(T.question)?(e.typeAnnotation=this.flowParsePrefixType(),this.finishNode(e,"NullableTypeAnnotation")):this.flowParsePostfixType()},re.flowParseAnonFunctionWithoutParens=function(){var e=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(T.arrow)){var t=this.startNodeAt(e.start,e.loc.start);return t.params=[this.reinterpretTypeAsFunctionTypeParam(e)],t.rest=null,t.returnType=this.flowParseType(),t.typeParameters=null,this.finishNode(t,"FunctionTypeAnnotation")}return e},re.flowParseIntersectionType=function(){var e=this.startNode();this.eat(T.bitwiseAND);var t=this.flowParseAnonFunctionWithoutParens();for(e.types=[t];this.eat(T.bitwiseAND);)e.types.push(this.flowParseAnonFunctionWithoutParens());return 1===e.types.length?t:this.finishNode(e,"IntersectionTypeAnnotation")},re.flowParseUnionType=function(){var e=this.startNode();this.eat(T.bitwiseOR);var t=this.flowParseIntersectionType();for(e.types=[t];this.eat(T.bitwiseOR);)e.types.push(this.flowParseIntersectionType());return 1===e.types.length?t:this.finishNode(e,"UnionTypeAnnotation")},re.flowParseType=function(){var e=this.state.inType;this.state.inType=!0;var t=this.flowParseUnionType();return this.state.inType=e,t},re.flowParseTypeAnnotation=function(){var e=this.startNode();return e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,"TypeAnnotation")},re.flowParseTypeAndPredicateAnnotation=function(){var e=this.startNode(),t=this.flowParseTypeAndPredicateInitialiser();return e.typeAnnotation=t[0],e.predicate=t[1],this.finishNode(e,"TypeAnnotation")},re.flowParseTypeAnnotatableIdentifier=function(){var e=this.flowParseRestrictedIdentifier();return this.match(T.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(e,e.type)),e},re.typeCastToParameter=function(e){return e.expression.typeAnnotation=e.typeAnnotation,this.finishNodeAt(e.expression,e.expression.type,e.typeAnnotation.end,e.typeAnnotation.loc.end)},re.flowParseVariance=function(){var e=null;return this.match(T.plusMin)&&("+"===this.state.value?e="plus":"-"===this.state.value&&(e="minus"),this.next()),e};var ne=String.fromCodePoint;if(!ne){var ie=String.fromCharCode,se=Math.floor;ne=function(){var e=[],t=void 0,r=void 0,n=-1,i=arguments.length;if(!i)return"";for(var s="";++n<i;){var a=Number(arguments[n]);if(!isFinite(a)||a<0||a>1114111||se(a)!=a)throw RangeError("Invalid code point: "+a);a<=65535?e.push(a):(t=55296+((a-=65536)>>10),r=a%1024+56320,e.push(t,r)),(n+1==i||e.length>16384)&&(s+=ie.apply(null,e),e.length=0)}return s}}var ae=ne,oe={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"},ue=/^[\da-fA-F]+$/,le=/^\d+$/;I.j_oTag=new N("<tag",!1),I.j_cTag=new N("</tag",!1),I.j_expr=new N("<tag>...</tag>",!0,!0),T.jsxName=new w("jsxName"),T.jsxText=new w("jsxText",{beforeExpr:!0}),T.jsxTagStart=new w("jsxTagStart",{startsExpr:!0}),T.jsxTagEnd=new w("jsxTagEnd"),T.jsxTagStart.updateContext=function(){this.state.context.push(I.j_expr),this.state.context.push(I.j_oTag),this.state.exprAllowed=!1},T.jsxTagEnd.updateContext=function(e){var t=this.state.context.pop();t===I.j_oTag&&e===T.slash||t===I.j_cTag?(this.state.context.pop(),this.state.exprAllowed=this.curContext()===I.j_expr):this.state.exprAllowed=!0};var ce=q.prototype;ce.jsxReadToken=function(){for(var e="",t=this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated JSX contents");var r=this.input.charCodeAt(this.state.pos);switch(r){case 60:case 123:return this.state.pos===this.state.start?60===r&&this.state.exprAllowed?(++this.state.pos,this.finishToken(T.jsxTagStart)):this.getTokenFromCode(r):(e+=this.input.slice(t,this.state.pos),this.finishToken(T.jsxText,e));case 38:e+=this.input.slice(t,this.state.pos),e+=this.jsxReadEntity(),t=this.state.pos;break;default:o(r)?(e+=this.input.slice(t,this.state.pos),e+=this.jsxReadNewLine(!0),t=this.state.pos):++this.state.pos}}},ce.jsxReadNewLine=function(e){var t=this.input.charCodeAt(this.state.pos),r=void 0;return++this.state.pos,13===t&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,r=e?"\n":"\r\n"):r=String.fromCharCode(t),++this.state.curLine,this.state.lineStart=this.state.pos,r},ce.jsxReadString=function(e){for(var t="",r=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var n=this.input.charCodeAt(this.state.pos);if(n===e)break;38===n?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadEntity(),r=this.state.pos):o(n)?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadNewLine(!1),r=this.state.pos):++this.state.pos}return t+=this.input.slice(r,this.state.pos++),this.finishToken(T.string,t)},ce.jsxReadEntity=function(){for(var e="",t=0,r=void 0,n=this.input[this.state.pos],i=++this.state.pos;this.state.pos<this.input.length&&t++<10;){if(";"===(n=this.input[this.state.pos++])){"#"===e[0]?"x"===e[1]?(e=e.substr(2),ue.test(e)&&(r=ae(parseInt(e,16)))):(e=e.substr(1),le.test(e)&&(r=ae(parseInt(e,10)))):r=oe[e];break}e+=n}return r||(this.state.pos=i,"&")},ce.jsxReadWord=function(){var e=void 0,t=this.state.pos;do{e=this.input.charCodeAt(++this.state.pos)}while(a(e)||45===e);return this.finishToken(T.jsxName,this.input.slice(t,this.state.pos))},ce.jsxParseIdentifier=function(){var e=this.startNode();return this.match(T.jsxName)?e.name=this.state.value:this.state.type.keyword?e.name=this.state.type.keyword:this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")},ce.jsxParseNamespacedName=function(){var e=this.state.start,t=this.state.startLoc,r=this.jsxParseIdentifier();if(!this.eat(T.colon))return r;var n=this.startNodeAt(e,t);return n.namespace=r,n.name=this.jsxParseIdentifier(),this.finishNode(n,"JSXNamespacedName")},ce.jsxParseElementName=function(){for(var e=this.state.start,t=this.state.startLoc,r=this.jsxParseNamespacedName();this.eat(T.dot);){var n=this.startNodeAt(e,t);n.object=r,n.property=this.jsxParseIdentifier(),r=this.finishNode(n,"JSXMemberExpression")}return r},ce.jsxParseAttributeValue=function(){var e=void 0;switch(this.state.type){case T.braceL:if("JSXEmptyExpression"!==(e=this.jsxParseExpressionContainer()).expression.type)return e;this.raise(e.start,"JSX attributes must only be assigned a non-empty expression");case T.jsxTagStart:case T.string:return e=this.parseExprAtom(),e.extra=null,e;default:this.raise(this.state.start,"JSX value should be either an expression or a quoted JSX text")}},ce.jsxParseEmptyExpression=function(){var e=this.startNodeAt(this.state.lastTokEnd,this.state.lastTokEndLoc);return this.finishNodeAt(e,"JSXEmptyExpression",this.state.start,this.state.startLoc)},ce.jsxParseSpreadChild=function(){var e=this.startNode();return this.expect(T.braceL),this.expect(T.ellipsis),e.expression=this.parseExpression(),this.expect(T.braceR),this.finishNode(e,"JSXSpreadChild")},ce.jsxParseExpressionContainer=function(){var e=this.startNode();return this.next(),this.match(T.braceR)?e.expression=this.jsxParseEmptyExpression():e.expression=this.parseExpression(),this.expect(T.braceR),this.finishNode(e,"JSXExpressionContainer")},ce.jsxParseAttribute=function(){var e=this.startNode();return this.eat(T.braceL)?(this.expect(T.ellipsis),e.argument=this.parseMaybeAssign(),this.expect(T.braceR),this.finishNode(e,"JSXSpreadAttribute")):(e.name=this.jsxParseNamespacedName(),e.value=this.eat(T.eq)?this.jsxParseAttributeValue():null,this.finishNode(e,"JSXAttribute"))},ce.jsxParseOpeningElementAt=function(e,t){var r=this.startNodeAt(e,t);for(r.attributes=[],r.name=this.jsxParseElementName();!this.match(T.slash)&&!this.match(T.jsxTagEnd);)r.attributes.push(this.jsxParseAttribute());return r.selfClosing=this.eat(T.slash),this.expect(T.jsxTagEnd),this.finishNode(r,"JSXOpeningElement")},ce.jsxParseClosingElementAt=function(e,t){var r=this.startNodeAt(e,t);return r.name=this.jsxParseElementName(),this.expect(T.jsxTagEnd),this.finishNode(r,"JSXClosingElement")},ce.jsxParseElementAt=function(e,t){var r=this.startNodeAt(e,t),n=[],i=this.jsxParseOpeningElementAt(e,t),s=null;if(!i.selfClosing){e:for(;;)switch(this.state.type){case T.jsxTagStart:if(e=this.state.start,t=this.state.startLoc,this.next(),this.eat(T.slash)){s=this.jsxParseClosingElementAt(e,t);break e}n.push(this.jsxParseElementAt(e,t));break;case T.jsxText:n.push(this.parseExprAtom());break;case T.braceL:this.lookahead().type===T.ellipsis?n.push(this.jsxParseSpreadChild()):n.push(this.jsxParseExpressionContainer());break;default:this.unexpected()}h(s.name)!==h(i.name)&&this.raise(s.start,"Expected corresponding JSX closing tag for <"+h(i.name)+">")}return r.openingElement=i,r.closingElement=s,r.children=n,this.match(T.relational)&&"<"===this.state.value&&this.raise(this.state.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(r,"JSXElement")},ce.jsxParseElement=function(){var e=this.state.start,t=this.state.startLoc;return this.next(),this.jsxParseElementAt(e,t)};V.estree=function(e){e.extend("checkDeclaration",function(e){return function(t){p(t)?this.checkDeclaration(t.value):e.call(this,t)}}),e.extend("checkGetterSetterParamCount",function(){return function(e){var t="get"===e.kind?0:1;if(e.value.params.length!==t){var r=e.start;"get"===e.kind?this.raise(r,"getter should have no params"):this.raise(r,"setter should have exactly one param")}}}),e.extend("checkLVal",function(e){return function(t,r,n){var i=this;switch(t.type){case"ObjectPattern":t.properties.forEach(function(e){i.checkLVal("Property"===e.type?e.value:e,r,n,"object destructuring pattern")});break;default:for(var s=arguments.length,a=Array(s>3?s-3:0),o=3;o<s;o++)a[o-3]=arguments[o];e.call.apply(e,[this,t,r,n].concat(a))}}}),e.extend("checkPropClash",function(){return function(e,t){if(!e.computed&&p(e)){var r=e.key;"__proto__"===("Identifier"===r.type?r.name:String(r.value))&&(t.proto&&this.raise(r.start,"Redefinition of __proto__ property"),t.proto=!0)}}}),e.extend("isStrictBody",function(){return function(e,t){if(!t&&e.body.body.length>0)for(var r=e.body.body,n=Array.isArray(r),i=0,r=n?r:r[Symbol.iterator]();;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}var a=s;if("ExpressionStatement"!==a.type||"Literal"!==a.expression.type)break;if("use strict"===a.expression.value)return!0}return!1}}),e.extend("isValidDirective",function(){return function(e){return!("ExpressionStatement"!==e.type||"Literal"!==e.expression.type||"string"!=typeof e.expression.value||e.expression.extra&&e.expression.extra.parenthesized)}}),e.extend("stmtToDirective",function(e){return function(t){var r=e.call(this,t),n=t.expression.value;return r.value.value=n,r}}),e.extend("parseBlockBody",function(e){return function(t){for(var r=this,n=arguments.length,i=Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];e.call.apply(e,[this,t].concat(i)),t.directives.reverse().forEach(function(e){t.body.unshift(r.directiveToStmt(e))}),delete t.directives}}),e.extend("parseClassMethod",function(){return function(e,t,r,n){this.parseMethod(t,r,n),t.typeParameters&&(t.value.typeParameters=t.typeParameters,delete t.typeParameters),e.body.push(this.finishNode(t,"MethodDefinition"))}}),e.extend("parseExprAtom",function(e){return function(){switch(this.state.type){case T.regexp:return this.estreeParseRegExpLiteral(this.state.value);case T.num:case T.string:return this.estreeParseLiteral(this.state.value);case T._null:return this.estreeParseLiteral(null);case T._true:return this.estreeParseLiteral(!0);case T._false:return this.estreeParseLiteral(!1);default:for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.call.apply(e,[this].concat(r))}}}),e.extend("parseLiteral",function(e){return function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=e.call.apply(e,[this].concat(r));return i.raw=i.extra.raw,delete i.extra,i}}),e.extend("parseMethod",function(e){return function(t){var r=this.startNode();r.kind=t.kind;for(var n=arguments.length,i=Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];return r=e.call.apply(e,[this,r].concat(i)),delete r.kind,t.value=this.finishNode(r,"FunctionExpression"),t}}),e.extend("parseObjectMethod",function(e){return function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=e.call.apply(e,[this].concat(r));return i&&("method"===i.kind&&(i.kind="init"),i.type="Property"),i}}),e.extend("parseObjectProperty",function(e){return function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=e.call.apply(e,[this].concat(r));return i&&(i.kind="init",i.type="Property"),i}}),e.extend("toAssignable",function(e){return function(t,r){for(var n=arguments.length,i=Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=arguments[s];if(p(t))return this.toAssignable.apply(this,[t.value,r].concat(i)),t;if("ObjectExpression"===t.type){t.type="ObjectPattern";for(var a=t.properties,o=Array.isArray(a),u=0,a=o?a:a[Symbol.iterator]();;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if((u=a.next()).done)break;l=u.value}var c=l;"get"===c.kind||"set"===c.kind?this.raise(c.key.start,"Object pattern can't contain getter or setter"):c.method?this.raise(c.key.start,"Object pattern can't contain methods"):this.toAssignable(c,r,"object destructuring pattern")}return t}return e.call.apply(e,[this,t,r].concat(i))}})},V.flow=function(e){e.extend("parseFunctionBody",function(e){return function(t,r){return this.match(T.colon)&&!r&&(t.returnType=this.flowParseTypeAndPredicateAnnotation()),e.call(this,t,r)}}),e.extend("parseStatement",function(e){return function(t,r){if(this.state.strict&&this.match(T.name)&&"interface"===this.state.value){var n=this.startNode();return this.next(),this.flowParseInterface(n)}return e.call(this,t,r)}}),e.extend("parseExpressionStatement",function(e){return function(t,r){if("Identifier"===r.type)if("declare"===r.name){if(this.match(T._class)||this.match(T.name)||this.match(T._function)||this.match(T._var)||this.match(T._export))return this.flowParseDeclare(t)}else if(this.match(T.name)){if("interface"===r.name)return this.flowParseInterface(t);if("type"===r.name)return this.flowParseTypeAlias(t);if("opaque"===r.name)return this.flowParseOpaqueType(t,!1)}return e.call(this,t,r)}}),e.extend("shouldParseExportDeclaration",function(e){return function(){return this.isContextual("type")||this.isContextual("interface")||this.isContextual("opaque")||e.call(this)}}),e.extend("isExportDefaultSpecifier",function(e){return function(){return(!this.match(T.name)||"type"!==this.state.value&&"interface"!==this.state.value&&"opaque"!==this.state.value)&&e.call(this)}}),e.extend("parseConditional",function(e){return function(t,r,n,i,s){if(s&&this.match(T.question)){var a=this.state.clone();try{return e.call(this,t,r,n,i)}catch(e){if(e instanceof SyntaxError)return this.state=a,s.start=e.pos||this.state.start,t;throw e}}return e.call(this,t,r,n,i)}}),e.extend("parseParenItem",function(e){return function(t,r,n){if(t=e.call(this,t,r,n),this.eat(T.question)&&(t.optional=!0),this.match(T.colon)){var i=this.startNodeAt(r,n);return i.expression=t,i.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(i,"TypeCastExpression")}return t}}),e.extend("parseExport",function(e){return function(t){return"ExportNamedDeclaration"===(t=e.call(this,t)).type&&(t.exportKind=t.exportKind||"value"),t}}),e.extend("parseExportDeclaration",function(e){return function(t){if(this.isContextual("type")){t.exportKind="type";var r=this.startNode();return this.next(),this.match(T.braceL)?(t.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(t),null):this.flowParseTypeAlias(r)}if(this.isContextual("opaque")){t.exportKind="type";var n=this.startNode();return this.next(),this.flowParseOpaqueType(n,!1)}if(this.isContextual("interface")){t.exportKind="type";var i=this.startNode();return this.next(),this.flowParseInterface(i)}return e.call(this,t)}}),e.extend("parseClassId",function(e){return function(t){e.apply(this,arguments),this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration())}}),e.extend("isKeyword",function(e){return function(t){return(!this.state.inType||"void"!==t)&&e.call(this,t)}}),e.extend("readToken",function(e){return function(t){return!this.state.inType||62!==t&&60!==t?e.call(this,t):this.finishOp(T.relational,1)}}),e.extend("jsx_readToken",function(e){return function(){if(!this.state.inType)return e.call(this)}}),e.extend("toAssignable",function(e){return function(t,r,n){return"TypeCastExpression"===t.type?e.call(this,this.typeCastToParameter(t),r,n):e.call(this,t,r,n)}}),e.extend("toAssignableList",function(e){return function(t,r,n){for(var i=0;i<t.length;i++){var s=t[i];s&&"TypeCastExpression"===s.type&&(t[i]=this.typeCastToParameter(s))}return e.call(this,t,r,n)}}),e.extend("toReferencedList",function(){return function(e){for(var t=0;t<e.length;t++){var r=e[t];r&&r._exprListItem&&"TypeCastExpression"===r.type&&this.raise(r.start,"Unexpected type cast")}return e}}),e.extend("parseExprListItem",function(e){return function(){for(var t=this.startNode(),r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];var s=e.call.apply(e,[this].concat(n));return this.match(T.colon)?(t._exprListItem=!0,t.expression=s,t.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(t,"TypeCastExpression")):s}}),e.extend("checkLVal",function(e){return function(t){if("TypeCastExpression"!==t.type)return e.apply(this,arguments)}}),e.extend("parseClassProperty",function(e){return function(t){return delete t.variancePos,this.match(T.colon)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),e.call(this,t)}}),e.extend("isClassMethod",function(e){return function(){return this.isRelational("<")||e.call(this)}}),e.extend("isClassProperty",function(e){return function(){return this.match(T.colon)||e.call(this)}}),e.extend("isNonstaticConstructor",function(e){return function(t){return!this.match(T.colon)&&e.call(this,t)}}),e.extend("parseClassMethod",function(e){return function(t,r){r.variance&&this.unexpected(r.variancePos),delete r.variance,delete r.variancePos,this.isRelational("<")&&(r.typeParameters=this.flowParseTypeParameterDeclaration());for(var n=arguments.length,i=Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=arguments[s];e.call.apply(e,[this,t,r].concat(i))}}),e.extend("parseClassSuper",function(e){return function(t,r){if(e.call(this,t,r),t.superClass&&this.isRelational("<")&&(t.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual("implements")){this.next();var n=t.implements=[];do{var i=this.startNode();i.id=this.parseIdentifier(),this.isRelational("<")?i.typeParameters=this.flowParseTypeParameterInstantiation():i.typeParameters=null,n.push(this.finishNode(i,"ClassImplements"))}while(this.eat(T.comma))}}}),e.extend("parsePropertyName",function(e){return function(t){var r=this.state.start,n=this.flowParseVariance(),i=e.call(this,t);return t.variance=n,t.variancePos=r,i}}),e.extend("parseObjPropValue",function(e){return function(t){t.variance&&this.unexpected(t.variancePos),delete t.variance,delete t.variancePos;var r=void 0;this.isRelational("<")&&(r=this.flowParseTypeParameterDeclaration(),this.match(T.parenL)||this.unexpected()),e.apply(this,arguments),r&&((t.value||t).typeParameters=r)}}),e.extend("parseAssignableListItemTypes",function(){return function(e){return this.eat(T.question)&&(e.optional=!0),this.match(T.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),this.finishNode(e,e.type),e}}),e.extend("parseMaybeDefault",function(e){return function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=e.apply(this,r);return"AssignmentPattern"===i.type&&i.typeAnnotation&&i.right.start<i.typeAnnotation.start&&this.raise(i.typeAnnotation.start,"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`"),i}}),e.extend("parseImportSpecifiers",function(e){return function(t){t.importKind="value";var r=null;if(this.match(T._typeof)?r="typeof":this.isContextual("type")&&(r="type"),r){var n=this.lookahead();(n.type===T.name&&"from"!==n.value||n.type===T.braceL||n.type===T.star)&&(this.next(),t.importKind=r)}e.call(this,t)}}),e.extend("parseImportSpecifier",function(){return function(e){var t=this.startNode(),r=this.state.start,n=this.parseIdentifier(!0),i=null;"type"===n.name?i="type":"typeof"===n.name&&(i="typeof");var s=!1;if(this.isContextual("as")){var a=this.parseIdentifier(!0);null===i||this.match(T.name)||this.state.type.keyword?(t.imported=n,t.importKind=null,t.local=this.parseIdentifier()):(t.imported=a,t.importKind=i,t.local=a.__clone())}else null!==i&&(this.match(T.name)||this.state.type.keyword)?(t.imported=this.parseIdentifier(!0),t.importKind=i,this.eatContextual("as")?t.local=this.parseIdentifier():(s=!0,t.local=t.imported.__clone())):(s=!0,t.imported=n,t.importKind=null,t.local=t.imported.__clone());"type"!==e.importKind&&"typeof"!==e.importKind||"type"!==t.importKind&&"typeof"!==t.importKind||this.raise(r,"`The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements`"),s&&this.checkReservedWord(t.local.name,t.start,!0,!0),this.checkLVal(t.local,!0,void 0,"import specifier"),e.specifiers.push(this.finishNode(t,"ImportSpecifier"))}}),e.extend("parseFunctionParams",function(e){return function(t){this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),e.call(this,t)}}),e.extend("parseVarHead",function(e){return function(t){e.call(this,t),this.match(T.colon)&&(t.id.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(t.id,t.id.type))}}),e.extend("parseAsyncArrowFromCallExpression",function(e){return function(t,r){if(this.match(T.colon)){var n=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,t.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=n}return e.call(this,t,r)}}),e.extend("shouldParseAsyncArrow",function(e){return function(){return this.match(T.colon)||e.call(this)}}),e.extend("parseMaybeAssign",function(e){return function(){for(var t=null,r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];if(T.jsxTagStart&&this.match(T.jsxTagStart)){var s=this.state.clone();try{return e.apply(this,n)}catch(e){if(!(e instanceof SyntaxError))throw e;this.state=s,this.state.context.length-=2,t=e}}if(null!=t||this.isRelational("<")){var a=void 0,o=void 0;try{o=this.flowParseTypeParameterDeclaration(),(a=e.apply(this,n)).typeParameters=o,a.start=o.start,a.loc.start=o.loc.start}catch(e){throw t||e}if("ArrowFunctionExpression"===a.type)return a;if(null!=t)throw t;this.raise(o.start,"Expected an arrow function after this type parameter declaration")}return e.apply(this,n)}}),e.extend("parseArrow",function(e){return function(t){if(this.match(T.colon)){var r=this.state.clone();try{var n=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;var i=this.flowParseTypeAndPredicateAnnotation();this.state.noAnonFunctionType=n,this.canInsertSemicolon()&&this.unexpected(),this.match(T.arrow)||this.unexpected(),t.returnType=i}catch(e){if(!(e instanceof SyntaxError))throw e;this.state=r}}return e.call(this,t)}}),e.extend("shouldParseArrow",function(e){return function(){return this.match(T.colon)||e.call(this)}})},V.jsx=function(e){e.extend("parseExprAtom",function(e){return function(t){if(this.match(T.jsxText)){var r=this.parseLiteral(this.state.value,"JSXText");return r.extra=null,r}return this.match(T.jsxTagStart)?this.jsxParseElement():e.call(this,t)}}),e.extend("readToken",function(e){return function(t){if(this.state.inPropertyName)return e.call(this,t);var r=this.curContext();if(r===I.j_expr)return this.jsxReadToken();if(r===I.j_oTag||r===I.j_cTag){if(s(t))return this.jsxReadWord();if(62===t)return++this.state.pos,this.finishToken(T.jsxTagEnd);if((34===t||39===t)&&r===I.j_oTag)return this.jsxReadString(t)}return 60===t&&this.state.exprAllowed?(++this.state.pos,this.finishToken(T.jsxTagStart)):e.call(this,t)}}),e.extend("updateContext",function(e){return function(t){if(this.match(T.braceL)){var r=this.curContext();r===I.j_oTag?this.state.context.push(I.braceExpression):r===I.j_expr?this.state.context.push(I.templateQuasi):e.call(this,t),this.state.exprAllowed=!0}else{if(!this.match(T.slash)||t!==T.jsxTagStart)return e.call(this,t);this.state.context.length-=2,this.state.context.push(I.j_cTag),this.state.exprAllowed=!1}}})},r.parse=function(e,t){return new q(t,e).parse()},r.parseExpression=function(e,t){var r=new q(t,e);return r.options.strictMode&&(r.state.strict=!0),r.getExpression()},r.tokTypes=T},{}],187:[function(e,t,r){"use strict";function n(e,t,r){e instanceof RegExp&&(e=i(e,r)),t instanceof RegExp&&(t=i(t,r));var n=s(e,t,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+e.length,n[1]),post:r.slice(n[1]+t.length)}}function i(e,t){var r=t.match(e);return r?r[0]:null}function s(e,t,r){var n,i,s,a,o,u=r.indexOf(e),l=r.indexOf(t,u+1),c=u;if(u>=0&&l>0){for(n=[],s=r.length;c>=0&&!o;)c==u?(n.push(c),u=r.indexOf(e,c+1)):1==n.length?o=[n.pop(),l]:((i=n.pop())<s&&(s=i,a=l),l=r.indexOf(t,c+1)),c=u<l&&u>=0?u:l;n.length&&(o=[s,a])}return o}t.exports=n,n.range=s},{}],188:[function(e,t,r){"use strict";function n(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function i(e){return a[e>>18&63]+a[e>>12&63]+a[e>>6&63]+a[63&e]}function s(e,t,r){for(var n,s=[],a=t;a<r;a+=3)n=(e[a]<<16)+(e[a+1]<<8)+e[a+2],s.push(i(n));return s.join("")}r.byteLength=function(e){return 3*e.length/4-n(e)},r.toByteArray=function(e){var t,r,i,s,a,l=e.length;s=n(e),a=new u(3*l/4-s),r=s>0?l-4:l;var c=0;for(t=0;t<r;t+=4)i=o[e.charCodeAt(t)]<<18|o[e.charCodeAt(t+1)]<<12|o[e.charCodeAt(t+2)]<<6|o[e.charCodeAt(t+3)],a[c++]=i>>16&255,a[c++]=i>>8&255,a[c++]=255&i;return 2===s?(i=o[e.charCodeAt(t)]<<2|o[e.charCodeAt(t+1)]>>4,a[c++]=255&i):1===s&&(i=o[e.charCodeAt(t)]<<10|o[e.charCodeAt(t+1)]<<4|o[e.charCodeAt(t+2)]>>2,a[c++]=i>>8&255,a[c++]=255&i),a},r.fromByteArray=function(e){for(var t,r=e.length,n=r%3,i="",o=[],u=0,l=r-n;u<l;u+=16383)o.push(s(e,u,u+16383>l?l:u+16383));return 1===n?(t=e[r-1],i+=a[t>>2],i+=a[t<<4&63],i+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],i+=a[t>>10],i+=a[t>>4&63],i+=a[t<<2&63],i+="="),o.push(i),o.join("")};for(var a=[],o=[],u="undefined"!=typeof Uint8Array?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,p=l.length;c<p;++c)a[c]=l[c],o[l.charCodeAt(c)]=c;o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},{}],189:[function(e,t,r){function n(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function i(e){return e.split(f).join("\\").split(d).join("{").split(m).join("}").split(y).join(",").split(g).join(".")}function s(e){if(!e)return[""];var t=[],r=h("{","}",e);if(!r)return e.split(",");var n=r.pre,i=r.body,a=r.post,o=n.split(",");o[o.length-1]+="{"+i+"}";var u=s(a);return a.length&&(o[o.length-1]+=u.shift(),o.push.apply(o,u)),t.push.apply(t,o),t}function a(e){return"{"+e+"}"}function o(e){return/^-?0\d/.test(e)}function u(e,t){return e<=t}function l(e,t){return e>=t}function c(e,t){var r=[],i=h("{","}",e);if(!i||/\$$/.test(i.pre))return[e];var f=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),d=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),y=f||d,g=i.body.indexOf(",")>=0;if(!y&&!g)return i.post.match(/,.*\}/)?(e=i.pre+"{"+i.body+m+i.post,c(e)):[e];var b;if(y)b=i.body.split(/\.\./);else if(1===(b=s(i.body)).length&&1===(b=c(b[0],!1).map(a)).length){return(E=i.post.length?c(i.post,!1):[""]).map(function(e){return i.pre+b[0]+e})}var v,x=i.pre,E=i.post.length?c(i.post,!1):[""];if(y){var A=n(b[0]),D=n(b[1]),C=Math.max(b[0].length,b[1].length),S=3==b.length?Math.abs(n(b[2])):1,_=u;D<A&&(S*=-1,_=l);var w=b.some(o);v=[];for(var k=A;_(k,D);k+=S){var F;if(d)"\\"===(F=String.fromCharCode(k))&&(F="");else if(F=String(k),w){var T=C-F.length;if(T>0){var P=new Array(T+1).join("0");F=k<0?"-"+P+F.slice(1):P+F}}v.push(F)}}else v=p(b,function(e){return c(e,!1)});for(var B=0;B<v.length;B++)for(var O=0;O<E.length;O++){var j=x+v[B]+E[O];(!t||y||j)&&r.push(j)}return r}var p=e("concat-map"),h=e("balanced-match");t.exports=function(e){return e?("{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2)),c(function(e){return e.split("\\\\").join(f).split("\\{").join(d).split("\\}").join(m).split("\\,").join(y).split("\\.").join(g)}(e),!0).map(i)):[]};var f="\0SLASH"+Math.random()+"\0",d="\0OPEN"+Math.random()+"\0",m="\0CLOSE"+Math.random()+"\0",y="\0COMMA"+Math.random()+"\0",g="\0PERIOD"+Math.random()+"\0"},{"balanced-match":187,"concat-map":193}],190:[function(e,t,r){},{}],191:[function(e,t,r){arguments[4][190][0].apply(r,arguments)},{dup:190}],192:[function(e,t,r){"use strict";function n(e){if(e>N)throw new RangeError("Invalid typed array length");var t=new Uint8Array(e);return t.__proto__=i.prototype,t}function i(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return o(e)}return s(e,t,r)}function s(e,t,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return T(e)?function(e,t,r){if(t<0||e.byteLength<t)throw new RangeError("'offset' is out of bounds");if(e.byteLength<t+(r||0))throw new RangeError("'length' is out of bounds");var n;n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r);return n.__proto__=i.prototype,n}(e,t,r):"string"==typeof e?function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!i.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var r=0|c(e,t),s=n(r),a=s.write(e,t);a!==r&&(s=s.slice(0,a));return s}(e,t):function(e){if(i.isBuffer(e)){var t=0|l(e.length),r=n(t);return 0===r.length?r:(e.copy(r,0,0,t),r)}if(e){if(P(e)||"length"in e)return"number"!=typeof e.length||B(e.length)?n(0):u(e);if("Buffer"===e.type&&Array.isArray(e.data))return u(e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e)}function a(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function o(e){return a(e),n(e<0?0:0|l(e))}function u(e){for(var t=e.length<0?0:0|l(e.length),r=n(t),i=0;i<t;i+=1)r[i]=255&e[i];return r}function l(e){if(e>=N)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+N.toString(16)+" bytes");return 0|e}function c(e,t){if(i.isBuffer(e))return e.length;if(P(e)||T(e))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return w(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return k(e).length;default:if(n)return w(e).length;t=(""+t).toLowerCase(),n=!0}}function p(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){var n=e.length;(!t||t<0)&&(t=0);(!r||r<0||r>n)&&(r=n);for(var i="",s=t;s<r;++s)i+=function(e){return e<16?"0"+e.toString(16):e.toString(16)}(e[s]);return i}(this,t,r);case"utf8":case"utf-8":return E(this,t,r);case"ascii":return function(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}(this,t,r);case"latin1":case"binary":return function(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}(this,t,r);case"base64":return function(e,t,r){return 0===t&&r===e.length?O.fromByteArray(e):O.fromByteArray(e.slice(t,r))}(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,r){for(var n=e.slice(t,r),i="",s=0;s<n.length;s+=2)i+=String.fromCharCode(n[s]+256*n[s+1]);return i}(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function h(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function f(e,t,r,n,s){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,B(r)&&(r=s?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(s)return-1;r=e.length-1}else if(r<0){if(!s)return-1;r=0}if("string"==typeof t&&(t=i.from(t,n)),i.isBuffer(t))return 0===t.length?-1:d(e,t,r,n,s);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):d(e,[t],r,n,s);throw new TypeError("val must be string, number or Buffer")}function d(e,t,r,n,i){function s(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,o=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,o/=2,u/=2,r/=2}var l;if(i){var c=-1;for(l=r;l<o;l++)if(s(e,l)===s(t,-1===c?0:l-c)){if(-1===c&&(c=l),l-c+1===u)return c*a}else-1!==c&&(l-=l-c),c=-1}else for(r+u>o&&(r=o-u),l=r;l>=0;l--){for(var p=!0,h=0;h<u;h++)if(s(e,l+h)!==s(t,h)){p=!1;break}if(p)return l}return-1}function m(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var s=t.length;if(s%2!=0)throw new TypeError("Invalid hex string");n>s/2&&(n=s/2);for(var a=0;a<n;++a){var o=parseInt(t.substr(2*a,2),16);if(B(o))return a;e[r+a]=o}return a}function y(e,t,r,n){return F(w(t,e.length-r),e,r,n)}function g(e,t,r,n){return F(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function b(e,t,r,n){return g(e,t,r,n)}function v(e,t,r,n){return F(k(t),e,r,n)}function x(e,t,r,n){return F(function(e,t){for(var r,n,i,s=[],a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,i=r%256,s.push(i),s.push(n);return s}(t,e.length-r),e,r,n)}function E(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var s=e[i],a=null,o=s>239?4:s>223?3:s>191?2:1;if(i+o<=r){var u,l,c,p;switch(o){case 1:s<128&&(a=s);break;case 2:128==(192&(u=e[i+1]))&&(p=(31&s)<<6|63&u)>127&&(a=p);break;case 3:u=e[i+1],l=e[i+2],128==(192&u)&&128==(192&l)&&(p=(15&s)<<12|(63&u)<<6|63&l)>2047&&(p<55296||p>57343)&&(a=p);break;case 4:u=e[i+1],l=e[i+2],c=e[i+3],128==(192&u)&&128==(192&l)&&128==(192&c)&&(p=(15&s)<<18|(63&u)<<12|(63&l)<<6|63&c)>65535&&p<1114112&&(a=p)}}null===a?(a=65533,o=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=o}return function(e){var t=e.length;if(t<=I)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=I));return r}(n)}function A(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,r,n,s,a){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>s||t<a)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function C(e,t,r,n,i,s){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function S(e,t,r,n,i){return t=+t,r>>>=0,i||C(e,0,r,4),j.write(e,t,r,n,23,4),r+4}function _(e,t,r,n,i){return t=+t,r>>>=0,i||C(e,0,r,8),j.write(e,t,r,n,52,8),r+8}function w(e,t){t=t||1/0;for(var r,n=e.length,i=null,s=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function k(e){return O.toByteArray(function(e){if((e=e.trim().replace(L,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function F(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function T(e){return e instanceof ArrayBuffer||null!=e&&null!=e.constructor&&"ArrayBuffer"===e.constructor.name&&"number"==typeof e.byteLength}function P(e){return"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(e)}function B(e){return e!=e}var O=e("base64-js"),j=e("ieee754");r.Buffer=i,r.SlowBuffer=function(e){return+e!=e&&(e=0),i.alloc(+e)},r.INSPECT_MAX_BYTES=50;var N=2147483647;r.kMaxLength=N,(i.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}())||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),i.poolSize=8192,i.from=function(e,t,r){return s(e,t,r)},i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,i.alloc=function(e,t,r){return function(e,t,r){return a(e),e<=0?n(e):void 0!==t?"string"==typeof r?n(e).fill(t,r):n(e).fill(t):n(e)}(e,t,r)},i.allocUnsafe=function(e){return o(e)},i.allocUnsafeSlow=function(e){return o(e)},i.isBuffer=function(e){return null!=e&&!0===e._isBuffer},i.compare=function(e,t){if(!i.isBuffer(e)||!i.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,s=0,a=Math.min(r,n);s<a;++s)if(e[s]!==t[s]){r=e[s],n=t[s];break}return r<n?-1:n<r?1:0},i.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},i.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return i.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=i.allocUnsafe(t),s=0;for(r=0;r<e.length;++r){var a=e[r];if(!i.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,s),s+=a.length}return n},i.byteLength=c,i.prototype._isBuffer=!0,i.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)h(this,t,t+1);return this},i.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)h(this,t,t+3),h(this,t+1,t+2);return this},i.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)h(this,t,t+7),h(this,t+1,t+6),h(this,t+2,t+5),h(this,t+3,t+4);return this},i.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?E(this,0,e):p.apply(this,arguments)},i.prototype.equals=function(e){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===i.compare(this,e)},i.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},i.prototype.compare=function(e,t,r,n,s){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===s&&(s=this.length),t<0||r>e.length||n<0||s>this.length)throw new RangeError("out of range index");if(n>=s&&t>=r)return 0;if(n>=s)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,s>>>=0,this===e)return 0;for(var a=s-n,o=r-t,u=Math.min(a,o),l=this.slice(n,s),c=e.slice(t,r),p=0;p<u;++p)if(l[p]!==c[p]){a=l[p],o=c[p];break}return a<o?-1:o<a?1:0},i.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},i.prototype.indexOf=function(e,t,r){return f(this,e,t,r,!0)},i.prototype.lastIndexOf=function(e,t,r){return f(this,e,t,r,!1)},i.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return m(this,e,t,r);case"utf8":case"utf-8":return y(this,e,t,r);case"ascii":return g(this,e,t,r);case"latin1":case"binary":return b(this,e,t,r);case"base64":return v(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;i.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return n.__proto__=i.prototype,n},i.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||A(e,t,this.length);for(var n=this[e],i=1,s=0;++s<t&&(i*=256);)n+=this[e+s]*i;return n},i.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||A(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},i.prototype.readUInt8=function(e,t){return e>>>=0,t||A(e,1,this.length),this[e]},i.prototype.readUInt16LE=function(e,t){return e>>>=0,t||A(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUInt16BE=function(e,t){return e>>>=0,t||A(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUInt32LE=function(e,t){return e>>>=0,t||A(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUInt32BE=function(e,t){return e>>>=0,t||A(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||A(e,t,this.length);for(var n=this[e],i=1,s=0;++s<t&&(i*=256);)n+=this[e+s]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},i.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||A(e,t,this.length);for(var n=t,i=1,s=this[e+--n];n>0&&(i*=256);)s+=this[e+--n]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*t)),s},i.prototype.readInt8=function(e,t){return e>>>=0,t||A(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,t){e>>>=0,t||A(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt16BE=function(e,t){e>>>=0,t||A(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt32LE=function(e,t){return e>>>=0,t||A(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return e>>>=0,t||A(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,t){return e>>>=0,t||A(e,4,this.length),j.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return e>>>=0,t||A(e,4,this.length),j.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return e>>>=0,t||A(e,8,this.length),j.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return e>>>=0,t||A(e,8,this.length),j.read(this,e,!1,52,8)},i.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){D(this,e,t,r,Math.pow(2,8*r)-1,0)}var i=1,s=0;for(this[t]=255&e;++s<r&&(i*=256);)this[t+s]=e/i&255;return t+r},i.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){D(this,e,t,r,Math.pow(2,8*r)-1,0)}var i=r-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+r},i.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,1,255,0),this[t]=255&e,t+1},i.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},i.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);D(this,e,t,r,i-1,-i)}var s=0,a=1,o=0;for(this[t]=255&e;++s<r&&(a*=256);)e<0&&0===o&&0!==this[t+s-1]&&(o=1),this[t+s]=(e/a>>0)-o&255;return t+r},i.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);D(this,e,t,r,i-1,-i)}var s=r-1,a=1,o=0;for(this[t+s]=255&e;--s>=0&&(a*=256);)e<0&&0===o&&0!==this[t+s+1]&&(o=1),this[t+s]=(e/a>>0)-o&255;return t+r},i.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},i.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},i.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeFloatLE=function(e,t,r){return S(this,e,t,!0,r)},i.prototype.writeFloatBE=function(e,t,r){return S(this,e,t,!1,r)},i.prototype.writeDoubleLE=function(e,t,r){return _(this,e,t,!0,r)},i.prototype.writeDoubleBE=function(e,t,r){return _(this,e,t,!1,r)},i.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i,s=n-r;if(this===e&&r<t&&t<n)for(i=s-1;i>=0;--i)e[i+t]=this[i+r];else if(s<1e3)for(i=0;i<s;++i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+s),t);return s},i.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var s=e.charCodeAt(0);s<256&&(e=s)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!i.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var a;if("number"==typeof e)for(a=t;a<r;++a)this[a]=e;else{var o=i.isBuffer(e)?e:new i(e,n),u=o.length;for(a=0;a<r-t;++a)this[a+t]=o[a%u]}return this};var L=/[^+/0-9A-Za-z-_]/g},{"base64-js":188,ieee754:316}],193:[function(e,t,r){t.exports=function(e,t){for(var r=[],i=0;i<e.length;i++){var s=t(e[i],i);n(s)?r.push.apply(r,s):r.push(s)}return r};var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],194:[function(e,t,r){e("../modules/web.dom.iterable"),e("../modules/es6.string.iterator"),t.exports=e("../modules/core.get-iterator")},{"../modules/core.get-iterator":285,"../modules/es6.string.iterator":294,"../modules/web.dom.iterable":307}],195:[function(e,t,r){var n=e("../../modules/_core"),i=n.JSON||(n.JSON={stringify:JSON.stringify});t.exports=function(e){return i.stringify.apply(i,arguments)}},{"../../modules/_core":223}],196:[function(e,t,r){e("../modules/es6.object.to-string"),e("../modules/es6.string.iterator"),e("../modules/web.dom.iterable"),e("../modules/es6.map"),e("../modules/es7.map.to-json"),e("../modules/es7.map.of"),e("../modules/es7.map.from"),t.exports=e("../modules/_core").Map},{"../modules/_core":223,"../modules/es6.map":287,"../modules/es6.object.to-string":293,"../modules/es6.string.iterator":294,"../modules/es7.map.from":298,"../modules/es7.map.of":299,"../modules/es7.map.to-json":300,"../modules/web.dom.iterable":307}],197:[function(e,t,r){e("../../modules/es6.number.max-safe-integer"),t.exports=9007199254740991},{"../../modules/es6.number.max-safe-integer":288}],198:[function(e,t,r){e("../../modules/es6.object.assign"),t.exports=e("../../modules/_core").Object.assign},{"../../modules/_core":223,"../../modules/es6.object.assign":289}],199:[function(e,t,r){e("../../modules/es6.object.create");var n=e("../../modules/_core").Object;t.exports=function(e,t){return n.create(e,t)}},{"../../modules/_core":223,"../../modules/es6.object.create":290}],200:[function(e,t,r){e("../../modules/es6.symbol"),t.exports=e("../../modules/_core").Object.getOwnPropertySymbols},{"../../modules/_core":223,"../../modules/es6.symbol":295}],201:[function(e,t,r){e("../../modules/es6.object.keys"),t.exports=e("../../modules/_core").Object.keys},{"../../modules/_core":223,"../../modules/es6.object.keys":291}],202:[function(e,t,r){e("../../modules/es6.object.set-prototype-of"),t.exports=e("../../modules/_core").Object.setPrototypeOf},{"../../modules/_core":223,"../../modules/es6.object.set-prototype-of":292}],203:[function(e,t,r){e("../../modules/es6.symbol"),t.exports=e("../../modules/_core").Symbol.for},{"../../modules/_core":223,"../../modules/es6.symbol":295}],204:[function(e,t,r){e("../../modules/es6.symbol"),e("../../modules/es6.object.to-string"),e("../../modules/es7.symbol.async-iterator"),e("../../modules/es7.symbol.observable"),t.exports=e("../../modules/_core").Symbol},{"../../modules/_core":223,"../../modules/es6.object.to-string":293,"../../modules/es6.symbol":295,"../../modules/es7.symbol.async-iterator":301,"../../modules/es7.symbol.observable":302}],205:[function(e,t,r){e("../../modules/es6.string.iterator"),e("../../modules/web.dom.iterable"),t.exports=e("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":282,"../../modules/es6.string.iterator":294,"../../modules/web.dom.iterable":307}],206:[function(e,t,r){e("../modules/es6.object.to-string"),e("../modules/web.dom.iterable"),e("../modules/es6.weak-map"),e("../modules/es7.weak-map.of"),e("../modules/es7.weak-map.from"),t.exports=e("../modules/_core").WeakMap},{"../modules/_core":223,"../modules/es6.object.to-string":293,"../modules/es6.weak-map":296,"../modules/es7.weak-map.from":303,"../modules/es7.weak-map.of":304,"../modules/web.dom.iterable":307}],207:[function(e,t,r){e("../modules/es6.object.to-string"),e("../modules/web.dom.iterable"),e("../modules/es6.weak-set"),e("../modules/es7.weak-set.of"),e("../modules/es7.weak-set.from"),t.exports=e("../modules/_core").WeakSet},{"../modules/_core":223,"../modules/es6.object.to-string":293,"../modules/es6.weak-set":297,"../modules/es7.weak-set.from":305,"../modules/es7.weak-set.of":306,"../modules/web.dom.iterable":307}],208:[function(e,t,r){t.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},{}],209:[function(e,t,r){t.exports=function(){}},{}],210:[function(e,t,r){t.exports=function(e,t,r,n){if(!(e instanceof t)||void 0!==n&&n in e)throw TypeError(r+": incorrect invocation!");return e}},{}],211:[function(e,t,r){var n=e("./_is-object");t.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},{"./_is-object":241}],212:[function(e,t,r){var n=e("./_for-of");t.exports=function(e,t){var r=[];return n(e,!1,r.push,r,t),r}},{"./_for-of":232}],213:[function(e,t,r){var n=e("./_to-iobject"),i=e("./_to-length"),s=e("./_to-absolute-index");t.exports=function(e){return function(t,r,a){var o,u=n(t),l=i(u.length),c=s(a,l);if(e&&r!=r){for(;l>c;)if((o=u[c++])!=o)return!0}else for(;l>c;c++)if((e||c in u)&&u[c]===r)return e||c||0;return!e&&-1}}},{"./_to-absolute-index":273,"./_to-iobject":275,"./_to-length":276}],214:[function(e,t,r){var n=e("./_ctx"),i=e("./_iobject"),s=e("./_to-object"),a=e("./_to-length"),o=e("./_array-species-create");t.exports=function(e,t){var r=1==e,u=2==e,l=3==e,c=4==e,p=6==e,h=5==e||p,f=t||o;return function(t,o,d){for(var m,y,g=s(t),b=i(g),v=n(o,d,3),x=a(b.length),E=0,A=r?f(t,x):u?f(t,0):void 0;x>E;E++)if((h||E in b)&&(m=b[E],y=v(m,E,g),e))if(r)A[E]=y;else if(y)switch(e){case 3:return!0;case 5:return m;case 6:return E;case 2:A.push(m)}else if(c)return!1;return p?-1:l||c?c:A}}},{"./_array-species-create":216,"./_ctx":224,"./_iobject":238,"./_to-length":276,"./_to-object":277}],215:[function(e,t,r){var n=e("./_is-object"),i=e("./_is-array"),s=e("./_wks")("species");t.exports=function(e){var t;return i(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!i(t.prototype)||(t=void 0),n(t)&&null===(t=t[s])&&(t=void 0)),void 0===t?Array:t}},{"./_is-array":240,"./_is-object":241,"./_wks":283}],216:[function(e,t,r){var n=e("./_array-species-constructor");t.exports=function(e,t){return new(n(e))(t)}},{"./_array-species-constructor":215}],217:[function(e,t,r){var n=e("./_cof"),i=e("./_wks")("toStringTag"),s="Arguments"==n(function(){return arguments}());t.exports=function(e){var t,r,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?r:s?n(t):"Object"==(a=n(t))&&"function"==typeof t.callee?"Arguments":a}},{"./_cof":218,"./_wks":283}],218:[function(e,t,r){var n={}.toString;t.exports=function(e){return n.call(e).slice(8,-1)}},{}],219:[function(e,t,r){"use strict";var n=e("./_object-dp").f,i=e("./_object-create"),s=e("./_redefine-all"),a=e("./_ctx"),o=e("./_an-instance"),u=e("./_for-of"),l=e("./_iter-define"),c=e("./_iter-step"),p=e("./_set-species"),h=e("./_descriptors"),f=e("./_meta").fastKey,d=e("./_validate-collection"),m=h?"_s":"size",y=function(e,t){var r,n=f(t);if("F"!==n)return e._i[n];for(r=e._f;r;r=r.n)if(r.k==t)return r};t.exports={getConstructor:function(e,t,r,l){var c=e(function(e,n){o(e,c,t,"_i"),e._t=t,e._i=i(null),e._f=void 0,e._l=void 0,e[m]=0,void 0!=n&&u(n,r,e[l],e)});return s(c.prototype,{clear:function(){for(var e=d(this,t),r=e._i,n=e._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete r[n.i];e._f=e._l=void 0,e[m]=0},delete:function(e){var r=d(this,t),n=y(r,e);if(n){var i=n.n,s=n.p;delete r._i[n.i],n.r=!0,s&&(s.n=i),i&&(i.p=s),r._f==n&&(r._f=i),r._l==n&&(r._l=s),r[m]--}return!!n},forEach:function(e){d(this,t);for(var r,n=a(e,arguments.length>1?arguments[1]:void 0,3);r=r?r.n:this._f;)for(n(r.v,r.k,this);r&&r.r;)r=r.p},has:function(e){return!!y(d(this,t),e)}}),h&&n(c.prototype,"size",{get:function(){return d(this,t)[m]}}),c},def:function(e,t,r){var n,i,s=y(e,t);return s?s.v=r:(e._l=s={i:i=f(t,!0),k:t,v:r,p:n=e._l,n:void 0,r:!1},e._f||(e._f=s),n&&(n.n=s),e[m]++,"F"!==i&&(e._i[i]=s)),e},getEntry:y,setStrong:function(e,t,r){l(e,t,function(e,r){this._t=d(e,t),this._k=r,this._l=void 0},function(){for(var e=this._k,t=this._l;t&&t.r;)t=t.p;return this._t&&(this._l=t=t?t.n:this._t._f)?"keys"==e?c(0,t.k):"values"==e?c(0,t.v):c(0,[t.k,t.v]):(this._t=void 0,c(1))},r?"entries":"values",!r,!0),p(t)}}},{"./_an-instance":210,"./_ctx":224,"./_descriptors":226,"./_for-of":232,"./_iter-define":244,"./_iter-step":245,"./_meta":248,"./_object-create":250,"./_object-dp":251,"./_redefine-all":263,"./_set-species":268,"./_validate-collection":280}],220:[function(e,t,r){var n=e("./_classof"),i=e("./_array-from-iterable");t.exports=function(e){return function(){if(n(this)!=e)throw TypeError(e+"#toJSON isn't generic");return i(this)}}},{"./_array-from-iterable":212,"./_classof":217}],221:[function(e,t,r){"use strict";var n=e("./_redefine-all"),i=e("./_meta").getWeak,s=e("./_an-object"),a=e("./_is-object"),o=e("./_an-instance"),u=e("./_for-of"),l=e("./_array-methods"),c=e("./_has"),p=e("./_validate-collection"),h=l(5),f=l(6),d=0,m=function(e){return e._l||(e._l=new y)},y=function(){this.a=[]},g=function(e,t){return h(e.a,function(e){return e[0]===t})};y.prototype={get:function(e){var t=g(this,e);if(t)return t[1]},has:function(e){return!!g(this,e)},set:function(e,t){var r=g(this,e);r?r[1]=t:this.a.push([e,t])},delete:function(e){var t=f(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},t.exports={getConstructor:function(e,t,r,s){var l=e(function(e,n){o(e,l,t,"_i"),e._t=t,e._i=d++,e._l=void 0,void 0!=n&&u(n,r,e[s],e)});return n(l.prototype,{delete:function(e){if(!a(e))return!1;var r=i(e);return!0===r?m(p(this,t)).delete(e):r&&c(r,this._i)&&delete r[this._i]},has:function(e){if(!a(e))return!1;var r=i(e);return!0===r?m(p(this,t)).has(e):r&&c(r,this._i)}}),l},def:function(e,t,r){var n=i(s(t),!0);return!0===n?m(e).set(t,r):n[e._i]=r,e},ufstore:m}},{"./_an-instance":210,"./_an-object":211,"./_array-methods":214,"./_for-of":232,"./_has":234,"./_is-object":241,"./_meta":248,"./_redefine-all":263,"./_validate-collection":280}],222:[function(e,t,r){"use strict";var n=e("./_global"),i=e("./_export"),s=e("./_meta"),a=e("./_fails"),o=e("./_hide"),u=e("./_redefine-all"),l=e("./_for-of"),c=e("./_an-instance"),p=e("./_is-object"),h=e("./_set-to-string-tag"),f=e("./_object-dp").f,d=e("./_array-methods")(0),m=e("./_descriptors");t.exports=function(e,t,r,y,g,b){var v=n[e],x=v,E=g?"set":"add",A=x&&x.prototype,D={};return m&&"function"==typeof x&&(b||A.forEach&&!a(function(){(new x).entries().next()}))?(x=t(function(t,r){c(t,x,e,"_c"),t._c=new v,void 0!=r&&l(r,g,t[E],t)}),d("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(e){var t="add"==e||"set"==e;e in A&&(!b||"clear"!=e)&&o(x.prototype,e,function(r,n){if(c(this,x,e),!t&&b&&!p(r))return"get"==e&&void 0;var i=this._c[e](0===r?0:r,n);return t?this:i})}),b||f(x.prototype,"size",{get:function(){return this._c.size}})):(x=y.getConstructor(t,e,g,E),u(x.prototype,r),s.NEED=!0),h(x,e),D[e]=x,i(i.G+i.W+i.F,D),b||y.setStrong(x,e,g),x}},{"./_an-instance":210,"./_array-methods":214,"./_descriptors":226,"./_export":230,"./_fails":231,"./_for-of":232,"./_global":233,"./_hide":235,"./_is-object":241,"./_meta":248,"./_object-dp":251,"./_redefine-all":263,"./_set-to-string-tag":269}],223:[function(e,t,r){var n=t.exports={version:"2.5.1"};"number"==typeof __e&&(__e=n)},{}],224:[function(e,t,r){var n=e("./_a-function");t.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)}}return function(){return e.apply(t,arguments)}}},{"./_a-function":208}],225:[function(e,t,r){t.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},{}],226:[function(e,t,r){t.exports=!e("./_fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{"./_fails":231}],227:[function(e,t,r){var n=e("./_is-object"),i=e("./_global").document,s=n(i)&&n(i.createElement);t.exports=function(e){return s?i.createElement(e):{}}},{"./_global":233,"./_is-object":241}],228:[function(e,t,r){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],229:[function(e,t,r){var n=e("./_object-keys"),i=e("./_object-gops"),s=e("./_object-pie");t.exports=function(e){var t=n(e),r=i.f;if(r)for(var a,o=r(e),u=s.f,l=0;o.length>l;)u.call(e,a=o[l++])&&t.push(a);return t}},{"./_object-gops":256,"./_object-keys":259,"./_object-pie":260}],230:[function(e,t,r){var n=e("./_global"),i=e("./_core"),s=e("./_ctx"),a=e("./_hide"),o=function(e,t,r){var u,l,c,p=e&o.F,h=e&o.G,f=e&o.S,d=e&o.P,m=e&o.B,y=e&o.W,g=h?i:i[t]||(i[t]={}),b=g.prototype,v=h?n:f?n[t]:(n[t]||{}).prototype;h&&(r=t);for(u in r)(l=!p&&v&&void 0!==v[u])&&u in g||(c=l?v[u]:r[u],g[u]=h&&"function"!=typeof v[u]?r[u]:m&&l?s(c,n):y&&v[u]==c?function(e){var t=function(t,r,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,r)}return new e(t,r,n)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(c):d&&"function"==typeof c?s(Function.call,c):c,d&&((g.virtual||(g.virtual={}))[u]=c,e&o.R&&b&&!b[u]&&a(b,u,c)))};o.F=1,o.G=2,o.S=4,o.P=8,o.B=16,o.W=32,o.U=64,o.R=128,t.exports=o},{"./_core":223,"./_ctx":224,"./_global":233,"./_hide":235}],231:[function(e,t,r){t.exports=function(e){try{return!!e()}catch(e){return!0}}},{}],232:[function(e,t,r){var n=e("./_ctx"),i=e("./_iter-call"),s=e("./_is-array-iter"),a=e("./_an-object"),o=e("./_to-length"),u=e("./core.get-iterator-method"),l={},c={};(r=t.exports=function(e,t,r,p,h){var f,d,m,y,g=h?function(){return e}:u(e),b=n(r,p,t?2:1),v=0;if("function"!=typeof g)throw TypeError(e+" is not iterable!");if(s(g)){for(f=o(e.length);f>v;v++)if((y=t?b(a(d=e[v])[0],d[1]):b(e[v]))===l||y===c)return y}else for(m=g.call(e);!(d=m.next()).done;)if((y=i(m,b,d.value,t))===l||y===c)return y}).BREAK=l,r.RETURN=c},{"./_an-object":211,"./_ctx":224,"./_is-array-iter":239,"./_iter-call":242,"./_to-length":276,"./core.get-iterator-method":284}],233:[function(e,t,r){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},{}],234:[function(e,t,r){var n={}.hasOwnProperty;t.exports=function(e,t){return n.call(e,t)}},{}],235:[function(e,t,r){var n=e("./_object-dp"),i=e("./_property-desc");t.exports=e("./_descriptors")?function(e,t,r){return n.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},{"./_descriptors":226,"./_object-dp":251,"./_property-desc":262}],236:[function(e,t,r){var n=e("./_global").document;t.exports=n&&n.documentElement},{"./_global":233}],237:[function(e,t,r){t.exports=!e("./_descriptors")&&!e("./_fails")(function(){return 7!=Object.defineProperty(e("./_dom-create")("div"),"a",{get:function(){return 7}}).a})},{"./_descriptors":226,"./_dom-create":227,"./_fails":231}],238:[function(e,t,r){var n=e("./_cof");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},{"./_cof":218}],239:[function(e,t,r){var n=e("./_iterators"),i=e("./_wks")("iterator"),s=Array.prototype;t.exports=function(e){return void 0!==e&&(n.Array===e||s[i]===e)}},{"./_iterators":246,"./_wks":283}],240:[function(e,t,r){var n=e("./_cof");t.exports=Array.isArray||function(e){return"Array"==n(e)}},{"./_cof":218}],241:[function(e,t,r){t.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},{}],242:[function(e,t,r){var n=e("./_an-object");t.exports=function(e,t,r,i){try{return i?t(n(r)[0],r[1]):t(r)}catch(t){var s=e.return;throw void 0!==s&&n(s.call(e)),t}}},{"./_an-object":211}],243:[function(e,t,r){"use strict";var n=e("./_object-create"),i=e("./_property-desc"),s=e("./_set-to-string-tag"),a={};e("./_hide")(a,e("./_wks")("iterator"),function(){return this}),t.exports=function(e,t,r){e.prototype=n(a,{next:i(1,r)}),s(e,t+" Iterator")}},{"./_hide":235,"./_object-create":250,"./_property-desc":262,"./_set-to-string-tag":269,"./_wks":283}],244:[function(e,t,r){"use strict";var n=e("./_library"),i=e("./_export"),s=e("./_redefine"),a=e("./_hide"),o=e("./_has"),u=e("./_iterators"),l=e("./_iter-create"),c=e("./_set-to-string-tag"),p=e("./_object-gpo"),h=e("./_wks")("iterator"),f=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(e,t,r,m,y,g,b){l(r,t,m);var v,x,E,A=function(e){if(!f&&e in _)return _[e];switch(e){case"keys":case"values":return function(){return new r(this,e)}}return function(){return new r(this,e)}},D=t+" Iterator",C="values"==y,S=!1,_=e.prototype,w=_[h]||_["@@iterator"]||y&&_[y],k=w||A(y),F=y?C?A("entries"):k:void 0,T="Array"==t?_.entries||w:w;if(T&&(E=p(T.call(new e)))!==Object.prototype&&E.next&&(c(E,D,!0),n||o(E,h)||a(E,h,d)),C&&w&&"values"!==w.name&&(S=!0,k=function(){return w.call(this)}),n&&!b||!f&&!S&&_[h]||a(_,h,k),u[t]=k,u[D]=d,y)if(v={values:C?k:A("values"),keys:g?k:A("keys"),entries:F},b)for(x in v)x in _||s(_,x,v[x]);else i(i.P+i.F*(f||S),t,v);return v}},{"./_export":230,"./_has":234,"./_hide":235,"./_iter-create":243,"./_iterators":246,"./_library":247,"./_object-gpo":257,"./_redefine":264,"./_set-to-string-tag":269,"./_wks":283}],245:[function(e,t,r){t.exports=function(e,t){return{value:t,done:!!e}}},{}],246:[function(e,t,r){t.exports={}},{}],247:[function(e,t,r){t.exports=!0},{}],248:[function(e,t,r){var n=e("./_uid")("meta"),i=e("./_is-object"),s=e("./_has"),a=e("./_object-dp").f,o=0,u=Object.isExtensible||function(){return!0},l=!e("./_fails")(function(){return u(Object.preventExtensions({}))}),c=function(e){a(e,n,{value:{i:"O"+ ++o,w:{}}})},p=t.exports={KEY:n,NEED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!s(e,n)){if(!u(e))return"F";if(!t)return"E";c(e)}return e[n].i},getWeak:function(e,t){if(!s(e,n)){if(!u(e))return!0;if(!t)return!1;c(e)}return e[n].w},onFreeze:function(e){return l&&p.NEED&&u(e)&&!s(e,n)&&c(e),e}}},{"./_fails":231,"./_has":234,"./_is-object":241,"./_object-dp":251,"./_uid":279}],249:[function(e,t,r){"use strict";var n=e("./_object-keys"),i=e("./_object-gops"),s=e("./_object-pie"),a=e("./_to-object"),o=e("./_iobject"),u=Object.assign;t.exports=!u||e("./_fails")(function(){var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(e){t[e]=e}),7!=u({},e)[r]||Object.keys(u({},t)).join("")!=n})?function(e,t){for(var r=a(e),u=arguments.length,l=1,c=i.f,p=s.f;u>l;)for(var h,f=o(arguments[l++]),d=c?n(f).concat(c(f)):n(f),m=d.length,y=0;m>y;)p.call(f,h=d[y++])&&(r[h]=f[h]);return r}:u},{"./_fails":231,"./_iobject":238,"./_object-gops":256,"./_object-keys":259,"./_object-pie":260,"./_to-object":277}],250:[function(e,t,r){var n=e("./_an-object"),i=e("./_object-dps"),s=e("./_enum-bug-keys"),a=e("./_shared-key")("IE_PROTO"),o=function(){},u=function(){var t,r=e("./_dom-create")("iframe"),n=s.length;for(r.style.display="none",e("./_html").appendChild(r),r.src="javascript:",(t=r.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),u=t.F;n--;)delete u.prototype[s[n]];return u()};t.exports=Object.create||function(e,t){var r;return null!==e?(o.prototype=n(e),r=new o,o.prototype=null,r[a]=e):r=u(),void 0===t?r:i(r,t)}},{"./_an-object":211,"./_dom-create":227,"./_enum-bug-keys":228,"./_html":236,"./_object-dps":252,"./_shared-key":270}],251:[function(e,t,r){var n=e("./_an-object"),i=e("./_ie8-dom-define"),s=e("./_to-primitive"),a=Object.defineProperty;r.f=e("./_descriptors")?Object.defineProperty:function(e,t,r){if(n(e),t=s(t,!0),n(r),i)try{return a(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e}},{"./_an-object":211,"./_descriptors":226,"./_ie8-dom-define":237,"./_to-primitive":278}],252:[function(e,t,r){var n=e("./_object-dp"),i=e("./_an-object"),s=e("./_object-keys");t.exports=e("./_descriptors")?Object.defineProperties:function(e,t){i(e);for(var r,a=s(t),o=a.length,u=0;o>u;)n.f(e,r=a[u++],t[r]);return e}},{"./_an-object":211,"./_descriptors":226,"./_object-dp":251,"./_object-keys":259}],253:[function(e,t,r){var n=e("./_object-pie"),i=e("./_property-desc"),s=e("./_to-iobject"),a=e("./_to-primitive"),o=e("./_has"),u=e("./_ie8-dom-define"),l=Object.getOwnPropertyDescriptor;r.f=e("./_descriptors")?l:function(e,t){if(e=s(e),t=a(t,!0),u)try{return l(e,t)}catch(e){}if(o(e,t))return i(!n.f.call(e,t),e[t])}},{"./_descriptors":226,"./_has":234,"./_ie8-dom-define":237,"./_object-pie":260,"./_property-desc":262,"./_to-iobject":275,"./_to-primitive":278}],254:[function(e,t,r){var n=e("./_to-iobject"),i=e("./_object-gopn").f,s={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(e){return a&&"[object Window]"==s.call(e)?function(e){try{return i(e)}catch(e){return a.slice()}}(e):i(n(e))}},{"./_object-gopn":255,"./_to-iobject":275}],255:[function(e,t,r){var n=e("./_object-keys-internal"),i=e("./_enum-bug-keys").concat("length","prototype");r.f=Object.getOwnPropertyNames||function(e){return n(e,i)}},{"./_enum-bug-keys":228,"./_object-keys-internal":258}],256:[function(e,t,r){r.f=Object.getOwnPropertySymbols},{}],257:[function(e,t,r){var n=e("./_has"),i=e("./_to-object"),s=e("./_shared-key")("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(e){return e=i(e),n(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},{"./_has":234,"./_shared-key":270,"./_to-object":277}],258:[function(e,t,r){var n=e("./_has"),i=e("./_to-iobject"),s=e("./_array-includes")(!1),a=e("./_shared-key")("IE_PROTO");t.exports=function(e,t){var r,o=i(e),u=0,l=[];for(r in o)r!=a&&n(o,r)&&l.push(r);for(;t.length>u;)n(o,r=t[u++])&&(~s(l,r)||l.push(r));return l}},{"./_array-includes":213,"./_has":234,"./_shared-key":270,"./_to-iobject":275}],259:[function(e,t,r){var n=e("./_object-keys-internal"),i=e("./_enum-bug-keys");t.exports=Object.keys||function(e){return n(e,i)}},{"./_enum-bug-keys":228,"./_object-keys-internal":258}],260:[function(e,t,r){r.f={}.propertyIsEnumerable},{}],261:[function(e,t,r){var n=e("./_export"),i=e("./_core"),s=e("./_fails");t.exports=function(e,t){var r=(i.Object||{})[e]||Object[e],a={};a[e]=t(r),n(n.S+n.F*s(function(){r(1)}),"Object",a)}},{"./_core":223,"./_export":230,"./_fails":231}],262:[function(e,t,r){t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},{}],263:[function(e,t,r){var n=e("./_hide");t.exports=function(e,t,r){for(var i in t)r&&e[i]?e[i]=t[i]:n(e,i,t[i]);return e}},{"./_hide":235}],264:[function(e,t,r){t.exports=e("./_hide")},{"./_hide":235}],265:[function(e,t,r){"use strict";var n=e("./_export"),i=e("./_a-function"),s=e("./_ctx"),a=e("./_for-of");t.exports=function(e){n(n.S,e,{from:function(e){var t,r,n,o,u=arguments[1];return i(this),(t=void 0!==u)&&i(u),void 0==e?new this:(r=[],t?(n=0,o=s(u,arguments[2],2),a(e,!1,function(e){r.push(o(e,n++))})):a(e,!1,r.push,r),new this(r))}})}},{"./_a-function":208,"./_ctx":224,"./_export":230,"./_for-of":232}],266:[function(e,t,r){"use strict";var n=e("./_export");t.exports=function(e){n(n.S,e,{of:function(){for(var e=arguments.length,t=Array(e);e--;)t[e]=arguments[e];return new this(t)}})}},{"./_export":230}],267:[function(e,t,r){var n=e("./_is-object"),i=e("./_an-object"),s=function(e,t){if(i(e),!n(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,r,n){try{(n=e("./_ctx")(Function.call,e("./_object-gopd").f(Object.prototype,"__proto__").set,2))(t,[]),r=!(t instanceof Array)}catch(e){r=!0}return function(e,t){return s(e,t),r?e.__proto__=t:n(e,t),e}}({},!1):void 0),check:s}},{"./_an-object":211,"./_ctx":224,"./_is-object":241,"./_object-gopd":253}],268:[function(e,t,r){"use strict";var n=e("./_global"),i=e("./_core"),s=e("./_object-dp"),a=e("./_descriptors"),o=e("./_wks")("species");t.exports=function(e){var t="function"==typeof i[e]?i[e]:n[e];a&&t&&!t[o]&&s.f(t,o,{configurable:!0,get:function(){return this}})}},{"./_core":223,"./_descriptors":226,"./_global":233,"./_object-dp":251,"./_wks":283}],269:[function(e,t,r){var n=e("./_object-dp").f,i=e("./_has"),s=e("./_wks")("toStringTag");t.exports=function(e,t,r){e&&!i(e=r?e:e.prototype,s)&&n(e,s,{configurable:!0,value:t})}},{"./_has":234,"./_object-dp":251,"./_wks":283}],270:[function(e,t,r){var n=e("./_shared")("keys"),i=e("./_uid");t.exports=function(e){return n[e]||(n[e]=i(e))}},{"./_shared":271,"./_uid":279}],271:[function(e,t,r){var n=e("./_global"),i=n["__core-js_shared__"]||(n["__core-js_shared__"]={});t.exports=function(e){return i[e]||(i[e]={})}},{"./_global":233}],272:[function(e,t,r){var n=e("./_to-integer"),i=e("./_defined");t.exports=function(e){return function(t,r){var s,a,o=String(i(t)),u=n(r),l=o.length;return u<0||u>=l?e?"":void 0:(s=o.charCodeAt(u))<55296||s>56319||u+1===l||(a=o.charCodeAt(u+1))<56320||a>57343?e?o.charAt(u):s:e?o.slice(u,u+2):a-56320+(s-55296<<10)+65536}}},{"./_defined":225,"./_to-integer":274}],273:[function(e,t,r){var n=e("./_to-integer"),i=Math.max,s=Math.min;t.exports=function(e,t){return(e=n(e))<0?i(e+t,0):s(e,t)}},{"./_to-integer":274}],274:[function(e,t,r){var n=Math.ceil,i=Math.floor;t.exports=function(e){return isNaN(e=+e)?0:(e>0?i:n)(e)}},{}],275:[function(e,t,r){var n=e("./_iobject"),i=e("./_defined");t.exports=function(e){return n(i(e))}},{"./_defined":225,"./_iobject":238}],276:[function(e,t,r){var n=e("./_to-integer"),i=Math.min;t.exports=function(e){return e>0?i(n(e),9007199254740991):0}},{"./_to-integer":274}],277:[function(e,t,r){var n=e("./_defined");t.exports=function(e){return Object(n(e))}},{"./_defined":225}],278:[function(e,t,r){var n=e("./_is-object");t.exports=function(e,t){if(!n(e))return e;var r,i;if(t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;if("function"==typeof(r=e.valueOf)&&!n(i=r.call(e)))return i;if(!t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":241}],279:[function(e,t,r){var n=0,i=Math.random();t.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+i).toString(36))}},{}],280:[function(e,t,r){var n=e("./_is-object");t.exports=function(e,t){if(!n(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},{"./_is-object":241}],281:[function(e,t,r){var n=e("./_global"),i=e("./_core"),s=e("./_library"),a=e("./_wks-ext"),o=e("./_object-dp").f;t.exports=function(e){var t=i.Symbol||(i.Symbol=s?{}:n.Symbol||{});"_"==e.charAt(0)||e in t||o(t,e,{value:a.f(e)})}},{"./_core":223,"./_global":233,"./_library":247,"./_object-dp":251,"./_wks-ext":282}],282:[function(e,t,r){r.f=e("./_wks")},{"./_wks":283}],283:[function(e,t,r){var n=e("./_shared")("wks"),i=e("./_uid"),s=e("./_global").Symbol,a="function"==typeof s;(t.exports=function(e){return n[e]||(n[e]=a&&s[e]||(a?s:i)("Symbol."+e))}).store=n},{"./_global":233,"./_shared":271,"./_uid":279}],284:[function(e,t,r){var n=e("./_classof"),i=e("./_wks")("iterator"),s=e("./_iterators");t.exports=e("./_core").getIteratorMethod=function(e){if(void 0!=e)return e[i]||e["@@iterator"]||s[n(e)]}},{"./_classof":217,"./_core":223,"./_iterators":246,"./_wks":283}],285:[function(e,t,r){var n=e("./_an-object"),i=e("./core.get-iterator-method");t.exports=e("./_core").getIterator=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return n(t.call(e))}},{"./_an-object":211,"./_core":223,"./core.get-iterator-method":284}],286:[function(e,t,r){"use strict";var n=e("./_add-to-unscopables"),i=e("./_iter-step"),s=e("./_iterators"),a=e("./_to-iobject");t.exports=e("./_iter-define")(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,i(1)):"keys"==t?i(0,r):"values"==t?i(0,e[r]):i(0,[r,e[r]])},"values"),s.Arguments=s.Array,n("keys"),n("values"),n("entries")},{"./_add-to-unscopables":209,"./_iter-define":244,"./_iter-step":245,"./_iterators":246,"./_to-iobject":275}],287:[function(e,t,r){"use strict";var n=e("./_collection-strong"),i=e("./_validate-collection");t.exports=e("./_collection")("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=n.getEntry(i(this,"Map"),e);return t&&t.v},set:function(e,t){return n.def(i(this,"Map"),0===e?0:e,t)}},n,!0)},{"./_collection":222,"./_collection-strong":219,"./_validate-collection":280}],288:[function(e,t,r){var n=e("./_export");n(n.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},{"./_export":230}],289:[function(e,t,r){var n=e("./_export");n(n.S+n.F,"Object",{assign:e("./_object-assign")})},{"./_export":230,"./_object-assign":249}],290:[function(e,t,r){var n=e("./_export");n(n.S,"Object",{create:e("./_object-create")})},{"./_export":230,"./_object-create":250}],291:[function(e,t,r){var n=e("./_to-object"),i=e("./_object-keys");e("./_object-sap")("keys",function(){return function(e){return i(n(e))}})},{"./_object-keys":259,"./_object-sap":261,"./_to-object":277}],292:[function(e,t,r){var n=e("./_export");n(n.S,"Object",{setPrototypeOf:e("./_set-proto").set})},{"./_export":230,"./_set-proto":267}],293:[function(e,t,r){arguments[4][190][0].apply(r,arguments)},{dup:190}],294:[function(e,t,r){"use strict";var n=e("./_string-at")(!0);e("./_iter-define")(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=n(t,r),this._i+=e.length,{value:e,done:!1})})},{"./_iter-define":244,"./_string-at":272}],295:[function(e,t,r){"use strict";var n=e("./_global"),i=e("./_has"),s=e("./_descriptors"),a=e("./_export"),o=e("./_redefine"),u=e("./_meta").KEY,l=e("./_fails"),c=e("./_shared"),p=e("./_set-to-string-tag"),h=e("./_uid"),f=e("./_wks"),d=e("./_wks-ext"),m=e("./_wks-define"),y=e("./_enum-keys"),g=e("./_is-array"),b=e("./_an-object"),v=e("./_to-iobject"),x=e("./_to-primitive"),E=e("./_property-desc"),A=e("./_object-create"),D=e("./_object-gopn-ext"),C=e("./_object-gopd"),S=e("./_object-dp"),_=e("./_object-keys"),w=C.f,k=S.f,F=D.f,T=n.Symbol,P=n.JSON,B=P&&P.stringify,O=f("_hidden"),j=f("toPrimitive"),N={}.propertyIsEnumerable,I=c("symbol-registry"),L=c("symbols"),M=c("op-symbols"),R=Object.prototype,V="function"==typeof T,U=n.QObject,q=!U||!U.prototype||!U.prototype.findChild,G=s&&l(function(){return 7!=A(k({},"a",{get:function(){return k(this,"a",{value:7}).a}})).a})?function(e,t,r){var n=w(R,t);n&&delete R[t],k(e,t,r),n&&e!==R&&k(R,t,n)}:k,X=function(e){var t=L[e]=A(T.prototype);return t._k=e,t},W=V&&"symbol"==typeof T.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof T},J=function(e,t,r){return e===R&&J(M,t,r),b(e),t=x(t,!0),b(r),i(L,t)?(r.enumerable?(i(e,O)&&e[O][t]&&(e[O][t]=!1),r=A(r,{enumerable:E(0,!1)})):(i(e,O)||k(e,O,E(1,{})),e[O][t]=!0),G(e,t,r)):k(e,t,r)},K=function(e,t){b(e);for(var r,n=y(t=v(t)),i=0,s=n.length;s>i;)J(e,r=n[i++],t[r]);return e},z=function(e){var t=N.call(this,e=x(e,!0));return!(this===R&&i(L,e)&&!i(M,e))&&(!(t||!i(this,e)||!i(L,e)||i(this,O)&&this[O][e])||t)},Y=function(e,t){if(e=v(e),t=x(t,!0),e!==R||!i(L,t)||i(M,t)){var r=w(e,t);return!r||!i(L,t)||i(e,O)&&e[O][t]||(r.enumerable=!0),r}},H=function(e){for(var t,r=F(v(e)),n=[],s=0;r.length>s;)i(L,t=r[s++])||t==O||t==u||n.push(t);return n},$=function(e){for(var t,r=e===R,n=F(r?M:v(e)),s=[],a=0;n.length>a;)!i(L,t=n[a++])||r&&!i(R,t)||s.push(L[t]);return s};V||(o((T=function(){if(this instanceof T)throw TypeError("Symbol is not a constructor!");var e=h(arguments.length>0?arguments[0]:void 0),t=function(r){this===R&&t.call(M,r),i(this,O)&&i(this[O],e)&&(this[O][e]=!1),G(this,e,E(1,r))};return s&&q&&G(R,e,{configurable:!0,set:t}),X(e)}).prototype,"toString",function(){return this._k}),C.f=Y,S.f=J,e("./_object-gopn").f=D.f=H,e("./_object-pie").f=z,e("./_object-gops").f=$,s&&!e("./_library")&&o(R,"propertyIsEnumerable",z,!0),d.f=function(e){return X(f(e))}),a(a.G+a.W+a.F*!V,{Symbol:T});for(var Q="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Z=0;Q.length>Z;)f(Q[Z++]);for(var ee=_(f.store),te=0;ee.length>te;)m(ee[te++]);a(a.S+a.F*!V,"Symbol",{for:function(e){return i(I,e+="")?I[e]:I[e]=T(e)},keyFor:function(e){if(!W(e))throw TypeError(e+" is not a symbol!");for(var t in I)if(I[t]===e)return t},useSetter:function(){q=!0},useSimple:function(){q=!1}}),a(a.S+a.F*!V,"Object",{create:function(e,t){return void 0===t?A(e):K(A(e),t)},defineProperty:J,defineProperties:K,getOwnPropertyDescriptor:Y,getOwnPropertyNames:H,getOwnPropertySymbols:$}),P&&a(a.S+a.F*(!V||l(function(){var e=T();return"[null]"!=B([e])||"{}"!=B({a:e})||"{}"!=B(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!W(e)){for(var t,r,n=[e],i=1;arguments.length>i;)n.push(arguments[i++]);return"function"==typeof(t=n[1])&&(r=t),!r&&g(t)||(t=function(e,t){if(r&&(t=r.call(this,e,t)),!W(t))return t}),n[1]=t,B.apply(P,n)}}}),T.prototype[j]||e("./_hide")(T.prototype,j,T.prototype.valueOf),p(T,"Symbol"),p(Math,"Math",!0),p(n.JSON,"JSON",!0)},{"./_an-object":211,"./_descriptors":226,"./_enum-keys":229,"./_export":230,"./_fails":231,"./_global":233,"./_has":234,"./_hide":235,"./_is-array":240,"./_library":247,"./_meta":248,"./_object-create":250,"./_object-dp":251,"./_object-gopd":253,"./_object-gopn":255,"./_object-gopn-ext":254,"./_object-gops":256,"./_object-keys":259,"./_object-pie":260,"./_property-desc":262,"./_redefine":264,"./_set-to-string-tag":269,"./_shared":271,"./_to-iobject":275,"./_to-primitive":278,"./_uid":279,"./_wks":283,"./_wks-define":281,"./_wks-ext":282}],296:[function(e,t,r){"use strict";var n,i=e("./_array-methods")(0),s=e("./_redefine"),a=e("./_meta"),o=e("./_object-assign"),u=e("./_collection-weak"),l=e("./_is-object"),c=e("./_fails"),p=e("./_validate-collection"),h=a.getWeak,f=Object.isExtensible,d=u.ufstore,m={},y=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},g={get:function(e){if(l(e)){var t=h(e);return!0===t?d(p(this,"WeakMap")).get(e):t?t[this._i]:void 0}},set:function(e,t){return u.def(p(this,"WeakMap"),e,t)}},b=t.exports=e("./_collection")("WeakMap",y,g,u,!0,!0);c(function(){return 7!=(new b).set((Object.freeze||Object)(m),7).get(m)})&&(o((n=u.getConstructor(y,"WeakMap")).prototype,g),a.NEED=!0,i(["delete","has","get","set"],function(e){var t=b.prototype,r=t[e];s(t,e,function(t,i){if(l(t)&&!f(t)){this._f||(this._f=new n);var s=this._f[e](t,i);return"set"==e?this:s}return r.call(this,t,i)})}))},{"./_array-methods":214,"./_collection":222,"./_collection-weak":221,"./_fails":231,"./_is-object":241,"./_meta":248,"./_object-assign":249,"./_redefine":264,"./_validate-collection":280}],297:[function(e,t,r){"use strict";var n=e("./_collection-weak"),i=e("./_validate-collection");e("./_collection")("WeakSet",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return n.def(i(this,"WeakSet"),e,!0)}},n,!1,!0)},{"./_collection":222,"./_collection-weak":221,"./_validate-collection":280}],298:[function(e,t,r){e("./_set-collection-from")("Map")},{"./_set-collection-from":265}],299:[function(e,t,r){e("./_set-collection-of")("Map")},{"./_set-collection-of":266}],300:[function(e,t,r){var n=e("./_export");n(n.P+n.R,"Map",{toJSON:e("./_collection-to-json")("Map")})},{"./_collection-to-json":220,"./_export":230}],301:[function(e,t,r){e("./_wks-define")("asyncIterator")},{"./_wks-define":281}],302:[function(e,t,r){e("./_wks-define")("observable")},{"./_wks-define":281}],303:[function(e,t,r){e("./_set-collection-from")("WeakMap")},{"./_set-collection-from":265}],304:[function(e,t,r){e("./_set-collection-of")("WeakMap")},{"./_set-collection-of":266}],305:[function(e,t,r){e("./_set-collection-from")("WeakSet")},{"./_set-collection-from":265}],306:[function(e,t,r){e("./_set-collection-of")("WeakSet")},{"./_set-collection-of":266}],307:[function(e,t,r){e("./es6.array.iterator");for(var n=e("./_global"),i=e("./_hide"),s=e("./_iterators"),a=e("./_wks")("toStringTag"),o="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),u=0;u<o.length;u++){var l=o[u],c=n[l],p=c&&c.prototype;p&&!p[a]&&i(p,a,l),s[l]=s.Array}},{"./_global":233,"./_hide":235,"./_iterators":246,"./_wks":283,"./es6.array.iterator":286}],308:[function(e,t,r){(function(e){function t(e){return Object.prototype.toString.call(e)}r.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===t(e)},r.isBoolean=function(e){return"boolean"==typeof e},r.isNull=function(e){return null===e},r.isNullOrUndefined=function(e){return null==e},r.isNumber=function(e){return"number"==typeof e},r.isString=function(e){return"string"==typeof e},r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=function(e){return void 0===e},r.isRegExp=function(e){return"[object RegExp]"===t(e)},r.isObject=function(e){return"object"==typeof e&&null!==e},r.isDate=function(e){return"[object Date]"===t(e)},r.isError=function(e){return"[object Error]"===t(e)||e instanceof Error},r.isFunction=function(e){return"function"==typeof e},r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},r.isBuffer=e.isBuffer}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":319}],309:[function(e,t,r){"use strict";var n=e("repeating"),i=/^(?:( )+|\t+)/;t.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");var t,r,s=0,a=0,o=0,u={};e.split(/\n/g).forEach(function(e){if(e){var n,l=e.match(i);l?(n=l[0].length,l[1]?a++:s++):n=0;var c=n-o;o=n,c?(t=u[(r=c>0)?c:-c])?t[0]++:t=u[c]=[1,0]:t&&(t[1]+=Number(r))}});var l,c,p=function(e){var t=0,r=0,n=0;for(var i in e){var s=e[i],a=s[0],o=s[1];(a>r||a===r&&o>n)&&(r=a,n=o,t=Number(i))}return t}(u);return p?a>=s?(l="space",c=n(" ",p)):(l="tab",c=n("\t",p)):(l=null,c=""),{amount:p,type:l,indent:c}}},{repeating:601}],310:[function(e,t,r){"use strict";var n=/[|\\{}()[\]^$+*?.]/g;t.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(n,"\\$&")}},{}],311:[function(e,t,r){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function s(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!function(e){return"number"==typeof e}(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,r,n,o,u,l;if(this._events||(this._events={}),"error"===e&&(!this._events.error||s(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}if(r=this._events[e],a(r))return!1;if(i(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:o=Array.prototype.slice.call(arguments,1),r.apply(this,o)}else if(s(r))for(o=Array.prototype.slice.call(arguments,1),n=(l=r.slice()).length,u=0;u<n;u++)l[u].apply(this,o);return!0},n.prototype.addListener=function(e,t){var r;if(!i(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,i(t.listener)?t.listener:t),this._events[e]?s(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,s(this._events[e])&&!this._events[e].warned&&(r=a(this._maxListeners)?n.defaultMaxListeners:this._maxListeners)&&r>0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}if(!i(t))throw TypeError("listener must be a function");var n=!1;return r.listener=t,this.on(e,r),this},n.prototype.removeListener=function(e,t){var r,n,a,o;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],a=r.length,n=-1,r===t||i(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(s(r)){for(o=a;o-- >0;)if(r[o]===t||r[o].listener&&r[o].listener===t){n=o;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],i(r))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){return this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},{}],312:[function(e,t,r){t.exports={builtin:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,System:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},es5:{Array:!1,Boolean:!1,constructor:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,propertyIsEnumerable:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,toLocaleString:!1,toString:!1,TypeError:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1},es6:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,System:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},browser:{addEventListener:!1,alert:!1,AnalyserNode:!1,Animation:!1,AnimationEffectReadOnly:!1,AnimationEffectTiming:!1,AnimationEffectTimingReadOnly:!1,AnimationEvent:!1,AnimationPlaybackEvent:!1,AnimationTimeline:!1,applicationCache:!1,ApplicationCache:!1,ApplicationCacheErrorEvent:!1,atob:!1,Attr:!1,Audio:!1,AudioBuffer:!1,AudioBufferSourceNode:!1,AudioContext:!1,AudioDestinationNode:!1,AudioListener:!1,AudioNode:!1,AudioParam:!1,AudioProcessingEvent:!1,AutocompleteErrorEvent:!1,BarProp:!1,BatteryManager:!1,BeforeUnloadEvent:!1,BiquadFilterNode:!1,Blob:!1,blur:!1,btoa:!1,Cache:!1,caches:!1,CacheStorage:!1,cancelAnimationFrame:!1,cancelIdleCallback:!1,CanvasGradient:!1,CanvasPattern:!1,CanvasRenderingContext2D:!1,CDATASection:!1,ChannelMergerNode:!1,ChannelSplitterNode:!1,CharacterData:!1,clearInterval:!1,clearTimeout:!1,clientInformation:!1,ClientRect:!1,ClientRectList:!1,ClipboardEvent:!1,close:!1,closed:!1,CloseEvent:!1,Comment:!1,CompositionEvent:!1,confirm:!1,console:!1,ConvolverNode:!1,createImageBitmap:!1,Credential:!1,CredentialsContainer:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CSS:!1,CSSAnimation:!1,CSSFontFaceRule:!1,CSSImportRule:!1,CSSKeyframeRule:!1,CSSKeyframesRule:!1,CSSMediaRule:!1,CSSPageRule:!1,CSSRule:!1,CSSRuleList:!1,CSSStyleDeclaration:!1,CSSStyleRule:!1,CSSStyleSheet:!1,CSSSupportsRule:!1,CSSTransition:!1,CSSUnknownRule:!1,CSSViewportRule:!1,customElements:!1,CustomEvent:!1,DataTransfer:!1,DataTransferItem:!1,DataTransferItemList:!1,Debug:!1,defaultStatus:!1,defaultstatus:!1,DelayNode:!1,DeviceMotionEvent:!1,DeviceOrientationEvent:!1,devicePixelRatio:!1,dispatchEvent:!1,document:!1,Document:!1,DocumentFragment:!1,DocumentTimeline:!1,DocumentType:!1,DOMError:!1,DOMException:!1,DOMImplementation:!1,DOMParser:!1,DOMSettableTokenList:!1,DOMStringList:!1,DOMStringMap:!1,DOMTokenList:!1,DragEvent:!1,DynamicsCompressorNode:!1,Element:!1,ElementTimeControl:!1,ErrorEvent:!1,event:!1,Event:!1,EventSource:!1,EventTarget:!1,external:!1,FederatedCredential:!1,fetch:!1,File:!1,FileError:!1,FileList:!1,FileReader:!1,find:!1,focus:!1,FocusEvent:!1,FontFace:!1,FormData:!1,frameElement:!1,frames:!1,GainNode:!1,Gamepad:!1,GamepadButton:!1,GamepadEvent:!1,getComputedStyle:!1,getSelection:!1,HashChangeEvent:!1,Headers:!1,history:!1,History:!1,HTMLAllCollection:!1,HTMLAnchorElement:!1,HTMLAppletElement:!1,HTMLAreaElement:!1,HTMLAudioElement:!1,HTMLBaseElement:!1,HTMLBlockquoteElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLCollection:!1,HTMLContentElement:!1,HTMLDataListElement:!1,HTMLDetailsElement:!1,HTMLDialogElement:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLDocument:!1,HTMLElement:!1,HTMLEmbedElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormControlsCollection:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLIsIndexElement:!1,HTMLKeygenElement:!1,HTMLLabelElement:!1,HTMLLayerElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMarqueeElement:!1,HTMLMediaElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLMeterElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLOptionsCollection:!1,HTMLOutputElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPictureElement:!1,HTMLPreElement:!1,HTMLProgressElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLShadowElement:!1,HTMLSourceElement:!1,HTMLSpanElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTemplateElement:!1,HTMLTextAreaElement:!1,HTMLTitleElement:!1,HTMLTrackElement:!1,HTMLUListElement:!1,HTMLUnknownElement:!1,HTMLVideoElement:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBEnvironment:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,Image:!1,ImageBitmap:!1,ImageData:!1,indexedDB:!1,innerHeight:!1,innerWidth:!1,InputEvent:!1,InputMethodContext:!1,IntersectionObserver:!1,IntersectionObserverEntry:!1,Intl:!1,KeyboardEvent:!1,KeyframeEffect:!1,KeyframeEffectReadOnly:!1,length:!1,localStorage:!1,location:!1,Location:!1,locationbar:!1,matchMedia:!1,MediaElementAudioSourceNode:!1,MediaEncryptedEvent:!1,MediaError:!1,MediaKeyError:!1,MediaKeyEvent:!1,MediaKeyMessageEvent:!1,MediaKeys:!1,MediaKeySession:!1,MediaKeyStatusMap:!1,MediaKeySystemAccess:!1,MediaList:!1,MediaQueryList:!1,MediaQueryListEvent:!1,MediaSource:!1,MediaRecorder:!1,MediaStream:!1,MediaStreamAudioDestinationNode:!1,MediaStreamAudioSourceNode:!1,MediaStreamEvent:!1,MediaStreamTrack:!1,menubar:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,MIDIAccess:!1,MIDIConnectionEvent:!1,MIDIInput:!1,MIDIInputMap:!1,MIDIMessageEvent:!1,MIDIOutput:!1,MIDIOutputMap:!1,MIDIPort:!1,MimeType:!1,MimeTypeArray:!1,MouseEvent:!1,moveBy:!1,moveTo:!1,MutationEvent:!1,MutationObserver:!1,MutationRecord:!1,name:!1,NamedNodeMap:!1,navigator:!1,Navigator:!1,Node:!1,NodeFilter:!1,NodeIterator:!1,NodeList:!1,Notification:!1,OfflineAudioCompletionEvent:!1,OfflineAudioContext:!1,offscreenBuffering:!1,onbeforeunload:!0,onblur:!0,onerror:!0,onfocus:!0,onload:!0,onresize:!0,onunload:!0,open:!1,openDatabase:!1,opener:!1,opera:!1,Option:!1,OscillatorNode:!1,outerHeight:!1,outerWidth:!1,PageTransitionEvent:!1,pageXOffset:!1,pageYOffset:!1,parent:!1,PasswordCredential:!1,Path2D:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,PeriodicWave:!1,Permissions:!1,PermissionStatus:!1,personalbar:!1,Plugin:!1,PluginArray:!1,PopStateEvent:!1,postMessage:!1,print:!1,ProcessingInstruction:!1,ProgressEvent:!1,PromiseRejectionEvent:!1,prompt:!1,PushManager:!1,PushSubscription:!1,RadioNodeList:!1,Range:!1,ReadableByteStream:!1,ReadableStream:!1,removeEventListener:!1,Request:!1,requestAnimationFrame:!1,requestIdleCallback:!1,resizeBy:!1,resizeTo:!1,Response:!1,RTCIceCandidate:!1,RTCSessionDescription:!1,RTCPeerConnection:!1,screen:!1,Screen:!1,screenLeft:!1,ScreenOrientation:!1,screenTop:!1,screenX:!1,screenY:!1,ScriptProcessorNode:!1,scroll:!1,scrollbars:!1,scrollBy:!1,scrollTo:!1,scrollX:!1,scrollY:!1,SecurityPolicyViolationEvent:!1,Selection:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerRegistration:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,ShadowRoot:!1,SharedKeyframeList:!1,SharedWorker:!1,showModalDialog:!1,SiteBoundCredential:!1,speechSynthesis:!1,SpeechSynthesisEvent:!1,SpeechSynthesisUtterance:!1,status:!1,statusbar:!1,stop:!1,Storage:!1,StorageEvent:!1,styleMedia:!1,StyleSheet:!1,StyleSheetList:!1,SubtleCrypto:!1,SVGAElement:!1,SVGAltGlyphDefElement:!1,SVGAltGlyphElement:!1,SVGAltGlyphItemElement:!1,SVGAngle:!1,SVGAnimateColorElement:!1,SVGAnimatedAngle:!1,SVGAnimatedBoolean:!1,SVGAnimatedEnumeration:!1,SVGAnimatedInteger:!1,SVGAnimatedLength:!1,SVGAnimatedLengthList:!1,SVGAnimatedNumber:!1,SVGAnimatedNumberList:!1,SVGAnimatedPathData:!1,SVGAnimatedPoints:!1,SVGAnimatedPreserveAspectRatio:!1,SVGAnimatedRect:!1,SVGAnimatedString:!1,SVGAnimatedTransformList:!1,SVGAnimateElement:!1,SVGAnimateMotionElement:!1,SVGAnimateTransformElement:!1,SVGAnimationElement:!1,SVGCircleElement:!1,SVGClipPathElement:!1,SVGColor:!1,SVGColorProfileElement:!1,SVGColorProfileRule:!1,SVGComponentTransferFunctionElement:!1,SVGCSSRule:!1,SVGCursorElement:!1,SVGDefsElement:!1,SVGDescElement:!1,SVGDiscardElement:!1,SVGDocument:!1,SVGElement:!1,SVGElementInstance:!1,SVGElementInstanceList:!1,SVGEllipseElement:!1,SVGEvent:!1,SVGExternalResourcesRequired:!1,SVGFEBlendElement:!1,SVGFEColorMatrixElement:!1,SVGFEComponentTransferElement:!1,SVGFECompositeElement:!1,SVGFEConvolveMatrixElement:!1,SVGFEDiffuseLightingElement:!1,SVGFEDisplacementMapElement:!1,SVGFEDistantLightElement:!1,SVGFEDropShadowElement:!1,SVGFEFloodElement:!1,SVGFEFuncAElement:!1,SVGFEFuncBElement:!1,SVGFEFuncGElement:!1,SVGFEFuncRElement:!1,SVGFEGaussianBlurElement:!1,SVGFEImageElement:!1,SVGFEMergeElement:!1,SVGFEMergeNodeElement:!1,SVGFEMorphologyElement:!1,SVGFEOffsetElement:!1,SVGFEPointLightElement:!1,SVGFESpecularLightingElement:!1,SVGFESpotLightElement:!1,SVGFETileElement:!1,SVGFETurbulenceElement:!1,SVGFilterElement:!1,SVGFilterPrimitiveStandardAttributes:!1,SVGFitToViewBox:!1,SVGFontElement:!1,SVGFontFaceElement:!1,SVGFontFaceFormatElement:!1,SVGFontFaceNameElement:!1,SVGFontFaceSrcElement:!1,SVGFontFaceUriElement:!1,SVGForeignObjectElement:!1,SVGGElement:!1,SVGGeometryElement:!1,SVGGlyphElement:!1,SVGGlyphRefElement:!1,SVGGradientElement:!1,SVGGraphicsElement:!1,SVGHKernElement:!1,SVGICCColor:!1,SVGImageElement:!1,SVGLangSpace:!1,SVGLength:!1,SVGLengthList:!1,SVGLinearGradientElement:!1,SVGLineElement:!1,SVGLocatable:!1,SVGMarkerElement:!1,SVGMaskElement:!1,SVGMatrix:!1,SVGMetadataElement:!1,SVGMissingGlyphElement:!1,SVGMPathElement:!1,SVGNumber:!1,SVGNumberList:!1,SVGPaint:!1,SVGPathElement:!1,SVGPathSeg:!1,SVGPathSegArcAbs:!1,SVGPathSegArcRel:!1,SVGPathSegClosePath:!1,SVGPathSegCurvetoCubicAbs:!1,SVGPathSegCurvetoCubicRel:!1,SVGPathSegCurvetoCubicSmoothAbs:!1,SVGPathSegCurvetoCubicSmoothRel:!1,SVGPathSegCurvetoQuadraticAbs:!1,SVGPathSegCurvetoQuadraticRel:!1,SVGPathSegCurvetoQuadraticSmoothAbs:!1,SVGPathSegCurvetoQuadraticSmoothRel:!1,SVGPathSegLinetoAbs:!1,SVGPathSegLinetoHorizontalAbs:!1,SVGPathSegLinetoHorizontalRel:!1,SVGPathSegLinetoRel:!1,SVGPathSegLinetoVerticalAbs:!1,SVGPathSegLinetoVerticalRel:!1,SVGPathSegList:!1,SVGPathSegMovetoAbs:!1,SVGPathSegMovetoRel:!1,SVGPatternElement:!1,SVGPoint:!1,SVGPointList:!1,SVGPolygonElement:!1,SVGPolylineElement:!1,SVGPreserveAspectRatio:!1,SVGRadialGradientElement:!1,SVGRect:!1,SVGRectElement:!1,SVGRenderingIntent:!1,SVGScriptElement:!1,SVGSetElement:!1,SVGStopElement:!1,SVGStringList:!1,SVGStylable:!1,SVGStyleElement:!1,SVGSVGElement:!1,SVGSwitchElement:!1,SVGSymbolElement:!1,SVGTests:!1,SVGTextContentElement:!1,SVGTextElement:!1,SVGTextPathElement:!1,SVGTextPositioningElement:!1,SVGTitleElement:!1,SVGTransform:!1,SVGTransformable:!1,SVGTransformList:!1,SVGTRefElement:!1,SVGTSpanElement:!1,SVGUnitTypes:!1,SVGURIReference:!1,SVGUseElement:!1,SVGViewElement:!1,SVGViewSpec:!1,SVGVKernElement:!1,SVGZoomAndPan:!1,SVGZoomEvent:!1,Text:!1,TextDecoder:!1,TextEncoder:!1,TextEvent:!1,TextMetrics:!1,TextTrack:!1,TextTrackCue:!1,TextTrackCueList:!1,TextTrackList:!1,TimeEvent:!1,TimeRanges:!1,toolbar:!1,top:!1,Touch:!1,TouchEvent:!1,TouchList:!1,TrackEvent:!1,TransitionEvent:!1,TreeWalker:!1,UIEvent:!1,URL:!1,URLSearchParams:!1,ValidityState:!1,VTTCue:!1,WaveShaperNode:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLProgram:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLTexture:!1,WebGLUniformLocation:!1,WebSocket:!1,WheelEvent:!1,window:!1,Window:!1,Worker:!1,XDomainRequest:!1,XMLDocument:!1,XMLHttpRequest:!1,XMLHttpRequestEventTarget:!1,XMLHttpRequestProgressEvent:!1,XMLHttpRequestUpload:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathException:!1,XPathExpression:!1,XPathNamespace:!1,XPathNSResolver:!1,XPathResult:!1,XSLTProcessor:!1},worker:{applicationCache:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,Cache:!1,caches:!1,clearInterval:!1,clearTimeout:!1,close:!0,console:!1,fetch:!1,FileReaderSync:!1,FormData:!1,Headers:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,ImageData:!1,importScripts:!0,indexedDB:!1,location:!1,MessageChannel:!1,MessagePort:!1,name:!1,navigator:!1,Notification:!1,onclose:!0,onconnect:!0,onerror:!0,onlanguagechange:!0,onmessage:!0,onoffline:!0,ononline:!0,onrejectionhandled:!0,onunhandledrejection:!0,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,postMessage:!0,Promise:!1,Request:!1,Response:!1,self:!0,ServiceWorkerRegistration:!1,setInterval:!1,setTimeout:!1,TextDecoder:!1,TextEncoder:!1,URL:!1,URLSearchParams:!1,WebSocket:!1,Worker:!1,XMLHttpRequest:!1},node:{__dirname:!1,__filename:!1,arguments:!1,Buffer:!1,clearImmediate:!1,clearInterval:!1,clearTimeout:!1,console:!1,exports:!0,GLOBAL:!1,global:!1,Intl:!1,module:!1,process:!1,require:!1,root:!1,setImmediate:!1,setInterval:!1,setTimeout:!1},commonjs:{exports:!0,module:!1,require:!1,global:!1},amd:{define:!1,require:!1},mocha:{after:!1,afterEach:!1,before:!1,beforeEach:!1,context:!1,describe:!1,it:!1,mocha:!1,run:!1,setup:!1,specify:!1,suite:!1,suiteSetup:!1,suiteTeardown:!1,teardown:!1,test:!1,xcontext:!1,xdescribe:!1,xit:!1,xspecify:!1},jasmine:{afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,fail:!1,fdescribe:!1,fit:!1,it:!1,jasmine:!1,pending:!1,runs:!1,spyOn:!1,spyOnProperty:!1,waits:!1,waitsFor:!1,xdescribe:!1,xit:!1},jest:{afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,check:!1,describe:!1,expect:!1,gen:!1,it:!1,fdescribe:!1,fit:!1,jest:!1,pit:!1,require:!1,test:!1,xdescribe:!1,xit:!1,xtest:!1},qunit:{asyncTest:!1,deepEqual:!1,equal:!1,expect:!1,module:!1,notDeepEqual:!1,notEqual:!1,notOk:!1,notPropEqual:!1,notStrictEqual:!1,ok:!1,propEqual:!1,QUnit:!1,raises:!1,start:!1,stop:!1,strictEqual:!1,test:!1,throws:!1},phantomjs:{console:!0,exports:!0,phantom:!0,require:!0,WebPage:!0},couch:{emit:!1,exports:!1,getRow:!1,log:!1,module:!1,provides:!1,require:!1,respond:!1,send:!1,start:!1,sum:!1},rhino:{defineClass:!1,deserialize:!1,gc:!1,help:!1,importClass:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,Packages:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},nashorn:{__DIR__:!1,__FILE__:!1,__LINE__:!1,com:!1,edu:!1,exit:!1,Java:!1,java:!1,javafx:!1,JavaImporter:!1,javax:!1,JSAdapter:!1,load:!1,loadWithNewGlobal:!1,org:!1,Packages:!1,print:!1,quit:!1},wsh:{ActiveXObject:!0,Enumerator:!0,GetObject:!0,ScriptEngine:!0,ScriptEngineBuildVersion:!0,ScriptEngineMajorVersion:!0,ScriptEngineMinorVersion:!0,VBArray:!0,WScript:!0,WSH:!0,XDomainRequest:!0},jquery:{$:!1,jQuery:!1},yui:{Y:!1,YUI:!1,YUI_config:!1},shelljs:{cat:!1,cd:!1,chmod:!1,config:!1,cp:!1,dirs:!1,echo:!1,env:!1,error:!1,exec:!1,exit:!1,find:!1,grep:!1,ls:!1,ln:!1,mkdir:!1,mv:!1,popd:!1,pushd:!1,pwd:!1,rm:!1,sed:!1,set:!1,target:!1,tempdir:!1,test:!1,touch:!1,which:!1},prototypejs:{$:!1,$$:!1,$A:!1,$break:!1,$continue:!1,$F:!1,$H:!1,$R:!1,$w:!1,Abstract:!1,Ajax:!1,Autocompleter:!1,Builder:!1,Class:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Element:!1,Enumerable:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Scriptaculous:!1,Selector:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Template:!1,Toggle:!1,Try:!1},meteor:{$:!1,_:!1,Accounts:!1,AccountsClient:!1,AccountsServer:!1,AccountsCommon:!1,App:!1,Assets:!1,Blaze:!1,check:!1,Cordova:!1,DDP:!1,DDPServer:!1,DDPRateLimiter:!1,Deps:!1,EJSON:!1,Email:!1,HTTP:!1,Log:!1,Match:!1,Meteor:!1,Mongo:!1,MongoInternals:!1,Npm:!1,Package:!1,Plugin:!1,process:!1,Random:!1,ReactiveDict:!1,ReactiveVar:!1,Router:!1,ServiceConfiguration:!1,Session:!1,share:!1,Spacebars:!1,Template:!1,Tinytest:!1,Tracker:!1,UI:!1,Utils:!1,WebApp:!1,WebAppInternals:!1},mongo:{_isWindows:!1,_rand:!1,BulkWriteResult:!1,cat:!1,cd:!1,connect:!1,db:!1,getHostName:!1,getMemInfo:!1,hostname:!1,ISODate:!1,listFiles:!1,load:!1,ls:!1,md5sumFile:!1,mkdir:!1,Mongo:!1,NumberInt:!1,NumberLong:!1,ObjectId:!1,PlanCache:!1,print:!1,printjson:!1,pwd:!1,quit:!1,removeFile:!1,rs:!1,sh:!1,UUID:!1,version:!1,WriteResult:!1},applescript:{$:!1,Application:!1,Automation:!1,console:!1,delay:!1,Library:!1,ObjC:!1,ObjectSpecifier:!1,Path:!1,Progress:!1,Ref:!1},serviceworker:{caches:!1,Cache:!1,CacheStorage:!1,Client:!1,clients:!1,Clients:!1,ExtendableEvent:!1,ExtendableMessageEvent:!1,FetchEvent:!1,importScripts:!1,registration:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerGlobalScope:!1,ServiceWorkerMessageEvent:!1,ServiceWorkerRegistration:!1,skipWaiting:!1,WindowClient:!1},atomtest:{advanceClock:!1,fakeClearInterval:!1,fakeClearTimeout:!1,fakeSetInterval:!1,fakeSetTimeout:!1,resetTimeouts:!1,waitsForPromise:!1},embertest:{andThen:!1,click:!1,currentPath:!1,currentRouteName:!1,currentURL:!1,fillIn:!1,find:!1,findWithAssert:!1,keyEvent:!1,pauseTest:!1,resumeTest:!1,triggerEvent:!1,visit:!1},protractor:{$:!1,$$:!1,browser:!1,By:!1,by:!1,DartObject:!1,element:!1,protractor:!1},"shared-node-browser":{clearInterval:!1,clearTimeout:!1,console:!1,setInterval:!1,setTimeout:!1},webextensions:{browser:!1,chrome:!1,opr:!1},greasemonkey:{GM_addStyle:!1,GM_deleteValue:!1,GM_getResourceText:!1,GM_getResourceURL:!1,GM_getValue:!1,GM_info:!1,GM_listValues:!1,GM_log:!1,GM_openInTab:!1,GM_registerMenuCommand:!1,GM_setClipboard:!1,GM_setValue:!1,GM_xmlhttpRequest:!1,unsafeWindow:!1}}},{}],313:[function(e,t,r){t.exports=e("./globals.json")},{"./globals.json":312}],314:[function(e,t,r){"use strict";var n=e("ansi-regex"),i=new RegExp(n().source);t.exports=i.test.bind(i)},{"ansi-regex":315}],315:[function(e,t,r){arguments[4][22][0].apply(r,arguments)},{dup:22}],316:[function(e,t,r){r.read=function(e,t,r,n,i){var s,a,o=8*i-n-1,u=(1<<o)-1,l=u>>1,c=-7,p=r?i-1:0,h=r?-1:1,f=e[t+p];for(p+=h,s=f&(1<<-c)-1,f>>=-c,c+=o;c>0;s=256*s+e[t+p],p+=h,c-=8);for(a=s&(1<<-c)-1,s>>=-c,c+=n;c>0;a=256*a+e[t+p],p+=h,c-=8);if(0===s)s=1-l;else{if(s===u)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),s-=l}return(f?-1:1)*a*Math.pow(2,s-n)},r.write=function(e,t,r,n,i,s){var a,o,u,l=8*s-i-1,c=(1<<l)-1,p=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:s-1,d=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+p>=1?h/u:h*Math.pow(2,1-p))*u>=2&&(a++,u/=2),a+p>=c?(o=0,a=c):a+p>=1?(o=(t*u-1)*Math.pow(2,i),a+=p):(o=t*Math.pow(2,p-1)*Math.pow(2,i),a=0));i>=8;e[r+f]=255&o,f+=d,o/=256,i-=8);for(a=a<<i|o,l+=i;l>0;e[r+f]=255&a,f+=d,a/=256,l-=8);e[r+f-d]|=128*m}},{}],317:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],318:[function(e,t,r){"use strict";t.exports=function(e,t,r,n,i,s,a,o){if(void 0===t)throw new Error("invariant requires an error message argument");if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[r,n,i,s,a,o],c=0;(u=new Error(t.replace(/%s/g,function(){return l[c++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}}},{}],319:[function(e,t,r){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}t.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}},{}],320:[function(e,t,r){"use strict";var n=e("number-is-nan");t.exports=Number.isFinite||function(e){return!("number"!=typeof e||n(e)||e===1/0||e===-1/0)}},{"number-is-nan":544}],321:[function(e,t,r){var n={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},{}],322:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyu]{1,5}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g,r.matchToToken=function(e){var t={type:"invalid",value:e[0]};return e[1]?(t.type="string",t.closed=!(!e[3]&&!e[4])):e[5]?t.type="comment":e[6]?(t.type="comment",t.closed=!!e[7]):e[8]?t.type="regex":e[9]?t.type="number":e[10]?t.type="name":e[11]?t.type="punctuator":e[12]&&(t.type="whitespace"),t}},{}],323:[function(e,t,r){(function(e){!function(n){var i="object"==typeof r&&r,s="object"==typeof t&&t&&t.exports==i&&t,a="object"==typeof e&&e;a.global!==a&&a.window!==a||(n=a);var o={},u=o.hasOwnProperty,l=function(e,t){var r;for(r in e)u.call(e,r)&&t(r,e[r])},c=o.toString,p={'"':'\\"',"'":"\\'","\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},h=/["'\\\b\f\n\r\t]/,f=/[0-9]/,d=/[ !#-&\(-\[\]-~]/,m=function(e,t){var r={escapeEverything:!1,escapeEtago:!1,quotes:"single",wrap:!1,es6:!1,json:!1,compact:!0,lowercaseHex:!1,numbers:"decimal",indent:"\t",__indent__:"",__inline1__:!1,__inline2__:!1},n=t&&t.json;n&&(r.quotes="double",r.wrap=!0),"single"!=(t=function(e,t){return t?(l(t,function(t,r){e[t]=r}),e):e}(r,t)).quotes&&"double"!=t.quotes&&(t.quotes="single");var i,s="double"==t.quotes?'"':"'",a=t.compact,o=t.indent,u=t.lowercaseHex,y="",g=t.__inline1__,b=t.__inline2__,v=a?"":"\n",x=!0,E="binary"==t.numbers,A="octal"==t.numbers,D="decimal"==t.numbers,C="hexadecimal"==t.numbers;if(n&&e&&function(e){return"function"==typeof e||"[object Function]"==c.call(e)}(e.toJSON)&&(e=e.toJSON()),!function(e){return"string"==typeof e||"[object String]"==c.call(e)}(e)){if(function(e){return"[object Map]"==c.call(e)}(e))return 0==e.size?"new Map()":(a||(t.__inline1__=!0),"new Map("+m(Array.from(e),t)+")");if(function(e){return"[object Set]"==c.call(e)}(e))return 0==e.size?"new Set()":"new Set("+m(Array.from(e),t)+")";if(function(e){return"[object Array]"==c.call(e)}(e))return i=[],t.wrap=!0,g?(t.__inline1__=!1,t.__inline2__=!0):(y=t.__indent__,o+=y,t.__indent__=o),function(e,t){for(var r=e.length,n=-1;++n<r;)t(e[n])}(e,function(e){x=!1,b&&(t.__inline2__=!1),i.push((a||b?"":o)+m(e,t))}),x?"[]":b?"["+i.join(", ")+"]":"["+v+i.join(","+v)+v+(a?"":y)+"]";if(!function(e){return"number"==typeof e||"[object Number]"==c.call(e)}(e))return function(e){return"[object Object]"==c.call(e)}(e)?(i=[],t.wrap=!0,y=t.__indent__,o+=y,t.__indent__=o,l(e,function(e,r){x=!1,i.push((a?"":o)+m(e,t)+":"+(a?"":" ")+m(r,t))}),x?"{}":"{"+v+i.join(","+v)+v+(a?"":y)+"}"):n?JSON.stringify(e)||"null":String(e);if(n)return JSON.stringify(e);if(D)return String(e);if(C){var S=e.toString(16);return u||(S=S.toUpperCase()),"0x"+S}if(E)return"0b"+e.toString(2);if(A)return"0o"+e.toString(8)}var _,w,k,F=e,T=-1,P=F.length;for(i="";++T<P;){var B=F.charAt(T);if(t.es6&&(_=F.charCodeAt(T))>=55296&&_<=56319&&P>T+1&&(w=F.charCodeAt(T+1))>=56320&&w<=57343){O=(k=1024*(_-55296)+w-56320+65536).toString(16);u||(O=O.toUpperCase()),i+="\\u{"+O+"}",T++}else{if(!t.escapeEverything){if(d.test(B)){i+=B;continue}if('"'==B){i+=s==B?'\\"':B;continue}if("'"==B){i+=s==B?"\\'":B;continue}}if("\0"!=B||n||f.test(F.charAt(T+1)))if(h.test(B))i+=p[B];else{var O=B.charCodeAt(0).toString(16);u||(O=O.toUpperCase());var j=O.length>2||n,N="\\"+(j?"u":"x")+("0000"+O).slice(j?-4:-2);i+=N}else i+="\\0"}}return t.wrap&&(i=s+i+s),t.escapeEtago?i.replace(/<\/(script|style)/gi,"<\\/$1"):i};m.version="1.3.0","function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return m}):i&&!i.nodeType?s?s.exports=m:i.jsesc=m:n.jsesc=m}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],324:[function(e,t,r){var n="object"==typeof r?r:{};n.parse=function(){"use strict";var e,t,r,n,i,s,a={"'":"'",'"':'"',"\\":"\\","/":"/","\n":"",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},o=[" ","\t","\r","\n","\v","\f"," ","\ufeff"],u=function(e){return""===e?"EOF":"'"+e+"'"},l=function(n){var s=new SyntaxError;throw s.message=n+" at line "+t+" column "+r+" of the JSON5 data. Still to read: "+JSON.stringify(i.substring(e-1,e+19)),s.at=e,s.lineNumber=t,s.columnNumber=r,s},c=function(s){return s&&s!==n&&l("Expected "+u(s)+" instead of "+u(n)),n=i.charAt(e),e++,r++,("\n"===n||"\r"===n&&"\n"!==p())&&(t++,r=0),n},p=function(){return i.charAt(e)},h=function(){var e=n;for("_"!==n&&"$"!==n&&(n<"a"||n>"z")&&(n<"A"||n>"Z")&&l("Bad identifier as unquoted key");c()&&("_"===n||"$"===n||n>="a"&&n<="z"||n>="A"&&n<="Z"||n>="0"&&n<="9");)e+=n;return e},f=function(){var e,t="",r="",i=10;if("-"!==n&&"+"!==n||(t=n,c(n)),"I"===n)return("number"!=typeof(e=g())||isNaN(e))&&l("Unexpected word for number"),"-"===t?-e:e;if("N"===n)return e=g(),isNaN(e)||l("expected word to be NaN"),e;switch("0"===n&&(r+=n,c(),"x"===n||"X"===n?(r+=n,c(),i=16):n>="0"&&n<="9"&&l("Octal literal")),i){case 10:for(;n>="0"&&n<="9";)r+=n,c();if("."===n)for(r+=".";c()&&n>="0"&&n<="9";)r+=n;if("e"===n||"E"===n)for(r+=n,c(),"-"!==n&&"+"!==n||(r+=n,c());n>="0"&&n<="9";)r+=n,c();break;case 16:for(;n>="0"&&n<="9"||n>="A"&&n<="F"||n>="a"&&n<="f";)r+=n,c()}if(e="-"===t?-r:+r,isFinite(e))return e;l("Bad number")},d=function(){var e,t,r,i,s="";if('"'===n||"'"===n)for(r=n;c();){if(n===r)return c(),s;if("\\"===n)if(c(),"u"===n){for(i=0,t=0;t<4&&(e=parseInt(c(),16),isFinite(e));t+=1)i=16*i+e;s+=String.fromCharCode(i)}else if("\r"===n)"\n"===p()&&c();else{if("string"!=typeof a[n])break;s+=a[n]}else{if("\n"===n)break;s+=n}}l("Bad string")},m=function(){"/"!==n&&l("Not a comment"),c("/"),"/"===n?function(){"/"!==n&&l("Not an inline comment");do{if(c(),"\n"===n||"\r"===n)return void c()}while(n)}():"*"===n?function(){"*"!==n&&l("Not a block comment");do{for(c();"*"===n;)if(c("*"),"/"===n)return void c("/")}while(n);l("Unterminated block comment")}():l("Unrecognized comment")},y=function(){for(;n;)if("/"===n)m();else{if(!(o.indexOf(n)>=0))return;c()}},g=function(){switch(n){case"t":return c("t"),c("r"),c("u"),c("e"),!0;case"f":return c("f"),c("a"),c("l"),c("s"),c("e"),!1;case"n":return c("n"),c("u"),c("l"),c("l"),null;case"I":return c("I"),c("n"),c("f"),c("i"),c("n"),c("i"),c("t"),c("y"),1/0;case"N":return c("N"),c("a"),c("N"),NaN}l("Unexpected "+u(n))};return s=function(){switch(y(),n){case"{":return function(){var e,t={};if("{"===n)for(c("{"),y();n;){if("}"===n)return c("}"),t;if(e='"'===n||"'"===n?d():h(),y(),c(":"),t[e]=s(),y(),","!==n)return c("}"),t;c(","),y()}l("Bad object")}();case"[":return function(){var e=[];if("["===n)for(c("["),y();n;){if("]"===n)return c("]"),e;if(","===n?l("Missing array element"):e.push(s()),y(),","!==n)return c("]"),e;c(","),y()}l("Bad array")}();case'"':case"'":return d();case"-":case"+":case".":return f();default:return n>="0"&&n<="9"?f():g()}},function(a,o){var u;return i=String(a),e=0,t=1,r=1,n=" ",u=s(),y(),n&&l("Syntax error"),"function"==typeof o?function e(t,r){var n,i,s=t[r];if(s&&"object"==typeof s)for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(void 0!==(i=e(s,n))?s[n]=i:delete s[n]);return o.call(t,r,s)}({"":u},""):u}}(),n.stringify=function(e,t,r){function i(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||"_"===e||"$"===e}function s(e){if("string"!=typeof e)return!1;if(!function(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||"_"===e||"$"===e}(e[0]))return!1;for(var t=1,r=e.length;t<r;){if(!i(e[t]))return!1;t++}return!0}function a(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)}function o(e){for(var t=0;t<f.length;t++)if(f[t]===e)throw new TypeError("Converting circular structure to JSON")}function u(e,t,r){if(!e)return"";e.length>10&&(e=e.substring(0,10));for(var n=r?"":"\n",i=0;i<t;i++)n+=e;return n}function l(e){return d.lastIndex=0,d.test(e)?'"'+e.replace(d,function(e){var t=m[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function c(e,t,r){var n,i,d=p(e,t,r);switch(d&&!function(e){return"[object Date]"===Object.prototype.toString.call(e)}(d)&&(d=d.valueOf()),typeof d){case"boolean":return d.toString();case"number":return isNaN(d)||!isFinite(d)?"null":d.toString();case"string":return l(d.toString());case"object":if(null===d)return"null";if(a(d)){o(d),n="[",f.push(d);for(var m=0;m<d.length;m++)i=c(d,m,!1),n+=u(h,f.length),n+=null===i||void 0===i?"null":i,m<d.length-1?n+=",":h&&(n+="\n");f.pop(),d.length&&(n+=u(h,f.length,!0)),n+="]"}else{o(d),n="{";var y=!1;f.push(d);for(var g in d)if(d.hasOwnProperty(g)){var b=c(d,g,!1);r=!1,void 0!==b&&null!==b&&(n+=u(h,f.length),y=!0,n+=(t=s(g)?g:l(g))+":"+(h?" ":"")+b+",")}f.pop(),n=y?n.substring(0,n.length-1)+u(h,f.length)+"}":"{}"}return n;default:return}}if(t&&"function"!=typeof t&&!a(t))throw new Error("Replacer must be a function or an array");var p=function(e,r,n){var i=e[r];return i&&i.toJSON&&"function"==typeof i.toJSON&&(i=i.toJSON()),"function"==typeof t?t.call(e,r,i):t?n||a(e)||t.indexOf(r)>=0?i:void 0:i};n.isWord=s;var h,f=[];r&&("string"==typeof r?h=r:"number"==typeof r&&r>=0&&(h=u(" ",r,!0)));var d=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},y={"":e};return void 0===e?p(y,"",!0):c(y,"",!0)}},{}],325:[function(e,t,r){var n=e("./_getNative")(e("./_root"),"DataView");t.exports=n},{"./_getNative":429,"./_root":473}],326:[function(e,t,r){function n(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}var i=e("./_hashClear"),s=e("./_hashDelete"),a=e("./_hashGet"),o=e("./_hashHas"),u=e("./_hashSet");n.prototype.clear=i,n.prototype.delete=s,n.prototype.get=a,n.prototype.has=o,n.prototype.set=u,t.exports=n},{"./_hashClear":437,"./_hashDelete":438,"./_hashGet":439,"./_hashHas":440,"./_hashSet":441}],327:[function(e,t,r){function n(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}var i=e("./_listCacheClear"),s=e("./_listCacheDelete"),a=e("./_listCacheGet"),o=e("./_listCacheHas"),u=e("./_listCacheSet");n.prototype.clear=i,n.prototype.delete=s,n.prototype.get=a,n.prototype.has=o,n.prototype.set=u,t.exports=n},{"./_listCacheClear":453,"./_listCacheDelete":454,"./_listCacheGet":455,"./_listCacheHas":456,"./_listCacheSet":457}],328:[function(e,t,r){var n=e("./_getNative")(e("./_root"),"Map");t.exports=n},{"./_getNative":429,"./_root":473}],329:[function(e,t,r){function n(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}var i=e("./_mapCacheClear"),s=e("./_mapCacheDelete"),a=e("./_mapCacheGet"),o=e("./_mapCacheHas"),u=e("./_mapCacheSet");n.prototype.clear=i,n.prototype.delete=s,n.prototype.get=a,n.prototype.has=o,n.prototype.set=u,t.exports=n},{"./_mapCacheClear":458,"./_mapCacheDelete":459,"./_mapCacheGet":460,"./_mapCacheHas":461,"./_mapCacheSet":462}],330:[function(e,t,r){var n=e("./_getNative")(e("./_root"),"Promise");t.exports=n},{"./_getNative":429,"./_root":473}],331:[function(e,t,r){var n=e("./_getNative")(e("./_root"),"Set");t.exports=n},{"./_getNative":429,"./_root":473}],332:[function(e,t,r){function n(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new i;++t<r;)this.add(e[t])}var i=e("./_MapCache"),s=e("./_setCacheAdd"),a=e("./_setCacheHas");n.prototype.add=n.prototype.push=s,n.prototype.has=a,t.exports=n},{"./_MapCache":329,"./_setCacheAdd":474,"./_setCacheHas":475}],333:[function(e,t,r){function n(e){var t=this.__data__=new i(e);this.size=t.size}var i=e("./_ListCache"),s=e("./_stackClear"),a=e("./_stackDelete"),o=e("./_stackGet"),u=e("./_stackHas"),l=e("./_stackSet");n.prototype.clear=s,n.prototype.delete=a,n.prototype.get=o,n.prototype.has=u,n.prototype.set=l,t.exports=n},{"./_ListCache":327,"./_stackClear":479,"./_stackDelete":480,"./_stackGet":481,"./_stackHas":482,"./_stackSet":483}],334:[function(e,t,r){var n=e("./_root").Symbol;t.exports=n},{"./_root":473}],335:[function(e,t,r){var n=e("./_root").Uint8Array;t.exports=n},{"./_root":473}],336:[function(e,t,r){var n=e("./_getNative")(e("./_root"),"WeakMap");t.exports=n},{"./_getNative":429,"./_root":473}],337:[function(e,t,r){t.exports=function(e,t){return e.set(t[0],t[1]),e}},{}],338:[function(e,t,r){t.exports=function(e,t){return e.add(t),e}},{}],339:[function(e,t,r){t.exports=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}},{}],340:[function(e,t,r){t.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}},{}],341:[function(e,t,r){t.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=0,s=[];++r<n;){var a=e[r];t(a,r,e)&&(s[i++]=a)}return s}},{}],342:[function(e,t,r){var n=e("./_baseIndexOf");t.exports=function(e,t){return!!(null==e?0:e.length)&&n(e,t,0)>-1}},{"./_baseIndexOf":368}],343:[function(e,t,r){t.exports=function(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}},{}],344:[function(e,t,r){var n=e("./_baseTimes"),i=e("./isArguments"),s=e("./isArray"),a=e("./isBuffer"),o=e("./_isIndex"),u=e("./isTypedArray"),l=Object.prototype.hasOwnProperty;t.exports=function(e,t){var r=s(e),c=!r&&i(e),p=!r&&!c&&a(e),h=!r&&!c&&!p&&u(e),f=r||c||p||h,d=f?n(e.length,String):[],m=d.length;for(var y in e)!t&&!l.call(e,y)||f&&("length"==y||p&&("offset"==y||"parent"==y)||h&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||o(y,m))||d.push(y);return d}},{"./_baseTimes":392,"./_isIndex":446,"./isArguments":508,"./isArray":509,"./isBuffer":512,"./isTypedArray":522}],345:[function(e,t,r){t.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}},{}],346:[function(e,t,r){t.exports=function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}},{}],347:[function(e,t,r){t.exports=function(e,t,r,n){var i=-1,s=null==e?0:e.length;for(n&&s&&(r=e[++i]);++i<s;)r=t(r,e[i],i,e);return r}},{}],348:[function(e,t,r){t.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}},{}],349:[function(e,t,r){var n=e("./_baseAssignValue"),i=e("./eq");t.exports=function(e,t,r){(void 0===r||i(e[t],r))&&(void 0!==r||t in e)||n(e,t,r)}},{"./_baseAssignValue":354,"./eq":496}],350:[function(e,t,r){var n=e("./_baseAssignValue"),i=e("./eq"),s=Object.prototype.hasOwnProperty;t.exports=function(e,t,r){var a=e[t];s.call(e,t)&&i(a,r)&&(void 0!==r||t in e)||n(e,t,r)}},{"./_baseAssignValue":354,"./eq":496}],351:[function(e,t,r){var n=e("./eq");t.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},{"./eq":496}],352:[function(e,t,r){var n=e("./_copyObject"),i=e("./keys");t.exports=function(e,t){return e&&n(t,i(t),e)}},{"./_copyObject":410,"./keys":523}],353:[function(e,t,r){var n=e("./_copyObject"),i=e("./keysIn");t.exports=function(e,t){return e&&n(t,i(t),e)}},{"./_copyObject":410,"./keysIn":524}],354:[function(e,t,r){var n=e("./_defineProperty");t.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},{"./_defineProperty":420}],355:[function(e,t,r){t.exports=function(e,t,r){return e==e&&(void 0!==r&&(e=e<=r?e:r),void 0!==t&&(e=e>=t?e:t)),e}},{}],356:[function(e,t,r){function n(e,t,r,P,B,O){var j,N=t&D,I=t&C,L=t&S;if(r&&(j=B?r(e,P,B,O):r(e)),void 0!==j)return j;if(!E(e))return e;var M=v(e);if(M){if(j=y(e),!N)return c(e,j)}else{var R=m(e),V=R==w||R==k;if(x(e))return l(e,N);if(R==F||R==_||V&&!B){if(j=I||V?{}:b(e),!N)return I?h(e,u(j,e)):p(e,o(j,e))}else{if(!T[R])return B?e:{};j=g(e,R,n,N)}}O||(O=new i);var U=O.get(e);if(U)return U;O.set(e,j);var q=L?I?d:f:I?keysIn:A,G=M?void 0:q(e);return s(G||e,function(i,s){G&&(i=e[s=i]),a(j,s,n(i,t,r,s,e,O))}),j}var i=e("./_Stack"),s=e("./_arrayEach"),a=e("./_assignValue"),o=e("./_baseAssign"),u=e("./_baseAssignIn"),l=e("./_cloneBuffer"),c=e("./_copyArray"),p=e("./_copySymbols"),h=e("./_copySymbolsIn"),f=e("./_getAllKeys"),d=e("./_getAllKeysIn"),m=e("./_getTag"),y=e("./_initCloneArray"),g=e("./_initCloneByTag"),b=e("./_initCloneObject"),v=e("./isArray"),x=e("./isBuffer"),E=e("./isObject"),A=e("./keys"),D=1,C=2,S=4,_="[object Arguments]",w="[object Function]",k="[object GeneratorFunction]",F="[object Object]",T={};T[_]=T["[object Array]"]=T["[object ArrayBuffer]"]=T["[object DataView]"]=T["[object Boolean]"]=T["[object Date]"]=T["[object Float32Array]"]=T["[object Float64Array]"]=T["[object Int8Array]"]=T["[object Int16Array]"]=T["[object Int32Array]"]=T["[object Map]"]=T["[object Number]"]=T[F]=T["[object RegExp]"]=T["[object Set]"]=T["[object String]"]=T["[object Symbol]"]=T["[object Uint8Array]"]=T["[object Uint8ClampedArray]"]=T["[object Uint16Array]"]=T["[object Uint32Array]"]=!0,T["[object Error]"]=T[w]=T["[object WeakMap]"]=!1,t.exports=n},{"./_Stack":333,"./_arrayEach":340,"./_assignValue":350,"./_baseAssign":352,"./_baseAssignIn":353,"./_cloneBuffer":400,"./_copyArray":409,"./_copySymbols":411,"./_copySymbolsIn":412,"./_getAllKeys":425,"./_getAllKeysIn":426,"./_getTag":434,"./_initCloneArray":442,"./_initCloneByTag":443,"./_initCloneObject":444,"./isArray":509,"./isBuffer":512,"./isObject":516,"./keys":523}],357:[function(e,t,r){var n=e("./isObject"),i=Object.create,s=function(){function e(){}return function(t){if(!n(t))return{};if(i)return i(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();t.exports=s},{"./isObject":516}],358:[function(e,t,r){var n=e("./_baseForOwn"),i=e("./_createBaseEach")(n);t.exports=i},{"./_baseForOwn":362,"./_createBaseEach":415}],359:[function(e,t,r){t.exports=function(e,t,r,n){for(var i=e.length,s=r+(n?1:-1);n?s--:++s<i;)if(t(e[s],s,e))return s;return-1}},{}],360:[function(e,t,r){function n(e,t,r,a,o){var u=-1,l=e.length;for(r||(r=s),o||(o=[]);++u<l;){var c=e[u];t>0&&r(c)?t>1?n(c,t-1,r,a,o):i(o,c):a||(o[o.length]=c)}return o}var i=e("./_arrayPush"),s=e("./_isFlattenable");t.exports=n},{"./_arrayPush":346,"./_isFlattenable":445}],361:[function(e,t,r){var n=e("./_createBaseFor")();t.exports=n},{"./_createBaseFor":416}],362:[function(e,t,r){var n=e("./_baseFor"),i=e("./keys");t.exports=function(e,t){return e&&n(e,t,i)}},{"./_baseFor":361,"./keys":523}],363:[function(e,t,r){var n=e("./_castPath"),i=e("./_toKey");t.exports=function(e,t){for(var r=0,s=(t=n(t,e)).length;null!=e&&r<s;)e=e[i(t[r++])];return r&&r==s?e:void 0}},{"./_castPath":398,"./_toKey":486}],364:[function(e,t,r){var n=e("./_arrayPush"),i=e("./isArray");t.exports=function(e,t,r){var s=t(e);return i(e)?s:n(s,r(e))}},{"./_arrayPush":346,"./isArray":509}],365:[function(e,t,r){var n=e("./_Symbol"),i=e("./_getRawTag"),s=e("./_objectToString"),a="[object Null]",o="[object Undefined]",u=n?n.toStringTag:void 0;t.exports=function(e){return null==e?void 0===e?o:a:u&&u in Object(e)?i(e):s(e)}},{"./_Symbol":334,"./_getRawTag":431,"./_objectToString":470}],366:[function(e,t,r){var n=Object.prototype.hasOwnProperty;t.exports=function(e,t){return null!=e&&n.call(e,t)}},{}],367:[function(e,t,r){t.exports=function(e,t){return null!=e&&t in Object(e)}},{}],368:[function(e,t,r){var n=e("./_baseFindIndex"),i=e("./_baseIsNaN"),s=e("./_strictIndexOf");t.exports=function(e,t,r){return t==t?s(e,t,r):n(e,i,r)}},{"./_baseFindIndex":359,"./_baseIsNaN":373,"./_strictIndexOf":484}],369:[function(e,t,r){var n=e("./_baseGetTag"),i=e("./isObjectLike"),s="[object Arguments]";t.exports=function(e){return i(e)&&n(e)==s}},{"./_baseGetTag":365,"./isObjectLike":517}],370:[function(e,t,r){function n(e,t,r,a,o){return e===t||(null==e||null==t||!s(e)&&!s(t)?e!=e&&t!=t:i(e,t,r,a,n,o))}var i=e("./_baseIsEqualDeep"),s=e("./isObjectLike");t.exports=n},{"./_baseIsEqualDeep":371,"./isObjectLike":517}],371:[function(e,t,r){var n=e("./_Stack"),i=e("./_equalArrays"),s=e("./_equalByTag"),a=e("./_equalObjects"),o=e("./_getTag"),u=e("./isArray"),l=e("./isBuffer"),c=e("./isTypedArray"),p=1,h="[object Arguments]",f="[object Array]",d="[object Object]",m=Object.prototype.hasOwnProperty;t.exports=function(e,t,r,y,g,b){var v=u(e),x=u(t),E=v?f:o(e),A=x?f:o(t),D=(E=E==h?d:E)==d,C=(A=A==h?d:A)==d,S=E==A;if(S&&l(e)){if(!l(t))return!1;v=!0,D=!1}if(S&&!D)return b||(b=new n),v||c(e)?i(e,t,r,y,g,b):s(e,t,E,r,y,g,b);if(!(r&p)){var _=D&&m.call(e,"__wrapped__"),w=C&&m.call(t,"__wrapped__");if(_||w){var k=_?e.value():e,F=w?t.value():t;return b||(b=new n),g(k,F,r,y,b)}}return!!S&&(b||(b=new n),a(e,t,r,y,g,b))}},{"./_Stack":333,"./_equalArrays":421,"./_equalByTag":422,"./_equalObjects":423,"./_getTag":434,"./isArray":509,"./isBuffer":512,"./isTypedArray":522}],372:[function(e,t,r){var n=e("./_Stack"),i=e("./_baseIsEqual"),s=1,a=2;t.exports=function(e,t,r,o){var u=r.length,l=u,c=!o;if(null==e)return!l;for(e=Object(e);u--;){var p=r[u];if(c&&p[2]?p[1]!==e[p[0]]:!(p[0]in e))return!1}for(;++u<l;){var h=(p=r[u])[0],f=e[h],d=p[1];if(c&&p[2]){if(void 0===f&&!(h in e))return!1}else{var m=new n;if(o)var y=o(f,d,h,e,t,m);if(!(void 0===y?i(d,f,s|a,o,m):y))return!1}}return!0}},{"./_Stack":333,"./_baseIsEqual":370}],373:[function(e,t,r){t.exports=function(e){return e!=e}},{}],374:[function(e,t,r){var n=e("./isFunction"),i=e("./_isMasked"),s=e("./isObject"),a=e("./_toSource"),o=/^\[object .+?Constructor\]$/,u=Function.prototype,l=Object.prototype,c=u.toString,p=l.hasOwnProperty,h=RegExp("^"+c.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(e){return!(!s(e)||i(e))&&(n(e)?h:o).test(a(e))}},{"./_isMasked":450,"./_toSource":487,"./isFunction":513,"./isObject":516}],375:[function(e,t,r){var n=e("./_baseGetTag"),i=e("./isObjectLike"),s="[object RegExp]";t.exports=function(e){return i(e)&&n(e)==s}},{"./_baseGetTag":365,"./isObjectLike":517}],376:[function(e,t,r){var n=e("./_baseGetTag"),i=e("./isLength"),s=e("./isObjectLike"),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(e){return s(e)&&i(e.length)&&!!a[n(e)]}},{"./_baseGetTag":365,"./isLength":515,"./isObjectLike":517}],377:[function(e,t,r){var n=e("./_baseMatches"),i=e("./_baseMatchesProperty"),s=e("./identity"),a=e("./isArray"),o=e("./property");t.exports=function(e){return"function"==typeof e?e:null==e?s:"object"==typeof e?a(e)?i(e[0],e[1]):n(e):o(e)}},{"./_baseMatches":381,"./_baseMatchesProperty":382,"./identity":506,"./isArray":509,"./property":529}],378:[function(e,t,r){var n=e("./_isPrototype"),i=e("./_nativeKeys"),s=Object.prototype.hasOwnProperty;t.exports=function(e){if(!n(e))return i(e);var t=[];for(var r in Object(e))s.call(e,r)&&"constructor"!=r&&t.push(r);return t}},{"./_isPrototype":451,"./_nativeKeys":467}],379:[function(e,t,r){var n=e("./isObject"),i=e("./_isPrototype"),s=e("./_nativeKeysIn"),a=Object.prototype.hasOwnProperty;t.exports=function(e){if(!n(e))return s(e);var t=i(e),r=[];for(var o in e)("constructor"!=o||!t&&a.call(e,o))&&r.push(o);return r}},{"./_isPrototype":451,"./_nativeKeysIn":468,"./isObject":516}],380:[function(e,t,r){var n=e("./_baseEach"),i=e("./isArrayLike");t.exports=function(e,t){var r=-1,s=i(e)?Array(e.length):[];return n(e,function(e,n,i){s[++r]=t(e,n,i)}),s}},{"./_baseEach":358,"./isArrayLike":510}],381:[function(e,t,r){var n=e("./_baseIsMatch"),i=e("./_getMatchData"),s=e("./_matchesStrictComparable");t.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?s(t[0][0],t[0][1]):function(r){return r===e||n(r,e,t)}}},{"./_baseIsMatch":372,"./_getMatchData":428,"./_matchesStrictComparable":464}],382:[function(e,t,r){var n=e("./_baseIsEqual"),i=e("./get"),s=e("./hasIn"),a=e("./_isKey"),o=e("./_isStrictComparable"),u=e("./_matchesStrictComparable"),l=e("./_toKey"),c=1,p=2;t.exports=function(e,t){return a(e)&&o(t)?u(l(e),t):function(r){var a=i(r,e);return void 0===a&&a===t?s(r,e):n(t,a,c|p)}}},{"./_baseIsEqual":370,"./_isKey":448,"./_isStrictComparable":452,"./_matchesStrictComparable":464,"./_toKey":486,"./get":503,"./hasIn":505}],383:[function(e,t,r){function n(e,t,r,c,p){e!==t&&a(t,function(a,l){if(u(a))p||(p=new i),o(e,t,l,r,n,c,p);else{var h=c?c(e[l],a,l+"",e,t,p):void 0;void 0===h&&(h=a),s(e,l,h)}},l)}var i=e("./_Stack"),s=e("./_assignMergeValue"),a=e("./_baseFor"),o=e("./_baseMergeDeep"),u=e("./isObject"),l=e("./keysIn");t.exports=n},{"./_Stack":333,"./_assignMergeValue":349,"./_baseFor":361,"./_baseMergeDeep":384,"./isObject":516,"./keysIn":524}],384:[function(e,t,r){var n=e("./_assignMergeValue"),i=e("./_cloneBuffer"),s=e("./_cloneTypedArray"),a=e("./_copyArray"),o=e("./_initCloneObject"),u=e("./isArguments"),l=e("./isArray"),c=e("./isArrayLikeObject"),p=e("./isBuffer"),h=e("./isFunction"),f=e("./isObject"),d=e("./isPlainObject"),m=e("./isTypedArray"),y=e("./toPlainObject");t.exports=function(e,t,r,g,b,v,x){var E=e[r],A=t[r],D=x.get(A);if(D)n(e,r,D);else{var C=v?v(E,A,r+"",e,t,x):void 0,S=void 0===C;if(S){var _=l(A),w=!_&&p(A),k=!_&&!w&&m(A);C=A,_||w||k?l(E)?C=E:c(E)?C=a(E):w?(S=!1,C=i(A,!0)):k?(S=!1,C=s(A,!0)):C=[]:d(A)||u(A)?(C=E,u(E)?C=y(E):(!f(E)||g&&h(E))&&(C=o(A))):S=!1}S&&(x.set(A,C),b(C,A,g,v,x),x.delete(A)),n(e,r,C)}}},{"./_assignMergeValue":349,"./_cloneBuffer":400,"./_cloneTypedArray":406,"./_copyArray":409,"./_initCloneObject":444,"./isArguments":508,"./isArray":509,"./isArrayLikeObject":511,"./isBuffer":512,"./isFunction":513,"./isObject":516,"./isPlainObject":518,"./isTypedArray":522,"./toPlainObject":538}],385:[function(e,t,r){var n=e("./_arrayMap"),i=e("./_baseIteratee"),s=e("./_baseMap"),a=e("./_baseSortBy"),o=e("./_baseUnary"),u=e("./_compareMultiple"),l=e("./identity");t.exports=function(e,t,r){var c=-1;t=n(t.length?t:[l],o(i));var p=s(e,function(e,r,i){return{criteria:n(t,function(t){return t(e)}),index:++c,value:e}});return a(p,function(e,t){return u(e,t,r)})}},{"./_arrayMap":345,"./_baseIteratee":377,"./_baseMap":380,"./_baseSortBy":391,"./_baseUnary":394,"./_compareMultiple":408,"./identity":506}],386:[function(e,t,r){t.exports=function(e){return function(t){return null==t?void 0:t[e]}}},{}],387:[function(e,t,r){var n=e("./_baseGet");t.exports=function(e){return function(t){return n(t,e)}}},{"./_baseGet":363}],388:[function(e,t,r){var n=9007199254740991,i=Math.floor;t.exports=function(e,t){var r="";if(!e||t<1||t>n)return r;do{t%2&&(r+=e),(t=i(t/2))&&(e+=e)}while(t);return r}},{}],389:[function(e,t,r){var n=e("./identity"),i=e("./_overRest"),s=e("./_setToString");t.exports=function(e,t){return s(i(e,t,n),e+"")}},{"./_overRest":472,"./_setToString":477,"./identity":506}],390:[function(e,t,r){var n=e("./constant"),i=e("./_defineProperty"),s=e("./identity"),a=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:s;t.exports=a},{"./_defineProperty":420,"./constant":494,"./identity":506}],391:[function(e,t,r){t.exports=function(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}},{}],392:[function(e,t,r){t.exports=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}},{}],393:[function(e,t,r){function n(e){if("string"==typeof e)return e;if(a(e))return s(e,n)+"";if(o(e))return c?c.call(e):"";var t=e+"";return"0"==t&&1/e==-u?"-0":t}var i=e("./_Symbol"),s=e("./_arrayMap"),a=e("./isArray"),o=e("./isSymbol"),u=1/0,l=i?i.prototype:void 0,c=l?l.toString:void 0;t.exports=n},{"./_Symbol":334,"./_arrayMap":345,"./isArray":509,"./isSymbol":521}],394:[function(e,t,r){t.exports=function(e){return function(t){return e(t)}}},{}],395:[function(e,t,r){var n=e("./_SetCache"),i=e("./_arrayIncludes"),s=e("./_arrayIncludesWith"),a=e("./_cacheHas"),o=e("./_createSet"),u=e("./_setToArray"),l=200;t.exports=function(e,t,r){var c=-1,p=i,h=e.length,f=!0,d=[],m=d;if(r)f=!1,p=s;else if(h>=l){var y=t?null:o(e);if(y)return u(y);f=!1,p=a,m=new n}else m=t?[]:d;e:for(;++c<h;){var g=e[c],b=t?t(g):g;if(g=r||0!==g?g:0,f&&b==b){for(var v=m.length;v--;)if(m[v]===b)continue e;t&&m.push(b),d.push(g)}else p(m,b,r)||(m!==d&&m.push(b),d.push(g))}return d}},{"./_SetCache":332,"./_arrayIncludes":342,"./_arrayIncludesWith":343,"./_cacheHas":397,"./_createSet":418,"./_setToArray":476}],396:[function(e,t,r){var n=e("./_arrayMap");t.exports=function(e,t){return n(t,function(t){return e[t]})}},{"./_arrayMap":345}],397:[function(e,t,r){t.exports=function(e,t){return e.has(t)}},{}],398:[function(e,t,r){var n=e("./isArray"),i=e("./_isKey"),s=e("./_stringToPath"),a=e("./toString");t.exports=function(e,t){return n(e)?e:i(e,t)?[e]:s(a(e))}},{"./_isKey":448,"./_stringToPath":485,"./isArray":509,"./toString":539}],399:[function(e,t,r){var n=e("./_Uint8Array");t.exports=function(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}},{"./_Uint8Array":335}],400:[function(e,t,r){var n=e("./_root"),i="object"==typeof r&&r&&!r.nodeType&&r,s=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=s&&s.exports===i?n.Buffer:void 0,o=a?a.allocUnsafe:void 0;t.exports=function(e,t){if(t)return e.slice();var r=e.length,n=o?o(r):new e.constructor(r);return e.copy(n),n}},{"./_root":473}],401:[function(e,t,r){var n=e("./_cloneArrayBuffer");t.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}},{"./_cloneArrayBuffer":399}],402:[function(e,t,r){var n=e("./_addMapEntry"),i=e("./_arrayReduce"),s=e("./_mapToArray"),a=1;t.exports=function(e,t,r){var o=t?r(s(e),a):s(e);return i(o,n,new e.constructor)}},{"./_addMapEntry":337,"./_arrayReduce":347,"./_mapToArray":463}],403:[function(e,t,r){var n=/\w*$/;t.exports=function(e){var t=new e.constructor(e.source,n.exec(e));return t.lastIndex=e.lastIndex,t}},{}],404:[function(e,t,r){var n=e("./_addSetEntry"),i=e("./_arrayReduce"),s=e("./_setToArray"),a=1;t.exports=function(e,t,r){var o=t?r(s(e),a):s(e);return i(o,n,new e.constructor)}},{"./_addSetEntry":338,"./_arrayReduce":347,"./_setToArray":476}],405:[function(e,t,r){var n=e("./_Symbol"),i=n?n.prototype:void 0,s=i?i.valueOf:void 0;t.exports=function(e){return s?Object(s.call(e)):{}}},{"./_Symbol":334}],406:[function(e,t,r){var n=e("./_cloneArrayBuffer");t.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}},{"./_cloneArrayBuffer":399}],407:[function(e,t,r){var n=e("./isSymbol");t.exports=function(e,t){if(e!==t){var r=void 0!==e,i=null===e,s=e==e,a=n(e),o=void 0!==t,u=null===t,l=t==t,c=n(t);if(!u&&!c&&!a&&e>t||a&&o&&l&&!u&&!c||i&&o&&l||!r&&l||!s)return 1;if(!i&&!a&&!c&&e<t||c&&r&&s&&!i&&!a||u&&r&&s||!o&&s||!l)return-1}return 0}},{"./isSymbol":521}],408:[function(e,t,r){var n=e("./_compareAscending");t.exports=function(e,t,r){for(var i=-1,s=e.criteria,a=t.criteria,o=s.length,u=r.length;++i<o;){var l=n(s[i],a[i]);if(l)return i>=u?l:l*("desc"==r[i]?-1:1)}return e.index-t.index}},{"./_compareAscending":407}],409:[function(e,t,r){t.exports=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}},{}],410:[function(e,t,r){var n=e("./_assignValue"),i=e("./_baseAssignValue");t.exports=function(e,t,r,s){var a=!r;r||(r={});for(var o=-1,u=t.length;++o<u;){var l=t[o],c=s?s(r[l],e[l],l,r,e):void 0;void 0===c&&(c=e[l]),a?i(r,l,c):n(r,l,c)}return r}},{"./_assignValue":350,"./_baseAssignValue":354}],411:[function(e,t,r){var n=e("./_copyObject"),i=e("./_getSymbols");t.exports=function(e,t){return n(e,i(e),t)}},{"./_copyObject":410,"./_getSymbols":432}],412:[function(e,t,r){var n=e("./_copyObject"),i=e("./_getSymbolsIn");t.exports=function(e,t){return n(e,i(e),t)}},{"./_copyObject":410,"./_getSymbolsIn":433}],413:[function(e,t,r){var n=e("./_root")["__core-js_shared__"];t.exports=n},{"./_root":473}],414:[function(e,t,r){var n=e("./_baseRest"),i=e("./_isIterateeCall");t.exports=function(e){return n(function(t,r){var n=-1,s=r.length,a=s>1?r[s-1]:void 0,o=s>2?r[2]:void 0;for(a=e.length>3&&"function"==typeof a?(s--,a):void 0,o&&i(r[0],r[1],o)&&(a=s<3?void 0:a,s=1),t=Object(t);++n<s;){var u=r[n];u&&e(t,u,n,a)}return t})}},{"./_baseRest":389,"./_isIterateeCall":447}],415:[function(e,t,r){var n=e("./isArrayLike");t.exports=function(e,t){return function(r,i){if(null==r)return r;if(!n(r))return e(r,i);for(var s=r.length,a=t?s:-1,o=Object(r);(t?a--:++a<s)&&!1!==i(o[a],a,o););return r}}},{"./isArrayLike":510}],416:[function(e,t,r){t.exports=function(e){return function(t,r,n){for(var i=-1,s=Object(t),a=n(t),o=a.length;o--;){var u=a[e?o:++i];if(!1===r(s[u],u,s))break}return t}}},{}],417:[function(e,t,r){var n=e("./_baseIteratee"),i=e("./isArrayLike"),s=e("./keys");t.exports=function(e){return function(t,r,a){var o=Object(t);if(!i(t)){var u=n(r,3);t=s(t),r=function(e){return u(o[e],e,o)}}var l=e(t,r,a);return l>-1?o[u?t[l]:l]:void 0}}},{"./_baseIteratee":377,"./isArrayLike":510,"./keys":523}],418:[function(e,t,r){var n=e("./_Set"),i=e("./noop"),s=e("./_setToArray"),a=n&&1/s(new n([,-0]))[1]==1/0?function(e){return new n(e)}:i;t.exports=a},{"./_Set":331,"./_setToArray":476,"./noop":528}],419:[function(e,t,r){var n=e("./eq"),i=Object.prototype,s=i.hasOwnProperty;t.exports=function(e,t,r,a){return void 0===e||n(e,i[r])&&!s.call(a,r)?t:e}},{"./eq":496}],420:[function(e,t,r){var n=e("./_getNative"),i=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();t.exports=i},{"./_getNative":429}],421:[function(e,t,r){var n=e("./_SetCache"),i=e("./_arraySome"),s=e("./_cacheHas"),a=1,o=2;t.exports=function(e,t,r,u,l,c){var p=r&a,h=e.length,f=t.length;if(h!=f&&!(p&&f>h))return!1;var d=c.get(e);if(d&&c.get(t))return d==t;var m=-1,y=!0,g=r&o?new n:void 0;for(c.set(e,t),c.set(t,e);++m<h;){var b=e[m],v=t[m];if(u)var x=p?u(v,b,m,t,e,c):u(b,v,m,e,t,c);if(void 0!==x){if(x)continue;y=!1;break}if(g){if(!i(t,function(e,t){if(!s(g,t)&&(b===e||l(b,e,r,u,c)))return g.push(t)})){y=!1;break}}else if(b!==v&&!l(b,v,r,u,c)){y=!1;break}}return c.delete(e),c.delete(t),y}},{"./_SetCache":332,"./_arraySome":348,"./_cacheHas":397}],422:[function(e,t,r){var n=e("./_Symbol"),i=e("./_Uint8Array"),s=e("./eq"),a=e("./_equalArrays"),o=e("./_mapToArray"),u=e("./_setToArray"),l=1,c=2,p="[object Boolean]",h="[object Date]",f="[object Error]",d="[object Map]",m="[object Number]",y="[object RegExp]",g="[object Set]",b="[object String]",v="[object Symbol]",x="[object ArrayBuffer]",E="[object DataView]",A=n?n.prototype:void 0,D=A?A.valueOf:void 0;t.exports=function(e,t,r,n,A,C,S){switch(r){case E:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case x:return!(e.byteLength!=t.byteLength||!C(new i(e),new i(t)));case p:case h:case m:return s(+e,+t);case f:return e.name==t.name&&e.message==t.message;case y:case b:return e==t+"";case d:var _=o;case g:var w=n&l;if(_||(_=u),e.size!=t.size&&!w)return!1;var k=S.get(e);if(k)return k==t;n|=c,S.set(e,t);var F=a(_(e),_(t),n,A,C,S);return S.delete(e),F;case v:if(D)return D.call(e)==D.call(t)}return!1}},{"./_Symbol":334,"./_Uint8Array":335,"./_equalArrays":421,"./_mapToArray":463,"./_setToArray":476,"./eq":496}],423:[function(e,t,r){var n=e("./_getAllKeys"),i=1,s=Object.prototype.hasOwnProperty;t.exports=function(e,t,r,a,o,u){var l=r&i,c=n(e),p=c.length;if(p!=n(t).length&&!l)return!1;for(var h=p;h--;){var f=c[h];if(!(l?f in t:s.call(t,f)))return!1}var d=u.get(e);if(d&&u.get(t))return d==t;var m=!0;u.set(e,t),u.set(t,e);for(var y=l;++h<p;){var g=e[f=c[h]],b=t[f];if(a)var v=l?a(b,g,f,t,e,u):a(g,b,f,e,t,u);if(!(void 0===v?g===b||o(g,b,r,a,u):v)){m=!1;break}y||(y="constructor"==f)}if(m&&!y){var x=e.constructor,E=t.constructor;x!=E&&"constructor"in e&&"constructor"in t&&!("function"==typeof x&&x instanceof x&&"function"==typeof E&&E instanceof E)&&(m=!1)}return u.delete(e),u.delete(t),m}},{"./_getAllKeys":425}],424:[function(e,t,r){(function(e){var r="object"==typeof e&&e&&e.Object===Object&&e;t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],425:[function(e,t,r){var n=e("./_baseGetAllKeys"),i=e("./_getSymbols"),s=e("./keys");t.exports=function(e){return n(e,s,i)}},{"./_baseGetAllKeys":364,"./_getSymbols":432,"./keys":523}],426:[function(e,t,r){var n=e("./_baseGetAllKeys"),i=e("./_getSymbolsIn"),s=e("./keysIn");t.exports=function(e){return n(e,s,i)}},{"./_baseGetAllKeys":364,"./_getSymbolsIn":433,"./keysIn":524}],427:[function(e,t,r){var n=e("./_isKeyable");t.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},{"./_isKeyable":449}],428:[function(e,t,r){var n=e("./_isStrictComparable"),i=e("./keys");t.exports=function(e){for(var t=i(e),r=t.length;r--;){var s=t[r],a=e[s];t[r]=[s,a,n(a)]}return t}},{"./_isStrictComparable":452,"./keys":523}],429:[function(e,t,r){var n=e("./_baseIsNative"),i=e("./_getValue");t.exports=function(e,t){var r=i(e,t);return n(r)?r:void 0}},{"./_baseIsNative":374,"./_getValue":435}],430:[function(e,t,r){var n=e("./_overArg")(Object.getPrototypeOf,Object);t.exports=n},{"./_overArg":471}],431:[function(e,t,r){var n=e("./_Symbol"),i=Object.prototype,s=i.hasOwnProperty,a=i.toString,o=n?n.toStringTag:void 0;t.exports=function(e){var t=s.call(e,o),r=e[o];try{e[o]=void 0;var n=!0}catch(e){}var i=a.call(e);return n&&(t?e[o]=r:delete e[o]),i}},{"./_Symbol":334}],432:[function(e,t,r){var n=e("./_arrayFilter"),i=e("./stubArray"),s=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,o=a?function(e){return null==e?[]:(e=Object(e),n(a(e),function(t){return s.call(e,t)}))}:i;t.exports=o},{"./_arrayFilter":341,"./stubArray":533}],433:[function(e,t,r){var n=e("./_arrayPush"),i=e("./_getPrototype"),s=e("./_getSymbols"),a=e("./stubArray"),o=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,s(e)),e=i(e);return t}:a;t.exports=o},{"./_arrayPush":346,"./_getPrototype":430,"./_getSymbols":432,"./stubArray":533}],434:[function(e,t,r){var n=e("./_DataView"),i=e("./_Map"),s=e("./_Promise"),a=e("./_Set"),o=e("./_WeakMap"),u=e("./_baseGetTag"),l=e("./_toSource"),c=l(n),p=l(i),h=l(s),f=l(a),d=l(o),m=u;(n&&"[object DataView]"!=m(new n(new ArrayBuffer(1)))||i&&"[object Map]"!=m(new i)||s&&"[object Promise]"!=m(s.resolve())||a&&"[object Set]"!=m(new a)||o&&"[object WeakMap]"!=m(new o))&&(m=function(e){var t=u(e),r="[object Object]"==t?e.constructor:void 0,n=r?l(r):"";if(n)switch(n){case c:return"[object DataView]";case p:return"[object Map]";case h:return"[object Promise]";case f:return"[object Set]";case d:return"[object WeakMap]"}return t}),t.exports=m},{"./_DataView":325,"./_Map":328,"./_Promise":330,"./_Set":331,"./_WeakMap":336,"./_baseGetTag":365,"./_toSource":487}],435:[function(e,t,r){t.exports=function(e,t){return null==e?void 0:e[t]}},{}],436:[function(e,t,r){var n=e("./_castPath"),i=e("./isArguments"),s=e("./isArray"),a=e("./_isIndex"),o=e("./isLength"),u=e("./_toKey");t.exports=function(e,t,r){for(var l=-1,c=(t=n(t,e)).length,p=!1;++l<c;){var h=u(t[l]);if(!(p=null!=e&&r(e,h)))break;e=e[h]}return p||++l!=c?p:!!(c=null==e?0:e.length)&&o(c)&&a(h,c)&&(s(e)||i(e))}},{"./_castPath":398,"./_isIndex":446,"./_toKey":486,"./isArguments":508,"./isArray":509,"./isLength":515}],437:[function(e,t,r){var n=e("./_nativeCreate");t.exports=function(){this.__data__=n?n(null):{},this.size=0}},{"./_nativeCreate":466}],438:[function(e,t,r){t.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},{}],439:[function(e,t,r){var n=e("./_nativeCreate"),i="__lodash_hash_undefined__",s=Object.prototype.hasOwnProperty;t.exports=function(e){var t=this.__data__;if(n){var r=t[e];return r===i?void 0:r}return s.call(t,e)?t[e]:void 0}},{"./_nativeCreate":466}],440:[function(e,t,r){var n=e("./_nativeCreate"),i=Object.prototype.hasOwnProperty;t.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:i.call(t,e)}},{"./_nativeCreate":466}],441:[function(e,t,r){var n=e("./_nativeCreate"),i="__lodash_hash_undefined__";t.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?i:t,this}},{"./_nativeCreate":466}],442:[function(e,t,r){var n=Object.prototype.hasOwnProperty;t.exports=function(e){var t=e.length,r=e.constructor(t);return t&&"string"==typeof e[0]&&n.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},{}],443:[function(e,t,r){var n=e("./_cloneArrayBuffer"),i=e("./_cloneDataView"),s=e("./_cloneMap"),a=e("./_cloneRegExp"),o=e("./_cloneSet"),u=e("./_cloneSymbol"),l=e("./_cloneTypedArray"),c="[object Boolean]",p="[object Date]",h="[object Map]",f="[object Number]",d="[object RegExp]",m="[object Set]",y="[object String]",g="[object Symbol]",b="[object ArrayBuffer]",v="[object DataView]",x="[object Float32Array]",E="[object Float64Array]",A="[object Int8Array]",D="[object Int16Array]",C="[object Int32Array]",S="[object Uint8Array]",_="[object Uint8ClampedArray]",w="[object Uint16Array]",k="[object Uint32Array]";t.exports=function(e,t,r,F){var T=e.constructor;switch(t){case b:return n(e);case c:case p:return new T(+e);case v:return i(e,F);case x:case E:case A:case D:case C:case S:case _:case w:case k:return l(e,F);case h:return s(e,F,r);case f:case y:return new T(e);case d:return a(e);case m:return o(e,F,r);case g:return u(e)}}},{"./_cloneArrayBuffer":399,"./_cloneDataView":401,"./_cloneMap":402,"./_cloneRegExp":403,"./_cloneSet":404,"./_cloneSymbol":405,"./_cloneTypedArray":406}],444:[function(e,t,r){var n=e("./_baseCreate"),i=e("./_getPrototype"),s=e("./_isPrototype");t.exports=function(e){return"function"!=typeof e.constructor||s(e)?{}:n(i(e))}},{"./_baseCreate":357,"./_getPrototype":430,"./_isPrototype":451}],445:[function(e,t,r){var n=e("./_Symbol"),i=e("./isArguments"),s=e("./isArray"),a=n?n.isConcatSpreadable:void 0;t.exports=function(e){return s(e)||i(e)||!!(a&&e&&e[a])}},{"./_Symbol":334,"./isArguments":508,"./isArray":509}],446:[function(e,t,r){var n=9007199254740991,i=/^(?:0|[1-9]\d*)$/;t.exports=function(e,t){return!!(t=null==t?n:t)&&("number"==typeof e||i.test(e))&&e>-1&&e%1==0&&e<t}},{}],447:[function(e,t,r){var n=e("./eq"),i=e("./isArrayLike"),s=e("./_isIndex"),a=e("./isObject");t.exports=function(e,t,r){if(!a(r))return!1;var o=typeof t;return!!("number"==o?i(r)&&s(t,r.length):"string"==o&&t in r)&&n(r[t],e)}},{"./_isIndex":446,"./eq":496,"./isArrayLike":510,"./isObject":516}],448:[function(e,t,r){var n=e("./isArray"),i=e("./isSymbol"),s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!i(e))||a.test(e)||!s.test(e)||null!=t&&e in Object(t)}},{"./isArray":509,"./isSymbol":521}],449:[function(e,t,r){t.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},{}],450:[function(e,t,r){var n=e("./_coreJsData"),i=function(){var e=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();t.exports=function(e){return!!i&&i in e}},{"./_coreJsData":413}],451:[function(e,t,r){var n=Object.prototype;t.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},{}],452:[function(e,t,r){var n=e("./isObject");t.exports=function(e){return e==e&&!n(e)}},{"./isObject":516}],453:[function(e,t,r){t.exports=function(){this.__data__=[],this.size=0}},{}],454:[function(e,t,r){var n=e("./_assocIndexOf"),i=Array.prototype.splice;t.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0||(r==t.length-1?t.pop():i.call(t,r,1),--this.size,0))}},{"./_assocIndexOf":351}],455:[function(e,t,r){var n=e("./_assocIndexOf");t.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},{"./_assocIndexOf":351}],456:[function(e,t,r){var n=e("./_assocIndexOf");t.exports=function(e){return n(this.__data__,e)>-1}},{"./_assocIndexOf":351}],457:[function(e,t,r){var n=e("./_assocIndexOf");t.exports=function(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}},{"./_assocIndexOf":351}],458:[function(e,t,r){var n=e("./_Hash"),i=e("./_ListCache"),s=e("./_Map");t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(s||i),string:new n}}},{"./_Hash":326,"./_ListCache":327,"./_Map":328}],459:[function(e,t,r){var n=e("./_getMapData");t.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},{"./_getMapData":427}],460:[function(e,t,r){var n=e("./_getMapData");t.exports=function(e){return n(this,e).get(e)}},{"./_getMapData":427}],461:[function(e,t,r){var n=e("./_getMapData");t.exports=function(e){return n(this,e).has(e)}},{"./_getMapData":427}],462:[function(e,t,r){var n=e("./_getMapData");t.exports=function(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}},{"./_getMapData":427}],463:[function(e,t,r){t.exports=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}},{}],464:[function(e,t,r){t.exports=function(e,t){return function(r){return null!=r&&r[e]===t&&(void 0!==t||e in Object(r))}}},{}],465:[function(e,t,r){var n=e("./memoize"),i=500;t.exports=function(e){var t=n(e,function(e){return r.size===i&&r.clear(),e}),r=t.cache;return t}},{"./memoize":526}],466:[function(e,t,r){var n=e("./_getNative")(Object,"create");t.exports=n},{"./_getNative":429}],467:[function(e,t,r){var n=e("./_overArg")(Object.keys,Object);t.exports=n},{"./_overArg":471}],468:[function(e,t,r){t.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},{}],469:[function(e,t,r){var n=e("./_freeGlobal"),i="object"==typeof r&&r&&!r.nodeType&&r,s=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=s&&s.exports===i&&n.process,o=function(){try{return a&&a.binding&&a.binding("util")}catch(e){}}();t.exports=o},{"./_freeGlobal":424}],470:[function(e,t,r){var n=Object.prototype.toString;t.exports=function(e){return n.call(e)}},{}],471:[function(e,t,r){t.exports=function(e,t){return function(r){return e(t(r))}}},{}],472:[function(e,t,r){var n=e("./_apply"),i=Math.max;t.exports=function(e,t,r){return t=i(void 0===t?e.length-1:t,0),function(){for(var s=arguments,a=-1,o=i(s.length-t,0),u=Array(o);++a<o;)u[a]=s[t+a];a=-1;for(var l=Array(t+1);++a<t;)l[a]=s[a];return l[t]=r(u),n(e,this,l)}}},{"./_apply":339}],473:[function(e,t,r){var n=e("./_freeGlobal"),i="object"==typeof self&&self&&self.Object===Object&&self,s=n||i||Function("return this")();t.exports=s},{"./_freeGlobal":424}],474:[function(e,t,r){var n="__lodash_hash_undefined__";t.exports=function(e){return this.__data__.set(e,n),this}},{}],475:[function(e,t,r){t.exports=function(e){return this.__data__.has(e)}},{}],476:[function(e,t,r){t.exports=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}},{}],477:[function(e,t,r){var n=e("./_baseSetToString"),i=e("./_shortOut")(n);t.exports=i},{"./_baseSetToString":390,"./_shortOut":478}],478:[function(e,t,r){var n=800,i=16,s=Date.now;t.exports=function(e){var t=0,r=0;return function(){var a=s(),o=i-(a-r);if(r=a,o>0){if(++t>=n)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}},{}],479:[function(e,t,r){var n=e("./_ListCache");t.exports=function(){this.__data__=new n,this.size=0}},{"./_ListCache":327}],480:[function(e,t,r){t.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},{}],481:[function(e,t,r){t.exports=function(e){return this.__data__.get(e)}},{}],482:[function(e,t,r){t.exports=function(e){return this.__data__.has(e)}},{}],483:[function(e,t,r){var n=e("./_ListCache"),i=e("./_Map"),s=e("./_MapCache"),a=200;t.exports=function(e,t){var r=this.__data__;if(r instanceof n){var o=r.__data__;if(!i||o.length<a-1)return o.push([e,t]),this.size=++r.size,this;r=this.__data__=new s(o)}return r.set(e,t),this.size=r.size,this}},{"./_ListCache":327,"./_Map":328,"./_MapCache":329}],484:[function(e,t,r){t.exports=function(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}},{}],485:[function(e,t,r){var n=/^\./,i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,a=e("./_memoizeCapped")(function(e){var t=[];return n.test(e)&&t.push(""),e.replace(i,function(e,r,n,i){t.push(n?i.replace(s,"$1"):r||e)}),t});t.exports=a},{"./_memoizeCapped":465}],486:[function(e,t,r){var n=e("./isSymbol"),i=1/0;t.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}},{"./isSymbol":521}],487:[function(e,t,r){var n=Function.prototype.toString;t.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},{}],488:[function(e,t,r){var n=e("./_assignValue"),i=e("./_copyObject"),s=e("./_createAssigner"),a=e("./isArrayLike"),o=e("./_isPrototype"),u=e("./keys"),l=Object.prototype.hasOwnProperty,c=s(function(e,t){if(o(t)||a(t))i(t,u(t),e);else for(var r in t)l.call(t,r)&&n(e,r,t[r])});t.exports=c},{"./_assignValue":350,"./_copyObject":410,"./_createAssigner":414,"./_isPrototype":451,"./isArrayLike":510,"./keys":523}],489:[function(e,t,r){var n=e("./_copyObject"),i=e("./_createAssigner"),s=e("./keysIn"),a=i(function(e,t){n(t,s(t),e)});t.exports=a},{"./_copyObject":410,"./_createAssigner":414,"./keysIn":524}],490:[function(e,t,r){var n=e("./_copyObject"),i=e("./_createAssigner"),s=e("./keysIn"),a=i(function(e,t,r,i){n(t,s(t),e,i)});t.exports=a},{"./_copyObject":410,"./_createAssigner":414,"./keysIn":524}],491:[function(e,t,r){var n=e("./_baseClone"),i=4;t.exports=function(e){return n(e,i)}},{"./_baseClone":356}],492:[function(e,t,r){var n=e("./_baseClone"),i=1,s=4;t.exports=function(e){return n(e,i|s)}},{"./_baseClone":356}],493:[function(e,t,r){var n=e("./_baseClone"),i=1,s=4;t.exports=function(e,t){return t="function"==typeof t?t:void 0,n(e,i|s,t)}},{"./_baseClone":356}],494:[function(e,t,r){t.exports=function(e){return function(){return e}}},{}],495:[function(e,t,r){var n=e("./_apply"),i=e("./assignInWith"),s=e("./_baseRest"),a=e("./_customDefaultsAssignIn"),o=s(function(e){return e.push(void 0,a),n(i,void 0,e)});t.exports=o},{"./_apply":339,"./_baseRest":389,"./_customDefaultsAssignIn":419,"./assignInWith":490}],496:[function(e,t,r){t.exports=function(e,t){return e===t||e!=e&&t!=t}},{}],497:[function(e,t,r){var n=e("./toString"),i=/[\\^$.*+?()[\]{}|]/g,s=RegExp(i.source);t.exports=function(e){return(e=n(e))&&s.test(e)?e.replace(i,"\\$&"):e}},{"./toString":539}],498:[function(e,t,r){t.exports=e("./assignIn")},{"./assignIn":489}],499:[function(e,t,r){var n=e("./_createFind")(e("./findIndex"));t.exports=n},{"./_createFind":417,"./findIndex":500}],500:[function(e,t,r){var n=e("./_baseFindIndex"),i=e("./_baseIteratee"),s=e("./toInteger"),a=Math.max;t.exports=function(e,t,r){var o=null==e?0:e.length;if(!o)return-1;var u=null==r?0:s(r);return u<0&&(u=a(o+u,0)),n(e,i(t,3),u)}},{"./_baseFindIndex":359,"./_baseIteratee":377,"./toInteger":536}],501:[function(e,t,r){var n=e("./_createFind")(e("./findLastIndex"));t.exports=n},{"./_createFind":417,"./findLastIndex":502}],502:[function(e,t,r){var n=e("./_baseFindIndex"),i=e("./_baseIteratee"),s=e("./toInteger"),a=Math.max,o=Math.min;t.exports=function(e,t,r){var u=null==e?0:e.length;if(!u)return-1;var l=u-1;return void 0!==r&&(l=s(r),l=r<0?a(u+l,0):o(l,u-1)),n(e,i(t,3),l,!0)}},{"./_baseFindIndex":359,"./_baseIteratee":377,"./toInteger":536}],503:[function(e,t,r){var n=e("./_baseGet");t.exports=function(e,t,r){var i=null==e?void 0:n(e,t);return void 0===i?r:i}},{"./_baseGet":363}],504:[function(e,t,r){var n=e("./_baseHas"),i=e("./_hasPath");t.exports=function(e,t){return null!=e&&i(e,t,n)}},{"./_baseHas":366,"./_hasPath":436}],505:[function(e,t,r){var n=e("./_baseHasIn"),i=e("./_hasPath");t.exports=function(e,t){return null!=e&&i(e,t,n)}},{"./_baseHasIn":367,"./_hasPath":436}],506:[function(e,t,r){t.exports=function(e){return e}},{}],507:[function(e,t,r){var n=e("./_baseIndexOf"),i=e("./isArrayLike"),s=e("./isString"),a=e("./toInteger"),o=e("./values"),u=Math.max;t.exports=function(e,t,r,l){e=i(e)?e:o(e),r=r&&!l?a(r):0;var c=e.length;return r<0&&(r=u(c+r,0)),s(e)?r<=c&&e.indexOf(t,r)>-1:!!c&&n(e,t,r)>-1}},{"./_baseIndexOf":368,"./isArrayLike":510,"./isString":520,"./toInteger":536,"./values":541}],508:[function(e,t,r){var n=e("./_baseIsArguments"),i=e("./isObjectLike"),s=Object.prototype,a=s.hasOwnProperty,o=s.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(e){return i(e)&&a.call(e,"callee")&&!o.call(e,"callee")};t.exports=u},{"./_baseIsArguments":369,"./isObjectLike":517}],509:[function(e,t,r){var n=Array.isArray;t.exports=n},{}],510:[function(e,t,r){var n=e("./isFunction"),i=e("./isLength");t.exports=function(e){return null!=e&&i(e.length)&&!n(e)}},{"./isFunction":513,"./isLength":515}],511:[function(e,t,r){var n=e("./isArrayLike"),i=e("./isObjectLike");t.exports=function(e){return i(e)&&n(e)}},{"./isArrayLike":510,"./isObjectLike":517}],512:[function(e,t,r){var n=e("./_root"),i=e("./stubFalse"),s="object"==typeof r&&r&&!r.nodeType&&r,a=s&&"object"==typeof t&&t&&!t.nodeType&&t,o=a&&a.exports===s?n.Buffer:void 0,u=(o?o.isBuffer:void 0)||i;t.exports=u},{"./_root":473,"./stubFalse":534}],513:[function(e,t,r){var n=e("./_baseGetTag"),i=e("./isObject"),s="[object AsyncFunction]",a="[object Function]",o="[object GeneratorFunction]",u="[object Proxy]";t.exports=function(e){if(!i(e))return!1;var t=n(e);return t==a||t==o||t==s||t==u}},{"./_baseGetTag":365,"./isObject":516}],514:[function(e,t,r){var n=e("./toInteger");t.exports=function(e){return"number"==typeof e&&e==n(e)}},{"./toInteger":536}],515:[function(e,t,r){var n=9007199254740991;t.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}},{}],516:[function(e,t,r){t.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},{}],517:[function(e,t,r){t.exports=function(e){return null!=e&&"object"==typeof e}},{}],518:[function(e,t,r){var n=e("./_baseGetTag"),i=e("./_getPrototype"),s=e("./isObjectLike"),a="[object Object]",o=Function.prototype,u=Object.prototype,l=o.toString,c=u.hasOwnProperty,p=l.call(Object);t.exports=function(e){if(!s(e)||n(e)!=a)return!1;var t=i(e);if(null===t)return!0;var r=c.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&l.call(r)==p}},{"./_baseGetTag":365,"./_getPrototype":430,"./isObjectLike":517}],519:[function(e,t,r){var n=e("./_baseIsRegExp"),i=e("./_baseUnary"),s=e("./_nodeUtil"),a=s&&s.isRegExp,o=a?i(a):n;t.exports=o},{"./_baseIsRegExp":375,"./_baseUnary":394,"./_nodeUtil":469}],520:[function(e,t,r){var n=e("./_baseGetTag"),i=e("./isArray"),s=e("./isObjectLike"),a="[object String]";t.exports=function(e){return"string"==typeof e||!i(e)&&s(e)&&n(e)==a}},{"./_baseGetTag":365,"./isArray":509,"./isObjectLike":517}],521:[function(e,t,r){var n=e("./_baseGetTag"),i=e("./isObjectLike"),s="[object Symbol]";t.exports=function(e){return"symbol"==typeof e||i(e)&&n(e)==s}},{"./_baseGetTag":365,"./isObjectLike":517}],522:[function(e,t,r){var n=e("./_baseIsTypedArray"),i=e("./_baseUnary"),s=e("./_nodeUtil"),a=s&&s.isTypedArray,o=a?i(a):n;t.exports=o},{"./_baseIsTypedArray":376,"./_baseUnary":394,"./_nodeUtil":469}],523:[function(e,t,r){var n=e("./_arrayLikeKeys"),i=e("./_baseKeys"),s=e("./isArrayLike");t.exports=function(e){return s(e)?n(e):i(e)}},{"./_arrayLikeKeys":344,"./_baseKeys":378,"./isArrayLike":510}],524:[function(e,t,r){var n=e("./_arrayLikeKeys"),i=e("./_baseKeysIn"),s=e("./isArrayLike");t.exports=function(e){return s(e)?n(e,!0):i(e)}},{"./_arrayLikeKeys":344,"./_baseKeysIn":379,"./isArrayLike":510}],525:[function(e,t,r){var n=e("./_arrayMap"),i=e("./_baseIteratee"),s=e("./_baseMap"),a=e("./isArray");t.exports=function(e,t){return(a(e)?n:s)(e,i(t,3))}},{"./_arrayMap":345,"./_baseIteratee":377,"./_baseMap":380,"./isArray":509}],526:[function(e,t,r){function n(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(s);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var a=e.apply(this,n);return r.cache=s.set(i,a)||s,a};return r.cache=new(n.Cache||i),r}var i=e("./_MapCache"),s="Expected a function";n.Cache=i,t.exports=n},{"./_MapCache":329}],527:[function(e,t,r){var n=e("./_baseMerge"),i=e("./_createAssigner")(function(e,t,r,i){n(e,t,r,i)});t.exports=i},{"./_baseMerge":383,"./_createAssigner":414}],528:[function(e,t,r){t.exports=function(){}},{}],529:[function(e,t,r){var n=e("./_baseProperty"),i=e("./_basePropertyDeep"),s=e("./_isKey"),a=e("./_toKey");t.exports=function(e){return s(e)?n(a(e)):i(e)}},{"./_baseProperty":386,"./_basePropertyDeep":387,"./_isKey":448,"./_toKey":486}],530:[function(e,t,r){var n=e("./_baseRepeat"),i=e("./_isIterateeCall"),s=e("./toInteger"),a=e("./toString");t.exports=function(e,t,r){return t=(r?i(e,t,r):void 0===t)?1:s(t),n(a(e),t)}},{"./_baseRepeat":388,"./_isIterateeCall":447,"./toInteger":536,"./toString":539}],531:[function(e,t,r){var n=e("./_baseFlatten"),i=e("./_baseOrderBy"),s=e("./_baseRest"),a=e("./_isIterateeCall"),o=s(function(e,t){if(null==e)return[];var r=t.length;return r>1&&a(e,t[0],t[1])?t=[]:r>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),i(e,n(t,1),[])});t.exports=o},{"./_baseFlatten":360,"./_baseOrderBy":385,"./_baseRest":389,"./_isIterateeCall":447}],532:[function(e,t,r){var n=e("./_baseClamp"),i=e("./_baseToString"),s=e("./toInteger"),a=e("./toString");t.exports=function(e,t,r){return e=a(e),r=null==r?0:n(s(r),0,e.length),t=i(t),e.slice(r,r+t.length)==t}},{"./_baseClamp":355,"./_baseToString":393,"./toInteger":536,"./toString":539}],533:[function(e,t,r){t.exports=function(){return[]}},{}],534:[function(e,t,r){t.exports=function(){return!1}},{}],535:[function(e,t,r){var n=e("./toNumber"),i=1/0,s=1.7976931348623157e308;t.exports=function(e){if(!e)return 0===e?e:0;if((e=n(e))===i||e===-i)return(e<0?-1:1)*s;return e==e?e:0}},{"./toNumber":537}],536:[function(e,t,r){var n=e("./toFinite");t.exports=function(e){var t=n(e),r=t%1;return t==t?r?t-r:t:0}},{"./toFinite":535}],537:[function(e,t,r){var n=e("./isObject"),i=e("./isSymbol"),s=NaN,a=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;t.exports=function(e){if("number"==typeof e)return e;if(i(e))return s;if(n(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=n(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var r=u.test(e);return r||l.test(e)?c(e.slice(2),r?2:8):o.test(e)?s:+e}},{"./isObject":516,"./isSymbol":521}],538:[function(e,t,r){var n=e("./_copyObject"),i=e("./keysIn");t.exports=function(e){return n(e,i(e))}},{"./_copyObject":410,"./keysIn":524}],539:[function(e,t,r){var n=e("./_baseToString");t.exports=function(e){return null==e?"":n(e)}},{"./_baseToString":393}],540:[function(e,t,r){var n=e("./_baseUniq");t.exports=function(e){return e&&e.length?n(e):[]}},{"./_baseUniq":395}],541:[function(e,t,r){var n=e("./_baseValues"),i=e("./keys");t.exports=function(e){return null==e?[]:n(e,i(e))}},{"./_baseValues":396,"./keys":523}],542:[function(e,t,r){function n(e,t){e=e||{},t=t||{};var r={};return Object.keys(t).forEach(function(e){r[e]=t[e]}),Object.keys(e).forEach(function(t){r[t]=e[t]}),r}function i(e,t,r){if("string"!=typeof t)throw new TypeError("glob pattern string required");return r||(r={}),!(!r.nocomment&&"#"===t.charAt(0))&&(""===t.trim()?""===e:new s(t,r).match(e))}function s(e,t){if(!(this instanceof s))return new s(e,t);if("string"!=typeof e)throw new TypeError("glob pattern string required");t||(t={}),e=e.trim(),"/"!==o.sep&&(e=e.split(o.sep).join("/")),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.make()}function a(e,t){if(t||(t=this instanceof s?this.options:{}),void 0===(e=void 0===e?this.pattern:e))throw new TypeError("undefined pattern");return t.nobrace||!e.match(/\{.*\}/)?[e]:l(e)}t.exports=i,i.Minimatch=s;var o={sep:"/"};try{o=e("path")}catch(e){}var u=i.GLOBSTAR=s.GLOBSTAR={},l=e("brace-expansion"),c={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},p="[^/]",h=p+"*?",f="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",d="(?:(?!(?:\\/|^)\\.).)*?",m=function(e){return e.split("").reduce(function(e,t){return e[t]=!0,e},{})}("().*{}+?[]^$\\!"),y=/\/+/;i.filter=function(e,t){return t=t||{},function(r,n,s){return i(r,e,t)}},i.defaults=function(e){if(!e||!Object.keys(e).length)return i;var t=i,r=function(r,i,s){return t.minimatch(r,i,n(e,s))};return r.Minimatch=function(r,i){return new t.Minimatch(r,n(e,i))},r},s.defaults=function(e){return e&&Object.keys(e).length?i.defaults(e).Minimatch:s},s.prototype.debug=function(){},s.prototype.make=function(){if(!this._made){var e=this.pattern,t=this.options;if(t.nocomment||"#"!==e.charAt(0))if(e){this.parseNegate();var r=this.globSet=this.braceExpand();t.debug&&(this.debug=console.error),this.debug(this.pattern,r),r=this.globParts=r.map(function(e){return e.split(y)}),this.debug(this.pattern,r),r=r.map(function(e,t,r){return e.map(this.parse,this)},this),this.debug(this.pattern,r),r=r.filter(function(e){return-1===e.indexOf(!1)}),this.debug(this.pattern,r),this.set=r}else this.empty=!0;else this.comment=!0}},s.prototype.parseNegate=function(){var e=this.pattern,t=!1,r=0;if(!this.options.nonegate){for(var n=0,i=e.length;n<i&&"!"===e.charAt(n);n++)t=!t,r++;r&&(this.pattern=e.substr(r)),this.negate=t}},i.braceExpand=function(e,t){return a(e,t)},s.prototype.braceExpand=a,s.prototype.parse=function(e,t){function r(){if(i){switch(i){case"*":a+=h,o=!0;break;case"?":a+=p,o=!0;break;default:a+="\\"+i}E.debug("clearStateChar %j %j",i,a),i=!1}}if(e.length>65536)throw new TypeError("pattern is too long");var n=this.options;if(!n.noglobstar&&"**"===e)return u;if(""===e)return"";for(var i,s,a="",o=!!n.nocase,l=!1,f=[],d=[],y=!1,b=-1,v=-1,x="."===e.charAt(0)?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",E=this,A=0,D=e.length;A<D&&(s=e.charAt(A));A++)if(this.debug("%s\t%s %s %j",e,A,a,s),l&&m[s])a+="\\"+s,l=!1;else switch(s){case"/":return!1;case"\\":r(),l=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",e,A,a,s),y){this.debug(" in class"),"!"===s&&A===v+1&&(s="^"),a+=s;continue}E.debug("call clearStateChar %j",i),r(),i=s,n.noext&&r();continue;case"(":if(y){a+="(";continue}if(!i){a+="\\(";continue}f.push({type:i,start:A-1,reStart:a.length,open:c[i].open,close:c[i].close}),a+="!"===i?"(?:(?!(?:":"(?:",this.debug("plType %j %j",i,a),i=!1;continue;case")":if(y||!f.length){a+="\\)";continue}r(),o=!0;var C=f.pop();a+=C.close,"!"===C.type&&d.push(C),C.reEnd=a.length;continue;case"|":if(y||!f.length||l){a+="\\|",l=!1;continue}r(),a+="|";continue;case"[":if(r(),y){a+="\\"+s;continue}y=!0,v=A,b=a.length,a+=s;continue;case"]":if(A===v+1||!y){a+="\\"+s,l=!1;continue}if(y){var S=e.substring(v+1,A);try{RegExp("["+S+"]")}catch(e){var _=this.parse(S,g);a=a.substr(0,b)+"\\["+_[0]+"\\]",o=o||_[1],y=!1;continue}}o=!0,y=!1,a+=s;continue;default:r(),l?l=!1:!m[s]||"^"===s&&y||(a+="\\"),a+=s}for(y&&(S=e.substr(v+1),_=this.parse(S,g),a=a.substr(0,b)+"\\["+_[0],o=o||_[1]),C=f.pop();C;C=f.pop()){var w=a.slice(C.reStart+C.open.length);this.debug("setting tail",a,C),w=w.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(e,t,r){return r||(r="\\"),t+t+r+"|"}),this.debug("tail=%j\n %s",w,w,C,a);var k="*"===C.type?h:"?"===C.type?p:"\\"+C.type;o=!0,a=a.slice(0,C.reStart)+k+"\\("+w}r(),l&&(a+="\\\\");var F=!1;switch(a.charAt(0)){case".":case"[":case"(":F=!0}for(var T=d.length-1;T>-1;T--){var P=d[T],B=a.slice(0,P.reStart),O=a.slice(P.reStart,P.reEnd-8),j=a.slice(P.reEnd-8,P.reEnd),N=a.slice(P.reEnd);j+=N;var I=B.split("(").length-1,L=N;for(A=0;A<I;A++)L=L.replace(/\)[+*?]?/,"");var M="";""===(N=L)&&t!==g&&(M="$"),a=B+O+N+M+j}if(""!==a&&o&&(a="(?=.)"+a),F&&(a=x+a),t===g)return[a,o];if(!o)return e.replace(/\\(.)/g,"$1");var R=n.nocase?"i":"";try{var V=new RegExp("^"+a+"$",R)}catch(e){return new RegExp("$.")}return V._glob=e,V._src=a,V};var g={};i.makeRe=function(e,t){return new s(e,t||{}).makeRe()},s.prototype.makeRe=function(){if(this.regexp||!1===this.regexp)return this.regexp;var e=this.set;if(!e.length)return this.regexp=!1,this.regexp;var t=this.options,r=t.noglobstar?h:t.dot?f:d,n=t.nocase?"i":"",i=e.map(function(e){return e.map(function(e){return e===u?r:"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):e._src}).join("\\/")}).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,n)}catch(e){this.regexp=!1}return this.regexp},i.match=function(e,t,r){var n=new s(t,r=r||{});return e=e.filter(function(e){return n.match(e)}),n.options.nonull&&!e.length&&e.push(t),e},s.prototype.match=function(e,t){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;var r=this.options;"/"!==o.sep&&(e=e.split(o.sep).join("/")),e=e.split(y),this.debug(this.pattern,"split",e);var n=this.set;this.debug(this.pattern,"set",n);var i,s;for(s=e.length-1;s>=0&&!(i=e[s]);s--);for(s=0;s<n.length;s++){var a=n[s],u=e;if(r.matchBase&&1===a.length&&(u=[i]),this.matchOne(u,a,t))return!!r.flipNegate||!this.negate}return!r.flipNegate&&this.negate},s.prototype.matchOne=function(e,t,r){var n=this.options;this.debug("matchOne",{this:this,file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var i=0,s=0,a=e.length,o=t.length;i<a&&s<o;i++,s++){this.debug("matchOne loop");var l=t[s],c=e[i];if(this.debug(t,l,c),!1===l)return!1;if(l===u){this.debug("GLOBSTAR",[t,l,c]);var p=i,h=s+1;if(h===o){for(this.debug("** at the end");i<a;i++)if("."===e[i]||".."===e[i]||!n.dot&&"."===e[i].charAt(0))return!1;return!0}for(;p<a;){var f=e[p];if(this.debug("\nglobstar while",e,p,t,h,f),this.matchOne(e.slice(p),t.slice(h),r))return this.debug("globstar found match!",p,a,f),!0;if("."===f||".."===f||!n.dot&&"."===f.charAt(0)){this.debug("dot detected!",e,p,t,h);break}this.debug("globstar swallow a segment, and continue"),p++}return!(!r||(this.debug("\n>>> no match, partial?",e,p,t,h),p!==a))}var d;if("string"==typeof l?(d=n.nocase?c.toLowerCase()===l.toLowerCase():c===l,this.debug("string match",l,c,d)):(d=c.match(l),this.debug("pattern match",l,c,d)),!d)return!1}if(i===a&&s===o)return!0;if(i===a)return r;if(s===o){return i===a-1&&""===e[i]}throw new Error("wtf?")}},{"brace-expansion":189,path:546}],543:[function(e,t,r){function n(e,t,r){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}var i=1e3,s=60*i,a=60*s,o=24*a,u=365.25*o;t.exports=function(e,t){t=t||{};var r=typeof e;if("string"===r&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*u;case"days":case"day":case"d":return r*o;case"hours":case"hour":case"hrs":case"hr":case"h":return r*a;case"minutes":case"minute":case"mins":case"min":case"m":return r*s;case"seconds":case"second":case"secs":case"sec":case"s":return r*i;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}(e);if("number"===r&&!1===isNaN(e))return t.long?function(e){return n(e,o,"day")||n(e,a,"hour")||n(e,s,"minute")||n(e,i,"second")||e+" ms"}(e):function(e){return e>=o?Math.round(e/o)+"d":e>=a?Math.round(e/a)+"h":e>=s?Math.round(e/s)+"m":e>=i?Math.round(e/i)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}],544:[function(e,t,r){"use strict";t.exports=Number.isNaN||function(e){return e!=e}},{}],545:[function(e,t,r){r.endianness=function(){return"LE"},r.hostname=function(){return"undefined"!=typeof location?location.hostname:""},r.loadavg=function(){return[]},r.uptime=function(){return 0},r.freemem=function(){return Number.MAX_VALUE},r.totalmem=function(){return Number.MAX_VALUE},r.cpus=function(){return[]},r.type=function(){return"Browser"},r.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},r.networkInterfaces=r.getNetworkInterfaces=function(){return{}},r.arch=function(){return"javascript"},r.platform=function(){return"browser"},r.tmpdir=r.tmpDir=function(){return"/tmp"},r.EOL="\n",r.homedir=function(){return"/"}},{}],546:[function(e,t,r){(function(e){function t(e,t){for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function n(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n<e.length;n++)t(e[n],n,e)&&r.push(e[n]);return r}var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,s=function(e){return i.exec(e).slice(1)};r.resolve=function(){for(var r="",i=!1,s=arguments.length-1;s>=-1&&!i;s--){var a=s>=0?arguments[s]:e.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(r=a+"/"+r,i="/"===a.charAt(0))}return r=t(n(r.split("/"),function(e){return!!e}),!i).join("/"),(i?"/":"")+r||"."},r.normalize=function(e){var i=r.isAbsolute(e),s="/"===a(e,-1);return(e=t(n(e.split("/"),function(e){return!!e}),!i).join("/"))||i||(e="."),e&&s&&(e+="/"),(i?"/":"")+e},r.isAbsolute=function(e){return"/"===e.charAt(0)},r.join=function(){var e=Array.prototype.slice.call(arguments,0);return r.normalize(n(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},r.relative=function(e,t){function n(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=r.resolve(e).substr(1),t=r.resolve(t).substr(1);for(var i=n(e.split("/")),s=n(t.split("/")),a=Math.min(i.length,s.length),o=a,u=0;u<a;u++)if(i[u]!==s[u]){o=u;break}for(var l=[],u=o;u<i.length;u++)l.push("..");return(l=l.concat(s.slice(o))).join("/")},r.sep="/",r.delimiter=":",r.dirname=function(e){var t=s(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},r.basename=function(e,t){var r=s(e)[2];return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r},r.extname=function(e){return s(e)[3]};var a="b"==="ab".substr(-1)?function(e,t,r){return e.substr(t,r)}:function(e,t,r){return t<0&&(t=e.length+t),e.substr(t,r)}}).call(this,e("_process"))},{_process:550}],547:[function(e,t,r){(function(e){"use strict";function r(e){return"/"===e.charAt(0)}function n(e){var t=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/.exec(e),r=t[1]||"",n=Boolean(r&&":"!==r.charAt(1));return Boolean(t[2]||n)}t.exports="win32"===e.platform?n:r,t.exports.posix=r,t.exports.win32=n}).call(this,e("_process"))},{_process:550}],548:[function(e,t,r){"use strict";function n(e,t,r){if(u)try{u.call(o,e,t,{value:r})}catch(n){e[t]=r}else e[t]=r}function i(e){return e&&(n(e,"call",e.call),n(e,"apply",e.apply)),e}function s(e){return l?l.call(o,e):(f.prototype=e||null,new f)}function a(){do{var e=function(e){var t={};return t[e]=!0,Object.keys(t)[0]}(h.call(p.call(d(),36),2))}while(c.call(m,e));return m[e]=e}var o=Object,u=Object.defineProperty,l=Object.create;i(u),i(l);var c=i(Object.prototype.hasOwnProperty),p=i(Number.prototype.toString),h=i(String.prototype.slice),f=function(){},d=Math.random,m=s(null);r.makeUniqueKey=a;var y=Object.getOwnPropertyNames;Object.getOwnPropertyNames=function(e){for(var t=y(e),r=0,n=0,i=t.length;r<i;++r)c.call(m,t[r])||(r>n&&(t[n]=t[r]),++n);return t.length=n,t},r.makeAccessor=function(e){function t(t){return c.call(t,r)||function(t){var s;n(t,r,function(r,n){if(r===i)return n?s=null:s||(s=e(t))})}(t),t[r](i)}var r=a(),i=s(null);return e=e||function(e){return s(null)},t.forget=function(e){c.call(e,r)&&e[r](i,!0)},t}},{}],549:[function(e,t,r){(function(e){"use strict";!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports=function(t,r,n,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var s,a,o=arguments.length;switch(o){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,r)});case 3:return e.nextTick(function(){t.call(null,r,n)});case 4:return e.nextTick(function(){t.call(null,r,n,i)});default:for(s=new Array(o-1),a=0;a<s.length;)s[a++]=arguments[a];return e.nextTick(function(){t.apply(null,s)})}}:t.exports=e.nextTick}).call(this,e("_process"))},{_process:550}],550:[function(e,t,r){function n(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(c===setTimeout)return setTimeout(e,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function a(){m&&f&&(m=!1,f.length?d=f.concat(d):y=-1,d.length&&o())}function o(){if(!m){var e=s(a);m=!0;for(var t=d.length;t;){for(f=d,d=[];++y<t;)f&&f[y].run();y=-1,t=d.length}f=null,m=!1,function(e){if(p===clearTimeout)return clearTimeout(e);if((p===i||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}(e)}}function u(e,t){this.fun=e,this.array=t}function l(){}var c,p,h=t.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:n}catch(e){c=n}try{p="function"==typeof clearTimeout?clearTimeout:i}catch(e){p=i}}();var f,d=[],m=!1,y=-1;h.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];d.push(new u(e,t)),1!==d.length||m||s(o)},u.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=l,h.addListener=l,h.once=l,h.off=l,h.removeListener=l,h.removeAllListeners=l,h.emit=l,h.prependListener=l,h.prependOnceListener=l,h.listeners=function(e){return[]},h.binding=function(e){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(e){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},{}],551:[function(e,t,r){t.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":552}],552:[function(e,t,r){"use strict";function n(e){if(!(this instanceof n))return new n(e);l.call(this,e),c.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",i)}function i(){this.allowHalfOpen||this._writableState.ended||a(s,this)}function s(e){e.end()}var a=e("process-nextick-args"),o=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=n;var u=e("core-util-is");u.inherits=e("inherits");var l=e("./_stream_readable"),c=e("./_stream_writable");u.inherits(n,l);for(var p=o(c.prototype),h=0;h<p.length;h++){var f=p[h];n.prototype[f]||(n.prototype[f]=c.prototype[f])}Object.defineProperty(n.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),n.prototype._destroy=function(e,t){this.push(null),this.end(),a(t,e)}},{"./_stream_readable":554,"./_stream_writable":556,"core-util-is":308,inherits:317,"process-nextick-args":549}],553:[function(e,t,r){"use strict";function n(e){if(!(this instanceof n))return new n(e);i.call(this,e)}t.exports=n;var i=e("./_stream_transform"),s=e("core-util-is");s.inherits=e("inherits"),s.inherits(n,i),n.prototype._transform=function(e,t,r){r(null,e)}},{"./_stream_transform":555,"core-util-is":308,inherits:317}],554:[function(e,t,r){(function(r,n){"use strict";function i(t,r){E=E||e("./_stream_duplex"),t=t||{},this.objectMode=!!t.objectMode,r instanceof E&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var n=t.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new P,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(T||(T=e("string_decoder/").StringDecoder),this.decoder=new T(t.encoding),this.encoding=t.encoding)}function s(t){if(E=E||e("./_stream_duplex"),!(this instanceof s))return new s(t);this._readableState=new i(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),C.call(this)}function a(e,t,r,n,i){var s=e._readableState;if(null===t)s.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,l(e)}(e,s);else{var a;i||(a=function(e,t){var r;(function(e){return S.isBuffer(e)||e instanceof _})(t)||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));return r}(s,t)),a?e.emit("error",a):s.objectMode||t&&t.length>0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===S.prototype||(t=function(e){return S.from(e)}(t)),n?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):o(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?o(e,s,t,!1):p(e,s)):o(e,s,t,!1))):n||(s.reading=!1)}return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(s)}function o(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&l(e)),p(e,t)}function u(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=j?e=j:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function l(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(F("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?x(c,e):c(e))}function c(e){F("emit readable"),e.emit("readable"),m(e)}function p(e,t){t.readingMore||(t.readingMore=!0,x(h,e,t))}function h(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(F("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function f(e){F("readable nexttick read 0"),e.read(0)}function d(e,t){t.reading||(F("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),m(e),t.flowing&&!t.reading&&e.read(0)}function m(e){var t=e._readableState;for(F("flow",t.flowing);t.flowing&&null!==e.read(););}function y(e,t){if(0===t.length)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,n=1,i=r.data;e-=i.length;for(;r=r.next;){var s=r.data,a=e>s.length?s.length:e;if(a===s.length?i+=s:i+=s.slice(0,e),0===(e-=a)){a===s.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=s.slice(a));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=S.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var s=n.data,a=e>s.length?s.length:e;if(s.copy(r,r.length-e,0,a),0===(e-=a)){a===s.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=s.slice(a));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r}function g(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,x(b,t,e))}function b(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function v(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}var x=e("process-nextick-args");t.exports=s;var E,A=e("isarray");s.ReadableState=i;e("events").EventEmitter;var D=function(e,t){return e.listeners(t).length},C=e("./internal/streams/stream"),S=e("safe-buffer").Buffer,_=n.Uint8Array||function(){},w=e("core-util-is");w.inherits=e("inherits");var k=e("util"),F=void 0;F=k&&k.debuglog?k.debuglog("stream"):function(){};var T,P=e("./internal/streams/BufferList"),B=e("./internal/streams/destroy");w.inherits(s,C);var O=["error","close","destroy","pause","resume"];Object.defineProperty(s.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),s.prototype.destroy=B.destroy,s.prototype._undestroy=B.undestroy,s.prototype._destroy=function(e,t){this.push(null),t(e)},s.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=S.from(e,t),t=""),r=!0),a(this,e,t,!1,r)},s.prototype.unshift=function(e){return a(this,e,null,!0,!1)},s.prototype.isPaused=function(){return!1===this._readableState.flowing},s.prototype.setEncoding=function(t){return T||(T=e("string_decoder/").StringDecoder),this._readableState.decoder=new T(t),this._readableState.encoding=t,this};var j=8388608;s.prototype.read=function(e){F("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return F("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?g(this):l(this),null;if(0===(e=u(e,t))&&t.ended)return 0===t.length&&g(this),null;var n=t.needReadable;F("need readable",n),(0===t.length||t.length-e<t.highWaterMark)&&F("length less than watermark",n=!0),t.ended||t.reading?F("reading or ended",n=!1):n&&(F("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=u(r,t)));var i;return null===(i=e>0?y(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&g(this)),null!==i&&this.emit("data",i),i},s.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},s.prototype.pipe=function(e,t){function n(t,r){F("onunpipe"),t===c&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,F("cleanup"),e.removeListener("close",o),e.removeListener("finish",u),e.removeListener("drain",f),e.removeListener("error",a),e.removeListener("unpipe",n),c.removeListener("end",i),c.removeListener("end",l),c.removeListener("data",s),d=!0,!p.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function i(){F("onend"),e.end()}function s(t){F("ondata"),y=!1;!1!==e.write(t)||y||((1===p.pipesCount&&p.pipes===e||p.pipesCount>1&&-1!==v(p.pipes,e))&&!d&&(F("false write response, pause",c._readableState.awaitDrain),c._readableState.awaitDrain++,y=!0),c.pause())}function a(t){F("onerror",t),l(),e.removeListener("error",a),0===D(e,"error")&&e.emit("error",t)}function o(){e.removeListener("finish",u),l()}function u(){F("onfinish"),e.removeListener("close",o),l()}function l(){F("unpipe"),c.unpipe(e)}var c=this,p=this._readableState;switch(p.pipesCount){case 0:p.pipes=e;break;case 1:p.pipes=[p.pipes,e];break;default:p.pipes.push(e)}p.pipesCount+=1,F("pipe count=%d opts=%j",p.pipesCount,t);var h=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?i:l;p.endEmitted?x(h):c.once("end",h),e.on("unpipe",n);var f=function(e){return function(){var t=e._readableState;F("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&D(e,"data")&&(t.flowing=!0,m(e))}}(c);e.on("drain",f);var d=!1,y=!1;return c.on("data",s),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?A(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",a),e.once("close",o),e.once("finish",u),e.emit("pipe",c),p.flowing||(F("pipe resume"),c.resume()),e},s.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,r);return this}var a=v(t.pipes,e);return-1===a?this:(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)},s.prototype.on=function(e,t){var r=C.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&l(this):x(f,this))}return r},s.prototype.addListener=s.prototype.on,s.prototype.resume=function(){var e=this._readableState;return e.flowing||(F("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,x(d,e,t))}(this,e)),this},s.prototype.pause=function(){return F("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(F("pause"),this._readableState.flowing=!1,this.emit("pause")),this},s.prototype.wrap=function(e){var t=this._readableState,r=!1,n=this;e.on("end",function(){if(F("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&n.push(e)}n.push(null)}),e.on("data",function(i){if(F("wrapped data"),t.decoder&&(i=t.decoder.write(i)),(!t.objectMode||null!==i&&void 0!==i)&&(t.objectMode||i&&i.length)){n.push(i)||(r=!0,e.pause())}});for(var i in e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var s=0;s<O.length;s++)e.on(O[s],n.emit.bind(n,O[s]));return n._read=function(t){F("wrapped _read",t),r&&(r=!1,e.resume())},n},s._fromList=y}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":552,"./internal/streams/BufferList":557,"./internal/streams/destroy":558,"./internal/streams/stream":559,_process:550,"core-util-is":308,events:311,inherits:317,isarray:321,"process-nextick-args":549,"safe-buffer":602,"string_decoder/":605,util:190}],555:[function(e,t,r){"use strict";function n(e){this.afterTransform=function(t,r){return function(e,t,r){var n=e._transformState;n.transforming=!1;var i=n.writecb;if(!i)return e.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!==r&&void 0!==r&&e.push(r);i(t);var s=e._readableState;s.reading=!1,(s.needReadable||s.length<s.highWaterMark)&&e._read(s.highWaterMark)}(e,t,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function i(e){if(!(this instanceof i))return new i(e);a.call(this,e),this._transformState=new n(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(e,r){s(t,e,r)}):s(t)})}function s(e,t,r){if(t)return e.emit("error",t);null!==r&&void 0!==r&&e.push(r);var n=e._writableState,i=e._transformState;if(n.length)throw new Error("Calling transform done when ws.length != 0");if(i.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}t.exports=i;var a=e("./_stream_duplex"),o=e("core-util-is");o.inherits=e("inherits"),o.inherits(i,a),i.prototype.push=function(e,t){return this._transformState.needTransform=!1,a.prototype.push.call(this,e,t)},i.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},i.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},i.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},i.prototype._destroy=function(e,t){var r=this;a.prototype._destroy.call(this,e,function(e){t(e),r.emit("close")})}},{"./_stream_duplex":552,"core-util-is":308,inherits:317}],556:[function(e,t,r){(function(r,n){"use strict";function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}function s(){}function a(t,r){y=y||e("./_stream_duplex"),t=t||{},this.objectMode=!!t.objectMode,r instanceof y&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var n=t.highWaterMark,s=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:s,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(m(i,n),m(d,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),d(e,t))}(e,r,n,t,i);else{var s=h(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||p(e,r),n?g(c,e,r,s,i):c(e,r,s,i)}}(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function o(t){if(y=y||e("./_stream_duplex"),!(C.call(o,this)||this instanceof y))return new o(t);this._writableState=new a(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),x.call(this)}function u(e,t,r,n,i,s){if(!r){var a=function(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=E.from(t,r)),t}(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var o=t.objectMode?1:n.length;t.length+=o;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else l(e,t,!1,o,n,i,s);return u}function l(e,t,r,n,i,s,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function c(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),d(e,t)}function p(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,s=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var o=0,u=!0;r;)s[o]=r,r.isBuf||(u=!1),r=r.next,o+=1;s.allBuffers=u,l(e,t,!0,t.length,s,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new i(t)}else{for(;r;){var c=r.chunk,p=r.encoding,h=r.callback;if(l(e,t,!1,t.objectMode?1:c.length,c,p,h),r=r.next,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=r,t.bufferProcessing=!1}function h(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function f(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),d(e,t)})}function d(e,t){var r=h(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,m(f,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}var m=e("process-nextick-args");t.exports=o;var y,g=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?setImmediate:m;o.WritableState=a;var b=e("core-util-is");b.inherits=e("inherits");var v={deprecate:e("util-deprecate")},x=e("./internal/streams/stream"),E=e("safe-buffer").Buffer,A=n.Uint8Array||function(){},D=e("./internal/streams/destroy");b.inherits(o,x),a.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(a.prototype,"buffer",{get:v.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}();var C;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(C=Function.prototype[Symbol.hasInstance],Object.defineProperty(o,Symbol.hasInstance,{value:function(e){return!!C.call(this,e)||e&&e._writableState instanceof a}})):C=function(e){return e instanceof this},o.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},o.prototype.write=function(e,t,r){var n=this._writableState,i=!1,a=function(e){return E.isBuffer(e)||e instanceof A}(e)&&!n.objectMode;return a&&!E.isBuffer(e)&&(e=function(e){return E.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=n.defaultEncoding),"function"!=typeof r&&(r=s),n.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),m(t,r)}(this,r):(a||function(e,t,r,n){var i=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),m(n,s),i=!1),i}(this,n,e,r))&&(n.pendingcb++,i=u(this,n,a,e,t,r)),i},o.prototype.cork=function(){this._writableState.corked++},o.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||p(this,e))},o.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},o.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},o.prototype._writev=null,o.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,d(e,t),r&&(t.finished?m(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(o.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),o.prototype.destroy=D.destroy,o.prototype._undestroy=D.undestroy,o.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":552,"./internal/streams/destroy":558,"./internal/streams/stream":559,_process:550,"core-util-is":308,inherits:317,"process-nextick-args":549,"safe-buffer":602,"util-deprecate":610}],557:[function(e,t,r){"use strict";function n(e,t,r){e.copy(t,r)}var i=e("safe-buffer").Buffer;t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var t=i.allocUnsafe(e>>>0),r=this.head,s=0;r;)n(r.data,t,s),s+=r.data.length,r=r.next;return t},e}()},{"safe-buffer":602}],558:[function(e,t,r){"use strict";function n(e,t){e.emit("error",t)}var i=e("process-nextick-args");t.exports={destroy:function(e,t){var r=this,s=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;s||a?t?t(e):!e||this._writableState&&this._writableState.errorEmitted||i(n,this,e):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(i(n,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)}))},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":549}],559:[function(e,t,r){t.exports=e("events").EventEmitter},{events:311}],560:[function(e,t,r){t.exports=e("./readable").PassThrough},{"./readable":561}],561:[function(e,t,r){(r=t.exports=e("./lib/_stream_readable.js")).Stream=r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":552,"./lib/_stream_passthrough.js":553,"./lib/_stream_readable.js":554,"./lib/_stream_transform.js":555,"./lib/_stream_writable.js":556}],562:[function(e,t,r){t.exports=e("./readable").Transform},{"./readable":561}],563:[function(e,t,r){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":556}],564:[function(e,t,r){function n(e,t,r){if(e){if(g.fixFaultyLocations(e,t),r){if(p.Node.check(e)&&p.SourceLocation.check(e.loc)){for(s=r.length-1;s>=0&&!(b(r[s].loc.end,e.loc.start)<=0);--s);return void r.splice(s+1,0,e)}}else if(e[v])return e[v];var i;if(h.check(e))i=Object.keys(e);else{if(!f.check(e))return;i=c.getFieldNames(e)}r||Object.defineProperty(e,v,{value:r=[],enumerable:!1});for(var s=0,a=i.length;s<a;++s)n(e[i[s]],t,r);return r}}function i(e,t,r){for(var s=n(e,r),a=0,o=s.length;a<o;){var u=a+o>>1,l=s[u];if(b(l.loc.start,t.loc.start)<=0&&b(t.loc.end,l.loc.end)<=0)return void i(t.enclosingNode=l,t,r);if(b(l.loc.end,t.loc.start)<=0){var c=l;a=u+1}else{if(!(b(t.loc.end,l.loc.start)<=0))throw new Error("Comment location overlaps with node location");var p=l;o=u}}c&&(t.precedingNode=c),p&&(t.followingNode=p)}function s(e,t){var r=e.length;if(0!==r){for(var n=e[0].precedingNode,i=e[0].followingNode,s=i.loc.start,a=r;a>0;--a){var c=e[a-1];l.strictEqual(c.precedingNode,n),l.strictEqual(c.followingNode,i);var p=t.sliceString(c.loc.end,s);if(/\S/.test(p))break;s=c.loc.start}for(;a<=r&&(c=e[a])&&("Line"===c.type||"CommentLine"===c.type)&&c.loc.start.column>i.loc.start.column;)++a;e.forEach(function(e,t){t<a?u(n,e):o(i,e)}),e.length=0}}function a(e,t){(e.comments||(e.comments=[])).push(t)}function o(e,t){t.leading=!0,t.trailing=!1,a(e,t)}function u(e,t){t.leading=!1,t.trailing=!0,a(e,t)}var l=e("assert"),c=e("./types"),p=c.namedTypes,h=c.builtInTypes.array,f=c.builtInTypes.object,d=e("./lines"),m=(d.fromString,d.Lines),y=d.concat,g=e("./util"),b=g.comparePos,v=e("private").makeUniqueKey();r.attach=function(e,t,r){if(h.check(e)){var n=[];e.forEach(function(e){e.loc.lines=r,i(t,e,r);var c=e.precedingNode,p=e.enclosingNode,h=e.followingNode;if(c&&h){var f=n.length;if(f>0){var d=n[f-1];l.strictEqual(d.precedingNode===e.precedingNode,d.followingNode===e.followingNode),d.followingNode!==e.followingNode&&s(n,r)}n.push(e)}else if(c)s(n,r),u(c,e);else if(h)s(n,r),o(h,e);else{if(!p)throw new Error("AST contains no nodes at all?");s(n,r),function(e,t){t.leading=!1,t.trailing=!1,a(e,t)}(p,e)}}),s(n,r),e.forEach(function(e){delete e.precedingNode,delete e.enclosingNode,delete e.followingNode})}},r.printComments=function(e,t){var r=e.getValue(),n=t(e),i=p.Node.check(r)&&c.getFieldValue(r,"comments");if(!i||0===i.length)return n;var s=[],a=[n];return e.each(function(e){var n=e.getValue(),i=c.getFieldValue(n,"leading"),o=c.getFieldValue(n,"trailing");i||o&&!p.Statement.check(r)&&"Block"!==n.type&&"CommentBlock"!==n.type?s.push(function(e,t){var r=e.getValue();p.Comment.assert(r);var n=r.loc,i=n&&n.lines,s=[t(e)];if(r.trailing)s.push("\n");else if(i instanceof m){var a=i.slice(n.end,i.skipSpaces(n.end));1===a.length?s.push(a):s.push(new Array(a.length).join("\n"))}else s.push("\n");return y(s)}(e,t)):o&&a.push(function(e,t){var r=e.getValue(e);p.Comment.assert(r);var n=r.loc,i=n&&n.lines,s=[];if(i instanceof m){var a=i.skipSpaces(n.start,!0)||i.firstPos(),o=i.slice(a,n.start);1===o.length?s.push(o):s.push(new Array(o.length).join("\n"))}return s.push(t(e)),y(s)}(e,t))},"comments"),s.push.apply(s,a),y(s)}},{"./lines":566,"./types":572,"./util":573,assert:1,private:548}],565:[function(e,t,r){function n(e){o.ok(this instanceof n),this.stack=[e]}function i(e,t){for(var r=e.stack,n=r.length-1;n>=0;n-=2){var i=r[n];if(l.Node.check(i)&&--t<0)return i}return null}function s(e){return l.BinaryExpression.check(e)||l.LogicalExpression.check(e)}function a(e){return!!l.CallExpression.check(e)||(c.check(e)?e.some(a):!!l.Node.check(e)&&u.someField(e,function(e,t){return a(t)}))}var o=e("assert"),u=e("./types"),l=u.namedTypes,c=(l.Node,u.builtInTypes.array),p=u.builtInTypes.number,h=n.prototype;t.exports=n,n.from=function(e){if(e instanceof n)return e.copy();if(e instanceof u.NodePath){for(var t,r=Object.create(n.prototype),i=[e.value];t=e.parentPath;e=t)i.push(e.name,t.value);return r.stack=i.reverse(),r}return new n(e)},h.copy=function(){var e=Object.create(n.prototype);return e.stack=this.stack.slice(0),e},h.getName=function(){var e=this.stack,t=e.length;return t>1?e[t-2]:null},h.getValue=function(){var e=this.stack;return e[e.length-1]},h.getNode=function(e){return i(this,~~e)},h.getParentNode=function(e){return i(this,1+~~e)},h.getRootValue=function(){var e=this.stack;return e.length%2==0?e[1]:e[0]},h.call=function(e){for(var t=this.stack,r=t.length,n=t[r-1],i=arguments.length,s=1;s<i;++s){var a=arguments[s];n=n[a],t.push(a,n)}var o=e(this);return t.length=r,o},h.each=function(e){for(var t=this.stack,r=t.length,n=t[r-1],i=arguments.length,s=1;s<i;++s){var a=arguments[s];n=n[a],t.push(a,n)}for(s=0;s<n.length;++s)s in n&&(t.push(s,n[s]),e(this),t.length-=2);t.length=r},h.map=function(e){for(var t=this.stack,r=t.length,n=t[r-1],i=arguments.length,s=1;s<i;++s){var a=arguments[s];n=n[a],t.push(a,n)}for(var o=new Array(n.length),s=0;s<n.length;++s)s in n&&(t.push(s,n[s]),o[s]=e(this,s),t.length-=2);return t.length=r,o},h.needsParens=function(e){var t=this.getParentNode();if(!t)return!1;var r=this.getName(),n=this.getNode();if(this.getValue()!==n)return!1;if(l.Statement.check(n))return!1;if("Identifier"===n.type)return!1;if("ParenthesizedExpression"===t.type)return!1;switch(n.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return"MemberExpression"===t.type&&"object"===r&&t.object===n;case"BinaryExpression":case"LogicalExpression":switch(t.type){case"CallExpression":return"callee"===r&&t.callee===n;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return!0;case"MemberExpression":return"object"===r&&t.object===n;case"BinaryExpression":case"LogicalExpression":var i=t.operator,u=f[i],c=n.operator,h=f[c];if(u>h)return!0;if(u===h&&"right"===r)return o.strictEqual(t.right,n),!0;default:return!1}case"SequenceExpression":switch(t.type){case"ReturnStatement":case"ForStatement":return!1;case"ExpressionStatement":return"expression"!==r;default:return!0}case"YieldExpression":switch(t.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return!0;default:return!1}case"IntersectionTypeAnnotation":case"UnionTypeAnnotation":return"NullableTypeAnnotation"===t.type;case"Literal":return"MemberExpression"===t.type&&p.check(n.value)&&"object"===r&&t.object===n;case"AssignmentExpression":case"ConditionalExpression":switch(t.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":return"callee"===r&&t.callee===n;case"ConditionalExpression":return"test"===r&&t.test===n;case"MemberExpression":return"object"===r&&t.object===n;default:return!1}case"ArrowFunctionExpression":return!(!l.CallExpression.check(t)||"callee"!==r)||(!(!l.MemberExpression.check(t)||"object"!==r)||s(t));case"ObjectExpression":if("ArrowFunctionExpression"===t.type&&"body"===r)return!0;default:if("NewExpression"===t.type&&"callee"===r&&t.callee===n)return a(n)}return!(!0===e||this.canBeFirstInStatement()||!this.firstInStatement())};var f={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%","**"]].forEach(function(e,t){e.forEach(function(e){f[e]=t})}),h.canBeFirstInStatement=function(){var e=this.getNode();return!l.FunctionExpression.check(e)&&!l.ObjectExpression.check(e)},h.firstInStatement=function(){for(var e,t,r,n,i=this.stack,a=i.length-1;a>=0;a-=2)if(l.Node.check(i[a])&&(r=e,n=t,e=i[a-1],t=i[a]),t&&n){if(l.BlockStatement.check(t)&&"body"===e&&0===r)return o.strictEqual(t.body[0],n),!0;if(l.ExpressionStatement.check(t)&&"expression"===r)return o.strictEqual(t.expression,n),!0;if(l.SequenceExpression.check(t)&&"expressions"===e&&0===r)o.strictEqual(t.expressions[0],n);else if(l.CallExpression.check(t)&&"callee"===r)o.strictEqual(t.callee,n);else if(l.MemberExpression.check(t)&&"object"===r)o.strictEqual(t.object,n);else if(l.ConditionalExpression.check(t)&&"test"===r)o.strictEqual(t.test,n);else if(s(t)&&"left"===r)o.strictEqual(t.left,n);else{if(!l.UnaryExpression.check(t)||t.prefix||"argument"!==r)return!1;o.strictEqual(t.argument,n)}}return!0}},{"./types":572,assert:1}],566:[function(e,t,r){function n(e){return e[f]}function i(e,t){c.ok(this instanceof i),c.ok(e.length>0),t?d.assert(t):t=null,Object.defineProperty(this,f,{value:{infos:e,mappings:[],name:t,cachedSourceMap:null}}),t&&n(this).mappings.push(new y(this,{start:this.firstPos(),end:this.lastPos()}))}function s(e){return{line:e.line,indent:e.indent,locked:e.locked,sliceStart:e.sliceStart,sliceEnd:e.sliceEnd}}function a(e,t){for(var r=0,n=e.length,i=0;i<n;++i)switch(e.charCodeAt(i)){case 9:c.strictEqual(typeof t,"number"),c.ok(t>0);var s=Math.ceil(r/t)*t;s===r?r+=t:r=s;break;case 11:case 12:case 13:case 65279:break;case 32:default:r+=1}return r}function o(e,t){if(e instanceof i)return e;e+="";var r=t&&t.tabWidth,n=e.indexOf("\t")<0,s=!(!t||!t.locked),o=!t&&n&&e.length<=x;if(c.ok(r||n,"No tab width specified but encountered tabs in string\n"+e),o&&v.call(b,e))return b[e];var u=new i(e.split(A).map(function(e){var t=E.exec(e)[0];return{line:e,indent:a(t,r),locked:s,sliceStart:t.length,sliceEnd:e.length}}),h(t).sourceFileName);return o&&(b[e]=u),u}function u(e){return!/\S/.test(e)}function l(e,t,r){var n=e.sliceStart,i=e.sliceEnd,s=Math.max(e.indent,0),a=s+i-n;return void 0===r&&(r=a),t=Math.max(t,0),r=Math.min(r,a),(r=Math.max(r,t))<s?(s=r,i=n):i-=a-r,a=r,a-=t,t<s?s-=t:(t-=s,s=0,n+=t),c.ok(s>=0),c.ok(n<=i),c.strictEqual(a,s+i-n),e.indent===s&&e.sliceStart===n&&e.sliceEnd===i?e:{line:e.line,indent:s,locked:!1,sliceStart:n,sliceEnd:i}}var c=e("assert"),p=e("source-map"),h=e("./options").normalize,f=e("private").makeUniqueKey(),d=e("./types").builtInTypes.string,m=e("./util").comparePos,y=e("./mapping");r.Lines=i;var g=i.prototype;Object.defineProperties(g,{length:{get:function(){return n(this).infos.length}},name:{get:function(){return n(this).name}}});var b={},v=b.hasOwnProperty,x=10;r.countSpaces=a;var E=/^\s*/,A=/\u000D\u000A|\u000D(?!\u000A)|\u000A|\u2028|\u2029/;r.fromString=o,g.toString=function(e){return this.sliceString(this.firstPos(),this.lastPos(),e)},g.getSourceMap=function(e,t){function r(r){return r=r||{},d.assert(e),r.file=e,t&&(d.assert(t),r.sourceRoot=t),r}if(!e)return null;var i=this,s=n(i);if(s.cachedSourceMap)return r(s.cachedSourceMap.toJSON());var a=new p.SourceMapGenerator(r()),o={};return s.mappings.forEach(function(e){for(var t=e.sourceLines.skipSpaces(e.sourceLoc.start)||e.sourceLines.lastPos(),r=i.skipSpaces(e.targetLoc.start)||i.lastPos();m(t,e.sourceLoc.end)<0&&m(r,e.targetLoc.end)<0;){var n=e.sourceLines.charAt(t),s=i.charAt(r);c.strictEqual(n,s);var u=e.sourceLines.name;if(a.addMapping({source:u,original:{line:t.line,column:t.column},generated:{line:r.line,column:r.column}}),!v.call(o,u)){var l=e.sourceLines.toString();a.setSourceContent(u,l),o[u]=l}i.nextPos(r,!0),e.sourceLines.nextPos(t,!0)}}),s.cachedSourceMap=a,a.toJSON()},g.bootstrapCharAt=function(e){c.strictEqual(typeof e,"object"),c.strictEqual(typeof e.line,"number"),c.strictEqual(typeof e.column,"number");var t=e.line,r=e.column,n=this.toString().split(A),i=n[t-1];return void 0===i?"":r===i.length&&t<n.length?"\n":r>=i.length?"":i.charAt(r)},g.charAt=function(e){c.strictEqual(typeof e,"object"),c.strictEqual(typeof e.line,"number"),c.strictEqual(typeof e.column,"number");var t=e.line,r=e.column,i=n(this).infos[t-1],s=r;if(void 0===i||s<0)return"";var a=this.getIndentAt(t);return s<a?" ":(s+=i.sliceStart-a)===i.sliceEnd&&t<this.length?"\n":s>=i.sliceEnd?"":i.line.charAt(s)},g.stripMargin=function(e,t){if(0===e)return this;if(c.ok(e>0,"negative margin: "+e),t&&1===this.length)return this;var r=n(this),a=new i(r.infos.map(function(r,n){return r.line&&(n>0||!t)&&((r=s(r)).indent=Math.max(0,r.indent-e)),r}));if(r.mappings.length>0){var o=n(a).mappings;c.strictEqual(o.length,0),r.mappings.forEach(function(r){o.push(r.indent(e,t,!0))})}return a},g.indent=function(e){if(0===e)return this;var t=n(this),r=new i(t.infos.map(function(t){return t.line&&!t.locked&&((t=s(t)).indent+=e),t}));if(t.mappings.length>0){var a=n(r).mappings;c.strictEqual(a.length,0),t.mappings.forEach(function(t){a.push(t.indent(e))})}return r},g.indentTail=function(e){if(0===e)return this;if(this.length<2)return this;var t=n(this),r=new i(t.infos.map(function(t,r){return r>0&&t.line&&!t.locked&&((t=s(t)).indent+=e),t}));if(t.mappings.length>0){var a=n(r).mappings;c.strictEqual(a.length,0),t.mappings.forEach(function(t){a.push(t.indent(e,!0))})}return r},g.lockIndentTail=function(){if(this.length<2)return this;return new i(n(this).infos.map(function(e,t){return e=s(e),e.locked=t>0,e}))},g.getIndentAt=function(e){c.ok(e>=1,"no line "+e+" (line numbers start from 1)");var t=n(this).infos[e-1];return Math.max(t.indent,0)},g.guessTabWidth=function(){var e=n(this);if(v.call(e,"cachedTabWidth"))return e.cachedTabWidth;for(var t=[],r=0,i=1,s=this.length;i<=s;++i){var a=e.infos[i-1];if(!u(a.line.slice(a.sliceStart,a.sliceEnd))){var o=Math.abs(a.indent-r);t[o]=1+~~t[o],r=a.indent}}for(var l=-1,c=2,p=1;p<t.length;p+=1)v.call(t,p)&&t[p]>l&&(l=t[p],c=p);return e.cachedTabWidth=c},g.startsWithComment=function(){var e=n(this);if(0===e.infos.length)return!1;var t=e.infos[0],r=t.sliceStart,i=t.sliceEnd,s=t.line.slice(r,i).trim();return 0===s.length||"//"===s.slice(0,2)||"/*"===s.slice(0,2)},g.isOnlyWhitespace=function(){return u(this.toString())},g.isPrecededOnlyByWhitespace=function(e){var t=n(this).infos[e.line-1],r=Math.max(t.indent,0),i=e.column-r;if(i<=0)return!0;var s=t.sliceStart,a=Math.min(s+i,t.sliceEnd);return u(t.line.slice(s,a))},g.getLineLength=function(e){var t=n(this).infos[e-1];return this.getIndentAt(e)+t.sliceEnd-t.sliceStart},g.nextPos=function(e,t){var r=Math.max(e.line,0);return Math.max(e.column,0)<this.getLineLength(r)?(e.column+=1,!t||!!this.skipSpaces(e,!1,!0)):r<this.length&&(e.line+=1,e.column=0,!t||!!this.skipSpaces(e,!1,!0))},g.prevPos=function(e,t){var r=e.line,n=e.column;if(n<1){if((r-=1)<1)return!1;n=this.getLineLength(r)}else n=Math.min(n-1,this.getLineLength(r));return e.line=r,e.column=n,!t||!!this.skipSpaces(e,!0,!0)},g.firstPos=function(){return{line:1,column:0}},g.lastPos=function(){return{line:this.length,column:this.getLineLength(this.length)}},g.skipSpaces=function(e,t,r){if(e=e?r?e:{line:e.line,column:e.column}:t?this.lastPos():this.firstPos(),t){for(;this.prevPos(e);)if(!u(this.charAt(e))&&this.nextPos(e))return e;return null}for(;u(this.charAt(e));)if(!this.nextPos(e))return null;return e},g.trimLeft=function(){var e=this.skipSpaces(this.firstPos(),!1,!0);return e?this.slice(e):D},g.trimRight=function(){var e=this.skipSpaces(this.lastPos(),!0,!0);return e?this.slice(this.firstPos(),e):D},g.trim=function(){var e=this.skipSpaces(this.firstPos(),!1,!0);if(null===e)return D;var t=this.skipSpaces(this.lastPos(),!0,!0);return c.notStrictEqual(t,null),this.slice(e,t)},g.eachPos=function(e,t,r){var n=this.firstPos();if(t&&(n.line=t.line,n.column=t.column),!r||this.skipSpaces(n,!1,!0))do{e.call(this,n)}while(this.nextPos(n,r))},g.bootstrapSlice=function(e,t){var r=this.toString().split(A).slice(e.line-1,t.line);return r.push(r.pop().slice(0,t.column)),r[0]=r[0].slice(e.column),o(r.join("\n"))},g.slice=function(e,t){if(!t){if(!e)return this;t=this.lastPos()}var r=n(this),s=r.infos.slice(e.line-1,t.line);e.line===t.line?s[0]=l(s[0],e.column,t.column):(c.ok(e.line<t.line),s[0]=l(s[0],e.column),s.push(l(s.pop(),0,t.column)));var a=new i(s);if(r.mappings.length>0){var o=n(a).mappings;c.strictEqual(o.length,0),r.mappings.forEach(function(r){var n=r.slice(this,e,t);n&&o.push(n)},this)}return a},g.bootstrapSliceString=function(e,t,r){return this.slice(e,t).toString(r)},g.sliceString=function(e,t,r){if(!t){if(!e)return this;t=this.lastPos()}r=h(r);for(var i=n(this).infos,s=[],o=r.tabWidth,c=e.line;c<=t.line;++c){var p=i[c-1];c===e.line?p=c===t.line?l(p,e.column,t.column):l(p,e.column):c===t.line&&(p=l(p,0,t.column));var f=Math.max(p.indent,0),d=p.line.slice(0,p.sliceStart);if(r.reuseWhitespace&&u(d)&&a(d,r.tabWidth)===f)s.push(p.line.slice(0,p.sliceEnd));else{var m=0,y=f;r.useTabs&&(y-=(m=Math.floor(f/o))*o);var g="";m>0&&(g+=new Array(m+1).join("\t")),y>0&&(g+=new Array(y+1).join(" ")),g+=p.line.slice(p.sliceStart,p.sliceEnd),s.push(g)}}return s.join(r.lineTerminator)},g.isEmpty=function(){return this.length<2&&this.getLineLength(1)<1},g.join=function(e){function t(e){if(null!==e){if(r){var t=e.infos[0],n=new Array(t.indent+1).join(" "),i=u.length,a=Math.max(r.indent,0)+r.sliceEnd-r.sliceStart;r.line=r.line.slice(0,r.sliceEnd)+n+t.line.slice(t.sliceStart,t.sliceEnd),r.locked=r.locked||t.locked,r.sliceEnd=r.line.length,e.mappings.length>0&&e.mappings.forEach(function(e){l.push(e.add(i,a))})}else e.mappings.length>0&&l.push.apply(l,e.mappings);e.infos.forEach(function(e,t){(!r||t>0)&&(r=s(e),u.push(r))})}}var r,a=n(this),u=[],l=[];if(e.map(function(e){var t=o(e);return t.isEmpty()?null:n(t)}).forEach(this.isEmpty()?t:function(e,r){r>0&&t(a),t(e)}),u.length<1)return D;var c=new i(u);return n(c).mappings=l,c},r.concat=function(e){return D.join(e)},g.concat=function(e){var t=arguments,r=[this];return r.push.apply(r,t),c.strictEqual(r.length,t.length+1),D.join(r)};var D=o("")},{"./mapping":567,"./options":568,"./types":572,"./util":573,assert:1,private:548,"source-map":586}],567:[function(e,t,r){function n(e,t,r){a.ok(this instanceof n),a.ok(e instanceof p.Lines),l.assert(t),r?a.ok(u.check(r.start.line)&&u.check(r.start.column)&&u.check(r.end.line)&&u.check(r.end.column)):r=t,Object.defineProperties(this,{sourceLines:{value:e},sourceLoc:{value:t},targetLoc:{value:r}})}function i(e,t,r){return{line:e.line+t-1,column:1===e.line?e.column+r:e.column}}function s(e,t,r){return{line:e.line-t+1,column:e.line===t?e.column-r:e.column}}var a=e("assert"),o=e("./types"),u=(o.builtInTypes.string,o.builtInTypes.number),l=o.namedTypes.SourceLocation,c=o.namedTypes.Position,p=e("./lines"),h=e("./util").comparePos,f=n.prototype;t.exports=n,f.slice=function(e,t,r){function i(n){var i=u[n],s=l[n],f=t;return"end"===n?f=r:a.strictEqual(n,"start"),function(e,t,r,n,i){a.ok(e instanceof p.Lines),a.ok(r instanceof p.Lines),c.assert(t),c.assert(n),c.assert(i);var s=h(n,i);if(0===s)return t;if(s<0){var o=e.skipSpaces(t),u=r.skipSpaces(n),l=i.line-u.line;for(o.line+=l,u.line+=l,l>0?(o.column=0,u.column=0):a.strictEqual(l,0);h(u,i)<0&&r.nextPos(u,!0);)a.ok(e.nextPos(o,!0)),a.strictEqual(e.charAt(o),r.charAt(u))}else{var o=e.skipSpaces(t,!0),u=r.skipSpaces(n,!0),l=i.line-u.line;for(o.line+=l,u.line+=l,l<0?(o.column=e.getLineLength(o.line),u.column=r.getLineLength(u.line)):a.strictEqual(l,0);h(i,u)<0&&r.prevPos(u,!0);)a.ok(e.prevPos(o,!0)),a.strictEqual(e.charAt(o),r.charAt(u))}return o}(o,i,e,s,f)}a.ok(e instanceof p.Lines),c.assert(t),r?c.assert(r):r=e.lastPos();var o=this.sourceLines,u=this.sourceLoc,l=this.targetLoc;if(h(t,l.start)<=0)if(h(l.end,r)<=0)l={start:s(l.start,t.line,t.column),end:s(l.end,t.line,t.column)};else{if(h(r,l.start)<=0)return null;u={start:u.start,end:i("end")},l={start:s(l.start,t.line,t.column),end:s(r,t.line,t.column)}}else{if(h(l.end,t)<=0)return null;h(l.end,r)<=0?(u={start:i("start"),end:u.end},l={start:{line:1,column:0},end:s(l.end,t.line,t.column)}):(u={start:i("start"),end:i("end")},l={start:{line:1,column:0},end:s(r,t.line,t.column)})}return new n(this.sourceLines,u,l)},f.add=function(e,t){return new n(this.sourceLines,this.sourceLoc,{start:i(this.targetLoc.start,e,t),end:i(this.targetLoc.end,e,t)})},f.subtract=function(e,t){return new n(this.sourceLines,this.sourceLoc,{start:s(this.targetLoc.start,e,t),end:s(this.targetLoc.end,e,t)})},f.indent=function(e,t,r){if(0===e)return this;var i=this.targetLoc,s=i.start.line,a=i.end.line;if(t&&1===s&&1===a)return this;if(i={start:i.start,end:i.end},!t||s>1){var o=i.start.column+e;i.start={line:s,column:r?Math.max(0,o):o}}if(!t||a>1){var u=i.end.column+e;i.end={line:a,column:r?Math.max(0,u):u}}return new n(this.sourceLines,this.sourceLoc,i)}},{"./lines":566,"./types":572,"./util":573,assert:1}],568:[function(e,t,r){var n={parser:e("esprima"),tabWidth:4,useTabs:!1,reuseWhitespace:!0,lineTerminator:e("os").EOL,wrapColumn:74,sourceFileName:null,sourceMapName:null,sourceRoot:null,inputSourceMap:null,range:!1,tolerant:!0,quote:null,trailingComma:!1,arrayBracketSpacing:!1,objectCurlySpacing:!0,arrowParensAlways:!1,flowObjectCommas:!0},i=n.hasOwnProperty;r.normalize=function(e){function t(t){return i.call(e,t)?e[t]:n[t]}return e=e||n,{tabWidth:+t("tabWidth"),useTabs:!!t("useTabs"),reuseWhitespace:!!t("reuseWhitespace"),lineTerminator:t("lineTerminator"),wrapColumn:Math.max(t("wrapColumn"),0),sourceFileName:t("sourceFileName"),sourceMapName:t("sourceMapName"),sourceRoot:t("sourceRoot"),inputSourceMap:t("inputSourceMap"),parser:t("esprima")||t("parser"),range:t("range"),tolerant:t("tolerant"),quote:t("quote"),trailingComma:t("trailingComma"),arrayBracketSpacing:t("arrayBracketSpacing"),objectCurlySpacing:t("objectCurlySpacing"),arrowParensAlways:t("arrowParensAlways"),flowObjectCommas:t("flowObjectCommas")}}},{esprima:575,os:545}],569:[function(e,t,r){function n(e){i.ok(this instanceof n),this.lines=e,this.indent=0}var i=e("assert"),s=e("./types"),a=(s.namedTypes,s.builders),o=s.builtInTypes.object,u=s.builtInTypes.array,l=(s.builtInTypes.function,e("./patcher").Patcher,e("./options").normalize),c=e("./lines").fromString,p=e("./comments").attach,h=e("./util");r.parse=function(e,t){t=l(t);var r=c(e,t),i=r.toString({tabWidth:t.tabWidth,reuseWhitespace:!1,useTabs:!1}),s=[],o=t.parser.parse(i,{jsx:!0,loc:!0,locations:!0,range:t.range,comment:!0,onComment:s,tolerant:t.tolerant,ecmaVersion:6,sourceType:"module"});h.fixFaultyLocations(o,r),o.loc=o.loc||{start:r.firstPos(),end:r.lastPos()},o.loc.lines=r,o.loc.indent=0;var u=h.getTrueLoc(o,r);o.loc.start=u.start,o.loc.end=u.end,o.comments&&(s=o.comments,delete o.comments);f=o;if("Program"===f.type){var f;(f=a.file(o,t.sourceFileName||null)).loc={lines:r,indent:0,start:r.firstPos(),end:r.lastPos()}}else"File"===f.type&&(o=f.program);return p(s,o.body.length?f.program:f,r),new n(r).copy(f)};n.prototype.copy=function(e){if(u.check(e))return e.map(this.copy,this);if(!o.check(e))return e;h.fixFaultyLocations(e,this.lines);var t=Object.create(Object.getPrototypeOf(e),{original:{value:e,configurable:!1,enumerable:!1,writable:!0}}),r=e.loc,n=this.indent,i=n;r&&(("Block"===e.type||"Line"===e.type||"CommentBlock"===e.type||"CommentLine"===e.type||this.lines.isPrecededOnlyByWhitespace(r.start))&&(i=this.indent=r.start.column),r.lines=this.lines,r.indent=i);for(var s=Object.keys(e),a=s.length,l=0;l<a;++l){var c=s[l];"loc"===c?t[c]=e[c]:"tokens"===c&&"File"===e.type?t[c]=e[c]:t[c]=this.copy(e[c])}return this.indent=n,t}},{"./comments":564,"./lines":566,"./options":568,"./patcher":570,"./types":572,"./util":573,assert:1}],570:[function(e,t,r){function n(e){c.ok(this instanceof n),c.ok(e instanceof p.Lines);var t=[];this.replace=function(e,r){A.check(r)&&(r=p.fromString(r)),t.push({lines:r,start:e.start,end:e.end})},this.get=function(r){function n(t,r){c.ok(b(t,r)<=0),s.push(e.slice(t,r))}var i=(r=r||{start:{line:1,column:0},end:{line:e.length,column:e.getLineLength(e.length)}}).start,s=[];return t.sort(function(e,t){return b(e.start,t.start)}).forEach(function(e){b(i,e.start)>0||(n(i,e.start),s.push(e.lines),i=e.end)}),n(i,r.end),p.concat(s)}}function i(e){var t=[];return e.comments&&e.comments.length>0&&e.comments.forEach(function(e){(e.leading||e.trailing)&&t.push(e)}),t}function s(e,t,r){var n=e.getValue();return n===t.getValue()||(E.check(n)?a(e,t,r):!!x.check(n)&&function(e,t,r){var n=e.getValue();if(x.assert(n),null===n.original)return!1;var i=t.getValue();if(!x.check(i))return!1;if(f.check(n)){if(!f.check(i))return!1;if(n.type===i.type){var s=[];if(l(e,t,s))r.push.apply(r,s);else{if(!i.loc)return!1;r.push({oldPath:t.copy(),newPath:e.copy()})}return!0}return!!(d.check(n)&&d.check(i)&&i.loc)&&(r.push({oldPath:t.copy(),newPath:e.copy()}),!0)}return l(e,t,r)}(e,t,r))}function a(e,t,r){var n=e.getValue(),i=t.getValue();E.assert(n);var a=n.length;if(!E.check(i)||i.length!==a)return!1;for(var o=0;o<a;++o){e.stack.push(o,n[o]),t.stack.push(o,i[o]);var u=s(e,t,r);if(e.stack.length-=2,t.stack.length-=2,!u)return!1}return!0}function o(e){var t=e.getValue().loc,r=t&&t.lines;if(r){var n=S;for(n.line=t.start.line,n.column=t.start.column;r.prevPos(n);){var i=r.charAt(n);if("("===i)return b(e.getRootValue().loc.start,n)<=0;if(_.test(i))return!1}}return!1}function u(e){return o(e)&&function(e){var t=e.getValue().loc,r=t&&t.lines;if(r){var n=S;n.line=t.end.line,n.column=t.end.column;do{var i=r.charAt(n);if(")"===i)return b(n,e.getRootValue().loc.end)<=0;if(_.test(i))return!1}while(r.nextPos(n))}return!1}(e)}function l(e,t,r){var n=e.getValue(),i=t.getValue();if(x.assert(n),x.assert(i),null===n.original)return!1;if(!e.canBeFirstInStatement()&&e.firstInStatement()&&!o(t))return!1;if(e.needsParens(!0)&&!u(t))return!1;var a=g.getUnionOfKeys(i,n);"File"!==i.type&&"File"!==n.type||delete a.tokens,delete a.loc;var l=r.length;for(var c in a){e.stack.push(c,h.getFieldValue(n,c)),t.stack.push(c,h.getFieldValue(i,c));var p=s(e,t,r);if(e.stack.length-=2,t.stack.length-=2,!p)return!1}return!(m.check(e.getNode())&&r.length>l)}var c=e("assert"),p=e("./lines"),h=e("./types"),f=(h.getFieldValue,h.namedTypes.Printable),d=h.namedTypes.Expression,m=h.namedTypes.ReturnStatement,y=h.namedTypes.SourceLocation,g=e("./util"),b=g.comparePos,v=e("./fast-path"),x=h.builtInTypes.object,E=h.builtInTypes.array,A=h.builtInTypes.string,D=/[0-9a-z_$]/i;r.Patcher=n;var C=n.prototype;C.tryToReprintComments=function(e,t,r){var n=this;if(!e.comments&&!t.comments)return!0;var s=v.from(e),o=v.from(t);s.stack.push("comments",i(e)),o.stack.push("comments",i(t));var u=[],l=a(s,o,u);return l&&u.length>0&&u.forEach(function(e){var t=e.oldPath.getValue();c.ok(t.leading||t.trailing),n.replace(t.loc,r(e.newPath).indentTail(t.loc.indent))}),l},C.deleteComments=function(e){if(e.comments){var t=this;e.comments.forEach(function(r){r.leading?t.replace({start:r.loc.start,end:e.loc.lines.skipSpaces(r.loc.end,!1,!1)},""):r.trailing&&t.replace({start:e.loc.lines.skipSpaces(r.loc.start,!0,!1),end:r.loc.end},"")})}},r.getReprinter=function(e){c.ok(e instanceof v);var t=e.getValue();if(f.check(t)){var r=t.original,i=r&&r.loc,s=i&&i.lines,a=[];if(s&&function(e,t){var r=e.getValue();f.assert(r);var n=r.original;if(f.assert(n),c.deepEqual(t,[]),r.type!==n.type)return!1;var i=l(e,new v(n),t);return i||(t.length=0),i}(e,a))return function(e){var t=new n(s);return a.forEach(function(r){var n=r.newPath.getValue(),i=r.oldPath.getValue();y.assert(i.loc,!0);var a=!t.tryToReprintComments(n,i,e);a&&t.deleteComments(i);var o=e(r.newPath,a).indentTail(i.loc.indent),u=function(e,t,r){var n=g.copyPos(t.start),i=e.prevPos(n)&&e.charAt(n),s=r.charAt(r.firstPos());return i&&D.test(i)&&s&&D.test(s)}(s,i.loc,o),l=function(e,t,r){var n=e.charAt(t.end),i=r.lastPos(),s=r.prevPos(i)&&r.charAt(i);return s&&D.test(s)&&n&&D.test(n)}(s,i.loc,o);if(u||l){var c=[];u&&c.push(" "),c.push(o),l&&c.push(" "),o=p.concat(c)}t.replace(i.loc,o)}),t.get(i).indentTail(-r.loc.indent)}}};var S={line:1,column:0},_=/\S/},{"./fast-path":565,"./lines":566,"./types":572,"./util":573,assert:1}],571:[function(e,t,r){function n(e,t){v.ok(this instanceof n),k.assert(e),this.code=e,t&&(F.assert(t),this.map=t)}function i(e){function t(e){return v.ok(e instanceof T),x(e,r)}function r(e,r){if(r)return t(e);if(v.ok(e instanceof T),!l){var n=c.tabWidth,i=e.getNode().loc;if(i&&i.lines&&i.lines.guessTabWidth){c.tabWidth=i.lines.guessTabWidth();var s=a(e);return c.tabWidth=n,s}}return a(e)}function a(e){var t=S(e);return t?function(e,t){return e.needsParens()?D(["(",t,")"]):t}(e,t(r)):o(e)}function o(e,r){return r?x(e,o):s(e,c,t)}function u(e){return s(e,c,u)}v.ok(this instanceof i);var l=e&&e.tabWidth,c=C(e);v.notStrictEqual(c,e),c.sourceFileName=null,this.print=function(e){if(!e)return O;var t=r(T.from(e),!0);return new n(t.toString(c),P.composeSourceMaps(c.inputSourceMap,t.getSourceMap(c.sourceMapName,c.sourceRoot)))},this.printGenerically=function(e){if(!e)return O;var t=T.from(e),r=c.reuseWhitespace;c.reuseWhitespace=!1;var i=new n(u(t).toString(c));return c.reuseWhitespace=r,i}}function s(e,t,r){v.ok(e instanceof T);var n=e.getValue(),i=[],s=!1,m=function(e,t,r){var n=e.getValue();if(!n)return A("");if("string"==typeof n)return A(n,t);w.Printable.assert(n);R=[];switch(n.type){case"File":return e.call(r,"program");case"Program":return n.directives&&e.each(function(e){R.push(r(e),";\n")},"directives"),R.push(e.call(function(e){return a(e,t,r)},"body")),D(R);case"Noop":case"EmptyStatement":return A("");case"ExpressionStatement":return D([e.call(r,"expression"),";"]);case"ParenthesizedExpression":return D(["(",e.call(r,"expression"),")"]);case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":return A(" ").join([e.call(r,"left"),n.operator,e.call(r,"right")]);case"AssignmentPattern":return D([e.call(r,"left")," = ",e.call(r,"right")]);case"MemberExpression":R.push(e.call(r,"object"));var i=e.call(r,"property");return n.computed?R.push("[",i,"]"):R.push(".",i),D(R);case"MetaProperty":return D([e.call(r,"meta"),".",e.call(r,"property")]);case"BindExpression":return n.object&&R.push(e.call(r,"object")),R.push("::",e.call(r,"callee")),D(R);case"Path":return A(".").join(n.body);case"Identifier":return D([A(n.name,t),e.call(r,"typeAnnotation")]);case"SpreadElement":case"SpreadElementPattern":case"RestProperty":case"SpreadProperty":case"SpreadPropertyPattern":case"RestElement":return D(["...",e.call(r,"argument")]);case"FunctionDeclaration":case"FunctionExpression":return n.async&&R.push("async "),R.push("function"),n.generator&&R.push("*"),n.id&&R.push(" ",e.call(r,"id"),e.call(r,"typeParameters")),R.push("(",l(e,t,r),")",e.call(r,"returnType")," ",e.call(r,"body")),D(R);case"ArrowFunctionExpression":return n.async&&R.push("async "),n.typeParameters&&R.push(e.call(r,"typeParameters")),t.arrowParensAlways||1!==n.params.length||n.rest||"Identifier"!==n.params[0].type||n.params[0].typeAnnotation||n.returnType?R.push("(",l(e,t,r),")",e.call(r,"returnType")):R.push(e.call(r,"params",0)),R.push(" => ",e.call(r,"body")),D(R);case"MethodDefinition":return n.static&&R.push("static "),R.push(o(e,t,r)),D(R);case"YieldExpression":return R.push("yield"),n.delegate&&R.push("*"),n.argument&&R.push(" ",e.call(r,"argument")),D(R);case"AwaitExpression":return R.push("await"),n.all&&R.push("*"),n.argument&&R.push(" ",e.call(r,"argument")),D(R);case"ModuleDeclaration":return R.push("module",e.call(r,"id")),n.source?(v.ok(!n.body),R.push("from",e.call(r,"source"))):R.push(e.call(r,"body")),A(" ").join(R);case"ImportSpecifier":return n.imported?(R.push(e.call(r,"imported")),n.local&&n.local.name!==n.imported.name&&R.push(" as ",e.call(r,"local"))):n.id&&(R.push(e.call(r,"id")),n.name&&R.push(" as ",e.call(r,"name"))),D(R);case"ExportSpecifier":return n.local?(R.push(e.call(r,"local")),n.exported&&n.exported.name!==n.local.name&&R.push(" as ",e.call(r,"exported"))):n.id&&(R.push(e.call(r,"id")),n.name&&R.push(" as ",e.call(r,"name"))),D(R);case"ExportBatchSpecifier":return A("*");case"ImportNamespaceSpecifier":return R.push("* as "),n.local?R.push(e.call(r,"local")):n.id&&R.push(e.call(r,"id")),D(R);case"ImportDefaultSpecifier":return n.local?e.call(r,"local"):e.call(r,"id");case"ExportDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":return h(e,t,r);case"ExportAllDeclaration":return R.push("export *"),n.exported&&R.push(" as ",e.call(r,"exported")),R.push(" from ",e.call(r,"source")),D(R);case"ExportNamespaceSpecifier":return D(["* as ",e.call(r,"exported")]);case"ExportDefaultSpecifier":return e.call(r,"exported");case"Import":return A("import",t);case"ImportDeclaration":if(R.push("import "),n.importKind&&"value"!==n.importKind&&R.push(n.importKind+" "),n.specifiers&&n.specifiers.length>0){var s=!1;e.each(function(e){e.getName()>0&&R.push(", ");var n=e.getValue();w.ImportDefaultSpecifier.check(n)||w.ImportNamespaceSpecifier.check(n)?v.strictEqual(s,!1):(w.ImportSpecifier.assert(n),s||(s=!0,R.push(t.objectCurlySpacing?"{ ":"{"))),R.push(r(e))},"specifiers"),s&&R.push(t.objectCurlySpacing?" }":"}"),R.push(" from ")}return R.push(e.call(r,"source"),";"),D(R);case"BlockStatement":var m=e.call(function(e){return a(e,t,r)},"body");return!m.isEmpty()||n.directives&&0!==n.directives.length?(R.push("{\n"),n.directives&&e.each(function(e){R.push(r(e).indent(t.tabWidth),";",n.directives.length>1||!m.isEmpty()?"\n":"")},"directives"),R.push(m.indent(t.tabWidth)),R.push("\n}"),D(R)):A("{}");case"ReturnStatement":if(R.push("return"),n.argument){var g=e.call(r,"argument");g.startsWithComment()||g.length>1&&w.JSXElement&&w.JSXElement.check(n.argument)?R.push(" (\n",g.indent(t.tabWidth),"\n)"):R.push(" ",g)}return R.push(";"),D(R);case"CallExpression":return D([e.call(r,"callee"),u(e,t,r)]);case"ObjectExpression":case"ObjectPattern":case"ObjectTypeAnnotation":var x=!1,E="ObjectTypeAnnotation"===n.type,C=t.flowObjectCommas?",":E?";":",",S=[];E&&S.push("indexers","callProperties"),S.push("properties");O=0;S.forEach(function(e){O+=n[e].length});var _=E&&1===O||0===O,k=n.exact?"{|":"{",F=n.exact?"|}":"}";R.push(_?k:k+"\n");var T=R.length-1,B=0;return S.forEach(function(n){e.each(function(e){var n=r(e);_||(n=n.indent(t.tabWidth));var i=!E&&n.length>1;i&&x&&R.push("\n"),R.push(n),B<O-1?(R.push(C+(i?"\n\n":"\n")),x=!i):1!==O&&E?R.push(C):!_&&P.isTrailingCommaEnabled(t,"objects")&&R.push(C),B++},n)}),R.push(_?F:"\n"+F),0!==B&&_&&t.objectCurlySpacing&&(R[T]=k+" ",R[R.length-1]=" "+F),D(R);case"PropertyPattern":return D([e.call(r,"key"),": ",e.call(r,"pattern")]);case"ObjectProperty":case"Property":if(n.method||"get"===n.kind||"set"===n.kind)return o(e,t,r);Q=e.call(r,"key");return n.computed?R.push("[",Q,"]"):R.push(Q),n.shorthand||R.push(": ",e.call(r,"value")),D(R);case"ClassMethod":return n.static&&R.push("static "),D([R,c(e,t,r)]);case"ObjectMethod":return c(e,t,r);case"Decorator":return D(["@",e.call(r,"expression")]);case"ArrayExpression":case"ArrayPattern":var O=n.elements.length,j=e.map(r,"elements"),N=A(", ").join(j);return(_=N.getLineLength(1)<=t.wrapColumn)?t.arrayBracketSpacing?R.push("[ "):R.push("["):R.push("[\n"),e.each(function(e){var r=e.getName();if(e.getValue()){var n=j[r];_?r>0&&R.push(" "):n=n.indent(t.tabWidth),R.push(n),(r<O-1||!_&&P.isTrailingCommaEnabled(t,"arrays"))&&R.push(","),_||R.push("\n")}else R.push(",")},"elements"),_&&t.arrayBracketSpacing?R.push(" ]"):R.push("]"),D(R);case"SequenceExpression":return A(", ").join(e.map(r,"expressions"));case"ThisExpression":return A("this");case"Super":return A("super");case"NullLiteral":return A("null");case"RegExpLiteral":return A(n.extra.raw);case"BooleanLiteral":case"NumericLiteral":case"StringLiteral":case"Literal":return"string"!=typeof n.value?A(n.value,t):A(b(n.value,t),t);case"Directive":return e.call(r,"value");case"DirectiveLiteral":return A(b(n.value,t));case"ModuleSpecifier":if(n.local)throw new Error("The ESTree ModuleSpecifier type should be abstract");return A(b(n.value,t),t);case"UnaryExpression":return R.push(n.operator),/[a-z]$/.test(n.operator)&&R.push(" "),R.push(e.call(r,"argument")),D(R);case"UpdateExpression":return R.push(e.call(r,"argument"),n.operator),n.prefix&&R.reverse(),D(R);case"ConditionalExpression":return D(["(",e.call(r,"test")," ? ",e.call(r,"consequent")," : ",e.call(r,"alternate"),")"]);case"NewExpression":R.push("new ",e.call(r,"callee"));return n.arguments&&R.push(u(e,t,r)),D(R);case"VariableDeclaration":R.push(n.kind," ");var I=0,j=e.map(function(e){var t=r(e);return I=Math.max(t.length,I),t},"declarations");1===I?R.push(A(", ").join(j)):j.length>1?R.push(A(",\n").join(j).indentTail(n.kind.length+1)):R.push(j[0]);var L=e.getParentNode();return w.ForStatement.check(L)||w.ForInStatement.check(L)||w.ForOfStatement&&w.ForOfStatement.check(L)||w.ForAwaitStatement&&w.ForAwaitStatement.check(L)||R.push(";"),D(R);case"VariableDeclarator":return n.init?A(" = ").join([e.call(r,"id"),e.call(r,"init")]):e.call(r,"id");case"WithStatement":return D(["with (",e.call(r,"object"),") ",e.call(r,"body")]);case"IfStatement":var M=d(e.call(r,"consequent"),t),R=["if (",e.call(r,"test"),")",M];return n.alternate&&R.push(y(M)?" else":"\nelse",d(e.call(r,"alternate"),t)),D(R);case"ForStatement":var V=e.call(r,"init"),U=V.length>1?";\n":"; ",q=A(U).join([V,e.call(r,"test"),e.call(r,"update")]).indentTail("for (".length),G=D(["for (",q,")"]),X=d(e.call(r,"body"),t),R=[G];return G.length>1&&(R.push("\n"),X=X.trimLeft()),R.push(X),D(R);case"WhileStatement":return D(["while (",e.call(r,"test"),")",d(e.call(r,"body"),t)]);case"ForInStatement":return D([n.each?"for each (":"for (",e.call(r,"left")," in ",e.call(r,"right"),")",d(e.call(r,"body"),t)]);case"ForOfStatement":return D(["for (",e.call(r,"left")," of ",e.call(r,"right"),")",d(e.call(r,"body"),t)]);case"ForAwaitStatement":return D(["for await (",e.call(r,"left")," of ",e.call(r,"right"),")",d(e.call(r,"body"),t)]);case"DoWhileStatement":var W=D(["do",d(e.call(r,"body"),t)]),R=[W];return y(W)?R.push(" while"):R.push("\nwhile"),R.push(" (",e.call(r,"test"),");"),D(R);case"DoExpression":var J=e.call(function(e){return a(e,t,r)},"body");return D(["do {\n",J.indent(t.tabWidth),"\n}"]);case"BreakStatement":return R.push("break"),n.label&&R.push(" ",e.call(r,"label")),R.push(";"),D(R);case"ContinueStatement":return R.push("continue"),n.label&&R.push(" ",e.call(r,"label")),R.push(";"),D(R);case"LabeledStatement":return D([e.call(r,"label"),":\n",e.call(r,"body")]);case"TryStatement":return R.push("try ",e.call(r,"block")),n.handler?R.push(" ",e.call(r,"handler")):n.handlers&&e.each(function(e){R.push(" ",r(e))},"handlers"),n.finalizer&&R.push(" finally ",e.call(r,"finalizer")),D(R);case"CatchClause":return R.push("catch (",e.call(r,"param")),n.guard&&R.push(" if ",e.call(r,"guard")),R.push(") ",e.call(r,"body")),D(R);case"ThrowStatement":return D(["throw ",e.call(r,"argument"),";"]);case"SwitchStatement":return D(["switch (",e.call(r,"discriminant"),") {\n",A("\n").join(e.map(r,"cases")),"\n}"]);case"SwitchCase":return n.test?R.push("case ",e.call(r,"test"),":"):R.push("default:"),n.consequent.length>0&&R.push("\n",e.call(function(e){return a(e,t,r)},"consequent").indent(t.tabWidth)),D(R);case"DebuggerStatement":return A("debugger;");case"JSXAttribute":return R.push(e.call(r,"name")),n.value&&R.push("=",e.call(r,"value")),D(R);case"JSXIdentifier":return A(n.name,t);case"JSXNamespacedName":return A(":").join([e.call(r,"namespace"),e.call(r,"name")]);case"JSXMemberExpression":return A(".").join([e.call(r,"object"),e.call(r,"property")]);case"JSXSpreadAttribute":return D(["{...",e.call(r,"argument"),"}"]);case"JSXExpressionContainer":return D(["{",e.call(r,"expression"),"}"]);case"JSXElement":var K=e.call(r,"openingElement");if(n.openingElement.selfClosing)return v.ok(!n.closingElement),K;var z=D(e.map(function(e){var t=e.getValue();if(w.Literal.check(t)&&"string"==typeof t.value){if(/\S/.test(t.value))return t.value.replace(/^\s+|\s+$/g,"");if(/\n/.test(t.value))return"\n"}return r(e)},"children")).indentTail(t.tabWidth),Y=e.call(r,"closingElement");return D([K,z,Y]);case"JSXOpeningElement":R.push("<",e.call(r,"name"));var H=[];e.each(function(e){H.push(" ",r(e))},"attributes");var $=D(H);return($.length>1||$.getLineLength(1)>t.wrapColumn)&&(H.forEach(function(e,t){" "===e&&(v.strictEqual(t%2,0),H[t]="\n")}),$=D(H).indentTail(t.tabWidth)),R.push($,n.selfClosing?" />":">"),D(R);case"JSXClosingElement":return D(["</",e.call(r,"name"),">"]);case"JSXText":return A(n.value,t);case"JSXEmptyExpression":return A("");case"TypeAnnotatedIdentifier":return D([e.call(r,"annotation")," ",e.call(r,"identifier")]);case"ClassBody":return 0===n.body.length?A("{}"):D(["{\n",e.call(function(e){return a(e,t,r)},"body").indent(t.tabWidth),"\n}"]);case"ClassPropertyDefinition":return R.push("static ",e.call(r,"definition")),w.MethodDefinition.check(n.definition)||R.push(";"),D(R);case"ClassProperty":n.static&&R.push("static ");var Q=e.call(r,"key");return n.computed?Q=D(["[",Q,"]"]):"plus"===n.variance?Q=D(["+",Q]):"minus"===n.variance&&(Q=D(["-",Q])),R.push(Q),n.typeAnnotation&&R.push(e.call(r,"typeAnnotation")),n.value&&R.push(" = ",e.call(r,"value")),R.push(";"),D(R);case"ClassDeclaration":case"ClassExpression":return R.push("class"),n.id&&R.push(" ",e.call(r,"id"),e.call(r,"typeParameters")),n.superClass&&R.push(" extends ",e.call(r,"superClass"),e.call(r,"superTypeParameters")),n.implements&&n.implements.length>0&&R.push(" implements ",A(", ").join(e.map(r,"implements"))),R.push(" ",e.call(r,"body")),D(R);case"TemplateElement":return A(n.value.raw,t).lockIndentTail();case"TemplateLiteral":var Z=e.map(r,"expressions");return R.push("`"),e.each(function(e){var t=e.getName();R.push(r(e)),t<Z.length&&R.push("${",Z[t],"}")},"quasis"),R.push("`"),D(R).lockIndentTail();case"TaggedTemplateExpression":return D([e.call(r,"tag"),e.call(r,"quasi")]);case"Node":case"Printable":case"SourceLocation":case"Position":case"Statement":case"Function":case"Pattern":case"Expression":case"Declaration":case"Specifier":case"NamedSpecifier":case"Comment":case"MemberTypeAnnotation":case"TupleTypeAnnotation":case"Type":throw new Error("unprintable type: "+JSON.stringify(n.type));case"CommentBlock":case"Block":return D(["/*",A(n.value,t),"*/"]);case"CommentLine":case"Line":return D(["//",A(n.value,t)]);case"TypeAnnotation":return n.typeAnnotation?("FunctionTypeAnnotation"!==n.typeAnnotation.type&&R.push(": "),R.push(e.call(r,"typeAnnotation")),D(R)):A("");case"ExistentialTypeParam":case"ExistsTypeAnnotation":return A("*",t);case"EmptyTypeAnnotation":return A("empty",t);case"AnyTypeAnnotation":return A("any",t);case"MixedTypeAnnotation":return A("mixed",t);case"ArrayTypeAnnotation":return D([e.call(r,"elementType"),"[]"]);case"BooleanTypeAnnotation":return A("boolean",t);case"BooleanLiteralTypeAnnotation":return v.strictEqual(typeof n.value,"boolean"),A(""+n.value,t);case"DeclareClass":return f(e,["class ",e.call(r,"id")," ",e.call(r,"body")]);case"DeclareFunction":return f(e,["function ",e.call(r,"id"),";"]);case"DeclareModule":return f(e,["module ",e.call(r,"id")," ",e.call(r,"body")]);case"DeclareModuleExports":return f(e,["module.exports",e.call(r,"typeAnnotation")]);case"DeclareVariable":return f(e,["var ",e.call(r,"id"),";"]);case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":return D(["declare ",h(e,t,r)]);case"FunctionTypeAnnotation":var ee=e.getParentNode(0),te=!(w.ObjectTypeCallProperty.check(ee)||w.DeclareFunction.check(e.getParentNode(2)));return te&&!w.FunctionTypeParam.check(ee)&&R.push(": "),R.push("(",A(", ").join(e.map(r,"params")),")"),n.returnType&&R.push(te?" => ":": ",e.call(r,"returnType")),D(R);case"FunctionTypeParam":return D([e.call(r,"name"),n.optional?"?":"",": ",e.call(r,"typeAnnotation")]);case"GenericTypeAnnotation":return D([e.call(r,"id"),e.call(r,"typeParameters")]);case"DeclareInterface":R.push("declare ");case"InterfaceDeclaration":return R.push(A("interface ",t),e.call(r,"id"),e.call(r,"typeParameters")," "),n.extends&&R.push("extends ",A(", ").join(e.map(r,"extends"))),R.push(" ",e.call(r,"body")),D(R);case"ClassImplements":case"InterfaceExtends":return D([e.call(r,"id"),e.call(r,"typeParameters")]);case"IntersectionTypeAnnotation":return A(" & ").join(e.map(r,"types"));case"NullableTypeAnnotation":return D(["?",e.call(r,"typeAnnotation")]);case"NullLiteralTypeAnnotation":return A("null",t);case"ThisTypeAnnotation":return A("this",t);case"NumberTypeAnnotation":return A("number",t);case"ObjectTypeCallProperty":return e.call(r,"value");case"ObjectTypeIndexer":re="plus"===n.variance?"+":"minus"===n.variance?"-":"";return D([re,"[",e.call(r,"id"),": ",e.call(r,"key"),"]: ",e.call(r,"value")]);case"ObjectTypeProperty":var re="plus"===n.variance?"+":"minus"===n.variance?"-":"";return D([re,e.call(r,"key"),n.optional?"?":"",": ",e.call(r,"value")]);case"QualifiedTypeIdentifier":return D([e.call(r,"qualification"),".",e.call(r,"id")]);case"StringLiteralTypeAnnotation":return A(b(n.value,t),t);case"NumberLiteralTypeAnnotation":case"NumericLiteralTypeAnnotation":return v.strictEqual(typeof n.value,"number"),A(JSON.stringify(n.value),t);case"StringTypeAnnotation":return A("string",t);case"DeclareTypeAlias":R.push("declare ");case"TypeAlias":return D(["type ",e.call(r,"id"),e.call(r,"typeParameters")," = ",e.call(r,"right"),";"]);case"TypeCastExpression":return D(["(",e.call(r,"expression"),e.call(r,"typeAnnotation"),")"]);case"TypeParameterDeclaration":case"TypeParameterInstantiation":return D(["<",A(", ").join(e.map(r,"params")),">"]);case"TypeParameter":switch(n.variance){case"plus":R.push("+");break;case"minus":R.push("-")}return R.push(e.call(r,"name")),n.bound&&R.push(e.call(r,"bound")),n.default&&R.push("=",e.call(r,"default")),D(R);case"TypeofTypeAnnotation":return D([A("typeof ",t),e.call(r,"argument")]);case"UnionTypeAnnotation":return A(" | ").join(e.map(r,"types"));case"VoidTypeAnnotation":return A("void",t);case"NullTypeAnnotation":return A("null",t);case"ClassHeritage":case"ComprehensionBlock":case"ComprehensionExpression":case"Glob":case"GeneratorExpression":case"LetStatement":case"LetExpression":case"GraphExpression":case"GraphIndexExpression":case"XMLDefaultDeclaration":case"XMLAnyName":case"XMLQualifiedIdentifier":case"XMLFunctionQualifiedIdentifier":case"XMLAttributeSelector":case"XMLFilterExpression":case"XML":case"XMLElement":case"XMLList":case"XMLEscape":case"XMLText":case"XMLStartTag":case"XMLEndTag":case"XMLPointTag":case"XMLName":case"XMLAttribute":case"XMLCdata":case"XMLComment":case"XMLProcessingInstruction":default:throw new Error("unknown type: "+JSON.stringify(n.type))}return p}(e,t,r);return!n||m.isEmpty()?m:(n.decorators&&n.decorators.length>0&&!P.getParentExportDeclaration(e)?e.each(function(e){i.push(r(e),"\n")},"decorators"):P.isExportDeclaration(n)&&n.declaration&&n.declaration.decorators?e.each(function(e){i.push(r(e),"\n")},"declaration","decorators"):s=e.needsParens(),s&&i.unshift("("),i.push(m),s&&i.push(")"),D(i))}function a(e,t,r){w.ClassBody&&w.ClassBody.check(e.getParentNode());var n=[],i=!1,s=!1;e.each(function(e){e.getName();var t=e.getValue();t&&"EmptyStatement"!==t.type&&(w.Comment.check(t)?i=!0:w.Statement.check(t)?s=!0:k.assert(t),n.push({node:t,printed:r(e)}))}),i&&v.strictEqual(s,!1,"Comments may appear as statements in otherwise empty statement lists, but may not coexist with non-Comment nodes.");var a=null,o=n.length,u=[];return n.forEach(function(e,r){var n,i,s=e.printed,l=e.node,c=s.length>1,p=r>0,h=r<o-1,f=l&&l.loc&&l.loc.lines,d=f&&t.reuseWhitespace&&P.getTrueLoc(l,f);if(p)if(d){var m=f.skipSpaces(d.start,!0),y=m?m.line:1,g=d.start.line-y;n=Array(g+1).join("\n")}else n=c?"\n\n":"\n";else n="";if(h)if(d){var b=f.skipSpaces(d.end),v=(b?b.line:f.length)-d.end.line;i=Array(v+1).join("\n")}else i=c?"\n\n":"\n";else i="";u.push(function(e,t){if(!e&&!t)return A("");if(!e)return A(t);if(!t)return A(e);var r=A(e),n=A(t);if(n.length>r.length)return n;return r}(a,n),s),h?a=i:i&&u.push(i)}),D(u)}function o(e,t,r){var n=e.getNode(),i=n.kind,s=[];"ObjectMethod"===n.type||"ClassMethod"===n.type?n.value=n:w.FunctionExpression.assert(n.value),n.value.async&&s.push("async "),i&&"init"!==i&&"method"!==i&&"constructor"!==i?(v.ok("get"===i||"set"===i),s.push(i," ")):n.value.generator&&s.push("*");var a=e.call(r,"key");return n.computed&&(a=D(["[",a,"]"])),s.push(a,e.call(r,"value","typeParameters"),"(",e.call(function(e){return l(e,t,r)},"value"),")",e.call(r,"value","returnType")," ",e.call(r,"value","body")),D(s)}function u(e,t,r){var n=e.map(r,"arguments"),i=P.isTrailingCommaEnabled(t,"parameters"),s=A(", ").join(n);return s.getLineLength(1)>t.wrapColumn?(s=A(",\n").join(n),D(["(\n",s.indent(t.tabWidth),i?",\n)":"\n)"])):D(["(",s,")"])}function l(e,t,r){var n=e.getValue();w.Function.assert(n);var i=e.map(r,"params");n.defaults&&e.each(function(e){var t=e.getName(),n=i[t];n&&e.getValue()&&(i[t]=D([n," = ",r(e)]))},"defaults"),n.rest&&i.push(D(["...",e.call(r,"rest")]));var s=A(", ").join(i);return s.length>1||s.getLineLength(1)>t.wrapColumn?(s=A(",\n").join(i),s=D(P.isTrailingCommaEnabled(t,"parameters")&&!n.rest&&"RestElement"!==n.params[n.params.length-1].type?[s,",\n"]:[s,"\n"]),D(["\n",s.indent(t.tabWidth)])):s}function c(e,t,r){var n=e.getValue(),i=[];if(n.async&&i.push("async "),n.generator&&i.push("*"),n.method||"get"===n.kind||"set"===n.kind)return o(e,t,r);var s=e.call(r,"key");return n.computed?i.push("[",s,"]"):i.push(s),i.push("(",l(e,t,r),")",e.call(r,"returnType")," ",e.call(r,"body")),D(i)}function h(e,t,r){var n=e.getValue(),i=["export "],s=t.objectCurlySpacing;w.Declaration.assert(n),(n.default||"ExportDefaultDeclaration"===n.type)&&i.push("default "),n.declaration?i.push(e.call(r,"declaration")):n.specifiers&&n.specifiers.length>0&&(1===n.specifiers.length&&"ExportBatchSpecifier"===n.specifiers[0].type?i.push("*"):i.push(s?"{ ":"{",A(", ").join(e.map(r,"specifiers")),s?" }":"}"),n.source&&i.push(" from ",e.call(r,"source")));var a=D(i);return";"===m(a)||n.declaration&&("FunctionDeclaration"===n.declaration.type||"ClassDeclaration"===n.declaration.type)||(a=D([a,";"])),a}function f(e,t){var r=P.getParentExportDeclaration(e);return r?v.strictEqual(r.type,"DeclareExportDeclaration"):t.unshift("declare "),D(t)}function d(e,t){return D(e.length>1?[" ",e]:["\n",function(e){var t=m(e);return!t||"\n};".indexOf(t)<0?D([e,";"]):e}(e).indent(t.tabWidth)])}function m(e){var t=e.lastPos();do{var r=e.charAt(t);if(/\S/.test(r))return r}while(e.prevPos(t))}function y(e){return"}"===m(e)}function g(e){return e.replace(/['"]/g,function(e){return'"'===e?"'":'"'})}function b(e,t){switch(k.assert(e),t.quote){case"auto":var r=JSON.stringify(e),n=g(JSON.stringify(g(e)));return r.length>n.length?n:r;case"single":return g(JSON.stringify(g(e)));case"double":default:return JSON.stringify(e)}}var v=e("assert"),x=(e("source-map"),e("./comments").printComments),E=e("./lines"),A=E.fromString,D=E.concat,C=e("./options").normalize,S=e("./patcher").getReprinter,_=e("./types"),w=_.namedTypes,k=_.builtInTypes.string,F=_.builtInTypes.object,T=e("./fast-path"),P=e("./util"),B=!1;n.prototype.toString=function(){return B||(console.warn("Deprecation warning: recast.print now returns an object with a .code property. You appear to be treating the object as a string, which might still work but is strongly discouraged."),B=!0),this.code};var O=new n("");r.Printer=i},{"./comments":564,"./fast-path":565,"./lines":566,"./options":568,"./patcher":570,"./types":572,"./util":573,assert:1,"source-map":586}],572:[function(e,t,r){t.exports=e("ast-types")},{"ast-types":20}],573:[function(e,t,r){function n(e,t){return e.line-t.line||e.column-t.column}function i(e){return{line:e.line,column:e.column}}function s(e,t){e&&t&&(n(t.start,e.start)<0&&(e.start=t.start),n(e.end,t.end)<0&&(e.end=t.end))}var a=e("assert"),o=e("./types"),u=(o.getFieldValue,o.namedTypes),l=e("source-map"),c=l.SourceMapConsumer,p=l.SourceMapGenerator,h=Object.prototype.hasOwnProperty,f=r;f.getUnionOfKeys=function(){for(var e={},t=arguments.length,r=0;r<t;++r)for(var n=Object.keys(arguments[r]),i=n.length,s=0;s<i;++s)e[n[s]]=!0;return e},f.comparePos=n,f.copyPos=i,f.composeSourceMaps=function(e,t){if(!e)return t||null;if(!t)return e;var r=new c(e),n=new c(t),s=new p({file:t.file,sourceRoot:t.sourceRoot}),a={};return n.eachMapping(function(e){var t=r.originalPositionFor({line:e.originalLine,column:e.originalColumn}),n=t.source;if(null!==n){s.addMapping({source:n,original:i(t),generated:{line:e.generatedLine,column:e.generatedColumn},name:e.name});var o=r.sourceContentFor(n);o&&!h.call(a,n)&&(a[n]=o,s.setSourceContent(n,o))}}),s.toJSON()},f.getTrueLoc=function(e,t){function r(e){s(a,e.loc)}if(!e.loc)return null;var a={start:e.loc.start,end:e.loc.end};return e.comments&&e.comments.forEach(r),e.declaration&&f.isExportDeclaration(e)&&e.declaration.decorators&&e.declaration.decorators.forEach(r),n(a.start,a.end)<0&&(a.start=i(a.start),t.skipSpaces(a.start,!1,!0),n(a.start,a.end)<0&&(a.end=i(a.end),t.skipSpaces(a.end,!0,!0))),a},f.fixFaultyLocations=function(e,t){o=e.loc;if(o&&(o.start.line<1&&(o.start.line=1),o.end.line<1&&(o.end.line=1)),"File"===e.type&&(o.start=t.firstPos(),o.end=t.lastPos()),"TemplateLiteral"===e.type)!function(e,t){if(a.strictEqual(e.type,"TemplateLiteral"),0!==e.quasis.length){var r=i(e.loc.start);a.strictEqual(t.charAt(r),"`"),a.ok(t.nextPos(r));var s=e.quasis[0];n(s.loc.start,r)<0&&(s.loc.start=r);var o=i(e.loc.end);a.ok(t.prevPos(o)),a.strictEqual(t.charAt(o),"`");var u=e.quasis[e.quasis.length-1];n(o,u.loc.end)<0&&(u.loc.end=o),e.expressions.forEach(function(r,i){var s=t.skipSpaces(r.loc.start,!0,!1);if(t.prevPos(s)&&"{"===t.charAt(s)&&t.prevPos(s)&&"$"===t.charAt(s)){var o=e.quasis[i];n(s,o.loc.end)<0&&(o.loc.end=s)}var u=t.skipSpaces(r.loc.end,!1,!1);if("}"===t.charAt(u)){a.ok(t.nextPos(u));var l=e.quasis[i+1];n(l.loc.start,u)<0&&(l.loc.start=u)}})}}(e,t);else if(o&&e.decorators)e.decorators.forEach(function(e){s(o,e.loc)});else if(e.declaration&&f.isExportDeclaration(e)){e.declaration.loc=null;var r=e.declaration.decorators;r&&r.forEach(function(e){s(o,e.loc)})}else if(u.MethodDefinition&&u.MethodDefinition.check(e)||u.Property.check(e)&&(e.method||e.shorthand))e.value.loc=null,u.FunctionExpression.check(e.value)&&(e.value.id=null);else if("ObjectTypeProperty"===e.type){var o,l=(o=e.loc)&&o.end;l&&(l=i(l),t.prevPos(l)&&","===t.charAt(l)&&(l=t.skipSpaces(l,!0,!0))&&(o.end=l))}},f.isExportDeclaration=function(e){if(e)switch(e.type){case"ExportDeclaration":case"ExportDefaultDeclaration":case"ExportDefaultSpecifier":case"DeclareExportDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return!0}return!1},f.getParentExportDeclaration=function(e){var t=e.getParentNode();return"declaration"===e.getName()&&f.isExportDeclaration(t)?t:null},f.isTrailingCommaEnabled=function(e,t){var r=e.trailingComma;return"object"==typeof r?!!r[t]:!!r}},{"./types":572,assert:1,"source-map":586}],574:[function(e,t,r){(function(t){function n(e,t){return new a(t).print(e)}var i=e("./lib/types"),s=e("./lib/parser").parse,a=e("./lib/printer").Printer;Object.defineProperties(r,{parse:{enumerable:!0,value:s},visit:{enumerable:!0,value:i.visit},print:{enumerable:!0,value:n},prettyPrint:{enumerable:!1,value:function(e,t){return new a(t).printGenerically(e)}},types:{enumerable:!1,value:i},run:{enumerable:!1,value:function(r,i){return function(r,i,a){e("fs").readFile(r,"utf-8",function(e,r){e?console.error(e):function(e,r,i){var a=i&&i.writeback||function(e){t.stdout.write(e)};r(s(e,i),function(e){a(n(e,i).code)})}(r,i,a)})}(t.argv[2],r,i)}}})}).call(this,e("_process"))},{"./lib/parser":569,"./lib/printer":571,"./lib/types":572,_process:550,fs:190}],575:[function(e,t,r){!function(e,n){"object"==typeof r&&"object"==typeof t?t.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof r?r.esprima=n():e.esprima=n()}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";var n=r(1),i=r(3),s=r(11),a=r(15);t.parse=function(e,t,r){var a=null,o=function(e,t){r&&r(e,t),a&&a.visit(e,t)},u="function"==typeof r?o:null,l=!1;if(t){l="boolean"==typeof t.comment&&t.comment;var c="boolean"==typeof t.attachComment&&t.attachComment;(l||c)&&((a=new n.CommentHandler).attach=c,t.comment=!0,u=o)}var p,h=(p=t&&"boolean"==typeof t.jsx&&t.jsx?new s.JSXParser(e,t,u):new i.Parser(e,t,u)).parseProgram();return l&&(h.comments=a.comments),p.config.tokens&&(h.tokens=p.tokens),p.config.tolerant&&(h.errors=p.errorHandler.errors),h},t.tokenize=function(e,t,r){var n,i=new a.Tokenizer(e,t);n=[];try{for(;;){var s=i.getNextToken();if(!s)break;r&&(s=r(s)),n.push(s)}}catch(e){i.errorHandler.tolerate(e)}return i.errorHandler.tolerant&&(n.errors=i.errors()),n};var o=r(2);t.Syntax=o.Syntax,t.version="3.1.3"},function(e,t,r){"use strict";var n=r(2),i=function(){function e(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return e.prototype.insertInnerComments=function(e,t){if(e.type===n.Syntax.BlockStatement&&0===e.body.length){for(var r=[],i=this.leading.length-1;i>=0;--i){var s=this.leading[i];t.end.offset>=s.start&&(r.unshift(s.comment),this.leading.splice(i,1),this.trailing.splice(i,1))}r.length&&(e.innerComments=r)}},e.prototype.findTrailingComments=function(e,t){var r=[];if(this.trailing.length>0){for(var n=this.trailing.length-1;n>=0;--n){var i=this.trailing[n];i.start>=t.end.offset&&r.unshift(i.comment)}return this.trailing.length=0,r}var s=this.stack[this.stack.length-1];if(s&&s.node.trailingComments){var a=s.node.trailingComments[0];a&&a.range[0]>=t.end.offset&&(r=s.node.trailingComments,delete s.node.trailingComments)}return r},e.prototype.findLeadingComments=function(e,t){for(var r,n=[];this.stack.length>0;){if(!((a=this.stack[this.stack.length-1])&&a.start>=t.start.offset))break;r=this.stack.pop().node}if(r){for(s=(r.leadingComments?r.leadingComments.length:0)-1;s>=0;--s){var i=r.leadingComments[s];i.range[1]<=t.start.offset&&(n.unshift(i),r.leadingComments.splice(s,1))}return r.leadingComments&&0===r.leadingComments.length&&delete r.leadingComments,n}for(var s=this.leading.length-1;s>=0;--s){var a=this.leading[s];a.start<=t.start.offset&&(n.unshift(a.comment),this.leading.splice(s,1))}return n},e.prototype.visitNode=function(e,t){if(!(e.type===n.Syntax.Program&&e.body.length>0)){this.insertInnerComments(e,t);var r=this.findTrailingComments(e,t),i=this.findLeadingComments(e,t);i.length>0&&(e.leadingComments=i),r.length>0&&(e.trailingComments=r),this.stack.push({node:e,start:t.start.offset})}},e.prototype.visitComment=function(e,t){var r="L"===e.type[0]?"Line":"Block",n={type:r,value:e.value};if(e.range&&(n.range=e.range),e.loc&&(n.loc=e.loc),this.comments.push(n),this.attach){var i={comment:{type:r,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};e.loc&&(i.comment.loc=e.loc),e.type=r,this.leading.push(i),this.trailing.push(i)}},e.prototype.visit=function(e,t){"LineComment"===e.type?this.visitComment(e,t):"BlockComment"===e.type?this.visitComment(e,t):this.attach&&this.visitNode(e,t)},e}();t.CommentHandler=i},function(e,t){"use strict";t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,r){"use strict";var n=r(4),i=r(5),s=r(6),a=r(7),o=r(8),u=r(2),l=r(10),c=function(){function e(e,t,r){void 0===t&&(t={}),this.config={range:"boolean"==typeof t.range&&t.range,loc:"boolean"==typeof t.loc&&t.loc,source:null,tokens:"boolean"==typeof t.tokens&&t.tokens,comment:"boolean"==typeof t.comment&&t.comment,tolerant:"boolean"==typeof t.tolerant&&t.tolerant},this.config.loc&&t.source&&null!==t.source&&(this.config.source=String(t.source)),this.delegate=r,this.errorHandler=new s.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new o.Scanner(e,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.sourceType=t&&"module"===t.sourceType?"module":"script",this.lookahead=null,this.hasLineTerminator=!1,this.context={allowIn:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:"module"===this.sourceType},this.tokens=[],this.startMarker={index:0,lineNumber:this.scanner.lineNumber,lineStart:0},this.lastMarker={index:0,lineNumber:this.scanner.lineNumber,lineStart:0},this.nextToken(),this.lastMarker={index:this.scanner.index,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart}}return e.prototype.throwError=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.prototype.slice.call(arguments,1),s=e.replace(/%(\d)/g,function(e,t){return n.assert(t<i.length,"Message reference must be in range"),i[t]}),a=this.lastMarker.index,o=this.lastMarker.lineNumber,u=this.lastMarker.index-this.lastMarker.lineStart+1;throw this.errorHandler.createError(a,o,u,s)},e.prototype.tolerateError=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.prototype.slice.call(arguments,1),s=e.replace(/%(\d)/g,function(e,t){return n.assert(t<i.length,"Message reference must be in range"),i[t]}),a=this.lastMarker.index,o=this.scanner.lineNumber,u=this.lastMarker.index-this.lastMarker.lineStart+1;this.errorHandler.tolerateError(a,o,u,s)},e.prototype.unexpectedTokenError=function(e,t){var r,n=t||i.Messages.UnexpectedToken;if(e?(t||(n=e.type===a.Token.EOF?i.Messages.UnexpectedEOS:e.type===a.Token.Identifier?i.Messages.UnexpectedIdentifier:e.type===a.Token.NumericLiteral?i.Messages.UnexpectedNumber:e.type===a.Token.StringLiteral?i.Messages.UnexpectedString:e.type===a.Token.Template?i.Messages.UnexpectedTemplate:i.Messages.UnexpectedToken,e.type===a.Token.Keyword&&(this.scanner.isFutureReservedWord(e.value)?n=i.Messages.UnexpectedReserved:this.context.strict&&this.scanner.isStrictModeReservedWord(e.value)&&(n=i.Messages.StrictReservedWord))),r=e.type===a.Token.Template?e.value.raw:e.value):r="ILLEGAL",n=n.replace("%0",r),e&&"number"==typeof e.lineNumber){var s=e.start,o=e.lineNumber,u=e.start-this.lastMarker.lineStart+1;return this.errorHandler.createError(s,o,u,n)}var s=this.lastMarker.index,o=this.lastMarker.lineNumber,u=s-this.lastMarker.lineStart+1;return this.errorHandler.createError(s,o,u,n)},e.prototype.throwUnexpectedToken=function(e,t){throw this.unexpectedTokenError(e,t)},e.prototype.tolerateUnexpectedToken=function(e,t){this.errorHandler.tolerate(this.unexpectedTokenError(e,t))},e.prototype.collectComments=function(){if(this.config.comment){var e=this.scanner.scanComments();if(e.length>0&&this.delegate)for(var t=0;t<e.length;++t){var r=e[t],n=void 0;n={type:r.multiLine?"BlockComment":"LineComment",value:this.scanner.source.slice(r.slice[0],r.slice[1])},this.config.range&&(n.range=r.range),this.config.loc&&(n.loc=r.loc);var i={start:{line:r.loc.start.line,column:r.loc.start.column,offset:r.range[0]},end:{line:r.loc.end.line,column:r.loc.end.column,offset:r.range[1]}};this.delegate(n,i)}}else this.scanner.scanComments()},e.prototype.getTokenRaw=function(e){return this.scanner.source.slice(e.start,e.end)},e.prototype.convertToken=function(e){var t;return t={type:a.TokenName[e.type],value:this.getTokenRaw(e)},this.config.range&&(t.range=[e.start,e.end]),this.config.loc&&(t.loc={start:{line:this.startMarker.lineNumber,column:this.startMarker.index-this.startMarker.lineStart},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}),e.regex&&(t.regex=e.regex),t},e.prototype.nextToken=function(){var e=this.lookahead;this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart,this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.lineNumber=this.scanner.lineNumber,this.startMarker.lineStart=this.scanner.lineStart;var t;return t=this.scanner.lex(),this.hasLineTerminator=!(!e||!t)&&e.lineNumber!==t.lineNumber,t&&this.context.strict&&t.type===a.Token.Identifier&&this.scanner.isStrictModeReservedWord(t.value)&&(t.type=a.Token.Keyword),this.lookahead=t,this.config.tokens&&t.type!==a.Token.EOF&&this.tokens.push(this.convertToken(t)),e},e.prototype.nextRegexToken=function(){this.collectComments();var e=this.scanner.scanRegExp();return this.config.tokens&&(this.tokens.pop(),this.tokens.push(this.convertToken(e))),this.lookahead=e,this.nextToken(),e},e.prototype.createNode=function(){return{index:this.startMarker.index,line:this.startMarker.lineNumber,column:this.startMarker.index-this.startMarker.lineStart}},e.prototype.startNode=function(e){return{index:e.start,line:e.lineNumber,column:e.start-e.lineStart}},e.prototype.finalize=function(e,t){if(this.config.range&&(t.range=[e.index,this.lastMarker.index]),this.config.loc&&(t.loc={start:{line:e.line,column:e.column},end:{line:this.lastMarker.lineNumber,column:this.lastMarker.index-this.lastMarker.lineStart}},this.config.source&&(t.loc.source=this.config.source)),this.delegate){var r={start:{line:e.line,column:e.column,offset:e.index},end:{line:this.lastMarker.lineNumber,column:this.lastMarker.index-this.lastMarker.lineStart,offset:this.lastMarker.index}};this.delegate(t,r)}return t},e.prototype.expect=function(e){var t=this.nextToken();t.type===a.Token.Punctuator&&t.value===e||this.throwUnexpectedToken(t)},e.prototype.expectCommaSeparator=function(){if(this.config.tolerant){var e=this.lookahead;e.type===a.Token.Punctuator&&","===e.value?this.nextToken():e.type===a.Token.Punctuator&&";"===e.value?(this.nextToken(),this.tolerateUnexpectedToken(e)):this.tolerateUnexpectedToken(e,i.Messages.UnexpectedToken)}else this.expect(",")},e.prototype.expectKeyword=function(e){var t=this.nextToken();t.type===a.Token.Keyword&&t.value===e||this.throwUnexpectedToken(t)},e.prototype.match=function(e){return this.lookahead.type===a.Token.Punctuator&&this.lookahead.value===e},e.prototype.matchKeyword=function(e){return this.lookahead.type===a.Token.Keyword&&this.lookahead.value===e},e.prototype.matchContextualKeyword=function(e){return this.lookahead.type===a.Token.Identifier&&this.lookahead.value===e},e.prototype.matchAssign=function(){if(this.lookahead.type!==a.Token.Punctuator)return!1;var e=this.lookahead.value;return"="===e||"*="===e||"**="===e||"/="===e||"%="===e||"+="===e||"-="===e||"<<="===e||">>="===e||">>>="===e||"&="===e||"^="===e||"|="===e},e.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement,r=this.context.isAssignmentTarget,n=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=e.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=r,this.context.firstCoverInitializedNameError=n,i},e.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement,r=this.context.isAssignmentTarget,n=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&r,this.context.firstCoverInitializedNameError=n||this.context.firstCoverInitializedNameError,i},e.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(this.lookahead.type===a.Token.EOF||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.lineNumber=this.startMarker.lineNumber,this.lastMarker.lineStart=this.startMarker.lineStart)},e.prototype.parsePrimaryExpression=function(){var e,t,r,n=this.createNode();switch(this.lookahead.type){case a.Token.Identifier:"module"===this.sourceType&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),e=this.finalize(n,new l.Identifier(this.nextToken().value));break;case a.Token.NumericLiteral:case a.Token.StringLiteral:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,i.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),r=this.getTokenRaw(t),e=this.finalize(n,new l.Literal(t.value,r));break;case a.Token.BooleanLiteral:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,(t=this.nextToken()).value="true"===t.value,r=this.getTokenRaw(t),e=this.finalize(n,new l.Literal(t.value,r));break;case a.Token.NullLiteral:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,(t=this.nextToken()).value=null,r=this.getTokenRaw(t),e=this.finalize(n,new l.Literal(t.value,r));break;case a.Token.Template:e=this.parseTemplateLiteral();break;case a.Token.Punctuator:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,e=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":e=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":e=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,t=this.nextRegexToken(),r=this.getTokenRaw(t),e=this.finalize(n,new l.RegexLiteral(t.value,r,t.regex));break;default:this.throwUnexpectedToken(this.nextToken())}break;case a.Token.Keyword:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?e=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?e=this.finalize(n,new l.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?e=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),e=this.finalize(n,new l.ThisExpression)):this.matchKeyword("class")?e=this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:this.throwUnexpectedToken(this.nextToken())}return e},e.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new l.SpreadElement(t))},e.prototype.parseArrayInitializer=function(){var e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){var r=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(r)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new l.ArrayExpression(t))},e.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var t=this.context.strict,r=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,r},e.prototype.parsePropertyMethodFunction=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!1;var r=this.parseFormalParameters(),n=this.parsePropertyMethod(r);return this.context.allowYield=t,this.finalize(e,new l.FunctionExpression(null,r.params,n,!1))},e.prototype.parseObjectPropertyKey=function(){var e=this.createNode(),t=this.nextToken(),r=null;switch(t.type){case a.Token.StringLiteral:case a.Token.NumericLiteral:this.context.strict&&t.octal&&this.tolerateUnexpectedToken(t,i.Messages.StrictOctalLiteral);var n=this.getTokenRaw(t);r=this.finalize(e,new l.Literal(t.value,n));break;case a.Token.Identifier:case a.Token.BooleanLiteral:case a.Token.NullLiteral:case a.Token.Keyword:r=this.finalize(e,new l.Identifier(t.value));break;case a.Token.Punctuator:"["===t.value?(r=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):this.throwUnexpectedToken(t);break;default:this.throwUnexpectedToken(t)}return r},e.prototype.isPropertyKey=function(e,t){return e.type===u.Syntax.Identifier&&e.name===t||e.type===u.Syntax.Literal&&e.value===t},e.prototype.parseObjectProperty=function(e){var t,r,n,s=this.createNode(),o=this.lookahead,u=!1,c=!1,p=!1;o.type===a.Token.Identifier?(this.nextToken(),r=this.finalize(s,new l.Identifier(o.value))):this.match("*")?this.nextToken():(u=this.match("["),r=this.parseObjectPropertyKey());var h=this.qualifiedPropertyName(this.lookahead);if(o.type===a.Token.Identifier&&"get"===o.value&&h)t="get",u=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,n=this.parseGetterMethod();else if(o.type===a.Token.Identifier&&"set"===o.value&&h)t="set",u=this.match("["),r=this.parseObjectPropertyKey(),n=this.parseSetterMethod();else if(o.type===a.Token.Punctuator&&"*"===o.value&&h)t="init",u=this.match("["),r=this.parseObjectPropertyKey(),n=this.parseGeneratorMethod(),c=!0;else if(r||this.throwUnexpectedToken(this.lookahead),t="init",this.match(":"))!u&&this.isPropertyKey(r,"__proto__")&&(e.value&&this.tolerateError(i.Messages.DuplicateProtoProperty),e.value=!0),this.nextToken(),n=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))n=this.parsePropertyMethodFunction(),c=!0;else if(o.type===a.Token.Identifier){var f=this.finalize(s,new l.Identifier(o.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),p=!0;var d=this.isolateCoverGrammar(this.parseAssignmentExpression);n=this.finalize(s,new l.AssignmentPattern(f,d))}else p=!0,n=f}else this.throwUnexpectedToken(this.nextToken());return this.finalize(s,new l.Property(t,r,u,n,c,p))},e.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");for(var t=[],r={value:!1};!this.match("}");)t.push(this.parseObjectProperty(r)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(e,new l.ObjectExpression(t))},e.prototype.parseTemplateHead=function(){n.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode(),t=this.nextToken(),r={raw:t.value.raw,cooked:t.value.cooked};return this.finalize(e,new l.TemplateElement(r,t.tail))},e.prototype.parseTemplateElement=function(){this.lookahead.type!==a.Token.Template&&this.throwUnexpectedToken();var e=this.createNode(),t=this.nextToken(),r={raw:t.value.raw,cooked:t.value.cooked};return this.finalize(e,new l.TemplateElement(r,t.tail))},e.prototype.parseTemplateLiteral=function(){var e=this.createNode(),t=[],r=[],n=this.parseTemplateHead();for(r.push(n);!n.tail;)t.push(this.parseExpression()),n=this.parseTemplateElement(),r.push(n);return this.finalize(e,new l.TemplateLiteral(r,t))},e.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case u.Syntax.Identifier:case u.Syntax.MemberExpression:case u.Syntax.RestElement:case u.Syntax.AssignmentPattern:break;case u.Syntax.SpreadElement:e.type=u.Syntax.RestElement,this.reinterpretExpressionAsPattern(e.argument);break;case u.Syntax.ArrayExpression:e.type=u.Syntax.ArrayPattern;for(t=0;t<e.elements.length;t++)null!==e.elements[t]&&this.reinterpretExpressionAsPattern(e.elements[t]);break;case u.Syntax.ObjectExpression:e.type=u.Syntax.ObjectPattern;for(var t=0;t<e.properties.length;t++)this.reinterpretExpressionAsPattern(e.properties[t].value);break;case u.Syntax.AssignmentExpression:e.type=u.Syntax.AssignmentPattern,delete e.operator,this.reinterpretExpressionAsPattern(e.left)}},e.prototype.parseGroupExpression=function(){var e;if(this.expect("("),this.match(")"))this.nextToken(),this.match("=>")||this.expect("=>"),e={type:"ArrowParameterPlaceHolder",params:[]};else{var t=this.lookahead,r=[];if(this.match("..."))e=this.parseRestElement(r),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:"ArrowParameterPlaceHolder",params:[e]};else{var n=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var i=[];for(this.context.isAssignmentTarget=!1,i.push(e);this.startMarker.index<this.scanner.length&&this.match(",");){if(this.nextToken(),this.match("...")){this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),i.push(this.parseRestElement(r)),this.expect(")"),this.match("=>")||this.expect("=>"),this.context.isBindingElement=!1;for(s=0;s<i.length;s++)this.reinterpretExpressionAsPattern(i[s]);n=!0,e={type:"ArrowParameterPlaceHolder",params:i}}else i.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(n)break}n||(e=this.finalize(this.startNode(t),new l.SequenceExpression(i)))}if(!n){if(this.expect(")"),this.match("=>")&&(e.type===u.Syntax.Identifier&&"yield"===e.name&&(n=!0,e={type:"ArrowParameterPlaceHolder",params:[e]}),!n)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),e.type===u.Syntax.SequenceExpression)for(var s=0;s<e.expressions.length;s++)this.reinterpretExpressionAsPattern(e.expressions[s]);else this.reinterpretExpressionAsPattern(e);e={type:"ArrowParameterPlaceHolder",params:e.type===u.Syntax.SequenceExpression?e.expressions:[e]}}this.context.isBindingElement=!1}}}return e},e.prototype.parseArguments=function(){this.expect("(");var e=[];if(!this.match(")"))for(;;){var t=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAssignmentExpression);if(e.push(t),this.match(")"))break;this.expectCommaSeparator()}return this.expect(")"),e},e.prototype.isIdentifierName=function(e){return e.type===a.Token.Identifier||e.type===a.Token.Keyword||e.type===a.Token.BooleanLiteral||e.type===a.Token.NullLiteral},e.prototype.parseIdentifierName=function(){var e=this.createNode(),t=this.nextToken();return this.isIdentifierName(t)||this.throwUnexpectedToken(t),this.finalize(e,new l.Identifier(t.value))},e.prototype.parseNewExpression=function(){var e=this.createNode(),t=this.parseIdentifierName();n.assert("new"===t.name,"New expression must start with `new`");var r;if(this.match("."))if(this.nextToken(),this.lookahead.type===a.Token.Identifier&&this.context.inFunctionBody&&"target"===this.lookahead.value){var i=this.parseIdentifierName();r=new l.MetaProperty(t,i)}else this.throwUnexpectedToken(this.lookahead);else{var s=this.isolateCoverGrammar(this.parseLeftHandSideExpression),o=this.match("(")?this.parseArguments():[];r=new l.NewExpression(s,o),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return this.finalize(e,r)},e.prototype.parseLeftHandSideExpressionAllowCall=function(){var e=this.lookahead,t=this.context.allowIn;this.context.allowIn=!0;var r;for(this.matchKeyword("super")&&this.context.inFunctionBody?(r=this.createNode(),this.nextToken(),r=this.finalize(r,new l.Super),this.match("(")||this.match(".")||this.match("[")||this.throwUnexpectedToken(this.lookahead)):r=this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");i=this.parseIdentifierName();r=this.finalize(this.startNode(e),new l.StaticMemberExpression(r,i))}else if(this.match("(")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1;var n=this.parseArguments();r=this.finalize(this.startNode(e),new l.CallExpression(r,n))}else if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var i=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),r=this.finalize(this.startNode(e),new l.ComputedMemberExpression(r,i))}else{if(this.lookahead.type!==a.Token.Template||!this.lookahead.head)break;var s=this.parseTemplateLiteral();r=this.finalize(this.startNode(e),new l.TaggedTemplateExpression(r,s))}return this.context.allowIn=t,r},e.prototype.parseSuper=function(){var e=this.createNode();return this.expectKeyword("super"),this.match("[")||this.match(".")||this.throwUnexpectedToken(this.lookahead),this.finalize(e,new l.Super)},e.prototype.parseLeftHandSideExpression=function(){n.assert(this.context.allowIn,"callee of new expression always allow in keyword.");for(var e=this.startNode(this.lookahead),t=this.matchKeyword("super")&&this.context.inFunctionBody?this.parseSuper():this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");r=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),t=this.finalize(e,new l.ComputedMemberExpression(t,r))}else if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var r=this.parseIdentifierName();t=this.finalize(e,new l.StaticMemberExpression(t,r))}else{if(this.lookahead.type!==a.Token.Template||!this.lookahead.head)break;var i=this.parseTemplateLiteral();t=this.finalize(e,new l.TaggedTemplateExpression(t,i))}return t},e.prototype.parseUpdateExpression=function(){var e,t=this.lookahead;if(this.match("++")||this.match("--")){var r=this.startNode(t),n=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&e.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(e.name)&&this.tolerateError(i.Messages.StrictLHSPrefix),this.context.isAssignmentTarget||this.tolerateError(i.Messages.InvalidLHSInAssignment);o=!0;e=this.finalize(r,new l.UpdateExpression(n.value,e,o)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else if(e=this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall),!this.hasLineTerminator&&this.lookahead.type===a.Token.Punctuator&&(this.match("++")||this.match("--"))){this.context.strict&&e.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(e.name)&&this.tolerateError(i.Messages.StrictLHSPostfix),this.context.isAssignmentTarget||this.tolerateError(i.Messages.InvalidLHSInAssignment),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var s=this.nextToken().value,o=!1;e=this.finalize(this.startNode(t),new l.UpdateExpression(s,e,o))}return e},e.prototype.parseUnaryExpression=function(){var e;if(this.match("+")||this.match("-")||this.match("~")||this.match("!")||this.matchKeyword("delete")||this.matchKeyword("void")||this.matchKeyword("typeof")){var t=this.startNode(this.lookahead),r=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),e=this.finalize(t,new l.UnaryExpression(r.value,e)),this.context.strict&&"delete"===e.operator&&e.argument.type===u.Syntax.Identifier&&this.tolerateError(i.Messages.StrictDelete),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else e=this.parseUpdateExpression();return e},e.prototype.parseExponentiationExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseUnaryExpression);if(t.type!==u.Syntax.UnaryExpression&&this.match("**")){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var r=t,n=this.isolateCoverGrammar(this.parseExponentiationExpression);t=this.finalize(this.startNode(e),new l.BinaryExpression("**",r,n))}return t},e.prototype.binaryPrecedence=function(e){var t=e.value;return e.type===a.Token.Punctuator?this.operatorPrecedence[t]||0:e.type===a.Token.Keyword&&("instanceof"===t||this.context.allowIn&&"in"===t)?7:0},e.prototype.parseBinaryExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseExponentiationExpression),r=this.lookahead,n=this.binaryPrecedence(r);if(n>0){this.nextToken(),r.prec=n,this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var i=[e,this.lookahead],s=t,a=this.isolateCoverGrammar(this.parseExponentiationExpression),o=[s,r,a];;){if((n=this.binaryPrecedence(this.lookahead))<=0)break;for(;o.length>2&&n<=o[o.length-2].prec;){a=o.pop();var u=o.pop().value;s=o.pop(),i.pop();p=this.startNode(i[i.length-1]);o.push(this.finalize(p,new l.BinaryExpression(u,s,a)))}(r=this.nextToken()).prec=n,o.push(r),i.push(this.lookahead),o.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var c=o.length-1;for(t=o[c],i.pop();c>1;){var p=this.startNode(i.pop());t=this.finalize(p,new l.BinaryExpression(o[c-1].value,o[c-2],t)),c-=2}}return t},e.prototype.parseConditionalExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var r=this.context.allowIn;this.context.allowIn=!0;var n=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=r,this.expect(":");var i=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new l.ConditionalExpression(t,n,i)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return t},e.prototype.checkPatternParam=function(e,t){switch(t.type){case u.Syntax.Identifier:this.validateParam(e,t,t.name);break;case u.Syntax.RestElement:this.checkPatternParam(e,t.argument);break;case u.Syntax.AssignmentPattern:this.checkPatternParam(e,t.left);break;case u.Syntax.ArrayPattern:for(r=0;r<t.elements.length;r++)null!==t.elements[r]&&this.checkPatternParam(e,t.elements[r]);break;case u.Syntax.YieldExpression:break;default:n.assert(t.type===u.Syntax.ObjectPattern,"Invalid type");for(var r=0;r<t.properties.length;r++)this.checkPatternParam(e,t.properties[r].value)}},e.prototype.reinterpretAsCoverFormalsList=function(e){var t,r=[e];switch(e.type){case u.Syntax.Identifier:break;case"ArrowParameterPlaceHolder":r=e.params;break;default:return null}t={paramSet:{}};for(n=0;n<r.length;++n){(s=r[n]).type===u.Syntax.AssignmentPattern&&s.right.type===u.Syntax.YieldExpression&&(s.right.argument&&this.throwUnexpectedToken(this.lookahead),s.right.type=u.Syntax.Identifier,s.right.name="yield",delete s.right.argument,delete s.right.delegate),this.checkPatternParam(t,s),r[n]=s}if(this.context.strict||!this.context.allowYield)for(var n=0;n<r.length;++n){var s=r[n];s.type===u.Syntax.YieldExpression&&this.throwUnexpectedToken(this.lookahead)}if(t.message===i.Messages.StrictParamDupe){var a=this.context.strict?t.stricted:t.firstRestricted;this.throwUnexpectedToken(a,t.message)}return{params:r,stricted:t.stricted,firstRestricted:t.firstRestricted,message:t.message}},e.prototype.parseAssignmentExpression=function(){var e;if(!this.context.allowYield&&this.matchKeyword("yield"))e=this.parseYieldExpression();else{var t=this.lookahead,r=t;if("ArrowParameterPlaceHolder"===(e=this.parseConditionalExpression()).type||this.match("=>")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var n=this.reinterpretAsCoverFormalsList(e);if(n){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var s=this.context.strict,a=this.context.allowYield;this.context.allowYield=!0;var o=this.startNode(t);this.expect("=>");var c=this.match("{")?this.parseFunctionSourceElements():this.isolateCoverGrammar(this.parseAssignmentExpression),p=c.type!==u.Syntax.BlockStatement;this.context.strict&&n.firstRestricted&&this.throwUnexpectedToken(n.firstRestricted,n.message),this.context.strict&&n.stricted&&this.tolerateUnexpectedToken(n.stricted,n.message),e=this.finalize(o,new l.ArrowFunctionExpression(n.params,c,p)),this.context.strict=s,this.context.allowYield=a}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(i.Messages.InvalidLHSInAssignment),this.context.strict&&e.type===u.Syntax.Identifier){var h=e;this.scanner.isRestrictedWord(h.name)&&this.tolerateUnexpectedToken(r,i.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(h.name)&&this.tolerateUnexpectedToken(r,i.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),r=this.nextToken();var f=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new l.AssignmentExpression(r.value,e,f)),this.context.firstCoverInitializedNameError=null}}return e},e.prototype.parseExpression=function(){var e=this.lookahead,t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var r=[];for(r.push(t);this.startMarker.index<this.scanner.length&&this.match(",");)this.nextToken(),r.push(this.isolateCoverGrammar(this.parseAssignmentExpression));t=this.finalize(this.startNode(e),new l.SequenceExpression(r))}return t},e.prototype.parseStatementListItem=function(){var e=null;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,this.lookahead.type===a.Token.Keyword)switch(this.lookahead.value){case"export":"module"!==this.sourceType&&this.tolerateUnexpectedToken(this.lookahead,i.Messages.IllegalExportDeclaration),e=this.parseExportDeclaration();break;case"import":"module"!==this.sourceType&&this.tolerateUnexpectedToken(this.lookahead,i.Messages.IllegalImportDeclaration),e=this.parseImportDeclaration();break;case"const":e=this.parseLexicalDeclaration({inFor:!1});break;case"function":e=this.parseFunctionDeclaration();break;case"class":e=this.parseClassDeclaration();break;case"let":e=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:e=this.parseStatement()}else e=this.parseStatement();return e},e.prototype.parseBlock=function(){var e=this.createNode();this.expect("{");for(var t=[];;){if(this.match("}"))break;t.push(this.parseStatementListItem())}return this.expect("}"),this.finalize(e,new l.BlockStatement(t))},e.prototype.parseLexicalBinding=function(e,t){var r=this.createNode(),n=this.parsePattern([],e);this.context.strict&&n.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(i.Messages.StrictVarName);var s=null;return"const"===e?this.matchKeyword("in")||this.matchContextualKeyword("of")||(this.expect("="),s=this.isolateCoverGrammar(this.parseAssignmentExpression)):(!t.inFor&&n.type!==u.Syntax.Identifier||this.match("="))&&(this.expect("="),s=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(r,new l.VariableDeclarator(n,s))},e.prototype.parseBindingList=function(e,t){for(var r=[this.parseLexicalBinding(e,t)];this.match(",");)this.nextToken(),r.push(this.parseLexicalBinding(e,t));return r},e.prototype.isLexicalDeclaration=function(){var e=this.scanner.index,t=this.scanner.lineNumber,r=this.scanner.lineStart;this.collectComments();var n=this.scanner.lex();return this.scanner.index=e,this.scanner.lineNumber=t,this.scanner.lineStart=r,n.type===a.Token.Identifier||n.type===a.Token.Punctuator&&"["===n.value||n.type===a.Token.Punctuator&&"{"===n.value||n.type===a.Token.Keyword&&"let"===n.value||n.type===a.Token.Keyword&&"yield"===n.value},e.prototype.parseLexicalDeclaration=function(e){var t=this.createNode(),r=this.nextToken().value;n.assert("let"===r||"const"===r,"Lexical declaration must be either let or const");var i=this.parseBindingList(r,e);return this.consumeSemicolon(),this.finalize(t,new l.VariableDeclaration(i,r))},e.prototype.parseBindingRestElement=function(e,t){var r=this.createNode();this.expect("...");var n=this.parsePattern(e,t);return this.finalize(r,new l.RestElement(n))},e.prototype.parseArrayPattern=function(e,t){var r=this.createNode();this.expect("[");for(var n=[];!this.match("]");)if(this.match(","))this.nextToken(),n.push(null);else{if(this.match("...")){n.push(this.parseBindingRestElement(e,t));break}n.push(this.parsePatternWithDefault(e,t)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(r,new l.ArrayPattern(n))},e.prototype.parsePropertyPattern=function(e,t){var r,n,i=this.createNode(),s=!1,o=!1;if(this.lookahead.type===a.Token.Identifier){var u=this.lookahead;r=this.parseVariableIdentifier();var c=this.finalize(i,new l.Identifier(u.value));if(this.match("=")){e.push(u),o=!0,this.nextToken();var p=this.parseAssignmentExpression();n=this.finalize(this.startNode(u),new l.AssignmentPattern(c,p))}else this.match(":")?(this.expect(":"),n=this.parsePatternWithDefault(e,t)):(e.push(u),o=!0,n=c)}else s=this.match("["),r=this.parseObjectPropertyKey(),this.expect(":"),n=this.parsePatternWithDefault(e,t);return this.finalize(i,new l.Property("init",r,s,n,!1,o))},e.prototype.parseObjectPattern=function(e,t){var r=this.createNode(),n=[];for(this.expect("{");!this.match("}");)n.push(this.parsePropertyPattern(e,t)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(r,new l.ObjectPattern(n))},e.prototype.parsePattern=function(e,t){var r;return this.match("[")?r=this.parseArrayPattern(e,t):this.match("{")?r=this.parseObjectPattern(e,t):(!this.matchKeyword("let")||"const"!==t&&"let"!==t||this.tolerateUnexpectedToken(this.lookahead,i.Messages.UnexpectedToken),e.push(this.lookahead),r=this.parseVariableIdentifier(t)),r},e.prototype.parsePatternWithDefault=function(e,t){var r=this.lookahead,n=this.parsePattern(e,t);if(this.match("=")){this.nextToken();var i=this.context.allowYield;this.context.allowYield=!0;var s=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=i,n=this.finalize(this.startNode(r),new l.AssignmentPattern(n,s))}return n},e.prototype.parseVariableIdentifier=function(e){var t=this.createNode(),r=this.nextToken();return r.type===a.Token.Keyword&&"yield"===r.value?(this.context.strict&&this.tolerateUnexpectedToken(r,i.Messages.StrictReservedWord),this.context.allowYield||this.throwUnexpectedToken(r)):r.type!==a.Token.Identifier?this.context.strict&&r.type===a.Token.Keyword&&this.scanner.isStrictModeReservedWord(r.value)?this.tolerateUnexpectedToken(r,i.Messages.StrictReservedWord):(this.context.strict||"let"!==r.value||"var"!==e)&&this.throwUnexpectedToken(r):"module"===this.sourceType&&r.type===a.Token.Identifier&&"await"===r.value&&this.tolerateUnexpectedToken(r),this.finalize(t,new l.Identifier(r.value))},e.prototype.parseVariableDeclaration=function(e){var t=this.createNode(),r=this.parsePattern([],"var");this.context.strict&&r.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(r.name)&&this.tolerateError(i.Messages.StrictVarName);var n=null;return this.match("=")?(this.nextToken(),n=this.isolateCoverGrammar(this.parseAssignmentExpression)):r.type===u.Syntax.Identifier||e.inFor||this.expect("="),this.finalize(t,new l.VariableDeclarator(r,n))},e.prototype.parseVariableDeclarationList=function(e){var t={inFor:e.inFor},r=[];for(r.push(this.parseVariableDeclaration(t));this.match(",");)this.nextToken(),r.push(this.parseVariableDeclaration(t));return r},e.prototype.parseVariableStatement=function(){var e=this.createNode();this.expectKeyword("var");var t=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(e,new l.VariableDeclaration(t,"var"))},e.prototype.parseEmptyStatement=function(){var e=this.createNode();return this.expect(";"),this.finalize(e,new l.EmptyStatement)},e.prototype.parseExpressionStatement=function(){var e=this.createNode(),t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new l.ExpressionStatement(t))},e.prototype.parseIfStatement=function(){var e,t=this.createNode(),r=null;this.expectKeyword("if"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new l.EmptyStatement)):(this.expect(")"),e=this.parseStatement(),this.matchKeyword("else")&&(this.nextToken(),r=this.parseStatement())),this.finalize(t,new l.IfStatement(n,e,r))},e.prototype.parseDoWhileStatement=function(){var e=this.createNode();this.expectKeyword("do");var t=this.context.inIteration;this.context.inIteration=!0;var r=this.parseStatement();this.context.inIteration=t,this.expectKeyword("while"),this.expect("(");var n=this.parseExpression();return this.expect(")"),this.match(";")&&this.nextToken(),this.finalize(e,new l.DoWhileStatement(r,n))},e.prototype.parseWhileStatement=function(){var e,t=this.createNode();this.expectKeyword("while"),this.expect("(");var r=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new l.EmptyStatement);else{this.expect(")");var n=this.context.inIteration;this.context.inIteration=!0,e=this.parseStatement(),this.context.inIteration=n}return this.finalize(t,new l.WhileStatement(r,e))},e.prototype.parseForStatement=function(){var e,t,r=null,n=null,s=null,a=!0,o=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){r=this.createNode(),this.nextToken();d=this.context.allowIn;this.context.allowIn=!1;h=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=d,1===h.length&&this.matchKeyword("in")){var c=h[0];c.init&&(c.id.type===u.Syntax.ArrayPattern||c.id.type===u.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(i.Messages.ForInOfLoopInitializer,"for-in"),r=this.finalize(r,new l.VariableDeclaration(h,"var")),this.nextToken(),e=r,t=this.parseExpression(),r=null}else 1===h.length&&null===h[0].init&&this.matchContextualKeyword("of")?(r=this.finalize(r,new l.VariableDeclaration(h,"var")),this.nextToken(),e=r,t=this.parseAssignmentExpression(),r=null,a=!1):(r=this.finalize(r,new l.VariableDeclaration(h,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){r=this.createNode();var p=this.nextToken().value;if(this.context.strict||"in"!==this.lookahead.value){d=this.context.allowIn;this.context.allowIn=!1;var h=this.parseBindingList(p,{inFor:!0});this.context.allowIn=d,1===h.length&&null===h[0].init&&this.matchKeyword("in")?(r=this.finalize(r,new l.VariableDeclaration(h,p)),this.nextToken(),e=r,t=this.parseExpression(),r=null):1===h.length&&null===h[0].init&&this.matchContextualKeyword("of")?(r=this.finalize(r,new l.VariableDeclaration(h,p)),this.nextToken(),e=r,t=this.parseAssignmentExpression(),r=null,a=!1):(this.consumeSemicolon(),r=this.finalize(r,new l.VariableDeclaration(h,p)))}else r=this.finalize(r,new l.Identifier(p)),this.nextToken(),e=r,t=this.parseExpression(),r=null}else{var f=this.lookahead,d=this.context.allowIn;if(this.context.allowIn=!1,r=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=d,this.matchKeyword("in"))this.context.isAssignmentTarget&&r.type!==u.Syntax.AssignmentExpression||this.tolerateError(i.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(r),e=r,t=this.parseExpression(),r=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&r.type!==u.Syntax.AssignmentExpression||this.tolerateError(i.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(r),e=r,t=this.parseAssignmentExpression(),r=null,a=!1;else{if(this.match(",")){for(var m=[r];this.match(",");)this.nextToken(),m.push(this.isolateCoverGrammar(this.parseAssignmentExpression));r=this.finalize(this.startNode(f),new l.SequenceExpression(m))}this.expect(";")}}void 0===e&&(this.match(";")||(n=this.parseExpression()),this.expect(";"),this.match(")")||(s=this.parseExpression()));var y;if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),y=this.finalize(this.createNode(),new l.EmptyStatement);else{this.expect(")");var g=this.context.inIteration;this.context.inIteration=!0,y=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=g}return void 0===e?this.finalize(o,new l.ForStatement(r,n,s,y)):a?this.finalize(o,new l.ForInStatement(e,t,y)):this.finalize(o,new l.ForOfStatement(e,t,y))},e.prototype.parseContinueStatement=function(){var e=this.createNode();this.expectKeyword("continue");var t=null;if(this.lookahead.type===a.Token.Identifier&&!this.hasLineTerminator){var r="$"+(t=this.parseVariableIdentifier()).name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)||this.throwError(i.Messages.UnknownLabel,t.name)}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.throwError(i.Messages.IllegalContinue),this.finalize(e,new l.ContinueStatement(t))},e.prototype.parseBreakStatement=function(){var e=this.createNode();this.expectKeyword("break");var t=null;if(this.lookahead.type===a.Token.Identifier&&!this.hasLineTerminator){var r="$"+(t=this.parseVariableIdentifier()).name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)||this.throwError(i.Messages.UnknownLabel,t.name)}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.context.inSwitch||this.throwError(i.Messages.IllegalBreak),this.finalize(e,new l.BreakStatement(t))},e.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(i.Messages.IllegalReturn);var e=this.createNode();this.expectKeyword("return");var t=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&this.lookahead.type!==a.Token.EOF?this.parseExpression():null;return this.consumeSemicolon(),this.finalize(e,new l.ReturnStatement(t))},e.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(i.Messages.StrictModeWith);var e=this.createNode();this.expectKeyword("with"),this.expect("(");var t=this.parseExpression();this.expect(")");var r=this.parseStatement();return this.finalize(e,new l.WithStatement(t,r))},e.prototype.parseSwitchCase=function(){var e,t=this.createNode();this.matchKeyword("default")?(this.nextToken(),e=null):(this.expectKeyword("case"),e=this.parseExpression()),this.expect(":");for(var r=[];;){if(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"))break;r.push(this.parseStatementListItem())}return this.finalize(t,new l.SwitchCase(e,r))},e.prototype.parseSwitchStatement=function(){var e=this.createNode();this.expectKeyword("switch"),this.expect("(");var t=this.parseExpression();this.expect(")");var r=this.context.inSwitch;this.context.inSwitch=!0;var n=[],s=!1;for(this.expect("{");;){if(this.match("}"))break;var a=this.parseSwitchCase();null===a.test&&(s&&this.throwError(i.Messages.MultipleDefaultsInSwitch),s=!0),n.push(a)}return this.expect("}"),this.context.inSwitch=r,this.finalize(e,new l.SwitchStatement(t,n))},e.prototype.parseLabelledStatement=function(){var e,t=this.createNode(),r=this.parseExpression();if(r.type===u.Syntax.Identifier&&this.match(":")){this.nextToken();var n=r,s="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,s)&&this.throwError(i.Messages.Redeclaration,"Label",n.name),this.context.labelSet[s]=!0;var a=this.parseStatement();delete this.context.labelSet[s],e=new l.LabeledStatement(n,a)}else this.consumeSemicolon(),e=new l.ExpressionStatement(r);return this.finalize(t,e)},e.prototype.parseThrowStatement=function(){var e=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(i.Messages.NewlineAfterThrow);var t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new l.ThrowStatement(t))},e.prototype.parseCatchClause=function(){var e=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var t=[],r=this.parsePattern(t),n={},s=0;s<t.length;s++){var a="$"+t[s].value;Object.prototype.hasOwnProperty.call(n,a)&&this.tolerateError(i.Messages.DuplicateBinding,t[s].value),n[a]=!0}this.context.strict&&r.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(r.name)&&this.tolerateError(i.Messages.StrictCatchVariable),this.expect(")");var o=this.parseBlock();return this.finalize(e,new l.CatchClause(r,o))},e.prototype.parseFinallyClause=function(){return this.expectKeyword("finally"),this.parseBlock()},e.prototype.parseTryStatement=function(){var e=this.createNode();this.expectKeyword("try");var t=this.parseBlock(),r=this.matchKeyword("catch")?this.parseCatchClause():null,n=this.matchKeyword("finally")?this.parseFinallyClause():null;return r||n||this.throwError(i.Messages.NoCatchOrFinally),this.finalize(e,new l.TryStatement(t,r,n))},e.prototype.parseDebuggerStatement=function(){var e=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(e,new l.DebuggerStatement)},e.prototype.parseStatement=function(){var e=null;switch(this.lookahead.type){case a.Token.BooleanLiteral:case a.Token.NullLiteral:case a.Token.NumericLiteral:case a.Token.StringLiteral:case a.Token.Template:case a.Token.RegularExpression:e=this.parseExpressionStatement();break;case a.Token.Punctuator:var t=this.lookahead.value;e="{"===t?this.parseBlock():"("===t?this.parseExpressionStatement():";"===t?this.parseEmptyStatement():this.parseExpressionStatement();break;case a.Token.Identifier:e=this.parseLabelledStatement();break;case a.Token.Keyword:switch(this.lookahead.value){case"break":e=this.parseBreakStatement();break;case"continue":e=this.parseContinueStatement();break;case"debugger":e=this.parseDebuggerStatement();break;case"do":e=this.parseDoWhileStatement();break;case"for":e=this.parseForStatement();break;case"function":e=this.parseFunctionDeclaration();break;case"if":e=this.parseIfStatement();break;case"return":e=this.parseReturnStatement();break;case"switch":e=this.parseSwitchStatement();break;case"throw":e=this.parseThrowStatement();break;case"try":e=this.parseTryStatement();break;case"var":e=this.parseVariableStatement();break;case"while":e=this.parseWhileStatement();break;case"with":e=this.parseWithStatement();break;default:e=this.parseExpressionStatement()}break;default:this.throwUnexpectedToken(this.lookahead)}return e},e.prototype.parseFunctionSourceElements=function(){var e=this.createNode();this.expect("{");var t=this.parseDirectivePrologues(),r=this.context.labelSet,n=this.context.inIteration,i=this.context.inSwitch,s=this.context.inFunctionBody;for(this.context.labelSet={},this.context.inIteration=!1,this.context.inSwitch=!1,this.context.inFunctionBody=!0;this.startMarker.index<this.scanner.length&&!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.context.labelSet=r,this.context.inIteration=n,this.context.inSwitch=i,this.context.inFunctionBody=s,this.finalize(e,new l.BlockStatement(t))},e.prototype.validateParam=function(e,t,r){var n="$"+r;this.context.strict?(this.scanner.isRestrictedWord(r)&&(e.stricted=t,e.message=i.Messages.StrictParamName),Object.prototype.hasOwnProperty.call(e.paramSet,n)&&(e.stricted=t,e.message=i.Messages.StrictParamDupe)):e.firstRestricted||(this.scanner.isRestrictedWord(r)?(e.firstRestricted=t,e.message=i.Messages.StrictParamName):this.scanner.isStrictModeReservedWord(r)?(e.firstRestricted=t,e.message=i.Messages.StrictReservedWord):Object.prototype.hasOwnProperty.call(e.paramSet,n)&&(e.stricted=t,e.message=i.Messages.StrictParamDupe)),"function"==typeof Object.defineProperty?Object.defineProperty(e.paramSet,n,{value:!0,enumerable:!0,writable:!0,configurable:!0}):e.paramSet[n]=!0},e.prototype.parseRestElement=function(e){var t=this.createNode();this.expect("...");var r=this.parsePattern(e);return this.match("=")&&this.throwError(i.Messages.DefaultRestParameter),this.match(")")||this.throwError(i.Messages.ParameterAfterRestParameter),this.finalize(t,new l.RestElement(r))},e.prototype.parseFormalParameter=function(e){for(var t=[],r=this.match("...")?this.parseRestElement(t):this.parsePatternWithDefault(t),n=0;n<t.length;n++)this.validateParam(e,t[n],t[n].value);return e.params.push(r),!this.match(")")},e.prototype.parseFormalParameters=function(e){var t;if(t={params:[],firstRestricted:e},this.expect("("),!this.match(")"))for(t.paramSet={};this.startMarker.index<this.scanner.length&&this.parseFormalParameter(t);)this.expect(",");return this.expect(")"),{params:t.params,stricted:t.stricted,firstRestricted:t.firstRestricted,message:t.message}},e.prototype.parseFunctionDeclaration=function(e){var t=this.createNode();this.expectKeyword("function");var r=this.match("*");r&&this.nextToken();var n,s=null,a=null;if(!e||!this.match("(")){var o=this.lookahead;s=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(o.value)&&this.tolerateUnexpectedToken(o,i.Messages.StrictFunctionName):this.scanner.isRestrictedWord(o.value)?(a=o,n=i.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(o.value)&&(a=o,n=i.Messages.StrictReservedWord)}var u=this.context.allowYield;this.context.allowYield=!r;var c=this.parseFormalParameters(a),p=c.params,h=c.stricted;a=c.firstRestricted,c.message&&(n=c.message);var f=this.context.strict,d=this.parseFunctionSourceElements();return this.context.strict&&a&&this.throwUnexpectedToken(a,n),this.context.strict&&h&&this.tolerateUnexpectedToken(h,n),this.context.strict=f,this.context.allowYield=u,this.finalize(t,new l.FunctionDeclaration(s,p,d,r))},e.prototype.parseFunctionExpression=function(){var e=this.createNode();this.expectKeyword("function");var t=this.match("*");t&&this.nextToken();var r,n,s=null,a=this.context.allowYield;if(this.context.allowYield=!t,!this.match("(")){var o=this.lookahead;s=this.context.strict||t||!this.matchKeyword("yield")?this.parseVariableIdentifier():this.parseIdentifierName(),this.context.strict?this.scanner.isRestrictedWord(o.value)&&this.tolerateUnexpectedToken(o,i.Messages.StrictFunctionName):this.scanner.isRestrictedWord(o.value)?(n=o,r=i.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(o.value)&&(n=o,r=i.Messages.StrictReservedWord)}var u=this.parseFormalParameters(n),c=u.params,p=u.stricted;n=u.firstRestricted,u.message&&(r=u.message);var h=this.context.strict,f=this.parseFunctionSourceElements();return this.context.strict&&n&&this.throwUnexpectedToken(n,r),this.context.strict&&p&&this.tolerateUnexpectedToken(p,r),this.context.strict=h,this.context.allowYield=a,this.finalize(e,new l.FunctionExpression(s,c,f,t))},e.prototype.parseDirective=function(){var e=this.lookahead,t=null,r=this.createNode(),n=this.parseExpression();return n.type===u.Syntax.Literal&&(t=this.getTokenRaw(e).slice(1,-1)),this.consumeSemicolon(),this.finalize(r,t?new l.Directive(n,t):new l.ExpressionStatement(n))},e.prototype.parseDirectivePrologues=function(){for(var e=null,t=[];;){var r=this.lookahead;if(r.type!==a.Token.StringLiteral)break;var n=this.parseDirective();t.push(n);var s=n.directive;if("string"!=typeof s)break;"use strict"===s?(this.context.strict=!0,e&&this.tolerateUnexpectedToken(e,i.Messages.StrictOctalLiteral)):!e&&r.octal&&(e=r)}return t},e.prototype.qualifiedPropertyName=function(e){switch(e.type){case a.Token.Identifier:case a.Token.StringLiteral:case a.Token.BooleanLiteral:case a.Token.NullLiteral:case a.Token.NumericLiteral:case a.Token.Keyword:return!0;case a.Token.Punctuator:return"["===e.value}return!1},e.prototype.parseGetterMethod=function(){var e=this.createNode();this.expect("("),this.expect(")");var t={params:[],stricted:null,firstRestricted:null,message:null},r=this.context.allowYield;this.context.allowYield=!1;var n=this.parsePropertyMethod(t);return this.context.allowYield=r,this.finalize(e,new l.FunctionExpression(null,t.params,n,!1))},e.prototype.parseSetterMethod=function(){var e=this.createNode(),t={params:[],firstRestricted:null,paramSet:{}},r=this.context.allowYield;this.context.allowYield=!1,this.expect("("),this.match(")")?this.tolerateUnexpectedToken(this.lookahead):this.parseFormalParameter(t),this.expect(")");var n=this.parsePropertyMethod(t);return this.context.allowYield=r,this.finalize(e,new l.FunctionExpression(null,t.params,n,!1))},e.prototype.parseGeneratorMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var r=this.parseFormalParameters();this.context.allowYield=!1;var n=this.parsePropertyMethod(r);return this.context.allowYield=t,this.finalize(e,new l.FunctionExpression(null,r.params,n,!0))},e.prototype.isStartOfExpression=function(){var e=!0,t=this.lookahead.value;switch(this.lookahead.type){case a.Token.Punctuator:e="["===t||"("===t||"{"===t||"+"===t||"-"===t||"!"===t||"~"===t||"++"===t||"--"===t||"/"===t||"/="===t;break;case a.Token.Keyword:e="class"===t||"delete"===t||"function"===t||"let"===t||"new"===t||"super"===t||"this"===t||"typeof"===t||"void"===t||"yield"===t}return e},e.prototype.parseYieldExpression=function(){var e=this.createNode();this.expectKeyword("yield");var t=null,r=!1;if(!this.hasLineTerminator){var n=this.context.allowYield;this.context.allowYield=!1,(r=this.match("*"))?(this.nextToken(),t=this.parseAssignmentExpression()):this.isStartOfExpression()&&(t=this.parseAssignmentExpression()),this.context.allowYield=n}return this.finalize(e,new l.YieldExpression(t,r))},e.prototype.parseClassElement=function(e){var t,r,n,s=this.lookahead,o=this.createNode(),u=!1,c=!1,p=!1;if(this.match("*"))this.nextToken();else{u=this.match("[");"static"===(r=this.parseObjectPropertyKey()).name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(s=this.lookahead,p=!0,u=this.match("["),this.match("*")?this.nextToken():r=this.parseObjectPropertyKey())}var h=this.qualifiedPropertyName(this.lookahead);return s.type===a.Token.Identifier?"get"===s.value&&h?(t="get",u=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,n=this.parseGetterMethod()):"set"===s.value&&h&&(t="set",u=this.match("["),r=this.parseObjectPropertyKey(),n=this.parseSetterMethod()):s.type===a.Token.Punctuator&&"*"===s.value&&h&&(t="init",u=this.match("["),r=this.parseObjectPropertyKey(),n=this.parseGeneratorMethod(),c=!0),!t&&r&&this.match("(")&&(t="init",n=this.parsePropertyMethodFunction(),c=!0),t||this.throwUnexpectedToken(this.lookahead),"init"===t&&(t="method"),u||(p&&this.isPropertyKey(r,"prototype")&&this.throwUnexpectedToken(s,i.Messages.StaticPrototype),!p&&this.isPropertyKey(r,"constructor")&&("method"===t&&c&&!n.generator||this.throwUnexpectedToken(s,i.Messages.ConstructorSpecialMethod),e.value?this.throwUnexpectedToken(s,i.Messages.DuplicateConstructor):e.value=!0,t="constructor")),this.finalize(o,new l.MethodDefinition(r,u,n,t,p))},e.prototype.parseClassElementList=function(){var e=[],t={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():e.push(this.parseClassElement(t));return this.expect("}"),e},e.prototype.parseClassBody=function(){var e=this.createNode(),t=this.parseClassElementList();return this.finalize(e,new l.ClassBody(t))},e.prototype.parseClassDeclaration=function(e){var t=this.createNode(),r=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var n=e&&this.lookahead.type!==a.Token.Identifier?null:this.parseVariableIdentifier(),i=null;this.matchKeyword("extends")&&(this.nextToken(),i=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var s=this.parseClassBody();return this.context.strict=r,this.finalize(t,new l.ClassDeclaration(n,i,s))},e.prototype.parseClassExpression=function(){var e=this.createNode(),t=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var r=this.lookahead.type===a.Token.Identifier?this.parseVariableIdentifier():null,n=null;this.matchKeyword("extends")&&(this.nextToken(),n=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var i=this.parseClassBody();return this.context.strict=t,this.finalize(e,new l.ClassExpression(r,n,i))},e.prototype.parseProgram=function(){for(var e=this.createNode(),t=this.parseDirectivePrologues();this.startMarker.index<this.scanner.length;)t.push(this.parseStatementListItem());return this.finalize(e,new l.Program(t,this.sourceType))},e.prototype.parseModuleSpecifier=function(){var e=this.createNode();this.lookahead.type!==a.Token.StringLiteral&&this.throwError(i.Messages.InvalidModuleSpecifier);var t=this.nextToken(),r=this.getTokenRaw(t);return this.finalize(e,new l.Literal(t.value,r))},e.prototype.parseImportSpecifier=function(){var e,t,r=this.createNode();return this.lookahead.type===a.Token.Identifier?(t=e=this.parseVariableIdentifier(),this.matchContextualKeyword("as")&&(this.nextToken(),t=this.parseVariableIdentifier())):(t=e=this.parseIdentifierName(),this.matchContextualKeyword("as")?(this.nextToken(),t=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(r,new l.ImportSpecifier(t,e))},e.prototype.parseNamedImports=function(){this.expect("{");for(var e=[];!this.match("}");)e.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),e},e.prototype.parseImportDefaultSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName();return this.finalize(e,new l.ImportDefaultSpecifier(t))},e.prototype.parseImportNamespaceSpecifier=function(){var e=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(i.Messages.NoAsAfterImportNamespace),this.nextToken();var t=this.parseIdentifierName();return this.finalize(e,new l.ImportNamespaceSpecifier(t))},e.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(i.Messages.IllegalImportDeclaration);var e=this.createNode();this.expectKeyword("import");var t,r=[];if(this.lookahead.type===a.Token.StringLiteral)t=this.parseModuleSpecifier();else{if(this.match("{")?r=r.concat(this.parseNamedImports()):this.match("*")?r.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(r.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?r.push(this.parseImportNamespaceSpecifier()):this.match("{")?r=r.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var n=this.lookahead.value?i.Messages.UnexpectedToken:i.Messages.MissingFromClause;this.throwError(n,this.lookahead.value)}this.nextToken(),t=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(e,new l.ImportDeclaration(r,t))},e.prototype.parseExportSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName(),r=t;return this.matchContextualKeyword("as")&&(this.nextToken(),r=this.parseIdentifierName()),this.finalize(e,new l.ExportSpecifier(t,r))},e.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(i.Messages.IllegalExportDeclaration);var e=this.createNode();this.expectKeyword("export");var t;if(this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){n=this.parseFunctionDeclaration(!0);t=this.finalize(e,new l.ExportDefaultDeclaration(n))}else if(this.matchKeyword("class")){n=this.parseClassDeclaration(!0);t=this.finalize(e,new l.ExportDefaultDeclaration(n))}else{this.matchContextualKeyword("from")&&this.throwError(i.Messages.UnexpectedToken,this.lookahead.value);n=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon(),t=this.finalize(e,new l.ExportDefaultDeclaration(n))}else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){c=this.lookahead.value?i.Messages.UnexpectedToken:i.Messages.MissingFromClause;this.throwError(c,this.lookahead.value)}this.nextToken();var r=this.parseModuleSpecifier();this.consumeSemicolon(),t=this.finalize(e,new l.ExportAllDeclaration(r))}else if(this.lookahead.type===a.Token.Keyword){var n=void 0;switch(this.lookahead.value){case"let":case"const":n=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":n=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}t=this.finalize(e,new l.ExportNamedDeclaration(n,[],null))}else{var s=[],o=null,u=!1;for(this.expect("{");!this.match("}");)u=u||this.matchKeyword("default"),s.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");if(this.expect("}"),this.matchContextualKeyword("from"))this.nextToken(),o=this.parseModuleSpecifier(),this.consumeSemicolon();else if(u){var c=this.lookahead.value?i.Messages.UnexpectedToken:i.Messages.MissingFromClause;this.throwError(c,this.lookahead.value)}else this.consumeSemicolon();t=this.finalize(e,new l.ExportNamedDeclaration(null,s,o))}return t},e}();t.Parser=c},function(e,t){"use strict";t.assert=function(e,t){if(!e)throw new Error("ASSERT: "+t)}},function(e,t){"use strict";t.Messages={UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",DefaultRestParameter:"Unexpected token =",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ConstructorSpecialMethod:"Class constructor may not be an accessor",DuplicateConstructor:"A class may only have one constructor",StaticPrototype:"Classes may not have static property named prototype",MissingFromClause:"Unexpected token",NoAsAfterImportNamespace:"Unexpected token",InvalidModuleSpecifier:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalExportDeclaration:"Unexpected token",DuplicateBinding:"Duplicate binding %0",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer"}},function(e,t){"use strict";var r=function(){function e(){this.errors=[],this.tolerant=!1}return e.prototype.recordError=function(e){this.errors.push(e)},e.prototype.tolerate=function(e){if(!this.tolerant)throw e;this.recordError(e)},e.prototype.constructError=function(e,t){var r=new Error(e);try{throw r}catch(e){Object.create&&Object.defineProperty&&(r=Object.create(e),Object.defineProperty(r,"column",{value:t}))}finally{return r}},e.prototype.createError=function(e,t,r,n){var i="Line "+t+": "+n,s=this.constructError(i,r);return s.index=e,s.lineNumber=t,s.description=n,s},e.prototype.throwError=function(e,t,r,n){throw this.createError(e,t,r,n)},e.prototype.tolerateError=function(e,t,r,n){var i=this.createError(e,t,r,n);if(!this.tolerant)throw i;this.recordError(i)},e}();t.ErrorHandler=r},function(e,t){"use strict";!function(e){e[e.BooleanLiteral=1]="BooleanLiteral",e[e.EOF=2]="EOF",e[e.Identifier=3]="Identifier",e[e.Keyword=4]="Keyword",e[e.NullLiteral=5]="NullLiteral",e[e.NumericLiteral=6]="NumericLiteral",e[e.Punctuator=7]="Punctuator",e[e.StringLiteral=8]="StringLiteral",e[e.RegularExpression=9]="RegularExpression",e[e.Template=10]="Template"}(t.Token||(t.Token={}));var r=t.Token;t.TokenName={},t.TokenName[r.BooleanLiteral]="Boolean",t.TokenName[r.EOF]="<end>",t.TokenName[r.Identifier]="Identifier",t.TokenName[r.Keyword]="Keyword",t.TokenName[r.NullLiteral]="Null",t.TokenName[r.NumericLiteral]="Numeric",t.TokenName[r.Punctuator]="Punctuator",t.TokenName[r.StringLiteral]="String",t.TokenName[r.RegularExpression]="RegularExpression",t.TokenName[r.Template]="Template"},function(e,t,r){"use strict";function n(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function i(e){return"01234567".indexOf(e)}var s=r(4),a=r(5),o=r(9),u=r(7),l=function(){function e(e,t){this.source=e,this.errorHandler=t,this.trackComment=!1,this.length=e.length,this.index=0,this.lineNumber=e.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return e.prototype.eof=function(){return this.index>=this.length},e.prototype.throwUnexpectedToken=function(e){void 0===e&&(e=a.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.tolerateUnexpectedToken=function(){this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,a.Messages.UnexpectedTokenIllegal)},e.prototype.skipSingleLineComment=function(e){var t,r,n;for(this.trackComment&&(t=[],r=this.index-e,n={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){var i=this.source.charCodeAt(this.index);if(++this.index,o.Character.isLineTerminator(i)){if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart-1};s={multiLine:!1,slice:[r+e,this.index-1],range:[r,this.index-1],loc:n};t.push(s)}return 13===i&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t}}if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart};var s={multiLine:!1,slice:[r+e,this.index],range:[r,this.index],loc:n};t.push(s)}return t},e.prototype.skipMultiLineComment=function(){var e,t,r;for(this.trackComment&&(e=[],t=this.index-2,r={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var n=this.source.charCodeAt(this.index);if(o.Character.isLineTerminator(n))13===n&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===n){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart};i={multiLine:!0,slice:[t+2,this.index-2],range:[t,this.index],loc:r};e.push(i)}return e}++this.index}else++this.index}if(this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart};var i={multiLine:!0,slice:[t+2,this.index],range:[t,this.index],loc:r};e.push(i)}return this.tolerateUnexpectedToken(),e},e.prototype.scanComments=function(){var e;this.trackComment&&(e=[]);for(var t=0===this.index;!this.eof();){var r=this.source.charCodeAt(this.index);if(o.Character.isWhiteSpace(r))++this.index;else if(o.Character.isLineTerminator(r))++this.index,13===r&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(47===r)if(47===(r=this.source.charCodeAt(this.index+1))){this.index+=2;n=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(n)),t=!0}else{if(42!==r)break;this.index+=2;n=this.skipMultiLineComment();this.trackComment&&(e=e.concat(n))}else if(t&&45===r){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3;n=this.skipSingleLineComment(3);this.trackComment&&(e=e.concat(n))}else{if(60!==r)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4;var n=this.skipSingleLineComment(4);this.trackComment&&(e=e.concat(n))}}return e},e.prototype.isFutureReservedWord=function(e){switch(e){case"enum":case"export":case"import":case"super":return!0;default:return!1}},e.prototype.isStrictModeReservedWord=function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},e.prototype.isRestrictedWord=function(e){return"eval"===e||"arguments"===e},e.prototype.isKeyword=function(e){switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}},e.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){var r=this.source.charCodeAt(e+1);if(r>=56320&&r<=57343){t=1024*(t-55296)+r-56320+65536}}return t},e.prototype.scanHexEscape=function(e){for(var t="u"===e?4:2,r=0,i=0;i<t;++i){if(this.eof()||!o.Character.isHexDigit(this.source.charCodeAt(this.index)))return"";r=16*r+n(this.source[this.index++])}return String.fromCharCode(r)},e.prototype.scanUnicodeCodePointEscape=function(){var e=this.source[this.index],t=0;for("}"===e&&this.throwUnexpectedToken();!this.eof()&&(e=this.source[this.index++],o.Character.isHexDigit(e.charCodeAt(0)));)t=16*t+n(e);return(t>1114111||"}"!==e)&&this.throwUnexpectedToken(),o.Character.fromCodePoint(t)},e.prototype.getIdentifier=function(){for(var e=this.index++;!this.eof();){var t=this.source.charCodeAt(this.index);if(92===t)return this.index=e,this.getComplexIdentifier();if(t>=55296&&t<57343)return this.index=e,this.getComplexIdentifier();if(!o.Character.isIdentifierPart(t))break;++this.index}return this.source.slice(e,this.index)},e.prototype.getComplexIdentifier=function(){var e=this.codePointAt(this.index),t=o.Character.fromCodePoint(e);this.index+=t.length;var r;for(92===e&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,r=this.scanUnicodeCodePointEscape()):(e=(r=this.scanHexEscape("u")).charCodeAt(0),r&&"\\"!==r&&o.Character.isIdentifierStart(e)||this.throwUnexpectedToken()),t=r);!this.eof()&&(e=this.codePointAt(this.index),o.Character.isIdentifierPart(e));)t+=r=o.Character.fromCodePoint(e),this.index+=r.length,92===e&&(t=t.substr(0,t.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,r=this.scanUnicodeCodePointEscape()):(e=(r=this.scanHexEscape("u")).charCodeAt(0),r&&"\\"!==r&&o.Character.isIdentifierPart(e)||this.throwUnexpectedToken()),t+=r);return t},e.prototype.octalToDecimal=function(e){var t="0"!==e,r=i(e);return!this.eof()&&o.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,r=8*r+i(this.source[this.index++]),"0123".indexOf(e)>=0&&!this.eof()&&o.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(r=8*r+i(this.source[this.index++]))),{code:r,octal:t}},e.prototype.scanIdentifier=function(){var e,t=this.index,r=92===this.source.charCodeAt(t)?this.getComplexIdentifier():this.getIdentifier();return e=1===r.length?u.Token.Identifier:this.isKeyword(r)?u.Token.Keyword:"null"===r?u.Token.NullLiteral:"true"===r||"false"===r?u.Token.BooleanLiteral:u.Token.Identifier,{type:e,value:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.scanPunctuator=function(){var e={type:u.Token.Punctuator,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index},t=this.source[this.index];switch(t){case"(":case"{":"{"===t&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,t="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:">>>="===(t=this.source.substr(this.index,4))?this.index+=4:"==="===(t=t.substr(0,3))||"!=="===t||">>>"===t||"<<="===t||">>="===t||"**="===t?this.index+=3:"&&"===(t=t.substr(0,2))||"||"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t||"**"===t?this.index+=2:(t=this.source[this.index],"<>=!+-*%&|^/".indexOf(t)>=0&&++this.index)}return this.index===e.start&&this.throwUnexpectedToken(),e.end=this.index,e.value=t,e},e.prototype.scanHexLiteral=function(e){for(var t="";!this.eof()&&o.Character.isHexDigit(this.source.charCodeAt(this.index));)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),o.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:u.Token.NumericLiteral,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanBinaryLiteral=function(e){for(var t,r="";!this.eof()&&("0"===(t=this.source[this.index])||"1"===t);)r+=this.source[this.index++];return 0===r.length&&this.throwUnexpectedToken(),this.eof()||(t=this.source.charCodeAt(this.index),(o.Character.isIdentifierStart(t)||o.Character.isDecimalDigit(t))&&this.throwUnexpectedToken()),{type:u.Token.NumericLiteral,value:parseInt(r,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanOctalLiteral=function(e,t){var r="",n=!1;for(o.Character.isOctalDigit(e.charCodeAt(0))?(n=!0,r="0"+this.source[this.index++]):++this.index;!this.eof()&&o.Character.isOctalDigit(this.source.charCodeAt(this.index));)r+=this.source[this.index++];return n||0!==r.length||this.throwUnexpectedToken(),(o.Character.isIdentifierStart(this.source.charCodeAt(this.index))||o.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:u.Token.NumericLiteral,value:parseInt(r,8),octal:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1;e<this.length;++e){var t=this.source[e];if("8"===t||"9"===t)return!1;if(!o.Character.isOctalDigit(t.charCodeAt(0)))return!0}return!0},e.prototype.scanNumericLiteral=function(){var e=this.index,t=this.source[e];s.assert(o.Character.isDecimalDigit(t.charCodeAt(0))||"."===t,"Numeric literal must start with a decimal digit or a decimal point");var r="";if("."!==t){if(r=this.source[this.index++],t=this.source[this.index],"0"===r){if("x"===t||"X"===t)return++this.index,this.scanHexLiteral(e);if("b"===t||"B"===t)return++this.index,this.scanBinaryLiteral(e);if("o"===t||"O"===t)return this.scanOctalLiteral(t,e);if(t&&o.Character.isOctalDigit(t.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(t,e)}for(;o.Character.isDecimalDigit(this.source.charCodeAt(this.index));)r+=this.source[this.index++];t=this.source[this.index]}if("."===t){for(r+=this.source[this.index++];o.Character.isDecimalDigit(this.source.charCodeAt(this.index));)r+=this.source[this.index++];t=this.source[this.index]}if("e"===t||"E"===t)if(r+=this.source[this.index++],"+"!==(t=this.source[this.index])&&"-"!==t||(r+=this.source[this.index++]),o.Character.isDecimalDigit(this.source.charCodeAt(this.index)))for(;o.Character.isDecimalDigit(this.source.charCodeAt(this.index));)r+=this.source[this.index++];else this.throwUnexpectedToken();return o.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:u.Token.NumericLiteral,value:parseFloat(r),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanStringLiteral=function(){var e=this.index,t=this.source[e];s.assert("'"===t||'"'===t,"String literal must starts with a quote"),++this.index;for(var r=!1,n="";!this.eof();){var i=this.source[this.index++];if(i===t){t="";break}if("\\"===i)if((i=this.source[this.index++])&&o.Character.isLineTerminator(i.charCodeAt(0)))++this.lineNumber,"\r"===i&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(i){case"u":case"x":if("{"===this.source[this.index])++this.index,n+=this.scanUnicodeCodePointEscape();else{var a=this.scanHexEscape(i);a||this.throwUnexpectedToken(),n+=a}break;case"n":n+="\n";break;case"r":n+="\r";break;case"t":n+="\t";break;case"b":n+="\b";break;case"f":n+="\f";break;case"v":n+="\v";break;case"8":case"9":n+=i,this.tolerateUnexpectedToken();break;default:if(i&&o.Character.isOctalDigit(i.charCodeAt(0))){var l=this.octalToDecimal(i);r=l.octal||r,n+=String.fromCharCode(l.code)}else n+=i}else{if(o.Character.isLineTerminator(i.charCodeAt(0)))break;n+=i}}return""!==t&&(this.index=e,this.throwUnexpectedToken()),{type:u.Token.StringLiteral,value:n,octal:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanTemplate=function(){var e="",t=!1,r=this.index,n="`"===this.source[r],i=!1,s=2;for(++this.index;!this.eof();){var l=this.source[this.index++];if("`"===l){s=1,i=!0,t=!0;break}if("$"===l){if("{"===this.source[this.index]){this.curlyStack.push("${"),++this.index,t=!0;break}e+=l}else if("\\"===l)if(l=this.source[this.index++],o.Character.isLineTerminator(l.charCodeAt(0)))++this.lineNumber,"\r"===l&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(l){case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+="\t";break;case"u":case"x":if("{"===this.source[this.index])++this.index,e+=this.scanUnicodeCodePointEscape();else{var c=this.index,p=this.scanHexEscape(l);p?e+=p:(this.index=c,e+=l)}break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:"0"===l?(o.Character.isDecimalDigit(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(a.Messages.TemplateOctalLiteral),e+="\0"):o.Character.isOctalDigit(l.charCodeAt(0))?this.throwUnexpectedToken(a.Messages.TemplateOctalLiteral):e+=l}else o.Character.isLineTerminator(l.charCodeAt(0))?(++this.lineNumber,"\r"===l&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index,e+="\n"):e+=l}return t||this.throwUnexpectedToken(),n||this.curlyStack.pop(),{type:u.Token.Template,value:{cooked:e,raw:this.source.slice(r+1,this.index-s)},head:n,tail:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:r,end:this.index}},e.prototype.testRegExp=function(e,t){var r=e,n=this;t.indexOf("u")>=0&&(r=r.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(e,t,r){var i=parseInt(t||r,16);return i>1114111&&n.throwUnexpectedToken(a.Messages.InvalidRegExp),i<=65535?String.fromCharCode(i):"￿"}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"￿"));try{RegExp(r)}catch(e){this.throwUnexpectedToken(a.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}},e.prototype.scanRegExpBody=function(){var e=this.source[this.index];s.assert("/"===e,"Regular expression literal must start with a slash");for(var t=this.source[this.index++],r=!1,n=!1;!this.eof();)if(e=this.source[this.index++],t+=e,"\\"===e)e=this.source[this.index++],o.Character.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(a.Messages.UnterminatedRegExp),t+=e;else if(o.Character.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(a.Messages.UnterminatedRegExp);else if(r)"]"===e&&(r=!1);else{if("/"===e){n=!0;break}"["===e&&(r=!0)}n||this.throwUnexpectedToken(a.Messages.UnterminatedRegExp);return{value:t.substr(1,t.length-2),literal:t}},e.prototype.scanRegExpFlags=function(){for(var e="",t="";!this.eof();){var r=this.source[this.index];if(!o.Character.isIdentifierPart(r.charCodeAt(0)))break;if(++this.index,"\\"!==r||this.eof())t+=r,e+=r;else if("u"===(r=this.source[this.index])){++this.index;var n=this.index;if(r=this.scanHexEscape("u"))for(t+=r,e+="\\u";n<this.index;++n)e+=this.source[n];else this.index=n,t+="u",e+="\\u";this.tolerateUnexpectedToken()}else e+="\\",this.tolerateUnexpectedToken()}return{value:t,literal:e}},e.prototype.scanRegExp=function(){var e=this.index,t=this.scanRegExpBody(),r=this.scanRegExpFlags(),n=this.testRegExp(t.value,r.value);return{type:u.Token.RegularExpression,value:n,literal:t.literal+r.literal,regex:{pattern:t.value,flags:r.value},lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.lex=function(){if(this.eof())return{type:u.Token.EOF,lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};var e=this.source.charCodeAt(this.index);return o.Character.isIdentifierStart(e)?this.scanIdentifier():40===e||41===e||59===e?this.scanPunctuator():39===e||34===e?this.scanStringLiteral():46===e?o.Character.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():o.Character.isDecimalDigit(e)?this.scanNumericLiteral():96===e||125===e&&"${"===this.curlyStack[this.curlyStack.length-1]?this.scanTemplate():e>=55296&&e<57343&&o.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},e}();t.Scanner=l},function(e,t){"use strict";var r={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&r.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&r.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return e>=48&&e<=57},isHexDigit:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},isOctalDigit:function(e){return e>=48&&e<=55}}},function(e,t,r){"use strict";var n=r(2),i=function(){return function(e){this.type=n.Syntax.ArrayExpression,this.elements=e}}();t.ArrayExpression=i;var s=function(){return function(e){this.type=n.Syntax.ArrayPattern,this.elements=e}}();t.ArrayPattern=s;var a=function(){return function(e,t,r){this.type=n.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=r}}();t.ArrowFunctionExpression=a;var o=function(){return function(e,t,r){this.type=n.Syntax.AssignmentExpression,this.operator=e,this.left=t,this.right=r}}();t.AssignmentExpression=o;var u=function(){return function(e,t){this.type=n.Syntax.AssignmentPattern,this.left=e,this.right=t}}();t.AssignmentPattern=u;var l=function(){return function(e,t,r){var i="||"===e||"&&"===e;this.type=i?n.Syntax.LogicalExpression:n.Syntax.BinaryExpression,this.operator=e,this.left=t,this.right=r}}();t.BinaryExpression=l;var c=function(){return function(e){this.type=n.Syntax.BlockStatement,this.body=e}}();t.BlockStatement=c;var p=function(){return function(e){this.type=n.Syntax.BreakStatement,this.label=e}}();t.BreakStatement=p;var h=function(){return function(e,t){this.type=n.Syntax.CallExpression,this.callee=e,this.arguments=t}}();t.CallExpression=h;var f=function(){return function(e,t){this.type=n.Syntax.CatchClause,this.param=e,this.body=t}}();t.CatchClause=f;var d=function(){return function(e){this.type=n.Syntax.ClassBody,this.body=e}}();t.ClassBody=d;var m=function(){return function(e,t,r){this.type=n.Syntax.ClassDeclaration,this.id=e,this.superClass=t,this.body=r}}();t.ClassDeclaration=m;var y=function(){return function(e,t,r){this.type=n.Syntax.ClassExpression,this.id=e,this.superClass=t,this.body=r}}();t.ClassExpression=y;var g=function(){return function(e,t){this.type=n.Syntax.MemberExpression,this.computed=!0,this.object=e,this.property=t}}();t.ComputedMemberExpression=g;var b=function(){return function(e,t,r){this.type=n.Syntax.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=r}}();t.ConditionalExpression=b;var v=function(){return function(e){this.type=n.Syntax.ContinueStatement,this.label=e}}();t.ContinueStatement=v;var x=function(){return function(){this.type=n.Syntax.DebuggerStatement}}();t.DebuggerStatement=x;var E=function(){return function(e,t){this.type=n.Syntax.ExpressionStatement,this.expression=e,this.directive=t}}();t.Directive=E;var A=function(){return function(e,t){this.type=n.Syntax.DoWhileStatement,this.body=e,this.test=t}}();t.DoWhileStatement=A;var D=function(){return function(){this.type=n.Syntax.EmptyStatement}}();t.EmptyStatement=D;var C=function(){return function(e){this.type=n.Syntax.ExportAllDeclaration,this.source=e}}();t.ExportAllDeclaration=C;var S=function(){return function(e){this.type=n.Syntax.ExportDefaultDeclaration,this.declaration=e}}();t.ExportDefaultDeclaration=S;var _=function(){return function(e,t,r){this.type=n.Syntax.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=r}}();t.ExportNamedDeclaration=_;var w=function(){return function(e,t){this.type=n.Syntax.ExportSpecifier,this.exported=t,this.local=e}}();t.ExportSpecifier=w;var k=function(){return function(e){this.type=n.Syntax.ExpressionStatement,this.expression=e}}();t.ExpressionStatement=k;var F=function(){return function(e,t,r){this.type=n.Syntax.ForInStatement,this.left=e,this.right=t,this.body=r,this.each=!1}}();t.ForInStatement=F;var T=function(){return function(e,t,r){this.type=n.Syntax.ForOfStatement,this.left=e,this.right=t,this.body=r}}();t.ForOfStatement=T;var P=function(){return function(e,t,r,i){this.type=n.Syntax.ForStatement,this.init=e,this.test=t,this.update=r,this.body=i}}();t.ForStatement=P;var B=function(){return function(e,t,r,i){this.type=n.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=r,this.generator=i,this.expression=!1}}();t.FunctionDeclaration=B;var O=function(){return function(e,t,r,i){this.type=n.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=r,this.generator=i,this.expression=!1}}();t.FunctionExpression=O;var j=function(){return function(e){this.type=n.Syntax.Identifier,this.name=e}}();t.Identifier=j;var N=function(){return function(e,t,r){this.type=n.Syntax.IfStatement,this.test=e,this.consequent=t,this.alternate=r}}();t.IfStatement=N;var I=function(){return function(e,t){this.type=n.Syntax.ImportDeclaration,this.specifiers=e,this.source=t}}();t.ImportDeclaration=I;var L=function(){return function(e){this.type=n.Syntax.ImportDefaultSpecifier,this.local=e}}();t.ImportDefaultSpecifier=L;var M=function(){return function(e){this.type=n.Syntax.ImportNamespaceSpecifier,this.local=e}}();t.ImportNamespaceSpecifier=M;var R=function(){return function(e,t){this.type=n.Syntax.ImportSpecifier,this.local=e,this.imported=t}}();t.ImportSpecifier=R;var V=function(){return function(e,t){this.type=n.Syntax.LabeledStatement,this.label=e,this.body=t}}();t.LabeledStatement=V;var U=function(){return function(e,t){this.type=n.Syntax.Literal,this.value=e,this.raw=t}}();t.Literal=U;var q=function(){return function(e,t){this.type=n.Syntax.MetaProperty,this.meta=e,this.property=t}}();t.MetaProperty=q;var G=function(){return function(e,t,r,i,s){this.type=n.Syntax.MethodDefinition,this.key=e,this.computed=t,this.value=r,this.kind=i,this.static=s}}();t.MethodDefinition=G;var X=function(){return function(e,t){this.type=n.Syntax.NewExpression,this.callee=e,this.arguments=t}}();t.NewExpression=X;var W=function(){return function(e){this.type=n.Syntax.ObjectExpression,this.properties=e}}();t.ObjectExpression=W;var J=function(){return function(e){this.type=n.Syntax.ObjectPattern,this.properties=e}}();t.ObjectPattern=J;var K=function(){return function(e,t){this.type=n.Syntax.Program,this.body=e,this.sourceType=t}}();t.Program=K;var z=function(){return function(e,t,r,i,s,a){this.type=n.Syntax.Property,this.key=t,this.computed=r,this.value=i,this.kind=e,this.method=s,this.shorthand=a}}();t.Property=z;var Y=function(){return function(e,t,r){this.type=n.Syntax.Literal,this.value=e,this.raw=t,this.regex=r}}();t.RegexLiteral=Y;var H=function(){return function(e){this.type=n.Syntax.RestElement,this.argument=e}}();t.RestElement=H;var $=function(){return function(e){this.type=n.Syntax.ReturnStatement,this.argument=e}}();t.ReturnStatement=$;var Q=function(){return function(e){this.type=n.Syntax.SequenceExpression,this.expressions=e}}();t.SequenceExpression=Q;var Z=function(){return function(e){this.type=n.Syntax.SpreadElement,this.argument=e}}();t.SpreadElement=Z;var ee=function(){return function(e,t){this.type=n.Syntax.MemberExpression,this.computed=!1,this.object=e,this.property=t}}();t.StaticMemberExpression=ee;var te=function(){return function(){this.type=n.Syntax.Super}}();t.Super=te;var re=function(){return function(e,t){this.type=n.Syntax.SwitchCase,this.test=e,this.consequent=t}}();t.SwitchCase=re;var ne=function(){return function(e,t){this.type=n.Syntax.SwitchStatement,this.discriminant=e,this.cases=t}}();t.SwitchStatement=ne;var ie=function(){return function(e,t){this.type=n.Syntax.TaggedTemplateExpression,this.tag=e,this.quasi=t}}();t.TaggedTemplateExpression=ie;var se=function(){return function(e,t){this.type=n.Syntax.TemplateElement,this.value=e,this.tail=t}}();t.TemplateElement=se;var ae=function(){return function(e,t){this.type=n.Syntax.TemplateLiteral,this.quasis=e,this.expressions=t}}();t.TemplateLiteral=ae;var oe=function(){return function(){this.type=n.Syntax.ThisExpression}}();t.ThisExpression=oe;var ue=function(){return function(e){this.type=n.Syntax.ThrowStatement,this.argument=e}}();t.ThrowStatement=ue;var le=function(){return function(e,t,r){this.type=n.Syntax.TryStatement,this.block=e,this.handler=t,this.finalizer=r}}();t.TryStatement=le;var ce=function(){return function(e,t){this.type=n.Syntax.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0}}();t.UnaryExpression=ce;var pe=function(){return function(e,t,r){this.type=n.Syntax.UpdateExpression,this.operator=e,this.argument=t,this.prefix=r}}();t.UpdateExpression=pe;var he=function(){return function(e,t){this.type=n.Syntax.VariableDeclaration,this.declarations=e,this.kind=t}}();t.VariableDeclaration=he;var fe=function(){return function(e,t){this.type=n.Syntax.VariableDeclarator,this.id=e,this.init=t}}();t.VariableDeclarator=fe;var de=function(){return function(e,t){this.type=n.Syntax.WhileStatement,this.test=e,this.body=t}}();t.WhileStatement=de;var me=function(){return function(e,t){this.type=n.Syntax.WithStatement,this.object=e,this.body=t}}();t.WithStatement=me;var ye=function(){return function(e,t){this.type=n.Syntax.YieldExpression,this.argument=e,this.delegate=t}}();t.YieldExpression=ye},function(e,t,r){"use strict";function n(e){var t;switch(e.type){case c.JSXSyntax.JSXIdentifier:t=e.name;break;case c.JSXSyntax.JSXNamespacedName:var r=e;t=n(r.namespace)+":"+n(r.name);break;case c.JSXSyntax.JSXMemberExpression:var i=e;t=n(i.object)+"."+n(i.property)}return t}var i,s=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},a=r(9),o=r(7),u=r(3),l=r(12),c=r(13),p=r(10),h=r(14);!function(e){e[e.Identifier=100]="Identifier",e[e.Text=101]="Text"}(i||(i={})),o.TokenName[i.Identifier]="JSXIdentifier",o.TokenName[i.Text]="JSXText";var f=function(e){function t(t,r,n){e.call(this,t,r,n)}return s(t,e),t.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():e.prototype.parsePrimaryExpression.call(this)},t.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.lineNumber,this.scanner.lineStart=this.startMarker.lineStart},t.prototype.finishJSX=function(){this.nextToken()},t.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},t.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.scanXHTMLEntity=function(e){for(var t="&",r=!0,n=!1,i=!1,s=!1;!this.scanner.eof()&&r&&!n;){var o=this.scanner.source[this.scanner.index];if(o===e)break;if(n=";"===o,t+=o,++this.scanner.index,!n)switch(t.length){case 2:i="#"===o;break;case 3:i&&(r=(s="x"===o)||a.Character.isDecimalDigit(o.charCodeAt(0)),i=i&&!s);break;default:r=(r=r&&!(i&&!a.Character.isDecimalDigit(o.charCodeAt(0))))&&!(s&&!a.Character.isHexDigit(o.charCodeAt(0)))}}if(r&&n&&t.length>2){var u=t.substr(1,t.length-2);i&&u.length>1?t=String.fromCharCode(parseInt(u.substr(1),10)):s&&u.length>2?t=String.fromCharCode(parseInt("0"+u.substr(1),16)):i||s||!l.XHTMLEntities[u]||(t=l.XHTMLEntities[u])}return t},t.prototype.lexJSX=function(){var e=this.scanner.source.charCodeAt(this.scanner.index);if(60===e||62===e||47===e||58===e||61===e||123===e||125===e){l=this.scanner.source[this.scanner.index++];return{type:o.Token.Punctuator,value:l,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index}}if(34===e||39===e){for(var t=this.scanner.index,r=this.scanner.source[this.scanner.index++],n="";!this.scanner.eof();){if((c=this.scanner.source[this.scanner.index++])===r)break;n+="&"===c?this.scanXHTMLEntity(r):c}return{type:o.Token.StringLiteral,value:n,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}if(46===e){var s=this.scanner.source.charCodeAt(this.scanner.index+1),u=this.scanner.source.charCodeAt(this.scanner.index+2),l=46===s&&46===u?"...":".",t=this.scanner.index;return this.scanner.index+=l.length,{type:o.Token.Punctuator,value:l,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}if(96===e)return{type:o.Token.Template,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(a.Character.isIdentifierStart(e)&&92!==e){t=this.scanner.index;for(++this.scanner.index;!this.scanner.eof();){var c=this.scanner.source.charCodeAt(this.scanner.index);if(a.Character.isIdentifierPart(c)&&92!==c)++this.scanner.index;else{if(45!==c)break;++this.scanner.index}}var p=this.scanner.source.slice(t,this.scanner.index);return{type:i.Identifier,value:p,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}this.scanner.throwUnexpectedToken()},t.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.lineNumber=this.scanner.lineNumber,this.startMarker.lineStart=this.scanner.lineStart;var e=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(e)),e},t.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.lineNumber=this.scanner.lineNumber,this.startMarker.lineStart=this.scanner.lineStart;for(var e=this.scanner.index,t="";!this.scanner.eof();){var r=this.scanner.source[this.scanner.index];if("{"===r||"<"===r)break;++this.scanner.index,t+=r,a.Character.isLineTerminator(r.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===r&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart;var n={type:i.Text,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};return t.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(n)),n},t.prototype.peekJSXToken=function(){var e=this.scanner.index,t=this.scanner.lineNumber,r=this.scanner.lineStart;this.scanner.scanComments();var n=this.lexJSX();return this.scanner.index=e,this.scanner.lineNumber=t,this.scanner.lineStart=r,n},t.prototype.expectJSX=function(e){var t=this.nextJSXToken();t.type===o.Token.Punctuator&&t.value===e||this.throwUnexpectedToken(t)},t.prototype.matchJSX=function(e){var t=this.peekJSXToken();return t.type===o.Token.Punctuator&&t.value===e},t.prototype.parseJSXIdentifier=function(){var e=this.createJSXNode(),t=this.nextJSXToken();return t.type!==i.Identifier&&this.throwUnexpectedToken(t),this.finalize(e,new h.JSXIdentifier(t.value))},t.prototype.parseJSXElementName=function(){var e=this.createJSXNode(),t=this.parseJSXIdentifier();if(this.matchJSX(":")){var r=t;this.expectJSX(":");var n=this.parseJSXIdentifier();t=this.finalize(e,new h.JSXNamespacedName(r,n))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var i=t;this.expectJSX(".");var s=this.parseJSXIdentifier();t=this.finalize(e,new h.JSXMemberExpression(i,s))}return t},t.prototype.parseJSXAttributeName=function(){var e,t=this.createJSXNode(),r=this.parseJSXIdentifier();if(this.matchJSX(":")){var n=r;this.expectJSX(":");var i=this.parseJSXIdentifier();e=this.finalize(t,new h.JSXNamespacedName(n,i))}else e=r;return e},t.prototype.parseJSXStringLiteralAttribute=function(){var e=this.createJSXNode(),t=this.nextJSXToken();t.type!==o.Token.StringLiteral&&this.throwUnexpectedToken(t);var r=this.getTokenRaw(t);return this.finalize(e,new p.Literal(t.value,r))},t.prototype.parseJSXExpressionAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new h.JSXExpressionContainer(t))},t.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},t.prototype.parseJSXNameValueAttribute=function(){var e=this.createJSXNode(),t=this.parseJSXAttributeName(),r=null;return this.matchJSX("=")&&(this.expectJSX("="),r=this.parseJSXAttributeValue()),this.finalize(e,new h.JSXAttribute(t,r))},t.prototype.parseJSXSpreadAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new h.JSXSpreadAttribute(t))},t.prototype.parseJSXAttributes=function(){for(var e=[];!this.matchJSX("/")&&!this.matchJSX(">");){var t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();e.push(t)}return e},t.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName(),r=this.parseJSXAttributes(),n=this.matchJSX("/");return n&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new h.JSXOpeningElement(t,n,r))},t.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(e,new h.JSXClosingElement(t))}var r=this.parseJSXElementName(),n=this.parseJSXAttributes(),i=this.matchJSX("/");return i&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new h.JSXOpeningElement(r,i,n))},t.prototype.parseJSXEmptyExpression=function(){var e=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart,this.finalize(e,new h.JSXEmptyExpression)},t.prototype.parseJSXExpressionContainer=function(){var e=this.createJSXNode();this.expectJSX("{");var t;return this.matchJSX("}")?(t=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),t=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(e,new h.JSXExpressionContainer(t))},t.prototype.parseJSXChildren=function(){for(var e=[];!this.scanner.eof();){var t=this.createJSXChildNode(),r=this.nextJSXText();if(r.start<r.end){var n=this.getTokenRaw(r),i=this.finalize(t,new h.JSXText(r.value,n));e.push(i)}if("{"!==this.scanner.source[this.scanner.index])break;var s=this.parseJSXExpressionContainer();e.push(s)}return e},t.prototype.parseComplexJSXElement=function(e){for(var t=[];!this.scanner.eof();){e.children=e.children.concat(this.parseJSXChildren());var r=this.createJSXChildNode(),i=this.parseJSXBoundaryElement();if(i.type===c.JSXSyntax.JSXOpeningElement){var s=i;if(s.selfClosing){o=this.finalize(r,new h.JSXElement(s,[],null));e.children.push(o)}else t.push(e),e={node:r,opening:s,closing:null,children:[]}}if(i.type===c.JSXSyntax.JSXClosingElement){e.closing=i;var a=n(e.opening.name);if(a!==n(e.closing.name)&&this.tolerateError("Expected corresponding JSX closing tag for %0",a),!(t.length>0))break;var o=this.finalize(e.node,new h.JSXElement(e.opening,e.children,e.closing));(e=t.pop()).children.push(o)}}return e},t.prototype.parseJSXElement=function(){var e=this.createJSXNode(),t=this.parseJSXOpeningElement(),r=[],n=null;if(!t.selfClosing){var i=this.parseComplexJSXElement({node:e,opening:t,closing:n,children:r});r=i.children,n=i.closing}return this.finalize(e,new h.JSXElement(t,r,n))},t.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var e=this.parseJSXElement();return this.finishJSX(),e},t}(u.Parser);t.JSXParser=f},function(e,t){"use strict";t.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"}},function(e,t){"use strict";t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,r){"use strict";var n=r(13),i=function(){return function(e){this.type=n.JSXSyntax.JSXClosingElement,this.name=e}}();t.JSXClosingElement=i;var s=function(){return function(e,t,r){this.type=n.JSXSyntax.JSXElement,this.openingElement=e,this.children=t,this.closingElement=r}}();t.JSXElement=s;var a=function(){return function(){this.type=n.JSXSyntax.JSXEmptyExpression}}();t.JSXEmptyExpression=a;var o=function(){return function(e){this.type=n.JSXSyntax.JSXExpressionContainer,this.expression=e}}();t.JSXExpressionContainer=o;var u=function(){return function(e){this.type=n.JSXSyntax.JSXIdentifier,this.name=e}}();t.JSXIdentifier=u;var l=function(){return function(e,t){this.type=n.JSXSyntax.JSXMemberExpression,this.object=e,this.property=t}}();t.JSXMemberExpression=l;var c=function(){return function(e,t){this.type=n.JSXSyntax.JSXAttribute,this.name=e,this.value=t}}();t.JSXAttribute=c;var p=function(){return function(e,t){this.type=n.JSXSyntax.JSXNamespacedName,this.namespace=e,this.name=t}}();t.JSXNamespacedName=p;var h=function(){return function(e,t,r){this.type=n.JSXSyntax.JSXOpeningElement,this.name=e,this.selfClosing=t,this.attributes=r}}();t.JSXOpeningElement=h;var f=function(){return function(e){this.type=n.JSXSyntax.JSXSpreadAttribute,this.argument=e}}();t.JSXSpreadAttribute=f;var d=function(){return function(e,t){this.type=n.JSXSyntax.JSXText,this.value=e,this.raw=t}}();t.JSXText=d},function(e,t,r){"use strict";var n=r(8),i=r(6),s=r(7),a=function(){function e(){this.values=[],this.curly=this.paren=-1}return e.prototype.beforeFunctionExpression=function(e){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)>=0},e.prototype.isRegexStart=function(){var e=this.values[this.values.length-1],t=null!==e;switch(e){case"this":case"]":t=!1;break;case")":var r=this.values[this.paren-1];t="if"===r||"while"===r||"for"===r||"with"===r;break;case"}":if(t=!1,"function"===this.values[this.curly-3]){var n=this.values[this.curly-4];t=!!n&&!this.beforeFunctionExpression(n)}else if("function"===this.values[this.curly-4]){var i=this.values[this.curly-5];t=!i||!this.beforeFunctionExpression(i)}}return t},e.prototype.push=function(e){e.type===s.Token.Punctuator||e.type===s.Token.Keyword?("{"===e.value?this.curly=this.values.length:"("===e.value&&(this.paren=this.values.length),this.values.push(e.value)):this.values.push(null)},e}(),o=function(){function e(e,t){this.errorHandler=new i.ErrorHandler,this.errorHandler.tolerant=!!t&&("boolean"==typeof t.tolerant&&t.tolerant),this.scanner=new n.Scanner(e,this.errorHandler),this.scanner.trackComment=!!t&&("boolean"==typeof t.comment&&t.comment),this.trackRange=!!t&&("boolean"==typeof t.range&&t.range),this.trackLoc=!!t&&("boolean"==typeof t.loc&&t.loc),this.buffer=[],this.reader=new a}return e.prototype.errors=function(){return this.errorHandler.errors},e.prototype.getNextToken=function(){if(0===this.buffer.length){var e=this.scanner.scanComments();if(this.scanner.trackComment)for(var t=0;t<e.length;++t){var r=e[t],n=void 0,i=this.scanner.source.slice(r.slice[0],r.slice[1]);n={type:r.multiLine?"BlockComment":"LineComment",value:i},this.trackRange&&(n.range=r.range),this.trackLoc&&(n.loc=r.loc),this.buffer.push(n)}if(!this.scanner.eof()){var a=void 0;this.trackLoc&&(a={start:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},end:{}});var o=void 0;o="/"===this.scanner.source[this.scanner.index]?this.reader.isRegexStart()?this.scanner.scanRegExp():this.scanner.scanPunctuator():this.scanner.lex(),this.reader.push(o);var u=void 0;u={type:s.TokenName[o.type],value:this.scanner.source.slice(o.start,o.end)},this.trackRange&&(u.range=[o.start,o.end]),this.trackLoc&&(a.end={line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},u.loc=a),o.regex&&(u.regex=o.regex),this.buffer.push(u)}}return this.buffer.shift()},e}();t.Tokenizer=o}])})},{}],576:[function(e,t,r){arguments[4][62][0].apply(r,arguments)},{"./util":585,dup:62}],577:[function(e,t,r){arguments[4][63][0].apply(r,arguments)},{"./base64":578,dup:63}],578:[function(e,t,r){arguments[4][64][0].apply(r,arguments)},{dup:64}],579:[function(e,t,r){arguments[4][65][0].apply(r,arguments)},{dup:65}],580:[function(e,t,r){arguments[4][66][0].apply(r,arguments)},{"./util":585,dup:66}],581:[function(e,t,r){arguments[4][67][0].apply(r,arguments)},{dup:67}],582:[function(e,t,r){arguments[4][68][0].apply(r,arguments)},{"./array-set":576,"./base64-vlq":577,"./binary-search":579,"./quick-sort":581,"./util":585,dup:68}],583:[function(e,t,r){arguments[4][69][0].apply(r,arguments)},{"./array-set":576,"./base64-vlq":577,"./mapping-list":580,"./util":585,dup:69}],584:[function(e,t,r){arguments[4][70][0].apply(r,arguments)},{"./source-map-generator":583,"./util":585,dup:70}],585:[function(e,t,r){arguments[4][71][0].apply(r,arguments)},{dup:71}],586:[function(e,t,r){arguments[4][72][0].apply(r,arguments)},{"./lib/source-map-consumer":582,"./lib/source-map-generator":583,"./lib/source-node":584,dup:72}],587:[function(e,t,r){t.exports={plugins:[e("babel-plugin-syntax-async-functions"),e("babel-plugin-syntax-async-generators"),e("babel-plugin-transform-es2015-classes"),e("babel-plugin-transform-es2015-arrow-functions"),e("babel-plugin-transform-es2015-block-scoping"),e("babel-plugin-transform-es2015-for-of"),e("regenerator-transform").default]}},{"babel-plugin-syntax-async-functions":111,"babel-plugin-syntax-async-generators":112,"babel-plugin-transform-es2015-arrow-functions":113,"babel-plugin-transform-es2015-block-scoping":114,"babel-plugin-transform-es2015-classes":116,"babel-plugin-transform-es2015-for-of":119,"regenerator-transform":593}],588:[function(e,t,r){(function(t){r.path=e("path").join(t,"runtime.js")}).call(this,"/node_modules/regenerator-runtime")},{path:546}],589:[function(e,t,r){var n=function(){return this}()||Function("return this")(),i=n.regeneratorRuntime&&Object.getOwnPropertyNames(n).indexOf("regeneratorRuntime")>=0,s=i&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,t.exports=e("./runtime"),i)n.regeneratorRuntime=s;else try{delete n.regeneratorRuntime}catch(e){n.regeneratorRuntime=void 0}},{"./runtime":590}],590:[function(e,t,r){!function(e){"use strict";function r(e,t,r,s){var a=t&&t.prototype instanceof i?t:i,o=Object.create(a.prototype),u=new h(s||[]);return o._invoke=function(e,t,r){var i=C;return function(s,a){if(i===_)throw new Error("Generator is already running");if(i===w){if("throw"===s)throw a;return d()}for(r.method=s,r.arg=a;;){var o=r.delegate;if(o){var u=l(o,r);if(u){if(u===k)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===C)throw i=w,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=_;var c=n(e,t,r);if("normal"===c.type){if(i=r.done?w:S,c.arg===k)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=w,r.method="throw",r.arg=c.arg)}}}(e,r,u),o}function n(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}function i(){}function s(){}function a(){}function o(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function u(e){function t(r,i,s,a){var o=n(e[r],e,i);if("throw"!==o.type){var u=o.arg,l=u.value;return l&&"object"==typeof l&&g.call(l,"__await")?Promise.resolve(l.__await).then(function(e){t("next",e,s,a)},function(e){t("throw",e,s,a)}):Promise.resolve(l).then(function(e){u.value=e,s(u)},a)}a(o.arg)}var r;this._invoke=function(e,n){function i(){return new Promise(function(r,i){t(e,n,r,i)})}return r=r?r.then(i,i):i()}}function l(e,t){var r=e.iterator[t.method];if(r===m){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=m,l(e,t),"throw"===t.method))return k;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return k}var i=n(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,k;var s=i.arg;return s?s.done?(t[e.resultName]=s.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=m),t.delegate=null,k):s:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,k)}function c(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function p(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function h(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(c,this),this.reset(!0)}function f(e){if(e){var t=e[v];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(g.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=m,t.done=!0,t};return n.next=n}}return{next:d}}function d(){return{value:m,done:!0}}var m,y=Object.prototype,g=y.hasOwnProperty,b="function"==typeof Symbol?Symbol:{},v=b.iterator||"@@iterator",x=b.asyncIterator||"@@asyncIterator",E=b.toStringTag||"@@toStringTag",A="object"==typeof t,D=e.regeneratorRuntime;if(D)A&&(t.exports=D);else{(D=e.regeneratorRuntime=A?t.exports:{}).wrap=r;var C="suspendedStart",S="suspendedYield",_="executing",w="completed",k={},F={};F[v]=function(){return this};var T=Object.getPrototypeOf,P=T&&T(T(f([])));P&&P!==y&&g.call(P,v)&&(F=P);var B=a.prototype=i.prototype=Object.create(F);s.prototype=B.constructor=a,a.constructor=s,a[E]=s.displayName="GeneratorFunction",D.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===s||"GeneratorFunction"===(t.displayName||t.name))},D.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,a):(e.__proto__=a,E in e||(e[E]="GeneratorFunction")),e.prototype=Object.create(B),e},D.awrap=function(e){return{__await:e}},o(u.prototype),u.prototype[x]=function(){return this},D.AsyncIterator=u,D.async=function(e,t,n,i){var s=new u(r(e,t,n,i));return D.isGeneratorFunction(t)?s:s.next().then(function(e){return e.done?e.value:s.next()})},o(B),B[E]="Generator",B[v]=function(){return this},B.toString=function(){return"[object Generator]"},D.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},D.values=f,h.prototype={constructor:h,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=m,this.done=!1,this.delegate=null,this.method="next",this.arg=m,this.tryEntries.forEach(p),!e)for(var t in this)"t"===t.charAt(0)&&g.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=m)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){function t(t,n){return s.type="throw",s.arg=e,r.next=t,n&&(r.method="next",r.arg=m),!!n}if(this.done)throw e;for(var r=this,n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],s=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=g.call(i,"catchLoc"),o=g.call(i,"finallyLoc");if(a&&o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!o)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&g.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=e,s.arg=t,i?(this.method="next",this.next=i.finallyLoc,k):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),k},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),p(r),k}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;p(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:f(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=m),k}}}}(function(){return this}()||Function("return this")())},{}],591:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){l.default.ok(this instanceof s),c.assertIdentifier(e),this.nextTempId=0,this.contextId=e,this.listing=[],this.marked=[!0],this.finalLoc=a(),this.tryEntries=[],this.leapManager=new p.LeapManager(this)}function a(){return c.numericLiteral(-1)}function o(e){return new Error("all declarations should have been transformed into assignments before the Exploder began its work: "+(0,u.default)(e))}var u=i(e("babel-runtime/core-js/json/stringify")),l=i(e("assert")),c=n(e("babel-types")),p=n(e("./leap")),h=n(e("./meta")),f=n(e("./util")),d=Object.prototype.hasOwnProperty,m=s.prototype;r.Emitter=s,m.mark=function(e){c.assertLiteral(e);var t=this.listing.length;return-1===e.value?e.value=t:l.default.strictEqual(e.value,t),this.marked[t]=!0,e},m.emit=function(e){c.isExpression(e)&&(e=c.expressionStatement(e)),c.assertStatement(e),this.listing.push(e)},m.emitAssign=function(e,t){return this.emit(this.assign(e,t)),e},m.assign=function(e,t){return c.expressionStatement(c.assignmentExpression("=",e,t))},m.contextProperty=function(e,t){return c.memberExpression(this.contextId,t?c.stringLiteral(e):c.identifier(e),!!t)},m.stop=function(e){e&&this.setReturnValue(e),this.jump(this.finalLoc)},m.setReturnValue=function(e){c.assertExpression(e.value),this.emitAssign(this.contextProperty("rval"),this.explodeExpression(e))},m.clearPendingException=function(e,t){c.assertLiteral(e);var r=c.callExpression(this.contextProperty("catch",!0),[e]);t?this.emitAssign(t,r):this.emit(r)},m.jump=function(e){this.emitAssign(this.contextProperty("next"),e),this.emit(c.breakStatement())},m.jumpIf=function(e,t){c.assertExpression(e),c.assertLiteral(t),this.emit(c.ifStatement(e,c.blockStatement([this.assign(this.contextProperty("next"),t),c.breakStatement()])))},m.jumpIfNot=function(e,t){c.assertExpression(e),c.assertLiteral(t);var r=void 0;r=c.isUnaryExpression(e)&&"!"===e.operator?e.argument:c.unaryExpression("!",e),this.emit(c.ifStatement(r,c.blockStatement([this.assign(this.contextProperty("next"),t),c.breakStatement()])))},m.makeTempVar=function(){return this.contextProperty("t"+this.nextTempId++)},m.getContextFunction=function(e){return c.functionExpression(e||null,[this.contextId],c.blockStatement([this.getDispatchLoop()]),!1,!1)},m.getDispatchLoop=function(){var e=this,t=[],r=void 0,n=!1;return e.listing.forEach(function(i,s){e.marked.hasOwnProperty(s)&&(t.push(c.switchCase(c.numericLiteral(s),r=[])),n=!1),n||(r.push(i),c.isCompletionStatement(i)&&(n=!0))}),this.finalLoc.value=this.listing.length,t.push(c.switchCase(this.finalLoc,[]),c.switchCase(c.stringLiteral("end"),[c.returnStatement(c.callExpression(this.contextProperty("stop"),[]))])),c.whileStatement(c.numericLiteral(1),c.switchStatement(c.assignmentExpression("=",this.contextProperty("prev"),this.contextProperty("next")),t))},m.getTryLocsList=function(){if(0===this.tryEntries.length)return null;var e=0;return c.arrayExpression(this.tryEntries.map(function(t){var r=t.firstLoc.value;l.default.ok(r>=e,"try entries out of order"),e=r;var n=t.catchEntry,i=t.finallyEntry,s=[t.firstLoc,n?n.firstLoc:null];return i&&(s[2]=i.firstLoc,s[3]=i.afterLoc),c.arrayExpression(s)}))},m.explode=function(e,t){var r=e.node;if(c.assertNode(r),c.isDeclaration(r))throw o(r);if(c.isStatement(r))return this.explodeStatement(e);if(c.isExpression(r))return this.explodeExpression(e,t);switch(r.type){case"Program":return e.get("body").map(this.explodeStatement,this);case"VariableDeclarator":throw o(r);case"Property":case"SwitchCase":case"CatchClause":throw new Error(r.type+" nodes should be handled by their parents");default:throw new Error("unknown Node of type "+(0,u.default)(r.type))}},m.explodeStatement=function(e,t){var r=e.node,n=this,i=void 0,s=void 0,o=void 0;if(c.assertStatement(r),t?c.assertIdentifier(t):t=null,c.isBlockStatement(r))e.get("body").forEach(function(e){n.explodeStatement(e)});else if(h.containsLeap(r))switch(r.type){case"ExpressionStatement":n.explodeExpression(e.get("expression"),!0);break;case"LabeledStatement":s=a(),n.leapManager.withEntry(new p.LabeledEntry(s,r.label),function(){n.explodeStatement(e.get("body"),r.label)}),n.mark(s);break;case"WhileStatement":i=a(),s=a(),n.mark(i),n.jumpIfNot(n.explodeExpression(e.get("test")),s),n.leapManager.withEntry(new p.LoopEntry(s,i,t),function(){n.explodeStatement(e.get("body"))}),n.jump(i),n.mark(s);break;case"DoWhileStatement":var d=a(),m=a();s=a(),n.mark(d),n.leapManager.withEntry(new p.LoopEntry(s,m,t),function(){n.explode(e.get("body"))}),n.mark(m),n.jumpIf(n.explodeExpression(e.get("test")),d),n.mark(s);break;case"ForStatement":o=a();var g=a();s=a(),r.init&&n.explode(e.get("init"),!0),n.mark(o),r.test&&n.jumpIfNot(n.explodeExpression(e.get("test")),s),n.leapManager.withEntry(new p.LoopEntry(s,g,t),function(){n.explodeStatement(e.get("body"))}),n.mark(g),r.update&&n.explode(e.get("update"),!0),n.jump(o),n.mark(s);break;case"TypeCastExpression":return n.explodeExpression(e.get("expression"));case"ForInStatement":o=a(),s=a();var b=n.makeTempVar();n.emitAssign(b,c.callExpression(f.runtimeProperty("keys"),[n.explodeExpression(e.get("right"))])),n.mark(o);var v=n.makeTempVar();n.jumpIf(c.memberExpression(c.assignmentExpression("=",v,c.callExpression(b,[])),c.identifier("done"),!1),s),n.emitAssign(r.left,c.memberExpression(v,c.identifier("value"),!1)),n.leapManager.withEntry(new p.LoopEntry(s,o,t),function(){n.explodeStatement(e.get("body"))}),n.jump(o),n.mark(s);break;case"BreakStatement":n.emitAbruptCompletion({type:"break",target:n.leapManager.getBreakLoc(r.label)});break;case"ContinueStatement":n.emitAbruptCompletion({type:"continue",target:n.leapManager.getContinueLoc(r.label)});break;case"SwitchStatement":var x=n.emitAssign(n.makeTempVar(),n.explodeExpression(e.get("discriminant")));s=a();for(var E=a(),A=E,D=[],C=r.cases||[],S=C.length-1;S>=0;--S){var _=C[S];c.assertSwitchCase(_),_.test?A=c.conditionalExpression(c.binaryExpression("===",x,_.test),D[S]=a(),A):D[S]=E}var w=e.get("discriminant");f.replaceWithOrRemove(w,A),n.jump(n.explodeExpression(w)),n.leapManager.withEntry(new p.SwitchEntry(s),function(){e.get("cases").forEach(function(e){var t=e.key;n.mark(D[t]),e.get("consequent").forEach(function(e){n.explodeStatement(e)})})}),n.mark(s),-1===E.value&&(n.mark(E),l.default.strictEqual(s.value,E.value));break;case"IfStatement":var k=r.alternate&&a();s=a(),n.jumpIfNot(n.explodeExpression(e.get("test")),k||s),n.explodeStatement(e.get("consequent")),k&&(n.jump(s),n.mark(k),n.explodeStatement(e.get("alternate"))),n.mark(s);break;case"ReturnStatement":n.emitAbruptCompletion({type:"return",value:n.explodeExpression(e.get("argument"))});break;case"WithStatement":throw new Error("WithStatement not supported in generator functions.");case"TryStatement":s=a();var F=r.handler,T=F&&a(),P=T&&new p.CatchEntry(T,F.param),B=r.finalizer&&a(),O=B&&new p.FinallyEntry(B,s),j=new p.TryEntry(n.getUnmarkedCurrentLoc(),P,O);n.tryEntries.push(j),n.updateContextPrevLoc(j.firstLoc),n.leapManager.withEntry(j,function(){if(n.explodeStatement(e.get("block")),T){B?n.jump(B):n.jump(s),n.updateContextPrevLoc(n.mark(T));var t=e.get("handler.body"),r=n.makeTempVar();n.clearPendingException(j.firstLoc,r),t.traverse(y,{safeParam:r,catchParamName:F.param.name}),n.leapManager.withEntry(P,function(){n.explodeStatement(t)})}B&&(n.updateContextPrevLoc(n.mark(B)),n.leapManager.withEntry(O,function(){n.explodeStatement(e.get("finalizer"))}),n.emit(c.returnStatement(c.callExpression(n.contextProperty("finish"),[O.firstLoc]))))}),n.mark(s);break;case"ThrowStatement":n.emit(c.throwStatement(n.explodeExpression(e.get("argument"))));break;default:throw new Error("unknown Statement of type "+(0,u.default)(r.type))}else n.emit(r)};var y={Identifier:function(e,t){e.node.name===t.catchParamName&&f.isReference(e)&&f.replaceWithOrRemove(e,t.safeParam)},Scope:function(e,t){e.scope.hasOwnBinding(t.catchParamName)&&e.skip()}};m.emitAbruptCompletion=function(e){(function(e){var t=e.type;return"normal"===t?!d.call(e,"target"):"break"===t||"continue"===t?!d.call(e,"value")&&c.isLiteral(e.target):("return"===t||"throw"===t)&&d.call(e,"value")&&!d.call(e,"target")})(e)||l.default.ok(!1,"invalid completion record: "+(0,u.default)(e)),l.default.notStrictEqual(e.type,"normal","normal completions are not abrupt");var t=[c.stringLiteral(e.type)];"break"===e.type||"continue"===e.type?(c.assertLiteral(e.target),t[1]=e.target):"return"!==e.type&&"throw"!==e.type||e.value&&(c.assertExpression(e.value),t[1]=e.value),this.emit(c.returnStatement(c.callExpression(this.contextProperty("abrupt"),t)))},m.getUnmarkedCurrentLoc=function(){return c.numericLiteral(this.listing.length)},m.updateContextPrevLoc=function(e){e?(c.assertLiteral(e),-1===e.value?e.value=this.listing.length:l.default.strictEqual(e.value,this.listing.length)):e=this.getUnmarkedCurrentLoc(),this.emitAssign(this.contextProperty("prev"),e)},m.explodeExpression=function(e,t){function r(e){if(c.assertExpression(e),!t)return e;s.emit(e)}function n(e,t,r){l.default.ok(!r||!e,"Ignoring the result of a child expression but forcing it to be assigned to a temporary variable?");var n=s.explodeExpression(t,r);return r||(e||f&&!c.isLiteral(n))&&(n=s.emitAssign(e||s.makeTempVar(),n)),n}var i=e.node;if(!i)return i;c.assertExpression(i);var s=this,o=void 0,p=void 0;if(!h.containsLeap(i))return r(i);var f=h.containsLeap.onlyChildren(i);switch(i.type){case"MemberExpression":return r(c.memberExpression(s.explodeExpression(e.get("object")),i.computed?n(null,e.get("property")):i.property,i.computed));case"CallExpression":var d=e.get("callee"),m=e.get("arguments"),y=void 0,g=[],b=!1;if(m.forEach(function(e){b=b||h.containsLeap(e.node)}),c.isMemberExpression(d.node))if(b){var v=n(s.makeTempVar(),d.get("object")),x=d.node.computed?n(null,d.get("property")):d.node.property;g.unshift(v),y=c.memberExpression(c.memberExpression(v,x,d.node.computed),c.identifier("call"),!1)}else y=s.explodeExpression(d);else y=n(null,d),c.isMemberExpression(y)&&(y=c.sequenceExpression([c.numericLiteral(0),y]));return m.forEach(function(e){g.push(n(null,e))}),r(c.callExpression(y,g));case"NewExpression":return r(c.newExpression(n(null,e.get("callee")),e.get("arguments").map(function(e){return n(null,e)})));case"ObjectExpression":return r(c.objectExpression(e.get("properties").map(function(e){return e.isObjectProperty()?c.objectProperty(e.node.key,n(null,e.get("value")),e.node.computed):e.node})));case"ArrayExpression":return r(c.arrayExpression(e.get("elements").map(function(e){return n(null,e)})));case"SequenceExpression":var E=i.expressions.length-1;return e.get("expressions").forEach(function(e){e.key===E?o=s.explodeExpression(e,t):s.explodeExpression(e,!0)}),o;case"LogicalExpression":p=a(),t||(o=s.makeTempVar());var A=n(o,e.get("left"));return"&&"===i.operator?s.jumpIfNot(A,p):(l.default.strictEqual(i.operator,"||"),s.jumpIf(A,p)),n(o,e.get("right"),t),s.mark(p),o;case"ConditionalExpression":var D=a();p=a();var C=s.explodeExpression(e.get("test"));return s.jumpIfNot(C,D),t||(o=s.makeTempVar()),n(o,e.get("consequent"),t),s.jump(p),s.mark(D),n(o,e.get("alternate"),t),s.mark(p),o;case"UnaryExpression":return r(c.unaryExpression(i.operator,s.explodeExpression(e.get("argument")),!!i.prefix));case"BinaryExpression":return r(c.binaryExpression(i.operator,n(null,e.get("left")),n(null,e.get("right"))));case"AssignmentExpression":return r(c.assignmentExpression(i.operator,s.explodeExpression(e.get("left")),s.explodeExpression(e.get("right"))));case"UpdateExpression":return r(c.updateExpression(i.operator,s.explodeExpression(e.get("argument")),i.prefix));case"YieldExpression":p=a();var S=i.argument&&s.explodeExpression(e.get("argument"));if(S&&i.delegate){var _=s.makeTempVar();return s.emit(c.returnStatement(c.callExpression(s.contextProperty("delegateYield"),[S,c.stringLiteral(_.property.name),p]))),s.mark(p),_}return s.emitAssign(s.contextProperty("next"),p),s.emit(c.returnStatement(S||null)),s.mark(p),s.contextProperty("sent");default:throw new Error("unknown Expression of type "+(0,u.default)(i.type))}}},{"./leap":594,"./meta":595,"./util":597,assert:1,"babel-runtime/core-js/json/stringify":121,"babel-types":178}],592:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}var i=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/object/keys")),s=n(e("babel-types")),a=n(e("./util")),o=Object.prototype.hasOwnProperty;r.hoist=function(e){function t(e,t){s.assertVariableDeclaration(e);var n=[];return e.declarations.forEach(function(e){r[e.id.name]=s.identifier(e.id.name),e.init?n.push(s.assignmentExpression("=",e.id,e.init)):t&&n.push(e.id)}),0===n.length?null:1===n.length?n[0]:s.sequenceExpression(n)}s.assertFunction(e.node);var r={};e.get("body").traverse({VariableDeclaration:{exit:function(e){var r=t(e.node,!1);null===r?e.remove():a.replaceWithOrRemove(e,s.expressionStatement(r)),e.skip()}},ForStatement:function(e){var r=e.node.init;s.isVariableDeclaration(r)&&a.replaceWithOrRemove(e.get("init"),t(r,!1))},ForXStatement:function(e){var r=e.get("left");r.isVariableDeclaration()&&a.replaceWithOrRemove(r,t(r.node,!0))},FunctionDeclaration:function(e){var t=e.node;r[t.id.name]=t.id;var n=s.expressionStatement(s.assignmentExpression("=",t.id,s.functionExpression(t.id,t.params,t.body,t.generator,t.expression)));e.parentPath.isBlockStatement()?(e.parentPath.unshiftContainer("body",n),e.remove()):a.replaceWithOrRemove(e,n),e.skip()},FunctionExpression:function(e){e.skip()}});var n={};e.get("params").forEach(function(e){var t=e.node;s.isIdentifier(t)&&(n[t.name]=t)});var u=[];return(0,i.default)(r).forEach(function(e){o.call(n,e)||u.push(s.variableDeclarator(r[e],null))}),0===u.length?null:s.variableDeclaration("var",u)}},{"./util":597,"babel-runtime/core-js/object/keys":127,"babel-types":178}],593:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(t){var r={visitor:e("./visit").visitor},n=t&&t.version;return n&&parseInt(n,10)>=7&&(r.name="regenerator-transform"),r}},{"./visit":598}],594:[function(e,t,r){"use strict";function n(){h.default.ok(this instanceof n)}function i(e){n.call(this),f.assertLiteral(e),this.returnLoc=e}function s(e,t,r){n.call(this),f.assertLiteral(e),f.assertLiteral(t),r?f.assertIdentifier(r):r=null,this.breakLoc=e,this.continueLoc=t,this.label=r}function a(e){n.call(this),f.assertLiteral(e),this.breakLoc=e}function o(e,t,r){n.call(this),f.assertLiteral(e),t?h.default.ok(t instanceof u):t=null,r?h.default.ok(r instanceof l):r=null,h.default.ok(t||r),this.firstLoc=e,this.catchEntry=t,this.finallyEntry=r}function u(e,t){n.call(this),f.assertLiteral(e),f.assertIdentifier(t),this.firstLoc=e,this.paramId=t}function l(e,t){n.call(this),f.assertLiteral(e),f.assertLiteral(t),this.firstLoc=e,this.afterLoc=t}function c(e,t){n.call(this),f.assertLiteral(e),f.assertIdentifier(t),this.breakLoc=e,this.label=t}function p(t){h.default.ok(this instanceof p);var r=e("./emit").Emitter;h.default.ok(t instanceof r),this.emitter=t,this.entryStack=[new i(t.finalLoc)]}var h=function(e){return e&&e.__esModule?e:{default:e}}(e("assert")),f=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types")),d=e("util");(0,d.inherits)(i,n),r.FunctionEntry=i,(0,d.inherits)(s,n),r.LoopEntry=s,(0,d.inherits)(a,n),r.SwitchEntry=a,(0,d.inherits)(o,n),r.TryEntry=o,(0,d.inherits)(u,n),r.CatchEntry=u,(0,d.inherits)(l,n),r.FinallyEntry=l,(0,d.inherits)(c,n),r.LabeledEntry=c;var m=p.prototype;r.LeapManager=p,m.withEntry=function(e,t){h.default.ok(e instanceof n),this.entryStack.push(e);try{t.call(this.emitter)}finally{var r=this.entryStack.pop();h.default.strictEqual(r,e)}},m._findLeapLocation=function(e,t){for(var r=this.entryStack.length-1;r>=0;--r){var n=this.entryStack[r],i=n[e];if(i)if(t){if(n.label&&n.label.name===t.name)return i}else if(!(n instanceof c))return i}return null},m.getBreakLoc=function(e){return this._findLeapLocation("breakLoc",e)},m.getContinueLoc=function(e){return this._findLeapLocation("continueLoc",e)}},{"./emit":591,assert:1,"babel-types":178,util:613}],595:[function(e,t,r){"use strict";function n(e,t){function r(e){function t(e){return r||(Array.isArray(e)?e.some(t):s.isNode(e)&&(i.default.strictEqual(r,!1),r=n(e))),r}s.assertNode(e);var r=!1,a=s.VISITOR_KEYS[e.type];if(a)for(var o=0;o<a.length;o++){t(e[a[o]])}return r}function n(n){s.assertNode(n);var i=a(n);return o.call(i,e)?i[e]:o.call(u,n.type)?i[e]=!1:o.call(t,n.type)?i[e]=!0:i[e]=r(n)}return n.onlyChildren=r,n}var i=function(e){return e&&e.__esModule?e:{default:e}}(e("assert")),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types")),a=e("private").makeAccessor(),o=Object.prototype.hasOwnProperty,u={FunctionExpression:!0,ArrowFunctionExpression:!0},l={CallExpression:!0,ForInStatement:!0,UnaryExpression:!0,BinaryExpression:!0,AssignmentExpression:!0,UpdateExpression:!0,NewExpression:!0},c={YieldExpression:!0,BreakStatement:!0,ContinueStatement:!0,ReturnStatement:!0,ThrowStatement:!0};for(var p in c)o.call(c,p)&&(l[p]=c[p]);r.hasSideEffects=n("hasSideEffects",l),r.containsLeap=n("containsLeap",c)},{assert:1,"babel-types":178,private:548}],596:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}r.__esModule=!0,r.default=function(e){if(!e.node||!i.isFunction(e.node))throw new Error("replaceShorthandObjectMethod can only be called on Function AST node paths.");if(!i.isObjectMethod(e.node))return e;if(!e.node.generator)return e;var t=e.node.params.map(function(e){return i.cloneDeep(e)}),r=i.functionExpression(null,t,i.cloneDeep(e.node.body),e.node.generator,e.node.async);return s.replaceWithOrRemove(e,i.objectProperty(i.cloneDeep(e.node.key),r,e.node.computed,!1)),e.get("value")};var i=n(e("babel-types")),s=n(e("./util"))},{"./util":597,"babel-types":178}],597:[function(e,t,r){"use strict";r.__esModule=!0,r.runtimeProperty=function(e){return n.memberExpression(n.identifier("regeneratorRuntime"),n.identifier(e),!1)},r.isReference=function(e){return e.isReferenced()||e.parentPath.isAssignmentExpression({left:e.node})},r.replaceWithOrRemove=function(e,t){t?e.replaceWith(t):e.remove()};var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"))},{"babel-types":178}],598:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=e.node;return o.assertFunction(t),t.id||(t.id=e.scope.parent.generateUidIdentifier("callee")),t.generator&&o.isFunctionDeclaration(t)?function(e){var t=e.node;o.assertIdentifier(t.id);var r=e.findParent(function(e){return e.isProgram()||e.isBlockStatement()});if(!r)return t.id;var n=r.node;a.default.ok(Array.isArray(n.body));var i=h(n);i.decl||(i.decl=o.variableDeclaration("var",[]),r.unshiftContainer("body",i.decl),i.declPath=r.get("body.0"));a.default.strictEqual(i.declPath.node,i.decl);var s=r.scope.generateUidIdentifier("marked"),u=o.callExpression(p.runtimeProperty("mark"),[t.id]),l=i.decl.declarations.push(o.variableDeclarator(s,u))-1,c=i.declPath.get("declarations."+l+".init");return a.default.strictEqual(c.node,u),c.addComment("leading","#__PURE__"),s}(e):t.id}var a=i(e("assert")),o=n(e("babel-types")),u=e("./hoist"),l=e("./emit"),c=i(e("./replaceShorthandObjectMethod")),p=n(e("./util"));r.visitor={Function:{exit:function(e,t){var r=e.node;if(r.generator){if(r.async){if(!1===t.opts.asyncGenerators)return}else if(!1===t.opts.generators)return}else{if(!r.async)return;if(!1===t.opts.async)return}r=(e=(0,c.default)(e)).node;var n=e.scope.generateUidIdentifier("context"),i=e.scope.generateUidIdentifier("args");e.ensureBlock();var a=e.get("body");r.async&&a.traverse(m),a.traverse(d,{context:n});var h=[],y=[];a.get("body").forEach(function(e){var t=e.node;o.isExpressionStatement(t)&&o.isStringLiteral(t.expression)?h.push(t):t&&null!=t._blockHoist?h.push(t):y.push(t)}),h.length>0&&(a.node.body=y);var g=s(e);o.assertIdentifier(r.id);var b=o.identifier(r.id.name+"$"),v=(0,u.hoist)(e);if(function(e,t){var r={didRenameArguments:!1,argsId:t};return e.traverse(f,r),r.didRenameArguments}(e,i)){v=v||o.variableDeclaration("var",[]);var x=o.identifier("arguments");x._shadowedFunctionLiteral=e,v.declarations.push(o.variableDeclarator(i,x))}var E=new l.Emitter(n);E.explode(e.get("body")),v&&v.declarations.length>0&&h.push(v);var A=[E.getContextFunction(b),r.generator?g:o.nullLiteral(),o.thisExpression()],D=E.getTryLocsList();D&&A.push(D);var C=o.callExpression(p.runtimeProperty(r.async?"async":"wrap"),A);h.push(o.returnStatement(C)),r.body=o.blockStatement(h);var S=a.node.directives;S&&(r.body.directives=S);var _=r.generator;_&&(r.generator=!1),r.async&&(r.async=!1),_&&o.isExpression(r)&&(p.replaceWithOrRemove(e,o.callExpression(p.runtimeProperty("mark"),[r])),e.addComment("leading","#__PURE__")),e.requeue()}}};var h=e("private").makeAccessor(),f={"FunctionExpression|FunctionDeclaration":function(e){e.skip()},Identifier:function(e,t){"arguments"===e.node.name&&p.isReference(e)&&(p.replaceWithOrRemove(e,t.argsId),t.didRenameArguments=!0)}},d={MetaProperty:function(e){var t=e.node;"function"===t.meta.name&&"sent"===t.property.name&&p.replaceWithOrRemove(e,o.memberExpression(this.context,o.identifier("_sent")))}},m={Function:function(e){e.skip()},AwaitExpression:function(e){var t=e.node.argument;p.replaceWithOrRemove(e,o.yieldExpression(o.callExpression(p.runtimeProperty("awrap"),[t]),!1))}}},{"./emit":591,"./hoist":592,"./replaceShorthandObjectMethod":596,"./util":597,assert:1,"babel-types":178,private:548}],599:[function(e,t,r){e("assert");var n=e("recast").types,i=n.namedTypes,s=n.builders,a=Object.prototype.hasOwnProperty;r.defaults=function(e){for(var t,r=arguments.length,n=1;n<r;++n)if(t=arguments[n])for(var i in t)a.call(t,i)&&!a.call(e,i)&&(e[i]=t[i]);return e},r.runtimeProperty=function(e){return s.memberExpression(s.identifier("regeneratorRuntime"),s.identifier(e),!1)},r.isReference=function(e,t){var r=e.value;if(!i.Identifier.check(r))return!1;if(t&&r.name!==t)return!1;var n=e.parent.value;switch(n.type){case"VariableDeclarator":return"init"===e.name;case"MemberExpression":return"object"===e.name||n.computed&&"property"===e.name;case"FunctionExpression":case"FunctionDeclaration":case"ArrowFunctionExpression":return"id"!==e.name&&("params"!==e.parentPath.name||n.params!==e.parentPath.value||n.params[e.name]!==r);case"ClassDeclaration":case"ClassExpression":return"id"!==e.name;case"CatchClause":return"param"!==e.name;case"Property":case"MethodDefinition":return"key"!==e.name;case"ImportSpecifier":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"LabeledStatement":return!1;default:return!0}}},{assert:1,recast:574}],600:[function(e,t,r){var n=e("recast"),i=n.types.namedTypes,s=e("./util.js");r.transform=function(t,r){r=s.defaults(r||{},{includeRuntime:!1});return t=e("babel-core").transformFromAst(t,null,{presets:[e("regenerator-preset")],code:!1,ast:!0}).ast,!0===r.includeRuntime&&function(t){i.Program.assert(t);var r=e("..").runtime.path,s=fs.readFileSync(r,"utf8"),a=n.parse(s,{sourceFileName:r}).program.body,o=t.body;o.unshift.apply(o,a)}(i.File.check(t)?t.program:t),t}},{"..":"regenerator","./util.js":599,"babel-core":31,recast:574,"regenerator-preset":587}],601:[function(e,t,r){"use strict";var n=e("is-finite");t.exports=function(e,t){if("string"!=typeof e)throw new TypeError("Expected `input` to be a string");if(t<0||!n(t))throw new TypeError("Expected `count` to be a positive finite number");var r="";do{1&t&&(r+=e),e+=e}while(t>>=1);return r}},{"is-finite":320}],602:[function(e,t,r){function n(e,t){for(var r in e)t[r]=e[r]}function i(e,t,r){return a(e,t,r)}var s=e("buffer"),a=s.Buffer;a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?t.exports=s:(n(s,r),r.Buffer=i),n(a,i),i.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return a(e,t,r)},i.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=a(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},i.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return a(e)},i.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return s.SlowBuffer(e)}},{buffer:192}],603:[function(e,t,r){"use strict";t.exports=function(e){var t=/^\\\\\?\\/.test(e),r=/[^\x00-\x80]+/.test(e);return t||r?e:e.replace(/\\/g,"/")}},{}],604:[function(e,t,r){function n(){i.call(this)}t.exports=n;var i=e("events").EventEmitter;e("inherits")(n,i),n.Readable=e("readable-stream/readable.js"),n.Writable=e("readable-stream/writable.js"),n.Duplex=e("readable-stream/duplex.js"),n.Transform=e("readable-stream/transform.js"),n.PassThrough=e("readable-stream/passthrough.js"),n.Stream=n,n.prototype.pipe=function(e,t){function r(t){e.writable&&!1===e.write(t)&&l.pause&&l.pause()}function n(){l.readable&&l.resume&&l.resume()}function s(){c||(c=!0,e.end())}function a(){c||(c=!0,"function"==typeof e.destroy&&e.destroy())}function o(e){if(u(),0===i.listenerCount(this,"error"))throw e}function u(){l.removeListener("data",r),e.removeListener("drain",n),l.removeListener("end",s),l.removeListener("close",a),l.removeListener("error",o),e.removeListener("error",o),l.removeListener("end",u),l.removeListener("close",u),e.removeListener("close",u)}var l=this;l.on("data",r),e.on("drain",n),e._isStdio||t&&!1===t.end||(l.on("end",s),l.on("close",a));var c=!1;return l.on("error",o),e.on("error",o),l.on("end",u),l.on("close",u),e.on("close",u),e.emit("pipe",l),e}},{events:311,inherits:317,"readable-stream/duplex.js":551,"readable-stream/passthrough.js":560,"readable-stream/readable.js":561,"readable-stream/transform.js":562,"readable-stream/writable.js":563}],605:[function(e,t,r){"use strict";function n(e){this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(h.isEncoding===f||!f(e)))throw new Error("Unknown encoding: "+e);return t||e}(e);var t;switch(this.encoding){case"utf16le":this.text=a,this.end=o,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=u,this.end=l,t=3;break;default:return this.write=c,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=h.allocUnsafe(t)}function i(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:-1}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�".repeat(r);if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�".repeat(r+1);if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�".repeat(r+2)}}(this,e,t);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function a(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function o(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function u(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function l(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function c(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}var h=e("safe-buffer").Buffer,f=h.isEncoding||function(e){switch((e=""+e)&&e.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!0;default:return!1}};r.StringDecoder=n,n.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},n.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�".repeat(this.lastTotal-this.lastNeed):t},n.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var s=i(t[n]);return s>=0?(s>0&&(e.lastNeed=s-1),s):--n<r?0:(s=i(t[n]))>=0?(s>0&&(e.lastNeed=s-2),s):--n<r?0:(s=i(t[n]))>=0?(s>0&&(2===s?s=0:e.lastNeed=s-3),s):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},n.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{"safe-buffer":602}],606:[function(e,t,r){(function(n){function i(e,t,r){function i(){for(;u.length&&!c.paused;){var e=u.shift();if(null===e)return c.emit("end");c.emit("data",e)}}e=e||function(e){this.queue(e)},t=t||function(){this.queue(null)};var a=!1,o=!1,u=[],l=!1,c=new s;return c.readable=c.writable=!0,c.paused=!1,c.autoDestroy=!(r&&!1===r.autoDestroy),c.write=function(t){return e.call(this,t),!c.paused},c.queue=c.push=function(e){return l?c:(null===e&&(l=!0),u.push(e),i(),c)},c.on("end",function(){c.readable=!1,!c.writable&&c.autoDestroy&&n.nextTick(function(){c.destroy()})}),c.end=function(e){if(!a)return a=!0,arguments.length&&c.write(e),c.writable=!1,t.call(c),!c.readable&&c.autoDestroy&&c.destroy(),c},c.destroy=function(){if(!o)return o=!0,a=!0,u.length=0,c.writable=c.readable=!1,c.emit("close"),c},c.pause=function(){if(!c.paused)return c.paused=!0,c},c.resume=function(){return c.paused&&(c.paused=!1,c.emit("resume")),i(),c.paused||c.emit("drain"),c},c}var s=e("stream");r=t.exports=i,i.through=i}).call(this,e("_process"))},{_process:550,stream:604}],607:[function(e,t,r){"use strict";t.exports=function e(t){function r(){}function n(){return typeof i.foo}r.prototype=t;var i=new r;return n(),n(),t}},{}],608:[function(e,t,r){"use strict";t.exports=function(e){for(var t=e.length;/[\s\uFEFF\u00A0]/.test(e[t-1]);)t--;return e.slice(0,t)}},{}],609:[function(e,t,r){r.isatty=function(){return!1},r.ReadStream=function(){throw new Error("tty.ReadStream is not implemented")},r.WriteStream=function(){throw new Error("tty.ReadStream is not implemented")}},{}],610:[function(e,t,r){(function(e){function r(t){try{if(!e.localStorage)return!1}catch(e){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],611:[function(e,t,r){arguments[4][317][0].apply(r,arguments)},{dup:317}],612:[function(e,t,r){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],613:[function(e,t,r){(function(t,n){function i(e,t){var n={seen:[],stylize:a};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),p(t)?n.showHidden=t:t&&r._extend(n,t),m(n.showHidden)&&(n.showHidden=!1),m(n.depth)&&(n.depth=2),m(n.colors)&&(n.colors=!1),m(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=s),o(n,e,n.depth)}function s(e,t){var r=i.styles[t];return r?"["+i.colors[r][0]+"m"+e+"["+i.colors[r][1]+"m":e}function a(e,t){return e}function o(e,t,n){if(e.customInspect&&t&&x(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(n,e);return d(i)||(i=o(e,i,n)),i}var s=function(e,t){if(m(t))return e.stylize("undefined","undefined");if(d(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(f(t))return e.stylize(""+t,"number");if(p(t))return e.stylize(""+t,"boolean");if(h(t))return e.stylize("null","null")}(e,t);if(s)return s;var a=Object.keys(t),g=function(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),v(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return u(t);if(0===a.length){if(x(t)){var E=t.name?": "+t.name:"";return e.stylize("[Function"+E+"]","special")}if(y(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(b(t))return e.stylize(Date.prototype.toString.call(t),"date");if(v(t))return u(t)}var A="",C=!1,S=["{","}"];if(c(t)&&(C=!0,S=["[","]"]),x(t)){A=" [Function"+(t.name?": "+t.name:"")+"]"}if(y(t)&&(A=" "+RegExp.prototype.toString.call(t)),b(t)&&(A=" "+Date.prototype.toUTCString.call(t)),v(t)&&(A=" "+u(t)),0===a.length&&(!C||0==t.length))return S[0]+A+S[1];if(n<0)return y(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var _;return _=C?function(e,t,r,n,i){for(var s=[],a=0,o=t.length;a<o;++a)D(t,String(a))?s.push(l(e,t,r,n,String(a),!0)):s.push("");return i.forEach(function(i){i.match(/^\d+$/)||s.push(l(e,t,r,n,i,!0))}),s}(e,t,n,g,a):a.map(function(r){return l(e,t,n,g,r,C)}),e.seen.pop(),function(e,t,r){var n=0;if(e.reduce(function(e,t){return n++,t.indexOf("\n")>=0&&n++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(_,A,S)}function u(e){return"["+Error.prototype.toString.call(e)+"]"}function l(e,t,r,n,i,s){var a,u,l;if((l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?u=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(u=e.stylize("[Setter]","special")),D(n,i)||(a="["+i+"]"),u||(e.seen.indexOf(l.value)<0?(u=h(r)?o(e,l.value,null):o(e,l.value,r-1)).indexOf("\n")>-1&&(u=s?u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return" "+e}).join("\n")):u=e.stylize("[Circular]","special")),m(a)){if(s&&i.match(/^\d+$/))return u;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+u}function c(e){return Array.isArray(e)}function p(e){return"boolean"==typeof e}function h(e){return null===e}function f(e){return"number"==typeof e}function d(e){return"string"==typeof e}function m(e){return void 0===e}function y(e){return g(e)&&"[object RegExp]"===E(e)}function g(e){return"object"==typeof e&&null!==e}function b(e){return g(e)&&"[object Date]"===E(e)}function v(e){return g(e)&&("[object Error]"===E(e)||e instanceof Error)}function x(e){return"function"==typeof e}function E(e){return Object.prototype.toString.call(e)}function A(e){return e<10?"0"+e.toString(10):e.toString(10)}function D(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var C=/%[sdj%]/g;r.format=function(e){if(!d(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(i(arguments[r]));return t.join(" ")}for(var r=1,n=arguments,s=n.length,a=String(e).replace(C,function(e){if("%%"===e)return"%";if(r>=s)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),o=n[r];r<s;o=n[++r])h(o)||!g(o)?a+=" "+o:a+=" "+i(o);return a},r.deprecate=function(e,i){if(m(n.process))return function(){return r.deprecate(e,i).apply(this,arguments)};if(!0===t.noDeprecation)return e;var s=!1;return function(){if(!s){if(t.throwDeprecation)throw new Error(i);t.traceDeprecation?console.trace(i):console.error(i),s=!0}return e.apply(this,arguments)}};var S,_={};r.debuglog=function(e){if(m(S)&&(S=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!_[e])if(new RegExp("\\b"+e+"\\b","i").test(S)){var n=t.pid;_[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,n,t)}}else _[e]=function(){};return _[e]},r.inspect=i,i.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]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=c,r.isBoolean=p,r.isNull=h,r.isNullOrUndefined=function(e){return null==e},r.isNumber=f,r.isString=d,r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=m,r.isRegExp=y,r.isObject=g,r.isDate=b,r.isError=v,r.isFunction=x,r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},r.isBuffer=e("./support/isBuffer");var w=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];r.log=function(){console.log("%s - %s",function(){var e=new Date,t=[A(e.getHours()),A(e.getMinutes()),A(e.getSeconds())].join(":");return[e.getDate(),w[e.getMonth()],t].join(" ")}(),r.format.apply(r,arguments))},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!g(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":612,_process:550,inherits:611}],regenerator:[function(e,t,r){function r(e,t){var r=[];return a(function(e){r.push(e)},function(){try{this.queue(i(r.join(""),t).code),this.queue(null)}catch(e){this.emit("error",e)}})}function n(){regeneratorRuntime=e("regenerator-runtime")}function i(t,r){var i;return r=u.defaults(r||{},{includeRuntime:!1}),i=l.test(t)?e("babel-core").transform(t,p):{code:t},!0===r.includeRuntime&&(i.code=(c||(c=s.readFileSync(n.path,"utf8")))+"\n"+i.code),i}var s=e("fs"),a=e("through"),o=e("./lib/visit").transform,u=e("./lib/util"),l=/\bfunction\s*\*|\basync\b/;t.exports=r,r.runtime=n,n.path=e("regenerator-runtime/path.js").path;var c,p={presets:[e("regenerator-preset")],parserOpts:{sourceType:"module",allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,strictMode:!1,plugins:["*","jsx","flow"]}};r.types=e("recast").types,r.compile=i,r.transform=o},{"./lib/util":599,"./lib/visit":600,"babel-core":31,fs:191,recast:574,"regenerator-preset":587,"regenerator-runtime":589,"regenerator-runtime/path.js":588,through:606}]},{},[]); \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/$data.js b/tools/node_modules/eslint/node_modules/ajv/lib/$data.js
new file mode 100644
index 0000000000..60cfc2d8de
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/$data.js
@@ -0,0 +1,49 @@
+'use strict';
+
+var KEYWORDS = [
+ 'multipleOf',
+ 'maximum',
+ 'exclusiveMaximum',
+ 'minimum',
+ 'exclusiveMinimum',
+ 'maxLength',
+ 'minLength',
+ 'pattern',
+ 'additionalItems',
+ 'maxItems',
+ 'minItems',
+ 'uniqueItems',
+ 'maxProperties',
+ 'minProperties',
+ 'required',
+ 'additionalProperties',
+ 'enum',
+ 'format',
+ 'const'
+];
+
+module.exports = function (metaSchema, keywordsJsonPointers) {
+ for (var i=0; i<keywordsJsonPointers.length; i++) {
+ metaSchema = JSON.parse(JSON.stringify(metaSchema));
+ var segments = keywordsJsonPointers[i].split('/');
+ var keywords = metaSchema;
+ var j;
+ for (j=1; j<segments.length; j++)
+ keywords = keywords[segments[j]];
+
+ for (j=0; j<KEYWORDS.length; j++) {
+ var key = KEYWORDS[j];
+ var schema = keywords[key];
+ if (schema) {
+ keywords[key] = {
+ anyOf: [
+ schema,
+ { $ref: 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#' }
+ ]
+ };
+ }
+ }
+ }
+
+ return metaSchema;
+};
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/ajv.d.ts b/tools/node_modules/eslint/node_modules/ajv/lib/ajv.d.ts
new file mode 100644
index 0000000000..b687f78147
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/ajv.d.ts
@@ -0,0 +1,328 @@
+declare var ajv: {
+ (options?: ajv.Options): ajv.Ajv;
+ new (options?: ajv.Options): ajv.Ajv;
+ ValidationError: ValidationError;
+ MissingRefError: MissingRefError;
+ $dataMetaSchema: Object;
+}
+
+declare namespace ajv {
+ interface Ajv {
+ /**
+ * Validate data using schema
+ * Schema will be compiled and cached (using serialized JSON as key, [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize by default).
+ * @param {String|Object|Boolean} schemaKeyRef key, ref or schema object
+ * @param {Any} data to be validated
+ * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`).
+ */
+ validate(schemaKeyRef: Object | string | boolean, data: any): boolean | Thenable<any>;
+ /**
+ * Create validating function for passed schema.
+ * @param {Object|Boolean} schema schema object
+ * @return {Function} validating function
+ */
+ compile(schema: Object | boolean): ValidateFunction;
+ /**
+ * Creates validating function for passed schema with asynchronous loading of missing schemas.
+ * `loadSchema` option should be a function that accepts schema uri and node-style callback.
+ * @this Ajv
+ * @param {Object|Boolean} schema schema object
+ * @param {Boolean} meta optional true to compile meta-schema; this parameter can be skipped
+ * @param {Function} callback optional node-style callback, it is always called with 2 parameters: error (or null) and validating function.
+ * @return {Thenable<ValidateFunction>} validating function
+ */
+ compileAsync(schema: Object | boolean, meta?: Boolean, callback?: (err: Error, validate: ValidateFunction) => any): Thenable<ValidateFunction>;
+ /**
+ * Adds schema to the instance.
+ * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored.
+ * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.
+ * @return {Ajv} this for method chaining
+ */
+ addSchema(schema: Array<Object> | Object, key?: string): Ajv;
+ /**
+ * Add schema that will be used to validate other schemas
+ * options in META_IGNORE_OPTIONS are alway set to false
+ * @param {Object} schema schema object
+ * @param {String} key optional schema key
+ * @return {Ajv} this for method chaining
+ */
+ addMetaSchema(schema: Object, key?: string): Ajv;
+ /**
+ * Validate schema
+ * @param {Object|Boolean} schema schema to validate
+ * @return {Boolean} true if schema is valid
+ */
+ validateSchema(schema: Object | boolean): boolean;
+ /**
+ * Get compiled schema from the instance by `key` or `ref`.
+ * @param {String} keyRef `key` that was passed to `addSchema` or full schema reference (`schema.id` or resolved id).
+ * @return {Function} schema validating function (with property `schema`).
+ */
+ getSchema(keyRef: string): ValidateFunction;
+ /**
+ * Remove cached schema(s).
+ * If no parameter is passed all schemas but meta-schemas are removed.
+ * If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed.
+ * Even if schema is referenced by other schemas it still can be removed as other schemas have local references.
+ * @param {String|Object|RegExp|Boolean} schemaKeyRef key, ref, pattern to match key/ref or schema object
+ * @return {Ajv} this for method chaining
+ */
+ removeSchema(schemaKeyRef?: Object | string | RegExp | boolean): Ajv;
+ /**
+ * Add custom format
+ * @param {String} name format name
+ * @param {String|RegExp|Function} format string is converted to RegExp; function should return boolean (true when valid)
+ * @return {Ajv} this for method chaining
+ */
+ addFormat(name: string, format: FormatValidator | FormatDefinition): Ajv;
+ /**
+ * Define custom keyword
+ * @this Ajv
+ * @param {String} keyword custom keyword, should be a valid identifier, should be different from all standard, custom and macro keywords.
+ * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`.
+ * @return {Ajv} this for method chaining
+ */
+ addKeyword(keyword: string, definition: KeywordDefinition): Ajv;
+ /**
+ * Get keyword definition
+ * @this Ajv
+ * @param {String} keyword pre-defined or custom keyword.
+ * @return {Object|Boolean} custom keyword definition, `true` if it is a predefined keyword, `false` otherwise.
+ */
+ getKeyword(keyword: string): Object | boolean;
+ /**
+ * Remove keyword
+ * @this Ajv
+ * @param {String} keyword pre-defined or custom keyword.
+ * @return {Ajv} this for method chaining
+ */
+ removeKeyword(keyword: string): Ajv;
+ /**
+ * Convert array of error message objects to string
+ * @param {Array<Object>} errors optional array of validation errors, if not passed errors from the instance are used.
+ * @param {Object} options optional options with properties `separator` and `dataVar`.
+ * @return {String} human readable string with all errors descriptions
+ */
+ errorsText(errors?: Array<ErrorObject>, options?: ErrorsTextOptions): string;
+ errors?: Array<ErrorObject>;
+ }
+
+ interface Thenable <R> {
+ then <U> (onFulfilled?: (value: R) => U | Thenable<U>, onRejected?: (error: any) => U | Thenable<U>): Thenable<U>;
+ }
+
+ interface ValidateFunction {
+ (
+ data: any,
+ dataPath?: string,
+ parentData?: Object | Array<any>,
+ parentDataProperty?: string | number,
+ rootData?: Object | Array<any>
+ ): boolean | Thenable<any>;
+ schema?: Object | boolean;
+ errors?: null | Array<ErrorObject>;
+ refs?: Object;
+ refVal?: Array<any>;
+ root?: ValidateFunction | Object;
+ $async?: true;
+ source?: Object;
+ }
+
+ interface Options {
+ $data?: boolean;
+ allErrors?: boolean;
+ verbose?: boolean;
+ jsonPointers?: boolean;
+ uniqueItems?: boolean;
+ unicode?: boolean;
+ format?: string;
+ formats?: Object;
+ unknownFormats?: true | string[] | 'ignore';
+ schemas?: Array<Object> | Object;
+ schemaId?: '$id' | 'id';
+ missingRefs?: true | 'ignore' | 'fail';
+ extendRefs?: true | 'ignore' | 'fail';
+ loadSchema?: (uri: string, cb?: (err: Error, schema: Object) => void) => Thenable<Object | boolean>;
+ removeAdditional?: boolean | 'all' | 'failing';
+ useDefaults?: boolean | 'shared';
+ coerceTypes?: boolean | 'array';
+ async?: boolean | string;
+ transpile?: string | ((code: string) => string);
+ meta?: boolean | Object;
+ validateSchema?: boolean | 'log';
+ addUsedSchema?: boolean;
+ inlineRefs?: boolean | number;
+ passContext?: boolean;
+ loopRequired?: number;
+ ownProperties?: boolean;
+ multipleOfPrecision?: boolean | number;
+ errorDataPath?: string,
+ messages?: boolean;
+ sourceCode?: boolean;
+ processCode?: (code: string) => string;
+ cache?: Object;
+ }
+
+ type FormatValidator = string | RegExp | ((data: string) => boolean | Thenable<any>);
+
+ interface FormatDefinition {
+ validate: FormatValidator;
+ compare: (data1: string, data2: string) => number;
+ async?: boolean;
+ }
+
+ interface KeywordDefinition {
+ type?: string | Array<string>;
+ async?: boolean;
+ $data?: boolean;
+ errors?: boolean | string;
+ metaSchema?: Object;
+ // schema: false makes validate not to expect schema (ValidateFunction)
+ schema?: boolean;
+ modifying?: boolean;
+ valid?: boolean;
+ // one and only one of the following properties should be present
+ validate?: SchemaValidateFunction | ValidateFunction;
+ compile?: (schema: any, parentSchema: Object) => ValidateFunction;
+ macro?: (schema: any, parentSchema: Object) => Object | boolean;
+ inline?: (it: Object, keyword: string, schema: any, parentSchema: Object) => string;
+ }
+
+ interface SchemaValidateFunction {
+ (
+ schema: any,
+ data: any,
+ parentSchema?: Object,
+ dataPath?: string,
+ parentData?: Object | Array<any>,
+ parentDataProperty?: string | number,
+ rootData?: Object | Array<any>
+ ): boolean | Thenable<any>;
+ errors?: Array<ErrorObject>;
+ }
+
+ interface ErrorsTextOptions {
+ separator?: string;
+ dataVar?: string;
+ }
+
+ interface ErrorObject {
+ keyword: string;
+ dataPath: string;
+ schemaPath: string;
+ params: ErrorParameters;
+ // Added to validation errors of propertyNames keyword schema
+ propertyName?: string;
+ // Excluded if messages set to false.
+ message?: string;
+ // These are added with the `verbose` option.
+ schema?: any;
+ parentSchema?: Object;
+ data?: any;
+ }
+
+ type ErrorParameters = RefParams | LimitParams | AdditionalPropertiesParams |
+ DependenciesParams | FormatParams | ComparisonParams |
+ MultipleOfParams | PatternParams | RequiredParams |
+ TypeParams | UniqueItemsParams | CustomParams |
+ PatternGroupsParams | PatternRequiredParams |
+ PropertyNamesParams | SwitchParams | NoParams | EnumParams;
+
+ interface RefParams {
+ ref: string;
+ }
+
+ interface LimitParams {
+ limit: number;
+ }
+
+ interface AdditionalPropertiesParams {
+ additionalProperty: string;
+ }
+
+ interface DependenciesParams {
+ property: string;
+ missingProperty: string;
+ depsCount: number;
+ deps: string;
+ }
+
+ interface FormatParams {
+ format: string
+ }
+
+ interface ComparisonParams {
+ comparison: string;
+ limit: number | string;
+ exclusive: boolean;
+ }
+
+ interface MultipleOfParams {
+ multipleOf: number;
+ }
+
+ interface PatternParams {
+ pattern: string;
+ }
+
+ interface RequiredParams {
+ missingProperty: string;
+ }
+
+ interface TypeParams {
+ type: string;
+ }
+
+ interface UniqueItemsParams {
+ i: number;
+ j: number;
+ }
+
+ interface CustomParams {
+ keyword: string;
+ }
+
+ interface PatternGroupsParams {
+ reason: string;
+ limit: number;
+ pattern: string;
+ }
+
+ interface PatternRequiredParams {
+ missingPattern: string;
+ }
+
+ interface PropertyNamesParams {
+ propertyName: string;
+ }
+
+ interface SwitchParams {
+ caseIndex: number;
+ }
+
+ interface NoParams {}
+
+ interface EnumParams {
+ allowedValues: Array<any>;
+ }
+}
+
+declare class ValidationError extends Error {
+ constructor(errors: Array<ajv.ErrorObject>);
+
+ message: string;
+ errors: Array<ajv.ErrorObject>;
+ ajv: true;
+ validation: true;
+}
+
+declare class MissingRefError extends Error {
+ constructor(baseId: string, ref: string, message?: string);
+ static message: (baseId: string, ref: string) => string;
+
+ message: string;
+ missingRef: string;
+ missingSchema: string;
+}
+
+export = ajv;
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/ajv.js b/tools/node_modules/eslint/node_modules/ajv/lib/ajv.js
new file mode 100644
index 0000000000..cbee2adbcb
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/ajv.js
@@ -0,0 +1,502 @@
+'use strict';
+
+var compileSchema = require('./compile')
+ , resolve = require('./compile/resolve')
+ , Cache = require('./cache')
+ , SchemaObject = require('./compile/schema_obj')
+ , stableStringify = require('fast-json-stable-stringify')
+ , formats = require('./compile/formats')
+ , rules = require('./compile/rules')
+ , $dataMetaSchema = require('./$data')
+ , patternGroups = require('./patternGroups')
+ , util = require('./compile/util')
+ , co = require('co');
+
+module.exports = Ajv;
+
+Ajv.prototype.validate = validate;
+Ajv.prototype.compile = compile;
+Ajv.prototype.addSchema = addSchema;
+Ajv.prototype.addMetaSchema = addMetaSchema;
+Ajv.prototype.validateSchema = validateSchema;
+Ajv.prototype.getSchema = getSchema;
+Ajv.prototype.removeSchema = removeSchema;
+Ajv.prototype.addFormat = addFormat;
+Ajv.prototype.errorsText = errorsText;
+
+Ajv.prototype._addSchema = _addSchema;
+Ajv.prototype._compile = _compile;
+
+Ajv.prototype.compileAsync = require('./compile/async');
+var customKeyword = require('./keyword');
+Ajv.prototype.addKeyword = customKeyword.add;
+Ajv.prototype.getKeyword = customKeyword.get;
+Ajv.prototype.removeKeyword = customKeyword.remove;
+
+var errorClasses = require('./compile/error_classes');
+Ajv.ValidationError = errorClasses.Validation;
+Ajv.MissingRefError = errorClasses.MissingRef;
+Ajv.$dataMetaSchema = $dataMetaSchema;
+
+var META_SCHEMA_ID = 'http://json-schema.org/draft-06/schema';
+
+var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes' ];
+var META_SUPPORT_DATA = ['/properties'];
+
+/**
+ * Creates validator instance.
+ * Usage: `Ajv(opts)`
+ * @param {Object} opts optional options
+ * @return {Object} ajv instance
+ */
+function Ajv(opts) {
+ if (!(this instanceof Ajv)) return new Ajv(opts);
+ opts = this._opts = util.copy(opts) || {};
+ setLogger(this);
+ this._schemas = {};
+ this._refs = {};
+ this._fragments = {};
+ this._formats = formats(opts.format);
+ var schemaUriFormat = this._schemaUriFormat = this._formats['uri-reference'];
+ this._schemaUriFormatFunc = function (str) { return schemaUriFormat.test(str); };
+
+ this._cache = opts.cache || new Cache;
+ this._loadingSchemas = {};
+ this._compilations = [];
+ this.RULES = rules();
+ this._getId = chooseGetId(opts);
+
+ opts.loopRequired = opts.loopRequired || Infinity;
+ if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true;
+ if (opts.serialize === undefined) opts.serialize = stableStringify;
+ this._metaOpts = getMetaSchemaOptions(this);
+
+ if (opts.formats) addInitialFormats(this);
+ addDraft6MetaSchema(this);
+ if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta);
+ addInitialSchemas(this);
+ if (opts.patternGroups) patternGroups(this);
+}
+
+
+
+/**
+ * Validate data using schema
+ * Schema will be compiled and cached (using serialized JSON as key. [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize.
+ * @this Ajv
+ * @param {String|Object} schemaKeyRef key, ref or schema object
+ * @param {Any} data to be validated
+ * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`).
+ */
+function validate(schemaKeyRef, data) {
+ var v;
+ if (typeof schemaKeyRef == 'string') {
+ v = this.getSchema(schemaKeyRef);
+ if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"');
+ } else {
+ var schemaObj = this._addSchema(schemaKeyRef);
+ v = schemaObj.validate || this._compile(schemaObj);
+ }
+
+ var valid = v(data);
+ if (v.$async === true)
+ return this._opts.async == '*' ? co(valid) : valid;
+ this.errors = v.errors;
+ return valid;
+}
+
+
+/**
+ * Create validating function for passed schema.
+ * @this Ajv
+ * @param {Object} schema schema object
+ * @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords.
+ * @return {Function} validating function
+ */
+function compile(schema, _meta) {
+ var schemaObj = this._addSchema(schema, undefined, _meta);
+ return schemaObj.validate || this._compile(schemaObj);
+}
+
+
+/**
+ * Adds schema to the instance.
+ * @this Ajv
+ * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored.
+ * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.
+ * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead.
+ * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead.
+ * @return {Ajv} this for method chaining
+ */
+function addSchema(schema, key, _skipValidation, _meta) {
+ if (Array.isArray(schema)){
+ for (var i=0; i<schema.length; i++) this.addSchema(schema[i], undefined, _skipValidation, _meta);
+ return;
+ }
+ var id = this._getId(schema);
+ if (id !== undefined && typeof id != 'string')
+ throw new Error('schema id must be string');
+ key = resolve.normalizeId(key || id);
+ checkUnique(this, key);
+ this._schemas[key] = this._addSchema(schema, _skipValidation, _meta, true);
+ return this;
+}
+
+
+/**
+ * Add schema that will be used to validate other schemas
+ * options in META_IGNORE_OPTIONS are alway set to false
+ * @this Ajv
+ * @param {Object} schema schema object
+ * @param {String} key optional schema key
+ * @param {Boolean} skipValidation true to skip schema validation, can be used to override validateSchema option for meta-schema
+ * @return {Ajv} this for method chaining
+ */
+function addMetaSchema(schema, key, skipValidation) {
+ this.addSchema(schema, key, skipValidation, true);
+ return this;
+}
+
+
+/**
+ * Validate schema
+ * @this Ajv
+ * @param {Object} schema schema to validate
+ * @param {Boolean} throwOrLogError pass true to throw (or log) an error if invalid
+ * @return {Boolean} true if schema is valid
+ */
+function validateSchema(schema, throwOrLogError) {
+ var $schema = schema.$schema;
+ if ($schema !== undefined && typeof $schema != 'string')
+ throw new Error('$schema must be a string');
+ $schema = $schema || this._opts.defaultMeta || defaultMeta(this);
+ if (!$schema) {
+ this.logger.warn('meta-schema not available');
+ this.errors = null;
+ return true;
+ }
+ var currentUriFormat = this._formats.uri;
+ this._formats.uri = typeof currentUriFormat == 'function'
+ ? this._schemaUriFormatFunc
+ : this._schemaUriFormat;
+ var valid;
+ try { valid = this.validate($schema, schema); }
+ finally { this._formats.uri = currentUriFormat; }
+ if (!valid && throwOrLogError) {
+ var message = 'schema is invalid: ' + this.errorsText();
+ if (this._opts.validateSchema == 'log') this.logger.error(message);
+ else throw new Error(message);
+ }
+ return valid;
+}
+
+
+function defaultMeta(self) {
+ var meta = self._opts.meta;
+ self._opts.defaultMeta = typeof meta == 'object'
+ ? self._getId(meta) || meta
+ : self.getSchema(META_SCHEMA_ID)
+ ? META_SCHEMA_ID
+ : undefined;
+ return self._opts.defaultMeta;
+}
+
+
+/**
+ * Get compiled schema from the instance by `key` or `ref`.
+ * @this Ajv
+ * @param {String} keyRef `key` that was passed to `addSchema` or full schema reference (`schema.id` or resolved id).
+ * @return {Function} schema validating function (with property `schema`).
+ */
+function getSchema(keyRef) {
+ var schemaObj = _getSchemaObj(this, keyRef);
+ switch (typeof schemaObj) {
+ case 'object': return schemaObj.validate || this._compile(schemaObj);
+ case 'string': return this.getSchema(schemaObj);
+ case 'undefined': return _getSchemaFragment(this, keyRef);
+ }
+}
+
+
+function _getSchemaFragment(self, ref) {
+ var res = resolve.schema.call(self, { schema: {} }, ref);
+ if (res) {
+ var schema = res.schema
+ , root = res.root
+ , baseId = res.baseId;
+ var v = compileSchema.call(self, schema, root, undefined, baseId);
+ self._fragments[ref] = new SchemaObject({
+ ref: ref,
+ fragment: true,
+ schema: schema,
+ root: root,
+ baseId: baseId,
+ validate: v
+ });
+ return v;
+ }
+}
+
+
+function _getSchemaObj(self, keyRef) {
+ keyRef = resolve.normalizeId(keyRef);
+ return self._schemas[keyRef] || self._refs[keyRef] || self._fragments[keyRef];
+}
+
+
+/**
+ * Remove cached schema(s).
+ * If no parameter is passed all schemas but meta-schemas are removed.
+ * If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed.
+ * Even if schema is referenced by other schemas it still can be removed as other schemas have local references.
+ * @this Ajv
+ * @param {String|Object|RegExp} schemaKeyRef key, ref, pattern to match key/ref or schema object
+ * @return {Ajv} this for method chaining
+ */
+function removeSchema(schemaKeyRef) {
+ if (schemaKeyRef instanceof RegExp) {
+ _removeAllSchemas(this, this._schemas, schemaKeyRef);
+ _removeAllSchemas(this, this._refs, schemaKeyRef);
+ return this;
+ }
+ switch (typeof schemaKeyRef) {
+ case 'undefined':
+ _removeAllSchemas(this, this._schemas);
+ _removeAllSchemas(this, this._refs);
+ this._cache.clear();
+ return this;
+ case 'string':
+ var schemaObj = _getSchemaObj(this, schemaKeyRef);
+ if (schemaObj) this._cache.del(schemaObj.cacheKey);
+ delete this._schemas[schemaKeyRef];
+ delete this._refs[schemaKeyRef];
+ return this;
+ case 'object':
+ var serialize = this._opts.serialize;
+ var cacheKey = serialize ? serialize(schemaKeyRef) : schemaKeyRef;
+ this._cache.del(cacheKey);
+ var id = this._getId(schemaKeyRef);
+ if (id) {
+ id = resolve.normalizeId(id);
+ delete this._schemas[id];
+ delete this._refs[id];
+ }
+ }
+ return this;
+}
+
+
+function _removeAllSchemas(self, schemas, regex) {
+ for (var keyRef in schemas) {
+ var schemaObj = schemas[keyRef];
+ if (!schemaObj.meta && (!regex || regex.test(keyRef))) {
+ self._cache.del(schemaObj.cacheKey);
+ delete schemas[keyRef];
+ }
+ }
+}
+
+
+/* @this Ajv */
+function _addSchema(schema, skipValidation, meta, shouldAddSchema) {
+ if (typeof schema != 'object' && typeof schema != 'boolean')
+ throw new Error('schema should be object or boolean');
+ var serialize = this._opts.serialize;
+ var cacheKey = serialize ? serialize(schema) : schema;
+ var cached = this._cache.get(cacheKey);
+ if (cached) return cached;
+
+ shouldAddSchema = shouldAddSchema || this._opts.addUsedSchema !== false;
+
+ var id = resolve.normalizeId(this._getId(schema));
+ if (id && shouldAddSchema) checkUnique(this, id);
+
+ var willValidate = this._opts.validateSchema !== false && !skipValidation;
+ var recursiveMeta;
+ if (willValidate && !(recursiveMeta = id && id == resolve.normalizeId(schema.$schema)))
+ this.validateSchema(schema, true);
+
+ var localRefs = resolve.ids.call(this, schema);
+
+ var schemaObj = new SchemaObject({
+ id: id,
+ schema: schema,
+ localRefs: localRefs,
+ cacheKey: cacheKey,
+ meta: meta
+ });
+
+ if (id[0] != '#' && shouldAddSchema) this._refs[id] = schemaObj;
+ this._cache.put(cacheKey, schemaObj);
+
+ if (willValidate && recursiveMeta) this.validateSchema(schema, true);
+
+ return schemaObj;
+}
+
+
+/* @this Ajv */
+function _compile(schemaObj, root) {
+ if (schemaObj.compiling) {
+ schemaObj.validate = callValidate;
+ callValidate.schema = schemaObj.schema;
+ callValidate.errors = null;
+ callValidate.root = root ? root : callValidate;
+ if (schemaObj.schema.$async === true)
+ callValidate.$async = true;
+ return callValidate;
+ }
+ schemaObj.compiling = true;
+
+ var currentOpts;
+ if (schemaObj.meta) {
+ currentOpts = this._opts;
+ this._opts = this._metaOpts;
+ }
+
+ var v;
+ try { v = compileSchema.call(this, schemaObj.schema, root, schemaObj.localRefs); }
+ finally {
+ schemaObj.compiling = false;
+ if (schemaObj.meta) this._opts = currentOpts;
+ }
+
+ schemaObj.validate = v;
+ schemaObj.refs = v.refs;
+ schemaObj.refVal = v.refVal;
+ schemaObj.root = v.root;
+ return v;
+
+
+ function callValidate() {
+ var _validate = schemaObj.validate;
+ var result = _validate.apply(null, arguments);
+ callValidate.errors = _validate.errors;
+ return result;
+ }
+}
+
+
+function chooseGetId(opts) {
+ switch (opts.schemaId) {
+ case '$id': return _get$Id;
+ case 'id': return _getId;
+ default: return _get$IdOrId;
+ }
+}
+
+/* @this Ajv */
+function _getId(schema) {
+ if (schema.$id) this.logger.warn('schema $id ignored', schema.$id);
+ return schema.id;
+}
+
+/* @this Ajv */
+function _get$Id(schema) {
+ if (schema.id) this.logger.warn('schema id ignored', schema.id);
+ return schema.$id;
+}
+
+
+function _get$IdOrId(schema) {
+ if (schema.$id && schema.id && schema.$id != schema.id)
+ throw new Error('schema $id is different from id');
+ return schema.$id || schema.id;
+}
+
+
+/**
+ * Convert array of error message objects to string
+ * @this Ajv
+ * @param {Array<Object>} errors optional array of validation errors, if not passed errors from the instance are used.
+ * @param {Object} options optional options with properties `separator` and `dataVar`.
+ * @return {String} human readable string with all errors descriptions
+ */
+function errorsText(errors, options) {
+ errors = errors || this.errors;
+ if (!errors) return 'No errors';
+ options = options || {};
+ var separator = options.separator === undefined ? ', ' : options.separator;
+ var dataVar = options.dataVar === undefined ? 'data' : options.dataVar;
+
+ var text = '';
+ for (var i=0; i<errors.length; i++) {
+ var e = errors[i];
+ if (e) text += dataVar + e.dataPath + ' ' + e.message + separator;
+ }
+ return text.slice(0, -separator.length);
+}
+
+
+/**
+ * Add custom format
+ * @this Ajv
+ * @param {String} name format name
+ * @param {String|RegExp|Function} format string is converted to RegExp; function should return boolean (true when valid)
+ * @return {Ajv} this for method chaining
+ */
+function addFormat(name, format) {
+ if (typeof format == 'string') format = new RegExp(format);
+ this._formats[name] = format;
+ return this;
+}
+
+
+function addDraft6MetaSchema(self) {
+ var $dataSchema;
+ if (self._opts.$data) {
+ $dataSchema = require('./refs/$data.json');
+ self.addMetaSchema($dataSchema, $dataSchema.$id, true);
+ }
+ if (self._opts.meta === false) return;
+ var metaSchema = require('./refs/json-schema-draft-06.json');
+ if (self._opts.$data) metaSchema = $dataMetaSchema(metaSchema, META_SUPPORT_DATA);
+ self.addMetaSchema(metaSchema, META_SCHEMA_ID, true);
+ self._refs['http://json-schema.org/schema'] = META_SCHEMA_ID;
+}
+
+
+function addInitialSchemas(self) {
+ var optsSchemas = self._opts.schemas;
+ if (!optsSchemas) return;
+ if (Array.isArray(optsSchemas)) self.addSchema(optsSchemas);
+ else for (var key in optsSchemas) self.addSchema(optsSchemas[key], key);
+}
+
+
+function addInitialFormats(self) {
+ for (var name in self._opts.formats) {
+ var format = self._opts.formats[name];
+ self.addFormat(name, format);
+ }
+}
+
+
+function checkUnique(self, id) {
+ if (self._schemas[id] || self._refs[id])
+ throw new Error('schema with key or id "' + id + '" already exists');
+}
+
+
+function getMetaSchemaOptions(self) {
+ var metaOpts = util.copy(self._opts);
+ for (var i=0; i<META_IGNORE_OPTIONS.length; i++)
+ delete metaOpts[META_IGNORE_OPTIONS[i]];
+ return metaOpts;
+}
+
+
+function setLogger(self) {
+ var logger = self._opts.logger;
+ if (logger === false) {
+ self.logger = {log: noop, warn: noop, error: noop};
+ } else {
+ if (logger === undefined) logger = console;
+ if (!(typeof logger == 'object' && logger.log && logger.warn && logger.error))
+ throw new Error('logger must implement log, warn and error methods');
+ self.logger = logger;
+ }
+}
+
+
+function noop() {}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/cache.js b/tools/node_modules/eslint/node_modules/ajv/lib/cache.js
new file mode 100644
index 0000000000..7558874c73
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/cache.js
@@ -0,0 +1,26 @@
+'use strict';
+
+
+var Cache = module.exports = function Cache() {
+ this._cache = {};
+};
+
+
+Cache.prototype.put = function Cache_put(key, value) {
+ this._cache[key] = value;
+};
+
+
+Cache.prototype.get = function Cache_get(key) {
+ return this._cache[key];
+};
+
+
+Cache.prototype.del = function Cache_del(key) {
+ delete this._cache[key];
+};
+
+
+Cache.prototype.clear = function Cache_clear() {
+ this._cache = {};
+};
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/compile/_rules.js b/tools/node_modules/eslint/node_modules/ajv/lib/compile/_rules.js
new file mode 100644
index 0000000000..3fe69973a0
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/compile/_rules.js
@@ -0,0 +1,31 @@
+'use strict';
+
+//all requires must be explicit because browserify won't work with dynamic requires
+module.exports = {
+ '$ref': require('../dotjs/ref'),
+ allOf: require('../dotjs/allOf'),
+ anyOf: require('../dotjs/anyOf'),
+ const: require('../dotjs/const'),
+ contains: require('../dotjs/contains'),
+ dependencies: require('../dotjs/dependencies'),
+ 'enum': require('../dotjs/enum'),
+ format: require('../dotjs/format'),
+ items: require('../dotjs/items'),
+ maximum: require('../dotjs/_limit'),
+ minimum: require('../dotjs/_limit'),
+ maxItems: require('../dotjs/_limitItems'),
+ minItems: require('../dotjs/_limitItems'),
+ maxLength: require('../dotjs/_limitLength'),
+ minLength: require('../dotjs/_limitLength'),
+ maxProperties: require('../dotjs/_limitProperties'),
+ minProperties: require('../dotjs/_limitProperties'),
+ multipleOf: require('../dotjs/multipleOf'),
+ not: require('../dotjs/not'),
+ oneOf: require('../dotjs/oneOf'),
+ pattern: require('../dotjs/pattern'),
+ properties: require('../dotjs/properties'),
+ propertyNames: require('../dotjs/propertyNames'),
+ required: require('../dotjs/required'),
+ uniqueItems: require('../dotjs/uniqueItems'),
+ validate: require('../dotjs/validate')
+};
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/compile/async.js b/tools/node_modules/eslint/node_modules/ajv/lib/compile/async.js
new file mode 100644
index 0000000000..6a30b8892b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/compile/async.js
@@ -0,0 +1,90 @@
+'use strict';
+
+var MissingRefError = require('./error_classes').MissingRef;
+
+module.exports = compileAsync;
+
+
+/**
+ * Creates validating function for passed schema with asynchronous loading of missing schemas.
+ * `loadSchema` option should be a function that accepts schema uri and returns promise that resolves with the schema.
+ * @this Ajv
+ * @param {Object} schema schema object
+ * @param {Boolean} meta optional true to compile meta-schema; this parameter can be skipped
+ * @param {Function} callback an optional node-style callback, it is called with 2 parameters: error (or null) and validating function.
+ * @return {Promise} promise that resolves with a validating function.
+ */
+function compileAsync(schema, meta, callback) {
+ /* eslint no-shadow: 0 */
+ /* global Promise */
+ /* jshint validthis: true */
+ var self = this;
+ if (typeof this._opts.loadSchema != 'function')
+ throw new Error('options.loadSchema should be a function');
+
+ if (typeof meta == 'function') {
+ callback = meta;
+ meta = undefined;
+ }
+
+ var p = loadMetaSchemaOf(schema).then(function () {
+ var schemaObj = self._addSchema(schema, undefined, meta);
+ return schemaObj.validate || _compileAsync(schemaObj);
+ });
+
+ if (callback) {
+ p.then(
+ function(v) { callback(null, v); },
+ callback
+ );
+ }
+
+ return p;
+
+
+ function loadMetaSchemaOf(sch) {
+ var $schema = sch.$schema;
+ return $schema && !self.getSchema($schema)
+ ? compileAsync.call(self, { $ref: $schema }, true)
+ : Promise.resolve();
+ }
+
+
+ function _compileAsync(schemaObj) {
+ try { return self._compile(schemaObj); }
+ catch(e) {
+ if (e instanceof MissingRefError) return loadMissingSchema(e);
+ throw e;
+ }
+
+
+ function loadMissingSchema(e) {
+ var ref = e.missingSchema;
+ if (added(ref)) throw new Error('Schema ' + ref + ' is loaded but ' + e.missingRef + ' cannot be resolved');
+
+ var schemaPromise = self._loadingSchemas[ref];
+ if (!schemaPromise) {
+ schemaPromise = self._loadingSchemas[ref] = self._opts.loadSchema(ref);
+ schemaPromise.then(removePromise, removePromise);
+ }
+
+ return schemaPromise.then(function (sch) {
+ if (!added(ref)) {
+ return loadMetaSchemaOf(sch).then(function () {
+ if (!added(ref)) self.addSchema(sch, ref, undefined, meta);
+ });
+ }
+ }).then(function() {
+ return _compileAsync(schemaObj);
+ });
+
+ function removePromise() {
+ delete self._loadingSchemas[ref];
+ }
+
+ function added(ref) {
+ return self._refs[ref] || self._schemas[ref];
+ }
+ }
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/compile/equal.js b/tools/node_modules/eslint/node_modules/ajv/lib/compile/equal.js
new file mode 100644
index 0000000000..911774c855
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/compile/equal.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('fast-deep-equal');
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/compile/error_classes.js b/tools/node_modules/eslint/node_modules/ajv/lib/compile/error_classes.js
new file mode 100644
index 0000000000..0b0ec4e4e3
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/compile/error_classes.js
@@ -0,0 +1,34 @@
+'use strict';
+
+var resolve = require('./resolve');
+
+module.exports = {
+ Validation: errorSubclass(ValidationError),
+ MissingRef: errorSubclass(MissingRefError)
+};
+
+
+function ValidationError(errors) {
+ this.message = 'validation failed';
+ this.errors = errors;
+ this.ajv = this.validation = true;
+}
+
+
+MissingRefError.message = function (baseId, ref) {
+ return 'can\'t resolve reference ' + ref + ' from id ' + baseId;
+};
+
+
+function MissingRefError(baseId, ref, message) {
+ this.message = message || MissingRefError.message(baseId, ref);
+ this.missingRef = resolve.url(baseId, ref);
+ this.missingSchema = resolve.normalizeId(resolve.fullPath(this.missingRef));
+}
+
+
+function errorSubclass(Subclass) {
+ Subclass.prototype = Object.create(Error.prototype);
+ Subclass.prototype.constructor = Subclass;
+ return Subclass;
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/compile/formats.js b/tools/node_modules/eslint/node_modules/ajv/lib/compile/formats.js
new file mode 100644
index 0000000000..b3a1541a6f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/compile/formats.js
@@ -0,0 +1,135 @@
+'use strict';
+
+var util = require('./util');
+
+var DATE = /^\d\d\d\d-(\d\d)-(\d\d)$/;
+var DAYS = [0,31,29,31,30,31,30,31,31,30,31,30,31];
+var TIME = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d:\d\d)?$/i;
+var HOSTNAME = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*$/i;
+var URI = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
+var URIREF = /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
+// uri-template: https://tools.ietf.org/html/rfc6570
+var URITEMPLATE = /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i;
+// For the source: https://gist.github.com/dperini/729294
+// For test cases: https://mathiasbynens.be/demo/url-regex
+// @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983.
+// var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu;
+var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i;
+var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;
+var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$|^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;
+var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;
+
+
+module.exports = formats;
+
+function formats(mode) {
+ mode = mode == 'full' ? 'full' : 'fast';
+ return util.copy(formats[mode]);
+}
+
+
+formats.fast = {
+ // date: http://tools.ietf.org/html/rfc3339#section-5.6
+ date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/,
+ // date-time: http://tools.ietf.org/html/rfc3339#section-5.6
+ time: /^[0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,
+ 'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s][0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i,
+ // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js
+ uri: /^(?:[a-z][a-z0-9+-.]*)(?::|\/)\/?[^\s]*$/i,
+ 'uri-reference': /^(?:(?:[a-z][a-z0-9+-.]*:)?\/\/)?[^\s]*$/i,
+ 'uri-template': URITEMPLATE,
+ url: URL,
+ // email (sources from jsen validator):
+ // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363
+ // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation')
+ email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,
+ hostname: HOSTNAME,
+ // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html
+ ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,
+ // optimized http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses
+ ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,
+ regex: regex,
+ // uuid: http://tools.ietf.org/html/rfc4122
+ uuid: UUID,
+ // JSON-pointer: https://tools.ietf.org/html/rfc6901
+ // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A
+ 'json-pointer': JSON_POINTER,
+ // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00
+ 'relative-json-pointer': RELATIVE_JSON_POINTER
+};
+
+
+formats.full = {
+ date: date,
+ time: time,
+ 'date-time': date_time,
+ uri: uri,
+ 'uri-reference': URIREF,
+ 'uri-template': URITEMPLATE,
+ url: URL,
+ email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&''*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,
+ hostname: hostname,
+ ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,
+ ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,
+ regex: regex,
+ uuid: UUID,
+ 'json-pointer': JSON_POINTER,
+ 'relative-json-pointer': RELATIVE_JSON_POINTER
+};
+
+
+function date(str) {
+ // full-date from http://tools.ietf.org/html/rfc3339#section-5.6
+ var matches = str.match(DATE);
+ if (!matches) return false;
+
+ var month = +matches[1];
+ var day = +matches[2];
+ return month >= 1 && month <= 12 && day >= 1 && day <= DAYS[month];
+}
+
+
+function time(str, full) {
+ var matches = str.match(TIME);
+ if (!matches) return false;
+
+ var hour = matches[1];
+ var minute = matches[2];
+ var second = matches[3];
+ var timeZone = matches[5];
+ return hour <= 23 && minute <= 59 && second <= 59 && (!full || timeZone);
+}
+
+
+var DATE_TIME_SEPARATOR = /t|\s/i;
+function date_time(str) {
+ // http://tools.ietf.org/html/rfc3339#section-5.6
+ var dateTime = str.split(DATE_TIME_SEPARATOR);
+ return dateTime.length == 2 && date(dateTime[0]) && time(dateTime[1], true);
+}
+
+
+function hostname(str) {
+ // https://tools.ietf.org/html/rfc1034#section-3.5
+ // https://tools.ietf.org/html/rfc1123#section-2
+ return str.length <= 255 && HOSTNAME.test(str);
+}
+
+
+var NOT_URI_FRAGMENT = /\/|:/;
+function uri(str) {
+ // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "."
+ return NOT_URI_FRAGMENT.test(str) && URI.test(str);
+}
+
+
+var Z_ANCHOR = /[^\\]\\Z/;
+function regex(str) {
+ if (Z_ANCHOR.test(str)) return false;
+ try {
+ new RegExp(str);
+ return true;
+ } catch(e) {
+ return false;
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/compile/index.js b/tools/node_modules/eslint/node_modules/ajv/lib/compile/index.js
new file mode 100644
index 0000000000..cf4f5b86bb
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/compile/index.js
@@ -0,0 +1,380 @@
+'use strict';
+
+var resolve = require('./resolve')
+ , util = require('./util')
+ , errorClasses = require('./error_classes')
+ , stableStringify = require('fast-json-stable-stringify');
+
+var validateGenerator = require('../dotjs/validate');
+
+/**
+ * Functions below are used inside compiled validations function
+ */
+
+var co = require('co');
+var ucs2length = util.ucs2length;
+var equal = require('fast-deep-equal');
+
+// this error is thrown by async schemas to return validation errors via exception
+var ValidationError = errorClasses.Validation;
+
+module.exports = compile;
+
+
+/**
+ * Compiles schema to validation function
+ * @this Ajv
+ * @param {Object} schema schema object
+ * @param {Object} root object with information about the root schema for this schema
+ * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution
+ * @param {String} baseId base ID for IDs in the schema
+ * @return {Function} validation function
+ */
+function compile(schema, root, localRefs, baseId) {
+ /* jshint validthis: true, evil: true */
+ /* eslint no-shadow: 0 */
+ var self = this
+ , opts = this._opts
+ , refVal = [ undefined ]
+ , refs = {}
+ , patterns = []
+ , patternsHash = {}
+ , defaults = []
+ , defaultsHash = {}
+ , customRules = [];
+
+ root = root || { schema: schema, refVal: refVal, refs: refs };
+
+ var c = checkCompiling.call(this, schema, root, baseId);
+ var compilation = this._compilations[c.index];
+ if (c.compiling) return (compilation.callValidate = callValidate);
+
+ var formats = this._formats;
+ var RULES = this.RULES;
+
+ try {
+ var v = localCompile(schema, root, localRefs, baseId);
+ compilation.validate = v;
+ var cv = compilation.callValidate;
+ if (cv) {
+ cv.schema = v.schema;
+ cv.errors = null;
+ cv.refs = v.refs;
+ cv.refVal = v.refVal;
+ cv.root = v.root;
+ cv.$async = v.$async;
+ if (opts.sourceCode) cv.source = v.source;
+ }
+ return v;
+ } finally {
+ endCompiling.call(this, schema, root, baseId);
+ }
+
+ function callValidate() {
+ var validate = compilation.validate;
+ var result = validate.apply(null, arguments);
+ callValidate.errors = validate.errors;
+ return result;
+ }
+
+ function localCompile(_schema, _root, localRefs, baseId) {
+ var isRoot = !_root || (_root && _root.schema == _schema);
+ if (_root.schema != root.schema)
+ return compile.call(self, _schema, _root, localRefs, baseId);
+
+ var $async = _schema.$async === true;
+
+ var sourceCode = validateGenerator({
+ isTop: true,
+ schema: _schema,
+ isRoot: isRoot,
+ baseId: baseId,
+ root: _root,
+ schemaPath: '',
+ errSchemaPath: '#',
+ errorPath: '""',
+ MissingRefError: errorClasses.MissingRef,
+ RULES: RULES,
+ validate: validateGenerator,
+ util: util,
+ resolve: resolve,
+ resolveRef: resolveRef,
+ usePattern: usePattern,
+ useDefault: useDefault,
+ useCustomRule: useCustomRule,
+ opts: opts,
+ formats: formats,
+ logger: self.logger,
+ self: self
+ });
+
+ sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode)
+ + vars(defaults, defaultCode) + vars(customRules, customRuleCode)
+ + sourceCode;
+
+ if (opts.processCode) sourceCode = opts.processCode(sourceCode);
+ // console.log('\n\n\n *** \n', JSON.stringify(sourceCode));
+ var validate;
+ try {
+ var makeValidate = new Function(
+ 'self',
+ 'RULES',
+ 'formats',
+ 'root',
+ 'refVal',
+ 'defaults',
+ 'customRules',
+ 'co',
+ 'equal',
+ 'ucs2length',
+ 'ValidationError',
+ sourceCode
+ );
+
+ validate = makeValidate(
+ self,
+ RULES,
+ formats,
+ root,
+ refVal,
+ defaults,
+ customRules,
+ co,
+ equal,
+ ucs2length,
+ ValidationError
+ );
+
+ refVal[0] = validate;
+ } catch(e) {
+ self.logger.error('Error compiling schema, function code:', sourceCode);
+ throw e;
+ }
+
+ validate.schema = _schema;
+ validate.errors = null;
+ validate.refs = refs;
+ validate.refVal = refVal;
+ validate.root = isRoot ? validate : _root;
+ if ($async) validate.$async = true;
+ if (opts.sourceCode === true) {
+ validate.source = {
+ code: sourceCode,
+ patterns: patterns,
+ defaults: defaults
+ };
+ }
+
+ return validate;
+ }
+
+ function resolveRef(baseId, ref, isRoot) {
+ ref = resolve.url(baseId, ref);
+ var refIndex = refs[ref];
+ var _refVal, refCode;
+ if (refIndex !== undefined) {
+ _refVal = refVal[refIndex];
+ refCode = 'refVal[' + refIndex + ']';
+ return resolvedRef(_refVal, refCode);
+ }
+ if (!isRoot && root.refs) {
+ var rootRefId = root.refs[ref];
+ if (rootRefId !== undefined) {
+ _refVal = root.refVal[rootRefId];
+ refCode = addLocalRef(ref, _refVal);
+ return resolvedRef(_refVal, refCode);
+ }
+ }
+
+ refCode = addLocalRef(ref);
+ var v = resolve.call(self, localCompile, root, ref);
+ if (v === undefined) {
+ var localSchema = localRefs && localRefs[ref];
+ if (localSchema) {
+ v = resolve.inlineRef(localSchema, opts.inlineRefs)
+ ? localSchema
+ : compile.call(self, localSchema, root, localRefs, baseId);
+ }
+ }
+
+ if (v === undefined) {
+ removeLocalRef(ref);
+ } else {
+ replaceLocalRef(ref, v);
+ return resolvedRef(v, refCode);
+ }
+ }
+
+ function addLocalRef(ref, v) {
+ var refId = refVal.length;
+ refVal[refId] = v;
+ refs[ref] = refId;
+ return 'refVal' + refId;
+ }
+
+ function removeLocalRef(ref) {
+ delete refs[ref];
+ }
+
+ function replaceLocalRef(ref, v) {
+ var refId = refs[ref];
+ refVal[refId] = v;
+ }
+
+ function resolvedRef(refVal, code) {
+ return typeof refVal == 'object' || typeof refVal == 'boolean'
+ ? { code: code, schema: refVal, inline: true }
+ : { code: code, $async: refVal && refVal.$async };
+ }
+
+ function usePattern(regexStr) {
+ var index = patternsHash[regexStr];
+ if (index === undefined) {
+ index = patternsHash[regexStr] = patterns.length;
+ patterns[index] = regexStr;
+ }
+ return 'pattern' + index;
+ }
+
+ function useDefault(value) {
+ switch (typeof value) {
+ case 'boolean':
+ case 'number':
+ return '' + value;
+ case 'string':
+ return util.toQuotedString(value);
+ case 'object':
+ if (value === null) return 'null';
+ var valueStr = stableStringify(value);
+ var index = defaultsHash[valueStr];
+ if (index === undefined) {
+ index = defaultsHash[valueStr] = defaults.length;
+ defaults[index] = value;
+ }
+ return 'default' + index;
+ }
+ }
+
+ function useCustomRule(rule, schema, parentSchema, it) {
+ var validateSchema = rule.definition.validateSchema;
+ if (validateSchema && self._opts.validateSchema !== false) {
+ var valid = validateSchema(schema);
+ if (!valid) {
+ var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors);
+ if (self._opts.validateSchema == 'log') self.logger.error(message);
+ else throw new Error(message);
+ }
+ }
+
+ var compile = rule.definition.compile
+ , inline = rule.definition.inline
+ , macro = rule.definition.macro;
+
+ var validate;
+ if (compile) {
+ validate = compile.call(self, schema, parentSchema, it);
+ } else if (macro) {
+ validate = macro.call(self, schema, parentSchema, it);
+ if (opts.validateSchema !== false) self.validateSchema(validate, true);
+ } else if (inline) {
+ validate = inline.call(self, it, rule.keyword, schema, parentSchema);
+ } else {
+ validate = rule.definition.validate;
+ if (!validate) return;
+ }
+
+ if (validate === undefined)
+ throw new Error('custom keyword "' + rule.keyword + '"failed to compile');
+
+ var index = customRules.length;
+ customRules[index] = validate;
+
+ return {
+ code: 'customRule' + index,
+ validate: validate
+ };
+ }
+}
+
+
+/**
+ * Checks if the schema is currently compiled
+ * @this Ajv
+ * @param {Object} schema schema to compile
+ * @param {Object} root root object
+ * @param {String} baseId base schema ID
+ * @return {Object} object with properties "index" (compilation index) and "compiling" (boolean)
+ */
+function checkCompiling(schema, root, baseId) {
+ /* jshint validthis: true */
+ var index = compIndex.call(this, schema, root, baseId);
+ if (index >= 0) return { index: index, compiling: true };
+ index = this._compilations.length;
+ this._compilations[index] = {
+ schema: schema,
+ root: root,
+ baseId: baseId
+ };
+ return { index: index, compiling: false };
+}
+
+
+/**
+ * Removes the schema from the currently compiled list
+ * @this Ajv
+ * @param {Object} schema schema to compile
+ * @param {Object} root root object
+ * @param {String} baseId base schema ID
+ */
+function endCompiling(schema, root, baseId) {
+ /* jshint validthis: true */
+ var i = compIndex.call(this, schema, root, baseId);
+ if (i >= 0) this._compilations.splice(i, 1);
+}
+
+
+/**
+ * Index of schema compilation in the currently compiled list
+ * @this Ajv
+ * @param {Object} schema schema to compile
+ * @param {Object} root root object
+ * @param {String} baseId base schema ID
+ * @return {Integer} compilation index
+ */
+function compIndex(schema, root, baseId) {
+ /* jshint validthis: true */
+ for (var i=0; i<this._compilations.length; i++) {
+ var c = this._compilations[i];
+ if (c.schema == schema && c.root == root && c.baseId == baseId) return i;
+ }
+ return -1;
+}
+
+
+function patternCode(i, patterns) {
+ return 'var pattern' + i + ' = new RegExp(' + util.toQuotedString(patterns[i]) + ');';
+}
+
+
+function defaultCode(i) {
+ return 'var default' + i + ' = defaults[' + i + '];';
+}
+
+
+function refValCode(i, refVal) {
+ return refVal[i] === undefined ? '' : 'var refVal' + i + ' = refVal[' + i + '];';
+}
+
+
+function customRuleCode(i) {
+ return 'var customRule' + i + ' = customRules[' + i + '];';
+}
+
+
+function vars(arr, statement) {
+ if (!arr.length) return '';
+ var code = '';
+ for (var i=0; i<arr.length; i++)
+ code += statement(i, arr);
+ return code;
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/compile/resolve.js b/tools/node_modules/eslint/node_modules/ajv/lib/compile/resolve.js
new file mode 100644
index 0000000000..7d06afab8c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/compile/resolve.js
@@ -0,0 +1,271 @@
+'use strict';
+
+var url = require('url')
+ , equal = require('fast-deep-equal')
+ , util = require('./util')
+ , SchemaObject = require('./schema_obj')
+ , traverse = require('json-schema-traverse');
+
+module.exports = resolve;
+
+resolve.normalizeId = normalizeId;
+resolve.fullPath = getFullPath;
+resolve.url = resolveUrl;
+resolve.ids = resolveIds;
+resolve.inlineRef = inlineRef;
+resolve.schema = resolveSchema;
+
+/**
+ * [resolve and compile the references ($ref)]
+ * @this Ajv
+ * @param {Function} compile reference to schema compilation funciton (localCompile)
+ * @param {Object} root object with information about the root schema for the current schema
+ * @param {String} ref reference to resolve
+ * @return {Object|Function} schema object (if the schema can be inlined) or validation function
+ */
+function resolve(compile, root, ref) {
+ /* jshint validthis: true */
+ var refVal = this._refs[ref];
+ if (typeof refVal == 'string') {
+ if (this._refs[refVal]) refVal = this._refs[refVal];
+ else return resolve.call(this, compile, root, refVal);
+ }
+
+ refVal = refVal || this._schemas[ref];
+ if (refVal instanceof SchemaObject) {
+ return inlineRef(refVal.schema, this._opts.inlineRefs)
+ ? refVal.schema
+ : refVal.validate || this._compile(refVal);
+ }
+
+ var res = resolveSchema.call(this, root, ref);
+ var schema, v, baseId;
+ if (res) {
+ schema = res.schema;
+ root = res.root;
+ baseId = res.baseId;
+ }
+
+ if (schema instanceof SchemaObject) {
+ v = schema.validate || compile.call(this, schema.schema, root, undefined, baseId);
+ } else if (schema !== undefined) {
+ v = inlineRef(schema, this._opts.inlineRefs)
+ ? schema
+ : compile.call(this, schema, root, undefined, baseId);
+ }
+
+ return v;
+}
+
+
+/**
+ * Resolve schema, its root and baseId
+ * @this Ajv
+ * @param {Object} root root object with properties schema, refVal, refs
+ * @param {String} ref reference to resolve
+ * @return {Object} object with properties schema, root, baseId
+ */
+function resolveSchema(root, ref) {
+ /* jshint validthis: true */
+ var p = url.parse(ref, false, true)
+ , refPath = _getFullPath(p)
+ , baseId = getFullPath(this._getId(root.schema));
+ if (refPath !== baseId) {
+ var id = normalizeId(refPath);
+ var refVal = this._refs[id];
+ if (typeof refVal == 'string') {
+ return resolveRecursive.call(this, root, refVal, p);
+ } else if (refVal instanceof SchemaObject) {
+ if (!refVal.validate) this._compile(refVal);
+ root = refVal;
+ } else {
+ refVal = this._schemas[id];
+ if (refVal instanceof SchemaObject) {
+ if (!refVal.validate) this._compile(refVal);
+ if (id == normalizeId(ref))
+ return { schema: refVal, root: root, baseId: baseId };
+ root = refVal;
+ } else {
+ return;
+ }
+ }
+ if (!root.schema) return;
+ baseId = getFullPath(this._getId(root.schema));
+ }
+ return getJsonPointer.call(this, p, baseId, root.schema, root);
+}
+
+
+/* @this Ajv */
+function resolveRecursive(root, ref, parsedRef) {
+ /* jshint validthis: true */
+ var res = resolveSchema.call(this, root, ref);
+ if (res) {
+ var schema = res.schema;
+ var baseId = res.baseId;
+ root = res.root;
+ var id = this._getId(schema);
+ if (id) baseId = resolveUrl(baseId, id);
+ return getJsonPointer.call(this, parsedRef, baseId, schema, root);
+ }
+}
+
+
+var PREVENT_SCOPE_CHANGE = util.toHash(['properties', 'patternProperties', 'enum', 'dependencies', 'definitions']);
+/* @this Ajv */
+function getJsonPointer(parsedRef, baseId, schema, root) {
+ /* jshint validthis: true */
+ parsedRef.hash = parsedRef.hash || '';
+ if (parsedRef.hash.slice(0,2) != '#/') return;
+ var parts = parsedRef.hash.split('/');
+
+ for (var i = 1; i < parts.length; i++) {
+ var part = parts[i];
+ if (part) {
+ part = util.unescapeFragment(part);
+ schema = schema[part];
+ if (schema === undefined) break;
+ var id;
+ if (!PREVENT_SCOPE_CHANGE[part]) {
+ id = this._getId(schema);
+ if (id) baseId = resolveUrl(baseId, id);
+ if (schema.$ref) {
+ var $ref = resolveUrl(baseId, schema.$ref);
+ var res = resolveSchema.call(this, root, $ref);
+ if (res) {
+ schema = res.schema;
+ root = res.root;
+ baseId = res.baseId;
+ }
+ }
+ }
+ }
+ }
+ if (schema !== undefined && schema !== root.schema)
+ return { schema: schema, root: root, baseId: baseId };
+}
+
+
+var SIMPLE_INLINED = util.toHash([
+ 'type', 'format', 'pattern',
+ 'maxLength', 'minLength',
+ 'maxProperties', 'minProperties',
+ 'maxItems', 'minItems',
+ 'maximum', 'minimum',
+ 'uniqueItems', 'multipleOf',
+ 'required', 'enum'
+]);
+function inlineRef(schema, limit) {
+ if (limit === false) return false;
+ if (limit === undefined || limit === true) return checkNoRef(schema);
+ else if (limit) return countKeys(schema) <= limit;
+}
+
+
+function checkNoRef(schema) {
+ var item;
+ if (Array.isArray(schema)) {
+ for (var i=0; i<schema.length; i++) {
+ item = schema[i];
+ if (typeof item == 'object' && !checkNoRef(item)) return false;
+ }
+ } else {
+ for (var key in schema) {
+ if (key == '$ref') return false;
+ item = schema[key];
+ if (typeof item == 'object' && !checkNoRef(item)) return false;
+ }
+ }
+ return true;
+}
+
+
+function countKeys(schema) {
+ var count = 0, item;
+ if (Array.isArray(schema)) {
+ for (var i=0; i<schema.length; i++) {
+ item = schema[i];
+ if (typeof item == 'object') count += countKeys(item);
+ if (count == Infinity) return Infinity;
+ }
+ } else {
+ for (var key in schema) {
+ if (key == '$ref') return Infinity;
+ if (SIMPLE_INLINED[key]) {
+ count++;
+ } else {
+ item = schema[key];
+ if (typeof item == 'object') count += countKeys(item) + 1;
+ if (count == Infinity) return Infinity;
+ }
+ }
+ }
+ return count;
+}
+
+
+function getFullPath(id, normalize) {
+ if (normalize !== false) id = normalizeId(id);
+ var p = url.parse(id, false, true);
+ return _getFullPath(p);
+}
+
+
+function _getFullPath(p) {
+ var protocolSeparator = p.protocol || p.href.slice(0,2) == '//' ? '//' : '';
+ return (p.protocol||'') + protocolSeparator + (p.host||'') + (p.path||'') + '#';
+}
+
+
+var TRAILING_SLASH_HASH = /#\/?$/;
+function normalizeId(id) {
+ return id ? id.replace(TRAILING_SLASH_HASH, '') : '';
+}
+
+
+function resolveUrl(baseId, id) {
+ id = normalizeId(id);
+ return url.resolve(baseId, id);
+}
+
+
+/* @this Ajv */
+function resolveIds(schema) {
+ var schemaId = normalizeId(this._getId(schema));
+ var baseIds = {'': schemaId};
+ var fullPaths = {'': getFullPath(schemaId, false)};
+ var localRefs = {};
+ var self = this;
+
+ traverse(schema, {allKeys: true}, function(sch, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {
+ if (jsonPtr === '') return;
+ var id = self._getId(sch);
+ var baseId = baseIds[parentJsonPtr];
+ var fullPath = fullPaths[parentJsonPtr] + '/' + parentKeyword;
+ if (keyIndex !== undefined)
+ fullPath += '/' + (typeof keyIndex == 'number' ? keyIndex : util.escapeFragment(keyIndex));
+
+ if (typeof id == 'string') {
+ id = baseId = normalizeId(baseId ? url.resolve(baseId, id) : id);
+
+ var refVal = self._refs[id];
+ if (typeof refVal == 'string') refVal = self._refs[refVal];
+ if (refVal && refVal.schema) {
+ if (!equal(sch, refVal.schema))
+ throw new Error('id "' + id + '" resolves to more than one schema');
+ } else if (id != normalizeId(fullPath)) {
+ if (id[0] == '#') {
+ if (localRefs[id] && !equal(sch, localRefs[id]))
+ throw new Error('id "' + id + '" resolves to more than one schema');
+ localRefs[id] = sch;
+ } else {
+ self._refs[id] = fullPath;
+ }
+ }
+ }
+ baseIds[jsonPtr] = baseId;
+ fullPaths[jsonPtr] = fullPath;
+ });
+
+ return localRefs;
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/compile/rules.js b/tools/node_modules/eslint/node_modules/ajv/lib/compile/rules.js
new file mode 100644
index 0000000000..44830ad72d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/compile/rules.js
@@ -0,0 +1,58 @@
+'use strict';
+
+var ruleModules = require('./_rules')
+ , toHash = require('./util').toHash;
+
+module.exports = function rules() {
+ var RULES = [
+ { type: 'number',
+ rules: [ { 'maximum': ['exclusiveMaximum'] },
+ { 'minimum': ['exclusiveMinimum'] }, 'multipleOf', 'format'] },
+ { type: 'string',
+ rules: [ 'maxLength', 'minLength', 'pattern', 'format' ] },
+ { type: 'array',
+ rules: [ 'maxItems', 'minItems', 'uniqueItems', 'contains', 'items' ] },
+ { type: 'object',
+ rules: [ 'maxProperties', 'minProperties', 'required', 'dependencies', 'propertyNames',
+ { 'properties': ['additionalProperties', 'patternProperties'] } ] },
+ { rules: [ '$ref', 'const', 'enum', 'not', 'anyOf', 'oneOf', 'allOf' ] }
+ ];
+
+ var ALL = [ 'type' ];
+ var KEYWORDS = [
+ 'additionalItems', '$schema', '$id', 'id', 'title',
+ 'description', 'default', 'definitions'
+ ];
+ var TYPES = [ 'number', 'integer', 'string', 'array', 'object', 'boolean', 'null' ];
+ RULES.all = toHash(ALL);
+ RULES.types = toHash(TYPES);
+
+ RULES.forEach(function (group) {
+ group.rules = group.rules.map(function (keyword) {
+ var implKeywords;
+ if (typeof keyword == 'object') {
+ var key = Object.keys(keyword)[0];
+ implKeywords = keyword[key];
+ keyword = key;
+ implKeywords.forEach(function (k) {
+ ALL.push(k);
+ RULES.all[k] = true;
+ });
+ }
+ ALL.push(keyword);
+ var rule = RULES.all[keyword] = {
+ keyword: keyword,
+ code: ruleModules[keyword],
+ implements: implKeywords
+ };
+ return rule;
+ });
+
+ if (group.type) RULES.types[group.type] = group;
+ });
+
+ RULES.keywords = toHash(ALL.concat(KEYWORDS));
+ RULES.custom = {};
+
+ return RULES;
+};
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/compile/schema_obj.js b/tools/node_modules/eslint/node_modules/ajv/lib/compile/schema_obj.js
new file mode 100644
index 0000000000..e7903b0f46
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/compile/schema_obj.js
@@ -0,0 +1,9 @@
+'use strict';
+
+var util = require('./util');
+
+module.exports = SchemaObject;
+
+function SchemaObject(obj) {
+ util.copy(obj, this);
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/compile/ucs2length.js b/tools/node_modules/eslint/node_modules/ajv/lib/compile/ucs2length.js
new file mode 100644
index 0000000000..d193fb1700
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/compile/ucs2length.js
@@ -0,0 +1,20 @@
+'use strict';
+
+// https://mathiasbynens.be/notes/javascript-encoding
+// https://github.com/bestiejs/punycode.js - punycode.ucs2.decode
+module.exports = function ucs2length(str) {
+ var length = 0
+ , len = str.length
+ , pos = 0
+ , value;
+ while (pos < len) {
+ length++;
+ value = str.charCodeAt(pos++);
+ if (value >= 0xD800 && value <= 0xDBFF && pos < len) {
+ // high surrogate, and there is a next character
+ value = str.charCodeAt(pos);
+ if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate
+ }
+ }
+ return length;
+};
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/compile/util.js b/tools/node_modules/eslint/node_modules/ajv/lib/compile/util.js
new file mode 100644
index 0000000000..263891c33d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/compile/util.js
@@ -0,0 +1,267 @@
+'use strict';
+
+
+module.exports = {
+ copy: copy,
+ checkDataType: checkDataType,
+ checkDataTypes: checkDataTypes,
+ coerceToTypes: coerceToTypes,
+ toHash: toHash,
+ getProperty: getProperty,
+ escapeQuotes: escapeQuotes,
+ equal: require('fast-deep-equal'),
+ ucs2length: require('./ucs2length'),
+ varOccurences: varOccurences,
+ varReplace: varReplace,
+ cleanUpCode: cleanUpCode,
+ finalCleanUpCode: finalCleanUpCode,
+ schemaHasRules: schemaHasRules,
+ schemaHasRulesExcept: schemaHasRulesExcept,
+ toQuotedString: toQuotedString,
+ getPathExpr: getPathExpr,
+ getPath: getPath,
+ getData: getData,
+ unescapeFragment: unescapeFragment,
+ unescapeJsonPointer: unescapeJsonPointer,
+ escapeFragment: escapeFragment,
+ escapeJsonPointer: escapeJsonPointer
+};
+
+
+function copy(o, to) {
+ to = to || {};
+ for (var key in o) to[key] = o[key];
+ return to;
+}
+
+
+function checkDataType(dataType, data, negate) {
+ var EQUAL = negate ? ' !== ' : ' === '
+ , AND = negate ? ' || ' : ' && '
+ , OK = negate ? '!' : ''
+ , NOT = negate ? '' : '!';
+ switch (dataType) {
+ case 'null': return data + EQUAL + 'null';
+ case 'array': return OK + 'Array.isArray(' + data + ')';
+ case 'object': return '(' + OK + data + AND +
+ 'typeof ' + data + EQUAL + '"object"' + AND +
+ NOT + 'Array.isArray(' + data + '))';
+ case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND +
+ NOT + '(' + data + ' % 1)' +
+ AND + data + EQUAL + data + ')';
+ default: return 'typeof ' + data + EQUAL + '"' + dataType + '"';
+ }
+}
+
+
+function checkDataTypes(dataTypes, data) {
+ switch (dataTypes.length) {
+ case 1: return checkDataType(dataTypes[0], data, true);
+ default:
+ var code = '';
+ var types = toHash(dataTypes);
+ if (types.array && types.object) {
+ code = types.null ? '(': '(!' + data + ' || ';
+ code += 'typeof ' + data + ' !== "object")';
+ delete types.null;
+ delete types.array;
+ delete types.object;
+ }
+ if (types.number) delete types.integer;
+ for (var t in types)
+ code += (code ? ' && ' : '' ) + checkDataType(t, data, true);
+
+ return code;
+ }
+}
+
+
+var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]);
+function coerceToTypes(optionCoerceTypes, dataTypes) {
+ if (Array.isArray(dataTypes)) {
+ var types = [];
+ for (var i=0; i<dataTypes.length; i++) {
+ var t = dataTypes[i];
+ if (COERCE_TO_TYPES[t]) types[types.length] = t;
+ else if (optionCoerceTypes === 'array' && t === 'array') types[types.length] = t;
+ }
+ if (types.length) return types;
+ } else if (COERCE_TO_TYPES[dataTypes]) {
+ return [dataTypes];
+ } else if (optionCoerceTypes === 'array' && dataTypes === 'array') {
+ return ['array'];
+ }
+}
+
+
+function toHash(arr) {
+ var hash = {};
+ for (var i=0; i<arr.length; i++) hash[arr[i]] = true;
+ return hash;
+}
+
+
+var IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
+var SINGLE_QUOTE = /'|\\/g;
+function getProperty(key) {
+ return typeof key == 'number'
+ ? '[' + key + ']'
+ : IDENTIFIER.test(key)
+ ? '.' + key
+ : "['" + escapeQuotes(key) + "']";
+}
+
+
+function escapeQuotes(str) {
+ return str.replace(SINGLE_QUOTE, '\\$&')
+ .replace(/\n/g, '\\n')
+ .replace(/\r/g, '\\r')
+ .replace(/\f/g, '\\f')
+ .replace(/\t/g, '\\t');
+}
+
+
+function varOccurences(str, dataVar) {
+ dataVar += '[^0-9]';
+ var matches = str.match(new RegExp(dataVar, 'g'));
+ return matches ? matches.length : 0;
+}
+
+
+function varReplace(str, dataVar, expr) {
+ dataVar += '([^0-9])';
+ expr = expr.replace(/\$/g, '$$$$');
+ return str.replace(new RegExp(dataVar, 'g'), expr + '$1');
+}
+
+
+var EMPTY_ELSE = /else\s*{\s*}/g
+ , EMPTY_IF_NO_ELSE = /if\s*\([^)]+\)\s*\{\s*\}(?!\s*else)/g
+ , EMPTY_IF_WITH_ELSE = /if\s*\(([^)]+)\)\s*\{\s*\}\s*else(?!\s*if)/g;
+function cleanUpCode(out) {
+ return out.replace(EMPTY_ELSE, '')
+ .replace(EMPTY_IF_NO_ELSE, '')
+ .replace(EMPTY_IF_WITH_ELSE, 'if (!($1))');
+}
+
+
+var ERRORS_REGEXP = /[^v.]errors/g
+ , REMOVE_ERRORS = /var errors = 0;|var vErrors = null;|validate.errors = vErrors;/g
+ , REMOVE_ERRORS_ASYNC = /var errors = 0;|var vErrors = null;/g
+ , RETURN_VALID = 'return errors === 0;'
+ , RETURN_TRUE = 'validate.errors = null; return true;'
+ , RETURN_ASYNC = /if \(errors === 0\) return data;\s*else throw new ValidationError\(vErrors\);/
+ , RETURN_DATA_ASYNC = 'return data;'
+ , ROOTDATA_REGEXP = /[^A-Za-z_$]rootData[^A-Za-z0-9_$]/g
+ , REMOVE_ROOTDATA = /if \(rootData === undefined\) rootData = data;/;
+
+function finalCleanUpCode(out, async) {
+ var matches = out.match(ERRORS_REGEXP);
+ if (matches && matches.length == 2) {
+ out = async
+ ? out.replace(REMOVE_ERRORS_ASYNC, '')
+ .replace(RETURN_ASYNC, RETURN_DATA_ASYNC)
+ : out.replace(REMOVE_ERRORS, '')
+ .replace(RETURN_VALID, RETURN_TRUE);
+ }
+
+ matches = out.match(ROOTDATA_REGEXP);
+ if (!matches || matches.length !== 3) return out;
+ return out.replace(REMOVE_ROOTDATA, '');
+}
+
+
+function schemaHasRules(schema, rules) {
+ if (typeof schema == 'boolean') return !schema;
+ for (var key in schema) if (rules[key]) return true;
+}
+
+
+function schemaHasRulesExcept(schema, rules, exceptKeyword) {
+ if (typeof schema == 'boolean') return !schema && exceptKeyword != 'not';
+ for (var key in schema) if (key != exceptKeyword && rules[key]) return true;
+}
+
+
+function toQuotedString(str) {
+ return '\'' + escapeQuotes(str) + '\'';
+}
+
+
+function getPathExpr(currentPath, expr, jsonPointers, isNumber) {
+ var path = jsonPointers // false by default
+ ? '\'/\' + ' + expr + (isNumber ? '' : '.replace(/~/g, \'~0\').replace(/\\//g, \'~1\')')
+ : (isNumber ? '\'[\' + ' + expr + ' + \']\'' : '\'[\\\'\' + ' + expr + ' + \'\\\']\'');
+ return joinPaths(currentPath, path);
+}
+
+
+function getPath(currentPath, prop, jsonPointers) {
+ var path = jsonPointers // false by default
+ ? toQuotedString('/' + escapeJsonPointer(prop))
+ : toQuotedString(getProperty(prop));
+ return joinPaths(currentPath, path);
+}
+
+
+var JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/;
+var RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
+function getData($data, lvl, paths) {
+ var up, jsonPointer, data, matches;
+ if ($data === '') return 'rootData';
+ if ($data[0] == '/') {
+ if (!JSON_POINTER.test($data)) throw new Error('Invalid JSON-pointer: ' + $data);
+ jsonPointer = $data;
+ data = 'rootData';
+ } else {
+ matches = $data.match(RELATIVE_JSON_POINTER);
+ if (!matches) throw new Error('Invalid JSON-pointer: ' + $data);
+ up = +matches[1];
+ jsonPointer = matches[2];
+ if (jsonPointer == '#') {
+ if (up >= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl);
+ return paths[lvl - up];
+ }
+
+ if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl);
+ data = 'data' + ((lvl - up) || '');
+ if (!jsonPointer) return data;
+ }
+
+ var expr = data;
+ var segments = jsonPointer.split('/');
+ for (var i=0; i<segments.length; i++) {
+ var segment = segments[i];
+ if (segment) {
+ data += getProperty(unescapeJsonPointer(segment));
+ expr += ' && ' + data;
+ }
+ }
+ return expr;
+}
+
+
+function joinPaths (a, b) {
+ if (a == '""') return b;
+ return (a + ' + ' + b).replace(/' \+ '/g, '');
+}
+
+
+function unescapeFragment(str) {
+ return unescapeJsonPointer(decodeURIComponent(str));
+}
+
+
+function escapeFragment(str) {
+ return encodeURIComponent(escapeJsonPointer(str));
+}
+
+
+function escapeJsonPointer(str) {
+ return str.replace(/~/g, '~0').replace(/\//g, '~1');
+}
+
+
+function unescapeJsonPointer(str) {
+ return str.replace(/~1/g, '/').replace(/~0/g, '~');
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dot/_limit.jst b/tools/node_modules/eslint/node_modules/ajv/lib/dot/_limit.jst
new file mode 100644
index 0000000000..13e7649b34
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dot/_limit.jst
@@ -0,0 +1,96 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{## def.setExclusiveLimit:
+ $exclusive = true;
+ $errorKeyword = $exclusiveKeyword;
+ $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;
+#}}
+
+{{
+ var $isMax = $keyword == 'maximum'
+ , $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum'
+ , $schemaExcl = it.schema[$exclusiveKeyword]
+ , $isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data
+ , $op = $isMax ? '<' : '>'
+ , $notOp = $isMax ? '>' : '<'
+ , $errorKeyword = undefined;
+}}
+
+{{? $isDataExcl }}
+ {{
+ var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr)
+ , $exclusive = 'exclusive' + $lvl
+ , $exclType = 'exclType' + $lvl
+ , $exclIsNumber = 'exclIsNumber' + $lvl
+ , $opExpr = 'op' + $lvl
+ , $opStr = '\' + ' + $opExpr + ' + \'';
+ }}
+ var schemaExcl{{=$lvl}} = {{=$schemaValueExcl}};
+ {{ $schemaValueExcl = 'schemaExcl' + $lvl; }}
+
+ var {{=$exclusive}};
+ var {{=$exclType}} = typeof {{=$schemaValueExcl}};
+ if ({{=$exclType}} != 'boolean' && {{=$exclType}} != 'undefined' && {{=$exclType}} != 'number') {
+ {{ var $errorKeyword = $exclusiveKeyword; }}
+ {{# def.error:'_exclusiveLimit' }}
+ } else if ({{# def.$dataNotType:'number' }}
+ {{=$exclType}} == 'number'
+ ? (
+ ({{=$exclusive}} = {{=$schemaValue}} === undefined || {{=$schemaValueExcl}} {{=$op}}= {{=$schemaValue}})
+ ? {{=$data}} {{=$notOp}}= {{=$schemaValueExcl}}
+ : {{=$data}} {{=$notOp}} {{=$schemaValue}}
+ )
+ : (
+ ({{=$exclusive}} = {{=$schemaValueExcl}} === true)
+ ? {{=$data}} {{=$notOp}}= {{=$schemaValue}}
+ : {{=$data}} {{=$notOp}} {{=$schemaValue}}
+ )
+ || {{=$data}} !== {{=$data}}) {
+ var op{{=$lvl}} = {{=$exclusive}} ? '{{=$op}}' : '{{=$op}}=';
+{{??}}
+ {{
+ var $exclIsNumber = typeof $schemaExcl == 'number'
+ , $opStr = $op; /*used in error*/
+ }}
+
+ {{? $exclIsNumber && $isData }}
+ {{ var $opExpr = '\'' + $opStr + '\''; /*used in error*/ }}
+ if ({{# def.$dataNotType:'number' }}
+ ( {{=$schemaValue}} === undefined
+ || {{=$schemaExcl}} {{=$op}}= {{=$schemaValue}}
+ ? {{=$data}} {{=$notOp}}= {{=$schemaExcl}}
+ : {{=$data}} {{=$notOp}} {{=$schemaValue}} )
+ || {{=$data}} !== {{=$data}}) {
+ {{??}}
+ {{
+ if ($exclIsNumber && $schema === undefined) {
+ {{# def.setExclusiveLimit }}
+ $schemaValue = $schemaExcl;
+ $notOp += '=';
+ } else {
+ if ($exclIsNumber)
+ $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema);
+
+ if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) {
+ {{# def.setExclusiveLimit }}
+ $notOp += '=';
+ } else {
+ $exclusive = false;
+ $opStr += '=';
+ }
+ }
+
+ var $opExpr = '\'' + $opStr + '\''; /*used in error*/
+ }}
+
+ if ({{# def.$dataNotType:'number' }}
+ {{=$data}} {{=$notOp}} {{=$schemaValue}}
+ || {{=$data}} !== {{=$data}}) {
+ {{?}}
+{{?}}
+ {{ $errorKeyword = $errorKeyword || $keyword; }}
+ {{# def.error:'_limit' }}
+ } {{? $breakOnError }} else { {{?}}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dot/_limitItems.jst b/tools/node_modules/eslint/node_modules/ajv/lib/dot/_limitItems.jst
new file mode 100644
index 0000000000..a3e078e513
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dot/_limitItems.jst
@@ -0,0 +1,10 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{ var $op = $keyword == 'maxItems' ? '>' : '<'; }}
+if ({{# def.$dataNotType:'number' }} {{=$data}}.length {{=$op}} {{=$schemaValue}}) {
+ {{ var $errorKeyword = $keyword; }}
+ {{# def.error:'_limitItems' }}
+} {{? $breakOnError }} else { {{?}}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dot/_limitLength.jst b/tools/node_modules/eslint/node_modules/ajv/lib/dot/_limitLength.jst
new file mode 100644
index 0000000000..cfc8dbb016
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dot/_limitLength.jst
@@ -0,0 +1,10 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{ var $op = $keyword == 'maxLength' ? '>' : '<'; }}
+if ({{# def.$dataNotType:'number' }} {{# def.strLength }} {{=$op}} {{=$schemaValue}}) {
+ {{ var $errorKeyword = $keyword; }}
+ {{# def.error:'_limitLength' }}
+} {{? $breakOnError }} else { {{?}}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dot/_limitProperties.jst b/tools/node_modules/eslint/node_modules/ajv/lib/dot/_limitProperties.jst
new file mode 100644
index 0000000000..da7ea776f1
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dot/_limitProperties.jst
@@ -0,0 +1,10 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{ var $op = $keyword == 'maxProperties' ? '>' : '<'; }}
+if ({{# def.$dataNotType:'number' }} Object.keys({{=$data}}).length {{=$op}} {{=$schemaValue}}) {
+ {{ var $errorKeyword = $keyword; }}
+ {{# def.error:'_limitProperties' }}
+} {{? $breakOnError }} else { {{?}}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dot/allOf.jst b/tools/node_modules/eslint/node_modules/ajv/lib/dot/allOf.jst
new file mode 100644
index 0000000000..4c2836311b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dot/allOf.jst
@@ -0,0 +1,34 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+{{
+ var $currentBaseId = $it.baseId
+ , $allSchemasEmpty = true;
+}}
+
+{{~ $schema:$sch:$i }}
+ {{? {{# def.nonEmptySchema:$sch }} }}
+ {{
+ $allSchemasEmpty = false;
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + '[' + $i + ']';
+ $it.errSchemaPath = $errSchemaPath + '/' + $i;
+ }}
+
+ {{# def.insertSubschemaCode }}
+
+ {{# def.ifResultValid }}
+ {{?}}
+{{~}}
+
+{{? $breakOnError }}
+ {{? $allSchemasEmpty }}
+ if (true) {
+ {{??}}
+ {{= $closingBraces.slice(0,-1) }}
+ {{?}}
+{{?}}
+
+{{# def.cleanUp }}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dot/anyOf.jst b/tools/node_modules/eslint/node_modules/ajv/lib/dot/anyOf.jst
new file mode 100644
index 0000000000..086cf2b33c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dot/anyOf.jst
@@ -0,0 +1,48 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+{{
+ var $noEmptySchema = $schema.every(function($sch) {
+ return {{# def.nonEmptySchema:$sch }};
+ });
+}}
+{{? $noEmptySchema }}
+ {{ var $currentBaseId = $it.baseId; }}
+ var {{=$errs}} = errors;
+ var {{=$valid}} = false;
+
+ {{# def.setCompositeRule }}
+
+ {{~ $schema:$sch:$i }}
+ {{
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + '[' + $i + ']';
+ $it.errSchemaPath = $errSchemaPath + '/' + $i;
+ }}
+
+ {{# def.insertSubschemaCode }}
+
+ {{=$valid}} = {{=$valid}} || {{=$nextValid}};
+
+ if (!{{=$valid}}) {
+ {{ $closingBraces += '}'; }}
+ {{~}}
+
+ {{# def.resetCompositeRule }}
+
+ {{= $closingBraces }}
+
+ if (!{{=$valid}}) {
+ {{# def.extraError:'anyOf' }}
+ } else {
+ {{# def.resetErrors }}
+ {{? it.opts.allErrors }} } {{?}}
+
+ {{# def.cleanUp }}
+{{??}}
+ {{? $breakOnError }}
+ if (true) {
+ {{?}}
+{{?}}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dot/coerce.def b/tools/node_modules/eslint/node_modules/ajv/lib/dot/coerce.def
new file mode 100644
index 0000000000..86e0e18af9
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dot/coerce.def
@@ -0,0 +1,61 @@
+{{## def.coerceType:
+ {{
+ var $dataType = 'dataType' + $lvl
+ , $coerced = 'coerced' + $lvl;
+ }}
+ var {{=$dataType}} = typeof {{=$data}};
+ {{? it.opts.coerceTypes == 'array'}}
+ if ({{=$dataType}} == 'object' && Array.isArray({{=$data}})) {{=$dataType}} = 'array';
+ {{?}}
+
+ var {{=$coerced}} = undefined;
+
+ {{ var $bracesCoercion = ''; }}
+ {{~ $coerceToTypes:$type:$i }}
+ {{? $i }}
+ if ({{=$coerced}} === undefined) {
+ {{ $bracesCoercion += '}'; }}
+ {{?}}
+
+ {{? it.opts.coerceTypes == 'array' && $type != 'array' }}
+ if ({{=$dataType}} == 'array' && {{=$data}}.length == 1) {
+ {{=$coerced}} = {{=$data}} = {{=$data}}[0];
+ {{=$dataType}} = typeof {{=$data}};
+ /*if ({{=$dataType}} == 'object' && Array.isArray({{=$data}})) {{=$dataType}} = 'array';*/
+ }
+ {{?}}
+
+ {{? $type == 'string' }}
+ if ({{=$dataType}} == 'number' || {{=$dataType}} == 'boolean')
+ {{=$coerced}} = '' + {{=$data}};
+ else if ({{=$data}} === null) {{=$coerced}} = '';
+ {{?? $type == 'number' || $type == 'integer' }}
+ if ({{=$dataType}} == 'boolean' || {{=$data}} === null
+ || ({{=$dataType}} == 'string' && {{=$data}} && {{=$data}} == +{{=$data}}
+ {{? $type == 'integer' }} && !({{=$data}} % 1){{?}}))
+ {{=$coerced}} = +{{=$data}};
+ {{?? $type == 'boolean' }}
+ if ({{=$data}} === 'false' || {{=$data}} === 0 || {{=$data}} === null)
+ {{=$coerced}} = false;
+ else if ({{=$data}} === 'true' || {{=$data}} === 1)
+ {{=$coerced}} = true;
+ {{?? $type == 'null' }}
+ if ({{=$data}} === '' || {{=$data}} === 0 || {{=$data}} === false)
+ {{=$coerced}} = null;
+ {{?? it.opts.coerceTypes == 'array' && $type == 'array' }}
+ if ({{=$dataType}} == 'string' || {{=$dataType}} == 'number' || {{=$dataType}} == 'boolean' || {{=$data}} == null)
+ {{=$coerced}} = [{{=$data}}];
+ {{?}}
+ {{~}}
+
+ {{= $bracesCoercion }}
+
+ if ({{=$coerced}} === undefined) {
+ {{# def.error:'type' }}
+ } else {
+ {{# def.setParentData }}
+ {{=$data}} = {{=$coerced}};
+ {{? !$dataLvl }}if ({{=$parentData}} !== undefined){{?}}
+ {{=$parentData}}[{{=$parentDataProperty}}] = {{=$coerced}};
+ }
+#}}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dot/const.jst b/tools/node_modules/eslint/node_modules/ajv/lib/dot/const.jst
new file mode 100644
index 0000000000..2aa22980d7
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dot/const.jst
@@ -0,0 +1,11 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{? !$isData }}
+ var schema{{=$lvl}} = validate.schema{{=$schemaPath}};
+{{?}}
+var {{=$valid}} = equal({{=$data}}, schema{{=$lvl}});
+{{# def.checkError:'const' }}
+{{? $breakOnError }} else { {{?}}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dot/contains.jst b/tools/node_modules/eslint/node_modules/ajv/lib/dot/contains.jst
new file mode 100644
index 0000000000..925d2c84b5
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dot/contains.jst
@@ -0,0 +1,57 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+
+{{
+ var $idx = 'i' + $lvl
+ , $dataNxt = $it.dataLevel = it.dataLevel + 1
+ , $nextData = 'data' + $dataNxt
+ , $currentBaseId = it.baseId
+ , $nonEmptySchema = {{# def.nonEmptySchema:$schema }};
+}}
+
+var {{=$errs}} = errors;
+var {{=$valid}};
+
+{{? $nonEmptySchema }}
+ {{# def.setCompositeRule }}
+
+ {{
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ }}
+
+ var {{=$nextValid}} = false;
+
+ for (var {{=$idx}} = 0; {{=$idx}} < {{=$data}}.length; {{=$idx}}++) {
+ {{
+ $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);
+ var $passData = $data + '[' + $idx + ']';
+ $it.dataPathArr[$dataNxt] = $idx;
+ }}
+
+ {{# def.generateSubschemaCode }}
+ {{# def.optimizeValidate }}
+
+ if ({{=$nextValid}}) break;
+ }
+
+ {{# def.resetCompositeRule }}
+ {{= $closingBraces }}
+
+ if (!{{=$nextValid}}) {
+{{??}}
+ if ({{=$data}}.length == 0) {
+{{?}}
+
+ {{# def.error:'contains' }}
+ } else {
+ {{? $nonEmptySchema }}
+ {{# def.resetErrors }}
+ {{?}}
+ {{? it.opts.allErrors }} } {{?}}
+
+{{# def.cleanUp }}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dot/custom.jst b/tools/node_modules/eslint/node_modules/ajv/lib/dot/custom.jst
new file mode 100644
index 0000000000..402028e6bb
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dot/custom.jst
@@ -0,0 +1,191 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{
+ var $rule = this
+ , $definition = 'definition' + $lvl
+ , $rDef = $rule.definition
+ , $closingBraces = '';
+ var $validate = $rDef.validate;
+ var $compile, $inline, $macro, $ruleValidate, $validateCode;
+}}
+
+{{? $isData && $rDef.$data }}
+ {{
+ $validateCode = 'keywordValidate' + $lvl;
+ var $validateSchema = $rDef.validateSchema;
+ }}
+ var {{=$definition}} = RULES.custom['{{=$keyword}}'].definition;
+ var {{=$validateCode}} = {{=$definition}}.validate;
+{{??}}
+ {{
+ $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it);
+ if (!$ruleValidate) return;
+ $schemaValue = 'validate.schema' + $schemaPath;
+ $validateCode = $ruleValidate.code;
+ $compile = $rDef.compile;
+ $inline = $rDef.inline;
+ $macro = $rDef.macro;
+ }}
+{{?}}
+
+{{
+ var $ruleErrs = $validateCode + '.errors'
+ , $i = 'i' + $lvl
+ , $ruleErr = 'ruleErr' + $lvl
+ , $asyncKeyword = $rDef.async;
+
+ if ($asyncKeyword && !it.async)
+ throw new Error('async keyword in sync schema');
+}}
+
+
+{{? !($inline || $macro) }}{{=$ruleErrs}} = null;{{?}}
+var {{=$errs}} = errors;
+var {{=$valid}};
+
+{{## def.callRuleValidate:
+ {{=$validateCode}}.call(
+ {{? it.opts.passContext }}this{{??}}self{{?}}
+ {{? $compile || $rDef.schema === false }}
+ , {{=$data}}
+ {{??}}
+ , {{=$schemaValue}}
+ , {{=$data}}
+ , validate.schema{{=it.schemaPath}}
+ {{?}}
+ , {{# def.dataPath }}
+ {{# def.passParentData }}
+ , rootData
+ )
+#}}
+
+{{## def.extendErrors:_inline:
+ for (var {{=$i}}={{=$errs}}; {{=$i}}<errors; {{=$i}}++) {
+ var {{=$ruleErr}} = vErrors[{{=$i}}];
+ if ({{=$ruleErr}}.dataPath === undefined)
+ {{=$ruleErr}}.dataPath = (dataPath || '') + {{= it.errorPath }};
+ {{# _inline ? 'if (\{\{=$ruleErr\}\}.schemaPath === undefined) {' : '' }}
+ {{=$ruleErr}}.schemaPath = "{{=$errSchemaPath}}";
+ {{# _inline ? '}' : '' }}
+ {{? it.opts.verbose }}
+ {{=$ruleErr}}.schema = {{=$schemaValue}};
+ {{=$ruleErr}}.data = {{=$data}};
+ {{?}}
+ }
+#}}
+
+
+{{? $isData && $rDef.$data }}
+ {{ $closingBraces += '}'; }}
+ if ({{=$schemaValue}} === undefined) {
+ {{=$valid}} = true;
+ } else {
+ {{? $validateSchema }}
+ {{ $closingBraces += '}'; }}
+ {{=$valid}} = {{=$definition}}.validateSchema({{=$schemaValue}});
+ if ({{=$valid}}) {
+ {{?}}
+{{?}}
+
+{{? $inline }}
+ {{? $rDef.statements }}
+ {{= $ruleValidate.validate }}
+ {{??}}
+ {{=$valid}} = {{= $ruleValidate.validate }};
+ {{?}}
+{{?? $macro }}
+ {{# def.setupNextLevel }}
+ {{
+ $it.schema = $ruleValidate.validate;
+ $it.schemaPath = '';
+ }}
+ {{# def.setCompositeRule }}
+ {{ var $code = it.validate($it).replace(/validate\.schema/g, $validateCode); }}
+ {{# def.resetCompositeRule }}
+ {{= $code }}
+{{??}}
+ {{# def.beginDefOut}}
+ {{# def.callRuleValidate }}
+ {{# def.storeDefOut:def_callRuleValidate }}
+
+ {{? $rDef.errors === false }}
+ {{=$valid}} = {{? $asyncKeyword }}{{=it.yieldAwait}}{{?}}{{= def_callRuleValidate }};
+ {{??}}
+ {{? $asyncKeyword }}
+ {{ $ruleErrs = 'customErrors' + $lvl; }}
+ var {{=$ruleErrs}} = null;
+ try {
+ {{=$valid}} = {{=it.yieldAwait}}{{= def_callRuleValidate }};
+ } catch (e) {
+ {{=$valid}} = false;
+ if (e instanceof ValidationError) {{=$ruleErrs}} = e.errors;
+ else throw e;
+ }
+ {{??}}
+ {{=$ruleErrs}} = null;
+ {{=$valid}} = {{= def_callRuleValidate }};
+ {{?}}
+ {{?}}
+{{?}}
+
+{{? $rDef.modifying }}
+ if ({{=$parentData}}) {{=$data}} = {{=$parentData}}[{{=$parentDataProperty}}];
+{{?}}
+
+{{= $closingBraces }}
+
+{{## def.notValidationResult:
+ {{? $rDef.valid === undefined }}
+ !{{? $macro }}{{=$nextValid}}{{??}}{{=$valid}}{{?}}
+ {{??}}
+ {{= !$rDef.valid }}
+ {{?}}
+#}}
+
+{{? $rDef.valid }}
+ {{? $breakOnError }} if (true) { {{?}}
+{{??}}
+ if ({{# def.notValidationResult }}) {
+ {{ $errorKeyword = $rule.keyword; }}
+ {{# def.beginDefOut}}
+ {{# def.error:'custom' }}
+ {{# def.storeDefOut:def_customError }}
+
+ {{? $inline }}
+ {{? $rDef.errors }}
+ {{? $rDef.errors != 'full' }}
+ {{# def.extendErrors:true }}
+ {{?}}
+ {{??}}
+ {{? $rDef.errors === false}}
+ {{= def_customError }}
+ {{??}}
+ if ({{=$errs}} == errors) {
+ {{= def_customError }}
+ } else {
+ {{# def.extendErrors:true }}
+ }
+ {{?}}
+ {{?}}
+ {{?? $macro }}
+ {{# def.extraError:'custom' }}
+ {{??}}
+ {{? $rDef.errors === false}}
+ {{= def_customError }}
+ {{??}}
+ if (Array.isArray({{=$ruleErrs}})) {
+ if (vErrors === null) vErrors = {{=$ruleErrs}};
+ else vErrors = vErrors.concat({{=$ruleErrs}});
+ errors = vErrors.length;
+ {{# def.extendErrors:false }}
+ } else {
+ {{= def_customError }}
+ }
+ {{?}}
+ {{?}}
+
+ } {{? $breakOnError }} else { {{?}}
+{{?}}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dot/defaults.def b/tools/node_modules/eslint/node_modules/ajv/lib/dot/defaults.def
new file mode 100644
index 0000000000..5ad8d1d2d2
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dot/defaults.def
@@ -0,0 +1,32 @@
+{{## def.assignDefault:
+ if ({{=$passData}} === undefined)
+ {{=$passData}} = {{? it.opts.useDefaults == 'shared' }}
+ {{= it.useDefault($sch.default) }}
+ {{??}}
+ {{= JSON.stringify($sch.default) }}
+ {{?}};
+#}}
+
+
+{{## def.defaultProperties:
+ {{
+ var $schema = it.schema.properties
+ , $schemaKeys = Object.keys($schema); }}
+ {{~ $schemaKeys:$propertyKey }}
+ {{ var $sch = $schema[$propertyKey]; }}
+ {{? $sch.default !== undefined }}
+ {{ var $passData = $data + it.util.getProperty($propertyKey); }}
+ {{# def.assignDefault }}
+ {{?}}
+ {{~}}
+#}}
+
+
+{{## def.defaultItems:
+ {{~ it.schema.items:$sch:$i }}
+ {{? $sch.default !== undefined }}
+ {{ var $passData = $data + '[' + $i + ']'; }}
+ {{# def.assignDefault }}
+ {{?}}
+ {{~}}
+#}}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dot/definitions.def b/tools/node_modules/eslint/node_modules/ajv/lib/dot/definitions.def
new file mode 100644
index 0000000000..cdbe140bb7
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dot/definitions.def
@@ -0,0 +1,199 @@
+{{## def.setupKeyword:
+ {{
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ }}
+#}}
+
+
+{{## def.setCompositeRule:
+ {{
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ }}
+#}}
+
+
+{{## def.resetCompositeRule:
+ {{ it.compositeRule = $it.compositeRule = $wasComposite; }}
+#}}
+
+
+{{## def.setupNextLevel:
+ {{
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ }}
+#}}
+
+
+{{## def.ifValid:
+ {{? $breakOnError }}
+ if ({{=$valid}}) {
+ {{ $closingBraces += '}'; }}
+ {{?}}
+#}}
+
+
+{{## def.ifResultValid:
+ {{? $breakOnError }}
+ if ({{=$nextValid}}) {
+ {{ $closingBraces += '}'; }}
+ {{?}}
+#}}
+
+
+{{## def.elseIfValid:
+ {{? $breakOnError }}
+ {{ $closingBraces += '}'; }}
+ else {
+ {{?}}
+#}}
+
+
+{{## def.nonEmptySchema:_schema:
+ it.util.schemaHasRules(_schema, it.RULES.all)
+#}}
+
+
+{{## def.strLength:
+ {{? it.opts.unicode === false }}
+ {{=$data}}.length
+ {{??}}
+ ucs2length({{=$data}})
+ {{?}}
+#}}
+
+
+{{## def.willOptimize:
+ it.util.varOccurences($code, $nextData) < 2
+#}}
+
+
+{{## def.generateSubschemaCode:
+ {{
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ }}
+#}}
+
+
+{{## def.insertSubschemaCode:
+ {{= it.validate($it) }}
+ {{ $it.baseId = $currentBaseId; }}
+#}}
+
+
+{{## def._optimizeValidate:
+ it.util.varReplace($code, $nextData, $passData)
+#}}
+
+
+{{## def.optimizeValidate:
+ {{? {{# def.willOptimize}} }}
+ {{= {{# def._optimizeValidate }} }}
+ {{??}}
+ var {{=$nextData}} = {{=$passData}};
+ {{= $code }}
+ {{?}}
+#}}
+
+
+{{## def.cleanUp: {{ out = it.util.cleanUpCode(out); }} #}}
+
+
+{{## def.finalCleanUp: {{ out = it.util.finalCleanUpCode(out, $async); }} #}}
+
+
+{{## def.$data:
+ {{
+ var $isData = it.opts.$data && $schema && $schema.$data
+ , $schemaValue;
+ }}
+ {{? $isData }}
+ var schema{{=$lvl}} = {{= it.util.getData($schema.$data, $dataLvl, it.dataPathArr) }};
+ {{ $schemaValue = 'schema' + $lvl; }}
+ {{??}}
+ {{ $schemaValue = $schema; }}
+ {{?}}
+#}}
+
+
+{{## def.$dataNotType:_type:
+ {{?$isData}} ({{=$schemaValue}} !== undefined && typeof {{=$schemaValue}} != _type) || {{?}}
+#}}
+
+
+{{## def.check$dataIsArray:
+ if (schema{{=$lvl}} === undefined) {{=$valid}} = true;
+ else if (!Array.isArray(schema{{=$lvl}})) {{=$valid}} = false;
+ else {
+#}}
+
+
+{{## def.beginDefOut:
+ {{
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = '';
+ }}
+#}}
+
+
+{{## def.storeDefOut:_variable:
+ {{
+ var _variable = out;
+ out = $$outStack.pop();
+ }}
+#}}
+
+
+{{## def.dataPath:(dataPath || ''){{? it.errorPath != '""'}} + {{= it.errorPath }}{{?}}#}}
+
+{{## def.setParentData:
+ {{
+ var $parentData = $dataLvl ? 'data' + (($dataLvl-1)||'') : 'parentData'
+ , $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty';
+ }}
+#}}
+
+{{## def.passParentData:
+ {{# def.setParentData }}
+ , {{= $parentData }}
+ , {{= $parentDataProperty }}
+#}}
+
+
+{{## def.iterateProperties:
+ {{? $ownProperties }}
+ {{=$dataProperties}} = {{=$dataProperties}} || Object.keys({{=$data}});
+ for (var {{=$idx}}=0; {{=$idx}}<{{=$dataProperties}}.length; {{=$idx}}++) {
+ var {{=$key}} = {{=$dataProperties}}[{{=$idx}}];
+ {{??}}
+ for (var {{=$key}} in {{=$data}}) {
+ {{?}}
+#}}
+
+
+{{## def.noPropertyInData:
+ {{=$useData}} === undefined
+ {{? $ownProperties }}
+ || !{{# def.isOwnProperty }}
+ {{?}}
+#}}
+
+
+{{## def.isOwnProperty:
+ Object.prototype.hasOwnProperty.call({{=$data}}, '{{=it.util.escapeQuotes($propertyKey)}}')
+#}}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dot/dependencies.jst b/tools/node_modules/eslint/node_modules/ajv/lib/dot/dependencies.jst
new file mode 100644
index 0000000000..c41f334224
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dot/dependencies.jst
@@ -0,0 +1,80 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.missing }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+
+{{## def.propertyInData:
+ {{=$data}}{{= it.util.getProperty($property) }} !== undefined
+ {{? $ownProperties }}
+ && Object.prototype.hasOwnProperty.call({{=$data}}, '{{=it.util.escapeQuotes($property)}}')
+ {{?}}
+#}}
+
+
+{{
+ var $schemaDeps = {}
+ , $propertyDeps = {}
+ , $ownProperties = it.opts.ownProperties;
+
+ for ($property in $schema) {
+ var $sch = $schema[$property];
+ var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps;
+ $deps[$property] = $sch;
+ }
+}}
+
+var {{=$errs}} = errors;
+
+{{ var $currentErrorPath = it.errorPath; }}
+
+var missing{{=$lvl}};
+{{ for (var $property in $propertyDeps) { }}
+ {{ $deps = $propertyDeps[$property]; }}
+ {{? $deps.length }}
+ if ({{# def.propertyInData }}
+ {{? $breakOnError }}
+ && ({{# def.checkMissingProperty:$deps }})) {
+ {{# def.errorMissingProperty:'dependencies' }}
+ {{??}}
+ ) {
+ {{~ $deps:$propertyKey }}
+ {{# def.allErrorsMissingProperty:'dependencies' }}
+ {{~}}
+ {{?}}
+ } {{# def.elseIfValid }}
+ {{?}}
+{{ } }}
+
+{{
+ it.errorPath = $currentErrorPath;
+ var $currentBaseId = $it.baseId;
+}}
+
+
+{{ for (var $property in $schemaDeps) { }}
+ {{ var $sch = $schemaDeps[$property]; }}
+ {{? {{# def.nonEmptySchema:$sch }} }}
+ {{=$nextValid}} = true;
+
+ if ({{# def.propertyInData }}) {
+ {{
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + it.util.getProperty($property);
+ $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property);
+ }}
+
+ {{# def.insertSubschemaCode }}
+ }
+
+ {{# def.ifResultValid }}
+ {{?}}
+{{ } }}
+
+{{? $breakOnError }}
+ {{= $closingBraces }}
+ if ({{=$errs}} == errors) {
+{{?}}
+
+{{# def.cleanUp }}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dot/enum.jst b/tools/node_modules/eslint/node_modules/ajv/lib/dot/enum.jst
new file mode 100644
index 0000000000..357c2e8c08
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dot/enum.jst
@@ -0,0 +1,30 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{
+ var $i = 'i' + $lvl
+ , $vSchema = 'schema' + $lvl;
+}}
+
+{{? !$isData }}
+ var {{=$vSchema}} = validate.schema{{=$schemaPath}};
+{{?}}
+var {{=$valid}};
+
+{{?$isData}}{{# def.check$dataIsArray }}{{?}}
+
+{{=$valid}} = false;
+
+for (var {{=$i}}=0; {{=$i}}<{{=$vSchema}}.length; {{=$i}}++)
+ if (equal({{=$data}}, {{=$vSchema}}[{{=$i}}])) {
+ {{=$valid}} = true;
+ break;
+ }
+
+{{? $isData }} } {{?}}
+
+{{# def.checkError:'enum' }}
+
+{{? $breakOnError }} else { {{?}}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dot/errors.def b/tools/node_modules/eslint/node_modules/ajv/lib/dot/errors.def
new file mode 100644
index 0000000000..b79646fc2c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dot/errors.def
@@ -0,0 +1,194 @@
+{{# def.definitions }}
+
+{{## def._error:_rule:
+ {{ 'istanbul ignore else'; }}
+ {{? it.createErrors !== false }}
+ {
+ keyword: '{{= $errorKeyword || _rule }}'
+ , dataPath: (dataPath || '') + {{= it.errorPath }}
+ , schemaPath: {{=it.util.toQuotedString($errSchemaPath)}}
+ , params: {{# def._errorParams[_rule] }}
+ {{? it.opts.messages !== false }}
+ , message: {{# def._errorMessages[_rule] }}
+ {{?}}
+ {{? it.opts.verbose }}
+ , schema: {{# def._errorSchemas[_rule] }}
+ , parentSchema: validate.schema{{=it.schemaPath}}
+ , data: {{=$data}}
+ {{?}}
+ }
+ {{??}}
+ {}
+ {{?}}
+#}}
+
+
+{{## def._addError:_rule:
+ if (vErrors === null) vErrors = [err];
+ else vErrors.push(err);
+ errors++;
+#}}
+
+
+{{## def.addError:_rule:
+ var err = {{# def._error:_rule }};
+ {{# def._addError:_rule }}
+#}}
+
+
+{{## def.error:_rule:
+ {{# def.beginDefOut}}
+ {{# def._error:_rule }}
+ {{# def.storeDefOut:__err }}
+
+ {{? !it.compositeRule && $breakOnError }}
+ {{ 'istanbul ignore if'; }}
+ {{? it.async }}
+ throw new ValidationError([{{=__err}}]);
+ {{??}}
+ validate.errors = [{{=__err}}];
+ return false;
+ {{?}}
+ {{??}}
+ var err = {{=__err}};
+ {{# def._addError:_rule }}
+ {{?}}
+#}}
+
+
+{{## def.extraError:_rule:
+ {{# def.addError:_rule}}
+ {{? !it.compositeRule && $breakOnError }}
+ {{ 'istanbul ignore if'; }}
+ {{? it.async }}
+ throw new ValidationError(vErrors);
+ {{??}}
+ validate.errors = vErrors;
+ return false;
+ {{?}}
+ {{?}}
+#}}
+
+
+{{## def.checkError:_rule:
+ if (!{{=$valid}}) {
+ {{# def.error:_rule }}
+ }
+#}}
+
+
+{{## def.resetErrors:
+ errors = {{=$errs}};
+ if (vErrors !== null) {
+ if ({{=$errs}}) vErrors.length = {{=$errs}};
+ else vErrors = null;
+ }
+#}}
+
+
+{{## def.concatSchema:{{?$isData}}' + {{=$schemaValue}} + '{{??}}{{=$schema}}{{?}}#}}
+{{## def.appendSchema:{{?$isData}}' + {{=$schemaValue}}{{??}}{{=$schemaValue}}'{{?}}#}}
+{{## def.concatSchemaEQ:{{?$isData}}' + {{=$schemaValue}} + '{{??}}{{=it.util.escapeQuotes($schema)}}{{?}}#}}
+
+{{## def._errorMessages = {
+ 'false schema': "'boolean schema is false'",
+ $ref: "'can\\\'t resolve reference {{=it.util.escapeQuotes($schema)}}'",
+ additionalItems: "'should NOT have more than {{=$schema.length}} items'",
+ additionalProperties: "'should NOT have additional properties'",
+ anyOf: "'should match some schema in anyOf'",
+ const: "'should be equal to constant'",
+ contains: "'should contain a valid item'",
+ dependencies: "'should have {{? $deps.length == 1 }}property {{= it.util.escapeQuotes($deps[0]) }}{{??}}properties {{= it.util.escapeQuotes($deps.join(\", \")) }}{{?}} when property {{= it.util.escapeQuotes($property) }} is present'",
+ 'enum': "'should be equal to one of the allowed values'",
+ format: "'should match format \"{{#def.concatSchemaEQ}}\"'",
+ _limit: "'should be {{=$opStr}} {{#def.appendSchema}}",
+ _exclusiveLimit: "'{{=$exclusiveKeyword}} should be boolean'",
+ _limitItems: "'should NOT have {{?$keyword=='maxItems'}}more{{??}}less{{?}} than {{#def.concatSchema}} items'",
+ _limitLength: "'should NOT be {{?$keyword=='maxLength'}}longer{{??}}shorter{{?}} than {{#def.concatSchema}} characters'",
+ _limitProperties:"'should NOT have {{?$keyword=='maxProperties'}}more{{??}}less{{?}} than {{#def.concatSchema}} properties'",
+ multipleOf: "'should be multiple of {{#def.appendSchema}}",
+ not: "'should NOT be valid'",
+ oneOf: "'should match exactly one schema in oneOf'",
+ pattern: "'should match pattern \"{{#def.concatSchemaEQ}}\"'",
+ patternGroups: "'should NOT have {{=$moreOrLess}} than {{=$limit}} properties matching pattern \"{{=it.util.escapeQuotes($pgProperty)}}\"'",
+ propertyNames: "'property name \\'{{=$invalidName}}\\' is invalid'",
+ required: "'{{? it.opts._errorDataPathProperty }}is a required property{{??}}should have required property \\'{{=$missingProperty}}\\'{{?}}'",
+ type: "'should be {{? $typeIsArray }}{{= $typeSchema.join(\",\") }}{{??}}{{=$typeSchema}}{{?}}'",
+ uniqueItems: "'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)'",
+ custom: "'should pass \"{{=$rule.keyword}}\" keyword validation'",
+ patternRequired: "'should have property matching pattern \\'{{=$missingPattern}}\\''",
+ switch: "'should pass \"switch\" keyword validation'",
+ _formatLimit: "'should be {{=$opStr}} \"{{#def.concatSchemaEQ}}\"'",
+ _formatExclusiveLimit: "'{{=$exclusiveKeyword}} should be boolean'"
+} #}}
+
+
+{{## def.schemaRefOrVal: {{?$isData}}validate.schema{{=$schemaPath}}{{??}}{{=$schema}}{{?}} #}}
+{{## def.schemaRefOrQS: {{?$isData}}validate.schema{{=$schemaPath}}{{??}}{{=it.util.toQuotedString($schema)}}{{?}} #}}
+
+{{## def._errorSchemas = {
+ 'false schema': "false",
+ $ref: "{{=it.util.toQuotedString($schema)}}",
+ additionalItems: "false",
+ additionalProperties: "false",
+ anyOf: "validate.schema{{=$schemaPath}}",
+ const: "validate.schema{{=$schemaPath}}",
+ contains: "validate.schema{{=$schemaPath}}",
+ dependencies: "validate.schema{{=$schemaPath}}",
+ 'enum': "validate.schema{{=$schemaPath}}",
+ format: "{{#def.schemaRefOrQS}}",
+ _limit: "{{#def.schemaRefOrVal}}",
+ _exclusiveLimit: "validate.schema{{=$schemaPath}}",
+ _limitItems: "{{#def.schemaRefOrVal}}",
+ _limitLength: "{{#def.schemaRefOrVal}}",
+ _limitProperties:"{{#def.schemaRefOrVal}}",
+ multipleOf: "{{#def.schemaRefOrVal}}",
+ not: "validate.schema{{=$schemaPath}}",
+ oneOf: "validate.schema{{=$schemaPath}}",
+ pattern: "{{#def.schemaRefOrQS}}",
+ patternGroups: "validate.schema{{=$schemaPath}}",
+ propertyNames: "validate.schema{{=$schemaPath}}",
+ required: "validate.schema{{=$schemaPath}}",
+ type: "validate.schema{{=$schemaPath}}",
+ uniqueItems: "{{#def.schemaRefOrVal}}",
+ custom: "validate.schema{{=$schemaPath}}",
+ patternRequired: "validate.schema{{=$schemaPath}}",
+ switch: "validate.schema{{=$schemaPath}}",
+ _formatLimit: "{{#def.schemaRefOrQS}}",
+ _formatExclusiveLimit: "validate.schema{{=$schemaPath}}"
+} #}}
+
+
+{{## def.schemaValueQS: {{?$isData}}{{=$schemaValue}}{{??}}{{=it.util.toQuotedString($schema)}}{{?}} #}}
+
+{{## def._errorParams = {
+ 'false schema': "{}",
+ $ref: "{ ref: '{{=it.util.escapeQuotes($schema)}}' }",
+ additionalItems: "{ limit: {{=$schema.length}} }",
+ additionalProperties: "{ additionalProperty: '{{=$additionalProperty}}' }",
+ anyOf: "{}",
+ const: "{}",
+ contains: "{}",
+ dependencies: "{ property: '{{= it.util.escapeQuotes($property) }}', missingProperty: '{{=$missingProperty}}', depsCount: {{=$deps.length}}, deps: '{{= it.util.escapeQuotes($deps.length==1 ? $deps[0] : $deps.join(\", \")) }}' }",
+ 'enum': "{ allowedValues: schema{{=$lvl}} }",
+ format: "{ format: {{#def.schemaValueQS}} }",
+ _limit: "{ comparison: {{=$opExpr}}, limit: {{=$schemaValue}}, exclusive: {{=$exclusive}} }",
+ _exclusiveLimit: "{}",
+ _limitItems: "{ limit: {{=$schemaValue}} }",
+ _limitLength: "{ limit: {{=$schemaValue}} }",
+ _limitProperties:"{ limit: {{=$schemaValue}} }",
+ multipleOf: "{ multipleOf: {{=$schemaValue}} }",
+ not: "{}",
+ oneOf: "{}",
+ pattern: "{ pattern: {{#def.schemaValueQS}} }",
+ patternGroups: "{ reason: '{{=$reason}}', limit: {{=$limit}}, pattern: '{{=it.util.escapeQuotes($pgProperty)}}' }",
+ propertyNames: "{ propertyName: '{{=$invalidName}}' }",
+ required: "{ missingProperty: '{{=$missingProperty}}' }",
+ type: "{ type: '{{? $typeIsArray }}{{= $typeSchema.join(\",\") }}{{??}}{{=$typeSchema}}{{?}}' }",
+ uniqueItems: "{ i: i, j: j }",
+ custom: "{ keyword: '{{=$rule.keyword}}' }",
+ patternRequired: "{ missingPattern: '{{=$missingPattern}}' }",
+ switch: "{ caseIndex: {{=$caseIndex}} }",
+ _formatLimit: "{ comparison: {{=$opExpr}}, limit: {{#def.schemaValueQS}}, exclusive: {{=$exclusive}} }",
+ _formatExclusiveLimit: "{}"
+} #}}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dot/format.jst b/tools/node_modules/eslint/node_modules/ajv/lib/dot/format.jst
new file mode 100644
index 0000000000..484dddf794
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dot/format.jst
@@ -0,0 +1,106 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+
+{{## def.skipFormat:
+ {{? $breakOnError }} if (true) { {{?}}
+ {{ return out; }}
+#}}
+
+{{? it.opts.format === false }}{{# def.skipFormat }}{{?}}
+
+
+{{# def.$data }}
+
+
+{{## def.$dataCheckFormat:
+ {{# def.$dataNotType:'string' }}
+ ({{? $unknownFormats != 'ignore' }}
+ ({{=$schemaValue}} && !{{=$format}}
+ {{? $allowUnknown }}
+ && self._opts.unknownFormats.indexOf({{=$schemaValue}}) == -1
+ {{?}}) ||
+ {{?}}
+ ({{=$format}} && {{=$formatType}} == '{{=$ruleType}}'
+ && !(typeof {{=$format}} == 'function'
+ ? {{? it.async}}
+ (async{{=$lvl}} ? {{=it.yieldAwait}} {{=$format}}({{=$data}}) : {{=$format}}({{=$data}}))
+ {{??}}
+ {{=$format}}({{=$data}})
+ {{?}}
+ : {{=$format}}.test({{=$data}}))))
+#}}
+
+{{## def.checkFormat:
+ {{
+ var $formatRef = 'formats' + it.util.getProperty($schema);
+ if ($isObject) $formatRef += '.validate';
+ }}
+ {{? typeof $format == 'function' }}
+ {{=$formatRef}}({{=$data}})
+ {{??}}
+ {{=$formatRef}}.test({{=$data}})
+ {{?}}
+#}}
+
+
+{{
+ var $unknownFormats = it.opts.unknownFormats
+ , $allowUnknown = Array.isArray($unknownFormats);
+}}
+
+{{? $isData }}
+ {{
+ var $format = 'format' + $lvl
+ , $isObject = 'isObject' + $lvl
+ , $formatType = 'formatType' + $lvl;
+ }}
+ var {{=$format}} = formats[{{=$schemaValue}}];
+ var {{=$isObject}} = typeof {{=$format}} == 'object'
+ && !({{=$format}} instanceof RegExp)
+ && {{=$format}}.validate;
+ var {{=$formatType}} = {{=$isObject}} && {{=$format}}.type || 'string';
+ if ({{=$isObject}}) {
+ {{? it.async}}
+ var async{{=$lvl}} = {{=$format}}.async;
+ {{?}}
+ {{=$format}} = {{=$format}}.validate;
+ }
+ if ({{# def.$dataCheckFormat }}) {
+{{??}}
+ {{ var $format = it.formats[$schema]; }}
+ {{? !$format }}
+ {{? $unknownFormats == 'ignore' }}
+ {{ it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); }}
+ {{# def.skipFormat }}
+ {{?? $allowUnknown && $unknownFormats.indexOf($schema) >= 0 }}
+ {{# def.skipFormat }}
+ {{??}}
+ {{ throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); }}
+ {{?}}
+ {{?}}
+ {{
+ var $isObject = typeof $format == 'object'
+ && !($format instanceof RegExp)
+ && $format.validate;
+ var $formatType = $isObject && $format.type || 'string';
+ if ($isObject) {
+ var $async = $format.async === true;
+ $format = $format.validate;
+ }
+ }}
+ {{? $formatType != $ruleType }}
+ {{# def.skipFormat }}
+ {{?}}
+ {{? $async }}
+ {{
+ if (!it.async) throw new Error('async format in sync schema');
+ var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate';
+ }}
+ if (!({{=it.yieldAwait}} {{=$formatRef}}({{=$data}}))) {
+ {{??}}
+ if (!{{# def.checkFormat }}) {
+ {{?}}
+{{?}}
+ {{# def.error:'format' }}
+ } {{? $breakOnError }} else { {{?}}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dot/items.jst b/tools/node_modules/eslint/node_modules/ajv/lib/dot/items.jst
new file mode 100644
index 0000000000..8c0f5acb5d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dot/items.jst
@@ -0,0 +1,100 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+
+{{## def.validateItems:startFrom:
+ for (var {{=$idx}} = {{=startFrom}}; {{=$idx}} < {{=$data}}.length; {{=$idx}}++) {
+ {{
+ $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);
+ var $passData = $data + '[' + $idx + ']';
+ $it.dataPathArr[$dataNxt] = $idx;
+ }}
+
+ {{# def.generateSubschemaCode }}
+ {{# def.optimizeValidate }}
+
+ {{? $breakOnError }}
+ if (!{{=$nextValid}}) break;
+ {{?}}
+ }
+#}}
+
+{{
+ var $idx = 'i' + $lvl
+ , $dataNxt = $it.dataLevel = it.dataLevel + 1
+ , $nextData = 'data' + $dataNxt
+ , $currentBaseId = it.baseId;
+}}
+
+var {{=$errs}} = errors;
+var {{=$valid}};
+
+{{? Array.isArray($schema) }}
+ {{ /* 'items' is an array of schemas */}}
+ {{ var $additionalItems = it.schema.additionalItems; }}
+ {{? $additionalItems === false }}
+ {{=$valid}} = {{=$data}}.length <= {{= $schema.length }};
+ {{
+ var $currErrSchemaPath = $errSchemaPath;
+ $errSchemaPath = it.errSchemaPath + '/additionalItems';
+ }}
+ {{# def.checkError:'additionalItems' }}
+ {{ $errSchemaPath = $currErrSchemaPath; }}
+ {{# def.elseIfValid}}
+ {{?}}
+
+ {{~ $schema:$sch:$i }}
+ {{? {{# def.nonEmptySchema:$sch }} }}
+ {{=$nextValid}} = true;
+
+ if ({{=$data}}.length > {{=$i}}) {
+ {{
+ var $passData = $data + '[' + $i + ']';
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + '[' + $i + ']';
+ $it.errSchemaPath = $errSchemaPath + '/' + $i;
+ $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true);
+ $it.dataPathArr[$dataNxt] = $i;
+ }}
+
+ {{# def.generateSubschemaCode }}
+ {{# def.optimizeValidate }}
+ }
+
+ {{# def.ifResultValid }}
+ {{?}}
+ {{~}}
+
+ {{? typeof $additionalItems == 'object' && {{# def.nonEmptySchema:$additionalItems }} }}
+ {{
+ $it.schema = $additionalItems;
+ $it.schemaPath = it.schemaPath + '.additionalItems';
+ $it.errSchemaPath = it.errSchemaPath + '/additionalItems';
+ }}
+ {{=$nextValid}} = true;
+
+ if ({{=$data}}.length > {{= $schema.length }}) {
+ {{# def.validateItems: $schema.length }}
+ }
+
+ {{# def.ifResultValid }}
+ {{?}}
+
+{{?? {{# def.nonEmptySchema:$schema }} }}
+ {{ /* 'items' is a single schema */}}
+ {{
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ }}
+ {{# def.validateItems: 0 }}
+{{?}}
+
+{{? $breakOnError }}
+ {{= $closingBraces }}
+ if ({{=$errs}} == errors) {
+{{?}}
+
+{{# def.cleanUp }}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dot/missing.def b/tools/node_modules/eslint/node_modules/ajv/lib/dot/missing.def
new file mode 100644
index 0000000000..a73b9f966e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dot/missing.def
@@ -0,0 +1,39 @@
+{{## def.checkMissingProperty:_properties:
+ {{~ _properties:$propertyKey:$i }}
+ {{?$i}} || {{?}}
+ {{
+ var $prop = it.util.getProperty($propertyKey)
+ , $useData = $data + $prop;
+ }}
+ ( ({{# def.noPropertyInData }}) && (missing{{=$lvl}} = {{= it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop) }}) )
+ {{~}}
+#}}
+
+
+{{## def.errorMissingProperty:_error:
+ {{
+ var $propertyPath = 'missing' + $lvl
+ , $missingProperty = '\' + ' + $propertyPath + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.opts.jsonPointers
+ ? it.util.getPathExpr($currentErrorPath, $propertyPath, true)
+ : $currentErrorPath + ' + ' + $propertyPath;
+ }
+ }}
+ {{# def.error:_error }}
+#}}
+
+
+{{## def.allErrorsMissingProperty:_error:
+ {{
+ var $prop = it.util.getProperty($propertyKey)
+ , $missingProperty = it.util.escapeQuotes($propertyKey)
+ , $useData = $data + $prop;
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
+ }
+ }}
+ if ({{# def.noPropertyInData }}) {
+ {{# def.addError:_error }}
+ }
+#}}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dot/multipleOf.jst b/tools/node_modules/eslint/node_modules/ajv/lib/dot/multipleOf.jst
new file mode 100644
index 0000000000..5f8dd33b5d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dot/multipleOf.jst
@@ -0,0 +1,20 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+var division{{=$lvl}};
+if ({{?$isData}}
+ {{=$schemaValue}} !== undefined && (
+ typeof {{=$schemaValue}} != 'number' ||
+ {{?}}
+ (division{{=$lvl}} = {{=$data}} / {{=$schemaValue}},
+ {{? it.opts.multipleOfPrecision }}
+ Math.abs(Math.round(division{{=$lvl}}) - division{{=$lvl}}) > 1e-{{=it.opts.multipleOfPrecision}}
+ {{??}}
+ division{{=$lvl}} !== parseInt(division{{=$lvl}})
+ {{?}}
+ )
+ {{?$isData}} ) {{?}} ) {
+ {{# def.error:'multipleOf' }}
+} {{? $breakOnError }} else { {{?}}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dot/not.jst b/tools/node_modules/eslint/node_modules/ajv/lib/dot/not.jst
new file mode 100644
index 0000000000..e03185ae87
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dot/not.jst
@@ -0,0 +1,43 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+{{? {{# def.nonEmptySchema:$schema }} }}
+ {{
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ }}
+
+ var {{=$errs}} = errors;
+
+ {{# def.setCompositeRule }}
+
+ {{
+ $it.createErrors = false;
+ var $allErrorsOption;
+ if ($it.opts.allErrors) {
+ $allErrorsOption = $it.opts.allErrors;
+ $it.opts.allErrors = false;
+ }
+ }}
+ {{= it.validate($it) }}
+ {{
+ $it.createErrors = true;
+ if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption;
+ }}
+
+ {{# def.resetCompositeRule }}
+
+ if ({{=$nextValid}}) {
+ {{# def.error:'not' }}
+ } else {
+ {{# def.resetErrors }}
+ {{? it.opts.allErrors }} } {{?}}
+{{??}}
+ {{# def.addError:'not' }}
+ {{? $breakOnError}}
+ if (false) {
+ {{?}}
+{{?}}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dot/oneOf.jst b/tools/node_modules/eslint/node_modules/ajv/lib/dot/oneOf.jst
new file mode 100644
index 0000000000..59a435549c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dot/oneOf.jst
@@ -0,0 +1,44 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+var {{=$errs}} = errors;
+var prevValid{{=$lvl}} = false;
+var {{=$valid}} = false;
+
+{{ var $currentBaseId = $it.baseId; }}
+{{# def.setCompositeRule }}
+
+{{~ $schema:$sch:$i }}
+ {{? {{# def.nonEmptySchema:$sch }} }}
+ {{
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + '[' + $i + ']';
+ $it.errSchemaPath = $errSchemaPath + '/' + $i;
+ }}
+
+ {{# def.insertSubschemaCode }}
+ {{??}}
+ var {{=$nextValid}} = true;
+ {{?}}
+
+ {{? $i }}
+ if ({{=$nextValid}} && prevValid{{=$lvl}})
+ {{=$valid}} = false;
+ else {
+ {{ $closingBraces += '}'; }}
+ {{?}}
+
+ if ({{=$nextValid}}) {{=$valid}} = prevValid{{=$lvl}} = true;
+{{~}}
+
+{{# def.resetCompositeRule }}
+
+{{= $closingBraces }}
+
+if (!{{=$valid}}) {
+ {{# def.extraError:'oneOf' }}
+} else {
+ {{# def.resetErrors }}
+{{? it.opts.allErrors }} } {{?}}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dot/pattern.jst b/tools/node_modules/eslint/node_modules/ajv/lib/dot/pattern.jst
new file mode 100644
index 0000000000..3a37ef6cb8
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dot/pattern.jst
@@ -0,0 +1,14 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{
+ var $regexp = $isData
+ ? '(new RegExp(' + $schemaValue + '))'
+ : it.usePattern($schema);
+}}
+
+if ({{# def.$dataNotType:'string' }} !{{=$regexp}}.test({{=$data}}) ) {
+ {{# def.error:'pattern' }}
+} {{? $breakOnError }} else { {{?}}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dot/properties.jst b/tools/node_modules/eslint/node_modules/ajv/lib/dot/properties.jst
new file mode 100644
index 0000000000..8d56324b77
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dot/properties.jst
@@ -0,0 +1,327 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+
+{{## def.validateAdditional:
+ {{ /* additionalProperties is schema */
+ $it.schema = $aProperties;
+ $it.schemaPath = it.schemaPath + '.additionalProperties';
+ $it.errSchemaPath = it.errSchemaPath + '/additionalProperties';
+ $it.errorPath = it.opts._errorDataPathProperty
+ ? it.errorPath
+ : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
+ var $passData = $data + '[' + $key + ']';
+ $it.dataPathArr[$dataNxt] = $key;
+ }}
+
+ {{# def.generateSubschemaCode }}
+ {{# def.optimizeValidate }}
+#}}
+
+
+{{
+ var $key = 'key' + $lvl
+ , $idx = 'idx' + $lvl
+ , $dataNxt = $it.dataLevel = it.dataLevel + 1
+ , $nextData = 'data' + $dataNxt
+ , $dataProperties = 'dataProperties' + $lvl;
+
+ var $schemaKeys = Object.keys($schema || {})
+ , $pProperties = it.schema.patternProperties || {}
+ , $pPropertyKeys = Object.keys($pProperties)
+ , $aProperties = it.schema.additionalProperties
+ , $someProperties = $schemaKeys.length || $pPropertyKeys.length
+ , $noAdditional = $aProperties === false
+ , $additionalIsSchema = typeof $aProperties == 'object'
+ && Object.keys($aProperties).length
+ , $removeAdditional = it.opts.removeAdditional
+ , $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional
+ , $ownProperties = it.opts.ownProperties
+ , $currentBaseId = it.baseId;
+
+ var $required = it.schema.required;
+ if ($required && !(it.opts.v5 && $required.$data) && $required.length < it.opts.loopRequired)
+ var $requiredHash = it.util.toHash($required);
+
+ if (it.opts.patternGroups) {
+ var $pgProperties = it.schema.patternGroups || {}
+ , $pgPropertyKeys = Object.keys($pgProperties);
+ }
+}}
+
+
+var {{=$errs}} = errors;
+var {{=$nextValid}} = true;
+{{? $ownProperties }}
+ var {{=$dataProperties}} = undefined;
+{{?}}
+
+{{? $checkAdditional }}
+ {{# def.iterateProperties }}
+ {{? $someProperties }}
+ var isAdditional{{=$lvl}} = !(false
+ {{? $schemaKeys.length }}
+ {{? $schemaKeys.length > 5 }}
+ || validate.schema{{=$schemaPath}}[{{=$key}}]
+ {{??}}
+ {{~ $schemaKeys:$propertyKey }}
+ || {{=$key}} == {{= it.util.toQuotedString($propertyKey) }}
+ {{~}}
+ {{?}}
+ {{?}}
+ {{? $pPropertyKeys.length }}
+ {{~ $pPropertyKeys:$pProperty:$i }}
+ || {{= it.usePattern($pProperty) }}.test({{=$key}})
+ {{~}}
+ {{?}}
+ {{? it.opts.patternGroups && $pgPropertyKeys.length }}
+ {{~ $pgPropertyKeys:$pgProperty:$i }}
+ || {{= it.usePattern($pgProperty) }}.test({{=$key}})
+ {{~}}
+ {{?}}
+ );
+
+ if (isAdditional{{=$lvl}}) {
+ {{?}}
+ {{? $removeAdditional == 'all' }}
+ delete {{=$data}}[{{=$key}}];
+ {{??}}
+ {{
+ var $currentErrorPath = it.errorPath;
+ var $additionalProperty = '\' + ' + $key + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
+ }
+ }}
+ {{? $noAdditional }}
+ {{? $removeAdditional }}
+ delete {{=$data}}[{{=$key}}];
+ {{??}}
+ {{=$nextValid}} = false;
+ {{
+ var $currErrSchemaPath = $errSchemaPath;
+ $errSchemaPath = it.errSchemaPath + '/additionalProperties';
+ }}
+ {{# def.error:'additionalProperties' }}
+ {{ $errSchemaPath = $currErrSchemaPath; }}
+ {{? $breakOnError }} break; {{?}}
+ {{?}}
+ {{?? $additionalIsSchema }}
+ {{? $removeAdditional == 'failing' }}
+ var {{=$errs}} = errors;
+ {{# def.setCompositeRule }}
+
+ {{# def.validateAdditional }}
+
+ if (!{{=$nextValid}}) {
+ errors = {{=$errs}};
+ if (validate.errors !== null) {
+ if (errors) validate.errors.length = errors;
+ else validate.errors = null;
+ }
+ delete {{=$data}}[{{=$key}}];
+ }
+
+ {{# def.resetCompositeRule }}
+ {{??}}
+ {{# def.validateAdditional }}
+ {{? $breakOnError }} if (!{{=$nextValid}}) break; {{?}}
+ {{?}}
+ {{?}}
+ {{ it.errorPath = $currentErrorPath; }}
+ {{?}}
+ {{? $someProperties }}
+ }
+ {{?}}
+ }
+
+ {{# def.ifResultValid }}
+{{?}}
+
+{{ var $useDefaults = it.opts.useDefaults && !it.compositeRule; }}
+
+{{? $schemaKeys.length }}
+ {{~ $schemaKeys:$propertyKey }}
+ {{ var $sch = $schema[$propertyKey]; }}
+
+ {{? {{# def.nonEmptySchema:$sch}} }}
+ {{
+ var $prop = it.util.getProperty($propertyKey)
+ , $passData = $data + $prop
+ , $hasDefault = $useDefaults && $sch.default !== undefined;
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + $prop;
+ $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey);
+ $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers);
+ $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey);
+ }}
+
+ {{# def.generateSubschemaCode }}
+
+ {{? {{# def.willOptimize }} }}
+ {{
+ $code = {{# def._optimizeValidate }};
+ var $useData = $passData;
+ }}
+ {{??}}
+ {{ var $useData = $nextData; }}
+ var {{=$nextData}} = {{=$passData}};
+ {{?}}
+
+ {{? $hasDefault }}
+ {{= $code }}
+ {{??}}
+ {{? $requiredHash && $requiredHash[$propertyKey] }}
+ if ({{# def.noPropertyInData }}) {
+ {{=$nextValid}} = false;
+ {{
+ var $currentErrorPath = it.errorPath
+ , $currErrSchemaPath = $errSchemaPath
+ , $missingProperty = it.util.escapeQuotes($propertyKey);
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
+ }
+ $errSchemaPath = it.errSchemaPath + '/required';
+ }}
+ {{# def.error:'required' }}
+ {{ $errSchemaPath = $currErrSchemaPath; }}
+ {{ it.errorPath = $currentErrorPath; }}
+ } else {
+ {{??}}
+ {{? $breakOnError }}
+ if ({{# def.noPropertyInData }}) {
+ {{=$nextValid}} = true;
+ } else {
+ {{??}}
+ if ({{=$useData}} !== undefined
+ {{? $ownProperties }}
+ && {{# def.isOwnProperty }}
+ {{?}}
+ ) {
+ {{?}}
+ {{?}}
+
+ {{= $code }}
+ }
+ {{?}} {{ /* $hasDefault */ }}
+ {{?}} {{ /* def.nonEmptySchema */ }}
+
+ {{# def.ifResultValid }}
+ {{~}}
+{{?}}
+
+{{? $pPropertyKeys.length }}
+ {{~ $pPropertyKeys:$pProperty }}
+ {{ var $sch = $pProperties[$pProperty]; }}
+
+ {{? {{# def.nonEmptySchema:$sch}} }}
+ {{
+ $it.schema = $sch;
+ $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty);
+ $it.errSchemaPath = it.errSchemaPath + '/patternProperties/'
+ + it.util.escapeFragment($pProperty);
+ }}
+
+ {{# def.iterateProperties }}
+ if ({{= it.usePattern($pProperty) }}.test({{=$key}})) {
+ {{
+ $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
+ var $passData = $data + '[' + $key + ']';
+ $it.dataPathArr[$dataNxt] = $key;
+ }}
+
+ {{# def.generateSubschemaCode }}
+ {{# def.optimizeValidate }}
+
+ {{? $breakOnError }} if (!{{=$nextValid}}) break; {{?}}
+ }
+ {{? $breakOnError }} else {{=$nextValid}} = true; {{?}}
+ }
+
+ {{# def.ifResultValid }}
+ {{?}} {{ /* def.nonEmptySchema */ }}
+ {{~}}
+{{?}}
+
+
+{{? it.opts.patternGroups && $pgPropertyKeys.length }}
+ {{~ $pgPropertyKeys:$pgProperty }}
+ {{
+ var $pgSchema = $pgProperties[$pgProperty]
+ , $sch = $pgSchema.schema;
+ }}
+
+ {{? {{# def.nonEmptySchema:$sch}} }}
+ {{
+ $it.schema = $sch;
+ $it.schemaPath = it.schemaPath + '.patternGroups' + it.util.getProperty($pgProperty) + '.schema';
+ $it.errSchemaPath = it.errSchemaPath + '/patternGroups/'
+ + it.util.escapeFragment($pgProperty)
+ + '/schema';
+ }}
+
+ var pgPropCount{{=$lvl}} = 0;
+
+ {{# def.iterateProperties }}
+ if ({{= it.usePattern($pgProperty) }}.test({{=$key}})) {
+ pgPropCount{{=$lvl}}++;
+
+ {{
+ $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
+ var $passData = $data + '[' + $key + ']';
+ $it.dataPathArr[$dataNxt] = $key;
+ }}
+
+ {{# def.generateSubschemaCode }}
+ {{# def.optimizeValidate }}
+
+ {{? $breakOnError }} if (!{{=$nextValid}}) break; {{?}}
+ }
+ {{? $breakOnError }} else {{=$nextValid}} = true; {{?}}
+ }
+
+ {{# def.ifResultValid }}
+
+ {{
+ var $pgMin = $pgSchema.minimum
+ , $pgMax = $pgSchema.maximum;
+ }}
+ {{? $pgMin !== undefined || $pgMax !== undefined }}
+ var {{=$valid}} = true;
+
+ {{ var $currErrSchemaPath = $errSchemaPath; }}
+
+ {{? $pgMin !== undefined }}
+ {{ var $limit = $pgMin, $reason = 'minimum', $moreOrLess = 'less'; }}
+ {{=$valid}} = pgPropCount{{=$lvl}} >= {{=$pgMin}};
+ {{ $errSchemaPath = it.errSchemaPath + '/patternGroups/minimum'; }}
+ {{# def.checkError:'patternGroups' }}
+ {{? $pgMax !== undefined }}
+ else
+ {{?}}
+ {{?}}
+
+ {{? $pgMax !== undefined }}
+ {{ var $limit = $pgMax, $reason = 'maximum', $moreOrLess = 'more'; }}
+ {{=$valid}} = pgPropCount{{=$lvl}} <= {{=$pgMax}};
+ {{ $errSchemaPath = it.errSchemaPath + '/patternGroups/maximum'; }}
+ {{# def.checkError:'patternGroups' }}
+ {{?}}
+
+ {{ $errSchemaPath = $currErrSchemaPath; }}
+
+ {{# def.ifValid }}
+ {{?}}
+ {{?}} {{ /* def.nonEmptySchema */ }}
+ {{~}}
+{{?}}
+
+
+{{? $breakOnError }}
+ {{= $closingBraces }}
+ if ({{=$errs}} == errors) {
+{{?}}
+
+{{# def.cleanUp }}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dot/propertyNames.jst b/tools/node_modules/eslint/node_modules/ajv/lib/dot/propertyNames.jst
new file mode 100644
index 0000000000..51caffc207
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dot/propertyNames.jst
@@ -0,0 +1,54 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+{{? {{# def.nonEmptySchema:$schema }} }}
+ {{
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ }}
+
+ {{
+ var $key = 'key' + $lvl
+ , $idx = 'idx' + $lvl
+ , $i = 'i' + $lvl
+ , $invalidName = '\' + ' + $key + ' + \''
+ , $dataNxt = $it.dataLevel = it.dataLevel + 1
+ , $nextData = 'data' + $dataNxt
+ , $dataProperties = 'dataProperties' + $lvl
+ , $ownProperties = it.opts.ownProperties
+ , $currentBaseId = it.baseId;
+ }}
+
+ var {{=$errs}} = errors;
+
+ {{? $ownProperties }}
+ var {{=$dataProperties}} = undefined;
+ {{?}}
+ {{# def.iterateProperties }}
+ var startErrs{{=$lvl}} = errors;
+
+ {{ var $passData = $key; }}
+ {{# def.setCompositeRule }}
+ {{# def.generateSubschemaCode }}
+ {{# def.optimizeValidate }}
+ {{# def.resetCompositeRule }}
+
+ if (!{{=$nextValid}}) {
+ for (var {{=$i}}=startErrs{{=$lvl}}; {{=$i}}<errors; {{=$i}}++) {
+ vErrors[{{=$i}}].propertyName = {{=$key}};
+ }
+ {{# def.extraError:'propertyNames' }}
+ {{? $breakOnError }} break; {{?}}
+ }
+ }
+{{?}}
+
+{{? $breakOnError }}
+ {{= $closingBraces }}
+ if ({{=$errs}} == errors) {
+{{?}}
+
+{{# def.cleanUp }}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dot/ref.jst b/tools/node_modules/eslint/node_modules/ajv/lib/dot/ref.jst
new file mode 100644
index 0000000000..036bc29057
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dot/ref.jst
@@ -0,0 +1,85 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+
+{{## def._validateRef:_v:
+ {{? it.opts.passContext }}
+ {{=_v}}.call(this,
+ {{??}}
+ {{=_v}}(
+ {{?}}
+ {{=$data}}, {{# def.dataPath }}{{# def.passParentData }}, rootData)
+#}}
+
+{{ var $async, $refCode; }}
+{{? $schema == '#' || $schema == '#/' }}
+ {{
+ if (it.isRoot) {
+ $async = it.async;
+ $refCode = 'validate';
+ } else {
+ $async = it.root.schema.$async === true;
+ $refCode = 'root.refVal[0]';
+ }
+ }}
+{{??}}
+ {{ var $refVal = it.resolveRef(it.baseId, $schema, it.isRoot); }}
+ {{? $refVal === undefined }}
+ {{ var $message = it.MissingRefError.message(it.baseId, $schema); }}
+ {{? it.opts.missingRefs == 'fail' }}
+ {{ it.logger.error($message); }}
+ {{# def.error:'$ref' }}
+ {{? $breakOnError }} if (false) { {{?}}
+ {{?? it.opts.missingRefs == 'ignore' }}
+ {{ it.logger.warn($message); }}
+ {{? $breakOnError }} if (true) { {{?}}
+ {{??}}
+ {{ throw new it.MissingRefError(it.baseId, $schema, $message); }}
+ {{?}}
+ {{?? $refVal.inline }}
+ {{# def.setupNextLevel }}
+ {{
+ $it.schema = $refVal.schema;
+ $it.schemaPath = '';
+ $it.errSchemaPath = $schema;
+ }}
+ {{ var $code = it.validate($it).replace(/validate\.schema/g, $refVal.code); }}
+ {{= $code }}
+ {{? $breakOnError}}
+ if ({{=$nextValid}}) {
+ {{?}}
+ {{??}}
+ {{
+ $async = $refVal.$async === true;
+ $refCode = $refVal.code;
+ }}
+ {{?}}
+{{?}}
+
+{{? $refCode }}
+ {{# def.beginDefOut}}
+ {{# def._validateRef:$refCode }}
+ {{# def.storeDefOut:__callValidate }}
+
+ {{? $async }}
+ {{ if (!it.async) throw new Error('async schema referenced by sync schema'); }}
+ {{? $breakOnError }} var {{=$valid}}; {{?}}
+ try {
+ {{=it.yieldAwait}} {{=__callValidate}};
+ {{? $breakOnError }} {{=$valid}} = true; {{?}}
+ } catch (e) {
+ if (!(e instanceof ValidationError)) throw e;
+ if (vErrors === null) vErrors = e.errors;
+ else vErrors = vErrors.concat(e.errors);
+ errors = vErrors.length;
+ {{? $breakOnError }} {{=$valid}} = false; {{?}}
+ }
+ {{? $breakOnError }} if ({{=$valid}}) { {{?}}
+ {{??}}
+ if (!{{=__callValidate}}) {
+ if (vErrors === null) vErrors = {{=$refCode}}.errors;
+ else vErrors = vErrors.concat({{=$refCode}}.errors);
+ errors = vErrors.length;
+ } {{? $breakOnError }} else { {{?}}
+ {{?}}
+{{?}}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dot/required.jst b/tools/node_modules/eslint/node_modules/ajv/lib/dot/required.jst
new file mode 100644
index 0000000000..80fde35e8c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dot/required.jst
@@ -0,0 +1,108 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.missing }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{ var $vSchema = 'schema' + $lvl; }}
+
+{{## def.setupLoop:
+ {{? !$isData }}
+ var {{=$vSchema}} = validate.schema{{=$schemaPath}};
+ {{?}}
+
+ {{
+ var $i = 'i' + $lvl
+ , $propertyPath = 'schema' + $lvl + '[' + $i + ']'
+ , $missingProperty = '\' + ' + $propertyPath + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers);
+ }
+ }}
+#}}
+
+
+{{## def.isRequiredOwnProperty:
+ Object.prototype.hasOwnProperty.call({{=$data}}, {{=$vSchema}}[{{=$i}}])
+#}}
+
+
+{{? !$isData }}
+ {{? $schema.length < it.opts.loopRequired &&
+ it.schema.properties && Object.keys(it.schema.properties).length }}
+ {{ var $required = []; }}
+ {{~ $schema:$property }}
+ {{ var $propertySch = it.schema.properties[$property]; }}
+ {{? !($propertySch && {{# def.nonEmptySchema:$propertySch}}) }}
+ {{ $required[$required.length] = $property; }}
+ {{?}}
+ {{~}}
+ {{??}}
+ {{ var $required = $schema; }}
+ {{?}}
+{{?}}
+
+
+{{? $isData || $required.length }}
+ {{
+ var $currentErrorPath = it.errorPath
+ , $loopRequired = $isData || $required.length >= it.opts.loopRequired
+ , $ownProperties = it.opts.ownProperties;
+ }}
+
+ {{? $breakOnError }}
+ var missing{{=$lvl}};
+ {{? $loopRequired }}
+ {{# def.setupLoop }}
+ var {{=$valid}} = true;
+
+ {{?$isData}}{{# def.check$dataIsArray }}{{?}}
+
+ for (var {{=$i}} = 0; {{=$i}} < {{=$vSchema}}.length; {{=$i}}++) {
+ {{=$valid}} = {{=$data}}[{{=$vSchema}}[{{=$i}}]] !== undefined
+ {{? $ownProperties }}
+ && {{# def.isRequiredOwnProperty }}
+ {{?}};
+ if (!{{=$valid}}) break;
+ }
+
+ {{? $isData }} } {{?}}
+
+ {{# def.checkError:'required' }}
+ else {
+ {{??}}
+ if ({{# def.checkMissingProperty:$required }}) {
+ {{# def.errorMissingProperty:'required' }}
+ } else {
+ {{?}}
+ {{??}}
+ {{? $loopRequired }}
+ {{# def.setupLoop }}
+ {{? $isData }}
+ if ({{=$vSchema}} && !Array.isArray({{=$vSchema}})) {
+ {{# def.addError:'required' }}
+ } else if ({{=$vSchema}} !== undefined) {
+ {{?}}
+
+ for (var {{=$i}} = 0; {{=$i}} < {{=$vSchema}}.length; {{=$i}}++) {
+ if ({{=$data}}[{{=$vSchema}}[{{=$i}}]] === undefined
+ {{? $ownProperties }}
+ || !{{# def.isRequiredOwnProperty }}
+ {{?}}) {
+ {{# def.addError:'required' }}
+ }
+ }
+
+ {{? $isData }} } {{?}}
+ {{??}}
+ {{~ $required:$propertyKey }}
+ {{# def.allErrorsMissingProperty:'required' }}
+ {{~}}
+ {{?}}
+ {{?}}
+
+ {{ it.errorPath = $currentErrorPath; }}
+
+{{?? $breakOnError }}
+ if (true) {
+{{?}}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dot/uniqueItems.jst b/tools/node_modules/eslint/node_modules/ajv/lib/dot/uniqueItems.jst
new file mode 100644
index 0000000000..dfc42b03b2
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dot/uniqueItems.jst
@@ -0,0 +1,38 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+
+{{? ($schema || $isData) && it.opts.uniqueItems !== false }}
+ {{? $isData }}
+ var {{=$valid}};
+ if ({{=$schemaValue}} === false || {{=$schemaValue}} === undefined)
+ {{=$valid}} = true;
+ else if (typeof {{=$schemaValue}} != 'boolean')
+ {{=$valid}} = false;
+ else {
+ {{?}}
+
+ var {{=$valid}} = true;
+ if ({{=$data}}.length > 1) {
+ var i = {{=$data}}.length, j;
+ outer:
+ for (;i--;) {
+ for (j = i; j--;) {
+ if (equal({{=$data}}[i], {{=$data}}[j])) {
+ {{=$valid}} = false;
+ break outer;
+ }
+ }
+ }
+ }
+
+ {{? $isData }} } {{?}}
+
+ if (!{{=$valid}}) {
+ {{# def.error:'uniqueItems' }}
+ } {{? $breakOnError }} else { {{?}}
+{{??}}
+ {{? $breakOnError }} if (true) { {{?}}
+{{?}}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dot/validate.jst b/tools/node_modules/eslint/node_modules/ajv/lib/dot/validate.jst
new file mode 100644
index 0000000000..273e4c37e0
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dot/validate.jst
@@ -0,0 +1,272 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.defaults }}
+{{# def.coerce }}
+
+{{ /**
+ * schema compilation (render) time:
+ * it = { schema, RULES, _validate, opts }
+ * it.validate - this template function,
+ * it is used recursively to generate code for subschemas
+ *
+ * runtime:
+ * "validate" is a variable name to which this function will be assigned
+ * validateRef etc. are defined in the parent scope in index.js
+ */ }}
+
+{{
+ var $async = it.schema.$async === true
+ , $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref')
+ , $id = it.self._getId(it.schema);
+}}
+
+{{? it.isTop }}
+ {{? $async }}
+ {{
+ it.async = true;
+ var $es7 = it.opts.async == 'es7';
+ it.yieldAwait = $es7 ? 'await' : 'yield';
+ }}
+ {{?}}
+
+ var validate =
+ {{? $async }}
+ {{? $es7 }}
+ (async function
+ {{??}}
+ {{? it.opts.async != '*'}}co.wrap{{?}}(function*
+ {{?}}
+ {{??}}
+ (function
+ {{?}}
+ (data, dataPath, parentData, parentDataProperty, rootData) {
+ 'use strict';
+ {{? $id && (it.opts.sourceCode || it.opts.processCode) }}
+ {{= '/\*# sourceURL=' + $id + ' */' }}
+ {{?}}
+{{?}}
+
+{{? typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref) }}
+ {{ var $keyword = 'false schema'; }}
+ {{# def.setupKeyword }}
+ {{? it.schema === false}}
+ {{? it.isTop}}
+ {{ $breakOnError = true; }}
+ {{??}}
+ var {{=$valid}} = false;
+ {{?}}
+ {{# def.error:'false schema' }}
+ {{??}}
+ {{? it.isTop}}
+ {{? $async }}
+ return data;
+ {{??}}
+ validate.errors = null;
+ return true;
+ {{?}}
+ {{??}}
+ var {{=$valid}} = true;
+ {{?}}
+ {{?}}
+
+ {{? it.isTop}}
+ });
+ return validate;
+ {{?}}
+
+ {{ return out; }}
+{{?}}
+
+
+{{? it.isTop }}
+ {{
+ var $top = it.isTop
+ , $lvl = it.level = 0
+ , $dataLvl = it.dataLevel = 0
+ , $data = 'data';
+ it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema));
+ it.baseId = it.baseId || it.rootId;
+ delete it.isTop;
+
+ it.dataPathArr = [undefined];
+ }}
+
+ var vErrors = null; {{ /* don't edit, used in replace */ }}
+ var errors = 0; {{ /* don't edit, used in replace */ }}
+ if (rootData === undefined) rootData = data; {{ /* don't edit, used in replace */ }}
+{{??}}
+ {{
+ var $lvl = it.level
+ , $dataLvl = it.dataLevel
+ , $data = 'data' + ($dataLvl || '');
+
+ if ($id) it.baseId = it.resolve.url(it.baseId, $id);
+
+ if ($async && !it.async) throw new Error('async schema in sync schema');
+ }}
+
+ var errs_{{=$lvl}} = errors;
+{{?}}
+
+{{
+ var $valid = 'valid' + $lvl
+ , $breakOnError = !it.opts.allErrors
+ , $closingBraces1 = ''
+ , $closingBraces2 = '';
+
+ var $errorKeyword;
+ var $typeSchema = it.schema.type
+ , $typeIsArray = Array.isArray($typeSchema);
+
+ if ($typeIsArray && $typeSchema.length == 1) {
+ $typeSchema = $typeSchema[0];
+ $typeIsArray = false;
+ }
+}}
+
+{{## def.checkType:
+ {{
+ var $schemaPath = it.schemaPath + '.type'
+ , $errSchemaPath = it.errSchemaPath + '/type'
+ , $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType';
+ }}
+
+ if ({{= it.util[$method]($typeSchema, $data, true) }}) {
+#}}
+
+{{? it.schema.$ref && $refKeywords }}
+ {{? it.opts.extendRefs == 'fail' }}
+ {{ throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); }}
+ {{?? it.opts.extendRefs !== true }}
+ {{
+ $refKeywords = false;
+ it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"');
+ }}
+ {{?}}
+{{?}}
+
+{{? $typeSchema }}
+ {{? it.opts.coerceTypes }}
+ {{ var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); }}
+ {{?}}
+
+ {{ var $rulesGroup = it.RULES.types[$typeSchema]; }}
+ {{? $coerceToTypes || $typeIsArray || $rulesGroup === true ||
+ ($rulesGroup && !$shouldUseGroup($rulesGroup)) }}
+ {{
+ var $schemaPath = it.schemaPath + '.type'
+ , $errSchemaPath = it.errSchemaPath + '/type';
+ }}
+ {{# def.checkType }}
+ {{? $coerceToTypes }}
+ {{# def.coerceType }}
+ {{??}}
+ {{# def.error:'type' }}
+ {{?}}
+ }
+ {{?}}
+{{?}}
+
+
+{{? it.schema.$ref && !$refKeywords }}
+ {{= it.RULES.all.$ref.code(it, '$ref') }}
+ {{? $breakOnError }}
+ }
+ if (errors === {{?$top}}0{{??}}errs_{{=$lvl}}{{?}}) {
+ {{ $closingBraces2 += '}'; }}
+ {{?}}
+{{??}}
+ {{? it.opts.v5 && it.schema.patternGroups }}
+ {{ it.logger.warn('keyword "patternGroups" is deprecated and disabled. Use option patternGroups: true to enable.'); }}
+ {{?}}
+ {{~ it.RULES:$rulesGroup }}
+ {{? $shouldUseGroup($rulesGroup) }}
+ {{? $rulesGroup.type }}
+ if ({{= it.util.checkDataType($rulesGroup.type, $data) }}) {
+ {{?}}
+ {{? it.opts.useDefaults && !it.compositeRule }}
+ {{? $rulesGroup.type == 'object' && it.schema.properties }}
+ {{# def.defaultProperties }}
+ {{?? $rulesGroup.type == 'array' && Array.isArray(it.schema.items) }}
+ {{# def.defaultItems }}
+ {{?}}
+ {{?}}
+ {{~ $rulesGroup.rules:$rule }}
+ {{? $shouldUseRule($rule) }}
+ {{ var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); }}
+ {{? $code }}
+ {{= $code }}
+ {{? $breakOnError }}
+ {{ $closingBraces1 += '}'; }}
+ {{?}}
+ {{?}}
+ {{?}}
+ {{~}}
+ {{? $breakOnError }}
+ {{= $closingBraces1 }}
+ {{ $closingBraces1 = ''; }}
+ {{?}}
+ {{? $rulesGroup.type }}
+ }
+ {{? $typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes }}
+ else {
+ {{
+ var $schemaPath = it.schemaPath + '.type'
+ , $errSchemaPath = it.errSchemaPath + '/type';
+ }}
+ {{# def.error:'type' }}
+ }
+ {{?}}
+ {{?}}
+
+ {{? $breakOnError }}
+ if (errors === {{?$top}}0{{??}}errs_{{=$lvl}}{{?}}) {
+ {{ $closingBraces2 += '}'; }}
+ {{?}}
+ {{?}}
+ {{~}}
+{{?}}
+
+{{? $breakOnError }} {{= $closingBraces2 }} {{?}}
+
+{{? $top }}
+ {{? $async }}
+ if (errors === 0) return data; {{ /* don't edit, used in replace */ }}
+ else throw new ValidationError(vErrors); {{ /* don't edit, used in replace */ }}
+ {{??}}
+ validate.errors = vErrors; {{ /* don't edit, used in replace */ }}
+ return errors === 0; {{ /* don't edit, used in replace */ }}
+ {{?}}
+ });
+
+ return validate;
+{{??}}
+ var {{=$valid}} = errors === errs_{{=$lvl}};
+{{?}}
+
+{{# def.cleanUp }}
+
+{{? $top }}
+ {{# def.finalCleanUp }}
+{{?}}
+
+{{
+ function $shouldUseGroup($rulesGroup) {
+ var rules = $rulesGroup.rules;
+ for (var i=0; i < rules.length; i++)
+ if ($shouldUseRule(rules[i]))
+ return true;
+ }
+
+ function $shouldUseRule($rule) {
+ return it.schema[$rule.keyword] !== undefined ||
+ ($rule.implements && $ruleImplementsSomeKeyword($rule));
+ }
+
+ function $ruleImplementsSomeKeyword($rule) {
+ var impl = $rule.implements;
+ for (var i=0; i < impl.length; i++)
+ if (it.schema[impl[i]] !== undefined)
+ return true;
+ }
+}}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/README.md b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/README.md
new file mode 100644
index 0000000000..4d994846c8
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/README.md
@@ -0,0 +1,3 @@
+These files are compiled dot templates from dot folder.
+
+Do NOT edit them directly, edit the templates and run `npm run build` from main ajv folder.
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/_limit.js b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/_limit.js
new file mode 100644
index 0000000000..10a187fb78
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/_limit.js
@@ -0,0 +1,149 @@
+'use strict';
+module.exports = function generate__limit(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $isMax = $keyword == 'maximum',
+ $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum',
+ $schemaExcl = it.schema[$exclusiveKeyword],
+ $isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data,
+ $op = $isMax ? '<' : '>',
+ $notOp = $isMax ? '>' : '<',
+ $errorKeyword = undefined;
+ if ($isDataExcl) {
+ var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr),
+ $exclusive = 'exclusive' + $lvl,
+ $exclType = 'exclType' + $lvl,
+ $exclIsNumber = 'exclIsNumber' + $lvl,
+ $opExpr = 'op' + $lvl,
+ $opStr = '\' + ' + $opExpr + ' + \'';
+ out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; ';
+ $schemaValueExcl = 'schemaExcl' + $lvl;
+ out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \'boolean\' && ' + ($exclType) + ' != \'undefined\' && ' + ($exclType) + ' != \'number\') { ';
+ var $errorKeyword = $exclusiveKeyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } else if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+ }
+ out += ' ' + ($exclType) + ' == \'number\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\';';
+ } else {
+ var $exclIsNumber = typeof $schemaExcl == 'number',
+ $opStr = $op;
+ if ($exclIsNumber && $isData) {
+ var $opExpr = '\'' + $opStr + '\'';
+ out += ' if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+ }
+ out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { ';
+ } else {
+ if ($exclIsNumber && $schema === undefined) {
+ $exclusive = true;
+ $errorKeyword = $exclusiveKeyword;
+ $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;
+ $schemaValue = $schemaExcl;
+ $notOp += '=';
+ } else {
+ if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema);
+ if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) {
+ $exclusive = true;
+ $errorKeyword = $exclusiveKeyword;
+ $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;
+ $notOp += '=';
+ } else {
+ $exclusive = false;
+ $opStr += '=';
+ }
+ }
+ var $opExpr = '\'' + $opStr + '\'';
+ out += ' if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+ }
+ out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { ';
+ }
+ }
+ $errorKeyword = $errorKeyword || $keyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '_limit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be ' + ($opStr) + ' ';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue);
+ } else {
+ out += '' + ($schemaValue) + '\'';
+ }
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/_limitItems.js b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/_limitItems.js
new file mode 100644
index 0000000000..16e37f214e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/_limitItems.js
@@ -0,0 +1,76 @@
+'use strict';
+module.exports = function generate__limitItems(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $op = $keyword == 'maxItems' ? '>' : '<';
+ out += 'if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+ }
+ out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { ';
+ var $errorKeyword = $keyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '_limitItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT have ';
+ if ($keyword == 'maxItems') {
+ out += 'more';
+ } else {
+ out += 'less';
+ }
+ out += ' than ';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue) + ' + \'';
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' items\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += '} ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/_limitLength.js b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/_limitLength.js
new file mode 100644
index 0000000000..e6927f39c6
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/_limitLength.js
@@ -0,0 +1,81 @@
+'use strict';
+module.exports = function generate__limitLength(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $op = $keyword == 'maxLength' ? '>' : '<';
+ out += 'if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+ }
+ if (it.opts.unicode === false) {
+ out += ' ' + ($data) + '.length ';
+ } else {
+ out += ' ucs2length(' + ($data) + ') ';
+ }
+ out += ' ' + ($op) + ' ' + ($schemaValue) + ') { ';
+ var $errorKeyword = $keyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '_limitLength') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT be ';
+ if ($keyword == 'maxLength') {
+ out += 'longer';
+ } else {
+ out += 'shorter';
+ }
+ out += ' than ';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue) + ' + \'';
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' characters\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += '} ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/_limitProperties.js b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/_limitProperties.js
new file mode 100644
index 0000000000..a48308f8ac
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/_limitProperties.js
@@ -0,0 +1,76 @@
+'use strict';
+module.exports = function generate__limitProperties(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $op = $keyword == 'maxProperties' ? '>' : '<';
+ out += 'if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+ }
+ out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { ';
+ var $errorKeyword = $keyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '_limitProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT have ';
+ if ($keyword == 'maxProperties') {
+ out += 'more';
+ } else {
+ out += 'less';
+ }
+ out += ' than ';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue) + ' + \'';
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' properties\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += '} ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/allOf.js b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/allOf.js
new file mode 100644
index 0000000000..5107b18cfc
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/allOf.js
@@ -0,0 +1,43 @@
+'use strict';
+module.exports = function generate_allOf(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ var $currentBaseId = $it.baseId,
+ $allSchemasEmpty = true;
+ var arr1 = $schema;
+ if (arr1) {
+ var $sch, $i = -1,
+ l1 = arr1.length - 1;
+ while ($i < l1) {
+ $sch = arr1[$i += 1];
+ if (it.util.schemaHasRules($sch, it.RULES.all)) {
+ $allSchemasEmpty = false;
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + '[' + $i + ']';
+ $it.errSchemaPath = $errSchemaPath + '/' + $i;
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ }
+ }
+ if ($breakOnError) {
+ if ($allSchemasEmpty) {
+ out += ' if (true) { ';
+ } else {
+ out += ' ' + ($closingBraces.slice(0, -1)) + ' ';
+ }
+ }
+ out = it.util.cleanUpCode(out);
+ return out;
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/anyOf.js b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/anyOf.js
new file mode 100644
index 0000000000..994b091230
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/anyOf.js
@@ -0,0 +1,73 @@
+'use strict';
+module.exports = function generate_anyOf(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ var $noEmptySchema = $schema.every(function($sch) {
+ return it.util.schemaHasRules($sch, it.RULES.all);
+ });
+ if ($noEmptySchema) {
+ var $currentBaseId = $it.baseId;
+ out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; ';
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ var arr1 = $schema;
+ if (arr1) {
+ var $sch, $i = -1,
+ l1 = arr1.length - 1;
+ while ($i < l1) {
+ $sch = arr1[$i += 1];
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + '[' + $i + ']';
+ $it.errSchemaPath = $errSchemaPath + '/' + $i;
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ out += ' ' + ($valid) + ' = ' + ($valid) + ' || ' + ($nextValid) + '; if (!' + ($valid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should match some schema in anyOf\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError(vErrors); ';
+ } else {
+ out += ' validate.errors = vErrors; return false; ';
+ }
+ }
+ out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';
+ if (it.opts.allErrors) {
+ out += ' } ';
+ }
+ out = it.util.cleanUpCode(out);
+ } else {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ }
+ return out;
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/const.js b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/const.js
new file mode 100644
index 0000000000..d19756e145
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/const.js
@@ -0,0 +1,55 @@
+'use strict';
+module.exports = function generate_const(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ if (!$isData) {
+ out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';';
+ }
+ out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be equal to constant\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' }';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/contains.js b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/contains.js
new file mode 100644
index 0000000000..04c6e936f7
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/contains.js
@@ -0,0 +1,81 @@
+'use strict';
+module.exports = function generate_contains(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ var $idx = 'i' + $lvl,
+ $dataNxt = $it.dataLevel = it.dataLevel + 1,
+ $nextData = 'data' + $dataNxt,
+ $currentBaseId = it.baseId,
+ $nonEmptySchema = it.util.schemaHasRules($schema, it.RULES.all);
+ out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';
+ if ($nonEmptySchema) {
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { ';
+ $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);
+ var $passData = $data + '[' + $idx + ']';
+ $it.dataPathArr[$dataNxt] = $idx;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ out += ' if (' + ($nextValid) + ') break; } ';
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {';
+ } else {
+ out += ' if (' + ($data) + '.length == 0) {';
+ }
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('contains') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should contain a valid item\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } else { ';
+ if ($nonEmptySchema) {
+ out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';
+ }
+ if (it.opts.allErrors) {
+ out += ' } ';
+ }
+ out = it.util.cleanUpCode(out);
+ return out;
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/custom.js b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/custom.js
new file mode 100644
index 0000000000..bff06d111c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/custom.js
@@ -0,0 +1,226 @@
+'use strict';
+module.exports = function generate_custom(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $rule = this,
+ $definition = 'definition' + $lvl,
+ $rDef = $rule.definition,
+ $closingBraces = '';
+ var $compile, $inline, $macro, $ruleValidate, $validateCode;
+ if ($isData && $rDef.$data) {
+ $validateCode = 'keywordValidate' + $lvl;
+ var $validateSchema = $rDef.validateSchema;
+ out += ' var ' + ($definition) + ' = RULES.custom[\'' + ($keyword) + '\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;';
+ } else {
+ $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it);
+ if (!$ruleValidate) return;
+ $schemaValue = 'validate.schema' + $schemaPath;
+ $validateCode = $ruleValidate.code;
+ $compile = $rDef.compile;
+ $inline = $rDef.inline;
+ $macro = $rDef.macro;
+ }
+ var $ruleErrs = $validateCode + '.errors',
+ $i = 'i' + $lvl,
+ $ruleErr = 'ruleErr' + $lvl,
+ $asyncKeyword = $rDef.async;
+ if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema');
+ if (!($inline || $macro)) {
+ out += '' + ($ruleErrs) + ' = null;';
+ }
+ out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';
+ if ($isData && $rDef.$data) {
+ $closingBraces += '}';
+ out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { ';
+ if ($validateSchema) {
+ $closingBraces += '}';
+ out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') { ';
+ }
+ }
+ if ($inline) {
+ if ($rDef.statements) {
+ out += ' ' + ($ruleValidate.validate) + ' ';
+ } else {
+ out += ' ' + ($valid) + ' = ' + ($ruleValidate.validate) + '; ';
+ }
+ } else if ($macro) {
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ $it.schema = $ruleValidate.validate;
+ $it.schemaPath = '';
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ var $code = it.validate($it).replace(/validate\.schema/g, $validateCode);
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += ' ' + ($code);
+ } else {
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = '';
+ out += ' ' + ($validateCode) + '.call( ';
+ if (it.opts.passContext) {
+ out += 'this';
+ } else {
+ out += 'self';
+ }
+ if ($compile || $rDef.schema === false) {
+ out += ' , ' + ($data) + ' ';
+ } else {
+ out += ' , ' + ($schemaValue) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' ';
+ }
+ out += ' , (dataPath || \'\')';
+ if (it.errorPath != '""') {
+ out += ' + ' + (it.errorPath);
+ }
+ var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData',
+ $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty';
+ out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ' , rootData ) ';
+ var def_callRuleValidate = out;
+ out = $$outStack.pop();
+ if ($rDef.errors === false) {
+ out += ' ' + ($valid) + ' = ';
+ if ($asyncKeyword) {
+ out += '' + (it.yieldAwait);
+ }
+ out += '' + (def_callRuleValidate) + '; ';
+ } else {
+ if ($asyncKeyword) {
+ $ruleErrs = 'customErrors' + $lvl;
+ out += ' var ' + ($ruleErrs) + ' = null; try { ' + ($valid) + ' = ' + (it.yieldAwait) + (def_callRuleValidate) + '; } catch (e) { ' + ($valid) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } ';
+ } else {
+ out += ' ' + ($ruleErrs) + ' = null; ' + ($valid) + ' = ' + (def_callRuleValidate) + '; ';
+ }
+ }
+ }
+ if ($rDef.modifying) {
+ out += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];';
+ }
+ out += '' + ($closingBraces);
+ if ($rDef.valid) {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ } else {
+ out += ' if ( ';
+ if ($rDef.valid === undefined) {
+ out += ' !';
+ if ($macro) {
+ out += '' + ($nextValid);
+ } else {
+ out += '' + ($valid);
+ }
+ } else {
+ out += ' ' + (!$rDef.valid) + ' ';
+ }
+ out += ') { ';
+ $errorKeyword = $rule.keyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = '';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ var def_customError = out;
+ out = $$outStack.pop();
+ if ($inline) {
+ if ($rDef.errors) {
+ if ($rDef.errors != 'full') {
+ out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '<errors; ' + ($i) + '++) { var ' + ($ruleErr) + ' = vErrors[' + ($i) + ']; if (' + ($ruleErr) + '.dataPath === undefined) ' + ($ruleErr) + '.dataPath = (dataPath || \'\') + ' + (it.errorPath) + '; if (' + ($ruleErr) + '.schemaPath === undefined) { ' + ($ruleErr) + '.schemaPath = "' + ($errSchemaPath) + '"; } ';
+ if (it.opts.verbose) {
+ out += ' ' + ($ruleErr) + '.schema = ' + ($schemaValue) + '; ' + ($ruleErr) + '.data = ' + ($data) + '; ';
+ }
+ out += ' } ';
+ }
+ } else {
+ if ($rDef.errors === false) {
+ out += ' ' + (def_customError) + ' ';
+ } else {
+ out += ' if (' + ($errs) + ' == errors) { ' + (def_customError) + ' } else { for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '<errors; ' + ($i) + '++) { var ' + ($ruleErr) + ' = vErrors[' + ($i) + ']; if (' + ($ruleErr) + '.dataPath === undefined) ' + ($ruleErr) + '.dataPath = (dataPath || \'\') + ' + (it.errorPath) + '; if (' + ($ruleErr) + '.schemaPath === undefined) { ' + ($ruleErr) + '.schemaPath = "' + ($errSchemaPath) + '"; } ';
+ if (it.opts.verbose) {
+ out += ' ' + ($ruleErr) + '.schema = ' + ($schemaValue) + '; ' + ($ruleErr) + '.data = ' + ($data) + '; ';
+ }
+ out += ' } } ';
+ }
+ }
+ } else if ($macro) {
+ out += ' var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError(vErrors); ';
+ } else {
+ out += ' validate.errors = vErrors; return false; ';
+ }
+ }
+ } else {
+ if ($rDef.errors === false) {
+ out += ' ' + (def_customError) + ' ';
+ } else {
+ out += ' if (Array.isArray(' + ($ruleErrs) + ')) { if (vErrors === null) vErrors = ' + ($ruleErrs) + '; else vErrors = vErrors.concat(' + ($ruleErrs) + '); errors = vErrors.length; for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '<errors; ' + ($i) + '++) { var ' + ($ruleErr) + ' = vErrors[' + ($i) + ']; if (' + ($ruleErr) + '.dataPath === undefined) ' + ($ruleErr) + '.dataPath = (dataPath || \'\') + ' + (it.errorPath) + '; ' + ($ruleErr) + '.schemaPath = "' + ($errSchemaPath) + '"; ';
+ if (it.opts.verbose) {
+ out += ' ' + ($ruleErr) + '.schema = ' + ($schemaValue) + '; ' + ($ruleErr) + '.data = ' + ($data) + '; ';
+ }
+ out += ' } } else { ' + (def_customError) + ' } ';
+ }
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ }
+ return out;
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/dependencies.js b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/dependencies.js
new file mode 100644
index 0000000000..58814c6129
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/dependencies.js
@@ -0,0 +1,167 @@
+'use strict';
+module.exports = function generate_dependencies(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ var $schemaDeps = {},
+ $propertyDeps = {},
+ $ownProperties = it.opts.ownProperties;
+ for ($property in $schema) {
+ var $sch = $schema[$property];
+ var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps;
+ $deps[$property] = $sch;
+ }
+ out += 'var ' + ($errs) + ' = errors;';
+ var $currentErrorPath = it.errorPath;
+ out += 'var missing' + ($lvl) + ';';
+ for (var $property in $propertyDeps) {
+ $deps = $propertyDeps[$property];
+ if ($deps.length) {
+ out += ' if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined ';
+ if ($ownProperties) {
+ out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') ';
+ }
+ if ($breakOnError) {
+ out += ' && ( ';
+ var arr1 = $deps;
+ if (arr1) {
+ var $propertyKey, $i = -1,
+ l1 = arr1.length - 1;
+ while ($i < l1) {
+ $propertyKey = arr1[$i += 1];
+ if ($i) {
+ out += ' || ';
+ }
+ var $prop = it.util.getProperty($propertyKey),
+ $useData = $data + $prop;
+ out += ' ( ( ' + ($useData) + ' === undefined ';
+ if ($ownProperties) {
+ out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ }
+ out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) ';
+ }
+ }
+ out += ')) { ';
+ var $propertyPath = 'missing' + $lvl,
+ $missingProperty = '\' + ' + $propertyPath + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath;
+ }
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should have ';
+ if ($deps.length == 1) {
+ out += 'property ' + (it.util.escapeQuotes($deps[0]));
+ } else {
+ out += 'properties ' + (it.util.escapeQuotes($deps.join(", ")));
+ }
+ out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ } else {
+ out += ' ) { ';
+ var arr2 = $deps;
+ if (arr2) {
+ var $propertyKey, i2 = -1,
+ l2 = arr2.length - 1;
+ while (i2 < l2) {
+ $propertyKey = arr2[i2 += 1];
+ var $prop = it.util.getProperty($propertyKey),
+ $missingProperty = it.util.escapeQuotes($propertyKey),
+ $useData = $data + $prop;
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
+ }
+ out += ' if ( ' + ($useData) + ' === undefined ';
+ if ($ownProperties) {
+ out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ }
+ out += ') { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should have ';
+ if ($deps.length == 1) {
+ out += 'property ' + (it.util.escapeQuotes($deps[0]));
+ } else {
+ out += 'properties ' + (it.util.escapeQuotes($deps.join(", ")));
+ }
+ out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ';
+ }
+ }
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ $closingBraces += '}';
+ out += ' else { ';
+ }
+ }
+ }
+ it.errorPath = $currentErrorPath;
+ var $currentBaseId = $it.baseId;
+ for (var $property in $schemaDeps) {
+ var $sch = $schemaDeps[$property];
+ if (it.util.schemaHasRules($sch, it.RULES.all)) {
+ out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined ';
+ if ($ownProperties) {
+ out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') ';
+ }
+ out += ') { ';
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + it.util.getProperty($property);
+ $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property);
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
+ }
+ out = it.util.cleanUpCode(out);
+ return out;
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/enum.js b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/enum.js
new file mode 100644
index 0000000000..03f3a8caae
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/enum.js
@@ -0,0 +1,65 @@
+'use strict';
+module.exports = function generate_enum(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $i = 'i' + $lvl,
+ $vSchema = 'schema' + $lvl;
+ if (!$isData) {
+ out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + ';';
+ }
+ out += 'var ' + ($valid) + ';';
+ if ($isData) {
+ out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {';
+ }
+ out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + '<' + ($vSchema) + '.length; ' + ($i) + '++) if (equal(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + '])) { ' + ($valid) + ' = true; break; }';
+ if ($isData) {
+ out += ' } ';
+ }
+ out += ' if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('enum') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValues: schema' + ($lvl) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be equal to one of the allowed values\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' }';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/format.js b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/format.js
new file mode 100644
index 0000000000..68697f0deb
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/format.js
@@ -0,0 +1,149 @@
+'use strict';
+module.exports = function generate_format(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ if (it.opts.format === false) {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ return out;
+ }
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $unknownFormats = it.opts.unknownFormats,
+ $allowUnknown = Array.isArray($unknownFormats);
+ if ($isData) {
+ var $format = 'format' + $lvl,
+ $isObject = 'isObject' + $lvl,
+ $formatType = 'formatType' + $lvl;
+ out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var ' + ($isObject) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; var ' + ($formatType) + ' = ' + ($isObject) + ' && ' + ($format) + '.type || \'string\'; if (' + ($isObject) + ') { ';
+ if (it.async) {
+ out += ' var async' + ($lvl) + ' = ' + ($format) + '.async; ';
+ }
+ out += ' ' + ($format) + ' = ' + ($format) + '.validate; } if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || ';
+ }
+ out += ' (';
+ if ($unknownFormats != 'ignore') {
+ out += ' (' + ($schemaValue) + ' && !' + ($format) + ' ';
+ if ($allowUnknown) {
+ out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 ';
+ }
+ out += ') || ';
+ }
+ out += ' (' + ($format) + ' && ' + ($formatType) + ' == \'' + ($ruleType) + '\' && !(typeof ' + ($format) + ' == \'function\' ? ';
+ if (it.async) {
+ out += ' (async' + ($lvl) + ' ? ' + (it.yieldAwait) + ' ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) ';
+ } else {
+ out += ' ' + ($format) + '(' + ($data) + ') ';
+ }
+ out += ' : ' + ($format) + '.test(' + ($data) + '))))) {';
+ } else {
+ var $format = it.formats[$schema];
+ if (!$format) {
+ if ($unknownFormats == 'ignore') {
+ it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"');
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ return out;
+ } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ return out;
+ } else {
+ throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"');
+ }
+ }
+ var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate;
+ var $formatType = $isObject && $format.type || 'string';
+ if ($isObject) {
+ var $async = $format.async === true;
+ $format = $format.validate;
+ }
+ if ($formatType != $ruleType) {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ return out;
+ }
+ if ($async) {
+ if (!it.async) throw new Error('async format in sync schema');
+ var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate';
+ out += ' if (!(' + (it.yieldAwait) + ' ' + ($formatRef) + '(' + ($data) + '))) { ';
+ } else {
+ out += ' if (! ';
+ var $formatRef = 'formats' + it.util.getProperty($schema);
+ if ($isObject) $formatRef += '.validate';
+ if (typeof $format == 'function') {
+ out += ' ' + ($formatRef) + '(' + ($data) + ') ';
+ } else {
+ out += ' ' + ($formatRef) + '.test(' + ($data) + ') ';
+ }
+ out += ') { ';
+ }
+ }
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: ';
+ if ($isData) {
+ out += '' + ($schemaValue);
+ } else {
+ out += '' + (it.util.toQuotedString($schema));
+ }
+ out += ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should match format "';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue) + ' + \'';
+ } else {
+ out += '' + (it.util.escapeQuotes($schema));
+ }
+ out += '"\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + (it.util.toQuotedString($schema));
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/items.js b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/items.js
new file mode 100644
index 0000000000..77be5e214a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/items.js
@@ -0,0 +1,140 @@
+'use strict';
+module.exports = function generate_items(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ var $idx = 'i' + $lvl,
+ $dataNxt = $it.dataLevel = it.dataLevel + 1,
+ $nextData = 'data' + $dataNxt,
+ $currentBaseId = it.baseId;
+ out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';
+ if (Array.isArray($schema)) {
+ var $additionalItems = it.schema.additionalItems;
+ if ($additionalItems === false) {
+ out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; ';
+ var $currErrSchemaPath = $errSchemaPath;
+ $errSchemaPath = it.errSchemaPath + '/additionalItems';
+ out += ' if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('additionalItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT have more than ' + ($schema.length) + ' items\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ $errSchemaPath = $currErrSchemaPath;
+ if ($breakOnError) {
+ $closingBraces += '}';
+ out += ' else { ';
+ }
+ }
+ var arr1 = $schema;
+ if (arr1) {
+ var $sch, $i = -1,
+ l1 = arr1.length - 1;
+ while ($i < l1) {
+ $sch = arr1[$i += 1];
+ if (it.util.schemaHasRules($sch, it.RULES.all)) {
+ out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { ';
+ var $passData = $data + '[' + $i + ']';
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + '[' + $i + ']';
+ $it.errSchemaPath = $errSchemaPath + '/' + $i;
+ $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true);
+ $it.dataPathArr[$dataNxt] = $i;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ }
+ }
+ if (typeof $additionalItems == 'object' && it.util.schemaHasRules($additionalItems, it.RULES.all)) {
+ $it.schema = $additionalItems;
+ $it.schemaPath = it.schemaPath + '.additionalItems';
+ $it.errSchemaPath = it.errSchemaPath + '/additionalItems';
+ out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var ' + ($idx) + ' = ' + ($schema.length) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { ';
+ $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);
+ var $passData = $data + '[' + $idx + ']';
+ $it.dataPathArr[$dataNxt] = $idx;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ if ($breakOnError) {
+ out += ' if (!' + ($nextValid) + ') break; ';
+ }
+ out += ' } } ';
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ } else if (it.util.schemaHasRules($schema, it.RULES.all)) {
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ out += ' for (var ' + ($idx) + ' = ' + (0) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { ';
+ $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);
+ var $passData = $data + '[' + $idx + ']';
+ $it.dataPathArr[$dataNxt] = $idx;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ if ($breakOnError) {
+ out += ' if (!' + ($nextValid) + ') break; ';
+ }
+ out += ' }';
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
+ }
+ out = it.util.cleanUpCode(out);
+ return out;
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/multipleOf.js b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/multipleOf.js
new file mode 100644
index 0000000000..df5a315444
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/multipleOf.js
@@ -0,0 +1,76 @@
+'use strict';
+module.exports = function generate_multipleOf(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ out += 'var division' + ($lvl) + ';if (';
+ if ($isData) {
+ out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \'number\' || ';
+ }
+ out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', ';
+ if (it.opts.multipleOfPrecision) {
+ out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' ';
+ } else {
+ out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') ';
+ }
+ out += ' ) ';
+ if ($isData) {
+ out += ' ) ';
+ }
+ out += ' ) { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('multipleOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be multiple of ';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue);
+ } else {
+ out += '' + ($schemaValue) + '\'';
+ }
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += '} ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/not.js b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/not.js
new file mode 100644
index 0000000000..67add9f672
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/not.js
@@ -0,0 +1,83 @@
+'use strict';
+module.exports = function generate_not(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ if (it.util.schemaHasRules($schema, it.RULES.all)) {
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ out += ' var ' + ($errs) + ' = errors; ';
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ $it.createErrors = false;
+ var $allErrorsOption;
+ if ($it.opts.allErrors) {
+ $allErrorsOption = $it.opts.allErrors;
+ $it.opts.allErrors = false;
+ }
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.createErrors = true;
+ if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption;
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += ' if (' + ($nextValid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT be valid\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';
+ if (it.opts.allErrors) {
+ out += ' } ';
+ }
+ } else {
+ out += ' var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT be valid\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ if ($breakOnError) {
+ out += ' if (false) { ';
+ }
+ }
+ return out;
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/oneOf.js b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/oneOf.js
new file mode 100644
index 0000000000..b4cd46065b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/oneOf.js
@@ -0,0 +1,70 @@
+'use strict';
+module.exports = function generate_oneOf(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ out += 'var ' + ($errs) + ' = errors;var prevValid' + ($lvl) + ' = false;var ' + ($valid) + ' = false;';
+ var $currentBaseId = $it.baseId;
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ var arr1 = $schema;
+ if (arr1) {
+ var $sch, $i = -1,
+ l1 = arr1.length - 1;
+ while ($i < l1) {
+ $sch = arr1[$i += 1];
+ if (it.util.schemaHasRules($sch, it.RULES.all)) {
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + '[' + $i + ']';
+ $it.errSchemaPath = $errSchemaPath + '/' + $i;
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ } else {
+ out += ' var ' + ($nextValid) + ' = true; ';
+ }
+ if ($i) {
+ out += ' if (' + ($nextValid) + ' && prevValid' + ($lvl) + ') ' + ($valid) + ' = false; else { ';
+ $closingBraces += '}';
+ }
+ out += ' if (' + ($nextValid) + ') ' + ($valid) + ' = prevValid' + ($lvl) + ' = true;';
+ }
+ }
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should match exactly one schema in oneOf\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError(vErrors); ';
+ } else {
+ out += ' validate.errors = vErrors; return false; ';
+ }
+ }
+ out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }';
+ if (it.opts.allErrors) {
+ out += ' } ';
+ }
+ return out;
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/pattern.js b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/pattern.js
new file mode 100644
index 0000000000..76b7794e0e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/pattern.js
@@ -0,0 +1,74 @@
+'use strict';
+module.exports = function generate_pattern(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema);
+ out += 'if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || ';
+ }
+ out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('pattern') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { pattern: ';
+ if ($isData) {
+ out += '' + ($schemaValue);
+ } else {
+ out += '' + (it.util.toQuotedString($schema));
+ }
+ out += ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should match pattern "';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue) + ' + \'';
+ } else {
+ out += '' + (it.util.escapeQuotes($schema));
+ }
+ out += '"\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + (it.util.toQuotedString($schema));
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += '} ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/properties.js b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/properties.js
new file mode 100644
index 0000000000..3c6cecf63f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/properties.js
@@ -0,0 +1,468 @@
+'use strict';
+module.exports = function generate_properties(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ var $key = 'key' + $lvl,
+ $idx = 'idx' + $lvl,
+ $dataNxt = $it.dataLevel = it.dataLevel + 1,
+ $nextData = 'data' + $dataNxt,
+ $dataProperties = 'dataProperties' + $lvl;
+ var $schemaKeys = Object.keys($schema || {}),
+ $pProperties = it.schema.patternProperties || {},
+ $pPropertyKeys = Object.keys($pProperties),
+ $aProperties = it.schema.additionalProperties,
+ $someProperties = $schemaKeys.length || $pPropertyKeys.length,
+ $noAdditional = $aProperties === false,
+ $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length,
+ $removeAdditional = it.opts.removeAdditional,
+ $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional,
+ $ownProperties = it.opts.ownProperties,
+ $currentBaseId = it.baseId;
+ var $required = it.schema.required;
+ if ($required && !(it.opts.v5 && $required.$data) && $required.length < it.opts.loopRequired) var $requiredHash = it.util.toHash($required);
+ if (it.opts.patternGroups) {
+ var $pgProperties = it.schema.patternGroups || {},
+ $pgPropertyKeys = Object.keys($pgProperties);
+ }
+ out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;';
+ if ($ownProperties) {
+ out += ' var ' + ($dataProperties) + ' = undefined;';
+ }
+ if ($checkAdditional) {
+ if ($ownProperties) {
+ out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';
+ } else {
+ out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
+ }
+ if ($someProperties) {
+ out += ' var isAdditional' + ($lvl) + ' = !(false ';
+ if ($schemaKeys.length) {
+ if ($schemaKeys.length > 5) {
+ out += ' || validate.schema' + ($schemaPath) + '[' + ($key) + '] ';
+ } else {
+ var arr1 = $schemaKeys;
+ if (arr1) {
+ var $propertyKey, i1 = -1,
+ l1 = arr1.length - 1;
+ while (i1 < l1) {
+ $propertyKey = arr1[i1 += 1];
+ out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' ';
+ }
+ }
+ }
+ }
+ if ($pPropertyKeys.length) {
+ var arr2 = $pPropertyKeys;
+ if (arr2) {
+ var $pProperty, $i = -1,
+ l2 = arr2.length - 1;
+ while ($i < l2) {
+ $pProperty = arr2[$i += 1];
+ out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') ';
+ }
+ }
+ }
+ if (it.opts.patternGroups && $pgPropertyKeys.length) {
+ var arr3 = $pgPropertyKeys;
+ if (arr3) {
+ var $pgProperty, $i = -1,
+ l3 = arr3.length - 1;
+ while ($i < l3) {
+ $pgProperty = arr3[$i += 1];
+ out += ' || ' + (it.usePattern($pgProperty)) + '.test(' + ($key) + ') ';
+ }
+ }
+ }
+ out += ' ); if (isAdditional' + ($lvl) + ') { ';
+ }
+ if ($removeAdditional == 'all') {
+ out += ' delete ' + ($data) + '[' + ($key) + ']; ';
+ } else {
+ var $currentErrorPath = it.errorPath;
+ var $additionalProperty = '\' + ' + $key + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
+ }
+ if ($noAdditional) {
+ if ($removeAdditional) {
+ out += ' delete ' + ($data) + '[' + ($key) + ']; ';
+ } else {
+ out += ' ' + ($nextValid) + ' = false; ';
+ var $currErrSchemaPath = $errSchemaPath;
+ $errSchemaPath = it.errSchemaPath + '/additionalProperties';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('additionalProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \'' + ($additionalProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT have additional properties\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ $errSchemaPath = $currErrSchemaPath;
+ if ($breakOnError) {
+ out += ' break; ';
+ }
+ }
+ } else if ($additionalIsSchema) {
+ if ($removeAdditional == 'failing') {
+ out += ' var ' + ($errs) + ' = errors; ';
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ $it.schema = $aProperties;
+ $it.schemaPath = it.schemaPath + '.additionalProperties';
+ $it.errSchemaPath = it.errSchemaPath + '/additionalProperties';
+ $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
+ var $passData = $data + '[' + $key + ']';
+ $it.dataPathArr[$dataNxt] = $key;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ out += ' if (!' + ($nextValid) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } ';
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ } else {
+ $it.schema = $aProperties;
+ $it.schemaPath = it.schemaPath + '.additionalProperties';
+ $it.errSchemaPath = it.errSchemaPath + '/additionalProperties';
+ $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
+ var $passData = $data + '[' + $key + ']';
+ $it.dataPathArr[$dataNxt] = $key;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ if ($breakOnError) {
+ out += ' if (!' + ($nextValid) + ') break; ';
+ }
+ }
+ }
+ it.errorPath = $currentErrorPath;
+ }
+ if ($someProperties) {
+ out += ' } ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ var $useDefaults = it.opts.useDefaults && !it.compositeRule;
+ if ($schemaKeys.length) {
+ var arr4 = $schemaKeys;
+ if (arr4) {
+ var $propertyKey, i4 = -1,
+ l4 = arr4.length - 1;
+ while (i4 < l4) {
+ $propertyKey = arr4[i4 += 1];
+ var $sch = $schema[$propertyKey];
+ if (it.util.schemaHasRules($sch, it.RULES.all)) {
+ var $prop = it.util.getProperty($propertyKey),
+ $passData = $data + $prop,
+ $hasDefault = $useDefaults && $sch.default !== undefined;
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + $prop;
+ $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey);
+ $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers);
+ $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey);
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ $code = it.util.varReplace($code, $nextData, $passData);
+ var $useData = $passData;
+ } else {
+ var $useData = $nextData;
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ';
+ }
+ if ($hasDefault) {
+ out += ' ' + ($code) + ' ';
+ } else {
+ if ($requiredHash && $requiredHash[$propertyKey]) {
+ out += ' if ( ' + ($useData) + ' === undefined ';
+ if ($ownProperties) {
+ out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ }
+ out += ') { ' + ($nextValid) + ' = false; ';
+ var $currentErrorPath = it.errorPath,
+ $currErrSchemaPath = $errSchemaPath,
+ $missingProperty = it.util.escapeQuotes($propertyKey);
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
+ }
+ $errSchemaPath = it.errSchemaPath + '/required';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is a required property';
+ } else {
+ out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ $errSchemaPath = $currErrSchemaPath;
+ it.errorPath = $currentErrorPath;
+ out += ' } else { ';
+ } else {
+ if ($breakOnError) {
+ out += ' if ( ' + ($useData) + ' === undefined ';
+ if ($ownProperties) {
+ out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ }
+ out += ') { ' + ($nextValid) + ' = true; } else { ';
+ } else {
+ out += ' if (' + ($useData) + ' !== undefined ';
+ if ($ownProperties) {
+ out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ }
+ out += ' ) { ';
+ }
+ }
+ out += ' ' + ($code) + ' } ';
+ }
+ }
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ }
+ }
+ if ($pPropertyKeys.length) {
+ var arr5 = $pPropertyKeys;
+ if (arr5) {
+ var $pProperty, i5 = -1,
+ l5 = arr5.length - 1;
+ while (i5 < l5) {
+ $pProperty = arr5[i5 += 1];
+ var $sch = $pProperties[$pProperty];
+ if (it.util.schemaHasRules($sch, it.RULES.all)) {
+ $it.schema = $sch;
+ $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty);
+ $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty);
+ if ($ownProperties) {
+ out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';
+ } else {
+ out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
+ }
+ out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { ';
+ $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
+ var $passData = $data + '[' + $key + ']';
+ $it.dataPathArr[$dataNxt] = $key;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ if ($breakOnError) {
+ out += ' if (!' + ($nextValid) + ') break; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else ' + ($nextValid) + ' = true; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ }
+ }
+ }
+ if (it.opts.patternGroups && $pgPropertyKeys.length) {
+ var arr6 = $pgPropertyKeys;
+ if (arr6) {
+ var $pgProperty, i6 = -1,
+ l6 = arr6.length - 1;
+ while (i6 < l6) {
+ $pgProperty = arr6[i6 += 1];
+ var $pgSchema = $pgProperties[$pgProperty],
+ $sch = $pgSchema.schema;
+ if (it.util.schemaHasRules($sch, it.RULES.all)) {
+ $it.schema = $sch;
+ $it.schemaPath = it.schemaPath + '.patternGroups' + it.util.getProperty($pgProperty) + '.schema';
+ $it.errSchemaPath = it.errSchemaPath + '/patternGroups/' + it.util.escapeFragment($pgProperty) + '/schema';
+ out += ' var pgPropCount' + ($lvl) + ' = 0; ';
+ if ($ownProperties) {
+ out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';
+ } else {
+ out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
+ }
+ out += ' if (' + (it.usePattern($pgProperty)) + '.test(' + ($key) + ')) { pgPropCount' + ($lvl) + '++; ';
+ $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
+ var $passData = $data + '[' + $key + ']';
+ $it.dataPathArr[$dataNxt] = $key;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ if ($breakOnError) {
+ out += ' if (!' + ($nextValid) + ') break; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else ' + ($nextValid) + ' = true; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $closingBraces += '}';
+ }
+ var $pgMin = $pgSchema.minimum,
+ $pgMax = $pgSchema.maximum;
+ if ($pgMin !== undefined || $pgMax !== undefined) {
+ out += ' var ' + ($valid) + ' = true; ';
+ var $currErrSchemaPath = $errSchemaPath;
+ if ($pgMin !== undefined) {
+ var $limit = $pgMin,
+ $reason = 'minimum',
+ $moreOrLess = 'less';
+ out += ' ' + ($valid) + ' = pgPropCount' + ($lvl) + ' >= ' + ($pgMin) + '; ';
+ $errSchemaPath = it.errSchemaPath + '/patternGroups/minimum';
+ out += ' if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('patternGroups') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { reason: \'' + ($reason) + '\', limit: ' + ($limit) + ', pattern: \'' + (it.util.escapeQuotes($pgProperty)) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT have ' + ($moreOrLess) + ' than ' + ($limit) + ' properties matching pattern "' + (it.util.escapeQuotes($pgProperty)) + '"\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ if ($pgMax !== undefined) {
+ out += ' else ';
+ }
+ }
+ if ($pgMax !== undefined) {
+ var $limit = $pgMax,
+ $reason = 'maximum',
+ $moreOrLess = 'more';
+ out += ' ' + ($valid) + ' = pgPropCount' + ($lvl) + ' <= ' + ($pgMax) + '; ';
+ $errSchemaPath = it.errSchemaPath + '/patternGroups/maximum';
+ out += ' if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('patternGroups') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { reason: \'' + ($reason) + '\', limit: ' + ($limit) + ', pattern: \'' + (it.util.escapeQuotes($pgProperty)) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT have ' + ($moreOrLess) + ' than ' + ($limit) + ' properties matching pattern "' + (it.util.escapeQuotes($pgProperty)) + '"\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ }
+ $errSchemaPath = $currErrSchemaPath;
+ if ($breakOnError) {
+ out += ' if (' + ($valid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ }
+ }
+ }
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
+ }
+ out = it.util.cleanUpCode(out);
+ return out;
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/propertyNames.js b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/propertyNames.js
new file mode 100644
index 0000000000..0cedcdac9a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/propertyNames.js
@@ -0,0 +1,81 @@
+'use strict';
+module.exports = function generate_propertyNames(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ if (it.util.schemaHasRules($schema, it.RULES.all)) {
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ var $key = 'key' + $lvl,
+ $idx = 'idx' + $lvl,
+ $i = 'i' + $lvl,
+ $invalidName = '\' + ' + $key + ' + \'',
+ $dataNxt = $it.dataLevel = it.dataLevel + 1,
+ $nextData = 'data' + $dataNxt,
+ $dataProperties = 'dataProperties' + $lvl,
+ $ownProperties = it.opts.ownProperties,
+ $currentBaseId = it.baseId;
+ out += ' var ' + ($errs) + ' = errors; ';
+ if ($ownProperties) {
+ out += ' var ' + ($dataProperties) + ' = undefined; ';
+ }
+ if ($ownProperties) {
+ out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';
+ } else {
+ out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
+ }
+ out += ' var startErrs' + ($lvl) + ' = errors; ';
+ var $passData = $key;
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + '<errors; ' + ($i) + '++) { vErrors[' + ($i) + '].propertyName = ' + ($key) + '; } var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('propertyNames') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { propertyName: \'' + ($invalidName) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'property name \\\'' + ($invalidName) + '\\\' is invalid\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError(vErrors); ';
+ } else {
+ out += ' validate.errors = vErrors; return false; ';
+ }
+ }
+ if ($breakOnError) {
+ out += ' break; ';
+ }
+ out += ' } }';
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
+ }
+ out = it.util.cleanUpCode(out);
+ return out;
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/ref.js b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/ref.js
new file mode 100644
index 0000000000..a9d7bb909b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/ref.js
@@ -0,0 +1,123 @@
+'use strict';
+module.exports = function generate_ref(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $async, $refCode;
+ if ($schema == '#' || $schema == '#/') {
+ if (it.isRoot) {
+ $async = it.async;
+ $refCode = 'validate';
+ } else {
+ $async = it.root.schema.$async === true;
+ $refCode = 'root.refVal[0]';
+ }
+ } else {
+ var $refVal = it.resolveRef(it.baseId, $schema, it.isRoot);
+ if ($refVal === undefined) {
+ var $message = it.MissingRefError.message(it.baseId, $schema);
+ if (it.opts.missingRefs == 'fail') {
+ it.logger.error($message);
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('$ref') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { ref: \'' + (it.util.escapeQuotes($schema)) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'can\\\'t resolve reference ' + (it.util.escapeQuotes($schema)) + '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ' + (it.util.toQuotedString($schema)) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ if ($breakOnError) {
+ out += ' if (false) { ';
+ }
+ } else if (it.opts.missingRefs == 'ignore') {
+ it.logger.warn($message);
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ } else {
+ throw new it.MissingRefError(it.baseId, $schema, $message);
+ }
+ } else if ($refVal.inline) {
+ var $it = it.util.copy(it);
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ $it.schema = $refVal.schema;
+ $it.schemaPath = '';
+ $it.errSchemaPath = $schema;
+ var $code = it.validate($it).replace(/validate\.schema/g, $refVal.code);
+ out += ' ' + ($code) + ' ';
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ }
+ } else {
+ $async = $refVal.$async === true;
+ $refCode = $refVal.code;
+ }
+ }
+ if ($refCode) {
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = '';
+ if (it.opts.passContext) {
+ out += ' ' + ($refCode) + '.call(this, ';
+ } else {
+ out += ' ' + ($refCode) + '( ';
+ }
+ out += ' ' + ($data) + ', (dataPath || \'\')';
+ if (it.errorPath != '""') {
+ out += ' + ' + (it.errorPath);
+ }
+ var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData',
+ $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty';
+ out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ', rootData) ';
+ var __callValidate = out;
+ out = $$outStack.pop();
+ if ($async) {
+ if (!it.async) throw new Error('async schema referenced by sync schema');
+ if ($breakOnError) {
+ out += ' var ' + ($valid) + '; ';
+ }
+ out += ' try { ' + (it.yieldAwait) + ' ' + (__callValidate) + '; ';
+ if ($breakOnError) {
+ out += ' ' + ($valid) + ' = true; ';
+ }
+ out += ' } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ';
+ if ($breakOnError) {
+ out += ' ' + ($valid) + ' = false; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' if (' + ($valid) + ') { ';
+ }
+ } else {
+ out += ' if (!' + (__callValidate) + ') { if (vErrors === null) vErrors = ' + ($refCode) + '.errors; else vErrors = vErrors.concat(' + ($refCode) + '.errors); errors = vErrors.length; } ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ }
+ }
+ return out;
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/required.js b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/required.js
new file mode 100644
index 0000000000..15b36bb7a7
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/required.js
@@ -0,0 +1,268 @@
+'use strict';
+module.exports = function generate_required(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $vSchema = 'schema' + $lvl;
+ if (!$isData) {
+ if ($schema.length < it.opts.loopRequired && it.schema.properties && Object.keys(it.schema.properties).length) {
+ var $required = [];
+ var arr1 = $schema;
+ if (arr1) {
+ var $property, i1 = -1,
+ l1 = arr1.length - 1;
+ while (i1 < l1) {
+ $property = arr1[i1 += 1];
+ var $propertySch = it.schema.properties[$property];
+ if (!($propertySch && it.util.schemaHasRules($propertySch, it.RULES.all))) {
+ $required[$required.length] = $property;
+ }
+ }
+ }
+ } else {
+ var $required = $schema;
+ }
+ }
+ if ($isData || $required.length) {
+ var $currentErrorPath = it.errorPath,
+ $loopRequired = $isData || $required.length >= it.opts.loopRequired,
+ $ownProperties = it.opts.ownProperties;
+ if ($breakOnError) {
+ out += ' var missing' + ($lvl) + '; ';
+ if ($loopRequired) {
+ if (!$isData) {
+ out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; ';
+ }
+ var $i = 'i' + $lvl,
+ $propertyPath = 'schema' + $lvl + '[' + $i + ']',
+ $missingProperty = '\' + ' + $propertyPath + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers);
+ }
+ out += ' var ' + ($valid) + ' = true; ';
+ if ($isData) {
+ out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {';
+ }
+ out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined ';
+ if ($ownProperties) {
+ out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) ';
+ }
+ out += '; if (!' + ($valid) + ') break; } ';
+ if ($isData) {
+ out += ' } ';
+ }
+ out += ' if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is a required property';
+ } else {
+ out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } else { ';
+ } else {
+ out += ' if ( ';
+ var arr2 = $required;
+ if (arr2) {
+ var $propertyKey, $i = -1,
+ l2 = arr2.length - 1;
+ while ($i < l2) {
+ $propertyKey = arr2[$i += 1];
+ if ($i) {
+ out += ' || ';
+ }
+ var $prop = it.util.getProperty($propertyKey),
+ $useData = $data + $prop;
+ out += ' ( ( ' + ($useData) + ' === undefined ';
+ if ($ownProperties) {
+ out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ }
+ out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) ';
+ }
+ }
+ out += ') { ';
+ var $propertyPath = 'missing' + $lvl,
+ $missingProperty = '\' + ' + $propertyPath + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath;
+ }
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is a required property';
+ } else {
+ out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } else { ';
+ }
+ } else {
+ if ($loopRequired) {
+ if (!$isData) {
+ out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; ';
+ }
+ var $i = 'i' + $lvl,
+ $propertyPath = 'schema' + $lvl + '[' + $i + ']',
+ $missingProperty = '\' + ' + $propertyPath + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers);
+ }
+ if ($isData) {
+ out += ' if (' + ($vSchema) + ' && !Array.isArray(' + ($vSchema) + ')) { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is a required property';
+ } else {
+ out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($vSchema) + ' !== undefined) { ';
+ }
+ out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined ';
+ if ($ownProperties) {
+ out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) ';
+ }
+ out += ') { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is a required property';
+ } else {
+ out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ';
+ if ($isData) {
+ out += ' } ';
+ }
+ } else {
+ var arr3 = $required;
+ if (arr3) {
+ var $propertyKey, i3 = -1,
+ l3 = arr3.length - 1;
+ while (i3 < l3) {
+ $propertyKey = arr3[i3 += 1];
+ var $prop = it.util.getProperty($propertyKey),
+ $missingProperty = it.util.escapeQuotes($propertyKey),
+ $useData = $data + $prop;
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
+ }
+ out += ' if ( ' + ($useData) + ' === undefined ';
+ if ($ownProperties) {
+ out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ }
+ out += ') { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is a required property';
+ } else {
+ out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ';
+ }
+ }
+ }
+ }
+ it.errorPath = $currentErrorPath;
+ } else if ($breakOnError) {
+ out += ' if (true) {';
+ }
+ return out;
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/uniqueItems.js b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/uniqueItems.js
new file mode 100644
index 0000000000..d9b3185fce
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/uniqueItems.js
@@ -0,0 +1,71 @@
+'use strict';
+module.exports = function generate_uniqueItems(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ if (($schema || $isData) && it.opts.uniqueItems !== false) {
+ if ($isData) {
+ out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'boolean\') ' + ($valid) + ' = false; else { ';
+ }
+ out += ' var ' + ($valid) + ' = true; if (' + ($data) + '.length > 1) { var i = ' + ($data) + '.length, j; outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } } ';
+ if ($isData) {
+ out += ' } ';
+ }
+ out += ' if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('uniqueItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT have duplicate items (items ## \' + j + \' and \' + i + \' are identical)\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ } else {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ }
+ return out;
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/validate.js b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/validate.js
new file mode 100644
index 0000000000..5ff9beee70
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dotjs/validate.js
@@ -0,0 +1,458 @@
+'use strict';
+module.exports = function generate_validate(it, $keyword, $ruleType) {
+ var out = '';
+ var $async = it.schema.$async === true,
+ $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'),
+ $id = it.self._getId(it.schema);
+ if (it.isTop) {
+ if ($async) {
+ it.async = true;
+ var $es7 = it.opts.async == 'es7';
+ it.yieldAwait = $es7 ? 'await' : 'yield';
+ }
+ out += ' var validate = ';
+ if ($async) {
+ if ($es7) {
+ out += ' (async function ';
+ } else {
+ if (it.opts.async != '*') {
+ out += 'co.wrap';
+ }
+ out += '(function* ';
+ }
+ } else {
+ out += ' (function ';
+ }
+ out += ' (data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; ';
+ if ($id && (it.opts.sourceCode || it.opts.processCode)) {
+ out += ' ' + ('/\*# sourceURL=' + $id + ' */') + ' ';
+ }
+ }
+ if (typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref)) {
+ var $keyword = 'false schema';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ if (it.schema === false) {
+ if (it.isTop) {
+ $breakOnError = true;
+ } else {
+ out += ' var ' + ($valid) + ' = false; ';
+ }
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'false schema') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'boolean schema is false\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ } else {
+ if (it.isTop) {
+ if ($async) {
+ out += ' return data; ';
+ } else {
+ out += ' validate.errors = null; return true; ';
+ }
+ } else {
+ out += ' var ' + ($valid) + ' = true; ';
+ }
+ }
+ if (it.isTop) {
+ out += ' }); return validate; ';
+ }
+ return out;
+ }
+ if (it.isTop) {
+ var $top = it.isTop,
+ $lvl = it.level = 0,
+ $dataLvl = it.dataLevel = 0,
+ $data = 'data';
+ it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema));
+ it.baseId = it.baseId || it.rootId;
+ delete it.isTop;
+ it.dataPathArr = [undefined];
+ out += ' var vErrors = null; ';
+ out += ' var errors = 0; ';
+ out += ' if (rootData === undefined) rootData = data; ';
+ } else {
+ var $lvl = it.level,
+ $dataLvl = it.dataLevel,
+ $data = 'data' + ($dataLvl || '');
+ if ($id) it.baseId = it.resolve.url(it.baseId, $id);
+ if ($async && !it.async) throw new Error('async schema in sync schema');
+ out += ' var errs_' + ($lvl) + ' = errors;';
+ }
+ var $valid = 'valid' + $lvl,
+ $breakOnError = !it.opts.allErrors,
+ $closingBraces1 = '',
+ $closingBraces2 = '';
+ var $errorKeyword;
+ var $typeSchema = it.schema.type,
+ $typeIsArray = Array.isArray($typeSchema);
+ if ($typeIsArray && $typeSchema.length == 1) {
+ $typeSchema = $typeSchema[0];
+ $typeIsArray = false;
+ }
+ if (it.schema.$ref && $refKeywords) {
+ if (it.opts.extendRefs == 'fail') {
+ throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)');
+ } else if (it.opts.extendRefs !== true) {
+ $refKeywords = false;
+ it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"');
+ }
+ }
+ if ($typeSchema) {
+ if (it.opts.coerceTypes) {
+ var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema);
+ }
+ var $rulesGroup = it.RULES.types[$typeSchema];
+ if ($coerceToTypes || $typeIsArray || $rulesGroup === true || ($rulesGroup && !$shouldUseGroup($rulesGroup))) {
+ var $schemaPath = it.schemaPath + '.type',
+ $errSchemaPath = it.errSchemaPath + '/type';
+ var $schemaPath = it.schemaPath + '.type',
+ $errSchemaPath = it.errSchemaPath + '/type',
+ $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType';
+ out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { ';
+ if ($coerceToTypes) {
+ var $dataType = 'dataType' + $lvl,
+ $coerced = 'coerced' + $lvl;
+ out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; ';
+ if (it.opts.coerceTypes == 'array') {
+ out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ')) ' + ($dataType) + ' = \'array\'; ';
+ }
+ out += ' var ' + ($coerced) + ' = undefined; ';
+ var $bracesCoercion = '';
+ var arr1 = $coerceToTypes;
+ if (arr1) {
+ var $type, $i = -1,
+ l1 = arr1.length - 1;
+ while ($i < l1) {
+ $type = arr1[$i += 1];
+ if ($i) {
+ out += ' if (' + ($coerced) + ' === undefined) { ';
+ $bracesCoercion += '}';
+ }
+ if (it.opts.coerceTypes == 'array' && $type != 'array') {
+ out += ' if (' + ($dataType) + ' == \'array\' && ' + ($data) + '.length == 1) { ' + ($coerced) + ' = ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; } ';
+ }
+ if ($type == 'string') {
+ out += ' if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; ';
+ } else if ($type == 'number' || $type == 'integer') {
+ out += ' if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' ';
+ if ($type == 'integer') {
+ out += ' && !(' + ($data) + ' % 1)';
+ }
+ out += ')) ' + ($coerced) + ' = +' + ($data) + '; ';
+ } else if ($type == 'boolean') {
+ out += ' if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; ';
+ } else if ($type == 'null') {
+ out += ' if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; ';
+ } else if (it.opts.coerceTypes == 'array' && $type == 'array') {
+ out += ' if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; ';
+ }
+ }
+ }
+ out += ' ' + ($bracesCoercion) + ' if (' + ($coerced) + ' === undefined) { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \'';
+ if ($typeIsArray) {
+ out += '' + ($typeSchema.join(","));
+ } else {
+ out += '' + ($typeSchema);
+ }
+ out += '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be ';
+ if ($typeIsArray) {
+ out += '' + ($typeSchema.join(","));
+ } else {
+ out += '' + ($typeSchema);
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } else { ';
+ var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData',
+ $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty';
+ out += ' ' + ($data) + ' = ' + ($coerced) + '; ';
+ if (!$dataLvl) {
+ out += 'if (' + ($parentData) + ' !== undefined)';
+ }
+ out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } ';
+ } else {
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \'';
+ if ($typeIsArray) {
+ out += '' + ($typeSchema.join(","));
+ } else {
+ out += '' + ($typeSchema);
+ }
+ out += '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be ';
+ if ($typeIsArray) {
+ out += '' + ($typeSchema.join(","));
+ } else {
+ out += '' + ($typeSchema);
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ }
+ out += ' } ';
+ }
+ }
+ if (it.schema.$ref && !$refKeywords) {
+ out += ' ' + (it.RULES.all.$ref.code(it, '$ref')) + ' ';
+ if ($breakOnError) {
+ out += ' } if (errors === ';
+ if ($top) {
+ out += '0';
+ } else {
+ out += 'errs_' + ($lvl);
+ }
+ out += ') { ';
+ $closingBraces2 += '}';
+ }
+ } else {
+ if (it.opts.v5 && it.schema.patternGroups) {
+ it.logger.warn('keyword "patternGroups" is deprecated and disabled. Use option patternGroups: true to enable.');
+ }
+ var arr2 = it.RULES;
+ if (arr2) {
+ var $rulesGroup, i2 = -1,
+ l2 = arr2.length - 1;
+ while (i2 < l2) {
+ $rulesGroup = arr2[i2 += 1];
+ if ($shouldUseGroup($rulesGroup)) {
+ if ($rulesGroup.type) {
+ out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data)) + ') { ';
+ }
+ if (it.opts.useDefaults && !it.compositeRule) {
+ if ($rulesGroup.type == 'object' && it.schema.properties) {
+ var $schema = it.schema.properties,
+ $schemaKeys = Object.keys($schema);
+ var arr3 = $schemaKeys;
+ if (arr3) {
+ var $propertyKey, i3 = -1,
+ l3 = arr3.length - 1;
+ while (i3 < l3) {
+ $propertyKey = arr3[i3 += 1];
+ var $sch = $schema[$propertyKey];
+ if ($sch.default !== undefined) {
+ var $passData = $data + it.util.getProperty($propertyKey);
+ out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = ';
+ if (it.opts.useDefaults == 'shared') {
+ out += ' ' + (it.useDefault($sch.default)) + ' ';
+ } else {
+ out += ' ' + (JSON.stringify($sch.default)) + ' ';
+ }
+ out += '; ';
+ }
+ }
+ }
+ } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) {
+ var arr4 = it.schema.items;
+ if (arr4) {
+ var $sch, $i = -1,
+ l4 = arr4.length - 1;
+ while ($i < l4) {
+ $sch = arr4[$i += 1];
+ if ($sch.default !== undefined) {
+ var $passData = $data + '[' + $i + ']';
+ out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = ';
+ if (it.opts.useDefaults == 'shared') {
+ out += ' ' + (it.useDefault($sch.default)) + ' ';
+ } else {
+ out += ' ' + (JSON.stringify($sch.default)) + ' ';
+ }
+ out += '; ';
+ }
+ }
+ }
+ }
+ }
+ var arr5 = $rulesGroup.rules;
+ if (arr5) {
+ var $rule, i5 = -1,
+ l5 = arr5.length - 1;
+ while (i5 < l5) {
+ $rule = arr5[i5 += 1];
+ if ($shouldUseRule($rule)) {
+ var $code = $rule.code(it, $rule.keyword, $rulesGroup.type);
+ if ($code) {
+ out += ' ' + ($code) + ' ';
+ if ($breakOnError) {
+ $closingBraces1 += '}';
+ }
+ }
+ }
+ }
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces1) + ' ';
+ $closingBraces1 = '';
+ }
+ if ($rulesGroup.type) {
+ out += ' } ';
+ if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) {
+ out += ' else { ';
+ var $schemaPath = it.schemaPath + '.type',
+ $errSchemaPath = it.errSchemaPath + '/type';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \'';
+ if ($typeIsArray) {
+ out += '' + ($typeSchema.join(","));
+ } else {
+ out += '' + ($typeSchema);
+ }
+ out += '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be ';
+ if ($typeIsArray) {
+ out += '' + ($typeSchema.join(","));
+ } else {
+ out += '' + ($typeSchema);
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ }
+ }
+ if ($breakOnError) {
+ out += ' if (errors === ';
+ if ($top) {
+ out += '0';
+ } else {
+ out += 'errs_' + ($lvl);
+ }
+ out += ') { ';
+ $closingBraces2 += '}';
+ }
+ }
+ }
+ }
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces2) + ' ';
+ }
+ if ($top) {
+ if ($async) {
+ out += ' if (errors === 0) return data; ';
+ out += ' else throw new ValidationError(vErrors); ';
+ } else {
+ out += ' validate.errors = vErrors; ';
+ out += ' return errors === 0; ';
+ }
+ out += ' }); return validate;';
+ } else {
+ out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';';
+ }
+ out = it.util.cleanUpCode(out);
+ if ($top) {
+ out = it.util.finalCleanUpCode(out, $async);
+ }
+
+ function $shouldUseGroup($rulesGroup) {
+ var rules = $rulesGroup.rules;
+ for (var i = 0; i < rules.length; i++)
+ if ($shouldUseRule(rules[i])) return true;
+ }
+
+ function $shouldUseRule($rule) {
+ return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImplementsSomeKeyword($rule));
+ }
+
+ function $ruleImplementsSomeKeyword($rule) {
+ var impl = $rule.implements;
+ for (var i = 0; i < impl.length; i++)
+ if (it.schema[impl[i]] !== undefined) return true;
+ }
+ return out;
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/keyword.js b/tools/node_modules/eslint/node_modules/ajv/lib/keyword.js
new file mode 100644
index 0000000000..5fcfb75fca
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/keyword.js
@@ -0,0 +1,135 @@
+'use strict';
+
+var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i;
+var customRuleCode = require('./dotjs/custom');
+
+module.exports = {
+ add: addKeyword,
+ get: getKeyword,
+ remove: removeKeyword
+};
+
+/**
+ * Define custom keyword
+ * @this Ajv
+ * @param {String} keyword custom keyword, should be unique (including different from all standard, custom and macro keywords).
+ * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`.
+ * @return {Ajv} this for method chaining
+ */
+function addKeyword(keyword, definition) {
+ /* jshint validthis: true */
+ /* eslint no-shadow: 0 */
+ var RULES = this.RULES;
+
+ if (RULES.keywords[keyword])
+ throw new Error('Keyword ' + keyword + ' is already defined');
+
+ if (!IDENTIFIER.test(keyword))
+ throw new Error('Keyword ' + keyword + ' is not a valid identifier');
+
+ if (definition) {
+ if (definition.macro && definition.valid !== undefined)
+ throw new Error('"valid" option cannot be used with macro keywords');
+
+ var dataType = definition.type;
+ if (Array.isArray(dataType)) {
+ var i, len = dataType.length;
+ for (i=0; i<len; i++) checkDataType(dataType[i]);
+ for (i=0; i<len; i++) _addRule(keyword, dataType[i], definition);
+ } else {
+ if (dataType) checkDataType(dataType);
+ _addRule(keyword, dataType, definition);
+ }
+
+ var $data = definition.$data === true && this._opts.$data;
+ if ($data && !definition.validate)
+ throw new Error('$data support: "validate" function is not defined');
+
+ var metaSchema = definition.metaSchema;
+ if (metaSchema) {
+ if ($data) {
+ metaSchema = {
+ anyOf: [
+ metaSchema,
+ { '$ref': 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#' }
+ ]
+ };
+ }
+ definition.validateSchema = this.compile(metaSchema, true);
+ }
+ }
+
+ RULES.keywords[keyword] = RULES.all[keyword] = true;
+
+
+ function _addRule(keyword, dataType, definition) {
+ var ruleGroup;
+ for (var i=0; i<RULES.length; i++) {
+ var rg = RULES[i];
+ if (rg.type == dataType) {
+ ruleGroup = rg;
+ break;
+ }
+ }
+
+ if (!ruleGroup) {
+ ruleGroup = { type: dataType, rules: [] };
+ RULES.push(ruleGroup);
+ }
+
+ var rule = {
+ keyword: keyword,
+ definition: definition,
+ custom: true,
+ code: customRuleCode,
+ implements: definition.implements
+ };
+ ruleGroup.rules.push(rule);
+ RULES.custom[keyword] = rule;
+ }
+
+
+ function checkDataType(dataType) {
+ if (!RULES.types[dataType]) throw new Error('Unknown type ' + dataType);
+ }
+
+ return this;
+}
+
+
+/**
+ * Get keyword
+ * @this Ajv
+ * @param {String} keyword pre-defined or custom keyword.
+ * @return {Object|Boolean} custom keyword definition, `true` if it is a predefined keyword, `false` otherwise.
+ */
+function getKeyword(keyword) {
+ /* jshint validthis: true */
+ var rule = this.RULES.custom[keyword];
+ return rule ? rule.definition : this.RULES.keywords[keyword] || false;
+}
+
+
+/**
+ * Remove keyword
+ * @this Ajv
+ * @param {String} keyword pre-defined or custom keyword.
+ * @return {Ajv} this for method chaining
+ */
+function removeKeyword(keyword) {
+ /* jshint validthis: true */
+ var RULES = this.RULES;
+ delete RULES.keywords[keyword];
+ delete RULES.all[keyword];
+ delete RULES.custom[keyword];
+ for (var i=0; i<RULES.length; i++) {
+ var rules = RULES[i].rules;
+ for (var j=0; j<rules.length; j++) {
+ if (rules[j].keyword == keyword) {
+ rules.splice(j, 1);
+ break;
+ }
+ }
+ }
+ return this;
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/patternGroups.js b/tools/node_modules/eslint/node_modules/ajv/lib/patternGroups.js
new file mode 100644
index 0000000000..531a8d004e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/patternGroups.js
@@ -0,0 +1,36 @@
+'use strict';
+
+var META_SCHEMA_ID = 'http://json-schema.org/draft-06/schema';
+
+module.exports = function (ajv) {
+ var defaultMeta = ajv._opts.defaultMeta;
+ var metaSchemaRef = typeof defaultMeta == 'string'
+ ? { $ref: defaultMeta }
+ : ajv.getSchema(META_SCHEMA_ID)
+ ? { $ref: META_SCHEMA_ID }
+ : {};
+
+ ajv.addKeyword('patternGroups', {
+ // implemented in properties.jst
+ metaSchema: {
+ type: 'object',
+ additionalProperties: {
+ type: 'object',
+ required: [ 'schema' ],
+ properties: {
+ maximum: {
+ type: 'integer',
+ minimum: 0
+ },
+ minimum: {
+ type: 'integer',
+ minimum: 0
+ },
+ schema: metaSchemaRef
+ },
+ additionalProperties: false
+ }
+ }
+ });
+ ajv.RULES.all.properties.implements.push('patternGroups');
+};
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/refs/$data.json b/tools/node_modules/eslint/node_modules/ajv/lib/refs/$data.json
new file mode 100644
index 0000000000..4a2edec556
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/refs/$data.json
@@ -0,0 +1,17 @@
+{
+ "$schema": "http://json-schema.org/draft-06/schema#",
+ "$id": "https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#",
+ "description": "Meta-schema for $data reference (JSON-schema extension proposal)",
+ "type": "object",
+ "required": [ "$data" ],
+ "properties": {
+ "$data": {
+ "type": "string",
+ "anyOf": [
+ { "format": "relative-json-pointer" },
+ { "format": "json-pointer" }
+ ]
+ }
+ },
+ "additionalProperties": false
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/refs/json-schema-draft-04.json b/tools/node_modules/eslint/node_modules/ajv/lib/refs/json-schema-draft-04.json
new file mode 100644
index 0000000000..85eb502a68
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/refs/json-schema-draft-04.json
@@ -0,0 +1,150 @@
+{
+ "id": "http://json-schema.org/draft-04/schema#",
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "description": "Core schema meta-schema",
+ "definitions": {
+ "schemaArray": {
+ "type": "array",
+ "minItems": 1,
+ "items": { "$ref": "#" }
+ },
+ "positiveInteger": {
+ "type": "integer",
+ "minimum": 0
+ },
+ "positiveIntegerDefault0": {
+ "allOf": [ { "$ref": "#/definitions/positiveInteger" }, { "default": 0 } ]
+ },
+ "simpleTypes": {
+ "enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ]
+ },
+ "stringArray": {
+ "type": "array",
+ "items": { "type": "string" },
+ "minItems": 1,
+ "uniqueItems": true
+ }
+ },
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "format": "uri"
+ },
+ "$schema": {
+ "type": "string",
+ "format": "uri"
+ },
+ "title": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "default": {},
+ "multipleOf": {
+ "type": "number",
+ "minimum": 0,
+ "exclusiveMinimum": true
+ },
+ "maximum": {
+ "type": "number"
+ },
+ "exclusiveMaximum": {
+ "type": "boolean",
+ "default": false
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "exclusiveMinimum": {
+ "type": "boolean",
+ "default": false
+ },
+ "maxLength": { "$ref": "#/definitions/positiveInteger" },
+ "minLength": { "$ref": "#/definitions/positiveIntegerDefault0" },
+ "pattern": {
+ "type": "string",
+ "format": "regex"
+ },
+ "additionalItems": {
+ "anyOf": [
+ { "type": "boolean" },
+ { "$ref": "#" }
+ ],
+ "default": {}
+ },
+ "items": {
+ "anyOf": [
+ { "$ref": "#" },
+ { "$ref": "#/definitions/schemaArray" }
+ ],
+ "default": {}
+ },
+ "maxItems": { "$ref": "#/definitions/positiveInteger" },
+ "minItems": { "$ref": "#/definitions/positiveIntegerDefault0" },
+ "uniqueItems": {
+ "type": "boolean",
+ "default": false
+ },
+ "maxProperties": { "$ref": "#/definitions/positiveInteger" },
+ "minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" },
+ "required": { "$ref": "#/definitions/stringArray" },
+ "additionalProperties": {
+ "anyOf": [
+ { "type": "boolean" },
+ { "$ref": "#" }
+ ],
+ "default": {}
+ },
+ "definitions": {
+ "type": "object",
+ "additionalProperties": { "$ref": "#" },
+ "default": {}
+ },
+ "properties": {
+ "type": "object",
+ "additionalProperties": { "$ref": "#" },
+ "default": {}
+ },
+ "patternProperties": {
+ "type": "object",
+ "additionalProperties": { "$ref": "#" },
+ "default": {}
+ },
+ "dependencies": {
+ "type": "object",
+ "additionalProperties": {
+ "anyOf": [
+ { "$ref": "#" },
+ { "$ref": "#/definitions/stringArray" }
+ ]
+ }
+ },
+ "enum": {
+ "type": "array",
+ "minItems": 1,
+ "uniqueItems": true
+ },
+ "type": {
+ "anyOf": [
+ { "$ref": "#/definitions/simpleTypes" },
+ {
+ "type": "array",
+ "items": { "$ref": "#/definitions/simpleTypes" },
+ "minItems": 1,
+ "uniqueItems": true
+ }
+ ]
+ },
+ "allOf": { "$ref": "#/definitions/schemaArray" },
+ "anyOf": { "$ref": "#/definitions/schemaArray" },
+ "oneOf": { "$ref": "#/definitions/schemaArray" },
+ "not": { "$ref": "#" }
+ },
+ "dependencies": {
+ "exclusiveMaximum": [ "maximum" ],
+ "exclusiveMinimum": [ "minimum" ]
+ },
+ "default": {}
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/refs/json-schema-draft-06.json b/tools/node_modules/eslint/node_modules/ajv/lib/refs/json-schema-draft-06.json
new file mode 100644
index 0000000000..5656240b94
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/refs/json-schema-draft-06.json
@@ -0,0 +1,154 @@
+{
+ "$schema": "http://json-schema.org/draft-06/schema#",
+ "$id": "http://json-schema.org/draft-06/schema#",
+ "title": "Core schema meta-schema",
+ "definitions": {
+ "schemaArray": {
+ "type": "array",
+ "minItems": 1,
+ "items": { "$ref": "#" }
+ },
+ "nonNegativeInteger": {
+ "type": "integer",
+ "minimum": 0
+ },
+ "nonNegativeIntegerDefault0": {
+ "allOf": [
+ { "$ref": "#/definitions/nonNegativeInteger" },
+ { "default": 0 }
+ ]
+ },
+ "simpleTypes": {
+ "enum": [
+ "array",
+ "boolean",
+ "integer",
+ "null",
+ "number",
+ "object",
+ "string"
+ ]
+ },
+ "stringArray": {
+ "type": "array",
+ "items": { "type": "string" },
+ "uniqueItems": true,
+ "default": []
+ }
+ },
+ "type": ["object", "boolean"],
+ "properties": {
+ "$id": {
+ "type": "string",
+ "format": "uri-reference"
+ },
+ "$schema": {
+ "type": "string",
+ "format": "uri"
+ },
+ "$ref": {
+ "type": "string",
+ "format": "uri-reference"
+ },
+ "title": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "default": {},
+ "examples": {
+ "type": "array",
+ "items": {}
+ },
+ "multipleOf": {
+ "type": "number",
+ "exclusiveMinimum": 0
+ },
+ "maximum": {
+ "type": "number"
+ },
+ "exclusiveMaximum": {
+ "type": "number"
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "exclusiveMinimum": {
+ "type": "number"
+ },
+ "maxLength": { "$ref": "#/definitions/nonNegativeInteger" },
+ "minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
+ "pattern": {
+ "type": "string",
+ "format": "regex"
+ },
+ "additionalItems": { "$ref": "#" },
+ "items": {
+ "anyOf": [
+ { "$ref": "#" },
+ { "$ref": "#/definitions/schemaArray" }
+ ],
+ "default": {}
+ },
+ "maxItems": { "$ref": "#/definitions/nonNegativeInteger" },
+ "minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
+ "uniqueItems": {
+ "type": "boolean",
+ "default": false
+ },
+ "contains": { "$ref": "#" },
+ "maxProperties": { "$ref": "#/definitions/nonNegativeInteger" },
+ "minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
+ "required": { "$ref": "#/definitions/stringArray" },
+ "additionalProperties": { "$ref": "#" },
+ "definitions": {
+ "type": "object",
+ "additionalProperties": { "$ref": "#" },
+ "default": {}
+ },
+ "properties": {
+ "type": "object",
+ "additionalProperties": { "$ref": "#" },
+ "default": {}
+ },
+ "patternProperties": {
+ "type": "object",
+ "additionalProperties": { "$ref": "#" },
+ "default": {}
+ },
+ "dependencies": {
+ "type": "object",
+ "additionalProperties": {
+ "anyOf": [
+ { "$ref": "#" },
+ { "$ref": "#/definitions/stringArray" }
+ ]
+ }
+ },
+ "propertyNames": { "$ref": "#" },
+ "const": {},
+ "enum": {
+ "type": "array",
+ "minItems": 1,
+ "uniqueItems": true
+ },
+ "type": {
+ "anyOf": [
+ { "$ref": "#/definitions/simpleTypes" },
+ {
+ "type": "array",
+ "items": { "$ref": "#/definitions/simpleTypes" },
+ "minItems": 1,
+ "uniqueItems": true
+ }
+ ]
+ },
+ "format": { "type": "string" },
+ "allOf": { "$ref": "#/definitions/schemaArray" },
+ "anyOf": { "$ref": "#/definitions/schemaArray" },
+ "oneOf": { "$ref": "#/definitions/schemaArray" },
+ "not": { "$ref": "#" }
+ },
+ "default": {}
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/refs/json-schema-v5.json b/tools/node_modules/eslint/node_modules/ajv/lib/refs/json-schema-v5.json
new file mode 100644
index 0000000000..cc679a459d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/refs/json-schema-v5.json
@@ -0,0 +1,250 @@
+{
+ "id": "https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json#",
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "description": "Core schema meta-schema (v5 proposals - deprecated)",
+ "definitions": {
+ "schemaArray": {
+ "type": "array",
+ "minItems": 1,
+ "items": { "$ref": "#" }
+ },
+ "positiveInteger": {
+ "type": "integer",
+ "minimum": 0
+ },
+ "positiveIntegerDefault0": {
+ "allOf": [ { "$ref": "#/definitions/positiveInteger" }, { "default": 0 } ]
+ },
+ "simpleTypes": {
+ "enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ]
+ },
+ "stringArray": {
+ "type": "array",
+ "items": { "type": "string" },
+ "minItems": 1,
+ "uniqueItems": true
+ },
+ "$data": {
+ "type": "object",
+ "required": [ "$data" ],
+ "properties": {
+ "$data": {
+ "type": "string",
+ "anyOf": [
+ { "format": "relative-json-pointer" },
+ { "format": "json-pointer" }
+ ]
+ }
+ },
+ "additionalProperties": false
+ }
+ },
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "format": "uri"
+ },
+ "$schema": {
+ "type": "string",
+ "format": "uri"
+ },
+ "title": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "default": {},
+ "multipleOf": {
+ "anyOf": [
+ {
+ "type": "number",
+ "minimum": 0,
+ "exclusiveMinimum": true
+ },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "maximum": {
+ "anyOf": [
+ { "type": "number" },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "exclusiveMaximum": {
+ "anyOf": [
+ {
+ "type": "boolean",
+ "default": false
+ },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "minimum": {
+ "anyOf": [
+ { "type": "number" },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "exclusiveMinimum": {
+ "anyOf": [
+ {
+ "type": "boolean",
+ "default": false
+ },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "maxLength": {
+ "anyOf": [
+ { "$ref": "#/definitions/positiveInteger" },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "minLength": {
+ "anyOf": [
+ { "$ref": "#/definitions/positiveIntegerDefault0" },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "pattern": {
+ "anyOf": [
+ {
+ "type": "string",
+ "format": "regex"
+ },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "additionalItems": {
+ "anyOf": [
+ { "type": "boolean" },
+ { "$ref": "#" },
+ { "$ref": "#/definitions/$data" }
+ ],
+ "default": {}
+ },
+ "items": {
+ "anyOf": [
+ { "$ref": "#" },
+ { "$ref": "#/definitions/schemaArray" }
+ ],
+ "default": {}
+ },
+ "maxItems": {
+ "anyOf": [
+ { "$ref": "#/definitions/positiveInteger" },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "minItems": {
+ "anyOf": [
+ { "$ref": "#/definitions/positiveIntegerDefault0" },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "uniqueItems": {
+ "anyOf": [
+ {
+ "type": "boolean",
+ "default": false
+ },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "maxProperties": {
+ "anyOf": [
+ { "$ref": "#/definitions/positiveInteger" },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "minProperties": {
+ "anyOf": [
+ { "$ref": "#/definitions/positiveIntegerDefault0" },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "required": {
+ "anyOf": [
+ { "$ref": "#/definitions/stringArray" },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "additionalProperties": {
+ "anyOf": [
+ { "type": "boolean" },
+ { "$ref": "#" },
+ { "$ref": "#/definitions/$data" }
+ ],
+ "default": {}
+ },
+ "definitions": {
+ "type": "object",
+ "additionalProperties": { "$ref": "#" },
+ "default": {}
+ },
+ "properties": {
+ "type": "object",
+ "additionalProperties": { "$ref": "#" },
+ "default": {}
+ },
+ "patternProperties": {
+ "type": "object",
+ "additionalProperties": { "$ref": "#" },
+ "default": {}
+ },
+ "dependencies": {
+ "type": "object",
+ "additionalProperties": {
+ "anyOf": [
+ { "$ref": "#" },
+ { "$ref": "#/definitions/stringArray" }
+ ]
+ }
+ },
+ "enum": {
+ "anyOf": [
+ {
+ "type": "array",
+ "minItems": 1,
+ "uniqueItems": true
+ },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "type": {
+ "anyOf": [
+ { "$ref": "#/definitions/simpleTypes" },
+ {
+ "type": "array",
+ "items": { "$ref": "#/definitions/simpleTypes" },
+ "minItems": 1,
+ "uniqueItems": true
+ }
+ ]
+ },
+ "allOf": { "$ref": "#/definitions/schemaArray" },
+ "anyOf": { "$ref": "#/definitions/schemaArray" },
+ "oneOf": { "$ref": "#/definitions/schemaArray" },
+ "not": { "$ref": "#" },
+ "format": {
+ "anyOf": [
+ { "type": "string" },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "constant": {
+ "anyOf": [
+ {},
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "contains": { "$ref": "#" }
+ },
+ "dependencies": {
+ "exclusiveMaximum": [ "maximum" ],
+ "exclusiveMinimum": [ "minimum" ]
+ },
+ "default": {}
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv/package.json b/tools/node_modules/eslint/node_modules/ajv/package.json
new file mode 100644
index 0000000000..92d497ec17
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/package.json
@@ -0,0 +1,131 @@
+{
+ "_from": "ajv@^5.3.0",
+ "_id": "ajv@5.5.0",
+ "_inBundle": false,
+ "_integrity": "sha1-6yhAdG6dxIvV4GOjbj/UAMXqtak=",
+ "_location": "/eslint/ajv",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "ajv@^5.3.0",
+ "name": "ajv",
+ "escapedName": "ajv",
+ "rawSpec": "^5.3.0",
+ "saveSpec": null,
+ "fetchSpec": "^5.3.0"
+ },
+ "_requiredBy": [
+ "/eslint",
+ "/eslint/table"
+ ],
+ "_resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.0.tgz",
+ "_shasum": "eb2840746e9dc48bd5e063a36e3fd400c5eab5a9",
+ "_spec": "ajv@^5.3.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint",
+ "author": {
+ "name": "Evgeny Poberezkin"
+ },
+ "bugs": {
+ "url": "https://github.com/epoberezkin/ajv/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "co": "^4.6.0",
+ "fast-deep-equal": "^1.0.0",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.3.0"
+ },
+ "deprecated": false,
+ "description": "Another JSON Schema Validator",
+ "devDependencies": {
+ "ajv-async": "^0.1.0",
+ "bluebird": "^3.1.5",
+ "brfs": "^1.4.3",
+ "browserify": "^14.1.0",
+ "chai": "^4.0.1",
+ "coveralls": "^3.0.0",
+ "del-cli": "^1.1.0",
+ "dot": "^1.0.3",
+ "eslint": "^4.1.0",
+ "gh-pages-generator": "^0.2.0",
+ "glob": "^7.0.0",
+ "if-node-version": "^1.0.0",
+ "js-beautify": "^1.7.3",
+ "jshint": "^2.9.4",
+ "json-schema-test": "^1.3.0",
+ "karma": "^1.0.0",
+ "karma-chrome-launcher": "^2.0.0",
+ "karma-mocha": "^1.1.1",
+ "karma-phantomjs-launcher": "^1.0.0",
+ "karma-sauce-launcher": "^1.1.0",
+ "mocha": "^4.0.0",
+ "nodent": "^3.0.17",
+ "nyc": "^11.0.2",
+ "phantomjs-prebuilt": "^2.1.4",
+ "pre-commit": "^1.1.1",
+ "regenerator": "0.11.1",
+ "require-globify": "^1.3.0",
+ "typescript": "^2.0.3",
+ "uglify-js": "^3.1.5",
+ "watch": "^1.0.0"
+ },
+ "files": [
+ "lib/",
+ "dist/",
+ "scripts/",
+ "LICENSE",
+ ".tonic_example.js"
+ ],
+ "homepage": "https://github.com/epoberezkin/ajv",
+ "keywords": [
+ "JSON",
+ "schema",
+ "validator",
+ "validation",
+ "jsonschema",
+ "json-schema",
+ "json-schema-validator",
+ "json-schema-validation"
+ ],
+ "license": "MIT",
+ "main": "lib/ajv.js",
+ "name": "ajv",
+ "nyc": {
+ "exclude": [
+ "**/spec/**",
+ "node_modules"
+ ],
+ "reporter": [
+ "lcov",
+ "text-summary"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/epoberezkin/ajv.git"
+ },
+ "scripts": {
+ "build": "del-cli lib/dotjs/*.js && node scripts/compile-dots.js",
+ "bundle": "node ./scripts/bundle.js . Ajv pure_getters",
+ "bundle-all": "del-cli dist && npm run bundle && npm run bundle-regenerator && npm run bundle-nodent",
+ "bundle-beautify": "node ./scripts/bundle.js js-beautify",
+ "bundle-nodent": "node ./scripts/bundle.js nodent",
+ "bundle-regenerator": "node ./scripts/bundle.js regenerator",
+ "eslint": "if-node-version \">=4\" eslint lib/*.js lib/compile/*.js spec scripts",
+ "jshint": "jshint lib/*.js lib/**/*.js --exclude lib/dotjs/**/*",
+ "prepublish": "npm run build && npm run bundle-all",
+ "test": "npm run jshint && npm run eslint && npm run test-ts && npm run build && npm run test-cov && if-node-version 4 npm run test-browser",
+ "test-browser": "del-cli .browser && npm run bundle-all && scripts/prepare-tests && npm run test-karma",
+ "test-cov": "nyc npm run test-spec",
+ "test-debug": "mocha spec/*.spec.js --debug-brk -R spec",
+ "test-fast": "AJV_FAST_TEST=true npm run test-spec",
+ "test-karma": "karma start --single-run --browsers PhantomJS",
+ "test-spec": "mocha spec/*.spec.js -R spec $(if-node-version 7 echo --harmony-async-await)",
+ "test-ts": "tsc --target ES5 --noImplicitAny lib/ajv.d.ts",
+ "watch": "watch 'npm run build' ./lib/dot"
+ },
+ "tonicExampleFilename": ".tonic_example.js",
+ "typings": "lib/ajv.d.ts",
+ "version": "5.5.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/ajv/scripts/.eslintrc.yml b/tools/node_modules/eslint/node_modules/ajv/scripts/.eslintrc.yml
new file mode 100644
index 0000000000..493d7d312d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/scripts/.eslintrc.yml
@@ -0,0 +1,3 @@
+rules:
+ no-console: 0
+ no-empty: [2, allowEmptyCatch: true]
diff --git a/tools/node_modules/eslint/node_modules/ajv/scripts/bundle.js b/tools/node_modules/eslint/node_modules/ajv/scripts/bundle.js
new file mode 100644
index 0000000000..e381a762d2
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/scripts/bundle.js
@@ -0,0 +1,61 @@
+'use strict';
+
+var fs = require('fs')
+ , path = require('path')
+ , browserify = require('browserify')
+ , uglify = require('uglify-js');
+
+var pkg = process.argv[2]
+ , standalone = process.argv[3]
+ , compress = process.argv[4];
+
+var packageDir = path.join(__dirname, '..');
+if (pkg != '.') packageDir = path.join(packageDir, 'node_modules', pkg);
+
+var json = require(path.join(packageDir, 'package.json'));
+
+var distDir = path.join(__dirname, '..', 'dist');
+if (!fs.existsSync(distDir)) fs.mkdirSync(distDir);
+
+var bOpts = {};
+if (standalone) bOpts.standalone = standalone;
+
+browserify(bOpts)
+.require(path.join(packageDir, json.main), {expose: json.name})
+.bundle(function (err, buf) {
+ if (err) {
+ console.error('browserify error:', err);
+ process.exit(1);
+ }
+
+ var outputFile = path.join(distDir, json.name);
+ var uglifyOpts = {
+ warnings: true,
+ compress: {},
+ output: {
+ preamble: '/* ' + json.name + ' ' + json.version + ': ' + json.description + ' */'
+ }
+ };
+ if (compress) {
+ var compressOpts = compress.split(',');
+ for (var i=0, il = compressOpts.length; i<il; ++i) {
+ var pair = compressOpts[i].split('=');
+ uglifyOpts.compress[pair[0]] = pair.length < 1 || pair[1] != 'false';
+ }
+ }
+ if (standalone) {
+ uglifyOpts.sourceMap = {
+ filename: json.name + '.min.js',
+ url: json.name + '.min.js.map'
+ };
+ }
+
+ var result = uglify.minify(buf.toString(), uglifyOpts);
+ fs.writeFileSync(outputFile + '.min.js', result.code);
+ if (result.map) fs.writeFileSync(outputFile + '.min.js.map', result.map);
+ if (standalone) fs.writeFileSync(outputFile + '.bundle.js', buf);
+ if (result.warnings) {
+ for (var j=0, jl = result.warnings.length; j<jl; ++j)
+ console.warn('UglifyJS warning:', result.warnings[j]);
+ }
+});
diff --git a/tools/node_modules/eslint/node_modules/ajv/scripts/compile-dots.js b/tools/node_modules/eslint/node_modules/ajv/scripts/compile-dots.js
new file mode 100644
index 0000000000..5a21a7dddf
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/scripts/compile-dots.js
@@ -0,0 +1,73 @@
+//compile doT templates to js functions
+'use strict';
+
+var glob = require('glob')
+ , fs = require('fs')
+ , path = require('path')
+ , doT = require('dot')
+ , beautify = require('js-beautify').js_beautify;
+
+var defsRootPath = process.argv[2] || path.join(__dirname, '../lib');
+
+var defs = {};
+var defFiles = glob.sync('./dot/**/*.def', { cwd: defsRootPath });
+defFiles.forEach(function (f) {
+ var name = path.basename(f, '.def');
+ defs[name] = fs.readFileSync(path.join(defsRootPath, f));
+});
+
+var filesRootPath = process.argv[3] || path.join(__dirname, '../lib');
+var files = glob.sync('./dot/**/*.jst', { cwd: filesRootPath });
+
+var dotjsPath = path.join(filesRootPath, './dotjs');
+try { fs.mkdirSync(dotjsPath); } catch(e) {}
+
+console.log('\n\nCompiling:');
+
+var FUNCTION_NAME = /function\s+anonymous\s*\(it[^)]*\)\s*{/;
+var OUT_EMPTY_STRING = /out\s*\+=\s*'\s*';/g;
+var ISTANBUL = /'(istanbul[^']+)';/g;
+var ERROR_KEYWORD = /\$errorKeyword/g;
+var ERROR_KEYWORD_OR = /\$errorKeyword\s+\|\|/g;
+var VARS = [
+ '$errs', '$valid', '$lvl', '$data', '$dataLvl',
+ '$errorKeyword', '$closingBraces', '$schemaPath',
+ '$validate'
+];
+
+files.forEach(function (f) {
+ var keyword = path.basename(f, '.jst');
+ var targetPath = path.join(dotjsPath, keyword + '.js');
+ var template = fs.readFileSync(path.join(filesRootPath, f));
+ var code = doT.compile(template, defs);
+ code = code.toString()
+ .replace(OUT_EMPTY_STRING, '')
+ .replace(FUNCTION_NAME, 'function generate_' + keyword + '(it, $keyword, $ruleType) {')
+ .replace(ISTANBUL, '/* $1 */');
+ removeAlwaysFalsyInOr();
+ VARS.forEach(removeUnusedVar);
+ code = "'use strict';\nmodule.exports = " + code;
+ code = beautify(code, { indent_size: 2 }) + '\n';
+ fs.writeFileSync(targetPath, code);
+ console.log('compiled', keyword);
+
+ function removeUnusedVar(v) {
+ v = v.replace(/\$/g, '\\$$');
+ var regexp = new RegExp(v + '[^A-Za-z0-9_$]', 'g');
+ var count = occurrences(regexp);
+ if (count == 1) {
+ regexp = new RegExp('var\\s+' + v + '\\s*=[^;]+;|var\\s+' + v + ';');
+ code = code.replace(regexp, '');
+ }
+ }
+
+ function removeAlwaysFalsyInOr() {
+ var countUsed = occurrences(ERROR_KEYWORD);
+ var countOr = occurrences(ERROR_KEYWORD_OR);
+ if (countUsed == countOr + 1) code = code.replace(ERROR_KEYWORD_OR, '');
+ }
+
+ function occurrences(regexp) {
+ return (code.match(regexp) || []).length;
+ }
+});
diff --git a/tools/node_modules/eslint/node_modules/ajv/scripts/info b/tools/node_modules/eslint/node_modules/ajv/scripts/info
new file mode 100755
index 0000000000..77269ab5fa
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/scripts/info
@@ -0,0 +1,10 @@
+#!/usr/bin/env node
+
+'use strict';
+
+var fs = require('fs');
+var name = process.argv[2] || '.';
+var property = process.argv[3] || 'version';
+if (name != '.') name = 'node_modules/' + name;
+var json = JSON.parse(fs.readFileSync(name + '/package.json', 'utf8'));
+console.log(json[property]);
diff --git a/tools/node_modules/eslint/node_modules/ajv/scripts/prepare-tests b/tools/node_modules/eslint/node_modules/ajv/scripts/prepare-tests
new file mode 100755
index 0000000000..6f62634e23
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/scripts/prepare-tests
@@ -0,0 +1,9 @@
+#!/usr/bin/env sh
+
+set -e
+
+mkdir -p .browser
+
+find spec -type f -name '*.spec.js' | \
+xargs -I {} sh -c \
+'export f="{}"; browserify $f -t require-globify -t brfs -x ajv -u buffer -o $(echo $f | sed -e "s/spec/.browser/");'
diff --git a/tools/node_modules/eslint/node_modules/ajv/scripts/travis-gh-pages b/tools/node_modules/eslint/node_modules/ajv/scripts/travis-gh-pages
new file mode 100755
index 0000000000..46ded1611a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/scripts/travis-gh-pages
@@ -0,0 +1,23 @@
+#!/usr/bin/env bash
+
+set -e
+
+if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" && $TRAVIS_JOB_NUMBER =~ ".3" ]]; then
+ git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qE '\.md$|^LICENSE$|travis-gh-pages$' && {
+ rm -rf ../gh-pages
+ git clone -b gh-pages --single-branch https://${GITHUB_TOKEN}@github.com/epoberezkin/ajv.git ../gh-pages
+ mkdir -p ../gh-pages/_source
+ cp *.md ../gh-pages/_source
+ cp LICENSE ../gh-pages/_source
+ currentDir=$(pwd)
+ cd ../gh-pages
+ $currentDir/node_modules/.bin/gh-pages-generator
+ # remove logo from README
+ sed -i -E "s/<img[^>]+ajv_logo[^>]+>//" index.md
+ git config user.email "$GIT_USER_EMAIL"
+ git config user.name "$GIT_USER_NAME"
+ git add .
+ git commit -am "updated by travis build #$TRAVIS_BUILD_NUMBER"
+ git push --quiet origin gh-pages > /dev/null 2>&1
+ }
+fi
diff --git a/tools/node_modules/eslint/node_modules/ansi-escapes/index.js b/tools/node_modules/eslint/node_modules/ansi-escapes/index.js
new file mode 100644
index 0000000000..4d47b1098d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ansi-escapes/index.js
@@ -0,0 +1,102 @@
+'use strict';
+const x = module.exports;
+const ESC = '\u001B[';
+const isTerminalApp = process.env.TERM_PROGRAM === 'Apple_Terminal';
+
+x.cursorTo = (x, y) => {
+ if (typeof x !== 'number') {
+ throw new TypeError('The `x` argument is required');
+ }
+
+ if (typeof y !== 'number') {
+ return ESC + (x + 1) + 'G';
+ }
+
+ return ESC + (y + 1) + ';' + (x + 1) + 'H';
+};
+
+x.cursorMove = (x, y) => {
+ if (typeof x !== 'number') {
+ throw new TypeError('The `x` argument is required');
+ }
+
+ let ret = '';
+
+ if (x < 0) {
+ ret += ESC + (-x) + 'D';
+ } else if (x > 0) {
+ ret += ESC + x + 'C';
+ }
+
+ if (y < 0) {
+ ret += ESC + (-y) + 'A';
+ } else if (y > 0) {
+ ret += ESC + y + 'B';
+ }
+
+ return ret;
+};
+
+x.cursorUp = count => ESC + (typeof count === 'number' ? count : 1) + 'A';
+x.cursorDown = count => ESC + (typeof count === 'number' ? count : 1) + 'B';
+x.cursorForward = count => ESC + (typeof count === 'number' ? count : 1) + 'C';
+x.cursorBackward = count => ESC + (typeof count === 'number' ? count : 1) + 'D';
+
+x.cursorLeft = ESC + 'G';
+x.cursorSavePosition = ESC + (isTerminalApp ? '7' : 's');
+x.cursorRestorePosition = ESC + (isTerminalApp ? '8' : 'u');
+x.cursorGetPosition = ESC + '6n';
+x.cursorNextLine = ESC + 'E';
+x.cursorPrevLine = ESC + 'F';
+x.cursorHide = ESC + '?25l';
+x.cursorShow = ESC + '?25h';
+
+x.eraseLines = count => {
+ let clear = '';
+
+ for (let i = 0; i < count; i++) {
+ clear += x.eraseLine + (i < count - 1 ? x.cursorUp() : '');
+ }
+
+ if (count) {
+ clear += x.cursorLeft;
+ }
+
+ return clear;
+};
+
+x.eraseEndLine = ESC + 'K';
+x.eraseStartLine = ESC + '1K';
+x.eraseLine = ESC + '2K';
+x.eraseDown = ESC + 'J';
+x.eraseUp = ESC + '1J';
+x.eraseScreen = ESC + '2J';
+x.scrollUp = ESC + 'S';
+x.scrollDown = ESC + 'T';
+
+x.clearScreen = '\u001Bc';
+x.beep = '\u0007';
+
+x.image = (buf, opts) => {
+ opts = opts || {};
+
+ let ret = '\u001B]1337;File=inline=1';
+
+ if (opts.width) {
+ ret += `;width=${opts.width}`;
+ }
+
+ if (opts.height) {
+ ret += `;height=${opts.height}`;
+ }
+
+ if (opts.preserveAspectRatio === false) {
+ ret += ';preserveAspectRatio=0';
+ }
+
+ return ret + ':' + buf.toString('base64') + '\u0007';
+};
+
+x.iTerm = {};
+
+x.iTerm.setCwd = cwd => '\u001B]50;CurrentDir=' + (cwd || process.cwd()) + '\u0007';
diff --git a/tools/node_modules/eslint/node_modules/ansi-escapes/license b/tools/node_modules/eslint/node_modules/ansi-escapes/license
new file mode 100644
index 0000000000..e7af2f7710
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ansi-escapes/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/tools/node_modules/eslint/node_modules/ansi-escapes/package.json b/tools/node_modules/eslint/node_modules/ansi-escapes/package.json
new file mode 100644
index 0000000000..f192f9b474
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ansi-escapes/package.json
@@ -0,0 +1,82 @@
+{
+ "_from": "ansi-escapes@^3.0.0",
+ "_id": "ansi-escapes@3.0.0",
+ "_inBundle": false,
+ "_integrity": "sha512-O/klc27mWNUigtv0F8NJWbLF00OcegQalkqKURWdosW08YZKi4m6CnSUSvIZG1otNJbTWhN01Hhz389DW7mvDQ==",
+ "_location": "/eslint/ansi-escapes",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "ansi-escapes@^3.0.0",
+ "name": "ansi-escapes",
+ "escapedName": "ansi-escapes",
+ "rawSpec": "^3.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^3.0.0"
+ },
+ "_requiredBy": [
+ "/eslint/inquirer"
+ ],
+ "_resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.0.0.tgz",
+ "_shasum": "ec3e8b4e9f8064fc02c3ac9b65f1c275bda8ef92",
+ "_spec": "ansi-escapes@^3.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/inquirer",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/ansi-escapes/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "ANSI escape codes for manipulating the terminal",
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/ansi-escapes#readme",
+ "keywords": [
+ "ansi",
+ "terminal",
+ "console",
+ "cli",
+ "string",
+ "tty",
+ "escape",
+ "escapes",
+ "formatting",
+ "shell",
+ "xterm",
+ "log",
+ "logging",
+ "command-line",
+ "text",
+ "vt100",
+ "sequence",
+ "control",
+ "code",
+ "codes",
+ "cursor",
+ "iterm",
+ "iterm2"
+ ],
+ "license": "MIT",
+ "name": "ansi-escapes",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/ansi-escapes.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "3.0.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/ansi-escapes/readme.md b/tools/node_modules/eslint/node_modules/ansi-escapes/readme.md
new file mode 100644
index 0000000000..45490e9ecb
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ansi-escapes/readme.md
@@ -0,0 +1,174 @@
+# ansi-escapes [![Build Status](https://travis-ci.org/sindresorhus/ansi-escapes.svg?branch=master)](https://travis-ci.org/sindresorhus/ansi-escapes)
+
+> [ANSI escape codes](http://www.termsys.demon.co.uk/vtansi.htm) for manipulating the terminal
+
+
+## Install
+
+```
+$ npm install ansi-escapes
+```
+
+
+## Usage
+
+```js
+const ansiEscapes = require('ansi-escapes');
+
+// Moves the cursor two rows up and to the left
+process.stdout.write(ansiEscapes.cursorUp(2) + ansiEscapes.cursorLeft);
+//=> '\u001B[2A\u001B[1000D'
+```
+
+
+## API
+
+### cursorTo(x, [y])
+
+Set the absolute position of the cursor. `x0` `y0` is the top left of the screen.
+
+### cursorMove(x, [y])
+
+Set the position of the cursor relative to its current position.
+
+### cursorUp(count)
+
+Move cursor up a specific amount of rows. Default is `1`.
+
+### cursorDown(count)
+
+Move cursor down a specific amount of rows. Default is `1`.
+
+### cursorForward(count)
+
+Move cursor forward a specific amount of rows. Default is `1`.
+
+### cursorBackward(count)
+
+Move cursor backward a specific amount of rows. Default is `1`.
+
+### cursorLeft
+
+Move cursor to the left side.
+
+### cursorSavePosition
+
+Save cursor position.
+
+### cursorRestorePosition
+
+Restore saved cursor position.
+
+### cursorGetPosition
+
+Get cursor position.
+
+### cursorNextLine
+
+Move cursor to the next line.
+
+### cursorPrevLine
+
+Move cursor to the previous line.
+
+### cursorHide
+
+Hide cursor.
+
+### cursorShow
+
+Show cursor.
+
+### eraseLines(count)
+
+Erase from the current cursor position up the specified amount of rows.
+
+### eraseEndLine
+
+Erase from the current cursor position to the end of the current line.
+
+### eraseStartLine
+
+Erase from the current cursor position to the start of the current line.
+
+### eraseLine
+
+Erase the entire current line.
+
+### eraseDown
+
+Erase the screen from the current line down to the bottom of the screen.
+
+### eraseUp
+
+Erase the screen from the current line up to the top of the screen.
+
+### eraseScreen
+
+Erase the screen and move the cursor the top left position.
+
+### scrollUp
+
+Scroll display up one line.
+
+### scrollDown
+
+Scroll display down one line.
+
+### clearScreen
+
+Clear the terminal screen.
+
+### beep
+
+Output a beeping sound.
+
+### image(input, [options])
+
+Display an image.
+
+*Currently only supported on iTerm2 >=3*
+
+See [term-img](https://github.com/sindresorhus/term-img) for a higher-level module.
+
+#### input
+
+Type: `Buffer`
+
+Buffer of an image. Usually read in with `fs.readFile()`.
+
+#### options
+
+##### width
+##### height
+
+Type: `string` `number`
+
+The width and height are given as a number followed by a unit, or the word "auto".
+
+- `N`: N character cells.
+- `Npx`: N pixels.
+- `N%`: N percent of the session's width or height.
+- `auto`: The image's inherent size will be used to determine an appropriate dimension.
+
+##### preserveAspectRatio
+
+Type: `boolean`<br>
+Default: `true`
+
+### iTerm.setCwd([path])
+
+Type: `string`<br>
+Default: `process.cwd()`
+
+[Inform iTerm2](https://www.iterm2.com/documentation-escape-codes.html) of the current directory to help semantic history and enable [Cmd-clicking relative paths](https://coderwall.com/p/b7e82q/quickly-open-files-in-iterm-with-cmd-click).
+
+
+## Related
+
+- [ansi-styles](https://github.com/chalk/ansi-styles) - ANSI escape codes for styling strings in the terminal
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/tools/node_modules/eslint/node_modules/ansi-regex/index.js b/tools/node_modules/eslint/node_modules/ansi-regex/index.js
new file mode 100644
index 0000000000..b9574ed7e8
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ansi-regex/index.js
@@ -0,0 +1,4 @@
+'use strict';
+module.exports = function () {
+ return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g;
+};
diff --git a/tools/node_modules/eslint/node_modules/ansi-regex/license b/tools/node_modules/eslint/node_modules/ansi-regex/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ansi-regex/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/tools/node_modules/eslint/node_modules/ansi-regex/package.json b/tools/node_modules/eslint/node_modules/ansi-regex/package.json
new file mode 100644
index 0000000000..73a3a47015
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ansi-regex/package.json
@@ -0,0 +1,109 @@
+{
+ "_from": "ansi-regex@^2.0.0",
+ "_id": "ansi-regex@2.1.1",
+ "_inBundle": false,
+ "_integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
+ "_location": "/eslint/ansi-regex",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "ansi-regex@^2.0.0",
+ "name": "ansi-regex",
+ "escapedName": "ansi-regex",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/eslint/babel-code-frame/strip-ansi",
+ "/eslint/has-ansi"
+ ],
+ "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
+ "_shasum": "c3b33ab5ee360d86e0e628f0468ae7ef27d654df",
+ "_spec": "ansi-regex@^2.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/has-ansi",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/chalk/ansi-regex/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Regular expression for matching ANSI escape codes",
+ "devDependencies": {
+ "ava": "0.17.0",
+ "xo": "0.16.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/chalk/ansi-regex#readme",
+ "keywords": [
+ "ansi",
+ "styles",
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "cli",
+ "string",
+ "tty",
+ "escape",
+ "formatting",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "command-line",
+ "text",
+ "regex",
+ "regexp",
+ "re",
+ "match",
+ "test",
+ "find",
+ "pattern"
+ ],
+ "license": "MIT",
+ "maintainers": [
+ {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ {
+ "name": "Joshua Appelman",
+ "email": "jappelman@xebia.com",
+ "url": "jbnicolai.com"
+ },
+ {
+ "name": "JD Ballard",
+ "email": "i.am.qix@gmail.com",
+ "url": "github.com/qix-"
+ }
+ ],
+ "name": "ansi-regex",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/chalk/ansi-regex.git"
+ },
+ "scripts": {
+ "test": "xo && ava --verbose",
+ "view-supported": "node fixtures/view-codes.js"
+ },
+ "version": "2.1.1",
+ "xo": {
+ "rules": {
+ "guard-for-in": 0,
+ "no-loop-func": 0
+ }
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/ansi-regex/readme.md b/tools/node_modules/eslint/node_modules/ansi-regex/readme.md
new file mode 100644
index 0000000000..6a928edf0f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ansi-regex/readme.md
@@ -0,0 +1,39 @@
+# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex)
+
+> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
+
+
+## Install
+
+```
+$ npm install --save ansi-regex
+```
+
+
+## Usage
+
+```js
+const ansiRegex = require('ansi-regex');
+
+ansiRegex().test('\u001b[4mcake\u001b[0m');
+//=> true
+
+ansiRegex().test('cake');
+//=> false
+
+'\u001b[4mcake\u001b[0m'.match(ansiRegex());
+//=> ['\u001b[4m', '\u001b[0m']
+```
+
+## FAQ
+
+### Why do you test for codes not in the ECMA 48 standard?
+
+Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. If I recall correctly, we test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them.
+
+On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out.
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/tools/node_modules/eslint/node_modules/ansi-styles/index.js b/tools/node_modules/eslint/node_modules/ansi-styles/index.js
new file mode 100644
index 0000000000..78945278f7
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ansi-styles/index.js
@@ -0,0 +1,65 @@
+'use strict';
+
+function assembleStyles () {
+ var styles = {
+ modifiers: {
+ reset: [0, 0],
+ bold: [1, 22], // 21 isn't widely supported and 22 does the same thing
+ dim: [2, 22],
+ italic: [3, 23],
+ underline: [4, 24],
+ inverse: [7, 27],
+ hidden: [8, 28],
+ strikethrough: [9, 29]
+ },
+ colors: {
+ black: [30, 39],
+ red: [31, 39],
+ green: [32, 39],
+ yellow: [33, 39],
+ blue: [34, 39],
+ magenta: [35, 39],
+ cyan: [36, 39],
+ white: [37, 39],
+ gray: [90, 39]
+ },
+ bgColors: {
+ bgBlack: [40, 49],
+ bgRed: [41, 49],
+ bgGreen: [42, 49],
+ bgYellow: [43, 49],
+ bgBlue: [44, 49],
+ bgMagenta: [45, 49],
+ bgCyan: [46, 49],
+ bgWhite: [47, 49]
+ }
+ };
+
+ // fix humans
+ styles.colors.grey = styles.colors.gray;
+
+ Object.keys(styles).forEach(function (groupName) {
+ var group = styles[groupName];
+
+ Object.keys(group).forEach(function (styleName) {
+ var style = group[styleName];
+
+ styles[styleName] = group[styleName] = {
+ open: '\u001b[' + style[0] + 'm',
+ close: '\u001b[' + style[1] + 'm'
+ };
+ });
+
+ Object.defineProperty(styles, groupName, {
+ value: group,
+ enumerable: false
+ });
+ });
+
+ return styles;
+}
+
+Object.defineProperty(module, 'exports', {
+ enumerable: true,
+ get: assembleStyles
+});
diff --git a/tools/node_modules/eslint/node_modules/ansi-styles/license b/tools/node_modules/eslint/node_modules/ansi-styles/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ansi-styles/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/tools/node_modules/eslint/node_modules/ansi-styles/package.json b/tools/node_modules/eslint/node_modules/ansi-styles/package.json
new file mode 100644
index 0000000000..f50ed83ced
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ansi-styles/package.json
@@ -0,0 +1,90 @@
+{
+ "_from": "ansi-styles@^2.2.1",
+ "_id": "ansi-styles@2.2.1",
+ "_inBundle": false,
+ "_integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
+ "_location": "/eslint/ansi-styles",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "ansi-styles@^2.2.1",
+ "name": "ansi-styles",
+ "escapedName": "ansi-styles",
+ "rawSpec": "^2.2.1",
+ "saveSpec": null,
+ "fetchSpec": "^2.2.1"
+ },
+ "_requiredBy": [
+ "/eslint/babel-code-frame/chalk"
+ ],
+ "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
+ "_shasum": "b432dd3358b634cf75e1e4664368240533c1ddbe",
+ "_spec": "ansi-styles@^2.2.1",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/babel-code-frame/node_modules/chalk",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/chalk/ansi-styles/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "ANSI escape codes for styling strings in the terminal",
+ "devDependencies": {
+ "mocha": "*"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/chalk/ansi-styles#readme",
+ "keywords": [
+ "ansi",
+ "styles",
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "cli",
+ "string",
+ "tty",
+ "escape",
+ "formatting",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "log",
+ "logging",
+ "command-line",
+ "text"
+ ],
+ "license": "MIT",
+ "maintainers": [
+ {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ {
+ "name": "Joshua Appelman",
+ "email": "jappelman@xebia.com",
+ "url": "jbnicolai.com"
+ }
+ ],
+ "name": "ansi-styles",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/chalk/ansi-styles.git"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "version": "2.2.1"
+}
diff --git a/tools/node_modules/eslint/node_modules/ansi-styles/readme.md b/tools/node_modules/eslint/node_modules/ansi-styles/readme.md
new file mode 100644
index 0000000000..3f933f6162
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ansi-styles/readme.md
@@ -0,0 +1,86 @@
+# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles)
+
+> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal
+
+You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings.
+
+![](screenshot.png)
+
+
+## Install
+
+```
+$ npm install --save ansi-styles
+```
+
+
+## Usage
+
+```js
+var ansi = require('ansi-styles');
+
+console.log(ansi.green.open + 'Hello world!' + ansi.green.close);
+```
+
+
+## API
+
+Each style has an `open` and `close` property.
+
+
+## Styles
+
+### Modifiers
+
+- `reset`
+- `bold`
+- `dim`
+- `italic` *(not widely supported)*
+- `underline`
+- `inverse`
+- `hidden`
+- `strikethrough` *(not widely supported)*
+
+### Colors
+
+- `black`
+- `red`
+- `green`
+- `yellow`
+- `blue`
+- `magenta`
+- `cyan`
+- `white`
+- `gray`
+
+### Background colors
+
+- `bgBlack`
+- `bgRed`
+- `bgGreen`
+- `bgYellow`
+- `bgBlue`
+- `bgMagenta`
+- `bgCyan`
+- `bgWhite`
+
+
+## Advanced usage
+
+By default you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module.
+
+- `ansi.modifiers`
+- `ansi.colors`
+- `ansi.bgColors`
+
+
+###### Example
+
+```js
+console.log(ansi.colors.green.open);
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/tools/node_modules/eslint/node_modules/argparse/LICENSE b/tools/node_modules/eslint/node_modules/argparse/LICENSE
new file mode 100644
index 0000000000..1afdae5584
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/argparse/LICENSE
@@ -0,0 +1,21 @@
+(The MIT License)
+
+Copyright (C) 2012 by Vitaly Puzrin
+
+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/tools/node_modules/eslint/node_modules/argparse/README.md b/tools/node_modules/eslint/node_modules/argparse/README.md
new file mode 100644
index 0000000000..2d0bcab435
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/argparse/README.md
@@ -0,0 +1,253 @@
+argparse
+========
+
+[![Build Status](https://secure.travis-ci.org/nodeca/argparse.png?branch=master)](http://travis-ci.org/nodeca/argparse)
+[![NPM version](https://img.shields.io/npm/v/argparse.svg)](https://www.npmjs.org/package/argparse)
+
+CLI arguments parser for node.js. Javascript port of python's
+[argparse](http://docs.python.org/dev/library/argparse.html) module
+(original version 3.2). That's a full port, except some very rare options,
+recorded in issue tracker.
+
+**NB. Difference with original.**
+
+- Method names changed to camelCase. See [generated docs](http://nodeca.github.com/argparse/).
+- Use `defaultValue` instead of `default`.
+
+
+Example
+=======
+
+test.js file:
+
+```javascript
+#!/usr/bin/env node
+'use strict';
+
+var ArgumentParser = require('../lib/argparse').ArgumentParser;
+var parser = new ArgumentParser({
+ version: '0.0.1',
+ addHelp:true,
+ description: 'Argparse example'
+});
+parser.addArgument(
+ [ '-f', '--foo' ],
+ {
+ help: 'foo bar'
+ }
+);
+parser.addArgument(
+ [ '-b', '--bar' ],
+ {
+ help: 'bar foo'
+ }
+);
+parser.addArgument(
+ '--baz',
+ {
+ help: 'baz bar'
+ }
+);
+var args = parser.parseArgs();
+console.dir(args);
+```
+
+Display help:
+
+```
+$ ./test.js -h
+usage: example.js [-h] [-v] [-f FOO] [-b BAR] [--baz BAZ]
+
+Argparse example
+
+Optional arguments:
+ -h, --help Show this help message and exit.
+ -v, --version Show program's version number and exit.
+ -f FOO, --foo FOO foo bar
+ -b BAR, --bar BAR bar foo
+ --baz BAZ baz bar
+```
+
+Parse arguments:
+
+```
+$ ./test.js -f=3 --bar=4 --baz 5
+{ foo: '3', bar: '4', baz: '5' }
+```
+
+More [examples](https://github.com/nodeca/argparse/tree/master/examples).
+
+
+ArgumentParser objects
+======================
+
+```
+new ArgumentParser({paramters hash});
+```
+
+Creates a new ArgumentParser object.
+
+**Supported params:**
+
+- ```description``` - Text to display before the argument help.
+- ```epilog``` - Text to display after the argument help.
+- ```addHelp``` - Add a -h/–help option to the parser. (default: true)
+- ```argumentDefault``` - Set the global default value for arguments. (default: null)
+- ```parents``` - A list of ArgumentParser objects whose arguments should also be included.
+- ```prefixChars``` - The set of characters that prefix optional arguments. (default: ‘-‘)
+- ```formatterClass``` - A class for customizing the help output.
+- ```prog``` - The name of the program (default: `path.basename(process.argv[1])`)
+- ```usage``` - The string describing the program usage (default: generated)
+- ```conflictHandler``` - Usually unnecessary, defines strategy for resolving conflicting optionals.
+
+**Not supportied yet**
+
+- ```fromfilePrefixChars``` - The set of characters that prefix files from which additional arguments should be read.
+
+
+Details in [original ArgumentParser guide](http://docs.python.org/dev/library/argparse.html#argumentparser-objects)
+
+
+addArgument() method
+====================
+
+```
+ArgumentParser.addArgument(name or flag or [name] or [flags...], {options})
+```
+
+Defines how a single command-line argument should be parsed.
+
+- ```name or flag or [name] or [flags...]``` - Either a positional name
+ (e.g., `'foo'`), a single option (e.g., `'-f'` or `'--foo'`), an array
+ of a single positional name (e.g., `['foo']`), or an array of options
+ (e.g., `['-f', '--foo']`).
+
+Options:
+
+- ```action``` - The basic type of action to be taken when this argument is encountered at the command line.
+- ```nargs```- The number of command-line arguments that should be consumed.
+- ```constant``` - A constant value required by some action and nargs selections.
+- ```defaultValue``` - The value produced if the argument is absent from the command line.
+- ```type``` - The type to which the command-line argument should be converted.
+- ```choices``` - A container of the allowable values for the argument.
+- ```required``` - Whether or not the command-line option may be omitted (optionals only).
+- ```help``` - A brief description of what the argument does.
+- ```metavar``` - A name for the argument in usage messages.
+- ```dest``` - The name of the attribute to be added to the object returned by parseArgs().
+
+Details in [original add_argument guide](http://docs.python.org/dev/library/argparse.html#the-add-argument-method)
+
+
+Action (some details)
+================
+
+ArgumentParser objects associate command-line arguments with actions.
+These actions can do just about anything with the command-line arguments associated
+with them, though most actions simply add an attribute to the object returned by
+parseArgs(). The action keyword argument specifies how the command-line arguments
+should be handled. The supported actions are:
+
+- ```store``` - Just stores the argument’s value. This is the default action.
+- ```storeConst``` - Stores value, specified by the const keyword argument.
+ (Note that the const keyword argument defaults to the rather unhelpful None.)
+ The 'storeConst' action is most commonly used with optional arguments, that
+ specify some sort of flag.
+- ```storeTrue``` and ```storeFalse``` - Stores values True and False
+ respectively. These are special cases of 'storeConst'.
+- ```append``` - Stores a list, and appends each argument value to the list.
+ This is useful to allow an option to be specified multiple times.
+- ```appendConst``` - Stores a list, and appends value, specified by the
+ const keyword argument to the list. (Note, that the const keyword argument defaults
+ is None.) The 'appendConst' action is typically used when multiple arguments need
+ to store constants to the same list.
+- ```count``` - Counts the number of times a keyword argument occurs. For example,
+ used for increasing verbosity levels.
+- ```help``` - Prints a complete help message for all the options in the current
+ parser and then exits. By default a help action is automatically added to the parser.
+ See ArgumentParser for details of how the output is created.
+- ```version``` - Prints version information and exit. Expects a `version=`
+ keyword argument in the addArgument() call.
+
+Details in [original action guide](http://docs.python.org/dev/library/argparse.html#action)
+
+
+Sub-commands
+============
+
+ArgumentParser.addSubparsers()
+
+Many programs split their functionality into a number of sub-commands, for
+example, the svn program can invoke sub-commands like `svn checkout`, `svn update`,
+and `svn commit`. Splitting up functionality this way can be a particularly good
+idea when a program performs several different functions which require different
+kinds of command-line arguments. `ArgumentParser` supports creation of such
+sub-commands with `addSubparsers()` method. The `addSubparsers()` method is
+normally called with no arguments and returns an special action object.
+This object has a single method `addParser()`, which takes a command name and
+any `ArgumentParser` constructor arguments, and returns an `ArgumentParser` object
+that can be modified as usual.
+
+Example:
+
+sub_commands.js
+```javascript
+#!/usr/bin/env node
+'use strict';
+
+var ArgumentParser = require('../lib/argparse').ArgumentParser;
+var parser = new ArgumentParser({
+ version: '0.0.1',
+ addHelp:true,
+ description: 'Argparse examples: sub-commands',
+});
+
+var subparsers = parser.addSubparsers({
+ title:'subcommands',
+ dest:"subcommand_name"
+});
+
+var bar = subparsers.addParser('c1', {addHelp:true});
+bar.addArgument(
+ [ '-f', '--foo' ],
+ {
+ action: 'store',
+ help: 'foo3 bar3'
+ }
+);
+var bar = subparsers.addParser(
+ 'c2',
+ {aliases:['co'], addHelp:true}
+);
+bar.addArgument(
+ [ '-b', '--bar' ],
+ {
+ action: 'store',
+ type: 'int',
+ help: 'foo3 bar3'
+ }
+);
+
+var args = parser.parseArgs();
+console.dir(args);
+
+```
+
+Details in [original sub-commands guide](http://docs.python.org/dev/library/argparse.html#sub-commands)
+
+
+Contributors
+============
+
+- [Eugene Shkuropat](https://github.com/shkuropat)
+- [Paul Jacobson](https://github.com/hpaulj)
+
+[others](https://github.com/nodeca/argparse/graphs/contributors)
+
+License
+=======
+
+Copyright (c) 2012 [Vitaly Puzrin](https://github.com/puzrin).
+Released under the MIT license. See
+[LICENSE](https://github.com/nodeca/argparse/blob/master/LICENSE) for details.
+
+
diff --git a/tools/node_modules/eslint/node_modules/argparse/index.js b/tools/node_modules/eslint/node_modules/argparse/index.js
new file mode 100644
index 0000000000..3bbc143200
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/argparse/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./lib/argparse');
diff --git a/tools/node_modules/eslint/node_modules/argparse/lib/action.js b/tools/node_modules/eslint/node_modules/argparse/lib/action.js
new file mode 100644
index 0000000000..ef35989932
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/argparse/lib/action.js
@@ -0,0 +1,146 @@
+/**
+ * class Action
+ *
+ * Base class for all actions
+ * Do not call in your code, use this class only for inherits your own action
+ *
+ * Information about how to convert command line strings to Javascript objects.
+ * Action objects are used by an ArgumentParser to represent the information
+ * needed to parse a single argument from one or more strings from the command
+ * line. The keyword arguments to the Action constructor are also all attributes
+ * of Action instances.
+ *
+ * #####Alowed keywords:
+ *
+ * - `store`
+ * - `storeConstant`
+ * - `storeTrue`
+ * - `storeFalse`
+ * - `append`
+ * - `appendConstant`
+ * - `count`
+ * - `help`
+ * - `version`
+ *
+ * Information about action options see [[Action.new]]
+ *
+ * See also [original guide](http://docs.python.org/dev/library/argparse.html#action)
+ *
+ **/
+
+'use strict';
+
+
+// Constants
+var c = require('./const');
+
+
+/**
+ * new Action(options)
+ *
+ * Base class for all actions. Used only for inherits
+ *
+ *
+ * ##### Options:
+ *
+ * - `optionStrings` A list of command-line option strings for the action.
+ * - `dest` Attribute to hold the created object(s)
+ * - `nargs` The number of command-line arguments that should be consumed.
+ * By default, one argument will be consumed and a single value will be
+ * produced.
+ * - `constant` Default value for an action with no value.
+ * - `defaultValue` The value to be produced if the option is not specified.
+ * - `type` Cast to 'string'|'int'|'float'|'complex'|function (string). If
+ * None, 'string'.
+ * - `choices` The choices available.
+ * - `required` True if the action must always be specified at the command
+ * line.
+ * - `help` The help describing the argument.
+ * - `metavar` The name to be used for the option's argument with the help
+ * string. If None, the 'dest' value will be used as the name.
+ *
+ * ##### nargs supported values:
+ *
+ * - `N` (an integer) consumes N arguments (and produces a list)
+ * - `?` consumes zero or one arguments
+ * - `*` consumes zero or more arguments (and produces a list)
+ * - `+` consumes one or more arguments (and produces a list)
+ *
+ * Note: that the difference between the default and nargs=1 is that with the
+ * default, a single value will be produced, while with nargs=1, a list
+ * containing a single value will be produced.
+ **/
+var Action = module.exports = function Action(options) {
+ options = options || {};
+ this.optionStrings = options.optionStrings || [];
+ this.dest = options.dest;
+ this.nargs = typeof options.nargs !== 'undefined' ? options.nargs : null;
+ this.constant = typeof options.constant !== 'undefined' ? options.constant : null;
+ this.defaultValue = options.defaultValue;
+ this.type = typeof options.type !== 'undefined' ? options.type : null;
+ this.choices = typeof options.choices !== 'undefined' ? options.choices : null;
+ this.required = typeof options.required !== 'undefined' ? options.required : false;
+ this.help = typeof options.help !== 'undefined' ? options.help : null;
+ this.metavar = typeof options.metavar !== 'undefined' ? options.metavar : null;
+
+ if (!(this.optionStrings instanceof Array)) {
+ throw new Error('optionStrings should be an array');
+ }
+ if (typeof this.required !== 'undefined' && typeof this.required !== 'boolean') {
+ throw new Error('required should be a boolean');
+ }
+};
+
+/**
+ * Action#getName -> String
+ *
+ * Tells action name
+ **/
+Action.prototype.getName = function () {
+ if (this.optionStrings.length > 0) {
+ return this.optionStrings.join('/');
+ } else if (this.metavar !== null && this.metavar !== c.SUPPRESS) {
+ return this.metavar;
+ } else if (typeof this.dest !== 'undefined' && this.dest !== c.SUPPRESS) {
+ return this.dest;
+ }
+ return null;
+};
+
+/**
+ * Action#isOptional -> Boolean
+ *
+ * Return true if optional
+ **/
+Action.prototype.isOptional = function () {
+ return !this.isPositional();
+};
+
+/**
+ * Action#isPositional -> Boolean
+ *
+ * Return true if positional
+ **/
+Action.prototype.isPositional = function () {
+ return (this.optionStrings.length === 0);
+};
+
+/**
+ * Action#call(parser, namespace, values, optionString) -> Void
+ * - parser (ArgumentParser): current parser
+ * - namespace (Namespace): namespace for output data
+ * - values (Array): parsed values
+ * - optionString (Array): input option string(not parsed)
+ *
+ * Call the action. Should be implemented in inherited classes
+ *
+ * ##### Example
+ *
+ * ActionCount.prototype.call = function (parser, namespace, values, optionString) {
+ * namespace.set(this.dest, (namespace[this.dest] || 0) + 1);
+ * };
+ *
+ **/
+Action.prototype.call = function () {
+ throw new Error('.call() not defined');// Not Implemented error
+};
diff --git a/tools/node_modules/eslint/node_modules/argparse/lib/action/append.js b/tools/node_modules/eslint/node_modules/argparse/lib/action/append.js
new file mode 100644
index 0000000000..b5da0de232
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/argparse/lib/action/append.js
@@ -0,0 +1,53 @@
+/*:nodoc:*
+ * class ActionAppend
+ *
+ * This action stores a list, and appends each argument value to the list.
+ * This is useful to allow an option to be specified multiple times.
+ * This class inherided from [[Action]]
+ *
+ **/
+
+'use strict';
+
+var util = require('util');
+
+var Action = require('../action');
+
+// Constants
+var c = require('../const');
+
+/*:nodoc:*
+ * new ActionAppend(options)
+ * - options (object): options hash see [[Action.new]]
+ *
+ * Note: options.nargs should be optional for constants
+ * and more then zero for other
+ **/
+var ActionAppend = module.exports = function ActionAppend(options) {
+ options = options || {};
+ if (this.nargs <= 0) {
+ throw new Error('nargs for append actions must be > 0; if arg ' +
+ 'strings are not supplying the value to append, ' +
+ 'the append const action may be more appropriate');
+ }
+ if (!!this.constant && this.nargs !== c.OPTIONAL) {
+ throw new Error('nargs must be OPTIONAL to supply const');
+ }
+ Action.call(this, options);
+};
+util.inherits(ActionAppend, Action);
+
+/*:nodoc:*
+ * ActionAppend#call(parser, namespace, values, optionString) -> Void
+ * - parser (ArgumentParser): current parser
+ * - namespace (Namespace): namespace for output data
+ * - values (Array): parsed values
+ * - optionString (Array): input option string(not parsed)
+ *
+ * Call the action. Save result in namespace object
+ **/
+ActionAppend.prototype.call = function (parser, namespace, values) {
+ var items = (namespace[this.dest] || []).slice();
+ items.push(values);
+ namespace.set(this.dest, items);
+};
diff --git a/tools/node_modules/eslint/node_modules/argparse/lib/action/append/constant.js b/tools/node_modules/eslint/node_modules/argparse/lib/action/append/constant.js
new file mode 100644
index 0000000000..313f5d2efc
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/argparse/lib/action/append/constant.js
@@ -0,0 +1,47 @@
+/*:nodoc:*
+ * class ActionAppendConstant
+ *
+ * This stores a list, and appends the value specified by
+ * the const keyword argument to the list.
+ * (Note that the const keyword argument defaults to null.)
+ * The 'appendConst' action is typically useful when multiple
+ * arguments need to store constants to the same list.
+ *
+ * This class inherited from [[Action]]
+ **/
+
+'use strict';
+
+var util = require('util');
+
+var Action = require('../../action');
+
+/*:nodoc:*
+ * new ActionAppendConstant(options)
+ * - options (object): options hash see [[Action.new]]
+ *
+ **/
+var ActionAppendConstant = module.exports = function ActionAppendConstant(options) {
+ options = options || {};
+ options.nargs = 0;
+ if (typeof options.constant === 'undefined') {
+ throw new Error('constant option is required for appendAction');
+ }
+ Action.call(this, options);
+};
+util.inherits(ActionAppendConstant, Action);
+
+/*:nodoc:*
+ * ActionAppendConstant#call(parser, namespace, values, optionString) -> Void
+ * - parser (ArgumentParser): current parser
+ * - namespace (Namespace): namespace for output data
+ * - values (Array): parsed values
+ * - optionString (Array): input option string(not parsed)
+ *
+ * Call the action. Save result in namespace object
+ **/
+ActionAppendConstant.prototype.call = function (parser, namespace) {
+ var items = [].concat(namespace[this.dest] || []);
+ items.push(this.constant);
+ namespace.set(this.dest, items);
+};
diff --git a/tools/node_modules/eslint/node_modules/argparse/lib/action/count.js b/tools/node_modules/eslint/node_modules/argparse/lib/action/count.js
new file mode 100644
index 0000000000..d6a5899d07
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/argparse/lib/action/count.js
@@ -0,0 +1,40 @@
+/*:nodoc:*
+ * class ActionCount
+ *
+ * This counts the number of times a keyword argument occurs.
+ * For example, this is useful for increasing verbosity levels
+ *
+ * This class inherided from [[Action]]
+ *
+ **/
+'use strict';
+
+var util = require('util');
+
+var Action = require('../action');
+
+/*:nodoc:*
+ * new ActionCount(options)
+ * - options (object): options hash see [[Action.new]]
+ *
+ **/
+var ActionCount = module.exports = function ActionCount(options) {
+ options = options || {};
+ options.nargs = 0;
+
+ Action.call(this, options);
+};
+util.inherits(ActionCount, Action);
+
+/*:nodoc:*
+ * ActionCount#call(parser, namespace, values, optionString) -> Void
+ * - parser (ArgumentParser): current parser
+ * - namespace (Namespace): namespace for output data
+ * - values (Array): parsed values
+ * - optionString (Array): input option string(not parsed)
+ *
+ * Call the action. Save result in namespace object
+ **/
+ActionCount.prototype.call = function (parser, namespace) {
+ namespace.set(this.dest, (namespace[this.dest] || 0) + 1);
+};
diff --git a/tools/node_modules/eslint/node_modules/argparse/lib/action/help.js b/tools/node_modules/eslint/node_modules/argparse/lib/action/help.js
new file mode 100644
index 0000000000..b40e05a6f0
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/argparse/lib/action/help.js
@@ -0,0 +1,47 @@
+/*:nodoc:*
+ * class ActionHelp
+ *
+ * Support action for printing help
+ * This class inherided from [[Action]]
+ **/
+'use strict';
+
+var util = require('util');
+
+var Action = require('../action');
+
+// Constants
+var c = require('../const');
+
+/*:nodoc:*
+ * new ActionHelp(options)
+ * - options (object): options hash see [[Action.new]]
+ *
+ **/
+var ActionHelp = module.exports = function ActionHelp(options) {
+ options = options || {};
+ if (options.defaultValue !== null) {
+ options.defaultValue = options.defaultValue;
+ } else {
+ options.defaultValue = c.SUPPRESS;
+ }
+ options.dest = (options.dest !== null ? options.dest : c.SUPPRESS);
+ options.nargs = 0;
+ Action.call(this, options);
+
+};
+util.inherits(ActionHelp, Action);
+
+/*:nodoc:*
+ * ActionHelp#call(parser, namespace, values, optionString)
+ * - parser (ArgumentParser): current parser
+ * - namespace (Namespace): namespace for output data
+ * - values (Array): parsed values
+ * - optionString (Array): input option string(not parsed)
+ *
+ * Print help and exit
+ **/
+ActionHelp.prototype.call = function (parser) {
+ parser.printHelp();
+ parser.exit();
+};
diff --git a/tools/node_modules/eslint/node_modules/argparse/lib/action/store.js b/tools/node_modules/eslint/node_modules/argparse/lib/action/store.js
new file mode 100644
index 0000000000..283b860921
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/argparse/lib/action/store.js
@@ -0,0 +1,50 @@
+/*:nodoc:*
+ * class ActionStore
+ *
+ * This action just stores the argument’s value. This is the default action.
+ *
+ * This class inherited from [[Action]]
+ *
+ **/
+'use strict';
+
+var util = require('util');
+
+var Action = require('../action');
+
+// Constants
+var c = require('../const');
+
+
+/*:nodoc:*
+ * new ActionStore(options)
+ * - options (object): options hash see [[Action.new]]
+ *
+ **/
+var ActionStore = module.exports = function ActionStore(options) {
+ options = options || {};
+ if (this.nargs <= 0) {
+ throw new Error('nargs for store actions must be > 0; if you ' +
+ 'have nothing to store, actions such as store ' +
+ 'true or store const may be more appropriate');
+
+ }
+ if (typeof this.constant !== 'undefined' && this.nargs !== c.OPTIONAL) {
+ throw new Error('nargs must be OPTIONAL to supply const');
+ }
+ Action.call(this, options);
+};
+util.inherits(ActionStore, Action);
+
+/*:nodoc:*
+ * ActionStore#call(parser, namespace, values, optionString) -> Void
+ * - parser (ArgumentParser): current parser
+ * - namespace (Namespace): namespace for output data
+ * - values (Array): parsed values
+ * - optionString (Array): input option string(not parsed)
+ *
+ * Call the action. Save result in namespace object
+ **/
+ActionStore.prototype.call = function (parser, namespace, values) {
+ namespace.set(this.dest, values);
+};
diff --git a/tools/node_modules/eslint/node_modules/argparse/lib/action/store/constant.js b/tools/node_modules/eslint/node_modules/argparse/lib/action/store/constant.js
new file mode 100644
index 0000000000..23caa897b3
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/argparse/lib/action/store/constant.js
@@ -0,0 +1,43 @@
+/*:nodoc:*
+ * class ActionStoreConstant
+ *
+ * This action stores the value specified by the const keyword argument.
+ * (Note that the const keyword argument defaults to the rather unhelpful null.)
+ * The 'store_const' action is most commonly used with optional
+ * arguments that specify some sort of flag.
+ *
+ * This class inherited from [[Action]]
+ **/
+'use strict';
+
+var util = require('util');
+
+var Action = require('../../action');
+
+/*:nodoc:*
+ * new ActionStoreConstant(options)
+ * - options (object): options hash see [[Action.new]]
+ *
+ **/
+var ActionStoreConstant = module.exports = function ActionStoreConstant(options) {
+ options = options || {};
+ options.nargs = 0;
+ if (typeof options.constant === 'undefined') {
+ throw new Error('constant option is required for storeAction');
+ }
+ Action.call(this, options);
+};
+util.inherits(ActionStoreConstant, Action);
+
+/*:nodoc:*
+ * ActionStoreConstant#call(parser, namespace, values, optionString) -> Void
+ * - parser (ArgumentParser): current parser
+ * - namespace (Namespace): namespace for output data
+ * - values (Array): parsed values
+ * - optionString (Array): input option string(not parsed)
+ *
+ * Call the action. Save result in namespace object
+ **/
+ActionStoreConstant.prototype.call = function (parser, namespace) {
+ namespace.set(this.dest, this.constant);
+};
diff --git a/tools/node_modules/eslint/node_modules/argparse/lib/action/store/false.js b/tools/node_modules/eslint/node_modules/argparse/lib/action/store/false.js
new file mode 100644
index 0000000000..9924f461da
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/argparse/lib/action/store/false.js
@@ -0,0 +1,27 @@
+/*:nodoc:*
+ * class ActionStoreFalse
+ *
+ * This action store the values False respectively.
+ * This is special cases of 'storeConst'
+ *
+ * This class inherited from [[Action]]
+ **/
+
+'use strict';
+
+var util = require('util');
+
+var ActionStoreConstant = require('./constant');
+
+/*:nodoc:*
+ * new ActionStoreFalse(options)
+ * - options (object): hash of options see [[Action.new]]
+ *
+ **/
+var ActionStoreFalse = module.exports = function ActionStoreFalse(options) {
+ options = options || {};
+ options.constant = false;
+ options.defaultValue = options.defaultValue !== null ? options.defaultValue : true;
+ ActionStoreConstant.call(this, options);
+};
+util.inherits(ActionStoreFalse, ActionStoreConstant);
diff --git a/tools/node_modules/eslint/node_modules/argparse/lib/action/store/true.js b/tools/node_modules/eslint/node_modules/argparse/lib/action/store/true.js
new file mode 100644
index 0000000000..9e22f7d441
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/argparse/lib/action/store/true.js
@@ -0,0 +1,26 @@
+/*:nodoc:*
+ * class ActionStoreTrue
+ *
+ * This action store the values True respectively.
+ * This isspecial cases of 'storeConst'
+ *
+ * This class inherited from [[Action]]
+ **/
+'use strict';
+
+var util = require('util');
+
+var ActionStoreConstant = require('./constant');
+
+/*:nodoc:*
+ * new ActionStoreTrue(options)
+ * - options (object): options hash see [[Action.new]]
+ *
+ **/
+var ActionStoreTrue = module.exports = function ActionStoreTrue(options) {
+ options = options || {};
+ options.constant = true;
+ options.defaultValue = options.defaultValue !== null ? options.defaultValue : false;
+ ActionStoreConstant.call(this, options);
+};
+util.inherits(ActionStoreTrue, ActionStoreConstant);
diff --git a/tools/node_modules/eslint/node_modules/argparse/lib/action/subparsers.js b/tools/node_modules/eslint/node_modules/argparse/lib/action/subparsers.js
new file mode 100644
index 0000000000..99dfedd0f1
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/argparse/lib/action/subparsers.js
@@ -0,0 +1,149 @@
+/** internal
+ * class ActionSubparsers
+ *
+ * Support the creation of such sub-commands with the addSubparsers()
+ *
+ * This class inherited from [[Action]]
+ **/
+'use strict';
+
+var util = require('util');
+var format = require('util').format;
+
+
+var Action = require('../action');
+
+// Constants
+var c = require('../const');
+
+// Errors
+var argumentErrorHelper = require('../argument/error');
+
+
+/*:nodoc:*
+ * new ChoicesPseudoAction(name, help)
+ *
+ * Create pseudo action for correct help text
+ *
+ **/
+function ChoicesPseudoAction(name, help) {
+ var options = {
+ optionStrings: [],
+ dest: name,
+ help: help
+ };
+
+ Action.call(this, options);
+}
+
+util.inherits(ChoicesPseudoAction, Action);
+
+/**
+ * new ActionSubparsers(options)
+ * - options (object): options hash see [[Action.new]]
+ *
+ **/
+function ActionSubparsers(options) {
+ options = options || {};
+ options.dest = options.dest || c.SUPPRESS;
+ options.nargs = c.PARSER;
+
+ this.debug = (options.debug === true);
+
+ this._progPrefix = options.prog;
+ this._parserClass = options.parserClass;
+ this._nameParserMap = {};
+ this._choicesActions = [];
+
+ options.choices = this._nameParserMap;
+ Action.call(this, options);
+}
+
+util.inherits(ActionSubparsers, Action);
+
+/*:nodoc:*
+ * ActionSubparsers#addParser(name, options) -> ArgumentParser
+ * - name (string): sub-command name
+ * - options (object): see [[ArgumentParser.new]]
+ *
+ * Note:
+ * addParser supports an additional aliases option,
+ * which allows multiple strings to refer to the same subparser.
+ * This example, like svn, aliases co as a shorthand for checkout
+ *
+ **/
+ActionSubparsers.prototype.addParser = function (name, options) {
+ var parser;
+
+ var self = this;
+
+ options = options || {};
+
+ options.debug = (this.debug === true);
+
+ // set program from the existing prefix
+ if (!options.prog) {
+ options.prog = this._progPrefix + ' ' + name;
+ }
+
+ var aliases = options.aliases || [];
+
+ // create a pseudo-action to hold the choice help
+ if (!!options.help || typeof options.help === 'string') {
+ var help = options.help;
+ delete options.help;
+
+ var choiceAction = new ChoicesPseudoAction(name, help);
+ this._choicesActions.push(choiceAction);
+ }
+
+ // create the parser and add it to the map
+ parser = new this._parserClass(options);
+ this._nameParserMap[name] = parser;
+
+ // make parser available under aliases also
+ aliases.forEach(function (alias) {
+ self._nameParserMap[alias] = parser;
+ });
+
+ return parser;
+};
+
+ActionSubparsers.prototype._getSubactions = function () {
+ return this._choicesActions;
+};
+
+/*:nodoc:*
+ * ActionSubparsers#call(parser, namespace, values, optionString) -> Void
+ * - parser (ArgumentParser): current parser
+ * - namespace (Namespace): namespace for output data
+ * - values (Array): parsed values
+ * - optionString (Array): input option string(not parsed)
+ *
+ * Call the action. Parse input aguments
+ **/
+ActionSubparsers.prototype.call = function (parser, namespace, values) {
+ var parserName = values[0];
+ var argStrings = values.slice(1);
+
+ // set the parser name if requested
+ if (this.dest !== c.SUPPRESS) {
+ namespace[this.dest] = parserName;
+ }
+
+ // select the parser
+ if (this._nameParserMap[parserName]) {
+ parser = this._nameParserMap[parserName];
+ } else {
+ throw argumentErrorHelper(format(
+ 'Unknown parser "%s" (choices: [%s]).',
+ parserName,
+ Object.keys(this._nameParserMap).join(', ')
+ ));
+ }
+
+ // parse all the remaining options into the namespace
+ parser.parseArgs(argStrings, namespace);
+};
+
+module.exports = ActionSubparsers;
diff --git a/tools/node_modules/eslint/node_modules/argparse/lib/action/version.js b/tools/node_modules/eslint/node_modules/argparse/lib/action/version.js
new file mode 100644
index 0000000000..8053328cde
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/argparse/lib/action/version.js
@@ -0,0 +1,47 @@
+/*:nodoc:*
+ * class ActionVersion
+ *
+ * Support action for printing program version
+ * This class inherited from [[Action]]
+ **/
+'use strict';
+
+var util = require('util');
+
+var Action = require('../action');
+
+//
+// Constants
+//
+var c = require('../const');
+
+/*:nodoc:*
+ * new ActionVersion(options)
+ * - options (object): options hash see [[Action.new]]
+ *
+ **/
+var ActionVersion = module.exports = function ActionVersion(options) {
+ options = options || {};
+ options.defaultValue = (options.defaultValue ? options.defaultValue : c.SUPPRESS);
+ options.dest = (options.dest || c.SUPPRESS);
+ options.nargs = 0;
+ this.version = options.version;
+ Action.call(this, options);
+};
+util.inherits(ActionVersion, Action);
+
+/*:nodoc:*
+ * ActionVersion#call(parser, namespace, values, optionString) -> Void
+ * - parser (ArgumentParser): current parser
+ * - namespace (Namespace): namespace for output data
+ * - values (Array): parsed values
+ * - optionString (Array): input option string(not parsed)
+ *
+ * Print version and exit
+ **/
+ActionVersion.prototype.call = function (parser) {
+ var version = this.version || parser.version;
+ var formatter = parser._getFormatter();
+ formatter.addText(version);
+ parser.exit(0, formatter.formatHelp());
+};
diff --git a/tools/node_modules/eslint/node_modules/argparse/lib/action_container.js b/tools/node_modules/eslint/node_modules/argparse/lib/action_container.js
new file mode 100644
index 0000000000..6f1237bea2
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/argparse/lib/action_container.js
@@ -0,0 +1,482 @@
+/** internal
+ * class ActionContainer
+ *
+ * Action container. Parent for [[ArgumentParser]] and [[ArgumentGroup]]
+ **/
+
+'use strict';
+
+var format = require('util').format;
+
+// Constants
+var c = require('./const');
+
+var $$ = require('./utils');
+
+//Actions
+var ActionHelp = require('./action/help');
+var ActionAppend = require('./action/append');
+var ActionAppendConstant = require('./action/append/constant');
+var ActionCount = require('./action/count');
+var ActionStore = require('./action/store');
+var ActionStoreConstant = require('./action/store/constant');
+var ActionStoreTrue = require('./action/store/true');
+var ActionStoreFalse = require('./action/store/false');
+var ActionVersion = require('./action/version');
+var ActionSubparsers = require('./action/subparsers');
+
+// Errors
+var argumentErrorHelper = require('./argument/error');
+
+/**
+ * new ActionContainer(options)
+ *
+ * Action container. Parent for [[ArgumentParser]] and [[ArgumentGroup]]
+ *
+ * ##### Options:
+ *
+ * - `description` -- A description of what the program does
+ * - `prefixChars` -- Characters that prefix optional arguments
+ * - `argumentDefault` -- The default value for all arguments
+ * - `conflictHandler` -- The conflict handler to use for duplicate arguments
+ **/
+var ActionContainer = module.exports = function ActionContainer(options) {
+ options = options || {};
+
+ this.description = options.description;
+ this.argumentDefault = options.argumentDefault;
+ this.prefixChars = options.prefixChars || '';
+ this.conflictHandler = options.conflictHandler;
+
+ // set up registries
+ this._registries = {};
+
+ // register actions
+ this.register('action', null, ActionStore);
+ this.register('action', 'store', ActionStore);
+ this.register('action', 'storeConst', ActionStoreConstant);
+ this.register('action', 'storeTrue', ActionStoreTrue);
+ this.register('action', 'storeFalse', ActionStoreFalse);
+ this.register('action', 'append', ActionAppend);
+ this.register('action', 'appendConst', ActionAppendConstant);
+ this.register('action', 'count', ActionCount);
+ this.register('action', 'help', ActionHelp);
+ this.register('action', 'version', ActionVersion);
+ this.register('action', 'parsers', ActionSubparsers);
+
+ // raise an exception if the conflict handler is invalid
+ this._getHandler();
+
+ // action storage
+ this._actions = [];
+ this._optionStringActions = {};
+
+ // groups
+ this._actionGroups = [];
+ this._mutuallyExclusiveGroups = [];
+
+ // defaults storage
+ this._defaults = {};
+
+ // determines whether an "option" looks like a negative number
+ // -1, -1.5 -5e+4
+ this._regexpNegativeNumber = new RegExp('^[-]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?$');
+
+ // whether or not there are any optionals that look like negative
+ // numbers -- uses a list so it can be shared and edited
+ this._hasNegativeNumberOptionals = [];
+};
+
+// Groups must be required, then ActionContainer already defined
+var ArgumentGroup = require('./argument/group');
+var MutuallyExclusiveGroup = require('./argument/exclusive');
+
+//
+// Registration methods
+//
+
+/**
+ * ActionContainer#register(registryName, value, object) -> Void
+ * - registryName (String) : object type action|type
+ * - value (string) : keyword
+ * - object (Object|Function) : handler
+ *
+ * Register handlers
+ **/
+ActionContainer.prototype.register = function (registryName, value, object) {
+ this._registries[registryName] = this._registries[registryName] || {};
+ this._registries[registryName][value] = object;
+};
+
+ActionContainer.prototype._registryGet = function (registryName, value, defaultValue) {
+ if (arguments.length < 3) {
+ defaultValue = null;
+ }
+ return this._registries[registryName][value] || defaultValue;
+};
+
+//
+// Namespace default accessor methods
+//
+
+/**
+ * ActionContainer#setDefaults(options) -> Void
+ * - options (object):hash of options see [[Action.new]]
+ *
+ * Set defaults
+ **/
+ActionContainer.prototype.setDefaults = function (options) {
+ options = options || {};
+ for (var property in options) {
+ if ($$.has(options, property)) {
+ this._defaults[property] = options[property];
+ }
+ }
+
+ // if these defaults match any existing arguments, replace the previous
+ // default on the object with the new one
+ this._actions.forEach(function (action) {
+ if ($$.has(options, action.dest)) {
+ action.defaultValue = options[action.dest];
+ }
+ });
+};
+
+/**
+ * ActionContainer#getDefault(dest) -> Mixed
+ * - dest (string): action destination
+ *
+ * Return action default value
+ **/
+ActionContainer.prototype.getDefault = function (dest) {
+ var result = $$.has(this._defaults, dest) ? this._defaults[dest] : null;
+
+ this._actions.forEach(function (action) {
+ if (action.dest === dest && $$.has(action, 'defaultValue')) {
+ result = action.defaultValue;
+ }
+ });
+
+ return result;
+};
+//
+// Adding argument actions
+//
+
+/**
+ * ActionContainer#addArgument(args, options) -> Object
+ * - args (String|Array): argument key, or array of argument keys
+ * - options (Object): action objects see [[Action.new]]
+ *
+ * #### Examples
+ * - addArgument([ '-f', '--foo' ], { action: 'store', defaultValue: 1, ... })
+ * - addArgument([ 'bar' ], { action: 'store', nargs: 1, ... })
+ * - addArgument('--baz', { action: 'store', nargs: 1, ... })
+ **/
+ActionContainer.prototype.addArgument = function (args, options) {
+ args = args;
+ options = options || {};
+
+ if (typeof args === 'string') {
+ args = [ args ];
+ }
+ if (!Array.isArray(args)) {
+ throw new TypeError('addArgument first argument should be a string or an array');
+ }
+ if (typeof options !== 'object' || Array.isArray(options)) {
+ throw new TypeError('addArgument second argument should be a hash');
+ }
+
+ // if no positional args are supplied or only one is supplied and
+ // it doesn't look like an option string, parse a positional argument
+ if (!args || args.length === 1 && this.prefixChars.indexOf(args[0][0]) < 0) {
+ if (args && !!options.dest) {
+ throw new Error('dest supplied twice for positional argument');
+ }
+ options = this._getPositional(args, options);
+
+ // otherwise, we're adding an optional argument
+ } else {
+ options = this._getOptional(args, options);
+ }
+
+ // if no default was supplied, use the parser-level default
+ if (typeof options.defaultValue === 'undefined') {
+ var dest = options.dest;
+ if ($$.has(this._defaults, dest)) {
+ options.defaultValue = this._defaults[dest];
+ } else if (typeof this.argumentDefault !== 'undefined') {
+ options.defaultValue = this.argumentDefault;
+ }
+ }
+
+ // create the action object, and add it to the parser
+ var ActionClass = this._popActionClass(options);
+ if (typeof ActionClass !== 'function') {
+ throw new Error(format('Unknown action "%s".', ActionClass));
+ }
+ var action = new ActionClass(options);
+
+ // throw an error if the action type is not callable
+ var typeFunction = this._registryGet('type', action.type, action.type);
+ if (typeof typeFunction !== 'function') {
+ throw new Error(format('"%s" is not callable', typeFunction));
+ }
+
+ return this._addAction(action);
+};
+
+/**
+ * ActionContainer#addArgumentGroup(options) -> ArgumentGroup
+ * - options (Object): hash of options see [[ArgumentGroup.new]]
+ *
+ * Create new arguments groups
+ **/
+ActionContainer.prototype.addArgumentGroup = function (options) {
+ var group = new ArgumentGroup(this, options);
+ this._actionGroups.push(group);
+ return group;
+};
+
+/**
+ * ActionContainer#addMutuallyExclusiveGroup(options) -> ArgumentGroup
+ * - options (Object): {required: false}
+ *
+ * Create new mutual exclusive groups
+ **/
+ActionContainer.prototype.addMutuallyExclusiveGroup = function (options) {
+ var group = new MutuallyExclusiveGroup(this, options);
+ this._mutuallyExclusiveGroups.push(group);
+ return group;
+};
+
+ActionContainer.prototype._addAction = function (action) {
+ var self = this;
+
+ // resolve any conflicts
+ this._checkConflict(action);
+
+ // add to actions list
+ this._actions.push(action);
+ action.container = this;
+
+ // index the action by any option strings it has
+ action.optionStrings.forEach(function (optionString) {
+ self._optionStringActions[optionString] = action;
+ });
+
+ // set the flag if any option strings look like negative numbers
+ action.optionStrings.forEach(function (optionString) {
+ if (optionString.match(self._regexpNegativeNumber)) {
+ if (!self._hasNegativeNumberOptionals.some(Boolean)) {
+ self._hasNegativeNumberOptionals.push(true);
+ }
+ }
+ });
+
+ // return the created action
+ return action;
+};
+
+ActionContainer.prototype._removeAction = function (action) {
+ var actionIndex = this._actions.indexOf(action);
+ if (actionIndex >= 0) {
+ this._actions.splice(actionIndex, 1);
+ }
+};
+
+ActionContainer.prototype._addContainerActions = function (container) {
+ // collect groups by titles
+ var titleGroupMap = {};
+ this._actionGroups.forEach(function (group) {
+ if (titleGroupMap[group.title]) {
+ throw new Error(format('Cannot merge actions - two groups are named "%s".', group.title));
+ }
+ titleGroupMap[group.title] = group;
+ });
+
+ // map each action to its group
+ var groupMap = {};
+ function actionHash(action) {
+ // unique (hopefully?) string suitable as dictionary key
+ return action.getName();
+ }
+ container._actionGroups.forEach(function (group) {
+ // if a group with the title exists, use that, otherwise
+ // create a new group matching the container's group
+ if (!titleGroupMap[group.title]) {
+ titleGroupMap[group.title] = this.addArgumentGroup({
+ title: group.title,
+ description: group.description
+ });
+ }
+
+ // map the actions to their new group
+ group._groupActions.forEach(function (action) {
+ groupMap[actionHash(action)] = titleGroupMap[group.title];
+ });
+ }, this);
+
+ // add container's mutually exclusive groups
+ // NOTE: if add_mutually_exclusive_group ever gains title= and
+ // description= then this code will need to be expanded as above
+ var mutexGroup;
+ container._mutuallyExclusiveGroups.forEach(function (group) {
+ mutexGroup = this.addMutuallyExclusiveGroup({
+ required: group.required
+ });
+ // map the actions to their new mutex group
+ group._groupActions.forEach(function (action) {
+ groupMap[actionHash(action)] = mutexGroup;
+ });
+ }, this); // forEach takes a 'this' argument
+
+ // add all actions to this container or their group
+ container._actions.forEach(function (action) {
+ var key = actionHash(action);
+ if (groupMap[key]) {
+ groupMap[key]._addAction(action);
+ } else {
+ this._addAction(action);
+ }
+ });
+};
+
+ActionContainer.prototype._getPositional = function (dest, options) {
+ if (Array.isArray(dest)) {
+ dest = dest[0];
+ }
+ // make sure required is not specified
+ if (options.required) {
+ throw new Error('"required" is an invalid argument for positionals.');
+ }
+
+ // mark positional arguments as required if at least one is
+ // always required
+ if (options.nargs !== c.OPTIONAL && options.nargs !== c.ZERO_OR_MORE) {
+ options.required = true;
+ }
+ if (options.nargs === c.ZERO_OR_MORE && typeof options.defaultValue === 'undefined') {
+ options.required = true;
+ }
+
+ // return the keyword arguments with no option strings
+ options.dest = dest;
+ options.optionStrings = [];
+ return options;
+};
+
+ActionContainer.prototype._getOptional = function (args, options) {
+ var prefixChars = this.prefixChars;
+ var optionStrings = [];
+ var optionStringsLong = [];
+
+ // determine short and long option strings
+ args.forEach(function (optionString) {
+ // error on strings that don't start with an appropriate prefix
+ if (prefixChars.indexOf(optionString[0]) < 0) {
+ throw new Error(format('Invalid option string "%s": must start with a "%s".',
+ optionString,
+ prefixChars
+ ));
+ }
+
+ // strings starting with two prefix characters are long options
+ optionStrings.push(optionString);
+ if (optionString.length > 1 && prefixChars.indexOf(optionString[1]) >= 0) {
+ optionStringsLong.push(optionString);
+ }
+ });
+
+ // infer dest, '--foo-bar' -> 'foo_bar' and '-x' -> 'x'
+ var dest = options.dest || null;
+ delete options.dest;
+
+ if (!dest) {
+ var optionStringDest = optionStringsLong.length ? optionStringsLong[0] : optionStrings[0];
+ dest = $$.trimChars(optionStringDest, this.prefixChars);
+
+ if (dest.length === 0) {
+ throw new Error(
+ format('dest= is required for options like "%s"', optionStrings.join(', '))
+ );
+ }
+ dest = dest.replace(/-/g, '_');
+ }
+
+ // return the updated keyword arguments
+ options.dest = dest;
+ options.optionStrings = optionStrings;
+
+ return options;
+};
+
+ActionContainer.prototype._popActionClass = function (options, defaultValue) {
+ defaultValue = defaultValue || null;
+
+ var action = (options.action || defaultValue);
+ delete options.action;
+
+ var actionClass = this._registryGet('action', action, action);
+ return actionClass;
+};
+
+ActionContainer.prototype._getHandler = function () {
+ var handlerString = this.conflictHandler;
+ var handlerFuncName = '_handleConflict' + $$.capitalize(handlerString);
+ var func = this[handlerFuncName];
+ if (typeof func === 'undefined') {
+ var msg = 'invalid conflict resolution value: ' + handlerString;
+ throw new Error(msg);
+ } else {
+ return func;
+ }
+};
+
+ActionContainer.prototype._checkConflict = function (action) {
+ var optionStringActions = this._optionStringActions;
+ var conflictOptionals = [];
+
+ // find all options that conflict with this option
+ // collect pairs, the string, and an existing action that it conflicts with
+ action.optionStrings.forEach(function (optionString) {
+ var conflOptional = optionStringActions[optionString];
+ if (typeof conflOptional !== 'undefined') {
+ conflictOptionals.push([ optionString, conflOptional ]);
+ }
+ });
+
+ if (conflictOptionals.length > 0) {
+ var conflictHandler = this._getHandler();
+ conflictHandler.call(this, action, conflictOptionals);
+ }
+};
+
+ActionContainer.prototype._handleConflictError = function (action, conflOptionals) {
+ var conflicts = conflOptionals.map(function (pair) { return pair[0]; });
+ conflicts = conflicts.join(', ');
+ throw argumentErrorHelper(
+ action,
+ format('Conflicting option string(s): %s', conflicts)
+ );
+};
+
+ActionContainer.prototype._handleConflictResolve = function (action, conflOptionals) {
+ // remove all conflicting options
+ var self = this;
+ conflOptionals.forEach(function (pair) {
+ var optionString = pair[0];
+ var conflictingAction = pair[1];
+ // remove the conflicting option string
+ var i = conflictingAction.optionStrings.indexOf(optionString);
+ if (i >= 0) {
+ conflictingAction.optionStrings.splice(i, 1);
+ }
+ delete self._optionStringActions[optionString];
+ // if the option now has no option string, remove it from the
+ // container holding it
+ if (conflictingAction.optionStrings.length === 0) {
+ conflictingAction.container._removeAction(conflictingAction);
+ }
+ });
+};
diff --git a/tools/node_modules/eslint/node_modules/argparse/lib/argparse.js b/tools/node_modules/eslint/node_modules/argparse/lib/argparse.js
new file mode 100644
index 0000000000..f2a2c51d9a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/argparse/lib/argparse.js
@@ -0,0 +1,14 @@
+'use strict';
+
+module.exports.ArgumentParser = require('./argument_parser.js');
+module.exports.Namespace = require('./namespace');
+module.exports.Action = require('./action');
+module.exports.HelpFormatter = require('./help/formatter.js');
+module.exports.Const = require('./const.js');
+
+module.exports.ArgumentDefaultsHelpFormatter =
+ require('./help/added_formatters.js').ArgumentDefaultsHelpFormatter;
+module.exports.RawDescriptionHelpFormatter =
+ require('./help/added_formatters.js').RawDescriptionHelpFormatter;
+module.exports.RawTextHelpFormatter =
+ require('./help/added_formatters.js').RawTextHelpFormatter;
diff --git a/tools/node_modules/eslint/node_modules/argparse/lib/argument/error.js b/tools/node_modules/eslint/node_modules/argparse/lib/argument/error.js
new file mode 100644
index 0000000000..c8a02a08b8
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/argparse/lib/argument/error.js
@@ -0,0 +1,50 @@
+'use strict';
+
+
+var format = require('util').format;
+
+
+var ERR_CODE = 'ARGError';
+
+/*:nodoc:*
+ * argumentError(argument, message) -> TypeError
+ * - argument (Object): action with broken argument
+ * - message (String): error message
+ *
+ * Error format helper. An error from creating or using an argument
+ * (optional or positional). The string value of this exception
+ * is the message, augmented with information
+ * about the argument that caused it.
+ *
+ * #####Example
+ *
+ * var argumentErrorHelper = require('./argument/error');
+ * if (conflictOptionals.length > 0) {
+ * throw argumentErrorHelper(
+ * action,
+ * format('Conflicting option string(s): %s', conflictOptionals.join(', '))
+ * );
+ * }
+ *
+ **/
+module.exports = function (argument, message) {
+ var argumentName = null;
+ var errMessage;
+ var err;
+
+ if (argument.getName) {
+ argumentName = argument.getName();
+ } else {
+ argumentName = '' + argument;
+ }
+
+ if (!argumentName) {
+ errMessage = message;
+ } else {
+ errMessage = format('argument "%s": %s', argumentName, message);
+ }
+
+ err = new TypeError(errMessage);
+ err.code = ERR_CODE;
+ return err;
+};
diff --git a/tools/node_modules/eslint/node_modules/argparse/lib/argument/exclusive.js b/tools/node_modules/eslint/node_modules/argparse/lib/argument/exclusive.js
new file mode 100644
index 0000000000..8287e00d04
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/argparse/lib/argument/exclusive.js
@@ -0,0 +1,54 @@
+/** internal
+ * class MutuallyExclusiveGroup
+ *
+ * Group arguments.
+ * By default, ArgumentParser groups command-line arguments
+ * into “positional arguments” and “optional arguments”
+ * when displaying help messages. When there is a better
+ * conceptual grouping of arguments than this default one,
+ * appropriate groups can be created using the addArgumentGroup() method
+ *
+ * This class inherited from [[ArgumentContainer]]
+ **/
+'use strict';
+
+var util = require('util');
+
+var ArgumentGroup = require('./group');
+
+/**
+ * new MutuallyExclusiveGroup(container, options)
+ * - container (object): main container
+ * - options (object): options.required -> true/false
+ *
+ * `required` could be an argument itself, but making it a property of
+ * the options argument is more consistent with the JS adaptation of the Python)
+ **/
+var MutuallyExclusiveGroup = module.exports = function MutuallyExclusiveGroup(container, options) {
+ var required;
+ options = options || {};
+ required = options.required || false;
+ ArgumentGroup.call(this, container);
+ this.required = required;
+
+};
+util.inherits(MutuallyExclusiveGroup, ArgumentGroup);
+
+
+MutuallyExclusiveGroup.prototype._addAction = function (action) {
+ var msg;
+ if (action.required) {
+ msg = 'mutually exclusive arguments must be optional';
+ throw new Error(msg);
+ }
+ action = this._container._addAction(action);
+ this._groupActions.push(action);
+ return action;
+};
+
+
+MutuallyExclusiveGroup.prototype._removeAction = function (action) {
+ this._container._removeAction(action);
+ this._groupActions.remove(action);
+};
+
diff --git a/tools/node_modules/eslint/node_modules/argparse/lib/argument/group.js b/tools/node_modules/eslint/node_modules/argparse/lib/argument/group.js
new file mode 100644
index 0000000000..58b271f2fe
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/argparse/lib/argument/group.js
@@ -0,0 +1,75 @@
+/** internal
+ * class ArgumentGroup
+ *
+ * Group arguments.
+ * By default, ArgumentParser groups command-line arguments
+ * into “positional arguments” and “optional arguments”
+ * when displaying help messages. When there is a better
+ * conceptual grouping of arguments than this default one,
+ * appropriate groups can be created using the addArgumentGroup() method
+ *
+ * This class inherited from [[ArgumentContainer]]
+ **/
+'use strict';
+
+var util = require('util');
+
+var ActionContainer = require('../action_container');
+
+
+/**
+ * new ArgumentGroup(container, options)
+ * - container (object): main container
+ * - options (object): hash of group options
+ *
+ * #### options
+ * - **prefixChars** group name prefix
+ * - **argumentDefault** default argument value
+ * - **title** group title
+ * - **description** group description
+ *
+ **/
+var ArgumentGroup = module.exports = function ArgumentGroup(container, options) {
+
+ options = options || {};
+
+ // add any missing keyword arguments by checking the container
+ options.conflictHandler = (options.conflictHandler || container.conflictHandler);
+ options.prefixChars = (options.prefixChars || container.prefixChars);
+ options.argumentDefault = (options.argumentDefault || container.argumentDefault);
+
+ ActionContainer.call(this, options);
+
+ // group attributes
+ this.title = options.title;
+ this._groupActions = [];
+
+ // share most attributes with the container
+ this._container = container;
+ this._registries = container._registries;
+ this._actions = container._actions;
+ this._optionStringActions = container._optionStringActions;
+ this._defaults = container._defaults;
+ this._hasNegativeNumberOptionals = container._hasNegativeNumberOptionals;
+ this._mutuallyExclusiveGroups = container._mutuallyExclusiveGroups;
+};
+util.inherits(ArgumentGroup, ActionContainer);
+
+
+ArgumentGroup.prototype._addAction = function (action) {
+ // Parent add action
+ action = ActionContainer.prototype._addAction.call(this, action);
+ this._groupActions.push(action);
+ return action;
+};
+
+
+ArgumentGroup.prototype._removeAction = function (action) {
+ // Parent remove action
+ ActionContainer.prototype._removeAction.call(this, action);
+ var actionIndex = this._groupActions.indexOf(action);
+ if (actionIndex >= 0) {
+ this._groupActions.splice(actionIndex, 1);
+ }
+};
+
diff --git a/tools/node_modules/eslint/node_modules/argparse/lib/argument_parser.js b/tools/node_modules/eslint/node_modules/argparse/lib/argument_parser.js
new file mode 100644
index 0000000000..bd9a59a453
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/argparse/lib/argument_parser.js
@@ -0,0 +1,1161 @@
+/**
+ * class ArgumentParser
+ *
+ * Object for parsing command line strings into js objects.
+ *
+ * Inherited from [[ActionContainer]]
+ **/
+'use strict';
+
+var util = require('util');
+var format = require('util').format;
+var Path = require('path');
+var sprintf = require('sprintf-js').sprintf;
+
+// Constants
+var c = require('./const');
+
+var $$ = require('./utils');
+
+var ActionContainer = require('./action_container');
+
+// Errors
+var argumentErrorHelper = require('./argument/error');
+
+var HelpFormatter = require('./help/formatter');
+
+var Namespace = require('./namespace');
+
+
+/**
+ * new ArgumentParser(options)
+ *
+ * Create a new ArgumentParser object.
+ *
+ * ##### Options:
+ * - `prog` The name of the program (default: Path.basename(process.argv[1]))
+ * - `usage` A usage message (default: auto-generated from arguments)
+ * - `description` A description of what the program does
+ * - `epilog` Text following the argument descriptions
+ * - `parents` Parsers whose arguments should be copied into this one
+ * - `formatterClass` HelpFormatter class for printing help messages
+ * - `prefixChars` Characters that prefix optional arguments
+ * - `fromfilePrefixChars` Characters that prefix files containing additional arguments
+ * - `argumentDefault` The default value for all arguments
+ * - `addHelp` Add a -h/-help option
+ * - `conflictHandler` Specifies how to handle conflicting argument names
+ * - `debug` Enable debug mode. Argument errors throw exception in
+ * debug mode and process.exit in normal. Used for development and
+ * testing (default: false)
+ *
+ * See also [original guide][1]
+ *
+ * [1]:http://docs.python.org/dev/library/argparse.html#argumentparser-objects
+ **/
+function ArgumentParser(options) {
+ if (!(this instanceof ArgumentParser)) {
+ return new ArgumentParser(options);
+ }
+ var self = this;
+ options = options || {};
+
+ options.description = (options.description || null);
+ options.argumentDefault = (options.argumentDefault || null);
+ options.prefixChars = (options.prefixChars || '-');
+ options.conflictHandler = (options.conflictHandler || 'error');
+ ActionContainer.call(this, options);
+
+ options.addHelp = typeof options.addHelp === 'undefined' || !!options.addHelp;
+ options.parents = options.parents || [];
+ // default program name
+ options.prog = (options.prog || Path.basename(process.argv[1]));
+ this.prog = options.prog;
+ this.usage = options.usage;
+ this.epilog = options.epilog;
+ this.version = options.version;
+
+ this.debug = (options.debug === true);
+
+ this.formatterClass = (options.formatterClass || HelpFormatter);
+ this.fromfilePrefixChars = options.fromfilePrefixChars || null;
+ this._positionals = this.addArgumentGroup({ title: 'Positional arguments' });
+ this._optionals = this.addArgumentGroup({ title: 'Optional arguments' });
+ this._subparsers = null;
+
+ // register types
+ function FUNCTION_IDENTITY(o) {
+ return o;
+ }
+ this.register('type', 'auto', FUNCTION_IDENTITY);
+ this.register('type', null, FUNCTION_IDENTITY);
+ this.register('type', 'int', function (x) {
+ var result = parseInt(x, 10);
+ if (isNaN(result)) {
+ throw new Error(x + ' is not a valid integer.');
+ }
+ return result;
+ });
+ this.register('type', 'float', function (x) {
+ var result = parseFloat(x);
+ if (isNaN(result)) {
+ throw new Error(x + ' is not a valid float.');
+ }
+ return result;
+ });
+ this.register('type', 'string', function (x) {
+ return '' + x;
+ });
+
+ // add help and version arguments if necessary
+ var defaultPrefix = (this.prefixChars.indexOf('-') > -1) ? '-' : this.prefixChars[0];
+ if (options.addHelp) {
+ this.addArgument(
+ [ defaultPrefix + 'h', defaultPrefix + defaultPrefix + 'help' ],
+ {
+ action: 'help',
+ defaultValue: c.SUPPRESS,
+ help: 'Show this help message and exit.'
+ }
+ );
+ }
+ if (typeof this.version !== 'undefined') {
+ this.addArgument(
+ [ defaultPrefix + 'v', defaultPrefix + defaultPrefix + 'version' ],
+ {
+ action: 'version',
+ version: this.version,
+ defaultValue: c.SUPPRESS,
+ help: "Show program's version number and exit."
+ }
+ );
+ }
+
+ // add parent arguments and defaults
+ options.parents.forEach(function (parent) {
+ self._addContainerActions(parent);
+ if (typeof parent._defaults !== 'undefined') {
+ for (var defaultKey in parent._defaults) {
+ if (parent._defaults.hasOwnProperty(defaultKey)) {
+ self._defaults[defaultKey] = parent._defaults[defaultKey];
+ }
+ }
+ }
+ });
+}
+
+util.inherits(ArgumentParser, ActionContainer);
+
+/**
+ * ArgumentParser#addSubparsers(options) -> [[ActionSubparsers]]
+ * - options (object): hash of options see [[ActionSubparsers.new]]
+ *
+ * See also [subcommands][1]
+ *
+ * [1]:http://docs.python.org/dev/library/argparse.html#sub-commands
+ **/
+ArgumentParser.prototype.addSubparsers = function (options) {
+ if (this._subparsers) {
+ this.error('Cannot have multiple subparser arguments.');
+ }
+
+ options = options || {};
+ options.debug = (this.debug === true);
+ options.optionStrings = [];
+ options.parserClass = (options.parserClass || ArgumentParser);
+
+
+ if (!!options.title || !!options.description) {
+
+ this._subparsers = this.addArgumentGroup({
+ title: (options.title || 'subcommands'),
+ description: options.description
+ });
+ delete options.title;
+ delete options.description;
+
+ } else {
+ this._subparsers = this._positionals;
+ }
+
+ // prog defaults to the usage message of this parser, skipping
+ // optional arguments and with no "usage:" prefix
+ if (!options.prog) {
+ var formatter = this._getFormatter();
+ var positionals = this._getPositionalActions();
+ var groups = this._mutuallyExclusiveGroups;
+ formatter.addUsage(this.usage, positionals, groups, '');
+ options.prog = formatter.formatHelp().trim();
+ }
+
+ // create the parsers action and add it to the positionals list
+ var ParsersClass = this._popActionClass(options, 'parsers');
+ var action = new ParsersClass(options);
+ this._subparsers._addAction(action);
+
+ // return the created parsers action
+ return action;
+};
+
+ArgumentParser.prototype._addAction = function (action) {
+ if (action.isOptional()) {
+ this._optionals._addAction(action);
+ } else {
+ this._positionals._addAction(action);
+ }
+ return action;
+};
+
+ArgumentParser.prototype._getOptionalActions = function () {
+ return this._actions.filter(function (action) {
+ return action.isOptional();
+ });
+};
+
+ArgumentParser.prototype._getPositionalActions = function () {
+ return this._actions.filter(function (action) {
+ return action.isPositional();
+ });
+};
+
+
+/**
+ * ArgumentParser#parseArgs(args, namespace) -> Namespace|Object
+ * - args (array): input elements
+ * - namespace (Namespace|Object): result object
+ *
+ * Parsed args and throws error if some arguments are not recognized
+ *
+ * See also [original guide][1]
+ *
+ * [1]:http://docs.python.org/dev/library/argparse.html#the-parse-args-method
+ **/
+ArgumentParser.prototype.parseArgs = function (args, namespace) {
+ var argv;
+ var result = this.parseKnownArgs(args, namespace);
+
+ args = result[0];
+ argv = result[1];
+ if (argv && argv.length > 0) {
+ this.error(
+ format('Unrecognized arguments: %s.', argv.join(' '))
+ );
+ }
+ return args;
+};
+
+/**
+ * ArgumentParser#parseKnownArgs(args, namespace) -> array
+ * - args (array): input options
+ * - namespace (Namespace|Object): result object
+ *
+ * Parse known arguments and return tuple of result object
+ * and unknown args
+ *
+ * See also [original guide][1]
+ *
+ * [1]:http://docs.python.org/dev/library/argparse.html#partial-parsing
+ **/
+ArgumentParser.prototype.parseKnownArgs = function (args, namespace) {
+ var self = this;
+
+ // args default to the system args
+ args = args || process.argv.slice(2);
+
+ // default Namespace built from parser defaults
+ namespace = namespace || new Namespace();
+
+ self._actions.forEach(function (action) {
+ if (action.dest !== c.SUPPRESS) {
+ if (!$$.has(namespace, action.dest)) {
+ if (action.defaultValue !== c.SUPPRESS) {
+ var defaultValue = action.defaultValue;
+ if (typeof action.defaultValue === 'string') {
+ defaultValue = self._getValue(action, defaultValue);
+ }
+ namespace[action.dest] = defaultValue;
+ }
+ }
+ }
+ });
+
+ Object.keys(self._defaults).forEach(function (dest) {
+ namespace[dest] = self._defaults[dest];
+ });
+
+ // parse the arguments and exit if there are any errors
+ try {
+ var res = this._parseKnownArgs(args, namespace);
+
+ namespace = res[0];
+ args = res[1];
+ if ($$.has(namespace, c._UNRECOGNIZED_ARGS_ATTR)) {
+ args = $$.arrayUnion(args, namespace[c._UNRECOGNIZED_ARGS_ATTR]);
+ delete namespace[c._UNRECOGNIZED_ARGS_ATTR];
+ }
+ return [ namespace, args ];
+ } catch (e) {
+ this.error(e);
+ }
+};
+
+ArgumentParser.prototype._parseKnownArgs = function (argStrings, namespace) {
+ var self = this;
+
+ var extras = [];
+
+ // replace arg strings that are file references
+ if (this.fromfilePrefixChars !== null) {
+ argStrings = this._readArgsFromFiles(argStrings);
+ }
+ // map all mutually exclusive arguments to the other arguments
+ // they can't occur with
+ // Python has 'conflicts = action_conflicts.setdefault(mutex_action, [])'
+ // though I can't conceive of a way in which an action could be a member
+ // of two different mutually exclusive groups.
+
+ function actionHash(action) {
+ // some sort of hashable key for this action
+ // action itself cannot be a key in actionConflicts
+ // I think getName() (join of optionStrings) is unique enough
+ return action.getName();
+ }
+
+ var conflicts, key;
+ var actionConflicts = {};
+
+ this._mutuallyExclusiveGroups.forEach(function (mutexGroup) {
+ mutexGroup._groupActions.forEach(function (mutexAction, i, groupActions) {
+ key = actionHash(mutexAction);
+ if (!$$.has(actionConflicts, key)) {
+ actionConflicts[key] = [];
+ }
+ conflicts = actionConflicts[key];
+ conflicts.push.apply(conflicts, groupActions.slice(0, i));
+ conflicts.push.apply(conflicts, groupActions.slice(i + 1));
+ });
+ });
+
+ // find all option indices, and determine the arg_string_pattern
+ // which has an 'O' if there is an option at an index,
+ // an 'A' if there is an argument, or a '-' if there is a '--'
+ var optionStringIndices = {};
+
+ var argStringPatternParts = [];
+
+ argStrings.forEach(function (argString, argStringIndex) {
+ if (argString === '--') {
+ argStringPatternParts.push('-');
+ while (argStringIndex < argStrings.length) {
+ argStringPatternParts.push('A');
+ argStringIndex++;
+ }
+ } else {
+ // otherwise, add the arg to the arg strings
+ // and note the index if it was an option
+ var pattern;
+ var optionTuple = self._parseOptional(argString);
+ if (!optionTuple) {
+ pattern = 'A';
+ } else {
+ optionStringIndices[argStringIndex] = optionTuple;
+ pattern = 'O';
+ }
+ argStringPatternParts.push(pattern);
+ }
+ });
+ var argStringsPattern = argStringPatternParts.join('');
+
+ var seenActions = [];
+ var seenNonDefaultActions = [];
+
+
+ function takeAction(action, argumentStrings, optionString) {
+ seenActions.push(action);
+ var argumentValues = self._getValues(action, argumentStrings);
+
+ // error if this argument is not allowed with other previously
+ // seen arguments, assuming that actions that use the default
+ // value don't really count as "present"
+ if (argumentValues !== action.defaultValue) {
+ seenNonDefaultActions.push(action);
+ if (actionConflicts[actionHash(action)]) {
+ actionConflicts[actionHash(action)].forEach(function (actionConflict) {
+ if (seenNonDefaultActions.indexOf(actionConflict) >= 0) {
+ throw argumentErrorHelper(
+ action,
+ format('Not allowed with argument "%s".', actionConflict.getName())
+ );
+ }
+ });
+ }
+ }
+
+ if (argumentValues !== c.SUPPRESS) {
+ action.call(self, namespace, argumentValues, optionString);
+ }
+ }
+
+ function consumeOptional(startIndex) {
+ // get the optional identified at this index
+ var optionTuple = optionStringIndices[startIndex];
+ var action = optionTuple[0];
+ var optionString = optionTuple[1];
+ var explicitArg = optionTuple[2];
+
+ // identify additional optionals in the same arg string
+ // (e.g. -xyz is the same as -x -y -z if no args are required)
+ var actionTuples = [];
+
+ var args, argCount, start, stop;
+
+ for (;;) {
+ if (!action) {
+ extras.push(argStrings[startIndex]);
+ return startIndex + 1;
+ }
+ if (explicitArg) {
+ argCount = self._matchArgument(action, 'A');
+
+ // if the action is a single-dash option and takes no
+ // arguments, try to parse more single-dash options out
+ // of the tail of the option string
+ var chars = self.prefixChars;
+ if (argCount === 0 && chars.indexOf(optionString[1]) < 0) {
+ actionTuples.push([ action, [], optionString ]);
+ optionString = optionString[0] + explicitArg[0];
+ var newExplicitArg = explicitArg.slice(1) || null;
+ var optionalsMap = self._optionStringActions;
+
+ if (Object.keys(optionalsMap).indexOf(optionString) >= 0) {
+ action = optionalsMap[optionString];
+ explicitArg = newExplicitArg;
+ } else {
+ throw argumentErrorHelper(action, sprintf('ignored explicit argument %r', explicitArg));
+ }
+ } else if (argCount === 1) {
+ // if the action expect exactly one argument, we've
+ // successfully matched the option; exit the loop
+ stop = startIndex + 1;
+ args = [ explicitArg ];
+ actionTuples.push([ action, args, optionString ]);
+ break;
+ } else {
+ // error if a double-dash option did not use the
+ // explicit argument
+ throw argumentErrorHelper(action, sprintf('ignored explicit argument %r', explicitArg));
+ }
+ } else {
+ // if there is no explicit argument, try to match the
+ // optional's string arguments with the following strings
+ // if successful, exit the loop
+
+ start = startIndex + 1;
+ var selectedPatterns = argStringsPattern.substr(start);
+
+ argCount = self._matchArgument(action, selectedPatterns);
+ stop = start + argCount;
+
+
+ args = argStrings.slice(start, stop);
+
+ actionTuples.push([ action, args, optionString ]);
+ break;
+ }
+
+ }
+
+ // add the Optional to the list and return the index at which
+ // the Optional's string args stopped
+ if (actionTuples.length < 1) {
+ throw new Error('length should be > 0');
+ }
+ for (var i = 0; i < actionTuples.length; i++) {
+ takeAction.apply(self, actionTuples[i]);
+ }
+ return stop;
+ }
+
+ // the list of Positionals left to be parsed; this is modified
+ // by consume_positionals()
+ var positionals = self._getPositionalActions();
+
+ function consumePositionals(startIndex) {
+ // match as many Positionals as possible
+ var selectedPattern = argStringsPattern.substr(startIndex);
+ var argCounts = self._matchArgumentsPartial(positionals, selectedPattern);
+
+ // slice off the appropriate arg strings for each Positional
+ // and add the Positional and its args to the list
+ for (var i = 0; i < positionals.length; i++) {
+ var action = positionals[i];
+ var argCount = argCounts[i];
+ if (typeof argCount === 'undefined') {
+ continue;
+ }
+ var args = argStrings.slice(startIndex, startIndex + argCount);
+
+ startIndex += argCount;
+ takeAction(action, args);
+ }
+
+ // slice off the Positionals that we just parsed and return the
+ // index at which the Positionals' string args stopped
+ positionals = positionals.slice(argCounts.length);
+ return startIndex;
+ }
+
+ // consume Positionals and Optionals alternately, until we have
+ // passed the last option string
+ var startIndex = 0;
+ var position;
+
+ var maxOptionStringIndex = -1;
+
+ Object.keys(optionStringIndices).forEach(function (position) {
+ maxOptionStringIndex = Math.max(maxOptionStringIndex, parseInt(position, 10));
+ });
+
+ var positionalsEndIndex, nextOptionStringIndex;
+
+ while (startIndex <= maxOptionStringIndex) {
+ // consume any Positionals preceding the next option
+ nextOptionStringIndex = null;
+ for (position in optionStringIndices) {
+ if (!optionStringIndices.hasOwnProperty(position)) { continue; }
+
+ position = parseInt(position, 10);
+ if (position >= startIndex) {
+ if (nextOptionStringIndex !== null) {
+ nextOptionStringIndex = Math.min(nextOptionStringIndex, position);
+ } else {
+ nextOptionStringIndex = position;
+ }
+ }
+ }
+
+ if (startIndex !== nextOptionStringIndex) {
+ positionalsEndIndex = consumePositionals(startIndex);
+ // only try to parse the next optional if we didn't consume
+ // the option string during the positionals parsing
+ if (positionalsEndIndex > startIndex) {
+ startIndex = positionalsEndIndex;
+ continue;
+ } else {
+ startIndex = positionalsEndIndex;
+ }
+ }
+
+ // if we consumed all the positionals we could and we're not
+ // at the index of an option string, there were extra arguments
+ if (!optionStringIndices[startIndex]) {
+ var strings = argStrings.slice(startIndex, nextOptionStringIndex);
+ extras = extras.concat(strings);
+ startIndex = nextOptionStringIndex;
+ }
+ // consume the next optional and any arguments for it
+ startIndex = consumeOptional(startIndex);
+ }
+
+ // consume any positionals following the last Optional
+ var stopIndex = consumePositionals(startIndex);
+
+ // if we didn't consume all the argument strings, there were extras
+ extras = extras.concat(argStrings.slice(stopIndex));
+
+ // if we didn't use all the Positional objects, there were too few
+ // arg strings supplied.
+ if (positionals.length > 0) {
+ self.error('too few arguments');
+ }
+
+ // make sure all required actions were present
+ self._actions.forEach(function (action) {
+ if (action.required) {
+ if (seenActions.indexOf(action) < 0) {
+ self.error(format('Argument "%s" is required', action.getName()));
+ }
+ }
+ });
+
+ // make sure all required groups have one option present
+ var actionUsed = false;
+ self._mutuallyExclusiveGroups.forEach(function (group) {
+ if (group.required) {
+ actionUsed = group._groupActions.some(function (action) {
+ return seenNonDefaultActions.indexOf(action) !== -1;
+ });
+
+ // if no actions were used, report the error
+ if (!actionUsed) {
+ var names = [];
+ group._groupActions.forEach(function (action) {
+ if (action.help !== c.SUPPRESS) {
+ names.push(action.getName());
+ }
+ });
+ names = names.join(' ');
+ var msg = 'one of the arguments ' + names + ' is required';
+ self.error(msg);
+ }
+ }
+ });
+
+ // return the updated namespace and the extra arguments
+ return [ namespace, extras ];
+};
+
+ArgumentParser.prototype._readArgsFromFiles = function (argStrings) {
+ // expand arguments referencing files
+ var self = this;
+ var fs = require('fs');
+ var newArgStrings = [];
+ argStrings.forEach(function (argString) {
+ if (self.fromfilePrefixChars.indexOf(argString[0]) < 0) {
+ // for regular arguments, just add them back into the list
+ newArgStrings.push(argString);
+ } else {
+ // replace arguments referencing files with the file content
+ try {
+ var argstrs = [];
+ var filename = argString.slice(1);
+ var content = fs.readFileSync(filename, 'utf8');
+ content = content.trim().split('\n');
+ content.forEach(function (argLine) {
+ self.convertArgLineToArgs(argLine).forEach(function (arg) {
+ argstrs.push(arg);
+ });
+ argstrs = self._readArgsFromFiles(argstrs);
+ });
+ newArgStrings.push.apply(newArgStrings, argstrs);
+ } catch (error) {
+ return self.error(error.message);
+ }
+ }
+ });
+ return newArgStrings;
+};
+
+ArgumentParser.prototype.convertArgLineToArgs = function (argLine) {
+ return [ argLine ];
+};
+
+ArgumentParser.prototype._matchArgument = function (action, regexpArgStrings) {
+
+ // match the pattern for this action to the arg strings
+ var regexpNargs = new RegExp('^' + this._getNargsPattern(action));
+ var matches = regexpArgStrings.match(regexpNargs);
+ var message;
+
+ // throw an exception if we weren't able to find a match
+ if (!matches) {
+ switch (action.nargs) {
+ /*eslint-disable no-undefined*/
+ case undefined:
+ case null:
+ message = 'Expected one argument.';
+ break;
+ case c.OPTIONAL:
+ message = 'Expected at most one argument.';
+ break;
+ case c.ONE_OR_MORE:
+ message = 'Expected at least one argument.';
+ break;
+ default:
+ message = 'Expected %s argument(s)';
+ }
+
+ throw argumentErrorHelper(
+ action,
+ format(message, action.nargs)
+ );
+ }
+ // return the number of arguments matched
+ return matches[1].length;
+};
+
+ArgumentParser.prototype._matchArgumentsPartial = function (actions, regexpArgStrings) {
+ // progressively shorten the actions list by slicing off the
+ // final actions until we find a match
+ var self = this;
+ var result = [];
+ var actionSlice, pattern, matches;
+ var i, j;
+
+ function getLength(string) {
+ return string.length;
+ }
+
+ for (i = actions.length; i > 0; i--) {
+ pattern = '';
+ actionSlice = actions.slice(0, i);
+ for (j = 0; j < actionSlice.length; j++) {
+ pattern += self._getNargsPattern(actionSlice[j]);
+ }
+
+ pattern = new RegExp('^' + pattern);
+ matches = regexpArgStrings.match(pattern);
+
+ if (matches && matches.length > 0) {
+ // need only groups
+ matches = matches.splice(1);
+ result = result.concat(matches.map(getLength));
+ break;
+ }
+ }
+
+ // return the list of arg string counts
+ return result;
+};
+
+ArgumentParser.prototype._parseOptional = function (argString) {
+ var action, optionString, argExplicit, optionTuples;
+
+ // if it's an empty string, it was meant to be a positional
+ if (!argString) {
+ return null;
+ }
+
+ // if it doesn't start with a prefix, it was meant to be positional
+ if (this.prefixChars.indexOf(argString[0]) < 0) {
+ return null;
+ }
+
+ // if the option string is present in the parser, return the action
+ if (this._optionStringActions[argString]) {
+ return [ this._optionStringActions[argString], argString, null ];
+ }
+
+ // if it's just a single character, it was meant to be positional
+ if (argString.length === 1) {
+ return null;
+ }
+
+ // if the option string before the "=" is present, return the action
+ if (argString.indexOf('=') >= 0) {
+ optionString = argString.split('=', 1)[0];
+ argExplicit = argString.slice(optionString.length + 1);
+
+ if (this._optionStringActions[optionString]) {
+ action = this._optionStringActions[optionString];
+ return [ action, optionString, argExplicit ];
+ }
+ }
+
+ // search through all possible prefixes of the option string
+ // and all actions in the parser for possible interpretations
+ optionTuples = this._getOptionTuples(argString);
+
+ // if multiple actions match, the option string was ambiguous
+ if (optionTuples.length > 1) {
+ var optionStrings = optionTuples.map(function (optionTuple) {
+ return optionTuple[1];
+ });
+ this.error(format(
+ 'Ambiguous option: "%s" could match %s.',
+ argString, optionStrings.join(', ')
+ ));
+ // if exactly one action matched, this segmentation is good,
+ // so return the parsed action
+ } else if (optionTuples.length === 1) {
+ return optionTuples[0];
+ }
+
+ // if it was not found as an option, but it looks like a negative
+ // number, it was meant to be positional
+ // unless there are negative-number-like options
+ if (argString.match(this._regexpNegativeNumber)) {
+ if (!this._hasNegativeNumberOptionals.some(Boolean)) {
+ return null;
+ }
+ }
+ // if it contains a space, it was meant to be a positional
+ if (argString.search(' ') >= 0) {
+ return null;
+ }
+
+ // it was meant to be an optional but there is no such option
+ // in this parser (though it might be a valid option in a subparser)
+ return [ null, argString, null ];
+};
+
+ArgumentParser.prototype._getOptionTuples = function (optionString) {
+ var result = [];
+ var chars = this.prefixChars;
+ var optionPrefix;
+ var argExplicit;
+ var action;
+ var actionOptionString;
+
+ // option strings starting with two prefix characters are only split at
+ // the '='
+ if (chars.indexOf(optionString[0]) >= 0 && chars.indexOf(optionString[1]) >= 0) {
+ if (optionString.indexOf('=') >= 0) {
+ var optionStringSplit = optionString.split('=', 1);
+
+ optionPrefix = optionStringSplit[0];
+ argExplicit = optionStringSplit[1];
+ } else {
+ optionPrefix = optionString;
+ argExplicit = null;
+ }
+
+ for (actionOptionString in this._optionStringActions) {
+ if (actionOptionString.substr(0, optionPrefix.length) === optionPrefix) {
+ action = this._optionStringActions[actionOptionString];
+ result.push([ action, actionOptionString, argExplicit ]);
+ }
+ }
+
+ // single character options can be concatenated with their arguments
+ // but multiple character options always have to have their argument
+ // separate
+ } else if (chars.indexOf(optionString[0]) >= 0 && chars.indexOf(optionString[1]) < 0) {
+ optionPrefix = optionString;
+ argExplicit = null;
+ var optionPrefixShort = optionString.substr(0, 2);
+ var argExplicitShort = optionString.substr(2);
+
+ for (actionOptionString in this._optionStringActions) {
+ if (!$$.has(this._optionStringActions, actionOptionString)) continue;
+
+ action = this._optionStringActions[actionOptionString];
+ if (actionOptionString === optionPrefixShort) {
+ result.push([ action, actionOptionString, argExplicitShort ]);
+ } else if (actionOptionString.substr(0, optionPrefix.length) === optionPrefix) {
+ result.push([ action, actionOptionString, argExplicit ]);
+ }
+ }
+
+ // shouldn't ever get here
+ } else {
+ throw new Error(format('Unexpected option string: %s.', optionString));
+ }
+ // return the collected option tuples
+ return result;
+};
+
+ArgumentParser.prototype._getNargsPattern = function (action) {
+ // in all examples below, we have to allow for '--' args
+ // which are represented as '-' in the pattern
+ var regexpNargs;
+
+ switch (action.nargs) {
+ // the default (null) is assumed to be a single argument
+ case undefined:
+ case null:
+ regexpNargs = '(-*A-*)';
+ break;
+ // allow zero or more arguments
+ case c.OPTIONAL:
+ regexpNargs = '(-*A?-*)';
+ break;
+ // allow zero or more arguments
+ case c.ZERO_OR_MORE:
+ regexpNargs = '(-*[A-]*)';
+ break;
+ // allow one or more arguments
+ case c.ONE_OR_MORE:
+ regexpNargs = '(-*A[A-]*)';
+ break;
+ // allow any number of options or arguments
+ case c.REMAINDER:
+ regexpNargs = '([-AO]*)';
+ break;
+ // allow one argument followed by any number of options or arguments
+ case c.PARSER:
+ regexpNargs = '(-*A[-AO]*)';
+ break;
+ // all others should be integers
+ default:
+ regexpNargs = '(-*' + $$.repeat('-*A', action.nargs) + '-*)';
+ }
+
+ // if this is an optional action, -- is not allowed
+ if (action.isOptional()) {
+ regexpNargs = regexpNargs.replace(/-\*/g, '');
+ regexpNargs = regexpNargs.replace(/-/g, '');
+ }
+
+ // return the pattern
+ return regexpNargs;
+};
+
+//
+// Value conversion methods
+//
+
+ArgumentParser.prototype._getValues = function (action, argStrings) {
+ var self = this;
+
+ // for everything but PARSER args, strip out '--'
+ if (action.nargs !== c.PARSER && action.nargs !== c.REMAINDER) {
+ argStrings = argStrings.filter(function (arrayElement) {
+ return arrayElement !== '--';
+ });
+ }
+
+ var value, argString;
+
+ // optional argument produces a default when not present
+ if (argStrings.length === 0 && action.nargs === c.OPTIONAL) {
+
+ value = (action.isOptional()) ? action.constant : action.defaultValue;
+
+ if (typeof (value) === 'string') {
+ value = this._getValue(action, value);
+ this._checkValue(action, value);
+ }
+
+ // when nargs='*' on a positional, if there were no command-line
+ // args, use the default if it is anything other than None
+ } else if (argStrings.length === 0 && action.nargs === c.ZERO_OR_MORE &&
+ action.optionStrings.length === 0) {
+
+ value = (action.defaultValue || argStrings);
+ this._checkValue(action, value);
+
+ // single argument or optional argument produces a single value
+ } else if (argStrings.length === 1 &&
+ (!action.nargs || action.nargs === c.OPTIONAL)) {
+
+ argString = argStrings[0];
+ value = this._getValue(action, argString);
+ this._checkValue(action, value);
+
+ // REMAINDER arguments convert all values, checking none
+ } else if (action.nargs === c.REMAINDER) {
+ value = argStrings.map(function (v) {
+ return self._getValue(action, v);
+ });
+
+ // PARSER arguments convert all values, but check only the first
+ } else if (action.nargs === c.PARSER) {
+ value = argStrings.map(function (v) {
+ return self._getValue(action, v);
+ });
+ this._checkValue(action, value[0]);
+
+ // all other types of nargs produce a list
+ } else {
+ value = argStrings.map(function (v) {
+ return self._getValue(action, v);
+ });
+ value.forEach(function (v) {
+ self._checkValue(action, v);
+ });
+ }
+
+ // return the converted value
+ return value;
+};
+
+ArgumentParser.prototype._getValue = function (action, argString) {
+ var result;
+
+ var typeFunction = this._registryGet('type', action.type, action.type);
+ if (typeof typeFunction !== 'function') {
+ var message = format('%s is not callable', typeFunction);
+ throw argumentErrorHelper(action, message);
+ }
+
+ // convert the value to the appropriate type
+ try {
+ result = typeFunction(argString);
+
+ // ArgumentTypeErrors indicate errors
+ // If action.type is not a registered string, it is a function
+ // Try to deduce its name for inclusion in the error message
+ // Failing that, include the error message it raised.
+ } catch (e) {
+ var name = null;
+ if (typeof action.type === 'string') {
+ name = action.type;
+ } else {
+ name = action.type.name || action.type.displayName || '<function>';
+ }
+ var msg = format('Invalid %s value: %s', name, argString);
+ if (name === '<function>') { msg += '\n' + e.message; }
+ throw argumentErrorHelper(action, msg);
+ }
+ // return the converted value
+ return result;
+};
+
+ArgumentParser.prototype._checkValue = function (action, value) {
+ // converted value must be one of the choices (if specified)
+ var choices = action.choices;
+ if (choices) {
+ // choise for argument can by array or string
+ if ((typeof choices === 'string' || Array.isArray(choices)) &&
+ choices.indexOf(value) !== -1) {
+ return;
+ }
+ // choise for subparsers can by only hash
+ if (typeof choices === 'object' && !Array.isArray(choices) && choices[value]) {
+ return;
+ }
+
+ if (typeof choices === 'string') {
+ choices = choices.split('').join(', ');
+ } else if (Array.isArray(choices)) {
+ choices = choices.join(', ');
+ } else {
+ choices = Object.keys(choices).join(', ');
+ }
+ var message = format('Invalid choice: %s (choose from [%s])', value, choices);
+ throw argumentErrorHelper(action, message);
+ }
+};
+
+//
+// Help formatting methods
+//
+
+/**
+ * ArgumentParser#formatUsage -> string
+ *
+ * Return usage string
+ *
+ * See also [original guide][1]
+ *
+ * [1]:http://docs.python.org/dev/library/argparse.html#printing-help
+ **/
+ArgumentParser.prototype.formatUsage = function () {
+ var formatter = this._getFormatter();
+ formatter.addUsage(this.usage, this._actions, this._mutuallyExclusiveGroups);
+ return formatter.formatHelp();
+};
+
+/**
+ * ArgumentParser#formatHelp -> string
+ *
+ * Return help
+ *
+ * See also [original guide][1]
+ *
+ * [1]:http://docs.python.org/dev/library/argparse.html#printing-help
+ **/
+ArgumentParser.prototype.formatHelp = function () {
+ var formatter = this._getFormatter();
+
+ // usage
+ formatter.addUsage(this.usage, this._actions, this._mutuallyExclusiveGroups);
+
+ // description
+ formatter.addText(this.description);
+
+ // positionals, optionals and user-defined groups
+ this._actionGroups.forEach(function (actionGroup) {
+ formatter.startSection(actionGroup.title);
+ formatter.addText(actionGroup.description);
+ formatter.addArguments(actionGroup._groupActions);
+ formatter.endSection();
+ });
+
+ // epilog
+ formatter.addText(this.epilog);
+
+ // determine help from format above
+ return formatter.formatHelp();
+};
+
+ArgumentParser.prototype._getFormatter = function () {
+ var FormatterClass = this.formatterClass;
+ var formatter = new FormatterClass({ prog: this.prog });
+ return formatter;
+};
+
+//
+// Print functions
+//
+
+/**
+ * ArgumentParser#printUsage() -> Void
+ *
+ * Print usage
+ *
+ * See also [original guide][1]
+ *
+ * [1]:http://docs.python.org/dev/library/argparse.html#printing-help
+ **/
+ArgumentParser.prototype.printUsage = function () {
+ this._printMessage(this.formatUsage());
+};
+
+/**
+ * ArgumentParser#printHelp() -> Void
+ *
+ * Print help
+ *
+ * See also [original guide][1]
+ *
+ * [1]:http://docs.python.org/dev/library/argparse.html#printing-help
+ **/
+ArgumentParser.prototype.printHelp = function () {
+ this._printMessage(this.formatHelp());
+};
+
+ArgumentParser.prototype._printMessage = function (message, stream) {
+ if (!stream) {
+ stream = process.stdout;
+ }
+ if (message) {
+ stream.write('' + message);
+ }
+};
+
+//
+// Exit functions
+//
+
+/**
+ * ArgumentParser#exit(status=0, message) -> Void
+ * - status (int): exit status
+ * - message (string): message
+ *
+ * Print message in stderr/stdout and exit program
+ **/
+ArgumentParser.prototype.exit = function (status, message) {
+ if (message) {
+ if (status === 0) {
+ this._printMessage(message);
+ } else {
+ this._printMessage(message, process.stderr);
+ }
+ }
+
+ process.exit(status);
+};
+
+/**
+ * ArgumentParser#error(message) -> Void
+ * - err (Error|string): message
+ *
+ * Error method Prints a usage message incorporating the message to stderr and
+ * exits. If you override this in a subclass,
+ * it should not return -- it should
+ * either exit or throw an exception.
+ *
+ **/
+ArgumentParser.prototype.error = function (err) {
+ var message;
+ if (err instanceof Error) {
+ if (this.debug === true) {
+ throw err;
+ }
+ message = err.message;
+ } else {
+ message = err;
+ }
+ var msg = format('%s: error: %s', this.prog, message) + c.EOL;
+
+ if (this.debug === true) {
+ throw new Error(msg);
+ }
+
+ this.printUsage(process.stderr);
+
+ return this.exit(2, msg);
+};
+
+module.exports = ArgumentParser;
diff --git a/tools/node_modules/eslint/node_modules/argparse/lib/const.js b/tools/node_modules/eslint/node_modules/argparse/lib/const.js
new file mode 100644
index 0000000000..b1fd4ced4e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/argparse/lib/const.js
@@ -0,0 +1,21 @@
+//
+// Constants
+//
+
+'use strict';
+
+module.exports.EOL = '\n';
+
+module.exports.SUPPRESS = '==SUPPRESS==';
+
+module.exports.OPTIONAL = '?';
+
+module.exports.ZERO_OR_MORE = '*';
+
+module.exports.ONE_OR_MORE = '+';
+
+module.exports.PARSER = 'A...';
+
+module.exports.REMAINDER = '...';
+
+module.exports._UNRECOGNIZED_ARGS_ATTR = '_unrecognized_args';
diff --git a/tools/node_modules/eslint/node_modules/argparse/lib/help/added_formatters.js b/tools/node_modules/eslint/node_modules/argparse/lib/help/added_formatters.js
new file mode 100644
index 0000000000..f8e42998e9
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/argparse/lib/help/added_formatters.js
@@ -0,0 +1,87 @@
+'use strict';
+
+var util = require('util');
+
+// Constants
+var c = require('../const');
+
+var $$ = require('../utils');
+var HelpFormatter = require('./formatter.js');
+
+/**
+ * new RawDescriptionHelpFormatter(options)
+ * new ArgumentParser({formatterClass: argparse.RawDescriptionHelpFormatter, ...})
+ *
+ * Help message formatter which adds default values to argument help.
+ *
+ * Only the name of this class is considered a public API. All the methods
+ * provided by the class are considered an implementation detail.
+ **/
+
+function ArgumentDefaultsHelpFormatter(options) {
+ HelpFormatter.call(this, options);
+}
+
+util.inherits(ArgumentDefaultsHelpFormatter, HelpFormatter);
+
+ArgumentDefaultsHelpFormatter.prototype._getHelpString = function (action) {
+ var help = action.help;
+ if (action.help.indexOf('%(defaultValue)s') === -1) {
+ if (action.defaultValue !== c.SUPPRESS) {
+ var defaulting_nargs = [ c.OPTIONAL, c.ZERO_OR_MORE ];
+ if (action.isOptional() || (defaulting_nargs.indexOf(action.nargs) >= 0)) {
+ help += ' (default: %(defaultValue)s)';
+ }
+ }
+ }
+ return help;
+};
+
+module.exports.ArgumentDefaultsHelpFormatter = ArgumentDefaultsHelpFormatter;
+
+/**
+ * new RawDescriptionHelpFormatter(options)
+ * new ArgumentParser({formatterClass: argparse.RawDescriptionHelpFormatter, ...})
+ *
+ * Help message formatter which retains any formatting in descriptions.
+ *
+ * Only the name of this class is considered a public API. All the methods
+ * provided by the class are considered an implementation detail.
+ **/
+
+function RawDescriptionHelpFormatter(options) {
+ HelpFormatter.call(this, options);
+}
+
+util.inherits(RawDescriptionHelpFormatter, HelpFormatter);
+
+RawDescriptionHelpFormatter.prototype._fillText = function (text, width, indent) {
+ var lines = text.split('\n');
+ lines = lines.map(function (line) {
+ return $$.trimEnd(indent + line);
+ });
+ return lines.join('\n');
+};
+module.exports.RawDescriptionHelpFormatter = RawDescriptionHelpFormatter;
+
+/**
+ * new RawTextHelpFormatter(options)
+ * new ArgumentParser({formatterClass: argparse.RawTextHelpFormatter, ...})
+ *
+ * Help message formatter which retains formatting of all help text.
+ *
+ * Only the name of this class is considered a public API. All the methods
+ * provided by the class are considered an implementation detail.
+ **/
+
+function RawTextHelpFormatter(options) {
+ RawDescriptionHelpFormatter.call(this, options);
+}
+
+util.inherits(RawTextHelpFormatter, RawDescriptionHelpFormatter);
+
+RawTextHelpFormatter.prototype._splitLines = function (text) {
+ return text.split('\n');
+};
+
+module.exports.RawTextHelpFormatter = RawTextHelpFormatter;
diff --git a/tools/node_modules/eslint/node_modules/argparse/lib/help/formatter.js b/tools/node_modules/eslint/node_modules/argparse/lib/help/formatter.js
new file mode 100644
index 0000000000..a8e4148910
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/argparse/lib/help/formatter.js
@@ -0,0 +1,795 @@
+/**
+ * class HelpFormatter
+ *
+ * Formatter for generating usage messages and argument help strings. Only the
+ * name of this class is considered a public API. All the methods provided by
+ * the class are considered an implementation detail.
+ *
+ * Do not call in your code, use this class only for inherits your own forvatter
+ *
+ * ToDo add [additonal formatters][1]
+ *
+ * [1]:http://docs.python.org/dev/library/argparse.html#formatter-class
+ **/
+'use strict';
+
+var sprintf = require('sprintf-js').sprintf;
+
+// Constants
+var c = require('../const');
+
+var $$ = require('../utils');
+
+
+/*:nodoc:* internal
+ * new Support(parent, heding)
+ * - parent (object): parent section
+ * - heading (string): header string
+ *
+ **/
+function Section(parent, heading) {
+ this._parent = parent;
+ this._heading = heading;
+ this._items = [];
+}
+
+/*:nodoc:* internal
+ * Section#addItem(callback) -> Void
+ * - callback (array): tuple with function and args
+ *
+ * Add function for single element
+ **/
+Section.prototype.addItem = function (callback) {
+ this._items.push(callback);
+};
+
+/*:nodoc:* internal
+ * Section#formatHelp(formatter) -> string
+ * - formatter (HelpFormatter): current formatter
+ *
+ * Form help section string
+ *
+ **/
+Section.prototype.formatHelp = function (formatter) {
+ var itemHelp, heading;
+
+ // format the indented section
+ if (this._parent) {
+ formatter._indent();
+ }
+
+ itemHelp = this._items.map(function (item) {
+ var obj, func, args;
+
+ obj = formatter;
+ func = item[0];
+ args = item[1];
+ return func.apply(obj, args);
+ });
+ itemHelp = formatter._joinParts(itemHelp);
+
+ if (this._parent) {
+ formatter._dedent();
+ }
+
+ // return nothing if the section was empty
+ if (!itemHelp) {
+ return '';
+ }
+
+ // add the heading if the section was non-empty
+ heading = '';
+ if (this._heading && this._heading !== c.SUPPRESS) {
+ var currentIndent = formatter.currentIndent;
+ heading = $$.repeat(' ', currentIndent) + this._heading + ':' + c.EOL;
+ }
+
+ // join the section-initialize newline, the heading and the help
+ return formatter._joinParts([ c.EOL, heading, itemHelp, c.EOL ]);
+};
+
+/**
+ * new HelpFormatter(options)
+ *
+ * #### Options:
+ * - `prog`: program name
+ * - `indentIncriment`: indent step, default value 2
+ * - `maxHelpPosition`: max help position, default value = 24
+ * - `width`: line width
+ *
+ **/
+var HelpFormatter = module.exports = function HelpFormatter(options) {
+ options = options || {};
+
+ this._prog = options.prog;
+
+ this._maxHelpPosition = options.maxHelpPosition || 24;
+ this._width = (options.width || ((process.env.COLUMNS || 80) - 2));
+
+ this._currentIndent = 0;
+ this._indentIncriment = options.indentIncriment || 2;
+ this._level = 0;
+ this._actionMaxLength = 0;
+
+ this._rootSection = new Section(null);
+ this._currentSection = this._rootSection;
+
+ this._whitespaceMatcher = new RegExp('\\s+', 'g');
+ this._longBreakMatcher = new RegExp(c.EOL + c.EOL + c.EOL + '+', 'g');
+};
+
+HelpFormatter.prototype._indent = function () {
+ this._currentIndent += this._indentIncriment;
+ this._level += 1;
+};
+
+HelpFormatter.prototype._dedent = function () {
+ this._currentIndent -= this._indentIncriment;
+ this._level -= 1;
+ if (this._currentIndent < 0) {
+ throw new Error('Indent decreased below 0.');
+ }
+};
+
+HelpFormatter.prototype._addItem = function (func, args) {
+ this._currentSection.addItem([ func, args ]);
+};
+
+//
+// Message building methods
+//
+
+/**
+ * HelpFormatter#startSection(heading) -> Void
+ * - heading (string): header string
+ *
+ * Start new help section
+ *
+ * See alse [code example][1]
+ *
+ * ##### Example
+ *
+ * formatter.startSection(actionGroup.title);
+ * formatter.addText(actionGroup.description);
+ * formatter.addArguments(actionGroup._groupActions);
+ * formatter.endSection();
+ *
+ **/
+HelpFormatter.prototype.startSection = function (heading) {
+ this._indent();
+ var section = new Section(this._currentSection, heading);
+ var func = section.formatHelp.bind(section);
+ this._addItem(func, [ this ]);
+ this._currentSection = section;
+};
+
+/**
+ * HelpFormatter#endSection -> Void
+ *
+ * End help section
+ *
+ * ##### Example
+ *
+ * formatter.startSection(actionGroup.title);
+ * formatter.addText(actionGroup.description);
+ * formatter.addArguments(actionGroup._groupActions);
+ * formatter.endSection();
+ **/
+HelpFormatter.prototype.endSection = function () {
+ this._currentSection = this._currentSection._parent;
+ this._dedent();
+};
+
+/**
+ * HelpFormatter#addText(text) -> Void
+ * - text (string): plain text
+ *
+ * Add plain text into current section
+ *
+ * ##### Example
+ *
+ * formatter.startSection(actionGroup.title);
+ * formatter.addText(actionGroup.description);
+ * formatter.addArguments(actionGroup._groupActions);
+ * formatter.endSection();
+ *
+ **/
+HelpFormatter.prototype.addText = function (text) {
+ if (text && text !== c.SUPPRESS) {
+ this._addItem(this._formatText, [ text ]);
+ }
+};
+
+/**
+ * HelpFormatter#addUsage(usage, actions, groups, prefix) -> Void
+ * - usage (string): usage text
+ * - actions (array): actions list
+ * - groups (array): groups list
+ * - prefix (string): usage prefix
+ *
+ * Add usage data into current section
+ *
+ * ##### Example
+ *
+ * formatter.addUsage(this.usage, this._actions, []);
+ * return formatter.formatHelp();
+ *
+ **/
+HelpFormatter.prototype.addUsage = function (usage, actions, groups, prefix) {
+ if (usage !== c.SUPPRESS) {
+ this._addItem(this._formatUsage, [ usage, actions, groups, prefix ]);
+ }
+};
+
+/**
+ * HelpFormatter#addArgument(action) -> Void
+ * - action (object): action
+ *
+ * Add argument into current section
+ *
+ * Single variant of [[HelpFormatter#addArguments]]
+ **/
+HelpFormatter.prototype.addArgument = function (action) {
+ if (action.help !== c.SUPPRESS) {
+ var self = this;
+
+ // find all invocations
+ var invocations = [ this._formatActionInvocation(action) ];
+ var invocationLength = invocations[0].length;
+
+ var actionLength;
+
+ if (action._getSubactions) {
+ this._indent();
+ action._getSubactions().forEach(function (subaction) {
+
+ var invocationNew = self._formatActionInvocation(subaction);
+ invocations.push(invocationNew);
+ invocationLength = Math.max(invocationLength, invocationNew.length);
+
+ });
+ this._dedent();
+ }
+
+ // update the maximum item length
+ actionLength = invocationLength + this._currentIndent;
+ this._actionMaxLength = Math.max(this._actionMaxLength, actionLength);
+
+ // add the item to the list
+ this._addItem(this._formatAction, [ action ]);
+ }
+};
+
+/**
+ * HelpFormatter#addArguments(actions) -> Void
+ * - actions (array): actions list
+ *
+ * Mass add arguments into current section
+ *
+ * ##### Example
+ *
+ * formatter.startSection(actionGroup.title);
+ * formatter.addText(actionGroup.description);
+ * formatter.addArguments(actionGroup._groupActions);
+ * formatter.endSection();
+ *
+ **/
+HelpFormatter.prototype.addArguments = function (actions) {
+ var self = this;
+ actions.forEach(function (action) {
+ self.addArgument(action);
+ });
+};
+
+//
+// Help-formatting methods
+//
+
+/**
+ * HelpFormatter#formatHelp -> string
+ *
+ * Format help
+ *
+ * ##### Example
+ *
+ * formatter.addText(this.epilog);
+ * return formatter.formatHelp();
+ *
+ **/
+HelpFormatter.prototype.formatHelp = function () {
+ var help = this._rootSection.formatHelp(this);
+ if (help) {
+ help = help.replace(this._longBreakMatcher, c.EOL + c.EOL);
+ help = $$.trimChars(help, c.EOL) + c.EOL;
+ }
+ return help;
+};
+
+HelpFormatter.prototype._joinParts = function (partStrings) {
+ return partStrings.filter(function (part) {
+ return (part && part !== c.SUPPRESS);
+ }).join('');
+};
+
+HelpFormatter.prototype._formatUsage = function (usage, actions, groups, prefix) {
+ if (!prefix && typeof prefix !== 'string') {
+ prefix = 'usage: ';
+ }
+
+ actions = actions || [];
+ groups = groups || [];
+
+
+ // if usage is specified, use that
+ if (usage) {
+ usage = sprintf(usage, { prog: this._prog });
+
+ // if no optionals or positionals are available, usage is just prog
+ } else if (!usage && actions.length === 0) {
+ usage = this._prog;
+
+ // if optionals and positionals are available, calculate usage
+ } else if (!usage) {
+ var prog = this._prog;
+ var optionals = [];
+ var positionals = [];
+ var actionUsage;
+ var textWidth;
+
+ // split optionals from positionals
+ actions.forEach(function (action) {
+ if (action.isOptional()) {
+ optionals.push(action);
+ } else {
+ positionals.push(action);
+ }
+ });
+
+ // build full usage string
+ actionUsage = this._formatActionsUsage([].concat(optionals, positionals), groups);
+ usage = [ prog, actionUsage ].join(' ');
+
+ // wrap the usage parts if it's too long
+ textWidth = this._width - this._currentIndent;
+ if ((prefix.length + usage.length) > textWidth) {
+
+ // break usage into wrappable parts
+ var regexpPart = new RegExp('\\(.*?\\)+|\\[.*?\\]+|\\S+', 'g');
+ var optionalUsage = this._formatActionsUsage(optionals, groups);
+ var positionalUsage = this._formatActionsUsage(positionals, groups);
+
+
+ var optionalParts = optionalUsage.match(regexpPart);
+ var positionalParts = positionalUsage.match(regexpPart) || [];
+
+ if (optionalParts.join(' ') !== optionalUsage) {
+ throw new Error('assert "optionalParts.join(\' \') === optionalUsage"');
+ }
+ if (positionalParts.join(' ') !== positionalUsage) {
+ throw new Error('assert "positionalParts.join(\' \') === positionalUsage"');
+ }
+
+ // helper for wrapping lines
+ /*eslint-disable func-style*/ // node 0.10 compat
+ var _getLines = function (parts, indent, prefix) {
+ var lines = [];
+ var line = [];
+
+ var lineLength = prefix ? prefix.length - 1 : indent.length - 1;
+
+ parts.forEach(function (part) {
+ if (lineLength + 1 + part.length > textWidth) {
+ lines.push(indent + line.join(' '));
+ line = [];
+ lineLength = indent.length - 1;
+ }
+ line.push(part);
+ lineLength += part.length + 1;
+ });
+
+ if (line) {
+ lines.push(indent + line.join(' '));
+ }
+ if (prefix) {
+ lines[0] = lines[0].substr(indent.length);
+ }
+ return lines;
+ };
+
+ var lines, indent, parts;
+ // if prog is short, follow it with optionals or positionals
+ if (prefix.length + prog.length <= 0.75 * textWidth) {
+ indent = $$.repeat(' ', (prefix.length + prog.length + 1));
+ if (optionalParts) {
+ lines = [].concat(
+ _getLines([ prog ].concat(optionalParts), indent, prefix),
+ _getLines(positionalParts, indent)
+ );
+ } else if (positionalParts) {
+ lines = _getLines([ prog ].concat(positionalParts), indent, prefix);
+ } else {
+ lines = [ prog ];
+ }
+
+ // if prog is long, put it on its own line
+ } else {
+ indent = $$.repeat(' ', prefix.length);
+ parts = optionalParts + positionalParts;
+ lines = _getLines(parts, indent);
+ if (lines.length > 1) {
+ lines = [].concat(
+ _getLines(optionalParts, indent),
+ _getLines(positionalParts, indent)
+ );
+ }
+ lines = [ prog ] + lines;
+ }
+ // join lines into usage
+ usage = lines.join(c.EOL);
+ }
+ }
+
+ // prefix with 'usage:'
+ return prefix + usage + c.EOL + c.EOL;
+};
+
+HelpFormatter.prototype._formatActionsUsage = function (actions, groups) {
+ // find group indices and identify actions in groups
+ var groupActions = [];
+ var inserts = [];
+ var self = this;
+
+ groups.forEach(function (group) {
+ var end;
+ var i;
+
+ var start = actions.indexOf(group._groupActions[0]);
+ if (start >= 0) {
+ end = start + group._groupActions.length;
+
+ //if (actions.slice(start, end) === group._groupActions) {
+ if ($$.arrayEqual(actions.slice(start, end), group._groupActions)) {
+ group._groupActions.forEach(function (action) {
+ groupActions.push(action);
+ });
+
+ if (!group.required) {
+ if (inserts[start]) {
+ inserts[start] += ' [';
+ } else {
+ inserts[start] = '[';
+ }
+ inserts[end] = ']';
+ } else {
+ if (inserts[start]) {
+ inserts[start] += ' (';
+ } else {
+ inserts[start] = '(';
+ }
+ inserts[end] = ')';
+ }
+ for (i = start + 1; i < end; i += 1) {
+ inserts[i] = '|';
+ }
+ }
+ }
+ });
+
+ // collect all actions format strings
+ var parts = [];
+
+ actions.forEach(function (action, actionIndex) {
+ var part;
+ var optionString;
+ var argsDefault;
+ var argsString;
+
+ // suppressed arguments are marked with None
+ // remove | separators for suppressed arguments
+ if (action.help === c.SUPPRESS) {
+ parts.push(null);
+ if (inserts[actionIndex] === '|') {
+ inserts.splice(actionIndex, actionIndex);
+ } else if (inserts[actionIndex + 1] === '|') {
+ inserts.splice(actionIndex + 1, actionIndex + 1);
+ }
+
+ // produce all arg strings
+ } else if (!action.isOptional()) {
+ part = self._formatArgs(action, action.dest);
+
+ // if it's in a group, strip the outer []
+ if (groupActions.indexOf(action) >= 0) {
+ if (part[0] === '[' && part[part.length - 1] === ']') {
+ part = part.slice(1, -1);
+ }
+ }
+ // add the action string to the list
+ parts.push(part);
+
+ // produce the first way to invoke the option in brackets
+ } else {
+ optionString = action.optionStrings[0];
+
+ // if the Optional doesn't take a value, format is: -s or --long
+ if (action.nargs === 0) {
+ part = '' + optionString;
+
+ // if the Optional takes a value, format is: -s ARGS or --long ARGS
+ } else {
+ argsDefault = action.dest.toUpperCase();
+ argsString = self._formatArgs(action, argsDefault);
+ part = optionString + ' ' + argsString;
+ }
+ // make it look optional if it's not required or in a group
+ if (!action.required && groupActions.indexOf(action) < 0) {
+ part = '[' + part + ']';
+ }
+ // add the action string to the list
+ parts.push(part);
+ }
+ });
+
+ // insert things at the necessary indices
+ for (var i = inserts.length - 1; i >= 0; --i) {
+ if (inserts[i] !== null) {
+ parts.splice(i, 0, inserts[i]);
+ }
+ }
+
+ // join all the action items with spaces
+ var text = parts.filter(function (part) {
+ return !!part;
+ }).join(' ');
+
+ // clean up separators for mutually exclusive groups
+ text = text.replace(/([\[(]) /g, '$1'); // remove spaces
+ text = text.replace(/ ([\])])/g, '$1');
+ text = text.replace(/\[ *\]/g, ''); // remove empty groups
+ text = text.replace(/\( *\)/g, '');
+ text = text.replace(/\(([^|]*)\)/g, '$1'); // remove () from single action groups
+
+ text = text.trim();
+
+ // return the text
+ return text;
+};
+
+HelpFormatter.prototype._formatText = function (text) {
+ text = sprintf(text, { prog: this._prog });
+ var textWidth = this._width - this._currentIndent;
+ var indentIncriment = $$.repeat(' ', this._currentIndent);
+ return this._fillText(text, textWidth, indentIncriment) + c.EOL + c.EOL;
+};
+
+HelpFormatter.prototype._formatAction = function (action) {
+ var self = this;
+
+ var helpText;
+ var helpLines;
+ var parts;
+ var indentFirst;
+
+ // determine the required width and the entry label
+ var helpPosition = Math.min(this._actionMaxLength + 2, this._maxHelpPosition);
+ var helpWidth = this._width - helpPosition;
+ var actionWidth = helpPosition - this._currentIndent - 2;
+ var actionHeader = this._formatActionInvocation(action);
+
+ // no help; start on same line and add a final newline
+ if (!action.help) {
+ actionHeader = $$.repeat(' ', this._currentIndent) + actionHeader + c.EOL;
+
+ // short action name; start on the same line and pad two spaces
+ } else if (actionHeader.length <= actionWidth) {
+ actionHeader = $$.repeat(' ', this._currentIndent) +
+ actionHeader +
+ ' ' +
+ $$.repeat(' ', actionWidth - actionHeader.length);
+ indentFirst = 0;
+
+ // long action name; start on the next line
+ } else {
+ actionHeader = $$.repeat(' ', this._currentIndent) + actionHeader + c.EOL;
+ indentFirst = helpPosition;
+ }
+
+ // collect the pieces of the action help
+ parts = [ actionHeader ];
+
+ // if there was help for the action, add lines of help text
+ if (action.help) {
+ helpText = this._expandHelp(action);
+ helpLines = this._splitLines(helpText, helpWidth);
+ parts.push($$.repeat(' ', indentFirst) + helpLines[0] + c.EOL);
+ helpLines.slice(1).forEach(function (line) {
+ parts.push($$.repeat(' ', helpPosition) + line + c.EOL);
+ });
+
+ // or add a newline if the description doesn't end with one
+ } else if (actionHeader.charAt(actionHeader.length - 1) !== c.EOL) {
+ parts.push(c.EOL);
+ }
+ // if there are any sub-actions, add their help as well
+ if (action._getSubactions) {
+ this._indent();
+ action._getSubactions().forEach(function (subaction) {
+ parts.push(self._formatAction(subaction));
+ });
+ this._dedent();
+ }
+ // return a single string
+ return this._joinParts(parts);
+};
+
+HelpFormatter.prototype._formatActionInvocation = function (action) {
+ if (!action.isOptional()) {
+ var format_func = this._metavarFormatter(action, action.dest);
+ var metavars = format_func(1);
+ return metavars[0];
+ }
+
+ var parts = [];
+ var argsDefault;
+ var argsString;
+
+ // if the Optional doesn't take a value, format is: -s, --long
+ if (action.nargs === 0) {
+ parts = parts.concat(action.optionStrings);
+
+ // if the Optional takes a value, format is: -s ARGS, --long ARGS
+ } else {
+ argsDefault = action.dest.toUpperCase();
+ argsString = this._formatArgs(action, argsDefault);
+ action.optionStrings.forEach(function (optionString) {
+ parts.push(optionString + ' ' + argsString);
+ });
+ }
+ return parts.join(', ');
+};
+
+HelpFormatter.prototype._metavarFormatter = function (action, metavarDefault) {
+ var result;
+
+ if (action.metavar || action.metavar === '') {
+ result = action.metavar;
+ } else if (action.choices) {
+ var choices = action.choices;
+
+ if (typeof choices === 'string') {
+ choices = choices.split('').join(', ');
+ } else if (Array.isArray(choices)) {
+ choices = choices.join(',');
+ } else {
+ choices = Object.keys(choices).join(',');
+ }
+ result = '{' + choices + '}';
+ } else {
+ result = metavarDefault;
+ }
+
+ return function (size) {
+ if (Array.isArray(result)) {
+ return result;
+ }
+
+ var metavars = [];
+ for (var i = 0; i < size; i += 1) {
+ metavars.push(result);
+ }
+ return metavars;
+ };
+};
+
+HelpFormatter.prototype._formatArgs = function (action, metavarDefault) {
+ var result;
+ var metavars;
+
+ var buildMetavar = this._metavarFormatter(action, metavarDefault);
+
+ switch (action.nargs) {
+ /*eslint-disable no-undefined*/
+ case undefined:
+ case null:
+ metavars = buildMetavar(1);
+ result = '' + metavars[0];
+ break;
+ case c.OPTIONAL:
+ metavars = buildMetavar(1);
+ result = '[' + metavars[0] + ']';
+ break;
+ case c.ZERO_OR_MORE:
+ metavars = buildMetavar(2);
+ result = '[' + metavars[0] + ' [' + metavars[1] + ' ...]]';
+ break;
+ case c.ONE_OR_MORE:
+ metavars = buildMetavar(2);
+ result = '' + metavars[0] + ' [' + metavars[1] + ' ...]';
+ break;
+ case c.REMAINDER:
+ result = '...';
+ break;
+ case c.PARSER:
+ metavars = buildMetavar(1);
+ result = metavars[0] + ' ...';
+ break;
+ default:
+ metavars = buildMetavar(action.nargs);
+ result = metavars.join(' ');
+ }
+ return result;
+};
+
+HelpFormatter.prototype._expandHelp = function (action) {
+ var params = { prog: this._prog };
+
+ Object.keys(action).forEach(function (actionProperty) {
+ var actionValue = action[actionProperty];
+
+ if (actionValue !== c.SUPPRESS) {
+ params[actionProperty] = actionValue;
+ }
+ });
+
+ if (params.choices) {
+ if (typeof params.choices === 'string') {
+ params.choices = params.choices.split('').join(', ');
+ } else if (Array.isArray(params.choices)) {
+ params.choices = params.choices.join(', ');
+ } else {
+ params.choices = Object.keys(params.choices).join(', ');
+ }
+ }
+
+ return sprintf(this._getHelpString(action), params);
+};
+
+HelpFormatter.prototype._splitLines = function (text, width) {
+ var lines = [];
+ var delimiters = [ ' ', '.', ',', '!', '?' ];
+ var re = new RegExp('[' + delimiters.join('') + '][^' + delimiters.join('') + ']*$');
+
+ text = text.replace(/[\n\|\t]/g, ' ');
+
+ text = text.trim();
+ text = text.replace(this._whitespaceMatcher, ' ');
+
+ // Wraps the single paragraph in text (a string) so every line
+ // is at most width characters long.
+ text.split(c.EOL).forEach(function (line) {
+ if (width >= line.length) {
+ lines.push(line);
+ return;
+ }
+
+ var wrapStart = 0;
+ var wrapEnd = width;
+ var delimiterIndex = 0;
+ while (wrapEnd <= line.length) {
+ if (wrapEnd !== line.length && delimiters.indexOf(line[wrapEnd] < -1)) {
+ delimiterIndex = (re.exec(line.substring(wrapStart, wrapEnd)) || {}).index;
+ wrapEnd = wrapStart + delimiterIndex + 1;
+ }
+ lines.push(line.substring(wrapStart, wrapEnd));
+ wrapStart = wrapEnd;
+ wrapEnd += width;
+ }
+ if (wrapStart < line.length) {
+ lines.push(line.substring(wrapStart, wrapEnd));
+ }
+ });
+
+ return lines;
+};
+
+HelpFormatter.prototype._fillText = function (text, width, indent) {
+ var lines = this._splitLines(text, width);
+ lines = lines.map(function (line) {
+ return indent + line;
+ });
+ return lines.join(c.EOL);
+};
+
+HelpFormatter.prototype._getHelpString = function (action) {
+ return action.help;
+};
diff --git a/tools/node_modules/eslint/node_modules/argparse/lib/namespace.js b/tools/node_modules/eslint/node_modules/argparse/lib/namespace.js
new file mode 100644
index 0000000000..a860de9ecc
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/argparse/lib/namespace.js
@@ -0,0 +1,76 @@
+/**
+ * class Namespace
+ *
+ * Simple object for storing attributes. Implements equality by attribute names
+ * and values, and provides a simple string representation.
+ *
+ * See also [original guide][1]
+ *
+ * [1]:http://docs.python.org/dev/library/argparse.html#the-namespace-object
+ **/
+'use strict';
+
+var $$ = require('./utils');
+
+/**
+ * new Namespace(options)
+ * - options(object): predefined propertis for result object
+ *
+ **/
+var Namespace = module.exports = function Namespace(options) {
+ $$.extend(this, options);
+};
+
+/**
+ * Namespace#isset(key) -> Boolean
+ * - key (string|number): property name
+ *
+ * Tells whenever `namespace` contains given `key` or not.
+ **/
+Namespace.prototype.isset = function (key) {
+ return $$.has(this, key);
+};
+
+/**
+ * Namespace#set(key, value) -> self
+ * -key (string|number|object): propery name
+ * -value (mixed): new property value
+ *
+ * Set the property named key with value.
+ * If key object then set all key properties to namespace object
+ **/
+Namespace.prototype.set = function (key, value) {
+ if (typeof (key) === 'object') {
+ $$.extend(this, key);
+ } else {
+ this[key] = value;
+ }
+ return this;
+};
+
+/**
+ * Namespace#get(key, defaultValue) -> mixed
+ * - key (string|number): property name
+ * - defaultValue (mixed): default value
+ *
+ * Return the property key or defaulValue if not set
+ **/
+Namespace.prototype.get = function (key, defaultValue) {
+ return !this[key] ? defaultValue : this[key];
+};
+
+/**
+ * Namespace#unset(key, defaultValue) -> mixed
+ * - key (string|number): property name
+ * - defaultValue (mixed): default value
+ *
+ * Return data[key](and delete it) or defaultValue
+ **/
+Namespace.prototype.unset = function (key, defaultValue) {
+ var value = this[key];
+ if (value !== null) {
+ delete this[key];
+ return value;
+ }
+ return defaultValue;
+};
diff --git a/tools/node_modules/eslint/node_modules/argparse/lib/utils.js b/tools/node_modules/eslint/node_modules/argparse/lib/utils.js
new file mode 100644
index 0000000000..4a9cf3edb6
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/argparse/lib/utils.js
@@ -0,0 +1,57 @@
+'use strict';
+
+exports.repeat = function (str, num) {
+ var result = '';
+ for (var i = 0; i < num; i++) { result += str; }
+ return result;
+};
+
+exports.arrayEqual = function (a, b) {
+ if (a.length !== b.length) { return false; }
+ for (var i = 0; i < a.length; i++) {
+ if (a[i] !== b[i]) { return false; }
+ }
+ return true;
+};
+
+exports.trimChars = function (str, chars) {
+ var start = 0;
+ var end = str.length - 1;
+ while (chars.indexOf(str.charAt(start)) >= 0) { start++; }
+ while (chars.indexOf(str.charAt(end)) >= 0) { end--; }
+ return str.slice(start, end + 1);
+};
+
+exports.capitalize = function (str) {
+ return str.charAt(0).toUpperCase() + str.slice(1);
+};
+
+exports.arrayUnion = function () {
+ var result = [];
+ for (var i = 0, values = {}; i < arguments.length; i++) {
+ var arr = arguments[i];
+ for (var j = 0; j < arr.length; j++) {
+ if (!values[arr[j]]) {
+ values[arr[j]] = true;
+ result.push(arr[j]);
+ }
+ }
+ }
+ return result;
+};
+
+function has(obj, key) {
+ return Object.prototype.hasOwnProperty.call(obj, key);
+}
+
+exports.has = has;
+
+exports.extend = function (dest, src) {
+ for (var i in src) {
+ if (has(src, i)) { dest[i] = src[i]; }
+ }
+};
+
+exports.trimEnd = function (str) {
+ return str.replace(/\s+$/g, '');
+};
diff --git a/tools/node_modules/eslint/node_modules/argparse/package.json b/tools/node_modules/eslint/node_modules/argparse/package.json
new file mode 100644
index 0000000000..eb807f0c85
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/argparse/package.json
@@ -0,0 +1,70 @@
+{
+ "_from": "argparse@^1.0.7",
+ "_id": "argparse@1.0.9",
+ "_inBundle": false,
+ "_integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=",
+ "_location": "/eslint/argparse",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "argparse@^1.0.7",
+ "name": "argparse",
+ "escapedName": "argparse",
+ "rawSpec": "^1.0.7",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.7"
+ },
+ "_requiredBy": [
+ "/eslint/js-yaml"
+ ],
+ "_resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz",
+ "_shasum": "73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86",
+ "_spec": "argparse@^1.0.7",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/js-yaml",
+ "bugs": {
+ "url": "https://github.com/nodeca/argparse/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Eugene Shkuropat"
+ },
+ {
+ "name": "Paul Jacobson"
+ }
+ ],
+ "dependencies": {
+ "sprintf-js": "~1.0.2"
+ },
+ "deprecated": false,
+ "description": "Very powerful CLI arguments parser. Native port of argparse - python's options parsing library",
+ "devDependencies": {
+ "eslint": "^2.13.1",
+ "istanbul": "^0.4.5",
+ "mocha": "^3.1.0",
+ "ndoc": "^5.0.1"
+ },
+ "files": [
+ "index.js",
+ "lib/"
+ ],
+ "homepage": "https://github.com/nodeca/argparse#readme",
+ "keywords": [
+ "cli",
+ "parser",
+ "argparse",
+ "option",
+ "args"
+ ],
+ "license": "MIT",
+ "name": "argparse",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/nodeca/argparse.git"
+ },
+ "scripts": {
+ "test": "make test"
+ },
+ "version": "1.0.9"
+}
diff --git a/tools/node_modules/eslint/node_modules/array-union/index.js b/tools/node_modules/eslint/node_modules/array-union/index.js
new file mode 100644
index 0000000000..e33f38a1eb
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/array-union/index.js
@@ -0,0 +1,6 @@
+'use strict';
+var arrayUniq = require('array-uniq');
+
+module.exports = function () {
+ return arrayUniq([].concat.apply([], arguments));
+};
diff --git a/tools/node_modules/eslint/node_modules/array-union/license b/tools/node_modules/eslint/node_modules/array-union/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/array-union/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/tools/node_modules/eslint/node_modules/array-union/package.json b/tools/node_modules/eslint/node_modules/array-union/package.json
new file mode 100644
index 0000000000..90cf954ff0
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/array-union/package.json
@@ -0,0 +1,72 @@
+{
+ "_from": "array-union@^1.0.1",
+ "_id": "array-union@1.0.2",
+ "_inBundle": false,
+ "_integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=",
+ "_location": "/eslint/array-union",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "array-union@^1.0.1",
+ "name": "array-union",
+ "escapedName": "array-union",
+ "rawSpec": "^1.0.1",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.1"
+ },
+ "_requiredBy": [
+ "/eslint/globby"
+ ],
+ "_resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz",
+ "_shasum": "9a34410e4f4e3da23dea375be5be70f24778ec39",
+ "_spec": "array-union@^1.0.1",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/globby",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/array-union/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "array-uniq": "^1.0.1"
+ },
+ "deprecated": false,
+ "description": "Create an array of unique values, in order, from the input arrays",
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/array-union#readme",
+ "keywords": [
+ "array",
+ "arr",
+ "set",
+ "uniq",
+ "unique",
+ "duplicate",
+ "remove",
+ "union",
+ "combine",
+ "merge"
+ ],
+ "license": "MIT",
+ "name": "array-union",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/array-union.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "1.0.2"
+}
diff --git a/tools/node_modules/eslint/node_modules/array-union/readme.md b/tools/node_modules/eslint/node_modules/array-union/readme.md
new file mode 100644
index 0000000000..ea472dd079
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/array-union/readme.md
@@ -0,0 +1,28 @@
+# array-union [![Build Status](https://travis-ci.org/sindresorhus/array-union.svg?branch=master)](https://travis-ci.org/sindresorhus/array-union)
+
+> Create an array of unique values, in order, from the input arrays
+
+
+## Install
+
+```
+$ npm install --save array-union
+```
+
+
+## Usage
+
+```js
+const arrayUnion = require('array-union');
+
+arrayUnion([1, 1, 2, 3], [2, 3]);
+//=> [1, 2, 3]
+
+arrayUnion(['foo', 'foo', 'bar'], ['foo']);
+//=> ['foo', 'bar']
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/tools/node_modules/eslint/node_modules/array-uniq/index.js b/tools/node_modules/eslint/node_modules/array-uniq/index.js
new file mode 100644
index 0000000000..edd09f8114
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/array-uniq/index.js
@@ -0,0 +1,62 @@
+'use strict';
+
+// there's 3 implementations written in increasing order of efficiency
+
+// 1 - no Set type is defined
+function uniqNoSet(arr) {
+ var ret = [];
+
+ for (var i = 0; i < arr.length; i++) {
+ if (ret.indexOf(arr[i]) === -1) {
+ ret.push(arr[i]);
+ }
+ }
+
+ return ret;
+}
+
+// 2 - a simple Set type is defined
+function uniqSet(arr) {
+ var seen = new Set();
+ return arr.filter(function (el) {
+ if (!seen.has(el)) {
+ seen.add(el);
+ return true;
+ }
+
+ return false;
+ });
+}
+
+// 3 - a standard Set type is defined and it has a forEach method
+function uniqSetWithForEach(arr) {
+ var ret = [];
+
+ (new Set(arr)).forEach(function (el) {
+ ret.push(el);
+ });
+
+ return ret;
+}
+
+// V8 currently has a broken implementation
+// https://github.com/joyent/node/issues/8449
+function doesForEachActuallyWork() {
+ var ret = false;
+
+ (new Set([true])).forEach(function (el) {
+ ret = el;
+ });
+
+ return ret === true;
+}
+
+if ('Set' in global) {
+ if (typeof Set.prototype.forEach === 'function' && doesForEachActuallyWork()) {
+ module.exports = uniqSetWithForEach;
+ } else {
+ module.exports = uniqSet;
+ }
+} else {
+ module.exports = uniqNoSet;
+}
diff --git a/tools/node_modules/eslint/node_modules/array-uniq/license b/tools/node_modules/eslint/node_modules/array-uniq/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/array-uniq/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/tools/node_modules/eslint/node_modules/array-uniq/package.json b/tools/node_modules/eslint/node_modules/array-uniq/package.json
new file mode 100644
index 0000000000..527dcd3a81
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/array-uniq/package.json
@@ -0,0 +1,69 @@
+{
+ "_from": "array-uniq@^1.0.1",
+ "_id": "array-uniq@1.0.3",
+ "_inBundle": false,
+ "_integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=",
+ "_location": "/eslint/array-uniq",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "array-uniq@^1.0.1",
+ "name": "array-uniq",
+ "escapedName": "array-uniq",
+ "rawSpec": "^1.0.1",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.1"
+ },
+ "_requiredBy": [
+ "/eslint/array-union"
+ ],
+ "_resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz",
+ "_shasum": "af6ac877a25cc7f74e058894753858dfdb24fdb6",
+ "_spec": "array-uniq@^1.0.1",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/array-union",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/array-uniq/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Create an array without duplicates",
+ "devDependencies": {
+ "ava": "*",
+ "es6-set": "^0.1.0",
+ "require-uncached": "^1.0.2",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/array-uniq#readme",
+ "keywords": [
+ "array",
+ "arr",
+ "set",
+ "uniq",
+ "unique",
+ "es6",
+ "duplicate",
+ "remove"
+ ],
+ "license": "MIT",
+ "name": "array-uniq",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/array-uniq.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "1.0.3"
+}
diff --git a/tools/node_modules/eslint/node_modules/array-uniq/readme.md b/tools/node_modules/eslint/node_modules/array-uniq/readme.md
new file mode 100644
index 0000000000..f0bd98c4f0
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/array-uniq/readme.md
@@ -0,0 +1,30 @@
+# array-uniq [![Build Status](https://travis-ci.org/sindresorhus/array-uniq.svg?branch=master)](https://travis-ci.org/sindresorhus/array-uniq)
+
+> Create an array without duplicates
+
+It's already pretty fast, but will be much faster when [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) becomes available in V8 (especially with large arrays).
+
+
+## Install
+
+```
+$ npm install --save array-uniq
+```
+
+
+## Usage
+
+```js
+const arrayUniq = require('array-uniq');
+
+arrayUniq([1, 1, 2, 3, 3]);
+//=> [1, 2, 3]
+
+arrayUniq(['foo', 'foo', 'bar', 'foo']);
+//=> ['foo', 'bar']
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/tools/node_modules/eslint/node_modules/arrify/index.js b/tools/node_modules/eslint/node_modules/arrify/index.js
new file mode 100644
index 0000000000..2a2fdeeb1d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/arrify/index.js
@@ -0,0 +1,8 @@
+'use strict';
+module.exports = function (val) {
+ if (val === null || val === undefined) {
+ return [];
+ }
+
+ return Array.isArray(val) ? val : [val];
+};
diff --git a/tools/node_modules/eslint/node_modules/arrify/license b/tools/node_modules/eslint/node_modules/arrify/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/arrify/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/tools/node_modules/eslint/node_modules/arrify/package.json b/tools/node_modules/eslint/node_modules/arrify/package.json
new file mode 100644
index 0000000000..113369b625
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/arrify/package.json
@@ -0,0 +1,65 @@
+{
+ "_from": "arrify@^1.0.0",
+ "_id": "arrify@1.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=",
+ "_location": "/eslint/arrify",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "arrify@^1.0.0",
+ "name": "arrify",
+ "escapedName": "arrify",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/eslint/globby"
+ ],
+ "_resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
+ "_shasum": "898508da2226f380df904728456849c1501a4b0d",
+ "_spec": "arrify@^1.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/globby",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/arrify/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Convert a value to an array",
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/arrify#readme",
+ "keywords": [
+ "array",
+ "arr",
+ "arrify",
+ "arrayify",
+ "convert",
+ "value"
+ ],
+ "license": "MIT",
+ "name": "arrify",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/arrify.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "1.0.1"
+}
diff --git a/tools/node_modules/eslint/node_modules/arrify/readme.md b/tools/node_modules/eslint/node_modules/arrify/readme.md
new file mode 100644
index 0000000000..183d07576f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/arrify/readme.md
@@ -0,0 +1,36 @@
+# arrify [![Build Status](https://travis-ci.org/sindresorhus/arrify.svg?branch=master)](https://travis-ci.org/sindresorhus/arrify)
+
+> Convert a value to an array
+
+
+## Install
+
+```
+$ npm install --save arrify
+```
+
+
+## Usage
+
+```js
+const arrify = require('arrify');
+
+arrify('unicorn');
+//=> ['unicorn']
+
+arrify(['unicorn']);
+//=> ['unicorn']
+
+arrify(null);
+//=> []
+
+arrify(undefined);
+//=> []
+```
+
+*Supplying `null` or `undefined` results in an empty array.*
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/tools/node_modules/eslint/node_modules/babel-code-frame/README.md b/tools/node_modules/eslint/node_modules/babel-code-frame/README.md
new file mode 100644
index 0000000000..7ef5368d31
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/babel-code-frame/README.md
@@ -0,0 +1,60 @@
+# babel-code-frame
+
+> Generate errors that contain a code frame that point to source locations.
+
+## Install
+
+```sh
+npm install --save-dev babel-code-frame
+```
+
+## Usage
+
+```js
+import codeFrame from 'babel-code-frame';
+
+const rawLines = `class Foo {
+ constructor()
+}`;
+const lineNumber = 2;
+const colNumber = 16;
+
+const result = codeFrame(rawLines, lineNumber, colNumber, { /* options */ });
+
+console.log(result);
+```
+
+```sh
+ 1 | class Foo {
+> 2 | constructor()
+ | ^
+ 3 | }
+```
+
+If the column number is not known, you may pass `null` instead.
+
+## Options
+
+### `highlightCode`
+
+`boolean`, defaults to `false`.
+
+Toggles syntax highlighting the code as JavaScript for terminals.
+
+### `linesAbove`
+
+`number`, defaults to `2`.
+
+Adjust the number of lines to show above the error.
+
+### `linesBelow`
+
+`number`, defaults to `3`.
+
+Adjust the number of lines to show below the error.
+
+### `forceColor`
+
+`boolean`, defaults to `false`.
+
+Enable this to forcibly syntax highlight the code as JavaScript (for non-terminals); overrides `highlightCode`.
diff --git a/tools/node_modules/eslint/node_modules/babel-code-frame/lib/index.js b/tools/node_modules/eslint/node_modules/babel-code-frame/lib/index.js
new file mode 100644
index 0000000000..ff49b9082c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/babel-code-frame/lib/index.js
@@ -0,0 +1,141 @@
+"use strict";
+
+exports.__esModule = true;
+
+exports.default = function (rawLines, lineNumber, colNumber) {
+ var opts = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
+
+ colNumber = Math.max(colNumber, 0);
+
+ var highlighted = opts.highlightCode && _chalk2.default.supportsColor || opts.forceColor;
+ var chalk = _chalk2.default;
+ if (opts.forceColor) {
+ chalk = new _chalk2.default.constructor({ enabled: true });
+ }
+ var maybeHighlight = function maybeHighlight(chalkFn, string) {
+ return highlighted ? chalkFn(string) : string;
+ };
+ var defs = getDefs(chalk);
+ if (highlighted) rawLines = highlight(defs, rawLines);
+
+ var linesAbove = opts.linesAbove || 2;
+ var linesBelow = opts.linesBelow || 3;
+
+ var lines = rawLines.split(NEWLINE);
+ var start = Math.max(lineNumber - (linesAbove + 1), 0);
+ var end = Math.min(lines.length, lineNumber + linesBelow);
+
+ if (!lineNumber && !colNumber) {
+ start = 0;
+ end = lines.length;
+ }
+
+ var numberMaxWidth = String(end).length;
+
+ var frame = lines.slice(start, end).map(function (line, index) {
+ var number = start + 1 + index;
+ var paddedNumber = (" " + number).slice(-numberMaxWidth);
+ var gutter = " " + paddedNumber + " | ";
+ if (number === lineNumber) {
+ var markerLine = "";
+ if (colNumber) {
+ var markerSpacing = line.slice(0, colNumber - 1).replace(/[^\t]/g, " ");
+ markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), markerSpacing, maybeHighlight(defs.marker, "^")].join("");
+ }
+ return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line, markerLine].join("");
+ } else {
+ return " " + maybeHighlight(defs.gutter, gutter) + line;
+ }
+ }).join("\n");
+
+ if (highlighted) {
+ return chalk.reset(frame);
+ } else {
+ return frame;
+ }
+};
+
+var _jsTokens = require("js-tokens");
+
+var _jsTokens2 = _interopRequireDefault(_jsTokens);
+
+var _esutils = require("esutils");
+
+var _esutils2 = _interopRequireDefault(_esutils);
+
+var _chalk = require("chalk");
+
+var _chalk2 = _interopRequireDefault(_chalk);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function getDefs(chalk) {
+ return {
+ keyword: chalk.cyan,
+ capitalized: chalk.yellow,
+ jsx_tag: chalk.yellow,
+ punctuator: chalk.yellow,
+
+ number: chalk.magenta,
+ string: chalk.green,
+ regex: chalk.magenta,
+ comment: chalk.grey,
+ invalid: chalk.white.bgRed.bold,
+ gutter: chalk.grey,
+ marker: chalk.red.bold
+ };
+}
+
+var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
+
+var JSX_TAG = /^[a-z][\w-]*$/i;
+
+var BRACKET = /^[()\[\]{}]$/;
+
+function getTokenType(match) {
+ var _match$slice = match.slice(-2),
+ offset = _match$slice[0],
+ text = _match$slice[1];
+
+ var token = (0, _jsTokens.matchToToken)(match);
+
+ if (token.type === "name") {
+ if (_esutils2.default.keyword.isReservedWordES6(token.value)) {
+ return "keyword";
+ }
+
+ if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.substr(offset - 2, 2) == "</")) {
+ return "jsx_tag";
+ }
+
+ if (token.value[0] !== token.value[0].toLowerCase()) {
+ return "capitalized";
+ }
+ }
+
+ if (token.type === "punctuator" && BRACKET.test(token.value)) {
+ return "bracket";
+ }
+
+ return token.type;
+}
+
+function highlight(defs, text) {
+ return text.replace(_jsTokens2.default, function () {
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ var type = getTokenType(args);
+ var colorize = defs[type];
+ if (colorize) {
+ return args[0].split(NEWLINE).map(function (str) {
+ return colorize(str);
+ }).join("\n");
+ } else {
+ return args[0];
+ }
+ });
+}
+
+module.exports = exports["default"]; \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/babel-code-frame/node_modules/chalk/index.js b/tools/node_modules/eslint/node_modules/babel-code-frame/node_modules/chalk/index.js
new file mode 100644
index 0000000000..2d85a91747
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/babel-code-frame/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/tools/node_modules/eslint/node_modules/babel-code-frame/node_modules/chalk/license b/tools/node_modules/eslint/node_modules/babel-code-frame/node_modules/chalk/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/babel-code-frame/node_modules/chalk/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/tools/node_modules/eslint/node_modules/babel-code-frame/node_modules/chalk/package.json b/tools/node_modules/eslint/node_modules/babel-code-frame/node_modules/chalk/package.json
new file mode 100644
index 0000000000..1389447f13
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/babel-code-frame/node_modules/chalk/package.json
@@ -0,0 +1,114 @@
+{
+ "_from": "chalk@^1.1.3",
+ "_id": "chalk@1.1.3",
+ "_inBundle": false,
+ "_integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
+ "_location": "/eslint/babel-code-frame/chalk",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "chalk@^1.1.3",
+ "name": "chalk",
+ "escapedName": "chalk",
+ "rawSpec": "^1.1.3",
+ "saveSpec": null,
+ "fetchSpec": "^1.1.3"
+ },
+ "_requiredBy": [
+ "/eslint/babel-code-frame"
+ ],
+ "_resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
+ "_shasum": "a8115c55e4a702fe4d150abd3872822a7e09fc98",
+ "_spec": "chalk@^1.1.3",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/babel-code-frame",
+ "bugs": {
+ "url": "https://github.com/chalk/chalk/issues"
+ },
+ "bundleDependencies": false,
+ "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"
+ },
+ "deprecated": false,
+ "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": "*"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "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": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ {
+ "name": "Joshua Appelman",
+ "email": "jappelman@xebia.com",
+ "url": "jbnicolai.com"
+ },
+ {
+ "name": "JD Ballard",
+ "email": "i.am.qix@gmail.com",
+ "url": "github.com/qix-"
+ }
+ ],
+ "name": "chalk",
+ "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/tools/node_modules/eslint/node_modules/babel-code-frame/node_modules/chalk/readme.md b/tools/node_modules/eslint/node_modules/babel-code-frame/node_modules/chalk/readme.md
new file mode 100644
index 0000000000..5cf111e353
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/babel-code-frame/node_modules/chalk/readme.md
@@ -0,0 +1,213 @@
+<h1 align="center">
+ <br>
+ <br>
+ <img width="360" src="https://cdn.rawgit.com/chalk/chalk/19935d6484811c5e468817f846b7b3d417d7bf4a/logo.svg" alt="chalk">
+ <br>
+ <br>
+ <br>
+</h1>
+
+> 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.`<style>[.<style>...](string, [string...])`
+
+Example: `chalk.red.bold.underline('Hello', 'world');`
+
+Chain [styles](#styles) and call the last one as a method with a string argument. Order doesn't matter, and later styles take precedent in case of a conflict. This simply means that `Chalk.red.yellow.green` is equivalent to `Chalk.green`.
+
+Multiple arguments will be separated by space.
+
+### chalk.enabled
+
+Color support is automatically detected, but you can override it by setting the `enabled` property. You should however only do this in your own code as it applies globally to all chalk consumers.
+
+If you need to change this in a reusable module create a new instance:
+
+```js
+var ctx = new chalk.constructor({enabled: false});
+```
+
+### chalk.supportsColor
+
+Detect whether the terminal [supports color](https://github.com/chalk/supports-color). Used internally and handled for you, but exposed for convenience.
+
+Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`.
+
+### chalk.styles
+
+Exposes the styles as [ANSI escape codes](https://github.com/chalk/ansi-styles).
+
+Generally not useful, but you might need just the `.open` or `.close` escape code if you're mixing externally styled strings with your own.
+
+```js
+var chalk = require('chalk');
+
+console.log(chalk.styles.red);
+//=> {open: '\u001b[31m', close: '\u001b[39m'}
+
+console.log(chalk.styles.red.open + 'Hello' + chalk.styles.red.close);
+```
+
+### chalk.hasColor(string)
+
+Check whether a string [has color](https://github.com/chalk/has-ansi).
+
+### chalk.stripColor(string)
+
+[Strip color](https://github.com/chalk/strip-ansi) from a string.
+
+Can be useful in combination with `.supportsColor` to strip color on externally styled text when it's not supported.
+
+Example:
+
+```js
+var chalk = require('chalk');
+var styledString = getText();
+
+if (!chalk.supportsColor) {
+ styledString = chalk.stripColor(styledString);
+}
+```
+
+
+## Styles
+
+### Modifiers
+
+- `reset`
+- `bold`
+- `dim`
+- `italic` *(not widely supported)*
+- `underline`
+- `inverse`
+- `hidden`
+- `strikethrough` *(not widely supported)*
+
+### Colors
+
+- `black`
+- `red`
+- `green`
+- `yellow`
+- `blue` *(on Windows the bright version is used as normal blue is illegible)*
+- `magenta`
+- `cyan`
+- `white`
+- `gray`
+
+### Background colors
+
+- `bgBlack`
+- `bgRed`
+- `bgGreen`
+- `bgYellow`
+- `bgBlue`
+- `bgMagenta`
+- `bgCyan`
+- `bgWhite`
+
+
+## 256-colors
+
+Chalk does not support anything other than the base eight colors, which guarantees it will work on all terminals and systems. Some terminals, specifically `xterm` compliant ones, will support the full range of 8-bit colors. For this the lower level [ansi-256-colors](https://github.com/jbnicolai/ansi-256-colors) package can be used.
+
+
+## Windows
+
+If you're on Windows, do yourself a favor and use [`cmder`](http://bliker.github.io/cmder/) instead of `cmd.exe`.
+
+
+## Related
+
+- [chalk-cli](https://github.com/chalk/chalk-cli) - CLI for this module
+- [ansi-styles](https://github.com/chalk/ansi-styles/) - ANSI escape codes for styling strings in the terminal
+- [supports-color](https://github.com/chalk/supports-color/) - Detect whether a terminal supports color
+- [strip-ansi](https://github.com/chalk/strip-ansi) - Strip ANSI escape codes
+- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes
+- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes
+- [wrap-ansi](https://github.com/chalk/wrap-ansi) - Wordwrap a string with ANSI escape codes
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/tools/node_modules/eslint/node_modules/babel-code-frame/node_modules/strip-ansi/index.js b/tools/node_modules/eslint/node_modules/babel-code-frame/node_modules/strip-ansi/index.js
new file mode 100644
index 0000000000..099480fbfc
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/babel-code-frame/node_modules/strip-ansi/index.js
@@ -0,0 +1,6 @@
+'use strict';
+var ansiRegex = require('ansi-regex')();
+
+module.exports = function (str) {
+ return typeof str === 'string' ? str.replace(ansiRegex, '') : str;
+};
diff --git a/tools/node_modules/eslint/node_modules/babel-code-frame/node_modules/strip-ansi/license b/tools/node_modules/eslint/node_modules/babel-code-frame/node_modules/strip-ansi/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/babel-code-frame/node_modules/strip-ansi/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/tools/node_modules/eslint/node_modules/babel-code-frame/node_modules/strip-ansi/package.json b/tools/node_modules/eslint/node_modules/babel-code-frame/node_modules/strip-ansi/package.json
new file mode 100644
index 0000000000..3282a7f593
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/babel-code-frame/node_modules/strip-ansi/package.json
@@ -0,0 +1,101 @@
+{
+ "_from": "strip-ansi@^3.0.0",
+ "_id": "strip-ansi@3.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
+ "_location": "/eslint/babel-code-frame/strip-ansi",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "strip-ansi@^3.0.0",
+ "name": "strip-ansi",
+ "escapedName": "strip-ansi",
+ "rawSpec": "^3.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^3.0.0"
+ },
+ "_requiredBy": [
+ "/eslint/babel-code-frame/chalk"
+ ],
+ "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
+ "_shasum": "6a385fb8853d952d5ff05d0e8aaf94278dc63dcf",
+ "_spec": "strip-ansi@^3.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/babel-code-frame/node_modules/chalk",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/chalk/strip-ansi/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "ansi-regex": "^2.0.0"
+ },
+ "deprecated": false,
+ "description": "Strip ANSI escape codes",
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/chalk/strip-ansi#readme",
+ "keywords": [
+ "strip",
+ "trim",
+ "remove",
+ "ansi",
+ "styles",
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "string",
+ "tty",
+ "escape",
+ "formatting",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "log",
+ "logging",
+ "command-line",
+ "text"
+ ],
+ "license": "MIT",
+ "maintainers": [
+ {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ {
+ "name": "Joshua Boy Nicolai Appelman",
+ "email": "joshua@jbna.nl",
+ "url": "jbna.nl"
+ },
+ {
+ "name": "JD Ballard",
+ "email": "i.am.qix@gmail.com",
+ "url": "github.com/qix-"
+ }
+ ],
+ "name": "strip-ansi",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/chalk/strip-ansi.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "3.0.1"
+}
diff --git a/tools/node_modules/eslint/node_modules/babel-code-frame/node_modules/strip-ansi/readme.md b/tools/node_modules/eslint/node_modules/babel-code-frame/node_modules/strip-ansi/readme.md
new file mode 100644
index 0000000000..cb7d9ff7ee
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/babel-code-frame/node_modules/strip-ansi/readme.md
@@ -0,0 +1,33 @@
+# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi)
+
+> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
+
+
+## Install
+
+```
+$ npm install --save strip-ansi
+```
+
+
+## Usage
+
+```js
+var stripAnsi = require('strip-ansi');
+
+stripAnsi('\u001b[4mcake\u001b[0m');
+//=> 'cake'
+```
+
+
+## Related
+
+- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module
+- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes
+- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes
+- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/tools/node_modules/eslint/node_modules/babel-code-frame/package-lock.json b/tools/node_modules/eslint/node_modules/babel-code-frame/package-lock.json
new file mode 100644
index 0000000000..272104b215
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/babel-code-frame/package-lock.json
@@ -0,0 +1,66 @@
+{
+ "name": "babel-code-frame",
+ "version": "6.22.0",
+ "lockfileVersion": 1,
+ "requires": true,
+ "dependencies": {
+ "ansi-regex": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
+ "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
+ },
+ "ansi-styles": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
+ "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4="
+ },
+ "chalk": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
+ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
+ "requires": {
+ "ansi-styles": "2.2.1",
+ "escape-string-regexp": "1.0.5",
+ "has-ansi": "2.0.0",
+ "strip-ansi": "3.0.1",
+ "supports-color": "2.0.0"
+ }
+ },
+ "escape-string-regexp": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
+ },
+ "esutils": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
+ "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs="
+ },
+ "has-ansi": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
+ "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
+ "requires": {
+ "ansi-regex": "2.1.1"
+ }
+ },
+ "js-tokens": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
+ "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls="
+ },
+ "strip-ansi": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
+ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
+ "requires": {
+ "ansi-regex": "2.1.1"
+ }
+ },
+ "supports-color": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
+ "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc="
+ }
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/babel-code-frame/package.json b/tools/node_modules/eslint/node_modules/babel-code-frame/package.json
new file mode 100644
index 0000000000..fe67d67a0c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/babel-code-frame/package.json
@@ -0,0 +1,52 @@
+{
+ "_from": "babel-code-frame@^6.22.0",
+ "_id": "babel-code-frame@6.26.0",
+ "_inBundle": false,
+ "_integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=",
+ "_location": "/eslint/babel-code-frame",
+ "_phantomChildren": {
+ "ansi-regex": "2.1.1",
+ "ansi-styles": "2.2.1",
+ "escape-string-regexp": "1.0.5",
+ "has-ansi": "2.0.0",
+ "supports-color": "2.0.0"
+ },
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "babel-code-frame@^6.22.0",
+ "name": "babel-code-frame",
+ "escapedName": "babel-code-frame",
+ "rawSpec": "^6.22.0",
+ "saveSpec": null,
+ "fetchSpec": "^6.22.0"
+ },
+ "_requiredBy": [
+ "/eslint"
+ ],
+ "_resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
+ "_shasum": "63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b",
+ "_spec": "babel-code-frame@^6.22.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint",
+ "author": {
+ "name": "Sebastian McKenzie",
+ "email": "sebmck@gmail.com"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "chalk": "^1.1.3",
+ "esutils": "^2.0.2",
+ "js-tokens": "^3.0.2"
+ },
+ "deprecated": false,
+ "description": "Generate errors that contain a code frame that point to source locations.",
+ "homepage": "https://babeljs.io/",
+ "license": "MIT",
+ "main": "lib/index.js",
+ "name": "babel-code-frame",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel/tree/master/packages/babel-code-frame"
+ },
+ "version": "6.26.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/bail/LICENSE b/tools/node_modules/eslint/node_modules/bail/LICENSE
new file mode 100644
index 0000000000..32e7a3d93c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/bail/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2015 Titus Wormer <tituswormer@gmail.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/tools/node_modules/eslint/node_modules/bail/index.js b/tools/node_modules/eslint/node_modules/bail/index.js
new file mode 100644
index 0000000000..f5842e2590
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/bail/index.js
@@ -0,0 +1,9 @@
+'use strict';
+
+module.exports = bail;
+
+function bail(err) {
+ if (err) {
+ throw err;
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/bail/package.json b/tools/node_modules/eslint/node_modules/bail/package.json
new file mode 100644
index 0000000000..8388d6d5bb
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/bail/package.json
@@ -0,0 +1,99 @@
+{
+ "_from": "bail@^1.0.0",
+ "_id": "bail@1.0.2",
+ "_inBundle": false,
+ "_integrity": "sha1-99bBcxYwqfnw1NNe0fli4gdKF2Q=",
+ "_location": "/bail",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "bail@^1.0.0",
+ "name": "bail",
+ "escapedName": "bail",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/unified"
+ ],
+ "_resolved": "https://registry.npmjs.org/bail/-/bail-1.0.2.tgz",
+ "_shasum": "f7d6c1731630a9f9f0d4d35ed1f962e2074a1764",
+ "_spec": "bail@^1.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/unified",
+ "author": {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ },
+ "bugs": {
+ "url": "https://github.com/wooorm/bail/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ }
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Throw a given error",
+ "devDependencies": {
+ "browserify": "^14.0.0",
+ "esmangle": "^1.0.1",
+ "nyc": "^11.0.0",
+ "remark-cli": "^3.0.0",
+ "remark-preset-wooorm": "^3.0.0",
+ "tape": "^4.0.0",
+ "xo": "^0.18.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/wooorm/bail#readme",
+ "keywords": [
+ "fail",
+ "bail",
+ "throw",
+ "callback",
+ "error"
+ ],
+ "license": "MIT",
+ "name": "bail",
+ "nyc": {
+ "check-coverage": true,
+ "lines": 100,
+ "functions": 100,
+ "branches": 100
+ },
+ "remarkConfig": {
+ "plugins": [
+ "preset-wooorm"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/wooorm/bail.git"
+ },
+ "scripts": {
+ "build": "npm run build-md && npm run build-bundle && npm run build-mangle",
+ "build-bundle": "browserify index.js --bare -s bail > bail.js",
+ "build-mangle": "esmangle bail.js > bail.min.js",
+ "build-md": "remark . -qfo",
+ "lint": "xo",
+ "test": "npm run build && npm run lint && npm run test-coverage",
+ "test-api": "node test",
+ "test-coverage": "nyc --reporter lcov tape test.js"
+ },
+ "version": "1.0.2",
+ "xo": {
+ "space": true,
+ "esnext": false,
+ "ignores": [
+ "bail.js"
+ ]
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/bail/readme.md b/tools/node_modules/eslint/node_modules/bail/readme.md
new file mode 100644
index 0000000000..a5ca45d0f0
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/bail/readme.md
@@ -0,0 +1,71 @@
+# bail [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov]
+
+:warning: Throw a given error.
+
+## Installation
+
+[npm][npm-install]:
+
+```bash
+npm install bail
+```
+
+## Usage
+
+```js
+var bail = require('bail');
+
+bail();
+
+bail(new Error('failure'));
+// Error: failure
+// at repl:1:6
+// at REPLServer.defaultEval (repl.js:154:27)
+// ...
+```
+
+## API
+
+### `bail([err])`
+
+Throw a given error.
+
+###### Parameters
+
+* `err` (`Error?`) — Optional error.
+
+###### Throws
+
+* `Error` — Given error, if any.
+
+## Related
+
+* [`noop`][noop]
+* [`noop2`][noop2]
+* [`noop3`][noop3]
+
+## License
+
+[MIT][license] © [Titus Wormer][author]
+
+<!-- Definitions -->
+
+[travis-badge]: https://img.shields.io/travis/wooorm/bail.svg
+
+[travis]: https://travis-ci.org/wooorm/bail
+
+[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/bail.svg
+
+[codecov]: https://codecov.io/github/wooorm/bail
+
+[npm-install]: https://docs.npmjs.com/cli/install
+
+[license]: LICENSE
+
+[author]: http://wooorm.com
+
+[noop]: https://www.npmjs.com/package/noop
+
+[noop2]: https://www.npmjs.com/package/noop2
+
+[noop3]: https://www.npmjs.com/package/noop3
diff --git a/tools/node_modules/eslint/node_modules/balanced-match/LICENSE.md b/tools/node_modules/eslint/node_modules/balanced-match/LICENSE.md
new file mode 100644
index 0000000000..2cdc8e4148
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/balanced-match/LICENSE.md
@@ -0,0 +1,21 @@
+(MIT)
+
+Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;
+
+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/tools/node_modules/eslint/node_modules/balanced-match/README.md b/tools/node_modules/eslint/node_modules/balanced-match/README.md
new file mode 100644
index 0000000000..08e918c0db
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/balanced-match/README.md
@@ -0,0 +1,91 @@
+# balanced-match
+
+Match balanced string pairs, like `{` and `}` or `<b>` and `</b>`. Supports regular expressions as well!
+
+[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match)
+[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match)
+
+[![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match)
+
+## Example
+
+Get the first matching pair of braces:
+
+```js
+var balanced = require('balanced-match');
+
+console.log(balanced('{', '}', 'pre{in{nested}}post'));
+console.log(balanced('{', '}', 'pre{first}between{second}post'));
+console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post'));
+```
+
+The matches are:
+
+```bash
+$ node example.js
+{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' }
+{ start: 3,
+ end: 9,
+ pre: 'pre',
+ body: 'first',
+ post: 'between{second}post' }
+{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' }
+```
+
+## API
+
+### var m = balanced(a, b, str)
+
+For the first non-nested matching pair of `a` and `b` in `str`, return an
+object with those keys:
+
+* **start** the index of the first match of `a`
+* **end** the index of the matching `b`
+* **pre** the preamble, `a` and `b` not included
+* **body** the match, `a` and `b` not included
+* **post** the postscript, `a` and `b` not included
+
+If there's no match, `undefined` will be returned.
+
+If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`.
+
+### var r = balanced.range(a, b, str)
+
+For the first non-nested matching pair of `a` and `b` in `str`, return an
+array with indexes: `[ <a index>, <b index> ]`.
+
+If there's no match, `undefined` will be returned.
+
+If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`.
+
+## Installation
+
+With [npm](https://npmjs.org) do:
+
+```bash
+npm install balanced-match
+```
+
+## License
+
+(MIT)
+
+Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;
+
+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/tools/node_modules/eslint/node_modules/balanced-match/index.js b/tools/node_modules/eslint/node_modules/balanced-match/index.js
new file mode 100644
index 0000000000..1685a76293
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/balanced-match/index.js
@@ -0,0 +1,59 @@
+'use strict';
+module.exports = balanced;
+function balanced(a, b, str) {
+ if (a instanceof RegExp) a = maybeMatch(a, str);
+ if (b instanceof RegExp) b = maybeMatch(b, str);
+
+ var r = range(a, b, str);
+
+ return r && {
+ start: r[0],
+ end: r[1],
+ pre: str.slice(0, r[0]),
+ body: str.slice(r[0] + a.length, r[1]),
+ post: str.slice(r[1] + b.length)
+ };
+}
+
+function maybeMatch(reg, str) {
+ var m = str.match(reg);
+ return m ? m[0] : null;
+}
+
+balanced.range = range;
+function range(a, b, str) {
+ var begs, beg, left, right, result;
+ var ai = str.indexOf(a);
+ var bi = str.indexOf(b, ai + 1);
+ var i = ai;
+
+ if (ai >= 0 && bi > 0) {
+ begs = [];
+ left = str.length;
+
+ while (i >= 0 && !result) {
+ if (i == ai) {
+ begs.push(i);
+ ai = str.indexOf(a, i + 1);
+ } else if (begs.length == 1) {
+ result = [ begs.pop(), bi ];
+ } else {
+ beg = begs.pop();
+ if (beg < left) {
+ left = beg;
+ right = bi;
+ }
+
+ bi = str.indexOf(b, i + 1);
+ }
+
+ i = ai < bi && ai >= 0 ? ai : bi;
+ }
+
+ if (begs.length) {
+ result = [ left, right ];
+ }
+ }
+
+ return result;
+}
diff --git a/tools/node_modules/eslint/node_modules/balanced-match/package.json b/tools/node_modules/eslint/node_modules/balanced-match/package.json
new file mode 100644
index 0000000000..f2ee3d05a9
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/balanced-match/package.json
@@ -0,0 +1,77 @@
+{
+ "_from": "balanced-match@^1.0.0",
+ "_id": "balanced-match@1.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
+ "_location": "/eslint/balanced-match",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "balanced-match@^1.0.0",
+ "name": "balanced-match",
+ "escapedName": "balanced-match",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/eslint/brace-expansion"
+ ],
+ "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
+ "_shasum": "89b4d199ab2bee49de164ea02b89ce462d71b767",
+ "_spec": "balanced-match@^1.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/brace-expansion",
+ "author": {
+ "name": "Julian Gruber",
+ "email": "mail@juliangruber.com",
+ "url": "http://juliangruber.com"
+ },
+ "bugs": {
+ "url": "https://github.com/juliangruber/balanced-match/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Match balanced character pairs, like \"{\" and \"}\"",
+ "devDependencies": {
+ "matcha": "^0.7.0",
+ "tape": "^4.6.0"
+ },
+ "homepage": "https://github.com/juliangruber/balanced-match",
+ "keywords": [
+ "match",
+ "regexp",
+ "test",
+ "balanced",
+ "parse"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "balanced-match",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/juliangruber/balanced-match.git"
+ },
+ "scripts": {
+ "bench": "make bench",
+ "test": "make test"
+ },
+ "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.0.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/brace-expansion/README.md b/tools/node_modules/eslint/node_modules/brace-expansion/README.md
new file mode 100644
index 0000000000..ed2ec1fdd7
--- /dev/null
+++ b/tools/node_modules/eslint/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 &lt;julian@juliangruber.com&gt;
+
+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/tools/node_modules/eslint/node_modules/brace-expansion/index.js b/tools/node_modules/eslint/node_modules/brace-expansion/index.js
new file mode 100644
index 0000000000..0478be81ea
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/brace-expansion/package.json b/tools/node_modules/eslint/node_modules/brace-expansion/package.json
new file mode 100644
index 0000000000..405dea04b4
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/brace-expansion/package.json
@@ -0,0 +1,75 @@
+{
+ "_from": "brace-expansion@^1.1.7",
+ "_id": "brace-expansion@1.1.8",
+ "_inBundle": false,
+ "_integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=",
+ "_location": "/eslint/brace-expansion",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "brace-expansion@^1.1.7",
+ "name": "brace-expansion",
+ "escapedName": "brace-expansion",
+ "rawSpec": "^1.1.7",
+ "saveSpec": null,
+ "fetchSpec": "^1.1.7"
+ },
+ "_requiredBy": [
+ "/eslint/minimatch"
+ ],
+ "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz",
+ "_shasum": "c07b211c7c952ec1f8efd51a77ef0d1d3990a292",
+ "_spec": "brace-expansion@^1.1.7",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/minimatch",
+ "author": {
+ "name": "Julian Gruber",
+ "email": "mail@juliangruber.com",
+ "url": "http://juliangruber.com"
+ },
+ "bugs": {
+ "url": "https://github.com/juliangruber/brace-expansion/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ },
+ "deprecated": false,
+ "description": "Brace expansion as known from sh/bash",
+ "devDependencies": {
+ "matcha": "^0.7.0",
+ "tape": "^4.6.0"
+ },
+ "homepage": "https://github.com/juliangruber/brace-expansion",
+ "keywords": [],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "brace-expansion",
+ "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.8"
+}
diff --git a/tools/node_modules/eslint/node_modules/caller-path/index.js b/tools/node_modules/eslint/node_modules/caller-path/index.js
new file mode 100644
index 0000000000..b09866d479
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/caller-path/index.js
@@ -0,0 +1,6 @@
+'use strict';
+var callsites = require('callsites');
+
+module.exports = function () {
+ return callsites()[2].getFileName();
+};
diff --git a/tools/node_modules/eslint/node_modules/caller-path/package.json b/tools/node_modules/eslint/node_modules/caller-path/package.json
new file mode 100644
index 0000000000..7dd6b0ceae
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/caller-path/package.json
@@ -0,0 +1,73 @@
+{
+ "_from": "caller-path@^0.1.0",
+ "_id": "caller-path@0.1.0",
+ "_inBundle": false,
+ "_integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=",
+ "_location": "/eslint/caller-path",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "caller-path@^0.1.0",
+ "name": "caller-path",
+ "escapedName": "caller-path",
+ "rawSpec": "^0.1.0",
+ "saveSpec": null,
+ "fetchSpec": "^0.1.0"
+ },
+ "_requiredBy": [
+ "/eslint/require-uncached"
+ ],
+ "_resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz",
+ "_shasum": "94085ef63581ecd3daa92444a8fe94e82577751f",
+ "_spec": "caller-path@^0.1.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/require-uncached",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "http://sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/caller-path/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "callsites": "^0.2.0"
+ },
+ "deprecated": false,
+ "description": "Get the path of the caller module",
+ "devDependencies": {
+ "mocha": "*"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/caller-path#readme",
+ "keywords": [
+ "caller",
+ "calling",
+ "module",
+ "path",
+ "parent",
+ "callsites",
+ "callsite",
+ "stacktrace",
+ "stack",
+ "trace",
+ "function",
+ "file"
+ ],
+ "license": "MIT",
+ "name": "caller-path",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/caller-path.git"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "version": "0.1.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/caller-path/readme.md b/tools/node_modules/eslint/node_modules/caller-path/readme.md
new file mode 100644
index 0000000000..9393301c35
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/caller-path/readme.md
@@ -0,0 +1,36 @@
+# caller-path [![Build Status](https://travis-ci.org/sindresorhus/caller-path.svg?branch=master)](https://travis-ci.org/sindresorhus/caller-path)
+
+> Get the path of the caller module
+
+You can't use [`module.parent`](http://nodejs.org/api/modules.html#modules_module_parent) as modules are cached and it will return the first caller module, not necessarily the current one.
+
+
+## Install
+
+```
+$ npm install --save caller-path
+```
+
+
+## Usage
+
+```js
+// foo.js
+var callerPath = require('caller-path');
+
+module.exports = function () {
+ console.log(callerPath());
+ //=> /Users/sindresorhus/dev/unicorn/bar.js
+}
+```
+
+```js
+// bar.js
+var foo = require('./foo');
+foo();
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/tools/node_modules/eslint/node_modules/callsites/index.js b/tools/node_modules/eslint/node_modules/callsites/index.js
new file mode 100644
index 0000000000..098a2513a6
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/callsites/index.js
@@ -0,0 +1,8 @@
+'use strict';
+module.exports = function () {
+ var _ = Error.prepareStackTrace;
+ Error.prepareStackTrace = function (_, stack) { return stack };
+ var stack = new Error().stack.slice(1);
+ Error.prepareStackTrace = _;
+ return stack;
+};
diff --git a/tools/node_modules/eslint/node_modules/callsites/package.json b/tools/node_modules/eslint/node_modules/callsites/package.json
new file mode 100644
index 0000000000..6c483d8695
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/callsites/package.json
@@ -0,0 +1,68 @@
+{
+ "_from": "callsites@^0.2.0",
+ "_id": "callsites@0.2.0",
+ "_inBundle": false,
+ "_integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=",
+ "_location": "/eslint/callsites",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "callsites@^0.2.0",
+ "name": "callsites",
+ "escapedName": "callsites",
+ "rawSpec": "^0.2.0",
+ "saveSpec": null,
+ "fetchSpec": "^0.2.0"
+ },
+ "_requiredBy": [
+ "/eslint/caller-path"
+ ],
+ "_resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz",
+ "_shasum": "afab96262910a7f33c19a5775825c69f34e350ca",
+ "_spec": "callsites@^0.2.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/caller-path",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "http://sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/callsites/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Get callsites from the V8 stack trace API",
+ "devDependencies": {
+ "mocha": "*"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/callsites#readme",
+ "keywords": [
+ "callsites",
+ "callsite",
+ "v8",
+ "stacktrace",
+ "stack",
+ "trace",
+ "function",
+ "file",
+ "line",
+ "debug"
+ ],
+ "license": "MIT",
+ "name": "callsites",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/callsites.git"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "version": "0.2.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/callsites/readme.md b/tools/node_modules/eslint/node_modules/callsites/readme.md
new file mode 100644
index 0000000000..23aaca443a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/callsites/readme.md
@@ -0,0 +1,47 @@
+# callsites [![Build Status](https://travis-ci.org/sindresorhus/callsites.svg?branch=master)](https://travis-ci.org/sindresorhus/callsites)
+
+> Get callsites from the [V8 stack trace API](https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi)
+
+
+## Install
+
+```sh
+$ npm install --save callsites
+```
+
+
+## Usage
+
+```js
+var callsites = require('callsites');
+
+function unicorn() {
+ console.log(callsites()[0].getFileName());
+ //=> /Users/sindresorhus/dev/callsites/test.js
+}
+
+unicorn();
+```
+
+## API
+
+Returns an array of callsite objects with the following methods:
+
+- `getThis`: returns the value of this
+- `getTypeName`: returns the type of this as a string. This is the name of the function stored in the constructor field of this, if available, otherwise the object's [[Class]] internal property.
+- `getFunction`: returns the current function
+- `getFunctionName`: returns the name of the current function, typically its name property. If a name property is not available an attempt will be made to try to infer a name from the function's context.
+- `getMethodName`: returns the name of the property of this or one of its prototypes that holds the current function
+- `getFileName`: if this function was defined in a script returns the name of the script
+- `getLineNumber`: if this function was defined in a script returns the current line number
+- `getColumnNumber`: if this function was defined in a script returns the current column number
+- `getEvalOrigin`: if this function was created using a call to eval returns a CallSite object representing the location where eval was called
+- `isToplevel`: is this a toplevel invocation, that is, is this the global object?
+- `isEval`: does this call take place in code defined by a call to eval?
+- `isNative`: is this call in native V8 code?
+- `isConstructor`: is this a constructor call?
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/tools/node_modules/eslint/node_modules/chalk/index.js b/tools/node_modules/eslint/node_modules/chalk/index.js
new file mode 100644
index 0000000000..05e62b3466
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/chalk/index.js
@@ -0,0 +1,228 @@
+'use strict';
+const escapeStringRegexp = require('escape-string-regexp');
+const ansiStyles = require('ansi-styles');
+const supportsColor = require('supports-color');
+
+const template = require('./templates.js');
+
+const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm');
+
+// `supportsColor.level` → `ansiStyles.color[name]` mapping
+const levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m'];
+
+// `color-convert` models to exclude from the Chalk API due to conflicts and such
+const skipModels = new Set(['gray']);
+
+const styles = Object.create(null);
+
+function applyOptions(obj, options) {
+ options = options || {};
+
+ // Detect level if not set manually
+ const scLevel = supportsColor ? supportsColor.level : 0;
+ obj.level = options.level === undefined ? scLevel : options.level;
+ obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0;
+}
+
+function Chalk(options) {
+ // We check for this.template here since calling `chalk.constructor()`
+ // by itself will have a `this` of a previously constructed chalk object
+ if (!this || !(this instanceof Chalk) || this.template) {
+ const chalk = {};
+ applyOptions(chalk, options);
+
+ chalk.template = function () {
+ const args = [].slice.call(arguments);
+ return chalkTag.apply(null, [chalk.template].concat(args));
+ };
+
+ Object.setPrototypeOf(chalk, Chalk.prototype);
+ Object.setPrototypeOf(chalk.template, chalk);
+
+ chalk.template.constructor = Chalk;
+
+ return chalk.template;
+ }
+
+ applyOptions(this, options);
+}
+
+// Use bright blue on Windows as the normal blue color is illegible
+if (isSimpleWindowsTerm) {
+ ansiStyles.blue.open = '\u001B[94m';
+}
+
+for (const key of Object.keys(ansiStyles)) {
+ ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');
+
+ styles[key] = {
+ get() {
+ const codes = ansiStyles[key];
+ return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);
+ }
+ };
+}
+
+styles.visible = {
+ get() {
+ return build.call(this, this._styles || [], true, 'visible');
+ }
+};
+
+ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g');
+for (const model of Object.keys(ansiStyles.color.ansi)) {
+ if (skipModels.has(model)) {
+ continue;
+ }
+
+ styles[model] = {
+ get() {
+ const level = this.level;
+ return function () {
+ const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);
+ const codes = {
+ open,
+ close: ansiStyles.color.close,
+ closeRe: ansiStyles.color.closeRe
+ };
+ return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
+ };
+ }
+ };
+}
+
+ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g');
+for (const model of Object.keys(ansiStyles.bgColor.ansi)) {
+ if (skipModels.has(model)) {
+ continue;
+ }
+
+ const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);
+ styles[bgModel] = {
+ get() {
+ const level = this.level;
+ return function () {
+ const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);
+ const codes = {
+ open,
+ close: ansiStyles.bgColor.close,
+ closeRe: ansiStyles.bgColor.closeRe
+ };
+ return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
+ };
+ }
+ };
+}
+
+const proto = Object.defineProperties(() => {}, styles);
+
+function build(_styles, _empty, key) {
+ const builder = function () {
+ return applyStyle.apply(builder, arguments);
+ };
+
+ builder._styles = _styles;
+ builder._empty = _empty;
+
+ const self = this;
+
+ Object.defineProperty(builder, 'level', {
+ enumerable: true,
+ get() {
+ return self.level;
+ },
+ set(level) {
+ self.level = level;
+ }
+ });
+
+ Object.defineProperty(builder, 'enabled', {
+ enumerable: true,
+ get() {
+ return self.enabled;
+ },
+ set(enabled) {
+ self.enabled = enabled;
+ }
+ });
+
+ // See below for fix regarding invisible grey/dim combination on Windows
+ builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey';
+
+ // `__proto__` is used because we must return a function, but there is
+ // no way to create a function with a different prototype
+ builder.__proto__ = proto; // eslint-disable-line no-proto
+
+ return builder;
+}
+
+function applyStyle() {
+ // Support varags, but simply cast to string in case there's only one arg
+ const args = arguments;
+ const argsLen = args.length;
+ let str = String(arguments[0]);
+
+ if (argsLen === 0) {
+ return '';
+ }
+
+ if (argsLen > 1) {
+ // Don't slice `arguments`, it prevents V8 optimizations
+ for (let a = 1; a < argsLen; a++) {
+ str += ' ' + args[a];
+ }
+ }
+
+ if (!this.enabled || this.level <= 0 || !str) {
+ return this._empty ? '' : str;
+ }
+
+ // 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.
+ const originalDim = ansiStyles.dim.open;
+ if (isSimpleWindowsTerm && this.hasGrey) {
+ ansiStyles.dim.open = '';
+ }
+
+ for (const code of this._styles.slice().reverse()) {
+ // 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;
+
+ // Close the styling before a linebreak and reopen
+ // after next line to fix a bleed issue on macOS
+ // https://github.com/chalk/chalk/pull/92
+ str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`);
+ }
+
+ // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue
+ ansiStyles.dim.open = originalDim;
+
+ return str;
+}
+
+function chalkTag(chalk, strings) {
+ if (!Array.isArray(strings)) {
+ // If chalk() was called by itself or with a string,
+ // return the string itself as a string.
+ return [].slice.call(arguments, 1).join(' ');
+ }
+
+ const args = [].slice.call(arguments, 2);
+ const parts = [strings.raw[0]];
+
+ for (let i = 1; i < strings.length; i++) {
+ parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&'));
+ parts.push(String(strings.raw[i]));
+ }
+
+ return template(chalk, parts.join(''));
+}
+
+Object.defineProperties(Chalk.prototype, styles);
+
+module.exports = Chalk(); // eslint-disable-line new-cap
+module.exports.supportsColor = supportsColor;
+module.exports.default = module.exports; // For TypeScript
diff --git a/tools/node_modules/eslint/node_modules/chalk/license b/tools/node_modules/eslint/node_modules/chalk/license
new file mode 100644
index 0000000000..e7af2f7710
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/chalk/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/tools/node_modules/eslint/node_modules/chalk/node_modules/ansi-styles/index.js b/tools/node_modules/eslint/node_modules/chalk/node_modules/ansi-styles/index.js
new file mode 100644
index 0000000000..3d3baa66d7
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/chalk/node_modules/ansi-styles/index.js
@@ -0,0 +1,152 @@
+'use strict';
+const colorConvert = require('color-convert');
+
+const wrapAnsi16 = (fn, offset) => function () {
+ const code = fn.apply(colorConvert, arguments);
+ return `\u001B[${code + offset}m`;
+};
+
+const wrapAnsi256 = (fn, offset) => function () {
+ const code = fn.apply(colorConvert, arguments);
+ return `\u001B[${38 + offset};5;${code}m`;
+};
+
+const wrapAnsi16m = (fn, offset) => function () {
+ const rgb = fn.apply(colorConvert, arguments);
+ return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
+};
+
+function assembleStyles() {
+ const codes = new Map();
+ const styles = {
+ modifier: {
+ reset: [0, 0],
+ // 21 isn't widely supported and 22 does the same thing
+ bold: [1, 22],
+ dim: [2, 22],
+ italic: [3, 23],
+ underline: [4, 24],
+ inverse: [7, 27],
+ hidden: [8, 28],
+ strikethrough: [9, 29]
+ },
+ color: {
+ black: [30, 39],
+ red: [31, 39],
+ green: [32, 39],
+ yellow: [33, 39],
+ blue: [34, 39],
+ magenta: [35, 39],
+ cyan: [36, 39],
+ white: [37, 39],
+ gray: [90, 39],
+
+ // Bright color
+ redBright: [91, 39],
+ greenBright: [92, 39],
+ yellowBright: [93, 39],
+ blueBright: [94, 39],
+ magentaBright: [95, 39],
+ cyanBright: [96, 39],
+ whiteBright: [97, 39]
+ },
+ bgColor: {
+ bgBlack: [40, 49],
+ bgRed: [41, 49],
+ bgGreen: [42, 49],
+ bgYellow: [43, 49],
+ bgBlue: [44, 49],
+ bgMagenta: [45, 49],
+ bgCyan: [46, 49],
+ bgWhite: [47, 49],
+
+ // Bright color
+ bgBlackBright: [100, 49],
+ bgRedBright: [101, 49],
+ bgGreenBright: [102, 49],
+ bgYellowBright: [103, 49],
+ bgBlueBright: [104, 49],
+ bgMagentaBright: [105, 49],
+ bgCyanBright: [106, 49],
+ bgWhiteBright: [107, 49]
+ }
+ };
+
+ // Fix humans
+ styles.color.grey = styles.color.gray;
+
+ for (const groupName of Object.keys(styles)) {
+ const group = styles[groupName];
+
+ for (const styleName of Object.keys(group)) {
+ const style = group[styleName];
+
+ styles[styleName] = {
+ open: `\u001B[${style[0]}m`,
+ close: `\u001B[${style[1]}m`
+ };
+
+ group[styleName] = styles[styleName];
+
+ codes.set(style[0], style[1]);
+ }
+
+ Object.defineProperty(styles, groupName, {
+ value: group,
+ enumerable: false
+ });
+
+ Object.defineProperty(styles, 'codes', {
+ value: codes,
+ enumerable: false
+ });
+ }
+
+ const rgb2rgb = (r, g, b) => [r, g, b];
+
+ styles.color.close = '\u001B[39m';
+ styles.bgColor.close = '\u001B[49m';
+
+ styles.color.ansi = {};
+ styles.color.ansi256 = {};
+ styles.color.ansi16m = {
+ rgb: wrapAnsi16m(rgb2rgb, 0)
+ };
+
+ styles.bgColor.ansi = {};
+ styles.bgColor.ansi256 = {};
+ styles.bgColor.ansi16m = {
+ rgb: wrapAnsi16m(rgb2rgb, 10)
+ };
+
+ for (const key of Object.keys(colorConvert)) {
+ if (typeof colorConvert[key] !== 'object') {
+ continue;
+ }
+
+ const suite = colorConvert[key];
+
+ if ('ansi16' in suite) {
+ styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0);
+ styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10);
+ }
+
+ if ('ansi256' in suite) {
+ styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0);
+ styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10);
+ }
+
+ if ('rgb' in suite) {
+ styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0);
+ styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10);
+ }
+ }
+
+ return styles;
+}
+
+// Make the export immutable
+Object.defineProperty(module, 'exports', {
+ enumerable: true,
+ get: assembleStyles
+});
diff --git a/tools/node_modules/eslint/node_modules/chalk/node_modules/ansi-styles/license b/tools/node_modules/eslint/node_modules/chalk/node_modules/ansi-styles/license
new file mode 100644
index 0000000000..e7af2f7710
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/chalk/node_modules/ansi-styles/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/tools/node_modules/eslint/node_modules/chalk/node_modules/ansi-styles/package.json b/tools/node_modules/eslint/node_modules/chalk/node_modules/ansi-styles/package.json
new file mode 100644
index 0000000000..4768b9ff15
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/chalk/node_modules/ansi-styles/package.json
@@ -0,0 +1,86 @@
+{
+ "_from": "ansi-styles@^3.1.0",
+ "_id": "ansi-styles@3.2.0",
+ "_inBundle": false,
+ "_integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==",
+ "_location": "/eslint/chalk/ansi-styles",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "ansi-styles@^3.1.0",
+ "name": "ansi-styles",
+ "escapedName": "ansi-styles",
+ "rawSpec": "^3.1.0",
+ "saveSpec": null,
+ "fetchSpec": "^3.1.0"
+ },
+ "_requiredBy": [
+ "/eslint/chalk"
+ ],
+ "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz",
+ "_shasum": "c159b8d5be0f9e5a6f346dab94f16ce022161b88",
+ "_spec": "ansi-styles@^3.1.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/chalk",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "ava": {
+ "require": "babel-polyfill"
+ },
+ "bugs": {
+ "url": "https://github.com/chalk/ansi-styles/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "color-convert": "^1.9.0"
+ },
+ "deprecated": false,
+ "description": "ANSI escape codes for styling strings in the terminal",
+ "devDependencies": {
+ "ava": "*",
+ "babel-polyfill": "^6.23.0",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/chalk/ansi-styles#readme",
+ "keywords": [
+ "ansi",
+ "styles",
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "cli",
+ "string",
+ "tty",
+ "escape",
+ "formatting",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "log",
+ "logging",
+ "command-line",
+ "text"
+ ],
+ "license": "MIT",
+ "name": "ansi-styles",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/chalk/ansi-styles.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "3.2.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/chalk/node_modules/ansi-styles/readme.md b/tools/node_modules/eslint/node_modules/chalk/node_modules/ansi-styles/readme.md
new file mode 100644
index 0000000000..dce368742b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/chalk/node_modules/ansi-styles/readme.md
@@ -0,0 +1,147 @@
+# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles)
+
+> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal
+
+You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings.
+
+![](screenshot.png)
+
+
+## Install
+
+```
+$ npm install ansi-styles
+```
+
+
+## Usage
+
+```js
+const style = require('ansi-styles');
+
+console.log(`${style.green.open}Hello world!${style.green.close}`);
+
+
+// Color conversion between 16/256/truecolor
+// NOTE: If conversion goes to 16 colors or 256 colors, the original color
+// may be degraded to fit that color palette. This means terminals
+// that do not support 16 million colors will best-match the
+// original color.
+console.log(style.bgColor.ansi.hsl(120, 80, 72) + 'Hello world!' + style.bgColor.close);
+console.log(style.color.ansi256.rgb(199, 20, 250) + 'Hello world!' + style.color.close);
+console.log(style.color.ansi16m.hex('#ABCDEF') + 'Hello world!' + style.color.close);
+```
+
+## API
+
+Each style has an `open` and `close` property.
+
+
+## Styles
+
+### Modifiers
+
+- `reset`
+- `bold`
+- `dim`
+- `italic` *(Not widely supported)*
+- `underline`
+- `inverse`
+- `hidden`
+- `strikethrough` *(Not widely supported)*
+
+### Colors
+
+- `black`
+- `red`
+- `green`
+- `yellow`
+- `blue`
+- `magenta`
+- `cyan`
+- `white`
+- `gray` ("bright black")
+- `redBright`
+- `greenBright`
+- `yellowBright`
+- `blueBright`
+- `magentaBright`
+- `cyanBright`
+- `whiteBright`
+
+### Background colors
+
+- `bgBlack`
+- `bgRed`
+- `bgGreen`
+- `bgYellow`
+- `bgBlue`
+- `bgMagenta`
+- `bgCyan`
+- `bgWhite`
+- `bgBlackBright`
+- `bgRedBright`
+- `bgGreenBright`
+- `bgYellowBright`
+- `bgBlueBright`
+- `bgMagentaBright`
+- `bgCyanBright`
+- `bgWhiteBright`
+
+
+## Advanced usage
+
+By default, you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module.
+
+- `style.modifier`
+- `style.color`
+- `style.bgColor`
+
+###### Example
+
+```js
+console.log(style.color.green.open);
+```
+
+Raw escape codes (i.e. without the CSI escape prefix `\u001B[` and render mode postfix `m`) are available under `style.codes`, which returns a `Map` with the open codes as keys and close codes as values.
+
+###### Example
+
+```js
+console.log(style.codes.get(36));
+//=> 39
+```
+
+
+## [256 / 16 million (TrueColor) support](https://gist.github.com/XVilka/8346728)
+
+`ansi-styles` uses the [`color-convert`](https://github.com/Qix-/color-convert) package to allow for converting between various colors and ANSI escapes, with support for 256 and 16 million colors.
+
+To use these, call the associated conversion function with the intended output, for example:
+
+```js
+style.color.ansi.rgb(100, 200, 15); // RGB to 16 color ansi foreground code
+style.bgColor.ansi.rgb(100, 200, 15); // RGB to 16 color ansi background code
+
+style.color.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code
+style.bgColor.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code
+
+style.color.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color foreground code
+style.bgColor.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color background code
+```
+
+
+## Related
+
+- [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - ANSI escape codes for manipulating the terminal
+
+
+## Maintainers
+
+- [Sindre Sorhus](https://github.com/sindresorhus)
+- [Josh Junon](https://github.com/qix-)
+
+
+## License
+
+MIT
diff --git a/tools/node_modules/eslint/node_modules/chalk/node_modules/supports-color/browser.js b/tools/node_modules/eslint/node_modules/chalk/node_modules/supports-color/browser.js
new file mode 100644
index 0000000000..ae7c87b17c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/chalk/node_modules/supports-color/browser.js
@@ -0,0 +1,2 @@
+'use strict';
+module.exports = false;
diff --git a/tools/node_modules/eslint/node_modules/chalk/node_modules/supports-color/index.js b/tools/node_modules/eslint/node_modules/chalk/node_modules/supports-color/index.js
new file mode 100644
index 0000000000..20a29230e8
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/chalk/node_modules/supports-color/index.js
@@ -0,0 +1,115 @@
+'use strict';
+const os = require('os');
+const hasFlag = require('has-flag');
+
+const env = process.env;
+
+const support = level => {
+ if (level === 0) {
+ return false;
+ }
+
+ return {
+ level,
+ hasBasic: true,
+ has256: level >= 2,
+ has16m: level >= 3
+ };
+};
+
+let supportLevel = (() => {
+ if (hasFlag('no-color') ||
+ hasFlag('no-colors') ||
+ hasFlag('color=false')) {
+ return 0;
+ }
+
+ if (hasFlag('color=16m') ||
+ hasFlag('color=full') ||
+ hasFlag('color=truecolor')) {
+ return 3;
+ }
+
+ if (hasFlag('color=256')) {
+ return 2;
+ }
+
+ if (hasFlag('color') ||
+ hasFlag('colors') ||
+ hasFlag('color=true') ||
+ hasFlag('color=always')) {
+ return 1;
+ }
+
+ if (process.stdout && !process.stdout.isTTY) {
+ return 0;
+ }
+
+ if (process.platform === 'win32') {
+ // Node.js 7.5.0 is the first version of Node.js to include a patch to
+ // libuv that enables 256 color output on Windows. Anything earlier and it
+ // won't work. However, here we target Node.js 8 at minimum as it is an LTS
+ // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
+ // release that supports 256 colors.
+ const osRelease = os.release().split('.');
+ if (
+ Number(process.versions.node.split('.')[0]) >= 8 &&
+ Number(osRelease[0]) >= 10 &&
+ Number(osRelease[2]) >= 10586
+ ) {
+ return 2;
+ }
+
+ return 1;
+ }
+
+ if ('CI' in env) {
+ if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
+ return 1;
+ }
+
+ return 0;
+ }
+
+ if ('TEAMCITY_VERSION' in env) {
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
+ }
+
+ if ('TERM_PROGRAM' in env) {
+ const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
+
+ switch (env.TERM_PROGRAM) {
+ case 'iTerm.app':
+ return version >= 3 ? 3 : 2;
+ case 'Hyper':
+ return 3;
+ case 'Apple_Terminal':
+ return 2;
+ // No default
+ }
+ }
+
+ if (/-256(color)?$/i.test(env.TERM)) {
+ return 2;
+ }
+
+ if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
+ return 1;
+ }
+
+ if ('COLORTERM' in env) {
+ return 1;
+ }
+
+ if (env.TERM === 'dumb') {
+ return 0;
+ }
+
+ return 0;
+})();
+
+if ('FORCE_COLOR' in env) {
+ supportLevel = parseInt(env.FORCE_COLOR, 10) === 0 ? 0 : (supportLevel || 1);
+}
+
+module.exports = process && support(supportLevel);
diff --git a/tools/node_modules/eslint/node_modules/chalk/node_modules/supports-color/license b/tools/node_modules/eslint/node_modules/chalk/node_modules/supports-color/license
new file mode 100644
index 0000000000..e7af2f7710
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/chalk/node_modules/supports-color/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/tools/node_modules/eslint/node_modules/chalk/node_modules/supports-color/package.json b/tools/node_modules/eslint/node_modules/chalk/node_modules/supports-color/package.json
new file mode 100644
index 0000000000..3723bee393
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/chalk/node_modules/supports-color/package.json
@@ -0,0 +1,85 @@
+{
+ "_from": "supports-color@^4.0.0",
+ "_id": "supports-color@4.5.0",
+ "_inBundle": false,
+ "_integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=",
+ "_location": "/eslint/chalk/supports-color",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "supports-color@^4.0.0",
+ "name": "supports-color",
+ "escapedName": "supports-color",
+ "rawSpec": "^4.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^4.0.0"
+ },
+ "_requiredBy": [
+ "/eslint/chalk"
+ ],
+ "_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz",
+ "_shasum": "be7a0de484dec5c5cddf8b3d59125044912f635b",
+ "_spec": "supports-color@^4.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/chalk",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "browser": "browser.js",
+ "bugs": {
+ "url": "https://github.com/chalk/supports-color/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "has-flag": "^2.0.0"
+ },
+ "deprecated": false,
+ "description": "Detect whether a terminal supports color",
+ "devDependencies": {
+ "ava": "*",
+ "import-fresh": "^2.0.0",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "files": [
+ "index.js",
+ "browser.js"
+ ],
+ "homepage": "https://github.com/chalk/supports-color#readme",
+ "keywords": [
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "cli",
+ "ansi",
+ "styles",
+ "tty",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "command-line",
+ "support",
+ "supports",
+ "capability",
+ "detect",
+ "truecolor",
+ "16m"
+ ],
+ "license": "MIT",
+ "name": "supports-color",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/chalk/supports-color.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "4.5.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/chalk/node_modules/supports-color/readme.md b/tools/node_modules/eslint/node_modules/chalk/node_modules/supports-color/readme.md
new file mode 100644
index 0000000000..3bef57db0e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/chalk/node_modules/supports-color/readme.md
@@ -0,0 +1,66 @@
+# supports-color [![Build Status](https://travis-ci.org/chalk/supports-color.svg?branch=master)](https://travis-ci.org/chalk/supports-color)
+
+> Detect whether a terminal supports color
+
+
+## Install
+
+```
+$ npm install supports-color
+```
+
+
+## Usage
+
+```js
+const supportsColor = require('supports-color');
+
+if (supportsColor) {
+ console.log('Terminal supports color');
+}
+
+if (supportsColor.has256) {
+ console.log('Terminal supports 256 colors');
+}
+
+if (supportsColor.has16m) {
+ console.log('Terminal supports 16 million colors (truecolor)');
+}
+```
+
+
+## API
+
+Returns an `Object`, or `false` if color is not supported.
+
+The returned object specifies a level of support for color through a `.level` property and a corresponding flag:
+
+- `.level = 1` and `.hasBasic = true`: Basic color support (16 colors)
+- `.level = 2` and `.has256 = true`: 256 color support
+- `.level = 3` and `.has16m = true`: Truecolor support (16 million colors)
+
+
+## Info
+
+It obeys the `--color` and `--no-color` CLI flags.
+
+Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, add the environment variable `FORCE_COLOR=1` to forcefully enable color or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks.
+
+Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively.
+
+
+## Related
+
+- [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module
+- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
+
+
+## Maintainers
+
+- [Sindre Sorhus](https://github.com/sindresorhus)
+- [Josh Junon](https://github.com/qix-)
+
+
+## License
+
+MIT
diff --git a/tools/node_modules/eslint/node_modules/chalk/package.json b/tools/node_modules/eslint/node_modules/chalk/package.json
new file mode 100644
index 0000000000..e1a40d082c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/chalk/package.json
@@ -0,0 +1,103 @@
+{
+ "_from": "chalk@^2.1.0",
+ "_id": "chalk@2.3.0",
+ "_inBundle": false,
+ "_integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==",
+ "_location": "/eslint/chalk",
+ "_phantomChildren": {
+ "color-convert": "1.9.1",
+ "has-flag": "2.0.0"
+ },
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "chalk@^2.1.0",
+ "name": "chalk",
+ "escapedName": "chalk",
+ "rawSpec": "^2.1.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.1.0"
+ },
+ "_requiredBy": [
+ "/eslint",
+ "/eslint/inquirer",
+ "/eslint/table"
+ ],
+ "_resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz",
+ "_shasum": "b5ea48efc9c1793dccc9b4767c93914d3f2d52ba",
+ "_spec": "chalk@^2.1.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint",
+ "bugs": {
+ "url": "https://github.com/chalk/chalk/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "ansi-styles": "^3.1.0",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^4.0.0"
+ },
+ "deprecated": false,
+ "description": "Terminal string styling done right",
+ "devDependencies": {
+ "ava": "*",
+ "coveralls": "^3.0.0",
+ "execa": "^0.8.0",
+ "import-fresh": "^2.0.0",
+ "matcha": "^0.7.0",
+ "nyc": "^11.0.2",
+ "resolve-from": "^4.0.0",
+ "typescript": "^2.5.3",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "files": [
+ "index.js",
+ "templates.js",
+ "types/index.d.ts"
+ ],
+ "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",
+ "name": "chalk",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/chalk/chalk.git"
+ },
+ "scripts": {
+ "bench": "matcha benchmark.js",
+ "coveralls": "nyc report --reporter=text-lcov | coveralls",
+ "test": "xo && tsc --project types && nyc ava"
+ },
+ "types": "types/index.d.ts",
+ "version": "2.3.0",
+ "xo": {
+ "envs": [
+ "node",
+ "mocha"
+ ]
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/chalk/readme.md b/tools/node_modules/eslint/node_modules/chalk/readme.md
new file mode 100644
index 0000000000..9bb2e65e85
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/chalk/readme.md
@@ -0,0 +1,309 @@
+<h1 align="center">
+ <br>
+ <br>
+ <img width="320" src="https://cdn.rawgit.com/chalk/chalk/19935d6484811c5e468817f846b7b3d417d7bf4a/logo.svg" alt="chalk">
+ <br>
+ <br>
+ <br>
+</h1>
+
+> 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/github/chalk/chalk/badge.svg?branch=master)](https://coveralls.io/github/chalk/chalk?branch=master) [![](https://img.shields.io/badge/unicorn-approved-ff69b4.svg)](https://www.youtube.com/watch?v=9auOCbH5Ns4) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo) [![Mentioned in Awesome Node.js](https://awesome.re/mentioned-badge.svg)](https://github.com/sindresorhus/awesome-nodejs)
+
+### [See what's new in Chalk 2](https://github.com/chalk/chalk/releases/tag/v2.0.0)
+
+![](https://github.com/chalk/ansi-styles/raw/master/screenshot.png)
+
+
+## Highlights
+
+- Expressive API
+- Highly performant
+- Ability to nest styles
+- [256/Truecolor color support](#256-and-truecolor-color-support)
+- Auto-detects color support
+- Doesn't extend `String.prototype`
+- Clean and focused
+- Actively maintained
+- [Used by ~17,000 packages](https://www.npmjs.com/browse/depended/chalk) as of June 20th, 2017
+
+
+## Install
+
+```console
+$ npm install chalk
+```
+
+
+## Usage
+
+```js
+const chalk = require('chalk');
+
+console.log(chalk.blue('Hello world!'));
+```
+
+Chalk comes with an easy to use composable API where you just chain and nest the styles you want.
+
+```js
+const chalk = require('chalk');
+const log = console.log;
+
+// Combine styled and normal strings
+log(chalk.blue('Hello') + 'World' + chalk.red('!'));
+
+// Compose multiple styles using the chainable API
+log(chalk.blue.bgRed.bold('Hello world!'));
+
+// Pass in multiple arguments
+log(chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz'));
+
+// Nest styles
+log(chalk.red('Hello', chalk.underline.bgBlue('world') + '!'));
+
+// Nest styles of the same type even (color, underline, background)
+log(chalk.green(
+ 'I am a green line ' +
+ chalk.blue.underline.bold('with a blue substring') +
+ ' that becomes green again!'
+));
+
+// ES2015 template literal
+log(`
+CPU: ${chalk.red('90%')}
+RAM: ${chalk.green('40%')}
+DISK: ${chalk.yellow('70%')}
+`);
+
+// ES2015 tagged template literal
+log(chalk`
+CPU: {red ${cpu.totalPercent}%}
+RAM: {green ${ram.used / ram.total * 100}%}
+DISK: {rgb(255,131,0) ${disk.used / disk.total * 100}%}
+`);
+
+// Use RGB colors in terminal emulators that support it.
+log(chalk.keyword('orange')('Yay for orange colored text!'));
+log(chalk.rgb(123, 45, 67).underline('Underlined reddish color'));
+log(chalk.hex('#DEADED').bold('Bold gray!'));
+```
+
+Easily define your own themes:
+
+```js
+const chalk = require('chalk');
+
+const error = chalk.bold.red;
+const warning = chalk.keyword('orange');
+
+console.log(error('Error!'));
+console.log(warning('Warning!'));
+```
+
+Take advantage of console.log [string substitution](https://nodejs.org/docs/latest/api/console.html#console_console_log_data_args):
+
+```js
+const name = 'Sindre';
+console.log(chalk.green('Hello %s'), name);
+//=> 'Hello Sindre'
+```
+
+
+## API
+
+### chalk.`<style>[.<style>...](string, [string...])`
+
+Example: `chalk.red.bold.underline('Hello', 'world');`
+
+Chain [styles](#styles) and call the last one as a method with a string argument. Order doesn't matter, and later styles take precedent in case of a conflict. This simply means that `chalk.red.yellow.green` is equivalent to `chalk.green`.
+
+Multiple arguments will be separated by space.
+
+### chalk.enabled
+
+Color support is automatically detected, as is the level (see `chalk.level`). However, if you'd like to simply enable/disable Chalk, you can do so via the `.enabled` property.
+
+Chalk is enabled by default unless expicitly disabled via the constructor or `chalk.level` is `0`.
+
+If you need to change this in a reusable module, create a new instance:
+
+```js
+const ctx = new chalk.constructor({enabled: false});
+```
+
+### chalk.level
+
+Color support is automatically detected, but you can override it by setting the `level` property. You should however only do this in your own code as it applies globally to all Chalk consumers.
+
+If you need to change this in a reusable module, create a new instance:
+
+```js
+const ctx = new chalk.constructor({level: 0});
+```
+
+Levels are as follows:
+
+0. All colors disabled
+1. Basic color support (16 colors)
+2. 256 color support
+3. Truecolor support (16 million colors)
+
+### chalk.supportsColor
+
+Detect whether the terminal [supports color](https://github.com/chalk/supports-color). Used internally and handled for you, but exposed for convenience.
+
+Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, add the environment variable `FORCE_COLOR=1` to forcefully enable color or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks.
+
+Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively.
+
+
+## Styles
+
+### Modifiers
+
+- `reset`
+- `bold`
+- `dim`
+- `italic` *(Not widely supported)*
+- `underline`
+- `inverse`
+- `hidden`
+- `strikethrough` *(Not widely supported)*
+- `visible` (Text is emitted only if enabled)
+
+### Colors
+
+- `black`
+- `red`
+- `green`
+- `yellow`
+- `blue` *(On Windows the bright version is used since normal blue is illegible)*
+- `magenta`
+- `cyan`
+- `white`
+- `gray` ("bright black")
+- `redBright`
+- `greenBright`
+- `yellowBright`
+- `blueBright`
+- `magentaBright`
+- `cyanBright`
+- `whiteBright`
+
+### Background colors
+
+- `bgBlack`
+- `bgRed`
+- `bgGreen`
+- `bgYellow`
+- `bgBlue`
+- `bgMagenta`
+- `bgCyan`
+- `bgWhite`
+- `bgBlackBright`
+- `bgRedBright`
+- `bgGreenBright`
+- `bgYellowBright`
+- `bgBlueBright`
+- `bgMagentaBright`
+- `bgCyanBright`
+- `bgWhiteBright`
+
+
+## Tagged template literal
+
+Chalk can be used as a [tagged template literal](http://exploringjs.com/es6/ch_template-literals.html#_tagged-template-literals).
+
+```js
+const chalk = require('chalk');
+
+const miles = 18;
+const calculateFeet = miles => miles * 5280;
+
+console.log(chalk`
+ There are {bold 5280 feet} in a mile.
+ In {bold ${miles} miles}, there are {green.bold ${calculateFeet(miles)} feet}.
+`);
+```
+
+Blocks are delimited by an opening curly brace (`{`), a style, some content, and a closing curly brace (`}`).
+
+Template styles are chained exactly like normal Chalk styles. The following two statements are equivalent:
+
+```js
+console.log(chalk.bold.rgb(10, 100, 200)('Hello!'));
+console.log(chalk`{bold.rgb(10,100,200) Hello!}`);
+```
+
+Note that function styles (`rgb()`, `hsl()`, `keyword()`, etc.) may not contain spaces between parameters.
+
+All interpolated values (`` chalk`${foo}` ``) are converted to strings via the `.toString()` method. All curly braces (`{` and `}`) in interpolated value strings are escaped.
+
+
+## 256 and Truecolor color support
+
+Chalk supports 256 colors and [Truecolor](https://gist.github.com/XVilka/8346728) (16 million colors) on supported terminal apps.
+
+Colors are downsampled from 16 million RGB values to an ANSI color format that is supported by the terminal emulator (or by specifying `{level: n}` as a Chalk option). For example, Chalk configured to run at level 1 (basic color support) will downsample an RGB value of #FF0000 (red) to 31 (ANSI escape for red).
+
+Examples:
+
+- `chalk.hex('#DEADED').underline('Hello, world!')`
+- `chalk.keyword('orange')('Some orange text')`
+- `chalk.rgb(15, 100, 204).inverse('Hello!')`
+
+Background versions of these models are prefixed with `bg` and the first level of the module capitalized (e.g. `keyword` for foreground colors and `bgKeyword` for background colors).
+
+- `chalk.bgHex('#DEADED').underline('Hello, world!')`
+- `chalk.bgKeyword('orange')('Some orange text')`
+- `chalk.bgRgb(15, 100, 204).inverse('Hello!')`
+
+The following color models can be used:
+
+- [`rgb`](https://en.wikipedia.org/wiki/RGB_color_model) - Example: `chalk.rgb(255, 136, 0).bold('Orange!')`
+- [`hex`](https://en.wikipedia.org/wiki/Web_colors#Hex_triplet) - Example: `chalk.hex('#FF8800').bold('Orange!')`
+- [`keyword`](https://www.w3.org/wiki/CSS/Properties/color/keywords) (CSS keywords) - Example: `chalk.keyword('orange').bold('Orange!')`
+- [`hsl`](https://en.wikipedia.org/wiki/HSL_and_HSV) - Example: `chalk.hsl(32, 100, 50).bold('Orange!')`
+- [`hsv`](https://en.wikipedia.org/wiki/HSL_and_HSV) - Example: `chalk.hsl(32, 1, 1).bold('Orange!')`
+- [`hwb`](https://en.wikipedia.org/wiki/HWB_color_model) - Example: `chalk.hsl(32, 0, 50).bold('Orange!')`
+- `ansi16`
+- `ansi256`
+
+
+## Windows
+
+If you're on Windows, do yourself a favor and use [`cmder`](http://cmder.net/) instead of `cmd.exe`.
+
+
+## Origin story
+
+[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) and the package is unmaintained. Although there are other packages, they either do too much or not enough. Chalk is a clean and focused alternative.
+
+
+## Related
+
+- [chalk-cli](https://github.com/chalk/chalk-cli) - CLI for this module
+- [ansi-styles](https://github.com/chalk/ansi-styles) - ANSI escape codes for styling strings in the terminal
+- [supports-color](https://github.com/chalk/supports-color) - Detect whether a terminal supports color
+- [strip-ansi](https://github.com/chalk/strip-ansi) - Strip ANSI escape codes
+- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Strip ANSI escape codes from a stream
+- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes
+- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes
+- [wrap-ansi](https://github.com/chalk/wrap-ansi) - Wordwrap a string with ANSI escape codes
+- [slice-ansi](https://github.com/chalk/slice-ansi) - Slice a string with ANSI escape codes
+- [color-convert](https://github.com/qix-/color-convert) - Converts colors between different models
+- [chalk-animation](https://github.com/bokub/chalk-animation) - Animate strings in the terminal
+- [gradient-string](https://github.com/bokub/gradient-string) - Apply color gradients to strings
+- [chalk-pipe](https://github.com/LitoMore/chalk-pipe) - Create chalk style schemes with simpler style strings
+
+
+## Maintainers
+
+- [Sindre Sorhus](https://github.com/sindresorhus)
+- [Josh Junon](https://github.com/qix-)
+
+
+## License
+
+MIT
diff --git a/tools/node_modules/eslint/node_modules/chalk/templates.js b/tools/node_modules/eslint/node_modules/chalk/templates.js
new file mode 100644
index 0000000000..dbdf9b2211
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/chalk/templates.js
@@ -0,0 +1,128 @@
+'use strict';
+const TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
+const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
+const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
+const ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi;
+
+const ESCAPES = new Map([
+ ['n', '\n'],
+ ['r', '\r'],
+ ['t', '\t'],
+ ['b', '\b'],
+ ['f', '\f'],
+ ['v', '\v'],
+ ['0', '\0'],
+ ['\\', '\\'],
+ ['e', '\u001B'],
+ ['a', '\u0007']
+]);
+
+function unescape(c) {
+ if ((c[0] === 'u' && c.length === 5) || (c[0] === 'x' && c.length === 3)) {
+ return String.fromCharCode(parseInt(c.slice(1), 16));
+ }
+
+ return ESCAPES.get(c) || c;
+}
+
+function parseArguments(name, args) {
+ const results = [];
+ const chunks = args.trim().split(/\s*,\s*/g);
+ let matches;
+
+ for (const chunk of chunks) {
+ if (!isNaN(chunk)) {
+ results.push(Number(chunk));
+ } else if ((matches = chunk.match(STRING_REGEX))) {
+ results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape(escape) : chr));
+ } else {
+ throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
+ }
+ }
+
+ return results;
+}
+
+function parseStyle(style) {
+ STYLE_REGEX.lastIndex = 0;
+
+ const results = [];
+ let matches;
+
+ while ((matches = STYLE_REGEX.exec(style)) !== null) {
+ const name = matches[1];
+
+ if (matches[2]) {
+ const args = parseArguments(name, matches[2]);
+ results.push([name].concat(args));
+ } else {
+ results.push([name]);
+ }
+ }
+
+ return results;
+}
+
+function buildStyle(chalk, styles) {
+ const enabled = {};
+
+ for (const layer of styles) {
+ for (const style of layer.styles) {
+ enabled[style[0]] = layer.inverse ? null : style.slice(1);
+ }
+ }
+
+ let current = chalk;
+ for (const styleName of Object.keys(enabled)) {
+ if (Array.isArray(enabled[styleName])) {
+ if (!(styleName in current)) {
+ throw new Error(`Unknown Chalk style: ${styleName}`);
+ }
+
+ if (enabled[styleName].length > 0) {
+ current = current[styleName].apply(current, enabled[styleName]);
+ } else {
+ current = current[styleName];
+ }
+ }
+ }
+
+ return current;
+}
+
+module.exports = (chalk, tmp) => {
+ const styles = [];
+ const chunks = [];
+ let chunk = [];
+
+ // eslint-disable-next-line max-params
+ tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => {
+ if (escapeChar) {
+ chunk.push(unescape(escapeChar));
+ } else if (style) {
+ const str = chunk.join('');
+ chunk = [];
+ chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str));
+ styles.push({inverse, styles: parseStyle(style)});
+ } else if (close) {
+ if (styles.length === 0) {
+ throw new Error('Found extraneous } in Chalk template literal');
+ }
+
+ chunks.push(buildStyle(chalk, styles)(chunk.join('')));
+ chunk = [];
+ styles.pop();
+ } else {
+ chunk.push(chr);
+ }
+ });
+
+ chunks.push(chunk.join(''));
+
+ if (styles.length > 0) {
+ const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`;
+ throw new Error(errMsg);
+ }
+
+ return chunks.join('');
+};
diff --git a/tools/node_modules/eslint/node_modules/chalk/types/index.d.ts b/tools/node_modules/eslint/node_modules/chalk/types/index.d.ts
new file mode 100644
index 0000000000..b4e4dc57ed
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/chalk/types/index.d.ts
@@ -0,0 +1,97 @@
+// Type definitions for Chalk
+// Definitions by: Thomas Sauer <https://github.com/t-sauer>
+
+export const enum Level {
+ None = 0,
+ Basic = 1,
+ Ansi256 = 2,
+ TrueColor = 3
+}
+
+export interface ChalkOptions {
+ enabled?: boolean;
+ level?: Level;
+}
+
+export interface ChalkConstructor {
+ new (options?: ChalkOptions): Chalk;
+ (options?: ChalkOptions): Chalk;
+}
+
+export interface ColorSupport {
+ level: Level;
+ hasBasic: boolean;
+ has256: boolean;
+ has16m: boolean;
+}
+
+export interface Chalk {
+ (...text: string[]): string;
+ (text: TemplateStringsArray, ...placeholders: string[]): string;
+ constructor: ChalkConstructor;
+ enabled: boolean;
+ level: Level;
+ rgb(r: number, g: number, b: number): this;
+ hsl(h: number, s: number, l: number): this;
+ hsv(h: number, s: number, v: number): this;
+ hwb(h: number, w: number, b: number): this;
+ bgHex(color: string): this;
+ bgKeyword(color: string): this;
+ bgRgb(r: number, g: number, b: number): this;
+ bgHsl(h: number, s: number, l: number): this;
+ bgHsv(h: number, s: number, v: number): this;
+ bgHwb(h: number, w: number, b: number): this;
+ hex(color: string): this;
+ keyword(color: string): this;
+
+ readonly reset: this;
+ readonly bold: this;
+ readonly dim: this;
+ readonly italic: this;
+ readonly underline: this;
+ readonly inverse: this;
+ readonly hidden: this;
+ readonly strikethrough: this;
+
+ readonly visible: this;
+
+ readonly black: this;
+ readonly red: this;
+ readonly green: this;
+ readonly yellow: this;
+ readonly blue: this;
+ readonly magenta: this;
+ readonly cyan: this;
+ readonly white: this;
+ readonly gray: this;
+ readonly grey: this;
+ readonly blackBright: this;
+ readonly redBright: this;
+ readonly greenBright: this;
+ readonly yellowBright: this;
+ readonly blueBright: this;
+ readonly magentaBright: this;
+ readonly cyanBright: this;
+ readonly whiteBright: this;
+
+ readonly bgBlack: this;
+ readonly bgRed: this;
+ readonly bgGreen: this;
+ readonly bgYellow: this;
+ readonly bgBlue: this;
+ readonly bgMagenta: this;
+ readonly bgCyan: this;
+ readonly bgWhite: this;
+ readonly bgBlackBright: this;
+ readonly bgRedBright: this;
+ readonly bgGreenBright: this;
+ readonly bgYellowBright: this;
+ readonly bgBlueBright: this;
+ readonly bgMagentaBright: this;
+ readonly bgCyanBright: this;
+ readonly bgWhiteBright: this;
+}
+
+declare const chalk: Chalk & { supportsColor: ColorSupport };
+
+export default chalk
diff --git a/tools/node_modules/eslint/node_modules/character-entities-legacy/LICENSE b/tools/node_modules/eslint/node_modules/character-entities-legacy/LICENSE
new file mode 100644
index 0000000000..32e7a3d93c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/character-entities-legacy/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2015 Titus Wormer <tituswormer@gmail.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/tools/node_modules/eslint/node_modules/character-entities-legacy/index.json b/tools/node_modules/eslint/node_modules/character-entities-legacy/index.json
new file mode 100644
index 0000000000..d83b75251b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/character-entities-legacy/index.json
@@ -0,0 +1,108 @@
+{
+ "AElig": "Æ",
+ "AMP": "&",
+ "Aacute": "Á",
+ "Acirc": "Â",
+ "Agrave": "À",
+ "Aring": "Å",
+ "Atilde": "Ã",
+ "Auml": "Ä",
+ "COPY": "©",
+ "Ccedil": "Ç",
+ "ETH": "Ð",
+ "Eacute": "É",
+ "Ecirc": "Ê",
+ "Egrave": "È",
+ "Euml": "Ë",
+ "GT": ">",
+ "Iacute": "Í",
+ "Icirc": "Î",
+ "Igrave": "Ì",
+ "Iuml": "Ï",
+ "LT": "<",
+ "Ntilde": "Ñ",
+ "Oacute": "Ó",
+ "Ocirc": "Ô",
+ "Ograve": "Ò",
+ "Oslash": "Ø",
+ "Otilde": "Õ",
+ "Ouml": "Ö",
+ "QUOT": "\"",
+ "REG": "®",
+ "THORN": "Þ",
+ "Uacute": "Ú",
+ "Ucirc": "Û",
+ "Ugrave": "Ù",
+ "Uuml": "Ü",
+ "Yacute": "Ý",
+ "aacute": "á",
+ "acirc": "â",
+ "acute": "´",
+ "aelig": "æ",
+ "agrave": "à",
+ "amp": "&",
+ "aring": "å",
+ "atilde": "ã",
+ "auml": "ä",
+ "brvbar": "¦",
+ "ccedil": "ç",
+ "cedil": "¸",
+ "cent": "¢",
+ "copy": "©",
+ "curren": "¤",
+ "deg": "°",
+ "divide": "÷",
+ "eacute": "é",
+ "ecirc": "ê",
+ "egrave": "è",
+ "eth": "ð",
+ "euml": "ë",
+ "frac12": "½",
+ "frac14": "¼",
+ "frac34": "¾",
+ "gt": ">",
+ "iacute": "í",
+ "icirc": "î",
+ "iexcl": "¡",
+ "igrave": "ì",
+ "iquest": "¿",
+ "iuml": "ï",
+ "laquo": "«",
+ "lt": "<",
+ "macr": "¯",
+ "micro": "µ",
+ "middot": "·",
+ "nbsp": " ",
+ "not": "¬",
+ "ntilde": "ñ",
+ "oacute": "ó",
+ "ocirc": "ô",
+ "ograve": "ò",
+ "ordf": "ª",
+ "ordm": "º",
+ "oslash": "ø",
+ "otilde": "õ",
+ "ouml": "ö",
+ "para": "¶",
+ "plusmn": "±",
+ "pound": "£",
+ "quot": "\"",
+ "raquo": "»",
+ "reg": "®",
+ "sect": "§",
+ "shy": "­",
+ "sup1": "¹",
+ "sup2": "²",
+ "sup3": "³",
+ "szlig": "ß",
+ "thorn": "þ",
+ "times": "×",
+ "uacute": "ú",
+ "ucirc": "û",
+ "ugrave": "ù",
+ "uml": "¨",
+ "uuml": "ü",
+ "yacute": "ý",
+ "yen": "¥",
+ "yuml": "ÿ"
+}
diff --git a/tools/node_modules/eslint/node_modules/character-entities-legacy/package.json b/tools/node_modules/eslint/node_modules/character-entities-legacy/package.json
new file mode 100644
index 0000000000..e94a8177d2
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/character-entities-legacy/package.json
@@ -0,0 +1,97 @@
+{
+ "_from": "character-entities-legacy@^1.0.0",
+ "_id": "character-entities-legacy@1.1.1",
+ "_inBundle": false,
+ "_integrity": "sha1-9Ad53xoQGHK7UQo9KV4fzPFHIC8=",
+ "_location": "/character-entities-legacy",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "character-entities-legacy@^1.0.0",
+ "name": "character-entities-legacy",
+ "escapedName": "character-entities-legacy",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/parse-entities"
+ ],
+ "_resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.1.tgz",
+ "_shasum": "f40779df1a101872bb510a3d295e1fccf147202f",
+ "_spec": "character-entities-legacy@^1.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/parse-entities",
+ "author": {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ },
+ "bugs": {
+ "url": "https://github.com/wooorm/character-entities-legacy/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ }
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "HTML legacy character entity information",
+ "devDependencies": {
+ "bail": "^1.0.1",
+ "browserify": "^14.0.0",
+ "concat-stream": "^1.5.2",
+ "esmangle": "^1.0.1",
+ "remark-cli": "^3.0.0",
+ "remark-preset-wooorm": "^3.0.0",
+ "tape": "^4.0.0",
+ "xo": "^0.18.0"
+ },
+ "files": [
+ "index.json"
+ ],
+ "homepage": "https://github.com/wooorm/character-entities-legacy#readme",
+ "keywords": [
+ "html",
+ "entity",
+ "entities",
+ "character",
+ "reference",
+ "name",
+ "replacement"
+ ],
+ "license": "MIT",
+ "main": "index.json",
+ "name": "character-entities-legacy",
+ "remarkConfig": {
+ "plugins": [
+ "preset-wooorm"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/wooorm/character-entities-legacy.git"
+ },
+ "scripts": {
+ "build": "npm run build-md && npm run build-generate && npm run build-bundle && npm run build-mangle",
+ "build-bundle": "browserify index.json --bare -s characterEntitiesLegacy > character-entities-legacy.js",
+ "build-generate": "node build",
+ "build-mangle": "esmangle character-entities-legacy.js > character-entities-legacy.min.js",
+ "build-md": "remark . -qfo",
+ "lint": "xo",
+ "test": "npm run build && npm run lint && npm run test-api",
+ "test-api": "node test"
+ },
+ "version": "1.1.1",
+ "xo": {
+ "space": true,
+ "esnext": false,
+ "ignores": [
+ "character-entities-legacy.js"
+ ]
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/character-entities-legacy/readme.md b/tools/node_modules/eslint/node_modules/character-entities-legacy/readme.md
new file mode 100644
index 0000000000..e3e8662462
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/character-entities-legacy/readme.md
@@ -0,0 +1,61 @@
+# character-entities-legacy [![Build Status][travis-badge]][travis]
+
+HTML legacy character entity information: for legacy reasons some
+character entities are not required to have a trailing semicolon:
+`&copy` is perfectly okay for `©`.
+
+## Installation
+
+[npm][]:
+
+```bash
+npm install character-entities-legacy
+```
+
+## Usage
+
+```js
+console.log(characterEntitiesLegacy.copy); //=> '©'
+console.log(characterEntitiesLegacy.frac34); //=> '¾'
+console.log(characterEntitiesLegacy.sup1); //=> '¹'
+```
+
+## API
+
+### `characterEntitiesLegacy`
+
+Mapping between (case-sensitive) legacy character entity names to
+replacements.
+
+## Support
+
+See [whatwg/html][html].
+
+## Related
+
+* [`character-entities`](https://github.com/wooorm/character-entities)
+ — HTML character entity info
+* [`character-entities-html4`](https://github.com/wooorm/character-entities-html4)
+ — HTML 4 character entity info
+* [`parse-entities`](https://github.com/wooorm/parse-entities)
+ — Parse HTML character references
+* [`stringify-entities`](https://github.com/wooorm/stringify-entities)
+ — Stringify HTML character references
+
+## License
+
+[MIT][license] © [Titus Wormer][author]
+
+<!-- Definitions -->
+
+[travis-badge]: https://img.shields.io/travis/wooorm/character-entities-legacy.svg
+
+[travis]: https://travis-ci.org/wooorm/character-entities-legacy
+
+[npm]: https://docs.npmjs.com/cli/install
+
+[license]: LICENSE
+
+[author]: http://wooorm.com
+
+[html]: https://raw.githubusercontent.com/whatwg/html/master/json-entities-legacy.inc
diff --git a/tools/node_modules/eslint/node_modules/character-entities/LICENSE b/tools/node_modules/eslint/node_modules/character-entities/LICENSE
new file mode 100644
index 0000000000..32e7a3d93c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/character-entities/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2015 Titus Wormer <tituswormer@gmail.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/tools/node_modules/eslint/node_modules/character-entities/index.json b/tools/node_modules/eslint/node_modules/character-entities/index.json
new file mode 100644
index 0000000000..a63babe093
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/character-entities/index.json
@@ -0,0 +1,2224 @@
+{
+ "AEli": "Æ",
+ "AElig": "Æ",
+ "AM": "&",
+ "AMP": "&",
+ "Aacut": "Á",
+ "Aacute": "Á",
+ "Abreve": "Ă",
+ "Acir": "Â",
+ "Acirc": "Â",
+ "Acy": "А",
+ "Afr": "𝔄",
+ "Agrav": "À",
+ "Agrave": "À",
+ "Alpha": "Α",
+ "Amacr": "Ā",
+ "And": "⩓",
+ "Aogon": "Ą",
+ "Aopf": "𝔸",
+ "ApplyFunction": "⁡",
+ "Arin": "Å",
+ "Aring": "Å",
+ "Ascr": "𝒜",
+ "Assign": "≔",
+ "Atild": "Ã",
+ "Atilde": "Ã",
+ "Aum": "Ä",
+ "Auml": "Ä",
+ "Backslash": "∖",
+ "Barv": "⫧",
+ "Barwed": "⌆",
+ "Bcy": "Б",
+ "Because": "∵",
+ "Bernoullis": "ℬ",
+ "Beta": "Β",
+ "Bfr": "𝔅",
+ "Bopf": "𝔹",
+ "Breve": "˘",
+ "Bscr": "ℬ",
+ "Bumpeq": "≎",
+ "CHcy": "Ч",
+ "COP": "©",
+ "COPY": "©",
+ "Cacute": "Ć",
+ "Cap": "⋒",
+ "CapitalDifferentialD": "ⅅ",
+ "Cayleys": "ℭ",
+ "Ccaron": "Č",
+ "Ccedi": "Ç",
+ "Ccedil": "Ç",
+ "Ccirc": "Ĉ",
+ "Cconint": "∰",
+ "Cdot": "Ċ",
+ "Cedilla": "¸",
+ "CenterDot": "·",
+ "Cfr": "ℭ",
+ "Chi": "Χ",
+ "CircleDot": "⊙",
+ "CircleMinus": "⊖",
+ "CirclePlus": "⊕",
+ "CircleTimes": "⊗",
+ "ClockwiseContourIntegral": "∲",
+ "CloseCurlyDoubleQuote": "”",
+ "CloseCurlyQuote": "’",
+ "Colon": "∷",
+ "Colone": "⩴",
+ "Congruent": "≡",
+ "Conint": "∯",
+ "ContourIntegral": "∮",
+ "Copf": "ℂ",
+ "Coproduct": "∐",
+ "CounterClockwiseContourIntegral": "∳",
+ "Cross": "⨯",
+ "Cscr": "𝒞",
+ "Cup": "⋓",
+ "CupCap": "≍",
+ "DD": "ⅅ",
+ "DDotrahd": "⤑",
+ "DJcy": "Ђ",
+ "DScy": "Ѕ",
+ "DZcy": "Џ",
+ "Dagger": "‡",
+ "Darr": "↡",
+ "Dashv": "⫤",
+ "Dcaron": "Ď",
+ "Dcy": "Д",
+ "Del": "∇",
+ "Delta": "Δ",
+ "Dfr": "𝔇",
+ "DiacriticalAcute": "´",
+ "DiacriticalDot": "˙",
+ "DiacriticalDoubleAcute": "˝",
+ "DiacriticalGrave": "`",
+ "DiacriticalTilde": "˜",
+ "Diamond": "⋄",
+ "DifferentialD": "ⅆ",
+ "Dopf": "𝔻",
+ "Dot": "¨",
+ "DotDot": "⃜",
+ "DotEqual": "≐",
+ "DoubleContourIntegral": "∯",
+ "DoubleDot": "¨",
+ "DoubleDownArrow": "⇓",
+ "DoubleLeftArrow": "⇐",
+ "DoubleLeftRightArrow": "⇔",
+ "DoubleLeftTee": "⫤",
+ "DoubleLongLeftArrow": "⟸",
+ "DoubleLongLeftRightArrow": "⟺",
+ "DoubleLongRightArrow": "⟹",
+ "DoubleRightArrow": "⇒",
+ "DoubleRightTee": "⊨",
+ "DoubleUpArrow": "⇑",
+ "DoubleUpDownArrow": "⇕",
+ "DoubleVerticalBar": "∥",
+ "DownArrow": "↓",
+ "DownArrowBar": "⤓",
+ "DownArrowUpArrow": "⇵",
+ "DownBreve": "̑",
+ "DownLeftRightVector": "⥐",
+ "DownLeftTeeVector": "⥞",
+ "DownLeftVector": "↽",
+ "DownLeftVectorBar": "⥖",
+ "DownRightTeeVector": "⥟",
+ "DownRightVector": "⇁",
+ "DownRightVectorBar": "⥗",
+ "DownTee": "⊤",
+ "DownTeeArrow": "↧",
+ "Downarrow": "⇓",
+ "Dscr": "𝒟",
+ "Dstrok": "Đ",
+ "ENG": "Ŋ",
+ "ET": "Ð",
+ "ETH": "Ð",
+ "Eacut": "É",
+ "Eacute": "É",
+ "Ecaron": "Ě",
+ "Ecir": "Ê",
+ "Ecirc": "Ê",
+ "Ecy": "Э",
+ "Edot": "Ė",
+ "Efr": "𝔈",
+ "Egrav": "È",
+ "Egrave": "È",
+ "Element": "∈",
+ "Emacr": "Ē",
+ "EmptySmallSquare": "◻",
+ "EmptyVerySmallSquare": "▫",
+ "Eogon": "Ę",
+ "Eopf": "𝔼",
+ "Epsilon": "Ε",
+ "Equal": "⩵",
+ "EqualTilde": "≂",
+ "Equilibrium": "⇌",
+ "Escr": "ℰ",
+ "Esim": "⩳",
+ "Eta": "Η",
+ "Eum": "Ë",
+ "Euml": "Ë",
+ "Exists": "∃",
+ "ExponentialE": "ⅇ",
+ "Fcy": "Ф",
+ "Ffr": "𝔉",
+ "FilledSmallSquare": "◼",
+ "FilledVerySmallSquare": "▪",
+ "Fopf": "𝔽",
+ "ForAll": "∀",
+ "Fouriertrf": "ℱ",
+ "Fscr": "ℱ",
+ "GJcy": "Ѓ",
+ "G": ">",
+ "GT": ">",
+ "Gamma": "Γ",
+ "Gammad": "Ϝ",
+ "Gbreve": "Ğ",
+ "Gcedil": "Ģ",
+ "Gcirc": "Ĝ",
+ "Gcy": "Г",
+ "Gdot": "Ġ",
+ "Gfr": "𝔊",
+ "Gg": "⋙",
+ "Gopf": "𝔾",
+ "GreaterEqual": "≥",
+ "GreaterEqualLess": "⋛",
+ "GreaterFullEqual": "≧",
+ "GreaterGreater": "⪢",
+ "GreaterLess": "≷",
+ "GreaterSlantEqual": "⩾",
+ "GreaterTilde": "≳",
+ "Gscr": "𝒢",
+ "Gt": "≫",
+ "HARDcy": "Ъ",
+ "Hacek": "ˇ",
+ "Hat": "^",
+ "Hcirc": "Ĥ",
+ "Hfr": "ℌ",
+ "HilbertSpace": "ℋ",
+ "Hopf": "ℍ",
+ "HorizontalLine": "─",
+ "Hscr": "ℋ",
+ "Hstrok": "Ħ",
+ "HumpDownHump": "≎",
+ "HumpEqual": "≏",
+ "IEcy": "Е",
+ "IJlig": "IJ",
+ "IOcy": "Ё",
+ "Iacut": "Í",
+ "Iacute": "Í",
+ "Icir": "Î",
+ "Icirc": "Î",
+ "Icy": "И",
+ "Idot": "İ",
+ "Ifr": "ℑ",
+ "Igrav": "Ì",
+ "Igrave": "Ì",
+ "Im": "ℑ",
+ "Imacr": "Ī",
+ "ImaginaryI": "ⅈ",
+ "Implies": "⇒",
+ "Int": "∬",
+ "Integral": "∫",
+ "Intersection": "⋂",
+ "InvisibleComma": "⁣",
+ "InvisibleTimes": "⁢",
+ "Iogon": "Į",
+ "Iopf": "𝕀",
+ "Iota": "Ι",
+ "Iscr": "ℐ",
+ "Itilde": "Ĩ",
+ "Iukcy": "І",
+ "Ium": "Ï",
+ "Iuml": "Ï",
+ "Jcirc": "Ĵ",
+ "Jcy": "Й",
+ "Jfr": "𝔍",
+ "Jopf": "𝕁",
+ "Jscr": "𝒥",
+ "Jsercy": "Ј",
+ "Jukcy": "Є",
+ "KHcy": "Х",
+ "KJcy": "Ќ",
+ "Kappa": "Κ",
+ "Kcedil": "Ķ",
+ "Kcy": "К",
+ "Kfr": "𝔎",
+ "Kopf": "𝕂",
+ "Kscr": "𝒦",
+ "LJcy": "Љ",
+ "L": "<",
+ "LT": "<",
+ "Lacute": "Ĺ",
+ "Lambda": "Λ",
+ "Lang": "⟪",
+ "Laplacetrf": "ℒ",
+ "Larr": "↞",
+ "Lcaron": "Ľ",
+ "Lcedil": "Ļ",
+ "Lcy": "Л",
+ "LeftAngleBracket": "⟨",
+ "LeftArrow": "←",
+ "LeftArrowBar": "⇤",
+ "LeftArrowRightArrow": "⇆",
+ "LeftCeiling": "⌈",
+ "LeftDoubleBracket": "⟦",
+ "LeftDownTeeVector": "⥡",
+ "LeftDownVector": "⇃",
+ "LeftDownVectorBar": "⥙",
+ "LeftFloor": "⌊",
+ "LeftRightArrow": "↔",
+ "LeftRightVector": "⥎",
+ "LeftTee": "⊣",
+ "LeftTeeArrow": "↤",
+ "LeftTeeVector": "⥚",
+ "LeftTriangle": "⊲",
+ "LeftTriangleBar": "⧏",
+ "LeftTriangleEqual": "⊴",
+ "LeftUpDownVector": "⥑",
+ "LeftUpTeeVector": "⥠",
+ "LeftUpVector": "↿",
+ "LeftUpVectorBar": "⥘",
+ "LeftVector": "↼",
+ "LeftVectorBar": "⥒",
+ "Leftarrow": "⇐",
+ "Leftrightarrow": "⇔",
+ "LessEqualGreater": "⋚",
+ "LessFullEqual": "≦",
+ "LessGreater": "≶",
+ "LessLess": "⪡",
+ "LessSlantEqual": "⩽",
+ "LessTilde": "≲",
+ "Lfr": "𝔏",
+ "Ll": "⋘",
+ "Lleftarrow": "⇚",
+ "Lmidot": "Ŀ",
+ "LongLeftArrow": "⟵",
+ "LongLeftRightArrow": "⟷",
+ "LongRightArrow": "⟶",
+ "Longleftarrow": "⟸",
+ "Longleftrightarrow": "⟺",
+ "Longrightarrow": "⟹",
+ "Lopf": "𝕃",
+ "LowerLeftArrow": "↙",
+ "LowerRightArrow": "↘",
+ "Lscr": "ℒ",
+ "Lsh": "↰",
+ "Lstrok": "Ł",
+ "Lt": "≪",
+ "Map": "⤅",
+ "Mcy": "М",
+ "MediumSpace": " ",
+ "Mellintrf": "ℳ",
+ "Mfr": "𝔐",
+ "MinusPlus": "∓",
+ "Mopf": "𝕄",
+ "Mscr": "ℳ",
+ "Mu": "Μ",
+ "NJcy": "Њ",
+ "Nacute": "Ń",
+ "Ncaron": "Ň",
+ "Ncedil": "Ņ",
+ "Ncy": "Н",
+ "NegativeMediumSpace": "​",
+ "NegativeThickSpace": "​",
+ "NegativeThinSpace": "​",
+ "NegativeVeryThinSpace": "​",
+ "NestedGreaterGreater": "≫",
+ "NestedLessLess": "≪",
+ "NewLine": "\n",
+ "Nfr": "𝔑",
+ "NoBreak": "⁠",
+ "NonBreakingSpace": " ",
+ "Nopf": "ℕ",
+ "Not": "⫬",
+ "NotCongruent": "≢",
+ "NotCupCap": "≭",
+ "NotDoubleVerticalBar": "∦",
+ "NotElement": "∉",
+ "NotEqual": "≠",
+ "NotEqualTilde": "≂̸",
+ "NotExists": "∄",
+ "NotGreater": "≯",
+ "NotGreaterEqual": "≱",
+ "NotGreaterFullEqual": "≧̸",
+ "NotGreaterGreater": "≫̸",
+ "NotGreaterLess": "≹",
+ "NotGreaterSlantEqual": "⩾̸",
+ "NotGreaterTilde": "≵",
+ "NotHumpDownHump": "≎̸",
+ "NotHumpEqual": "≏̸",
+ "NotLeftTriangle": "⋪",
+ "NotLeftTriangleBar": "⧏̸",
+ "NotLeftTriangleEqual": "⋬",
+ "NotLess": "≮",
+ "NotLessEqual": "≰",
+ "NotLessGreater": "≸",
+ "NotLessLess": "≪̸",
+ "NotLessSlantEqual": "⩽̸",
+ "NotLessTilde": "≴",
+ "NotNestedGreaterGreater": "⪢̸",
+ "NotNestedLessLess": "⪡̸",
+ "NotPrecedes": "⊀",
+ "NotPrecedesEqual": "⪯̸",
+ "NotPrecedesSlantEqual": "⋠",
+ "NotReverseElement": "∌",
+ "NotRightTriangle": "⋫",
+ "NotRightTriangleBar": "⧐̸",
+ "NotRightTriangleEqual": "⋭",
+ "NotSquareSubset": "⊏̸",
+ "NotSquareSubsetEqual": "⋢",
+ "NotSquareSuperset": "⊐̸",
+ "NotSquareSupersetEqual": "⋣",
+ "NotSubset": "⊂⃒",
+ "NotSubsetEqual": "⊈",
+ "NotSucceeds": "⊁",
+ "NotSucceedsEqual": "⪰̸",
+ "NotSucceedsSlantEqual": "⋡",
+ "NotSucceedsTilde": "≿̸",
+ "NotSuperset": "⊃⃒",
+ "NotSupersetEqual": "⊉",
+ "NotTilde": "≁",
+ "NotTildeEqual": "≄",
+ "NotTildeFullEqual": "≇",
+ "NotTildeTilde": "≉",
+ "NotVerticalBar": "∤",
+ "Nscr": "𝒩",
+ "Ntild": "Ñ",
+ "Ntilde": "Ñ",
+ "Nu": "Ν",
+ "OElig": "Œ",
+ "Oacut": "Ó",
+ "Oacute": "Ó",
+ "Ocir": "Ô",
+ "Ocirc": "Ô",
+ "Ocy": "О",
+ "Odblac": "Ő",
+ "Ofr": "𝔒",
+ "Ograv": "Ò",
+ "Ograve": "Ò",
+ "Omacr": "Ō",
+ "Omega": "Ω",
+ "Omicron": "Ο",
+ "Oopf": "𝕆",
+ "OpenCurlyDoubleQuote": "“",
+ "OpenCurlyQuote": "‘",
+ "Or": "⩔",
+ "Oscr": "𝒪",
+ "Oslas": "Ø",
+ "Oslash": "Ø",
+ "Otild": "Õ",
+ "Otilde": "Õ",
+ "Otimes": "⨷",
+ "Oum": "Ö",
+ "Ouml": "Ö",
+ "OverBar": "‾",
+ "OverBrace": "⏞",
+ "OverBracket": "⎴",
+ "OverParenthesis": "⏜",
+ "PartialD": "∂",
+ "Pcy": "П",
+ "Pfr": "𝔓",
+ "Phi": "Φ",
+ "Pi": "Π",
+ "PlusMinus": "±",
+ "Poincareplane": "ℌ",
+ "Popf": "ℙ",
+ "Pr": "⪻",
+ "Precedes": "≺",
+ "PrecedesEqual": "⪯",
+ "PrecedesSlantEqual": "≼",
+ "PrecedesTilde": "≾",
+ "Prime": "″",
+ "Product": "∏",
+ "Proportion": "∷",
+ "Proportional": "∝",
+ "Pscr": "𝒫",
+ "Psi": "Ψ",
+ "QUO": "\"",
+ "QUOT": "\"",
+ "Qfr": "𝔔",
+ "Qopf": "ℚ",
+ "Qscr": "𝒬",
+ "RBarr": "⤐",
+ "RE": "®",
+ "REG": "®",
+ "Racute": "Ŕ",
+ "Rang": "⟫",
+ "Rarr": "↠",
+ "Rarrtl": "⤖",
+ "Rcaron": "Ř",
+ "Rcedil": "Ŗ",
+ "Rcy": "Р",
+ "Re": "ℜ",
+ "ReverseElement": "∋",
+ "ReverseEquilibrium": "⇋",
+ "ReverseUpEquilibrium": "⥯",
+ "Rfr": "ℜ",
+ "Rho": "Ρ",
+ "RightAngleBracket": "⟩",
+ "RightArrow": "→",
+ "RightArrowBar": "⇥",
+ "RightArrowLeftArrow": "⇄",
+ "RightCeiling": "⌉",
+ "RightDoubleBracket": "⟧",
+ "RightDownTeeVector": "⥝",
+ "RightDownVector": "⇂",
+ "RightDownVectorBar": "⥕",
+ "RightFloor": "⌋",
+ "RightTee": "⊢",
+ "RightTeeArrow": "↦",
+ "RightTeeVector": "⥛",
+ "RightTriangle": "⊳",
+ "RightTriangleBar": "⧐",
+ "RightTriangleEqual": "⊵",
+ "RightUpDownVector": "⥏",
+ "RightUpTeeVector": "⥜",
+ "RightUpVector": "↾",
+ "RightUpVectorBar": "⥔",
+ "RightVector": "⇀",
+ "RightVectorBar": "⥓",
+ "Rightarrow": "⇒",
+ "Ropf": "ℝ",
+ "RoundImplies": "⥰",
+ "Rrightarrow": "⇛",
+ "Rscr": "ℛ",
+ "Rsh": "↱",
+ "RuleDelayed": "⧴",
+ "SHCHcy": "Щ",
+ "SHcy": "Ш",
+ "SOFTcy": "Ь",
+ "Sacute": "Ś",
+ "Sc": "⪼",
+ "Scaron": "Š",
+ "Scedil": "Ş",
+ "Scirc": "Ŝ",
+ "Scy": "С",
+ "Sfr": "𝔖",
+ "ShortDownArrow": "↓",
+ "ShortLeftArrow": "←",
+ "ShortRightArrow": "→",
+ "ShortUpArrow": "↑",
+ "Sigma": "Σ",
+ "SmallCircle": "∘",
+ "Sopf": "𝕊",
+ "Sqrt": "√",
+ "Square": "□",
+ "SquareIntersection": "⊓",
+ "SquareSubset": "⊏",
+ "SquareSubsetEqual": "⊑",
+ "SquareSuperset": "⊐",
+ "SquareSupersetEqual": "⊒",
+ "SquareUnion": "⊔",
+ "Sscr": "𝒮",
+ "Star": "⋆",
+ "Sub": "⋐",
+ "Subset": "⋐",
+ "SubsetEqual": "⊆",
+ "Succeeds": "≻",
+ "SucceedsEqual": "⪰",
+ "SucceedsSlantEqual": "≽",
+ "SucceedsTilde": "≿",
+ "SuchThat": "∋",
+ "Sum": "∑",
+ "Sup": "⋑",
+ "Superset": "⊃",
+ "SupersetEqual": "⊇",
+ "Supset": "⋑",
+ "THOR": "Þ",
+ "THORN": "Þ",
+ "TRADE": "™",
+ "TSHcy": "Ћ",
+ "TScy": "Ц",
+ "Tab": "\t",
+ "Tau": "Τ",
+ "Tcaron": "Ť",
+ "Tcedil": "Ţ",
+ "Tcy": "Т",
+ "Tfr": "𝔗",
+ "Therefore": "∴",
+ "Theta": "Θ",
+ "ThickSpace": "  ",
+ "ThinSpace": " ",
+ "Tilde": "∼",
+ "TildeEqual": "≃",
+ "TildeFullEqual": "≅",
+ "TildeTilde": "≈",
+ "Topf": "𝕋",
+ "TripleDot": "⃛",
+ "Tscr": "𝒯",
+ "Tstrok": "Ŧ",
+ "Uacut": "Ú",
+ "Uacute": "Ú",
+ "Uarr": "↟",
+ "Uarrocir": "⥉",
+ "Ubrcy": "Ў",
+ "Ubreve": "Ŭ",
+ "Ucir": "Û",
+ "Ucirc": "Û",
+ "Ucy": "У",
+ "Udblac": "Ű",
+ "Ufr": "𝔘",
+ "Ugrav": "Ù",
+ "Ugrave": "Ù",
+ "Umacr": "Ū",
+ "UnderBar": "_",
+ "UnderBrace": "⏟",
+ "UnderBracket": "⎵",
+ "UnderParenthesis": "⏝",
+ "Union": "⋃",
+ "UnionPlus": "⊎",
+ "Uogon": "Ų",
+ "Uopf": "𝕌",
+ "UpArrow": "↑",
+ "UpArrowBar": "⤒",
+ "UpArrowDownArrow": "⇅",
+ "UpDownArrow": "↕",
+ "UpEquilibrium": "⥮",
+ "UpTee": "⊥",
+ "UpTeeArrow": "↥",
+ "Uparrow": "⇑",
+ "Updownarrow": "⇕",
+ "UpperLeftArrow": "↖",
+ "UpperRightArrow": "↗",
+ "Upsi": "ϒ",
+ "Upsilon": "Υ",
+ "Uring": "Ů",
+ "Uscr": "𝒰",
+ "Utilde": "Ũ",
+ "Uum": "Ü",
+ "Uuml": "Ü",
+ "VDash": "⊫",
+ "Vbar": "⫫",
+ "Vcy": "В",
+ "Vdash": "⊩",
+ "Vdashl": "⫦",
+ "Vee": "⋁",
+ "Verbar": "‖",
+ "Vert": "‖",
+ "VerticalBar": "∣",
+ "VerticalLine": "|",
+ "VerticalSeparator": "❘",
+ "VerticalTilde": "≀",
+ "VeryThinSpace": " ",
+ "Vfr": "𝔙",
+ "Vopf": "𝕍",
+ "Vscr": "𝒱",
+ "Vvdash": "⊪",
+ "Wcirc": "Ŵ",
+ "Wedge": "⋀",
+ "Wfr": "𝔚",
+ "Wopf": "𝕎",
+ "Wscr": "𝒲",
+ "Xfr": "𝔛",
+ "Xi": "Ξ",
+ "Xopf": "𝕏",
+ "Xscr": "𝒳",
+ "YAcy": "Я",
+ "YIcy": "Ї",
+ "YUcy": "Ю",
+ "Yacut": "Ý",
+ "Yacute": "Ý",
+ "Ycirc": "Ŷ",
+ "Ycy": "Ы",
+ "Yfr": "𝔜",
+ "Yopf": "𝕐",
+ "Yscr": "𝒴",
+ "Yuml": "Ÿ",
+ "ZHcy": "Ж",
+ "Zacute": "Ź",
+ "Zcaron": "Ž",
+ "Zcy": "З",
+ "Zdot": "Ż",
+ "ZeroWidthSpace": "​",
+ "Zeta": "Ζ",
+ "Zfr": "ℨ",
+ "Zopf": "ℤ",
+ "Zscr": "𝒵",
+ "aacut": "á",
+ "aacute": "á",
+ "abreve": "ă",
+ "ac": "∾",
+ "acE": "∾̳",
+ "acd": "∿",
+ "acir": "â",
+ "acirc": "â",
+ "acut": "´",
+ "acute": "´",
+ "acy": "а",
+ "aeli": "æ",
+ "aelig": "æ",
+ "af": "⁡",
+ "afr": "𝔞",
+ "agrav": "à",
+ "agrave": "à",
+ "alefsym": "ℵ",
+ "aleph": "ℵ",
+ "alpha": "α",
+ "amacr": "ā",
+ "amalg": "⨿",
+ "am": "&",
+ "amp": "&",
+ "and": "∧",
+ "andand": "⩕",
+ "andd": "⩜",
+ "andslope": "⩘",
+ "andv": "⩚",
+ "ang": "∠",
+ "ange": "⦤",
+ "angle": "∠",
+ "angmsd": "∡",
+ "angmsdaa": "⦨",
+ "angmsdab": "⦩",
+ "angmsdac": "⦪",
+ "angmsdad": "⦫",
+ "angmsdae": "⦬",
+ "angmsdaf": "⦭",
+ "angmsdag": "⦮",
+ "angmsdah": "⦯",
+ "angrt": "∟",
+ "angrtvb": "⊾",
+ "angrtvbd": "⦝",
+ "angsph": "∢",
+ "angst": "Å",
+ "angzarr": "⍼",
+ "aogon": "ą",
+ "aopf": "𝕒",
+ "ap": "≈",
+ "apE": "⩰",
+ "apacir": "⩯",
+ "ape": "≊",
+ "apid": "≋",
+ "apos": "'",
+ "approx": "≈",
+ "approxeq": "≊",
+ "arin": "å",
+ "aring": "å",
+ "ascr": "𝒶",
+ "ast": "*",
+ "asymp": "≈",
+ "asympeq": "≍",
+ "atild": "ã",
+ "atilde": "ã",
+ "aum": "ä",
+ "auml": "ä",
+ "awconint": "∳",
+ "awint": "⨑",
+ "bNot": "⫭",
+ "backcong": "≌",
+ "backepsilon": "϶",
+ "backprime": "‵",
+ "backsim": "∽",
+ "backsimeq": "⋍",
+ "barvee": "⊽",
+ "barwed": "⌅",
+ "barwedge": "⌅",
+ "bbrk": "⎵",
+ "bbrktbrk": "⎶",
+ "bcong": "≌",
+ "bcy": "б",
+ "bdquo": "„",
+ "becaus": "∵",
+ "because": "∵",
+ "bemptyv": "⦰",
+ "bepsi": "϶",
+ "bernou": "ℬ",
+ "beta": "β",
+ "beth": "ℶ",
+ "between": "≬",
+ "bfr": "𝔟",
+ "bigcap": "⋂",
+ "bigcirc": "◯",
+ "bigcup": "⋃",
+ "bigodot": "⨀",
+ "bigoplus": "⨁",
+ "bigotimes": "⨂",
+ "bigsqcup": "⨆",
+ "bigstar": "★",
+ "bigtriangledown": "▽",
+ "bigtriangleup": "△",
+ "biguplus": "⨄",
+ "bigvee": "⋁",
+ "bigwedge": "⋀",
+ "bkarow": "⤍",
+ "blacklozenge": "⧫",
+ "blacksquare": "▪",
+ "blacktriangle": "▴",
+ "blacktriangledown": "▾",
+ "blacktriangleleft": "◂",
+ "blacktriangleright": "▸",
+ "blank": "␣",
+ "blk12": "▒",
+ "blk14": "░",
+ "blk34": "▓",
+ "block": "█",
+ "bne": "=⃥",
+ "bnequiv": "≡⃥",
+ "bnot": "⌐",
+ "bopf": "𝕓",
+ "bot": "⊥",
+ "bottom": "⊥",
+ "bowtie": "⋈",
+ "boxDL": "╗",
+ "boxDR": "╔",
+ "boxDl": "╖",
+ "boxDr": "╓",
+ "boxH": "═",
+ "boxHD": "╦",
+ "boxHU": "╩",
+ "boxHd": "╤",
+ "boxHu": "╧",
+ "boxUL": "╝",
+ "boxUR": "╚",
+ "boxUl": "╜",
+ "boxUr": "╙",
+ "boxV": "║",
+ "boxVH": "╬",
+ "boxVL": "╣",
+ "boxVR": "╠",
+ "boxVh": "╫",
+ "boxVl": "╢",
+ "boxVr": "╟",
+ "boxbox": "⧉",
+ "boxdL": "╕",
+ "boxdR": "╒",
+ "boxdl": "┐",
+ "boxdr": "┌",
+ "boxh": "─",
+ "boxhD": "╥",
+ "boxhU": "╨",
+ "boxhd": "┬",
+ "boxhu": "┴",
+ "boxminus": "⊟",
+ "boxplus": "⊞",
+ "boxtimes": "⊠",
+ "boxuL": "╛",
+ "boxuR": "╘",
+ "boxul": "┘",
+ "boxur": "└",
+ "boxv": "│",
+ "boxvH": "╪",
+ "boxvL": "╡",
+ "boxvR": "╞",
+ "boxvh": "┼",
+ "boxvl": "┤",
+ "boxvr": "├",
+ "bprime": "‵",
+ "breve": "˘",
+ "brvba": "¦",
+ "brvbar": "¦",
+ "bscr": "𝒷",
+ "bsemi": "⁏",
+ "bsim": "∽",
+ "bsime": "⋍",
+ "bsol": "\\",
+ "bsolb": "⧅",
+ "bsolhsub": "⟈",
+ "bull": "•",
+ "bullet": "•",
+ "bump": "≎",
+ "bumpE": "⪮",
+ "bumpe": "≏",
+ "bumpeq": "≏",
+ "cacute": "ć",
+ "cap": "∩",
+ "capand": "⩄",
+ "capbrcup": "⩉",
+ "capcap": "⩋",
+ "capcup": "⩇",
+ "capdot": "⩀",
+ "caps": "∩︀",
+ "caret": "⁁",
+ "caron": "ˇ",
+ "ccaps": "⩍",
+ "ccaron": "č",
+ "ccedi": "ç",
+ "ccedil": "ç",
+ "ccirc": "ĉ",
+ "ccups": "⩌",
+ "ccupssm": "⩐",
+ "cdot": "ċ",
+ "cedi": "¸",
+ "cedil": "¸",
+ "cemptyv": "⦲",
+ "cen": "¢",
+ "cent": "¢",
+ "centerdot": "·",
+ "cfr": "𝔠",
+ "chcy": "ч",
+ "check": "✓",
+ "checkmark": "✓",
+ "chi": "χ",
+ "cir": "○",
+ "cirE": "⧃",
+ "circ": "ˆ",
+ "circeq": "≗",
+ "circlearrowleft": "↺",
+ "circlearrowright": "↻",
+ "circledR": "®",
+ "circledS": "Ⓢ",
+ "circledast": "⊛",
+ "circledcirc": "⊚",
+ "circleddash": "⊝",
+ "cire": "≗",
+ "cirfnint": "⨐",
+ "cirmid": "⫯",
+ "cirscir": "⧂",
+ "clubs": "♣",
+ "clubsuit": "♣",
+ "colon": ":",
+ "colone": "≔",
+ "coloneq": "≔",
+ "comma": ",",
+ "commat": "@",
+ "comp": "∁",
+ "compfn": "∘",
+ "complement": "∁",
+ "complexes": "ℂ",
+ "cong": "≅",
+ "congdot": "⩭",
+ "conint": "∮",
+ "copf": "𝕔",
+ "coprod": "∐",
+ "cop": "©",
+ "copy": "©",
+ "copysr": "℗",
+ "crarr": "↵",
+ "cross": "✗",
+ "cscr": "𝒸",
+ "csub": "⫏",
+ "csube": "⫑",
+ "csup": "⫐",
+ "csupe": "⫒",
+ "ctdot": "⋯",
+ "cudarrl": "⤸",
+ "cudarrr": "⤵",
+ "cuepr": "⋞",
+ "cuesc": "⋟",
+ "cularr": "↶",
+ "cularrp": "⤽",
+ "cup": "∪",
+ "cupbrcap": "⩈",
+ "cupcap": "⩆",
+ "cupcup": "⩊",
+ "cupdot": "⊍",
+ "cupor": "⩅",
+ "cups": "∪︀",
+ "curarr": "↷",
+ "curarrm": "⤼",
+ "curlyeqprec": "⋞",
+ "curlyeqsucc": "⋟",
+ "curlyvee": "⋎",
+ "curlywedge": "⋏",
+ "curre": "¤",
+ "curren": "¤",
+ "curvearrowleft": "↶",
+ "curvearrowright": "↷",
+ "cuvee": "⋎",
+ "cuwed": "⋏",
+ "cwconint": "∲",
+ "cwint": "∱",
+ "cylcty": "⌭",
+ "dArr": "⇓",
+ "dHar": "⥥",
+ "dagger": "†",
+ "daleth": "ℸ",
+ "darr": "↓",
+ "dash": "‐",
+ "dashv": "⊣",
+ "dbkarow": "⤏",
+ "dblac": "˝",
+ "dcaron": "ď",
+ "dcy": "д",
+ "dd": "ⅆ",
+ "ddagger": "‡",
+ "ddarr": "⇊",
+ "ddotseq": "⩷",
+ "de": "°",
+ "deg": "°",
+ "delta": "δ",
+ "demptyv": "⦱",
+ "dfisht": "⥿",
+ "dfr": "𝔡",
+ "dharl": "⇃",
+ "dharr": "⇂",
+ "diam": "⋄",
+ "diamond": "⋄",
+ "diamondsuit": "♦",
+ "diams": "♦",
+ "die": "¨",
+ "digamma": "ϝ",
+ "disin": "⋲",
+ "div": "÷",
+ "divid": "÷",
+ "divide": "÷",
+ "divideontimes": "⋇",
+ "divonx": "⋇",
+ "djcy": "ђ",
+ "dlcorn": "⌞",
+ "dlcrop": "⌍",
+ "dollar": "$",
+ "dopf": "𝕕",
+ "dot": "˙",
+ "doteq": "≐",
+ "doteqdot": "≑",
+ "dotminus": "∸",
+ "dotplus": "∔",
+ "dotsquare": "⊡",
+ "doublebarwedge": "⌆",
+ "downarrow": "↓",
+ "downdownarrows": "⇊",
+ "downharpoonleft": "⇃",
+ "downharpoonright": "⇂",
+ "drbkarow": "⤐",
+ "drcorn": "⌟",
+ "drcrop": "⌌",
+ "dscr": "𝒹",
+ "dscy": "ѕ",
+ "dsol": "⧶",
+ "dstrok": "đ",
+ "dtdot": "⋱",
+ "dtri": "▿",
+ "dtrif": "▾",
+ "duarr": "⇵",
+ "duhar": "⥯",
+ "dwangle": "⦦",
+ "dzcy": "џ",
+ "dzigrarr": "⟿",
+ "eDDot": "⩷",
+ "eDot": "≑",
+ "eacut": "é",
+ "eacute": "é",
+ "easter": "⩮",
+ "ecaron": "ě",
+ "ecir": "ê",
+ "ecirc": "ê",
+ "ecolon": "≕",
+ "ecy": "э",
+ "edot": "ė",
+ "ee": "ⅇ",
+ "efDot": "≒",
+ "efr": "𝔢",
+ "eg": "⪚",
+ "egrav": "è",
+ "egrave": "è",
+ "egs": "⪖",
+ "egsdot": "⪘",
+ "el": "⪙",
+ "elinters": "⏧",
+ "ell": "ℓ",
+ "els": "⪕",
+ "elsdot": "⪗",
+ "emacr": "ē",
+ "empty": "∅",
+ "emptyset": "∅",
+ "emptyv": "∅",
+ "emsp13": " ",
+ "emsp14": " ",
+ "emsp": " ",
+ "eng": "ŋ",
+ "ensp": " ",
+ "eogon": "ę",
+ "eopf": "𝕖",
+ "epar": "⋕",
+ "eparsl": "⧣",
+ "eplus": "⩱",
+ "epsi": "ε",
+ "epsilon": "ε",
+ "epsiv": "ϵ",
+ "eqcirc": "≖",
+ "eqcolon": "≕",
+ "eqsim": "≂",
+ "eqslantgtr": "⪖",
+ "eqslantless": "⪕",
+ "equals": "=",
+ "equest": "≟",
+ "equiv": "≡",
+ "equivDD": "⩸",
+ "eqvparsl": "⧥",
+ "erDot": "≓",
+ "erarr": "⥱",
+ "escr": "ℯ",
+ "esdot": "≐",
+ "esim": "≂",
+ "eta": "η",
+ "et": "ð",
+ "eth": "ð",
+ "eum": "ë",
+ "euml": "ë",
+ "euro": "€",
+ "excl": "!",
+ "exist": "∃",
+ "expectation": "ℰ",
+ "exponentiale": "ⅇ",
+ "fallingdotseq": "≒",
+ "fcy": "ф",
+ "female": "♀",
+ "ffilig": "ffi",
+ "fflig": "ff",
+ "ffllig": "ffl",
+ "ffr": "𝔣",
+ "filig": "fi",
+ "fjlig": "fj",
+ "flat": "♭",
+ "fllig": "fl",
+ "fltns": "▱",
+ "fnof": "ƒ",
+ "fopf": "𝕗",
+ "forall": "∀",
+ "fork": "⋔",
+ "forkv": "⫙",
+ "fpartint": "⨍",
+ "frac1": "¼",
+ "frac12": "½",
+ "frac13": "⅓",
+ "frac14": "¼",
+ "frac15": "⅕",
+ "frac16": "⅙",
+ "frac18": "⅛",
+ "frac23": "⅔",
+ "frac25": "⅖",
+ "frac3": "¾",
+ "frac34": "¾",
+ "frac35": "⅗",
+ "frac38": "⅜",
+ "frac45": "⅘",
+ "frac56": "⅚",
+ "frac58": "⅝",
+ "frac78": "⅞",
+ "frasl": "⁄",
+ "frown": "⌢",
+ "fscr": "𝒻",
+ "gE": "≧",
+ "gEl": "⪌",
+ "gacute": "ǵ",
+ "gamma": "γ",
+ "gammad": "ϝ",
+ "gap": "⪆",
+ "gbreve": "ğ",
+ "gcirc": "ĝ",
+ "gcy": "г",
+ "gdot": "ġ",
+ "ge": "≥",
+ "gel": "⋛",
+ "geq": "≥",
+ "geqq": "≧",
+ "geqslant": "⩾",
+ "ges": "⩾",
+ "gescc": "⪩",
+ "gesdot": "⪀",
+ "gesdoto": "⪂",
+ "gesdotol": "⪄",
+ "gesl": "⋛︀",
+ "gesles": "⪔",
+ "gfr": "𝔤",
+ "gg": "≫",
+ "ggg": "⋙",
+ "gimel": "ℷ",
+ "gjcy": "ѓ",
+ "gl": "≷",
+ "glE": "⪒",
+ "gla": "⪥",
+ "glj": "⪤",
+ "gnE": "≩",
+ "gnap": "⪊",
+ "gnapprox": "⪊",
+ "gne": "⪈",
+ "gneq": "⪈",
+ "gneqq": "≩",
+ "gnsim": "⋧",
+ "gopf": "𝕘",
+ "grave": "`",
+ "gscr": "ℊ",
+ "gsim": "≳",
+ "gsime": "⪎",
+ "gsiml": "⪐",
+ "g": ">",
+ "gt": ">",
+ "gtcc": "⪧",
+ "gtcir": "⩺",
+ "gtdot": "⋗",
+ "gtlPar": "⦕",
+ "gtquest": "⩼",
+ "gtrapprox": "⪆",
+ "gtrarr": "⥸",
+ "gtrdot": "⋗",
+ "gtreqless": "⋛",
+ "gtreqqless": "⪌",
+ "gtrless": "≷",
+ "gtrsim": "≳",
+ "gvertneqq": "≩︀",
+ "gvnE": "≩︀",
+ "hArr": "⇔",
+ "hairsp": " ",
+ "half": "½",
+ "hamilt": "ℋ",
+ "hardcy": "ъ",
+ "harr": "↔",
+ "harrcir": "⥈",
+ "harrw": "↭",
+ "hbar": "ℏ",
+ "hcirc": "ĥ",
+ "hearts": "♥",
+ "heartsuit": "♥",
+ "hellip": "…",
+ "hercon": "⊹",
+ "hfr": "𝔥",
+ "hksearow": "⤥",
+ "hkswarow": "⤦",
+ "hoarr": "⇿",
+ "homtht": "∻",
+ "hookleftarrow": "↩",
+ "hookrightarrow": "↪",
+ "hopf": "𝕙",
+ "horbar": "―",
+ "hscr": "𝒽",
+ "hslash": "ℏ",
+ "hstrok": "ħ",
+ "hybull": "⁃",
+ "hyphen": "‐",
+ "iacut": "í",
+ "iacute": "í",
+ "ic": "⁣",
+ "icir": "î",
+ "icirc": "î",
+ "icy": "и",
+ "iecy": "е",
+ "iexc": "¡",
+ "iexcl": "¡",
+ "iff": "⇔",
+ "ifr": "𝔦",
+ "igrav": "ì",
+ "igrave": "ì",
+ "ii": "ⅈ",
+ "iiiint": "⨌",
+ "iiint": "∭",
+ "iinfin": "⧜",
+ "iiota": "℩",
+ "ijlig": "ij",
+ "imacr": "ī",
+ "image": "ℑ",
+ "imagline": "ℐ",
+ "imagpart": "ℑ",
+ "imath": "ı",
+ "imof": "⊷",
+ "imped": "Ƶ",
+ "in": "∈",
+ "incare": "℅",
+ "infin": "∞",
+ "infintie": "⧝",
+ "inodot": "ı",
+ "int": "∫",
+ "intcal": "⊺",
+ "integers": "ℤ",
+ "intercal": "⊺",
+ "intlarhk": "⨗",
+ "intprod": "⨼",
+ "iocy": "ё",
+ "iogon": "į",
+ "iopf": "𝕚",
+ "iota": "ι",
+ "iprod": "⨼",
+ "iques": "¿",
+ "iquest": "¿",
+ "iscr": "𝒾",
+ "isin": "∈",
+ "isinE": "⋹",
+ "isindot": "⋵",
+ "isins": "⋴",
+ "isinsv": "⋳",
+ "isinv": "∈",
+ "it": "⁢",
+ "itilde": "ĩ",
+ "iukcy": "і",
+ "ium": "ï",
+ "iuml": "ï",
+ "jcirc": "ĵ",
+ "jcy": "й",
+ "jfr": "𝔧",
+ "jmath": "ȷ",
+ "jopf": "𝕛",
+ "jscr": "𝒿",
+ "jsercy": "ј",
+ "jukcy": "є",
+ "kappa": "κ",
+ "kappav": "ϰ",
+ "kcedil": "ķ",
+ "kcy": "к",
+ "kfr": "𝔨",
+ "kgreen": "ĸ",
+ "khcy": "х",
+ "kjcy": "ќ",
+ "kopf": "𝕜",
+ "kscr": "𝓀",
+ "lAarr": "⇚",
+ "lArr": "⇐",
+ "lAtail": "⤛",
+ "lBarr": "⤎",
+ "lE": "≦",
+ "lEg": "⪋",
+ "lHar": "⥢",
+ "lacute": "ĺ",
+ "laemptyv": "⦴",
+ "lagran": "ℒ",
+ "lambda": "λ",
+ "lang": "⟨",
+ "langd": "⦑",
+ "langle": "⟨",
+ "lap": "⪅",
+ "laqu": "«",
+ "laquo": "«",
+ "larr": "←",
+ "larrb": "⇤",
+ "larrbfs": "⤟",
+ "larrfs": "⤝",
+ "larrhk": "↩",
+ "larrlp": "↫",
+ "larrpl": "⤹",
+ "larrsim": "⥳",
+ "larrtl": "↢",
+ "lat": "⪫",
+ "latail": "⤙",
+ "late": "⪭",
+ "lates": "⪭︀",
+ "lbarr": "⤌",
+ "lbbrk": "❲",
+ "lbrace": "{",
+ "lbrack": "[",
+ "lbrke": "⦋",
+ "lbrksld": "⦏",
+ "lbrkslu": "⦍",
+ "lcaron": "ľ",
+ "lcedil": "ļ",
+ "lceil": "⌈",
+ "lcub": "{",
+ "lcy": "л",
+ "ldca": "⤶",
+ "ldquo": "“",
+ "ldquor": "„",
+ "ldrdhar": "⥧",
+ "ldrushar": "⥋",
+ "ldsh": "↲",
+ "le": "≤",
+ "leftarrow": "←",
+ "leftarrowtail": "↢",
+ "leftharpoondown": "↽",
+ "leftharpoonup": "↼",
+ "leftleftarrows": "⇇",
+ "leftrightarrow": "↔",
+ "leftrightarrows": "⇆",
+ "leftrightharpoons": "⇋",
+ "leftrightsquigarrow": "↭",
+ "leftthreetimes": "⋋",
+ "leg": "⋚",
+ "leq": "≤",
+ "leqq": "≦",
+ "leqslant": "⩽",
+ "les": "⩽",
+ "lescc": "⪨",
+ "lesdot": "⩿",
+ "lesdoto": "⪁",
+ "lesdotor": "⪃",
+ "lesg": "⋚︀",
+ "lesges": "⪓",
+ "lessapprox": "⪅",
+ "lessdot": "⋖",
+ "lesseqgtr": "⋚",
+ "lesseqqgtr": "⪋",
+ "lessgtr": "≶",
+ "lesssim": "≲",
+ "lfisht": "⥼",
+ "lfloor": "⌊",
+ "lfr": "𝔩",
+ "lg": "≶",
+ "lgE": "⪑",
+ "lhard": "↽",
+ "lharu": "↼",
+ "lharul": "⥪",
+ "lhblk": "▄",
+ "ljcy": "љ",
+ "ll": "≪",
+ "llarr": "⇇",
+ "llcorner": "⌞",
+ "llhard": "⥫",
+ "lltri": "◺",
+ "lmidot": "ŀ",
+ "lmoust": "⎰",
+ "lmoustache": "⎰",
+ "lnE": "≨",
+ "lnap": "⪉",
+ "lnapprox": "⪉",
+ "lne": "⪇",
+ "lneq": "⪇",
+ "lneqq": "≨",
+ "lnsim": "⋦",
+ "loang": "⟬",
+ "loarr": "⇽",
+ "lobrk": "⟦",
+ "longleftarrow": "⟵",
+ "longleftrightarrow": "⟷",
+ "longmapsto": "⟼",
+ "longrightarrow": "⟶",
+ "looparrowleft": "↫",
+ "looparrowright": "↬",
+ "lopar": "⦅",
+ "lopf": "𝕝",
+ "loplus": "⨭",
+ "lotimes": "⨴",
+ "lowast": "∗",
+ "lowbar": "_",
+ "loz": "◊",
+ "lozenge": "◊",
+ "lozf": "⧫",
+ "lpar": "(",
+ "lparlt": "⦓",
+ "lrarr": "⇆",
+ "lrcorner": "⌟",
+ "lrhar": "⇋",
+ "lrhard": "⥭",
+ "lrm": "‎",
+ "lrtri": "⊿",
+ "lsaquo": "‹",
+ "lscr": "𝓁",
+ "lsh": "↰",
+ "lsim": "≲",
+ "lsime": "⪍",
+ "lsimg": "⪏",
+ "lsqb": "[",
+ "lsquo": "‘",
+ "lsquor": "‚",
+ "lstrok": "ł",
+ "l": "<",
+ "lt": "<",
+ "ltcc": "⪦",
+ "ltcir": "⩹",
+ "ltdot": "⋖",
+ "lthree": "⋋",
+ "ltimes": "⋉",
+ "ltlarr": "⥶",
+ "ltquest": "⩻",
+ "ltrPar": "⦖",
+ "ltri": "◃",
+ "ltrie": "⊴",
+ "ltrif": "◂",
+ "lurdshar": "⥊",
+ "luruhar": "⥦",
+ "lvertneqq": "≨︀",
+ "lvnE": "≨︀",
+ "mDDot": "∺",
+ "mac": "¯",
+ "macr": "¯",
+ "male": "♂",
+ "malt": "✠",
+ "maltese": "✠",
+ "map": "↦",
+ "mapsto": "↦",
+ "mapstodown": "↧",
+ "mapstoleft": "↤",
+ "mapstoup": "↥",
+ "marker": "▮",
+ "mcomma": "⨩",
+ "mcy": "м",
+ "mdash": "—",
+ "measuredangle": "∡",
+ "mfr": "𝔪",
+ "mho": "℧",
+ "micr": "µ",
+ "micro": "µ",
+ "mid": "∣",
+ "midast": "*",
+ "midcir": "⫰",
+ "middo": "·",
+ "middot": "·",
+ "minus": "−",
+ "minusb": "⊟",
+ "minusd": "∸",
+ "minusdu": "⨪",
+ "mlcp": "⫛",
+ "mldr": "…",
+ "mnplus": "∓",
+ "models": "⊧",
+ "mopf": "𝕞",
+ "mp": "∓",
+ "mscr": "𝓂",
+ "mstpos": "∾",
+ "mu": "μ",
+ "multimap": "⊸",
+ "mumap": "⊸",
+ "nGg": "⋙̸",
+ "nGt": "≫⃒",
+ "nGtv": "≫̸",
+ "nLeftarrow": "⇍",
+ "nLeftrightarrow": "⇎",
+ "nLl": "⋘̸",
+ "nLt": "≪⃒",
+ "nLtv": "≪̸",
+ "nRightarrow": "⇏",
+ "nVDash": "⊯",
+ "nVdash": "⊮",
+ "nabla": "∇",
+ "nacute": "ń",
+ "nang": "∠⃒",
+ "nap": "≉",
+ "napE": "⩰̸",
+ "napid": "≋̸",
+ "napos": "ʼn",
+ "napprox": "≉",
+ "natur": "♮",
+ "natural": "♮",
+ "naturals": "ℕ",
+ "nbs": " ",
+ "nbsp": " ",
+ "nbump": "≎̸",
+ "nbumpe": "≏̸",
+ "ncap": "⩃",
+ "ncaron": "ň",
+ "ncedil": "ņ",
+ "ncong": "≇",
+ "ncongdot": "⩭̸",
+ "ncup": "⩂",
+ "ncy": "н",
+ "ndash": "–",
+ "ne": "≠",
+ "neArr": "⇗",
+ "nearhk": "⤤",
+ "nearr": "↗",
+ "nearrow": "↗",
+ "nedot": "≐̸",
+ "nequiv": "≢",
+ "nesear": "⤨",
+ "nesim": "≂̸",
+ "nexist": "∄",
+ "nexists": "∄",
+ "nfr": "𝔫",
+ "ngE": "≧̸",
+ "nge": "≱",
+ "ngeq": "≱",
+ "ngeqq": "≧̸",
+ "ngeqslant": "⩾̸",
+ "nges": "⩾̸",
+ "ngsim": "≵",
+ "ngt": "≯",
+ "ngtr": "≯",
+ "nhArr": "⇎",
+ "nharr": "↮",
+ "nhpar": "⫲",
+ "ni": "∋",
+ "nis": "⋼",
+ "nisd": "⋺",
+ "niv": "∋",
+ "njcy": "њ",
+ "nlArr": "⇍",
+ "nlE": "≦̸",
+ "nlarr": "↚",
+ "nldr": "‥",
+ "nle": "≰",
+ "nleftarrow": "↚",
+ "nleftrightarrow": "↮",
+ "nleq": "≰",
+ "nleqq": "≦̸",
+ "nleqslant": "⩽̸",
+ "nles": "⩽̸",
+ "nless": "≮",
+ "nlsim": "≴",
+ "nlt": "≮",
+ "nltri": "⋪",
+ "nltrie": "⋬",
+ "nmid": "∤",
+ "nopf": "𝕟",
+ "no": "¬",
+ "not": "¬",
+ "notin": "∉",
+ "notinE": "⋹̸",
+ "notindot": "⋵̸",
+ "notinva": "∉",
+ "notinvb": "⋷",
+ "notinvc": "⋶",
+ "notni": "∌",
+ "notniva": "∌",
+ "notnivb": "⋾",
+ "notnivc": "⋽",
+ "npar": "∦",
+ "nparallel": "∦",
+ "nparsl": "⫽⃥",
+ "npart": "∂̸",
+ "npolint": "⨔",
+ "npr": "⊀",
+ "nprcue": "⋠",
+ "npre": "⪯̸",
+ "nprec": "⊀",
+ "npreceq": "⪯̸",
+ "nrArr": "⇏",
+ "nrarr": "↛",
+ "nrarrc": "⤳̸",
+ "nrarrw": "↝̸",
+ "nrightarrow": "↛",
+ "nrtri": "⋫",
+ "nrtrie": "⋭",
+ "nsc": "⊁",
+ "nsccue": "⋡",
+ "nsce": "⪰̸",
+ "nscr": "𝓃",
+ "nshortmid": "∤",
+ "nshortparallel": "∦",
+ "nsim": "≁",
+ "nsime": "≄",
+ "nsimeq": "≄",
+ "nsmid": "∤",
+ "nspar": "∦",
+ "nsqsube": "⋢",
+ "nsqsupe": "⋣",
+ "nsub": "⊄",
+ "nsubE": "⫅̸",
+ "nsube": "⊈",
+ "nsubset": "⊂⃒",
+ "nsubseteq": "⊈",
+ "nsubseteqq": "⫅̸",
+ "nsucc": "⊁",
+ "nsucceq": "⪰̸",
+ "nsup": "⊅",
+ "nsupE": "⫆̸",
+ "nsupe": "⊉",
+ "nsupset": "⊃⃒",
+ "nsupseteq": "⊉",
+ "nsupseteqq": "⫆̸",
+ "ntgl": "≹",
+ "ntild": "ñ",
+ "ntilde": "ñ",
+ "ntlg": "≸",
+ "ntriangleleft": "⋪",
+ "ntrianglelefteq": "⋬",
+ "ntriangleright": "⋫",
+ "ntrianglerighteq": "⋭",
+ "nu": "ν",
+ "num": "#",
+ "numero": "№",
+ "numsp": " ",
+ "nvDash": "⊭",
+ "nvHarr": "⤄",
+ "nvap": "≍⃒",
+ "nvdash": "⊬",
+ "nvge": "≥⃒",
+ "nvgt": ">⃒",
+ "nvinfin": "⧞",
+ "nvlArr": "⤂",
+ "nvle": "≤⃒",
+ "nvlt": "<⃒",
+ "nvltrie": "⊴⃒",
+ "nvrArr": "⤃",
+ "nvrtrie": "⊵⃒",
+ "nvsim": "∼⃒",
+ "nwArr": "⇖",
+ "nwarhk": "⤣",
+ "nwarr": "↖",
+ "nwarrow": "↖",
+ "nwnear": "⤧",
+ "oS": "Ⓢ",
+ "oacut": "ó",
+ "oacute": "ó",
+ "oast": "⊛",
+ "ocir": "ô",
+ "ocirc": "ô",
+ "ocy": "о",
+ "odash": "⊝",
+ "odblac": "ő",
+ "odiv": "⨸",
+ "odot": "⊙",
+ "odsold": "⦼",
+ "oelig": "œ",
+ "ofcir": "⦿",
+ "ofr": "𝔬",
+ "ogon": "˛",
+ "ograv": "ò",
+ "ograve": "ò",
+ "ogt": "⧁",
+ "ohbar": "⦵",
+ "ohm": "Ω",
+ "oint": "∮",
+ "olarr": "↺",
+ "olcir": "⦾",
+ "olcross": "⦻",
+ "oline": "‾",
+ "olt": "⧀",
+ "omacr": "ō",
+ "omega": "ω",
+ "omicron": "ο",
+ "omid": "⦶",
+ "ominus": "⊖",
+ "oopf": "𝕠",
+ "opar": "⦷",
+ "operp": "⦹",
+ "oplus": "⊕",
+ "or": "∨",
+ "orarr": "↻",
+ "ord": "º",
+ "order": "ℴ",
+ "orderof": "ℴ",
+ "ordf": "ª",
+ "ordm": "º",
+ "origof": "⊶",
+ "oror": "⩖",
+ "orslope": "⩗",
+ "orv": "⩛",
+ "oscr": "ℴ",
+ "oslas": "ø",
+ "oslash": "ø",
+ "osol": "⊘",
+ "otild": "õ",
+ "otilde": "õ",
+ "otimes": "⊗",
+ "otimesas": "⨶",
+ "oum": "ö",
+ "ouml": "ö",
+ "ovbar": "⌽",
+ "par": "¶",
+ "para": "¶",
+ "parallel": "∥",
+ "parsim": "⫳",
+ "parsl": "⫽",
+ "part": "∂",
+ "pcy": "п",
+ "percnt": "%",
+ "period": ".",
+ "permil": "‰",
+ "perp": "⊥",
+ "pertenk": "‱",
+ "pfr": "𝔭",
+ "phi": "φ",
+ "phiv": "ϕ",
+ "phmmat": "ℳ",
+ "phone": "☎",
+ "pi": "π",
+ "pitchfork": "⋔",
+ "piv": "ϖ",
+ "planck": "ℏ",
+ "planckh": "ℎ",
+ "plankv": "ℏ",
+ "plus": "+",
+ "plusacir": "⨣",
+ "plusb": "⊞",
+ "pluscir": "⨢",
+ "plusdo": "∔",
+ "plusdu": "⨥",
+ "pluse": "⩲",
+ "plusm": "±",
+ "plusmn": "±",
+ "plussim": "⨦",
+ "plustwo": "⨧",
+ "pm": "±",
+ "pointint": "⨕",
+ "popf": "𝕡",
+ "poun": "£",
+ "pound": "£",
+ "pr": "≺",
+ "prE": "⪳",
+ "prap": "⪷",
+ "prcue": "≼",
+ "pre": "⪯",
+ "prec": "≺",
+ "precapprox": "⪷",
+ "preccurlyeq": "≼",
+ "preceq": "⪯",
+ "precnapprox": "⪹",
+ "precneqq": "⪵",
+ "precnsim": "⋨",
+ "precsim": "≾",
+ "prime": "′",
+ "primes": "ℙ",
+ "prnE": "⪵",
+ "prnap": "⪹",
+ "prnsim": "⋨",
+ "prod": "∏",
+ "profalar": "⌮",
+ "profline": "⌒",
+ "profsurf": "⌓",
+ "prop": "∝",
+ "propto": "∝",
+ "prsim": "≾",
+ "prurel": "⊰",
+ "pscr": "𝓅",
+ "psi": "ψ",
+ "puncsp": " ",
+ "qfr": "𝔮",
+ "qint": "⨌",
+ "qopf": "𝕢",
+ "qprime": "⁗",
+ "qscr": "𝓆",
+ "quaternions": "ℍ",
+ "quatint": "⨖",
+ "quest": "?",
+ "questeq": "≟",
+ "quo": "\"",
+ "quot": "\"",
+ "rAarr": "⇛",
+ "rArr": "⇒",
+ "rAtail": "⤜",
+ "rBarr": "⤏",
+ "rHar": "⥤",
+ "race": "∽̱",
+ "racute": "ŕ",
+ "radic": "√",
+ "raemptyv": "⦳",
+ "rang": "⟩",
+ "rangd": "⦒",
+ "range": "⦥",
+ "rangle": "⟩",
+ "raqu": "»",
+ "raquo": "»",
+ "rarr": "→",
+ "rarrap": "⥵",
+ "rarrb": "⇥",
+ "rarrbfs": "⤠",
+ "rarrc": "⤳",
+ "rarrfs": "⤞",
+ "rarrhk": "↪",
+ "rarrlp": "↬",
+ "rarrpl": "⥅",
+ "rarrsim": "⥴",
+ "rarrtl": "↣",
+ "rarrw": "↝",
+ "ratail": "⤚",
+ "ratio": "∶",
+ "rationals": "ℚ",
+ "rbarr": "⤍",
+ "rbbrk": "❳",
+ "rbrace": "}",
+ "rbrack": "]",
+ "rbrke": "⦌",
+ "rbrksld": "⦎",
+ "rbrkslu": "⦐",
+ "rcaron": "ř",
+ "rcedil": "ŗ",
+ "rceil": "⌉",
+ "rcub": "}",
+ "rcy": "р",
+ "rdca": "⤷",
+ "rdldhar": "⥩",
+ "rdquo": "”",
+ "rdquor": "”",
+ "rdsh": "↳",
+ "real": "ℜ",
+ "realine": "ℛ",
+ "realpart": "ℜ",
+ "reals": "ℝ",
+ "rect": "▭",
+ "re": "®",
+ "reg": "®",
+ "rfisht": "⥽",
+ "rfloor": "⌋",
+ "rfr": "𝔯",
+ "rhard": "⇁",
+ "rharu": "⇀",
+ "rharul": "⥬",
+ "rho": "ρ",
+ "rhov": "ϱ",
+ "rightarrow": "→",
+ "rightarrowtail": "↣",
+ "rightharpoondown": "⇁",
+ "rightharpoonup": "⇀",
+ "rightleftarrows": "⇄",
+ "rightleftharpoons": "⇌",
+ "rightrightarrows": "⇉",
+ "rightsquigarrow": "↝",
+ "rightthreetimes": "⋌",
+ "ring": "˚",
+ "risingdotseq": "≓",
+ "rlarr": "⇄",
+ "rlhar": "⇌",
+ "rlm": "‏",
+ "rmoust": "⎱",
+ "rmoustache": "⎱",
+ "rnmid": "⫮",
+ "roang": "⟭",
+ "roarr": "⇾",
+ "robrk": "⟧",
+ "ropar": "⦆",
+ "ropf": "𝕣",
+ "roplus": "⨮",
+ "rotimes": "⨵",
+ "rpar": ")",
+ "rpargt": "⦔",
+ "rppolint": "⨒",
+ "rrarr": "⇉",
+ "rsaquo": "›",
+ "rscr": "𝓇",
+ "rsh": "↱",
+ "rsqb": "]",
+ "rsquo": "’",
+ "rsquor": "’",
+ "rthree": "⋌",
+ "rtimes": "⋊",
+ "rtri": "▹",
+ "rtrie": "⊵",
+ "rtrif": "▸",
+ "rtriltri": "⧎",
+ "ruluhar": "⥨",
+ "rx": "℞",
+ "sacute": "ś",
+ "sbquo": "‚",
+ "sc": "≻",
+ "scE": "⪴",
+ "scap": "⪸",
+ "scaron": "š",
+ "sccue": "≽",
+ "sce": "⪰",
+ "scedil": "ş",
+ "scirc": "ŝ",
+ "scnE": "⪶",
+ "scnap": "⪺",
+ "scnsim": "⋩",
+ "scpolint": "⨓",
+ "scsim": "≿",
+ "scy": "с",
+ "sdot": "⋅",
+ "sdotb": "⊡",
+ "sdote": "⩦",
+ "seArr": "⇘",
+ "searhk": "⤥",
+ "searr": "↘",
+ "searrow": "↘",
+ "sec": "§",
+ "sect": "§",
+ "semi": ";",
+ "seswar": "⤩",
+ "setminus": "∖",
+ "setmn": "∖",
+ "sext": "✶",
+ "sfr": "𝔰",
+ "sfrown": "⌢",
+ "sharp": "♯",
+ "shchcy": "щ",
+ "shcy": "ш",
+ "shortmid": "∣",
+ "shortparallel": "∥",
+ "sh": "­",
+ "shy": "­",
+ "sigma": "σ",
+ "sigmaf": "ς",
+ "sigmav": "ς",
+ "sim": "∼",
+ "simdot": "⩪",
+ "sime": "≃",
+ "simeq": "≃",
+ "simg": "⪞",
+ "simgE": "⪠",
+ "siml": "⪝",
+ "simlE": "⪟",
+ "simne": "≆",
+ "simplus": "⨤",
+ "simrarr": "⥲",
+ "slarr": "←",
+ "smallsetminus": "∖",
+ "smashp": "⨳",
+ "smeparsl": "⧤",
+ "smid": "∣",
+ "smile": "⌣",
+ "smt": "⪪",
+ "smte": "⪬",
+ "smtes": "⪬︀",
+ "softcy": "ь",
+ "sol": "/",
+ "solb": "⧄",
+ "solbar": "⌿",
+ "sopf": "𝕤",
+ "spades": "♠",
+ "spadesuit": "♠",
+ "spar": "∥",
+ "sqcap": "⊓",
+ "sqcaps": "⊓︀",
+ "sqcup": "⊔",
+ "sqcups": "⊔︀",
+ "sqsub": "⊏",
+ "sqsube": "⊑",
+ "sqsubset": "⊏",
+ "sqsubseteq": "⊑",
+ "sqsup": "⊐",
+ "sqsupe": "⊒",
+ "sqsupset": "⊐",
+ "sqsupseteq": "⊒",
+ "squ": "□",
+ "square": "□",
+ "squarf": "▪",
+ "squf": "▪",
+ "srarr": "→",
+ "sscr": "𝓈",
+ "ssetmn": "∖",
+ "ssmile": "⌣",
+ "sstarf": "⋆",
+ "star": "☆",
+ "starf": "★",
+ "straightepsilon": "ϵ",
+ "straightphi": "ϕ",
+ "strns": "¯",
+ "sub": "⊂",
+ "subE": "⫅",
+ "subdot": "⪽",
+ "sube": "⊆",
+ "subedot": "⫃",
+ "submult": "⫁",
+ "subnE": "⫋",
+ "subne": "⊊",
+ "subplus": "⪿",
+ "subrarr": "⥹",
+ "subset": "⊂",
+ "subseteq": "⊆",
+ "subseteqq": "⫅",
+ "subsetneq": "⊊",
+ "subsetneqq": "⫋",
+ "subsim": "⫇",
+ "subsub": "⫕",
+ "subsup": "⫓",
+ "succ": "≻",
+ "succapprox": "⪸",
+ "succcurlyeq": "≽",
+ "succeq": "⪰",
+ "succnapprox": "⪺",
+ "succneqq": "⪶",
+ "succnsim": "⋩",
+ "succsim": "≿",
+ "sum": "∑",
+ "sung": "♪",
+ "sup": "⊃",
+ "sup1": "¹",
+ "sup2": "²",
+ "sup3": "³",
+ "supE": "⫆",
+ "supdot": "⪾",
+ "supdsub": "⫘",
+ "supe": "⊇",
+ "supedot": "⫄",
+ "suphsol": "⟉",
+ "suphsub": "⫗",
+ "suplarr": "⥻",
+ "supmult": "⫂",
+ "supnE": "⫌",
+ "supne": "⊋",
+ "supplus": "⫀",
+ "supset": "⊃",
+ "supseteq": "⊇",
+ "supseteqq": "⫆",
+ "supsetneq": "⊋",
+ "supsetneqq": "⫌",
+ "supsim": "⫈",
+ "supsub": "⫔",
+ "supsup": "⫖",
+ "swArr": "⇙",
+ "swarhk": "⤦",
+ "swarr": "↙",
+ "swarrow": "↙",
+ "swnwar": "⤪",
+ "szli": "ß",
+ "szlig": "ß",
+ "target": "⌖",
+ "tau": "τ",
+ "tbrk": "⎴",
+ "tcaron": "ť",
+ "tcedil": "ţ",
+ "tcy": "т",
+ "tdot": "⃛",
+ "telrec": "⌕",
+ "tfr": "𝔱",
+ "there4": "∴",
+ "therefore": "∴",
+ "theta": "θ",
+ "thetasym": "ϑ",
+ "thetav": "ϑ",
+ "thickapprox": "≈",
+ "thicksim": "∼",
+ "thinsp": " ",
+ "thkap": "≈",
+ "thksim": "∼",
+ "thor": "þ",
+ "thorn": "þ",
+ "tilde": "˜",
+ "time": "×",
+ "times": "×",
+ "timesb": "⊠",
+ "timesbar": "⨱",
+ "timesd": "⨰",
+ "tint": "∭",
+ "toea": "⤨",
+ "top": "⊤",
+ "topbot": "⌶",
+ "topcir": "⫱",
+ "topf": "𝕥",
+ "topfork": "⫚",
+ "tosa": "⤩",
+ "tprime": "‴",
+ "trade": "™",
+ "triangle": "▵",
+ "triangledown": "▿",
+ "triangleleft": "◃",
+ "trianglelefteq": "⊴",
+ "triangleq": "≜",
+ "triangleright": "▹",
+ "trianglerighteq": "⊵",
+ "tridot": "◬",
+ "trie": "≜",
+ "triminus": "⨺",
+ "triplus": "⨹",
+ "trisb": "⧍",
+ "tritime": "⨻",
+ "trpezium": "⏢",
+ "tscr": "𝓉",
+ "tscy": "ц",
+ "tshcy": "ћ",
+ "tstrok": "ŧ",
+ "twixt": "≬",
+ "twoheadleftarrow": "↞",
+ "twoheadrightarrow": "↠",
+ "uArr": "⇑",
+ "uHar": "⥣",
+ "uacut": "ú",
+ "uacute": "ú",
+ "uarr": "↑",
+ "ubrcy": "ў",
+ "ubreve": "ŭ",
+ "ucir": "û",
+ "ucirc": "û",
+ "ucy": "у",
+ "udarr": "⇅",
+ "udblac": "ű",
+ "udhar": "⥮",
+ "ufisht": "⥾",
+ "ufr": "𝔲",
+ "ugrav": "ù",
+ "ugrave": "ù",
+ "uharl": "↿",
+ "uharr": "↾",
+ "uhblk": "▀",
+ "ulcorn": "⌜",
+ "ulcorner": "⌜",
+ "ulcrop": "⌏",
+ "ultri": "◸",
+ "umacr": "ū",
+ "um": "¨",
+ "uml": "¨",
+ "uogon": "ų",
+ "uopf": "𝕦",
+ "uparrow": "↑",
+ "updownarrow": "↕",
+ "upharpoonleft": "↿",
+ "upharpoonright": "↾",
+ "uplus": "⊎",
+ "upsi": "υ",
+ "upsih": "ϒ",
+ "upsilon": "υ",
+ "upuparrows": "⇈",
+ "urcorn": "⌝",
+ "urcorner": "⌝",
+ "urcrop": "⌎",
+ "uring": "ů",
+ "urtri": "◹",
+ "uscr": "𝓊",
+ "utdot": "⋰",
+ "utilde": "ũ",
+ "utri": "▵",
+ "utrif": "▴",
+ "uuarr": "⇈",
+ "uum": "ü",
+ "uuml": "ü",
+ "uwangle": "⦧",
+ "vArr": "⇕",
+ "vBar": "⫨",
+ "vBarv": "⫩",
+ "vDash": "⊨",
+ "vangrt": "⦜",
+ "varepsilon": "ϵ",
+ "varkappa": "ϰ",
+ "varnothing": "∅",
+ "varphi": "ϕ",
+ "varpi": "ϖ",
+ "varpropto": "∝",
+ "varr": "↕",
+ "varrho": "ϱ",
+ "varsigma": "ς",
+ "varsubsetneq": "⊊︀",
+ "varsubsetneqq": "⫋︀",
+ "varsupsetneq": "⊋︀",
+ "varsupsetneqq": "⫌︀",
+ "vartheta": "ϑ",
+ "vartriangleleft": "⊲",
+ "vartriangleright": "⊳",
+ "vcy": "в",
+ "vdash": "⊢",
+ "vee": "∨",
+ "veebar": "⊻",
+ "veeeq": "≚",
+ "vellip": "⋮",
+ "verbar": "|",
+ "vert": "|",
+ "vfr": "𝔳",
+ "vltri": "⊲",
+ "vnsub": "⊂⃒",
+ "vnsup": "⊃⃒",
+ "vopf": "𝕧",
+ "vprop": "∝",
+ "vrtri": "⊳",
+ "vscr": "𝓋",
+ "vsubnE": "⫋︀",
+ "vsubne": "⊊︀",
+ "vsupnE": "⫌︀",
+ "vsupne": "⊋︀",
+ "vzigzag": "⦚",
+ "wcirc": "ŵ",
+ "wedbar": "⩟",
+ "wedge": "∧",
+ "wedgeq": "≙",
+ "weierp": "℘",
+ "wfr": "𝔴",
+ "wopf": "𝕨",
+ "wp": "℘",
+ "wr": "≀",
+ "wreath": "≀",
+ "wscr": "𝓌",
+ "xcap": "⋂",
+ "xcirc": "◯",
+ "xcup": "⋃",
+ "xdtri": "▽",
+ "xfr": "𝔵",
+ "xhArr": "⟺",
+ "xharr": "⟷",
+ "xi": "ξ",
+ "xlArr": "⟸",
+ "xlarr": "⟵",
+ "xmap": "⟼",
+ "xnis": "⋻",
+ "xodot": "⨀",
+ "xopf": "𝕩",
+ "xoplus": "⨁",
+ "xotime": "⨂",
+ "xrArr": "⟹",
+ "xrarr": "⟶",
+ "xscr": "𝓍",
+ "xsqcup": "⨆",
+ "xuplus": "⨄",
+ "xutri": "△",
+ "xvee": "⋁",
+ "xwedge": "⋀",
+ "yacut": "ý",
+ "yacute": "ý",
+ "yacy": "я",
+ "ycirc": "ŷ",
+ "ycy": "ы",
+ "ye": "¥",
+ "yen": "¥",
+ "yfr": "𝔶",
+ "yicy": "ї",
+ "yopf": "𝕪",
+ "yscr": "𝓎",
+ "yucy": "ю",
+ "yum": "ÿ",
+ "yuml": "ÿ",
+ "zacute": "ź",
+ "zcaron": "ž",
+ "zcy": "з",
+ "zdot": "ż",
+ "zeetrf": "ℨ",
+ "zeta": "ζ",
+ "zfr": "𝔷",
+ "zhcy": "ж",
+ "zigrarr": "⇝",
+ "zopf": "𝕫",
+ "zscr": "𝓏",
+ "zwj": "‍",
+ "zwnj": "‌"
+}
diff --git a/tools/node_modules/eslint/node_modules/character-entities/package.json b/tools/node_modules/eslint/node_modules/character-entities/package.json
new file mode 100644
index 0000000000..f5f442c930
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/character-entities/package.json
@@ -0,0 +1,97 @@
+{
+ "_from": "character-entities@^1.0.0",
+ "_id": "character-entities@1.2.1",
+ "_inBundle": false,
+ "_integrity": "sha1-92hxvl72bdt/j440eOzDdMJ9bco=",
+ "_location": "/character-entities",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "character-entities@^1.0.0",
+ "name": "character-entities",
+ "escapedName": "character-entities",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/parse-entities"
+ ],
+ "_resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.1.tgz",
+ "_shasum": "f76871be5ef66ddb7f8f8e3478ecc374c27d6dca",
+ "_spec": "character-entities@^1.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/parse-entities",
+ "author": {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ },
+ "bugs": {
+ "url": "https://github.com/wooorm/character-entities/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ }
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "HTML character entity information",
+ "devDependencies": {
+ "bail": "^1.0.1",
+ "browserify": "^14.0.0",
+ "concat-stream": "^1.5.2",
+ "esmangle": "^1.0.1",
+ "remark-cli": "^3.0.0",
+ "remark-preset-wooorm": "^3.0.0",
+ "tape": "^4.0.0",
+ "xo": "^0.18.0"
+ },
+ "files": [
+ "index.json"
+ ],
+ "homepage": "https://github.com/wooorm/character-entities#readme",
+ "keywords": [
+ "html",
+ "entity",
+ "entities",
+ "character",
+ "reference",
+ "name",
+ "replacement"
+ ],
+ "license": "MIT",
+ "main": "index.json",
+ "name": "character-entities",
+ "remarkConfig": {
+ "plugins": [
+ "preset-wooorm"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/wooorm/character-entities.git"
+ },
+ "scripts": {
+ "build": "npm run build-md && npm run build-generate && npm run build-bundle && npm run build-mangle",
+ "build-bundle": "browserify index.json --bare -s characterEntities > character-entities.js",
+ "build-generate": "node build",
+ "build-mangle": "esmangle character-entities.js > character-entities.min.js",
+ "build-md": "remark . -qfo",
+ "lint": "xo",
+ "test": "npm run build && npm run lint && npm run test-api",
+ "test-api": "node test"
+ },
+ "version": "1.2.1",
+ "xo": {
+ "space": true,
+ "esnext": false,
+ "ignores": [
+ "character-entities.js"
+ ]
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/character-entities/readme.md b/tools/node_modules/eslint/node_modules/character-entities/readme.md
new file mode 100644
index 0000000000..c1c2fd1abb
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/character-entities/readme.md
@@ -0,0 +1,58 @@
+# character-entities [![Build Status][travis-badge]][travis]
+
+HTML character entity information.
+
+## Installation
+
+[npm][]:
+
+```bash
+npm install character-entities
+```
+
+## Usage
+
+```js
+console.log(characterEntities.AElig); //=> 'Æ'
+console.log(characterEntities.aelig); //=> 'æ'
+console.log(characterEntities.amp); //=> '&'
+```
+
+## API
+
+### characterEntities
+
+Mapping between (case-sensitive) character entity names to replacements.
+
+## Support
+
+See [html.spec.whatwg.org][html].
+
+## Related
+
+* [`character-entities-html4`](https://github.com/wooorm/character-entities-html4)
+ — HTML 4 character entity info
+* [`character-entities-legacy`](https://github.com/wooorm/character-entities-legacy)
+ — Legacy character entity info
+* [`parse-entities`](https://github.com/wooorm/parse-entities)
+ — Parse HTML character references
+* [`stringify-entities`](https://github.com/wooorm/stringify-entities)
+ — Stringify HTML character references
+
+## License
+
+[MIT][license] © [Titus Wormer][author]
+
+<!-- Definitions -->
+
+[travis-badge]: https://img.shields.io/travis/wooorm/character-entities.svg
+
+[travis]: https://travis-ci.org/wooorm/character-entities
+
+[npm]: https://docs.npmjs.com/cli/install
+
+[license]: LICENSE
+
+[author]: http://wooorm.com
+
+[html]: https://html.spec.whatwg.org/multipage/syntax.html#named-character-references
diff --git a/tools/node_modules/eslint/node_modules/character-reference-invalid/LICENSE b/tools/node_modules/eslint/node_modules/character-reference-invalid/LICENSE
new file mode 100644
index 0000000000..32e7a3d93c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/character-reference-invalid/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2015 Titus Wormer <tituswormer@gmail.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/tools/node_modules/eslint/node_modules/character-reference-invalid/index.json b/tools/node_modules/eslint/node_modules/character-reference-invalid/index.json
new file mode 100644
index 0000000000..9337a854e4
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/character-reference-invalid/index.json
@@ -0,0 +1,30 @@
+{
+ "0": "�",
+ "128": "€",
+ "130": "‚",
+ "131": "ƒ",
+ "132": "„",
+ "133": "…",
+ "134": "†",
+ "135": "‡",
+ "136": "ˆ",
+ "137": "‰",
+ "138": "Š",
+ "139": "‹",
+ "140": "Œ",
+ "142": "Ž",
+ "145": "‘",
+ "146": "’",
+ "147": "“",
+ "148": "”",
+ "149": "•",
+ "150": "–",
+ "151": "—",
+ "152": "˜",
+ "153": "™",
+ "154": "š",
+ "155": "›",
+ "156": "œ",
+ "158": "ž",
+ "159": "Ÿ"
+}
diff --git a/tools/node_modules/eslint/node_modules/character-reference-invalid/package.json b/tools/node_modules/eslint/node_modules/character-reference-invalid/package.json
new file mode 100644
index 0000000000..525d7624df
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/character-reference-invalid/package.json
@@ -0,0 +1,105 @@
+{
+ "_from": "character-reference-invalid@^1.0.0",
+ "_id": "character-reference-invalid@1.1.1",
+ "_inBundle": false,
+ "_integrity": "sha1-lCg191Dk7GGjCOYMLvjMEBEgLvw=",
+ "_location": "/character-reference-invalid",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "character-reference-invalid@^1.0.0",
+ "name": "character-reference-invalid",
+ "escapedName": "character-reference-invalid",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/parse-entities"
+ ],
+ "_resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.1.tgz",
+ "_shasum": "942835f750e4ec61a308e60c2ef8cc1011202efc",
+ "_spec": "character-reference-invalid@^1.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/parse-entities",
+ "author": {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ },
+ "bugs": {
+ "url": "https://github.com/wooorm/character-reference-invalid/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ }
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "HTML invalid numeric character reference information",
+ "devDependencies": {
+ "bail": "^1.0.1",
+ "browserify": "^14.0.0",
+ "concat-stream": "^1.6.0",
+ "esmangle": "^1.0.1",
+ "hast-util-select": "^1.0.1",
+ "hast-util-to-string": "^1.0.0",
+ "rehype-parse": "^4.0.0",
+ "remark-cli": "^3.0.0",
+ "remark-preset-wooorm": "^3.0.0",
+ "tape": "^4.0.0",
+ "unified": "^6.1.5",
+ "xo": "^0.18.0"
+ },
+ "files": [
+ "index.json"
+ ],
+ "homepage": "https://github.com/wooorm/character-reference-invalid#readme",
+ "keywords": [
+ "html",
+ "entity",
+ "numeric",
+ "character",
+ "reference",
+ "replacement",
+ "invalid",
+ "name"
+ ],
+ "license": "MIT",
+ "main": "index.json",
+ "name": "character-reference-invalid",
+ "remarkConfig": {
+ "plugins": [
+ "preset-wooorm"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/wooorm/character-reference-invalid.git"
+ },
+ "scripts": {
+ "build": "npm run build-generate && npm run build-md && npm run build-bundle && npm run build-mangle",
+ "build-bundle": "browserify index.json --bare -s characterReferenceInvalid > character-reference-invalid.js",
+ "build-generate": "node build",
+ "build-mangle": "esmangle character-reference-invalid.js > character-reference-invalid.min.js",
+ "build-md": "remark . -qfo",
+ "lint": "xo",
+ "test": "npm run build && npm run lint && npm run test-api",
+ "test-api": "node test"
+ },
+ "version": "1.1.1",
+ "xo": {
+ "space": true,
+ "esnext": false,
+ "rules": {
+ "guard-for-in": "off"
+ },
+ "ignores": [
+ "character-reference-invalid.js"
+ ]
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/character-reference-invalid/readme.md b/tools/node_modules/eslint/node_modules/character-reference-invalid/readme.md
new file mode 100644
index 0000000000..487c61de5f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/character-reference-invalid/readme.md
@@ -0,0 +1,60 @@
+# character-reference-invalid [![Build Status][travis-badge]][travis]
+
+HTML invalid numeric character reference information.
+
+## Installation
+
+[npm][]:
+
+```bash
+npm install character-reference-invalid
+```
+
+## Usage
+
+```js
+console.log(characterReferenceInvalid[0x80]); //=> '€'
+console.log(characterReferenceInvalid[0x89]); //=> '‰'
+console.log(characterReferenceInvalid[0x99]); //=> '™'
+```
+
+## API
+
+### `characterReferenceInvalid`
+
+Mapping between invalid numeric character reference to replacements.
+
+## Support
+
+See [html.spec.whatwg.org][html].
+
+## Related
+
+* [`character-entities`](https://github.com/wooorm/character-entities)
+ — HTML character entity info
+* [`character-entities-html4`](https://github.com/wooorm/character-entities-html4)
+ — HTML 4 character entity info
+* [`character-entities-legacy`](https://github.com/wooorm/character-entities-legacy)
+ — Legacy character entity info
+* [`parse-entities`](https://github.com/wooorm/parse-entities)
+ — Parse HTML character references
+* [`stringify-entities`](https://github.com/wooorm/stringify-entities)
+ — Stringify HTML character references
+
+## License
+
+[MIT][license] © [Titus Wormer][author]
+
+<!-- Definitions -->
+
+[travis-badge]: https://img.shields.io/travis/wooorm/character-reference-invalid.svg
+
+[travis]: https://travis-ci.org/wooorm/character-reference-invalid
+
+[npm]: https://docs.npmjs.com/cli/install
+
+[license]: LICENSE
+
+[author]: http://wooorm.com
+
+[html]: https://html.spec.whatwg.org/multipage/syntax.html#table-charref-overrides
diff --git a/tools/node_modules/eslint/node_modules/chardet/LICENSE b/tools/node_modules/eslint/node_modules/chardet/LICENSE
new file mode 100644
index 0000000000..722e25c77d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/chardet/LICENSE
@@ -0,0 +1,19 @@
+Copyright (C) 2017 Dmitry Shirokov
+
+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/tools/node_modules/eslint/node_modules/chardet/README.md b/tools/node_modules/eslint/node_modules/chardet/README.md
new file mode 100644
index 0000000000..7ca84e35e1
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/chardet/README.md
@@ -0,0 +1,66 @@
+
+chardet [![Build Status](https://travis-ci.org/runk/node-chardet.png)](https://travis-ci.org/runk/node-chardet)
+=====
+
+Chardet is a character detection module for NodeJS written in pure Javascript.
+Module is based on ICU project http://site.icu-project.org/, which uses character
+occurency analysis to determine the most probable encoding.
+
+## Installation
+
+```
+npm i chardet
+```
+
+## Usage
+
+```javascript
+var chardet = require('chardet');
+chardet.detect(new Buffer('hello there!'));
+// or
+chardet.detectFile('/path/to/file', function(err, encoding) {});
+// or
+chardet.detectFileSync('/path/to/file');
+```
+
+## Working with large data sets
+
+Sometimes, when data set is huge and you want to optimize performace (in tradeoff of less accuracy),
+you can sample only first N bytes of the buffer:
+
+```javascript
+chardet.detectFile('/path/to/file', { sampleSize: 32 }, function(err, encoding) {});
+```
+
+## Supported Encodings:
+
+* UTF-8
+* UTF-16 LE
+* UTF-16 BE
+* UTF-32 LE
+* UTF-32 BE
+* ISO-2022-JP
+* ISO-2022-KR
+* ISO-2022-CN
+* Shift-JIS
+* Big5
+* EUC-JP
+* EUC-KR
+* GB18030
+* ISO-8859-1
+* ISO-8859-2
+* ISO-8859-5
+* ISO-8859-6
+* ISO-8859-7
+* ISO-8859-8
+* ISO-8859-9
+* windows-1250
+* windows-1251
+* windows-1252
+* windows-1253
+* windows-1254
+* windows-1255
+* windows-1256
+* KOI8-R
+
+Currently only these encodings are supported, more will be added soon.
diff --git a/tools/node_modules/eslint/node_modules/chardet/encoding/iso2022.js b/tools/node_modules/eslint/node_modules/chardet/encoding/iso2022.js
new file mode 100644
index 0000000000..afff88aec4
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/chardet/encoding/iso2022.js
@@ -0,0 +1,141 @@
+var util = require('util'),
+ Match = require ('../match');
+
+
+/**
+ * This is a superclass for the individual detectors for
+ * each of the detectable members of the ISO 2022 family
+ * of encodings.
+ */
+
+function ISO_2022() {}
+
+ISO_2022.prototype.match = function(det) {
+
+ /**
+ * Matching function shared among the 2022 detectors JP, CN and KR
+ * Counts up the number of legal an unrecognized escape sequences in
+ * the sample of text, and computes a score based on the total number &
+ * the proportion that fit the encoding.
+ *
+ *
+ * @param text the byte buffer containing text to analyse
+ * @param textLen the size of the text in the byte.
+ * @param escapeSequences the byte escape sequences to test for.
+ * @return match quality, in the range of 0-100.
+ */
+
+ var i, j;
+ var escN;
+ var hits = 0;
+ var misses = 0;
+ var shifts = 0;
+ var quality;
+
+ // TODO: refactor me
+ var text = det.fInputBytes;
+ var textLen = det.fInputLen;
+
+ scanInput:
+ for (i = 0; i < textLen; i++) {
+ if (text[i] == 0x1b) {
+ checkEscapes:
+ for (escN = 0; escN < this.escapeSequences.length; escN++) {
+ var seq = this.escapeSequences[escN];
+
+ if ((textLen - i) < seq.length)
+ continue checkEscapes;
+
+ for (j = 1; j < seq.length; j++)
+ if (seq[j] != text[i + j])
+ continue checkEscapes;
+
+
+ hits++;
+ i += seq.length - 1;
+ continue scanInput;
+ }
+
+ misses++;
+ }
+
+ // Shift in/out
+ if (text[i] == 0x0e || text[i] == 0x0f)
+ shifts++;
+
+ }
+
+ if (hits == 0)
+ return null;
+
+ //
+ // Initial quality is based on relative proportion of recongized vs.
+ // unrecognized escape sequences.
+ // All good: quality = 100;
+ // half or less good: quality = 0;
+ // linear inbetween.
+ quality = (100 * hits - 100 * misses) / (hits + misses);
+
+ // Back off quality if there were too few escape sequences seen.
+ // Include shifts in this computation, so that KR does not get penalized
+ // for having only a single Escape sequence, but many shifts.
+ if (hits + shifts < 5)
+ quality -= (5 - (hits + shifts)) * 10;
+
+ return quality <= 0 ? null : new Match(det, this, quality);
+};
+
+module.exports.ISO_2022_JP = function() {
+ this.name = function() {
+ return 'ISO-2022-JP';
+ };
+ this.escapeSequences = [
+ [ 0x1b, 0x24, 0x28, 0x43 ], // KS X 1001:1992
+ [ 0x1b, 0x24, 0x28, 0x44 ], // JIS X 212-1990
+ [ 0x1b, 0x24, 0x40 ], // JIS C 6226-1978
+ [ 0x1b, 0x24, 0x41 ], // GB 2312-80
+ [ 0x1b, 0x24, 0x42 ], // JIS X 208-1983
+ [ 0x1b, 0x26, 0x40 ], // JIS X 208 1990, 1997
+ [ 0x1b, 0x28, 0x42 ], // ASCII
+ [ 0x1b, 0x28, 0x48 ], // JIS-Roman
+ [ 0x1b, 0x28, 0x49 ], // Half-width katakana
+ [ 0x1b, 0x28, 0x4a ], // JIS-Roman
+ [ 0x1b, 0x2e, 0x41 ], // ISO 8859-1
+ [ 0x1b, 0x2e, 0x46 ] // ISO 8859-7
+ ];
+};
+util.inherits(module.exports.ISO_2022_JP, ISO_2022);
+
+
+
+module.exports.ISO_2022_KR = function() {
+ this.name = function() {
+ return 'ISO-2022-KR';
+ };
+ this.escapeSequences = [
+ [ 0x1b, 0x24, 0x29, 0x43 ]
+ ];
+};
+util.inherits(module.exports.ISO_2022_KR, ISO_2022);
+
+
+
+module.exports.ISO_2022_CN = function() {
+ this.name = function() {
+ return 'ISO-2022-CN';
+ };
+ this.escapeSequences = [
+ [ 0x1b, 0x24, 0x29, 0x41 ], // GB 2312-80
+ [ 0x1b, 0x24, 0x29, 0x47 ], // CNS 11643-1992 Plane 1
+ [ 0x1b, 0x24, 0x2A, 0x48 ], // CNS 11643-1992 Plane 2
+ [ 0x1b, 0x24, 0x29, 0x45 ], // ISO-IR-165
+ [ 0x1b, 0x24, 0x2B, 0x49 ], // CNS 11643-1992 Plane 3
+ [ 0x1b, 0x24, 0x2B, 0x4A ], // CNS 11643-1992 Plane 4
+ [ 0x1b, 0x24, 0x2B, 0x4B ], // CNS 11643-1992 Plane 5
+ [ 0x1b, 0x24, 0x2B, 0x4C ], // CNS 11643-1992 Plane 6
+ [ 0x1b, 0x24, 0x2B, 0x4D ], // CNS 11643-1992 Plane 7
+ [ 0x1b, 0x4e ], // SS2
+ [ 0x1b, 0x4f ] // SS3
+ ];
+};
+util.inherits(module.exports.ISO_2022_CN, ISO_2022);
diff --git a/tools/node_modules/eslint/node_modules/chardet/encoding/mbcs.js b/tools/node_modules/eslint/node_modules/chardet/encoding/mbcs.js
new file mode 100644
index 0000000000..5aa1557be4
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/chardet/encoding/mbcs.js
@@ -0,0 +1,502 @@
+var util = require('util'),
+ Match = require ('../match');
+
+/**
+ * Binary search implementation (recursive)
+ */
+function binarySearch(arr, searchValue) {
+ function find(arr, searchValue, left, right) {
+ if (right < left)
+ return -1;
+
+ /*
+ int mid = mid = (left + right) / 2;
+ There is a bug in the above line;
+ Joshua Bloch suggests the following replacement:
+ */
+ var mid = Math.floor((left + right) >>> 1);
+ if (searchValue > arr[mid])
+ return find(arr, searchValue, mid + 1, right);
+
+ if (searchValue < arr[mid])
+ return find(arr, searchValue, left, mid - 1);
+
+ return mid;
+ };
+
+ return find(arr, searchValue, 0, arr.length - 1);
+};
+
+// 'Character' iterated character class.
+// Recognizers for specific mbcs encodings make their 'characters' available
+// by providing a nextChar() function that fills in an instance of iteratedChar
+// with the next char from the input.
+// The returned characters are not converted to Unicode, but remain as the raw
+// bytes (concatenated into an int) from the codepage data.
+//
+// For Asian charsets, use the raw input rather than the input that has been
+// stripped of markup. Detection only considers multi-byte chars, effectively
+// stripping markup anyway, and double byte chars do occur in markup too.
+//
+function IteratedChar() {
+
+ this.charValue = 0; // 1-4 bytes from the raw input data
+ this.index = 0;
+ this.nextIndex = 0;
+ this.error = false;
+ this.done = false;
+
+ this.reset = function() {
+ this.charValue = 0;
+ this.index = -1;
+ this.nextIndex = 0;
+ this.error = false;
+ this.done = false;
+ };
+
+ this.nextByte = function(det) {
+ if (this.nextIndex >= det.fRawLength) {
+ this.done = true;
+ return -1;
+ }
+ var byteValue = det.fRawInput[this.nextIndex++] & 0x00ff;
+ return byteValue;
+ };
+};
+
+
+
+/**
+ * Asian double or multi-byte - charsets.
+ * Match is determined mostly by the input data adhering to the
+ * encoding scheme for the charset, and, optionally,
+ * frequency-of-occurence of characters.
+ */
+
+function mbcs() {};
+
+/**
+ * Test the match of this charset with the input text data
+ * which is obtained via the CharsetDetector object.
+ *
+ * @param det The CharsetDetector, which contains the input text
+ * to be checked for being in this charset.
+ * @return Two values packed into one int (Damn java, anyhow)
+ * bits 0-7: the match confidence, ranging from 0-100
+ * bits 8-15: The match reason, an enum-like value.
+ */
+mbcs.prototype.match = function(det) {
+
+ var singleByteCharCount = 0, //TODO Do we really need this?
+ doubleByteCharCount = 0,
+ commonCharCount = 0,
+ badCharCount = 0,
+ totalCharCount = 0,
+ confidence = 0;
+
+ var iter = new IteratedChar();
+
+ detectBlock: {
+ for (iter.reset(); this.nextChar(iter, det);) {
+ totalCharCount++;
+ if (iter.error) {
+ badCharCount++;
+ } else {
+ var cv = iter.charValue & 0xFFFFFFFF;
+
+ if (cv <= 0xff) {
+ singleByteCharCount++;
+ } else {
+ doubleByteCharCount++;
+ if (this.commonChars != null) {
+ // NOTE: This assumes that there are no 4-byte common chars.
+ if (binarySearch(this.commonChars, cv) >= 0) {
+ commonCharCount++;
+ }
+ }
+ }
+ }
+ if (badCharCount >= 2 && badCharCount * 5 >= doubleByteCharCount) {
+ // console.log('its here!')
+ // Bail out early if the byte data is not matching the encoding scheme.
+ break detectBlock;
+ }
+ }
+
+ if (doubleByteCharCount <= 10 && badCharCount== 0) {
+ // Not many multi-byte chars.
+ if (doubleByteCharCount == 0 && totalCharCount < 10) {
+ // There weren't any multibyte sequences, and there was a low density of non-ASCII single bytes.
+ // We don't have enough data to have any confidence.
+ // Statistical analysis of single byte non-ASCII charcters would probably help here.
+ confidence = 0;
+ }
+ else {
+ // ASCII or ISO file? It's probably not our encoding,
+ // but is not incompatible with our encoding, so don't give it a zero.
+ confidence = 10;
+ }
+ break detectBlock;
+ }
+
+ //
+ // No match if there are too many characters that don't fit the encoding scheme.
+ // (should we have zero tolerance for these?)
+ //
+ if (doubleByteCharCount < 20 * badCharCount) {
+ confidence = 0;
+ break detectBlock;
+ }
+
+ if (this.commonChars == null) {
+ // We have no statistics on frequently occuring characters.
+ // Assess confidence purely on having a reasonable number of
+ // multi-byte characters (the more the better
+ confidence = 30 + doubleByteCharCount - 20 * badCharCount;
+ if (confidence > 100) {
+ confidence = 100;
+ }
+ } else {
+ //
+ // Frequency of occurence statistics exist.
+ //
+ var maxVal = Math.log(parseFloat(doubleByteCharCount) / 4);
+ var scaleFactor = 90.0 / maxVal;
+ confidence = Math.floor(Math.log(commonCharCount + 1) * scaleFactor + 10);
+ confidence = Math.min(confidence, 100);
+ }
+ } // end of detectBlock:
+
+ return confidence == 0 ? null : new Match(det, this, confidence);
+};
+
+/**
+ * Get the next character (however many bytes it is) from the input data
+ * Subclasses for specific charset encodings must implement this function
+ * to get characters according to the rules of their encoding scheme.
+ *
+ * This function is not a method of class iteratedChar only because
+ * that would require a lot of extra derived classes, which is awkward.
+ * @param it The iteratedChar 'struct' into which the returned char is placed.
+ * @param det The charset detector, which is needed to get at the input byte data
+ * being iterated over.
+ * @return True if a character was returned, false at end of input.
+ */
+
+mbcs.prototype.nextChar = function(iter, det) {};
+
+
+
+/**
+ * Shift-JIS charset recognizer.
+ */
+module.exports.sjis = function() {
+ this.name = function() {
+ return 'Shift-JIS';
+ };
+ this.language = function() {
+ return 'ja';
+ };
+
+ // TODO: This set of data comes from the character frequency-
+ // of-occurence analysis tool. The data needs to be moved
+ // into a resource and loaded from there.
+ this.commonChars = [
+ 0x8140, 0x8141, 0x8142, 0x8145, 0x815b, 0x8169, 0x816a, 0x8175, 0x8176, 0x82a0,
+ 0x82a2, 0x82a4, 0x82a9, 0x82aa, 0x82ab, 0x82ad, 0x82af, 0x82b1, 0x82b3, 0x82b5,
+ 0x82b7, 0x82bd, 0x82be, 0x82c1, 0x82c4, 0x82c5, 0x82c6, 0x82c8, 0x82c9, 0x82cc,
+ 0x82cd, 0x82dc, 0x82e0, 0x82e7, 0x82e8, 0x82e9, 0x82ea, 0x82f0, 0x82f1, 0x8341,
+ 0x8343, 0x834e, 0x834f, 0x8358, 0x835e, 0x8362, 0x8367, 0x8375, 0x8376, 0x8389,
+ 0x838a, 0x838b, 0x838d, 0x8393, 0x8e96, 0x93fa, 0x95aa
+ ];
+
+ this.nextChar = function(iter, det) {
+ iter.index = iter.nextIndex;
+ iter.error = false;
+
+ var firstByte;
+ firstByte = iter.charValue = iter.nextByte(det);
+ if (firstByte < 0)
+ return false;
+
+ if (firstByte <= 0x7f || (firstByte > 0xa0 && firstByte <= 0xdf))
+ return true;
+
+ var secondByte = iter.nextByte(det);
+ if (secondByte < 0)
+ return false;
+
+ iter.charValue = (firstByte << 8) | secondByte;
+ if (! ((secondByte >= 0x40 && secondByte <= 0x7f) || (secondByte >= 0x80 && secondByte <= 0xff))) {
+ // Illegal second byte value.
+ iter.error = true;
+ }
+ return true;
+ };
+};
+util.inherits(module.exports.sjis, mbcs);
+
+
+
+/**
+ * Big5 charset recognizer.
+ */
+module.exports.big5 = function() {
+ this.name = function() {
+ return 'Big5';
+ };
+ this.language = function() {
+ return 'zh';
+ };
+ // TODO: This set of data comes from the character frequency-
+ // of-occurence analysis tool. The data needs to be moved
+ // into a resource and loaded from there.
+ this.commonChars = [
+ 0xa140, 0xa141, 0xa142, 0xa143, 0xa147, 0xa149, 0xa175, 0xa176, 0xa440, 0xa446,
+ 0xa447, 0xa448, 0xa451, 0xa454, 0xa457, 0xa464, 0xa46a, 0xa46c, 0xa477, 0xa4a3,
+ 0xa4a4, 0xa4a7, 0xa4c1, 0xa4ce, 0xa4d1, 0xa4df, 0xa4e8, 0xa4fd, 0xa540, 0xa548,
+ 0xa558, 0xa569, 0xa5cd, 0xa5e7, 0xa657, 0xa661, 0xa662, 0xa668, 0xa670, 0xa6a8,
+ 0xa6b3, 0xa6b9, 0xa6d3, 0xa6db, 0xa6e6, 0xa6f2, 0xa740, 0xa751, 0xa759, 0xa7da,
+ 0xa8a3, 0xa8a5, 0xa8ad, 0xa8d1, 0xa8d3, 0xa8e4, 0xa8fc, 0xa9c0, 0xa9d2, 0xa9f3,
+ 0xaa6b, 0xaaba, 0xaabe, 0xaacc, 0xaafc, 0xac47, 0xac4f, 0xacb0, 0xacd2, 0xad59,
+ 0xaec9, 0xafe0, 0xb0ea, 0xb16f, 0xb2b3, 0xb2c4, 0xb36f, 0xb44c, 0xb44e, 0xb54c,
+ 0xb5a5, 0xb5bd, 0xb5d0, 0xb5d8, 0xb671, 0xb7ed, 0xb867, 0xb944, 0xbad8, 0xbb44,
+ 0xbba1, 0xbdd1, 0xc2c4, 0xc3b9, 0xc440, 0xc45f
+ ];
+ this.nextChar = function(iter, det) {
+ iter.index = iter.nextIndex;
+ iter.error = false;
+
+ var firstByte = iter.charValue = iter.nextByte(det);
+
+ if (firstByte < 0)
+ return false;
+
+ // single byte character.
+ if (firstByte <= 0x7f || firstByte == 0xff)
+ return true;
+
+ var secondByte = iter.nextByte(det);
+
+ if (secondByte < 0)
+ return false;
+
+ iter.charValue = (iter.charValue << 8) | secondByte;
+
+ if (secondByte < 0x40 || secondByte == 0x7f || secondByte == 0xff)
+ iter.error = true;
+
+ return true;
+ };
+};
+util.inherits(module.exports.big5, mbcs);
+
+
+
+/**
+ * EUC charset recognizers. One abstract class that provides the common function
+ * for getting the next character according to the EUC encoding scheme,
+ * and nested derived classes for EUC_KR, EUC_JP, EUC_CN.
+ *
+ * Get the next character value for EUC based encodings.
+ * Character 'value' is simply the raw bytes that make up the character
+ * packed into an int.
+ */
+function eucNextChar(iter, det) {
+ iter.index = iter.nextIndex;
+ iter.error = false;
+ var firstByte = 0;
+ var secondByte = 0;
+ var thirdByte = 0;
+ //int fourthByte = 0;
+ buildChar: {
+ firstByte = iter.charValue = iter.nextByte(det);
+ if (firstByte < 0) {
+ // Ran off the end of the input data
+ iter.done = true;
+ break buildChar;
+ }
+ if (firstByte <= 0x8d) {
+ // single byte char
+ break buildChar;
+ }
+ secondByte = iter.nextByte(det);
+ iter.charValue = (iter.charValue << 8) | secondByte;
+ if (firstByte >= 0xA1 && firstByte <= 0xfe) {
+ // Two byte Char
+ if (secondByte < 0xa1) {
+ iter.error = true;
+ }
+ break buildChar;
+ }
+ if (firstByte == 0x8e) {
+ // Code Set 2.
+ // In EUC-JP, total char size is 2 bytes, only one byte of actual char value.
+ // In EUC-TW, total char size is 4 bytes, three bytes contribute to char value.
+ // We don't know which we've got.
+ // Treat it like EUC-JP. If the data really was EUC-TW, the following two
+ // bytes will look like a well formed 2 byte char.
+ if (secondByte < 0xa1) {
+ iter.error = true;
+ }
+ break buildChar;
+ }
+ if (firstByte == 0x8f) {
+ // Code set 3.
+ // Three byte total char size, two bytes of actual char value.
+ thirdByte = iter.nextByte(det);
+ iter.charValue = (iter.charValue << 8) | thirdByte;
+ if (thirdByte < 0xa1) {
+ iter.error = true;
+ }
+ }
+ }
+ return iter.done == false;
+};
+
+
+
+/**
+ * The charset recognize for EUC-JP. A singleton instance of this class
+ * is created and kept by the public CharsetDetector class
+ */
+module.exports.euc_jp = function() {
+ this.name = function() {
+ return 'EUC-JP';
+ };
+ this.language = function() {
+ return 'ja';
+ };
+
+ // TODO: This set of data comes from the character frequency-
+ // of-occurence analysis tool. The data needs to be moved
+ // into a resource and loaded from there.
+ this.commonChars = [
+ 0xa1a1, 0xa1a2, 0xa1a3, 0xa1a6, 0xa1bc, 0xa1ca, 0xa1cb, 0xa1d6, 0xa1d7, 0xa4a2,
+ 0xa4a4, 0xa4a6, 0xa4a8, 0xa4aa, 0xa4ab, 0xa4ac, 0xa4ad, 0xa4af, 0xa4b1, 0xa4b3,
+ 0xa4b5, 0xa4b7, 0xa4b9, 0xa4bb, 0xa4bd, 0xa4bf, 0xa4c0, 0xa4c1, 0xa4c3, 0xa4c4,
+ 0xa4c6, 0xa4c7, 0xa4c8, 0xa4c9, 0xa4ca, 0xa4cb, 0xa4ce, 0xa4cf, 0xa4d0, 0xa4de,
+ 0xa4df, 0xa4e1, 0xa4e2, 0xa4e4, 0xa4e8, 0xa4e9, 0xa4ea, 0xa4eb, 0xa4ec, 0xa4ef,
+ 0xa4f2, 0xa4f3, 0xa5a2, 0xa5a3, 0xa5a4, 0xa5a6, 0xa5a7, 0xa5aa, 0xa5ad, 0xa5af,
+ 0xa5b0, 0xa5b3, 0xa5b5, 0xa5b7, 0xa5b8, 0xa5b9, 0xa5bf, 0xa5c3, 0xa5c6, 0xa5c7,
+ 0xa5c8, 0xa5c9, 0xa5cb, 0xa5d0, 0xa5d5, 0xa5d6, 0xa5d7, 0xa5de, 0xa5e0, 0xa5e1,
+ 0xa5e5, 0xa5e9, 0xa5ea, 0xa5eb, 0xa5ec, 0xa5ed, 0xa5f3, 0xb8a9, 0xb9d4, 0xbaee,
+ 0xbbc8, 0xbef0, 0xbfb7, 0xc4ea, 0xc6fc, 0xc7bd, 0xcab8, 0xcaf3, 0xcbdc, 0xcdd1
+ ];
+
+ this.nextChar = eucNextChar;
+};
+util.inherits(module.exports.euc_jp, mbcs);
+
+
+
+/**
+ * The charset recognize for EUC-KR. A singleton instance of this class
+ * is created and kept by the public CharsetDetector class
+ */
+module.exports.euc_kr = function() {
+ this.name = function() {
+ return 'EUC-KR';
+ };
+ this.language = function() {
+ return 'ko';
+ };
+
+ // TODO: This set of data comes from the character frequency-
+ // of-occurence analysis tool. The data needs to be moved
+ // into a resource and loaded from there.
+ this.commonChars = [
+ 0xb0a1, 0xb0b3, 0xb0c5, 0xb0cd, 0xb0d4, 0xb0e6, 0xb0ed, 0xb0f8, 0xb0fa, 0xb0fc,
+ 0xb1b8, 0xb1b9, 0xb1c7, 0xb1d7, 0xb1e2, 0xb3aa, 0xb3bb, 0xb4c2, 0xb4cf, 0xb4d9,
+ 0xb4eb, 0xb5a5, 0xb5b5, 0xb5bf, 0xb5c7, 0xb5e9, 0xb6f3, 0xb7af, 0xb7c2, 0xb7ce,
+ 0xb8a6, 0xb8ae, 0xb8b6, 0xb8b8, 0xb8bb, 0xb8e9, 0xb9ab, 0xb9ae, 0xb9cc, 0xb9ce,
+ 0xb9fd, 0xbab8, 0xbace, 0xbad0, 0xbaf1, 0xbbe7, 0xbbf3, 0xbbfd, 0xbcad, 0xbcba,
+ 0xbcd2, 0xbcf6, 0xbdba, 0xbdc0, 0xbdc3, 0xbdc5, 0xbec6, 0xbec8, 0xbedf, 0xbeee,
+ 0xbef8, 0xbefa, 0xbfa1, 0xbfa9, 0xbfc0, 0xbfe4, 0xbfeb, 0xbfec, 0xbff8, 0xc0a7,
+ 0xc0af, 0xc0b8, 0xc0ba, 0xc0bb, 0xc0bd, 0xc0c7, 0xc0cc, 0xc0ce, 0xc0cf, 0xc0d6,
+ 0xc0da, 0xc0e5, 0xc0fb, 0xc0fc, 0xc1a4, 0xc1a6, 0xc1b6, 0xc1d6, 0xc1df, 0xc1f6,
+ 0xc1f8, 0xc4a1, 0xc5cd, 0xc6ae, 0xc7cf, 0xc7d1, 0xc7d2, 0xc7d8, 0xc7e5, 0xc8ad
+ ];
+
+ this.nextChar = eucNextChar;
+};
+util.inherits(module.exports.euc_kr, mbcs);
+
+
+
+/**
+ * GB-18030 recognizer. Uses simplified Chinese statistics.
+ */
+module.exports.gb_18030 = function() {
+ this.name = function() {
+ return 'GB18030';
+ };
+ this.language = function() {
+ return 'zh';
+ };
+
+ /*
+ * Get the next character value for EUC based encodings.
+ * Character 'value' is simply the raw bytes that make up the character
+ * packed into an int.
+ */
+ this.nextChar = function(iter, det) {
+ iter.index = iter.nextIndex;
+ iter.error = false;
+ var firstByte = 0;
+ var secondByte = 0;
+ var thirdByte = 0;
+ var fourthByte = 0;
+ buildChar: {
+ firstByte = iter.charValue = iter.nextByte(det);
+ if (firstByte < 0) {
+ // Ran off the end of the input data
+ iter.done = true;
+ break buildChar;
+ }
+ if (firstByte <= 0x80) {
+ // single byte char
+ break buildChar;
+ }
+ secondByte = iter.nextByte(det);
+ iter.charValue = (iter.charValue << 8) | secondByte;
+ if (firstByte >= 0x81 && firstByte <= 0xFE) {
+ // Two byte Char
+ if ((secondByte >= 0x40 && secondByte <= 0x7E) || (secondByte >=80 && secondByte <= 0xFE)) {
+ break buildChar;
+ }
+ // Four byte char
+ if (secondByte >= 0x30 && secondByte <= 0x39) {
+ thirdByte = iter.nextByte(det);
+ if (thirdByte >= 0x81 && thirdByte <= 0xFE) {
+ fourthByte = iter.nextByte(det);
+ if (fourthByte >= 0x30 && fourthByte <= 0x39) {
+ iter.charValue = (iter.charValue << 16) | (thirdByte << 8) | fourthByte;
+ break buildChar;
+ }
+ }
+ }
+ iter.error = true;
+ break buildChar;
+ }
+ }
+ return iter.done == false;
+ };
+
+ // TODO: This set of data comes from the character frequency-
+ // of-occurence analysis tool. The data needs to be moved
+ // into a resource and loaded from there.
+ this.commonChars = [
+ 0xa1a1, 0xa1a2, 0xa1a3, 0xa1a4, 0xa1b0, 0xa1b1, 0xa1f1, 0xa1f3, 0xa3a1, 0xa3ac,
+ 0xa3ba, 0xb1a8, 0xb1b8, 0xb1be, 0xb2bb, 0xb3c9, 0xb3f6, 0xb4f3, 0xb5bd, 0xb5c4,
+ 0xb5e3, 0xb6af, 0xb6d4, 0xb6e0, 0xb7a2, 0xb7a8, 0xb7bd, 0xb7d6, 0xb7dd, 0xb8b4,
+ 0xb8df, 0xb8f6, 0xb9ab, 0xb9c9, 0xb9d8, 0xb9fa, 0xb9fd, 0xbacd, 0xbba7, 0xbbd6,
+ 0xbbe1, 0xbbfa, 0xbcbc, 0xbcdb, 0xbcfe, 0xbdcc, 0xbecd, 0xbedd, 0xbfb4, 0xbfc6,
+ 0xbfc9, 0xc0b4, 0xc0ed, 0xc1cb, 0xc2db, 0xc3c7, 0xc4dc, 0xc4ea, 0xc5cc, 0xc6f7,
+ 0xc7f8, 0xc8ab, 0xc8cb, 0xc8d5, 0xc8e7, 0xc9cf, 0xc9fa, 0xcab1, 0xcab5, 0xcac7,
+ 0xcad0, 0xcad6, 0xcaf5, 0xcafd, 0xccec, 0xcdf8, 0xceaa, 0xcec4, 0xced2, 0xcee5,
+ 0xcfb5, 0xcfc2, 0xcfd6, 0xd0c2, 0xd0c5, 0xd0d0, 0xd0d4, 0xd1a7, 0xd2aa, 0xd2b2,
+ 0xd2b5, 0xd2bb, 0xd2d4, 0xd3c3, 0xd3d0, 0xd3fd, 0xd4c2, 0xd4da, 0xd5e2, 0xd6d0
+ ];
+};
+util.inherits(module.exports.gb_18030, mbcs);
diff --git a/tools/node_modules/eslint/node_modules/chardet/encoding/sbcs.js b/tools/node_modules/eslint/node_modules/chardet/encoding/sbcs.js
new file mode 100644
index 0000000000..80d525e681
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/chardet/encoding/sbcs.js
@@ -0,0 +1,907 @@
+var util = require('util'),
+ Match = require ('../match');
+
+/**
+ * This class recognizes single-byte encodings. Because the encoding scheme is so
+ * simple, language statistics are used to do the matching.
+ */
+
+function NGramParser(theNgramList, theByteMap) {
+ var N_GRAM_MASK = 0xFFFFFF;
+
+ this.byteIndex = 0;
+ this.ngram = 0;
+
+ this.ngramList = theNgramList;
+ this.byteMap = theByteMap;
+
+ this.ngramCount = 0;
+ this.hitCount = 0;
+
+ this.spaceChar;
+
+ /*
+ * Binary search for value in table, which must have exactly 64 entries.
+ */
+ this.search = function(table, value) {
+ var index = 0;
+
+ if (table[index + 32] <= value) index += 32;
+ if (table[index + 16] <= value) index += 16;
+ if (table[index + 8] <= value) index += 8;
+ if (table[index + 4] <= value) index += 4;
+ if (table[index + 2] <= value) index += 2;
+ if (table[index + 1] <= value) index += 1;
+ if (table[index] > value) index -= 1;
+
+ if (index < 0 || table[index] != value)
+ return -1;
+
+ return index;
+ };
+
+ this.lookup = function(thisNgram) {
+ this.ngramCount += 1;
+ if (this.search(this.ngramList, thisNgram) >= 0) {
+ this.hitCount += 1;
+ }
+ };
+
+ this.addByte = function(b) {
+ this.ngram = ((this.ngram << 8) + (b & 0xFF)) & N_GRAM_MASK;
+ this.lookup(this.ngram);
+ }
+
+ this.nextByte = function(det) {
+ if (this.byteIndex >= det.fInputLen)
+ return -1;
+
+ return det.fInputBytes[this.byteIndex++] & 0xFF;
+ }
+
+ this.parse = function(det, spaceCh) {
+ var b, ignoreSpace = false;
+ this.spaceChar = spaceCh;
+
+ while ((b = this.nextByte(det)) >= 0) {
+ var mb = this.byteMap[b];
+
+ // TODO: 0x20 might not be a space in all character sets...
+ if (mb != 0) {
+ if (!(mb == this.spaceChar && ignoreSpace)) {
+ this.addByte(mb);
+ }
+
+ ignoreSpace = (mb == this.spaceChar);
+ }
+ }
+
+ // TODO: Is this OK? The buffer could have ended in the middle of a word...
+ this.addByte(this.spaceChar);
+
+ var rawPercent = this.hitCount / this.ngramCount;
+
+ // TODO - This is a bit of a hack to take care of a case
+ // were we were getting a confidence of 135...
+ if (rawPercent > 0.33)
+ return 98;
+
+ return Math.floor(rawPercent * 300.0);
+ };
+};
+
+function NGramsPlusLang(la, ng) {
+ this.fLang = la;
+ this.fNGrams = ng;
+};
+
+function sbcs() {};
+sbcs.prototype.spaceChar = 0x20;
+sbcs.prototype.ngrams = function() {};
+sbcs.prototype.byteMap = function() {};
+sbcs.prototype.match = function(det) {
+
+ var ngrams = this.ngrams();
+ var multiple = (Array.isArray(ngrams) && ngrams[0] instanceof NGramsPlusLang);
+
+ if (!multiple) {
+ var parser = new NGramParser(ngrams, this.byteMap());
+ var confidence = parser.parse(det, this.spaceChar);
+ return confidence <= 0 ? null : new Match(det, this, confidence);
+ }
+
+ var bestConfidenceSoFar = -1;
+ var lang = null;
+
+ for (var i = ngrams.length - 1; i >= 0; i--) {
+ var ngl = ngrams[i];
+
+ var parser = new NGramParser(ngl.fNGrams, this.byteMap());
+ var confidence = parser.parse(det, this.spaceChar);
+ if (confidence > bestConfidenceSoFar) {
+ bestConfidenceSoFar = confidence;
+ lang = ngl.fLang;
+ }
+ }
+
+ var name = this.name(det);
+ return bestConfidenceSoFar <= 0 ? null : new Match(det, this, bestConfidenceSoFar, name, lang);
+};
+
+
+module.exports.ISO_8859_1 = function() {
+ this.byteMap = function() {
+ return [
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
+ 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F,
+ 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
+ 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
+ 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F,
+ 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
+ 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0xAA, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0xB5, 0x20, 0x20,
+ 0x20, 0x20, 0xBA, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7,
+ 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF,
+ 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0x20,
+ 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xDF,
+ 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7,
+ 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF,
+ 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0x20,
+ 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF
+ ];
+ };
+
+ this.ngrams = function() {
+ return [
+ new NGramsPlusLang('da', [
+ 0x206166, 0x206174, 0x206465, 0x20656E, 0x206572, 0x20666F, 0x206861, 0x206920,
+ 0x206D65, 0x206F67, 0x2070E5, 0x207369, 0x207374, 0x207469, 0x207669, 0x616620,
+ 0x616E20, 0x616E64, 0x617220, 0x617420, 0x646520, 0x64656E, 0x646572, 0x646574,
+ 0x652073, 0x656420, 0x656465, 0x656E20, 0x656E64, 0x657220, 0x657265, 0x657320,
+ 0x657420, 0x666F72, 0x676520, 0x67656E, 0x676572, 0x696765, 0x696C20, 0x696E67,
+ 0x6B6520, 0x6B6B65, 0x6C6572, 0x6C6967, 0x6C6C65, 0x6D6564, 0x6E6465, 0x6E6520,
+ 0x6E6720, 0x6E6765, 0x6F6720, 0x6F6D20, 0x6F7220, 0x70E520, 0x722064, 0x722065,
+ 0x722073, 0x726520, 0x737465, 0x742073, 0x746520, 0x746572, 0x74696C, 0x766572
+ ]),
+ new NGramsPlusLang('de', [
+ 0x20616E, 0x206175, 0x206265, 0x206461, 0x206465, 0x206469, 0x206569, 0x206765,
+ 0x206861, 0x20696E, 0x206D69, 0x207363, 0x207365, 0x20756E, 0x207665, 0x20766F,
+ 0x207765, 0x207A75, 0x626572, 0x636820, 0x636865, 0x636874, 0x646173, 0x64656E,
+ 0x646572, 0x646965, 0x652064, 0x652073, 0x65696E, 0x656974, 0x656E20, 0x657220,
+ 0x657320, 0x67656E, 0x68656E, 0x687420, 0x696368, 0x696520, 0x696E20, 0x696E65,
+ 0x697420, 0x6C6963, 0x6C6C65, 0x6E2061, 0x6E2064, 0x6E2073, 0x6E6420, 0x6E6465,
+ 0x6E6520, 0x6E6720, 0x6E6765, 0x6E7465, 0x722064, 0x726465, 0x726569, 0x736368,
+ 0x737465, 0x742064, 0x746520, 0x74656E, 0x746572, 0x756E64, 0x756E67, 0x766572
+ ]),
+ new NGramsPlusLang('en', [
+ 0x206120, 0x20616E, 0x206265, 0x20636F, 0x20666F, 0x206861, 0x206865, 0x20696E,
+ 0x206D61, 0x206F66, 0x207072, 0x207265, 0x207361, 0x207374, 0x207468, 0x20746F,
+ 0x207768, 0x616964, 0x616C20, 0x616E20, 0x616E64, 0x617320, 0x617420, 0x617465,
+ 0x617469, 0x642061, 0x642074, 0x652061, 0x652073, 0x652074, 0x656420, 0x656E74,
+ 0x657220, 0x657320, 0x666F72, 0x686174, 0x686520, 0x686572, 0x696420, 0x696E20,
+ 0x696E67, 0x696F6E, 0x697320, 0x6E2061, 0x6E2074, 0x6E6420, 0x6E6720, 0x6E7420,
+ 0x6F6620, 0x6F6E20, 0x6F7220, 0x726520, 0x727320, 0x732061, 0x732074, 0x736169,
+ 0x737420, 0x742074, 0x746572, 0x746861, 0x746865, 0x74696F, 0x746F20, 0x747320
+ ]),
+ new NGramsPlusLang('es', [
+ 0x206120, 0x206361, 0x20636F, 0x206465, 0x20656C, 0x20656E, 0x206573, 0x20696E,
+ 0x206C61, 0x206C6F, 0x207061, 0x20706F, 0x207072, 0x207175, 0x207265, 0x207365,
+ 0x20756E, 0x207920, 0x612063, 0x612064, 0x612065, 0x61206C, 0x612070, 0x616369,
+ 0x61646F, 0x616C20, 0x617220, 0x617320, 0x6369F3, 0x636F6E, 0x646520, 0x64656C,
+ 0x646F20, 0x652064, 0x652065, 0x65206C, 0x656C20, 0x656E20, 0x656E74, 0x657320,
+ 0x657374, 0x69656E, 0x69F36E, 0x6C6120, 0x6C6F73, 0x6E2065, 0x6E7465, 0x6F2064,
+ 0x6F2065, 0x6F6E20, 0x6F7220, 0x6F7320, 0x706172, 0x717565, 0x726120, 0x726573,
+ 0x732064, 0x732065, 0x732070, 0x736520, 0x746520, 0x746F20, 0x756520, 0xF36E20
+ ]),
+ new NGramsPlusLang('fr', [
+ 0x206175, 0x20636F, 0x206461, 0x206465, 0x206475, 0x20656E, 0x206574, 0x206C61,
+ 0x206C65, 0x207061, 0x20706F, 0x207072, 0x207175, 0x207365, 0x20736F, 0x20756E,
+ 0x20E020, 0x616E74, 0x617469, 0x636520, 0x636F6E, 0x646520, 0x646573, 0x647520,
+ 0x652061, 0x652063, 0x652064, 0x652065, 0x65206C, 0x652070, 0x652073, 0x656E20,
+ 0x656E74, 0x657220, 0x657320, 0x657420, 0x657572, 0x696F6E, 0x697320, 0x697420,
+ 0x6C6120, 0x6C6520, 0x6C6573, 0x6D656E, 0x6E2064, 0x6E6520, 0x6E7320, 0x6E7420,
+ 0x6F6E20, 0x6F6E74, 0x6F7572, 0x717565, 0x72206C, 0x726520, 0x732061, 0x732064,
+ 0x732065, 0x73206C, 0x732070, 0x742064, 0x746520, 0x74696F, 0x756520, 0x757220
+ ]),
+ new NGramsPlusLang('it', [
+ 0x20616C, 0x206368, 0x20636F, 0x206465, 0x206469, 0x206520, 0x20696C, 0x20696E,
+ 0x206C61, 0x207065, 0x207072, 0x20756E, 0x612063, 0x612064, 0x612070, 0x612073,
+ 0x61746F, 0x636865, 0x636F6E, 0x64656C, 0x646920, 0x652061, 0x652063, 0x652064,
+ 0x652069, 0x65206C, 0x652070, 0x652073, 0x656C20, 0x656C6C, 0x656E74, 0x657220,
+ 0x686520, 0x692061, 0x692063, 0x692064, 0x692073, 0x696120, 0x696C20, 0x696E20,
+ 0x696F6E, 0x6C6120, 0x6C6520, 0x6C6920, 0x6C6C61, 0x6E6520, 0x6E6920, 0x6E6F20,
+ 0x6E7465, 0x6F2061, 0x6F2064, 0x6F2069, 0x6F2073, 0x6F6E20, 0x6F6E65, 0x706572,
+ 0x726120, 0x726520, 0x736920, 0x746120, 0x746520, 0x746920, 0x746F20, 0x7A696F
+ ]),
+ new NGramsPlusLang('nl', [
+ 0x20616C, 0x206265, 0x206461, 0x206465, 0x206469, 0x206565, 0x20656E, 0x206765,
+ 0x206865, 0x20696E, 0x206D61, 0x206D65, 0x206F70, 0x207465, 0x207661, 0x207665,
+ 0x20766F, 0x207765, 0x207A69, 0x61616E, 0x616172, 0x616E20, 0x616E64, 0x617220,
+ 0x617420, 0x636874, 0x646520, 0x64656E, 0x646572, 0x652062, 0x652076, 0x65656E,
+ 0x656572, 0x656E20, 0x657220, 0x657273, 0x657420, 0x67656E, 0x686574, 0x696520,
+ 0x696E20, 0x696E67, 0x697320, 0x6E2062, 0x6E2064, 0x6E2065, 0x6E2068, 0x6E206F,
+ 0x6E2076, 0x6E6465, 0x6E6720, 0x6F6E64, 0x6F6F72, 0x6F7020, 0x6F7220, 0x736368,
+ 0x737465, 0x742064, 0x746520, 0x74656E, 0x746572, 0x76616E, 0x766572, 0x766F6F
+ ]),
+ new NGramsPlusLang('no', [
+ 0x206174, 0x206176, 0x206465, 0x20656E, 0x206572, 0x20666F, 0x206861, 0x206920,
+ 0x206D65, 0x206F67, 0x2070E5, 0x207365, 0x20736B, 0x20736F, 0x207374, 0x207469,
+ 0x207669, 0x20E520, 0x616E64, 0x617220, 0x617420, 0x646520, 0x64656E, 0x646574,
+ 0x652073, 0x656420, 0x656E20, 0x656E65, 0x657220, 0x657265, 0x657420, 0x657474,
+ 0x666F72, 0x67656E, 0x696B6B, 0x696C20, 0x696E67, 0x6B6520, 0x6B6B65, 0x6C6520,
+ 0x6C6C65, 0x6D6564, 0x6D656E, 0x6E2073, 0x6E6520, 0x6E6720, 0x6E6765, 0x6E6E65,
+ 0x6F6720, 0x6F6D20, 0x6F7220, 0x70E520, 0x722073, 0x726520, 0x736F6D, 0x737465,
+ 0x742073, 0x746520, 0x74656E, 0x746572, 0x74696C, 0x747420, 0x747465, 0x766572
+ ]),
+ new NGramsPlusLang('pt', [
+ 0x206120, 0x20636F, 0x206461, 0x206465, 0x20646F, 0x206520, 0x206573, 0x206D61,
+ 0x206E6F, 0x206F20, 0x207061, 0x20706F, 0x207072, 0x207175, 0x207265, 0x207365,
+ 0x20756D, 0x612061, 0x612063, 0x612064, 0x612070, 0x616465, 0x61646F, 0x616C20,
+ 0x617220, 0x617261, 0x617320, 0x636F6D, 0x636F6E, 0x646120, 0x646520, 0x646F20,
+ 0x646F73, 0x652061, 0x652064, 0x656D20, 0x656E74, 0x657320, 0x657374, 0x696120,
+ 0x696361, 0x6D656E, 0x6E7465, 0x6E746F, 0x6F2061, 0x6F2063, 0x6F2064, 0x6F2065,
+ 0x6F2070, 0x6F7320, 0x706172, 0x717565, 0x726120, 0x726573, 0x732061, 0x732064,
+ 0x732065, 0x732070, 0x737461, 0x746520, 0x746F20, 0x756520, 0xE36F20, 0xE7E36F
+ ]),
+ new NGramsPlusLang('sv', [
+ 0x206174, 0x206176, 0x206465, 0x20656E, 0x2066F6, 0x206861, 0x206920, 0x20696E,
+ 0x206B6F, 0x206D65, 0x206F63, 0x2070E5, 0x20736B, 0x20736F, 0x207374, 0x207469,
+ 0x207661, 0x207669, 0x20E472, 0x616465, 0x616E20, 0x616E64, 0x617220, 0x617474,
+ 0x636820, 0x646520, 0x64656E, 0x646572, 0x646574, 0x656420, 0x656E20, 0x657220,
+ 0x657420, 0x66F672, 0x67656E, 0x696C6C, 0x696E67, 0x6B6120, 0x6C6C20, 0x6D6564,
+ 0x6E2073, 0x6E6120, 0x6E6465, 0x6E6720, 0x6E6765, 0x6E696E, 0x6F6368, 0x6F6D20,
+ 0x6F6E20, 0x70E520, 0x722061, 0x722073, 0x726120, 0x736B61, 0x736F6D, 0x742073,
+ 0x746120, 0x746520, 0x746572, 0x74696C, 0x747420, 0x766172, 0xE47220, 0xF67220,
+ ])
+ ];
+ };
+
+ this.name = function(det) {
+ return (det && det.fC1Bytes) ? 'windows-1252' : 'ISO-8859-1';
+ };
+};
+util.inherits(module.exports.ISO_8859_1, sbcs);
+
+
+module.exports.ISO_8859_2 = function() {
+ this.byteMap = function() {
+ return [
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
+ 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F,
+ 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
+ 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
+ 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F,
+ 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
+ 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0xB1, 0x20, 0xB3, 0x20, 0xB5, 0xB6, 0x20,
+ 0x20, 0xB9, 0xBA, 0xBB, 0xBC, 0x20, 0xBE, 0xBF,
+ 0x20, 0xB1, 0x20, 0xB3, 0x20, 0xB5, 0xB6, 0xB7,
+ 0x20, 0xB9, 0xBA, 0xBB, 0xBC, 0x20, 0xBE, 0xBF,
+ 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7,
+ 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF,
+ 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0x20,
+ 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xDF,
+ 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7,
+ 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF,
+ 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0x20,
+ 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0x20
+ ];
+ }
+
+ this.ngrams = function() {
+ return [
+ new NGramsPlusLang('cs', [
+ 0x206120, 0x206279, 0x20646F, 0x206A65, 0x206E61, 0x206E65, 0x206F20, 0x206F64,
+ 0x20706F, 0x207072, 0x2070F8, 0x20726F, 0x207365, 0x20736F, 0x207374, 0x20746F,
+ 0x207620, 0x207679, 0x207A61, 0x612070, 0x636520, 0x636820, 0x652070, 0x652073,
+ 0x652076, 0x656D20, 0x656EED, 0x686F20, 0x686F64, 0x697374, 0x6A6520, 0x6B7465,
+ 0x6C6520, 0x6C6920, 0x6E6120, 0x6EE920, 0x6EEC20, 0x6EED20, 0x6F2070, 0x6F646E,
+ 0x6F6A69, 0x6F7374, 0x6F7520, 0x6F7661, 0x706F64, 0x706F6A, 0x70726F, 0x70F865,
+ 0x736520, 0x736F75, 0x737461, 0x737469, 0x73746E, 0x746572, 0x746EED, 0x746F20,
+ 0x752070, 0xBE6520, 0xE16EED, 0xE9686F, 0xED2070, 0xED2073, 0xED6D20, 0xF86564,
+ ]),
+ new NGramsPlusLang('hu', [
+ 0x206120, 0x20617A, 0x206265, 0x206567, 0x20656C, 0x206665, 0x206861, 0x20686F,
+ 0x206973, 0x206B65, 0x206B69, 0x206BF6, 0x206C65, 0x206D61, 0x206D65, 0x206D69,
+ 0x206E65, 0x20737A, 0x207465, 0x20E973, 0x612061, 0x61206B, 0x61206D, 0x612073,
+ 0x616B20, 0x616E20, 0x617A20, 0x62616E, 0x62656E, 0x656779, 0x656B20, 0x656C20,
+ 0x656C65, 0x656D20, 0x656E20, 0x657265, 0x657420, 0x657465, 0x657474, 0x677920,
+ 0x686F67, 0x696E74, 0x697320, 0x6B2061, 0x6BF67A, 0x6D6567, 0x6D696E, 0x6E2061,
+ 0x6E616B, 0x6E656B, 0x6E656D, 0x6E7420, 0x6F6779, 0x732061, 0x737A65, 0x737A74,
+ 0x737AE1, 0x73E967, 0x742061, 0x747420, 0x74E173, 0x7A6572, 0xE16E20, 0xE97320,
+ ]),
+ new NGramsPlusLang('pl', [
+ 0x20637A, 0x20646F, 0x206920, 0x206A65, 0x206B6F, 0x206D61, 0x206D69, 0x206E61,
+ 0x206E69, 0x206F64, 0x20706F, 0x207072, 0x207369, 0x207720, 0x207769, 0x207779,
+ 0x207A20, 0x207A61, 0x612070, 0x612077, 0x616E69, 0x636820, 0x637A65, 0x637A79,
+ 0x646F20, 0x647A69, 0x652070, 0x652073, 0x652077, 0x65207A, 0x65676F, 0x656A20,
+ 0x656D20, 0x656E69, 0x676F20, 0x696120, 0x696520, 0x69656A, 0x6B6120, 0x6B6920,
+ 0x6B6965, 0x6D6965, 0x6E6120, 0x6E6961, 0x6E6965, 0x6F2070, 0x6F7761, 0x6F7769,
+ 0x706F6C, 0x707261, 0x70726F, 0x70727A, 0x727A65, 0x727A79, 0x7369EA, 0x736B69,
+ 0x737461, 0x776965, 0x796368, 0x796D20, 0x7A6520, 0x7A6965, 0x7A7920, 0xF37720,
+ ]),
+ new NGramsPlusLang('ro', [
+ 0x206120, 0x206163, 0x206361, 0x206365, 0x20636F, 0x206375, 0x206465, 0x206469,
+ 0x206C61, 0x206D61, 0x207065, 0x207072, 0x207365, 0x2073E3, 0x20756E, 0x20BA69,
+ 0x20EE6E, 0x612063, 0x612064, 0x617265, 0x617420, 0x617465, 0x617520, 0x636172,
+ 0x636F6E, 0x637520, 0x63E320, 0x646520, 0x652061, 0x652063, 0x652064, 0x652070,
+ 0x652073, 0x656120, 0x656920, 0x656C65, 0x656E74, 0x657374, 0x692061, 0x692063,
+ 0x692064, 0x692070, 0x696520, 0x696920, 0x696E20, 0x6C6120, 0x6C6520, 0x6C6F72,
+ 0x6C7569, 0x6E6520, 0x6E7472, 0x6F7220, 0x70656E, 0x726520, 0x726561, 0x727520,
+ 0x73E320, 0x746520, 0x747275, 0x74E320, 0x756920, 0x756C20, 0xBA6920, 0xEE6E20,
+ ])
+ ];
+ };
+
+ this.name = function(det) {
+ return (det && det.fC1Bytes) ? 'windows-1250' : 'ISO-8859-2';
+ };
+};
+util.inherits(module.exports.ISO_8859_2, sbcs);
+
+
+module.exports.ISO_8859_5 = function() {
+ this.byteMap = function() {
+ return [
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
+ 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F,
+ 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
+ 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
+ 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F,
+ 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
+ 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7,
+ 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0x20, 0xFE, 0xFF,
+ 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7,
+ 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF,
+ 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7,
+ 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF,
+ 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7,
+ 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF,
+ 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7,
+ 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF,
+ 0x20, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7,
+ 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0x20, 0xFE, 0xFF
+ ];
+ };
+
+ this.ngrams = function() {
+ return [
+ 0x20D220, 0x20D2DE, 0x20D4DE, 0x20D7D0, 0x20D820, 0x20DAD0, 0x20DADE, 0x20DDD0,
+ 0x20DDD5, 0x20DED1, 0x20DFDE, 0x20DFE0, 0x20E0D0, 0x20E1DE, 0x20E1E2, 0x20E2DE,
+ 0x20E7E2, 0x20EDE2, 0xD0DDD8, 0xD0E2EC, 0xD3DE20, 0xD5DBEC, 0xD5DDD8, 0xD5E1E2,
+ 0xD5E220, 0xD820DF, 0xD8D520, 0xD8D820, 0xD8EF20, 0xDBD5DD, 0xDBD820, 0xDBECDD,
+ 0xDDD020, 0xDDD520, 0xDDD8D5, 0xDDD8EF, 0xDDDE20, 0xDDDED2, 0xDE20D2, 0xDE20DF,
+ 0xDE20E1, 0xDED220, 0xDED2D0, 0xDED3DE, 0xDED920, 0xDEDBEC, 0xDEDC20, 0xDEE1E2,
+ 0xDFDEDB, 0xDFE0D5, 0xDFE0D8, 0xDFE0DE, 0xE0D0D2, 0xE0D5D4, 0xE1E2D0, 0xE1E2D2,
+ 0xE1E2D8, 0xE1EF20, 0xE2D5DB, 0xE2DE20, 0xE2DEE0, 0xE2EC20, 0xE7E2DE, 0xEBE520
+ ];
+ };
+
+ this.name = function(det) {
+ return 'ISO-8859-5';
+ };
+
+ this.language = function() {
+ return 'ru';
+ };
+};
+util.inherits(module.exports.ISO_8859_5, sbcs);
+
+
+module.exports.ISO_8859_6 = function() {
+ this.byteMap = function() {
+ return [
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
+ 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F,
+ 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
+ 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
+ 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F,
+ 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
+ 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7,
+ 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF,
+ 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7,
+ 0xD8, 0xD9, 0xDA, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7,
+ 0xE8, 0xE9, 0xEA, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20
+ ];
+ };
+
+ this.ngrams = function() {
+ return [
+ 0x20C7E4, 0x20C7E6, 0x20C8C7, 0x20D9E4, 0x20E1EA, 0x20E4E4, 0x20E5E6, 0x20E8C7,
+ 0xC720C7, 0xC7C120, 0xC7CA20, 0xC7D120, 0xC7E420, 0xC7E4C3, 0xC7E4C7, 0xC7E4C8,
+ 0xC7E4CA, 0xC7E4CC, 0xC7E4CD, 0xC7E4CF, 0xC7E4D3, 0xC7E4D9, 0xC7E4E2, 0xC7E4E5,
+ 0xC7E4E8, 0xC7E4EA, 0xC7E520, 0xC7E620, 0xC7E6CA, 0xC820C7, 0xC920C7, 0xC920E1,
+ 0xC920E4, 0xC920E5, 0xC920E8, 0xCA20C7, 0xCF20C7, 0xCFC920, 0xD120C7, 0xD1C920,
+ 0xD320C7, 0xD920C7, 0xD9E4E9, 0xE1EA20, 0xE420C7, 0xE4C920, 0xE4E920, 0xE4EA20,
+ 0xE520C7, 0xE5C720, 0xE5C920, 0xE5E620, 0xE620C7, 0xE720C7, 0xE7C720, 0xE8C7E4,
+ 0xE8E620, 0xE920C7, 0xEA20C7, 0xEA20E5, 0xEA20E8, 0xEAC920, 0xEAD120, 0xEAE620
+ ];
+ };
+
+ this.name = function(det) {
+ return 'ISO-8859-6';
+ };
+
+ this.language = function() {
+ return 'ar';
+ };
+};
+util.inherits(module.exports.ISO_8859_6, sbcs);
+
+
+module.exports.ISO_8859_7 = function() {
+ this.byteMap = function() {
+ return [
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
+ 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F,
+ 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
+ 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
+ 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F,
+ 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
+ 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0xA1, 0xA2, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0xDC, 0x20,
+ 0xDD, 0xDE, 0xDF, 0x20, 0xFC, 0x20, 0xFD, 0xFE,
+ 0xC0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7,
+ 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF,
+ 0xF0, 0xF1, 0x20, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7,
+ 0xF8, 0xF9, 0xFA, 0xFB, 0xDC, 0xDD, 0xDE, 0xDF,
+ 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7,
+ 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF,
+ 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7,
+ 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0x20
+ ];
+ };
+
+ this.ngrams = function() {
+ return [
+ 0x20E1ED, 0x20E1F0, 0x20E3E9, 0x20E4E9, 0x20E5F0, 0x20E720, 0x20EAE1, 0x20ECE5,
+ 0x20EDE1, 0x20EF20, 0x20F0E1, 0x20F0EF, 0x20F0F1, 0x20F3F4, 0x20F3F5, 0x20F4E7,
+ 0x20F4EF, 0xDFE120, 0xE120E1, 0xE120F4, 0xE1E920, 0xE1ED20, 0xE1F0FC, 0xE1F220,
+ 0xE3E9E1, 0xE5E920, 0xE5F220, 0xE720F4, 0xE7ED20, 0xE7F220, 0xE920F4, 0xE9E120,
+ 0xE9EADE, 0xE9F220, 0xEAE1E9, 0xEAE1F4, 0xECE520, 0xED20E1, 0xED20E5, 0xED20F0,
+ 0xEDE120, 0xEFF220, 0xEFF520, 0xF0EFF5, 0xF0F1EF, 0xF0FC20, 0xF220E1, 0xF220E5,
+ 0xF220EA, 0xF220F0, 0xF220F4, 0xF3E520, 0xF3E720, 0xF3F4EF, 0xF4E120, 0xF4E1E9,
+ 0xF4E7ED, 0xF4E7F2, 0xF4E9EA, 0xF4EF20, 0xF4EFF5, 0xF4F9ED, 0xF9ED20, 0xFEED20
+ ];
+ };
+
+ this.name = function(det) {
+ return (det && det.fC1Bytes) ? 'windows-1253' : 'ISO-8859-7';
+ };
+
+ this.language = function() {
+ return 'el';
+ };
+};
+util.inherits(module.exports.ISO_8859_7, sbcs);
+
+module.exports.ISO_8859_8 = function() {
+
+ this.byteMap = function() {
+ return [
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
+ 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F,
+ 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
+ 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
+ 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F,
+ 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
+ 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0xB5, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7,
+ 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF,
+ 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7,
+ 0xF8, 0xF9, 0xFA, 0x20, 0x20, 0x20, 0x20, 0x20
+ ];
+ };
+
+ this.ngrams = function() {
+ return [
+ new NGramsPlusLang('he', [
+ 0x20E0E5, 0x20E0E7, 0x20E0E9, 0x20E0FA, 0x20E1E9, 0x20E1EE, 0x20E4E0, 0x20E4E5,
+ 0x20E4E9, 0x20E4EE, 0x20E4F2, 0x20E4F9, 0x20E4FA, 0x20ECE0, 0x20ECE4, 0x20EEE0,
+ 0x20F2EC, 0x20F9EC, 0xE0FA20, 0xE420E0, 0xE420E1, 0xE420E4, 0xE420EC, 0xE420EE,
+ 0xE420F9, 0xE4E5E0, 0xE5E020, 0xE5ED20, 0xE5EF20, 0xE5F820, 0xE5FA20, 0xE920E4,
+ 0xE9E420, 0xE9E5FA, 0xE9E9ED, 0xE9ED20, 0xE9EF20, 0xE9F820, 0xE9FA20, 0xEC20E0,
+ 0xEC20E4, 0xECE020, 0xECE420, 0xED20E0, 0xED20E1, 0xED20E4, 0xED20EC, 0xED20EE,
+ 0xED20F9, 0xEEE420, 0xEF20E4, 0xF0E420, 0xF0E920, 0xF0E9ED, 0xF2EC20, 0xF820E4,
+ 0xF8E9ED, 0xF9EC20, 0xFA20E0, 0xFA20E1, 0xFA20E4, 0xFA20EC, 0xFA20EE, 0xFA20F9,
+ ]),
+ new NGramsPlusLang('he', [
+ 0x20E0E5, 0x20E0EC, 0x20E4E9, 0x20E4EC, 0x20E4EE, 0x20E4F0, 0x20E9F0, 0x20ECF2,
+ 0x20ECF9, 0x20EDE5, 0x20EDE9, 0x20EFE5, 0x20EFE9, 0x20F8E5, 0x20F8E9, 0x20FAE0,
+ 0x20FAE5, 0x20FAE9, 0xE020E4, 0xE020EC, 0xE020ED, 0xE020FA, 0xE0E420, 0xE0E5E4,
+ 0xE0EC20, 0xE0EE20, 0xE120E4, 0xE120ED, 0xE120FA, 0xE420E4, 0xE420E9, 0xE420EC,
+ 0xE420ED, 0xE420EF, 0xE420F8, 0xE420FA, 0xE4EC20, 0xE5E020, 0xE5E420, 0xE7E020,
+ 0xE9E020, 0xE9E120, 0xE9E420, 0xEC20E4, 0xEC20ED, 0xEC20FA, 0xECF220, 0xECF920,
+ 0xEDE9E9, 0xEDE9F0, 0xEDE9F8, 0xEE20E4, 0xEE20ED, 0xEE20FA, 0xEEE120, 0xEEE420,
+ 0xF2E420, 0xF920E4, 0xF920ED, 0xF920FA, 0xF9E420, 0xFAE020, 0xFAE420, 0xFAE5E9,
+ ])
+ ];
+ };
+
+ this.name = function(det) {
+ return (det && det.fC1Bytes) ? 'windows-1255' : 'ISO-8859-8';
+ };
+
+ this.language = function() {
+ return 'he';
+ };
+
+};
+util.inherits(module.exports.ISO_8859_8, sbcs);
+
+
+module.exports.ISO_8859_9 = function() {
+ this.byteMap = function() {
+ return [
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
+ 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F,
+ 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
+ 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
+ 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F,
+ 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
+ 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0xAA, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0xB5, 0x20, 0x20,
+ 0x20, 0x20, 0xBA, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7,
+ 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF,
+ 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0x20,
+ 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0x69, 0xFE, 0xDF,
+ 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7,
+ 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF,
+ 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0x20,
+ 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF
+ ];
+ };
+
+ this.ngrams = function() {
+ return [
+ 0x206261, 0x206269, 0x206275, 0x206461, 0x206465, 0x206765, 0x206861, 0x20696C,
+ 0x206B61, 0x206B6F, 0x206D61, 0x206F6C, 0x207361, 0x207461, 0x207665, 0x207961,
+ 0x612062, 0x616B20, 0x616C61, 0x616D61, 0x616E20, 0x616EFD, 0x617220, 0x617261,
+ 0x6172FD, 0x6173FD, 0x617961, 0x626972, 0x646120, 0x646520, 0x646920, 0x652062,
+ 0x65206B, 0x656469, 0x656E20, 0x657220, 0x657269, 0x657369, 0x696C65, 0x696E20,
+ 0x696E69, 0x697220, 0x6C616E, 0x6C6172, 0x6C6520, 0x6C6572, 0x6E2061, 0x6E2062,
+ 0x6E206B, 0x6E6461, 0x6E6465, 0x6E6520, 0x6E6920, 0x6E696E, 0x6EFD20, 0x72696E,
+ 0x72FD6E, 0x766520, 0x796120, 0x796F72, 0xFD6E20, 0xFD6E64, 0xFD6EFD, 0xFDF0FD
+ ];
+ };
+
+ this.name = function(det) {
+ return (det && det.fC1Bytes) ? 'windows-1254' : 'ISO-8859-9';
+ };
+
+ this.language = function() {
+ return 'tr';
+ };
+};
+util.inherits(module.exports.ISO_8859_9, sbcs);
+
+
+module.exports.windows_1251 = function() {
+ this.byteMap = function() {
+ return [
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
+ 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F,
+ 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
+ 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
+ 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F,
+ 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
+ 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x90, 0x83, 0x20, 0x83, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x9A, 0x20, 0x9C, 0x9D, 0x9E, 0x9F,
+ 0x90, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x9A, 0x20, 0x9C, 0x9D, 0x9E, 0x9F,
+ 0x20, 0xA2, 0xA2, 0xBC, 0x20, 0xB4, 0x20, 0x20,
+ 0xB8, 0x20, 0xBA, 0x20, 0x20, 0x20, 0x20, 0xBF,
+ 0x20, 0x20, 0xB3, 0xB3, 0xB4, 0xB5, 0x20, 0x20,
+ 0xB8, 0x20, 0xBA, 0x20, 0xBC, 0xBE, 0xBE, 0xBF,
+ 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7,
+ 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF,
+ 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7,
+ 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF,
+ 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7,
+ 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF,
+ 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7,
+ 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF
+ ];
+ };
+
+ this.ngrams = function() {
+ return [
+ 0x20E220, 0x20E2EE, 0x20E4EE, 0x20E7E0, 0x20E820, 0x20EAE0, 0x20EAEE, 0x20EDE0,
+ 0x20EDE5, 0x20EEE1, 0x20EFEE, 0x20EFF0, 0x20F0E0, 0x20F1EE, 0x20F1F2, 0x20F2EE,
+ 0x20F7F2, 0x20FDF2, 0xE0EDE8, 0xE0F2FC, 0xE3EE20, 0xE5EBFC, 0xE5EDE8, 0xE5F1F2,
+ 0xE5F220, 0xE820EF, 0xE8E520, 0xE8E820, 0xE8FF20, 0xEBE5ED, 0xEBE820, 0xEBFCED,
+ 0xEDE020, 0xEDE520, 0xEDE8E5, 0xEDE8FF, 0xEDEE20, 0xEDEEE2, 0xEE20E2, 0xEE20EF,
+ 0xEE20F1, 0xEEE220, 0xEEE2E0, 0xEEE3EE, 0xEEE920, 0xEEEBFC, 0xEEEC20, 0xEEF1F2,
+ 0xEFEEEB, 0xEFF0E5, 0xEFF0E8, 0xEFF0EE, 0xF0E0E2, 0xF0E5E4, 0xF1F2E0, 0xF1F2E2,
+ 0xF1F2E8, 0xF1FF20, 0xF2E5EB, 0xF2EE20, 0xF2EEF0, 0xF2FC20, 0xF7F2EE, 0xFBF520
+ ];
+ };
+
+ this.name = function(det) {
+ return 'windows-1251';
+ };
+
+ this.language = function() {
+ return 'ru';
+ };
+};
+util.inherits(module.exports.windows_1251, sbcs);
+
+
+module.exports.windows_1256 = function() {
+ this.byteMap = function() {
+ return [
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
+ 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F,
+ 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
+ 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
+ 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F,
+ 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
+ 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x81, 0x20, 0x83, 0x20, 0x20, 0x20, 0x20,
+ 0x88, 0x20, 0x8A, 0x20, 0x9C, 0x8D, 0x8E, 0x8F,
+ 0x90, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x98, 0x20, 0x9A, 0x20, 0x9C, 0x20, 0x20, 0x9F,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0xAA, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0xB5, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7,
+ 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF,
+ 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0x20,
+ 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF,
+ 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7,
+ 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF,
+ 0x20, 0x20, 0x20, 0x20, 0xF4, 0x20, 0x20, 0x20,
+ 0x20, 0xF9, 0x20, 0xFB, 0xFC, 0x20, 0x20, 0xFF
+ ];
+ };
+
+ this.ngrams = function() {
+ return [
+ 0x20C7E1, 0x20C7E4, 0x20C8C7, 0x20DAE1, 0x20DDED, 0x20E1E1, 0x20E3E4, 0x20E6C7,
+ 0xC720C7, 0xC7C120, 0xC7CA20, 0xC7D120, 0xC7E120, 0xC7E1C3, 0xC7E1C7, 0xC7E1C8,
+ 0xC7E1CA, 0xC7E1CC, 0xC7E1CD, 0xC7E1CF, 0xC7E1D3, 0xC7E1DA, 0xC7E1DE, 0xC7E1E3,
+ 0xC7E1E6, 0xC7E1ED, 0xC7E320, 0xC7E420, 0xC7E4CA, 0xC820C7, 0xC920C7, 0xC920DD,
+ 0xC920E1, 0xC920E3, 0xC920E6, 0xCA20C7, 0xCF20C7, 0xCFC920, 0xD120C7, 0xD1C920,
+ 0xD320C7, 0xDA20C7, 0xDAE1EC, 0xDDED20, 0xE120C7, 0xE1C920, 0xE1EC20, 0xE1ED20,
+ 0xE320C7, 0xE3C720, 0xE3C920, 0xE3E420, 0xE420C7, 0xE520C7, 0xE5C720, 0xE6C7E1,
+ 0xE6E420, 0xEC20C7, 0xED20C7, 0xED20E3, 0xED20E6, 0xEDC920, 0xEDD120, 0xEDE420
+ ];
+ };
+
+ this.name = function(det) {
+ return 'windows-1256';
+ };
+
+ this.language = function() {
+ return 'ar';
+ };
+};
+util.inherits(module.exports.windows_1256, sbcs);
+
+
+module.exports.KOI8_R = function() {
+ this.byteMap = function() {
+ return [
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
+ 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F,
+ 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
+ 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
+ 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F,
+ 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
+ 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0xA3, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0xA3, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7,
+ 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF,
+ 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7,
+ 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF,
+ 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7,
+ 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF,
+ 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7,
+ 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF
+ ];
+ };
+
+ this.ngrams = function() {
+ return [
+ 0x20C4CF, 0x20C920, 0x20CBC1, 0x20CBCF, 0x20CEC1, 0x20CEC5, 0x20CFC2, 0x20D0CF,
+ 0x20D0D2, 0x20D2C1, 0x20D3CF, 0x20D3D4, 0x20D4CF, 0x20D720, 0x20D7CF, 0x20DAC1,
+ 0x20DCD4, 0x20DED4, 0xC1CEC9, 0xC1D4D8, 0xC5CCD8, 0xC5CEC9, 0xC5D3D4, 0xC5D420,
+ 0xC7CF20, 0xC920D0, 0xC9C520, 0xC9C920, 0xC9D120, 0xCCC5CE, 0xCCC920, 0xCCD8CE,
+ 0xCEC120, 0xCEC520, 0xCEC9C5, 0xCEC9D1, 0xCECF20, 0xCECFD7, 0xCF20D0, 0xCF20D3,
+ 0xCF20D7, 0xCFC7CF, 0xCFCA20, 0xCFCCD8, 0xCFCD20, 0xCFD3D4, 0xCFD720, 0xCFD7C1,
+ 0xD0CFCC, 0xD0D2C5, 0xD0D2C9, 0xD0D2CF, 0xD2C1D7, 0xD2C5C4, 0xD3D120, 0xD3D4C1,
+ 0xD3D4C9, 0xD3D4D7, 0xD4C5CC, 0xD4CF20, 0xD4CFD2, 0xD4D820, 0xD9C820, 0xDED4CF
+ ];
+ };
+
+ this.name = function(det) {
+ return 'KOI8-R';
+ };
+
+ this.language = function() {
+ return 'ru';
+ };
+};
+util.inherits(module.exports.KOI8_R, sbcs);
+
+
+/*
+module.exports.ISO_8859_7 = function() {
+ this.byteMap = function() {
+ return [
+
+ ];
+ };
+
+ this.ngrams = function() {
+ return [
+
+ ];
+ };
+
+ this.name = function(det) {
+ if (typeof det == 'undefined')
+ return 'ISO-8859-7';
+ return det.fC1Bytes ? 'windows-1253' : 'ISO-8859-7';
+ };
+
+ this.language = function() {
+ return 'el';
+ };
+};
+util.inherits(module.exports.ISO_8859_7, sbcs);
+*/
+
diff --git a/tools/node_modules/eslint/node_modules/chardet/encoding/unicode.js b/tools/node_modules/eslint/node_modules/chardet/encoding/unicode.js
new file mode 100644
index 0000000000..6458d79f88
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/chardet/encoding/unicode.js
@@ -0,0 +1,112 @@
+'use strict';
+var util = require('util'),
+ Match = require ('../match');
+
+/**
+ * This class matches UTF-16 and UTF-32, both big- and little-endian. The
+ * BOM will be used if it is present.
+ */
+module.exports.UTF_16BE = function() {
+ this.name = function() {
+ return 'UTF-16BE';
+ };
+ this.match = function(det) {
+ var input = det.fRawInput;
+
+ if (input.length >= 2 && ((input[0] & 0xff) == 0xfe && (input[1] & 0xff) == 0xff)) {
+ return new Match(det, this, 100); // confidence = 100
+ }
+
+ // TODO: Do some statistics to check for unsigned UTF-16BE
+ return null;
+ };
+};
+
+module.exports.UTF_16LE = function() {
+ this.name = function() {
+ return 'UTF-16LE';
+ };
+ this.match = function(det) {
+ var input = det.fRawInput;
+
+ if (input.length >= 2 && ((input[0] & 0xff) == 0xff && (input[1] & 0xff) == 0xfe)) {
+ // LE BOM is present.
+ if (input.length >= 4 && input[2] == 0x00 && input[3] == 0x00) {
+ // It is probably UTF-32 LE, not UTF-16
+ return null;
+ }
+ return new Match(det, this, 100); // confidence = 100
+ }
+
+ // TODO: Do some statistics to check for unsigned UTF-16LE
+ return null;
+ }
+};
+
+function UTF_32() {};
+UTF_32.prototype.match = function(det) {
+ var input = det.fRawInput,
+ limit = (det.fRawLength / 4) * 4,
+ numValid = 0,
+ numInvalid = 0,
+ hasBOM = false,
+ confidence = 0;
+
+ if (limit == 0) {
+ return null;
+ }
+
+ if (this.getChar(input, 0) == 0x0000FEFF) {
+ hasBOM = true;
+ }
+
+ for (var i = 0; i < limit; i += 4) {
+ var ch = this.getChar(input, i);
+
+ if (ch < 0 || ch >= 0x10FFFF || (ch >= 0xD800 && ch <= 0xDFFF)) {
+ numInvalid += 1;
+ } else {
+ numValid += 1;
+ }
+ }
+
+ // Cook up some sort of confidence score, based on presence of a BOM
+ // and the existence of valid and/or invalid multi-byte sequences.
+ if (hasBOM && numInvalid == 0) {
+ confidence = 100;
+ } else if (hasBOM && numValid > numInvalid * 10) {
+ confidence = 80;
+ } else if (numValid > 3 && numInvalid == 0) {
+ confidence = 100;
+ } else if (numValid > 0 && numInvalid == 0) {
+ confidence = 80;
+ } else if (numValid > numInvalid * 10) {
+ // Probably corrupt UTF-32BE data. Valid sequences aren't likely by chance.
+ confidence = 25;
+ }
+
+ // return confidence == 0 ? null : new CharsetMatch(det, this, confidence);
+ return confidence == 0 ? null : new Match(det, this, confidence);
+};
+
+module.exports.UTF_32BE = function() {
+ this.name = function() {
+ return 'UTF-32BE';
+ };
+ this.getChar = function(input, index) {
+ return (input[index + 0] & 0xff) << 24 | (input[index + 1] & 0xff) << 16 |
+ (input[index + 2] & 0xff) << 8 | (input[index + 3] & 0xff);
+ };
+};
+util.inherits(module.exports.UTF_32BE, UTF_32);
+
+module.exports.UTF_32LE = function() {
+ this.name = function() {
+ return 'UTF-32LE';
+ };
+ this.getChar = function(input, index) {
+ return (input[index + 3] & 0xff) << 24 | (input[index + 2] & 0xff) << 16 |
+ (input[index + 1] & 0xff) << 8 | (input[index + 0] & 0xff);
+ };
+};
+util.inherits(module.exports.UTF_32LE, UTF_32);
diff --git a/tools/node_modules/eslint/node_modules/chardet/encoding/utf8.js b/tools/node_modules/eslint/node_modules/chardet/encoding/utf8.js
new file mode 100644
index 0000000000..c996ce2b20
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/chardet/encoding/utf8.js
@@ -0,0 +1,84 @@
+
+var Match = require ('../match');
+
+/**
+ * Charset recognizer for UTF-8
+ */
+module.exports = function() {
+ this.name = function() {
+ return 'UTF-8';
+ };
+ this.match = function(det) {
+
+ var hasBOM = false,
+ numValid = 0,
+ numInvalid = 0,
+ input = det.fRawInput,
+ trailBytes = 0,
+ confidence;
+
+ if (det.fRawLength >= 3 &&
+ (input[0] & 0xff) == 0xef && (input[1] & 0xff) == 0xbb && (input[2] & 0xff) == 0xbf) {
+ hasBOM = true;
+ }
+
+ // Scan for multi-byte sequences
+ for (var i = 0; i < det.fRawLength; i++) {
+ var b = input[i];
+ if ((b & 0x80) == 0)
+ continue; // ASCII
+
+ // Hi bit on char found. Figure out how long the sequence should be
+ if ((b & 0x0e0) == 0x0c0) {
+ trailBytes = 1;
+ } else if ((b & 0x0f0) == 0x0e0) {
+ trailBytes = 2;
+ } else if ((b & 0x0f8) == 0xf0) {
+ trailBytes = 3;
+ } else {
+ numInvalid++;
+ if (numInvalid > 5)
+ break;
+ trailBytes = 0;
+ }
+
+ // Verify that we've got the right number of trail bytes in the sequence
+ for (;;) {
+ i++;
+ if (i >= det.fRawLength)
+ break;
+
+ if ((input[i] & 0xc0) != 0x080) {
+ numInvalid++;
+ break;
+ }
+ if (--trailBytes == 0) {
+ numValid++;
+ break;
+ }
+ }
+ }
+
+ // Cook up some sort of confidence score, based on presense of a BOM
+ // and the existence of valid and/or invalid multi-byte sequences.
+ confidence = 0;
+ if (hasBOM && numInvalid == 0)
+ confidence = 100;
+ else if (hasBOM && numValid > numInvalid * 10)
+ confidence = 80;
+ else if (numValid > 3 && numInvalid == 0)
+ confidence = 100;
+ else if (numValid > 0 && numInvalid == 0)
+ confidence = 80;
+ else if (numValid == 0 && numInvalid == 0)
+ // Plain ASCII.
+ confidence = 10;
+ else if (numValid > numInvalid * 10)
+ // Probably corruput utf-8 data. Valid sequences aren't likely by chance.
+ confidence = 25;
+ else
+ return null
+
+ return new Match(det, this, confidence);
+ };
+};
diff --git a/tools/node_modules/eslint/node_modules/chardet/index.js b/tools/node_modules/eslint/node_modules/chardet/index.js
new file mode 100644
index 0000000000..e5bceddd6c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/chardet/index.js
@@ -0,0 +1,117 @@
+
+var fs = require('fs');
+
+var utf8 = require('./encoding/utf8'),
+ unicode = require('./encoding/unicode'),
+ mbcs = require('./encoding/mbcs'),
+ sbcs = require('./encoding/sbcs'),
+ iso2022 = require('./encoding/iso2022');
+
+var self = this;
+
+var recognisers = [
+ new utf8,
+ new unicode.UTF_16BE,
+ new unicode.UTF_16LE,
+ new unicode.UTF_32BE,
+ new unicode.UTF_32LE,
+ new mbcs.sjis,
+ new mbcs.big5,
+ new mbcs.euc_jp,
+ new mbcs.euc_kr,
+ new mbcs.gb_18030,
+ new iso2022.ISO_2022_JP,
+ new iso2022.ISO_2022_KR,
+ new iso2022.ISO_2022_CN,
+ new sbcs.ISO_8859_1,
+ new sbcs.ISO_8859_2,
+ new sbcs.ISO_8859_5,
+ new sbcs.ISO_8859_6,
+ new sbcs.ISO_8859_7,
+ new sbcs.ISO_8859_8,
+ new sbcs.ISO_8859_9,
+ new sbcs.windows_1251,
+ new sbcs.windows_1256,
+ new sbcs.KOI8_R
+];
+
+module.exports.detect = function(buffer) {
+
+ // Tally up the byte occurence statistics.
+ var fByteStats = [];
+ for (var i = 0; i < 256; i++)
+ fByteStats[i] = 0;
+
+ for (var i = buffer.length - 1; i >= 0; i--)
+ fByteStats[buffer[i] & 0x00ff]++;
+
+ var fC1Bytes = false;
+ for (var i = 0x80; i <= 0x9F; i += 1) {
+ if (fByteStats[i] != 0) {
+ fC1Bytes = true;
+ break;
+ }
+ }
+
+ var context = {
+ fByteStats: fByteStats,
+ fC1Bytes: fC1Bytes,
+ fRawInput: buffer,
+ fRawLength: buffer.length,
+ fInputBytes: buffer,
+ fInputLen: buffer.length
+ };
+
+ var match = recognisers.map(function(rec) {
+ return rec.match(context);
+ }).filter(function(match) {
+ return !!match;
+ }).sort(function(a, b) {
+ return a.confidence - b.confidence;
+ }).pop();
+
+ return match ? match.name : null;
+};
+
+module.exports.detectFile = function(filepath, opts, cb) {
+ if (typeof opts === 'function') {
+ cb = opts;
+ opts = undefined;
+ }
+
+ var fd;
+
+ var handler = function(err, buffer) {
+ if (fd) {
+ fs.closeSync(fd);
+ }
+
+ if (err) return cb(err, null);
+ cb(null, self.detect(buffer));
+ };
+
+ if (opts && opts.sampleSize) {
+ fd = fs.openSync(filepath, 'r'),
+ sample = new Buffer(opts.sampleSize);
+
+ fs.read(fd, sample, 0, opts.sampleSize, null, function(err) {
+ handler(err, sample);
+ });
+ return;
+ }
+
+ fs.readFile(filepath, handler);
+};
+
+module.exports.detectFileSync = function(filepath, opts) {
+ if (opts && opts.sampleSize) {
+ var fd = fs.openSync(filepath, 'r'),
+ sample = new Buffer(opts.sampleSize);
+
+ fs.readSync(fd, sample, 0, opts.sampleSize);
+ fs.closeSync(fd);
+ return self.detect(sample);
+ }
+
+ return self.detect(fs.readFileSync(filepath));
+};
diff --git a/tools/node_modules/eslint/node_modules/chardet/match.js b/tools/node_modules/eslint/node_modules/chardet/match.js
new file mode 100644
index 0000000000..d52faa2dbc
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/chardet/match.js
@@ -0,0 +1,6 @@
+
+module.exports = function(det, rec, confidence, name, lang) {
+ this.confidence = confidence;
+ this.name = name || rec.name(det);
+ this.lang = lang;
+};
diff --git a/tools/node_modules/eslint/node_modules/chardet/package.json b/tools/node_modules/eslint/node_modules/chardet/package.json
new file mode 100644
index 0000000000..283597631c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/chardet/package.json
@@ -0,0 +1,71 @@
+{
+ "_from": "chardet@^0.4.0",
+ "_id": "chardet@0.4.0",
+ "_inBundle": false,
+ "_integrity": "sha1-C74TVaxE16PtSpJXB8TvcPgZD2w=",
+ "_location": "/eslint/chardet",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "chardet@^0.4.0",
+ "name": "chardet",
+ "escapedName": "chardet",
+ "rawSpec": "^0.4.0",
+ "saveSpec": null,
+ "fetchSpec": "^0.4.0"
+ },
+ "_requiredBy": [
+ "/eslint/external-editor"
+ ],
+ "_resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.0.tgz",
+ "_shasum": "0bbe1355ac44d7a3ed4a925707c4ef70f8190f6c",
+ "_spec": "chardet@^0.4.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/external-editor",
+ "author": {
+ "name": "Dmitry Shirokov",
+ "email": "deadrunk@gmail.com"
+ },
+ "bugs": {
+ "url": "http://github.com/runk/node-chardet/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "@spikying"
+ }
+ ],
+ "deprecated": false,
+ "description": "Character detector",
+ "devDependencies": {
+ "github-publish-release": "^4.0.0",
+ "mocha": "^4.0.1"
+ },
+ "directories": {
+ "test": "test"
+ },
+ "engine": {
+ "node": ">=4"
+ },
+ "homepage": "https://github.com/runk/node-chardet",
+ "keywords": [
+ "encoding",
+ "character",
+ "utf8",
+ "detector",
+ "chardet",
+ "icu"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "chardet",
+ "repository": {
+ "type": "git",
+ "url": "git+ssh://git@github.com/runk/node-chardet.git"
+ },
+ "scripts": {
+ "release": "scripts/release",
+ "test": "mocha -R spec --recursive"
+ },
+ "version": "0.4.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/chardet/scripts/release b/tools/node_modules/eslint/node_modules/chardet/scripts/release
new file mode 100755
index 0000000000..318196d533
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/chardet/scripts/release
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+# Exit immediately if a pipeline returns non-zero status
+# http://www.gnu.org/software/bash/manual/bashref.html#The-Set-Builtin
+set -e
+
+npm test
+
+if [ -n "$npm_config_major" ]; then SEMVER="major"
+elif [ -n "$npm_config_patch" ]; then SEMVER="patch"
+else SEMVER="minor"; fi
+
+npm version $SEMVER
+github-publish-release
+git push --follow-tags
+npm publish
diff --git a/tools/node_modules/eslint/node_modules/chardet/yarn.lock b/tools/node_modules/eslint/node_modules/chardet/yarn.lock
new file mode 100644
index 0000000000..6c5214b43b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/chardet/yarn.lock
@@ -0,0 +1,364 @@
+# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+# yarn lockfile v1
+
+
+agent-base@2:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-2.1.1.tgz#d6de10d5af6132d5bd692427d46fc538539094c7"
+ dependencies:
+ extend "~3.0.0"
+ semver "~5.0.1"
+
+balanced-match@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
+
+brace-expansion@^1.1.7:
+ version "1.1.8"
+ resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292"
+ dependencies:
+ balanced-match "^1.0.0"
+ concat-map "0.0.1"
+
+browser-stdout@1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.0.tgz#f351d32969d32fa5d7a5567154263d928ae3bd1f"
+
+commander@2.11.0:
+ version "2.11.0"
+ resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563"
+
+commander@2.9.0:
+ version "2.9.0"
+ resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4"
+ dependencies:
+ graceful-readlink ">= 1.0.0"
+
+concat-map@0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
+
+debug@2, debug@^2.2.0:
+ version "2.6.9"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
+ dependencies:
+ ms "2.0.0"
+
+debug@2.6.8:
+ version "2.6.8"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc"
+ dependencies:
+ ms "2.0.0"
+
+debug@3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
+ dependencies:
+ ms "2.0.0"
+
+diff@3.2.0:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9"
+
+diff@3.3.1:
+ version "3.3.1"
+ resolved "https://registry.yarnpkg.com/diff/-/diff-3.3.1.tgz#aa8567a6eed03c531fc89d3f711cd0e5259dec75"
+
+diff@^3.1.0:
+ version "3.4.0"
+ resolved "https://registry.yarnpkg.com/diff/-/diff-3.4.0.tgz#b1d85507daf3964828de54b37d0d73ba67dda56c"
+
+escape-string-regexp@1.0.5:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
+
+extend@3, extend@~3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444"
+
+follow-redirects@0.0.7:
+ version "0.0.7"
+ resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-0.0.7.tgz#34b90bab2a911aa347571da90f22bd36ecd8a919"
+ dependencies:
+ debug "^2.2.0"
+ stream-consume "^0.1.0"
+
+formatio@1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/formatio/-/formatio-1.2.0.tgz#f3b2167d9068c4698a8d51f4f760a39a54d818eb"
+ dependencies:
+ samsam "1.x"
+
+fs.realpath@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
+
+github-publish-release@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/github-publish-release/-/github-publish-release-4.0.0.tgz#daa538edad0f5e9d4d831c58dd83b94c1ad0fd35"
+ dependencies:
+ github "^1.1.2"
+ lodash "^4.17.4"
+ mocha "^3.1.0"
+ sinon "^2.1.0"
+
+github@^1.1.2:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/github/-/github-1.4.0.tgz#60aed8f16ffe381a3ca6dc6dba5bdd64445b7856"
+ dependencies:
+ follow-redirects "0.0.7"
+ https-proxy-agent "^1.0.0"
+ mime "^1.2.11"
+
+glob@7.1.1:
+ version "7.1.1"
+ resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8"
+ dependencies:
+ fs.realpath "^1.0.0"
+ inflight "^1.0.4"
+ inherits "2"
+ minimatch "^3.0.2"
+ once "^1.3.0"
+ path-is-absolute "^1.0.0"
+
+glob@7.1.2:
+ version "7.1.2"
+ resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
+ dependencies:
+ fs.realpath "^1.0.0"
+ inflight "^1.0.4"
+ inherits "2"
+ minimatch "^3.0.4"
+ once "^1.3.0"
+ path-is-absolute "^1.0.0"
+
+"graceful-readlink@>= 1.0.0":
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725"
+
+growl@1.10.3:
+ version "1.10.3"
+ resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.3.tgz#1926ba90cf3edfe2adb4927f5880bc22c66c790f"
+
+growl@1.9.2:
+ version "1.9.2"
+ resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f"
+
+has-flag@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa"
+
+has-flag@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51"
+
+he@1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd"
+
+https-proxy-agent@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz#35f7da6c48ce4ddbfa264891ac593ee5ff8671e6"
+ dependencies:
+ agent-base "2"
+ debug "2"
+ extend "3"
+
+inflight@^1.0.4:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
+ dependencies:
+ once "^1.3.0"
+ wrappy "1"
+
+inherits@2:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
+
+isarray@0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf"
+
+json3@3.3.2:
+ version "3.3.2"
+ resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1"
+
+lodash._baseassign@^3.0.0:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz#8c38a099500f215ad09e59f1722fd0c52bfe0a4e"
+ dependencies:
+ lodash._basecopy "^3.0.0"
+ lodash.keys "^3.0.0"
+
+lodash._basecopy@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36"
+
+lodash._basecreate@^3.0.0:
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz#1bc661614daa7fc311b7d03bf16806a0213cf821"
+
+lodash._getnative@^3.0.0:
+ version "3.9.1"
+ resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5"
+
+lodash._isiterateecall@^3.0.0:
+ version "3.0.9"
+ resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c"
+
+lodash.create@3.1.1:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/lodash.create/-/lodash.create-3.1.1.tgz#d7f2849f0dbda7e04682bb8cd72ab022461debe7"
+ dependencies:
+ lodash._baseassign "^3.0.0"
+ lodash._basecreate "^3.0.0"
+ lodash._isiterateecall "^3.0.0"
+
+lodash.isarguments@^3.0.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a"
+
+lodash.isarray@^3.0.0:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55"
+
+lodash.keys@^3.0.0:
+ version "3.1.2"
+ resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a"
+ dependencies:
+ lodash._getnative "^3.0.0"
+ lodash.isarguments "^3.0.0"
+ lodash.isarray "^3.0.0"
+
+lodash@^4.17.4:
+ version "4.17.4"
+ resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"
+
+lolex@^1.6.0:
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/lolex/-/lolex-1.6.0.tgz#3a9a0283452a47d7439e72731b9e07d7386e49f6"
+
+mime@^1.2.11:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6"
+
+minimatch@^3.0.2, minimatch@^3.0.4:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
+ dependencies:
+ brace-expansion "^1.1.7"
+
+minimist@0.0.8:
+ version "0.0.8"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
+
+mkdirp@0.5.1:
+ version "0.5.1"
+ resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
+ dependencies:
+ minimist "0.0.8"
+
+mocha@^3.1.0:
+ version "3.5.3"
+ resolved "https://registry.yarnpkg.com/mocha/-/mocha-3.5.3.tgz#1e0480fe36d2da5858d1eb6acc38418b26eaa20d"
+ dependencies:
+ browser-stdout "1.3.0"
+ commander "2.9.0"
+ debug "2.6.8"
+ diff "3.2.0"
+ escape-string-regexp "1.0.5"
+ glob "7.1.1"
+ growl "1.9.2"
+ he "1.1.1"
+ json3 "3.3.2"
+ lodash.create "3.1.1"
+ mkdirp "0.5.1"
+ supports-color "3.1.2"
+
+mocha@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/mocha/-/mocha-4.0.1.tgz#0aee5a95cf69a4618820f5e51fa31717117daf1b"
+ dependencies:
+ browser-stdout "1.3.0"
+ commander "2.11.0"
+ debug "3.1.0"
+ diff "3.3.1"
+ escape-string-regexp "1.0.5"
+ glob "7.1.2"
+ growl "1.10.3"
+ he "1.1.1"
+ mkdirp "0.5.1"
+ supports-color "4.4.0"
+
+ms@2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
+
+native-promise-only@^0.8.1:
+ version "0.8.1"
+ resolved "https://registry.yarnpkg.com/native-promise-only/-/native-promise-only-0.8.1.tgz#20a318c30cb45f71fe7adfbf7b21c99c1472ef11"
+
+once@^1.3.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
+ dependencies:
+ wrappy "1"
+
+path-is-absolute@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
+
+path-to-regexp@^1.7.0:
+ version "1.7.0"
+ resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.7.0.tgz#59fde0f435badacba103a84e9d3bc64e96b9937d"
+ dependencies:
+ isarray "0.0.1"
+
+samsam@1.x, samsam@^1.1.3:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/samsam/-/samsam-1.3.0.tgz#8d1d9350e25622da30de3e44ba692b5221ab7c50"
+
+semver@~5.0.1:
+ version "5.0.3"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-5.0.3.tgz#77466de589cd5d3c95f138aa78bc569a3cb5d27a"
+
+sinon@^2.1.0:
+ version "2.4.1"
+ resolved "https://registry.yarnpkg.com/sinon/-/sinon-2.4.1.tgz#021fd64b54cb77d9d2fb0d43cdedfae7629c3a36"
+ dependencies:
+ diff "^3.1.0"
+ formatio "1.2.0"
+ lolex "^1.6.0"
+ native-promise-only "^0.8.1"
+ path-to-regexp "^1.7.0"
+ samsam "^1.1.3"
+ text-encoding "0.6.4"
+ type-detect "^4.0.0"
+
+stream-consume@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/stream-consume/-/stream-consume-0.1.0.tgz#a41ead1a6d6081ceb79f65b061901b6d8f3d1d0f"
+
+supports-color@3.1.2:
+ version "3.1.2"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.1.2.tgz#72a262894d9d408b956ca05ff37b2ed8a6e2a2d5"
+ dependencies:
+ has-flag "^1.0.0"
+
+supports-color@4.4.0:
+ version "4.4.0"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.4.0.tgz#883f7ddabc165142b2a61427f3352ded195d1a3e"
+ dependencies:
+ has-flag "^2.0.0"
+
+text-encoding@0.6.4:
+ version "0.6.4"
+ resolved "https://registry.yarnpkg.com/text-encoding/-/text-encoding-0.6.4.tgz#e399a982257a276dae428bb92845cb71bdc26d19"
+
+type-detect@^4.0.0:
+ version "4.0.3"
+ resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.3.tgz#0e3f2670b44099b0b46c284d136a7ef49c74c2ea"
+
+wrappy@1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
diff --git a/tools/node_modules/eslint/node_modules/circular-json/LICENSE.txt b/tools/node_modules/eslint/node_modules/circular-json/LICENSE.txt
new file mode 100644
index 0000000000..e42a04b646
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/circular-json/LICENSE.txt
@@ -0,0 +1,19 @@
+Copyright (C) 2013-2017 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.
diff --git a/tools/node_modules/eslint/node_modules/circular-json/README.md b/tools/node_modules/eslint/node_modules/circular-json/README.md
new file mode 100644
index 0000000000..9cc003ef28
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/circular-json/README.md
@@ -0,0 +1,135 @@
+CircularJSON
+============
+
+![Downloads](https://img.shields.io/npm/dm/circular-json.svg) [![Build Status](https://travis-ci.org/WebReflection/circular-json.svg?branch=master)](https://travis-ci.org/WebReflection/circular-json) [![Coverage Status](https://coveralls.io/repos/github/WebReflection/circular-json/badge.svg?branch=master)](https://coveralls.io/github/WebReflection/circular-json?branch=master) [![donate](https://img.shields.io/badge/$-donate-ff69b4.svg?maxAge=2592000&style=flat)](https://github.com/WebReflection/donate)
+
+Serializes and deserializes otherwise valid JSON objects containing circular references into and from a specialized JSON format.
+
+- - -
+
+### A Working Solution To A Common Problem
+A usage example:
+
+```JavaScript
+var object = {};
+object.arr = [
+ object, object
+];
+object.arr.push(object.arr);
+object.obj = object;
+
+var serialized = CircularJSON.stringify(object);
+// '{"arr":["~","~","~arr"],"obj":"~"}'
+// NOTE: CircularJSON DOES NOT parse JS
+// it handles receiver and reviver callbacks
+
+var unserialized = CircularJSON.parse(serialized);
+// { arr: [ [Circular], [Circular] ],
+// obj: [Circular] }
+
+unserialized.obj === unserialized;
+unserialized.arr[0] === unserialized;
+unserialized.arr.pop() === unserialized.arr;
+```
+
+A quick summary:
+
+ * uses `~` as a special prefix symbol to denote which parent the reference belongs to (i.e. `~root~child1~child2`)
+ * reasonably fast in both serialization and deserialization
+ * compact serialization for easier and slimmer transportation across environments
+ * [tested and covered](test/circular-json.js) over nasty structures too
+ * compatible with all JavaScript engines
+
+Node Installation & Usage
+============
+
+```bash
+npm install --save circular-json
+```
+
+```javascript
+'use strict';
+
+var
+ CircularJSON = require('circular-json'),
+ obj = { foo: 'bar' },
+ str
+;
+
+obj.self = obj;
+str = CircularJSON.stringify(obj);
+```
+
+There are no dependencies.
+
+Browser Installation & Usage
+================
+
+* Global: <build/circular-json.js>
+* AMD: <build/circular-json.amd.js>
+* CommonJS: <build/circular-json.node.js>
+
+(generated via [gitstrap](https://github.com/WebReflection/gitstrap))
+
+```html
+<script src="build/circular-json.js"></script>
+```
+
+```javascript
+'use strict';
+
+var CircularJSON = window.CircularJSON
+ , obj = { foo: 'bar' }
+ , str
+ ;
+
+obj.self = obj;
+str = CircularJSON.stringify(obj);
+```
+
+NOTE: Platforms without native JSON (i.e. MSIE <= 8) requires `json3.js` or similar.
+
+It is also *a bad idea* to `CircularJSON.parse(JSON.stringify(object))` because of those manipulation used in `CircularJSON.stringify()` able to make parsing safe and secure.
+
+As summary: `CircularJSON.parse(CircularJSON.stringify(object))` is the way to go, same is for `JSON.parse(JSON.stringify(object))`.
+
+API
+===
+
+It's the same as native JSON, except the fourth parameter `placeholder`, which circular references to be replaced with `"[Circular]"` (i.e. for logging).
+
+* CircularJSON.stringify(object, replacer, spacer, placeholder)
+* CircularJSON.parse(string, reviver)
+
+Bear in mind `JSON.parse(CircularJSON.stringify(object))` will work but not produce the expected output.
+
+Similar Libraries
+=======
+
+### Why Not the [@izs](https://twitter.com/izs) One
+The module [json-stringify-safe](https://github.com/isaacs/json-stringify-safe) seems to be for `console.log()` but it's completely pointless for `JSON.parse()`, being latter one unable to retrieve back the initial structure. Here an example:
+
+```JavaScript
+// a logged object with circular references
+{
+ "circularRef": "[Circular]",
+ "list": [
+ "[Circular]",
+ "[Circular]"
+ ]
+}
+// what do we do with above output ?
+```
+
+Just type this in your `node` console: `var o = {}; o.a = o; console.log(o);`. The output will be `{ a: [Circular] }` ... good, but that ain't really solving the problem.
+
+However, if that's all you need, the function used to create that kind of output is probably faster than `CircularJSON` and surely fits in less lines of code.
+
+
+### Why Not {{put random name}} Solution
+So here the thing: circular references can be wrong but, if there is a need for them, any attempt to ignore them or remove them can be considered just a failure.
+
+Not because the method is bad or it's not working, simply because the circular info, the one we needed and used in the first place, is lost!
+
+In this case, `CircularJSON` does even more than just solve circular and recursions: it maps all same objects so that less memory is used as well on deserialization as less bandwidth too!
+It's able to redefine those references back later on so the way we store is the way we retrieve and in a reasonably performant way, also trusting the snappy and native `JSON` methods to iterate.
diff --git a/tools/node_modules/eslint/node_modules/circular-json/build/circular-json.js b/tools/node_modules/eslint/node_modules/circular-json/build/circular-json.js
new file mode 100644
index 0000000000..acf1c2599e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/circular-json/build/circular-json.js
@@ -0,0 +1,2 @@
+/*! (C) WebReflection Mit Style License */
+var CircularJSON=function(e,t){function l(e,t,o){var u=[],f=[e],l=[e],c=[o?n:"[Circular]"],h=e,p=1,d;return function(e,v){return t&&(v=t.call(this,e,v)),e!==""&&(h!==this&&(d=p-a.call(f,this)-1,p-=d,f.splice(p,f.length),u.splice(p-1,u.length),h=this),typeof v=="object"&&v?(a.call(f,v)<0&&f.push(h=v),p=f.length,d=a.call(l,v),d<0?(d=l.push(v)-1,o?(u.push((""+e).replace(s,r)),c[d]=n+u.join(n)):c[d]=c[0]):v=c[d]):typeof v=="string"&&o&&(v=v.replace(r,i).replace(n,r))),v}}function c(e,t){for(var r=0,i=t.length;r<i;e=e[t[r++].replace(o,n)]);return e}function h(e){return function(t,s){var o=typeof s=="string";return o&&s.charAt(0)===n?new f(s.slice(1)):(t===""&&(s=v(s,s,{})),o&&(s=s.replace(u,"$1"+n).replace(i,r)),e?e.call(this,t,s):s)}}function p(e,t,n){for(var r=0,i=t.length;r<i;r++)t[r]=v(e,t[r],n);return t}function d(e,t,n){for(var r in t)t.hasOwnProperty(r)&&(t[r]=v(e,t[r],n));return t}function v(e,t,r){return t instanceof Array?p(e,t,r):t instanceof f?t.length?r.hasOwnProperty(t)?r[t]:r[t]=c(e,t.split(n)):e:t instanceof Object?d(e,t,r):t}function m(t,n,r,i){return e.stringify(t,l(t,n,!i),r)}function g(t,n){return e.parse(t,h(n))}var n="~",r="\\x"+("0"+n.charCodeAt(0).toString(16)).slice(-2),i="\\"+r,s=new t(r,"g"),o=new t(i,"g"),u=new t("(?:^|([^\\\\]))"+i),a=[].indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},f=String;return{stringify:m,parse:g}}(JSON,RegExp); \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/circular-json/build/circular-json.max.js b/tools/node_modules/eslint/node_modules/circular-json/build/circular-json.max.js
new file mode 100644
index 0000000000..5ad5ffad85
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/circular-json/build/circular-json.max.js
@@ -0,0 +1,189 @@
+/*!
+Copyright (C) 2013 by 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.
+
+*/
+var CircularJSON = (function(JSON, RegExp){
+var
+ // should be a not so common char
+ // possibly one JSON does not encode
+ // possibly one encodeURIComponent does not encode
+ // right now this char is '~' but this might change in the future
+ specialChar = '~',
+ safeSpecialChar = '\\x' + (
+ '0' + specialChar.charCodeAt(0).toString(16)
+ ).slice(-2),
+ escapedSafeSpecialChar = '\\' + safeSpecialChar,
+ specialCharRG = new RegExp(safeSpecialChar, 'g'),
+ safeSpecialCharRG = new RegExp(escapedSafeSpecialChar, 'g'),
+
+ safeStartWithSpecialCharRG = new RegExp('(?:^|([^\\\\]))' + escapedSafeSpecialChar),
+
+ indexOf = [].indexOf || function(v){
+ for(var i=this.length;i--&&this[i]!==v;);
+ return i;
+ },
+ $String = String // there's no way to drop warnings in JSHint
+ // about new String ... well, I need that here!
+ // faked, and happy linter!
+;
+
+function generateReplacer(value, replacer, resolve) {
+ var
+ path = [],
+ all = [value],
+ seen = [value],
+ mapp = [resolve ? specialChar : '[Circular]'],
+ last = value,
+ lvl = 1,
+ i
+ ;
+ return function(key, value) {
+ // the replacer has rights to decide
+ // if a new object should be returned
+ // or if there's some key to drop
+ // let's call it here rather than "too late"
+ if (replacer) value = replacer.call(this, key, value);
+
+ // did you know ? Safari passes keys as integers for arrays
+ // which means if (key) when key === 0 won't pass the check
+ if (key !== '') {
+ if (last !== this) {
+ i = lvl - indexOf.call(all, this) - 1;
+ lvl -= i;
+ all.splice(lvl, all.length);
+ path.splice(lvl - 1, path.length);
+ last = this;
+ }
+ // console.log(lvl, key, path);
+ if (typeof value === 'object' && value) {
+ // if object isn't referring to parent object, add to the
+ // object path stack. Otherwise it is already there.
+ if (indexOf.call(all, value) < 0) {
+ all.push(last = value);
+ }
+ lvl = all.length;
+ i = indexOf.call(seen, value);
+ if (i < 0) {
+ i = seen.push(value) - 1;
+ if (resolve) {
+ // key cannot contain specialChar but could be not a string
+ path.push(('' + key).replace(specialCharRG, safeSpecialChar));
+ mapp[i] = specialChar + path.join(specialChar);
+ } else {
+ mapp[i] = mapp[0];
+ }
+ } else {
+ value = mapp[i];
+ }
+ } else {
+ if (typeof value === 'string' && resolve) {
+ // ensure no special char involved on deserialization
+ // in this case only first char is important
+ // no need to replace all value (better performance)
+ value = value .replace(safeSpecialChar, escapedSafeSpecialChar)
+ .replace(specialChar, safeSpecialChar);
+ }
+ }
+ }
+ return value;
+ };
+}
+
+function retrieveFromPath(current, keys) {
+ for(var i = 0, length = keys.length; i < length; current = current[
+ // keys should be normalized back here
+ keys[i++].replace(safeSpecialCharRG, specialChar)
+ ]);
+ return current;
+}
+
+function generateReviver(reviver) {
+ return function(key, value) {
+ var isString = typeof value === 'string';
+ if (isString && value.charAt(0) === specialChar) {
+ return new $String(value.slice(1));
+ }
+ if (key === '') value = regenerate(value, value, {});
+ // again, only one needed, do not use the RegExp for this replacement
+ // only keys need the RegExp
+ if (isString) value = value .replace(safeStartWithSpecialCharRG, '$1' + specialChar)
+ .replace(escapedSafeSpecialChar, safeSpecialChar);
+ return reviver ? reviver.call(this, key, value) : value;
+ };
+}
+
+function regenerateArray(root, current, retrieve) {
+ for (var i = 0, length = current.length; i < length; i++) {
+ current[i] = regenerate(root, current[i], retrieve);
+ }
+ return current;
+}
+
+function regenerateObject(root, current, retrieve) {
+ for (var key in current) {
+ if (current.hasOwnProperty(key)) {
+ current[key] = regenerate(root, current[key], retrieve);
+ }
+ }
+ return current;
+}
+
+function regenerate(root, current, retrieve) {
+ return current instanceof Array ?
+ // fast Array reconstruction
+ regenerateArray(root, current, retrieve) :
+ (
+ current instanceof $String ?
+ (
+ // root is an empty string
+ current.length ?
+ (
+ retrieve.hasOwnProperty(current) ?
+ retrieve[current] :
+ retrieve[current] = retrieveFromPath(
+ root, current.split(specialChar)
+ )
+ ) :
+ root
+ ) :
+ (
+ current instanceof Object ?
+ // dedicated Object parser
+ regenerateObject(root, current, retrieve) :
+ // value as it is
+ current
+ )
+ )
+ ;
+}
+
+function stringifyRecursion(value, replacer, space, doNotResolve) {
+ return JSON.stringify(value, generateReplacer(value, replacer, !doNotResolve), space);
+}
+
+function parseRecursion(text, reviver) {
+ return JSON.parse(text, generateReviver(reviver));
+}
+return {
+ stringify: stringifyRecursion,
+ parse: parseRecursion
+};
+}(JSON, RegExp)); \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/circular-json/build/circular-json.node.js b/tools/node_modules/eslint/node_modules/circular-json/build/circular-json.node.js
new file mode 100644
index 0000000000..576266fe65
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/circular-json/build/circular-json.node.js
@@ -0,0 +1,185 @@
+/*!
+Copyright (C) 2013 by 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.
+
+*/
+var
+ // should be a not so common char
+ // possibly one JSON does not encode
+ // possibly one encodeURIComponent does not encode
+ // right now this char is '~' but this might change in the future
+ specialChar = '~',
+ safeSpecialChar = '\\x' + (
+ '0' + specialChar.charCodeAt(0).toString(16)
+ ).slice(-2),
+ escapedSafeSpecialChar = '\\' + safeSpecialChar,
+ specialCharRG = new RegExp(safeSpecialChar, 'g'),
+ safeSpecialCharRG = new RegExp(escapedSafeSpecialChar, 'g'),
+
+ safeStartWithSpecialCharRG = new RegExp('(?:^|([^\\\\]))' + escapedSafeSpecialChar),
+
+ indexOf = [].indexOf || function(v){
+ for(var i=this.length;i--&&this[i]!==v;);
+ return i;
+ },
+ $String = String // there's no way to drop warnings in JSHint
+ // about new String ... well, I need that here!
+ // faked, and happy linter!
+;
+
+function generateReplacer(value, replacer, resolve) {
+ var
+ path = [],
+ all = [value],
+ seen = [value],
+ mapp = [resolve ? specialChar : '[Circular]'],
+ last = value,
+ lvl = 1,
+ i
+ ;
+ return function(key, value) {
+ // the replacer has rights to decide
+ // if a new object should be returned
+ // or if there's some key to drop
+ // let's call it here rather than "too late"
+ if (replacer) value = replacer.call(this, key, value);
+
+ // did you know ? Safari passes keys as integers for arrays
+ // which means if (key) when key === 0 won't pass the check
+ if (key !== '') {
+ if (last !== this) {
+ i = lvl - indexOf.call(all, this) - 1;
+ lvl -= i;
+ all.splice(lvl, all.length);
+ path.splice(lvl - 1, path.length);
+ last = this;
+ }
+ // console.log(lvl, key, path);
+ if (typeof value === 'object' && value) {
+ // if object isn't referring to parent object, add to the
+ // object path stack. Otherwise it is already there.
+ if (indexOf.call(all, value) < 0) {
+ all.push(last = value);
+ }
+ lvl = all.length;
+ i = indexOf.call(seen, value);
+ if (i < 0) {
+ i = seen.push(value) - 1;
+ if (resolve) {
+ // key cannot contain specialChar but could be not a string
+ path.push(('' + key).replace(specialCharRG, safeSpecialChar));
+ mapp[i] = specialChar + path.join(specialChar);
+ } else {
+ mapp[i] = mapp[0];
+ }
+ } else {
+ value = mapp[i];
+ }
+ } else {
+ if (typeof value === 'string' && resolve) {
+ // ensure no special char involved on deserialization
+ // in this case only first char is important
+ // no need to replace all value (better performance)
+ value = value .replace(safeSpecialChar, escapedSafeSpecialChar)
+ .replace(specialChar, safeSpecialChar);
+ }
+ }
+ }
+ return value;
+ };
+}
+
+function retrieveFromPath(current, keys) {
+ for(var i = 0, length = keys.length; i < length; current = current[
+ // keys should be normalized back here
+ keys[i++].replace(safeSpecialCharRG, specialChar)
+ ]);
+ return current;
+}
+
+function generateReviver(reviver) {
+ return function(key, value) {
+ var isString = typeof value === 'string';
+ if (isString && value.charAt(0) === specialChar) {
+ return new $String(value.slice(1));
+ }
+ if (key === '') value = regenerate(value, value, {});
+ // again, only one needed, do not use the RegExp for this replacement
+ // only keys need the RegExp
+ if (isString) value = value .replace(safeStartWithSpecialCharRG, '$1' + specialChar)
+ .replace(escapedSafeSpecialChar, safeSpecialChar);
+ return reviver ? reviver.call(this, key, value) : value;
+ };
+}
+
+function regenerateArray(root, current, retrieve) {
+ for (var i = 0, length = current.length; i < length; i++) {
+ current[i] = regenerate(root, current[i], retrieve);
+ }
+ return current;
+}
+
+function regenerateObject(root, current, retrieve) {
+ for (var key in current) {
+ if (current.hasOwnProperty(key)) {
+ current[key] = regenerate(root, current[key], retrieve);
+ }
+ }
+ return current;
+}
+
+function regenerate(root, current, retrieve) {
+ return current instanceof Array ?
+ // fast Array reconstruction
+ regenerateArray(root, current, retrieve) :
+ (
+ current instanceof $String ?
+ (
+ // root is an empty string
+ current.length ?
+ (
+ retrieve.hasOwnProperty(current) ?
+ retrieve[current] :
+ retrieve[current] = retrieveFromPath(
+ root, current.split(specialChar)
+ )
+ ) :
+ root
+ ) :
+ (
+ current instanceof Object ?
+ // dedicated Object parser
+ regenerateObject(root, current, retrieve) :
+ // value as it is
+ current
+ )
+ )
+ ;
+}
+
+function stringifyRecursion(value, replacer, space, doNotResolve) {
+ return JSON.stringify(value, generateReplacer(value, replacer, !doNotResolve), space);
+}
+
+function parseRecursion(text, reviver) {
+ return JSON.parse(text, generateReviver(reviver));
+}
+this.stringify = stringifyRecursion;
+this.parse = parseRecursion; \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/circular-json/package.json b/tools/node_modules/eslint/node_modules/circular-json/package.json
new file mode 100644
index 0000000000..7ed781a415
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/circular-json/package.json
@@ -0,0 +1,65 @@
+{
+ "_from": "circular-json@^0.3.1",
+ "_id": "circular-json@0.3.3",
+ "_inBundle": false,
+ "_integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==",
+ "_location": "/eslint/circular-json",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "circular-json@^0.3.1",
+ "name": "circular-json",
+ "escapedName": "circular-json",
+ "rawSpec": "^0.3.1",
+ "saveSpec": null,
+ "fetchSpec": "^0.3.1"
+ },
+ "_requiredBy": [
+ "/eslint/flat-cache"
+ ],
+ "_resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz",
+ "_shasum": "815c99ea84f6809529d2f45791bdf82711352d66",
+ "_spec": "circular-json@^0.3.1",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/flat-cache",
+ "author": {
+ "name": "Andrea Giammarchi",
+ "url": "http://webreflection.blogspot.com/"
+ },
+ "bugs": {
+ "url": "https://github.com/WebReflection/circular-json/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "JSON does not handle circular references. This version does",
+ "devDependencies": {
+ "coveralls": "^2.13.0",
+ "istanbul": "^0.4.5",
+ "tiny-cdn": "^0.7.0",
+ "tressa": "^0.3.1"
+ },
+ "generator": "https://github.com/WebReflection/gitstrap",
+ "homepage": "https://github.com/WebReflection/circular-json",
+ "keywords": [
+ "JSON",
+ "circular",
+ "reference",
+ "recursive",
+ "recursion",
+ "parse",
+ "stringify"
+ ],
+ "license": "MIT",
+ "main": "./build/circular-json.node.js",
+ "name": "circular-json",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/WebReflection/circular-json.git"
+ },
+ "scripts": {
+ "coveralls": "cat ./coverage/lcov.info | coveralls",
+ "test": "istanbul cover test/circular-json.js",
+ "web": "$(sleep 2 && open http://0.0.0.0:7151/) & tiny-cdn run ./"
+ },
+ "version": "0.3.3"
+}
diff --git a/tools/node_modules/eslint/node_modules/circular-json/template/license.after b/tools/node_modules/eslint/node_modules/circular-json/template/license.after
new file mode 100644
index 0000000000..d7365df165
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/circular-json/template/license.after
@@ -0,0 +1,2 @@
+
+*/
diff --git a/tools/node_modules/eslint/node_modules/circular-json/template/license.before b/tools/node_modules/eslint/node_modules/circular-json/template/license.before
new file mode 100644
index 0000000000..bf11147bdb
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/circular-json/template/license.before
@@ -0,0 +1 @@
+/*!
diff --git a/tools/node_modules/eslint/node_modules/cli-cursor/index.js b/tools/node_modules/eslint/node_modules/cli-cursor/index.js
new file mode 100644
index 0000000000..6284a82896
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/cli-cursor/index.js
@@ -0,0 +1,39 @@
+'use strict';
+const restoreCursor = require('restore-cursor');
+
+let hidden = false;
+
+exports.show = stream => {
+ const s = stream || process.stderr;
+
+ if (!s.isTTY) {
+ return;
+ }
+
+ hidden = false;
+ s.write('\u001b[?25h');
+};
+
+exports.hide = stream => {
+ const s = stream || process.stderr;
+
+ if (!s.isTTY) {
+ return;
+ }
+
+ restoreCursor();
+ hidden = true;
+ s.write('\u001b[?25l');
+};
+
+exports.toggle = (force, stream) => {
+ if (force !== undefined) {
+ hidden = force;
+ }
+
+ if (hidden) {
+ exports.show(stream);
+ } else {
+ exports.hide(stream);
+ }
+};
diff --git a/tools/node_modules/eslint/node_modules/cli-cursor/license b/tools/node_modules/eslint/node_modules/cli-cursor/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/cli-cursor/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/tools/node_modules/eslint/node_modules/cli-cursor/package.json b/tools/node_modules/eslint/node_modules/cli-cursor/package.json
new file mode 100644
index 0000000000..f8cd465948
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/cli-cursor/package.json
@@ -0,0 +1,78 @@
+{
+ "_from": "cli-cursor@^2.1.0",
+ "_id": "cli-cursor@2.1.0",
+ "_inBundle": false,
+ "_integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=",
+ "_location": "/eslint/cli-cursor",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "cli-cursor@^2.1.0",
+ "name": "cli-cursor",
+ "escapedName": "cli-cursor",
+ "rawSpec": "^2.1.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.1.0"
+ },
+ "_requiredBy": [
+ "/eslint/inquirer"
+ ],
+ "_resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz",
+ "_shasum": "b35dac376479facc3e94747d41d0d0f5238ffcb5",
+ "_spec": "cli-cursor@^2.1.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/inquirer",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/cli-cursor/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "restore-cursor": "^2.0.0"
+ },
+ "deprecated": false,
+ "description": "Toggle the CLI cursor",
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/cli-cursor#readme",
+ "keywords": [
+ "cli",
+ "cursor",
+ "ansi",
+ "toggle",
+ "display",
+ "show",
+ "hide",
+ "term",
+ "terminal",
+ "console",
+ "tty",
+ "shell",
+ "command-line"
+ ],
+ "license": "MIT",
+ "name": "cli-cursor",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/cli-cursor.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "2.1.0",
+ "xo": {
+ "esnext": true
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/cli-cursor/readme.md b/tools/node_modules/eslint/node_modules/cli-cursor/readme.md
new file mode 100644
index 0000000000..75c18e5fea
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/cli-cursor/readme.md
@@ -0,0 +1,45 @@
+# cli-cursor [![Build Status](https://travis-ci.org/sindresorhus/cli-cursor.svg?branch=master)](https://travis-ci.org/sindresorhus/cli-cursor)
+
+> Toggle the CLI cursor
+
+The cursor is [gracefully restored](https://github.com/sindresorhus/restore-cursor) if the process exits.
+
+
+## Install
+
+```
+$ npm install --save cli-cursor
+```
+
+
+## Usage
+
+```js
+const cliCursor = require('cli-cursor');
+
+cliCursor.hide();
+
+const unicornsAreAwesome = true;
+cliCursor.toggle(unicornsAreAwesome);
+```
+
+
+## API
+
+### .show([stream])
+
+### .hide([stream])
+
+### .toggle(force, [stream])
+
+`force` is useful to show or hide the cursor based on a boolean.
+
+#### stream
+
+Type: `Stream`<br>
+Default: `process.stderr`
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/tools/node_modules/eslint/node_modules/cli-width/LICENSE b/tools/node_modules/eslint/node_modules/cli-width/LICENSE
new file mode 100644
index 0000000000..173ed31910
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/cli-width/LICENSE
@@ -0,0 +1,13 @@
+Copyright (c) 2015, Ilya Radchenko <ilya@burstcreations.com>
+
+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/tools/node_modules/eslint/node_modules/cli-width/README.md b/tools/node_modules/eslint/node_modules/cli-width/README.md
new file mode 100644
index 0000000000..b7157ea528
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/cli-width/README.md
@@ -0,0 +1,72 @@
+cli-width
+=========
+
+Get stdout window width, with four fallbacks, `tty`, `output.columns`, a custom environment variable and then a default.
+
+[![npm version](https://badge.fury.io/js/cli-width.svg)](http://badge.fury.io/js/cli-width)
+[![Build Status](https://travis-ci.org/knownasilya/cli-width.svg)](https://travis-ci.org/knownasilya/cli-width)
+[![Coverage Status](https://coveralls.io/repos/knownasilya/cli-width/badge.svg?branch=master&service=github)](https://coveralls.io/github/knownasilya/cli-width?branch=master)
+
+## Usage
+
+```
+npm install --save cli-width
+```
+
+```js
+'use strict';
+
+var cliWidth = require('cli-width');
+
+cliWidth(); // maybe 204 :)
+```
+
+You can also set the `CLI_WIDTH` environment variable.
+
+If none of the methods are supported, and the environment variable isn't set,
+the default width value is going to be `0`, that can be changed using the configurable `options`.
+
+## API
+
+### cliWidth([options])
+
+`cliWidth` can be configured using an `options` parameter, the possible properties are:
+
+- **defaultWidth**\<number\> Defines a default value to be used if none of the methods are available, defaults to `0`
+- **output**\<object\> A stream to be used to read width values from, defaults to `process.stdout`
+- **tty**\<object\> TTY module to try to read width from as a fallback, defaults to `require('tty')`
+
+
+### Examples
+
+Defining both a default width value and a stream output to try to read from:
+
+```js
+var cliWidth = require('cli-width');
+var ttys = require('ttys');
+
+cliWidth({
+ defaultWidth: 80,
+ output: ttys.output
+});
+```
+
+Defines a different tty module to read width from:
+
+```js
+var cliWidth = require('cli-width');
+var ttys = require('ttys');
+
+cliWidth({
+ tty: ttys
+});
+```
+
+## Tests
+
+```bash
+npm install
+npm test
+```
+
+Coverage can be generated with `npm run coverage`.
diff --git a/tools/node_modules/eslint/node_modules/cli-width/index.js b/tools/node_modules/eslint/node_modules/cli-width/index.js
new file mode 100644
index 0000000000..de939f3194
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/cli-width/index.js
@@ -0,0 +1,49 @@
+'use strict';
+
+exports = module.exports = cliWidth;
+
+function normalizeOpts(options) {
+ var defaultOpts = {
+ defaultWidth: 0,
+ output: process.stdout,
+ tty: require('tty')
+ };
+
+ if (!options) {
+ return defaultOpts;
+ } else {
+ Object.keys(defaultOpts).forEach(function (key) {
+ if (!options[key]) {
+ options[key] = defaultOpts[key];
+ }
+ });
+
+ return options;
+ }
+}
+
+function cliWidth(options) {
+ var opts = normalizeOpts(options);
+
+ if (opts.output.getWindowSize) {
+ return opts.output.getWindowSize()[0] || opts.defaultWidth;
+ } else {
+ if (opts.tty.getWindowSize) {
+ return opts.tty.getWindowSize()[1] || opts.defaultWidth;
+ } else {
+ if (opts.output.columns) {
+ return opts.output.columns;
+ } else {
+ if (process.env.CLI_WIDTH) {
+ var width = parseInt(process.env.CLI_WIDTH, 10);
+
+ if (!isNaN(width) && width !== 0) {
+ return width;
+ }
+ }
+ }
+
+ return opts.defaultWidth;
+ }
+ }
+};
diff --git a/tools/node_modules/eslint/node_modules/cli-width/package.json b/tools/node_modules/eslint/node_modules/cli-width/package.json
new file mode 100644
index 0000000000..0b0c2c5345
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/cli-width/package.json
@@ -0,0 +1,59 @@
+{
+ "_from": "cli-width@^2.0.0",
+ "_id": "cli-width@2.2.0",
+ "_inBundle": false,
+ "_integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=",
+ "_location": "/eslint/cli-width",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "cli-width@^2.0.0",
+ "name": "cli-width",
+ "escapedName": "cli-width",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/eslint/inquirer"
+ ],
+ "_resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz",
+ "_shasum": "ff19ede8a9a5e579324147b0c11f0fbcbabed639",
+ "_spec": "cli-width@^2.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/inquirer",
+ "author": {
+ "name": "Ilya Radchenko",
+ "email": "ilya@burstcreations.com"
+ },
+ "bugs": {
+ "url": "https://github.com/knownasilya/cli-width/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Get stdout window width, with two fallbacks, tty and then a default.",
+ "devDependencies": {
+ "coveralls": "^2.11.4",
+ "isparta": "^3.0.4",
+ "rimraf": "^2.4.3",
+ "standard-version": "^4.2.0",
+ "tap-spec": "^4.1.0",
+ "tape": "^3.4.0"
+ },
+ "homepage": "https://github.com/knownasilya/cli-width",
+ "license": "ISC",
+ "main": "index.js",
+ "name": "cli-width",
+ "repository": {
+ "type": "git",
+ "url": "git+ssh://git@github.com/knownasilya/cli-width.git"
+ },
+ "scripts": {
+ "coverage": "isparta cover test/*.js | tspec",
+ "coveralls": "npm run coverage -s && coveralls < coverage/lcov.info",
+ "postcoveralls": "rimraf ./coverage",
+ "release": "standard-version",
+ "test": "node test | tspec"
+ },
+ "version": "2.2.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/co/LICENSE b/tools/node_modules/eslint/node_modules/co/LICENSE
new file mode 100644
index 0000000000..92faba5db3
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/co/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2014 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
+
+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/tools/node_modules/eslint/node_modules/co/Readme.md b/tools/node_modules/eslint/node_modules/co/Readme.md
new file mode 100644
index 0000000000..c1d4882a13
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/co/Readme.md
@@ -0,0 +1,212 @@
+# co
+
+[![Gitter][gitter-image]][gitter-url]
+[![NPM version][npm-image]][npm-url]
+[![Build status][travis-image]][travis-url]
+[![Test coverage][coveralls-image]][coveralls-url]
+[![Downloads][downloads-image]][downloads-url]
+
+ Generator based control flow goodness for nodejs and the browser,
+ using promises, letting you write non-blocking code in a nice-ish way.
+
+## Co v4
+
+ `co@4.0.0` has been released, which now relies on promises.
+ It is a stepping stone towards [ES7 async/await](https://github.com/lukehoban/ecmascript-asyncawait).
+ The primary API change is how `co()` is invoked.
+ Before, `co` returned a "thunk", which you then called with a callback and optional arguments.
+ Now, `co()` returns a promise.
+
+```js
+co(function* () {
+ var result = yield Promise.resolve(true);
+ return result;
+}).then(function (value) {
+ console.log(value);
+}, function (err) {
+ console.error(err.stack);
+});
+```
+
+ If you want to convert a `co`-generator-function into a regular function that returns a promise,
+ you now use `co.wrap(fn*)`.
+
+```js
+var fn = co.wrap(function* (val) {
+ return yield Promise.resolve(val);
+});
+
+fn(true).then(function (val) {
+
+});
+```
+
+## Platform Compatibility
+
+ `co@4+` requires a `Promise` implementation.
+ For versions of node `< 0.11` and for many older browsers,
+ you should/must include your own `Promise` polyfill.
+
+ When using node 0.11.x or greater, you must use the `--harmony-generators`
+ flag or just `--harmony` to get access to generators.
+
+ When using node 0.10.x and lower or browsers without generator support,
+ you must use [gnode](https://github.com/TooTallNate/gnode) and/or [regenerator](http://facebook.github.io/regenerator/).
+
+ io.js is supported out of the box, you can use `co` without flags or polyfills.
+
+## Installation
+
+```
+$ npm install co
+```
+
+## Associated libraries
+
+Any library that returns promises work well with `co`.
+
+- [mz](https://github.com/normalize/mz) - wrap all of node's code libraries as promises.
+
+View the [wiki](https://github.com/visionmedia/co/wiki) for more libraries.
+
+## Examples
+
+```js
+var co = require('co');
+
+co(function *(){
+ // yield any promise
+ var result = yield Promise.resolve(true);
+}).catch(onerror);
+
+co(function *(){
+ // resolve multiple promises in parallel
+ var a = Promise.resolve(1);
+ var b = Promise.resolve(2);
+ var c = Promise.resolve(3);
+ var res = yield [a, b, c];
+ console.log(res);
+ // => [1, 2, 3]
+}).catch(onerror);
+
+// errors can be try/catched
+co(function *(){
+ try {
+ yield Promise.reject(new Error('boom'));
+ } catch (err) {
+ console.error(err.message); // "boom"
+ }
+}).catch(onerror);
+
+function onerror(err) {
+ // log any uncaught errors
+ // co will not throw any errors you do not handle!!!
+ // HANDLE ALL YOUR ERRORS!!!
+ console.error(err.stack);
+}
+```
+
+## Yieldables
+
+ The `yieldable` objects currently supported are:
+
+ - promises
+ - thunks (functions)
+ - array (parallel execution)
+ - objects (parallel execution)
+ - generators (delegation)
+ - generator functions (delegation)
+
+Nested `yieldable` objects are supported, meaning you can nest
+promises within objects within arrays, and so on!
+
+### Promises
+
+[Read more on promises!](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)
+
+### Thunks
+
+Thunks are functions that only have a single argument, a callback.
+Thunk support only remains for backwards compatibility and may
+be removed in future versions of `co`.
+
+### Arrays
+
+`yield`ing an array will resolve all the `yieldables` in parallel.
+
+```js
+co(function* () {
+ var res = yield [
+ Promise.resolve(1),
+ Promise.resolve(2),
+ Promise.resolve(3),
+ ];
+ console.log(res); // => [1, 2, 3]
+}).catch(onerror);
+```
+
+### Objects
+
+Just like arrays, objects resolve all `yieldable`s in parallel.
+
+```js
+co(function* () {
+ var res = yield {
+ 1: Promise.resolve(1),
+ 2: Promise.resolve(2),
+ };
+ console.log(res); // => { 1: 1, 2: 2 }
+}).catch(onerror);
+```
+
+### Generators and Generator Functions
+
+Any generator or generator function you can pass into `co`
+can be yielded as well. This should generally be avoided
+as we should be moving towards spec-compliant `Promise`s instead.
+
+## API
+
+### co(fn*).then( val => )
+
+Returns a promise that resolves a generator, generator function,
+or any function that returns a generator.
+
+```js
+co(function* () {
+ return yield Promise.resolve(true);
+}).then(function (val) {
+ console.log(val);
+}, function (err) {
+ console.error(err.stack);
+});
+```
+
+### var fn = co.wrap(fn*)
+
+Convert a generator into a regular function that returns a `Promise`.
+
+```js
+var fn = co.wrap(function* (val) {
+ return yield Promise.resolve(val);
+});
+
+fn(true).then(function (val) {
+
+});
+```
+
+## License
+
+ MIT
+
+[npm-image]: https://img.shields.io/npm/v/co.svg?style=flat-square
+[npm-url]: https://npmjs.org/package/co
+[travis-image]: https://img.shields.io/travis/tj/co.svg?style=flat-square
+[travis-url]: https://travis-ci.org/tj/co
+[coveralls-image]: https://img.shields.io/coveralls/tj/co.svg?style=flat-square
+[coveralls-url]: https://coveralls.io/r/tj/co
+[downloads-image]: http://img.shields.io/npm/dm/co.svg?style=flat-square
+[downloads-url]: https://npmjs.org/package/co
+[gitter-image]: https://badges.gitter.im/Join%20Chat.svg
+[gitter-url]: https://gitter.im/tj/co?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
diff --git a/tools/node_modules/eslint/node_modules/co/index.js b/tools/node_modules/eslint/node_modules/co/index.js
new file mode 100644
index 0000000000..87ba8ba8b4
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/co/index.js
@@ -0,0 +1,237 @@
+
+/**
+ * slice() reference.
+ */
+
+var slice = Array.prototype.slice;
+
+/**
+ * Expose `co`.
+ */
+
+module.exports = co['default'] = co.co = co;
+
+/**
+ * Wrap the given generator `fn` into a
+ * function that returns a promise.
+ * This is a separate function so that
+ * every `co()` call doesn't create a new,
+ * unnecessary closure.
+ *
+ * @param {GeneratorFunction} fn
+ * @return {Function}
+ * @api public
+ */
+
+co.wrap = function (fn) {
+ createPromise.__generatorFunction__ = fn;
+ return createPromise;
+ function createPromise() {
+ return co.call(this, fn.apply(this, arguments));
+ }
+};
+
+/**
+ * Execute the generator function or a generator
+ * and return a promise.
+ *
+ * @param {Function} fn
+ * @return {Promise}
+ * @api public
+ */
+
+function co(gen) {
+ var ctx = this;
+ var args = slice.call(arguments, 1)
+
+ // we wrap everything in a promise to avoid promise chaining,
+ // which leads to memory leak errors.
+ // see https://github.com/tj/co/issues/180
+ return new Promise(function(resolve, reject) {
+ if (typeof gen === 'function') gen = gen.apply(ctx, args);
+ if (!gen || typeof gen.next !== 'function') return resolve(gen);
+
+ onFulfilled();
+
+ /**
+ * @param {Mixed} res
+ * @return {Promise}
+ * @api private
+ */
+
+ function onFulfilled(res) {
+ var ret;
+ try {
+ ret = gen.next(res);
+ } catch (e) {
+ return reject(e);
+ }
+ next(ret);
+ }
+
+ /**
+ * @param {Error} err
+ * @return {Promise}
+ * @api private
+ */
+
+ function onRejected(err) {
+ var ret;
+ try {
+ ret = gen.throw(err);
+ } catch (e) {
+ return reject(e);
+ }
+ next(ret);
+ }
+
+ /**
+ * Get the next value in the generator,
+ * return a promise.
+ *
+ * @param {Object} ret
+ * @return {Promise}
+ * @api private
+ */
+
+ function next(ret) {
+ if (ret.done) return resolve(ret.value);
+ var value = toPromise.call(ctx, ret.value);
+ if (value && isPromise(value)) return value.then(onFulfilled, onRejected);
+ return onRejected(new TypeError('You may only yield a function, promise, generator, array, or object, '
+ + 'but the following object was passed: "' + String(ret.value) + '"'));
+ }
+ });
+}
+
+/**
+ * Convert a `yield`ed value into a promise.
+ *
+ * @param {Mixed} obj
+ * @return {Promise}
+ * @api private
+ */
+
+function toPromise(obj) {
+ if (!obj) return obj;
+ if (isPromise(obj)) return obj;
+ if (isGeneratorFunction(obj) || isGenerator(obj)) return co.call(this, obj);
+ if ('function' == typeof obj) return thunkToPromise.call(this, obj);
+ if (Array.isArray(obj)) return arrayToPromise.call(this, obj);
+ if (isObject(obj)) return objectToPromise.call(this, obj);
+ return obj;
+}
+
+/**
+ * Convert a thunk to a promise.
+ *
+ * @param {Function}
+ * @return {Promise}
+ * @api private
+ */
+
+function thunkToPromise(fn) {
+ var ctx = this;
+ return new Promise(function (resolve, reject) {
+ fn.call(ctx, function (err, res) {
+ if (err) return reject(err);
+ if (arguments.length > 2) res = slice.call(arguments, 1);
+ resolve(res);
+ });
+ });
+}
+
+/**
+ * Convert an array of "yieldables" to a promise.
+ * Uses `Promise.all()` internally.
+ *
+ * @param {Array} obj
+ * @return {Promise}
+ * @api private
+ */
+
+function arrayToPromise(obj) {
+ return Promise.all(obj.map(toPromise, this));
+}
+
+/**
+ * Convert an object of "yieldables" to a promise.
+ * Uses `Promise.all()` internally.
+ *
+ * @param {Object} obj
+ * @return {Promise}
+ * @api private
+ */
+
+function objectToPromise(obj){
+ var results = new obj.constructor();
+ var keys = Object.keys(obj);
+ var promises = [];
+ for (var i = 0; i < keys.length; i++) {
+ var key = keys[i];
+ var promise = toPromise.call(this, obj[key]);
+ if (promise && isPromise(promise)) defer(promise, key);
+ else results[key] = obj[key];
+ }
+ return Promise.all(promises).then(function () {
+ return results;
+ });
+
+ function defer(promise, key) {
+ // predefine the key in the result
+ results[key] = undefined;
+ promises.push(promise.then(function (res) {
+ results[key] = res;
+ }));
+ }
+}
+
+/**
+ * Check if `obj` is a promise.
+ *
+ * @param {Object} obj
+ * @return {Boolean}
+ * @api private
+ */
+
+function isPromise(obj) {
+ return 'function' == typeof obj.then;
+}
+
+/**
+ * Check if `obj` is a generator.
+ *
+ * @param {Mixed} obj
+ * @return {Boolean}
+ * @api private
+ */
+
+function isGenerator(obj) {
+ return 'function' == typeof obj.next && 'function' == typeof obj.throw;
+}
+
+/**
+ * Check if `obj` is a generator function.
+ *
+ * @param {Mixed} obj
+ * @return {Boolean}
+ * @api private
+ */
+function isGeneratorFunction(obj) {
+ var constructor = obj.constructor;
+ if (!constructor) return false;
+ if ('GeneratorFunction' === constructor.name || 'GeneratorFunction' === constructor.displayName) return true;
+ return isGenerator(constructor.prototype);
+}
+
+/**
+ * Check for plain object.
+ *
+ * @param {Mixed} val
+ * @return {Boolean}
+ * @api private
+ */
+
+function isObject(val) {
+ return Object == val.constructor;
+}
diff --git a/tools/node_modules/eslint/node_modules/co/package.json b/tools/node_modules/eslint/node_modules/co/package.json
new file mode 100644
index 0000000000..e8d592d206
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/co/package.json
@@ -0,0 +1,66 @@
+{
+ "_from": "co@^4.6.0",
+ "_id": "co@4.6.0",
+ "_inBundle": false,
+ "_integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=",
+ "_location": "/eslint/co",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "co@^4.6.0",
+ "name": "co",
+ "escapedName": "co",
+ "rawSpec": "^4.6.0",
+ "saveSpec": null,
+ "fetchSpec": "^4.6.0"
+ },
+ "_requiredBy": [
+ "/eslint/ajv"
+ ],
+ "_resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
+ "_shasum": "6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184",
+ "_spec": "co@^4.6.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/ajv",
+ "bugs": {
+ "url": "https://github.com/tj/co/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "generator async control flow goodness",
+ "devDependencies": {
+ "browserify": "^10.0.0",
+ "istanbul-harmony": "0",
+ "mocha": "^2.0.0",
+ "mz": "^1.0.2"
+ },
+ "engines": {
+ "iojs": ">= 1.0.0",
+ "node": ">= 0.12.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/tj/co#readme",
+ "keywords": [
+ "async",
+ "flow",
+ "generator",
+ "coro",
+ "coroutine"
+ ],
+ "license": "MIT",
+ "name": "co",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/tj/co.git"
+ },
+ "scripts": {
+ "browserify": "browserify index.js -o ./co-browser.js -s co",
+ "prepublish": "npm run browserify",
+ "test": "mocha --harmony",
+ "test-cov": "node --harmony node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- --reporter dot",
+ "test-travis": "node --harmony node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha --report lcovonly -- --reporter dot"
+ },
+ "version": "4.6.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/collapse-white-space/LICENSE b/tools/node_modules/eslint/node_modules/collapse-white-space/LICENSE
new file mode 100644
index 0000000000..32e7a3d93c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/collapse-white-space/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2015 Titus Wormer <tituswormer@gmail.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/tools/node_modules/eslint/node_modules/collapse-white-space/index.js b/tools/node_modules/eslint/node_modules/collapse-white-space/index.js
new file mode 100644
index 0000000000..dcd14c65de
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/collapse-white-space/index.js
@@ -0,0 +1,8 @@
+'use strict';
+
+module.exports = collapse;
+
+/* collapse(' \t\nbar \nbaz\t'); // ' bar baz ' */
+function collapse(value) {
+ return String(value).replace(/\s+/g, ' ');
+}
diff --git a/tools/node_modules/eslint/node_modules/collapse-white-space/package.json b/tools/node_modules/eslint/node_modules/collapse-white-space/package.json
new file mode 100644
index 0000000000..a09d0a1bc8
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/collapse-white-space/package.json
@@ -0,0 +1,94 @@
+{
+ "_from": "collapse-white-space@^1.0.2",
+ "_id": "collapse-white-space@1.0.3",
+ "_inBundle": false,
+ "_integrity": "sha1-S5BvZw5aljqHt2sOFolkM0G2Ajw=",
+ "_location": "/collapse-white-space",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "collapse-white-space@^1.0.2",
+ "name": "collapse-white-space",
+ "escapedName": "collapse-white-space",
+ "rawSpec": "^1.0.2",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.2"
+ },
+ "_requiredBy": [
+ "/remark-parse"
+ ],
+ "_resolved": "https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-1.0.3.tgz",
+ "_shasum": "4b906f670e5a963a87b76b0e1689643341b6023c",
+ "_spec": "collapse-white-space@^1.0.2",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/remark-parse",
+ "author": {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ },
+ "bugs": {
+ "url": "https://github.com/wooorm/collapse-white-space/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ }
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Replace multiple white-space characters with a single space",
+ "devDependencies": {
+ "browserify": "^14.0.0",
+ "esmangle": "^1.0.1",
+ "nyc": "^11.0.0",
+ "remark-cli": "^3.0.0",
+ "remark-preset-wooorm": "^3.0.0",
+ "tape": "^4.0.0",
+ "xo": "^0.18.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/wooorm/collapse-white-space#readme",
+ "keywords": [
+ "collapse",
+ "white",
+ "space"
+ ],
+ "license": "MIT",
+ "name": "collapse-white-space",
+ "remarkConfig": {
+ "plugins": [
+ "preset-wooorm"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/wooorm/collapse-white-space.git"
+ },
+ "scripts": {
+ "build": "npm run build-md && npm run build-bundle && npm run build-mangle",
+ "build-bundle": "browserify index.js --bare -s collapseWhiteSpace > collapse-white-space.js",
+ "build-mangle": "esmangle collapse-white-space.js > collapse-white-space.min.js",
+ "build-md": "remark . -qfo",
+ "lint": "xo",
+ "test": "npm run build && npm run lint && npm run test-coverage",
+ "test-api": "node test",
+ "test-coverage": "nyc --reporter lcov tape test.js"
+ },
+ "version": "1.0.3",
+ "xo": {
+ "space": true,
+ "esnext": false,
+ "rules": {
+ "capitalized-comments": "off"
+ },
+ "ignores": [
+ "collapse-white-space.js"
+ ]
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/collapse-white-space/readme.md b/tools/node_modules/eslint/node_modules/collapse-white-space/readme.md
new file mode 100644
index 0000000000..5cf867a700
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/collapse-white-space/readme.md
@@ -0,0 +1,45 @@
+# collapse-white-space [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov]
+
+Replace multiple white-space characters with a single space.
+
+## Installation
+
+[npm][npm-install]:
+
+```bash
+npm install collapse-white-space
+```
+
+## Usage
+
+```javascript
+var collapse = require('collapse-white-space');
+
+collapse('\tfoo \n\tbar \t\r\nbaz'); //=> ' foo bar baz'
+```
+
+## API
+
+### `collapse(value)`
+
+Replace multiple white-space characters in value with a single space.
+
+## License
+
+[MIT][license] © [Titus Wormer][author]
+
+<!-- Definitions -->
+
+[travis-badge]: https://img.shields.io/travis/wooorm/collapse-white-space.svg
+
+[travis]: https://travis-ci.org/wooorm/collapse-white-space
+
+[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/collapse-white-space.svg
+
+[codecov]: https://codecov.io/github/wooorm/collapse-white-space
+
+[npm-install]: https://docs.npmjs.com/cli/install
+
+[license]: LICENSE
+
+[author]: http://wooorm.com
diff --git a/tools/node_modules/eslint/node_modules/color-convert/LICENSE b/tools/node_modules/eslint/node_modules/color-convert/LICENSE
new file mode 100644
index 0000000000..5b4c386f92
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/color-convert/LICENSE
@@ -0,0 +1,21 @@
+Copyright (c) 2011-2016 Heather Arthur <fayearthur@gmail.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/tools/node_modules/eslint/node_modules/color-convert/README.md b/tools/node_modules/eslint/node_modules/color-convert/README.md
new file mode 100644
index 0000000000..d4b08fc369
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/color-convert/README.md
@@ -0,0 +1,68 @@
+# color-convert
+
+[![Build Status](https://travis-ci.org/Qix-/color-convert.svg?branch=master)](https://travis-ci.org/Qix-/color-convert)
+
+Color-convert is a color conversion library for JavaScript and node.
+It converts all ways between `rgb`, `hsl`, `hsv`, `hwb`, `cmyk`, `ansi`, `ansi16`, `hex` strings, and CSS `keyword`s (will round to closest):
+
+```js
+var convert = require('color-convert');
+
+convert.rgb.hsl(140, 200, 100); // [96, 48, 59]
+convert.keyword.rgb('blue'); // [0, 0, 255]
+
+var rgbChannels = convert.rgb.channels; // 3
+var cmykChannels = convert.cmyk.channels; // 4
+var ansiChannels = convert.ansi16.channels; // 1
+```
+
+# Install
+
+```console
+$ npm install color-convert
+```
+
+# API
+
+Simply get the property of the _from_ and _to_ conversion that you're looking for.
+
+All functions have a rounded and unrounded variant. By default, return values are rounded. To get the unrounded (raw) results, simply tack on `.raw` to the function.
+
+All 'from' functions have a hidden property called `.channels` that indicates the number of channels the function expects (not including alpha).
+
+```js
+var convert = require('color-convert');
+
+// Hex to LAB
+convert.hex.lab('DEADBF'); // [ 76, 21, -2 ]
+convert.hex.lab.raw('DEADBF'); // [ 75.56213190997677, 20.653827952644754, -2.290532499330533 ]
+
+// RGB to CMYK
+convert.rgb.cmyk(167, 255, 4); // [ 35, 0, 98, 0 ]
+convert.rgb.cmyk.raw(167, 255, 4); // [ 34.509803921568626, 0, 98.43137254901961, 0 ]
+```
+
+### Arrays
+All functions that accept multiple arguments also support passing an array.
+
+Note that this does **not** apply to functions that convert from a color that only requires one value (e.g. `keyword`, `ansi256`, `hex`, etc.)
+
+```js
+var convert = require('color-convert');
+
+convert.rgb.hex(123, 45, 67); // '7B2D43'
+convert.rgb.hex([123, 45, 67]); // '7B2D43'
+```
+
+## Routing
+
+Conversions that don't have an _explicitly_ defined conversion (in [conversions.js](conversions.js)), but can be converted by means of sub-conversions (e.g. XYZ -> **RGB** -> CMYK), are automatically routed together. This allows just about any color model supported by `color-convert` to be converted to any other model, so long as a sub-conversion path exists. This is also true for conversions requiring more than one step in between (e.g. LCH -> **LAB** -> **XYZ** -> **RGB** -> Hex).
+
+Keep in mind that extensive conversions _may_ result in a loss of precision, and exist only to be complete. For a list of "direct" (single-step) conversions, see [conversions.js](conversions.js).
+
+# Contribute
+
+If there is a new model you would like to support, or want to add a direct conversion between two existing models, please send us a pull request.
+
+# License
+Copyright &copy; 2011-2016, Heather Arthur and Josh Junon. Licensed under the [MIT License](LICENSE).
diff --git a/tools/node_modules/eslint/node_modules/color-convert/conversions.js b/tools/node_modules/eslint/node_modules/color-convert/conversions.js
new file mode 100644
index 0000000000..19ca4a9bf5
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/color-convert/conversions.js
@@ -0,0 +1,861 @@
+/* MIT license */
+var cssKeywords = require('color-name');
+
+// NOTE: conversions should only return primitive values (i.e. arrays, or
+// values that give correct `typeof` results).
+// do not use box values types (i.e. Number(), String(), etc.)
+
+var reverseKeywords = {};
+for (var key in cssKeywords) {
+ if (cssKeywords.hasOwnProperty(key)) {
+ reverseKeywords[cssKeywords[key]] = key;
+ }
+}
+
+var convert = module.exports = {
+ rgb: {channels: 3, labels: 'rgb'},
+ hsl: {channels: 3, labels: 'hsl'},
+ hsv: {channels: 3, labels: 'hsv'},
+ hwb: {channels: 3, labels: 'hwb'},
+ cmyk: {channels: 4, labels: 'cmyk'},
+ xyz: {channels: 3, labels: 'xyz'},
+ lab: {channels: 3, labels: 'lab'},
+ lch: {channels: 3, labels: 'lch'},
+ hex: {channels: 1, labels: ['hex']},
+ keyword: {channels: 1, labels: ['keyword']},
+ ansi16: {channels: 1, labels: ['ansi16']},
+ ansi256: {channels: 1, labels: ['ansi256']},
+ hcg: {channels: 3, labels: ['h', 'c', 'g']},
+ apple: {channels: 3, labels: ['r16', 'g16', 'b16']},
+ gray: {channels: 1, labels: ['gray']}
+};
+
+// hide .channels and .labels properties
+for (var model in convert) {
+ if (convert.hasOwnProperty(model)) {
+ if (!('channels' in convert[model])) {
+ throw new Error('missing channels property: ' + model);
+ }
+
+ if (!('labels' in convert[model])) {
+ throw new Error('missing channel labels property: ' + model);
+ }
+
+ if (convert[model].labels.length !== convert[model].channels) {
+ throw new Error('channel and label counts mismatch: ' + model);
+ }
+
+ var channels = convert[model].channels;
+ var labels = convert[model].labels;
+ delete convert[model].channels;
+ delete convert[model].labels;
+ Object.defineProperty(convert[model], 'channels', {value: channels});
+ Object.defineProperty(convert[model], 'labels', {value: labels});
+ }
+}
+
+convert.rgb.hsl = function (rgb) {
+ var r = rgb[0] / 255;
+ var g = rgb[1] / 255;
+ var b = rgb[2] / 255;
+ var min = Math.min(r, g, b);
+ var max = Math.max(r, g, b);
+ var delta = max - min;
+ var h;
+ var s;
+ var l;
+
+ if (max === min) {
+ h = 0;
+ } else if (r === max) {
+ h = (g - b) / delta;
+ } else if (g === max) {
+ h = 2 + (b - r) / delta;
+ } else if (b === max) {
+ h = 4 + (r - g) / delta;
+ }
+
+ h = Math.min(h * 60, 360);
+
+ if (h < 0) {
+ h += 360;
+ }
+
+ l = (min + max) / 2;
+
+ if (max === min) {
+ s = 0;
+ } else if (l <= 0.5) {
+ s = delta / (max + min);
+ } else {
+ s = delta / (2 - max - min);
+ }
+
+ return [h, s * 100, l * 100];
+};
+
+convert.rgb.hsv = function (rgb) {
+ var r = rgb[0];
+ var g = rgb[1];
+ var b = rgb[2];
+ var min = Math.min(r, g, b);
+ var max = Math.max(r, g, b);
+ var delta = max - min;
+ var h;
+ var s;
+ var v;
+
+ if (max === 0) {
+ s = 0;
+ } else {
+ s = (delta / max * 1000) / 10;
+ }
+
+ if (max === min) {
+ h = 0;
+ } else if (r === max) {
+ h = (g - b) / delta;
+ } else if (g === max) {
+ h = 2 + (b - r) / delta;
+ } else if (b === max) {
+ h = 4 + (r - g) / delta;
+ }
+
+ h = Math.min(h * 60, 360);
+
+ if (h < 0) {
+ h += 360;
+ }
+
+ v = ((max / 255) * 1000) / 10;
+
+ return [h, s, v];
+};
+
+convert.rgb.hwb = function (rgb) {
+ var r = rgb[0];
+ var g = rgb[1];
+ var b = rgb[2];
+ var h = convert.rgb.hsl(rgb)[0];
+ var w = 1 / 255 * Math.min(r, Math.min(g, b));
+
+ b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
+
+ return [h, w * 100, b * 100];
+};
+
+convert.rgb.cmyk = function (rgb) {
+ var r = rgb[0] / 255;
+ var g = rgb[1] / 255;
+ var b = rgb[2] / 255;
+ var c;
+ var m;
+ var y;
+ var k;
+
+ k = Math.min(1 - r, 1 - g, 1 - b);
+ c = (1 - r - k) / (1 - k) || 0;
+ m = (1 - g - k) / (1 - k) || 0;
+ y = (1 - b - k) / (1 - k) || 0;
+
+ return [c * 100, m * 100, y * 100, k * 100];
+};
+
+/**
+ * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
+ * */
+function comparativeDistance(x, y) {
+ return (
+ Math.pow(x[0] - y[0], 2) +
+ Math.pow(x[1] - y[1], 2) +
+ Math.pow(x[2] - y[2], 2)
+ );
+}
+
+convert.rgb.keyword = function (rgb) {
+ var reversed = reverseKeywords[rgb];
+ if (reversed) {
+ return reversed;
+ }
+
+ var currentClosestDistance = Infinity;
+ var currentClosestKeyword;
+
+ for (var keyword in cssKeywords) {
+ if (cssKeywords.hasOwnProperty(keyword)) {
+ var value = cssKeywords[keyword];
+
+ // Compute comparative distance
+ var distance = comparativeDistance(rgb, value);
+
+ // Check if its less, if so set as closest
+ if (distance < currentClosestDistance) {
+ currentClosestDistance = distance;
+ currentClosestKeyword = keyword;
+ }
+ }
+ }
+
+ return currentClosestKeyword;
+};
+
+convert.keyword.rgb = function (keyword) {
+ return cssKeywords[keyword];
+};
+
+convert.rgb.xyz = function (rgb) {
+ var r = rgb[0] / 255;
+ var g = rgb[1] / 255;
+ var b = rgb[2] / 255;
+
+ // assume sRGB
+ r = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92);
+ g = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92);
+ b = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92);
+
+ var x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);
+ var y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);
+ var z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);
+
+ return [x * 100, y * 100, z * 100];
+};
+
+convert.rgb.lab = function (rgb) {
+ var xyz = convert.rgb.xyz(rgb);
+ var x = xyz[0];
+ var y = xyz[1];
+ var z = xyz[2];
+ var l;
+ var a;
+ var b;
+
+ x /= 95.047;
+ y /= 100;
+ z /= 108.883;
+
+ x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);
+ y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);
+ z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);
+
+ l = (116 * y) - 16;
+ a = 500 * (x - y);
+ b = 200 * (y - z);
+
+ return [l, a, b];
+};
+
+convert.hsl.rgb = function (hsl) {
+ var h = hsl[0] / 360;
+ var s = hsl[1] / 100;
+ var l = hsl[2] / 100;
+ var t1;
+ var t2;
+ var t3;
+ var rgb;
+ var val;
+
+ if (s === 0) {
+ val = l * 255;
+ return [val, val, val];
+ }
+
+ if (l < 0.5) {
+ t2 = l * (1 + s);
+ } else {
+ t2 = l + s - l * s;
+ }
+
+ t1 = 2 * l - t2;
+
+ rgb = [0, 0, 0];
+ for (var i = 0; i < 3; i++) {
+ t3 = h + 1 / 3 * -(i - 1);
+ if (t3 < 0) {
+ t3++;
+ }
+ if (t3 > 1) {
+ t3--;
+ }
+
+ if (6 * t3 < 1) {
+ val = t1 + (t2 - t1) * 6 * t3;
+ } else if (2 * t3 < 1) {
+ val = t2;
+ } else if (3 * t3 < 2) {
+ val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
+ } else {
+ val = t1;
+ }
+
+ rgb[i] = val * 255;
+ }
+
+ return rgb;
+};
+
+convert.hsl.hsv = function (hsl) {
+ var h = hsl[0];
+ var s = hsl[1] / 100;
+ var l = hsl[2] / 100;
+ var smin = s;
+ var lmin = Math.max(l, 0.01);
+ var sv;
+ var v;
+
+ l *= 2;
+ s *= (l <= 1) ? l : 2 - l;
+ smin *= lmin <= 1 ? lmin : 2 - lmin;
+ v = (l + s) / 2;
+ sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);
+
+ return [h, sv * 100, v * 100];
+};
+
+convert.hsv.rgb = function (hsv) {
+ var h = hsv[0] / 60;
+ var s = hsv[1] / 100;
+ var v = hsv[2] / 100;
+ var hi = Math.floor(h) % 6;
+
+ var f = h - Math.floor(h);
+ var p = 255 * v * (1 - s);
+ var q = 255 * v * (1 - (s * f));
+ var t = 255 * v * (1 - (s * (1 - f)));
+ v *= 255;
+
+ switch (hi) {
+ case 0:
+ return [v, t, p];
+ case 1:
+ return [q, v, p];
+ case 2:
+ return [p, v, t];
+ case 3:
+ return [p, q, v];
+ case 4:
+ return [t, p, v];
+ case 5:
+ return [v, p, q];
+ }
+};
+
+convert.hsv.hsl = function (hsv) {
+ var h = hsv[0];
+ var s = hsv[1] / 100;
+ var v = hsv[2] / 100;
+ var vmin = Math.max(v, 0.01);
+ var lmin;
+ var sl;
+ var l;
+
+ l = (2 - s) * v;
+ lmin = (2 - s) * vmin;
+ sl = s * vmin;
+ sl /= (lmin <= 1) ? lmin : 2 - lmin;
+ sl = sl || 0;
+ l /= 2;
+
+ return [h, sl * 100, l * 100];
+};
+
+// http://dev.w3.org/csswg/css-color/#hwb-to-rgb
+convert.hwb.rgb = function (hwb) {
+ var h = hwb[0] / 360;
+ var wh = hwb[1] / 100;
+ var bl = hwb[2] / 100;
+ var ratio = wh + bl;
+ var i;
+ var v;
+ var f;
+ var n;
+
+ // wh + bl cant be > 1
+ if (ratio > 1) {
+ wh /= ratio;
+ bl /= ratio;
+ }
+
+ i = Math.floor(6 * h);
+ v = 1 - bl;
+ f = 6 * h - i;
+
+ if ((i & 0x01) !== 0) {
+ f = 1 - f;
+ }
+
+ n = wh + f * (v - wh); // linear interpolation
+
+ var r;
+ var g;
+ var b;
+ switch (i) {
+ default:
+ case 6:
+ case 0: r = v; g = n; b = wh; break;
+ case 1: r = n; g = v; b = wh; break;
+ case 2: r = wh; g = v; b = n; break;
+ case 3: r = wh; g = n; b = v; break;
+ case 4: r = n; g = wh; b = v; break;
+ case 5: r = v; g = wh; b = n; break;
+ }
+
+ return [r * 255, g * 255, b * 255];
+};
+
+convert.cmyk.rgb = function (cmyk) {
+ var c = cmyk[0] / 100;
+ var m = cmyk[1] / 100;
+ var y = cmyk[2] / 100;
+ var k = cmyk[3] / 100;
+ var r;
+ var g;
+ var b;
+
+ r = 1 - Math.min(1, c * (1 - k) + k);
+ g = 1 - Math.min(1, m * (1 - k) + k);
+ b = 1 - Math.min(1, y * (1 - k) + k);
+
+ return [r * 255, g * 255, b * 255];
+};
+
+convert.xyz.rgb = function (xyz) {
+ var x = xyz[0] / 100;
+ var y = xyz[1] / 100;
+ var z = xyz[2] / 100;
+ var r;
+ var g;
+ var b;
+
+ r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);
+ g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);
+ b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);
+
+ // assume sRGB
+ r = r > 0.0031308
+ ? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055)
+ : r * 12.92;
+
+ g = g > 0.0031308
+ ? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055)
+ : g * 12.92;
+
+ b = b > 0.0031308
+ ? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055)
+ : b * 12.92;
+
+ r = Math.min(Math.max(0, r), 1);
+ g = Math.min(Math.max(0, g), 1);
+ b = Math.min(Math.max(0, b), 1);
+
+ return [r * 255, g * 255, b * 255];
+};
+
+convert.xyz.lab = function (xyz) {
+ var x = xyz[0];
+ var y = xyz[1];
+ var z = xyz[2];
+ var l;
+ var a;
+ var b;
+
+ x /= 95.047;
+ y /= 100;
+ z /= 108.883;
+
+ x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);
+ y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);
+ z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);
+
+ l = (116 * y) - 16;
+ a = 500 * (x - y);
+ b = 200 * (y - z);
+
+ return [l, a, b];
+};
+
+convert.lab.xyz = function (lab) {
+ var l = lab[0];
+ var a = lab[1];
+ var b = lab[2];
+ var x;
+ var y;
+ var z;
+
+ y = (l + 16) / 116;
+ x = a / 500 + y;
+ z = y - b / 200;
+
+ var y2 = Math.pow(y, 3);
+ var x2 = Math.pow(x, 3);
+ var z2 = Math.pow(z, 3);
+ y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;
+ x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;
+ z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;
+
+ x *= 95.047;
+ y *= 100;
+ z *= 108.883;
+
+ return [x, y, z];
+};
+
+convert.lab.lch = function (lab) {
+ var l = lab[0];
+ var a = lab[1];
+ var b = lab[2];
+ var hr;
+ var h;
+ var c;
+
+ hr = Math.atan2(b, a);
+ h = hr * 360 / 2 / Math.PI;
+
+ if (h < 0) {
+ h += 360;
+ }
+
+ c = Math.sqrt(a * a + b * b);
+
+ return [l, c, h];
+};
+
+convert.lch.lab = function (lch) {
+ var l = lch[0];
+ var c = lch[1];
+ var h = lch[2];
+ var a;
+ var b;
+ var hr;
+
+ hr = h / 360 * 2 * Math.PI;
+ a = c * Math.cos(hr);
+ b = c * Math.sin(hr);
+
+ return [l, a, b];
+};
+
+convert.rgb.ansi16 = function (args) {
+ var r = args[0];
+ var g = args[1];
+ var b = args[2];
+ var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization
+
+ value = Math.round(value / 50);
+
+ if (value === 0) {
+ return 30;
+ }
+
+ var ansi = 30
+ + ((Math.round(b / 255) << 2)
+ | (Math.round(g / 255) << 1)
+ | Math.round(r / 255));
+
+ if (value === 2) {
+ ansi += 60;
+ }
+
+ return ansi;
+};
+
+convert.hsv.ansi16 = function (args) {
+ // optimization here; we already know the value and don't need to get
+ // it converted for us.
+ return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
+};
+
+convert.rgb.ansi256 = function (args) {
+ var r = args[0];
+ var g = args[1];
+ var b = args[2];
+
+ // we use the extended greyscale palette here, with the exception of
+ // black and white. normal palette only has 4 greyscale shades.
+ if (r === g && g === b) {
+ if (r < 8) {
+ return 16;
+ }
+
+ if (r > 248) {
+ return 231;
+ }
+
+ return Math.round(((r - 8) / 247) * 24) + 232;
+ }
+
+ var ansi = 16
+ + (36 * Math.round(r / 255 * 5))
+ + (6 * Math.round(g / 255 * 5))
+ + Math.round(b / 255 * 5);
+
+ return ansi;
+};
+
+convert.ansi16.rgb = function (args) {
+ var color = args % 10;
+
+ // handle greyscale
+ if (color === 0 || color === 7) {
+ if (args > 50) {
+ color += 3.5;
+ }
+
+ color = color / 10.5 * 255;
+
+ return [color, color, color];
+ }
+
+ var mult = (~~(args > 50) + 1) * 0.5;
+ var r = ((color & 1) * mult) * 255;
+ var g = (((color >> 1) & 1) * mult) * 255;
+ var b = (((color >> 2) & 1) * mult) * 255;
+
+ return [r, g, b];
+};
+
+convert.ansi256.rgb = function (args) {
+ // handle greyscale
+ if (args >= 232) {
+ var c = (args - 232) * 10 + 8;
+ return [c, c, c];
+ }
+
+ args -= 16;
+
+ var rem;
+ var r = Math.floor(args / 36) / 5 * 255;
+ var g = Math.floor((rem = args % 36) / 6) / 5 * 255;
+ var b = (rem % 6) / 5 * 255;
+
+ return [r, g, b];
+};
+
+convert.rgb.hex = function (args) {
+ var integer = ((Math.round(args[0]) & 0xFF) << 16)
+ + ((Math.round(args[1]) & 0xFF) << 8)
+ + (Math.round(args[2]) & 0xFF);
+
+ var string = integer.toString(16).toUpperCase();
+ return '000000'.substring(string.length) + string;
+};
+
+convert.hex.rgb = function (args) {
+ var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
+ if (!match) {
+ return [0, 0, 0];
+ }
+
+ var colorString = match[0];
+
+ if (match[0].length === 3) {
+ colorString = colorString.split('').map(function (char) {
+ return char + char;
+ }).join('');
+ }
+
+ var integer = parseInt(colorString, 16);
+ var r = (integer >> 16) & 0xFF;
+ var g = (integer >> 8) & 0xFF;
+ var b = integer & 0xFF;
+
+ return [r, g, b];
+};
+
+convert.rgb.hcg = function (rgb) {
+ var r = rgb[0] / 255;
+ var g = rgb[1] / 255;
+ var b = rgb[2] / 255;
+ var max = Math.max(Math.max(r, g), b);
+ var min = Math.min(Math.min(r, g), b);
+ var chroma = (max - min);
+ var grayscale;
+ var hue;
+
+ if (chroma < 1) {
+ grayscale = min / (1 - chroma);
+ } else {
+ grayscale = 0;
+ }
+
+ if (chroma <= 0) {
+ hue = 0;
+ } else
+ if (max === r) {
+ hue = ((g - b) / chroma) % 6;
+ } else
+ if (max === g) {
+ hue = 2 + (b - r) / chroma;
+ } else {
+ hue = 4 + (r - g) / chroma + 4;
+ }
+
+ hue /= 6;
+ hue %= 1;
+
+ return [hue * 360, chroma * 100, grayscale * 100];
+};
+
+convert.hsl.hcg = function (hsl) {
+ var s = hsl[1] / 100;
+ var l = hsl[2] / 100;
+ var c = 1;
+ var f = 0;
+
+ if (l < 0.5) {
+ c = 2.0 * s * l;
+ } else {
+ c = 2.0 * s * (1.0 - l);
+ }
+
+ if (c < 1.0) {
+ f = (l - 0.5 * c) / (1.0 - c);
+ }
+
+ return [hsl[0], c * 100, f * 100];
+};
+
+convert.hsv.hcg = function (hsv) {
+ var s = hsv[1] / 100;
+ var v = hsv[2] / 100;
+
+ var c = s * v;
+ var f = 0;
+
+ if (c < 1.0) {
+ f = (v - c) / (1 - c);
+ }
+
+ return [hsv[0], c * 100, f * 100];
+};
+
+convert.hcg.rgb = function (hcg) {
+ var h = hcg[0] / 360;
+ var c = hcg[1] / 100;
+ var g = hcg[2] / 100;
+
+ if (c === 0.0) {
+ return [g * 255, g * 255, g * 255];
+ }
+
+ var pure = [0, 0, 0];
+ var hi = (h % 1) * 6;
+ var v = hi % 1;
+ var w = 1 - v;
+ var mg = 0;
+
+ switch (Math.floor(hi)) {
+ case 0:
+ pure[0] = 1; pure[1] = v; pure[2] = 0; break;
+ case 1:
+ pure[0] = w; pure[1] = 1; pure[2] = 0; break;
+ case 2:
+ pure[0] = 0; pure[1] = 1; pure[2] = v; break;
+ case 3:
+ pure[0] = 0; pure[1] = w; pure[2] = 1; break;
+ case 4:
+ pure[0] = v; pure[1] = 0; pure[2] = 1; break;
+ default:
+ pure[0] = 1; pure[1] = 0; pure[2] = w;
+ }
+
+ mg = (1.0 - c) * g;
+
+ return [
+ (c * pure[0] + mg) * 255,
+ (c * pure[1] + mg) * 255,
+ (c * pure[2] + mg) * 255
+ ];
+};
+
+convert.hcg.hsv = function (hcg) {
+ var c = hcg[1] / 100;
+ var g = hcg[2] / 100;
+
+ var v = c + g * (1.0 - c);
+ var f = 0;
+
+ if (v > 0.0) {
+ f = c / v;
+ }
+
+ return [hcg[0], f * 100, v * 100];
+};
+
+convert.hcg.hsl = function (hcg) {
+ var c = hcg[1] / 100;
+ var g = hcg[2] / 100;
+
+ var l = g * (1.0 - c) + 0.5 * c;
+ var s = 0;
+
+ if (l > 0.0 && l < 0.5) {
+ s = c / (2 * l);
+ } else
+ if (l >= 0.5 && l < 1.0) {
+ s = c / (2 * (1 - l));
+ }
+
+ return [hcg[0], s * 100, l * 100];
+};
+
+convert.hcg.hwb = function (hcg) {
+ var c = hcg[1] / 100;
+ var g = hcg[2] / 100;
+ var v = c + g * (1.0 - c);
+ return [hcg[0], (v - c) * 100, (1 - v) * 100];
+};
+
+convert.hwb.hcg = function (hwb) {
+ var w = hwb[1] / 100;
+ var b = hwb[2] / 100;
+ var v = 1 - b;
+ var c = v - w;
+ var g = 0;
+
+ if (c < 1) {
+ g = (v - c) / (1 - c);
+ }
+
+ return [hwb[0], c * 100, g * 100];
+};
+
+convert.apple.rgb = function (apple) {
+ return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];
+};
+
+convert.rgb.apple = function (rgb) {
+ return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];
+};
+
+convert.gray.rgb = function (args) {
+ return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
+};
+
+convert.gray.hsl = convert.gray.hsv = function (args) {
+ return [0, 0, args[0]];
+};
+
+convert.gray.hwb = function (gray) {
+ return [0, 100, gray[0]];
+};
+
+convert.gray.cmyk = function (gray) {
+ return [0, 0, 0, gray[0]];
+};
+
+convert.gray.lab = function (gray) {
+ return [gray[0], 0, 0];
+};
+
+convert.gray.hex = function (gray) {
+ var val = Math.round(gray[0] / 100 * 255) & 0xFF;
+ var integer = (val << 16) + (val << 8) + val;
+
+ var string = integer.toString(16).toUpperCase();
+ return '000000'.substring(string.length) + string;
+};
+
+convert.rgb.gray = function (rgb) {
+ var val = (rgb[0] + rgb[1] + rgb[2]) / 3;
+ return [val / 255 * 100];
+};
diff --git a/tools/node_modules/eslint/node_modules/color-convert/index.js b/tools/node_modules/eslint/node_modules/color-convert/index.js
new file mode 100644
index 0000000000..e65b5d775d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/color-convert/index.js
@@ -0,0 +1,78 @@
+var conversions = require('./conversions');
+var route = require('./route');
+
+var convert = {};
+
+var models = Object.keys(conversions);
+
+function wrapRaw(fn) {
+ var wrappedFn = function (args) {
+ if (args === undefined || args === null) {
+ return args;
+ }
+
+ if (arguments.length > 1) {
+ args = Array.prototype.slice.call(arguments);
+ }
+
+ return fn(args);
+ };
+
+ // preserve .conversion property if there is one
+ if ('conversion' in fn) {
+ wrappedFn.conversion = fn.conversion;
+ }
+
+ return wrappedFn;
+}
+
+function wrapRounded(fn) {
+ var wrappedFn = function (args) {
+ if (args === undefined || args === null) {
+ return args;
+ }
+
+ if (arguments.length > 1) {
+ args = Array.prototype.slice.call(arguments);
+ }
+
+ var result = fn(args);
+
+ // we're assuming the result is an array here.
+ // see notice in conversions.js; don't use box types
+ // in conversion functions.
+ if (typeof result === 'object') {
+ for (var len = result.length, i = 0; i < len; i++) {
+ result[i] = Math.round(result[i]);
+ }
+ }
+
+ return result;
+ };
+
+ // preserve .conversion property if there is one
+ if ('conversion' in fn) {
+ wrappedFn.conversion = fn.conversion;
+ }
+
+ return wrappedFn;
+}
+
+models.forEach(function (fromModel) {
+ convert[fromModel] = {};
+
+ Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});
+ Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});
+
+ var routes = route(fromModel);
+ var routeModels = Object.keys(routes);
+
+ routeModels.forEach(function (toModel) {
+ var fn = routes[toModel];
+
+ convert[fromModel][toModel] = wrapRounded(fn);
+ convert[fromModel][toModel].raw = wrapRaw(fn);
+ });
+});
+
+module.exports = convert;
diff --git a/tools/node_modules/eslint/node_modules/color-convert/package.json b/tools/node_modules/eslint/node_modules/color-convert/package.json
new file mode 100644
index 0000000000..dcc6b487f3
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/color-convert/package.json
@@ -0,0 +1,81 @@
+{
+ "_from": "color-convert@^1.9.0",
+ "_id": "color-convert@1.9.1",
+ "_inBundle": false,
+ "_integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==",
+ "_location": "/eslint/color-convert",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "color-convert@^1.9.0",
+ "name": "color-convert",
+ "escapedName": "color-convert",
+ "rawSpec": "^1.9.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.9.0"
+ },
+ "_requiredBy": [
+ "/eslint/chalk/ansi-styles"
+ ],
+ "_resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz",
+ "_shasum": "c1261107aeb2f294ebffec9ed9ecad529a6097ed",
+ "_spec": "color-convert@^1.9.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/chalk/node_modules/ansi-styles",
+ "author": {
+ "name": "Heather Arthur",
+ "email": "fayearthur@gmail.com"
+ },
+ "bugs": {
+ "url": "https://github.com/Qix-/color-convert/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "color-name": "^1.1.1"
+ },
+ "deprecated": false,
+ "description": "Plain color conversion functions",
+ "devDependencies": {
+ "chalk": "^1.1.1",
+ "xo": "^0.11.2"
+ },
+ "files": [
+ "index.js",
+ "conversions.js",
+ "css-keywords.js",
+ "route.js"
+ ],
+ "homepage": "https://github.com/Qix-/color-convert#readme",
+ "keywords": [
+ "color",
+ "colour",
+ "convert",
+ "converter",
+ "conversion",
+ "rgb",
+ "hsl",
+ "hsv",
+ "hwb",
+ "cmyk",
+ "ansi",
+ "ansi16"
+ ],
+ "license": "MIT",
+ "name": "color-convert",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/Qix-/color-convert.git"
+ },
+ "scripts": {
+ "pretest": "xo",
+ "test": "node test/basic.js"
+ },
+ "version": "1.9.1",
+ "xo": {
+ "rules": {
+ "default-case": 0,
+ "no-inline-comments": 0,
+ "operator-linebreak": 0
+ }
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/color-convert/route.js b/tools/node_modules/eslint/node_modules/color-convert/route.js
new file mode 100644
index 0000000000..0a1fdea689
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/color-convert/route.js
@@ -0,0 +1,97 @@
+var conversions = require('./conversions');
+
+/*
+ this function routes a model to all other models.
+
+ all functions that are routed have a property `.conversion` attached
+ to the returned synthetic function. This property is an array
+ of strings, each with the steps in between the 'from' and 'to'
+ color models (inclusive).
+
+ conversions that are not possible simply are not included.
+*/
+
+function buildGraph() {
+ var graph = {};
+ // https://jsperf.com/object-keys-vs-for-in-with-closure/3
+ var models = Object.keys(conversions);
+
+ for (var len = models.length, i = 0; i < len; i++) {
+ graph[models[i]] = {
+ // http://jsperf.com/1-vs-infinity
+ // micro-opt, but this is simple.
+ distance: -1,
+ parent: null
+ };
+ }
+
+ return graph;
+}
+
+// https://en.wikipedia.org/wiki/Breadth-first_search
+function deriveBFS(fromModel) {
+ var graph = buildGraph();
+ var queue = [fromModel]; // unshift -> queue -> pop
+
+ graph[fromModel].distance = 0;
+
+ while (queue.length) {
+ var current = queue.pop();
+ var adjacents = Object.keys(conversions[current]);
+
+ for (var len = adjacents.length, i = 0; i < len; i++) {
+ var adjacent = adjacents[i];
+ var node = graph[adjacent];
+
+ if (node.distance === -1) {
+ node.distance = graph[current].distance + 1;
+ node.parent = current;
+ queue.unshift(adjacent);
+ }
+ }
+ }
+
+ return graph;
+}
+
+function link(from, to) {
+ return function (args) {
+ return to(from(args));
+ };
+}
+
+function wrapConversion(toModel, graph) {
+ var path = [graph[toModel].parent, toModel];
+ var fn = conversions[graph[toModel].parent][toModel];
+
+ var cur = graph[toModel].parent;
+ while (graph[cur].parent) {
+ path.unshift(graph[cur].parent);
+ fn = link(conversions[graph[cur].parent][cur], fn);
+ cur = graph[cur].parent;
+ }
+
+ fn.conversion = path;
+ return fn;
+}
+
+module.exports = function (fromModel) {
+ var graph = deriveBFS(fromModel);
+ var conversion = {};
+
+ var models = Object.keys(graph);
+ for (var len = models.length, i = 0; i < len; i++) {
+ var toModel = models[i];
+ var node = graph[toModel];
+
+ if (node.parent === null) {
+ // no possible conversion, or this node is the source model.
+ continue;
+ }
+
+ conversion[toModel] = wrapConversion(toModel, graph);
+ }
+
+ return conversion;
+};
+
diff --git a/tools/node_modules/eslint/node_modules/color-name/.eslintrc.json b/tools/node_modules/eslint/node_modules/color-name/.eslintrc.json
new file mode 100644
index 0000000000..c50c250446
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/color-name/.eslintrc.json
@@ -0,0 +1,43 @@
+{
+ "env": {
+ "browser": true,
+ "node": true,
+ "commonjs": true,
+ "es6": true
+ },
+ "extends": "eslint:recommended",
+ "rules": {
+ "strict": 2,
+ "indent": 0,
+ "linebreak-style": 0,
+ "quotes": 0,
+ "semi": 0,
+ "no-cond-assign": 1,
+ "no-constant-condition": 1,
+ "no-duplicate-case": 1,
+ "no-empty": 1,
+ "no-ex-assign": 1,
+ "no-extra-boolean-cast": 1,
+ "no-extra-semi": 1,
+ "no-fallthrough": 1,
+ "no-func-assign": 1,
+ "no-global-assign": 1,
+ "no-implicit-globals": 2,
+ "no-inner-declarations": ["error", "functions"],
+ "no-irregular-whitespace": 2,
+ "no-loop-func": 1,
+ "no-multi-str": 1,
+ "no-mixed-spaces-and-tabs": 1,
+ "no-proto": 1,
+ "no-sequences": 1,
+ "no-throw-literal": 1,
+ "no-unmodified-loop-condition": 1,
+ "no-useless-call": 1,
+ "no-void": 1,
+ "no-with": 2,
+ "wrap-iife": 1,
+ "no-redeclare": 1,
+ "no-unused-vars": ["error", { "vars": "all", "args": "none" }],
+ "no-sparse-arrays": 1
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/color-name/LICENSE b/tools/node_modules/eslint/node_modules/color-name/LICENSE
new file mode 100644
index 0000000000..c6b1001254
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/color-name/LICENSE
@@ -0,0 +1,8 @@
+The MIT License (MIT)
+Copyright (c) 2015 Dmitry Ivanov
+
+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/tools/node_modules/eslint/node_modules/color-name/README.md b/tools/node_modules/eslint/node_modules/color-name/README.md
new file mode 100644
index 0000000000..932b979176
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/color-name/README.md
@@ -0,0 +1,11 @@
+A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors.
+
+[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/)
+
+
+```js
+var colors = require('color-name');
+colors.red //[255,0,0]
+```
+
+<a href="LICENSE"><img src="https://upload.wikimedia.org/wikipedia/commons/0/0c/MIT_logo.svg" width="120"/></a>
diff --git a/tools/node_modules/eslint/node_modules/color-name/index.js b/tools/node_modules/eslint/node_modules/color-name/index.js
new file mode 100644
index 0000000000..b7c198a6f3
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/color-name/index.js
@@ -0,0 +1,152 @@
+'use strict'
+
+module.exports = {
+ "aliceblue": [240, 248, 255],
+ "antiquewhite": [250, 235, 215],
+ "aqua": [0, 255, 255],
+ "aquamarine": [127, 255, 212],
+ "azure": [240, 255, 255],
+ "beige": [245, 245, 220],
+ "bisque": [255, 228, 196],
+ "black": [0, 0, 0],
+ "blanchedalmond": [255, 235, 205],
+ "blue": [0, 0, 255],
+ "blueviolet": [138, 43, 226],
+ "brown": [165, 42, 42],
+ "burlywood": [222, 184, 135],
+ "cadetblue": [95, 158, 160],
+ "chartreuse": [127, 255, 0],
+ "chocolate": [210, 105, 30],
+ "coral": [255, 127, 80],
+ "cornflowerblue": [100, 149, 237],
+ "cornsilk": [255, 248, 220],
+ "crimson": [220, 20, 60],
+ "cyan": [0, 255, 255],
+ "darkblue": [0, 0, 139],
+ "darkcyan": [0, 139, 139],
+ "darkgoldenrod": [184, 134, 11],
+ "darkgray": [169, 169, 169],
+ "darkgreen": [0, 100, 0],
+ "darkgrey": [169, 169, 169],
+ "darkkhaki": [189, 183, 107],
+ "darkmagenta": [139, 0, 139],
+ "darkolivegreen": [85, 107, 47],
+ "darkorange": [255, 140, 0],
+ "darkorchid": [153, 50, 204],
+ "darkred": [139, 0, 0],
+ "darksalmon": [233, 150, 122],
+ "darkseagreen": [143, 188, 143],
+ "darkslateblue": [72, 61, 139],
+ "darkslategray": [47, 79, 79],
+ "darkslategrey": [47, 79, 79],
+ "darkturquoise": [0, 206, 209],
+ "darkviolet": [148, 0, 211],
+ "deeppink": [255, 20, 147],
+ "deepskyblue": [0, 191, 255],
+ "dimgray": [105, 105, 105],
+ "dimgrey": [105, 105, 105],
+ "dodgerblue": [30, 144, 255],
+ "firebrick": [178, 34, 34],
+ "floralwhite": [255, 250, 240],
+ "forestgreen": [34, 139, 34],
+ "fuchsia": [255, 0, 255],
+ "gainsboro": [220, 220, 220],
+ "ghostwhite": [248, 248, 255],
+ "gold": [255, 215, 0],
+ "goldenrod": [218, 165, 32],
+ "gray": [128, 128, 128],
+ "green": [0, 128, 0],
+ "greenyellow": [173, 255, 47],
+ "grey": [128, 128, 128],
+ "honeydew": [240, 255, 240],
+ "hotpink": [255, 105, 180],
+ "indianred": [205, 92, 92],
+ "indigo": [75, 0, 130],
+ "ivory": [255, 255, 240],
+ "khaki": [240, 230, 140],
+ "lavender": [230, 230, 250],
+ "lavenderblush": [255, 240, 245],
+ "lawngreen": [124, 252, 0],
+ "lemonchiffon": [255, 250, 205],
+ "lightblue": [173, 216, 230],
+ "lightcoral": [240, 128, 128],
+ "lightcyan": [224, 255, 255],
+ "lightgoldenrodyellow": [250, 250, 210],
+ "lightgray": [211, 211, 211],
+ "lightgreen": [144, 238, 144],
+ "lightgrey": [211, 211, 211],
+ "lightpink": [255, 182, 193],
+ "lightsalmon": [255, 160, 122],
+ "lightseagreen": [32, 178, 170],
+ "lightskyblue": [135, 206, 250],
+ "lightslategray": [119, 136, 153],
+ "lightslategrey": [119, 136, 153],
+ "lightsteelblue": [176, 196, 222],
+ "lightyellow": [255, 255, 224],
+ "lime": [0, 255, 0],
+ "limegreen": [50, 205, 50],
+ "linen": [250, 240, 230],
+ "magenta": [255, 0, 255],
+ "maroon": [128, 0, 0],
+ "mediumaquamarine": [102, 205, 170],
+ "mediumblue": [0, 0, 205],
+ "mediumorchid": [186, 85, 211],
+ "mediumpurple": [147, 112, 219],
+ "mediumseagreen": [60, 179, 113],
+ "mediumslateblue": [123, 104, 238],
+ "mediumspringgreen": [0, 250, 154],
+ "mediumturquoise": [72, 209, 204],
+ "mediumvioletred": [199, 21, 133],
+ "midnightblue": [25, 25, 112],
+ "mintcream": [245, 255, 250],
+ "mistyrose": [255, 228, 225],
+ "moccasin": [255, 228, 181],
+ "navajowhite": [255, 222, 173],
+ "navy": [0, 0, 128],
+ "oldlace": [253, 245, 230],
+ "olive": [128, 128, 0],
+ "olivedrab": [107, 142, 35],
+ "orange": [255, 165, 0],
+ "orangered": [255, 69, 0],
+ "orchid": [218, 112, 214],
+ "palegoldenrod": [238, 232, 170],
+ "palegreen": [152, 251, 152],
+ "paleturquoise": [175, 238, 238],
+ "palevioletred": [219, 112, 147],
+ "papayawhip": [255, 239, 213],
+ "peachpuff": [255, 218, 185],
+ "peru": [205, 133, 63],
+ "pink": [255, 192, 203],
+ "plum": [221, 160, 221],
+ "powderblue": [176, 224, 230],
+ "purple": [128, 0, 128],
+ "rebeccapurple": [102, 51, 153],
+ "red": [255, 0, 0],
+ "rosybrown": [188, 143, 143],
+ "royalblue": [65, 105, 225],
+ "saddlebrown": [139, 69, 19],
+ "salmon": [250, 128, 114],
+ "sandybrown": [244, 164, 96],
+ "seagreen": [46, 139, 87],
+ "seashell": [255, 245, 238],
+ "sienna": [160, 82, 45],
+ "silver": [192, 192, 192],
+ "skyblue": [135, 206, 235],
+ "slateblue": [106, 90, 205],
+ "slategray": [112, 128, 144],
+ "slategrey": [112, 128, 144],
+ "snow": [255, 250, 250],
+ "springgreen": [0, 255, 127],
+ "steelblue": [70, 130, 180],
+ "tan": [210, 180, 140],
+ "teal": [0, 128, 128],
+ "thistle": [216, 191, 216],
+ "tomato": [255, 99, 71],
+ "turquoise": [64, 224, 208],
+ "violet": [238, 130, 238],
+ "wheat": [245, 222, 179],
+ "white": [255, 255, 255],
+ "whitesmoke": [245, 245, 245],
+ "yellow": [255, 255, 0],
+ "yellowgreen": [154, 205, 50]
+};
diff --git a/tools/node_modules/eslint/node_modules/color-name/package.json b/tools/node_modules/eslint/node_modules/color-name/package.json
new file mode 100644
index 0000000000..6813811c58
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/color-name/package.json
@@ -0,0 +1,53 @@
+{
+ "_from": "color-name@^1.1.1",
+ "_id": "color-name@1.1.3",
+ "_inBundle": false,
+ "_integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
+ "_location": "/eslint/color-name",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "color-name@^1.1.1",
+ "name": "color-name",
+ "escapedName": "color-name",
+ "rawSpec": "^1.1.1",
+ "saveSpec": null,
+ "fetchSpec": "^1.1.1"
+ },
+ "_requiredBy": [
+ "/eslint/color-convert"
+ ],
+ "_resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "_shasum": "a7d0558bd89c42f795dd42328f740831ca53bc25",
+ "_spec": "color-name@^1.1.1",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/color-convert",
+ "author": {
+ "name": "DY",
+ "email": "dfcreative@gmail.com"
+ },
+ "bugs": {
+ "url": "https://github.com/dfcreative/color-name/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "A list of color names and its values",
+ "homepage": "https://github.com/dfcreative/color-name",
+ "keywords": [
+ "color-name",
+ "color",
+ "color-keyword",
+ "keyword"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "color-name",
+ "repository": {
+ "type": "git",
+ "url": "git+ssh://git@github.com/dfcreative/color-name.git"
+ },
+ "scripts": {
+ "test": "node test.js"
+ },
+ "version": "1.1.3"
+}
diff --git a/tools/node_modules/eslint/node_modules/concat-map/LICENSE b/tools/node_modules/eslint/node_modules/concat-map/LICENSE
new file mode 100644
index 0000000000..ee27ba4b44
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/concat-map/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/tools/node_modules/eslint/node_modules/concat-map/README.markdown b/tools/node_modules/eslint/node_modules/concat-map/README.markdown
new file mode 100644
index 0000000000..408f70a1be
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/concat-map/README.markdown
@@ -0,0 +1,62 @@
+concat-map
+==========
+
+Concatenative mapdashery.
+
+[![browser support](http://ci.testling.com/substack/node-concat-map.png)](http://ci.testling.com/substack/node-concat-map)
+
+[![build status](https://secure.travis-ci.org/substack/node-concat-map.png)](http://travis-ci.org/substack/node-concat-map)
+
+example
+=======
+
+``` js
+var concatMap = require('concat-map');
+var xs = [ 1, 2, 3, 4, 5, 6 ];
+var ys = concatMap(xs, function (x) {
+ return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];
+});
+console.dir(ys);
+```
+
+***
+
+```
+[ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]
+```
+
+methods
+=======
+
+``` js
+var concatMap = require('concat-map')
+```
+
+concatMap(xs, fn)
+-----------------
+
+Return an array of concatenated elements by calling `fn(x, i)` for each element
+`x` and each index `i` in the array `xs`.
+
+When `fn(x, i)` returns an array, its result will be concatenated with the
+result array. If `fn(x, i)` returns anything else, that value will be pushed
+onto the end of the result array.
+
+install
+=======
+
+With [npm](http://npmjs.org) do:
+
+```
+npm install concat-map
+```
+
+license
+=======
+
+MIT
+
+notes
+=====
+
+This module was written while sitting high above the ground in a tree.
diff --git a/tools/node_modules/eslint/node_modules/concat-map/index.js b/tools/node_modules/eslint/node_modules/concat-map/index.js
new file mode 100644
index 0000000000..b29a7812e5
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/concat-map/index.js
@@ -0,0 +1,13 @@
+module.exports = function (xs, fn) {
+ var res = [];
+ for (var i = 0; i < xs.length; i++) {
+ var x = fn(xs[i], i);
+ if (isArray(x)) res.push.apply(res, x);
+ else res.push(x);
+ }
+ return res;
+};
+
+var isArray = Array.isArray || function (xs) {
+ return Object.prototype.toString.call(xs) === '[object Array]';
+};
diff --git a/tools/node_modules/eslint/node_modules/concat-map/package.json b/tools/node_modules/eslint/node_modules/concat-map/package.json
new file mode 100644
index 0000000000..687b377e21
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/concat-map/package.json
@@ -0,0 +1,88 @@
+{
+ "_from": "concat-map@0.0.1",
+ "_id": "concat-map@0.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
+ "_location": "/eslint/concat-map",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "concat-map@0.0.1",
+ "name": "concat-map",
+ "escapedName": "concat-map",
+ "rawSpec": "0.0.1",
+ "saveSpec": null,
+ "fetchSpec": "0.0.1"
+ },
+ "_requiredBy": [
+ "/eslint/brace-expansion"
+ ],
+ "_resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "_shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b",
+ "_spec": "concat-map@0.0.1",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/brace-expansion",
+ "author": {
+ "name": "James Halliday",
+ "email": "mail@substack.net",
+ "url": "http://substack.net"
+ },
+ "bugs": {
+ "url": "https://github.com/substack/node-concat-map/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "concatenative mapdashery",
+ "devDependencies": {
+ "tape": "~2.4.0"
+ },
+ "directories": {
+ "example": "example",
+ "test": "test"
+ },
+ "homepage": "https://github.com/substack/node-concat-map#readme",
+ "keywords": [
+ "concat",
+ "concatMap",
+ "map",
+ "functional",
+ "higher-order"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "concat-map",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/substack/node-concat-map.git"
+ },
+ "scripts": {
+ "test": "tape test/*.js"
+ },
+ "testling": {
+ "files": "test/*.js",
+ "browsers": {
+ "ie": [
+ 6,
+ 7,
+ 8,
+ 9
+ ],
+ "ff": [
+ 3.5,
+ 10,
+ 15
+ ],
+ "chrome": [
+ 10,
+ 22
+ ],
+ "safari": [
+ 5.1
+ ],
+ "opera": [
+ 12
+ ]
+ }
+ },
+ "version": "0.0.1"
+}
diff --git a/tools/node_modules/eslint/node_modules/concat-stream/LICENSE b/tools/node_modules/eslint/node_modules/concat-stream/LICENSE
new file mode 100644
index 0000000000..99c130e1de
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/concat-stream/LICENSE
@@ -0,0 +1,24 @@
+The MIT License
+
+Copyright (c) 2013 Max Ogden
+
+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/tools/node_modules/eslint/node_modules/concat-stream/index.js b/tools/node_modules/eslint/node_modules/concat-stream/index.js
new file mode 100644
index 0000000000..b16ad1343f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/concat-stream/index.js
@@ -0,0 +1,143 @@
+var Writable = require('readable-stream').Writable
+var inherits = require('inherits')
+
+if (typeof Uint8Array === 'undefined') {
+ var U8 = require('typedarray').Uint8Array
+} else {
+ var U8 = Uint8Array
+}
+
+function ConcatStream(opts, cb) {
+ if (!(this instanceof ConcatStream)) return new ConcatStream(opts, cb)
+
+ if (typeof opts === 'function') {
+ cb = opts
+ opts = {}
+ }
+ if (!opts) opts = {}
+
+ var encoding = opts.encoding
+ var shouldInferEncoding = false
+
+ if (!encoding) {
+ shouldInferEncoding = true
+ } else {
+ encoding = String(encoding).toLowerCase()
+ if (encoding === 'u8' || encoding === 'uint8') {
+ encoding = 'uint8array'
+ }
+ }
+
+ Writable.call(this, { objectMode: true })
+
+ this.encoding = encoding
+ this.shouldInferEncoding = shouldInferEncoding
+
+ if (cb) this.on('finish', function () { cb(this.getBody()) })
+ this.body = []
+}
+
+module.exports = ConcatStream
+inherits(ConcatStream, Writable)
+
+ConcatStream.prototype._write = function(chunk, enc, next) {
+ this.body.push(chunk)
+ next()
+}
+
+ConcatStream.prototype.inferEncoding = function (buff) {
+ var firstBuffer = buff === undefined ? this.body[0] : buff;
+ if (Buffer.isBuffer(firstBuffer)) return 'buffer'
+ if (typeof Uint8Array !== 'undefined' && firstBuffer instanceof Uint8Array) return 'uint8array'
+ if (Array.isArray(firstBuffer)) return 'array'
+ if (typeof firstBuffer === 'string') return 'string'
+ if (Object.prototype.toString.call(firstBuffer) === "[object Object]") return 'object'
+ return 'buffer'
+}
+
+ConcatStream.prototype.getBody = function () {
+ if (!this.encoding && this.body.length === 0) return []
+ if (this.shouldInferEncoding) this.encoding = this.inferEncoding()
+ if (this.encoding === 'array') return arrayConcat(this.body)
+ if (this.encoding === 'string') return stringConcat(this.body)
+ if (this.encoding === 'buffer') return bufferConcat(this.body)
+ if (this.encoding === 'uint8array') return u8Concat(this.body)
+ return this.body
+}
+
+var isArray = Array.isArray || function (arr) {
+ return Object.prototype.toString.call(arr) == '[object Array]'
+}
+
+function isArrayish (arr) {
+ return /Array\]$/.test(Object.prototype.toString.call(arr))
+}
+
+function isBufferish (p) {
+ return typeof p === 'string' || isArrayish(p) || (p && typeof p.subarray === 'function')
+}
+
+function stringConcat (parts) {
+ var strings = []
+ var needsToString = false
+ for (var i = 0; i < parts.length; i++) {
+ var p = parts[i]
+ if (typeof p === 'string') {
+ strings.push(p)
+ } else if (Buffer.isBuffer(p)) {
+ strings.push(p)
+ } else if (isBufferish(p)) {
+ strings.push(new Buffer(p))
+ } else {
+ strings.push(new Buffer(String(p)))
+ }
+ }
+ if (Buffer.isBuffer(parts[0])) {
+ strings = Buffer.concat(strings)
+ strings = strings.toString('utf8')
+ } else {
+ strings = strings.join('')
+ }
+ return strings
+}
+
+function bufferConcat (parts) {
+ var bufs = []
+ for (var i = 0; i < parts.length; i++) {
+ var p = parts[i]
+ if (Buffer.isBuffer(p)) {
+ bufs.push(p)
+ } else if (isBufferish(p)) {
+ bufs.push(new Buffer(p))
+ } else {
+ bufs.push(new Buffer(String(p)))
+ }
+ }
+ return Buffer.concat(bufs)
+}
+
+function arrayConcat (parts) {
+ var res = []
+ for (var i = 0; i < parts.length; i++) {
+ res.push.apply(res, parts[i])
+ }
+ return res
+}
+
+function u8Concat (parts) {
+ var len = 0
+ for (var i = 0; i < parts.length; i++) {
+ if (typeof parts[i] === 'string') {
+ parts[i] = new Buffer(parts[i])
+ }
+ len += parts[i].length
+ }
+ var u8 = new U8(len)
+ for (var i = 0, offset = 0; i < parts.length; i++) {
+ var part = parts[i]
+ for (var j = 0; j < part.length; j++) {
+ u8[offset++] = part[j]
+ }
+ }
+ return u8
+}
diff --git a/tools/node_modules/eslint/node_modules/concat-stream/package.json b/tools/node_modules/eslint/node_modules/concat-stream/package.json
new file mode 100644
index 0000000000..e6a8a1d4cc
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/concat-stream/package.json
@@ -0,0 +1,83 @@
+{
+ "_from": "concat-stream@^1.6.0",
+ "_id": "concat-stream@1.6.0",
+ "_inBundle": false,
+ "_integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=",
+ "_location": "/eslint/concat-stream",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "concat-stream@^1.6.0",
+ "name": "concat-stream",
+ "escapedName": "concat-stream",
+ "rawSpec": "^1.6.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.6.0"
+ },
+ "_requiredBy": [
+ "/eslint"
+ ],
+ "_resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz",
+ "_shasum": "0aac662fd52be78964d5532f694784e70110acf7",
+ "_spec": "concat-stream@^1.6.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint",
+ "author": {
+ "name": "Max Ogden",
+ "email": "max@maxogden.com"
+ },
+ "bugs": {
+ "url": "http://github.com/maxogden/concat-stream/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "inherits": "^2.0.3",
+ "readable-stream": "^2.2.2",
+ "typedarray": "^0.0.6"
+ },
+ "deprecated": false,
+ "description": "writable stream that concatenates strings or binary data and calls a callback with the result",
+ "devDependencies": {
+ "tape": "^4.6.3"
+ },
+ "engines": [
+ "node >= 0.8"
+ ],
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/maxogden/concat-stream#readme",
+ "license": "MIT",
+ "main": "index.js",
+ "name": "concat-stream",
+ "repository": {
+ "type": "git",
+ "url": "git+ssh://git@github.com/maxogden/concat-stream.git"
+ },
+ "scripts": {
+ "test": "tape test/*.js test/server/*.js"
+ },
+ "tags": [
+ "stream",
+ "simple",
+ "util",
+ "utility"
+ ],
+ "testling": {
+ "files": "test/*.js",
+ "browsers": [
+ "ie/8..latest",
+ "firefox/17..latest",
+ "firefox/nightly",
+ "chrome/22..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.6.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/concat-stream/readme.md b/tools/node_modules/eslint/node_modules/concat-stream/readme.md
new file mode 100644
index 0000000000..f45e6fc872
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/concat-stream/readme.md
@@ -0,0 +1,102 @@
+# concat-stream
+
+Writable stream that concatenates all the data from a stream and calls a callback with the result. Use this when you want to collect all the data from a stream into a single buffer.
+
+[![Build Status](https://travis-ci.org/maxogden/concat-stream.svg?branch=master)](https://travis-ci.org/maxogden/concat-stream)
+
+[![NPM](https://nodei.co/npm/concat-stream.png)](https://nodei.co/npm/concat-stream/)
+
+### description
+
+Streams emit many buffers. If you want to collect all of the buffers, and when the stream ends concatenate all of the buffers together and receive a single buffer then this is the module for you.
+
+Only use this if you know you can fit all of the output of your stream into a single Buffer (e.g. in RAM).
+
+There are also `objectMode` streams that emit things other than Buffers, and you can concatenate these too. See below for details.
+
+## Related
+
+`concat-stream` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
+
+### examples
+
+#### Buffers
+
+```js
+var fs = require('fs')
+var concat = require('concat-stream')
+
+var readStream = fs.createReadStream('cat.png')
+var concatStream = concat(gotPicture)
+
+readStream.on('error', handleError)
+readStream.pipe(concatStream)
+
+function gotPicture(imageBuffer) {
+ // imageBuffer is all of `cat.png` as a node.js Buffer
+}
+
+function handleError(err) {
+ // handle your error appropriately here, e.g.:
+ console.error(err) // print the error to STDERR
+ process.exit(1) // exit program with non-zero exit code
+}
+
+```
+
+#### Arrays
+
+```js
+var write = concat(function(data) {})
+write.write([1,2,3])
+write.write([4,5,6])
+write.end()
+// data will be [1,2,3,4,5,6] in the above callback
+```
+
+#### Uint8Arrays
+
+```js
+var write = concat(function(data) {})
+var a = new Uint8Array(3)
+a[0] = 97; a[1] = 98; a[2] = 99
+write.write(a)
+write.write('!')
+write.end(Buffer('!!1'))
+```
+
+See `test/` for more examples
+
+# methods
+
+```js
+var concat = require('concat-stream')
+```
+
+## var writable = concat(opts={}, cb)
+
+Return a `writable` stream that will fire `cb(data)` with all of the data that
+was written to the stream. Data can be written to `writable` as strings,
+Buffers, arrays of byte integers, and Uint8Arrays.
+
+By default `concat-stream` will give you back the same data type as the type of the first buffer written to the stream. Use `opts.encoding` to set what format `data` should be returned as, e.g. if you if you don't want to rely on the built-in type checking or for some other reason.
+
+* `string` - get a string
+* `buffer` - get back a Buffer
+* `array` - get an array of byte integers
+* `uint8array`, `u8`, `uint8` - get back a Uint8Array
+* `object`, get back an array of Objects
+
+If you don't specify an encoding, and the types can't be inferred (e.g. you write things that aren't in the list above), it will try to convert concat them into a `Buffer`.
+
+If nothing is written to `writable` then `data` will be an empty array `[]`.
+
+# error handling
+
+`concat-stream` does not handle errors for you, so you must handle errors on whatever streams you pipe into `concat-stream`. This is a general rule when programming with node.js streams: always handle errors on each and every stream. Since `concat-stream` is not itself a stream it does not emit errors.
+
+We recommend using [`end-of-stream`](https://npmjs.org/end-of-stream) or [`pump`](https://npmjs.org/pump) for writing error tolerant stream code.
+
+# license
+
+MIT LICENSE
diff --git a/tools/node_modules/eslint/node_modules/core-util-is/LICENSE b/tools/node_modules/eslint/node_modules/core-util-is/LICENSE
new file mode 100644
index 0000000000..d8d7f9437d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/core-util-is/LICENSE
@@ -0,0 +1,19 @@
+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.
diff --git a/tools/node_modules/eslint/node_modules/core-util-is/README.md b/tools/node_modules/eslint/node_modules/core-util-is/README.md
new file mode 100644
index 0000000000..5a76b4149c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/core-util-is/README.md
@@ -0,0 +1,3 @@
+# core-util-is
+
+The `util.is*` functions introduced in Node v0.12.
diff --git a/tools/node_modules/eslint/node_modules/core-util-is/float.patch b/tools/node_modules/eslint/node_modules/core-util-is/float.patch
new file mode 100644
index 0000000000..a06d5c05f7
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/core-util-is/float.patch
@@ -0,0 +1,604 @@
+diff --git a/lib/util.js b/lib/util.js
+index a03e874..9074e8e 100644
+--- a/lib/util.js
++++ b/lib/util.js
+@@ -19,430 +19,6 @@
+ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+-var formatRegExp = /%[sdj%]/g;
+-exports.format = function(f) {
+- if (!isString(f)) {
+- var objects = [];
+- for (var i = 0; i < arguments.length; i++) {
+- objects.push(inspect(arguments[i]));
+- }
+- return objects.join(' ');
+- }
+-
+- var i = 1;
+- var args = arguments;
+- var len = args.length;
+- var str = String(f).replace(formatRegExp, function(x) {
+- if (x === '%%') return '%';
+- if (i >= 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);
+- }
+-
+- // 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)) {
+- // Format -0 as '-0'. Strict equality won't distinguish 0 from -0,
+- // so instead we use the fact that 1 / -0 < 0 whereas 1 / 0 > 0 .
+- if (value === 0 && 1 / value < 0)
+- return ctx.stylize('-0', 'number');
+- 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) {
+@@ -522,166 +98,10 @@ function isPrimitive(arg) {
+ exports.isPrimitive = isPrimitive;
+
+ function isBuffer(arg) {
+- return arg instanceof Buffer;
++ return Buffer.isBuffer(arg);
+ }
+ exports.isBuffer = 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 = function(ctor, superCtor) {
+- ctor.super_ = superCtor;
+- ctor.prototype = Object.create(superCtor.prototype, {
+- constructor: {
+- value: ctor,
+- enumerable: false,
+- writable: true,
+- configurable: true
+- }
+- });
+-};
+-
+-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);
+-}
+-
+-
+-// Deprecated old stuff.
+-
+-exports.p = exports.deprecate(function() {
+- for (var i = 0, len = arguments.length; i < len; ++i) {
+- console.error(exports.inspect(arguments[i]));
+- }
+-}, 'util.p: Use console.error() instead');
+-
+-
+-exports.exec = exports.deprecate(function() {
+- return require('child_process').exec.apply(this, arguments);
+-}, 'util.exec is now called `child_process.exec`.');
+-
+-
+-exports.print = exports.deprecate(function() {
+- for (var i = 0, len = arguments.length; i < len; ++i) {
+- process.stdout.write(String(arguments[i]));
+- }
+-}, 'util.print: Use console.log instead');
+-
+-
+-exports.puts = exports.deprecate(function() {
+- for (var i = 0, len = arguments.length; i < len; ++i) {
+- process.stdout.write(arguments[i] + '\n');
+- }
+-}, 'util.puts: Use console.log instead');
+-
+-
+-exports.debug = exports.deprecate(function(x) {
+- process.stderr.write('DEBUG: ' + x + '\n');
+-}, 'util.debug: Use console.error instead');
+-
+-
+-exports.error = exports.deprecate(function(x) {
+- for (var i = 0, len = arguments.length; i < len; ++i) {
+- process.stderr.write(arguments[i] + '\n');
+- }
+-}, 'util.error: Use console.error instead');
+-
+-
+-exports.pump = exports.deprecate(function(readStream, writeStream, callback) {
+- var callbackCalled = false;
+-
+- function call(a, b, c) {
+- if (callback && !callbackCalled) {
+- callback(a, b, c);
+- callbackCalled = true;
+- }
+- }
+-
+- readStream.addListener('data', function(chunk) {
+- if (writeStream.write(chunk) === false) readStream.pause();
+- });
+-
+- writeStream.addListener('drain', function() {
+- readStream.resume();
+- });
+-
+- readStream.addListener('end', function() {
+- writeStream.end();
+- });
+-
+- readStream.addListener('close', function() {
+- call();
+- });
+-
+- readStream.addListener('error', function(err) {
+- writeStream.end();
+- call(err);
+- });
+-
+- writeStream.addListener('error', function(err) {
+- readStream.destroy();
+- call(err);
+- });
+-}, 'util.pump(): Use readableStream.pipe() instead');
+-
+-
+-var uv;
+-exports._errnoException = function(err, syscall) {
+- if (isUndefined(uv)) uv = process.binding('uv');
+- var errname = uv.errname(err);
+- var e = new Error(syscall + ' ' + errname);
+- e.code = errname;
+- e.errno = errname;
+- e.syscall = syscall;
+- return e;
+-};
++} \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/core-util-is/lib/util.js b/tools/node_modules/eslint/node_modules/core-util-is/lib/util.js
new file mode 100644
index 0000000000..ff4c851c07
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/core-util-is/lib/util.js
@@ -0,0 +1,107 @@
+// 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.
+
+// NOTE: These type checking functions intentionally don't use `instanceof`
+// because it is fragile and can be easily faked with `Object.create()`.
+
+function isArray(arg) {
+ if (Array.isArray) {
+ return Array.isArray(arg);
+ }
+ return objectToString(arg) === '[object Array]';
+}
+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 objectToString(re) === '[object RegExp]';
+}
+exports.isRegExp = isRegExp;
+
+function isObject(arg) {
+ return typeof arg === 'object' && arg !== null;
+}
+exports.isObject = isObject;
+
+function isDate(d) {
+ return objectToString(d) === '[object Date]';
+}
+exports.isDate = isDate;
+
+function isError(e) {
+ return (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 = Buffer.isBuffer;
+
+function objectToString(o) {
+ return Object.prototype.toString.call(o);
+}
diff --git a/tools/node_modules/eslint/node_modules/core-util-is/package.json b/tools/node_modules/eslint/node_modules/core-util-is/package.json
new file mode 100644
index 0000000000..9b70462a0d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/core-util-is/package.json
@@ -0,0 +1,62 @@
+{
+ "_from": "core-util-is@~1.0.0",
+ "_id": "core-util-is@1.0.2",
+ "_inBundle": false,
+ "_integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
+ "_location": "/eslint/core-util-is",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "core-util-is@~1.0.0",
+ "name": "core-util-is",
+ "escapedName": "core-util-is",
+ "rawSpec": "~1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "~1.0.0"
+ },
+ "_requiredBy": [
+ "/eslint/readable-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
+ "_shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7",
+ "_spec": "core-util-is@~1.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/readable-stream",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "bugs": {
+ "url": "https://github.com/isaacs/core-util-is/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "The `util.is*` functions introduced in Node v0.12.",
+ "devDependencies": {
+ "tap": "^2.3.0"
+ },
+ "homepage": "https://github.com/isaacs/core-util-is#readme",
+ "keywords": [
+ "util",
+ "isBuffer",
+ "isArray",
+ "isNumber",
+ "isString",
+ "isRegExp",
+ "isThis",
+ "isThat",
+ "polyfill"
+ ],
+ "license": "MIT",
+ "main": "lib/util.js",
+ "name": "core-util-is",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/core-util-is.git"
+ },
+ "scripts": {
+ "test": "tap test.js"
+ },
+ "version": "1.0.2"
+}
diff --git a/tools/node_modules/eslint/node_modules/cross-spawn/LICENSE b/tools/node_modules/eslint/node_modules/cross-spawn/LICENSE
new file mode 100644
index 0000000000..db5e914de1
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/cross-spawn/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2014 IndigoUnited
+
+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/tools/node_modules/eslint/node_modules/cross-spawn/README.md b/tools/node_modules/eslint/node_modules/cross-spawn/README.md
new file mode 100644
index 0000000000..dde730df1b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/cross-spawn/README.md
@@ -0,0 +1,85 @@
+# cross-spawn
+
+[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Build status][appveyor-image]][appveyor-url] [![Dependency status][david-dm-image]][david-dm-url] [![Dev Dependency status][david-dm-dev-image]][david-dm-dev-url]
+
+[npm-url]:https://npmjs.org/package/cross-spawn
+[downloads-image]:http://img.shields.io/npm/dm/cross-spawn.svg
+[npm-image]:http://img.shields.io/npm/v/cross-spawn.svg
+[travis-url]:https://travis-ci.org/IndigoUnited/node-cross-spawn
+[travis-image]:http://img.shields.io/travis/IndigoUnited/node-cross-spawn/master.svg
+[appveyor-url]:https://ci.appveyor.com/project/satazor/node-cross-spawn
+[appveyor-image]:https://img.shields.io/appveyor/ci/satazor/node-cross-spawn/master.svg
+[david-dm-url]:https://david-dm.org/IndigoUnited/node-cross-spawn
+[david-dm-image]:https://img.shields.io/david/IndigoUnited/node-cross-spawn.svg
+[david-dm-dev-url]:https://david-dm.org/IndigoUnited/node-cross-spawn#info=devDependencies
+[david-dm-dev-image]:https://img.shields.io/david/dev/IndigoUnited/node-cross-spawn.svg
+
+A cross platform solution to node's spawn and spawnSync.
+
+
+## Installation
+
+`$ npm install cross-spawn`
+
+If you are using `spawnSync` on node 0.10 or older, you will also need to install `spawn-sync`:
+
+`$ npm install spawn-sync`
+
+
+## Why
+
+Node has issues when using spawn on Windows:
+
+- It ignores [PATHEXT](https://github.com/joyent/node/issues/2318)
+- It does not support [shebangs](http://pt.wikipedia.org/wiki/Shebang)
+- No `options.shell` support on node < v6
+- It does not allow you to run `del` or `dir`
+
+All these issues are handled correctly by `cross-spawn`.
+There are some known modules, such as [win-spawn](https://github.com/ForbesLindesay/win-spawn), that try to solve this but they are either broken or provide faulty escaping of shell arguments.
+
+
+## Usage
+
+Exactly the same way as node's [`spawn`](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options) or [`spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options), so it's a drop in replacement.
+
+
+```js
+var spawn = require('cross-spawn');
+
+// Spawn NPM asynchronously
+var child = spawn('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit' });
+
+// Spawn NPM synchronously
+var results = spawn.sync('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit' });
+```
+
+
+## Caveats
+
+#### `options.shell` as an alternative to `cross-spawn`
+
+Starting from node v6, `spawn` has a `shell` option that allows you run commands from within a shell. This new option solves most of the problems that `cross-spawn` attempts to solve, but:
+
+- It's not supported in node < v6
+- It has no support for shebangs on Windows
+- You must manually escape the command and arguments which is very error prone, specially when passing user input
+
+If you are using the `shell` option to spawn a command in a cross platform way, consider using `cross-spawn` instead. You have been warned.
+
+
+#### Shebangs
+
+While `cross-spawn` handles shebangs on Windows, its support is limited: e.g.: it doesn't handle arguments after the path, e.g.: `#!/bin/bash -e`.
+
+Remember to always test your code on Windows!
+
+
+## Tests
+
+`$ npm test`
+
+
+## License
+
+Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php).
diff --git a/tools/node_modules/eslint/node_modules/cross-spawn/index.js b/tools/node_modules/eslint/node_modules/cross-spawn/index.js
new file mode 100644
index 0000000000..7814a9692d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/cross-spawn/index.js
@@ -0,0 +1,59 @@
+'use strict';
+
+var cp = require('child_process');
+var parse = require('./lib/parse');
+var enoent = require('./lib/enoent');
+
+var cpSpawnSync = cp.spawnSync;
+
+function spawn(command, args, options) {
+ var parsed;
+ var spawned;
+
+ // Parse the arguments
+ parsed = parse(command, args, options);
+
+ // Spawn the child process
+ spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
+
+ // Hook into child process "exit" event to emit an error if the command
+ // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16
+ enoent.hookChildProcess(spawned, parsed);
+
+ return spawned;
+}
+
+function spawnSync(command, args, options) {
+ var parsed;
+ var result;
+
+ if (!cpSpawnSync) {
+ try {
+ cpSpawnSync = require('spawn-sync'); // eslint-disable-line global-require
+ } catch (ex) {
+ throw new Error(
+ 'In order to use spawnSync on node 0.10 or older, you must ' +
+ 'install spawn-sync:\n\n' +
+ ' npm install spawn-sync --save'
+ );
+ }
+ }
+
+ // Parse the arguments
+ parsed = parse(command, args, options);
+
+ // Spawn the child process
+ result = cpSpawnSync(parsed.command, parsed.args, parsed.options);
+
+ // Analyze if the command does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16
+ result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
+
+ return result;
+}
+
+module.exports = spawn;
+module.exports.spawn = spawn;
+module.exports.sync = spawnSync;
+
+module.exports._parse = parse;
+module.exports._enoent = enoent;
diff --git a/tools/node_modules/eslint/node_modules/cross-spawn/lib/enoent.js b/tools/node_modules/eslint/node_modules/cross-spawn/lib/enoent.js
new file mode 100644
index 0000000000..d0a193aecd
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/cross-spawn/lib/enoent.js
@@ -0,0 +1,73 @@
+'use strict';
+
+var isWin = process.platform === 'win32';
+var resolveCommand = require('./util/resolveCommand');
+
+var isNode10 = process.version.indexOf('v0.10.') === 0;
+
+function notFoundError(command, syscall) {
+ var err;
+
+ err = new Error(syscall + ' ' + command + ' ENOENT');
+ err.code = err.errno = 'ENOENT';
+ err.syscall = syscall + ' ' + command;
+
+ return err;
+}
+
+function hookChildProcess(cp, parsed) {
+ var originalEmit;
+
+ if (!isWin) {
+ return;
+ }
+
+ originalEmit = cp.emit;
+ cp.emit = function (name, arg1) {
+ var err;
+
+ // If emitting "exit" event and exit code is 1, we need to check if
+ // the command exists and emit an "error" instead
+ // See: https://github.com/IndigoUnited/node-cross-spawn/issues/16
+ if (name === 'exit') {
+ err = verifyENOENT(arg1, parsed, 'spawn');
+
+ if (err) {
+ return originalEmit.call(cp, 'error', err);
+ }
+ }
+
+ return originalEmit.apply(cp, arguments);
+ };
+}
+
+function verifyENOENT(status, parsed) {
+ if (isWin && status === 1 && !parsed.file) {
+ return notFoundError(parsed.original, 'spawn');
+ }
+
+ return null;
+}
+
+function verifyENOENTSync(status, parsed) {
+ if (isWin && status === 1 && !parsed.file) {
+ return notFoundError(parsed.original, 'spawnSync');
+ }
+
+ // If we are in node 10, then we are using spawn-sync; if it exited
+ // with -1 it probably means that the command does not exist
+ if (isNode10 && status === -1) {
+ parsed.file = isWin ? parsed.file : resolveCommand(parsed.original);
+
+ if (!parsed.file) {
+ return notFoundError(parsed.original, 'spawnSync');
+ }
+ }
+
+ return null;
+}
+
+module.exports.hookChildProcess = hookChildProcess;
+module.exports.verifyENOENT = verifyENOENT;
+module.exports.verifyENOENTSync = verifyENOENTSync;
+module.exports.notFoundError = notFoundError;
diff --git a/tools/node_modules/eslint/node_modules/cross-spawn/lib/parse.js b/tools/node_modules/eslint/node_modules/cross-spawn/lib/parse.js
new file mode 100644
index 0000000000..10a013625b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/cross-spawn/lib/parse.js
@@ -0,0 +1,113 @@
+'use strict';
+
+var resolveCommand = require('./util/resolveCommand');
+var hasEmptyArgumentBug = require('./util/hasEmptyArgumentBug');
+var escapeArgument = require('./util/escapeArgument');
+var escapeCommand = require('./util/escapeCommand');
+var readShebang = require('./util/readShebang');
+
+var isWin = process.platform === 'win32';
+var skipShellRegExp = /\.(?:com|exe)$/i;
+
+// Supported in Node >= 6 and >= 4.8
+var supportsShellOption = parseInt(process.version.substr(1).split('.')[0], 10) >= 6 ||
+ parseInt(process.version.substr(1).split('.')[0], 10) === 4 && parseInt(process.version.substr(1).split('.')[1], 10) >= 8;
+
+function parseNonShell(parsed) {
+ var shebang;
+ var needsShell;
+ var applyQuotes;
+
+ if (!isWin) {
+ return parsed;
+ }
+
+ // Detect & add support for shebangs
+ parsed.file = resolveCommand(parsed.command);
+ parsed.file = parsed.file || resolveCommand(parsed.command, true);
+ shebang = parsed.file && readShebang(parsed.file);
+
+ if (shebang) {
+ parsed.args.unshift(parsed.file);
+ parsed.command = shebang;
+ needsShell = hasEmptyArgumentBug || !skipShellRegExp.test(resolveCommand(shebang) || resolveCommand(shebang, true));
+ } else {
+ needsShell = hasEmptyArgumentBug || !skipShellRegExp.test(parsed.file);
+ }
+
+ // If a shell is required, use cmd.exe and take care of escaping everything correctly
+ if (needsShell) {
+ // Escape command & arguments
+ applyQuotes = (parsed.command !== 'echo'); // Do not quote arguments for the special "echo" command
+ parsed.command = escapeCommand(parsed.command);
+ parsed.args = parsed.args.map(function (arg) {
+ return escapeArgument(arg, applyQuotes);
+ });
+
+ // Make use of cmd.exe
+ parsed.args = ['/d', '/s', '/c', '"' + parsed.command + (parsed.args.length ? ' ' + parsed.args.join(' ') : '') + '"'];
+ parsed.command = process.env.comspec || 'cmd.exe';
+ parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped
+ }
+
+ return parsed;
+}
+
+function parseShell(parsed) {
+ var shellCommand;
+
+ // If node supports the shell option, there's no need to mimic its behavior
+ if (supportsShellOption) {
+ return parsed;
+ }
+
+ // Mimic node shell option, see: https://github.com/nodejs/node/blob/b9f6a2dc059a1062776133f3d4fd848c4da7d150/lib/child_process.js#L335
+ shellCommand = [parsed.command].concat(parsed.args).join(' ');
+
+ if (isWin) {
+ parsed.command = typeof parsed.options.shell === 'string' ? parsed.options.shell : process.env.comspec || 'cmd.exe';
+ parsed.args = ['/d', '/s', '/c', '"' + shellCommand + '"'];
+ parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped
+ } else {
+ if (typeof parsed.options.shell === 'string') {
+ parsed.command = parsed.options.shell;
+ } else if (process.platform === 'android') {
+ parsed.command = '/system/bin/sh';
+ } else {
+ parsed.command = '/bin/sh';
+ }
+
+ parsed.args = ['-c', shellCommand];
+ }
+
+ return parsed;
+}
+
+// ------------------------------------------------
+
+function parse(command, args, options) {
+ var parsed;
+
+ // Normalize arguments, similar to nodejs
+ if (args && !Array.isArray(args)) {
+ options = args;
+ args = null;
+ }
+
+ args = args ? args.slice(0) : []; // Clone array to avoid changing the original
+ options = options || {};
+
+ // Build our parsed object
+ parsed = {
+ command: command,
+ args: args,
+ options: options,
+ file: undefined,
+ original: command,
+ };
+
+ // Delegate further parsing to shell or non-shell
+ return options.shell ? parseShell(parsed) : parseNonShell(parsed);
+}
+
+module.exports = parse;
diff --git a/tools/node_modules/eslint/node_modules/cross-spawn/lib/util/escapeArgument.js b/tools/node_modules/eslint/node_modules/cross-spawn/lib/util/escapeArgument.js
new file mode 100644
index 0000000000..367263f669
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/cross-spawn/lib/util/escapeArgument.js
@@ -0,0 +1,30 @@
+'use strict';
+
+function escapeArgument(arg, quote) {
+ // Convert to string
+ arg = '' + arg;
+
+ // If we are not going to quote the argument,
+ // escape shell metacharacters, including double and single quotes:
+ if (!quote) {
+ arg = arg.replace(/([()%!^<>&|;,"'\s])/g, '^$1');
+ } else {
+ // Sequence of backslashes followed by a double quote:
+ // double up all the backslashes and escape the double quote
+ arg = arg.replace(/(\\*)"/g, '$1$1\\"');
+
+ // Sequence of backslashes followed by the end of the string
+ // (which will become a double quote later):
+ // double up all the backslashes
+ arg = arg.replace(/(\\*)$/, '$1$1');
+
+ // All other backslashes occur literally
+
+ // Quote the whole thing:
+ arg = '"' + arg + '"';
+ }
+
+ return arg;
+}
+
+module.exports = escapeArgument;
diff --git a/tools/node_modules/eslint/node_modules/cross-spawn/lib/util/escapeCommand.js b/tools/node_modules/eslint/node_modules/cross-spawn/lib/util/escapeCommand.js
new file mode 100644
index 0000000000..d9c25b2656
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/cross-spawn/lib/util/escapeCommand.js
@@ -0,0 +1,12 @@
+'use strict';
+
+var escapeArgument = require('./escapeArgument');
+
+function escapeCommand(command) {
+ // Do not escape if this command is not dangerous..
+ // We do this so that commands like "echo" or "ifconfig" work
+ // Quoting them, will make them unaccessible
+ return /^[a-z0-9_-]+$/i.test(command) ? command : escapeArgument(command, true);
+}
+
+module.exports = escapeCommand;
diff --git a/tools/node_modules/eslint/node_modules/cross-spawn/lib/util/hasEmptyArgumentBug.js b/tools/node_modules/eslint/node_modules/cross-spawn/lib/util/hasEmptyArgumentBug.js
new file mode 100644
index 0000000000..9f2eba6355
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/cross-spawn/lib/util/hasEmptyArgumentBug.js
@@ -0,0 +1,18 @@
+'use strict';
+
+// See: https://github.com/IndigoUnited/node-cross-spawn/pull/34#issuecomment-221623455
+function hasEmptyArgumentBug() {
+ var nodeVer;
+
+ if (process.platform !== 'win32') {
+ return false;
+ }
+
+ nodeVer = process.version.substr(1).split('.').map(function (num) {
+ return parseInt(num, 10);
+ });
+
+ return (nodeVer[0] === 0 && nodeVer[1] < 12);
+}
+
+module.exports = hasEmptyArgumentBug();
diff --git a/tools/node_modules/eslint/node_modules/cross-spawn/lib/util/readShebang.js b/tools/node_modules/eslint/node_modules/cross-spawn/lib/util/readShebang.js
new file mode 100644
index 0000000000..2cf3541c99
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/cross-spawn/lib/util/readShebang.js
@@ -0,0 +1,37 @@
+'use strict';
+
+var fs = require('fs');
+var LRU = require('lru-cache');
+var shebangCommand = require('shebang-command');
+
+var shebangCache = new LRU({ max: 50, maxAge: 30 * 1000 }); // Cache just for 30sec
+
+function readShebang(command) {
+ var buffer;
+ var fd;
+ var shebang;
+
+ // Check if it is in the cache first
+ if (shebangCache.has(command)) {
+ return shebangCache.get(command);
+ }
+
+ // Read the first 150 bytes from the file
+ buffer = new Buffer(150);
+
+ try {
+ fd = fs.openSync(command, 'r');
+ fs.readSync(fd, buffer, 0, 150, 0);
+ fs.closeSync(fd);
+ } catch (e) { /* empty */ }
+
+ // Attempt to extract shebang (null is returned if not a shebang)
+ shebang = shebangCommand(buffer.toString());
+
+ // Store the shebang in the cache
+ shebangCache.set(command, shebang);
+
+ return shebang;
+}
+
+module.exports = readShebang;
diff --git a/tools/node_modules/eslint/node_modules/cross-spawn/lib/util/resolveCommand.js b/tools/node_modules/eslint/node_modules/cross-spawn/lib/util/resolveCommand.js
new file mode 100644
index 0000000000..b7a9490974
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/cross-spawn/lib/util/resolveCommand.js
@@ -0,0 +1,31 @@
+'use strict';
+
+var path = require('path');
+var which = require('which');
+var LRU = require('lru-cache');
+
+var commandCache = new LRU({ max: 50, maxAge: 30 * 1000 }); // Cache just for 30sec
+
+function resolveCommand(command, noExtension) {
+ var resolved;
+
+ noExtension = !!noExtension;
+ resolved = commandCache.get(command + '!' + noExtension);
+
+ // Check if its resolved in the cache
+ if (commandCache.has(command)) {
+ return commandCache.get(command);
+ }
+
+ try {
+ resolved = !noExtension ?
+ which.sync(command) :
+ which.sync(command, { pathExt: path.delimiter + (process.env.PATHEXT || '') });
+ } catch (e) { /* empty */ }
+
+ commandCache.set(command + '!' + noExtension, resolved);
+
+ return resolved;
+}
+
+module.exports = resolveCommand;
diff --git a/tools/node_modules/eslint/node_modules/cross-spawn/package.json b/tools/node_modules/eslint/node_modules/cross-spawn/package.json
new file mode 100644
index 0000000000..3398eadcd3
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/cross-spawn/package.json
@@ -0,0 +1,83 @@
+{
+ "_from": "cross-spawn@^5.1.0",
+ "_id": "cross-spawn@5.1.0",
+ "_inBundle": false,
+ "_integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=",
+ "_location": "/eslint/cross-spawn",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "cross-spawn@^5.1.0",
+ "name": "cross-spawn",
+ "escapedName": "cross-spawn",
+ "rawSpec": "^5.1.0",
+ "saveSpec": null,
+ "fetchSpec": "^5.1.0"
+ },
+ "_requiredBy": [
+ "/eslint"
+ ],
+ "_resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
+ "_shasum": "e8bd0efee58fcff6f8f94510a0a554bbfa235449",
+ "_spec": "cross-spawn@^5.1.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint",
+ "author": {
+ "name": "IndigoUnited",
+ "email": "hello@indigounited.com",
+ "url": "http://indigounited.com"
+ },
+ "bugs": {
+ "url": "https://github.com/IndigoUnited/node-cross-spawn/issues/"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "lru-cache": "^4.0.1",
+ "shebang-command": "^1.2.0",
+ "which": "^1.2.9"
+ },
+ "deprecated": false,
+ "description": "Cross platform child_process#spawn and child_process#spawnSync",
+ "devDependencies": {
+ "@satazor/eslint-config": "^3.0.0",
+ "eslint": "^3.0.0",
+ "expect.js": "^0.3.0",
+ "glob": "^7.0.0",
+ "mkdirp": "^0.5.1",
+ "mocha": "^3.0.2",
+ "once": "^1.4.0",
+ "rimraf": "^2.5.0"
+ },
+ "files": [
+ "index.js",
+ "lib"
+ ],
+ "homepage": "https://github.com/IndigoUnited/node-cross-spawn#readme",
+ "keywords": [
+ "spawn",
+ "spawnSync",
+ "windows",
+ "cross",
+ "platform",
+ "path",
+ "ext",
+ "path-ext",
+ "path_ext",
+ "shebang",
+ "hashbang",
+ "cmd",
+ "execute"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "cross-spawn",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/IndigoUnited/node-cross-spawn.git"
+ },
+ "scripts": {
+ "lint": "eslint '{*.js,lib/**/*.js,test/**/*.js}'",
+ "test": "node test/prepare && mocha --bail test/test"
+ },
+ "version": "5.1.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/debug/.coveralls.yml b/tools/node_modules/eslint/node_modules/debug/.coveralls.yml
new file mode 100644
index 0000000000..20a7068581
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/debug/.coveralls.yml
@@ -0,0 +1 @@
+repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve
diff --git a/tools/node_modules/eslint/node_modules/debug/LICENSE b/tools/node_modules/eslint/node_modules/debug/LICENSE
new file mode 100644
index 0000000000..658c933d28
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/debug/LICENSE
@@ -0,0 +1,19 @@
+(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/tools/node_modules/eslint/node_modules/debug/Makefile b/tools/node_modules/eslint/node_modules/debug/Makefile
new file mode 100644
index 0000000000..3ddd1360e6
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/debug/Makefile
@@ -0,0 +1,58 @@
+# 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
+
+install: node_modules
+
+browser: dist/debug.js
+
+node_modules: package.json
+ @NODE_ENV= $(PKG) install
+ @touch node_modules
+
+dist/debug.js: src/*.js node_modules
+ @mkdir -p dist
+ @$(BROWSERIFY) \
+ --standalone debug \
+ . > dist/debug.js
+
+lint:
+ @eslint *.js src/*.js
+
+test-node:
+ @istanbul cover node_modules/mocha/bin/_mocha -- test/**.js
+ @cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
+
+test-browser:
+ @$(MAKE) browser
+ @karma start --single-run
+
+test-all:
+ @concurrently \
+ "make test-node" \
+ "make test-browser"
+
+test:
+ @if [ "x$(BROWSER)" = "x" ]; then \
+ $(MAKE) test-node; \
+ else \
+ $(MAKE) test-browser; \
+ fi
+
+clean:
+ rimraf dist coverage
+
+.PHONY: browser install clean lint test test-all test-node test-browser
diff --git a/tools/node_modules/eslint/node_modules/debug/Readme.md b/tools/node_modules/eslint/node_modules/debug/Readme.md
new file mode 100644
index 0000000000..8e754d17b1
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/debug/Readme.md
@@ -0,0 +1,368 @@
+# 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) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers)
+[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors)
+
+<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
+
+A tiny JavaScript debugging utility modelled after Node.js core's debugging
+technique. Works in Node.js and web browsers.
+
+## 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_](./examples/node/app.js):
+
+```js
+var debug = require('debug')('http')
+ , http = require('http')
+ , name = 'My App';
+
+// fake app
+
+debug('booting %o', 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_](./examples/node/worker.js):
+
+```js
+var a = require('debug')('worker:a')
+ , b = require('debug')('worker:b');
+
+function work() {
+ a('doing lots of uninteresting work');
+ setTimeout(work, Math.random() * 1000);
+}
+
+work();
+
+function workb() {
+ b('doing some work');
+ setTimeout(workb, Math.random() * 2000);
+}
+
+workb();
+```
+
+The `DEBUG` environment variable is then used to enable these based on space or
+comma-delimited names.
+
+Here are some examples:
+
+<img width="647" alt="screen shot 2017-08-08 at 12 53 04 pm" src="https://user-images.githubusercontent.com/71256/29091703-a6302cdc-7c38-11e7-8304-7c0b3bc600cd.png">
+<img width="647" alt="screen shot 2017-08-08 at 12 53 38 pm" src="https://user-images.githubusercontent.com/71256/29091700-a62a6888-7c38-11e7-800b-db911291ca2b.png">
+<img width="647" alt="screen shot 2017-08-08 at 12 53 25 pm" src="https://user-images.githubusercontent.com/71256/29091701-a62ea114-7c38-11e7-826a-2692bedca740.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.
+
+
+## Namespace Colors
+
+Every debug instance has a color generated for it based on its namespace name.
+This helps when visually parsing the debug output to identify which debug instance
+a debug line belongs to.
+
+#### Node.js
+
+In Node.js, colors are enabled when stderr is a TTY. You also _should_ install
+the [`supports-color`](https://npmjs.org/supports-color) module alongside debug,
+otherwise debug will only use a small handful of basic colors.
+
+<img width="521" src="https://user-images.githubusercontent.com/71256/29092181-47f6a9e6-7c3a-11e7-9a14-1928d8a711cd.png">
+
+#### Web Browser
+
+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).
+
+<img width="524" src="https://user-images.githubusercontent.com/71256/29092033-b65f9f2e-7c39-11e7-8e32-f6f0d8e865c1.png">
+
+
+## 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.
+
+<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
+
+When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below:
+
+<img width="647" src="https://user-images.githubusercontent.com/71256/29091956-6bd78372-7c39-11e7-8c55-c948396d6edd.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". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output.
+
+## 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/disables specific debugging namespaces. |
+| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). |
+| `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);
+```
+
+
+## Output streams
+
+ By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
+
+Example [_stdout.js_](./examples/node/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');
+```
+
+## Checking whether a debug target is enabled
+
+After you've created a debug instance, you can determine whether or not it is
+enabled by checking the `enabled` property:
+
+```javascript
+const debug = require('debug')('http');
+
+if (debug.enabled) {
+ // do stuff...
+}
+```
+
+You can also manually toggle this property to force the debug instance to be
+enabled or disabled.
+
+
+## Authors
+
+ - TJ Holowaychuk
+ - Nathan Rajlich
+ - Andrew Rhyne
+
+## Backers
+
+Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)]
+
+<a href="https://opencollective.com/debug/backer/0/website" target="_blank"><img src="https://opencollective.com/debug/backer/0/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/1/website" target="_blank"><img src="https://opencollective.com/debug/backer/1/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/2/website" target="_blank"><img src="https://opencollective.com/debug/backer/2/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/3/website" target="_blank"><img src="https://opencollective.com/debug/backer/3/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/4/website" target="_blank"><img src="https://opencollective.com/debug/backer/4/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/5/website" target="_blank"><img src="https://opencollective.com/debug/backer/5/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/6/website" target="_blank"><img src="https://opencollective.com/debug/backer/6/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/7/website" target="_blank"><img src="https://opencollective.com/debug/backer/7/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/8/website" target="_blank"><img src="https://opencollective.com/debug/backer/8/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/9/website" target="_blank"><img src="https://opencollective.com/debug/backer/9/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/10/website" target="_blank"><img src="https://opencollective.com/debug/backer/10/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/11/website" target="_blank"><img src="https://opencollective.com/debug/backer/11/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/12/website" target="_blank"><img src="https://opencollective.com/debug/backer/12/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/13/website" target="_blank"><img src="https://opencollective.com/debug/backer/13/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/14/website" target="_blank"><img src="https://opencollective.com/debug/backer/14/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/15/website" target="_blank"><img src="https://opencollective.com/debug/backer/15/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/16/website" target="_blank"><img src="https://opencollective.com/debug/backer/16/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/17/website" target="_blank"><img src="https://opencollective.com/debug/backer/17/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/18/website" target="_blank"><img src="https://opencollective.com/debug/backer/18/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/19/website" target="_blank"><img src="https://opencollective.com/debug/backer/19/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/20/website" target="_blank"><img src="https://opencollective.com/debug/backer/20/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/21/website" target="_blank"><img src="https://opencollective.com/debug/backer/21/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/22/website" target="_blank"><img src="https://opencollective.com/debug/backer/22/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/23/website" target="_blank"><img src="https://opencollective.com/debug/backer/23/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/24/website" target="_blank"><img src="https://opencollective.com/debug/backer/24/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/25/website" target="_blank"><img src="https://opencollective.com/debug/backer/25/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/26/website" target="_blank"><img src="https://opencollective.com/debug/backer/26/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/27/website" target="_blank"><img src="https://opencollective.com/debug/backer/27/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/28/website" target="_blank"><img src="https://opencollective.com/debug/backer/28/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/29/website" target="_blank"><img src="https://opencollective.com/debug/backer/29/avatar.svg"></a>
+
+
+## Sponsors
+
+Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)]
+
+<a href="https://opencollective.com/debug/sponsor/0/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/0/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/1/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/1/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/2/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/2/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/3/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/3/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/4/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/4/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/5/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/5/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/6/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/6/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/7/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/7/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/8/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/8/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/9/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/9/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/10/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/10/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/11/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/11/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/12/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/12/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/13/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/13/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/14/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/14/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/15/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/15/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/16/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/16/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/17/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/17/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/18/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/18/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/19/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/19/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/20/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/20/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/21/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/21/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/22/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/22/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/23/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/23/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/24/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/24/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/25/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/25/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/26/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/26/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/27/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/27/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/28/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/28/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/29/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/29/avatar.svg"></a>
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2014-2017 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
+
+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/tools/node_modules/eslint/node_modules/debug/karma.conf.js b/tools/node_modules/eslint/node_modules/debug/karma.conf.js
new file mode 100644
index 0000000000..103a82d15b
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/debug/node.js b/tools/node_modules/eslint/node_modules/debug/node.js
new file mode 100644
index 0000000000..7fc36fe6db
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/debug/node.js
@@ -0,0 +1 @@
+module.exports = require('./src/node');
diff --git a/tools/node_modules/eslint/node_modules/debug/package.json b/tools/node_modules/eslint/node_modules/debug/package.json
new file mode 100644
index 0000000000..10528463cf
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/debug/package.json
@@ -0,0 +1,82 @@
+{
+ "_from": "debug@^3.0.1",
+ "_id": "debug@3.1.0",
+ "_inBundle": false,
+ "_integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
+ "_location": "/eslint/debug",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "debug@^3.0.1",
+ "name": "debug",
+ "escapedName": "debug",
+ "rawSpec": "^3.0.1",
+ "saveSpec": null,
+ "fetchSpec": "^3.0.1"
+ },
+ "_requiredBy": [
+ "/eslint"
+ ],
+ "_resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
+ "_shasum": "5bb5a0672628b64149566ba16819e61518c67261",
+ "_spec": "debug@^3.0.1",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint",
+ "author": {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ "browser": "./src/browser.js",
+ "bugs": {
+ "url": "https://github.com/visionmedia/debug/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Nathan Rajlich",
+ "email": "nathan@tootallnate.net",
+ "url": "http://n8.io"
+ },
+ {
+ "name": "Andrew Rhyne",
+ "email": "rhyneandrew@gmail.com"
+ }
+ ],
+ "dependencies": {
+ "ms": "2.0.0"
+ },
+ "deprecated": false,
+ "description": "small debugging utility",
+ "devDependencies": {
+ "browserify": "14.4.0",
+ "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"
+ },
+ "homepage": "https://github.com/visionmedia/debug#readme",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "license": "MIT",
+ "main": "./src/index.js",
+ "name": "debug",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/visionmedia/debug.git"
+ },
+ "version": "3.1.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/debug/src/browser.js b/tools/node_modules/eslint/node_modules/debug/src/browser.js
new file mode 100644
index 0000000000..f5149ff529
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/debug/src/browser.js
@@ -0,0 +1,195 @@
+/**
+ * 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 = [
+ '#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC',
+ '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF',
+ '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC',
+ '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF',
+ '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC',
+ '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033',
+ '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366',
+ '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933',
+ '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC',
+ '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF',
+ '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'
+];
+
+/**
+ * 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.process && window.process.type === 'renderer') {
+ return true;
+ }
+
+ // Internet Explorer and Edge do not support colors.
+ if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
+ return false;
+ }
+
+ // 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.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
+ // is firebug? http://stackoverflow.com/a/398120/376773
+ (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
+ // is firefox >= v31?
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
+ (typeof navigator !== 'undefined' && 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.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() {
+ var r;
+ try {
+ r = exports.storage.debug;
+ } catch(e) {}
+
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
+ if (!r && typeof process !== 'undefined' && 'env' in process) {
+ r = process.env.DEBUG;
+ }
+
+ 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/tools/node_modules/eslint/node_modules/debug/src/debug.js b/tools/node_modules/eslint/node_modules/debug/src/debug.js
new file mode 100644
index 0000000000..77e6384a33
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/debug/src/debug.js
@@ -0,0 +1,225 @@
+
+/**
+ * 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');
+
+/**
+ * Active `debug` instances.
+ */
+exports.instances = [];
+
+/**
+ * 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 = {};
+
+/**
+ * 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) {
+
+ var prevTime;
+
+ 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);
+ debug.destroy = destroy;
+
+ // env-specific initialization logic for debug instances
+ if ('function' === typeof exports.init) {
+ exports.init(debug);
+ }
+
+ exports.instances.push(debug);
+
+ return debug;
+}
+
+function destroy () {
+ var index = exports.instances.indexOf(this);
+ if (index !== -1) {
+ exports.instances.splice(index, 1);
+ return true;
+ } else {
+ return false;
+ }
+}
+
+/**
+ * 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 i;
+ var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
+ var len = split.length;
+
+ for (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 + '$'));
+ }
+ }
+
+ for (i = 0; i < exports.instances.length; i++) {
+ var instance = exports.instances[i];
+ instance.enabled = exports.enabled(instance.namespace);
+ }
+}
+
+/**
+ * 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) {
+ if (name[name.length - 1] === '*') {
+ return true;
+ }
+ 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/tools/node_modules/eslint/node_modules/debug/src/index.js b/tools/node_modules/eslint/node_modules/debug/src/index.js
new file mode 100644
index 0000000000..cabcbcda13
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/debug/src/node.js b/tools/node_modules/eslint/node_modules/debug/src/node.js
new file mode 100644
index 0000000000..d666fb9c00
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/debug/src/node.js
@@ -0,0 +1,186 @@
+/**
+ * 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 ];
+
+try {
+ var supportsColor = require('supports-color');
+ if (supportsColor && supportsColor.level >= 2) {
+ exports.colors = [
+ 20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68,
+ 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134,
+ 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,
+ 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+ 205, 206, 207, 208, 209, 214, 215, 220, 221
+ ];
+ }
+} catch (err) {
+ // swallow - we only care if `supports-color` is available; it doesn't have to be.
+}
+
+/**
+ * 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])/g, 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;
+}, {});
+
+/**
+ * Is stdout a TTY? Colored output is enabled when `true`.
+ */
+
+function useColors() {
+ return 'colors' in exports.inspectOpts
+ ? Boolean(exports.inspectOpts.colors)
+ : tty.isatty(process.stderr.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)
+ .split('\n').map(function(str) {
+ return str.trim()
+ }).join(' ');
+};
+
+/**
+ * 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 colorCode = '\u001b[3' + (c < 8 ? c : '8;5;' + c);
+ var prefix = ' ' + colorCode + ';1m' + name + ' ' + '\u001b[0m';
+
+ args[0] = prefix + args[0].split('\n').join('\n' + prefix);
+ args.push(colorCode + 'm+' + exports.humanize(this.diff) + '\u001b[0m');
+ } else {
+ args[0] = getDate() + name + ' ' + args[0];
+ }
+}
+
+function getDate() {
+ if (exports.inspectOpts.hideDate) {
+ return '';
+ } else {
+ return new Date().toISOString() + ' ';
+ }
+}
+
+/**
+ * Invokes `util.format()` with the specified arguments and writes to stderr.
+ */
+
+function log() {
+ return process.stderr.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;
+}
+
+/**
+ * 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 = {};
+
+ var keys = Object.keys(exports.inspectOpts);
+ for (var i = 0; i < keys.length; i++) {
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
+ }
+}
+
+/**
+ * Enable namespaces listed in `process.env.DEBUG` initially.
+ */
+
+exports.enable(load());
diff --git a/tools/node_modules/eslint/node_modules/deep-is/LICENSE b/tools/node_modules/eslint/node_modules/deep-is/LICENSE
new file mode 100644
index 0000000000..c38f84073f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/deep-is/LICENSE
@@ -0,0 +1,22 @@
+Copyright (c) 2012, 2013 Thorsten Lorenz <thlorenz@gmx.de>
+Copyright (c) 2012 James Halliday <mail@substack.net>
+Copyright (c) 2009 Thomas Robinson <280north.com>
+
+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/tools/node_modules/eslint/node_modules/deep-is/README.markdown b/tools/node_modules/eslint/node_modules/deep-is/README.markdown
new file mode 100644
index 0000000000..eb69a83bda
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/deep-is/README.markdown
@@ -0,0 +1,70 @@
+deep-is
+==========
+
+Node's `assert.deepEqual() algorithm` as a standalone module. Exactly like
+[deep-equal](https://github.com/substack/node-deep-equal) except for the fact that `deepEqual(NaN, NaN) === true`.
+
+This module is around [5 times faster](https://gist.github.com/2790507)
+than wrapping `assert.deepEqual()` in a `try/catch`.
+
+[![browser support](http://ci.testling.com/thlorenz/deep-is.png)](http://ci.testling.com/thlorenz/deep-is)
+
+[![build status](https://secure.travis-ci.org/thlorenz/deep-is.png)](http://travis-ci.org/thlorenz/deep-is)
+
+example
+=======
+
+``` js
+var equal = require('deep-is');
+console.dir([
+ equal(
+ { a : [ 2, 3 ], b : [ 4 ] },
+ { a : [ 2, 3 ], b : [ 4 ] }
+ ),
+ equal(
+ { x : 5, y : [6] },
+ { x : 5, y : 6 }
+ )
+]);
+```
+
+methods
+=======
+
+var deepIs = require('deep-is')
+
+deepIs(a, b)
+---------------
+
+Compare objects `a` and `b`, returning whether they are equal according to a
+recursive equality algorithm.
+
+install
+=======
+
+With [npm](http://npmjs.org) do:
+
+```
+npm install deep-is
+```
+
+test
+====
+
+With [npm](http://npmjs.org) do:
+
+```
+npm test
+```
+
+license
+=======
+
+Copyright (c) 2012, 2013 Thorsten Lorenz <thlorenz@gmx.de>
+Copyright (c) 2012 James Halliday <mail@substack.net>
+
+Derived largely from node's assert module, which has the copyright statement:
+
+Copyright (c) 2009 Thomas Robinson <280north.com>
+
+Released under the MIT license, see LICENSE for details.
diff --git a/tools/node_modules/eslint/node_modules/deep-is/index.js b/tools/node_modules/eslint/node_modules/deep-is/index.js
new file mode 100644
index 0000000000..506fe27953
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/deep-is/index.js
@@ -0,0 +1,102 @@
+var pSlice = Array.prototype.slice;
+var Object_keys = typeof Object.keys === 'function'
+ ? Object.keys
+ : function (obj) {
+ var keys = [];
+ for (var key in obj) keys.push(key);
+ return keys;
+ }
+;
+
+var deepEqual = module.exports = function (actual, expected) {
+ // enforce Object.is +0 !== -0
+ if (actual === 0 && expected === 0) {
+ return areZerosEqual(actual, expected);
+
+ // 7.1. All identical values are equivalent, as determined by ===.
+ } else if (actual === expected) {
+ return true;
+
+ } else if (actual instanceof Date && expected instanceof Date) {
+ return actual.getTime() === expected.getTime();
+
+ } else if (isNumberNaN(actual)) {
+ return isNumberNaN(expected);
+
+ // 7.3. Other pairs that do not both pass typeof value == 'object',
+ // equivalence is determined by ==.
+ } else if (typeof actual != 'object' && typeof expected != 'object') {
+ return actual == expected;
+
+ // 7.4. For all other Object pairs, including Array objects, equivalence is
+ // determined by having the same number of owned properties (as verified
+ // with Object.prototype.hasOwnProperty.call), the same set of keys
+ // (although not necessarily the same order), equivalent values for every
+ // corresponding key, and an identical 'prototype' property. Note: this
+ // accounts for both named and indexed properties on Arrays.
+ } else {
+ return objEquiv(actual, expected);
+ }
+};
+
+function isUndefinedOrNull(value) {
+ return value === null || value === undefined;
+}
+
+function isArguments(object) {
+ return Object.prototype.toString.call(object) == '[object Arguments]';
+}
+
+function isNumberNaN(value) {
+ // NaN === NaN -> false
+ return typeof value == 'number' && value !== value;
+}
+
+function areZerosEqual(zeroA, zeroB) {
+ // (1 / +0|0) -> Infinity, but (1 / -0) -> -Infinity and (Infinity !== -Infinity)
+ return (1 / zeroA) === (1 / zeroB);
+}
+
+function objEquiv(a, b) {
+ if (isUndefinedOrNull(a) || isUndefinedOrNull(b))
+ return false;
+
+ // an identical 'prototype' property.
+ if (a.prototype !== b.prototype) return false;
+ //~~~I've managed to break Object.keys through screwy arguments passing.
+ // Converting to array solves the problem.
+ if (isArguments(a)) {
+ if (!isArguments(b)) {
+ return false;
+ }
+ a = pSlice.call(a);
+ b = pSlice.call(b);
+ return deepEqual(a, b);
+ }
+ try {
+ var ka = Object_keys(a),
+ kb = Object_keys(b),
+ key, i;
+ } catch (e) {//happens when one is a string literal and the other isn't
+ return false;
+ }
+ // having the same number of owned properties (keys incorporates
+ // hasOwnProperty)
+ if (ka.length != kb.length)
+ return false;
+ //the same set of keys (although not necessarily the same order),
+ ka.sort();
+ kb.sort();
+ //~~~cheap key test
+ for (i = ka.length - 1; i >= 0; i--) {
+ if (ka[i] != kb[i])
+ return false;
+ }
+ //equivalent values for every corresponding key, and
+ //~~~possibly expensive deep test
+ for (i = ka.length - 1; i >= 0; i--) {
+ key = ka[i];
+ if (!deepEqual(a[key], b[key])) return false;
+ }
+ return true;
+}
diff --git a/tools/node_modules/eslint/node_modules/deep-is/package.json b/tools/node_modules/eslint/node_modules/deep-is/package.json
new file mode 100644
index 0000000000..4ba1c19b41
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/deep-is/package.json
@@ -0,0 +1,90 @@
+{
+ "_from": "deep-is@~0.1.3",
+ "_id": "deep-is@0.1.3",
+ "_inBundle": false,
+ "_integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=",
+ "_location": "/eslint/deep-is",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "deep-is@~0.1.3",
+ "name": "deep-is",
+ "escapedName": "deep-is",
+ "rawSpec": "~0.1.3",
+ "saveSpec": null,
+ "fetchSpec": "~0.1.3"
+ },
+ "_requiredBy": [
+ "/eslint/optionator"
+ ],
+ "_resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz",
+ "_shasum": "b369d6fb5dbc13eecf524f91b070feedc357cf34",
+ "_spec": "deep-is@~0.1.3",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/optionator",
+ "author": {
+ "name": "Thorsten Lorenz",
+ "email": "thlorenz@gmx.de",
+ "url": "http://thlorenz.com"
+ },
+ "bugs": {
+ "url": "https://github.com/thlorenz/deep-is/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "node's assert.deepEqual algorithm except for NaN being equal to NaN",
+ "devDependencies": {
+ "tape": "~1.0.2"
+ },
+ "directories": {
+ "lib": ".",
+ "example": "example",
+ "test": "test"
+ },
+ "homepage": "https://github.com/thlorenz/deep-is#readme",
+ "keywords": [
+ "equality",
+ "equal",
+ "compare"
+ ],
+ "license": {
+ "type": "MIT",
+ "url": "https://github.com/thlorenz/deep-is/blob/master/LICENSE"
+ },
+ "main": "index.js",
+ "name": "deep-is",
+ "repository": {
+ "type": "git",
+ "url": "git+ssh://git@github.com/thlorenz/deep-is.git"
+ },
+ "scripts": {
+ "test": "tape test/*.js"
+ },
+ "testling": {
+ "files": "test/*.js",
+ "browsers": {
+ "ie": [
+ 6,
+ 7,
+ 8,
+ 9
+ ],
+ "ff": [
+ 3.5,
+ 10,
+ 15
+ ],
+ "chrome": [
+ 10,
+ 22
+ ],
+ "safari": [
+ 5.1
+ ],
+ "opera": [
+ 12
+ ]
+ }
+ },
+ "version": "0.1.3"
+}
diff --git a/tools/node_modules/eslint/node_modules/del/index.js b/tools/node_modules/eslint/node_modules/del/index.js
new file mode 100644
index 0000000000..0ceff96295
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/del/index.js
@@ -0,0 +1,73 @@
+'use strict';
+var path = require('path');
+var globby = require('globby');
+var isPathCwd = require('is-path-cwd');
+var isPathInCwd = require('is-path-in-cwd');
+var objectAssign = require('object-assign');
+var Promise = require('pinkie-promise');
+var pify = require('pify');
+var rimraf = require('rimraf');
+
+var rimrafP = pify(rimraf, Promise);
+
+function safeCheck(file) {
+ if (isPathCwd(file)) {
+ throw new Error('Cannot delete the current working directory. Can be overriden with the `force` option.');
+ }
+
+ if (!isPathInCwd(file)) {
+ throw new Error('Cannot delete files/folders outside the current working directory. Can be overriden with the `force` option.');
+ }
+}
+
+module.exports = function (patterns, opts) {
+ opts = objectAssign({}, opts);
+
+ var force = opts.force;
+ delete opts.force;
+
+ var dryRun = opts.dryRun;
+ delete opts.dryRun;
+
+ return globby(patterns, opts).then(function (files) {
+ return Promise.all(files.map(function (file) {
+ if (!force) {
+ safeCheck(file);
+ }
+
+ file = path.resolve(opts.cwd || '', file);
+
+ if (dryRun) {
+ return Promise.resolve(file);
+ }
+
+ return rimrafP(file).then(function () {
+ return file;
+ });
+ }));
+ });
+};
+
+module.exports.sync = function (patterns, opts) {
+ opts = objectAssign({}, opts);
+
+ var force = opts.force;
+ delete opts.force;
+
+ var dryRun = opts.dryRun;
+ delete opts.dryRun;
+
+ return globby.sync(patterns, opts).map(function (file) {
+ if (!force) {
+ safeCheck(file);
+ }
+
+ file = path.resolve(opts.cwd || '', file);
+
+ if (!dryRun) {
+ rimraf.sync(file);
+ }
+
+ return file;
+ });
+};
diff --git a/tools/node_modules/eslint/node_modules/del/license b/tools/node_modules/eslint/node_modules/del/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/del/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/tools/node_modules/eslint/node_modules/del/package.json b/tools/node_modules/eslint/node_modules/del/package.json
new file mode 100644
index 0000000000..cae1d576a4
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/del/package.json
@@ -0,0 +1,93 @@
+{
+ "_from": "del@^2.0.2",
+ "_id": "del@2.2.2",
+ "_inBundle": false,
+ "_integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=",
+ "_location": "/eslint/del",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "del@^2.0.2",
+ "name": "del",
+ "escapedName": "del",
+ "rawSpec": "^2.0.2",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.2"
+ },
+ "_requiredBy": [
+ "/eslint/flat-cache"
+ ],
+ "_resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz",
+ "_shasum": "c12c981d067846c84bcaf862cff930d907ffd1a8",
+ "_spec": "del@^2.0.2",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/flat-cache",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/del/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "globby": "^5.0.0",
+ "is-path-cwd": "^1.0.0",
+ "is-path-in-cwd": "^1.0.0",
+ "object-assign": "^4.0.1",
+ "pify": "^2.0.0",
+ "pinkie-promise": "^2.0.0",
+ "rimraf": "^2.2.8"
+ },
+ "deprecated": false,
+ "description": "Delete files and folders",
+ "devDependencies": {
+ "ava": "*",
+ "fs-extra": "^0.30.0",
+ "path-exists": "^2.0.0",
+ "tempfile": "^1.1.1",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/del#readme",
+ "keywords": [
+ "delete",
+ "del",
+ "remove",
+ "destroy",
+ "trash",
+ "unlink",
+ "clean",
+ "cleaning",
+ "cleanup",
+ "rm",
+ "rmrf",
+ "rimraf",
+ "rmdir",
+ "glob",
+ "gulpfriendly",
+ "file",
+ "files",
+ "folder",
+ "dir",
+ "directory",
+ "fs",
+ "filesystem"
+ ],
+ "license": "MIT",
+ "name": "del",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/del.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "2.2.2"
+}
diff --git a/tools/node_modules/eslint/node_modules/del/readme.md b/tools/node_modules/eslint/node_modules/del/readme.md
new file mode 100644
index 0000000000..c0c1219235
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/del/readme.md
@@ -0,0 +1,106 @@
+# del [![Build Status](https://travis-ci.org/sindresorhus/del.svg?branch=master)](https://travis-ci.org/sindresorhus/del)
+
+> Delete files and folders using [globs](https://github.com/isaacs/minimatch#usage)
+
+Pretty much [rimraf](https://github.com/isaacs/rimraf) with a Promise API and support for multiple files and globbing. It also protects you against deleting the current working directory and above.
+
+---
+
+<p align="center"><b>🔥 Want to strengthen your core JavaScript skills and master ES6?</b><br>I would personally recommend this awesome <a href="https://ES6.io/friend/AWESOME">ES6 course</a> by Wes Bos.</p>
+
+---
+
+
+## Install
+
+```
+$ npm install --save del
+```
+
+
+## Usage
+
+```js
+const del = require('del');
+
+del(['tmp/*.js', '!tmp/unicorn.js']).then(paths => {
+ console.log('Deleted files and folders:\n', paths.join('\n'));
+});
+```
+
+
+## Beware
+
+The glob pattern `**` matches all children and *the parent*.
+
+So this won't work:
+
+```js
+del.sync(['public/assets/**', '!public/assets/goat.png']);
+```
+
+You have to explicitly ignore the parent directories too:
+
+```js
+del.sync(['public/assets/**', '!public/assets', '!public/assets/goat.png']);
+```
+
+Suggestions on how to improve this welcome!
+
+
+## API
+
+### del(patterns, [options])
+
+Returns a promise for an array of deleted paths.
+
+### del.sync(patterns, [options])
+
+Returns an array of deleted paths.
+
+#### patterns
+
+Type: `string`, `array`
+
+See supported minimatch [patterns](https://github.com/isaacs/minimatch#usage).
+
+- [Pattern examples with expected matches](https://github.com/sindresorhus/multimatch/blob/master/test.js)
+- [Quick globbing pattern overview](https://github.com/sindresorhus/multimatch#globbing-patterns)
+
+#### options
+
+Type: `object`
+
+See the `node-glob` [options](https://github.com/isaacs/node-glob#options).
+
+##### force
+
+Type: `boolean`
+Default: `false`
+
+Allow deleting the current working directory and outside.
+
+##### dryRun
+
+Type: `boolean`
+Default: `false`
+
+See what would be deleted.
+
+```js
+const del = require('del');
+
+del(['tmp/*.js'], {dryRun: true}).then(paths => {
+ console.log('Files and folders that would be deleted:\n', paths.join('\n'));
+});
+```
+
+
+## CLI
+
+See [del-cli](https://github.com/sindresorhus/del-cli) for a CLI for this module and [trash-cli](https://github.com/sindresorhus/trash-cli) for a safe version that is suitable for running by hand.
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/tools/node_modules/eslint/node_modules/doctrine/LICENSE b/tools/node_modules/eslint/node_modules/doctrine/LICENSE
new file mode 100644
index 0000000000..3e8ba72f69
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/doctrine/LICENSE
@@ -0,0 +1,177 @@
+
+ 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.
+
+END OF TERMS AND CONDITIONS
diff --git a/tools/node_modules/eslint/node_modules/doctrine/LICENSE.closure-compiler b/tools/node_modules/eslint/node_modules/doctrine/LICENSE.closure-compiler
new file mode 100644
index 0000000000..d645695673
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/doctrine/LICENSE.closure-compiler
@@ -0,0 +1,202 @@
+
+ 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.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ 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/tools/node_modules/eslint/node_modules/doctrine/LICENSE.esprima b/tools/node_modules/eslint/node_modules/doctrine/LICENSE.esprima
new file mode 100644
index 0000000000..3e580c355a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/doctrine/LICENSE.esprima
@@ -0,0 +1,19 @@
+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.
+
+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 <COPYRIGHT HOLDER> 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/tools/node_modules/eslint/node_modules/doctrine/README.md b/tools/node_modules/eslint/node_modules/doctrine/README.md
new file mode 100644
index 0000000000..dcfe776c46
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/doctrine/README.md
@@ -0,0 +1,164 @@
+[![NPM version][npm-image]][npm-url]
+[![build status][travis-image]][travis-url]
+[![Test coverage][coveralls-image]][coveralls-url]
+[![Downloads][downloads-image]][downloads-url]
+[![Join the chat at https://gitter.im/eslint/doctrine](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/eslint/doctrine?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+
+# Doctrine
+
+Doctrine is a [JSDoc](http://usejsdoc.org) parser that parses documentation comments from JavaScript (you need to pass in the comment, not a whole JavaScript file).
+
+## Installation
+
+You can install Doctrine using [npm](https://npmjs.com):
+
+```
+$ npm install doctrine --save-dev
+```
+
+Doctrine can also be used in web browsers using [Browserify](http://browserify.org).
+
+## Usage
+
+Require doctrine inside of your JavaScript:
+
+```js
+var doctrine = require("doctrine");
+```
+
+### parse()
+
+The primary method is `parse()`, which accepts two arguments: the JSDoc comment to parse and an optional options object. The available options are:
+
+* `unwrap` - set to `true` to delete the leading `/**`, any `*` that begins a line, and the trailing `*/` from the source text. Default: `false`.
+* `tags` - an array of tags to return. When specified, Doctrine returns only tags in this array. For example, if `tags` is `["param"]`, then only `@param` tags will be returned. Default: `null`.
+* `recoverable` - set to `true` to keep parsing even when syntax errors occur. Default: `false`.
+* `sloppy` - set to `true` to allow optional parameters to be specified in brackets (`@param {string} [foo]`). Default: `false`.
+* `lineNumbers` - set to `true` to add `lineNumber` to each node, specifying the line on which the node is found in the source. Default: `false`.
+
+Here's a simple example:
+
+```js
+var ast = doctrine.parse(
+ [
+ "/**",
+ " * This function comment is parsed by doctrine",
+ " * @param {{ok:String}} userName",
+ "*/"
+ ].join('\n'), { unwrap: true });
+```
+
+This example returns the following AST:
+
+ {
+ "description": "This function comment is parsed by doctrine",
+ "tags": [
+ {
+ "title": "param",
+ "description": null,
+ "type": {
+ "type": "RecordType",
+ "fields": [
+ {
+ "type": "FieldType",
+ "key": "ok",
+ "value": {
+ "type": "NameExpression",
+ "name": "String"
+ }
+ }
+ ]
+ },
+ "name": "userName"
+ }
+ ]
+ }
+
+See the [demo page](http://eslint.org/doctrine/demo/) more detail.
+
+## Team
+
+These folks keep the project moving and are resources for help:
+
+* Nicholas C. Zakas ([@nzakas](https://github.com/nzakas)) - project lead
+* Yusuke Suzuki ([@constellation](https://github.com/constellation)) - reviewer
+
+## Contributing
+
+Issues and pull requests will be triaged and responded to as quickly as possible. We operate under the [ESLint Contributor Guidelines](http://eslint.org/docs/developer-guide/contributing), so please be sure to read them before contributing. If you're not sure where to dig in, check out the [issues](https://github.com/eslint/doctrine/issues).
+
+## Frequently Asked Questions
+
+### Can I pass a whole JavaScript file to Doctrine?
+
+No. Doctrine can only parse JSDoc comments, so you'll need to pass just the JSDoc comment to Doctrine in order to work.
+
+
+### License
+
+#### doctrine
+
+Copyright JS Foundation and other contributors, https://js.foundation
+
+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.
+
+#### esprima
+
+some of functions is derived from esprima
+
+Copyright (C) 2012, 2011 [Ariya Hidayat](http://ariya.ofilabs.com/about)
+ (twitter: [@ariyahidayat](http://twitter.com/ariyahidayat)) and other contributors.
+
+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.
+
+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 <COPYRIGHT HOLDER> 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.
+
+
+#### closure-compiler
+
+some of extensions is derived from closure-compiler
+
+Apache License
+Version 2.0, January 2004
+http://www.apache.org/licenses/
+
+
+### Where to ask for help?
+
+Join our [Chatroom](https://gitter.im/eslint/doctrine)
+
+[npm-image]: https://img.shields.io/npm/v/doctrine.svg?style=flat-square
+[npm-url]: https://www.npmjs.com/package/doctrine
+[travis-image]: https://img.shields.io/travis/eslint/doctrine/master.svg?style=flat-square
+[travis-url]: https://travis-ci.org/eslint/doctrine
+[coveralls-image]: https://img.shields.io/coveralls/eslint/doctrine/master.svg?style=flat-square
+[coveralls-url]: https://coveralls.io/r/eslint/doctrine?branch=master
+[downloads-image]: http://img.shields.io/npm/dm/doctrine.svg?style=flat-square
+[downloads-url]: https://www.npmjs.com/package/doctrine
diff --git a/tools/node_modules/eslint/node_modules/doctrine/lib/doctrine.js b/tools/node_modules/eslint/node_modules/doctrine/lib/doctrine.js
new file mode 100644
index 0000000000..bdaa0e0788
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/doctrine/lib/doctrine.js
@@ -0,0 +1,891 @@
+/*
+ * @fileoverview Main Doctrine object
+ * @author Yusuke Suzuki <utatane.tea@gmail.com>
+ * @author Dan Tao <daniel.tao@gmail.com>
+ * @author Andrew Eisenberg <andrew@eisenberg.as>
+ */
+
+(function () {
+ 'use strict';
+
+ var typed,
+ utility,
+ jsdoc,
+ esutils,
+ hasOwnProperty;
+
+ esutils = require('esutils');
+ typed = require('./typed');
+ utility = require('./utility');
+
+ function sliceSource(source, index, last) {
+ return source.slice(index, last);
+ }
+
+ hasOwnProperty = (function () {
+ var func = Object.prototype.hasOwnProperty;
+ return function hasOwnProperty(obj, name) {
+ return func.call(obj, name);
+ };
+ }());
+
+ function shallowCopy(obj) {
+ var ret = {}, key;
+ for (key in obj) {
+ if (obj.hasOwnProperty(key)) {
+ ret[key] = obj[key];
+ }
+ }
+ return ret;
+ }
+
+ function isASCIIAlphanumeric(ch) {
+ return (ch >= 0x61 /* 'a' */ && ch <= 0x7A /* 'z' */) ||
+ (ch >= 0x41 /* 'A' */ && ch <= 0x5A /* 'Z' */) ||
+ (ch >= 0x30 /* '0' */ && ch <= 0x39 /* '9' */);
+ }
+
+ function isParamTitle(title) {
+ return title === 'param' || title === 'argument' || title === 'arg';
+ }
+
+ function isReturnTitle(title) {
+ return title === 'return' || title === 'returns';
+ }
+
+ function isProperty(title) {
+ return title === 'property' || title === 'prop';
+ }
+
+ function isNameParameterRequired(title) {
+ return isParamTitle(title) || isProperty(title) ||
+ title === 'alias' || title === 'this' || title === 'mixes' || title === 'requires';
+ }
+
+ function isAllowedName(title) {
+ return isNameParameterRequired(title) || title === 'const' || title === 'constant';
+ }
+
+ function isAllowedNested(title) {
+ return isProperty(title) || isParamTitle(title);
+ }
+
+ function isAllowedOptional(title) {
+ return isProperty(title) || isParamTitle(title);
+ }
+
+ function isTypeParameterRequired(title) {
+ return isParamTitle(title) || isReturnTitle(title) ||
+ title === 'define' || title === 'enum' ||
+ title === 'implements' || title === 'this' ||
+ title === 'type' || title === 'typedef' || isProperty(title);
+ }
+
+ // Consider deprecation instead using 'isTypeParameterRequired' and 'Rules' declaration to pick when a type is optional/required
+ // This would require changes to 'parseType'
+ function isAllowedType(title) {
+ return isTypeParameterRequired(title) || title === 'throws' || title === 'const' || title === 'constant' ||
+ title === 'namespace' || title === 'member' || title === 'var' || title === 'module' ||
+ title === 'constructor' || title === 'class' || title === 'extends' || title === 'augments' ||
+ title === 'public' || title === 'private' || title === 'protected';
+ }
+
+ function unwrapComment(doc) {
+ // JSDoc comment is following form
+ // /**
+ // * .......
+ // */
+ // remove /**, */ and *
+ var BEFORE_STAR = 0,
+ STAR = 1,
+ AFTER_STAR = 2,
+ index,
+ len,
+ mode,
+ result,
+ ch;
+
+ doc = doc.replace(/^\/\*\*?/, '').replace(/\*\/$/, '');
+ index = 0;
+ len = doc.length;
+ mode = BEFORE_STAR;
+ result = '';
+
+ while (index < len) {
+ ch = doc.charCodeAt(index);
+ switch (mode) {
+ case BEFORE_STAR:
+ if (esutils.code.isLineTerminator(ch)) {
+ result += String.fromCharCode(ch);
+ } else if (ch === 0x2A /* '*' */) {
+ mode = STAR;
+ } else if (!esutils.code.isWhiteSpace(ch)) {
+ result += String.fromCharCode(ch);
+ mode = AFTER_STAR;
+ }
+ break;
+
+ case STAR:
+ if (!esutils.code.isWhiteSpace(ch)) {
+ result += String.fromCharCode(ch);
+ }
+ mode = esutils.code.isLineTerminator(ch) ? BEFORE_STAR : AFTER_STAR;
+ break;
+
+ case AFTER_STAR:
+ result += String.fromCharCode(ch);
+ if (esutils.code.isLineTerminator(ch)) {
+ mode = BEFORE_STAR;
+ }
+ break;
+ }
+ index += 1;
+ }
+
+ return result.replace(/\s+$/, '');
+ }
+
+ // JSDoc Tag Parser
+
+ (function (exports) {
+ var Rules,
+ index,
+ lineNumber,
+ length,
+ source,
+ recoverable,
+ sloppy,
+ strict;
+
+ function advance() {
+ var ch = source.charCodeAt(index);
+ index += 1;
+ if (esutils.code.isLineTerminator(ch) && !(ch === 0x0D /* '\r' */ && source.charCodeAt(index) === 0x0A /* '\n' */)) {
+ lineNumber += 1;
+ }
+ return String.fromCharCode(ch);
+ }
+
+ function scanTitle() {
+ var title = '';
+ // waste '@'
+ advance();
+
+ while (index < length && isASCIIAlphanumeric(source.charCodeAt(index))) {
+ title += advance();
+ }
+
+ return title;
+ }
+
+ function seekContent() {
+ var ch, waiting, last = index;
+
+ waiting = false;
+ while (last < length) {
+ ch = source.charCodeAt(last);
+ if (esutils.code.isLineTerminator(ch) && !(ch === 0x0D /* '\r' */ && source.charCodeAt(last + 1) === 0x0A /* '\n' */)) {
+ waiting = true;
+ } else if (waiting) {
+ if (ch === 0x40 /* '@' */) {
+ break;
+ }
+ if (!esutils.code.isWhiteSpace(ch)) {
+ waiting = false;
+ }
+ }
+ last += 1;
+ }
+ return last;
+ }
+
+ // type expression may have nest brace, such as,
+ // { { ok: string } }
+ //
+ // therefore, scanning type expression with balancing braces.
+ function parseType(title, last) {
+ var ch, brace, type, direct = false;
+
+
+ // search '{'
+ while (index < last) {
+ ch = source.charCodeAt(index);
+ if (esutils.code.isWhiteSpace(ch)) {
+ advance();
+ } else if (ch === 0x7B /* '{' */) {
+ advance();
+ break;
+ } else {
+ // this is direct pattern
+ direct = true;
+ break;
+ }
+ }
+
+
+ if (direct) {
+ return null;
+ }
+
+ // type expression { is found
+ brace = 1;
+ type = '';
+ while (index < last) {
+ ch = source.charCodeAt(index);
+ if (esutils.code.isLineTerminator(ch)) {
+ advance();
+ } else {
+ if (ch === 0x7D /* '}' */) {
+ brace -= 1;
+ if (brace === 0) {
+ advance();
+ break;
+ }
+ } else if (ch === 0x7B /* '{' */) {
+ brace += 1;
+ }
+ type += advance();
+ }
+ }
+
+ if (brace !== 0) {
+ // braces is not balanced
+ return utility.throwError('Braces are not balanced');
+ }
+
+ if (isAllowedOptional(title)) {
+ return typed.parseParamType(type);
+ }
+
+ return typed.parseType(type);
+ }
+
+ function scanIdentifier(last) {
+ var identifier;
+ if (!esutils.code.isIdentifierStartES5(source.charCodeAt(index)) && !source[index].match(/[0-9]/)) {
+ return null;
+ }
+ identifier = advance();
+ while (index < last && esutils.code.isIdentifierPartES5(source.charCodeAt(index))) {
+ identifier += advance();
+ }
+ return identifier;
+ }
+
+ function skipWhiteSpace(last) {
+ while (index < last && (esutils.code.isWhiteSpace(source.charCodeAt(index)) || esutils.code.isLineTerminator(source.charCodeAt(index)))) {
+ advance();
+ }
+ }
+
+ function parseName(last, allowBrackets, allowNestedParams) {
+ var name = '',
+ useBrackets,
+ insideString;
+
+
+ skipWhiteSpace(last);
+
+ if (index >= last) {
+ return null;
+ }
+
+ if (source.charCodeAt(index) === 0x5B /* '[' */) {
+ if (allowBrackets) {
+ useBrackets = true;
+ name = advance();
+ } else {
+ return null;
+ }
+ }
+
+ name += scanIdentifier(last);
+
+ if (allowNestedParams) {
+ if (source.charCodeAt(index) === 0x3A /* ':' */ && (
+ name === 'module' ||
+ name === 'external' ||
+ name === 'event')) {
+ name += advance();
+ name += scanIdentifier(last);
+
+ }
+ if(source.charCodeAt(index) === 0x5B /* '[' */ && source.charCodeAt(index + 1) === 0x5D /* ']' */){
+ name += advance();
+ name += advance();
+ }
+ while (source.charCodeAt(index) === 0x2E /* '.' */ ||
+ source.charCodeAt(index) === 0x2F /* '/' */ ||
+ source.charCodeAt(index) === 0x23 /* '#' */ ||
+ source.charCodeAt(index) === 0x2D /* '-' */ ||
+ source.charCodeAt(index) === 0x7E /* '~' */) {
+ name += advance();
+ name += scanIdentifier(last);
+ }
+ }
+
+ if (useBrackets) {
+ skipWhiteSpace(last);
+ // do we have a default value for this?
+ if (source.charCodeAt(index) === 0x3D /* '=' */) {
+ // consume the '='' symbol
+ name += advance();
+ skipWhiteSpace(last);
+
+ var ch;
+ var bracketDepth = 1;
+
+ // scan in the default value
+ while (index < last) {
+ ch = source.charCodeAt(index);
+
+ if (esutils.code.isWhiteSpace(ch)) {
+ if (!insideString) {
+ skipWhiteSpace(last);
+ ch = source.charCodeAt(index);
+ }
+ }
+
+ if (ch === 0x27 /* ''' */) {
+ if (!insideString) {
+ insideString = '\'';
+ } else {
+ if (insideString === '\'') {
+ insideString = '';
+ }
+ }
+ }
+
+ if (ch === 0x22 /* '"' */) {
+ if (!insideString) {
+ insideString = '"';
+ } else {
+ if (insideString === '"') {
+ insideString = '';
+ }
+ }
+ }
+
+ if (ch === 0x5B /* '[' */) {
+ bracketDepth++;
+ } else if (ch === 0x5D /* ']' */ &&
+ --bracketDepth === 0) {
+ break;
+ }
+
+ name += advance();
+ }
+ }
+
+ skipWhiteSpace(last);
+
+ if (index >= last || source.charCodeAt(index) !== 0x5D /* ']' */) {
+ // we never found a closing ']'
+ return null;
+ }
+
+ // collect the last ']'
+ name += advance();
+ }
+
+ return name;
+ }
+
+ function skipToTag() {
+ while (index < length && source.charCodeAt(index) !== 0x40 /* '@' */) {
+ advance();
+ }
+ if (index >= length) {
+ return false;
+ }
+ utility.assert(source.charCodeAt(index) === 0x40 /* '@' */);
+ return true;
+ }
+
+ function TagParser(options, title) {
+ this._options = options;
+ this._title = title.toLowerCase();
+ this._tag = {
+ title: title,
+ description: null
+ };
+ if (this._options.lineNumbers) {
+ this._tag.lineNumber = lineNumber;
+ }
+ this._last = 0;
+ // space to save special information for title parsers.
+ this._extra = { };
+ }
+
+ // addError(err, ...)
+ TagParser.prototype.addError = function addError(errorText) {
+ var args = Array.prototype.slice.call(arguments, 1),
+ msg = errorText.replace(
+ /%(\d)/g,
+ function (whole, index) {
+ utility.assert(index < args.length, 'Message reference must be in range');
+ return args[index];
+ }
+ );
+
+ if (!this._tag.errors) {
+ this._tag.errors = [];
+ }
+ if (strict) {
+ utility.throwError(msg);
+ }
+ this._tag.errors.push(msg);
+ return recoverable;
+ };
+
+ TagParser.prototype.parseType = function () {
+ // type required titles
+ if (isTypeParameterRequired(this._title)) {
+ try {
+ this._tag.type = parseType(this._title, this._last);
+ if (!this._tag.type) {
+ if (!isParamTitle(this._title) && !isReturnTitle(this._title)) {
+ if (!this.addError('Missing or invalid tag type')) {
+ return false;
+ }
+ }
+ }
+ } catch (error) {
+ this._tag.type = null;
+ if (!this.addError(error.message)) {
+ return false;
+ }
+ }
+ } else if (isAllowedType(this._title)) {
+ // optional types
+ try {
+ this._tag.type = parseType(this._title, this._last);
+ } catch (e) {
+ //For optional types, lets drop the thrown error when we hit the end of the file
+ }
+ }
+ return true;
+ };
+
+ TagParser.prototype._parseNamePath = function (optional) {
+ var name;
+ name = parseName(this._last, sloppy && isAllowedOptional(this._title), true);
+ if (!name) {
+ if (!optional) {
+ if (!this.addError('Missing or invalid tag name')) {
+ return false;
+ }
+ }
+ }
+ this._tag.name = name;
+ return true;
+ };
+
+ TagParser.prototype.parseNamePath = function () {
+ return this._parseNamePath(false);
+ };
+
+ TagParser.prototype.parseNamePathOptional = function () {
+ return this._parseNamePath(true);
+ };
+
+
+ TagParser.prototype.parseName = function () {
+ var assign, name;
+
+ // param, property requires name
+ if (isAllowedName(this._title)) {
+ this._tag.name = parseName(this._last, sloppy && isAllowedOptional(this._title), isAllowedNested(this._title));
+ if (!this._tag.name) {
+ if (!isNameParameterRequired(this._title)) {
+ return true;
+ }
+
+ // it's possible the name has already been parsed but interpreted as a type
+ // it's also possible this is a sloppy declaration, in which case it will be
+ // fixed at the end
+ if (isParamTitle(this._title) && this._tag.type && this._tag.type.name) {
+ this._extra.name = this._tag.type;
+ this._tag.name = this._tag.type.name;
+ this._tag.type = null;
+ } else {
+ if (!this.addError('Missing or invalid tag name')) {
+ return false;
+ }
+ }
+ } else {
+ name = this._tag.name;
+ if (name.charAt(0) === '[' && name.charAt(name.length - 1) === ']') {
+ // extract the default value if there is one
+ // example: @param {string} [somebody=John Doe] description
+ assign = name.substring(1, name.length - 1).split('=');
+ if (assign.length > 1) {
+ this._tag['default'] = assign.slice(1).join('=');
+ }
+ this._tag.name = assign[0];
+
+ // convert to an optional type
+ if (this._tag.type && this._tag.type.type !== 'OptionalType') {
+ this._tag.type = {
+ type: 'OptionalType',
+ expression: this._tag.type
+ };
+ }
+ }
+ }
+ }
+
+
+ return true;
+ };
+
+ TagParser.prototype.parseDescription = function parseDescription() {
+ var description = sliceSource(source, index, this._last).trim();
+ if (description) {
+ if ((/^-\s+/).test(description)) {
+ description = description.substring(2);
+ }
+ this._tag.description = description;
+ }
+ return true;
+ };
+
+ TagParser.prototype.parseCaption = function parseDescription() {
+ var description = sliceSource(source, index, this._last).trim();
+ var captionStartTag = '<caption>';
+ var captionEndTag = '</caption>';
+ var captionStart = description.indexOf(captionStartTag);
+ var captionEnd = description.indexOf(captionEndTag);
+ if (captionStart >= 0 && captionEnd >= 0) {
+ this._tag.caption = description.substring(
+ captionStart + captionStartTag.length, captionEnd).trim();
+ this._tag.description = description.substring(captionEnd + captionEndTag.length).trim();
+ } else {
+ this._tag.description = description;
+ }
+ return true;
+ };
+
+ TagParser.prototype.parseKind = function parseKind() {
+ var kind, kinds;
+ kinds = {
+ 'class': true,
+ 'constant': true,
+ 'event': true,
+ 'external': true,
+ 'file': true,
+ 'function': true,
+ 'member': true,
+ 'mixin': true,
+ 'module': true,
+ 'namespace': true,
+ 'typedef': true
+ };
+ kind = sliceSource(source, index, this._last).trim();
+ this._tag.kind = kind;
+ if (!hasOwnProperty(kinds, kind)) {
+ if (!this.addError('Invalid kind name \'%0\'', kind)) {
+ return false;
+ }
+ }
+ return true;
+ };
+
+ TagParser.prototype.parseAccess = function parseAccess() {
+ var access;
+ access = sliceSource(source, index, this._last).trim();
+ this._tag.access = access;
+ if (access !== 'private' && access !== 'protected' && access !== 'public') {
+ if (!this.addError('Invalid access name \'%0\'', access)) {
+ return false;
+ }
+ }
+ return true;
+ };
+
+ TagParser.prototype.parseThis = function parseThis() {
+ // this name may be a name expression (e.g. {foo.bar}),
+ // an union (e.g. {foo.bar|foo.baz}) or a name path (e.g. foo.bar)
+ var value = sliceSource(source, index, this._last).trim();
+ if (value && value.charAt(0) === '{') {
+ var gotType = this.parseType();
+ if (gotType && this._tag.type.type === 'NameExpression' || this._tag.type.type === 'UnionType') {
+ this._tag.name = this._tag.type.name;
+ return true;
+ } else {
+ return this.addError('Invalid name for this');
+ }
+ } else {
+ return this.parseNamePath();
+ }
+ };
+
+ TagParser.prototype.parseVariation = function parseVariation() {
+ var variation, text;
+ text = sliceSource(source, index, this._last).trim();
+ variation = parseFloat(text, 10);
+ this._tag.variation = variation;
+ if (isNaN(variation)) {
+ if (!this.addError('Invalid variation \'%0\'', text)) {
+ return false;
+ }
+ }
+ return true;
+ };
+
+ TagParser.prototype.ensureEnd = function () {
+ var shouldBeEmpty = sliceSource(source, index, this._last).trim();
+ if (shouldBeEmpty) {
+ if (!this.addError('Unknown content \'%0\'', shouldBeEmpty)) {
+ return false;
+ }
+ }
+ return true;
+ };
+
+ TagParser.prototype.epilogue = function epilogue() {
+ var description;
+
+ description = this._tag.description;
+ // un-fix potentially sloppy declaration
+ if (isAllowedOptional(this._title) && !this._tag.type && description && description.charAt(0) === '[') {
+ this._tag.type = this._extra.name;
+ if (!this._tag.name) {
+ this._tag.name = undefined;
+ }
+
+ if (!sloppy) {
+ if (!this.addError('Missing or invalid tag name')) {
+ return false;
+ }
+ }
+ }
+
+ return true;
+ };
+
+ Rules = {
+ // http://usejsdoc.org/tags-access.html
+ 'access': ['parseAccess'],
+ // http://usejsdoc.org/tags-alias.html
+ 'alias': ['parseNamePath', 'ensureEnd'],
+ // http://usejsdoc.org/tags-augments.html
+ 'augments': ['parseType', 'parseNamePathOptional', 'ensureEnd'],
+ // http://usejsdoc.org/tags-constructor.html
+ 'constructor': ['parseType', 'parseNamePathOptional', 'ensureEnd'],
+ // Synonym: http://usejsdoc.org/tags-constructor.html
+ 'class': ['parseType', 'parseNamePathOptional', 'ensureEnd'],
+ // Synonym: http://usejsdoc.org/tags-extends.html
+ 'extends': ['parseType', 'parseNamePathOptional', 'ensureEnd'],
+ // http://usejsdoc.org/tags-example.html
+ 'example': ['parseCaption'],
+ // http://usejsdoc.org/tags-deprecated.html
+ 'deprecated': ['parseDescription'],
+ // http://usejsdoc.org/tags-global.html
+ 'global': ['ensureEnd'],
+ // http://usejsdoc.org/tags-inner.html
+ 'inner': ['ensureEnd'],
+ // http://usejsdoc.org/tags-instance.html
+ 'instance': ['ensureEnd'],
+ // http://usejsdoc.org/tags-kind.html
+ 'kind': ['parseKind'],
+ // http://usejsdoc.org/tags-mixes.html
+ 'mixes': ['parseNamePath', 'ensureEnd'],
+ // http://usejsdoc.org/tags-mixin.html
+ 'mixin': ['parseNamePathOptional', 'ensureEnd'],
+ // http://usejsdoc.org/tags-member.html
+ 'member': ['parseType', 'parseNamePathOptional', 'ensureEnd'],
+ // http://usejsdoc.org/tags-method.html
+ 'method': ['parseNamePathOptional', 'ensureEnd'],
+ // http://usejsdoc.org/tags-module.html
+ 'module': ['parseType', 'parseNamePathOptional', 'ensureEnd'],
+ // Synonym: http://usejsdoc.org/tags-method.html
+ 'func': ['parseNamePathOptional', 'ensureEnd'],
+ // Synonym: http://usejsdoc.org/tags-method.html
+ 'function': ['parseNamePathOptional', 'ensureEnd'],
+ // Synonym: http://usejsdoc.org/tags-member.html
+ 'var': ['parseType', 'parseNamePathOptional', 'ensureEnd'],
+ // http://usejsdoc.org/tags-name.html
+ 'name': ['parseNamePath', 'ensureEnd'],
+ // http://usejsdoc.org/tags-namespace.html
+ 'namespace': ['parseType', 'parseNamePathOptional', 'ensureEnd'],
+ // http://usejsdoc.org/tags-private.html
+ 'private': ['parseType', 'parseDescription'],
+ // http://usejsdoc.org/tags-protected.html
+ 'protected': ['parseType', 'parseDescription'],
+ // http://usejsdoc.org/tags-public.html
+ 'public': ['parseType', 'parseDescription'],
+ // http://usejsdoc.org/tags-readonly.html
+ 'readonly': ['ensureEnd'],
+ // http://usejsdoc.org/tags-requires.html
+ 'requires': ['parseNamePath', 'ensureEnd'],
+ // http://usejsdoc.org/tags-since.html
+ 'since': ['parseDescription'],
+ // http://usejsdoc.org/tags-static.html
+ 'static': ['ensureEnd'],
+ // http://usejsdoc.org/tags-summary.html
+ 'summary': ['parseDescription'],
+ // http://usejsdoc.org/tags-this.html
+ 'this': ['parseThis', 'ensureEnd'],
+ // http://usejsdoc.org/tags-todo.html
+ 'todo': ['parseDescription'],
+ // http://usejsdoc.org/tags-typedef.html
+ 'typedef': ['parseType', 'parseNamePathOptional'],
+ // http://usejsdoc.org/tags-variation.html
+ 'variation': ['parseVariation'],
+ // http://usejsdoc.org/tags-version.html
+ 'version': ['parseDescription']
+ };
+
+ TagParser.prototype.parse = function parse() {
+ var i, iz, sequences, method;
+
+
+ // empty title
+ if (!this._title) {
+ if (!this.addError('Missing or invalid title')) {
+ return null;
+ }
+ }
+
+ // Seek to content last index.
+ this._last = seekContent(this._title);
+
+ if (hasOwnProperty(Rules, this._title)) {
+ sequences = Rules[this._title];
+ } else {
+ // default sequences
+ sequences = ['parseType', 'parseName', 'parseDescription', 'epilogue'];
+ }
+
+ for (i = 0, iz = sequences.length; i < iz; ++i) {
+ method = sequences[i];
+ if (!this[method]()) {
+ return null;
+ }
+ }
+
+ return this._tag;
+ };
+
+ function parseTag(options) {
+ var title, parser, tag;
+
+ // skip to tag
+ if (!skipToTag()) {
+ return null;
+ }
+
+ // scan title
+ title = scanTitle();
+
+ // construct tag parser
+ parser = new TagParser(options, title);
+ tag = parser.parse();
+
+ // Seek global index to end of this tag.
+ while (index < parser._last) {
+ advance();
+ }
+
+ return tag;
+ }
+
+ //
+ // Parse JSDoc
+ //
+
+ function scanJSDocDescription(preserveWhitespace) {
+ var description = '', ch, atAllowed;
+
+ atAllowed = true;
+ while (index < length) {
+ ch = source.charCodeAt(index);
+
+ if (atAllowed && ch === 0x40 /* '@' */) {
+ break;
+ }
+
+ if (esutils.code.isLineTerminator(ch)) {
+ atAllowed = true;
+ } else if (atAllowed && !esutils.code.isWhiteSpace(ch)) {
+ atAllowed = false;
+ }
+
+ description += advance();
+ }
+
+ return preserveWhitespace ? description : description.trim();
+ }
+
+ function parse(comment, options) {
+ var tags = [], tag, description, interestingTags, i, iz;
+
+ if (options === undefined) {
+ options = {};
+ }
+
+ if (typeof options.unwrap === 'boolean' && options.unwrap) {
+ source = unwrapComment(comment);
+ } else {
+ source = comment;
+ }
+
+ // array of relevant tags
+ if (options.tags) {
+ if (Array.isArray(options.tags)) {
+ interestingTags = { };
+ for (i = 0, iz = options.tags.length; i < iz; i++) {
+ if (typeof options.tags[i] === 'string') {
+ interestingTags[options.tags[i]] = true;
+ } else {
+ utility.throwError('Invalid "tags" parameter: ' + options.tags);
+ }
+ }
+ } else {
+ utility.throwError('Invalid "tags" parameter: ' + options.tags);
+ }
+ }
+
+ length = source.length;
+ index = 0;
+ lineNumber = 0;
+ recoverable = options.recoverable;
+ sloppy = options.sloppy;
+ strict = options.strict;
+
+ description = scanJSDocDescription(options.preserveWhitespace);
+
+ while (true) {
+ tag = parseTag(options);
+ if (!tag) {
+ break;
+ }
+ if (!interestingTags || interestingTags.hasOwnProperty(tag.title)) {
+ tags.push(tag);
+ }
+ }
+
+ return {
+ description: description,
+ tags: tags
+ };
+ }
+ exports.parse = parse;
+ }(jsdoc = {}));
+
+ exports.version = utility.VERSION;
+ exports.parse = jsdoc.parse;
+ exports.parseType = typed.parseType;
+ exports.parseParamType = typed.parseParamType;
+ exports.unwrapComment = unwrapComment;
+ exports.Syntax = shallowCopy(typed.Syntax);
+ exports.Error = utility.DoctrineError;
+ exports.type = {
+ Syntax: exports.Syntax,
+ parseType: typed.parseType,
+ parseParamType: typed.parseParamType,
+ stringify: typed.stringify
+ };
+}());
+/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/node_modules/eslint/node_modules/doctrine/lib/typed.js b/tools/node_modules/eslint/node_modules/doctrine/lib/typed.js
new file mode 100644
index 0000000000..e5b14f7749
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/doctrine/lib/typed.js
@@ -0,0 +1,1283 @@
+/*
+ * @fileoverview Type expression parser.
+ * @author Yusuke Suzuki <utatane.tea@gmail.com>
+ * @author Dan Tao <daniel.tao@gmail.com>
+ * @author Andrew Eisenberg <andrew@eisenberg.as>
+ */
+
+// "typed", the Type Expression Parser for doctrine.
+
+(function () {
+ 'use strict';
+
+ var Syntax,
+ Token,
+ source,
+ length,
+ index,
+ previous,
+ token,
+ value,
+ esutils,
+ utility;
+
+ esutils = require('esutils');
+ utility = require('./utility');
+
+ Syntax = {
+ NullableLiteral: 'NullableLiteral',
+ AllLiteral: 'AllLiteral',
+ NullLiteral: 'NullLiteral',
+ UndefinedLiteral: 'UndefinedLiteral',
+ VoidLiteral: 'VoidLiteral',
+ UnionType: 'UnionType',
+ ArrayType: 'ArrayType',
+ RecordType: 'RecordType',
+ FieldType: 'FieldType',
+ FunctionType: 'FunctionType',
+ ParameterType: 'ParameterType',
+ RestType: 'RestType',
+ NonNullableType: 'NonNullableType',
+ OptionalType: 'OptionalType',
+ NullableType: 'NullableType',
+ NameExpression: 'NameExpression',
+ TypeApplication: 'TypeApplication',
+ StringLiteralType: 'StringLiteralType',
+ NumericLiteralType: 'NumericLiteralType',
+ BooleanLiteralType: 'BooleanLiteralType'
+ };
+
+ Token = {
+ ILLEGAL: 0, // ILLEGAL
+ DOT_LT: 1, // .<
+ REST: 2, // ...
+ LT: 3, // <
+ GT: 4, // >
+ LPAREN: 5, // (
+ RPAREN: 6, // )
+ LBRACE: 7, // {
+ RBRACE: 8, // }
+ LBRACK: 9, // [
+ RBRACK: 10, // ]
+ COMMA: 11, // ,
+ COLON: 12, // :
+ STAR: 13, // *
+ PIPE: 14, // |
+ QUESTION: 15, // ?
+ BANG: 16, // !
+ EQUAL: 17, // =
+ NAME: 18, // name token
+ STRING: 19, // string
+ NUMBER: 20, // number
+ EOF: 21
+ };
+
+ function isTypeName(ch) {
+ return '><(){}[],:*|?!='.indexOf(String.fromCharCode(ch)) === -1 && !esutils.code.isWhiteSpace(ch) && !esutils.code.isLineTerminator(ch);
+ }
+
+ function Context(previous, index, token, value) {
+ this._previous = previous;
+ this._index = index;
+ this._token = token;
+ this._value = value;
+ }
+
+ Context.prototype.restore = function () {
+ previous = this._previous;
+ index = this._index;
+ token = this._token;
+ value = this._value;
+ };
+
+ Context.save = function () {
+ return new Context(previous, index, token, value);
+ };
+
+ function advance() {
+ var ch = source.charAt(index);
+ index += 1;
+ return ch;
+ }
+
+ function scanHexEscape(prefix) {
+ var i, len, ch, code = 0;
+
+ len = (prefix === 'u') ? 4 : 2;
+ for (i = 0; i < len; ++i) {
+ if (index < length && esutils.code.isHexDigit(source.charCodeAt(index))) {
+ ch = advance();
+ code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase());
+ } else {
+ return '';
+ }
+ }
+ return String.fromCharCode(code);
+ }
+
+ function scanString() {
+ var str = '', quote, ch, code, unescaped, restore; //TODO review removal octal = false
+ quote = source.charAt(index);
+ ++index;
+
+ while (index < length) {
+ ch = advance();
+
+ if (ch === quote) {
+ quote = '';
+ break;
+ } else if (ch === '\\') {
+ ch = advance();
+ if (!esutils.code.isLineTerminator(ch.charCodeAt(0))) {
+ switch (ch) {
+ case 'n':
+ str += '\n';
+ break;
+ case 'r':
+ str += '\r';
+ break;
+ case 't':
+ str += '\t';
+ break;
+ case 'u':
+ case 'x':
+ restore = index;
+ unescaped = scanHexEscape(ch);
+ if (unescaped) {
+ str += unescaped;
+ } else {
+ index = restore;
+ str += ch;
+ }
+ break;
+ case 'b':
+ str += '\b';
+ break;
+ case 'f':
+ str += '\f';
+ break;
+ case 'v':
+ str += '\v';
+ break;
+
+ default:
+ if (esutils.code.isOctalDigit(ch.charCodeAt(0))) {
+ code = '01234567'.indexOf(ch);
+
+ // \0 is not octal escape sequence
+ // Deprecating unused code. TODO review removal
+ //if (code !== 0) {
+ // octal = true;
+ //}
+
+ if (index < length && esutils.code.isOctalDigit(source.charCodeAt(index))) {
+ //TODO Review Removal octal = true;
+ code = code * 8 + '01234567'.indexOf(advance());
+
+ // 3 digits are only allowed when string starts
+ // with 0, 1, 2, 3
+ if ('0123'.indexOf(ch) >= 0 &&
+ index < length &&
+ esutils.code.isOctalDigit(source.charCodeAt(index))) {
+ code = code * 8 + '01234567'.indexOf(advance());
+ }
+ }
+ str += String.fromCharCode(code);
+ } else {
+ str += ch;
+ }
+ break;
+ }
+ } else {
+ if (ch === '\r' && source.charCodeAt(index) === 0x0A /* '\n' */) {
+ ++index;
+ }
+ }
+ } else if (esutils.code.isLineTerminator(ch.charCodeAt(0))) {
+ break;
+ } else {
+ str += ch;
+ }
+ }
+
+ if (quote !== '') {
+ utility.throwError('unexpected quote');
+ }
+
+ value = str;
+ return Token.STRING;
+ }
+
+ function scanNumber() {
+ var number, ch;
+
+ number = '';
+ ch = source.charCodeAt(index);
+
+ if (ch !== 0x2E /* '.' */) {
+ number = advance();
+ ch = source.charCodeAt(index);
+
+ if (number === '0') {
+ if (ch === 0x78 /* 'x' */ || ch === 0x58 /* 'X' */) {
+ number += advance();
+ while (index < length) {
+ ch = source.charCodeAt(index);
+ if (!esutils.code.isHexDigit(ch)) {
+ break;
+ }
+ number += advance();
+ }
+
+ if (number.length <= 2) {
+ // only 0x
+ utility.throwError('unexpected token');
+ }
+
+ if (index < length) {
+ ch = source.charCodeAt(index);
+ if (esutils.code.isIdentifierStartES5(ch)) {
+ utility.throwError('unexpected token');
+ }
+ }
+ value = parseInt(number, 16);
+ return Token.NUMBER;
+ }
+
+ if (esutils.code.isOctalDigit(ch)) {
+ number += advance();
+ while (index < length) {
+ ch = source.charCodeAt(index);
+ if (!esutils.code.isOctalDigit(ch)) {
+ break;
+ }
+ number += advance();
+ }
+
+ if (index < length) {
+ ch = source.charCodeAt(index);
+ if (esutils.code.isIdentifierStartES5(ch) || esutils.code.isDecimalDigit(ch)) {
+ utility.throwError('unexpected token');
+ }
+ }
+ value = parseInt(number, 8);
+ return Token.NUMBER;
+ }
+
+ if (esutils.code.isDecimalDigit(ch)) {
+ utility.throwError('unexpected token');
+ }
+ }
+
+ while (index < length) {
+ ch = source.charCodeAt(index);
+ if (!esutils.code.isDecimalDigit(ch)) {
+ break;
+ }
+ number += advance();
+ }
+ }
+
+ if (ch === 0x2E /* '.' */) {
+ number += advance();
+ while (index < length) {
+ ch = source.charCodeAt(index);
+ if (!esutils.code.isDecimalDigit(ch)) {
+ break;
+ }
+ number += advance();
+ }
+ }
+
+ if (ch === 0x65 /* 'e' */ || ch === 0x45 /* 'E' */) {
+ number += advance();
+
+ ch = source.charCodeAt(index);
+ if (ch === 0x2B /* '+' */ || ch === 0x2D /* '-' */) {
+ number += advance();
+ }
+
+ ch = source.charCodeAt(index);
+ if (esutils.code.isDecimalDigit(ch)) {
+ number += advance();
+ while (index < length) {
+ ch = source.charCodeAt(index);
+ if (!esutils.code.isDecimalDigit(ch)) {
+ break;
+ }
+ number += advance();
+ }
+ } else {
+ utility.throwError('unexpected token');
+ }
+ }
+
+ if (index < length) {
+ ch = source.charCodeAt(index);
+ if (esutils.code.isIdentifierStartES5(ch)) {
+ utility.throwError('unexpected token');
+ }
+ }
+
+ value = parseFloat(number);
+ return Token.NUMBER;
+ }
+
+
+ function scanTypeName() {
+ var ch, ch2;
+
+ value = advance();
+ while (index < length && isTypeName(source.charCodeAt(index))) {
+ ch = source.charCodeAt(index);
+ if (ch === 0x2E /* '.' */) {
+ if ((index + 1) >= length) {
+ return Token.ILLEGAL;
+ }
+ ch2 = source.charCodeAt(index + 1);
+ if (ch2 === 0x3C /* '<' */) {
+ break;
+ }
+ }
+ value += advance();
+ }
+ return Token.NAME;
+ }
+
+ function next() {
+ var ch;
+
+ previous = index;
+
+ while (index < length && esutils.code.isWhiteSpace(source.charCodeAt(index))) {
+ advance();
+ }
+ if (index >= length) {
+ token = Token.EOF;
+ return token;
+ }
+
+ ch = source.charCodeAt(index);
+ switch (ch) {
+ case 0x27: /* ''' */
+ case 0x22: /* '"' */
+ token = scanString();
+ return token;
+
+ case 0x3A: /* ':' */
+ advance();
+ token = Token.COLON;
+ return token;
+
+ case 0x2C: /* ',' */
+ advance();
+ token = Token.COMMA;
+ return token;
+
+ case 0x28: /* '(' */
+ advance();
+ token = Token.LPAREN;
+ return token;
+
+ case 0x29: /* ')' */
+ advance();
+ token = Token.RPAREN;
+ return token;
+
+ case 0x5B: /* '[' */
+ advance();
+ token = Token.LBRACK;
+ return token;
+
+ case 0x5D: /* ']' */
+ advance();
+ token = Token.RBRACK;
+ return token;
+
+ case 0x7B: /* '{' */
+ advance();
+ token = Token.LBRACE;
+ return token;
+
+ case 0x7D: /* '}' */
+ advance();
+ token = Token.RBRACE;
+ return token;
+
+ case 0x2E: /* '.' */
+ if (index + 1 < length) {
+ ch = source.charCodeAt(index + 1);
+ if (ch === 0x3C /* '<' */) {
+ advance(); // '.'
+ advance(); // '<'
+ token = Token.DOT_LT;
+ return token;
+ }
+
+ if (ch === 0x2E /* '.' */ && index + 2 < length && source.charCodeAt(index + 2) === 0x2E /* '.' */) {
+ advance(); // '.'
+ advance(); // '.'
+ advance(); // '.'
+ token = Token.REST;
+ return token;
+ }
+
+ if (esutils.code.isDecimalDigit(ch)) {
+ token = scanNumber();
+ return token;
+ }
+ }
+ token = Token.ILLEGAL;
+ return token;
+
+ case 0x3C: /* '<' */
+ advance();
+ token = Token.LT;
+ return token;
+
+ case 0x3E: /* '>' */
+ advance();
+ token = Token.GT;
+ return token;
+
+ case 0x2A: /* '*' */
+ advance();
+ token = Token.STAR;
+ return token;
+
+ case 0x7C: /* '|' */
+ advance();
+ token = Token.PIPE;
+ return token;
+
+ case 0x3F: /* '?' */
+ advance();
+ token = Token.QUESTION;
+ return token;
+
+ case 0x21: /* '!' */
+ advance();
+ token = Token.BANG;
+ return token;
+
+ case 0x3D: /* '=' */
+ advance();
+ token = Token.EQUAL;
+ return token;
+
+ case 0x2D: /* '-' */
+ token = scanNumber();
+ return token;
+
+ default:
+ if (esutils.code.isDecimalDigit(ch)) {
+ token = scanNumber();
+ return token;
+ }
+
+ // type string permits following case,
+ //
+ // namespace.module.MyClass
+ //
+ // this reduced 1 token TK_NAME
+ utility.assert(isTypeName(ch));
+ token = scanTypeName();
+ return token;
+ }
+ }
+
+ function consume(target, text) {
+ utility.assert(token === target, text || 'consumed token not matched');
+ next();
+ }
+
+ function expect(target, message) {
+ if (token !== target) {
+ utility.throwError(message || 'unexpected token');
+ }
+ next();
+ }
+
+ // UnionType := '(' TypeUnionList ')'
+ //
+ // TypeUnionList :=
+ // <<empty>>
+ // | NonemptyTypeUnionList
+ //
+ // NonemptyTypeUnionList :=
+ // TypeExpression
+ // | TypeExpression '|' NonemptyTypeUnionList
+ function parseUnionType() {
+ var elements;
+ consume(Token.LPAREN, 'UnionType should start with (');
+ elements = [];
+ if (token !== Token.RPAREN) {
+ while (true) {
+ elements.push(parseTypeExpression());
+ if (token === Token.RPAREN) {
+ break;
+ }
+ expect(Token.PIPE);
+ }
+ }
+ consume(Token.RPAREN, 'UnionType should end with )');
+ return {
+ type: Syntax.UnionType,
+ elements: elements
+ };
+ }
+
+ // ArrayType := '[' ElementTypeList ']'
+ //
+ // ElementTypeList :=
+ // <<empty>>
+ // | TypeExpression
+ // | '...' TypeExpression
+ // | TypeExpression ',' ElementTypeList
+ function parseArrayType() {
+ var elements;
+ consume(Token.LBRACK, 'ArrayType should start with [');
+ elements = [];
+ while (token !== Token.RBRACK) {
+ if (token === Token.REST) {
+ consume(Token.REST);
+ elements.push({
+ type: Syntax.RestType,
+ expression: parseTypeExpression()
+ });
+ break;
+ } else {
+ elements.push(parseTypeExpression());
+ }
+ if (token !== Token.RBRACK) {
+ expect(Token.COMMA);
+ }
+ }
+ expect(Token.RBRACK);
+ return {
+ type: Syntax.ArrayType,
+ elements: elements
+ };
+ }
+
+ function parseFieldName() {
+ var v = value;
+ if (token === Token.NAME || token === Token.STRING) {
+ next();
+ return v;
+ }
+
+ if (token === Token.NUMBER) {
+ consume(Token.NUMBER);
+ return String(v);
+ }
+
+ utility.throwError('unexpected token');
+ }
+
+ // FieldType :=
+ // FieldName
+ // | FieldName ':' TypeExpression
+ //
+ // FieldName :=
+ // NameExpression
+ // | StringLiteral
+ // | NumberLiteral
+ // | ReservedIdentifier
+ function parseFieldType() {
+ var key;
+
+ key = parseFieldName();
+ if (token === Token.COLON) {
+ consume(Token.COLON);
+ return {
+ type: Syntax.FieldType,
+ key: key,
+ value: parseTypeExpression()
+ };
+ }
+ return {
+ type: Syntax.FieldType,
+ key: key,
+ value: null
+ };
+ }
+
+ // RecordType := '{' FieldTypeList '}'
+ //
+ // FieldTypeList :=
+ // <<empty>>
+ // | FieldType
+ // | FieldType ',' FieldTypeList
+ function parseRecordType() {
+ var fields;
+
+ consume(Token.LBRACE, 'RecordType should start with {');
+ fields = [];
+ if (token === Token.COMMA) {
+ consume(Token.COMMA);
+ } else {
+ while (token !== Token.RBRACE) {
+ fields.push(parseFieldType());
+ if (token !== Token.RBRACE) {
+ expect(Token.COMMA);
+ }
+ }
+ }
+ expect(Token.RBRACE);
+ return {
+ type: Syntax.RecordType,
+ fields: fields
+ };
+ }
+
+ // NameExpression :=
+ // Identifier
+ // | TagIdentifier ':' Identifier
+ //
+ // Tag identifier is one of "module", "external" or "event"
+ // Identifier is the same as Token.NAME, including any dots, something like
+ // namespace.module.MyClass
+ function parseNameExpression() {
+ var name = value;
+ expect(Token.NAME);
+
+ if (token === Token.COLON && (
+ name === 'module' ||
+ name === 'external' ||
+ name === 'event')) {
+ consume(Token.COLON);
+ name += ':' + value;
+ expect(Token.NAME);
+ }
+
+ return {
+ type: Syntax.NameExpression,
+ name: name
+ };
+ }
+
+ // TypeExpressionList :=
+ // TopLevelTypeExpression
+ // | TopLevelTypeExpression ',' TypeExpressionList
+ function parseTypeExpressionList() {
+ var elements = [];
+
+ elements.push(parseTop());
+ while (token === Token.COMMA) {
+ consume(Token.COMMA);
+ elements.push(parseTop());
+ }
+ return elements;
+ }
+
+ // TypeName :=
+ // NameExpression
+ // | NameExpression TypeApplication
+ //
+ // TypeApplication :=
+ // '.<' TypeExpressionList '>'
+ // | '<' TypeExpressionList '>' // this is extension of doctrine
+ function parseTypeName() {
+ var expr, applications;
+
+ expr = parseNameExpression();
+ if (token === Token.DOT_LT || token === Token.LT) {
+ next();
+ applications = parseTypeExpressionList();
+ expect(Token.GT);
+ return {
+ type: Syntax.TypeApplication,
+ expression: expr,
+ applications: applications
+ };
+ }
+ return expr;
+ }
+
+ // ResultType :=
+ // <<empty>>
+ // | ':' void
+ // | ':' TypeExpression
+ //
+ // BNF is above
+ // but, we remove <<empty>> pattern, so token is always TypeToken::COLON
+ function parseResultType() {
+ consume(Token.COLON, 'ResultType should start with :');
+ if (token === Token.NAME && value === 'void') {
+ consume(Token.NAME);
+ return {
+ type: Syntax.VoidLiteral
+ };
+ }
+ return parseTypeExpression();
+ }
+
+ // ParametersType :=
+ // RestParameterType
+ // | NonRestParametersType
+ // | NonRestParametersType ',' RestParameterType
+ //
+ // RestParameterType :=
+ // '...'
+ // '...' Identifier
+ //
+ // NonRestParametersType :=
+ // ParameterType ',' NonRestParametersType
+ // | ParameterType
+ // | OptionalParametersType
+ //
+ // OptionalParametersType :=
+ // OptionalParameterType
+ // | OptionalParameterType, OptionalParametersType
+ //
+ // OptionalParameterType := ParameterType=
+ //
+ // ParameterType := TypeExpression | Identifier ':' TypeExpression
+ //
+ // Identifier is "new" or "this"
+ function parseParametersType() {
+ var params = [], optionalSequence = false, expr, rest = false;
+
+ while (token !== Token.RPAREN) {
+ if (token === Token.REST) {
+ // RestParameterType
+ consume(Token.REST);
+ rest = true;
+ }
+
+ expr = parseTypeExpression();
+ if (expr.type === Syntax.NameExpression && token === Token.COLON) {
+ // Identifier ':' TypeExpression
+ consume(Token.COLON);
+ expr = {
+ type: Syntax.ParameterType,
+ name: expr.name,
+ expression: parseTypeExpression()
+ };
+ }
+ if (token === Token.EQUAL) {
+ consume(Token.EQUAL);
+ expr = {
+ type: Syntax.OptionalType,
+ expression: expr
+ };
+ optionalSequence = true;
+ } else {
+ if (optionalSequence) {
+ utility.throwError('unexpected token');
+ }
+ }
+ if (rest) {
+ expr = {
+ type: Syntax.RestType,
+ expression: expr
+ };
+ }
+ params.push(expr);
+ if (token !== Token.RPAREN) {
+ expect(Token.COMMA);
+ }
+ }
+ return params;
+ }
+
+ // FunctionType := 'function' FunctionSignatureType
+ //
+ // FunctionSignatureType :=
+ // | TypeParameters '(' ')' ResultType
+ // | TypeParameters '(' ParametersType ')' ResultType
+ // | TypeParameters '(' 'this' ':' TypeName ')' ResultType
+ // | TypeParameters '(' 'this' ':' TypeName ',' ParametersType ')' ResultType
+ function parseFunctionType() {
+ var isNew, thisBinding, params, result, fnType;
+ utility.assert(token === Token.NAME && value === 'function', 'FunctionType should start with \'function\'');
+ consume(Token.NAME);
+
+ // Google Closure Compiler is not implementing TypeParameters.
+ // So we do not. if we don't get '(', we see it as error.
+ expect(Token.LPAREN);
+
+ isNew = false;
+ params = [];
+ thisBinding = null;
+ if (token !== Token.RPAREN) {
+ // ParametersType or 'this'
+ if (token === Token.NAME &&
+ (value === 'this' || value === 'new')) {
+ // 'this' or 'new'
+ // 'new' is Closure Compiler extension
+ isNew = value === 'new';
+ consume(Token.NAME);
+ expect(Token.COLON);
+ thisBinding = parseTypeName();
+ if (token === Token.COMMA) {
+ consume(Token.COMMA);
+ params = parseParametersType();
+ }
+ } else {
+ params = parseParametersType();
+ }
+ }
+
+ expect(Token.RPAREN);
+
+ result = null;
+ if (token === Token.COLON) {
+ result = parseResultType();
+ }
+
+ fnType = {
+ type: Syntax.FunctionType,
+ params: params,
+ result: result
+ };
+ if (thisBinding) {
+ // avoid adding null 'new' and 'this' properties
+ fnType['this'] = thisBinding;
+ if (isNew) {
+ fnType['new'] = true;
+ }
+ }
+ return fnType;
+ }
+
+ // BasicTypeExpression :=
+ // '*'
+ // | 'null'
+ // | 'undefined'
+ // | TypeName
+ // | FunctionType
+ // | UnionType
+ // | RecordType
+ // | ArrayType
+ function parseBasicTypeExpression() {
+ var context;
+ switch (token) {
+ case Token.STAR:
+ consume(Token.STAR);
+ return {
+ type: Syntax.AllLiteral
+ };
+
+ case Token.LPAREN:
+ return parseUnionType();
+
+ case Token.LBRACK:
+ return parseArrayType();
+
+ case Token.LBRACE:
+ return parseRecordType();
+
+ case Token.NAME:
+ if (value === 'null') {
+ consume(Token.NAME);
+ return {
+ type: Syntax.NullLiteral
+ };
+ }
+
+ if (value === 'undefined') {
+ consume(Token.NAME);
+ return {
+ type: Syntax.UndefinedLiteral
+ };
+ }
+
+ if (value === 'true' || value === 'false') {
+ consume(Token.NAME);
+ return {
+ type: Syntax.BooleanLiteralType,
+ value: value === 'true'
+ };
+ }
+
+ context = Context.save();
+ if (value === 'function') {
+ try {
+ return parseFunctionType();
+ } catch (e) {
+ context.restore();
+ }
+ }
+
+ return parseTypeName();
+
+ case Token.STRING:
+ next();
+ return {
+ type: Syntax.StringLiteralType,
+ value: value
+ };
+
+ case Token.NUMBER:
+ next();
+ return {
+ type: Syntax.NumericLiteralType,
+ value: value
+ };
+
+ default:
+ utility.throwError('unexpected token');
+ }
+ }
+
+ // TypeExpression :=
+ // BasicTypeExpression
+ // | '?' BasicTypeExpression
+ // | '!' BasicTypeExpression
+ // | BasicTypeExpression '?'
+ // | BasicTypeExpression '!'
+ // | '?'
+ // | BasicTypeExpression '[]'
+ function parseTypeExpression() {
+ var expr;
+
+ if (token === Token.QUESTION) {
+ consume(Token.QUESTION);
+ if (token === Token.COMMA || token === Token.EQUAL || token === Token.RBRACE ||
+ token === Token.RPAREN || token === Token.PIPE || token === Token.EOF ||
+ token === Token.RBRACK || token === Token.GT) {
+ return {
+ type: Syntax.NullableLiteral
+ };
+ }
+ return {
+ type: Syntax.NullableType,
+ expression: parseBasicTypeExpression(),
+ prefix: true
+ };
+ }
+
+ if (token === Token.BANG) {
+ consume(Token.BANG);
+ return {
+ type: Syntax.NonNullableType,
+ expression: parseBasicTypeExpression(),
+ prefix: true
+ };
+ }
+
+ expr = parseBasicTypeExpression();
+ if (token === Token.BANG) {
+ consume(Token.BANG);
+ return {
+ type: Syntax.NonNullableType,
+ expression: expr,
+ prefix: false
+ };
+ }
+
+ if (token === Token.QUESTION) {
+ consume(Token.QUESTION);
+ return {
+ type: Syntax.NullableType,
+ expression: expr,
+ prefix: false
+ };
+ }
+
+ if (token === Token.LBRACK) {
+ consume(Token.LBRACK);
+ expect(Token.RBRACK, 'expected an array-style type declaration (' + value + '[])');
+ return {
+ type: Syntax.TypeApplication,
+ expression: {
+ type: Syntax.NameExpression,
+ name: 'Array'
+ },
+ applications: [expr]
+ };
+ }
+
+ return expr;
+ }
+
+ // TopLevelTypeExpression :=
+ // TypeExpression
+ // | TypeUnionList
+ //
+ // This rule is Google Closure Compiler extension, not ES4
+ // like,
+ // { number | string }
+ // If strict to ES4, we should write it as
+ // { (number|string) }
+ function parseTop() {
+ var expr, elements;
+
+ expr = parseTypeExpression();
+ if (token !== Token.PIPE) {
+ return expr;
+ }
+
+ elements = [expr];
+ consume(Token.PIPE);
+ while (true) {
+ elements.push(parseTypeExpression());
+ if (token !== Token.PIPE) {
+ break;
+ }
+ consume(Token.PIPE);
+ }
+
+ return {
+ type: Syntax.UnionType,
+ elements: elements
+ };
+ }
+
+ function parseTopParamType() {
+ var expr;
+
+ if (token === Token.REST) {
+ consume(Token.REST);
+ return {
+ type: Syntax.RestType,
+ expression: parseTop()
+ };
+ }
+
+ expr = parseTop();
+ if (token === Token.EQUAL) {
+ consume(Token.EQUAL);
+ return {
+ type: Syntax.OptionalType,
+ expression: expr
+ };
+ }
+
+ return expr;
+ }
+
+ function parseType(src, opt) {
+ var expr;
+
+ source = src;
+ length = source.length;
+ index = 0;
+ previous = 0;
+
+ next();
+ expr = parseTop();
+
+ if (opt && opt.midstream) {
+ return {
+ expression: expr,
+ index: previous
+ };
+ }
+
+ if (token !== Token.EOF) {
+ utility.throwError('not reach to EOF');
+ }
+
+ return expr;
+ }
+
+ function parseParamType(src, opt) {
+ var expr;
+
+ source = src;
+ length = source.length;
+ index = 0;
+ previous = 0;
+
+ next();
+ expr = parseTopParamType();
+
+ if (opt && opt.midstream) {
+ return {
+ expression: expr,
+ index: previous
+ };
+ }
+
+ if (token !== Token.EOF) {
+ utility.throwError('not reach to EOF');
+ }
+
+ return expr;
+ }
+
+ function stringifyImpl(node, compact, topLevel) {
+ var result, i, iz;
+
+ switch (node.type) {
+ case Syntax.NullableLiteral:
+ result = '?';
+ break;
+
+ case Syntax.AllLiteral:
+ result = '*';
+ break;
+
+ case Syntax.NullLiteral:
+ result = 'null';
+ break;
+
+ case Syntax.UndefinedLiteral:
+ result = 'undefined';
+ break;
+
+ case Syntax.VoidLiteral:
+ result = 'void';
+ break;
+
+ case Syntax.UnionType:
+ if (!topLevel) {
+ result = '(';
+ } else {
+ result = '';
+ }
+
+ for (i = 0, iz = node.elements.length; i < iz; ++i) {
+ result += stringifyImpl(node.elements[i], compact);
+ if ((i + 1) !== iz) {
+ result += compact ? '|' : ' | ';
+ }
+ }
+
+ if (!topLevel) {
+ result += ')';
+ }
+ break;
+
+ case Syntax.ArrayType:
+ result = '[';
+ for (i = 0, iz = node.elements.length; i < iz; ++i) {
+ result += stringifyImpl(node.elements[i], compact);
+ if ((i + 1) !== iz) {
+ result += compact ? ',' : ', ';
+ }
+ }
+ result += ']';
+ break;
+
+ case Syntax.RecordType:
+ result = '{';
+ for (i = 0, iz = node.fields.length; i < iz; ++i) {
+ result += stringifyImpl(node.fields[i], compact);
+ if ((i + 1) !== iz) {
+ result += compact ? ',' : ', ';
+ }
+ }
+ result += '}';
+ break;
+
+ case Syntax.FieldType:
+ if (node.value) {
+ result = node.key + (compact ? ':' : ': ') + stringifyImpl(node.value, compact);
+ } else {
+ result = node.key;
+ }
+ break;
+
+ case Syntax.FunctionType:
+ result = compact ? 'function(' : 'function (';
+
+ if (node['this']) {
+ if (node['new']) {
+ result += (compact ? 'new:' : 'new: ');
+ } else {
+ result += (compact ? 'this:' : 'this: ');
+ }
+
+ result += stringifyImpl(node['this'], compact);
+
+ if (node.params.length !== 0) {
+ result += compact ? ',' : ', ';
+ }
+ }
+
+ for (i = 0, iz = node.params.length; i < iz; ++i) {
+ result += stringifyImpl(node.params[i], compact);
+ if ((i + 1) !== iz) {
+ result += compact ? ',' : ', ';
+ }
+ }
+
+ result += ')';
+
+ if (node.result) {
+ result += (compact ? ':' : ': ') + stringifyImpl(node.result, compact);
+ }
+ break;
+
+ case Syntax.ParameterType:
+ result = node.name + (compact ? ':' : ': ') + stringifyImpl(node.expression, compact);
+ break;
+
+ case Syntax.RestType:
+ result = '...';
+ if (node.expression) {
+ result += stringifyImpl(node.expression, compact);
+ }
+ break;
+
+ case Syntax.NonNullableType:
+ if (node.prefix) {
+ result = '!' + stringifyImpl(node.expression, compact);
+ } else {
+ result = stringifyImpl(node.expression, compact) + '!';
+ }
+ break;
+
+ case Syntax.OptionalType:
+ result = stringifyImpl(node.expression, compact) + '=';
+ break;
+
+ case Syntax.NullableType:
+ if (node.prefix) {
+ result = '?' + stringifyImpl(node.expression, compact);
+ } else {
+ result = stringifyImpl(node.expression, compact) + '?';
+ }
+ break;
+
+ case Syntax.NameExpression:
+ result = node.name;
+ break;
+
+ case Syntax.TypeApplication:
+ result = stringifyImpl(node.expression, compact) + '.<';
+ for (i = 0, iz = node.applications.length; i < iz; ++i) {
+ result += stringifyImpl(node.applications[i], compact);
+ if ((i + 1) !== iz) {
+ result += compact ? ',' : ', ';
+ }
+ }
+ result += '>';
+ break;
+
+ case Syntax.StringLiteralType:
+ result = '"' + node.value + '"';
+ break;
+
+ case Syntax.NumericLiteralType:
+ result = String(node.value);
+ break;
+
+ case Syntax.BooleanLiteralType:
+ result = String(node.value);
+ break;
+
+ default:
+ utility.throwError('Unknown type ' + node.type);
+ }
+
+ return result;
+ }
+
+ function stringify(node, options) {
+ if (options == null) {
+ options = {};
+ }
+ return stringifyImpl(node, options.compact, options.topLevel);
+ }
+
+ exports.parseType = parseType;
+ exports.parseParamType = parseParamType;
+ exports.stringify = stringify;
+ exports.Syntax = Syntax;
+}());
+/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/node_modules/eslint/node_modules/doctrine/lib/utility.js b/tools/node_modules/eslint/node_modules/doctrine/lib/utility.js
new file mode 100644
index 0000000000..381580ebe2
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/doctrine/lib/utility.js
@@ -0,0 +1,35 @@
+/*
+ * @fileoverview Utilities for Doctrine
+ * @author Yusuke Suzuki <utatane.tea@gmail.com>
+ */
+
+
+(function () {
+ 'use strict';
+
+ var VERSION;
+
+ VERSION = require('../package.json').version;
+ exports.VERSION = VERSION;
+
+ function DoctrineError(message) {
+ this.name = 'DoctrineError';
+ this.message = message;
+ }
+ DoctrineError.prototype = (function () {
+ var Middle = function () { };
+ Middle.prototype = Error.prototype;
+ return new Middle();
+ }());
+ DoctrineError.prototype.constructor = DoctrineError;
+ exports.DoctrineError = DoctrineError;
+
+ function throwError(message) {
+ throw new DoctrineError(message);
+ }
+ exports.throwError = throwError;
+
+ exports.assert = require('assert');
+}());
+
+/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/node_modules/eslint/node_modules/doctrine/package.json b/tools/node_modules/eslint/node_modules/doctrine/package.json
new file mode 100644
index 0000000000..2f33a51a23
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/doctrine/package.json
@@ -0,0 +1,88 @@
+{
+ "_from": "doctrine@^2.0.2",
+ "_id": "doctrine@2.0.2",
+ "_inBundle": false,
+ "_integrity": "sha512-y0tm5Pq6ywp3qSTZ1vPgVdAnbDEoeoc5wlOHXoY1c4Wug/a7JvqHIl7BTvwodaHmejWkK/9dSb3sCYfyo/om8A==",
+ "_location": "/eslint/doctrine",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "doctrine@^2.0.2",
+ "name": "doctrine",
+ "escapedName": "doctrine",
+ "rawSpec": "^2.0.2",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.2"
+ },
+ "_requiredBy": [
+ "/eslint"
+ ],
+ "_resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.0.2.tgz",
+ "_shasum": "68f96ce8efc56cc42651f1faadb4f175273b0075",
+ "_spec": "doctrine@^2.0.2",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint",
+ "bugs": {
+ "url": "https://github.com/eslint/doctrine/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "esutils": "^2.0.2"
+ },
+ "deprecated": false,
+ "description": "JSDoc parser",
+ "devDependencies": {
+ "coveralls": "^2.11.2",
+ "dateformat": "^1.0.11",
+ "eslint": "^1.10.3",
+ "eslint-release": "^0.10.0",
+ "linefix": "^0.1.1",
+ "mocha": "^3.4.2",
+ "npm-license": "^0.3.1",
+ "nyc": "^10.3.2",
+ "semver": "^5.0.3",
+ "shelljs": "^0.5.3",
+ "shelljs-nodecli": "^0.1.1",
+ "should": "^5.0.1"
+ },
+ "directories": {
+ "lib": "./lib"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "lib"
+ ],
+ "homepage": "https://github.com/eslint/doctrine",
+ "license": "Apache-2.0",
+ "main": "lib/doctrine.js",
+ "maintainers": [
+ {
+ "name": "Nicholas C. Zakas",
+ "email": "nicholas+npm@nczconsulting.com",
+ "url": "https://www.nczonline.net"
+ },
+ {
+ "name": "Yusuke Suzuki",
+ "email": "utatane.tea@gmail.com",
+ "url": "https://github.com/Constellation"
+ }
+ ],
+ "name": "doctrine",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/eslint/doctrine.git"
+ },
+ "scripts": {
+ "alpharelease": "eslint-prerelease alpha",
+ "betarelease": "eslint-prerelease beta",
+ "ci-release": "eslint-ci-release",
+ "coveralls": "nyc report --reporter=text-lcov | coveralls",
+ "lint": "eslint lib/",
+ "pretest": "npm run lint",
+ "release": "eslint-release",
+ "test": "nyc mocha"
+ },
+ "version": "2.0.2"
+}
diff --git a/tools/node_modules/eslint/node_modules/escape-string-regexp/index.js b/tools/node_modules/eslint/node_modules/escape-string-regexp/index.js
new file mode 100644
index 0000000000..7834bf9b24
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/escape-string-regexp/index.js
@@ -0,0 +1,11 @@
+'use strict';
+
+var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
+
+module.exports = function (str) {
+ if (typeof str !== 'string') {
+ throw new TypeError('Expected a string');
+ }
+
+ return str.replace(matchOperatorsRe, '\\$&');
+};
diff --git a/tools/node_modules/eslint/node_modules/escape-string-regexp/license b/tools/node_modules/eslint/node_modules/escape-string-regexp/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/escape-string-regexp/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/tools/node_modules/eslint/node_modules/escape-string-regexp/package.json b/tools/node_modules/eslint/node_modules/escape-string-regexp/package.json
new file mode 100644
index 0000000000..adc84a123f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/escape-string-regexp/package.json
@@ -0,0 +1,83 @@
+{
+ "_from": "escape-string-regexp@^1.0.2",
+ "_id": "escape-string-regexp@1.0.5",
+ "_inBundle": false,
+ "_integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
+ "_location": "/eslint/escape-string-regexp",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "escape-string-regexp@^1.0.2",
+ "name": "escape-string-regexp",
+ "escapedName": "escape-string-regexp",
+ "rawSpec": "^1.0.2",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.2"
+ },
+ "_requiredBy": [
+ "/eslint/babel-code-frame/chalk",
+ "/eslint/chalk",
+ "/eslint/figures"
+ ],
+ "_resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "_shasum": "1b61c0562190a8dff6ae3bb2cf0200ca130b86d4",
+ "_spec": "escape-string-regexp@^1.0.2",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/babel-code-frame/node_modules/chalk",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/escape-string-regexp/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Escape RegExp special characters",
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=0.8.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/escape-string-regexp#readme",
+ "keywords": [
+ "escape",
+ "regex",
+ "regexp",
+ "re",
+ "regular",
+ "expression",
+ "string",
+ "str",
+ "special",
+ "characters"
+ ],
+ "license": "MIT",
+ "maintainers": [
+ {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ {
+ "name": "Joshua Boy Nicolai Appelman",
+ "email": "joshua@jbna.nl",
+ "url": "jbna.nl"
+ }
+ ],
+ "name": "escape-string-regexp",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/escape-string-regexp.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "1.0.5"
+}
diff --git a/tools/node_modules/eslint/node_modules/escape-string-regexp/readme.md b/tools/node_modules/eslint/node_modules/escape-string-regexp/readme.md
new file mode 100644
index 0000000000..87ac82d5ef
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/escape-string-regexp/readme.md
@@ -0,0 +1,27 @@
+# escape-string-regexp [![Build Status](https://travis-ci.org/sindresorhus/escape-string-regexp.svg?branch=master)](https://travis-ci.org/sindresorhus/escape-string-regexp)
+
+> Escape RegExp special characters
+
+
+## Install
+
+```
+$ npm install --save escape-string-regexp
+```
+
+
+## Usage
+
+```js
+const escapeStringRegexp = require('escape-string-regexp');
+
+const escapedString = escapeStringRegexp('how much $ for a unicorn?');
+//=> 'how much \$ for a unicorn\?'
+
+new RegExp(escapedString);
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-markdown/LICENSE b/tools/node_modules/eslint/node_modules/eslint-plugin-markdown/LICENSE
new file mode 100644
index 0000000000..cf5a5995af
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/eslint-plugin-markdown/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright JS Foundation and other contributors, https://js.foundation
+
+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/tools/node_modules/eslint/node_modules/eslint-plugin-markdown/README.md b/tools/node_modules/eslint/node_modules/eslint-plugin-markdown/README.md
new file mode 100644
index 0000000000..749c188323
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/eslint-plugin-markdown/README.md
@@ -0,0 +1,140 @@
+# eslint-plugin-markdown
+
+![Screenshot](screenshot.png)
+
+An [ESLint](http://eslint.org/) plugin to lint JavaScript in Markdown.
+
+Supported extensions are `.markdown`, `.mdown`, `.mkdn`, and `.md`.
+
+## Usage
+
+Install the plugin:
+
+```sh
+npm install --save-dev eslint eslint-plugin-markdown
+```
+
+Add it to your `.eslintrc`:
+
+```json
+{
+ "plugins": [
+ "markdown"
+ ]
+}
+```
+
+Run ESLint on `.md` files:
+
+```sh
+eslint --ext md .
+```
+
+It will lint `js`, `javascript`, `jsx`, or `node` [fenced code blocks](https://help.github.com/articles/github-flavored-markdown/#fenced-code-blocks) in your Markdown documents:
+
+ ```js
+ // This gets linted
+ var answer = 6 * 7;
+ console.log(answer);
+ ```
+
+ ```JavaScript
+ // This also gets linted
+
+ /* eslint quotes: [2, "double"] */
+
+ function hello() {
+ console.log("Hello, world!");
+ }
+ hello();
+ ```
+
+ ```jsx
+ // This gets linted too
+ var div = <div className="jsx"></div>;
+ ```
+
+ ```node
+ // And this
+ console.log(process.version);
+ ```
+
+Blocks that don't specify either `js`, `javascript`, `jsx`, or `node` syntax are ignored:
+
+ ```
+ This is plain text and doesn't get linted.
+ ```
+
+ ```python
+ print("This doesn't get linted either.")
+ ```
+
+## Configuration Comments
+
+The processor will convert HTML comments immediately preceding a code block into JavaScript block comments and insert them at the beginning of the source code that it passes to ESLint. This permits configuring ESLint via configuration comments while keeping the configuration comments themselves hidden when the markdown is rendered. Comment bodies are passed through unmodified, so the plugin supports any [configuration comments](http://eslint.org/docs/user-guide/configuring) supported by ESLint itself.
+
+This example enables the `browser` environment, disables the `no-alert` rule, and configures the `quotes` rule to prefer single quotes:
+
+ <!-- eslint-env browser -->
+ <!-- eslint-disable no-alert -->
+ <!-- eslint quotes: ["error", "single"] -->
+
+ ```js
+ alert('Hello, world!');
+ ```
+
+Each code block in a file is linted separately, so configuration comments apply only to the code block that immediately follows.
+
+ Assuming `no-alert` is enabled in `.eslintrc`, the first code block will have no error from `no-alert`:
+
+ <!-- eslint-env browser -->
+ <!-- eslint-disable no-alert -->
+
+ ```js
+ alert("Hello, world!");
+ ```
+
+ But the next code block will have an error from `no-alert`:
+
+ <!-- eslint-env browser -->
+
+ ```js
+ alert("Hello, world!");
+ ```
+
+## Skipping Blocks
+
+Sometimes it can be useful to have code blocks marked with `js` even though they don't contain valid JavaScript syntax, such as commented JSON blobs that need `js` syntax highlighting. Standard `eslint-disable` comments only silence rule reporting, but ESLint still reports any syntax errors it finds. In cases where a code block should not even be parsed, insert a non-standard `<!-- eslint-skip -->` comment before the block, and this plugin will hide the following block from ESLint. Neither rule nor syntax errors will be reported.
+
+ There are comments in this JSON, so we use `js` syntax for better
+ highlighting. Skip the block to prevent warnings about invalid syntax.
+
+ <!-- eslint-skip -->
+
+ ```js
+ {
+ // This code block is hidden from ESLint.
+ "hello": "world"
+ }
+ ```
+
+ ```js
+ console.log("This code block is linted normally.");
+ ```
+
+## Unsatisfiable Rules
+
+Since code blocks are not files themselves but embedded inside a Markdown document, some rules do not apply to Markdown code blocks, and messages from these rules are automatically suppressed:
+
+- `eol-last`
+
+## Contributing
+
+```sh
+$ git clone https://github.com/eslint/eslint-plugin-markdown.git
+$ cd eslint-plugin-markdown
+$ npm install
+$ npm test
+```
+
+This project follows the [ESLint contribution guidelines](http://eslint.org/docs/developer-guide/contributing/).
diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-markdown/index.js b/tools/node_modules/eslint/node_modules/eslint-plugin-markdown/index.js
new file mode 100644
index 0000000000..1638f11ee3
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/eslint-plugin-markdown/index.js
@@ -0,0 +1,8 @@
+/**
+ * @fileoverview Exports the processor.
+ * @author Brandon Mills
+ */
+
+"use strict";
+
+module.exports = require("./lib");
diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-markdown/lib/index.js b/tools/node_modules/eslint/node_modules/eslint-plugin-markdown/lib/index.js
new file mode 100644
index 0000000000..890425ff8a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/eslint-plugin-markdown/lib/index.js
@@ -0,0 +1,17 @@
+/**
+ * @fileoverview Enables the processor for Markdown file extensions.
+ * @author Brandon Mills
+ */
+
+"use strict";
+
+var processor = require("./processor");
+
+module.exports = {
+ "processors": {
+ ".markdown": processor,
+ ".mdown": processor,
+ ".mkdn": processor,
+ ".md": processor
+ }
+};
diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-markdown/lib/processor.js b/tools/node_modules/eslint/node_modules/eslint-plugin-markdown/lib/processor.js
new file mode 100644
index 0000000000..8df09ef614
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/eslint-plugin-markdown/lib/processor.js
@@ -0,0 +1,164 @@
+/**
+ * @fileoverview Processes Markdown files for consumption by ESLint.
+ * @author Brandon Mills
+ */
+
+"use strict";
+
+var assign = require("object-assign");
+var unified = require("unified");
+var remarkParse = require("remark-parse");
+
+var SUPPORTED_SYNTAXES = ["js", "javascript", "node", "jsx"];
+var UNSATISFIABLE_RULES = [
+ "eol-last" // The Markdown parser strips trailing newlines in code fences
+];
+
+var markdown = unified().use(remarkParse);
+
+var blocks = [];
+
+/**
+ * Performs a depth-first traversal of the Markdown AST.
+ * @param {ASTNode} node A Markdown AST node.
+ * @param {object} callbacks A map of node types to callbacks.
+ * @param {object} [parent] The node's parent AST node.
+ * @returns {void}
+ */
+function traverse(node, callbacks, parent) {
+ var i;
+
+ if (callbacks[node.type]) {
+ callbacks[node.type](node, parent);
+ }
+
+ if (typeof node.children !== "undefined") {
+ for (i = 0; i < node.children.length; i++) {
+ traverse(node.children[i], callbacks, node);
+ }
+ }
+}
+
+/**
+ * Converts leading HTML comments to JS block comments.
+ * @param {string} html The text content of an HTML AST node.
+ * @returns {string[]} An array of JS block comments.
+ */
+function getComment(html) {
+ var commentStart = "<!--";
+ var commentEnd = "-->";
+ var prefix = "eslint";
+
+ if (
+ html.slice(0, commentStart.length) !== commentStart ||
+ html.slice(-commentEnd.length) !== commentEnd
+ ) {
+ return "";
+ }
+
+ html = html.slice(commentStart.length, -commentEnd.length);
+
+ if (html.trim().slice(0, prefix.length) !== prefix) {
+ return "";
+ }
+
+ return html;
+}
+
+/**
+ * Extracts lintable JavaScript code blocks from Markdown text.
+ * @param {string} text The text of the file.
+ * @returns {string[]} Source code strings to lint.
+ */
+function preprocess(text) {
+ var ast = markdown.parse(text);
+
+ blocks = [];
+ traverse(ast, {
+ "code": function(node, parent) {
+ var comments = [];
+ var index, previousNode, comment;
+
+ if (node.lang && SUPPORTED_SYNTAXES.indexOf(node.lang.toLowerCase()) >= 0) {
+ index = parent.children.indexOf(node) - 1;
+ previousNode = parent.children[index];
+ while (previousNode && previousNode.type === "html") {
+ comment = getComment(previousNode.value);
+
+ if (!comment) {
+ break;
+ }
+
+ if (comment.trim() === "eslint-skip") {
+ return;
+ }
+
+ comments.unshift("/*" + comment + "*/");
+ index--;
+ previousNode = parent.children[index];
+ }
+
+ blocks.push(assign({}, node, { comments: comments }));
+ }
+ }
+ });
+
+ return blocks.map(function(block) {
+ return block.comments.concat(block.value).join("\n");
+ });
+}
+
+/**
+ * Creates a map function that adjusts messages in a code block.
+ * @param {Block} block A code block.
+ * @returns {function} A function that adjusts messages in a code block.
+ */
+function adjustBlock(block) {
+ var leadingCommentLines = block.comments.reduce(function(count, comment) {
+ return count + comment.split("\n").length;
+ }, 0);
+
+ /**
+ * Adjusts ESLint messages to point to the correct location in the Markdown.
+ * @param {Message} message A message from ESLint.
+ * @returns {Message} The same message, but adjusted ot the correct location.
+ */
+ return function adjustMessage(message) {
+ var lineInCode = message.line - leadingCommentLines;
+ if (lineInCode < 1) {
+ return null;
+ }
+
+ return assign({}, message, {
+ line: lineInCode + block.position.start.line,
+ column: message.column + block.position.indent[lineInCode - 1] - 1
+ });
+ };
+}
+
+/**
+ * Excludes unsatisfiable rules from the list of messages.
+ * @param {Message} message A message from the linter.
+ * @returns {boolean} True if the message should be included in output.
+ */
+function excludeUnsatisfiableRules(message) {
+ return message && UNSATISFIABLE_RULES.indexOf(message.ruleId) < 0;
+}
+
+/**
+ * Transforms generated messages for output.
+ * @param {Array<Message[]>} messages An array containing one array of messages
+ * for each code block returned from `preprocess`.
+ * @returns {Message[]} A flattened array of messages with mapped locations.
+ */
+function postprocess(messages) {
+ return [].concat.apply([], messages.map(function(group, i) {
+ var adjust = adjustBlock(blocks[i]);
+ return group.map(adjust).filter(excludeUnsatisfiableRules);
+ }));
+}
+
+module.exports = {
+ preprocess: preprocess,
+ postprocess: postprocess
+};
diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-markdown/package.json b/tools/node_modules/eslint/node_modules/eslint-plugin-markdown/package.json
new file mode 100644
index 0000000000..7a8fed7056
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/eslint-plugin-markdown/package.json
@@ -0,0 +1,80 @@
+{
+ "_from": "eslint-plugin-markdown@next",
+ "_id": "eslint-plugin-markdown@1.0.0-beta.7",
+ "_inBundle": false,
+ "_integrity": "sha1-Euc6QSfEpLedlm+fR1hR3Q949+c=",
+ "_location": "/eslint-plugin-markdown",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "tag",
+ "registry": true,
+ "raw": "eslint-plugin-markdown@next",
+ "name": "eslint-plugin-markdown",
+ "escapedName": "eslint-plugin-markdown",
+ "rawSpec": "next",
+ "saveSpec": null,
+ "fetchSpec": "next"
+ },
+ "_requiredBy": [
+ "#USER",
+ "/"
+ ],
+ "_resolved": "https://registry.npmjs.org/eslint-plugin-markdown/-/eslint-plugin-markdown-1.0.0-beta.7.tgz",
+ "_shasum": "12e73a4127c4a4b79d966f9f475851dd0f78f7e7",
+ "_spec": "eslint-plugin-markdown@next",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint",
+ "author": {
+ "name": "Brandon Mills",
+ "url": "https://github.com/btmills"
+ },
+ "bugs": {
+ "url": "https://github.com/eslint/eslint-plugin-markdown/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "object-assign": "^4.0.1",
+ "remark-parse": "^3.0.0",
+ "unified": "^6.1.2"
+ },
+ "deprecated": false,
+ "description": "An ESLint plugin to lint JavaScript in Markdown code fences.",
+ "devDependencies": {
+ "chai": "^3.0.0",
+ "eslint": "^2.2.0",
+ "eslint-config-eslint": "^3.0.0",
+ "eslint-release": "^0.10.2",
+ "istanbul": "^0.4.5",
+ "mocha": "^2.2.5"
+ },
+ "files": [
+ "index.js",
+ "lib/index.js",
+ "lib/processor.js"
+ ],
+ "homepage": "https://github.com/eslint/eslint-plugin-markdown#readme",
+ "keywords": [
+ "eslint",
+ "eslintplugin",
+ "markdown",
+ "lint",
+ "linter"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "eslint-plugin-markdown",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/eslint/eslint-plugin-markdown.git"
+ },
+ "scripts": {
+ "alpharelease": "eslint-prerelease alpha",
+ "betarelease": "eslint-prerelease beta",
+ "ci-release": "eslint-ci-release",
+ "gh-release": "eslint-gh-release",
+ "lint": "eslint Makefile.js lib/**/*.js tests/lib/plugin.js",
+ "release": "eslint-release",
+ "test": "npm run lint && npm run test-cov",
+ "test-cov": "istanbul cover _mocha -- -c tests/lib/**/*.js"
+ },
+ "version": "1.0.0-beta.7"
+}
diff --git a/tools/node_modules/eslint/node_modules/eslint-scope/LICENSE b/tools/node_modules/eslint/node_modules/eslint-scope/LICENSE
new file mode 100644
index 0000000000..4419797c9c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/eslint-scope/LICENSE
@@ -0,0 +1,23 @@
+eslint-scope
+Copyright JS Foundation and other contributors, https://js.foundation
+Copyright (C) 2012-2013 Yusuke Suzuki (twitter: @Constellation) and other contributors.
+
+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.
+
+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 <COPYRIGHT HOLDER> 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/tools/node_modules/eslint/node_modules/eslint-scope/README.md b/tools/node_modules/eslint/node_modules/eslint-scope/README.md
new file mode 100644
index 0000000000..7e7ce0d345
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/eslint-scope/README.md
@@ -0,0 +1,54 @@
+# ESLint Scope
+
+ESLint Scope is the [ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm) scope analyzer used in ESLint. It is a fork of [escope](http://github.com/estools/escope).
+
+## Usage
+
+Install:
+
+```
+npm i eslint-scope --save
+```
+
+Example:
+
+```js
+var eslintScope = require('eslint-scope');
+var espree = require('espree');
+var estraverse = require('estraverse');
+
+var ast = espree.parse(code);
+var scopeManager = eslintScope.analyze(ast);
+
+var currentScope = scopeManager.acquire(ast); // global scope
+
+estraverse.traverse(ast, {
+ enter: function(node, parent) {
+ // do stuff
+
+ if (/Function/.test(node.type)) {
+ currentScope = scopeManager.acquire(node); // get current function scope
+ }
+ },
+ leave: function(node, parent) {
+ if (/Function/.test(node.type)) {
+ currentScope = currentScope.upper; // set to parent scope
+ }
+
+ // do stuff
+ }
+});
+```
+
+## Contributing
+
+Issues and pull requests will be triaged and responded to as quickly as possible. We operate under the [ESLint Contributor Guidelines](http://eslint.org/docs/developer-guide/contributing), so please be sure to read them before contributing. If you're not sure where to dig in, check out the [issues](https://github.com/eslint/eslint-scope/issues).
+
+## Build Commands
+
+* `npm test` - run all linting and tests
+* `npm run lint` - run all linting
+
+## License
+
+ESLint Scope is licensed under a permissive BSD 2-clause license.
diff --git a/tools/node_modules/eslint/node_modules/eslint-scope/lib/definition.js b/tools/node_modules/eslint/node_modules/eslint-scope/lib/definition.js
new file mode 100644
index 0000000000..172bfe23b5
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/eslint-scope/lib/definition.js
@@ -0,0 +1,86 @@
+/*
+ Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>
+
+ 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.
+
+ 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 <COPYRIGHT HOLDER> 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.
+*/
+"use strict";
+
+const Variable = require("./variable");
+
+/**
+ * @class Definition
+ */
+class Definition {
+ constructor(type, name, node, parent, index, kind) {
+
+ /**
+ * @member {String} Definition#type - type of the occurrence (e.g. "Parameter", "Variable", ...).
+ */
+ this.type = type;
+
+ /**
+ * @member {espree.Identifier} Definition#name - the identifier AST node of the occurrence.
+ */
+ this.name = name;
+
+ /**
+ * @member {espree.Node} Definition#node - the enclosing node of the identifier.
+ */
+ this.node = node;
+
+ /**
+ * @member {espree.Node?} Definition#parent - the enclosing statement node of the identifier.
+ */
+ this.parent = parent;
+
+ /**
+ * @member {Number?} Definition#index - the index in the declaration statement.
+ */
+ this.index = index;
+
+ /**
+ * @member {String?} Definition#kind - the kind of the declaration statement.
+ */
+ this.kind = kind;
+ }
+}
+
+/**
+ * @class ParameterDefinition
+ */
+class ParameterDefinition extends Definition {
+ constructor(name, node, index, rest) {
+ super(Variable.Parameter, name, node, null, index, null);
+
+ /**
+ * Whether the parameter definition is a part of a rest parameter.
+ * @member {boolean} ParameterDefinition#rest
+ */
+ this.rest = rest;
+ }
+}
+
+module.exports = {
+ ParameterDefinition,
+ Definition
+};
+
+/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/node_modules/eslint/node_modules/eslint-scope/lib/index.js b/tools/node_modules/eslint/node_modules/eslint-scope/lib/index.js
new file mode 100644
index 0000000000..f48252fc5f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/eslint-scope/lib/index.js
@@ -0,0 +1,165 @@
+/*
+ Copyright (C) 2012-2014 Yusuke Suzuki <utatane.tea@gmail.com>
+ Copyright (C) 2013 Alex Seville <hi@alexanderseville.com>
+ Copyright (C) 2014 Thiago de Arruda <tpadilha84@gmail.com>
+
+ 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.
+
+ 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 <COPYRIGHT HOLDER> 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.
+*/
+
+/**
+ * Escope (<a href="http://github.com/estools/escope">escope</a>) is an <a
+ * href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">ECMAScript</a>
+ * scope analyzer extracted from the <a
+ * href="http://github.com/estools/esmangle">esmangle project</a/>.
+ * <p>
+ * <em>escope</em> finds lexical scopes in a source program, i.e. areas of that
+ * program where different occurrences of the same identifier refer to the same
+ * variable. With each scope the contained variables are collected, and each
+ * identifier reference in code is linked to its corresponding variable (if
+ * possible).
+ * <p>
+ * <em>escope</em> works on a syntax tree of the parsed source code which has
+ * to adhere to the <a
+ * href="https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API">
+ * Mozilla Parser API</a>. E.g. <a href="https://github.com/eslint/espree">espree</a> is a parser
+ * that produces such syntax trees.
+ * <p>
+ * The main interface is the {@link analyze} function.
+ * @module escope
+ */
+"use strict";
+
+/* eslint no-underscore-dangle: ["error", { "allow": ["__currentScope"] }] */
+
+const assert = require("assert");
+
+const ScopeManager = require("./scope-manager");
+const Referencer = require("./referencer");
+const Reference = require("./reference");
+const Variable = require("./variable");
+const Scope = require("./scope").Scope;
+const version = require("../package.json").version;
+
+/**
+ * Set the default options
+ * @returns {Object} options
+ */
+function defaultOptions() {
+ return {
+ optimistic: false,
+ directive: false,
+ nodejsScope: false,
+ impliedStrict: false,
+ sourceType: "script", // one of ['script', 'module']
+ ecmaVersion: 5,
+ childVisitorKeys: null,
+ fallback: "iteration"
+ };
+}
+
+/**
+ * Preform deep update on option object
+ * @param {Object} target - Options
+ * @param {Object} override - Updates
+ * @returns {Object} Updated options
+ */
+function updateDeeply(target, override) {
+
+ /**
+ * Is hash object
+ * @param {Object} value - Test value
+ * @returns {boolean} Result
+ */
+ function isHashObject(value) {
+ return typeof value === "object" && value instanceof Object && !(value instanceof Array) && !(value instanceof RegExp);
+ }
+
+ for (const key in override) {
+ if (override.hasOwnProperty(key)) {
+ const val = override[key];
+
+ if (isHashObject(val)) {
+ if (isHashObject(target[key])) {
+ updateDeeply(target[key], val);
+ } else {
+ target[key] = updateDeeply({}, val);
+ }
+ } else {
+ target[key] = val;
+ }
+ }
+ }
+ return target;
+}
+
+/**
+ * Main interface function. Takes an Espree syntax tree and returns the
+ * analyzed scopes.
+ * @function analyze
+ * @param {espree.Tree} tree - Abstract Syntax Tree
+ * @param {Object} providedOptions - Options that tailor the scope analysis
+ * @param {boolean} [providedOptions.optimistic=false] - the optimistic flag
+ * @param {boolean} [providedOptions.directive=false]- the directive flag
+ * @param {boolean} [providedOptions.ignoreEval=false]- whether to check 'eval()' calls
+ * @param {boolean} [providedOptions.nodejsScope=false]- whether the whole
+ * script is executed under node.js environment. When enabled, escope adds
+ * a function scope immediately following the global scope.
+ * @param {boolean} [providedOptions.impliedStrict=false]- implied strict mode
+ * (if ecmaVersion >= 5).
+ * @param {string} [providedOptions.sourceType='script']- the source type of the script. one of 'script' and 'module'
+ * @param {number} [providedOptions.ecmaVersion=5]- which ECMAScript version is considered
+ * @param {Object} [providedOptions.childVisitorKeys=null] - Additional known visitor keys. See [esrecurse](https://github.com/estools/esrecurse)'s the `childVisitorKeys` option.
+ * @param {string} [providedOptions.fallback='iteration'] - A kind of the fallback in order to encounter with unknown node. See [esrecurse](https://github.com/estools/esrecurse)'s the `fallback` option.
+ * @returns {ScopeManager} ScopeManager
+ */
+function analyze(tree, providedOptions) {
+ const options = updateDeeply(defaultOptions(), providedOptions);
+ const scopeManager = new ScopeManager(options);
+ const referencer = new Referencer(options, scopeManager);
+
+ referencer.visit(tree);
+
+ assert(scopeManager.__currentScope === null, "currentScope should be null.");
+
+ return scopeManager;
+}
+
+module.exports = {
+
+ /** @name module:escope.version */
+ version,
+
+ /** @name module:escope.Reference */
+ Reference,
+
+ /** @name module:escope.Variable */
+ Variable,
+
+ /** @name module:escope.Scope */
+ Scope,
+
+ /** @name module:escope.ScopeManager */
+ ScopeManager,
+ analyze
+};
+
+
+/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/node_modules/eslint/node_modules/eslint-scope/lib/pattern-visitor.js b/tools/node_modules/eslint/node_modules/eslint-scope/lib/pattern-visitor.js
new file mode 100644
index 0000000000..afa629173b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/eslint-scope/lib/pattern-visitor.js
@@ -0,0 +1,152 @@
+/*
+ Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>
+
+ 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.
+
+ 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 <COPYRIGHT HOLDER> 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.
+*/
+"use strict";
+
+/* eslint-disable no-undefined */
+
+const Syntax = require("estraverse").Syntax;
+const esrecurse = require("esrecurse");
+
+/**
+ * Get last array element
+ * @param {array} xs - array
+ * @returns {any} Last elment
+ */
+function getLast(xs) {
+ return xs[xs.length - 1] || null;
+}
+
+class PatternVisitor extends esrecurse.Visitor {
+ static isPattern(node) {
+ const nodeType = node.type;
+
+ return (
+ nodeType === Syntax.Identifier ||
+ nodeType === Syntax.ObjectPattern ||
+ nodeType === Syntax.ArrayPattern ||
+ nodeType === Syntax.SpreadElement ||
+ nodeType === Syntax.RestElement ||
+ nodeType === Syntax.AssignmentPattern
+ );
+ }
+
+ constructor(options, rootPattern, callback) {
+ super(null, options);
+ this.rootPattern = rootPattern;
+ this.callback = callback;
+ this.assignments = [];
+ this.rightHandNodes = [];
+ this.restElements = [];
+ }
+
+ Identifier(pattern) {
+ const lastRestElement = getLast(this.restElements);
+
+ this.callback(pattern, {
+ topLevel: pattern === this.rootPattern,
+ rest: lastRestElement !== null && lastRestElement !== undefined && lastRestElement.argument === pattern,
+ assignments: this.assignments
+ });
+ }
+
+ Property(property) {
+
+ // Computed property's key is a right hand node.
+ if (property.computed) {
+ this.rightHandNodes.push(property.key);
+ }
+
+ // If it's shorthand, its key is same as its value.
+ // If it's shorthand and has its default value, its key is same as its value.left (the value is AssignmentPattern).
+ // If it's not shorthand, the name of new variable is its value's.
+ this.visit(property.value);
+ }
+
+ ArrayPattern(pattern) {
+ for (let i = 0, iz = pattern.elements.length; i < iz; ++i) {
+ const element = pattern.elements[i];
+
+ this.visit(element);
+ }
+ }
+
+ AssignmentPattern(pattern) {
+ this.assignments.push(pattern);
+ this.visit(pattern.left);
+ this.rightHandNodes.push(pattern.right);
+ this.assignments.pop();
+ }
+
+ RestElement(pattern) {
+ this.restElements.push(pattern);
+ this.visit(pattern.argument);
+ this.restElements.pop();
+ }
+
+ MemberExpression(node) {
+
+ // Computed property's key is a right hand node.
+ if (node.computed) {
+ this.rightHandNodes.push(node.property);
+ }
+
+ // the object is only read, write to its property.
+ this.rightHandNodes.push(node.object);
+ }
+
+ //
+ // ForInStatement.left and AssignmentExpression.left are LeftHandSideExpression.
+ // By spec, LeftHandSideExpression is Pattern or MemberExpression.
+ // (see also: https://github.com/estree/estree/pull/20#issuecomment-74584758)
+ // But espree 2.0 parses to ArrayExpression, ObjectExpression, etc...
+ //
+
+ SpreadElement(node) {
+ this.visit(node.argument);
+ }
+
+ ArrayExpression(node) {
+ node.elements.forEach(this.visit, this);
+ }
+
+ AssignmentExpression(node) {
+ this.assignments.push(node);
+ this.visit(node.left);
+ this.rightHandNodes.push(node.right);
+ this.assignments.pop();
+ }
+
+ CallExpression(node) {
+
+ // arguments are right hand nodes.
+ node.arguments.forEach(a => {
+ this.rightHandNodes.push(a);
+ });
+ this.visit(node.callee);
+ }
+}
+
+module.exports = PatternVisitor;
+
+/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/node_modules/eslint/node_modules/eslint-scope/lib/reference.js b/tools/node_modules/eslint/node_modules/eslint-scope/lib/reference.js
new file mode 100644
index 0000000000..9529827fe7
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/eslint-scope/lib/reference.js
@@ -0,0 +1,167 @@
+/*
+ Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>
+
+ 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.
+
+ 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 <COPYRIGHT HOLDER> 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.
+*/
+"use strict";
+
+const READ = 0x1;
+const WRITE = 0x2;
+const RW = READ | WRITE;
+
+/**
+ * A Reference represents a single occurrence of an identifier in code.
+ * @class Reference
+ */
+class Reference {
+ constructor(ident, scope, flag, writeExpr, maybeImplicitGlobal, partial, init) {
+
+ /**
+ * Identifier syntax node.
+ * @member {espreeIdentifier} Reference#identifier
+ */
+ this.identifier = ident;
+
+ /**
+ * Reference to the enclosing Scope.
+ * @member {Scope} Reference#from
+ */
+ this.from = scope;
+
+ /**
+ * Whether the reference comes from a dynamic scope (such as 'eval',
+ * 'with', etc.), and may be trapped by dynamic scopes.
+ * @member {boolean} Reference#tainted
+ */
+ this.tainted = false;
+
+ /**
+ * The variable this reference is resolved with.
+ * @member {Variable} Reference#resolved
+ */
+ this.resolved = null;
+
+ /**
+ * The read-write mode of the reference. (Value is one of {@link
+ * Reference.READ}, {@link Reference.RW}, {@link Reference.WRITE}).
+ * @member {number} Reference#flag
+ * @private
+ */
+ this.flag = flag;
+ if (this.isWrite()) {
+
+ /**
+ * If reference is writeable, this is the tree being written to it.
+ * @member {espreeNode} Reference#writeExpr
+ */
+ this.writeExpr = writeExpr;
+
+ /**
+ * Whether the Reference might refer to a partial value of writeExpr.
+ * @member {boolean} Reference#partial
+ */
+ this.partial = partial;
+
+ /**
+ * Whether the Reference is to write of initialization.
+ * @member {boolean} Reference#init
+ */
+ this.init = init;
+ }
+ this.__maybeImplicitGlobal = maybeImplicitGlobal;
+ }
+
+ /**
+ * Whether the reference is static.
+ * @method Reference#isStatic
+ * @returns {boolean} static
+ */
+ isStatic() {
+ return !this.tainted && this.resolved && this.resolved.scope.isStatic();
+ }
+
+ /**
+ * Whether the reference is writeable.
+ * @method Reference#isWrite
+ * @returns {boolean} write
+ */
+ isWrite() {
+ return !!(this.flag & Reference.WRITE);
+ }
+
+ /**
+ * Whether the reference is readable.
+ * @method Reference#isRead
+ * @returns {boolean} read
+ */
+ isRead() {
+ return !!(this.flag & Reference.READ);
+ }
+
+ /**
+ * Whether the reference is read-only.
+ * @method Reference#isReadOnly
+ * @returns {boolean} read only
+ */
+ isReadOnly() {
+ return this.flag === Reference.READ;
+ }
+
+ /**
+ * Whether the reference is write-only.
+ * @method Reference#isWriteOnly
+ * @returns {boolean} write only
+ */
+ isWriteOnly() {
+ return this.flag === Reference.WRITE;
+ }
+
+ /**
+ * Whether the reference is read-write.
+ * @method Reference#isReadWrite
+ * @returns {boolean} read write
+ */
+ isReadWrite() {
+ return this.flag === Reference.RW;
+ }
+}
+
+/**
+ * @constant Reference.READ
+ * @private
+ */
+Reference.READ = READ;
+
+/**
+ * @constant Reference.WRITE
+ * @private
+ */
+Reference.WRITE = WRITE;
+
+/**
+ * @constant Reference.RW
+ * @private
+ */
+Reference.RW = RW;
+
+module.exports = Reference;
+
+/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/node_modules/eslint/node_modules/eslint-scope/lib/referencer.js b/tools/node_modules/eslint/node_modules/eslint-scope/lib/referencer.js
new file mode 100644
index 0000000000..b7cdbb6003
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/eslint-scope/lib/referencer.js
@@ -0,0 +1,638 @@
+/*
+ Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>
+
+ 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.
+
+ 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 <COPYRIGHT HOLDER> 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.
+*/
+"use strict";
+
+/* eslint-disable no-underscore-dangle */
+/* eslint-disable no-undefined */
+
+const Syntax = require("estraverse").Syntax;
+const esrecurse = require("esrecurse");
+const Reference = require("./reference");
+const Variable = require("./variable");
+const PatternVisitor = require("./pattern-visitor");
+const definition = require("./definition");
+const assert = require("assert");
+
+const ParameterDefinition = definition.ParameterDefinition;
+const Definition = definition.Definition;
+
+/**
+ * Traverse identifier in pattern
+ * @param {Object} options - options
+ * @param {pattern} rootPattern - root pattern
+ * @param {Refencer} referencer - referencer
+ * @param {callback} callback - callback
+ * @returns {void}
+ */
+function traverseIdentifierInPattern(options, rootPattern, referencer, callback) {
+
+ // Call the callback at left hand identifier nodes, and Collect right hand nodes.
+ const visitor = new PatternVisitor(options, rootPattern, callback);
+
+ visitor.visit(rootPattern);
+
+ // Process the right hand nodes recursively.
+ if (referencer !== null && referencer !== undefined) {
+ visitor.rightHandNodes.forEach(referencer.visit, referencer);
+ }
+}
+
+// Importing ImportDeclaration.
+// http://people.mozilla.org/~jorendorff/es6-draft.html#sec-moduledeclarationinstantiation
+// https://github.com/estree/estree/blob/master/es6.md#importdeclaration
+// FIXME: Now, we don't create module environment, because the context is
+// implementation dependent.
+
+class Importer extends esrecurse.Visitor {
+ constructor(declaration, referencer) {
+ super(null, referencer.options);
+ this.declaration = declaration;
+ this.referencer = referencer;
+ }
+
+ visitImport(id, specifier) {
+ this.referencer.visitPattern(id, pattern => {
+ this.referencer.currentScope().__define(pattern,
+ new Definition(
+ Variable.ImportBinding,
+ pattern,
+ specifier,
+ this.declaration,
+ null,
+ null
+ ));
+ });
+ }
+
+ ImportNamespaceSpecifier(node) {
+ const local = (node.local || node.id);
+
+ if (local) {
+ this.visitImport(local, node);
+ }
+ }
+
+ ImportDefaultSpecifier(node) {
+ const local = (node.local || node.id);
+
+ this.visitImport(local, node);
+ }
+
+ ImportSpecifier(node) {
+ const local = (node.local || node.id);
+
+ if (node.name) {
+ this.visitImport(node.name, node);
+ } else {
+ this.visitImport(local, node);
+ }
+ }
+}
+
+// Referencing variables and creating bindings.
+class Referencer extends esrecurse.Visitor {
+ constructor(options, scopeManager) {
+ super(null, options);
+ this.options = options;
+ this.scopeManager = scopeManager;
+ this.parent = null;
+ this.isInnerMethodDefinition = false;
+ }
+
+ currentScope() {
+ return this.scopeManager.__currentScope;
+ }
+
+ close(node) {
+ while (this.currentScope() && node === this.currentScope().block) {
+ this.scopeManager.__currentScope = this.currentScope().__close(this.scopeManager);
+ }
+ }
+
+ pushInnerMethodDefinition(isInnerMethodDefinition) {
+ const previous = this.isInnerMethodDefinition;
+
+ this.isInnerMethodDefinition = isInnerMethodDefinition;
+ return previous;
+ }
+
+ popInnerMethodDefinition(isInnerMethodDefinition) {
+ this.isInnerMethodDefinition = isInnerMethodDefinition;
+ }
+
+ materializeTDZScope(node, iterationNode) {
+
+ // http://people.mozilla.org/~jorendorff/es6-draft.html#sec-runtime-semantics-forin-div-ofexpressionevaluation-abstract-operation
+ // TDZ scope hides the declaration's names.
+ this.scopeManager.__nestTDZScope(node, iterationNode);
+ this.visitVariableDeclaration(this.currentScope(), Variable.TDZ, iterationNode.left, 0, true);
+ }
+
+ materializeIterationScope(node) {
+
+ // Generate iteration scope for upper ForIn/ForOf Statements.
+ const letOrConstDecl = node.left;
+
+ this.scopeManager.__nestForScope(node);
+ this.visitVariableDeclaration(this.currentScope(), Variable.Variable, letOrConstDecl, 0);
+ this.visitPattern(letOrConstDecl.declarations[0].id, pattern => {
+ this.currentScope().__referencing(pattern, Reference.WRITE, node.right, null, true, true);
+ });
+ }
+
+ referencingDefaultValue(pattern, assignments, maybeImplicitGlobal, init) {
+ const scope = this.currentScope();
+
+ assignments.forEach(assignment => {
+ scope.__referencing(
+ pattern,
+ Reference.WRITE,
+ assignment.right,
+ maybeImplicitGlobal,
+ pattern !== assignment.left,
+ init);
+ });
+ }
+
+ visitPattern(node, options, callback) {
+ if (typeof options === "function") {
+ callback = options;
+ options = { processRightHandNodes: false };
+ }
+ traverseIdentifierInPattern(
+ this.options,
+ node,
+ options.processRightHandNodes ? this : null,
+ callback);
+ }
+
+ visitFunction(node) {
+ let i, iz;
+
+ // FunctionDeclaration name is defined in upper scope
+ // NOTE: Not referring variableScope. It is intended.
+ // Since
+ // in ES5, FunctionDeclaration should be in FunctionBody.
+ // in ES6, FunctionDeclaration should be block scoped.
+
+ if (node.type === Syntax.FunctionDeclaration) {
+
+ // id is defined in upper scope
+ this.currentScope().__define(node.id,
+ new Definition(
+ Variable.FunctionName,
+ node.id,
+ node,
+ null,
+ null,
+ null
+ ));
+ }
+
+ // FunctionExpression with name creates its special scope;
+ // FunctionExpressionNameScope.
+ if (node.type === Syntax.FunctionExpression && node.id) {
+ this.scopeManager.__nestFunctionExpressionNameScope(node);
+ }
+
+ // Consider this function is in the MethodDefinition.
+ this.scopeManager.__nestFunctionScope(node, this.isInnerMethodDefinition);
+
+ const that = this;
+
+ /**
+ * Visit pattern callback
+ * @param {pattern} pattern - pattern
+ * @param {Object} info - info
+ * @returns {void}
+ */
+ function visitPatternCallback(pattern, info) {
+ that.currentScope().__define(pattern,
+ new ParameterDefinition(
+ pattern,
+ node,
+ i,
+ info.rest
+ ));
+
+ that.referencingDefaultValue(pattern, info.assignments, null, true);
+ }
+
+ // Process parameter declarations.
+ for (i = 0, iz = node.params.length; i < iz; ++i) {
+ this.visitPattern(node.params[i], { processRightHandNodes: true }, visitPatternCallback);
+ }
+
+ // if there's a rest argument, add that
+ if (node.rest) {
+ this.visitPattern({
+ type: "RestElement",
+ argument: node.rest
+ }, pattern => {
+ this.currentScope().__define(pattern,
+ new ParameterDefinition(
+ pattern,
+ node,
+ node.params.length,
+ true
+ ));
+ });
+ }
+
+ // In TypeScript there are a number of function-like constructs which have no body,
+ // so check it exists before traversing
+ if (node.body) {
+
+ // Skip BlockStatement to prevent creating BlockStatement scope.
+ if (node.body.type === Syntax.BlockStatement) {
+ this.visitChildren(node.body);
+ } else {
+ this.visit(node.body);
+ }
+ }
+
+ this.close(node);
+ }
+
+ visitClass(node) {
+ if (node.type === Syntax.ClassDeclaration) {
+ this.currentScope().__define(node.id,
+ new Definition(
+ Variable.ClassName,
+ node.id,
+ node,
+ null,
+ null,
+ null
+ ));
+ }
+
+ // FIXME: Maybe consider TDZ.
+ this.visit(node.superClass);
+
+ this.scopeManager.__nestClassScope(node);
+
+ if (node.id) {
+ this.currentScope().__define(node.id,
+ new Definition(
+ Variable.ClassName,
+ node.id,
+ node
+ ));
+ }
+ this.visit(node.body);
+
+ this.close(node);
+ }
+
+ visitProperty(node) {
+ let previous;
+
+ if (node.computed) {
+ this.visit(node.key);
+ }
+
+ const isMethodDefinition = node.type === Syntax.MethodDefinition;
+
+ if (isMethodDefinition) {
+ previous = this.pushInnerMethodDefinition(true);
+ }
+ this.visit(node.value);
+ if (isMethodDefinition) {
+ this.popInnerMethodDefinition(previous);
+ }
+ }
+
+ visitForIn(node) {
+ if (node.left.type === Syntax.VariableDeclaration && node.left.kind !== "var") {
+ this.materializeTDZScope(node.right, node);
+ this.visit(node.right);
+ this.close(node.right);
+
+ this.materializeIterationScope(node);
+ this.visit(node.body);
+ this.close(node);
+ } else {
+ if (node.left.type === Syntax.VariableDeclaration) {
+ this.visit(node.left);
+ this.visitPattern(node.left.declarations[0].id, pattern => {
+ this.currentScope().__referencing(pattern, Reference.WRITE, node.right, null, true, true);
+ });
+ } else {
+ this.visitPattern(node.left, { processRightHandNodes: true }, (pattern, info) => {
+ let maybeImplicitGlobal = null;
+
+ if (!this.currentScope().isStrict) {
+ maybeImplicitGlobal = {
+ pattern,
+ node
+ };
+ }
+ this.referencingDefaultValue(pattern, info.assignments, maybeImplicitGlobal, false);
+ this.currentScope().__referencing(pattern, Reference.WRITE, node.right, maybeImplicitGlobal, true, false);
+ });
+ }
+ this.visit(node.right);
+ this.visit(node.body);
+ }
+ }
+
+ visitVariableDeclaration(variableTargetScope, type, node, index, fromTDZ) {
+
+ // If this was called to initialize a TDZ scope, this needs to make definitions, but doesn't make references.
+ const decl = node.declarations[index];
+ const init = decl.init;
+
+ this.visitPattern(decl.id, { processRightHandNodes: !fromTDZ }, (pattern, info) => {
+ variableTargetScope.__define(pattern,
+ new Definition(
+ type,
+ pattern,
+ decl,
+ node,
+ index,
+ node.kind
+ ));
+
+ if (!fromTDZ) {
+ this.referencingDefaultValue(pattern, info.assignments, null, true);
+ }
+ if (init) {
+ this.currentScope().__referencing(pattern, Reference.WRITE, init, null, !info.topLevel, true);
+ }
+ });
+ }
+
+ AssignmentExpression(node) {
+ if (PatternVisitor.isPattern(node.left)) {
+ if (node.operator === "=") {
+ this.visitPattern(node.left, { processRightHandNodes: true }, (pattern, info) => {
+ let maybeImplicitGlobal = null;
+
+ if (!this.currentScope().isStrict) {
+ maybeImplicitGlobal = {
+ pattern,
+ node
+ };
+ }
+ this.referencingDefaultValue(pattern, info.assignments, maybeImplicitGlobal, false);
+ this.currentScope().__referencing(pattern, Reference.WRITE, node.right, maybeImplicitGlobal, !info.topLevel, false);
+ });
+ } else {
+ this.currentScope().__referencing(node.left, Reference.RW, node.right);
+ }
+ } else {
+ this.visit(node.left);
+ }
+ this.visit(node.right);
+ }
+
+ CatchClause(node) {
+ this.scopeManager.__nestCatchScope(node);
+
+ this.visitPattern(node.param, { processRightHandNodes: true }, (pattern, info) => {
+ this.currentScope().__define(pattern,
+ new Definition(
+ Variable.CatchClause,
+ node.param,
+ node,
+ null,
+ null,
+ null
+ ));
+ this.referencingDefaultValue(pattern, info.assignments, null, true);
+ });
+ this.visit(node.body);
+
+ this.close(node);
+ }
+
+ Program(node) {
+ this.scopeManager.__nestGlobalScope(node);
+
+ if (this.scopeManager.__isNodejsScope()) {
+
+ // Force strictness of GlobalScope to false when using node.js scope.
+ this.currentScope().isStrict = false;
+ this.scopeManager.__nestFunctionScope(node, false);
+ }
+
+ if (this.scopeManager.__isES6() && this.scopeManager.isModule()) {
+ this.scopeManager.__nestModuleScope(node);
+ }
+
+ if (this.scopeManager.isStrictModeSupported() && this.scopeManager.isImpliedStrict()) {
+ this.currentScope().isStrict = true;
+ }
+
+ this.visitChildren(node);
+ this.close(node);
+ }
+
+ Identifier(node) {
+ this.currentScope().__referencing(node);
+ }
+
+ UpdateExpression(node) {
+ if (PatternVisitor.isPattern(node.argument)) {
+ this.currentScope().__referencing(node.argument, Reference.RW, null);
+ } else {
+ this.visitChildren(node);
+ }
+ }
+
+ MemberExpression(node) {
+ this.visit(node.object);
+ if (node.computed) {
+ this.visit(node.property);
+ }
+ }
+
+ Property(node) {
+ this.visitProperty(node);
+ }
+
+ MethodDefinition(node) {
+ this.visitProperty(node);
+ }
+
+ BreakStatement() {} // eslint-disable-line class-methods-use-this
+
+ ContinueStatement() {} // eslint-disable-line class-methods-use-this
+
+ LabeledStatement(node) {
+ this.visit(node.body);
+ }
+
+ ForStatement(node) {
+
+ // Create ForStatement declaration.
+ // NOTE: In ES6, ForStatement dynamically generates
+ // per iteration environment. However, escope is
+ // a static analyzer, we only generate one scope for ForStatement.
+ if (node.init && node.init.type === Syntax.VariableDeclaration && node.init.kind !== "var") {
+ this.scopeManager.__nestForScope(node);
+ }
+
+ this.visitChildren(node);
+
+ this.close(node);
+ }
+
+ ClassExpression(node) {
+ this.visitClass(node);
+ }
+
+ ClassDeclaration(node) {
+ this.visitClass(node);
+ }
+
+ CallExpression(node) {
+
+ // Check this is direct call to eval
+ if (!this.scopeManager.__ignoreEval() && node.callee.type === Syntax.Identifier && node.callee.name === "eval") {
+
+ // NOTE: This should be `variableScope`. Since direct eval call always creates Lexical environment and
+ // let / const should be enclosed into it. Only VariableDeclaration affects on the caller's environment.
+ this.currentScope().variableScope.__detectEval();
+ }
+ this.visitChildren(node);
+ }
+
+ BlockStatement(node) {
+ if (this.scopeManager.__isES6()) {
+ this.scopeManager.__nestBlockScope(node);
+ }
+
+ this.visitChildren(node);
+
+ this.close(node);
+ }
+
+ ThisExpression() {
+ this.currentScope().variableScope.__detectThis();
+ }
+
+ WithStatement(node) {
+ this.visit(node.object);
+
+ // Then nest scope for WithStatement.
+ this.scopeManager.__nestWithScope(node);
+
+ this.visit(node.body);
+
+ this.close(node);
+ }
+
+ VariableDeclaration(node) {
+ const variableTargetScope = (node.kind === "var") ? this.currentScope().variableScope : this.currentScope();
+
+ for (let i = 0, iz = node.declarations.length; i < iz; ++i) {
+ const decl = node.declarations[i];
+
+ this.visitVariableDeclaration(variableTargetScope, Variable.Variable, node, i);
+ if (decl.init) {
+ this.visit(decl.init);
+ }
+ }
+ }
+
+ // sec 13.11.8
+ SwitchStatement(node) {
+ this.visit(node.discriminant);
+
+ if (this.scopeManager.__isES6()) {
+ this.scopeManager.__nestSwitchScope(node);
+ }
+
+ for (let i = 0, iz = node.cases.length; i < iz; ++i) {
+ this.visit(node.cases[i]);
+ }
+
+ this.close(node);
+ }
+
+ FunctionDeclaration(node) {
+ this.visitFunction(node);
+ }
+
+ FunctionExpression(node) {
+ this.visitFunction(node);
+ }
+
+ ForOfStatement(node) {
+ this.visitForIn(node);
+ }
+
+ ForInStatement(node) {
+ this.visitForIn(node);
+ }
+
+ ArrowFunctionExpression(node) {
+ this.visitFunction(node);
+ }
+
+ ImportDeclaration(node) {
+ assert(this.scopeManager.__isES6() && this.scopeManager.isModule(), "ImportDeclaration should appear when the mode is ES6 and in the module context.");
+
+ const importer = new Importer(node, this);
+
+ importer.visit(node);
+ }
+
+ visitExportDeclaration(node) {
+ if (node.source) {
+ return;
+ }
+ if (node.declaration) {
+ this.visit(node.declaration);
+ return;
+ }
+
+ this.visitChildren(node);
+ }
+
+ ExportDeclaration(node) {
+ this.visitExportDeclaration(node);
+ }
+
+ ExportNamedDeclaration(node) {
+ this.visitExportDeclaration(node);
+ }
+
+ ExportSpecifier(node) {
+ const local = (node.id || node.local);
+
+ this.visit(local);
+ }
+
+ MetaProperty() { // eslint-disable-line class-methods-use-this
+
+ // do nothing.
+ }
+}
+
+module.exports = Referencer;
+
+/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/node_modules/eslint/node_modules/eslint-scope/lib/scope-manager.js b/tools/node_modules/eslint/node_modules/eslint-scope/lib/scope-manager.js
new file mode 100644
index 0000000000..0cc75a03ba
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/eslint-scope/lib/scope-manager.js
@@ -0,0 +1,255 @@
+/*
+ Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>
+
+ 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.
+
+ 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 <COPYRIGHT HOLDER> 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.
+*/
+"use strict";
+
+/* eslint-disable no-underscore-dangle */
+
+const Scope = require("./scope");
+const assert = require("assert");
+
+const GlobalScope = Scope.GlobalScope;
+const CatchScope = Scope.CatchScope;
+const WithScope = Scope.WithScope;
+const ModuleScope = Scope.ModuleScope;
+const ClassScope = Scope.ClassScope;
+const SwitchScope = Scope.SwitchScope;
+const FunctionScope = Scope.FunctionScope;
+const ForScope = Scope.ForScope;
+const TDZScope = Scope.TDZScope;
+const FunctionExpressionNameScope = Scope.FunctionExpressionNameScope;
+const BlockScope = Scope.BlockScope;
+
+/**
+ * @class ScopeManager
+ */
+class ScopeManager {
+ constructor(options) {
+ this.scopes = [];
+ this.globalScope = null;
+ this.__nodeToScope = new WeakMap();
+ this.__currentScope = null;
+ this.__options = options;
+ this.__declaredVariables = new WeakMap();
+ }
+
+ __useDirective() {
+ return this.__options.directive;
+ }
+
+ __isOptimistic() {
+ return this.__options.optimistic;
+ }
+
+ __ignoreEval() {
+ return this.__options.ignoreEval;
+ }
+
+ __isNodejsScope() {
+ return this.__options.nodejsScope;
+ }
+
+ isModule() {
+ return this.__options.sourceType === "module";
+ }
+
+ isImpliedStrict() {
+ return this.__options.impliedStrict;
+ }
+
+ isStrictModeSupported() {
+ return this.__options.ecmaVersion >= 5;
+ }
+
+ // Returns appropriate scope for this node.
+ __get(node) {
+ return this.__nodeToScope.get(node);
+ }
+
+ /**
+ * Get variables that are declared by the node.
+ *
+ * "are declared by the node" means the node is same as `Variable.defs[].node` or `Variable.defs[].parent`.
+ * If the node declares nothing, this method returns an empty array.
+ * CAUTION: This API is experimental. See https://github.com/estools/escope/pull/69 for more details.
+ *
+ * @param {Espree.Node} node - a node to get.
+ * @returns {Variable[]} variables that declared by the node.
+ */
+ getDeclaredVariables(node) {
+ return this.__declaredVariables.get(node) || [];
+ }
+
+ /**
+ * acquire scope from node.
+ * @method ScopeManager#acquire
+ * @param {Espree.Node} node - node for the acquired scope.
+ * @param {boolean=} inner - look up the most inner scope, default value is false.
+ * @returns {Scope?} Scope from node
+ */
+ acquire(node, inner) {
+
+ /**
+ * predicate
+ * @param {Scope} testScope - scope to test
+ * @returns {boolean} predicate
+ */
+ function predicate(testScope) {
+ if (testScope.type === "function" && testScope.functionExpressionScope) {
+ return false;
+ }
+ if (testScope.type === "TDZ") {
+ return false;
+ }
+ return true;
+ }
+
+ const scopes = this.__get(node);
+
+ if (!scopes || scopes.length === 0) {
+ return null;
+ }
+
+ // Heuristic selection from all scopes.
+ // If you would like to get all scopes, please use ScopeManager#acquireAll.
+ if (scopes.length === 1) {
+ return scopes[0];
+ }
+
+ if (inner) {
+ for (let i = scopes.length - 1; i >= 0; --i) {
+ const scope = scopes[i];
+
+ if (predicate(scope)) {
+ return scope;
+ }
+ }
+ } else {
+ for (let i = 0, iz = scopes.length; i < iz; ++i) {
+ const scope = scopes[i];
+
+ if (predicate(scope)) {
+ return scope;
+ }
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * acquire all scopes from node.
+ * @method ScopeManager#acquireAll
+ * @param {Espree.Node} node - node for the acquired scope.
+ * @returns {Scopes?} Scope array
+ */
+ acquireAll(node) {
+ return this.__get(node);
+ }
+
+ /**
+ * release the node.
+ * @method ScopeManager#release
+ * @param {Espree.Node} node - releasing node.
+ * @param {boolean=} inner - look up the most inner scope, default value is false.
+ * @returns {Scope?} upper scope for the node.
+ */
+ release(node, inner) {
+ const scopes = this.__get(node);
+
+ if (scopes && scopes.length) {
+ const scope = scopes[0].upper;
+
+ if (!scope) {
+ return null;
+ }
+ return this.acquire(scope.block, inner);
+ }
+ return null;
+ }
+
+ attach() { } // eslint-disable-line class-methods-use-this
+
+ detach() { } // eslint-disable-line class-methods-use-this
+
+ __nestScope(scope) {
+ if (scope instanceof GlobalScope) {
+ assert(this.__currentScope === null);
+ this.globalScope = scope;
+ }
+ this.__currentScope = scope;
+ return scope;
+ }
+
+ __nestGlobalScope(node) {
+ return this.__nestScope(new GlobalScope(this, node));
+ }
+
+ __nestBlockScope(node) {
+ return this.__nestScope(new BlockScope(this, this.__currentScope, node));
+ }
+
+ __nestFunctionScope(node, isMethodDefinition) {
+ return this.__nestScope(new FunctionScope(this, this.__currentScope, node, isMethodDefinition));
+ }
+
+ __nestForScope(node) {
+ return this.__nestScope(new ForScope(this, this.__currentScope, node));
+ }
+
+ __nestCatchScope(node) {
+ return this.__nestScope(new CatchScope(this, this.__currentScope, node));
+ }
+
+ __nestWithScope(node) {
+ return this.__nestScope(new WithScope(this, this.__currentScope, node));
+ }
+
+ __nestClassScope(node) {
+ return this.__nestScope(new ClassScope(this, this.__currentScope, node));
+ }
+
+ __nestSwitchScope(node) {
+ return this.__nestScope(new SwitchScope(this, this.__currentScope, node));
+ }
+
+ __nestModuleScope(node) {
+ return this.__nestScope(new ModuleScope(this, this.__currentScope, node));
+ }
+
+ __nestTDZScope(node) {
+ return this.__nestScope(new TDZScope(this, this.__currentScope, node));
+ }
+
+ __nestFunctionExpressionNameScope(node) {
+ return this.__nestScope(new FunctionExpressionNameScope(this, this.__currentScope, node));
+ }
+
+ __isES6() {
+ return this.__options.ecmaVersion >= 6;
+ }
+}
+
+module.exports = ScopeManager;
+
+/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/node_modules/eslint/node_modules/eslint-scope/lib/scope.js b/tools/node_modules/eslint/node_modules/eslint-scope/lib/scope.js
new file mode 100644
index 0000000000..3307a36ade
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/eslint-scope/lib/scope.js
@@ -0,0 +1,722 @@
+/*
+ Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>
+
+ 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.
+
+ 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 <COPYRIGHT HOLDER> 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.
+*/
+"use strict";
+
+/* eslint-disable no-underscore-dangle */
+/* eslint-disable no-undefined */
+
+const Syntax = require("estraverse").Syntax;
+
+const Reference = require("./reference");
+const Variable = require("./variable");
+const Definition = require("./definition").Definition;
+const assert = require("assert");
+
+/**
+ * Test if scope is struct
+ * @param {Scope} scope - scope
+ * @param {Block} block - block
+ * @param {boolean} isMethodDefinition - is method definiton
+ * @param {boolean} useDirective - use directive
+ * @returns {boolean} is strict scope
+ */
+function isStrictScope(scope, block, isMethodDefinition, useDirective) {
+ let body;
+
+ // When upper scope is exists and strict, inner scope is also strict.
+ if (scope.upper && scope.upper.isStrict) {
+ return true;
+ }
+
+ // ArrowFunctionExpression's scope is always strict scope.
+ if (block.type === Syntax.ArrowFunctionExpression) {
+ return true;
+ }
+
+ if (isMethodDefinition) {
+ return true;
+ }
+
+ if (scope.type === "class" || scope.type === "module") {
+ return true;
+ }
+
+ if (scope.type === "block" || scope.type === "switch") {
+ return false;
+ }
+
+ if (scope.type === "function") {
+ if (block.type === Syntax.Program) {
+ body = block;
+ } else {
+ body = block.body;
+ }
+
+ if (!body) {
+ return false;
+ }
+ } else if (scope.type === "global") {
+ body = block;
+ } else {
+ return false;
+ }
+
+ // Search 'use strict' directive.
+ if (useDirective) {
+ for (let i = 0, iz = body.body.length; i < iz; ++i) {
+ const stmt = body.body[i];
+
+ if (stmt.type !== Syntax.DirectiveStatement) {
+ break;
+ }
+ if (stmt.raw === "\"use strict\"" || stmt.raw === "'use strict'") {
+ return true;
+ }
+ }
+ } else {
+ for (let i = 0, iz = body.body.length; i < iz; ++i) {
+ const stmt = body.body[i];
+
+ if (stmt.type !== Syntax.ExpressionStatement) {
+ break;
+ }
+ const expr = stmt.expression;
+
+ if (expr.type !== Syntax.Literal || typeof expr.value !== "string") {
+ break;
+ }
+ if (expr.raw !== null && expr.raw !== undefined) {
+ if (expr.raw === "\"use strict\"" || expr.raw === "'use strict'") {
+ return true;
+ }
+ } else {
+ if (expr.value === "use strict") {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+}
+
+/**
+ * Register scope
+ * @param {ScopeManager} scopeManager - scope manager
+ * @param {Scope} scope - scope
+ * @returns {void}
+ */
+function registerScope(scopeManager, scope) {
+ scopeManager.scopes.push(scope);
+
+ const scopes = scopeManager.__nodeToScope.get(scope.block);
+
+ if (scopes) {
+ scopes.push(scope);
+ } else {
+ scopeManager.__nodeToScope.set(scope.block, [scope]);
+ }
+}
+
+/**
+ * Should be statically
+ * @param {Object} def - def
+ * @returns {boolean} should be statically
+ */
+function shouldBeStatically(def) {
+ return (
+ (def.type === Variable.ClassName) ||
+ (def.type === Variable.Variable && def.parent.kind !== "var")
+ );
+}
+
+/**
+ * @class Scope
+ */
+class Scope {
+ constructor(scopeManager, type, upperScope, block, isMethodDefinition) {
+
+ /**
+ * One of 'TDZ', 'module', 'block', 'switch', 'function', 'catch', 'with', 'function', 'class', 'global'.
+ * @member {String} Scope#type
+ */
+ this.type = type;
+
+ /**
+ * The scoped {@link Variable}s of this scope, as <code>{ Variable.name
+ * : Variable }</code>.
+ * @member {Map} Scope#set
+ */
+ this.set = new Map();
+
+ /**
+ * The tainted variables of this scope, as <code>{ Variable.name :
+ * boolean }</code>.
+ * @member {Map} Scope#taints */
+ this.taints = new Map();
+
+ /**
+ * Generally, through the lexical scoping of JS you can always know
+ * which variable an identifier in the source code refers to. There are
+ * a few exceptions to this rule. With 'global' and 'with' scopes you
+ * can only decide at runtime which variable a reference refers to.
+ * Moreover, if 'eval()' is used in a scope, it might introduce new
+ * bindings in this or its parent scopes.
+ * All those scopes are considered 'dynamic'.
+ * @member {boolean} Scope#dynamic
+ */
+ this.dynamic = this.type === "global" || this.type === "with";
+
+ /**
+ * A reference to the scope-defining syntax node.
+ * @member {espree.Node} Scope#block
+ */
+ this.block = block;
+
+ /**
+ * The {@link Reference|references} that are not resolved with this scope.
+ * @member {Reference[]} Scope#through
+ */
+ this.through = [];
+
+ /**
+ * The scoped {@link Variable}s of this scope. In the case of a
+ * 'function' scope this includes the automatic argument <em>arguments</em> as
+ * its first element, as well as all further formal arguments.
+ * @member {Variable[]} Scope#variables
+ */
+ this.variables = [];
+
+ /**
+ * Any variable {@link Reference|reference} found in this scope. This
+ * includes occurrences of local variables as well as variables from
+ * parent scopes (including the global scope). For local variables
+ * this also includes defining occurrences (like in a 'var' statement).
+ * In a 'function' scope this does not include the occurrences of the
+ * formal parameter in the parameter list.
+ * @member {Reference[]} Scope#references
+ */
+ this.references = [];
+
+ /**
+ * For 'global' and 'function' scopes, this is a self-reference. For
+ * other scope types this is the <em>variableScope</em> value of the
+ * parent scope.
+ * @member {Scope} Scope#variableScope
+ */
+ this.variableScope =
+ (this.type === "global" || this.type === "function" || this.type === "module") ? this : upperScope.variableScope;
+
+ /**
+ * Whether this scope is created by a FunctionExpression.
+ * @member {boolean} Scope#functionExpressionScope
+ */
+ this.functionExpressionScope = false;
+
+ /**
+ * Whether this is a scope that contains an 'eval()' invocation.
+ * @member {boolean} Scope#directCallToEvalScope
+ */
+ this.directCallToEvalScope = false;
+
+ /**
+ * @member {boolean} Scope#thisFound
+ */
+ this.thisFound = false;
+
+ this.__left = [];
+
+ /**
+ * Reference to the parent {@link Scope|scope}.
+ * @member {Scope} Scope#upper
+ */
+ this.upper = upperScope;
+
+ /**
+ * Whether 'use strict' is in effect in this scope.
+ * @member {boolean} Scope#isStrict
+ */
+ this.isStrict = isStrictScope(this, block, isMethodDefinition, scopeManager.__useDirective());
+
+ /**
+ * List of nested {@link Scope}s.
+ * @member {Scope[]} Scope#childScopes
+ */
+ this.childScopes = [];
+ if (this.upper) {
+ this.upper.childScopes.push(this);
+ }
+
+ this.__declaredVariables = scopeManager.__declaredVariables;
+
+ registerScope(scopeManager, this);
+ }
+
+ __shouldStaticallyClose(scopeManager) {
+ return (!this.dynamic || scopeManager.__isOptimistic());
+ }
+
+ __shouldStaticallyCloseForGlobal(ref) {
+
+ // On global scope, let/const/class declarations should be resolved statically.
+ const name = ref.identifier.name;
+
+ if (!this.set.has(name)) {
+ return false;
+ }
+
+ const variable = this.set.get(name);
+ const defs = variable.defs;
+
+ return defs.length > 0 && defs.every(shouldBeStatically);
+ }
+
+ __staticCloseRef(ref) {
+ if (!this.__resolve(ref)) {
+ this.__delegateToUpperScope(ref);
+ }
+ }
+
+ __dynamicCloseRef(ref) {
+
+ // notify all names are through to global
+ let current = this;
+
+ do {
+ current.through.push(ref);
+ current = current.upper;
+ } while (current);
+ }
+
+ __globalCloseRef(ref) {
+
+ // let/const/class declarations should be resolved statically.
+ // others should be resolved dynamically.
+ if (this.__shouldStaticallyCloseForGlobal(ref)) {
+ this.__staticCloseRef(ref);
+ } else {
+ this.__dynamicCloseRef(ref);
+ }
+ }
+
+ __close(scopeManager) {
+ let closeRef;
+
+ if (this.__shouldStaticallyClose(scopeManager)) {
+ closeRef = this.__staticCloseRef;
+ } else if (this.type !== "global") {
+ closeRef = this.__dynamicCloseRef;
+ } else {
+ closeRef = this.__globalCloseRef;
+ }
+
+ // Try Resolving all references in this scope.
+ for (let i = 0, iz = this.__left.length; i < iz; ++i) {
+ const ref = this.__left[i];
+
+ closeRef.call(this, ref);
+ }
+ this.__left = null;
+
+ return this.upper;
+ }
+
+ __resolve(ref) {
+ const name = ref.identifier.name;
+
+ if (this.set.has(name)) {
+ const variable = this.set.get(name);
+
+ variable.references.push(ref);
+ variable.stack = variable.stack && ref.from.variableScope === this.variableScope;
+ if (ref.tainted) {
+ variable.tainted = true;
+ this.taints.set(variable.name, true);
+ }
+ ref.resolved = variable;
+ return true;
+ }
+ return false;
+ }
+
+ __delegateToUpperScope(ref) {
+ if (this.upper) {
+ this.upper.__left.push(ref);
+ }
+ this.through.push(ref);
+ }
+
+ __addDeclaredVariablesOfNode(variable, node) {
+ if (node === null || node === undefined) {
+ return;
+ }
+
+ let variables = this.__declaredVariables.get(node);
+
+ if (variables === null || variables === undefined) {
+ variables = [];
+ this.__declaredVariables.set(node, variables);
+ }
+ if (variables.indexOf(variable) === -1) {
+ variables.push(variable);
+ }
+ }
+
+ __defineGeneric(name, set, variables, node, def) {
+ let variable;
+
+ variable = set.get(name);
+ if (!variable) {
+ variable = new Variable(name, this);
+ set.set(name, variable);
+ variables.push(variable);
+ }
+
+ if (def) {
+ variable.defs.push(def);
+ if (def.type !== Variable.TDZ) {
+ this.__addDeclaredVariablesOfNode(variable, def.node);
+ this.__addDeclaredVariablesOfNode(variable, def.parent);
+ }
+ }
+ if (node) {
+ variable.identifiers.push(node);
+ }
+ }
+
+ __define(node, def) {
+ if (node && node.type === Syntax.Identifier) {
+ this.__defineGeneric(
+ node.name,
+ this.set,
+ this.variables,
+ node,
+ def);
+ }
+ }
+
+ __referencing(node, assign, writeExpr, maybeImplicitGlobal, partial, init) {
+
+ // because Array element may be null
+ if (!node || node.type !== Syntax.Identifier) {
+ return;
+ }
+
+ // Specially handle like `this`.
+ if (node.name === "super") {
+ return;
+ }
+
+ const ref = new Reference(node, this, assign || Reference.READ, writeExpr, maybeImplicitGlobal, !!partial, !!init);
+
+ this.references.push(ref);
+ this.__left.push(ref);
+ }
+
+ __detectEval() {
+ let current = this;
+
+ this.directCallToEvalScope = true;
+ do {
+ current.dynamic = true;
+ current = current.upper;
+ } while (current);
+ }
+
+ __detectThis() {
+ this.thisFound = true;
+ }
+
+ __isClosed() {
+ return this.__left === null;
+ }
+
+ /**
+ * returns resolved {Reference}
+ * @method Scope#resolve
+ * @param {Espree.Identifier} ident - identifier to be resolved.
+ * @returns {Reference} reference
+ */
+ resolve(ident) {
+ let ref, i, iz;
+
+ assert(this.__isClosed(), "Scope should be closed.");
+ assert(ident.type === Syntax.Identifier, "Target should be identifier.");
+ for (i = 0, iz = this.references.length; i < iz; ++i) {
+ ref = this.references[i];
+ if (ref.identifier === ident) {
+ return ref;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * returns this scope is static
+ * @method Scope#isStatic
+ * @returns {boolean} static
+ */
+ isStatic() {
+ return !this.dynamic;
+ }
+
+ /**
+ * returns this scope has materialized arguments
+ * @method Scope#isArgumentsMaterialized
+ * @returns {boolean} arguemnts materialized
+ */
+ isArgumentsMaterialized() { // eslint-disable-line class-methods-use-this
+ return true;
+ }
+
+ /**
+ * returns this scope has materialized `this` reference
+ * @method Scope#isThisMaterialized
+ * @returns {boolean} this materialized
+ */
+ isThisMaterialized() { // eslint-disable-line class-methods-use-this
+ return true;
+ }
+
+ isUsedName(name) {
+ if (this.set.has(name)) {
+ return true;
+ }
+ for (let i = 0, iz = this.through.length; i < iz; ++i) {
+ if (this.through[i].identifier.name === name) {
+ return true;
+ }
+ }
+ return false;
+ }
+}
+
+class GlobalScope extends Scope {
+ constructor(scopeManager, block) {
+ super(scopeManager, "global", null, block, false);
+ this.implicit = {
+ set: new Map(),
+ variables: [],
+
+ /**
+ * List of {@link Reference}s that are left to be resolved (i.e. which
+ * need to be linked to the variable they refer to).
+ * @member {Reference[]} Scope#implicit#left
+ */
+ left: []
+ };
+ }
+
+ __close(scopeManager) {
+ const implicit = [];
+
+ for (let i = 0, iz = this.__left.length; i < iz; ++i) {
+ const ref = this.__left[i];
+
+ if (ref.__maybeImplicitGlobal && !this.set.has(ref.identifier.name)) {
+ implicit.push(ref.__maybeImplicitGlobal);
+ }
+ }
+
+ // create an implicit global variable from assignment expression
+ for (let i = 0, iz = implicit.length; i < iz; ++i) {
+ const info = implicit[i];
+
+ this.__defineImplicit(info.pattern,
+ new Definition(
+ Variable.ImplicitGlobalVariable,
+ info.pattern,
+ info.node,
+ null,
+ null,
+ null
+ ));
+
+ }
+
+ this.implicit.left = this.__left;
+
+ return super.__close(scopeManager);
+ }
+
+ __defineImplicit(node, def) {
+ if (node && node.type === Syntax.Identifier) {
+ this.__defineGeneric(
+ node.name,
+ this.implicit.set,
+ this.implicit.variables,
+ node,
+ def);
+ }
+ }
+}
+
+class ModuleScope extends Scope {
+ constructor(scopeManager, upperScope, block) {
+ super(scopeManager, "module", upperScope, block, false);
+ }
+}
+
+class FunctionExpressionNameScope extends Scope {
+ constructor(scopeManager, upperScope, block) {
+ super(scopeManager, "function-expression-name", upperScope, block, false);
+ this.__define(block.id,
+ new Definition(
+ Variable.FunctionName,
+ block.id,
+ block,
+ null,
+ null,
+ null
+ ));
+ this.functionExpressionScope = true;
+ }
+}
+
+class CatchScope extends Scope {
+ constructor(scopeManager, upperScope, block) {
+ super(scopeManager, "catch", upperScope, block, false);
+ }
+}
+
+class WithScope extends Scope {
+ constructor(scopeManager, upperScope, block) {
+ super(scopeManager, "with", upperScope, block, false);
+ }
+
+ __close(scopeManager) {
+ if (this.__shouldStaticallyClose(scopeManager)) {
+ return super.__close(scopeManager);
+ }
+
+ for (let i = 0, iz = this.__left.length; i < iz; ++i) {
+ const ref = this.__left[i];
+
+ ref.tainted = true;
+ this.__delegateToUpperScope(ref);
+ }
+ this.__left = null;
+
+ return this.upper;
+ }
+}
+
+class TDZScope extends Scope {
+ constructor(scopeManager, upperScope, block) {
+ super(scopeManager, "TDZ", upperScope, block, false);
+ }
+}
+
+class BlockScope extends Scope {
+ constructor(scopeManager, upperScope, block) {
+ super(scopeManager, "block", upperScope, block, false);
+ }
+}
+
+class SwitchScope extends Scope {
+ constructor(scopeManager, upperScope, block) {
+ super(scopeManager, "switch", upperScope, block, false);
+ }
+}
+
+class FunctionScope extends Scope {
+ constructor(scopeManager, upperScope, block, isMethodDefinition) {
+ super(scopeManager, "function", upperScope, block, isMethodDefinition);
+
+ // section 9.2.13, FunctionDeclarationInstantiation.
+ // NOTE Arrow functions never have an arguments objects.
+ if (this.block.type !== Syntax.ArrowFunctionExpression) {
+ this.__defineArguments();
+ }
+ }
+
+ isArgumentsMaterialized() {
+
+ // TODO(Constellation)
+ // We can more aggressive on this condition like this.
+ //
+ // function t() {
+ // // arguments of t is always hidden.
+ // function arguments() {
+ // }
+ // }
+ if (this.block.type === Syntax.ArrowFunctionExpression) {
+ return false;
+ }
+
+ if (!this.isStatic()) {
+ return true;
+ }
+
+ const variable = this.set.get("arguments");
+
+ assert(variable, "Always have arguments variable.");
+ return variable.tainted || variable.references.length !== 0;
+ }
+
+ isThisMaterialized() {
+ if (!this.isStatic()) {
+ return true;
+ }
+ return this.thisFound;
+ }
+
+ __defineArguments() {
+ this.__defineGeneric(
+ "arguments",
+ this.set,
+ this.variables,
+ null,
+ null);
+ this.taints.set("arguments", true);
+ }
+}
+
+class ForScope extends Scope {
+ constructor(scopeManager, upperScope, block) {
+ super(scopeManager, "for", upperScope, block, false);
+ }
+}
+
+class ClassScope extends Scope {
+ constructor(scopeManager, upperScope, block) {
+ super(scopeManager, "class", upperScope, block, false);
+ }
+}
+
+module.exports = {
+ Scope,
+ GlobalScope,
+ ModuleScope,
+ FunctionExpressionNameScope,
+ CatchScope,
+ WithScope,
+ TDZScope,
+ BlockScope,
+ SwitchScope,
+ FunctionScope,
+ ForScope,
+ ClassScope
+};
+
+/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/node_modules/eslint/node_modules/eslint-scope/lib/variable.js b/tools/node_modules/eslint/node_modules/eslint-scope/lib/variable.js
new file mode 100644
index 0000000000..6373209914
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/eslint-scope/lib/variable.js
@@ -0,0 +1,89 @@
+/*
+ Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>
+
+ 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.
+
+ 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 <COPYRIGHT HOLDER> 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.
+*/
+"use strict";
+
+/**
+ * A Variable represents a locally scoped identifier. These include arguments to
+ * functions.
+ * @class Variable
+ */
+class Variable {
+ constructor(name, scope) {
+
+ /**
+ * The variable name, as given in the source code.
+ * @member {String} Variable#name
+ */
+ this.name = name;
+
+ /**
+ * List of defining occurrences of this variable (like in 'var ...'
+ * statements or as parameter), as AST nodes.
+ * @member {espree.Identifier[]} Variable#identifiers
+ */
+ this.identifiers = [];
+
+ /**
+ * List of {@link Reference|references} of this variable (excluding parameter entries)
+ * in its defining scope and all nested scopes. For defining
+ * occurrences only see {@link Variable#defs}.
+ * @member {Reference[]} Variable#references
+ */
+ this.references = [];
+
+ /**
+ * List of defining occurrences of this variable (like in 'var ...'
+ * statements or as parameter), as custom objects.
+ * @member {Definition[]} Variable#defs
+ */
+ this.defs = [];
+
+ this.tainted = false;
+
+ /**
+ * Whether this is a stack variable.
+ * @member {boolean} Variable#stack
+ */
+ this.stack = true;
+
+ /**
+ * Reference to the enclosing Scope.
+ * @member {Scope} Variable#scope
+ */
+ this.scope = scope;
+ }
+}
+
+Variable.CatchClause = "CatchClause";
+Variable.Parameter = "Parameter";
+Variable.FunctionName = "FunctionName";
+Variable.ClassName = "ClassName";
+Variable.Variable = "Variable";
+Variable.ImportBinding = "ImportBinding";
+Variable.TDZ = "TDZ";
+Variable.ImplicitGlobalVariable = "ImplicitGlobalVariable";
+
+module.exports = Variable;
+
+/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/node_modules/eslint/node_modules/eslint-scope/package.json b/tools/node_modules/eslint/node_modules/eslint-scope/package.json
new file mode 100644
index 0000000000..ac5a958ddc
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/eslint-scope/package.json
@@ -0,0 +1,74 @@
+{
+ "_from": "eslint-scope@^3.7.1",
+ "_id": "eslint-scope@3.7.1",
+ "_inBundle": false,
+ "_integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=",
+ "_location": "/eslint/eslint-scope",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "eslint-scope@^3.7.1",
+ "name": "eslint-scope",
+ "escapedName": "eslint-scope",
+ "rawSpec": "^3.7.1",
+ "saveSpec": null,
+ "fetchSpec": "^3.7.1"
+ },
+ "_requiredBy": [
+ "/eslint"
+ ],
+ "_resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz",
+ "_shasum": "3d63c3edfda02e06e01a452ad88caacc7cdcb6e8",
+ "_spec": "eslint-scope@^3.7.1",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint",
+ "bugs": {
+ "url": "https://github.com/eslint/eslint-scope/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "esrecurse": "^4.1.0",
+ "estraverse": "^4.1.1"
+ },
+ "deprecated": false,
+ "description": "ECMAScript scope analyzer for ESLint",
+ "devDependencies": {
+ "chai": "^3.4.1",
+ "eslint": "^3.15.0",
+ "eslint-config-eslint": "^4.0.0",
+ "eslint-release": "^0.10.1",
+ "espree": "^3.1.1",
+ "istanbul": "^0.4.5",
+ "mocha": "^3.2.0",
+ "npm-license": "^0.3.3",
+ "shelljs": "^0.7.6",
+ "typescript": "~2.0.10",
+ "typescript-eslint-parser": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=4.0.0"
+ },
+ "files": [
+ "LICENSE",
+ "README.md",
+ "lib"
+ ],
+ "homepage": "http://github.com/eslint/eslint-scope",
+ "license": "BSD-2-Clause",
+ "main": "lib/index.js",
+ "name": "eslint-scope",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/eslint/eslint-scope.git"
+ },
+ "scripts": {
+ "alpharelease": "eslint-prerelease alpha",
+ "betarelease": "eslint-prerelease beta",
+ "ci-release": "eslint-ci-release",
+ "gh-release": "eslint-gh-release",
+ "lint": "node Makefile.js lint",
+ "release": "eslint-release",
+ "test": "node Makefile.js test"
+ },
+ "version": "3.7.1"
+}
diff --git a/tools/node_modules/eslint/node_modules/espree/LICENSE b/tools/node_modules/eslint/node_modules/espree/LICENSE
new file mode 100644
index 0000000000..321d960740
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/espree/LICENSE
@@ -0,0 +1,22 @@
+Espree
+Copyright JS Foundation and other contributors, https://js.foundation
+
+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.
+
+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 <COPYRIGHT HOLDER> 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/tools/node_modules/eslint/node_modules/espree/README.md b/tools/node_modules/eslint/node_modules/espree/README.md
new file mode 100644
index 0000000000..75205cf472
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/espree/README.md
@@ -0,0 +1,155 @@
+[![npm version](https://img.shields.io/npm/v/espree.svg)](https://www.npmjs.com/package/espree)
+[![Build Status](https://travis-ci.org/eslint/espree.svg?branch=master)](https://travis-ci.org/eslint/espree)
+[![npm downloads](https://img.shields.io/npm/dm/espree.svg)](https://www.npmjs.com/package/espree)
+[![Bountysource](https://www.bountysource.com/badge/tracker?tracker_id=9348450)](https://www.bountysource.com/trackers/9348450-eslint?utm_source=9348450&utm_medium=shield&utm_campaign=TRACKER_BADGE)
+
+# Espree
+
+Espree started out as a fork of [Esprima](http://esprima.org) v1.2.2, the last stable published released of Esprima before work on ECMAScript 6 began. Espree is now built on top of [Acorn](https://github.com/ternjs/acorn), which has a modular architecture that allows extension of core functionality. The goal of Espree is to produce output that is similar to Esprima with a similar API so that it can be used in place of Esprima.
+
+## Usage
+
+Install:
+
+```
+npm i espree --save
+```
+
+And in your Node.js code:
+
+```javascript
+var espree = require("espree");
+
+var ast = espree.parse(code);
+```
+
+There is a second argument to `parse()` that allows you to specify various options:
+
+```javascript
+var espree = require("espree");
+
+// Optional second options argument with the following default settings
+var ast = espree.parse(code, {
+
+ // attach range information to each node
+ range: false,
+
+ // attach line/column location information to each node
+ loc: false,
+
+ // create a top-level comments array containing all comments
+ comment: false,
+
+ // attach comments to the closest relevant node as leadingComments and trailingComments
+ attachComment: false,
+
+ // create a top-level tokens array containing all tokens
+ tokens: false,
+
+ // Set to 3, 5 (default), 6, 7, 8, or 9 to specify the version of ECMAScript syntax you want to use.
+ // You can also set to 2015 (same as 6), 2016 (same as 7), 2017 (same as 8), or 2018 (same as 9) to use the year-based naming.
+ ecmaVersion: 5,
+
+ // specify which type of script you're parsing ("script" or "module")
+ sourceType: "script",
+
+ // specify additional language features
+ ecmaFeatures: {
+
+ // enable JSX parsing
+ jsx: false,
+
+ // enable return in global scope
+ globalReturn: false,
+
+ // enable implied strict mode (if ecmaVersion >= 5)
+ impliedStrict: false,
+
+ // allow experimental object rest/spread
+ experimentalObjectRestSpread: false
+ }
+});
+```
+
+## Esprima Compatibility Going Forward
+
+The primary goal is to produce the exact same AST structure and tokens as Esprima, and that takes precedence over anything else. (The AST structure being the [ESTree](https://github.com/estree/estree) API with JSX extensions.) Separate from that, Espree may deviate from what Esprima outputs in terms of where and how comments are attached, as well as what additional information is available on AST nodes. That is to say, Espree may add more things to the AST nodes than Esprima does but the overall AST structure produced will be the same.
+
+Espree may also deviate from Esprima in the interface it exposes.
+
+## Contributing
+
+Issues and pull requests will be triaged and responded to as quickly as possible. We operate under the [ESLint Contributor Guidelines](http://eslint.org/docs/developer-guide/contributing), so please be sure to read them before contributing. If you're not sure where to dig in, check out the [issues](https://github.com/eslint/espree/issues).
+
+Espree is licensed under a permissive BSD 2-clause license.
+
+## Build Commands
+
+* `npm test` - run all linting and tests
+* `npm run lint` - run all linting
+* `npm run browserify` - creates a version of Espree that is usable in a browser
+
+## Differences from Espree 2.x
+
+* The `tokenize()` method does not use `ecmaFeatures`. Any string will be tokenized completely based on ECMAScript 6 semantics.
+* Trailing whitespace no longer is counted as part of a node.
+* `let` and `const` declarations are no longer parsed by default. You must opt-in by using an `ecmaVersion` newer than `5` or setting `sourceType` to `module`.
+* The `esparse` and `esvalidate` binary scripts have been removed.
+* There is no `tolerant` option. We will investigate adding this back in the future.
+
+## Known Incompatibilities
+
+In an effort to help those wanting to transition from other parsers to Espree, the following is a list of noteworthy incompatibilities with other parsers. These are known differences that we do not intend to change.
+
+### Esprima 1.2.2
+
+* Esprima counts trailing whitespace as part of each AST node while Espree does not. In Espree, the end of a node is where the last token occurs.
+* Espree does not parse `let` and `const` declarations by default.
+* Error messages returned for parsing errors are different.
+* There are two addition properties on every node and token: `start` and `end`. These represent the same data as `range` and are used internally by Acorn.
+
+### Esprima 2.x
+
+* Esprima 2.x uses a different comment attachment algorithm that results in some comments being added in different places than Espree. The algorithm Espree uses is the same one used in Esprima 1.2.2.
+
+## Frequently Asked Questions
+
+### Why another parser
+
+[ESLint](http://eslint.org) had been relying on Esprima as its parser from the beginning. While that was fine when the JavaScript language was evolving slowly, the pace of development increased dramatically and Esprima had fallen behind. ESLint, like many other tools reliant on Esprima, has been stuck in using new JavaScript language features until Esprima updates, and that caused our users frustration.
+
+We decided the only way for us to move forward was to create our own parser, bringing us inline with JSHint and JSLint, and allowing us to keep implementing new features as we need them. We chose to fork Esprima instead of starting from scratch in order to move as quickly as possible with a compatible API.
+
+With Espree 2.0.0, we are no longer a fork of Esprima but rather a translation layer between Acorn and Esprima syntax. This allows us to put work back into a community-supported parser (Acorn) that is continuing to grow and evolve while maintaining an Esprima-compatible parser for those utilities still built on Esprima.
+
+### Have you tried working with Esprima?
+
+Yes. Since the start of ESLint, we've regularly filed bugs and feature requests with Esprima and will continue to do so. However, there are some different philosophies around how the projects work that need to be worked through. The initial goal was to have Espree track Esprima and eventually merge the two back together, but we ultimately decided that building on top of Acorn was a better choice due to Acorn's plugin support.
+
+### Why don't you just use Acorn?
+
+Acorn is a great JavaScript parser that produces an AST that is compatible with Esprima. Unfortunately, ESLint relies on more than just the AST to do its job. It relies on Esprima's tokens and comment attachment features to get a complete picture of the source code. We investigated switching to Acorn, but the inconsistencies between Esprima and Acorn created too much work for a project like ESLint.
+
+We are building on top of Acorn, however, so that we can contribute back and help make Acorn even better.
+
+### What ECMAScript 6 features do you support?
+
+All of them.
+
+### What ECMAScript 7/2016 features do you support?
+
+There is only one ECMAScript 2016 syntax change: the exponentiation operator. Espree supports this.
+
+### What ECMAScript 2017 features do you support?
+
+There are two ECMAScript 2017 syntax changes: `async` functions, and trailing commas in function declarations and calls. Espree supports both of them.
+
+### What ECMAScript 2018 features do you support?
+
+Because ECMAScript 2018 is still under development, we are implementing features as they are finalized. Currently, Espree supports:
+
+* Invalid escape sequences in tagged template literals
+
+### How do you determine which experimental features to support?
+
+In general, we do not support experimental JavaScript features. We may make exceptions from time to time depending on the maturity of the features.
diff --git a/tools/node_modules/eslint/node_modules/espree/espree.js b/tools/node_modules/eslint/node_modules/espree/espree.js
new file mode 100644
index 0000000000..b2f0a185bd
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/espree/espree.js
@@ -0,0 +1,799 @@
+/**
+ * @fileoverview Main Espree file that converts Acorn into Esprima output.
+ *
+ * This file contains code from the following MIT-licensed projects:
+ * 1. Acorn
+ * 2. Babylon
+ * 3. Babel-ESLint
+ *
+ * This file also contains code from Esprima, which is BSD licensed.
+ *
+ * Acorn is Copyright 2012-2015 Acorn Contributors (https://github.com/marijnh/acorn/blob/master/AUTHORS)
+ * Babylon is Copyright 2014-2015 various contributors (https://github.com/babel/babel/blob/master/packages/babylon/AUTHORS)
+ * Babel-ESLint is Copyright 2014-2015 Sebastian McKenzie <sebmck@gmail.com>
+ *
+ * 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.
+ *
+ * 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 <COPYRIGHT HOLDER> 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.
+ *
+ * Esprima is Copyright (c) jQuery Foundation, Inc. and 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.
+ *
+ * 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 <COPYRIGHT HOLDER> 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.
+ */
+/* eslint no-undefined:0, no-use-before-define: 0 */
+
+"use strict";
+
+var astNodeTypes = require("./lib/ast-node-types"),
+ commentAttachment = require("./lib/comment-attachment"),
+ TokenTranslator = require("./lib/token-translator"),
+ acornJSX = require("acorn-jsx/inject"),
+ rawAcorn = require("acorn");
+
+
+var acorn = acornJSX(rawAcorn);
+var DEFAULT_ECMA_VERSION = 5;
+var lookahead,
+ extra,
+ lastToken;
+
+/**
+ * Object.assign polyfill for Node < 4
+ * @param {Object} target The target object
+ * @param {...Object} sources Sources for the object
+ * @returns {Object} `target` after being mutated
+ */
+var assign = Object.assign || function assign(target) {
+ for (var argIndex = 1; argIndex < arguments.length; argIndex++) {
+ if (arguments[argIndex] !== null && typeof arguments[argIndex] === "object") {
+ var keys = Object.keys(arguments[argIndex]);
+
+ for (var keyIndex = 0; keyIndex < keys.length; keyIndex++) {
+ target[keys[keyIndex]] = arguments[argIndex][keys[keyIndex]];
+ }
+ }
+ }
+
+ return target;
+};
+
+/**
+ * Resets the extra object to its default.
+ * @returns {void}
+ * @private
+ */
+function resetExtra() {
+ extra = {
+ tokens: null,
+ range: false,
+ loc: false,
+ comment: false,
+ comments: [],
+ tolerant: false,
+ errors: [],
+ strict: false,
+ ecmaFeatures: {},
+ ecmaVersion: DEFAULT_ECMA_VERSION,
+ isModule: false
+ };
+}
+
+
+
+var tt = acorn.tokTypes,
+ getLineInfo = acorn.getLineInfo;
+
+// custom type for JSX attribute values
+tt.jsxAttrValueToken = {};
+
+/**
+ * Normalize ECMAScript version from the initial config
+ * @param {number} ecmaVersion ECMAScript version from the initial config
+ * @returns {number} normalized ECMAScript version
+ */
+function normalizeEcmaVersion(ecmaVersion) {
+ if (typeof ecmaVersion === "number") {
+ var version = ecmaVersion;
+
+ // Calculate ECMAScript edition number from official year version starting with
+ // ES2015, which corresponds with ES6 (or a difference of 2009).
+ if (version >= 2015) {
+ version -= 2009;
+ }
+
+ switch (version) {
+ case 3:
+ case 5:
+ case 6:
+ case 7:
+ case 8:
+ case 9:
+ return version;
+
+ default:
+ throw new Error("Invalid ecmaVersion.");
+ }
+ } else {
+ return DEFAULT_ECMA_VERSION;
+ }
+}
+
+/**
+ * Determines if a node is valid given the set of ecmaFeatures.
+ * @param {ASTNode} node The node to check.
+ * @returns {boolean} True if the node is allowed, false if not.
+ * @private
+ */
+function isValidNode(node) {
+ var ecma = extra.ecmaFeatures;
+
+ switch (node.type) {
+ case "ExperimentalSpreadProperty":
+ case "ExperimentalRestProperty":
+ return ecma.experimentalObjectRestSpread;
+
+ case "ImportDeclaration":
+ case "ExportNamedDeclaration":
+ case "ExportDefaultDeclaration":
+ case "ExportAllDeclaration":
+ return extra.isModule;
+
+ default:
+ return true;
+ }
+}
+
+/**
+ * Performs last-minute Esprima-specific compatibility checks and fixes.
+ * @param {ASTNode} result The node to check.
+ * @returns {ASTNode} The finished node.
+ * @private
+ * @this acorn.Parser
+ */
+function esprimaFinishNode(result) {
+ // ensure that parsed node was allowed through ecmaFeatures
+ if (!isValidNode(result)) {
+ this.unexpected(result.start);
+ }
+
+ // https://github.com/marijnh/acorn/issues/323
+ if (result.type === "TryStatement") {
+ delete result.guardedHandlers;
+ } else if (result.type === "CatchClause") {
+ delete result.guard;
+ }
+
+ // Acorn doesn't count the opening and closing backticks as part of templates
+ // so we have to adjust ranges/locations appropriately.
+ if (result.type === "TemplateElement") {
+
+ // additional adjustment needed if ${ is the last token
+ var terminalDollarBraceL = this.input.slice(result.end, result.end + 2) === "${";
+
+ if (result.range) {
+ result.range[0]--;
+ result.range[1] += (terminalDollarBraceL ? 2 : 1);
+ }
+
+ if (result.loc) {
+ result.loc.start.column--;
+ result.loc.end.column += (terminalDollarBraceL ? 2 : 1);
+ }
+ }
+
+ // Acorn uses undefined instead of null, which affects serialization
+ if (result.type === "Literal" && result.value === undefined) {
+ result.value = null;
+ }
+
+ if (extra.attachComment) {
+ commentAttachment.processComment(result);
+ }
+
+ if (result.type.indexOf("Function") > -1 && !result.generator) {
+ result.generator = false;
+ }
+
+ return result;
+}
+
+/**
+ * Determines if a token is valid given the set of ecmaFeatures.
+ * @param {acorn.Parser} parser The parser to check.
+ * @returns {boolean} True if the token is allowed, false if not.
+ * @private
+ */
+function isValidToken(parser) {
+ var ecma = extra.ecmaFeatures;
+ var type = parser.type;
+
+ switch (type) {
+ case tt.jsxName:
+ case tt.jsxText:
+ case tt.jsxTagStart:
+ case tt.jsxTagEnd:
+ return ecma.jsx;
+
+ // https://github.com/ternjs/acorn/issues/363
+ case tt.regexp:
+ if (extra.ecmaVersion < 6 && parser.value.flags && parser.value.flags.indexOf("y") > -1) {
+ return false;
+ }
+
+ return true;
+
+ default:
+ return true;
+ }
+}
+
+/**
+ * Injects esprimaFinishNode into the finishNode process.
+ * @param {Function} finishNode Original finishNode function.
+ * @returns {ASTNode} The finished node.
+ * @private
+ */
+function wrapFinishNode(finishNode) {
+ return /** @this acorn.Parser */ function(node, type, pos, loc) {
+ var result = finishNode.call(this, node, type, pos, loc);
+ return esprimaFinishNode.call(this, result);
+ };
+}
+
+acorn.plugins.espree = function(instance) {
+
+ instance.extend("finishNode", wrapFinishNode);
+
+ instance.extend("finishNodeAt", wrapFinishNode);
+
+ instance.extend("next", function(next) {
+ return /** @this acorn.Parser */ function() {
+ if (!isValidToken(this)) {
+ this.unexpected();
+ }
+ return next.call(this);
+ };
+ });
+
+ // needed for experimental object rest/spread
+ instance.extend("checkLVal", function(checkLVal) {
+
+ return /** @this acorn.Parser */ function(expr, isBinding, checkClashes) {
+
+ if (extra.ecmaFeatures.experimentalObjectRestSpread && expr.type === "ObjectPattern") {
+ for (var i = 0; i < expr.properties.length; i++) {
+ if (expr.properties[i].type.indexOf("Experimental") === -1) {
+ this.checkLVal(expr.properties[i].value, isBinding, checkClashes);
+ }
+ }
+ return undefined;
+ }
+
+ return checkLVal.call(this, expr, isBinding, checkClashes);
+ };
+ });
+
+ instance.extend("parseTopLevel", function(parseTopLevel) {
+ return /** @this acorn.Parser */ function(node) {
+ if (extra.ecmaFeatures.impliedStrict && this.options.ecmaVersion >= 5) {
+ this.strict = true;
+ }
+ return parseTopLevel.call(this, node);
+ };
+ });
+
+ instance.extend("toAssignable", function(toAssignable) {
+
+ return /** @this acorn.Parser */ function(node, isBinding) {
+
+ if (extra.ecmaFeatures.experimentalObjectRestSpread &&
+ node.type === "ObjectExpression"
+ ) {
+ node.type = "ObjectPattern";
+
+ for (var i = 0; i < node.properties.length; i++) {
+ var prop = node.properties[i];
+
+ if (prop.type === "ExperimentalSpreadProperty") {
+ prop.type = "ExperimentalRestProperty";
+ } else if (prop.kind !== "init") {
+ this.raise(prop.key.start, "Object pattern can't contain getter or setter");
+ } else {
+ this.toAssignable(prop.value, isBinding);
+ }
+ }
+
+ return node;
+ } else {
+ return toAssignable.call(this, node, isBinding);
+ }
+ };
+
+ });
+
+ /**
+ * Method to parse an object rest or object spread.
+ * @returns {ASTNode} The node representing object rest or object spread.
+ * @this acorn.Parser
+ */
+ instance.parseObjectRest = function() {
+ var node = this.startNode();
+ this.next();
+ node.argument = this.parseIdent();
+
+ if (this.type === tt.comma) {
+ this.raise(this.start, "Unexpected trailing comma after rest property");
+ }
+
+ return this.finishNode(node, "ExperimentalRestProperty");
+ };
+
+ instance.extend("parseProperty", function(parseProperty) {
+ /**
+ * Override `parseProperty` method to parse rest/spread properties.
+ * @param {boolean} isPattern True if the object is a destructuring pattern.
+ * @param {Object} refDestructuringErrors ?
+ * @returns {ASTNode} The node representing a rest/spread property.
+ * @this acorn.Parser
+ */
+ return function(isPattern, refDestructuringErrors) {
+ if (extra.ecmaFeatures.experimentalObjectRestSpread && this.type === tt.ellipsis) {
+ var prop;
+
+ if (isPattern) {
+ prop = this.parseObjectRest();
+ } else {
+ prop = this.parseSpread();
+ prop.type = "ExperimentalSpreadProperty";
+ }
+
+ return prop;
+ }
+
+ return parseProperty.call(this, isPattern, refDestructuringErrors);
+ };
+ });
+
+ instance.extend("checkPropClash", function(checkPropClash) {
+ /**
+ * Override `checkPropClash` method to avoid clash on rest/spread properties.
+ * @param {ASTNode} prop A property node to check.
+ * @param {Object} propHash Names map.
+ * @returns {void}
+ * @this acorn.Parser
+ */
+ return function(prop, propHash) {
+ if (prop.type === "ExperimentalRestProperty" || prop.type === "ExperimentalSpreadProperty") {
+ return;
+ }
+ checkPropClash.call(this, prop, propHash);
+ };
+ });
+
+ /**
+ * Overwrites the default raise method to throw Esprima-style errors.
+ * @param {int} pos The position of the error.
+ * @param {string} message The error message.
+ * @throws {SyntaxError} A syntax error.
+ * @returns {void}
+ */
+ instance.raise = instance.raiseRecoverable = function(pos, message) {
+ var loc = getLineInfo(this.input, pos);
+ var err = new SyntaxError(message);
+ err.index = pos;
+ err.lineNumber = loc.line;
+ err.column = loc.column + 1; // acorn uses 0-based columns
+ throw err;
+ };
+
+ /**
+ * Overwrites the default unexpected method to throw Esprima-style errors.
+ * @param {int} pos The position of the error.
+ * @throws {SyntaxError} A syntax error.
+ * @returns {void}
+ */
+ instance.unexpected = function(pos) {
+ var message = "Unexpected token";
+
+ if (pos !== null && pos !== undefined) {
+ this.pos = pos;
+
+ if (this.options.locations) {
+ while (this.pos < this.lineStart) {
+ this.lineStart = this.input.lastIndexOf("\n", this.lineStart - 2) + 1;
+ --this.curLine;
+ }
+ }
+
+ this.nextToken();
+ }
+
+ if (this.end > this.start) {
+ message += " " + this.input.slice(this.start, this.end);
+ }
+
+ this.raise(this.start, message);
+ };
+
+ /*
+ * Esprima-FB represents JSX strings as tokens called "JSXText", but Acorn-JSX
+ * uses regular tt.string without any distinction between this and regular JS
+ * strings. As such, we intercept an attempt to read a JSX string and set a flag
+ * on extra so that when tokens are converted, the next token will be switched
+ * to JSXText via onToken.
+ */
+ instance.extend("jsx_readString", function(jsxReadString) {
+ return /** @this acorn.Parser */ function(quote) {
+ var result = jsxReadString.call(this, quote);
+ if (this.type === tt.string) {
+ extra.jsxAttrValueToken = true;
+ }
+
+ return result;
+ };
+ });
+};
+
+//------------------------------------------------------------------------------
+// Tokenizer
+//------------------------------------------------------------------------------
+
+/**
+ * Tokenizes the given code.
+ * @param {string} code The code to tokenize.
+ * @param {Object} options Options defining how to tokenize.
+ * @returns {Token[]} An array of tokens.
+ * @throws {SyntaxError} If the input code is invalid.
+ * @private
+ */
+function tokenize(code, options) {
+ var toString,
+ tokens,
+ impliedStrict,
+ translator = new TokenTranslator(tt, code);
+
+ toString = String;
+ if (typeof code !== "string" && !(code instanceof String)) {
+ code = toString(code);
+ }
+
+ lookahead = null;
+
+ // Options matching.
+ options = assign({}, options);
+
+ var acornOptions = {
+ ecmaVersion: DEFAULT_ECMA_VERSION,
+ plugins: {
+ espree: true
+ }
+ };
+
+ resetExtra();
+
+ // Of course we collect tokens here.
+ options.tokens = true;
+ extra.tokens = [];
+
+ extra.range = (typeof options.range === "boolean") && options.range;
+ acornOptions.ranges = extra.range;
+
+ extra.loc = (typeof options.loc === "boolean") && options.loc;
+ acornOptions.locations = extra.loc;
+
+ extra.comment = typeof options.comment === "boolean" && options.comment;
+
+ if (extra.comment) {
+ acornOptions.onComment = function() {
+ var comment = convertAcornCommentToEsprimaComment.apply(this, arguments);
+ extra.comments.push(comment);
+ };
+ }
+
+ extra.tolerant = typeof options.tolerant === "boolean" && options.tolerant;
+
+ acornOptions.ecmaVersion = extra.ecmaVersion = normalizeEcmaVersion(options.ecmaVersion);
+
+ // apply parsing flags
+ if (options.ecmaFeatures && typeof options.ecmaFeatures === "object") {
+ extra.ecmaFeatures = assign({}, options.ecmaFeatures);
+ impliedStrict = extra.ecmaFeatures.impliedStrict;
+ extra.ecmaFeatures.impliedStrict = typeof impliedStrict === "boolean" && impliedStrict;
+ }
+
+ try {
+ var tokenizer = acorn.tokenizer(code, acornOptions);
+ while ((lookahead = tokenizer.getToken()).type !== tt.eof) {
+ translator.onToken(lookahead, extra);
+ }
+
+ // filterTokenLocation();
+ tokens = extra.tokens;
+
+ if (extra.comment) {
+ tokens.comments = extra.comments;
+ }
+ if (extra.tolerant) {
+ tokens.errors = extra.errors;
+ }
+ } catch (e) {
+ throw e;
+ }
+ return tokens;
+}
+
+//------------------------------------------------------------------------------
+// Parser
+//------------------------------------------------------------------------------
+
+
+
+/**
+ * Converts an Acorn comment to a Esprima comment.
+ * @param {boolean} block True if it's a block comment, false if not.
+ * @param {string} text The text of the comment.
+ * @param {int} start The index at which the comment starts.
+ * @param {int} end The index at which the comment ends.
+ * @param {Location} startLoc The location at which the comment starts.
+ * @param {Location} endLoc The location at which the comment ends.
+ * @returns {Object} The comment object.
+ * @private
+ */
+function convertAcornCommentToEsprimaComment(block, text, start, end, startLoc, endLoc) {
+ var comment = {
+ type: block ? "Block" : "Line",
+ value: text
+ };
+
+ if (typeof start === "number") {
+ comment.start = start;
+ comment.end = end;
+ comment.range = [start, end];
+ }
+
+ if (typeof startLoc === "object") {
+ comment.loc = {
+ start: startLoc,
+ end: endLoc
+ };
+ }
+
+ return comment;
+}
+
+/**
+ * Parses the given code.
+ * @param {string} code The code to tokenize.
+ * @param {Object} options Options defining how to tokenize.
+ * @returns {ASTNode} The "Program" AST node.
+ * @throws {SyntaxError} If the input code is invalid.
+ * @private
+ */
+function parse(code, options) {
+ var program,
+ toString = String,
+ translator,
+ impliedStrict,
+ acornOptions = {
+ ecmaVersion: DEFAULT_ECMA_VERSION,
+ plugins: {
+ espree: true
+ }
+ };
+
+ lastToken = null;
+
+ if (typeof code !== "string" && !(code instanceof String)) {
+ code = toString(code);
+ }
+
+ resetExtra();
+ commentAttachment.reset();
+
+ if (typeof options !== "undefined") {
+ extra.range = (typeof options.range === "boolean") && options.range;
+ extra.loc = (typeof options.loc === "boolean") && options.loc;
+ extra.attachComment = (typeof options.attachComment === "boolean") && options.attachComment;
+
+ if (extra.loc && options.source !== null && options.source !== undefined) {
+ extra.source = toString(options.source);
+ }
+
+ if (typeof options.tokens === "boolean" && options.tokens) {
+ extra.tokens = [];
+ translator = new TokenTranslator(tt, code);
+ }
+ if (typeof options.comment === "boolean" && options.comment) {
+ extra.comment = true;
+ extra.comments = [];
+ }
+ if (typeof options.tolerant === "boolean" && options.tolerant) {
+ extra.errors = [];
+ }
+ if (extra.attachComment) {
+ extra.range = true;
+ extra.comments = [];
+ commentAttachment.reset();
+ }
+
+ acornOptions.ecmaVersion = extra.ecmaVersion = normalizeEcmaVersion(options.ecmaVersion);
+
+ if (options.sourceType === "module") {
+ extra.isModule = true;
+
+ // modules must be in 6 at least
+ if (acornOptions.ecmaVersion < 6) {
+ acornOptions.ecmaVersion = 6;
+ extra.ecmaVersion = 6;
+ }
+
+ acornOptions.sourceType = "module";
+ }
+
+ // apply parsing flags after sourceType to allow overriding
+ if (options.ecmaFeatures && typeof options.ecmaFeatures === "object") {
+ extra.ecmaFeatures = assign({}, options.ecmaFeatures);
+ impliedStrict = extra.ecmaFeatures.impliedStrict;
+ extra.ecmaFeatures.impliedStrict = typeof impliedStrict === "boolean" && impliedStrict;
+ if (options.ecmaFeatures.globalReturn) {
+ acornOptions.allowReturnOutsideFunction = true;
+ }
+ }
+
+
+ acornOptions.onToken = function(token) {
+ if (extra.tokens) {
+ translator.onToken(token, extra);
+ }
+ if (token.type !== tt.eof) {
+ lastToken = token;
+ }
+ };
+
+ if (extra.attachComment || extra.comment) {
+ acornOptions.onComment = function() {
+ var comment = convertAcornCommentToEsprimaComment.apply(this, arguments);
+ extra.comments.push(comment);
+
+ if (extra.attachComment) {
+ commentAttachment.addComment(comment);
+ }
+ };
+ }
+
+ if (extra.range) {
+ acornOptions.ranges = true;
+ }
+
+ if (extra.loc) {
+ acornOptions.locations = true;
+ }
+
+ if (extra.ecmaFeatures.jsx) {
+ // Should process jsx plugin before espree plugin.
+ acornOptions.plugins = {
+ jsx: true,
+ espree: true
+ };
+ }
+ }
+
+ program = acorn.parse(code, acornOptions);
+ program.sourceType = extra.isModule ? "module" : "script";
+
+ if (extra.comment || extra.attachComment) {
+ program.comments = extra.comments;
+ }
+
+ if (extra.tokens) {
+ program.tokens = extra.tokens;
+ }
+
+ /*
+ * Adjust opening and closing position of program to match Esprima.
+ * Acorn always starts programs at range 0 whereas Esprima starts at the
+ * first AST node's start (the only real difference is when there's leading
+ * whitespace or leading comments). Acorn also counts trailing whitespace
+ * as part of the program whereas Esprima only counts up to the last token.
+ */
+ if (program.range) {
+ program.range[0] = program.body.length ? program.body[0].range[0] : program.range[0];
+ program.range[1] = lastToken ? lastToken.range[1] : program.range[1];
+ }
+
+ if (program.loc) {
+ program.loc.start = program.body.length ? program.body[0].loc.start : program.loc.start;
+ program.loc.end = lastToken ? lastToken.loc.end : program.loc.end;
+ }
+
+ return program;
+}
+
+//------------------------------------------------------------------------------
+// Public
+//------------------------------------------------------------------------------
+
+exports.version = require("./package.json").version;
+
+exports.tokenize = tokenize;
+
+exports.parse = parse;
+
+// Deep copy.
+/* istanbul ignore next */
+exports.Syntax = (function() {
+ var name, types = {};
+
+ if (typeof Object.create === "function") {
+ types = Object.create(null);
+ }
+
+ for (name in astNodeTypes) {
+ if (astNodeTypes.hasOwnProperty(name)) {
+ types[name] = astNodeTypes[name];
+ }
+ }
+
+ if (typeof Object.freeze === "function") {
+ Object.freeze(types);
+ }
+
+ return types;
+}());
+
+/* istanbul ignore next */
+exports.VisitorKeys = (function() {
+ var visitorKeys = require("./lib/visitor-keys");
+ var name,
+ keys = {};
+
+ if (typeof Object.create === "function") {
+ keys = Object.create(null);
+ }
+
+ for (name in visitorKeys) {
+ if (visitorKeys.hasOwnProperty(name)) {
+ keys[name] = visitorKeys[name];
+ }
+ }
+
+ if (typeof Object.freeze === "function") {
+ Object.freeze(keys);
+ }
+
+ return keys;
+}());
diff --git a/tools/node_modules/eslint/node_modules/espree/lib/ast-node-types.js b/tools/node_modules/eslint/node_modules/espree/lib/ast-node-types.js
new file mode 100644
index 0000000000..35bcaed087
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/espree/lib/ast-node-types.js
@@ -0,0 +1,98 @@
+/**
+ * @fileoverview The AST node types produced by the parser.
+ * @author Nicholas C. Zakas
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+// None!
+
+//------------------------------------------------------------------------------
+// Public
+//------------------------------------------------------------------------------
+
+module.exports = {
+ AssignmentExpression: "AssignmentExpression",
+ AssignmentPattern: "AssignmentPattern",
+ ArrayExpression: "ArrayExpression",
+ ArrayPattern: "ArrayPattern",
+ ArrowFunctionExpression: "ArrowFunctionExpression",
+ AwaitExpression: "AwaitExpression",
+ BlockStatement: "BlockStatement",
+ BinaryExpression: "BinaryExpression",
+ BreakStatement: "BreakStatement",
+ CallExpression: "CallExpression",
+ CatchClause: "CatchClause",
+ ClassBody: "ClassBody",
+ ClassDeclaration: "ClassDeclaration",
+ ClassExpression: "ClassExpression",
+ ConditionalExpression: "ConditionalExpression",
+ ContinueStatement: "ContinueStatement",
+ DoWhileStatement: "DoWhileStatement",
+ DebuggerStatement: "DebuggerStatement",
+ EmptyStatement: "EmptyStatement",
+ ExperimentalRestProperty: "ExperimentalRestProperty",
+ ExperimentalSpreadProperty: "ExperimentalSpreadProperty",
+ ExpressionStatement: "ExpressionStatement",
+ ForStatement: "ForStatement",
+ ForInStatement: "ForInStatement",
+ ForOfStatement: "ForOfStatement",
+ FunctionDeclaration: "FunctionDeclaration",
+ FunctionExpression: "FunctionExpression",
+ Identifier: "Identifier",
+ IfStatement: "IfStatement",
+ Literal: "Literal",
+ LabeledStatement: "LabeledStatement",
+ LogicalExpression: "LogicalExpression",
+ MemberExpression: "MemberExpression",
+ MetaProperty: "MetaProperty",
+ MethodDefinition: "MethodDefinition",
+ NewExpression: "NewExpression",
+ ObjectExpression: "ObjectExpression",
+ ObjectPattern: "ObjectPattern",
+ Program: "Program",
+ Property: "Property",
+ RestElement: "RestElement",
+ ReturnStatement: "ReturnStatement",
+ SequenceExpression: "SequenceExpression",
+ SpreadElement: "SpreadElement",
+ Super: "Super",
+ SwitchCase: "SwitchCase",
+ SwitchStatement: "SwitchStatement",
+ TaggedTemplateExpression: "TaggedTemplateExpression",
+ TemplateElement: "TemplateElement",
+ TemplateLiteral: "TemplateLiteral",
+ ThisExpression: "ThisExpression",
+ ThrowStatement: "ThrowStatement",
+ TryStatement: "TryStatement",
+ UnaryExpression: "UnaryExpression",
+ UpdateExpression: "UpdateExpression",
+ VariableDeclaration: "VariableDeclaration",
+ VariableDeclarator: "VariableDeclarator",
+ WhileStatement: "WhileStatement",
+ WithStatement: "WithStatement",
+ YieldExpression: "YieldExpression",
+ JSXIdentifier: "JSXIdentifier",
+ JSXNamespacedName: "JSXNamespacedName",
+ JSXMemberExpression: "JSXMemberExpression",
+ JSXEmptyExpression: "JSXEmptyExpression",
+ JSXExpressionContainer: "JSXExpressionContainer",
+ JSXElement: "JSXElement",
+ JSXClosingElement: "JSXClosingElement",
+ JSXOpeningElement: "JSXOpeningElement",
+ JSXAttribute: "JSXAttribute",
+ JSXSpreadAttribute: "JSXSpreadAttribute",
+ JSXText: "JSXText",
+ ExportDefaultDeclaration: "ExportDefaultDeclaration",
+ ExportNamedDeclaration: "ExportNamedDeclaration",
+ ExportAllDeclaration: "ExportAllDeclaration",
+ ExportSpecifier: "ExportSpecifier",
+ ImportDeclaration: "ImportDeclaration",
+ ImportSpecifier: "ImportSpecifier",
+ ImportDefaultSpecifier: "ImportDefaultSpecifier",
+ ImportNamespaceSpecifier: "ImportNamespaceSpecifier"
+};
diff --git a/tools/node_modules/eslint/node_modules/espree/lib/comment-attachment.js b/tools/node_modules/eslint/node_modules/espree/lib/comment-attachment.js
new file mode 100644
index 0000000000..b82b5f1cd3
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/espree/lib/comment-attachment.js
@@ -0,0 +1,175 @@
+/**
+ * @fileoverview Attaches comments to the AST.
+ * @author Nicholas C. Zakas
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+var astNodeTypes = require("./ast-node-types");
+
+//------------------------------------------------------------------------------
+// Private
+//------------------------------------------------------------------------------
+
+var extra = {
+ trailingComments: [],
+ leadingComments: [],
+ bottomRightStack: [],
+ previousNode: null
+};
+
+//------------------------------------------------------------------------------
+// Public
+//------------------------------------------------------------------------------
+
+module.exports = {
+
+ reset: function() {
+ extra.trailingComments = [];
+ extra.leadingComments = [];
+ extra.bottomRightStack = [];
+ extra.previousNode = null;
+ },
+
+ addComment: function(comment) {
+ extra.trailingComments.push(comment);
+ extra.leadingComments.push(comment);
+ },
+
+ processComment: function(node) {
+ var lastChild,
+ trailingComments,
+ i,
+ j;
+
+ if (node.type === astNodeTypes.Program) {
+ if (node.body.length > 0) {
+ return;
+ }
+ }
+
+ if (extra.trailingComments.length > 0) {
+
+ /*
+ * If the first comment in trailingComments comes after the
+ * current node, then we're good - all comments in the array will
+ * come after the node and so it's safe to add then as official
+ * trailingComments.
+ */
+ if (extra.trailingComments[0].range[0] >= node.range[1]) {
+ trailingComments = extra.trailingComments;
+ extra.trailingComments = [];
+ } else {
+
+ /*
+ * Otherwise, if the first comment doesn't come after the
+ * current node, that means we have a mix of leading and trailing
+ * comments in the array and that leadingComments contains the
+ * same items as trailingComments. Reset trailingComments to
+ * zero items and we'll handle this by evaluating leadingComments
+ * later.
+ */
+ extra.trailingComments.length = 0;
+ }
+ } else {
+ if (extra.bottomRightStack.length > 0 &&
+ extra.bottomRightStack[extra.bottomRightStack.length - 1].trailingComments &&
+ extra.bottomRightStack[extra.bottomRightStack.length - 1].trailingComments[0].range[0] >= node.range[1]) {
+ trailingComments = extra.bottomRightStack[extra.bottomRightStack.length - 1].trailingComments;
+ delete extra.bottomRightStack[extra.bottomRightStack.length - 1].trailingComments;
+ }
+ }
+
+ // Eating the stack.
+ while (extra.bottomRightStack.length > 0 && extra.bottomRightStack[extra.bottomRightStack.length - 1].range[0] >= node.range[0]) {
+ lastChild = extra.bottomRightStack.pop();
+ }
+
+ if (lastChild) {
+ if (lastChild.leadingComments) {
+ if (lastChild.leadingComments[lastChild.leadingComments.length - 1].range[1] <= node.range[0]) {
+ node.leadingComments = lastChild.leadingComments;
+ delete lastChild.leadingComments;
+ } else {
+ // A leading comment for an anonymous class had been stolen by its first MethodDefinition,
+ // so this takes back the leading comment.
+ // See Also: https://github.com/eslint/espree/issues/158
+ for (i = lastChild.leadingComments.length - 2; i >= 0; --i) {
+ if (lastChild.leadingComments[i].range[1] <= node.range[0]) {
+ node.leadingComments = lastChild.leadingComments.splice(0, i + 1);
+ break;
+ }
+ }
+ }
+ }
+ } else if (extra.leadingComments.length > 0) {
+ if (extra.leadingComments[extra.leadingComments.length - 1].range[1] <= node.range[0]) {
+ if (extra.previousNode) {
+ for (j = 0; j < extra.leadingComments.length; j++) {
+ if (extra.leadingComments[j].end < extra.previousNode.end) {
+ extra.leadingComments.splice(j, 1);
+ j--;
+ }
+ }
+ }
+ if (extra.leadingComments.length > 0) {
+ node.leadingComments = extra.leadingComments;
+ extra.leadingComments = [];
+ }
+ } else {
+
+ // https://github.com/eslint/espree/issues/2
+
+ /*
+ * In special cases, such as return (without a value) and
+ * debugger, all comments will end up as leadingComments and
+ * will otherwise be eliminated. This extra step runs when the
+ * bottomRightStack is empty and there are comments left
+ * in leadingComments.
+ *
+ * This loop figures out the stopping point between the actual
+ * leading and trailing comments by finding the location of the
+ * first comment that comes after the given node.
+ */
+ for (i = 0; i < extra.leadingComments.length; i++) {
+ if (extra.leadingComments[i].range[1] > node.range[0]) {
+ break;
+ }
+ }
+
+ /*
+ * Split the array based on the location of the first comment
+ * that comes after the node. Keep in mind that this could
+ * result in an empty array, and if so, the array must be
+ * deleted.
+ */
+ node.leadingComments = extra.leadingComments.slice(0, i);
+ if (node.leadingComments.length === 0) {
+ delete node.leadingComments;
+ }
+
+ /*
+ * Similarly, trailing comments are attached later. The variable
+ * must be reset to null if there are no trailing comments.
+ */
+ trailingComments = extra.leadingComments.slice(i);
+ if (trailingComments.length === 0) {
+ trailingComments = null;
+ }
+ }
+ }
+
+ extra.previousNode = node;
+
+ if (trailingComments) {
+ node.trailingComments = trailingComments;
+ }
+
+ extra.bottomRightStack.push(node);
+ }
+
+};
diff --git a/tools/node_modules/eslint/node_modules/espree/lib/features.js b/tools/node_modules/eslint/node_modules/espree/lib/features.js
new file mode 100644
index 0000000000..774f8e5e58
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/espree/lib/features.js
@@ -0,0 +1,32 @@
+/**
+ * @fileoverview The list of feature flags supported by the parser and their default
+ * settings.
+ * @author Nicholas C. Zakas
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+// None!
+
+//------------------------------------------------------------------------------
+// Public
+//------------------------------------------------------------------------------
+
+module.exports = {
+
+ // React JSX parsing
+ jsx: false,
+
+ // allow return statement in global scope
+ globalReturn: false,
+
+ // allow implied strict mode
+ impliedStrict: false,
+
+ // allow experimental object rest/spread
+ experimentalObjectRestSpread: false
+};
diff --git a/tools/node_modules/eslint/node_modules/espree/lib/token-translator.js b/tools/node_modules/eslint/node_modules/espree/lib/token-translator.js
new file mode 100644
index 0000000000..f47b3621be
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/espree/lib/token-translator.js
@@ -0,0 +1,258 @@
+/**
+ * @fileoverview Translates tokens between Acorn format and Esprima format.
+ * @author Nicholas C. Zakas
+ */
+/* eslint no-underscore-dangle: 0 */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+// none!
+
+//------------------------------------------------------------------------------
+// Private
+//------------------------------------------------------------------------------
+
+
+// Esprima Token Types
+var Token = {
+ Boolean: "Boolean",
+ EOF: "<end>",
+ Identifier: "Identifier",
+ Keyword: "Keyword",
+ Null: "Null",
+ Numeric: "Numeric",
+ Punctuator: "Punctuator",
+ String: "String",
+ RegularExpression: "RegularExpression",
+ Template: "Template",
+ JSXIdentifier: "JSXIdentifier",
+ JSXText: "JSXText"
+};
+
+/**
+ * Converts part of a template into an Esprima token.
+ * @param {AcornToken[]} tokens The Acorn tokens representing the template.
+ * @param {string} code The source code.
+ * @returns {EsprimaToken} The Esprima equivalent of the template token.
+ * @private
+ */
+function convertTemplatePart(tokens, code) {
+ var firstToken = tokens[0],
+ lastTemplateToken = tokens[tokens.length - 1];
+
+ var token = {
+ type: Token.Template,
+ value: code.slice(firstToken.start, lastTemplateToken.end)
+ };
+
+ if (firstToken.loc) {
+ token.loc = {
+ start: firstToken.loc.start,
+ end: lastTemplateToken.loc.end
+ };
+ }
+
+ if (firstToken.range) {
+ token.start = firstToken.range[0];
+ token.end = lastTemplateToken.range[1];
+ token.range = [token.start, token.end];
+ }
+
+ return token;
+}
+
+/**
+ * Contains logic to translate Acorn tokens into Esprima tokens.
+ * @param {Object} acornTokTypes The Acorn token types.
+ * @param {string} code The source code Acorn is parsing. This is necessary
+ * to correct the "value" property of some tokens.
+ * @constructor
+ */
+function TokenTranslator(acornTokTypes, code) {
+
+ // token types
+ this._acornTokTypes = acornTokTypes;
+
+ // token buffer for templates
+ this._tokens = [];
+
+ // track the last curly brace
+ this._curlyBrace = null;
+
+ // the source code
+ this._code = code;
+
+}
+
+TokenTranslator.prototype = {
+ constructor: TokenTranslator,
+
+ /**
+ * Translates a single Esprima token to a single Acorn token. This may be
+ * inaccurate due to how templates are handled differently in Esprima and
+ * Acorn, but should be accurate for all other tokens.
+ * @param {AcornToken} token The Acorn token to translate.
+ * @param {Object} extra Espree extra object.
+ * @returns {EsprimaToken} The Esprima version of the token.
+ */
+ translate: function(token, extra) {
+
+ var type = token.type,
+ tt = this._acornTokTypes;
+
+ if (type === tt.name) {
+ token.type = Token.Identifier;
+
+ // TODO: See if this is an Acorn bug
+ if (token.value === "static") {
+ token.type = Token.Keyword;
+ }
+
+ if (extra.ecmaVersion > 5 && (token.value === "yield" || token.value === "let")) {
+ token.type = Token.Keyword;
+ }
+
+ } else if (type === tt.semi || type === tt.comma ||
+ type === tt.parenL || type === tt.parenR ||
+ type === tt.braceL || type === tt.braceR ||
+ type === tt.dot || type === tt.bracketL ||
+ type === tt.colon || type === tt.question ||
+ type === tt.bracketR || type === tt.ellipsis ||
+ type === tt.arrow || type === tt.jsxTagStart ||
+ type === tt.incDec || type === tt.starstar ||
+ type === tt.jsxTagEnd || type === tt.prefix ||
+ (type.binop && !type.keyword) ||
+ type.isAssign) {
+
+ token.type = Token.Punctuator;
+ token.value = this._code.slice(token.start, token.end);
+ } else if (type === tt.jsxName) {
+ token.type = Token.JSXIdentifier;
+ } else if (type.label === "jsxText" || type === tt.jsxAttrValueToken) {
+ token.type = Token.JSXText;
+ } else if (type.keyword) {
+ if (type.keyword === "true" || type.keyword === "false") {
+ token.type = Token.Boolean;
+ } else if (type.keyword === "null") {
+ token.type = Token.Null;
+ } else {
+ token.type = Token.Keyword;
+ }
+ } else if (type === tt.num) {
+ token.type = Token.Numeric;
+ token.value = this._code.slice(token.start, token.end);
+ } else if (type === tt.string) {
+
+ if (extra.jsxAttrValueToken) {
+ extra.jsxAttrValueToken = false;
+ token.type = Token.JSXText;
+ } else {
+ token.type = Token.String;
+ }
+
+ token.value = this._code.slice(token.start, token.end);
+ } else if (type === tt.regexp) {
+ token.type = Token.RegularExpression;
+ var value = token.value;
+ token.regex = {
+ flags: value.flags,
+ pattern: value.pattern
+ };
+ token.value = "/" + value.pattern + "/" + value.flags;
+ }
+
+ return token;
+ },
+
+ /**
+ * Function to call during Acorn's onToken handler.
+ * @param {AcornToken} token The Acorn token.
+ * @param {Object} extra The Espree extra object.
+ * @returns {void}
+ */
+ onToken: function(token, extra) {
+
+ var that = this,
+ tt = this._acornTokTypes,
+ tokens = extra.tokens,
+ templateTokens = this._tokens;
+
+ /**
+ * Flushes the buffered template tokens and resets the template
+ * tracking.
+ * @returns {void}
+ * @private
+ */
+ function translateTemplateTokens() {
+ tokens.push(convertTemplatePart(that._tokens, that._code));
+ that._tokens = [];
+ }
+
+ if (token.type === tt.eof) {
+
+ // might be one last curlyBrace
+ if (this._curlyBrace) {
+ tokens.push(this.translate(this._curlyBrace, extra));
+ }
+
+ return;
+ }
+
+ if (token.type === tt.backQuote) {
+
+ // if there's already a curly, it's not part of the template
+ if (this._curlyBrace) {
+ tokens.push(this.translate(this._curlyBrace, extra));
+ this._curlyBrace = null;
+ }
+
+ templateTokens.push(token);
+
+ // it's the end
+ if (templateTokens.length > 1) {
+ translateTemplateTokens();
+ }
+
+ return;
+ } else if (token.type === tt.dollarBraceL) {
+ templateTokens.push(token);
+ translateTemplateTokens();
+ return;
+ } else if (token.type === tt.braceR) {
+
+ // if there's already a curly, it's not part of the template
+ if (this._curlyBrace) {
+ tokens.push(this.translate(this._curlyBrace, extra));
+ }
+
+ // store new curly for later
+ this._curlyBrace = token;
+ return;
+ } else if (token.type === tt.template || token.type === tt.invalidTemplate) {
+ if (this._curlyBrace) {
+ templateTokens.push(this._curlyBrace);
+ this._curlyBrace = null;
+ }
+
+ templateTokens.push(token);
+ return;
+ }
+
+ if (this._curlyBrace) {
+ tokens.push(this.translate(this._curlyBrace, extra));
+ this._curlyBrace = null;
+ }
+
+ tokens.push(this.translate(token, extra));
+ }
+};
+
+//------------------------------------------------------------------------------
+// Public
+//------------------------------------------------------------------------------
+
+module.exports = TokenTranslator;
diff --git a/tools/node_modules/eslint/node_modules/espree/lib/visitor-keys.js b/tools/node_modules/eslint/node_modules/espree/lib/visitor-keys.js
new file mode 100644
index 0000000000..d1efeb7afc
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/espree/lib/visitor-keys.js
@@ -0,0 +1,127 @@
+/**
+ * @fileoverview The visitor keys for the node types Espree supports
+ * @author Nicholas C. Zakas
+ *
+ * This file contains code from estraverse-fb.
+ *
+ * The MIT license. Copyright (c) 2014 Ingvar Stepanyan
+ *
+ * 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.
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+// None!
+
+//------------------------------------------------------------------------------
+// Public
+//------------------------------------------------------------------------------
+
+module.exports = {
+
+ // ECMAScript
+ AssignmentExpression: ["left", "right"],
+ AssignmentPattern: ["left", "right"],
+ ArrayExpression: ["elements"],
+ ArrayPattern: ["elements"],
+ ArrowFunctionExpression: ["params", "body"],
+ BlockStatement: ["body"],
+ BinaryExpression: ["left", "right"],
+ BreakStatement: ["label"],
+ CallExpression: ["callee", "arguments"],
+ CatchClause: ["param", "body"],
+ ClassBody: ["body"],
+ ClassDeclaration: ["id", "superClass", "body"],
+ ClassExpression: ["id", "superClass", "body"],
+ ConditionalExpression: ["test", "consequent", "alternate"],
+ ContinueStatement: ["label"],
+ DebuggerStatement: [],
+ DirectiveStatement: [],
+ DoWhileStatement: ["body", "test"],
+ EmptyStatement: [],
+ ExportAllDeclaration: ["source"],
+ ExportDefaultDeclaration: ["declaration"],
+ ExportNamedDeclaration: ["declaration", "specifiers", "source"],
+ ExportSpecifier: ["exported", "local"],
+ ExpressionStatement: ["expression"],
+ ForStatement: ["init", "test", "update", "body"],
+ ForInStatement: ["left", "right", "body"],
+ ForOfStatement: ["left", "right", "body"],
+ FunctionDeclaration: ["id", "params", "body"],
+ FunctionExpression: ["id", "params", "body"],
+ Identifier: [],
+ IfStatement: ["test", "consequent", "alternate"],
+ ImportDeclaration: ["specifiers", "source"],
+ ImportDefaultSpecifier: ["local"],
+ ImportNamespaceSpecifier: ["local"],
+ ImportSpecifier: ["imported", "local"],
+ Literal: [],
+ LabeledStatement: ["label", "body"],
+ LogicalExpression: ["left", "right"],
+ MemberExpression: ["object", "property"],
+ MetaProperty: ["meta", "property"],
+ MethodDefinition: ["key", "value"],
+ ModuleSpecifier: [],
+ NewExpression: ["callee", "arguments"],
+ ObjectExpression: ["properties"],
+ ObjectPattern: ["properties"],
+ Program: ["body"],
+ Property: ["key", "value"],
+ RestElement: [ "argument" ],
+ ReturnStatement: ["argument"],
+ SequenceExpression: ["expressions"],
+ SpreadElement: ["argument"],
+ Super: [],
+ SwitchStatement: ["discriminant", "cases"],
+ SwitchCase: ["test", "consequent"],
+ TaggedTemplateExpression: ["tag", "quasi"],
+ TemplateElement: [],
+ TemplateLiteral: ["quasis", "expressions"],
+ ThisExpression: [],
+ ThrowStatement: ["argument"],
+ TryStatement: ["block", "handler", "finalizer"],
+ UnaryExpression: ["argument"],
+ UpdateExpression: ["argument"],
+ VariableDeclaration: ["declarations"],
+ VariableDeclarator: ["id", "init"],
+ WhileStatement: ["test", "body"],
+ WithStatement: ["object", "body"],
+ YieldExpression: ["argument"],
+
+ // JSX
+ JSXIdentifier: [],
+ JSXNamespacedName: ["namespace", "name"],
+ JSXMemberExpression: ["object", "property"],
+ JSXEmptyExpression: [],
+ JSXExpressionContainer: ["expression"],
+ JSXElement: ["openingElement", "closingElement", "children"],
+ JSXClosingElement: ["name"],
+ JSXOpeningElement: ["name", "attributes"],
+ JSXAttribute: ["name", "value"],
+ JSXText: null,
+ JSXSpreadAttribute: ["argument"],
+
+ // Experimental features
+ ExperimentalRestProperty: ["argument"],
+ ExperimentalSpreadProperty: ["argument"]
+};
diff --git a/tools/node_modules/eslint/node_modules/espree/package.json b/tools/node_modules/eslint/node_modules/espree/package.json
new file mode 100644
index 0000000000..01b56f65eb
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/espree/package.json
@@ -0,0 +1,91 @@
+{
+ "_from": "espree@^3.5.2",
+ "_id": "espree@3.5.2",
+ "_inBundle": false,
+ "_integrity": "sha512-sadKeYwaR/aJ3stC2CdvgXu1T16TdYN+qwCpcWbMnGJ8s0zNWemzrvb2GbD4OhmJ/fwpJjudThAlLobGbWZbCQ==",
+ "_location": "/eslint/espree",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "espree@^3.5.2",
+ "name": "espree",
+ "escapedName": "espree",
+ "rawSpec": "^3.5.2",
+ "saveSpec": null,
+ "fetchSpec": "^3.5.2"
+ },
+ "_requiredBy": [
+ "/eslint"
+ ],
+ "_resolved": "https://registry.npmjs.org/espree/-/espree-3.5.2.tgz",
+ "_shasum": "756ada8b979e9dcfcdb30aad8d1a9304a905e1ca",
+ "_spec": "espree@^3.5.2",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint",
+ "author": {
+ "name": "Nicholas C. Zakas",
+ "email": "nicholas+npm@nczconsulting.com"
+ },
+ "bugs": {
+ "url": "http://github.com/eslint/espree.git"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "acorn": "^5.2.1",
+ "acorn-jsx": "^3.0.0"
+ },
+ "deprecated": false,
+ "description": "An Esprima-compatible JavaScript parser built on Acorn",
+ "devDependencies": {
+ "browserify": "^7.0.0",
+ "chai": "^1.10.0",
+ "eslint": "^2.13.1",
+ "eslint-config-eslint": "^3.0.0",
+ "eslint-release": "^0.10.0",
+ "esprima": "latest",
+ "esprima-fb": "^8001.2001.0-dev-harmony-fb",
+ "istanbul": "~0.2.6",
+ "json-diff": "~0.3.1",
+ "leche": "^1.0.1",
+ "mocha": "^2.0.1",
+ "regenerate": "~0.5.4",
+ "shelljs": "^0.3.0",
+ "shelljs-nodecli": "^0.1.1",
+ "unicode-6.3.0": "~0.1.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "lib",
+ "espree.js"
+ ],
+ "homepage": "https://github.com/eslint/espree",
+ "keywords": [
+ "ast",
+ "ecmascript",
+ "javascript",
+ "parser",
+ "syntax",
+ "acorn"
+ ],
+ "license": "BSD-2-Clause",
+ "main": "espree.js",
+ "name": "espree",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/eslint/espree.git"
+ },
+ "scripts": {
+ "alpharelease": "eslint-prelease alpha",
+ "betarelease": "eslint-prelease beta",
+ "browserify": "node Makefile.js browserify",
+ "ci-release": "eslint-ci-release",
+ "generate-regex": "node tools/generate-identifier-regex.js",
+ "gh-release": "eslint-gh-release",
+ "lint": "node Makefile.js lint",
+ "release": "eslint-release",
+ "test": "npm run-script lint && node Makefile.js test"
+ },
+ "version": "3.5.2"
+}
diff --git a/tools/node_modules/eslint/node_modules/esprima/LICENSE.BSD b/tools/node_modules/eslint/node_modules/esprima/LICENSE.BSD
new file mode 100644
index 0000000000..7a55160f56
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/esprima/LICENSE.BSD
@@ -0,0 +1,21 @@
+Copyright JS Foundation and other contributors, https://js.foundation/
+
+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.
+
+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 <COPYRIGHT HOLDER> 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/tools/node_modules/eslint/node_modules/esprima/README.md b/tools/node_modules/eslint/node_modules/esprima/README.md
new file mode 100644
index 0000000000..8fb25e6c1f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/esprima/README.md
@@ -0,0 +1,46 @@
+[![NPM version](https://img.shields.io/npm/v/esprima.svg)](https://www.npmjs.com/package/esprima)
+[![npm download](https://img.shields.io/npm/dm/esprima.svg)](https://www.npmjs.com/package/esprima)
+[![Build Status](https://img.shields.io/travis/jquery/esprima/master.svg)](https://travis-ci.org/jquery/esprima)
+[![Coverage Status](https://img.shields.io/codecov/c/github/jquery/esprima/master.svg)](https://codecov.io/github/jquery/esprima)
+
+**Esprima** ([esprima.org](http://esprima.org), BSD license) is a high performance,
+standard-compliant [ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm)
+parser written in ECMAScript (also popularly known as
+[JavaScript](https://en.wikipedia.org/wiki/JavaScript)).
+Esprima is created and maintained by [Ariya Hidayat](https://twitter.com/ariyahidayat),
+with the help of [many contributors](https://github.com/jquery/esprima/contributors).
+
+### Features
+
+- Full support for ECMAScript 2017 ([ECMA-262 8th Edition](http://www.ecma-international.org/publications/standards/Ecma-262.htm))
+- Sensible [syntax tree format](https://github.com/estree/estree/blob/master/es5.md) as standardized by [ESTree project](https://github.com/estree/estree)
+- Experimental support for [JSX](https://facebook.github.io/jsx/), a syntax extension for [React](https://facebook.github.io/react/)
+- Optional tracking of syntax node location (index-based and line-column)
+- [Heavily tested](http://esprima.org/test/ci.html) (~1500 [unit tests](https://github.com/jquery/esprima/tree/master/test/fixtures) with [full code coverage](https://codecov.io/github/jquery/esprima))
+
+### API
+
+Esprima can be used to perform [lexical analysis](https://en.wikipedia.org/wiki/Lexical_analysis) (tokenization) or [syntactic analysis](https://en.wikipedia.org/wiki/Parsing) (parsing) of a JavaScript program.
+
+A simple example on Node.js REPL:
+
+```javascript
+> var esprima = require('esprima');
+> var program = 'const answer = 42';
+
+> esprima.tokenize(program);
+[ { type: 'Keyword', value: 'const' },
+ { type: 'Identifier', value: 'answer' },
+ { type: 'Punctuator', value: '=' },
+ { type: 'Numeric', value: '42' } ]
+
+> esprima.parseScript(program);
+{ type: 'Program',
+ body:
+ [ { type: 'VariableDeclaration',
+ declarations: [Object],
+ kind: 'const' } ],
+ sourceType: 'script' }
+```
+
+For more information, please read the [complete documentation](http://esprima.org/doc). \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/esprima/bin/esparse.js b/tools/node_modules/eslint/node_modules/esprima/bin/esparse.js
new file mode 100644
index 0000000000..45d05fbb73
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/esprima/bin/esparse.js
@@ -0,0 +1,139 @@
+#!/usr/bin/env node
+/*
+ Copyright JS Foundation and other contributors, https://js.foundation/
+
+ 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.
+
+ 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 <COPYRIGHT HOLDER> 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.
+*/
+
+/*jslint sloppy:true node:true rhino:true */
+
+var fs, esprima, fname, forceFile, content, options, syntax;
+
+if (typeof require === 'function') {
+ fs = require('fs');
+ try {
+ esprima = require('esprima');
+ } catch (e) {
+ esprima = require('../');
+ }
+} else if (typeof load === 'function') {
+ try {
+ load('esprima.js');
+ } catch (e) {
+ load('../esprima.js');
+ }
+}
+
+// Shims to Node.js objects when running under Rhino.
+if (typeof console === 'undefined' && typeof process === 'undefined') {
+ console = { log: print };
+ fs = { readFileSync: readFile };
+ process = { argv: arguments, exit: quit };
+ process.argv.unshift('esparse.js');
+ process.argv.unshift('rhino');
+}
+
+function showUsage() {
+ console.log('Usage:');
+ console.log(' esparse [options] [file.js]');
+ console.log();
+ console.log('Available options:');
+ console.log();
+ console.log(' --comment Gather all line and block comments in an array');
+ console.log(' --loc Include line-column location info for each syntax node');
+ console.log(' --range Include index-based range for each syntax node');
+ console.log(' --raw Display the raw value of literals');
+ console.log(' --tokens List all tokens in an array');
+ console.log(' --tolerant Tolerate errors on a best-effort basis (experimental)');
+ console.log(' -v, --version Shows program version');
+ console.log();
+ process.exit(1);
+}
+
+options = {};
+
+process.argv.splice(2).forEach(function (entry) {
+
+ if (forceFile || entry === '-' || entry.slice(0, 1) !== '-') {
+ if (typeof fname === 'string') {
+ console.log('Error: more than one input file.');
+ process.exit(1);
+ } else {
+ fname = entry;
+ }
+ } else if (entry === '-h' || entry === '--help') {
+ showUsage();
+ } else if (entry === '-v' || entry === '--version') {
+ console.log('ECMAScript Parser (using Esprima version', esprima.version, ')');
+ console.log();
+ process.exit(0);
+ } else if (entry === '--comment') {
+ options.comment = true;
+ } else if (entry === '--loc') {
+ options.loc = true;
+ } else if (entry === '--range') {
+ options.range = true;
+ } else if (entry === '--raw') {
+ options.raw = true;
+ } else if (entry === '--tokens') {
+ options.tokens = true;
+ } else if (entry === '--tolerant') {
+ options.tolerant = true;
+ } else if (entry === '--') {
+ forceFile = true;
+ } else {
+ console.log('Error: unknown option ' + entry + '.');
+ process.exit(1);
+ }
+});
+
+// Special handling for regular expression literal since we need to
+// convert it to a string literal, otherwise it will be decoded
+// as object "{}" and the regular expression would be lost.
+function adjustRegexLiteral(key, value) {
+ if (key === 'value' && value instanceof RegExp) {
+ value = value.toString();
+ }
+ return value;
+}
+
+function run(content) {
+ syntax = esprima.parse(content, options);
+ console.log(JSON.stringify(syntax, adjustRegexLiteral, 4));
+}
+
+try {
+ if (fname && (fname !== '-' || forceFile)) {
+ run(fs.readFileSync(fname, 'utf-8'));
+ } else {
+ var content = '';
+ process.stdin.resume();
+ process.stdin.on('data', function(chunk) {
+ content += chunk;
+ });
+ process.stdin.on('end', function() {
+ run(content);
+ });
+ }
+} catch (e) {
+ console.log('Error: ' + e.message);
+ process.exit(1);
+}
diff --git a/tools/node_modules/eslint/node_modules/esprima/bin/esvalidate.js b/tools/node_modules/eslint/node_modules/esprima/bin/esvalidate.js
new file mode 100644
index 0000000000..d49a7e40a8
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/esprima/bin/esvalidate.js
@@ -0,0 +1,236 @@
+#!/usr/bin/env node
+/*
+ Copyright JS Foundation and other contributors, https://js.foundation/
+
+ 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.
+
+ 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 <COPYRIGHT HOLDER> 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.
+*/
+
+/*jslint sloppy:true plusplus:true node:true rhino:true */
+/*global phantom:true */
+
+var fs, system, esprima, options, fnames, forceFile, count;
+
+if (typeof esprima === 'undefined') {
+ // PhantomJS can only require() relative files
+ if (typeof phantom === 'object') {
+ fs = require('fs');
+ system = require('system');
+ esprima = require('./esprima');
+ } else if (typeof require === 'function') {
+ fs = require('fs');
+ try {
+ esprima = require('esprima');
+ } catch (e) {
+ esprima = require('../');
+ }
+ } else if (typeof load === 'function') {
+ try {
+ load('esprima.js');
+ } catch (e) {
+ load('../esprima.js');
+ }
+ }
+}
+
+// Shims to Node.js objects when running under PhantomJS 1.7+.
+if (typeof phantom === 'object') {
+ fs.readFileSync = fs.read;
+ process = {
+ argv: [].slice.call(system.args),
+ exit: phantom.exit,
+ on: function (evt, callback) {
+ callback();
+ }
+ };
+ process.argv.unshift('phantomjs');
+}
+
+// Shims to Node.js objects when running under Rhino.
+if (typeof console === 'undefined' && typeof process === 'undefined') {
+ console = { log: print };
+ fs = { readFileSync: readFile };
+ process = {
+ argv: arguments,
+ exit: quit,
+ on: function (evt, callback) {
+ callback();
+ }
+ };
+ process.argv.unshift('esvalidate.js');
+ process.argv.unshift('rhino');
+}
+
+function showUsage() {
+ console.log('Usage:');
+ console.log(' esvalidate [options] [file.js...]');
+ console.log();
+ console.log('Available options:');
+ console.log();
+ console.log(' --format=type Set the report format, plain (default) or junit');
+ console.log(' -v, --version Print program version');
+ console.log();
+ process.exit(1);
+}
+
+options = {
+ format: 'plain'
+};
+
+fnames = [];
+
+process.argv.splice(2).forEach(function (entry) {
+
+ if (forceFile || entry === '-' || entry.slice(0, 1) !== '-') {
+ fnames.push(entry);
+ } else if (entry === '-h' || entry === '--help') {
+ showUsage();
+ } else if (entry === '-v' || entry === '--version') {
+ console.log('ECMAScript Validator (using Esprima version', esprima.version, ')');
+ console.log();
+ process.exit(0);
+ } else if (entry.slice(0, 9) === '--format=') {
+ options.format = entry.slice(9);
+ if (options.format !== 'plain' && options.format !== 'junit') {
+ console.log('Error: unknown report format ' + options.format + '.');
+ process.exit(1);
+ }
+ } else if (entry === '--') {
+ forceFile = true;
+ } else {
+ console.log('Error: unknown option ' + entry + '.');
+ process.exit(1);
+ }
+});
+
+if (fnames.length === 0) {
+ fnames.push('');
+}
+
+if (options.format === 'junit') {
+ console.log('<?xml version="1.0" encoding="UTF-8"?>');
+ console.log('<testsuites>');
+}
+
+count = 0;
+
+function run(fname, content) {
+ var timestamp, syntax, name;
+ try {
+ if (typeof content !== 'string') {
+ throw content;
+ }
+
+ if (content[0] === '#' && content[1] === '!') {
+ content = '//' + content.substr(2, content.length);
+ }
+
+ timestamp = Date.now();
+ syntax = esprima.parse(content, { tolerant: true });
+
+ if (options.format === 'junit') {
+
+ name = fname;
+ if (name.lastIndexOf('/') >= 0) {
+ name = name.slice(name.lastIndexOf('/') + 1);
+ }
+
+ console.log('<testsuite name="' + fname + '" errors="0" ' +
+ ' failures="' + syntax.errors.length + '" ' +
+ ' tests="' + syntax.errors.length + '" ' +
+ ' time="' + Math.round((Date.now() - timestamp) / 1000) +
+ '">');
+
+ syntax.errors.forEach(function (error) {
+ var msg = error.message;
+ msg = msg.replace(/^Line\ [0-9]*\:\ /, '');
+ console.log(' <testcase name="Line ' + error.lineNumber + ': ' + msg + '" ' +
+ ' time="0">');
+ console.log(' <error type="SyntaxError" message="' + error.message + '">' +
+ error.message + '(' + name + ':' + error.lineNumber + ')' +
+ '</error>');
+ console.log(' </testcase>');
+ });
+
+ console.log('</testsuite>');
+
+ } else if (options.format === 'plain') {
+
+ syntax.errors.forEach(function (error) {
+ var msg = error.message;
+ msg = msg.replace(/^Line\ [0-9]*\:\ /, '');
+ msg = fname + ':' + error.lineNumber + ': ' + msg;
+ console.log(msg);
+ ++count;
+ });
+
+ }
+ } catch (e) {
+ ++count;
+ if (options.format === 'junit') {
+ console.log('<testsuite name="' + fname + '" errors="1" failures="0" tests="1" ' +
+ ' time="' + Math.round((Date.now() - timestamp) / 1000) + '">');
+ console.log(' <testcase name="' + e.message + '" ' + ' time="0">');
+ console.log(' <error type="ParseError" message="' + e.message + '">' +
+ e.message + '(' + fname + ((e.lineNumber) ? ':' + e.lineNumber : '') +
+ ')</error>');
+ console.log(' </testcase>');
+ console.log('</testsuite>');
+ } else {
+ console.log(fname + ':' + e.lineNumber + ': ' + e.message.replace(/^Line\ [0-9]*\:\ /, ''));
+ }
+ }
+}
+
+fnames.forEach(function (fname) {
+ var content = '';
+ try {
+ if (fname && (fname !== '-' || forceFile)) {
+ content = fs.readFileSync(fname, 'utf-8');
+ } else {
+ fname = '';
+ process.stdin.resume();
+ process.stdin.on('data', function(chunk) {
+ content += chunk;
+ });
+ process.stdin.on('end', function() {
+ run(fname, content);
+ });
+ return;
+ }
+ } catch (e) {
+ content = e;
+ }
+ run(fname, content);
+});
+
+process.on('exit', function () {
+ if (options.format === 'junit') {
+ console.log('</testsuites>');
+ }
+
+ if (count > 0) {
+ process.exit(1);
+ }
+
+ if (count === 0 && typeof phantom === 'object') {
+ process.exit(0);
+ }
+});
diff --git a/tools/node_modules/eslint/node_modules/esprima/dist/esprima.js b/tools/node_modules/eslint/node_modules/esprima/dist/esprima.js
new file mode 100644
index 0000000000..640d84b4fa
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/esprima/dist/esprima.js
@@ -0,0 +1,6700 @@
+(function webpackUniversalModuleDefinition(root, factory) {
+/* istanbul ignore next */
+ if(typeof exports === 'object' && typeof module === 'object')
+ module.exports = factory();
+ else if(typeof define === 'function' && define.amd)
+ define([], factory);
+/* istanbul ignore next */
+ else if(typeof exports === 'object')
+ exports["esprima"] = factory();
+ else
+ root["esprima"] = 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
+/* istanbul ignore if */
+/******/ 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__) {
+
+ "use strict";
+ /*
+ Copyright JS Foundation and other contributors, https://js.foundation/
+
+ 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.
+
+ 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 <COPYRIGHT HOLDER> 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.
+ */
+ Object.defineProperty(exports, "__esModule", { value: true });
+ var comment_handler_1 = __webpack_require__(1);
+ var jsx_parser_1 = __webpack_require__(3);
+ var parser_1 = __webpack_require__(8);
+ var tokenizer_1 = __webpack_require__(15);
+ function parse(code, options, delegate) {
+ var commentHandler = null;
+ var proxyDelegate = function (node, metadata) {
+ if (delegate) {
+ delegate(node, metadata);
+ }
+ if (commentHandler) {
+ commentHandler.visit(node, metadata);
+ }
+ };
+ var parserDelegate = (typeof delegate === 'function') ? proxyDelegate : null;
+ var collectComment = false;
+ if (options) {
+ collectComment = (typeof options.comment === 'boolean' && options.comment);
+ var attachComment = (typeof options.attachComment === 'boolean' && options.attachComment);
+ if (collectComment || attachComment) {
+ commentHandler = new comment_handler_1.CommentHandler();
+ commentHandler.attach = attachComment;
+ options.comment = true;
+ parserDelegate = proxyDelegate;
+ }
+ }
+ var isModule = false;
+ if (options && typeof options.sourceType === 'string') {
+ isModule = (options.sourceType === 'module');
+ }
+ var parser;
+ if (options && typeof options.jsx === 'boolean' && options.jsx) {
+ parser = new jsx_parser_1.JSXParser(code, options, parserDelegate);
+ }
+ else {
+ parser = new parser_1.Parser(code, options, parserDelegate);
+ }
+ var program = isModule ? parser.parseModule() : parser.parseScript();
+ var ast = program;
+ if (collectComment && commentHandler) {
+ ast.comments = commentHandler.comments;
+ }
+ if (parser.config.tokens) {
+ ast.tokens = parser.tokens;
+ }
+ if (parser.config.tolerant) {
+ ast.errors = parser.errorHandler.errors;
+ }
+ return ast;
+ }
+ exports.parse = parse;
+ function parseModule(code, options, delegate) {
+ var parsingOptions = options || {};
+ parsingOptions.sourceType = 'module';
+ return parse(code, parsingOptions, delegate);
+ }
+ exports.parseModule = parseModule;
+ function parseScript(code, options, delegate) {
+ var parsingOptions = options || {};
+ parsingOptions.sourceType = 'script';
+ return parse(code, parsingOptions, delegate);
+ }
+ exports.parseScript = parseScript;
+ function tokenize(code, options, delegate) {
+ var tokenizer = new tokenizer_1.Tokenizer(code, options);
+ var tokens;
+ tokens = [];
+ try {
+ while (true) {
+ var token = tokenizer.getNextToken();
+ if (!token) {
+ break;
+ }
+ if (delegate) {
+ token = delegate(token);
+ }
+ tokens.push(token);
+ }
+ }
+ catch (e) {
+ tokenizer.errorHandler.tolerate(e);
+ }
+ if (tokenizer.errorHandler.tolerant) {
+ tokens.errors = tokenizer.errors();
+ }
+ return tokens;
+ }
+ exports.tokenize = tokenize;
+ var syntax_1 = __webpack_require__(2);
+ exports.Syntax = syntax_1.Syntax;
+ // Sync with *.json manifests.
+ exports.version = '4.0.0';
+
+
+/***/ },
+/* 1 */
+/***/ function(module, exports, __webpack_require__) {
+
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ var syntax_1 = __webpack_require__(2);
+ var CommentHandler = (function () {
+ function CommentHandler() {
+ this.attach = false;
+ this.comments = [];
+ this.stack = [];
+ this.leading = [];
+ this.trailing = [];
+ }
+ CommentHandler.prototype.insertInnerComments = function (node, metadata) {
+ // innnerComments for properties empty block
+ // `function a() {/** comments **\/}`
+ if (node.type === syntax_1.Syntax.BlockStatement && node.body.length === 0) {
+ var innerComments = [];
+ for (var i = this.leading.length - 1; i >= 0; --i) {
+ var entry = this.leading[i];
+ if (metadata.end.offset >= entry.start) {
+ innerComments.unshift(entry.comment);
+ this.leading.splice(i, 1);
+ this.trailing.splice(i, 1);
+ }
+ }
+ if (innerComments.length) {
+ node.innerComments = innerComments;
+ }
+ }
+ };
+ CommentHandler.prototype.findTrailingComments = function (metadata) {
+ var trailingComments = [];
+ if (this.trailing.length > 0) {
+ for (var i = this.trailing.length - 1; i >= 0; --i) {
+ var entry_1 = this.trailing[i];
+ if (entry_1.start >= metadata.end.offset) {
+ trailingComments.unshift(entry_1.comment);
+ }
+ }
+ this.trailing.length = 0;
+ return trailingComments;
+ }
+ var entry = this.stack[this.stack.length - 1];
+ if (entry && entry.node.trailingComments) {
+ var firstComment = entry.node.trailingComments[0];
+ if (firstComment && firstComment.range[0] >= metadata.end.offset) {
+ trailingComments = entry.node.trailingComments;
+ delete entry.node.trailingComments;
+ }
+ }
+ return trailingComments;
+ };
+ CommentHandler.prototype.findLeadingComments = function (metadata) {
+ var leadingComments = [];
+ var target;
+ while (this.stack.length > 0) {
+ var entry = this.stack[this.stack.length - 1];
+ if (entry && entry.start >= metadata.start.offset) {
+ target = entry.node;
+ this.stack.pop();
+ }
+ else {
+ break;
+ }
+ }
+ if (target) {
+ var count = target.leadingComments ? target.leadingComments.length : 0;
+ for (var i = count - 1; i >= 0; --i) {
+ var comment = target.leadingComments[i];
+ if (comment.range[1] <= metadata.start.offset) {
+ leadingComments.unshift(comment);
+ target.leadingComments.splice(i, 1);
+ }
+ }
+ if (target.leadingComments && target.leadingComments.length === 0) {
+ delete target.leadingComments;
+ }
+ return leadingComments;
+ }
+ for (var i = this.leading.length - 1; i >= 0; --i) {
+ var entry = this.leading[i];
+ if (entry.start <= metadata.start.offset) {
+ leadingComments.unshift(entry.comment);
+ this.leading.splice(i, 1);
+ }
+ }
+ return leadingComments;
+ };
+ CommentHandler.prototype.visitNode = function (node, metadata) {
+ if (node.type === syntax_1.Syntax.Program && node.body.length > 0) {
+ return;
+ }
+ this.insertInnerComments(node, metadata);
+ var trailingComments = this.findTrailingComments(metadata);
+ var leadingComments = this.findLeadingComments(metadata);
+ if (leadingComments.length > 0) {
+ node.leadingComments = leadingComments;
+ }
+ if (trailingComments.length > 0) {
+ node.trailingComments = trailingComments;
+ }
+ this.stack.push({
+ node: node,
+ start: metadata.start.offset
+ });
+ };
+ CommentHandler.prototype.visitComment = function (node, metadata) {
+ var type = (node.type[0] === 'L') ? 'Line' : 'Block';
+ var comment = {
+ type: type,
+ value: node.value
+ };
+ if (node.range) {
+ comment.range = node.range;
+ }
+ if (node.loc) {
+ comment.loc = node.loc;
+ }
+ this.comments.push(comment);
+ if (this.attach) {
+ var entry = {
+ comment: {
+ type: type,
+ value: node.value,
+ range: [metadata.start.offset, metadata.end.offset]
+ },
+ start: metadata.start.offset
+ };
+ if (node.loc) {
+ entry.comment.loc = node.loc;
+ }
+ node.type = type;
+ this.leading.push(entry);
+ this.trailing.push(entry);
+ }
+ };
+ CommentHandler.prototype.visit = function (node, metadata) {
+ if (node.type === 'LineComment') {
+ this.visitComment(node, metadata);
+ }
+ else if (node.type === 'BlockComment') {
+ this.visitComment(node, metadata);
+ }
+ else if (this.attach) {
+ this.visitNode(node, metadata);
+ }
+ };
+ return CommentHandler;
+ }());
+ exports.CommentHandler = CommentHandler;
+
+
+/***/ },
+/* 2 */
+/***/ function(module, exports) {
+
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.Syntax = {
+ AssignmentExpression: 'AssignmentExpression',
+ AssignmentPattern: 'AssignmentPattern',
+ ArrayExpression: 'ArrayExpression',
+ ArrayPattern: 'ArrayPattern',
+ ArrowFunctionExpression: 'ArrowFunctionExpression',
+ AwaitExpression: 'AwaitExpression',
+ BlockStatement: 'BlockStatement',
+ BinaryExpression: 'BinaryExpression',
+ BreakStatement: 'BreakStatement',
+ CallExpression: 'CallExpression',
+ CatchClause: 'CatchClause',
+ ClassBody: 'ClassBody',
+ ClassDeclaration: 'ClassDeclaration',
+ ClassExpression: 'ClassExpression',
+ ConditionalExpression: 'ConditionalExpression',
+ ContinueStatement: 'ContinueStatement',
+ DoWhileStatement: 'DoWhileStatement',
+ DebuggerStatement: 'DebuggerStatement',
+ EmptyStatement: 'EmptyStatement',
+ ExportAllDeclaration: 'ExportAllDeclaration',
+ ExportDefaultDeclaration: 'ExportDefaultDeclaration',
+ ExportNamedDeclaration: 'ExportNamedDeclaration',
+ ExportSpecifier: 'ExportSpecifier',
+ ExpressionStatement: 'ExpressionStatement',
+ ForStatement: 'ForStatement',
+ ForOfStatement: 'ForOfStatement',
+ ForInStatement: 'ForInStatement',
+ FunctionDeclaration: 'FunctionDeclaration',
+ FunctionExpression: 'FunctionExpression',
+ Identifier: 'Identifier',
+ IfStatement: 'IfStatement',
+ ImportDeclaration: 'ImportDeclaration',
+ ImportDefaultSpecifier: 'ImportDefaultSpecifier',
+ ImportNamespaceSpecifier: 'ImportNamespaceSpecifier',
+ ImportSpecifier: 'ImportSpecifier',
+ Literal: 'Literal',
+ LabeledStatement: 'LabeledStatement',
+ LogicalExpression: 'LogicalExpression',
+ MemberExpression: 'MemberExpression',
+ MetaProperty: 'MetaProperty',
+ MethodDefinition: 'MethodDefinition',
+ NewExpression: 'NewExpression',
+ ObjectExpression: 'ObjectExpression',
+ ObjectPattern: 'ObjectPattern',
+ Program: 'Program',
+ Property: 'Property',
+ RestElement: 'RestElement',
+ ReturnStatement: 'ReturnStatement',
+ SequenceExpression: 'SequenceExpression',
+ SpreadElement: 'SpreadElement',
+ Super: 'Super',
+ SwitchCase: 'SwitchCase',
+ SwitchStatement: 'SwitchStatement',
+ TaggedTemplateExpression: 'TaggedTemplateExpression',
+ TemplateElement: 'TemplateElement',
+ TemplateLiteral: 'TemplateLiteral',
+ ThisExpression: 'ThisExpression',
+ ThrowStatement: 'ThrowStatement',
+ TryStatement: 'TryStatement',
+ UnaryExpression: 'UnaryExpression',
+ UpdateExpression: 'UpdateExpression',
+ VariableDeclaration: 'VariableDeclaration',
+ VariableDeclarator: 'VariableDeclarator',
+ WhileStatement: 'WhileStatement',
+ WithStatement: 'WithStatement',
+ YieldExpression: 'YieldExpression'
+ };
+
+
+/***/ },
+/* 3 */
+/***/ function(module, exports, __webpack_require__) {
+
+ "use strict";
+/* istanbul ignore next */
+ var __extends = (this && this.__extends) || (function () {
+ var extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+ return function (d, b) {
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+ })();
+ Object.defineProperty(exports, "__esModule", { value: true });
+ var character_1 = __webpack_require__(4);
+ var JSXNode = __webpack_require__(5);
+ var jsx_syntax_1 = __webpack_require__(6);
+ var Node = __webpack_require__(7);
+ var parser_1 = __webpack_require__(8);
+ var token_1 = __webpack_require__(13);
+ var xhtml_entities_1 = __webpack_require__(14);
+ token_1.TokenName[100 /* Identifier */] = 'JSXIdentifier';
+ token_1.TokenName[101 /* Text */] = 'JSXText';
+ // Fully qualified element name, e.g. <svg:path> returns "svg:path"
+ function getQualifiedElementName(elementName) {
+ var qualifiedName;
+ switch (elementName.type) {
+ case jsx_syntax_1.JSXSyntax.JSXIdentifier:
+ var id = elementName;
+ qualifiedName = id.name;
+ break;
+ case jsx_syntax_1.JSXSyntax.JSXNamespacedName:
+ var ns = elementName;
+ qualifiedName = getQualifiedElementName(ns.namespace) + ':' +
+ getQualifiedElementName(ns.name);
+ break;
+ case jsx_syntax_1.JSXSyntax.JSXMemberExpression:
+ var expr = elementName;
+ qualifiedName = getQualifiedElementName(expr.object) + '.' +
+ getQualifiedElementName(expr.property);
+ break;
+ /* istanbul ignore next */
+ default:
+ break;
+ }
+ return qualifiedName;
+ }
+ var JSXParser = (function (_super) {
+ __extends(JSXParser, _super);
+ function JSXParser(code, options, delegate) {
+ return _super.call(this, code, options, delegate) || this;
+ }
+ JSXParser.prototype.parsePrimaryExpression = function () {
+ return this.match('<') ? this.parseJSXRoot() : _super.prototype.parsePrimaryExpression.call(this);
+ };
+ JSXParser.prototype.startJSX = function () {
+ // Unwind the scanner before the lookahead token.
+ this.scanner.index = this.startMarker.index;
+ this.scanner.lineNumber = this.startMarker.line;
+ this.scanner.lineStart = this.startMarker.index - this.startMarker.column;
+ };
+ JSXParser.prototype.finishJSX = function () {
+ // Prime the next lookahead.
+ this.nextToken();
+ };
+ JSXParser.prototype.reenterJSX = function () {
+ this.startJSX();
+ this.expectJSX('}');
+ // Pop the closing '}' added from the lookahead.
+ if (this.config.tokens) {
+ this.tokens.pop();
+ }
+ };
+ JSXParser.prototype.createJSXNode = function () {
+ this.collectComments();
+ return {
+ index: this.scanner.index,
+ line: this.scanner.lineNumber,
+ column: this.scanner.index - this.scanner.lineStart
+ };
+ };
+ JSXParser.prototype.createJSXChildNode = function () {
+ return {
+ index: this.scanner.index,
+ line: this.scanner.lineNumber,
+ column: this.scanner.index - this.scanner.lineStart
+ };
+ };
+ JSXParser.prototype.scanXHTMLEntity = function (quote) {
+ var result = '&';
+ var valid = true;
+ var terminated = false;
+ var numeric = false;
+ var hex = false;
+ while (!this.scanner.eof() && valid && !terminated) {
+ var ch = this.scanner.source[this.scanner.index];
+ if (ch === quote) {
+ break;
+ }
+ terminated = (ch === ';');
+ result += ch;
+ ++this.scanner.index;
+ if (!terminated) {
+ switch (result.length) {
+ case 2:
+ // e.g. '&#123;'
+ numeric = (ch === '#');
+ break;
+ case 3:
+ if (numeric) {
+ // e.g. '&#x41;'
+ hex = (ch === 'x');
+ valid = hex || character_1.Character.isDecimalDigit(ch.charCodeAt(0));
+ numeric = numeric && !hex;
+ }
+ break;
+ default:
+ valid = valid && !(numeric && !character_1.Character.isDecimalDigit(ch.charCodeAt(0)));
+ valid = valid && !(hex && !character_1.Character.isHexDigit(ch.charCodeAt(0)));
+ break;
+ }
+ }
+ }
+ if (valid && terminated && result.length > 2) {
+ // e.g. '&#x41;' becomes just '#x41'
+ var str = result.substr(1, result.length - 2);
+ if (numeric && str.length > 1) {
+ result = String.fromCharCode(parseInt(str.substr(1), 10));
+ }
+ else if (hex && str.length > 2) {
+ result = String.fromCharCode(parseInt('0' + str.substr(1), 16));
+ }
+ else if (!numeric && !hex && xhtml_entities_1.XHTMLEntities[str]) {
+ result = xhtml_entities_1.XHTMLEntities[str];
+ }
+ }
+ return result;
+ };
+ // Scan the next JSX token. This replaces Scanner#lex when in JSX mode.
+ JSXParser.prototype.lexJSX = function () {
+ var cp = this.scanner.source.charCodeAt(this.scanner.index);
+ // < > / : = { }
+ if (cp === 60 || cp === 62 || cp === 47 || cp === 58 || cp === 61 || cp === 123 || cp === 125) {
+ var value = this.scanner.source[this.scanner.index++];
+ return {
+ type: 7 /* Punctuator */,
+ value: value,
+ lineNumber: this.scanner.lineNumber,
+ lineStart: this.scanner.lineStart,
+ start: this.scanner.index - 1,
+ end: this.scanner.index
+ };
+ }
+ // " '
+ if (cp === 34 || cp === 39) {
+ var start = this.scanner.index;
+ var quote = this.scanner.source[this.scanner.index++];
+ var str = '';
+ while (!this.scanner.eof()) {
+ var ch = this.scanner.source[this.scanner.index++];
+ if (ch === quote) {
+ break;
+ }
+ else if (ch === '&') {
+ str += this.scanXHTMLEntity(quote);
+ }
+ else {
+ str += ch;
+ }
+ }
+ return {
+ type: 8 /* StringLiteral */,
+ value: str,
+ lineNumber: this.scanner.lineNumber,
+ lineStart: this.scanner.lineStart,
+ start: start,
+ end: this.scanner.index
+ };
+ }
+ // ... or .
+ if (cp === 46) {
+ var n1 = this.scanner.source.charCodeAt(this.scanner.index + 1);
+ var n2 = this.scanner.source.charCodeAt(this.scanner.index + 2);
+ var value = (n1 === 46 && n2 === 46) ? '...' : '.';
+ var start = this.scanner.index;
+ this.scanner.index += value.length;
+ return {
+ type: 7 /* Punctuator */,
+ value: value,
+ lineNumber: this.scanner.lineNumber,
+ lineStart: this.scanner.lineStart,
+ start: start,
+ end: this.scanner.index
+ };
+ }
+ // `
+ if (cp === 96) {
+ // Only placeholder, since it will be rescanned as a real assignment expression.
+ return {
+ type: 10 /* Template */,
+ value: '',
+ lineNumber: this.scanner.lineNumber,
+ lineStart: this.scanner.lineStart,
+ start: this.scanner.index,
+ end: this.scanner.index
+ };
+ }
+ // Identifer can not contain backslash (char code 92).
+ if (character_1.Character.isIdentifierStart(cp) && (cp !== 92)) {
+ var start = this.scanner.index;
+ ++this.scanner.index;
+ while (!this.scanner.eof()) {
+ var ch = this.scanner.source.charCodeAt(this.scanner.index);
+ if (character_1.Character.isIdentifierPart(ch) && (ch !== 92)) {
+ ++this.scanner.index;
+ }
+ else if (ch === 45) {
+ // Hyphen (char code 45) can be part of an identifier.
+ ++this.scanner.index;
+ }
+ else {
+ break;
+ }
+ }
+ var id = this.scanner.source.slice(start, this.scanner.index);
+ return {
+ type: 100 /* Identifier */,
+ value: id,
+ lineNumber: this.scanner.lineNumber,
+ lineStart: this.scanner.lineStart,
+ start: start,
+ end: this.scanner.index
+ };
+ }
+ return this.scanner.lex();
+ };
+ JSXParser.prototype.nextJSXToken = function () {
+ this.collectComments();
+ this.startMarker.index = this.scanner.index;
+ this.startMarker.line = this.scanner.lineNumber;
+ this.startMarker.column = this.scanner.index - this.scanner.lineStart;
+ var token = this.lexJSX();
+ this.lastMarker.index = this.scanner.index;
+ this.lastMarker.line = this.scanner.lineNumber;
+ this.lastMarker.column = this.scanner.index - this.scanner.lineStart;
+ if (this.config.tokens) {
+ this.tokens.push(this.convertToken(token));
+ }
+ return token;
+ };
+ JSXParser.prototype.nextJSXText = function () {
+ this.startMarker.index = this.scanner.index;
+ this.startMarker.line = this.scanner.lineNumber;
+ this.startMarker.column = this.scanner.index - this.scanner.lineStart;
+ var start = this.scanner.index;
+ var text = '';
+ while (!this.scanner.eof()) {
+ var ch = this.scanner.source[this.scanner.index];
+ if (ch === '{' || ch === '<') {
+ break;
+ }
+ ++this.scanner.index;
+ text += ch;
+ if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) {
+ ++this.scanner.lineNumber;
+ if (ch === '\r' && this.scanner.source[this.scanner.index] === '\n') {
+ ++this.scanner.index;
+ }
+ this.scanner.lineStart = this.scanner.index;
+ }
+ }
+ this.lastMarker.index = this.scanner.index;
+ this.lastMarker.line = this.scanner.lineNumber;
+ this.lastMarker.column = this.scanner.index - this.scanner.lineStart;
+ var token = {
+ type: 101 /* Text */,
+ value: text,
+ lineNumber: this.scanner.lineNumber,
+ lineStart: this.scanner.lineStart,
+ start: start,
+ end: this.scanner.index
+ };
+ if ((text.length > 0) && this.config.tokens) {
+ this.tokens.push(this.convertToken(token));
+ }
+ return token;
+ };
+ JSXParser.prototype.peekJSXToken = function () {
+ var state = this.scanner.saveState();
+ this.scanner.scanComments();
+ var next = this.lexJSX();
+ this.scanner.restoreState(state);
+ return next;
+ };
+ // Expect the next JSX token to match the specified punctuator.
+ // If not, an exception will be thrown.
+ JSXParser.prototype.expectJSX = function (value) {
+ var token = this.nextJSXToken();
+ if (token.type !== 7 /* Punctuator */ || token.value !== value) {
+ this.throwUnexpectedToken(token);
+ }
+ };
+ // Return true if the next JSX token matches the specified punctuator.
+ JSXParser.prototype.matchJSX = function (value) {
+ var next = this.peekJSXToken();
+ return next.type === 7 /* Punctuator */ && next.value === value;
+ };
+ JSXParser.prototype.parseJSXIdentifier = function () {
+ var node = this.createJSXNode();
+ var token = this.nextJSXToken();
+ if (token.type !== 100 /* Identifier */) {
+ this.throwUnexpectedToken(token);
+ }
+ return this.finalize(node, new JSXNode.JSXIdentifier(token.value));
+ };
+ JSXParser.prototype.parseJSXElementName = function () {
+ var node = this.createJSXNode();
+ var elementName = this.parseJSXIdentifier();
+ if (this.matchJSX(':')) {
+ var namespace = elementName;
+ this.expectJSX(':');
+ var name_1 = this.parseJSXIdentifier();
+ elementName = this.finalize(node, new JSXNode.JSXNamespacedName(namespace, name_1));
+ }
+ else if (this.matchJSX('.')) {
+ while (this.matchJSX('.')) {
+ var object = elementName;
+ this.expectJSX('.');
+ var property = this.parseJSXIdentifier();
+ elementName = this.finalize(node, new JSXNode.JSXMemberExpression(object, property));
+ }
+ }
+ return elementName;
+ };
+ JSXParser.prototype.parseJSXAttributeName = function () {
+ var node = this.createJSXNode();
+ var attributeName;
+ var identifier = this.parseJSXIdentifier();
+ if (this.matchJSX(':')) {
+ var namespace = identifier;
+ this.expectJSX(':');
+ var name_2 = this.parseJSXIdentifier();
+ attributeName = this.finalize(node, new JSXNode.JSXNamespacedName(namespace, name_2));
+ }
+ else {
+ attributeName = identifier;
+ }
+ return attributeName;
+ };
+ JSXParser.prototype.parseJSXStringLiteralAttribute = function () {
+ var node = this.createJSXNode();
+ var token = this.nextJSXToken();
+ if (token.type !== 8 /* StringLiteral */) {
+ this.throwUnexpectedToken(token);
+ }
+ var raw = this.getTokenRaw(token);
+ return this.finalize(node, new Node.Literal(token.value, raw));
+ };
+ JSXParser.prototype.parseJSXExpressionAttribute = function () {
+ var node = this.createJSXNode();
+ this.expectJSX('{');
+ this.finishJSX();
+ if (this.match('}')) {
+ this.tolerateError('JSX attributes must only be assigned a non-empty expression');
+ }
+ var expression = this.parseAssignmentExpression();
+ this.reenterJSX();
+ return this.finalize(node, new JSXNode.JSXExpressionContainer(expression));
+ };
+ JSXParser.prototype.parseJSXAttributeValue = function () {
+ return this.matchJSX('{') ? this.parseJSXExpressionAttribute() :
+ this.matchJSX('<') ? this.parseJSXElement() : this.parseJSXStringLiteralAttribute();
+ };
+ JSXParser.prototype.parseJSXNameValueAttribute = function () {
+ var node = this.createJSXNode();
+ var name = this.parseJSXAttributeName();
+ var value = null;
+ if (this.matchJSX('=')) {
+ this.expectJSX('=');
+ value = this.parseJSXAttributeValue();
+ }
+ return this.finalize(node, new JSXNode.JSXAttribute(name, value));
+ };
+ JSXParser.prototype.parseJSXSpreadAttribute = function () {
+ var node = this.createJSXNode();
+ this.expectJSX('{');
+ this.expectJSX('...');
+ this.finishJSX();
+ var argument = this.parseAssignmentExpression();
+ this.reenterJSX();
+ return this.finalize(node, new JSXNode.JSXSpreadAttribute(argument));
+ };
+ JSXParser.prototype.parseJSXAttributes = function () {
+ var attributes = [];
+ while (!this.matchJSX('/') && !this.matchJSX('>')) {
+ var attribute = this.matchJSX('{') ? this.parseJSXSpreadAttribute() :
+ this.parseJSXNameValueAttribute();
+ attributes.push(attribute);
+ }
+ return attributes;
+ };
+ JSXParser.prototype.parseJSXOpeningElement = function () {
+ var node = this.createJSXNode();
+ this.expectJSX('<');
+ var name = this.parseJSXElementName();
+ var attributes = this.parseJSXAttributes();
+ var selfClosing = this.matchJSX('/');
+ if (selfClosing) {
+ this.expectJSX('/');
+ }
+ this.expectJSX('>');
+ return this.finalize(node, new JSXNode.JSXOpeningElement(name, selfClosing, attributes));
+ };
+ JSXParser.prototype.parseJSXBoundaryElement = function () {
+ var node = this.createJSXNode();
+ this.expectJSX('<');
+ if (this.matchJSX('/')) {
+ this.expectJSX('/');
+ var name_3 = this.parseJSXElementName();
+ this.expectJSX('>');
+ return this.finalize(node, new JSXNode.JSXClosingElement(name_3));
+ }
+ var name = this.parseJSXElementName();
+ var attributes = this.parseJSXAttributes();
+ var selfClosing = this.matchJSX('/');
+ if (selfClosing) {
+ this.expectJSX('/');
+ }
+ this.expectJSX('>');
+ return this.finalize(node, new JSXNode.JSXOpeningElement(name, selfClosing, attributes));
+ };
+ JSXParser.prototype.parseJSXEmptyExpression = function () {
+ var node = this.createJSXChildNode();
+ this.collectComments();
+ this.lastMarker.index = this.scanner.index;
+ this.lastMarker.line = this.scanner.lineNumber;
+ this.lastMarker.column = this.scanner.index - this.scanner.lineStart;
+ return this.finalize(node, new JSXNode.JSXEmptyExpression());
+ };
+ JSXParser.prototype.parseJSXExpressionContainer = function () {
+ var node = this.createJSXNode();
+ this.expectJSX('{');
+ var expression;
+ if (this.matchJSX('}')) {
+ expression = this.parseJSXEmptyExpression();
+ this.expectJSX('}');
+ }
+ else {
+ this.finishJSX();
+ expression = this.parseAssignmentExpression();
+ this.reenterJSX();
+ }
+ return this.finalize(node, new JSXNode.JSXExpressionContainer(expression));
+ };
+ JSXParser.prototype.parseJSXChildren = function () {
+ var children = [];
+ while (!this.scanner.eof()) {
+ var node = this.createJSXChildNode();
+ var token = this.nextJSXText();
+ if (token.start < token.end) {
+ var raw = this.getTokenRaw(token);
+ var child = this.finalize(node, new JSXNode.JSXText(token.value, raw));
+ children.push(child);
+ }
+ if (this.scanner.source[this.scanner.index] === '{') {
+ var container = this.parseJSXExpressionContainer();
+ children.push(container);
+ }
+ else {
+ break;
+ }
+ }
+ return children;
+ };
+ JSXParser.prototype.parseComplexJSXElement = function (el) {
+ var stack = [];
+ while (!this.scanner.eof()) {
+ el.children = el.children.concat(this.parseJSXChildren());
+ var node = this.createJSXChildNode();
+ var element = this.parseJSXBoundaryElement();
+ if (element.type === jsx_syntax_1.JSXSyntax.JSXOpeningElement) {
+ var opening = element;
+ if (opening.selfClosing) {
+ var child = this.finalize(node, new JSXNode.JSXElement(opening, [], null));
+ el.children.push(child);
+ }
+ else {
+ stack.push(el);
+ el = { node: node, opening: opening, closing: null, children: [] };
+ }
+ }
+ if (element.type === jsx_syntax_1.JSXSyntax.JSXClosingElement) {
+ el.closing = element;
+ var open_1 = getQualifiedElementName(el.opening.name);
+ var close_1 = getQualifiedElementName(el.closing.name);
+ if (open_1 !== close_1) {
+ this.tolerateError('Expected corresponding JSX closing tag for %0', open_1);
+ }
+ if (stack.length > 0) {
+ var child = this.finalize(el.node, new JSXNode.JSXElement(el.opening, el.children, el.closing));
+ el = stack[stack.length - 1];
+ el.children.push(child);
+ stack.pop();
+ }
+ else {
+ break;
+ }
+ }
+ }
+ return el;
+ };
+ JSXParser.prototype.parseJSXElement = function () {
+ var node = this.createJSXNode();
+ var opening = this.parseJSXOpeningElement();
+ var children = [];
+ var closing = null;
+ if (!opening.selfClosing) {
+ var el = this.parseComplexJSXElement({ node: node, opening: opening, closing: closing, children: children });
+ children = el.children;
+ closing = el.closing;
+ }
+ return this.finalize(node, new JSXNode.JSXElement(opening, children, closing));
+ };
+ JSXParser.prototype.parseJSXRoot = function () {
+ // Pop the opening '<' added from the lookahead.
+ if (this.config.tokens) {
+ this.tokens.pop();
+ }
+ this.startJSX();
+ var element = this.parseJSXElement();
+ this.finishJSX();
+ return element;
+ };
+ JSXParser.prototype.isStartOfExpression = function () {
+ return _super.prototype.isStartOfExpression.call(this) || this.match('<');
+ };
+ return JSXParser;
+ }(parser_1.Parser));
+ exports.JSXParser = JSXParser;
+
+
+/***/ },
+/* 4 */
+/***/ function(module, exports) {
+
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ // See also tools/generate-unicode-regex.js.
+ var Regex = {
+ // Unicode v8.0.0 NonAsciiIdentifierStart:
+ NonAsciiIdentifierStart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,
+ // Unicode v8.0.0 NonAsciiIdentifierPart:
+ NonAsciiIdentifierPart: /[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/
+ };
+ exports.Character = {
+ /* tslint:disable:no-bitwise */
+ fromCodePoint: function (cp) {
+ return (cp < 0x10000) ? String.fromCharCode(cp) :
+ String.fromCharCode(0xD800 + ((cp - 0x10000) >> 10)) +
+ String.fromCharCode(0xDC00 + ((cp - 0x10000) & 1023));
+ },
+ // https://tc39.github.io/ecma262/#sec-white-space
+ isWhiteSpace: function (cp) {
+ return (cp === 0x20) || (cp === 0x09) || (cp === 0x0B) || (cp === 0x0C) || (cp === 0xA0) ||
+ (cp >= 0x1680 && [0x1680, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202F, 0x205F, 0x3000, 0xFEFF].indexOf(cp) >= 0);
+ },
+ // https://tc39.github.io/ecma262/#sec-line-terminators
+ isLineTerminator: function (cp) {
+ return (cp === 0x0A) || (cp === 0x0D) || (cp === 0x2028) || (cp === 0x2029);
+ },
+ // https://tc39.github.io/ecma262/#sec-names-and-keywords
+ isIdentifierStart: function (cp) {
+ return (cp === 0x24) || (cp === 0x5F) ||
+ (cp >= 0x41 && cp <= 0x5A) ||
+ (cp >= 0x61 && cp <= 0x7A) ||
+ (cp === 0x5C) ||
+ ((cp >= 0x80) && Regex.NonAsciiIdentifierStart.test(exports.Character.fromCodePoint(cp)));
+ },
+ isIdentifierPart: function (cp) {
+ return (cp === 0x24) || (cp === 0x5F) ||
+ (cp >= 0x41 && cp <= 0x5A) ||
+ (cp >= 0x61 && cp <= 0x7A) ||
+ (cp >= 0x30 && cp <= 0x39) ||
+ (cp === 0x5C) ||
+ ((cp >= 0x80) && Regex.NonAsciiIdentifierPart.test(exports.Character.fromCodePoint(cp)));
+ },
+ // https://tc39.github.io/ecma262/#sec-literals-numeric-literals
+ isDecimalDigit: function (cp) {
+ return (cp >= 0x30 && cp <= 0x39); // 0..9
+ },
+ isHexDigit: function (cp) {
+ return (cp >= 0x30 && cp <= 0x39) ||
+ (cp >= 0x41 && cp <= 0x46) ||
+ (cp >= 0x61 && cp <= 0x66); // a..f
+ },
+ isOctalDigit: function (cp) {
+ return (cp >= 0x30 && cp <= 0x37); // 0..7
+ }
+ };
+
+
+/***/ },
+/* 5 */
+/***/ function(module, exports, __webpack_require__) {
+
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ var jsx_syntax_1 = __webpack_require__(6);
+ /* tslint:disable:max-classes-per-file */
+ var JSXClosingElement = (function () {
+ function JSXClosingElement(name) {
+ this.type = jsx_syntax_1.JSXSyntax.JSXClosingElement;
+ this.name = name;
+ }
+ return JSXClosingElement;
+ }());
+ exports.JSXClosingElement = JSXClosingElement;
+ var JSXElement = (function () {
+ function JSXElement(openingElement, children, closingElement) {
+ this.type = jsx_syntax_1.JSXSyntax.JSXElement;
+ this.openingElement = openingElement;
+ this.children = children;
+ this.closingElement = closingElement;
+ }
+ return JSXElement;
+ }());
+ exports.JSXElement = JSXElement;
+ var JSXEmptyExpression = (function () {
+ function JSXEmptyExpression() {
+ this.type = jsx_syntax_1.JSXSyntax.JSXEmptyExpression;
+ }
+ return JSXEmptyExpression;
+ }());
+ exports.JSXEmptyExpression = JSXEmptyExpression;
+ var JSXExpressionContainer = (function () {
+ function JSXExpressionContainer(expression) {
+ this.type = jsx_syntax_1.JSXSyntax.JSXExpressionContainer;
+ this.expression = expression;
+ }
+ return JSXExpressionContainer;
+ }());
+ exports.JSXExpressionContainer = JSXExpressionContainer;
+ var JSXIdentifier = (function () {
+ function JSXIdentifier(name) {
+ this.type = jsx_syntax_1.JSXSyntax.JSXIdentifier;
+ this.name = name;
+ }
+ return JSXIdentifier;
+ }());
+ exports.JSXIdentifier = JSXIdentifier;
+ var JSXMemberExpression = (function () {
+ function JSXMemberExpression(object, property) {
+ this.type = jsx_syntax_1.JSXSyntax.JSXMemberExpression;
+ this.object = object;
+ this.property = property;
+ }
+ return JSXMemberExpression;
+ }());
+ exports.JSXMemberExpression = JSXMemberExpression;
+ var JSXAttribute = (function () {
+ function JSXAttribute(name, value) {
+ this.type = jsx_syntax_1.JSXSyntax.JSXAttribute;
+ this.name = name;
+ this.value = value;
+ }
+ return JSXAttribute;
+ }());
+ exports.JSXAttribute = JSXAttribute;
+ var JSXNamespacedName = (function () {
+ function JSXNamespacedName(namespace, name) {
+ this.type = jsx_syntax_1.JSXSyntax.JSXNamespacedName;
+ this.namespace = namespace;
+ this.name = name;
+ }
+ return JSXNamespacedName;
+ }());
+ exports.JSXNamespacedName = JSXNamespacedName;
+ var JSXOpeningElement = (function () {
+ function JSXOpeningElement(name, selfClosing, attributes) {
+ this.type = jsx_syntax_1.JSXSyntax.JSXOpeningElement;
+ this.name = name;
+ this.selfClosing = selfClosing;
+ this.attributes = attributes;
+ }
+ return JSXOpeningElement;
+ }());
+ exports.JSXOpeningElement = JSXOpeningElement;
+ var JSXSpreadAttribute = (function () {
+ function JSXSpreadAttribute(argument) {
+ this.type = jsx_syntax_1.JSXSyntax.JSXSpreadAttribute;
+ this.argument = argument;
+ }
+ return JSXSpreadAttribute;
+ }());
+ exports.JSXSpreadAttribute = JSXSpreadAttribute;
+ var JSXText = (function () {
+ function JSXText(value, raw) {
+ this.type = jsx_syntax_1.JSXSyntax.JSXText;
+ this.value = value;
+ this.raw = raw;
+ }
+ return JSXText;
+ }());
+ exports.JSXText = JSXText;
+
+
+/***/ },
+/* 6 */
+/***/ function(module, exports) {
+
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.JSXSyntax = {
+ JSXAttribute: 'JSXAttribute',
+ JSXClosingElement: 'JSXClosingElement',
+ JSXElement: 'JSXElement',
+ JSXEmptyExpression: 'JSXEmptyExpression',
+ JSXExpressionContainer: 'JSXExpressionContainer',
+ JSXIdentifier: 'JSXIdentifier',
+ JSXMemberExpression: 'JSXMemberExpression',
+ JSXNamespacedName: 'JSXNamespacedName',
+ JSXOpeningElement: 'JSXOpeningElement',
+ JSXSpreadAttribute: 'JSXSpreadAttribute',
+ JSXText: 'JSXText'
+ };
+
+
+/***/ },
+/* 7 */
+/***/ function(module, exports, __webpack_require__) {
+
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ var syntax_1 = __webpack_require__(2);
+ /* tslint:disable:max-classes-per-file */
+ var ArrayExpression = (function () {
+ function ArrayExpression(elements) {
+ this.type = syntax_1.Syntax.ArrayExpression;
+ this.elements = elements;
+ }
+ return ArrayExpression;
+ }());
+ exports.ArrayExpression = ArrayExpression;
+ var ArrayPattern = (function () {
+ function ArrayPattern(elements) {
+ this.type = syntax_1.Syntax.ArrayPattern;
+ this.elements = elements;
+ }
+ return ArrayPattern;
+ }());
+ exports.ArrayPattern = ArrayPattern;
+ var ArrowFunctionExpression = (function () {
+ function ArrowFunctionExpression(params, body, expression) {
+ this.type = syntax_1.Syntax.ArrowFunctionExpression;
+ this.id = null;
+ this.params = params;
+ this.body = body;
+ this.generator = false;
+ this.expression = expression;
+ this.async = false;
+ }
+ return ArrowFunctionExpression;
+ }());
+ exports.ArrowFunctionExpression = ArrowFunctionExpression;
+ var AssignmentExpression = (function () {
+ function AssignmentExpression(operator, left, right) {
+ this.type = syntax_1.Syntax.AssignmentExpression;
+ this.operator = operator;
+ this.left = left;
+ this.right = right;
+ }
+ return AssignmentExpression;
+ }());
+ exports.AssignmentExpression = AssignmentExpression;
+ var AssignmentPattern = (function () {
+ function AssignmentPattern(left, right) {
+ this.type = syntax_1.Syntax.AssignmentPattern;
+ this.left = left;
+ this.right = right;
+ }
+ return AssignmentPattern;
+ }());
+ exports.AssignmentPattern = AssignmentPattern;
+ var AsyncArrowFunctionExpression = (function () {
+ function AsyncArrowFunctionExpression(params, body, expression) {
+ this.type = syntax_1.Syntax.ArrowFunctionExpression;
+ this.id = null;
+ this.params = params;
+ this.body = body;
+ this.generator = false;
+ this.expression = expression;
+ this.async = true;
+ }
+ return AsyncArrowFunctionExpression;
+ }());
+ exports.AsyncArrowFunctionExpression = AsyncArrowFunctionExpression;
+ var AsyncFunctionDeclaration = (function () {
+ function AsyncFunctionDeclaration(id, params, body) {
+ this.type = syntax_1.Syntax.FunctionDeclaration;
+ this.id = id;
+ this.params = params;
+ this.body = body;
+ this.generator = false;
+ this.expression = false;
+ this.async = true;
+ }
+ return AsyncFunctionDeclaration;
+ }());
+ exports.AsyncFunctionDeclaration = AsyncFunctionDeclaration;
+ var AsyncFunctionExpression = (function () {
+ function AsyncFunctionExpression(id, params, body) {
+ this.type = syntax_1.Syntax.FunctionExpression;
+ this.id = id;
+ this.params = params;
+ this.body = body;
+ this.generator = false;
+ this.expression = false;
+ this.async = true;
+ }
+ return AsyncFunctionExpression;
+ }());
+ exports.AsyncFunctionExpression = AsyncFunctionExpression;
+ var AwaitExpression = (function () {
+ function AwaitExpression(argument) {
+ this.type = syntax_1.Syntax.AwaitExpression;
+ this.argument = argument;
+ }
+ return AwaitExpression;
+ }());
+ exports.AwaitExpression = AwaitExpression;
+ var BinaryExpression = (function () {
+ function BinaryExpression(operator, left, right) {
+ var logical = (operator === '||' || operator === '&&');
+ this.type = logical ? syntax_1.Syntax.LogicalExpression : syntax_1.Syntax.BinaryExpression;
+ this.operator = operator;
+ this.left = left;
+ this.right = right;
+ }
+ return BinaryExpression;
+ }());
+ exports.BinaryExpression = BinaryExpression;
+ var BlockStatement = (function () {
+ function BlockStatement(body) {
+ this.type = syntax_1.Syntax.BlockStatement;
+ this.body = body;
+ }
+ return BlockStatement;
+ }());
+ exports.BlockStatement = BlockStatement;
+ var BreakStatement = (function () {
+ function BreakStatement(label) {
+ this.type = syntax_1.Syntax.BreakStatement;
+ this.label = label;
+ }
+ return BreakStatement;
+ }());
+ exports.BreakStatement = BreakStatement;
+ var CallExpression = (function () {
+ function CallExpression(callee, args) {
+ this.type = syntax_1.Syntax.CallExpression;
+ this.callee = callee;
+ this.arguments = args;
+ }
+ return CallExpression;
+ }());
+ exports.CallExpression = CallExpression;
+ var CatchClause = (function () {
+ function CatchClause(param, body) {
+ this.type = syntax_1.Syntax.CatchClause;
+ this.param = param;
+ this.body = body;
+ }
+ return CatchClause;
+ }());
+ exports.CatchClause = CatchClause;
+ var ClassBody = (function () {
+ function ClassBody(body) {
+ this.type = syntax_1.Syntax.ClassBody;
+ this.body = body;
+ }
+ return ClassBody;
+ }());
+ exports.ClassBody = ClassBody;
+ var ClassDeclaration = (function () {
+ function ClassDeclaration(id, superClass, body) {
+ this.type = syntax_1.Syntax.ClassDeclaration;
+ this.id = id;
+ this.superClass = superClass;
+ this.body = body;
+ }
+ return ClassDeclaration;
+ }());
+ exports.ClassDeclaration = ClassDeclaration;
+ var ClassExpression = (function () {
+ function ClassExpression(id, superClass, body) {
+ this.type = syntax_1.Syntax.ClassExpression;
+ this.id = id;
+ this.superClass = superClass;
+ this.body = body;
+ }
+ return ClassExpression;
+ }());
+ exports.ClassExpression = ClassExpression;
+ var ComputedMemberExpression = (function () {
+ function ComputedMemberExpression(object, property) {
+ this.type = syntax_1.Syntax.MemberExpression;
+ this.computed = true;
+ this.object = object;
+ this.property = property;
+ }
+ return ComputedMemberExpression;
+ }());
+ exports.ComputedMemberExpression = ComputedMemberExpression;
+ var ConditionalExpression = (function () {
+ function ConditionalExpression(test, consequent, alternate) {
+ this.type = syntax_1.Syntax.ConditionalExpression;
+ this.test = test;
+ this.consequent = consequent;
+ this.alternate = alternate;
+ }
+ return ConditionalExpression;
+ }());
+ exports.ConditionalExpression = ConditionalExpression;
+ var ContinueStatement = (function () {
+ function ContinueStatement(label) {
+ this.type = syntax_1.Syntax.ContinueStatement;
+ this.label = label;
+ }
+ return ContinueStatement;
+ }());
+ exports.ContinueStatement = ContinueStatement;
+ var DebuggerStatement = (function () {
+ function DebuggerStatement() {
+ this.type = syntax_1.Syntax.DebuggerStatement;
+ }
+ return DebuggerStatement;
+ }());
+ exports.DebuggerStatement = DebuggerStatement;
+ var Directive = (function () {
+ function Directive(expression, directive) {
+ this.type = syntax_1.Syntax.ExpressionStatement;
+ this.expression = expression;
+ this.directive = directive;
+ }
+ return Directive;
+ }());
+ exports.Directive = Directive;
+ var DoWhileStatement = (function () {
+ function DoWhileStatement(body, test) {
+ this.type = syntax_1.Syntax.DoWhileStatement;
+ this.body = body;
+ this.test = test;
+ }
+ return DoWhileStatement;
+ }());
+ exports.DoWhileStatement = DoWhileStatement;
+ var EmptyStatement = (function () {
+ function EmptyStatement() {
+ this.type = syntax_1.Syntax.EmptyStatement;
+ }
+ return EmptyStatement;
+ }());
+ exports.EmptyStatement = EmptyStatement;
+ var ExportAllDeclaration = (function () {
+ function ExportAllDeclaration(source) {
+ this.type = syntax_1.Syntax.ExportAllDeclaration;
+ this.source = source;
+ }
+ return ExportAllDeclaration;
+ }());
+ exports.ExportAllDeclaration = ExportAllDeclaration;
+ var ExportDefaultDeclaration = (function () {
+ function ExportDefaultDeclaration(declaration) {
+ this.type = syntax_1.Syntax.ExportDefaultDeclaration;
+ this.declaration = declaration;
+ }
+ return ExportDefaultDeclaration;
+ }());
+ exports.ExportDefaultDeclaration = ExportDefaultDeclaration;
+ var ExportNamedDeclaration = (function () {
+ function ExportNamedDeclaration(declaration, specifiers, source) {
+ this.type = syntax_1.Syntax.ExportNamedDeclaration;
+ this.declaration = declaration;
+ this.specifiers = specifiers;
+ this.source = source;
+ }
+ return ExportNamedDeclaration;
+ }());
+ exports.ExportNamedDeclaration = ExportNamedDeclaration;
+ var ExportSpecifier = (function () {
+ function ExportSpecifier(local, exported) {
+ this.type = syntax_1.Syntax.ExportSpecifier;
+ this.exported = exported;
+ this.local = local;
+ }
+ return ExportSpecifier;
+ }());
+ exports.ExportSpecifier = ExportSpecifier;
+ var ExpressionStatement = (function () {
+ function ExpressionStatement(expression) {
+ this.type = syntax_1.Syntax.ExpressionStatement;
+ this.expression = expression;
+ }
+ return ExpressionStatement;
+ }());
+ exports.ExpressionStatement = ExpressionStatement;
+ var ForInStatement = (function () {
+ function ForInStatement(left, right, body) {
+ this.type = syntax_1.Syntax.ForInStatement;
+ this.left = left;
+ this.right = right;
+ this.body = body;
+ this.each = false;
+ }
+ return ForInStatement;
+ }());
+ exports.ForInStatement = ForInStatement;
+ var ForOfStatement = (function () {
+ function ForOfStatement(left, right, body) {
+ this.type = syntax_1.Syntax.ForOfStatement;
+ this.left = left;
+ this.right = right;
+ this.body = body;
+ }
+ return ForOfStatement;
+ }());
+ exports.ForOfStatement = ForOfStatement;
+ var ForStatement = (function () {
+ function ForStatement(init, test, update, body) {
+ this.type = syntax_1.Syntax.ForStatement;
+ this.init = init;
+ this.test = test;
+ this.update = update;
+ this.body = body;
+ }
+ return ForStatement;
+ }());
+ exports.ForStatement = ForStatement;
+ var FunctionDeclaration = (function () {
+ function FunctionDeclaration(id, params, body, generator) {
+ this.type = syntax_1.Syntax.FunctionDeclaration;
+ this.id = id;
+ this.params = params;
+ this.body = body;
+ this.generator = generator;
+ this.expression = false;
+ this.async = false;
+ }
+ return FunctionDeclaration;
+ }());
+ exports.FunctionDeclaration = FunctionDeclaration;
+ var FunctionExpression = (function () {
+ function FunctionExpression(id, params, body, generator) {
+ this.type = syntax_1.Syntax.FunctionExpression;
+ this.id = id;
+ this.params = params;
+ this.body = body;
+ this.generator = generator;
+ this.expression = false;
+ this.async = false;
+ }
+ return FunctionExpression;
+ }());
+ exports.FunctionExpression = FunctionExpression;
+ var Identifier = (function () {
+ function Identifier(name) {
+ this.type = syntax_1.Syntax.Identifier;
+ this.name = name;
+ }
+ return Identifier;
+ }());
+ exports.Identifier = Identifier;
+ var IfStatement = (function () {
+ function IfStatement(test, consequent, alternate) {
+ this.type = syntax_1.Syntax.IfStatement;
+ this.test = test;
+ this.consequent = consequent;
+ this.alternate = alternate;
+ }
+ return IfStatement;
+ }());
+ exports.IfStatement = IfStatement;
+ var ImportDeclaration = (function () {
+ function ImportDeclaration(specifiers, source) {
+ this.type = syntax_1.Syntax.ImportDeclaration;
+ this.specifiers = specifiers;
+ this.source = source;
+ }
+ return ImportDeclaration;
+ }());
+ exports.ImportDeclaration = ImportDeclaration;
+ var ImportDefaultSpecifier = (function () {
+ function ImportDefaultSpecifier(local) {
+ this.type = syntax_1.Syntax.ImportDefaultSpecifier;
+ this.local = local;
+ }
+ return ImportDefaultSpecifier;
+ }());
+ exports.ImportDefaultSpecifier = ImportDefaultSpecifier;
+ var ImportNamespaceSpecifier = (function () {
+ function ImportNamespaceSpecifier(local) {
+ this.type = syntax_1.Syntax.ImportNamespaceSpecifier;
+ this.local = local;
+ }
+ return ImportNamespaceSpecifier;
+ }());
+ exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier;
+ var ImportSpecifier = (function () {
+ function ImportSpecifier(local, imported) {
+ this.type = syntax_1.Syntax.ImportSpecifier;
+ this.local = local;
+ this.imported = imported;
+ }
+ return ImportSpecifier;
+ }());
+ exports.ImportSpecifier = ImportSpecifier;
+ var LabeledStatement = (function () {
+ function LabeledStatement(label, body) {
+ this.type = syntax_1.Syntax.LabeledStatement;
+ this.label = label;
+ this.body = body;
+ }
+ return LabeledStatement;
+ }());
+ exports.LabeledStatement = LabeledStatement;
+ var Literal = (function () {
+ function Literal(value, raw) {
+ this.type = syntax_1.Syntax.Literal;
+ this.value = value;
+ this.raw = raw;
+ }
+ return Literal;
+ }());
+ exports.Literal = Literal;
+ var MetaProperty = (function () {
+ function MetaProperty(meta, property) {
+ this.type = syntax_1.Syntax.MetaProperty;
+ this.meta = meta;
+ this.property = property;
+ }
+ return MetaProperty;
+ }());
+ exports.MetaProperty = MetaProperty;
+ var MethodDefinition = (function () {
+ function MethodDefinition(key, computed, value, kind, isStatic) {
+ this.type = syntax_1.Syntax.MethodDefinition;
+ this.key = key;
+ this.computed = computed;
+ this.value = value;
+ this.kind = kind;
+ this.static = isStatic;
+ }
+ return MethodDefinition;
+ }());
+ exports.MethodDefinition = MethodDefinition;
+ var Module = (function () {
+ function Module(body) {
+ this.type = syntax_1.Syntax.Program;
+ this.body = body;
+ this.sourceType = 'module';
+ }
+ return Module;
+ }());
+ exports.Module = Module;
+ var NewExpression = (function () {
+ function NewExpression(callee, args) {
+ this.type = syntax_1.Syntax.NewExpression;
+ this.callee = callee;
+ this.arguments = args;
+ }
+ return NewExpression;
+ }());
+ exports.NewExpression = NewExpression;
+ var ObjectExpression = (function () {
+ function ObjectExpression(properties) {
+ this.type = syntax_1.Syntax.ObjectExpression;
+ this.properties = properties;
+ }
+ return ObjectExpression;
+ }());
+ exports.ObjectExpression = ObjectExpression;
+ var ObjectPattern = (function () {
+ function ObjectPattern(properties) {
+ this.type = syntax_1.Syntax.ObjectPattern;
+ this.properties = properties;
+ }
+ return ObjectPattern;
+ }());
+ exports.ObjectPattern = ObjectPattern;
+ var Property = (function () {
+ function Property(kind, key, computed, value, method, shorthand) {
+ this.type = syntax_1.Syntax.Property;
+ this.key = key;
+ this.computed = computed;
+ this.value = value;
+ this.kind = kind;
+ this.method = method;
+ this.shorthand = shorthand;
+ }
+ return Property;
+ }());
+ exports.Property = Property;
+ var RegexLiteral = (function () {
+ function RegexLiteral(value, raw, pattern, flags) {
+ this.type = syntax_1.Syntax.Literal;
+ this.value = value;
+ this.raw = raw;
+ this.regex = { pattern: pattern, flags: flags };
+ }
+ return RegexLiteral;
+ }());
+ exports.RegexLiteral = RegexLiteral;
+ var RestElement = (function () {
+ function RestElement(argument) {
+ this.type = syntax_1.Syntax.RestElement;
+ this.argument = argument;
+ }
+ return RestElement;
+ }());
+ exports.RestElement = RestElement;
+ var ReturnStatement = (function () {
+ function ReturnStatement(argument) {
+ this.type = syntax_1.Syntax.ReturnStatement;
+ this.argument = argument;
+ }
+ return ReturnStatement;
+ }());
+ exports.ReturnStatement = ReturnStatement;
+ var Script = (function () {
+ function Script(body) {
+ this.type = syntax_1.Syntax.Program;
+ this.body = body;
+ this.sourceType = 'script';
+ }
+ return Script;
+ }());
+ exports.Script = Script;
+ var SequenceExpression = (function () {
+ function SequenceExpression(expressions) {
+ this.type = syntax_1.Syntax.SequenceExpression;
+ this.expressions = expressions;
+ }
+ return SequenceExpression;
+ }());
+ exports.SequenceExpression = SequenceExpression;
+ var SpreadElement = (function () {
+ function SpreadElement(argument) {
+ this.type = syntax_1.Syntax.SpreadElement;
+ this.argument = argument;
+ }
+ return SpreadElement;
+ }());
+ exports.SpreadElement = SpreadElement;
+ var StaticMemberExpression = (function () {
+ function StaticMemberExpression(object, property) {
+ this.type = syntax_1.Syntax.MemberExpression;
+ this.computed = false;
+ this.object = object;
+ this.property = property;
+ }
+ return StaticMemberExpression;
+ }());
+ exports.StaticMemberExpression = StaticMemberExpression;
+ var Super = (function () {
+ function Super() {
+ this.type = syntax_1.Syntax.Super;
+ }
+ return Super;
+ }());
+ exports.Super = Super;
+ var SwitchCase = (function () {
+ function SwitchCase(test, consequent) {
+ this.type = syntax_1.Syntax.SwitchCase;
+ this.test = test;
+ this.consequent = consequent;
+ }
+ return SwitchCase;
+ }());
+ exports.SwitchCase = SwitchCase;
+ var SwitchStatement = (function () {
+ function SwitchStatement(discriminant, cases) {
+ this.type = syntax_1.Syntax.SwitchStatement;
+ this.discriminant = discriminant;
+ this.cases = cases;
+ }
+ return SwitchStatement;
+ }());
+ exports.SwitchStatement = SwitchStatement;
+ var TaggedTemplateExpression = (function () {
+ function TaggedTemplateExpression(tag, quasi) {
+ this.type = syntax_1.Syntax.TaggedTemplateExpression;
+ this.tag = tag;
+ this.quasi = quasi;
+ }
+ return TaggedTemplateExpression;
+ }());
+ exports.TaggedTemplateExpression = TaggedTemplateExpression;
+ var TemplateElement = (function () {
+ function TemplateElement(value, tail) {
+ this.type = syntax_1.Syntax.TemplateElement;
+ this.value = value;
+ this.tail = tail;
+ }
+ return TemplateElement;
+ }());
+ exports.TemplateElement = TemplateElement;
+ var TemplateLiteral = (function () {
+ function TemplateLiteral(quasis, expressions) {
+ this.type = syntax_1.Syntax.TemplateLiteral;
+ this.quasis = quasis;
+ this.expressions = expressions;
+ }
+ return TemplateLiteral;
+ }());
+ exports.TemplateLiteral = TemplateLiteral;
+ var ThisExpression = (function () {
+ function ThisExpression() {
+ this.type = syntax_1.Syntax.ThisExpression;
+ }
+ return ThisExpression;
+ }());
+ exports.ThisExpression = ThisExpression;
+ var ThrowStatement = (function () {
+ function ThrowStatement(argument) {
+ this.type = syntax_1.Syntax.ThrowStatement;
+ this.argument = argument;
+ }
+ return ThrowStatement;
+ }());
+ exports.ThrowStatement = ThrowStatement;
+ var TryStatement = (function () {
+ function TryStatement(block, handler, finalizer) {
+ this.type = syntax_1.Syntax.TryStatement;
+ this.block = block;
+ this.handler = handler;
+ this.finalizer = finalizer;
+ }
+ return TryStatement;
+ }());
+ exports.TryStatement = TryStatement;
+ var UnaryExpression = (function () {
+ function UnaryExpression(operator, argument) {
+ this.type = syntax_1.Syntax.UnaryExpression;
+ this.operator = operator;
+ this.argument = argument;
+ this.prefix = true;
+ }
+ return UnaryExpression;
+ }());
+ exports.UnaryExpression = UnaryExpression;
+ var UpdateExpression = (function () {
+ function UpdateExpression(operator, argument, prefix) {
+ this.type = syntax_1.Syntax.UpdateExpression;
+ this.operator = operator;
+ this.argument = argument;
+ this.prefix = prefix;
+ }
+ return UpdateExpression;
+ }());
+ exports.UpdateExpression = UpdateExpression;
+ var VariableDeclaration = (function () {
+ function VariableDeclaration(declarations, kind) {
+ this.type = syntax_1.Syntax.VariableDeclaration;
+ this.declarations = declarations;
+ this.kind = kind;
+ }
+ return VariableDeclaration;
+ }());
+ exports.VariableDeclaration = VariableDeclaration;
+ var VariableDeclarator = (function () {
+ function VariableDeclarator(id, init) {
+ this.type = syntax_1.Syntax.VariableDeclarator;
+ this.id = id;
+ this.init = init;
+ }
+ return VariableDeclarator;
+ }());
+ exports.VariableDeclarator = VariableDeclarator;
+ var WhileStatement = (function () {
+ function WhileStatement(test, body) {
+ this.type = syntax_1.Syntax.WhileStatement;
+ this.test = test;
+ this.body = body;
+ }
+ return WhileStatement;
+ }());
+ exports.WhileStatement = WhileStatement;
+ var WithStatement = (function () {
+ function WithStatement(object, body) {
+ this.type = syntax_1.Syntax.WithStatement;
+ this.object = object;
+ this.body = body;
+ }
+ return WithStatement;
+ }());
+ exports.WithStatement = WithStatement;
+ var YieldExpression = (function () {
+ function YieldExpression(argument, delegate) {
+ this.type = syntax_1.Syntax.YieldExpression;
+ this.argument = argument;
+ this.delegate = delegate;
+ }
+ return YieldExpression;
+ }());
+ exports.YieldExpression = YieldExpression;
+
+
+/***/ },
+/* 8 */
+/***/ function(module, exports, __webpack_require__) {
+
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ var assert_1 = __webpack_require__(9);
+ var error_handler_1 = __webpack_require__(10);
+ var messages_1 = __webpack_require__(11);
+ var Node = __webpack_require__(7);
+ var scanner_1 = __webpack_require__(12);
+ var syntax_1 = __webpack_require__(2);
+ var token_1 = __webpack_require__(13);
+ var ArrowParameterPlaceHolder = 'ArrowParameterPlaceHolder';
+ var Parser = (function () {
+ function Parser(code, options, delegate) {
+ if (options === void 0) { options = {}; }
+ this.config = {
+ range: (typeof options.range === 'boolean') && options.range,
+ loc: (typeof options.loc === 'boolean') && options.loc,
+ source: null,
+ tokens: (typeof options.tokens === 'boolean') && options.tokens,
+ comment: (typeof options.comment === 'boolean') && options.comment,
+ tolerant: (typeof options.tolerant === 'boolean') && options.tolerant
+ };
+ if (this.config.loc && options.source && options.source !== null) {
+ this.config.source = String(options.source);
+ }
+ this.delegate = delegate;
+ this.errorHandler = new error_handler_1.ErrorHandler();
+ this.errorHandler.tolerant = this.config.tolerant;
+ this.scanner = new scanner_1.Scanner(code, this.errorHandler);
+ this.scanner.trackComment = this.config.comment;
+ this.operatorPrecedence = {
+ ')': 0,
+ ';': 0,
+ ',': 0,
+ '=': 0,
+ ']': 0,
+ '||': 1,
+ '&&': 2,
+ '|': 3,
+ '^': 4,
+ '&': 5,
+ '==': 6,
+ '!=': 6,
+ '===': 6,
+ '!==': 6,
+ '<': 7,
+ '>': 7,
+ '<=': 7,
+ '>=': 7,
+ '<<': 8,
+ '>>': 8,
+ '>>>': 8,
+ '+': 9,
+ '-': 9,
+ '*': 11,
+ '/': 11,
+ '%': 11
+ };
+ this.lookahead = {
+ type: 2 /* EOF */,
+ value: '',
+ lineNumber: this.scanner.lineNumber,
+ lineStart: 0,
+ start: 0,
+ end: 0
+ };
+ this.hasLineTerminator = false;
+ this.context = {
+ isModule: false,
+ await: false,
+ allowIn: true,
+ allowStrictDirective: true,
+ allowYield: true,
+ firstCoverInitializedNameError: null,
+ isAssignmentTarget: false,
+ isBindingElement: false,
+ inFunctionBody: false,
+ inIteration: false,
+ inSwitch: false,
+ labelSet: {},
+ strict: false
+ };
+ this.tokens = [];
+ this.startMarker = {
+ index: 0,
+ line: this.scanner.lineNumber,
+ column: 0
+ };
+ this.lastMarker = {
+ index: 0,
+ line: this.scanner.lineNumber,
+ column: 0
+ };
+ this.nextToken();
+ this.lastMarker = {
+ index: this.scanner.index,
+ line: this.scanner.lineNumber,
+ column: this.scanner.index - this.scanner.lineStart
+ };
+ }
+ Parser.prototype.throwError = function (messageFormat) {
+ var values = [];
+ for (var _i = 1; _i < arguments.length; _i++) {
+ values[_i - 1] = arguments[_i];
+ }
+ var args = Array.prototype.slice.call(arguments, 1);
+ var msg = messageFormat.replace(/%(\d)/g, function (whole, idx) {
+ assert_1.assert(idx < args.length, 'Message reference must be in range');
+ return args[idx];
+ });
+ var index = this.lastMarker.index;
+ var line = this.lastMarker.line;
+ var column = this.lastMarker.column + 1;
+ throw this.errorHandler.createError(index, line, column, msg);
+ };
+ Parser.prototype.tolerateError = function (messageFormat) {
+ var values = [];
+ for (var _i = 1; _i < arguments.length; _i++) {
+ values[_i - 1] = arguments[_i];
+ }
+ var args = Array.prototype.slice.call(arguments, 1);
+ var msg = messageFormat.replace(/%(\d)/g, function (whole, idx) {
+ assert_1.assert(idx < args.length, 'Message reference must be in range');
+ return args[idx];
+ });
+ var index = this.lastMarker.index;
+ var line = this.scanner.lineNumber;
+ var column = this.lastMarker.column + 1;
+ this.errorHandler.tolerateError(index, line, column, msg);
+ };
+ // Throw an exception because of the token.
+ Parser.prototype.unexpectedTokenError = function (token, message) {
+ var msg = message || messages_1.Messages.UnexpectedToken;
+ var value;
+ if (token) {
+ if (!message) {
+ msg = (token.type === 2 /* EOF */) ? messages_1.Messages.UnexpectedEOS :
+ (token.type === 3 /* Identifier */) ? messages_1.Messages.UnexpectedIdentifier :
+ (token.type === 6 /* NumericLiteral */) ? messages_1.Messages.UnexpectedNumber :
+ (token.type === 8 /* StringLiteral */) ? messages_1.Messages.UnexpectedString :
+ (token.type === 10 /* Template */) ? messages_1.Messages.UnexpectedTemplate :
+ messages_1.Messages.UnexpectedToken;
+ if (token.type === 4 /* Keyword */) {
+ if (this.scanner.isFutureReservedWord(token.value)) {
+ msg = messages_1.Messages.UnexpectedReserved;
+ }
+ else if (this.context.strict && this.scanner.isStrictModeReservedWord(token.value)) {
+ msg = messages_1.Messages.StrictReservedWord;
+ }
+ }
+ }
+ value = token.value;
+ }
+ else {
+ value = 'ILLEGAL';
+ }
+ msg = msg.replace('%0', value);
+ if (token && typeof token.lineNumber === 'number') {
+ var index = token.start;
+ var line = token.lineNumber;
+ var lastMarkerLineStart = this.lastMarker.index - this.lastMarker.column;
+ var column = token.start - lastMarkerLineStart + 1;
+ return this.errorHandler.createError(index, line, column, msg);
+ }
+ else {
+ var index = this.lastMarker.index;
+ var line = this.lastMarker.line;
+ var column = this.lastMarker.column + 1;
+ return this.errorHandler.createError(index, line, column, msg);
+ }
+ };
+ Parser.prototype.throwUnexpectedToken = function (token, message) {
+ throw this.unexpectedTokenError(token, message);
+ };
+ Parser.prototype.tolerateUnexpectedToken = function (token, message) {
+ this.errorHandler.tolerate(this.unexpectedTokenError(token, message));
+ };
+ Parser.prototype.collectComments = function () {
+ if (!this.config.comment) {
+ this.scanner.scanComments();
+ }
+ else {
+ var comments = this.scanner.scanComments();
+ if (comments.length > 0 && this.delegate) {
+ for (var i = 0; i < comments.length; ++i) {
+ var e = comments[i];
+ var node = void 0;
+ node = {
+ type: e.multiLine ? 'BlockComment' : 'LineComment',
+ value: this.scanner.source.slice(e.slice[0], e.slice[1])
+ };
+ if (this.config.range) {
+ node.range = e.range;
+ }
+ if (this.config.loc) {
+ node.loc = e.loc;
+ }
+ var metadata = {
+ start: {
+ line: e.loc.start.line,
+ column: e.loc.start.column,
+ offset: e.range[0]
+ },
+ end: {
+ line: e.loc.end.line,
+ column: e.loc.end.column,
+ offset: e.range[1]
+ }
+ };
+ this.delegate(node, metadata);
+ }
+ }
+ }
+ };
+ // From internal representation to an external structure
+ Parser.prototype.getTokenRaw = function (token) {
+ return this.scanner.source.slice(token.start, token.end);
+ };
+ Parser.prototype.convertToken = function (token) {
+ var t = {
+ type: token_1.TokenName[token.type],
+ value: this.getTokenRaw(token)
+ };
+ if (this.config.range) {
+ t.range = [token.start, token.end];
+ }
+ if (this.config.loc) {
+ t.loc = {
+ start: {
+ line: this.startMarker.line,
+ column: this.startMarker.column
+ },
+ end: {
+ line: this.scanner.lineNumber,
+ column: this.scanner.index - this.scanner.lineStart
+ }
+ };
+ }
+ if (token.type === 9 /* RegularExpression */) {
+ var pattern = token.pattern;
+ var flags = token.flags;
+ t.regex = { pattern: pattern, flags: flags };
+ }
+ return t;
+ };
+ Parser.prototype.nextToken = function () {
+ var token = this.lookahead;
+ this.lastMarker.index = this.scanner.index;
+ this.lastMarker.line = this.scanner.lineNumber;
+ this.lastMarker.column = this.scanner.index - this.scanner.lineStart;
+ this.collectComments();
+ if (this.scanner.index !== this.startMarker.index) {
+ this.startMarker.index = this.scanner.index;
+ this.startMarker.line = this.scanner.lineNumber;
+ this.startMarker.column = this.scanner.index - this.scanner.lineStart;
+ }
+ var next = this.scanner.lex();
+ this.hasLineTerminator = (token.lineNumber !== next.lineNumber);
+ if (next && this.context.strict && next.type === 3 /* Identifier */) {
+ if (this.scanner.isStrictModeReservedWord(next.value)) {
+ next.type = 4 /* Keyword */;
+ }
+ }
+ this.lookahead = next;
+ if (this.config.tokens && next.type !== 2 /* EOF */) {
+ this.tokens.push(this.convertToken(next));
+ }
+ return token;
+ };
+ Parser.prototype.nextRegexToken = function () {
+ this.collectComments();
+ var token = this.scanner.scanRegExp();
+ if (this.config.tokens) {
+ // Pop the previous token, '/' or '/='
+ // This is added from the lookahead token.
+ this.tokens.pop();
+ this.tokens.push(this.convertToken(token));
+ }
+ // Prime the next lookahead.
+ this.lookahead = token;
+ this.nextToken();
+ return token;
+ };
+ Parser.prototype.createNode = function () {
+ return {
+ index: this.startMarker.index,
+ line: this.startMarker.line,
+ column: this.startMarker.column
+ };
+ };
+ Parser.prototype.startNode = function (token) {
+ return {
+ index: token.start,
+ line: token.lineNumber,
+ column: token.start - token.lineStart
+ };
+ };
+ Parser.prototype.finalize = function (marker, node) {
+ if (this.config.range) {
+ node.range = [marker.index, this.lastMarker.index];
+ }
+ if (this.config.loc) {
+ node.loc = {
+ start: {
+ line: marker.line,
+ column: marker.column,
+ },
+ end: {
+ line: this.lastMarker.line,
+ column: this.lastMarker.column
+ }
+ };
+ if (this.config.source) {
+ node.loc.source = this.config.source;
+ }
+ }
+ if (this.delegate) {
+ var metadata = {
+ start: {
+ line: marker.line,
+ column: marker.column,
+ offset: marker.index
+ },
+ end: {
+ line: this.lastMarker.line,
+ column: this.lastMarker.column,
+ offset: this.lastMarker.index
+ }
+ };
+ this.delegate(node, metadata);
+ }
+ return node;
+ };
+ // Expect the next token to match the specified punctuator.
+ // If not, an exception will be thrown.
+ Parser.prototype.expect = function (value) {
+ var token = this.nextToken();
+ if (token.type !== 7 /* Punctuator */ || token.value !== value) {
+ this.throwUnexpectedToken(token);
+ }
+ };
+ // Quietly expect a comma when in tolerant mode, otherwise delegates to expect().
+ Parser.prototype.expectCommaSeparator = function () {
+ if (this.config.tolerant) {
+ var token = this.lookahead;
+ if (token.type === 7 /* Punctuator */ && token.value === ',') {
+ this.nextToken();
+ }
+ else if (token.type === 7 /* Punctuator */ && token.value === ';') {
+ this.nextToken();
+ this.tolerateUnexpectedToken(token);
+ }
+ else {
+ this.tolerateUnexpectedToken(token, messages_1.Messages.UnexpectedToken);
+ }
+ }
+ else {
+ this.expect(',');
+ }
+ };
+ // Expect the next token to match the specified keyword.
+ // If not, an exception will be thrown.
+ Parser.prototype.expectKeyword = function (keyword) {
+ var token = this.nextToken();
+ if (token.type !== 4 /* Keyword */ || token.value !== keyword) {
+ this.throwUnexpectedToken(token);
+ }
+ };
+ // Return true if the next token matches the specified punctuator.
+ Parser.prototype.match = function (value) {
+ return this.lookahead.type === 7 /* Punctuator */ && this.lookahead.value === value;
+ };
+ // Return true if the next token matches the specified keyword
+ Parser.prototype.matchKeyword = function (keyword) {
+ return this.lookahead.type === 4 /* Keyword */ && this.lookahead.value === keyword;
+ };
+ // Return true if the next token matches the specified contextual keyword
+ // (where an identifier is sometimes a keyword depending on the context)
+ Parser.prototype.matchContextualKeyword = function (keyword) {
+ return this.lookahead.type === 3 /* Identifier */ && this.lookahead.value === keyword;
+ };
+ // Return true if the next token is an assignment operator
+ Parser.prototype.matchAssign = function () {
+ if (this.lookahead.type !== 7 /* Punctuator */) {
+ return false;
+ }
+ var op = this.lookahead.value;
+ return op === '=' ||
+ op === '*=' ||
+ op === '**=' ||
+ op === '/=' ||
+ op === '%=' ||
+ op === '+=' ||
+ op === '-=' ||
+ op === '<<=' ||
+ op === '>>=' ||
+ op === '>>>=' ||
+ op === '&=' ||
+ op === '^=' ||
+ op === '|=';
+ };
+ // Cover grammar support.
+ //
+ // When an assignment expression position starts with an left parenthesis, the determination of the type
+ // of the syntax is to be deferred arbitrarily long until the end of the parentheses pair (plus a lookahead)
+ // or the first comma. This situation also defers the determination of all the expressions nested in the pair.
+ //
+ // There are three productions that can be parsed in a parentheses pair that needs to be determined
+ // after the outermost pair is closed. They are:
+ //
+ // 1. AssignmentExpression
+ // 2. BindingElements
+ // 3. AssignmentTargets
+ //
+ // In order to avoid exponential backtracking, we use two flags to denote if the production can be
+ // binding element or assignment target.
+ //
+ // The three productions have the relationship:
+ //
+ // BindingElements ⊆ AssignmentTargets ⊆ AssignmentExpression
+ //
+ // with a single exception that CoverInitializedName when used directly in an Expression, generates
+ // an early error. Therefore, we need the third state, firstCoverInitializedNameError, to track the
+ // first usage of CoverInitializedName and report it when we reached the end of the parentheses pair.
+ //
+ // isolateCoverGrammar function runs the given parser function with a new cover grammar context, and it does not
+ // effect the current flags. This means the production the parser parses is only used as an expression. Therefore
+ // the CoverInitializedName check is conducted.
+ //
+ // inheritCoverGrammar function runs the given parse function with a new cover grammar context, and it propagates
+ // the flags outside of the parser. This means the production the parser parses is used as a part of a potential
+ // pattern. The CoverInitializedName check is deferred.
+ Parser.prototype.isolateCoverGrammar = function (parseFunction) {
+ var previousIsBindingElement = this.context.isBindingElement;
+ var previousIsAssignmentTarget = this.context.isAssignmentTarget;
+ var previousFirstCoverInitializedNameError = this.context.firstCoverInitializedNameError;
+ this.context.isBindingElement = true;
+ this.context.isAssignmentTarget = true;
+ this.context.firstCoverInitializedNameError = null;
+ var result = parseFunction.call(this);
+ if (this.context.firstCoverInitializedNameError !== null) {
+ this.throwUnexpectedToken(this.context.firstCoverInitializedNameError);
+ }
+ this.context.isBindingElement = previousIsBindingElement;
+ this.context.isAssignmentTarget = previousIsAssignmentTarget;
+ this.context.firstCoverInitializedNameError = previousFirstCoverInitializedNameError;
+ return result;
+ };
+ Parser.prototype.inheritCoverGrammar = function (parseFunction) {
+ var previousIsBindingElement = this.context.isBindingElement;
+ var previousIsAssignmentTarget = this.context.isAssignmentTarget;
+ var previousFirstCoverInitializedNameError = this.context.firstCoverInitializedNameError;
+ this.context.isBindingElement = true;
+ this.context.isAssignmentTarget = true;
+ this.context.firstCoverInitializedNameError = null;
+ var result = parseFunction.call(this);
+ this.context.isBindingElement = this.context.isBindingElement && previousIsBindingElement;
+ this.context.isAssignmentTarget = this.context.isAssignmentTarget && previousIsAssignmentTarget;
+ this.context.firstCoverInitializedNameError = previousFirstCoverInitializedNameError || this.context.firstCoverInitializedNameError;
+ return result;
+ };
+ Parser.prototype.consumeSemicolon = function () {
+ if (this.match(';')) {
+ this.nextToken();
+ }
+ else if (!this.hasLineTerminator) {
+ if (this.lookahead.type !== 2 /* EOF */ && !this.match('}')) {
+ this.throwUnexpectedToken(this.lookahead);
+ }
+ this.lastMarker.index = this.startMarker.index;
+ this.lastMarker.line = this.startMarker.line;
+ this.lastMarker.column = this.startMarker.column;
+ }
+ };
+ // https://tc39.github.io/ecma262/#sec-primary-expression
+ Parser.prototype.parsePrimaryExpression = function () {
+ var node = this.createNode();
+ var expr;
+ var token, raw;
+ switch (this.lookahead.type) {
+ case 3 /* Identifier */:
+ if ((this.context.isModule || this.context.await) && this.lookahead.value === 'await') {
+ this.tolerateUnexpectedToken(this.lookahead);
+ }
+ expr = this.matchAsyncFunction() ? this.parseFunctionExpression() : this.finalize(node, new Node.Identifier(this.nextToken().value));
+ break;
+ case 6 /* NumericLiteral */:
+ case 8 /* StringLiteral */:
+ if (this.context.strict && this.lookahead.octal) {
+ this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.StrictOctalLiteral);
+ }
+ this.context.isAssignmentTarget = false;
+ this.context.isBindingElement = false;
+ token = this.nextToken();
+ raw = this.getTokenRaw(token);
+ expr = this.finalize(node, new Node.Literal(token.value, raw));
+ break;
+ case 1 /* BooleanLiteral */:
+ this.context.isAssignmentTarget = false;
+ this.context.isBindingElement = false;
+ token = this.nextToken();
+ raw = this.getTokenRaw(token);
+ expr = this.finalize(node, new Node.Literal(token.value === 'true', raw));
+ break;
+ case 5 /* NullLiteral */:
+ this.context.isAssignmentTarget = false;
+ this.context.isBindingElement = false;
+ token = this.nextToken();
+ raw = this.getTokenRaw(token);
+ expr = this.finalize(node, new Node.Literal(null, raw));
+ break;
+ case 10 /* Template */:
+ expr = this.parseTemplateLiteral();
+ break;
+ case 7 /* Punctuator */:
+ switch (this.lookahead.value) {
+ case '(':
+ this.context.isBindingElement = false;
+ expr = this.inheritCoverGrammar(this.parseGroupExpression);
+ break;
+ case '[':
+ expr = this.inheritCoverGrammar(this.parseArrayInitializer);
+ break;
+ case '{':
+ expr = this.inheritCoverGrammar(this.parseObjectInitializer);
+ break;
+ case '/':
+ case '/=':
+ this.context.isAssignmentTarget = false;
+ this.context.isBindingElement = false;
+ this.scanner.index = this.startMarker.index;
+ token = this.nextRegexToken();
+ raw = this.getTokenRaw(token);
+ expr = this.finalize(node, new Node.RegexLiteral(token.regex, raw, token.pattern, token.flags));
+ break;
+ default:
+ expr = this.throwUnexpectedToken(this.nextToken());
+ }
+ break;
+ case 4 /* Keyword */:
+ if (!this.context.strict && this.context.allowYield && this.matchKeyword('yield')) {
+ expr = this.parseIdentifierName();
+ }
+ else if (!this.context.strict && this.matchKeyword('let')) {
+ expr = this.finalize(node, new Node.Identifier(this.nextToken().value));
+ }
+ else {
+ this.context.isAssignmentTarget = false;
+ this.context.isBindingElement = false;
+ if (this.matchKeyword('function')) {
+ expr = this.parseFunctionExpression();
+ }
+ else if (this.matchKeyword('this')) {
+ this.nextToken();
+ expr = this.finalize(node, new Node.ThisExpression());
+ }
+ else if (this.matchKeyword('class')) {
+ expr = this.parseClassExpression();
+ }
+ else {
+ expr = this.throwUnexpectedToken(this.nextToken());
+ }
+ }
+ break;
+ default:
+ expr = this.throwUnexpectedToken(this.nextToken());
+ }
+ return expr;
+ };
+ // https://tc39.github.io/ecma262/#sec-array-initializer
+ Parser.prototype.parseSpreadElement = function () {
+ var node = this.createNode();
+ this.expect('...');
+ var arg = this.inheritCoverGrammar(this.parseAssignmentExpression);
+ return this.finalize(node, new Node.SpreadElement(arg));
+ };
+ Parser.prototype.parseArrayInitializer = function () {
+ var node = this.createNode();
+ var elements = [];
+ this.expect('[');
+ while (!this.match(']')) {
+ if (this.match(',')) {
+ this.nextToken();
+ elements.push(null);
+ }
+ else if (this.match('...')) {
+ var element = this.parseSpreadElement();
+ if (!this.match(']')) {
+ this.context.isAssignmentTarget = false;
+ this.context.isBindingElement = false;
+ this.expect(',');
+ }
+ elements.push(element);
+ }
+ else {
+ elements.push(this.inheritCoverGrammar(this.parseAssignmentExpression));
+ if (!this.match(']')) {
+ this.expect(',');
+ }
+ }
+ }
+ this.expect(']');
+ return this.finalize(node, new Node.ArrayExpression(elements));
+ };
+ // https://tc39.github.io/ecma262/#sec-object-initializer
+ Parser.prototype.parsePropertyMethod = function (params) {
+ this.context.isAssignmentTarget = false;
+ this.context.isBindingElement = false;
+ var previousStrict = this.context.strict;
+ var previousAllowStrictDirective = this.context.allowStrictDirective;
+ this.context.allowStrictDirective = params.simple;
+ var body = this.isolateCoverGrammar(this.parseFunctionSourceElements);
+ if (this.context.strict && params.firstRestricted) {
+ this.tolerateUnexpectedToken(params.firstRestricted, params.message);
+ }
+ if (this.context.strict && params.stricted) {
+ this.tolerateUnexpectedToken(params.stricted, params.message);
+ }
+ this.context.strict = previousStrict;
+ this.context.allowStrictDirective = previousAllowStrictDirective;
+ return body;
+ };
+ Parser.prototype.parsePropertyMethodFunction = function () {
+ var isGenerator = false;
+ var node = this.createNode();
+ var previousAllowYield = this.context.allowYield;
+ this.context.allowYield = false;
+ var params = this.parseFormalParameters();
+ var method = this.parsePropertyMethod(params);
+ this.context.allowYield = previousAllowYield;
+ return this.finalize(node, new Node.FunctionExpression(null, params.params, method, isGenerator));
+ };
+ Parser.prototype.parsePropertyMethodAsyncFunction = function () {
+ var node = this.createNode();
+ var previousAllowYield = this.context.allowYield;
+ var previousAwait = this.context.await;
+ this.context.allowYield = false;
+ this.context.await = true;
+ var params = this.parseFormalParameters();
+ var method = this.parsePropertyMethod(params);
+ this.context.allowYield = previousAllowYield;
+ this.context.await = previousAwait;
+ return this.finalize(node, new Node.AsyncFunctionExpression(null, params.params, method));
+ };
+ Parser.prototype.parseObjectPropertyKey = function () {
+ var node = this.createNode();
+ var token = this.nextToken();
+ var key;
+ switch (token.type) {
+ case 8 /* StringLiteral */:
+ case 6 /* NumericLiteral */:
+ if (this.context.strict && token.octal) {
+ this.tolerateUnexpectedToken(token, messages_1.Messages.StrictOctalLiteral);
+ }
+ var raw = this.getTokenRaw(token);
+ key = this.finalize(node, new Node.Literal(token.value, raw));
+ break;
+ case 3 /* Identifier */:
+ case 1 /* BooleanLiteral */:
+ case 5 /* NullLiteral */:
+ case 4 /* Keyword */:
+ key = this.finalize(node, new Node.Identifier(token.value));
+ break;
+ case 7 /* Punctuator */:
+ if (token.value === '[') {
+ key = this.isolateCoverGrammar(this.parseAssignmentExpression);
+ this.expect(']');
+ }
+ else {
+ key = this.throwUnexpectedToken(token);
+ }
+ break;
+ default:
+ key = this.throwUnexpectedToken(token);
+ }
+ return key;
+ };
+ Parser.prototype.isPropertyKey = function (key, value) {
+ return (key.type === syntax_1.Syntax.Identifier && key.name === value) ||
+ (key.type === syntax_1.Syntax.Literal && key.value === value);
+ };
+ Parser.prototype.parseObjectProperty = function (hasProto) {
+ var node = this.createNode();
+ var token = this.lookahead;
+ var kind;
+ var key = null;
+ var value = null;
+ var computed = false;
+ var method = false;
+ var shorthand = false;
+ var isAsync = false;
+ if (token.type === 3 /* Identifier */) {
+ var id = token.value;
+ this.nextToken();
+ computed = this.match('[');
+ isAsync = !this.hasLineTerminator && (id === 'async') &&
+ !this.match(':') && !this.match('(') && !this.match('*');
+ key = isAsync ? this.parseObjectPropertyKey() : this.finalize(node, new Node.Identifier(id));
+ }
+ else if (this.match('*')) {
+ this.nextToken();
+ }
+ else {
+ computed = this.match('[');
+ key = this.parseObjectPropertyKey();
+ }
+ var lookaheadPropertyKey = this.qualifiedPropertyName(this.lookahead);
+ if (token.type === 3 /* Identifier */ && !isAsync && token.value === 'get' && lookaheadPropertyKey) {
+ kind = 'get';
+ computed = this.match('[');
+ key = this.parseObjectPropertyKey();
+ this.context.allowYield = false;
+ value = this.parseGetterMethod();
+ }
+ else if (token.type === 3 /* Identifier */ && !isAsync && token.value === 'set' && lookaheadPropertyKey) {
+ kind = 'set';
+ computed = this.match('[');
+ key = this.parseObjectPropertyKey();
+ value = this.parseSetterMethod();
+ }
+ else if (token.type === 7 /* Punctuator */ && token.value === '*' && lookaheadPropertyKey) {
+ kind = 'init';
+ computed = this.match('[');
+ key = this.parseObjectPropertyKey();
+ value = this.parseGeneratorMethod();
+ method = true;
+ }
+ else {
+ if (!key) {
+ this.throwUnexpectedToken(this.lookahead);
+ }
+ kind = 'init';
+ if (this.match(':') && !isAsync) {
+ if (!computed && this.isPropertyKey(key, '__proto__')) {
+ if (hasProto.value) {
+ this.tolerateError(messages_1.Messages.DuplicateProtoProperty);
+ }
+ hasProto.value = true;
+ }
+ this.nextToken();
+ value = this.inheritCoverGrammar(this.parseAssignmentExpression);
+ }
+ else if (this.match('(')) {
+ value = isAsync ? this.parsePropertyMethodAsyncFunction() : this.parsePropertyMethodFunction();
+ method = true;
+ }
+ else if (token.type === 3 /* Identifier */) {
+ var id = this.finalize(node, new Node.Identifier(token.value));
+ if (this.match('=')) {
+ this.context.firstCoverInitializedNameError = this.lookahead;
+ this.nextToken();
+ shorthand = true;
+ var init = this.isolateCoverGrammar(this.parseAssignmentExpression);
+ value = this.finalize(node, new Node.AssignmentPattern(id, init));
+ }
+ else {
+ shorthand = true;
+ value = id;
+ }
+ }
+ else {
+ this.throwUnexpectedToken(this.nextToken());
+ }
+ }
+ return this.finalize(node, new Node.Property(kind, key, computed, value, method, shorthand));
+ };
+ Parser.prototype.parseObjectInitializer = function () {
+ var node = this.createNode();
+ this.expect('{');
+ var properties = [];
+ var hasProto = { value: false };
+ while (!this.match('}')) {
+ properties.push(this.parseObjectProperty(hasProto));
+ if (!this.match('}')) {
+ this.expectCommaSeparator();
+ }
+ }
+ this.expect('}');
+ return this.finalize(node, new Node.ObjectExpression(properties));
+ };
+ // https://tc39.github.io/ecma262/#sec-template-literals
+ Parser.prototype.parseTemplateHead = function () {
+ assert_1.assert(this.lookahead.head, 'Template literal must start with a template head');
+ var node = this.createNode();
+ var token = this.nextToken();
+ var raw = token.value;
+ var cooked = token.cooked;
+ return this.finalize(node, new Node.TemplateElement({ raw: raw, cooked: cooked }, token.tail));
+ };
+ Parser.prototype.parseTemplateElement = function () {
+ if (this.lookahead.type !== 10 /* Template */) {
+ this.throwUnexpectedToken();
+ }
+ var node = this.createNode();
+ var token = this.nextToken();
+ var raw = token.value;
+ var cooked = token.cooked;
+ return this.finalize(node, new Node.TemplateElement({ raw: raw, cooked: cooked }, token.tail));
+ };
+ Parser.prototype.parseTemplateLiteral = function () {
+ var node = this.createNode();
+ var expressions = [];
+ var quasis = [];
+ var quasi = this.parseTemplateHead();
+ quasis.push(quasi);
+ while (!quasi.tail) {
+ expressions.push(this.parseExpression());
+ quasi = this.parseTemplateElement();
+ quasis.push(quasi);
+ }
+ return this.finalize(node, new Node.TemplateLiteral(quasis, expressions));
+ };
+ // https://tc39.github.io/ecma262/#sec-grouping-operator
+ Parser.prototype.reinterpretExpressionAsPattern = function (expr) {
+ switch (expr.type) {
+ case syntax_1.Syntax.Identifier:
+ case syntax_1.Syntax.MemberExpression:
+ case syntax_1.Syntax.RestElement:
+ case syntax_1.Syntax.AssignmentPattern:
+ break;
+ case syntax_1.Syntax.SpreadElement:
+ expr.type = syntax_1.Syntax.RestElement;
+ this.reinterpretExpressionAsPattern(expr.argument);
+ break;
+ case syntax_1.Syntax.ArrayExpression:
+ expr.type = syntax_1.Syntax.ArrayPattern;
+ for (var i = 0; i < expr.elements.length; i++) {
+ if (expr.elements[i] !== null) {
+ this.reinterpretExpressionAsPattern(expr.elements[i]);
+ }
+ }
+ break;
+ case syntax_1.Syntax.ObjectExpression:
+ expr.type = syntax_1.Syntax.ObjectPattern;
+ for (var i = 0; i < expr.properties.length; i++) {
+ this.reinterpretExpressionAsPattern(expr.properties[i].value);
+ }
+ break;
+ case syntax_1.Syntax.AssignmentExpression:
+ expr.type = syntax_1.Syntax.AssignmentPattern;
+ delete expr.operator;
+ this.reinterpretExpressionAsPattern(expr.left);
+ break;
+ default:
+ // Allow other node type for tolerant parsing.
+ break;
+ }
+ };
+ Parser.prototype.parseGroupExpression = function () {
+ var expr;
+ this.expect('(');
+ if (this.match(')')) {
+ this.nextToken();
+ if (!this.match('=>')) {
+ this.expect('=>');
+ }
+ expr = {
+ type: ArrowParameterPlaceHolder,
+ params: [],
+ async: false
+ };
+ }
+ else {
+ var startToken = this.lookahead;
+ var params = [];
+ if (this.match('...')) {
+ expr = this.parseRestElement(params);
+ this.expect(')');
+ if (!this.match('=>')) {
+ this.expect('=>');
+ }
+ expr = {
+ type: ArrowParameterPlaceHolder,
+ params: [expr],
+ async: false
+ };
+ }
+ else {
+ var arrow = false;
+ this.context.isBindingElement = true;
+ expr = this.inheritCoverGrammar(this.parseAssignmentExpression);
+ if (this.match(',')) {
+ var expressions = [];
+ this.context.isAssignmentTarget = false;
+ expressions.push(expr);
+ while (this.lookahead.type !== 2 /* EOF */) {
+ if (!this.match(',')) {
+ break;
+ }
+ this.nextToken();
+ if (this.match(')')) {
+ this.nextToken();
+ for (var i = 0; i < expressions.length; i++) {
+ this.reinterpretExpressionAsPattern(expressions[i]);
+ }
+ arrow = true;
+ expr = {
+ type: ArrowParameterPlaceHolder,
+ params: expressions,
+ async: false
+ };
+ }
+ else if (this.match('...')) {
+ if (!this.context.isBindingElement) {
+ this.throwUnexpectedToken(this.lookahead);
+ }
+ expressions.push(this.parseRestElement(params));
+ this.expect(')');
+ if (!this.match('=>')) {
+ this.expect('=>');
+ }
+ this.context.isBindingElement = false;
+ for (var i = 0; i < expressions.length; i++) {
+ this.reinterpretExpressionAsPattern(expressions[i]);
+ }
+ arrow = true;
+ expr = {
+ type: ArrowParameterPlaceHolder,
+ params: expressions,
+ async: false
+ };
+ }
+ else {
+ expressions.push(this.inheritCoverGrammar(this.parseAssignmentExpression));
+ }
+ if (arrow) {
+ break;
+ }
+ }
+ if (!arrow) {
+ expr = this.finalize(this.startNode(startToken), new Node.SequenceExpression(expressions));
+ }
+ }
+ if (!arrow) {
+ this.expect(')');
+ if (this.match('=>')) {
+ if (expr.type === syntax_1.Syntax.Identifier && expr.name === 'yield') {
+ arrow = true;
+ expr = {
+ type: ArrowParameterPlaceHolder,
+ params: [expr],
+ async: false
+ };
+ }
+ if (!arrow) {
+ if (!this.context.isBindingElement) {
+ this.throwUnexpectedToken(this.lookahead);
+ }
+ if (expr.type === syntax_1.Syntax.SequenceExpression) {
+ for (var i = 0; i < expr.expressions.length; i++) {
+ this.reinterpretExpressionAsPattern(expr.expressions[i]);
+ }
+ }
+ else {
+ this.reinterpretExpressionAsPattern(expr);
+ }
+ var parameters = (expr.type === syntax_1.Syntax.SequenceExpression ? expr.expressions : [expr]);
+ expr = {
+ type: ArrowParameterPlaceHolder,
+ params: parameters,
+ async: false
+ };
+ }
+ }
+ this.context.isBindingElement = false;
+ }
+ }
+ }
+ return expr;
+ };
+ // https://tc39.github.io/ecma262/#sec-left-hand-side-expressions
+ Parser.prototype.parseArguments = function () {
+ this.expect('(');
+ var args = [];
+ if (!this.match(')')) {
+ while (true) {
+ var expr = this.match('...') ? this.parseSpreadElement() :
+ this.isolateCoverGrammar(this.parseAssignmentExpression);
+ args.push(expr);
+ if (this.match(')')) {
+ break;
+ }
+ this.expectCommaSeparator();
+ if (this.match(')')) {
+ break;
+ }
+ }
+ }
+ this.expect(')');
+ return args;
+ };
+ Parser.prototype.isIdentifierName = function (token) {
+ return token.type === 3 /* Identifier */ ||
+ token.type === 4 /* Keyword */ ||
+ token.type === 1 /* BooleanLiteral */ ||
+ token.type === 5 /* NullLiteral */;
+ };
+ Parser.prototype.parseIdentifierName = function () {
+ var node = this.createNode();
+ var token = this.nextToken();
+ if (!this.isIdentifierName(token)) {
+ this.throwUnexpectedToken(token);
+ }
+ return this.finalize(node, new Node.Identifier(token.value));
+ };
+ Parser.prototype.parseNewExpression = function () {
+ var node = this.createNode();
+ var id = this.parseIdentifierName();
+ assert_1.assert(id.name === 'new', 'New expression must start with `new`');
+ var expr;
+ if (this.match('.')) {
+ this.nextToken();
+ if (this.lookahead.type === 3 /* Identifier */ && this.context.inFunctionBody && this.lookahead.value === 'target') {
+ var property = this.parseIdentifierName();
+ expr = new Node.MetaProperty(id, property);
+ }
+ else {
+ this.throwUnexpectedToken(this.lookahead);
+ }
+ }
+ else {
+ var callee = this.isolateCoverGrammar(this.parseLeftHandSideExpression);
+ var args = this.match('(') ? this.parseArguments() : [];
+ expr = new Node.NewExpression(callee, args);
+ this.context.isAssignmentTarget = false;
+ this.context.isBindingElement = false;
+ }
+ return this.finalize(node, expr);
+ };
+ Parser.prototype.parseAsyncArgument = function () {
+ var arg = this.parseAssignmentExpression();
+ this.context.firstCoverInitializedNameError = null;
+ return arg;
+ };
+ Parser.prototype.parseAsyncArguments = function () {
+ this.expect('(');
+ var args = [];
+ if (!this.match(')')) {
+ while (true) {
+ var expr = this.match('...') ? this.parseSpreadElement() :
+ this.isolateCoverGrammar(this.parseAsyncArgument);
+ args.push(expr);
+ if (this.match(')')) {
+ break;
+ }
+ this.expectCommaSeparator();
+ if (this.match(')')) {
+ break;
+ }
+ }
+ }
+ this.expect(')');
+ return args;
+ };
+ Parser.prototype.parseLeftHandSideExpressionAllowCall = function () {
+ var startToken = this.lookahead;
+ var maybeAsync = this.matchContextualKeyword('async');
+ var previousAllowIn = this.context.allowIn;
+ this.context.allowIn = true;
+ var expr;
+ if (this.matchKeyword('super') && this.context.inFunctionBody) {
+ expr = this.createNode();
+ this.nextToken();
+ expr = this.finalize(expr, new Node.Super());
+ if (!this.match('(') && !this.match('.') && !this.match('[')) {
+ this.throwUnexpectedToken(this.lookahead);
+ }
+ }
+ else {
+ expr = this.inheritCoverGrammar(this.matchKeyword('new') ? this.parseNewExpression : this.parsePrimaryExpression);
+ }
+ while (true) {
+ if (this.match('.')) {
+ this.context.isBindingElement = false;
+ this.context.isAssignmentTarget = true;
+ this.expect('.');
+ var property = this.parseIdentifierName();
+ expr = this.finalize(this.startNode(startToken), new Node.StaticMemberExpression(expr, property));
+ }
+ else if (this.match('(')) {
+ var asyncArrow = maybeAsync && (startToken.lineNumber === this.lookahead.lineNumber);
+ this.context.isBindingElement = false;
+ this.context.isAssignmentTarget = false;
+ var args = asyncArrow ? this.parseAsyncArguments() : this.parseArguments();
+ expr = this.finalize(this.startNode(startToken), new Node.CallExpression(expr, args));
+ if (asyncArrow && this.match('=>')) {
+ for (var i = 0; i < args.length; ++i) {
+ this.reinterpretExpressionAsPattern(args[i]);
+ }
+ expr = {
+ type: ArrowParameterPlaceHolder,
+ params: args,
+ async: true
+ };
+ }
+ }
+ else if (this.match('[')) {
+ this.context.isBindingElement = false;
+ this.context.isAssignmentTarget = true;
+ this.expect('[');
+ var property = this.isolateCoverGrammar(this.parseExpression);
+ this.expect(']');
+ expr = this.finalize(this.startNode(startToken), new Node.ComputedMemberExpression(expr, property));
+ }
+ else if (this.lookahead.type === 10 /* Template */ && this.lookahead.head) {
+ var quasi = this.parseTemplateLiteral();
+ expr = this.finalize(this.startNode(startToken), new Node.TaggedTemplateExpression(expr, quasi));
+ }
+ else {
+ break;
+ }
+ }
+ this.context.allowIn = previousAllowIn;
+ return expr;
+ };
+ Parser.prototype.parseSuper = function () {
+ var node = this.createNode();
+ this.expectKeyword('super');
+ if (!this.match('[') && !this.match('.')) {
+ this.throwUnexpectedToken(this.lookahead);
+ }
+ return this.finalize(node, new Node.Super());
+ };
+ Parser.prototype.parseLeftHandSideExpression = function () {
+ assert_1.assert(this.context.allowIn, 'callee of new expression always allow in keyword.');
+ var node = this.startNode(this.lookahead);
+ var expr = (this.matchKeyword('super') && this.context.inFunctionBody) ? this.parseSuper() :
+ this.inheritCoverGrammar(this.matchKeyword('new') ? this.parseNewExpression : this.parsePrimaryExpression);
+ while (true) {
+ if (this.match('[')) {
+ this.context.isBindingElement = false;
+ this.context.isAssignmentTarget = true;
+ this.expect('[');
+ var property = this.isolateCoverGrammar(this.parseExpression);
+ this.expect(']');
+ expr = this.finalize(node, new Node.ComputedMemberExpression(expr, property));
+ }
+ else if (this.match('.')) {
+ this.context.isBindingElement = false;
+ this.context.isAssignmentTarget = true;
+ this.expect('.');
+ var property = this.parseIdentifierName();
+ expr = this.finalize(node, new Node.StaticMemberExpression(expr, property));
+ }
+ else if (this.lookahead.type === 10 /* Template */ && this.lookahead.head) {
+ var quasi = this.parseTemplateLiteral();
+ expr = this.finalize(node, new Node.TaggedTemplateExpression(expr, quasi));
+ }
+ else {
+ break;
+ }
+ }
+ return expr;
+ };
+ // https://tc39.github.io/ecma262/#sec-update-expressions
+ Parser.prototype.parseUpdateExpression = function () {
+ var expr;
+ var startToken = this.lookahead;
+ if (this.match('++') || this.match('--')) {
+ var node = this.startNode(startToken);
+ var token = this.nextToken();
+ expr = this.inheritCoverGrammar(this.parseUnaryExpression);
+ if (this.context.strict && expr.type === syntax_1.Syntax.Identifier && this.scanner.isRestrictedWord(expr.name)) {
+ this.tolerateError(messages_1.Messages.StrictLHSPrefix);
+ }
+ if (!this.context.isAssignmentTarget) {
+ this.tolerateError(messages_1.Messages.InvalidLHSInAssignment);
+ }
+ var prefix = true;
+ expr = this.finalize(node, new Node.UpdateExpression(token.value, expr, prefix));
+ this.context.isAssignmentTarget = false;
+ this.context.isBindingElement = false;
+ }
+ else {
+ expr = this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall);
+ if (!this.hasLineTerminator && this.lookahead.type === 7 /* Punctuator */) {
+ if (this.match('++') || this.match('--')) {
+ if (this.context.strict && expr.type === syntax_1.Syntax.Identifier && this.scanner.isRestrictedWord(expr.name)) {
+ this.tolerateError(messages_1.Messages.StrictLHSPostfix);
+ }
+ if (!this.context.isAssignmentTarget) {
+ this.tolerateError(messages_1.Messages.InvalidLHSInAssignment);
+ }
+ this.context.isAssignmentTarget = false;
+ this.context.isBindingElement = false;
+ var operator = this.nextToken().value;
+ var prefix = false;
+ expr = this.finalize(this.startNode(startToken), new Node.UpdateExpression(operator, expr, prefix));
+ }
+ }
+ }
+ return expr;
+ };
+ // https://tc39.github.io/ecma262/#sec-unary-operators
+ Parser.prototype.parseAwaitExpression = function () {
+ var node = this.createNode();
+ this.nextToken();
+ var argument = this.parseUnaryExpression();
+ return this.finalize(node, new Node.AwaitExpression(argument));
+ };
+ Parser.prototype.parseUnaryExpression = function () {
+ var expr;
+ if (this.match('+') || this.match('-') || this.match('~') || this.match('!') ||
+ this.matchKeyword('delete') || this.matchKeyword('void') || this.matchKeyword('typeof')) {
+ var node = this.startNode(this.lookahead);
+ var token = this.nextToken();
+ expr = this.inheritCoverGrammar(this.parseUnaryExpression);
+ expr = this.finalize(node, new Node.UnaryExpression(token.value, expr));
+ if (this.context.strict && expr.operator === 'delete' && expr.argument.type === syntax_1.Syntax.Identifier) {
+ this.tolerateError(messages_1.Messages.StrictDelete);
+ }
+ this.context.isAssignmentTarget = false;
+ this.context.isBindingElement = false;
+ }
+ else if (this.context.await && this.matchContextualKeyword('await')) {
+ expr = this.parseAwaitExpression();
+ }
+ else {
+ expr = this.parseUpdateExpression();
+ }
+ return expr;
+ };
+ Parser.prototype.parseExponentiationExpression = function () {
+ var startToken = this.lookahead;
+ var expr = this.inheritCoverGrammar(this.parseUnaryExpression);
+ if (expr.type !== syntax_1.Syntax.UnaryExpression && this.match('**')) {
+ this.nextToken();
+ this.context.isAssignmentTarget = false;
+ this.context.isBindingElement = false;
+ var left = expr;
+ var right = this.isolateCoverGrammar(this.parseExponentiationExpression);
+ expr = this.finalize(this.startNode(startToken), new Node.BinaryExpression('**', left, right));
+ }
+ return expr;
+ };
+ // https://tc39.github.io/ecma262/#sec-exp-operator
+ // https://tc39.github.io/ecma262/#sec-multiplicative-operators
+ // https://tc39.github.io/ecma262/#sec-additive-operators
+ // https://tc39.github.io/ecma262/#sec-bitwise-shift-operators
+ // https://tc39.github.io/ecma262/#sec-relational-operators
+ // https://tc39.github.io/ecma262/#sec-equality-operators
+ // https://tc39.github.io/ecma262/#sec-binary-bitwise-operators
+ // https://tc39.github.io/ecma262/#sec-binary-logical-operators
+ Parser.prototype.binaryPrecedence = function (token) {
+ var op = token.value;
+ var precedence;
+ if (token.type === 7 /* Punctuator */) {
+ precedence = this.operatorPrecedence[op] || 0;
+ }
+ else if (token.type === 4 /* Keyword */) {
+ precedence = (op === 'instanceof' || (this.context.allowIn && op === 'in')) ? 7 : 0;
+ }
+ else {
+ precedence = 0;
+ }
+ return precedence;
+ };
+ Parser.prototype.parseBinaryExpression = function () {
+ var startToken = this.lookahead;
+ var expr = this.inheritCoverGrammar(this.parseExponentiationExpression);
+ var token = this.lookahead;
+ var prec = this.binaryPrecedence(token);
+ if (prec > 0) {
+ this.nextToken();
+ this.context.isAssignmentTarget = false;
+ this.context.isBindingElement = false;
+ var markers = [startToken, this.lookahead];
+ var left = expr;
+ var right = this.isolateCoverGrammar(this.parseExponentiationExpression);
+ var stack = [left, token.value, right];
+ var precedences = [prec];
+ while (true) {
+ prec = this.binaryPrecedence(this.lookahead);
+ if (prec <= 0) {
+ break;
+ }
+ // Reduce: make a binary expression from the three topmost entries.
+ while ((stack.length > 2) && (prec <= precedences[precedences.length - 1])) {
+ right = stack.pop();
+ var operator = stack.pop();
+ precedences.pop();
+ left = stack.pop();
+ markers.pop();
+ var node = this.startNode(markers[markers.length - 1]);
+ stack.push(this.finalize(node, new Node.BinaryExpression(operator, left, right)));
+ }
+ // Shift.
+ stack.push(this.nextToken().value);
+ precedences.push(prec);
+ markers.push(this.lookahead);
+ stack.push(this.isolateCoverGrammar(this.parseExponentiationExpression));
+ }
+ // Final reduce to clean-up the stack.
+ var i = stack.length - 1;
+ expr = stack[i];
+ markers.pop();
+ while (i > 1) {
+ var node = this.startNode(markers.pop());
+ var operator = stack[i - 1];
+ expr = this.finalize(node, new Node.BinaryExpression(operator, stack[i - 2], expr));
+ i -= 2;
+ }
+ }
+ return expr;
+ };
+ // https://tc39.github.io/ecma262/#sec-conditional-operator
+ Parser.prototype.parseConditionalExpression = function () {
+ var startToken = this.lookahead;
+ var expr = this.inheritCoverGrammar(this.parseBinaryExpression);
+ if (this.match('?')) {
+ this.nextToken();
+ var previousAllowIn = this.context.allowIn;
+ this.context.allowIn = true;
+ var consequent = this.isolateCoverGrammar(this.parseAssignmentExpression);
+ this.context.allowIn = previousAllowIn;
+ this.expect(':');
+ var alternate = this.isolateCoverGrammar(this.parseAssignmentExpression);
+ expr = this.finalize(this.startNode(startToken), new Node.ConditionalExpression(expr, consequent, alternate));
+ this.context.isAssignmentTarget = false;
+ this.context.isBindingElement = false;
+ }
+ return expr;
+ };
+ // https://tc39.github.io/ecma262/#sec-assignment-operators
+ Parser.prototype.checkPatternParam = function (options, param) {
+ switch (param.type) {
+ case syntax_1.Syntax.Identifier:
+ this.validateParam(options, param, param.name);
+ break;
+ case syntax_1.Syntax.RestElement:
+ this.checkPatternParam(options, param.argument);
+ break;
+ case syntax_1.Syntax.AssignmentPattern:
+ this.checkPatternParam(options, param.left);
+ break;
+ case syntax_1.Syntax.ArrayPattern:
+ for (var i = 0; i < param.elements.length; i++) {
+ if (param.elements[i] !== null) {
+ this.checkPatternParam(options, param.elements[i]);
+ }
+ }
+ break;
+ case syntax_1.Syntax.ObjectPattern:
+ for (var i = 0; i < param.properties.length; i++) {
+ this.checkPatternParam(options, param.properties[i].value);
+ }
+ break;
+ default:
+ break;
+ }
+ options.simple = options.simple && (param instanceof Node.Identifier);
+ };
+ Parser.prototype.reinterpretAsCoverFormalsList = function (expr) {
+ var params = [expr];
+ var options;
+ var asyncArrow = false;
+ switch (expr.type) {
+ case syntax_1.Syntax.Identifier:
+ break;
+ case ArrowParameterPlaceHolder:
+ params = expr.params;
+ asyncArrow = expr.async;
+ break;
+ default:
+ return null;
+ }
+ options = {
+ simple: true,
+ paramSet: {}
+ };
+ for (var i = 0; i < params.length; ++i) {
+ var param = params[i];
+ if (param.type === syntax_1.Syntax.AssignmentPattern) {
+ if (param.right.type === syntax_1.Syntax.YieldExpression) {
+ if (param.right.argument) {
+ this.throwUnexpectedToken(this.lookahead);
+ }
+ param.right.type = syntax_1.Syntax.Identifier;
+ param.right.name = 'yield';
+ delete param.right.argument;
+ delete param.right.delegate;
+ }
+ }
+ else if (asyncArrow && param.type === syntax_1.Syntax.Identifier && param.name === 'await') {
+ this.throwUnexpectedToken(this.lookahead);
+ }
+ this.checkPatternParam(options, param);
+ params[i] = param;
+ }
+ if (this.context.strict || !this.context.allowYield) {
+ for (var i = 0; i < params.length; ++i) {
+ var param = params[i];
+ if (param.type === syntax_1.Syntax.YieldExpression) {
+ this.throwUnexpectedToken(this.lookahead);
+ }
+ }
+ }
+ if (options.message === messages_1.Messages.StrictParamDupe) {
+ var token = this.context.strict ? options.stricted : options.firstRestricted;
+ this.throwUnexpectedToken(token, options.message);
+ }
+ return {
+ simple: options.simple,
+ params: params,
+ stricted: options.stricted,
+ firstRestricted: options.firstRestricted,
+ message: options.message
+ };
+ };
+ Parser.prototype.parseAssignmentExpression = function () {
+ var expr;
+ if (!this.context.allowYield && this.matchKeyword('yield')) {
+ expr = this.parseYieldExpression();
+ }
+ else {
+ var startToken = this.lookahead;
+ var token = startToken;
+ expr = this.parseConditionalExpression();
+ if (token.type === 3 /* Identifier */ && (token.lineNumber === this.lookahead.lineNumber) && token.value === 'async') {
+ if (this.lookahead.type === 3 /* Identifier */ || this.matchKeyword('yield')) {
+ var arg = this.parsePrimaryExpression();
+ this.reinterpretExpressionAsPattern(arg);
+ expr = {
+ type: ArrowParameterPlaceHolder,
+ params: [arg],
+ async: true
+ };
+ }
+ }
+ if (expr.type === ArrowParameterPlaceHolder || this.match('=>')) {
+ // https://tc39.github.io/ecma262/#sec-arrow-function-definitions
+ this.context.isAssignmentTarget = false;
+ this.context.isBindingElement = false;
+ var isAsync = expr.async;
+ var list = this.reinterpretAsCoverFormalsList(expr);
+ if (list) {
+ if (this.hasLineTerminator) {
+ this.tolerateUnexpectedToken(this.lookahead);
+ }
+ this.context.firstCoverInitializedNameError = null;
+ var previousStrict = this.context.strict;
+ var previousAllowStrictDirective = this.context.allowStrictDirective;
+ this.context.allowStrictDirective = list.simple;
+ var previousAllowYield = this.context.allowYield;
+ var previousAwait = this.context.await;
+ this.context.allowYield = true;
+ this.context.await = isAsync;
+ var node = this.startNode(startToken);
+ this.expect('=>');
+ var body = void 0;
+ if (this.match('{')) {
+ var previousAllowIn = this.context.allowIn;
+ this.context.allowIn = true;
+ body = this.parseFunctionSourceElements();
+ this.context.allowIn = previousAllowIn;
+ }
+ else {
+ body = this.isolateCoverGrammar(this.parseAssignmentExpression);
+ }
+ var expression = body.type !== syntax_1.Syntax.BlockStatement;
+ if (this.context.strict && list.firstRestricted) {
+ this.throwUnexpectedToken(list.firstRestricted, list.message);
+ }
+ if (this.context.strict && list.stricted) {
+ this.tolerateUnexpectedToken(list.stricted, list.message);
+ }
+ expr = isAsync ? this.finalize(node, new Node.AsyncArrowFunctionExpression(list.params, body, expression)) :
+ this.finalize(node, new Node.ArrowFunctionExpression(list.params, body, expression));
+ this.context.strict = previousStrict;
+ this.context.allowStrictDirective = previousAllowStrictDirective;
+ this.context.allowYield = previousAllowYield;
+ this.context.await = previousAwait;
+ }
+ }
+ else {
+ if (this.matchAssign()) {
+ if (!this.context.isAssignmentTarget) {
+ this.tolerateError(messages_1.Messages.InvalidLHSInAssignment);
+ }
+ if (this.context.strict && expr.type === syntax_1.Syntax.Identifier) {
+ var id = expr;
+ if (this.scanner.isRestrictedWord(id.name)) {
+ this.tolerateUnexpectedToken(token, messages_1.Messages.StrictLHSAssignment);
+ }
+ if (this.scanner.isStrictModeReservedWord(id.name)) {
+ this.tolerateUnexpectedToken(token, messages_1.Messages.StrictReservedWord);
+ }
+ }
+ if (!this.match('=')) {
+ this.context.isAssignmentTarget = false;
+ this.context.isBindingElement = false;
+ }
+ else {
+ this.reinterpretExpressionAsPattern(expr);
+ }
+ token = this.nextToken();
+ var operator = token.value;
+ var right = this.isolateCoverGrammar(this.parseAssignmentExpression);
+ expr = this.finalize(this.startNode(startToken), new Node.AssignmentExpression(operator, expr, right));
+ this.context.firstCoverInitializedNameError = null;
+ }
+ }
+ }
+ return expr;
+ };
+ // https://tc39.github.io/ecma262/#sec-comma-operator
+ Parser.prototype.parseExpression = function () {
+ var startToken = this.lookahead;
+ var expr = this.isolateCoverGrammar(this.parseAssignmentExpression);
+ if (this.match(',')) {
+ var expressions = [];
+ expressions.push(expr);
+ while (this.lookahead.type !== 2 /* EOF */) {
+ if (!this.match(',')) {
+ break;
+ }
+ this.nextToken();
+ expressions.push(this.isolateCoverGrammar(this.parseAssignmentExpression));
+ }
+ expr = this.finalize(this.startNode(startToken), new Node.SequenceExpression(expressions));
+ }
+ return expr;
+ };
+ // https://tc39.github.io/ecma262/#sec-block
+ Parser.prototype.parseStatementListItem = function () {
+ var statement;
+ this.context.isAssignmentTarget = true;
+ this.context.isBindingElement = true;
+ if (this.lookahead.type === 4 /* Keyword */) {
+ switch (this.lookahead.value) {
+ case 'export':
+ if (!this.context.isModule) {
+ this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.IllegalExportDeclaration);
+ }
+ statement = this.parseExportDeclaration();
+ break;
+ case 'import':
+ if (!this.context.isModule) {
+ this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.IllegalImportDeclaration);
+ }
+ statement = this.parseImportDeclaration();
+ break;
+ case 'const':
+ statement = this.parseLexicalDeclaration({ inFor: false });
+ break;
+ case 'function':
+ statement = this.parseFunctionDeclaration();
+ break;
+ case 'class':
+ statement = this.parseClassDeclaration();
+ break;
+ case 'let':
+ statement = this.isLexicalDeclaration() ? this.parseLexicalDeclaration({ inFor: false }) : this.parseStatement();
+ break;
+ default:
+ statement = this.parseStatement();
+ break;
+ }
+ }
+ else {
+ statement = this.parseStatement();
+ }
+ return statement;
+ };
+ Parser.prototype.parseBlock = function () {
+ var node = this.createNode();
+ this.expect('{');
+ var block = [];
+ while (true) {
+ if (this.match('}')) {
+ break;
+ }
+ block.push(this.parseStatementListItem());
+ }
+ this.expect('}');
+ return this.finalize(node, new Node.BlockStatement(block));
+ };
+ // https://tc39.github.io/ecma262/#sec-let-and-const-declarations
+ Parser.prototype.parseLexicalBinding = function (kind, options) {
+ var node = this.createNode();
+ var params = [];
+ var id = this.parsePattern(params, kind);
+ if (this.context.strict && id.type === syntax_1.Syntax.Identifier) {
+ if (this.scanner.isRestrictedWord(id.name)) {
+ this.tolerateError(messages_1.Messages.StrictVarName);
+ }
+ }
+ var init = null;
+ if (kind === 'const') {
+ if (!this.matchKeyword('in') && !this.matchContextualKeyword('of')) {
+ if (this.match('=')) {
+ this.nextToken();
+ init = this.isolateCoverGrammar(this.parseAssignmentExpression);
+ }
+ else {
+ this.throwError(messages_1.Messages.DeclarationMissingInitializer, 'const');
+ }
+ }
+ }
+ else if ((!options.inFor && id.type !== syntax_1.Syntax.Identifier) || this.match('=')) {
+ this.expect('=');
+ init = this.isolateCoverGrammar(this.parseAssignmentExpression);
+ }
+ return this.finalize(node, new Node.VariableDeclarator(id, init));
+ };
+ Parser.prototype.parseBindingList = function (kind, options) {
+ var list = [this.parseLexicalBinding(kind, options)];
+ while (this.match(',')) {
+ this.nextToken();
+ list.push(this.parseLexicalBinding(kind, options));
+ }
+ return list;
+ };
+ Parser.prototype.isLexicalDeclaration = function () {
+ var state = this.scanner.saveState();
+ this.scanner.scanComments();
+ var next = this.scanner.lex();
+ this.scanner.restoreState(state);
+ return (next.type === 3 /* Identifier */) ||
+ (next.type === 7 /* Punctuator */ && next.value === '[') ||
+ (next.type === 7 /* Punctuator */ && next.value === '{') ||
+ (next.type === 4 /* Keyword */ && next.value === 'let') ||
+ (next.type === 4 /* Keyword */ && next.value === 'yield');
+ };
+ Parser.prototype.parseLexicalDeclaration = function (options) {
+ var node = this.createNode();
+ var kind = this.nextToken().value;
+ assert_1.assert(kind === 'let' || kind === 'const', 'Lexical declaration must be either let or const');
+ var declarations = this.parseBindingList(kind, options);
+ this.consumeSemicolon();
+ return this.finalize(node, new Node.VariableDeclaration(declarations, kind));
+ };
+ // https://tc39.github.io/ecma262/#sec-destructuring-binding-patterns
+ Parser.prototype.parseBindingRestElement = function (params, kind) {
+ var node = this.createNode();
+ this.expect('...');
+ var arg = this.parsePattern(params, kind);
+ return this.finalize(node, new Node.RestElement(arg));
+ };
+ Parser.prototype.parseArrayPattern = function (params, kind) {
+ var node = this.createNode();
+ this.expect('[');
+ var elements = [];
+ while (!this.match(']')) {
+ if (this.match(',')) {
+ this.nextToken();
+ elements.push(null);
+ }
+ else {
+ if (this.match('...')) {
+ elements.push(this.parseBindingRestElement(params, kind));
+ break;
+ }
+ else {
+ elements.push(this.parsePatternWithDefault(params, kind));
+ }
+ if (!this.match(']')) {
+ this.expect(',');
+ }
+ }
+ }
+ this.expect(']');
+ return this.finalize(node, new Node.ArrayPattern(elements));
+ };
+ Parser.prototype.parsePropertyPattern = function (params, kind) {
+ var node = this.createNode();
+ var computed = false;
+ var shorthand = false;
+ var method = false;
+ var key;
+ var value;
+ if (this.lookahead.type === 3 /* Identifier */) {
+ var keyToken = this.lookahead;
+ key = this.parseVariableIdentifier();
+ var init = this.finalize(node, new Node.Identifier(keyToken.value));
+ if (this.match('=')) {
+ params.push(keyToken);
+ shorthand = true;
+ this.nextToken();
+ var expr = this.parseAssignmentExpression();
+ value = this.finalize(this.startNode(keyToken), new Node.AssignmentPattern(init, expr));
+ }
+ else if (!this.match(':')) {
+ params.push(keyToken);
+ shorthand = true;
+ value = init;
+ }
+ else {
+ this.expect(':');
+ value = this.parsePatternWithDefault(params, kind);
+ }
+ }
+ else {
+ computed = this.match('[');
+ key = this.parseObjectPropertyKey();
+ this.expect(':');
+ value = this.parsePatternWithDefault(params, kind);
+ }
+ return this.finalize(node, new Node.Property('init', key, computed, value, method, shorthand));
+ };
+ Parser.prototype.parseObjectPattern = function (params, kind) {
+ var node = this.createNode();
+ var properties = [];
+ this.expect('{');
+ while (!this.match('}')) {
+ properties.push(this.parsePropertyPattern(params, kind));
+ if (!this.match('}')) {
+ this.expect(',');
+ }
+ }
+ this.expect('}');
+ return this.finalize(node, new Node.ObjectPattern(properties));
+ };
+ Parser.prototype.parsePattern = function (params, kind) {
+ var pattern;
+ if (this.match('[')) {
+ pattern = this.parseArrayPattern(params, kind);
+ }
+ else if (this.match('{')) {
+ pattern = this.parseObjectPattern(params, kind);
+ }
+ else {
+ if (this.matchKeyword('let') && (kind === 'const' || kind === 'let')) {
+ this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.LetInLexicalBinding);
+ }
+ params.push(this.lookahead);
+ pattern = this.parseVariableIdentifier(kind);
+ }
+ return pattern;
+ };
+ Parser.prototype.parsePatternWithDefault = function (params, kind) {
+ var startToken = this.lookahead;
+ var pattern = this.parsePattern(params, kind);
+ if (this.match('=')) {
+ this.nextToken();
+ var previousAllowYield = this.context.allowYield;
+ this.context.allowYield = true;
+ var right = this.isolateCoverGrammar(this.parseAssignmentExpression);
+ this.context.allowYield = previousAllowYield;
+ pattern = this.finalize(this.startNode(startToken), new Node.AssignmentPattern(pattern, right));
+ }
+ return pattern;
+ };
+ // https://tc39.github.io/ecma262/#sec-variable-statement
+ Parser.prototype.parseVariableIdentifier = function (kind) {
+ var node = this.createNode();
+ var token = this.nextToken();
+ if (token.type === 4 /* Keyword */ && token.value === 'yield') {
+ if (this.context.strict) {
+ this.tolerateUnexpectedToken(token, messages_1.Messages.StrictReservedWord);
+ }
+ else if (!this.context.allowYield) {
+ this.throwUnexpectedToken(token);
+ }
+ }
+ else if (token.type !== 3 /* Identifier */) {
+ if (this.context.strict && token.type === 4 /* Keyword */ && this.scanner.isStrictModeReservedWord(token.value)) {
+ this.tolerateUnexpectedToken(token, messages_1.Messages.StrictReservedWord);
+ }
+ else {
+ if (this.context.strict || token.value !== 'let' || kind !== 'var') {
+ this.throwUnexpectedToken(token);
+ }
+ }
+ }
+ else if ((this.context.isModule || this.context.await) && token.type === 3 /* Identifier */ && token.value === 'await') {
+ this.tolerateUnexpectedToken(token);
+ }
+ return this.finalize(node, new Node.Identifier(token.value));
+ };
+ Parser.prototype.parseVariableDeclaration = function (options) {
+ var node = this.createNode();
+ var params = [];
+ var id = this.parsePattern(params, 'var');
+ if (this.context.strict && id.type === syntax_1.Syntax.Identifier) {
+ if (this.scanner.isRestrictedWord(id.name)) {
+ this.tolerateError(messages_1.Messages.StrictVarName);
+ }
+ }
+ var init = null;
+ if (this.match('=')) {
+ this.nextToken();
+ init = this.isolateCoverGrammar(this.parseAssignmentExpression);
+ }
+ else if (id.type !== syntax_1.Syntax.Identifier && !options.inFor) {
+ this.expect('=');
+ }
+ return this.finalize(node, new Node.VariableDeclarator(id, init));
+ };
+ Parser.prototype.parseVariableDeclarationList = function (options) {
+ var opt = { inFor: options.inFor };
+ var list = [];
+ list.push(this.parseVariableDeclaration(opt));
+ while (this.match(',')) {
+ this.nextToken();
+ list.push(this.parseVariableDeclaration(opt));
+ }
+ return list;
+ };
+ Parser.prototype.parseVariableStatement = function () {
+ var node = this.createNode();
+ this.expectKeyword('var');
+ var declarations = this.parseVariableDeclarationList({ inFor: false });
+ this.consumeSemicolon();
+ return this.finalize(node, new Node.VariableDeclaration(declarations, 'var'));
+ };
+ // https://tc39.github.io/ecma262/#sec-empty-statement
+ Parser.prototype.parseEmptyStatement = function () {
+ var node = this.createNode();
+ this.expect(';');
+ return this.finalize(node, new Node.EmptyStatement());
+ };
+ // https://tc39.github.io/ecma262/#sec-expression-statement
+ Parser.prototype.parseExpressionStatement = function () {
+ var node = this.createNode();
+ var expr = this.parseExpression();
+ this.consumeSemicolon();
+ return this.finalize(node, new Node.ExpressionStatement(expr));
+ };
+ // https://tc39.github.io/ecma262/#sec-if-statement
+ Parser.prototype.parseIfClause = function () {
+ if (this.context.strict && this.matchKeyword('function')) {
+ this.tolerateError(messages_1.Messages.StrictFunction);
+ }
+ return this.parseStatement();
+ };
+ Parser.prototype.parseIfStatement = function () {
+ var node = this.createNode();
+ var consequent;
+ var alternate = null;
+ this.expectKeyword('if');
+ this.expect('(');
+ var test = this.parseExpression();
+ if (!this.match(')') && this.config.tolerant) {
+ this.tolerateUnexpectedToken(this.nextToken());
+ consequent = this.finalize(this.createNode(), new Node.EmptyStatement());
+ }
+ else {
+ this.expect(')');
+ consequent = this.parseIfClause();
+ if (this.matchKeyword('else')) {
+ this.nextToken();
+ alternate = this.parseIfClause();
+ }
+ }
+ return this.finalize(node, new Node.IfStatement(test, consequent, alternate));
+ };
+ // https://tc39.github.io/ecma262/#sec-do-while-statement
+ Parser.prototype.parseDoWhileStatement = function () {
+ var node = this.createNode();
+ this.expectKeyword('do');
+ var previousInIteration = this.context.inIteration;
+ this.context.inIteration = true;
+ var body = this.parseStatement();
+ this.context.inIteration = previousInIteration;
+ this.expectKeyword('while');
+ this.expect('(');
+ var test = this.parseExpression();
+ if (!this.match(')') && this.config.tolerant) {
+ this.tolerateUnexpectedToken(this.nextToken());
+ }
+ else {
+ this.expect(')');
+ if (this.match(';')) {
+ this.nextToken();
+ }
+ }
+ return this.finalize(node, new Node.DoWhileStatement(body, test));
+ };
+ // https://tc39.github.io/ecma262/#sec-while-statement
+ Parser.prototype.parseWhileStatement = function () {
+ var node = this.createNode();
+ var body;
+ this.expectKeyword('while');
+ this.expect('(');
+ var test = this.parseExpression();
+ if (!this.match(')') && this.config.tolerant) {
+ this.tolerateUnexpectedToken(this.nextToken());
+ body = this.finalize(this.createNode(), new Node.EmptyStatement());
+ }
+ else {
+ this.expect(')');
+ var previousInIteration = this.context.inIteration;
+ this.context.inIteration = true;
+ body = this.parseStatement();
+ this.context.inIteration = previousInIteration;
+ }
+ return this.finalize(node, new Node.WhileStatement(test, body));
+ };
+ // https://tc39.github.io/ecma262/#sec-for-statement
+ // https://tc39.github.io/ecma262/#sec-for-in-and-for-of-statements
+ Parser.prototype.parseForStatement = function () {
+ var init = null;
+ var test = null;
+ var update = null;
+ var forIn = true;
+ var left, right;
+ var node = this.createNode();
+ this.expectKeyword('for');
+ this.expect('(');
+ if (this.match(';')) {
+ this.nextToken();
+ }
+ else {
+ if (this.matchKeyword('var')) {
+ init = this.createNode();
+ this.nextToken();
+ var previousAllowIn = this.context.allowIn;
+ this.context.allowIn = false;
+ var declarations = this.parseVariableDeclarationList({ inFor: true });
+ this.context.allowIn = previousAllowIn;
+ if (declarations.length === 1 && this.matchKeyword('in')) {
+ var decl = declarations[0];
+ if (decl.init && (decl.id.type === syntax_1.Syntax.ArrayPattern || decl.id.type === syntax_1.Syntax.ObjectPattern || this.context.strict)) {
+ this.tolerateError(messages_1.Messages.ForInOfLoopInitializer, 'for-in');
+ }
+ init = this.finalize(init, new Node.VariableDeclaration(declarations, 'var'));
+ this.nextToken();
+ left = init;
+ right = this.parseExpression();
+ init = null;
+ }
+ else if (declarations.length === 1 && declarations[0].init === null && this.matchContextualKeyword('of')) {
+ init = this.finalize(init, new Node.VariableDeclaration(declarations, 'var'));
+ this.nextToken();
+ left = init;
+ right = this.parseAssignmentExpression();
+ init = null;
+ forIn = false;
+ }
+ else {
+ init = this.finalize(init, new Node.VariableDeclaration(declarations, 'var'));
+ this.expect(';');
+ }
+ }
+ else if (this.matchKeyword('const') || this.matchKeyword('let')) {
+ init = this.createNode();
+ var kind = this.nextToken().value;
+ if (!this.context.strict && this.lookahead.value === 'in') {
+ init = this.finalize(init, new Node.Identifier(kind));
+ this.nextToken();
+ left = init;
+ right = this.parseExpression();
+ init = null;
+ }
+ else {
+ var previousAllowIn = this.context.allowIn;
+ this.context.allowIn = false;
+ var declarations = this.parseBindingList(kind, { inFor: true });
+ this.context.allowIn = previousAllowIn;
+ if (declarations.length === 1 && declarations[0].init === null && this.matchKeyword('in')) {
+ init = this.finalize(init, new Node.VariableDeclaration(declarations, kind));
+ this.nextToken();
+ left = init;
+ right = this.parseExpression();
+ init = null;
+ }
+ else if (declarations.length === 1 && declarations[0].init === null && this.matchContextualKeyword('of')) {
+ init = this.finalize(init, new Node.VariableDeclaration(declarations, kind));
+ this.nextToken();
+ left = init;
+ right = this.parseAssignmentExpression();
+ init = null;
+ forIn = false;
+ }
+ else {
+ this.consumeSemicolon();
+ init = this.finalize(init, new Node.VariableDeclaration(declarations, kind));
+ }
+ }
+ }
+ else {
+ var initStartToken = this.lookahead;
+ var previousAllowIn = this.context.allowIn;
+ this.context.allowIn = false;
+ init = this.inheritCoverGrammar(this.parseAssignmentExpression);
+ this.context.allowIn = previousAllowIn;
+ if (this.matchKeyword('in')) {
+ if (!this.context.isAssignmentTarget || init.type === syntax_1.Syntax.AssignmentExpression) {
+ this.tolerateError(messages_1.Messages.InvalidLHSInForIn);
+ }
+ this.nextToken();
+ this.reinterpretExpressionAsPattern(init);
+ left = init;
+ right = this.parseExpression();
+ init = null;
+ }
+ else if (this.matchContextualKeyword('of')) {
+ if (!this.context.isAssignmentTarget || init.type === syntax_1.Syntax.AssignmentExpression) {
+ this.tolerateError(messages_1.Messages.InvalidLHSInForLoop);
+ }
+ this.nextToken();
+ this.reinterpretExpressionAsPattern(init);
+ left = init;
+ right = this.parseAssignmentExpression();
+ init = null;
+ forIn = false;
+ }
+ else {
+ if (this.match(',')) {
+ var initSeq = [init];
+ while (this.match(',')) {
+ this.nextToken();
+ initSeq.push(this.isolateCoverGrammar(this.parseAssignmentExpression));
+ }
+ init = this.finalize(this.startNode(initStartToken), new Node.SequenceExpression(initSeq));
+ }
+ this.expect(';');
+ }
+ }
+ }
+ if (typeof left === 'undefined') {
+ if (!this.match(';')) {
+ test = this.parseExpression();
+ }
+ this.expect(';');
+ if (!this.match(')')) {
+ update = this.parseExpression();
+ }
+ }
+ var body;
+ if (!this.match(')') && this.config.tolerant) {
+ this.tolerateUnexpectedToken(this.nextToken());
+ body = this.finalize(this.createNode(), new Node.EmptyStatement());
+ }
+ else {
+ this.expect(')');
+ var previousInIteration = this.context.inIteration;
+ this.context.inIteration = true;
+ body = this.isolateCoverGrammar(this.parseStatement);
+ this.context.inIteration = previousInIteration;
+ }
+ return (typeof left === 'undefined') ?
+ this.finalize(node, new Node.ForStatement(init, test, update, body)) :
+ forIn ? this.finalize(node, new Node.ForInStatement(left, right, body)) :
+ this.finalize(node, new Node.ForOfStatement(left, right, body));
+ };
+ // https://tc39.github.io/ecma262/#sec-continue-statement
+ Parser.prototype.parseContinueStatement = function () {
+ var node = this.createNode();
+ this.expectKeyword('continue');
+ var label = null;
+ if (this.lookahead.type === 3 /* Identifier */ && !this.hasLineTerminator) {
+ var id = this.parseVariableIdentifier();
+ label = id;
+ var key = '$' + id.name;
+ if (!Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) {
+ this.throwError(messages_1.Messages.UnknownLabel, id.name);
+ }
+ }
+ this.consumeSemicolon();
+ if (label === null && !this.context.inIteration) {
+ this.throwError(messages_1.Messages.IllegalContinue);
+ }
+ return this.finalize(node, new Node.ContinueStatement(label));
+ };
+ // https://tc39.github.io/ecma262/#sec-break-statement
+ Parser.prototype.parseBreakStatement = function () {
+ var node = this.createNode();
+ this.expectKeyword('break');
+ var label = null;
+ if (this.lookahead.type === 3 /* Identifier */ && !this.hasLineTerminator) {
+ var id = this.parseVariableIdentifier();
+ var key = '$' + id.name;
+ if (!Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) {
+ this.throwError(messages_1.Messages.UnknownLabel, id.name);
+ }
+ label = id;
+ }
+ this.consumeSemicolon();
+ if (label === null && !this.context.inIteration && !this.context.inSwitch) {
+ this.throwError(messages_1.Messages.IllegalBreak);
+ }
+ return this.finalize(node, new Node.BreakStatement(label));
+ };
+ // https://tc39.github.io/ecma262/#sec-return-statement
+ Parser.prototype.parseReturnStatement = function () {
+ if (!this.context.inFunctionBody) {
+ this.tolerateError(messages_1.Messages.IllegalReturn);
+ }
+ var node = this.createNode();
+ this.expectKeyword('return');
+ var hasArgument = !this.match(';') && !this.match('}') &&
+ !this.hasLineTerminator && this.lookahead.type !== 2 /* EOF */;
+ var argument = hasArgument ? this.parseExpression() : null;
+ this.consumeSemicolon();
+ return this.finalize(node, new Node.ReturnStatement(argument));
+ };
+ // https://tc39.github.io/ecma262/#sec-with-statement
+ Parser.prototype.parseWithStatement = function () {
+ if (this.context.strict) {
+ this.tolerateError(messages_1.Messages.StrictModeWith);
+ }
+ var node = this.createNode();
+ var body;
+ this.expectKeyword('with');
+ this.expect('(');
+ var object = this.parseExpression();
+ if (!this.match(')') && this.config.tolerant) {
+ this.tolerateUnexpectedToken(this.nextToken());
+ body = this.finalize(this.createNode(), new Node.EmptyStatement());
+ }
+ else {
+ this.expect(')');
+ body = this.parseStatement();
+ }
+ return this.finalize(node, new Node.WithStatement(object, body));
+ };
+ // https://tc39.github.io/ecma262/#sec-switch-statement
+ Parser.prototype.parseSwitchCase = function () {
+ var node = this.createNode();
+ var test;
+ if (this.matchKeyword('default')) {
+ this.nextToken();
+ test = null;
+ }
+ else {
+ this.expectKeyword('case');
+ test = this.parseExpression();
+ }
+ this.expect(':');
+ var consequent = [];
+ while (true) {
+ if (this.match('}') || this.matchKeyword('default') || this.matchKeyword('case')) {
+ break;
+ }
+ consequent.push(this.parseStatementListItem());
+ }
+ return this.finalize(node, new Node.SwitchCase(test, consequent));
+ };
+ Parser.prototype.parseSwitchStatement = function () {
+ var node = this.createNode();
+ this.expectKeyword('switch');
+ this.expect('(');
+ var discriminant = this.parseExpression();
+ this.expect(')');
+ var previousInSwitch = this.context.inSwitch;
+ this.context.inSwitch = true;
+ var cases = [];
+ var defaultFound = false;
+ this.expect('{');
+ while (true) {
+ if (this.match('}')) {
+ break;
+ }
+ var clause = this.parseSwitchCase();
+ if (clause.test === null) {
+ if (defaultFound) {
+ this.throwError(messages_1.Messages.MultipleDefaultsInSwitch);
+ }
+ defaultFound = true;
+ }
+ cases.push(clause);
+ }
+ this.expect('}');
+ this.context.inSwitch = previousInSwitch;
+ return this.finalize(node, new Node.SwitchStatement(discriminant, cases));
+ };
+ // https://tc39.github.io/ecma262/#sec-labelled-statements
+ Parser.prototype.parseLabelledStatement = function () {
+ var node = this.createNode();
+ var expr = this.parseExpression();
+ var statement;
+ if ((expr.type === syntax_1.Syntax.Identifier) && this.match(':')) {
+ this.nextToken();
+ var id = expr;
+ var key = '$' + id.name;
+ if (Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) {
+ this.throwError(messages_1.Messages.Redeclaration, 'Label', id.name);
+ }
+ this.context.labelSet[key] = true;
+ var body = void 0;
+ if (this.matchKeyword('class')) {
+ this.tolerateUnexpectedToken(this.lookahead);
+ body = this.parseClassDeclaration();
+ }
+ else if (this.matchKeyword('function')) {
+ var token = this.lookahead;
+ var declaration = this.parseFunctionDeclaration();
+ if (this.context.strict) {
+ this.tolerateUnexpectedToken(token, messages_1.Messages.StrictFunction);
+ }
+ else if (declaration.generator) {
+ this.tolerateUnexpectedToken(token, messages_1.Messages.GeneratorInLegacyContext);
+ }
+ body = declaration;
+ }
+ else {
+ body = this.parseStatement();
+ }
+ delete this.context.labelSet[key];
+ statement = new Node.LabeledStatement(id, body);
+ }
+ else {
+ this.consumeSemicolon();
+ statement = new Node.ExpressionStatement(expr);
+ }
+ return this.finalize(node, statement);
+ };
+ // https://tc39.github.io/ecma262/#sec-throw-statement
+ Parser.prototype.parseThrowStatement = function () {
+ var node = this.createNode();
+ this.expectKeyword('throw');
+ if (this.hasLineTerminator) {
+ this.throwError(messages_1.Messages.NewlineAfterThrow);
+ }
+ var argument = this.parseExpression();
+ this.consumeSemicolon();
+ return this.finalize(node, new Node.ThrowStatement(argument));
+ };
+ // https://tc39.github.io/ecma262/#sec-try-statement
+ Parser.prototype.parseCatchClause = function () {
+ var node = this.createNode();
+ this.expectKeyword('catch');
+ this.expect('(');
+ if (this.match(')')) {
+ this.throwUnexpectedToken(this.lookahead);
+ }
+ var params = [];
+ var param = this.parsePattern(params);
+ var paramMap = {};
+ for (var i = 0; i < params.length; i++) {
+ var key = '$' + params[i].value;
+ if (Object.prototype.hasOwnProperty.call(paramMap, key)) {
+ this.tolerateError(messages_1.Messages.DuplicateBinding, params[i].value);
+ }
+ paramMap[key] = true;
+ }
+ if (this.context.strict && param.type === syntax_1.Syntax.Identifier) {
+ if (this.scanner.isRestrictedWord(param.name)) {
+ this.tolerateError(messages_1.Messages.StrictCatchVariable);
+ }
+ }
+ this.expect(')');
+ var body = this.parseBlock();
+ return this.finalize(node, new Node.CatchClause(param, body));
+ };
+ Parser.prototype.parseFinallyClause = function () {
+ this.expectKeyword('finally');
+ return this.parseBlock();
+ };
+ Parser.prototype.parseTryStatement = function () {
+ var node = this.createNode();
+ this.expectKeyword('try');
+ var block = this.parseBlock();
+ var handler = this.matchKeyword('catch') ? this.parseCatchClause() : null;
+ var finalizer = this.matchKeyword('finally') ? this.parseFinallyClause() : null;
+ if (!handler && !finalizer) {
+ this.throwError(messages_1.Messages.NoCatchOrFinally);
+ }
+ return this.finalize(node, new Node.TryStatement(block, handler, finalizer));
+ };
+ // https://tc39.github.io/ecma262/#sec-debugger-statement
+ Parser.prototype.parseDebuggerStatement = function () {
+ var node = this.createNode();
+ this.expectKeyword('debugger');
+ this.consumeSemicolon();
+ return this.finalize(node, new Node.DebuggerStatement());
+ };
+ // https://tc39.github.io/ecma262/#sec-ecmascript-language-statements-and-declarations
+ Parser.prototype.parseStatement = function () {
+ var statement;
+ switch (this.lookahead.type) {
+ case 1 /* BooleanLiteral */:
+ case 5 /* NullLiteral */:
+ case 6 /* NumericLiteral */:
+ case 8 /* StringLiteral */:
+ case 10 /* Template */:
+ case 9 /* RegularExpression */:
+ statement = this.parseExpressionStatement();
+ break;
+ case 7 /* Punctuator */:
+ var value = this.lookahead.value;
+ if (value === '{') {
+ statement = this.parseBlock();
+ }
+ else if (value === '(') {
+ statement = this.parseExpressionStatement();
+ }
+ else if (value === ';') {
+ statement = this.parseEmptyStatement();
+ }
+ else {
+ statement = this.parseExpressionStatement();
+ }
+ break;
+ case 3 /* Identifier */:
+ statement = this.matchAsyncFunction() ? this.parseFunctionDeclaration() : this.parseLabelledStatement();
+ break;
+ case 4 /* Keyword */:
+ switch (this.lookahead.value) {
+ case 'break':
+ statement = this.parseBreakStatement();
+ break;
+ case 'continue':
+ statement = this.parseContinueStatement();
+ break;
+ case 'debugger':
+ statement = this.parseDebuggerStatement();
+ break;
+ case 'do':
+ statement = this.parseDoWhileStatement();
+ break;
+ case 'for':
+ statement = this.parseForStatement();
+ break;
+ case 'function':
+ statement = this.parseFunctionDeclaration();
+ break;
+ case 'if':
+ statement = this.parseIfStatement();
+ break;
+ case 'return':
+ statement = this.parseReturnStatement();
+ break;
+ case 'switch':
+ statement = this.parseSwitchStatement();
+ break;
+ case 'throw':
+ statement = this.parseThrowStatement();
+ break;
+ case 'try':
+ statement = this.parseTryStatement();
+ break;
+ case 'var':
+ statement = this.parseVariableStatement();
+ break;
+ case 'while':
+ statement = this.parseWhileStatement();
+ break;
+ case 'with':
+ statement = this.parseWithStatement();
+ break;
+ default:
+ statement = this.parseExpressionStatement();
+ break;
+ }
+ break;
+ default:
+ statement = this.throwUnexpectedToken(this.lookahead);
+ }
+ return statement;
+ };
+ // https://tc39.github.io/ecma262/#sec-function-definitions
+ Parser.prototype.parseFunctionSourceElements = function () {
+ var node = this.createNode();
+ this.expect('{');
+ var body = this.parseDirectivePrologues();
+ var previousLabelSet = this.context.labelSet;
+ var previousInIteration = this.context.inIteration;
+ var previousInSwitch = this.context.inSwitch;
+ var previousInFunctionBody = this.context.inFunctionBody;
+ this.context.labelSet = {};
+ this.context.inIteration = false;
+ this.context.inSwitch = false;
+ this.context.inFunctionBody = true;
+ while (this.lookahead.type !== 2 /* EOF */) {
+ if (this.match('}')) {
+ break;
+ }
+ body.push(this.parseStatementListItem());
+ }
+ this.expect('}');
+ this.context.labelSet = previousLabelSet;
+ this.context.inIteration = previousInIteration;
+ this.context.inSwitch = previousInSwitch;
+ this.context.inFunctionBody = previousInFunctionBody;
+ return this.finalize(node, new Node.BlockStatement(body));
+ };
+ Parser.prototype.validateParam = function (options, param, name) {
+ var key = '$' + name;
+ if (this.context.strict) {
+ if (this.scanner.isRestrictedWord(name)) {
+ options.stricted = param;
+ options.message = messages_1.Messages.StrictParamName;
+ }
+ if (Object.prototype.hasOwnProperty.call(options.paramSet, key)) {
+ options.stricted = param;
+ options.message = messages_1.Messages.StrictParamDupe;
+ }
+ }
+ else if (!options.firstRestricted) {
+ if (this.scanner.isRestrictedWord(name)) {
+ options.firstRestricted = param;
+ options.message = messages_1.Messages.StrictParamName;
+ }
+ else if (this.scanner.isStrictModeReservedWord(name)) {
+ options.firstRestricted = param;
+ options.message = messages_1.Messages.StrictReservedWord;
+ }
+ else if (Object.prototype.hasOwnProperty.call(options.paramSet, key)) {
+ options.stricted = param;
+ options.message = messages_1.Messages.StrictParamDupe;
+ }
+ }
+ /* istanbul ignore next */
+ if (typeof Object.defineProperty === 'function') {
+ Object.defineProperty(options.paramSet, key, { value: true, enumerable: true, writable: true, configurable: true });
+ }
+ else {
+ options.paramSet[key] = true;
+ }
+ };
+ Parser.prototype.parseRestElement = function (params) {
+ var node = this.createNode();
+ this.expect('...');
+ var arg = this.parsePattern(params);
+ if (this.match('=')) {
+ this.throwError(messages_1.Messages.DefaultRestParameter);
+ }
+ if (!this.match(')')) {
+ this.throwError(messages_1.Messages.ParameterAfterRestParameter);
+ }
+ return this.finalize(node, new Node.RestElement(arg));
+ };
+ Parser.prototype.parseFormalParameter = function (options) {
+ var params = [];
+ var param = this.match('...') ? this.parseRestElement(params) : this.parsePatternWithDefault(params);
+ for (var i = 0; i < params.length; i++) {
+ this.validateParam(options, params[i], params[i].value);
+ }
+ options.simple = options.simple && (param instanceof Node.Identifier);
+ options.params.push(param);
+ };
+ Parser.prototype.parseFormalParameters = function (firstRestricted) {
+ var options;
+ options = {
+ simple: true,
+ params: [],
+ firstRestricted: firstRestricted
+ };
+ this.expect('(');
+ if (!this.match(')')) {
+ options.paramSet = {};
+ while (this.lookahead.type !== 2 /* EOF */) {
+ this.parseFormalParameter(options);
+ if (this.match(')')) {
+ break;
+ }
+ this.expect(',');
+ if (this.match(')')) {
+ break;
+ }
+ }
+ }
+ this.expect(')');
+ return {
+ simple: options.simple,
+ params: options.params,
+ stricted: options.stricted,
+ firstRestricted: options.firstRestricted,
+ message: options.message
+ };
+ };
+ Parser.prototype.matchAsyncFunction = function () {
+ var match = this.matchContextualKeyword('async');
+ if (match) {
+ var state = this.scanner.saveState();
+ this.scanner.scanComments();
+ var next = this.scanner.lex();
+ this.scanner.restoreState(state);
+ match = (state.lineNumber === next.lineNumber) && (next.type === 4 /* Keyword */) && (next.value === 'function');
+ }
+ return match;
+ };
+ Parser.prototype.parseFunctionDeclaration = function (identifierIsOptional) {
+ var node = this.createNode();
+ var isAsync = this.matchContextualKeyword('async');
+ if (isAsync) {
+ this.nextToken();
+ }
+ this.expectKeyword('function');
+ var isGenerator = isAsync ? false : this.match('*');
+ if (isGenerator) {
+ this.nextToken();
+ }
+ var message;
+ var id = null;
+ var firstRestricted = null;
+ if (!identifierIsOptional || !this.match('(')) {
+ var token = this.lookahead;
+ id = this.parseVariableIdentifier();
+ if (this.context.strict) {
+ if (this.scanner.isRestrictedWord(token.value)) {
+ this.tolerateUnexpectedToken(token, messages_1.Messages.StrictFunctionName);
+ }
+ }
+ else {
+ if (this.scanner.isRestrictedWord(token.value)) {
+ firstRestricted = token;
+ message = messages_1.Messages.StrictFunctionName;
+ }
+ else if (this.scanner.isStrictModeReservedWord(token.value)) {
+ firstRestricted = token;
+ message = messages_1.Messages.StrictReservedWord;
+ }
+ }
+ }
+ var previousAllowAwait = this.context.await;
+ var previousAllowYield = this.context.allowYield;
+ this.context.await = isAsync;
+ this.context.allowYield = !isGenerator;
+ var formalParameters = this.parseFormalParameters(firstRestricted);
+ var params = formalParameters.params;
+ var stricted = formalParameters.stricted;
+ firstRestricted = formalParameters.firstRestricted;
+ if (formalParameters.message) {
+ message = formalParameters.message;
+ }
+ var previousStrict = this.context.strict;
+ var previousAllowStrictDirective = this.context.allowStrictDirective;
+ this.context.allowStrictDirective = formalParameters.simple;
+ var body = this.parseFunctionSourceElements();
+ if (this.context.strict && firstRestricted) {
+ this.throwUnexpectedToken(firstRestricted, message);
+ }
+ if (this.context.strict && stricted) {
+ this.tolerateUnexpectedToken(stricted, message);
+ }
+ this.context.strict = previousStrict;
+ this.context.allowStrictDirective = previousAllowStrictDirective;
+ this.context.await = previousAllowAwait;
+ this.context.allowYield = previousAllowYield;
+ return isAsync ? this.finalize(node, new Node.AsyncFunctionDeclaration(id, params, body)) :
+ this.finalize(node, new Node.FunctionDeclaration(id, params, body, isGenerator));
+ };
+ Parser.prototype.parseFunctionExpression = function () {
+ var node = this.createNode();
+ var isAsync = this.matchContextualKeyword('async');
+ if (isAsync) {
+ this.nextToken();
+ }
+ this.expectKeyword('function');
+ var isGenerator = isAsync ? false : this.match('*');
+ if (isGenerator) {
+ this.nextToken();
+ }
+ var message;
+ var id = null;
+ var firstRestricted;
+ var previousAllowAwait = this.context.await;
+ var previousAllowYield = this.context.allowYield;
+ this.context.await = isAsync;
+ this.context.allowYield = !isGenerator;
+ if (!this.match('(')) {
+ var token = this.lookahead;
+ id = (!this.context.strict && !isGenerator && this.matchKeyword('yield')) ? this.parseIdentifierName() : this.parseVariableIdentifier();
+ if (this.context.strict) {
+ if (this.scanner.isRestrictedWord(token.value)) {
+ this.tolerateUnexpectedToken(token, messages_1.Messages.StrictFunctionName);
+ }
+ }
+ else {
+ if (this.scanner.isRestrictedWord(token.value)) {
+ firstRestricted = token;
+ message = messages_1.Messages.StrictFunctionName;
+ }
+ else if (this.scanner.isStrictModeReservedWord(token.value)) {
+ firstRestricted = token;
+ message = messages_1.Messages.StrictReservedWord;
+ }
+ }
+ }
+ var formalParameters = this.parseFormalParameters(firstRestricted);
+ var params = formalParameters.params;
+ var stricted = formalParameters.stricted;
+ firstRestricted = formalParameters.firstRestricted;
+ if (formalParameters.message) {
+ message = formalParameters.message;
+ }
+ var previousStrict = this.context.strict;
+ var previousAllowStrictDirective = this.context.allowStrictDirective;
+ this.context.allowStrictDirective = formalParameters.simple;
+ var body = this.parseFunctionSourceElements();
+ if (this.context.strict && firstRestricted) {
+ this.throwUnexpectedToken(firstRestricted, message);
+ }
+ if (this.context.strict && stricted) {
+ this.tolerateUnexpectedToken(stricted, message);
+ }
+ this.context.strict = previousStrict;
+ this.context.allowStrictDirective = previousAllowStrictDirective;
+ this.context.await = previousAllowAwait;
+ this.context.allowYield = previousAllowYield;
+ return isAsync ? this.finalize(node, new Node.AsyncFunctionExpression(id, params, body)) :
+ this.finalize(node, new Node.FunctionExpression(id, params, body, isGenerator));
+ };
+ // https://tc39.github.io/ecma262/#sec-directive-prologues-and-the-use-strict-directive
+ Parser.prototype.parseDirective = function () {
+ var token = this.lookahead;
+ var node = this.createNode();
+ var expr = this.parseExpression();
+ var directive = (expr.type === syntax_1.Syntax.Literal) ? this.getTokenRaw(token).slice(1, -1) : null;
+ this.consumeSemicolon();
+ return this.finalize(node, directive ? new Node.Directive(expr, directive) : new Node.ExpressionStatement(expr));
+ };
+ Parser.prototype.parseDirectivePrologues = function () {
+ var firstRestricted = null;
+ var body = [];
+ while (true) {
+ var token = this.lookahead;
+ if (token.type !== 8 /* StringLiteral */) {
+ break;
+ }
+ var statement = this.parseDirective();
+ body.push(statement);
+ var directive = statement.directive;
+ if (typeof directive !== 'string') {
+ break;
+ }
+ if (directive === 'use strict') {
+ this.context.strict = true;
+ if (firstRestricted) {
+ this.tolerateUnexpectedToken(firstRestricted, messages_1.Messages.StrictOctalLiteral);
+ }
+ if (!this.context.allowStrictDirective) {
+ this.tolerateUnexpectedToken(token, messages_1.Messages.IllegalLanguageModeDirective);
+ }
+ }
+ else {
+ if (!firstRestricted && token.octal) {
+ firstRestricted = token;
+ }
+ }
+ }
+ return body;
+ };
+ // https://tc39.github.io/ecma262/#sec-method-definitions
+ Parser.prototype.qualifiedPropertyName = function (token) {
+ switch (token.type) {
+ case 3 /* Identifier */:
+ case 8 /* StringLiteral */:
+ case 1 /* BooleanLiteral */:
+ case 5 /* NullLiteral */:
+ case 6 /* NumericLiteral */:
+ case 4 /* Keyword */:
+ return true;
+ case 7 /* Punctuator */:
+ return token.value === '[';
+ default:
+ break;
+ }
+ return false;
+ };
+ Parser.prototype.parseGetterMethod = function () {
+ var node = this.createNode();
+ var isGenerator = false;
+ var previousAllowYield = this.context.allowYield;
+ this.context.allowYield = false;
+ var formalParameters = this.parseFormalParameters();
+ if (formalParameters.params.length > 0) {
+ this.tolerateError(messages_1.Messages.BadGetterArity);
+ }
+ var method = this.parsePropertyMethod(formalParameters);
+ this.context.allowYield = previousAllowYield;
+ return this.finalize(node, new Node.FunctionExpression(null, formalParameters.params, method, isGenerator));
+ };
+ Parser.prototype.parseSetterMethod = function () {
+ var node = this.createNode();
+ var isGenerator = false;
+ var previousAllowYield = this.context.allowYield;
+ this.context.allowYield = false;
+ var formalParameters = this.parseFormalParameters();
+ if (formalParameters.params.length !== 1) {
+ this.tolerateError(messages_1.Messages.BadSetterArity);
+ }
+ else if (formalParameters.params[0] instanceof Node.RestElement) {
+ this.tolerateError(messages_1.Messages.BadSetterRestParameter);
+ }
+ var method = this.parsePropertyMethod(formalParameters);
+ this.context.allowYield = previousAllowYield;
+ return this.finalize(node, new Node.FunctionExpression(null, formalParameters.params, method, isGenerator));
+ };
+ Parser.prototype.parseGeneratorMethod = function () {
+ var node = this.createNode();
+ var isGenerator = true;
+ var previousAllowYield = this.context.allowYield;
+ this.context.allowYield = true;
+ var params = this.parseFormalParameters();
+ this.context.allowYield = false;
+ var method = this.parsePropertyMethod(params);
+ this.context.allowYield = previousAllowYield;
+ return this.finalize(node, new Node.FunctionExpression(null, params.params, method, isGenerator));
+ };
+ // https://tc39.github.io/ecma262/#sec-generator-function-definitions
+ Parser.prototype.isStartOfExpression = function () {
+ var start = true;
+ var value = this.lookahead.value;
+ switch (this.lookahead.type) {
+ case 7 /* Punctuator */:
+ start = (value === '[') || (value === '(') || (value === '{') ||
+ (value === '+') || (value === '-') ||
+ (value === '!') || (value === '~') ||
+ (value === '++') || (value === '--') ||
+ (value === '/') || (value === '/='); // regular expression literal
+ break;
+ case 4 /* Keyword */:
+ start = (value === 'class') || (value === 'delete') ||
+ (value === 'function') || (value === 'let') || (value === 'new') ||
+ (value === 'super') || (value === 'this') || (value === 'typeof') ||
+ (value === 'void') || (value === 'yield');
+ break;
+ default:
+ break;
+ }
+ return start;
+ };
+ Parser.prototype.parseYieldExpression = function () {
+ var node = this.createNode();
+ this.expectKeyword('yield');
+ var argument = null;
+ var delegate = false;
+ if (!this.hasLineTerminator) {
+ var previousAllowYield = this.context.allowYield;
+ this.context.allowYield = false;
+ delegate = this.match('*');
+ if (delegate) {
+ this.nextToken();
+ argument = this.parseAssignmentExpression();
+ }
+ else if (this.isStartOfExpression()) {
+ argument = this.parseAssignmentExpression();
+ }
+ this.context.allowYield = previousAllowYield;
+ }
+ return this.finalize(node, new Node.YieldExpression(argument, delegate));
+ };
+ // https://tc39.github.io/ecma262/#sec-class-definitions
+ Parser.prototype.parseClassElement = function (hasConstructor) {
+ var token = this.lookahead;
+ var node = this.createNode();
+ var kind = '';
+ var key = null;
+ var value = null;
+ var computed = false;
+ var method = false;
+ var isStatic = false;
+ var isAsync = false;
+ if (this.match('*')) {
+ this.nextToken();
+ }
+ else {
+ computed = this.match('[');
+ key = this.parseObjectPropertyKey();
+ var id = key;
+ if (id.name === 'static' && (this.qualifiedPropertyName(this.lookahead) || this.match('*'))) {
+ token = this.lookahead;
+ isStatic = true;
+ computed = this.match('[');
+ if (this.match('*')) {
+ this.nextToken();
+ }
+ else {
+ key = this.parseObjectPropertyKey();
+ }
+ }
+ if ((token.type === 3 /* Identifier */) && !this.hasLineTerminator && (token.value === 'async')) {
+ var punctuator = this.lookahead.value;
+ if (punctuator !== ':' && punctuator !== '(' && punctuator !== '*') {
+ isAsync = true;
+ token = this.lookahead;
+ key = this.parseObjectPropertyKey();
+ if (token.type === 3 /* Identifier */) {
+ if (token.value === 'get' || token.value === 'set') {
+ this.tolerateUnexpectedToken(token);
+ }
+ else if (token.value === 'constructor') {
+ this.tolerateUnexpectedToken(token, messages_1.Messages.ConstructorIsAsync);
+ }
+ }
+ }
+ }
+ }
+ var lookaheadPropertyKey = this.qualifiedPropertyName(this.lookahead);
+ if (token.type === 3 /* Identifier */) {
+ if (token.value === 'get' && lookaheadPropertyKey) {
+ kind = 'get';
+ computed = this.match('[');
+ key = this.parseObjectPropertyKey();
+ this.context.allowYield = false;
+ value = this.parseGetterMethod();
+ }
+ else if (token.value === 'set' && lookaheadPropertyKey) {
+ kind = 'set';
+ computed = this.match('[');
+ key = this.parseObjectPropertyKey();
+ value = this.parseSetterMethod();
+ }
+ }
+ else if (token.type === 7 /* Punctuator */ && token.value === '*' && lookaheadPropertyKey) {
+ kind = 'init';
+ computed = this.match('[');
+ key = this.parseObjectPropertyKey();
+ value = this.parseGeneratorMethod();
+ method = true;
+ }
+ if (!kind && key && this.match('(')) {
+ kind = 'init';
+ value = isAsync ? this.parsePropertyMethodAsyncFunction() : this.parsePropertyMethodFunction();
+ method = true;
+ }
+ if (!kind) {
+ this.throwUnexpectedToken(this.lookahead);
+ }
+ if (kind === 'init') {
+ kind = 'method';
+ }
+ if (!computed) {
+ if (isStatic && this.isPropertyKey(key, 'prototype')) {
+ this.throwUnexpectedToken(token, messages_1.Messages.StaticPrototype);
+ }
+ if (!isStatic && this.isPropertyKey(key, 'constructor')) {
+ if (kind !== 'method' || !method || (value && value.generator)) {
+ this.throwUnexpectedToken(token, messages_1.Messages.ConstructorSpecialMethod);
+ }
+ if (hasConstructor.value) {
+ this.throwUnexpectedToken(token, messages_1.Messages.DuplicateConstructor);
+ }
+ else {
+ hasConstructor.value = true;
+ }
+ kind = 'constructor';
+ }
+ }
+ return this.finalize(node, new Node.MethodDefinition(key, computed, value, kind, isStatic));
+ };
+ Parser.prototype.parseClassElementList = function () {
+ var body = [];
+ var hasConstructor = { value: false };
+ this.expect('{');
+ while (!this.match('}')) {
+ if (this.match(';')) {
+ this.nextToken();
+ }
+ else {
+ body.push(this.parseClassElement(hasConstructor));
+ }
+ }
+ this.expect('}');
+ return body;
+ };
+ Parser.prototype.parseClassBody = function () {
+ var node = this.createNode();
+ var elementList = this.parseClassElementList();
+ return this.finalize(node, new Node.ClassBody(elementList));
+ };
+ Parser.prototype.parseClassDeclaration = function (identifierIsOptional) {
+ var node = this.createNode();
+ var previousStrict = this.context.strict;
+ this.context.strict = true;
+ this.expectKeyword('class');
+ var id = (identifierIsOptional && (this.lookahead.type !== 3 /* Identifier */)) ? null : this.parseVariableIdentifier();
+ var superClass = null;
+ if (this.matchKeyword('extends')) {
+ this.nextToken();
+ superClass = this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall);
+ }
+ var classBody = this.parseClassBody();
+ this.context.strict = previousStrict;
+ return this.finalize(node, new Node.ClassDeclaration(id, superClass, classBody));
+ };
+ Parser.prototype.parseClassExpression = function () {
+ var node = this.createNode();
+ var previousStrict = this.context.strict;
+ this.context.strict = true;
+ this.expectKeyword('class');
+ var id = (this.lookahead.type === 3 /* Identifier */) ? this.parseVariableIdentifier() : null;
+ var superClass = null;
+ if (this.matchKeyword('extends')) {
+ this.nextToken();
+ superClass = this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall);
+ }
+ var classBody = this.parseClassBody();
+ this.context.strict = previousStrict;
+ return this.finalize(node, new Node.ClassExpression(id, superClass, classBody));
+ };
+ // https://tc39.github.io/ecma262/#sec-scripts
+ // https://tc39.github.io/ecma262/#sec-modules
+ Parser.prototype.parseModule = function () {
+ this.context.strict = true;
+ this.context.isModule = true;
+ var node = this.createNode();
+ var body = this.parseDirectivePrologues();
+ while (this.lookahead.type !== 2 /* EOF */) {
+ body.push(this.parseStatementListItem());
+ }
+ return this.finalize(node, new Node.Module(body));
+ };
+ Parser.prototype.parseScript = function () {
+ var node = this.createNode();
+ var body = this.parseDirectivePrologues();
+ while (this.lookahead.type !== 2 /* EOF */) {
+ body.push(this.parseStatementListItem());
+ }
+ return this.finalize(node, new Node.Script(body));
+ };
+ // https://tc39.github.io/ecma262/#sec-imports
+ Parser.prototype.parseModuleSpecifier = function () {
+ var node = this.createNode();
+ if (this.lookahead.type !== 8 /* StringLiteral */) {
+ this.throwError(messages_1.Messages.InvalidModuleSpecifier);
+ }
+ var token = this.nextToken();
+ var raw = this.getTokenRaw(token);
+ return this.finalize(node, new Node.Literal(token.value, raw));
+ };
+ // import {<foo as bar>} ...;
+ Parser.prototype.parseImportSpecifier = function () {
+ var node = this.createNode();
+ var imported;
+ var local;
+ if (this.lookahead.type === 3 /* Identifier */) {
+ imported = this.parseVariableIdentifier();
+ local = imported;
+ if (this.matchContextualKeyword('as')) {
+ this.nextToken();
+ local = this.parseVariableIdentifier();
+ }
+ }
+ else {
+ imported = this.parseIdentifierName();
+ local = imported;
+ if (this.matchContextualKeyword('as')) {
+ this.nextToken();
+ local = this.parseVariableIdentifier();
+ }
+ else {
+ this.throwUnexpectedToken(this.nextToken());
+ }
+ }
+ return this.finalize(node, new Node.ImportSpecifier(local, imported));
+ };
+ // {foo, bar as bas}
+ Parser.prototype.parseNamedImports = function () {
+ this.expect('{');
+ var specifiers = [];
+ while (!this.match('}')) {
+ specifiers.push(this.parseImportSpecifier());
+ if (!this.match('}')) {
+ this.expect(',');
+ }
+ }
+ this.expect('}');
+ return specifiers;
+ };
+ // import <foo> ...;
+ Parser.prototype.parseImportDefaultSpecifier = function () {
+ var node = this.createNode();
+ var local = this.parseIdentifierName();
+ return this.finalize(node, new Node.ImportDefaultSpecifier(local));
+ };
+ // import <* as foo> ...;
+ Parser.prototype.parseImportNamespaceSpecifier = function () {
+ var node = this.createNode();
+ this.expect('*');
+ if (!this.matchContextualKeyword('as')) {
+ this.throwError(messages_1.Messages.NoAsAfterImportNamespace);
+ }
+ this.nextToken();
+ var local = this.parseIdentifierName();
+ return this.finalize(node, new Node.ImportNamespaceSpecifier(local));
+ };
+ Parser.prototype.parseImportDeclaration = function () {
+ if (this.context.inFunctionBody) {
+ this.throwError(messages_1.Messages.IllegalImportDeclaration);
+ }
+ var node = this.createNode();
+ this.expectKeyword('import');
+ var src;
+ var specifiers = [];
+ if (this.lookahead.type === 8 /* StringLiteral */) {
+ // import 'foo';
+ src = this.parseModuleSpecifier();
+ }
+ else {
+ if (this.match('{')) {
+ // import {bar}
+ specifiers = specifiers.concat(this.parseNamedImports());
+ }
+ else if (this.match('*')) {
+ // import * as foo
+ specifiers.push(this.parseImportNamespaceSpecifier());
+ }
+ else if (this.isIdentifierName(this.lookahead) && !this.matchKeyword('default')) {
+ // import foo
+ specifiers.push(this.parseImportDefaultSpecifier());
+ if (this.match(',')) {
+ this.nextToken();
+ if (this.match('*')) {
+ // import foo, * as foo
+ specifiers.push(this.parseImportNamespaceSpecifier());
+ }
+ else if (this.match('{')) {
+ // import foo, {bar}
+ specifiers = specifiers.concat(this.parseNamedImports());
+ }
+ else {
+ this.throwUnexpectedToken(this.lookahead);
+ }
+ }
+ }
+ else {
+ this.throwUnexpectedToken(this.nextToken());
+ }
+ if (!this.matchContextualKeyword('from')) {
+ var message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause;
+ this.throwError(message, this.lookahead.value);
+ }
+ this.nextToken();
+ src = this.parseModuleSpecifier();
+ }
+ this.consumeSemicolon();
+ return this.finalize(node, new Node.ImportDeclaration(specifiers, src));
+ };
+ // https://tc39.github.io/ecma262/#sec-exports
+ Parser.prototype.parseExportSpecifier = function () {
+ var node = this.createNode();
+ var local = this.parseIdentifierName();
+ var exported = local;
+ if (this.matchContextualKeyword('as')) {
+ this.nextToken();
+ exported = this.parseIdentifierName();
+ }
+ return this.finalize(node, new Node.ExportSpecifier(local, exported));
+ };
+ Parser.prototype.parseExportDeclaration = function () {
+ if (this.context.inFunctionBody) {
+ this.throwError(messages_1.Messages.IllegalExportDeclaration);
+ }
+ var node = this.createNode();
+ this.expectKeyword('export');
+ var exportDeclaration;
+ if (this.matchKeyword('default')) {
+ // export default ...
+ this.nextToken();
+ if (this.matchKeyword('function')) {
+ // export default function foo () {}
+ // export default function () {}
+ var declaration = this.parseFunctionDeclaration(true);
+ exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration));
+ }
+ else if (this.matchKeyword('class')) {
+ // export default class foo {}
+ var declaration = this.parseClassDeclaration(true);
+ exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration));
+ }
+ else if (this.matchContextualKeyword('async')) {
+ // export default async function f () {}
+ // export default async function () {}
+ // export default async x => x
+ var declaration = this.matchAsyncFunction() ? this.parseFunctionDeclaration(true) : this.parseAssignmentExpression();
+ exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration));
+ }
+ else {
+ if (this.matchContextualKeyword('from')) {
+ this.throwError(messages_1.Messages.UnexpectedToken, this.lookahead.value);
+ }
+ // export default {};
+ // export default [];
+ // export default (1 + 2);
+ var declaration = this.match('{') ? this.parseObjectInitializer() :
+ this.match('[') ? this.parseArrayInitializer() : this.parseAssignmentExpression();
+ this.consumeSemicolon();
+ exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration));
+ }
+ }
+ else if (this.match('*')) {
+ // export * from 'foo';
+ this.nextToken();
+ if (!this.matchContextualKeyword('from')) {
+ var message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause;
+ this.throwError(message, this.lookahead.value);
+ }
+ this.nextToken();
+ var src = this.parseModuleSpecifier();
+ this.consumeSemicolon();
+ exportDeclaration = this.finalize(node, new Node.ExportAllDeclaration(src));
+ }
+ else if (this.lookahead.type === 4 /* Keyword */) {
+ // export var f = 1;
+ var declaration = void 0;
+ switch (this.lookahead.value) {
+ case 'let':
+ case 'const':
+ declaration = this.parseLexicalDeclaration({ inFor: false });
+ break;
+ case 'var':
+ case 'class':
+ case 'function':
+ declaration = this.parseStatementListItem();
+ break;
+ default:
+ this.throwUnexpectedToken(this.lookahead);
+ }
+ exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(declaration, [], null));
+ }
+ else if (this.matchAsyncFunction()) {
+ var declaration = this.parseFunctionDeclaration();
+ exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(declaration, [], null));
+ }
+ else {
+ var specifiers = [];
+ var source = null;
+ var isExportFromIdentifier = false;
+ this.expect('{');
+ while (!this.match('}')) {
+ isExportFromIdentifier = isExportFromIdentifier || this.matchKeyword('default');
+ specifiers.push(this.parseExportSpecifier());
+ if (!this.match('}')) {
+ this.expect(',');
+ }
+ }
+ this.expect('}');
+ if (this.matchContextualKeyword('from')) {
+ // export {default} from 'foo';
+ // export {foo} from 'foo';
+ this.nextToken();
+ source = this.parseModuleSpecifier();
+ this.consumeSemicolon();
+ }
+ else if (isExportFromIdentifier) {
+ // export {default}; // missing fromClause
+ var message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause;
+ this.throwError(message, this.lookahead.value);
+ }
+ else {
+ // export {foo};
+ this.consumeSemicolon();
+ }
+ exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(null, specifiers, source));
+ }
+ return exportDeclaration;
+ };
+ return Parser;
+ }());
+ exports.Parser = Parser;
+
+
+/***/ },
+/* 9 */
+/***/ function(module, exports) {
+
+ "use strict";
+ // Ensure the condition is true, otherwise throw an error.
+ // This is only to have a better contract semantic, i.e. another safety net
+ // to catch a logic error. The condition shall be fulfilled in normal case.
+ // Do NOT use this to enforce a certain condition on any user input.
+ Object.defineProperty(exports, "__esModule", { value: true });
+ function assert(condition, message) {
+ /* istanbul ignore if */
+ if (!condition) {
+ throw new Error('ASSERT: ' + message);
+ }
+ }
+ exports.assert = assert;
+
+
+/***/ },
+/* 10 */
+/***/ function(module, exports) {
+
+ "use strict";
+ /* tslint:disable:max-classes-per-file */
+ Object.defineProperty(exports, "__esModule", { value: true });
+ var ErrorHandler = (function () {
+ function ErrorHandler() {
+ this.errors = [];
+ this.tolerant = false;
+ }
+ ErrorHandler.prototype.recordError = function (error) {
+ this.errors.push(error);
+ };
+ ErrorHandler.prototype.tolerate = function (error) {
+ if (this.tolerant) {
+ this.recordError(error);
+ }
+ else {
+ throw error;
+ }
+ };
+ ErrorHandler.prototype.constructError = function (msg, column) {
+ var error = new Error(msg);
+ try {
+ throw error;
+ }
+ catch (base) {
+ /* istanbul ignore else */
+ if (Object.create && Object.defineProperty) {
+ error = Object.create(base);
+ Object.defineProperty(error, 'column', { value: column });
+ }
+ }
+ /* istanbul ignore next */
+ return error;
+ };
+ ErrorHandler.prototype.createError = function (index, line, col, description) {
+ var msg = 'Line ' + line + ': ' + description;
+ var error = this.constructError(msg, col);
+ error.index = index;
+ error.lineNumber = line;
+ error.description = description;
+ return error;
+ };
+ ErrorHandler.prototype.throwError = function (index, line, col, description) {
+ throw this.createError(index, line, col, description);
+ };
+ ErrorHandler.prototype.tolerateError = function (index, line, col, description) {
+ var error = this.createError(index, line, col, description);
+ if (this.tolerant) {
+ this.recordError(error);
+ }
+ else {
+ throw error;
+ }
+ };
+ return ErrorHandler;
+ }());
+ exports.ErrorHandler = ErrorHandler;
+
+
+/***/ },
+/* 11 */
+/***/ function(module, exports) {
+
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ // Error messages should be identical to V8.
+ exports.Messages = {
+ BadGetterArity: 'Getter must not have any formal parameters',
+ BadSetterArity: 'Setter must have exactly one formal parameter',
+ BadSetterRestParameter: 'Setter function argument must not be a rest parameter',
+ ConstructorIsAsync: 'Class constructor may not be an async method',
+ ConstructorSpecialMethod: 'Class constructor may not be an accessor',
+ DeclarationMissingInitializer: 'Missing initializer in %0 declaration',
+ DefaultRestParameter: 'Unexpected token =',
+ DuplicateBinding: 'Duplicate binding %0',
+ DuplicateConstructor: 'A class may only have one constructor',
+ DuplicateProtoProperty: 'Duplicate __proto__ fields are not allowed in object literals',
+ ForInOfLoopInitializer: '%0 loop variable declaration may not have an initializer',
+ GeneratorInLegacyContext: 'Generator declarations are not allowed in legacy contexts',
+ IllegalBreak: 'Illegal break statement',
+ IllegalContinue: 'Illegal continue statement',
+ IllegalExportDeclaration: 'Unexpected token',
+ IllegalImportDeclaration: 'Unexpected token',
+ IllegalLanguageModeDirective: 'Illegal \'use strict\' directive in function with non-simple parameter list',
+ IllegalReturn: 'Illegal return statement',
+ InvalidEscapedReservedWord: 'Keyword must not contain escaped characters',
+ InvalidHexEscapeSequence: 'Invalid hexadecimal escape sequence',
+ InvalidLHSInAssignment: 'Invalid left-hand side in assignment',
+ InvalidLHSInForIn: 'Invalid left-hand side in for-in',
+ InvalidLHSInForLoop: 'Invalid left-hand side in for-loop',
+ InvalidModuleSpecifier: 'Unexpected token',
+ InvalidRegExp: 'Invalid regular expression',
+ LetInLexicalBinding: 'let is disallowed as a lexically bound name',
+ MissingFromClause: 'Unexpected token',
+ MultipleDefaultsInSwitch: 'More than one default clause in switch statement',
+ NewlineAfterThrow: 'Illegal newline after throw',
+ NoAsAfterImportNamespace: 'Unexpected token',
+ NoCatchOrFinally: 'Missing catch or finally after try',
+ ParameterAfterRestParameter: 'Rest parameter must be last formal parameter',
+ Redeclaration: '%0 \'%1\' has already been declared',
+ StaticPrototype: 'Classes may not have static property named prototype',
+ StrictCatchVariable: 'Catch variable may not be eval or arguments in strict mode',
+ StrictDelete: 'Delete of an unqualified identifier in strict mode.',
+ StrictFunction: 'In strict mode code, functions can only be declared at top level or inside a block',
+ StrictFunctionName: 'Function name may not be eval or arguments in strict mode',
+ StrictLHSAssignment: 'Assignment to eval or arguments is not allowed in strict mode',
+ StrictLHSPostfix: 'Postfix increment/decrement may not have eval or arguments operand in strict mode',
+ StrictLHSPrefix: 'Prefix increment/decrement may not have eval or arguments operand in strict mode',
+ StrictModeWith: 'Strict mode code may not include a with statement',
+ StrictOctalLiteral: 'Octal literals are not allowed in strict mode.',
+ StrictParamDupe: 'Strict mode function may not have duplicate parameter names',
+ StrictParamName: 'Parameter name eval or arguments is not allowed in strict mode',
+ StrictReservedWord: 'Use of future reserved word in strict mode',
+ StrictVarName: 'Variable name may not be eval or arguments in strict mode',
+ TemplateOctalLiteral: 'Octal literals are not allowed in template strings.',
+ UnexpectedEOS: 'Unexpected end of input',
+ UnexpectedIdentifier: 'Unexpected identifier',
+ UnexpectedNumber: 'Unexpected number',
+ UnexpectedReserved: 'Unexpected reserved word',
+ UnexpectedString: 'Unexpected string',
+ UnexpectedTemplate: 'Unexpected quasi %0',
+ UnexpectedToken: 'Unexpected token %0',
+ UnexpectedTokenIllegal: 'Unexpected token ILLEGAL',
+ UnknownLabel: 'Undefined label \'%0\'',
+ UnterminatedRegExp: 'Invalid regular expression: missing /'
+ };
+
+
+/***/ },
+/* 12 */
+/***/ function(module, exports, __webpack_require__) {
+
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ var assert_1 = __webpack_require__(9);
+ var character_1 = __webpack_require__(4);
+ var messages_1 = __webpack_require__(11);
+ function hexValue(ch) {
+ return '0123456789abcdef'.indexOf(ch.toLowerCase());
+ }
+ function octalValue(ch) {
+ return '01234567'.indexOf(ch);
+ }
+ var Scanner = (function () {
+ function Scanner(code, handler) {
+ this.source = code;
+ this.errorHandler = handler;
+ this.trackComment = false;
+ this.length = code.length;
+ this.index = 0;
+ this.lineNumber = (code.length > 0) ? 1 : 0;
+ this.lineStart = 0;
+ this.curlyStack = [];
+ }
+ Scanner.prototype.saveState = function () {
+ return {
+ index: this.index,
+ lineNumber: this.lineNumber,
+ lineStart: this.lineStart
+ };
+ };
+ Scanner.prototype.restoreState = function (state) {
+ this.index = state.index;
+ this.lineNumber = state.lineNumber;
+ this.lineStart = state.lineStart;
+ };
+ Scanner.prototype.eof = function () {
+ return this.index >= this.length;
+ };
+ Scanner.prototype.throwUnexpectedToken = function (message) {
+ if (message === void 0) { message = messages_1.Messages.UnexpectedTokenIllegal; }
+ return this.errorHandler.throwError(this.index, this.lineNumber, this.index - this.lineStart + 1, message);
+ };
+ Scanner.prototype.tolerateUnexpectedToken = function (message) {
+ if (message === void 0) { message = messages_1.Messages.UnexpectedTokenIllegal; }
+ this.errorHandler.tolerateError(this.index, this.lineNumber, this.index - this.lineStart + 1, message);
+ };
+ // https://tc39.github.io/ecma262/#sec-comments
+ Scanner.prototype.skipSingleLineComment = function (offset) {
+ var comments = [];
+ var start, loc;
+ if (this.trackComment) {
+ comments = [];
+ start = this.index - offset;
+ loc = {
+ start: {
+ line: this.lineNumber,
+ column: this.index - this.lineStart - offset
+ },
+ end: {}
+ };
+ }
+ while (!this.eof()) {
+ var ch = this.source.charCodeAt(this.index);
+ ++this.index;
+ if (character_1.Character.isLineTerminator(ch)) {
+ if (this.trackComment) {
+ loc.end = {
+ line: this.lineNumber,
+ column: this.index - this.lineStart - 1
+ };
+ var entry = {
+ multiLine: false,
+ slice: [start + offset, this.index - 1],
+ range: [start, this.index - 1],
+ loc: loc
+ };
+ comments.push(entry);
+ }
+ if (ch === 13 && this.source.charCodeAt(this.index) === 10) {
+ ++this.index;
+ }
+ ++this.lineNumber;
+ this.lineStart = this.index;
+ return comments;
+ }
+ }
+ if (this.trackComment) {
+ loc.end = {
+ line: this.lineNumber,
+ column: this.index - this.lineStart
+ };
+ var entry = {
+ multiLine: false,
+ slice: [start + offset, this.index],
+ range: [start, this.index],
+ loc: loc
+ };
+ comments.push(entry);
+ }
+ return comments;
+ };
+ Scanner.prototype.skipMultiLineComment = function () {
+ var comments = [];
+ var start, loc;
+ if (this.trackComment) {
+ comments = [];
+ start = this.index - 2;
+ loc = {
+ start: {
+ line: this.lineNumber,
+ column: this.index - this.lineStart - 2
+ },
+ end: {}
+ };
+ }
+ while (!this.eof()) {
+ var ch = this.source.charCodeAt(this.index);
+ if (character_1.Character.isLineTerminator(ch)) {
+ if (ch === 0x0D && this.source.charCodeAt(this.index + 1) === 0x0A) {
+ ++this.index;
+ }
+ ++this.lineNumber;
+ ++this.index;
+ this.lineStart = this.index;
+ }
+ else if (ch === 0x2A) {
+ // Block comment ends with '*/'.
+ if (this.source.charCodeAt(this.index + 1) === 0x2F) {
+ this.index += 2;
+ if (this.trackComment) {
+ loc.end = {
+ line: this.lineNumber,
+ column: this.index - this.lineStart
+ };
+ var entry = {
+ multiLine: true,
+ slice: [start + 2, this.index - 2],
+ range: [start, this.index],
+ loc: loc
+ };
+ comments.push(entry);
+ }
+ return comments;
+ }
+ ++this.index;
+ }
+ else {
+ ++this.index;
+ }
+ }
+ // Ran off the end of the file - the whole thing is a comment
+ if (this.trackComment) {
+ loc.end = {
+ line: this.lineNumber,
+ column: this.index - this.lineStart
+ };
+ var entry = {
+ multiLine: true,
+ slice: [start + 2, this.index],
+ range: [start, this.index],
+ loc: loc
+ };
+ comments.push(entry);
+ }
+ this.tolerateUnexpectedToken();
+ return comments;
+ };
+ Scanner.prototype.scanComments = function () {
+ var comments;
+ if (this.trackComment) {
+ comments = [];
+ }
+ var start = (this.index === 0);
+ while (!this.eof()) {
+ var ch = this.source.charCodeAt(this.index);
+ if (character_1.Character.isWhiteSpace(ch)) {
+ ++this.index;
+ }
+ else if (character_1.Character.isLineTerminator(ch)) {
+ ++this.index;
+ if (ch === 0x0D && this.source.charCodeAt(this.index) === 0x0A) {
+ ++this.index;
+ }
+ ++this.lineNumber;
+ this.lineStart = this.index;
+ start = true;
+ }
+ else if (ch === 0x2F) {
+ ch = this.source.charCodeAt(this.index + 1);
+ if (ch === 0x2F) {
+ this.index += 2;
+ var comment = this.skipSingleLineComment(2);
+ if (this.trackComment) {
+ comments = comments.concat(comment);
+ }
+ start = true;
+ }
+ else if (ch === 0x2A) {
+ this.index += 2;
+ var comment = this.skipMultiLineComment();
+ if (this.trackComment) {
+ comments = comments.concat(comment);
+ }
+ }
+ else {
+ break;
+ }
+ }
+ else if (start && ch === 0x2D) {
+ // U+003E is '>'
+ if ((this.source.charCodeAt(this.index + 1) === 0x2D) && (this.source.charCodeAt(this.index + 2) === 0x3E)) {
+ // '-->' is a single-line comment
+ this.index += 3;
+ var comment = this.skipSingleLineComment(3);
+ if (this.trackComment) {
+ comments = comments.concat(comment);
+ }
+ }
+ else {
+ break;
+ }
+ }
+ else if (ch === 0x3C) {
+ if (this.source.slice(this.index + 1, this.index + 4) === '!--') {
+ this.index += 4; // `<!--`
+ var comment = this.skipSingleLineComment(4);
+ if (this.trackComment) {
+ comments = comments.concat(comment);
+ }
+ }
+ else {
+ break;
+ }
+ }
+ else {
+ break;
+ }
+ }
+ return comments;
+ };
+ // https://tc39.github.io/ecma262/#sec-future-reserved-words
+ Scanner.prototype.isFutureReservedWord = function (id) {
+ switch (id) {
+ case 'enum':
+ case 'export':
+ case 'import':
+ case 'super':
+ return true;
+ default:
+ return false;
+ }
+ };
+ Scanner.prototype.isStrictModeReservedWord = function (id) {
+ switch (id) {
+ case 'implements':
+ case 'interface':
+ case 'package':
+ case 'private':
+ case 'protected':
+ case 'public':
+ case 'static':
+ case 'yield':
+ case 'let':
+ return true;
+ default:
+ return false;
+ }
+ };
+ Scanner.prototype.isRestrictedWord = function (id) {
+ return id === 'eval' || id === 'arguments';
+ };
+ // https://tc39.github.io/ecma262/#sec-keywords
+ Scanner.prototype.isKeyword = function (id) {
+ switch (id.length) {
+ case 2:
+ return (id === 'if') || (id === 'in') || (id === 'do');
+ case 3:
+ return (id === 'var') || (id === 'for') || (id === 'new') ||
+ (id === 'try') || (id === 'let');
+ case 4:
+ return (id === 'this') || (id === 'else') || (id === 'case') ||
+ (id === 'void') || (id === 'with') || (id === 'enum');
+ case 5:
+ return (id === 'while') || (id === 'break') || (id === 'catch') ||
+ (id === 'throw') || (id === 'const') || (id === 'yield') ||
+ (id === 'class') || (id === 'super');
+ case 6:
+ return (id === 'return') || (id === 'typeof') || (id === 'delete') ||
+ (id === 'switch') || (id === 'export') || (id === 'import');
+ case 7:
+ return (id === 'default') || (id === 'finally') || (id === 'extends');
+ case 8:
+ return (id === 'function') || (id === 'continue') || (id === 'debugger');
+ case 10:
+ return (id === 'instanceof');
+ default:
+ return false;
+ }
+ };
+ Scanner.prototype.codePointAt = function (i) {
+ var cp = this.source.charCodeAt(i);
+ if (cp >= 0xD800 && cp <= 0xDBFF) {
+ var second = this.source.charCodeAt(i + 1);
+ if (second >= 0xDC00 && second <= 0xDFFF) {
+ var first = cp;
+ cp = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
+ }
+ }
+ return cp;
+ };
+ Scanner.prototype.scanHexEscape = function (prefix) {
+ var len = (prefix === 'u') ? 4 : 2;
+ var code = 0;
+ for (var i = 0; i < len; ++i) {
+ if (!this.eof() && character_1.Character.isHexDigit(this.source.charCodeAt(this.index))) {
+ code = code * 16 + hexValue(this.source[this.index++]);
+ }
+ else {
+ return null;
+ }
+ }
+ return String.fromCharCode(code);
+ };
+ Scanner.prototype.scanUnicodeCodePointEscape = function () {
+ var ch = this.source[this.index];
+ var code = 0;
+ // At least, one hex digit is required.
+ if (ch === '}') {
+ this.throwUnexpectedToken();
+ }
+ while (!this.eof()) {
+ ch = this.source[this.index++];
+ if (!character_1.Character.isHexDigit(ch.charCodeAt(0))) {
+ break;
+ }
+ code = code * 16 + hexValue(ch);
+ }
+ if (code > 0x10FFFF || ch !== '}') {
+ this.throwUnexpectedToken();
+ }
+ return character_1.Character.fromCodePoint(code);
+ };
+ Scanner.prototype.getIdentifier = function () {
+ var start = this.index++;
+ while (!this.eof()) {
+ var ch = this.source.charCodeAt(this.index);
+ if (ch === 0x5C) {
+ // Blackslash (U+005C) marks Unicode escape sequence.
+ this.index = start;
+ return this.getComplexIdentifier();
+ }
+ else if (ch >= 0xD800 && ch < 0xDFFF) {
+ // Need to handle surrogate pairs.
+ this.index = start;
+ return this.getComplexIdentifier();
+ }
+ if (character_1.Character.isIdentifierPart(ch)) {
+ ++this.index;
+ }
+ else {
+ break;
+ }
+ }
+ return this.source.slice(start, this.index);
+ };
+ Scanner.prototype.getComplexIdentifier = function () {
+ var cp = this.codePointAt(this.index);
+ var id = character_1.Character.fromCodePoint(cp);
+ this.index += id.length;
+ // '\u' (U+005C, U+0075) denotes an escaped character.
+ var ch;
+ if (cp === 0x5C) {
+ if (this.source.charCodeAt(this.index) !== 0x75) {
+ this.throwUnexpectedToken();
+ }
+ ++this.index;
+ if (this.source[this.index] === '{') {
+ ++this.index;
+ ch = this.scanUnicodeCodePointEscape();
+ }
+ else {
+ ch = this.scanHexEscape('u');
+ if (ch === null || ch === '\\' || !character_1.Character.isIdentifierStart(ch.charCodeAt(0))) {
+ this.throwUnexpectedToken();
+ }
+ }
+ id = ch;
+ }
+ while (!this.eof()) {
+ cp = this.codePointAt(this.index);
+ if (!character_1.Character.isIdentifierPart(cp)) {
+ break;
+ }
+ ch = character_1.Character.fromCodePoint(cp);
+ id += ch;
+ this.index += ch.length;
+ // '\u' (U+005C, U+0075) denotes an escaped character.
+ if (cp === 0x5C) {
+ id = id.substr(0, id.length - 1);
+ if (this.source.charCodeAt(this.index) !== 0x75) {
+ this.throwUnexpectedToken();
+ }
+ ++this.index;
+ if (this.source[this.index] === '{') {
+ ++this.index;
+ ch = this.scanUnicodeCodePointEscape();
+ }
+ else {
+ ch = this.scanHexEscape('u');
+ if (ch === null || ch === '\\' || !character_1.Character.isIdentifierPart(ch.charCodeAt(0))) {
+ this.throwUnexpectedToken();
+ }
+ }
+ id += ch;
+ }
+ }
+ return id;
+ };
+ Scanner.prototype.octalToDecimal = function (ch) {
+ // \0 is not octal escape sequence
+ var octal = (ch !== '0');
+ var code = octalValue(ch);
+ if (!this.eof() && character_1.Character.isOctalDigit(this.source.charCodeAt(this.index))) {
+ octal = true;
+ code = code * 8 + octalValue(this.source[this.index++]);
+ // 3 digits are only allowed when string starts
+ // with 0, 1, 2, 3
+ if ('0123'.indexOf(ch) >= 0 && !this.eof() && character_1.Character.isOctalDigit(this.source.charCodeAt(this.index))) {
+ code = code * 8 + octalValue(this.source[this.index++]);
+ }
+ }
+ return {
+ code: code,
+ octal: octal
+ };
+ };
+ // https://tc39.github.io/ecma262/#sec-names-and-keywords
+ Scanner.prototype.scanIdentifier = function () {
+ var type;
+ var start = this.index;
+ // Backslash (U+005C) starts an escaped character.
+ var id = (this.source.charCodeAt(start) === 0x5C) ? this.getComplexIdentifier() : this.getIdentifier();
+ // There is no keyword or literal with only one character.
+ // Thus, it must be an identifier.
+ if (id.length === 1) {
+ type = 3 /* Identifier */;
+ }
+ else if (this.isKeyword(id)) {
+ type = 4 /* Keyword */;
+ }
+ else if (id === 'null') {
+ type = 5 /* NullLiteral */;
+ }
+ else if (id === 'true' || id === 'false') {
+ type = 1 /* BooleanLiteral */;
+ }
+ else {
+ type = 3 /* Identifier */;
+ }
+ if (type !== 3 /* Identifier */ && (start + id.length !== this.index)) {
+ var restore = this.index;
+ this.index = start;
+ this.tolerateUnexpectedToken(messages_1.Messages.InvalidEscapedReservedWord);
+ this.index = restore;
+ }
+ return {
+ type: type,
+ value: id,
+ lineNumber: this.lineNumber,
+ lineStart: this.lineStart,
+ start: start,
+ end: this.index
+ };
+ };
+ // https://tc39.github.io/ecma262/#sec-punctuators
+ Scanner.prototype.scanPunctuator = function () {
+ var start = this.index;
+ // Check for most common single-character punctuators.
+ var str = this.source[this.index];
+ switch (str) {
+ case '(':
+ case '{':
+ if (str === '{') {
+ this.curlyStack.push('{');
+ }
+ ++this.index;
+ break;
+ case '.':
+ ++this.index;
+ if (this.source[this.index] === '.' && this.source[this.index + 1] === '.') {
+ // Spread operator: ...
+ this.index += 2;
+ str = '...';
+ }
+ break;
+ case '}':
+ ++this.index;
+ this.curlyStack.pop();
+ break;
+ case ')':
+ case ';':
+ case ',':
+ case '[':
+ case ']':
+ case ':':
+ case '?':
+ case '~':
+ ++this.index;
+ break;
+ default:
+ // 4-character punctuator.
+ str = this.source.substr(this.index, 4);
+ if (str === '>>>=') {
+ this.index += 4;
+ }
+ else {
+ // 3-character punctuators.
+ str = str.substr(0, 3);
+ if (str === '===' || str === '!==' || str === '>>>' ||
+ str === '<<=' || str === '>>=' || str === '**=') {
+ this.index += 3;
+ }
+ else {
+ // 2-character punctuators.
+ str = str.substr(0, 2);
+ if (str === '&&' || str === '||' || str === '==' || str === '!=' ||
+ str === '+=' || str === '-=' || str === '*=' || str === '/=' ||
+ str === '++' || str === '--' || str === '<<' || str === '>>' ||
+ str === '&=' || str === '|=' || str === '^=' || str === '%=' ||
+ str === '<=' || str === '>=' || str === '=>' || str === '**') {
+ this.index += 2;
+ }
+ else {
+ // 1-character punctuators.
+ str = this.source[this.index];
+ if ('<>=!+-*%&|^/'.indexOf(str) >= 0) {
+ ++this.index;
+ }
+ }
+ }
+ }
+ }
+ if (this.index === start) {
+ this.throwUnexpectedToken();
+ }
+ return {
+ type: 7 /* Punctuator */,
+ value: str,
+ lineNumber: this.lineNumber,
+ lineStart: this.lineStart,
+ start: start,
+ end: this.index
+ };
+ };
+ // https://tc39.github.io/ecma262/#sec-literals-numeric-literals
+ Scanner.prototype.scanHexLiteral = function (start) {
+ var num = '';
+ while (!this.eof()) {
+ if (!character_1.Character.isHexDigit(this.source.charCodeAt(this.index))) {
+ break;
+ }
+ num += this.source[this.index++];
+ }
+ if (num.length === 0) {
+ this.throwUnexpectedToken();
+ }
+ if (character_1.Character.isIdentifierStart(this.source.charCodeAt(this.index))) {
+ this.throwUnexpectedToken();
+ }
+ return {
+ type: 6 /* NumericLiteral */,
+ value: parseInt('0x' + num, 16),
+ lineNumber: this.lineNumber,
+ lineStart: this.lineStart,
+ start: start,
+ end: this.index
+ };
+ };
+ Scanner.prototype.scanBinaryLiteral = function (start) {
+ var num = '';
+ var ch;
+ while (!this.eof()) {
+ ch = this.source[this.index];
+ if (ch !== '0' && ch !== '1') {
+ break;
+ }
+ num += this.source[this.index++];
+ }
+ if (num.length === 0) {
+ // only 0b or 0B
+ this.throwUnexpectedToken();
+ }
+ if (!this.eof()) {
+ ch = this.source.charCodeAt(this.index);
+ /* istanbul ignore else */
+ if (character_1.Character.isIdentifierStart(ch) || character_1.Character.isDecimalDigit(ch)) {
+ this.throwUnexpectedToken();
+ }
+ }
+ return {
+ type: 6 /* NumericLiteral */,
+ value: parseInt(num, 2),
+ lineNumber: this.lineNumber,
+ lineStart: this.lineStart,
+ start: start,
+ end: this.index
+ };
+ };
+ Scanner.prototype.scanOctalLiteral = function (prefix, start) {
+ var num = '';
+ var octal = false;
+ if (character_1.Character.isOctalDigit(prefix.charCodeAt(0))) {
+ octal = true;
+ num = '0' + this.source[this.index++];
+ }
+ else {
+ ++this.index;
+ }
+ while (!this.eof()) {
+ if (!character_1.Character.isOctalDigit(this.source.charCodeAt(this.index))) {
+ break;
+ }
+ num += this.source[this.index++];
+ }
+ if (!octal && num.length === 0) {
+ // only 0o or 0O
+ this.throwUnexpectedToken();
+ }
+ if (character_1.Character.isIdentifierStart(this.source.charCodeAt(this.index)) || character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) {
+ this.throwUnexpectedToken();
+ }
+ return {
+ type: 6 /* NumericLiteral */,
+ value: parseInt(num, 8),
+ octal: octal,
+ lineNumber: this.lineNumber,
+ lineStart: this.lineStart,
+ start: start,
+ end: this.index
+ };
+ };
+ Scanner.prototype.isImplicitOctalLiteral = function () {
+ // Implicit octal, unless there is a non-octal digit.
+ // (Annex B.1.1 on Numeric Literals)
+ for (var i = this.index + 1; i < this.length; ++i) {
+ var ch = this.source[i];
+ if (ch === '8' || ch === '9') {
+ return false;
+ }
+ if (!character_1.Character.isOctalDigit(ch.charCodeAt(0))) {
+ return true;
+ }
+ }
+ return true;
+ };
+ Scanner.prototype.scanNumericLiteral = function () {
+ var start = this.index;
+ var ch = this.source[start];
+ assert_1.assert(character_1.Character.isDecimalDigit(ch.charCodeAt(0)) || (ch === '.'), 'Numeric literal must start with a decimal digit or a decimal point');
+ var num = '';
+ if (ch !== '.') {
+ num = this.source[this.index++];
+ ch = this.source[this.index];
+ // Hex number starts with '0x'.
+ // Octal number starts with '0'.
+ // Octal number in ES6 starts with '0o'.
+ // Binary number in ES6 starts with '0b'.
+ if (num === '0') {
+ if (ch === 'x' || ch === 'X') {
+ ++this.index;
+ return this.scanHexLiteral(start);
+ }
+ if (ch === 'b' || ch === 'B') {
+ ++this.index;
+ return this.scanBinaryLiteral(start);
+ }
+ if (ch === 'o' || ch === 'O') {
+ return this.scanOctalLiteral(ch, start);
+ }
+ if (ch && character_1.Character.isOctalDigit(ch.charCodeAt(0))) {
+ if (this.isImplicitOctalLiteral()) {
+ return this.scanOctalLiteral(ch, start);
+ }
+ }
+ }
+ while (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) {
+ num += this.source[this.index++];
+ }
+ ch = this.source[this.index];
+ }
+ if (ch === '.') {
+ num += this.source[this.index++];
+ while (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) {
+ num += this.source[this.index++];
+ }
+ ch = this.source[this.index];
+ }
+ if (ch === 'e' || ch === 'E') {
+ num += this.source[this.index++];
+ ch = this.source[this.index];
+ if (ch === '+' || ch === '-') {
+ num += this.source[this.index++];
+ }
+ if (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) {
+ while (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) {
+ num += this.source[this.index++];
+ }
+ }
+ else {
+ this.throwUnexpectedToken();
+ }
+ }
+ if (character_1.Character.isIdentifierStart(this.source.charCodeAt(this.index))) {
+ this.throwUnexpectedToken();
+ }
+ return {
+ type: 6 /* NumericLiteral */,
+ value: parseFloat(num),
+ lineNumber: this.lineNumber,
+ lineStart: this.lineStart,
+ start: start,
+ end: this.index
+ };
+ };
+ // https://tc39.github.io/ecma262/#sec-literals-string-literals
+ Scanner.prototype.scanStringLiteral = function () {
+ var start = this.index;
+ var quote = this.source[start];
+ assert_1.assert((quote === '\'' || quote === '"'), 'String literal must starts with a quote');
+ ++this.index;
+ var octal = false;
+ var str = '';
+ while (!this.eof()) {
+ var ch = this.source[this.index++];
+ if (ch === quote) {
+ quote = '';
+ break;
+ }
+ else if (ch === '\\') {
+ ch = this.source[this.index++];
+ if (!ch || !character_1.Character.isLineTerminator(ch.charCodeAt(0))) {
+ switch (ch) {
+ case 'u':
+ if (this.source[this.index] === '{') {
+ ++this.index;
+ str += this.scanUnicodeCodePointEscape();
+ }
+ else {
+ var unescaped_1 = this.scanHexEscape(ch);
+ if (unescaped_1 === null) {
+ this.throwUnexpectedToken();
+ }
+ str += unescaped_1;
+ }
+ break;
+ case 'x':
+ var unescaped = this.scanHexEscape(ch);
+ if (unescaped === null) {
+ this.throwUnexpectedToken(messages_1.Messages.InvalidHexEscapeSequence);
+ }
+ str += unescaped;
+ break;
+ case 'n':
+ str += '\n';
+ break;
+ case 'r':
+ str += '\r';
+ break;
+ case 't':
+ str += '\t';
+ break;
+ case 'b':
+ str += '\b';
+ break;
+ case 'f':
+ str += '\f';
+ break;
+ case 'v':
+ str += '\x0B';
+ break;
+ case '8':
+ case '9':
+ str += ch;
+ this.tolerateUnexpectedToken();
+ break;
+ default:
+ if (ch && character_1.Character.isOctalDigit(ch.charCodeAt(0))) {
+ var octToDec = this.octalToDecimal(ch);
+ octal = octToDec.octal || octal;
+ str += String.fromCharCode(octToDec.code);
+ }
+ else {
+ str += ch;
+ }
+ break;
+ }
+ }
+ else {
+ ++this.lineNumber;
+ if (ch === '\r' && this.source[this.index] === '\n') {
+ ++this.index;
+ }
+ this.lineStart = this.index;
+ }
+ }
+ else if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) {
+ break;
+ }
+ else {
+ str += ch;
+ }
+ }
+ if (quote !== '') {
+ this.index = start;
+ this.throwUnexpectedToken();
+ }
+ return {
+ type: 8 /* StringLiteral */,
+ value: str,
+ octal: octal,
+ lineNumber: this.lineNumber,
+ lineStart: this.lineStart,
+ start: start,
+ end: this.index
+ };
+ };
+ // https://tc39.github.io/ecma262/#sec-template-literal-lexical-components
+ Scanner.prototype.scanTemplate = function () {
+ var cooked = '';
+ var terminated = false;
+ var start = this.index;
+ var head = (this.source[start] === '`');
+ var tail = false;
+ var rawOffset = 2;
+ ++this.index;
+ while (!this.eof()) {
+ var ch = this.source[this.index++];
+ if (ch === '`') {
+ rawOffset = 1;
+ tail = true;
+ terminated = true;
+ break;
+ }
+ else if (ch === '$') {
+ if (this.source[this.index] === '{') {
+ this.curlyStack.push('${');
+ ++this.index;
+ terminated = true;
+ break;
+ }
+ cooked += ch;
+ }
+ else if (ch === '\\') {
+ ch = this.source[this.index++];
+ if (!character_1.Character.isLineTerminator(ch.charCodeAt(0))) {
+ switch (ch) {
+ case 'n':
+ cooked += '\n';
+ break;
+ case 'r':
+ cooked += '\r';
+ break;
+ case 't':
+ cooked += '\t';
+ break;
+ case 'u':
+ if (this.source[this.index] === '{') {
+ ++this.index;
+ cooked += this.scanUnicodeCodePointEscape();
+ }
+ else {
+ var restore = this.index;
+ var unescaped_2 = this.scanHexEscape(ch);
+ if (unescaped_2 !== null) {
+ cooked += unescaped_2;
+ }
+ else {
+ this.index = restore;
+ cooked += ch;
+ }
+ }
+ break;
+ case 'x':
+ var unescaped = this.scanHexEscape(ch);
+ if (unescaped === null) {
+ this.throwUnexpectedToken(messages_1.Messages.InvalidHexEscapeSequence);
+ }
+ cooked += unescaped;
+ break;
+ case 'b':
+ cooked += '\b';
+ break;
+ case 'f':
+ cooked += '\f';
+ break;
+ case 'v':
+ cooked += '\v';
+ break;
+ default:
+ if (ch === '0') {
+ if (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) {
+ // Illegal: \01 \02 and so on
+ this.throwUnexpectedToken(messages_1.Messages.TemplateOctalLiteral);
+ }
+ cooked += '\0';
+ }
+ else if (character_1.Character.isOctalDigit(ch.charCodeAt(0))) {
+ // Illegal: \1 \2
+ this.throwUnexpectedToken(messages_1.Messages.TemplateOctalLiteral);
+ }
+ else {
+ cooked += ch;
+ }
+ break;
+ }
+ }
+ else {
+ ++this.lineNumber;
+ if (ch === '\r' && this.source[this.index] === '\n') {
+ ++this.index;
+ }
+ this.lineStart = this.index;
+ }
+ }
+ else if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) {
+ ++this.lineNumber;
+ if (ch === '\r' && this.source[this.index] === '\n') {
+ ++this.index;
+ }
+ this.lineStart = this.index;
+ cooked += '\n';
+ }
+ else {
+ cooked += ch;
+ }
+ }
+ if (!terminated) {
+ this.throwUnexpectedToken();
+ }
+ if (!head) {
+ this.curlyStack.pop();
+ }
+ return {
+ type: 10 /* Template */,
+ value: this.source.slice(start + 1, this.index - rawOffset),
+ cooked: cooked,
+ head: head,
+ tail: tail,
+ lineNumber: this.lineNumber,
+ lineStart: this.lineStart,
+ start: start,
+ end: this.index
+ };
+ };
+ // https://tc39.github.io/ecma262/#sec-literals-regular-expression-literals
+ Scanner.prototype.testRegExp = function (pattern, flags) {
+ // The BMP character to use as a replacement for astral symbols when
+ // translating an ES6 "u"-flagged pattern to an ES5-compatible
+ // approximation.
+ // Note: replacing with '\uFFFF' enables false positives in unlikely
+ // scenarios. For example, `[\u{1044f}-\u{10440}]` is an invalid
+ // pattern that would not be detected by this substitution.
+ var astralSubstitute = '\uFFFF';
+ var tmp = pattern;
+ var self = this;
+ if (flags.indexOf('u') >= 0) {
+ tmp = tmp
+ .replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g, function ($0, $1, $2) {
+ var codePoint = parseInt($1 || $2, 16);
+ if (codePoint > 0x10FFFF) {
+ self.throwUnexpectedToken(messages_1.Messages.InvalidRegExp);
+ }
+ if (codePoint <= 0xFFFF) {
+ return String.fromCharCode(codePoint);
+ }
+ return astralSubstitute;
+ })
+ .replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, astralSubstitute);
+ }
+ // First, detect invalid regular expressions.
+ try {
+ RegExp(tmp);
+ }
+ catch (e) {
+ this.throwUnexpectedToken(messages_1.Messages.InvalidRegExp);
+ }
+ // Return a regular expression object for this pattern-flag pair, or
+ // `null` in case the current environment doesn't support the flags it
+ // uses.
+ try {
+ return new RegExp(pattern, flags);
+ }
+ catch (exception) {
+ /* istanbul ignore next */
+ return null;
+ }
+ };
+ Scanner.prototype.scanRegExpBody = function () {
+ var ch = this.source[this.index];
+ assert_1.assert(ch === '/', 'Regular expression literal must start with a slash');
+ var str = this.source[this.index++];
+ var classMarker = false;
+ var terminated = false;
+ while (!this.eof()) {
+ ch = this.source[this.index++];
+ str += ch;
+ if (ch === '\\') {
+ ch = this.source[this.index++];
+ // https://tc39.github.io/ecma262/#sec-literals-regular-expression-literals
+ if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) {
+ this.throwUnexpectedToken(messages_1.Messages.UnterminatedRegExp);
+ }
+ str += ch;
+ }
+ else if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) {
+ this.throwUnexpectedToken(messages_1.Messages.UnterminatedRegExp);
+ }
+ else if (classMarker) {
+ if (ch === ']') {
+ classMarker = false;
+ }
+ }
+ else {
+ if (ch === '/') {
+ terminated = true;
+ break;
+ }
+ else if (ch === '[') {
+ classMarker = true;
+ }
+ }
+ }
+ if (!terminated) {
+ this.throwUnexpectedToken(messages_1.Messages.UnterminatedRegExp);
+ }
+ // Exclude leading and trailing slash.
+ return str.substr(1, str.length - 2);
+ };
+ Scanner.prototype.scanRegExpFlags = function () {
+ var str = '';
+ var flags = '';
+ while (!this.eof()) {
+ var ch = this.source[this.index];
+ if (!character_1.Character.isIdentifierPart(ch.charCodeAt(0))) {
+ break;
+ }
+ ++this.index;
+ if (ch === '\\' && !this.eof()) {
+ ch = this.source[this.index];
+ if (ch === 'u') {
+ ++this.index;
+ var restore = this.index;
+ var char = this.scanHexEscape('u');
+ if (char !== null) {
+ flags += char;
+ for (str += '\\u'; restore < this.index; ++restore) {
+ str += this.source[restore];
+ }
+ }
+ else {
+ this.index = restore;
+ flags += 'u';
+ str += '\\u';
+ }
+ this.tolerateUnexpectedToken();
+ }
+ else {
+ str += '\\';
+ this.tolerateUnexpectedToken();
+ }
+ }
+ else {
+ flags += ch;
+ str += ch;
+ }
+ }
+ return flags;
+ };
+ Scanner.prototype.scanRegExp = function () {
+ var start = this.index;
+ var pattern = this.scanRegExpBody();
+ var flags = this.scanRegExpFlags();
+ var value = this.testRegExp(pattern, flags);
+ return {
+ type: 9 /* RegularExpression */,
+ value: '',
+ pattern: pattern,
+ flags: flags,
+ regex: value,
+ lineNumber: this.lineNumber,
+ lineStart: this.lineStart,
+ start: start,
+ end: this.index
+ };
+ };
+ Scanner.prototype.lex = function () {
+ if (this.eof()) {
+ return {
+ type: 2 /* EOF */,
+ value: '',
+ lineNumber: this.lineNumber,
+ lineStart: this.lineStart,
+ start: this.index,
+ end: this.index
+ };
+ }
+ var cp = this.source.charCodeAt(this.index);
+ if (character_1.Character.isIdentifierStart(cp)) {
+ return this.scanIdentifier();
+ }
+ // Very common: ( and ) and ;
+ if (cp === 0x28 || cp === 0x29 || cp === 0x3B) {
+ return this.scanPunctuator();
+ }
+ // String literal starts with single quote (U+0027) or double quote (U+0022).
+ if (cp === 0x27 || cp === 0x22) {
+ return this.scanStringLiteral();
+ }
+ // Dot (.) U+002E can also start a floating-point number, hence the need
+ // to check the next character.
+ if (cp === 0x2E) {
+ if (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index + 1))) {
+ return this.scanNumericLiteral();
+ }
+ return this.scanPunctuator();
+ }
+ if (character_1.Character.isDecimalDigit(cp)) {
+ return this.scanNumericLiteral();
+ }
+ // Template literals start with ` (U+0060) for template head
+ // or } (U+007D) for template middle or template tail.
+ if (cp === 0x60 || (cp === 0x7D && this.curlyStack[this.curlyStack.length - 1] === '${')) {
+ return this.scanTemplate();
+ }
+ // Possible identifier start in a surrogate pair.
+ if (cp >= 0xD800 && cp < 0xDFFF) {
+ if (character_1.Character.isIdentifierStart(this.codePointAt(this.index))) {
+ return this.scanIdentifier();
+ }
+ }
+ return this.scanPunctuator();
+ };
+ return Scanner;
+ }());
+ exports.Scanner = Scanner;
+
+
+/***/ },
+/* 13 */
+/***/ function(module, exports) {
+
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.TokenName = {};
+ exports.TokenName[1 /* BooleanLiteral */] = 'Boolean';
+ exports.TokenName[2 /* EOF */] = '<end>';
+ exports.TokenName[3 /* Identifier */] = 'Identifier';
+ exports.TokenName[4 /* Keyword */] = 'Keyword';
+ exports.TokenName[5 /* NullLiteral */] = 'Null';
+ exports.TokenName[6 /* NumericLiteral */] = 'Numeric';
+ exports.TokenName[7 /* Punctuator */] = 'Punctuator';
+ exports.TokenName[8 /* StringLiteral */] = 'String';
+ exports.TokenName[9 /* RegularExpression */] = 'RegularExpression';
+ exports.TokenName[10 /* Template */] = 'Template';
+
+
+/***/ },
+/* 14 */
+/***/ function(module, exports) {
+
+ "use strict";
+ // Generated by generate-xhtml-entities.js. DO NOT MODIFY!
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.XHTMLEntities = {
+ quot: '\u0022',
+ amp: '\u0026',
+ apos: '\u0027',
+ gt: '\u003E',
+ nbsp: '\u00A0',
+ iexcl: '\u00A1',
+ cent: '\u00A2',
+ pound: '\u00A3',
+ curren: '\u00A4',
+ yen: '\u00A5',
+ brvbar: '\u00A6',
+ sect: '\u00A7',
+ uml: '\u00A8',
+ copy: '\u00A9',
+ ordf: '\u00AA',
+ laquo: '\u00AB',
+ not: '\u00AC',
+ shy: '\u00AD',
+ reg: '\u00AE',
+ macr: '\u00AF',
+ deg: '\u00B0',
+ plusmn: '\u00B1',
+ sup2: '\u00B2',
+ sup3: '\u00B3',
+ acute: '\u00B4',
+ micro: '\u00B5',
+ para: '\u00B6',
+ middot: '\u00B7',
+ cedil: '\u00B8',
+ sup1: '\u00B9',
+ ordm: '\u00BA',
+ raquo: '\u00BB',
+ frac14: '\u00BC',
+ frac12: '\u00BD',
+ frac34: '\u00BE',
+ iquest: '\u00BF',
+ Agrave: '\u00C0',
+ Aacute: '\u00C1',
+ Acirc: '\u00C2',
+ Atilde: '\u00C3',
+ Auml: '\u00C4',
+ Aring: '\u00C5',
+ AElig: '\u00C6',
+ Ccedil: '\u00C7',
+ Egrave: '\u00C8',
+ Eacute: '\u00C9',
+ Ecirc: '\u00CA',
+ Euml: '\u00CB',
+ Igrave: '\u00CC',
+ Iacute: '\u00CD',
+ Icirc: '\u00CE',
+ Iuml: '\u00CF',
+ ETH: '\u00D0',
+ Ntilde: '\u00D1',
+ Ograve: '\u00D2',
+ Oacute: '\u00D3',
+ Ocirc: '\u00D4',
+ Otilde: '\u00D5',
+ Ouml: '\u00D6',
+ times: '\u00D7',
+ Oslash: '\u00D8',
+ Ugrave: '\u00D9',
+ Uacute: '\u00DA',
+ Ucirc: '\u00DB',
+ Uuml: '\u00DC',
+ Yacute: '\u00DD',
+ THORN: '\u00DE',
+ szlig: '\u00DF',
+ agrave: '\u00E0',
+ aacute: '\u00E1',
+ acirc: '\u00E2',
+ atilde: '\u00E3',
+ auml: '\u00E4',
+ aring: '\u00E5',
+ aelig: '\u00E6',
+ ccedil: '\u00E7',
+ egrave: '\u00E8',
+ eacute: '\u00E9',
+ ecirc: '\u00EA',
+ euml: '\u00EB',
+ igrave: '\u00EC',
+ iacute: '\u00ED',
+ icirc: '\u00EE',
+ iuml: '\u00EF',
+ eth: '\u00F0',
+ ntilde: '\u00F1',
+ ograve: '\u00F2',
+ oacute: '\u00F3',
+ ocirc: '\u00F4',
+ otilde: '\u00F5',
+ ouml: '\u00F6',
+ divide: '\u00F7',
+ oslash: '\u00F8',
+ ugrave: '\u00F9',
+ uacute: '\u00FA',
+ ucirc: '\u00FB',
+ uuml: '\u00FC',
+ yacute: '\u00FD',
+ thorn: '\u00FE',
+ yuml: '\u00FF',
+ OElig: '\u0152',
+ oelig: '\u0153',
+ Scaron: '\u0160',
+ scaron: '\u0161',
+ Yuml: '\u0178',
+ fnof: '\u0192',
+ circ: '\u02C6',
+ tilde: '\u02DC',
+ Alpha: '\u0391',
+ Beta: '\u0392',
+ Gamma: '\u0393',
+ Delta: '\u0394',
+ Epsilon: '\u0395',
+ Zeta: '\u0396',
+ Eta: '\u0397',
+ Theta: '\u0398',
+ Iota: '\u0399',
+ Kappa: '\u039A',
+ Lambda: '\u039B',
+ Mu: '\u039C',
+ Nu: '\u039D',
+ Xi: '\u039E',
+ Omicron: '\u039F',
+ Pi: '\u03A0',
+ Rho: '\u03A1',
+ Sigma: '\u03A3',
+ Tau: '\u03A4',
+ Upsilon: '\u03A5',
+ Phi: '\u03A6',
+ Chi: '\u03A7',
+ Psi: '\u03A8',
+ Omega: '\u03A9',
+ alpha: '\u03B1',
+ beta: '\u03B2',
+ gamma: '\u03B3',
+ delta: '\u03B4',
+ epsilon: '\u03B5',
+ zeta: '\u03B6',
+ eta: '\u03B7',
+ theta: '\u03B8',
+ iota: '\u03B9',
+ kappa: '\u03BA',
+ lambda: '\u03BB',
+ mu: '\u03BC',
+ nu: '\u03BD',
+ xi: '\u03BE',
+ omicron: '\u03BF',
+ pi: '\u03C0',
+ rho: '\u03C1',
+ sigmaf: '\u03C2',
+ sigma: '\u03C3',
+ tau: '\u03C4',
+ upsilon: '\u03C5',
+ phi: '\u03C6',
+ chi: '\u03C7',
+ psi: '\u03C8',
+ omega: '\u03C9',
+ thetasym: '\u03D1',
+ upsih: '\u03D2',
+ piv: '\u03D6',
+ ensp: '\u2002',
+ emsp: '\u2003',
+ thinsp: '\u2009',
+ zwnj: '\u200C',
+ zwj: '\u200D',
+ lrm: '\u200E',
+ rlm: '\u200F',
+ ndash: '\u2013',
+ mdash: '\u2014',
+ lsquo: '\u2018',
+ rsquo: '\u2019',
+ sbquo: '\u201A',
+ ldquo: '\u201C',
+ rdquo: '\u201D',
+ bdquo: '\u201E',
+ dagger: '\u2020',
+ Dagger: '\u2021',
+ bull: '\u2022',
+ hellip: '\u2026',
+ permil: '\u2030',
+ prime: '\u2032',
+ Prime: '\u2033',
+ lsaquo: '\u2039',
+ rsaquo: '\u203A',
+ oline: '\u203E',
+ frasl: '\u2044',
+ euro: '\u20AC',
+ image: '\u2111',
+ weierp: '\u2118',
+ real: '\u211C',
+ trade: '\u2122',
+ alefsym: '\u2135',
+ larr: '\u2190',
+ uarr: '\u2191',
+ rarr: '\u2192',
+ darr: '\u2193',
+ harr: '\u2194',
+ crarr: '\u21B5',
+ lArr: '\u21D0',
+ uArr: '\u21D1',
+ rArr: '\u21D2',
+ dArr: '\u21D3',
+ hArr: '\u21D4',
+ forall: '\u2200',
+ part: '\u2202',
+ exist: '\u2203',
+ empty: '\u2205',
+ nabla: '\u2207',
+ isin: '\u2208',
+ notin: '\u2209',
+ ni: '\u220B',
+ prod: '\u220F',
+ sum: '\u2211',
+ minus: '\u2212',
+ lowast: '\u2217',
+ radic: '\u221A',
+ prop: '\u221D',
+ infin: '\u221E',
+ ang: '\u2220',
+ and: '\u2227',
+ or: '\u2228',
+ cap: '\u2229',
+ cup: '\u222A',
+ int: '\u222B',
+ there4: '\u2234',
+ sim: '\u223C',
+ cong: '\u2245',
+ asymp: '\u2248',
+ ne: '\u2260',
+ equiv: '\u2261',
+ le: '\u2264',
+ ge: '\u2265',
+ sub: '\u2282',
+ sup: '\u2283',
+ nsub: '\u2284',
+ sube: '\u2286',
+ supe: '\u2287',
+ oplus: '\u2295',
+ otimes: '\u2297',
+ perp: '\u22A5',
+ sdot: '\u22C5',
+ lceil: '\u2308',
+ rceil: '\u2309',
+ lfloor: '\u230A',
+ rfloor: '\u230B',
+ loz: '\u25CA',
+ spades: '\u2660',
+ clubs: '\u2663',
+ hearts: '\u2665',
+ diams: '\u2666',
+ lang: '\u27E8',
+ rang: '\u27E9'
+ };
+
+
+/***/ },
+/* 15 */
+/***/ function(module, exports, __webpack_require__) {
+
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ var error_handler_1 = __webpack_require__(10);
+ var scanner_1 = __webpack_require__(12);
+ var token_1 = __webpack_require__(13);
+ var Reader = (function () {
+ function Reader() {
+ this.values = [];
+ this.curly = this.paren = -1;
+ }
+ // A function following one of those tokens is an expression.
+ Reader.prototype.beforeFunctionExpression = function (t) {
+ return ['(', '{', '[', 'in', 'typeof', 'instanceof', 'new',
+ 'return', 'case', 'delete', 'throw', 'void',
+ // assignment operators
+ '=', '+=', '-=', '*=', '**=', '/=', '%=', '<<=', '>>=', '>>>=',
+ '&=', '|=', '^=', ',',
+ // binary/unary operators
+ '+', '-', '*', '**', '/', '%', '++', '--', '<<', '>>', '>>>', '&',
+ '|', '^', '!', '~', '&&', '||', '?', ':', '===', '==', '>=',
+ '<=', '<', '>', '!=', '!=='].indexOf(t) >= 0;
+ };
+ // Determine if forward slash (/) is an operator or part of a regular expression
+ // https://github.com/mozilla/sweet.js/wiki/design
+ Reader.prototype.isRegexStart = function () {
+ var previous = this.values[this.values.length - 1];
+ var regex = (previous !== null);
+ switch (previous) {
+ case 'this':
+ case ']':
+ regex = false;
+ break;
+ case ')':
+ var keyword = this.values[this.paren - 1];
+ regex = (keyword === 'if' || keyword === 'while' || keyword === 'for' || keyword === 'with');
+ break;
+ case '}':
+ // Dividing a function by anything makes little sense,
+ // but we have to check for that.
+ regex = false;
+ if (this.values[this.curly - 3] === 'function') {
+ // Anonymous function, e.g. function(){} /42
+ var check = this.values[this.curly - 4];
+ regex = check ? !this.beforeFunctionExpression(check) : false;
+ }
+ else if (this.values[this.curly - 4] === 'function') {
+ // Named function, e.g. function f(){} /42/
+ var check = this.values[this.curly - 5];
+ regex = check ? !this.beforeFunctionExpression(check) : true;
+ }
+ break;
+ default:
+ break;
+ }
+ return regex;
+ };
+ Reader.prototype.push = function (token) {
+ if (token.type === 7 /* Punctuator */ || token.type === 4 /* Keyword */) {
+ if (token.value === '{') {
+ this.curly = this.values.length;
+ }
+ else if (token.value === '(') {
+ this.paren = this.values.length;
+ }
+ this.values.push(token.value);
+ }
+ else {
+ this.values.push(null);
+ }
+ };
+ return Reader;
+ }());
+ var Tokenizer = (function () {
+ function Tokenizer(code, config) {
+ this.errorHandler = new error_handler_1.ErrorHandler();
+ this.errorHandler.tolerant = config ? (typeof config.tolerant === 'boolean' && config.tolerant) : false;
+ this.scanner = new scanner_1.Scanner(code, this.errorHandler);
+ this.scanner.trackComment = config ? (typeof config.comment === 'boolean' && config.comment) : false;
+ this.trackRange = config ? (typeof config.range === 'boolean' && config.range) : false;
+ this.trackLoc = config ? (typeof config.loc === 'boolean' && config.loc) : false;
+ this.buffer = [];
+ this.reader = new Reader();
+ }
+ Tokenizer.prototype.errors = function () {
+ return this.errorHandler.errors;
+ };
+ Tokenizer.prototype.getNextToken = function () {
+ if (this.buffer.length === 0) {
+ var comments = this.scanner.scanComments();
+ if (this.scanner.trackComment) {
+ for (var i = 0; i < comments.length; ++i) {
+ var e = comments[i];
+ var value = this.scanner.source.slice(e.slice[0], e.slice[1]);
+ var comment = {
+ type: e.multiLine ? 'BlockComment' : 'LineComment',
+ value: value
+ };
+ if (this.trackRange) {
+ comment.range = e.range;
+ }
+ if (this.trackLoc) {
+ comment.loc = e.loc;
+ }
+ this.buffer.push(comment);
+ }
+ }
+ if (!this.scanner.eof()) {
+ var loc = void 0;
+ if (this.trackLoc) {
+ loc = {
+ start: {
+ line: this.scanner.lineNumber,
+ column: this.scanner.index - this.scanner.lineStart
+ },
+ end: {}
+ };
+ }
+ var startRegex = (this.scanner.source[this.scanner.index] === '/') && this.reader.isRegexStart();
+ var token = startRegex ? this.scanner.scanRegExp() : this.scanner.lex();
+ this.reader.push(token);
+ var entry = {
+ type: token_1.TokenName[token.type],
+ value: this.scanner.source.slice(token.start, token.end)
+ };
+ if (this.trackRange) {
+ entry.range = [token.start, token.end];
+ }
+ if (this.trackLoc) {
+ loc.end = {
+ line: this.scanner.lineNumber,
+ column: this.scanner.index - this.scanner.lineStart
+ };
+ entry.loc = loc;
+ }
+ if (token.type === 9 /* RegularExpression */) {
+ var pattern = token.pattern;
+ var flags = token.flags;
+ entry.regex = { pattern: pattern, flags: flags };
+ }
+ this.buffer.push(entry);
+ }
+ }
+ return this.buffer.shift();
+ };
+ return Tokenizer;
+ }());
+ exports.Tokenizer = Tokenizer;
+
+
+/***/ }
+/******/ ])
+});
+; \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/esprima/package.json b/tools/node_modules/eslint/node_modules/esprima/package.json
new file mode 100644
index 0000000000..f451cbc442
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/esprima/package.json
@@ -0,0 +1,137 @@
+{
+ "_from": "esprima@^4.0.0",
+ "_id": "esprima@4.0.0",
+ "_inBundle": false,
+ "_integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==",
+ "_location": "/eslint/esprima",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "esprima@^4.0.0",
+ "name": "esprima",
+ "escapedName": "esprima",
+ "rawSpec": "^4.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^4.0.0"
+ },
+ "_requiredBy": [
+ "/eslint/js-yaml"
+ ],
+ "_resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz",
+ "_shasum": "4499eddcd1110e0b218bacf2fa7f7f59f55ca804",
+ "_spec": "esprima@^4.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/js-yaml",
+ "author": {
+ "name": "Ariya Hidayat",
+ "email": "ariya.hidayat@gmail.com"
+ },
+ "bin": {
+ "esparse": "./bin/esparse.js",
+ "esvalidate": "./bin/esvalidate.js"
+ },
+ "bugs": {
+ "url": "https://github.com/jquery/esprima/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "ECMAScript parsing infrastructure for multipurpose analysis",
+ "devDependencies": {
+ "codecov.io": "~0.1.6",
+ "escomplex-js": "1.2.0",
+ "everything.js": "~1.0.3",
+ "glob": "~7.1.0",
+ "istanbul": "~0.4.0",
+ "json-diff": "~0.3.1",
+ "karma": "~1.3.0",
+ "karma-chrome-launcher": "~2.0.0",
+ "karma-detect-browsers": "~2.2.3",
+ "karma-edge-launcher": "~0.2.0",
+ "karma-firefox-launcher": "~1.0.0",
+ "karma-ie-launcher": "~1.0.0",
+ "karma-mocha": "~1.3.0",
+ "karma-safari-launcher": "~1.0.0",
+ "karma-safaritechpreview-launcher": "~0.0.4",
+ "karma-sauce-launcher": "~1.1.0",
+ "lodash": "~3.10.1",
+ "mocha": "~3.2.0",
+ "node-tick-processor": "~0.0.2",
+ "regenerate": "~1.3.2",
+ "temp": "~0.8.3",
+ "tslint": "~5.1.0",
+ "typescript": "~2.3.2",
+ "typescript-formatter": "~5.1.3",
+ "unicode-8.0.0": "~0.7.0",
+ "webpack": "~1.14.0"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "files": [
+ "bin",
+ "dist/esprima.js"
+ ],
+ "homepage": "http://esprima.org",
+ "keywords": [
+ "ast",
+ "ecmascript",
+ "esprima",
+ "javascript",
+ "parser",
+ "syntax"
+ ],
+ "license": "BSD-2-Clause",
+ "main": "dist/esprima.js",
+ "maintainers": [
+ {
+ "name": "Ariya Hidayat",
+ "email": "ariya.hidayat@gmail.com",
+ "url": "http://ariya.ofilabs.com"
+ }
+ ],
+ "name": "esprima",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jquery/esprima.git"
+ },
+ "scripts": {
+ "all-tests": "npm run verify-line-ending && npm run generate-fixtures && npm run unit-tests && npm run api-tests && npm run grammar-tests && npm run regression-tests && npm run hostile-env-tests",
+ "analyze-coverage": "istanbul cover test/unit-tests.js",
+ "api-tests": "mocha -R dot test/api-tests.js",
+ "appveyor": "npm run compile && npm run all-tests && npm run browser-tests",
+ "benchmark": "npm run benchmark-parser && npm run benchmark-tokenizer",
+ "benchmark-parser": "node -expose_gc test/benchmark-parser.js",
+ "benchmark-tokenizer": "node --expose_gc test/benchmark-tokenizer.js",
+ "browser-tests": "npm run compile && npm run generate-fixtures && cd test && karma start --single-run",
+ "check-coverage": "istanbul check-coverage --statement 100 --branch 100 --function 100",
+ "check-version": "node test/check-version.js",
+ "circleci": "npm test && npm run codecov && npm run downstream",
+ "code-style": "tsfmt --verify src/*.ts && tsfmt --verify test/*.js",
+ "codecov": "istanbul report cobertura && codecov < ./coverage/cobertura-coverage.xml",
+ "compile": "tsc -p src/ && webpack && node tools/fixupbundle.js",
+ "complexity": "node test/check-complexity.js",
+ "downstream": "node test/downstream.js",
+ "droneio": "npm run compile && npm run all-tests && npm run saucelabs",
+ "dynamic-analysis": "npm run analyze-coverage && npm run check-coverage",
+ "format-code": "tsfmt -r src/*.ts && tsfmt -r test/*.js",
+ "generate-fixtures": "node tools/generate-fixtures.js",
+ "generate-regex": "node tools/generate-identifier-regex.js",
+ "generate-xhtml-entities": "node tools/generate-xhtml-entities.js",
+ "grammar-tests": "node test/grammar-tests.js",
+ "hostile-env-tests": "node test/hostile-environment-tests.js",
+ "prepublish": "npm run compile",
+ "profile": "node --prof test/profile.js && mv isolate*.log v8.log && node-tick-processor",
+ "regression-tests": "node test/regression-tests.js",
+ "saucelabs": "npm run saucelabs-evergreen && npm run saucelabs-ie && npm run saucelabs-safari",
+ "saucelabs-evergreen": "cd test && karma start saucelabs-evergreen.conf.js",
+ "saucelabs-ie": "cd test && karma start saucelabs-ie.conf.js",
+ "saucelabs-safari": "cd test && karma start saucelabs-safari.conf.js",
+ "static-analysis": "npm run check-version && npm run tslint && npm run code-style && npm run complexity",
+ "test": "npm run compile && npm run all-tests && npm run static-analysis && npm run dynamic-analysis",
+ "travis": "npm test",
+ "tslint": "tslint src/*.ts",
+ "unit-tests": "node test/unit-tests.js",
+ "verify-line-ending": "node test/verify-line-ending.js"
+ },
+ "version": "4.0.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/esquery/README.md b/tools/node_modules/eslint/node_modules/esquery/README.md
new file mode 100644
index 0000000000..a3ee33479d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/esquery/README.md
@@ -0,0 +1,26 @@
+ESQuery is a library for querying the AST output by Esprima for patterns of syntax using a CSS style selector system. Check out the demo:
+
+[demo](https://estools.github.io/esquery/)
+
+The following selectors are supported:
+* AST node type: `ForStatement`
+* [wildcard](http://dev.w3.org/csswg/selectors4/#universal-selector): `*`
+* [attribute existence](http://dev.w3.org/csswg/selectors4/#attribute-selectors): `[attr]`
+* [attribute value](http://dev.w3.org/csswg/selectors4/#attribute-selectors): `[attr="foo"]` or `[attr=123]`
+* attribute regex: `[attr=/foo.*/]`
+* attribute conditons: `[attr!="foo"]`, `[attr>2]`, `[attr<3]`, `[attr>=2]`, or `[attr<=3]`
+* nested attribute: `[attr.level2="foo"]`
+* field: `FunctionDeclaration > Identifier.id`
+* [First](http://dev.w3.org/csswg/selectors4/#the-first-child-pseudo) or [last](http://dev.w3.org/csswg/selectors4/#the-last-child-pseudo) child: `:first-child` or `:last-child`
+* [nth-child](http://dev.w3.org/csswg/selectors4/#the-nth-child-pseudo) (no ax+b support): `:nth-child(2)`
+* [nth-last-child](http://dev.w3.org/csswg/selectors4/#the-nth-last-child-pseudo) (no ax+b support): `:nth-last-child(1)`
+* [descendant](http://dev.w3.org/csswg/selectors4/#descendant-combinators): `ancestor descendant`
+* [child](http://dev.w3.org/csswg/selectors4/#child-combinators): `parent > child`
+* [following sibling](http://dev.w3.org/csswg/selectors4/#general-sibling-combinators): `node ~ sibling`
+* [adjacent sibling](http://dev.w3.org/csswg/selectors4/#adjacent-sibling-combinators): `node + adjacent`
+* [negation](http://dev.w3.org/csswg/selectors4/#negation-pseudo): `:not(ForStatement)`
+* [matches-any](http://dev.w3.org/csswg/selectors4/#matches): `:matches([attr] > :first-child, :last-child)`
+* [subject indicator](http://dev.w3.org/csswg/selectors4/#subject): `!IfStatement > [name="foo"]`
+* class of AST node: `:statement`, `:expression`, `:declaration`, `:function`, or `:pattern`
+
+[![Build Status](https://travis-ci.org/estools/esquery.png?branch=master)](https://travis-ci.org/estools/esquery)
diff --git a/tools/node_modules/eslint/node_modules/esquery/esquery.js b/tools/node_modules/eslint/node_modules/esquery/esquery.js
new file mode 100644
index 0000000000..5b67924a12
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/esquery/esquery.js
@@ -0,0 +1,320 @@
+/* vim: set sw=4 sts=4 : */
+(function () {
+
+ var estraverse = require('estraverse');
+ var parser = require('./parser');
+
+ var isArray = Array.isArray || function isArray(array) {
+ return {}.toString.call(array) === '[object Array]';
+ };
+
+ var LEFT_SIDE = {};
+ var RIGHT_SIDE = {};
+
+ function esqueryModule() {
+
+ /**
+ * Get the value of a property which may be multiple levels down in the object.
+ */
+ function getPath(obj, key) {
+ var i, keys = key.split(".");
+ for (i = 0; i < keys.length; i++) {
+ if (obj == null) { return obj; }
+ obj = obj[keys[i]];
+ }
+ return obj;
+ }
+
+ /**
+ * Determine whether `node` can be reached by following `path`, starting at `ancestor`.
+ */
+ function inPath(node, ancestor, path) {
+ var field, remainingPath, i;
+ if (path.length === 0) { return node === ancestor; }
+ if (ancestor == null) { return false; }
+ field = ancestor[path[0]];
+ remainingPath = path.slice(1);
+ if (isArray(field)) {
+ for (i = 0, l = field.length; i < l; ++i) {
+ if (inPath(node, field[i], remainingPath)) { return true; }
+ }
+ return false;
+ } else {
+ return inPath(node, field, remainingPath);
+ }
+ }
+
+ /**
+ * Given a `node` and its ancestors, determine if `node` is matched by `selector`.
+ */
+ function matches(node, selector, ancestry) {
+ var path, ancestor, i, l, p;
+ if (!selector) { return true; }
+ if (!node) { return false; }
+ if (!ancestry) { ancestry = []; }
+
+ switch(selector.type) {
+ case 'wildcard':
+ return true;
+
+ case 'identifier':
+ return selector.value.toLowerCase() === node.type.toLowerCase();
+
+ case 'field':
+ path = selector.name.split('.');
+ ancestor = ancestry[path.length - 1];
+ return inPath(node, ancestor, path);
+
+ case 'matches':
+ for (i = 0, l = selector.selectors.length; i < l; ++i) {
+ if (matches(node, selector.selectors[i], ancestry)) { return true; }
+ }
+ return false;
+
+ case 'compound':
+ for (i = 0, l = selector.selectors.length; i < l; ++i) {
+ if (!matches(node, selector.selectors[i], ancestry)) { return false; }
+ }
+ return true;
+
+ case 'not':
+ for (i = 0, l = selector.selectors.length; i < l; ++i) {
+ if (matches(node, selector.selectors[i], ancestry)) { return false; }
+ }
+ return true;
+
+ case 'child':
+ if (matches(node, selector.right, ancestry)) {
+ return matches(ancestry[0], selector.left, ancestry.slice(1));
+ }
+ return false;
+
+ case 'descendant':
+ if (matches(node, selector.right, ancestry)) {
+ for (i = 0, l = ancestry.length; i < l; ++i) {
+ if (matches(ancestry[i], selector.left, ancestry.slice(i + 1))) {
+ return true;
+ }
+ }
+ }
+ return false;
+
+ case 'attribute':
+ p = getPath(node, selector.name);
+ switch (selector.operator) {
+ case null:
+ case void 0:
+ return p != null;
+ case '=':
+ switch (selector.value.type) {
+ case 'regexp': return selector.value.value.test(p);
+ case 'literal': return '' + selector.value.value === '' + p;
+ case 'type': return selector.value.value === typeof p;
+ }
+ case '!=':
+ switch (selector.value.type) {
+ case 'regexp': return !selector.value.value.test(p);
+ case 'literal': return '' + selector.value.value !== '' + p;
+ case 'type': return selector.value.value !== typeof p;
+ }
+ case '<=': return p <= selector.value.value;
+ case '<': return p < selector.value.value;
+ case '>': return p > selector.value.value;
+ case '>=': return p >= selector.value.value;
+ }
+
+ case 'sibling':
+ return matches(node, selector.right, ancestry) &&
+ sibling(node, selector.left, ancestry, LEFT_SIDE) ||
+ selector.left.subject &&
+ matches(node, selector.left, ancestry) &&
+ sibling(node, selector.right, ancestry, RIGHT_SIDE);
+
+ case 'adjacent':
+ return matches(node, selector.right, ancestry) &&
+ adjacent(node, selector.left, ancestry, LEFT_SIDE) ||
+ selector.right.subject &&
+ matches(node, selector.left, ancestry) &&
+ adjacent(node, selector.right, ancestry, RIGHT_SIDE);
+
+ case 'nth-child':
+ return matches(node, selector.right, ancestry) &&
+ nthChild(node, ancestry, function (length) {
+ return selector.index.value - 1;
+ });
+
+ case 'nth-last-child':
+ return matches(node, selector.right, ancestry) &&
+ nthChild(node, ancestry, function (length) {
+ return length - selector.index.value;
+ });
+
+ case 'class':
+ if(!node.type) return false;
+ switch(selector.name.toLowerCase()){
+ case 'statement':
+ if(node.type.slice(-9) === 'Statement') return true;
+ // fallthrough: interface Declaration <: Statement { }
+ case 'declaration':
+ return node.type.slice(-11) === 'Declaration';
+ case 'pattern':
+ if(node.type.slice(-7) === 'Pattern') return true;
+ // fallthrough: interface Expression <: Node, Pattern { }
+ case 'expression':
+ return node.type.slice(-10) === 'Expression' ||
+ node.type === 'Literal' ||
+ node.type === 'Identifier';
+ case 'function':
+ return node.type.slice(0, 8) === 'Function' ||
+ node.type === 'ArrowFunctionExpression';
+ }
+ throw new Error('Unknown class name: ' + selector.name);
+ }
+
+ throw new Error('Unknown selector type: ' + selector.type);
+ }
+
+ /*
+ * Determines if the given node has a sibling that matches the given selector.
+ */
+ function sibling(node, selector, ancestry, side) {
+ var parent = ancestry[0], listProp, startIndex, keys, i, l, k, lowerBound, upperBound;
+ if (!parent) { return false; }
+ keys = estraverse.VisitorKeys[parent.type];
+ for (i = 0, l = keys.length; i < l; ++i) {
+ listProp = parent[keys[i]];
+ if (isArray(listProp)) {
+ startIndex = listProp.indexOf(node);
+ if (startIndex < 0) { continue; }
+ if (side === LEFT_SIDE) {
+ lowerBound = 0;
+ upperBound = startIndex;
+ } else {
+ lowerBound = startIndex + 1;
+ upperBound = listProp.length;
+ }
+ for (k = lowerBound; k < upperBound; ++k) {
+ if (matches(listProp[k], selector, ancestry)) {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+ /*
+ * Determines if the given node has an asjacent sibling that matches the given selector.
+ */
+ function adjacent(node, selector, ancestry, side) {
+ var parent = ancestry[0], listProp, keys, i, l, idx;
+ if (!parent) { return false; }
+ keys = estraverse.VisitorKeys[parent.type];
+ for (i = 0, l = keys.length; i < l; ++i) {
+ listProp = parent[keys[i]];
+ if (isArray(listProp)) {
+ idx = listProp.indexOf(node);
+ if (idx < 0) { continue; }
+ if (side === LEFT_SIDE && idx > 0 && matches(listProp[idx - 1], selector, ancestry)) {
+ return true;
+ }
+ if (side === RIGHT_SIDE && idx < listProp.length - 1 && matches(listProp[idx + 1], selector, ancestry)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /*
+ * Determines if the given node is the nth child, determined by idxFn, which is given the containing list's length.
+ */
+ function nthChild(node, ancestry, idxFn) {
+ var parent = ancestry[0], listProp, keys, i, l, idx;
+ if (!parent) { return false; }
+ keys = estraverse.VisitorKeys[parent.type];
+ for (i = 0, l = keys.length; i < l; ++i) {
+ listProp = parent[keys[i]];
+ if (isArray(listProp)) {
+ idx = listProp.indexOf(node);
+ if (idx >= 0 && idx === idxFn(listProp.length)) { return true; }
+ }
+ }
+ return false;
+ }
+
+ /*
+ * For each selector node marked as a subject, find the portion of the selector that the subject must match.
+ */
+ function subjects(selector, ancestor) {
+ var results, p;
+ if (selector == null || typeof selector != 'object') { return []; }
+ if (ancestor == null) { ancestor = selector; }
+ results = selector.subject ? [ancestor] : [];
+ for(p in selector) {
+ if(!{}.hasOwnProperty.call(selector, p)) { continue; }
+ [].push.apply(results, subjects(selector[p], p === 'left' ? selector[p] : ancestor));
+ }
+ return results;
+ }
+
+ /**
+ * From a JS AST and a selector AST, collect all JS AST nodes that match the selector.
+ */
+ function match(ast, selector) {
+ var ancestry = [], results = [], altSubjects, i, l, k, m;
+ if (!selector) { return results; }
+ altSubjects = subjects(selector);
+ estraverse.traverse(ast, {
+ enter: function (node, parent) {
+ if (parent != null) { ancestry.unshift(parent); }
+ if (matches(node, selector, ancestry)) {
+ if (altSubjects.length) {
+ for (i = 0, l = altSubjects.length; i < l; ++i) {
+ if (matches(node, altSubjects[i], ancestry)) { results.push(node); }
+ for (k = 0, m = ancestry.length; k < m; ++k) {
+ if (matches(ancestry[k], altSubjects[i], ancestry.slice(k + 1))) {
+ results.push(ancestry[k]);
+ }
+ }
+ }
+ } else {
+ results.push(node);
+ }
+ }
+ },
+ leave: function () { ancestry.shift(); }
+ });
+ return results;
+ }
+
+ /**
+ * Parse a selector string and return its AST.
+ */
+ function parse(selector) {
+ return parser.parse(selector);
+ }
+
+ /**
+ * Query the code AST using the selector string.
+ */
+ function query(ast, selector) {
+ return match(ast, parse(selector));
+ }
+
+ query.parse = parse;
+ query.match = match;
+ query.matches = matches;
+ return query.query = query;
+ }
+
+
+ if (typeof define === "function" && define.amd) {
+ define(esqueryModule);
+ } else if (typeof module !== 'undefined' && module.exports) {
+ module.exports = esqueryModule();
+ } else {
+ this.esquery = esqueryModule();
+ }
+
+})();
diff --git a/tools/node_modules/eslint/node_modules/esquery/license.txt b/tools/node_modules/eslint/node_modules/esquery/license.txt
new file mode 100644
index 0000000000..52f915e268
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/esquery/license.txt
@@ -0,0 +1,24 @@
+Copyright (c) 2013, Joel Feenstra
+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 the ESQuery 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 JOEL FEENSTRA 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/tools/node_modules/eslint/node_modules/esquery/package.json b/tools/node_modules/eslint/node_modules/esquery/package.json
new file mode 100644
index 0000000000..92af42d5ad
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/esquery/package.json
@@ -0,0 +1,72 @@
+{
+ "_from": "esquery@^1.0.0",
+ "_id": "esquery@1.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-z7qLV9f7qT8XKYqKAGoEzaE9gPo=",
+ "_location": "/eslint/esquery",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "esquery@^1.0.0",
+ "name": "esquery",
+ "escapedName": "esquery",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/eslint"
+ ],
+ "_resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.0.tgz",
+ "_shasum": "cfba8b57d7fba93f17298a8a006a04cda13d80fa",
+ "_spec": "esquery@^1.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint",
+ "author": {
+ "name": "Joel Feenstra",
+ "email": "jrfeenst+esquery@gmail.com"
+ },
+ "bugs": {
+ "url": "https://github.com/jrfeenst/esquery/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "estraverse": "^4.0.0"
+ },
+ "deprecated": false,
+ "description": "A query library for ECMAScript AST using a CSS selector like query language.",
+ "devDependencies": {
+ "commonjs-everywhere": "~0.9.4",
+ "esprima": "~1.1.1",
+ "jstestr": ">=0.4",
+ "pegjs": "~0.7.0"
+ },
+ "engines": {
+ "node": ">=0.6"
+ },
+ "files": [
+ "esquery.js",
+ "parser.js",
+ "license.txt",
+ "README.md"
+ ],
+ "homepage": "https://github.com/jrfeenst/esquery#readme",
+ "keywords": [
+ "ast",
+ "ecmascript",
+ "javascript",
+ "query"
+ ],
+ "license": "BSD",
+ "main": "esquery.js",
+ "name": "esquery",
+ "preferGlobal": false,
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jrfeenst/esquery.git"
+ },
+ "scripts": {
+ "test": "node node_modules/jstestr/bin/jstestr.js path=tests"
+ },
+ "version": "1.0.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/esquery/parser.js b/tools/node_modules/eslint/node_modules/esquery/parser.js
new file mode 100644
index 0000000000..2ce8134592
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/esquery/parser.js
@@ -0,0 +1,2595 @@
+var result = (function(){
+ /*
+ * Generated by PEG.js 0.7.0.
+ *
+ * http://pegjs.majda.cz/
+ */
+
+ function quote(s) {
+ /*
+ * ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a
+ * string literal except for the closing quote character, backslash,
+ * carriage return, line separator, paragraph separator, and line feed.
+ * Any character may appear in the form of an escape sequence.
+ *
+ * For portability, we also escape escape all control and non-ASCII
+ * characters. Note that "\0" and "\v" escape sequences are not used
+ * because JSHint does not like the first and IE the second.
+ */
+ return '"' + s
+ .replace(/\\/g, '\\\\') // backslash
+ .replace(/"/g, '\\"') // closing quote character
+ .replace(/\x08/g, '\\b') // backspace
+ .replace(/\t/g, '\\t') // horizontal tab
+ .replace(/\n/g, '\\n') // line feed
+ .replace(/\f/g, '\\f') // form feed
+ .replace(/\r/g, '\\r') // carriage return
+ .replace(/[\x00-\x07\x0B\x0E-\x1F\x80-\uFFFF]/g, escape)
+ + '"';
+ }
+
+ var result = {
+ /*
+ * Parses the input with a generated parser. If the parsing is successfull,
+ * returns a value explicitly or implicitly specified by the grammar from
+ * which the parser was generated (see |PEG.buildParser|). If the parsing is
+ * unsuccessful, throws |PEG.parser.SyntaxError| describing the error.
+ */
+ parse: function(input, startRule) {
+ var parseFunctions = {
+ "start": parse_start,
+ "_": parse__,
+ "identifierName": parse_identifierName,
+ "binaryOp": parse_binaryOp,
+ "selectors": parse_selectors,
+ "selector": parse_selector,
+ "sequence": parse_sequence,
+ "atom": parse_atom,
+ "wildcard": parse_wildcard,
+ "identifier": parse_identifier,
+ "attr": parse_attr,
+ "attrOps": parse_attrOps,
+ "attrEqOps": parse_attrEqOps,
+ "attrName": parse_attrName,
+ "attrValue": parse_attrValue,
+ "string": parse_string,
+ "number": parse_number,
+ "path": parse_path,
+ "type": parse_type,
+ "regex": parse_regex,
+ "field": parse_field,
+ "negation": parse_negation,
+ "matches": parse_matches,
+ "firstChild": parse_firstChild,
+ "lastChild": parse_lastChild,
+ "nthChild": parse_nthChild,
+ "nthLastChild": parse_nthLastChild,
+ "class": parse_class
+ };
+
+ if (startRule !== undefined) {
+ if (parseFunctions[startRule] === undefined) {
+ throw new Error("Invalid rule name: " + quote(startRule) + ".");
+ }
+ } else {
+ startRule = "start";
+ }
+
+ var pos = 0;
+ var reportFailures = 0;
+ var rightmostFailuresPos = 0;
+ var rightmostFailuresExpected = [];
+ var cache = {};
+
+ function padLeft(input, padding, length) {
+ var result = input;
+
+ var padLength = length - input.length;
+ for (var i = 0; i < padLength; i++) {
+ result = padding + result;
+ }
+
+ return result;
+ }
+
+ function escape(ch) {
+ var charCode = ch.charCodeAt(0);
+ var escapeChar;
+ var length;
+
+ if (charCode <= 0xFF) {
+ escapeChar = 'x';
+ length = 2;
+ } else {
+ escapeChar = 'u';
+ length = 4;
+ }
+
+ return '\\' + escapeChar + padLeft(charCode.toString(16).toUpperCase(), '0', length);
+ }
+
+ function matchFailed(failure) {
+ if (pos < rightmostFailuresPos) {
+ return;
+ }
+
+ if (pos > rightmostFailuresPos) {
+ rightmostFailuresPos = pos;
+ rightmostFailuresExpected = [];
+ }
+
+ rightmostFailuresExpected.push(failure);
+ }
+
+ function parse_start() {
+ var cacheKey = "start@" + pos;
+ var cachedResult = cache[cacheKey];
+ if (cachedResult) {
+ pos = cachedResult.nextPos;
+ return cachedResult.result;
+ }
+
+ var result0, result1, result2;
+ var pos0, pos1;
+
+ pos0 = pos;
+ pos1 = pos;
+ result0 = parse__();
+ if (result0 !== null) {
+ result1 = parse_selectors();
+ if (result1 !== null) {
+ result2 = parse__();
+ if (result2 !== null) {
+ result0 = [result0, result1, result2];
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ if (result0 !== null) {
+ result0 = (function(offset, ss) { return ss.length === 1 ? ss[0] : { type: 'matches', selectors: ss }; })(pos0, result0[1]);
+ }
+ if (result0 === null) {
+ pos = pos0;
+ }
+ if (result0 === null) {
+ pos0 = pos;
+ result0 = parse__();
+ if (result0 !== null) {
+ result0 = (function(offset) { return void 0; })(pos0);
+ }
+ if (result0 === null) {
+ pos = pos0;
+ }
+ }
+
+ cache[cacheKey] = {
+ nextPos: pos,
+ result: result0
+ };
+ return result0;
+ }
+
+ function parse__() {
+ var cacheKey = "_@" + pos;
+ var cachedResult = cache[cacheKey];
+ if (cachedResult) {
+ pos = cachedResult.nextPos;
+ return cachedResult.result;
+ }
+
+ var result0, result1;
+
+ result0 = [];
+ if (input.charCodeAt(pos) === 32) {
+ result1 = " ";
+ pos++;
+ } else {
+ result1 = null;
+ if (reportFailures === 0) {
+ matchFailed("\" \"");
+ }
+ }
+ while (result1 !== null) {
+ result0.push(result1);
+ if (input.charCodeAt(pos) === 32) {
+ result1 = " ";
+ pos++;
+ } else {
+ result1 = null;
+ if (reportFailures === 0) {
+ matchFailed("\" \"");
+ }
+ }
+ }
+
+ cache[cacheKey] = {
+ nextPos: pos,
+ result: result0
+ };
+ return result0;
+ }
+
+ function parse_identifierName() {
+ var cacheKey = "identifierName@" + pos;
+ var cachedResult = cache[cacheKey];
+ if (cachedResult) {
+ pos = cachedResult.nextPos;
+ return cachedResult.result;
+ }
+
+ var result0, result1;
+ var pos0;
+
+ pos0 = pos;
+ if (/^[^ [\],():#!=><~+.]/.test(input.charAt(pos))) {
+ result1 = input.charAt(pos);
+ pos++;
+ } else {
+ result1 = null;
+ if (reportFailures === 0) {
+ matchFailed("[^ [\\],():#!=><~+.]");
+ }
+ }
+ if (result1 !== null) {
+ result0 = [];
+ while (result1 !== null) {
+ result0.push(result1);
+ if (/^[^ [\],():#!=><~+.]/.test(input.charAt(pos))) {
+ result1 = input.charAt(pos);
+ pos++;
+ } else {
+ result1 = null;
+ if (reportFailures === 0) {
+ matchFailed("[^ [\\],():#!=><~+.]");
+ }
+ }
+ }
+ } else {
+ result0 = null;
+ }
+ if (result0 !== null) {
+ result0 = (function(offset, i) { return i.join(''); })(pos0, result0);
+ }
+ if (result0 === null) {
+ pos = pos0;
+ }
+
+ cache[cacheKey] = {
+ nextPos: pos,
+ result: result0
+ };
+ return result0;
+ }
+
+ function parse_binaryOp() {
+ var cacheKey = "binaryOp@" + pos;
+ var cachedResult = cache[cacheKey];
+ if (cachedResult) {
+ pos = cachedResult.nextPos;
+ return cachedResult.result;
+ }
+
+ var result0, result1, result2;
+ var pos0, pos1;
+
+ pos0 = pos;
+ pos1 = pos;
+ result0 = parse__();
+ if (result0 !== null) {
+ if (input.charCodeAt(pos) === 62) {
+ result1 = ">";
+ pos++;
+ } else {
+ result1 = null;
+ if (reportFailures === 0) {
+ matchFailed("\">\"");
+ }
+ }
+ if (result1 !== null) {
+ result2 = parse__();
+ if (result2 !== null) {
+ result0 = [result0, result1, result2];
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ if (result0 !== null) {
+ result0 = (function(offset) { return 'child'; })(pos0);
+ }
+ if (result0 === null) {
+ pos = pos0;
+ }
+ if (result0 === null) {
+ pos0 = pos;
+ pos1 = pos;
+ result0 = parse__();
+ if (result0 !== null) {
+ if (input.charCodeAt(pos) === 126) {
+ result1 = "~";
+ pos++;
+ } else {
+ result1 = null;
+ if (reportFailures === 0) {
+ matchFailed("\"~\"");
+ }
+ }
+ if (result1 !== null) {
+ result2 = parse__();
+ if (result2 !== null) {
+ result0 = [result0, result1, result2];
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ if (result0 !== null) {
+ result0 = (function(offset) { return 'sibling'; })(pos0);
+ }
+ if (result0 === null) {
+ pos = pos0;
+ }
+ if (result0 === null) {
+ pos0 = pos;
+ pos1 = pos;
+ result0 = parse__();
+ if (result0 !== null) {
+ if (input.charCodeAt(pos) === 43) {
+ result1 = "+";
+ pos++;
+ } else {
+ result1 = null;
+ if (reportFailures === 0) {
+ matchFailed("\"+\"");
+ }
+ }
+ if (result1 !== null) {
+ result2 = parse__();
+ if (result2 !== null) {
+ result0 = [result0, result1, result2];
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ if (result0 !== null) {
+ result0 = (function(offset) { return 'adjacent'; })(pos0);
+ }
+ if (result0 === null) {
+ pos = pos0;
+ }
+ if (result0 === null) {
+ pos0 = pos;
+ pos1 = pos;
+ if (input.charCodeAt(pos) === 32) {
+ result0 = " ";
+ pos++;
+ } else {
+ result0 = null;
+ if (reportFailures === 0) {
+ matchFailed("\" \"");
+ }
+ }
+ if (result0 !== null) {
+ result1 = parse__();
+ if (result1 !== null) {
+ result0 = [result0, result1];
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ if (result0 !== null) {
+ result0 = (function(offset) { return 'descendant'; })(pos0);
+ }
+ if (result0 === null) {
+ pos = pos0;
+ }
+ }
+ }
+ }
+
+ cache[cacheKey] = {
+ nextPos: pos,
+ result: result0
+ };
+ return result0;
+ }
+
+ function parse_selectors() {
+ var cacheKey = "selectors@" + pos;
+ var cachedResult = cache[cacheKey];
+ if (cachedResult) {
+ pos = cachedResult.nextPos;
+ return cachedResult.result;
+ }
+
+ var result0, result1, result2, result3, result4, result5;
+ var pos0, pos1, pos2;
+
+ pos0 = pos;
+ pos1 = pos;
+ result0 = parse_selector();
+ if (result0 !== null) {
+ result1 = [];
+ pos2 = pos;
+ result2 = parse__();
+ if (result2 !== null) {
+ if (input.charCodeAt(pos) === 44) {
+ result3 = ",";
+ pos++;
+ } else {
+ result3 = null;
+ if (reportFailures === 0) {
+ matchFailed("\",\"");
+ }
+ }
+ if (result3 !== null) {
+ result4 = parse__();
+ if (result4 !== null) {
+ result5 = parse_selector();
+ if (result5 !== null) {
+ result2 = [result2, result3, result4, result5];
+ } else {
+ result2 = null;
+ pos = pos2;
+ }
+ } else {
+ result2 = null;
+ pos = pos2;
+ }
+ } else {
+ result2 = null;
+ pos = pos2;
+ }
+ } else {
+ result2 = null;
+ pos = pos2;
+ }
+ while (result2 !== null) {
+ result1.push(result2);
+ pos2 = pos;
+ result2 = parse__();
+ if (result2 !== null) {
+ if (input.charCodeAt(pos) === 44) {
+ result3 = ",";
+ pos++;
+ } else {
+ result3 = null;
+ if (reportFailures === 0) {
+ matchFailed("\",\"");
+ }
+ }
+ if (result3 !== null) {
+ result4 = parse__();
+ if (result4 !== null) {
+ result5 = parse_selector();
+ if (result5 !== null) {
+ result2 = [result2, result3, result4, result5];
+ } else {
+ result2 = null;
+ pos = pos2;
+ }
+ } else {
+ result2 = null;
+ pos = pos2;
+ }
+ } else {
+ result2 = null;
+ pos = pos2;
+ }
+ } else {
+ result2 = null;
+ pos = pos2;
+ }
+ }
+ if (result1 !== null) {
+ result0 = [result0, result1];
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ if (result0 !== null) {
+ result0 = (function(offset, s, ss) {
+ return [s].concat(ss.map(function (s) { return s[3]; }));
+ })(pos0, result0[0], result0[1]);
+ }
+ if (result0 === null) {
+ pos = pos0;
+ }
+
+ cache[cacheKey] = {
+ nextPos: pos,
+ result: result0
+ };
+ return result0;
+ }
+
+ function parse_selector() {
+ var cacheKey = "selector@" + pos;
+ var cachedResult = cache[cacheKey];
+ if (cachedResult) {
+ pos = cachedResult.nextPos;
+ return cachedResult.result;
+ }
+
+ var result0, result1, result2, result3;
+ var pos0, pos1, pos2;
+
+ pos0 = pos;
+ pos1 = pos;
+ result0 = parse_sequence();
+ if (result0 !== null) {
+ result1 = [];
+ pos2 = pos;
+ result2 = parse_binaryOp();
+ if (result2 !== null) {
+ result3 = parse_sequence();
+ if (result3 !== null) {
+ result2 = [result2, result3];
+ } else {
+ result2 = null;
+ pos = pos2;
+ }
+ } else {
+ result2 = null;
+ pos = pos2;
+ }
+ while (result2 !== null) {
+ result1.push(result2);
+ pos2 = pos;
+ result2 = parse_binaryOp();
+ if (result2 !== null) {
+ result3 = parse_sequence();
+ if (result3 !== null) {
+ result2 = [result2, result3];
+ } else {
+ result2 = null;
+ pos = pos2;
+ }
+ } else {
+ result2 = null;
+ pos = pos2;
+ }
+ }
+ if (result1 !== null) {
+ result0 = [result0, result1];
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ if (result0 !== null) {
+ result0 = (function(offset, a, ops) {
+ return ops.reduce(function (memo, rhs) {
+ return { type: rhs[0], left: memo, right: rhs[1] };
+ }, a);
+ })(pos0, result0[0], result0[1]);
+ }
+ if (result0 === null) {
+ pos = pos0;
+ }
+
+ cache[cacheKey] = {
+ nextPos: pos,
+ result: result0
+ };
+ return result0;
+ }
+
+ function parse_sequence() {
+ var cacheKey = "sequence@" + pos;
+ var cachedResult = cache[cacheKey];
+ if (cachedResult) {
+ pos = cachedResult.nextPos;
+ return cachedResult.result;
+ }
+
+ var result0, result1, result2;
+ var pos0, pos1;
+
+ pos0 = pos;
+ pos1 = pos;
+ if (input.charCodeAt(pos) === 33) {
+ result0 = "!";
+ pos++;
+ } else {
+ result0 = null;
+ if (reportFailures === 0) {
+ matchFailed("\"!\"");
+ }
+ }
+ result0 = result0 !== null ? result0 : "";
+ if (result0 !== null) {
+ result2 = parse_atom();
+ if (result2 !== null) {
+ result1 = [];
+ while (result2 !== null) {
+ result1.push(result2);
+ result2 = parse_atom();
+ }
+ } else {
+ result1 = null;
+ }
+ if (result1 !== null) {
+ result0 = [result0, result1];
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ if (result0 !== null) {
+ result0 = (function(offset, subject, as) {
+ var b = as.length === 1 ? as[0] : { type: 'compound', selectors: as };
+ if(subject) b.subject = true;
+ return b;
+ })(pos0, result0[0], result0[1]);
+ }
+ if (result0 === null) {
+ pos = pos0;
+ }
+
+ cache[cacheKey] = {
+ nextPos: pos,
+ result: result0
+ };
+ return result0;
+ }
+
+ function parse_atom() {
+ var cacheKey = "atom@" + pos;
+ var cachedResult = cache[cacheKey];
+ if (cachedResult) {
+ pos = cachedResult.nextPos;
+ return cachedResult.result;
+ }
+
+ var result0;
+
+ result0 = parse_wildcard();
+ if (result0 === null) {
+ result0 = parse_identifier();
+ if (result0 === null) {
+ result0 = parse_attr();
+ if (result0 === null) {
+ result0 = parse_field();
+ if (result0 === null) {
+ result0 = parse_negation();
+ if (result0 === null) {
+ result0 = parse_matches();
+ if (result0 === null) {
+ result0 = parse_firstChild();
+ if (result0 === null) {
+ result0 = parse_lastChild();
+ if (result0 === null) {
+ result0 = parse_nthChild();
+ if (result0 === null) {
+ result0 = parse_nthLastChild();
+ if (result0 === null) {
+ result0 = parse_class();
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ cache[cacheKey] = {
+ nextPos: pos,
+ result: result0
+ };
+ return result0;
+ }
+
+ function parse_wildcard() {
+ var cacheKey = "wildcard@" + pos;
+ var cachedResult = cache[cacheKey];
+ if (cachedResult) {
+ pos = cachedResult.nextPos;
+ return cachedResult.result;
+ }
+
+ var result0;
+ var pos0;
+
+ pos0 = pos;
+ if (input.charCodeAt(pos) === 42) {
+ result0 = "*";
+ pos++;
+ } else {
+ result0 = null;
+ if (reportFailures === 0) {
+ matchFailed("\"*\"");
+ }
+ }
+ if (result0 !== null) {
+ result0 = (function(offset, a) { return { type: 'wildcard', value: a }; })(pos0, result0);
+ }
+ if (result0 === null) {
+ pos = pos0;
+ }
+
+ cache[cacheKey] = {
+ nextPos: pos,
+ result: result0
+ };
+ return result0;
+ }
+
+ function parse_identifier() {
+ var cacheKey = "identifier@" + pos;
+ var cachedResult = cache[cacheKey];
+ if (cachedResult) {
+ pos = cachedResult.nextPos;
+ return cachedResult.result;
+ }
+
+ var result0, result1;
+ var pos0, pos1;
+
+ pos0 = pos;
+ pos1 = pos;
+ if (input.charCodeAt(pos) === 35) {
+ result0 = "#";
+ pos++;
+ } else {
+ result0 = null;
+ if (reportFailures === 0) {
+ matchFailed("\"#\"");
+ }
+ }
+ result0 = result0 !== null ? result0 : "";
+ if (result0 !== null) {
+ result1 = parse_identifierName();
+ if (result1 !== null) {
+ result0 = [result0, result1];
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ if (result0 !== null) {
+ result0 = (function(offset, i) { return { type: 'identifier', value: i }; })(pos0, result0[1]);
+ }
+ if (result0 === null) {
+ pos = pos0;
+ }
+
+ cache[cacheKey] = {
+ nextPos: pos,
+ result: result0
+ };
+ return result0;
+ }
+
+ function parse_attr() {
+ var cacheKey = "attr@" + pos;
+ var cachedResult = cache[cacheKey];
+ if (cachedResult) {
+ pos = cachedResult.nextPos;
+ return cachedResult.result;
+ }
+
+ var result0, result1, result2, result3, result4;
+ var pos0, pos1;
+
+ pos0 = pos;
+ pos1 = pos;
+ if (input.charCodeAt(pos) === 91) {
+ result0 = "[";
+ pos++;
+ } else {
+ result0 = null;
+ if (reportFailures === 0) {
+ matchFailed("\"[\"");
+ }
+ }
+ if (result0 !== null) {
+ result1 = parse__();
+ if (result1 !== null) {
+ result2 = parse_attrValue();
+ if (result2 !== null) {
+ result3 = parse__();
+ if (result3 !== null) {
+ if (input.charCodeAt(pos) === 93) {
+ result4 = "]";
+ pos++;
+ } else {
+ result4 = null;
+ if (reportFailures === 0) {
+ matchFailed("\"]\"");
+ }
+ }
+ if (result4 !== null) {
+ result0 = [result0, result1, result2, result3, result4];
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ if (result0 !== null) {
+ result0 = (function(offset, v) { return v; })(pos0, result0[2]);
+ }
+ if (result0 === null) {
+ pos = pos0;
+ }
+
+ cache[cacheKey] = {
+ nextPos: pos,
+ result: result0
+ };
+ return result0;
+ }
+
+ function parse_attrOps() {
+ var cacheKey = "attrOps@" + pos;
+ var cachedResult = cache[cacheKey];
+ if (cachedResult) {
+ pos = cachedResult.nextPos;
+ return cachedResult.result;
+ }
+
+ var result0, result1;
+ var pos0, pos1;
+
+ pos0 = pos;
+ pos1 = pos;
+ if (/^[><!]/.test(input.charAt(pos))) {
+ result0 = input.charAt(pos);
+ pos++;
+ } else {
+ result0 = null;
+ if (reportFailures === 0) {
+ matchFailed("[><!]");
+ }
+ }
+ result0 = result0 !== null ? result0 : "";
+ if (result0 !== null) {
+ if (input.charCodeAt(pos) === 61) {
+ result1 = "=";
+ pos++;
+ } else {
+ result1 = null;
+ if (reportFailures === 0) {
+ matchFailed("\"=\"");
+ }
+ }
+ if (result1 !== null) {
+ result0 = [result0, result1];
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ if (result0 !== null) {
+ result0 = (function(offset, a) { return a + '='; })(pos0, result0[0]);
+ }
+ if (result0 === null) {
+ pos = pos0;
+ }
+ if (result0 === null) {
+ if (/^[><]/.test(input.charAt(pos))) {
+ result0 = input.charAt(pos);
+ pos++;
+ } else {
+ result0 = null;
+ if (reportFailures === 0) {
+ matchFailed("[><]");
+ }
+ }
+ }
+
+ cache[cacheKey] = {
+ nextPos: pos,
+ result: result0
+ };
+ return result0;
+ }
+
+ function parse_attrEqOps() {
+ var cacheKey = "attrEqOps@" + pos;
+ var cachedResult = cache[cacheKey];
+ if (cachedResult) {
+ pos = cachedResult.nextPos;
+ return cachedResult.result;
+ }
+
+ var result0, result1;
+ var pos0, pos1;
+
+ pos0 = pos;
+ pos1 = pos;
+ if (input.charCodeAt(pos) === 33) {
+ result0 = "!";
+ pos++;
+ } else {
+ result0 = null;
+ if (reportFailures === 0) {
+ matchFailed("\"!\"");
+ }
+ }
+ result0 = result0 !== null ? result0 : "";
+ if (result0 !== null) {
+ if (input.charCodeAt(pos) === 61) {
+ result1 = "=";
+ pos++;
+ } else {
+ result1 = null;
+ if (reportFailures === 0) {
+ matchFailed("\"=\"");
+ }
+ }
+ if (result1 !== null) {
+ result0 = [result0, result1];
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ if (result0 !== null) {
+ result0 = (function(offset, a) { return a + '='; })(pos0, result0[0]);
+ }
+ if (result0 === null) {
+ pos = pos0;
+ }
+
+ cache[cacheKey] = {
+ nextPos: pos,
+ result: result0
+ };
+ return result0;
+ }
+
+ function parse_attrName() {
+ var cacheKey = "attrName@" + pos;
+ var cachedResult = cache[cacheKey];
+ if (cachedResult) {
+ pos = cachedResult.nextPos;
+ return cachedResult.result;
+ }
+
+ var result0, result1;
+ var pos0;
+
+ pos0 = pos;
+ result1 = parse_identifierName();
+ if (result1 === null) {
+ if (input.charCodeAt(pos) === 46) {
+ result1 = ".";
+ pos++;
+ } else {
+ result1 = null;
+ if (reportFailures === 0) {
+ matchFailed("\".\"");
+ }
+ }
+ }
+ if (result1 !== null) {
+ result0 = [];
+ while (result1 !== null) {
+ result0.push(result1);
+ result1 = parse_identifierName();
+ if (result1 === null) {
+ if (input.charCodeAt(pos) === 46) {
+ result1 = ".";
+ pos++;
+ } else {
+ result1 = null;
+ if (reportFailures === 0) {
+ matchFailed("\".\"");
+ }
+ }
+ }
+ }
+ } else {
+ result0 = null;
+ }
+ if (result0 !== null) {
+ result0 = (function(offset, i) { return i.join(''); })(pos0, result0);
+ }
+ if (result0 === null) {
+ pos = pos0;
+ }
+
+ cache[cacheKey] = {
+ nextPos: pos,
+ result: result0
+ };
+ return result0;
+ }
+
+ function parse_attrValue() {
+ var cacheKey = "attrValue@" + pos;
+ var cachedResult = cache[cacheKey];
+ if (cachedResult) {
+ pos = cachedResult.nextPos;
+ return cachedResult.result;
+ }
+
+ var result0, result1, result2, result3, result4;
+ var pos0, pos1;
+
+ pos0 = pos;
+ pos1 = pos;
+ result0 = parse_attrName();
+ if (result0 !== null) {
+ result1 = parse__();
+ if (result1 !== null) {
+ result2 = parse_attrEqOps();
+ if (result2 !== null) {
+ result3 = parse__();
+ if (result3 !== null) {
+ result4 = parse_type();
+ if (result4 === null) {
+ result4 = parse_regex();
+ }
+ if (result4 !== null) {
+ result0 = [result0, result1, result2, result3, result4];
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ if (result0 !== null) {
+ result0 = (function(offset, name, op, value) {
+ return { type: 'attribute', name: name, operator: op, value: value };
+ })(pos0, result0[0], result0[2], result0[4]);
+ }
+ if (result0 === null) {
+ pos = pos0;
+ }
+ if (result0 === null) {
+ pos0 = pos;
+ pos1 = pos;
+ result0 = parse_attrName();
+ if (result0 !== null) {
+ result1 = parse__();
+ if (result1 !== null) {
+ result2 = parse_attrOps();
+ if (result2 !== null) {
+ result3 = parse__();
+ if (result3 !== null) {
+ result4 = parse_string();
+ if (result4 === null) {
+ result4 = parse_number();
+ if (result4 === null) {
+ result4 = parse_path();
+ }
+ }
+ if (result4 !== null) {
+ result0 = [result0, result1, result2, result3, result4];
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ if (result0 !== null) {
+ result0 = (function(offset, name, op, value) {
+ return { type: 'attribute', name: name, operator: op, value: value };
+ })(pos0, result0[0], result0[2], result0[4]);
+ }
+ if (result0 === null) {
+ pos = pos0;
+ }
+ if (result0 === null) {
+ pos0 = pos;
+ result0 = parse_attrName();
+ if (result0 !== null) {
+ result0 = (function(offset, name) { return { type: 'attribute', name: name }; })(pos0, result0);
+ }
+ if (result0 === null) {
+ pos = pos0;
+ }
+ }
+ }
+
+ cache[cacheKey] = {
+ nextPos: pos,
+ result: result0
+ };
+ return result0;
+ }
+
+ function parse_string() {
+ var cacheKey = "string@" + pos;
+ var cachedResult = cache[cacheKey];
+ if (cachedResult) {
+ pos = cachedResult.nextPos;
+ return cachedResult.result;
+ }
+
+ var result0, result1, result2, result3;
+ var pos0, pos1, pos2, pos3;
+
+ pos0 = pos;
+ pos1 = pos;
+ if (input.charCodeAt(pos) === 34) {
+ result0 = "\"";
+ pos++;
+ } else {
+ result0 = null;
+ if (reportFailures === 0) {
+ matchFailed("\"\\\"\"");
+ }
+ }
+ if (result0 !== null) {
+ result1 = [];
+ if (/^[^\\"]/.test(input.charAt(pos))) {
+ result2 = input.charAt(pos);
+ pos++;
+ } else {
+ result2 = null;
+ if (reportFailures === 0) {
+ matchFailed("[^\\\\\"]");
+ }
+ }
+ if (result2 === null) {
+ pos2 = pos;
+ pos3 = pos;
+ if (input.charCodeAt(pos) === 92) {
+ result2 = "\\";
+ pos++;
+ } else {
+ result2 = null;
+ if (reportFailures === 0) {
+ matchFailed("\"\\\\\"");
+ }
+ }
+ if (result2 !== null) {
+ if (input.length > pos) {
+ result3 = input.charAt(pos);
+ pos++;
+ } else {
+ result3 = null;
+ if (reportFailures === 0) {
+ matchFailed("any character");
+ }
+ }
+ if (result3 !== null) {
+ result2 = [result2, result3];
+ } else {
+ result2 = null;
+ pos = pos3;
+ }
+ } else {
+ result2 = null;
+ pos = pos3;
+ }
+ if (result2 !== null) {
+ result2 = (function(offset, a, b) { return a + b; })(pos2, result2[0], result2[1]);
+ }
+ if (result2 === null) {
+ pos = pos2;
+ }
+ }
+ while (result2 !== null) {
+ result1.push(result2);
+ if (/^[^\\"]/.test(input.charAt(pos))) {
+ result2 = input.charAt(pos);
+ pos++;
+ } else {
+ result2 = null;
+ if (reportFailures === 0) {
+ matchFailed("[^\\\\\"]");
+ }
+ }
+ if (result2 === null) {
+ pos2 = pos;
+ pos3 = pos;
+ if (input.charCodeAt(pos) === 92) {
+ result2 = "\\";
+ pos++;
+ } else {
+ result2 = null;
+ if (reportFailures === 0) {
+ matchFailed("\"\\\\\"");
+ }
+ }
+ if (result2 !== null) {
+ if (input.length > pos) {
+ result3 = input.charAt(pos);
+ pos++;
+ } else {
+ result3 = null;
+ if (reportFailures === 0) {
+ matchFailed("any character");
+ }
+ }
+ if (result3 !== null) {
+ result2 = [result2, result3];
+ } else {
+ result2 = null;
+ pos = pos3;
+ }
+ } else {
+ result2 = null;
+ pos = pos3;
+ }
+ if (result2 !== null) {
+ result2 = (function(offset, a, b) { return a + b; })(pos2, result2[0], result2[1]);
+ }
+ if (result2 === null) {
+ pos = pos2;
+ }
+ }
+ }
+ if (result1 !== null) {
+ if (input.charCodeAt(pos) === 34) {
+ result2 = "\"";
+ pos++;
+ } else {
+ result2 = null;
+ if (reportFailures === 0) {
+ matchFailed("\"\\\"\"");
+ }
+ }
+ if (result2 !== null) {
+ result0 = [result0, result1, result2];
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ if (result0 !== null) {
+ result0 = (function(offset, d) {
+ return { type: 'literal', value: strUnescape(d.join('')) };
+ })(pos0, result0[1]);
+ }
+ if (result0 === null) {
+ pos = pos0;
+ }
+ if (result0 === null) {
+ pos0 = pos;
+ pos1 = pos;
+ if (input.charCodeAt(pos) === 39) {
+ result0 = "'";
+ pos++;
+ } else {
+ result0 = null;
+ if (reportFailures === 0) {
+ matchFailed("\"'\"");
+ }
+ }
+ if (result0 !== null) {
+ result1 = [];
+ if (/^[^\\']/.test(input.charAt(pos))) {
+ result2 = input.charAt(pos);
+ pos++;
+ } else {
+ result2 = null;
+ if (reportFailures === 0) {
+ matchFailed("[^\\\\']");
+ }
+ }
+ if (result2 === null) {
+ pos2 = pos;
+ pos3 = pos;
+ if (input.charCodeAt(pos) === 92) {
+ result2 = "\\";
+ pos++;
+ } else {
+ result2 = null;
+ if (reportFailures === 0) {
+ matchFailed("\"\\\\\"");
+ }
+ }
+ if (result2 !== null) {
+ if (input.length > pos) {
+ result3 = input.charAt(pos);
+ pos++;
+ } else {
+ result3 = null;
+ if (reportFailures === 0) {
+ matchFailed("any character");
+ }
+ }
+ if (result3 !== null) {
+ result2 = [result2, result3];
+ } else {
+ result2 = null;
+ pos = pos3;
+ }
+ } else {
+ result2 = null;
+ pos = pos3;
+ }
+ if (result2 !== null) {
+ result2 = (function(offset, a, b) { return a + b; })(pos2, result2[0], result2[1]);
+ }
+ if (result2 === null) {
+ pos = pos2;
+ }
+ }
+ while (result2 !== null) {
+ result1.push(result2);
+ if (/^[^\\']/.test(input.charAt(pos))) {
+ result2 = input.charAt(pos);
+ pos++;
+ } else {
+ result2 = null;
+ if (reportFailures === 0) {
+ matchFailed("[^\\\\']");
+ }
+ }
+ if (result2 === null) {
+ pos2 = pos;
+ pos3 = pos;
+ if (input.charCodeAt(pos) === 92) {
+ result2 = "\\";
+ pos++;
+ } else {
+ result2 = null;
+ if (reportFailures === 0) {
+ matchFailed("\"\\\\\"");
+ }
+ }
+ if (result2 !== null) {
+ if (input.length > pos) {
+ result3 = input.charAt(pos);
+ pos++;
+ } else {
+ result3 = null;
+ if (reportFailures === 0) {
+ matchFailed("any character");
+ }
+ }
+ if (result3 !== null) {
+ result2 = [result2, result3];
+ } else {
+ result2 = null;
+ pos = pos3;
+ }
+ } else {
+ result2 = null;
+ pos = pos3;
+ }
+ if (result2 !== null) {
+ result2 = (function(offset, a, b) { return a + b; })(pos2, result2[0], result2[1]);
+ }
+ if (result2 === null) {
+ pos = pos2;
+ }
+ }
+ }
+ if (result1 !== null) {
+ if (input.charCodeAt(pos) === 39) {
+ result2 = "'";
+ pos++;
+ } else {
+ result2 = null;
+ if (reportFailures === 0) {
+ matchFailed("\"'\"");
+ }
+ }
+ if (result2 !== null) {
+ result0 = [result0, result1, result2];
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ if (result0 !== null) {
+ result0 = (function(offset, d) {
+ return { type: 'literal', value: strUnescape(d.join('')) };
+ })(pos0, result0[1]);
+ }
+ if (result0 === null) {
+ pos = pos0;
+ }
+ }
+
+ cache[cacheKey] = {
+ nextPos: pos,
+ result: result0
+ };
+ return result0;
+ }
+
+ function parse_number() {
+ var cacheKey = "number@" + pos;
+ var cachedResult = cache[cacheKey];
+ if (cachedResult) {
+ pos = cachedResult.nextPos;
+ return cachedResult.result;
+ }
+
+ var result0, result1, result2;
+ var pos0, pos1, pos2;
+
+ pos0 = pos;
+ pos1 = pos;
+ pos2 = pos;
+ result0 = [];
+ if (/^[0-9]/.test(input.charAt(pos))) {
+ result1 = input.charAt(pos);
+ pos++;
+ } else {
+ result1 = null;
+ if (reportFailures === 0) {
+ matchFailed("[0-9]");
+ }
+ }
+ while (result1 !== null) {
+ result0.push(result1);
+ if (/^[0-9]/.test(input.charAt(pos))) {
+ result1 = input.charAt(pos);
+ pos++;
+ } else {
+ result1 = null;
+ if (reportFailures === 0) {
+ matchFailed("[0-9]");
+ }
+ }
+ }
+ if (result0 !== null) {
+ if (input.charCodeAt(pos) === 46) {
+ result1 = ".";
+ pos++;
+ } else {
+ result1 = null;
+ if (reportFailures === 0) {
+ matchFailed("\".\"");
+ }
+ }
+ if (result1 !== null) {
+ result0 = [result0, result1];
+ } else {
+ result0 = null;
+ pos = pos2;
+ }
+ } else {
+ result0 = null;
+ pos = pos2;
+ }
+ result0 = result0 !== null ? result0 : "";
+ if (result0 !== null) {
+ if (/^[0-9]/.test(input.charAt(pos))) {
+ result2 = input.charAt(pos);
+ pos++;
+ } else {
+ result2 = null;
+ if (reportFailures === 0) {
+ matchFailed("[0-9]");
+ }
+ }
+ if (result2 !== null) {
+ result1 = [];
+ while (result2 !== null) {
+ result1.push(result2);
+ if (/^[0-9]/.test(input.charAt(pos))) {
+ result2 = input.charAt(pos);
+ pos++;
+ } else {
+ result2 = null;
+ if (reportFailures === 0) {
+ matchFailed("[0-9]");
+ }
+ }
+ }
+ } else {
+ result1 = null;
+ }
+ if (result1 !== null) {
+ result0 = [result0, result1];
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ if (result0 !== null) {
+ result0 = (function(offset, a, b) {
+ return { type: 'literal', value: parseFloat((a ? a.join('') : '') + b.join('')) };
+ })(pos0, result0[0], result0[1]);
+ }
+ if (result0 === null) {
+ pos = pos0;
+ }
+
+ cache[cacheKey] = {
+ nextPos: pos,
+ result: result0
+ };
+ return result0;
+ }
+
+ function parse_path() {
+ var cacheKey = "path@" + pos;
+ var cachedResult = cache[cacheKey];
+ if (cachedResult) {
+ pos = cachedResult.nextPos;
+ return cachedResult.result;
+ }
+
+ var result0;
+ var pos0;
+
+ pos0 = pos;
+ result0 = parse_identifierName();
+ if (result0 !== null) {
+ result0 = (function(offset, i) { return { type: 'literal', value: i }; })(pos0, result0);
+ }
+ if (result0 === null) {
+ pos = pos0;
+ }
+
+ cache[cacheKey] = {
+ nextPos: pos,
+ result: result0
+ };
+ return result0;
+ }
+
+ function parse_type() {
+ var cacheKey = "type@" + pos;
+ var cachedResult = cache[cacheKey];
+ if (cachedResult) {
+ pos = cachedResult.nextPos;
+ return cachedResult.result;
+ }
+
+ var result0, result1, result2, result3, result4;
+ var pos0, pos1;
+
+ pos0 = pos;
+ pos1 = pos;
+ if (input.substr(pos, 5) === "type(") {
+ result0 = "type(";
+ pos += 5;
+ } else {
+ result0 = null;
+ if (reportFailures === 0) {
+ matchFailed("\"type(\"");
+ }
+ }
+ if (result0 !== null) {
+ result1 = parse__();
+ if (result1 !== null) {
+ if (/^[^ )]/.test(input.charAt(pos))) {
+ result3 = input.charAt(pos);
+ pos++;
+ } else {
+ result3 = null;
+ if (reportFailures === 0) {
+ matchFailed("[^ )]");
+ }
+ }
+ if (result3 !== null) {
+ result2 = [];
+ while (result3 !== null) {
+ result2.push(result3);
+ if (/^[^ )]/.test(input.charAt(pos))) {
+ result3 = input.charAt(pos);
+ pos++;
+ } else {
+ result3 = null;
+ if (reportFailures === 0) {
+ matchFailed("[^ )]");
+ }
+ }
+ }
+ } else {
+ result2 = null;
+ }
+ if (result2 !== null) {
+ result3 = parse__();
+ if (result3 !== null) {
+ if (input.charCodeAt(pos) === 41) {
+ result4 = ")";
+ pos++;
+ } else {
+ result4 = null;
+ if (reportFailures === 0) {
+ matchFailed("\")\"");
+ }
+ }
+ if (result4 !== null) {
+ result0 = [result0, result1, result2, result3, result4];
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ if (result0 !== null) {
+ result0 = (function(offset, t) { return { type: 'type', value: t.join('') }; })(pos0, result0[2]);
+ }
+ if (result0 === null) {
+ pos = pos0;
+ }
+
+ cache[cacheKey] = {
+ nextPos: pos,
+ result: result0
+ };
+ return result0;
+ }
+
+ function parse_regex() {
+ var cacheKey = "regex@" + pos;
+ var cachedResult = cache[cacheKey];
+ if (cachedResult) {
+ pos = cachedResult.nextPos;
+ return cachedResult.result;
+ }
+
+ var result0, result1, result2;
+ var pos0, pos1;
+
+ pos0 = pos;
+ pos1 = pos;
+ if (input.charCodeAt(pos) === 47) {
+ result0 = "/";
+ pos++;
+ } else {
+ result0 = null;
+ if (reportFailures === 0) {
+ matchFailed("\"/\"");
+ }
+ }
+ if (result0 !== null) {
+ if (/^[^\/]/.test(input.charAt(pos))) {
+ result2 = input.charAt(pos);
+ pos++;
+ } else {
+ result2 = null;
+ if (reportFailures === 0) {
+ matchFailed("[^\\/]");
+ }
+ }
+ if (result2 !== null) {
+ result1 = [];
+ while (result2 !== null) {
+ result1.push(result2);
+ if (/^[^\/]/.test(input.charAt(pos))) {
+ result2 = input.charAt(pos);
+ pos++;
+ } else {
+ result2 = null;
+ if (reportFailures === 0) {
+ matchFailed("[^\\/]");
+ }
+ }
+ }
+ } else {
+ result1 = null;
+ }
+ if (result1 !== null) {
+ if (input.charCodeAt(pos) === 47) {
+ result2 = "/";
+ pos++;
+ } else {
+ result2 = null;
+ if (reportFailures === 0) {
+ matchFailed("\"/\"");
+ }
+ }
+ if (result2 !== null) {
+ result0 = [result0, result1, result2];
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ if (result0 !== null) {
+ result0 = (function(offset, d) { return { type: 'regexp', value: new RegExp(d.join('')) }; })(pos0, result0[1]);
+ }
+ if (result0 === null) {
+ pos = pos0;
+ }
+
+ cache[cacheKey] = {
+ nextPos: pos,
+ result: result0
+ };
+ return result0;
+ }
+
+ function parse_field() {
+ var cacheKey = "field@" + pos;
+ var cachedResult = cache[cacheKey];
+ if (cachedResult) {
+ pos = cachedResult.nextPos;
+ return cachedResult.result;
+ }
+
+ var result0, result1, result2, result3, result4;
+ var pos0, pos1, pos2;
+
+ pos0 = pos;
+ pos1 = pos;
+ if (input.charCodeAt(pos) === 46) {
+ result0 = ".";
+ pos++;
+ } else {
+ result0 = null;
+ if (reportFailures === 0) {
+ matchFailed("\".\"");
+ }
+ }
+ if (result0 !== null) {
+ result1 = parse_identifierName();
+ if (result1 !== null) {
+ result2 = [];
+ pos2 = pos;
+ if (input.charCodeAt(pos) === 46) {
+ result3 = ".";
+ pos++;
+ } else {
+ result3 = null;
+ if (reportFailures === 0) {
+ matchFailed("\".\"");
+ }
+ }
+ if (result3 !== null) {
+ result4 = parse_identifierName();
+ if (result4 !== null) {
+ result3 = [result3, result4];
+ } else {
+ result3 = null;
+ pos = pos2;
+ }
+ } else {
+ result3 = null;
+ pos = pos2;
+ }
+ while (result3 !== null) {
+ result2.push(result3);
+ pos2 = pos;
+ if (input.charCodeAt(pos) === 46) {
+ result3 = ".";
+ pos++;
+ } else {
+ result3 = null;
+ if (reportFailures === 0) {
+ matchFailed("\".\"");
+ }
+ }
+ if (result3 !== null) {
+ result4 = parse_identifierName();
+ if (result4 !== null) {
+ result3 = [result3, result4];
+ } else {
+ result3 = null;
+ pos = pos2;
+ }
+ } else {
+ result3 = null;
+ pos = pos2;
+ }
+ }
+ if (result2 !== null) {
+ result0 = [result0, result1, result2];
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ if (result0 !== null) {
+ result0 = (function(offset, i, is) {
+ return { type: 'field', name: is.reduce(function(memo, p){ return memo + p[0] + p[1]; }, i)};
+ })(pos0, result0[1], result0[2]);
+ }
+ if (result0 === null) {
+ pos = pos0;
+ }
+
+ cache[cacheKey] = {
+ nextPos: pos,
+ result: result0
+ };
+ return result0;
+ }
+
+ function parse_negation() {
+ var cacheKey = "negation@" + pos;
+ var cachedResult = cache[cacheKey];
+ if (cachedResult) {
+ pos = cachedResult.nextPos;
+ return cachedResult.result;
+ }
+
+ var result0, result1, result2, result3, result4;
+ var pos0, pos1;
+
+ pos0 = pos;
+ pos1 = pos;
+ if (input.substr(pos, 5) === ":not(") {
+ result0 = ":not(";
+ pos += 5;
+ } else {
+ result0 = null;
+ if (reportFailures === 0) {
+ matchFailed("\":not(\"");
+ }
+ }
+ if (result0 !== null) {
+ result1 = parse__();
+ if (result1 !== null) {
+ result2 = parse_selectors();
+ if (result2 !== null) {
+ result3 = parse__();
+ if (result3 !== null) {
+ if (input.charCodeAt(pos) === 41) {
+ result4 = ")";
+ pos++;
+ } else {
+ result4 = null;
+ if (reportFailures === 0) {
+ matchFailed("\")\"");
+ }
+ }
+ if (result4 !== null) {
+ result0 = [result0, result1, result2, result3, result4];
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ if (result0 !== null) {
+ result0 = (function(offset, ss) { return { type: 'not', selectors: ss }; })(pos0, result0[2]);
+ }
+ if (result0 === null) {
+ pos = pos0;
+ }
+
+ cache[cacheKey] = {
+ nextPos: pos,
+ result: result0
+ };
+ return result0;
+ }
+
+ function parse_matches() {
+ var cacheKey = "matches@" + pos;
+ var cachedResult = cache[cacheKey];
+ if (cachedResult) {
+ pos = cachedResult.nextPos;
+ return cachedResult.result;
+ }
+
+ var result0, result1, result2, result3, result4;
+ var pos0, pos1;
+
+ pos0 = pos;
+ pos1 = pos;
+ if (input.substr(pos, 9) === ":matches(") {
+ result0 = ":matches(";
+ pos += 9;
+ } else {
+ result0 = null;
+ if (reportFailures === 0) {
+ matchFailed("\":matches(\"");
+ }
+ }
+ if (result0 !== null) {
+ result1 = parse__();
+ if (result1 !== null) {
+ result2 = parse_selectors();
+ if (result2 !== null) {
+ result3 = parse__();
+ if (result3 !== null) {
+ if (input.charCodeAt(pos) === 41) {
+ result4 = ")";
+ pos++;
+ } else {
+ result4 = null;
+ if (reportFailures === 0) {
+ matchFailed("\")\"");
+ }
+ }
+ if (result4 !== null) {
+ result0 = [result0, result1, result2, result3, result4];
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ if (result0 !== null) {
+ result0 = (function(offset, ss) { return { type: 'matches', selectors: ss }; })(pos0, result0[2]);
+ }
+ if (result0 === null) {
+ pos = pos0;
+ }
+
+ cache[cacheKey] = {
+ nextPos: pos,
+ result: result0
+ };
+ return result0;
+ }
+
+ function parse_firstChild() {
+ var cacheKey = "firstChild@" + pos;
+ var cachedResult = cache[cacheKey];
+ if (cachedResult) {
+ pos = cachedResult.nextPos;
+ return cachedResult.result;
+ }
+
+ var result0;
+ var pos0;
+
+ pos0 = pos;
+ if (input.substr(pos, 12) === ":first-child") {
+ result0 = ":first-child";
+ pos += 12;
+ } else {
+ result0 = null;
+ if (reportFailures === 0) {
+ matchFailed("\":first-child\"");
+ }
+ }
+ if (result0 !== null) {
+ result0 = (function(offset) { return nth(1); })(pos0);
+ }
+ if (result0 === null) {
+ pos = pos0;
+ }
+
+ cache[cacheKey] = {
+ nextPos: pos,
+ result: result0
+ };
+ return result0;
+ }
+
+ function parse_lastChild() {
+ var cacheKey = "lastChild@" + pos;
+ var cachedResult = cache[cacheKey];
+ if (cachedResult) {
+ pos = cachedResult.nextPos;
+ return cachedResult.result;
+ }
+
+ var result0;
+ var pos0;
+
+ pos0 = pos;
+ if (input.substr(pos, 11) === ":last-child") {
+ result0 = ":last-child";
+ pos += 11;
+ } else {
+ result0 = null;
+ if (reportFailures === 0) {
+ matchFailed("\":last-child\"");
+ }
+ }
+ if (result0 !== null) {
+ result0 = (function(offset) { return nthLast(1); })(pos0);
+ }
+ if (result0 === null) {
+ pos = pos0;
+ }
+
+ cache[cacheKey] = {
+ nextPos: pos,
+ result: result0
+ };
+ return result0;
+ }
+
+ function parse_nthChild() {
+ var cacheKey = "nthChild@" + pos;
+ var cachedResult = cache[cacheKey];
+ if (cachedResult) {
+ pos = cachedResult.nextPos;
+ return cachedResult.result;
+ }
+
+ var result0, result1, result2, result3, result4;
+ var pos0, pos1;
+
+ pos0 = pos;
+ pos1 = pos;
+ if (input.substr(pos, 11) === ":nth-child(") {
+ result0 = ":nth-child(";
+ pos += 11;
+ } else {
+ result0 = null;
+ if (reportFailures === 0) {
+ matchFailed("\":nth-child(\"");
+ }
+ }
+ if (result0 !== null) {
+ result1 = parse__();
+ if (result1 !== null) {
+ if (/^[0-9]/.test(input.charAt(pos))) {
+ result3 = input.charAt(pos);
+ pos++;
+ } else {
+ result3 = null;
+ if (reportFailures === 0) {
+ matchFailed("[0-9]");
+ }
+ }
+ if (result3 !== null) {
+ result2 = [];
+ while (result3 !== null) {
+ result2.push(result3);
+ if (/^[0-9]/.test(input.charAt(pos))) {
+ result3 = input.charAt(pos);
+ pos++;
+ } else {
+ result3 = null;
+ if (reportFailures === 0) {
+ matchFailed("[0-9]");
+ }
+ }
+ }
+ } else {
+ result2 = null;
+ }
+ if (result2 !== null) {
+ result3 = parse__();
+ if (result3 !== null) {
+ if (input.charCodeAt(pos) === 41) {
+ result4 = ")";
+ pos++;
+ } else {
+ result4 = null;
+ if (reportFailures === 0) {
+ matchFailed("\")\"");
+ }
+ }
+ if (result4 !== null) {
+ result0 = [result0, result1, result2, result3, result4];
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ if (result0 !== null) {
+ result0 = (function(offset, n) { return nth(parseInt(n.join(''), 10)); })(pos0, result0[2]);
+ }
+ if (result0 === null) {
+ pos = pos0;
+ }
+
+ cache[cacheKey] = {
+ nextPos: pos,
+ result: result0
+ };
+ return result0;
+ }
+
+ function parse_nthLastChild() {
+ var cacheKey = "nthLastChild@" + pos;
+ var cachedResult = cache[cacheKey];
+ if (cachedResult) {
+ pos = cachedResult.nextPos;
+ return cachedResult.result;
+ }
+
+ var result0, result1, result2, result3, result4;
+ var pos0, pos1;
+
+ pos0 = pos;
+ pos1 = pos;
+ if (input.substr(pos, 16) === ":nth-last-child(") {
+ result0 = ":nth-last-child(";
+ pos += 16;
+ } else {
+ result0 = null;
+ if (reportFailures === 0) {
+ matchFailed("\":nth-last-child(\"");
+ }
+ }
+ if (result0 !== null) {
+ result1 = parse__();
+ if (result1 !== null) {
+ if (/^[0-9]/.test(input.charAt(pos))) {
+ result3 = input.charAt(pos);
+ pos++;
+ } else {
+ result3 = null;
+ if (reportFailures === 0) {
+ matchFailed("[0-9]");
+ }
+ }
+ if (result3 !== null) {
+ result2 = [];
+ while (result3 !== null) {
+ result2.push(result3);
+ if (/^[0-9]/.test(input.charAt(pos))) {
+ result3 = input.charAt(pos);
+ pos++;
+ } else {
+ result3 = null;
+ if (reportFailures === 0) {
+ matchFailed("[0-9]");
+ }
+ }
+ }
+ } else {
+ result2 = null;
+ }
+ if (result2 !== null) {
+ result3 = parse__();
+ if (result3 !== null) {
+ if (input.charCodeAt(pos) === 41) {
+ result4 = ")";
+ pos++;
+ } else {
+ result4 = null;
+ if (reportFailures === 0) {
+ matchFailed("\")\"");
+ }
+ }
+ if (result4 !== null) {
+ result0 = [result0, result1, result2, result3, result4];
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ if (result0 !== null) {
+ result0 = (function(offset, n) { return nthLast(parseInt(n.join(''), 10)); })(pos0, result0[2]);
+ }
+ if (result0 === null) {
+ pos = pos0;
+ }
+
+ cache[cacheKey] = {
+ nextPos: pos,
+ result: result0
+ };
+ return result0;
+ }
+
+ function parse_class() {
+ var cacheKey = "class@" + pos;
+ var cachedResult = cache[cacheKey];
+ if (cachedResult) {
+ pos = cachedResult.nextPos;
+ return cachedResult.result;
+ }
+
+ var result0, result1;
+ var pos0, pos1;
+
+ pos0 = pos;
+ pos1 = pos;
+ if (input.charCodeAt(pos) === 58) {
+ result0 = ":";
+ pos++;
+ } else {
+ result0 = null;
+ if (reportFailures === 0) {
+ matchFailed("\":\"");
+ }
+ }
+ if (result0 !== null) {
+ if (input.substr(pos, 9).toLowerCase() === "statement") {
+ result1 = input.substr(pos, 9);
+ pos += 9;
+ } else {
+ result1 = null;
+ if (reportFailures === 0) {
+ matchFailed("\"statement\"");
+ }
+ }
+ if (result1 === null) {
+ if (input.substr(pos, 10).toLowerCase() === "expression") {
+ result1 = input.substr(pos, 10);
+ pos += 10;
+ } else {
+ result1 = null;
+ if (reportFailures === 0) {
+ matchFailed("\"expression\"");
+ }
+ }
+ if (result1 === null) {
+ if (input.substr(pos, 11).toLowerCase() === "declaration") {
+ result1 = input.substr(pos, 11);
+ pos += 11;
+ } else {
+ result1 = null;
+ if (reportFailures === 0) {
+ matchFailed("\"declaration\"");
+ }
+ }
+ if (result1 === null) {
+ if (input.substr(pos, 8).toLowerCase() === "function") {
+ result1 = input.substr(pos, 8);
+ pos += 8;
+ } else {
+ result1 = null;
+ if (reportFailures === 0) {
+ matchFailed("\"function\"");
+ }
+ }
+ if (result1 === null) {
+ if (input.substr(pos, 7).toLowerCase() === "pattern") {
+ result1 = input.substr(pos, 7);
+ pos += 7;
+ } else {
+ result1 = null;
+ if (reportFailures === 0) {
+ matchFailed("\"pattern\"");
+ }
+ }
+ }
+ }
+ }
+ }
+ if (result1 !== null) {
+ result0 = [result0, result1];
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ } else {
+ result0 = null;
+ pos = pos1;
+ }
+ if (result0 !== null) {
+ result0 = (function(offset, c) {
+ return { type: 'class', name: c };
+ })(pos0, result0[1]);
+ }
+ if (result0 === null) {
+ pos = pos0;
+ }
+
+ cache[cacheKey] = {
+ nextPos: pos,
+ result: result0
+ };
+ return result0;
+ }
+
+
+ function cleanupExpected(expected) {
+ expected.sort();
+
+ var lastExpected = null;
+ var cleanExpected = [];
+ for (var i = 0; i < expected.length; i++) {
+ if (expected[i] !== lastExpected) {
+ cleanExpected.push(expected[i]);
+ lastExpected = expected[i];
+ }
+ }
+ return cleanExpected;
+ }
+
+ function computeErrorPosition() {
+ /*
+ * The first idea was to use |String.split| to break the input up to the
+ * error position along newlines and derive the line and column from
+ * there. However IE's |split| implementation is so broken that it was
+ * enough to prevent it.
+ */
+
+ var line = 1;
+ var column = 1;
+ var seenCR = false;
+
+ for (var i = 0; i < Math.max(pos, rightmostFailuresPos); i++) {
+ var ch = input.charAt(i);
+ if (ch === "\n") {
+ if (!seenCR) { line++; }
+ column = 1;
+ seenCR = false;
+ } else if (ch === "\r" || ch === "\u2028" || ch === "\u2029") {
+ line++;
+ column = 1;
+ seenCR = true;
+ } else {
+ column++;
+ seenCR = false;
+ }
+ }
+
+ return { line: line, column: column };
+ }
+
+
+ function nth(n) { return { type: 'nth-child', index: { type: 'literal', value: n } }; }
+ function nthLast(n) { return { type: 'nth-last-child', index: { type: 'literal', value: n } }; }
+ function strUnescape(s) {
+ return s.replace(/\\(.)/g, function(match, ch) {
+ switch(ch) {
+ case 'a': return '\a';
+ case 'b': return '\b';
+ case 'f': return '\f';
+ case 'n': return '\n';
+ case 'r': return '\r';
+ case 't': return '\t';
+ case 'v': return '\v';
+ default: return ch;
+ }
+ });
+ }
+
+
+ var result = parseFunctions[startRule]();
+
+ /*
+ * The parser is now in one of the following three states:
+ *
+ * 1. The parser successfully parsed the whole input.
+ *
+ * - |result !== null|
+ * - |pos === input.length|
+ * - |rightmostFailuresExpected| may or may not contain something
+ *
+ * 2. The parser successfully parsed only a part of the input.
+ *
+ * - |result !== null|
+ * - |pos < input.length|
+ * - |rightmostFailuresExpected| may or may not contain something
+ *
+ * 3. The parser did not successfully parse any part of the input.
+ *
+ * - |result === null|
+ * - |pos === 0|
+ * - |rightmostFailuresExpected| contains at least one failure
+ *
+ * All code following this comment (including called functions) must
+ * handle these states.
+ */
+ if (result === null || pos !== input.length) {
+ var offset = Math.max(pos, rightmostFailuresPos);
+ var found = offset < input.length ? input.charAt(offset) : null;
+ var errorPosition = computeErrorPosition();
+
+ throw new this.SyntaxError(
+ cleanupExpected(rightmostFailuresExpected),
+ found,
+ offset,
+ errorPosition.line,
+ errorPosition.column
+ );
+ }
+
+ return result;
+ },
+
+ /* Returns the parser source code. */
+ toSource: function() { return this._source; }
+ };
+
+ /* Thrown when a parser encounters a syntax error. */
+
+ result.SyntaxError = function(expected, found, offset, line, column) {
+ function buildMessage(expected, found) {
+ var expectedHumanized, foundHumanized;
+
+ switch (expected.length) {
+ case 0:
+ expectedHumanized = "end of input";
+ break;
+ case 1:
+ expectedHumanized = expected[0];
+ break;
+ default:
+ expectedHumanized = expected.slice(0, expected.length - 1).join(", ")
+ + " or "
+ + expected[expected.length - 1];
+ }
+
+ foundHumanized = found ? quote(found) : "end of input";
+
+ return "Expected " + expectedHumanized + " but " + foundHumanized + " found.";
+ }
+
+ this.name = "SyntaxError";
+ this.expected = expected;
+ this.found = found;
+ this.message = buildMessage(expected, found);
+ this.offset = offset;
+ this.line = line;
+ this.column = column;
+ };
+
+ result.SyntaxError.prototype = Error.prototype;
+
+ return result;
+})();
+if (typeof define === "function" && define.amd) { define(function(){ return result; }); } else if (typeof module !== "undefined" && module.exports) { module.exports = result; } else { this.esquery = result; }
diff --git a/tools/node_modules/eslint/node_modules/esrecurse/.babelrc b/tools/node_modules/eslint/node_modules/esrecurse/.babelrc
new file mode 100644
index 0000000000..a0765e185d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/esrecurse/.babelrc
@@ -0,0 +1,3 @@
+{
+ "presets": ["es2015"]
+}
diff --git a/tools/node_modules/eslint/node_modules/esrecurse/README.md b/tools/node_modules/eslint/node_modules/esrecurse/README.md
new file mode 100644
index 0000000000..03c2ff3025
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/esrecurse/README.md
@@ -0,0 +1,170 @@
+### Esrecurse [![Build Status](https://travis-ci.org/estools/esrecurse.svg?branch=master)](https://travis-ci.org/estools/esrecurse)
+
+Esrecurse ([esrecurse](https://github.com/estools/esrecurse)) is
+[ECMAScript](https://www.ecma-international.org/publications/standards/Ecma-262.htm)
+recursive traversing functionality.
+
+### Example Usage
+
+The following code will output all variables declared at the root of a file.
+
+```javascript
+esrecurse.visit(ast, {
+ XXXStatement: function (node) {
+ this.visit(node.left);
+ // do something...
+ this.visit(node.right);
+ }
+});
+```
+
+We can use `Visitor` instance.
+
+```javascript
+var visitor = new esrecurse.Visitor({
+ XXXStatement: function (node) {
+ this.visit(node.left);
+ // do something...
+ this.visit(node.right);
+ }
+});
+
+visitor.visit(ast);
+```
+
+We can inherit `Visitor` instance easily.
+
+```javascript
+class Derived extends esrecurse.Visitor {
+ constructor()
+ {
+ super(null);
+ }
+
+ XXXStatement(node) {
+ }
+}
+
+```javascript
+function DerivedVisitor() {
+ esrecurse.Visitor.call(/* this for constructor */ this /* visitor object automatically becomes this. */);
+}
+util.inherits(DerivedVisitor, esrecurse.Visitor);
+DerivedVisitor.prototype.XXXStatement = function (node) {
+ this.visit(node.left);
+ // do something...
+ this.visit(node.right);
+};
+```
+
+And you can invoke default visiting operation inside custom visit operation.
+
+```javascript
+function DerivedVisitor() {
+ esrecurse.Visitor.call(/* this for constructor */ this /* visitor object automatically becomes this. */);
+}
+util.inherits(DerivedVisitor, esrecurse.Visitor);
+DerivedVisitor.prototype.XXXStatement = function (node) {
+ // do something...
+ this.visitChildren(node);
+};
+```
+
+The `childVisitorKeys` option does customize the behavoir of `this.visitChildren(node)`.
+We can use user-defined node types.
+
+```javascript
+// This tree contains a user-defined `TestExpression` node.
+var tree = {
+ type: 'TestExpression',
+
+ // This 'argument' is the property containing the other **node**.
+ argument: {
+ type: 'Literal',
+ value: 20
+ },
+
+ // This 'extended' is the property not containing the other **node**.
+ extended: true
+};
+esrecurse.visit(
+ ast,
+ {
+ Literal: function (node) {
+ // do something...
+ }
+ },
+ {
+ // Extending the existing traversing rules.
+ childVisitorKeys: {
+ // TargetNodeName: [ 'keys', 'containing', 'the', 'other', '**node**' ]
+ TestExpression: ['argument']
+ }
+ }
+);
+```
+
+We can use the `fallback` option as well.
+If the `fallback` option is `"iteration"`, `esrecurse` would visit all enumerable properties of unknown nodes.
+Please note circular references cause the stack overflow. AST might have circular references in additional properties for some purpose (e.g. `node.parent`).
+
+```javascript
+esrecurse.visit(
+ ast,
+ {
+ Literal: function (node) {
+ // do something...
+ }
+ },
+ {
+ fallback: 'iteration'
+ }
+);
+```
+
+If the `fallback` option is a function, `esrecurse` calls this function to determine the enumerable properties of unknown nodes.
+Please note circular references cause the stack overflow. AST might have circular references in additional properties for some purpose (e.g. `node.parent`).
+
+```javascript
+esrecurse.visit(
+ ast,
+ {
+ Literal: function (node) {
+ // do something...
+ }
+ },
+ {
+ fallback: function (node) {
+ return Object.keys(node).filter(function(key) {
+ return key !== 'argument'
+ });
+ }
+ }
+);
+```
+
+### License
+
+Copyright (C) 2014 [Yusuke Suzuki](https://github.com/Constellation)
+ (twitter: [@Constellation](https://twitter.com/Constellation)) and other contributors.
+
+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.
+
+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 <COPYRIGHT HOLDER> 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/tools/node_modules/eslint/node_modules/esrecurse/esrecurse.js b/tools/node_modules/eslint/node_modules/esrecurse/esrecurse.js
new file mode 100644
index 0000000000..0805e67f39
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/esrecurse/esrecurse.js
@@ -0,0 +1,135 @@
+/*
+ Copyright (C) 2014 Yusuke Suzuki <utatane.tea@gmail.com>
+
+ 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.
+
+ 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 <COPYRIGHT HOLDER> 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.
+*/
+(function () {
+ 'use strict';
+
+ var assign,
+ estraverse,
+ isArray,
+ objectKeys;
+
+ assign = require('object-assign');
+ estraverse = require('estraverse');
+
+ isArray = Array.isArray || function isArray(array) {
+ return Object.prototype.toString.call(array) === '[object Array]';
+ };
+
+ objectKeys = Object.keys || function (o) {
+ var keys = [], key;
+ for (key in o) {
+ keys.push(key);
+ }
+ return keys;
+ };
+
+ function isNode(node) {
+ if (node == null) {
+ return false;
+ }
+ return typeof node === 'object' && typeof node.type === 'string';
+ }
+
+ function isProperty(nodeType, key) {
+ return (nodeType === estraverse.Syntax.ObjectExpression || nodeType === estraverse.Syntax.ObjectPattern) && key === 'properties';
+ }
+
+ function Visitor(visitor, options) {
+ options = options || {};
+
+ this.__visitor = visitor || this;
+ this.__childVisitorKeys = options.childVisitorKeys
+ ? assign({}, estraverse.VisitorKeys, options.childVisitorKeys)
+ : estraverse.VisitorKeys;
+ if (options.fallback === 'iteration') {
+ this.__fallback = objectKeys;
+ } else if (typeof options.fallback === 'function') {
+ this.__fallback = options.fallback;
+ }
+ }
+
+ /* Default method for visiting children.
+ * When you need to call default visiting operation inside custom visiting
+ * operation, you can use it with `this.visitChildren(node)`.
+ */
+ Visitor.prototype.visitChildren = function (node) {
+ var type, children, i, iz, j, jz, child;
+
+ if (node == null) {
+ return;
+ }
+
+ type = node.type || estraverse.Syntax.Property;
+
+ children = this.__childVisitorKeys[type];
+ if (!children) {
+ if (this.__fallback) {
+ children = this.__fallback(node);
+ } else {
+ throw new Error('Unknown node type ' + type + '.');
+ }
+ }
+
+ for (i = 0, iz = children.length; i < iz; ++i) {
+ child = node[children[i]];
+ if (child) {
+ if (isArray(child)) {
+ for (j = 0, jz = child.length; j < jz; ++j) {
+ if (child[j]) {
+ if (isNode(child[j]) || isProperty(type, children[i])) {
+ this.visit(child[j]);
+ }
+ }
+ }
+ } else if (isNode(child)) {
+ this.visit(child);
+ }
+ }
+ }
+ };
+
+ /* Dispatching node. */
+ Visitor.prototype.visit = function (node) {
+ var type;
+
+ if (node == null) {
+ return;
+ }
+
+ type = node.type || estraverse.Syntax.Property;
+ if (this.__visitor[type]) {
+ this.__visitor[type].call(this, node);
+ return;
+ }
+ this.visitChildren(node);
+ };
+
+ exports.version = require('./package.json').version;
+ exports.Visitor = Visitor;
+ exports.visit = function (node, visitor, options) {
+ var v = new Visitor(visitor, options);
+ v.visit(node);
+ };
+}());
+/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/node_modules/eslint/node_modules/esrecurse/package-lock.json b/tools/node_modules/eslint/node_modules/esrecurse/package-lock.json
new file mode 100644
index 0000000000..8faf2d522d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/esrecurse/package-lock.json
@@ -0,0 +1,4322 @@
+{
+ "name": "esrecurse",
+ "version": "4.1.0",
+ "lockfileVersion": 1,
+ "dependencies": {
+ "acorn": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz",
+ "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=",
+ "dev": true
+ },
+ "acorn-jsx": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz",
+ "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=",
+ "dev": true
+ },
+ "align-text": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz",
+ "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=",
+ "dev": true
+ },
+ "amdefine": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz",
+ "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=",
+ "dev": true
+ },
+ "ansi-cyan": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/ansi-cyan/-/ansi-cyan-0.1.1.tgz",
+ "integrity": "sha1-U4rlKK+JgvKK4w2G8vF0VtJgmHM=",
+ "dev": true
+ },
+ "ansi-escapes": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz",
+ "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=",
+ "dev": true
+ },
+ "ansi-red": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/ansi-red/-/ansi-red-0.1.1.tgz",
+ "integrity": "sha1-jGOPnRCAgAo1PJwoyKgcpHBdlGw=",
+ "dev": true
+ },
+ "ansi-regex": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
+ "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
+ "dev": true
+ },
+ "ansi-styles": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
+ "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
+ "dev": true
+ },
+ "ansi-wrap": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz",
+ "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=",
+ "dev": true
+ },
+ "any-shell-escape": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/any-shell-escape/-/any-shell-escape-0.1.1.tgz",
+ "integrity": "sha1-1Vq5ciRMcaml4asIefML8RCAaVk=",
+ "dev": true
+ },
+ "anymatch": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.0.tgz",
+ "integrity": "sha1-o+Uvo5FoyCX/V7AkgSbOWo/5VQc=",
+ "dev": true,
+ "optional": true
+ },
+ "archy": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz",
+ "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=",
+ "dev": true
+ },
+ "argparse": {
+ "version": "1.0.9",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz",
+ "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=",
+ "dev": true
+ },
+ "arr-diff": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz",
+ "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=",
+ "dev": true
+ },
+ "arr-flatten": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.0.3.tgz",
+ "integrity": "sha1-onTthawIhJtr14R8RYB0XcUa37E=",
+ "dev": true
+ },
+ "arr-union": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-2.1.0.tgz",
+ "integrity": "sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0=",
+ "dev": true
+ },
+ "array-differ": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz",
+ "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=",
+ "dev": true
+ },
+ "array-each": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz",
+ "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=",
+ "dev": true
+ },
+ "array-find-index": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz",
+ "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=",
+ "dev": true
+ },
+ "array-slice": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.0.0.tgz",
+ "integrity": "sha1-5zA08A3MH0CHYAj9IP6ud71LfC8=",
+ "dev": true
+ },
+ "array-union": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz",
+ "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=",
+ "dev": true
+ },
+ "array-uniq": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz",
+ "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=",
+ "dev": true
+ },
+ "array-unique": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz",
+ "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=",
+ "dev": true
+ },
+ "arrify": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
+ "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=",
+ "dev": true
+ },
+ "assertion-error": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.0.2.tgz",
+ "integrity": "sha1-E8pRXYYgbaC6xm6DTdOX2HWBCUw=",
+ "dev": true
+ },
+ "async": {
+ "version": "1.5.2",
+ "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
+ "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=",
+ "dev": true
+ },
+ "async-each": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz",
+ "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=",
+ "dev": true,
+ "optional": true
+ },
+ "babel-cli": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-cli/-/babel-cli-6.24.1.tgz",
+ "integrity": "sha1-IHzXBbumFImy6kG1MSNBz2rKIoM=",
+ "dev": true,
+ "dependencies": {
+ "glob": {
+ "version": "7.1.2",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
+ "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
+ "dev": true
+ },
+ "lodash": {
+ "version": "4.17.4",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
+ "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=",
+ "dev": true
+ },
+ "minimatch": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
+ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
+ "dev": true
+ },
+ "source-map": {
+ "version": "0.5.6",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz",
+ "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=",
+ "dev": true
+ }
+ }
+ },
+ "babel-code-frame": {
+ "version": "6.22.0",
+ "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.22.0.tgz",
+ "integrity": "sha1-AnYgvuVnqIwyVhV05/0IAdMxGOQ=",
+ "dev": true
+ },
+ "babel-core": {
+ "version": "6.25.0",
+ "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.25.0.tgz",
+ "integrity": "sha1-fdQrBGPHQunVKW3rPsZ6kyLa1yk=",
+ "dev": true,
+ "dependencies": {
+ "lodash": {
+ "version": "4.17.4",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
+ "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=",
+ "dev": true
+ },
+ "minimatch": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
+ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
+ "dev": true
+ },
+ "source-map": {
+ "version": "0.5.6",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz",
+ "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=",
+ "dev": true
+ }
+ }
+ },
+ "babel-generator": {
+ "version": "6.25.0",
+ "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.25.0.tgz",
+ "integrity": "sha1-M6GvcNXyiQrrRlpKd5PB32qeqfw=",
+ "dev": true,
+ "dependencies": {
+ "jsesc": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz",
+ "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=",
+ "dev": true
+ },
+ "lodash": {
+ "version": "4.17.4",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
+ "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=",
+ "dev": true
+ },
+ "source-map": {
+ "version": "0.5.6",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz",
+ "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=",
+ "dev": true
+ }
+ }
+ },
+ "babel-helper-call-delegate": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz",
+ "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=",
+ "dev": true
+ },
+ "babel-helper-define-map": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.24.1.tgz",
+ "integrity": "sha1-epdH8ljYlH0y1RX2qhx70CIEoIA=",
+ "dev": true,
+ "dependencies": {
+ "lodash": {
+ "version": "4.17.4",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
+ "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=",
+ "dev": true
+ }
+ }
+ },
+ "babel-helper-function-name": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz",
+ "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=",
+ "dev": true
+ },
+ "babel-helper-get-function-arity": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz",
+ "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=",
+ "dev": true
+ },
+ "babel-helper-hoist-variables": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz",
+ "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=",
+ "dev": true
+ },
+ "babel-helper-optimise-call-expression": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz",
+ "integrity": "sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=",
+ "dev": true
+ },
+ "babel-helper-regex": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.24.1.tgz",
+ "integrity": "sha1-024i+rEAjXnYhkjjIRaGgShFbOg=",
+ "dev": true,
+ "dependencies": {
+ "lodash": {
+ "version": "4.17.4",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
+ "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=",
+ "dev": true
+ }
+ }
+ },
+ "babel-helper-replace-supers": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz",
+ "integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=",
+ "dev": true
+ },
+ "babel-helpers": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz",
+ "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=",
+ "dev": true
+ },
+ "babel-messages": {
+ "version": "6.23.0",
+ "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz",
+ "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=",
+ "dev": true
+ },
+ "babel-plugin-check-es2015-constants": {
+ "version": "6.22.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz",
+ "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-arrow-functions": {
+ "version": "6.22.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz",
+ "integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-block-scoped-functions": {
+ "version": "6.22.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz",
+ "integrity": "sha1-u8UbSflk1wy42OC5ToICRs46YUE=",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-block-scoping": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.24.1.tgz",
+ "integrity": "sha1-dsKV3DpHQbFmWt/TFnIV3P8ypXY=",
+ "dev": true,
+ "dependencies": {
+ "lodash": {
+ "version": "4.17.4",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
+ "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=",
+ "dev": true
+ }
+ }
+ },
+ "babel-plugin-transform-es2015-classes": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz",
+ "integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-computed-properties": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz",
+ "integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-destructuring": {
+ "version": "6.23.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz",
+ "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-duplicate-keys": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz",
+ "integrity": "sha1-c+s9MQypaePvnskcU3QabxV2Qj4=",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-for-of": {
+ "version": "6.23.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz",
+ "integrity": "sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-function-name": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz",
+ "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-literals": {
+ "version": "6.22.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz",
+ "integrity": "sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-modules-amd": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz",
+ "integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-modules-commonjs": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.24.1.tgz",
+ "integrity": "sha1-0+MQtA72ZKNmIiAAl8bUQCmPK/4=",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-modules-systemjs": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz",
+ "integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-modules-umd": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz",
+ "integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-object-super": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz",
+ "integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-parameters": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz",
+ "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-shorthand-properties": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz",
+ "integrity": "sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-spread": {
+ "version": "6.22.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz",
+ "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-sticky-regex": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz",
+ "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-template-literals": {
+ "version": "6.22.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz",
+ "integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-typeof-symbol": {
+ "version": "6.23.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz",
+ "integrity": "sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-unicode-regex": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz",
+ "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=",
+ "dev": true
+ },
+ "babel-plugin-transform-regenerator": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.24.1.tgz",
+ "integrity": "sha1-uNowWtQ8PJm0hI5P5AN7dw0jxBg=",
+ "dev": true
+ },
+ "babel-plugin-transform-strict-mode": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz",
+ "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=",
+ "dev": true
+ },
+ "babel-polyfill": {
+ "version": "6.23.0",
+ "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.23.0.tgz",
+ "integrity": "sha1-g2TKYt+Or7gwSZ9pkXdGbDsDSZ0=",
+ "dev": true
+ },
+ "babel-preset-es2015": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz",
+ "integrity": "sha1-1EBQ1rwsn+6nAqrzjXJ6AhBTiTk=",
+ "dev": true
+ },
+ "babel-register": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.24.1.tgz",
+ "integrity": "sha1-fhDhOi9xBlvfrVoXh7pFvKbe118=",
+ "dev": true,
+ "dependencies": {
+ "lodash": {
+ "version": "4.17.4",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
+ "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=",
+ "dev": true
+ }
+ }
+ },
+ "babel-runtime": {
+ "version": "6.23.0",
+ "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.23.0.tgz",
+ "integrity": "sha1-CpSJ8UTecO+zzkMArM2zKeL8VDs=",
+ "dev": true
+ },
+ "babel-template": {
+ "version": "6.25.0",
+ "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.25.0.tgz",
+ "integrity": "sha1-ZlJBFmt8KqTGGdceGSlpVSsQwHE=",
+ "dev": true,
+ "dependencies": {
+ "lodash": {
+ "version": "4.17.4",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
+ "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=",
+ "dev": true
+ }
+ }
+ },
+ "babel-traverse": {
+ "version": "6.25.0",
+ "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.25.0.tgz",
+ "integrity": "sha1-IldJfi/NGbie3BPEyROB+VEklvE=",
+ "dev": true,
+ "dependencies": {
+ "globals": {
+ "version": "9.18.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz",
+ "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==",
+ "dev": true
+ },
+ "lodash": {
+ "version": "4.17.4",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
+ "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=",
+ "dev": true
+ }
+ }
+ },
+ "babel-types": {
+ "version": "6.25.0",
+ "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.25.0.tgz",
+ "integrity": "sha1-cK+ySNVmDl0Y+BHZHIMDtUE0oY4=",
+ "dev": true,
+ "dependencies": {
+ "lodash": {
+ "version": "4.17.4",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
+ "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=",
+ "dev": true
+ }
+ }
+ },
+ "babylon": {
+ "version": "6.17.4",
+ "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.17.4.tgz",
+ "integrity": "sha512-kChlV+0SXkjE0vUn9OZ7pBMWRFd8uq3mZe8x1K6jhuNcAFAtEnjchFAqB+dYEXKyd+JpT6eppRR78QAr5gTsUw==",
+ "dev": true
+ },
+ "balanced-match": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
+ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
+ "dev": true
+ },
+ "beeper": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz",
+ "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=",
+ "dev": true
+ },
+ "binary-extensions": {
+ "version": "1.8.0",
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.8.0.tgz",
+ "integrity": "sha1-SOyNFt9Dd+rl+liEaCSAr02Vx3Q=",
+ "dev": true,
+ "optional": true
+ },
+ "bluebird": {
+ "version": "3.4.7",
+ "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.4.7.tgz",
+ "integrity": "sha1-9y12C+Cbf3bQjtj66Ysomo0F+rM=",
+ "dev": true
+ },
+ "brace-expansion": {
+ "version": "1.1.8",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz",
+ "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=",
+ "dev": true
+ },
+ "braces": {
+ "version": "1.8.5",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz",
+ "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=",
+ "dev": true
+ },
+ "bufferstreams": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/bufferstreams/-/bufferstreams-1.1.1.tgz",
+ "integrity": "sha1-AWE3MGCsWYjv+ZBYcxEU9uGV1R4=",
+ "dev": true,
+ "dependencies": {
+ "isarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
+ "dev": true
+ },
+ "readable-stream": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.0.tgz",
+ "integrity": "sha512-c7KMXGd4b48nN3OJ1U9qOsn6pXNzf6kLd3kdZCkg2sxAcoiufInqF0XckwEnlrcwuaYwonlNK8GQUIOC/WC7sg==",
+ "dev": true
+ },
+ "string_decoder": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.2.tgz",
+ "integrity": "sha1-sp4fThEl+pehA4K4pTNze3SR4Xk=",
+ "dev": true,
+ "dependencies": {
+ "safe-buffer": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz",
+ "integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c=",
+ "dev": true
+ }
+ }
+ }
+ }
+ },
+ "builtin-modules": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz",
+ "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=",
+ "dev": true
+ },
+ "camelcase": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz",
+ "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=",
+ "dev": true
+ },
+ "camelcase-keys": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz",
+ "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=",
+ "dev": true
+ },
+ "catharsis": {
+ "version": "0.8.8",
+ "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.8.8.tgz",
+ "integrity": "sha1-aTR59DqsVJ2Aa9c+kkzQ2USVGgY=",
+ "dev": true
+ },
+ "center-align": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz",
+ "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=",
+ "dev": true,
+ "optional": true
+ },
+ "chai": {
+ "version": "3.5.0",
+ "resolved": "https://registry.npmjs.org/chai/-/chai-3.5.0.tgz",
+ "integrity": "sha1-TQJjewZ/6Vi9v906QOxW/vc3Mkc=",
+ "dev": true
+ },
+ "chalk": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
+ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
+ "dev": true
+ },
+ "chokidar": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz",
+ "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=",
+ "dev": true,
+ "optional": true
+ },
+ "circular-json": {
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.1.tgz",
+ "integrity": "sha1-vos2rvzN6LPKeqLWr8B6NyQsDS0=",
+ "dev": true
+ },
+ "cli-cursor": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz",
+ "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=",
+ "dev": true
+ },
+ "cli-width": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-1.1.1.tgz",
+ "integrity": "sha1-pNKT72frt7iNSk1CwMzwDE0eNm0=",
+ "dev": true
+ },
+ "cliui": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz",
+ "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=",
+ "dev": true,
+ "optional": true,
+ "dependencies": {
+ "wordwrap": {
+ "version": "0.0.2",
+ "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz",
+ "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=",
+ "dev": true,
+ "optional": true
+ }
+ }
+ },
+ "clone": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz",
+ "integrity": "sha1-Jgt6meux7f4kdTgXX3gyQ8sZ0Uk=",
+ "dev": true
+ },
+ "clone-stats": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz",
+ "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=",
+ "dev": true
+ },
+ "code-point-at": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
+ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
+ "dev": true
+ },
+ "coffee-script": {
+ "version": "1.12.6",
+ "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.12.6.tgz",
+ "integrity": "sha1-KFo/cRVokGUGTWv570Vy22ZpXL8=",
+ "dev": true
+ },
+ "commander": {
+ "version": "2.9.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz",
+ "integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=",
+ "dev": true
+ },
+ "concat-map": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
+ "dev": true
+ },
+ "concat-stream": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz",
+ "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=",
+ "dev": true,
+ "dependencies": {
+ "isarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
+ "dev": true
+ },
+ "readable-stream": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.0.tgz",
+ "integrity": "sha512-c7KMXGd4b48nN3OJ1U9qOsn6pXNzf6kLd3kdZCkg2sxAcoiufInqF0XckwEnlrcwuaYwonlNK8GQUIOC/WC7sg==",
+ "dev": true
+ },
+ "string_decoder": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.2.tgz",
+ "integrity": "sha1-sp4fThEl+pehA4K4pTNze3SR4Xk=",
+ "dev": true,
+ "dependencies": {
+ "safe-buffer": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz",
+ "integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c=",
+ "dev": true
+ }
+ }
+ }
+ }
+ },
+ "convert-source-map": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.0.tgz",
+ "integrity": "sha1-ms1whRxtXf3ZPZKC5e35SgP/RrU=",
+ "dev": true
+ },
+ "core-js": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.4.1.tgz",
+ "integrity": "sha1-TekR5mew6ukSTjQlS1OupvxhjT4=",
+ "dev": true
+ },
+ "core-util-is": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
+ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
+ "dev": true
+ },
+ "currently-unhandled": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz",
+ "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=",
+ "dev": true
+ },
+ "d": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz",
+ "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=",
+ "dev": true
+ },
+ "dateformat": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.0.0.tgz",
+ "integrity": "sha1-J0Pjq7XD/CRi5SfcpEXgTp9N7hc=",
+ "dev": true
+ },
+ "debug": {
+ "version": "2.6.8",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz",
+ "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=",
+ "dev": true
+ },
+ "decamelize": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
+ "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
+ "dev": true
+ },
+ "deep-eql": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz",
+ "integrity": "sha1-71WKyrjeJSBs1xOQbXTlaTDrafI=",
+ "dev": true,
+ "dependencies": {
+ "type-detect": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-0.1.1.tgz",
+ "integrity": "sha1-C6XsKohWQORw6k6FBZcZANrFiCI=",
+ "dev": true
+ }
+ }
+ },
+ "deep-is": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz",
+ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=",
+ "dev": true
+ },
+ "defaults": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz",
+ "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=",
+ "dev": true
+ },
+ "del": {
+ "version": "2.2.2",
+ "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz",
+ "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=",
+ "dev": true
+ },
+ "deprecated": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/deprecated/-/deprecated-0.0.1.tgz",
+ "integrity": "sha1-+cmvVGSvoeepcUWKi97yqpTVuxk=",
+ "dev": true
+ },
+ "detect-file": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-0.1.0.tgz",
+ "integrity": "sha1-STXe39lIhkjgBrASlWbpOGcR6mM=",
+ "dev": true
+ },
+ "detect-indent": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz",
+ "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=",
+ "dev": true
+ },
+ "diff": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/diff/-/diff-1.4.0.tgz",
+ "integrity": "sha1-fyjS657nsVqX79ic5j3P2qPMur8=",
+ "dev": true
+ },
+ "doctrine": {
+ "version": "0.7.2",
+ "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-0.7.2.tgz",
+ "integrity": "sha1-fLhgNZujvpDgQLJrcpzkv6ZUxSM=",
+ "dev": true,
+ "dependencies": {
+ "esutils": {
+ "version": "1.1.6",
+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-1.1.6.tgz",
+ "integrity": "sha1-wBzKqa5LiXxtDD4hCuUvPHqEQ3U=",
+ "dev": true
+ }
+ }
+ },
+ "dot-object": {
+ "version": "1.5.4",
+ "resolved": "https://registry.npmjs.org/dot-object/-/dot-object-1.5.4.tgz",
+ "integrity": "sha1-ryuN8mJrZQIM1nKdRsMxvDDTtIc=",
+ "dev": true,
+ "dependencies": {
+ "glob": {
+ "version": "7.1.2",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
+ "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
+ "dev": true
+ },
+ "minimatch": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
+ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
+ "dev": true
+ }
+ }
+ },
+ "duplexer2": {
+ "version": "0.0.2",
+ "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz",
+ "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=",
+ "dev": true
+ },
+ "end-of-stream": {
+ "version": "0.1.5",
+ "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-0.1.5.tgz",
+ "integrity": "sha1-jhdyBsPICDfYVjLouTWd/osvbq8=",
+ "dev": true
+ },
+ "error-ex": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz",
+ "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=",
+ "dev": true
+ },
+ "es5-ext": {
+ "version": "0.10.23",
+ "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.23.tgz",
+ "integrity": "sha1-dXi1G+l0IHpUh4IbVlOMIk5Oezg=",
+ "dev": true
+ },
+ "es6-iterator": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.1.tgz",
+ "integrity": "sha1-jjGcnwRTv1ddN0lAplWSDlnKVRI=",
+ "dev": true
+ },
+ "es6-map": {
+ "version": "0.1.5",
+ "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz",
+ "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=",
+ "dev": true
+ },
+ "es6-set": {
+ "version": "0.1.5",
+ "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz",
+ "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=",
+ "dev": true
+ },
+ "es6-symbol": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz",
+ "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=",
+ "dev": true
+ },
+ "es6-weak-map": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz",
+ "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=",
+ "dev": true
+ },
+ "escape-string-regexp": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
+ "dev": true
+ },
+ "escope": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz",
+ "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=",
+ "dev": true
+ },
+ "eslint": {
+ "version": "1.10.3",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-1.10.3.tgz",
+ "integrity": "sha1-+xmpGxPBWAgrvKKUsX2Xm8g1Ogo=",
+ "dev": true,
+ "dependencies": {
+ "espree": {
+ "version": "2.2.5",
+ "resolved": "https://registry.npmjs.org/espree/-/espree-2.2.5.tgz",
+ "integrity": "sha1-32kbkxCIlAKuspzAZnCMVmkLhUs=",
+ "dev": true
+ },
+ "glob": {
+ "version": "5.0.15",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz",
+ "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=",
+ "dev": true
+ },
+ "minimatch": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
+ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
+ "dev": true
+ },
+ "user-home": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz",
+ "integrity": "sha1-nHC/2Babwdy/SGBODwS4tJzenp8=",
+ "dev": true
+ }
+ }
+ },
+ "espree": {
+ "version": "3.1.7",
+ "resolved": "https://registry.npmjs.org/espree/-/espree-3.1.7.tgz",
+ "integrity": "sha1-/V3ux2qXpRIKnNOnyxF3oJI7EdI=",
+ "dev": true
+ },
+ "esprima": {
+ "version": "2.7.3",
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz",
+ "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=",
+ "dev": true
+ },
+ "esrecurse": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.1.0.tgz",
+ "integrity": "sha1-RxO2U2rffyrE8yfVWed1a/9kgiA=",
+ "dev": true,
+ "dependencies": {
+ "estraverse": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.1.1.tgz",
+ "integrity": "sha1-9srKcokzqFDvkGYdDheYK6RxEaI=",
+ "dev": true
+ }
+ }
+ },
+ "estraverse": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz",
+ "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM="
+ },
+ "estraverse-fb": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/estraverse-fb/-/estraverse-fb-1.3.1.tgz",
+ "integrity": "sha1-Fg51qA5gWwjOiUvM4v4+Qpq/kr8=",
+ "dev": true
+ },
+ "esutils": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
+ "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
+ "dev": true
+ },
+ "event-emitter": {
+ "version": "0.3.5",
+ "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz",
+ "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=",
+ "dev": true
+ },
+ "exit-hook": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz",
+ "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=",
+ "dev": true
+ },
+ "expand-brackets": {
+ "version": "0.1.5",
+ "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz",
+ "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=",
+ "dev": true
+ },
+ "expand-range": {
+ "version": "1.8.2",
+ "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz",
+ "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=",
+ "dev": true
+ },
+ "expand-tilde": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-1.2.2.tgz",
+ "integrity": "sha1-C4HrqJflo9MdHD0QL48BRB5VlEk=",
+ "dev": true
+ },
+ "extend": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz",
+ "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=",
+ "dev": true
+ },
+ "extend-shallow": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-1.1.4.tgz",
+ "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=",
+ "dev": true,
+ "dependencies": {
+ "kind-of": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz",
+ "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=",
+ "dev": true
+ }
+ }
+ },
+ "extglob": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz",
+ "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=",
+ "dev": true
+ },
+ "fancy-log": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.0.tgz",
+ "integrity": "sha1-Rb4X0Cu5kX1gzP/UmVyZnmyMmUg=",
+ "dev": true
+ },
+ "fast-levenshtein": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.0.7.tgz",
+ "integrity": "sha1-AXjc3uAjuSkFGTrwlZ6KdjnP3Lk=",
+ "dev": true
+ },
+ "figures": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz",
+ "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=",
+ "dev": true
+ },
+ "file-entry-cache": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-1.3.1.tgz",
+ "integrity": "sha1-RMYepgeuS+nBQC9B9EJwy/4zT/g=",
+ "dev": true
+ },
+ "filename-regex": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz",
+ "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=",
+ "dev": true
+ },
+ "fill-range": {
+ "version": "2.2.3",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz",
+ "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=",
+ "dev": true
+ },
+ "find-index": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz",
+ "integrity": "sha1-Z101iyyjiS15Whq0cjL4tuLg3eQ=",
+ "dev": true
+ },
+ "find-up": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
+ "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=",
+ "dev": true
+ },
+ "findup-sync": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.4.3.tgz",
+ "integrity": "sha1-QAQ5Kee8YK3wt/SCfExudaDeyhI=",
+ "dev": true
+ },
+ "fined": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/fined/-/fined-1.1.0.tgz",
+ "integrity": "sha1-s33IRLdqL15wgeiE98CuNE8VNHY=",
+ "dev": true,
+ "dependencies": {
+ "expand-tilde": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz",
+ "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=",
+ "dev": true
+ }
+ }
+ },
+ "first-chunk-stream": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz",
+ "integrity": "sha1-Wb+1DNkF9g18OUzT2ayqtOatk04=",
+ "dev": true
+ },
+ "flagged-respawn": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-0.3.2.tgz",
+ "integrity": "sha1-/xke3c1wiKZ1smEP/8l2vpuAdLU=",
+ "dev": true
+ },
+ "flat-cache": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.2.2.tgz",
+ "integrity": "sha1-+oZxTnLCHbiGAXYezy9VXRq8a5Y=",
+ "dev": true,
+ "dependencies": {
+ "graceful-fs": {
+ "version": "4.1.11",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
+ "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=",
+ "dev": true
+ }
+ }
+ },
+ "for-in": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
+ "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=",
+ "dev": true
+ },
+ "for-own": {
+ "version": "0.1.5",
+ "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz",
+ "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=",
+ "dev": true
+ },
+ "fs-exists-sync": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz",
+ "integrity": "sha1-mC1ok6+RjnLQjeyehnP/K1qNat0=",
+ "dev": true
+ },
+ "fs-readdir-recursive": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.0.0.tgz",
+ "integrity": "sha1-jNF0XItPiinIyuw5JHaSG6GV9WA=",
+ "dev": true
+ },
+ "fs.realpath": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
+ "dev": true
+ },
+ "fsevents": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.2.tgz",
+ "integrity": "sha512-Sn44E5wQW4bTHXvQmvSHwqbuiXtduD6Rrjm2ZtUEGbyrig+nUH3t/QD4M4/ZXViY556TBpRgZkHLDx3JxPwxiw==",
+ "dev": true,
+ "optional": true,
+ "dependencies": {
+ "abbrev": {
+ "version": "1.1.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "ajv": {
+ "version": "4.11.8",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "ansi-regex": {
+ "version": "2.1.1",
+ "bundled": true,
+ "dev": true
+ },
+ "aproba": {
+ "version": "1.1.1",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "are-we-there-yet": {
+ "version": "1.1.4",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "asn1": {
+ "version": "0.2.3",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "assert-plus": {
+ "version": "0.2.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "asynckit": {
+ "version": "0.4.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "aws-sign2": {
+ "version": "0.6.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "aws4": {
+ "version": "1.6.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "balanced-match": {
+ "version": "0.4.2",
+ "bundled": true,
+ "dev": true
+ },
+ "bcrypt-pbkdf": {
+ "version": "1.0.1",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "block-stream": {
+ "version": "0.0.9",
+ "bundled": true,
+ "dev": true
+ },
+ "boom": {
+ "version": "2.10.1",
+ "bundled": true,
+ "dev": true
+ },
+ "brace-expansion": {
+ "version": "1.1.7",
+ "bundled": true,
+ "dev": true
+ },
+ "buffer-shims": {
+ "version": "1.0.0",
+ "bundled": true,
+ "dev": true
+ },
+ "caseless": {
+ "version": "0.12.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "co": {
+ "version": "4.6.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "code-point-at": {
+ "version": "1.1.0",
+ "bundled": true,
+ "dev": true
+ },
+ "combined-stream": {
+ "version": "1.0.5",
+ "bundled": true,
+ "dev": true
+ },
+ "concat-map": {
+ "version": "0.0.1",
+ "bundled": true,
+ "dev": true
+ },
+ "console-control-strings": {
+ "version": "1.1.0",
+ "bundled": true,
+ "dev": true
+ },
+ "core-util-is": {
+ "version": "1.0.2",
+ "bundled": true,
+ "dev": true
+ },
+ "cryptiles": {
+ "version": "2.0.5",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "dashdash": {
+ "version": "1.14.1",
+ "bundled": true,
+ "dev": true,
+ "optional": true,
+ "dependencies": {
+ "assert-plus": {
+ "version": "1.0.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ }
+ }
+ },
+ "debug": {
+ "version": "2.6.8",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "deep-extend": {
+ "version": "0.4.2",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "delayed-stream": {
+ "version": "1.0.0",
+ "bundled": true,
+ "dev": true
+ },
+ "delegates": {
+ "version": "1.0.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "ecc-jsbn": {
+ "version": "0.1.1",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "extend": {
+ "version": "3.0.1",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "extsprintf": {
+ "version": "1.0.2",
+ "bundled": true,
+ "dev": true
+ },
+ "forever-agent": {
+ "version": "0.6.1",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "form-data": {
+ "version": "2.1.4",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "fs.realpath": {
+ "version": "1.0.0",
+ "bundled": true,
+ "dev": true
+ },
+ "fstream": {
+ "version": "1.0.11",
+ "bundled": true,
+ "dev": true
+ },
+ "fstream-ignore": {
+ "version": "1.0.5",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "gauge": {
+ "version": "2.7.4",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "getpass": {
+ "version": "0.1.7",
+ "bundled": true,
+ "dev": true,
+ "optional": true,
+ "dependencies": {
+ "assert-plus": {
+ "version": "1.0.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ }
+ }
+ },
+ "glob": {
+ "version": "7.1.2",
+ "bundled": true,
+ "dev": true
+ },
+ "graceful-fs": {
+ "version": "4.1.11",
+ "bundled": true,
+ "dev": true
+ },
+ "har-schema": {
+ "version": "1.0.5",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "har-validator": {
+ "version": "4.2.1",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "has-unicode": {
+ "version": "2.0.1",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "hawk": {
+ "version": "3.1.3",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "hoek": {
+ "version": "2.16.3",
+ "bundled": true,
+ "dev": true
+ },
+ "http-signature": {
+ "version": "1.1.1",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "inflight": {
+ "version": "1.0.6",
+ "bundled": true,
+ "dev": true
+ },
+ "inherits": {
+ "version": "2.0.3",
+ "bundled": true,
+ "dev": true
+ },
+ "ini": {
+ "version": "1.3.4",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "is-fullwidth-code-point": {
+ "version": "1.0.0",
+ "bundled": true,
+ "dev": true
+ },
+ "is-typedarray": {
+ "version": "1.0.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "isarray": {
+ "version": "1.0.0",
+ "bundled": true,
+ "dev": true
+ },
+ "isstream": {
+ "version": "0.1.2",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "jodid25519": {
+ "version": "1.0.2",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "jsbn": {
+ "version": "0.1.1",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "json-schema": {
+ "version": "0.2.3",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "json-stable-stringify": {
+ "version": "1.0.1",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "json-stringify-safe": {
+ "version": "5.0.1",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "jsonify": {
+ "version": "0.0.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "jsprim": {
+ "version": "1.4.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true,
+ "dependencies": {
+ "assert-plus": {
+ "version": "1.0.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ }
+ }
+ },
+ "mime-db": {
+ "version": "1.27.0",
+ "bundled": true,
+ "dev": true
+ },
+ "mime-types": {
+ "version": "2.1.15",
+ "bundled": true,
+ "dev": true
+ },
+ "minimatch": {
+ "version": "3.0.4",
+ "bundled": true,
+ "dev": true
+ },
+ "minimist": {
+ "version": "0.0.8",
+ "bundled": true,
+ "dev": true
+ },
+ "mkdirp": {
+ "version": "0.5.1",
+ "bundled": true,
+ "dev": true
+ },
+ "ms": {
+ "version": "2.0.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "node-pre-gyp": {
+ "version": "0.6.36",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "nopt": {
+ "version": "4.0.1",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "npmlog": {
+ "version": "4.1.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "number-is-nan": {
+ "version": "1.0.1",
+ "bundled": true,
+ "dev": true
+ },
+ "oauth-sign": {
+ "version": "0.8.2",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "object-assign": {
+ "version": "4.1.1",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "once": {
+ "version": "1.4.0",
+ "bundled": true,
+ "dev": true
+ },
+ "os-homedir": {
+ "version": "1.0.2",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "os-tmpdir": {
+ "version": "1.0.2",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "osenv": {
+ "version": "0.1.4",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "path-is-absolute": {
+ "version": "1.0.1",
+ "bundled": true,
+ "dev": true
+ },
+ "performance-now": {
+ "version": "0.2.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "process-nextick-args": {
+ "version": "1.0.7",
+ "bundled": true,
+ "dev": true
+ },
+ "punycode": {
+ "version": "1.4.1",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "qs": {
+ "version": "6.4.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "rc": {
+ "version": "1.2.1",
+ "bundled": true,
+ "dev": true,
+ "optional": true,
+ "dependencies": {
+ "minimist": {
+ "version": "1.2.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ }
+ }
+ },
+ "readable-stream": {
+ "version": "2.2.9",
+ "bundled": true,
+ "dev": true
+ },
+ "request": {
+ "version": "2.81.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "rimraf": {
+ "version": "2.6.1",
+ "bundled": true,
+ "dev": true
+ },
+ "safe-buffer": {
+ "version": "5.0.1",
+ "bundled": true,
+ "dev": true
+ },
+ "semver": {
+ "version": "5.3.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "set-blocking": {
+ "version": "2.0.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "signal-exit": {
+ "version": "3.0.2",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "sntp": {
+ "version": "1.0.9",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "sshpk": {
+ "version": "1.13.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true,
+ "dependencies": {
+ "assert-plus": {
+ "version": "1.0.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ }
+ }
+ },
+ "string_decoder": {
+ "version": "1.0.1",
+ "bundled": true,
+ "dev": true
+ },
+ "string-width": {
+ "version": "1.0.2",
+ "bundled": true,
+ "dev": true
+ },
+ "stringstream": {
+ "version": "0.0.5",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "strip-ansi": {
+ "version": "3.0.1",
+ "bundled": true,
+ "dev": true
+ },
+ "strip-json-comments": {
+ "version": "2.0.1",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "tar": {
+ "version": "2.2.1",
+ "bundled": true,
+ "dev": true
+ },
+ "tar-pack": {
+ "version": "3.4.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "tough-cookie": {
+ "version": "2.3.2",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "tunnel-agent": {
+ "version": "0.6.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "tweetnacl": {
+ "version": "0.14.5",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "uid-number": {
+ "version": "0.0.6",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "util-deprecate": {
+ "version": "1.0.2",
+ "bundled": true,
+ "dev": true
+ },
+ "uuid": {
+ "version": "3.0.1",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "verror": {
+ "version": "1.3.6",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "wide-align": {
+ "version": "1.1.2",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "wrappy": {
+ "version": "1.0.2",
+ "bundled": true,
+ "dev": true
+ }
+ }
+ },
+ "gaze": {
+ "version": "0.5.2",
+ "resolved": "https://registry.npmjs.org/gaze/-/gaze-0.5.2.tgz",
+ "integrity": "sha1-QLcJU30k0dRXZ9takIaJ3+aaxE8=",
+ "dev": true
+ },
+ "generate-function": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz",
+ "integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ=",
+ "dev": true
+ },
+ "generate-object-property": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz",
+ "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=",
+ "dev": true
+ },
+ "get-stdin": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz",
+ "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=",
+ "dev": true
+ },
+ "glob": {
+ "version": "4.5.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz",
+ "integrity": "sha1-xstz0yJsHv7wTePFbQEvAzd+4V8=",
+ "dev": true
+ },
+ "glob-base": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz",
+ "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=",
+ "dev": true
+ },
+ "glob-parent": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz",
+ "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=",
+ "dev": true
+ },
+ "glob-stream": {
+ "version": "3.1.18",
+ "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-3.1.18.tgz",
+ "integrity": "sha1-kXCl8St5Awb9/lmPMT+PeVT9FDs=",
+ "dev": true,
+ "dependencies": {
+ "readable-stream": {
+ "version": "1.0.34",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
+ "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
+ "dev": true
+ },
+ "through2": {
+ "version": "0.6.5",
+ "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz",
+ "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=",
+ "dev": true
+ }
+ }
+ },
+ "glob-watcher": {
+ "version": "0.0.6",
+ "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-0.0.6.tgz",
+ "integrity": "sha1-uVtKjfdLOcgymLDAXJeLTZo7cQs=",
+ "dev": true
+ },
+ "glob2base": {
+ "version": "0.0.12",
+ "resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz",
+ "integrity": "sha1-nUGbPijxLoOjYhZKJ3BVkiycDVY=",
+ "dev": true
+ },
+ "global-modules": {
+ "version": "0.2.3",
+ "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-0.2.3.tgz",
+ "integrity": "sha1-6lo77ULG1s6ZWk+KEmm12uIjgo0=",
+ "dev": true
+ },
+ "global-prefix": {
+ "version": "0.1.5",
+ "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-0.1.5.tgz",
+ "integrity": "sha1-jTvGuNo8qBEqFg2NSW/wRiv+948=",
+ "dev": true
+ },
+ "globals": {
+ "version": "8.18.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-8.18.0.tgz",
+ "integrity": "sha1-k9SmK9ysOM+vr8R9awNHaMsP/LQ=",
+ "dev": true
+ },
+ "globby": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz",
+ "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=",
+ "dev": true,
+ "dependencies": {
+ "glob": {
+ "version": "7.1.2",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
+ "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
+ "dev": true
+ },
+ "minimatch": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
+ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
+ "dev": true
+ }
+ }
+ },
+ "globule": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/globule/-/globule-0.1.0.tgz",
+ "integrity": "sha1-2cjt3h2nnRJaFRt5UzuXhnY0auU=",
+ "dev": true,
+ "dependencies": {
+ "glob": {
+ "version": "3.1.21",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz",
+ "integrity": "sha1-0p4KBV3qUTj00H7UDomC6DwgZs0=",
+ "dev": true
+ },
+ "graceful-fs": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz",
+ "integrity": "sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q=",
+ "dev": true
+ },
+ "inherits": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz",
+ "integrity": "sha1-ykMJ2t7mtUzAuNJH6NfHoJdb3Js=",
+ "dev": true
+ },
+ "minimatch": {
+ "version": "0.2.14",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz",
+ "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=",
+ "dev": true
+ }
+ }
+ },
+ "glogg": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.0.tgz",
+ "integrity": "sha1-f+DxmfV6yQbPUS/urY+Q7kooT8U=",
+ "dev": true
+ },
+ "graceful-fs": {
+ "version": "3.0.11",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz",
+ "integrity": "sha1-dhPHeKGv6mLyXGMKCG1/Osu92Bg=",
+ "dev": true
+ },
+ "graceful-readlink": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz",
+ "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=",
+ "dev": true
+ },
+ "growl": {
+ "version": "1.9.2",
+ "resolved": "https://registry.npmjs.org/growl/-/growl-1.9.2.tgz",
+ "integrity": "sha1-Dqd0NxXbjY3ixe3hd14bRayFwC8=",
+ "dev": true
+ },
+ "gulp": {
+ "version": "3.9.1",
+ "resolved": "https://registry.npmjs.org/gulp/-/gulp-3.9.1.tgz",
+ "integrity": "sha1-VxzkWSjdQK9lFPxAEYZgFsE4RbQ=",
+ "dev": true
+ },
+ "gulp-bump": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/gulp-bump/-/gulp-bump-1.0.0.tgz",
+ "integrity": "sha1-XofEsSlyalzphvIjDnU3vzzecqw=",
+ "dev": true,
+ "dependencies": {
+ "readable-stream": {
+ "version": "1.0.34",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
+ "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
+ "dev": true
+ },
+ "semver": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
+ "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=",
+ "dev": true
+ },
+ "through2": {
+ "version": "0.5.1",
+ "resolved": "https://registry.npmjs.org/through2/-/through2-0.5.1.tgz",
+ "integrity": "sha1-390BLrnHAOIyP9M084rGIqs3Lac=",
+ "dev": true
+ },
+ "xtend": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz",
+ "integrity": "sha1-XM50B7r2Qsunvs2laBEcST9ZZlo=",
+ "dev": true
+ }
+ }
+ },
+ "gulp-eslint": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/gulp-eslint/-/gulp-eslint-1.1.1.tgz",
+ "integrity": "sha1-nxY4D1MxchUrN/O1woFkmt+PRmQ=",
+ "dev": true
+ },
+ "gulp-filter": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/gulp-filter/-/gulp-filter-3.0.1.tgz",
+ "integrity": "sha1-fG/85bVj6J3nqQ387/FuyKjLFWI=",
+ "dev": true
+ },
+ "gulp-git": {
+ "version": "1.15.1",
+ "resolved": "https://registry.npmjs.org/gulp-git/-/gulp-git-1.15.1.tgz",
+ "integrity": "sha1-zdnTVPxB2Ny1LO9HJW37o2Z4WXk=",
+ "dev": true,
+ "dependencies": {
+ "readable-stream": {
+ "version": "1.0.34",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
+ "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
+ "dev": true
+ },
+ "through2": {
+ "version": "0.6.5",
+ "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz",
+ "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=",
+ "dev": true
+ }
+ }
+ },
+ "gulp-mocha": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/gulp-mocha/-/gulp-mocha-2.2.0.tgz",
+ "integrity": "sha1-HOXrpLlLQMdDav7DxJgsjuqJQZI=",
+ "dev": true
+ },
+ "gulp-tag-version": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/gulp-tag-version/-/gulp-tag-version-1.3.0.tgz",
+ "integrity": "sha1-hEjIfu0YZtuObLWYvEGb4t98R9s=",
+ "dev": true,
+ "dependencies": {
+ "ansi-regex": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-0.2.1.tgz",
+ "integrity": "sha1-DY6UaWej2BQ/k+JOKYUl/BsiNfk=",
+ "dev": true
+ },
+ "ansi-styles": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.1.0.tgz",
+ "integrity": "sha1-6uy/Zs1waIJ2Cy9GkVgrj1XXp94=",
+ "dev": true
+ },
+ "chalk": {
+ "version": "0.5.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.5.1.tgz",
+ "integrity": "sha1-Zjs6ZItotV0EaQ1JFnqoN4WPIXQ=",
+ "dev": true
+ },
+ "dateformat": {
+ "version": "1.0.12",
+ "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz",
+ "integrity": "sha1-nxJLZ1lMk3/3BpMuSmQsyo27/uk=",
+ "dev": true
+ },
+ "gulp-git": {
+ "version": "0.3.6",
+ "resolved": "https://registry.npmjs.org/gulp-git/-/gulp-git-0.3.6.tgz",
+ "integrity": "sha1-d+w9oiklwkbt15bKENQWOWXYFAo=",
+ "dev": true
+ },
+ "gulp-util": {
+ "version": "2.2.20",
+ "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-2.2.20.tgz",
+ "integrity": "sha1-1xRuVyiRC9jwR6awseVJvCLb1kw=",
+ "dev": true,
+ "dependencies": {
+ "through2": {
+ "version": "0.5.1",
+ "resolved": "https://registry.npmjs.org/through2/-/through2-0.5.1.tgz",
+ "integrity": "sha1-390BLrnHAOIyP9M084rGIqs3Lac=",
+ "dev": true
+ }
+ }
+ },
+ "has-ansi": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-0.1.0.tgz",
+ "integrity": "sha1-hPJlqujA5qiKEtcCKJS3VoiUxi4=",
+ "dev": true
+ },
+ "lodash._reinterpolate": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-2.4.1.tgz",
+ "integrity": "sha1-TxInqlqHEfxjL1sHofRgequLMiI=",
+ "dev": true
+ },
+ "lodash.escape": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-2.4.1.tgz",
+ "integrity": "sha1-LOEsXghNsKV92l5dHu659dF1o7Q=",
+ "dev": true
+ },
+ "lodash.keys": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-2.4.1.tgz",
+ "integrity": "sha1-SN6kbfj/djKxDXBrissmWR4rNyc=",
+ "dev": true
+ },
+ "lodash.template": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-2.4.1.tgz",
+ "integrity": "sha1-nmEQB+32KRKal0qzxIuBez4c8g0=",
+ "dev": true
+ },
+ "lodash.templatesettings": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-2.4.1.tgz",
+ "integrity": "sha1-6nbHXRHrhtTb6JqDiTu4YZKaxpk=",
+ "dev": true
+ },
+ "minimist": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.2.0.tgz",
+ "integrity": "sha1-Tf/lJdriuGTGbC4jxicdev3s784=",
+ "dev": true
+ },
+ "readable-stream": {
+ "version": "1.0.34",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
+ "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
+ "dev": true
+ },
+ "strip-ansi": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.3.0.tgz",
+ "integrity": "sha1-JfSOoiynkYfzF0pNuHWTR7sSYiA=",
+ "dev": true
+ },
+ "supports-color": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-0.2.0.tgz",
+ "integrity": "sha1-2S3iaU6z9nMjlz1649i1W0wiGQo=",
+ "dev": true
+ },
+ "through2": {
+ "version": "0.4.2",
+ "resolved": "https://registry.npmjs.org/through2/-/through2-0.4.2.tgz",
+ "integrity": "sha1-2/WGYDEVHsg1K7bE22SiKSqEC5s=",
+ "dev": true,
+ "dependencies": {
+ "xtend": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz",
+ "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=",
+ "dev": true
+ }
+ }
+ },
+ "vinyl": {
+ "version": "0.2.3",
+ "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.2.3.tgz",
+ "integrity": "sha1-vKk4IJWC7FpJrVOKAPofEl5RMlI=",
+ "dev": true
+ },
+ "xtend": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz",
+ "integrity": "sha1-XM50B7r2Qsunvs2laBEcST9ZZlo=",
+ "dev": true
+ }
+ }
+ },
+ "gulp-util": {
+ "version": "3.0.8",
+ "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz",
+ "integrity": "sha1-AFTh50RQLifATBh8PsxQXdVLu08=",
+ "dev": true,
+ "dependencies": {
+ "object-assign": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz",
+ "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=",
+ "dev": true
+ }
+ }
+ },
+ "gulplog": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz",
+ "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=",
+ "dev": true
+ },
+ "handlebars": {
+ "version": "4.0.10",
+ "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.10.tgz",
+ "integrity": "sha1-PTDHGLCaPZbyPqTMH0A8TTup/08=",
+ "dev": true
+ },
+ "has-ansi": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
+ "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
+ "dev": true
+ },
+ "has-gulplog": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz",
+ "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=",
+ "dev": true
+ },
+ "home-or-tmp": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz",
+ "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=",
+ "dev": true
+ },
+ "homedir-polyfill": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz",
+ "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=",
+ "dev": true
+ },
+ "hosted-git-info": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.4.2.tgz",
+ "integrity": "sha1-AHa59GonBQbduq6lZJaJdGBhKmc=",
+ "dev": true
+ },
+ "indent-string": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz",
+ "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=",
+ "dev": true
+ },
+ "inflight": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+ "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
+ "dev": true
+ },
+ "inherits": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
+ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
+ "dev": true
+ },
+ "ini": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz",
+ "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=",
+ "dev": true
+ },
+ "inquirer": {
+ "version": "0.11.4",
+ "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.11.4.tgz",
+ "integrity": "sha1-geM3ToNhvq/y2XAWIG01nQsy+k0=",
+ "dev": true,
+ "dependencies": {
+ "lodash": {
+ "version": "3.10.1",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz",
+ "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=",
+ "dev": true
+ }
+ }
+ },
+ "interpret": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.0.3.tgz",
+ "integrity": "sha1-y8NcYu7uc/Gat7EKgBURQBr8D5A=",
+ "dev": true
+ },
+ "invariant": {
+ "version": "2.2.2",
+ "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz",
+ "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=",
+ "dev": true
+ },
+ "irregular-plurals": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-1.2.0.tgz",
+ "integrity": "sha1-OPKZg0uowAwwvpxVThNyaXUv86w=",
+ "dev": true
+ },
+ "is-absolute": {
+ "version": "0.2.6",
+ "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-0.2.6.tgz",
+ "integrity": "sha1-IN5p89uULvLYe5wto28XIjWxtes=",
+ "dev": true
+ },
+ "is-arrayish": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
+ "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=",
+ "dev": true
+ },
+ "is-binary-path": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz",
+ "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=",
+ "dev": true,
+ "optional": true
+ },
+ "is-buffer": {
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz",
+ "integrity": "sha1-Hzsm72E7IUuIy8ojzGwB2Hlh7sw=",
+ "dev": true
+ },
+ "is-builtin-module": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz",
+ "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=",
+ "dev": true
+ },
+ "is-dotfile": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz",
+ "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=",
+ "dev": true
+ },
+ "is-equal-shallow": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz",
+ "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=",
+ "dev": true
+ },
+ "is-extendable": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
+ "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=",
+ "dev": true
+ },
+ "is-extglob": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz",
+ "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=",
+ "dev": true
+ },
+ "is-finite": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz",
+ "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=",
+ "dev": true
+ },
+ "is-fullwidth-code-point": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
+ "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
+ "dev": true
+ },
+ "is-glob": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz",
+ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=",
+ "dev": true
+ },
+ "is-my-json-valid": {
+ "version": "2.16.0",
+ "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.16.0.tgz",
+ "integrity": "sha1-8Hndm/2uZe4gOKrorLyGqxCeNpM=",
+ "dev": true
+ },
+ "is-number": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz",
+ "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=",
+ "dev": true
+ },
+ "is-path-cwd": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz",
+ "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=",
+ "dev": true
+ },
+ "is-path-in-cwd": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz",
+ "integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=",
+ "dev": true
+ },
+ "is-path-inside": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.0.tgz",
+ "integrity": "sha1-/AbloWg/vaE95mev9xe7wQpI838=",
+ "dev": true
+ },
+ "is-plain-object": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.3.tgz",
+ "integrity": "sha1-wVvz5LZrYtcu+vKSWEhmPsvGGbY=",
+ "dev": true,
+ "dependencies": {
+ "isobject": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.0.tgz",
+ "integrity": "sha1-OVZSF/NmF4nooKDAgNX35rxG4aA=",
+ "dev": true
+ }
+ }
+ },
+ "is-posix-bracket": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz",
+ "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=",
+ "dev": true
+ },
+ "is-primitive": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz",
+ "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=",
+ "dev": true
+ },
+ "is-property": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz",
+ "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=",
+ "dev": true
+ },
+ "is-relative": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-0.2.1.tgz",
+ "integrity": "sha1-0n9MfVFtF1+2ENuEu+7yPDvJeqU=",
+ "dev": true
+ },
+ "is-resolvable": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.0.0.tgz",
+ "integrity": "sha1-jfV8YeouPFAUCNEA+wE8+NbgzGI=",
+ "dev": true
+ },
+ "is-unc-path": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-0.1.2.tgz",
+ "integrity": "sha1-arBTpyVzwQJQ/0FqOBTDUXivObk=",
+ "dev": true
+ },
+ "is-utf8": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
+ "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=",
+ "dev": true
+ },
+ "is-windows": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-0.2.0.tgz",
+ "integrity": "sha1-3hqm1j6indJIc3tp8f+LgALSEIw=",
+ "dev": true
+ },
+ "isarray": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
+ "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=",
+ "dev": true
+ },
+ "isexe": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
+ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
+ "dev": true
+ },
+ "isobject": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz",
+ "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=",
+ "dev": true,
+ "dependencies": {
+ "isarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
+ "dev": true
+ }
+ }
+ },
+ "jade": {
+ "version": "0.26.3",
+ "resolved": "https://registry.npmjs.org/jade/-/jade-0.26.3.tgz",
+ "integrity": "sha1-jxDXl32NefL2/4YqgbBRPMslaGw=",
+ "dev": true,
+ "dependencies": {
+ "commander": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-0.6.1.tgz",
+ "integrity": "sha1-+mihT2qUXVTbvlDYzbMyDp47GgY=",
+ "dev": true
+ },
+ "mkdirp": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz",
+ "integrity": "sha1-G79asbqCevI1dRQ0kEJkVfSB/h4=",
+ "dev": true
+ }
+ }
+ },
+ "js-tokens": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.1.tgz",
+ "integrity": "sha1-COnxMkhKLEWjCQfp3E1VZ7fxFNc=",
+ "dev": true
+ },
+ "js-yaml": {
+ "version": "3.4.5",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.4.5.tgz",
+ "integrity": "sha1-w0A3l98SuRhmV08t4jZG/oyvtE0=",
+ "dev": true
+ },
+ "js2xmlparser": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-1.0.0.tgz",
+ "integrity": "sha1-WhcPLo1kds5FQF4EgjJCUTeC/jA=",
+ "dev": true
+ },
+ "jsdoc": {
+ "version": "3.4.3",
+ "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.4.3.tgz",
+ "integrity": "sha1-5XQNYUXGgfZnnmwXeDqI292XzNM=",
+ "dev": true,
+ "dependencies": {
+ "strip-json-comments": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
+ "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
+ "dev": true
+ }
+ }
+ },
+ "jsesc": {
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
+ "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=",
+ "dev": true
+ },
+ "json-stable-stringify": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz",
+ "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=",
+ "dev": true
+ },
+ "json5": {
+ "version": "0.5.1",
+ "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz",
+ "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=",
+ "dev": true
+ },
+ "jsonify": {
+ "version": "0.0.0",
+ "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz",
+ "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=",
+ "dev": true
+ },
+ "jsonpointer": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz",
+ "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=",
+ "dev": true
+ },
+ "kind-of": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+ "dev": true
+ },
+ "klaw": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz",
+ "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=",
+ "dev": true,
+ "dependencies": {
+ "graceful-fs": {
+ "version": "4.1.11",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
+ "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=",
+ "dev": true,
+ "optional": true
+ }
+ }
+ },
+ "lazy-cache": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz",
+ "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=",
+ "dev": true,
+ "optional": true
+ },
+ "levn": {
+ "version": "0.2.5",
+ "resolved": "https://registry.npmjs.org/levn/-/levn-0.2.5.tgz",
+ "integrity": "sha1-uo0znQykphDjo/FFucr0iAcVUFQ=",
+ "dev": true
+ },
+ "liftoff": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-2.3.0.tgz",
+ "integrity": "sha1-qY8v9nGD2Lp8+soQVIvX/wVQs4U=",
+ "dev": true
+ },
+ "load-json-file": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
+ "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
+ "dev": true,
+ "dependencies": {
+ "graceful-fs": {
+ "version": "4.1.11",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
+ "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=",
+ "dev": true
+ },
+ "strip-bom": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
+ "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=",
+ "dev": true
+ }
+ }
+ },
+ "lodash": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz",
+ "integrity": "sha1-j1dWDIO1n8JwvT1WG2kAQ0MOJVE=",
+ "dev": true
+ },
+ "lodash._arraycopy": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/lodash._arraycopy/-/lodash._arraycopy-3.0.0.tgz",
+ "integrity": "sha1-due3wfH7klRzdIeKVi7Qaj5Q9uE=",
+ "dev": true
+ },
+ "lodash._arrayeach": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/lodash._arrayeach/-/lodash._arrayeach-3.0.0.tgz",
+ "integrity": "sha1-urFWsqkNPxu9XGU0AzSeXlkz754=",
+ "dev": true
+ },
+ "lodash._arraymap": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/lodash._arraymap/-/lodash._arraymap-3.0.0.tgz",
+ "integrity": "sha1-Go/Q9MDfS2HeoHbXF83Jfwo8PmY=",
+ "dev": true
+ },
+ "lodash._baseassign": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz",
+ "integrity": "sha1-jDigmVAPIVrQnlnxci/QxSv+Ck4=",
+ "dev": true
+ },
+ "lodash._baseclone": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/lodash._baseclone/-/lodash._baseclone-3.3.0.tgz",
+ "integrity": "sha1-MDUZv2OT/n5C802LYw73eU41Qrc=",
+ "dev": true
+ },
+ "lodash._basecopy": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz",
+ "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=",
+ "dev": true
+ },
+ "lodash._basedifference": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/lodash._basedifference/-/lodash._basedifference-3.0.3.tgz",
+ "integrity": "sha1-8sIEKWwqeOArOJCBtu3KyTPPYpw=",
+ "dev": true
+ },
+ "lodash._baseflatten": {
+ "version": "3.1.4",
+ "resolved": "https://registry.npmjs.org/lodash._baseflatten/-/lodash._baseflatten-3.1.4.tgz",
+ "integrity": "sha1-B3D/gBMa9uNPO1EXlqe6UhTmX/c=",
+ "dev": true
+ },
+ "lodash._basefor": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/lodash._basefor/-/lodash._basefor-3.0.3.tgz",
+ "integrity": "sha1-dVC06SGO8J+tJDQ7YSAhx5tMIMI=",
+ "dev": true
+ },
+ "lodash._baseindexof": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz",
+ "integrity": "sha1-/lK1OhxnYeQmGNZU5KJXie1hgiw=",
+ "dev": true
+ },
+ "lodash._basetostring": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz",
+ "integrity": "sha1-0YYdh3+CSlL2aYMtyvPuFVZqB9U=",
+ "dev": true
+ },
+ "lodash._basevalues": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz",
+ "integrity": "sha1-W3dXYoAr3j0yl1A+JjAIIP32Ybc=",
+ "dev": true
+ },
+ "lodash._bindcallback": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz",
+ "integrity": "sha1-5THCdkTPi1epnhftlbNcdIeJOS4=",
+ "dev": true
+ },
+ "lodash._cacheindexof": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz",
+ "integrity": "sha1-PcaayCSY0u5ePOVgkbr9Ktx73pI=",
+ "dev": true
+ },
+ "lodash._createassigner": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz",
+ "integrity": "sha1-g4pbri/aymOsIt7o4Z+k5taXCxE=",
+ "dev": true
+ },
+ "lodash._createcache": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/lodash._createcache/-/lodash._createcache-3.1.2.tgz",
+ "integrity": "sha1-VtagZAF2JeeevKa4AY4XRAvc8JM=",
+ "dev": true
+ },
+ "lodash._escapehtmlchar": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/lodash._escapehtmlchar/-/lodash._escapehtmlchar-2.4.1.tgz",
+ "integrity": "sha1-32fDu2t+jh6DGrSL+geVuSr+iZ0=",
+ "dev": true
+ },
+ "lodash._escapestringchar": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/lodash._escapestringchar/-/lodash._escapestringchar-2.4.1.tgz",
+ "integrity": "sha1-7P4iYYoq3lC/7qQ5N+Ud9m8O23I=",
+ "dev": true
+ },
+ "lodash._getnative": {
+ "version": "3.9.1",
+ "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz",
+ "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=",
+ "dev": true
+ },
+ "lodash._htmlescapes": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/lodash._htmlescapes/-/lodash._htmlescapes-2.4.1.tgz",
+ "integrity": "sha1-MtFL8IRLbeb4tioFG09nwii2JMs=",
+ "dev": true
+ },
+ "lodash._isiterateecall": {
+ "version": "3.0.9",
+ "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz",
+ "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=",
+ "dev": true
+ },
+ "lodash._isnative": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/lodash._isnative/-/lodash._isnative-2.4.1.tgz",
+ "integrity": "sha1-PqZAS3hKe+g2x7V1gOHN95sUgyw=",
+ "dev": true
+ },
+ "lodash._objecttypes": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/lodash._objecttypes/-/lodash._objecttypes-2.4.1.tgz",
+ "integrity": "sha1-fAt/admKH3ZSn4kLDNsbTf7BHBE=",
+ "dev": true
+ },
+ "lodash._pickbyarray": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/lodash._pickbyarray/-/lodash._pickbyarray-3.0.2.tgz",
+ "integrity": "sha1-H4mNlgfrVgsOFnOEt3x8bRCKpMU=",
+ "dev": true
+ },
+ "lodash._pickbycallback": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/lodash._pickbycallback/-/lodash._pickbycallback-3.0.0.tgz",
+ "integrity": "sha1-/2G5oBens699MObFPeKK+hm4dQo=",
+ "dev": true
+ },
+ "lodash._reescape": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz",
+ "integrity": "sha1-Kx1vXf4HyKNVdT5fJ/rH8c3hYWo=",
+ "dev": true
+ },
+ "lodash._reevaluate": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz",
+ "integrity": "sha1-WLx0xAZklTrgsSTYBpltrKQx4u0=",
+ "dev": true
+ },
+ "lodash._reinterpolate": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz",
+ "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=",
+ "dev": true
+ },
+ "lodash._reunescapedhtml": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/lodash._reunescapedhtml/-/lodash._reunescapedhtml-2.4.1.tgz",
+ "integrity": "sha1-dHxPxAED6zu4oJduVx96JlnpO6c=",
+ "dev": true,
+ "dependencies": {
+ "lodash.keys": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-2.4.1.tgz",
+ "integrity": "sha1-SN6kbfj/djKxDXBrissmWR4rNyc=",
+ "dev": true
+ }
+ }
+ },
+ "lodash._root": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz",
+ "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=",
+ "dev": true
+ },
+ "lodash._shimkeys": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/lodash._shimkeys/-/lodash._shimkeys-2.4.1.tgz",
+ "integrity": "sha1-bpzJZm/wgfC1psl4uD4kLmlJ0gM=",
+ "dev": true
+ },
+ "lodash.clonedeep": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-3.0.2.tgz",
+ "integrity": "sha1-oKHkDYKl6on/WxR7hETtY9koJ9s=",
+ "dev": true
+ },
+ "lodash.defaults": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-2.4.1.tgz",
+ "integrity": "sha1-p+iIXwXmiFEUS24SqPNngCa8TFQ=",
+ "dev": true,
+ "dependencies": {
+ "lodash.keys": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-2.4.1.tgz",
+ "integrity": "sha1-SN6kbfj/djKxDXBrissmWR4rNyc=",
+ "dev": true
+ }
+ }
+ },
+ "lodash.escape": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz",
+ "integrity": "sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=",
+ "dev": true
+ },
+ "lodash.isarguments": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz",
+ "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=",
+ "dev": true
+ },
+ "lodash.isarray": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz",
+ "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=",
+ "dev": true
+ },
+ "lodash.isobject": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/lodash.isobject/-/lodash.isobject-2.4.1.tgz",
+ "integrity": "sha1-Wi5H/mmVPx7mMafrof5k0tBlWPU=",
+ "dev": true
+ },
+ "lodash.isplainobject": {
+ "version": "4.0.6",
+ "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
+ "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=",
+ "dev": true
+ },
+ "lodash.isstring": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz",
+ "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=",
+ "dev": true
+ },
+ "lodash.istypedarray": {
+ "version": "3.0.6",
+ "resolved": "https://registry.npmjs.org/lodash.istypedarray/-/lodash.istypedarray-3.0.6.tgz",
+ "integrity": "sha1-yaR3SYYHUB2OhJTSg7h8OSgc72I=",
+ "dev": true
+ },
+ "lodash.keys": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz",
+ "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=",
+ "dev": true
+ },
+ "lodash.keysin": {
+ "version": "3.0.8",
+ "resolved": "https://registry.npmjs.org/lodash.keysin/-/lodash.keysin-3.0.8.tgz",
+ "integrity": "sha1-IsRJPrvtsUJ5YqVLRFssinZ/tH8=",
+ "dev": true
+ },
+ "lodash.mapvalues": {
+ "version": "4.6.0",
+ "resolved": "https://registry.npmjs.org/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz",
+ "integrity": "sha1-G6+lAF3p3W9PJmaMMMo3IwzJaJw=",
+ "dev": true
+ },
+ "lodash.merge": {
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-3.3.2.tgz",
+ "integrity": "sha1-DZDZPtY3sYeEN7s+IWASYNev6ZQ=",
+ "dev": true,
+ "dependencies": {
+ "lodash.isplainobject": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-3.2.0.tgz",
+ "integrity": "sha1-moI4rhayAEMpYM1zRlEtASP79MU=",
+ "dev": true
+ }
+ }
+ },
+ "lodash.omit": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/lodash.omit/-/lodash.omit-3.1.0.tgz",
+ "integrity": "sha1-iX/jguZBPZrJfGH3jtHgV6AK+fM=",
+ "dev": true
+ },
+ "lodash.restparam": {
+ "version": "3.6.1",
+ "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz",
+ "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=",
+ "dev": true
+ },
+ "lodash.template": {
+ "version": "3.6.2",
+ "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz",
+ "integrity": "sha1-+M3sxhaaJVvpCYrosMU9N4kx0U8=",
+ "dev": true
+ },
+ "lodash.templatesettings": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz",
+ "integrity": "sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU=",
+ "dev": true
+ },
+ "lodash.toplainobject": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/lodash.toplainobject/-/lodash.toplainobject-3.0.0.tgz",
+ "integrity": "sha1-KHkK2ULSk9eKpmOgfs9/UsoEGY0=",
+ "dev": true
+ },
+ "lodash.values": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/lodash.values/-/lodash.values-2.4.1.tgz",
+ "integrity": "sha1-q/UUQ2s8twUAFieXjLzzCxKA7qQ=",
+ "dev": true,
+ "dependencies": {
+ "lodash.keys": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-2.4.1.tgz",
+ "integrity": "sha1-SN6kbfj/djKxDXBrissmWR4rNyc=",
+ "dev": true
+ }
+ }
+ },
+ "longest": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz",
+ "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=",
+ "dev": true
+ },
+ "loose-envify": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz",
+ "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=",
+ "dev": true
+ },
+ "loud-rejection": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz",
+ "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=",
+ "dev": true
+ },
+ "lru-cache": {
+ "version": "2.7.3",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz",
+ "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=",
+ "dev": true
+ },
+ "map-cache": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz",
+ "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=",
+ "dev": true
+ },
+ "map-obj": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz",
+ "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=",
+ "dev": true
+ },
+ "map-stream": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz",
+ "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=",
+ "dev": true
+ },
+ "marked": {
+ "version": "0.3.6",
+ "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.6.tgz",
+ "integrity": "sha1-ssbGGPzOzk74bE/Gy4p8v1rtqNc=",
+ "dev": true
+ },
+ "meow": {
+ "version": "3.7.0",
+ "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz",
+ "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=",
+ "dev": true
+ },
+ "micromatch": {
+ "version": "2.3.11",
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz",
+ "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=",
+ "dev": true
+ },
+ "minimatch": {
+ "version": "2.0.10",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz",
+ "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=",
+ "dev": true
+ },
+ "minimist": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
+ "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
+ "dev": true
+ },
+ "mkdirp": {
+ "version": "0.5.1",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
+ "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
+ "dev": true,
+ "dependencies": {
+ "minimist": {
+ "version": "0.0.8",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
+ "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
+ "dev": true
+ }
+ }
+ },
+ "mocha": {
+ "version": "2.5.3",
+ "resolved": "https://registry.npmjs.org/mocha/-/mocha-2.5.3.tgz",
+ "integrity": "sha1-FhvlvetJZ3HrmzV0UFC2IrWu/Fg=",
+ "dev": true,
+ "dependencies": {
+ "commander": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.3.0.tgz",
+ "integrity": "sha1-/UMOiJgy7DU7ms0d4hfBHLPu+HM=",
+ "dev": true
+ },
+ "debug": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
+ "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=",
+ "dev": true
+ },
+ "escape-string-regexp": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.2.tgz",
+ "integrity": "sha1-Tbwv5nTnGUnK8/smlc5/LcHZqNE=",
+ "dev": true
+ },
+ "glob": {
+ "version": "3.2.11",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz",
+ "integrity": "sha1-Spc/Y1uRkPcV0QmH1cAP0oFevj0=",
+ "dev": true
+ },
+ "minimatch": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz",
+ "integrity": "sha1-J12O2qxPG7MyZHIInnlJyDlGmd0=",
+ "dev": true
+ },
+ "ms": {
+ "version": "0.7.1",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz",
+ "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=",
+ "dev": true
+ },
+ "supports-color": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-1.2.0.tgz",
+ "integrity": "sha1-/x7R5hFp0Gs88tWI4YixjYhH4X4=",
+ "dev": true
+ }
+ }
+ },
+ "ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
+ "dev": true
+ },
+ "multimatch": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-2.1.0.tgz",
+ "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=",
+ "dev": true,
+ "dependencies": {
+ "minimatch": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
+ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
+ "dev": true
+ }
+ }
+ },
+ "multipipe": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz",
+ "integrity": "sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=",
+ "dev": true
+ },
+ "mute-stream": {
+ "version": "0.0.5",
+ "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz",
+ "integrity": "sha1-j7+rsKmKJT0xhDMfno3rc3L6xsA=",
+ "dev": true
+ },
+ "nan": {
+ "version": "2.6.2",
+ "resolved": "https://registry.npmjs.org/nan/-/nan-2.6.2.tgz",
+ "integrity": "sha1-5P805slf37WuzAjeZZb0NgWn20U=",
+ "dev": true,
+ "optional": true
+ },
+ "natives": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.0.tgz",
+ "integrity": "sha1-6f+EFBimsux6SV6TmYT3jxY+bjE=",
+ "dev": true
+ },
+ "normalize-package-data": {
+ "version": "2.3.8",
+ "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.3.8.tgz",
+ "integrity": "sha1-2Bntoqne29H/pWPqQHHZNngilbs=",
+ "dev": true
+ },
+ "normalize-path": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
+ "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
+ "dev": true
+ },
+ "number-is-nan": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
+ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
+ "dev": true
+ },
+ "object-assign": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
+ "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
+ },
+ "object-keys": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz",
+ "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=",
+ "dev": true
+ },
+ "object.defaults": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz",
+ "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=",
+ "dev": true,
+ "dependencies": {
+ "for-own": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz",
+ "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=",
+ "dev": true
+ },
+ "isobject": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.0.tgz",
+ "integrity": "sha1-OVZSF/NmF4nooKDAgNX35rxG4aA=",
+ "dev": true
+ }
+ }
+ },
+ "object.omit": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz",
+ "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=",
+ "dev": true
+ },
+ "object.pick": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.2.0.tgz",
+ "integrity": "sha1-tTkr7peC2m2ft9avr1OXefEjTCs=",
+ "dev": true
+ },
+ "once": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz",
+ "integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=",
+ "dev": true
+ },
+ "onetime": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz",
+ "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=",
+ "dev": true
+ },
+ "optimist": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz",
+ "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=",
+ "dev": true,
+ "dependencies": {
+ "minimist": {
+ "version": "0.0.10",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz",
+ "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=",
+ "dev": true
+ }
+ }
+ },
+ "optionator": {
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.6.0.tgz",
+ "integrity": "sha1-tj7Lvw4xX61LyYJ7Rdx7pFKE/LY=",
+ "dev": true
+ },
+ "orchestrator": {
+ "version": "0.3.8",
+ "resolved": "https://registry.npmjs.org/orchestrator/-/orchestrator-0.3.8.tgz",
+ "integrity": "sha1-FOfp4nZPcxX7rBhOUGx6pt+UrX4=",
+ "dev": true
+ },
+ "ordered-read-streams": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz",
+ "integrity": "sha1-/VZamvjrRHO6abbtijQ1LLVS8SY=",
+ "dev": true
+ },
+ "os-homedir": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
+ "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
+ "dev": true
+ },
+ "os-tmpdir": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
+ "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
+ "dev": true
+ },
+ "output-file-sync": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/output-file-sync/-/output-file-sync-1.1.2.tgz",
+ "integrity": "sha1-0KM+7+YaIF+suQCS6CZZjVJFznY=",
+ "dev": true,
+ "dependencies": {
+ "graceful-fs": {
+ "version": "4.1.11",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
+ "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=",
+ "dev": true
+ }
+ }
+ },
+ "parse-filepath": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.1.tgz",
+ "integrity": "sha1-FZ1hVdQ5BNFsEO9piRHaHpGWm3M=",
+ "dev": true
+ },
+ "parse-glob": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz",
+ "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=",
+ "dev": true
+ },
+ "parse-json": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
+ "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
+ "dev": true
+ },
+ "parse-passwd": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz",
+ "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=",
+ "dev": true
+ },
+ "path-exists": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
+ "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=",
+ "dev": true
+ },
+ "path-is-absolute": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
+ "dev": true
+ },
+ "path-is-inside": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz",
+ "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=",
+ "dev": true
+ },
+ "path-parse": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz",
+ "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=",
+ "dev": true
+ },
+ "path-root": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz",
+ "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=",
+ "dev": true
+ },
+ "path-root-regex": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz",
+ "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=",
+ "dev": true
+ },
+ "path-type": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz",
+ "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=",
+ "dev": true,
+ "dependencies": {
+ "graceful-fs": {
+ "version": "4.1.11",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
+ "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=",
+ "dev": true
+ }
+ }
+ },
+ "pify": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
+ "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
+ "dev": true
+ },
+ "pinkie": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz",
+ "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=",
+ "dev": true
+ },
+ "pinkie-promise": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz",
+ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=",
+ "dev": true
+ },
+ "plugin-error": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-0.1.2.tgz",
+ "integrity": "sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4=",
+ "dev": true,
+ "dependencies": {
+ "arr-diff": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-1.1.0.tgz",
+ "integrity": "sha1-aHwydYFjWI/vfeezb6vklesaOZo=",
+ "dev": true
+ },
+ "array-slice": {
+ "version": "0.2.3",
+ "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz",
+ "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=",
+ "dev": true
+ }
+ }
+ },
+ "plugin-log": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/plugin-log/-/plugin-log-0.1.0.tgz",
+ "integrity": "sha1-hgSc9qsQgzOYqTHzaJy67nteEzM=",
+ "dev": true,
+ "dependencies": {
+ "dateformat": {
+ "version": "1.0.12",
+ "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz",
+ "integrity": "sha1-nxJLZ1lMk3/3BpMuSmQsyo27/uk=",
+ "dev": true
+ }
+ }
+ },
+ "plur": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/plur/-/plur-2.1.2.tgz",
+ "integrity": "sha1-dIJFLBoPUI4+NE6uwxLJHCncZVo=",
+ "dev": true
+ },
+ "prelude-ls": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
+ "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=",
+ "dev": true
+ },
+ "preserve": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz",
+ "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=",
+ "dev": true
+ },
+ "pretty-hrtime": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz",
+ "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=",
+ "dev": true
+ },
+ "private": {
+ "version": "0.1.7",
+ "resolved": "https://registry.npmjs.org/private/-/private-0.1.7.tgz",
+ "integrity": "sha1-aM5eih7woju1cMwoU3tTMqumPvE=",
+ "dev": true
+ },
+ "process-nextick-args": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
+ "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=",
+ "dev": true
+ },
+ "randomatic": {
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz",
+ "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==",
+ "dev": true,
+ "dependencies": {
+ "is-number": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
+ "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
+ "dev": true,
+ "dependencies": {
+ "kind-of": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+ "dev": true
+ }
+ }
+ },
+ "kind-of": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz",
+ "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=",
+ "dev": true
+ }
+ }
+ },
+ "read-pkg": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
+ "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=",
+ "dev": true
+ },
+ "read-pkg-up": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz",
+ "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=",
+ "dev": true
+ },
+ "readable-stream": {
+ "version": "1.1.14",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
+ "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
+ "dev": true
+ },
+ "readdirp": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz",
+ "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=",
+ "dev": true,
+ "optional": true,
+ "dependencies": {
+ "graceful-fs": {
+ "version": "4.1.11",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
+ "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=",
+ "dev": true,
+ "optional": true
+ },
+ "isarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
+ "dev": true,
+ "optional": true
+ },
+ "minimatch": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
+ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
+ "dev": true,
+ "optional": true
+ },
+ "readable-stream": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.0.tgz",
+ "integrity": "sha512-c7KMXGd4b48nN3OJ1U9qOsn6pXNzf6kLd3kdZCkg2sxAcoiufInqF0XckwEnlrcwuaYwonlNK8GQUIOC/WC7sg==",
+ "dev": true,
+ "optional": true
+ },
+ "string_decoder": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.2.tgz",
+ "integrity": "sha1-sp4fThEl+pehA4K4pTNze3SR4Xk=",
+ "dev": true,
+ "optional": true,
+ "dependencies": {
+ "safe-buffer": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz",
+ "integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c=",
+ "dev": true,
+ "optional": true
+ }
+ }
+ }
+ }
+ },
+ "readline2": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/readline2/-/readline2-1.0.1.tgz",
+ "integrity": "sha1-QQWWCP/BVHV7cV2ZidGZ/783LjU=",
+ "dev": true
+ },
+ "rechoir": {
+ "version": "0.6.2",
+ "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
+ "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=",
+ "dev": true
+ },
+ "redent": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz",
+ "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=",
+ "dev": true
+ },
+ "regenerate": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.2.tgz",
+ "integrity": "sha1-0ZQcZ7rUN+G+dkM63Vs4X5WxkmA=",
+ "dev": true
+ },
+ "regenerator-runtime": {
+ "version": "0.10.5",
+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz",
+ "integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=",
+ "dev": true
+ },
+ "regenerator-transform": {
+ "version": "0.9.11",
+ "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.9.11.tgz",
+ "integrity": "sha1-On0GdSDLe3F2dp61/4aGkb7+EoM=",
+ "dev": true
+ },
+ "regex-cache": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz",
+ "integrity": "sha1-mxpsNdTQ3871cRrmUejp09cRQUU=",
+ "dev": true
+ },
+ "regexpu-core": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz",
+ "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=",
+ "dev": true
+ },
+ "regjsgen": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz",
+ "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=",
+ "dev": true
+ },
+ "regjsparser": {
+ "version": "0.1.5",
+ "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz",
+ "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=",
+ "dev": true
+ },
+ "remove-trailing-separator": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.0.2.tgz",
+ "integrity": "sha1-abBi2XhyetFNxrVrpKt3L9jXBRE=",
+ "dev": true
+ },
+ "repeat-element": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz",
+ "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=",
+ "dev": true
+ },
+ "repeat-string": {
+ "version": "1.6.1",
+ "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
+ "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=",
+ "dev": true
+ },
+ "repeating": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz",
+ "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=",
+ "dev": true
+ },
+ "replace-ext": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz",
+ "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=",
+ "dev": true
+ },
+ "require-dir": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/require-dir/-/require-dir-0.1.0.tgz",
+ "integrity": "sha1-geAeKZ+vW3TDS2WU+OWt1Zhd3sU=",
+ "dev": true
+ },
+ "requizzle": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.1.tgz",
+ "integrity": "sha1-aUPDUwxNmn5G8c3dUcFY/GcM294=",
+ "dev": true,
+ "dependencies": {
+ "underscore": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz",
+ "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=",
+ "dev": true
+ }
+ }
+ },
+ "resolve": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.3.3.tgz",
+ "integrity": "sha1-ZVkHw0aahoDcLeOidaj91paR8OU=",
+ "dev": true
+ },
+ "resolve-dir": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-0.1.1.tgz",
+ "integrity": "sha1-shklmlYC+sXFxJatiUpujMQwJh4=",
+ "dev": true
+ },
+ "resolve-from": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz",
+ "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=",
+ "dev": true
+ },
+ "restore-cursor": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz",
+ "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=",
+ "dev": true
+ },
+ "right-align": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz",
+ "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=",
+ "dev": true,
+ "optional": true
+ },
+ "rimraf": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz",
+ "integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=",
+ "dev": true,
+ "dependencies": {
+ "glob": {
+ "version": "7.1.2",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
+ "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
+ "dev": true
+ },
+ "minimatch": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
+ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
+ "dev": true
+ }
+ }
+ },
+ "run-async": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz",
+ "integrity": "sha1-yK1KXhEGYeQCp9IbUw4AnyX444k=",
+ "dev": true
+ },
+ "rx-lite": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz",
+ "integrity": "sha1-Gc5QLKVyZl87ZHsQk5+X/RYV8QI=",
+ "dev": true
+ },
+ "safe-buffer": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.0.tgz",
+ "integrity": "sha512-aSLEDudu6OoRr/2rU609gRmnYboRLxgDG1z9o2Q0os7236FwvcqIOO8r8U5JUEwivZOhDaKlFO4SbPTJYyBEyQ==",
+ "dev": true
+ },
+ "semver": {
+ "version": "4.3.6",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz",
+ "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=",
+ "dev": true
+ },
+ "sequencify": {
+ "version": "0.0.7",
+ "resolved": "https://registry.npmjs.org/sequencify/-/sequencify-0.0.7.tgz",
+ "integrity": "sha1-kM/xnQLgcCf9dn9erT57ldHnOAw=",
+ "dev": true
+ },
+ "set-immediate-shim": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz",
+ "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=",
+ "dev": true,
+ "optional": true
+ },
+ "shelljs": {
+ "version": "0.5.3",
+ "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.5.3.tgz",
+ "integrity": "sha1-xUmCuZbHbvDB5rWfvcWCX1txMRM=",
+ "dev": true
+ },
+ "sigmund": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz",
+ "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=",
+ "dev": true
+ },
+ "signal-exit": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
+ "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
+ "dev": true
+ },
+ "slash": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz",
+ "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=",
+ "dev": true
+ },
+ "source-map": {
+ "version": "0.4.4",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz",
+ "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=",
+ "dev": true
+ },
+ "source-map-support": {
+ "version": "0.4.15",
+ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.15.tgz",
+ "integrity": "sha1-AyAt9lwG0r2MfsI2KhkwVv7407E=",
+ "dev": true,
+ "dependencies": {
+ "source-map": {
+ "version": "0.5.6",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz",
+ "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=",
+ "dev": true
+ }
+ }
+ },
+ "sparkles": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.0.tgz",
+ "integrity": "sha1-Gsu/tZJDbRC76PeFt8xvgoFQEsM=",
+ "dev": true
+ },
+ "spdx-correct": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz",
+ "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=",
+ "dev": true
+ },
+ "spdx-expression-parse": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz",
+ "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=",
+ "dev": true
+ },
+ "spdx-license-ids": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz",
+ "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=",
+ "dev": true
+ },
+ "sprintf-js": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
+ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
+ "dev": true
+ },
+ "stream-consume": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.0.tgz",
+ "integrity": "sha1-pB6tGm1ggc63n2WwYZAbbY89HQ8=",
+ "dev": true
+ },
+ "streamfilter": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/streamfilter/-/streamfilter-1.0.5.tgz",
+ "integrity": "sha1-h1BxEb644phFFxe1Ec/tjwAqv1M=",
+ "dev": true,
+ "dependencies": {
+ "isarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
+ "dev": true
+ },
+ "readable-stream": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.0.tgz",
+ "integrity": "sha512-c7KMXGd4b48nN3OJ1U9qOsn6pXNzf6kLd3kdZCkg2sxAcoiufInqF0XckwEnlrcwuaYwonlNK8GQUIOC/WC7sg==",
+ "dev": true
+ },
+ "string_decoder": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.2.tgz",
+ "integrity": "sha1-sp4fThEl+pehA4K4pTNze3SR4Xk=",
+ "dev": true,
+ "dependencies": {
+ "safe-buffer": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz",
+ "integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c=",
+ "dev": true
+ }
+ }
+ }
+ }
+ },
+ "string_decoder": {
+ "version": "0.10.31",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+ "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
+ "dev": true
+ },
+ "string-width": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
+ "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
+ "dev": true
+ },
+ "strip-ansi": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
+ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
+ "dev": true
+ },
+ "strip-bom": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-1.0.0.tgz",
+ "integrity": "sha1-hbiGLzhEtabV7IRnqTWYFzo295Q=",
+ "dev": true
+ },
+ "strip-indent": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz",
+ "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=",
+ "dev": true
+ },
+ "strip-json-comments": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz",
+ "integrity": "sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=",
+ "dev": true
+ },
+ "supports-color": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
+ "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
+ "dev": true
+ },
+ "taffydb": {
+ "version": "2.6.2",
+ "resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.6.2.tgz",
+ "integrity": "sha1-fLy2S1oUG2ou/CxdLGe04VCyomg=",
+ "dev": true
+ },
+ "temp": {
+ "version": "0.8.3",
+ "resolved": "https://registry.npmjs.org/temp/-/temp-0.8.3.tgz",
+ "integrity": "sha1-4Ma8TSa5AxJEEOT+2BEDAU38H1k=",
+ "dev": true,
+ "dependencies": {
+ "rimraf": {
+ "version": "2.2.8",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz",
+ "integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI=",
+ "dev": true
+ }
+ }
+ },
+ "text-table": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
+ "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=",
+ "dev": true
+ },
+ "through": {
+ "version": "2.3.8",
+ "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
+ "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=",
+ "dev": true
+ },
+ "through2": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz",
+ "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=",
+ "dev": true,
+ "dependencies": {
+ "isarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
+ "dev": true
+ },
+ "readable-stream": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.0.tgz",
+ "integrity": "sha512-c7KMXGd4b48nN3OJ1U9qOsn6pXNzf6kLd3kdZCkg2sxAcoiufInqF0XckwEnlrcwuaYwonlNK8GQUIOC/WC7sg==",
+ "dev": true
+ },
+ "string_decoder": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.2.tgz",
+ "integrity": "sha1-sp4fThEl+pehA4K4pTNze3SR4Xk=",
+ "dev": true,
+ "dependencies": {
+ "safe-buffer": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz",
+ "integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c=",
+ "dev": true
+ }
+ }
+ }
+ }
+ },
+ "tildify": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/tildify/-/tildify-1.2.0.tgz",
+ "integrity": "sha1-3OwD9V3Km3qj5bBPIYF+tW5jWIo=",
+ "dev": true
+ },
+ "time-stamp": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz",
+ "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=",
+ "dev": true
+ },
+ "to-fast-properties": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz",
+ "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=",
+ "dev": true
+ },
+ "to-iso-string": {
+ "version": "0.0.2",
+ "resolved": "https://registry.npmjs.org/to-iso-string/-/to-iso-string-0.0.2.tgz",
+ "integrity": "sha1-TcGeZk38y+Jb2NtQiwDG2hWCVdE=",
+ "dev": true
+ },
+ "trim-newlines": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz",
+ "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=",
+ "dev": true
+ },
+ "trim-right": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz",
+ "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=",
+ "dev": true
+ },
+ "tryit": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/tryit/-/tryit-1.0.3.tgz",
+ "integrity": "sha1-OTvnMKlEb9Hq1tpZoBQwjzbCics=",
+ "dev": true
+ },
+ "type-check": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
+ "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=",
+ "dev": true
+ },
+ "type-detect": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-1.0.0.tgz",
+ "integrity": "sha1-diIXzAbbJY7EiQihKY6LlRIejqI=",
+ "dev": true
+ },
+ "typedarray": {
+ "version": "0.0.6",
+ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
+ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
+ "dev": true
+ },
+ "uglify-js": {
+ "version": "2.8.29",
+ "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz",
+ "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=",
+ "dev": true,
+ "optional": true,
+ "dependencies": {
+ "source-map": {
+ "version": "0.5.6",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz",
+ "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=",
+ "dev": true,
+ "optional": true
+ }
+ }
+ },
+ "uglify-to-browserify": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz",
+ "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=",
+ "dev": true,
+ "optional": true
+ },
+ "unc-path-regex": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz",
+ "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=",
+ "dev": true
+ },
+ "underscore": {
+ "version": "1.8.3",
+ "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz",
+ "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=",
+ "dev": true
+ },
+ "underscore-contrib": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/underscore-contrib/-/underscore-contrib-0.3.0.tgz",
+ "integrity": "sha1-ZltmwkeD+PorGMn4y7Dix9SMJsc=",
+ "dev": true,
+ "dependencies": {
+ "underscore": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz",
+ "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=",
+ "dev": true
+ }
+ }
+ },
+ "unique-stream": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-1.0.0.tgz",
+ "integrity": "sha1-1ZpKdUJ0R9mqbJHnAmP40mpLEEs=",
+ "dev": true
+ },
+ "user-home": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz",
+ "integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA=",
+ "dev": true
+ },
+ "util-deprecate": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
+ "dev": true
+ },
+ "v8flags": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz",
+ "integrity": "sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ=",
+ "dev": true
+ },
+ "validate-npm-package-license": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz",
+ "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=",
+ "dev": true
+ },
+ "vinyl": {
+ "version": "0.5.3",
+ "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz",
+ "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=",
+ "dev": true
+ },
+ "vinyl-fs": {
+ "version": "0.3.14",
+ "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-0.3.14.tgz",
+ "integrity": "sha1-mmhRzhysHBzqX+hsCTHWIMLPqeY=",
+ "dev": true,
+ "dependencies": {
+ "clone": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz",
+ "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=",
+ "dev": true
+ },
+ "readable-stream": {
+ "version": "1.0.34",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
+ "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
+ "dev": true
+ },
+ "through2": {
+ "version": "0.6.5",
+ "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz",
+ "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=",
+ "dev": true
+ },
+ "vinyl": {
+ "version": "0.4.6",
+ "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz",
+ "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=",
+ "dev": true
+ }
+ }
+ },
+ "which": {
+ "version": "1.2.14",
+ "resolved": "https://registry.npmjs.org/which/-/which-1.2.14.tgz",
+ "integrity": "sha1-mofEN48D6CfOyvGs31bHNsAcFOU=",
+ "dev": true
+ },
+ "window-size": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz",
+ "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=",
+ "dev": true,
+ "optional": true
+ },
+ "wordwrap": {
+ "version": "0.0.3",
+ "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz",
+ "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=",
+ "dev": true
+ },
+ "wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
+ "dev": true
+ },
+ "write": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz",
+ "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=",
+ "dev": true
+ },
+ "xml-escape": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/xml-escape/-/xml-escape-1.0.0.tgz",
+ "integrity": "sha1-AJY9aXsq3wwYXE4E5zF0upsojrI=",
+ "dev": true
+ },
+ "xtend": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
+ "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=",
+ "dev": true
+ },
+ "yargs": {
+ "version": "3.10.0",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz",
+ "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=",
+ "dev": true,
+ "optional": true,
+ "dependencies": {
+ "camelcase": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz",
+ "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=",
+ "dev": true,
+ "optional": true
+ }
+ }
+ }
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/esrecurse/package.json b/tools/node_modules/eslint/node_modules/esrecurse/package.json
new file mode 100755
index 0000000000..2dc214aa33
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/esrecurse/package.json
@@ -0,0 +1,81 @@
+{
+ "_from": "esrecurse@^4.1.0",
+ "_id": "esrecurse@4.2.0",
+ "_inBundle": false,
+ "_integrity": "sha1-+pVo2Y04I/mkHZHpAtyrnqblsWM=",
+ "_location": "/eslint/esrecurse",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "esrecurse@^4.1.0",
+ "name": "esrecurse",
+ "escapedName": "esrecurse",
+ "rawSpec": "^4.1.0",
+ "saveSpec": null,
+ "fetchSpec": "^4.1.0"
+ },
+ "_requiredBy": [
+ "/eslint/eslint-scope"
+ ],
+ "_resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.0.tgz",
+ "_shasum": "fa9568d98d3823f9a41d91e902dcab9ea6e5b163",
+ "_spec": "esrecurse@^4.1.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/eslint-scope",
+ "babel": {
+ "presets": [
+ "es2015"
+ ]
+ },
+ "bugs": {
+ "url": "https://github.com/estools/esrecurse/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "estraverse": "^4.1.0",
+ "object-assign": "^4.0.1"
+ },
+ "deprecated": false,
+ "description": "ECMAScript AST recursive visitor",
+ "devDependencies": {
+ "babel-cli": "^6.24.1",
+ "babel-eslint": "^7.2.3",
+ "babel-preset-es2015": "^6.24.1",
+ "babel-register": "^6.24.1",
+ "chai": "^4.0.2",
+ "esprima": "^4.0.0",
+ "gulp": "^3.9.0",
+ "gulp-bump": "^2.7.0",
+ "gulp-eslint": "^4.0.0",
+ "gulp-filter": "^5.0.0",
+ "gulp-git": "^2.4.1",
+ "gulp-mocha": "^4.3.1",
+ "gulp-tag-version": "^1.2.1",
+ "jsdoc": "^3.3.0-alpha10",
+ "minimist": "^1.1.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "homepage": "https://github.com/estools/esrecurse",
+ "license": "BSD-2-Clause",
+ "main": "esrecurse.js",
+ "maintainers": [
+ {
+ "name": "Yusuke Suzuki",
+ "email": "utatane.tea@gmail.com",
+ "url": "https://github.com/Constellation"
+ }
+ ],
+ "name": "esrecurse",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/estools/esrecurse.git"
+ },
+ "scripts": {
+ "lint": "gulp lint",
+ "test": "gulp travis",
+ "unit-test": "gulp test"
+ },
+ "version": "4.2.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/estraverse/.babelrc b/tools/node_modules/eslint/node_modules/estraverse/.babelrc
new file mode 100644
index 0000000000..dc1bc4f9cd
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/estraverse/.babelrc
@@ -0,0 +1,3 @@
+{
+ "presets": ["es2015"]
+} \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/estraverse/LICENSE.BSD b/tools/node_modules/eslint/node_modules/estraverse/LICENSE.BSD
new file mode 100644
index 0000000000..3e580c355a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/estraverse/LICENSE.BSD
@@ -0,0 +1,19 @@
+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.
+
+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 <COPYRIGHT HOLDER> 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/tools/node_modules/eslint/node_modules/estraverse/estraverse.js b/tools/node_modules/eslint/node_modules/estraverse/estraverse.js
new file mode 100644
index 0000000000..09ae478324
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/estraverse/estraverse.js
@@ -0,0 +1,849 @@
+/*
+ Copyright (C) 2012-2013 Yusuke Suzuki <utatane.tea@gmail.com>
+ Copyright (C) 2012 Ariya Hidayat <ariya.hidayat@gmail.com>
+
+ 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.
+
+ 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 <COPYRIGHT HOLDER> 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.
+*/
+/*jslint vars:false, bitwise:true*/
+/*jshint indent:4*/
+/*global exports:true*/
+(function clone(exports) {
+ 'use strict';
+
+ var Syntax,
+ isArray,
+ VisitorOption,
+ VisitorKeys,
+ objectCreate,
+ objectKeys,
+ BREAK,
+ SKIP,
+ REMOVE;
+
+ function ignoreJSHintError() { }
+
+ isArray = Array.isArray;
+ if (!isArray) {
+ isArray = function isArray(array) {
+ return Object.prototype.toString.call(array) === '[object Array]';
+ };
+ }
+
+ function deepCopy(obj) {
+ var ret = {}, key, val;
+ for (key in obj) {
+ if (obj.hasOwnProperty(key)) {
+ val = obj[key];
+ if (typeof val === 'object' && val !== null) {
+ ret[key] = deepCopy(val);
+ } else {
+ ret[key] = val;
+ }
+ }
+ }
+ return ret;
+ }
+
+ function shallowCopy(obj) {
+ var ret = {}, key;
+ for (key in obj) {
+ if (obj.hasOwnProperty(key)) {
+ ret[key] = obj[key];
+ }
+ }
+ return ret;
+ }
+ ignoreJSHintError(shallowCopy);
+
+ // based on LLVM libc++ upper_bound / lower_bound
+ // MIT License
+
+ function upperBound(array, func) {
+ var diff, len, i, current;
+
+ len = array.length;
+ i = 0;
+
+ while (len) {
+ diff = len >>> 1;
+ current = i + diff;
+ if (func(array[current])) {
+ len = diff;
+ } else {
+ i = current + 1;
+ len -= diff + 1;
+ }
+ }
+ return i;
+ }
+
+ function lowerBound(array, func) {
+ var diff, len, i, current;
+
+ len = array.length;
+ i = 0;
+
+ while (len) {
+ diff = len >>> 1;
+ current = i + diff;
+ if (func(array[current])) {
+ i = current + 1;
+ len -= diff + 1;
+ } else {
+ len = diff;
+ }
+ }
+ return i;
+ }
+ ignoreJSHintError(lowerBound);
+
+ objectCreate = Object.create || (function () {
+ function F() { }
+
+ return function (o) {
+ F.prototype = o;
+ return new F();
+ };
+ })();
+
+ objectKeys = Object.keys || function (o) {
+ var keys = [], key;
+ for (key in o) {
+ keys.push(key);
+ }
+ return keys;
+ };
+
+ function extend(to, from) {
+ var keys = objectKeys(from), key, i, len;
+ for (i = 0, len = keys.length; i < len; i += 1) {
+ key = keys[i];
+ to[key] = from[key];
+ }
+ return to;
+ }
+
+ Syntax = {
+ AssignmentExpression: 'AssignmentExpression',
+ AssignmentPattern: 'AssignmentPattern',
+ ArrayExpression: 'ArrayExpression',
+ ArrayPattern: 'ArrayPattern',
+ ArrowFunctionExpression: 'ArrowFunctionExpression',
+ AwaitExpression: 'AwaitExpression', // CAUTION: It's deferred to ES7.
+ BlockStatement: 'BlockStatement',
+ BinaryExpression: 'BinaryExpression',
+ BreakStatement: 'BreakStatement',
+ CallExpression: 'CallExpression',
+ CatchClause: 'CatchClause',
+ ClassBody: 'ClassBody',
+ ClassDeclaration: 'ClassDeclaration',
+ ClassExpression: 'ClassExpression',
+ ComprehensionBlock: 'ComprehensionBlock', // CAUTION: It's deferred to ES7.
+ ComprehensionExpression: 'ComprehensionExpression', // CAUTION: It's deferred to ES7.
+ ConditionalExpression: 'ConditionalExpression',
+ ContinueStatement: 'ContinueStatement',
+ DebuggerStatement: 'DebuggerStatement',
+ DirectiveStatement: 'DirectiveStatement',
+ DoWhileStatement: 'DoWhileStatement',
+ EmptyStatement: 'EmptyStatement',
+ ExportAllDeclaration: 'ExportAllDeclaration',
+ ExportDefaultDeclaration: 'ExportDefaultDeclaration',
+ ExportNamedDeclaration: 'ExportNamedDeclaration',
+ ExportSpecifier: 'ExportSpecifier',
+ ExpressionStatement: 'ExpressionStatement',
+ ForStatement: 'ForStatement',
+ ForInStatement: 'ForInStatement',
+ ForOfStatement: 'ForOfStatement',
+ FunctionDeclaration: 'FunctionDeclaration',
+ FunctionExpression: 'FunctionExpression',
+ GeneratorExpression: 'GeneratorExpression', // CAUTION: It's deferred to ES7.
+ Identifier: 'Identifier',
+ IfStatement: 'IfStatement',
+ ImportDeclaration: 'ImportDeclaration',
+ ImportDefaultSpecifier: 'ImportDefaultSpecifier',
+ ImportNamespaceSpecifier: 'ImportNamespaceSpecifier',
+ ImportSpecifier: 'ImportSpecifier',
+ Literal: 'Literal',
+ LabeledStatement: 'LabeledStatement',
+ LogicalExpression: 'LogicalExpression',
+ MemberExpression: 'MemberExpression',
+ MetaProperty: 'MetaProperty',
+ MethodDefinition: 'MethodDefinition',
+ ModuleSpecifier: 'ModuleSpecifier',
+ NewExpression: 'NewExpression',
+ ObjectExpression: 'ObjectExpression',
+ ObjectPattern: 'ObjectPattern',
+ Program: 'Program',
+ Property: 'Property',
+ RestElement: 'RestElement',
+ ReturnStatement: 'ReturnStatement',
+ SequenceExpression: 'SequenceExpression',
+ SpreadElement: 'SpreadElement',
+ Super: 'Super',
+ SwitchStatement: 'SwitchStatement',
+ SwitchCase: 'SwitchCase',
+ TaggedTemplateExpression: 'TaggedTemplateExpression',
+ TemplateElement: 'TemplateElement',
+ TemplateLiteral: 'TemplateLiteral',
+ ThisExpression: 'ThisExpression',
+ ThrowStatement: 'ThrowStatement',
+ TryStatement: 'TryStatement',
+ UnaryExpression: 'UnaryExpression',
+ UpdateExpression: 'UpdateExpression',
+ VariableDeclaration: 'VariableDeclaration',
+ VariableDeclarator: 'VariableDeclarator',
+ WhileStatement: 'WhileStatement',
+ WithStatement: 'WithStatement',
+ YieldExpression: 'YieldExpression'
+ };
+
+ VisitorKeys = {
+ AssignmentExpression: ['left', 'right'],
+ AssignmentPattern: ['left', 'right'],
+ ArrayExpression: ['elements'],
+ ArrayPattern: ['elements'],
+ ArrowFunctionExpression: ['params', 'body'],
+ AwaitExpression: ['argument'], // CAUTION: It's deferred to ES7.
+ BlockStatement: ['body'],
+ BinaryExpression: ['left', 'right'],
+ BreakStatement: ['label'],
+ CallExpression: ['callee', 'arguments'],
+ CatchClause: ['param', 'body'],
+ ClassBody: ['body'],
+ ClassDeclaration: ['id', 'superClass', 'body'],
+ ClassExpression: ['id', 'superClass', 'body'],
+ ComprehensionBlock: ['left', 'right'], // CAUTION: It's deferred to ES7.
+ ComprehensionExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7.
+ ConditionalExpression: ['test', 'consequent', 'alternate'],
+ ContinueStatement: ['label'],
+ DebuggerStatement: [],
+ DirectiveStatement: [],
+ DoWhileStatement: ['body', 'test'],
+ EmptyStatement: [],
+ ExportAllDeclaration: ['source'],
+ ExportDefaultDeclaration: ['declaration'],
+ ExportNamedDeclaration: ['declaration', 'specifiers', 'source'],
+ ExportSpecifier: ['exported', 'local'],
+ ExpressionStatement: ['expression'],
+ ForStatement: ['init', 'test', 'update', 'body'],
+ ForInStatement: ['left', 'right', 'body'],
+ ForOfStatement: ['left', 'right', 'body'],
+ FunctionDeclaration: ['id', 'params', 'body'],
+ FunctionExpression: ['id', 'params', 'body'],
+ GeneratorExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7.
+ Identifier: [],
+ IfStatement: ['test', 'consequent', 'alternate'],
+ ImportDeclaration: ['specifiers', 'source'],
+ ImportDefaultSpecifier: ['local'],
+ ImportNamespaceSpecifier: ['local'],
+ ImportSpecifier: ['imported', 'local'],
+ Literal: [],
+ LabeledStatement: ['label', 'body'],
+ LogicalExpression: ['left', 'right'],
+ MemberExpression: ['object', 'property'],
+ MetaProperty: ['meta', 'property'],
+ MethodDefinition: ['key', 'value'],
+ ModuleSpecifier: [],
+ NewExpression: ['callee', 'arguments'],
+ ObjectExpression: ['properties'],
+ ObjectPattern: ['properties'],
+ Program: ['body'],
+ Property: ['key', 'value'],
+ RestElement: [ 'argument' ],
+ ReturnStatement: ['argument'],
+ SequenceExpression: ['expressions'],
+ SpreadElement: ['argument'],
+ Super: [],
+ SwitchStatement: ['discriminant', 'cases'],
+ SwitchCase: ['test', 'consequent'],
+ TaggedTemplateExpression: ['tag', 'quasi'],
+ TemplateElement: [],
+ TemplateLiteral: ['quasis', 'expressions'],
+ ThisExpression: [],
+ ThrowStatement: ['argument'],
+ TryStatement: ['block', 'handler', 'finalizer'],
+ UnaryExpression: ['argument'],
+ UpdateExpression: ['argument'],
+ VariableDeclaration: ['declarations'],
+ VariableDeclarator: ['id', 'init'],
+ WhileStatement: ['test', 'body'],
+ WithStatement: ['object', 'body'],
+ YieldExpression: ['argument']
+ };
+
+ // unique id
+ BREAK = {};
+ SKIP = {};
+ REMOVE = {};
+
+ VisitorOption = {
+ Break: BREAK,
+ Skip: SKIP,
+ Remove: REMOVE
+ };
+
+ function Reference(parent, key) {
+ this.parent = parent;
+ this.key = key;
+ }
+
+ Reference.prototype.replace = function replace(node) {
+ this.parent[this.key] = node;
+ };
+
+ Reference.prototype.remove = function remove() {
+ if (isArray(this.parent)) {
+ this.parent.splice(this.key, 1);
+ return true;
+ } else {
+ this.replace(null);
+ return false;
+ }
+ };
+
+ function Element(node, path, wrap, ref) {
+ this.node = node;
+ this.path = path;
+ this.wrap = wrap;
+ this.ref = ref;
+ }
+
+ function Controller() { }
+
+ // API:
+ // return property path array from root to current node
+ Controller.prototype.path = function path() {
+ var i, iz, j, jz, result, element;
+
+ function addToPath(result, path) {
+ if (isArray(path)) {
+ for (j = 0, jz = path.length; j < jz; ++j) {
+ result.push(path[j]);
+ }
+ } else {
+ result.push(path);
+ }
+ }
+
+ // root node
+ if (!this.__current.path) {
+ return null;
+ }
+
+ // first node is sentinel, second node is root element
+ result = [];
+ for (i = 2, iz = this.__leavelist.length; i < iz; ++i) {
+ element = this.__leavelist[i];
+ addToPath(result, element.path);
+ }
+ addToPath(result, this.__current.path);
+ return result;
+ };
+
+ // API:
+ // return type of current node
+ Controller.prototype.type = function () {
+ var node = this.current();
+ return node.type || this.__current.wrap;
+ };
+
+ // API:
+ // return array of parent elements
+ Controller.prototype.parents = function parents() {
+ var i, iz, result;
+
+ // first node is sentinel
+ result = [];
+ for (i = 1, iz = this.__leavelist.length; i < iz; ++i) {
+ result.push(this.__leavelist[i].node);
+ }
+
+ return result;
+ };
+
+ // API:
+ // return current node
+ Controller.prototype.current = function current() {
+ return this.__current.node;
+ };
+
+ Controller.prototype.__execute = function __execute(callback, element) {
+ var previous, result;
+
+ result = undefined;
+
+ previous = this.__current;
+ this.__current = element;
+ this.__state = null;
+ if (callback) {
+ result = callback.call(this, element.node, this.__leavelist[this.__leavelist.length - 1].node);
+ }
+ this.__current = previous;
+
+ return result;
+ };
+
+ // API:
+ // notify control skip / break
+ Controller.prototype.notify = function notify(flag) {
+ this.__state = flag;
+ };
+
+ // API:
+ // skip child nodes of current node
+ Controller.prototype.skip = function () {
+ this.notify(SKIP);
+ };
+
+ // API:
+ // break traversals
+ Controller.prototype['break'] = function () {
+ this.notify(BREAK);
+ };
+
+ // API:
+ // remove node
+ Controller.prototype.remove = function () {
+ this.notify(REMOVE);
+ };
+
+ Controller.prototype.__initialize = function(root, visitor) {
+ this.visitor = visitor;
+ this.root = root;
+ this.__worklist = [];
+ this.__leavelist = [];
+ this.__current = null;
+ this.__state = null;
+ this.__fallback = null;
+ if (visitor.fallback === 'iteration') {
+ this.__fallback = objectKeys;
+ } else if (typeof visitor.fallback === 'function') {
+ this.__fallback = visitor.fallback;
+ }
+
+ this.__keys = VisitorKeys;
+ if (visitor.keys) {
+ this.__keys = extend(objectCreate(this.__keys), visitor.keys);
+ }
+ };
+
+ function isNode(node) {
+ if (node == null) {
+ return false;
+ }
+ return typeof node === 'object' && typeof node.type === 'string';
+ }
+
+ function isProperty(nodeType, key) {
+ return (nodeType === Syntax.ObjectExpression || nodeType === Syntax.ObjectPattern) && 'properties' === key;
+ }
+
+ Controller.prototype.traverse = function traverse(root, visitor) {
+ var worklist,
+ leavelist,
+ element,
+ node,
+ nodeType,
+ ret,
+ key,
+ current,
+ current2,
+ candidates,
+ candidate,
+ sentinel;
+
+ this.__initialize(root, visitor);
+
+ sentinel = {};
+
+ // reference
+ worklist = this.__worklist;
+ leavelist = this.__leavelist;
+
+ // initialize
+ worklist.push(new Element(root, null, null, null));
+ leavelist.push(new Element(null, null, null, null));
+
+ while (worklist.length) {
+ element = worklist.pop();
+
+ if (element === sentinel) {
+ element = leavelist.pop();
+
+ ret = this.__execute(visitor.leave, element);
+
+ if (this.__state === BREAK || ret === BREAK) {
+ return;
+ }
+ continue;
+ }
+
+ if (element.node) {
+
+ ret = this.__execute(visitor.enter, element);
+
+ if (this.__state === BREAK || ret === BREAK) {
+ return;
+ }
+
+ worklist.push(sentinel);
+ leavelist.push(element);
+
+ if (this.__state === SKIP || ret === SKIP) {
+ continue;
+ }
+
+ node = element.node;
+ nodeType = node.type || element.wrap;
+ candidates = this.__keys[nodeType];
+ if (!candidates) {
+ if (this.__fallback) {
+ candidates = this.__fallback(node);
+ } else {
+ throw new Error('Unknown node type ' + nodeType + '.');
+ }
+ }
+
+ current = candidates.length;
+ while ((current -= 1) >= 0) {
+ key = candidates[current];
+ candidate = node[key];
+ if (!candidate) {
+ continue;
+ }
+
+ if (isArray(candidate)) {
+ current2 = candidate.length;
+ while ((current2 -= 1) >= 0) {
+ if (!candidate[current2]) {
+ continue;
+ }
+ if (isProperty(nodeType, candidates[current])) {
+ element = new Element(candidate[current2], [key, current2], 'Property', null);
+ } else if (isNode(candidate[current2])) {
+ element = new Element(candidate[current2], [key, current2], null, null);
+ } else {
+ continue;
+ }
+ worklist.push(element);
+ }
+ } else if (isNode(candidate)) {
+ worklist.push(new Element(candidate, key, null, null));
+ }
+ }
+ }
+ }
+ };
+
+ Controller.prototype.replace = function replace(root, visitor) {
+ var worklist,
+ leavelist,
+ node,
+ nodeType,
+ target,
+ element,
+ current,
+ current2,
+ candidates,
+ candidate,
+ sentinel,
+ outer,
+ key;
+
+ function removeElem(element) {
+ var i,
+ key,
+ nextElem,
+ parent;
+
+ if (element.ref.remove()) {
+ // When the reference is an element of an array.
+ key = element.ref.key;
+ parent = element.ref.parent;
+
+ // If removed from array, then decrease following items' keys.
+ i = worklist.length;
+ while (i--) {
+ nextElem = worklist[i];
+ if (nextElem.ref && nextElem.ref.parent === parent) {
+ if (nextElem.ref.key < key) {
+ break;
+ }
+ --nextElem.ref.key;
+ }
+ }
+ }
+ }
+
+ this.__initialize(root, visitor);
+
+ sentinel = {};
+
+ // reference
+ worklist = this.__worklist;
+ leavelist = this.__leavelist;
+
+ // initialize
+ outer = {
+ root: root
+ };
+ element = new Element(root, null, null, new Reference(outer, 'root'));
+ worklist.push(element);
+ leavelist.push(element);
+
+ while (worklist.length) {
+ element = worklist.pop();
+
+ if (element === sentinel) {
+ element = leavelist.pop();
+
+ target = this.__execute(visitor.leave, element);
+
+ // node may be replaced with null,
+ // so distinguish between undefined and null in this place
+ if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) {
+ // replace
+ element.ref.replace(target);
+ }
+
+ if (this.__state === REMOVE || target === REMOVE) {
+ removeElem(element);
+ }
+
+ if (this.__state === BREAK || target === BREAK) {
+ return outer.root;
+ }
+ continue;
+ }
+
+ target = this.__execute(visitor.enter, element);
+
+ // node may be replaced with null,
+ // so distinguish between undefined and null in this place
+ if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) {
+ // replace
+ element.ref.replace(target);
+ element.node = target;
+ }
+
+ if (this.__state === REMOVE || target === REMOVE) {
+ removeElem(element);
+ element.node = null;
+ }
+
+ if (this.__state === BREAK || target === BREAK) {
+ return outer.root;
+ }
+
+ // node may be null
+ node = element.node;
+ if (!node) {
+ continue;
+ }
+
+ worklist.push(sentinel);
+ leavelist.push(element);
+
+ if (this.__state === SKIP || target === SKIP) {
+ continue;
+ }
+
+ nodeType = node.type || element.wrap;
+ candidates = this.__keys[nodeType];
+ if (!candidates) {
+ if (this.__fallback) {
+ candidates = this.__fallback(node);
+ } else {
+ throw new Error('Unknown node type ' + nodeType + '.');
+ }
+ }
+
+ current = candidates.length;
+ while ((current -= 1) >= 0) {
+ key = candidates[current];
+ candidate = node[key];
+ if (!candidate) {
+ continue;
+ }
+
+ if (isArray(candidate)) {
+ current2 = candidate.length;
+ while ((current2 -= 1) >= 0) {
+ if (!candidate[current2]) {
+ continue;
+ }
+ if (isProperty(nodeType, candidates[current])) {
+ element = new Element(candidate[current2], [key, current2], 'Property', new Reference(candidate, current2));
+ } else if (isNode(candidate[current2])) {
+ element = new Element(candidate[current2], [key, current2], null, new Reference(candidate, current2));
+ } else {
+ continue;
+ }
+ worklist.push(element);
+ }
+ } else if (isNode(candidate)) {
+ worklist.push(new Element(candidate, key, null, new Reference(node, key)));
+ }
+ }
+ }
+
+ return outer.root;
+ };
+
+ function traverse(root, visitor) {
+ var controller = new Controller();
+ return controller.traverse(root, visitor);
+ }
+
+ function replace(root, visitor) {
+ var controller = new Controller();
+ return controller.replace(root, visitor);
+ }
+
+ function extendCommentRange(comment, tokens) {
+ var target;
+
+ target = upperBound(tokens, function search(token) {
+ return token.range[0] > comment.range[0];
+ });
+
+ comment.extendedRange = [comment.range[0], comment.range[1]];
+
+ if (target !== tokens.length) {
+ comment.extendedRange[1] = tokens[target].range[0];
+ }
+
+ target -= 1;
+ if (target >= 0) {
+ comment.extendedRange[0] = tokens[target].range[1];
+ }
+
+ return comment;
+ }
+
+ function attachComments(tree, providedComments, tokens) {
+ // At first, we should calculate extended comment ranges.
+ var comments = [], comment, len, i, cursor;
+
+ if (!tree.range) {
+ throw new Error('attachComments needs range information');
+ }
+
+ // tokens array is empty, we attach comments to tree as 'leadingComments'
+ if (!tokens.length) {
+ if (providedComments.length) {
+ for (i = 0, len = providedComments.length; i < len; i += 1) {
+ comment = deepCopy(providedComments[i]);
+ comment.extendedRange = [0, tree.range[0]];
+ comments.push(comment);
+ }
+ tree.leadingComments = comments;
+ }
+ return tree;
+ }
+
+ for (i = 0, len = providedComments.length; i < len; i += 1) {
+ comments.push(extendCommentRange(deepCopy(providedComments[i]), tokens));
+ }
+
+ // This is based on John Freeman's implementation.
+ cursor = 0;
+ traverse(tree, {
+ enter: function (node) {
+ var comment;
+
+ while (cursor < comments.length) {
+ comment = comments[cursor];
+ if (comment.extendedRange[1] > node.range[0]) {
+ break;
+ }
+
+ if (comment.extendedRange[1] === node.range[0]) {
+ if (!node.leadingComments) {
+ node.leadingComments = [];
+ }
+ node.leadingComments.push(comment);
+ comments.splice(cursor, 1);
+ } else {
+ cursor += 1;
+ }
+ }
+
+ // already out of owned node
+ if (cursor === comments.length) {
+ return VisitorOption.Break;
+ }
+
+ if (comments[cursor].extendedRange[0] > node.range[1]) {
+ return VisitorOption.Skip;
+ }
+ }
+ });
+
+ cursor = 0;
+ traverse(tree, {
+ leave: function (node) {
+ var comment;
+
+ while (cursor < comments.length) {
+ comment = comments[cursor];
+ if (node.range[1] < comment.extendedRange[0]) {
+ break;
+ }
+
+ if (node.range[1] === comment.extendedRange[0]) {
+ if (!node.trailingComments) {
+ node.trailingComments = [];
+ }
+ node.trailingComments.push(comment);
+ comments.splice(cursor, 1);
+ } else {
+ cursor += 1;
+ }
+ }
+
+ // already out of owned node
+ if (cursor === comments.length) {
+ return VisitorOption.Break;
+ }
+
+ if (comments[cursor].extendedRange[0] > node.range[1]) {
+ return VisitorOption.Skip;
+ }
+ }
+ });
+
+ return tree;
+ }
+
+ exports.version = require('./package.json').version;
+ exports.Syntax = Syntax;
+ exports.traverse = traverse;
+ exports.replace = replace;
+ exports.attachComments = attachComments;
+ exports.VisitorKeys = VisitorKeys;
+ exports.VisitorOption = VisitorOption;
+ exports.Controller = Controller;
+ exports.cloneEnvironment = function () { return clone({}); };
+
+ return exports;
+}(exports));
+/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/node_modules/eslint/node_modules/estraverse/package.json b/tools/node_modules/eslint/node_modules/estraverse/package.json
new file mode 100644
index 0000000000..65841c3e4e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/estraverse/package.json
@@ -0,0 +1,71 @@
+{
+ "_from": "estraverse@^4.2.0",
+ "_id": "estraverse@4.2.0",
+ "_inBundle": false,
+ "_integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=",
+ "_location": "/eslint/estraverse",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "estraverse@^4.2.0",
+ "name": "estraverse",
+ "escapedName": "estraverse",
+ "rawSpec": "^4.2.0",
+ "saveSpec": null,
+ "fetchSpec": "^4.2.0"
+ },
+ "_requiredBy": [
+ "/eslint",
+ "/eslint/eslint-scope",
+ "/eslint/esquery",
+ "/eslint/esrecurse"
+ ],
+ "_resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz",
+ "_shasum": "0dee3fed31fcd469618ce7342099fc1afa0bdb13",
+ "_spec": "estraverse@^4.2.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint",
+ "bugs": {
+ "url": "https://github.com/estools/estraverse/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "ECMAScript JS AST traversal functions",
+ "devDependencies": {
+ "babel-preset-es2015": "^6.3.13",
+ "babel-register": "^6.3.13",
+ "chai": "^2.1.1",
+ "espree": "^1.11.0",
+ "gulp": "^3.8.10",
+ "gulp-bump": "^0.2.2",
+ "gulp-filter": "^2.0.0",
+ "gulp-git": "^1.0.1",
+ "gulp-tag-version": "^1.2.1",
+ "jshint": "^2.5.6",
+ "mocha": "^2.1.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "homepage": "https://github.com/estools/estraverse",
+ "license": "BSD-2-Clause",
+ "main": "estraverse.js",
+ "maintainers": [
+ {
+ "name": "Yusuke Suzuki",
+ "email": "utatane.tea@gmail.com",
+ "url": "http://github.com/Constellation"
+ }
+ ],
+ "name": "estraverse",
+ "repository": {
+ "type": "git",
+ "url": "git+ssh://git@github.com/estools/estraverse.git"
+ },
+ "scripts": {
+ "lint": "jshint estraverse.js",
+ "test": "npm run-script lint && npm run-script unit-test",
+ "unit-test": "mocha --compilers js:babel-register"
+ },
+ "version": "4.2.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/esutils/LICENSE.BSD b/tools/node_modules/eslint/node_modules/esutils/LICENSE.BSD
new file mode 100644
index 0000000000..3e580c355a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/esutils/LICENSE.BSD
@@ -0,0 +1,19 @@
+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.
+
+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 <COPYRIGHT HOLDER> 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/tools/node_modules/eslint/node_modules/esutils/README.md b/tools/node_modules/eslint/node_modules/esutils/README.md
new file mode 100644
index 0000000000..610d8bde66
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/esutils/README.md
@@ -0,0 +1,169 @@
+### esutils [![Build Status](https://secure.travis-ci.org/estools/esutils.svg)](http://travis-ci.org/estools/esutils)
+esutils ([esutils](http://github.com/estools/esutils)) is
+utility box for ECMAScript language tools.
+
+### API
+
+### ast
+
+#### ast.isExpression(node)
+
+Returns true if `node` is an Expression as defined in ECMA262 edition 5.1 section
+[11](https://es5.github.io/#x11).
+
+#### ast.isStatement(node)
+
+Returns true if `node` is a Statement as defined in ECMA262 edition 5.1 section
+[12](https://es5.github.io/#x12).
+
+#### ast.isIterationStatement(node)
+
+Returns true if `node` is an IterationStatement as defined in ECMA262 edition
+5.1 section [12.6](https://es5.github.io/#x12.6).
+
+#### ast.isSourceElement(node)
+
+Returns true if `node` is a SourceElement as defined in ECMA262 edition 5.1
+section [14](https://es5.github.io/#x14).
+
+#### ast.trailingStatement(node)
+
+Returns `Statement?` if `node` has trailing `Statement`.
+```js
+if (cond)
+ consequent;
+```
+When taking this `IfStatement`, returns `consequent;` statement.
+
+#### ast.isProblematicIfStatement(node)
+
+Returns true if `node` is a problematic IfStatement. If `node` is a problematic `IfStatement`, `node` cannot be represented as an one on one JavaScript code.
+```js
+{
+ type: 'IfStatement',
+ consequent: {
+ type: 'WithStatement',
+ body: {
+ type: 'IfStatement',
+ consequent: {type: 'EmptyStatement'}
+ }
+ },
+ alternate: {type: 'EmptyStatement'}
+}
+```
+The above node cannot be represented as a JavaScript code, since the top level `else` alternate belongs to an inner `IfStatement`.
+
+
+### code
+
+#### code.isDecimalDigit(code)
+
+Return true if provided code is decimal digit.
+
+#### code.isHexDigit(code)
+
+Return true if provided code is hexadecimal digit.
+
+#### code.isOctalDigit(code)
+
+Return true if provided code is octal digit.
+
+#### code.isWhiteSpace(code)
+
+Return true if provided code is white space. White space characters are formally defined in ECMA262.
+
+#### code.isLineTerminator(code)
+
+Return true if provided code is line terminator. Line terminator characters are formally defined in ECMA262.
+
+#### code.isIdentifierStart(code)
+
+Return true if provided code can be the first character of ECMA262 Identifier. They are formally defined in ECMA262.
+
+#### code.isIdentifierPart(code)
+
+Return true if provided code can be the trailing character of ECMA262 Identifier. They are formally defined in ECMA262.
+
+### keyword
+
+#### keyword.isKeywordES5(id, strict)
+
+Returns `true` if provided identifier string is a Keyword or Future Reserved Word
+in ECMA262 edition 5.1. They are formally defined in ECMA262 sections
+[7.6.1.1](http://es5.github.io/#x7.6.1.1) and [7.6.1.2](http://es5.github.io/#x7.6.1.2),
+respectively. If the `strict` flag is truthy, this function additionally checks whether
+`id` is a Keyword or Future Reserved Word under strict mode.
+
+#### keyword.isKeywordES6(id, strict)
+
+Returns `true` if provided identifier string is a Keyword or Future Reserved Word
+in ECMA262 edition 6. They are formally defined in ECMA262 sections
+[11.6.2.1](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-keywords) and
+[11.6.2.2](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-future-reserved-words),
+respectively. If the `strict` flag is truthy, this function additionally checks whether
+`id` is a Keyword or Future Reserved Word under strict mode.
+
+#### keyword.isReservedWordES5(id, strict)
+
+Returns `true` if provided identifier string is a Reserved Word in ECMA262 edition 5.1.
+They are formally defined in ECMA262 section [7.6.1](http://es5.github.io/#x7.6.1).
+If the `strict` flag is truthy, this function additionally checks whether `id`
+is a Reserved Word under strict mode.
+
+#### keyword.isReservedWordES6(id, strict)
+
+Returns `true` if provided identifier string is a Reserved Word in ECMA262 edition 6.
+They are formally defined in ECMA262 section [11.6.2](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-reserved-words).
+If the `strict` flag is truthy, this function additionally checks whether `id`
+is a Reserved Word under strict mode.
+
+#### keyword.isRestrictedWord(id)
+
+Returns `true` if provided identifier string is one of `eval` or `arguments`.
+They are restricted in strict mode code throughout ECMA262 edition 5.1 and
+in ECMA262 edition 6 section [12.1.1](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-identifiers-static-semantics-early-errors).
+
+#### keyword.isIdentifierName(id)
+
+Return true if provided identifier string is an IdentifierName as specified in
+ECMA262 edition 5.1 section [7.6](https://es5.github.io/#x7.6).
+
+#### keyword.isIdentifierES5(id, strict)
+
+Return true if provided identifier string is an Identifier as specified in
+ECMA262 edition 5.1 section [7.6](https://es5.github.io/#x7.6). If the `strict`
+flag is truthy, this function additionally checks whether `id` is an Identifier
+under strict mode.
+
+#### keyword.isIdentifierES6(id, strict)
+
+Return true if provided identifier string is an Identifier as specified in
+ECMA262 edition 6 section [12.1](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-identifiers).
+If the `strict` flag is truthy, this function additionally checks whether `id`
+is an Identifier under strict mode.
+
+### License
+
+Copyright (C) 2013 [Yusuke Suzuki](http://github.com/Constellation)
+ (twitter: [@Constellation](http://twitter.com/Constellation)) and other contributors.
+
+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.
+
+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 <COPYRIGHT HOLDER> 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/tools/node_modules/eslint/node_modules/esutils/lib/ast.js b/tools/node_modules/eslint/node_modules/esutils/lib/ast.js
new file mode 100644
index 0000000000..8faadae1ce
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/esutils/lib/ast.js
@@ -0,0 +1,144 @@
+/*
+ Copyright (C) 2013 Yusuke Suzuki <utatane.tea@gmail.com>
+
+ 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.
+
+ 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 <COPYRIGHT HOLDER> 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.
+*/
+
+(function () {
+ 'use strict';
+
+ function isExpression(node) {
+ if (node == null) { return false; }
+ switch (node.type) {
+ case 'ArrayExpression':
+ case 'AssignmentExpression':
+ case 'BinaryExpression':
+ case 'CallExpression':
+ case 'ConditionalExpression':
+ case 'FunctionExpression':
+ case 'Identifier':
+ case 'Literal':
+ case 'LogicalExpression':
+ case 'MemberExpression':
+ case 'NewExpression':
+ case 'ObjectExpression':
+ case 'SequenceExpression':
+ case 'ThisExpression':
+ case 'UnaryExpression':
+ case 'UpdateExpression':
+ return true;
+ }
+ return false;
+ }
+
+ function isIterationStatement(node) {
+ if (node == null) { return false; }
+ switch (node.type) {
+ case 'DoWhileStatement':
+ case 'ForInStatement':
+ case 'ForStatement':
+ case 'WhileStatement':
+ return true;
+ }
+ return false;
+ }
+
+ function isStatement(node) {
+ if (node == null) { return false; }
+ switch (node.type) {
+ case 'BlockStatement':
+ case 'BreakStatement':
+ case 'ContinueStatement':
+ case 'DebuggerStatement':
+ case 'DoWhileStatement':
+ case 'EmptyStatement':
+ case 'ExpressionStatement':
+ case 'ForInStatement':
+ case 'ForStatement':
+ case 'IfStatement':
+ case 'LabeledStatement':
+ case 'ReturnStatement':
+ case 'SwitchStatement':
+ case 'ThrowStatement':
+ case 'TryStatement':
+ case 'VariableDeclaration':
+ case 'WhileStatement':
+ case 'WithStatement':
+ return true;
+ }
+ return false;
+ }
+
+ function isSourceElement(node) {
+ return isStatement(node) || node != null && node.type === 'FunctionDeclaration';
+ }
+
+ function trailingStatement(node) {
+ switch (node.type) {
+ case 'IfStatement':
+ if (node.alternate != null) {
+ return node.alternate;
+ }
+ return node.consequent;
+
+ case 'LabeledStatement':
+ case 'ForStatement':
+ case 'ForInStatement':
+ case 'WhileStatement':
+ case 'WithStatement':
+ return node.body;
+ }
+ return null;
+ }
+
+ function isProblematicIfStatement(node) {
+ var current;
+
+ if (node.type !== 'IfStatement') {
+ return false;
+ }
+ if (node.alternate == null) {
+ return false;
+ }
+ current = node.consequent;
+ do {
+ if (current.type === 'IfStatement') {
+ if (current.alternate == null) {
+ return true;
+ }
+ }
+ current = trailingStatement(current);
+ } while (current);
+
+ return false;
+ }
+
+ module.exports = {
+ isExpression: isExpression,
+ isStatement: isStatement,
+ isIterationStatement: isIterationStatement,
+ isSourceElement: isSourceElement,
+ isProblematicIfStatement: isProblematicIfStatement,
+
+ trailingStatement: trailingStatement
+ };
+}());
+/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/node_modules/eslint/node_modules/esutils/lib/code.js b/tools/node_modules/eslint/node_modules/esutils/lib/code.js
new file mode 100644
index 0000000000..2a7c19d63c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/esutils/lib/code.js
@@ -0,0 +1,135 @@
+/*
+ Copyright (C) 2013-2014 Yusuke Suzuki <utatane.tea@gmail.com>
+ Copyright (C) 2014 Ivan Nikulin <ifaaan@gmail.com>
+
+ 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.
+
+ 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 <COPYRIGHT HOLDER> 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.
+*/
+
+(function () {
+ 'use strict';
+
+ var ES6Regex, ES5Regex, NON_ASCII_WHITESPACES, IDENTIFIER_START, IDENTIFIER_PART, ch;
+
+ // See `tools/generate-identifier-regex.js`.
+ ES5Regex = {
+ // ECMAScript 5.1/Unicode v7.0.0 NonAsciiIdentifierStart:
+ NonAsciiIdentifierStart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,
+ // ECMAScript 5.1/Unicode v7.0.0 NonAsciiIdentifierPart:
+ NonAsciiIdentifierPart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/
+ };
+
+ ES6Regex = {
+ // ECMAScript 6/Unicode v7.0.0 NonAsciiIdentifierStart:
+ NonAsciiIdentifierStart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]/,
+ // ECMAScript 6/Unicode v7.0.0 NonAsciiIdentifierPart:
+ NonAsciiIdentifierPart: /[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/
+ };
+
+ function isDecimalDigit(ch) {
+ return 0x30 <= ch && ch <= 0x39; // 0..9
+ }
+
+ function isHexDigit(ch) {
+ return 0x30 <= ch && ch <= 0x39 || // 0..9
+ 0x61 <= ch && ch <= 0x66 || // a..f
+ 0x41 <= ch && ch <= 0x46; // A..F
+ }
+
+ function isOctalDigit(ch) {
+ return ch >= 0x30 && ch <= 0x37; // 0..7
+ }
+
+ // 7.2 White Space
+
+ NON_ASCII_WHITESPACES = [
+ 0x1680, 0x180E,
+ 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A,
+ 0x202F, 0x205F,
+ 0x3000,
+ 0xFEFF
+ ];
+
+ function isWhiteSpace(ch) {
+ return ch === 0x20 || ch === 0x09 || ch === 0x0B || ch === 0x0C || ch === 0xA0 ||
+ ch >= 0x1680 && NON_ASCII_WHITESPACES.indexOf(ch) >= 0;
+ }
+
+ // 7.3 Line Terminators
+
+ function isLineTerminator(ch) {
+ return ch === 0x0A || ch === 0x0D || ch === 0x2028 || ch === 0x2029;
+ }
+
+ // 7.6 Identifier Names and Identifiers
+
+ function fromCodePoint(cp) {
+ if (cp <= 0xFFFF) { return String.fromCharCode(cp); }
+ var cu1 = String.fromCharCode(Math.floor((cp - 0x10000) / 0x400) + 0xD800);
+ var cu2 = String.fromCharCode(((cp - 0x10000) % 0x400) + 0xDC00);
+ return cu1 + cu2;
+ }
+
+ IDENTIFIER_START = new Array(0x80);
+ for(ch = 0; ch < 0x80; ++ch) {
+ IDENTIFIER_START[ch] =
+ ch >= 0x61 && ch <= 0x7A || // a..z
+ ch >= 0x41 && ch <= 0x5A || // A..Z
+ ch === 0x24 || ch === 0x5F; // $ (dollar) and _ (underscore)
+ }
+
+ IDENTIFIER_PART = new Array(0x80);
+ for(ch = 0; ch < 0x80; ++ch) {
+ IDENTIFIER_PART[ch] =
+ ch >= 0x61 && ch <= 0x7A || // a..z
+ ch >= 0x41 && ch <= 0x5A || // A..Z
+ ch >= 0x30 && ch <= 0x39 || // 0..9
+ ch === 0x24 || ch === 0x5F; // $ (dollar) and _ (underscore)
+ }
+
+ function isIdentifierStartES5(ch) {
+ return ch < 0x80 ? IDENTIFIER_START[ch] : ES5Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch));
+ }
+
+ function isIdentifierPartES5(ch) {
+ return ch < 0x80 ? IDENTIFIER_PART[ch] : ES5Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch));
+ }
+
+ function isIdentifierStartES6(ch) {
+ return ch < 0x80 ? IDENTIFIER_START[ch] : ES6Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch));
+ }
+
+ function isIdentifierPartES6(ch) {
+ return ch < 0x80 ? IDENTIFIER_PART[ch] : ES6Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch));
+ }
+
+ module.exports = {
+ isDecimalDigit: isDecimalDigit,
+ isHexDigit: isHexDigit,
+ isOctalDigit: isOctalDigit,
+ isWhiteSpace: isWhiteSpace,
+ isLineTerminator: isLineTerminator,
+ isIdentifierStartES5: isIdentifierStartES5,
+ isIdentifierPartES5: isIdentifierPartES5,
+ isIdentifierStartES6: isIdentifierStartES6,
+ isIdentifierPartES6: isIdentifierPartES6
+ };
+}());
+/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/node_modules/eslint/node_modules/esutils/lib/keyword.js b/tools/node_modules/eslint/node_modules/esutils/lib/keyword.js
new file mode 100644
index 0000000000..13c8c6a967
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/esutils/lib/keyword.js
@@ -0,0 +1,165 @@
+/*
+ Copyright (C) 2013 Yusuke Suzuki <utatane.tea@gmail.com>
+
+ 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.
+
+ 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 <COPYRIGHT HOLDER> 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.
+*/
+
+(function () {
+ 'use strict';
+
+ var code = require('./code');
+
+ function isStrictModeReservedWordES6(id) {
+ switch (id) {
+ case 'implements':
+ case 'interface':
+ case 'package':
+ case 'private':
+ case 'protected':
+ case 'public':
+ case 'static':
+ case 'let':
+ return true;
+ default:
+ return false;
+ }
+ }
+
+ function isKeywordES5(id, strict) {
+ // yield should not be treated as keyword under non-strict mode.
+ if (!strict && id === 'yield') {
+ return false;
+ }
+ return isKeywordES6(id, strict);
+ }
+
+ function isKeywordES6(id, strict) {
+ if (strict && isStrictModeReservedWordES6(id)) {
+ return true;
+ }
+
+ switch (id.length) {
+ case 2:
+ return (id === 'if') || (id === 'in') || (id === 'do');
+ case 3:
+ return (id === 'var') || (id === 'for') || (id === 'new') || (id === 'try');
+ case 4:
+ return (id === 'this') || (id === 'else') || (id === 'case') ||
+ (id === 'void') || (id === 'with') || (id === 'enum');
+ case 5:
+ return (id === 'while') || (id === 'break') || (id === 'catch') ||
+ (id === 'throw') || (id === 'const') || (id === 'yield') ||
+ (id === 'class') || (id === 'super');
+ case 6:
+ return (id === 'return') || (id === 'typeof') || (id === 'delete') ||
+ (id === 'switch') || (id === 'export') || (id === 'import');
+ case 7:
+ return (id === 'default') || (id === 'finally') || (id === 'extends');
+ case 8:
+ return (id === 'function') || (id === 'continue') || (id === 'debugger');
+ case 10:
+ return (id === 'instanceof');
+ default:
+ return false;
+ }
+ }
+
+ function isReservedWordES5(id, strict) {
+ return id === 'null' || id === 'true' || id === 'false' || isKeywordES5(id, strict);
+ }
+
+ function isReservedWordES6(id, strict) {
+ return id === 'null' || id === 'true' || id === 'false' || isKeywordES6(id, strict);
+ }
+
+ function isRestrictedWord(id) {
+ return id === 'eval' || id === 'arguments';
+ }
+
+ function isIdentifierNameES5(id) {
+ var i, iz, ch;
+
+ if (id.length === 0) { return false; }
+
+ ch = id.charCodeAt(0);
+ if (!code.isIdentifierStartES5(ch)) {
+ return false;
+ }
+
+ for (i = 1, iz = id.length; i < iz; ++i) {
+ ch = id.charCodeAt(i);
+ if (!code.isIdentifierPartES5(ch)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ function decodeUtf16(lead, trail) {
+ return (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;
+ }
+
+ function isIdentifierNameES6(id) {
+ var i, iz, ch, lowCh, check;
+
+ if (id.length === 0) { return false; }
+
+ check = code.isIdentifierStartES6;
+ for (i = 0, iz = id.length; i < iz; ++i) {
+ ch = id.charCodeAt(i);
+ if (0xD800 <= ch && ch <= 0xDBFF) {
+ ++i;
+ if (i >= iz) { return false; }
+ lowCh = id.charCodeAt(i);
+ if (!(0xDC00 <= lowCh && lowCh <= 0xDFFF)) {
+ return false;
+ }
+ ch = decodeUtf16(ch, lowCh);
+ }
+ if (!check(ch)) {
+ return false;
+ }
+ check = code.isIdentifierPartES6;
+ }
+ return true;
+ }
+
+ function isIdentifierES5(id, strict) {
+ return isIdentifierNameES5(id) && !isReservedWordES5(id, strict);
+ }
+
+ function isIdentifierES6(id, strict) {
+ return isIdentifierNameES6(id) && !isReservedWordES6(id, strict);
+ }
+
+ module.exports = {
+ isKeywordES5: isKeywordES5,
+ isKeywordES6: isKeywordES6,
+ isReservedWordES5: isReservedWordES5,
+ isReservedWordES6: isReservedWordES6,
+ isRestrictedWord: isRestrictedWord,
+ isIdentifierNameES5: isIdentifierNameES5,
+ isIdentifierNameES6: isIdentifierNameES6,
+ isIdentifierES5: isIdentifierES5,
+ isIdentifierES6: isIdentifierES6
+ };
+}());
+/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/node_modules/eslint/node_modules/esutils/lib/utils.js b/tools/node_modules/eslint/node_modules/esutils/lib/utils.js
new file mode 100644
index 0000000000..ce18faa6bc
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/esutils/lib/utils.js
@@ -0,0 +1,33 @@
+/*
+ Copyright (C) 2013 Yusuke Suzuki <utatane.tea@gmail.com>
+
+ 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.
+
+ 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 <COPYRIGHT HOLDER> 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.
+*/
+
+
+(function () {
+ 'use strict';
+
+ exports.ast = require('./ast');
+ exports.code = require('./code');
+ exports.keyword = require('./keyword');
+}());
+/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/node_modules/eslint/node_modules/esutils/package.json b/tools/node_modules/eslint/node_modules/esutils/package.json
new file mode 100644
index 0000000000..c308ba2ebd
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/esutils/package.json
@@ -0,0 +1,79 @@
+{
+ "_from": "esutils@^2.0.2",
+ "_id": "esutils@2.0.2",
+ "_inBundle": false,
+ "_integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
+ "_location": "/eslint/esutils",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "esutils@^2.0.2",
+ "name": "esutils",
+ "escapedName": "esutils",
+ "rawSpec": "^2.0.2",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.2"
+ },
+ "_requiredBy": [
+ "/eslint",
+ "/eslint/babel-code-frame",
+ "/eslint/doctrine"
+ ],
+ "_resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
+ "_shasum": "0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b",
+ "_spec": "esutils@^2.0.2",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint",
+ "bugs": {
+ "url": "https://github.com/estools/esutils/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "utility box for ECMAScript language tools",
+ "devDependencies": {
+ "chai": "~1.7.2",
+ "coffee-script": "~1.6.3",
+ "jshint": "2.6.3",
+ "mocha": "~2.2.1",
+ "regenerate": "~1.2.1",
+ "unicode-7.0.0": "^0.1.5"
+ },
+ "directories": {
+ "lib": "./lib"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "LICENSE.BSD",
+ "README.md",
+ "lib"
+ ],
+ "homepage": "https://github.com/estools/esutils",
+ "licenses": [
+ {
+ "type": "BSD",
+ "url": "http://github.com/estools/esutils/raw/master/LICENSE.BSD"
+ }
+ ],
+ "main": "lib/utils.js",
+ "maintainers": [
+ {
+ "name": "Yusuke Suzuki",
+ "email": "utatane.tea@gmail.com",
+ "url": "http://github.com/Constellation"
+ }
+ ],
+ "name": "esutils",
+ "repository": {
+ "type": "git",
+ "url": "git+ssh://git@github.com/estools/esutils.git"
+ },
+ "scripts": {
+ "generate-regex": "node tools/generate-identifier-regex.js",
+ "lint": "jshint lib/*.js",
+ "test": "npm run-script lint && npm run-script unit-test",
+ "unit-test": "mocha --compilers coffee:coffee-script -R spec"
+ },
+ "version": "2.0.2"
+}
diff --git a/tools/node_modules/eslint/node_modules/extend/LICENSE b/tools/node_modules/eslint/node_modules/extend/LICENSE
new file mode 100644
index 0000000000..e16d6a56ca
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/extend/LICENSE
@@ -0,0 +1,23 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Stefan Thomas
+
+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/tools/node_modules/eslint/node_modules/extend/README.md b/tools/node_modules/eslint/node_modules/extend/README.md
new file mode 100644
index 0000000000..5b8249aa95
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/extend/README.md
@@ -0,0 +1,81 @@
+[![Build Status][travis-svg]][travis-url]
+[![dependency status][deps-svg]][deps-url]
+[![dev dependency status][dev-deps-svg]][dev-deps-url]
+
+# extend() for Node.js <sup>[![Version Badge][npm-version-png]][npm-url]</sup>
+
+`node-extend` is a port of the classic extend() method from jQuery. It behaves as you expect. It is simple, tried and true.
+
+Notes:
+
+* Since Node.js >= 4,
+ [`Object.assign`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
+ now offers the same functionality natively (but without the "deep copy" option).
+ See [ECMAScript 2015 (ES6) in Node.js](https://nodejs.org/en/docs/es6).
+* Some native implementations of `Object.assign` in both Node.js and many
+ browsers (since NPM modules are for the browser too) may not be fully
+ spec-compliant.
+ Check [`object.assign`](https://www.npmjs.com/package/object.assign) module for
+ a compliant candidate.
+
+## Installation
+
+This package is available on [npm][npm-url] as: `extend`
+
+``` sh
+npm install extend
+```
+
+## Usage
+
+**Syntax:** extend **(** [`deep`], `target`, `object1`, [`objectN`] **)**
+
+*Extend one object with one or more others, returning the modified object.*
+
+**Example:**
+
+``` js
+var extend = require('extend');
+extend(targetObject, object1, object2);
+```
+
+Keep in mind that the target object will be modified, and will be returned from extend().
+
+If a boolean true is specified as the first argument, extend performs a deep copy, recursively copying any objects it finds. Otherwise, the copy will share structure with the original object(s).
+Undefined properties are not copied. However, properties inherited from the object's prototype will be copied over.
+Warning: passing `false` as the first argument is not supported.
+
+### Arguments
+
+* `deep` *Boolean* (optional)
+If set, the merge becomes recursive (i.e. deep copy).
+* `target` *Object*
+The object to extend.
+* `object1` *Object*
+The object that will be merged into the first.
+* `objectN` *Object* (Optional)
+More objects to merge into the first.
+
+## License
+
+`node-extend` is licensed under the [MIT License][mit-license-url].
+
+## Acknowledgements
+
+All credit to the jQuery authors for perfecting this amazing utility.
+
+Ported to Node.js by [Stefan Thomas][github-justmoon] with contributions by [Jonathan Buchanan][github-insin] and [Jordan Harband][github-ljharb].
+
+[travis-svg]: https://travis-ci.org/justmoon/node-extend.svg
+[travis-url]: https://travis-ci.org/justmoon/node-extend
+[npm-url]: https://npmjs.org/package/extend
+[mit-license-url]: http://opensource.org/licenses/MIT
+[github-justmoon]: https://github.com/justmoon
+[github-insin]: https://github.com/insin
+[github-ljharb]: https://github.com/ljharb
+[npm-version-png]: http://versionbadg.es/justmoon/node-extend.svg
+[deps-svg]: https://david-dm.org/justmoon/node-extend.svg
+[deps-url]: https://david-dm.org/justmoon/node-extend
+[dev-deps-svg]: https://david-dm.org/justmoon/node-extend/dev-status.svg
+[dev-deps-url]: https://david-dm.org/justmoon/node-extend#info=devDependencies
+
diff --git a/tools/node_modules/eslint/node_modules/extend/index.js b/tools/node_modules/eslint/node_modules/extend/index.js
new file mode 100644
index 0000000000..bbe53f6608
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/extend/index.js
@@ -0,0 +1,86 @@
+'use strict';
+
+var hasOwn = Object.prototype.hasOwnProperty;
+var toStr = Object.prototype.toString;
+
+var isArray = function isArray(arr) {
+ if (typeof Array.isArray === 'function') {
+ return Array.isArray(arr);
+ }
+
+ return toStr.call(arr) === '[object Array]';
+};
+
+var isPlainObject = function isPlainObject(obj) {
+ if (!obj || toStr.call(obj) !== '[object Object]') {
+ return false;
+ }
+
+ var hasOwnConstructor = hasOwn.call(obj, 'constructor');
+ var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');
+ // Not own constructor property must be Object
+ if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {
+ return false;
+ }
+
+ // Own properties are enumerated firstly, so to speed up,
+ // if last one is own, then all properties are own.
+ var key;
+ for (key in obj) { /**/ }
+
+ return typeof key === 'undefined' || hasOwn.call(obj, key);
+};
+
+module.exports = function extend() {
+ var options, name, src, copy, copyIsArray, clone;
+ var target = arguments[0];
+ var i = 1;
+ var length = arguments.length;
+ var deep = false;
+
+ // Handle a deep copy situation
+ if (typeof target === 'boolean') {
+ deep = target;
+ target = arguments[1] || {};
+ // skip the boolean and the target
+ i = 2;
+ }
+ if (target == null || (typeof target !== 'object' && typeof target !== 'function')) {
+ target = {};
+ }
+
+ for (; i < length; ++i) {
+ options = arguments[i];
+ // Only deal with non-null/undefined values
+ if (options != null) {
+ // Extend the base object
+ for (name in options) {
+ src = target[name];
+ copy = options[name];
+
+ // Prevent never-ending loop
+ if (target !== copy) {
+ // Recurse if we're merging plain objects or arrays
+ if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {
+ if (copyIsArray) {
+ copyIsArray = false;
+ clone = src && isArray(src) ? src : [];
+ } else {
+ clone = src && isPlainObject(src) ? src : {};
+ }
+
+ // Never move original objects, clone them
+ target[name] = extend(deep, clone, copy);
+
+ // Don't bring in undefined values
+ } else if (typeof copy !== 'undefined') {
+ target[name] = copy;
+ }
+ }
+ }
+ }
+ }
+
+ // Return the modified object
+ return target;
+};
diff --git a/tools/node_modules/eslint/node_modules/extend/package.json b/tools/node_modules/eslint/node_modules/extend/package.json
new file mode 100644
index 0000000000..935c911c2d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/extend/package.json
@@ -0,0 +1,75 @@
+{
+ "_from": "extend@^3.0.0",
+ "_id": "extend@3.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=",
+ "_location": "/extend",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "extend@^3.0.0",
+ "name": "extend",
+ "escapedName": "extend",
+ "rawSpec": "^3.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^3.0.0"
+ },
+ "_requiredBy": [
+ "/unified"
+ ],
+ "_resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz",
+ "_shasum": "a755ea7bc1adfcc5a31ce7e762dbaadc5e636444",
+ "_spec": "extend@^3.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/unified",
+ "author": {
+ "name": "Stefan Thomas",
+ "email": "justmoon@members.fsf.org",
+ "url": "http://www.justmoon.net"
+ },
+ "bugs": {
+ "url": "https://github.com/justmoon/node-extend/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Jordan Harband",
+ "url": "https://github.com/ljharb"
+ }
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Port of jQuery.extend for node.js and the browser",
+ "devDependencies": {
+ "@ljharb/eslint-config": "^11.0.0",
+ "covert": "^1.1.0",
+ "eslint": "^3.19.0",
+ "jscs": "^3.0.7",
+ "tape": "^4.6.3"
+ },
+ "homepage": "https://github.com/justmoon/node-extend#readme",
+ "keywords": [
+ "extend",
+ "clone",
+ "merge"
+ ],
+ "license": "MIT",
+ "main": "index",
+ "name": "extend",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/justmoon/node-extend.git"
+ },
+ "scripts": {
+ "coverage": "covert test/index.js",
+ "coverage-quiet": "covert test/index.js --quiet",
+ "eslint": "eslint *.js */*.js",
+ "jscs": "jscs *.js */*.js",
+ "lint": "npm run jscs && npm run eslint",
+ "posttest": "npm run coverage-quiet",
+ "pretest": "npm run lint",
+ "test": "npm run tests-only",
+ "tests-only": "node test"
+ },
+ "version": "3.0.1"
+}
diff --git a/tools/node_modules/eslint/node_modules/external-editor/LICENSE b/tools/node_modules/eslint/node_modules/external-editor/LICENSE
new file mode 100644
index 0000000000..f5f6185955
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/external-editor/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Kevin Gravier
+
+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/tools/node_modules/eslint/node_modules/external-editor/README.md b/tools/node_modules/eslint/node_modules/external-editor/README.md
new file mode 100644
index 0000000000..53f2dfc35d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/external-editor/README.md
@@ -0,0 +1,147 @@
+# External Editor
+
+[![ExternalEditor on Travis CI](https://img.shields.io/travis/mrkmg/node-external-editor.svg?style=flat-square)](https://travis-ci.org/mrkmg/node-external-editor/branches)
+[![ExternalEditor on NPM](https://img.shields.io/npm/v/external-editor.svg?style=flat-square)](https://www.npmjs.com/package/external-editor)
+[![ExternalEditor uses the MIT](https://img.shields.io/npm/l/external-editor.svg?style=flat-square)](https://opensource.org/licenses/MIT)
+
+
+A node module to edit a string with a users preferred text editor using $VISUAL or $ENVIRONMENT.
+
+Version: 2.1.0
+
+As of version 2.0.0, node 0.10 is no longer support. Minimum node version is now 0.12.
+
+## Install
+
+`npm install external-editor --save`
+
+## Usage
+
+A simple example using the `.edit` convenience method
+
+ var ExternalEditor = require('external-editor')
+ var data = ExternalEditor.edit('\n\n# Please write your text above');
+ console.log(data);
+
+A full featured example
+
+ var ExternalEditor = require('external-editor');
+
+ try {
+ var editor = new ExternalEditor();
+ var text = editor.run()
+ // the text is also available in editor.text
+ } catch (err) {
+ if (err instanceOf ExternalEditor.CreateFileError) {
+ console.log('Failed to create the temporary file');
+ } else if (err instanceOf ExternalEditor.ReadFileError) {
+ console.log('Failed to read the temporary file');
+ } else if (err instanceOf ExternalEditor.LaunchEditorError) {
+ console.log('Failed to launch your editor');
+ } else {
+ throw err;
+ }
+ }
+
+ // Do things with the text
+
+ // Eventually call the cleanup to remove the temporary file
+ try {
+ editor.cleanup();
+ } catch (err) {
+ if (err instanceOf ExternalEditor.RemoveFileError) {
+ console.log('Failed to remove the temporary file');
+ } else {
+ throw err
+ }
+ }
+
+
+#### API
+**Static Methods**
+
+- `edit(text)`
+ - `text` (string) *Optional* Defaults to empty string
+ - **Returns** (string) The contents of the file
+ - Could throw `CreateFileError`, `ReadFileError`, or `LaunchEditorError`, or `RemoveFileError`
+- `editAsync(text, callback)`
+ - `text` (string) *Optional* Defaults to empty string
+ - `callback` (function (error, text))
+ - `error` could be of type `CreateFileError`, `ReadFileError`, or `LaunchEditorError`, or `RemoveFileError`
+ - `text`(string) The contents of the file
+
+
+**Static Properties**
+
+- `CreateFileError` Error thrown if the temporary file could not be created.
+- `ReadFileError` Error thrown if the temporary file could not be read.
+- `RemoveFileError` Error thrown if the temporary file could not be removed during cleanup.
+- `LaunchEditorError` Error thrown if the editor could not be launched.
+
+**Public Methods**
+
+- `new ExternalEditor(text)`
+ - `text` (string) *Optional* Defaults to empty string
+ - Could throw `CreateFileError`
+- `run()` Launches the editor.
+ - **Returns** (string) The contents of the file
+ - Could throw `LaunchEditorError` or `ReadFileError`
+- `runAsync(callback)` Launches the editor in an async way
+ - `callback` (function (error, text))
+ - `error` could be of type `ReadFileError` or `LaunchEditorError`
+ - `text`(string) The contents of the file
+- `cleanup()` Removes the temporary file.
+ - Could throw `RemoveFileError`
+
+**Public Properties**
+
+- `text` (string) *readonly* The text in the temporary file.
+- `editor.bin` (string) The editor determined from the environment.
+- `editor.args` (array) Default arguments for the bin
+- `temp_file` (string) Path to temporary file. Can be changed, but be careful as the temporary file probably already
+ exists and would need be removed manually.
+
+## Errors
+
+All errors have a simple message explaining what went wrong. They all also have an `original_error` property containing
+the original error thrown for debugging purposes.
+
+## Why Synchronous?
+
+Everything is synchronous to make sure the editor has complete control of the stdin and stdout. Testing has shown
+async launching of the editor can lead to issues when using readline or other packages which try to read from stdin or
+write to stdout. Seeing as this will be used in an interactive CLI environment, I made the decision to force the package
+to be synchronous. If you know a reliable way to force all stdin and stdout to be limited only to the child_process,
+please submit a PR.
+
+If async is really needed, you can use `editAsync` or `runAsync`. If you are using readline or have anything else
+listening to the stdin or you write to stdout, you will most likely have problem, so make sure to remove any other
+listeners on stdin, stdout, or stdin.
+
+## Demo
+
+[![asciicast](https://asciinema.org/a/a1qh9lypbe65mj0ivfuoslz2s.png)](https://asciinema.org/a/a1qh9lypbe65mj0ivfuoslz2s)
+
+## License
+
+The MIT License (MIT)
+
+Copyright (c) 2016 Kevin Gravier
+
+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/tools/node_modules/eslint/node_modules/external-editor/example_async.js b/tools/node_modules/eslint/node_modules/external-editor/example_async.js
new file mode 100644
index 0000000000..025356c11e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/external-editor/example_async.js
@@ -0,0 +1,40 @@
+var ExternalEditor = require('./main');
+var readline = require('readline');
+
+var rl = readline.createInterface({
+ input: process.stdin,
+ output: null
+});
+
+var message = '\n\n# Please Write a message\n# Any line starting with # is ignored';
+
+process.stdout.write('Please write a message. (press enter to launch your preferred editor)');
+
+editor = new ExternalEditor(message);
+
+rl.on('line', function () {
+ try {
+ rl.pause();
+ editor.runAsync(function (error, response)
+ {
+ if (error) {
+ process.stdout.write(error.message);
+ process.exit(1);
+ }
+ if (response.length === 0) {
+ readline.moveCursor(process.stdout, 0, -1);
+ process.stdout.write('Your message was empty, please try again. (press enter to launch your preferred editor)');
+ rl.resume();
+ } else {
+ process.stdout.write('Your Message:\n');
+ process.stdout.write(response);
+ process.stdout.write('\n');
+ rl.close();
+ }
+ });
+ } catch (err) {
+ process.stderr.write(err.message);
+ process.stdout.write('\n');
+ rl.close();
+ }
+});
diff --git a/tools/node_modules/eslint/node_modules/external-editor/example_sync.js b/tools/node_modules/eslint/node_modules/external-editor/example_sync.js
new file mode 100644
index 0000000000..138f230757
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/external-editor/example_sync.js
@@ -0,0 +1,34 @@
+var ExternalEditor = require('./main');
+var readline = require('readline');
+
+var rl = readline.createInterface({
+ input: process.stdin,
+ output: null
+});
+
+var message = '\n\n# Please Write a message\n# Any line starting with # is ignored';
+
+process.stdout.write('Please write a message. (press enter to launch your preferred editor)');
+
+editor = new ExternalEditor(message);
+
+rl.on('line', function () {
+ try {
+ // Get response, remove all lines starting with #, remove any trailing newlines.
+ var response = editor.run().replace(/^#.*\n?/gm, '').replace(/\n+$/g, '').trim();
+
+ if (response.length === 0) {
+ readline.moveCursor(process.stdout, 0, -1);
+ process.stdout.write('Your message was empty, please try again. (press enter to launch your preferred editor)');
+ } else {
+ process.stdout.write('Your Message:\n');
+ process.stdout.write(response);
+ process.stdout.write('\n');
+ rl.close();
+ }
+ } catch (err) {
+ process.stderr.write(err.message);
+ process.stdout.write('\n');
+ rl.close();
+ }
+});
diff --git a/tools/node_modules/eslint/node_modules/external-editor/main/errors/CreateFileError.js b/tools/node_modules/eslint/node_modules/external-editor/main/errors/CreateFileError.js
new file mode 100644
index 0000000000..e18815535d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/external-editor/main/errors/CreateFileError.js
@@ -0,0 +1,29 @@
+// Generated by CoffeeScript 1.12.7
+
+/*
+ ExternalEditor
+ Kevin Gravier <kevin@mrkmg.com>
+ MIT
+ */
+
+(function() {
+ var CreateFileError,
+ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ hasProp = {}.hasOwnProperty;
+
+ CreateFileError = (function(superClass) {
+ extend(CreateFileError, superClass);
+
+ CreateFileError.prototype.message = 'Failed to create temporary file for editor';
+
+ function CreateFileError(original_error) {
+ this.original_error = original_error;
+ }
+
+ return CreateFileError;
+
+ })(Error);
+
+ module.exports = CreateFileError;
+
+}).call(this);
diff --git a/tools/node_modules/eslint/node_modules/external-editor/main/errors/LaunchEditorError.js b/tools/node_modules/eslint/node_modules/external-editor/main/errors/LaunchEditorError.js
new file mode 100644
index 0000000000..d956a1b733
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/external-editor/main/errors/LaunchEditorError.js
@@ -0,0 +1,29 @@
+// Generated by CoffeeScript 1.12.7
+
+/*
+ ExternalEditor
+ Kevin Gravier <kevin@mrkmg.com>
+ MIT
+ */
+
+(function() {
+ var LaunchEditorError,
+ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ hasProp = {}.hasOwnProperty;
+
+ LaunchEditorError = (function(superClass) {
+ extend(LaunchEditorError, superClass);
+
+ LaunchEditorError.prototype.message = 'Failed launch editor';
+
+ function LaunchEditorError(original_error) {
+ this.original_error = original_error;
+ }
+
+ return LaunchEditorError;
+
+ })(Error);
+
+ module.exports = LaunchEditorError;
+
+}).call(this);
diff --git a/tools/node_modules/eslint/node_modules/external-editor/main/errors/ReadFileError.js b/tools/node_modules/eslint/node_modules/external-editor/main/errors/ReadFileError.js
new file mode 100644
index 0000000000..317be76bd0
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/external-editor/main/errors/ReadFileError.js
@@ -0,0 +1,29 @@
+// Generated by CoffeeScript 1.12.7
+
+/*
+ ExternalEditor
+ Kevin Gravier <kevin@mrkmg.com>
+ MIT
+ */
+
+(function() {
+ var ReadFileError,
+ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ hasProp = {}.hasOwnProperty;
+
+ ReadFileError = (function(superClass) {
+ extend(ReadFileError, superClass);
+
+ ReadFileError.prototype.message = 'Failed to read temporary file';
+
+ function ReadFileError(original_error) {
+ this.original_error = original_error;
+ }
+
+ return ReadFileError;
+
+ })(Error);
+
+ module.exports = ReadFileError;
+
+}).call(this);
diff --git a/tools/node_modules/eslint/node_modules/external-editor/main/errors/RemoveFileError.js b/tools/node_modules/eslint/node_modules/external-editor/main/errors/RemoveFileError.js
new file mode 100644
index 0000000000..658c9b0ffc
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/external-editor/main/errors/RemoveFileError.js
@@ -0,0 +1,29 @@
+// Generated by CoffeeScript 1.12.7
+
+/*
+ ExternalEditor
+ Kevin Gravier <kevin@mrkmg.com>
+ MIT
+ */
+
+(function() {
+ var RemoveFileError,
+ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ hasProp = {}.hasOwnProperty;
+
+ RemoveFileError = (function(superClass) {
+ extend(RemoveFileError, superClass);
+
+ RemoveFileError.prototype.message = 'Failed to cleanup temporary file';
+
+ function RemoveFileError(original_error) {
+ this.original_error = original_error;
+ }
+
+ return RemoveFileError;
+
+ })(Error);
+
+ module.exports = RemoveFileError;
+
+}).call(this);
diff --git a/tools/node_modules/eslint/node_modules/external-editor/main/index.js b/tools/node_modules/eslint/node_modules/external-editor/main/index.js
new file mode 100644
index 0000000000..0ec45e3a8b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/external-editor/main/index.js
@@ -0,0 +1,219 @@
+// Generated by CoffeeScript 1.12.7
+
+/*
+ ExternalEditor
+ Kevin Gravier <kevin@mrkmg.com>
+ MIT
+ */
+
+(function() {
+ var ChatDet, CreateFileError, ExternalEditor, FS, IConvLite, LaunchEditorError, ReadFileError, RemoveFileError, Spawn, SpawnSync, Temp,
+ bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
+
+ FS = require('fs');
+
+ Temp = require('tmp');
+
+ SpawnSync = require('child_process').spawnSync;
+
+ Spawn = require('child_process').spawn;
+
+ IConvLite = require('iconv-lite');
+
+ ChatDet = require('chardet');
+
+ CreateFileError = require('./errors/CreateFileError');
+
+ ReadFileError = require('./errors/ReadFileError');
+
+ RemoveFileError = require('./errors/RemoveFileError');
+
+ LaunchEditorError = require('./errors/LaunchEditorError');
+
+ ExternalEditor = (function() {
+ ExternalEditor.edit = function(text) {
+ var editor;
+ if (text == null) {
+ text = '';
+ }
+ editor = new ExternalEditor(text);
+ editor.run();
+ editor.cleanup();
+ return editor.text;
+ };
+
+ ExternalEditor.editAsync = function(text, callback) {
+ var editor;
+ if (text == null) {
+ text = '';
+ }
+ editor = new ExternalEditor(text);
+ return editor.runAsync(function(error_run, response) {
+ var error_cleanup;
+ if (!error_run) {
+ try {
+ editor.cleanup();
+ } catch (error) {
+ error_cleanup = error;
+ if (typeof callback === 'function') {
+ callback(error_cleanup);
+ }
+ }
+ return callback(null, response);
+ } else {
+ return callback(error_run) in typeof callback === 'function';
+ }
+ });
+ };
+
+ ExternalEditor.CreateFileError = CreateFileError;
+
+ ExternalEditor.ReadFileError = ReadFileError;
+
+ ExternalEditor.RemoveFileError = RemoveFileError;
+
+ ExternalEditor.LaunchEditorError = LaunchEditorError;
+
+ ExternalEditor.prototype.text = '';
+
+ ExternalEditor.prototype.temp_file = void 0;
+
+ ExternalEditor.prototype.editor = {
+ bin: void 0,
+ args: []
+ };
+
+ function ExternalEditor(text1) {
+ this.text = text1 != null ? text1 : '';
+ this.launchEditorAsync = bind(this.launchEditorAsync, this);
+ this.launchEditor = bind(this.launchEditor, this);
+ this.removeTemporaryFile = bind(this.removeTemporaryFile, this);
+ this.readTemporaryFile = bind(this.readTemporaryFile, this);
+ this.createTemporaryFile = bind(this.createTemporaryFile, this);
+ this.determineEditor = bind(this.determineEditor, this);
+ this.cleanup = bind(this.cleanup, this);
+ this.runAsync = bind(this.runAsync, this);
+ this.run = bind(this.run, this);
+ this.determineEditor();
+ this.createTemporaryFile();
+ }
+
+ ExternalEditor.prototype.run = function() {
+ this.launchEditor();
+ return this.readTemporaryFile();
+ };
+
+ ExternalEditor.prototype.runAsync = function(callback) {
+ var error_launch;
+ try {
+ return this.launchEditorAsync((function(_this) {
+ return function() {
+ var error_read;
+ try {
+ _this.readTemporaryFile();
+ if (typeof callback === 'function') {
+ return callback(null, _this.text);
+ }
+ } catch (error) {
+ error_read = error;
+ if (typeof callback === 'function') {
+ return callback(error_read);
+ }
+ }
+ };
+ })(this));
+ } catch (error) {
+ error_launch = error;
+ if (typeof callback === 'function') {
+ return callback(error_launch);
+ }
+ }
+ };
+
+ ExternalEditor.prototype.cleanup = function() {
+ return this.removeTemporaryFile();
+ };
+
+ ExternalEditor.prototype.determineEditor = function() {
+ var args, ed, editor;
+ ed = /^win/.test(process.platform) ? 'notepad' : 'vim';
+ editor = process.env.VISUAL || process.env.EDITOR || ed;
+ args = editor.split(/\s+/);
+ this.bin = args.shift();
+ return this.args = args;
+ };
+
+ ExternalEditor.prototype.createTemporaryFile = function() {
+ var e;
+ try {
+ this.temp_file = Temp.tmpNameSync({});
+ return FS.writeFileSync(this.temp_file, this.text, {
+ encoding: 'utf8'
+ });
+ } catch (error) {
+ e = error;
+ throw new CreateFileError(e);
+ }
+ };
+
+ ExternalEditor.prototype.readTemporaryFile = function() {
+ var buffer, e, encoding;
+ try {
+ buffer = FS.readFileSync(this.temp_file);
+ if (!buffer.length) {
+ return this.text = '';
+ }
+ encoding = ChatDet.detect(buffer);
+ return this.text = IConvLite.decode(buffer, encoding);
+ } catch (error) {
+ e = error;
+ throw new ReadFileError(e);
+ }
+ };
+
+ ExternalEditor.prototype.removeTemporaryFile = function() {
+ var e;
+ try {
+ return FS.unlinkSync(this.temp_file);
+ } catch (error) {
+ e = error;
+ throw new RemoveFileError(e);
+ }
+ };
+
+ ExternalEditor.prototype.launchEditor = function() {
+ var e;
+ try {
+ return SpawnSync(this.bin, this.args.concat([this.temp_file]), {
+ stdio: 'inherit'
+ });
+ } catch (error) {
+ e = error;
+ throw new LaunchEditorError(e);
+ }
+ };
+
+ ExternalEditor.prototype.launchEditorAsync = function(callback) {
+ var child_process, e;
+ try {
+ child_process = Spawn(this.bin, this.args.concat([this.temp_file]), {
+ stdio: 'inherit'
+ });
+ return child_process.on('exit', function() {
+ if (typeof callback === 'function') {
+ return callback();
+ }
+ });
+ } catch (error) {
+ e = error;
+ throw new LaunchEditorError(e);
+ }
+ };
+
+ return ExternalEditor;
+
+ })();
+
+ module.exports = ExternalEditor;
+
+}).call(this);
diff --git a/tools/node_modules/eslint/node_modules/external-editor/package.json b/tools/node_modules/eslint/node_modules/external-editor/package.json
new file mode 100644
index 0000000000..4b93194f28
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/external-editor/package.json
@@ -0,0 +1,76 @@
+{
+ "_from": "external-editor@^2.0.4",
+ "_id": "external-editor@2.1.0",
+ "_inBundle": false,
+ "_integrity": "sha512-E44iT5QVOUJBKij4IIV3uvxuNlbKS38Tw1HiupxEIHPv9qtC2PrDYohbXV5U+1jnfIXttny8gUhj+oZvflFlzA==",
+ "_location": "/eslint/external-editor",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "external-editor@^2.0.4",
+ "name": "external-editor",
+ "escapedName": "external-editor",
+ "rawSpec": "^2.0.4",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.4"
+ },
+ "_requiredBy": [
+ "/eslint/inquirer"
+ ],
+ "_resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.1.0.tgz",
+ "_shasum": "3d026a21b7f95b5726387d4200ac160d372c3b48",
+ "_spec": "external-editor@^2.0.4",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/inquirer",
+ "author": {
+ "name": "Kevin Gravier",
+ "email": "kevin@mrkmg.com",
+ "url": "https://mrkmg.com"
+ },
+ "bugs": {
+ "url": "https://github.com/mrkmg/node-external-editor/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "chardet": "^0.4.0",
+ "iconv-lite": "^0.4.17",
+ "tmp": "^0.0.33"
+ },
+ "deprecated": false,
+ "description": "Edit a string with the users preferred text editor using $VISUAL or $ENVIRONMENT",
+ "devDependencies": {
+ "chai": "^4.0.0",
+ "coffee-script": "^1.10.0",
+ "coffeelint": "^1.14.2",
+ "mocha": "^3.2.0"
+ },
+ "engines": {
+ "node": ">=0.12"
+ },
+ "files": [
+ "main",
+ "example_sync.js",
+ "example_async.js"
+ ],
+ "homepage": "https://github.com/mrkmg/node-external-editor#readme",
+ "keywords": [
+ "editor",
+ "external",
+ "user",
+ "visual"
+ ],
+ "license": "MIT",
+ "main": "main/index.js",
+ "name": "external-editor",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/mrkmg/node-external-editor.git"
+ },
+ "scripts": {
+ "compile": "coffee --compile --output main/ src/",
+ "lint": "coffeelint -f .coffeelint.json src",
+ "test": "npm run lint && npm run unit",
+ "unit": "mocha --recursive --compilers coffee:coffee-script/register --timeout 10000 ./test/spec"
+ },
+ "version": "2.1.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/fast-deep-equal/.eslintrc.yml b/tools/node_modules/eslint/node_modules/fast-deep-equal/.eslintrc.yml
new file mode 100644
index 0000000000..14ab1fb978
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/fast-deep-equal/.eslintrc.yml
@@ -0,0 +1,25 @@
+env:
+ node: true
+extends: 'eslint:recommended'
+rules:
+ indent: [ 2, 2, { SwitchCase: 1 } ]
+ no-trailing-spaces: 2
+ quotes: [ 2, single, avoid-escape ]
+ linebreak-style: [ 2, unix ]
+ semi: [ 2, always ]
+ valid-jsdoc: [ 2, { requireReturn: false } ]
+ no-invalid-this: 2
+ no-unused-vars: [ 2, { args: none } ]
+ no-console: [ 2, { allow: [ warn, error ] } ]
+ block-scoped-var: 2
+ curly: [ 2, multi-or-nest, consistent ]
+ dot-location: [ 2, property ]
+ dot-notation: 2
+ no-else-return: 2
+ no-eq-null: 2
+ no-fallthrough: 2
+ no-return-assign: 2
+ strict: [ 2, global ]
+ no-use-before-define: [ 2, nofunc ]
+ callback-return: 2
+ no-path-concat: 2
diff --git a/tools/node_modules/eslint/node_modules/fast-deep-equal/LICENSE b/tools/node_modules/eslint/node_modules/fast-deep-equal/LICENSE
new file mode 100644
index 0000000000..7f1543566f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/fast-deep-equal/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2017 Evgeny Poberezkin
+
+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/tools/node_modules/eslint/node_modules/fast-deep-equal/README.md b/tools/node_modules/eslint/node_modules/fast-deep-equal/README.md
new file mode 100644
index 0000000000..ee83edd454
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/fast-deep-equal/README.md
@@ -0,0 +1,55 @@
+# fast-deep-equal
+The fastest deep equal
+
+[![Build Status](https://travis-ci.org/epoberezkin/fast-deep-equal.svg?branch=master)](https://travis-ci.org/epoberezkin/fast-deep-equal)
+[![npm version](https://badge.fury.io/js/fast-deep-equal.svg)](http://badge.fury.io/js/fast-deep-equal)
+[![Coverage Status](https://coveralls.io/repos/github/epoberezkin/fast-deep-equal/badge.svg?branch=master)](https://coveralls.io/github/epoberezkin/fast-deep-equal?branch=master)
+
+
+## Install
+
+```bash
+npm install fast-deep-equal
+```
+
+
+## Features
+
+- ES5 compatible
+- works in node.js (0.10+) and browsers (IE9+)
+- checks equality of Date and RegExp objects by value.
+
+
+## Usage
+
+```javascript
+var equal = require('fast-deep-equal');
+console.log(equal({foo: 'bar'}, {foo: 'bar'})); // true
+```
+
+
+## Performance benchmark
+
+```
+fast-deep-equal x 82,915 ops/sec ±0.63% (89 runs sampled)
+nano-equal x 50,506 ops/sec ±2.23% (86 runs sampled)
+shallow-equal-fuzzy x 14,873 ops/sec ±3.19% (83 runs sampled)
+underscore.isEqual x 16,055 ops/sec ±2.29% (85 runs sampled)
+lodash.isEqual x 10,740 ops/sec ±1.04% (89 runs sampled)
+deep-equal x 12,276 ops/sec ±2.44% (84 runs sampled)
+deep-eql x 10,565 ops/sec ±0.89% (90 runs sampled)
+assert.deepStrictEqual x 965 ops/sec ±2.99% (81 runs sampled)
+The fastest is fast-deep-equal
+```
+
+To run benchmark (requires node.js 6+):
+
+```bash
+npm install
+node benchmark
+```
+
+
+## License
+
+[MIT](https://github.com/epoberezkin/fast-deep-equal/blob/master/LICENSE)
diff --git a/tools/node_modules/eslint/node_modules/fast-deep-equal/index.js b/tools/node_modules/eslint/node_modules/fast-deep-equal/index.js
new file mode 100644
index 0000000000..a29572d71d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/fast-deep-equal/index.js
@@ -0,0 +1,43 @@
+'use strict';
+
+module.exports = function equal(a, b) {
+ if (a === b) return true;
+
+ var arrA = Array.isArray(a)
+ , arrB = Array.isArray(b)
+ , i;
+
+ if (arrA && arrB) {
+ if (a.length != b.length) return false;
+ for (i = 0; i < a.length; i++)
+ if (!equal(a[i], b[i])) return false;
+ return true;
+ }
+
+ if (arrA != arrB) return false;
+
+ if (a && b && typeof a === 'object' && typeof b === 'object') {
+ var keys = Object.keys(a);
+ if (keys.length !== Object.keys(b).length) return false;
+
+ var dateA = a instanceof Date
+ , dateB = b instanceof Date;
+ if (dateA && dateB) return a.getTime() == b.getTime();
+ if (dateA != dateB) return false;
+
+ var regexpA = a instanceof RegExp
+ , regexpB = b instanceof RegExp;
+ if (regexpA && regexpB) return a.toString() == b.toString();
+ if (regexpA != regexpB) return false;
+
+ for (i = 0; i < keys.length; i++)
+ if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
+
+ for (i = 0; i < keys.length; i++)
+ if(!equal(a[keys[i]], b[keys[i]])) return false;
+
+ return true;
+ }
+
+ return false;
+};
diff --git a/tools/node_modules/eslint/node_modules/fast-deep-equal/package.json b/tools/node_modules/eslint/node_modules/fast-deep-equal/package.json
new file mode 100644
index 0000000000..ad54be26d3
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/fast-deep-equal/package.json
@@ -0,0 +1,78 @@
+{
+ "_from": "fast-deep-equal@^1.0.0",
+ "_id": "fast-deep-equal@1.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=",
+ "_location": "/eslint/fast-deep-equal",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "fast-deep-equal@^1.0.0",
+ "name": "fast-deep-equal",
+ "escapedName": "fast-deep-equal",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/eslint/ajv"
+ ],
+ "_resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz",
+ "_shasum": "96256a3bc975595eb36d82e9929d060d893439ff",
+ "_spec": "fast-deep-equal@^1.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/ajv",
+ "author": {
+ "name": "Evgeny Poberezkin"
+ },
+ "bugs": {
+ "url": "https://github.com/epoberezkin/fast-deep-equal/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Fast deep equal",
+ "devDependencies": {
+ "benchmark": "^2.1.4",
+ "coveralls": "^2.13.1",
+ "deep-eql": "^2.0.2",
+ "deep-equal": "^1.0.1",
+ "eslint": "^4.0.0",
+ "lodash": "^4.17.4",
+ "mocha": "^3.4.2",
+ "nano-equal": "^1.0.1",
+ "nyc": "^11.0.2",
+ "pre-commit": "^1.2.2",
+ "shallow-equal-fuzzy": "0.0.2",
+ "underscore": "^1.8.3"
+ },
+ "homepage": "https://github.com/epoberezkin/fast-deep-equal#readme",
+ "keywords": [
+ "fast",
+ "equal",
+ "deep-equal"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "fast-deep-equal",
+ "nyc": {
+ "exclude": [
+ "**/spec/**",
+ "node_modules"
+ ],
+ "reporter": [
+ "lcov",
+ "text-summary"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/epoberezkin/fast-deep-equal.git"
+ },
+ "scripts": {
+ "eslint": "eslint *.js benchmark spec",
+ "test": "npm run eslint && npm run test-cov",
+ "test-cov": "nyc npm run test-spec",
+ "test-spec": "mocha spec/*.spec.js -R spec"
+ },
+ "version": "1.0.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/fast-json-stable-stringify/.eslintrc.yml b/tools/node_modules/eslint/node_modules/fast-json-stable-stringify/.eslintrc.yml
new file mode 100644
index 0000000000..1c77b0d479
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/fast-json-stable-stringify/.eslintrc.yml
@@ -0,0 +1,26 @@
+extends: eslint:recommended
+env:
+ node: true
+ browser: true
+rules:
+ block-scoped-var: 2
+ callback-return: 2
+ dot-notation: 2
+ indent: 2
+ linebreak-style: [2, unix]
+ new-cap: 2
+ no-console: [2, allow: [warn, error]]
+ no-else-return: 2
+ no-eq-null: 2
+ no-fallthrough: 2
+ no-invalid-this: 2
+ no-return-assign: 2
+ no-shadow: 1
+ no-trailing-spaces: 2
+ no-use-before-define: [2, nofunc]
+ quotes: [2, single, avoid-escape]
+ semi: [2, always]
+ strict: [2, global]
+ valid-jsdoc: [2, requireReturn: false]
+ no-control-regex: 0
+ no-useless-escape: 2
diff --git a/tools/node_modules/eslint/node_modules/fast-json-stable-stringify/LICENSE b/tools/node_modules/eslint/node_modules/fast-json-stable-stringify/LICENSE
new file mode 100644
index 0000000000..ee27ba4b44
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/fast-json-stable-stringify/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/tools/node_modules/eslint/node_modules/fast-json-stable-stringify/README.md b/tools/node_modules/eslint/node_modules/fast-json-stable-stringify/README.md
new file mode 100644
index 0000000000..0f43b4a7e0
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/fast-json-stable-stringify/README.md
@@ -0,0 +1,119 @@
+# fast-json-stable-stringify
+
+Deterministic `JSON.stringify()` - a faster version of [@substack](https://github.com/substack)'s json-stable-strigify without [jsonify](https://github.com/substack/jsonify).
+
+You can also pass in a custom comparison function.
+
+[![Build Status](https://travis-ci.org/epoberezkin/fast-json-stable-stringify.svg?branch=master)](https://travis-ci.org/epoberezkin/fast-json-stable-stringify)
+[![Coverage Status](https://coveralls.io/repos/github/epoberezkin/fast-json-stable-stringify/badge.svg?branch=master)](https://coveralls.io/github/epoberezkin/fast-json-stable-stringify?branch=master)
+
+# example
+
+``` js
+var stringify = require('fast-json-stable-stringify');
+var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };
+console.log(stringify(obj));
+```
+
+output:
+
+```
+{"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8}
+```
+
+
+# methods
+
+``` js
+var stringify = require('fast-json-stable-stringify')
+```
+
+## var str = stringify(obj, opts)
+
+Return a deterministic stringified string `str` from the object `obj`.
+
+
+## options
+
+### cmp
+
+If `opts` is given, you can supply an `opts.cmp` to have a custom comparison
+function for object keys. Your function `opts.cmp` is called with these
+parameters:
+
+``` js
+opts.cmp({ key: akey, value: avalue }, { key: bkey, value: bvalue })
+```
+
+For example, to sort on the object key names in reverse order you could write:
+
+``` js
+var stringify = require('fast-json-stable-stringify');
+
+var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };
+var s = stringify(obj, function (a, b) {
+ return a.key < b.key ? 1 : -1;
+});
+console.log(s);
+```
+
+which results in the output string:
+
+```
+{"c":8,"b":[{"z":6,"y":5,"x":4},7],"a":3}
+```
+
+Or if you wanted to sort on the object values in reverse order, you could write:
+
+```
+var stringify = require('fast-json-stable-stringify');
+
+var obj = { d: 6, c: 5, b: [{z:3,y:2,x:1},9], a: 10 };
+var s = stringify(obj, function (a, b) {
+ return a.value < b.value ? 1 : -1;
+});
+console.log(s);
+```
+
+which outputs:
+
+```
+{"d":6,"c":5,"b":[{"z":3,"y":2,"x":1},9],"a":10}
+```
+
+### cycles
+
+Pass `true` in `opts.cycles` to stringify circular property as `__cycle__` - the result will not be a valid JSON string in this case.
+
+TypeError will be thrown in case of circular object without this option.
+
+
+# install
+
+With [npm](https://npmjs.org) do:
+
+```
+npm install fast-json-stable-stringify
+```
+
+
+# benchmark
+
+To run benchmark (requires Node.js 6+):
+```
+node benchmark
+```
+
+Results:
+```
+fast-json-stable-stringify x 17,189 ops/sec ±1.43% (83 runs sampled)
+json-stable-stringify x 13,634 ops/sec ±1.39% (85 runs sampled)
+fast-stable-stringify x 20,212 ops/sec ±1.20% (84 runs sampled)
+faster-stable-stringify x 15,549 ops/sec ±1.12% (84 runs sampled)
+The fastest is fast-stable-stringify
+```
+
+
+# license
+
+[MIT](https://github.com/epoberezkin/fast-json-stable-stringify/blob/master/LICENSE)
diff --git a/tools/node_modules/eslint/node_modules/fast-json-stable-stringify/index.js b/tools/node_modules/eslint/node_modules/fast-json-stable-stringify/index.js
new file mode 100644
index 0000000000..c44e6a4137
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/fast-json-stable-stringify/index.js
@@ -0,0 +1,59 @@
+'use strict';
+
+module.exports = function (data, opts) {
+ if (!opts) opts = {};
+ if (typeof opts === 'function') opts = { cmp: opts };
+ var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false;
+
+ var cmp = opts.cmp && (function (f) {
+ return function (node) {
+ return function (a, b) {
+ var aobj = { key: a, value: node[a] };
+ var bobj = { key: b, value: node[b] };
+ return f(aobj, bobj);
+ };
+ };
+ })(opts.cmp);
+
+ var seen = [];
+ return (function stringify (node) {
+ if (node && node.toJSON && typeof node.toJSON === 'function') {
+ node = node.toJSON();
+ }
+
+ if (node === undefined) return;
+ if (typeof node == 'number') return isFinite(node) ? '' + node : 'null';
+ if (typeof node !== 'object') return JSON.stringify(node);
+
+ var i, out;
+ if (Array.isArray(node)) {
+ out = '[';
+ for (i = 0; i < node.length; i++) {
+ if (i) out += ',';
+ out += stringify(node[i]) || 'null';
+ }
+ return out + ']';
+ }
+
+ if (node === null) return 'null';
+
+ if (seen.indexOf(node) !== -1) {
+ if (cycles) return JSON.stringify('__cycle__');
+ throw new TypeError('Converting circular structure to JSON');
+ }
+
+ var seenIndex = seen.push(node) - 1;
+ var keys = Object.keys(node).sort(cmp && cmp(node));
+ out = '';
+ for (i = 0; i < keys.length; i++) {
+ var key = keys[i];
+ var value = stringify(node[key]);
+
+ if (!value) continue;
+ if (out) out += ',';
+ out += JSON.stringify(key) + ':' + value;
+ }
+ seen.splice(seenIndex, 1);
+ return '{' + out + '}';
+ })(data);
+};
diff --git a/tools/node_modules/eslint/node_modules/fast-json-stable-stringify/package.json b/tools/node_modules/eslint/node_modules/fast-json-stable-stringify/package.json
new file mode 100644
index 0000000000..71e6a371e1
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/fast-json-stable-stringify/package.json
@@ -0,0 +1,78 @@
+{
+ "_from": "fast-json-stable-stringify@^2.0.0",
+ "_id": "fast-json-stable-stringify@2.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=",
+ "_location": "/eslint/fast-json-stable-stringify",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "fast-json-stable-stringify@^2.0.0",
+ "name": "fast-json-stable-stringify",
+ "escapedName": "fast-json-stable-stringify",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/eslint/ajv"
+ ],
+ "_resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
+ "_shasum": "d5142c0caee6b1189f87d3a76111064f86c8bbf2",
+ "_spec": "fast-json-stable-stringify@^2.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/ajv",
+ "author": {
+ "name": "James Halliday",
+ "email": "mail@substack.net",
+ "url": "http://substack.net"
+ },
+ "bugs": {
+ "url": "https://github.com/epoberezkin/fast-json-stable-stringify/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "deterministic `JSON.stringify()` - a faster version of substack's json-stable-strigify without jsonify",
+ "devDependencies": {
+ "benchmark": "^2.1.4",
+ "coveralls": "^3.0.0",
+ "eslint": "^4.9.0",
+ "fast-stable-stringify": "latest",
+ "faster-stable-stringify": "latest",
+ "json-stable-stringify": "latest",
+ "nyc": "^11.2.1",
+ "pre-commit": "^1.2.2",
+ "tape": "~1.0.4"
+ },
+ "homepage": "https://github.com/epoberezkin/fast-json-stable-stringify",
+ "keywords": [
+ "json",
+ "stringify",
+ "deterministic",
+ "hash",
+ "stable"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "fast-json-stable-stringify",
+ "nyc": {
+ "exclude": [
+ "test",
+ "node_modules"
+ ],
+ "reporter": [
+ "lcov",
+ "text-summary"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/epoberezkin/fast-json-stable-stringify.git"
+ },
+ "scripts": {
+ "eslint": "eslint index.js test",
+ "test": "npm run eslint && nyc npm run test-spec",
+ "test-spec": "tape test/*.js"
+ },
+ "version": "2.0.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/fast-levenshtein/LICENSE.md b/tools/node_modules/eslint/node_modules/fast-levenshtein/LICENSE.md
new file mode 100644
index 0000000000..6212406b41
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/fast-levenshtein/LICENSE.md
@@ -0,0 +1,25 @@
+(MIT License)
+
+Copyright (c) 2013 [Ramesh Nair](http://www.hiddentao.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/tools/node_modules/eslint/node_modules/fast-levenshtein/README.md b/tools/node_modules/eslint/node_modules/fast-levenshtein/README.md
new file mode 100644
index 0000000000..a778995396
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/fast-levenshtein/README.md
@@ -0,0 +1,104 @@
+# fast-levenshtein - Levenshtein algorithm in Javascript
+
+[![Build Status](https://secure.travis-ci.org/hiddentao/fast-levenshtein.png)](http://travis-ci.org/hiddentao/fast-levenshtein)
+[![NPM module](https://badge.fury.io/js/fast-levenshtein.png)](https://badge.fury.io/js/fast-levenshtein)
+[![NPM downloads](https://img.shields.io/npm/dm/fast-levenshtein.svg?maxAge=2592000)](https://www.npmjs.com/package/fast-levenshtein)
+[![Follow on Twitter](https://img.shields.io/twitter/url/http/shields.io.svg?style=social&label=Follow&maxAge=2592000)](https://twitter.com/hiddentao)
+
+An efficient Javascript implementation of the [Levenshtein algorithm](http://en.wikipedia.org/wiki/Levenshtein_distance) with locale-specific collator support.
+
+## Features
+
+* Works in node.js and in the browser.
+* Better performance than other implementations by not needing to store the whole matrix ([more info](http://www.codeproject.com/Articles/13525/Fast-memory-efficient-Levenshtein-algorithm)).
+* Locale-sensitive string comparisions if needed.
+* Comprehensive test suite and performance benchmark.
+* Small: <1 KB minified and gzipped
+
+## Installation
+
+### node.js
+
+Install using [npm](http://npmjs.org/):
+
+```bash
+$ npm install fast-levenshtein
+```
+
+### Browser
+
+Using bower:
+
+```bash
+$ bower install fast-levenshtein
+```
+
+If you are not using any module loader system then the API will then be accessible via the `window.Levenshtein` object.
+
+## Examples
+
+**Default usage**
+
+```javascript
+var levenshtein = require('fast-levenshtein');
+
+var distance = levenshtein.get('back', 'book'); // 2
+var distance = levenshtein.get('我愛你', '我叫你'); // 1
+```
+
+**Locale-sensitive string comparisons**
+
+It supports using [Intl.Collator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Collator) for locale-sensitive string comparisons:
+
+```javascript
+var levenshtein = require('fast-levenshtein');
+
+levenshtein.get('mikailovitch', 'Mikhaïlovitch', { useCollator: true});
+// 1
+```
+
+## Building and Testing
+
+To build the code and run the tests:
+
+```bash
+$ npm install -g grunt-cli
+$ npm install
+$ npm run build
+```
+
+## Performance
+
+_Thanks to [Titus Wormer](https://github.com/wooorm) for [encouraging me](https://github.com/hiddentao/fast-levenshtein/issues/1) to do this._
+
+Benchmarked against other node.js levenshtein distance modules (on Macbook Air 2012, Core i7, 8GB RAM):
+
+```bash
+Running suite Implementation comparison [benchmark/speed.js]...
+>> levenshtein-edit-distance x 234 ops/sec ±3.02% (73 runs sampled)
+>> levenshtein-component x 422 ops/sec ±4.38% (83 runs sampled)
+>> levenshtein-deltas x 283 ops/sec ±3.83% (78 runs sampled)
+>> natural x 255 ops/sec ±0.76% (88 runs sampled)
+>> levenshtein x 180 ops/sec ±3.55% (86 runs sampled)
+>> fast-levenshtein x 1,792 ops/sec ±2.72% (95 runs sampled)
+Benchmark done.
+Fastest test is fast-levenshtein at 4.2x faster than levenshtein-component
+```
+
+You can run this benchmark yourself by doing:
+
+```bash
+$ npm install
+$ npm run build
+$ npm run benchmark
+```
+
+## Contributing
+
+If you wish to submit a pull request please update and/or create new tests for any changes you make and ensure the grunt build passes.
+
+See [CONTRIBUTING.md](https://github.com/hiddentao/fast-levenshtein/blob/master/CONTRIBUTING.md) for details.
+
+## License
+
+MIT - see [LICENSE.md](https://github.com/hiddentao/fast-levenshtein/blob/master/LICENSE.md)
diff --git a/tools/node_modules/eslint/node_modules/fast-levenshtein/levenshtein.js b/tools/node_modules/eslint/node_modules/fast-levenshtein/levenshtein.js
new file mode 100644
index 0000000000..dbe3628080
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/fast-levenshtein/levenshtein.js
@@ -0,0 +1,136 @@
+(function() {
+ 'use strict';
+
+ var collator;
+ try {
+ collator = (typeof Intl !== "undefined" && typeof Intl.Collator !== "undefined") ? Intl.Collator("generic", { sensitivity: "base" }) : null;
+ } catch (err){
+ console.log("Collator could not be initialized and wouldn't be used");
+ }
+ // arrays to re-use
+ var prevRow = [],
+ str2Char = [];
+
+ /**
+ * Based on the algorithm at http://en.wikipedia.org/wiki/Levenshtein_distance.
+ */
+ var Levenshtein = {
+ /**
+ * Calculate levenshtein distance of the two strings.
+ *
+ * @param str1 String the first string.
+ * @param str2 String the second string.
+ * @param [options] Additional options.
+ * @param [options.useCollator] Use `Intl.Collator` for locale-sensitive string comparison.
+ * @return Integer the levenshtein distance (0 and above).
+ */
+ get: function(str1, str2, options) {
+ var useCollator = (options && collator && options.useCollator);
+
+ var str1Len = str1.length,
+ str2Len = str2.length;
+
+ // base cases
+ if (str1Len === 0) return str2Len;
+ if (str2Len === 0) return str1Len;
+
+ // two rows
+ var curCol, nextCol, i, j, tmp;
+
+ // initialise previous row
+ for (i=0; i<str2Len; ++i) {
+ prevRow[i] = i;
+ str2Char[i] = str2.charCodeAt(i);
+ }
+ prevRow[str2Len] = str2Len;
+
+ var strCmp;
+ if (useCollator) {
+ // calculate current row distance from previous row using collator
+ for (i = 0; i < str1Len; ++i) {
+ nextCol = i + 1;
+
+ for (j = 0; j < str2Len; ++j) {
+ curCol = nextCol;
+
+ // substution
+ strCmp = 0 === collator.compare(str1.charAt(i), String.fromCharCode(str2Char[j]));
+
+ nextCol = prevRow[j] + (strCmp ? 0 : 1);
+
+ // insertion
+ tmp = curCol + 1;
+ if (nextCol > tmp) {
+ nextCol = tmp;
+ }
+ // deletion
+ tmp = prevRow[j + 1] + 1;
+ if (nextCol > tmp) {
+ nextCol = tmp;
+ }
+
+ // copy current col value into previous (in preparation for next iteration)
+ prevRow[j] = curCol;
+ }
+
+ // copy last col value into previous (in preparation for next iteration)
+ prevRow[j] = nextCol;
+ }
+ }
+ else {
+ // calculate current row distance from previous row without collator
+ for (i = 0; i < str1Len; ++i) {
+ nextCol = i + 1;
+
+ for (j = 0; j < str2Len; ++j) {
+ curCol = nextCol;
+
+ // substution
+ strCmp = str1.charCodeAt(i) === str2Char[j];
+
+ nextCol = prevRow[j] + (strCmp ? 0 : 1);
+
+ // insertion
+ tmp = curCol + 1;
+ if (nextCol > tmp) {
+ nextCol = tmp;
+ }
+ // deletion
+ tmp = prevRow[j + 1] + 1;
+ if (nextCol > tmp) {
+ nextCol = tmp;
+ }
+
+ // copy current col value into previous (in preparation for next iteration)
+ prevRow[j] = curCol;
+ }
+
+ // copy last col value into previous (in preparation for next iteration)
+ prevRow[j] = nextCol;
+ }
+ }
+ return nextCol;
+ }
+
+ };
+
+ // amd
+ if (typeof define !== "undefined" && define !== null && define.amd) {
+ define(function() {
+ return Levenshtein;
+ });
+ }
+ // commonjs
+ else if (typeof module !== "undefined" && module !== null && typeof exports !== "undefined" && module.exports === exports) {
+ module.exports = Levenshtein;
+ }
+ // web worker
+ else if (typeof self !== "undefined" && typeof self.postMessage === 'function' && typeof self.importScripts === 'function') {
+ self.Levenshtein = Levenshtein;
+ }
+ // browser main thread
+ else if (typeof window !== "undefined" && window !== null) {
+ window.Levenshtein = Levenshtein;
+ }
+}());
+
diff --git a/tools/node_modules/eslint/node_modules/fast-levenshtein/package.json b/tools/node_modules/eslint/node_modules/fast-levenshtein/package.json
new file mode 100644
index 0000000000..9afbe02e11
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/fast-levenshtein/package.json
@@ -0,0 +1,72 @@
+{
+ "_from": "fast-levenshtein@~2.0.4",
+ "_id": "fast-levenshtein@2.0.6",
+ "_inBundle": false,
+ "_integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=",
+ "_location": "/eslint/fast-levenshtein",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "fast-levenshtein@~2.0.4",
+ "name": "fast-levenshtein",
+ "escapedName": "fast-levenshtein",
+ "rawSpec": "~2.0.4",
+ "saveSpec": null,
+ "fetchSpec": "~2.0.4"
+ },
+ "_requiredBy": [
+ "/eslint/optionator"
+ ],
+ "_resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
+ "_shasum": "3d8a5c66883a16a30ca8643e851f19baa7797917",
+ "_spec": "fast-levenshtein@~2.0.4",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/optionator",
+ "author": {
+ "name": "Ramesh Nair",
+ "email": "ram@hiddentao.com",
+ "url": "http://www.hiddentao.com/"
+ },
+ "bugs": {
+ "url": "https://github.com/hiddentao/fast-levenshtein/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Efficient implementation of Levenshtein algorithm with locale-specific collator support.",
+ "devDependencies": {
+ "chai": "~1.5.0",
+ "grunt": "~0.4.1",
+ "grunt-benchmark": "~0.2.0",
+ "grunt-cli": "^1.2.0",
+ "grunt-contrib-jshint": "~0.4.3",
+ "grunt-contrib-uglify": "~0.2.0",
+ "grunt-mocha-test": "~0.2.2",
+ "grunt-npm-install": "~0.1.0",
+ "load-grunt-tasks": "~0.6.0",
+ "lodash": "^4.0.1",
+ "mocha": "~1.9.0"
+ },
+ "files": [
+ "levenshtein.js"
+ ],
+ "homepage": "https://github.com/hiddentao/fast-levenshtein#readme",
+ "keywords": [
+ "levenshtein",
+ "distance",
+ "string"
+ ],
+ "license": "MIT",
+ "main": "levenshtein.js",
+ "name": "fast-levenshtein",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/hiddentao/fast-levenshtein.git"
+ },
+ "scripts": {
+ "benchmark": "grunt benchmark",
+ "build": "grunt build",
+ "prepublish": "npm run build",
+ "test": "mocha"
+ },
+ "version": "2.0.6"
+}
diff --git a/tools/node_modules/eslint/node_modules/figures/index.js b/tools/node_modules/eslint/node_modules/figures/index.js
new file mode 100644
index 0000000000..c01148ccb1
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/figures/index.js
@@ -0,0 +1,147 @@
+'use strict';
+const escapeStringRegexp = require('escape-string-regexp');
+
+const platform = process.platform;
+
+const main = {
+ tick: '✔',
+ cross: '✖',
+ star: '★',
+ square: '▇',
+ squareSmall: '◻',
+ squareSmallFilled: '◼',
+ play: '▶',
+ circle: '◯',
+ circleFilled: '◉',
+ circleDotted: '◌',
+ circleDouble: '◎',
+ circleCircle: 'ⓞ',
+ circleCross: 'ⓧ',
+ circlePipe: 'Ⓘ',
+ circleQuestionMark: '?⃝',
+ bullet: '●',
+ dot: '․',
+ line: '─',
+ ellipsis: '…',
+ pointer: '❯',
+ pointerSmall: '›',
+ info: 'ℹ',
+ warning: '⚠',
+ hamburger: '☰',
+ smiley: '㋡',
+ mustache: '෴',
+ heart: '♥',
+ arrowUp: '↑',
+ arrowDown: '↓',
+ arrowLeft: '←',
+ arrowRight: '→',
+ radioOn: '◉',
+ radioOff: '◯',
+ checkboxOn: '☒',
+ checkboxOff: '☐',
+ checkboxCircleOn: 'ⓧ',
+ checkboxCircleOff: 'Ⓘ',
+ questionMarkPrefix: '?⃝',
+ oneHalf: '½',
+ oneThird: '⅓',
+ oneQuarter: '¼',
+ oneFifth: '⅕',
+ oneSixth: '⅙',
+ oneSeventh: '⅐',
+ oneEighth: '⅛',
+ oneNinth: '⅑',
+ oneTenth: '⅒',
+ twoThirds: '⅔',
+ twoFifths: '⅖',
+ threeQuarters: '¾',
+ threeFifths: '⅗',
+ threeEighths: '⅜',
+ fourFifths: '⅘',
+ fiveSixths: '⅚',
+ fiveEighths: '⅝',
+ sevenEighths: '⅞'
+};
+
+const win = {
+ tick: '√',
+ cross: '×',
+ star: '*',
+ square: '█',
+ squareSmall: '[ ]',
+ squareSmallFilled: '[█]',
+ play: '►',
+ circle: '( )',
+ circleFilled: '(*)',
+ circleDotted: '( )',
+ circleDouble: '( )',
+ circleCircle: '(○)',
+ circleCross: '(×)',
+ circlePipe: '(│)',
+ circleQuestionMark: '(?)',
+ bullet: '*',
+ dot: '.',
+ line: '─',
+ ellipsis: '...',
+ pointer: '>',
+ pointerSmall: '»',
+ info: 'i',
+ warning: '‼',
+ hamburger: '≡',
+ smiley: '☺',
+ mustache: '┌─┐',
+ heart: main.heart,
+ arrowUp: main.arrowUp,
+ arrowDown: main.arrowDown,
+ arrowLeft: main.arrowLeft,
+ arrowRight: main.arrowRight,
+ radioOn: '(*)',
+ radioOff: '( )',
+ checkboxOn: '[×]',
+ checkboxOff: '[ ]',
+ checkboxCircleOn: '(×)',
+ checkboxCircleOff: '( )',
+ questionMarkPrefix: '?',
+ oneHalf: '1/2',
+ oneThird: '1/3',
+ oneQuarter: '1/4',
+ oneFifth: '1/5',
+ oneSixth: '1/6',
+ oneSeventh: '1/7',
+ oneEighth: '1/8',
+ oneNinth: '1/9',
+ oneTenth: '1/10',
+ twoThirds: '2/3',
+ twoFifths: '2/5',
+ threeQuarters: '3/4',
+ threeFifths: '3/5',
+ threeEighths: '3/8',
+ fourFifths: '4/5',
+ fiveSixths: '5/6',
+ fiveEighths: '5/8',
+ sevenEighths: '7/8'
+};
+
+if (platform === 'linux') {
+ // the main one doesn't look that good on Ubuntu
+ main.questionMarkPrefix = '?';
+}
+
+const figures = platform === 'win32' ? win : main;
+
+const fn = str => {
+ if (figures === main) {
+ return str;
+ }
+
+ Object.keys(main).forEach(key => {
+ if (main[key] === figures[key]) {
+ return;
+ }
+
+ str = str.replace(new RegExp(escapeStringRegexp(main[key]), 'g'), figures[key]);
+ });
+
+ return str;
+};
+
+module.exports = Object.assign(fn, figures);
diff --git a/tools/node_modules/eslint/node_modules/figures/license b/tools/node_modules/eslint/node_modules/figures/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/figures/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/tools/node_modules/eslint/node_modules/figures/package.json b/tools/node_modules/eslint/node_modules/figures/package.json
new file mode 100644
index 0000000000..f52135148a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/figures/package.json
@@ -0,0 +1,79 @@
+{
+ "_from": "figures@^2.0.0",
+ "_id": "figures@2.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=",
+ "_location": "/eslint/figures",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "figures@^2.0.0",
+ "name": "figures",
+ "escapedName": "figures",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/eslint/inquirer"
+ ],
+ "_resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz",
+ "_shasum": "3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962",
+ "_spec": "figures@^2.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/inquirer",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/figures/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "escape-string-regexp": "^1.0.5"
+ },
+ "deprecated": false,
+ "description": "Unicode symbols with Windows CMD fallbacks",
+ "devDependencies": {
+ "ava": "*",
+ "markdown-table": "^1.0.0",
+ "require-uncached": "^1.0.2",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/figures#readme",
+ "keywords": [
+ "unicode",
+ "cli",
+ "cmd",
+ "command-line",
+ "characters",
+ "char",
+ "symbol",
+ "symbols",
+ "figure",
+ "figures",
+ "fallback"
+ ],
+ "license": "MIT",
+ "name": "figures",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/figures.git"
+ },
+ "scripts": {
+ "make": "./makefile.js",
+ "test": "xo && ava"
+ },
+ "version": "2.0.0",
+ "xo": {
+ "esnext": true
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/figures/readme.md b/tools/node_modules/eslint/node_modules/figures/readme.md
new file mode 100644
index 0000000000..628703a0a7
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/figures/readme.md
@@ -0,0 +1,120 @@
+# figures [![Build Status: Linux](https://travis-ci.org/sindresorhus/figures.svg?branch=master)](https://travis-ci.org/sindresorhus/figures) [![Build status: Windows](https://ci.appveyor.com/api/projects/status/mb743hl70269be3r/branch/master?svg=true)](https://ci.appveyor.com/project/sindresorhus/figures/branch/master)
+
+> Unicode symbols with Windows CMD fallbacks
+
+[![](screenshot.png)](index.js)
+
+[*and more...*](index.js)
+
+Windows CMD only supports a [limited character set](http://en.wikipedia.org/wiki/Code_page_437).
+
+
+## Install
+
+```
+$ npm install --save figures
+```
+
+
+## Usage
+
+See the [source](index.js) for supported symbols.
+
+```js
+const figures = require('figures');
+
+console.log(figures('✔︎ check'));
+// On real OSes: ✔︎ check
+// On Windows: √ check
+
+console.log(figures.tick);
+// On real OSes: ✔︎
+// On Windows: √
+```
+
+
+## API
+
+### figures(input)
+
+Returns the input with replaced fallback unicode symbols on Windows.
+
+All the below [figures](#figures) are attached to the main export as shown in the example above.
+
+#### input
+
+Type: `string`
+
+String where the unicode symbols will be replaced with fallback symbols depending on the OS.
+
+
+## Figures
+
+| Name | Real OSes | Windows |
+| ------------------ | :-------: | :-----: |
+| tick | ✔ | √ |
+| cross | ✖ | × |
+| star | ★ | * |
+| square | ▇ | █ |
+| squareSmall | ◻ | [ ] |
+| squareSmallFilled | ◼ | [█] |
+| play | ▶ | ► |
+| circle | ◯ | ( ) |
+| circleFilled | ◉ | (*) |
+| circleDotted | ◌ | ( ) |
+| circleDouble | ◎ | ( ) |
+| circleCircle | ⓞ | (○) |
+| circleCross | ⓧ | (×) |
+| circlePipe | Ⓘ | (│) |
+| circleQuestionMark | ?⃝ | (?) |
+| bullet | ● | * |
+| dot | ․ | . |
+| line | ─ | ─ |
+| ellipsis | … | ... |
+| pointer | ❯ | > |
+| pointerSmall | › | » |
+| info | ℹ | i |
+| warning | ⚠ | ‼ |
+| hamburger | ☰ | ≡ |
+| smiley | ㋡ | ☺ |
+| mustache | ෴ | ┌─┐ |
+| heart | ♥ | ♥ |
+| arrowUp | ↑ | ↑ |
+| arrowDown | ↓ | ↓ |
+| arrowLeft | ← | ← |
+| arrowRight | → | → |
+| radioOn | ◉ | (*) |
+| radioOff | ◯ | ( ) |
+| checkboxOn | ☒ | [×] |
+| checkboxOff | ☐ | [ ] |
+| checkboxCircleOn | ⓧ | (×) |
+| checkboxCircleOff | Ⓘ | ( ) |
+| questionMarkPrefix | ?⃝ | ? |
+| oneHalf | ½ | 1/2 |
+| oneThird | ⅓ | 1/3 |
+| oneQuarter | ¼ | 1/4 |
+| oneFifth | ⅕ | 1/5 |
+| oneSixth | ⅙ | 1/6 |
+| oneSeventh | ⅐ | 1/7 |
+| oneEighth | ⅛ | 1/8 |
+| oneNinth | ⅑ | 1/9 |
+| oneTenth | ⅒ | 1/10 |
+| twoThirds | ⅔ | 2/3 |
+| twoFifths | ⅖ | 2/5 |
+| threeQuarters | ¾ | 3/4 |
+| threeFifths | ⅗ | 3/5 |
+| threeEighths | ⅜ | 3/8 |
+| fourFifths | ⅘ | 4/5 |
+| fiveSixths | ⅚ | 5/6 |
+| fiveEighths | ⅝ | 5/8 |
+| sevenEighths | ⅞ | 7/8 |
+
+
+## Related
+
+- [log-symbols](https://github.com/sindresorhus/log-symbols) - Colored symbols for various log levels
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/tools/node_modules/eslint/node_modules/file-entry-cache/LICENSE b/tools/node_modules/eslint/node_modules/file-entry-cache/LICENSE
new file mode 100644
index 0000000000..c58c339631
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/file-entry-cache/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Roy Riojas
+
+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/tools/node_modules/eslint/node_modules/file-entry-cache/README.md b/tools/node_modules/eslint/node_modules/file-entry-cache/README.md
new file mode 100644
index 0000000000..19d25f0445
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/file-entry-cache/README.md
@@ -0,0 +1,107 @@
+# file-entry-cache
+> Super simple cache for file metadata, useful for process that work o a given series of files
+> and that only need to repeat the job on the changed ones since the previous run of the process — Edit
+
+[![NPM Version](http://img.shields.io/npm/v/file-entry-cache.svg?style=flat)](https://npmjs.org/package/file-entry-cache)
+[![Build Status](http://img.shields.io/travis/royriojas/file-entry-cache.svg?style=flat)](https://travis-ci.org/royriojas/file-entry-cache)
+
+## install
+
+```bash
+npm i --save file-entry-cache
+```
+
+## Usage
+
+```js
+// loads the cache, if one does not exists for the given
+// Id a new one will be prepared to be created
+var fileEntryCache = require('file-entry-cache');
+
+var cache = fileEntryCache.create('testCache');
+
+var files = expand('../fixtures/*.txt');
+
+// the first time this method is called, will return all the files
+var oFiles = cache.getUpdatedFiles(files);
+
+// this will persist this to disk checking each file stats and
+// updating the meta attributes `size` and `mtime`.
+// custom fields could also be added to the meta object and will be persisted
+// in order to retrieve them later
+cache.reconcile();
+
+// use this if you want the non visited file entries to be kept in the cache
+// for more than one execution
+//
+// cache.reconcile( true /* noPrune */)
+
+// on a second run
+var cache2 = fileEntryCache.create('testCache');
+
+// will return now only the files that were modified or none
+// if no files were modified previous to the execution of this function
+var oFiles = cache.getUpdatedFiles(files);
+
+// if you want to prevent a file from being considered non modified
+// something useful if a file failed some sort of validation
+// you can then remove the entry from the cache doing
+cache.removeEntry('path/to/file'); // path to file should be the same path of the file received on `getUpdatedFiles`
+// that will effectively make the file to appear again as modified until the validation is passed. In that
+// case you should not remove it from the cache
+
+// if you need all the files, so you can determine what to do with the changed ones
+// you can call
+var oFiles = cache.normalizeEntries(files);
+
+// oFiles will be an array of objects like the following
+entry = {
+ key: 'some/name/file', the path to the file
+ changed: true, // if the file was changed since previous run
+ meta: {
+ size: 3242, // the size of the file
+ mtime: 231231231, // the modification time of the file
+ data: {} // some extra field stored for this file (useful to save the result of a transformation on the file
+ }
+}
+
+```
+
+## Motivation for this module
+
+I needed a super simple and dumb **in-memory cache** with optional disk persistence (write-back cache) in order to make
+a script that will beautify files with `esformatter` to execute only on the files that were changed since the last run.
+
+In doing so the process of beautifying files was reduced from several seconds to a small fraction of a second.
+
+This module uses [flat-cache](https://www.npmjs.com/package/flat-cache) a super simple `key/value` cache storage with
+optional file persistance.
+
+The main idea is to read the files when the task begins, apply the transforms required, and if the process succeed,
+then store the new state of the files. The next time this module request for `getChangedFiles` will return only
+the files that were modified. Making the process to end faster.
+
+This module could also be used by processes that modify the files applying a transform, in that case the result of the
+transform could be stored in the `meta` field, of the entries. Anything added to the meta field will be persisted.
+Those processes won't need to call `getChangedFiles` they will instead call `normalizeEntries` that will return the
+entries with a `changed` field that can be used to determine if the file was changed or not. If it was not changed
+the transformed stored data could be used instead of actually applying the transformation, saving time in case of only
+a few files changed.
+
+In the worst case scenario all the files will be processed. In the best case scenario only a few of them will be processed.
+
+## Important notes
+- The values set on the meta attribute of the entries should be `stringify-able` ones if possible, flat-cache uses `circular-json` to try to persist circular structures, but this should be considered experimental. The best results are always obtained with non circular values
+- All the changes to the cache state are done to memory first and only persisted after reconcile.
+- By default non visited entries are removed from the cache. This is done to prevent the file from growing too much. If this is not an issue and
+ you prefer to do a manual pruning of the cache files, you can pass `true` to the `reconcile` call. Like this:
+
+ ```javascript
+ cache.reconcile( true /* noPrune */ );
+ ```
+
+## License
+
+MIT
+
+
diff --git a/tools/node_modules/eslint/node_modules/file-entry-cache/cache.js b/tools/node_modules/eslint/node_modules/file-entry-cache/cache.js
new file mode 100644
index 0000000000..c37d679f63
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/file-entry-cache/cache.js
@@ -0,0 +1,216 @@
+var path = require( 'path' );
+
+module.exports = {
+ createFromFile: function ( filePath ) {
+ var fname = path.basename( filePath );
+ var dir = path.dirname( filePath );
+ return this.create( fname, dir );
+ },
+
+ create: function ( cacheId, _path ) {
+ var fs = require( 'fs' );
+ var flatCache = require( 'flat-cache' );
+ var cache = flatCache.load( cacheId, _path );
+ var assign = require( 'object-assign' );
+ var normalizedEntries = { };
+
+ var removeNotFoundFiles = function removeNotFoundFiles() {
+ const cachedEntries = cache.keys();
+ // remove not found entries
+ cachedEntries.forEach( function remover( fPath ) {
+ try {
+ fs.statSync( fPath );
+ } catch (err) {
+ if ( err.code === 'ENOENT' ) {
+ cache.removeKey( fPath );
+ }
+ }
+ } );
+ };
+
+ removeNotFoundFiles();
+
+ return {
+ /**
+ * the flat cache storage used to persist the metadata of the `files
+ * @type {Object}
+ */
+ cache: cache,
+ /**
+ * Return whether or not a file has changed since last time reconcile was called.
+ * @method hasFileChanged
+ * @param {String} file the filepath to check
+ * @return {Boolean} wheter or not the file has changed
+ */
+ hasFileChanged: function ( file ) {
+ return this.getFileDescriptor( file ).changed;
+ },
+
+ /**
+ * given an array of file paths it return and object with three arrays:
+ * - changedFiles: Files that changed since previous run
+ * - notChangedFiles: Files that haven't change
+ * - notFoundFiles: Files that were not found, probably deleted
+ *
+ * @param {Array} files the files to analyze and compare to the previous seen files
+ * @return {[type]} [description]
+ */
+ analyzeFiles: function ( files ) {
+ var me = this;
+ files = files || [ ];
+
+ var res = {
+ changedFiles: [],
+ notFoundFiles: [],
+ notChangedFiles: []
+ };
+
+ me.normalizeEntries( files ).forEach( function ( entry ) {
+ if ( entry.changed ) {
+ res.changedFiles.push( entry.key );
+ return;
+ }
+ if ( entry.notFound ) {
+ res.notFoundFiles.push( entry.key );
+ return;
+ }
+ res.notChangedFiles.push( entry.key );
+ } );
+ return res;
+ },
+
+ getFileDescriptor: function ( file ) {
+ var meta = cache.getKey( file );
+ var cacheExists = !!meta;
+ var fstat;
+ var me = this;
+
+ try {
+ fstat = fs.statSync( file );
+ } catch (ex) {
+ me.removeEntry( file );
+ return { key: file, notFound: true, err: ex };
+ }
+
+ var cSize = fstat.size;
+ var cTime = fstat.mtime.getTime();
+
+ if ( !meta ) {
+ meta = { size: cSize, mtime: cTime };
+ } else {
+ var isDifferentDate = cTime !== meta.mtime;
+ var isDifferentSize = cSize !== meta.size;
+ }
+
+ var nEntry = normalizedEntries[ file ] = {
+ key: file,
+ changed: !cacheExists || isDifferentDate || isDifferentSize,
+ meta: meta
+ };
+
+ return nEntry;
+ },
+
+ /**
+ * Return the list o the files that changed compared
+ * against the ones stored in the cache
+ *
+ * @method getUpdated
+ * @param files {Array} the array of files to compare against the ones in the cache
+ * @returns {Array}
+ */
+ getUpdatedFiles: function ( files ) {
+ var me = this;
+ files = files || [ ];
+
+ return me.normalizeEntries( files ).filter( function ( entry ) {
+ return entry.changed;
+ } ).map( function ( entry ) {
+ return entry.key;
+ } );
+ },
+
+ /**
+ * return the list of files
+ * @method normalizeEntries
+ * @param files
+ * @returns {*}
+ */
+ normalizeEntries: function ( files ) {
+ files = files || [ ];
+
+ var me = this;
+ var nEntries = files.map( function ( file ) {
+ return me.getFileDescriptor( file );
+ } );
+
+ //normalizeEntries = nEntries;
+ return nEntries;
+ },
+
+ /**
+ * Remove an entry from the file-entry-cache. Useful to force the file to still be considered
+ * modified the next time the process is run
+ *
+ * @method removeEntry
+ * @param entryName
+ */
+ removeEntry: function ( entryName ) {
+ delete normalizedEntries[ entryName ];
+ cache.removeKey( entryName );
+ },
+
+ /**
+ * Delete the cache file from the disk
+ * @method deleteCacheFile
+ */
+ deleteCacheFile: function () {
+ cache.removeCacheFile();
+ },
+
+ /**
+ * remove the cache from the file and clear the memory cache
+ */
+ destroy: function () {
+ normalizedEntries = { };
+ cache.destroy();
+ },
+ /**
+ * Sync the files and persist them to the cache
+ * @method reconcile
+ */
+ reconcile: function () {
+ removeNotFoundFiles();
+
+ var entries = normalizedEntries;
+ var keys = Object.keys( entries );
+
+ if ( keys.length === 0 ) {
+ return;
+ }
+
+ keys.forEach( function ( entryName ) {
+ var cacheEntry = entries[ entryName ];
+
+ try {
+ var stat = fs.statSync( cacheEntry.key );
+ var meta = assign( cacheEntry.meta, {
+ size: stat.size,
+ mtime: stat.mtime.getTime()
+ } );
+
+ cache.setKey( entryName, meta );
+ } catch (err) {
+ // if the file does not exists we don't save it
+ // other errors are just thrown
+ if ( err.code !== 'ENOENT' ) {
+ throw err;
+ }
+ }
+ } );
+
+ cache.save( true );
+ }
+ };
+ }
+};
diff --git a/tools/node_modules/eslint/node_modules/file-entry-cache/changelog.md b/tools/node_modules/eslint/node_modules/file-entry-cache/changelog.md
new file mode 100644
index 0000000000..4cf9fdac65
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/file-entry-cache/changelog.md
@@ -0,0 +1,74 @@
+
+# file-entry-cache - Changelog
+## v2.0.0
+- **Features**
+ - do not persist and prune removed files from cache. Relates to [#2](https://github.com/royriojas/file-entry-cache/issues/2) - [408374d]( https://github.com/royriojas/file-entry-cache/commit/408374d ), [Roy Riojas](https://github.com/Roy Riojas), 16/08/2016 15:47:58
+
+
+## v1.3.1
+- **Build Scripts Changes**
+ - remove older node version - [0a26ac4]( https://github.com/royriojas/file-entry-cache/commit/0a26ac4 ), [Roy Riojas](https://github.com/Roy Riojas), 01/08/2016 06:09:17
+
+
+## v1.3.0
+- **Features**
+ - Add an option to not prune non visited keys. Closes [#2](https://github.com/royriojas/file-entry-cache/issues/2) - [b1a64db]( https://github.com/royriojas/file-entry-cache/commit/b1a64db ), [Roy Riojas](https://github.com/Roy Riojas), 01/08/2016 05:52:12
+
+
+## v1.2.4
+- **Enhancements**
+ - Expose the flat-cache instance - [f34c557]( https://github.com/royriojas/file-entry-cache/commit/f34c557 ), [royriojas](https://github.com/royriojas), 23/09/2015 20:26:33
+
+
+## v1.2.3
+- **Build Scripts Changes**
+ - update flat-cache dep - [cc7b9ce]( https://github.com/royriojas/file-entry-cache/commit/cc7b9ce ), [royriojas](https://github.com/royriojas), 11/09/2015 18:04:44
+
+
+## v1.2.2
+- **Build Scripts Changes**
+ - Add changelogx section to package.json - [a3916ff]( https://github.com/royriojas/file-entry-cache/commit/a3916ff ), [royriojas](https://github.com/royriojas), 11/09/2015 18:00:26
+
+
+## v1.2.1
+- **Build Scripts Changes**
+ - update flat-cache dep - [e49b0d4]( https://github.com/royriojas/file-entry-cache/commit/e49b0d4 ), [royriojas](https://github.com/royriojas), 11/09/2015 17:55:25
+
+
+- **Other changes**
+ - Update dependencies Replaced lodash.assign with smaller object-assign Fixed tests for windows - [0ad3000]( https://github.com/royriojas/file-entry-cache/commit/0ad3000 ), [Bogdan Chadkin](https://github.com/Bogdan Chadkin), 11/09/2015 17:44:18
+
+
+## v1.2.0
+- **Features**
+ - analyzeFiles now returns also the files that were removed - [6ac2431]( https://github.com/royriojas/file-entry-cache/commit/6ac2431 ), [royriojas](https://github.com/royriojas), 04/09/2015 14:40:53
+
+
+## v1.1.1
+- **Features**
+ - Add method to check if a file hasChanged - [3640e2b]( https://github.com/royriojas/file-entry-cache/commit/3640e2b ), [Roy Riojas](https://github.com/Roy Riojas), 30/08/2015 07:33:32
+
+
+## v1.1.0
+- **Features**
+ - Create the cache directly from a file path - [a23de61]( https://github.com/royriojas/file-entry-cache/commit/a23de61 ), [Roy Riojas](https://github.com/Roy Riojas), 30/08/2015 06:41:33
+
+
+ - Add a method to remove an entry from the filecache - [7af29fc]( https://github.com/royriojas/file-entry-cache/commit/7af29fc ), [Roy Riojas](https://github.com/Roy Riojas), 03/03/2015 02:25:32
+
+
+ - cache module finished - [1f95544]( https://github.com/royriojas/file-entry-cache/commit/1f95544 ), [Roy Riojas](https://github.com/Roy Riojas), 02/03/2015 04:08:08
+
+
+- **Build Scripts Changes**
+ - set the version for the first release - [7472eaa]( https://github.com/royriojas/file-entry-cache/commit/7472eaa ), [Roy Riojas](https://github.com/Roy Riojas), 02/03/2015 04:29:54
+
+
+- **Documentation**
+ - Updated documentation - [557358f]( https://github.com/royriojas/file-entry-cache/commit/557358f ), [Roy Riojas](https://github.com/Roy Riojas), 02/03/2015 04:29:29
+
+
+- **Other changes**
+ - Initial commit - [3d5f42b]( https://github.com/royriojas/file-entry-cache/commit/3d5f42b ), [Roy Riojas](https://github.com/Roy Riojas), 02/03/2015 00:58:29
+
+
diff --git a/tools/node_modules/eslint/node_modules/file-entry-cache/package.json b/tools/node_modules/eslint/node_modules/file-entry-cache/package.json
new file mode 100644
index 0000000000..47a7e7cfd5
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/file-entry-cache/package.json
@@ -0,0 +1,116 @@
+{
+ "_from": "file-entry-cache@^2.0.0",
+ "_id": "file-entry-cache@2.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=",
+ "_location": "/eslint/file-entry-cache",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "file-entry-cache@^2.0.0",
+ "name": "file-entry-cache",
+ "escapedName": "file-entry-cache",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/eslint"
+ ],
+ "_resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz",
+ "_shasum": "c392990c3e684783d838b8c84a45d8a048458361",
+ "_spec": "file-entry-cache@^2.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint",
+ "author": {
+ "name": "Roy Riojas",
+ "url": "http://royriojas.com"
+ },
+ "bugs": {
+ "url": "https://github.com/royriojas/file-entry-cache/issues"
+ },
+ "bundleDependencies": false,
+ "changelogx": {
+ "ignoreRegExp": [
+ "BLD: Release",
+ "DOC: Generate Changelog",
+ "Generated Changelog"
+ ],
+ "issueIDRegExp": "#(\\d+)",
+ "commitURL": "https://github.com/royriojas/file-entry-cache/commit/{0}",
+ "authorURL": "https://github.com/{0}",
+ "issueIDURL": "https://github.com/royriojas/file-entry-cache/issues/{0}",
+ "projectName": "file-entry-cache"
+ },
+ "dependencies": {
+ "flat-cache": "^1.2.1",
+ "object-assign": "^4.0.1"
+ },
+ "deprecated": false,
+ "description": "Super simple cache for file metadata, useful for process that work o a given series of files and that only need to repeat the job on the changed ones since the previous run of the process",
+ "devDependencies": {
+ "chai": "^3.2.0",
+ "changelogx": "^1.0.18",
+ "commander": "^2.6.0",
+ "del": "^2.0.2",
+ "esbeautifier": "^4.2.11",
+ "eslinter": "^2.3.3",
+ "glob-expand": "^0.1.0",
+ "istanbul": "^0.3.6",
+ "mocha": "^2.1.0",
+ "precommit": "^1.1.5",
+ "prepush": "^3.1.4",
+ "proxyquire": "^1.3.1",
+ "sinon": "^1.12.2",
+ "sinon-chai": "^2.7.0",
+ "watch-run": "^1.2.1",
+ "write": "^0.3.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "cache.js"
+ ],
+ "homepage": "https://github.com/royriojas/file-entry-cache#readme",
+ "keywords": [
+ "file cache",
+ "task cache files",
+ "file cache",
+ "key par",
+ "key value",
+ "cache"
+ ],
+ "license": "MIT",
+ "main": "cache.js",
+ "name": "file-entry-cache",
+ "precommit": [
+ "npm run verify"
+ ],
+ "prepush": [
+ "npm run verify"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/royriojas/file-entry-cache.git"
+ },
+ "scripts": {
+ "beautify": "esbeautifier 'cache.js' 'test/**/*.js'",
+ "beautify-check": "npm run beautify -- -k",
+ "bump-major": "npm run pre-v && npm version major -m 'BLD: Release v%s' && npm run post-v",
+ "bump-minor": "npm run pre-v && npm version minor -m 'BLD: Release v%s' && npm run post-v",
+ "bump-patch": "npm run pre-v && npm version patch -m 'BLD: Release v%s' && npm run post-v",
+ "changelog": "changelogx -f markdown -o ./changelog.md",
+ "cover": "istanbul cover test/runner.js html text-summary",
+ "do-changelog": "npm run changelog && git add ./changelog.md && git commit -m 'DOC: Generate changelog' --no-verify",
+ "eslint": "eslinter 'cache.js' 'specs/**/*.js'",
+ "install-hooks": "prepush install && changelogx install-hook && precommit install",
+ "lint": "npm run beautify && npm run eslint",
+ "post-v": "npm run do-changelog && git push --no-verify && git push --tags --no-verify",
+ "pre-v": "npm run test",
+ "test": "npm run verify --silent && mocha -R spec test/specs",
+ "verify": "npm run beautify-check && npm run eslint",
+ "watch": "watch-run -i -p 'test/specs/**/*.js' istanbul cover test/runner.js html text-summary"
+ },
+ "version": "2.0.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/flat-cache/LICENSE b/tools/node_modules/eslint/node_modules/flat-cache/LICENSE
new file mode 100644
index 0000000000..c58c339631
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/flat-cache/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Roy Riojas
+
+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/tools/node_modules/eslint/node_modules/flat-cache/README.md b/tools/node_modules/eslint/node_modules/flat-cache/README.md
new file mode 100644
index 0000000000..1bc5d690d1
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/flat-cache/README.md
@@ -0,0 +1,73 @@
+# flat-cache
+> A stupidly simple key/value storage using files to persist the data
+
+[![NPM Version](http://img.shields.io/npm/v/flat-cache.svg?style=flat)](https://npmjs.org/package/flat-cache)
+[![Build Status](http://img.shields.io/travis/royriojas/flat-cache.svg?style=flat)](https://travis-ci.org/royriojas/flat-cache)
+
+## install
+
+```bash
+npm i --save flat-cache
+```
+
+## Usage
+
+```js
+var flatCache = require('flat-cache')
+// loads the cache, if one does not exists for the given
+// Id a new one will be prepared to be created
+var cache = flatCache.load('cacheId');
+
+// sets a key on the cache
+cache.setKey('key', { foo: 'var' });
+
+// get a key from the cache
+cache.getKey('key') // { foo: 'var' }
+
+// fetch the entire persisted object
+cache.all() // { 'key': { foo: 'var' } }
+
+// remove a key
+cache.removeKey('key'); // removes a key from the cache
+
+// save it to disk
+cache.save(); // very important, if you don't save no changes will be persisted.
+// cache.save( true /* noPrune */) // can be used to prevent the removal of non visited keys
+
+// loads the cache from a given directory, if one does
+// not exists for the given Id a new one will be prepared to be created
+var cache = flatCache.load('cacheId', path.resolve('./path/to/folder'));
+
+// The following methods are useful to clear the cache
+// delete a given cache
+flatCache.clearCacheById('cacheId') // removes the cacheId document if one exists.
+
+// delete all cache
+flatCache.clearAll(); // remove the cache directory
+```
+
+## Motivation for this module
+
+I needed a super simple and dumb **in-memory cache** with optional disk persistance in order to make
+a script that will beutify files with `esformatter` only execute on the files that were changed since the last run.
+To make that possible we need to store the `fileSize` and `modificationTime` of the files. So a simple `key/value`
+storage was needed and Bam! this module was born.
+
+## Important notes
+- If no directory is especified when the `load` method is called, a folder named `.cache` will be created
+ inside the module directory when `cache.save` is called. If you're committing your `node_modules` to any vcs, you
+ might want to ignore the default `.cache` folder, or specify a custom directory.
+- The values set on the keys of the cache should be `stringify-able` ones, meaning no circular references
+- All the changes to the cache state are done to memory
+- I could have used a timer or `Object.observe` to deliver the changes to disk, but I wanted to keep this module
+ intentionally dumb and simple
+- Non visited keys are removed when `cache.save()` is called. If this is not desired, you can pass `true` to the save call
+ like: `cache.save( true /* noPrune */ )`.
+
+## License
+
+MIT
+
+## Changelog
+
+[changelog](./changelog.md)
diff --git a/tools/node_modules/eslint/node_modules/flat-cache/cache.js b/tools/node_modules/eslint/node_modules/flat-cache/cache.js
new file mode 100644
index 0000000000..51f8ffc0df
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/flat-cache/cache.js
@@ -0,0 +1,197 @@
+var path = require( 'path' );
+var fs = require( 'graceful-fs' );
+var del = require( 'del' ).sync;
+var utils = require( './utils' );
+var writeJSON = utils.writeJSON;
+
+var cache = {
+ /**
+ * Load a cache identified by the given Id. If the element does not exists, then initialize an empty
+ * cache storage. If specified `cacheDir` will be used as the directory to persist the data to. If omitted
+ * then the cache module directory `./cache` will be used instead
+ *
+ * @method load
+ * @param docId {String} the id of the cache, would also be used as the name of the file cache
+ * @param [cacheDir] {String} directory for the cache entry
+ */
+ load: function ( docId, cacheDir ) {
+ var me = this;
+
+ me._visited = { };
+ me._persisted = { };
+ me._pathToFile = cacheDir ? path.resolve( cacheDir, docId ) : path.resolve( __dirname, './.cache/', docId );
+
+ if ( fs.existsSync( me._pathToFile ) ) {
+ me._persisted = utils.tryParse( me._pathToFile, { } );
+ }
+ },
+
+ /**
+ * Load the cache from the provided file
+ * @method loadFile
+ * @param {String} pathToFile the path to the file containing the info for the cache
+ */
+ loadFile: function ( pathToFile ) {
+ var me = this;
+ var dir = path.dirname( pathToFile );
+ var fName = path.basename( pathToFile );
+
+ me.load( fName, dir );
+ },
+
+ /**
+ * Returns the entire persisted object
+ * @method all
+ * @returns {*}
+ */
+ all: function () {
+ return this._persisted;
+ },
+
+ keys: function () {
+ return Object.keys( this._persisted );
+ },
+ /**
+ * sets a key to a given value
+ * @method setKey
+ * @param key {string} the key to set
+ * @param value {object} the value of the key. Could be any object that can be serialized with JSON.stringify
+ */
+ setKey: function ( key, value ) {
+ this._visited[ key ] = true;
+ this._persisted[ key ] = value;
+ },
+ /**
+ * remove a given key from the cache
+ * @method removeKey
+ * @param key {String} the key to remove from the object
+ */
+ removeKey: function ( key ) {
+ delete this._visited[ key ]; // esfmt-ignore-line
+ delete this._persisted[ key ]; // esfmt-ignore-line
+ },
+ /**
+ * Return the value of the provided key
+ * @method getKey
+ * @param key {String} the name of the key to retrieve
+ * @returns {*} the value from the key
+ */
+ getKey: function ( key ) {
+ this._visited[ key ] = true;
+ return this._persisted[ key ];
+ },
+
+ /**
+ * Remove keys that were not accessed/set since the
+ * last time the `prune` method was called.
+ * @method _prune
+ * @private
+ */
+ _prune: function () {
+ var me = this;
+ var obj = { };
+
+ var keys = Object.keys( me._visited );
+
+ // no keys visited for either get or set value
+ if ( keys.length === 0 ) {
+ return;
+ }
+
+ keys.forEach( function ( key ) {
+ obj[ key ] = me._persisted[ key ];
+ } );
+
+ me._visited = { };
+ me._persisted = obj;
+ },
+
+ /**
+ * Save the state of the cache identified by the docId to disk
+ * as a JSON structure
+ * @param [noPrune=false] {Boolean} whether to remove from cache the non visited files
+ * @method save
+ */
+ save: function ( noPrune ) {
+ var me = this;
+
+ (!noPrune) && me._prune();
+ writeJSON( me._pathToFile, me._persisted );
+ },
+
+ /**
+ * remove the file where the cache is persisted
+ * @method removeCacheFile
+ * @return {Boolean} true or false if the file was successfully deleted
+ */
+ removeCacheFile: function () {
+ return del( this._pathToFile, { force: true } );
+ },
+ /**
+ * Destroy the file cache and cache content.
+ * @method destroy
+ */
+ destroy: function () {
+ var me = this;
+ me._visited = { };
+ me._persisted = { };
+
+ me.removeCacheFile();
+ }
+};
+
+module.exports = {
+ /**
+ * Alias for create. Should be considered depreacted. Will be removed in next releases
+ *
+ * @method load
+ * @param docId {String} the id of the cache, would also be used as the name of the file cache
+ * @param [cacheDir] {String} directory for the cache entry
+ * @returns {cache} cache instance
+ */
+ load: function ( docId, cacheDir ) {
+ return this.create( docId, cacheDir );
+ },
+
+ /**
+ * Load a cache identified by the given Id. If the element does not exists, then initialize an empty
+ * cache storage.
+ *
+ * @method create
+ * @param docId {String} the id of the cache, would also be used as the name of the file cache
+ * @param [cacheDir] {String} directory for the cache entry
+ * @returns {cache} cache instance
+ */
+ create: function ( docId, cacheDir ) {
+ var obj = Object.create( cache );
+ obj.load( docId, cacheDir );
+ return obj;
+ },
+
+ createFromFile: function ( filePath ) {
+ var obj = Object.create( cache );
+ obj.loadFile( filePath );
+ return obj;
+ },
+ /**
+ * Clear the cache identified by the given id. Caches stored in a different cache directory can be deleted directly
+ *
+ * @method clearCache
+ * @param docId {String} the id of the cache, would also be used as the name of the file cache
+ * @param cacheDir {String} the directory where the cache file was written
+ * @returns {Boolean} true if the cache folder was deleted. False otherwise
+ */
+ clearCacheById: function ( docId, cacheDir ) {
+ var filePath = cacheDir ? path.resolve( cacheDir, docId ) : path.resolve( __dirname, './.cache/', docId );
+ return del( filePath, { force: true } ).length > 0;
+ },
+ /**
+ * Remove all cache stored in the cache directory
+ * @method clearAll
+ * @returns {Boolean} true if the cache folder was deleted. False otherwise
+ */
+ clearAll: function ( cacheDir ) {
+ var filePath = cacheDir ? path.resolve( cacheDir ) : path.resolve( __dirname, './.cache/' );
+ return del( filePath, { force: true } ).length > 0;
+ }
+};
diff --git a/tools/node_modules/eslint/node_modules/flat-cache/changelog.md b/tools/node_modules/eslint/node_modules/flat-cache/changelog.md
new file mode 100644
index 0000000000..1fd4fbed2c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/flat-cache/changelog.md
@@ -0,0 +1,155 @@
+
+# flat-cache - Changelog
+## v1.3.0
+- **Other changes**
+ - Added #all method ([#16](https://github.com/royriojas/flat-cache/issues/16)) - [12293be]( https://github.com/royriojas/flat-cache/commit/12293be ), [Ozair Patel](https://github.com/Ozair Patel), 25/09/2017 16:46:38
+
+ * Added #all method
+
+ * Added #all method test
+
+ * Updated readme
+
+ * Added yarn.lock
+
+ * Added more keys for #all test
+
+ * Beautified file
+
+ - fix changelog title style ([#14](https://github.com/royriojas/flat-cache/issues/14)) - [af8338a]( https://github.com/royriojas/flat-cache/commit/af8338a ), [前端小武](https://github.com/前端小武), 19/12/2016 23:34:48
+
+
+## v1.2.2
+- **Bug Fixes**
+ - Do not crash if cache file is invalid JSON. ([#13](https://github.com/royriojas/flat-cache/issues/13)) - [87beaa6]( https://github.com/royriojas/flat-cache/commit/87beaa6 ), [Roy Riojas](https://github.com/Roy Riojas), 19/12/2016 21:03:35
+
+ Fixes <a target="_blank" class="info-link" href="https://github.com/royriojas/flat-cache/issues/12"><span>#12</span></a>
+
+ Not sure under which situations a cache file might exist that does
+ not contain a valid JSON structure, but just in case to cover
+ the possibility of this happening a try catch block has been added
+
+ If the cache is somehow not valid the cache will be discarded an a
+ a new cache will be stored instead
+- **Other changes**
+ - Added travis ci support for modern node versions ([#11](https://github.com/royriojas/flat-cache/issues/11)) - [1c2b1f7]( https://github.com/royriojas/flat-cache/commit/1c2b1f7 ), [Amila Welihinda](https://github.com/Amila Welihinda), 11/11/2016 02:47:52
+
+
+ - Bumping `circular-son` version ([#10](https://github.com/royriojas/flat-cache/issues/10)) - [4d5e861]( https://github.com/royriojas/flat-cache/commit/4d5e861 ), [Andrea Giammarchi](https://github.com/Andrea Giammarchi), 02/08/2016 09:13:52
+
+ As mentioned in https://github.com/WebReflection/circular-json/issues/25 `circular-json` wan't rightly implementing the license field.
+
+ Latest version bump changed only that bit so that ESLint should now be happy.
+## v1.2.1
+- **Bug Fixes**
+ - Add missing utils.js file to the package. closes [#8](https://github.com/royriojas/flat-cache/issues/8) - [ec10cf2]( https://github.com/royriojas/flat-cache/commit/ec10cf2 ), [Roy Riojas](https://github.com/Roy Riojas), 01/08/2016 04:18:57
+
+
+## v1.2.0
+- **Documentation**
+ - Add documentation about noPrune option - [23e11f9]( https://github.com/royriojas/flat-cache/commit/23e11f9 ), [Roy Riojas](https://github.com/Roy Riojas), 01/08/2016 04:06:49
+
+
+## v1.0.11
+- **Features**
+ - Add noPrune option to cache.save() method. closes [#7](https://github.com/royriojas/flat-cache/issues/7) - [2c8016a]( https://github.com/royriojas/flat-cache/commit/2c8016a ), [Roy Riojas](https://github.com/Roy Riojas), 01/08/2016 04:00:29
+
+
+ - Add json read and write utility based on circular-json - [c31081e]( https://github.com/royriojas/flat-cache/commit/c31081e ), [Jean Ponchon](https://github.com/Jean Ponchon), 28/07/2016 10:58:17
+
+
+- **Bug Fixes**
+ - Remove UTF16 BOM stripping - [4a41e22]( https://github.com/royriojas/flat-cache/commit/4a41e22 ), [Jean Ponchon](https://github.com/Jean Ponchon), 29/07/2016 04:18:06
+
+ Since we control both writing and reading of JSON stream, there no needs
+ to handle unicode BOM.
+ - Use circular-json to handle circular references (fix [#5](https://github.com/royriojas/flat-cache/issues/5)) - [cd7aeed]( https://github.com/royriojas/flat-cache/commit/cd7aeed ), [Jean Ponchon](https://github.com/Jean Ponchon), 25/07/2016 13:11:59
+
+
+- **Tests Related fixes**
+ - Add missing file from eslint test - [d6fa3c3]( https://github.com/royriojas/flat-cache/commit/d6fa3c3 ), [Jean Ponchon](https://github.com/Jean Ponchon), 29/07/2016 04:15:51
+
+
+ - Add test for circular json serialization / deserialization - [07d2ddd]( https://github.com/royriojas/flat-cache/commit/07d2ddd ), [Jean Ponchon](https://github.com/Jean Ponchon), 28/07/2016 10:59:36
+
+
+- **Refactoring**
+ - Remove unused read-json-sync - [2be1c24]( https://github.com/royriojas/flat-cache/commit/2be1c24 ), [Jean Ponchon](https://github.com/Jean Ponchon), 28/07/2016 10:59:18
+
+
+- **Build Scripts Changes**
+ - travis tests on 0.12 and 4x - [3a613fd]( https://github.com/royriojas/flat-cache/commit/3a613fd ), [royriojas](https://github.com/royriojas), 15/11/2015 17:34:40
+
+
+## v1.0.10
+- **Build Scripts Changes**
+ - add eslint-fix task - [fd29e52]( https://github.com/royriojas/flat-cache/commit/fd29e52 ), [royriojas](https://github.com/royriojas), 01/11/2015 18:04:08
+
+
+ - make sure the test script also verify beautification and linting of files before running tests - [e94e176]( https://github.com/royriojas/flat-cache/commit/e94e176 ), [royriojas](https://github.com/royriojas), 01/11/2015 14:54:48
+
+
+- **Other changes**
+ - add clearAll for cacheDir - [97383d9]( https://github.com/royriojas/flat-cache/commit/97383d9 ), [xieyaowu](https://github.com/xieyaowu), 31/10/2015 23:02:18
+
+
+## v1.0.9
+- **Bug Fixes**
+ - wrong default values for changelogx user repo name - [7bb52d1]( https://github.com/royriojas/flat-cache/commit/7bb52d1 ), [royriojas](https://github.com/royriojas), 11/09/2015 17:59:30
+
+
+## v1.0.8
+- **Build Scripts Changes**
+ - test against node 4 - [c395b66]( https://github.com/royriojas/flat-cache/commit/c395b66 ), [royriojas](https://github.com/royriojas), 11/09/2015 17:51:39
+
+
+## v1.0.7
+- **Other changes**
+ - Move dependencies into devDep - [7e47099]( https://github.com/royriojas/flat-cache/commit/7e47099 ), [Bogdan Chadkin](https://github.com/Bogdan Chadkin), 11/09/2015 17:10:57
+
+
+- **Documentation**
+ - Add missing changelog link - [f51197a]( https://github.com/royriojas/flat-cache/commit/f51197a ), [royriojas](https://github.com/royriojas), 11/09/2015 16:48:05
+
+
+## v1.0.6
+- **Build Scripts Changes**
+ - Add helpers/code check scripts - [bdb82f3]( https://github.com/royriojas/flat-cache/commit/bdb82f3 ), [royriojas](https://github.com/royriojas), 11/09/2015 16:44:31
+
+
+## v1.0.5
+- **Documentation**
+ - better description for the module - [436817f]( https://github.com/royriojas/flat-cache/commit/436817f ), [royriojas](https://github.com/royriojas), 11/09/2015 16:35:33
+
+
+- **Other changes**
+ - Update dependencies - [be88aa3]( https://github.com/royriojas/flat-cache/commit/be88aa3 ), [Bogdan Chadkin](https://github.com/Bogdan Chadkin), 11/09/2015 15:47:41
+
+
+## v1.0.4
+- **Refactoring**
+ - load a cache file using the full filepath - [b8f68c2]( https://github.com/royriojas/flat-cache/commit/b8f68c2 ), [Roy Riojas](https://github.com/Roy Riojas), 30/08/2015 06:19:14
+
+
+- **Documentation**
+ - Add documentation about `clearAll` and `clearCacheById` - [13947c1]( https://github.com/royriojas/flat-cache/commit/13947c1 ), [Roy Riojas](https://github.com/Roy Riojas), 02/03/2015 02:44:05
+
+
+- **Features**
+ - Add methods to remove the cache documents created - [af40443]( https://github.com/royriojas/flat-cache/commit/af40443 ), [Roy Riojas](https://github.com/Roy Riojas), 02/03/2015 02:39:27
+
+
+## v1.0.1
+- **Other changes**
+ - Update README.md - [c2b6805]( https://github.com/royriojas/flat-cache/commit/c2b6805 ), [Roy Riojas](https://github.com/Roy Riojas), 26/02/2015 07:28:07
+
+
+## v1.0.0
+- **Refactoring**
+ - flat-cache v.1.0.0 - [c984274]( https://github.com/royriojas/flat-cache/commit/c984274 ), [Roy Riojas](https://github.com/Roy Riojas), 26/02/2015 07:11:50
+
+
+- **Other changes**
+ - Initial commit - [d43cccf]( https://github.com/royriojas/flat-cache/commit/d43cccf ), [Roy Riojas](https://github.com/Roy Riojas), 26/02/2015 04:12:16
+
+
diff --git a/tools/node_modules/eslint/node_modules/flat-cache/package.json b/tools/node_modules/eslint/node_modules/flat-cache/package.json
new file mode 100644
index 0000000000..f43642cbb4
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/flat-cache/package.json
@@ -0,0 +1,119 @@
+{
+ "_from": "flat-cache@^1.2.1",
+ "_id": "flat-cache@1.3.0",
+ "_inBundle": false,
+ "_integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=",
+ "_location": "/eslint/flat-cache",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "flat-cache@^1.2.1",
+ "name": "flat-cache",
+ "escapedName": "flat-cache",
+ "rawSpec": "^1.2.1",
+ "saveSpec": null,
+ "fetchSpec": "^1.2.1"
+ },
+ "_requiredBy": [
+ "/eslint/file-entry-cache"
+ ],
+ "_resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz",
+ "_shasum": "d3030b32b38154f4e3b7e9c709f490f7ef97c481",
+ "_spec": "flat-cache@^1.2.1",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/file-entry-cache",
+ "author": {
+ "name": "Roy Riojas",
+ "url": "http://royriojas.com"
+ },
+ "bugs": {
+ "url": "https://github.com/royriojas/flat-cache/issues"
+ },
+ "bundleDependencies": false,
+ "changelogx": {
+ "ignoreRegExp": [
+ "BLD: Release",
+ "DOC: Generate Changelog",
+ "Generated Changelog"
+ ],
+ "issueIDRegExp": "#(\\d+)",
+ "commitURL": "https://github.com/royriojas/flat-cache/commit/{0}",
+ "authorURL": "https://github.com/{0}",
+ "issueIDURL": "https://github.com/royriojas/flat-cache/issues/{0}",
+ "projectName": "flat-cache"
+ },
+ "dependencies": {
+ "circular-json": "^0.3.1",
+ "del": "^2.0.2",
+ "graceful-fs": "^4.1.2",
+ "write": "^0.2.1"
+ },
+ "deprecated": false,
+ "description": "A stupidly simple key/value storage using files to persist some data",
+ "devDependencies": {
+ "chai": "^3.2.0",
+ "changelogx": "^1.0.18",
+ "esbeautifier": "^6.1.8",
+ "eslinter": "^3.2.1",
+ "glob-expand": "^0.1.0",
+ "istanbul": "^0.3.19",
+ "mocha": "^2.3.2",
+ "precommit": "^1.1.5",
+ "prepush": "^3.1.4",
+ "proxyquire": "^1.7.2",
+ "sinon": "^1.16.1",
+ "sinon-chai": "^2.8.0",
+ "watch-run": "^1.2.2"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "cache.js",
+ "utils.js"
+ ],
+ "homepage": "https://github.com/royriojas/flat-cache#readme",
+ "keywords": [
+ "json cache",
+ "simple cache",
+ "file cache",
+ "key par",
+ "key value",
+ "cache"
+ ],
+ "license": "MIT",
+ "main": "cache.js",
+ "name": "flat-cache",
+ "precommit": [
+ "npm run verify --silent"
+ ],
+ "prepush": [
+ "npm run verify --silent"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/royriojas/flat-cache.git"
+ },
+ "scripts": {
+ "autofix": "npm run beautify && npm run eslint-fix",
+ "beautify": "esbeautifier 'cache.js' 'test/specs/**/*.js'",
+ "beautify-check": "npm run beautify -- -k",
+ "bump-major": "npm run pre-v && npm version major -m 'BLD: Release v%s' && npm run post-v",
+ "bump-minor": "npm run pre-v && npm version minor -m 'BLD: Release v%s' && npm run post-v",
+ "bump-patch": "npm run pre-v && npm version patch -m 'BLD: Release v%s' && npm run post-v",
+ "changelog": "changelogx -f markdown -o ./changelog.md",
+ "check": "npm run beautify-check && npm run eslint",
+ "cover": "istanbul cover test/runner.js html text-summary",
+ "do-changelog": "npm run changelog && git add ./changelog.md && git commit -m 'DOC: Generate changelog' --no-verify",
+ "eslint": "eslinter 'cache.js' 'utils.js' 'specs/**/*.js'",
+ "eslint-fix": "npm run eslint -- --fix",
+ "install-hooks": "prepush install && changelogx install-hook && precommit install",
+ "post-v": "npm run do-changelog && git push --no-verify && git push --tags --no-verify",
+ "pre-v": "npm run verify",
+ "test": "npm run verify --silent",
+ "test:cache": "mocha -R spec test/specs",
+ "verify": "npm run check && npm run test:cache",
+ "watch": "watch-run -i -p 'test/specs/**/*.js' istanbul cover test/runner.js html text-summary"
+ },
+ "version": "1.3.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/flat-cache/utils.js b/tools/node_modules/eslint/node_modules/flat-cache/utils.js
new file mode 100644
index 0000000000..e3654d23fa
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/flat-cache/utils.js
@@ -0,0 +1,39 @@
+var fs = require( 'graceful-fs' );
+var write = require( 'write' );
+var circularJson = require( 'circular-json' );
+
+module.exports = {
+
+ tryParse: function ( filePath, defaultValue) {
+ var result;
+ try {
+ result = this.readJSON( filePath );
+ } catch (ex) {
+ result = defaultValue;
+ }
+ return result;
+ },
+
+ /**
+ * Read json file synchronously using circular-json
+ *
+ * @method readJSON
+ * @param {String} filePath Json filepath
+ * @returns {*} parse result
+ */
+ readJSON: function ( filePath ) {
+ return circularJson.parse( fs.readFileSync( filePath ).toString() );
+ },
+
+ /**
+ * Write json file synchronously using circular-json
+ *
+ * @method writeJSON
+ * @param {String} filePath Json filepath
+ * @param {*} data Object to serialize
+ */
+ writeJSON: function (filePath, data ) {
+ write.sync( filePath, circularJson.stringify( data ) );
+ }
+
+};
diff --git a/tools/node_modules/eslint/node_modules/fs.realpath/LICENSE b/tools/node_modules/eslint/node_modules/fs.realpath/LICENSE
new file mode 100644
index 0000000000..5bd884c252
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/fs.realpath/LICENSE
@@ -0,0 +1,43 @@
+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.
+
+----
+
+This library bundles a version of the `fs.realpath` and `fs.realpathSync`
+methods from Node.js v0.10 under the terms of the Node.js MIT license.
+
+Node's license follows, also included at the header of `old.js` which contains
+the licensed code:
+
+ 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.
diff --git a/tools/node_modules/eslint/node_modules/fs.realpath/README.md b/tools/node_modules/eslint/node_modules/fs.realpath/README.md
new file mode 100644
index 0000000000..a42ceac626
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/fs.realpath/README.md
@@ -0,0 +1,33 @@
+# fs.realpath
+
+A backwards-compatible fs.realpath for Node v6 and above
+
+In Node v6, the JavaScript implementation of fs.realpath was replaced
+with a faster (but less resilient) native implementation. That raises
+new and platform-specific errors and cannot handle long or excessively
+symlink-looping paths.
+
+This module handles those cases by detecting the new errors and
+falling back to the JavaScript implementation. On versions of Node
+prior to v6, it has no effect.
+
+## USAGE
+
+```js
+var rp = require('fs.realpath')
+
+// async version
+rp.realpath(someLongAndLoopingPath, function (er, real) {
+ // the ELOOP was handled, but it was a bit slower
+})
+
+// sync version
+var real = rp.realpathSync(someLongAndLoopingPath)
+
+// monkeypatch at your own risk!
+// This replaces the fs.realpath/fs.realpathSync builtins
+rp.monkeypatch()
+
+// un-do the monkeypatching
+rp.unmonkeypatch()
+```
diff --git a/tools/node_modules/eslint/node_modules/fs.realpath/index.js b/tools/node_modules/eslint/node_modules/fs.realpath/index.js
new file mode 100644
index 0000000000..b09c7c7e63
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/fs.realpath/index.js
@@ -0,0 +1,66 @@
+module.exports = realpath
+realpath.realpath = realpath
+realpath.sync = realpathSync
+realpath.realpathSync = realpathSync
+realpath.monkeypatch = monkeypatch
+realpath.unmonkeypatch = unmonkeypatch
+
+var fs = require('fs')
+var origRealpath = fs.realpath
+var origRealpathSync = fs.realpathSync
+
+var version = process.version
+var ok = /^v[0-5]\./.test(version)
+var old = require('./old.js')
+
+function newError (er) {
+ return er && er.syscall === 'realpath' && (
+ er.code === 'ELOOP' ||
+ er.code === 'ENOMEM' ||
+ er.code === 'ENAMETOOLONG'
+ )
+}
+
+function realpath (p, cache, cb) {
+ if (ok) {
+ return origRealpath(p, cache, cb)
+ }
+
+ if (typeof cache === 'function') {
+ cb = cache
+ cache = null
+ }
+ origRealpath(p, cache, function (er, result) {
+ if (newError(er)) {
+ old.realpath(p, cache, cb)
+ } else {
+ cb(er, result)
+ }
+ })
+}
+
+function realpathSync (p, cache) {
+ if (ok) {
+ return origRealpathSync(p, cache)
+ }
+
+ try {
+ return origRealpathSync(p, cache)
+ } catch (er) {
+ if (newError(er)) {
+ return old.realpathSync(p, cache)
+ } else {
+ throw er
+ }
+ }
+}
+
+function monkeypatch () {
+ fs.realpath = realpath
+ fs.realpathSync = realpathSync
+}
+
+function unmonkeypatch () {
+ fs.realpath = origRealpath
+ fs.realpathSync = origRealpathSync
+}
diff --git a/tools/node_modules/eslint/node_modules/fs.realpath/old.js b/tools/node_modules/eslint/node_modules/fs.realpath/old.js
new file mode 100644
index 0000000000..b40305e73f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/fs.realpath/old.js
@@ -0,0 +1,303 @@
+// 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 pathModule = require('path');
+var isWindows = process.platform === 'win32';
+var fs = require('fs');
+
+// JavaScript implementation of realpath, ported from node pre-v6
+
+var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG);
+
+function rethrow() {
+ // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and
+ // is fairly slow to generate.
+ var callback;
+ if (DEBUG) {
+ var backtrace = new Error;
+ callback = debugCallback;
+ } else
+ callback = missingCallback;
+
+ return callback;
+
+ function debugCallback(err) {
+ if (err) {
+ backtrace.message = err.message;
+ err = backtrace;
+ missingCallback(err);
+ }
+ }
+
+ function missingCallback(err) {
+ if (err) {
+ if (process.throwDeprecation)
+ throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs
+ else if (!process.noDeprecation) {
+ var msg = 'fs: missing callback ' + (err.stack || err.message);
+ if (process.traceDeprecation)
+ console.trace(msg);
+ else
+ console.error(msg);
+ }
+ }
+ }
+}
+
+function maybeCallback(cb) {
+ return typeof cb === 'function' ? cb : rethrow();
+}
+
+var normalize = pathModule.normalize;
+
+// Regexp that finds the next partion of a (partial) path
+// result is [base_with_slash, base], e.g. ['somedir/', 'somedir']
+if (isWindows) {
+ var nextPartRe = /(.*?)(?:[\/\\]+|$)/g;
+} else {
+ var nextPartRe = /(.*?)(?:[\/]+|$)/g;
+}
+
+// Regex to find the device root, including trailing slash. E.g. 'c:\\'.
+if (isWindows) {
+ var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/;
+} else {
+ var splitRootRe = /^[\/]*/;
+}
+
+exports.realpathSync = function realpathSync(p, cache) {
+ // make p is absolute
+ p = pathModule.resolve(p);
+
+ if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {
+ return cache[p];
+ }
+
+ var original = p,
+ seenLinks = {},
+ knownHard = {};
+
+ // current character position in p
+ var pos;
+ // the partial path so far, including a trailing slash if any
+ var current;
+ // the partial path without a trailing slash (except when pointing at a root)
+ var base;
+ // the partial path scanned in the previous round, with slash
+ var previous;
+
+ start();
+
+ function start() {
+ // Skip over roots
+ var m = splitRootRe.exec(p);
+ pos = m[0].length;
+ current = m[0];
+ base = m[0];
+ previous = '';
+
+ // On windows, check that the root exists. On unix there is no need.
+ if (isWindows && !knownHard[base]) {
+ fs.lstatSync(base);
+ knownHard[base] = true;
+ }
+ }
+
+ // walk down the path, swapping out linked pathparts for their real
+ // values
+ // NB: p.length changes.
+ while (pos < p.length) {
+ // find the next part
+ nextPartRe.lastIndex = pos;
+ var result = nextPartRe.exec(p);
+ previous = current;
+ current += result[0];
+ base = previous + result[1];
+ pos = nextPartRe.lastIndex;
+
+ // continue if not a symlink
+ if (knownHard[base] || (cache && cache[base] === base)) {
+ continue;
+ }
+
+ var resolvedLink;
+ if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
+ // some known symbolic link. no need to stat again.
+ resolvedLink = cache[base];
+ } else {
+ var stat = fs.lstatSync(base);
+ if (!stat.isSymbolicLink()) {
+ knownHard[base] = true;
+ if (cache) cache[base] = base;
+ continue;
+ }
+
+ // read the link if it wasn't read before
+ // dev/ino always return 0 on windows, so skip the check.
+ var linkTarget = null;
+ if (!isWindows) {
+ var id = stat.dev.toString(32) + ':' + stat.ino.toString(32);
+ if (seenLinks.hasOwnProperty(id)) {
+ linkTarget = seenLinks[id];
+ }
+ }
+ if (linkTarget === null) {
+ fs.statSync(base);
+ linkTarget = fs.readlinkSync(base);
+ }
+ resolvedLink = pathModule.resolve(previous, linkTarget);
+ // track this, if given a cache.
+ if (cache) cache[base] = resolvedLink;
+ if (!isWindows) seenLinks[id] = linkTarget;
+ }
+
+ // resolve the link, then start over
+ p = pathModule.resolve(resolvedLink, p.slice(pos));
+ start();
+ }
+
+ if (cache) cache[original] = p;
+
+ return p;
+};
+
+
+exports.realpath = function realpath(p, cache, cb) {
+ if (typeof cb !== 'function') {
+ cb = maybeCallback(cache);
+ cache = null;
+ }
+
+ // make p is absolute
+ p = pathModule.resolve(p);
+
+ if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {
+ return process.nextTick(cb.bind(null, null, cache[p]));
+ }
+
+ var original = p,
+ seenLinks = {},
+ knownHard = {};
+
+ // current character position in p
+ var pos;
+ // the partial path so far, including a trailing slash if any
+ var current;
+ // the partial path without a trailing slash (except when pointing at a root)
+ var base;
+ // the partial path scanned in the previous round, with slash
+ var previous;
+
+ start();
+
+ function start() {
+ // Skip over roots
+ var m = splitRootRe.exec(p);
+ pos = m[0].length;
+ current = m[0];
+ base = m[0];
+ previous = '';
+
+ // On windows, check that the root exists. On unix there is no need.
+ if (isWindows && !knownHard[base]) {
+ fs.lstat(base, function(err) {
+ if (err) return cb(err);
+ knownHard[base] = true;
+ LOOP();
+ });
+ } else {
+ process.nextTick(LOOP);
+ }
+ }
+
+ // walk down the path, swapping out linked pathparts for their real
+ // values
+ function LOOP() {
+ // stop if scanned past end of path
+ if (pos >= p.length) {
+ if (cache) cache[original] = p;
+ return cb(null, p);
+ }
+
+ // find the next part
+ nextPartRe.lastIndex = pos;
+ var result = nextPartRe.exec(p);
+ previous = current;
+ current += result[0];
+ base = previous + result[1];
+ pos = nextPartRe.lastIndex;
+
+ // continue if not a symlink
+ if (knownHard[base] || (cache && cache[base] === base)) {
+ return process.nextTick(LOOP);
+ }
+
+ if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
+ // known symbolic link. no need to stat again.
+ return gotResolvedLink(cache[base]);
+ }
+
+ return fs.lstat(base, gotStat);
+ }
+
+ function gotStat(err, stat) {
+ if (err) return cb(err);
+
+ // if not a symlink, skip to the next path part
+ if (!stat.isSymbolicLink()) {
+ knownHard[base] = true;
+ if (cache) cache[base] = base;
+ return process.nextTick(LOOP);
+ }
+
+ // stat & read the link if not read before
+ // call gotTarget as soon as the link target is known
+ // dev/ino always return 0 on windows, so skip the check.
+ if (!isWindows) {
+ var id = stat.dev.toString(32) + ':' + stat.ino.toString(32);
+ if (seenLinks.hasOwnProperty(id)) {
+ return gotTarget(null, seenLinks[id], base);
+ }
+ }
+ fs.stat(base, function(err) {
+ if (err) return cb(err);
+
+ fs.readlink(base, function(err, target) {
+ if (!isWindows) seenLinks[id] = target;
+ gotTarget(err, target);
+ });
+ });
+ }
+
+ function gotTarget(err, target, base) {
+ if (err) return cb(err);
+
+ var resolvedLink = pathModule.resolve(previous, target);
+ if (cache) cache[base] = resolvedLink;
+ gotResolvedLink(resolvedLink);
+ }
+
+ function gotResolvedLink(resolvedLink) {
+ // resolve the link, then start over
+ p = pathModule.resolve(resolvedLink, p.slice(pos));
+ start();
+ }
+};
diff --git a/tools/node_modules/eslint/node_modules/fs.realpath/package.json b/tools/node_modules/eslint/node_modules/fs.realpath/package.json
new file mode 100644
index 0000000000..fe019db0e8
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/fs.realpath/package.json
@@ -0,0 +1,59 @@
+{
+ "_from": "fs.realpath@^1.0.0",
+ "_id": "fs.realpath@1.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
+ "_location": "/eslint/fs.realpath",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "fs.realpath@^1.0.0",
+ "name": "fs.realpath",
+ "escapedName": "fs.realpath",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/eslint/glob"
+ ],
+ "_resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+ "_shasum": "1504ad2523158caa40db4a2787cb01411994ea4f",
+ "_spec": "fs.realpath@^1.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/glob",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "bugs": {
+ "url": "https://github.com/isaacs/fs.realpath/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Use node's fs.realpath, but fall back to the JS implementation if the native one fails",
+ "devDependencies": {},
+ "files": [
+ "old.js",
+ "index.js"
+ ],
+ "homepage": "https://github.com/isaacs/fs.realpath#readme",
+ "keywords": [
+ "realpath",
+ "fs",
+ "polyfill"
+ ],
+ "license": "ISC",
+ "main": "index.js",
+ "name": "fs.realpath",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/isaacs/fs.realpath.git"
+ },
+ "scripts": {
+ "test": "tap test/*.js --cov"
+ },
+ "version": "1.0.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/function-bind/LICENSE b/tools/node_modules/eslint/node_modules/function-bind/LICENSE
new file mode 100644
index 0000000000..62d6d237ff
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/function-bind/LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2013 Raynos.
+
+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/tools/node_modules/eslint/node_modules/function-bind/README.md b/tools/node_modules/eslint/node_modules/function-bind/README.md
new file mode 100644
index 0000000000..81862a02cb
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/function-bind/README.md
@@ -0,0 +1,48 @@
+# function-bind
+
+<!--
+ [![build status][travis-svg]][travis-url]
+ [![NPM version][npm-badge-svg]][npm-url]
+ [![Coverage Status][5]][6]
+ [![gemnasium Dependency Status][7]][8]
+ [![Dependency status][deps-svg]][deps-url]
+ [![Dev Dependency status][dev-deps-svg]][dev-deps-url]
+-->
+
+<!-- [![browser support][11]][12] -->
+
+Implementation of function.prototype.bind
+
+## Example
+
+I mainly do this for unit tests I run on phantomjs.
+PhantomJS does not have Function.prototype.bind :(
+
+```js
+Function.prototype.bind = require("function-bind")
+```
+
+## Installation
+
+`npm install function-bind`
+
+## Contributors
+
+ - Raynos
+
+## MIT Licenced
+
+ [travis-svg]: https://travis-ci.org/Raynos/function-bind.svg
+ [travis-url]: https://travis-ci.org/Raynos/function-bind
+ [npm-badge-svg]: https://badge.fury.io/js/function-bind.svg
+ [npm-url]: https://npmjs.org/package/function-bind
+ [5]: https://coveralls.io/repos/Raynos/function-bind/badge.png
+ [6]: https://coveralls.io/r/Raynos/function-bind
+ [7]: https://gemnasium.com/Raynos/function-bind.png
+ [8]: https://gemnasium.com/Raynos/function-bind
+ [deps-svg]: https://david-dm.org/Raynos/function-bind.svg
+ [deps-url]: https://david-dm.org/Raynos/function-bind
+ [dev-deps-svg]: https://david-dm.org/Raynos/function-bind/dev-status.svg
+ [dev-deps-url]: https://david-dm.org/Raynos/function-bind#info=devDependencies
+ [11]: https://ci.testling.com/Raynos/function-bind.png
+ [12]: https://ci.testling.com/Raynos/function-bind
diff --git a/tools/node_modules/eslint/node_modules/function-bind/implementation.js b/tools/node_modules/eslint/node_modules/function-bind/implementation.js
new file mode 100644
index 0000000000..cc4daec1b0
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/function-bind/implementation.js
@@ -0,0 +1,52 @@
+'use strict';
+
+/* eslint no-invalid-this: 1 */
+
+var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
+var slice = Array.prototype.slice;
+var toStr = Object.prototype.toString;
+var funcType = '[object Function]';
+
+module.exports = function bind(that) {
+ var target = this;
+ if (typeof target !== 'function' || toStr.call(target) !== funcType) {
+ throw new TypeError(ERROR_MESSAGE + target);
+ }
+ var args = slice.call(arguments, 1);
+
+ var bound;
+ var binder = function () {
+ if (this instanceof bound) {
+ var result = target.apply(
+ this,
+ args.concat(slice.call(arguments))
+ );
+ if (Object(result) === result) {
+ return result;
+ }
+ return this;
+ } else {
+ return target.apply(
+ that,
+ args.concat(slice.call(arguments))
+ );
+ }
+ };
+
+ var boundLength = Math.max(0, target.length - args.length);
+ var boundArgs = [];
+ for (var i = 0; i < boundLength; i++) {
+ boundArgs.push('$' + i);
+ }
+
+ bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
+
+ if (target.prototype) {
+ var Empty = function Empty() {};
+ Empty.prototype = target.prototype;
+ bound.prototype = new Empty();
+ Empty.prototype = null;
+ }
+
+ return bound;
+};
diff --git a/tools/node_modules/eslint/node_modules/function-bind/index.js b/tools/node_modules/eslint/node_modules/function-bind/index.js
new file mode 100644
index 0000000000..3bb6b96098
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/function-bind/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var implementation = require('./implementation');
+
+module.exports = Function.prototype.bind || implementation;
diff --git a/tools/node_modules/eslint/node_modules/function-bind/package.json b/tools/node_modules/eslint/node_modules/function-bind/package.json
new file mode 100644
index 0000000000..e9999bc459
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/function-bind/package.json
@@ -0,0 +1,94 @@
+{
+ "_from": "function-bind@^1.0.2",
+ "_id": "function-bind@1.1.1",
+ "_inBundle": false,
+ "_integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
+ "_location": "/function-bind",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "function-bind@^1.0.2",
+ "name": "function-bind",
+ "escapedName": "function-bind",
+ "rawSpec": "^1.0.2",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.2"
+ },
+ "_requiredBy": [
+ "/has"
+ ],
+ "_resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
+ "_shasum": "a56899d3ea3c9bab874bb9773b7c5ede92f4895d",
+ "_spec": "function-bind@^1.0.2",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/has",
+ "author": {
+ "name": "Raynos",
+ "email": "raynos2@gmail.com"
+ },
+ "bugs": {
+ "url": "https://github.com/Raynos/function-bind/issues",
+ "email": "raynos2@gmail.com"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Raynos"
+ },
+ {
+ "name": "Jordan Harband",
+ "url": "https://github.com/ljharb"
+ }
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Implementation of Function.prototype.bind",
+ "devDependencies": {
+ "@ljharb/eslint-config": "^12.2.1",
+ "covert": "^1.1.0",
+ "eslint": "^4.5.0",
+ "jscs": "^3.0.7",
+ "tape": "^4.8.0"
+ },
+ "homepage": "https://github.com/Raynos/function-bind",
+ "keywords": [
+ "function",
+ "bind",
+ "shim",
+ "es5"
+ ],
+ "license": "MIT",
+ "main": "index",
+ "name": "function-bind",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/Raynos/function-bind.git"
+ },
+ "scripts": {
+ "coverage": "covert test/*.js",
+ "eslint": "eslint *.js */*.js",
+ "jscs": "jscs *.js */*.js",
+ "lint": "npm run jscs && npm run eslint",
+ "posttest": "npm run coverage -- --quiet",
+ "pretest": "npm run lint",
+ "test": "npm run tests-only",
+ "tests-only": "node test"
+ },
+ "testling": {
+ "files": "test/index.js",
+ "browsers": [
+ "ie/8..latest",
+ "firefox/16..latest",
+ "firefox/nightly",
+ "chrome/22..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.1"
+}
diff --git a/tools/node_modules/eslint/node_modules/functional-red-black-tree/LICENSE b/tools/node_modules/eslint/node_modules/functional-red-black-tree/LICENSE
new file mode 100644
index 0000000000..8ce206a845
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/functional-red-black-tree/LICENSE
@@ -0,0 +1,22 @@
+
+The MIT License (MIT)
+
+Copyright (c) 2013 Mikola Lysenko
+
+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/tools/node_modules/eslint/node_modules/functional-red-black-tree/README.md b/tools/node_modules/eslint/node_modules/functional-red-black-tree/README.md
new file mode 100644
index 0000000000..edd19cbf31
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/functional-red-black-tree/README.md
@@ -0,0 +1,237 @@
+functional-red-black-tree
+=========================
+A [fully persistent](http://en.wikipedia.org/wiki/Persistent_data_structure) [red-black tree](http://en.wikipedia.org/wiki/Red%E2%80%93black_tree) written 100% in JavaScript. Works both in node.js and in the browser via [browserify](http://browserify.org/).
+
+Functional (or fully presistent) data structures allow for non-destructive updates. So if you insert an element into the tree, it returns a new tree with the inserted element rather than destructively updating the existing tree in place. Doing this requires using extra memory, and if one were naive it could cost as much as reallocating the entire tree. Instead, this data structure saves some memory by recycling references to previously allocated subtrees. This requires using only O(log(n)) additional memory per update instead of a full O(n) copy.
+
+Some advantages of this is that it is possible to apply insertions and removals to the tree while still iterating over previous versions of the tree. Functional and persistent data structures can also be useful in many geometric algorithms like point location within triangulations or ray queries, and can be used to analyze the history of executing various algorithms. This added power though comes at a cost, since it is generally a bit slower to use a functional data structure than an imperative version. However, if your application needs this behavior then you may consider using this module.
+
+# Install
+
+ npm install functional-red-black-tree
+
+# Example
+
+Here is an example of some basic usage:
+
+```javascript
+//Load the library
+var createTree = require("functional-red-black-tree")
+
+//Create a tree
+var t1 = createTree()
+
+//Insert some items into the tree
+var t2 = t1.insert(1, "foo")
+var t3 = t2.insert(2, "bar")
+
+//Remove something
+var t4 = t3.remove(1)
+```
+
+
+# API
+
+```javascript
+var createTree = require("functional-red-black-tree")
+```
+
+## Overview
+
+- [Tree methods](#tree-methods)
+ - [`var tree = createTree([compare])`](#var-tree-=-createtreecompare)
+ - [`tree.keys`](#treekeys)
+ - [`tree.values`](#treevalues)
+ - [`tree.length`](#treelength)
+ - [`tree.get(key)`](#treegetkey)
+ - [`tree.insert(key, value)`](#treeinsertkey-value)
+ - [`tree.remove(key)`](#treeremovekey)
+ - [`tree.find(key)`](#treefindkey)
+ - [`tree.ge(key)`](#treegekey)
+ - [`tree.gt(key)`](#treegtkey)
+ - [`tree.lt(key)`](#treeltkey)
+ - [`tree.le(key)`](#treelekey)
+ - [`tree.at(position)`](#treeatposition)
+ - [`tree.begin`](#treebegin)
+ - [`tree.end`](#treeend)
+ - [`tree.forEach(visitor(key,value)[, lo[, hi]])`](#treeforEachvisitorkeyvalue-lo-hi)
+ - [`tree.root`](#treeroot)
+- [Node properties](#node-properties)
+ - [`node.key`](#nodekey)
+ - [`node.value`](#nodevalue)
+ - [`node.left`](#nodeleft)
+ - [`node.right`](#noderight)
+- [Iterator methods](#iterator-methods)
+ - [`iter.key`](#iterkey)
+ - [`iter.value`](#itervalue)
+ - [`iter.node`](#iternode)
+ - [`iter.tree`](#itertree)
+ - [`iter.index`](#iterindex)
+ - [`iter.valid`](#itervalid)
+ - [`iter.clone()`](#iterclone)
+ - [`iter.remove()`](#iterremove)
+ - [`iter.update(value)`](#iterupdatevalue)
+ - [`iter.next()`](#iternext)
+ - [`iter.prev()`](#iterprev)
+ - [`iter.hasNext`](#iterhasnext)
+ - [`iter.hasPrev`](#iterhasprev)
+
+## Tree methods
+
+### `var tree = createTree([compare])`
+Creates an empty functional tree
+
+* `compare` is an optional comparison function, same semantics as array.sort()
+
+**Returns** An empty tree ordered by `compare`
+
+### `tree.keys`
+A sorted array of all the keys in the tree
+
+### `tree.values`
+An array array of all the values in the tree
+
+### `tree.length`
+The number of items in the tree
+
+### `tree.get(key)`
+Retrieves the value associated to the given key
+
+* `key` is the key of the item to look up
+
+**Returns** The value of the first node associated to `key`
+
+### `tree.insert(key, value)`
+Creates a new tree with the new pair inserted.
+
+* `key` is the key of the item to insert
+* `value` is the value of the item to insert
+
+**Returns** A new tree with `key` and `value` inserted
+
+### `tree.remove(key)`
+Removes the first item with `key` in the tree
+
+* `key` is the key of the item to remove
+
+**Returns** A new tree with the given item removed if it exists
+
+### `tree.find(key)`
+Returns an iterator pointing to the first item in the tree with `key`, otherwise `null`.
+
+### `tree.ge(key)`
+Find the first item in the tree whose key is `>= key`
+
+* `key` is the key to search for
+
+**Returns** An iterator at the given element.
+
+### `tree.gt(key)`
+Finds the first item in the tree whose key is `> key`
+
+* `key` is the key to search for
+
+**Returns** An iterator at the given element
+
+### `tree.lt(key)`
+Finds the last item in the tree whose key is `< key`
+
+* `key` is the key to search for
+
+**Returns** An iterator at the given element
+
+### `tree.le(key)`
+Finds the last item in the tree whose key is `<= key`
+
+* `key` is the key to search for
+
+**Returns** An iterator at the given element
+
+### `tree.at(position)`
+Finds an iterator starting at the given element
+
+* `position` is the index at which the iterator gets created
+
+**Returns** An iterator starting at position
+
+### `tree.begin`
+An iterator pointing to the first element in the tree
+
+### `tree.end`
+An iterator pointing to the last element in the tree
+
+### `tree.forEach(visitor(key,value)[, lo[, hi]])`
+Walks a visitor function over the nodes of the tree in order.
+
+* `visitor(key,value)` is a callback that gets executed on each node. If a truthy value is returned from the visitor, then iteration is stopped.
+* `lo` is an optional start of the range to visit (inclusive)
+* `hi` is an optional end of the range to visit (non-inclusive)
+
+**Returns** The last value returned by the callback
+
+### `tree.root`
+Returns the root node of the tree
+
+
+## Node properties
+Each node of the tree has the following properties:
+
+### `node.key`
+The key associated to the node
+
+### `node.value`
+The value associated to the node
+
+### `node.left`
+The left subtree of the node
+
+### `node.right`
+The right subtree of the node
+
+## Iterator methods
+
+### `iter.key`
+The key of the item referenced by the iterator
+
+### `iter.value`
+The value of the item referenced by the iterator
+
+### `iter.node`
+The value of the node at the iterator's current position. `null` is iterator is node valid.
+
+### `iter.tree`
+The tree associated to the iterator
+
+### `iter.index`
+Returns the position of this iterator in the sequence.
+
+### `iter.valid`
+Checks if the iterator is valid
+
+### `iter.clone()`
+Makes a copy of the iterator
+
+### `iter.remove()`
+Removes the item at the position of the iterator
+
+**Returns** A new binary search tree with `iter`'s item removed
+
+### `iter.update(value)`
+Updates the value of the node in the tree at this iterator
+
+**Returns** A new binary search tree with the corresponding node updated
+
+### `iter.next()`
+Advances the iterator to the next position
+
+### `iter.prev()`
+Moves the iterator backward one element
+
+### `iter.hasNext`
+If true, then the iterator is not at the end of the sequence
+
+### `iter.hasPrev`
+If true, then the iterator is not at the beginning of the sequence
+
+# Credits
+(c) 2013 Mikola Lysenko. MIT License \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/functional-red-black-tree/bench/test.js b/tools/node_modules/eslint/node_modules/functional-red-black-tree/bench/test.js
new file mode 100644
index 0000000000..41c5a31c3a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/functional-red-black-tree/bench/test.js
@@ -0,0 +1,11 @@
+"use strict"
+
+var createTree = require("../rbtree.js")
+
+var t = createTree()
+
+var s = Date.now()
+for(var i=0; i<100000; ++i) {
+ t = t.insert(Math.random(), Math.random())
+}
+console.log(Date.now() - s) \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/functional-red-black-tree/package.json b/tools/node_modules/eslint/node_modules/functional-red-black-tree/package.json
new file mode 100644
index 0000000000..eb2cc4e421
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/functional-red-black-tree/package.json
@@ -0,0 +1,68 @@
+{
+ "_from": "functional-red-black-tree@^1.0.1",
+ "_id": "functional-red-black-tree@1.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=",
+ "_location": "/eslint/functional-red-black-tree",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "functional-red-black-tree@^1.0.1",
+ "name": "functional-red-black-tree",
+ "escapedName": "functional-red-black-tree",
+ "rawSpec": "^1.0.1",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.1"
+ },
+ "_requiredBy": [
+ "/eslint"
+ ],
+ "_resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz",
+ "_shasum": "1b0ab3bd553b2a0d6399d29c0e3ea0b252078327",
+ "_spec": "functional-red-black-tree@^1.0.1",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint",
+ "author": {
+ "name": "Mikola Lysenko"
+ },
+ "bugs": {
+ "url": "https://github.com/mikolalysenko/functional-red-black-tree/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "A fully persistent balanced binary search tree",
+ "devDependencies": {
+ "iota-array": "^0.0.1",
+ "tape": "^2.12.0"
+ },
+ "directories": {
+ "test": "test"
+ },
+ "homepage": "https://github.com/mikolalysenko/functional-red-black-tree#readme",
+ "keywords": [
+ "functional",
+ "red",
+ "black",
+ "tree",
+ "binary",
+ "search",
+ "balance",
+ "persistent",
+ "fully",
+ "dynamic",
+ "data",
+ "structure"
+ ],
+ "license": "MIT",
+ "main": "rbtree.js",
+ "name": "functional-red-black-tree",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mikolalysenko/functional-red-black-tree.git"
+ },
+ "scripts": {
+ "test": "tape test/*.js"
+ },
+ "version": "1.0.1"
+}
diff --git a/tools/node_modules/eslint/node_modules/functional-red-black-tree/rbtree.js b/tools/node_modules/eslint/node_modules/functional-red-black-tree/rbtree.js
new file mode 100644
index 0000000000..5a69a4090d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/functional-red-black-tree/rbtree.js
@@ -0,0 +1,996 @@
+"use strict"
+
+module.exports = createRBTree
+
+var RED = 0
+var BLACK = 1
+
+function RBNode(color, key, value, left, right, count) {
+ this._color = color
+ this.key = key
+ this.value = value
+ this.left = left
+ this.right = right
+ this._count = count
+}
+
+function cloneNode(node) {
+ return new RBNode(node._color, node.key, node.value, node.left, node.right, node._count)
+}
+
+function repaint(color, node) {
+ return new RBNode(color, node.key, node.value, node.left, node.right, node._count)
+}
+
+function recount(node) {
+ node._count = 1 + (node.left ? node.left._count : 0) + (node.right ? node.right._count : 0)
+}
+
+function RedBlackTree(compare, root) {
+ this._compare = compare
+ this.root = root
+}
+
+var proto = RedBlackTree.prototype
+
+Object.defineProperty(proto, "keys", {
+ get: function() {
+ var result = []
+ this.forEach(function(k,v) {
+ result.push(k)
+ })
+ return result
+ }
+})
+
+Object.defineProperty(proto, "values", {
+ get: function() {
+ var result = []
+ this.forEach(function(k,v) {
+ result.push(v)
+ })
+ return result
+ }
+})
+
+//Returns the number of nodes in the tree
+Object.defineProperty(proto, "length", {
+ get: function() {
+ if(this.root) {
+ return this.root._count
+ }
+ return 0
+ }
+})
+
+//Insert a new item into the tree
+proto.insert = function(key, value) {
+ var cmp = this._compare
+ //Find point to insert new node at
+ var n = this.root
+ var n_stack = []
+ var d_stack = []
+ while(n) {
+ var d = cmp(key, n.key)
+ n_stack.push(n)
+ d_stack.push(d)
+ if(d <= 0) {
+ n = n.left
+ } else {
+ n = n.right
+ }
+ }
+ //Rebuild path to leaf node
+ n_stack.push(new RBNode(RED, key, value, null, null, 1))
+ for(var s=n_stack.length-2; s>=0; --s) {
+ var n = n_stack[s]
+ if(d_stack[s] <= 0) {
+ n_stack[s] = new RBNode(n._color, n.key, n.value, n_stack[s+1], n.right, n._count+1)
+ } else {
+ n_stack[s] = new RBNode(n._color, n.key, n.value, n.left, n_stack[s+1], n._count+1)
+ }
+ }
+ //Rebalance tree using rotations
+ //console.log("start insert", key, d_stack)
+ for(var s=n_stack.length-1; s>1; --s) {
+ var p = n_stack[s-1]
+ var n = n_stack[s]
+ if(p._color === BLACK || n._color === BLACK) {
+ break
+ }
+ var pp = n_stack[s-2]
+ if(pp.left === p) {
+ if(p.left === n) {
+ var y = pp.right
+ if(y && y._color === RED) {
+ //console.log("LLr")
+ p._color = BLACK
+ pp.right = repaint(BLACK, y)
+ pp._color = RED
+ s -= 1
+ } else {
+ //console.log("LLb")
+ pp._color = RED
+ pp.left = p.right
+ p._color = BLACK
+ p.right = pp
+ n_stack[s-2] = p
+ n_stack[s-1] = n
+ recount(pp)
+ recount(p)
+ if(s >= 3) {
+ var ppp = n_stack[s-3]
+ if(ppp.left === pp) {
+ ppp.left = p
+ } else {
+ ppp.right = p
+ }
+ }
+ break
+ }
+ } else {
+ var y = pp.right
+ if(y && y._color === RED) {
+ //console.log("LRr")
+ p._color = BLACK
+ pp.right = repaint(BLACK, y)
+ pp._color = RED
+ s -= 1
+ } else {
+ //console.log("LRb")
+ p.right = n.left
+ pp._color = RED
+ pp.left = n.right
+ n._color = BLACK
+ n.left = p
+ n.right = pp
+ n_stack[s-2] = n
+ n_stack[s-1] = p
+ recount(pp)
+ recount(p)
+ recount(n)
+ if(s >= 3) {
+ var ppp = n_stack[s-3]
+ if(ppp.left === pp) {
+ ppp.left = n
+ } else {
+ ppp.right = n
+ }
+ }
+ break
+ }
+ }
+ } else {
+ if(p.right === n) {
+ var y = pp.left
+ if(y && y._color === RED) {
+ //console.log("RRr", y.key)
+ p._color = BLACK
+ pp.left = repaint(BLACK, y)
+ pp._color = RED
+ s -= 1
+ } else {
+ //console.log("RRb")
+ pp._color = RED
+ pp.right = p.left
+ p._color = BLACK
+ p.left = pp
+ n_stack[s-2] = p
+ n_stack[s-1] = n
+ recount(pp)
+ recount(p)
+ if(s >= 3) {
+ var ppp = n_stack[s-3]
+ if(ppp.right === pp) {
+ ppp.right = p
+ } else {
+ ppp.left = p
+ }
+ }
+ break
+ }
+ } else {
+ var y = pp.left
+ if(y && y._color === RED) {
+ //console.log("RLr")
+ p._color = BLACK
+ pp.left = repaint(BLACK, y)
+ pp._color = RED
+ s -= 1
+ } else {
+ //console.log("RLb")
+ p.left = n.right
+ pp._color = RED
+ pp.right = n.left
+ n._color = BLACK
+ n.right = p
+ n.left = pp
+ n_stack[s-2] = n
+ n_stack[s-1] = p
+ recount(pp)
+ recount(p)
+ recount(n)
+ if(s >= 3) {
+ var ppp = n_stack[s-3]
+ if(ppp.right === pp) {
+ ppp.right = n
+ } else {
+ ppp.left = n
+ }
+ }
+ break
+ }
+ }
+ }
+ }
+ //Return new tree
+ n_stack[0]._color = BLACK
+ return new RedBlackTree(cmp, n_stack[0])
+}
+
+
+//Visit all nodes inorder
+function doVisitFull(visit, node) {
+ if(node.left) {
+ var v = doVisitFull(visit, node.left)
+ if(v) { return v }
+ }
+ var v = visit(node.key, node.value)
+ if(v) { return v }
+ if(node.right) {
+ return doVisitFull(visit, node.right)
+ }
+}
+
+//Visit half nodes in order
+function doVisitHalf(lo, compare, visit, node) {
+ var l = compare(lo, node.key)
+ if(l <= 0) {
+ if(node.left) {
+ var v = doVisitHalf(lo, compare, visit, node.left)
+ if(v) { return v }
+ }
+ var v = visit(node.key, node.value)
+ if(v) { return v }
+ }
+ if(node.right) {
+ return doVisitHalf(lo, compare, visit, node.right)
+ }
+}
+
+//Visit all nodes within a range
+function doVisit(lo, hi, compare, visit, node) {
+ var l = compare(lo, node.key)
+ var h = compare(hi, node.key)
+ var v
+ if(l <= 0) {
+ if(node.left) {
+ v = doVisit(lo, hi, compare, visit, node.left)
+ if(v) { return v }
+ }
+ if(h > 0) {
+ v = visit(node.key, node.value)
+ if(v) { return v }
+ }
+ }
+ if(h > 0 && node.right) {
+ return doVisit(lo, hi, compare, visit, node.right)
+ }
+}
+
+
+proto.forEach = function rbTreeForEach(visit, lo, hi) {
+ if(!this.root) {
+ return
+ }
+ switch(arguments.length) {
+ case 1:
+ return doVisitFull(visit, this.root)
+ break
+
+ case 2:
+ return doVisitHalf(lo, this._compare, visit, this.root)
+ break
+
+ case 3:
+ if(this._compare(lo, hi) >= 0) {
+ return
+ }
+ return doVisit(lo, hi, this._compare, visit, this.root)
+ break
+ }
+}
+
+//First item in list
+Object.defineProperty(proto, "begin", {
+ get: function() {
+ var stack = []
+ var n = this.root
+ while(n) {
+ stack.push(n)
+ n = n.left
+ }
+ return new RedBlackTreeIterator(this, stack)
+ }
+})
+
+//Last item in list
+Object.defineProperty(proto, "end", {
+ get: function() {
+ var stack = []
+ var n = this.root
+ while(n) {
+ stack.push(n)
+ n = n.right
+ }
+ return new RedBlackTreeIterator(this, stack)
+ }
+})
+
+//Find the ith item in the tree
+proto.at = function(idx) {
+ if(idx < 0) {
+ return new RedBlackTreeIterator(this, [])
+ }
+ var n = this.root
+ var stack = []
+ while(true) {
+ stack.push(n)
+ if(n.left) {
+ if(idx < n.left._count) {
+ n = n.left
+ continue
+ }
+ idx -= n.left._count
+ }
+ if(!idx) {
+ return new RedBlackTreeIterator(this, stack)
+ }
+ idx -= 1
+ if(n.right) {
+ if(idx >= n.right._count) {
+ break
+ }
+ n = n.right
+ } else {
+ break
+ }
+ }
+ return new RedBlackTreeIterator(this, [])
+}
+
+proto.ge = function(key) {
+ var cmp = this._compare
+ var n = this.root
+ var stack = []
+ var last_ptr = 0
+ while(n) {
+ var d = cmp(key, n.key)
+ stack.push(n)
+ if(d <= 0) {
+ last_ptr = stack.length
+ }
+ if(d <= 0) {
+ n = n.left
+ } else {
+ n = n.right
+ }
+ }
+ stack.length = last_ptr
+ return new RedBlackTreeIterator(this, stack)
+}
+
+proto.gt = function(key) {
+ var cmp = this._compare
+ var n = this.root
+ var stack = []
+ var last_ptr = 0
+ while(n) {
+ var d = cmp(key, n.key)
+ stack.push(n)
+ if(d < 0) {
+ last_ptr = stack.length
+ }
+ if(d < 0) {
+ n = n.left
+ } else {
+ n = n.right
+ }
+ }
+ stack.length = last_ptr
+ return new RedBlackTreeIterator(this, stack)
+}
+
+proto.lt = function(key) {
+ var cmp = this._compare
+ var n = this.root
+ var stack = []
+ var last_ptr = 0
+ while(n) {
+ var d = cmp(key, n.key)
+ stack.push(n)
+ if(d > 0) {
+ last_ptr = stack.length
+ }
+ if(d <= 0) {
+ n = n.left
+ } else {
+ n = n.right
+ }
+ }
+ stack.length = last_ptr
+ return new RedBlackTreeIterator(this, stack)
+}
+
+proto.le = function(key) {
+ var cmp = this._compare
+ var n = this.root
+ var stack = []
+ var last_ptr = 0
+ while(n) {
+ var d = cmp(key, n.key)
+ stack.push(n)
+ if(d >= 0) {
+ last_ptr = stack.length
+ }
+ if(d < 0) {
+ n = n.left
+ } else {
+ n = n.right
+ }
+ }
+ stack.length = last_ptr
+ return new RedBlackTreeIterator(this, stack)
+}
+
+//Finds the item with key if it exists
+proto.find = function(key) {
+ var cmp = this._compare
+ var n = this.root
+ var stack = []
+ while(n) {
+ var d = cmp(key, n.key)
+ stack.push(n)
+ if(d === 0) {
+ return new RedBlackTreeIterator(this, stack)
+ }
+ if(d <= 0) {
+ n = n.left
+ } else {
+ n = n.right
+ }
+ }
+ return new RedBlackTreeIterator(this, [])
+}
+
+//Removes item with key from tree
+proto.remove = function(key) {
+ var iter = this.find(key)
+ if(iter) {
+ return iter.remove()
+ }
+ return this
+}
+
+//Returns the item at `key`
+proto.get = function(key) {
+ var cmp = this._compare
+ var n = this.root
+ while(n) {
+ var d = cmp(key, n.key)
+ if(d === 0) {
+ return n.value
+ }
+ if(d <= 0) {
+ n = n.left
+ } else {
+ n = n.right
+ }
+ }
+ return
+}
+
+//Iterator for red black tree
+function RedBlackTreeIterator(tree, stack) {
+ this.tree = tree
+ this._stack = stack
+}
+
+var iproto = RedBlackTreeIterator.prototype
+
+//Test if iterator is valid
+Object.defineProperty(iproto, "valid", {
+ get: function() {
+ return this._stack.length > 0
+ }
+})
+
+//Node of the iterator
+Object.defineProperty(iproto, "node", {
+ get: function() {
+ if(this._stack.length > 0) {
+ return this._stack[this._stack.length-1]
+ }
+ return null
+ },
+ enumerable: true
+})
+
+//Makes a copy of an iterator
+iproto.clone = function() {
+ return new RedBlackTreeIterator(this.tree, this._stack.slice())
+}
+
+//Swaps two nodes
+function swapNode(n, v) {
+ n.key = v.key
+ n.value = v.value
+ n.left = v.left
+ n.right = v.right
+ n._color = v._color
+ n._count = v._count
+}
+
+//Fix up a double black node in a tree
+function fixDoubleBlack(stack) {
+ var n, p, s, z
+ for(var i=stack.length-1; i>=0; --i) {
+ n = stack[i]
+ if(i === 0) {
+ n._color = BLACK
+ return
+ }
+ //console.log("visit node:", n.key, i, stack[i].key, stack[i-1].key)
+ p = stack[i-1]
+ if(p.left === n) {
+ //console.log("left child")
+ s = p.right
+ if(s.right && s.right._color === RED) {
+ //console.log("case 1: right sibling child red")
+ s = p.right = cloneNode(s)
+ z = s.right = cloneNode(s.right)
+ p.right = s.left
+ s.left = p
+ s.right = z
+ s._color = p._color
+ n._color = BLACK
+ p._color = BLACK
+ z._color = BLACK
+ recount(p)
+ recount(s)
+ if(i > 1) {
+ var pp = stack[i-2]
+ if(pp.left === p) {
+ pp.left = s
+ } else {
+ pp.right = s
+ }
+ }
+ stack[i-1] = s
+ return
+ } else if(s.left && s.left._color === RED) {
+ //console.log("case 1: left sibling child red")
+ s = p.right = cloneNode(s)
+ z = s.left = cloneNode(s.left)
+ p.right = z.left
+ s.left = z.right
+ z.left = p
+ z.right = s
+ z._color = p._color
+ p._color = BLACK
+ s._color = BLACK
+ n._color = BLACK
+ recount(p)
+ recount(s)
+ recount(z)
+ if(i > 1) {
+ var pp = stack[i-2]
+ if(pp.left === p) {
+ pp.left = z
+ } else {
+ pp.right = z
+ }
+ }
+ stack[i-1] = z
+ return
+ }
+ if(s._color === BLACK) {
+ if(p._color === RED) {
+ //console.log("case 2: black sibling, red parent", p.right.value)
+ p._color = BLACK
+ p.right = repaint(RED, s)
+ return
+ } else {
+ //console.log("case 2: black sibling, black parent", p.right.value)
+ p.right = repaint(RED, s)
+ continue
+ }
+ } else {
+ //console.log("case 3: red sibling")
+ s = cloneNode(s)
+ p.right = s.left
+ s.left = p
+ s._color = p._color
+ p._color = RED
+ recount(p)
+ recount(s)
+ if(i > 1) {
+ var pp = stack[i-2]
+ if(pp.left === p) {
+ pp.left = s
+ } else {
+ pp.right = s
+ }
+ }
+ stack[i-1] = s
+ stack[i] = p
+ if(i+1 < stack.length) {
+ stack[i+1] = n
+ } else {
+ stack.push(n)
+ }
+ i = i+2
+ }
+ } else {
+ //console.log("right child")
+ s = p.left
+ if(s.left && s.left._color === RED) {
+ //console.log("case 1: left sibling child red", p.value, p._color)
+ s = p.left = cloneNode(s)
+ z = s.left = cloneNode(s.left)
+ p.left = s.right
+ s.right = p
+ s.left = z
+ s._color = p._color
+ n._color = BLACK
+ p._color = BLACK
+ z._color = BLACK
+ recount(p)
+ recount(s)
+ if(i > 1) {
+ var pp = stack[i-2]
+ if(pp.right === p) {
+ pp.right = s
+ } else {
+ pp.left = s
+ }
+ }
+ stack[i-1] = s
+ return
+ } else if(s.right && s.right._color === RED) {
+ //console.log("case 1: right sibling child red")
+ s = p.left = cloneNode(s)
+ z = s.right = cloneNode(s.right)
+ p.left = z.right
+ s.right = z.left
+ z.right = p
+ z.left = s
+ z._color = p._color
+ p._color = BLACK
+ s._color = BLACK
+ n._color = BLACK
+ recount(p)
+ recount(s)
+ recount(z)
+ if(i > 1) {
+ var pp = stack[i-2]
+ if(pp.right === p) {
+ pp.right = z
+ } else {
+ pp.left = z
+ }
+ }
+ stack[i-1] = z
+ return
+ }
+ if(s._color === BLACK) {
+ if(p._color === RED) {
+ //console.log("case 2: black sibling, red parent")
+ p._color = BLACK
+ p.left = repaint(RED, s)
+ return
+ } else {
+ //console.log("case 2: black sibling, black parent")
+ p.left = repaint(RED, s)
+ continue
+ }
+ } else {
+ //console.log("case 3: red sibling")
+ s = cloneNode(s)
+ p.left = s.right
+ s.right = p
+ s._color = p._color
+ p._color = RED
+ recount(p)
+ recount(s)
+ if(i > 1) {
+ var pp = stack[i-2]
+ if(pp.right === p) {
+ pp.right = s
+ } else {
+ pp.left = s
+ }
+ }
+ stack[i-1] = s
+ stack[i] = p
+ if(i+1 < stack.length) {
+ stack[i+1] = n
+ } else {
+ stack.push(n)
+ }
+ i = i+2
+ }
+ }
+ }
+}
+
+//Removes item at iterator from tree
+iproto.remove = function() {
+ var stack = this._stack
+ if(stack.length === 0) {
+ return this.tree
+ }
+ //First copy path to node
+ var cstack = new Array(stack.length)
+ var n = stack[stack.length-1]
+ cstack[cstack.length-1] = new RBNode(n._color, n.key, n.value, n.left, n.right, n._count)
+ for(var i=stack.length-2; i>=0; --i) {
+ var n = stack[i]
+ if(n.left === stack[i+1]) {
+ cstack[i] = new RBNode(n._color, n.key, n.value, cstack[i+1], n.right, n._count)
+ } else {
+ cstack[i] = new RBNode(n._color, n.key, n.value, n.left, cstack[i+1], n._count)
+ }
+ }
+
+ //Get node
+ n = cstack[cstack.length-1]
+ //console.log("start remove: ", n.value)
+
+ //If not leaf, then swap with previous node
+ if(n.left && n.right) {
+ //console.log("moving to leaf")
+
+ //First walk to previous leaf
+ var split = cstack.length
+ n = n.left
+ while(n.right) {
+ cstack.push(n)
+ n = n.right
+ }
+ //Copy path to leaf
+ var v = cstack[split-1]
+ cstack.push(new RBNode(n._color, v.key, v.value, n.left, n.right, n._count))
+ cstack[split-1].key = n.key
+ cstack[split-1].value = n.value
+
+ //Fix up stack
+ for(var i=cstack.length-2; i>=split; --i) {
+ n = cstack[i]
+ cstack[i] = new RBNode(n._color, n.key, n.value, n.left, cstack[i+1], n._count)
+ }
+ cstack[split-1].left = cstack[split]
+ }
+ //console.log("stack=", cstack.map(function(v) { return v.value }))
+
+ //Remove leaf node
+ n = cstack[cstack.length-1]
+ if(n._color === RED) {
+ //Easy case: removing red leaf
+ //console.log("RED leaf")
+ var p = cstack[cstack.length-2]
+ if(p.left === n) {
+ p.left = null
+ } else if(p.right === n) {
+ p.right = null
+ }
+ cstack.pop()
+ for(var i=0; i<cstack.length; ++i) {
+ cstack[i]._count--
+ }
+ return new RedBlackTree(this.tree._compare, cstack[0])
+ } else {
+ if(n.left || n.right) {
+ //Second easy case: Single child black parent
+ //console.log("BLACK single child")
+ if(n.left) {
+ swapNode(n, n.left)
+ } else if(n.right) {
+ swapNode(n, n.right)
+ }
+ //Child must be red, so repaint it black to balance color
+ n._color = BLACK
+ for(var i=0; i<cstack.length-1; ++i) {
+ cstack[i]._count--
+ }
+ return new RedBlackTree(this.tree._compare, cstack[0])
+ } else if(cstack.length === 1) {
+ //Third easy case: root
+ //console.log("ROOT")
+ return new RedBlackTree(this.tree._compare, null)
+ } else {
+ //Hard case: Repaint n, and then do some nasty stuff
+ //console.log("BLACK leaf no children")
+ for(var i=0; i<cstack.length; ++i) {
+ cstack[i]._count--
+ }
+ var parent = cstack[cstack.length-2]
+ fixDoubleBlack(cstack)
+ //Fix up links
+ if(parent.left === n) {
+ parent.left = null
+ } else {
+ parent.right = null
+ }
+ }
+ }
+ return new RedBlackTree(this.tree._compare, cstack[0])
+}
+
+//Returns key
+Object.defineProperty(iproto, "key", {
+ get: function() {
+ if(this._stack.length > 0) {
+ return this._stack[this._stack.length-1].key
+ }
+ return
+ },
+ enumerable: true
+})
+
+//Returns value
+Object.defineProperty(iproto, "value", {
+ get: function() {
+ if(this._stack.length > 0) {
+ return this._stack[this._stack.length-1].value
+ }
+ return
+ },
+ enumerable: true
+})
+
+
+//Returns the position of this iterator in the sorted list
+Object.defineProperty(iproto, "index", {
+ get: function() {
+ var idx = 0
+ var stack = this._stack
+ if(stack.length === 0) {
+ var r = this.tree.root
+ if(r) {
+ return r._count
+ }
+ return 0
+ } else if(stack[stack.length-1].left) {
+ idx = stack[stack.length-1].left._count
+ }
+ for(var s=stack.length-2; s>=0; --s) {
+ if(stack[s+1] === stack[s].right) {
+ ++idx
+ if(stack[s].left) {
+ idx += stack[s].left._count
+ }
+ }
+ }
+ return idx
+ },
+ enumerable: true
+})
+
+//Advances iterator to next element in list
+iproto.next = function() {
+ var stack = this._stack
+ if(stack.length === 0) {
+ return
+ }
+ var n = stack[stack.length-1]
+ if(n.right) {
+ n = n.right
+ while(n) {
+ stack.push(n)
+ n = n.left
+ }
+ } else {
+ stack.pop()
+ while(stack.length > 0 && stack[stack.length-1].right === n) {
+ n = stack[stack.length-1]
+ stack.pop()
+ }
+ }
+}
+
+//Checks if iterator is at end of tree
+Object.defineProperty(iproto, "hasNext", {
+ get: function() {
+ var stack = this._stack
+ if(stack.length === 0) {
+ return false
+ }
+ if(stack[stack.length-1].right) {
+ return true
+ }
+ for(var s=stack.length-1; s>0; --s) {
+ if(stack[s-1].left === stack[s]) {
+ return true
+ }
+ }
+ return false
+ }
+})
+
+//Update value
+iproto.update = function(value) {
+ var stack = this._stack
+ if(stack.length === 0) {
+ throw new Error("Can't update empty node!")
+ }
+ var cstack = new Array(stack.length)
+ var n = stack[stack.length-1]
+ cstack[cstack.length-1] = new RBNode(n._color, n.key, value, n.left, n.right, n._count)
+ for(var i=stack.length-2; i>=0; --i) {
+ n = stack[i]
+ if(n.left === stack[i+1]) {
+ cstack[i] = new RBNode(n._color, n.key, n.value, cstack[i+1], n.right, n._count)
+ } else {
+ cstack[i] = new RBNode(n._color, n.key, n.value, n.left, cstack[i+1], n._count)
+ }
+ }
+ return new RedBlackTree(this.tree._compare, cstack[0])
+}
+
+//Moves iterator backward one element
+iproto.prev = function() {
+ var stack = this._stack
+ if(stack.length === 0) {
+ return
+ }
+ var n = stack[stack.length-1]
+ if(n.left) {
+ n = n.left
+ while(n) {
+ stack.push(n)
+ n = n.right
+ }
+ } else {
+ stack.pop()
+ while(stack.length > 0 && stack[stack.length-1].left === n) {
+ n = stack[stack.length-1]
+ stack.pop()
+ }
+ }
+}
+
+//Checks if iterator is at start of tree
+Object.defineProperty(iproto, "hasPrev", {
+ get: function() {
+ var stack = this._stack
+ if(stack.length === 0) {
+ return false
+ }
+ if(stack[stack.length-1].left) {
+ return true
+ }
+ for(var s=stack.length-1; s>0; --s) {
+ if(stack[s-1].right === stack[s]) {
+ return true
+ }
+ }
+ return false
+ }
+})
+
+//Default comparison function
+function defaultCompare(a, b) {
+ if(a < b) {
+ return -1
+ }
+ if(a > b) {
+ return 1
+ }
+ return 0
+}
+
+//Build a tree
+function createRBTree(compare) {
+ return new RedBlackTree(compare || defaultCompare, null)
+} \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/glob/LICENSE b/tools/node_modules/eslint/node_modules/glob/LICENSE
new file mode 100644
index 0000000000..19129e315f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/glob/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/tools/node_modules/eslint/node_modules/glob/README.md b/tools/node_modules/eslint/node_modules/glob/README.md
new file mode 100644
index 0000000000..baa1d1ba86
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/glob/README.md
@@ -0,0 +1,368 @@
+# Glob
+
+Match files using the patterns the shell uses, like stars and stuff.
+
+[![Build Status](https://travis-ci.org/isaacs/node-glob.svg?branch=master)](https://travis-ci.org/isaacs/node-glob/) [![Build Status](https://ci.appveyor.com/api/projects/status/kd7f3yftf7unxlsx?svg=true)](https://ci.appveyor.com/project/isaacs/node-glob) [![Coverage Status](https://coveralls.io/repos/isaacs/node-glob/badge.svg?branch=master&service=github)](https://coveralls.io/github/isaacs/node-glob?branch=master)
+
+This is a glob implementation in JavaScript. It uses the `minimatch`
+library to do its matching.
+
+![](oh-my-glob.gif)
+
+## Usage
+
+Install with npm
+
+```
+npm i glob
+```
+
+```javascript
+var glob = require("glob")
+
+// options is optional
+glob("**/*.js", options, function (er, files) {
+ // files is an array of filenames.
+ // If the `nonull` option is set, and nothing
+ // was found, then files is ["**/*.js"]
+ // er is an error object or null.
+})
+```
+
+## Glob Primer
+
+"Globs" are the patterns you type when you do stuff like `ls *.js` on
+the command line, or put `build/*` in a `.gitignore` file.
+
+Before parsing the path part patterns, braced sections are expanded
+into a set. Braced sections start with `{` and end with `}`, with any
+number of comma-delimited sections within. Braced sections may contain
+slash characters, so `a{/b/c,bcd}` would expand into `a/b/c` and `abcd`.
+
+The following characters have special magic meaning when used in a
+path portion:
+
+* `*` Matches 0 or more characters in a single path portion
+* `?` Matches 1 character
+* `[...]` Matches a range of characters, similar to a RegExp range.
+ If the first character of the range is `!` or `^` then it matches
+ any character not in the range.
+* `!(pattern|pattern|pattern)` Matches anything that does not match
+ any of the patterns provided.
+* `?(pattern|pattern|pattern)` Matches zero or one occurrence of the
+ patterns provided.
+* `+(pattern|pattern|pattern)` Matches one or more occurrences of the
+ patterns provided.
+* `*(a|b|c)` Matches zero or more occurrences of the patterns provided
+* `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns
+ provided
+* `**` If a "globstar" is alone in a path portion, then it matches
+ zero or more directories and subdirectories searching for matches.
+ It does not crawl symlinked directories.
+
+### Dots
+
+If a file or directory path portion has a `.` as the first character,
+then it will not match any glob pattern unless that pattern's
+corresponding path part also has a `.` as its first character.
+
+For example, the pattern `a/.*/c` would match the file at `a/.b/c`.
+However the pattern `a/*/c` would not, because `*` does not start with
+a dot character.
+
+You can make glob treat dots as normal characters by setting
+`dot:true` in the options.
+
+### Basename Matching
+
+If you set `matchBase:true` in the options, and the pattern has no
+slashes in it, then it will seek for any file anywhere in the tree
+with a matching basename. For example, `*.js` would match
+`test/simple/basic.js`.
+
+### Empty Sets
+
+If no matching files are found, then an empty array is returned. This
+differs from the shell, where the pattern itself is returned. For
+example:
+
+ $ echo a*s*d*f
+ a*s*d*f
+
+To get the bash-style behavior, set the `nonull:true` in the options.
+
+### See Also:
+
+* `man sh`
+* `man bash` (Search for "Pattern Matching")
+* `man 3 fnmatch`
+* `man 5 gitignore`
+* [minimatch documentation](https://github.com/isaacs/minimatch)
+
+## glob.hasMagic(pattern, [options])
+
+Returns `true` if there are any special characters in the pattern, and
+`false` otherwise.
+
+Note that the options affect the results. If `noext:true` is set in
+the options object, then `+(a|b)` will not be considered a magic
+pattern. If the pattern has a brace expansion, like `a/{b/c,x/y}`
+then that is considered magical, unless `nobrace:true` is set in the
+options.
+
+## glob(pattern, [options], cb)
+
+* `pattern` `{String}` Pattern to be matched
+* `options` `{Object}`
+* `cb` `{Function}`
+ * `err` `{Error | null}`
+ * `matches` `{Array<String>}` filenames found matching the pattern
+
+Perform an asynchronous glob search.
+
+## glob.sync(pattern, [options])
+
+* `pattern` `{String}` Pattern to be matched
+* `options` `{Object}`
+* return: `{Array<String>}` filenames found matching the pattern
+
+Perform a synchronous glob search.
+
+## Class: glob.Glob
+
+Create a Glob object by instantiating the `glob.Glob` class.
+
+```javascript
+var Glob = require("glob").Glob
+var mg = new Glob(pattern, options, cb)
+```
+
+It's an EventEmitter, and starts walking the filesystem to find matches
+immediately.
+
+### new glob.Glob(pattern, [options], [cb])
+
+* `pattern` `{String}` pattern to search for
+* `options` `{Object}`
+* `cb` `{Function}` Called when an error occurs, or matches are found
+ * `err` `{Error | null}`
+ * `matches` `{Array<String>}` filenames found matching the pattern
+
+Note that if the `sync` flag is set in the options, then matches will
+be immediately available on the `g.found` member.
+
+### Properties
+
+* `minimatch` The minimatch object that the glob uses.
+* `options` The options object passed in.
+* `aborted` Boolean which is set to true when calling `abort()`. There
+ is no way at this time to continue a glob search after aborting, but
+ you can re-use the statCache to avoid having to duplicate syscalls.
+* `cache` Convenience object. Each field has the following possible
+ values:
+ * `false` - Path does not exist
+ * `true` - Path exists
+ * `'FILE'` - Path exists, and is not a directory
+ * `'DIR'` - Path exists, and is a directory
+ * `[file, entries, ...]` - Path exists, is a directory, and the
+ array value is the results of `fs.readdir`
+* `statCache` Cache of `fs.stat` results, to prevent statting the same
+ path multiple times.
+* `symlinks` A record of which paths are symbolic links, which is
+ relevant in resolving `**` patterns.
+* `realpathCache` An optional object which is passed to `fs.realpath`
+ to minimize unnecessary syscalls. It is stored on the instantiated
+ Glob object, and may be re-used.
+
+### Events
+
+* `end` When the matching is finished, this is emitted with all the
+ matches found. If the `nonull` option is set, and no match was found,
+ then the `matches` list contains the original pattern. The matches
+ are sorted, unless the `nosort` flag is set.
+* `match` Every time a match is found, this is emitted with the specific
+ thing that matched. It is not deduplicated or resolved to a realpath.
+* `error` Emitted when an unexpected error is encountered, or whenever
+ any fs error occurs if `options.strict` is set.
+* `abort` When `abort()` is called, this event is raised.
+
+### Methods
+
+* `pause` Temporarily stop the search
+* `resume` Resume the search
+* `abort` Stop the search forever
+
+### Options
+
+All the options that can be passed to Minimatch can also be passed to
+Glob to change pattern matching behavior. Also, some have been added,
+or have glob-specific ramifications.
+
+All options are false by default, unless otherwise noted.
+
+All options are added to the Glob object, as well.
+
+If you are running many `glob` operations, you can pass a Glob object
+as the `options` argument to a subsequent operation to shortcut some
+`stat` and `readdir` calls. At the very least, you may pass in shared
+`symlinks`, `statCache`, `realpathCache`, and `cache` options, so that
+parallel glob operations will be sped up by sharing information about
+the filesystem.
+
+* `cwd` The current working directory in which to search. Defaults
+ to `process.cwd()`.
+* `root` The place where patterns starting with `/` will be mounted
+ onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix
+ systems, and `C:\` or some such on Windows.)
+* `dot` Include `.dot` files in normal matches and `globstar` matches.
+ Note that an explicit dot in a portion of the pattern will always
+ match dot files.
+* `nomount` By default, a pattern starting with a forward-slash will be
+ "mounted" onto the root setting, so that a valid filesystem path is
+ returned. Set this flag to disable that behavior.
+* `mark` Add a `/` character to directory matches. Note that this
+ requires additional stat calls.
+* `nosort` Don't sort the results.
+* `stat` Set to true to stat *all* results. This reduces performance
+ somewhat, and is completely unnecessary, unless `readdir` is presumed
+ to be an untrustworthy indicator of file existence.
+* `silent` When an unusual error is encountered when attempting to
+ read a directory, a warning will be printed to stderr. Set the
+ `silent` option to true to suppress these warnings.
+* `strict` When an unusual error is encountered when attempting to
+ read a directory, the process will just continue on in search of
+ other matches. Set the `strict` option to raise an error in these
+ cases.
+* `cache` See `cache` property above. Pass in a previously generated
+ cache object to save some fs calls.
+* `statCache` A cache of results of filesystem information, to prevent
+ unnecessary stat calls. While it should not normally be necessary
+ to set this, you may pass the statCache from one glob() call to the
+ options object of another, if you know that the filesystem will not
+ change between calls. (See "Race Conditions" below.)
+* `symlinks` A cache of known symbolic links. You may pass in a
+ previously generated `symlinks` object to save `lstat` calls when
+ resolving `**` matches.
+* `sync` DEPRECATED: use `glob.sync(pattern, opts)` instead.
+* `nounique` In some cases, brace-expanded patterns can result in the
+ same file showing up multiple times in the result set. By default,
+ this implementation prevents duplicates in the result set. Set this
+ flag to disable that behavior.
+* `nonull` Set to never return an empty set, instead returning a set
+ containing the pattern itself. This is the default in glob(3).
+* `debug` Set to enable debug logging in minimatch and glob.
+* `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets.
+* `noglobstar` Do not match `**` against multiple filenames. (Ie,
+ treat it as a normal `*` instead.)
+* `noext` Do not match `+(a|b)` "extglob" patterns.
+* `nocase` Perform a case-insensitive match. Note: on
+ case-insensitive filesystems, non-magic patterns will match by
+ default, since `stat` and `readdir` will not raise errors.
+* `matchBase` Perform a basename-only match if the pattern does not
+ contain any slash characters. That is, `*.js` would be treated as
+ equivalent to `**/*.js`, matching all js files in all directories.
+* `nodir` Do not match directories, only files. (Note: to match
+ *only* directories, simply put a `/` at the end of the pattern.)
+* `ignore` Add a pattern or an array of glob patterns to exclude matches.
+ Note: `ignore` patterns are *always* in `dot:true` mode, regardless
+ of any other settings.
+* `follow` Follow symlinked directories when expanding `**` patterns.
+ Note that this can result in a lot of duplicate references in the
+ presence of cyclic links.
+* `realpath` Set to true to call `fs.realpath` on all of the results.
+ In the case of a symlink that cannot be resolved, the full absolute
+ path to the matched entry is returned (though it will usually be a
+ broken symlink)
+* `absolute` Set to true to always receive absolute paths for matched
+ files. Unlike `realpath`, this also affects the values returned in
+ the `match` event.
+
+## Comparisons to other fnmatch/glob implementations
+
+While strict compliance with the existing standards is a worthwhile
+goal, some discrepancies exist between node-glob and other
+implementations, and are intentional.
+
+The double-star character `**` is supported by default, unless the
+`noglobstar` flag is set. This is supported in the manner of bsdglob
+and bash 4.3, where `**` only has special significance if it is the only
+thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
+`a/**b` will not.
+
+Note that symlinked directories are not crawled as part of a `**`,
+though their contents may match against subsequent portions of the
+pattern. This prevents infinite loops and duplicates and the like.
+
+If an escaped pattern has no matches, and the `nonull` flag is set,
+then glob returns the pattern as-provided, rather than
+interpreting the character escapes. For example,
+`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
+`"*a?"`. This is akin to setting the `nullglob` option in bash, except
+that it does not resolve escaped pattern characters.
+
+If brace expansion is not disabled, then it is performed before any
+other interpretation of the glob pattern. Thus, a pattern like
+`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
+**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
+checked for validity. Since those two are valid, matching proceeds.
+
+### Comments and Negation
+
+Previously, this module let you mark a pattern as a "comment" if it
+started with a `#` character, or a "negated" pattern if it started
+with a `!` character.
+
+These options were deprecated in version 5, and removed in version 6.
+
+To specify things that should not match, use the `ignore` option.
+
+## Windows
+
+**Please only use forward-slashes in glob expressions.**
+
+Though windows uses either `/` or `\` as its path separator, only `/`
+characters are used by this glob implementation. You must use
+forward-slashes **only** in glob expressions. Back-slashes will always
+be interpreted as escape characters, not path separators.
+
+Results from absolute patterns such as `/foo/*` are mounted onto the
+root setting using `path.join`. On windows, this will by default result
+in `/foo/*` matching `C:\foo\bar.txt`.
+
+## Race Conditions
+
+Glob searching, by its very nature, is susceptible to race conditions,
+since it relies on directory walking and such.
+
+As a result, it is possible that a file that exists when glob looks for
+it may have been deleted or modified by the time it returns the result.
+
+As part of its internal implementation, this program caches all stat
+and readdir calls that it makes, in order to cut down on system
+overhead. However, this also makes it even more susceptible to races,
+especially if the cache or statCache objects are reused between glob
+calls.
+
+Users are thus advised not to use a glob result as a guarantee of
+filesystem state in the face of rapid changes. For the vast majority
+of operations, this is never a problem.
+
+## Contributing
+
+Any change to behavior (including bugfixes) must come with a test.
+
+Patches that fail tests or reduce performance will be rejected.
+
+```
+# to run tests
+npm test
+
+# to re-generate test fixtures
+npm run test-regen
+
+# to benchmark against bash/zsh
+npm run bench
+
+# to profile javascript
+npm run prof
+```
diff --git a/tools/node_modules/eslint/node_modules/glob/changelog.md b/tools/node_modules/eslint/node_modules/glob/changelog.md
new file mode 100644
index 0000000000..41636771e3
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/glob/changelog.md
@@ -0,0 +1,67 @@
+## 7.0
+
+- Raise error if `options.cwd` is specified, and not a directory
+
+## 6.0
+
+- Remove comment and negation pattern support
+- Ignore patterns are always in `dot:true` mode
+
+## 5.0
+
+- Deprecate comment and negation patterns
+- Fix regression in `mark` and `nodir` options from making all cache
+ keys absolute path.
+- Abort if `fs.readdir` returns an error that's unexpected
+- Don't emit `match` events for ignored items
+- Treat ENOTSUP like ENOTDIR in readdir
+
+## 4.5
+
+- Add `options.follow` to always follow directory symlinks in globstar
+- Add `options.realpath` to call `fs.realpath` on all results
+- Always cache based on absolute path
+
+## 4.4
+
+- Add `options.ignore`
+- Fix handling of broken symlinks
+
+## 4.3
+
+- Bump minimatch to 2.x
+- Pass all tests on Windows
+
+## 4.2
+
+- Add `glob.hasMagic` function
+- Add `options.nodir` flag
+
+## 4.1
+
+- Refactor sync and async implementations for performance
+- Throw if callback provided to sync glob function
+- Treat symbolic links in globstar results the same as Bash 4.3
+
+## 4.0
+
+- Use `^` for dependency versions (bumped major because this breaks
+ older npm versions)
+- Ensure callbacks are only ever called once
+- switch to ISC license
+
+## 3.x
+
+- Rewrite in JavaScript
+- Add support for setting root, cwd, and windows support
+- Cache many fs calls
+- Add globstar support
+- emit match events
+
+## 2.x
+
+- Use `glob.h` and `fnmatch.h` from NetBSD
+
+## 1.x
+
+- `glob.h` static binding.
diff --git a/tools/node_modules/eslint/node_modules/glob/common.js b/tools/node_modules/eslint/node_modules/glob/common.js
new file mode 100644
index 0000000000..66651bb3aa
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/glob/common.js
@@ -0,0 +1,240 @@
+exports.alphasort = alphasort
+exports.alphasorti = alphasorti
+exports.setopts = setopts
+exports.ownProp = ownProp
+exports.makeAbs = makeAbs
+exports.finish = finish
+exports.mark = mark
+exports.isIgnored = isIgnored
+exports.childrenIgnored = childrenIgnored
+
+function ownProp (obj, field) {
+ return Object.prototype.hasOwnProperty.call(obj, field)
+}
+
+var path = require("path")
+var minimatch = require("minimatch")
+var isAbsolute = require("path-is-absolute")
+var Minimatch = minimatch.Minimatch
+
+function alphasorti (a, b) {
+ return a.toLowerCase().localeCompare(b.toLowerCase())
+}
+
+function alphasort (a, b) {
+ return a.localeCompare(b)
+}
+
+function setupIgnores (self, options) {
+ self.ignore = options.ignore || []
+
+ if (!Array.isArray(self.ignore))
+ self.ignore = [self.ignore]
+
+ if (self.ignore.length) {
+ self.ignore = self.ignore.map(ignoreMap)
+ }
+}
+
+// ignore patterns are always in dot:true mode.
+function ignoreMap (pattern) {
+ var gmatcher = null
+ if (pattern.slice(-3) === '/**') {
+ var gpattern = pattern.replace(/(\/\*\*)+$/, '')
+ gmatcher = new Minimatch(gpattern, { dot: true })
+ }
+
+ return {
+ matcher: new Minimatch(pattern, { dot: true }),
+ gmatcher: gmatcher
+ }
+}
+
+function setopts (self, pattern, options) {
+ if (!options)
+ options = {}
+
+ // base-matching: just use globstar for that.
+ if (options.matchBase && -1 === pattern.indexOf("/")) {
+ if (options.noglobstar) {
+ throw new Error("base matching requires globstar")
+ }
+ pattern = "**/" + pattern
+ }
+
+ self.silent = !!options.silent
+ self.pattern = pattern
+ self.strict = options.strict !== false
+ self.realpath = !!options.realpath
+ self.realpathCache = options.realpathCache || Object.create(null)
+ self.follow = !!options.follow
+ self.dot = !!options.dot
+ self.mark = !!options.mark
+ self.nodir = !!options.nodir
+ if (self.nodir)
+ self.mark = true
+ self.sync = !!options.sync
+ self.nounique = !!options.nounique
+ self.nonull = !!options.nonull
+ self.nosort = !!options.nosort
+ self.nocase = !!options.nocase
+ self.stat = !!options.stat
+ self.noprocess = !!options.noprocess
+ self.absolute = !!options.absolute
+
+ self.maxLength = options.maxLength || Infinity
+ self.cache = options.cache || Object.create(null)
+ self.statCache = options.statCache || Object.create(null)
+ self.symlinks = options.symlinks || Object.create(null)
+
+ setupIgnores(self, options)
+
+ self.changedCwd = false
+ var cwd = process.cwd()
+ if (!ownProp(options, "cwd"))
+ self.cwd = cwd
+ else {
+ self.cwd = path.resolve(options.cwd)
+ self.changedCwd = self.cwd !== cwd
+ }
+
+ self.root = options.root || path.resolve(self.cwd, "/")
+ self.root = path.resolve(self.root)
+ if (process.platform === "win32")
+ self.root = self.root.replace(/\\/g, "/")
+
+ // TODO: is an absolute `cwd` supposed to be resolved against `root`?
+ // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test')
+ self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd)
+ if (process.platform === "win32")
+ self.cwdAbs = self.cwdAbs.replace(/\\/g, "/")
+ self.nomount = !!options.nomount
+
+ // disable comments and negation in Minimatch.
+ // Note that they are not supported in Glob itself anyway.
+ options.nonegate = true
+ options.nocomment = true
+
+ self.minimatch = new Minimatch(pattern, options)
+ self.options = self.minimatch.options
+}
+
+function finish (self) {
+ var nou = self.nounique
+ var all = nou ? [] : Object.create(null)
+
+ for (var i = 0, l = self.matches.length; i < l; i ++) {
+ var matches = self.matches[i]
+ if (!matches || Object.keys(matches).length === 0) {
+ if (self.nonull) {
+ // do like the shell, and spit out the literal glob
+ var literal = self.minimatch.globSet[i]
+ if (nou)
+ all.push(literal)
+ else
+ all[literal] = true
+ }
+ } else {
+ // had matches
+ var m = Object.keys(matches)
+ if (nou)
+ all.push.apply(all, m)
+ else
+ m.forEach(function (m) {
+ all[m] = true
+ })
+ }
+ }
+
+ if (!nou)
+ all = Object.keys(all)
+
+ if (!self.nosort)
+ all = all.sort(self.nocase ? alphasorti : alphasort)
+
+ // at *some* point we statted all of these
+ if (self.mark) {
+ for (var i = 0; i < all.length; i++) {
+ all[i] = self._mark(all[i])
+ }
+ if (self.nodir) {
+ all = all.filter(function (e) {
+ var notDir = !(/\/$/.test(e))
+ var c = self.cache[e] || self.cache[makeAbs(self, e)]
+ if (notDir && c)
+ notDir = c !== 'DIR' && !Array.isArray(c)
+ return notDir
+ })
+ }
+ }
+
+ if (self.ignore.length)
+ all = all.filter(function(m) {
+ return !isIgnored(self, m)
+ })
+
+ self.found = all
+}
+
+function mark (self, p) {
+ var abs = makeAbs(self, p)
+ var c = self.cache[abs]
+ var m = p
+ if (c) {
+ var isDir = c === 'DIR' || Array.isArray(c)
+ var slash = p.slice(-1) === '/'
+
+ if (isDir && !slash)
+ m += '/'
+ else if (!isDir && slash)
+ m = m.slice(0, -1)
+
+ if (m !== p) {
+ var mabs = makeAbs(self, m)
+ self.statCache[mabs] = self.statCache[abs]
+ self.cache[mabs] = self.cache[abs]
+ }
+ }
+
+ return m
+}
+
+// lotta situps...
+function makeAbs (self, f) {
+ var abs = f
+ if (f.charAt(0) === '/') {
+ abs = path.join(self.root, f)
+ } else if (isAbsolute(f) || f === '') {
+ abs = f
+ } else if (self.changedCwd) {
+ abs = path.resolve(self.cwd, f)
+ } else {
+ abs = path.resolve(f)
+ }
+
+ if (process.platform === 'win32')
+ abs = abs.replace(/\\/g, '/')
+
+ return abs
+}
+
+
+// Return true, if pattern ends with globstar '**', for the accompanying parent directory.
+// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents
+function isIgnored (self, path) {
+ if (!self.ignore.length)
+ return false
+
+ return self.ignore.some(function(item) {
+ return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path))
+ })
+}
+
+function childrenIgnored (self, path) {
+ if (!self.ignore.length)
+ return false
+
+ return self.ignore.some(function(item) {
+ return !!(item.gmatcher && item.gmatcher.match(path))
+ })
+}
diff --git a/tools/node_modules/eslint/node_modules/glob/glob.js b/tools/node_modules/eslint/node_modules/glob/glob.js
new file mode 100644
index 0000000000..58dec0f6c2
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/glob/glob.js
@@ -0,0 +1,790 @@
+// Approach:
+//
+// 1. Get the minimatch set
+// 2. For each pattern in the set, PROCESS(pattern, false)
+// 3. Store matches per-set, then uniq them
+//
+// PROCESS(pattern, inGlobStar)
+// Get the first [n] items from pattern that are all strings
+// Join these together. This is PREFIX.
+// If there is no more remaining, then stat(PREFIX) and
+// add to matches if it succeeds. END.
+//
+// If inGlobStar and PREFIX is symlink and points to dir
+// set ENTRIES = []
+// else readdir(PREFIX) as ENTRIES
+// If fail, END
+//
+// with ENTRIES
+// If pattern[n] is GLOBSTAR
+// // handle the case where the globstar match is empty
+// // by pruning it out, and testing the resulting pattern
+// PROCESS(pattern[0..n] + pattern[n+1 .. $], false)
+// // handle other cases.
+// for ENTRY in ENTRIES (not dotfiles)
+// // attach globstar + tail onto the entry
+// // Mark that this entry is a globstar match
+// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true)
+//
+// else // not globstar
+// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot)
+// Test ENTRY against pattern[n]
+// If fails, continue
+// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $])
+//
+// Caveat:
+// Cache all stats and readdirs results to minimize syscall. Since all
+// we ever care about is existence and directory-ness, we can just keep
+// `true` for files, and [children,...] for directories, or `false` for
+// things that don't exist.
+
+module.exports = glob
+
+var fs = require('fs')
+var rp = require('fs.realpath')
+var minimatch = require('minimatch')
+var Minimatch = minimatch.Minimatch
+var inherits = require('inherits')
+var EE = require('events').EventEmitter
+var path = require('path')
+var assert = require('assert')
+var isAbsolute = require('path-is-absolute')
+var globSync = require('./sync.js')
+var common = require('./common.js')
+var alphasort = common.alphasort
+var alphasorti = common.alphasorti
+var setopts = common.setopts
+var ownProp = common.ownProp
+var inflight = require('inflight')
+var util = require('util')
+var childrenIgnored = common.childrenIgnored
+var isIgnored = common.isIgnored
+
+var once = require('once')
+
+function glob (pattern, options, cb) {
+ if (typeof options === 'function') cb = options, options = {}
+ if (!options) options = {}
+
+ if (options.sync) {
+ if (cb)
+ throw new TypeError('callback provided to sync glob')
+ return globSync(pattern, options)
+ }
+
+ return new Glob(pattern, options, cb)
+}
+
+glob.sync = globSync
+var GlobSync = glob.GlobSync = globSync.GlobSync
+
+// old api surface
+glob.glob = glob
+
+function extend (origin, add) {
+ if (add === null || typeof add !== 'object') {
+ return origin
+ }
+
+ var keys = Object.keys(add)
+ var i = keys.length
+ while (i--) {
+ origin[keys[i]] = add[keys[i]]
+ }
+ return origin
+}
+
+glob.hasMagic = function (pattern, options_) {
+ var options = extend({}, options_)
+ options.noprocess = true
+
+ var g = new Glob(pattern, options)
+ var set = g.minimatch.set
+
+ if (!pattern)
+ return false
+
+ if (set.length > 1)
+ return true
+
+ for (var j = 0; j < set[0].length; j++) {
+ if (typeof set[0][j] !== 'string')
+ return true
+ }
+
+ return false
+}
+
+glob.Glob = Glob
+inherits(Glob, EE)
+function Glob (pattern, options, cb) {
+ if (typeof options === 'function') {
+ cb = options
+ options = null
+ }
+
+ if (options && options.sync) {
+ if (cb)
+ throw new TypeError('callback provided to sync glob')
+ return new GlobSync(pattern, options)
+ }
+
+ if (!(this instanceof Glob))
+ return new Glob(pattern, options, cb)
+
+ setopts(this, pattern, options)
+ this._didRealPath = false
+
+ // process each pattern in the minimatch set
+ var n = this.minimatch.set.length
+
+ // The matches are stored as {<filename>: true,...} so that
+ // duplicates are automagically pruned.
+ // Later, we do an Object.keys() on these.
+ // Keep them as a list so we can fill in when nonull is set.
+ this.matches = new Array(n)
+
+ if (typeof cb === 'function') {
+ cb = once(cb)
+ this.on('error', cb)
+ this.on('end', function (matches) {
+ cb(null, matches)
+ })
+ }
+
+ var self = this
+ this._processing = 0
+
+ this._emitQueue = []
+ this._processQueue = []
+ this.paused = false
+
+ if (this.noprocess)
+ return this
+
+ if (n === 0)
+ return done()
+
+ var sync = true
+ for (var i = 0; i < n; i ++) {
+ this._process(this.minimatch.set[i], i, false, done)
+ }
+ sync = false
+
+ function done () {
+ --self._processing
+ if (self._processing <= 0) {
+ if (sync) {
+ process.nextTick(function () {
+ self._finish()
+ })
+ } else {
+ self._finish()
+ }
+ }
+ }
+}
+
+Glob.prototype._finish = function () {
+ assert(this instanceof Glob)
+ if (this.aborted)
+ return
+
+ if (this.realpath && !this._didRealpath)
+ return this._realpath()
+
+ common.finish(this)
+ this.emit('end', this.found)
+}
+
+Glob.prototype._realpath = function () {
+ if (this._didRealpath)
+ return
+
+ this._didRealpath = true
+
+ var n = this.matches.length
+ if (n === 0)
+ return this._finish()
+
+ var self = this
+ for (var i = 0; i < this.matches.length; i++)
+ this._realpathSet(i, next)
+
+ function next () {
+ if (--n === 0)
+ self._finish()
+ }
+}
+
+Glob.prototype._realpathSet = function (index, cb) {
+ var matchset = this.matches[index]
+ if (!matchset)
+ return cb()
+
+ var found = Object.keys(matchset)
+ var self = this
+ var n = found.length
+
+ if (n === 0)
+ return cb()
+
+ var set = this.matches[index] = Object.create(null)
+ found.forEach(function (p, i) {
+ // If there's a problem with the stat, then it means that
+ // one or more of the links in the realpath couldn't be
+ // resolved. just return the abs value in that case.
+ p = self._makeAbs(p)
+ rp.realpath(p, self.realpathCache, function (er, real) {
+ if (!er)
+ set[real] = true
+ else if (er.syscall === 'stat')
+ set[p] = true
+ else
+ self.emit('error', er) // srsly wtf right here
+
+ if (--n === 0) {
+ self.matches[index] = set
+ cb()
+ }
+ })
+ })
+}
+
+Glob.prototype._mark = function (p) {
+ return common.mark(this, p)
+}
+
+Glob.prototype._makeAbs = function (f) {
+ return common.makeAbs(this, f)
+}
+
+Glob.prototype.abort = function () {
+ this.aborted = true
+ this.emit('abort')
+}
+
+Glob.prototype.pause = function () {
+ if (!this.paused) {
+ this.paused = true
+ this.emit('pause')
+ }
+}
+
+Glob.prototype.resume = function () {
+ if (this.paused) {
+ this.emit('resume')
+ this.paused = false
+ if (this._emitQueue.length) {
+ var eq = this._emitQueue.slice(0)
+ this._emitQueue.length = 0
+ for (var i = 0; i < eq.length; i ++) {
+ var e = eq[i]
+ this._emitMatch(e[0], e[1])
+ }
+ }
+ if (this._processQueue.length) {
+ var pq = this._processQueue.slice(0)
+ this._processQueue.length = 0
+ for (var i = 0; i < pq.length; i ++) {
+ var p = pq[i]
+ this._processing--
+ this._process(p[0], p[1], p[2], p[3])
+ }
+ }
+ }
+}
+
+Glob.prototype._process = function (pattern, index, inGlobStar, cb) {
+ assert(this instanceof Glob)
+ assert(typeof cb === 'function')
+
+ if (this.aborted)
+ return
+
+ this._processing++
+ if (this.paused) {
+ this._processQueue.push([pattern, index, inGlobStar, cb])
+ return
+ }
+
+ //console.error('PROCESS %d', this._processing, pattern)
+
+ // Get the first [n] parts of pattern that are all strings.
+ var n = 0
+ while (typeof pattern[n] === 'string') {
+ n ++
+ }
+ // now n is the index of the first one that is *not* a string.
+
+ // see if there's anything else
+ var prefix
+ switch (n) {
+ // if not, then this is rather simple
+ case pattern.length:
+ this._processSimple(pattern.join('/'), index, cb)
+ return
+
+ case 0:
+ // pattern *starts* with some non-trivial item.
+ // going to readdir(cwd), but not include the prefix in matches.
+ prefix = null
+ break
+
+ default:
+ // pattern has some string bits in the front.
+ // whatever it starts with, whether that's 'absolute' like /foo/bar,
+ // or 'relative' like '../baz'
+ prefix = pattern.slice(0, n).join('/')
+ break
+ }
+
+ var remain = pattern.slice(n)
+
+ // get the list of entries.
+ var read
+ if (prefix === null)
+ read = '.'
+ else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) {
+ if (!prefix || !isAbsolute(prefix))
+ prefix = '/' + prefix
+ read = prefix
+ } else
+ read = prefix
+
+ var abs = this._makeAbs(read)
+
+ //if ignored, skip _processing
+ if (childrenIgnored(this, read))
+ return cb()
+
+ var isGlobStar = remain[0] === minimatch.GLOBSTAR
+ if (isGlobStar)
+ this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb)
+ else
+ this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb)
+}
+
+Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) {
+ var self = this
+ this._readdir(abs, inGlobStar, function (er, entries) {
+ return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb)
+ })
+}
+
+Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {
+
+ // if the abs isn't a dir, then nothing can match!
+ if (!entries)
+ return cb()
+
+ // It will only match dot entries if it starts with a dot, or if
+ // dot is set. Stuff like @(.foo|.bar) isn't allowed.
+ var pn = remain[0]
+ var negate = !!this.minimatch.negate
+ var rawGlob = pn._glob
+ var dotOk = this.dot || rawGlob.charAt(0) === '.'
+
+ var matchedEntries = []
+ for (var i = 0; i < entries.length; i++) {
+ var e = entries[i]
+ if (e.charAt(0) !== '.' || dotOk) {
+ var m
+ if (negate && !prefix) {
+ m = !e.match(pn)
+ } else {
+ m = e.match(pn)
+ }
+ if (m)
+ matchedEntries.push(e)
+ }
+ }
+
+ //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries)
+
+ var len = matchedEntries.length
+ // If there are no matched entries, then nothing matches.
+ if (len === 0)
+ return cb()
+
+ // if this is the last remaining pattern bit, then no need for
+ // an additional stat *unless* the user has specified mark or
+ // stat explicitly. We know they exist, since readdir returned
+ // them.
+
+ if (remain.length === 1 && !this.mark && !this.stat) {
+ if (!this.matches[index])
+ this.matches[index] = Object.create(null)
+
+ for (var i = 0; i < len; i ++) {
+ var e = matchedEntries[i]
+ if (prefix) {
+ if (prefix !== '/')
+ e = prefix + '/' + e
+ else
+ e = prefix + e
+ }
+
+ if (e.charAt(0) === '/' && !this.nomount) {
+ e = path.join(this.root, e)
+ }
+ this._emitMatch(index, e)
+ }
+ // This was the last one, and no stats were needed
+ return cb()
+ }
+
+ // now test all matched entries as stand-ins for that part
+ // of the pattern.
+ remain.shift()
+ for (var i = 0; i < len; i ++) {
+ var e = matchedEntries[i]
+ var newPattern
+ if (prefix) {
+ if (prefix !== '/')
+ e = prefix + '/' + e
+ else
+ e = prefix + e
+ }
+ this._process([e].concat(remain), index, inGlobStar, cb)
+ }
+ cb()
+}
+
+Glob.prototype._emitMatch = function (index, e) {
+ if (this.aborted)
+ return
+
+ if (isIgnored(this, e))
+ return
+
+ if (this.paused) {
+ this._emitQueue.push([index, e])
+ return
+ }
+
+ var abs = isAbsolute(e) ? e : this._makeAbs(e)
+
+ if (this.mark)
+ e = this._mark(e)
+
+ if (this.absolute)
+ e = abs
+
+ if (this.matches[index][e])
+ return
+
+ if (this.nodir) {
+ var c = this.cache[abs]
+ if (c === 'DIR' || Array.isArray(c))
+ return
+ }
+
+ this.matches[index][e] = true
+
+ var st = this.statCache[abs]
+ if (st)
+ this.emit('stat', e, st)
+
+ this.emit('match', e)
+}
+
+Glob.prototype._readdirInGlobStar = function (abs, cb) {
+ if (this.aborted)
+ return
+
+ // follow all symlinked directories forever
+ // just proceed as if this is a non-globstar situation
+ if (this.follow)
+ return this._readdir(abs, false, cb)
+
+ var lstatkey = 'lstat\0' + abs
+ var self = this
+ var lstatcb = inflight(lstatkey, lstatcb_)
+
+ if (lstatcb)
+ fs.lstat(abs, lstatcb)
+
+ function lstatcb_ (er, lstat) {
+ if (er && er.code === 'ENOENT')
+ return cb()
+
+ var isSym = lstat && lstat.isSymbolicLink()
+ self.symlinks[abs] = isSym
+
+ // If it's not a symlink or a dir, then it's definitely a regular file.
+ // don't bother doing a readdir in that case.
+ if (!isSym && lstat && !lstat.isDirectory()) {
+ self.cache[abs] = 'FILE'
+ cb()
+ } else
+ self._readdir(abs, false, cb)
+ }
+}
+
+Glob.prototype._readdir = function (abs, inGlobStar, cb) {
+ if (this.aborted)
+ return
+
+ cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb)
+ if (!cb)
+ return
+
+ //console.error('RD %j %j', +inGlobStar, abs)
+ if (inGlobStar && !ownProp(this.symlinks, abs))
+ return this._readdirInGlobStar(abs, cb)
+
+ if (ownProp(this.cache, abs)) {
+ var c = this.cache[abs]
+ if (!c || c === 'FILE')
+ return cb()
+
+ if (Array.isArray(c))
+ return cb(null, c)
+ }
+
+ var self = this
+ fs.readdir(abs, readdirCb(this, abs, cb))
+}
+
+function readdirCb (self, abs, cb) {
+ return function (er, entries) {
+ if (er)
+ self._readdirError(abs, er, cb)
+ else
+ self._readdirEntries(abs, entries, cb)
+ }
+}
+
+Glob.prototype._readdirEntries = function (abs, entries, cb) {
+ if (this.aborted)
+ return
+
+ // if we haven't asked to stat everything, then just
+ // assume that everything in there exists, so we can avoid
+ // having to stat it a second time.
+ if (!this.mark && !this.stat) {
+ for (var i = 0; i < entries.length; i ++) {
+ var e = entries[i]
+ if (abs === '/')
+ e = abs + e
+ else
+ e = abs + '/' + e
+ this.cache[e] = true
+ }
+ }
+
+ this.cache[abs] = entries
+ return cb(null, entries)
+}
+
+Glob.prototype._readdirError = function (f, er, cb) {
+ if (this.aborted)
+ return
+
+ // handle errors, and cache the information
+ switch (er.code) {
+ case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205
+ case 'ENOTDIR': // totally normal. means it *does* exist.
+ var abs = this._makeAbs(f)
+ this.cache[abs] = 'FILE'
+ if (abs === this.cwdAbs) {
+ var error = new Error(er.code + ' invalid cwd ' + this.cwd)
+ error.path = this.cwd
+ error.code = er.code
+ this.emit('error', error)
+ this.abort()
+ }
+ break
+
+ case 'ENOENT': // not terribly unusual
+ case 'ELOOP':
+ case 'ENAMETOOLONG':
+ case 'UNKNOWN':
+ this.cache[this._makeAbs(f)] = false
+ break
+
+ default: // some unusual error. Treat as failure.
+ this.cache[this._makeAbs(f)] = false
+ if (this.strict) {
+ this.emit('error', er)
+ // If the error is handled, then we abort
+ // if not, we threw out of here
+ this.abort()
+ }
+ if (!this.silent)
+ console.error('glob error', er)
+ break
+ }
+
+ return cb()
+}
+
+Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) {
+ var self = this
+ this._readdir(abs, inGlobStar, function (er, entries) {
+ self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb)
+ })
+}
+
+
+Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {
+ //console.error('pgs2', prefix, remain[0], entries)
+
+ // no entries means not a dir, so it can never have matches
+ // foo.txt/** doesn't match foo.txt
+ if (!entries)
+ return cb()
+
+ // test without the globstar, and with every child both below
+ // and replacing the globstar.
+ var remainWithoutGlobStar = remain.slice(1)
+ var gspref = prefix ? [ prefix ] : []
+ var noGlobStar = gspref.concat(remainWithoutGlobStar)
+
+ // the noGlobStar pattern exits the inGlobStar state
+ this._process(noGlobStar, index, false, cb)
+
+ var isSym = this.symlinks[abs]
+ var len = entries.length
+
+ // If it's a symlink, and we're in a globstar, then stop
+ if (isSym && inGlobStar)
+ return cb()
+
+ for (var i = 0; i < len; i++) {
+ var e = entries[i]
+ if (e.charAt(0) === '.' && !this.dot)
+ continue
+
+ // these two cases enter the inGlobStar state
+ var instead = gspref.concat(entries[i], remainWithoutGlobStar)
+ this._process(instead, index, true, cb)
+
+ var below = gspref.concat(entries[i], remain)
+ this._process(below, index, true, cb)
+ }
+
+ cb()
+}
+
+Glob.prototype._processSimple = function (prefix, index, cb) {
+ // XXX review this. Shouldn't it be doing the mounting etc
+ // before doing stat? kinda weird?
+ var self = this
+ this._stat(prefix, function (er, exists) {
+ self._processSimple2(prefix, index, er, exists, cb)
+ })
+}
+Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) {
+
+ //console.error('ps2', prefix, exists)
+
+ if (!this.matches[index])
+ this.matches[index] = Object.create(null)
+
+ // If it doesn't exist, then just mark the lack of results
+ if (!exists)
+ return cb()
+
+ if (prefix && isAbsolute(prefix) && !this.nomount) {
+ var trail = /[\/\\]$/.test(prefix)
+ if (prefix.charAt(0) === '/') {
+ prefix = path.join(this.root, prefix)
+ } else {
+ prefix = path.resolve(this.root, prefix)
+ if (trail)
+ prefix += '/'
+ }
+ }
+
+ if (process.platform === 'win32')
+ prefix = prefix.replace(/\\/g, '/')
+
+ // Mark this as a match
+ this._emitMatch(index, prefix)
+ cb()
+}
+
+// Returns either 'DIR', 'FILE', or false
+Glob.prototype._stat = function (f, cb) {
+ var abs = this._makeAbs(f)
+ var needDir = f.slice(-1) === '/'
+
+ if (f.length > this.maxLength)
+ return cb()
+
+ if (!this.stat && ownProp(this.cache, abs)) {
+ var c = this.cache[abs]
+
+ if (Array.isArray(c))
+ c = 'DIR'
+
+ // It exists, but maybe not how we need it
+ if (!needDir || c === 'DIR')
+ return cb(null, c)
+
+ if (needDir && c === 'FILE')
+ return cb()
+
+ // otherwise we have to stat, because maybe c=true
+ // if we know it exists, but not what it is.
+ }
+
+ var exists
+ var stat = this.statCache[abs]
+ if (stat !== undefined) {
+ if (stat === false)
+ return cb(null, stat)
+ else {
+ var type = stat.isDirectory() ? 'DIR' : 'FILE'
+ if (needDir && type === 'FILE')
+ return cb()
+ else
+ return cb(null, type, stat)
+ }
+ }
+
+ var self = this
+ var statcb = inflight('stat\0' + abs, lstatcb_)
+ if (statcb)
+ fs.lstat(abs, statcb)
+
+ function lstatcb_ (er, lstat) {
+ if (lstat && lstat.isSymbolicLink()) {
+ // If it's a symlink, then treat it as the target, unless
+ // the target does not exist, then treat it as a file.
+ return fs.stat(abs, function (er, stat) {
+ if (er)
+ self._stat2(f, abs, null, lstat, cb)
+ else
+ self._stat2(f, abs, er, stat, cb)
+ })
+ } else {
+ self._stat2(f, abs, er, lstat, cb)
+ }
+ }
+}
+
+Glob.prototype._stat2 = function (f, abs, er, stat, cb) {
+ if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) {
+ this.statCache[abs] = false
+ return cb()
+ }
+
+ var needDir = f.slice(-1) === '/'
+ this.statCache[abs] = stat
+
+ if (abs.slice(-1) === '/' && stat && !stat.isDirectory())
+ return cb(null, false, stat)
+
+ var c = true
+ if (stat)
+ c = stat.isDirectory() ? 'DIR' : 'FILE'
+ this.cache[abs] = this.cache[abs] || c
+
+ if (needDir && c === 'FILE')
+ return cb()
+
+ return cb(null, c, stat)
+}
diff --git a/tools/node_modules/eslint/node_modules/glob/package.json b/tools/node_modules/eslint/node_modules/glob/package.json
new file mode 100644
index 0000000000..a3a5b99d1b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/glob/package.json
@@ -0,0 +1,78 @@
+{
+ "_from": "glob@^7.1.2",
+ "_id": "glob@7.1.2",
+ "_inBundle": false,
+ "_integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
+ "_location": "/eslint/glob",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "glob@^7.1.2",
+ "name": "glob",
+ "escapedName": "glob",
+ "rawSpec": "^7.1.2",
+ "saveSpec": null,
+ "fetchSpec": "^7.1.2"
+ },
+ "_requiredBy": [
+ "/eslint",
+ "/eslint/globby",
+ "/eslint/rimraf"
+ ],
+ "_resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
+ "_shasum": "c19c9df9a028702d678612384a6552404c636d15",
+ "_spec": "glob@^7.1.2",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "bugs": {
+ "url": "https://github.com/isaacs/node-glob/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.0.4",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "deprecated": false,
+ "description": "a little globber",
+ "devDependencies": {
+ "mkdirp": "0",
+ "rimraf": "^2.2.8",
+ "tap": "^7.1.2",
+ "tick": "0.0.6"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "files": [
+ "glob.js",
+ "sync.js",
+ "common.js"
+ ],
+ "homepage": "https://github.com/isaacs/node-glob#readme",
+ "license": "ISC",
+ "main": "glob.js",
+ "name": "glob",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/node-glob.git"
+ },
+ "scripts": {
+ "bench": "bash benchmark.sh",
+ "benchclean": "node benchclean.js",
+ "prepublish": "npm run benchclean",
+ "prof": "bash prof.sh && cat profile.txt",
+ "profclean": "rm -f v8.log profile.txt",
+ "test": "tap test/*.js --cov",
+ "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js"
+ },
+ "version": "7.1.2"
+}
diff --git a/tools/node_modules/eslint/node_modules/glob/sync.js b/tools/node_modules/eslint/node_modules/glob/sync.js
new file mode 100644
index 0000000000..c952134baa
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/glob/sync.js
@@ -0,0 +1,486 @@
+module.exports = globSync
+globSync.GlobSync = GlobSync
+
+var fs = require('fs')
+var rp = require('fs.realpath')
+var minimatch = require('minimatch')
+var Minimatch = minimatch.Minimatch
+var Glob = require('./glob.js').Glob
+var util = require('util')
+var path = require('path')
+var assert = require('assert')
+var isAbsolute = require('path-is-absolute')
+var common = require('./common.js')
+var alphasort = common.alphasort
+var alphasorti = common.alphasorti
+var setopts = common.setopts
+var ownProp = common.ownProp
+var childrenIgnored = common.childrenIgnored
+var isIgnored = common.isIgnored
+
+function globSync (pattern, options) {
+ if (typeof options === 'function' || arguments.length === 3)
+ throw new TypeError('callback provided to sync glob\n'+
+ 'See: https://github.com/isaacs/node-glob/issues/167')
+
+ return new GlobSync(pattern, options).found
+}
+
+function GlobSync (pattern, options) {
+ if (!pattern)
+ throw new Error('must provide pattern')
+
+ if (typeof options === 'function' || arguments.length === 3)
+ throw new TypeError('callback provided to sync glob\n'+
+ 'See: https://github.com/isaacs/node-glob/issues/167')
+
+ if (!(this instanceof GlobSync))
+ return new GlobSync(pattern, options)
+
+ setopts(this, pattern, options)
+
+ if (this.noprocess)
+ return this
+
+ var n = this.minimatch.set.length
+ this.matches = new Array(n)
+ for (var i = 0; i < n; i ++) {
+ this._process(this.minimatch.set[i], i, false)
+ }
+ this._finish()
+}
+
+GlobSync.prototype._finish = function () {
+ assert(this instanceof GlobSync)
+ if (this.realpath) {
+ var self = this
+ this.matches.forEach(function (matchset, index) {
+ var set = self.matches[index] = Object.create(null)
+ for (var p in matchset) {
+ try {
+ p = self._makeAbs(p)
+ var real = rp.realpathSync(p, self.realpathCache)
+ set[real] = true
+ } catch (er) {
+ if (er.syscall === 'stat')
+ set[self._makeAbs(p)] = true
+ else
+ throw er
+ }
+ }
+ })
+ }
+ common.finish(this)
+}
+
+
+GlobSync.prototype._process = function (pattern, index, inGlobStar) {
+ assert(this instanceof GlobSync)
+
+ // Get the first [n] parts of pattern that are all strings.
+ var n = 0
+ while (typeof pattern[n] === 'string') {
+ n ++
+ }
+ // now n is the index of the first one that is *not* a string.
+
+ // See if there's anything else
+ var prefix
+ switch (n) {
+ // if not, then this is rather simple
+ case pattern.length:
+ this._processSimple(pattern.join('/'), index)
+ return
+
+ case 0:
+ // pattern *starts* with some non-trivial item.
+ // going to readdir(cwd), but not include the prefix in matches.
+ prefix = null
+ break
+
+ default:
+ // pattern has some string bits in the front.
+ // whatever it starts with, whether that's 'absolute' like /foo/bar,
+ // or 'relative' like '../baz'
+ prefix = pattern.slice(0, n).join('/')
+ break
+ }
+
+ var remain = pattern.slice(n)
+
+ // get the list of entries.
+ var read
+ if (prefix === null)
+ read = '.'
+ else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) {
+ if (!prefix || !isAbsolute(prefix))
+ prefix = '/' + prefix
+ read = prefix
+ } else
+ read = prefix
+
+ var abs = this._makeAbs(read)
+
+ //if ignored, skip processing
+ if (childrenIgnored(this, read))
+ return
+
+ var isGlobStar = remain[0] === minimatch.GLOBSTAR
+ if (isGlobStar)
+ this._processGlobStar(prefix, read, abs, remain, index, inGlobStar)
+ else
+ this._processReaddir(prefix, read, abs, remain, index, inGlobStar)
+}
+
+
+GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) {
+ var entries = this._readdir(abs, inGlobStar)
+
+ // if the abs isn't a dir, then nothing can match!
+ if (!entries)
+ return
+
+ // It will only match dot entries if it starts with a dot, or if
+ // dot is set. Stuff like @(.foo|.bar) isn't allowed.
+ var pn = remain[0]
+ var negate = !!this.minimatch.negate
+ var rawGlob = pn._glob
+ var dotOk = this.dot || rawGlob.charAt(0) === '.'
+
+ var matchedEntries = []
+ for (var i = 0; i < entries.length; i++) {
+ var e = entries[i]
+ if (e.charAt(0) !== '.' || dotOk) {
+ var m
+ if (negate && !prefix) {
+ m = !e.match(pn)
+ } else {
+ m = e.match(pn)
+ }
+ if (m)
+ matchedEntries.push(e)
+ }
+ }
+
+ var len = matchedEntries.length
+ // If there are no matched entries, then nothing matches.
+ if (len === 0)
+ return
+
+ // if this is the last remaining pattern bit, then no need for
+ // an additional stat *unless* the user has specified mark or
+ // stat explicitly. We know they exist, since readdir returned
+ // them.
+
+ if (remain.length === 1 && !this.mark && !this.stat) {
+ if (!this.matches[index])
+ this.matches[index] = Object.create(null)
+
+ for (var i = 0; i < len; i ++) {
+ var e = matchedEntries[i]
+ if (prefix) {
+ if (prefix.slice(-1) !== '/')
+ e = prefix + '/' + e
+ else
+ e = prefix + e
+ }
+
+ if (e.charAt(0) === '/' && !this.nomount) {
+ e = path.join(this.root, e)
+ }
+ this._emitMatch(index, e)
+ }
+ // This was the last one, and no stats were needed
+ return
+ }
+
+ // now test all matched entries as stand-ins for that part
+ // of the pattern.
+ remain.shift()
+ for (var i = 0; i < len; i ++) {
+ var e = matchedEntries[i]
+ var newPattern
+ if (prefix)
+ newPattern = [prefix, e]
+ else
+ newPattern = [e]
+ this._process(newPattern.concat(remain), index, inGlobStar)
+ }
+}
+
+
+GlobSync.prototype._emitMatch = function (index, e) {
+ if (isIgnored(this, e))
+ return
+
+ var abs = this._makeAbs(e)
+
+ if (this.mark)
+ e = this._mark(e)
+
+ if (this.absolute) {
+ e = abs
+ }
+
+ if (this.matches[index][e])
+ return
+
+ if (this.nodir) {
+ var c = this.cache[abs]
+ if (c === 'DIR' || Array.isArray(c))
+ return
+ }
+
+ this.matches[index][e] = true
+
+ if (this.stat)
+ this._stat(e)
+}
+
+
+GlobSync.prototype._readdirInGlobStar = function (abs) {
+ // follow all symlinked directories forever
+ // just proceed as if this is a non-globstar situation
+ if (this.follow)
+ return this._readdir(abs, false)
+
+ var entries
+ var lstat
+ var stat
+ try {
+ lstat = fs.lstatSync(abs)
+ } catch (er) {
+ if (er.code === 'ENOENT') {
+ // lstat failed, doesn't exist
+ return null
+ }
+ }
+
+ var isSym = lstat && lstat.isSymbolicLink()
+ this.symlinks[abs] = isSym
+
+ // If it's not a symlink or a dir, then it's definitely a regular file.
+ // don't bother doing a readdir in that case.
+ if (!isSym && lstat && !lstat.isDirectory())
+ this.cache[abs] = 'FILE'
+ else
+ entries = this._readdir(abs, false)
+
+ return entries
+}
+
+GlobSync.prototype._readdir = function (abs, inGlobStar) {
+ var entries
+
+ if (inGlobStar && !ownProp(this.symlinks, abs))
+ return this._readdirInGlobStar(abs)
+
+ if (ownProp(this.cache, abs)) {
+ var c = this.cache[abs]
+ if (!c || c === 'FILE')
+ return null
+
+ if (Array.isArray(c))
+ return c
+ }
+
+ try {
+ return this._readdirEntries(abs, fs.readdirSync(abs))
+ } catch (er) {
+ this._readdirError(abs, er)
+ return null
+ }
+}
+
+GlobSync.prototype._readdirEntries = function (abs, entries) {
+ // if we haven't asked to stat everything, then just
+ // assume that everything in there exists, so we can avoid
+ // having to stat it a second time.
+ if (!this.mark && !this.stat) {
+ for (var i = 0; i < entries.length; i ++) {
+ var e = entries[i]
+ if (abs === '/')
+ e = abs + e
+ else
+ e = abs + '/' + e
+ this.cache[e] = true
+ }
+ }
+
+ this.cache[abs] = entries
+
+ // mark and cache dir-ness
+ return entries
+}
+
+GlobSync.prototype._readdirError = function (f, er) {
+ // handle errors, and cache the information
+ switch (er.code) {
+ case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205
+ case 'ENOTDIR': // totally normal. means it *does* exist.
+ var abs = this._makeAbs(f)
+ this.cache[abs] = 'FILE'
+ if (abs === this.cwdAbs) {
+ var error = new Error(er.code + ' invalid cwd ' + this.cwd)
+ error.path = this.cwd
+ error.code = er.code
+ throw error
+ }
+ break
+
+ case 'ENOENT': // not terribly unusual
+ case 'ELOOP':
+ case 'ENAMETOOLONG':
+ case 'UNKNOWN':
+ this.cache[this._makeAbs(f)] = false
+ break
+
+ default: // some unusual error. Treat as failure.
+ this.cache[this._makeAbs(f)] = false
+ if (this.strict)
+ throw er
+ if (!this.silent)
+ console.error('glob error', er)
+ break
+ }
+}
+
+GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) {
+
+ var entries = this._readdir(abs, inGlobStar)
+
+ // no entries means not a dir, so it can never have matches
+ // foo.txt/** doesn't match foo.txt
+ if (!entries)
+ return
+
+ // test without the globstar, and with every child both below
+ // and replacing the globstar.
+ var remainWithoutGlobStar = remain.slice(1)
+ var gspref = prefix ? [ prefix ] : []
+ var noGlobStar = gspref.concat(remainWithoutGlobStar)
+
+ // the noGlobStar pattern exits the inGlobStar state
+ this._process(noGlobStar, index, false)
+
+ var len = entries.length
+ var isSym = this.symlinks[abs]
+
+ // If it's a symlink, and we're in a globstar, then stop
+ if (isSym && inGlobStar)
+ return
+
+ for (var i = 0; i < len; i++) {
+ var e = entries[i]
+ if (e.charAt(0) === '.' && !this.dot)
+ continue
+
+ // these two cases enter the inGlobStar state
+ var instead = gspref.concat(entries[i], remainWithoutGlobStar)
+ this._process(instead, index, true)
+
+ var below = gspref.concat(entries[i], remain)
+ this._process(below, index, true)
+ }
+}
+
+GlobSync.prototype._processSimple = function (prefix, index) {
+ // XXX review this. Shouldn't it be doing the mounting etc
+ // before doing stat? kinda weird?
+ var exists = this._stat(prefix)
+
+ if (!this.matches[index])
+ this.matches[index] = Object.create(null)
+
+ // If it doesn't exist, then just mark the lack of results
+ if (!exists)
+ return
+
+ if (prefix && isAbsolute(prefix) && !this.nomount) {
+ var trail = /[\/\\]$/.test(prefix)
+ if (prefix.charAt(0) === '/') {
+ prefix = path.join(this.root, prefix)
+ } else {
+ prefix = path.resolve(this.root, prefix)
+ if (trail)
+ prefix += '/'
+ }
+ }
+
+ if (process.platform === 'win32')
+ prefix = prefix.replace(/\\/g, '/')
+
+ // Mark this as a match
+ this._emitMatch(index, prefix)
+}
+
+// Returns either 'DIR', 'FILE', or false
+GlobSync.prototype._stat = function (f) {
+ var abs = this._makeAbs(f)
+ var needDir = f.slice(-1) === '/'
+
+ if (f.length > this.maxLength)
+ return false
+
+ if (!this.stat && ownProp(this.cache, abs)) {
+ var c = this.cache[abs]
+
+ if (Array.isArray(c))
+ c = 'DIR'
+
+ // It exists, but maybe not how we need it
+ if (!needDir || c === 'DIR')
+ return c
+
+ if (needDir && c === 'FILE')
+ return false
+
+ // otherwise we have to stat, because maybe c=true
+ // if we know it exists, but not what it is.
+ }
+
+ var exists
+ var stat = this.statCache[abs]
+ if (!stat) {
+ var lstat
+ try {
+ lstat = fs.lstatSync(abs)
+ } catch (er) {
+ if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) {
+ this.statCache[abs] = false
+ return false
+ }
+ }
+
+ if (lstat && lstat.isSymbolicLink()) {
+ try {
+ stat = fs.statSync(abs)
+ } catch (er) {
+ stat = lstat
+ }
+ } else {
+ stat = lstat
+ }
+ }
+
+ this.statCache[abs] = stat
+
+ var c = true
+ if (stat)
+ c = stat.isDirectory() ? 'DIR' : 'FILE'
+
+ this.cache[abs] = this.cache[abs] || c
+
+ if (needDir && c === 'FILE')
+ return false
+
+ return c
+}
+
+GlobSync.prototype._mark = function (p) {
+ return common.mark(this, p)
+}
+
+GlobSync.prototype._makeAbs = function (f) {
+ return common.makeAbs(this, f)
+}
diff --git a/tools/node_modules/eslint/node_modules/globals/globals.json b/tools/node_modules/eslint/node_modules/globals/globals.json
new file mode 100644
index 0000000000..8c9159a129
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/globals/globals.json
@@ -0,0 +1,1455 @@
+{
+ "builtin": {
+ "Array": false,
+ "ArrayBuffer": false,
+ "Atomics": false,
+ "Boolean": false,
+ "constructor": false,
+ "DataView": false,
+ "Date": false,
+ "decodeURI": false,
+ "decodeURIComponent": false,
+ "encodeURI": false,
+ "encodeURIComponent": false,
+ "Error": false,
+ "escape": false,
+ "eval": false,
+ "EvalError": false,
+ "Float32Array": false,
+ "Float64Array": false,
+ "Function": false,
+ "hasOwnProperty": false,
+ "Infinity": false,
+ "Int16Array": false,
+ "Int32Array": false,
+ "Int8Array": false,
+ "isFinite": false,
+ "isNaN": false,
+ "isPrototypeOf": false,
+ "JSON": false,
+ "Map": false,
+ "Math": false,
+ "NaN": false,
+ "Number": false,
+ "Object": false,
+ "parseFloat": false,
+ "parseInt": false,
+ "Promise": false,
+ "propertyIsEnumerable": false,
+ "Proxy": false,
+ "RangeError": false,
+ "ReferenceError": false,
+ "Reflect": false,
+ "RegExp": false,
+ "Set": false,
+ "SharedArrayBuffer": false,
+ "String": false,
+ "Symbol": false,
+ "SyntaxError": false,
+ "toLocaleString": false,
+ "toString": false,
+ "TypeError": false,
+ "Uint16Array": false,
+ "Uint32Array": false,
+ "Uint8Array": false,
+ "Uint8ClampedArray": false,
+ "undefined": false,
+ "unescape": false,
+ "URIError": false,
+ "valueOf": false,
+ "WeakMap": false,
+ "WeakSet": false
+ },
+ "es5": {
+ "Array": false,
+ "Boolean": false,
+ "constructor": false,
+ "Date": false,
+ "decodeURI": false,
+ "decodeURIComponent": false,
+ "encodeURI": false,
+ "encodeURIComponent": false,
+ "Error": false,
+ "escape": false,
+ "eval": false,
+ "EvalError": false,
+ "Function": false,
+ "hasOwnProperty": false,
+ "Infinity": false,
+ "isFinite": false,
+ "isNaN": false,
+ "isPrototypeOf": false,
+ "JSON": false,
+ "Math": false,
+ "NaN": false,
+ "Number": false,
+ "Object": false,
+ "parseFloat": false,
+ "parseInt": false,
+ "propertyIsEnumerable": false,
+ "RangeError": false,
+ "ReferenceError": false,
+ "RegExp": false,
+ "String": false,
+ "SyntaxError": false,
+ "toLocaleString": false,
+ "toString": false,
+ "TypeError": false,
+ "undefined": false,
+ "unescape": false,
+ "URIError": false,
+ "valueOf": false
+ },
+ "es2015": {
+ "Array": false,
+ "ArrayBuffer": false,
+ "Boolean": false,
+ "constructor": false,
+ "DataView": false,
+ "Date": false,
+ "decodeURI": false,
+ "decodeURIComponent": false,
+ "encodeURI": false,
+ "encodeURIComponent": false,
+ "Error": false,
+ "escape": false,
+ "eval": false,
+ "EvalError": false,
+ "Float32Array": false,
+ "Float64Array": false,
+ "Function": false,
+ "hasOwnProperty": false,
+ "Infinity": false,
+ "Int16Array": false,
+ "Int32Array": false,
+ "Int8Array": false,
+ "isFinite": false,
+ "isNaN": false,
+ "isPrototypeOf": false,
+ "JSON": false,
+ "Map": false,
+ "Math": false,
+ "NaN": false,
+ "Number": false,
+ "Object": false,
+ "parseFloat": false,
+ "parseInt": false,
+ "Promise": false,
+ "propertyIsEnumerable": false,
+ "Proxy": false,
+ "RangeError": false,
+ "ReferenceError": false,
+ "Reflect": false,
+ "RegExp": false,
+ "Set": false,
+ "String": false,
+ "Symbol": false,
+ "SyntaxError": false,
+ "toLocaleString": false,
+ "toString": false,
+ "TypeError": false,
+ "Uint16Array": false,
+ "Uint32Array": false,
+ "Uint8Array": false,
+ "Uint8ClampedArray": false,
+ "undefined": false,
+ "unescape": false,
+ "URIError": false,
+ "valueOf": false,
+ "WeakMap": false,
+ "WeakSet": false
+ },
+ "es2017": {
+ "Array": false,
+ "ArrayBuffer": false,
+ "Atomics": false,
+ "Boolean": false,
+ "constructor": false,
+ "DataView": false,
+ "Date": false,
+ "decodeURI": false,
+ "decodeURIComponent": false,
+ "encodeURI": false,
+ "encodeURIComponent": false,
+ "Error": false,
+ "escape": false,
+ "eval": false,
+ "EvalError": false,
+ "Float32Array": false,
+ "Float64Array": false,
+ "Function": false,
+ "hasOwnProperty": false,
+ "Infinity": false,
+ "Int16Array": false,
+ "Int32Array": false,
+ "Int8Array": false,
+ "isFinite": false,
+ "isNaN": false,
+ "isPrototypeOf": false,
+ "JSON": false,
+ "Map": false,
+ "Math": false,
+ "NaN": false,
+ "Number": false,
+ "Object": false,
+ "parseFloat": false,
+ "parseInt": false,
+ "Promise": false,
+ "propertyIsEnumerable": false,
+ "Proxy": false,
+ "RangeError": false,
+ "ReferenceError": false,
+ "Reflect": false,
+ "RegExp": false,
+ "Set": false,
+ "SharedArrayBuffer": false,
+ "String": false,
+ "Symbol": false,
+ "SyntaxError": false,
+ "toLocaleString": false,
+ "toString": false,
+ "TypeError": false,
+ "Uint16Array": false,
+ "Uint32Array": false,
+ "Uint8Array": false,
+ "Uint8ClampedArray": false,
+ "undefined": false,
+ "unescape": false,
+ "URIError": false,
+ "valueOf": false,
+ "WeakMap": false,
+ "WeakSet": false
+ },
+ "browser": {
+ "addEventListener": false,
+ "alert": false,
+ "AnalyserNode": false,
+ "Animation": false,
+ "AnimationEffectReadOnly": false,
+ "AnimationEffectTiming": false,
+ "AnimationEffectTimingReadOnly": false,
+ "AnimationEvent": false,
+ "AnimationPlaybackEvent": false,
+ "AnimationTimeline": false,
+ "applicationCache": false,
+ "ApplicationCache": false,
+ "ApplicationCacheErrorEvent": false,
+ "atob": false,
+ "Attr": false,
+ "Audio": false,
+ "AudioBuffer": false,
+ "AudioBufferSourceNode": false,
+ "AudioContext": false,
+ "AudioDestinationNode": false,
+ "AudioListener": false,
+ "AudioNode": false,
+ "AudioParam": false,
+ "AudioProcessingEvent": false,
+ "AudioScheduledSourceNode": false,
+ "BarProp": false,
+ "BaseAudioContext": false,
+ "BatteryManager": false,
+ "BeforeUnloadEvent": false,
+ "BiquadFilterNode": false,
+ "Blob": false,
+ "blur": false,
+ "btoa": false,
+ "BlobEvent": false,
+ "BroadcastChannel": false,
+ "BudgetService": false,
+ "ByteLengthQueuingStrategy": false,
+ "Cache": false,
+ "caches": false,
+ "CacheStorage": false,
+ "cancelAnimationFrame": false,
+ "cancelIdleCallback": false,
+ "CanvasCaptureMediaStreamTrack": false,
+ "CanvasGradient": false,
+ "CanvasPattern": false,
+ "CanvasRenderingContext2D": false,
+ "ChannelMergerNode": false,
+ "ChannelSplitterNode": false,
+ "CharacterData": false,
+ "clearInterval": false,
+ "clearTimeout": false,
+ "clientInformation": false,
+ "ClipboardEvent": false,
+ "close": false,
+ "closed": false,
+ "CloseEvent": false,
+ "Comment": false,
+ "CompositionEvent": false,
+ "confirm": false,
+ "console": false,
+ "ConstantSourceNode": false,
+ "ConvolverNode": false,
+ "createImageBitmap": false,
+ "Credential": false,
+ "CredentialsContainer": false,
+ "CountQueuingStrategy": false,
+ "Crypto": false,
+ "crypto": false,
+ "CryptoKey": false,
+ "CSS": false,
+ "CSSConditionRule": false,
+ "CSSFontFaceRule": false,
+ "CSSGroupingRule": false,
+ "CSSImportRule": false,
+ "CSSKeyframeRule": false,
+ "CSSKeyframesRule": false,
+ "CSSMediaRule": false,
+ "CSSNamespaceRule": false,
+ "CSSPageRule": false,
+ "CSSRule": false,
+ "CSSRuleList": false,
+ "CSSStyleDeclaration": false,
+ "CSSStyleRule": false,
+ "CSSStyleSheet": false,
+ "CSSSupportsRule": false,
+ "CustomElementRegistry": false,
+ "customElements": false,
+ "CustomEvent": false,
+ "DataTransfer": false,
+ "DataTransferItem": false,
+ "DataTransferItemList": false,
+ "defaultStatus": false,
+ "defaultstatus": false,
+ "DelayNode": false,
+ "DeviceMotionEvent": false,
+ "DeviceOrientationEvent": false,
+ "devicePixelRatio": false,
+ "dispatchEvent": false,
+ "document": false,
+ "Document": false,
+ "DocumentFragment": false,
+ "DocumentType": false,
+ "DOMError": false,
+ "DOMException": false,
+ "DOMImplementation": false,
+ "DOMMatrix": false,
+ "DOMMatrixReadOnly": false,
+ "DOMParser": false,
+ "DOMPoint": false,
+ "DOMPointReadOnly": false,
+ "DOMQuad": false,
+ "DOMRect": false,
+ "DOMRectReadOnly": false,
+ "DOMStringList": false,
+ "DOMStringMap": false,
+ "DOMTokenList": false,
+ "DragEvent": false,
+ "DynamicsCompressorNode": false,
+ "Element": false,
+ "ErrorEvent": false,
+ "event": false,
+ "Event": false,
+ "EventSource": false,
+ "EventTarget": false,
+ "external": false,
+ "fetch": false,
+ "File": false,
+ "FileList": false,
+ "FileReader": false,
+ "find": false,
+ "focus": false,
+ "FocusEvent": false,
+ "FontFace": false,
+ "FontFaceSetLoadEvent": false,
+ "FormData": false,
+ "frameElement": false,
+ "frames": false,
+ "GainNode": false,
+ "Gamepad": false,
+ "GamepadButton": false,
+ "GamepadEvent": false,
+ "getComputedStyle": false,
+ "getSelection": false,
+ "HashChangeEvent": false,
+ "Headers": false,
+ "history": false,
+ "History": false,
+ "HTMLAllCollection": false,
+ "HTMLAnchorElement": false,
+ "HTMLAreaElement": false,
+ "HTMLAudioElement": false,
+ "HTMLBaseElement": false,
+ "HTMLBodyElement": false,
+ "HTMLBRElement": false,
+ "HTMLButtonElement": false,
+ "HTMLCanvasElement": false,
+ "HTMLCollection": false,
+ "HTMLContentElement": false,
+ "HTMLDataElement": false,
+ "HTMLDataListElement": false,
+ "HTMLDetailsElement": false,
+ "HTMLDialogElement": false,
+ "HTMLDirectoryElement": false,
+ "HTMLDivElement": false,
+ "HTMLDListElement": false,
+ "HTMLDocument": false,
+ "HTMLElement": false,
+ "HTMLEmbedElement": false,
+ "HTMLFieldSetElement": false,
+ "HTMLFontElement": false,
+ "HTMLFormControlsCollection": false,
+ "HTMLFormElement": false,
+ "HTMLFrameElement": false,
+ "HTMLFrameSetElement": false,
+ "HTMLHeadElement": false,
+ "HTMLHeadingElement": false,
+ "HTMLHRElement": false,
+ "HTMLHtmlElement": false,
+ "HTMLIFrameElement": false,
+ "HTMLImageElement": false,
+ "HTMLInputElement": false,
+ "HTMLLabelElement": false,
+ "HTMLLegendElement": false,
+ "HTMLLIElement": false,
+ "HTMLLinkElement": false,
+ "HTMLMapElement": false,
+ "HTMLMarqueeElement": false,
+ "HTMLMediaElement": false,
+ "HTMLMenuElement": false,
+ "HTMLMetaElement": false,
+ "HTMLMeterElement": false,
+ "HTMLModElement": false,
+ "HTMLObjectElement": false,
+ "HTMLOListElement": false,
+ "HTMLOptGroupElement": false,
+ "HTMLOptionElement": false,
+ "HTMLOptionsCollection": false,
+ "HTMLOutputElement": false,
+ "HTMLParagraphElement": false,
+ "HTMLParamElement": false,
+ "HTMLPictureElement": false,
+ "HTMLPreElement": false,
+ "HTMLProgressElement": false,
+ "HTMLQuoteElement": false,
+ "HTMLScriptElement": false,
+ "HTMLSelectElement": false,
+ "HTMLShadowElement": false,
+ "HTMLSlotElement": false,
+ "HTMLSourceElement": false,
+ "HTMLSpanElement": false,
+ "HTMLStyleElement": false,
+ "HTMLTableCaptionElement": false,
+ "HTMLTableCellElement": false,
+ "HTMLTableColElement": false,
+ "HTMLTableElement": false,
+ "HTMLTableRowElement": false,
+ "HTMLTableSectionElement": false,
+ "HTMLTemplateElement": false,
+ "HTMLTextAreaElement": false,
+ "HTMLTimeElement": false,
+ "HTMLTitleElement": false,
+ "HTMLTrackElement": false,
+ "HTMLUListElement": false,
+ "HTMLUnknownElement": false,
+ "HTMLVideoElement": false,
+ "IDBCursor": false,
+ "IDBCursorWithValue": false,
+ "IDBDatabase": false,
+ "IDBFactory": false,
+ "IDBIndex": false,
+ "IDBKeyRange": false,
+ "IDBObjectStore": false,
+ "IDBOpenDBRequest": false,
+ "IDBRequest": false,
+ "IDBTransaction": false,
+ "IDBVersionChangeEvent": false,
+ "IdleDeadline": false,
+ "IIRFilterNode": false,
+ "Image": false,
+ "ImageBitmap": false,
+ "ImageBitmapRenderingContext": false,
+ "ImageCapture": false,
+ "ImageData": false,
+ "indexedDB": false,
+ "innerHeight": false,
+ "innerWidth": false,
+ "InputEvent": false,
+ "IntersectionObserver": false,
+ "IntersectionObserverEntry": false,
+ "Intl": false,
+ "isSecureContext": false,
+ "KeyboardEvent": false,
+ "KeyframeEffect": false,
+ "KeyframeEffectReadOnly": false,
+ "length": false,
+ "localStorage": false,
+ "location": false,
+ "Location": false,
+ "locationbar": false,
+ "matchMedia": false,
+ "MediaDeviceInfo": false,
+ "MediaDevices": false,
+ "MediaElementAudioSourceNode": false,
+ "MediaEncryptedEvent": false,
+ "MediaError": false,
+ "MediaKeyMessageEvent": false,
+ "MediaKeySession": false,
+ "MediaKeyStatusMap": false,
+ "MediaKeySystemAccess": false,
+ "MediaList": false,
+ "MediaQueryList": false,
+ "MediaQueryListEvent": false,
+ "MediaSource": false,
+ "MediaRecorder": false,
+ "MediaSettingsRange": false,
+ "MediaStream": false,
+ "MediaStreamAudioDestinationNode": false,
+ "MediaStreamAudioSourceNode": false,
+ "MediaStreamEvent": false,
+ "MediaStreamTrack": false,
+ "MediaStreamTrackEvent": false,
+ "menubar": false,
+ "MessageChannel": false,
+ "MessageEvent": false,
+ "MessagePort": false,
+ "MIDIAccess": false,
+ "MIDIConnectionEvent": false,
+ "MIDIInput": false,
+ "MIDIInputMap": false,
+ "MIDIMessageEvent": false,
+ "MIDIOutput": false,
+ "MIDIOutputMap": false,
+ "MIDIPort": false,
+ "MimeType": false,
+ "MimeTypeArray": false,
+ "MouseEvent": false,
+ "moveBy": false,
+ "moveTo": false,
+ "MutationEvent": false,
+ "MutationObserver": false,
+ "MutationRecord": false,
+ "name": false,
+ "NamedNodeMap": false,
+ "NavigationPreloadManager": false,
+ "navigator": false,
+ "Navigator": false,
+ "NetworkInformation": false,
+ "Node": false,
+ "NodeFilter": false,
+ "NodeIterator": false,
+ "NodeList": false,
+ "Notification": false,
+ "OfflineAudioCompletionEvent": false,
+ "OfflineAudioContext": false,
+ "offscreenBuffering": false,
+ "onabort": true,
+ "onafterprint": true,
+ "onanimationend": true,
+ "onanimationiteration": true,
+ "onanimationstart": true,
+ "onappinstalled": true,
+ "onauxclick": true,
+ "onbeforeinstallprompt": true,
+ "onbeforeprint": true,
+ "onbeforeunload": true,
+ "onblur": true,
+ "oncancel": true,
+ "oncanplay": true,
+ "oncanplaythrough": true,
+ "onchange": true,
+ "onclick": true,
+ "onclose": true,
+ "oncontextmenu": true,
+ "oncuechange": true,
+ "ondblclick": true,
+ "ondevicemotion": true,
+ "ondeviceorientation": true,
+ "ondeviceorientationabsolute": true,
+ "ondrag": true,
+ "ondragend": true,
+ "ondragenter": true,
+ "ondragleave": true,
+ "ondragover": true,
+ "ondragstart": true,
+ "ondrop": true,
+ "ondurationchange": true,
+ "onemptied": true,
+ "onended": true,
+ "onerror": true,
+ "onfocus": true,
+ "ongotpointercapture": true,
+ "onhashchange": true,
+ "oninput": true,
+ "oninvalid": true,
+ "onkeydown": true,
+ "onkeypress": true,
+ "onkeyup": true,
+ "onlanguagechange": true,
+ "onload": true,
+ "onloadeddata": true,
+ "onloadedmetadata": true,
+ "onloadstart": true,
+ "onlostpointercapture": true,
+ "onmessage": true,
+ "onmessageerror": true,
+ "onmousedown": true,
+ "onmouseenter": true,
+ "onmouseleave": true,
+ "onmousemove": true,
+ "onmouseout": true,
+ "onmouseover": true,
+ "onmouseup": true,
+ "onmousewheel": true,
+ "onoffline": true,
+ "ononline": true,
+ "onpagehide": true,
+ "onpageshow": true,
+ "onpause": true,
+ "onplay": true,
+ "onplaying": true,
+ "onpointercancel": true,
+ "onpointerdown": true,
+ "onpointerenter": true,
+ "onpointerleave": true,
+ "onpointermove": true,
+ "onpointerout": true,
+ "onpointerover": true,
+ "onpointerup": true,
+ "onpopstate": true,
+ "onprogress": true,
+ "onratechange": true,
+ "onrejectionhandled": true,
+ "onreset": true,
+ "onresize": true,
+ "onscroll": true,
+ "onsearch": true,
+ "onseeked": true,
+ "onseeking": true,
+ "onselect": true,
+ "onstalled": true,
+ "onstorage": true,
+ "onsubmit": true,
+ "onsuspend": true,
+ "ontimeupdate": true,
+ "ontoggle": true,
+ "ontransitionend": true,
+ "onunhandledrejection": true,
+ "onunload": true,
+ "onvolumechange": true,
+ "onwaiting": true,
+ "onwheel": true,
+ "open": false,
+ "openDatabase": false,
+ "opener": false,
+ "Option": false,
+ "origin": false,
+ "OscillatorNode": false,
+ "outerHeight": false,
+ "outerWidth": false,
+ "PageTransitionEvent": false,
+ "pageXOffset": false,
+ "pageYOffset": false,
+ "PannerNode": false,
+ "parent": false,
+ "Path2D": false,
+ "PaymentAddress": false,
+ "PaymentRequest": false,
+ "PaymentRequestUpdateEvent": false,
+ "PaymentResponse": false,
+ "performance": false,
+ "Performance": false,
+ "PerformanceEntry": false,
+ "PerformanceLongTaskTiming": false,
+ "PerformanceMark": false,
+ "PerformanceMeasure": false,
+ "PerformanceNavigation": false,
+ "PerformanceNavigationTiming": false,
+ "PerformanceObserver": false,
+ "PerformanceObserverEntryList": false,
+ "PerformancePaintTiming": false,
+ "PerformanceResourceTiming": false,
+ "PerformanceTiming": false,
+ "PeriodicWave": false,
+ "Permissions": false,
+ "PermissionStatus": false,
+ "personalbar": false,
+ "PhotoCapabilities": false,
+ "Plugin": false,
+ "PluginArray": false,
+ "PointerEvent": false,
+ "PopStateEvent": false,
+ "postMessage": false,
+ "Presentation": false,
+ "PresentationAvailability": false,
+ "PresentationConnection": false,
+ "PresentationConnectionAvailableEvent": false,
+ "PresentationConnectionCloseEvent": false,
+ "PresentationConnectionList": false,
+ "PresentationReceiver": false,
+ "PresentationRequest": false,
+ "print": false,
+ "ProcessingInstruction": false,
+ "ProgressEvent": false,
+ "PromiseRejectionEvent": false,
+ "prompt": false,
+ "PushManager": false,
+ "PushSubscription": false,
+ "PushSubscriptionOptions": false,
+ "RadioNodeList": false,
+ "Range": false,
+ "ReadableStream": false,
+ "removeEventListener": false,
+ "RemotePlayback": false,
+ "Request": false,
+ "requestAnimationFrame": false,
+ "requestIdleCallback": false,
+ "resizeBy": false,
+ "ResizeObserver": false,
+ "ResizeObserverEntry": false,
+ "resizeTo": false,
+ "Response": false,
+ "RTCCertificate": false,
+ "RTCDataChannel": false,
+ "RTCDataChannelEvent": false,
+ "RTCIceCandidate": false,
+ "RTCPeerConnection": false,
+ "RTCPeerConnectionIceEvent": false,
+ "RTCRtpContributingSource": false,
+ "RTCRtpReceiver": false,
+ "RTCSessionDescription": false,
+ "RTCStatsReport": false,
+ "screen": false,
+ "Screen": false,
+ "screenLeft": false,
+ "ScreenOrientation": false,
+ "screenTop": false,
+ "screenX": false,
+ "screenY": false,
+ "ScriptProcessorNode": false,
+ "scroll": false,
+ "scrollbars": false,
+ "scrollBy": false,
+ "scrollTo": false,
+ "scrollX": false,
+ "scrollY": false,
+ "SecurityPolicyViolationEvent": false,
+ "Selection": false,
+ "self": false,
+ "ServiceWorker": false,
+ "ServiceWorkerContainer": false,
+ "ServiceWorkerRegistration": false,
+ "sessionStorage": false,
+ "setInterval": false,
+ "setTimeout": false,
+ "ShadowRoot": false,
+ "SharedWorker": false,
+ "SourceBuffer": false,
+ "SourceBufferList": false,
+ "speechSynthesis": false,
+ "SpeechSynthesisEvent": false,
+ "SpeechSynthesisUtterance": false,
+ "StaticRange": false,
+ "status": false,
+ "statusbar": false,
+ "StereoPannerNode": false,
+ "stop": false,
+ "Storage": false,
+ "StorageEvent": false,
+ "StorageManager": false,
+ "styleMedia": false,
+ "StyleSheet": false,
+ "StyleSheetList": false,
+ "SubtleCrypto": false,
+ "SVGAElement": false,
+ "SVGAngle": false,
+ "SVGAnimatedAngle": false,
+ "SVGAnimatedBoolean": false,
+ "SVGAnimatedEnumeration": false,
+ "SVGAnimatedInteger": false,
+ "SVGAnimatedLength": false,
+ "SVGAnimatedLengthList": false,
+ "SVGAnimatedNumber": false,
+ "SVGAnimatedNumberList": false,
+ "SVGAnimatedPreserveAspectRatio": false,
+ "SVGAnimatedRect": false,
+ "SVGAnimatedString": false,
+ "SVGAnimatedTransformList": false,
+ "SVGAnimateElement": false,
+ "SVGAnimateMotionElement": false,
+ "SVGAnimateTransformElement": false,
+ "SVGAnimationElement": false,
+ "SVGCircleElement": false,
+ "SVGClipPathElement": false,
+ "SVGComponentTransferFunctionElement": false,
+ "SVGDefsElement": false,
+ "SVGDescElement": false,
+ "SVGDiscardElement": false,
+ "SVGElement": false,
+ "SVGEllipseElement": false,
+ "SVGFEBlendElement": false,
+ "SVGFEColorMatrixElement": false,
+ "SVGFEComponentTransferElement": false,
+ "SVGFECompositeElement": false,
+ "SVGFEConvolveMatrixElement": false,
+ "SVGFEDiffuseLightingElement": false,
+ "SVGFEDisplacementMapElement": false,
+ "SVGFEDistantLightElement": false,
+ "SVGFEDropShadowElement": false,
+ "SVGFEFloodElement": false,
+ "SVGFEFuncAElement": false,
+ "SVGFEFuncBElement": false,
+ "SVGFEFuncGElement": false,
+ "SVGFEFuncRElement": false,
+ "SVGFEGaussianBlurElement": false,
+ "SVGFEImageElement": false,
+ "SVGFEMergeElement": false,
+ "SVGFEMergeNodeElement": false,
+ "SVGFEMorphologyElement": false,
+ "SVGFEOffsetElement": false,
+ "SVGFEPointLightElement": false,
+ "SVGFESpecularLightingElement": false,
+ "SVGFESpotLightElement": false,
+ "SVGFETileElement": false,
+ "SVGFETurbulenceElement": false,
+ "SVGFilterElement": false,
+ "SVGForeignObjectElement": false,
+ "SVGGElement": false,
+ "SVGGeometryElement": false,
+ "SVGGradientElement": false,
+ "SVGGraphicsElement": false,
+ "SVGImageElement": false,
+ "SVGLength": false,
+ "SVGLengthList": false,
+ "SVGLinearGradientElement": false,
+ "SVGLineElement": false,
+ "SVGMarkerElement": false,
+ "SVGMaskElement": false,
+ "SVGMatrix": false,
+ "SVGMetadataElement": false,
+ "SVGMPathElement": false,
+ "SVGNumber": false,
+ "SVGNumberList": false,
+ "SVGPathElement": false,
+ "SVGPatternElement": false,
+ "SVGPoint": false,
+ "SVGPointList": false,
+ "SVGPolygonElement": false,
+ "SVGPolylineElement": false,
+ "SVGPreserveAspectRatio": false,
+ "SVGRadialGradientElement": false,
+ "SVGRect": false,
+ "SVGRectElement": false,
+ "SVGScriptElement": false,
+ "SVGSetElement": false,
+ "SVGStopElement": false,
+ "SVGStringList": false,
+ "SVGStyleElement": false,
+ "SVGSVGElement": false,
+ "SVGSwitchElement": false,
+ "SVGSymbolElement": false,
+ "SVGTextContentElement": false,
+ "SVGTextElement": false,
+ "SVGTextPathElement": false,
+ "SVGTextPositioningElement": false,
+ "SVGTitleElement": false,
+ "SVGTransform": false,
+ "SVGTransformList": false,
+ "SVGTSpanElement": false,
+ "SVGUnitTypes": false,
+ "SVGUseElement": false,
+ "SVGViewElement": false,
+ "TaskAttributionTiming": false,
+ "Text": false,
+ "TextDecoder": false,
+ "TextEncoder": false,
+ "TextEvent": false,
+ "TextMetrics": false,
+ "TextTrack": false,
+ "TextTrackCue": false,
+ "TextTrackCueList": false,
+ "TextTrackList": false,
+ "TimeRanges": false,
+ "toolbar": false,
+ "top": false,
+ "Touch": false,
+ "TouchEvent": false,
+ "TouchList": false,
+ "TrackEvent": false,
+ "TransitionEvent": false,
+ "TreeWalker": false,
+ "UIEvent": false,
+ "URL": false,
+ "URLSearchParams": false,
+ "ValidityState": false,
+ "VisualViewport": false,
+ "visualViewport": false,
+ "VTTCue": false,
+ "WaveShaperNode": false,
+ "WebAssembly": false,
+ "WebGL2RenderingContext": false,
+ "WebGLActiveInfo": false,
+ "WebGLBuffer": false,
+ "WebGLContextEvent": false,
+ "WebGLFramebuffer": false,
+ "WebGLProgram": false,
+ "WebGLQuery": false,
+ "WebGLRenderbuffer": false,
+ "WebGLRenderingContext": false,
+ "WebGLSampler": false,
+ "WebGLShader": false,
+ "WebGLShaderPrecisionFormat": false,
+ "WebGLSync": false,
+ "WebGLTexture": false,
+ "WebGLTransformFeedback": false,
+ "WebGLUniformLocation": false,
+ "WebGLVertexArrayObject": false,
+ "WebSocket": false,
+ "WheelEvent": false,
+ "Window": false,
+ "window": false,
+ "Worker": false,
+ "WritableStream": false,
+ "XMLDocument": false,
+ "XMLHttpRequest": false,
+ "XMLHttpRequestEventTarget": false,
+ "XMLHttpRequestUpload": false,
+ "XMLSerializer": false,
+ "XPathEvaluator": false,
+ "XPathExpression": false,
+ "XPathResult": false,
+ "XSLTProcessor": false
+ },
+ "worker": {
+ "applicationCache": false,
+ "atob": false,
+ "Blob": false,
+ "BroadcastChannel": false,
+ "btoa": false,
+ "Cache": false,
+ "caches": false,
+ "clearInterval": false,
+ "clearTimeout": false,
+ "close": true,
+ "console": false,
+ "fetch": false,
+ "FileReaderSync": false,
+ "FormData": false,
+ "Headers": false,
+ "IDBCursor": false,
+ "IDBCursorWithValue": false,
+ "IDBDatabase": false,
+ "IDBFactory": false,
+ "IDBIndex": false,
+ "IDBKeyRange": false,
+ "IDBObjectStore": false,
+ "IDBOpenDBRequest": false,
+ "IDBRequest": false,
+ "IDBTransaction": false,
+ "IDBVersionChangeEvent": false,
+ "ImageData": false,
+ "importScripts": true,
+ "indexedDB": false,
+ "location": false,
+ "MessageChannel": false,
+ "MessagePort": false,
+ "name": false,
+ "navigator": false,
+ "Notification": false,
+ "onclose": true,
+ "onconnect": true,
+ "onerror": true,
+ "onlanguagechange": true,
+ "onmessage": true,
+ "onoffline": true,
+ "ononline": true,
+ "onrejectionhandled": true,
+ "onunhandledrejection": true,
+ "performance": false,
+ "Performance": false,
+ "PerformanceEntry": false,
+ "PerformanceMark": false,
+ "PerformanceMeasure": false,
+ "PerformanceNavigation": false,
+ "PerformanceResourceTiming": false,
+ "PerformanceTiming": false,
+ "postMessage": true,
+ "Promise": false,
+ "Request": false,
+ "Response": false,
+ "self": true,
+ "ServiceWorkerRegistration": false,
+ "setInterval": false,
+ "setTimeout": false,
+ "TextDecoder": false,
+ "TextEncoder": false,
+ "URL": false,
+ "URLSearchParams": false,
+ "WebSocket": false,
+ "Worker": false,
+ "XMLHttpRequest": false
+ },
+ "node": {
+ "__dirname": false,
+ "__filename": false,
+ "Buffer": false,
+ "clearImmediate": false,
+ "clearInterval": false,
+ "clearTimeout": false,
+ "console": false,
+ "exports": true,
+ "global": false,
+ "Intl": false,
+ "module": false,
+ "process": false,
+ "require": false,
+ "setImmediate": false,
+ "setInterval": false,
+ "setTimeout": false
+ },
+ "commonjs": {
+ "exports": true,
+ "module": false,
+ "require": false,
+ "global": false
+ },
+ "amd": {
+ "define": false,
+ "require": false
+ },
+ "mocha": {
+ "after": false,
+ "afterEach": false,
+ "before": false,
+ "beforeEach": false,
+ "context": false,
+ "describe": false,
+ "it": false,
+ "mocha": false,
+ "run": false,
+ "setup": false,
+ "specify": false,
+ "suite": false,
+ "suiteSetup": false,
+ "suiteTeardown": false,
+ "teardown": false,
+ "test": false,
+ "xcontext": false,
+ "xdescribe": false,
+ "xit": false,
+ "xspecify": false
+ },
+ "jasmine": {
+ "afterAll": false,
+ "afterEach": false,
+ "beforeAll": false,
+ "beforeEach": false,
+ "describe": false,
+ "expect": false,
+ "fail": false,
+ "fdescribe": false,
+ "fit": false,
+ "it": false,
+ "jasmine": false,
+ "pending": false,
+ "runs": false,
+ "spyOn": false,
+ "spyOnProperty": false,
+ "waits": false,
+ "waitsFor": false,
+ "xdescribe": false,
+ "xit": false
+ },
+ "jest": {
+ "afterAll": false,
+ "afterEach": false,
+ "beforeAll": false,
+ "beforeEach": false,
+ "describe": false,
+ "expect": false,
+ "it": false,
+ "fdescribe": false,
+ "fit": false,
+ "jest": false,
+ "pit": false,
+ "require": false,
+ "test": false,
+ "xdescribe": false,
+ "xit": false,
+ "xtest": false
+ },
+ "qunit": {
+ "asyncTest": false,
+ "deepEqual": false,
+ "equal": false,
+ "expect": false,
+ "module": false,
+ "notDeepEqual": false,
+ "notEqual": false,
+ "notOk": false,
+ "notPropEqual": false,
+ "notStrictEqual": false,
+ "ok": false,
+ "propEqual": false,
+ "QUnit": false,
+ "raises": false,
+ "start": false,
+ "stop": false,
+ "strictEqual": false,
+ "test": false,
+ "throws": false
+ },
+ "phantomjs": {
+ "console": true,
+ "exports": true,
+ "phantom": true,
+ "require": true,
+ "WebPage": true
+ },
+ "couch": {
+ "emit": false,
+ "exports": false,
+ "getRow": false,
+ "log": false,
+ "module": false,
+ "provides": false,
+ "require": false,
+ "respond": false,
+ "send": false,
+ "start": false,
+ "sum": false
+ },
+ "rhino": {
+ "defineClass": false,
+ "deserialize": false,
+ "gc": false,
+ "help": false,
+ "importClass": false,
+ "importPackage": false,
+ "java": false,
+ "load": false,
+ "loadClass": false,
+ "Packages": false,
+ "print": false,
+ "quit": false,
+ "readFile": false,
+ "readUrl": false,
+ "runCommand": false,
+ "seal": false,
+ "serialize": false,
+ "spawn": false,
+ "sync": false,
+ "toint32": false,
+ "version": false
+ },
+ "nashorn": {
+ "__DIR__": false,
+ "__FILE__": false,
+ "__LINE__": false,
+ "com": false,
+ "edu": false,
+ "exit": false,
+ "Java": false,
+ "java": false,
+ "javafx": false,
+ "JavaImporter": false,
+ "javax": false,
+ "JSAdapter": false,
+ "load": false,
+ "loadWithNewGlobal": false,
+ "org": false,
+ "Packages": false,
+ "print": false,
+ "quit": false
+ },
+ "wsh": {
+ "ActiveXObject": true,
+ "Enumerator": true,
+ "GetObject": true,
+ "ScriptEngine": true,
+ "ScriptEngineBuildVersion": true,
+ "ScriptEngineMajorVersion": true,
+ "ScriptEngineMinorVersion": true,
+ "VBArray": true,
+ "WScript": true,
+ "WSH": true,
+ "XDomainRequest": true
+ },
+ "jquery": {
+ "$": false,
+ "jQuery": false
+ },
+ "yui": {
+ "Y": false,
+ "YUI": false,
+ "YUI_config": false
+ },
+ "shelljs": {
+ "cat": false,
+ "cd": false,
+ "chmod": false,
+ "config": false,
+ "cp": false,
+ "dirs": false,
+ "echo": false,
+ "env": false,
+ "error": false,
+ "exec": false,
+ "exit": false,
+ "find": false,
+ "grep": false,
+ "ls": false,
+ "ln": false,
+ "mkdir": false,
+ "mv": false,
+ "popd": false,
+ "pushd": false,
+ "pwd": false,
+ "rm": false,
+ "sed": false,
+ "set": false,
+ "target": false,
+ "tempdir": false,
+ "test": false,
+ "touch": false,
+ "which": false
+ },
+ "prototypejs": {
+ "$": false,
+ "$$": false,
+ "$A": false,
+ "$break": false,
+ "$continue": false,
+ "$F": false,
+ "$H": false,
+ "$R": false,
+ "$w": false,
+ "Abstract": false,
+ "Ajax": false,
+ "Autocompleter": false,
+ "Builder": false,
+ "Class": false,
+ "Control": false,
+ "Draggable": false,
+ "Draggables": false,
+ "Droppables": false,
+ "Effect": false,
+ "Element": false,
+ "Enumerable": false,
+ "Event": false,
+ "Field": false,
+ "Form": false,
+ "Hash": false,
+ "Insertion": false,
+ "ObjectRange": false,
+ "PeriodicalExecuter": false,
+ "Position": false,
+ "Prototype": false,
+ "Scriptaculous": false,
+ "Selector": false,
+ "Sortable": false,
+ "SortableObserver": false,
+ "Sound": false,
+ "Template": false,
+ "Toggle": false,
+ "Try": false
+ },
+ "meteor": {
+ "$": false,
+ "_": false,
+ "Accounts": false,
+ "AccountsClient": false,
+ "AccountsServer": false,
+ "AccountsCommon": false,
+ "App": false,
+ "Assets": false,
+ "Blaze": false,
+ "check": false,
+ "Cordova": false,
+ "DDP": false,
+ "DDPServer": false,
+ "DDPRateLimiter": false,
+ "Deps": false,
+ "EJSON": false,
+ "Email": false,
+ "HTTP": false,
+ "Log": false,
+ "Match": false,
+ "Meteor": false,
+ "Mongo": false,
+ "MongoInternals": false,
+ "Npm": false,
+ "Package": false,
+ "Plugin": false,
+ "process": false,
+ "Random": false,
+ "ReactiveDict": false,
+ "ReactiveVar": false,
+ "Router": false,
+ "ServiceConfiguration": false,
+ "Session": false,
+ "share": false,
+ "Spacebars": false,
+ "Template": false,
+ "Tinytest": false,
+ "Tracker": false,
+ "UI": false,
+ "Utils": false,
+ "WebApp": false,
+ "WebAppInternals": false
+ },
+ "mongo": {
+ "_isWindows": false,
+ "_rand": false,
+ "BulkWriteResult": false,
+ "cat": false,
+ "cd": false,
+ "connect": false,
+ "db": false,
+ "getHostName": false,
+ "getMemInfo": false,
+ "hostname": false,
+ "ISODate": false,
+ "listFiles": false,
+ "load": false,
+ "ls": false,
+ "md5sumFile": false,
+ "mkdir": false,
+ "Mongo": false,
+ "NumberInt": false,
+ "NumberLong": false,
+ "ObjectId": false,
+ "PlanCache": false,
+ "print": false,
+ "printjson": false,
+ "pwd": false,
+ "quit": false,
+ "removeFile": false,
+ "rs": false,
+ "sh": false,
+ "UUID": false,
+ "version": false,
+ "WriteResult": false
+ },
+ "applescript": {
+ "$": false,
+ "Application": false,
+ "Automation": false,
+ "console": false,
+ "delay": false,
+ "Library": false,
+ "ObjC": false,
+ "ObjectSpecifier": false,
+ "Path": false,
+ "Progress": false,
+ "Ref": false
+ },
+ "serviceworker": {
+ "caches": false,
+ "Cache": false,
+ "CacheStorage": false,
+ "Client": false,
+ "clients": false,
+ "Clients": false,
+ "ExtendableEvent": false,
+ "ExtendableMessageEvent": false,
+ "FetchEvent": false,
+ "importScripts": false,
+ "registration": false,
+ "self": false,
+ "ServiceWorker": false,
+ "ServiceWorkerContainer": false,
+ "ServiceWorkerGlobalScope": false,
+ "ServiceWorkerMessageEvent": false,
+ "ServiceWorkerRegistration": false,
+ "skipWaiting": false,
+ "WindowClient": false
+ },
+ "atomtest": {
+ "advanceClock": false,
+ "fakeClearInterval": false,
+ "fakeClearTimeout": false,
+ "fakeSetInterval": false,
+ "fakeSetTimeout": false,
+ "resetTimeouts": false,
+ "waitsForPromise": false
+ },
+ "embertest": {
+ "andThen": false,
+ "click": false,
+ "currentPath": false,
+ "currentRouteName": false,
+ "currentURL": false,
+ "fillIn": false,
+ "find": false,
+ "findWithAssert": false,
+ "keyEvent": false,
+ "pauseTest": false,
+ "resumeTest": false,
+ "triggerEvent": false,
+ "visit": false,
+ "wait": false
+ },
+ "protractor": {
+ "$": false,
+ "$$": false,
+ "browser": false,
+ "By": false,
+ "by": false,
+ "DartObject": false,
+ "element": false,
+ "protractor": false
+ },
+ "shared-node-browser": {
+ "clearInterval": false,
+ "clearTimeout": false,
+ "console": false,
+ "setInterval": false,
+ "setTimeout": false
+ },
+ "webextensions": {
+ "browser": false,
+ "chrome": false,
+ "opr": false
+ },
+ "greasemonkey": {
+ "GM": false,
+ "GM_addStyle": false,
+ "GM_deleteValue": false,
+ "GM_getResourceText": false,
+ "GM_getResourceURL": false,
+ "GM_getValue": false,
+ "GM_info": false,
+ "GM_listValues": false,
+ "GM_log": false,
+ "GM_openInTab": false,
+ "GM_registerMenuCommand": false,
+ "GM_setClipboard": false,
+ "GM_setValue": false,
+ "GM_xmlhttpRequest": false,
+ "unsafeWindow": false
+ },
+ "devtools": {
+ "$": false,
+ "$$": false,
+ "$0": false,
+ "$1": false,
+ "$2": false,
+ "$3": false,
+ "$4": false,
+ "$_": false,
+ "$x": false,
+ "chrome": false,
+ "clear": false,
+ "copy": false,
+ "debug": false,
+ "dir": false,
+ "dirxml": false,
+ "getEventListeners": false,
+ "inspect": false,
+ "keys": false,
+ "monitor": false,
+ "monitorEvents": false,
+ "profile": false,
+ "profileEnd": false,
+ "queryObjects": false,
+ "table": false,
+ "undebug": false,
+ "unmonitor": false,
+ "unmonitorEvents": false,
+ "values": false
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/globals/index.js b/tools/node_modules/eslint/node_modules/globals/index.js
new file mode 100644
index 0000000000..a951582e41
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/globals/index.js
@@ -0,0 +1,2 @@
+'use strict';
+module.exports = require('./globals.json');
diff --git a/tools/node_modules/eslint/node_modules/globals/license b/tools/node_modules/eslint/node_modules/globals/license
new file mode 100644
index 0000000000..e7af2f7710
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/globals/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/tools/node_modules/eslint/node_modules/globals/package.json b/tools/node_modules/eslint/node_modules/globals/package.json
new file mode 100644
index 0000000000..45895fcc1b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/globals/package.json
@@ -0,0 +1,73 @@
+{
+ "_from": "globals@^11.0.1",
+ "_id": "globals@11.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-Eqh7sBDlFUOWrMU14eQ/x1Ow5eg=",
+ "_location": "/eslint/globals",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "globals@^11.0.1",
+ "name": "globals",
+ "escapedName": "globals",
+ "rawSpec": "^11.0.1",
+ "saveSpec": null,
+ "fetchSpec": "^11.0.1"
+ },
+ "_requiredBy": [
+ "/eslint"
+ ],
+ "_resolved": "https://registry.npmjs.org/globals/-/globals-11.0.1.tgz",
+ "_shasum": "12a87bb010e5154396acc535e1e43fc753b0e5e8",
+ "_spec": "globals@^11.0.1",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/globals/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Global identifiers from different JavaScript environments",
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "files": [
+ "index.js",
+ "globals.json"
+ ],
+ "homepage": "https://github.com/sindresorhus/globals#readme",
+ "keywords": [
+ "globals",
+ "global",
+ "identifiers",
+ "variables",
+ "vars",
+ "jshint",
+ "eslint",
+ "environments"
+ ],
+ "license": "MIT",
+ "name": "globals",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/globals.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "11.0.1",
+ "xo": {
+ "ignores": [
+ "get-browser-globals.js"
+ ]
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/globals/readme.md b/tools/node_modules/eslint/node_modules/globals/readme.md
new file mode 100644
index 0000000000..8c47855f34
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/globals/readme.md
@@ -0,0 +1,41 @@
+# globals [![Build Status](https://travis-ci.org/sindresorhus/globals.svg?branch=master)](https://travis-ci.org/sindresorhus/globals)
+
+> Global identifiers from different JavaScript environments
+
+Extracted from [JSHint](https://github.com/jshint/jshint/blob/3a8efa979dbb157bfb5c10b5826603a55a33b9ad/src/vars.js) and [ESLint](https://github.com/eslint/eslint/blob/b648406218f8a2d7302b98f5565e23199f44eb31/conf/environments.json) and merged.
+
+It's just a [JSON file](globals.json), so use it in whatever environment you like.
+
+**This module [no longer accepts](https://github.com/sindresorhus/globals/issues/82) new environments. If you need it for ESLint, just [create a plugin](http://eslint.org/docs/developer-guide/working-with-plugins#environments-in-plugins).**
+
+
+## Install
+
+```
+$ npm install globals
+```
+
+
+## Usage
+
+```js
+const globals = require('globals');
+
+console.log(globals.browser);
+/*
+{
+ addEventListener: false,
+ applicationCache: false,
+ ArrayBuffer: false,
+ atob: false,
+ ...
+}
+*/
+```
+
+Each global is given a value of `true` or `false`. A value of `true` indicates that the variable may be overwritten. A value of `false` indicates that the variable should be considered read-only. This information is used by static analysis tools to flag incorrect behavior. We assume all variables should be `false` unless we hear otherwise.
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/tools/node_modules/eslint/node_modules/globby/index.js b/tools/node_modules/eslint/node_modules/globby/index.js
new file mode 100644
index 0000000000..39da9f64d1
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/globby/index.js
@@ -0,0 +1,65 @@
+'use strict';
+var Promise = require('pinkie-promise');
+var arrayUnion = require('array-union');
+var objectAssign = require('object-assign');
+var glob = require('glob');
+var arrify = require('arrify');
+var pify = require('pify');
+
+var globP = pify(glob, Promise).bind(glob);
+
+function isNegative(pattern) {
+ return pattern[0] === '!';
+}
+
+function generateGlobTasks(patterns, opts) {
+ var globTasks = [];
+
+ patterns = arrify(patterns);
+ opts = objectAssign({
+ cache: Object.create(null),
+ statCache: Object.create(null),
+ realpathCache: Object.create(null),
+ symlinks: Object.create(null),
+ ignore: []
+ }, opts);
+
+ patterns.forEach(function (pattern, i) {
+ if (isNegative(pattern)) {
+ return;
+ }
+
+ var ignore = patterns.slice(i).filter(isNegative).map(function (pattern) {
+ return pattern.slice(1);
+ });
+
+ globTasks.push({
+ pattern: pattern,
+ opts: objectAssign({}, opts, {
+ ignore: opts.ignore.concat(ignore)
+ })
+ });
+ });
+
+ return globTasks;
+}
+
+module.exports = function (patterns, opts) {
+ var globTasks = generateGlobTasks(patterns, opts);
+
+ return Promise.all(globTasks.map(function (task) {
+ return globP(task.pattern, task.opts);
+ })).then(function (paths) {
+ return arrayUnion.apply(null, paths);
+ });
+};
+
+module.exports.sync = function (patterns, opts) {
+ var globTasks = generateGlobTasks(patterns, opts);
+
+ return globTasks.reduce(function (matches, task) {
+ return arrayUnion(matches, glob.sync(task.pattern, task.opts));
+ }, []);
+};
+
+module.exports.generateGlobTasks = generateGlobTasks;
diff --git a/tools/node_modules/eslint/node_modules/globby/license b/tools/node_modules/eslint/node_modules/globby/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/globby/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/tools/node_modules/eslint/node_modules/globby/package.json b/tools/node_modules/eslint/node_modules/globby/package.json
new file mode 100644
index 0000000000..911f86bc3d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/globby/package.json
@@ -0,0 +1,102 @@
+{
+ "_from": "globby@^5.0.0",
+ "_id": "globby@5.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=",
+ "_location": "/eslint/globby",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "globby@^5.0.0",
+ "name": "globby",
+ "escapedName": "globby",
+ "rawSpec": "^5.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^5.0.0"
+ },
+ "_requiredBy": [
+ "/eslint/del"
+ ],
+ "_resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz",
+ "_shasum": "ebd84667ca0dbb330b99bcfc68eac2bc54370e0d",
+ "_spec": "globby@^5.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/del",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/globby/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "array-union": "^1.0.1",
+ "arrify": "^1.0.0",
+ "glob": "^7.0.3",
+ "object-assign": "^4.0.1",
+ "pify": "^2.0.0",
+ "pinkie-promise": "^2.0.0"
+ },
+ "deprecated": false,
+ "description": "Extends `glob` with support for multiple patterns and exposes a Promise API",
+ "devDependencies": {
+ "ava": "*",
+ "glob-stream": "github:wearefractal/glob-stream#master",
+ "globby": "github:sindresorhus/globby#master",
+ "matcha": "^0.7.0",
+ "rimraf": "^2.2.8",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/globby#readme",
+ "keywords": [
+ "all",
+ "array",
+ "directories",
+ "dirs",
+ "expand",
+ "files",
+ "filesystem",
+ "filter",
+ "find",
+ "fnmatch",
+ "folders",
+ "fs",
+ "glob",
+ "globbing",
+ "globs",
+ "gulpfriendly",
+ "match",
+ "matcher",
+ "minimatch",
+ "multi",
+ "multiple",
+ "paths",
+ "pattern",
+ "patterns",
+ "traverse",
+ "util",
+ "utility",
+ "wildcard",
+ "wildcards",
+ "promise"
+ ],
+ "license": "MIT",
+ "name": "globby",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/globby.git"
+ },
+ "scripts": {
+ "bench": "npm update globby glob-stream && matcha bench.js",
+ "test": "xo && ava"
+ },
+ "version": "5.0.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/globby/readme.md b/tools/node_modules/eslint/node_modules/globby/readme.md
new file mode 100644
index 0000000000..aad991d020
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/globby/readme.md
@@ -0,0 +1,82 @@
+# globby [![Build Status](https://travis-ci.org/sindresorhus/globby.svg?branch=master)](https://travis-ci.org/sindresorhus/globby)
+
+> Extends [glob](https://github.com/isaacs/node-glob) with support for multiple patterns and exposes a Promise API
+
+
+## Install
+
+```
+$ npm install --save globby
+```
+
+
+## Usage
+
+```
+├── unicorn
+├── cake
+└── rainbow
+```
+
+```js
+const globby = require('globby');
+
+globby(['*', '!cake']).then(paths => {
+ console.log(paths);
+ //=> ['unicorn', 'rainbow']
+});
+```
+
+
+## API
+
+### globby(patterns, [options])
+
+Returns a Promise for an array of matching paths.
+
+### globby.sync(patterns, [options])
+
+Returns an array of matching paths.
+
+### globby.generateGlobTasks(patterns, [options])
+
+Returns an array of objects in the format `{ pattern: string, opts: Object }`, which can be passed as arguments to [`node-glob`](https://github.com/isaacs/node-glob). This is useful for other globbing-related packages.
+
+Note that you should avoid running the same tasks multiple times as they contain a file system cache. Instead, create a new tasks list to ensure that file system changes are taken in consideration.
+
+#### patterns
+
+Type: `string`, `Array`
+
+See supported `minimatch` [patterns](https://github.com/isaacs/minimatch#usage).
+
+#### options
+
+Type: `Object`
+
+See the `node-glob` [options](https://github.com/isaacs/node-glob#options).
+
+
+## Globbing patterns
+
+Just a quick overview.
+
+- `*` matches any number of characters, but not `/`
+- `?` matches a single character, but not `/`
+- `**` matches any number of characters, including `/`, as long as it's the only thing in a path part
+- `{}` allows for a comma-separated list of "or" expressions
+- `!` at the beginning of a pattern will negate the match
+
+[Various patterns and expected matches.](https://github.com/sindresorhus/multimatch/blob/master/test.js)
+
+
+## Related
+
+- [multimatch](https://github.com/sindresorhus/multimatch) - Match against a list instead of the filesystem
+- [glob-stream](https://github.com/wearefractal/glob-stream) - Streaming alternative
+- [matcher](https://github.com/sindresorhus/matcher) - Simple wildcard matching
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/tools/node_modules/eslint/node_modules/graceful-fs/LICENSE b/tools/node_modules/eslint/node_modules/graceful-fs/LICENSE
new file mode 100644
index 0000000000..9d2c803696
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/graceful-fs/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter, Ben Noordhuis, 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/tools/node_modules/eslint/node_modules/graceful-fs/README.md b/tools/node_modules/eslint/node_modules/graceful-fs/README.md
new file mode 100644
index 0000000000..5273a50ad6
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/graceful-fs/README.md
@@ -0,0 +1,133 @@
+# 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](https://nodejs.org/api/fs.html)
+
+* 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')
+```
+
+## Global Patching
+
+If you want to patch the global fs module (or any other fs-like
+module) you can do this:
+
+```javascript
+// Make sure to read the caveat below.
+var realFs = require('fs')
+var gracefulFs = require('graceful-fs')
+gracefulFs.gracefulify(realFs)
+```
+
+This should only ever be done at the top-level application layer, in
+order to delay on EMFILE errors from any fs-using dependencies. You
+should **not** do this in a library, because it can cause unexpected
+delays in other parts of the program.
+
+## Changes
+
+This module is fairly stable at this point, and used by a lot of
+things. That being said, because it implements a subtle behavior
+change in a core part of the node API, even modest changes can be
+extremely breaking, and the versioning is thus biased towards
+bumping the major when in doubt.
+
+The main change between major versions has been switching between
+providing a fully-patched `fs` module vs monkey-patching the node core
+builtin, and the approach by which a non-monkey-patched `fs` was
+created.
+
+The goal is to trade `EMFILE` errors for slower fs operations. So, if
+you try to open a zillion files, rather than crashing, `open`
+operations will be queued up and wait for something else to `close`.
+
+There are advantages to each approach. Monkey-patching the fs means
+that no `EMFILE` errors can possibly occur anywhere in your
+application, because everything is using the same core `fs` module,
+which is patched. However, it can also obviously cause undesirable
+side-effects, especially if the module is loaded multiple times.
+
+Implementing a separate-but-identical patched `fs` module is more
+surgical (and doesn't run the risk of patching multiple times), but
+also imposes the challenge of keeping in sync with the core module.
+
+The current approach loads the `fs` module, and then creates a
+lookalike object that has all the same methods, except a few that are
+patched. It is safe to use in all versions of Node from 0.8 through
+7.0.
+
+### v4
+
+* Do not monkey-patch the fs module. This module may now be used as a
+ drop-in dep, and users can opt into monkey-patching the fs builtin
+ if their app requires it.
+
+### v3
+
+* Monkey-patch fs, because the eval approach no longer works on recent
+ node.
+* fixed possible type-error throw if rename fails on windows
+* verify that we *never* get EMFILE errors
+* Ignore ENOSYS from chmod/chown
+* clarify that graceful-fs must be used as a drop-in
+
+### v2.1.0
+
+* Use eval rather than monkey-patching fs.
+* readdir: Always sort the results
+* win32: requeue a file if error has an OK status
+
+### v2.0
+
+* A return to monkey patching
+* wrap process.cwd
+
+### v1.1
+
+* wrap readFile
+* Wrap fs.writeFile.
+* readdir protection
+* Don't clobber the fs builtin
+* Handle fs.read EAGAIN errors by trying again
+* Expose the curOpen counter
+* No-op lchown/lchmod if not implemented
+* fs.rename patch only for win32
+* Patch fs.rename to handle AV software on Windows
+* Close #4 Chown should not fail on einval or eperm if non-root
+* Fix isaacs/fstream#1 Only wrap fs one time
+* Fix #3 Start at 1024 max files, then back off on EMFILE
+* lutimes that doens't blow up on Linux
+* A full on-rewrite using a queue instead of just swallowing the EMFILE error
+* Wrap Read/Write streams as well
+
+### 1.0
+
+* Update engines for node 0.6
+* Be lstat-graceful on Windows
+* first
diff --git a/tools/node_modules/eslint/node_modules/graceful-fs/fs.js b/tools/node_modules/eslint/node_modules/graceful-fs/fs.js
new file mode 100644
index 0000000000..8ad4a38396
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/graceful-fs/fs.js
@@ -0,0 +1,21 @@
+'use strict'
+
+var fs = require('fs')
+
+module.exports = clone(fs)
+
+function clone (obj) {
+ if (obj === null || typeof obj !== 'object')
+ return obj
+
+ if (obj instanceof Object)
+ var copy = { __proto__: obj.__proto__ }
+ else
+ var copy = Object.create(null)
+
+ Object.getOwnPropertyNames(obj).forEach(function (key) {
+ Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key))
+ })
+
+ return copy
+}
diff --git a/tools/node_modules/eslint/node_modules/graceful-fs/graceful-fs.js b/tools/node_modules/eslint/node_modules/graceful-fs/graceful-fs.js
new file mode 100644
index 0000000000..33b30d2e98
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/graceful-fs/graceful-fs.js
@@ -0,0 +1,262 @@
+var fs = require('fs')
+var polyfills = require('./polyfills.js')
+var legacy = require('./legacy-streams.js')
+var queue = []
+
+var util = require('util')
+
+function noop () {}
+
+var debug = noop
+if (util.debuglog)
+ debug = util.debuglog('gfs4')
+else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ''))
+ debug = function() {
+ var m = util.format.apply(util, arguments)
+ m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ')
+ console.error(m)
+ }
+
+if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) {
+ process.on('exit', function() {
+ debug(queue)
+ require('assert').equal(queue.length, 0)
+ })
+}
+
+module.exports = patch(require('./fs.js'))
+if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH) {
+ module.exports = patch(fs)
+}
+
+// Always patch fs.close/closeSync, because we want to
+// retry() whenever a close happens *anywhere* in the program.
+// This is essential when multiple graceful-fs instances are
+// in play at the same time.
+module.exports.close =
+fs.close = (function (fs$close) { return function (fd, cb) {
+ return fs$close.call(fs, fd, function (err) {
+ if (!err)
+ retry()
+
+ if (typeof cb === 'function')
+ cb.apply(this, arguments)
+ })
+}})(fs.close)
+
+module.exports.closeSync =
+fs.closeSync = (function (fs$closeSync) { return function (fd) {
+ // Note that graceful-fs also retries when fs.closeSync() fails.
+ // Looks like a bug to me, although it's probably a harmless one.
+ var rval = fs$closeSync.apply(fs, arguments)
+ retry()
+ return rval
+}})(fs.closeSync)
+
+function patch (fs) {
+ // Everything that references the open() function needs to be in here
+ polyfills(fs)
+ fs.gracefulify = patch
+ fs.FileReadStream = ReadStream; // Legacy name.
+ fs.FileWriteStream = WriteStream; // Legacy name.
+ fs.createReadStream = createReadStream
+ fs.createWriteStream = createWriteStream
+ var fs$readFile = fs.readFile
+ fs.readFile = readFile
+ function readFile (path, options, cb) {
+ if (typeof options === 'function')
+ cb = options, options = null
+
+ return go$readFile(path, options, cb)
+
+ function go$readFile (path, options, cb) {
+ return fs$readFile(path, options, function (err) {
+ if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
+ enqueue([go$readFile, [path, options, cb]])
+ else {
+ if (typeof cb === 'function')
+ cb.apply(this, arguments)
+ retry()
+ }
+ })
+ }
+ }
+
+ var fs$writeFile = fs.writeFile
+ fs.writeFile = writeFile
+ function writeFile (path, data, options, cb) {
+ if (typeof options === 'function')
+ cb = options, options = null
+
+ return go$writeFile(path, data, options, cb)
+
+ function go$writeFile (path, data, options, cb) {
+ return fs$writeFile(path, data, options, function (err) {
+ if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
+ enqueue([go$writeFile, [path, data, options, cb]])
+ else {
+ if (typeof cb === 'function')
+ cb.apply(this, arguments)
+ retry()
+ }
+ })
+ }
+ }
+
+ var fs$appendFile = fs.appendFile
+ if (fs$appendFile)
+ fs.appendFile = appendFile
+ function appendFile (path, data, options, cb) {
+ if (typeof options === 'function')
+ cb = options, options = null
+
+ return go$appendFile(path, data, options, cb)
+
+ function go$appendFile (path, data, options, cb) {
+ return fs$appendFile(path, data, options, function (err) {
+ if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
+ enqueue([go$appendFile, [path, data, options, cb]])
+ else {
+ if (typeof cb === 'function')
+ cb.apply(this, arguments)
+ retry()
+ }
+ })
+ }
+ }
+
+ var fs$readdir = fs.readdir
+ fs.readdir = readdir
+ function readdir (path, options, cb) {
+ var args = [path]
+ if (typeof options !== 'function') {
+ args.push(options)
+ } else {
+ cb = options
+ }
+ args.push(go$readdir$cb)
+
+ return go$readdir(args)
+
+ function go$readdir$cb (err, files) {
+ if (files && files.sort)
+ files.sort()
+
+ if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
+ enqueue([go$readdir, [args]])
+ else {
+ if (typeof cb === 'function')
+ cb.apply(this, arguments)
+ retry()
+ }
+ }
+ }
+
+ function go$readdir (args) {
+ return fs$readdir.apply(fs, args)
+ }
+
+ if (process.version.substr(0, 4) === 'v0.8') {
+ var legStreams = legacy(fs)
+ ReadStream = legStreams.ReadStream
+ WriteStream = legStreams.WriteStream
+ }
+
+ var fs$ReadStream = fs.ReadStream
+ ReadStream.prototype = Object.create(fs$ReadStream.prototype)
+ ReadStream.prototype.open = ReadStream$open
+
+ var fs$WriteStream = fs.WriteStream
+ WriteStream.prototype = Object.create(fs$WriteStream.prototype)
+ WriteStream.prototype.open = WriteStream$open
+
+ fs.ReadStream = ReadStream
+ fs.WriteStream = WriteStream
+
+ function ReadStream (path, options) {
+ if (this instanceof ReadStream)
+ return fs$ReadStream.apply(this, arguments), this
+ else
+ return ReadStream.apply(Object.create(ReadStream.prototype), arguments)
+ }
+
+ function ReadStream$open () {
+ var that = this
+ open(that.path, that.flags, that.mode, function (err, fd) {
+ if (err) {
+ if (that.autoClose)
+ that.destroy()
+
+ that.emit('error', err)
+ } else {
+ that.fd = fd
+ that.emit('open', fd)
+ that.read()
+ }
+ })
+ }
+
+ function WriteStream (path, options) {
+ if (this instanceof WriteStream)
+ return fs$WriteStream.apply(this, arguments), this
+ else
+ return WriteStream.apply(Object.create(WriteStream.prototype), arguments)
+ }
+
+ function WriteStream$open () {
+ var that = this
+ open(that.path, that.flags, that.mode, function (err, fd) {
+ if (err) {
+ that.destroy()
+ that.emit('error', err)
+ } else {
+ that.fd = fd
+ that.emit('open', fd)
+ }
+ })
+ }
+
+ function createReadStream (path, options) {
+ return new ReadStream(path, options)
+ }
+
+ function createWriteStream (path, options) {
+ return new WriteStream(path, options)
+ }
+
+ var fs$open = fs.open
+ fs.open = open
+ function open (path, flags, mode, cb) {
+ if (typeof mode === 'function')
+ cb = mode, mode = null
+
+ return go$open(path, flags, mode, cb)
+
+ function go$open (path, flags, mode, cb) {
+ return fs$open(path, flags, mode, function (err, fd) {
+ if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
+ enqueue([go$open, [path, flags, mode, cb]])
+ else {
+ if (typeof cb === 'function')
+ cb.apply(this, arguments)
+ retry()
+ }
+ })
+ }
+ }
+
+ return fs
+}
+
+function enqueue (elem) {
+ debug('ENQUEUE', elem[0].name, elem[1])
+ queue.push(elem)
+}
+
+function retry () {
+ var elem = queue.shift()
+ if (elem) {
+ debug('RETRY', elem[0].name, elem[1])
+ elem[0].apply(null, elem[1])
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/graceful-fs/legacy-streams.js b/tools/node_modules/eslint/node_modules/graceful-fs/legacy-streams.js
new file mode 100644
index 0000000000..d617b50fc0
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/graceful-fs/legacy-streams.js
@@ -0,0 +1,118 @@
+var Stream = require('stream').Stream
+
+module.exports = legacy
+
+function legacy (fs) {
+ return {
+ ReadStream: ReadStream,
+ WriteStream: WriteStream
+ }
+
+ function ReadStream (path, options) {
+ if (!(this instanceof ReadStream)) return new ReadStream(path, options);
+
+ Stream.call(this);
+
+ var self = this;
+
+ this.path = path;
+ this.fd = null;
+ this.readable = true;
+ this.paused = false;
+
+ this.flags = 'r';
+ this.mode = 438; /*=0666*/
+ this.bufferSize = 64 * 1024;
+
+ options = options || {};
+
+ // Mixin options into this
+ var keys = Object.keys(options);
+ for (var index = 0, length = keys.length; index < length; index++) {
+ var key = keys[index];
+ this[key] = options[key];
+ }
+
+ if (this.encoding) this.setEncoding(this.encoding);
+
+ if (this.start !== undefined) {
+ if ('number' !== typeof this.start) {
+ throw TypeError('start must be a Number');
+ }
+ if (this.end === undefined) {
+ this.end = Infinity;
+ } else if ('number' !== typeof this.end) {
+ throw TypeError('end must be a Number');
+ }
+
+ if (this.start > this.end) {
+ throw new Error('start must be <= end');
+ }
+
+ this.pos = this.start;
+ }
+
+ if (this.fd !== null) {
+ process.nextTick(function() {
+ self._read();
+ });
+ return;
+ }
+
+ fs.open(this.path, this.flags, this.mode, function (err, fd) {
+ if (err) {
+ self.emit('error', err);
+ self.readable = false;
+ return;
+ }
+
+ self.fd = fd;
+ self.emit('open', fd);
+ self._read();
+ })
+ }
+
+ function WriteStream (path, options) {
+ if (!(this instanceof WriteStream)) return new WriteStream(path, options);
+
+ Stream.call(this);
+
+ this.path = path;
+ this.fd = null;
+ this.writable = true;
+
+ this.flags = 'w';
+ this.encoding = 'binary';
+ this.mode = 438; /*=0666*/
+ this.bytesWritten = 0;
+
+ options = options || {};
+
+ // Mixin options into this
+ var keys = Object.keys(options);
+ for (var index = 0, length = keys.length; index < length; index++) {
+ var key = keys[index];
+ this[key] = options[key];
+ }
+
+ if (this.start !== undefined) {
+ if ('number' !== typeof this.start) {
+ throw TypeError('start must be a Number');
+ }
+ if (this.start < 0) {
+ throw new Error('start must be >= zero');
+ }
+
+ this.pos = this.start;
+ }
+
+ this.busy = false;
+ this._queue = [];
+
+ if (this.fd === null) {
+ this._open = fs.open;
+ this._queue.push([this._open, this.path, this.flags, this.mode, undefined]);
+ this.flush();
+ }
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/graceful-fs/package.json b/tools/node_modules/eslint/node_modules/graceful-fs/package.json
new file mode 100644
index 0000000000..5c0d1bc9a6
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/graceful-fs/package.json
@@ -0,0 +1,76 @@
+{
+ "_from": "graceful-fs@^4.1.2",
+ "_id": "graceful-fs@4.1.11",
+ "_inBundle": false,
+ "_integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=",
+ "_location": "/eslint/graceful-fs",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "graceful-fs@^4.1.2",
+ "name": "graceful-fs",
+ "escapedName": "graceful-fs",
+ "rawSpec": "^4.1.2",
+ "saveSpec": null,
+ "fetchSpec": "^4.1.2"
+ },
+ "_requiredBy": [
+ "/eslint/flat-cache"
+ ],
+ "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
+ "_shasum": "0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658",
+ "_spec": "graceful-fs@^4.1.2",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/flat-cache",
+ "bugs": {
+ "url": "https://github.com/isaacs/node-graceful-fs/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "A drop-in replacement for fs, making various improvements.",
+ "devDependencies": {
+ "mkdirp": "^0.5.0",
+ "rimraf": "^2.2.8",
+ "tap": "^5.4.2"
+ },
+ "directories": {
+ "test": "test"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ },
+ "files": [
+ "fs.js",
+ "graceful-fs.js",
+ "legacy-streams.js",
+ "polyfills.js"
+ ],
+ "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",
+ "name": "graceful-fs",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/isaacs/node-graceful-fs.git"
+ },
+ "scripts": {
+ "test": "node test.js | tap -"
+ },
+ "version": "4.1.11"
+}
diff --git a/tools/node_modules/eslint/node_modules/graceful-fs/polyfills.js b/tools/node_modules/eslint/node_modules/graceful-fs/polyfills.js
new file mode 100644
index 0000000000..4c6aca78a3
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/graceful-fs/polyfills.js
@@ -0,0 +1,330 @@
+var fs = require('./fs.js')
+var constants = require('constants')
+
+var origCwd = process.cwd
+var cwd = null
+
+var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform
+
+process.cwd = function() {
+ if (!cwd)
+ cwd = origCwd.call(process)
+ return cwd
+}
+try {
+ process.cwd()
+} catch (er) {}
+
+var chdir = process.chdir
+process.chdir = function(d) {
+ cwd = null
+ chdir.call(process, d)
+}
+
+module.exports = patch
+
+function patch (fs) {
+ // (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\./)) {
+ patchLchmod(fs)
+ }
+
+ // lutimes implementation, or no-op
+ if (!fs.lutimes) {
+ patchLutimes(fs)
+ }
+
+ // 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 = chmodFix(fs.chmod)
+ fs.fchmod = chmodFix(fs.fchmod)
+ fs.lchmod = chmodFix(fs.lchmod)
+
+ fs.chownSync = chownFixSync(fs.chownSync)
+ fs.fchownSync = chownFixSync(fs.fchownSync)
+ fs.lchownSync = chownFixSync(fs.lchownSync)
+
+ fs.chmodSync = chmodFixSync(fs.chmodSync)
+ fs.fchmodSync = chmodFixSync(fs.fchmodSync)
+ fs.lchmodSync = chmodFixSync(fs.lchmodSync)
+
+ fs.stat = statFix(fs.stat)
+ fs.fstat = statFix(fs.fstat)
+ fs.lstat = statFix(fs.lstat)
+
+ fs.statSync = statFixSync(fs.statSync)
+ fs.fstatSync = statFixSync(fs.fstatSync)
+ fs.lstatSync = statFixSync(fs.lstatSync)
+
+ // if lchmod/lchown do not exist, then make them no-ops
+ if (!fs.lchmod) {
+ fs.lchmod = function (path, mode, cb) {
+ if (cb) process.nextTick(cb)
+ }
+ fs.lchmodSync = function () {}
+ }
+ if (!fs.lchown) {
+ fs.lchown = function (path, uid, gid, cb) {
+ if (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 60 seconds.
+
+ // Set the timeout this long because some Windows Anti-Virus, such as Parity
+ // bit9, may lock files for up to a minute, causing npm package install
+ // failures. Also, take care to yield the scheduler. Windows scheduling gives
+ // CPU to a busy looping process, which can cause the program causing the lock
+ // contention to be starved of CPU by node, so the contention doesn't resolve.
+ if (platform === "win32") {
+ fs.rename = (function (fs$rename) { return function (from, to, cb) {
+ var start = Date.now()
+ var backoff = 0;
+ fs$rename(from, to, function CB (er) {
+ if (er
+ && (er.code === "EACCES" || er.code === "EPERM")
+ && Date.now() - start < 60000) {
+ setTimeout(function() {
+ fs.stat(to, function (stater, st) {
+ if (stater && stater.code === "ENOENT")
+ fs$rename(from, to, CB);
+ else
+ cb(er)
+ })
+ }, backoff)
+ if (backoff < 100)
+ backoff += 10;
+ return;
+ }
+ if (cb) cb(er)
+ })
+ }})(fs.rename)
+ }
+
+ // if read() returns EAGAIN, then just try it again.
+ fs.read = (function (fs$read) { return 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 fs$read.call(fs, fd, buffer, offset, length, position, callback)
+ }
+ callback_.apply(this, arguments)
+ }
+ }
+ return fs$read.call(fs, fd, buffer, offset, length, position, callback)
+ }})(fs.read)
+
+ fs.readSync = (function (fs$readSync) { return function (fd, buffer, offset, length, position) {
+ var eagCounter = 0
+ while (true) {
+ try {
+ return fs$readSync.call(fs, fd, buffer, offset, length, position)
+ } catch (er) {
+ if (er.code === 'EAGAIN' && eagCounter < 10) {
+ eagCounter ++
+ continue
+ }
+ throw er
+ }
+ }
+ }})(fs.readSync)
+}
+
+function patchLchmod (fs) {
+ fs.lchmod = function (path, mode, callback) {
+ fs.open( path
+ , constants.O_WRONLY | constants.O_SYMLINK
+ , mode
+ , function (err, fd) {
+ if (err) {
+ if (callback) 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) {
+ if (callback) 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 threw = true
+ var ret
+ try {
+ ret = fs.fchmodSync(fd, mode)
+ threw = false
+ } finally {
+ if (threw) {
+ try {
+ fs.closeSync(fd)
+ } catch (er) {}
+ } else {
+ fs.closeSync(fd)
+ }
+ }
+ return ret
+ }
+}
+
+function patchLutimes (fs) {
+ if (constants.hasOwnProperty("O_SYMLINK")) {
+ fs.lutimes = function (path, at, mt, cb) {
+ fs.open(path, constants.O_SYMLINK, function (er, fd) {
+ if (er) {
+ if (cb) cb(er)
+ return
+ }
+ fs.futimes(fd, at, mt, function (er) {
+ fs.close(fd, function (er2) {
+ if (cb) cb(er || er2)
+ })
+ })
+ })
+ }
+
+ fs.lutimesSync = function (path, at, mt) {
+ var fd = fs.openSync(path, constants.O_SYMLINK)
+ var ret
+ var threw = true
+ try {
+ ret = fs.futimesSync(fd, at, mt)
+ threw = false
+ } finally {
+ if (threw) {
+ try {
+ fs.closeSync(fd)
+ } catch (er) {}
+ } else {
+ fs.closeSync(fd)
+ }
+ }
+ return ret
+ }
+
+ } else {
+ fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) }
+ fs.lutimesSync = function () {}
+ }
+}
+
+function chmodFix (orig) {
+ if (!orig) return orig
+ return function (target, mode, cb) {
+ return orig.call(fs, target, mode, function (er) {
+ if (chownErOk(er)) er = null
+ if (cb) cb.apply(this, arguments)
+ })
+ }
+}
+
+function chmodFixSync (orig) {
+ if (!orig) return orig
+ return function (target, mode) {
+ try {
+ return orig.call(fs, target, mode)
+ } catch (er) {
+ if (!chownErOk(er)) throw er
+ }
+ }
+}
+
+
+function chownFix (orig) {
+ if (!orig) return orig
+ return function (target, uid, gid, cb) {
+ return orig.call(fs, target, uid, gid, function (er) {
+ if (chownErOk(er)) er = null
+ if (cb) cb.apply(this, arguments)
+ })
+ }
+}
+
+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
+ }
+ }
+}
+
+
+function statFix (orig) {
+ if (!orig) return orig
+ // Older versions of Node erroneously returned signed integers for
+ // uid + gid.
+ return function (target, cb) {
+ return orig.call(fs, target, function (er, stats) {
+ if (!stats) return cb.apply(this, arguments)
+ if (stats.uid < 0) stats.uid += 0x100000000
+ if (stats.gid < 0) stats.gid += 0x100000000
+ if (cb) cb.apply(this, arguments)
+ })
+ }
+}
+
+function statFixSync (orig) {
+ if (!orig) return orig
+ // Older versions of Node erroneously returned signed integers for
+ // uid + gid.
+ return function (target) {
+ var stats = orig.call(fs, target)
+ if (stats.uid < 0) stats.uid += 0x100000000
+ if (stats.gid < 0) stats.gid += 0x100000000
+ return stats;
+ }
+}
+
+// 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
+}
diff --git a/tools/node_modules/eslint/node_modules/has-ansi/index.js b/tools/node_modules/eslint/node_modules/has-ansi/index.js
new file mode 100644
index 0000000000..98fae06767
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/has-ansi/index.js
@@ -0,0 +1,4 @@
+'use strict';
+var ansiRegex = require('ansi-regex');
+var re = new RegExp(ansiRegex().source); // remove the `g` flag
+module.exports = re.test.bind(re);
diff --git a/tools/node_modules/eslint/node_modules/has-ansi/license b/tools/node_modules/eslint/node_modules/has-ansi/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/has-ansi/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/tools/node_modules/eslint/node_modules/has-ansi/package.json b/tools/node_modules/eslint/node_modules/has-ansi/package.json
new file mode 100644
index 0000000000..b05b7536b5
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/has-ansi/package.json
@@ -0,0 +1,95 @@
+{
+ "_from": "has-ansi@^2.0.0",
+ "_id": "has-ansi@2.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
+ "_location": "/eslint/has-ansi",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "has-ansi@^2.0.0",
+ "name": "has-ansi",
+ "escapedName": "has-ansi",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/eslint/babel-code-frame/chalk"
+ ],
+ "_resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
+ "_shasum": "34f5049ce1ecdf2b0649af3ef24e45ed35416d91",
+ "_spec": "has-ansi@^2.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/babel-code-frame/node_modules/chalk",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/has-ansi/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "ansi-regex": "^2.0.0"
+ },
+ "deprecated": false,
+ "description": "Check if a string has ANSI escape codes",
+ "devDependencies": {
+ "ava": "0.0.4"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/has-ansi#readme",
+ "keywords": [
+ "ansi",
+ "styles",
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "string",
+ "tty",
+ "escape",
+ "shell",
+ "xterm",
+ "command-line",
+ "text",
+ "regex",
+ "regexp",
+ "re",
+ "match",
+ "test",
+ "find",
+ "pattern",
+ "has"
+ ],
+ "license": "MIT",
+ "maintainers": [
+ {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ {
+ "name": "Joshua Appelman",
+ "email": "jappelman@xebia.com",
+ "url": "jbnicolai.com"
+ }
+ ],
+ "name": "has-ansi",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/has-ansi.git"
+ },
+ "scripts": {
+ "test": "node test.js"
+ },
+ "version": "2.0.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/has-ansi/readme.md b/tools/node_modules/eslint/node_modules/has-ansi/readme.md
new file mode 100644
index 0000000000..02bc7c2300
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/has-ansi/readme.md
@@ -0,0 +1,36 @@
+# has-ansi [![Build Status](https://travis-ci.org/sindresorhus/has-ansi.svg?branch=master)](https://travis-ci.org/sindresorhus/has-ansi)
+
+> Check if a string has [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
+
+
+## Install
+
+```
+$ npm install --save has-ansi
+```
+
+
+## Usage
+
+```js
+var hasAnsi = require('has-ansi');
+
+hasAnsi('\u001b[4mcake\u001b[0m');
+//=> true
+
+hasAnsi('cake');
+//=> false
+```
+
+
+## Related
+
+- [has-ansi-cli](https://github.com/sindresorhus/has-ansi-cli) - CLI for this module
+- [strip-ansi](https://github.com/sindresorhus/strip-ansi) - Strip ANSI escape codes
+- [ansi-regex](https://github.com/sindresorhus/ansi-regex) - Regular expression for matching ANSI escape codes
+- [chalk](https://github.com/sindresorhus/chalk) - Terminal string styling done right
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/tools/node_modules/eslint/node_modules/has-flag/index.js b/tools/node_modules/eslint/node_modules/has-flag/index.js
new file mode 100644
index 0000000000..68820307dc
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/has-flag/index.js
@@ -0,0 +1,10 @@
+'use strict';
+module.exports = function (flag, argv) {
+ argv = argv || process.argv;
+
+ var terminatorPos = argv.indexOf('--');
+ var prefix = /^-{1,2}/.test(flag) ? '' : '--';
+ var pos = argv.indexOf(prefix + flag);
+
+ return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
+};
diff --git a/tools/node_modules/eslint/node_modules/has-flag/license b/tools/node_modules/eslint/node_modules/has-flag/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/has-flag/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/tools/node_modules/eslint/node_modules/has-flag/package.json b/tools/node_modules/eslint/node_modules/has-flag/package.json
new file mode 100644
index 0000000000..965dc9682d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/has-flag/package.json
@@ -0,0 +1,93 @@
+{
+ "_from": "has-flag@^2.0.0",
+ "_id": "has-flag@2.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=",
+ "_location": "/eslint/has-flag",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "has-flag@^2.0.0",
+ "name": "has-flag",
+ "escapedName": "has-flag",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/eslint/chalk/supports-color"
+ ],
+ "_resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz",
+ "_shasum": "e8207af1cc7b30d446cc70b734b5e8be18f88d51",
+ "_spec": "has-flag@^2.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/chalk/node_modules/supports-color",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/has-flag/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Check if argv has a specific flag",
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/has-flag#readme",
+ "keywords": [
+ "has",
+ "check",
+ "detect",
+ "contains",
+ "find",
+ "flag",
+ "cli",
+ "command-line",
+ "argv",
+ "process",
+ "arg",
+ "args",
+ "argument",
+ "arguments",
+ "getopt",
+ "minimist",
+ "optimist"
+ ],
+ "license": "MIT",
+ "maintainers": [
+ {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ {
+ "name": "Joshua Appelman",
+ "email": "jappelman@xebia.com",
+ "url": "jbnicolai.com"
+ },
+ {
+ "name": "JD Ballard",
+ "email": "i.am.qix@gmail.com",
+ "url": "github.com/qix-"
+ }
+ ],
+ "name": "has-flag",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/has-flag.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "2.0.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/has-flag/readme.md b/tools/node_modules/eslint/node_modules/has-flag/readme.md
new file mode 100644
index 0000000000..0caca6cba1
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/has-flag/readme.md
@@ -0,0 +1,67 @@
+# has-flag [![Build Status](https://travis-ci.org/sindresorhus/has-flag.svg?branch=master)](https://travis-ci.org/sindresorhus/has-flag)
+
+> Check if [`argv`](https://nodejs.org/docs/latest/api/process.html#process_process_argv) has a specific flag
+
+Correctly stops looking after an `--` argument terminator.
+
+
+## Install
+
+```
+$ npm install --save has-flag
+```
+
+
+## Usage
+
+```js
+// foo.js
+const hasFlag = require('has-flag');
+
+hasFlag('unicorn');
+//=> true
+
+hasFlag('--unicorn');
+//=> true
+
+hasFlag('-f');
+//=> true
+
+hasFlag('foo=bar');
+//=> true
+
+hasFlag('foo');
+//=> false
+
+hasFlag('rainbow');
+//=> false
+```
+
+```
+$ node foo.js -f --unicorn --foo=bar -- --rainbow
+```
+
+
+## API
+
+### hasFlag(flag, [argv])
+
+Returns a boolean whether the flag exists.
+
+#### flag
+
+Type: `string`
+
+CLI flag to look for. The `--` prefix is optional.
+
+#### argv
+
+Type: `array`<br>
+Default: `process.argv`
+
+CLI arguments.
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/tools/node_modules/eslint/node_modules/has/LICENSE-MIT b/tools/node_modules/eslint/node_modules/has/LICENSE-MIT
new file mode 100644
index 0000000000..ae7014d385
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/has/LICENSE-MIT
@@ -0,0 +1,22 @@
+Copyright (c) 2013 Thiago de Arruda
+
+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/tools/node_modules/eslint/node_modules/has/README.mkd b/tools/node_modules/eslint/node_modules/has/README.mkd
new file mode 100644
index 0000000000..635e3a4baa
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/has/README.mkd
@@ -0,0 +1,18 @@
+# has
+
+> Object.prototype.hasOwnProperty.call shortcut
+
+## Installation
+
+```sh
+npm install --save has
+```
+
+## Usage
+
+```js
+var has = require('has');
+
+has({}, 'hasOwnProperty'); // false
+has(Object.prototype, 'hasOwnProperty'); // true
+```
diff --git a/tools/node_modules/eslint/node_modules/has/package.json b/tools/node_modules/eslint/node_modules/has/package.json
new file mode 100644
index 0000000000..9f6d51d662
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/has/package.json
@@ -0,0 +1,62 @@
+{
+ "_from": "has@^1.0.1",
+ "_id": "has@1.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=",
+ "_location": "/has",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "has@^1.0.1",
+ "name": "has",
+ "escapedName": "has",
+ "rawSpec": "^1.0.1",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.1"
+ },
+ "_requiredBy": [
+ "/remark-parse"
+ ],
+ "_resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz",
+ "_shasum": "8461733f538b0837c9361e39a9ab9e9704dc2f28",
+ "_spec": "has@^1.0.1",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/remark-parse",
+ "author": {
+ "name": "Thiago de Arruda",
+ "email": "tpadilha84@gmail.com"
+ },
+ "bugs": {
+ "url": "https://github.com/tarruda/has/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "function-bind": "^1.0.2"
+ },
+ "deprecated": false,
+ "description": "Object.prototype.hasOwnProperty.call shortcut",
+ "devDependencies": {
+ "chai": "~1.7.2",
+ "mocha": "^1.21.4"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ },
+ "homepage": "https://github.com/tarruda/has",
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "https://github.com/tarruda/has/blob/master/LICENSE-MIT"
+ }
+ ],
+ "main": "./src/index",
+ "name": "has",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/tarruda/has.git"
+ },
+ "scripts": {
+ "test": "node_modules/mocha/bin/mocha"
+ },
+ "version": "1.0.1"
+}
diff --git a/tools/node_modules/eslint/node_modules/has/src/index.js b/tools/node_modules/eslint/node_modules/has/src/index.js
new file mode 100644
index 0000000000..cdf328576e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/has/src/index.js
@@ -0,0 +1,3 @@
+var bind = require('function-bind');
+
+module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
diff --git a/tools/node_modules/eslint/node_modules/iconv-lite/LICENSE b/tools/node_modules/eslint/node_modules/iconv-lite/LICENSE
new file mode 100644
index 0000000000..d518d8376a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/iconv-lite/LICENSE
@@ -0,0 +1,21 @@
+Copyright (c) 2011 Alexander Shtuchkin
+
+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/tools/node_modules/eslint/node_modules/iconv-lite/README.md b/tools/node_modules/eslint/node_modules/iconv-lite/README.md
new file mode 100644
index 0000000000..767daedef0
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/iconv-lite/README.md
@@ -0,0 +1,160 @@
+## Pure JS character encoding conversion [![Build Status](https://travis-ci.org/ashtuchkin/iconv-lite.svg?branch=master)](https://travis-ci.org/ashtuchkin/iconv-lite)
+
+ * Doesn't need native code compilation. Works on Windows and in sandboxed environments like [Cloud9](http://c9.io).
+ * Used in popular projects like [Express.js (body_parser)](https://github.com/expressjs/body-parser),
+ [Grunt](http://gruntjs.com/), [Nodemailer](http://www.nodemailer.com/), [Yeoman](http://yeoman.io/) and others.
+ * Faster than [node-iconv](https://github.com/bnoordhuis/node-iconv) (see below for performance comparison).
+ * Intuitive encode/decode API
+ * Streaming support for Node v0.10+
+ * [Deprecated] Can extend Node.js primitives (buffers, streams) to support all iconv-lite encodings.
+ * In-browser usage via [Browserify](https://github.com/substack/node-browserify) (~180k gzip compressed with Buffer shim included).
+ * Typescript [type definition file](https://github.com/ashtuchkin/iconv-lite/blob/master/lib/index.d.ts) included.
+ * React Native is supported (need to explicitly `npm install` two more modules: `buffer` and `stream`).
+ * License: MIT.
+
+[![NPM Stats](https://nodei.co/npm/iconv-lite.png?downloads=true&downloadRank=true)](https://npmjs.org/packages/iconv-lite/)
+
+## Usage
+### Basic API
+```javascript
+var iconv = require('iconv-lite');
+
+// Convert from an encoded buffer to js string.
+str = iconv.decode(new Buffer([0x68, 0x65, 0x6c, 0x6c, 0x6f]), 'win1251');
+
+// Convert from js string to an encoded buffer.
+buf = iconv.encode("Sample input string", 'win1251');
+
+// Check if encoding is supported
+iconv.encodingExists("us-ascii")
+```
+
+### Streaming API (Node v0.10+)
+```javascript
+
+// Decode stream (from binary stream to js strings)
+http.createServer(function(req, res) {
+ var converterStream = iconv.decodeStream('win1251');
+ req.pipe(converterStream);
+
+ converterStream.on('data', function(str) {
+ console.log(str); // Do something with decoded strings, chunk-by-chunk.
+ });
+});
+
+// Convert encoding streaming example
+fs.createReadStream('file-in-win1251.txt')
+ .pipe(iconv.decodeStream('win1251'))
+ .pipe(iconv.encodeStream('ucs2'))
+ .pipe(fs.createWriteStream('file-in-ucs2.txt'));
+
+// Sugar: all encode/decode streams have .collect(cb) method to accumulate data.
+http.createServer(function(req, res) {
+ req.pipe(iconv.decodeStream('win1251')).collect(function(err, body) {
+ assert(typeof body == 'string');
+ console.log(body); // full request body string
+ });
+});
+```
+
+### [Deprecated] Extend Node.js own encodings
+> NOTE: This doesn't work on latest Node versions. See [details](https://github.com/ashtuchkin/iconv-lite/wiki/Node-v4-compatibility).
+
+```javascript
+// After this call all Node basic primitives will understand iconv-lite encodings.
+iconv.extendNodeEncodings();
+
+// Examples:
+buf = new Buffer(str, 'win1251');
+buf.write(str, 'gbk');
+str = buf.toString('latin1');
+assert(Buffer.isEncoding('iso-8859-15'));
+Buffer.byteLength(str, 'us-ascii');
+
+http.createServer(function(req, res) {
+ req.setEncoding('big5');
+ req.collect(function(err, body) {
+ console.log(body);
+ });
+});
+
+fs.createReadStream("file.txt", "shift_jis");
+
+// External modules are also supported (if they use Node primitives, which they probably do).
+request = require('request');
+request({
+ url: "http://github.com/",
+ encoding: "cp932"
+});
+
+// To remove extensions
+iconv.undoExtendNodeEncodings();
+```
+
+## Supported encodings
+
+ * All node.js native encodings: utf8, ucs2 / utf16-le, ascii, binary, base64, hex.
+ * Additional unicode encodings: utf16, utf16-be, utf-7, utf-7-imap.
+ * All widespread singlebyte encodings: Windows 125x family, ISO-8859 family,
+ IBM/DOS codepages, Macintosh family, KOI8 family, all others supported by iconv library.
+ Aliases like 'latin1', 'us-ascii' also supported.
+ * All widespread multibyte encodings: CP932, CP936, CP949, CP950, GB2312, GBK, GB18030, Big5, Shift_JIS, EUC-JP.
+
+See [all supported encodings on wiki](https://github.com/ashtuchkin/iconv-lite/wiki/Supported-Encodings).
+
+Most singlebyte encodings are generated automatically from [node-iconv](https://github.com/bnoordhuis/node-iconv). Thank you Ben Noordhuis and libiconv authors!
+
+Multibyte encodings are generated from [Unicode.org mappings](http://www.unicode.org/Public/MAPPINGS/) and [WHATWG Encoding Standard mappings](http://encoding.spec.whatwg.org/). Thank you, respective authors!
+
+
+## Encoding/decoding speed
+
+Comparison with node-iconv module (1000x256kb, on MacBook Pro, Core i5/2.6 GHz, Node v0.12.0).
+Note: your results may vary, so please always check on your hardware.
+
+ operation iconv@2.1.4 iconv-lite@0.4.7
+ ----------------------------------------------------------
+ encode('win1251') ~96 Mb/s ~320 Mb/s
+ decode('win1251') ~95 Mb/s ~246 Mb/s
+
+## BOM handling
+
+ * Decoding: BOM is stripped by default, unless overridden by passing `stripBOM: false` in options
+ (f.ex. `iconv.decode(buf, enc, {stripBOM: false})`).
+ A callback might also be given as a `stripBOM` parameter - it'll be called if BOM character was actually found.
+ * If you want to detect UTF-8 BOM when decoding other encodings, use [node-autodetect-decoder-stream](https://github.com/danielgindi/node-autodetect-decoder-stream) module.
+ * Encoding: No BOM added, unless overridden by `addBOM: true` option.
+
+## UTF-16 Encodings
+
+This library supports UTF-16LE, UTF-16BE and UTF-16 encodings. First two are straightforward, but UTF-16 is trying to be
+smart about endianness in the following ways:
+ * Decoding: uses BOM and 'spaces heuristic' to determine input endianness. Default is UTF-16LE, but can be
+ overridden with `defaultEncoding: 'utf-16be'` option. Strips BOM unless `stripBOM: false`.
+ * Encoding: uses UTF-16LE and writes BOM by default. Use `addBOM: false` to override.
+
+## Other notes
+
+When decoding, be sure to supply a Buffer to decode() method, otherwise [bad things usually happen](https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding).
+Untranslatable characters are set to � or ?. No transliteration is currently supported.
+Node versions 0.10.31 and 0.11.13 are buggy, don't use them (see #65, #77).
+
+## Testing
+
+```bash
+$ git clone git@github.com:ashtuchkin/iconv-lite.git
+$ cd iconv-lite
+$ npm install
+$ npm test
+
+$ # To view performance:
+$ node test/performance.js
+
+$ # To view test coverage:
+$ npm run coverage
+$ open coverage/lcov-report/index.html
+```
+
+## Adoption
+[![NPM](https://nodei.co/npm-dl/iconv-lite.png)](https://nodei.co/npm/iconv-lite/)
+[![Codeship Status for ashtuchkin/iconv-lite](https://www.codeship.com/projects/81670840-fa72-0131-4520-4a01a6c01acc/status)](https://www.codeship.com/projects/29053)
diff --git a/tools/node_modules/eslint/node_modules/iconv-lite/encodings/dbcs-codec.js b/tools/node_modules/eslint/node_modules/iconv-lite/encodings/dbcs-codec.js
new file mode 100644
index 0000000000..7b3c980b3e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/iconv-lite/encodings/dbcs-codec.js
@@ -0,0 +1,555 @@
+"use strict";
+var Buffer = require("buffer").Buffer;
+
+// Multibyte codec. In this scheme, a character is represented by 1 or more bytes.
+// Our codec supports UTF-16 surrogates, extensions for GB18030 and unicode sequences.
+// To save memory and loading time, we read table files only when requested.
+
+exports._dbcs = DBCSCodec;
+
+var UNASSIGNED = -1,
+ GB18030_CODE = -2,
+ SEQ_START = -10,
+ NODE_START = -1000,
+ UNASSIGNED_NODE = new Array(0x100),
+ DEF_CHAR = -1;
+
+for (var i = 0; i < 0x100; i++)
+ UNASSIGNED_NODE[i] = UNASSIGNED;
+
+
+// Class DBCSCodec reads and initializes mapping tables.
+function DBCSCodec(codecOptions, iconv) {
+ this.encodingName = codecOptions.encodingName;
+ if (!codecOptions)
+ throw new Error("DBCS codec is called without the data.")
+ if (!codecOptions.table)
+ throw new Error("Encoding '" + this.encodingName + "' has no data.");
+
+ // Load tables.
+ var mappingTable = codecOptions.table();
+
+
+ // Decode tables: MBCS -> Unicode.
+
+ // decodeTables is a trie, encoded as an array of arrays of integers. Internal arrays are trie nodes and all have len = 256.
+ // Trie root is decodeTables[0].
+ // Values: >= 0 -> unicode character code. can be > 0xFFFF
+ // == UNASSIGNED -> unknown/unassigned sequence.
+ // == GB18030_CODE -> this is the end of a GB18030 4-byte sequence.
+ // <= NODE_START -> index of the next node in our trie to process next byte.
+ // <= SEQ_START -> index of the start of a character code sequence, in decodeTableSeq.
+ this.decodeTables = [];
+ this.decodeTables[0] = UNASSIGNED_NODE.slice(0); // Create root node.
+
+ // Sometimes a MBCS char corresponds to a sequence of unicode chars. We store them as arrays of integers here.
+ this.decodeTableSeq = [];
+
+ // Actual mapping tables consist of chunks. Use them to fill up decode tables.
+ for (var i = 0; i < mappingTable.length; i++)
+ this._addDecodeChunk(mappingTable[i]);
+
+ this.defaultCharUnicode = iconv.defaultCharUnicode;
+
+
+ // Encode tables: Unicode -> DBCS.
+
+ // `encodeTable` is array mapping from unicode char to encoded char. All its values are integers for performance.
+ // Because it can be sparse, it is represented as array of buckets by 256 chars each. Bucket can be null.
+ // Values: >= 0 -> it is a normal char. Write the value (if <=256 then 1 byte, if <=65536 then 2 bytes, etc.).
+ // == UNASSIGNED -> no conversion found. Output a default char.
+ // <= SEQ_START -> it's an index in encodeTableSeq, see below. The character starts a sequence.
+ this.encodeTable = [];
+
+ // `encodeTableSeq` is used when a sequence of unicode characters is encoded as a single code. We use a tree of
+ // objects where keys correspond to characters in sequence and leafs are the encoded dbcs values. A special DEF_CHAR key
+ // means end of sequence (needed when one sequence is a strict subsequence of another).
+ // Objects are kept separately from encodeTable to increase performance.
+ this.encodeTableSeq = [];
+
+ // Some chars can be decoded, but need not be encoded.
+ var skipEncodeChars = {};
+ if (codecOptions.encodeSkipVals)
+ for (var i = 0; i < codecOptions.encodeSkipVals.length; i++) {
+ var val = codecOptions.encodeSkipVals[i];
+ if (typeof val === 'number')
+ skipEncodeChars[val] = true;
+ else
+ for (var j = val.from; j <= val.to; j++)
+ skipEncodeChars[j] = true;
+ }
+
+ // Use decode trie to recursively fill out encode tables.
+ this._fillEncodeTable(0, 0, skipEncodeChars);
+
+ // Add more encoding pairs when needed.
+ if (codecOptions.encodeAdd) {
+ for (var uChar in codecOptions.encodeAdd)
+ if (Object.prototype.hasOwnProperty.call(codecOptions.encodeAdd, uChar))
+ this._setEncodeChar(uChar.charCodeAt(0), codecOptions.encodeAdd[uChar]);
+ }
+
+ this.defCharSB = this.encodeTable[0][iconv.defaultCharSingleByte.charCodeAt(0)];
+ if (this.defCharSB === UNASSIGNED) this.defCharSB = this.encodeTable[0]['?'];
+ if (this.defCharSB === UNASSIGNED) this.defCharSB = "?".charCodeAt(0);
+
+
+ // Load & create GB18030 tables when needed.
+ if (typeof codecOptions.gb18030 === 'function') {
+ this.gb18030 = codecOptions.gb18030(); // Load GB18030 ranges.
+
+ // Add GB18030 decode tables.
+ var thirdByteNodeIdx = this.decodeTables.length;
+ var thirdByteNode = this.decodeTables[thirdByteNodeIdx] = UNASSIGNED_NODE.slice(0);
+
+ var fourthByteNodeIdx = this.decodeTables.length;
+ var fourthByteNode = this.decodeTables[fourthByteNodeIdx] = UNASSIGNED_NODE.slice(0);
+
+ for (var i = 0x81; i <= 0xFE; i++) {
+ var secondByteNodeIdx = NODE_START - this.decodeTables[0][i];
+ var secondByteNode = this.decodeTables[secondByteNodeIdx];
+ for (var j = 0x30; j <= 0x39; j++)
+ secondByteNode[j] = NODE_START - thirdByteNodeIdx;
+ }
+ for (var i = 0x81; i <= 0xFE; i++)
+ thirdByteNode[i] = NODE_START - fourthByteNodeIdx;
+ for (var i = 0x30; i <= 0x39; i++)
+ fourthByteNode[i] = GB18030_CODE
+ }
+}
+
+DBCSCodec.prototype.encoder = DBCSEncoder;
+DBCSCodec.prototype.decoder = DBCSDecoder;
+
+// Decoder helpers
+DBCSCodec.prototype._getDecodeTrieNode = function(addr) {
+ var bytes = [];
+ for (; addr > 0; addr >>= 8)
+ bytes.push(addr & 0xFF);
+ if (bytes.length == 0)
+ bytes.push(0);
+
+ var node = this.decodeTables[0];
+ for (var i = bytes.length-1; i > 0; i--) { // Traverse nodes deeper into the trie.
+ var val = node[bytes[i]];
+
+ if (val == UNASSIGNED) { // Create new node.
+ node[bytes[i]] = NODE_START - this.decodeTables.length;
+ this.decodeTables.push(node = UNASSIGNED_NODE.slice(0));
+ }
+ else if (val <= NODE_START) { // Existing node.
+ node = this.decodeTables[NODE_START - val];
+ }
+ else
+ throw new Error("Overwrite byte in " + this.encodingName + ", addr: " + addr.toString(16));
+ }
+ return node;
+}
+
+
+DBCSCodec.prototype._addDecodeChunk = function(chunk) {
+ // First element of chunk is the hex mbcs code where we start.
+ var curAddr = parseInt(chunk[0], 16);
+
+ // Choose the decoding node where we'll write our chars.
+ var writeTable = this._getDecodeTrieNode(curAddr);
+ curAddr = curAddr & 0xFF;
+
+ // Write all other elements of the chunk to the table.
+ for (var k = 1; k < chunk.length; k++) {
+ var part = chunk[k];
+ if (typeof part === "string") { // String, write as-is.
+ for (var l = 0; l < part.length;) {
+ var code = part.charCodeAt(l++);
+ if (0xD800 <= code && code < 0xDC00) { // Decode surrogate
+ var codeTrail = part.charCodeAt(l++);
+ if (0xDC00 <= codeTrail && codeTrail < 0xE000)
+ writeTable[curAddr++] = 0x10000 + (code - 0xD800) * 0x400 + (codeTrail - 0xDC00);
+ else
+ throw new Error("Incorrect surrogate pair in " + this.encodingName + " at chunk " + chunk[0]);
+ }
+ else if (0x0FF0 < code && code <= 0x0FFF) { // Character sequence (our own encoding used)
+ var len = 0xFFF - code + 2;
+ var seq = [];
+ for (var m = 0; m < len; m++)
+ seq.push(part.charCodeAt(l++)); // Simple variation: don't support surrogates or subsequences in seq.
+
+ writeTable[curAddr++] = SEQ_START - this.decodeTableSeq.length;
+ this.decodeTableSeq.push(seq);
+ }
+ else
+ writeTable[curAddr++] = code; // Basic char
+ }
+ }
+ else if (typeof part === "number") { // Integer, meaning increasing sequence starting with prev character.
+ var charCode = writeTable[curAddr - 1] + 1;
+ for (var l = 0; l < part; l++)
+ writeTable[curAddr++] = charCode++;
+ }
+ else
+ throw new Error("Incorrect type '" + typeof part + "' given in " + this.encodingName + " at chunk " + chunk[0]);
+ }
+ if (curAddr > 0xFF)
+ throw new Error("Incorrect chunk in " + this.encodingName + " at addr " + chunk[0] + ": too long" + curAddr);
+}
+
+// Encoder helpers
+DBCSCodec.prototype._getEncodeBucket = function(uCode) {
+ var high = uCode >> 8; // This could be > 0xFF because of astral characters.
+ if (this.encodeTable[high] === undefined)
+ this.encodeTable[high] = UNASSIGNED_NODE.slice(0); // Create bucket on demand.
+ return this.encodeTable[high];
+}
+
+DBCSCodec.prototype._setEncodeChar = function(uCode, dbcsCode) {
+ var bucket = this._getEncodeBucket(uCode);
+ var low = uCode & 0xFF;
+ if (bucket[low] <= SEQ_START)
+ this.encodeTableSeq[SEQ_START-bucket[low]][DEF_CHAR] = dbcsCode; // There's already a sequence, set a single-char subsequence of it.
+ else if (bucket[low] == UNASSIGNED)
+ bucket[low] = dbcsCode;
+}
+
+DBCSCodec.prototype._setEncodeSequence = function(seq, dbcsCode) {
+
+ // Get the root of character tree according to first character of the sequence.
+ var uCode = seq[0];
+ var bucket = this._getEncodeBucket(uCode);
+ var low = uCode & 0xFF;
+
+ var node;
+ if (bucket[low] <= SEQ_START) {
+ // There's already a sequence with - use it.
+ node = this.encodeTableSeq[SEQ_START-bucket[low]];
+ }
+ else {
+ // There was no sequence object - allocate a new one.
+ node = {};
+ if (bucket[low] !== UNASSIGNED) node[DEF_CHAR] = bucket[low]; // If a char was set before - make it a single-char subsequence.
+ bucket[low] = SEQ_START - this.encodeTableSeq.length;
+ this.encodeTableSeq.push(node);
+ }
+
+ // Traverse the character tree, allocating new nodes as needed.
+ for (var j = 1; j < seq.length-1; j++) {
+ var oldVal = node[uCode];
+ if (typeof oldVal === 'object')
+ node = oldVal;
+ else {
+ node = node[uCode] = {}
+ if (oldVal !== undefined)
+ node[DEF_CHAR] = oldVal
+ }
+ }
+
+ // Set the leaf to given dbcsCode.
+ uCode = seq[seq.length-1];
+ node[uCode] = dbcsCode;
+}
+
+DBCSCodec.prototype._fillEncodeTable = function(nodeIdx, prefix, skipEncodeChars) {
+ var node = this.decodeTables[nodeIdx];
+ for (var i = 0; i < 0x100; i++) {
+ var uCode = node[i];
+ var mbCode = prefix + i;
+ if (skipEncodeChars[mbCode])
+ continue;
+
+ if (uCode >= 0)
+ this._setEncodeChar(uCode, mbCode);
+ else if (uCode <= NODE_START)
+ this._fillEncodeTable(NODE_START - uCode, mbCode << 8, skipEncodeChars);
+ else if (uCode <= SEQ_START)
+ this._setEncodeSequence(this.decodeTableSeq[SEQ_START - uCode], mbCode);
+ }
+}
+
+
+
+// == Encoder ==================================================================
+
+function DBCSEncoder(options, codec) {
+ // Encoder state
+ this.leadSurrogate = -1;
+ this.seqObj = undefined;
+
+ // Static data
+ this.encodeTable = codec.encodeTable;
+ this.encodeTableSeq = codec.encodeTableSeq;
+ this.defaultCharSingleByte = codec.defCharSB;
+ this.gb18030 = codec.gb18030;
+}
+
+DBCSEncoder.prototype.write = function(str) {
+ var newBuf = new Buffer(str.length * (this.gb18030 ? 4 : 3)),
+ leadSurrogate = this.leadSurrogate,
+ seqObj = this.seqObj, nextChar = -1,
+ i = 0, j = 0;
+
+ while (true) {
+ // 0. Get next character.
+ if (nextChar === -1) {
+ if (i == str.length) break;
+ var uCode = str.charCodeAt(i++);
+ }
+ else {
+ var uCode = nextChar;
+ nextChar = -1;
+ }
+
+ // 1. Handle surrogates.
+ if (0xD800 <= uCode && uCode < 0xE000) { // Char is one of surrogates.
+ if (uCode < 0xDC00) { // We've got lead surrogate.
+ if (leadSurrogate === -1) {
+ leadSurrogate = uCode;
+ continue;
+ } else {
+ leadSurrogate = uCode;
+ // Double lead surrogate found.
+ uCode = UNASSIGNED;
+ }
+ } else { // We've got trail surrogate.
+ if (leadSurrogate !== -1) {
+ uCode = 0x10000 + (leadSurrogate - 0xD800) * 0x400 + (uCode - 0xDC00);
+ leadSurrogate = -1;
+ } else {
+ // Incomplete surrogate pair - only trail surrogate found.
+ uCode = UNASSIGNED;
+ }
+
+ }
+ }
+ else if (leadSurrogate !== -1) {
+ // Incomplete surrogate pair - only lead surrogate found.
+ nextChar = uCode; uCode = UNASSIGNED; // Write an error, then current char.
+ leadSurrogate = -1;
+ }
+
+ // 2. Convert uCode character.
+ var dbcsCode = UNASSIGNED;
+ if (seqObj !== undefined && uCode != UNASSIGNED) { // We are in the middle of the sequence
+ var resCode = seqObj[uCode];
+ if (typeof resCode === 'object') { // Sequence continues.
+ seqObj = resCode;
+ continue;
+
+ } else if (typeof resCode == 'number') { // Sequence finished. Write it.
+ dbcsCode = resCode;
+
+ } else if (resCode == undefined) { // Current character is not part of the sequence.
+
+ // Try default character for this sequence
+ resCode = seqObj[DEF_CHAR];
+ if (resCode !== undefined) {
+ dbcsCode = resCode; // Found. Write it.
+ nextChar = uCode; // Current character will be written too in the next iteration.
+
+ } else {
+ // TODO: What if we have no default? (resCode == undefined)
+ // Then, we should write first char of the sequence as-is and try the rest recursively.
+ // Didn't do it for now because no encoding has this situation yet.
+ // Currently, just skip the sequence and write current char.
+ }
+ }
+ seqObj = undefined;
+ }
+ else if (uCode >= 0) { // Regular character
+ var subtable = this.encodeTable[uCode >> 8];
+ if (subtable !== undefined)
+ dbcsCode = subtable[uCode & 0xFF];
+
+ if (dbcsCode <= SEQ_START) { // Sequence start
+ seqObj = this.encodeTableSeq[SEQ_START-dbcsCode];
+ continue;
+ }
+
+ if (dbcsCode == UNASSIGNED && this.gb18030) {
+ // Use GB18030 algorithm to find character(s) to write.
+ var idx = findIdx(this.gb18030.uChars, uCode);
+ if (idx != -1) {
+ var dbcsCode = this.gb18030.gbChars[idx] + (uCode - this.gb18030.uChars[idx]);
+ newBuf[j++] = 0x81 + Math.floor(dbcsCode / 12600); dbcsCode = dbcsCode % 12600;
+ newBuf[j++] = 0x30 + Math.floor(dbcsCode / 1260); dbcsCode = dbcsCode % 1260;
+ newBuf[j++] = 0x81 + Math.floor(dbcsCode / 10); dbcsCode = dbcsCode % 10;
+ newBuf[j++] = 0x30 + dbcsCode;
+ continue;
+ }
+ }
+ }
+
+ // 3. Write dbcsCode character.
+ if (dbcsCode === UNASSIGNED)
+ dbcsCode = this.defaultCharSingleByte;
+
+ if (dbcsCode < 0x100) {
+ newBuf[j++] = dbcsCode;
+ }
+ else if (dbcsCode < 0x10000) {
+ newBuf[j++] = dbcsCode >> 8; // high byte
+ newBuf[j++] = dbcsCode & 0xFF; // low byte
+ }
+ else {
+ newBuf[j++] = dbcsCode >> 16;
+ newBuf[j++] = (dbcsCode >> 8) & 0xFF;
+ newBuf[j++] = dbcsCode & 0xFF;
+ }
+ }
+
+ this.seqObj = seqObj;
+ this.leadSurrogate = leadSurrogate;
+ return newBuf.slice(0, j);
+}
+
+DBCSEncoder.prototype.end = function() {
+ if (this.leadSurrogate === -1 && this.seqObj === undefined)
+ return; // All clean. Most often case.
+
+ var newBuf = new Buffer(10), j = 0;
+
+ if (this.seqObj) { // We're in the sequence.
+ var dbcsCode = this.seqObj[DEF_CHAR];
+ if (dbcsCode !== undefined) { // Write beginning of the sequence.
+ if (dbcsCode < 0x100) {
+ newBuf[j++] = dbcsCode;
+ }
+ else {
+ newBuf[j++] = dbcsCode >> 8; // high byte
+ newBuf[j++] = dbcsCode & 0xFF; // low byte
+ }
+ } else {
+ // See todo above.
+ }
+ this.seqObj = undefined;
+ }
+
+ if (this.leadSurrogate !== -1) {
+ // Incomplete surrogate pair - only lead surrogate found.
+ newBuf[j++] = this.defaultCharSingleByte;
+ this.leadSurrogate = -1;
+ }
+
+ return newBuf.slice(0, j);
+}
+
+// Export for testing
+DBCSEncoder.prototype.findIdx = findIdx;
+
+
+// == Decoder ==================================================================
+
+function DBCSDecoder(options, codec) {
+ // Decoder state
+ this.nodeIdx = 0;
+ this.prevBuf = new Buffer(0);
+
+ // Static data
+ this.decodeTables = codec.decodeTables;
+ this.decodeTableSeq = codec.decodeTableSeq;
+ this.defaultCharUnicode = codec.defaultCharUnicode;
+ this.gb18030 = codec.gb18030;
+}
+
+DBCSDecoder.prototype.write = function(buf) {
+ var newBuf = new Buffer(buf.length*2),
+ nodeIdx = this.nodeIdx,
+ prevBuf = this.prevBuf, prevBufOffset = this.prevBuf.length,
+ seqStart = -this.prevBuf.length, // idx of the start of current parsed sequence.
+ uCode;
+
+ if (prevBufOffset > 0) // Make prev buf overlap a little to make it easier to slice later.
+ prevBuf = Buffer.concat([prevBuf, buf.slice(0, 10)]);
+
+ for (var i = 0, j = 0; i < buf.length; i++) {
+ var curByte = (i >= 0) ? buf[i] : prevBuf[i + prevBufOffset];
+
+ // Lookup in current trie node.
+ var uCode = this.decodeTables[nodeIdx][curByte];
+
+ if (uCode >= 0) {
+ // Normal character, just use it.
+ }
+ else if (uCode === UNASSIGNED) { // Unknown char.
+ // TODO: Callback with seq.
+ //var curSeq = (seqStart >= 0) ? buf.slice(seqStart, i+1) : prevBuf.slice(seqStart + prevBufOffset, i+1 + prevBufOffset);
+ i = seqStart; // Try to parse again, after skipping first byte of the sequence ('i' will be incremented by 'for' cycle).
+ uCode = this.defaultCharUnicode.charCodeAt(0);
+ }
+ else if (uCode === GB18030_CODE) {
+ var curSeq = (seqStart >= 0) ? buf.slice(seqStart, i+1) : prevBuf.slice(seqStart + prevBufOffset, i+1 + prevBufOffset);
+ var ptr = (curSeq[0]-0x81)*12600 + (curSeq[1]-0x30)*1260 + (curSeq[2]-0x81)*10 + (curSeq[3]-0x30);
+ var idx = findIdx(this.gb18030.gbChars, ptr);
+ uCode = this.gb18030.uChars[idx] + ptr - this.gb18030.gbChars[idx];
+ }
+ else if (uCode <= NODE_START) { // Go to next trie node.
+ nodeIdx = NODE_START - uCode;
+ continue;
+ }
+ else if (uCode <= SEQ_START) { // Output a sequence of chars.
+ var seq = this.decodeTableSeq[SEQ_START - uCode];
+ for (var k = 0; k < seq.length - 1; k++) {
+ uCode = seq[k];
+ newBuf[j++] = uCode & 0xFF;
+ newBuf[j++] = uCode >> 8;
+ }
+ uCode = seq[seq.length-1];
+ }
+ else
+ throw new Error("iconv-lite internal error: invalid decoding table value " + uCode + " at " + nodeIdx + "/" + curByte);
+
+ // Write the character to buffer, handling higher planes using surrogate pair.
+ if (uCode > 0xFFFF) {
+ uCode -= 0x10000;
+ var uCodeLead = 0xD800 + Math.floor(uCode / 0x400);
+ newBuf[j++] = uCodeLead & 0xFF;
+ newBuf[j++] = uCodeLead >> 8;
+
+ uCode = 0xDC00 + uCode % 0x400;
+ }
+ newBuf[j++] = uCode & 0xFF;
+ newBuf[j++] = uCode >> 8;
+
+ // Reset trie node.
+ nodeIdx = 0; seqStart = i+1;
+ }
+
+ this.nodeIdx = nodeIdx;
+ this.prevBuf = (seqStart >= 0) ? buf.slice(seqStart) : prevBuf.slice(seqStart + prevBufOffset);
+ return newBuf.slice(0, j).toString('ucs2');
+}
+
+DBCSDecoder.prototype.end = function() {
+ var ret = '';
+
+ // Try to parse all remaining chars.
+ while (this.prevBuf.length > 0) {
+ // Skip 1 character in the buffer.
+ ret += this.defaultCharUnicode;
+ var buf = this.prevBuf.slice(1);
+
+ // Parse remaining as usual.
+ this.prevBuf = new Buffer(0);
+ this.nodeIdx = 0;
+ if (buf.length > 0)
+ ret += this.write(buf);
+ }
+
+ this.nodeIdx = 0;
+ return ret;
+}
+
+// Binary search for GB18030. Returns largest i such that table[i] <= val.
+function findIdx(table, val) {
+ if (table[0] > val)
+ return -1;
+
+ var l = 0, r = table.length;
+ while (l < r-1) { // always table[l] <= val < table[r]
+ var mid = l + Math.floor((r-l+1)/2);
+ if (table[mid] <= val)
+ l = mid;
+ else
+ r = mid;
+ }
+ return l;
+}
+
diff --git a/tools/node_modules/eslint/node_modules/iconv-lite/encodings/dbcs-data.js b/tools/node_modules/eslint/node_modules/iconv-lite/encodings/dbcs-data.js
new file mode 100644
index 0000000000..4b61914341
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/iconv-lite/encodings/dbcs-data.js
@@ -0,0 +1,176 @@
+"use strict";
+
+// Description of supported double byte encodings and aliases.
+// Tables are not require()-d until they are needed to speed up library load.
+// require()-s are direct to support Browserify.
+
+module.exports = {
+
+ // == Japanese/ShiftJIS ====================================================
+ // All japanese encodings are based on JIS X set of standards:
+ // JIS X 0201 - Single-byte encoding of ASCII + ¥ + Kana chars at 0xA1-0xDF.
+ // JIS X 0208 - Main set of 6879 characters, placed in 94x94 plane, to be encoded by 2 bytes.
+ // Has several variations in 1978, 1983, 1990 and 1997.
+ // JIS X 0212 - Supplementary plane of 6067 chars in 94x94 plane. 1990. Effectively dead.
+ // JIS X 0213 - Extension and modern replacement of 0208 and 0212. Total chars: 11233.
+ // 2 planes, first is superset of 0208, second - revised 0212.
+ // Introduced in 2000, revised 2004. Some characters are in Unicode Plane 2 (0x2xxxx)
+
+ // Byte encodings are:
+ // * Shift_JIS: Compatible with 0201, uses not defined chars in top half as lead bytes for double-byte
+ // encoding of 0208. Lead byte ranges: 0x81-0x9F, 0xE0-0xEF; Trail byte ranges: 0x40-0x7E, 0x80-0x9E, 0x9F-0xFC.
+ // Windows CP932 is a superset of Shift_JIS. Some companies added more chars, notably KDDI.
+ // * EUC-JP: Up to 3 bytes per character. Used mostly on *nixes.
+ // 0x00-0x7F - lower part of 0201
+ // 0x8E, 0xA1-0xDF - upper part of 0201
+ // (0xA1-0xFE)x2 - 0208 plane (94x94).
+ // 0x8F, (0xA1-0xFE)x2 - 0212 plane (94x94).
+ // * JIS X 208: 7-bit, direct encoding of 0208. Byte ranges: 0x21-0x7E (94 values). Uncommon.
+ // Used as-is in ISO2022 family.
+ // * ISO2022-JP: Stateful encoding, with escape sequences to switch between ASCII,
+ // 0201-1976 Roman, 0208-1978, 0208-1983.
+ // * ISO2022-JP-1: Adds esc seq for 0212-1990.
+ // * ISO2022-JP-2: Adds esc seq for GB2313-1980, KSX1001-1992, ISO8859-1, ISO8859-7.
+ // * ISO2022-JP-3: Adds esc seq for 0201-1976 Kana set, 0213-2000 Planes 1, 2.
+ // * ISO2022-JP-2004: Adds 0213-2004 Plane 1.
+ //
+ // After JIS X 0213 appeared, Shift_JIS-2004, EUC-JISX0213 and ISO2022-JP-2004 followed, with just changing the planes.
+ //
+ // Overall, it seems that it's a mess :( http://www8.plala.or.jp/tkubota1/unicode-symbols-map2.html
+
+ 'shiftjis': {
+ type: '_dbcs',
+ table: function() { return require('./tables/shiftjis.json') },
+ encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E},
+ encodeSkipVals: [{from: 0xED40, to: 0xF940}],
+ },
+ 'csshiftjis': 'shiftjis',
+ 'mskanji': 'shiftjis',
+ 'sjis': 'shiftjis',
+ 'windows31j': 'shiftjis',
+ 'ms31j': 'shiftjis',
+ 'xsjis': 'shiftjis',
+ 'windows932': 'shiftjis',
+ 'ms932': 'shiftjis',
+ '932': 'shiftjis',
+ 'cp932': 'shiftjis',
+
+ 'eucjp': {
+ type: '_dbcs',
+ table: function() { return require('./tables/eucjp.json') },
+ encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E},
+ },
+
+ // TODO: KDDI extension to Shift_JIS
+ // TODO: IBM CCSID 942 = CP932, but F0-F9 custom chars and other char changes.
+ // TODO: IBM CCSID 943 = Shift_JIS = CP932 with original Shift_JIS lower 128 chars.
+
+
+ // == Chinese/GBK ==========================================================
+ // http://en.wikipedia.org/wiki/GBK
+ // We mostly implement W3C recommendation: https://www.w3.org/TR/encoding/#gbk-encoder
+
+ // Oldest GB2312 (1981, ~7600 chars) is a subset of CP936
+ 'gb2312': 'cp936',
+ 'gb231280': 'cp936',
+ 'gb23121980': 'cp936',
+ 'csgb2312': 'cp936',
+ 'csiso58gb231280': 'cp936',
+ 'euccn': 'cp936',
+
+ // Microsoft's CP936 is a subset and approximation of GBK.
+ 'windows936': 'cp936',
+ 'ms936': 'cp936',
+ '936': 'cp936',
+ 'cp936': {
+ type: '_dbcs',
+ table: function() { return require('./tables/cp936.json') },
+ },
+
+ // GBK (~22000 chars) is an extension of CP936 that added user-mapped chars and some other.
+ 'gbk': {
+ type: '_dbcs',
+ table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) },
+ },
+ 'xgbk': 'gbk',
+ 'isoir58': 'gbk',
+
+ // GB18030 is an algorithmic extension of GBK.
+ // Main source: https://www.w3.org/TR/encoding/#gbk-encoder
+ // http://icu-project.org/docs/papers/gb18030.html
+ // http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/gb-18030-2000.xml
+ // http://www.khngai.com/chinese/charmap/tblgbk.php?page=0
+ 'gb18030': {
+ type: '_dbcs',
+ table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) },
+ gb18030: function() { return require('./tables/gb18030-ranges.json') },
+ encodeSkipVals: [0x80],
+ encodeAdd: {'€': 0xA2E3},
+ },
+
+ 'chinese': 'gb18030',
+
+
+ // == Korean ===============================================================
+ // EUC-KR, KS_C_5601 and KS X 1001 are exactly the same.
+ 'windows949': 'cp949',
+ 'ms949': 'cp949',
+ '949': 'cp949',
+ 'cp949': {
+ type: '_dbcs',
+ table: function() { return require('./tables/cp949.json') },
+ },
+
+ 'cseuckr': 'cp949',
+ 'csksc56011987': 'cp949',
+ 'euckr': 'cp949',
+ 'isoir149': 'cp949',
+ 'korean': 'cp949',
+ 'ksc56011987': 'cp949',
+ 'ksc56011989': 'cp949',
+ 'ksc5601': 'cp949',
+
+
+ // == Big5/Taiwan/Hong Kong ================================================
+ // There are lots of tables for Big5 and cp950. Please see the following links for history:
+ // http://moztw.org/docs/big5/ http://www.haible.de/bruno/charsets/conversion-tables/Big5.html
+ // Variations, in roughly number of defined chars:
+ // * Windows CP 950: Microsoft variant of Big5. Canonical: http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT
+ // * Windows CP 951: Microsoft variant of Big5-HKSCS-2001. Seems to be never public. http://me.abelcheung.org/articles/research/what-is-cp951/
+ // * Big5-2003 (Taiwan standard) almost superset of cp950.
+ // * Unicode-at-on (UAO) / Mozilla 1.8. Falling out of use on the Web. Not supported by other browsers.
+ // * Big5-HKSCS (-2001, -2004, -2008). Hong Kong standard.
+ // many unicode code points moved from PUA to Supplementary plane (U+2XXXX) over the years.
+ // Plus, it has 4 combining sequences.
+ // Seems that Mozilla refused to support it for 10 yrs. https://bugzilla.mozilla.org/show_bug.cgi?id=162431 https://bugzilla.mozilla.org/show_bug.cgi?id=310299
+ // because big5-hkscs is the only encoding to include astral characters in non-algorithmic way.
+ // Implementations are not consistent within browsers; sometimes labeled as just big5.
+ // MS Internet Explorer switches from big5 to big5-hkscs when a patch applied.
+ // Great discussion & recap of what's going on https://bugzilla.mozilla.org/show_bug.cgi?id=912470#c31
+ // In the encoder, it might make sense to support encoding old PUA mappings to Big5 bytes seq-s.
+ // Official spec: http://www.ogcio.gov.hk/en/business/tech_promotion/ccli/terms/doc/2003cmp_2008.txt
+ // http://www.ogcio.gov.hk/tc/business/tech_promotion/ccli/terms/doc/hkscs-2008-big5-iso.txt
+ //
+ // Current understanding of how to deal with Big5(-HKSCS) is in the Encoding Standard, http://encoding.spec.whatwg.org/#big5-encoder
+ // Unicode mapping (http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT) is said to be wrong.
+
+ 'windows950': 'cp950',
+ 'ms950': 'cp950',
+ '950': 'cp950',
+ 'cp950': {
+ type: '_dbcs',
+ table: function() { return require('./tables/cp950.json') },
+ },
+
+ // Big5 has many variations and is an extension of cp950. We use Encoding Standard's as a consensus.
+ 'big5': 'big5hkscs',
+ 'big5hkscs': {
+ type: '_dbcs',
+ table: function() { return require('./tables/cp950.json').concat(require('./tables/big5-added.json')) },
+ encodeSkipVals: [0xa2cc],
+ },
+
+ 'cnbig5': 'big5hkscs',
+ 'csbig5': 'big5hkscs',
+ 'xxbig5': 'big5hkscs',
+};
diff --git a/tools/node_modules/eslint/node_modules/iconv-lite/encodings/index.js b/tools/node_modules/eslint/node_modules/iconv-lite/encodings/index.js
new file mode 100644
index 0000000000..e30400317c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/iconv-lite/encodings/index.js
@@ -0,0 +1,22 @@
+"use strict";
+
+// Update this array if you add/rename/remove files in this directory.
+// We support Browserify by skipping automatic module discovery and requiring modules directly.
+var modules = [
+ require("./internal"),
+ require("./utf16"),
+ require("./utf7"),
+ require("./sbcs-codec"),
+ require("./sbcs-data"),
+ require("./sbcs-data-generated"),
+ require("./dbcs-codec"),
+ require("./dbcs-data"),
+];
+
+// Put all encoding/alias/codec definitions to single object and export it.
+for (var i = 0; i < modules.length; i++) {
+ var module = modules[i];
+ for (var enc in module)
+ if (Object.prototype.hasOwnProperty.call(module, enc))
+ exports[enc] = module[enc];
+}
diff --git a/tools/node_modules/eslint/node_modules/iconv-lite/encodings/internal.js b/tools/node_modules/eslint/node_modules/iconv-lite/encodings/internal.js
new file mode 100644
index 0000000000..b0adf6a920
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/iconv-lite/encodings/internal.js
@@ -0,0 +1,188 @@
+"use strict";
+var Buffer = require("buffer").Buffer;
+
+// Export Node.js internal encodings.
+
+module.exports = {
+ // Encodings
+ utf8: { type: "_internal", bomAware: true},
+ cesu8: { type: "_internal", bomAware: true},
+ unicode11utf8: "utf8",
+
+ ucs2: { type: "_internal", bomAware: true},
+ utf16le: "ucs2",
+
+ binary: { type: "_internal" },
+ base64: { type: "_internal" },
+ hex: { type: "_internal" },
+
+ // Codec.
+ _internal: InternalCodec,
+};
+
+//------------------------------------------------------------------------------
+
+function InternalCodec(codecOptions, iconv) {
+ this.enc = codecOptions.encodingName;
+ this.bomAware = codecOptions.bomAware;
+
+ if (this.enc === "base64")
+ this.encoder = InternalEncoderBase64;
+ else if (this.enc === "cesu8") {
+ this.enc = "utf8"; // Use utf8 for decoding.
+ this.encoder = InternalEncoderCesu8;
+
+ // Add decoder for versions of Node not supporting CESU-8
+ if (new Buffer('eda0bdedb2a9', 'hex').toString() !== '💩') {
+ this.decoder = InternalDecoderCesu8;
+ this.defaultCharUnicode = iconv.defaultCharUnicode;
+ }
+ }
+}
+
+InternalCodec.prototype.encoder = InternalEncoder;
+InternalCodec.prototype.decoder = InternalDecoder;
+
+//------------------------------------------------------------------------------
+
+// We use node.js internal decoder. Its signature is the same as ours.
+var StringDecoder = require('string_decoder').StringDecoder;
+
+if (!StringDecoder.prototype.end) // Node v0.8 doesn't have this method.
+ StringDecoder.prototype.end = function() {};
+
+
+function InternalDecoder(options, codec) {
+ StringDecoder.call(this, codec.enc);
+}
+
+InternalDecoder.prototype = StringDecoder.prototype;
+
+
+//------------------------------------------------------------------------------
+// Encoder is mostly trivial
+
+function InternalEncoder(options, codec) {
+ this.enc = codec.enc;
+}
+
+InternalEncoder.prototype.write = function(str) {
+ return new Buffer(str, this.enc);
+}
+
+InternalEncoder.prototype.end = function() {
+}
+
+
+//------------------------------------------------------------------------------
+// Except base64 encoder, which must keep its state.
+
+function InternalEncoderBase64(options, codec) {
+ this.prevStr = '';
+}
+
+InternalEncoderBase64.prototype.write = function(str) {
+ str = this.prevStr + str;
+ var completeQuads = str.length - (str.length % 4);
+ this.prevStr = str.slice(completeQuads);
+ str = str.slice(0, completeQuads);
+
+ return new Buffer(str, "base64");
+}
+
+InternalEncoderBase64.prototype.end = function() {
+ return new Buffer(this.prevStr, "base64");
+}
+
+
+//------------------------------------------------------------------------------
+// CESU-8 encoder is also special.
+
+function InternalEncoderCesu8(options, codec) {
+}
+
+InternalEncoderCesu8.prototype.write = function(str) {
+ var buf = new Buffer(str.length * 3), bufIdx = 0;
+ for (var i = 0; i < str.length; i++) {
+ var charCode = str.charCodeAt(i);
+ // Naive implementation, but it works because CESU-8 is especially easy
+ // to convert from UTF-16 (which all JS strings are encoded in).
+ if (charCode < 0x80)
+ buf[bufIdx++] = charCode;
+ else if (charCode < 0x800) {
+ buf[bufIdx++] = 0xC0 + (charCode >>> 6);
+ buf[bufIdx++] = 0x80 + (charCode & 0x3f);
+ }
+ else { // charCode will always be < 0x10000 in javascript.
+ buf[bufIdx++] = 0xE0 + (charCode >>> 12);
+ buf[bufIdx++] = 0x80 + ((charCode >>> 6) & 0x3f);
+ buf[bufIdx++] = 0x80 + (charCode & 0x3f);
+ }
+ }
+ return buf.slice(0, bufIdx);
+}
+
+InternalEncoderCesu8.prototype.end = function() {
+}
+
+//------------------------------------------------------------------------------
+// CESU-8 decoder is not implemented in Node v4.0+
+
+function InternalDecoderCesu8(options, codec) {
+ this.acc = 0;
+ this.contBytes = 0;
+ this.accBytes = 0;
+ this.defaultCharUnicode = codec.defaultCharUnicode;
+}
+
+InternalDecoderCesu8.prototype.write = function(buf) {
+ var acc = this.acc, contBytes = this.contBytes, accBytes = this.accBytes,
+ res = '';
+ for (var i = 0; i < buf.length; i++) {
+ var curByte = buf[i];
+ if ((curByte & 0xC0) !== 0x80) { // Leading byte
+ if (contBytes > 0) { // Previous code is invalid
+ res += this.defaultCharUnicode;
+ contBytes = 0;
+ }
+
+ if (curByte < 0x80) { // Single-byte code
+ res += String.fromCharCode(curByte);
+ } else if (curByte < 0xE0) { // Two-byte code
+ acc = curByte & 0x1F;
+ contBytes = 1; accBytes = 1;
+ } else if (curByte < 0xF0) { // Three-byte code
+ acc = curByte & 0x0F;
+ contBytes = 2; accBytes = 1;
+ } else { // Four or more are not supported for CESU-8.
+ res += this.defaultCharUnicode;
+ }
+ } else { // Continuation byte
+ if (contBytes > 0) { // We're waiting for it.
+ acc = (acc << 6) | (curByte & 0x3f);
+ contBytes--; accBytes++;
+ if (contBytes === 0) {
+ // Check for overlong encoding, but support Modified UTF-8 (encoding NULL as C0 80)
+ if (accBytes === 2 && acc < 0x80 && acc > 0)
+ res += this.defaultCharUnicode;
+ else if (accBytes === 3 && acc < 0x800)
+ res += this.defaultCharUnicode;
+ else
+ // Actually add character.
+ res += String.fromCharCode(acc);
+ }
+ } else { // Unexpected continuation byte
+ res += this.defaultCharUnicode;
+ }
+ }
+ }
+ this.acc = acc; this.contBytes = contBytes; this.accBytes = accBytes;
+ return res;
+}
+
+InternalDecoderCesu8.prototype.end = function() {
+ var res = 0;
+ if (this.contBytes > 0)
+ res += this.defaultCharUnicode;
+ return res;
+}
diff --git a/tools/node_modules/eslint/node_modules/iconv-lite/encodings/sbcs-codec.js b/tools/node_modules/eslint/node_modules/iconv-lite/encodings/sbcs-codec.js
new file mode 100644
index 0000000000..7789e00ed0
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/iconv-lite/encodings/sbcs-codec.js
@@ -0,0 +1,73 @@
+"use strict";
+var Buffer = require("buffer").Buffer;
+
+// Single-byte codec. Needs a 'chars' string parameter that contains 256 or 128 chars that
+// correspond to encoded bytes (if 128 - then lower half is ASCII).
+
+exports._sbcs = SBCSCodec;
+function SBCSCodec(codecOptions, iconv) {
+ if (!codecOptions)
+ throw new Error("SBCS codec is called without the data.")
+
+ // Prepare char buffer for decoding.
+ if (!codecOptions.chars || (codecOptions.chars.length !== 128 && codecOptions.chars.length !== 256))
+ throw new Error("Encoding '"+codecOptions.type+"' has incorrect 'chars' (must be of len 128 or 256)");
+
+ if (codecOptions.chars.length === 128) {
+ var asciiString = "";
+ for (var i = 0; i < 128; i++)
+ asciiString += String.fromCharCode(i);
+ codecOptions.chars = asciiString + codecOptions.chars;
+ }
+
+ this.decodeBuf = new Buffer(codecOptions.chars, 'ucs2');
+
+ // Encoding buffer.
+ var encodeBuf = new Buffer(65536);
+ encodeBuf.fill(iconv.defaultCharSingleByte.charCodeAt(0));
+
+ for (var i = 0; i < codecOptions.chars.length; i++)
+ encodeBuf[codecOptions.chars.charCodeAt(i)] = i;
+
+ this.encodeBuf = encodeBuf;
+}
+
+SBCSCodec.prototype.encoder = SBCSEncoder;
+SBCSCodec.prototype.decoder = SBCSDecoder;
+
+
+function SBCSEncoder(options, codec) {
+ this.encodeBuf = codec.encodeBuf;
+}
+
+SBCSEncoder.prototype.write = function(str) {
+ var buf = new Buffer(str.length);
+ for (var i = 0; i < str.length; i++)
+ buf[i] = this.encodeBuf[str.charCodeAt(i)];
+
+ return buf;
+}
+
+SBCSEncoder.prototype.end = function() {
+}
+
+
+function SBCSDecoder(options, codec) {
+ this.decodeBuf = codec.decodeBuf;
+}
+
+SBCSDecoder.prototype.write = function(buf) {
+ // Strings are immutable in JS -> we use ucs2 buffer to speed up computations.
+ var decodeBuf = this.decodeBuf;
+ var newBuf = new Buffer(buf.length*2);
+ var idx1 = 0, idx2 = 0;
+ for (var i = 0; i < buf.length; i++) {
+ idx1 = buf[i]*2; idx2 = i*2;
+ newBuf[idx2] = decodeBuf[idx1];
+ newBuf[idx2+1] = decodeBuf[idx1+1];
+ }
+ return newBuf.toString('ucs2');
+}
+
+SBCSDecoder.prototype.end = function() {
+}
diff --git a/tools/node_modules/eslint/node_modules/iconv-lite/encodings/sbcs-data-generated.js b/tools/node_modules/eslint/node_modules/iconv-lite/encodings/sbcs-data-generated.js
new file mode 100644
index 0000000000..9b4823607b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/iconv-lite/encodings/sbcs-data-generated.js
@@ -0,0 +1,451 @@
+"use strict";
+
+// Generated data for sbcs codec. Don't edit manually. Regenerate using generation/gen-sbcs.js script.
+module.exports = {
+ "437": "cp437",
+ "737": "cp737",
+ "775": "cp775",
+ "850": "cp850",
+ "852": "cp852",
+ "855": "cp855",
+ "856": "cp856",
+ "857": "cp857",
+ "858": "cp858",
+ "860": "cp860",
+ "861": "cp861",
+ "862": "cp862",
+ "863": "cp863",
+ "864": "cp864",
+ "865": "cp865",
+ "866": "cp866",
+ "869": "cp869",
+ "874": "windows874",
+ "922": "cp922",
+ "1046": "cp1046",
+ "1124": "cp1124",
+ "1125": "cp1125",
+ "1129": "cp1129",
+ "1133": "cp1133",
+ "1161": "cp1161",
+ "1162": "cp1162",
+ "1163": "cp1163",
+ "1250": "windows1250",
+ "1251": "windows1251",
+ "1252": "windows1252",
+ "1253": "windows1253",
+ "1254": "windows1254",
+ "1255": "windows1255",
+ "1256": "windows1256",
+ "1257": "windows1257",
+ "1258": "windows1258",
+ "28591": "iso88591",
+ "28592": "iso88592",
+ "28593": "iso88593",
+ "28594": "iso88594",
+ "28595": "iso88595",
+ "28596": "iso88596",
+ "28597": "iso88597",
+ "28598": "iso88598",
+ "28599": "iso88599",
+ "28600": "iso885910",
+ "28601": "iso885911",
+ "28603": "iso885913",
+ "28604": "iso885914",
+ "28605": "iso885915",
+ "28606": "iso885916",
+ "windows874": {
+ "type": "_sbcs",
+ "chars": "€����…�����������‘’“”•–—�������� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����"
+ },
+ "win874": "windows874",
+ "cp874": "windows874",
+ "windows1250": {
+ "type": "_sbcs",
+ "chars": "€�‚�„…†‡�‰Š‹ŚŤŽŹ�‘’“”•–—�™š›śťžź ˇ˘Ł¤Ą¦§¨©Ş«¬­®Ż°±˛ł´µ¶·¸ąş»Ľ˝ľżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙"
+ },
+ "win1250": "windows1250",
+ "cp1250": "windows1250",
+ "windows1251": {
+ "type": "_sbcs",
+ "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊЌЋЏђ‘’“”•–—�™љ›њќћџ ЎўЈ¤Ґ¦§Ё©Є«¬­®Ї°±Ііґµ¶·ё№є»јЅѕїАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя"
+ },
+ "win1251": "windows1251",
+ "cp1251": "windows1251",
+ "windows1252": {
+ "type": "_sbcs",
+ "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ�Ž��‘’“”•–—˜™š›œ�žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ"
+ },
+ "win1252": "windows1252",
+ "cp1252": "windows1252",
+ "windows1253": {
+ "type": "_sbcs",
+ "chars": "€�‚ƒ„…†‡�‰�‹�����‘’“”•–—�™�›���� ΅Ά£¤¥¦§¨©�«¬­®―°±²³΄µ¶·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�"
+ },
+ "win1253": "windows1253",
+ "cp1253": "windows1253",
+ "windows1254": {
+ "type": "_sbcs",
+ "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ����‘’“”•–—˜™š›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ"
+ },
+ "win1254": "windows1254",
+ "cp1254": "windows1254",
+ "windows1255": {
+ "type": "_sbcs",
+ "chars": "€�‚ƒ„…†‡ˆ‰�‹�����‘’“”•–—˜™�›���� ¡¢£₪¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾¿ְֱֲֳִֵֶַָֹֺֻּֽ־ֿ׀ׁׂ׃װױײ׳״�������אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�"
+ },
+ "win1255": "windows1255",
+ "cp1255": "windows1255",
+ "windows1256": {
+ "type": "_sbcs",
+ "chars": "€پ‚ƒ„…†‡ˆ‰ٹ‹Œچژڈگ‘’“”•–—ک™ڑ›œ‌‍ں ،¢£¤¥¦§¨©ھ«¬­®¯°±²³´µ¶·¸¹؛»¼½¾؟ہءآأؤإئابةتثجحخدذرزسشصض×طظعغـفقكàلâمنهوçèéêëىيîïًٌٍَôُِ÷ّùْûü‎‏ے"
+ },
+ "win1256": "windows1256",
+ "cp1256": "windows1256",
+ "windows1257": {
+ "type": "_sbcs",
+ "chars": "€�‚�„…†‡�‰�‹�¨ˇ¸�‘’“”•–—�™�›�¯˛� �¢£¤�¦§Ø©Ŗ«¬­®Æ°±²³´µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž˙"
+ },
+ "win1257": "windows1257",
+ "cp1257": "windows1257",
+ "windows1258": {
+ "type": "_sbcs",
+ "chars": "€�‚ƒ„…†‡ˆ‰�‹Œ����‘’“”•–—˜™�›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ"
+ },
+ "win1258": "windows1258",
+ "cp1258": "windows1258",
+ "iso88591": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ"
+ },
+ "cp28591": "iso88591",
+ "iso88592": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ą˘Ł¤ĽŚ§¨ŠŞŤŹ­ŽŻ°ą˛ł´ľśˇ¸šşťź˝žżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙"
+ },
+ "cp28592": "iso88592",
+ "iso88593": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ħ˘£¤�Ĥ§¨İŞĞĴ­�Ż°ħ²³´µĥ·¸ışğĵ½�żÀÁÂ�ÄĊĈÇÈÉÊËÌÍÎÏ�ÑÒÓÔĠÖ×ĜÙÚÛÜŬŜßàáâ�äċĉçèéêëìíîï�ñòóôġö÷ĝùúûüŭŝ˙"
+ },
+ "cp28593": "iso88593",
+ "iso88594": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĸŖ¤ĨĻ§¨ŠĒĢŦ­Ž¯°ą˛ŗ´ĩļˇ¸šēģŧŊžŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎĪĐŅŌĶÔÕÖ×ØŲÚÛÜŨŪßāáâãäåæįčéęëėíîīđņōķôõö÷øųúûüũū˙"
+ },
+ "cp28594": "iso88594",
+ "iso88595": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂЃЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђѓєѕіїјљњћќ§ўџ"
+ },
+ "cp28595": "iso88595",
+ "iso88596": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ���¤�������،­�������������؛���؟�ءآأؤإئابةتثجحخدذرزسشصضطظعغ�����ـفقكلمنهوىيًٌٍَُِّْ�������������"
+ },
+ "cp28596": "iso88596",
+ "iso88597": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ‘’£€₯¦§¨©ͺ«¬­�―°±²³΄΅Ά·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�"
+ },
+ "cp28597": "iso88597",
+ "iso88598": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �¢£¤¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾��������������������������������‗אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�"
+ },
+ "cp28598": "iso88598",
+ "iso88599": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ"
+ },
+ "cp28599": "iso88599",
+ "iso885910": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĒĢĪĨĶ§ĻĐŠŦŽ­ŪŊ°ąēģīĩķ·ļđšŧž―ūŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎÏÐŅŌÓÔÕÖŨØŲÚÛÜÝÞßāáâãäåæįčéęëėíîïðņōóôõöũøųúûüýþĸ"
+ },
+ "cp28600": "iso885910",
+ "iso885911": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����"
+ },
+ "cp28601": "iso885911",
+ "iso885913": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ”¢£¤„¦§Ø©Ŗ«¬­®Æ°±²³“µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž’"
+ },
+ "cp28603": "iso885913",
+ "iso885914": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ḃḃ£ĊċḊ§Ẁ©ẂḋỲ­®ŸḞḟĠġṀṁ¶ṖẁṗẃṠỳẄẅṡÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŴÑÒÓÔÕÖṪØÙÚÛÜÝŶßàáâãäåæçèéêëìíîïŵñòóôõöṫøùúûüýŷÿ"
+ },
+ "cp28604": "iso885914",
+ "iso885915": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥Š§š©ª«¬­®¯°±²³Žµ¶·ž¹º»ŒœŸ¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ"
+ },
+ "cp28605": "iso885915",
+ "iso885916": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄąŁ€„Š§š©Ș«Ź­źŻ°±ČłŽ”¶·žčș»ŒœŸżÀÁÂĂÄĆÆÇÈÉÊËÌÍÎÏĐŃÒÓÔŐÖŚŰÙÚÛÜĘȚßàáâăäćæçèéêëìíîïđńòóôőöśűùúûüęțÿ"
+ },
+ "cp28606": "iso885916",
+ "cp437": {
+ "type": "_sbcs",
+ "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
+ },
+ "ibm437": "cp437",
+ "csibm437": "cp437",
+ "cp737": {
+ "type": "_sbcs",
+ "chars": "ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρσςτυφχψ░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ωάέήϊίόύϋώΆΈΉΊΌΎΏ±≥≤ΪΫ÷≈°∙·√ⁿ²■ "
+ },
+ "ibm737": "cp737",
+ "csibm737": "cp737",
+ "cp775": {
+ "type": "_sbcs",
+ "chars": "ĆüéāäģåćłēŖŗīŹÄÅÉæÆōöĢ¢ŚśÖÜø£ØפĀĪóŻżź”¦©®¬½¼Ł«»░▒▓│┤ĄČĘĖ╣║╗╝ĮŠ┐└┴┬├─┼ŲŪ╚╔╩╦╠═╬Žąčęėįšųūž┘┌█▄▌▐▀ÓßŌŃõÕµńĶķĻļņĒŅ’­±“¾¶§÷„°∙·¹³²■ "
+ },
+ "ibm775": "cp775",
+ "csibm775": "cp775",
+ "cp850": {
+ "type": "_sbcs",
+ "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈıÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ "
+ },
+ "ibm850": "cp850",
+ "csibm850": "cp850",
+ "cp852": {
+ "type": "_sbcs",
+ "chars": "ÇüéâäůćçłëŐőîŹÄĆÉĹĺôöĽľŚśÖÜŤťŁ×čáíóúĄąŽžĘ꬟Ⱥ«»░▒▓│┤ÁÂĚŞ╣║╗╝Żż┐└┴┬├─┼Ăă╚╔╩╦╠═╬¤đĐĎËďŇÍÎě┘┌█▄ŢŮ▀ÓßÔŃńňŠšŔÚŕŰýÝţ´­˝˛ˇ˘§÷¸°¨˙űŘř■ "
+ },
+ "ibm852": "cp852",
+ "csibm852": "cp852",
+ "cp855": {
+ "type": "_sbcs",
+ "chars": "ђЂѓЃёЁєЄѕЅіІїЇјЈљЉњЊћЋќЌўЎџЏюЮъЪаАбБцЦдДеЕфФгГ«»░▒▓│┤хХиИ╣║╗╝йЙ┐└┴┬├─┼кК╚╔╩╦╠═╬¤лЛмМнНоОп┘┌█▄Пя▀ЯрРсСтТуУжЖвВьЬ№­ыЫзЗшШэЭщЩчЧ§■ "
+ },
+ "ibm855": "cp855",
+ "csibm855": "cp855",
+ "cp856": {
+ "type": "_sbcs",
+ "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת�£�×����������®¬½¼�«»░▒▓│┤���©╣║╗╝¢¥┐└┴┬├─┼��╚╔╩╦╠═╬¤���������┘┌█▄¦�▀������µ�������¯´­±‗¾¶§÷¸°¨·¹³²■ "
+ },
+ "ibm856": "cp856",
+ "csibm856": "cp856",
+ "cp857": {
+ "type": "_sbcs",
+ "chars": "ÇüéâäàåçêëèïîıÄÅÉæÆôöòûùİÖÜø£ØŞşáíóúñÑĞ𿮬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ºªÊËÈ�ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµ�×ÚÛÙìÿ¯´­±�¾¶§÷¸°¨·¹³²■ "
+ },
+ "ibm857": "cp857",
+ "csibm857": "cp857",
+ "cp858": {
+ "type": "_sbcs",
+ "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈ€ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ "
+ },
+ "ibm858": "cp858",
+ "csibm858": "cp858",
+ "cp860": {
+ "type": "_sbcs",
+ "chars": "ÇüéâãàÁçêÊèÍÔìÃÂÉÀÈôõòÚùÌÕÜ¢£Ù₧ÓáíóúñѪº¿Ò¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
+ },
+ "ibm860": "cp860",
+ "csibm860": "cp860",
+ "cp861": {
+ "type": "_sbcs",
+ "chars": "ÇüéâäàåçêëèÐðÞÄÅÉæÆôöþûÝýÖÜø£Ø₧ƒáíóúÁÍÓÚ¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
+ },
+ "ibm861": "cp861",
+ "csibm861": "cp861",
+ "cp862": {
+ "type": "_sbcs",
+ "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
+ },
+ "ibm862": "cp862",
+ "csibm862": "cp862",
+ "cp863": {
+ "type": "_sbcs",
+ "chars": "ÇüéâÂà¶çêëèïî‗À§ÉÈÊôËÏûù¤ÔÜ¢£ÙÛƒ¦´óú¨¸³¯Î⌐¬½¼¾«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
+ },
+ "ibm863": "cp863",
+ "csibm863": "cp863",
+ "cp864": {
+ "type": "_sbcs",
+ "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$٪&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~°·∙√▒─│┼┤┬├┴┐┌└┘β∞φ±½¼≈«»ﻷﻸ��ﻻﻼ� ­ﺂ£¤ﺄ��ﺎﺏﺕﺙ،ﺝﺡﺥ٠١٢٣٤٥٦٧٨٩ﻑ؛ﺱﺵﺹ؟¢ﺀﺁﺃﺅﻊﺋﺍﺑﺓﺗﺛﺟﺣﺧﺩﺫﺭﺯﺳﺷﺻﺿﻁﻅﻋﻏ¦¬÷×ﻉـﻓﻗﻛﻟﻣﻧﻫﻭﻯﻳﺽﻌﻎﻍﻡﹽّﻥﻩﻬﻰﻲﻐﻕﻵﻶﻝﻙﻱ■�"
+ },
+ "ibm864": "cp864",
+ "csibm864": "cp864",
+ "cp865": {
+ "type": "_sbcs",
+ "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø₧ƒáíóúñѪº¿⌐¬½¼¡«¤░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
+ },
+ "ibm865": "cp865",
+ "csibm865": "cp865",
+ "cp866": {
+ "type": "_sbcs",
+ "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№¤■ "
+ },
+ "ibm866": "cp866",
+ "csibm866": "cp866",
+ "cp869": {
+ "type": "_sbcs",
+ "chars": "������Ά�·¬¦‘’Έ―ΉΊΪΌ��ΎΫ©Ώ²³ά£έήίϊΐόύΑΒΓΔΕΖΗ½ΘΙ«»░▒▓│┤ΚΛΜΝ╣║╗╝ΞΟ┐└┴┬├─┼ΠΡ╚╔╩╦╠═╬ΣΤΥΦΧΨΩαβγ┘┌█▄δε▀ζηθικλμνξοπρσςτ΄­±υφχ§ψ΅°¨ωϋΰώ■ "
+ },
+ "ibm869": "cp869",
+ "csibm869": "cp869",
+ "cp922": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®‾°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŠÑÒÓÔÕÖ×ØÙÚÛÜÝŽßàáâãäåæçèéêëìíîïšñòóôõö÷øùúûüýžÿ"
+ },
+ "ibm922": "cp922",
+ "csibm922": "cp922",
+ "cp1046": {
+ "type": "_sbcs",
+ "chars": "ﺈ×÷ﹱˆ■│─┐┌└┘ﹹﹻﹽﹿﹷﺊﻰﻳﻲﻎﻏﻐﻶﻸﻺﻼ ¤ﺋﺑﺗﺛﺟﺣ،­ﺧﺳ٠١٢٣٤٥٦٧٨٩ﺷ؛ﺻﺿﻊ؟ﻋءآأؤإئابةتثجحخدذرزسشصضطﻇعغﻌﺂﺄﺎﻓـفقكلمنهوىيًٌٍَُِّْﻗﻛﻟﻵﻷﻹﻻﻣﻧﻬﻩ�"
+ },
+ "ibm1046": "cp1046",
+ "csibm1046": "cp1046",
+ "cp1124": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂҐЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђґєѕіїјљњћќ§ўџ"
+ },
+ "ibm1124": "cp1124",
+ "csibm1124": "cp1124",
+ "cp1125": {
+ "type": "_sbcs",
+ "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёҐґЄєІіЇї·√№¤■ "
+ },
+ "ibm1125": "cp1125",
+ "csibm1125": "cp1125",
+ "cp1129": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ"
+ },
+ "ibm1129": "cp1129",
+ "csibm1129": "cp1129",
+ "cp1133": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ກຂຄງຈສຊຍດຕຖທນບປຜຝພຟມຢຣລວຫອຮ���ຯະາຳິີຶືຸູຼັົຽ���ເແໂໃໄ່້໊໋໌ໍໆ�ໜໝ₭����������������໐໑໒໓໔໕໖໗໘໙��¢¬¦�"
+ },
+ "ibm1133": "cp1133",
+ "csibm1133": "cp1133",
+ "cp1161": {
+ "type": "_sbcs",
+ "chars": "��������������������������������่กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู้๊๋€฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛¢¬¦ "
+ },
+ "ibm1161": "cp1161",
+ "csibm1161": "cp1161",
+ "cp1162": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����"
+ },
+ "ibm1162": "cp1162",
+ "csibm1162": "cp1162",
+ "cp1163": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ"
+ },
+ "ibm1163": "cp1163",
+ "csibm1163": "cp1163",
+ "maccroatian": {
+ "type": "_sbcs",
+ "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈Ć«Č… ÀÃÕŒœĐ—“”‘’÷◊�©⁄¤‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ"
+ },
+ "maccyrillic": {
+ "type": "_sbcs",
+ "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°¢£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµ∂ЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤"
+ },
+ "macgreek": {
+ "type": "_sbcs",
+ "chars": "Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦­ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ�"
+ },
+ "maciceland": {
+ "type": "_sbcs",
+ "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüÝ°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ"
+ },
+ "macroman": {
+ "type": "_sbcs",
+ "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ"
+ },
+ "macromania": {
+ "type": "_sbcs",
+ "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂŞ∞±≤≥¥µ∂∑∏π∫ªºΩăş¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›Ţţ‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ"
+ },
+ "macthai": {
+ "type": "_sbcs",
+ "chars": "«»…“”�•‘’� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู​–—฿เแโใไๅๆ็่้๊๋์ํ™๏๐๑๒๓๔๕๖๗๘๙®©����"
+ },
+ "macturkish": {
+ "type": "_sbcs",
+ "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙ�ˆ˜¯˘˙˚¸˝˛ˇ"
+ },
+ "macukraine": {
+ "type": "_sbcs",
+ "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤"
+ },
+ "koi8r": {
+ "type": "_sbcs",
+ "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ё╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡Ё╢╣╤╥╦╧╨╩╪╫╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ"
+ },
+ "koi8u": {
+ "type": "_sbcs",
+ "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґ╝╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪Ґ╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ"
+ },
+ "koi8ru": {
+ "type": "_sbcs",
+ "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґў╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪ҐЎ©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ"
+ },
+ "koi8t": {
+ "type": "_sbcs",
+ "chars": "қғ‚Ғ„…†‡�‰ҳ‹ҲҷҶ�Қ‘’“”•–—�™�›�����ӯӮё¤ӣ¦§���«¬­®�°±²Ё�Ӣ¶·�№�»���©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ"
+ },
+ "armscii8": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �և։)(»«—.՝,-֊…՜՛՞ԱաԲբԳգԴդԵեԶզԷէԸըԹթԺժԻիԼլԽխԾծԿկՀհՁձՂղՃճՄմՅյՆնՇշՈոՉչՊպՋջՌռՍսՎվՏտՐրՑցՒւՓփՔքՕօՖֆ՚�"
+ },
+ "rk1048": {
+ "type": "_sbcs",
+ "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊҚҺЏђ‘’“”•–—�™љ›њқһџ ҰұӘ¤Ө¦§Ё©Ғ«¬­®Ү°±Ііөµ¶·ё№ғ»әҢңүАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя"
+ },
+ "tcvn": {
+ "type": "_sbcs",
+ "chars": "\u0000ÚỤ\u0003ỪỬỮ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010ỨỰỲỶỸÝỴ\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÀẢÃÁẠẶẬÈẺẼÉẸỆÌỈĨÍỊÒỎÕÓỌỘỜỞỠỚỢÙỦŨ ĂÂÊÔƠƯĐăâêôơưđẶ̀̀̉̃́àảãáạẲằẳẵắẴẮẦẨẪẤỀặầẩẫấậèỂẻẽéẹềểễếệìỉỄẾỒĩíịòỔỏõóọồổỗốộờởỡớợùỖủũúụừửữứựỳỷỹýỵỐ"
+ },
+ "georgianacademy": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზთიკლმნოპჟრსტუფქღყშჩცძწჭხჯჰჱჲჳჴჵჶçèéêëìíîïðñòóôõö÷øùúûüýþÿ"
+ },
+ "georgianps": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზჱთიკლმნჲოპჟრსტჳუფქღყშჩცძწჭხჴჯჰჵæçèéêëìíîïðñòóôõö÷øùúûüýþÿ"
+ },
+ "pt154": {
+ "type": "_sbcs",
+ "chars": "ҖҒӮғ„…ҶҮҲүҠӢҢҚҺҸҗ‘’“”•–—ҳҷҡӣңқһҹ ЎўЈӨҘҰ§Ё©Ә«¬ӯ®Ҝ°ұІіҙө¶·ё№ә»јҪҫҝАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя"
+ },
+ "viscii": {
+ "type": "_sbcs",
+ "chars": "\u0000\u0001Ẳ\u0003\u0004ẴẪ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013Ỷ\u0015\u0016\u0017\u0018Ỹ\u001a\u001b\u001c\u001dỴ\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ẠẮẰẶẤẦẨẬẼẸẾỀỂỄỆỐỒỔỖỘỢỚỜỞỊỎỌỈỦŨỤỲÕắằặấầẩậẽẹếềểễệốồổỗỠƠộờởịỰỨỪỬơớƯÀÁÂÃẢĂẳẵÈÉÊẺÌÍĨỳĐứÒÓÔạỷừửÙÚỹỵÝỡưàáâãảăữẫèéêẻìíĩỉđựòóôõỏọụùúũủýợỮ"
+ },
+ "iso646cn": {
+ "type": "_sbcs",
+ "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#¥%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������"
+ },
+ "iso646jp": {
+ "type": "_sbcs",
+ "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[¥]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������"
+ },
+ "hproman8": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ÀÂÈÊËÎÏ´ˋˆ¨˜ÙÛ₤¯Ýý°ÇçÑñ¡¿¤£¥§ƒ¢âêôûáéóúàèòùäëöüÅîØÆåíøæÄìÖÜÉïßÔÁÃãÐðÍÌÓÒÕõŠšÚŸÿÞþ·µ¶¾—¼½ªº«■»±�"
+ },
+ "macintosh": {
+ "type": "_sbcs",
+ "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ"
+ },
+ "ascii": {
+ "type": "_sbcs",
+ "chars": "��������������������������������������������������������������������������������������������������������������������������������"
+ },
+ "tis620": {
+ "type": "_sbcs",
+ "chars": "���������������������������������กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����"
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/iconv-lite/encodings/sbcs-data.js b/tools/node_modules/eslint/node_modules/iconv-lite/encodings/sbcs-data.js
new file mode 100644
index 0000000000..2d6f846ad4
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/iconv-lite/encodings/sbcs-data.js
@@ -0,0 +1,169 @@
+"use strict";
+
+// Manually added data to be used by sbcs codec in addition to generated one.
+
+module.exports = {
+ // Not supported by iconv, not sure why.
+ "10029": "maccenteuro",
+ "maccenteuro": {
+ "type": "_sbcs",
+ "chars": "ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ"
+ },
+
+ "808": "cp808",
+ "ibm808": "cp808",
+ "cp808": {
+ "type": "_sbcs",
+ "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№€■ "
+ },
+
+ // Aliases of generated encodings.
+ "ascii8bit": "ascii",
+ "usascii": "ascii",
+ "ansix34": "ascii",
+ "ansix341968": "ascii",
+ "ansix341986": "ascii",
+ "csascii": "ascii",
+ "cp367": "ascii",
+ "ibm367": "ascii",
+ "isoir6": "ascii",
+ "iso646us": "ascii",
+ "iso646irv": "ascii",
+ "us": "ascii",
+
+ "latin1": "iso88591",
+ "latin2": "iso88592",
+ "latin3": "iso88593",
+ "latin4": "iso88594",
+ "latin5": "iso88599",
+ "latin6": "iso885910",
+ "latin7": "iso885913",
+ "latin8": "iso885914",
+ "latin9": "iso885915",
+ "latin10": "iso885916",
+
+ "csisolatin1": "iso88591",
+ "csisolatin2": "iso88592",
+ "csisolatin3": "iso88593",
+ "csisolatin4": "iso88594",
+ "csisolatincyrillic": "iso88595",
+ "csisolatinarabic": "iso88596",
+ "csisolatingreek" : "iso88597",
+ "csisolatinhebrew": "iso88598",
+ "csisolatin5": "iso88599",
+ "csisolatin6": "iso885910",
+
+ "l1": "iso88591",
+ "l2": "iso88592",
+ "l3": "iso88593",
+ "l4": "iso88594",
+ "l5": "iso88599",
+ "l6": "iso885910",
+ "l7": "iso885913",
+ "l8": "iso885914",
+ "l9": "iso885915",
+ "l10": "iso885916",
+
+ "isoir14": "iso646jp",
+ "isoir57": "iso646cn",
+ "isoir100": "iso88591",
+ "isoir101": "iso88592",
+ "isoir109": "iso88593",
+ "isoir110": "iso88594",
+ "isoir144": "iso88595",
+ "isoir127": "iso88596",
+ "isoir126": "iso88597",
+ "isoir138": "iso88598",
+ "isoir148": "iso88599",
+ "isoir157": "iso885910",
+ "isoir166": "tis620",
+ "isoir179": "iso885913",
+ "isoir199": "iso885914",
+ "isoir203": "iso885915",
+ "isoir226": "iso885916",
+
+ "cp819": "iso88591",
+ "ibm819": "iso88591",
+
+ "cyrillic": "iso88595",
+
+ "arabic": "iso88596",
+ "arabic8": "iso88596",
+ "ecma114": "iso88596",
+ "asmo708": "iso88596",
+
+ "greek" : "iso88597",
+ "greek8" : "iso88597",
+ "ecma118" : "iso88597",
+ "elot928" : "iso88597",
+
+ "hebrew": "iso88598",
+ "hebrew8": "iso88598",
+
+ "turkish": "iso88599",
+ "turkish8": "iso88599",
+
+ "thai": "iso885911",
+ "thai8": "iso885911",
+
+ "celtic": "iso885914",
+ "celtic8": "iso885914",
+ "isoceltic": "iso885914",
+
+ "tis6200": "tis620",
+ "tis62025291": "tis620",
+ "tis62025330": "tis620",
+
+ "10000": "macroman",
+ "10006": "macgreek",
+ "10007": "maccyrillic",
+ "10079": "maciceland",
+ "10081": "macturkish",
+
+ "cspc8codepage437": "cp437",
+ "cspc775baltic": "cp775",
+ "cspc850multilingual": "cp850",
+ "cspcp852": "cp852",
+ "cspc862latinhebrew": "cp862",
+ "cpgr": "cp869",
+
+ "msee": "cp1250",
+ "mscyrl": "cp1251",
+ "msansi": "cp1252",
+ "msgreek": "cp1253",
+ "msturk": "cp1254",
+ "mshebr": "cp1255",
+ "msarab": "cp1256",
+ "winbaltrim": "cp1257",
+
+ "cp20866": "koi8r",
+ "20866": "koi8r",
+ "ibm878": "koi8r",
+ "cskoi8r": "koi8r",
+
+ "cp21866": "koi8u",
+ "21866": "koi8u",
+ "ibm1168": "koi8u",
+
+ "strk10482002": "rk1048",
+
+ "tcvn5712": "tcvn",
+ "tcvn57121": "tcvn",
+
+ "gb198880": "iso646cn",
+ "cn": "iso646cn",
+
+ "csiso14jisc6220ro": "iso646jp",
+ "jisc62201969ro": "iso646jp",
+ "jp": "iso646jp",
+
+ "cshproman8": "hproman8",
+ "r8": "hproman8",
+ "roman8": "hproman8",
+ "xroman8": "hproman8",
+ "ibm1051": "hproman8",
+
+ "mac": "macintosh",
+ "csmacintosh": "macintosh",
+};
+
diff --git a/tools/node_modules/eslint/node_modules/iconv-lite/encodings/tables/big5-added.json b/tools/node_modules/eslint/node_modules/iconv-lite/encodings/tables/big5-added.json
new file mode 100644
index 0000000000..3c3d3c2f7b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/iconv-lite/encodings/tables/big5-added.json
@@ -0,0 +1,122 @@
+[
+["8740","䏰䰲䘃䖦䕸𧉧䵷䖳𧲱䳢𧳅㮕䜶䝄䱇䱀𤊿𣘗𧍒𦺋𧃒䱗𪍑䝏䗚䲅𧱬䴇䪤䚡𦬣爥𥩔𡩣𣸆𣽡晍囻"],
+["8767","綕夝𨮹㷴霴𧯯寛𡵞媤㘥𩺰嫑宷峼杮薓𩥅瑡璝㡵𡵓𣚞𦀡㻬"],
+["87a1","𥣞㫵竼龗𤅡𨤍𣇪𠪊𣉞䌊蒄龖鐯䤰蘓墖靊鈘秐稲晠権袝瑌篅枂稬剏遆㓦珄𥶹瓆鿇垳䤯呌䄱𣚎堘穲𧭥讏䚮𦺈䆁𥶙箮𢒼鿈𢓁𢓉𢓌鿉蔄𣖻䂴鿊䓡𪷿拁灮鿋"],
+["8840","㇀",4,"𠄌㇅𠃑𠃍㇆㇇𠃋𡿨㇈𠃊㇉㇊㇋㇌𠄎㇍㇎ĀÁǍÀĒÉĚÈŌÓǑÒ࿿Ê̄Ế࿿Ê̌ỀÊāáǎàɑēéěèīíǐìōóǒòūúǔùǖǘǚ"],
+["88a1","ǜü࿿ê̄ế࿿ê̌ềêɡ⏚⏛"],
+["8940","𪎩𡅅"],
+["8943","攊"],
+["8946","丽滝鵎釟"],
+["894c","𧜵撑会伨侨兖兴农凤务动医华发变团声处备夲头学实実岚庆总斉柾栄桥济炼电纤纬纺织经统缆缷艺苏药视设询车轧轮"],
+["89a1","琑糼緍楆竉刧"],
+["89ab","醌碸酞肼"],
+["89b0","贋胶𠧧"],
+["89b5","肟黇䳍鷉鸌䰾𩷶𧀎鸊𪄳㗁"],
+["89c1","溚舾甙"],
+["89c5","䤑马骏龙禇𨑬𡷊𠗐𢫦两亁亀亇亿仫伷㑌侽㹈倃傈㑽㒓㒥円夅凛凼刅争剹劐匧㗇厩㕑厰㕓参吣㕭㕲㚁咓咣咴咹哐哯唘唣唨㖘唿㖥㖿嗗㗅"],
+["8a40","𧶄唥"],
+["8a43","𠱂𠴕𥄫喐𢳆㧬𠍁蹆𤶸𩓥䁓𨂾睺𢰸㨴䟕𨅝𦧲𤷪擝𠵼𠾴𠳕𡃴撍蹾𠺖𠰋𠽤𢲩𨉖𤓓"],
+["8a64","𠵆𩩍𨃩䟴𤺧𢳂骲㩧𩗴㿭㔆𥋇𩟔𧣈𢵄鵮頕"],
+["8a76","䏙𦂥撴哣𢵌𢯊𡁷㧻𡁯"],
+["8aa1","𦛚𦜖𧦠擪𥁒𠱃蹨𢆡𨭌𠜱"],
+["8aac","䠋𠆩㿺塳𢶍"],
+["8ab2","𤗈𠓼𦂗𠽌𠶖啹䂻䎺"],
+["8abb","䪴𢩦𡂝膪飵𠶜捹㧾𢝵跀嚡摼㹃"],
+["8ac9","𪘁𠸉𢫏𢳉"],
+["8ace","𡃈𣧂㦒㨆𨊛㕸𥹉𢃇噒𠼱𢲲𩜠㒼氽𤸻"],
+["8adf","𧕴𢺋𢈈𪙛𨳍𠹺𠰴𦠜羓𡃏𢠃𢤹㗻𥇣𠺌𠾍𠺪㾓𠼰𠵇𡅏𠹌"],
+["8af6","𠺫𠮩𠵈𡃀𡄽㿹𢚖搲𠾭"],
+["8b40","𣏴𧘹𢯎𠵾𠵿𢱑𢱕㨘𠺘𡃇𠼮𪘲𦭐𨳒𨶙𨳊閪哌苄喹"],
+["8b55","𩻃鰦骶𧝞𢷮煀腭胬尜𦕲脴㞗卟𨂽醶𠻺𠸏𠹷𠻻㗝𤷫㘉𠳖嚯𢞵𡃉𠸐𠹸𡁸𡅈𨈇𡑕𠹹𤹐𢶤婔𡀝𡀞𡃵𡃶垜𠸑"],
+["8ba1","𧚔𨋍𠾵𠹻𥅾㜃𠾶𡆀𥋘𪊽𤧚𡠺𤅷𨉼墙剨㘚𥜽箲孨䠀䬬鼧䧧鰟鮍𥭴𣄽嗻㗲嚉丨夂𡯁屮靑𠂆乛亻㔾尣彑忄㣺扌攵歺氵氺灬爫丬犭𤣩罒礻糹罓𦉪㓁"],
+["8bde","𦍋耂肀𦘒𦥑卝衤见𧢲讠贝钅镸长门𨸏韦页风飞饣𩠐鱼鸟黄歯龜丷𠂇阝户钢"],
+["8c40","倻淾𩱳龦㷉袏𤅎灷峵䬠𥇍㕙𥴰愢𨨲辧釶熑朙玺𣊁𪄇㲋𡦀䬐磤琂冮𨜏䀉橣𪊺䈣蘏𠩯稪𩥇𨫪靕灍匤𢁾鏴盙𨧣龧矝亣俰傼丯众龨吴綋墒壐𡶶庒庙忂𢜒斋"],
+["8ca1","𣏹椙橃𣱣泿"],
+["8ca7","爀𤔅玌㻛𤨓嬕璹讃𥲤𥚕窓篬糃繬苸薗龩袐龪躹龫迏蕟駠鈡龬𨶹𡐿䁱䊢娚"],
+["8cc9","顨杫䉶圽"],
+["8cce","藖𤥻芿𧄍䲁𦵴嵻𦬕𦾾龭龮宖龯曧繛湗秊㶈䓃𣉖𢞖䎚䔶"],
+["8ce6","峕𣬚諹屸㴒𣕑嵸龲煗䕘𤃬𡸣䱷㥸㑊𠆤𦱁諌侴𠈹妿腬顖𩣺弻"],
+["8d40","𠮟"],
+["8d42","𢇁𨥭䄂䚻𩁹㼇龳𪆵䃸㟖䛷𦱆䅼𨚲𧏿䕭㣔𥒚䕡䔛䶉䱻䵶䗪㿈𤬏㙡䓞䒽䇭崾嵈嵖㷼㠏嶤嶹㠠㠸幂庽弥徃㤈㤔㤿㥍惗愽峥㦉憷憹懏㦸戬抐拥挘㧸嚱"],
+["8da1","㨃揢揻搇摚㩋擀崕嘡龟㪗斆㪽旿晓㫲暒㬢朖㭂枤栀㭘桊梄㭲㭱㭻椉楃牜楤榟榅㮼槖㯝橥橴橱檂㯬檙㯲檫檵櫔櫶殁毁毪汵沪㳋洂洆洦涁㳯涤涱渕渘温溆𨧀溻滢滚齿滨滩漤漴㵆𣽁澁澾㵪㵵熷岙㶊瀬㶑灐灔灯灿炉𠌥䏁㗱𠻘"],
+["8e40","𣻗垾𦻓焾𥟠㙎榢𨯩孴穉𥣡𩓙穥穽𥦬窻窰竂竃燑𦒍䇊竚竝竪䇯咲𥰁笋筕笩𥌎𥳾箢筯莜𥮴𦱿篐萡箒箸𥴠㶭𥱥蒒篺簆簵𥳁籄粃𤢂粦晽𤕸糉糇糦籴糳糵糎"],
+["8ea1","繧䔝𦹄絝𦻖璍綉綫焵綳緒𤁗𦀩緤㴓緵𡟹緥𨍭縝𦄡𦅚繮纒䌫鑬縧罀罁罇礶𦋐駡羗𦍑羣𡙡𠁨䕜𣝦䔃𨌺翺𦒉者耈耝耨耯𪂇𦳃耻耼聡𢜔䦉𦘦𣷣𦛨朥肧𨩈脇脚墰𢛶汿𦒘𤾸擧𡒊舘𡡞橓𤩥𤪕䑺舩𠬍𦩒𣵾俹𡓽蓢荢𦬊𤦧𣔰𡝳𣷸芪椛芳䇛"],
+["8f40","蕋苐茚𠸖𡞴㛁𣅽𣕚艻苢茘𣺋𦶣𦬅𦮗𣗎㶿茝嗬莅䔋𦶥莬菁菓㑾𦻔橗蕚㒖𦹂𢻯葘𥯤葱㷓䓤檧葊𣲵祘蒨𦮖𦹷𦹃蓞萏莑䒠蒓蓤𥲑䉀𥳀䕃蔴嫲𦺙䔧蕳䔖枿蘖"],
+["8fa1","𨘥𨘻藁𧂈蘂𡖂𧃍䕫䕪蘨㙈𡢢号𧎚虾蝱𪃸蟮𢰧螱蟚蠏噡虬桖䘏衅衆𧗠𣶹𧗤衞袜䙛袴袵揁装睷𧜏覇覊覦覩覧覼𨨥觧𧤤𧪽誜瞓釾誐𧩙竩𧬺𣾏䜓𧬸煼謌謟𥐰𥕥謿譌譍誩𤩺讐讛誯𡛟䘕衏貛𧵔𧶏貫㜥𧵓賖𧶘𧶽贒贃𡤐賛灜贑𤳉㻐起"],
+["9040","趩𨀂𡀔𤦊㭼𨆼𧄌竧躭躶軃鋔輙輭𨍥𨐒辥錃𪊟𠩐辳䤪𨧞𨔽𣶻廸𣉢迹𪀔𨚼𨔁𢌥㦀𦻗逷𨔼𧪾遡𨕬𨘋邨𨜓郄𨛦邮都酧㫰醩釄粬𨤳𡺉鈎沟鉁鉢𥖹銹𨫆𣲛𨬌𥗛"],
+["90a1","𠴱錬鍫𨫡𨯫炏嫃𨫢𨫥䥥鉄𨯬𨰹𨯿鍳鑛躼閅閦鐦閠濶䊹𢙺𨛘𡉼𣸮䧟氜陻隖䅬隣𦻕懚隶磵𨫠隽双䦡𦲸𠉴𦐐𩂯𩃥𤫑𡤕𣌊霱虂霶䨏䔽䖅𤫩灵孁霛靜𩇕靗孊𩇫靟鐥僐𣂷𣂼鞉鞟鞱鞾韀韒韠𥑬韮琜𩐳響韵𩐝𧥺䫑頴頳顋顦㬎𧅵㵑𠘰𤅜"],
+["9140","𥜆飊颷飈飇䫿𦴧𡛓喰飡飦飬鍸餹𤨩䭲𩡗𩤅駵騌騻騐驘𥜥㛄𩂱𩯕髠髢𩬅髴䰎鬔鬭𨘀倴鬴𦦨㣃𣁽魐魀𩴾婅𡡣鮎𤉋鰂鯿鰌𩹨鷔𩾷𪆒𪆫𪃡𪄣𪇟鵾鶃𪄴鸎梈"],
+["91a1","鷄𢅛𪆓𪈠𡤻𪈳鴹𪂹𪊴麐麕麞麢䴴麪麯𤍤黁㭠㧥㴝伲㞾𨰫鼂鼈䮖鐤𦶢鼗鼖鼹嚟嚊齅馸𩂋韲葿齢齩竜龎爖䮾𤥵𤦻煷𤧸𤍈𤩑玞𨯚𡣺禟𨥾𨸶鍩鏳𨩄鋬鎁鏋𨥬𤒹爗㻫睲穃烐𤑳𤏸煾𡟯炣𡢾𣖙㻇𡢅𥐯𡟸㜢𡛻𡠹㛡𡝴𡣑𥽋㜣𡛀坛𤨥𡏾𡊨"],
+["9240","𡏆𡒶蔃𣚦蔃葕𤦔𧅥𣸱𥕜𣻻𧁒䓴𣛮𩦝𦼦柹㜳㰕㷧塬𡤢栐䁗𣜿𤃡𤂋𤄏𦰡哋嚞𦚱嚒𠿟𠮨𠸍鏆𨬓鎜仸儫㠙𤐶亼𠑥𠍿佋侊𥙑婨𠆫𠏋㦙𠌊𠐔㐵伩𠋀𨺳𠉵諚𠈌亘"],
+["92a1","働儍侢伃𤨎𣺊佂倮偬傁俌俥偘僼兙兛兝兞湶𣖕𣸹𣺿浲𡢄𣺉冨凃𠗠䓝𠒣𠒒𠒑赺𨪜𠜎剙劤𠡳勡鍮䙺熌𤎌𠰠𤦬𡃤槑𠸝瑹㻞璙琔瑖玘䮎𤪼𤂍叐㖄爏𤃉喴𠍅响𠯆圝鉝雴鍦埝垍坿㘾壋媙𨩆𡛺𡝯𡜐娬妸銏婾嫏娒𥥆𡧳𡡡𤊕㛵洅瑃娡𥺃"],
+["9340","媁𨯗𠐓鏠璌𡌃焅䥲鐈𨧻鎽㞠尞岞幞幈𡦖𡥼𣫮廍孏𡤃𡤄㜁𡢠㛝𡛾㛓脪𨩇𡶺𣑲𨦨弌弎𡤧𡞫婫𡜻孄蘔𧗽衠恾𢡠𢘫忛㺸𢖯𢖾𩂈𦽳懀𠀾𠁆𢘛憙憘恵𢲛𢴇𤛔𩅍"],
+["93a1","摱𤙥𢭪㨩𢬢𣑐𩣪𢹸挷𪑛撶挱揑𤧣𢵧护𢲡搻敫楲㯴𣂎𣊭𤦉𣊫唍𣋠𡣙𩐿曎𣊉𣆳㫠䆐𥖄𨬢𥖏𡛼𥕛𥐥磮𣄃𡠪𣈴㑤𣈏𣆂𤋉暎𦴤晫䮓昰𧡰𡷫晣𣋒𣋡昞𥡲㣑𣠺𣞼㮙𣞢𣏾瓐㮖枏𤘪梶栞㯄檾㡣𣟕𤒇樳橒櫉欅𡤒攑梘橌㯗橺歗𣿀𣲚鎠鋲𨯪𨫋"],
+["9440","銉𨀞𨧜鑧涥漋𤧬浧𣽿㶏渄𤀼娽渊塇洤硂焻𤌚𤉶烱牐犇犔𤞏𤜥兹𤪤𠗫瑺𣻸𣙟𤩊𤤗𥿡㼆㺱𤫟𨰣𣼵悧㻳瓌琼鎇琷䒟𦷪䕑疃㽣𤳙𤴆㽘畕癳𪗆㬙瑨𨫌𤦫𤦎㫻"],
+["94a1","㷍𤩎㻿𤧅𤣳釺圲鍂𨫣𡡤僟𥈡𥇧睸𣈲眎眏睻𤚗𣞁㩞𤣰琸璛㺿𤪺𤫇䃈𤪖𦆮錇𥖁砞碍碈磒珐祙𧝁𥛣䄎禛蒖禥樭𣻺稺秴䅮𡛦䄲鈵秱𠵌𤦌𠊙𣶺𡝮㖗啫㕰㚪𠇔𠰍竢婙𢛵𥪯𥪜娍𠉛磰娪𥯆竾䇹籝籭䈑𥮳𥺼𥺦糍𤧹𡞰粎籼粮檲緜縇緓罎𦉡"],
+["9540","𦅜𧭈綗𥺂䉪𦭵𠤖柖𠁎𣗏埄𦐒𦏸𤥢翝笧𠠬𥫩𥵃笌𥸎駦虅驣樜𣐿㧢𤧷𦖭騟𦖠蒀𧄧𦳑䓪脷䐂胆脉腂𦞴飃𦩂艢艥𦩑葓𦶧蘐𧈛媆䅿𡡀嬫𡢡嫤𡣘蚠蜨𣶏蠭𧐢娂"],
+["95a1","衮佅袇袿裦襥襍𥚃襔𧞅𧞄𨯵𨯙𨮜𨧹㺭蒣䛵䛏㟲訽訜𩑈彍鈫𤊄旔焩烄𡡅鵭貟賩𧷜妚矃姰䍮㛔踪躧𤰉輰轊䋴汘澻𢌡䢛潹溋𡟚鯩㚵𤤯邻邗啱䤆醻鐄𨩋䁢𨫼鐧𨰝𨰻蓥訫閙閧閗閖𨴴瑅㻂𤣿𤩂𤏪㻧𣈥随𨻧𨹦𨹥㻌𤧭𤩸𣿮琒瑫㻼靁𩂰"],
+["9640","桇䨝𩂓𥟟靝鍨𨦉𨰦𨬯𦎾銺嬑譩䤼珹𤈛鞛靱餸𠼦巁𨯅𤪲頟𩓚鋶𩗗釥䓀𨭐𤩧𨭤飜𨩅㼀鈪䤥萔餻饍𧬆㷽馛䭯馪驜𨭥𥣈檏騡嫾騯𩣱䮐𩥈馼䮽䮗鍽塲𡌂堢𤦸"],
+["96a1","𡓨硄𢜟𣶸棅㵽鑘㤧慐𢞁𢥫愇鱏鱓鱻鰵鰐魿鯏𩸭鮟𪇵𪃾鴡䲮𤄄鸘䲰鴌𪆴𪃭𪃳𩤯鶥蒽𦸒𦿟𦮂藼䔳𦶤𦺄𦷰萠藮𦸀𣟗𦁤秢𣖜𣙀䤭𤧞㵢鏛銾鍈𠊿碹鉷鑍俤㑀遤𥕝砽硔碶硋𡝗𣇉𤥁㚚佲濚濙瀞瀞吔𤆵垻壳垊鴖埗焴㒯𤆬燫𦱀𤾗嬨𡞵𨩉"],
+["9740","愌嫎娋䊼𤒈㜬䭻𨧼鎻鎸𡣖𠼝葲𦳀𡐓𤋺𢰦𤏁妔𣶷𦝁綨𦅛𦂤𤦹𤦋𨧺鋥珢㻩璴𨭣𡢟㻡𤪳櫘珳珻㻖𤨾𤪔𡟙𤩦𠎧𡐤𤧥瑈𤤖炥𤥶銄珦鍟𠓾錱𨫎𨨖鎆𨯧𥗕䤵𨪂煫"],
+["97a1","𤥃𠳿嚤𠘚𠯫𠲸唂秄𡟺緾𡛂𤩐𡡒䔮鐁㜊𨫀𤦭妰𡢿𡢃𧒄媡㛢𣵛㚰鉟婹𨪁𡡢鍴㳍𠪴䪖㦊僴㵩㵌𡎜煵䋻𨈘渏𩃤䓫浗𧹏灧沯㳖𣿭𣸭渂漌㵯𠏵畑㚼㓈䚀㻚䡱姄鉮䤾轁𨰜𦯀堒埈㛖𡑒烾𤍢𤩱𢿣𡊰𢎽梹楧𡎘𣓥𧯴𣛟𨪃𣟖𣏺𤲟樚𣚭𦲷萾䓟䓎"],
+["9840","𦴦𦵑𦲂𦿞漗𧄉茽𡜺菭𦲀𧁓𡟛妉媂𡞳婡婱𡤅𤇼㜭姯𡜼㛇熎鎐暚𤊥婮娫𤊓樫𣻹𧜶𤑛𤋊焝𤉙𨧡侰𦴨峂𤓎𧹍𤎽樌𤉖𡌄炦焳𤏩㶥泟勇𤩏繥姫崯㷳彜𤩝𡟟綤萦"],
+["98a1","咅𣫺𣌀𠈔坾𠣕𠘙㿥𡾞𪊶瀃𩅛嵰玏糓𨩙𩐠俈翧狍猐𧫴猸猹𥛶獁獈㺩𧬘遬燵𤣲珡臶㻊県㻑沢国琙琞琟㻢㻰㻴㻺瓓㼎㽓畂畭畲疍㽼痈痜㿀癍㿗癴㿜発𤽜熈嘣覀塩䀝睃䀹条䁅㗛瞘䁪䁯属瞾矋売砘点砜䂨砹硇硑硦葈𥔵礳栃礲䄃"],
+["9940","䄉禑禙辻稆込䅧窑䆲窼艹䇄竏竛䇏両筢筬筻簒簛䉠䉺类粜䊌粸䊔糭输烀𠳏総緔緐緽羮羴犟䎗耠耥笹耮耱联㷌垴炠肷胩䏭脌猪脎脒畠脔䐁㬹腖腙腚"],
+["99a1","䐓堺腼膄䐥膓䐭膥埯臁臤艔䒏芦艶苊苘苿䒰荗险榊萅烵葤惣蒈䔄蒾蓡蓸蔐蔸蕒䔻蕯蕰藠䕷虲蚒蚲蛯际螋䘆䘗袮裿褤襇覑𧥧訩訸誔誴豑賔賲贜䞘塟跃䟭仮踺嗘坔蹱嗵躰䠷軎転軤軭軲辷迁迊迌逳駄䢭飠鈓䤞鈨鉘鉫銱銮銿"],
+["9a40","鋣鋫鋳鋴鋽鍃鎄鎭䥅䥑麿鐗匁鐝鐭鐾䥪鑔鑹锭関䦧间阳䧥枠䨤靀䨵鞲韂噔䫤惨颹䬙飱塄餎餙冴餜餷饂饝饢䭰駅䮝騼鬏窃魩鮁鯝鯱鯴䱭鰠㝯𡯂鵉鰺"],
+["9aa1","黾噐鶓鶽鷀鷼银辶鹻麬麱麽黆铜黢黱黸竈齄𠂔𠊷𠎠椚铃妬𠓗塀铁㞹𠗕𠘕𠙶𡚺块煳𠫂𠫍𠮿呪吆𠯋咞𠯻𠰻𠱓𠱥𠱼惧𠲍噺𠲵𠳝𠳭𠵯𠶲𠷈楕鰯螥𠸄𠸎𠻗𠾐𠼭𠹳尠𠾼帋𡁜𡁏𡁶朞𡁻𡂈𡂖㙇𡂿𡃓𡄯𡄻卤蒭𡋣𡍵𡌶讁𡕷𡘙𡟃𡟇乸炻𡠭𡥪"],
+["9b40","𡨭𡩅𡰪𡱰𡲬𡻈拃𡻕𡼕熘桕𢁅槩㛈𢉼𢏗𢏺𢜪𢡱𢥏苽𢥧𢦓𢫕覥𢫨辠𢬎鞸𢬿顇骽𢱌"],
+["9b62","𢲈𢲷𥯨𢴈𢴒𢶷𢶕𢹂𢽴𢿌𣀳𣁦𣌟𣏞徱晈暿𧩹𣕧𣗳爁𤦺矗𣘚𣜖纇𠍆墵朎"],
+["9ba1","椘𣪧𧙗𥿢𣸑𣺹𧗾𢂚䣐䪸𤄙𨪚𤋮𤌍𤀻𤌴𤎖𤩅𠗊凒𠘑妟𡺨㮾𣳿𤐄𤓖垈𤙴㦛𤜯𨗨𩧉㝢𢇃譞𨭎駖𤠒𤣻𤨕爉𤫀𠱸奥𤺥𤾆𠝹軚𥀬劏圿煱𥊙𥐙𣽊𤪧喼𥑆𥑮𦭒釔㑳𥔿𧘲𥕞䜘𥕢𥕦𥟇𤤿𥡝偦㓻𣏌惞𥤃䝼𨥈𥪮𥮉𥰆𡶐垡煑澶𦄂𧰒遖𦆲𤾚譢𦐂𦑊"],
+["9c40","嵛𦯷輶𦒄𡤜諪𤧶𦒈𣿯𦔒䯀𦖿𦚵𢜛鑥𥟡憕娧晉侻嚹𤔡𦛼乪𤤴陖涏𦲽㘘襷𦞙𦡮𦐑𦡞營𦣇筂𩃀𠨑𦤦鄄𦤹穅鷰𦧺騦𦨭㙟𦑩𠀡禃𦨴𦭛崬𣔙菏𦮝䛐𦲤画补𦶮墶"],
+["9ca1","㜜𢖍𧁋𧇍㱔𧊀𧊅銁𢅺𧊋錰𧋦𤧐氹钟𧑐𠻸蠧裵𢤦𨑳𡞱溸𤨪𡠠㦤㚹尐秣䔿暶𩲭𩢤襃𧟌𧡘囖䃟𡘊㦡𣜯𨃨𡏅熭荦𧧝𩆨婧䲷𧂯𨦫𧧽𧨊𧬋𧵦𤅺筃祾𨀉澵𪋟樃𨌘厢𦸇鎿栶靝𨅯𨀣𦦵𡏭𣈯𨁈嶅𨰰𨂃圕頣𨥉嶫𤦈斾槕叒𤪥𣾁㰑朶𨂐𨃴𨄮𡾡𨅏"],
+["9d40","𨆉𨆯𨈚𨌆𨌯𨎊㗊𨑨𨚪䣺揦𨥖砈鉕𨦸䏲𨧧䏟𨧨𨭆𨯔姸𨰉輋𨿅𩃬筑𩄐𩄼㷷𩅞𤫊运犏嚋𩓧𩗩𩖰𩖸𩜲𩣑𩥉𩥪𩧃𩨨𩬎𩵚𩶛纟𩻸𩼣䲤镇𪊓熢𪋿䶑递𪗋䶜𠲜达嗁"],
+["9da1","辺𢒰边𤪓䔉繿潖檱仪㓤𨬬𧢝㜺躀𡟵𨀤𨭬𨮙𧨾𦚯㷫𧙕𣲷𥘵𥥖亚𥺁𦉘嚿𠹭踎孭𣺈𤲞揞拐𡟶𡡻攰嘭𥱊吚𥌑㷆𩶘䱽嘢嘞罉𥻘奵𣵀蝰东𠿪𠵉𣚺脗鵞贘瘻鱅癎瞹鍅吲腈苷嘥脲萘肽嗪祢噃吖𠺝㗎嘅嗱曱𨋢㘭甴嗰喺咗啲𠱁𠲖廐𥅈𠹶𢱢"],
+["9e40","𠺢麫絚嗞𡁵抝靭咔賍燶酶揼掹揾啩𢭃鱲𢺳冚㓟𠶧冧呍唞唓癦踭𦢊疱肶蠄螆裇膶萜𡃁䓬猄𤜆宐茋𦢓噻𢛴𧴯𤆣𧵳𦻐𧊶酰𡇙鈈𣳼𪚩𠺬𠻹牦𡲢䝎𤿂𧿹𠿫䃺"],
+["9ea1","鱝攟𢶠䣳𤟠𩵼𠿬𠸊恢𧖣𠿭"],
+["9ead","𦁈𡆇熣纎鵐业丄㕷嬍沲卧㚬㧜卽㚥𤘘墚𤭮舭呋垪𥪕𠥹"],
+["9ec5","㩒𢑥獴𩺬䴉鯭𣳾𩼰䱛𤾩𩖞𩿞葜𣶶𧊲𦞳𣜠挮紥𣻷𣸬㨪逈勌㹴㙺䗩𠒎癀嫰𠺶硺𧼮墧䂿噼鮋嵴癔𪐴麅䳡痹㟻愙𣃚𤏲"],
+["9ef5","噝𡊩垧𤥣𩸆刴𧂮㖭汊鵼"],
+["9f40","籖鬹埞𡝬屓擓𩓐𦌵𧅤蚭𠴨𦴢𤫢𠵱"],
+["9f4f","凾𡼏嶎霃𡷑麁遌笟鬂峑箣扨挵髿篏鬪籾鬮籂粆鰕篼鬉鼗鰛𤤾齚啳寃俽麘俲剠㸆勑坧偖妷帒韈鶫轜呩鞴饀鞺匬愰"],
+["9fa1","椬叚鰊鴂䰻陁榀傦畆𡝭駚剳"],
+["9fae","酙隁酜"],
+["9fb2","酑𨺗捿𦴣櫊嘑醎畺抅𠏼獏籰𥰡𣳽"],
+["9fc1","𤤙盖鮝个𠳔莾衂"],
+["9fc9","届槀僭坺刟巵从氱𠇲伹咜哚劚趂㗾弌㗳"],
+["9fdb","歒酼龥鮗頮颴骺麨麄煺笔"],
+["9fe7","毺蠘罸"],
+["9feb","嘠𪙊蹷齓"],
+["9ff0","跔蹏鸜踁抂𨍽踨蹵竓𤩷稾磘泪詧瘇"],
+["a040","𨩚鼦泎蟖痃𪊲硓咢贌狢獱謭猂瓱賫𤪻蘯徺袠䒷"],
+["a055","𡠻𦸅"],
+["a058","詾𢔛"],
+["a05b","惽癧髗鵄鍮鮏蟵"],
+["a063","蠏賷猬霡鮰㗖犲䰇籑饊𦅙慙䰄麖慽"],
+["a073","坟慯抦戹拎㩜懢厪𣏵捤栂㗒"],
+["a0a1","嵗𨯂迚𨸹"],
+["a0a6","僙𡵆礆匲阸𠼻䁥"],
+["a0ae","矾"],
+["a0b0","糂𥼚糚稭聦聣絍甅瓲覔舚朌聢𧒆聛瓰脃眤覉𦟌畓𦻑螩蟎臈螌詉貭譃眫瓸蓚㘵榲趦"],
+["a0d4","覩瑨涹蟁𤀑瓧㷛煶悤憜㳑煢恷"],
+["a0e2","罱𨬭牐惩䭾删㰘𣳇𥻗𧙖𥔱𡥄𡋾𩤃𦷜𧂭峁𦆭𨨏𣙷𠃮𦡆𤼎䕢嬟𦍌齐麦𦉫"],
+["a3c0","␀",31,"␡"],
+["c6a1","①",9,"⑴",9,"ⅰ",9,"丶丿亅亠冂冖冫勹匸卩厶夊宀巛⼳广廴彐彡攴无疒癶辵隶¨ˆヽヾゝゞ〃仝々〆〇ー[]✽ぁ",23],
+["c740","す",58,"ァアィイ"],
+["c7a1","ゥ",81,"А",5,"ЁЖ",4],
+["c840","Л",26,"ёж",25,"⇧↸↹㇏𠃌乚𠂊刂䒑"],
+["c8a1","龰冈龱𧘇"],
+["c8cd","¬¦'"㈱№℡゛゜⺀⺄⺆⺇⺈⺊⺌⺍⺕⺜⺝⺥⺧⺪⺬⺮⺶⺼⺾⻆⻊⻌⻍⻏⻖⻗⻞⻣"],
+["c8f5","ʃɐɛɔɵœøŋʊɪ"],
+["f9fe","■"],
+["fa40","𠕇鋛𠗟𣿅蕌䊵珯况㙉𤥂𨧤鍄𡧛苮𣳈砼杄拟𤤳𨦪𠊠𦮳𡌅侫𢓭倈𦴩𧪄𣘀𤪱𢔓倩𠍾徤𠎀𠍇滛𠐟偽儁㑺儎顬㝃萖𤦤𠒇兠𣎴兪𠯿𢃼𠋥𢔰𠖎𣈳𡦃宂蝽𠖳𣲙冲冸"],
+["faa1","鴴凉减凑㳜凓𤪦决凢卂凭菍椾𣜭彻刋刦刼劵剗劔効勅簕蕂勠蘍𦬓包𨫞啉滙𣾀𠥔𣿬匳卄𠯢泋𡜦栛珕恊㺪㣌𡛨燝䒢卭却𨚫卾卿𡖖𡘓矦厓𨪛厠厫厮玧𥝲㽙玜叁叅汉义埾叙㪫𠮏叠𣿫𢶣叶𠱷吓灹唫晗浛呭𦭓𠵴啝咏咤䞦𡜍𠻝㶴𠵍"],
+["fb40","𨦼𢚘啇䳭启琗喆喩嘅𡣗𤀺䕒𤐵暳𡂴嘷曍𣊊暤暭噍噏磱囱鞇叾圀囯园𨭦㘣𡉏坆𤆥汮炋坂㚱𦱾埦𡐖堃𡑔𤍣堦𤯵塜墪㕡壠壜𡈼壻寿坃𪅐𤉸鏓㖡够梦㛃湙"],
+["fba1","𡘾娤啓𡚒蔅姉𠵎𦲁𦴪𡟜姙𡟻𡞲𦶦浱𡠨𡛕姹𦹅媫婣㛦𤦩婷㜈媖瑥嫓𦾡𢕔㶅𡤑㜲𡚸広勐孶斈孼𧨎䀄䡝𠈄寕慠𡨴𥧌𠖥寳宝䴐尅𡭄尓珎尔𡲥𦬨屉䣝岅峩峯嶋𡷹𡸷崐崘嵆𡺤岺巗苼㠭𤤁𢁉𢅳芇㠶㯂帮檊幵幺𤒼𠳓厦亷廐厨𡝱帉廴𨒂"],
+["fc40","廹廻㢠廼栾鐛弍𠇁弢㫞䢮𡌺强𦢈𢏐彘𢑱彣鞽𦹮彲鍀𨨶徧嶶㵟𥉐𡽪𧃸𢙨釖𠊞𨨩怱暅𡡷㥣㷇㘹垐𢞴祱㹀悞悤悳𤦂𤦏𧩓璤僡媠慤萤慂慈𦻒憁凴𠙖憇宪𣾷"],
+["fca1","𢡟懓𨮝𩥝懐㤲𢦀𢣁怣慜攞掋𠄘担𡝰拕𢸍捬𤧟㨗搸揸𡎎𡟼撐澊𢸶頔𤂌𥜝擡擥鑻㩦携㩗敍漖𤨨𤨣斅敭敟𣁾斵𤥀䬷旑䃘𡠩无旣忟𣐀昘𣇷𣇸晄𣆤𣆥晋𠹵晧𥇦晳晴𡸽𣈱𨗴𣇈𥌓矅𢣷馤朂𤎜𤨡㬫槺𣟂杞杧杢𤇍𩃭柗䓩栢湐鈼栁𣏦𦶠桝"],
+["fd40","𣑯槡樋𨫟楳棃𣗍椁椀㴲㨁𣘼㮀枬楡𨩊䋼椶榘㮡𠏉荣傐槹𣙙𢄪橅𣜃檝㯳枱櫈𩆜㰍欝𠤣惞欵歴𢟍溵𣫛𠎵𡥘㝀吡𣭚毡𣻼毜氷𢒋𤣱𦭑汚舦汹𣶼䓅𣶽𤆤𤤌𤤀"],
+["fda1","𣳉㛥㳫𠴲鮃𣇹𢒑羏样𦴥𦶡𦷫涖浜湼漄𤥿𤂅𦹲蔳𦽴凇沜渝萮𨬡港𣸯瑓𣾂秌湏媑𣁋濸㜍澝𣸰滺𡒗𤀽䕕鏰潄潜㵎潴𩅰㴻澟𤅄濓𤂑𤅕𤀹𣿰𣾴𤄿凟𤅖𤅗𤅀𦇝灋灾炧炁烌烕烖烟䄄㷨熴熖𤉷焫煅媈煊煮岜𤍥煏鍢𤋁焬𤑚𤨧𤨢熺𨯨炽爎"],
+["fe40","鑂爕夑鑃爤鍁𥘅爮牀𤥴梽牕牗㹕𣁄栍漽犂猪猫𤠣𨠫䣭𨠄猨献珏玪𠰺𦨮珉瑉𤇢𡛧𤨤昣㛅𤦷𤦍𤧻珷琕椃𤨦琹𠗃㻗瑜𢢭瑠𨺲瑇珤瑶莹瑬㜰瑴鏱樬璂䥓𤪌"],
+["fea1","𤅟𤩹𨮏孆𨰃𡢞瓈𡦈甎瓩甞𨻙𡩋寗𨺬鎅畍畊畧畮𤾂㼄𤴓疎瑝疞疴瘂瘬癑癏癯癶𦏵皐臯㟸𦤑𦤎皡皥皷盌𦾟葢𥂝𥅽𡸜眞眦着撯𥈠睘𣊬瞯𨥤𨥨𡛁矴砉𡍶𤨒棊碯磇磓隥礮𥗠磗礴碱𧘌辸袄𨬫𦂃𢘜禆褀椂禀𥡗禝𧬹礼禩渪𧄦㺨秆𩄍秔"]
+]
diff --git a/tools/node_modules/eslint/node_modules/iconv-lite/encodings/tables/cp936.json b/tools/node_modules/eslint/node_modules/iconv-lite/encodings/tables/cp936.json
new file mode 100644
index 0000000000..49ddb9a1d6
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/iconv-lite/encodings/tables/cp936.json
@@ -0,0 +1,264 @@
+[
+["0","\u0000",127,"€"],
+["8140","丂丄丅丆丏丒丗丟丠両丣並丩丮丯丱丳丵丷丼乀乁乂乄乆乊乑乕乗乚乛乢乣乤乥乧乨乪",5,"乲乴",9,"乿",6,"亇亊"],
+["8180","亐亖亗亙亜亝亞亣亪亯亰亱亴亶亷亸亹亼亽亾仈仌仏仐仒仚仛仜仠仢仦仧仩仭仮仯仱仴仸仹仺仼仾伀伂",6,"伋伌伒",4,"伜伝伡伣伨伩伬伭伮伱伳伵伷伹伻伾",4,"佄佅佇",5,"佒佔佖佡佢佦佨佪佫佭佮佱佲併佷佸佹佺佽侀侁侂侅來侇侊侌侎侐侒侓侕侖侘侙侚侜侞侟価侢"],
+["8240","侤侫侭侰",4,"侶",8,"俀俁係俆俇俈俉俋俌俍俒",4,"俙俛俠俢俤俥俧俫俬俰俲俴俵俶俷俹俻俼俽俿",11],
+["8280","個倎倐們倓倕倖倗倛倝倞倠倢倣値倧倫倯",10,"倻倽倿偀偁偂偄偅偆偉偊偋偍偐",4,"偖偗偘偙偛偝",7,"偦",5,"偭",8,"偸偹偺偼偽傁傂傃傄傆傇傉傊傋傌傎",20,"傤傦傪傫傭",4,"傳",6,"傼"],
+["8340","傽",17,"僐",5,"僗僘僙僛",10,"僨僩僪僫僯僰僱僲僴僶",4,"僼",9,"儈"],
+["8380","儉儊儌",5,"儓",13,"儢",28,"兂兇兊兌兎兏児兒兓兗兘兙兛兝",4,"兣兤兦內兩兪兯兲兺兾兿冃冄円冇冊冋冎冏冐冑冓冔冘冚冝冞冟冡冣冦",4,"冭冮冴冸冹冺冾冿凁凂凃凅凈凊凍凎凐凒",5],
+["8440","凘凙凚凜凞凟凢凣凥",5,"凬凮凱凲凴凷凾刄刅刉刋刌刏刐刓刔刕刜刞刟刡刢刣別刦刧刪刬刯刱刲刴刵刼刾剄",5,"剋剎剏剒剓剕剗剘"],
+["8480","剙剚剛剝剟剠剢剣剤剦剨剫剬剭剮剰剱剳",9,"剾劀劃",4,"劉",6,"劑劒劔",6,"劜劤劥劦劧劮劯劰労",9,"勀勁勂勄勅勆勈勊勌勍勎勏勑勓勔動勗務",5,"勠勡勢勣勥",10,"勱",7,"勻勼勽匁匂匃匄匇匉匊匋匌匎"],
+["8540","匑匒匓匔匘匛匜匞匟匢匤匥匧匨匩匫匬匭匯",9,"匼匽區卂卄卆卋卌卍卐協単卙卛卝卥卨卪卬卭卲卶卹卻卼卽卾厀厁厃厇厈厊厎厏"],
+["8580","厐",4,"厖厗厙厛厜厞厠厡厤厧厪厫厬厭厯",6,"厷厸厹厺厼厽厾叀參",4,"収叏叐叒叓叕叚叜叝叞叡叢叧叴叺叾叿吀吂吅吇吋吔吘吙吚吜吢吤吥吪吰吳吶吷吺吽吿呁呂呄呅呇呉呌呍呎呏呑呚呝",4,"呣呥呧呩",7,"呴呹呺呾呿咁咃咅咇咈咉咊咍咑咓咗咘咜咞咟咠咡"],
+["8640","咢咥咮咰咲咵咶咷咹咺咼咾哃哅哊哋哖哘哛哠",4,"哫哬哯哰哱哴",5,"哻哾唀唂唃唄唅唈唊",4,"唒唓唕",5,"唜唝唞唟唡唥唦"],
+["8680","唨唩唫唭唲唴唵唶唸唹唺唻唽啀啂啅啇啈啋",4,"啑啒啓啔啗",4,"啝啞啟啠啢啣啨啩啫啯",5,"啹啺啽啿喅喆喌喍喎喐喒喓喕喖喗喚喛喞喠",6,"喨",8,"喲喴営喸喺喼喿",4,"嗆嗇嗈嗊嗋嗎嗏嗐嗕嗗",4,"嗞嗠嗢嗧嗩嗭嗮嗰嗱嗴嗶嗸",4,"嗿嘂嘃嘄嘅"],
+["8740","嘆嘇嘊嘋嘍嘐",7,"嘙嘚嘜嘝嘠嘡嘢嘥嘦嘨嘩嘪嘫嘮嘯嘰嘳嘵嘷嘸嘺嘼嘽嘾噀",11,"噏",4,"噕噖噚噛噝",4],
+["8780","噣噥噦噧噭噮噯噰噲噳噴噵噷噸噹噺噽",7,"嚇",6,"嚐嚑嚒嚔",14,"嚤",10,"嚰",6,"嚸嚹嚺嚻嚽",12,"囋",8,"囕囖囘囙囜団囥",5,"囬囮囯囲図囶囷囸囻囼圀圁圂圅圇國",6],
+["8840","園",9,"圝圞圠圡圢圤圥圦圧圫圱圲圴",4,"圼圽圿坁坃坄坅坆坈坉坋坒",4,"坘坙坢坣坥坧坬坮坰坱坲坴坵坸坹坺坽坾坿垀"],
+["8880","垁垇垈垉垊垍",4,"垔",6,"垜垝垞垟垥垨垪垬垯垰垱垳垵垶垷垹",8,"埄",6,"埌埍埐埑埓埖埗埛埜埞埡埢埣埥",7,"埮埰埱埲埳埵埶執埻埼埾埿堁堃堄堅堈堉堊堌堎堏堐堒堓堔堖堗堘堚堛堜堝堟堢堣堥",4,"堫",4,"報堲堳場堶",7],
+["8940","堾",5,"塅",6,"塎塏塐塒塓塕塖塗塙",4,"塟",5,"塦",4,"塭",16,"塿墂墄墆墇墈墊墋墌"],
+["8980","墍",4,"墔",4,"墛墜墝墠",7,"墪",17,"墽墾墿壀壂壃壄壆",10,"壒壓壔壖",13,"壥",5,"壭壯壱売壴壵壷壸壺",7,"夃夅夆夈",4,"夎夐夑夒夓夗夘夛夝夞夠夡夢夣夦夨夬夰夲夳夵夶夻"],
+["8a40","夽夾夿奀奃奅奆奊奌奍奐奒奓奙奛",4,"奡奣奤奦",12,"奵奷奺奻奼奾奿妀妅妉妋妌妎妏妐妑妔妕妘妚妛妜妝妟妠妡妢妦"],
+["8a80","妧妬妭妰妱妳",5,"妺妼妽妿",6,"姇姈姉姌姍姎姏姕姖姙姛姞",4,"姤姦姧姩姪姫姭",11,"姺姼姽姾娀娂娊娋娍娎娏娐娒娔娕娖娗娙娚娛娝娞娡娢娤娦娧娨娪",6,"娳娵娷",4,"娽娾娿婁",4,"婇婈婋",9,"婖婗婘婙婛",5],
+["8b40","婡婣婤婥婦婨婩婫",8,"婸婹婻婼婽婾媀",17,"媓",6,"媜",13,"媫媬"],
+["8b80","媭",4,"媴媶媷媹",4,"媿嫀嫃",5,"嫊嫋嫍",4,"嫓嫕嫗嫙嫚嫛嫝嫞嫟嫢嫤嫥嫧嫨嫪嫬",4,"嫲",22,"嬊",11,"嬘",25,"嬳嬵嬶嬸",7,"孁",6],
+["8c40","孈",7,"孒孖孞孠孡孧孨孫孭孮孯孲孴孶孷學孹孻孼孾孿宂宆宊宍宎宐宑宒宔宖実宧宨宩宬宭宮宯宱宲宷宺宻宼寀寁寃寈寉寊寋寍寎寏"],
+["8c80","寑寔",8,"寠寢寣實寧審",4,"寯寱",6,"寽対尀専尃尅將專尋尌對導尐尒尓尗尙尛尞尟尠尡尣尦尨尩尪尫尭尮尯尰尲尳尵尶尷屃屄屆屇屌屍屒屓屔屖屗屘屚屛屜屝屟屢層屧",6,"屰屲",6,"屻屼屽屾岀岃",4,"岉岊岋岎岏岒岓岕岝",4,"岤",4],
+["8d40","岪岮岯岰岲岴岶岹岺岻岼岾峀峂峃峅",5,"峌",5,"峓",5,"峚",6,"峢峣峧峩峫峬峮峯峱",9,"峼",4],
+["8d80","崁崄崅崈",5,"崏",4,"崕崗崘崙崚崜崝崟",4,"崥崨崪崫崬崯",4,"崵",7,"崿",7,"嵈嵉嵍",10,"嵙嵚嵜嵞",10,"嵪嵭嵮嵰嵱嵲嵳嵵",12,"嶃",21,"嶚嶛嶜嶞嶟嶠"],
+["8e40","嶡",21,"嶸",12,"巆",6,"巎",12,"巜巟巠巣巤巪巬巭"],
+["8e80","巰巵巶巸",4,"巿帀帄帇帉帊帋帍帎帒帓帗帞",7,"帨",4,"帯帰帲",4,"帹帺帾帿幀幁幃幆",5,"幍",6,"幖",4,"幜幝幟幠幣",14,"幵幷幹幾庁庂広庅庈庉庌庍庎庒庘庛庝庡庢庣庤庨",4,"庮",4,"庴庺庻庼庽庿",6],
+["8f40","廆廇廈廋",5,"廔廕廗廘廙廚廜",11,"廩廫",8,"廵廸廹廻廼廽弅弆弇弉弌弍弎弐弒弔弖弙弚弜弝弞弡弢弣弤"],
+["8f80","弨弫弬弮弰弲",6,"弻弽弾弿彁",14,"彑彔彙彚彛彜彞彟彠彣彥彧彨彫彮彯彲彴彵彶彸彺彽彾彿徃徆徍徎徏徑従徔徖徚徛徝從徟徠徢",5,"復徫徬徯",5,"徶徸徹徺徻徾",4,"忇忈忊忋忎忓忔忕忚忛応忞忟忢忣忥忦忨忩忬忯忰忲忳忴忶忷忹忺忼怇"],
+["9040","怈怉怋怌怐怑怓怗怘怚怞怟怢怣怤怬怭怮怰",4,"怶",4,"怽怾恀恄",6,"恌恎恏恑恓恔恖恗恘恛恜恞恟恠恡恥恦恮恱恲恴恵恷恾悀"],
+["9080","悁悂悅悆悇悈悊悋悎悏悐悑悓悕悗悘悙悜悞悡悢悤悥悧悩悪悮悰悳悵悶悷悹悺悽",7,"惇惈惉惌",4,"惒惓惔惖惗惙惛惞惡",4,"惪惱惲惵惷惸惻",4,"愂愃愄愅愇愊愋愌愐",4,"愖愗愘愙愛愜愝愞愡愢愥愨愩愪愬",18,"慀",6],
+["9140","慇慉態慍慏慐慒慓慔慖",6,"慞慟慠慡慣慤慥慦慩",6,"慱慲慳慴慶慸",18,"憌憍憏",4,"憕"],
+["9180","憖",6,"憞",8,"憪憫憭",9,"憸",5,"憿懀懁懃",4,"應懌",4,"懓懕",16,"懧",13,"懶",8,"戀",5,"戇戉戓戔戙戜戝戞戠戣戦戧戨戩戫戭戯戰戱戲戵戶戸",4,"扂扄扅扆扊"],
+["9240","扏扐払扖扗扙扚扜",6,"扤扥扨扱扲扴扵扷扸扺扻扽抁抂抃抅抆抇抈抋",5,"抔抙抜抝択抣抦抧抩抪抭抮抯抰抲抳抴抶抷抸抺抾拀拁"],
+["9280","拃拋拏拑拕拝拞拠拡拤拪拫拰拲拵拸拹拺拻挀挃挄挅挆挊挋挌挍挏挐挒挓挔挕挗挘挙挜挦挧挩挬挭挮挰挱挳",5,"挻挼挾挿捀捁捄捇捈捊捑捒捓捔捖",7,"捠捤捥捦捨捪捫捬捯捰捲捳捴捵捸捹捼捽捾捿掁掃掄掅掆掋掍掑掓掔掕掗掙",6,"採掤掦掫掯掱掲掵掶掹掻掽掿揀"],
+["9340","揁揂揃揅揇揈揊揋揌揑揓揔揕揗",6,"揟揢揤",4,"揫揬揮揯揰揱揳揵揷揹揺揻揼揾搃搄搆",4,"損搎搑搒搕",5,"搝搟搢搣搤"],
+["9380","搥搧搨搩搫搮",5,"搵",4,"搻搼搾摀摂摃摉摋",6,"摓摕摖摗摙",4,"摟",7,"摨摪摫摬摮",9,"摻",6,"撃撆撈",8,"撓撔撗撘撚撛撜撝撟",4,"撥撦撧撨撪撫撯撱撲撳撴撶撹撻撽撾撿擁擃擄擆",6,"擏擑擓擔擕擖擙據"],
+["9440","擛擜擝擟擠擡擣擥擧",24,"攁",7,"攊",7,"攓",4,"攙",8],
+["9480","攢攣攤攦",4,"攬攭攰攱攲攳攷攺攼攽敀",4,"敆敇敊敋敍敎敐敒敓敔敗敘敚敜敟敠敡敤敥敧敨敩敪敭敮敯敱敳敵敶數",14,"斈斉斊斍斎斏斒斔斕斖斘斚斝斞斠斢斣斦斨斪斬斮斱",7,"斺斻斾斿旀旂旇旈旉旊旍旐旑旓旔旕旘",7,"旡旣旤旪旫"],
+["9540","旲旳旴旵旸旹旻",4,"昁昄昅昇昈昉昋昍昐昑昒昖昗昘昚昛昜昞昡昢昣昤昦昩昪昫昬昮昰昲昳昷",4,"昽昿晀時晄",6,"晍晎晐晑晘"],
+["9580","晙晛晜晝晞晠晢晣晥晧晩",4,"晱晲晳晵晸晹晻晼晽晿暀暁暃暅暆暈暉暊暋暍暎暏暐暒暓暔暕暘",4,"暞",8,"暩",4,"暯",4,"暵暶暷暸暺暻暼暽暿",25,"曚曞",7,"曧曨曪",5,"曱曵曶書曺曻曽朁朂會"],
+["9640","朄朅朆朇朌朎朏朑朒朓朖朘朙朚朜朞朠",5,"朧朩朮朰朲朳朶朷朸朹朻朼朾朿杁杄杅杇杊杋杍杒杔杕杗",4,"杝杢杣杤杦杧杫杬杮東杴杶"],
+["9680","杸杹杺杻杽枀枂枃枅枆枈枊枌枍枎枏枑枒枓枔枖枙枛枟枠枡枤枦枩枬枮枱枲枴枹",7,"柂柅",9,"柕柖柗柛柟柡柣柤柦柧柨柪柫柭柮柲柵",7,"柾栁栂栃栄栆栍栐栒栔栕栘",4,"栞栟栠栢",6,"栫",6,"栴栵栶栺栻栿桇桋桍桏桒桖",5],
+["9740","桜桝桞桟桪桬",7,"桵桸",8,"梂梄梇",7,"梐梑梒梔梕梖梘",9,"梣梤梥梩梪梫梬梮梱梲梴梶梷梸"],
+["9780","梹",6,"棁棃",5,"棊棌棎棏棐棑棓棔棖棗棙棛",4,"棡棢棤",9,"棯棲棳棴棶棷棸棻棽棾棿椀椂椃椄椆",4,"椌椏椑椓",11,"椡椢椣椥",7,"椮椯椱椲椳椵椶椷椸椺椻椼椾楀楁楃",16,"楕楖楘楙楛楜楟"],
+["9840","楡楢楤楥楧楨楩楪楬業楯楰楲",4,"楺楻楽楾楿榁榃榅榊榋榌榎",5,"榖榗榙榚榝",9,"榩榪榬榮榯榰榲榳榵榶榸榹榺榼榽"],
+["9880","榾榿槀槂",7,"構槍槏槑槒槓槕",5,"槜槝槞槡",11,"槮槯槰槱槳",9,"槾樀",9,"樋",11,"標",5,"樠樢",5,"権樫樬樭樮樰樲樳樴樶",6,"樿",4,"橅橆橈",7,"橑",6,"橚"],
+["9940","橜",4,"橢橣橤橦",10,"橲",6,"橺橻橽橾橿檁檂檃檅",8,"檏檒",4,"檘",7,"檡",5],
+["9980","檧檨檪檭",114,"欥欦欨",6],
+["9a40","欯欰欱欳欴欵欶欸欻欼欽欿歀歁歂歄歅歈歊歋歍",11,"歚",7,"歨歩歫",13,"歺歽歾歿殀殅殈"],
+["9a80","殌殎殏殐殑殔殕殗殘殙殜",4,"殢",7,"殫",7,"殶殸",6,"毀毃毄毆",4,"毌毎毐毑毘毚毜",4,"毢",7,"毬毭毮毰毱毲毴毶毷毸毺毻毼毾",6,"氈",4,"氎氒気氜氝氞氠氣氥氫氬氭氱氳氶氷氹氺氻氼氾氿汃汄汅汈汋",4,"汑汒汓汖汘"],
+["9b40","汙汚汢汣汥汦汧汫",4,"汱汳汵汷汸決汻汼汿沀沄沇沊沋沍沎沑沒沕沖沗沘沚沜沝沞沠沢沨沬沯沰沴沵沶沷沺泀況泂泃泆泇泈泋泍泎泏泑泒泘"],
+["9b80","泙泚泜泝泟泤泦泧泩泬泭泲泴泹泿洀洂洃洅洆洈洉洊洍洏洐洑洓洔洕洖洘洜洝洟",5,"洦洨洩洬洭洯洰洴洶洷洸洺洿浀浂浄浉浌浐浕浖浗浘浛浝浟浡浢浤浥浧浨浫浬浭浰浱浲浳浵浶浹浺浻浽",4,"涃涄涆涇涊涋涍涏涐涒涖",4,"涜涢涥涬涭涰涱涳涴涶涷涹",5,"淁淂淃淈淉淊"],
+["9c40","淍淎淏淐淒淓淔淕淗淚淛淜淟淢淣淥淧淨淩淪淭淯淰淲淴淵淶淸淺淽",7,"渆渇済渉渋渏渒渓渕渘渙減渜渞渟渢渦渧渨渪測渮渰渱渳渵"],
+["9c80","渶渷渹渻",7,"湅",7,"湏湐湑湒湕湗湙湚湜湝湞湠",10,"湬湭湯",14,"満溁溂溄溇溈溊",4,"溑",6,"溙溚溛溝溞溠溡溣溤溦溨溩溫溬溭溮溰溳溵溸溹溼溾溿滀滃滄滅滆滈滉滊滌滍滎滐滒滖滘滙滛滜滝滣滧滪",5],
+["9d40","滰滱滲滳滵滶滷滸滺",7,"漃漄漅漇漈漊",4,"漐漑漒漖",9,"漡漢漣漥漦漧漨漬漮漰漲漴漵漷",6,"漿潀潁潂"],
+["9d80","潃潄潅潈潉潊潌潎",9,"潙潚潛潝潟潠潡潣潤潥潧",5,"潯潰潱潳潵潶潷潹潻潽",6,"澅澆澇澊澋澏",12,"澝澞澟澠澢",4,"澨",10,"澴澵澷澸澺",5,"濁濃",5,"濊",6,"濓",10,"濟濢濣濤濥"],
+["9e40","濦",7,"濰",32,"瀒",7,"瀜",6,"瀤",6],
+["9e80","瀫",9,"瀶瀷瀸瀺",17,"灍灎灐",13,"灟",11,"灮灱灲灳灴灷灹灺灻災炁炂炃炄炆炇炈炋炌炍炏炐炑炓炗炘炚炛炞",12,"炰炲炴炵炶為炾炿烄烅烆烇烉烋",12,"烚"],
+["9f40","烜烝烞烠烡烢烣烥烪烮烰",6,"烸烺烻烼烾",10,"焋",4,"焑焒焔焗焛",10,"焧",7,"焲焳焴"],
+["9f80","焵焷",13,"煆煇煈煉煋煍煏",12,"煝煟",4,"煥煩",4,"煯煰煱煴煵煶煷煹煻煼煾",5,"熅",4,"熋熌熍熎熐熑熒熓熕熖熗熚",4,"熡",6,"熩熪熫熭",5,"熴熶熷熸熺",8,"燄",9,"燏",4],
+["a040","燖",9,"燡燢燣燤燦燨",5,"燯",9,"燺",11,"爇",19],
+["a080","爛爜爞",9,"爩爫爭爮爯爲爳爴爺爼爾牀",6,"牉牊牋牎牏牐牑牓牔牕牗牘牚牜牞牠牣牤牥牨牪牫牬牭牰牱牳牴牶牷牸牻牼牽犂犃犅",4,"犌犎犐犑犓",11,"犠",11,"犮犱犲犳犵犺",6,"狅狆狇狉狊狋狌狏狑狓狔狕狖狘狚狛"],
+["a1a1"," 、。·ˉˇ¨〃々—~‖…‘’“”〔〕〈",7,"〖〗【】±×÷∶∧∨∑∏∪∩∈∷√⊥∥∠⌒⊙∫∮≡≌≈∽∝≠≮≯≤≥∞∵∴♂♀°′″℃$¤¢£‰§№☆★○●◎◇◆□■△▲※→←↑↓〓"],
+["a2a1","ⅰ",9],
+["a2b1","⒈",19,"⑴",19,"①",9],
+["a2e5","㈠",9],
+["a2f1","Ⅰ",11],
+["a3a1","!"#¥%",88," ̄"],
+["a4a1","ぁ",82],
+["a5a1","ァ",85],
+["a6a1","Α",16,"Σ",6],
+["a6c1","α",16,"σ",6],
+["a6e0","︵︶︹︺︿﹀︽︾﹁﹂﹃﹄"],
+["a6ee","︻︼︷︸︱"],
+["a6f4","︳︴"],
+["a7a1","А",5,"ЁЖ",25],
+["a7d1","а",5,"ёж",25],
+["a840","ˊˋ˙–―‥‵℅℉↖↗↘↙∕∟∣≒≦≧⊿═",35,"▁",6],
+["a880","█",7,"▓▔▕▼▽◢◣◤◥☉⊕〒〝〞"],
+["a8a1","āáǎàēéěèīíǐìōóǒòūúǔùǖǘǚǜüêɑ"],
+["a8bd","ńň"],
+["a8c0","ɡ"],
+["a8c5","ㄅ",36],
+["a940","〡",8,"㊣㎎㎏㎜㎝㎞㎡㏄㏎㏑㏒㏕︰¬¦"],
+["a959","℡㈱"],
+["a95c","‐"],
+["a960","ー゛゜ヽヾ〆ゝゞ﹉",9,"﹔﹕﹖﹗﹙",8],
+["a980","﹢",4,"﹨﹩﹪﹫"],
+["a996","〇"],
+["a9a4","─",75],
+["aa40","狜狝狟狢",5,"狪狫狵狶狹狽狾狿猀猂猄",5,"猋猌猍猏猐猑猒猔猘猙猚猟猠猣猤猦猧猨猭猯猰猲猳猵猶猺猻猼猽獀",8],
+["aa80","獉獊獋獌獎獏獑獓獔獕獖獘",7,"獡",10,"獮獰獱"],
+["ab40","獲",11,"獿",4,"玅玆玈玊玌玍玏玐玒玓玔玕玗玘玙玚玜玝玞玠玡玣",5,"玪玬玭玱玴玵玶玸玹玼玽玾玿珁珃",4],
+["ab80","珋珌珎珒",6,"珚珛珜珝珟珡珢珣珤珦珨珪珫珬珮珯珰珱珳",4],
+["ac40","珸",10,"琄琇琈琋琌琍琎琑",8,"琜",5,"琣琤琧琩琫琭琯琱琲琷",4,"琽琾琿瑀瑂",11],
+["ac80","瑎",6,"瑖瑘瑝瑠",12,"瑮瑯瑱",4,"瑸瑹瑺"],
+["ad40","瑻瑼瑽瑿璂璄璅璆璈璉璊璌璍璏璑",10,"璝璟",7,"璪",15,"璻",12],
+["ad80","瓈",9,"瓓",8,"瓝瓟瓡瓥瓧",6,"瓰瓱瓲"],
+["ae40","瓳瓵瓸",6,"甀甁甂甃甅",7,"甎甐甒甔甕甖甗甛甝甞甠",4,"甦甧甪甮甴甶甹甼甽甿畁畂畃畄畆畇畉畊畍畐畑畒畓畕畖畗畘"],
+["ae80","畝",7,"畧畨畩畫",6,"畳畵當畷畺",4,"疀疁疂疄疅疇"],
+["af40","疈疉疊疌疍疎疐疓疕疘疛疜疞疢疦",4,"疭疶疷疺疻疿痀痁痆痋痌痎痏痐痑痓痗痙痚痜痝痟痠痡痥痩痬痭痮痯痲痳痵痶痷痸痺痻痽痾瘂瘄瘆瘇"],
+["af80","瘈瘉瘋瘍瘎瘏瘑瘒瘓瘔瘖瘚瘜瘝瘞瘡瘣瘧瘨瘬瘮瘯瘱瘲瘶瘷瘹瘺瘻瘽癁療癄"],
+["b040","癅",6,"癎",5,"癕癗",4,"癝癟癠癡癢癤",6,"癬癭癮癰",7,"癹発發癿皀皁皃皅皉皊皌皍皏皐皒皔皕皗皘皚皛"],
+["b080","皜",7,"皥",8,"皯皰皳皵",9,"盀盁盃啊阿埃挨哎唉哀皑癌蔼矮艾碍爱隘鞍氨安俺按暗岸胺案肮昂盎凹敖熬翱袄傲奥懊澳芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸白柏百摆佰败拜稗斑班搬扳般颁板版扮拌伴瓣半办绊邦帮梆榜膀绑棒磅蚌镑傍谤苞胞包褒剥"],
+["b140","盄盇盉盋盌盓盕盙盚盜盝盞盠",4,"盦",7,"盰盳盵盶盷盺盻盽盿眀眂眃眅眆眊県眎",10,"眛眜眝眞眡眣眤眥眧眪眫"],
+["b180","眬眮眰",4,"眹眻眽眾眿睂睄睅睆睈",7,"睒",7,"睜薄雹保堡饱宝抱报暴豹鲍爆杯碑悲卑北辈背贝钡倍狈备惫焙被奔苯本笨崩绷甭泵蹦迸逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛鞭边编贬扁便变卞辨辩辫遍标彪膘表鳖憋别瘪彬斌濒滨宾摈兵冰柄丙秉饼炳"],
+["b240","睝睞睟睠睤睧睩睪睭",11,"睺睻睼瞁瞂瞃瞆",5,"瞏瞐瞓",11,"瞡瞣瞤瞦瞨瞫瞭瞮瞯瞱瞲瞴瞶",4],
+["b280","瞼瞾矀",12,"矎",8,"矘矙矚矝",4,"矤病并玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳捕卜哺补埠不布步簿部怖擦猜裁材才财睬踩采彩菜蔡餐参蚕残惭惨灿苍舱仓沧藏操糙槽曹草厕策侧册测层蹭插叉茬茶查碴搽察岔差诧拆柴豺搀掺蝉馋谗缠铲产阐颤昌猖"],
+["b340","矦矨矪矯矰矱矲矴矵矷矹矺矻矼砃",5,"砊砋砎砏砐砓砕砙砛砞砠砡砢砤砨砪砫砮砯砱砲砳砵砶砽砿硁硂硃硄硆硈硉硊硋硍硏硑硓硔硘硙硚"],
+["b380","硛硜硞",11,"硯",7,"硸硹硺硻硽",6,"场尝常长偿肠厂敞畅唱倡超抄钞朝嘲潮巢吵炒车扯撤掣彻澈郴臣辰尘晨忱沉陈趁衬撑称城橙成呈乘程惩澄诚承逞骋秤吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽充冲虫崇宠抽酬畴踌稠愁筹仇绸瞅丑臭初出橱厨躇锄雏滁除楚"],
+["b440","碄碅碆碈碊碋碏碐碒碔碕碖碙碝碞碠碢碤碦碨",7,"碵碶碷碸確碻碼碽碿磀磂磃磄磆磇磈磌磍磎磏磑磒磓磖磗磘磚",9],
+["b480","磤磥磦磧磩磪磫磭",4,"磳磵磶磸磹磻",5,"礂礃礄礆",6,"础储矗搐触处揣川穿椽传船喘串疮窗幢床闯创吹炊捶锤垂春椿醇唇淳纯蠢戳绰疵茨磁雌辞慈瓷词此刺赐次聪葱囱匆从丛凑粗醋簇促蹿篡窜摧崔催脆瘁粹淬翠村存寸磋撮搓措挫错搭达答瘩打大呆歹傣戴带殆代贷袋待逮"],
+["b540","礍",5,"礔",9,"礟",4,"礥",14,"礵",4,"礽礿祂祃祄祅祇祊",8,"祔祕祘祙祡祣"],
+["b580","祤祦祩祪祫祬祮祰",6,"祹祻",4,"禂禃禆禇禈禉禋禌禍禎禐禑禒怠耽担丹单郸掸胆旦氮但惮淡诞弹蛋当挡党荡档刀捣蹈倒岛祷导到稻悼道盗德得的蹬灯登等瞪凳邓堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔颠掂滇碘点典靛垫电佃甸店惦奠淀殿碉叼雕凋刁掉吊钓调跌爹碟蝶迭谍叠"],
+["b640","禓",6,"禛",11,"禨",10,"禴",4,"禼禿秂秄秅秇秈秊秌秎秏秐秓秔秖秗秙",5,"秠秡秢秥秨秪"],
+["b680","秬秮秱",6,"秹秺秼秾秿稁稄稅稇稈稉稊稌稏",4,"稕稖稘稙稛稜丁盯叮钉顶鼎锭定订丢东冬董懂动栋侗恫冻洞兜抖斗陡豆逗痘都督毒犊独读堵睹赌杜镀肚度渡妒端短锻段断缎堆兑队对墩吨蹲敦顿囤钝盾遁掇哆多夺垛躲朵跺舵剁惰堕蛾峨鹅俄额讹娥恶厄扼遏鄂饿恩而儿耳尔饵洱二"],
+["b740","稝稟稡稢稤",14,"稴稵稶稸稺稾穀",5,"穇",9,"穒",4,"穘",16],
+["b780","穩",6,"穱穲穳穵穻穼穽穾窂窅窇窉窊窋窌窎窏窐窓窔窙窚窛窞窡窢贰发罚筏伐乏阀法珐藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛坊芳方肪房防妨仿访纺放菲非啡飞肥匪诽吠肺废沸费芬酚吩氛分纷坟焚汾粉奋份忿愤粪丰封枫蜂峰锋风疯烽逢冯缝讽奉凤佛否夫敷肤孵扶拂辐幅氟符伏俘服"],
+["b840","窣窤窧窩窪窫窮",4,"窴",10,"竀",10,"竌",9,"竗竘竚竛竜竝竡竢竤竧",5,"竮竰竱竲竳"],
+["b880","竴",4,"竻竼竾笀笁笂笅笇笉笌笍笎笐笒笓笖笗笘笚笜笝笟笡笢笣笧笩笭浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐噶嘎该改概钙盖溉干甘杆柑竿肝赶感秆敢赣冈刚钢缸肛纲岗港杠篙皋高膏羔糕搞镐稿告哥歌搁戈鸽胳疙割革葛格蛤阁隔铬个各给根跟耕更庚羹"],
+["b940","笯笰笲笴笵笶笷笹笻笽笿",5,"筆筈筊筍筎筓筕筗筙筜筞筟筡筣",10,"筯筰筳筴筶筸筺筼筽筿箁箂箃箄箆",6,"箎箏"],
+["b980","箑箒箓箖箘箙箚箛箞箟箠箣箤箥箮箯箰箲箳箵箶箷箹",7,"篂篃範埂耿梗工攻功恭龚供躬公宫弓巩汞拱贡共钩勾沟苟狗垢构购够辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇刮瓜剐寡挂褂乖拐怪棺关官冠观管馆罐惯灌贯光广逛瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽辊滚棍锅郭国果裹过哈"],
+["ba40","篅篈築篊篋篍篎篏篐篒篔",4,"篛篜篞篟篠篢篣篤篧篨篩篫篬篭篯篰篲",4,"篸篹篺篻篽篿",7,"簈簉簊簍簎簐",5,"簗簘簙"],
+["ba80","簚",4,"簠",5,"簨簩簫",12,"簹",5,"籂骸孩海氦亥害骇酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉夯杭航壕嚎豪毫郝好耗号浩呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺嘿黑痕很狠恨哼亨横衡恒轰哄烘虹鸿洪宏弘红喉侯猴吼厚候后呼乎忽瑚壶葫胡蝴狐糊湖"],
+["bb40","籃",9,"籎",36,"籵",5,"籾",9],
+["bb80","粈粊",6,"粓粔粖粙粚粛粠粡粣粦粧粨粩粫粬粭粯粰粴",4,"粺粻弧虎唬护互沪户花哗华猾滑画划化话槐徊怀淮坏欢环桓还缓换患唤痪豢焕涣宦幻荒慌黄磺蝗簧皇凰惶煌晃幌恍谎灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘荤昏婚魂浑混豁活伙火获或惑霍货祸击圾基机畸稽积箕"],
+["bc40","粿糀糂糃糄糆糉糋糎",6,"糘糚糛糝糞糡",6,"糩",5,"糰",7,"糹糺糼",13,"紋",5],
+["bc80","紑",14,"紡紣紤紥紦紨紩紪紬紭紮細",6,"肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件"],
+["bd40","紷",54,"絯",7],
+["bd80","絸",32,"健舰剑饯渐溅涧建僵姜将浆江疆蒋桨奖讲匠酱降蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫窖揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸"],
+["be40","継",12,"綧",6,"綯",42],
+["be80","線",32,"尽劲荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净炯窘揪究纠玖韭久灸九酒厩救旧臼舅咎就疚鞠拘狙疽居驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧捐鹃娟倦眷卷绢撅攫抉掘倔爵觉决诀绝均菌钧军君峻"],
+["bf40","緻",62],
+["bf80","縺縼",4,"繂",4,"繈",21,"俊竣浚郡骏喀咖卡咯开揩楷凯慨刊堪勘坎砍看康慷糠扛抗亢炕考拷烤靠坷苛柯棵磕颗科壳咳可渴克刻客课肯啃垦恳坑吭空恐孔控抠口扣寇枯哭窟苦酷库裤夸垮挎跨胯块筷侩快宽款匡筐狂框矿眶旷况亏盔岿窥葵奎魁傀"],
+["c040","繞",35,"纃",23,"纜纝纞"],
+["c080","纮纴纻纼绖绤绬绹缊缐缞缷缹缻",6,"罃罆",9,"罒罓馈愧溃坤昆捆困括扩廓阔垃拉喇蜡腊辣啦莱来赖蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥琅榔狼廊郎朗浪捞劳牢老佬姥酪烙涝勒乐雷镭蕾磊累儡垒擂肋类泪棱楞冷厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐"],
+["c140","罖罙罛罜罝罞罠罣",4,"罫罬罭罯罰罳罵罶罷罸罺罻罼罽罿羀羂",7,"羋羍羏",4,"羕",4,"羛羜羠羢羣羥羦羨",6,"羱"],
+["c180","羳",4,"羺羻羾翀翂翃翄翆翇翈翉翋翍翏",4,"翖翗翙",5,"翢翣痢立粒沥隶力璃哩俩联莲连镰廉怜涟帘敛脸链恋炼练粮凉梁粱良两辆量晾亮谅撩聊僚疗燎寥辽潦了撂镣廖料列裂烈劣猎琳林磷霖临邻鳞淋凛赁吝拎玲菱零龄铃伶羚凌灵陵岭领另令溜琉榴硫馏留刘瘤流柳六龙聋咙笼窿"],
+["c240","翤翧翨翪翫翬翭翯翲翴",6,"翽翾翿耂耇耈耉耊耎耏耑耓耚耛耝耞耟耡耣耤耫",5,"耲耴耹耺耼耾聀聁聄聅聇聈聉聎聏聐聑聓聕聖聗"],
+["c280","聙聛",13,"聫",5,"聲",11,"隆垄拢陇楼娄搂篓漏陋芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮驴吕铝侣旅履屡缕虑氯律率滤绿峦挛孪滦卵乱掠略抡轮伦仑沦纶论萝螺罗逻锣箩骡裸落洛骆络妈麻玛码蚂马骂嘛吗埋买麦卖迈脉瞒馒蛮满蔓曼慢漫"],
+["c340","聾肁肂肅肈肊肍",5,"肔肕肗肙肞肣肦肧肨肬肰肳肵肶肸肹肻胅胇",4,"胏",6,"胘胟胠胢胣胦胮胵胷胹胻胾胿脀脁脃脄脅脇脈脋"],
+["c380","脌脕脗脙脛脜脝脟",12,"脭脮脰脳脴脵脷脹",4,"脿谩芒茫盲氓忙莽猫茅锚毛矛铆卯茂冒帽貌贸么玫枚梅酶霉煤没眉媒镁每美昧寐妹媚门闷们萌蒙檬盟锰猛梦孟眯醚靡糜迷谜弥米秘觅泌蜜密幂棉眠绵冕免勉娩缅面苗描瞄藐秒渺庙妙蔑灭民抿皿敏悯闽明螟鸣铭名命谬摸"],
+["c440","腀",5,"腇腉腍腎腏腒腖腗腘腛",4,"腡腢腣腤腦腨腪腫腬腯腲腳腵腶腷腸膁膃",4,"膉膋膌膍膎膐膒",5,"膙膚膞",4,"膤膥"],
+["c480","膧膩膫",7,"膴",5,"膼膽膾膿臄臅臇臈臉臋臍",6,"摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谋牟某拇牡亩姆母墓暮幕募慕木目睦牧穆拿哪呐钠那娜纳氖乃奶耐奈南男难囊挠脑恼闹淖呢馁内嫩能妮霓倪泥尼拟你匿腻逆溺蔫拈年碾撵捻念娘酿鸟尿捏聂孽啮镊镍涅您柠狞凝宁"],
+["c540","臔",14,"臤臥臦臨臩臫臮",4,"臵",5,"臽臿舃與",4,"舎舏舑舓舕",5,"舝舠舤舥舦舧舩舮舲舺舼舽舿"],
+["c580","艀艁艂艃艅艆艈艊艌艍艎艐",7,"艙艛艜艝艞艠",7,"艩拧泞牛扭钮纽脓浓农弄奴努怒女暖虐疟挪懦糯诺哦欧鸥殴藕呕偶沤啪趴爬帕怕琶拍排牌徘湃派攀潘盘磐盼畔判叛乓庞旁耪胖抛咆刨炮袍跑泡呸胚培裴赔陪配佩沛喷盆砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯砒霹批披劈琵毗"],
+["c640","艪艫艬艭艱艵艶艷艸艻艼芀芁芃芅芆芇芉芌芐芓芔芕芖芚芛芞芠芢芣芧芲芵芶芺芻芼芿苀苂苃苅苆苉苐苖苙苚苝苢苧苨苩苪苬苭苮苰苲苳苵苶苸"],
+["c680","苺苼",4,"茊茋茍茐茒茓茖茘茙茝",9,"茩茪茮茰茲茷茻茽啤脾疲皮匹痞僻屁譬篇偏片骗飘漂瓢票撇瞥拼频贫品聘乒坪苹萍平凭瓶评屏坡泼颇婆破魄迫粕剖扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫掐"],
+["c740","茾茿荁荂荄荅荈荊",4,"荓荕",4,"荝荢荰",6,"荹荺荾",6,"莇莈莊莋莌莍莏莐莑莔莕莖莗莙莚莝莟莡",6,"莬莭莮"],
+["c780","莯莵莻莾莿菂菃菄菆菈菉菋菍菎菐菑菒菓菕菗菙菚菛菞菢菣菤菦菧菨菫菬菭恰洽牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉枪呛腔羌墙蔷强抢橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍切茄且怯窃钦侵亲秦琴勤芹擒禽寝沁青轻氢倾卿清擎晴氰情顷请庆琼穷秋丘邱球求囚酋泅趋区蛆曲躯屈驱渠"],
+["c840","菮華菳",4,"菺菻菼菾菿萀萂萅萇萈萉萊萐萒",5,"萙萚萛萞",5,"萩",7,"萲",5,"萹萺萻萾",7,"葇葈葉"],
+["c880","葊",6,"葒",4,"葘葝葞葟葠葢葤",4,"葪葮葯葰葲葴葷葹葻葼取娶龋趣去圈颧权醛泉全痊拳犬券劝缺炔瘸却鹊榷确雀裙群然燃冉染瓤壤攘嚷让饶扰绕惹热壬仁人忍韧任认刃妊纫扔仍日戎茸蓉荣融熔溶容绒冗揉柔肉茹蠕儒孺如辱乳汝入褥软阮蕊瑞锐闰润若弱撒洒萨腮鳃塞赛三叁"],
+["c940","葽",4,"蒃蒄蒅蒆蒊蒍蒏",7,"蒘蒚蒛蒝蒞蒟蒠蒢",12,"蒰蒱蒳蒵蒶蒷蒻蒼蒾蓀蓂蓃蓅蓆蓇蓈蓋蓌蓎蓏蓒蓔蓕蓗"],
+["c980","蓘",4,"蓞蓡蓢蓤蓧",4,"蓭蓮蓯蓱",10,"蓽蓾蔀蔁蔂伞散桑嗓丧搔骚扫嫂瑟色涩森僧莎砂杀刹沙纱傻啥煞筛晒珊苫杉山删煽衫闪陕擅赡膳善汕扇缮墒伤商赏晌上尚裳梢捎稍烧芍勺韶少哨邵绍奢赊蛇舌舍赦摄射慑涉社设砷申呻伸身深娠绅神沈审婶甚肾慎渗声生甥牲升绳"],
+["ca40","蔃",8,"蔍蔎蔏蔐蔒蔔蔕蔖蔘蔙蔛蔜蔝蔞蔠蔢",8,"蔭",9,"蔾",4,"蕄蕅蕆蕇蕋",10],
+["ca80","蕗蕘蕚蕛蕜蕝蕟",4,"蕥蕦蕧蕩",8,"蕳蕵蕶蕷蕸蕼蕽蕿薀薁省盛剩胜圣师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试收手首守寿授售受瘦兽蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱"],
+["cb40","薂薃薆薈",6,"薐",10,"薝",6,"薥薦薧薩薫薬薭薱",5,"薸薺",6,"藂",6,"藊",4,"藑藒"],
+["cb80","藔藖",5,"藝",6,"藥藦藧藨藪",14,"恕刷耍摔衰甩帅栓拴霜双爽谁水睡税吮瞬顺舜说硕朔烁斯撕嘶思私司丝死肆寺嗣四伺似饲巳松耸怂颂送宋讼诵搜艘擞嗽苏酥俗素速粟僳塑溯宿诉肃酸蒜算虽隋随绥髓碎岁穗遂隧祟孙损笋蓑梭唆缩琐索锁所塌他它她塔"],
+["cc40","藹藺藼藽藾蘀",4,"蘆",10,"蘒蘓蘔蘕蘗",15,"蘨蘪",13,"蘹蘺蘻蘽蘾蘿虀"],
+["cc80","虁",11,"虒虓處",4,"虛虜虝號虠虡虣",7,"獭挞蹋踏胎苔抬台泰酞太态汰坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭汤塘搪堂棠膛唐糖倘躺淌趟烫掏涛滔绦萄桃逃淘陶讨套特藤腾疼誊梯剔踢锑提题蹄啼体替嚏惕涕剃屉天添填田甜恬舔腆挑条迢眺跳贴铁帖厅听烃"],
+["cd40","虭虯虰虲",6,"蚃",6,"蚎",4,"蚔蚖",5,"蚞",4,"蚥蚦蚫蚭蚮蚲蚳蚷蚸蚹蚻",4,"蛁蛂蛃蛅蛈蛌蛍蛒蛓蛕蛖蛗蛚蛜"],
+["cd80","蛝蛠蛡蛢蛣蛥蛦蛧蛨蛪蛫蛬蛯蛵蛶蛷蛺蛻蛼蛽蛿蜁蜄蜅蜆蜋蜌蜎蜏蜐蜑蜔蜖汀廷停亭庭挺艇通桐酮瞳同铜彤童桶捅筒统痛偷投头透凸秃突图徒途涂屠土吐兔湍团推颓腿蜕褪退吞屯臀拖托脱鸵陀驮驼椭妥拓唾挖哇蛙洼娃瓦袜歪外豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕汪王亡枉网往旺望忘妄威"],
+["ce40","蜙蜛蜝蜟蜠蜤蜦蜧蜨蜪蜫蜬蜭蜯蜰蜲蜳蜵蜶蜸蜹蜺蜼蜽蝀",6,"蝊蝋蝍蝏蝐蝑蝒蝔蝕蝖蝘蝚",5,"蝡蝢蝦",7,"蝯蝱蝲蝳蝵"],
+["ce80","蝷蝸蝹蝺蝿螀螁螄螆螇螉螊螌螎",4,"螔螕螖螘",6,"螠",4,"巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫瘟温蚊文闻纹吻稳紊问嗡翁瓮挝蜗涡窝我斡卧握沃巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误昔熙析西硒矽晰嘻吸锡牺"],
+["cf40","螥螦螧螩螪螮螰螱螲螴螶螷螸螹螻螼螾螿蟁",4,"蟇蟈蟉蟌",4,"蟔",6,"蟜蟝蟞蟟蟡蟢蟣蟤蟦蟧蟨蟩蟫蟬蟭蟯",9],
+["cf80","蟺蟻蟼蟽蟿蠀蠁蠂蠄",5,"蠋",7,"蠔蠗蠘蠙蠚蠜",4,"蠣稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细瞎虾匣霞辖暇峡侠狭下厦夏吓掀锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象萧硝霄削哮嚣销消宵淆晓"],
+["d040","蠤",13,"蠳",5,"蠺蠻蠽蠾蠿衁衂衃衆",5,"衎",5,"衕衖衘衚",6,"衦衧衪衭衯衱衳衴衵衶衸衹衺"],
+["d080","衻衼袀袃袆袇袉袊袌袎袏袐袑袓袔袕袗",4,"袝",4,"袣袥",5,"小孝校肖啸笑效楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑薪芯锌欣辛新忻心信衅星腥猩惺兴刑型形邢行醒幸杏性姓兄凶胸匈汹雄熊休修羞朽嗅锈秀袖绣墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续轩喧宣悬旋玄"],
+["d140","袬袮袯袰袲",4,"袸袹袺袻袽袾袿裀裃裄裇裈裊裋裌裍裏裐裑裓裖裗裚",4,"裠裡裦裧裩",6,"裲裵裶裷裺裻製裿褀褁褃",5],
+["d180","褉褋",4,"褑褔",4,"褜",4,"褢褣褤褦褧褨褩褬褭褮褯褱褲褳褵褷选癣眩绚靴薛学穴雪血勋熏循旬询寻驯巡殉汛训讯逊迅压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾邀腰妖瑶"],
+["d240","褸",8,"襂襃襅",24,"襠",5,"襧",19,"襼"],
+["d280","襽襾覀覂覄覅覇",26,"摇尧遥窑谣姚咬舀药要耀椰噎耶爷野冶也页掖业叶曳腋夜液一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎茵荫因殷音阴姻吟银淫寅饮尹引隐"],
+["d340","覢",30,"觃觍觓觔觕觗觘觙觛觝觟觠觡觢觤觧觨觩觪觬觭觮觰觱觲觴",6],
+["d380","觻",4,"訁",5,"計",21,"印英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映哟拥佣臃痈庸雍踊蛹咏泳涌永恿勇用幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉"],
+["d440","訞",31,"訿",8,"詉",21],
+["d480","詟",25,"詺",6,"浴寓裕预豫驭鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院曰约越跃钥岳粤月悦阅耘云郧匀陨允运蕴酝晕韵孕匝砸杂栽哉灾宰载再在咱攒暂赞赃脏葬遭糟凿藻枣早澡蚤躁噪造皂灶燥责择则泽贼怎增憎曾赠扎喳渣札轧"],
+["d540","誁",7,"誋",7,"誔",46],
+["d580","諃",32,"铡闸眨栅榨咋乍炸诈摘斋宅窄债寨瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽樟章彰漳张掌涨杖丈帐账仗胀瘴障招昭找沼赵照罩兆肇召遮折哲蛰辙者锗蔗这浙珍斟真甄砧臻贞针侦枕疹诊震振镇阵蒸挣睁征狰争怔整拯正政"],
+["d640","諤",34,"謈",27],
+["d680","謤謥謧",30,"帧症郑证芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒中盅忠钟衷终种肿重仲众舟周州洲诌粥轴肘帚咒皱宙昼骤珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑"],
+["d740","譆",31,"譧",4,"譭",25],
+["d780","讇",24,"讬讱讻诇诐诪谉谞住注祝驻抓爪拽专砖转撰赚篆桩庄装妆撞壮状椎锥追赘坠缀谆准捉拙卓桌琢茁酌啄着灼浊兹咨资姿滋淄孜紫仔籽滓子自渍字鬃棕踪宗综总纵邹走奏揍租足卒族祖诅阻组钻纂嘴醉最罪尊遵昨左佐柞做作坐座"],
+["d840","谸",8,"豂豃豄豅豈豊豋豍",7,"豖豗豘豙豛",5,"豣",6,"豬",6,"豴豵豶豷豻",6,"貃貄貆貇"],
+["d880","貈貋貍",6,"貕貖貗貙",20,"亍丌兀丐廿卅丕亘丞鬲孬噩丨禺丿匕乇夭爻卮氐囟胤馗毓睾鼗丶亟鼐乜乩亓芈孛啬嘏仄厍厝厣厥厮靥赝匚叵匦匮匾赜卦卣刂刈刎刭刳刿剀剌剞剡剜蒯剽劂劁劐劓冂罔亻仃仉仂仨仡仫仞伛仳伢佤仵伥伧伉伫佞佧攸佚佝"],
+["d940","貮",62],
+["d980","賭",32,"佟佗伲伽佶佴侑侉侃侏佾佻侪佼侬侔俦俨俪俅俚俣俜俑俟俸倩偌俳倬倏倮倭俾倜倌倥倨偾偃偕偈偎偬偻傥傧傩傺僖儆僭僬僦僮儇儋仝氽佘佥俎龠汆籴兮巽黉馘冁夔勹匍訇匐凫夙兕亠兖亳衮袤亵脔裒禀嬴蠃羸冫冱冽冼"],
+["da40","贎",14,"贠赑赒赗赟赥赨赩赪赬赮赯赱赲赸",8,"趂趃趆趇趈趉趌",4,"趒趓趕",9,"趠趡"],
+["da80","趢趤",12,"趲趶趷趹趻趽跀跁跂跅跇跈跉跊跍跐跒跓跔凇冖冢冥讠讦讧讪讴讵讷诂诃诋诏诎诒诓诔诖诘诙诜诟诠诤诨诩诮诰诳诶诹诼诿谀谂谄谇谌谏谑谒谔谕谖谙谛谘谝谟谠谡谥谧谪谫谮谯谲谳谵谶卩卺阝阢阡阱阪阽阼陂陉陔陟陧陬陲陴隈隍隗隰邗邛邝邙邬邡邴邳邶邺"],
+["db40","跕跘跙跜跠跡跢跥跦跧跩跭跮跰跱跲跴跶跼跾",6,"踆踇踈踋踍踎踐踑踒踓踕",7,"踠踡踤",4,"踫踭踰踲踳踴踶踷踸踻踼踾"],
+["db80","踿蹃蹅蹆蹌",4,"蹓",5,"蹚",11,"蹧蹨蹪蹫蹮蹱邸邰郏郅邾郐郄郇郓郦郢郜郗郛郫郯郾鄄鄢鄞鄣鄱鄯鄹酃酆刍奂劢劬劭劾哿勐勖勰叟燮矍廴凵凼鬯厶弁畚巯坌垩垡塾墼壅壑圩圬圪圳圹圮圯坜圻坂坩垅坫垆坼坻坨坭坶坳垭垤垌垲埏垧垴垓垠埕埘埚埙埒垸埴埯埸埤埝"],
+["dc40","蹳蹵蹷",4,"蹽蹾躀躂躃躄躆躈",6,"躑躒躓躕",6,"躝躟",11,"躭躮躰躱躳",6,"躻",7],
+["dc80","軃",10,"軏",21,"堋堍埽埭堀堞堙塄堠塥塬墁墉墚墀馨鼙懿艹艽艿芏芊芨芄芎芑芗芙芫芸芾芰苈苊苣芘芷芮苋苌苁芩芴芡芪芟苄苎芤苡茉苷苤茏茇苜苴苒苘茌苻苓茑茚茆茔茕苠苕茜荑荛荜茈莒茼茴茱莛荞茯荏荇荃荟荀茗荠茭茺茳荦荥"],
+["dd40","軥",62],
+["dd80","輤",32,"荨茛荩荬荪荭荮莰荸莳莴莠莪莓莜莅荼莶莩荽莸荻莘莞莨莺莼菁萁菥菘堇萘萋菝菽菖萜萸萑萆菔菟萏萃菸菹菪菅菀萦菰菡葜葑葚葙葳蒇蒈葺蒉葸萼葆葩葶蒌蒎萱葭蓁蓍蓐蓦蒽蓓蓊蒿蒺蓠蒡蒹蒴蒗蓥蓣蔌甍蔸蓰蔹蔟蔺"],
+["de40","轅",32,"轪辀辌辒辝辠辡辢辤辥辦辧辪辬辭辮辯農辳辴辵辷辸辺辻込辿迀迃迆"],
+["de80","迉",4,"迏迒迖迗迚迠迡迣迧迬迯迱迲迴迵迶迺迻迼迾迿逇逈逌逎逓逕逘蕖蔻蓿蓼蕙蕈蕨蕤蕞蕺瞢蕃蕲蕻薤薨薇薏蕹薮薜薅薹薷薰藓藁藜藿蘧蘅蘩蘖蘼廾弈夼奁耷奕奚奘匏尢尥尬尴扌扪抟抻拊拚拗拮挢拶挹捋捃掭揶捱捺掎掴捭掬掊捩掮掼揲揸揠揿揄揞揎摒揆掾摅摁搋搛搠搌搦搡摞撄摭撖"],
+["df40","這逜連逤逥逧",5,"逰",4,"逷逹逺逽逿遀遃遅遆遈",4,"過達違遖遙遚遜",5,"遤遦遧適遪遫遬遯",4,"遶",6,"遾邁"],
+["df80","還邅邆邇邉邊邌",4,"邒邔邖邘邚邜邞邟邠邤邥邧邨邩邫邭邲邷邼邽邿郀摺撷撸撙撺擀擐擗擤擢攉攥攮弋忒甙弑卟叱叽叩叨叻吒吖吆呋呒呓呔呖呃吡呗呙吣吲咂咔呷呱呤咚咛咄呶呦咝哐咭哂咴哒咧咦哓哔呲咣哕咻咿哌哙哚哜咩咪咤哝哏哞唛哧唠哽唔哳唢唣唏唑唧唪啧喏喵啉啭啁啕唿啐唼"],
+["e040","郂郃郆郈郉郋郌郍郒郔郕郖郘郙郚郞郟郠郣郤郥郩郪郬郮郰郱郲郳郵郶郷郹郺郻郼郿鄀鄁鄃鄅",19,"鄚鄛鄜"],
+["e080","鄝鄟鄠鄡鄤",10,"鄰鄲",6,"鄺",8,"酄唷啖啵啶啷唳唰啜喋嗒喃喱喹喈喁喟啾嗖喑啻嗟喽喾喔喙嗪嗷嗉嘟嗑嗫嗬嗔嗦嗝嗄嗯嗥嗲嗳嗌嗍嗨嗵嗤辔嘞嘈嘌嘁嘤嘣嗾嘀嘧嘭噘嘹噗嘬噍噢噙噜噌噔嚆噤噱噫噻噼嚅嚓嚯囔囗囝囡囵囫囹囿圄圊圉圜帏帙帔帑帱帻帼"],
+["e140","酅酇酈酑酓酔酕酖酘酙酛酜酟酠酦酧酨酫酭酳酺酻酼醀",4,"醆醈醊醎醏醓",6,"醜",5,"醤",5,"醫醬醰醱醲醳醶醷醸醹醻"],
+["e180","醼",10,"釈釋釐釒",9,"針",8,"帷幄幔幛幞幡岌屺岍岐岖岈岘岙岑岚岜岵岢岽岬岫岱岣峁岷峄峒峤峋峥崂崃崧崦崮崤崞崆崛嵘崾崴崽嵬嵛嵯嵝嵫嵋嵊嵩嵴嶂嶙嶝豳嶷巅彳彷徂徇徉後徕徙徜徨徭徵徼衢彡犭犰犴犷犸狃狁狎狍狒狨狯狩狲狴狷猁狳猃狺"],
+["e240","釦",62],
+["e280","鈥",32,"狻猗猓猡猊猞猝猕猢猹猥猬猸猱獐獍獗獠獬獯獾舛夥飧夤夂饣饧",5,"饴饷饽馀馄馇馊馍馐馑馓馔馕庀庑庋庖庥庠庹庵庾庳赓廒廑廛廨廪膺忄忉忖忏怃忮怄忡忤忾怅怆忪忭忸怙怵怦怛怏怍怩怫怊怿怡恸恹恻恺恂"],
+["e340","鉆",45,"鉵",16],
+["e380","銆",7,"銏",24,"恪恽悖悚悭悝悃悒悌悛惬悻悱惝惘惆惚悴愠愦愕愣惴愀愎愫慊慵憬憔憧憷懔懵忝隳闩闫闱闳闵闶闼闾阃阄阆阈阊阋阌阍阏阒阕阖阗阙阚丬爿戕氵汔汜汊沣沅沐沔沌汨汩汴汶沆沩泐泔沭泷泸泱泗沲泠泖泺泫泮沱泓泯泾"],
+["e440","銨",5,"銯",24,"鋉",31],
+["e480","鋩",32,"洹洧洌浃浈洇洄洙洎洫浍洮洵洚浏浒浔洳涑浯涞涠浞涓涔浜浠浼浣渚淇淅淞渎涿淠渑淦淝淙渖涫渌涮渫湮湎湫溲湟溆湓湔渲渥湄滟溱溘滠漭滢溥溧溽溻溷滗溴滏溏滂溟潢潆潇漤漕滹漯漶潋潴漪漉漩澉澍澌潸潲潼潺濑"],
+["e540","錊",51,"錿",10],
+["e580","鍊",31,"鍫濉澧澹澶濂濡濮濞濠濯瀚瀣瀛瀹瀵灏灞宀宄宕宓宥宸甯骞搴寤寮褰寰蹇謇辶迓迕迥迮迤迩迦迳迨逅逄逋逦逑逍逖逡逵逶逭逯遄遑遒遐遨遘遢遛暹遴遽邂邈邃邋彐彗彖彘尻咫屐屙孱屣屦羼弪弩弭艴弼鬻屮妁妃妍妩妪妣"],
+["e640","鍬",34,"鎐",27],
+["e680","鎬",29,"鏋鏌鏍妗姊妫妞妤姒妲妯姗妾娅娆姝娈姣姘姹娌娉娲娴娑娣娓婀婧婊婕娼婢婵胬媪媛婷婺媾嫫媲嫒嫔媸嫠嫣嫱嫖嫦嫘嫜嬉嬗嬖嬲嬷孀尕尜孚孥孳孑孓孢驵驷驸驺驿驽骀骁骅骈骊骐骒骓骖骘骛骜骝骟骠骢骣骥骧纟纡纣纥纨纩"],
+["e740","鏎",7,"鏗",54],
+["e780","鐎",32,"纭纰纾绀绁绂绉绋绌绐绔绗绛绠绡绨绫绮绯绱绲缍绶绺绻绾缁缂缃缇缈缋缌缏缑缒缗缙缜缛缟缡",6,"缪缫缬缭缯",4,"缵幺畿巛甾邕玎玑玮玢玟珏珂珑玷玳珀珉珈珥珙顼琊珩珧珞玺珲琏琪瑛琦琥琨琰琮琬"],
+["e840","鐯",14,"鐿",43,"鑬鑭鑮鑯"],
+["e880","鑰",20,"钑钖钘铇铏铓铔铚铦铻锜锠琛琚瑁瑜瑗瑕瑙瑷瑭瑾璜璎璀璁璇璋璞璨璩璐璧瓒璺韪韫韬杌杓杞杈杩枥枇杪杳枘枧杵枨枞枭枋杷杼柰栉柘栊柩枰栌柙枵柚枳柝栀柃枸柢栎柁柽栲栳桠桡桎桢桄桤梃栝桕桦桁桧桀栾桊桉栩梵梏桴桷梓桫棂楮棼椟椠棹"],
+["e940","锧锳锽镃镈镋镕镚镠镮镴镵長",7,"門",42],
+["e980","閫",32,"椤棰椋椁楗棣椐楱椹楠楂楝榄楫榀榘楸椴槌榇榈槎榉楦楣楹榛榧榻榫榭槔榱槁槊槟榕槠榍槿樯槭樗樘橥槲橄樾檠橐橛樵檎橹樽樨橘橼檑檐檩檗檫猷獒殁殂殇殄殒殓殍殚殛殡殪轫轭轱轲轳轵轶轸轷轹轺轼轾辁辂辄辇辋"],
+["ea40","闌",27,"闬闿阇阓阘阛阞阠阣",6,"阫阬阭阯阰阷阸阹阺阾陁陃陊陎陏陑陒陓陖陗"],
+["ea80","陘陙陚陜陝陞陠陣陥陦陫陭",4,"陳陸",12,"隇隉隊辍辎辏辘辚軎戋戗戛戟戢戡戥戤戬臧瓯瓴瓿甏甑甓攴旮旯旰昊昙杲昃昕昀炅曷昝昴昱昶昵耆晟晔晁晏晖晡晗晷暄暌暧暝暾曛曜曦曩贲贳贶贻贽赀赅赆赈赉赇赍赕赙觇觊觋觌觎觏觐觑牮犟牝牦牯牾牿犄犋犍犏犒挈挲掰"],
+["eb40","隌階隑隒隓隕隖隚際隝",9,"隨",7,"隱隲隴隵隷隸隺隻隿雂雃雈雊雋雐雑雓雔雖",9,"雡",6,"雫"],
+["eb80","雬雭雮雰雱雲雴雵雸雺電雼雽雿霂霃霅霊霋霌霐霑霒霔霕霗",4,"霝霟霠搿擘耄毪毳毽毵毹氅氇氆氍氕氘氙氚氡氩氤氪氲攵敕敫牍牒牖爰虢刖肟肜肓肼朊肽肱肫肭肴肷胧胨胩胪胛胂胄胙胍胗朐胝胫胱胴胭脍脎胲胼朕脒豚脶脞脬脘脲腈腌腓腴腙腚腱腠腩腼腽腭腧塍媵膈膂膑滕膣膪臌朦臊膻"],
+["ec40","霡",8,"霫霬霮霯霱霳",4,"霺霻霼霽霿",18,"靔靕靗靘靚靜靝靟靣靤靦靧靨靪",7],
+["ec80","靲靵靷",4,"靽",7,"鞆",4,"鞌鞎鞏鞐鞓鞕鞖鞗鞙",4,"臁膦欤欷欹歃歆歙飑飒飓飕飙飚殳彀毂觳斐齑斓於旆旄旃旌旎旒旖炀炜炖炝炻烀炷炫炱烨烊焐焓焖焯焱煳煜煨煅煲煊煸煺熘熳熵熨熠燠燔燧燹爝爨灬焘煦熹戾戽扃扈扉礻祀祆祉祛祜祓祚祢祗祠祯祧祺禅禊禚禧禳忑忐"],
+["ed40","鞞鞟鞡鞢鞤",6,"鞬鞮鞰鞱鞳鞵",46],
+["ed80","韤韥韨韮",4,"韴韷",23,"怼恝恚恧恁恙恣悫愆愍慝憩憝懋懑戆肀聿沓泶淼矶矸砀砉砗砘砑斫砭砜砝砹砺砻砟砼砥砬砣砩硎硭硖硗砦硐硇硌硪碛碓碚碇碜碡碣碲碹碥磔磙磉磬磲礅磴礓礤礞礴龛黹黻黼盱眄眍盹眇眈眚眢眙眭眦眵眸睐睑睇睃睚睨"],
+["ee40","頏",62],
+["ee80","顎",32,"睢睥睿瞍睽瞀瞌瞑瞟瞠瞰瞵瞽町畀畎畋畈畛畲畹疃罘罡罟詈罨罴罱罹羁罾盍盥蠲钅钆钇钋钊钌钍钏钐钔钗钕钚钛钜钣钤钫钪钭钬钯钰钲钴钶",4,"钼钽钿铄铈",6,"铐铑铒铕铖铗铙铘铛铞铟铠铢铤铥铧铨铪"],
+["ef40","顯",5,"颋颎颒颕颙颣風",37,"飏飐飔飖飗飛飜飝飠",4],
+["ef80","飥飦飩",30,"铩铫铮铯铳铴铵铷铹铼铽铿锃锂锆锇锉锊锍锎锏锒",4,"锘锛锝锞锟锢锪锫锩锬锱锲锴锶锷锸锼锾锿镂锵镄镅镆镉镌镎镏镒镓镔镖镗镘镙镛镞镟镝镡镢镤",8,"镯镱镲镳锺矧矬雉秕秭秣秫稆嵇稃稂稞稔"],
+["f040","餈",4,"餎餏餑",28,"餯",26],
+["f080","饊",9,"饖",12,"饤饦饳饸饹饻饾馂馃馉稹稷穑黏馥穰皈皎皓皙皤瓞瓠甬鸠鸢鸨",4,"鸲鸱鸶鸸鸷鸹鸺鸾鹁鹂鹄鹆鹇鹈鹉鹋鹌鹎鹑鹕鹗鹚鹛鹜鹞鹣鹦",6,"鹱鹭鹳疒疔疖疠疝疬疣疳疴疸痄疱疰痃痂痖痍痣痨痦痤痫痧瘃痱痼痿瘐瘀瘅瘌瘗瘊瘥瘘瘕瘙"],
+["f140","馌馎馚",10,"馦馧馩",47],
+["f180","駙",32,"瘛瘼瘢瘠癀瘭瘰瘿瘵癃瘾瘳癍癞癔癜癖癫癯翊竦穸穹窀窆窈窕窦窠窬窨窭窳衤衩衲衽衿袂袢裆袷袼裉裢裎裣裥裱褚裼裨裾裰褡褙褓褛褊褴褫褶襁襦襻疋胥皲皴矜耒耔耖耜耠耢耥耦耧耩耨耱耋耵聃聆聍聒聩聱覃顸颀颃"],
+["f240","駺",62],
+["f280","騹",32,"颉颌颍颏颔颚颛颞颟颡颢颥颦虍虔虬虮虿虺虼虻蚨蚍蚋蚬蚝蚧蚣蚪蚓蚩蚶蛄蚵蛎蚰蚺蚱蚯蛉蛏蚴蛩蛱蛲蛭蛳蛐蜓蛞蛴蛟蛘蛑蜃蜇蛸蜈蜊蜍蜉蜣蜻蜞蜥蜮蜚蜾蝈蜴蜱蜩蜷蜿螂蜢蝽蝾蝻蝠蝰蝌蝮螋蝓蝣蝼蝤蝙蝥螓螯螨蟒"],
+["f340","驚",17,"驲骃骉骍骎骔骕骙骦骩",6,"骲骳骴骵骹骻骽骾骿髃髄髆",4,"髍髎髏髐髒體髕髖髗髙髚髛髜"],
+["f380","髝髞髠髢髣髤髥髧髨髩髪髬髮髰",8,"髺髼",6,"鬄鬅鬆蟆螈螅螭螗螃螫蟥螬螵螳蟋蟓螽蟑蟀蟊蟛蟪蟠蟮蠖蠓蟾蠊蠛蠡蠹蠼缶罂罄罅舐竺竽笈笃笄笕笊笫笏筇笸笪笙笮笱笠笥笤笳笾笞筘筚筅筵筌筝筠筮筻筢筲筱箐箦箧箸箬箝箨箅箪箜箢箫箴篑篁篌篝篚篥篦篪簌篾篼簏簖簋"],
+["f440","鬇鬉",5,"鬐鬑鬒鬔",10,"鬠鬡鬢鬤",10,"鬰鬱鬳",7,"鬽鬾鬿魀魆魊魋魌魎魐魒魓魕",5],
+["f480","魛",32,"簟簪簦簸籁籀臾舁舂舄臬衄舡舢舣舭舯舨舫舸舻舳舴舾艄艉艋艏艚艟艨衾袅袈裘裟襞羝羟羧羯羰羲籼敉粑粝粜粞粢粲粼粽糁糇糌糍糈糅糗糨艮暨羿翎翕翥翡翦翩翮翳糸絷綦綮繇纛麸麴赳趄趔趑趱赧赭豇豉酊酐酎酏酤"],
+["f540","魼",62],
+["f580","鮻",32,"酢酡酰酩酯酽酾酲酴酹醌醅醐醍醑醢醣醪醭醮醯醵醴醺豕鹾趸跫踅蹙蹩趵趿趼趺跄跖跗跚跞跎跏跛跆跬跷跸跣跹跻跤踉跽踔踝踟踬踮踣踯踺蹀踹踵踽踱蹉蹁蹂蹑蹒蹊蹰蹶蹼蹯蹴躅躏躔躐躜躞豸貂貊貅貘貔斛觖觞觚觜"],
+["f640","鯜",62],
+["f680","鰛",32,"觥觫觯訾謦靓雩雳雯霆霁霈霏霎霪霭霰霾龀龃龅",5,"龌黾鼋鼍隹隼隽雎雒瞿雠銎銮鋈錾鍪鏊鎏鐾鑫鱿鲂鲅鲆鲇鲈稣鲋鲎鲐鲑鲒鲔鲕鲚鲛鲞",5,"鲥",4,"鲫鲭鲮鲰",7,"鲺鲻鲼鲽鳄鳅鳆鳇鳊鳋"],
+["f740","鰼",62],
+["f780","鱻鱽鱾鲀鲃鲄鲉鲊鲌鲏鲓鲖鲗鲘鲙鲝鲪鲬鲯鲹鲾",4,"鳈鳉鳑鳒鳚鳛鳠鳡鳌",4,"鳓鳔鳕鳗鳘鳙鳜鳝鳟鳢靼鞅鞑鞒鞔鞯鞫鞣鞲鞴骱骰骷鹘骶骺骼髁髀髅髂髋髌髑魅魃魇魉魈魍魑飨餍餮饕饔髟髡髦髯髫髻髭髹鬈鬏鬓鬟鬣麽麾縻麂麇麈麋麒鏖麝麟黛黜黝黠黟黢黩黧黥黪黯鼢鼬鼯鼹鼷鼽鼾齄"],
+["f840","鳣",62],
+["f880","鴢",32],
+["f940","鵃",62],
+["f980","鶂",32],
+["fa40","鶣",62],
+["fa80","鷢",32],
+["fb40","鸃",27,"鸤鸧鸮鸰鸴鸻鸼鹀鹍鹐鹒鹓鹔鹖鹙鹝鹟鹠鹡鹢鹥鹮鹯鹲鹴",9,"麀"],
+["fb80","麁麃麄麅麆麉麊麌",5,"麔",8,"麞麠",5,"麧麨麩麪"],
+["fc40","麫",8,"麵麶麷麹麺麼麿",4,"黅黆黇黈黊黋黌黐黒黓黕黖黗黙黚點黡黣黤黦黨黫黬黭黮黰",8,"黺黽黿",6],
+["fc80","鼆",4,"鼌鼏鼑鼒鼔鼕鼖鼘鼚",5,"鼡鼣",8,"鼭鼮鼰鼱"],
+["fd40","鼲",4,"鼸鼺鼼鼿",4,"齅",10,"齒",38],
+["fd80","齹",5,"龁龂龍",11,"龜龝龞龡",4,"郎凉秊裏隣"],
+["fe40","兀嗀﨎﨏﨑﨓﨔礼﨟蘒﨡﨣﨤﨧﨨﨩"]
+]
diff --git a/tools/node_modules/eslint/node_modules/iconv-lite/encodings/tables/cp949.json b/tools/node_modules/eslint/node_modules/iconv-lite/encodings/tables/cp949.json
new file mode 100644
index 0000000000..2022a007ff
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/iconv-lite/encodings/tables/cp949.json
@@ -0,0 +1,273 @@
+[
+["0","\u0000",127],
+["8141","갂갃갅갆갋",4,"갘갞갟갡갢갣갥",6,"갮갲갳갴"],
+["8161","갵갶갷갺갻갽갾갿걁",9,"걌걎",5,"걕"],
+["8181","걖걗걙걚걛걝",18,"걲걳걵걶걹걻",4,"겂겇겈겍겎겏겑겒겓겕",6,"겞겢",5,"겫겭겮겱",6,"겺겾겿곀곂곃곅곆곇곉곊곋곍",7,"곖곘",7,"곢곣곥곦곩곫곭곮곲곴곷",4,"곾곿괁괂괃괅괇",4,"괎괐괒괓"],
+["8241","괔괕괖괗괙괚괛괝괞괟괡",7,"괪괫괮",5],
+["8261","괶괷괹괺괻괽",6,"굆굈굊",5,"굑굒굓굕굖굗"],
+["8281","굙",7,"굢굤",7,"굮굯굱굲굷굸굹굺굾궀궃",4,"궊궋궍궎궏궑",10,"궞",5,"궥",17,"궸",7,"귂귃귅귆귇귉",6,"귒귔",7,"귝귞귟귡귢귣귥",18],
+["8341","귺귻귽귾긂",5,"긊긌긎",5,"긕",7],
+["8361","긝",18,"긲긳긵긶긹긻긼"],
+["8381","긽긾긿깂깄깇깈깉깋깏깑깒깓깕깗",4,"깞깢깣깤깦깧깪깫깭깮깯깱",6,"깺깾",5,"꺆",5,"꺍",46,"꺿껁껂껃껅",6,"껎껒",5,"껚껛껝",8],
+["8441","껦껧껩껪껬껮",5,"껵껶껷껹껺껻껽",8],
+["8461","꼆꼉꼊꼋꼌꼎꼏꼑",18],
+["8481","꼤",7,"꼮꼯꼱꼳꼵",6,"꼾꽀꽄꽅꽆꽇꽊",5,"꽑",10,"꽞",5,"꽦",18,"꽺",5,"꾁꾂꾃꾅꾆꾇꾉",6,"꾒꾓꾔꾖",5,"꾝",26,"꾺꾻꾽꾾"],
+["8541","꾿꿁",5,"꿊꿌꿏",4,"꿕",6,"꿝",4],
+["8561","꿢",5,"꿪",5,"꿲꿳꿵꿶꿷꿹",6,"뀂뀃"],
+["8581","뀅",6,"뀍뀎뀏뀑뀒뀓뀕",6,"뀞",9,"뀩",26,"끆끇끉끋끍끏끐끑끒끖끘끚끛끜끞",29,"끾끿낁낂낃낅",6,"낎낐낒",5,"낛낝낞낣낤"],
+["8641","낥낦낧낪낰낲낶낷낹낺낻낽",6,"냆냊",5,"냒"],
+["8661","냓냕냖냗냙",6,"냡냢냣냤냦",10],
+["8681","냱",22,"넊넍넎넏넑넔넕넖넗넚넞",4,"넦넧넩넪넫넭",6,"넶넺",5,"녂녃녅녆녇녉",6,"녒녓녖녗녙녚녛녝녞녟녡",22,"녺녻녽녾녿놁놃",4,"놊놌놎놏놐놑놕놖놗놙놚놛놝"],
+["8741","놞",9,"놩",15],
+["8761","놹",18,"뇍뇎뇏뇑뇒뇓뇕"],
+["8781","뇖",5,"뇞뇠",7,"뇪뇫뇭뇮뇯뇱",7,"뇺뇼뇾",5,"눆눇눉눊눍",6,"눖눘눚",5,"눡",18,"눵",6,"눽",26,"뉙뉚뉛뉝뉞뉟뉡",6,"뉪",4],
+["8841","뉯",4,"뉶",5,"뉽",6,"늆늇늈늊",4],
+["8861","늏늒늓늕늖늗늛",4,"늢늤늧늨늩늫늭늮늯늱늲늳늵늶늷"],
+["8881","늸",15,"닊닋닍닎닏닑닓",4,"닚닜닞닟닠닡닣닧닩닪닰닱닲닶닼닽닾댂댃댅댆댇댉",6,"댒댖",5,"댝",54,"덗덙덚덝덠덡덢덣"],
+["8941","덦덨덪덬덭덯덲덳덵덶덷덹",6,"뎂뎆",5,"뎍"],
+["8961","뎎뎏뎑뎒뎓뎕",10,"뎢",5,"뎩뎪뎫뎭"],
+["8981","뎮",21,"돆돇돉돊돍돏돑돒돓돖돘돚돜돞돟돡돢돣돥돦돧돩",18,"돽",18,"됑",6,"됙됚됛됝됞됟됡",6,"됪됬",7,"됵",15],
+["8a41","둅",10,"둒둓둕둖둗둙",6,"둢둤둦"],
+["8a61","둧",4,"둭",18,"뒁뒂"],
+["8a81","뒃",4,"뒉",19,"뒞",5,"뒥뒦뒧뒩뒪뒫뒭",7,"뒶뒸뒺",5,"듁듂듃듅듆듇듉",6,"듑듒듓듔듖",5,"듞듟듡듢듥듧",4,"듮듰듲",5,"듹",26,"딖딗딙딚딝"],
+["8b41","딞",5,"딦딫",4,"딲딳딵딶딷딹",6,"땂땆"],
+["8b61","땇땈땉땊땎땏땑땒땓땕",6,"땞땢",8],
+["8b81","땫",52,"떢떣떥떦떧떩떬떭떮떯떲떶",4,"떾떿뗁뗂뗃뗅",6,"뗎뗒",5,"뗙",18,"뗭",18],
+["8c41","똀",15,"똒똓똕똖똗똙",4],
+["8c61","똞",6,"똦",5,"똭",6,"똵",5],
+["8c81","똻",12,"뙉",26,"뙥뙦뙧뙩",50,"뚞뚟뚡뚢뚣뚥",5,"뚭뚮뚯뚰뚲",16],
+["8d41","뛃",16,"뛕",8],
+["8d61","뛞",17,"뛱뛲뛳뛵뛶뛷뛹뛺"],
+["8d81","뛻",4,"뜂뜃뜄뜆",33,"뜪뜫뜭뜮뜱",6,"뜺뜼",7,"띅띆띇띉띊띋띍",6,"띖",9,"띡띢띣띥띦띧띩",6,"띲띴띶",5,"띾띿랁랂랃랅",6,"랎랓랔랕랚랛랝랞"],
+["8e41","랟랡",6,"랪랮",5,"랶랷랹",8],
+["8e61","럂",4,"럈럊",19],
+["8e81","럞",13,"럮럯럱럲럳럵",6,"럾렂",4,"렊렋렍렎렏렑",6,"렚렜렞",5,"렦렧렩렪렫렭",6,"렶렺",5,"롁롂롃롅",11,"롒롔",7,"롞롟롡롢롣롥",6,"롮롰롲",5,"롹롺롻롽",7],
+["8f41","뢅",7,"뢎",17],
+["8f61","뢠",7,"뢩",6,"뢱뢲뢳뢵뢶뢷뢹",4],
+["8f81","뢾뢿룂룄룆",5,"룍룎룏룑룒룓룕",7,"룞룠룢",5,"룪룫룭룮룯룱",6,"룺룼룾",5,"뤅",18,"뤙",6,"뤡",26,"뤾뤿륁륂륃륅",6,"륍륎륐륒",5],
+["9041","륚륛륝륞륟륡",6,"륪륬륮",5,"륶륷륹륺륻륽"],
+["9061","륾",5,"릆릈릋릌릏",15],
+["9081","릟",12,"릮릯릱릲릳릵",6,"릾맀맂",5,"맊맋맍맓",4,"맚맜맟맠맢맦맧맩맪맫맭",6,"맶맻",4,"먂",5,"먉",11,"먖",33,"먺먻먽먾먿멁멃멄멅멆"],
+["9141","멇멊멌멏멐멑멒멖멗멙멚멛멝",6,"멦멪",5],
+["9161","멲멳멵멶멷멹",9,"몆몈몉몊몋몍",5],
+["9181","몓",20,"몪몭몮몯몱몳",4,"몺몼몾",5,"뫅뫆뫇뫉",14,"뫚",33,"뫽뫾뫿묁묂묃묅",7,"묎묐묒",5,"묙묚묛묝묞묟묡",6],
+["9241","묨묪묬",7,"묷묹묺묿",4,"뭆뭈뭊뭋뭌뭎뭑뭒"],
+["9261","뭓뭕뭖뭗뭙",7,"뭢뭤",7,"뭭",4],
+["9281","뭲",21,"뮉뮊뮋뮍뮎뮏뮑",18,"뮥뮦뮧뮩뮪뮫뮭",6,"뮵뮶뮸",7,"믁믂믃믅믆믇믉",6,"믑믒믔",35,"믺믻믽믾밁"],
+["9341","밃",4,"밊밎밐밒밓밙밚밠밡밢밣밦밨밪밫밬밮밯밲밳밵"],
+["9361","밶밷밹",6,"뱂뱆뱇뱈뱊뱋뱎뱏뱑",8],
+["9381","뱚뱛뱜뱞",37,"벆벇벉벊벍벏",4,"벖벘벛",4,"벢벣벥벦벩",6,"벲벶",5,"벾벿볁볂볃볅",7,"볎볒볓볔볖볗볙볚볛볝",22,"볷볹볺볻볽"],
+["9441","볾",5,"봆봈봊",5,"봑봒봓봕",8],
+["9461","봞",5,"봥",6,"봭",12],
+["9481","봺",5,"뵁",6,"뵊뵋뵍뵎뵏뵑",6,"뵚",9,"뵥뵦뵧뵩",22,"붂붃붅붆붋",4,"붒붔붖붗붘붛붝",6,"붥",10,"붱",6,"붹",24],
+["9541","뷒뷓뷖뷗뷙뷚뷛뷝",11,"뷪",5,"뷱"],
+["9561","뷲뷳뷵뷶뷷뷹",6,"븁븂븄븆",5,"븎븏븑븒븓"],
+["9581","븕",6,"븞븠",35,"빆빇빉빊빋빍빏",4,"빖빘빜빝빞빟빢빣빥빦빧빩빫",4,"빲빶",4,"빾빿뺁뺂뺃뺅",6,"뺎뺒",5,"뺚",13,"뺩",14],
+["9641","뺸",23,"뻒뻓"],
+["9661","뻕뻖뻙",6,"뻡뻢뻦",5,"뻭",8],
+["9681","뻶",10,"뼂",5,"뼊",13,"뼚뼞",33,"뽂뽃뽅뽆뽇뽉",6,"뽒뽓뽔뽖",44],
+["9741","뾃",16,"뾕",8],
+["9761","뾞",17,"뾱",7],
+["9781","뾹",11,"뿆",5,"뿎뿏뿑뿒뿓뿕",6,"뿝뿞뿠뿢",89,"쀽쀾쀿"],
+["9841","쁀",16,"쁒",5,"쁙쁚쁛"],
+["9861","쁝쁞쁟쁡",6,"쁪",15],
+["9881","쁺",21,"삒삓삕삖삗삙",6,"삢삤삦",5,"삮삱삲삷",4,"삾샂샃샄샆샇샊샋샍샎샏샑",6,"샚샞",5,"샦샧샩샪샫샭",6,"샶샸샺",5,"섁섂섃섅섆섇섉",6,"섑섒섓섔섖",5,"섡섢섥섨섩섪섫섮"],
+["9941","섲섳섴섵섷섺섻섽섾섿셁",6,"셊셎",5,"셖셗"],
+["9961","셙셚셛셝",6,"셦셪",5,"셱셲셳셵셶셷셹셺셻"],
+["9981","셼",8,"솆",5,"솏솑솒솓솕솗",4,"솞솠솢솣솤솦솧솪솫솭솮솯솱",11,"솾",5,"쇅쇆쇇쇉쇊쇋쇍",6,"쇕쇖쇙",6,"쇡쇢쇣쇥쇦쇧쇩",6,"쇲쇴",7,"쇾쇿숁숂숃숅",6,"숎숐숒",5,"숚숛숝숞숡숢숣"],
+["9a41","숤숥숦숧숪숬숮숰숳숵",16],
+["9a61","쉆쉇쉉",6,"쉒쉓쉕쉖쉗쉙",6,"쉡쉢쉣쉤쉦"],
+["9a81","쉧",4,"쉮쉯쉱쉲쉳쉵",6,"쉾슀슂",5,"슊",5,"슑",6,"슙슚슜슞",5,"슦슧슩슪슫슮",5,"슶슸슺",33,"싞싟싡싢싥",5,"싮싰싲싳싴싵싷싺싽싾싿쌁",6,"쌊쌋쌎쌏"],
+["9b41","쌐쌑쌒쌖쌗쌙쌚쌛쌝",6,"쌦쌧쌪",8],
+["9b61","쌳",17,"썆",7],
+["9b81","썎",25,"썪썫썭썮썯썱썳",4,"썺썻썾",5,"쎅쎆쎇쎉쎊쎋쎍",50,"쏁",22,"쏚"],
+["9c41","쏛쏝쏞쏡쏣",4,"쏪쏫쏬쏮",5,"쏶쏷쏹",5],
+["9c61","쏿",8,"쐉",6,"쐑",9],
+["9c81","쐛",8,"쐥",6,"쐭쐮쐯쐱쐲쐳쐵",6,"쐾",9,"쑉",26,"쑦쑧쑩쑪쑫쑭",6,"쑶쑷쑸쑺",5,"쒁",18,"쒕",6,"쒝",12],
+["9d41","쒪",13,"쒹쒺쒻쒽",8],
+["9d61","쓆",25],
+["9d81","쓠",8,"쓪",5,"쓲쓳쓵쓶쓷쓹쓻쓼쓽쓾씂",9,"씍씎씏씑씒씓씕",6,"씝",10,"씪씫씭씮씯씱",6,"씺씼씾",5,"앆앇앋앏앐앑앒앖앚앛앜앟앢앣앥앦앧앩",6,"앲앶",5,"앾앿얁얂얃얅얆얈얉얊얋얎얐얒얓얔"],
+["9e41","얖얙얚얛얝얞얟얡",7,"얪",9,"얶"],
+["9e61","얷얺얿",4,"엋엍엏엒엓엕엖엗엙",6,"엢엤엦엧"],
+["9e81","엨엩엪엫엯엱엲엳엵엸엹엺엻옂옃옄옉옊옋옍옎옏옑",6,"옚옝",6,"옦옧옩옪옫옯옱옲옶옸옺옼옽옾옿왂왃왅왆왇왉",6,"왒왖",5,"왞왟왡",10,"왭왮왰왲",5,"왺왻왽왾왿욁",6,"욊욌욎",5,"욖욗욙욚욛욝",6,"욦"],
+["9f41","욨욪",5,"욲욳욵욶욷욻",4,"웂웄웆",5,"웎"],
+["9f61","웏웑웒웓웕",6,"웞웟웢",5,"웪웫웭웮웯웱웲"],
+["9f81","웳",4,"웺웻웼웾",5,"윆윇윉윊윋윍",6,"윖윘윚",5,"윢윣윥윦윧윩",6,"윲윴윶윸윹윺윻윾윿읁읂읃읅",4,"읋읎읐읙읚읛읝읞읟읡",6,"읩읪읬",7,"읶읷읹읺읻읿잀잁잂잆잋잌잍잏잒잓잕잙잛",4,"잢잧",4,"잮잯잱잲잳잵잶잷"],
+["a041","잸잹잺잻잾쟂",5,"쟊쟋쟍쟏쟑",6,"쟙쟚쟛쟜"],
+["a061","쟞",5,"쟥쟦쟧쟩쟪쟫쟭",13],
+["a081","쟻",4,"젂젃젅젆젇젉젋",4,"젒젔젗",4,"젞젟젡젢젣젥",6,"젮젰젲",5,"젹젺젻젽젾젿졁",6,"졊졋졎",5,"졕",26,"졲졳졵졶졷졹졻",4,"좂좄좈좉좊좎",5,"좕",7,"좞좠좢좣좤"],
+["a141","좥좦좧좩",18,"좾좿죀죁"],
+["a161","죂죃죅죆죇죉죊죋죍",6,"죖죘죚",5,"죢죣죥"],
+["a181","죦",14,"죶",5,"죾죿줁줂줃줇",4,"줎 、。·‥…¨〃­―∥\∼‘’“”〔〕〈",9,"±×÷≠≤≥∞∴°′″℃Å¢£¥♂♀∠⊥⌒∂∇≡≒§※☆★○●◎◇◆□■△▲▽▼→←↑↓↔〓≪≫√∽∝∵∫∬∈∋⊆⊇⊂⊃∪∩∧∨¬"],
+["a241","줐줒",5,"줙",18],
+["a261","줭",6,"줵",18],
+["a281","쥈",7,"쥒쥓쥕쥖쥗쥙",6,"쥢쥤",7,"쥭쥮쥯⇒⇔∀∃´~ˇ˘˝˚˙¸˛¡¿ː∮∑∏¤℉‰◁◀▷▶♤♠♡♥♧♣⊙◈▣◐◑▒▤▥▨▧▦▩♨☏☎☜☞¶†‡↕↗↙↖↘♭♩♪♬㉿㈜№㏇™㏂㏘℡€®"],
+["a341","쥱쥲쥳쥵",6,"쥽",10,"즊즋즍즎즏"],
+["a361","즑",6,"즚즜즞",16],
+["a381","즯",16,"짂짃짅짆짉짋",4,"짒짔짗짘짛!",58,"₩]",32," ̄"],
+["a441","짞짟짡짣짥짦짨짩짪짫짮짲",5,"짺짻짽짾짿쨁쨂쨃쨄"],
+["a461","쨅쨆쨇쨊쨎",5,"쨕쨖쨗쨙",12],
+["a481","쨦쨧쨨쨪",28,"ㄱ",93],
+["a541","쩇",4,"쩎쩏쩑쩒쩓쩕",6,"쩞쩢",5,"쩩쩪"],
+["a561","쩫",17,"쩾",5,"쪅쪆"],
+["a581","쪇",16,"쪙",14,"ⅰ",9],
+["a5b0","Ⅰ",9],
+["a5c1","Α",16,"Σ",6],
+["a5e1","α",16,"σ",6],
+["a641","쪨",19,"쪾쪿쫁쫂쫃쫅"],
+["a661","쫆",5,"쫎쫐쫒쫔쫕쫖쫗쫚",5,"쫡",6],
+["a681","쫨쫩쫪쫫쫭",6,"쫵",18,"쬉쬊─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂┒┑┚┙┖┕┎┍┞┟┡┢┦┧┩┪┭┮┱┲┵┶┹┺┽┾╀╁╃",7],
+["a741","쬋",4,"쬑쬒쬓쬕쬖쬗쬙",6,"쬢",7],
+["a761","쬪",22,"쭂쭃쭄"],
+["a781","쭅쭆쭇쭊쭋쭍쭎쭏쭑",6,"쭚쭛쭜쭞",5,"쭥",7,"㎕㎖㎗ℓ㎘㏄㎣㎤㎥㎦㎙",9,"㏊㎍㎎㎏㏏㎈㎉㏈㎧㎨㎰",9,"㎀",4,"㎺",5,"㎐",4,"Ω㏀㏁㎊㎋㎌㏖㏅㎭㎮㎯㏛㎩㎪㎫㎬㏝㏐㏓㏃㏉㏜㏆"],
+["a841","쭭",10,"쭺",14],
+["a861","쮉",18,"쮝",6],
+["a881","쮤",19,"쮹",11,"ÆЪĦ"],
+["a8a6","IJ"],
+["a8a8","ĿŁØŒºÞŦŊ"],
+["a8b1","㉠",27,"ⓐ",25,"①",14,"½⅓⅔¼¾⅛⅜⅝⅞"],
+["a941","쯅",14,"쯕",10],
+["a961","쯠쯡쯢쯣쯥쯦쯨쯪",18],
+["a981","쯽",14,"찎찏찑찒찓찕",6,"찞찟찠찣찤æđðħıijĸŀłøœßþŧŋʼn㈀",27,"⒜",25,"⑴",14,"¹²³⁴ⁿ₁₂₃₄"],
+["aa41","찥찦찪찫찭찯찱",6,"찺찿",4,"챆챇챉챊챋챍챎"],
+["aa61","챏",4,"챖챚",5,"챡챢챣챥챧챩",6,"챱챲"],
+["aa81","챳챴챶",29,"ぁ",82],
+["ab41","첔첕첖첗첚첛첝첞첟첡",6,"첪첮",5,"첶첷첹"],
+["ab61","첺첻첽",6,"쳆쳈쳊",5,"쳑쳒쳓쳕",5],
+["ab81","쳛",8,"쳥",6,"쳭쳮쳯쳱",12,"ァ",85],
+["ac41","쳾쳿촀촂",5,"촊촋촍촎촏촑",6,"촚촜촞촟촠"],
+["ac61","촡촢촣촥촦촧촩촪촫촭",11,"촺",4],
+["ac81","촿",28,"쵝쵞쵟А",5,"ЁЖ",25],
+["acd1","а",5,"ёж",25],
+["ad41","쵡쵢쵣쵥",6,"쵮쵰쵲",5,"쵹",7],
+["ad61","춁",6,"춉",10,"춖춗춙춚춛춝춞춟"],
+["ad81","춠춡춢춣춦춨춪",5,"춱",18,"췅"],
+["ae41","췆",5,"췍췎췏췑",16],
+["ae61","췢",5,"췩췪췫췭췮췯췱",6,"췺췼췾",4],
+["ae81","츃츅츆츇츉츊츋츍",6,"츕츖츗츘츚",5,"츢츣츥츦츧츩츪츫"],
+["af41","츬츭츮츯츲츴츶",19],
+["af61","칊",13,"칚칛칝칞칢",5,"칪칬"],
+["af81","칮",5,"칶칷칹칺칻칽",6,"캆캈캊",5,"캒캓캕캖캗캙"],
+["b041","캚",5,"캢캦",5,"캮",12],
+["b061","캻",5,"컂",19],
+["b081","컖",13,"컦컧컩컪컭",6,"컶컺",5,"가각간갇갈갉갊감",7,"같",4,"갠갤갬갭갯갰갱갸갹갼걀걋걍걔걘걜거걱건걷걸걺검겁것겄겅겆겉겊겋게겐겔겜겝겟겠겡겨격겪견겯결겸겹겻겼경곁계곈곌곕곗고곡곤곧골곪곬곯곰곱곳공곶과곽관괄괆"],
+["b141","켂켃켅켆켇켉",6,"켒켔켖",5,"켝켞켟켡켢켣"],
+["b161","켥",6,"켮켲",5,"켹",11],
+["b181","콅",14,"콖콗콙콚콛콝",6,"콦콨콪콫콬괌괍괏광괘괜괠괩괬괭괴괵괸괼굄굅굇굉교굔굘굡굣구국군굳굴굵굶굻굼굽굿궁궂궈궉권궐궜궝궤궷귀귁귄귈귐귑귓규균귤그극근귿글긁금급긋긍긔기긱긴긷길긺김깁깃깅깆깊까깍깎깐깔깖깜깝깟깠깡깥깨깩깬깰깸"],
+["b241","콭콮콯콲콳콵콶콷콹",6,"쾁쾂쾃쾄쾆",5,"쾍"],
+["b261","쾎",18,"쾢",5,"쾩"],
+["b281","쾪",5,"쾱",18,"쿅",6,"깹깻깼깽꺄꺅꺌꺼꺽꺾껀껄껌껍껏껐껑께껙껜껨껫껭껴껸껼꼇꼈꼍꼐꼬꼭꼰꼲꼴꼼꼽꼿꽁꽂꽃꽈꽉꽐꽜꽝꽤꽥꽹꾀꾄꾈꾐꾑꾕꾜꾸꾹꾼꿀꿇꿈꿉꿋꿍꿎꿔꿜꿨꿩꿰꿱꿴꿸뀀뀁뀄뀌뀐뀔뀜뀝뀨끄끅끈끊끌끎끓끔끕끗끙"],
+["b341","쿌",19,"쿢쿣쿥쿦쿧쿩"],
+["b361","쿪",5,"쿲쿴쿶",5,"쿽쿾쿿퀁퀂퀃퀅",5],
+["b381","퀋",5,"퀒",5,"퀙",19,"끝끼끽낀낄낌낍낏낑나낙낚난낟날낡낢남납낫",4,"낱낳내낵낸낼냄냅냇냈냉냐냑냔냘냠냥너넉넋넌널넒넓넘넙넛넜넝넣네넥넨넬넴넵넷넸넹녀녁년녈념녑녔녕녘녜녠노녹논놀놂놈놉놋농높놓놔놘놜놨뇌뇐뇔뇜뇝"],
+["b441","퀮",5,"퀶퀷퀹퀺퀻퀽",6,"큆큈큊",5],
+["b461","큑큒큓큕큖큗큙",6,"큡",10,"큮큯"],
+["b481","큱큲큳큵",6,"큾큿킀킂",18,"뇟뇨뇩뇬뇰뇹뇻뇽누눅눈눋눌눔눕눗눙눠눴눼뉘뉜뉠뉨뉩뉴뉵뉼늄늅늉느늑는늘늙늚늠늡늣능늦늪늬늰늴니닉닌닐닒님닙닛닝닢다닥닦단닫",4,"닳담답닷",4,"닿대댁댄댈댐댑댓댔댕댜더덕덖던덛덜덞덟덤덥"],
+["b541","킕",14,"킦킧킩킪킫킭",5],
+["b561","킳킶킸킺",5,"탂탃탅탆탇탊",5,"탒탖",4],
+["b581","탛탞탟탡탢탣탥",6,"탮탲",5,"탹",11,"덧덩덫덮데덱덴델뎀뎁뎃뎄뎅뎌뎐뎔뎠뎡뎨뎬도독돈돋돌돎돐돔돕돗동돛돝돠돤돨돼됐되된될됨됩됫됴두둑둔둘둠둡둣둥둬뒀뒈뒝뒤뒨뒬뒵뒷뒹듀듄듈듐듕드득든듣들듦듬듭듯등듸디딕딘딛딜딤딥딧딨딩딪따딱딴딸"],
+["b641","턅",7,"턎",17],
+["b661","턠",15,"턲턳턵턶턷턹턻턼턽턾"],
+["b681","턿텂텆",5,"텎텏텑텒텓텕",6,"텞텠텢",5,"텩텪텫텭땀땁땃땄땅땋때땍땐땔땜땝땟땠땡떠떡떤떨떪떫떰떱떳떴떵떻떼떽뗀뗄뗌뗍뗏뗐뗑뗘뗬또똑똔똘똥똬똴뙈뙤뙨뚜뚝뚠뚤뚫뚬뚱뛔뛰뛴뛸뜀뜁뜅뜨뜩뜬뜯뜰뜸뜹뜻띄띈띌띔띕띠띤띨띰띱띳띵라락란랄람랍랏랐랑랒랖랗"],
+["b741","텮",13,"텽",6,"톅톆톇톉톊"],
+["b761","톋",20,"톢톣톥톦톧"],
+["b781","톩",6,"톲톴톶톷톸톹톻톽톾톿퇁",14,"래랙랜랠램랩랫랬랭랴략랸럇량러럭런럴럼럽럿렀렁렇레렉렌렐렘렙렛렝려력련렬렴렵렷렸령례롄롑롓로록론롤롬롭롯롱롸롼뢍뢨뢰뢴뢸룀룁룃룅료룐룔룝룟룡루룩룬룰룸룹룻룽뤄뤘뤠뤼뤽륀륄륌륏륑류륙륜률륨륩"],
+["b841","퇐",7,"퇙",17],
+["b861","퇫",8,"퇵퇶퇷퇹",13],
+["b881","툈툊",5,"툑",24,"륫륭르륵른를름릅릇릉릊릍릎리릭린릴림립릿링마막만많",4,"맘맙맛망맞맡맣매맥맨맬맴맵맷맸맹맺먀먁먈먕머먹먼멀멂멈멉멋멍멎멓메멕멘멜멤멥멧멨멩며멱면멸몃몄명몇몌모목몫몬몰몲몸몹못몽뫄뫈뫘뫙뫼"],
+["b941","툪툫툮툯툱툲툳툵",6,"툾퉀퉂",5,"퉉퉊퉋퉌"],
+["b961","퉍",14,"퉝",6,"퉥퉦퉧퉨"],
+["b981","퉩",22,"튂튃튅튆튇튉튊튋튌묀묄묍묏묑묘묜묠묩묫무묵묶문묻물묽묾뭄뭅뭇뭉뭍뭏뭐뭔뭘뭡뭣뭬뮈뮌뮐뮤뮨뮬뮴뮷므믄믈믐믓미믹민믿밀밂밈밉밋밌밍및밑바",4,"받",4,"밤밥밧방밭배백밴밸뱀뱁뱃뱄뱅뱉뱌뱍뱐뱝버벅번벋벌벎범법벗"],
+["ba41","튍튎튏튒튓튔튖",5,"튝튞튟튡튢튣튥",6,"튭"],
+["ba61","튮튯튰튲",5,"튺튻튽튾틁틃",4,"틊틌",5],
+["ba81","틒틓틕틖틗틙틚틛틝",6,"틦",9,"틲틳틵틶틷틹틺벙벚베벡벤벧벨벰벱벳벴벵벼벽변별볍볏볐병볕볘볜보복볶본볼봄봅봇봉봐봔봤봬뵀뵈뵉뵌뵐뵘뵙뵤뵨부북분붇불붉붊붐붑붓붕붙붚붜붤붰붸뷔뷕뷘뷜뷩뷰뷴뷸븀븃븅브븍븐블븜븝븟비빅빈빌빎빔빕빗빙빚빛빠빡빤"],
+["bb41","틻",4,"팂팄팆",5,"팏팑팒팓팕팗",4,"팞팢팣"],
+["bb61","팤팦팧팪팫팭팮팯팱",6,"팺팾",5,"퍆퍇퍈퍉"],
+["bb81","퍊",31,"빨빪빰빱빳빴빵빻빼빽뺀뺄뺌뺍뺏뺐뺑뺘뺙뺨뻐뻑뻔뻗뻘뻠뻣뻤뻥뻬뼁뼈뼉뼘뼙뼛뼜뼝뽀뽁뽄뽈뽐뽑뽕뾔뾰뿅뿌뿍뿐뿔뿜뿟뿡쀼쁑쁘쁜쁠쁨쁩삐삑삔삘삠삡삣삥사삭삯산삳살삵삶삼삽삿샀상샅새색샌샐샘샙샛샜생샤"],
+["bc41","퍪",17,"퍾퍿펁펂펃펅펆펇"],
+["bc61","펈펉펊펋펎펒",5,"펚펛펝펞펟펡",6,"펪펬펮"],
+["bc81","펯",4,"펵펶펷펹펺펻펽",6,"폆폇폊",5,"폑",5,"샥샨샬샴샵샷샹섀섄섈섐섕서",4,"섣설섦섧섬섭섯섰성섶세섹센셀셈셉셋셌셍셔셕션셜셤셥셧셨셩셰셴셸솅소속솎손솔솖솜솝솟송솥솨솩솬솰솽쇄쇈쇌쇔쇗쇘쇠쇤쇨쇰쇱쇳쇼쇽숀숄숌숍숏숑수숙순숟술숨숩숫숭"],
+["bd41","폗폙",7,"폢폤",7,"폮폯폱폲폳폵폶폷"],
+["bd61","폸폹폺폻폾퐀퐂",5,"퐉",13],
+["bd81","퐗",5,"퐞",25,"숯숱숲숴쉈쉐쉑쉔쉘쉠쉥쉬쉭쉰쉴쉼쉽쉿슁슈슉슐슘슛슝스슥슨슬슭슴습슷승시식신싣실싫심십싯싱싶싸싹싻싼쌀쌈쌉쌌쌍쌓쌔쌕쌘쌜쌤쌥쌨쌩썅써썩썬썰썲썸썹썼썽쎄쎈쎌쏀쏘쏙쏜쏟쏠쏢쏨쏩쏭쏴쏵쏸쐈쐐쐤쐬쐰"],
+["be41","퐸",7,"푁푂푃푅",14],
+["be61","푔",7,"푝푞푟푡푢푣푥",7,"푮푰푱푲"],
+["be81","푳",4,"푺푻푽푾풁풃",4,"풊풌풎",5,"풕",8,"쐴쐼쐽쑈쑤쑥쑨쑬쑴쑵쑹쒀쒔쒜쒸쒼쓩쓰쓱쓴쓸쓺쓿씀씁씌씐씔씜씨씩씬씰씸씹씻씽아악안앉않알앍앎앓암압앗았앙앝앞애액앤앨앰앱앳앴앵야약얀얄얇얌얍얏양얕얗얘얜얠얩어억언얹얻얼얽얾엄",6,"엌엎"],
+["bf41","풞",10,"풪",14],
+["bf61","풹",18,"퓍퓎퓏퓑퓒퓓퓕"],
+["bf81","퓖",5,"퓝퓞퓠",7,"퓩퓪퓫퓭퓮퓯퓱",6,"퓹퓺퓼에엑엔엘엠엡엣엥여역엮연열엶엷염",5,"옅옆옇예옌옐옘옙옛옜오옥온올옭옮옰옳옴옵옷옹옻와왁완왈왐왑왓왔왕왜왝왠왬왯왱외왹왼욀욈욉욋욍요욕욘욜욤욥욧용우욱운울욹욺움웁웃웅워웍원월웜웝웠웡웨"],
+["c041","퓾",5,"픅픆픇픉픊픋픍",6,"픖픘",5],
+["c061","픞",25],
+["c081","픸픹픺픻픾픿핁핂핃핅",6,"핎핐핒",5,"핚핛핝핞핟핡핢핣웩웬웰웸웹웽위윅윈윌윔윕윗윙유육윤율윰윱윳융윷으윽은을읊음읍읏응",7,"읜읠읨읫이익인일읽읾잃임입잇있잉잊잎자작잔잖잗잘잚잠잡잣잤장잦재잭잰잴잼잽잿쟀쟁쟈쟉쟌쟎쟐쟘쟝쟤쟨쟬저적전절젊"],
+["c141","핤핦핧핪핬핮",5,"핶핷핹핺핻핽",6,"햆햊햋"],
+["c161","햌햍햎햏햑",19,"햦햧"],
+["c181","햨",31,"점접젓정젖제젝젠젤젬젭젯젱져젼졀졈졉졌졍졔조족존졸졺좀좁좃종좆좇좋좌좍좔좝좟좡좨좼좽죄죈죌죔죕죗죙죠죡죤죵주죽준줄줅줆줌줍줏중줘줬줴쥐쥑쥔쥘쥠쥡쥣쥬쥰쥴쥼즈즉즌즐즘즙즛증지직진짇질짊짐집짓"],
+["c241","헊헋헍헎헏헑헓",4,"헚헜헞",5,"헦헧헩헪헫헭헮"],
+["c261","헯",4,"헶헸헺",5,"혂혃혅혆혇혉",6,"혒"],
+["c281","혖",5,"혝혞혟혡혢혣혥",7,"혮",9,"혺혻징짖짙짚짜짝짠짢짤짧짬짭짯짰짱째짹짼쨀쨈쨉쨋쨌쨍쨔쨘쨩쩌쩍쩐쩔쩜쩝쩟쩠쩡쩨쩽쪄쪘쪼쪽쫀쫄쫌쫍쫏쫑쫓쫘쫙쫠쫬쫴쬈쬐쬔쬘쬠쬡쭁쭈쭉쭌쭐쭘쭙쭝쭤쭸쭹쮜쮸쯔쯤쯧쯩찌찍찐찔찜찝찡찢찧차착찬찮찰참찹찻"],
+["c341","혽혾혿홁홂홃홄홆홇홊홌홎홏홐홒홓홖홗홙홚홛홝",4],
+["c361","홢",4,"홨홪",5,"홲홳홵",11],
+["c381","횁횂횄횆",5,"횎횏횑횒횓횕",7,"횞횠횢",5,"횩횪찼창찾채책챈챌챔챕챗챘챙챠챤챦챨챰챵처척천철첨첩첫첬청체첵첸첼쳄쳅쳇쳉쳐쳔쳤쳬쳰촁초촉촌촐촘촙촛총촤촨촬촹최쵠쵤쵬쵭쵯쵱쵸춈추축춘출춤춥춧충춰췄췌췐취췬췰췸췹췻췽츄츈츌츔츙츠측츤츨츰츱츳층"],
+["c441","횫횭횮횯횱",7,"횺횼",7,"훆훇훉훊훋"],
+["c461","훍훎훏훐훒훓훕훖훘훚",5,"훡훢훣훥훦훧훩",4],
+["c481","훮훯훱훲훳훴훶",5,"훾훿휁휂휃휅",11,"휒휓휔치칙친칟칠칡침칩칫칭카칵칸칼캄캅캇캉캐캑캔캘캠캡캣캤캥캬캭컁커컥컨컫컬컴컵컷컸컹케켁켄켈켐켑켓켕켜켠켤켬켭켯켰켱켸코콕콘콜콤콥콧콩콰콱콴콸쾀쾅쾌쾡쾨쾰쿄쿠쿡쿤쿨쿰쿱쿳쿵쿼퀀퀄퀑퀘퀭퀴퀵퀸퀼"],
+["c541","휕휖휗휚휛휝휞휟휡",6,"휪휬휮",5,"휶휷휹"],
+["c561","휺휻휽",6,"흅흆흈흊",5,"흒흓흕흚",4],
+["c581","흟흢흤흦흧흨흪흫흭흮흯흱흲흳흵",6,"흾흿힀힂",5,"힊힋큄큅큇큉큐큔큘큠크큭큰클큼큽킁키킥킨킬킴킵킷킹타탁탄탈탉탐탑탓탔탕태택탠탤탬탭탯탰탱탸턍터턱턴털턺텀텁텃텄텅테텍텐텔템텝텟텡텨텬텼톄톈토톡톤톨톰톱톳통톺톼퇀퇘퇴퇸툇툉툐투툭툰툴툼툽툿퉁퉈퉜"],
+["c641","힍힎힏힑",6,"힚힜힞",5],
+["c6a1","퉤튀튁튄튈튐튑튕튜튠튤튬튱트특튼튿틀틂틈틉틋틔틘틜틤틥티틱틴틸팀팁팃팅파팍팎판팔팖팜팝팟팠팡팥패팩팬팰팸팹팻팼팽퍄퍅퍼퍽펀펄펌펍펏펐펑페펙펜펠펨펩펫펭펴편펼폄폅폈평폐폘폡폣포폭폰폴폼폽폿퐁"],
+["c7a1","퐈퐝푀푄표푠푤푭푯푸푹푼푿풀풂품풉풋풍풔풩퓌퓐퓔퓜퓟퓨퓬퓰퓸퓻퓽프픈플픔픕픗피픽핀필핌핍핏핑하학한할핥함합핫항해핵핸핼햄햅햇했행햐향허헉헌헐헒험헙헛헝헤헥헨헬헴헵헷헹혀혁현혈혐협혓혔형혜혠"],
+["c8a1","혤혭호혹혼홀홅홈홉홋홍홑화확환활홧황홰홱홴횃횅회획횐횔횝횟횡효횬횰횹횻후훅훈훌훑훔훗훙훠훤훨훰훵훼훽휀휄휑휘휙휜휠휨휩휫휭휴휵휸휼흄흇흉흐흑흔흖흗흘흙흠흡흣흥흩희흰흴흼흽힁히힉힌힐힘힙힛힝"],
+["caa1","伽佳假價加可呵哥嘉嫁家暇架枷柯歌珂痂稼苛茄街袈訶賈跏軻迦駕刻却各恪慤殼珏脚覺角閣侃刊墾奸姦干幹懇揀杆柬桿澗癎看磵稈竿簡肝艮艱諫間乫喝曷渴碣竭葛褐蝎鞨勘坎堪嵌感憾戡敢柑橄減甘疳監瞰紺邯鑑鑒龕"],
+["cba1","匣岬甲胛鉀閘剛堈姜岡崗康强彊慷江畺疆糠絳綱羌腔舡薑襁講鋼降鱇介价個凱塏愷愾慨改槪漑疥皆盖箇芥蓋豈鎧開喀客坑更粳羹醵倨去居巨拒据據擧渠炬祛距踞車遽鉅鋸乾件健巾建愆楗腱虔蹇鍵騫乞傑杰桀儉劍劒檢"],
+["cca1","瞼鈐黔劫怯迲偈憩揭擊格檄激膈覡隔堅牽犬甄絹繭肩見譴遣鵑抉決潔結缺訣兼慊箝謙鉗鎌京俓倞傾儆勁勍卿坰境庚徑慶憬擎敬景暻更梗涇炅烱璟璥瓊痙硬磬竟競絅經耕耿脛莖警輕逕鏡頃頸驚鯨係啓堺契季屆悸戒桂械"],
+["cda1","棨溪界癸磎稽系繫繼計誡谿階鷄古叩告呱固姑孤尻庫拷攷故敲暠枯槁沽痼皐睾稿羔考股膏苦苽菰藁蠱袴誥賈辜錮雇顧高鼓哭斛曲梏穀谷鵠困坤崑昆梱棍滾琨袞鯤汨滑骨供公共功孔工恐恭拱控攻珙空蚣貢鞏串寡戈果瓜"],
+["cea1","科菓誇課跨過鍋顆廓槨藿郭串冠官寬慣棺款灌琯瓘管罐菅觀貫關館刮恝括适侊光匡壙廣曠洸炚狂珖筐胱鑛卦掛罫乖傀塊壞怪愧拐槐魁宏紘肱轟交僑咬喬嬌嶠巧攪敎校橋狡皎矯絞翹膠蕎蛟較轎郊餃驕鮫丘久九仇俱具勾"],
+["cfa1","區口句咎嘔坵垢寇嶇廐懼拘救枸柩構歐毆毬求溝灸狗玖球瞿矩究絿耉臼舅舊苟衢謳購軀逑邱鉤銶駒驅鳩鷗龜國局菊鞠鞫麴君窘群裙軍郡堀屈掘窟宮弓穹窮芎躬倦券勸卷圈拳捲權淃眷厥獗蕨蹶闕机櫃潰詭軌饋句晷歸貴"],
+["d0a1","鬼龜叫圭奎揆槻珪硅窺竅糾葵規赳逵閨勻均畇筠菌鈞龜橘克剋劇戟棘極隙僅劤勤懃斤根槿瑾筋芹菫覲謹近饉契今妗擒昑檎琴禁禽芩衾衿襟金錦伋及急扱汲級給亘兢矜肯企伎其冀嗜器圻基埼夔奇妓寄岐崎己幾忌技旗旣"],
+["d1a1","朞期杞棋棄機欺氣汽沂淇玘琦琪璂璣畸畿碁磯祁祇祈祺箕紀綺羈耆耭肌記譏豈起錡錤飢饑騎騏驥麒緊佶吉拮桔金喫儺喇奈娜懦懶拏拿癩",5,"那樂",4,"諾酪駱亂卵暖欄煖爛蘭難鸞捏捺南嵐枏楠湳濫男藍襤拉"],
+["d2a1","納臘蠟衲囊娘廊",4,"乃來內奈柰耐冷女年撚秊念恬拈捻寧寗努勞奴弩怒擄櫓爐瑙盧",5,"駑魯",10,"濃籠聾膿農惱牢磊腦賂雷尿壘",7,"嫩訥杻紐勒",5,"能菱陵尼泥匿溺多茶"],
+["d3a1","丹亶但單團壇彖斷旦檀段湍短端簞緞蛋袒鄲鍛撻澾獺疸達啖坍憺擔曇淡湛潭澹痰聃膽蕁覃談譚錟沓畓答踏遝唐堂塘幢戇撞棠當糖螳黨代垈坮大對岱帶待戴擡玳臺袋貸隊黛宅德悳倒刀到圖堵塗導屠島嶋度徒悼挑掉搗桃"],
+["d4a1","棹櫂淘渡滔濤燾盜睹禱稻萄覩賭跳蹈逃途道都鍍陶韜毒瀆牘犢獨督禿篤纛讀墩惇敦旽暾沌焞燉豚頓乭突仝冬凍動同憧東桐棟洞潼疼瞳童胴董銅兜斗杜枓痘竇荳讀豆逗頭屯臀芚遁遯鈍得嶝橙燈登等藤謄鄧騰喇懶拏癩羅"],
+["d5a1","蘿螺裸邏樂洛烙珞絡落諾酪駱丹亂卵欄欒瀾爛蘭鸞剌辣嵐擥攬欖濫籃纜藍襤覽拉臘蠟廊朗浪狼琅瑯螂郞來崍徠萊冷掠略亮倆兩凉梁樑粮粱糧良諒輛量侶儷勵呂廬慮戾旅櫚濾礪藜蠣閭驢驪麗黎力曆歷瀝礫轢靂憐戀攣漣"],
+["d6a1","煉璉練聯蓮輦連鍊冽列劣洌烈裂廉斂殮濂簾獵令伶囹寧岺嶺怜玲笭羚翎聆逞鈴零靈領齡例澧禮醴隷勞怒撈擄櫓潞瀘爐盧老蘆虜路輅露魯鷺鹵碌祿綠菉錄鹿麓論壟弄朧瀧瓏籠聾儡瀨牢磊賂賚賴雷了僚寮廖料燎療瞭聊蓼"],
+["d7a1","遼鬧龍壘婁屢樓淚漏瘻累縷蔞褸鏤陋劉旒柳榴流溜瀏琉瑠留瘤硫謬類六戮陸侖倫崙淪綸輪律慄栗率隆勒肋凜凌楞稜綾菱陵俚利厘吏唎履悧李梨浬犁狸理璃異痢籬罹羸莉裏裡里釐離鯉吝潾燐璘藺躪隣鱗麟林淋琳臨霖砬"],
+["d8a1","立笠粒摩瑪痲碼磨馬魔麻寞幕漠膜莫邈万卍娩巒彎慢挽晩曼滿漫灣瞞萬蔓蠻輓饅鰻唜抹末沫茉襪靺亡妄忘忙望網罔芒茫莽輞邙埋妹媒寐昧枚梅每煤罵買賣邁魅脈貊陌驀麥孟氓猛盲盟萌冪覓免冕勉棉沔眄眠綿緬面麵滅"],
+["d9a1","蔑冥名命明暝椧溟皿瞑茗蓂螟酩銘鳴袂侮冒募姆帽慕摸摹暮某模母毛牟牡瑁眸矛耗芼茅謀謨貌木沐牧目睦穆鶩歿沒夢朦蒙卯墓妙廟描昴杳渺猫竗苗錨務巫憮懋戊拇撫无楙武毋無珷畝繆舞茂蕪誣貿霧鵡墨默們刎吻問文"],
+["daa1","汶紊紋聞蚊門雯勿沕物味媚尾嵋彌微未梶楣渼湄眉米美薇謎迷靡黴岷悶愍憫敏旻旼民泯玟珉緡閔密蜜謐剝博拍搏撲朴樸泊珀璞箔粕縛膊舶薄迫雹駁伴半反叛拌搬攀斑槃泮潘班畔瘢盤盼磐磻礬絆般蟠返頒飯勃拔撥渤潑"],
+["dba1","發跋醱鉢髮魃倣傍坊妨尨幇彷房放方旁昉枋榜滂磅紡肪膀舫芳蒡蚌訪謗邦防龐倍俳北培徘拜排杯湃焙盃背胚裴裵褙賠輩配陪伯佰帛柏栢白百魄幡樊煩燔番磻繁蕃藩飜伐筏罰閥凡帆梵氾汎泛犯範范法琺僻劈壁擘檗璧癖"],
+["dca1","碧蘗闢霹便卞弁變辨辯邊別瞥鱉鼈丙倂兵屛幷昞昺柄棅炳甁病秉竝輧餠騈保堡報寶普步洑湺潽珤甫菩補褓譜輔伏僕匐卜宓復服福腹茯蔔複覆輹輻馥鰒本乶俸奉封峯峰捧棒烽熢琫縫蓬蜂逢鋒鳳不付俯傅剖副否咐埠夫婦"],
+["dda1","孚孵富府復扶敷斧浮溥父符簿缶腐腑膚艀芙莩訃負賦賻赴趺部釜阜附駙鳧北分吩噴墳奔奮忿憤扮昐汾焚盆粉糞紛芬賁雰不佛弗彿拂崩朋棚硼繃鵬丕備匕匪卑妃婢庇悲憊扉批斐枇榧比毖毗毘沸泌琵痺砒碑秕秘粃緋翡肥"],
+["dea1","脾臂菲蜚裨誹譬費鄙非飛鼻嚬嬪彬斌檳殯浜濱瀕牝玭貧賓頻憑氷聘騁乍事些仕伺似使俟僿史司唆嗣四士奢娑寫寺射巳師徙思捨斜斯柶査梭死沙泗渣瀉獅砂社祀祠私篩紗絲肆舍莎蓑蛇裟詐詞謝賜赦辭邪飼駟麝削數朔索"],
+["dfa1","傘刪山散汕珊産疝算蒜酸霰乷撒殺煞薩三參杉森渗芟蔘衫揷澁鈒颯上傷像償商喪嘗孀尙峠常床庠廂想桑橡湘爽牀狀相祥箱翔裳觴詳象賞霜塞璽賽嗇塞穡索色牲生甥省笙墅壻嶼序庶徐恕抒捿敍暑曙書栖棲犀瑞筮絮緖署"],
+["e0a1","胥舒薯西誓逝鋤黍鼠夕奭席惜昔晳析汐淅潟石碩蓆釋錫仙僊先善嬋宣扇敾旋渲煽琁瑄璇璿癬禪線繕羨腺膳船蘚蟬詵跣選銑鐥饍鮮卨屑楔泄洩渫舌薛褻設說雪齧剡暹殲纖蟾贍閃陝攝涉燮葉城姓宬性惺成星晟猩珹盛省筬"],
+["e1a1","聖聲腥誠醒世勢歲洗稅笹細說貰召嘯塑宵小少巢所掃搔昭梳沼消溯瀟炤燒甦疏疎瘙笑篠簫素紹蔬蕭蘇訴逍遡邵銷韶騷俗屬束涑粟續謖贖速孫巽損蓀遜飡率宋悚松淞訟誦送頌刷殺灑碎鎖衰釗修受嗽囚垂壽嫂守岫峀帥愁"],
+["e2a1","戍手授搜收數樹殊水洙漱燧狩獸琇璲瘦睡秀穗竪粹綏綬繡羞脩茱蒐蓚藪袖誰讐輸遂邃酬銖銹隋隧隨雖需須首髓鬚叔塾夙孰宿淑潚熟琡璹肅菽巡徇循恂旬栒楯橓殉洵淳珣盾瞬筍純脣舜荀蓴蕣詢諄醇錞順馴戌術述鉥崇崧"],
+["e3a1","嵩瑟膝蝨濕拾習褶襲丞乘僧勝升承昇繩蠅陞侍匙嘶始媤尸屎屍市弑恃施是時枾柴猜矢示翅蒔蓍視試詩諡豕豺埴寔式息拭植殖湜熄篒蝕識軾食飾伸侁信呻娠宸愼新晨燼申神紳腎臣莘薪藎蜃訊身辛辰迅失室實悉審尋心沁"],
+["e4a1","沈深瀋甚芯諶什十拾雙氏亞俄兒啞娥峨我牙芽莪蛾衙訝阿雅餓鴉鵝堊岳嶽幄惡愕握樂渥鄂鍔顎鰐齷安岸按晏案眼雁鞍顔鮟斡謁軋閼唵岩巖庵暗癌菴闇壓押狎鴨仰央怏昻殃秧鴦厓哀埃崖愛曖涯碍艾隘靄厄扼掖液縊腋額"],
+["e5a1","櫻罌鶯鸚也倻冶夜惹揶椰爺耶若野弱掠略約若葯蒻藥躍亮佯兩凉壤孃恙揚攘敭暘梁楊樣洋瀁煬痒瘍禳穰糧羊良襄諒讓釀陽量養圄御於漁瘀禦語馭魚齬億憶抑檍臆偃堰彦焉言諺孼蘖俺儼嚴奄掩淹嶪業円予余勵呂女如廬"],
+["e6a1","旅歟汝濾璵礖礪與艅茹輿轝閭餘驪麗黎亦力域役易曆歷疫繹譯轢逆驛嚥堧姸娟宴年延憐戀捐挻撚椽沇沿涎涓淵演漣烟然煙煉燃燕璉硏硯秊筵緣練縯聯衍軟輦蓮連鉛鍊鳶列劣咽悅涅烈熱裂說閱厭廉念捻染殮炎焰琰艶苒"],
+["e7a1","簾閻髥鹽曄獵燁葉令囹塋寧嶺嶸影怜映暎楹榮永泳渶潁濚瀛瀯煐營獰玲瑛瑩瓔盈穎纓羚聆英詠迎鈴鍈零霙靈領乂倪例刈叡曳汭濊猊睿穢芮藝蘂禮裔詣譽豫醴銳隸霓預五伍俉傲午吾吳嗚塢墺奧娛寤悟惡懊敖旿晤梧汚澳"],
+["e8a1","烏熬獒筽蜈誤鰲鼇屋沃獄玉鈺溫瑥瘟穩縕蘊兀壅擁瓮甕癰翁邕雍饔渦瓦窩窪臥蛙蝸訛婉完宛梡椀浣玩琓琬碗緩翫脘腕莞豌阮頑曰往旺枉汪王倭娃歪矮外嵬巍猥畏了僚僥凹堯夭妖姚寥寮尿嶢拗搖撓擾料曜樂橈燎燿瑤療"],
+["e9a1","窈窯繇繞耀腰蓼蟯要謠遙遼邀饒慾欲浴縟褥辱俑傭冗勇埇墉容庸慂榕涌湧溶熔瑢用甬聳茸蓉踊鎔鏞龍于佑偶優又友右宇寓尤愚憂旴牛玗瑀盂祐禑禹紆羽芋藕虞迂遇郵釪隅雨雩勖彧旭昱栯煜稶郁頊云暈橒殞澐熉耘芸蕓"],
+["eaa1","運隕雲韻蔚鬱亐熊雄元原員圓園垣媛嫄寃怨愿援沅洹湲源爰猿瑗苑袁轅遠阮院願鴛月越鉞位偉僞危圍委威尉慰暐渭爲瑋緯胃萎葦蔿蝟衛褘謂違韋魏乳侑儒兪劉唯喩孺宥幼幽庾悠惟愈愉揄攸有杻柔柚柳楡楢油洧流游溜"],
+["eba1","濡猶猷琉瑜由留癒硫紐維臾萸裕誘諛諭踰蹂遊逾遺酉釉鍮類六堉戮毓肉育陸倫允奫尹崙淪潤玧胤贇輪鈗閏律慄栗率聿戎瀜絨融隆垠恩慇殷誾銀隱乙吟淫蔭陰音飮揖泣邑凝應膺鷹依倚儀宜意懿擬椅毅疑矣義艤薏蟻衣誼"],
+["eca1","議醫二以伊利吏夷姨履已弛彛怡易李梨泥爾珥理異痍痢移罹而耳肄苡荑裏裡貽貳邇里離飴餌匿溺瀷益翊翌翼謚人仁刃印吝咽因姻寅引忍湮燐璘絪茵藺蚓認隣靭靷鱗麟一佚佾壹日溢逸鎰馹任壬妊姙恁林淋稔臨荏賃入卄"],
+["eda1","立笠粒仍剩孕芿仔刺咨姉姿子字孜恣慈滋炙煮玆瓷疵磁紫者自茨蔗藉諮資雌作勺嚼斫昨灼炸爵綽芍酌雀鵲孱棧殘潺盞岑暫潛箴簪蠶雜丈仗匠場墻壯奬將帳庄張掌暲杖樟檣欌漿牆狀獐璋章粧腸臟臧莊葬蔣薔藏裝贓醬長"],
+["eea1","障再哉在宰才材栽梓渽滓災縡裁財載齋齎爭箏諍錚佇低儲咀姐底抵杵楮樗沮渚狙猪疽箸紵苧菹著藷詛貯躇這邸雎齟勣吊嫡寂摘敵滴狄炙的積笛籍績翟荻謫賊赤跡蹟迪迹適鏑佃佺傳全典前剪塡塼奠專展廛悛戰栓殿氈澱"],
+["efa1","煎琠田甸畑癲筌箋箭篆纏詮輾轉鈿銓錢鐫電顚顫餞切截折浙癤竊節絶占岾店漸点粘霑鮎點接摺蝶丁井亭停偵呈姃定幀庭廷征情挺政整旌晶晸柾楨檉正汀淀淨渟湞瀞炡玎珽町睛碇禎程穽精綎艇訂諪貞鄭酊釘鉦鋌錠霆靖"],
+["f0a1","靜頂鼎制劑啼堤帝弟悌提梯濟祭第臍薺製諸蹄醍除際霽題齊俎兆凋助嘲弔彫措操早晁曺曹朝條棗槽漕潮照燥爪璪眺祖祚租稠窕粗糟組繰肇藻蚤詔調趙躁造遭釣阻雕鳥族簇足鏃存尊卒拙猝倧宗從悰慫棕淙琮種終綜縱腫"],
+["f1a1","踪踵鍾鐘佐坐左座挫罪主住侏做姝胄呪周嗾奏宙州廚晝朱柱株注洲湊澍炷珠疇籌紂紬綢舟蛛註誅走躊輳週酎酒鑄駐竹粥俊儁准埈寯峻晙樽浚準濬焌畯竣蠢逡遵雋駿茁中仲衆重卽櫛楫汁葺增憎曾拯烝甑症繒蒸證贈之只"],
+["f2a1","咫地址志持指摯支旨智枝枳止池沚漬知砥祉祗紙肢脂至芝芷蜘誌識贄趾遲直稙稷織職唇嗔塵振搢晉晋桭榛殄津溱珍瑨璡畛疹盡眞瞋秦縉縝臻蔯袗診賑軫辰進鎭陣陳震侄叱姪嫉帙桎瓆疾秩窒膣蛭質跌迭斟朕什執潗緝輯"],
+["f3a1","鏶集徵懲澄且侘借叉嗟嵯差次此磋箚茶蹉車遮捉搾着窄錯鑿齪撰澯燦璨瓚竄簒纂粲纘讚贊鑽餐饌刹察擦札紮僭參塹慘慙懺斬站讒讖倉倡創唱娼廠彰愴敞昌昶暢槍滄漲猖瘡窓脹艙菖蒼債埰寀寨彩採砦綵菜蔡采釵冊柵策"],
+["f4a1","責凄妻悽處倜刺剔尺慽戚拓擲斥滌瘠脊蹠陟隻仟千喘天川擅泉淺玔穿舛薦賤踐遷釧闡阡韆凸哲喆徹撤澈綴輟轍鐵僉尖沾添甛瞻簽籤詹諂堞妾帖捷牒疊睫諜貼輒廳晴淸聽菁請靑鯖切剃替涕滯締諦逮遞體初剿哨憔抄招梢"],
+["f5a1","椒楚樵炒焦硝礁礎秒稍肖艸苕草蕉貂超酢醋醮促囑燭矗蜀觸寸忖村邨叢塚寵悤憁摠總聰蔥銃撮催崔最墜抽推椎楸樞湫皺秋芻萩諏趨追鄒酋醜錐錘鎚雛騶鰍丑畜祝竺筑築縮蓄蹙蹴軸逐春椿瑃出朮黜充忠沖蟲衝衷悴膵萃"],
+["f6a1","贅取吹嘴娶就炊翠聚脆臭趣醉驟鷲側仄厠惻測層侈値嗤峙幟恥梔治淄熾痔痴癡稚穉緇緻置致蚩輜雉馳齒則勅飭親七柒漆侵寢枕沈浸琛砧針鍼蟄秤稱快他咤唾墮妥惰打拖朶楕舵陀馱駝倬卓啄坼度托拓擢晫柝濁濯琢琸託"],
+["f7a1","鐸呑嘆坦彈憚歎灘炭綻誕奪脫探眈耽貪塔搭榻宕帑湯糖蕩兌台太怠態殆汰泰笞胎苔跆邰颱宅擇澤撑攄兎吐土討慟桶洞痛筒統通堆槌腿褪退頹偸套妬投透鬪慝特闖坡婆巴把播擺杷波派爬琶破罷芭跛頗判坂板版瓣販辦鈑"],
+["f8a1","阪八叭捌佩唄悖敗沛浿牌狽稗覇貝彭澎烹膨愎便偏扁片篇編翩遍鞭騙貶坪平枰萍評吠嬖幣廢弊斃肺蔽閉陛佈包匍匏咆哺圃布怖抛抱捕暴泡浦疱砲胞脯苞葡蒲袍褒逋鋪飽鮑幅暴曝瀑爆輻俵剽彪慓杓標漂瓢票表豹飇飄驃"],
+["f9a1","品稟楓諷豊風馮彼披疲皮被避陂匹弼必泌珌畢疋筆苾馝乏逼下何厦夏廈昰河瑕荷蝦賀遐霞鰕壑學虐謔鶴寒恨悍旱汗漢澣瀚罕翰閑閒限韓割轄函含咸啣喊檻涵緘艦銜陷鹹合哈盒蛤閤闔陜亢伉姮嫦巷恒抗杭桁沆港缸肛航"],
+["faa1","行降項亥偕咳垓奚孩害懈楷海瀣蟹解該諧邂駭骸劾核倖幸杏荇行享向嚮珦鄕響餉饗香噓墟虛許憲櫶獻軒歇險驗奕爀赫革俔峴弦懸晛泫炫玄玹現眩睍絃絢縣舷衒見賢鉉顯孑穴血頁嫌俠協夾峽挾浹狹脅脇莢鋏頰亨兄刑型"],
+["fba1","形泂滎瀅灐炯熒珩瑩荊螢衡逈邢鎣馨兮彗惠慧暳蕙蹊醯鞋乎互呼壕壺好岵弧戶扈昊晧毫浩淏湖滸澔濠濩灝狐琥瑚瓠皓祜糊縞胡芦葫蒿虎號蝴護豪鎬頀顥惑或酷婚昏混渾琿魂忽惚笏哄弘汞泓洪烘紅虹訌鴻化和嬅樺火畵"],
+["fca1","禍禾花華話譁貨靴廓擴攫確碻穫丸喚奐宦幻患換歡晥桓渙煥環紈還驩鰥活滑猾豁闊凰幌徨恍惶愰慌晃晄榥況湟滉潢煌璜皇篁簧荒蝗遑隍黃匯回廻徊恢悔懷晦會檜淮澮灰獪繪膾茴蛔誨賄劃獲宖橫鐄哮嚆孝效斅曉梟涍淆"],
+["fda1","爻肴酵驍侯候厚后吼喉嗅帿後朽煦珝逅勛勳塤壎焄熏燻薰訓暈薨喧暄煊萱卉喙毁彙徽揮暉煇諱輝麾休携烋畦虧恤譎鷸兇凶匈洶胸黑昕欣炘痕吃屹紇訖欠欽歆吸恰洽翕興僖凞喜噫囍姬嬉希憙憘戱晞曦熙熹熺犧禧稀羲詰"]
+]
diff --git a/tools/node_modules/eslint/node_modules/iconv-lite/encodings/tables/cp950.json b/tools/node_modules/eslint/node_modules/iconv-lite/encodings/tables/cp950.json
new file mode 100644
index 0000000000..d8bc87178d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/iconv-lite/encodings/tables/cp950.json
@@ -0,0 +1,177 @@
+[
+["0","\u0000",127],
+["a140"," ,、。.‧;:?!︰…‥﹐﹑﹒·﹔﹕﹖﹗|–︱—︳╴︴﹏()︵︶{}︷︸〔〕︹︺【】︻︼《》︽︾〈〉︿﹀「」﹁﹂『』﹃﹄﹙﹚"],
+["a1a1","﹛﹜﹝﹞‘’“”〝〞‵′#&*※§〃○●△▲◎☆★◇◆□■▽▼㊣℅¯ ̄_ˍ﹉﹊﹍﹎﹋﹌﹟﹠﹡+-×÷±√<>=≦≧≠∞≒≡﹢",4,"~∩∪⊥∠∟⊿㏒㏑∫∮∵∴♀♂⊕⊙↑↓←→↖↗↙↘∥∣/"],
+["a240","\∕﹨$¥〒¢£%@℃℉﹩﹪﹫㏕㎜㎝㎞㏎㎡㎎㎏㏄°兙兛兞兝兡兣嗧瓩糎▁",7,"▏▎▍▌▋▊▉┼┴┬┤├▔─│▕┌┐└┘╭"],
+["a2a1","╮╰╯═╞╪╡◢◣◥◤╱╲╳0",9,"Ⅰ",9,"〡",8,"十卄卅A",25,"a",21],
+["a340","wxyzΑ",16,"Σ",6,"α",16,"σ",6,"ㄅ",10],
+["a3a1","ㄐ",25,"˙ˉˊˇˋ"],
+["a3e1","€"],
+["a440","一乙丁七乃九了二人儿入八几刀刁力匕十卜又三下丈上丫丸凡久么也乞于亡兀刃勺千叉口土士夕大女子孑孓寸小尢尸山川工己已巳巾干廾弋弓才"],
+["a4a1","丑丐不中丰丹之尹予云井互五亢仁什仃仆仇仍今介仄元允內六兮公冗凶分切刈勻勾勿化匹午升卅卞厄友及反壬天夫太夭孔少尤尺屯巴幻廿弔引心戈戶手扎支文斗斤方日曰月木欠止歹毋比毛氏水火爪父爻片牙牛犬王丙"],
+["a540","世丕且丘主乍乏乎以付仔仕他仗代令仙仞充兄冉冊冬凹出凸刊加功包匆北匝仟半卉卡占卯卮去可古右召叮叩叨叼司叵叫另只史叱台句叭叻四囚外"],
+["a5a1","央失奴奶孕它尼巨巧左市布平幼弁弘弗必戊打扔扒扑斥旦朮本未末札正母民氐永汁汀氾犯玄玉瓜瓦甘生用甩田由甲申疋白皮皿目矛矢石示禾穴立丞丟乒乓乩亙交亦亥仿伉伙伊伕伍伐休伏仲件任仰仳份企伋光兇兆先全"],
+["a640","共再冰列刑划刎刖劣匈匡匠印危吉吏同吊吐吁吋各向名合吃后吆吒因回囝圳地在圭圬圯圩夙多夷夸妄奸妃好她如妁字存宇守宅安寺尖屹州帆并年"],
+["a6a1","式弛忙忖戎戌戍成扣扛托收早旨旬旭曲曳有朽朴朱朵次此死氖汝汗汙江池汐汕污汛汍汎灰牟牝百竹米糸缶羊羽老考而耒耳聿肉肋肌臣自至臼舌舛舟艮色艾虫血行衣西阡串亨位住佇佗佞伴佛何估佐佑伽伺伸佃佔似但佣"],
+["a740","作你伯低伶余佝佈佚兌克免兵冶冷別判利刪刨劫助努劬匣即卵吝吭吞吾否呎吧呆呃吳呈呂君吩告吹吻吸吮吵吶吠吼呀吱含吟听囪困囤囫坊坑址坍"],
+["a7a1","均坎圾坐坏圻壯夾妝妒妨妞妣妙妖妍妤妓妊妥孝孜孚孛完宋宏尬局屁尿尾岐岑岔岌巫希序庇床廷弄弟彤形彷役忘忌志忍忱快忸忪戒我抄抗抖技扶抉扭把扼找批扳抒扯折扮投抓抑抆改攻攸旱更束李杏材村杜杖杞杉杆杠"],
+["a840","杓杗步每求汞沙沁沈沉沅沛汪決沐汰沌汨沖沒汽沃汲汾汴沆汶沍沔沘沂灶灼災灸牢牡牠狄狂玖甬甫男甸皂盯矣私秀禿究系罕肖肓肝肘肛肚育良芒"],
+["a8a1","芋芍見角言谷豆豕貝赤走足身車辛辰迂迆迅迄巡邑邢邪邦那酉釆里防阮阱阪阬並乖乳事些亞享京佯依侍佳使佬供例來侃佰併侈佩佻侖佾侏侑佺兔兒兕兩具其典冽函刻券刷刺到刮制剁劾劻卒協卓卑卦卷卸卹取叔受味呵"],
+["a940","咖呸咕咀呻呷咄咒咆呼咐呱呶和咚呢周咋命咎固垃坷坪坩坡坦坤坼夜奉奇奈奄奔妾妻委妹妮姑姆姐姍始姓姊妯妳姒姅孟孤季宗定官宜宙宛尚屈居"],
+["a9a1","屆岷岡岸岩岫岱岳帘帚帖帕帛帑幸庚店府底庖延弦弧弩往征彿彼忝忠忽念忿怏怔怯怵怖怪怕怡性怩怫怛或戕房戾所承拉拌拄抿拂抹拒招披拓拔拋拈抨抽押拐拙拇拍抵拚抱拘拖拗拆抬拎放斧於旺昔易昌昆昂明昀昏昕昊"],
+["aa40","昇服朋杭枋枕東果杳杷枇枝林杯杰板枉松析杵枚枓杼杪杲欣武歧歿氓氛泣注泳沱泌泥河沽沾沼波沫法泓沸泄油況沮泗泅泱沿治泡泛泊沬泯泜泖泠"],
+["aaa1","炕炎炒炊炙爬爭爸版牧物狀狎狙狗狐玩玨玟玫玥甽疝疙疚的盂盲直知矽社祀祁秉秈空穹竺糾罔羌羋者肺肥肢肱股肫肩肴肪肯臥臾舍芳芝芙芭芽芟芹花芬芥芯芸芣芰芾芷虎虱初表軋迎返近邵邸邱邶采金長門阜陀阿阻附"],
+["ab40","陂隹雨青非亟亭亮信侵侯便俠俑俏保促侶俘俟俊俗侮俐俄係俚俎俞侷兗冒冑冠剎剃削前剌剋則勇勉勃勁匍南卻厚叛咬哀咨哎哉咸咦咳哇哂咽咪品"],
+["aba1","哄哈咯咫咱咻咩咧咿囿垂型垠垣垢城垮垓奕契奏奎奐姜姘姿姣姨娃姥姪姚姦威姻孩宣宦室客宥封屎屏屍屋峙峒巷帝帥帟幽庠度建弈弭彥很待徊律徇後徉怒思怠急怎怨恍恰恨恢恆恃恬恫恪恤扁拜挖按拼拭持拮拽指拱拷"],
+["ac40","拯括拾拴挑挂政故斫施既春昭映昧是星昨昱昤曷柿染柱柔某柬架枯柵柩柯柄柑枴柚查枸柏柞柳枰柙柢柝柒歪殃殆段毒毗氟泉洋洲洪流津洌洱洞洗"],
+["aca1","活洽派洶洛泵洹洧洸洩洮洵洎洫炫為炳炬炯炭炸炮炤爰牲牯牴狩狠狡玷珊玻玲珍珀玳甚甭畏界畎畋疫疤疥疢疣癸皆皇皈盈盆盃盅省盹相眉看盾盼眇矜砂研砌砍祆祉祈祇禹禺科秒秋穿突竿竽籽紂紅紀紉紇約紆缸美羿耄"],
+["ad40","耐耍耑耶胖胥胚胃胄背胡胛胎胞胤胝致舢苧范茅苣苛苦茄若茂茉苒苗英茁苜苔苑苞苓苟苯茆虐虹虻虺衍衫要觔計訂訃貞負赴赳趴軍軌述迦迢迪迥"],
+["ada1","迭迫迤迨郊郎郁郃酋酊重閂限陋陌降面革韋韭音頁風飛食首香乘亳倌倍倣俯倦倥俸倩倖倆值借倚倒們俺倀倔倨俱倡個候倘俳修倭倪俾倫倉兼冤冥冢凍凌准凋剖剜剔剛剝匪卿原厝叟哨唐唁唷哼哥哲唆哺唔哩哭員唉哮哪"],
+["ae40","哦唧唇哽唏圃圄埂埔埋埃堉夏套奘奚娑娘娜娟娛娓姬娠娣娩娥娌娉孫屘宰害家宴宮宵容宸射屑展屐峭峽峻峪峨峰島崁峴差席師庫庭座弱徒徑徐恙"],
+["aea1","恣恥恐恕恭恩息悄悟悚悍悔悌悅悖扇拳挈拿捎挾振捕捂捆捏捉挺捐挽挪挫挨捍捌效敉料旁旅時晉晏晃晒晌晅晁書朔朕朗校核案框桓根桂桔栩梳栗桌桑栽柴桐桀格桃株桅栓栘桁殊殉殷氣氧氨氦氤泰浪涕消涇浦浸海浙涓"],
+["af40","浬涉浮浚浴浩涌涊浹涅浥涔烊烘烤烙烈烏爹特狼狹狽狸狷玆班琉珮珠珪珞畔畝畜畚留疾病症疲疳疽疼疹痂疸皋皰益盍盎眩真眠眨矩砰砧砸砝破砷"],
+["afa1","砥砭砠砟砲祕祐祠祟祖神祝祗祚秤秣秧租秦秩秘窄窈站笆笑粉紡紗紋紊素索純紐紕級紜納紙紛缺罟羔翅翁耆耘耕耙耗耽耿胱脂胰脅胭胴脆胸胳脈能脊胼胯臭臬舀舐航舫舨般芻茫荒荔荊茸荐草茵茴荏茲茹茶茗荀茱茨荃"],
+["b040","虔蚊蚪蚓蚤蚩蚌蚣蚜衰衷袁袂衽衹記訐討訌訕訊託訓訖訏訑豈豺豹財貢起躬軒軔軏辱送逆迷退迺迴逃追逅迸邕郡郝郢酒配酌釘針釗釜釙閃院陣陡"],
+["b0a1","陛陝除陘陞隻飢馬骨高鬥鬲鬼乾偺偽停假偃偌做偉健偶偎偕偵側偷偏倏偯偭兜冕凰剪副勒務勘動匐匏匙匿區匾參曼商啪啦啄啞啡啃啊唱啖問啕唯啤唸售啜唬啣唳啁啗圈國圉域堅堊堆埠埤基堂堵執培夠奢娶婁婉婦婪婀"],
+["b140","娼婢婚婆婊孰寇寅寄寂宿密尉專將屠屜屝崇崆崎崛崖崢崑崩崔崙崤崧崗巢常帶帳帷康庸庶庵庾張強彗彬彩彫得徙從徘御徠徜恿患悉悠您惋悴惦悽"],
+["b1a1","情悻悵惜悼惘惕惆惟悸惚惇戚戛扈掠控捲掖探接捷捧掘措捱掩掉掃掛捫推掄授掙採掬排掏掀捻捩捨捺敝敖救教敗啟敏敘敕敔斜斛斬族旋旌旎晝晚晤晨晦晞曹勗望梁梯梢梓梵桿桶梱梧梗械梃棄梭梆梅梔條梨梟梡梂欲殺"],
+["b240","毫毬氫涎涼淳淙液淡淌淤添淺清淇淋涯淑涮淞淹涸混淵淅淒渚涵淚淫淘淪深淮淨淆淄涪淬涿淦烹焉焊烽烯爽牽犁猜猛猖猓猙率琅琊球理現琍瓠瓶"],
+["b2a1","瓷甜產略畦畢異疏痔痕疵痊痍皎盔盒盛眷眾眼眶眸眺硫硃硎祥票祭移窒窕笠笨笛第符笙笞笮粒粗粕絆絃統紮紹紼絀細紳組累終紲紱缽羞羚翌翎習耜聊聆脯脖脣脫脩脰脤舂舵舷舶船莎莞莘荸莢莖莽莫莒莊莓莉莠荷荻荼"],
+["b340","莆莧處彪蛇蛀蚶蛄蚵蛆蛋蚱蚯蛉術袞袈被袒袖袍袋覓規訪訝訣訥許設訟訛訢豉豚販責貫貨貪貧赧赦趾趺軛軟這逍通逗連速逝逐逕逞造透逢逖逛途"],
+["b3a1","部郭都酗野釵釦釣釧釭釩閉陪陵陳陸陰陴陶陷陬雀雪雩章竟頂頃魚鳥鹵鹿麥麻傢傍傅備傑傀傖傘傚最凱割剴創剩勞勝勛博厥啻喀喧啼喊喝喘喂喜喪喔喇喋喃喳單喟唾喲喚喻喬喱啾喉喫喙圍堯堪場堤堰報堡堝堠壹壺奠"],
+["b440","婷媚婿媒媛媧孳孱寒富寓寐尊尋就嵌嵐崴嵇巽幅帽幀幃幾廊廁廂廄弼彭復循徨惑惡悲悶惠愜愣惺愕惰惻惴慨惱愎惶愉愀愒戟扉掣掌描揀揩揉揆揍"],
+["b4a1","插揣提握揖揭揮捶援揪換摒揚揹敞敦敢散斑斐斯普晰晴晶景暑智晾晷曾替期朝棺棕棠棘棗椅棟棵森棧棹棒棲棣棋棍植椒椎棉棚楮棻款欺欽殘殖殼毯氮氯氬港游湔渡渲湧湊渠渥渣減湛湘渤湖湮渭渦湯渴湍渺測湃渝渾滋"],
+["b540","溉渙湎湣湄湲湩湟焙焚焦焰無然煮焜牌犄犀猶猥猴猩琺琪琳琢琥琵琶琴琯琛琦琨甥甦畫番痢痛痣痙痘痞痠登發皖皓皴盜睏短硝硬硯稍稈程稅稀窘"],
+["b5a1","窗窖童竣等策筆筐筒答筍筋筏筑粟粥絞結絨絕紫絮絲絡給絢絰絳善翔翕耋聒肅腕腔腋腑腎脹腆脾腌腓腴舒舜菩萃菸萍菠菅萋菁華菱菴著萊菰萌菌菽菲菊萸萎萄菜萇菔菟虛蛟蛙蛭蛔蛛蛤蛐蛞街裁裂袱覃視註詠評詞証詁"],
+["b640","詔詛詐詆訴診訶詖象貂貯貼貳貽賁費賀貴買貶貿貸越超趁跎距跋跚跑跌跛跆軻軸軼辜逮逵週逸進逶鄂郵鄉郾酣酥量鈔鈕鈣鈉鈞鈍鈐鈇鈑閔閏開閑"],
+["b6a1","間閒閎隊階隋陽隅隆隍陲隄雁雅雄集雇雯雲韌項順須飧飪飯飩飲飭馮馭黃黍黑亂傭債傲傳僅傾催傷傻傯僇剿剷剽募勦勤勢勣匯嗟嗨嗓嗦嗎嗜嗇嗑嗣嗤嗯嗚嗡嗅嗆嗥嗉園圓塞塑塘塗塚塔填塌塭塊塢塒塋奧嫁嫉嫌媾媽媼"],
+["b740","媳嫂媲嵩嵯幌幹廉廈弒彙徬微愚意慈感想愛惹愁愈慎慌慄慍愾愴愧愍愆愷戡戢搓搾搞搪搭搽搬搏搜搔損搶搖搗搆敬斟新暗暉暇暈暖暄暘暍會榔業"],
+["b7a1","楚楷楠楔極椰概楊楨楫楞楓楹榆楝楣楛歇歲毀殿毓毽溢溯滓溶滂源溝滇滅溥溘溼溺溫滑準溜滄滔溪溧溴煎煙煩煤煉照煜煬煦煌煥煞煆煨煖爺牒猷獅猿猾瑯瑚瑕瑟瑞瑁琿瑙瑛瑜當畸瘀痰瘁痲痱痺痿痴痳盞盟睛睫睦睞督"],
+["b840","睹睪睬睜睥睨睢矮碎碰碗碘碌碉硼碑碓硿祺祿禁萬禽稜稚稠稔稟稞窟窠筷節筠筮筧粱粳粵經絹綑綁綏絛置罩罪署義羨群聖聘肆肄腱腰腸腥腮腳腫"],
+["b8a1","腹腺腦舅艇蒂葷落萱葵葦葫葉葬葛萼萵葡董葩葭葆虞虜號蛹蜓蜈蜇蜀蛾蛻蜂蜃蜆蜊衙裟裔裙補裘裝裡裊裕裒覜解詫該詳試詩詰誇詼詣誠話誅詭詢詮詬詹詻訾詨豢貊貉賊資賈賄貲賃賂賅跡跟跨路跳跺跪跤跦躲較載軾輊"],
+["b940","辟農運遊道遂達逼違遐遇遏過遍遑逾遁鄒鄗酬酪酩釉鈷鉗鈸鈽鉀鈾鉛鉋鉤鉑鈴鉉鉍鉅鈹鈿鉚閘隘隔隕雍雋雉雊雷電雹零靖靴靶預頑頓頊頒頌飼飴"],
+["b9a1","飽飾馳馱馴髡鳩麂鼎鼓鼠僧僮僥僖僭僚僕像僑僱僎僩兢凳劃劂匱厭嗾嘀嘛嘗嗽嘔嘆嘉嘍嘎嗷嘖嘟嘈嘐嗶團圖塵塾境墓墊塹墅塽壽夥夢夤奪奩嫡嫦嫩嫗嫖嫘嫣孵寞寧寡寥實寨寢寤察對屢嶄嶇幛幣幕幗幔廓廖弊彆彰徹慇"],
+["ba40","愿態慷慢慣慟慚慘慵截撇摘摔撤摸摟摺摑摧搴摭摻敲斡旗旖暢暨暝榜榨榕槁榮槓構榛榷榻榫榴槐槍榭槌榦槃榣歉歌氳漳演滾漓滴漩漾漠漬漏漂漢"],
+["baa1","滿滯漆漱漸漲漣漕漫漯澈漪滬漁滲滌滷熔熙煽熊熄熒爾犒犖獄獐瑤瑣瑪瑰瑭甄疑瘧瘍瘋瘉瘓盡監瞄睽睿睡磁碟碧碳碩碣禎福禍種稱窪窩竭端管箕箋筵算箝箔箏箸箇箄粹粽精綻綰綜綽綾綠緊綴網綱綺綢綿綵綸維緒緇綬"],
+["bb40","罰翠翡翟聞聚肇腐膀膏膈膊腿膂臧臺與舔舞艋蓉蒿蓆蓄蒙蒞蒲蒜蓋蒸蓀蓓蒐蒼蓑蓊蜿蜜蜻蜢蜥蜴蜘蝕蜷蜩裳褂裴裹裸製裨褚裯誦誌語誣認誡誓誤"],
+["bba1","說誥誨誘誑誚誧豪貍貌賓賑賒赫趙趕跼輔輒輕輓辣遠遘遜遣遙遞遢遝遛鄙鄘鄞酵酸酷酴鉸銀銅銘銖鉻銓銜銨鉼銑閡閨閩閣閥閤隙障際雌雒需靼鞅韶頗領颯颱餃餅餌餉駁骯骰髦魁魂鳴鳶鳳麼鼻齊億儀僻僵價儂儈儉儅凜"],
+["bc40","劇劈劉劍劊勰厲嘮嘻嘹嘲嘿嘴嘩噓噎噗噴嘶嘯嘰墀墟增墳墜墮墩墦奭嬉嫻嬋嫵嬌嬈寮寬審寫層履嶝嶔幢幟幡廢廚廟廝廣廠彈影德徵慶慧慮慝慕憂"],
+["bca1","慼慰慫慾憧憐憫憎憬憚憤憔憮戮摩摯摹撞撲撈撐撰撥撓撕撩撒撮播撫撚撬撙撢撳敵敷數暮暫暴暱樣樟槨樁樞標槽模樓樊槳樂樅槭樑歐歎殤毅毆漿潼澄潑潦潔澆潭潛潸潮澎潺潰潤澗潘滕潯潠潟熟熬熱熨牖犛獎獗瑩璋璃"],
+["bd40","瑾璀畿瘠瘩瘟瘤瘦瘡瘢皚皺盤瞎瞇瞌瞑瞋磋磅確磊碾磕碼磐稿稼穀稽稷稻窯窮箭箱範箴篆篇篁箠篌糊締練緯緻緘緬緝編緣線緞緩綞緙緲緹罵罷羯"],
+["bda1","翩耦膛膜膝膠膚膘蔗蔽蔚蓮蔬蔭蔓蔑蔣蔡蔔蓬蔥蓿蔆螂蝴蝶蝠蝦蝸蝨蝙蝗蝌蝓衛衝褐複褒褓褕褊誼諒談諄誕請諸課諉諂調誰論諍誶誹諛豌豎豬賠賞賦賤賬賭賢賣賜質賡赭趟趣踫踐踝踢踏踩踟踡踞躺輝輛輟輩輦輪輜輞"],
+["be40","輥適遮遨遭遷鄰鄭鄧鄱醇醉醋醃鋅銻銷鋪銬鋤鋁銳銼鋒鋇鋰銲閭閱霄霆震霉靠鞍鞋鞏頡頫頜颳養餓餒餘駝駐駟駛駑駕駒駙骷髮髯鬧魅魄魷魯鴆鴉"],
+["bea1","鴃麩麾黎墨齒儒儘儔儐儕冀冪凝劑劓勳噙噫噹噩噤噸噪器噥噱噯噬噢噶壁墾壇壅奮嬝嬴學寰導彊憲憑憩憊懍憶憾懊懈戰擅擁擋撻撼據擄擇擂操撿擒擔撾整曆曉暹曄曇暸樽樸樺橙橫橘樹橄橢橡橋橇樵機橈歙歷氅濂澱澡"],
+["bf40","濃澤濁澧澳激澹澶澦澠澴熾燉燐燒燈燕熹燎燙燜燃燄獨璜璣璘璟璞瓢甌甍瘴瘸瘺盧盥瞠瞞瞟瞥磨磚磬磧禦積穎穆穌穋窺篙簑築篤篛篡篩篦糕糖縊"],
+["bfa1","縑縈縛縣縞縝縉縐罹羲翰翱翮耨膳膩膨臻興艘艙蕊蕙蕈蕨蕩蕃蕉蕭蕪蕞螃螟螞螢融衡褪褲褥褫褡親覦諦諺諫諱謀諜諧諮諾謁謂諷諭諳諶諼豫豭貓賴蹄踱踴蹂踹踵輻輯輸輳辨辦遵遴選遲遼遺鄴醒錠錶鋸錳錯錢鋼錫錄錚"],
+["c040","錐錦錡錕錮錙閻隧隨險雕霎霑霖霍霓霏靛靜靦鞘頰頸頻頷頭頹頤餐館餞餛餡餚駭駢駱骸骼髻髭鬨鮑鴕鴣鴦鴨鴒鴛默黔龍龜優償儡儲勵嚎嚀嚐嚅嚇"],
+["c0a1","嚏壕壓壑壎嬰嬪嬤孺尷屨嶼嶺嶽嶸幫彌徽應懂懇懦懋戲戴擎擊擘擠擰擦擬擱擢擭斂斃曙曖檀檔檄檢檜櫛檣橾檗檐檠歜殮毚氈濘濱濟濠濛濤濫濯澀濬濡濩濕濮濰燧營燮燦燥燭燬燴燠爵牆獰獲璩環璦璨癆療癌盪瞳瞪瞰瞬"],
+["c140","瞧瞭矯磷磺磴磯礁禧禪穗窿簇簍篾篷簌篠糠糜糞糢糟糙糝縮績繆縷縲繃縫總縱繅繁縴縹繈縵縿縯罄翳翼聱聲聰聯聳臆臃膺臂臀膿膽臉膾臨舉艱薪"],
+["c1a1","薄蕾薜薑薔薯薛薇薨薊虧蟀蟑螳蟒蟆螫螻螺蟈蟋褻褶襄褸褽覬謎謗謙講謊謠謝謄謐豁谿豳賺賽購賸賻趨蹉蹋蹈蹊轄輾轂轅輿避遽還邁邂邀鄹醣醞醜鍍鎂錨鍵鍊鍥鍋錘鍾鍬鍛鍰鍚鍔闊闋闌闈闆隱隸雖霜霞鞠韓顆颶餵騁"],
+["c240","駿鮮鮫鮪鮭鴻鴿麋黏點黜黝黛鼾齋叢嚕嚮壙壘嬸彝懣戳擴擲擾攆擺擻擷斷曜朦檳檬櫃檻檸櫂檮檯歟歸殯瀉瀋濾瀆濺瀑瀏燻燼燾燸獷獵璧璿甕癖癘"],
+["c2a1","癒瞽瞿瞻瞼礎禮穡穢穠竄竅簫簧簪簞簣簡糧織繕繞繚繡繒繙罈翹翻職聶臍臏舊藏薩藍藐藉薰薺薹薦蟯蟬蟲蟠覆覲觴謨謹謬謫豐贅蹙蹣蹦蹤蹟蹕軀轉轍邇邃邈醫醬釐鎔鎊鎖鎢鎳鎮鎬鎰鎘鎚鎗闔闖闐闕離雜雙雛雞霤鞣鞦"],
+["c340","鞭韹額顏題顎顓颺餾餿餽餮馥騎髁鬃鬆魏魎魍鯊鯉鯽鯈鯀鵑鵝鵠黠鼕鼬儳嚥壞壟壢寵龐廬懲懷懶懵攀攏曠曝櫥櫝櫚櫓瀛瀟瀨瀚瀝瀕瀘爆爍牘犢獸"],
+["c3a1","獺璽瓊瓣疇疆癟癡矇礙禱穫穩簾簿簸簽簷籀繫繭繹繩繪羅繳羶羹羸臘藩藝藪藕藤藥藷蟻蠅蠍蟹蟾襠襟襖襞譁譜識證譚譎譏譆譙贈贊蹼蹲躇蹶蹬蹺蹴轔轎辭邊邋醱醮鏡鏑鏟鏃鏈鏜鏝鏖鏢鏍鏘鏤鏗鏨關隴難霪霧靡韜韻類"],
+["c440","願顛颼饅饉騖騙鬍鯨鯧鯖鯛鶉鵡鵲鵪鵬麒麗麓麴勸嚨嚷嚶嚴嚼壤孀孃孽寶巉懸懺攘攔攙曦朧櫬瀾瀰瀲爐獻瓏癢癥礦礪礬礫竇競籌籃籍糯糰辮繽繼"],
+["c4a1","纂罌耀臚艦藻藹蘑藺蘆蘋蘇蘊蠔蠕襤覺觸議譬警譯譟譫贏贍躉躁躅躂醴釋鐘鐃鏽闡霰飄饒饑馨騫騰騷騵鰓鰍鹹麵黨鼯齟齣齡儷儸囁囀囂夔屬巍懼懾攝攜斕曩櫻欄櫺殲灌爛犧瓖瓔癩矓籐纏續羼蘗蘭蘚蠣蠢蠡蠟襪襬覽譴"],
+["c540","護譽贓躊躍躋轟辯醺鐮鐳鐵鐺鐸鐲鐫闢霸霹露響顧顥饗驅驃驀騾髏魔魑鰭鰥鶯鶴鷂鶸麝黯鼙齜齦齧儼儻囈囊囉孿巔巒彎懿攤權歡灑灘玀瓤疊癮癬"],
+["c5a1","禳籠籟聾聽臟襲襯觼讀贖贗躑躓轡酈鑄鑑鑒霽霾韃韁顫饕驕驍髒鬚鱉鰱鰾鰻鷓鷗鼴齬齪龔囌巖戀攣攫攪曬欐瓚竊籤籣籥纓纖纔臢蘸蘿蠱變邐邏鑣鑠鑤靨顯饜驚驛驗髓體髑鱔鱗鱖鷥麟黴囑壩攬灞癱癲矗罐羈蠶蠹衢讓讒"],
+["c640","讖艷贛釀鑪靂靈靄韆顰驟鬢魘鱟鷹鷺鹼鹽鼇齷齲廳欖灣籬籮蠻觀躡釁鑲鑰顱饞髖鬣黌灤矚讚鑷韉驢驥纜讜躪釅鑽鑾鑼鱷鱸黷豔鑿鸚爨驪鬱鸛鸞籲"],
+["c940","乂乜凵匚厂万丌乇亍囗兀屮彳丏冇与丮亓仂仉仈冘勼卬厹圠夃夬尐巿旡殳毌气爿丱丼仨仜仩仡仝仚刌匜卌圢圣夗夯宁宄尒尻屴屳帄庀庂忉戉扐氕"],
+["c9a1","氶汃氿氻犮犰玊禸肊阞伎优伬仵伔仱伀价伈伝伂伅伢伓伄仴伒冱刓刉刐劦匢匟卍厊吇囡囟圮圪圴夼妀奼妅奻奾奷奿孖尕尥屼屺屻屾巟幵庄异弚彴忕忔忏扜扞扤扡扦扢扙扠扚扥旯旮朾朹朸朻机朿朼朳氘汆汒汜汏汊汔汋"],
+["ca40","汌灱牞犴犵玎甪癿穵网艸艼芀艽艿虍襾邙邗邘邛邔阢阤阠阣佖伻佢佉体佤伾佧佒佟佁佘伭伳伿佡冏冹刜刞刡劭劮匉卣卲厎厏吰吷吪呔呅吙吜吥吘"],
+["caa1","吽呏呁吨吤呇囮囧囥坁坅坌坉坋坒夆奀妦妘妠妗妎妢妐妏妧妡宎宒尨尪岍岏岈岋岉岒岊岆岓岕巠帊帎庋庉庌庈庍弅弝彸彶忒忑忐忭忨忮忳忡忤忣忺忯忷忻怀忴戺抃抌抎抏抔抇扱扻扺扰抁抈扷扽扲扴攷旰旴旳旲旵杅杇"],
+["cb40","杙杕杌杈杝杍杚杋毐氙氚汸汧汫沄沋沏汱汯汩沚汭沇沕沜汦汳汥汻沎灴灺牣犿犽狃狆狁犺狅玕玗玓玔玒町甹疔疕皁礽耴肕肙肐肒肜芐芏芅芎芑芓"],
+["cba1","芊芃芄豸迉辿邟邡邥邞邧邠阰阨阯阭丳侘佼侅佽侀侇佶佴侉侄佷佌侗佪侚佹侁佸侐侜侔侞侒侂侕佫佮冞冼冾刵刲刳剆刱劼匊匋匼厒厔咇呿咁咑咂咈呫呺呾呥呬呴呦咍呯呡呠咘呣呧呤囷囹坯坲坭坫坱坰坶垀坵坻坳坴坢"],
+["cc40","坨坽夌奅妵妺姏姎妲姌姁妶妼姃姖妱妽姀姈妴姇孢孥宓宕屄屇岮岤岠岵岯岨岬岟岣岭岢岪岧岝岥岶岰岦帗帔帙弨弢弣弤彔徂彾彽忞忥怭怦怙怲怋"],
+["cca1","怴怊怗怳怚怞怬怢怍怐怮怓怑怌怉怜戔戽抭抴拑抾抪抶拊抮抳抯抻抩抰抸攽斨斻昉旼昄昒昈旻昃昋昍昅旽昑昐曶朊枅杬枎枒杶杻枘枆构杴枍枌杺枟枑枙枃杽极杸杹枔欥殀歾毞氝沓泬泫泮泙沶泔沭泧沷泐泂沺泃泆泭泲"],
+["cd40","泒泝沴沊沝沀泞泀洰泍泇沰泹泏泩泑炔炘炅炓炆炄炑炖炂炚炃牪狖狋狘狉狜狒狔狚狌狑玤玡玭玦玢玠玬玝瓝瓨甿畀甾疌疘皯盳盱盰盵矸矼矹矻矺"],
+["cda1","矷祂礿秅穸穻竻籵糽耵肏肮肣肸肵肭舠芠苀芫芚芘芛芵芧芮芼芞芺芴芨芡芩苂芤苃芶芢虰虯虭虮豖迒迋迓迍迖迕迗邲邴邯邳邰阹阽阼阺陃俍俅俓侲俉俋俁俔俜俙侻侳俛俇俖侺俀侹俬剄剉勀勂匽卼厗厖厙厘咺咡咭咥哏"],
+["ce40","哃茍咷咮哖咶哅哆咠呰咼咢咾呲哞咰垵垞垟垤垌垗垝垛垔垘垏垙垥垚垕壴复奓姡姞姮娀姱姝姺姽姼姶姤姲姷姛姩姳姵姠姾姴姭宨屌峐峘峌峗峋峛"],
+["cea1","峞峚峉峇峊峖峓峔峏峈峆峎峟峸巹帡帢帣帠帤庰庤庢庛庣庥弇弮彖徆怷怹恔恲恞恅恓恇恉恛恌恀恂恟怤恄恘恦恮扂扃拏挍挋拵挎挃拫拹挏挌拸拶挀挓挔拺挕拻拰敁敃斪斿昶昡昲昵昜昦昢昳昫昺昝昴昹昮朏朐柁柲柈枺"],
+["cf40","柜枻柸柘柀枷柅柫柤柟枵柍枳柷柶柮柣柂枹柎柧柰枲柼柆柭柌枮柦柛柺柉柊柃柪柋欨殂殄殶毖毘毠氠氡洨洴洭洟洼洿洒洊泚洳洄洙洺洚洑洀洝浂"],
+["cfa1","洁洘洷洃洏浀洇洠洬洈洢洉洐炷炟炾炱炰炡炴炵炩牁牉牊牬牰牳牮狊狤狨狫狟狪狦狣玅珌珂珈珅玹玶玵玴珫玿珇玾珃珆玸珋瓬瓮甮畇畈疧疪癹盄眈眃眄眅眊盷盻盺矧矨砆砑砒砅砐砏砎砉砃砓祊祌祋祅祄秕种秏秖秎窀"],
+["d040","穾竑笀笁籺籸籹籿粀粁紃紈紁罘羑羍羾耇耎耏耔耷胘胇胠胑胈胂胐胅胣胙胜胊胕胉胏胗胦胍臿舡芔苙苾苹茇苨茀苕茺苫苖苴苬苡苲苵茌苻苶苰苪"],
+["d0a1","苤苠苺苳苭虷虴虼虳衁衎衧衪衩觓訄訇赲迣迡迮迠郱邽邿郕郅邾郇郋郈釔釓陔陏陑陓陊陎倞倅倇倓倢倰倛俵俴倳倷倬俶俷倗倜倠倧倵倯倱倎党冔冓凊凄凅凈凎剡剚剒剞剟剕剢勍匎厞唦哢唗唒哧哳哤唚哿唄唈哫唑唅哱"],
+["d140","唊哻哷哸哠唎唃唋圁圂埌堲埕埒垺埆垽垼垸垶垿埇埐垹埁夎奊娙娖娭娮娕娏娗娊娞娳孬宧宭宬尃屖屔峬峿峮峱峷崀峹帩帨庨庮庪庬弳弰彧恝恚恧"],
+["d1a1","恁悢悈悀悒悁悝悃悕悛悗悇悜悎戙扆拲挐捖挬捄捅挶捃揤挹捋捊挼挩捁挴捘捔捙挭捇挳捚捑挸捗捀捈敊敆旆旃旄旂晊晟晇晑朒朓栟栚桉栲栳栻桋桏栖栱栜栵栫栭栯桎桄栴栝栒栔栦栨栮桍栺栥栠欬欯欭欱欴歭肂殈毦毤"],
+["d240","毨毣毢毧氥浺浣浤浶洍浡涒浘浢浭浯涑涍淯浿涆浞浧浠涗浰浼浟涂涘洯浨涋浾涀涄洖涃浻浽浵涐烜烓烑烝烋缹烢烗烒烞烠烔烍烅烆烇烚烎烡牂牸"],
+["d2a1","牷牶猀狺狴狾狶狳狻猁珓珙珥珖玼珧珣珩珜珒珛珔珝珚珗珘珨瓞瓟瓴瓵甡畛畟疰痁疻痄痀疿疶疺皊盉眝眛眐眓眒眣眑眕眙眚眢眧砣砬砢砵砯砨砮砫砡砩砳砪砱祔祛祏祜祓祒祑秫秬秠秮秭秪秜秞秝窆窉窅窋窌窊窇竘笐"],
+["d340","笄笓笅笏笈笊笎笉笒粄粑粊粌粈粍粅紞紝紑紎紘紖紓紟紒紏紌罜罡罞罠罝罛羖羒翃翂翀耖耾耹胺胲胹胵脁胻脀舁舯舥茳茭荄茙荑茥荖茿荁茦茜茢"],
+["d3a1","荂荎茛茪茈茼荍茖茤茠茷茯茩荇荅荌荓茞茬荋茧荈虓虒蚢蚨蚖蚍蚑蚞蚇蚗蚆蚋蚚蚅蚥蚙蚡蚧蚕蚘蚎蚝蚐蚔衃衄衭衵衶衲袀衱衿衯袃衾衴衼訒豇豗豻貤貣赶赸趵趷趶軑軓迾迵适迿迻逄迼迶郖郠郙郚郣郟郥郘郛郗郜郤酐"],
+["d440","酎酏釕釢釚陜陟隼飣髟鬯乿偰偪偡偞偠偓偋偝偲偈偍偁偛偊偢倕偅偟偩偫偣偤偆偀偮偳偗偑凐剫剭剬剮勖勓匭厜啵啶唼啍啐唴唪啑啢唶唵唰啒啅"],
+["d4a1","唌唲啥啎唹啈唭唻啀啋圊圇埻堔埢埶埜埴堀埭埽堈埸堋埳埏堇埮埣埲埥埬埡堎埼堐埧堁堌埱埩埰堍堄奜婠婘婕婧婞娸娵婭婐婟婥婬婓婤婗婃婝婒婄婛婈媎娾婍娹婌婰婩婇婑婖婂婜孲孮寁寀屙崞崋崝崚崠崌崨崍崦崥崏"],
+["d540","崰崒崣崟崮帾帴庱庴庹庲庳弶弸徛徖徟悊悐悆悾悰悺惓惔惏惤惙惝惈悱惛悷惊悿惃惍惀挲捥掊掂捽掽掞掭掝掗掫掎捯掇掐据掯捵掜捭掮捼掤挻掟"],
+["d5a1","捸掅掁掑掍捰敓旍晥晡晛晙晜晢朘桹梇梐梜桭桮梮梫楖桯梣梬梩桵桴梲梏桷梒桼桫桲梪梀桱桾梛梖梋梠梉梤桸桻梑梌梊桽欶欳欷欸殑殏殍殎殌氪淀涫涴涳湴涬淩淢涷淶淔渀淈淠淟淖涾淥淜淝淛淴淊涽淭淰涺淕淂淏淉"],
+["d640","淐淲淓淽淗淍淣涻烺焍烷焗烴焌烰焄烳焐烼烿焆焓焀烸烶焋焂焎牾牻牼牿猝猗猇猑猘猊猈狿猏猞玈珶珸珵琄琁珽琇琀珺珼珿琌琋珴琈畤畣痎痒痏"],
+["d6a1","痋痌痑痐皏皉盓眹眯眭眱眲眴眳眽眥眻眵硈硒硉硍硊硌砦硅硐祤祧祩祪祣祫祡离秺秸秶秷窏窔窐笵筇笴笥笰笢笤笳笘笪笝笱笫笭笯笲笸笚笣粔粘粖粣紵紽紸紶紺絅紬紩絁絇紾紿絊紻紨罣羕羜羝羛翊翋翍翐翑翇翏翉耟"],
+["d740","耞耛聇聃聈脘脥脙脛脭脟脬脞脡脕脧脝脢舑舸舳舺舴舲艴莐莣莨莍荺荳莤荴莏莁莕莙荵莔莩荽莃莌莝莛莪莋荾莥莯莈莗莰荿莦莇莮荶莚虙虖蚿蚷"],
+["d7a1","蛂蛁蛅蚺蚰蛈蚹蚳蚸蛌蚴蚻蚼蛃蚽蚾衒袉袕袨袢袪袚袑袡袟袘袧袙袛袗袤袬袌袓袎覂觖觙觕訰訧訬訞谹谻豜豝豽貥赽赻赹趼跂趹趿跁軘軞軝軜軗軠軡逤逋逑逜逌逡郯郪郰郴郲郳郔郫郬郩酖酘酚酓酕釬釴釱釳釸釤釹釪"],
+["d840","釫釷釨釮镺閆閈陼陭陫陱陯隿靪頄飥馗傛傕傔傞傋傣傃傌傎傝偨傜傒傂傇兟凔匒匑厤厧喑喨喥喭啷噅喢喓喈喏喵喁喣喒喤啽喌喦啿喕喡喎圌堩堷"],
+["d8a1","堙堞堧堣堨埵塈堥堜堛堳堿堶堮堹堸堭堬堻奡媯媔媟婺媢媞婸媦婼媥媬媕媮娷媄媊媗媃媋媩婻婽媌媜媏媓媝寪寍寋寔寑寊寎尌尰崷嵃嵫嵁嵋崿崵嵑嵎嵕崳崺嵒崽崱嵙嵂崹嵉崸崼崲崶嵀嵅幄幁彘徦徥徫惉悹惌惢惎惄愔"],
+["d940","惲愊愖愅惵愓惸惼惾惁愃愘愝愐惿愄愋扊掔掱掰揎揥揨揯揃撝揳揊揠揶揕揲揵摡揟掾揝揜揄揘揓揂揇揌揋揈揰揗揙攲敧敪敤敜敨敥斌斝斞斮旐旒"],
+["d9a1","晼晬晻暀晱晹晪晲朁椌棓椄棜椪棬棪棱椏棖棷棫棤棶椓椐棳棡椇棌椈楰梴椑棯棆椔棸棐棽棼棨椋椊椗棎棈棝棞棦棴棑椆棔棩椕椥棇欹欻欿欼殔殗殙殕殽毰毲毳氰淼湆湇渟湉溈渼渽湅湢渫渿湁湝湳渜渳湋湀湑渻渃渮湞"],
+["da40","湨湜湡渱渨湠湱湫渹渢渰湓湥渧湸湤湷湕湹湒湦渵渶湚焠焞焯烻焮焱焣焥焢焲焟焨焺焛牋牚犈犉犆犅犋猒猋猰猢猱猳猧猲猭猦猣猵猌琮琬琰琫琖"],
+["daa1","琚琡琭琱琤琣琝琩琠琲瓻甯畯畬痧痚痡痦痝痟痤痗皕皒盚睆睇睄睍睅睊睎睋睌矞矬硠硤硥硜硭硱硪确硰硩硨硞硢祴祳祲祰稂稊稃稌稄窙竦竤筊笻筄筈筌筎筀筘筅粢粞粨粡絘絯絣絓絖絧絪絏絭絜絫絒絔絩絑絟絎缾缿罥"],
+["db40","罦羢羠羡翗聑聏聐胾胔腃腊腒腏腇脽腍脺臦臮臷臸臹舄舼舽舿艵茻菏菹萣菀菨萒菧菤菼菶萐菆菈菫菣莿萁菝菥菘菿菡菋菎菖菵菉萉萏菞萑萆菂菳"],
+["dba1","菕菺菇菑菪萓菃菬菮菄菻菗菢萛菛菾蛘蛢蛦蛓蛣蛚蛪蛝蛫蛜蛬蛩蛗蛨蛑衈衖衕袺裗袹袸裀袾袶袼袷袽袲褁裉覕覘覗觝觚觛詎詍訹詙詀詗詘詄詅詒詈詑詊詌詏豟貁貀貺貾貰貹貵趄趀趉跘跓跍跇跖跜跏跕跙跈跗跅軯軷軺"],
+["dc40","軹軦軮軥軵軧軨軶軫軱軬軴軩逭逴逯鄆鄬鄄郿郼鄈郹郻鄁鄀鄇鄅鄃酡酤酟酢酠鈁鈊鈥鈃鈚鈦鈏鈌鈀鈒釿釽鈆鈄鈧鈂鈜鈤鈙鈗鈅鈖镻閍閌閐隇陾隈"],
+["dca1","隉隃隀雂雈雃雱雰靬靰靮頇颩飫鳦黹亃亄亶傽傿僆傮僄僊傴僈僂傰僁傺傱僋僉傶傸凗剺剸剻剼嗃嗛嗌嗐嗋嗊嗝嗀嗔嗄嗩喿嗒喍嗏嗕嗢嗖嗈嗲嗍嗙嗂圔塓塨塤塏塍塉塯塕塎塝塙塥塛堽塣塱壼嫇嫄嫋媺媸媱媵媰媿嫈媻嫆"],
+["dd40","媷嫀嫊媴媶嫍媹媐寖寘寙尟尳嵱嵣嵊嵥嵲嵬嵞嵨嵧嵢巰幏幎幊幍幋廅廌廆廋廇彀徯徭惷慉慊愫慅愶愲愮慆愯慏愩慀戠酨戣戥戤揅揱揫搐搒搉搠搤"],
+["dda1","搳摃搟搕搘搹搷搢搣搌搦搰搨摁搵搯搊搚摀搥搧搋揧搛搮搡搎敯斒旓暆暌暕暐暋暊暙暔晸朠楦楟椸楎楢楱椿楅楪椹楂楗楙楺楈楉椵楬椳椽楥棰楸椴楩楀楯楄楶楘楁楴楌椻楋椷楜楏楑椲楒椯楻椼歆歅歃歂歈歁殛嗀毻毼"],
+["de40","毹毷毸溛滖滈溏滀溟溓溔溠溱溹滆滒溽滁溞滉溷溰滍溦滏溲溾滃滜滘溙溒溎溍溤溡溿溳滐滊溗溮溣煇煔煒煣煠煁煝煢煲煸煪煡煂煘煃煋煰煟煐煓"],
+["dea1","煄煍煚牏犍犌犑犐犎猼獂猻猺獀獊獉瑄瑊瑋瑒瑑瑗瑀瑏瑐瑎瑂瑆瑍瑔瓡瓿瓾瓽甝畹畷榃痯瘏瘃痷痾痼痹痸瘐痻痶痭痵痽皙皵盝睕睟睠睒睖睚睩睧睔睙睭矠碇碚碔碏碄碕碅碆碡碃硹碙碀碖硻祼禂祽祹稑稘稙稒稗稕稢稓"],
+["df40","稛稐窣窢窞竫筦筤筭筴筩筲筥筳筱筰筡筸筶筣粲粴粯綈綆綀綍絿綅絺綎絻綃絼綌綔綄絽綒罭罫罧罨罬羦羥羧翛翜耡腤腠腷腜腩腛腢腲朡腞腶腧腯"],
+["dfa1","腄腡舝艉艄艀艂艅蓱萿葖葶葹蒏蒍葥葑葀蒆葧萰葍葽葚葙葴葳葝蔇葞萷萺萴葺葃葸萲葅萩菙葋萯葂萭葟葰萹葎葌葒葯蓅蒎萻葇萶萳葨葾葄萫葠葔葮葐蜋蜄蛷蜌蛺蛖蛵蝍蛸蜎蜉蜁蛶蜍蜅裖裋裍裎裞裛裚裌裐覅覛觟觥觤"],
+["e040","觡觠觢觜触詶誆詿詡訿詷誂誄詵誃誁詴詺谼豋豊豥豤豦貆貄貅賌赨赩趑趌趎趏趍趓趔趐趒跰跠跬跱跮跐跩跣跢跧跲跫跴輆軿輁輀輅輇輈輂輋遒逿"],
+["e0a1","遄遉逽鄐鄍鄏鄑鄖鄔鄋鄎酮酯鉈鉒鈰鈺鉦鈳鉥鉞銃鈮鉊鉆鉭鉬鉏鉠鉧鉯鈶鉡鉰鈱鉔鉣鉐鉲鉎鉓鉌鉖鈲閟閜閞閛隒隓隑隗雎雺雽雸雵靳靷靸靲頏頍頎颬飶飹馯馲馰馵骭骫魛鳪鳭鳧麀黽僦僔僗僨僳僛僪僝僤僓僬僰僯僣僠"],
+["e140","凘劀劁勩勫匰厬嘧嘕嘌嘒嗼嘏嘜嘁嘓嘂嗺嘝嘄嗿嗹墉塼墐墘墆墁塿塴墋塺墇墑墎塶墂墈塻墔墏壾奫嫜嫮嫥嫕嫪嫚嫭嫫嫳嫢嫠嫛嫬嫞嫝嫙嫨嫟孷寠"],
+["e1a1","寣屣嶂嶀嵽嶆嵺嶁嵷嶊嶉嶈嵾嵼嶍嵹嵿幘幙幓廘廑廗廎廜廕廙廒廔彄彃彯徶愬愨慁慞慱慳慒慓慲慬憀慴慔慺慛慥愻慪慡慖戩戧戫搫摍摛摝摴摶摲摳摽摵摦撦摎撂摞摜摋摓摠摐摿搿摬摫摙摥摷敳斠暡暠暟朅朄朢榱榶槉"],
+["e240","榠槎榖榰榬榼榑榙榎榧榍榩榾榯榿槄榽榤槔榹槊榚槏榳榓榪榡榞槙榗榐槂榵榥槆歊歍歋殞殟殠毃毄毾滎滵滱漃漥滸漷滻漮漉潎漙漚漧漘漻漒滭漊"],
+["e2a1","漶潳滹滮漭潀漰漼漵滫漇漎潃漅滽滶漹漜滼漺漟漍漞漈漡熇熐熉熀熅熂熏煻熆熁熗牄牓犗犕犓獃獍獑獌瑢瑳瑱瑵瑲瑧瑮甀甂甃畽疐瘖瘈瘌瘕瘑瘊瘔皸瞁睼瞅瞂睮瞀睯睾瞃碲碪碴碭碨硾碫碞碥碠碬碢碤禘禊禋禖禕禔禓"],
+["e340","禗禈禒禐稫穊稰稯稨稦窨窫窬竮箈箜箊箑箐箖箍箌箛箎箅箘劄箙箤箂粻粿粼粺綧綷緂綣綪緁緀緅綝緎緄緆緋緌綯綹綖綼綟綦綮綩綡緉罳翢翣翥翞"],
+["e3a1","耤聝聜膉膆膃膇膍膌膋舕蒗蒤蒡蒟蒺蓎蓂蒬蒮蒫蒹蒴蓁蓍蒪蒚蒱蓐蒝蒧蒻蒢蒔蓇蓌蒛蒩蒯蒨蓖蒘蒶蓏蒠蓗蓔蓒蓛蒰蒑虡蜳蜣蜨蝫蝀蜮蜞蜡蜙蜛蝃蜬蝁蜾蝆蜠蜲蜪蜭蜼蜒蜺蜱蜵蝂蜦蜧蜸蜤蜚蜰蜑裷裧裱裲裺裾裮裼裶裻"],
+["e440","裰裬裫覝覡覟覞觩觫觨誫誙誋誒誏誖谽豨豩賕賏賗趖踉踂跿踍跽踊踃踇踆踅跾踀踄輐輑輎輍鄣鄜鄠鄢鄟鄝鄚鄤鄡鄛酺酲酹酳銥銤鉶銛鉺銠銔銪銍"],
+["e4a1","銦銚銫鉹銗鉿銣鋮銎銂銕銢鉽銈銡銊銆銌銙銧鉾銇銩銝銋鈭隞隡雿靘靽靺靾鞃鞀鞂靻鞄鞁靿韎韍頖颭颮餂餀餇馝馜駃馹馻馺駂馽駇骱髣髧鬾鬿魠魡魟鳱鳲鳵麧僿儃儰僸儆儇僶僾儋儌僽儊劋劌勱勯噈噂噌嘵噁噊噉噆噘"],
+["e540","噚噀嘳嘽嘬嘾嘸嘪嘺圚墫墝墱墠墣墯墬墥墡壿嫿嫴嫽嫷嫶嬃嫸嬂嫹嬁嬇嬅嬏屧嶙嶗嶟嶒嶢嶓嶕嶠嶜嶡嶚嶞幩幝幠幜緳廛廞廡彉徲憋憃慹憱憰憢憉"],
+["e5a1","憛憓憯憭憟憒憪憡憍慦憳戭摮摰撖撠撅撗撜撏撋撊撌撣撟摨撱撘敶敺敹敻斲斳暵暰暩暲暷暪暯樀樆樗槥槸樕槱槤樠槿槬槢樛樝槾樧槲槮樔槷槧橀樈槦槻樍槼槫樉樄樘樥樏槶樦樇槴樖歑殥殣殢殦氁氀毿氂潁漦潾澇濆澒"],
+["e640","澍澉澌潢潏澅潚澖潶潬澂潕潲潒潐潗澔澓潝漀潡潫潽潧澐潓澋潩潿澕潣潷潪潻熲熯熛熰熠熚熩熵熝熥熞熤熡熪熜熧熳犘犚獘獒獞獟獠獝獛獡獚獙"],
+["e6a1","獢璇璉璊璆璁瑽璅璈瑼瑹甈甇畾瘥瘞瘙瘝瘜瘣瘚瘨瘛皜皝皞皛瞍瞏瞉瞈磍碻磏磌磑磎磔磈磃磄磉禚禡禠禜禢禛歶稹窲窴窳箷篋箾箬篎箯箹篊箵糅糈糌糋緷緛緪緧緗緡縃緺緦緶緱緰緮緟罶羬羰羭翭翫翪翬翦翨聤聧膣膟"],
+["e740","膞膕膢膙膗舖艏艓艒艐艎艑蔤蔻蔏蔀蔩蔎蔉蔍蔟蔊蔧蔜蓻蔫蓺蔈蔌蓴蔪蓲蔕蓷蓫蓳蓼蔒蓪蓩蔖蓾蔨蔝蔮蔂蓽蔞蓶蔱蔦蓧蓨蓰蓯蓹蔘蔠蔰蔋蔙蔯虢"],
+["e7a1","蝖蝣蝤蝷蟡蝳蝘蝔蝛蝒蝡蝚蝑蝞蝭蝪蝐蝎蝟蝝蝯蝬蝺蝮蝜蝥蝏蝻蝵蝢蝧蝩衚褅褌褔褋褗褘褙褆褖褑褎褉覢覤覣觭觰觬諏諆誸諓諑諔諕誻諗誾諀諅諘諃誺誽諙谾豍貏賥賟賙賨賚賝賧趠趜趡趛踠踣踥踤踮踕踛踖踑踙踦踧"],
+["e840","踔踒踘踓踜踗踚輬輤輘輚輠輣輖輗遳遰遯遧遫鄯鄫鄩鄪鄲鄦鄮醅醆醊醁醂醄醀鋐鋃鋄鋀鋙銶鋏鋱鋟鋘鋩鋗鋝鋌鋯鋂鋨鋊鋈鋎鋦鋍鋕鋉鋠鋞鋧鋑鋓"],
+["e8a1","銵鋡鋆銴镼閬閫閮閰隤隢雓霅霈霂靚鞊鞎鞈韐韏頞頝頦頩頨頠頛頧颲餈飺餑餔餖餗餕駜駍駏駓駔駎駉駖駘駋駗駌骳髬髫髳髲髱魆魃魧魴魱魦魶魵魰魨魤魬鳼鳺鳽鳿鳷鴇鴀鳹鳻鴈鴅鴄麃黓鼏鼐儜儓儗儚儑凞匴叡噰噠噮"],
+["e940","噳噦噣噭噲噞噷圜圛壈墽壉墿墺壂墼壆嬗嬙嬛嬡嬔嬓嬐嬖嬨嬚嬠嬞寯嶬嶱嶩嶧嶵嶰嶮嶪嶨嶲嶭嶯嶴幧幨幦幯廩廧廦廨廥彋徼憝憨憖懅憴懆懁懌憺"],
+["e9a1","憿憸憌擗擖擐擏擉撽撉擃擛擳擙攳敿敼斢曈暾曀曊曋曏暽暻暺曌朣樴橦橉橧樲橨樾橝橭橶橛橑樨橚樻樿橁橪橤橐橏橔橯橩橠樼橞橖橕橍橎橆歕歔歖殧殪殫毈毇氄氃氆澭濋澣濇澼濎濈潞濄澽澞濊澨瀄澥澮澺澬澪濏澿澸"],
+["ea40","澢濉澫濍澯澲澰燅燂熿熸燖燀燁燋燔燊燇燏熽燘熼燆燚燛犝犞獩獦獧獬獥獫獪瑿璚璠璔璒璕璡甋疀瘯瘭瘱瘽瘳瘼瘵瘲瘰皻盦瞚瞝瞡瞜瞛瞢瞣瞕瞙"],
+["eaa1","瞗磝磩磥磪磞磣磛磡磢磭磟磠禤穄穈穇窶窸窵窱窷篞篣篧篝篕篥篚篨篹篔篪篢篜篫篘篟糒糔糗糐糑縒縡縗縌縟縠縓縎縜縕縚縢縋縏縖縍縔縥縤罃罻罼罺羱翯耪耩聬膱膦膮膹膵膫膰膬膴膲膷膧臲艕艖艗蕖蕅蕫蕍蕓蕡蕘"],
+["eb40","蕀蕆蕤蕁蕢蕄蕑蕇蕣蔾蕛蕱蕎蕮蕵蕕蕧蕠薌蕦蕝蕔蕥蕬虣虥虤螛螏螗螓螒螈螁螖螘蝹螇螣螅螐螑螝螄螔螜螚螉褞褦褰褭褮褧褱褢褩褣褯褬褟觱諠"],
+["eba1","諢諲諴諵諝謔諤諟諰諈諞諡諨諿諯諻貑貒貐賵賮賱賰賳赬赮趥趧踳踾踸蹀蹅踶踼踽蹁踰踿躽輶輮輵輲輹輷輴遶遹遻邆郺鄳鄵鄶醓醐醑醍醏錧錞錈錟錆錏鍺錸錼錛錣錒錁鍆錭錎錍鋋錝鋺錥錓鋹鋷錴錂錤鋿錩錹錵錪錔錌"],
+["ec40","錋鋾錉錀鋻錖閼闍閾閹閺閶閿閵閽隩雔霋霒霐鞙鞗鞔韰韸頵頯頲餤餟餧餩馞駮駬駥駤駰駣駪駩駧骹骿骴骻髶髺髹髷鬳鮀鮅鮇魼魾魻鮂鮓鮒鮐魺鮕"],
+["eca1","魽鮈鴥鴗鴠鴞鴔鴩鴝鴘鴢鴐鴙鴟麈麆麇麮麭黕黖黺鼒鼽儦儥儢儤儠儩勴嚓嚌嚍嚆嚄嚃噾嚂噿嚁壖壔壏壒嬭嬥嬲嬣嬬嬧嬦嬯嬮孻寱寲嶷幬幪徾徻懃憵憼懧懠懥懤懨懞擯擩擣擫擤擨斁斀斶旚曒檍檖檁檥檉檟檛檡檞檇檓檎"],
+["ed40","檕檃檨檤檑橿檦檚檅檌檒歛殭氉濌澩濴濔濣濜濭濧濦濞濲濝濢濨燡燱燨燲燤燰燢獳獮獯璗璲璫璐璪璭璱璥璯甐甑甒甏疄癃癈癉癇皤盩瞵瞫瞲瞷瞶"],
+["eda1","瞴瞱瞨矰磳磽礂磻磼磲礅磹磾礄禫禨穜穛穖穘穔穚窾竀竁簅簏篲簀篿篻簎篴簋篳簂簉簃簁篸篽簆篰篱簐簊糨縭縼繂縳顈縸縪繉繀繇縩繌縰縻縶繄縺罅罿罾罽翴翲耬膻臄臌臊臅臇膼臩艛艚艜薃薀薏薧薕薠薋薣蕻薤薚薞"],
+["ee40","蕷蕼薉薡蕺蕸蕗薎薖薆薍薙薝薁薢薂薈薅蕹蕶薘薐薟虨螾螪螭蟅螰螬螹螵螼螮蟉蟃蟂蟌螷螯蟄蟊螴螶螿螸螽蟞螲褵褳褼褾襁襒褷襂覭覯覮觲觳謞"],
+["eea1","謘謖謑謅謋謢謏謒謕謇謍謈謆謜謓謚豏豰豲豱豯貕貔賹赯蹎蹍蹓蹐蹌蹇轃轀邅遾鄸醚醢醛醙醟醡醝醠鎡鎃鎯鍤鍖鍇鍼鍘鍜鍶鍉鍐鍑鍠鍭鎏鍌鍪鍹鍗鍕鍒鍏鍱鍷鍻鍡鍞鍣鍧鎀鍎鍙闇闀闉闃闅閷隮隰隬霠霟霘霝霙鞚鞡鞜"],
+["ef40","鞞鞝韕韔韱顁顄顊顉顅顃餥餫餬餪餳餲餯餭餱餰馘馣馡騂駺駴駷駹駸駶駻駽駾駼騃骾髾髽鬁髼魈鮚鮨鮞鮛鮦鮡鮥鮤鮆鮢鮠鮯鴳鵁鵧鴶鴮鴯鴱鴸鴰"],
+["efa1","鵅鵂鵃鴾鴷鵀鴽翵鴭麊麉麍麰黈黚黻黿鼤鼣鼢齔龠儱儭儮嚘嚜嚗嚚嚝嚙奰嬼屩屪巀幭幮懘懟懭懮懱懪懰懫懖懩擿攄擽擸攁攃擼斔旛曚曛曘櫅檹檽櫡櫆檺檶檷櫇檴檭歞毉氋瀇瀌瀍瀁瀅瀔瀎濿瀀濻瀦濼濷瀊爁燿燹爃燽獶"],
+["f040","璸瓀璵瓁璾璶璻瓂甔甓癜癤癙癐癓癗癚皦皽盬矂瞺磿礌礓礔礉礐礒礑禭禬穟簜簩簙簠簟簭簝簦簨簢簥簰繜繐繖繣繘繢繟繑繠繗繓羵羳翷翸聵臑臒"],
+["f0a1","臐艟艞薴藆藀藃藂薳薵薽藇藄薿藋藎藈藅薱薶藒蘤薸薷薾虩蟧蟦蟢蟛蟫蟪蟥蟟蟳蟤蟔蟜蟓蟭蟘蟣螤蟗蟙蠁蟴蟨蟝襓襋襏襌襆襐襑襉謪謧謣謳謰謵譇謯謼謾謱謥謷謦謶謮謤謻謽謺豂豵貙貘貗賾贄贂贀蹜蹢蹠蹗蹖蹞蹥蹧"],
+["f140","蹛蹚蹡蹝蹩蹔轆轇轈轋鄨鄺鄻鄾醨醥醧醯醪鎵鎌鎒鎷鎛鎝鎉鎧鎎鎪鎞鎦鎕鎈鎙鎟鎍鎱鎑鎲鎤鎨鎴鎣鎥闒闓闑隳雗雚巂雟雘雝霣霢霥鞬鞮鞨鞫鞤鞪"],
+["f1a1","鞢鞥韗韙韖韘韺顐顑顒颸饁餼餺騏騋騉騍騄騑騊騅騇騆髀髜鬈鬄鬅鬩鬵魊魌魋鯇鯆鯃鮿鯁鮵鮸鯓鮶鯄鮹鮽鵜鵓鵏鵊鵛鵋鵙鵖鵌鵗鵒鵔鵟鵘鵚麎麌黟鼁鼀鼖鼥鼫鼪鼩鼨齌齕儴儵劖勷厴嚫嚭嚦嚧嚪嚬壚壝壛夒嬽嬾嬿巃幰"],
+["f240","徿懻攇攐攍攉攌攎斄旞旝曞櫧櫠櫌櫑櫙櫋櫟櫜櫐櫫櫏櫍櫞歠殰氌瀙瀧瀠瀖瀫瀡瀢瀣瀩瀗瀤瀜瀪爌爊爇爂爅犥犦犤犣犡瓋瓅璷瓃甖癠矉矊矄矱礝礛"],
+["f2a1","礡礜礗礞禰穧穨簳簼簹簬簻糬糪繶繵繸繰繷繯繺繲繴繨罋罊羃羆羷翽翾聸臗臕艤艡艣藫藱藭藙藡藨藚藗藬藲藸藘藟藣藜藑藰藦藯藞藢蠀蟺蠃蟶蟷蠉蠌蠋蠆蟼蠈蟿蠊蠂襢襚襛襗襡襜襘襝襙覈覷覶觶譐譈譊譀譓譖譔譋譕"],
+["f340","譑譂譒譗豃豷豶貚贆贇贉趬趪趭趫蹭蹸蹳蹪蹯蹻軂轒轑轏轐轓辴酀鄿醰醭鏞鏇鏏鏂鏚鏐鏹鏬鏌鏙鎩鏦鏊鏔鏮鏣鏕鏄鏎鏀鏒鏧镽闚闛雡霩霫霬霨霦"],
+["f3a1","鞳鞷鞶韝韞韟顜顙顝顗颿颽颻颾饈饇饃馦馧騚騕騥騝騤騛騢騠騧騣騞騜騔髂鬋鬊鬎鬌鬷鯪鯫鯠鯞鯤鯦鯢鯰鯔鯗鯬鯜鯙鯥鯕鯡鯚鵷鶁鶊鶄鶈鵱鶀鵸鶆鶋鶌鵽鵫鵴鵵鵰鵩鶅鵳鵻鶂鵯鵹鵿鶇鵨麔麑黀黼鼭齀齁齍齖齗齘匷嚲"],
+["f440","嚵嚳壣孅巆巇廮廯忀忁懹攗攖攕攓旟曨曣曤櫳櫰櫪櫨櫹櫱櫮櫯瀼瀵瀯瀷瀴瀱灂瀸瀿瀺瀹灀瀻瀳灁爓爔犨獽獼璺皫皪皾盭矌矎矏矍矲礥礣礧礨礤礩"],
+["f4a1","禲穮穬穭竷籉籈籊籇籅糮繻繾纁纀羺翿聹臛臙舋艨艩蘢藿蘁藾蘛蘀藶蘄蘉蘅蘌藽蠙蠐蠑蠗蠓蠖襣襦覹觷譠譪譝譨譣譥譧譭趮躆躈躄轙轖轗轕轘轚邍酃酁醷醵醲醳鐋鐓鏻鐠鐏鐔鏾鐕鐐鐨鐙鐍鏵鐀鏷鐇鐎鐖鐒鏺鐉鏸鐊鏿"],
+["f540","鏼鐌鏶鐑鐆闞闠闟霮霯鞹鞻韽韾顠顢顣顟飁飂饐饎饙饌饋饓騲騴騱騬騪騶騩騮騸騭髇髊髆鬐鬒鬑鰋鰈鯷鰅鰒鯸鱀鰇鰎鰆鰗鰔鰉鶟鶙鶤鶝鶒鶘鶐鶛"],
+["f5a1","鶠鶔鶜鶪鶗鶡鶚鶢鶨鶞鶣鶿鶩鶖鶦鶧麙麛麚黥黤黧黦鼰鼮齛齠齞齝齙龑儺儹劘劗囃嚽嚾孈孇巋巏廱懽攛欂櫼欃櫸欀灃灄灊灈灉灅灆爝爚爙獾甗癪矐礭礱礯籔籓糲纊纇纈纋纆纍罍羻耰臝蘘蘪蘦蘟蘣蘜蘙蘧蘮蘡蘠蘩蘞蘥"],
+["f640","蠩蠝蠛蠠蠤蠜蠫衊襭襩襮襫觺譹譸譅譺譻贐贔趯躎躌轞轛轝酆酄酅醹鐿鐻鐶鐩鐽鐼鐰鐹鐪鐷鐬鑀鐱闥闤闣霵霺鞿韡顤飉飆飀饘饖騹騽驆驄驂驁騺"],
+["f6a1","騿髍鬕鬗鬘鬖鬺魒鰫鰝鰜鰬鰣鰨鰩鰤鰡鶷鶶鶼鷁鷇鷊鷏鶾鷅鷃鶻鶵鷎鶹鶺鶬鷈鶱鶭鷌鶳鷍鶲鹺麜黫黮黭鼛鼘鼚鼱齎齥齤龒亹囆囅囋奱孋孌巕巑廲攡攠攦攢欋欈欉氍灕灖灗灒爞爟犩獿瓘瓕瓙瓗癭皭礵禴穰穱籗籜籙籛籚"],
+["f740","糴糱纑罏羇臞艫蘴蘵蘳蘬蘲蘶蠬蠨蠦蠪蠥襱覿覾觻譾讄讂讆讅譿贕躕躔躚躒躐躖躗轠轢酇鑌鑐鑊鑋鑏鑇鑅鑈鑉鑆霿韣顪顩飋饔饛驎驓驔驌驏驈驊"],
+["f7a1","驉驒驐髐鬙鬫鬻魖魕鱆鱈鰿鱄鰹鰳鱁鰼鰷鰴鰲鰽鰶鷛鷒鷞鷚鷋鷐鷜鷑鷟鷩鷙鷘鷖鷵鷕鷝麶黰鼵鼳鼲齂齫龕龢儽劙壨壧奲孍巘蠯彏戁戃戄攩攥斖曫欑欒欏毊灛灚爢玂玁玃癰矔籧籦纕艬蘺虀蘹蘼蘱蘻蘾蠰蠲蠮蠳襶襴襳觾"],
+["f840","讌讎讋讈豅贙躘轤轣醼鑢鑕鑝鑗鑞韄韅頀驖驙鬞鬟鬠鱒鱘鱐鱊鱍鱋鱕鱙鱌鱎鷻鷷鷯鷣鷫鷸鷤鷶鷡鷮鷦鷲鷰鷢鷬鷴鷳鷨鷭黂黐黲黳鼆鼜鼸鼷鼶齃齏"],
+["f8a1","齱齰齮齯囓囍孎屭攭曭曮欓灟灡灝灠爣瓛瓥矕礸禷禶籪纗羉艭虃蠸蠷蠵衋讔讕躞躟躠躝醾醽釂鑫鑨鑩雥靆靃靇韇韥驞髕魙鱣鱧鱦鱢鱞鱠鸂鷾鸇鸃鸆鸅鸀鸁鸉鷿鷽鸄麠鼞齆齴齵齶囔攮斸欘欙欗欚灢爦犪矘矙礹籩籫糶纚"],
+["f940","纘纛纙臠臡虆虇虈襹襺襼襻觿讘讙躥躤躣鑮鑭鑯鑱鑳靉顲饟鱨鱮鱭鸋鸍鸐鸏鸒鸑麡黵鼉齇齸齻齺齹圞灦籯蠼趲躦釃鑴鑸鑶鑵驠鱴鱳鱱鱵鸔鸓黶鼊"],
+["f9a1","龤灨灥糷虪蠾蠽蠿讞貜躩軉靋顳顴飌饡馫驤驦驧鬤鸕鸗齈戇欞爧虌躨钂钀钁驩驨鬮鸙爩虋讟钃鱹麷癵驫鱺鸝灩灪麤齾齉龘碁銹裏墻恒粧嫺╔╦╗╠╬╣╚╩╝╒╤╕╞╪╡╘╧╛╓╥╖╟╫╢╙╨╜║═╭╮╰╯▓"]
+]
diff --git a/tools/node_modules/eslint/node_modules/iconv-lite/encodings/tables/eucjp.json b/tools/node_modules/eslint/node_modules/iconv-lite/encodings/tables/eucjp.json
new file mode 100644
index 0000000000..4fa61ca116
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/iconv-lite/encodings/tables/eucjp.json
@@ -0,0 +1,182 @@
+[
+["0","\u0000",127],
+["8ea1","。",62],
+["a1a1"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇"],
+["a2a1","◆□■△▲▽▼※〒→←↑↓〓"],
+["a2ba","∈∋⊆⊇⊂⊃∪∩"],
+["a2ca","∧∨¬⇒⇔∀∃"],
+["a2dc","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"],
+["a2f2","ʼn♯♭♪†‡¶"],
+["a2fe","◯"],
+["a3b0","0",9],
+["a3c1","A",25],
+["a3e1","a",25],
+["a4a1","ぁ",82],
+["a5a1","ァ",85],
+["a6a1","Α",16,"Σ",6],
+["a6c1","α",16,"σ",6],
+["a7a1","А",5,"ЁЖ",25],
+["a7d1","а",5,"ёж",25],
+["a8a1","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"],
+["ada1","①",19,"Ⅰ",9],
+["adc0","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"],
+["addf","㍻〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"],
+["b0a1","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"],
+["b1a1","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応"],
+["b2a1","押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"],
+["b3a1","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱"],
+["b4a1","粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"],
+["b5a1","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京"],
+["b6a1","供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"],
+["b7a1","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲"],
+["b8a1","検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"],
+["b9a1","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込"],
+["baa1","此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"],
+["bba1","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時"],
+["bca1","次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"],
+["bda1","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償"],
+["bea1","勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"],
+["bfa1","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾"],
+["c0a1","澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"],
+["c1a1","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎"],
+["c2a1","臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"],
+["c3a1","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵"],
+["c4a1","帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"],
+["c5a1","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到"],
+["c6a1","董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"],
+["c7a1","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦"],
+["c8a1","函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"],
+["c9a1","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服"],
+["caa1","福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"],
+["cba1","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満"],
+["cca1","漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"],
+["cda1","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃"],
+["cea1","痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"],
+["cfa1","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"],
+["d0a1","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"],
+["d1a1","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨"],
+["d2a1","辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"],
+["d3a1","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉"],
+["d4a1","圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"],
+["d5a1","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓"],
+["d6a1","屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"],
+["d7a1","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚"],
+["d8a1","悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"],
+["d9a1","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼"],
+["daa1","據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"],
+["dba1","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍"],
+["dca1","棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"],
+["dda1","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾"],
+["dea1","沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"],
+["dfa1","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼"],
+["e0a1","燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"],
+["e1a1","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰"],
+["e2a1","癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"],
+["e3a1","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐"],
+["e4a1","筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"],
+["e5a1","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺"],
+["e6a1","罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"],
+["e7a1","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙"],
+["e8a1","茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"],
+["e9a1","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙"],
+["eaa1","蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"],
+["eba1","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫"],
+["eca1","譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"],
+["eda1","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸"],
+["eea1","遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"],
+["efa1","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞"],
+["f0a1","陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"],
+["f1a1","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷"],
+["f2a1","髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"],
+["f3a1","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠"],
+["f4a1","堯槇遙瑤凜熙"],
+["f9a1","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德"],
+["faa1","忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"],
+["fba1","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚"],
+["fca1","釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"],
+["fcf1","ⅰ",9,"¬¦'""],
+["8fa2af","˘ˇ¸˙˝¯˛˚~΄΅"],
+["8fa2c2","¡¦¿"],
+["8fa2eb","ºª©®™¤№"],
+["8fa6e1","ΆΈΉΊΪ"],
+["8fa6e7","Ό"],
+["8fa6e9","ΎΫ"],
+["8fa6ec","Ώ"],
+["8fa6f1","άέήίϊΐόςύϋΰώ"],
+["8fa7c2","Ђ",10,"ЎЏ"],
+["8fa7f2","ђ",10,"ўџ"],
+["8fa9a1","ÆĐ"],
+["8fa9a4","Ħ"],
+["8fa9a6","IJ"],
+["8fa9a8","ŁĿ"],
+["8fa9ab","ŊØŒ"],
+["8fa9af","ŦÞ"],
+["8fa9c1","æđðħıijĸłŀʼnŋøœßŧþ"],
+["8faaa1","ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈËÊĚĖĒĘ"],
+["8faaba","ĜĞĢĠĤÍÌÏÎǏİĪĮĨĴĶĹĽĻŃŇŅÑÓÒÖÔǑŐŌÕŔŘŖŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙǕŴÝŸŶŹŽŻ"],
+["8faba1","áàäâăǎāąåãćĉčçċďéèëêěėēęǵĝğ"],
+["8fabbd","ġĥíìïîǐ"],
+["8fabc5","īįĩĵķĺľļńňņñóòöôǒőōõŕřŗśŝšşťţúùüûŭǔűūųůũǘǜǚǖŵýÿŷźžż"],
+["8fb0a1","丂丄丅丌丒丟丣两丨丫丮丯丰丵乀乁乄乇乑乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘佟佣佪佬佮佱佷佸佹佺佽佾侁侂侄"],
+["8fb1a1","侅侉侊侌侎侐侒侓侔侗侙侚侞侟侲侷侹侻侼侽侾俀俁俅俆俈俉俋俌俍俏俒俜俠俢俰俲俼俽俿倀倁倄倇倊倌倎倐倓倗倘倛倜倝倞倢倧倮倰倲倳倵偀偁偂偅偆偊偌偎偑偒偓偗偙偟偠偢偣偦偧偪偭偰偱倻傁傃傄傆傊傎傏傐"],
+["8fb2a1","傒傓傔傖傛傜傞",4,"傪傯傰傹傺傽僀僃僄僇僌僎僐僓僔僘僜僝僟僢僤僦僨僩僯僱僶僺僾儃儆儇儈儋儌儍儎僲儐儗儙儛儜儝儞儣儧儨儬儭儯儱儳儴儵儸儹兂兊兏兓兕兗兘兟兤兦兾冃冄冋冎冘冝冡冣冭冸冺冼冾冿凂"],
+["8fb3a1","凈减凑凒凓凕凘凞凢凥凮凲凳凴凷刁刂刅划刓刕刖刘刢刨刱刲刵刼剅剉剕剗剘剚剜剟剠剡剦剮剷剸剹劀劂劅劊劌劓劕劖劗劘劚劜劤劥劦劧劯劰劶劷劸劺劻劽勀勄勆勈勌勏勑勔勖勛勜勡勥勨勩勪勬勰勱勴勶勷匀匃匊匋"],
+["8fb4a1","匌匑匓匘匛匜匞匟匥匧匨匩匫匬匭匰匲匵匼匽匾卂卌卋卙卛卡卣卥卬卭卲卹卾厃厇厈厎厓厔厙厝厡厤厪厫厯厲厴厵厷厸厺厽叀叅叏叒叓叕叚叝叞叠另叧叵吂吓吚吡吧吨吪启吱吴吵呃呄呇呍呏呞呢呤呦呧呩呫呭呮呴呿"],
+["8fb5a1","咁咃咅咈咉咍咑咕咖咜咟咡咦咧咩咪咭咮咱咷咹咺咻咿哆哊响哎哠哪哬哯哶哼哾哿唀唁唅唈唉唌唍唎唕唪唫唲唵唶唻唼唽啁啇啉啊啍啐啑啘啚啛啞啠啡啤啦啿喁喂喆喈喎喏喑喒喓喔喗喣喤喭喲喿嗁嗃嗆嗉嗋嗌嗎嗑嗒"],
+["8fb6a1","嗓嗗嗘嗛嗞嗢嗩嗶嗿嘅嘈嘊嘍",5,"嘙嘬嘰嘳嘵嘷嘹嘻嘼嘽嘿噀噁噃噄噆噉噋噍噏噔噞噠噡噢噣噦噩噭噯噱噲噵嚄嚅嚈嚋嚌嚕嚙嚚嚝嚞嚟嚦嚧嚨嚩嚫嚬嚭嚱嚳嚷嚾囅囉囊囋囏囐囌囍囙囜囝囟囡囤",4,"囱囫园"],
+["8fb7a1","囶囷圁圂圇圊圌圑圕圚圛圝圠圢圣圤圥圩圪圬圮圯圳圴圽圾圿坅坆坌坍坒坢坥坧坨坫坭",4,"坳坴坵坷坹坺坻坼坾垁垃垌垔垗垙垚垜垝垞垟垡垕垧垨垩垬垸垽埇埈埌埏埕埝埞埤埦埧埩埭埰埵埶埸埽埾埿堃堄堈堉埡"],
+["8fb8a1","堌堍堛堞堟堠堦堧堭堲堹堿塉塌塍塏塐塕塟塡塤塧塨塸塼塿墀墁墇墈墉墊墌墍墏墐墔墖墝墠墡墢墦墩墱墲壄墼壂壈壍壎壐壒壔壖壚壝壡壢壩壳夅夆夋夌夒夓夔虁夝夡夣夤夨夯夰夳夵夶夿奃奆奒奓奙奛奝奞奟奡奣奫奭"],
+["8fb9a1","奯奲奵奶她奻奼妋妌妎妒妕妗妟妤妧妭妮妯妰妳妷妺妼姁姃姄姈姊姍姒姝姞姟姣姤姧姮姯姱姲姴姷娀娄娌娍娎娒娓娞娣娤娧娨娪娭娰婄婅婇婈婌婐婕婞婣婥婧婭婷婺婻婾媋媐媓媖媙媜媞媟媠媢媧媬媱媲媳媵媸媺媻媿"],
+["8fbaa1","嫄嫆嫈嫏嫚嫜嫠嫥嫪嫮嫵嫶嫽嬀嬁嬈嬗嬴嬙嬛嬝嬡嬥嬭嬸孁孋孌孒孖孞孨孮孯孼孽孾孿宁宄宆宊宎宐宑宓宔宖宨宩宬宭宯宱宲宷宺宼寀寁寍寏寖",4,"寠寯寱寴寽尌尗尞尟尣尦尩尫尬尮尰尲尵尶屙屚屜屢屣屧屨屩"],
+["8fbba1","屭屰屴屵屺屻屼屽岇岈岊岏岒岝岟岠岢岣岦岪岲岴岵岺峉峋峒峝峗峮峱峲峴崁崆崍崒崫崣崤崦崧崱崴崹崽崿嵂嵃嵆嵈嵕嵑嵙嵊嵟嵠嵡嵢嵤嵪嵭嵰嵹嵺嵾嵿嶁嶃嶈嶊嶒嶓嶔嶕嶙嶛嶟嶠嶧嶫嶰嶴嶸嶹巃巇巋巐巎巘巙巠巤"],
+["8fbca1","巩巸巹帀帇帍帒帔帕帘帟帠帮帨帲帵帾幋幐幉幑幖幘幛幜幞幨幪",4,"幰庀庋庎庢庤庥庨庪庬庱庳庽庾庿廆廌廋廎廑廒廔廕廜廞廥廫异弆弇弈弎弙弜弝弡弢弣弤弨弫弬弮弰弴弶弻弽弿彀彄彅彇彍彐彔彘彛彠彣彤彧"],
+["8fbda1","彯彲彴彵彸彺彽彾徉徍徏徖徜徝徢徧徫徤徬徯徰徱徸忄忇忈忉忋忐",4,"忞忡忢忨忩忪忬忭忮忯忲忳忶忺忼怇怊怍怓怔怗怘怚怟怤怭怳怵恀恇恈恉恌恑恔恖恗恝恡恧恱恾恿悂悆悈悊悎悑悓悕悘悝悞悢悤悥您悰悱悷"],
+["8fbea1","悻悾惂惄惈惉惊惋惎惏惔惕惙惛惝惞惢惥惲惵惸惼惽愂愇愊愌愐",4,"愖愗愙愜愞愢愪愫愰愱愵愶愷愹慁慅慆慉慞慠慬慲慸慻慼慿憀憁憃憄憋憍憒憓憗憘憜憝憟憠憥憨憪憭憸憹憼懀懁懂懎懏懕懜懝懞懟懡懢懧懩懥"],
+["8fbfa1","懬懭懯戁戃戄戇戓戕戜戠戢戣戧戩戫戹戽扂扃扄扆扌扐扑扒扔扖扚扜扤扭扯扳扺扽抍抎抏抐抦抨抳抶抷抺抾抿拄拎拕拖拚拪拲拴拼拽挃挄挊挋挍挐挓挖挘挩挪挭挵挶挹挼捁捂捃捄捆捊捋捎捒捓捔捘捛捥捦捬捭捱捴捵"],
+["8fc0a1","捸捼捽捿掂掄掇掊掐掔掕掙掚掞掤掦掭掮掯掽揁揅揈揎揑揓揔揕揜揠揥揪揬揲揳揵揸揹搉搊搐搒搔搘搞搠搢搤搥搩搪搯搰搵搽搿摋摏摑摒摓摔摚摛摜摝摟摠摡摣摭摳摴摻摽撅撇撏撐撑撘撙撛撝撟撡撣撦撨撬撳撽撾撿"],
+["8fc1a1","擄擉擊擋擌擎擐擑擕擗擤擥擩擪擭擰擵擷擻擿攁攄攈攉攊攏攓攔攖攙攛攞攟攢攦攩攮攱攺攼攽敃敇敉敐敒敔敟敠敧敫敺敽斁斅斊斒斕斘斝斠斣斦斮斲斳斴斿旂旈旉旎旐旔旖旘旟旰旲旴旵旹旾旿昀昄昈昉昍昑昒昕昖昝"],
+["8fc2a1","昞昡昢昣昤昦昩昪昫昬昮昰昱昳昹昷晀晅晆晊晌晑晎晗晘晙晛晜晠晡曻晪晫晬晾晳晵晿晷晸晹晻暀晼暋暌暍暐暒暙暚暛暜暟暠暤暭暱暲暵暻暿曀曂曃曈曌曎曏曔曛曟曨曫曬曮曺朅朇朎朓朙朜朠朢朳朾杅杇杈杌杔杕杝"],
+["8fc3a1","杦杬杮杴杶杻极构枎枏枑枓枖枘枙枛枰枱枲枵枻枼枽柹柀柂柃柅柈柉柒柗柙柜柡柦柰柲柶柷桒栔栙栝栟栨栧栬栭栯栰栱栳栻栿桄桅桊桌桕桗桘桛桫桮",4,"桵桹桺桻桼梂梄梆梈梖梘梚梜梡梣梥梩梪梮梲梻棅棈棌棏"],
+["8fc4a1","棐棑棓棖棙棜棝棥棨棪棫棬棭棰棱棵棶棻棼棽椆椉椊椐椑椓椖椗椱椳椵椸椻楂楅楉楎楗楛楣楤楥楦楨楩楬楰楱楲楺楻楿榀榍榒榖榘榡榥榦榨榫榭榯榷榸榺榼槅槈槑槖槗槢槥槮槯槱槳槵槾樀樁樃樏樑樕樚樝樠樤樨樰樲"],
+["8fc5a1","樴樷樻樾樿橅橆橉橊橎橐橑橒橕橖橛橤橧橪橱橳橾檁檃檆檇檉檋檑檛檝檞檟檥檫檯檰檱檴檽檾檿櫆櫉櫈櫌櫐櫔櫕櫖櫜櫝櫤櫧櫬櫰櫱櫲櫼櫽欂欃欆欇欉欏欐欑欗欛欞欤欨欫欬欯欵欶欻欿歆歊歍歒歖歘歝歠歧歫歮歰歵歽"],
+["8fc6a1","歾殂殅殗殛殟殠殢殣殨殩殬殭殮殰殸殹殽殾毃毄毉毌毖毚毡毣毦毧毮毱毷毹毿氂氄氅氉氍氎氐氒氙氟氦氧氨氬氮氳氵氶氺氻氿汊汋汍汏汒汔汙汛汜汫汭汯汴汶汸汹汻沅沆沇沉沔沕沗沘沜沟沰沲沴泂泆泍泏泐泑泒泔泖"],
+["8fc7a1","泚泜泠泧泩泫泬泮泲泴洄洇洊洎洏洑洓洚洦洧洨汧洮洯洱洹洼洿浗浞浟浡浥浧浯浰浼涂涇涑涒涔涖涗涘涪涬涴涷涹涽涿淄淈淊淎淏淖淛淝淟淠淢淥淩淯淰淴淶淼渀渄渞渢渧渲渶渹渻渼湄湅湈湉湋湏湑湒湓湔湗湜湝湞"],
+["8fc8a1","湢湣湨湳湻湽溍溓溙溠溧溭溮溱溳溻溿滀滁滃滇滈滊滍滎滏滫滭滮滹滻滽漄漈漊漌漍漖漘漚漛漦漩漪漯漰漳漶漻漼漭潏潑潒潓潗潙潚潝潞潡潢潨潬潽潾澃澇澈澋澌澍澐澒澓澔澖澚澟澠澥澦澧澨澮澯澰澵澶澼濅濇濈濊"],
+["8fc9a1","濚濞濨濩濰濵濹濼濽瀀瀅瀆瀇瀍瀗瀠瀣瀯瀴瀷瀹瀼灃灄灈灉灊灋灔灕灝灞灎灤灥灬灮灵灶灾炁炅炆炔",4,"炛炤炫炰炱炴炷烊烑烓烔烕烖烘烜烤烺焃",4,"焋焌焏焞焠焫焭焯焰焱焸煁煅煆煇煊煋煐煒煗煚煜煞煠"],
+["8fcaa1","煨煹熀熅熇熌熒熚熛熠熢熯熰熲熳熺熿燀燁燄燋燌燓燖燙燚燜燸燾爀爇爈爉爓爗爚爝爟爤爫爯爴爸爹牁牂牃牅牎牏牐牓牕牖牚牜牞牠牣牨牫牮牯牱牷牸牻牼牿犄犉犍犎犓犛犨犭犮犱犴犾狁狇狉狌狕狖狘狟狥狳狴狺狻"],
+["8fcba1","狾猂猄猅猇猋猍猒猓猘猙猞猢猤猧猨猬猱猲猵猺猻猽獃獍獐獒獖獘獝獞獟獠獦獧獩獫獬獮獯獱獷獹獼玀玁玃玅玆玎玐玓玕玗玘玜玞玟玠玢玥玦玪玫玭玵玷玹玼玽玿珅珆珉珋珌珏珒珓珖珙珝珡珣珦珧珩珴珵珷珹珺珻珽"],
+["8fcca1","珿琀琁琄琇琊琑琚琛琤琦琨",9,"琹瑀瑃瑄瑆瑇瑋瑍瑑瑒瑗瑝瑢瑦瑧瑨瑫瑭瑮瑱瑲璀璁璅璆璇璉璏璐璑璒璘璙璚璜璟璠璡璣璦璨璩璪璫璮璯璱璲璵璹璻璿瓈瓉瓌瓐瓓瓘瓚瓛瓞瓟瓤瓨瓪瓫瓯瓴瓺瓻瓼瓿甆"],
+["8fcda1","甒甖甗甠甡甤甧甩甪甯甶甹甽甾甿畀畃畇畈畎畐畒畗畞畟畡畯畱畹",5,"疁疅疐疒疓疕疙疜疢疤疴疺疿痀痁痄痆痌痎痏痗痜痟痠痡痤痧痬痮痯痱痹瘀瘂瘃瘄瘇瘈瘊瘌瘏瘒瘓瘕瘖瘙瘛瘜瘝瘞瘣瘥瘦瘩瘭瘲瘳瘵瘸瘹"],
+["8fcea1","瘺瘼癊癀癁癃癄癅癉癋癕癙癟癤癥癭癮癯癱癴皁皅皌皍皕皛皜皝皟皠皢",6,"皪皭皽盁盅盉盋盌盎盔盙盠盦盨盬盰盱盶盹盼眀眆眊眎眒眔眕眗眙眚眜眢眨眭眮眯眴眵眶眹眽眾睂睅睆睊睍睎睏睒睖睗睜睞睟睠睢"],
+["8fcfa1","睤睧睪睬睰睲睳睴睺睽瞀瞄瞌瞍瞔瞕瞖瞚瞟瞢瞧瞪瞮瞯瞱瞵瞾矃矉矑矒矕矙矞矟矠矤矦矪矬矰矱矴矸矻砅砆砉砍砎砑砝砡砢砣砭砮砰砵砷硃硄硇硈硌硎硒硜硞硠硡硣硤硨硪确硺硾碊碏碔碘碡碝碞碟碤碨碬碭碰碱碲碳"],
+["8fd0a1","碻碽碿磇磈磉磌磎磒磓磕磖磤磛磟磠磡磦磪磲磳礀磶磷磺磻磿礆礌礐礚礜礞礟礠礥礧礩礭礱礴礵礻礽礿祄祅祆祊祋祏祑祔祘祛祜祧祩祫祲祹祻祼祾禋禌禑禓禔禕禖禘禛禜禡禨禩禫禯禱禴禸离秂秄秇秈秊秏秔秖秚秝秞"],
+["8fd1a1","秠秢秥秪秫秭秱秸秼稂稃稇稉稊稌稑稕稛稞稡稧稫稭稯稰稴稵稸稹稺穄穅穇穈穌穕穖穙穜穝穟穠穥穧穪穭穵穸穾窀窂窅窆窊窋窐窑窔窞窠窣窬窳窵窹窻窼竆竉竌竎竑竛竨竩竫竬竱竴竻竽竾笇笔笟笣笧笩笪笫笭笮笯笰"],
+["8fd2a1","笱笴笽笿筀筁筇筎筕筠筤筦筩筪筭筯筲筳筷箄箉箎箐箑箖箛箞箠箥箬箯箰箲箵箶箺箻箼箽篂篅篈篊篔篖篗篙篚篛篨篪篲篴篵篸篹篺篼篾簁簂簃簄簆簉簋簌簎簏簙簛簠簥簦簨簬簱簳簴簶簹簺籆籊籕籑籒籓籙",5],
+["8fd3a1","籡籣籧籩籭籮籰籲籹籼籽粆粇粏粔粞粠粦粰粶粷粺粻粼粿糄糇糈糉糍糏糓糔糕糗糙糚糝糦糩糫糵紃紇紈紉紏紑紒紓紖紝紞紣紦紪紭紱紼紽紾絀絁絇絈絍絑絓絗絙絚絜絝絥絧絪絰絸絺絻絿綁綂綃綅綆綈綋綌綍綑綖綗綝"],
+["8fd4a1","綞綦綧綪綳綶綷綹緂",4,"緌緍緎緗緙縀緢緥緦緪緫緭緱緵緶緹緺縈縐縑縕縗縜縝縠縧縨縬縭縯縳縶縿繄繅繇繎繐繒繘繟繡繢繥繫繮繯繳繸繾纁纆纇纊纍纑纕纘纚纝纞缼缻缽缾缿罃罄罇罏罒罓罛罜罝罡罣罤罥罦罭"],
+["8fd5a1","罱罽罾罿羀羋羍羏羐羑羖羗羜羡羢羦羪羭羴羼羿翀翃翈翎翏翛翟翣翥翨翬翮翯翲翺翽翾翿耇耈耊耍耎耏耑耓耔耖耝耞耟耠耤耦耬耮耰耴耵耷耹耺耼耾聀聄聠聤聦聭聱聵肁肈肎肜肞肦肧肫肸肹胈胍胏胒胔胕胗胘胠胭胮"],
+["8fd6a1","胰胲胳胶胹胺胾脃脋脖脗脘脜脞脠脤脧脬脰脵脺脼腅腇腊腌腒腗腠腡腧腨腩腭腯腷膁膐膄膅膆膋膎膖膘膛膞膢膮膲膴膻臋臃臅臊臎臏臕臗臛臝臞臡臤臫臬臰臱臲臵臶臸臹臽臿舀舃舏舓舔舙舚舝舡舢舨舲舴舺艃艄艅艆"],
+["8fd7a1","艋艎艏艑艖艜艠艣艧艭艴艻艽艿芀芁芃芄芇芉芊芎芑芔芖芘芚芛芠芡芣芤芧芨芩芪芮芰芲芴芷芺芼芾芿苆苐苕苚苠苢苤苨苪苭苯苶苷苽苾茀茁茇茈茊茋荔茛茝茞茟茡茢茬茭茮茰茳茷茺茼茽荂荃荄荇荍荎荑荕荖荗荰荸"],
+["8fd8a1","荽荿莀莂莄莆莍莒莔莕莘莙莛莜莝莦莧莩莬莾莿菀菇菉菏菐菑菔菝荓菨菪菶菸菹菼萁萆萊萏萑萕萙莭萯萹葅葇葈葊葍葏葑葒葖葘葙葚葜葠葤葥葧葪葰葳葴葶葸葼葽蒁蒅蒒蒓蒕蒞蒦蒨蒩蒪蒯蒱蒴蒺蒽蒾蓀蓂蓇蓈蓌蓏蓓"],
+["8fd9a1","蓜蓧蓪蓯蓰蓱蓲蓷蔲蓺蓻蓽蔂蔃蔇蔌蔎蔐蔜蔞蔢蔣蔤蔥蔧蔪蔫蔯蔳蔴蔶蔿蕆蕏",4,"蕖蕙蕜",6,"蕤蕫蕯蕹蕺蕻蕽蕿薁薅薆薉薋薌薏薓薘薝薟薠薢薥薧薴薶薷薸薼薽薾薿藂藇藊藋藎薭藘藚藟藠藦藨藭藳藶藼"],
+["8fdaa1","藿蘀蘄蘅蘍蘎蘐蘑蘒蘘蘙蘛蘞蘡蘧蘩蘶蘸蘺蘼蘽虀虂虆虒虓虖虗虘虙虝虠",4,"虩虬虯虵虶虷虺蚍蚑蚖蚘蚚蚜蚡蚦蚧蚨蚭蚱蚳蚴蚵蚷蚸蚹蚿蛀蛁蛃蛅蛑蛒蛕蛗蛚蛜蛠蛣蛥蛧蚈蛺蛼蛽蜄蜅蜇蜋蜎蜏蜐蜓蜔蜙蜞蜟蜡蜣"],
+["8fdba1","蜨蜮蜯蜱蜲蜹蜺蜼蜽蜾蝀蝃蝅蝍蝘蝝蝡蝤蝥蝯蝱蝲蝻螃",6,"螋螌螐螓螕螗螘螙螞螠螣螧螬螭螮螱螵螾螿蟁蟈蟉蟊蟎蟕蟖蟙蟚蟜蟟蟢蟣蟤蟪蟫蟭蟱蟳蟸蟺蟿蠁蠃蠆蠉蠊蠋蠐蠙蠒蠓蠔蠘蠚蠛蠜蠞蠟蠨蠭蠮蠰蠲蠵"],
+["8fdca1","蠺蠼衁衃衅衈衉衊衋衎衑衕衖衘衚衜衟衠衤衩衱衹衻袀袘袚袛袜袟袠袨袪袺袽袾裀裊",4,"裑裒裓裛裞裧裯裰裱裵裷褁褆褍褎褏褕褖褘褙褚褜褠褦褧褨褰褱褲褵褹褺褾襀襂襅襆襉襏襒襗襚襛襜襡襢襣襫襮襰襳襵襺"],
+["8fdda1","襻襼襽覉覍覐覔覕覛覜覟覠覥覰覴覵覶覷覼觔",4,"觥觩觫觭觱觳觶觹觽觿訄訅訇訏訑訒訔訕訞訠訢訤訦訫訬訯訵訷訽訾詀詃詅詇詉詍詎詓詖詗詘詜詝詡詥詧詵詶詷詹詺詻詾詿誀誃誆誋誏誐誒誖誗誙誟誧誩誮誯誳"],
+["8fdea1","誶誷誻誾諃諆諈諉諊諑諓諔諕諗諝諟諬諰諴諵諶諼諿謅謆謋謑謜謞謟謊謭謰謷謼譂",4,"譈譒譓譔譙譍譞譣譭譶譸譹譼譾讁讄讅讋讍讏讔讕讜讞讟谸谹谽谾豅豇豉豋豏豑豓豔豗豘豛豝豙豣豤豦豨豩豭豳豵豶豻豾貆"],
+["8fdfa1","貇貋貐貒貓貙貛貜貤貹貺賅賆賉賋賏賖賕賙賝賡賨賬賯賰賲賵賷賸賾賿贁贃贉贒贗贛赥赩赬赮赿趂趄趈趍趐趑趕趞趟趠趦趫趬趯趲趵趷趹趻跀跅跆跇跈跊跎跑跔跕跗跙跤跥跧跬跰趼跱跲跴跽踁踄踅踆踋踑踔踖踠踡踢"],
+["8fe0a1","踣踦踧踱踳踶踷踸踹踽蹀蹁蹋蹍蹎蹏蹔蹛蹜蹝蹞蹡蹢蹩蹬蹭蹯蹰蹱蹹蹺蹻躂躃躉躐躒躕躚躛躝躞躢躧躩躭躮躳躵躺躻軀軁軃軄軇軏軑軔軜軨軮軰軱軷軹軺軭輀輂輇輈輏輐輖輗輘輞輠輡輣輥輧輨輬輭輮輴輵輶輷輺轀轁"],
+["8fe1a1","轃轇轏轑",4,"轘轝轞轥辝辠辡辤辥辦辵辶辸达迀迁迆迊迋迍运迒迓迕迠迣迤迨迮迱迵迶迻迾适逄逈逌逘逛逨逩逯逪逬逭逳逴逷逿遃遄遌遛遝遢遦遧遬遰遴遹邅邈邋邌邎邐邕邗邘邙邛邠邡邢邥邰邲邳邴邶邽郌邾郃"],
+["8fe2a1","郄郅郇郈郕郗郘郙郜郝郟郥郒郶郫郯郰郴郾郿鄀鄄鄅鄆鄈鄍鄐鄔鄖鄗鄘鄚鄜鄞鄠鄥鄢鄣鄧鄩鄮鄯鄱鄴鄶鄷鄹鄺鄼鄽酃酇酈酏酓酗酙酚酛酡酤酧酭酴酹酺酻醁醃醅醆醊醎醑醓醔醕醘醞醡醦醨醬醭醮醰醱醲醳醶醻醼醽醿"],
+["8fe3a1","釂釃釅釓釔釗釙釚釞釤釥釩釪釬",5,"釷釹釻釽鈀鈁鈄鈅鈆鈇鈉鈊鈌鈐鈒鈓鈖鈘鈜鈝鈣鈤鈥鈦鈨鈮鈯鈰鈳鈵鈶鈸鈹鈺鈼鈾鉀鉂鉃鉆鉇鉊鉍鉎鉏鉑鉘鉙鉜鉝鉠鉡鉥鉧鉨鉩鉮鉯鉰鉵",4,"鉻鉼鉽鉿銈銉銊銍銎銒銗"],
+["8fe4a1","銙銟銠銤銥銧銨銫銯銲銶銸銺銻銼銽銿",4,"鋅鋆鋇鋈鋋鋌鋍鋎鋐鋓鋕鋗鋘鋙鋜鋝鋟鋠鋡鋣鋥鋧鋨鋬鋮鋰鋹鋻鋿錀錂錈錍錑錔錕錜錝錞錟錡錤錥錧錩錪錳錴錶錷鍇鍈鍉鍐鍑鍒鍕鍗鍘鍚鍞鍤鍥鍧鍩鍪鍭鍯鍰鍱鍳鍴鍶"],
+["8fe5a1","鍺鍽鍿鎀鎁鎂鎈鎊鎋鎍鎏鎒鎕鎘鎛鎞鎡鎣鎤鎦鎨鎫鎴鎵鎶鎺鎩鏁鏄鏅鏆鏇鏉",4,"鏓鏙鏜鏞鏟鏢鏦鏧鏹鏷鏸鏺鏻鏽鐁鐂鐄鐈鐉鐍鐎鐏鐕鐖鐗鐟鐮鐯鐱鐲鐳鐴鐻鐿鐽鑃鑅鑈鑊鑌鑕鑙鑜鑟鑡鑣鑨鑫鑭鑮鑯鑱鑲钄钃镸镹"],
+["8fe6a1","镾閄閈閌閍閎閝閞閟閡閦閩閫閬閴閶閺閽閿闆闈闉闋闐闑闒闓闙闚闝闞闟闠闤闦阝阞阢阤阥阦阬阱阳阷阸阹阺阼阽陁陒陔陖陗陘陡陮陴陻陼陾陿隁隂隃隄隉隑隖隚隝隟隤隥隦隩隮隯隳隺雊雒嶲雘雚雝雞雟雩雯雱雺霂"],
+["8fe7a1","霃霅霉霚霛霝霡霢霣霨霱霳靁靃靊靎靏靕靗靘靚靛靣靧靪靮靳靶靷靸靻靽靿鞀鞉鞕鞖鞗鞙鞚鞞鞟鞢鞬鞮鞱鞲鞵鞶鞸鞹鞺鞼鞾鞿韁韄韅韇韉韊韌韍韎韐韑韔韗韘韙韝韞韠韛韡韤韯韱韴韷韸韺頇頊頙頍頎頔頖頜頞頠頣頦"],
+["8fe8a1","頫頮頯頰頲頳頵頥頾顄顇顊顑顒顓顖顗顙顚顢顣顥顦顪顬颫颭颮颰颴颷颸颺颻颿飂飅飈飌飡飣飥飦飧飪飳飶餂餇餈餑餕餖餗餚餛餜餟餢餦餧餫餱",4,"餹餺餻餼饀饁饆饇饈饍饎饔饘饙饛饜饞饟饠馛馝馟馦馰馱馲馵"],
+["8fe9a1","馹馺馽馿駃駉駓駔駙駚駜駞駧駪駫駬駰駴駵駹駽駾騂騃騄騋騌騐騑騖騞騠騢騣騤騧騭騮騳騵騶騸驇驁驄驊驋驌驎驑驔驖驝骪骬骮骯骲骴骵骶骹骻骾骿髁髃髆髈髎髐髒髕髖髗髛髜髠髤髥髧髩髬髲髳髵髹髺髽髿",4],
+["8feaa1","鬄鬅鬈鬉鬋鬌鬍鬎鬐鬒鬖鬙鬛鬜鬠鬦鬫鬭鬳鬴鬵鬷鬹鬺鬽魈魋魌魕魖魗魛魞魡魣魥魦魨魪",4,"魳魵魷魸魹魿鮀鮄鮅鮆鮇鮉鮊鮋鮍鮏鮐鮔鮚鮝鮞鮦鮧鮩鮬鮰鮱鮲鮷鮸鮻鮼鮾鮿鯁鯇鯈鯎鯐鯗鯘鯝鯟鯥鯧鯪鯫鯯鯳鯷鯸"],
+["8feba1","鯹鯺鯽鯿鰀鰂鰋鰏鰑鰖鰘鰙鰚鰜鰞鰢鰣鰦",4,"鰱鰵鰶鰷鰽鱁鱃鱄鱅鱉鱊鱎鱏鱐鱓鱔鱖鱘鱛鱝鱞鱟鱣鱩鱪鱜鱫鱨鱮鱰鱲鱵鱷鱻鳦鳲鳷鳹鴋鴂鴑鴗鴘鴜鴝鴞鴯鴰鴲鴳鴴鴺鴼鵅鴽鵂鵃鵇鵊鵓鵔鵟鵣鵢鵥鵩鵪鵫鵰鵶鵷鵻"],
+["8feca1","鵼鵾鶃鶄鶆鶊鶍鶎鶒鶓鶕鶖鶗鶘鶡鶪鶬鶮鶱鶵鶹鶼鶿鷃鷇鷉鷊鷔鷕鷖鷗鷚鷞鷟鷠鷥鷧鷩鷫鷮鷰鷳鷴鷾鸊鸂鸇鸎鸐鸑鸒鸕鸖鸙鸜鸝鹺鹻鹼麀麂麃麄麅麇麎麏麖麘麛麞麤麨麬麮麯麰麳麴麵黆黈黋黕黟黤黧黬黭黮黰黱黲黵"],
+["8feda1","黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃",4,"齓齕齖齗齘齚齝齞齨齩齭",4,"齳齵齺齽龏龐龑龒龔龖龗龞龡龢龣龥"]
+]
diff --git a/tools/node_modules/eslint/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json b/tools/node_modules/eslint/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json
new file mode 100644
index 0000000000..85c6934757
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json
@@ -0,0 +1 @@
+{"uChars":[128,165,169,178,184,216,226,235,238,244,248,251,253,258,276,284,300,325,329,334,364,463,465,467,469,471,473,475,477,506,594,610,712,716,730,930,938,962,970,1026,1104,1106,8209,8215,8218,8222,8231,8241,8244,8246,8252,8365,8452,8454,8458,8471,8482,8556,8570,8596,8602,8713,8720,8722,8726,8731,8737,8740,8742,8748,8751,8760,8766,8777,8781,8787,8802,8808,8816,8854,8858,8870,8896,8979,9322,9372,9548,9588,9616,9622,9634,9652,9662,9672,9676,9680,9702,9735,9738,9793,9795,11906,11909,11913,11917,11928,11944,11947,11951,11956,11960,11964,11979,12284,12292,12312,12319,12330,12351,12436,12447,12535,12543,12586,12842,12850,12964,13200,13215,13218,13253,13263,13267,13270,13384,13428,13727,13839,13851,14617,14703,14801,14816,14964,15183,15471,15585,16471,16736,17208,17325,17330,17374,17623,17997,18018,18212,18218,18301,18318,18760,18811,18814,18820,18823,18844,18848,18872,19576,19620,19738,19887,40870,59244,59336,59367,59413,59417,59423,59431,59437,59443,59452,59460,59478,59493,63789,63866,63894,63976,63986,64016,64018,64021,64025,64034,64037,64042,65074,65093,65107,65112,65127,65132,65375,65510,65536],"gbChars":[0,36,38,45,50,81,89,95,96,100,103,104,105,109,126,133,148,172,175,179,208,306,307,308,309,310,311,312,313,341,428,443,544,545,558,741,742,749,750,805,819,820,7922,7924,7925,7927,7934,7943,7944,7945,7950,8062,8148,8149,8152,8164,8174,8236,8240,8262,8264,8374,8380,8381,8384,8388,8390,8392,8393,8394,8396,8401,8406,8416,8419,8424,8437,8439,8445,8482,8485,8496,8521,8603,8936,8946,9046,9050,9063,9066,9076,9092,9100,9108,9111,9113,9131,9162,9164,9218,9219,11329,11331,11334,11336,11346,11361,11363,11366,11370,11372,11375,11389,11682,11686,11687,11692,11694,11714,11716,11723,11725,11730,11736,11982,11989,12102,12336,12348,12350,12384,12393,12395,12397,12510,12553,12851,12962,12973,13738,13823,13919,13933,14080,14298,14585,14698,15583,15847,16318,16434,16438,16481,16729,17102,17122,17315,17320,17402,17418,17859,17909,17911,17915,17916,17936,17939,17961,18664,18703,18814,18962,19043,33469,33470,33471,33484,33485,33490,33497,33501,33505,33513,33520,33536,33550,37845,37921,37948,38029,38038,38064,38065,38066,38069,38075,38076,38078,39108,39109,39113,39114,39115,39116,39265,39394,189000]} \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/iconv-lite/encodings/tables/gbk-added.json b/tools/node_modules/eslint/node_modules/iconv-lite/encodings/tables/gbk-added.json
new file mode 100644
index 0000000000..8abfa9f7b9
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/iconv-lite/encodings/tables/gbk-added.json
@@ -0,0 +1,55 @@
+[
+["a140","",62],
+["a180","",32],
+["a240","",62],
+["a280","",32],
+["a2ab","",5],
+["a2e3","€"],
+["a2ef",""],
+["a2fd",""],
+["a340","",62],
+["a380","",31," "],
+["a440","",62],
+["a480","",32],
+["a4f4","",10],
+["a540","",62],
+["a580","",32],
+["a5f7","",7],
+["a640","",62],
+["a680","",32],
+["a6b9","",7],
+["a6d9","",6],
+["a6ec",""],
+["a6f3",""],
+["a6f6","",8],
+["a740","",62],
+["a780","",32],
+["a7c2","",14],
+["a7f2","",12],
+["a896","",10],
+["a8bc",""],
+["a8bf","ǹ"],
+["a8c1",""],
+["a8ea","",20],
+["a958",""],
+["a95b",""],
+["a95d",""],
+["a989","〾⿰",11],
+["a997","",12],
+["a9f0","",14],
+["aaa1","",93],
+["aba1","",93],
+["aca1","",93],
+["ada1","",93],
+["aea1","",93],
+["afa1","",93],
+["d7fa","",4],
+["f8a1","",93],
+["f9a1","",93],
+["faa1","",93],
+["fba1","",93],
+["fca1","",93],
+["fda1","",93],
+["fe50","⺁⺄㑳㑇⺈⺋㖞㘚㘎⺌⺗㥮㤘㧏㧟㩳㧐㭎㱮㳠⺧⺪䁖䅟⺮䌷⺳⺶⺷䎱䎬⺻䏝䓖䙡䙌"],
+["fe80","䜣䜩䝼䞍⻊䥇䥺䥽䦂䦃䦅䦆䦟䦛䦷䦶䲣䲟䲠䲡䱷䲢䴓",6,"䶮",93]
+]
diff --git a/tools/node_modules/eslint/node_modules/iconv-lite/encodings/tables/shiftjis.json b/tools/node_modules/eslint/node_modules/iconv-lite/encodings/tables/shiftjis.json
new file mode 100644
index 0000000000..5a3a43cf8c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/iconv-lite/encodings/tables/shiftjis.json
@@ -0,0 +1,125 @@
+[
+["0","\u0000",128],
+["a1","。",62],
+["8140"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×"],
+["8180","÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇◆□■△▲▽▼※〒→←↑↓〓"],
+["81b8","∈∋⊆⊇⊂⊃∪∩"],
+["81c8","∧∨¬⇒⇔∀∃"],
+["81da","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"],
+["81f0","ʼn♯♭♪†‡¶"],
+["81fc","◯"],
+["824f","0",9],
+["8260","A",25],
+["8281","a",25],
+["829f","ぁ",82],
+["8340","ァ",62],
+["8380","ム",22],
+["839f","Α",16,"Σ",6],
+["83bf","α",16,"σ",6],
+["8440","А",5,"ЁЖ",25],
+["8470","а",5,"ёж",7],
+["8480","о",17],
+["849f","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"],
+["8740","①",19,"Ⅰ",9],
+["875f","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"],
+["877e","㍻"],
+["8780","〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"],
+["889f","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"],
+["8940","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円"],
+["8980","園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"],
+["8a40","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫"],
+["8a80","橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"],
+["8b40","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救"],
+["8b80","朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"],
+["8c40","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨"],
+["8c80","劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"],
+["8d40","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降"],
+["8d80","項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"],
+["8e40","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止"],
+["8e80","死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"],
+["8f40","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳"],
+["8f80","準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"],
+["9040","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨"],
+["9080","逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"],
+["9140","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻"],
+["9180","操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"],
+["9240","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄"],
+["9280","逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"],
+["9340","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬"],
+["9380","凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"],
+["9440","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅"],
+["9480","楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"],
+["9540","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷"],
+["9580","斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"],
+["9640","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆"],
+["9680","摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"],
+["9740","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲"],
+["9780","沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"],
+["9840","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"],
+["989f","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"],
+["9940","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭"],
+["9980","凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"],
+["9a40","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸"],
+["9a80","噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"],
+["9b40","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀"],
+["9b80","它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"],
+["9c40","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠"],
+["9c80","怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"],
+["9d40","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫"],
+["9d80","捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"],
+["9e40","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎"],
+["9e80","梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"],
+["9f40","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯"],
+["9f80","麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"],
+["e040","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝"],
+["e080","烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"],
+["e140","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿"],
+["e180","痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"],
+["e240","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰"],
+["e280","窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"],
+["e340","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷"],
+["e380","縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"],
+["e440","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤"],
+["e480","艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"],
+["e540","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬"],
+["e580","蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"],
+["e640","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧"],
+["e680","諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"],
+["e740","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜"],
+["e780","轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"],
+["e840","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙"],
+["e880","閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"],
+["e940","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃"],
+["e980","騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"],
+["ea40","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯"],
+["ea80","黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠堯槇遙瑤凜熙"],
+["ed40","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏"],
+["ed80","塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"],
+["ee40","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙"],
+["ee80","蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"],
+["eeef","ⅰ",9,"¬¦'""],
+["f040","",62],
+["f080","",124],
+["f140","",62],
+["f180","",124],
+["f240","",62],
+["f280","",124],
+["f340","",62],
+["f380","",124],
+["f440","",62],
+["f480","",124],
+["f540","",62],
+["f580","",124],
+["f640","",62],
+["f680","",124],
+["f740","",62],
+["f780","",124],
+["f840","",62],
+["f880","",124],
+["f940",""],
+["fa40","ⅰ",9,"Ⅰ",9,"¬¦'"㈱№℡∵纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊"],
+["fa80","兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯"],
+["fb40","涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神"],
+["fb80","祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙"],
+["fc40","髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"]
+]
diff --git a/tools/node_modules/eslint/node_modules/iconv-lite/encodings/utf16.js b/tools/node_modules/eslint/node_modules/iconv-lite/encodings/utf16.js
new file mode 100644
index 0000000000..7e8f1591a8
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/iconv-lite/encodings/utf16.js
@@ -0,0 +1,177 @@
+"use strict";
+var Buffer = require("buffer").Buffer;
+
+// Note: UTF16-LE (or UCS2) codec is Node.js native. See encodings/internal.js
+
+// == UTF16-BE codec. ==========================================================
+
+exports.utf16be = Utf16BECodec;
+function Utf16BECodec() {
+}
+
+Utf16BECodec.prototype.encoder = Utf16BEEncoder;
+Utf16BECodec.prototype.decoder = Utf16BEDecoder;
+Utf16BECodec.prototype.bomAware = true;
+
+
+// -- Encoding
+
+function Utf16BEEncoder() {
+}
+
+Utf16BEEncoder.prototype.write = function(str) {
+ var buf = new Buffer(str, 'ucs2');
+ for (var i = 0; i < buf.length; i += 2) {
+ var tmp = buf[i]; buf[i] = buf[i+1]; buf[i+1] = tmp;
+ }
+ return buf;
+}
+
+Utf16BEEncoder.prototype.end = function() {
+}
+
+
+// -- Decoding
+
+function Utf16BEDecoder() {
+ this.overflowByte = -1;
+}
+
+Utf16BEDecoder.prototype.write = function(buf) {
+ if (buf.length == 0)
+ return '';
+
+ var buf2 = new Buffer(buf.length + 1),
+ i = 0, j = 0;
+
+ if (this.overflowByte !== -1) {
+ buf2[0] = buf[0];
+ buf2[1] = this.overflowByte;
+ i = 1; j = 2;
+ }
+
+ for (; i < buf.length-1; i += 2, j+= 2) {
+ buf2[j] = buf[i+1];
+ buf2[j+1] = buf[i];
+ }
+
+ this.overflowByte = (i == buf.length-1) ? buf[buf.length-1] : -1;
+
+ return buf2.slice(0, j).toString('ucs2');
+}
+
+Utf16BEDecoder.prototype.end = function() {
+}
+
+
+// == UTF-16 codec =============================================================
+// Decoder chooses automatically from UTF-16LE and UTF-16BE using BOM and space-based heuristic.
+// Defaults to UTF-16LE, as it's prevalent and default in Node.
+// http://en.wikipedia.org/wiki/UTF-16 and http://encoding.spec.whatwg.org/#utf-16le
+// Decoder default can be changed: iconv.decode(buf, 'utf16', {defaultEncoding: 'utf-16be'});
+
+// Encoder uses UTF-16LE and prepends BOM (which can be overridden with addBOM: false).
+
+exports.utf16 = Utf16Codec;
+function Utf16Codec(codecOptions, iconv) {
+ this.iconv = iconv;
+}
+
+Utf16Codec.prototype.encoder = Utf16Encoder;
+Utf16Codec.prototype.decoder = Utf16Decoder;
+
+
+// -- Encoding (pass-through)
+
+function Utf16Encoder(options, codec) {
+ options = options || {};
+ if (options.addBOM === undefined)
+ options.addBOM = true;
+ this.encoder = codec.iconv.getEncoder('utf-16le', options);
+}
+
+Utf16Encoder.prototype.write = function(str) {
+ return this.encoder.write(str);
+}
+
+Utf16Encoder.prototype.end = function() {
+ return this.encoder.end();
+}
+
+
+// -- Decoding
+
+function Utf16Decoder(options, codec) {
+ this.decoder = null;
+ this.initialBytes = [];
+ this.initialBytesLen = 0;
+
+ this.options = options || {};
+ this.iconv = codec.iconv;
+}
+
+Utf16Decoder.prototype.write = function(buf) {
+ if (!this.decoder) {
+ // Codec is not chosen yet. Accumulate initial bytes.
+ this.initialBytes.push(buf);
+ this.initialBytesLen += buf.length;
+
+ if (this.initialBytesLen < 16) // We need more bytes to use space heuristic (see below)
+ return '';
+
+ // We have enough bytes -> detect endianness.
+ var buf = Buffer.concat(this.initialBytes),
+ encoding = detectEncoding(buf, this.options.defaultEncoding);
+ this.decoder = this.iconv.getDecoder(encoding, this.options);
+ this.initialBytes.length = this.initialBytesLen = 0;
+ }
+
+ return this.decoder.write(buf);
+}
+
+Utf16Decoder.prototype.end = function() {
+ if (!this.decoder) {
+ var buf = Buffer.concat(this.initialBytes),
+ encoding = detectEncoding(buf, this.options.defaultEncoding);
+ this.decoder = this.iconv.getDecoder(encoding, this.options);
+
+ var res = this.decoder.write(buf),
+ trail = this.decoder.end();
+
+ return trail ? (res + trail) : res;
+ }
+ return this.decoder.end();
+}
+
+function detectEncoding(buf, defaultEncoding) {
+ var enc = defaultEncoding || 'utf-16le';
+
+ if (buf.length >= 2) {
+ // Check BOM.
+ if (buf[0] == 0xFE && buf[1] == 0xFF) // UTF-16BE BOM
+ enc = 'utf-16be';
+ else if (buf[0] == 0xFF && buf[1] == 0xFE) // UTF-16LE BOM
+ enc = 'utf-16le';
+ else {
+ // No BOM found. Try to deduce encoding from initial content.
+ // Most of the time, the content has ASCII chars (U+00**), but the opposite (U+**00) is uncommon.
+ // So, we count ASCII as if it was LE or BE, and decide from that.
+ var asciiCharsLE = 0, asciiCharsBE = 0, // Counts of chars in both positions
+ _len = Math.min(buf.length - (buf.length % 2), 64); // Len is always even.
+
+ for (var i = 0; i < _len; i += 2) {
+ if (buf[i] === 0 && buf[i+1] !== 0) asciiCharsBE++;
+ if (buf[i] !== 0 && buf[i+1] === 0) asciiCharsLE++;
+ }
+
+ if (asciiCharsBE > asciiCharsLE)
+ enc = 'utf-16be';
+ else if (asciiCharsBE < asciiCharsLE)
+ enc = 'utf-16le';
+ }
+ }
+
+ return enc;
+}
+
+
diff --git a/tools/node_modules/eslint/node_modules/iconv-lite/encodings/utf7.js b/tools/node_modules/eslint/node_modules/iconv-lite/encodings/utf7.js
new file mode 100644
index 0000000000..19b7194aaf
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/iconv-lite/encodings/utf7.js
@@ -0,0 +1,290 @@
+"use strict";
+var Buffer = require("buffer").Buffer;
+
+// UTF-7 codec, according to https://tools.ietf.org/html/rfc2152
+// See also below a UTF-7-IMAP codec, according to http://tools.ietf.org/html/rfc3501#section-5.1.3
+
+exports.utf7 = Utf7Codec;
+exports.unicode11utf7 = 'utf7'; // Alias UNICODE-1-1-UTF-7
+function Utf7Codec(codecOptions, iconv) {
+ this.iconv = iconv;
+};
+
+Utf7Codec.prototype.encoder = Utf7Encoder;
+Utf7Codec.prototype.decoder = Utf7Decoder;
+Utf7Codec.prototype.bomAware = true;
+
+
+// -- Encoding
+
+var nonDirectChars = /[^A-Za-z0-9'\(\),-\.\/:\? \n\r\t]+/g;
+
+function Utf7Encoder(options, codec) {
+ this.iconv = codec.iconv;
+}
+
+Utf7Encoder.prototype.write = function(str) {
+ // Naive implementation.
+ // Non-direct chars are encoded as "+<base64>-"; single "+" char is encoded as "+-".
+ return new Buffer(str.replace(nonDirectChars, function(chunk) {
+ return "+" + (chunk === '+' ? '' :
+ this.iconv.encode(chunk, 'utf16-be').toString('base64').replace(/=+$/, ''))
+ + "-";
+ }.bind(this)));
+}
+
+Utf7Encoder.prototype.end = function() {
+}
+
+
+// -- Decoding
+
+function Utf7Decoder(options, codec) {
+ this.iconv = codec.iconv;
+ this.inBase64 = false;
+ this.base64Accum = '';
+}
+
+var base64Regex = /[A-Za-z0-9\/+]/;
+var base64Chars = [];
+for (var i = 0; i < 256; i++)
+ base64Chars[i] = base64Regex.test(String.fromCharCode(i));
+
+var plusChar = '+'.charCodeAt(0),
+ minusChar = '-'.charCodeAt(0),
+ andChar = '&'.charCodeAt(0);
+
+Utf7Decoder.prototype.write = function(buf) {
+ var res = "", lastI = 0,
+ inBase64 = this.inBase64,
+ base64Accum = this.base64Accum;
+
+ // The decoder is more involved as we must handle chunks in stream.
+
+ for (var i = 0; i < buf.length; i++) {
+ if (!inBase64) { // We're in direct mode.
+ // Write direct chars until '+'
+ if (buf[i] == plusChar) {
+ res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars.
+ lastI = i+1;
+ inBase64 = true;
+ }
+ } else { // We decode base64.
+ if (!base64Chars[buf[i]]) { // Base64 ended.
+ if (i == lastI && buf[i] == minusChar) {// "+-" -> "+"
+ res += "+";
+ } else {
+ var b64str = base64Accum + buf.slice(lastI, i).toString();
+ res += this.iconv.decode(new Buffer(b64str, 'base64'), "utf16-be");
+ }
+
+ if (buf[i] != minusChar) // Minus is absorbed after base64.
+ i--;
+
+ lastI = i+1;
+ inBase64 = false;
+ base64Accum = '';
+ }
+ }
+ }
+
+ if (!inBase64) {
+ res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars.
+ } else {
+ var b64str = base64Accum + buf.slice(lastI).toString();
+
+ var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars.
+ base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future.
+ b64str = b64str.slice(0, canBeDecoded);
+
+ res += this.iconv.decode(new Buffer(b64str, 'base64'), "utf16-be");
+ }
+
+ this.inBase64 = inBase64;
+ this.base64Accum = base64Accum;
+
+ return res;
+}
+
+Utf7Decoder.prototype.end = function() {
+ var res = "";
+ if (this.inBase64 && this.base64Accum.length > 0)
+ res = this.iconv.decode(new Buffer(this.base64Accum, 'base64'), "utf16-be");
+
+ this.inBase64 = false;
+ this.base64Accum = '';
+ return res;
+}
+
+
+// UTF-7-IMAP codec.
+// RFC3501 Sec. 5.1.3 Modified UTF-7 (http://tools.ietf.org/html/rfc3501#section-5.1.3)
+// Differences:
+// * Base64 part is started by "&" instead of "+"
+// * Direct characters are 0x20-0x7E, except "&" (0x26)
+// * In Base64, "," is used instead of "/"
+// * Base64 must not be used to represent direct characters.
+// * No implicit shift back from Base64 (should always end with '-')
+// * String must end in non-shifted position.
+// * "-&" while in base64 is not allowed.
+
+
+exports.utf7imap = Utf7IMAPCodec;
+function Utf7IMAPCodec(codecOptions, iconv) {
+ this.iconv = iconv;
+};
+
+Utf7IMAPCodec.prototype.encoder = Utf7IMAPEncoder;
+Utf7IMAPCodec.prototype.decoder = Utf7IMAPDecoder;
+Utf7IMAPCodec.prototype.bomAware = true;
+
+
+// -- Encoding
+
+function Utf7IMAPEncoder(options, codec) {
+ this.iconv = codec.iconv;
+ this.inBase64 = false;
+ this.base64Accum = new Buffer(6);
+ this.base64AccumIdx = 0;
+}
+
+Utf7IMAPEncoder.prototype.write = function(str) {
+ var inBase64 = this.inBase64,
+ base64Accum = this.base64Accum,
+ base64AccumIdx = this.base64AccumIdx,
+ buf = new Buffer(str.length*5 + 10), bufIdx = 0;
+
+ for (var i = 0; i < str.length; i++) {
+ var uChar = str.charCodeAt(i);
+ if (0x20 <= uChar && uChar <= 0x7E) { // Direct character or '&'.
+ if (inBase64) {
+ if (base64AccumIdx > 0) {
+ bufIdx += buf.write(base64Accum.slice(0, base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx);
+ base64AccumIdx = 0;
+ }
+
+ buf[bufIdx++] = minusChar; // Write '-', then go to direct mode.
+ inBase64 = false;
+ }
+
+ if (!inBase64) {
+ buf[bufIdx++] = uChar; // Write direct character
+
+ if (uChar === andChar) // Ampersand -> '&-'
+ buf[bufIdx++] = minusChar;
+ }
+
+ } else { // Non-direct character
+ if (!inBase64) {
+ buf[bufIdx++] = andChar; // Write '&', then go to base64 mode.
+ inBase64 = true;
+ }
+ if (inBase64) {
+ base64Accum[base64AccumIdx++] = uChar >> 8;
+ base64Accum[base64AccumIdx++] = uChar & 0xFF;
+
+ if (base64AccumIdx == base64Accum.length) {
+ bufIdx += buf.write(base64Accum.toString('base64').replace(/\//g, ','), bufIdx);
+ base64AccumIdx = 0;
+ }
+ }
+ }
+ }
+
+ this.inBase64 = inBase64;
+ this.base64AccumIdx = base64AccumIdx;
+
+ return buf.slice(0, bufIdx);
+}
+
+Utf7IMAPEncoder.prototype.end = function() {
+ var buf = new Buffer(10), bufIdx = 0;
+ if (this.inBase64) {
+ if (this.base64AccumIdx > 0) {
+ bufIdx += buf.write(this.base64Accum.slice(0, this.base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx);
+ this.base64AccumIdx = 0;
+ }
+
+ buf[bufIdx++] = minusChar; // Write '-', then go to direct mode.
+ this.inBase64 = false;
+ }
+
+ return buf.slice(0, bufIdx);
+}
+
+
+// -- Decoding
+
+function Utf7IMAPDecoder(options, codec) {
+ this.iconv = codec.iconv;
+ this.inBase64 = false;
+ this.base64Accum = '';
+}
+
+var base64IMAPChars = base64Chars.slice();
+base64IMAPChars[','.charCodeAt(0)] = true;
+
+Utf7IMAPDecoder.prototype.write = function(buf) {
+ var res = "", lastI = 0,
+ inBase64 = this.inBase64,
+ base64Accum = this.base64Accum;
+
+ // The decoder is more involved as we must handle chunks in stream.
+ // It is forgiving, closer to standard UTF-7 (for example, '-' is optional at the end).
+
+ for (var i = 0; i < buf.length; i++) {
+ if (!inBase64) { // We're in direct mode.
+ // Write direct chars until '&'
+ if (buf[i] == andChar) {
+ res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars.
+ lastI = i+1;
+ inBase64 = true;
+ }
+ } else { // We decode base64.
+ if (!base64IMAPChars[buf[i]]) { // Base64 ended.
+ if (i == lastI && buf[i] == minusChar) { // "&-" -> "&"
+ res += "&";
+ } else {
+ var b64str = base64Accum + buf.slice(lastI, i).toString().replace(/,/g, '/');
+ res += this.iconv.decode(new Buffer(b64str, 'base64'), "utf16-be");
+ }
+
+ if (buf[i] != minusChar) // Minus may be absorbed after base64.
+ i--;
+
+ lastI = i+1;
+ inBase64 = false;
+ base64Accum = '';
+ }
+ }
+ }
+
+ if (!inBase64) {
+ res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars.
+ } else {
+ var b64str = base64Accum + buf.slice(lastI).toString().replace(/,/g, '/');
+
+ var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars.
+ base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future.
+ b64str = b64str.slice(0, canBeDecoded);
+
+ res += this.iconv.decode(new Buffer(b64str, 'base64'), "utf16-be");
+ }
+
+ this.inBase64 = inBase64;
+ this.base64Accum = base64Accum;
+
+ return res;
+}
+
+Utf7IMAPDecoder.prototype.end = function() {
+ var res = "";
+ if (this.inBase64 && this.base64Accum.length > 0)
+ res = this.iconv.decode(new Buffer(this.base64Accum, 'base64'), "utf16-be");
+
+ this.inBase64 = false;
+ this.base64Accum = '';
+ return res;
+}
+
+
diff --git a/tools/node_modules/eslint/node_modules/iconv-lite/lib/bom-handling.js b/tools/node_modules/eslint/node_modules/iconv-lite/lib/bom-handling.js
new file mode 100644
index 0000000000..1050872385
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/iconv-lite/lib/bom-handling.js
@@ -0,0 +1,52 @@
+"use strict";
+
+var BOMChar = '\uFEFF';
+
+exports.PrependBOM = PrependBOMWrapper
+function PrependBOMWrapper(encoder, options) {
+ this.encoder = encoder;
+ this.addBOM = true;
+}
+
+PrependBOMWrapper.prototype.write = function(str) {
+ if (this.addBOM) {
+ str = BOMChar + str;
+ this.addBOM = false;
+ }
+
+ return this.encoder.write(str);
+}
+
+PrependBOMWrapper.prototype.end = function() {
+ return this.encoder.end();
+}
+
+
+//------------------------------------------------------------------------------
+
+exports.StripBOM = StripBOMWrapper;
+function StripBOMWrapper(decoder, options) {
+ this.decoder = decoder;
+ this.pass = false;
+ this.options = options || {};
+}
+
+StripBOMWrapper.prototype.write = function(buf) {
+ var res = this.decoder.write(buf);
+ if (this.pass || !res)
+ return res;
+
+ if (res[0] === BOMChar) {
+ res = res.slice(1);
+ if (typeof this.options.stripBOM === 'function')
+ this.options.stripBOM();
+ }
+
+ this.pass = true;
+ return res;
+}
+
+StripBOMWrapper.prototype.end = function() {
+ return this.decoder.end();
+}
+
diff --git a/tools/node_modules/eslint/node_modules/iconv-lite/lib/extend-node.js b/tools/node_modules/eslint/node_modules/iconv-lite/lib/extend-node.js
new file mode 100644
index 0000000000..a120400be9
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/iconv-lite/lib/extend-node.js
@@ -0,0 +1,215 @@
+"use strict";
+var Buffer = require("buffer").Buffer;
+
+// == Extend Node primitives to use iconv-lite =================================
+
+module.exports = function (iconv) {
+ var original = undefined; // Place to keep original methods.
+
+ // Node authors rewrote Buffer internals to make it compatible with
+ // Uint8Array and we cannot patch key functions since then.
+ iconv.supportsNodeEncodingsExtension = !(new Buffer(0) instanceof Uint8Array);
+
+ iconv.extendNodeEncodings = function extendNodeEncodings() {
+ if (original) return;
+ original = {};
+
+ if (!iconv.supportsNodeEncodingsExtension) {
+ console.error("ACTION NEEDED: require('iconv-lite').extendNodeEncodings() is not supported in your version of Node");
+ console.error("See more info at https://github.com/ashtuchkin/iconv-lite/wiki/Node-v4-compatibility");
+ return;
+ }
+
+ var nodeNativeEncodings = {
+ 'hex': true, 'utf8': true, 'utf-8': true, 'ascii': true, 'binary': true,
+ 'base64': true, 'ucs2': true, 'ucs-2': true, 'utf16le': true, 'utf-16le': true,
+ };
+
+ Buffer.isNativeEncoding = function(enc) {
+ return enc && nodeNativeEncodings[enc.toLowerCase()];
+ }
+
+ // -- SlowBuffer -----------------------------------------------------------
+ var SlowBuffer = require('buffer').SlowBuffer;
+
+ original.SlowBufferToString = SlowBuffer.prototype.toString;
+ SlowBuffer.prototype.toString = function(encoding, start, end) {
+ encoding = String(encoding || 'utf8').toLowerCase();
+
+ // Use native conversion when possible
+ if (Buffer.isNativeEncoding(encoding))
+ return original.SlowBufferToString.call(this, encoding, start, end);
+
+ // Otherwise, use our decoding method.
+ if (typeof start == 'undefined') start = 0;
+ if (typeof end == 'undefined') end = this.length;
+ return iconv.decode(this.slice(start, end), encoding);
+ }
+
+ original.SlowBufferWrite = SlowBuffer.prototype.write;
+ SlowBuffer.prototype.write = function(string, offset, length, encoding) {
+ // Support both (string, offset, length, encoding)
+ // and the legacy (string, encoding, offset, length)
+ if (isFinite(offset)) {
+ if (!isFinite(length)) {
+ encoding = length;
+ length = undefined;
+ }
+ } else { // legacy
+ var swap = encoding;
+ encoding = offset;
+ offset = length;
+ length = swap;
+ }
+
+ offset = +offset || 0;
+ var remaining = this.length - offset;
+ if (!length) {
+ length = remaining;
+ } else {
+ length = +length;
+ if (length > remaining) {
+ length = remaining;
+ }
+ }
+ encoding = String(encoding || 'utf8').toLowerCase();
+
+ // Use native conversion when possible
+ if (Buffer.isNativeEncoding(encoding))
+ return original.SlowBufferWrite.call(this, string, offset, length, encoding);
+
+ if (string.length > 0 && (length < 0 || offset < 0))
+ throw new RangeError('attempt to write beyond buffer bounds');
+
+ // Otherwise, use our encoding method.
+ var buf = iconv.encode(string, encoding);
+ if (buf.length < length) length = buf.length;
+ buf.copy(this, offset, 0, length);
+ return length;
+ }
+
+ // -- Buffer ---------------------------------------------------------------
+
+ original.BufferIsEncoding = Buffer.isEncoding;
+ Buffer.isEncoding = function(encoding) {
+ return Buffer.isNativeEncoding(encoding) || iconv.encodingExists(encoding);
+ }
+
+ original.BufferByteLength = Buffer.byteLength;
+ Buffer.byteLength = SlowBuffer.byteLength = function(str, encoding) {
+ encoding = String(encoding || 'utf8').toLowerCase();
+
+ // Use native conversion when possible
+ if (Buffer.isNativeEncoding(encoding))
+ return original.BufferByteLength.call(this, str, encoding);
+
+ // Slow, I know, but we don't have a better way yet.
+ return iconv.encode(str, encoding).length;
+ }
+
+ original.BufferToString = Buffer.prototype.toString;
+ Buffer.prototype.toString = function(encoding, start, end) {
+ encoding = String(encoding || 'utf8').toLowerCase();
+
+ // Use native conversion when possible
+ if (Buffer.isNativeEncoding(encoding))
+ return original.BufferToString.call(this, encoding, start, end);
+
+ // Otherwise, use our decoding method.
+ if (typeof start == 'undefined') start = 0;
+ if (typeof end == 'undefined') end = this.length;
+ return iconv.decode(this.slice(start, end), encoding);
+ }
+
+ original.BufferWrite = Buffer.prototype.write;
+ Buffer.prototype.write = function(string, offset, length, encoding) {
+ var _offset = offset, _length = length, _encoding = encoding;
+ // Support both (string, offset, length, encoding)
+ // and the legacy (string, encoding, offset, length)
+ if (isFinite(offset)) {
+ if (!isFinite(length)) {
+ encoding = length;
+ length = undefined;
+ }
+ } else { // legacy
+ var swap = encoding;
+ encoding = offset;
+ offset = length;
+ length = swap;
+ }
+
+ encoding = String(encoding || 'utf8').toLowerCase();
+
+ // Use native conversion when possible
+ if (Buffer.isNativeEncoding(encoding))
+ return original.BufferWrite.call(this, string, _offset, _length, _encoding);
+
+ offset = +offset || 0;
+ var remaining = this.length - offset;
+ if (!length) {
+ length = remaining;
+ } else {
+ length = +length;
+ if (length > remaining) {
+ length = remaining;
+ }
+ }
+
+ if (string.length > 0 && (length < 0 || offset < 0))
+ throw new RangeError('attempt to write beyond buffer bounds');
+
+ // Otherwise, use our encoding method.
+ var buf = iconv.encode(string, encoding);
+ if (buf.length < length) length = buf.length;
+ buf.copy(this, offset, 0, length);
+ return length;
+
+ // TODO: Set _charsWritten.
+ }
+
+
+ // -- Readable -------------------------------------------------------------
+ if (iconv.supportsStreams) {
+ var Readable = require('stream').Readable;
+
+ original.ReadableSetEncoding = Readable.prototype.setEncoding;
+ Readable.prototype.setEncoding = function setEncoding(enc, options) {
+ // Use our own decoder, it has the same interface.
+ // We cannot use original function as it doesn't handle BOM-s.
+ this._readableState.decoder = iconv.getDecoder(enc, options);
+ this._readableState.encoding = enc;
+ }
+
+ Readable.prototype.collect = iconv._collect;
+ }
+ }
+
+ // Remove iconv-lite Node primitive extensions.
+ iconv.undoExtendNodeEncodings = function undoExtendNodeEncodings() {
+ if (!iconv.supportsNodeEncodingsExtension)
+ return;
+ if (!original)
+ throw new Error("require('iconv-lite').undoExtendNodeEncodings(): Nothing to undo; extendNodeEncodings() is not called.")
+
+ delete Buffer.isNativeEncoding;
+
+ var SlowBuffer = require('buffer').SlowBuffer;
+
+ SlowBuffer.prototype.toString = original.SlowBufferToString;
+ SlowBuffer.prototype.write = original.SlowBufferWrite;
+
+ Buffer.isEncoding = original.BufferIsEncoding;
+ Buffer.byteLength = original.BufferByteLength;
+ Buffer.prototype.toString = original.BufferToString;
+ Buffer.prototype.write = original.BufferWrite;
+
+ if (iconv.supportsStreams) {
+ var Readable = require('stream').Readable;
+
+ Readable.prototype.setEncoding = original.ReadableSetEncoding;
+ delete Readable.prototype.collect;
+ }
+
+ original = undefined;
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/iconv-lite/lib/index.d.ts b/tools/node_modules/eslint/node_modules/iconv-lite/lib/index.d.ts
new file mode 100644
index 0000000000..b9c83613ef
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/iconv-lite/lib/index.d.ts
@@ -0,0 +1,24 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License.
+ * REQUIREMENT: This definition is dependent on the @types/node definition.
+ * Install with `npm install @types/node --save-dev`
+ *--------------------------------------------------------------------------------------------*/
+
+declare module 'iconv-lite' {
+ export function decode(buffer: NodeBuffer, encoding: string, options?: Options): string;
+
+ export function encode(content: string, encoding: string, options?: Options): NodeBuffer;
+
+ export function encodingExists(encoding: string): boolean;
+
+ export function decodeStream(encoding: string, options?: Options): NodeJS.ReadWriteStream;
+
+ export function encodeStream(encoding: string, options?: Options): NodeJS.ReadWriteStream;
+}
+
+export interface Options {
+ stripBOM?: boolean;
+ addBOM?: boolean;
+ defaultEncoding?: string;
+}
diff --git a/tools/node_modules/eslint/node_modules/iconv-lite/lib/index.js b/tools/node_modules/eslint/node_modules/iconv-lite/lib/index.js
new file mode 100644
index 0000000000..9a5247212d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/iconv-lite/lib/index.js
@@ -0,0 +1,148 @@
+"use strict";
+
+// Some environments don't have global Buffer (e.g. React Native).
+// Solution would be installing npm modules "buffer" and "stream" explicitly.
+var Buffer = require("buffer").Buffer;
+
+var bomHandling = require("./bom-handling"),
+ iconv = module.exports;
+
+// All codecs and aliases are kept here, keyed by encoding name/alias.
+// They are lazy loaded in `iconv.getCodec` from `encodings/index.js`.
+iconv.encodings = null;
+
+// Characters emitted in case of error.
+iconv.defaultCharUnicode = '�';
+iconv.defaultCharSingleByte = '?';
+
+// Public API.
+iconv.encode = function encode(str, encoding, options) {
+ str = "" + (str || ""); // Ensure string.
+
+ var encoder = iconv.getEncoder(encoding, options);
+
+ var res = encoder.write(str);
+ var trail = encoder.end();
+
+ return (trail && trail.length > 0) ? Buffer.concat([res, trail]) : res;
+}
+
+iconv.decode = function decode(buf, encoding, options) {
+ if (typeof buf === 'string') {
+ if (!iconv.skipDecodeWarning) {
+ console.error('Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding');
+ iconv.skipDecodeWarning = true;
+ }
+
+ buf = new Buffer("" + (buf || ""), "binary"); // Ensure buffer.
+ }
+
+ var decoder = iconv.getDecoder(encoding, options);
+
+ var res = decoder.write(buf);
+ var trail = decoder.end();
+
+ return trail ? (res + trail) : res;
+}
+
+iconv.encodingExists = function encodingExists(enc) {
+ try {
+ iconv.getCodec(enc);
+ return true;
+ } catch (e) {
+ return false;
+ }
+}
+
+// Legacy aliases to convert functions
+iconv.toEncoding = iconv.encode;
+iconv.fromEncoding = iconv.decode;
+
+// Search for a codec in iconv.encodings. Cache codec data in iconv._codecDataCache.
+iconv._codecDataCache = {};
+iconv.getCodec = function getCodec(encoding) {
+ if (!iconv.encodings)
+ iconv.encodings = require("../encodings"); // Lazy load all encoding definitions.
+
+ // Canonicalize encoding name: strip all non-alphanumeric chars and appended year.
+ var enc = (''+encoding).toLowerCase().replace(/[^0-9a-z]|:\d{4}$/g, "");
+
+ // Traverse iconv.encodings to find actual codec.
+ var codecOptions = {};
+ while (true) {
+ var codec = iconv._codecDataCache[enc];
+ if (codec)
+ return codec;
+
+ var codecDef = iconv.encodings[enc];
+
+ switch (typeof codecDef) {
+ case "string": // Direct alias to other encoding.
+ enc = codecDef;
+ break;
+
+ case "object": // Alias with options. Can be layered.
+ for (var key in codecDef)
+ codecOptions[key] = codecDef[key];
+
+ if (!codecOptions.encodingName)
+ codecOptions.encodingName = enc;
+
+ enc = codecDef.type;
+ break;
+
+ case "function": // Codec itself.
+ if (!codecOptions.encodingName)
+ codecOptions.encodingName = enc;
+
+ // The codec function must load all tables and return object with .encoder and .decoder methods.
+ // It'll be called only once (for each different options object).
+ codec = new codecDef(codecOptions, iconv);
+
+ iconv._codecDataCache[codecOptions.encodingName] = codec; // Save it to be reused later.
+ return codec;
+
+ default:
+ throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '"+enc+"')");
+ }
+ }
+}
+
+iconv.getEncoder = function getEncoder(encoding, options) {
+ var codec = iconv.getCodec(encoding),
+ encoder = new codec.encoder(options, codec);
+
+ if (codec.bomAware && options && options.addBOM)
+ encoder = new bomHandling.PrependBOM(encoder, options);
+
+ return encoder;
+}
+
+iconv.getDecoder = function getDecoder(encoding, options) {
+ var codec = iconv.getCodec(encoding),
+ decoder = new codec.decoder(options, codec);
+
+ if (codec.bomAware && !(options && options.stripBOM === false))
+ decoder = new bomHandling.StripBOM(decoder, options);
+
+ return decoder;
+}
+
+
+// Load extensions in Node. All of them are omitted in Browserify build via 'browser' field in package.json.
+var nodeVer = typeof process !== 'undefined' && process.versions && process.versions.node;
+if (nodeVer) {
+
+ // Load streaming support in Node v0.10+
+ var nodeVerArr = nodeVer.split(".").map(Number);
+ if (nodeVerArr[0] > 0 || nodeVerArr[1] >= 10) {
+ require("./streams")(iconv);
+ }
+
+ // Load Node primitive extensions.
+ require("./extend-node")(iconv);
+}
+
+if ("Ā" != "\u0100") {
+ console.error("iconv-lite warning: javascript files use encoding different from utf-8. See https://github.com/ashtuchkin/iconv-lite/wiki/Javascript-source-file-encodings for more info.");
+}
diff --git a/tools/node_modules/eslint/node_modules/iconv-lite/lib/streams.js b/tools/node_modules/eslint/node_modules/iconv-lite/lib/streams.js
new file mode 100644
index 0000000000..4409552958
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/iconv-lite/lib/streams.js
@@ -0,0 +1,121 @@
+"use strict";
+
+var Buffer = require("buffer").Buffer,
+ Transform = require("stream").Transform;
+
+
+// == Exports ==================================================================
+module.exports = function(iconv) {
+
+ // Additional Public API.
+ iconv.encodeStream = function encodeStream(encoding, options) {
+ return new IconvLiteEncoderStream(iconv.getEncoder(encoding, options), options);
+ }
+
+ iconv.decodeStream = function decodeStream(encoding, options) {
+ return new IconvLiteDecoderStream(iconv.getDecoder(encoding, options), options);
+ }
+
+ iconv.supportsStreams = true;
+
+
+ // Not published yet.
+ iconv.IconvLiteEncoderStream = IconvLiteEncoderStream;
+ iconv.IconvLiteDecoderStream = IconvLiteDecoderStream;
+ iconv._collect = IconvLiteDecoderStream.prototype.collect;
+};
+
+
+// == Encoder stream =======================================================
+function IconvLiteEncoderStream(conv, options) {
+ this.conv = conv;
+ options = options || {};
+ options.decodeStrings = false; // We accept only strings, so we don't need to decode them.
+ Transform.call(this, options);
+}
+
+IconvLiteEncoderStream.prototype = Object.create(Transform.prototype, {
+ constructor: { value: IconvLiteEncoderStream }
+});
+
+IconvLiteEncoderStream.prototype._transform = function(chunk, encoding, done) {
+ if (typeof chunk != 'string')
+ return done(new Error("Iconv encoding stream needs strings as its input."));
+ try {
+ var res = this.conv.write(chunk);
+ if (res && res.length) this.push(res);
+ done();
+ }
+ catch (e) {
+ done(e);
+ }
+}
+
+IconvLiteEncoderStream.prototype._flush = function(done) {
+ try {
+ var res = this.conv.end();
+ if (res && res.length) this.push(res);
+ done();
+ }
+ catch (e) {
+ done(e);
+ }
+}
+
+IconvLiteEncoderStream.prototype.collect = function(cb) {
+ var chunks = [];
+ this.on('error', cb);
+ this.on('data', function(chunk) { chunks.push(chunk); });
+ this.on('end', function() {
+ cb(null, Buffer.concat(chunks));
+ });
+ return this;
+}
+
+
+// == Decoder stream =======================================================
+function IconvLiteDecoderStream(conv, options) {
+ this.conv = conv;
+ options = options || {};
+ options.encoding = this.encoding = 'utf8'; // We output strings.
+ Transform.call(this, options);
+}
+
+IconvLiteDecoderStream.prototype = Object.create(Transform.prototype, {
+ constructor: { value: IconvLiteDecoderStream }
+});
+
+IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) {
+ if (!Buffer.isBuffer(chunk))
+ return done(new Error("Iconv decoding stream needs buffers as its input."));
+ try {
+ var res = this.conv.write(chunk);
+ if (res && res.length) this.push(res, this.encoding);
+ done();
+ }
+ catch (e) {
+ done(e);
+ }
+}
+
+IconvLiteDecoderStream.prototype._flush = function(done) {
+ try {
+ var res = this.conv.end();
+ if (res && res.length) this.push(res, this.encoding);
+ done();
+ }
+ catch (e) {
+ done(e);
+ }
+}
+
+IconvLiteDecoderStream.prototype.collect = function(cb) {
+ var res = '';
+ this.on('error', cb);
+ this.on('data', function(chunk) { res += chunk; });
+ this.on('end', function() {
+ cb(null, res);
+ });
+ return this;
+}
+
diff --git a/tools/node_modules/eslint/node_modules/iconv-lite/package.json b/tools/node_modules/eslint/node_modules/iconv-lite/package.json
new file mode 100644
index 0000000000..7de5a3a97b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/iconv-lite/package.json
@@ -0,0 +1,123 @@
+{
+ "_from": "iconv-lite@^0.4.17",
+ "_id": "iconv-lite@0.4.19",
+ "_inBundle": false,
+ "_integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==",
+ "_location": "/eslint/iconv-lite",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "iconv-lite@^0.4.17",
+ "name": "iconv-lite",
+ "escapedName": "iconv-lite",
+ "rawSpec": "^0.4.17",
+ "saveSpec": null,
+ "fetchSpec": "^0.4.17"
+ },
+ "_requiredBy": [
+ "/eslint/external-editor"
+ ],
+ "_resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz",
+ "_shasum": "f7468f60135f5e5dad3399c0a81be9a1603a082b",
+ "_spec": "iconv-lite@^0.4.17",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/external-editor",
+ "author": {
+ "name": "Alexander Shtuchkin",
+ "email": "ashtuchkin@gmail.com"
+ },
+ "browser": {
+ "./extend-node": false,
+ "./streams": false
+ },
+ "bugs": {
+ "url": "https://github.com/ashtuchkin/iconv-lite/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Jinwu Zhan",
+ "url": "https://github.com/jenkinv"
+ },
+ {
+ "name": "Adamansky Anton",
+ "url": "https://github.com/adamansky"
+ },
+ {
+ "name": "George Stagas",
+ "url": "https://github.com/stagas"
+ },
+ {
+ "name": "Mike D Pilsbury",
+ "url": "https://github.com/pekim"
+ },
+ {
+ "name": "Niggler",
+ "url": "https://github.com/Niggler"
+ },
+ {
+ "name": "wychi",
+ "url": "https://github.com/wychi"
+ },
+ {
+ "name": "David Kuo",
+ "url": "https://github.com/david50407"
+ },
+ {
+ "name": "ChangZhuo Chen",
+ "url": "https://github.com/czchen"
+ },
+ {
+ "name": "Lee Treveil",
+ "url": "https://github.com/leetreveil"
+ },
+ {
+ "name": "Brian White",
+ "url": "https://github.com/mscdex"
+ },
+ {
+ "name": "Mithgol",
+ "url": "https://github.com/Mithgol"
+ },
+ {
+ "name": "Nazar Leush",
+ "url": "https://github.com/nleush"
+ }
+ ],
+ "deprecated": false,
+ "description": "Convert character encodings in pure javascript.",
+ "devDependencies": {
+ "async": "*",
+ "errto": "*",
+ "iconv": "*",
+ "istanbul": "*",
+ "mocha": "*",
+ "request": "*",
+ "semver": "*",
+ "unorm": "*"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "homepage": "https://github.com/ashtuchkin/iconv-lite",
+ "keywords": [
+ "iconv",
+ "convert",
+ "charset",
+ "icu"
+ ],
+ "license": "MIT",
+ "main": "./lib/index.js",
+ "name": "iconv-lite",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/ashtuchkin/iconv-lite.git"
+ },
+ "scripts": {
+ "coverage": "istanbul cover _mocha -- --grep .",
+ "coverage-open": "open coverage/lcov-report/index.html",
+ "test": "mocha --reporter spec --grep ."
+ },
+ "typings": "./lib/index.d.ts",
+ "version": "0.4.19"
+}
diff --git a/tools/node_modules/eslint/node_modules/ignore/README.md b/tools/node_modules/eslint/node_modules/ignore/README.md
new file mode 100755
index 0000000000..d8ec0790c7
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ignore/README.md
@@ -0,0 +1,262 @@
+<table><thead>
+ <tr>
+ <th>Linux</th>
+ <th>OS X</th>
+ <th>Windows</th>
+ <th>Coverage</th>
+ <th>Downloads</th>
+ </tr>
+</thead><tbody><tr>
+ <td colspan="2" align="center">
+ <a href="https://travis-ci.org/kaelzhang/node-ignore">
+ <img
+ src="https://travis-ci.org/kaelzhang/node-ignore.svg?branch=master"
+ alt="Build Status" /></a>
+ </td>
+ <td align="center">
+ <a href="https://ci.appveyor.com/project/kaelzhang/node-ignore">
+ <img
+ src="https://ci.appveyor.com/api/projects/status/github/kaelzhang/node-ignore?branch=master&svg=true"
+ alt="Windows Build Status" /></a>
+ </td>
+ <td align="center">
+ <a href="https://codecov.io/gh/kaelzhang/node-ignore">
+ <img
+ src="https://codecov.io/gh/kaelzhang/node-ignore/branch/master/graph/badge.svg"
+ alt="Coverage Status" /></a>
+ </td>
+ <td align="center">
+ <a href="https://www.npmjs.org/package/ignore">
+ <img
+ src="http://img.shields.io/npm/dm/ignore.svg"
+ alt="npm module downloads per month" /></a>
+ </td>
+</tr></tbody></table>
+
+# ignore
+
+`ignore` is a manager, filter and parser which implemented in pure JavaScript according to the .gitignore [spec](http://git-scm.com/docs/gitignore).
+
+Pay attention that [`minimatch`](https://www.npmjs.org/package/minimatch) does not work in the gitignore way. To filter filenames according to .gitignore file, I recommend this module.
+
+##### Tested on
+
+- Linux + Node: `0.8` - `7.x`
+- Windows + Node: `0.10` - `7.x`, node < `0.10` is not tested due to the lack of support of appveyor.
+
+Actually, `ignore` does not rely on any versions of node specially.
+
+## Table Of Main Contents
+
+- [Usage](#usage)
+- [Guide for 2.x -> 3.x](#upgrade-2x---3x)
+- [Contributing](#contributing)
+- Related Packages
+ - [`glob-gitignore`](https://www.npmjs.com/package/glob-gitignore) matches files using patterns and filters them according to gitignore rules.
+
+## Usage
+
+```js
+const ignore = require('ignore')
+const ig = ignore().add(['.abc/*', '!.abc/d/'])
+```
+
+### Filter the given paths
+
+```js
+const paths = [
+ '.abc/a.js', // filtered out
+ '.abc/d/e.js' // included
+]
+
+ig.filter(paths) // ['.abc/d/e.js']
+ig.ignores('.abc/a.js') // true
+```
+
+### As the filter function
+
+```js
+paths.filter(ig.createFilter()); // ['.abc/d/e.js']
+```
+
+### Win32 paths will be handled
+
+```js
+ig.filter(['.abc\\a.js', '.abc\\d\\e.js'])
+// if the code above runs on windows, the result will be
+// ['.abc\\d\\e.js']
+```
+
+## Why another ignore?
+
+- `ignore` is a standalone module, and is much simpler so that it could easy work with other programs, unlike [isaacs](https://npmjs.org/~isaacs)'s [fstream-ignore](https://npmjs.org/package/fstream-ignore) which must work with the modules of the fstream family.
+
+- `ignore` only contains utility methods to filter paths according to the specified ignore rules, so
+ - `ignore` never try to find out ignore rules by traversing directories or fetching from git configurations.
+ - `ignore` don't cares about sub-modules of git projects.
+
+- Exactly according to [gitignore man page](http://git-scm.com/docs/gitignore), fixes some known matching issues of fstream-ignore, such as:
+ - '`/*.js`' should only match '`a.js`', but not '`abc/a.js`'.
+ - '`**/foo`' should match '`foo`' anywhere.
+ - Prevent re-including a file if a parent directory of that file is excluded.
+ - Handle trailing whitespaces:
+ - `'a '`(one space) should not match `'a '`(two spaces).
+ - `'a \ '` matches `'a '`
+ - All test cases are verified with the result of `git check-ignore`.
+
+## Methods
+
+### .add(pattern)
+### .add(patterns)
+
+- **pattern** `String|Ignore` An ignore pattern string, or the `Ignore` instance
+- **patterns** `Array.<pattern>` Array of ignore patterns.
+
+Adds a rule or several rules to the current manager.
+
+Returns `this`
+
+Notice that a line starting with `'#'`(hash) is treated as a comment. Put a backslash (`'\'`) in front of the first hash for patterns that begin with a hash, if you want to ignore a file with a hash at the beginning of the filename.
+
+```js
+ignore().add('#abc').ignores('#abc') // false
+ignore().add('\#abc').ignores('#abc') // true
+```
+
+`pattern` could either be a line of ignore pattern or a string of multiple ignore patterns, which means we could just `ignore().add()` the content of a ignore file:
+
+```js
+ignore()
+.add(fs.readFileSync(filenameOfGitignore).toString())
+.filter(filenames)
+```
+
+`pattern` could also be an `ignore` instance, so that we could easily inherit the rules of another `Ignore` instance.
+
+### <strike>.addIgnoreFile(path)</strike>
+
+REMOVED in `3.x` for now.
+
+To upgrade `ignore@2.x` up to `3.x`, use
+
+```js
+const fs = require('fs')
+
+if (fs.existsSync(filename)) {
+ ignore().add(fs.readFileSync(filename).toString())
+}
+```
+
+instead.
+
+
+### .ignores(pathname)
+
+> new in 3.2.0
+
+Returns `Boolean` whether `pathname` should be ignored.
+
+```js
+ig.ignores('.abc/a.js') // true
+```
+
+### .filter(paths)
+
+Filters the given array of pathnames, and returns the filtered array.
+
+- **paths** `Array.<path>` The array of `pathname`s to be filtered.
+
+**NOTICE** that:
+
+- `pathname` should be a string that have been `path.join()`ed, or the return value of `path.relative()` to the current directory.
+
+```js
+// WRONG
+ig.ignores('./abc')
+
+// WRONG, for it will never happen.
+// If the gitignore rule locates at the root directory,
+// `'/abc'` should be changed to `'abc'`.
+// ```
+// path.relative('/', '/abc') -> 'abc'
+// ```
+ig.ignores('/abc')
+
+// Right
+ig.ignores('abc')
+
+// Right
+ig.ignores(path.join('./abc')) // path.join('./abc') -> 'abc'
+```
+
+- In other words, each `pathname` here should be a relative path to the directory of the git ignore rules.
+
+Suppose the dir structure is:
+
+```
+/path/to/your/repo
+ |-- a
+ | |-- a.js
+ |
+ |-- .b
+ |
+ |-- .c
+ |-- .DS_store
+```
+
+Then the `paths` might be like this:
+
+```js
+[
+ 'a/a.js'
+ '.b',
+ '.c/.DS_store'
+]
+```
+
+Usually, you could use [`glob`](http://npmjs.org/package/glob) with `option.mark = true` to fetch the structure of the current directory:
+
+```js
+const glob = require('glob')
+
+glob('**', {
+ // Adds a / character to directory matches.
+ mark: true
+}, (err, files) => {
+ if (err) {
+ return console.error(err)
+ }
+
+ let filtered = ignore().add(patterns).filter(files)
+ console.log(filtered)
+})
+```
+
+### .createFilter()
+
+Creates a filter function which could filter an array of paths with `Array.prototype.filter`.
+
+Returns `function(path)` the filter function.
+
+****
+
+## Upgrade 2.x -> 3.x
+
+- All `options` of 2.x are unnecessary and removed, so just remove them.
+- `ignore()` instance is no longer an [`EventEmitter`](nodejs.org/api/events.html), and all events are unnecessary and removed.
+- `.addIgnoreFile()` is removed, see the [.addIgnoreFile](#addignorefilepath) section for details.
+
+****
+
+## Contributing
+
+The code of `node-ignore` is based on es6 and babel, but babel and its preset is not included in the `dependencies` field of package.json, so that the installation process of test cases will not fail in older versions of node.
+
+So use `bash install.sh` to install dependencies and `bash test.sh` to run test cases in your local machine.
+
+#### Collaborators
+
+- [SamyPesse](https://github.com/SamyPesse) *Samy Pessé*
+- [azproduction](https://github.com/azproduction) *Mikhail Davydov*
+- [TrySound](https://github.com/TrySound) *Bogdan Chadkin*
+- [JanMattner](https://github.com/JanMattner) *Jan Mattner*
diff --git a/tools/node_modules/eslint/node_modules/ignore/ignore.js b/tools/node_modules/eslint/node_modules/ignore/ignore.js
new file mode 100644
index 0000000000..0c2f15e177
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ignore/ignore.js
@@ -0,0 +1,425 @@
+'use strict';
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+module.exports = function () {
+ return new IgnoreBase();
+};
+
+// A simple implementation of make-array
+function make_array(subject) {
+ return Array.isArray(subject) ? subject : [subject];
+}
+
+var REGEX_BLANK_LINE = /^\s+$/;
+var REGEX_LEADING_EXCAPED_EXCLAMATION = /^\\\!/;
+var REGEX_LEADING_EXCAPED_HASH = /^\\#/;
+var SLASH = '/';
+var KEY_IGNORE = typeof Symbol !== 'undefined' ? Symbol.for('node-ignore')
+/* istanbul ignore next */
+: 'node-ignore';
+
+var IgnoreBase = function () {
+ function IgnoreBase() {
+ _classCallCheck(this, IgnoreBase);
+
+ this._rules = [];
+ this[KEY_IGNORE] = true;
+ this._initCache();
+ }
+
+ _createClass(IgnoreBase, [{
+ key: '_initCache',
+ value: function _initCache() {
+ this._cache = {};
+ }
+
+ // @param {Array.<string>|string|Ignore} pattern
+
+ }, {
+ key: 'add',
+ value: function add(pattern) {
+ this._added = false;
+
+ if (typeof pattern === 'string') {
+ pattern = pattern.split(/\r?\n/g);
+ }
+
+ make_array(pattern).forEach(this._addPattern, this);
+
+ // Some rules have just added to the ignore,
+ // making the behavior changed.
+ if (this._added) {
+ this._initCache();
+ }
+
+ return this;
+ }
+
+ // legacy
+
+ }, {
+ key: 'addPattern',
+ value: function addPattern(pattern) {
+ return this.add(pattern);
+ }
+ }, {
+ key: '_addPattern',
+ value: function _addPattern(pattern) {
+ // #32
+ if (pattern && pattern[KEY_IGNORE]) {
+ this._rules = this._rules.concat(pattern._rules);
+ this._added = true;
+ return;
+ }
+
+ if (this._checkPattern(pattern)) {
+ var rule = this._createRule(pattern);
+ this._added = true;
+ this._rules.push(rule);
+ }
+ }
+ }, {
+ key: '_checkPattern',
+ value: function _checkPattern(pattern) {
+ // > A blank line matches no files, so it can serve as a separator for readability.
+ return pattern && typeof pattern === 'string' && !REGEX_BLANK_LINE.test(pattern)
+
+ // > A line starting with # serves as a comment.
+ && pattern.indexOf('#') !== 0;
+ }
+ }, {
+ key: 'filter',
+ value: function filter(paths) {
+ var _this = this;
+
+ return make_array(paths).filter(function (path) {
+ return _this._filter(path);
+ });
+ }
+ }, {
+ key: 'createFilter',
+ value: function createFilter() {
+ var _this2 = this;
+
+ return function (path) {
+ return _this2._filter(path);
+ };
+ }
+ }, {
+ key: 'ignores',
+ value: function ignores(path) {
+ return !this._filter(path);
+ }
+ }, {
+ key: '_createRule',
+ value: function _createRule(pattern) {
+ var origin = pattern;
+ var negative = false;
+
+ // > An optional prefix "!" which negates the pattern;
+ if (pattern.indexOf('!') === 0) {
+ negative = true;
+ pattern = pattern.substr(1);
+ }
+
+ pattern = pattern
+ // > Put a backslash ("\") in front of the first "!" for patterns that begin with a literal "!", for example, `"\!important!.txt"`.
+ .replace(REGEX_LEADING_EXCAPED_EXCLAMATION, '!')
+ // > Put a backslash ("\") in front of the first hash for patterns that begin with a hash.
+ .replace(REGEX_LEADING_EXCAPED_HASH, '#');
+
+ var regex = make_regex(pattern, negative);
+
+ return {
+ origin: origin,
+ pattern: pattern,
+ negative: negative,
+ regex: regex
+ };
+ }
+
+ // @returns `Boolean` true if the `path` is NOT ignored
+
+ }, {
+ key: '_filter',
+ value: function _filter(path, slices) {
+ if (!path) {
+ return false;
+ }
+
+ if (path in this._cache) {
+ return this._cache[path];
+ }
+
+ if (!slices) {
+ // path/to/a.js
+ // ['path', 'to', 'a.js']
+ slices = path.split(SLASH);
+ }
+
+ slices.pop();
+
+ return this._cache[path] = slices.length
+ // > It is not possible to re-include a file if a parent directory of that file is excluded.
+ // If the path contains a parent directory, check the parent first
+ ? this._filter(slices.join(SLASH) + SLASH, slices) && this._test(path)
+
+ // Or only test the path
+ : this._test(path);
+ }
+
+ // @returns {Boolean} true if a file is NOT ignored
+
+ }, {
+ key: '_test',
+ value: function _test(path) {
+ // Explicitly define variable type by setting matched to `0`
+ var matched = 0;
+
+ this._rules.forEach(function (rule) {
+ // if matched = true, then we only test negative rules
+ // if matched = false, then we test non-negative rules
+ if (!(matched ^ rule.negative)) {
+ matched = rule.negative ^ rule.regex.test(path);
+ }
+ });
+
+ return !matched;
+ }
+ }]);
+
+ return IgnoreBase;
+}();
+
+// > If the pattern ends with a slash,
+// > it is removed for the purpose of the following description,
+// > but it would only find a match with a directory.
+// > In other words, foo/ will match a directory foo and paths underneath it,
+// > but will not match a regular file or a symbolic link foo
+// > (this is consistent with the way how pathspec works in general in Git).
+// '`foo/`' will not match regular file '`foo`' or symbolic link '`foo`'
+// -> ignore-rules will not deal with it, because it costs extra `fs.stat` call
+// you could use option `mark: true` with `glob`
+
+// '`foo/`' should not continue with the '`..`'
+
+
+var DEFAULT_REPLACER_PREFIX = [
+
+// > Trailing spaces are ignored unless they are quoted with backslash ("\")
+[
+// (a\ ) -> (a )
+// (a ) -> (a)
+// (a \ ) -> (a )
+/\\?\s+$/, function (match) {
+ return match.indexOf('\\') === 0 ? ' ' : '';
+}],
+
+// replace (\ ) with ' '
+[/\\\s/g, function () {
+ return ' ';
+}],
+
+// Escape metacharacters
+// which is written down by users but means special for regular expressions.
+
+// > There are 12 characters with special meanings:
+// > - the backslash \,
+// > - the caret ^,
+// > - the dollar sign $,
+// > - the period or dot .,
+// > - the vertical bar or pipe symbol |,
+// > - the question mark ?,
+// > - the asterisk or star *,
+// > - the plus sign +,
+// > - the opening parenthesis (,
+// > - the closing parenthesis ),
+// > - and the opening square bracket [,
+// > - the opening curly brace {,
+// > These special characters are often called "metacharacters".
+[/[\\\^$.|?*+()\[{]/g, function (match) {
+ return '\\' + match;
+}],
+
+// leading slash
+[
+
+// > A leading slash matches the beginning of the pathname.
+// > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c".
+// A leading slash matches the beginning of the pathname
+/^\//, function () {
+ return '^';
+}],
+
+// replace special metacharacter slash after the leading slash
+[/\//g, function () {
+ return '\\/';
+}], [
+// > A leading "**" followed by a slash means match in all directories.
+// > For example, "**/foo" matches file or directory "foo" anywhere,
+// > the same as pattern "foo".
+// > "**/foo/bar" matches file or directory "bar" anywhere that is directly under directory "foo".
+// Notice that the '*'s have been replaced as '\\*'
+/^\^*\\\*\\\*\\\//,
+
+// '**/foo' <-> 'foo'
+function () {
+ return '^(?:.*\\/)?';
+}]];
+
+var DEFAULT_REPLACER_SUFFIX = [
+// starting
+[
+// there will be no leading '/' (which has been replaced by section "leading slash")
+// If starts with '**', adding a '^' to the regular expression also works
+/^(?=[^\^])/, function () {
+ return !/\/(?!$)/.test(this)
+ // > If the pattern does not contain a slash /, Git treats it as a shell glob pattern
+ // Actually, if there is only a trailing slash, git also treats it as a shell glob pattern
+ ? '(?:^|\\/)'
+
+ // > Otherwise, Git treats the pattern as a shell glob suitable for consumption by fnmatch(3)
+ : '^';
+}],
+
+// two globstars
+[
+// Use lookahead assertions so that we could match more than one `'/**'`
+/\\\/\\\*\\\*(?=\\\/|$)/g,
+
+// Zero, one or several directories
+// should not use '*', or it will be replaced by the next replacer
+
+// Check if it is not the last `'/**'`
+function (match, index, str) {
+ return index + 6 < str.length
+
+ // case: /**/
+ // > A slash followed by two consecutive asterisks then a slash matches zero or more directories.
+ // > For example, "a/**/b" matches "a/b", "a/x/b", "a/x/y/b" and so on.
+ // '/**/'
+ ? '(?:\\/[^\\/]+)*'
+
+ // case: /**
+ // > A trailing `"/**"` matches everything inside.
+
+ // #21: everything inside but it should not include the current folder
+ : '\\/.+';
+}],
+
+// intermediate wildcards
+[
+// Never replace escaped '*'
+// ignore rule '\*' will match the path '*'
+
+// 'abc.*/' -> go
+// 'abc.*' -> skip this rule
+/(^|[^\\]+)\\\*(?=.+)/g,
+
+// '*.js' matches '.js'
+// '*.js' doesn't match 'abc'
+function (match, p1) {
+ return p1 + '[^\\/]*';
+}],
+
+// trailing wildcard
+[/(\^|\\\/)?\\\*$/, function (match, p1) {
+ return (p1
+ // '\^':
+ // '/*' does not match ''
+ // '/*' does not match everything
+
+ // '\\\/':
+ // 'abc/*' does not match 'abc/'
+ ? p1 + '[^/]+'
+
+ // 'a*' matches 'a'
+ // 'a*' matches 'aa'
+ : '[^/]*') + '(?=$|\\/$)';
+}], [
+// unescape
+/\\\\\\/g, function () {
+ return '\\';
+}]];
+
+var POSITIVE_REPLACERS = [].concat(DEFAULT_REPLACER_PREFIX, [
+
+// 'f'
+// matches
+// - /f(end)
+// - /f/
+// - (start)f(end)
+// - (start)f/
+// doesn't match
+// - oof
+// - foo
+// pseudo:
+// -> (^|/)f(/|$)
+
+// ending
+[
+// 'js' will not match 'js.'
+// 'ab' will not match 'abc'
+/(?:[^*\/])$/,
+
+// 'js*' will not match 'a.js'
+// 'js/' will not match 'a.js'
+// 'js' will match 'a.js' and 'a.js/'
+function (match) {
+ return match + '(?=$|\\/)';
+}]], DEFAULT_REPLACER_SUFFIX);
+
+var NEGATIVE_REPLACERS = [].concat(DEFAULT_REPLACER_PREFIX, [
+
+// #24
+// The MISSING rule of [gitignore docs](https://git-scm.com/docs/gitignore)
+// A negative pattern without a trailing wildcard should not
+// re-include the things inside that directory.
+
+// eg:
+// ['node_modules/*', '!node_modules']
+// should ignore `node_modules/a.js`
+[/(?:[^*\/])$/, function (match) {
+ return match + '(?=$|\\/$)';
+}]], DEFAULT_REPLACER_SUFFIX);
+
+// A simple cache, because an ignore rule only has only one certain meaning
+var cache = {};
+
+// @param {pattern}
+function make_regex(pattern, negative) {
+ var r = cache[pattern];
+ if (r) {
+ return r;
+ }
+
+ var replacers = negative ? NEGATIVE_REPLACERS : POSITIVE_REPLACERS;
+
+ var source = replacers.reduce(function (prev, current) {
+ return prev.replace(current[0], current[1].bind(pattern));
+ }, pattern);
+
+ return cache[pattern] = new RegExp(source, 'i');
+}
+
+// Windows
+// --------------------------------------------------------------
+/* istanbul ignore if */
+if (
+// Detect `process` so that it can run in browsers.
+typeof process !== 'undefined' && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === 'win32')) {
+
+ var filter = IgnoreBase.prototype._filter;
+ var make_posix = function make_posix(str) {
+ return (/^\\\\\?\\/.test(str) || /[^\x00-\x80]+/.test(str) ? str : str.replace(/\\/g, '/')
+ );
+ };
+
+ IgnoreBase.prototype._filter = function (path, slices) {
+ path = make_posix(path);
+ return filter.call(this, path, slices);
+ };
+}
diff --git a/tools/node_modules/eslint/node_modules/ignore/index.d.ts b/tools/node_modules/eslint/node_modules/ignore/index.d.ts
new file mode 100644
index 0000000000..38cde09a77
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ignore/index.d.ts
@@ -0,0 +1,41 @@
+interface Ignore {
+ /**
+ * Adds a rule rules to the current manager.
+ * @param {string | Ignore} pattern
+ * @returns IgnoreBase
+ */
+ add(pattern: string | Ignore): Ignore
+ /**
+ * Adds several rules to the current manager.
+ * @param {string[]} patterns
+ * @returns IgnoreBase
+ */
+ add(patterns: (string | Ignore)[]): Ignore
+
+ /**
+ * Filters the given array of pathnames, and returns the filtered array.
+ * NOTICE that each path here should be a relative path to the root of your repository.
+ * @param {string[]} paths the array of paths to be filtered.
+ * @returns IgnoreBase
+ */
+ filter(paths: string[]): Ignore
+ /**
+ * Creates a filter function which could filter
+ * an array of paths with Array.prototype.filter.
+ */
+ createFilter(): (path: string) => Ignore
+
+ /**
+ * Returns Boolean whether pathname should be ignored.
+ * @param {string} pathname a path to check
+ * @returns boolean
+ */
+ ignores(pathname: string): boolean
+}
+
+/**
+ * Creates new ignore manager.
+ */
+declare function ignore(): Ignore
+
+export = ignore
diff --git a/tools/node_modules/eslint/node_modules/ignore/package.json b/tools/node_modules/eslint/node_modules/ignore/package.json
new file mode 100644
index 0000000000..f9d90fac8a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ignore/package.json
@@ -0,0 +1,82 @@
+{
+ "_from": "ignore@^3.3.3",
+ "_id": "ignore@3.3.7",
+ "_inBundle": false,
+ "_integrity": "sha512-YGG3ejvBNHRqu0559EOxxNFihD0AjpvHlC/pdGKd3X3ofe+CoJkYazwNJYTNebqpPKN+VVQbh4ZFn1DivMNuHA==",
+ "_location": "/eslint/ignore",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "ignore@^3.3.3",
+ "name": "ignore",
+ "escapedName": "ignore",
+ "rawSpec": "^3.3.3",
+ "saveSpec": null,
+ "fetchSpec": "^3.3.3"
+ },
+ "_requiredBy": [
+ "/eslint"
+ ],
+ "_resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.7.tgz",
+ "_shasum": "612289bfb3c220e186a58118618d5be8c1bab021",
+ "_spec": "ignore@^3.3.3",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint",
+ "author": {
+ "name": "kael"
+ },
+ "bugs": {
+ "url": "https://github.com/kaelzhang/node-ignore/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Ignore is a manager and filter for .gitignore rules.",
+ "devDependencies": {
+ "babel-cli": "^6.26.0",
+ "babel-preset-es2015": "^6.24.1",
+ "chai": "~1.7.2",
+ "codecov": "^1.0.1",
+ "istanbul": "^0.4.5",
+ "mkdirp": "^0.5.1",
+ "mocha": "~1.13.0",
+ "pre-suf": "^1.0.4",
+ "rimraf": "^2.6.2",
+ "spawn-sync": "^1.0.15",
+ "tmp": "0.0.33"
+ },
+ "files": [
+ "ignore.js",
+ "index.d.ts"
+ ],
+ "homepage": "https://github.com/kaelzhang/node-ignore#readme",
+ "keywords": [
+ "ignore",
+ ".gitignore",
+ "gitignore",
+ "npmignore",
+ "rules",
+ "manager",
+ "filter",
+ "regexp",
+ "regex",
+ "fnmatch",
+ "glob",
+ "asterisks",
+ "regular-expression"
+ ],
+ "license": "MIT",
+ "main": "./ignore.js",
+ "name": "ignore",
+ "repository": {
+ "type": "git",
+ "url": "git+ssh://git@github.com/kaelzhang/node-ignore.git"
+ },
+ "scripts": {
+ "build": "babel -o ignore.js index.js",
+ "cov-report": "istanbul report",
+ "prepublish": "npm run build",
+ "test": "npm run build && istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec ./test/ignore.js && codecov",
+ "test-no-cov": "npm run build && mocha --reporter spec ./test/ignore.js"
+ },
+ "version": "3.3.7"
+}
diff --git a/tools/node_modules/eslint/node_modules/imurmurhash/README.md b/tools/node_modules/eslint/node_modules/imurmurhash/README.md
new file mode 100644
index 0000000000..f35b20a0ef
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/imurmurhash/README.md
@@ -0,0 +1,122 @@
+iMurmurHash.js
+==============
+
+An incremental implementation of the MurmurHash3 (32-bit) hashing algorithm for JavaScript based on [Gary Court's implementation](https://github.com/garycourt/murmurhash-js) with [kazuyukitanimura's modifications](https://github.com/kazuyukitanimura/murmurhash-js).
+
+This version works significantly faster than the non-incremental version if you need to hash many small strings into a single hash, since string concatenation (to build the single string to pass the non-incremental version) is fairly costly. In one case tested, using the incremental version was about 50% faster than concatenating 5-10 strings and then hashing.
+
+Installation
+------------
+
+To use iMurmurHash in the browser, [download the latest version](https://raw.github.com/jensyt/imurmurhash-js/master/imurmurhash.min.js) and include it as a script on your site.
+
+```html
+<script type="text/javascript" src="/scripts/imurmurhash.min.js"></script>
+<script>
+// Your code here, access iMurmurHash using the global object MurmurHash3
+</script>
+```
+
+---
+
+To use iMurmurHash in Node.js, install the module using NPM:
+
+```bash
+npm install imurmurhash
+```
+
+Then simply include it in your scripts:
+
+```javascript
+MurmurHash3 = require('imurmurhash');
+```
+
+Quick Example
+-------------
+
+```javascript
+// Create the initial hash
+var hashState = MurmurHash3('string');
+
+// Incrementally add text
+hashState.hash('more strings');
+hashState.hash('even more strings');
+
+// All calls can be chained if desired
+hashState.hash('and').hash('some').hash('more');
+
+// Get a result
+hashState.result();
+// returns 0xe4ccfe6b
+```
+
+Functions
+---------
+
+### MurmurHash3 ([string], [seed])
+Get a hash state object, optionally initialized with the given _string_ and _seed_. _Seed_ must be a positive integer if provided. Calling this function without the `new` keyword will return a cached state object that has been reset. This is safe to use as long as the object is only used from a single thread and no other hashes are created while operating on this one. If this constraint cannot be met, you can use `new` to create a new state object. For example:
+
+```javascript
+// Use the cached object, calling the function again will return the same
+// object (but reset, so the current state would be lost)
+hashState = MurmurHash3();
+...
+
+// Create a new object that can be safely used however you wish. Calling the
+// function again will simply return a new state object, and no state loss
+// will occur, at the cost of creating more objects.
+hashState = new MurmurHash3();
+```
+
+Both methods can be mixed however you like if you have different use cases.
+
+---
+
+### MurmurHash3.prototype.hash (string)
+Incrementally add _string_ to the hash. This can be called as many times as you want for the hash state object, including after a call to `result()`. Returns `this` so calls can be chained.
+
+---
+
+### MurmurHash3.prototype.result ()
+Get the result of the hash as a 32-bit positive integer. This performs the tail and finalizer portions of the algorithm, but does not store the result in the state object. This means that it is perfectly safe to get results and then continue adding strings via `hash`.
+
+```javascript
+// Do the whole string at once
+MurmurHash3('this is a test string').result();
+// 0x70529328
+
+// Do part of the string, get a result, then the other part
+var m = MurmurHash3('this is a');
+m.result();
+// 0xbfc4f834
+m.hash(' test string').result();
+// 0x70529328 (same as above)
+```
+
+---
+
+### MurmurHash3.prototype.reset ([seed])
+Reset the state object for reuse, optionally using the given _seed_ (defaults to 0 like the constructor). Returns `this` so calls can be chained.
+
+---
+
+License (MIT)
+-------------
+Copyright (c) 2013 Gary Court, Jens Taylor
+
+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/tools/node_modules/eslint/node_modules/imurmurhash/imurmurhash.js b/tools/node_modules/eslint/node_modules/imurmurhash/imurmurhash.js
new file mode 100644
index 0000000000..e63146a2b7
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/imurmurhash/imurmurhash.js
@@ -0,0 +1,138 @@
+/**
+ * @preserve
+ * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013)
+ *
+ * @author <a href="mailto:jensyt@gmail.com">Jens Taylor</a>
+ * @see http://github.com/homebrewing/brauhaus-diff
+ * @author <a href="mailto:gary.court@gmail.com">Gary Court</a>
+ * @see http://github.com/garycourt/murmurhash-js
+ * @author <a href="mailto:aappleby@gmail.com">Austin Appleby</a>
+ * @see http://sites.google.com/site/murmurhash/
+ */
+(function(){
+ var cache;
+
+ // Call this function without `new` to use the cached object (good for
+ // single-threaded environments), or with `new` to create a new object.
+ //
+ // @param {string} key A UTF-16 or ASCII string
+ // @param {number} seed An optional positive integer
+ // @return {object} A MurmurHash3 object for incremental hashing
+ function MurmurHash3(key, seed) {
+ var m = this instanceof MurmurHash3 ? this : cache;
+ m.reset(seed)
+ if (typeof key === 'string' && key.length > 0) {
+ m.hash(key);
+ }
+
+ if (m !== this) {
+ return m;
+ }
+ };
+
+ // Incrementally add a string to this hash
+ //
+ // @param {string} key A UTF-16 or ASCII string
+ // @return {object} this
+ MurmurHash3.prototype.hash = function(key) {
+ var h1, k1, i, top, len;
+
+ len = key.length;
+ this.len += len;
+
+ k1 = this.k1;
+ i = 0;
+ switch (this.rem) {
+ case 0: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) : 0;
+ case 1: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) << 8 : 0;
+ case 2: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) << 16 : 0;
+ case 3:
+ k1 ^= len > i ? (key.charCodeAt(i) & 0xff) << 24 : 0;
+ k1 ^= len > i ? (key.charCodeAt(i++) & 0xff00) >> 8 : 0;
+ }
+
+ this.rem = (len + this.rem) & 3; // & 3 is same as % 4
+ len -= this.rem;
+ if (len > 0) {
+ h1 = this.h1;
+ while (1) {
+ k1 = (k1 * 0x2d51 + (k1 & 0xffff) * 0xcc9e0000) & 0xffffffff;
+ k1 = (k1 << 15) | (k1 >>> 17);
+ k1 = (k1 * 0x3593 + (k1 & 0xffff) * 0x1b870000) & 0xffffffff;
+
+ h1 ^= k1;
+ h1 = (h1 << 13) | (h1 >>> 19);
+ h1 = (h1 * 5 + 0xe6546b64) & 0xffffffff;
+
+ if (i >= len) {
+ break;
+ }
+
+ k1 = ((key.charCodeAt(i++) & 0xffff)) ^
+ ((key.charCodeAt(i++) & 0xffff) << 8) ^
+ ((key.charCodeAt(i++) & 0xffff) << 16);
+ top = key.charCodeAt(i++);
+ k1 ^= ((top & 0xff) << 24) ^
+ ((top & 0xff00) >> 8);
+ }
+
+ k1 = 0;
+ switch (this.rem) {
+ case 3: k1 ^= (key.charCodeAt(i + 2) & 0xffff) << 16;
+ case 2: k1 ^= (key.charCodeAt(i + 1) & 0xffff) << 8;
+ case 1: k1 ^= (key.charCodeAt(i) & 0xffff);
+ }
+
+ this.h1 = h1;
+ }
+
+ this.k1 = k1;
+ return this;
+ };
+
+ // Get the result of this hash
+ //
+ // @return {number} The 32-bit hash
+ MurmurHash3.prototype.result = function() {
+ var k1, h1;
+
+ k1 = this.k1;
+ h1 = this.h1;
+
+ if (k1 > 0) {
+ k1 = (k1 * 0x2d51 + (k1 & 0xffff) * 0xcc9e0000) & 0xffffffff;
+ k1 = (k1 << 15) | (k1 >>> 17);
+ k1 = (k1 * 0x3593 + (k1 & 0xffff) * 0x1b870000) & 0xffffffff;
+ h1 ^= k1;
+ }
+
+ h1 ^= this.len;
+
+ h1 ^= h1 >>> 16;
+ h1 = (h1 * 0xca6b + (h1 & 0xffff) * 0x85eb0000) & 0xffffffff;
+ h1 ^= h1 >>> 13;
+ h1 = (h1 * 0xae35 + (h1 & 0xffff) * 0xc2b20000) & 0xffffffff;
+ h1 ^= h1 >>> 16;
+
+ return h1 >>> 0;
+ };
+
+ // Reset the hash object for reuse
+ //
+ // @param {number} seed An optional positive integer
+ MurmurHash3.prototype.reset = function(seed) {
+ this.h1 = typeof seed === 'number' ? seed : 0;
+ this.rem = this.k1 = this.len = 0;
+ return this;
+ };
+
+ // A cached object to use. This can be safely used if you're in a single-
+ // threaded environment, otherwise you need to create new hashes to use.
+ cache = new MurmurHash3();
+
+ if (typeof(module) != 'undefined') {
+ module.exports = MurmurHash3;
+ } else {
+ this.MurmurHash3 = MurmurHash3;
+ }
+}());
diff --git a/tools/node_modules/eslint/node_modules/imurmurhash/imurmurhash.min.js b/tools/node_modules/eslint/node_modules/imurmurhash/imurmurhash.min.js
new file mode 100644
index 0000000000..dc0ee88d6b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/imurmurhash/imurmurhash.min.js
@@ -0,0 +1,12 @@
+/**
+ * @preserve
+ * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013)
+ *
+ * @author <a href="mailto:jensyt@gmail.com">Jens Taylor</a>
+ * @see http://github.com/homebrewing/brauhaus-diff
+ * @author <a href="mailto:gary.court@gmail.com">Gary Court</a>
+ * @see http://github.com/garycourt/murmurhash-js
+ * @author <a href="mailto:aappleby@gmail.com">Austin Appleby</a>
+ * @see http://sites.google.com/site/murmurhash/
+ */
+!function(){function t(h,r){var s=this instanceof t?this:e;return s.reset(r),"string"==typeof h&&h.length>0&&s.hash(h),s!==this?s:void 0}var e;t.prototype.hash=function(t){var e,h,r,s,i;switch(i=t.length,this.len+=i,h=this.k1,r=0,this.rem){case 0:h^=i>r?65535&t.charCodeAt(r++):0;case 1:h^=i>r?(65535&t.charCodeAt(r++))<<8:0;case 2:h^=i>r?(65535&t.charCodeAt(r++))<<16:0;case 3:h^=i>r?(255&t.charCodeAt(r))<<24:0,h^=i>r?(65280&t.charCodeAt(r++))>>8:0}if(this.rem=3&i+this.rem,i-=this.rem,i>0){for(e=this.h1;;){if(h=4294967295&11601*h+3432906752*(65535&h),h=h<<15|h>>>17,h=4294967295&13715*h+461832192*(65535&h),e^=h,e=e<<13|e>>>19,e=4294967295&5*e+3864292196,r>=i)break;h=65535&t.charCodeAt(r++)^(65535&t.charCodeAt(r++))<<8^(65535&t.charCodeAt(r++))<<16,s=t.charCodeAt(r++),h^=(255&s)<<24^(65280&s)>>8}switch(h=0,this.rem){case 3:h^=(65535&t.charCodeAt(r+2))<<16;case 2:h^=(65535&t.charCodeAt(r+1))<<8;case 1:h^=65535&t.charCodeAt(r)}this.h1=e}return this.k1=h,this},t.prototype.result=function(){var t,e;return t=this.k1,e=this.h1,t>0&&(t=4294967295&11601*t+3432906752*(65535&t),t=t<<15|t>>>17,t=4294967295&13715*t+461832192*(65535&t),e^=t),e^=this.len,e^=e>>>16,e=4294967295&51819*e+2246770688*(65535&e),e^=e>>>13,e=4294967295&44597*e+3266445312*(65535&e),e^=e>>>16,e>>>0},t.prototype.reset=function(t){return this.h1="number"==typeof t?t:0,this.rem=this.k1=this.len=0,this},e=new t,"undefined"!=typeof module?module.exports=t:this.MurmurHash3=t}(); \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/imurmurhash/package.json b/tools/node_modules/eslint/node_modules/imurmurhash/package.json
new file mode 100644
index 0000000000..06c14f0353
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/imurmurhash/package.json
@@ -0,0 +1,63 @@
+{
+ "_from": "imurmurhash@^0.1.4",
+ "_id": "imurmurhash@0.1.4",
+ "_inBundle": false,
+ "_integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=",
+ "_location": "/eslint/imurmurhash",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "imurmurhash@^0.1.4",
+ "name": "imurmurhash",
+ "escapedName": "imurmurhash",
+ "rawSpec": "^0.1.4",
+ "saveSpec": null,
+ "fetchSpec": "^0.1.4"
+ },
+ "_requiredBy": [
+ "/eslint"
+ ],
+ "_resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
+ "_shasum": "9218b9b2b928a238b13dc4fb6b6d576f231453ea",
+ "_spec": "imurmurhash@^0.1.4",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint",
+ "author": {
+ "name": "Jens Taylor",
+ "email": "jensyt@gmail.com",
+ "url": "https://github.com/homebrewing"
+ },
+ "bugs": {
+ "url": "https://github.com/jensyt/imurmurhash-js/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "An incremental implementation of MurmurHash3",
+ "devDependencies": {},
+ "engines": {
+ "node": ">=0.8.19"
+ },
+ "files": [
+ "imurmurhash.js",
+ "imurmurhash.min.js",
+ "package.json",
+ "README.md"
+ ],
+ "homepage": "https://github.com/jensyt/imurmurhash-js",
+ "keywords": [
+ "murmur",
+ "murmurhash",
+ "murmurhash3",
+ "hash",
+ "incremental"
+ ],
+ "license": "MIT",
+ "main": "imurmurhash.js",
+ "name": "imurmurhash",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jensyt/imurmurhash-js.git"
+ },
+ "version": "0.1.4"
+}
diff --git a/tools/node_modules/eslint/node_modules/inflight/LICENSE b/tools/node_modules/eslint/node_modules/inflight/LICENSE
new file mode 100644
index 0000000000..05eeeb88c2
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/inflight/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter
+
+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/tools/node_modules/eslint/node_modules/inflight/README.md b/tools/node_modules/eslint/node_modules/inflight/README.md
new file mode 100644
index 0000000000..6dc8929171
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/inflight/README.md
@@ -0,0 +1,37 @@
+# inflight
+
+Add callbacks to requests in flight to avoid async duplication
+
+## USAGE
+
+```javascript
+var inflight = require('inflight')
+
+// some request that does some stuff
+function req(key, callback) {
+ // key is any random string. like a url or filename or whatever.
+ //
+ // will return either a falsey value, indicating that the
+ // request for this key is already in flight, or a new callback
+ // which when called will call all callbacks passed to inflightk
+ // with the same key
+ callback = inflight(key, callback)
+
+ // If we got a falsey value back, then there's already a req going
+ if (!callback) return
+
+ // this is where you'd fetch the url or whatever
+ // callback is also once()-ified, so it can safely be assigned
+ // to multiple events etc. First call wins.
+ setTimeout(function() {
+ callback(null, key)
+ }, 100)
+}
+
+// only assigns a single setTimeout
+// when it dings, all cbs get called
+req('foo', cb1)
+req('foo', cb2)
+req('foo', cb3)
+req('foo', cb4)
+```
diff --git a/tools/node_modules/eslint/node_modules/inflight/inflight.js b/tools/node_modules/eslint/node_modules/inflight/inflight.js
new file mode 100644
index 0000000000..48202b3ca4
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/inflight/inflight.js
@@ -0,0 +1,54 @@
+var wrappy = require('wrappy')
+var reqs = Object.create(null)
+var once = require('once')
+
+module.exports = wrappy(inflight)
+
+function inflight (key, cb) {
+ if (reqs[key]) {
+ reqs[key].push(cb)
+ return null
+ } else {
+ reqs[key] = [cb]
+ return makeres(key)
+ }
+}
+
+function makeres (key) {
+ return once(function RES () {
+ var cbs = reqs[key]
+ var len = cbs.length
+ var args = slice(arguments)
+
+ // XXX It's somewhat ambiguous whether a new callback added in this
+ // pass should be queued for later execution if something in the
+ // list of callbacks throws, or if it should just be discarded.
+ // However, it's such an edge case that it hardly matters, and either
+ // choice is likely as surprising as the other.
+ // As it happens, we do go ahead and schedule it for later execution.
+ try {
+ for (var i = 0; i < len; i++) {
+ cbs[i].apply(null, args)
+ }
+ } finally {
+ if (cbs.length > len) {
+ // added more in the interim.
+ // de-zalgo, just in case, but don't call again.
+ cbs.splice(0, len)
+ process.nextTick(function () {
+ RES.apply(null, args)
+ })
+ } else {
+ delete reqs[key]
+ }
+ }
+ })
+}
+
+function slice (args) {
+ var length = args.length
+ var array = []
+
+ for (var i = 0; i < length; i++) array[i] = args[i]
+ return array
+}
diff --git a/tools/node_modules/eslint/node_modules/inflight/package.json b/tools/node_modules/eslint/node_modules/inflight/package.json
new file mode 100644
index 0000000000..99287f1b4c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/inflight/package.json
@@ -0,0 +1,58 @@
+{
+ "_from": "inflight@^1.0.4",
+ "_id": "inflight@1.0.6",
+ "_inBundle": false,
+ "_integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
+ "_location": "/eslint/inflight",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "inflight@^1.0.4",
+ "name": "inflight",
+ "escapedName": "inflight",
+ "rawSpec": "^1.0.4",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.4"
+ },
+ "_requiredBy": [
+ "/eslint/glob"
+ ],
+ "_resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+ "_shasum": "49bd6331d7d02d0c09bc910a1075ba8165b56df9",
+ "_spec": "inflight@^1.0.4",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/glob",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "bugs": {
+ "url": "https://github.com/isaacs/inflight/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "once": "^1.3.0",
+ "wrappy": "1"
+ },
+ "deprecated": false,
+ "description": "Add callbacks to requests in flight to avoid async duplication",
+ "devDependencies": {
+ "tap": "^7.1.2"
+ },
+ "files": [
+ "inflight.js"
+ ],
+ "homepage": "https://github.com/isaacs/inflight",
+ "license": "ISC",
+ "main": "inflight.js",
+ "name": "inflight",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/npm/inflight.git"
+ },
+ "scripts": {
+ "test": "tap test.js --100"
+ },
+ "version": "1.0.6"
+}
diff --git a/tools/node_modules/eslint/node_modules/inherits/LICENSE b/tools/node_modules/eslint/node_modules/inherits/LICENSE
new file mode 100644
index 0000000000..dea3013d67
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/inherits/LICENSE
@@ -0,0 +1,16 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter
+
+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/tools/node_modules/eslint/node_modules/inherits/README.md b/tools/node_modules/eslint/node_modules/inherits/README.md
new file mode 100644
index 0000000000..b1c5665855
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/inherits/README.md
@@ -0,0 +1,42 @@
+Browser-friendly inheritance fully compatible with standard node.js
+[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor).
+
+This package exports standard `inherits` from node.js `util` module in
+node environment, but also provides alternative browser-friendly
+implementation through [browser
+field](https://gist.github.com/shtylman/4339901). Alternative
+implementation is a literal copy of standard one located in standalone
+module to avoid requiring of `util`. It also has a shim for old
+browsers with no `Object.create` support.
+
+While keeping you sure you are using standard `inherits`
+implementation in node.js environment, it allows bundlers such as
+[browserify](https://github.com/substack/node-browserify) to not
+include full `util` package to your client code if all you need is
+just `inherits` function. It worth, because browser shim for `util`
+package is large and `inherits` is often the single function you need
+from it.
+
+It's recommended to use this package instead of
+`require('util').inherits` for any code that has chances to be used
+not only in node.js but in browser too.
+
+## usage
+
+```js
+var inherits = require('inherits');
+// then use exactly as the standard one
+```
+
+## note on version ~1.0
+
+Version ~1.0 had completely different motivation and is not compatible
+neither with 2.0 nor with standard node.js `inherits`.
+
+If you are using version ~1.0 and planning to switch to ~2.0, be
+careful:
+
+* new version uses `super_` instead of `super` for referencing
+ superclass
+* new version overwrites current prototype while old one preserves any
+ existing fields on it
diff --git a/tools/node_modules/eslint/node_modules/inherits/inherits.js b/tools/node_modules/eslint/node_modules/inherits/inherits.js
new file mode 100644
index 0000000000..3b94763a76
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/inherits/inherits.js
@@ -0,0 +1,7 @@
+try {
+ var util = require('util');
+ if (typeof util.inherits !== 'function') throw '';
+ module.exports = util.inherits;
+} catch (e) {
+ module.exports = require('./inherits_browser.js');
+}
diff --git a/tools/node_modules/eslint/node_modules/inherits/inherits_browser.js b/tools/node_modules/eslint/node_modules/inherits/inherits_browser.js
new file mode 100644
index 0000000000..c1e78a75e6
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/inherits/inherits_browser.js
@@ -0,0 +1,23 @@
+if (typeof Object.create === 'function') {
+ // implementation from standard node.js 'util' module
+ module.exports = function inherits(ctor, superCtor) {
+ ctor.super_ = superCtor
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+ };
+} else {
+ // old school shim for old browsers
+ module.exports = function inherits(ctor, superCtor) {
+ ctor.super_ = superCtor
+ var TempCtor = function () {}
+ TempCtor.prototype = superCtor.prototype
+ ctor.prototype = new TempCtor()
+ ctor.prototype.constructor = ctor
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/inherits/package.json b/tools/node_modules/eslint/node_modules/inherits/package.json
new file mode 100644
index 0000000000..e9ab7569ab
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/inherits/package.json
@@ -0,0 +1,63 @@
+{
+ "_from": "inherits@^2.0.3",
+ "_id": "inherits@2.0.3",
+ "_inBundle": false,
+ "_integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
+ "_location": "/eslint/inherits",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "inherits@^2.0.3",
+ "name": "inherits",
+ "escapedName": "inherits",
+ "rawSpec": "^2.0.3",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.3"
+ },
+ "_requiredBy": [
+ "/eslint/concat-stream",
+ "/eslint/glob",
+ "/eslint/readable-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
+ "_shasum": "633c2c83e3da42a502f52466022480f4208261de",
+ "_spec": "inherits@^2.0.3",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/concat-stream",
+ "browser": "./inherits_browser.js",
+ "bugs": {
+ "url": "https://github.com/isaacs/inherits/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()",
+ "devDependencies": {
+ "tap": "^7.1.0"
+ },
+ "files": [
+ "inherits.js",
+ "inherits_browser.js"
+ ],
+ "homepage": "https://github.com/isaacs/inherits#readme",
+ "keywords": [
+ "inheritance",
+ "class",
+ "klass",
+ "oop",
+ "object-oriented",
+ "inherits",
+ "browser",
+ "browserify"
+ ],
+ "license": "ISC",
+ "main": "./inherits.js",
+ "name": "inherits",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/inherits.git"
+ },
+ "scripts": {
+ "test": "node test"
+ },
+ "version": "2.0.3"
+}
diff --git a/tools/node_modules/eslint/node_modules/inquirer/README.md b/tools/node_modules/eslint/node_modules/inquirer/README.md
new file mode 100644
index 0000000000..56f65b5cb6
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/inquirer/README.md
@@ -0,0 +1,386 @@
+Inquirer.js
+===========
+
+[![npm](https://badge.fury.io/js/inquirer.svg)](http://badge.fury.io/js/inquirer) [![tests](https://travis-ci.org/SBoudrias/Inquirer.js.svg?branch=master)](http://travis-ci.org/SBoudrias/Inquirer.js) [![Coverage Status](https://coveralls.io/repos/yeoman/generator/badge.svg)](https://coveralls.io/r/SBoudrias/Inquirer.js) [![dependencies](https://david-dm.org/SBoudrias/Inquirer.js.svg?theme=shields.io)](https://david-dm.org/SBoudrias/Inquirer.js)
+
+A collection of common interactive command line user interfaces.
+
+## Table of Contents
+
+ 1. [Documentation](#documentation)
+ 1. [Installation](#installation)
+ 2. [Examples](#examples)
+ 3. [Methods](#methods)
+ 4. [Objects](#objects)
+ 1. [Questions](#questions)
+ 2. [Answers](#answers)
+ 3. [Separator](#separator)
+ 4. [Prompt Types](#prompt)
+ 2. [User Interfaces and Layouts](#layouts)
+ 1. [Reactive Interface](#reactive)
+ 3. [Support](#support)
+ 4. [News](#news)
+ 5. [Contributing](#contributing)
+ 6. [License](#license)
+ 7. [Plugins](#plugins)
+
+
+## Goal and Philosophy
+
+<img align="right" alt="Inquirer Logo" src="/assets/inquirer_readme.png" title="Inquirer.js"/>
+
+**`Inquirer.js`** strives to be an easily embeddable and beautiful command line interface for [Node.js](https://nodejs.org/) (and perhaps the "CLI [Xanadu](https://en.wikipedia.org/wiki/Citizen_Kane)").
+
+**`Inquirer.js`** should ease the process of
+- providing *error feedback*
+- *asking questions*
+- *parsing* input
+- *validating* answers
+- managing *hierarchical prompts*
+
+> **Note:** **`Inquirer.js`** provides the user interface and the inquiry session flow. If you're searching for a full blown command line program utility, then check out [commander](https://github.com/visionmedia/commander.js), [vorpal](https://github.com/dthree/vorpal) or [args](https://github.com/leo/args).
+
+
+## [Documentation](#documentation)
+<a name="documentation"></a>
+
+### Installation
+<a name="installation"></a>
+
+``` shell
+npm install inquirer
+```
+
+```javascript
+var inquirer = require('inquirer');
+inquirer.prompt([/* Pass your questions in here */]).then(function (answers) {
+ // Use user feedback for... whatever!!
+});
+```
+
+<a name="examples"></a>
+### Examples (Run it and see it)
+Check out the `examples/` folder for code and interface examples.
+
+``` shell
+node examples/pizza.js
+node examples/checkbox.js
+# etc...
+```
+
+
+### Methods
+<a name="methods"></a>
+#### `inquirer.prompt(questions) -> promise`
+
+Launch the prompt interface (inquiry session)
+
+- **questions** (Array) containing [Question Object](#question) (using the [reactive interface](#reactive-interface), you can also pass a `Rx.Observable` instance)
+- returns a **Promise**
+
+#### `inquirer.registerPrompt(name, prompt)`
+
+Register prompt plugins under `name`.
+
+- **name** (string) name of the this new prompt. (used for question `type`)
+- **prompt** (object) the prompt object itself (the plugin)
+
+#### `inquirer.createPromptModule() -> prompt function`
+
+Create a self contained inquirer module. If you don't want to affect other libraries that also rely on inquirer when you overwrite or add new prompt types.
+
+```js
+var prompt = inquirer.createPromptModule();
+
+prompt(questions).then(/* ... */);
+```
+
+### Objects
+<a name="objects"></a>
+
+#### Question
+<a name="questions"></a>
+A question object is a `hash` containing question related values:
+
+- **type**: (String) Type of the prompt. Defaults: `input` - Possible values: `input`, `confirm`,
+`list`, `rawlist`, `expand`, `checkbox`, `password`, `editor`
+- **name**: (String) The name to use when storing the answer in the answers hash. If the name contains periods, it will define a path in the answers hash.
+- **message**: (String|Function) The question to print. If defined as a function, the first parameter will be the current inquirer session answers.
+- **default**: (String|Number|Array|Function) Default value(s) to use if nothing is entered, or a function that returns the default value(s). If defined as a function, the first parameter will be the current inquirer session answers.
+- **choices**: (Array|Function) Choices array or a function returning a choices array. If defined as a function, the first parameter will be the current inquirer session answers.
+Array values can be simple `strings`, or `objects` containing a `name` (to display in list), a `value` (to save in the answers hash) and a `short` (to display after selection) properties. The choices array can also contain [a `Separator`](#separator).
+- **validate**: (Function) Receive the user input and answers hash. Should return `true` if the value is valid, and an error message (`String`) otherwise. If `false` is returned, a default error message is provided.
+- **filter**: (Function) Receive the user input and return the filtered value to be used inside the program. The value returned will be added to the _Answers_ hash.
+- **when**: (Function, Boolean) Receive the current user answers hash and should return `true` or `false` depending on whether or not this question should be asked. The value can also be a simple boolean.
+- **pageSize**: (Number) Change the number of lines that will be rendered when using `list`, `rawList`, `expand` or `checkbox`.
+- **prefix**: (String) Change the default _prefix_ message.
+- **suffix**: (String) Change the default _suffix_ message.
+
+`default`, `choices`(if defined as functions), `validate`, `filter` and `when` functions can be called asynchronous. Either return a promise or use `this.async()` to get a callback you'll call with the final value.
+
+``` javascript
+{
+ /* Preferred way: with promise */
+ filter: function () {
+ return new Promise(/* etc... */);
+ },
+
+ /* Legacy way: with this.async */
+ validate: function (input) {
+ // Declare function as asynchronous, and save the done callback
+ var done = this.async();
+
+ // Do async stuff
+ setTimeout(function () {
+ if (typeof input !== 'number') {
+ // Pass the return value in the done callback
+ done('You need to provide a number');
+ return;
+ }
+ // Pass the return value in the done callback
+ done(null, true);
+ }, 3000);
+ }
+}
+```
+
+### Answers
+<a name="answers"></a>
+A key/value hash containing the client answers in each prompt.
+
+- **Key** The `name` property of the _question_ object
+- **Value** (Depends on the prompt)
+ - `confirm`: (Boolean)
+ - `input` : User input (filtered if `filter` is defined) (String)
+ - `rawlist`, `list` : Selected choice value (or name if no value specified) (String)
+
+### Separator
+<a name="separator"></a>
+A separator can be added to any `choices` array:
+
+```
+// In the question object
+choices: [ "Choice A", new inquirer.Separator(), "choice B" ]
+
+// Which'll be displayed this way
+[?] What do you want to do?
+ > Order a pizza
+ Make a reservation
+ --------
+ Ask opening hours
+ Talk to the receptionist
+```
+
+The constructor takes a facultative `String` value that'll be use as the separator. If omitted, the separator will be `--------`.
+
+Separator instances have a property `type` equal to `separator`. This should allow tools façading Inquirer interface from detecting separator types in lists.
+
+<a name="prompt"></a>
+### Prompt types
+---------------------
+
+> **Note:**: _allowed options written inside square brackets (`[]`) are optional. Others are required._
+
+#### List - `{type: 'list'}`
+
+Take `type`, `name`, `message`, `choices`[, `default`, `filter`] properties. (Note that
+default must be the choice `index` in the array or a choice `value`)
+
+![List prompt](assets/screenshots/list-prompt.png)
+
+---
+
+#### Raw List - `{type: 'rawlist'}`
+
+Take `type`, `name`, `message`, `choices`[, `default`, `filter`] properties. (Note that
+default must the choice `index` in the array)
+
+![Raw list prompt](assets/screenshots/rawlist-prompt.png)
+
+---
+
+#### Expand - `{type: 'expand'}`
+
+Take `type`, `name`, `message`, `choices`[, `default`] properties. (Note that
+default must be the choice `index` in the array. If `default` key not provided, then `help` will be used as default choice)
+
+Note that the `choices` object will take an extra parameter called `key` for the `expand` prompt. This parameter must be a single (lowercased) character. The `h` option is added by the prompt and shouldn't be defined by the user.
+
+See `examples/expand.js` for a running example.
+
+![Expand prompt closed](assets/screenshots/expand-prompt-1.png)
+![Expand prompt expanded](assets/screenshots/expand-prompt-2.png)
+
+---
+
+#### Checkbox - `{type: 'checkbox'}`
+
+Take `type`, `name`, `message`, `choices`[, `filter`, `validate`, `default`] properties. `default` is expected to be an Array of the checked choices value.
+
+Choices marked as `{checked: true}` will be checked by default.
+
+Choices whose property `disabled` is truthy will be unselectable. If `disabled` is a string, then the string will be outputted next to the disabled choice, otherwise it'll default to `"Disabled"`. The `disabled` property can also be a synchronous function receiving the current answers as argument and returning a boolean or a string.
+
+![Checkbox prompt](assets/screenshots/checkbox-prompt.png)
+
+---
+
+#### Confirm - `{type: 'confirm'}`
+
+Take `type`, `name`, `message`[, `default`] properties. `default` is expected to be a boolean if used.
+
+![Confirm prompt](assets/screenshots/confirm-prompt.png)
+
+---
+
+#### Input - `{type: 'input'}`
+
+Take `type`, `name`, `message`[, `default`, `filter`, `validate`] properties.
+
+![Input prompt](assets/screenshots/input-prompt.png)
+
+---
+
+#### Password - `{type: 'password'}`
+
+Take `type`, `name`, `message`[, `default`, `filter`, `validate`] properties.
+
+![Password prompt](assets/screenshots/password-prompt.png)
+
+---
+
+#### Editor - `{type: 'editor'}`
+
+Take `type`, `name`, `message`[, `default`, `filter`, `validate`] properties
+
+Launches an instance of the users preferred editor on a temporary file. Once the user exits their editor, the contents of the temporary file are read in as the result. The editor to use is determined by reading the $VISUAL or $EDITOR environment variables. If neither of those are present, notepad (on Windows) or vim (Linux or Mac) is used.
+
+<a name="layouts"></a>
+## User Interfaces and layouts
+
+
+Along with the prompts, Inquirer offers some basic text UI.
+
+#### Bottom Bar - `inquirer.ui.BottomBar`
+
+This UI present a fixed text at the bottom of a free text zone. This is useful to keep a message to the bottom of the screen while outputting command outputs on the higher section.
+
+```javascript
+var ui = new inquirer.ui.BottomBar();
+
+// pipe a Stream to the log zone
+outputStream.pipe(ui.log);
+
+// Or simply write output
+ui.log.write('something just happened.');
+ui.log.write('Almost over, standby!');
+
+// During processing, update the bottom bar content to display a loader
+// or output a progress bar, etc
+ui.updateBottomBar('new bottom bar content');
+```
+
+<a name="reactive"></a>
+## Reactive interface
+
+
+Internally, Inquirer uses the [JS reactive extension](https://github.com/Reactive-Extensions/RxJS) to handle events and async flows.
+
+This mean you can take advantage of this feature to provide more advanced flows. For example, you can dynamically add questions to be asked:
+
+```js
+var prompts = new Rx.Subject();
+inquirer.prompt(prompts);
+
+// At some point in the future, push new questions
+prompts.onNext({ /* question... */ });
+prompts.onNext({ /* question... */ });
+
+// When you're done
+prompts.onCompleted();
+```
+
+And using the return value `process` property, you can access more fine grained callbacks:
+
+```js
+inquirer.prompt(prompts).ui.process.subscribe(
+ onEachAnswer,
+ onError,
+ onComplete
+);
+```
+
+## Support (OS Terminals)
+<a name="support"></a>
+
+You should expect mostly good support for the CLI below. This does not mean we won't
+look at issues found on other command line - feel free to report any!
+
+- **Mac OS**:
+ - Terminal.app
+ - iTerm
+- **Windows**:
+ - [ConEmu](https://conemu.github.io/)
+ - cmd.exe
+ - Powershell
+ - Cygwin
+- **Linux (Ubuntu, openSUSE, Arch Linux, etc)**:
+ - gnome-terminal (Terminal GNOME)
+ - konsole
+
+
+## News on the march (Release notes)
+<a name="news"></a>
+
+
+Please refer to the [Github releases section for the changelog](https://github.com/SBoudrias/Inquirer.js/releases)
+
+
+## Contributing
+<a name="contributing"></a>
+
+**Unit test**
+Unit test are written in [Mocha](https://mochajs.org/). Please add a unit test for every new feature or bug fix. `npm test` to run the test suite.
+
+**Documentation**
+Add documentation for every API change. Feel free to send typo fixes and better docs!
+
+We're looking to offer good support for multiple prompts and environments. If you want to
+help, we'd like to keep a list of testers for each terminal/OS so we can contact you and
+get feedback before release. Let us know if you want to be added to the list (just tweet
+to [@vaxilart](https://twitter.com/Vaxilart)) or just add your name to [the wiki](https://github.com/SBoudrias/Inquirer.js/wiki/Testers)
+
+## License
+<a name="license"></a>
+
+Copyright (c) 2016 Simon Boudrias (twitter: [@vaxilart](https://twitter.com/Vaxilart))
+Licensed under the MIT license.
+
+## Plugins
+<a name="plugins"></a>
+
+### Prompts ###
+
+[__autocomplete__](https://github.com/mokkabonna/inquirer-autocomplete-prompt)<br>
+Presents a list of options as the user types, compatible with other packages such as fuzzy (for search)<br>
+<br>
+![autocomplete prompt](https://github.com/mokkabonna/inquirer-autocomplete-prompt/raw/master/inquirer.gif)
+
+[__datetime__](https://github.com/DerekTBrown/inquirer-datepicker-prompt)<br>
+Customizable date/time selector using both number pad and arrow keys<br>
+<br>
+![Datetime Prompt](https://github.com/DerekTBrown/inquirer-datepicker-prompt/raw/master/example/datetime-prompt.png)
+
+[__inquirer-select-line__](https://github.com/adam-golab/inquirer-select-line)<br>
+Prompt for selecting index in array where add new element<br>
+<br>
+![inquirer-select-line gif](https://media.giphy.com/media/xUA7b1MxpngddUvdHW/giphy.gif)
+
+[__command__](https://github.com/sullof/inquirer-command-prompt)<br>
+<br>
+Simple prompt with command history and dynamic autocomplete
+
+[__inquirer-chalk-pipe__](https://github.com/LitoMore/inquirer-chalk-pipe)<br>
+Prompt for input chalk-pipe style strings<br>
+<br>
+![inquirer-chalk-pipe](https://github.com/LitoMore/inquirer-chalk-pipe/raw/master/screenshot.gif)
diff --git a/tools/node_modules/eslint/node_modules/inquirer/lib/inquirer.js b/tools/node_modules/eslint/node_modules/inquirer/lib/inquirer.js
new file mode 100644
index 0000000000..5bbd801b42
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/inquirer/lib/inquirer.js
@@ -0,0 +1,84 @@
+/**
+ * Inquirer.js
+ * A collection of common interactive command line user interfaces.
+ */
+
+var inquirer = module.exports;
+
+/**
+ * Client interfaces
+ */
+
+inquirer.prompts = {};
+
+inquirer.Separator = require('./objects/separator');
+
+inquirer.ui = {
+ BottomBar: require('./ui/bottom-bar'),
+ Prompt: require('./ui/prompt')
+};
+
+/**
+ * Create a new self-contained prompt module.
+ */
+inquirer.createPromptModule = function (opt) {
+ var promptModule = function (questions) {
+ var ui = new inquirer.ui.Prompt(promptModule.prompts, opt);
+ var promise = ui.run(questions);
+
+ // Monkey patch the UI on the promise object so
+ // that it remains publicly accessible.
+ promise.ui = ui;
+
+ return promise;
+ };
+ promptModule.prompts = {};
+
+ /**
+ * Register a prompt type
+ * @param {String} name Prompt type name
+ * @param {Function} prompt Prompt constructor
+ * @return {inquirer}
+ */
+
+ promptModule.registerPrompt = function (name, prompt) {
+ promptModule.prompts[name] = prompt;
+ return this;
+ };
+
+ /**
+ * Register the defaults provider prompts
+ */
+
+ promptModule.restoreDefaultPrompts = function () {
+ this.registerPrompt('list', require('./prompts/list'));
+ this.registerPrompt('input', require('./prompts/input'));
+ this.registerPrompt('confirm', require('./prompts/confirm'));
+ this.registerPrompt('rawlist', require('./prompts/rawlist'));
+ this.registerPrompt('expand', require('./prompts/expand'));
+ this.registerPrompt('checkbox', require('./prompts/checkbox'));
+ this.registerPrompt('password', require('./prompts/password'));
+ this.registerPrompt('editor', require('./prompts/editor'));
+ };
+
+ promptModule.restoreDefaultPrompts();
+
+ return promptModule;
+};
+
+/**
+ * Public CLI helper interface
+ * @param {Array|Object|rx.Observable} questions - Questions settings array
+ * @param {Function} cb - Callback being passed the user answers
+ * @return {inquirer.ui.Prompt}
+ */
+
+inquirer.prompt = inquirer.createPromptModule();
+
+// Expose helper functions on the top level for easiest usage by common users
+inquirer.registerPrompt = function (name, prompt) {
+ inquirer.prompt.registerPrompt(name, prompt);
+};
+inquirer.restoreDefaultPrompts = function () {
+ inquirer.prompt.restoreDefaultPrompts();
+};
diff --git a/tools/node_modules/eslint/node_modules/inquirer/lib/objects/choice.js b/tools/node_modules/eslint/node_modules/inquirer/lib/objects/choice.js
new file mode 100644
index 0000000000..51affac6dc
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/inquirer/lib/objects/choice.js
@@ -0,0 +1,35 @@
+'use strict';
+var _ = require('lodash');
+
+/**
+ * Choice object
+ * Normalize input as choice object
+ * @constructor
+ * @param {String|Object} val Choice value. If an object is passed, it should contains
+ * at least one of `value` or `name` property
+ */
+
+var Choice = module.exports = function (val, answers) {
+ // Don't process Choice and Separator object
+ if (val instanceof Choice || val.type === 'separator') {
+ return val;
+ }
+
+ if (_.isString(val)) {
+ this.name = val;
+ this.value = val;
+ this.short = val;
+ } else {
+ _.extend(this, val, {
+ name: val.name || val.value,
+ value: 'value' in val ? val.value : val.name,
+ short: val.short || val.name || val.value
+ });
+ }
+
+ if (_.isFunction(val.disabled)) {
+ this.disabled = val.disabled(answers);
+ } else {
+ this.disabled = val.disabled;
+ }
+};
diff --git a/tools/node_modules/eslint/node_modules/inquirer/lib/objects/choices.js b/tools/node_modules/eslint/node_modules/inquirer/lib/objects/choices.js
new file mode 100644
index 0000000000..41a36293cd
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/inquirer/lib/objects/choices.js
@@ -0,0 +1,112 @@
+'use strict';
+var assert = require('assert');
+var _ = require('lodash');
+var Separator = require('./separator');
+var Choice = require('./choice');
+
+/**
+ * Choices collection
+ * Collection of multiple `choice` object
+ * @constructor
+ * @param {Array} choices All `choice` to keep in the collection
+ */
+
+var Choices = module.exports = function (choices, answers) {
+ this.choices = choices.map(function (val) {
+ if (val.type === 'separator') {
+ if (!(val instanceof Separator)) {
+ val = new Separator(val.line);
+ }
+ return val;
+ }
+ return new Choice(val, answers);
+ });
+
+ this.realChoices = this.choices
+ .filter(Separator.exclude)
+ .filter(function (item) {
+ return !item.disabled;
+ });
+
+ Object.defineProperty(this, 'length', {
+ get: function () {
+ return this.choices.length;
+ },
+ set: function (val) {
+ this.choices.length = val;
+ }
+ });
+
+ Object.defineProperty(this, 'realLength', {
+ get: function () {
+ return this.realChoices.length;
+ },
+ set: function () {
+ throw new Error('Cannot set `realLength` of a Choices collection');
+ }
+ });
+};
+
+/**
+ * Get a valid choice from the collection
+ * @param {Number} selector The selected choice index
+ * @return {Choice|Undefined} Return the matched choice or undefined
+ */
+
+Choices.prototype.getChoice = function (selector) {
+ assert(_.isNumber(selector));
+ return this.realChoices[selector];
+};
+
+/**
+ * Get a raw element from the collection
+ * @param {Number} selector The selected index value
+ * @return {Choice|Undefined} Return the matched choice or undefined
+ */
+
+Choices.prototype.get = function (selector) {
+ assert(_.isNumber(selector));
+ return this.choices[selector];
+};
+
+/**
+ * Match the valid choices against a where clause
+ * @param {Object} whereClause Lodash `where` clause
+ * @return {Array} Matching choices or empty array
+ */
+
+Choices.prototype.where = function (whereClause) {
+ return _.filter(this.realChoices, whereClause);
+};
+
+/**
+ * Pluck a particular key from the choices
+ * @param {String} propertyName Property name to select
+ * @return {Array} Selected properties
+ */
+
+Choices.prototype.pluck = function (propertyName) {
+ return _.map(this.realChoices, propertyName);
+};
+
+// Expose usual Array methods
+Choices.prototype.indexOf = function () {
+ return this.choices.indexOf.apply(this.choices, arguments);
+};
+Choices.prototype.forEach = function () {
+ return this.choices.forEach.apply(this.choices, arguments);
+};
+Choices.prototype.filter = function () {
+ return this.choices.filter.apply(this.choices, arguments);
+};
+Choices.prototype.find = function (func) {
+ return _.find(this.choices, func);
+};
+Choices.prototype.push = function () {
+ var objs = _.map(arguments, function (val) {
+ return new Choice(val);
+ });
+ this.choices.push.apply(this.choices, objs);
+ this.realChoices = this.choices.filter(Separator.exclude);
+ return this.choices;
+};
diff --git a/tools/node_modules/eslint/node_modules/inquirer/lib/objects/separator.js b/tools/node_modules/eslint/node_modules/inquirer/lib/objects/separator.js
new file mode 100644
index 0000000000..abfaef17f2
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/inquirer/lib/objects/separator.js
@@ -0,0 +1,34 @@
+'use strict';
+var chalk = require('chalk');
+var figures = require('figures');
+
+/**
+ * Separator object
+ * Used to space/separate choices group
+ * @constructor
+ * @param {String} line Separation line content (facultative)
+ */
+
+var Separator = module.exports = function (line) {
+ this.type = 'separator';
+ this.line = chalk.dim(line || new Array(15).join(figures.line));
+};
+
+/**
+ * Helper function returning false if object is a separator
+ * @param {Object} obj object to test against
+ * @return {Boolean} `false` if object is a separator
+ */
+
+Separator.exclude = function (obj) {
+ return obj.type !== 'separator';
+};
+
+/**
+ * Stringify separator
+ * @return {String} the separator display string
+ */
+
+Separator.prototype.toString = function () {
+ return this.line;
+};
diff --git a/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/base.js b/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/base.js
new file mode 100644
index 0000000000..c7fd14fbef
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/base.js
@@ -0,0 +1,139 @@
+/**
+ * Base prompt implementation
+ * Should be extended by prompt types.
+ */
+
+var _ = require('lodash');
+var chalk = require('chalk');
+var runAsync = require('run-async');
+var Choices = require('../objects/choices');
+var ScreenManager = require('../utils/screen-manager');
+
+var Prompt = module.exports = function (question, rl, answers) {
+ // Setup instance defaults property
+ _.assign(this, {
+ answers: answers,
+ status: 'pending'
+ });
+
+ // Set defaults prompt options
+ this.opt = _.defaults(_.clone(question), {
+ validate: function () {
+ return true;
+ },
+ filter: function (val) {
+ return val;
+ },
+ when: function () {
+ return true;
+ },
+ suffix: '',
+ prefix: chalk.green('?')
+ });
+
+ // Check to make sure prompt requirements are there
+ if (!this.opt.message) {
+ this.throwParamError('message');
+ }
+ if (!this.opt.name) {
+ this.throwParamError('name');
+ }
+
+ // Normalize choices
+ if (Array.isArray(this.opt.choices)) {
+ this.opt.choices = new Choices(this.opt.choices, answers);
+ }
+
+ this.rl = rl;
+ this.screen = new ScreenManager(this.rl);
+};
+
+/**
+ * Start the Inquiry session and manage output value filtering
+ * @return {Promise}
+ */
+
+Prompt.prototype.run = function () {
+ return new Promise(function (resolve) {
+ this._run(function (value) {
+ resolve(value);
+ });
+ }.bind(this));
+};
+
+// default noop (this one should be overwritten in prompts)
+Prompt.prototype._run = function (cb) {
+ cb();
+};
+
+/**
+ * Throw an error telling a required parameter is missing
+ * @param {String} name Name of the missing param
+ * @return {Throw Error}
+ */
+
+Prompt.prototype.throwParamError = function (name) {
+ throw new Error('You must provide a `' + name + '` parameter');
+};
+
+/**
+ * Called when the UI closes. Override to do any specific cleanup necessary
+ */
+Prompt.prototype.close = function () {
+ this.screen.releaseCursor();
+};
+
+/**
+ * Run the provided validation method each time a submit event occur.
+ * @param {Rx.Observable} submit - submit event flow
+ * @return {Object} Object containing two observables: `success` and `error`
+ */
+Prompt.prototype.handleSubmitEvents = function (submit) {
+ var self = this;
+ var validate = runAsync(this.opt.validate);
+ var filter = runAsync(this.opt.filter);
+ var validation = submit.flatMap(function (value) {
+ return filter(value, self.answers).then(function (filteredValue) {
+ return validate(filteredValue, self.answers).then(function (isValid) {
+ return {isValid: isValid, value: filteredValue};
+ }, function (err) {
+ return {isValid: err};
+ });
+ }, function (err) {
+ return {isValid: err};
+ });
+ }).share();
+
+ var success = validation
+ .filter(function (state) {
+ return state.isValid === true;
+ })
+ .take(1);
+
+ var error = validation
+ .filter(function (state) {
+ return state.isValid !== true;
+ })
+ .takeUntil(success);
+
+ return {
+ success: success,
+ error: error
+ };
+};
+
+/**
+ * Generate the prompt question string
+ * @return {String} prompt question string
+ */
+
+Prompt.prototype.getQuestion = function () {
+ var message = this.opt.prefix + ' ' + chalk.bold(this.opt.message) + this.opt.suffix + chalk.reset(' ');
+
+ // Append the default if available, and if question isn't answered
+ if (this.opt.default != null && this.status !== 'answered') {
+ message += chalk.dim('(' + this.opt.default + ') ');
+ }
+
+ return message;
+};
diff --git a/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/checkbox.js b/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/checkbox.js
new file mode 100644
index 0000000000..52336e3f79
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/checkbox.js
@@ -0,0 +1,236 @@
+/**
+ * `list` type prompt
+ */
+
+var _ = require('lodash');
+var util = require('util');
+var chalk = require('chalk');
+var cliCursor = require('cli-cursor');
+var figures = require('figures');
+var Base = require('./base');
+var observe = require('../utils/events');
+var Paginator = require('../utils/paginator');
+
+/**
+ * Module exports
+ */
+
+module.exports = Prompt;
+
+/**
+ * Constructor
+ */
+
+function Prompt() {
+ Base.apply(this, arguments);
+
+ if (!this.opt.choices) {
+ this.throwParamError('choices');
+ }
+
+ if (_.isArray(this.opt.default)) {
+ this.opt.choices.forEach(function (choice) {
+ if (this.opt.default.indexOf(choice.value) >= 0) {
+ choice.checked = true;
+ }
+ }, this);
+ }
+
+ this.pointer = 0;
+ this.firstRender = true;
+
+ // Make sure no default is set (so it won't be printed)
+ this.opt.default = null;
+
+ this.paginator = new Paginator();
+}
+util.inherits(Prompt, Base);
+
+/**
+ * Start the Inquiry session
+ * @param {Function} cb Callback when prompt is done
+ * @return {this}
+ */
+
+Prompt.prototype._run = function (cb) {
+ this.done = cb;
+
+ var events = observe(this.rl);
+
+ var validation = this.handleSubmitEvents(
+ events.line.map(this.getCurrentValue.bind(this))
+ );
+ validation.success.forEach(this.onEnd.bind(this));
+ validation.error.forEach(this.onError.bind(this));
+
+ events.normalizedUpKey.takeUntil(validation.success).forEach(this.onUpKey.bind(this));
+ events.normalizedDownKey.takeUntil(validation.success).forEach(this.onDownKey.bind(this));
+ events.numberKey.takeUntil(validation.success).forEach(this.onNumberKey.bind(this));
+ events.spaceKey.takeUntil(validation.success).forEach(this.onSpaceKey.bind(this));
+ events.aKey.takeUntil(validation.success).forEach(this.onAllKey.bind(this));
+ events.iKey.takeUntil(validation.success).forEach(this.onInverseKey.bind(this));
+
+ // Init the prompt
+ cliCursor.hide();
+ this.render();
+ this.firstRender = false;
+
+ return this;
+};
+
+/**
+ * Render the prompt to screen
+ * @return {Prompt} self
+ */
+
+Prompt.prototype.render = function (error) {
+ // Render question
+ var message = this.getQuestion();
+ var bottomContent = '';
+
+ if (this.firstRender) {
+ message += '(Press ' + chalk.cyan.bold('<space>') + ' to select, ' + chalk.cyan.bold('<a>') + ' to toggle all, ' + chalk.cyan.bold('<i>') + ' to inverse selection)';
+ }
+
+ // Render choices or answer depending on the state
+ if (this.status === 'answered') {
+ message += chalk.cyan(this.selection.join(', '));
+ } else {
+ var choicesStr = renderChoices(this.opt.choices, this.pointer);
+ var indexPosition = this.opt.choices.indexOf(this.opt.choices.getChoice(this.pointer));
+ message += '\n' + this.paginator.paginate(choicesStr, indexPosition, this.opt.pageSize);
+ }
+
+ if (error) {
+ bottomContent = chalk.red('>> ') + error;
+ }
+
+ this.screen.render(message, bottomContent);
+};
+
+/**
+ * When user press `enter` key
+ */
+
+Prompt.prototype.onEnd = function (state) {
+ this.status = 'answered';
+
+ // Rerender prompt (and clean subline error)
+ this.render();
+
+ this.screen.done();
+ cliCursor.show();
+ this.done(state.value);
+};
+
+Prompt.prototype.onError = function (state) {
+ this.render(state.isValid);
+};
+
+Prompt.prototype.getCurrentValue = function () {
+ var choices = this.opt.choices.filter(function (choice) {
+ return Boolean(choice.checked) && !choice.disabled;
+ });
+
+ this.selection = _.map(choices, 'short');
+ return _.map(choices, 'value');
+};
+
+Prompt.prototype.onUpKey = function () {
+ var len = this.opt.choices.realLength;
+ this.pointer = (this.pointer > 0) ? this.pointer - 1 : len - 1;
+ this.render();
+};
+
+Prompt.prototype.onDownKey = function () {
+ var len = this.opt.choices.realLength;
+ this.pointer = (this.pointer < len - 1) ? this.pointer + 1 : 0;
+ this.render();
+};
+
+Prompt.prototype.onNumberKey = function (input) {
+ if (input <= this.opt.choices.realLength) {
+ this.pointer = input - 1;
+ this.toggleChoice(this.pointer);
+ }
+ this.render();
+};
+
+Prompt.prototype.onSpaceKey = function () {
+ this.toggleChoice(this.pointer);
+ this.render();
+};
+
+Prompt.prototype.onAllKey = function () {
+ var shouldBeChecked = Boolean(this.opt.choices.find(function (choice) {
+ return choice.type !== 'separator' && !choice.checked;
+ }));
+
+ this.opt.choices.forEach(function (choice) {
+ if (choice.type !== 'separator') {
+ choice.checked = shouldBeChecked;
+ }
+ });
+
+ this.render();
+};
+
+Prompt.prototype.onInverseKey = function () {
+ this.opt.choices.forEach(function (choice) {
+ if (choice.type !== 'separator') {
+ choice.checked = !choice.checked;
+ }
+ });
+
+ this.render();
+};
+
+Prompt.prototype.toggleChoice = function (index) {
+ var item = this.opt.choices.getChoice(index);
+ if (item !== undefined) {
+ this.opt.choices.getChoice(index).checked = !item.checked;
+ }
+};
+
+/**
+ * Function for rendering checkbox choices
+ * @param {Number} pointer Position of the pointer
+ * @return {String} Rendered content
+ */
+
+function renderChoices(choices, pointer) {
+ var output = '';
+ var separatorOffset = 0;
+
+ choices.forEach(function (choice, i) {
+ if (choice.type === 'separator') {
+ separatorOffset++;
+ output += ' ' + choice + '\n';
+ return;
+ }
+
+ if (choice.disabled) {
+ separatorOffset++;
+ output += ' - ' + choice.name;
+ output += ' (' + (_.isString(choice.disabled) ? choice.disabled : 'Disabled') + ')';
+ } else {
+ var isSelected = (i - separatorOffset === pointer);
+ output += isSelected ? chalk.cyan(figures.pointer) : ' ';
+ output += getCheckbox(choice.checked) + ' ' + choice.name;
+ }
+
+ output += '\n';
+ });
+
+ return output.replace(/\n$/, '');
+}
+
+/**
+ * Get the checkbox
+ * @param {Boolean} checked - add a X or not to the checkbox
+ * @return {String} Composited checkbox string
+ */
+
+function getCheckbox(checked) {
+ return checked ? chalk.green(figures.radioOn) : figures.radioOff;
+}
diff --git a/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/confirm.js b/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/confirm.js
new file mode 100644
index 0000000000..542d120394
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/confirm.js
@@ -0,0 +1,106 @@
+/**
+ * `confirm` type prompt
+ */
+
+var _ = require('lodash');
+var util = require('util');
+var chalk = require('chalk');
+var Base = require('./base');
+var observe = require('../utils/events');
+
+/**
+ * Module exports
+ */
+
+module.exports = Prompt;
+
+/**
+ * Constructor
+ */
+
+function Prompt() {
+ Base.apply(this, arguments);
+
+ var rawDefault = true;
+
+ _.extend(this.opt, {
+ filter: function (input) {
+ var value = rawDefault;
+ if (input != null && input !== '') {
+ value = /^y(es)?/i.test(input);
+ }
+ return value;
+ }
+ });
+
+ if (_.isBoolean(this.opt.default)) {
+ rawDefault = this.opt.default;
+ }
+
+ this.opt.default = rawDefault ? 'Y/n' : 'y/N';
+
+ return this;
+}
+util.inherits(Prompt, Base);
+
+/**
+ * Start the Inquiry session
+ * @param {Function} cb Callback when prompt is done
+ * @return {this}
+ */
+
+Prompt.prototype._run = function (cb) {
+ this.done = cb;
+
+ // Once user confirm (enter key)
+ var events = observe(this.rl);
+ events.keypress.takeUntil(events.line).forEach(this.onKeypress.bind(this));
+
+ events.line.take(1).forEach(this.onEnd.bind(this));
+
+ // Init
+ this.render();
+
+ return this;
+};
+
+/**
+ * Render the prompt to screen
+ * @return {Prompt} self
+ */
+
+Prompt.prototype.render = function (answer) {
+ var message = this.getQuestion();
+
+ if (typeof answer === 'boolean') {
+ message += chalk.cyan(answer ? 'Yes' : 'No');
+ } else {
+ message += this.rl.line;
+ }
+
+ this.screen.render(message);
+
+ return this;
+};
+
+/**
+ * When user press `enter` key
+ */
+
+Prompt.prototype.onEnd = function (input) {
+ this.status = 'answered';
+
+ var output = this.opt.filter(input);
+ this.render(output);
+
+ this.screen.done();
+ this.done(output);
+};
+
+/**
+ * When user press a key
+ */
+
+Prompt.prototype.onKeypress = function () {
+ this.render();
+};
diff --git a/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/editor.js b/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/editor.js
new file mode 100644
index 0000000000..e4bb2664a9
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/editor.js
@@ -0,0 +1,111 @@
+/**
+ * `editor` type prompt
+ */
+
+var util = require('util');
+var chalk = require('chalk');
+var ExternalEditor = require('external-editor');
+var Base = require('./base');
+var observe = require('../utils/events');
+var rx = require('rx-lite-aggregates');
+
+/**
+ * Module exports
+ */
+
+module.exports = Prompt;
+
+/**
+ * Constructor
+ */
+
+function Prompt() {
+ return Base.apply(this, arguments);
+}
+util.inherits(Prompt, Base);
+
+/**
+ * Start the Inquiry session
+ * @param {Function} cb Callback when prompt is done
+ * @return {this}
+ */
+
+Prompt.prototype._run = function (cb) {
+ this.done = cb;
+
+ this.editorResult = new rx.Subject();
+
+ // Open Editor on "line" (Enter Key)
+ var events = observe(this.rl);
+ this.lineSubscription = events.line.forEach(this.startExternalEditor.bind(this));
+
+ // Trigger Validation when editor closes
+ var validation = this.handleSubmitEvents(this.editorResult);
+ validation.success.forEach(this.onEnd.bind(this));
+ validation.error.forEach(this.onError.bind(this));
+
+ // Prevents default from being printed on screen (can look weird with multiple lines)
+ this.currentText = this.opt.default;
+ this.opt.default = null;
+
+ // Init
+ this.render();
+
+ return this;
+};
+
+/**
+ * Render the prompt to screen
+ * @return {Prompt} self
+ */
+
+Prompt.prototype.render = function (error) {
+ var bottomContent = '';
+ var message = this.getQuestion();
+
+ if (this.status === 'answered') {
+ message += chalk.dim('Received');
+ } else {
+ message += chalk.dim('Press <enter> to launch your preferred editor.');
+ }
+
+ if (error) {
+ bottomContent = chalk.red('>> ') + error;
+ }
+
+ this.screen.render(message, bottomContent);
+};
+
+/**
+ * Launch $EDITOR on user press enter
+ */
+
+Prompt.prototype.startExternalEditor = function () {
+ // Pause Readline to prevent stdin and stdout from being modified while the editor is showing
+ this.rl.pause();
+ ExternalEditor.editAsync(this.currentText, this.endExternalEditor.bind(this));
+};
+
+Prompt.prototype.endExternalEditor = function (error, result) {
+ this.rl.resume();
+ if (error) {
+ this.editorResult.onError(error);
+ } else {
+ this.editorResult.onNext(result);
+ }
+};
+
+Prompt.prototype.onEnd = function (state) {
+ this.editorResult.dispose();
+ this.lineSubscription.dispose();
+ this.answer = state.value;
+ this.status = 'answered';
+ // Re-render prompt
+ this.render();
+ this.screen.done();
+ this.done(this.answer);
+};
+
+Prompt.prototype.onError = function (state) {
+ this.render(state.isValid);
+};
diff --git a/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/expand.js b/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/expand.js
new file mode 100644
index 0000000000..336d98c5af
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/expand.js
@@ -0,0 +1,260 @@
+/**
+ * `rawlist` type prompt
+ */
+
+var _ = require('lodash');
+var util = require('util');
+var chalk = require('chalk');
+var Base = require('./base');
+var Separator = require('../objects/separator');
+var observe = require('../utils/events');
+var Paginator = require('../utils/paginator');
+
+/**
+ * Module exports
+ */
+
+module.exports = Prompt;
+
+/**
+ * Constructor
+ */
+
+function Prompt() {
+ Base.apply(this, arguments);
+
+ if (!this.opt.choices) {
+ this.throwParamError('choices');
+ }
+
+ this.validateChoices(this.opt.choices);
+
+ // Add the default `help` (/expand) option
+ this.opt.choices.push({
+ key: 'h',
+ name: 'Help, list all options',
+ value: 'help'
+ });
+
+ this.opt.validate = function (choice) {
+ if (choice == null) {
+ return 'Please enter a valid command';
+ }
+
+ return choice !== 'help';
+ };
+
+ // Setup the default string (capitalize the default key)
+ this.opt.default = this.generateChoicesString(this.opt.choices, this.opt.default);
+
+ this.paginator = new Paginator();
+}
+util.inherits(Prompt, Base);
+
+/**
+ * Start the Inquiry session
+ * @param {Function} cb Callback when prompt is done
+ * @return {this}
+ */
+
+Prompt.prototype._run = function (cb) {
+ this.done = cb;
+
+ // Save user answer and update prompt to show selected option.
+ var events = observe(this.rl);
+ var validation = this.handleSubmitEvents(
+ events.line.map(this.getCurrentValue.bind(this))
+ );
+ validation.success.forEach(this.onSubmit.bind(this));
+ validation.error.forEach(this.onError.bind(this));
+ this.keypressObs = events.keypress.takeUntil(validation.success)
+ .forEach(this.onKeypress.bind(this));
+
+ // Init the prompt
+ this.render();
+
+ return this;
+};
+
+/**
+ * Render the prompt to screen
+ * @return {Prompt} self
+ */
+
+Prompt.prototype.render = function (error, hint) {
+ var message = this.getQuestion();
+ var bottomContent = '';
+
+ if (this.status === 'answered') {
+ message += chalk.cyan(this.answer);
+ } else if (this.status === 'expanded') {
+ var choicesStr = renderChoices(this.opt.choices, this.selectedKey);
+ message += this.paginator.paginate(choicesStr, this.selectedKey, this.opt.pageSize);
+ message += '\n Answer: ';
+ }
+
+ message += this.rl.line;
+
+ if (error) {
+ bottomContent = chalk.red('>> ') + error;
+ }
+
+ if (hint) {
+ bottomContent = chalk.cyan('>> ') + hint;
+ }
+
+ this.screen.render(message, bottomContent);
+};
+
+Prompt.prototype.getCurrentValue = function (input) {
+ if (!input) {
+ input = this.rawDefault;
+ }
+ var selected = this.opt.choices.where({key: input.toLowerCase().trim()})[0];
+ if (!selected) {
+ return null;
+ }
+
+ return selected.value;
+};
+
+/**
+ * Generate the prompt choices string
+ * @return {String} Choices string
+ */
+
+Prompt.prototype.getChoices = function () {
+ var output = '';
+
+ this.opt.choices.forEach(function (choice) {
+ output += '\n ';
+
+ if (choice.type === 'separator') {
+ output += ' ' + choice;
+ return;
+ }
+
+ var choiceStr = choice.key + ') ' + choice.name;
+ if (this.selectedKey === choice.key) {
+ choiceStr = chalk.cyan(choiceStr);
+ }
+ output += choiceStr;
+ }.bind(this));
+
+ return output;
+};
+
+Prompt.prototype.onError = function (state) {
+ if (state.value === 'help') {
+ this.selectedKey = '';
+ this.status = 'expanded';
+ this.render();
+ return;
+ }
+ this.render(state.isValid);
+};
+
+/**
+ * When user press `enter` key
+ */
+
+Prompt.prototype.onSubmit = function (state) {
+ this.status = 'answered';
+ var choice = this.opt.choices.where({value: state.value})[0];
+ this.answer = choice.short || choice.name;
+
+ // Re-render prompt
+ this.render();
+ this.screen.done();
+ this.done(state.value);
+};
+
+/**
+ * When user press a key
+ */
+
+Prompt.prototype.onKeypress = function () {
+ this.selectedKey = this.rl.line.toLowerCase();
+ var selected = this.opt.choices.where({key: this.selectedKey})[0];
+ if (this.status === 'expanded') {
+ this.render();
+ } else {
+ this.render(null, selected ? selected.name : null);
+ }
+};
+
+/**
+ * Validate the choices
+ * @param {Array} choices
+ */
+
+Prompt.prototype.validateChoices = function (choices) {
+ var formatError;
+ var errors = [];
+ var keymap = {};
+ choices.filter(Separator.exclude).forEach(function (choice) {
+ if (!choice.key || choice.key.length !== 1) {
+ formatError = true;
+ }
+ if (keymap[choice.key]) {
+ errors.push(choice.key);
+ }
+ keymap[choice.key] = true;
+ choice.key = String(choice.key).toLowerCase();
+ });
+
+ if (formatError) {
+ throw new Error('Format error: `key` param must be a single letter and is required.');
+ }
+ if (keymap.h) {
+ throw new Error('Reserved key error: `key` param cannot be `h` - this value is reserved.');
+ }
+ if (errors.length) {
+ throw new Error('Duplicate key error: `key` param must be unique. Duplicates: ' +
+ _.uniq(errors).join(', '));
+ }
+};
+
+/**
+ * Generate a string out of the choices keys
+ * @param {Array} choices
+ * @param {Number} defaultIndex - the choice index to capitalize
+ * @return {String} The rendered choices key string
+ */
+Prompt.prototype.generateChoicesString = function (choices, defaultIndex) {
+ var defIndex = choices.realLength - 1;
+ if (_.isNumber(defaultIndex) && this.opt.choices.getChoice(defaultIndex)) {
+ defIndex = defaultIndex;
+ }
+ var defStr = this.opt.choices.pluck('key');
+ this.rawDefault = defStr[defIndex];
+ defStr[defIndex] = String(defStr[defIndex]).toUpperCase();
+ return defStr.join('');
+};
+
+/**
+ * Function for rendering checkbox choices
+ * @param {String} pointer Selected key
+ * @return {String} Rendered content
+ */
+
+function renderChoices(choices, pointer) {
+ var output = '';
+
+ choices.forEach(function (choice) {
+ output += '\n ';
+
+ if (choice.type === 'separator') {
+ output += ' ' + choice;
+ return;
+ }
+
+ var choiceStr = choice.key + ') ' + choice.name;
+ if (pointer === choice.key) {
+ choiceStr = chalk.cyan(choiceStr);
+ }
+ output += choiceStr;
+ });
+
+ return output;
+}
diff --git a/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/input.js b/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/input.js
new file mode 100644
index 0000000000..a1c7be2acc
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/input.js
@@ -0,0 +1,104 @@
+/**
+ * `input` type prompt
+ */
+
+var util = require('util');
+var chalk = require('chalk');
+var Base = require('./base');
+var observe = require('../utils/events');
+
+/**
+ * Module exports
+ */
+
+module.exports = Prompt;
+
+/**
+ * Constructor
+ */
+
+function Prompt() {
+ return Base.apply(this, arguments);
+}
+util.inherits(Prompt, Base);
+
+/**
+ * Start the Inquiry session
+ * @param {Function} cb Callback when prompt is done
+ * @return {this}
+ */
+
+Prompt.prototype._run = function (cb) {
+ this.done = cb;
+
+ // Once user confirm (enter key)
+ var events = observe(this.rl);
+ var submit = events.line.map(this.filterInput.bind(this));
+
+ var validation = this.handleSubmitEvents(submit);
+ validation.success.forEach(this.onEnd.bind(this));
+ validation.error.forEach(this.onError.bind(this));
+
+ events.keypress.takeUntil(validation.success).forEach(this.onKeypress.bind(this));
+
+ // Init
+ this.render();
+
+ return this;
+};
+
+/**
+ * Render the prompt to screen
+ * @return {Prompt} self
+ */
+
+Prompt.prototype.render = function (error) {
+ var bottomContent = '';
+ var message = this.getQuestion();
+
+ if (this.status === 'answered') {
+ message += chalk.cyan(this.answer);
+ } else {
+ message += this.rl.line;
+ }
+
+ if (error) {
+ bottomContent = chalk.red('>> ') + error;
+ }
+
+ this.screen.render(message, bottomContent);
+};
+
+/**
+ * When user press `enter` key
+ */
+
+Prompt.prototype.filterInput = function (input) {
+ if (!input) {
+ return this.opt.default == null ? '' : this.opt.default;
+ }
+ return input;
+};
+
+Prompt.prototype.onEnd = function (state) {
+ this.answer = state.value;
+ this.status = 'answered';
+
+ // Re-render prompt
+ this.render();
+
+ this.screen.done();
+ this.done(state.value);
+};
+
+Prompt.prototype.onError = function (state) {
+ this.render(state.isValid);
+};
+
+/**
+ * When user press a key
+ */
+
+Prompt.prototype.onKeypress = function () {
+ this.render();
+};
diff --git a/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/list.js b/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/list.js
new file mode 100644
index 0000000000..c29542f228
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/list.js
@@ -0,0 +1,184 @@
+/**
+ * `list` type prompt
+ */
+
+var _ = require('lodash');
+var util = require('util');
+var chalk = require('chalk');
+var figures = require('figures');
+var cliCursor = require('cli-cursor');
+var runAsync = require('run-async');
+var Base = require('./base');
+var observe = require('../utils/events');
+var Paginator = require('../utils/paginator');
+
+/**
+ * Module exports
+ */
+
+module.exports = Prompt;
+
+/**
+ * Constructor
+ */
+
+function Prompt() {
+ Base.apply(this, arguments);
+
+ if (!this.opt.choices) {
+ this.throwParamError('choices');
+ }
+
+ this.firstRender = true;
+ this.selected = 0;
+
+ var def = this.opt.default;
+
+ // If def is a Number, then use as index. Otherwise, check for value.
+ if (_.isNumber(def) && def >= 0 && def < this.opt.choices.realLength) {
+ this.selected = def;
+ } else if (!_.isNumber(def) && def != null) {
+ this.selected = this.opt.choices.pluck('value').indexOf(def);
+ }
+
+ // Make sure no default is set (so it won't be printed)
+ this.opt.default = null;
+
+ this.paginator = new Paginator();
+}
+util.inherits(Prompt, Base);
+
+/**
+ * Start the Inquiry session
+ * @param {Function} cb Callback when prompt is done
+ * @return {this}
+ */
+
+Prompt.prototype._run = function (cb) {
+ this.done = cb;
+
+ var self = this;
+
+ var events = observe(this.rl);
+ events.normalizedUpKey.takeUntil(events.line).forEach(this.onUpKey.bind(this));
+ events.normalizedDownKey.takeUntil(events.line).forEach(this.onDownKey.bind(this));
+ events.numberKey.takeUntil(events.line).forEach(this.onNumberKey.bind(this));
+ events.line
+ .take(1)
+ .map(this.getCurrentValue.bind(this))
+ .flatMap(function (value) {
+ return runAsync(self.opt.filter)(value).catch(function (err) {
+ return err;
+ });
+ })
+ .forEach(this.onSubmit.bind(this));
+
+ // Init the prompt
+ cliCursor.hide();
+ this.render();
+
+ return this;
+};
+
+/**
+ * Render the prompt to screen
+ * @return {Prompt} self
+ */
+
+Prompt.prototype.render = function () {
+ // Render question
+ var message = this.getQuestion();
+
+ if (this.firstRender) {
+ message += chalk.dim('(Use arrow keys)');
+ }
+
+ // Render choices or answer depending on the state
+ if (this.status === 'answered') {
+ message += chalk.cyan(this.opt.choices.getChoice(this.selected).short);
+ } else {
+ var choicesStr = listRender(this.opt.choices, this.selected);
+ var indexPosition = this.opt.choices.indexOf(this.opt.choices.getChoice(this.selected));
+ message += '\n' + this.paginator.paginate(choicesStr, indexPosition, this.opt.pageSize);
+ }
+
+ this.firstRender = false;
+
+ this.screen.render(message);
+};
+
+/**
+ * When user press `enter` key
+ */
+
+Prompt.prototype.onSubmit = function (value) {
+ this.status = 'answered';
+
+ // Rerender prompt
+ this.render();
+
+ this.screen.done();
+ cliCursor.show();
+ this.done(value);
+};
+
+Prompt.prototype.getCurrentValue = function () {
+ return this.opt.choices.getChoice(this.selected).value;
+};
+
+/**
+ * When user press a key
+ */
+Prompt.prototype.onUpKey = function () {
+ var len = this.opt.choices.realLength;
+ this.selected = (this.selected > 0) ? this.selected - 1 : len - 1;
+ this.render();
+};
+
+Prompt.prototype.onDownKey = function () {
+ var len = this.opt.choices.realLength;
+ this.selected = (this.selected < len - 1) ? this.selected + 1 : 0;
+ this.render();
+};
+
+Prompt.prototype.onNumberKey = function (input) {
+ if (input <= this.opt.choices.realLength) {
+ this.selected = input - 1;
+ }
+ this.render();
+};
+
+/**
+ * Function for rendering list choices
+ * @param {Number} pointer Position of the pointer
+ * @return {String} Rendered content
+ */
+function listRender(choices, pointer) {
+ var output = '';
+ var separatorOffset = 0;
+
+ choices.forEach(function (choice, i) {
+ if (choice.type === 'separator') {
+ separatorOffset++;
+ output += ' ' + choice + '\n';
+ return;
+ }
+
+ if (choice.disabled) {
+ separatorOffset++;
+ output += ' - ' + choice.name;
+ output += ' (' + (_.isString(choice.disabled) ? choice.disabled : 'Disabled') + ')';
+ output += '\n';
+ return;
+ }
+
+ var isSelected = (i - separatorOffset === pointer);
+ var line = (isSelected ? figures.pointer + ' ' : ' ') + choice.name;
+ if (isSelected) {
+ line = chalk.cyan(line);
+ }
+ output += line + ' \n';
+ });
+
+ return output.replace(/\n$/, '');
+}
diff --git a/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/password.js b/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/password.js
new file mode 100644
index 0000000000..2a9a5e2e6a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/password.js
@@ -0,0 +1,115 @@
+/**
+ * `password` type prompt
+ */
+
+var util = require('util');
+var chalk = require('chalk');
+var Base = require('./base');
+var observe = require('../utils/events');
+
+function mask(input, maskChar) {
+ input = String(input);
+ maskChar = typeof maskChar === 'string' ? maskChar : '*';
+ if (input.length === 0) {
+ return '';
+ }
+
+ return new Array(input.length + 1).join(maskChar);
+}
+
+/**
+ * Module exports
+ */
+
+module.exports = Prompt;
+
+/**
+ * Constructor
+ */
+
+function Prompt() {
+ return Base.apply(this, arguments);
+}
+util.inherits(Prompt, Base);
+
+/**
+ * Start the Inquiry session
+ * @param {Function} cb Callback when prompt is done
+ * @return {this}
+ */
+
+Prompt.prototype._run = function (cb) {
+ this.done = cb;
+
+ var events = observe(this.rl);
+
+ // Once user confirm (enter key)
+ var submit = events.line.map(this.filterInput.bind(this));
+
+ var validation = this.handleSubmitEvents(submit);
+ validation.success.forEach(this.onEnd.bind(this));
+ validation.error.forEach(this.onError.bind(this));
+
+ if (this.opt.mask) {
+ events.keypress.takeUntil(validation.success).forEach(this.onKeypress.bind(this));
+ }
+
+ // Init
+ this.render();
+
+ return this;
+};
+
+/**
+ * Render the prompt to screen
+ * @return {Prompt} self
+ */
+
+Prompt.prototype.render = function (error) {
+ var message = this.getQuestion();
+ var bottomContent = '';
+
+ if (this.status === 'answered') {
+ message += this.opt.mask ? chalk.cyan(mask(this.answer, this.opt.mask)) : chalk.italic.dim('[hidden]');
+ } else if (this.opt.mask) {
+ message += mask(this.rl.line || '', this.opt.mask);
+ } else {
+ message += chalk.italic.dim('[input is hidden] ');
+ }
+
+ if (error) {
+ bottomContent = '\n' + chalk.red('>> ') + error;
+ }
+
+ this.screen.render(message, bottomContent);
+};
+
+/**
+ * When user press `enter` key
+ */
+
+Prompt.prototype.filterInput = function (input) {
+ if (!input) {
+ return this.opt.default == null ? '' : this.opt.default;
+ }
+ return input;
+};
+
+Prompt.prototype.onEnd = function (state) {
+ this.status = 'answered';
+ this.answer = state.value;
+
+ // Re-render prompt
+ this.render();
+
+ this.screen.done();
+ this.done(state.value);
+};
+
+Prompt.prototype.onError = function (state) {
+ this.render(state.isValid);
+};
+
+Prompt.prototype.onKeypress = function () {
+ this.render();
+};
diff --git a/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/rawlist.js b/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/rawlist.js
new file mode 100644
index 0000000000..15e99110b6
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/rawlist.js
@@ -0,0 +1,179 @@
+/**
+ * `rawlist` type prompt
+ */
+
+var _ = require('lodash');
+var util = require('util');
+var chalk = require('chalk');
+var Base = require('./base');
+var Separator = require('../objects/separator');
+var observe = require('../utils/events');
+var Paginator = require('../utils/paginator');
+
+/**
+ * Module exports
+ */
+
+module.exports = Prompt;
+
+/**
+ * Constructor
+ */
+
+function Prompt() {
+ Base.apply(this, arguments);
+
+ if (!this.opt.choices) {
+ this.throwParamError('choices');
+ }
+
+ this.opt.validChoices = this.opt.choices.filter(Separator.exclude);
+
+ this.selected = 0;
+ this.rawDefault = 0;
+
+ _.extend(this.opt, {
+ validate: function (val) {
+ return val != null;
+ }
+ });
+
+ var def = this.opt.default;
+ if (_.isNumber(def) && def >= 0 && def < this.opt.choices.realLength) {
+ this.selected = this.rawDefault = def;
+ }
+
+ // Make sure no default is set (so it won't be printed)
+ this.opt.default = null;
+
+ this.paginator = new Paginator();
+}
+util.inherits(Prompt, Base);
+
+/**
+ * Start the Inquiry session
+ * @param {Function} cb Callback when prompt is done
+ * @return {this}
+ */
+
+Prompt.prototype._run = function (cb) {
+ this.done = cb;
+
+ // Once user confirm (enter key)
+ var events = observe(this.rl);
+ var submit = events.line.map(this.getCurrentValue.bind(this));
+
+ var validation = this.handleSubmitEvents(submit);
+ validation.success.forEach(this.onEnd.bind(this));
+ validation.error.forEach(this.onError.bind(this));
+
+ events.keypress.takeUntil(validation.success).forEach(this.onKeypress.bind(this));
+
+ // Init the prompt
+ this.render();
+
+ return this;
+};
+
+/**
+ * Render the prompt to screen
+ * @return {Prompt} self
+ */
+
+Prompt.prototype.render = function (error) {
+ // Render question
+ var message = this.getQuestion();
+ var bottomContent = '';
+
+ if (this.status === 'answered') {
+ message += chalk.cyan(this.answer);
+ } else {
+ var choicesStr = renderChoices(this.opt.choices, this.selected);
+ message += this.paginator.paginate(choicesStr, this.selected, this.opt.pageSize);
+ message += '\n Answer: ';
+ }
+
+ message += this.rl.line;
+
+ if (error) {
+ bottomContent = '\n' + chalk.red('>> ') + error;
+ }
+
+ this.screen.render(message, bottomContent);
+};
+
+/**
+ * When user press `enter` key
+ */
+
+Prompt.prototype.getCurrentValue = function (index) {
+ if (index == null || index === '') {
+ index = this.rawDefault;
+ } else {
+ index -= 1;
+ }
+
+ var choice = this.opt.choices.getChoice(index);
+ return choice ? choice.value : null;
+};
+
+Prompt.prototype.onEnd = function (state) {
+ this.status = 'answered';
+ this.answer = state.value;
+
+ // Re-render prompt
+ this.render();
+
+ this.screen.done();
+ this.done(state.value);
+};
+
+Prompt.prototype.onError = function () {
+ this.render('Please enter a valid index');
+};
+
+/**
+ * When user press a key
+ */
+
+Prompt.prototype.onKeypress = function () {
+ var index = this.rl.line.length ? Number(this.rl.line) - 1 : 0;
+
+ if (this.opt.choices.getChoice(index)) {
+ this.selected = index;
+ } else {
+ this.selected = undefined;
+ }
+
+ this.render();
+};
+
+/**
+ * Function for rendering list choices
+ * @param {Number} pointer Position of the pointer
+ * @return {String} Rendered content
+ */
+
+function renderChoices(choices, pointer) {
+ var output = '';
+ var separatorOffset = 0;
+
+ choices.forEach(function (choice, i) {
+ output += '\n ';
+
+ if (choice.type === 'separator') {
+ separatorOffset++;
+ output += ' ' + choice;
+ return;
+ }
+
+ var index = i - separatorOffset;
+ var display = (index + 1) + ') ' + choice.name;
+ if (index === pointer) {
+ display = chalk.cyan(display);
+ }
+ output += display;
+ });
+
+ return output;
+}
diff --git a/tools/node_modules/eslint/node_modules/inquirer/lib/ui/baseUI.js b/tools/node_modules/eslint/node_modules/inquirer/lib/ui/baseUI.js
new file mode 100644
index 0000000000..98bb9a2897
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/inquirer/lib/ui/baseUI.js
@@ -0,0 +1,75 @@
+'use strict';
+var _ = require('lodash');
+var MuteStream = require('mute-stream');
+var readline = require('readline');
+
+/**
+ * Base interface class other can inherits from
+ */
+
+var UI = module.exports = function (opt) {
+ // Instantiate the Readline interface
+ // @Note: Don't reassign if already present (allow test to override the Stream)
+ if (!this.rl) {
+ this.rl = readline.createInterface(setupReadlineOptions(opt));
+ }
+ this.rl.resume();
+
+ this.onForceClose = this.onForceClose.bind(this);
+
+ // Make sure new prompt start on a newline when closing
+ process.on('exit', this.onForceClose);
+
+ // Terminate process on SIGINT (which will call process.on('exit') in return)
+ this.rl.on('SIGINT', this.onForceClose);
+};
+
+/**
+ * Handle the ^C exit
+ * @return {null}
+ */
+
+UI.prototype.onForceClose = function () {
+ this.close();
+ process.kill(process.pid, 'SIGINT');
+ console.log('');
+};
+
+/**
+ * Close the interface and cleanup listeners
+ */
+
+UI.prototype.close = function () {
+ // Remove events listeners
+ this.rl.removeListener('SIGINT', this.onForceClose);
+ process.removeListener('exit', this.onForceClose);
+
+ this.rl.output.unmute();
+
+ if (this.activePrompt && typeof this.activePrompt.close === 'function') {
+ this.activePrompt.close();
+ }
+
+ // Close the readline
+ this.rl.output.end();
+ this.rl.pause();
+ this.rl.close();
+};
+
+function setupReadlineOptions(opt) {
+ opt = opt || {};
+
+ // Default `input` to stdin
+ var input = opt.input || process.stdin;
+
+ // Add mute capabilities to the output
+ var ms = new MuteStream();
+ ms.pipe(opt.output || process.stdout);
+ var output = ms;
+
+ return _.extend({
+ terminal: true,
+ input: input,
+ output: output
+ }, _.omit(opt, ['input', 'output']));
+}
diff --git a/tools/node_modules/eslint/node_modules/inquirer/lib/ui/bottom-bar.js b/tools/node_modules/eslint/node_modules/inquirer/lib/ui/bottom-bar.js
new file mode 100644
index 0000000000..90f9b60d98
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/inquirer/lib/ui/bottom-bar.js
@@ -0,0 +1,106 @@
+/**
+ * Sticky bottom bar user interface
+ */
+
+var util = require('util');
+var through = require('through');
+var Base = require('./baseUI');
+var rlUtils = require('../utils/readline');
+var _ = require('lodash');
+
+/**
+ * Module exports
+ */
+
+module.exports = Prompt;
+
+/**
+ * Constructor
+ */
+
+function Prompt(opt) {
+ opt || (opt = {});
+
+ Base.apply(this, arguments);
+
+ this.log = through(this.writeLog.bind(this));
+ this.bottomBar = opt.bottomBar || '';
+ this.render();
+}
+util.inherits(Prompt, Base);
+
+/**
+ * Render the prompt to screen
+ * @return {Prompt} self
+ */
+
+Prompt.prototype.render = function () {
+ this.write(this.bottomBar);
+ return this;
+};
+
+Prompt.prototype.clean = function () {
+ rlUtils.clearLine(this.rl, this.bottomBar.split('\n').length);
+ return this;
+};
+
+/**
+ * Update the bottom bar content and rerender
+ * @param {String} bottomBar Bottom bar content
+ * @return {Prompt} self
+ */
+
+Prompt.prototype.updateBottomBar = function (bottomBar) {
+ rlUtils.clearLine(this.rl, 1);
+ this.rl.output.unmute();
+ this.clean();
+ this.bottomBar = bottomBar;
+ this.render();
+ this.rl.output.mute();
+ return this;
+};
+
+/**
+ * Write out log data
+ * @param {String} data - The log data to be output
+ * @return {Prompt} self
+ */
+
+Prompt.prototype.writeLog = function (data) {
+ this.rl.output.unmute();
+ this.clean();
+ this.rl.output.write(this.enforceLF(data.toString()));
+ this.render();
+ this.rl.output.mute();
+ return this;
+};
+
+/**
+ * Make sure line end on a line feed
+ * @param {String} str Input string
+ * @return {String} The input string with a final line feed
+ */
+
+Prompt.prototype.enforceLF = function (str) {
+ return str.match(/[\r\n]$/) ? str : str + '\n';
+};
+
+/**
+ * Helper for writing message in Prompt
+ * @param {Prompt} prompt - The Prompt object that extends tty
+ * @param {String} message - The message to be output
+ */
+Prompt.prototype.write = function (message) {
+ var msgLines = message.split(/\n/);
+ this.height = msgLines.length;
+
+ // Write message to screen and setPrompt to control backspace
+ this.rl.setPrompt(_.last(msgLines));
+
+ if (this.rl.output.rows === 0 && this.rl.output.columns === 0) {
+ /* When it's a tty through serial port there's no terminal info and the render will malfunction,
+ so we need enforce the cursor to locate to the leftmost position for rendering. */
+ rlUtils.left(this.rl, message.length + this.rl.line.length);
+ }
+ this.rl.output.write(message);
+};
diff --git a/tools/node_modules/eslint/node_modules/inquirer/lib/ui/prompt.js b/tools/node_modules/eslint/node_modules/inquirer/lib/ui/prompt.js
new file mode 100644
index 0000000000..9b56fe4dfe
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/inquirer/lib/ui/prompt.js
@@ -0,0 +1,115 @@
+'use strict';
+var _ = require('lodash');
+var rx = require('rx-lite-aggregates');
+var util = require('util');
+var runAsync = require('run-async');
+var utils = require('../utils/utils');
+var Base = require('./baseUI');
+
+/**
+ * Base interface class other can inherits from
+ */
+
+var PromptUI = module.exports = function (prompts, opt) {
+ Base.call(this, opt);
+ this.prompts = prompts;
+};
+util.inherits(PromptUI, Base);
+
+PromptUI.prototype.run = function (questions) {
+ // Keep global reference to the answers
+ this.answers = {};
+
+ // Make sure questions is an array.
+ if (_.isPlainObject(questions)) {
+ questions = [questions];
+ }
+
+ // Create an observable, unless we received one as parameter.
+ // Note: As this is a public interface, we cannot do an instanceof check as we won't
+ // be using the exact same object in memory.
+ var obs = _.isArray(questions) ? rx.Observable.from(questions) : questions;
+
+ this.process = obs
+ .concatMap(this.processQuestion.bind(this))
+ // `publish` creates a hot Observable. It prevents duplicating prompts.
+ .publish();
+
+ this.process.connect();
+
+ return this.process
+ .reduce(function (answers, answer) {
+ _.set(this.answers, answer.name, answer.answer);
+ return this.answers;
+ }.bind(this), {})
+ .toPromise(Promise)
+ .then(this.onCompletion.bind(this));
+};
+
+/**
+ * Once all prompt are over
+ */
+
+PromptUI.prototype.onCompletion = function (answers) {
+ this.close();
+
+ return answers;
+};
+
+PromptUI.prototype.processQuestion = function (question) {
+ question = _.clone(question);
+ return rx.Observable.defer(function () {
+ var obs = rx.Observable.of(question);
+
+ return obs
+ .concatMap(this.setDefaultType.bind(this))
+ .concatMap(this.filterIfRunnable.bind(this))
+ .concatMap(utils.fetchAsyncQuestionProperty.bind(null, question, 'message', this.answers))
+ .concatMap(utils.fetchAsyncQuestionProperty.bind(null, question, 'default', this.answers))
+ .concatMap(utils.fetchAsyncQuestionProperty.bind(null, question, 'choices', this.answers))
+ .concatMap(this.fetchAnswer.bind(this));
+ }.bind(this));
+};
+
+PromptUI.prototype.fetchAnswer = function (question) {
+ var Prompt = this.prompts[question.type];
+ this.activePrompt = new Prompt(question, this.rl, this.answers);
+ return rx.Observable.defer(function () {
+ return rx.Observable.fromPromise(this.activePrompt.run().then(function (answer) {
+ return {name: question.name, answer: answer};
+ }));
+ }.bind(this));
+};
+
+PromptUI.prototype.setDefaultType = function (question) {
+ // Default type to input
+ if (!this.prompts[question.type]) {
+ question.type = 'input';
+ }
+ return rx.Observable.defer(function () {
+ return rx.Observable.return(question);
+ });
+};
+
+PromptUI.prototype.filterIfRunnable = function (question) {
+ if (question.when === false) {
+ return rx.Observable.empty();
+ }
+
+ if (!_.isFunction(question.when)) {
+ return rx.Observable.return(question);
+ }
+
+ var answers = this.answers;
+ return rx.Observable.defer(function () {
+ return rx.Observable.fromPromise(
+ runAsync(question.when)(answers).then(function (shouldRun) {
+ if (shouldRun) {
+ return question;
+ }
+ })
+ ).filter(function (val) {
+ return val != null;
+ });
+ });
+};
diff --git a/tools/node_modules/eslint/node_modules/inquirer/lib/utils/events.js b/tools/node_modules/eslint/node_modules/inquirer/lib/utils/events.js
new file mode 100644
index 0000000000..3d2e147c59
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/inquirer/lib/utils/events.js
@@ -0,0 +1,45 @@
+'use strict';
+var rx = require('rx-lite-aggregates');
+
+function normalizeKeypressEvents(value, key) {
+ return {value: value, key: key || {}};
+}
+
+module.exports = function (rl) {
+ var keypress = rx.Observable.fromEvent(rl.input, 'keypress', normalizeKeypressEvents)
+ .filter(function (e) {
+ // Ignore `enter` key. On the readline, we only care about the `line` event.
+ return e.key.name !== 'enter' && e.key.name !== 'return';
+ });
+
+ return {
+ line: rx.Observable.fromEvent(rl, 'line'),
+ keypress: keypress,
+
+ normalizedUpKey: keypress.filter(function (e) {
+ return e.key.name === 'up' || e.key.name === 'k' || (e.key.name === 'p' && e.key.ctrl);
+ }).share(),
+
+ normalizedDownKey: keypress.filter(function (e) {
+ return e.key.name === 'down' || e.key.name === 'j' || (e.key.name === 'n' && e.key.ctrl);
+ }).share(),
+
+ numberKey: keypress.filter(function (e) {
+ return e.value && '123456789'.indexOf(e.value) >= 0;
+ }).map(function (e) {
+ return Number(e.value);
+ }).share(),
+
+ spaceKey: keypress.filter(function (e) {
+ return e.key && e.key.name === 'space';
+ }).share(),
+
+ aKey: keypress.filter(function (e) {
+ return e.key && e.key.name === 'a';
+ }).share(),
+
+ iKey: keypress.filter(function (e) {
+ return e.key && e.key.name === 'i';
+ }).share()
+ };
+};
diff --git a/tools/node_modules/eslint/node_modules/inquirer/lib/utils/paginator.js b/tools/node_modules/eslint/node_modules/inquirer/lib/utils/paginator.js
new file mode 100644
index 0000000000..fc7ebe0669
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/inquirer/lib/utils/paginator.js
@@ -0,0 +1,38 @@
+'use strict';
+
+var _ = require('lodash');
+var chalk = require('chalk');
+
+/**
+ * The paginator keeps track of a pointer index in a list and returns
+ * a subset of the choices if the list is too long.
+ */
+
+var Paginator = module.exports = function () {
+ this.pointer = 0;
+ this.lastIndex = 0;
+};
+
+Paginator.prototype.paginate = function (output, active, pageSize) {
+ pageSize = pageSize || 7;
+ var middleOfList = Math.floor(pageSize / 2);
+ var lines = output.split('\n');
+
+ // Make sure there's enough lines to paginate
+ if (lines.length <= pageSize) {
+ return output;
+ }
+
+ // Move the pointer only when the user go down and limit it to the middle of the list
+ if (this.pointer < middleOfList && this.lastIndex < active && active - this.lastIndex < pageSize) {
+ this.pointer = Math.min(middleOfList, this.pointer + active - this.lastIndex);
+ }
+ this.lastIndex = active;
+
+ // Duplicate the lines so it give an infinite list look
+ var infinite = _.flatten([lines, lines, lines]);
+ var topIndex = Math.max(0, active + lines.length - this.pointer);
+
+ var section = infinite.splice(topIndex, pageSize).join('\n');
+ return section + '\n' + chalk.dim('(Move up and down to reveal more choices)');
+};
diff --git a/tools/node_modules/eslint/node_modules/inquirer/lib/utils/readline.js b/tools/node_modules/eslint/node_modules/inquirer/lib/utils/readline.js
new file mode 100644
index 0000000000..092059b81d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/inquirer/lib/utils/readline.js
@@ -0,0 +1,51 @@
+'use strict';
+var ansiEscapes = require('ansi-escapes');
+
+/**
+ * Move cursor left by `x`
+ * @param {Readline} rl - Readline instance
+ * @param {Number} x - How far to go left (default to 1)
+ */
+
+exports.left = function (rl, x) {
+ rl.output.write(ansiEscapes.cursorBackward(x));
+};
+
+/**
+ * Move cursor right by `x`
+ * @param {Readline} rl - Readline instance
+ * @param {Number} x - How far to go left (default to 1)
+ */
+
+exports.right = function (rl, x) {
+ rl.output.write(ansiEscapes.cursorForward(x));
+};
+
+/**
+ * Move cursor up by `x`
+ * @param {Readline} rl - Readline instance
+ * @param {Number} x - How far to go up (default to 1)
+ */
+
+exports.up = function (rl, x) {
+ rl.output.write(ansiEscapes.cursorUp(x));
+};
+
+/**
+ * Move cursor down by `x`
+ * @param {Readline} rl - Readline instance
+ * @param {Number} x - How far to go down (default to 1)
+ */
+
+exports.down = function (rl, x) {
+ rl.output.write(ansiEscapes.cursorDown(x));
+};
+
+/**
+ * Clear current line
+ * @param {Readline} rl - Readline instance
+ * @param {Number} len - number of line to delete
+ */
+exports.clearLine = function (rl, len) {
+ rl.output.write(ansiEscapes.eraseLines(len));
+};
diff --git a/tools/node_modules/eslint/node_modules/inquirer/lib/utils/screen-manager.js b/tools/node_modules/eslint/node_modules/inquirer/lib/utils/screen-manager.js
new file mode 100644
index 0000000000..e5d60fd40a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/inquirer/lib/utils/screen-manager.js
@@ -0,0 +1,135 @@
+'use strict';
+var _ = require('lodash');
+var util = require('./readline');
+var cliWidth = require('cli-width');
+var stripAnsi = require('strip-ansi');
+var stringWidth = require('string-width');
+
+function height(content) {
+ return content.split('\n').length;
+}
+
+function lastLine(content) {
+ return _.last(content.split('\n'));
+}
+
+var ScreenManager = module.exports = function (rl) {
+ // These variables are keeping information to allow correct prompt re-rendering
+ this.height = 0;
+ this.extraLinesUnderPrompt = 0;
+
+ this.rl = rl;
+};
+
+ScreenManager.prototype.render = function (content, bottomContent) {
+ this.rl.output.unmute();
+ this.clean(this.extraLinesUnderPrompt);
+
+ /**
+ * Write message to screen and setPrompt to control backspace
+ */
+
+ var promptLine = lastLine(content);
+ var rawPromptLine = stripAnsi(promptLine);
+
+ // Remove the rl.line from our prompt. We can't rely on the content of
+ // rl.line (mainly because of the password prompt), so just rely on it's
+ // length.
+ var prompt = rawPromptLine;
+ if (this.rl.line.length) {
+ prompt = prompt.slice(0, -this.rl.line.length);
+ }
+ this.rl.setPrompt(prompt);
+
+ // setPrompt will change cursor position, now we can get correct value
+ var cursorPos = this.rl._getCursorPos();
+ var width = this.normalizedCliWidth();
+
+ content = forceLineReturn(content, width);
+ if (bottomContent) {
+ bottomContent = forceLineReturn(bottomContent, width);
+ }
+ // Manually insert an extra line if we're at the end of the line.
+ // This prevent the cursor from appearing at the beginning of the
+ // current line.
+ if (rawPromptLine.length % width === 0) {
+ content += '\n';
+ }
+ var fullContent = content + (bottomContent ? '\n' + bottomContent : '');
+ this.rl.output.write(fullContent);
+
+ /**
+ * Re-adjust the cursor at the correct position.
+ */
+
+ // We need to consider parts of the prompt under the cursor as part of the bottom
+ // content in order to correctly cleanup and re-render.
+ var promptLineUpDiff = Math.floor(rawPromptLine.length / width) - cursorPos.rows;
+ var bottomContentHeight = promptLineUpDiff + (bottomContent ? height(bottomContent) : 0);
+ if (bottomContentHeight > 0) {
+ util.up(this.rl, bottomContentHeight);
+ }
+
+ // Reset cursor at the beginning of the line
+ util.left(this.rl, stringWidth(lastLine(fullContent)));
+
+ // Adjust cursor on the right
+ util.right(this.rl, cursorPos.cols);
+
+ /**
+ * Set up state for next re-rendering
+ */
+ this.extraLinesUnderPrompt = bottomContentHeight;
+ this.height = height(fullContent);
+
+ this.rl.output.mute();
+};
+
+ScreenManager.prototype.clean = function (extraLines) {
+ if (extraLines > 0) {
+ util.down(this.rl, extraLines);
+ }
+ util.clearLine(this.rl, this.height);
+};
+
+ScreenManager.prototype.done = function () {
+ this.rl.setPrompt('');
+ this.rl.output.unmute();
+ this.rl.output.write('\n');
+};
+
+ScreenManager.prototype.releaseCursor = function () {
+ if (this.extraLinesUnderPrompt > 0) {
+ util.down(this.rl, this.extraLinesUnderPrompt);
+ }
+};
+
+ScreenManager.prototype.normalizedCliWidth = function () {
+ var width = cliWidth({
+ defaultWidth: 80,
+ output: this.rl.output
+ });
+ if (process.platform === 'win32') {
+ return width - 1;
+ }
+ return width;
+};
+
+function breakLines(lines, width) {
+ // Break lines who're longuer than the cli width so we can normalize the natural line
+ // returns behavior accross terminals.
+ var regex = new RegExp(
+ '(?:(?:\\033[[0-9;]*m)*.?){1,' + width + '}',
+ 'g'
+ );
+ return lines.map(function (line) {
+ var chunk = line.match(regex);
+ // last match is always empty
+ chunk.pop();
+ return chunk || '';
+ });
+}
+
+function forceLineReturn(content, width) {
+ return _.flatten(breakLines(content.split('\n'), width)).join('\n');
+}
diff --git a/tools/node_modules/eslint/node_modules/inquirer/lib/utils/utils.js b/tools/node_modules/eslint/node_modules/inquirer/lib/utils/utils.js
new file mode 100644
index 0000000000..63f20d77bb
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/inquirer/lib/utils/utils.js
@@ -0,0 +1,26 @@
+'use strict';
+var _ = require('lodash');
+var rx = require('rx-lite-aggregates');
+var runAsync = require('run-async');
+
+/**
+ * Resolve a question property value if it is passed as a function.
+ * This method will overwrite the property on the question object with the received value.
+ * @param {Object} question - Question object
+ * @param {String} prop - Property to fetch name
+ * @param {Object} answers - Answers object
+ * @return {rx.Obsersable} - Observable emitting once value is known
+ */
+
+exports.fetchAsyncQuestionProperty = function (question, prop, answers) {
+ if (!_.isFunction(question[prop])) {
+ return rx.Observable.return(question);
+ }
+
+ return rx.Observable.fromPromise(runAsync(question[prop])(answers)
+ .then(function (value) {
+ question[prop] = value;
+ return question;
+ })
+ );
+};
diff --git a/tools/node_modules/eslint/node_modules/inquirer/package.json b/tools/node_modules/eslint/node_modules/inquirer/package.json
new file mode 100644
index 0000000000..9f8c7255a7
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/inquirer/package.json
@@ -0,0 +1,94 @@
+{
+ "_from": "inquirer@^3.0.6",
+ "_id": "inquirer@3.3.0",
+ "_inBundle": false,
+ "_integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==",
+ "_location": "/eslint/inquirer",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "inquirer@^3.0.6",
+ "name": "inquirer",
+ "escapedName": "inquirer",
+ "rawSpec": "^3.0.6",
+ "saveSpec": null,
+ "fetchSpec": "^3.0.6"
+ },
+ "_requiredBy": [
+ "/eslint"
+ ],
+ "_resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz",
+ "_shasum": "9dd2f2ad765dcab1ff0443b491442a20ba227dc9",
+ "_spec": "inquirer@^3.0.6",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint",
+ "author": {
+ "name": "Simon Boudrias",
+ "email": "admin@simonboudrias.com"
+ },
+ "bugs": {
+ "url": "https://github.com/SBoudrias/Inquirer.js/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "ansi-escapes": "^3.0.0",
+ "chalk": "^2.0.0",
+ "cli-cursor": "^2.1.0",
+ "cli-width": "^2.0.0",
+ "external-editor": "^2.0.4",
+ "figures": "^2.0.0",
+ "lodash": "^4.3.0",
+ "mute-stream": "0.0.7",
+ "run-async": "^2.2.0",
+ "rx-lite": "^4.0.8",
+ "rx-lite-aggregates": "^4.0.8",
+ "string-width": "^2.1.0",
+ "strip-ansi": "^4.0.0",
+ "through": "^2.3.6"
+ },
+ "deprecated": false,
+ "description": "A collection of common interactive command line user interfaces.",
+ "devDependencies": {
+ "chai": "^4.0.1",
+ "cmdify": "^0.0.4",
+ "eslint": "^4.2.0",
+ "eslint-config-xo-space": "^0.16.0",
+ "gulp": "^3.9.0",
+ "gulp-codacy": "^1.0.0",
+ "gulp-coveralls": "^0.1.0",
+ "gulp-eslint": "^4.0.0",
+ "gulp-exclude-gitignore": "^1.0.0",
+ "gulp-istanbul": "^1.1.2",
+ "gulp-line-ending-corrector": "^1.0.1",
+ "gulp-mocha": "^3.0.0",
+ "gulp-nsp": "^2.1.0",
+ "gulp-plumber": "^1.0.0",
+ "mocha": "^3.4.2",
+ "mockery": "^2.1.0",
+ "sinon": "^3.0.0"
+ },
+ "files": [
+ "lib"
+ ],
+ "homepage": "https://github.com/SBoudrias/Inquirer.js#readme",
+ "keywords": [
+ "command",
+ "prompt",
+ "stdin",
+ "cli",
+ "tty",
+ "menu"
+ ],
+ "license": "MIT",
+ "main": "lib/inquirer.js",
+ "name": "inquirer",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/SBoudrias/Inquirer.js.git"
+ },
+ "scripts": {
+ "prepublish": "gulp prepublish",
+ "test": "gulp"
+ },
+ "version": "3.3.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/is-alphabetical/LICENSE b/tools/node_modules/eslint/node_modules/is-alphabetical/LICENSE
new file mode 100644
index 0000000000..8d8660d36e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-alphabetical/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2016 Titus Wormer <tituswormer@gmail.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/tools/node_modules/eslint/node_modules/is-alphabetical/index.js b/tools/node_modules/eslint/node_modules/is-alphabetical/index.js
new file mode 100644
index 0000000000..3b27588720
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-alphabetical/index.js
@@ -0,0 +1,13 @@
+'use strict';
+
+module.exports = alphabetical;
+
+/* Check if the given character code, or the character
+ * code at the first character, is alphabetical. */
+function alphabetical(character) {
+ var code = typeof character === 'string' ?
+ character.charCodeAt(0) : character;
+
+ return (code >= 97 && code <= 122) || /* a-z */
+ (code >= 65 && code <= 90); /* A-Z */
+}
diff --git a/tools/node_modules/eslint/node_modules/is-alphabetical/package.json b/tools/node_modules/eslint/node_modules/is-alphabetical/package.json
new file mode 100644
index 0000000000..2b7c5f293f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-alphabetical/package.json
@@ -0,0 +1,103 @@
+{
+ "_from": "is-alphabetical@^1.0.0",
+ "_id": "is-alphabetical@1.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-x3B5zJHU76x3W+EDS/LSQ/lebwg=",
+ "_location": "/is-alphabetical",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "is-alphabetical@^1.0.0",
+ "name": "is-alphabetical",
+ "escapedName": "is-alphabetical",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/is-alphanumerical",
+ "/remark-parse"
+ ],
+ "_resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.1.tgz",
+ "_shasum": "c77079cc91d4efac775be1034bf2d243f95e6f08",
+ "_spec": "is-alphabetical@^1.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/remark-parse",
+ "author": {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ },
+ "bugs": {
+ "url": "https://github.com/wooorm/is-alphabetical/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ }
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Check if a character is alphabetical",
+ "devDependencies": {
+ "browserify": "^14.1.0",
+ "esmangle": "^1.0.1",
+ "nyc": "^11.0.0",
+ "remark-cli": "^3.0.0",
+ "remark-preset-wooorm": "^3.0.0",
+ "tape": "^4.0.0",
+ "xo": "^0.18.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/wooorm/is-alphabetical#readme",
+ "keywords": [
+ "string",
+ "character",
+ "char",
+ "code",
+ "alphabetical"
+ ],
+ "license": "MIT",
+ "name": "is-alphabetical",
+ "nyc": {
+ "check-coverage": true,
+ "lines": 100,
+ "functions": 100,
+ "branches": 100
+ },
+ "remarkConfig": {
+ "plugins": [
+ "preset-wooorm"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/wooorm/is-alphabetical.git"
+ },
+ "scripts": {
+ "build": "npm run build-md && npm run build-bundle && npm run build-mangle",
+ "build-bundle": "browserify index.js --bare -s isAlphabetical > is-alphabetical.js",
+ "build-mangle": "esmangle < is-alphabetical.js > is-alphabetical.min.js",
+ "build-md": "remark . -qfo",
+ "lint": "xo",
+ "test": "npm run build && npm run lint && npm run test-coverage",
+ "test-api": "node test",
+ "test-coverage": "nyc --reporter lcov tape test.js"
+ },
+ "version": "1.0.1",
+ "xo": {
+ "space": true,
+ "esnext": false,
+ "rules": {
+ "capitalized-comments": "off"
+ },
+ "ignores": [
+ "is-alphabetical.js"
+ ]
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/is-alphabetical/readme.md b/tools/node_modules/eslint/node_modules/is-alphabetical/readme.md
new file mode 100644
index 0000000000..372b188378
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-alphabetical/readme.md
@@ -0,0 +1,57 @@
+# is-alphabetical [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov]
+
+Check if a character is alphabetical.
+
+## Installation
+
+[npm][]:
+
+```bash
+npm install is-alphabetical
+```
+
+## Usage
+
+```javascript
+var alphabetical = require('is-alphabetical');
+
+alphabetical('a'); // true
+alphabetical('B'); // true
+alphabetical('0'); // false
+alphabetical('💩'); // false
+```
+
+## API
+
+### `alphabetical(character|code)`
+
+Check whether the given character code (`number`), or the character
+code at the first position (`string`), is alphabetical.
+
+## Related
+
+* [`is-decimal`](https://github.com/wooorm/is-decimal)
+* [`is-hexadecimal`](https://github.com/wooorm/is-hexadecimal)
+* [`is-alphanumerical`](https://github.com/wooorm/is-alphanumerical)
+* [`is-whitespace-character`](https://github.com/wooorm/is-whitespace-character)
+* [`is-word-character`](https://github.com/wooorm/is-word-character)
+
+## License
+
+[MIT][license] © [Titus Wormer][author]
+
+<!-- Definitions -->
+
+[travis-badge]: https://img.shields.io/travis/wooorm/is-alphabetical.svg
+
+[travis]: https://travis-ci.org/wooorm/is-alphabetical
+
+[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/is-alphabetical.svg
+
+[codecov]: https://codecov.io/github/wooorm/is-alphabetical
+
+[npm]: https://docs.npmjs.com/cli/install
+
+[license]: LICENSE
+
+[author]: http://wooorm.com
diff --git a/tools/node_modules/eslint/node_modules/is-alphanumerical/LICENSE b/tools/node_modules/eslint/node_modules/is-alphanumerical/LICENSE
new file mode 100644
index 0000000000..8d8660d36e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-alphanumerical/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2016 Titus Wormer <tituswormer@gmail.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/tools/node_modules/eslint/node_modules/is-alphanumerical/index.js b/tools/node_modules/eslint/node_modules/is-alphanumerical/index.js
new file mode 100644
index 0000000000..441d6171fa
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-alphanumerical/index.js
@@ -0,0 +1,12 @@
+'use strict';
+
+var alphabetical = require('is-alphabetical');
+var decimal = require('is-decimal');
+
+module.exports = alphanumerical;
+
+/* Check if the given character code, or the character
+ * code at the first character, is alphanumerical. */
+function alphanumerical(character) {
+ return alphabetical(character) || decimal(character);
+}
diff --git a/tools/node_modules/eslint/node_modules/is-alphanumerical/package.json b/tools/node_modules/eslint/node_modules/is-alphanumerical/package.json
new file mode 100644
index 0000000000..9e09b23bb1
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-alphanumerical/package.json
@@ -0,0 +1,104 @@
+{
+ "_from": "is-alphanumerical@^1.0.0",
+ "_id": "is-alphanumerical@1.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-37SqTRCF4zvbYcLe6cgOnGwZ9Ts=",
+ "_location": "/is-alphanumerical",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "is-alphanumerical@^1.0.0",
+ "name": "is-alphanumerical",
+ "escapedName": "is-alphanumerical",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/parse-entities"
+ ],
+ "_resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.1.tgz",
+ "_shasum": "dfb4aa4d1085e33bdb61c2dee9c80e9c6c19f53b",
+ "_spec": "is-alphanumerical@^1.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/parse-entities",
+ "author": {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ },
+ "bugs": {
+ "url": "https://github.com/wooorm/is-alphanumerical/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ }
+ ],
+ "dependencies": {
+ "is-alphabetical": "^1.0.0",
+ "is-decimal": "^1.0.0"
+ },
+ "deprecated": false,
+ "description": "Check if a character is alphanumerical",
+ "devDependencies": {
+ "browserify": "^14.1.0",
+ "esmangle": "^1.0.1",
+ "nyc": "^11.0.0",
+ "remark-cli": "^3.0.0",
+ "remark-preset-wooorm": "^3.0.0",
+ "tape": "^4.0.0",
+ "xo": "^0.18.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/wooorm/is-alphanumerical#readme",
+ "keywords": [
+ "string",
+ "character",
+ "char",
+ "code",
+ "alphabetical",
+ "numerical",
+ "alphanumerical"
+ ],
+ "license": "MIT",
+ "name": "is-alphanumerical",
+ "nyc": {
+ "check-coverage": true,
+ "lines": 100,
+ "functions": 100,
+ "branches": 100
+ },
+ "remarkConfig": {
+ "plugins": [
+ "preset-wooorm"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/wooorm/is-alphanumerical.git"
+ },
+ "scripts": {
+ "build": "npm run build-md && npm run build-bundle && npm run build-mangle",
+ "build-bundle": "browserify index.js --bare -s isAlphanumerical > is-alphanumerical.js",
+ "build-mangle": "esmangle < is-alphanumerical.js > is-alphanumerical.min.js",
+ "build-md": "remark . -qfo",
+ "lint": "xo",
+ "test": "npm run build && npm run lint && npm run test-coverage",
+ "test-api": "node test",
+ "test-coverage": "nyc --reporter lcov tape test.js"
+ },
+ "version": "1.0.1",
+ "xo": {
+ "space": true,
+ "esnext": false,
+ "ignores": [
+ "is-alphanumerical.js"
+ ]
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/is-alphanumerical/readme.md b/tools/node_modules/eslint/node_modules/is-alphanumerical/readme.md
new file mode 100644
index 0000000000..9b1ffddddc
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-alphanumerical/readme.md
@@ -0,0 +1,58 @@
+# is-alphanumerical [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov]
+
+Check if a character is alphanumerical (`[a-zA-Z0-9]`).
+
+## Installation
+
+[npm][]:
+
+```bash
+npm install is-alphanumerical
+```
+
+## Usage
+
+```javascript
+var alphanumerical = require('is-alphanumerical');
+
+alphanumerical('a'); //=> true
+alphanumerical('Z'); //=> true
+alphanumerical('0'); //=> true
+alphanumerical(' '); //=> false
+alphanumerical('💩'); //=> false
+```
+
+## API
+
+### `alphanumerical(character)`
+
+Check whether the given character code (`number`), or the character
+code at the first position (`string`), is alphanumerical.
+
+## Related
+
+* [`is-alphabetical`](https://github.com/wooorm/is-alphabetical)
+* [`is-decimal`](https://github.com/wooorm/is-decimal)
+* [`is-hexadecimal`](https://github.com/wooorm/is-hexadecimal)
+* [`is-whitespace-character`](https://github.com/wooorm/is-whitespace-character)
+* [`is-word-character`](https://github.com/wooorm/is-word-character)
+
+## License
+
+[MIT][license] © [Titus Wormer][author]
+
+<!-- Definitions -->
+
+[travis-badge]: https://img.shields.io/travis/wooorm/is-alphanumerical.svg
+
+[travis]: https://travis-ci.org/wooorm/is-alphanumerical
+
+[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/is-alphanumerical.svg
+
+[codecov]: https://codecov.io/github/wooorm/is-alphanumerical
+
+[npm]: https://docs.npmjs.com/cli/install
+
+[license]: LICENSE
+
+[author]: http://wooorm.com
diff --git a/tools/node_modules/eslint/node_modules/is-buffer/LICENSE b/tools/node_modules/eslint/node_modules/is-buffer/LICENSE
new file mode 100644
index 0000000000..0c068ceecb
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-buffer/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Feross Aboukhadijeh
+
+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/tools/node_modules/eslint/node_modules/is-buffer/README.md b/tools/node_modules/eslint/node_modules/is-buffer/README.md
new file mode 100644
index 0000000000..cce0a8cf92
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-buffer/README.md
@@ -0,0 +1,53 @@
+# is-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]
+
+[travis-image]: https://img.shields.io/travis/feross/is-buffer/master.svg
+[travis-url]: https://travis-ci.org/feross/is-buffer
+[npm-image]: https://img.shields.io/npm/v/is-buffer.svg
+[npm-url]: https://npmjs.org/package/is-buffer
+[downloads-image]: https://img.shields.io/npm/dm/is-buffer.svg
+[downloads-url]: https://npmjs.org/package/is-buffer
+[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg
+[standard-url]: https://standardjs.com
+
+#### Determine if an object is a [`Buffer`](http://nodejs.org/api/buffer.html) (including the [browserify Buffer](https://github.com/feross/buffer))
+
+[![saucelabs][saucelabs-image]][saucelabs-url]
+
+[saucelabs-image]: https://saucelabs.com/browser-matrix/is-buffer.svg
+[saucelabs-url]: https://saucelabs.com/u/is-buffer
+
+## Why not use `Buffer.isBuffer`?
+
+This module lets you check if an object is a `Buffer` without using `Buffer.isBuffer` (which includes the whole [buffer](https://github.com/feross/buffer) module in [browserify](http://browserify.org/)).
+
+It's future-proof and works in node too!
+
+## install
+
+```bash
+npm install is-buffer
+```
+
+## usage
+
+```js
+var isBuffer = require('is-buffer')
+
+isBuffer(new Buffer(4)) // true
+
+isBuffer(undefined) // false
+isBuffer(null) // false
+isBuffer('') // false
+isBuffer(true) // false
+isBuffer(false) // false
+isBuffer(0) // false
+isBuffer(1) // false
+isBuffer(1.0) // false
+isBuffer('string') // false
+isBuffer({}) // false
+isBuffer(function foo () {}) // false
+```
+
+## license
+
+MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org).
diff --git a/tools/node_modules/eslint/node_modules/is-buffer/index.js b/tools/node_modules/eslint/node_modules/is-buffer/index.js
new file mode 100644
index 0000000000..9cce396594
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-buffer/index.js
@@ -0,0 +1,21 @@
+/*!
+ * Determine if an object is a Buffer
+ *
+ * @author Feross Aboukhadijeh <https://feross.org>
+ * @license MIT
+ */
+
+// The _isBuffer check is for Safari 5-7 support, because it's missing
+// Object.prototype.constructor. Remove this eventually
+module.exports = function (obj) {
+ return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)
+}
+
+function isBuffer (obj) {
+ return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)
+}
+
+// For Node v0.10 support. Remove this eventually.
+function isSlowBuffer (obj) {
+ return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))
+}
diff --git a/tools/node_modules/eslint/node_modules/is-buffer/package.json b/tools/node_modules/eslint/node_modules/is-buffer/package.json
new file mode 100644
index 0000000000..2d7a39434c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-buffer/package.json
@@ -0,0 +1,77 @@
+{
+ "_from": "is-buffer@^1.1.4",
+ "_id": "is-buffer@1.1.6",
+ "_inBundle": false,
+ "_integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
+ "_location": "/is-buffer",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "is-buffer@^1.1.4",
+ "name": "is-buffer",
+ "escapedName": "is-buffer",
+ "rawSpec": "^1.1.4",
+ "saveSpec": null,
+ "fetchSpec": "^1.1.4"
+ },
+ "_requiredBy": [
+ "/vfile"
+ ],
+ "_resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
+ "_shasum": "efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be",
+ "_spec": "is-buffer@^1.1.4",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/vfile",
+ "author": {
+ "name": "Feross Aboukhadijeh",
+ "email": "feross@feross.org",
+ "url": "http://feross.org/"
+ },
+ "bugs": {
+ "url": "https://github.com/feross/is-buffer/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Determine if an object is a Buffer",
+ "devDependencies": {
+ "standard": "*",
+ "tape": "^4.0.0",
+ "zuul": "^3.0.0"
+ },
+ "homepage": "https://github.com/feross/is-buffer#readme",
+ "keywords": [
+ "buffer",
+ "buffers",
+ "type",
+ "core buffer",
+ "browser buffer",
+ "browserify",
+ "typed array",
+ "uint32array",
+ "int16array",
+ "int32array",
+ "float32array",
+ "float64array",
+ "browser",
+ "arraybuffer",
+ "dataview"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "is-buffer",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/feross/is-buffer.git"
+ },
+ "scripts": {
+ "test": "standard && npm run test-node && npm run test-browser",
+ "test-browser": "zuul -- test/*.js",
+ "test-browser-local": "zuul --local -- test/*.js",
+ "test-node": "tape test/*.js"
+ },
+ "testling": {
+ "files": "test/*.js"
+ },
+ "version": "1.1.6"
+}
diff --git a/tools/node_modules/eslint/node_modules/is-decimal/LICENSE b/tools/node_modules/eslint/node_modules/is-decimal/LICENSE
new file mode 100644
index 0000000000..8d8660d36e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-decimal/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2016 Titus Wormer <tituswormer@gmail.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/tools/node_modules/eslint/node_modules/is-decimal/index.js b/tools/node_modules/eslint/node_modules/is-decimal/index.js
new file mode 100644
index 0000000000..e0940c040d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-decimal/index.js
@@ -0,0 +1,12 @@
+'use strict';
+
+module.exports = decimal;
+
+/* Check if the given character code, or the character
+ * code at the first character, is decimal. */
+function decimal(character) {
+ var code = typeof character === 'string' ?
+ character.charCodeAt(0) : character;
+
+ return code >= 48 && code <= 57; /* 0-9 */
+}
diff --git a/tools/node_modules/eslint/node_modules/is-decimal/package.json b/tools/node_modules/eslint/node_modules/is-decimal/package.json
new file mode 100644
index 0000000000..380f716406
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-decimal/package.json
@@ -0,0 +1,101 @@
+{
+ "_from": "is-decimal@^1.0.0",
+ "_id": "is-decimal@1.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-9ftqlJlq2ejjdh+/vQkfH8qMToI=",
+ "_location": "/is-decimal",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "is-decimal@^1.0.0",
+ "name": "is-decimal",
+ "escapedName": "is-decimal",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/is-alphanumerical",
+ "/parse-entities",
+ "/remark-parse"
+ ],
+ "_resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.1.tgz",
+ "_shasum": "f5fb6a94996ad9e8e3761fbfbd091f1fca8c4e82",
+ "_spec": "is-decimal@^1.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/remark-parse",
+ "author": {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ },
+ "bugs": {
+ "url": "https://github.com/wooorm/is-decimal/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ }
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Check if a character is decimal",
+ "devDependencies": {
+ "browserify": "^14.1.0",
+ "esmangle": "^1.0.1",
+ "nyc": "^11.0.0",
+ "remark-cli": "^3.0.0",
+ "remark-preset-wooorm": "^3.0.0",
+ "tape": "^4.0.0",
+ "xo": "^0.18.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/wooorm/is-decimal#readme",
+ "keywords": [
+ "string",
+ "character",
+ "char",
+ "code",
+ "decimal"
+ ],
+ "license": "MIT",
+ "name": "is-decimal",
+ "nyc": {
+ "check-coverage": true,
+ "lines": 100,
+ "functions": 100,
+ "branches": 100
+ },
+ "remarkConfig": {
+ "plugins": [
+ "preset-wooorm"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/wooorm/is-decimal.git"
+ },
+ "scripts": {
+ "build": "npm run build-md && npm run build-bundle && npm run build-mangle",
+ "build-bundle": "browserify index.js --bare -s isDecimal > is-decimal.js",
+ "build-mangle": "esmangle < is-decimal.js > is-decimal.min.js",
+ "build-md": "remark . -qfo",
+ "lint": "xo",
+ "test": "npm run build && npm run lint && npm run test-coverage",
+ "test-api": "node test",
+ "test-coverage": "nyc --reporter lcov tape test.js"
+ },
+ "version": "1.0.1",
+ "xo": {
+ "space": true,
+ "esnext": false,
+ "ignores": [
+ "is-decimal.js"
+ ]
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/is-decimal/readme.md b/tools/node_modules/eslint/node_modules/is-decimal/readme.md
new file mode 100644
index 0000000000..5d5de46683
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-decimal/readme.md
@@ -0,0 +1,56 @@
+# is-decimal [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov]
+
+Check if a character is decimal.
+
+## Installation
+
+[npm][]:
+
+```bash
+npm install is-decimal
+```
+
+## Usage
+
+```javascript
+var decimal = require('is-decimal');
+
+decimal('0'); //=> true
+decimal('9'); //=> true
+decimal('a'); //=> false
+decimal('💩'); //=> false
+```
+
+## API
+
+### `decimal(character|code)`
+
+Check whether the given character code (`number`), or the character
+code at the first position (`string`), is decimal.
+
+## Related
+
+* [`is-alphabetical`](https://github.com/wooorm/is-alphabetical)
+* [`is-hexadecimal`](https://github.com/wooorm/is-hexadecimal)
+* [`is-whitespace-character`](https://github.com/wooorm/is-whitespace-character)
+* [`is-word-character`](https://github.com/wooorm/is-word-character)
+
+## License
+
+[MIT][license] © [Titus Wormer][author]
+
+<!-- Definitions -->
+
+[travis-badge]: https://img.shields.io/travis/wooorm/is-decimal.svg
+
+[travis]: https://travis-ci.org/wooorm/is-decimal
+
+[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/is-decimal.svg
+
+[codecov]: https://codecov.io/github/wooorm/is-decimal
+
+[npm]: https://docs.npmjs.com/cli/install
+
+[license]: LICENSE
+
+[author]: http://wooorm.com
diff --git a/tools/node_modules/eslint/node_modules/is-fullwidth-code-point/index.js b/tools/node_modules/eslint/node_modules/is-fullwidth-code-point/index.js
new file mode 100644
index 0000000000..d506327c3e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-fullwidth-code-point/index.js
@@ -0,0 +1,46 @@
+'use strict';
+/* eslint-disable yoda */
+module.exports = x => {
+ if (Number.isNaN(x)) {
+ return false;
+ }
+
+ // code points are derived from:
+ // http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt
+ if (
+ x >= 0x1100 && (
+ x <= 0x115f || // Hangul Jamo
+ x === 0x2329 || // LEFT-POINTING ANGLE BRACKET
+ x === 0x232a || // RIGHT-POINTING ANGLE BRACKET
+ // CJK Radicals Supplement .. Enclosed CJK Letters and Months
+ (0x2e80 <= x && x <= 0x3247 && x !== 0x303f) ||
+ // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
+ (0x3250 <= x && x <= 0x4dbf) ||
+ // CJK Unified Ideographs .. Yi Radicals
+ (0x4e00 <= x && x <= 0xa4c6) ||
+ // Hangul Jamo Extended-A
+ (0xa960 <= x && x <= 0xa97c) ||
+ // Hangul Syllables
+ (0xac00 <= x && x <= 0xd7a3) ||
+ // CJK Compatibility Ideographs
+ (0xf900 <= x && x <= 0xfaff) ||
+ // Vertical Forms
+ (0xfe10 <= x && x <= 0xfe19) ||
+ // CJK Compatibility Forms .. Small Form Variants
+ (0xfe30 <= x && x <= 0xfe6b) ||
+ // Halfwidth and Fullwidth Forms
+ (0xff01 <= x && x <= 0xff60) ||
+ (0xffe0 <= x && x <= 0xffe6) ||
+ // Kana Supplement
+ (0x1b000 <= x && x <= 0x1b001) ||
+ // Enclosed Ideographic Supplement
+ (0x1f200 <= x && x <= 0x1f251) ||
+ // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
+ (0x20000 <= x && x <= 0x3fffd)
+ )
+ ) {
+ return true;
+ }
+
+ return false;
+};
diff --git a/tools/node_modules/eslint/node_modules/is-fullwidth-code-point/license b/tools/node_modules/eslint/node_modules/is-fullwidth-code-point/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-fullwidth-code-point/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/tools/node_modules/eslint/node_modules/is-fullwidth-code-point/package.json b/tools/node_modules/eslint/node_modules/is-fullwidth-code-point/package.json
new file mode 100644
index 0000000000..065e24d458
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-fullwidth-code-point/package.json
@@ -0,0 +1,78 @@
+{
+ "_from": "is-fullwidth-code-point@^2.0.0",
+ "_id": "is-fullwidth-code-point@2.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+ "_location": "/eslint/is-fullwidth-code-point",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "is-fullwidth-code-point@^2.0.0",
+ "name": "is-fullwidth-code-point",
+ "escapedName": "is-fullwidth-code-point",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/eslint/slice-ansi",
+ "/eslint/string-width"
+ ],
+ "_resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+ "_shasum": "a3b30a5c4f199183167aaab93beefae3ddfb654f",
+ "_spec": "is-fullwidth-code-point@^2.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/string-width",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/is-fullwidth-code-point/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Check if the character represented by a given Unicode code point is fullwidth",
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/is-fullwidth-code-point#readme",
+ "keywords": [
+ "fullwidth",
+ "full-width",
+ "full",
+ "width",
+ "unicode",
+ "character",
+ "char",
+ "string",
+ "str",
+ "codepoint",
+ "code",
+ "point",
+ "is",
+ "detect",
+ "check"
+ ],
+ "license": "MIT",
+ "name": "is-fullwidth-code-point",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/is-fullwidth-code-point.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "2.0.0",
+ "xo": {
+ "esnext": true
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/is-fullwidth-code-point/readme.md b/tools/node_modules/eslint/node_modules/is-fullwidth-code-point/readme.md
new file mode 100644
index 0000000000..093b0281b2
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-fullwidth-code-point/readme.md
@@ -0,0 +1,39 @@
+# is-fullwidth-code-point [![Build Status](https://travis-ci.org/sindresorhus/is-fullwidth-code-point.svg?branch=master)](https://travis-ci.org/sindresorhus/is-fullwidth-code-point)
+
+> Check if the character represented by a given [Unicode code point](https://en.wikipedia.org/wiki/Code_point) is [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms)
+
+
+## Install
+
+```
+$ npm install --save is-fullwidth-code-point
+```
+
+
+## Usage
+
+```js
+const isFullwidthCodePoint = require('is-fullwidth-code-point');
+
+isFullwidthCodePoint('谢'.codePointAt());
+//=> true
+
+isFullwidthCodePoint('a'.codePointAt());
+//=> false
+```
+
+
+## API
+
+### isFullwidthCodePoint(input)
+
+#### input
+
+Type: `number`
+
+[Code point](https://en.wikipedia.org/wiki/Code_point) of a character.
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/tools/node_modules/eslint/node_modules/is-hexadecimal/LICENSE b/tools/node_modules/eslint/node_modules/is-hexadecimal/LICENSE
new file mode 100644
index 0000000000..8d8660d36e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-hexadecimal/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2016 Titus Wormer <tituswormer@gmail.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/tools/node_modules/eslint/node_modules/is-hexadecimal/index.js b/tools/node_modules/eslint/node_modules/is-hexadecimal/index.js
new file mode 100644
index 0000000000..533e74a67f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-hexadecimal/index.js
@@ -0,0 +1,14 @@
+'use strict';
+
+module.exports = hexadecimal;
+
+/* Check if the given character code, or the character
+ * code at the first character, is hexadecimal. */
+function hexadecimal(character) {
+ var code = typeof character === 'string' ?
+ character.charCodeAt(0) : character;
+
+ return (code >= 97 /* a */ && code <= 102 /* z */) ||
+ (code >= 65 /* A */ && code <= 70 /* Z */) ||
+ (code >= 48 /* A */ && code <= 57 /* Z */);
+}
diff --git a/tools/node_modules/eslint/node_modules/is-hexadecimal/package.json b/tools/node_modules/eslint/node_modules/is-hexadecimal/package.json
new file mode 100644
index 0000000000..7542414a9d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-hexadecimal/package.json
@@ -0,0 +1,99 @@
+{
+ "_from": "is-hexadecimal@^1.0.0",
+ "_id": "is-hexadecimal@1.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-bghLvJIGH7sJcexYts5tQE4k2mk=",
+ "_location": "/is-hexadecimal",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "is-hexadecimal@^1.0.0",
+ "name": "is-hexadecimal",
+ "escapedName": "is-hexadecimal",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/parse-entities"
+ ],
+ "_resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.1.tgz",
+ "_shasum": "6e084bbc92061fbb0971ec58b6ce6d404e24da69",
+ "_spec": "is-hexadecimal@^1.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/parse-entities",
+ "author": {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ },
+ "bugs": {
+ "url": "https://github.com/wooorm/is-hexadecimal/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ }
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Check if a character is hexadecimal",
+ "devDependencies": {
+ "browserify": "^14.1.0",
+ "esmangle": "^1.0.1",
+ "nyc": "^11.0.0",
+ "remark-cli": "^3.0.0",
+ "remark-preset-wooorm": "^3.0.0",
+ "tape": "^4.0.0",
+ "xo": "^0.18.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/wooorm/is-hexadecimal#readme",
+ "keywords": [
+ "string",
+ "character",
+ "char",
+ "code",
+ "hexadecimal"
+ ],
+ "license": "MIT",
+ "name": "is-hexadecimal",
+ "nyc": {
+ "check-coverage": true,
+ "lines": 100,
+ "functions": 100,
+ "branches": 100
+ },
+ "remarkConfig": {
+ "plugins": [
+ "preset-wooorm"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/wooorm/is-hexadecimal.git"
+ },
+ "scripts": {
+ "build": "npm run build-md && npm run build-bundle && npm run build-mangle",
+ "build-bundle": "browserify index.js --bare -s isHexadecimal > is-hexadecimal.js",
+ "build-mangle": "esmangle < is-hexadecimal.js > is-hexadecimal.min.js",
+ "build-md": "remark . -qfo",
+ "lint": "xo",
+ "test": "npm run build && npm run lint && npm run test-coverage",
+ "test-api": "node test",
+ "test-coverage": "nyc --reporter lcov tape test.js"
+ },
+ "version": "1.0.1",
+ "xo": {
+ "space": true,
+ "esnext": false,
+ "ignores": [
+ "is-hexadecimal.js"
+ ]
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/is-hexadecimal/readme.md b/tools/node_modules/eslint/node_modules/is-hexadecimal/readme.md
new file mode 100644
index 0000000000..5c4b6e63d2
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-hexadecimal/readme.md
@@ -0,0 +1,57 @@
+# is-hexadecimal [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov]
+
+Check if a character is hexadecimal.
+
+## Installation
+
+[npm][]:
+
+```bash
+npm install is-hexadecimal
+```
+
+## Usage
+
+```javascript
+var hexadecimal = require('is-hexadecimal');
+
+hexadecimal('a'); //=> true
+hexadecimal('0'); //=> true
+hexadecimal('G'); //=> false
+hexadecimal('💩'); //=> false
+```
+
+## API
+
+### `hexadecimal(character|code)`
+
+Check whether the given character code (`number`), or the character
+code at the first position (`string`), is hexadecimal.
+
+## Related
+
+* [`is-alphabetical`](https://github.com/wooorm/is-alphabetical)
+* [`is-alphanumerical`](https://github.com/wooorm/is-alphabetical)
+* [`is-decimal`](https://github.com/wooorm/is-decimal)
+* [`is-whitespace-character`](https://github.com/wooorm/is-whitespace-character)
+* [`is-word-character`](https://github.com/wooorm/is-word-character)
+
+## License
+
+[MIT][license] © [Titus Wormer][author]
+
+<!-- Definitions -->
+
+[travis-badge]: https://img.shields.io/travis/wooorm/is-hexadecimal.svg
+
+[travis]: https://travis-ci.org/wooorm/is-hexadecimal
+
+[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/is-hexadecimal.svg
+
+[codecov]: https://codecov.io/github/wooorm/is-hexadecimal
+
+[npm]: https://docs.npmjs.com/cli/install
+
+[license]: LICENSE
+
+[author]: http://wooorm.com
diff --git a/tools/node_modules/eslint/node_modules/is-path-cwd/index.js b/tools/node_modules/eslint/node_modules/is-path-cwd/index.js
new file mode 100644
index 0000000000..24b6fdea37
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-path-cwd/index.js
@@ -0,0 +1,6 @@
+'use strict';
+var path = require('path');
+
+module.exports = function (str) {
+ return path.resolve(str) === path.resolve(process.cwd());
+};
diff --git a/tools/node_modules/eslint/node_modules/is-path-cwd/package.json b/tools/node_modules/eslint/node_modules/is-path-cwd/package.json
new file mode 100644
index 0000000000..b68f13924d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-path-cwd/package.json
@@ -0,0 +1,65 @@
+{
+ "_from": "is-path-cwd@^1.0.0",
+ "_id": "is-path-cwd@1.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=",
+ "_location": "/eslint/is-path-cwd",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "is-path-cwd@^1.0.0",
+ "name": "is-path-cwd",
+ "escapedName": "is-path-cwd",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/eslint/del"
+ ],
+ "_resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz",
+ "_shasum": "d225ec23132e89edd38fda767472e62e65f1106d",
+ "_spec": "is-path-cwd@^1.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/del",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "http://sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/is-path-cwd/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Check if a path is CWD",
+ "devDependencies": {
+ "mocha": "*"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/is-path-cwd#readme",
+ "keywords": [
+ "path",
+ "cwd",
+ "pwd",
+ "check",
+ "filepath",
+ "file",
+ "folder"
+ ],
+ "license": "MIT",
+ "name": "is-path-cwd",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/is-path-cwd.git"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "version": "1.0.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/is-path-cwd/readme.md b/tools/node_modules/eslint/node_modules/is-path-cwd/readme.md
new file mode 100644
index 0000000000..2d9d65f989
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-path-cwd/readme.md
@@ -0,0 +1,28 @@
+# is-path-cwd [![Build Status](https://travis-ci.org/sindresorhus/is-path-cwd.svg?branch=master)](https://travis-ci.org/sindresorhus/is-path-cwd)
+
+> Check if a path is [CWD](http://en.wikipedia.org/wiki/Working_directory)
+
+
+## Install
+
+```sh
+$ npm install --save is-path-cwd
+```
+
+
+## Usage
+
+```js
+var isPathCwd = require('is-path-cwd');
+
+isPathCwd(process.cwd());
+//=> true
+
+isPathCwd('unicorn');
+//=> false
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/tools/node_modules/eslint/node_modules/is-path-in-cwd/index.js b/tools/node_modules/eslint/node_modules/is-path-in-cwd/index.js
new file mode 100644
index 0000000000..75611656ae
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-path-in-cwd/index.js
@@ -0,0 +1,6 @@
+'use strict';
+var isPathInside = require('is-path-inside');
+
+module.exports = function (str) {
+ return isPathInside(str, process.cwd());
+};
diff --git a/tools/node_modules/eslint/node_modules/is-path-in-cwd/package.json b/tools/node_modules/eslint/node_modules/is-path-in-cwd/package.json
new file mode 100644
index 0000000000..49d3d4e9f1
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-path-in-cwd/package.json
@@ -0,0 +1,70 @@
+{
+ "_from": "is-path-in-cwd@^1.0.0",
+ "_id": "is-path-in-cwd@1.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=",
+ "_location": "/eslint/is-path-in-cwd",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "is-path-in-cwd@^1.0.0",
+ "name": "is-path-in-cwd",
+ "escapedName": "is-path-in-cwd",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/eslint/del"
+ ],
+ "_resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz",
+ "_shasum": "6477582b8214d602346094567003be8a9eac04dc",
+ "_spec": "is-path-in-cwd@^1.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/del",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "http://sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/is-path-in-cwd/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "is-path-inside": "^1.0.0"
+ },
+ "deprecated": false,
+ "description": "Check if a path is in the current working directory",
+ "devDependencies": {
+ "mocha": "*"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/is-path-in-cwd#readme",
+ "keywords": [
+ "path",
+ "cwd",
+ "pwd",
+ "check",
+ "filepath",
+ "file",
+ "folder",
+ "in",
+ "inside"
+ ],
+ "license": "MIT",
+ "name": "is-path-in-cwd",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/is-path-in-cwd.git"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "version": "1.0.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/is-path-in-cwd/readme.md b/tools/node_modules/eslint/node_modules/is-path-in-cwd/readme.md
new file mode 100644
index 0000000000..4e4f3a8838
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-path-in-cwd/readme.md
@@ -0,0 +1,28 @@
+# is-path-in-cwd [![Build Status](https://travis-ci.org/sindresorhus/is-path-in-cwd.svg?branch=master)](https://travis-ci.org/sindresorhus/is-path-in-cwd)
+
+> Check if a path is in the [current working directory](http://en.wikipedia.org/wiki/Working_directory)
+
+
+## Install
+
+```sh
+$ npm install --save is-path-in-cwd
+```
+
+
+## Usage
+
+```js
+var isPathInCwd = require('is-path-in-cwd');
+
+isPathInCwd('unicorn');
+//=> true
+
+isPathInCwd('../rainbow');
+//=> false
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/tools/node_modules/eslint/node_modules/is-path-inside/index.js b/tools/node_modules/eslint/node_modules/is-path-inside/index.js
new file mode 100644
index 0000000000..0a4d2fd1e5
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-path-inside/index.js
@@ -0,0 +1,14 @@
+'use strict';
+var path = require('path');
+var pathIsInside = require('path-is-inside');
+
+module.exports = function (a, b) {
+ a = path.resolve(a);
+ b = path.resolve(b);
+
+ if (a === b) {
+ return false;
+ }
+
+ return pathIsInside(a, b);
+};
diff --git a/tools/node_modules/eslint/node_modules/is-path-inside/package.json b/tools/node_modules/eslint/node_modules/is-path-inside/package.json
new file mode 100644
index 0000000000..eb4e3c2ee1
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-path-inside/package.json
@@ -0,0 +1,68 @@
+{
+ "_from": "is-path-inside@^1.0.0",
+ "_id": "is-path-inside@1.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-/AbloWg/vaE95mev9xe7wQpI838=",
+ "_location": "/eslint/is-path-inside",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "is-path-inside@^1.0.0",
+ "name": "is-path-inside",
+ "escapedName": "is-path-inside",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/eslint/is-path-in-cwd"
+ ],
+ "_resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.0.tgz",
+ "_shasum": "fc06e5a1683fbda13de667aff717bbc10a48f37f",
+ "_spec": "is-path-inside@^1.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/is-path-in-cwd",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "http://sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/is-path-inside/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "path-is-inside": "^1.0.1"
+ },
+ "deprecated": false,
+ "description": "Check if a path is inside another path",
+ "devDependencies": {
+ "mocha": "*"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/is-path-inside#readme",
+ "keywords": [
+ "path",
+ "inside",
+ "folder",
+ "directory",
+ "dir",
+ "file",
+ "resolve"
+ ],
+ "license": "MIT",
+ "name": "is-path-inside",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/is-path-inside.git"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "version": "1.0.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/is-path-inside/readme.md b/tools/node_modules/eslint/node_modules/is-path-inside/readme.md
new file mode 100644
index 0000000000..0e4eb74f75
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-path-inside/readme.md
@@ -0,0 +1,31 @@
+# is-path-inside [![Build Status](https://travis-ci.org/sindresorhus/is-path-inside.svg?branch=master)](https://travis-ci.org/sindresorhus/is-path-inside)
+
+> Check if a path is inside another path
+
+
+## Install
+
+```sh
+$ npm install --save is-path-inside
+```
+
+
+## Usage
+
+```js
+var isPathInside = require('is-path-inside');
+
+isPathInside('a/b', 'a/b/c');
+//=> true
+
+isPathInside('x/y', 'a/b/c');
+//=> false
+
+isPathInside('a/b/c', 'a/b/c');
+//=> false
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/tools/node_modules/eslint/node_modules/is-plain-obj/index.js b/tools/node_modules/eslint/node_modules/is-plain-obj/index.js
new file mode 100644
index 0000000000..0d1ba9eeb8
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-plain-obj/index.js
@@ -0,0 +1,7 @@
+'use strict';
+var toString = Object.prototype.toString;
+
+module.exports = function (x) {
+ var prototype;
+ return toString.call(x) === '[object Object]' && (prototype = Object.getPrototypeOf(x), prototype === null || prototype === Object.getPrototypeOf({}));
+};
diff --git a/tools/node_modules/eslint/node_modules/is-plain-obj/license b/tools/node_modules/eslint/node_modules/is-plain-obj/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-plain-obj/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/tools/node_modules/eslint/node_modules/is-plain-obj/package.json b/tools/node_modules/eslint/node_modules/is-plain-obj/package.json
new file mode 100644
index 0000000000..4f165ae708
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-plain-obj/package.json
@@ -0,0 +1,68 @@
+{
+ "_from": "is-plain-obj@^1.1.0",
+ "_id": "is-plain-obj@1.1.0",
+ "_inBundle": false,
+ "_integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=",
+ "_location": "/is-plain-obj",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "is-plain-obj@^1.1.0",
+ "name": "is-plain-obj",
+ "escapedName": "is-plain-obj",
+ "rawSpec": "^1.1.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.1.0"
+ },
+ "_requiredBy": [
+ "/unified"
+ ],
+ "_resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz",
+ "_shasum": "71a50c8429dfca773c92a390a4a03b39fcd51d3e",
+ "_spec": "is-plain-obj@^1.1.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/unified",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/is-plain-obj/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Check if a value is a plain object",
+ "devDependencies": {
+ "ava": "0.0.4"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/is-plain-obj#readme",
+ "keywords": [
+ "obj",
+ "object",
+ "is",
+ "check",
+ "test",
+ "type",
+ "plain",
+ "vanilla",
+ "pure",
+ "simple"
+ ],
+ "license": "MIT",
+ "name": "is-plain-obj",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/is-plain-obj.git"
+ },
+ "scripts": {
+ "test": "node test.js"
+ },
+ "version": "1.1.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/is-plain-obj/readme.md b/tools/node_modules/eslint/node_modules/is-plain-obj/readme.md
new file mode 100644
index 0000000000..269e56aeff
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-plain-obj/readme.md
@@ -0,0 +1,35 @@
+# is-plain-obj [![Build Status](https://travis-ci.org/sindresorhus/is-plain-obj.svg?branch=master)](https://travis-ci.org/sindresorhus/is-plain-obj)
+
+> Check if a value is a plain object
+
+An object is plain if it's created by either `{}`, `new Object()` or `Object.create(null)`.
+
+
+## Install
+
+```
+$ npm install --save is-plain-obj
+```
+
+
+## Usage
+
+```js
+var isPlainObj = require('is-plain-obj');
+
+isPlainObj({foo: 'bar'});
+//=> true
+
+isPlainObj([1, 2, 3]);
+//=> false
+```
+
+
+## Related
+
+- [is-obj](https://github.com/sindresorhus/is-obj) - Check if a value is an object
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/tools/node_modules/eslint/node_modules/is-promise/LICENSE b/tools/node_modules/eslint/node_modules/is-promise/LICENSE
new file mode 100644
index 0000000000..27cc9f3771
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-promise/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/tools/node_modules/eslint/node_modules/is-promise/index.js b/tools/node_modules/eslint/node_modules/is-promise/index.js
new file mode 100644
index 0000000000..ca2444c6f6
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-promise/index.js
@@ -0,0 +1,5 @@
+module.exports = isPromise;
+
+function isPromise(obj) {
+ return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
+}
diff --git a/tools/node_modules/eslint/node_modules/is-promise/package.json b/tools/node_modules/eslint/node_modules/is-promise/package.json
new file mode 100644
index 0000000000..d8d6694f4c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-promise/package.json
@@ -0,0 +1,50 @@
+{
+ "_from": "is-promise@^2.1.0",
+ "_id": "is-promise@2.1.0",
+ "_inBundle": false,
+ "_integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=",
+ "_location": "/eslint/is-promise",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "is-promise@^2.1.0",
+ "name": "is-promise",
+ "escapedName": "is-promise",
+ "rawSpec": "^2.1.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.1.0"
+ },
+ "_requiredBy": [
+ "/eslint/run-async"
+ ],
+ "_resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz",
+ "_shasum": "79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa",
+ "_spec": "is-promise@^2.1.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/run-async",
+ "author": {
+ "name": "ForbesLindesay"
+ },
+ "bugs": {
+ "url": "https://github.com/then/is-promise/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Test whether an object looks like a promises-a+ promise",
+ "devDependencies": {
+ "better-assert": "~0.1.0",
+ "mocha": "~1.7.4"
+ },
+ "homepage": "https://github.com/then/is-promise#readme",
+ "license": "MIT",
+ "main": "index.js",
+ "name": "is-promise",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/then/is-promise.git"
+ },
+ "scripts": {
+ "test": "mocha -R spec"
+ },
+ "version": "2.1.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/is-promise/readme.md b/tools/node_modules/eslint/node_modules/is-promise/readme.md
new file mode 100644
index 0000000000..50d5d98911
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-promise/readme.md
@@ -0,0 +1,29 @@
+<a href="http://promises-aplus.github.com/promises-spec"><img src="http://promises-aplus.github.com/promises-spec/assets/logo-small.png" align="right" /></a>
+# is-promise
+
+ Test whether an object looks like a promises-a+ promise
+
+ [![Build Status](https://img.shields.io/travis/then/is-promise/master.svg)](https://travis-ci.org/then/is-promise)
+ [![Dependency Status](https://img.shields.io/gemnasium/then/is-promise.svg)](https://gemnasium.com/then/is-promise)
+ [![NPM version](https://img.shields.io/npm/v/is-promise.svg)](https://www.npmjs.org/package/is-promise)
+
+## Installation
+
+ $ npm install is-promise
+
+You can also use it client side via npm.
+
+## API
+
+```javascript
+var isPromise = require('is-promise');
+
+isPromise({then:function () {...}});//=>true
+isPromise(null);//=>false
+isPromise({});//=>false
+isPromise({then: true})//=>false
+```
+
+## License
+
+ MIT
diff --git a/tools/node_modules/eslint/node_modules/is-resolvable/LICENSE b/tools/node_modules/eslint/node_modules/is-resolvable/LICENSE
new file mode 100644
index 0000000000..d9ef73fd74
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-resolvable/LICENSE
@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 - 2015 Shinnosuke Watanabe
+
+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/tools/node_modules/eslint/node_modules/is-resolvable/README.md b/tools/node_modules/eslint/node_modules/is-resolvable/README.md
new file mode 100755
index 0000000000..ac9da31205
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-resolvable/README.md
@@ -0,0 +1,68 @@
+# is-resolvable
+
+[![NPM version](https://img.shields.io/npm/v/is-resolvable.svg)](https://www.npmjs.com/package/is-resolvable)
+[![Build Status](https://travis-ci.org/shinnn/is-resolvable.svg?branch=master)](https://travis-ci.org/shinnn/is-resolvable)
+[![Build status](https://ci.appveyor.com/api/projects/status/ww1cdpignehlasbs?svg=true)](https://ci.appveyor.com/project/ShinnosukeWatanabe/is-resolvable)
+[![Coverage Status](https://img.shields.io/coveralls/shinnn/is-resolvable.svg)](https://coveralls.io/r/shinnn/is-resolvable)
+[![Dependency Status](https://img.shields.io/david/shinnn/is-resolvable.svg?label=deps)](https://david-dm.org/shinnn/is-resolvable)
+[![devDependency Status](https://img.shields.io/david/dev/shinnn/is-resolvable.svg?label=devDeps)](https://david-dm.org/shinnn/is-resolvable#info=devDependencies)
+
+A [Node](https://nodejs.org/) module to check if a module ID is resolvable with [`require()`](https://nodejs.org/api/globals.html#globals_require)
+
+```javascript
+const isResolvable = require('is-resolvable');
+
+isResolvable('fs'); //=> true
+isResolvable('path'); //=> true
+
+// When `./index.js` exists
+isResolvable('./index.js') //=> true
+isResolvable('./index') //=> true
+isResolvable('.') //=> true
+```
+
+## Installation
+
+[Use npm.](https://docs.npmjs.com/cli/install)
+
+```
+npm install is-resolvable
+```
+
+## API
+
+```javascript
+const isResolvable = require('is-resolvable');
+```
+
+### isResolvable(*moduleId*)
+
+*moduleId*: `String` (module ID)
+Return: `Boolean`
+
+It returns `true` if `require()` can load a file form a given module ID, otherwise `false`.
+
+```javascript
+const isResolvable = require('is-resolvable');
+
+// When `./foo.json` exists
+isResolvable('./foo.json'); //=> true
+isResolvable('./foo'); //=> true
+
+isResolvable('./foo.js'); //=> false
+
+
+// When `lodash` module is installed but `underscore` isn't
+isResolvable('lodash'); //=> true
+isResolvable('underscore'); //=> false
+
+// When `readable-stream` module is installed
+isResolvable('readable-stream/readable'); //=> true
+isResolvable('readable-stream/writable'); //=> true
+```
+
+## License
+
+Copyright (c) 2014 - 2015 [Shinnosuke Watanabe](https://github.com/shinnn)
+
+Licensed under [the MIT License](./LICENSE).
diff --git a/tools/node_modules/eslint/node_modules/is-resolvable/index.js b/tools/node_modules/eslint/node_modules/is-resolvable/index.js
new file mode 100755
index 0000000000..807817b937
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-resolvable/index.js
@@ -0,0 +1,26 @@
+'use strict';
+
+var tryit = require('tryit');
+
+module.exports = function isResolvable(moduleId) {
+ if (typeof moduleId !== 'string') {
+ throw new TypeError(
+ moduleId +
+ ' is not a string. A module identifier to be checked if resolvable is required.'
+ );
+ }
+
+ var result;
+ tryit(function() {
+ require.resolve(moduleId);
+ }, function(err) {
+ if (err) {
+ result = false;
+ return;
+ }
+
+ result = true;
+ });
+
+ return result;
+};
diff --git a/tools/node_modules/eslint/node_modules/is-resolvable/package.json b/tools/node_modules/eslint/node_modules/is-resolvable/package.json
new file mode 100644
index 0000000000..821009d1a1
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-resolvable/package.json
@@ -0,0 +1,73 @@
+{
+ "_from": "is-resolvable@^1.0.0",
+ "_id": "is-resolvable@1.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-jfV8YeouPFAUCNEA+wE8+NbgzGI=",
+ "_location": "/eslint/is-resolvable",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "is-resolvable@^1.0.0",
+ "name": "is-resolvable",
+ "escapedName": "is-resolvable",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/eslint"
+ ],
+ "_resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.0.0.tgz",
+ "_shasum": "8df57c61ea2e3c501408d100fb013cf8d6e0cc62",
+ "_spec": "is-resolvable@^1.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint",
+ "author": {
+ "name": "Shinnosuke Watanabe",
+ "url": "https://github.com/shinnn"
+ },
+ "bugs": {
+ "url": "https://github.com/shinnn/is-resolvable/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "tryit": "^1.0.1"
+ },
+ "deprecated": false,
+ "description": "Check if a module ID is resolvable with require()",
+ "devDependencies": {
+ "@shinnn/eslintrc-node": "^1.0.2",
+ "eslint": "^0.24.0",
+ "istanbul": "^0.3.17",
+ "tape": "^4.0.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/shinnn/is-resolvable#readme",
+ "keywords": [
+ "read",
+ "file",
+ "font",
+ "glyph",
+ "code-point",
+ "unicode",
+ "parse",
+ "cmap",
+ "table",
+ "data",
+ "metadata"
+ ],
+ "license": "MIT",
+ "name": "is-resolvable",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/shinnn/is-resolvable.git"
+ },
+ "scripts": {
+ "coverage": "istanbul cover test.js",
+ "pretest": "eslint --config node_modules/@shinnn/eslintrc-node/rc.json index.js test.js",
+ "test": "node test.js"
+ },
+ "version": "1.0.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/is-whitespace-character/LICENSE b/tools/node_modules/eslint/node_modules/is-whitespace-character/LICENSE
new file mode 100644
index 0000000000..8d8660d36e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-whitespace-character/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2016 Titus Wormer <tituswormer@gmail.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/tools/node_modules/eslint/node_modules/is-whitespace-character/index.js b/tools/node_modules/eslint/node_modules/is-whitespace-character/index.js
new file mode 100644
index 0000000000..57d4ca68eb
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-whitespace-character/index.js
@@ -0,0 +1,14 @@
+'use strict';
+
+module.exports = whitespace;
+
+var fromCode = String.fromCharCode;
+var re = /\s/;
+
+/* Check if the given character code, or the character
+ * code at the first character, is a whitespace character. */
+function whitespace(character) {
+ return re.test(
+ typeof character === 'number' ? fromCode(character) : character.charAt(0)
+ );
+}
diff --git a/tools/node_modules/eslint/node_modules/is-whitespace-character/package.json b/tools/node_modules/eslint/node_modules/is-whitespace-character/package.json
new file mode 100644
index 0000000000..97d676c307
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-whitespace-character/package.json
@@ -0,0 +1,101 @@
+{
+ "_from": "is-whitespace-character@^1.0.0",
+ "_id": "is-whitespace-character@1.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-muAXbzKCtlRXoZks2whPil+DPjs=",
+ "_location": "/is-whitespace-character",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "is-whitespace-character@^1.0.0",
+ "name": "is-whitespace-character",
+ "escapedName": "is-whitespace-character",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/remark-parse"
+ ],
+ "_resolved": "https://registry.npmjs.org/is-whitespace-character/-/is-whitespace-character-1.0.1.tgz",
+ "_shasum": "9ae0176f3282b65457a1992cdb084f8a5f833e3b",
+ "_spec": "is-whitespace-character@^1.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/remark-parse",
+ "author": {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ },
+ "bugs": {
+ "url": "https://github.com/wooorm/is-whitespace-character/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ }
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Check if a character is a whitespace character",
+ "devDependencies": {
+ "browserify": "^14.1.0",
+ "esmangle": "^1.0.1",
+ "nyc": "^11.0.0",
+ "remark-cli": "^3.0.0",
+ "remark-preset-wooorm": "^3.0.0",
+ "tape": "^4.0.0",
+ "xo": "^0.18.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/wooorm/is-whitespace-character#readme",
+ "keywords": [
+ "string",
+ "character",
+ "char",
+ "code",
+ "whitespace",
+ "white",
+ "space"
+ ],
+ "license": "MIT",
+ "name": "is-whitespace-character",
+ "nyc": {
+ "check-coverage": true,
+ "lines": 100,
+ "functions": 100,
+ "branches": 100
+ },
+ "remarkConfig": {
+ "plugins": [
+ "preset-wooorm"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/wooorm/is-whitespace-character.git"
+ },
+ "scripts": {
+ "build": "npm run build-md && npm run build-bundle && npm run build-mangle",
+ "build-bundle": "browserify index.js --bare -s isWhitespaceCharacter > is-whitespace-character.js",
+ "build-mangle": "esmangle < is-whitespace-character.js > is-whitespace-character.min.js",
+ "build-md": "remark . -qfo",
+ "lint": "xo",
+ "test": "npm run build && npm run lint && npm run test-coverage",
+ "test-api": "node test",
+ "test-coverage": "nyc --reporter lcov tape test.js"
+ },
+ "version": "1.0.1",
+ "xo": {
+ "space": true,
+ "esnext": false,
+ "ignores": [
+ "is-whitespace-character.js"
+ ]
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/is-whitespace-character/readme.md b/tools/node_modules/eslint/node_modules/is-whitespace-character/readme.md
new file mode 100644
index 0000000000..171c2071fa
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-whitespace-character/readme.md
@@ -0,0 +1,61 @@
+# is-whitespace-character [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov]
+
+Check if a character is a whitespace character: `\s`, which equals
+all Unicode Space Separators (including `[ \t\v\f]`), the BOM
+(`\uFEFF`), and line terminator (`[\n\r\u2028\u2029]`).
+
+## Installation
+
+[npm][]:
+
+```bash
+npm install is-whitespace-character
+```
+
+## Usage
+
+```javascript
+var whitespace = require('is-whitespace-character');
+
+whitespace(' '); // true
+whitespace('\n'); // true
+whitespace('\ufeff'); // true
+whitespace('_'); // false
+whitespace('a'); // true
+whitespace('💩'); // false
+```
+
+## API
+
+### `whitespaceCharacter(character|code)`
+
+Check whether the given character code (`number`), or the character
+code at the first position (`string`), is a whitespace character.
+
+## Related
+
+* [`is-alphabetical`](https://github.com/wooorm/is-alphabetical)
+* [`is-alphanumerical`](https://github.com/wooorm/is-alphanumerical)
+* [`is-decimal`](https://github.com/wooorm/is-decimal)
+* [`is-hexadecimal`](https://github.com/wooorm/is-hexadecimal)
+* [`is-word-character`](https://github.com/wooorm/is-word-character)
+
+## License
+
+[MIT][license] © [Titus Wormer][author]
+
+<!-- Definitions -->
+
+[travis-badge]: https://img.shields.io/travis/wooorm/is-whitespace-character.svg
+
+[travis]: https://travis-ci.org/wooorm/is-whitespace-character
+
+[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/is-whitespace-character.svg
+
+[codecov]: https://codecov.io/github/wooorm/is-whitespace-character
+
+[npm]: https://docs.npmjs.com/cli/install
+
+[license]: LICENSE
+
+[author]: http://wooorm.com
diff --git a/tools/node_modules/eslint/node_modules/is-word-character/LICENSE b/tools/node_modules/eslint/node_modules/is-word-character/LICENSE
new file mode 100644
index 0000000000..8d8660d36e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-word-character/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2016 Titus Wormer <tituswormer@gmail.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/tools/node_modules/eslint/node_modules/is-word-character/index.js b/tools/node_modules/eslint/node_modules/is-word-character/index.js
new file mode 100644
index 0000000000..9641147437
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-word-character/index.js
@@ -0,0 +1,14 @@
+'use strict';
+
+module.exports = wordCharacter;
+
+var fromCode = String.fromCharCode;
+var re = /\w/;
+
+/* Check if the given character code, or the character
+ * code at the first character, is a word character. */
+function wordCharacter(character) {
+ return re.test(
+ typeof character === 'number' ? fromCode(character) : character.charAt(0)
+ );
+}
diff --git a/tools/node_modules/eslint/node_modules/is-word-character/package.json b/tools/node_modules/eslint/node_modules/is-word-character/package.json
new file mode 100644
index 0000000000..f61477be62
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-word-character/package.json
@@ -0,0 +1,99 @@
+{
+ "_from": "is-word-character@^1.0.0",
+ "_id": "is-word-character@1.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-WgP6HqkazopusMfNdw64bWXIvvs=",
+ "_location": "/is-word-character",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "is-word-character@^1.0.0",
+ "name": "is-word-character",
+ "escapedName": "is-word-character",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/remark-parse"
+ ],
+ "_resolved": "https://registry.npmjs.org/is-word-character/-/is-word-character-1.0.1.tgz",
+ "_shasum": "5a03fa1ea91ace8a6eb0c7cd770eb86d65c8befb",
+ "_spec": "is-word-character@^1.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/remark-parse",
+ "author": {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ },
+ "bugs": {
+ "url": "https://github.com/wooorm/is-word-character/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ }
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Check if a character is a word character",
+ "devDependencies": {
+ "browserify": "^14.1.0",
+ "esmangle": "^1.0.1",
+ "nyc": "^11.0.0",
+ "remark-cli": "^3.0.0",
+ "remark-preset-wooorm": "^3.0.0",
+ "tape": "^4.0.0",
+ "xo": "^0.18.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/wooorm/is-word-character#readme",
+ "keywords": [
+ "string",
+ "character",
+ "char",
+ "code",
+ "word"
+ ],
+ "license": "MIT",
+ "name": "is-word-character",
+ "nyc": {
+ "check-coverage": true,
+ "lines": 100,
+ "functions": 100,
+ "branches": 100
+ },
+ "remarkConfig": {
+ "plugins": [
+ "preset-wooorm"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/wooorm/is-word-character.git"
+ },
+ "scripts": {
+ "build": "npm run build-md && npm run build-bundle && npm run build-mangle",
+ "build-bundle": "browserify index.js --bare -s isWordCharacter > is-word-character.js",
+ "build-mangle": "esmangle < is-word-character.js > is-word-character.min.js",
+ "build-md": "remark . -qfo",
+ "lint": "xo",
+ "test": "npm run build && npm run lint && npm run test-coverage",
+ "test-api": "node test",
+ "test-coverage": "nyc --reporter lcov tape test.js"
+ },
+ "version": "1.0.1",
+ "xo": {
+ "space": true,
+ "esnext": false,
+ "ignores": [
+ "is-word-character.js"
+ ]
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/is-word-character/readme.md b/tools/node_modules/eslint/node_modules/is-word-character/readme.md
new file mode 100644
index 0000000000..acf4f2a011
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-word-character/readme.md
@@ -0,0 +1,60 @@
+# is-word-character [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov]
+
+Check if a character is a word character (`\w`, which equals
+`[a-zA-Z0-9_]`).
+
+## Installation
+
+[npm][]:
+
+```bash
+npm install is-word-character
+```
+
+## Usage
+
+```javascript
+var wordCharacter = require('is-word-character');
+
+wordCharacter('a'); //=> true
+wordCharacter('Z'); //=> true
+wordCharacter('0'); //=> true
+wordCharacter('_'); //=> true
+wordCharacter(' '); //=> false
+wordCharacter('💩'); //=> false
+```
+
+## API
+
+### `wordCharacter(character|code)`
+
+Check whether the given character code (`number`), or the character
+code at the first position (`string`), is a word character.
+
+## Related
+
+* [`is-alphabetical`](https://github.com/wooorm/is-alphabetical)
+* [`is-alphanumerical`](https://github.com/wooorm/is-alphanumerical)
+* [`is-decimal`](https://github.com/wooorm/is-decimal)
+* [`is-hexadecimal`](https://github.com/wooorm/is-hexadecimal)
+* [`is-whitespace-character`](https://github.com/wooorm/is-whitespace-character)
+
+## License
+
+[MIT][license] © [Titus Wormer][author]
+
+<!-- Definitions -->
+
+[travis-badge]: https://img.shields.io/travis/wooorm/is-word-character.svg
+
+[travis]: https://travis-ci.org/wooorm/is-word-character
+
+[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/is-word-character.svg
+
+[codecov]: https://codecov.io/github/wooorm/is-word-character
+
+[npm]: https://docs.npmjs.com/cli/install
+
+[license]: LICENSE
+
+[author]: http://wooorm.com
diff --git a/tools/node_modules/eslint/node_modules/isarray/Makefile b/tools/node_modules/eslint/node_modules/isarray/Makefile
new file mode 100644
index 0000000000..787d56e1e9
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/isarray/Makefile
@@ -0,0 +1,6 @@
+
+test:
+ @node_modules/.bin/tape test.js
+
+.PHONY: test
+
diff --git a/tools/node_modules/eslint/node_modules/isarray/README.md b/tools/node_modules/eslint/node_modules/isarray/README.md
new file mode 100644
index 0000000000..16d2c59c61
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/isarray/README.md
@@ -0,0 +1,60 @@
+
+# isarray
+
+`Array#isArray` for older browsers.
+
+[![build status](https://secure.travis-ci.org/juliangruber/isarray.svg)](http://travis-ci.org/juliangruber/isarray)
+[![downloads](https://img.shields.io/npm/dm/isarray.svg)](https://www.npmjs.org/package/isarray)
+
+[![browser support](https://ci.testling.com/juliangruber/isarray.png)
+](https://ci.testling.com/juliangruber/isarray)
+
+## 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 &lt;julian@juliangruber.com&gt;
+
+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/tools/node_modules/eslint/node_modules/isarray/index.js b/tools/node_modules/eslint/node_modules/isarray/index.js
new file mode 100644
index 0000000000..a57f634959
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/isarray/index.js
@@ -0,0 +1,5 @@
+var toString = {}.toString;
+
+module.exports = Array.isArray || function (arr) {
+ return toString.call(arr) == '[object Array]';
+};
diff --git a/tools/node_modules/eslint/node_modules/isarray/package.json b/tools/node_modules/eslint/node_modules/isarray/package.json
new file mode 100644
index 0000000000..f74a162203
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/isarray/package.json
@@ -0,0 +1,73 @@
+{
+ "_from": "isarray@~1.0.0",
+ "_id": "isarray@1.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
+ "_location": "/eslint/isarray",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "isarray@~1.0.0",
+ "name": "isarray",
+ "escapedName": "isarray",
+ "rawSpec": "~1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "~1.0.0"
+ },
+ "_requiredBy": [
+ "/eslint/readable-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+ "_shasum": "bb935d48582cba168c06834957a54a3e07124f11",
+ "_spec": "isarray@~1.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/readable-stream",
+ "author": {
+ "name": "Julian Gruber",
+ "email": "mail@juliangruber.com",
+ "url": "http://juliangruber.com"
+ },
+ "bugs": {
+ "url": "https://github.com/juliangruber/isarray/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Array#isArray for older browsers",
+ "devDependencies": {
+ "tape": "~2.13.4"
+ },
+ "homepage": "https://github.com/juliangruber/isarray",
+ "keywords": [
+ "browser",
+ "isarray",
+ "array"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "isarray",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/juliangruber/isarray.git"
+ },
+ "scripts": {
+ "test": "tape test.js"
+ },
+ "testling": {
+ "files": "test.js",
+ "browsers": [
+ "ie/8..latest",
+ "firefox/17..latest",
+ "firefox/nightly",
+ "chrome/22..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.0.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/isexe/LICENSE b/tools/node_modules/eslint/node_modules/isexe/LICENSE
new file mode 100644
index 0000000000..19129e315f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/isexe/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/tools/node_modules/eslint/node_modules/isexe/README.md b/tools/node_modules/eslint/node_modules/isexe/README.md
new file mode 100644
index 0000000000..35769e8440
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/isexe/README.md
@@ -0,0 +1,51 @@
+# isexe
+
+Minimal module to check if a file is executable, and a normal file.
+
+Uses `fs.stat` and tests against the `PATHEXT` environment variable on
+Windows.
+
+## USAGE
+
+```javascript
+var isexe = require('isexe')
+isexe('some-file-name', function (err, isExe) {
+ if (err) {
+ console.error('probably file does not exist or something', err)
+ } else if (isExe) {
+ console.error('this thing can be run')
+ } else {
+ console.error('cannot be run')
+ }
+})
+
+// same thing but synchronous, throws errors
+var isExe = isexe.sync('some-file-name')
+
+// treat errors as just "not executable"
+isexe('maybe-missing-file', { ignoreErrors: true }, callback)
+var isExe = isexe.sync('maybe-missing-file', { ignoreErrors: true })
+```
+
+## API
+
+### `isexe(path, [options], [callback])`
+
+Check if the path is executable. If no callback provided, and a
+global `Promise` object is available, then a Promise will be returned.
+
+Will raise whatever errors may be raised by `fs.stat`, unless
+`options.ignoreErrors` is set to true.
+
+### `isexe.sync(path, [options])`
+
+Same as `isexe` but returns the value and throws any errors raised.
+
+### Options
+
+* `ignoreErrors` Treat all errors as "no, this is not executable", but
+ don't raise them.
+* `uid` Number to use as the user id
+* `gid` Number to use as the group id
+* `pathExt` List of path extensions to use instead of `PATHEXT`
+ environment variable on Windows.
diff --git a/tools/node_modules/eslint/node_modules/isexe/index.js b/tools/node_modules/eslint/node_modules/isexe/index.js
new file mode 100644
index 0000000000..553fb32b11
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/isexe/index.js
@@ -0,0 +1,57 @@
+var fs = require('fs')
+var core
+if (process.platform === 'win32' || global.TESTING_WINDOWS) {
+ core = require('./windows.js')
+} else {
+ core = require('./mode.js')
+}
+
+module.exports = isexe
+isexe.sync = sync
+
+function isexe (path, options, cb) {
+ if (typeof options === 'function') {
+ cb = options
+ options = {}
+ }
+
+ if (!cb) {
+ if (typeof Promise !== 'function') {
+ throw new TypeError('callback not provided')
+ }
+
+ return new Promise(function (resolve, reject) {
+ isexe(path, options || {}, function (er, is) {
+ if (er) {
+ reject(er)
+ } else {
+ resolve(is)
+ }
+ })
+ })
+ }
+
+ core(path, options || {}, function (er, is) {
+ // ignore EACCES because that just means we aren't allowed to run it
+ if (er) {
+ if (er.code === 'EACCES' || options && options.ignoreErrors) {
+ er = null
+ is = false
+ }
+ }
+ cb(er, is)
+ })
+}
+
+function sync (path, options) {
+ // my kingdom for a filtered catch
+ try {
+ return core.sync(path, options || {})
+ } catch (er) {
+ if (options && options.ignoreErrors || er.code === 'EACCES') {
+ return false
+ } else {
+ throw er
+ }
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/isexe/mode.js b/tools/node_modules/eslint/node_modules/isexe/mode.js
new file mode 100644
index 0000000000..1995ea4a06
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/isexe/mode.js
@@ -0,0 +1,41 @@
+module.exports = isexe
+isexe.sync = sync
+
+var fs = require('fs')
+
+function isexe (path, options, cb) {
+ fs.stat(path, function (er, stat) {
+ cb(er, er ? false : checkStat(stat, options))
+ })
+}
+
+function sync (path, options) {
+ return checkStat(fs.statSync(path), options)
+}
+
+function checkStat (stat, options) {
+ return stat.isFile() && checkMode(stat, options)
+}
+
+function checkMode (stat, options) {
+ var mod = stat.mode
+ var uid = stat.uid
+ var gid = stat.gid
+
+ var myUid = options.uid !== undefined ?
+ options.uid : process.getuid && process.getuid()
+ var myGid = options.gid !== undefined ?
+ options.gid : process.getgid && process.getgid()
+
+ var u = parseInt('100', 8)
+ var g = parseInt('010', 8)
+ var o = parseInt('001', 8)
+ var ug = u | g
+
+ var ret = (mod & o) ||
+ (mod & g) && gid === myGid ||
+ (mod & u) && uid === myUid ||
+ (mod & ug) && myUid === 0
+
+ return ret
+}
diff --git a/tools/node_modules/eslint/node_modules/isexe/package.json b/tools/node_modules/eslint/node_modules/isexe/package.json
new file mode 100644
index 0000000000..2235ef4f6d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/isexe/package.json
@@ -0,0 +1,60 @@
+{
+ "_from": "isexe@^2.0.0",
+ "_id": "isexe@2.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
+ "_location": "/eslint/isexe",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "isexe@^2.0.0",
+ "name": "isexe",
+ "escapedName": "isexe",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/eslint/which"
+ ],
+ "_resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
+ "_shasum": "e8fbf374dc556ff8947a10dcb0572d633f2cfa10",
+ "_spec": "isexe@^2.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/which",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "bugs": {
+ "url": "https://github.com/isaacs/isexe/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Minimal module to check if a file is executable.",
+ "devDependencies": {
+ "mkdirp": "^0.5.1",
+ "rimraf": "^2.5.0",
+ "tap": "^10.3.0"
+ },
+ "directories": {
+ "test": "test"
+ },
+ "homepage": "https://github.com/isaacs/isexe#readme",
+ "keywords": [],
+ "license": "ISC",
+ "main": "index.js",
+ "name": "isexe",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/isaacs/isexe.git"
+ },
+ "scripts": {
+ "postpublish": "git push origin --all; git push origin --tags",
+ "postversion": "npm publish",
+ "preversion": "npm test",
+ "test": "tap test/*.js --100"
+ },
+ "version": "2.0.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/isexe/windows.js b/tools/node_modules/eslint/node_modules/isexe/windows.js
new file mode 100644
index 0000000000..34996734d8
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/isexe/windows.js
@@ -0,0 +1,42 @@
+module.exports = isexe
+isexe.sync = sync
+
+var fs = require('fs')
+
+function checkPathExt (path, options) {
+ var pathext = options.pathExt !== undefined ?
+ options.pathExt : process.env.PATHEXT
+
+ if (!pathext) {
+ return true
+ }
+
+ pathext = pathext.split(';')
+ if (pathext.indexOf('') !== -1) {
+ return true
+ }
+ for (var i = 0; i < pathext.length; i++) {
+ var p = pathext[i].toLowerCase()
+ if (p && path.substr(-p.length).toLowerCase() === p) {
+ return true
+ }
+ }
+ return false
+}
+
+function checkStat (stat, path, options) {
+ if (!stat.isSymbolicLink() && !stat.isFile()) {
+ return false
+ }
+ return checkPathExt(path, options)
+}
+
+function isexe (path, options, cb) {
+ fs.stat(path, function (er, stat) {
+ cb(er, er ? false : checkStat(stat, path, options))
+ })
+}
+
+function sync (path, options) {
+ return checkStat(fs.statSync(path), path, options)
+}
diff --git a/tools/node_modules/eslint/node_modules/js-tokens/LICENSE b/tools/node_modules/eslint/node_modules/js-tokens/LICENSE
new file mode 100644
index 0000000000..748f42e87d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-tokens/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014, 2015, 2016, 2017 Simon Lydell
+
+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/tools/node_modules/eslint/node_modules/js-tokens/index.js b/tools/node_modules/eslint/node_modules/js-tokens/index.js
new file mode 100644
index 0000000000..a3c8a0d7bd
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-tokens/index.js
@@ -0,0 +1,23 @@
+// Copyright 2014, 2015, 2016, 2017 Simon Lydell
+// License: MIT. (See LICENSE.)
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+})
+
+// This regex comes from regex.coffee, and is inserted here by generate-index.js
+// (run `npm run build`).
+exports.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyu]{1,5}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g
+
+exports.matchToToken = function(match) {
+ var token = {type: "invalid", value: match[0]}
+ if (match[ 1]) token.type = "string" , token.closed = !!(match[3] || match[4])
+ else if (match[ 5]) token.type = "comment"
+ else if (match[ 6]) token.type = "comment", token.closed = !!match[7]
+ else if (match[ 8]) token.type = "regex"
+ else if (match[ 9]) token.type = "number"
+ else if (match[10]) token.type = "name"
+ else if (match[11]) token.type = "punctuator"
+ else if (match[12]) token.type = "whitespace"
+ return token
+}
diff --git a/tools/node_modules/eslint/node_modules/js-tokens/package.json b/tools/node_modules/eslint/node_modules/js-tokens/package.json
new file mode 100644
index 0000000000..11a804e1bf
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-tokens/package.json
@@ -0,0 +1,64 @@
+{
+ "_from": "js-tokens@^3.0.2",
+ "_id": "js-tokens@3.0.2",
+ "_inBundle": false,
+ "_integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=",
+ "_location": "/eslint/js-tokens",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "js-tokens@^3.0.2",
+ "name": "js-tokens",
+ "escapedName": "js-tokens",
+ "rawSpec": "^3.0.2",
+ "saveSpec": null,
+ "fetchSpec": "^3.0.2"
+ },
+ "_requiredBy": [
+ "/eslint/babel-code-frame"
+ ],
+ "_resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
+ "_shasum": "9866df395102130e38f7f996bceb65443209c25b",
+ "_spec": "js-tokens@^3.0.2",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/babel-code-frame",
+ "author": {
+ "name": "Simon Lydell"
+ },
+ "bugs": {
+ "url": "https://github.com/lydell/js-tokens/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "A regex that tokenizes JavaScript.",
+ "devDependencies": {
+ "coffee-script": "~1.12.6",
+ "esprima": "^4.0.0",
+ "everything.js": "^1.0.3",
+ "mocha": "^3.4.2"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/lydell/js-tokens#readme",
+ "keywords": [
+ "JavaScript",
+ "js",
+ "token",
+ "tokenize",
+ "regex"
+ ],
+ "license": "MIT",
+ "name": "js-tokens",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/lydell/js-tokens.git"
+ },
+ "scripts": {
+ "build": "node generate-index.js",
+ "dev": "npm run build && npm test",
+ "esprima-compare": "node esprima-compare ./index.js everything.js/es5.js",
+ "test": "mocha --ui tdd"
+ },
+ "version": "3.0.2"
+}
diff --git a/tools/node_modules/eslint/node_modules/js-tokens/readme.md b/tools/node_modules/eslint/node_modules/js-tokens/readme.md
new file mode 100644
index 0000000000..5c93a88852
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-tokens/readme.md
@@ -0,0 +1,222 @@
+Overview [![Build Status](https://travis-ci.org/lydell/js-tokens.svg?branch=master)](https://travis-ci.org/lydell/js-tokens)
+========
+
+A regex that tokenizes JavaScript.
+
+```js
+var jsTokens = require("js-tokens").default
+
+var jsString = "var foo=opts.foo;\n..."
+
+jsString.match(jsTokens)
+// ["var", " ", "foo", "=", "opts", ".", "foo", ";", "\n", ...]
+```
+
+
+Installation
+============
+
+`npm install js-tokens`
+
+```js
+import jsTokens from "js-tokens"
+// or:
+var jsTokens = require("js-tokens").default
+```
+
+
+Usage
+=====
+
+### `jsTokens` ###
+
+A regex with the `g` flag that matches JavaScript tokens.
+
+The regex _always_ matches, even invalid JavaScript and the empty string.
+
+The next match is always directly after the previous.
+
+### `var token = matchToToken(match)` ###
+
+```js
+import {matchToToken} from "js-tokens"
+// or:
+var matchToToken = require("js-tokens").matchToToken
+```
+
+Takes a `match` returned by `jsTokens.exec(string)`, and returns a `{type:
+String, value: String}` object. The following types are available:
+
+- string
+- comment
+- regex
+- number
+- name
+- punctuator
+- whitespace
+- invalid
+
+Multi-line comments and strings also have a `closed` property indicating if the
+token was closed or not (see below).
+
+Comments and strings both come in several flavors. To distinguish them, check if
+the token starts with `//`, `/*`, `'`, `"` or `` ` ``.
+
+Names are ECMAScript IdentifierNames, that is, including both identifiers and
+keywords. You may use [is-keyword-js] to tell them apart.
+
+Whitespace includes both line terminators and other whitespace.
+
+[is-keyword-js]: https://github.com/crissdev/is-keyword-js
+
+
+ECMAScript support
+==================
+
+The intention is to always support the latest stable ECMAScript version.
+
+If adding support for a newer version requires changes, a new version with a
+major verion bump will be released.
+
+Currently, [ECMAScript 2017] is supported.
+
+[ECMAScript 2017]: https://www.ecma-international.org/ecma-262/8.0/index.html
+
+
+Invalid code handling
+=====================
+
+Unterminated strings are still matched as strings. JavaScript strings cannot
+contain (unescaped) newlines, so unterminated strings simply end at the end of
+the line. Unterminated template strings can contain unescaped newlines, though,
+so they go on to the end of input.
+
+Unterminated multi-line comments are also still matched as comments. They
+simply go on to the end of the input.
+
+Unterminated regex literals are likely matched as division and whatever is
+inside the regex.
+
+Invalid ASCII characters have their own capturing group.
+
+Invalid non-ASCII characters are treated as names, to simplify the matching of
+names (except unicode spaces which are treated as whitespace).
+
+Regex literals may contain invalid regex syntax. They are still matched as
+regex literals. They may also contain repeated regex flags, to keep the regex
+simple.
+
+Strings may contain invalid escape sequences.
+
+
+Limitations
+===========
+
+Tokenizing JavaScript using regexes—in fact, _one single regex_—won’t be
+perfect. But that’s not the point either.
+
+You may compare jsTokens with [esprima] by using `esprima-compare.js`.
+See `npm run esprima-compare`!
+
+[esprima]: http://esprima.org/
+
+### Template string interpolation ###
+
+Template strings are matched as single tokens, from the starting `` ` `` to the
+ending `` ` ``, including interpolations (whose tokens are not matched
+individually).
+
+Matching template string interpolations requires recursive balancing of `{` and
+`}`—something that JavaScript regexes cannot do. Only one level of nesting is
+supported.
+
+### Division and regex literals collision ###
+
+Consider this example:
+
+```js
+var g = 9.82
+var number = bar / 2/g
+
+var regex = / 2/g
+```
+
+A human can easily understand that in the `number` line we’re dealing with
+division, and in the `regex` line we’re dealing with a regex literal. How come?
+Because humans can look at the whole code to put the `/` characters in context.
+A JavaScript regex cannot. It only sees forwards.
+
+When the `jsTokens` regex scans throught the above, it will see the following
+at the end of both the `number` and `regex` rows:
+
+```js
+/ 2/g
+```
+
+It is then impossible to know if that is a regex literal, or part of an
+expression dealing with division.
+
+Here is a similar case:
+
+```js
+foo /= 2/g
+foo(/= 2/g)
+```
+
+The first line divides the `foo` variable with `2/g`. The second line calls the
+`foo` function with the regex literal `/= 2/g`. Again, since `jsTokens` only
+sees forwards, it cannot tell the two cases apart.
+
+There are some cases where we _can_ tell division and regex literals apart,
+though.
+
+First off, we have the simple cases where there’s only one slash in the line:
+
+```js
+var foo = 2/g
+foo /= 2
+```
+
+Regex literals cannot contain newlines, so the above cases are correctly
+identified as division. Things are only problematic when there are more than
+one non-comment slash in a single line.
+
+Secondly, not every character is a valid regex flag.
+
+```js
+var number = bar / 2/e
+```
+
+The above example is also correctly identified as division, because `e` is not a
+valid regex flag. I initially wanted to future-proof by allowing `[a-zA-Z]*`
+(any letter) as flags, but it is not worth it since it increases the amount of
+ambigous cases. So only the standard `g`, `m`, `i`, `y` and `u` flags are
+allowed. This means that the above example will be identified as division as
+long as you don’t rename the `e` variable to some permutation of `gmiyu` 1 to 5
+characters long.
+
+Lastly, we can look _forward_ for information.
+
+- If the token following what looks like a regex literal is not valid after a
+ regex literal, but is valid in a division expression, then the regex literal
+ is treated as division instead. For example, a flagless regex cannot be
+ followed by a string, number or name, but all of those three can be the
+ denominator of a division.
+- Generally, if what looks like a regex literal is followed by an operator, the
+ regex literal is treated as division instead. This is because regexes are
+ seldomly used with operators (such as `+`, `*`, `&&` and `==`), but division
+ could likely be part of such an expression.
+
+Please consult the regex source and the test cases for precise information on
+when regex or division is matched (should you need to know). In short, you
+could sum it up as:
+
+If the end of a statement looks like a regex literal (even if it isn’t), it
+will be treated as one. Otherwise it should work as expected (if you write sane
+code).
+
+
+License
+=======
+
+[MIT](LICENSE).
diff --git a/tools/node_modules/eslint/node_modules/js-yaml/LICENSE b/tools/node_modules/eslint/node_modules/js-yaml/LICENSE
new file mode 100644
index 0000000000..09d3a29e93
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-yaml/LICENSE
@@ -0,0 +1,21 @@
+(The MIT License)
+
+Copyright (C) 2011-2015 by Vitaly Puzrin
+
+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/tools/node_modules/eslint/node_modules/js-yaml/README.md b/tools/node_modules/eslint/node_modules/js-yaml/README.md
new file mode 100644
index 0000000000..cf73ebdf87
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-yaml/README.md
@@ -0,0 +1,313 @@
+JS-YAML - YAML 1.2 parser / writer for JavaScript
+=================================================
+
+[![Build Status](https://travis-ci.org/nodeca/js-yaml.svg?branch=master)](https://travis-ci.org/nodeca/js-yaml)
+[![NPM version](https://img.shields.io/npm/v/js-yaml.svg)](https://www.npmjs.org/package/js-yaml)
+
+__[Online Demo](http://nodeca.github.com/js-yaml/)__
+
+
+This is an implementation of [YAML](http://yaml.org/), a human-friendly data
+serialization language. Started as [PyYAML](http://pyyaml.org/) port, it was
+completely rewritten from scratch. Now it's very fast, and supports 1.2 spec.
+
+
+Installation
+------------
+
+### YAML module for node.js
+
+```
+npm install js-yaml
+```
+
+
+### CLI executable
+
+If you want to inspect your YAML files from CLI, install js-yaml globally:
+
+```
+npm install -g js-yaml
+```
+
+#### Usage
+
+```
+usage: js-yaml [-h] [-v] [-c] [-t] file
+
+Positional arguments:
+ file File with YAML document(s)
+
+Optional arguments:
+ -h, --help Show this help message and exit.
+ -v, --version Show program's version number and exit.
+ -c, --compact Display errors in compact mode
+ -t, --trace Show stack trace on error
+```
+
+
+### Bundled YAML library for browsers
+
+``` html
+<!-- esprima required only for !!js/function -->
+<script src="esprima.js"></script>
+<script src="js-yaml.min.js"></script>
+<script type="text/javascript">
+var doc = jsyaml.load('greeting: hello\nname: world');
+</script>
+```
+
+Browser support was done mostly for the online demo. If you find any errors - feel
+free to send pull requests with fixes. Also note, that IE and other old browsers
+needs [es5-shims](https://github.com/kriskowal/es5-shim) to operate.
+
+Notes:
+
+1. We have no resources to support browserified version. Don't expect it to be
+ well tested. Don't expect fast fixes if something goes wrong there.
+2. `!!js/function` in browser bundle will not work by default. If you really need
+ it - load `esprima` parser first (via amd or directly).
+3. `!!bin` in browser will return `Array`, because browsers do not support
+ node.js `Buffer` and adding Buffer shims is completely useless on practice.
+
+
+API
+---
+
+Here we cover the most 'useful' methods. If you need advanced details (creating
+your own tags), see [wiki](https://github.com/nodeca/js-yaml/wiki) and
+[examples](https://github.com/nodeca/js-yaml/tree/master/examples) for more
+info.
+
+``` javascript
+yaml = require('js-yaml');
+fs = require('fs');
+
+// Get document, or throw exception on error
+try {
+ var doc = yaml.safeLoad(fs.readFileSync('/home/ixti/example.yml', 'utf8'));
+ console.log(doc);
+} catch (e) {
+ console.log(e);
+}
+```
+
+
+### safeLoad (string [ , options ])
+
+**Recommended loading way.** Parses `string` as single YAML document. Returns a JavaScript
+object or throws `YAMLException` on error. By default, does not support regexps,
+functions and undefined. This method is safe for untrusted data.
+
+options:
+
+- `filename` _(default: null)_ - string to be used as a file path in
+ error/warning messages.
+- `onWarning` _(default: null)_ - function to call on warning messages.
+ Loader will throw on warnings if this function is not provided.
+- `schema` _(default: `DEFAULT_SAFE_SCHEMA`)_ - specifies a schema to use.
+ - `FAILSAFE_SCHEMA` - only strings, arrays and plain objects:
+ http://www.yaml.org/spec/1.2/spec.html#id2802346
+ - `JSON_SCHEMA` - all JSON-supported types:
+ http://www.yaml.org/spec/1.2/spec.html#id2803231
+ - `CORE_SCHEMA` - same as `JSON_SCHEMA`:
+ http://www.yaml.org/spec/1.2/spec.html#id2804923
+ - `DEFAULT_SAFE_SCHEMA` - all supported YAML types, without unsafe ones
+ (`!!js/undefined`, `!!js/regexp` and `!!js/function`):
+ http://yaml.org/type/
+ - `DEFAULT_FULL_SCHEMA` - all supported YAML types.
+- `json` _(default: false)_ - compatibility with JSON.parse behaviour. If true, then duplicate keys in a mapping will override values rather than throwing an error.
+
+NOTE: This function **does not** understand multi-document sources, it throws
+exception on those.
+
+NOTE: JS-YAML **does not** support schema-specific tag resolution restrictions.
+So, the JSON schema is not as strictly defined in the YAML specification.
+It allows numbers in any notation, use `Null` and `NULL` as `null`, etc.
+The core schema also has no such restrictions. It allows binary notation for integers.
+
+
+### load (string [ , options ])
+
+**Use with care with untrusted sources**. The same as `safeLoad()` but uses
+`DEFAULT_FULL_SCHEMA` by default - adds some JavaScript-specific types:
+`!!js/function`, `!!js/regexp` and `!!js/undefined`. For untrusted sources, you
+must additionally validate object structure to avoid injections:
+
+``` javascript
+var untrusted_code = '"toString": !<tag:yaml.org,2002:js/function> "function (){very_evil_thing();}"';
+
+// I'm just converting that string, what could possibly go wrong?
+require('js-yaml').load(untrusted_code) + ''
+```
+
+
+### safeLoadAll (string [, iterator] [, options ])
+
+Same as `safeLoad()`, but understands multi-document sources. Applies
+`iterator` to each document if specified, or returns array of documents.
+
+``` javascript
+var yaml = require('js-yaml');
+
+yaml.safeLoadAll(data, function (doc) {
+ console.log(doc);
+});
+```
+
+
+### loadAll (string [, iterator] [ , options ])
+
+Same as `safeLoadAll()` but uses `DEFAULT_FULL_SCHEMA` by default.
+
+
+### safeDump (object [ , options ])
+
+Serializes `object` as a YAML document. Uses `DEFAULT_SAFE_SCHEMA`, so it will
+throw an exception if you try to dump regexps or functions. However, you can
+disable exceptions by setting the `skipInvalid` option to `true`.
+
+options:
+
+- `indent` _(default: 2)_ - indentation width to use (in spaces).
+- `skipInvalid` _(default: false)_ - do not throw on invalid types (like function
+ in the safe schema) and skip pairs and single values with such types.
+- `flowLevel` (default: -1) - specifies level of nesting, when to switch from
+ block to flow style for collections. -1 means block style everwhere
+- `styles` - "tag" => "style" map. Each tag may have own set of styles.
+- `schema` _(default: `DEFAULT_SAFE_SCHEMA`)_ specifies a schema to use.
+- `sortKeys` _(default: `false`)_ - if `true`, sort keys when dumping YAML. If a
+ function, use the function to sort the keys.
+- `lineWidth` _(default: `80`)_ - set max line width.
+- `noRefs` _(default: `false`)_ - if `true`, don't convert duplicate objects into references
+- `noCompatMode` _(default: `false`)_ - if `true` don't try to be compatible with older
+ yaml versions. Currently: don't quote "yes", "no" and so on, as required for YAML 1.1
+- `condenseFlow` _(default: `false`)_ - if `true` flow sequences will be condensed, omitting the space between `a, b`. Eg. `'[a,b]'`, and omitting the space between `key: value` and quoting the key. Eg. `'{"a":b}'` Can be useful when using yaml for pretty URL query params as spaces are %-encoded.
+
+The following table show availlable styles (e.g. "canonical",
+"binary"...) available for each tag (.e.g. !!null, !!int ...). Yaml
+ouput is shown on the right side after `=>` (default setting) or `->`:
+
+``` none
+!!null
+ "canonical" -> "~"
+ "lowercase" => "null"
+ "uppercase" -> "NULL"
+ "camelcase" -> "Null"
+
+!!int
+ "binary" -> "0b1", "0b101010", "0b1110001111010"
+ "octal" -> "01", "052", "016172"
+ "decimal" => "1", "42", "7290"
+ "hexadecimal" -> "0x1", "0x2A", "0x1C7A"
+
+!!bool
+ "lowercase" => "true", "false"
+ "uppercase" -> "TRUE", "FALSE"
+ "camelcase" -> "True", "False"
+
+!!float
+ "lowercase" => ".nan", '.inf'
+ "uppercase" -> ".NAN", '.INF'
+ "camelcase" -> ".NaN", '.Inf'
+```
+
+Example:
+
+``` javascript
+safeDump (object, {
+ 'styles': {
+ '!!null': 'canonical' // dump null as ~
+ },
+ 'sortKeys': true // sort object keys
+});
+```
+
+### dump (object [ , options ])
+
+Same as `safeDump()` but without limits (uses `DEFAULT_FULL_SCHEMA` by default).
+
+
+Supported YAML types
+--------------------
+
+The list of standard YAML tags and corresponding JavaScipt types. See also
+[YAML tag discussion](http://pyyaml.org/wiki/YAMLTagDiscussion) and
+[YAML types repository](http://yaml.org/type/).
+
+```
+!!null '' # null
+!!bool 'yes' # bool
+!!int '3...' # number
+!!float '3.14...' # number
+!!binary '...base64...' # buffer
+!!timestamp 'YYYY-...' # date
+!!omap [ ... ] # array of key-value pairs
+!!pairs [ ... ] # array or array pairs
+!!set { ... } # array of objects with given keys and null values
+!!str '...' # string
+!!seq [ ... ] # array
+!!map { ... } # object
+```
+
+**JavaScript-specific tags**
+
+```
+!!js/regexp /pattern/gim # RegExp
+!!js/undefined '' # Undefined
+!!js/function 'function () {...}' # Function
+```
+
+Caveats
+-------
+
+Note, that you use arrays or objects as key in JS-YAML. JS does not allow objects
+or arrays as keys, and stringifies (by calling `toString()` method) them at the
+moment of adding them.
+
+``` yaml
+---
+? [ foo, bar ]
+: - baz
+? { foo: bar }
+: - baz
+ - baz
+```
+
+``` javascript
+{ "foo,bar": ["baz"], "[object Object]": ["baz", "baz"] }
+```
+
+Also, reading of properties on implicit block mapping keys is not supported yet.
+So, the following YAML document cannot be loaded.
+
+``` yaml
+&anchor foo:
+ foo: bar
+ *anchor: duplicate key
+ baz: bat
+ *anchor: duplicate key
+```
+
+
+Breaking changes in 2.x.x -> 3.x.x
+----------------------------------
+
+If you have not used __custom__ tags or loader classes and not loaded yaml
+files via `require()`, no changes are needed. Just upgrade the library.
+
+Otherwise, you should:
+
+1. Replace all occurrences of `require('xxxx.yml')` by `fs.readFileSync()` +
+ `yaml.safeLoad()`.
+2. rewrite your custom tags constructors and custom loader
+ classes, to conform the new API. See
+ [examples](https://github.com/nodeca/js-yaml/tree/master/examples) and
+ [wiki](https://github.com/nodeca/js-yaml/wiki) for details.
+
+
+License
+-------
+
+View the [LICENSE](https://github.com/nodeca/js-yaml/blob/master/LICENSE) file
+(MIT).
diff --git a/tools/node_modules/eslint/node_modules/js-yaml/bin/js-yaml.js b/tools/node_modules/eslint/node_modules/js-yaml/bin/js-yaml.js
new file mode 100755
index 0000000000..e79186be6f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-yaml/bin/js-yaml.js
@@ -0,0 +1,132 @@
+#!/usr/bin/env node
+
+
+'use strict';
+
+/*eslint-disable no-console*/
+
+
+// stdlib
+var fs = require('fs');
+
+
+// 3rd-party
+var argparse = require('argparse');
+
+
+// internal
+var yaml = require('..');
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+
+var cli = new argparse.ArgumentParser({
+ prog: 'js-yaml',
+ version: require('../package.json').version,
+ addHelp: true
+});
+
+
+cli.addArgument([ '-c', '--compact' ], {
+ help: 'Display errors in compact mode',
+ action: 'storeTrue'
+});
+
+
+// deprecated (not needed after we removed output colors)
+// option suppressed, but not completely removed for compatibility
+cli.addArgument([ '-j', '--to-json' ], {
+ help: argparse.Const.SUPPRESS,
+ dest: 'json',
+ action: 'storeTrue'
+});
+
+
+cli.addArgument([ '-t', '--trace' ], {
+ help: 'Show stack trace on error',
+ action: 'storeTrue'
+});
+
+cli.addArgument([ 'file' ], {
+ help: 'File to read, utf-8 encoded without BOM',
+ nargs: '?',
+ defaultValue: '-'
+});
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+
+var options = cli.parseArgs();
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+function readFile(filename, encoding, callback) {
+ if (options.file === '-') {
+ // read from stdin
+
+ var chunks = [];
+
+ process.stdin.on('data', function (chunk) {
+ chunks.push(chunk);
+ });
+
+ process.stdin.on('end', function () {
+ return callback(null, Buffer.concat(chunks).toString(encoding));
+ });
+ } else {
+ fs.readFile(filename, encoding, callback);
+ }
+}
+
+readFile(options.file, 'utf8', function (error, input) {
+ var output, isYaml;
+
+ if (error) {
+ if (error.code === 'ENOENT') {
+ console.error('File not found: ' + options.file);
+ process.exit(2);
+ }
+
+ console.error(
+ options.trace && error.stack ||
+ error.message ||
+ String(error));
+
+ process.exit(1);
+ }
+
+ try {
+ output = JSON.parse(input);
+ isYaml = false;
+ } catch (err) {
+ if (err instanceof SyntaxError) {
+ try {
+ output = [];
+ yaml.loadAll(input, function (doc) { output.push(doc); }, {});
+ isYaml = true;
+
+ if (output.length === 0) output = null;
+ else if (output.length === 1) output = output[0];
+
+ } catch (e) {
+ if (options.trace && err.stack) console.error(e.stack);
+ else console.error(e.toString(options.compact));
+
+ process.exit(1);
+ }
+ } else {
+ console.error(
+ options.trace && err.stack ||
+ err.message ||
+ String(err));
+
+ process.exit(1);
+ }
+ }
+
+ if (isYaml) console.log(JSON.stringify(output, null, ' '));
+ else console.log(yaml.dump(output));
+});
diff --git a/tools/node_modules/eslint/node_modules/js-yaml/dist/js-yaml.js b/tools/node_modules/eslint/node_modules/js-yaml/dist/js-yaml.js
new file mode 100644
index 0000000000..8e28b85786
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-yaml/dist/js-yaml.js
@@ -0,0 +1,3902 @@
+/* js-yaml 3.10.0 https://github.com/nodeca/js-yaml */(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.jsyaml = 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<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
+'use strict';
+
+
+var loader = require('./js-yaml/loader');
+var dumper = require('./js-yaml/dumper');
+
+
+function deprecated(name) {
+ return function () {
+ throw new Error('Function ' + name + ' is deprecated and cannot be used.');
+ };
+}
+
+
+module.exports.Type = require('./js-yaml/type');
+module.exports.Schema = require('./js-yaml/schema');
+module.exports.FAILSAFE_SCHEMA = require('./js-yaml/schema/failsafe');
+module.exports.JSON_SCHEMA = require('./js-yaml/schema/json');
+module.exports.CORE_SCHEMA = require('./js-yaml/schema/core');
+module.exports.DEFAULT_SAFE_SCHEMA = require('./js-yaml/schema/default_safe');
+module.exports.DEFAULT_FULL_SCHEMA = require('./js-yaml/schema/default_full');
+module.exports.load = loader.load;
+module.exports.loadAll = loader.loadAll;
+module.exports.safeLoad = loader.safeLoad;
+module.exports.safeLoadAll = loader.safeLoadAll;
+module.exports.dump = dumper.dump;
+module.exports.safeDump = dumper.safeDump;
+module.exports.YAMLException = require('./js-yaml/exception');
+
+// Deprecated schema names from JS-YAML 2.0.x
+module.exports.MINIMAL_SCHEMA = require('./js-yaml/schema/failsafe');
+module.exports.SAFE_SCHEMA = require('./js-yaml/schema/default_safe');
+module.exports.DEFAULT_SCHEMA = require('./js-yaml/schema/default_full');
+
+// Deprecated functions from JS-YAML 1.x.x
+module.exports.scan = deprecated('scan');
+module.exports.parse = deprecated('parse');
+module.exports.compose = deprecated('compose');
+module.exports.addConstructor = deprecated('addConstructor');
+
+},{"./js-yaml/dumper":3,"./js-yaml/exception":4,"./js-yaml/loader":5,"./js-yaml/schema":7,"./js-yaml/schema/core":8,"./js-yaml/schema/default_full":9,"./js-yaml/schema/default_safe":10,"./js-yaml/schema/failsafe":11,"./js-yaml/schema/json":12,"./js-yaml/type":13}],2:[function(require,module,exports){
+'use strict';
+
+
+function isNothing(subject) {
+ return (typeof subject === 'undefined') || (subject === null);
+}
+
+
+function isObject(subject) {
+ return (typeof subject === 'object') && (subject !== null);
+}
+
+
+function toArray(sequence) {
+ if (Array.isArray(sequence)) return sequence;
+ else if (isNothing(sequence)) return [];
+
+ return [ sequence ];
+}
+
+
+function extend(target, source) {
+ var index, length, key, sourceKeys;
+
+ if (source) {
+ sourceKeys = Object.keys(source);
+
+ for (index = 0, length = sourceKeys.length; index < length; index += 1) {
+ key = sourceKeys[index];
+ target[key] = source[key];
+ }
+ }
+
+ return target;
+}
+
+
+function repeat(string, count) {
+ var result = '', cycle;
+
+ for (cycle = 0; cycle < count; cycle += 1) {
+ result += string;
+ }
+
+ return result;
+}
+
+
+function isNegativeZero(number) {
+ return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number);
+}
+
+
+module.exports.isNothing = isNothing;
+module.exports.isObject = isObject;
+module.exports.toArray = toArray;
+module.exports.repeat = repeat;
+module.exports.isNegativeZero = isNegativeZero;
+module.exports.extend = extend;
+
+},{}],3:[function(require,module,exports){
+'use strict';
+
+/*eslint-disable no-use-before-define*/
+
+var common = require('./common');
+var YAMLException = require('./exception');
+var DEFAULT_FULL_SCHEMA = require('./schema/default_full');
+var DEFAULT_SAFE_SCHEMA = require('./schema/default_safe');
+
+var _toString = Object.prototype.toString;
+var _hasOwnProperty = Object.prototype.hasOwnProperty;
+
+var CHAR_TAB = 0x09; /* Tab */
+var CHAR_LINE_FEED = 0x0A; /* LF */
+var CHAR_SPACE = 0x20; /* Space */
+var CHAR_EXCLAMATION = 0x21; /* ! */
+var CHAR_DOUBLE_QUOTE = 0x22; /* " */
+var CHAR_SHARP = 0x23; /* # */
+var CHAR_PERCENT = 0x25; /* % */
+var CHAR_AMPERSAND = 0x26; /* & */
+var CHAR_SINGLE_QUOTE = 0x27; /* ' */
+var CHAR_ASTERISK = 0x2A; /* * */
+var CHAR_COMMA = 0x2C; /* , */
+var CHAR_MINUS = 0x2D; /* - */
+var CHAR_COLON = 0x3A; /* : */
+var CHAR_GREATER_THAN = 0x3E; /* > */
+var CHAR_QUESTION = 0x3F; /* ? */
+var CHAR_COMMERCIAL_AT = 0x40; /* @ */
+var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */
+var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */
+var CHAR_GRAVE_ACCENT = 0x60; /* ` */
+var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */
+var CHAR_VERTICAL_LINE = 0x7C; /* | */
+var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */
+
+var ESCAPE_SEQUENCES = {};
+
+ESCAPE_SEQUENCES[0x00] = '\\0';
+ESCAPE_SEQUENCES[0x07] = '\\a';
+ESCAPE_SEQUENCES[0x08] = '\\b';
+ESCAPE_SEQUENCES[0x09] = '\\t';
+ESCAPE_SEQUENCES[0x0A] = '\\n';
+ESCAPE_SEQUENCES[0x0B] = '\\v';
+ESCAPE_SEQUENCES[0x0C] = '\\f';
+ESCAPE_SEQUENCES[0x0D] = '\\r';
+ESCAPE_SEQUENCES[0x1B] = '\\e';
+ESCAPE_SEQUENCES[0x22] = '\\"';
+ESCAPE_SEQUENCES[0x5C] = '\\\\';
+ESCAPE_SEQUENCES[0x85] = '\\N';
+ESCAPE_SEQUENCES[0xA0] = '\\_';
+ESCAPE_SEQUENCES[0x2028] = '\\L';
+ESCAPE_SEQUENCES[0x2029] = '\\P';
+
+var DEPRECATED_BOOLEANS_SYNTAX = [
+ 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON',
+ 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF'
+];
+
+function compileStyleMap(schema, map) {
+ var result, keys, index, length, tag, style, type;
+
+ if (map === null) return {};
+
+ result = {};
+ keys = Object.keys(map);
+
+ for (index = 0, length = keys.length; index < length; index += 1) {
+ tag = keys[index];
+ style = String(map[tag]);
+
+ if (tag.slice(0, 2) === '!!') {
+ tag = 'tag:yaml.org,2002:' + tag.slice(2);
+ }
+ type = schema.compiledTypeMap['fallback'][tag];
+
+ if (type && _hasOwnProperty.call(type.styleAliases, style)) {
+ style = type.styleAliases[style];
+ }
+
+ result[tag] = style;
+ }
+
+ return result;
+}
+
+function encodeHex(character) {
+ var string, handle, length;
+
+ string = character.toString(16).toUpperCase();
+
+ if (character <= 0xFF) {
+ handle = 'x';
+ length = 2;
+ } else if (character <= 0xFFFF) {
+ handle = 'u';
+ length = 4;
+ } else if (character <= 0xFFFFFFFF) {
+ handle = 'U';
+ length = 8;
+ } else {
+ throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF');
+ }
+
+ return '\\' + handle + common.repeat('0', length - string.length) + string;
+}
+
+function State(options) {
+ this.schema = options['schema'] || DEFAULT_FULL_SCHEMA;
+ this.indent = Math.max(1, (options['indent'] || 2));
+ this.skipInvalid = options['skipInvalid'] || false;
+ this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']);
+ this.styleMap = compileStyleMap(this.schema, options['styles'] || null);
+ this.sortKeys = options['sortKeys'] || false;
+ this.lineWidth = options['lineWidth'] || 80;
+ this.noRefs = options['noRefs'] || false;
+ this.noCompatMode = options['noCompatMode'] || false;
+ this.condenseFlow = options['condenseFlow'] || false;
+
+ this.implicitTypes = this.schema.compiledImplicit;
+ this.explicitTypes = this.schema.compiledExplicit;
+
+ this.tag = null;
+ this.result = '';
+
+ this.duplicates = [];
+ this.usedDuplicates = null;
+}
+
+// Indents every line in a string. Empty lines (\n only) are not indented.
+function indentString(string, spaces) {
+ var ind = common.repeat(' ', spaces),
+ position = 0,
+ next = -1,
+ result = '',
+ line,
+ length = string.length;
+
+ while (position < length) {
+ next = string.indexOf('\n', position);
+ if (next === -1) {
+ line = string.slice(position);
+ position = length;
+ } else {
+ line = string.slice(position, next + 1);
+ position = next + 1;
+ }
+
+ if (line.length && line !== '\n') result += ind;
+
+ result += line;
+ }
+
+ return result;
+}
+
+function generateNextLine(state, level) {
+ return '\n' + common.repeat(' ', state.indent * level);
+}
+
+function testImplicitResolving(state, str) {
+ var index, length, type;
+
+ for (index = 0, length = state.implicitTypes.length; index < length; index += 1) {
+ type = state.implicitTypes[index];
+
+ if (type.resolve(str)) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+// [33] s-white ::= s-space | s-tab
+function isWhitespace(c) {
+ return c === CHAR_SPACE || c === CHAR_TAB;
+}
+
+// Returns true if the character can be printed without escaping.
+// From YAML 1.2: "any allowed characters known to be non-printable
+// should also be escaped. [However,] This isn’t mandatory"
+// Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029.
+function isPrintable(c) {
+ return (0x00020 <= c && c <= 0x00007E)
+ || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029)
+ || ((0x0E000 <= c && c <= 0x00FFFD) && c !== 0xFEFF /* BOM */)
+ || (0x10000 <= c && c <= 0x10FFFF);
+}
+
+// Simplified test for values allowed after the first character in plain style.
+function isPlainSafe(c) {
+ // Uses a subset of nb-char - c-flow-indicator - ":" - "#"
+ // where nb-char ::= c-printable - b-char - c-byte-order-mark.
+ return isPrintable(c) && c !== 0xFEFF
+ // - c-flow-indicator
+ && c !== CHAR_COMMA
+ && c !== CHAR_LEFT_SQUARE_BRACKET
+ && c !== CHAR_RIGHT_SQUARE_BRACKET
+ && c !== CHAR_LEFT_CURLY_BRACKET
+ && c !== CHAR_RIGHT_CURLY_BRACKET
+ // - ":" - "#"
+ && c !== CHAR_COLON
+ && c !== CHAR_SHARP;
+}
+
+// Simplified test for values allowed as the first character in plain style.
+function isPlainSafeFirst(c) {
+ // Uses a subset of ns-char - c-indicator
+ // where ns-char = nb-char - s-white.
+ return isPrintable(c) && c !== 0xFEFF
+ && !isWhitespace(c) // - s-white
+ // - (c-indicator ::=
+ // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”
+ && c !== CHAR_MINUS
+ && c !== CHAR_QUESTION
+ && c !== CHAR_COLON
+ && c !== CHAR_COMMA
+ && c !== CHAR_LEFT_SQUARE_BRACKET
+ && c !== CHAR_RIGHT_SQUARE_BRACKET
+ && c !== CHAR_LEFT_CURLY_BRACKET
+ && c !== CHAR_RIGHT_CURLY_BRACKET
+ // | “#” | “&” | “*” | “!” | “|” | “>” | “'” | “"”
+ && c !== CHAR_SHARP
+ && c !== CHAR_AMPERSAND
+ && c !== CHAR_ASTERISK
+ && c !== CHAR_EXCLAMATION
+ && c !== CHAR_VERTICAL_LINE
+ && c !== CHAR_GREATER_THAN
+ && c !== CHAR_SINGLE_QUOTE
+ && c !== CHAR_DOUBLE_QUOTE
+ // | “%” | “@” | “`”)
+ && c !== CHAR_PERCENT
+ && c !== CHAR_COMMERCIAL_AT
+ && c !== CHAR_GRAVE_ACCENT;
+}
+
+var STYLE_PLAIN = 1,
+ STYLE_SINGLE = 2,
+ STYLE_LITERAL = 3,
+ STYLE_FOLDED = 4,
+ STYLE_DOUBLE = 5;
+
+// Determines which scalar styles are possible and returns the preferred style.
+// lineWidth = -1 => no limit.
+// Pre-conditions: str.length > 0.
+// Post-conditions:
+// STYLE_PLAIN or STYLE_SINGLE => no \n are in the string.
+// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1).
+// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1).
+function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType) {
+ var i;
+ var char;
+ var hasLineBreak = false;
+ var hasFoldableLine = false; // only checked if shouldTrackWidth
+ var shouldTrackWidth = lineWidth !== -1;
+ var previousLineBreak = -1; // count the first line correctly
+ var plain = isPlainSafeFirst(string.charCodeAt(0))
+ && !isWhitespace(string.charCodeAt(string.length - 1));
+
+ if (singleLineOnly) {
+ // Case: no block styles.
+ // Check for disallowed characters to rule out plain and single.
+ for (i = 0; i < string.length; i++) {
+ char = string.charCodeAt(i);
+ if (!isPrintable(char)) {
+ return STYLE_DOUBLE;
+ }
+ plain = plain && isPlainSafe(char);
+ }
+ } else {
+ // Case: block styles permitted.
+ for (i = 0; i < string.length; i++) {
+ char = string.charCodeAt(i);
+ if (char === CHAR_LINE_FEED) {
+ hasLineBreak = true;
+ // Check if any line can be folded.
+ if (shouldTrackWidth) {
+ hasFoldableLine = hasFoldableLine ||
+ // Foldable line = too long, and not more-indented.
+ (i - previousLineBreak - 1 > lineWidth &&
+ string[previousLineBreak + 1] !== ' ');
+ previousLineBreak = i;
+ }
+ } else if (!isPrintable(char)) {
+ return STYLE_DOUBLE;
+ }
+ plain = plain && isPlainSafe(char);
+ }
+ // in case the end is missing a \n
+ hasFoldableLine = hasFoldableLine || (shouldTrackWidth &&
+ (i - previousLineBreak - 1 > lineWidth &&
+ string[previousLineBreak + 1] !== ' '));
+ }
+ // Although every style can represent \n without escaping, prefer block styles
+ // for multiline, since they're more readable and they don't add empty lines.
+ // Also prefer folding a super-long line.
+ if (!hasLineBreak && !hasFoldableLine) {
+ // Strings interpretable as another type have to be quoted;
+ // e.g. the string 'true' vs. the boolean true.
+ return plain && !testAmbiguousType(string)
+ ? STYLE_PLAIN : STYLE_SINGLE;
+ }
+ // Edge case: block indentation indicator can only have one digit.
+ if (string[0] === ' ' && indentPerLevel > 9) {
+ return STYLE_DOUBLE;
+ }
+ // At this point we know block styles are valid.
+ // Prefer literal style unless we want to fold.
+ return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL;
+}
+
+// Note: line breaking/folding is implemented for only the folded style.
+// NB. We drop the last trailing newline (if any) of a returned block scalar
+// since the dumper adds its own newline. This always works:
+// • No ending newline => unaffected; already using strip "-" chomping.
+// • Ending newline => removed then restored.
+// Importantly, this keeps the "+" chomp indicator from gaining an extra line.
+function writeScalar(state, string, level, iskey) {
+ state.dump = (function () {
+ if (string.length === 0) {
+ return "''";
+ }
+ if (!state.noCompatMode &&
+ DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1) {
+ return "'" + string + "'";
+ }
+
+ var indent = state.indent * Math.max(1, level); // no 0-indent scalars
+ // As indentation gets deeper, let the width decrease monotonically
+ // to the lower bound min(state.lineWidth, 40).
+ // Note that this implies
+ // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound.
+ // state.lineWidth > 40 + state.indent: width decreases until the lower bound.
+ // This behaves better than a constant minimum width which disallows narrower options,
+ // or an indent threshold which causes the width to suddenly increase.
+ var lineWidth = state.lineWidth === -1
+ ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);
+
+ // Without knowing if keys are implicit/explicit, assume implicit for safety.
+ var singleLineOnly = iskey
+ // No block styles in flow mode.
+ || (state.flowLevel > -1 && level >= state.flowLevel);
+ function testAmbiguity(string) {
+ return testImplicitResolving(state, string);
+ }
+
+ switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, testAmbiguity)) {
+ case STYLE_PLAIN:
+ return string;
+ case STYLE_SINGLE:
+ return "'" + string.replace(/'/g, "''") + "'";
+ case STYLE_LITERAL:
+ return '|' + blockHeader(string, state.indent)
+ + dropEndingNewline(indentString(string, indent));
+ case STYLE_FOLDED:
+ return '>' + blockHeader(string, state.indent)
+ + dropEndingNewline(indentString(foldString(string, lineWidth), indent));
+ case STYLE_DOUBLE:
+ return '"' + escapeString(string, lineWidth) + '"';
+ default:
+ throw new YAMLException('impossible error: invalid scalar style');
+ }
+ }());
+}
+
+// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9.
+function blockHeader(string, indentPerLevel) {
+ var indentIndicator = (string[0] === ' ') ? String(indentPerLevel) : '';
+
+ // note the special case: the string '\n' counts as a "trailing" empty line.
+ var clip = string[string.length - 1] === '\n';
+ var keep = clip && (string[string.length - 2] === '\n' || string === '\n');
+ var chomp = keep ? '+' : (clip ? '' : '-');
+
+ return indentIndicator + chomp + '\n';
+}
+
+// (See the note for writeScalar.)
+function dropEndingNewline(string) {
+ return string[string.length - 1] === '\n' ? string.slice(0, -1) : string;
+}
+
+// Note: a long line without a suitable break point will exceed the width limit.
+// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0.
+function foldString(string, width) {
+ // In folded style, $k$ consecutive newlines output as $k+1$ newlines—
+ // unless they're before or after a more-indented line, or at the very
+ // beginning or end, in which case $k$ maps to $k$.
+ // Therefore, parse each chunk as newline(s) followed by a content line.
+ var lineRe = /(\n+)([^\n]*)/g;
+
+ // first line (possibly an empty line)
+ var result = (function () {
+ var nextLF = string.indexOf('\n');
+ nextLF = nextLF !== -1 ? nextLF : string.length;
+ lineRe.lastIndex = nextLF;
+ return foldLine(string.slice(0, nextLF), width);
+ }());
+ // If we haven't reached the first content line yet, don't add an extra \n.
+ var prevMoreIndented = string[0] === '\n' || string[0] === ' ';
+ var moreIndented;
+
+ // rest of the lines
+ var match;
+ while ((match = lineRe.exec(string))) {
+ var prefix = match[1], line = match[2];
+ moreIndented = (line[0] === ' ');
+ result += prefix
+ + (!prevMoreIndented && !moreIndented && line !== ''
+ ? '\n' : '')
+ + foldLine(line, width);
+ prevMoreIndented = moreIndented;
+ }
+
+ return result;
+}
+
+// Greedy line breaking.
+// Picks the longest line under the limit each time,
+// otherwise settles for the shortest line over the limit.
+// NB. More-indented lines *cannot* be folded, as that would add an extra \n.
+function foldLine(line, width) {
+ if (line === '' || line[0] === ' ') return line;
+
+ // Since a more-indented line adds a \n, breaks can't be followed by a space.
+ var breakRe = / [^ ]/g; // note: the match index will always be <= length-2.
+ var match;
+ // start is an inclusive index. end, curr, and next are exclusive.
+ var start = 0, end, curr = 0, next = 0;
+ var result = '';
+
+ // Invariants: 0 <= start <= length-1.
+ // 0 <= curr <= next <= max(0, length-2). curr - start <= width.
+ // Inside the loop:
+ // A match implies length >= 2, so curr and next are <= length-2.
+ while ((match = breakRe.exec(line))) {
+ next = match.index;
+ // maintain invariant: curr - start <= width
+ if (next - start > width) {
+ end = (curr > start) ? curr : next; // derive end <= length-2
+ result += '\n' + line.slice(start, end);
+ // skip the space that was output as \n
+ start = end + 1; // derive start <= length-1
+ }
+ curr = next;
+ }
+
+ // By the invariants, start <= length-1, so there is something left over.
+ // It is either the whole string or a part starting from non-whitespace.
+ result += '\n';
+ // Insert a break if the remainder is too long and there is a break available.
+ if (line.length - start > width && curr > start) {
+ result += line.slice(start, curr) + '\n' + line.slice(curr + 1);
+ } else {
+ result += line.slice(start);
+ }
+
+ return result.slice(1); // drop extra \n joiner
+}
+
+// Escapes a double-quoted string.
+function escapeString(string) {
+ var result = '';
+ var char, nextChar;
+ var escapeSeq;
+
+ for (var i = 0; i < string.length; i++) {
+ char = string.charCodeAt(i);
+ // Check for surrogate pairs (reference Unicode 3.0 section "3.7 Surrogates").
+ if (char >= 0xD800 && char <= 0xDBFF/* high surrogate */) {
+ nextChar = string.charCodeAt(i + 1);
+ if (nextChar >= 0xDC00 && nextChar <= 0xDFFF/* low surrogate */) {
+ // Combine the surrogate pair and store it escaped.
+ result += encodeHex((char - 0xD800) * 0x400 + nextChar - 0xDC00 + 0x10000);
+ // Advance index one extra since we already used that char here.
+ i++; continue;
+ }
+ }
+ escapeSeq = ESCAPE_SEQUENCES[char];
+ result += !escapeSeq && isPrintable(char)
+ ? string[i]
+ : escapeSeq || encodeHex(char);
+ }
+
+ return result;
+}
+
+function writeFlowSequence(state, level, object) {
+ var _result = '',
+ _tag = state.tag,
+ index,
+ length;
+
+ for (index = 0, length = object.length; index < length; index += 1) {
+ // Write only valid elements.
+ if (writeNode(state, level, object[index], false, false)) {
+ if (index !== 0) _result += ',' + (!state.condenseFlow ? ' ' : '');
+ _result += state.dump;
+ }
+ }
+
+ state.tag = _tag;
+ state.dump = '[' + _result + ']';
+}
+
+function writeBlockSequence(state, level, object, compact) {
+ var _result = '',
+ _tag = state.tag,
+ index,
+ length;
+
+ for (index = 0, length = object.length; index < length; index += 1) {
+ // Write only valid elements.
+ if (writeNode(state, level + 1, object[index], true, true)) {
+ if (!compact || index !== 0) {
+ _result += generateNextLine(state, level);
+ }
+
+ if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
+ _result += '-';
+ } else {
+ _result += '- ';
+ }
+
+ _result += state.dump;
+ }
+ }
+
+ state.tag = _tag;
+ state.dump = _result || '[]'; // Empty sequence if no valid values.
+}
+
+function writeFlowMapping(state, level, object) {
+ var _result = '',
+ _tag = state.tag,
+ objectKeyList = Object.keys(object),
+ index,
+ length,
+ objectKey,
+ objectValue,
+ pairBuffer;
+
+ for (index = 0, length = objectKeyList.length; index < length; index += 1) {
+ pairBuffer = state.condenseFlow ? '"' : '';
+
+ if (index !== 0) pairBuffer += ', ';
+
+ objectKey = objectKeyList[index];
+ objectValue = object[objectKey];
+
+ if (!writeNode(state, level, objectKey, false, false)) {
+ continue; // Skip this pair because of invalid key;
+ }
+
+ if (state.dump.length > 1024) pairBuffer += '? ';
+
+ pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' ');
+
+ if (!writeNode(state, level, objectValue, false, false)) {
+ continue; // Skip this pair because of invalid value.
+ }
+
+ pairBuffer += state.dump;
+
+ // Both key and value are valid.
+ _result += pairBuffer;
+ }
+
+ state.tag = _tag;
+ state.dump = '{' + _result + '}';
+}
+
+function writeBlockMapping(state, level, object, compact) {
+ var _result = '',
+ _tag = state.tag,
+ objectKeyList = Object.keys(object),
+ index,
+ length,
+ objectKey,
+ objectValue,
+ explicitPair,
+ pairBuffer;
+
+ // Allow sorting keys so that the output file is deterministic
+ if (state.sortKeys === true) {
+ // Default sorting
+ objectKeyList.sort();
+ } else if (typeof state.sortKeys === 'function') {
+ // Custom sort function
+ objectKeyList.sort(state.sortKeys);
+ } else if (state.sortKeys) {
+ // Something is wrong
+ throw new YAMLException('sortKeys must be a boolean or a function');
+ }
+
+ for (index = 0, length = objectKeyList.length; index < length; index += 1) {
+ pairBuffer = '';
+
+ if (!compact || index !== 0) {
+ pairBuffer += generateNextLine(state, level);
+ }
+
+ objectKey = objectKeyList[index];
+ objectValue = object[objectKey];
+
+ if (!writeNode(state, level + 1, objectKey, true, true, true)) {
+ continue; // Skip this pair because of invalid key.
+ }
+
+ explicitPair = (state.tag !== null && state.tag !== '?') ||
+ (state.dump && state.dump.length > 1024);
+
+ if (explicitPair) {
+ if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
+ pairBuffer += '?';
+ } else {
+ pairBuffer += '? ';
+ }
+ }
+
+ pairBuffer += state.dump;
+
+ if (explicitPair) {
+ pairBuffer += generateNextLine(state, level);
+ }
+
+ if (!writeNode(state, level + 1, objectValue, true, explicitPair)) {
+ continue; // Skip this pair because of invalid value.
+ }
+
+ if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
+ pairBuffer += ':';
+ } else {
+ pairBuffer += ': ';
+ }
+
+ pairBuffer += state.dump;
+
+ // Both key and value are valid.
+ _result += pairBuffer;
+ }
+
+ state.tag = _tag;
+ state.dump = _result || '{}'; // Empty mapping if no valid pairs.
+}
+
+function detectType(state, object, explicit) {
+ var _result, typeList, index, length, type, style;
+
+ typeList = explicit ? state.explicitTypes : state.implicitTypes;
+
+ for (index = 0, length = typeList.length; index < length; index += 1) {
+ type = typeList[index];
+
+ if ((type.instanceOf || type.predicate) &&
+ (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) &&
+ (!type.predicate || type.predicate(object))) {
+
+ state.tag = explicit ? type.tag : '?';
+
+ if (type.represent) {
+ style = state.styleMap[type.tag] || type.defaultStyle;
+
+ if (_toString.call(type.represent) === '[object Function]') {
+ _result = type.represent(object, style);
+ } else if (_hasOwnProperty.call(type.represent, style)) {
+ _result = type.represent[style](object, style);
+ } else {
+ throw new YAMLException('!<' + type.tag + '> tag resolver accepts not "' + style + '" style');
+ }
+
+ state.dump = _result;
+ }
+
+ return true;
+ }
+ }
+
+ return false;
+}
+
+// Serializes `object` and writes it to global `result`.
+// Returns true on success, or false on invalid object.
+//
+function writeNode(state, level, object, block, compact, iskey) {
+ state.tag = null;
+ state.dump = object;
+
+ if (!detectType(state, object, false)) {
+ detectType(state, object, true);
+ }
+
+ var type = _toString.call(state.dump);
+
+ if (block) {
+ block = (state.flowLevel < 0 || state.flowLevel > level);
+ }
+
+ var objectOrArray = type === '[object Object]' || type === '[object Array]',
+ duplicateIndex,
+ duplicate;
+
+ if (objectOrArray) {
+ duplicateIndex = state.duplicates.indexOf(object);
+ duplicate = duplicateIndex !== -1;
+ }
+
+ if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) {
+ compact = false;
+ }
+
+ if (duplicate && state.usedDuplicates[duplicateIndex]) {
+ state.dump = '*ref_' + duplicateIndex;
+ } else {
+ if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) {
+ state.usedDuplicates[duplicateIndex] = true;
+ }
+ if (type === '[object Object]') {
+ if (block && (Object.keys(state.dump).length !== 0)) {
+ writeBlockMapping(state, level, state.dump, compact);
+ if (duplicate) {
+ state.dump = '&ref_' + duplicateIndex + state.dump;
+ }
+ } else {
+ writeFlowMapping(state, level, state.dump);
+ if (duplicate) {
+ state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;
+ }
+ }
+ } else if (type === '[object Array]') {
+ if (block && (state.dump.length !== 0)) {
+ writeBlockSequence(state, level, state.dump, compact);
+ if (duplicate) {
+ state.dump = '&ref_' + duplicateIndex + state.dump;
+ }
+ } else {
+ writeFlowSequence(state, level, state.dump);
+ if (duplicate) {
+ state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;
+ }
+ }
+ } else if (type === '[object String]') {
+ if (state.tag !== '?') {
+ writeScalar(state, state.dump, level, iskey);
+ }
+ } else {
+ if (state.skipInvalid) return false;
+ throw new YAMLException('unacceptable kind of an object to dump ' + type);
+ }
+
+ if (state.tag !== null && state.tag !== '?') {
+ state.dump = '!<' + state.tag + '> ' + state.dump;
+ }
+ }
+
+ return true;
+}
+
+function getDuplicateReferences(object, state) {
+ var objects = [],
+ duplicatesIndexes = [],
+ index,
+ length;
+
+ inspectNode(object, objects, duplicatesIndexes);
+
+ for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) {
+ state.duplicates.push(objects[duplicatesIndexes[index]]);
+ }
+ state.usedDuplicates = new Array(length);
+}
+
+function inspectNode(object, objects, duplicatesIndexes) {
+ var objectKeyList,
+ index,
+ length;
+
+ if (object !== null && typeof object === 'object') {
+ index = objects.indexOf(object);
+ if (index !== -1) {
+ if (duplicatesIndexes.indexOf(index) === -1) {
+ duplicatesIndexes.push(index);
+ }
+ } else {
+ objects.push(object);
+
+ if (Array.isArray(object)) {
+ for (index = 0, length = object.length; index < length; index += 1) {
+ inspectNode(object[index], objects, duplicatesIndexes);
+ }
+ } else {
+ objectKeyList = Object.keys(object);
+
+ for (index = 0, length = objectKeyList.length; index < length; index += 1) {
+ inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes);
+ }
+ }
+ }
+ }
+}
+
+function dump(input, options) {
+ options = options || {};
+
+ var state = new State(options);
+
+ if (!state.noRefs) getDuplicateReferences(input, state);
+
+ if (writeNode(state, 0, input, true, true)) return state.dump + '\n';
+
+ return '';
+}
+
+function safeDump(input, options) {
+ return dump(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));
+}
+
+module.exports.dump = dump;
+module.exports.safeDump = safeDump;
+
+},{"./common":2,"./exception":4,"./schema/default_full":9,"./schema/default_safe":10}],4:[function(require,module,exports){
+// YAML error class. http://stackoverflow.com/questions/8458984
+//
+'use strict';
+
+function YAMLException(reason, mark) {
+ // Super constructor
+ Error.call(this);
+
+ this.name = 'YAMLException';
+ this.reason = reason;
+ this.mark = mark;
+ this.message = (this.reason || '(unknown reason)') + (this.mark ? ' ' + this.mark.toString() : '');
+
+ // Include stack trace in error object
+ if (Error.captureStackTrace) {
+ // Chrome and NodeJS
+ Error.captureStackTrace(this, this.constructor);
+ } else {
+ // FF, IE 10+ and Safari 6+. Fallback for others
+ this.stack = (new Error()).stack || '';
+ }
+}
+
+
+// Inherit from Error
+YAMLException.prototype = Object.create(Error.prototype);
+YAMLException.prototype.constructor = YAMLException;
+
+
+YAMLException.prototype.toString = function toString(compact) {
+ var result = this.name + ': ';
+
+ result += this.reason || '(unknown reason)';
+
+ if (!compact && this.mark) {
+ result += ' ' + this.mark.toString();
+ }
+
+ return result;
+};
+
+
+module.exports = YAMLException;
+
+},{}],5:[function(require,module,exports){
+'use strict';
+
+/*eslint-disable max-len,no-use-before-define*/
+
+var common = require('./common');
+var YAMLException = require('./exception');
+var Mark = require('./mark');
+var DEFAULT_SAFE_SCHEMA = require('./schema/default_safe');
+var DEFAULT_FULL_SCHEMA = require('./schema/default_full');
+
+
+var _hasOwnProperty = Object.prototype.hasOwnProperty;
+
+
+var CONTEXT_FLOW_IN = 1;
+var CONTEXT_FLOW_OUT = 2;
+var CONTEXT_BLOCK_IN = 3;
+var CONTEXT_BLOCK_OUT = 4;
+
+
+var CHOMPING_CLIP = 1;
+var CHOMPING_STRIP = 2;
+var CHOMPING_KEEP = 3;
+
+
+var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
+var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/;
+var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/;
+var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i;
+var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
+
+
+function is_EOL(c) {
+ return (c === 0x0A/* LF */) || (c === 0x0D/* CR */);
+}
+
+function is_WHITE_SPACE(c) {
+ return (c === 0x09/* Tab */) || (c === 0x20/* Space */);
+}
+
+function is_WS_OR_EOL(c) {
+ return (c === 0x09/* Tab */) ||
+ (c === 0x20/* Space */) ||
+ (c === 0x0A/* LF */) ||
+ (c === 0x0D/* CR */);
+}
+
+function is_FLOW_INDICATOR(c) {
+ return c === 0x2C/* , */ ||
+ c === 0x5B/* [ */ ||
+ c === 0x5D/* ] */ ||
+ c === 0x7B/* { */ ||
+ c === 0x7D/* } */;
+}
+
+function fromHexCode(c) {
+ var lc;
+
+ if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {
+ return c - 0x30;
+ }
+
+ /*eslint-disable no-bitwise*/
+ lc = c | 0x20;
+
+ if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) {
+ return lc - 0x61 + 10;
+ }
+
+ return -1;
+}
+
+function escapedHexLen(c) {
+ if (c === 0x78/* x */) { return 2; }
+ if (c === 0x75/* u */) { return 4; }
+ if (c === 0x55/* U */) { return 8; }
+ return 0;
+}
+
+function fromDecimalCode(c) {
+ if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {
+ return c - 0x30;
+ }
+
+ return -1;
+}
+
+function simpleEscapeSequence(c) {
+ /* eslint-disable indent */
+ return (c === 0x30/* 0 */) ? '\x00' :
+ (c === 0x61/* a */) ? '\x07' :
+ (c === 0x62/* b */) ? '\x08' :
+ (c === 0x74/* t */) ? '\x09' :
+ (c === 0x09/* Tab */) ? '\x09' :
+ (c === 0x6E/* n */) ? '\x0A' :
+ (c === 0x76/* v */) ? '\x0B' :
+ (c === 0x66/* f */) ? '\x0C' :
+ (c === 0x72/* r */) ? '\x0D' :
+ (c === 0x65/* e */) ? '\x1B' :
+ (c === 0x20/* Space */) ? ' ' :
+ (c === 0x22/* " */) ? '\x22' :
+ (c === 0x2F/* / */) ? '/' :
+ (c === 0x5C/* \ */) ? '\x5C' :
+ (c === 0x4E/* N */) ? '\x85' :
+ (c === 0x5F/* _ */) ? '\xA0' :
+ (c === 0x4C/* L */) ? '\u2028' :
+ (c === 0x50/* P */) ? '\u2029' : '';
+}
+
+function charFromCodepoint(c) {
+ if (c <= 0xFFFF) {
+ return String.fromCharCode(c);
+ }
+ // Encode UTF-16 surrogate pair
+ // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF
+ return String.fromCharCode(
+ ((c - 0x010000) >> 10) + 0xD800,
+ ((c - 0x010000) & 0x03FF) + 0xDC00
+ );
+}
+
+var simpleEscapeCheck = new Array(256); // integer, for fast access
+var simpleEscapeMap = new Array(256);
+for (var i = 0; i < 256; i++) {
+ simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0;
+ simpleEscapeMap[i] = simpleEscapeSequence(i);
+}
+
+
+function State(input, options) {
+ this.input = input;
+
+ this.filename = options['filename'] || null;
+ this.schema = options['schema'] || DEFAULT_FULL_SCHEMA;
+ this.onWarning = options['onWarning'] || null;
+ this.legacy = options['legacy'] || false;
+ this.json = options['json'] || false;
+ this.listener = options['listener'] || null;
+
+ this.implicitTypes = this.schema.compiledImplicit;
+ this.typeMap = this.schema.compiledTypeMap;
+
+ this.length = input.length;
+ this.position = 0;
+ this.line = 0;
+ this.lineStart = 0;
+ this.lineIndent = 0;
+
+ this.documents = [];
+
+ /*
+ this.version;
+ this.checkLineBreaks;
+ this.tagMap;
+ this.anchorMap;
+ this.tag;
+ this.anchor;
+ this.kind;
+ this.result;*/
+
+}
+
+
+function generateError(state, message) {
+ return new YAMLException(
+ message,
+ new Mark(state.filename, state.input, state.position, state.line, (state.position - state.lineStart)));
+}
+
+function throwError(state, message) {
+ throw generateError(state, message);
+}
+
+function throwWarning(state, message) {
+ if (state.onWarning) {
+ state.onWarning.call(null, generateError(state, message));
+ }
+}
+
+
+var directiveHandlers = {
+
+ YAML: function handleYamlDirective(state, name, args) {
+
+ var match, major, minor;
+
+ if (state.version !== null) {
+ throwError(state, 'duplication of %YAML directive');
+ }
+
+ if (args.length !== 1) {
+ throwError(state, 'YAML directive accepts exactly one argument');
+ }
+
+ match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]);
+
+ if (match === null) {
+ throwError(state, 'ill-formed argument of the YAML directive');
+ }
+
+ major = parseInt(match[1], 10);
+ minor = parseInt(match[2], 10);
+
+ if (major !== 1) {
+ throwError(state, 'unacceptable YAML version of the document');
+ }
+
+ state.version = args[0];
+ state.checkLineBreaks = (minor < 2);
+
+ if (minor !== 1 && minor !== 2) {
+ throwWarning(state, 'unsupported YAML version of the document');
+ }
+ },
+
+ TAG: function handleTagDirective(state, name, args) {
+
+ var handle, prefix;
+
+ if (args.length !== 2) {
+ throwError(state, 'TAG directive accepts exactly two arguments');
+ }
+
+ handle = args[0];
+ prefix = args[1];
+
+ if (!PATTERN_TAG_HANDLE.test(handle)) {
+ throwError(state, 'ill-formed tag handle (first argument) of the TAG directive');
+ }
+
+ if (_hasOwnProperty.call(state.tagMap, handle)) {
+ throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle');
+ }
+
+ if (!PATTERN_TAG_URI.test(prefix)) {
+ throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive');
+ }
+
+ state.tagMap[handle] = prefix;
+ }
+};
+
+
+function captureSegment(state, start, end, checkJson) {
+ var _position, _length, _character, _result;
+
+ if (start < end) {
+ _result = state.input.slice(start, end);
+
+ if (checkJson) {
+ for (_position = 0, _length = _result.length; _position < _length; _position += 1) {
+ _character = _result.charCodeAt(_position);
+ if (!(_character === 0x09 ||
+ (0x20 <= _character && _character <= 0x10FFFF))) {
+ throwError(state, 'expected valid JSON character');
+ }
+ }
+ } else if (PATTERN_NON_PRINTABLE.test(_result)) {
+ throwError(state, 'the stream contains non-printable characters');
+ }
+
+ state.result += _result;
+ }
+}
+
+function mergeMappings(state, destination, source, overridableKeys) {
+ var sourceKeys, key, index, quantity;
+
+ if (!common.isObject(source)) {
+ throwError(state, 'cannot merge mappings; the provided source object is unacceptable');
+ }
+
+ sourceKeys = Object.keys(source);
+
+ for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {
+ key = sourceKeys[index];
+
+ if (!_hasOwnProperty.call(destination, key)) {
+ destination[key] = source[key];
+ overridableKeys[key] = true;
+ }
+ }
+}
+
+function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startPos) {
+ var index, quantity;
+
+ keyNode = String(keyNode);
+
+ if (_result === null) {
+ _result = {};
+ }
+
+ if (keyTag === 'tag:yaml.org,2002:merge') {
+ if (Array.isArray(valueNode)) {
+ for (index = 0, quantity = valueNode.length; index < quantity; index += 1) {
+ mergeMappings(state, _result, valueNode[index], overridableKeys);
+ }
+ } else {
+ mergeMappings(state, _result, valueNode, overridableKeys);
+ }
+ } else {
+ if (!state.json &&
+ !_hasOwnProperty.call(overridableKeys, keyNode) &&
+ _hasOwnProperty.call(_result, keyNode)) {
+ state.line = startLine || state.line;
+ state.position = startPos || state.position;
+ throwError(state, 'duplicated mapping key');
+ }
+ _result[keyNode] = valueNode;
+ delete overridableKeys[keyNode];
+ }
+
+ return _result;
+}
+
+function readLineBreak(state) {
+ var ch;
+
+ ch = state.input.charCodeAt(state.position);
+
+ if (ch === 0x0A/* LF */) {
+ state.position++;
+ } else if (ch === 0x0D/* CR */) {
+ state.position++;
+ if (state.input.charCodeAt(state.position) === 0x0A/* LF */) {
+ state.position++;
+ }
+ } else {
+ throwError(state, 'a line break is expected');
+ }
+
+ state.line += 1;
+ state.lineStart = state.position;
+}
+
+function skipSeparationSpace(state, allowComments, checkIndent) {
+ var lineBreaks = 0,
+ ch = state.input.charCodeAt(state.position);
+
+ while (ch !== 0) {
+ while (is_WHITE_SPACE(ch)) {
+ ch = state.input.charCodeAt(++state.position);
+ }
+
+ if (allowComments && ch === 0x23/* # */) {
+ do {
+ ch = state.input.charCodeAt(++state.position);
+ } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0);
+ }
+
+ if (is_EOL(ch)) {
+ readLineBreak(state);
+
+ ch = state.input.charCodeAt(state.position);
+ lineBreaks++;
+ state.lineIndent = 0;
+
+ while (ch === 0x20/* Space */) {
+ state.lineIndent++;
+ ch = state.input.charCodeAt(++state.position);
+ }
+ } else {
+ break;
+ }
+ }
+
+ if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) {
+ throwWarning(state, 'deficient indentation');
+ }
+
+ return lineBreaks;
+}
+
+function testDocumentSeparator(state) {
+ var _position = state.position,
+ ch;
+
+ ch = state.input.charCodeAt(_position);
+
+ // Condition state.position === state.lineStart is tested
+ // in parent on each call, for efficiency. No needs to test here again.
+ if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) &&
+ ch === state.input.charCodeAt(_position + 1) &&
+ ch === state.input.charCodeAt(_position + 2)) {
+
+ _position += 3;
+
+ ch = state.input.charCodeAt(_position);
+
+ if (ch === 0 || is_WS_OR_EOL(ch)) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+function writeFoldedLines(state, count) {
+ if (count === 1) {
+ state.result += ' ';
+ } else if (count > 1) {
+ state.result += common.repeat('\n', count - 1);
+ }
+}
+
+
+function readPlainScalar(state, nodeIndent, withinFlowCollection) {
+ var preceding,
+ following,
+ captureStart,
+ captureEnd,
+ hasPendingContent,
+ _line,
+ _lineStart,
+ _lineIndent,
+ _kind = state.kind,
+ _result = state.result,
+ ch;
+
+ ch = state.input.charCodeAt(state.position);
+
+ if (is_WS_OR_EOL(ch) ||
+ is_FLOW_INDICATOR(ch) ||
+ ch === 0x23/* # */ ||
+ ch === 0x26/* & */ ||
+ ch === 0x2A/* * */ ||
+ ch === 0x21/* ! */ ||
+ ch === 0x7C/* | */ ||
+ ch === 0x3E/* > */ ||
+ ch === 0x27/* ' */ ||
+ ch === 0x22/* " */ ||
+ ch === 0x25/* % */ ||
+ ch === 0x40/* @ */ ||
+ ch === 0x60/* ` */) {
+ return false;
+ }
+
+ if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) {
+ following = state.input.charCodeAt(state.position + 1);
+
+ if (is_WS_OR_EOL(following) ||
+ withinFlowCollection && is_FLOW_INDICATOR(following)) {
+ return false;
+ }
+ }
+
+ state.kind = 'scalar';
+ state.result = '';
+ captureStart = captureEnd = state.position;
+ hasPendingContent = false;
+
+ while (ch !== 0) {
+ if (ch === 0x3A/* : */) {
+ following = state.input.charCodeAt(state.position + 1);
+
+ if (is_WS_OR_EOL(following) ||
+ withinFlowCollection && is_FLOW_INDICATOR(following)) {
+ break;
+ }
+
+ } else if (ch === 0x23/* # */) {
+ preceding = state.input.charCodeAt(state.position - 1);
+
+ if (is_WS_OR_EOL(preceding)) {
+ break;
+ }
+
+ } else if ((state.position === state.lineStart && testDocumentSeparator(state)) ||
+ withinFlowCollection && is_FLOW_INDICATOR(ch)) {
+ break;
+
+ } else if (is_EOL(ch)) {
+ _line = state.line;
+ _lineStart = state.lineStart;
+ _lineIndent = state.lineIndent;
+ skipSeparationSpace(state, false, -1);
+
+ if (state.lineIndent >= nodeIndent) {
+ hasPendingContent = true;
+ ch = state.input.charCodeAt(state.position);
+ continue;
+ } else {
+ state.position = captureEnd;
+ state.line = _line;
+ state.lineStart = _lineStart;
+ state.lineIndent = _lineIndent;
+ break;
+ }
+ }
+
+ if (hasPendingContent) {
+ captureSegment(state, captureStart, captureEnd, false);
+ writeFoldedLines(state, state.line - _line);
+ captureStart = captureEnd = state.position;
+ hasPendingContent = false;
+ }
+
+ if (!is_WHITE_SPACE(ch)) {
+ captureEnd = state.position + 1;
+ }
+
+ ch = state.input.charCodeAt(++state.position);
+ }
+
+ captureSegment(state, captureStart, captureEnd, false);
+
+ if (state.result) {
+ return true;
+ }
+
+ state.kind = _kind;
+ state.result = _result;
+ return false;
+}
+
+function readSingleQuotedScalar(state, nodeIndent) {
+ var ch,
+ captureStart, captureEnd;
+
+ ch = state.input.charCodeAt(state.position);
+
+ if (ch !== 0x27/* ' */) {
+ return false;
+ }
+
+ state.kind = 'scalar';
+ state.result = '';
+ state.position++;
+ captureStart = captureEnd = state.position;
+
+ while ((ch = state.input.charCodeAt(state.position)) !== 0) {
+ if (ch === 0x27/* ' */) {
+ captureSegment(state, captureStart, state.position, true);
+ ch = state.input.charCodeAt(++state.position);
+
+ if (ch === 0x27/* ' */) {
+ captureStart = state.position;
+ state.position++;
+ captureEnd = state.position;
+ } else {
+ return true;
+ }
+
+ } else if (is_EOL(ch)) {
+ captureSegment(state, captureStart, captureEnd, true);
+ writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
+ captureStart = captureEnd = state.position;
+
+ } else if (state.position === state.lineStart && testDocumentSeparator(state)) {
+ throwError(state, 'unexpected end of the document within a single quoted scalar');
+
+ } else {
+ state.position++;
+ captureEnd = state.position;
+ }
+ }
+
+ throwError(state, 'unexpected end of the stream within a single quoted scalar');
+}
+
+function readDoubleQuotedScalar(state, nodeIndent) {
+ var captureStart,
+ captureEnd,
+ hexLength,
+ hexResult,
+ tmp,
+ ch;
+
+ ch = state.input.charCodeAt(state.position);
+
+ if (ch !== 0x22/* " */) {
+ return false;
+ }
+
+ state.kind = 'scalar';
+ state.result = '';
+ state.position++;
+ captureStart = captureEnd = state.position;
+
+ while ((ch = state.input.charCodeAt(state.position)) !== 0) {
+ if (ch === 0x22/* " */) {
+ captureSegment(state, captureStart, state.position, true);
+ state.position++;
+ return true;
+
+ } else if (ch === 0x5C/* \ */) {
+ captureSegment(state, captureStart, state.position, true);
+ ch = state.input.charCodeAt(++state.position);
+
+ if (is_EOL(ch)) {
+ skipSeparationSpace(state, false, nodeIndent);
+
+ // TODO: rework to inline fn with no type cast?
+ } else if (ch < 256 && simpleEscapeCheck[ch]) {
+ state.result += simpleEscapeMap[ch];
+ state.position++;
+
+ } else if ((tmp = escapedHexLen(ch)) > 0) {
+ hexLength = tmp;
+ hexResult = 0;
+
+ for (; hexLength > 0; hexLength--) {
+ ch = state.input.charCodeAt(++state.position);
+
+ if ((tmp = fromHexCode(ch)) >= 0) {
+ hexResult = (hexResult << 4) + tmp;
+
+ } else {
+ throwError(state, 'expected hexadecimal character');
+ }
+ }
+
+ state.result += charFromCodepoint(hexResult);
+
+ state.position++;
+
+ } else {
+ throwError(state, 'unknown escape sequence');
+ }
+
+ captureStart = captureEnd = state.position;
+
+ } else if (is_EOL(ch)) {
+ captureSegment(state, captureStart, captureEnd, true);
+ writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
+ captureStart = captureEnd = state.position;
+
+ } else if (state.position === state.lineStart && testDocumentSeparator(state)) {
+ throwError(state, 'unexpected end of the document within a double quoted scalar');
+
+ } else {
+ state.position++;
+ captureEnd = state.position;
+ }
+ }
+
+ throwError(state, 'unexpected end of the stream within a double quoted scalar');
+}
+
+function readFlowCollection(state, nodeIndent) {
+ var readNext = true,
+ _line,
+ _tag = state.tag,
+ _result,
+ _anchor = state.anchor,
+ following,
+ terminator,
+ isPair,
+ isExplicitPair,
+ isMapping,
+ overridableKeys = {},
+ keyNode,
+ keyTag,
+ valueNode,
+ ch;
+
+ ch = state.input.charCodeAt(state.position);
+
+ if (ch === 0x5B/* [ */) {
+ terminator = 0x5D;/* ] */
+ isMapping = false;
+ _result = [];
+ } else if (ch === 0x7B/* { */) {
+ terminator = 0x7D;/* } */
+ isMapping = true;
+ _result = {};
+ } else {
+ return false;
+ }
+
+ if (state.anchor !== null) {
+ state.anchorMap[state.anchor] = _result;
+ }
+
+ ch = state.input.charCodeAt(++state.position);
+
+ while (ch !== 0) {
+ skipSeparationSpace(state, true, nodeIndent);
+
+ ch = state.input.charCodeAt(state.position);
+
+ if (ch === terminator) {
+ state.position++;
+ state.tag = _tag;
+ state.anchor = _anchor;
+ state.kind = isMapping ? 'mapping' : 'sequence';
+ state.result = _result;
+ return true;
+ } else if (!readNext) {
+ throwError(state, 'missed comma between flow collection entries');
+ }
+
+ keyTag = keyNode = valueNode = null;
+ isPair = isExplicitPair = false;
+
+ if (ch === 0x3F/* ? */) {
+ following = state.input.charCodeAt(state.position + 1);
+
+ if (is_WS_OR_EOL(following)) {
+ isPair = isExplicitPair = true;
+ state.position++;
+ skipSeparationSpace(state, true, nodeIndent);
+ }
+ }
+
+ _line = state.line;
+ composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);
+ keyTag = state.tag;
+ keyNode = state.result;
+ skipSeparationSpace(state, true, nodeIndent);
+
+ ch = state.input.charCodeAt(state.position);
+
+ if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) {
+ isPair = true;
+ ch = state.input.charCodeAt(++state.position);
+ skipSeparationSpace(state, true, nodeIndent);
+ composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);
+ valueNode = state.result;
+ }
+
+ if (isMapping) {
+ storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode);
+ } else if (isPair) {
+ _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode));
+ } else {
+ _result.push(keyNode);
+ }
+
+ skipSeparationSpace(state, true, nodeIndent);
+
+ ch = state.input.charCodeAt(state.position);
+
+ if (ch === 0x2C/* , */) {
+ readNext = true;
+ ch = state.input.charCodeAt(++state.position);
+ } else {
+ readNext = false;
+ }
+ }
+
+ throwError(state, 'unexpected end of the stream within a flow collection');
+}
+
+function readBlockScalar(state, nodeIndent) {
+ var captureStart,
+ folding,
+ chomping = CHOMPING_CLIP,
+ didReadContent = false,
+ detectedIndent = false,
+ textIndent = nodeIndent,
+ emptyLines = 0,
+ atMoreIndented = false,
+ tmp,
+ ch;
+
+ ch = state.input.charCodeAt(state.position);
+
+ if (ch === 0x7C/* | */) {
+ folding = false;
+ } else if (ch === 0x3E/* > */) {
+ folding = true;
+ } else {
+ return false;
+ }
+
+ state.kind = 'scalar';
+ state.result = '';
+
+ while (ch !== 0) {
+ ch = state.input.charCodeAt(++state.position);
+
+ if (ch === 0x2B/* + */ || ch === 0x2D/* - */) {
+ if (CHOMPING_CLIP === chomping) {
+ chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP;
+ } else {
+ throwError(state, 'repeat of a chomping mode identifier');
+ }
+
+ } else if ((tmp = fromDecimalCode(ch)) >= 0) {
+ if (tmp === 0) {
+ throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one');
+ } else if (!detectedIndent) {
+ textIndent = nodeIndent + tmp - 1;
+ detectedIndent = true;
+ } else {
+ throwError(state, 'repeat of an indentation width identifier');
+ }
+
+ } else {
+ break;
+ }
+ }
+
+ if (is_WHITE_SPACE(ch)) {
+ do { ch = state.input.charCodeAt(++state.position); }
+ while (is_WHITE_SPACE(ch));
+
+ if (ch === 0x23/* # */) {
+ do { ch = state.input.charCodeAt(++state.position); }
+ while (!is_EOL(ch) && (ch !== 0));
+ }
+ }
+
+ while (ch !== 0) {
+ readLineBreak(state);
+ state.lineIndent = 0;
+
+ ch = state.input.charCodeAt(state.position);
+
+ while ((!detectedIndent || state.lineIndent < textIndent) &&
+ (ch === 0x20/* Space */)) {
+ state.lineIndent++;
+ ch = state.input.charCodeAt(++state.position);
+ }
+
+ if (!detectedIndent && state.lineIndent > textIndent) {
+ textIndent = state.lineIndent;
+ }
+
+ if (is_EOL(ch)) {
+ emptyLines++;
+ continue;
+ }
+
+ // End of the scalar.
+ if (state.lineIndent < textIndent) {
+
+ // Perform the chomping.
+ if (chomping === CHOMPING_KEEP) {
+ state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines);
+ } else if (chomping === CHOMPING_CLIP) {
+ if (didReadContent) { // i.e. only if the scalar is not empty.
+ state.result += '\n';
+ }
+ }
+
+ // Break this `while` cycle and go to the funciton's epilogue.
+ break;
+ }
+
+ // Folded style: use fancy rules to handle line breaks.
+ if (folding) {
+
+ // Lines starting with white space characters (more-indented lines) are not folded.
+ if (is_WHITE_SPACE(ch)) {
+ atMoreIndented = true;
+ // except for the first content line (cf. Example 8.1)
+ state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines);
+
+ // End of more-indented block.
+ } else if (atMoreIndented) {
+ atMoreIndented = false;
+ state.result += common.repeat('\n', emptyLines + 1);
+
+ // Just one line break - perceive as the same line.
+ } else if (emptyLines === 0) {
+ if (didReadContent) { // i.e. only if we have already read some scalar content.
+ state.result += ' ';
+ }
+
+ // Several line breaks - perceive as different lines.
+ } else {
+ state.result += common.repeat('\n', emptyLines);
+ }
+
+ // Literal style: just add exact number of line breaks between content lines.
+ } else {
+ // Keep all line breaks except the header line break.
+ state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines);
+ }
+
+ didReadContent = true;
+ detectedIndent = true;
+ emptyLines = 0;
+ captureStart = state.position;
+
+ while (!is_EOL(ch) && (ch !== 0)) {
+ ch = state.input.charCodeAt(++state.position);
+ }
+
+ captureSegment(state, captureStart, state.position, false);
+ }
+
+ return true;
+}
+
+function readBlockSequence(state, nodeIndent) {
+ var _line,
+ _tag = state.tag,
+ _anchor = state.anchor,
+ _result = [],
+ following,
+ detected = false,
+ ch;
+
+ if (state.anchor !== null) {
+ state.anchorMap[state.anchor] = _result;
+ }
+
+ ch = state.input.charCodeAt(state.position);
+
+ while (ch !== 0) {
+
+ if (ch !== 0x2D/* - */) {
+ break;
+ }
+
+ following = state.input.charCodeAt(state.position + 1);
+
+ if (!is_WS_OR_EOL(following)) {
+ break;
+ }
+
+ detected = true;
+ state.position++;
+
+ if (skipSeparationSpace(state, true, -1)) {
+ if (state.lineIndent <= nodeIndent) {
+ _result.push(null);
+ ch = state.input.charCodeAt(state.position);
+ continue;
+ }
+ }
+
+ _line = state.line;
+ composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true);
+ _result.push(state.result);
+ skipSeparationSpace(state, true, -1);
+
+ ch = state.input.charCodeAt(state.position);
+
+ if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) {
+ throwError(state, 'bad indentation of a sequence entry');
+ } else if (state.lineIndent < nodeIndent) {
+ break;
+ }
+ }
+
+ if (detected) {
+ state.tag = _tag;
+ state.anchor = _anchor;
+ state.kind = 'sequence';
+ state.result = _result;
+ return true;
+ }
+ return false;
+}
+
+function readBlockMapping(state, nodeIndent, flowIndent) {
+ var following,
+ allowCompact,
+ _line,
+ _pos,
+ _tag = state.tag,
+ _anchor = state.anchor,
+ _result = {},
+ overridableKeys = {},
+ keyTag = null,
+ keyNode = null,
+ valueNode = null,
+ atExplicitKey = false,
+ detected = false,
+ ch;
+
+ if (state.anchor !== null) {
+ state.anchorMap[state.anchor] = _result;
+ }
+
+ ch = state.input.charCodeAt(state.position);
+
+ while (ch !== 0) {
+ following = state.input.charCodeAt(state.position + 1);
+ _line = state.line; // Save the current line.
+ _pos = state.position;
+
+ //
+ // Explicit notation case. There are two separate blocks:
+ // first for the key (denoted by "?") and second for the value (denoted by ":")
+ //
+ if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) {
+
+ if (ch === 0x3F/* ? */) {
+ if (atExplicitKey) {
+ storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null);
+ keyTag = keyNode = valueNode = null;
+ }
+
+ detected = true;
+ atExplicitKey = true;
+ allowCompact = true;
+
+ } else if (atExplicitKey) {
+ // i.e. 0x3A/* : */ === character after the explicit key.
+ atExplicitKey = false;
+ allowCompact = true;
+
+ } else {
+ throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line');
+ }
+
+ state.position += 1;
+ ch = following;
+
+ //
+ // Implicit notation case. Flow-style node as the key first, then ":", and the value.
+ //
+ } else if (composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {
+
+ if (state.line === _line) {
+ ch = state.input.charCodeAt(state.position);
+
+ while (is_WHITE_SPACE(ch)) {
+ ch = state.input.charCodeAt(++state.position);
+ }
+
+ if (ch === 0x3A/* : */) {
+ ch = state.input.charCodeAt(++state.position);
+
+ if (!is_WS_OR_EOL(ch)) {
+ throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping');
+ }
+
+ if (atExplicitKey) {
+ storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null);
+ keyTag = keyNode = valueNode = null;
+ }
+
+ detected = true;
+ atExplicitKey = false;
+ allowCompact = false;
+ keyTag = state.tag;
+ keyNode = state.result;
+
+ } else if (detected) {
+ throwError(state, 'can not read an implicit mapping pair; a colon is missed');
+
+ } else {
+ state.tag = _tag;
+ state.anchor = _anchor;
+ return true; // Keep the result of `composeNode`.
+ }
+
+ } else if (detected) {
+ throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key');
+
+ } else {
+ state.tag = _tag;
+ state.anchor = _anchor;
+ return true; // Keep the result of `composeNode`.
+ }
+
+ } else {
+ break; // Reading is done. Go to the epilogue.
+ }
+
+ //
+ // Common reading code for both explicit and implicit notations.
+ //
+ if (state.line === _line || state.lineIndent > nodeIndent) {
+ if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) {
+ if (atExplicitKey) {
+ keyNode = state.result;
+ } else {
+ valueNode = state.result;
+ }
+ }
+
+ if (!atExplicitKey) {
+ storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _pos);
+ keyTag = keyNode = valueNode = null;
+ }
+
+ skipSeparationSpace(state, true, -1);
+ ch = state.input.charCodeAt(state.position);
+ }
+
+ if (state.lineIndent > nodeIndent && (ch !== 0)) {
+ throwError(state, 'bad indentation of a mapping entry');
+ } else if (state.lineIndent < nodeIndent) {
+ break;
+ }
+ }
+
+ //
+ // Epilogue.
+ //
+
+ // Special case: last mapping's node contains only the key in explicit notation.
+ if (atExplicitKey) {
+ storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null);
+ }
+
+ // Expose the resulting mapping.
+ if (detected) {
+ state.tag = _tag;
+ state.anchor = _anchor;
+ state.kind = 'mapping';
+ state.result = _result;
+ }
+
+ return detected;
+}
+
+function readTagProperty(state) {
+ var _position,
+ isVerbatim = false,
+ isNamed = false,
+ tagHandle,
+ tagName,
+ ch;
+
+ ch = state.input.charCodeAt(state.position);
+
+ if (ch !== 0x21/* ! */) return false;
+
+ if (state.tag !== null) {
+ throwError(state, 'duplication of a tag property');
+ }
+
+ ch = state.input.charCodeAt(++state.position);
+
+ if (ch === 0x3C/* < */) {
+ isVerbatim = true;
+ ch = state.input.charCodeAt(++state.position);
+
+ } else if (ch === 0x21/* ! */) {
+ isNamed = true;
+ tagHandle = '!!';
+ ch = state.input.charCodeAt(++state.position);
+
+ } else {
+ tagHandle = '!';
+ }
+
+ _position = state.position;
+
+ if (isVerbatim) {
+ do { ch = state.input.charCodeAt(++state.position); }
+ while (ch !== 0 && ch !== 0x3E/* > */);
+
+ if (state.position < state.length) {
+ tagName = state.input.slice(_position, state.position);
+ ch = state.input.charCodeAt(++state.position);
+ } else {
+ throwError(state, 'unexpected end of the stream within a verbatim tag');
+ }
+ } else {
+ while (ch !== 0 && !is_WS_OR_EOL(ch)) {
+
+ if (ch === 0x21/* ! */) {
+ if (!isNamed) {
+ tagHandle = state.input.slice(_position - 1, state.position + 1);
+
+ if (!PATTERN_TAG_HANDLE.test(tagHandle)) {
+ throwError(state, 'named tag handle cannot contain such characters');
+ }
+
+ isNamed = true;
+ _position = state.position + 1;
+ } else {
+ throwError(state, 'tag suffix cannot contain exclamation marks');
+ }
+ }
+
+ ch = state.input.charCodeAt(++state.position);
+ }
+
+ tagName = state.input.slice(_position, state.position);
+
+ if (PATTERN_FLOW_INDICATORS.test(tagName)) {
+ throwError(state, 'tag suffix cannot contain flow indicator characters');
+ }
+ }
+
+ if (tagName && !PATTERN_TAG_URI.test(tagName)) {
+ throwError(state, 'tag name cannot contain such characters: ' + tagName);
+ }
+
+ if (isVerbatim) {
+ state.tag = tagName;
+
+ } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) {
+ state.tag = state.tagMap[tagHandle] + tagName;
+
+ } else if (tagHandle === '!') {
+ state.tag = '!' + tagName;
+
+ } else if (tagHandle === '!!') {
+ state.tag = 'tag:yaml.org,2002:' + tagName;
+
+ } else {
+ throwError(state, 'undeclared tag handle "' + tagHandle + '"');
+ }
+
+ return true;
+}
+
+function readAnchorProperty(state) {
+ var _position,
+ ch;
+
+ ch = state.input.charCodeAt(state.position);
+
+ if (ch !== 0x26/* & */) return false;
+
+ if (state.anchor !== null) {
+ throwError(state, 'duplication of an anchor property');
+ }
+
+ ch = state.input.charCodeAt(++state.position);
+ _position = state.position;
+
+ while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {
+ ch = state.input.charCodeAt(++state.position);
+ }
+
+ if (state.position === _position) {
+ throwError(state, 'name of an anchor node must contain at least one character');
+ }
+
+ state.anchor = state.input.slice(_position, state.position);
+ return true;
+}
+
+function readAlias(state) {
+ var _position, alias,
+ ch;
+
+ ch = state.input.charCodeAt(state.position);
+
+ if (ch !== 0x2A/* * */) return false;
+
+ ch = state.input.charCodeAt(++state.position);
+ _position = state.position;
+
+ while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {
+ ch = state.input.charCodeAt(++state.position);
+ }
+
+ if (state.position === _position) {
+ throwError(state, 'name of an alias node must contain at least one character');
+ }
+
+ alias = state.input.slice(_position, state.position);
+
+ if (!state.anchorMap.hasOwnProperty(alias)) {
+ throwError(state, 'unidentified alias "' + alias + '"');
+ }
+
+ state.result = state.anchorMap[alias];
+ skipSeparationSpace(state, true, -1);
+ return true;
+}
+
+function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) {
+ var allowBlockStyles,
+ allowBlockScalars,
+ allowBlockCollections,
+ indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this<parent
+ atNewLine = false,
+ hasContent = false,
+ typeIndex,
+ typeQuantity,
+ type,
+ flowIndent,
+ blockIndent;
+
+ if (state.listener !== null) {
+ state.listener('open', state);
+ }
+
+ state.tag = null;
+ state.anchor = null;
+ state.kind = null;
+ state.result = null;
+
+ allowBlockStyles = allowBlockScalars = allowBlockCollections =
+ CONTEXT_BLOCK_OUT === nodeContext ||
+ CONTEXT_BLOCK_IN === nodeContext;
+
+ if (allowToSeek) {
+ if (skipSeparationSpace(state, true, -1)) {
+ atNewLine = true;
+
+ if (state.lineIndent > parentIndent) {
+ indentStatus = 1;
+ } else if (state.lineIndent === parentIndent) {
+ indentStatus = 0;
+ } else if (state.lineIndent < parentIndent) {
+ indentStatus = -1;
+ }
+ }
+ }
+
+ if (indentStatus === 1) {
+ while (readTagProperty(state) || readAnchorProperty(state)) {
+ if (skipSeparationSpace(state, true, -1)) {
+ atNewLine = true;
+ allowBlockCollections = allowBlockStyles;
+
+ if (state.lineIndent > parentIndent) {
+ indentStatus = 1;
+ } else if (state.lineIndent === parentIndent) {
+ indentStatus = 0;
+ } else if (state.lineIndent < parentIndent) {
+ indentStatus = -1;
+ }
+ } else {
+ allowBlockCollections = false;
+ }
+ }
+ }
+
+ if (allowBlockCollections) {
+ allowBlockCollections = atNewLine || allowCompact;
+ }
+
+ if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) {
+ if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) {
+ flowIndent = parentIndent;
+ } else {
+ flowIndent = parentIndent + 1;
+ }
+
+ blockIndent = state.position - state.lineStart;
+
+ if (indentStatus === 1) {
+ if (allowBlockCollections &&
+ (readBlockSequence(state, blockIndent) ||
+ readBlockMapping(state, blockIndent, flowIndent)) ||
+ readFlowCollection(state, flowIndent)) {
+ hasContent = true;
+ } else {
+ if ((allowBlockScalars && readBlockScalar(state, flowIndent)) ||
+ readSingleQuotedScalar(state, flowIndent) ||
+ readDoubleQuotedScalar(state, flowIndent)) {
+ hasContent = true;
+
+ } else if (readAlias(state)) {
+ hasContent = true;
+
+ if (state.tag !== null || state.anchor !== null) {
+ throwError(state, 'alias node should not have any properties');
+ }
+
+ } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {
+ hasContent = true;
+
+ if (state.tag === null) {
+ state.tag = '?';
+ }
+ }
+
+ if (state.anchor !== null) {
+ state.anchorMap[state.anchor] = state.result;
+ }
+ }
+ } else if (indentStatus === 0) {
+ // Special case: block sequences are allowed to have same indentation level as the parent.
+ // http://www.yaml.org/spec/1.2/spec.html#id2799784
+ hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);
+ }
+ }
+
+ if (state.tag !== null && state.tag !== '!') {
+ if (state.tag === '?') {
+ for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {
+ type = state.implicitTypes[typeIndex];
+
+ // Implicit resolving is not allowed for non-scalar types, and '?'
+ // non-specific tag is only assigned to plain scalars. So, it isn't
+ // needed to check for 'kind' conformity.
+
+ if (type.resolve(state.result)) { // `state.result` updated in resolver if matched
+ state.result = type.construct(state.result);
+ state.tag = type.tag;
+ if (state.anchor !== null) {
+ state.anchorMap[state.anchor] = state.result;
+ }
+ break;
+ }
+ }
+ } else if (_hasOwnProperty.call(state.typeMap[state.kind || 'fallback'], state.tag)) {
+ type = state.typeMap[state.kind || 'fallback'][state.tag];
+
+ if (state.result !== null && type.kind !== state.kind) {
+ throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"');
+ }
+
+ if (!type.resolve(state.result)) { // `state.result` updated in resolver if matched
+ throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag');
+ } else {
+ state.result = type.construct(state.result);
+ if (state.anchor !== null) {
+ state.anchorMap[state.anchor] = state.result;
+ }
+ }
+ } else {
+ throwError(state, 'unknown tag !<' + state.tag + '>');
+ }
+ }
+
+ if (state.listener !== null) {
+ state.listener('close', state);
+ }
+ return state.tag !== null || state.anchor !== null || hasContent;
+}
+
+function readDocument(state) {
+ var documentStart = state.position,
+ _position,
+ directiveName,
+ directiveArgs,
+ hasDirectives = false,
+ ch;
+
+ state.version = null;
+ state.checkLineBreaks = state.legacy;
+ state.tagMap = {};
+ state.anchorMap = {};
+
+ while ((ch = state.input.charCodeAt(state.position)) !== 0) {
+ skipSeparationSpace(state, true, -1);
+
+ ch = state.input.charCodeAt(state.position);
+
+ if (state.lineIndent > 0 || ch !== 0x25/* % */) {
+ break;
+ }
+
+ hasDirectives = true;
+ ch = state.input.charCodeAt(++state.position);
+ _position = state.position;
+
+ while (ch !== 0 && !is_WS_OR_EOL(ch)) {
+ ch = state.input.charCodeAt(++state.position);
+ }
+
+ directiveName = state.input.slice(_position, state.position);
+ directiveArgs = [];
+
+ if (directiveName.length < 1) {
+ throwError(state, 'directive name must not be less than one character in length');
+ }
+
+ while (ch !== 0) {
+ while (is_WHITE_SPACE(ch)) {
+ ch = state.input.charCodeAt(++state.position);
+ }
+
+ if (ch === 0x23/* # */) {
+ do { ch = state.input.charCodeAt(++state.position); }
+ while (ch !== 0 && !is_EOL(ch));
+ break;
+ }
+
+ if (is_EOL(ch)) break;
+
+ _position = state.position;
+
+ while (ch !== 0 && !is_WS_OR_EOL(ch)) {
+ ch = state.input.charCodeAt(++state.position);
+ }
+
+ directiveArgs.push(state.input.slice(_position, state.position));
+ }
+
+ if (ch !== 0) readLineBreak(state);
+
+ if (_hasOwnProperty.call(directiveHandlers, directiveName)) {
+ directiveHandlers[directiveName](state, directiveName, directiveArgs);
+ } else {
+ throwWarning(state, 'unknown document directive "' + directiveName + '"');
+ }
+ }
+
+ skipSeparationSpace(state, true, -1);
+
+ if (state.lineIndent === 0 &&
+ state.input.charCodeAt(state.position) === 0x2D/* - */ &&
+ state.input.charCodeAt(state.position + 1) === 0x2D/* - */ &&
+ state.input.charCodeAt(state.position + 2) === 0x2D/* - */) {
+ state.position += 3;
+ skipSeparationSpace(state, true, -1);
+
+ } else if (hasDirectives) {
+ throwError(state, 'directives end mark is expected');
+ }
+
+ composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true);
+ skipSeparationSpace(state, true, -1);
+
+ if (state.checkLineBreaks &&
+ PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) {
+ throwWarning(state, 'non-ASCII line breaks are interpreted as content');
+ }
+
+ state.documents.push(state.result);
+
+ if (state.position === state.lineStart && testDocumentSeparator(state)) {
+
+ if (state.input.charCodeAt(state.position) === 0x2E/* . */) {
+ state.position += 3;
+ skipSeparationSpace(state, true, -1);
+ }
+ return;
+ }
+
+ if (state.position < (state.length - 1)) {
+ throwError(state, 'end of the stream or a document separator is expected');
+ } else {
+ return;
+ }
+}
+
+
+function loadDocuments(input, options) {
+ input = String(input);
+ options = options || {};
+
+ if (input.length !== 0) {
+
+ // Add tailing `\n` if not exists
+ if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ &&
+ input.charCodeAt(input.length - 1) !== 0x0D/* CR */) {
+ input += '\n';
+ }
+
+ // Strip BOM
+ if (input.charCodeAt(0) === 0xFEFF) {
+ input = input.slice(1);
+ }
+ }
+
+ var state = new State(input, options);
+
+ // Use 0 as string terminator. That significantly simplifies bounds check.
+ state.input += '\0';
+
+ while (state.input.charCodeAt(state.position) === 0x20/* Space */) {
+ state.lineIndent += 1;
+ state.position += 1;
+ }
+
+ while (state.position < (state.length - 1)) {
+ readDocument(state);
+ }
+
+ return state.documents;
+}
+
+
+function loadAll(input, iterator, options) {
+ var documents = loadDocuments(input, options), index, length;
+
+ if (typeof iterator !== 'function') {
+ return documents;
+ }
+
+ for (index = 0, length = documents.length; index < length; index += 1) {
+ iterator(documents[index]);
+ }
+}
+
+
+function load(input, options) {
+ var documents = loadDocuments(input, options);
+
+ if (documents.length === 0) {
+ /*eslint-disable no-undefined*/
+ return undefined;
+ } else if (documents.length === 1) {
+ return documents[0];
+ }
+ throw new YAMLException('expected a single document in the stream, but found more');
+}
+
+
+function safeLoadAll(input, output, options) {
+ if (typeof output === 'function') {
+ loadAll(input, output, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));
+ } else {
+ return loadAll(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));
+ }
+}
+
+
+function safeLoad(input, options) {
+ return load(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));
+}
+
+
+module.exports.loadAll = loadAll;
+module.exports.load = load;
+module.exports.safeLoadAll = safeLoadAll;
+module.exports.safeLoad = safeLoad;
+
+},{"./common":2,"./exception":4,"./mark":6,"./schema/default_full":9,"./schema/default_safe":10}],6:[function(require,module,exports){
+'use strict';
+
+
+var common = require('./common');
+
+
+function Mark(name, buffer, position, line, column) {
+ this.name = name;
+ this.buffer = buffer;
+ this.position = position;
+ this.line = line;
+ this.column = column;
+}
+
+
+Mark.prototype.getSnippet = function getSnippet(indent, maxLength) {
+ var head, start, tail, end, snippet;
+
+ if (!this.buffer) return null;
+
+ indent = indent || 4;
+ maxLength = maxLength || 75;
+
+ head = '';
+ start = this.position;
+
+ while (start > 0 && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(start - 1)) === -1) {
+ start -= 1;
+ if (this.position - start > (maxLength / 2 - 1)) {
+ head = ' ... ';
+ start += 5;
+ break;
+ }
+ }
+
+ tail = '';
+ end = this.position;
+
+ while (end < this.buffer.length && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(end)) === -1) {
+ end += 1;
+ if (end - this.position > (maxLength / 2 - 1)) {
+ tail = ' ... ';
+ end -= 5;
+ break;
+ }
+ }
+
+ snippet = this.buffer.slice(start, end);
+
+ return common.repeat(' ', indent) + head + snippet + tail + '\n' +
+ common.repeat(' ', indent + this.position - start + head.length) + '^';
+};
+
+
+Mark.prototype.toString = function toString(compact) {
+ var snippet, where = '';
+
+ if (this.name) {
+ where += 'in "' + this.name + '" ';
+ }
+
+ where += 'at line ' + (this.line + 1) + ', column ' + (this.column + 1);
+
+ if (!compact) {
+ snippet = this.getSnippet();
+
+ if (snippet) {
+ where += ':\n' + snippet;
+ }
+ }
+
+ return where;
+};
+
+
+module.exports = Mark;
+
+},{"./common":2}],7:[function(require,module,exports){
+'use strict';
+
+/*eslint-disable max-len*/
+
+var common = require('./common');
+var YAMLException = require('./exception');
+var Type = require('./type');
+
+
+function compileList(schema, name, result) {
+ var exclude = [];
+
+ schema.include.forEach(function (includedSchema) {
+ result = compileList(includedSchema, name, result);
+ });
+
+ schema[name].forEach(function (currentType) {
+ result.forEach(function (previousType, previousIndex) {
+ if (previousType.tag === currentType.tag && previousType.kind === currentType.kind) {
+ exclude.push(previousIndex);
+ }
+ });
+
+ result.push(currentType);
+ });
+
+ return result.filter(function (type, index) {
+ return exclude.indexOf(index) === -1;
+ });
+}
+
+
+function compileMap(/* lists... */) {
+ var result = {
+ scalar: {},
+ sequence: {},
+ mapping: {},
+ fallback: {}
+ }, index, length;
+
+ function collectType(type) {
+ result[type.kind][type.tag] = result['fallback'][type.tag] = type;
+ }
+
+ for (index = 0, length = arguments.length; index < length; index += 1) {
+ arguments[index].forEach(collectType);
+ }
+ return result;
+}
+
+
+function Schema(definition) {
+ this.include = definition.include || [];
+ this.implicit = definition.implicit || [];
+ this.explicit = definition.explicit || [];
+
+ this.implicit.forEach(function (type) {
+ if (type.loadKind && type.loadKind !== 'scalar') {
+ throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.');
+ }
+ });
+
+ this.compiledImplicit = compileList(this, 'implicit', []);
+ this.compiledExplicit = compileList(this, 'explicit', []);
+ this.compiledTypeMap = compileMap(this.compiledImplicit, this.compiledExplicit);
+}
+
+
+Schema.DEFAULT = null;
+
+
+Schema.create = function createSchema() {
+ var schemas, types;
+
+ switch (arguments.length) {
+ case 1:
+ schemas = Schema.DEFAULT;
+ types = arguments[0];
+ break;
+
+ case 2:
+ schemas = arguments[0];
+ types = arguments[1];
+ break;
+
+ default:
+ throw new YAMLException('Wrong number of arguments for Schema.create function');
+ }
+
+ schemas = common.toArray(schemas);
+ types = common.toArray(types);
+
+ if (!schemas.every(function (schema) { return schema instanceof Schema; })) {
+ throw new YAMLException('Specified list of super schemas (or a single Schema object) contains a non-Schema object.');
+ }
+
+ if (!types.every(function (type) { return type instanceof Type; })) {
+ throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.');
+ }
+
+ return new Schema({
+ include: schemas,
+ explicit: types
+ });
+};
+
+
+module.exports = Schema;
+
+},{"./common":2,"./exception":4,"./type":13}],8:[function(require,module,exports){
+// Standard YAML's Core schema.
+// http://www.yaml.org/spec/1.2/spec.html#id2804923
+//
+// NOTE: JS-YAML does not support schema-specific tag resolution restrictions.
+// So, Core schema has no distinctions from JSON schema is JS-YAML.
+
+
+'use strict';
+
+
+var Schema = require('../schema');
+
+
+module.exports = new Schema({
+ include: [
+ require('./json')
+ ]
+});
+
+},{"../schema":7,"./json":12}],9:[function(require,module,exports){
+// JS-YAML's default schema for `load` function.
+// It is not described in the YAML specification.
+//
+// This schema is based on JS-YAML's default safe schema and includes
+// JavaScript-specific types: !!js/undefined, !!js/regexp and !!js/function.
+//
+// Also this schema is used as default base schema at `Schema.create` function.
+
+
+'use strict';
+
+
+var Schema = require('../schema');
+
+
+module.exports = Schema.DEFAULT = new Schema({
+ include: [
+ require('./default_safe')
+ ],
+ explicit: [
+ require('../type/js/undefined'),
+ require('../type/js/regexp'),
+ require('../type/js/function')
+ ]
+});
+
+},{"../schema":7,"../type/js/function":18,"../type/js/regexp":19,"../type/js/undefined":20,"./default_safe":10}],10:[function(require,module,exports){
+// JS-YAML's default schema for `safeLoad` function.
+// It is not described in the YAML specification.
+//
+// This schema is based on standard YAML's Core schema and includes most of
+// extra types described at YAML tag repository. (http://yaml.org/type/)
+
+
+'use strict';
+
+
+var Schema = require('../schema');
+
+
+module.exports = new Schema({
+ include: [
+ require('./core')
+ ],
+ implicit: [
+ require('../type/timestamp'),
+ require('../type/merge')
+ ],
+ explicit: [
+ require('../type/binary'),
+ require('../type/omap'),
+ require('../type/pairs'),
+ require('../type/set')
+ ]
+});
+
+},{"../schema":7,"../type/binary":14,"../type/merge":22,"../type/omap":24,"../type/pairs":25,"../type/set":27,"../type/timestamp":29,"./core":8}],11:[function(require,module,exports){
+// Standard YAML's Failsafe schema.
+// http://www.yaml.org/spec/1.2/spec.html#id2802346
+
+
+'use strict';
+
+
+var Schema = require('../schema');
+
+
+module.exports = new Schema({
+ explicit: [
+ require('../type/str'),
+ require('../type/seq'),
+ require('../type/map')
+ ]
+});
+
+},{"../schema":7,"../type/map":21,"../type/seq":26,"../type/str":28}],12:[function(require,module,exports){
+// Standard YAML's JSON schema.
+// http://www.yaml.org/spec/1.2/spec.html#id2803231
+//
+// NOTE: JS-YAML does not support schema-specific tag resolution restrictions.
+// So, this schema is not such strict as defined in the YAML specification.
+// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc.
+
+
+'use strict';
+
+
+var Schema = require('../schema');
+
+
+module.exports = new Schema({
+ include: [
+ require('./failsafe')
+ ],
+ implicit: [
+ require('../type/null'),
+ require('../type/bool'),
+ require('../type/int'),
+ require('../type/float')
+ ]
+});
+
+},{"../schema":7,"../type/bool":15,"../type/float":16,"../type/int":17,"../type/null":23,"./failsafe":11}],13:[function(require,module,exports){
+'use strict';
+
+var YAMLException = require('./exception');
+
+var TYPE_CONSTRUCTOR_OPTIONS = [
+ 'kind',
+ 'resolve',
+ 'construct',
+ 'instanceOf',
+ 'predicate',
+ 'represent',
+ 'defaultStyle',
+ 'styleAliases'
+];
+
+var YAML_NODE_KINDS = [
+ 'scalar',
+ 'sequence',
+ 'mapping'
+];
+
+function compileStyleAliases(map) {
+ var result = {};
+
+ if (map !== null) {
+ Object.keys(map).forEach(function (style) {
+ map[style].forEach(function (alias) {
+ result[String(alias)] = style;
+ });
+ });
+ }
+
+ return result;
+}
+
+function Type(tag, options) {
+ options = options || {};
+
+ Object.keys(options).forEach(function (name) {
+ if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) {
+ throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.');
+ }
+ });
+
+ // TODO: Add tag format check.
+ this.tag = tag;
+ this.kind = options['kind'] || null;
+ this.resolve = options['resolve'] || function () { return true; };
+ this.construct = options['construct'] || function (data) { return data; };
+ this.instanceOf = options['instanceOf'] || null;
+ this.predicate = options['predicate'] || null;
+ this.represent = options['represent'] || null;
+ this.defaultStyle = options['defaultStyle'] || null;
+ this.styleAliases = compileStyleAliases(options['styleAliases'] || null);
+
+ if (YAML_NODE_KINDS.indexOf(this.kind) === -1) {
+ throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.');
+ }
+}
+
+module.exports = Type;
+
+},{"./exception":4}],14:[function(require,module,exports){
+'use strict';
+
+/*eslint-disable no-bitwise*/
+
+var NodeBuffer;
+
+try {
+ // A trick for browserified version, to not include `Buffer` shim
+ var _require = require;
+ NodeBuffer = _require('buffer').Buffer;
+} catch (__) {}
+
+var Type = require('../type');
+
+
+// [ 64, 65, 66 ] -> [ padding, CR, LF ]
+var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r';
+
+
+function resolveYamlBinary(data) {
+ if (data === null) return false;
+
+ var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP;
+
+ // Convert one by one.
+ for (idx = 0; idx < max; idx++) {
+ code = map.indexOf(data.charAt(idx));
+
+ // Skip CR/LF
+ if (code > 64) continue;
+
+ // Fail on illegal characters
+ if (code < 0) return false;
+
+ bitlen += 6;
+ }
+
+ // If there are any bits left, source was corrupted
+ return (bitlen % 8) === 0;
+}
+
+function constructYamlBinary(data) {
+ var idx, tailbits,
+ input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan
+ max = input.length,
+ map = BASE64_MAP,
+ bits = 0,
+ result = [];
+
+ // Collect by 6*4 bits (3 bytes)
+
+ for (idx = 0; idx < max; idx++) {
+ if ((idx % 4 === 0) && idx) {
+ result.push((bits >> 16) & 0xFF);
+ result.push((bits >> 8) & 0xFF);
+ result.push(bits & 0xFF);
+ }
+
+ bits = (bits << 6) | map.indexOf(input.charAt(idx));
+ }
+
+ // Dump tail
+
+ tailbits = (max % 4) * 6;
+
+ if (tailbits === 0) {
+ result.push((bits >> 16) & 0xFF);
+ result.push((bits >> 8) & 0xFF);
+ result.push(bits & 0xFF);
+ } else if (tailbits === 18) {
+ result.push((bits >> 10) & 0xFF);
+ result.push((bits >> 2) & 0xFF);
+ } else if (tailbits === 12) {
+ result.push((bits >> 4) & 0xFF);
+ }
+
+ // Wrap into Buffer for NodeJS and leave Array for browser
+ if (NodeBuffer) {
+ // Support node 6.+ Buffer API when available
+ return NodeBuffer.from ? NodeBuffer.from(result) : new NodeBuffer(result);
+ }
+
+ return result;
+}
+
+function representYamlBinary(object /*, style*/) {
+ var result = '', bits = 0, idx, tail,
+ max = object.length,
+ map = BASE64_MAP;
+
+ // Convert every three bytes to 4 ASCII characters.
+
+ for (idx = 0; idx < max; idx++) {
+ if ((idx % 3 === 0) && idx) {
+ result += map[(bits >> 18) & 0x3F];
+ result += map[(bits >> 12) & 0x3F];
+ result += map[(bits >> 6) & 0x3F];
+ result += map[bits & 0x3F];
+ }
+
+ bits = (bits << 8) + object[idx];
+ }
+
+ // Dump tail
+
+ tail = max % 3;
+
+ if (tail === 0) {
+ result += map[(bits >> 18) & 0x3F];
+ result += map[(bits >> 12) & 0x3F];
+ result += map[(bits >> 6) & 0x3F];
+ result += map[bits & 0x3F];
+ } else if (tail === 2) {
+ result += map[(bits >> 10) & 0x3F];
+ result += map[(bits >> 4) & 0x3F];
+ result += map[(bits << 2) & 0x3F];
+ result += map[64];
+ } else if (tail === 1) {
+ result += map[(bits >> 2) & 0x3F];
+ result += map[(bits << 4) & 0x3F];
+ result += map[64];
+ result += map[64];
+ }
+
+ return result;
+}
+
+function isBinary(object) {
+ return NodeBuffer && NodeBuffer.isBuffer(object);
+}
+
+module.exports = new Type('tag:yaml.org,2002:binary', {
+ kind: 'scalar',
+ resolve: resolveYamlBinary,
+ construct: constructYamlBinary,
+ predicate: isBinary,
+ represent: representYamlBinary
+});
+
+},{"../type":13}],15:[function(require,module,exports){
+'use strict';
+
+var Type = require('../type');
+
+function resolveYamlBoolean(data) {
+ if (data === null) return false;
+
+ var max = data.length;
+
+ return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) ||
+ (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE'));
+}
+
+function constructYamlBoolean(data) {
+ return data === 'true' ||
+ data === 'True' ||
+ data === 'TRUE';
+}
+
+function isBoolean(object) {
+ return Object.prototype.toString.call(object) === '[object Boolean]';
+}
+
+module.exports = new Type('tag:yaml.org,2002:bool', {
+ kind: 'scalar',
+ resolve: resolveYamlBoolean,
+ construct: constructYamlBoolean,
+ predicate: isBoolean,
+ represent: {
+ lowercase: function (object) { return object ? 'true' : 'false'; },
+ uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; },
+ camelcase: function (object) { return object ? 'True' : 'False'; }
+ },
+ defaultStyle: 'lowercase'
+});
+
+},{"../type":13}],16:[function(require,module,exports){
+'use strict';
+
+var common = require('../common');
+var Type = require('../type');
+
+var YAML_FLOAT_PATTERN = new RegExp(
+ // 2.5e4, 2.5 and integers
+ '^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' +
+ // .2e4, .2
+ // special case, seems not from spec
+ '|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' +
+ // 20:59
+ '|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*' +
+ // .inf
+ '|[-+]?\\.(?:inf|Inf|INF)' +
+ // .nan
+ '|\\.(?:nan|NaN|NAN))$');
+
+function resolveYamlFloat(data) {
+ if (data === null) return false;
+
+ if (!YAML_FLOAT_PATTERN.test(data) ||
+ // Quick hack to not allow integers end with `_`
+ // Probably should update regexp & check speed
+ data[data.length - 1] === '_') {
+ return false;
+ }
+
+ return true;
+}
+
+function constructYamlFloat(data) {
+ var value, sign, base, digits;
+
+ value = data.replace(/_/g, '').toLowerCase();
+ sign = value[0] === '-' ? -1 : 1;
+ digits = [];
+
+ if ('+-'.indexOf(value[0]) >= 0) {
+ value = value.slice(1);
+ }
+
+ if (value === '.inf') {
+ return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
+
+ } else if (value === '.nan') {
+ return NaN;
+
+ } else if (value.indexOf(':') >= 0) {
+ value.split(':').forEach(function (v) {
+ digits.unshift(parseFloat(v, 10));
+ });
+
+ value = 0.0;
+ base = 1;
+
+ digits.forEach(function (d) {
+ value += d * base;
+ base *= 60;
+ });
+
+ return sign * value;
+
+ }
+ return sign * parseFloat(value, 10);
+}
+
+
+var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;
+
+function representYamlFloat(object, style) {
+ var res;
+
+ if (isNaN(object)) {
+ switch (style) {
+ case 'lowercase': return '.nan';
+ case 'uppercase': return '.NAN';
+ case 'camelcase': return '.NaN';
+ }
+ } else if (Number.POSITIVE_INFINITY === object) {
+ switch (style) {
+ case 'lowercase': return '.inf';
+ case 'uppercase': return '.INF';
+ case 'camelcase': return '.Inf';
+ }
+ } else if (Number.NEGATIVE_INFINITY === object) {
+ switch (style) {
+ case 'lowercase': return '-.inf';
+ case 'uppercase': return '-.INF';
+ case 'camelcase': return '-.Inf';
+ }
+ } else if (common.isNegativeZero(object)) {
+ return '-0.0';
+ }
+
+ res = object.toString(10);
+
+ // JS stringifier can build scientific format without dots: 5e-100,
+ // while YAML requres dot: 5.e-100. Fix it with simple hack
+
+ return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res;
+}
+
+function isFloat(object) {
+ return (Object.prototype.toString.call(object) === '[object Number]') &&
+ (object % 1 !== 0 || common.isNegativeZero(object));
+}
+
+module.exports = new Type('tag:yaml.org,2002:float', {
+ kind: 'scalar',
+ resolve: resolveYamlFloat,
+ construct: constructYamlFloat,
+ predicate: isFloat,
+ represent: representYamlFloat,
+ defaultStyle: 'lowercase'
+});
+
+},{"../common":2,"../type":13}],17:[function(require,module,exports){
+'use strict';
+
+var common = require('../common');
+var Type = require('../type');
+
+function isHexCode(c) {
+ return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) ||
+ ((0x41/* A */ <= c) && (c <= 0x46/* F */)) ||
+ ((0x61/* a */ <= c) && (c <= 0x66/* f */));
+}
+
+function isOctCode(c) {
+ return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */));
+}
+
+function isDecCode(c) {
+ return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */));
+}
+
+function resolveYamlInteger(data) {
+ if (data === null) return false;
+
+ var max = data.length,
+ index = 0,
+ hasDigits = false,
+ ch;
+
+ if (!max) return false;
+
+ ch = data[index];
+
+ // sign
+ if (ch === '-' || ch === '+') {
+ ch = data[++index];
+ }
+
+ if (ch === '0') {
+ // 0
+ if (index + 1 === max) return true;
+ ch = data[++index];
+
+ // base 2, base 8, base 16
+
+ if (ch === 'b') {
+ // base 2
+ index++;
+
+ for (; index < max; index++) {
+ ch = data[index];
+ if (ch === '_') continue;
+ if (ch !== '0' && ch !== '1') return false;
+ hasDigits = true;
+ }
+ return hasDigits && ch !== '_';
+ }
+
+
+ if (ch === 'x') {
+ // base 16
+ index++;
+
+ for (; index < max; index++) {
+ ch = data[index];
+ if (ch === '_') continue;
+ if (!isHexCode(data.charCodeAt(index))) return false;
+ hasDigits = true;
+ }
+ return hasDigits && ch !== '_';
+ }
+
+ // base 8
+ for (; index < max; index++) {
+ ch = data[index];
+ if (ch === '_') continue;
+ if (!isOctCode(data.charCodeAt(index))) return false;
+ hasDigits = true;
+ }
+ return hasDigits && ch !== '_';
+ }
+
+ // base 10 (except 0) or base 60
+
+ // value should not start with `_`;
+ if (ch === '_') return false;
+
+ for (; index < max; index++) {
+ ch = data[index];
+ if (ch === '_') continue;
+ if (ch === ':') break;
+ if (!isDecCode(data.charCodeAt(index))) {
+ return false;
+ }
+ hasDigits = true;
+ }
+
+ // Should have digits and should not end with `_`
+ if (!hasDigits || ch === '_') return false;
+
+ // if !base60 - done;
+ if (ch !== ':') return true;
+
+ // base60 almost not used, no needs to optimize
+ return /^(:[0-5]?[0-9])+$/.test(data.slice(index));
+}
+
+function constructYamlInteger(data) {
+ var value = data, sign = 1, ch, base, digits = [];
+
+ if (value.indexOf('_') !== -1) {
+ value = value.replace(/_/g, '');
+ }
+
+ ch = value[0];
+
+ if (ch === '-' || ch === '+') {
+ if (ch === '-') sign = -1;
+ value = value.slice(1);
+ ch = value[0];
+ }
+
+ if (value === '0') return 0;
+
+ if (ch === '0') {
+ if (value[1] === 'b') return sign * parseInt(value.slice(2), 2);
+ if (value[1] === 'x') return sign * parseInt(value, 16);
+ return sign * parseInt(value, 8);
+ }
+
+ if (value.indexOf(':') !== -1) {
+ value.split(':').forEach(function (v) {
+ digits.unshift(parseInt(v, 10));
+ });
+
+ value = 0;
+ base = 1;
+
+ digits.forEach(function (d) {
+ value += (d * base);
+ base *= 60;
+ });
+
+ return sign * value;
+
+ }
+
+ return sign * parseInt(value, 10);
+}
+
+function isInteger(object) {
+ return (Object.prototype.toString.call(object)) === '[object Number]' &&
+ (object % 1 === 0 && !common.isNegativeZero(object));
+}
+
+module.exports = new Type('tag:yaml.org,2002:int', {
+ kind: 'scalar',
+ resolve: resolveYamlInteger,
+ construct: constructYamlInteger,
+ predicate: isInteger,
+ represent: {
+ binary: function (object) { return '0b' + object.toString(2); },
+ octal: function (object) { return '0' + object.toString(8); },
+ decimal: function (object) { return object.toString(10); },
+ hexadecimal: function (object) { return '0x' + object.toString(16).toUpperCase(); }
+ },
+ defaultStyle: 'decimal',
+ styleAliases: {
+ binary: [ 2, 'bin' ],
+ octal: [ 8, 'oct' ],
+ decimal: [ 10, 'dec' ],
+ hexadecimal: [ 16, 'hex' ]
+ }
+});
+
+},{"../common":2,"../type":13}],18:[function(require,module,exports){
+'use strict';
+
+var esprima;
+
+// Browserified version does not have esprima
+//
+// 1. For node.js just require module as deps
+// 2. For browser try to require mudule via external AMD system.
+// If not found - try to fallback to window.esprima. If not
+// found too - then fail to parse.
+//
+try {
+ // workaround to exclude package from browserify list.
+ var _require = require;
+ esprima = _require('esprima');
+} catch (_) {
+ /*global window */
+ if (typeof window !== 'undefined') esprima = window.esprima;
+}
+
+var Type = require('../../type');
+
+function resolveJavascriptFunction(data) {
+ if (data === null) return false;
+
+ try {
+ var source = '(' + data + ')',
+ ast = esprima.parse(source, { range: true });
+
+ if (ast.type !== 'Program' ||
+ ast.body.length !== 1 ||
+ ast.body[0].type !== 'ExpressionStatement' ||
+ ast.body[0].expression.type !== 'FunctionExpression') {
+ return false;
+ }
+
+ return true;
+ } catch (err) {
+ return false;
+ }
+}
+
+function constructJavascriptFunction(data) {
+ /*jslint evil:true*/
+
+ var source = '(' + data + ')',
+ ast = esprima.parse(source, { range: true }),
+ params = [],
+ body;
+
+ if (ast.type !== 'Program' ||
+ ast.body.length !== 1 ||
+ ast.body[0].type !== 'ExpressionStatement' ||
+ ast.body[0].expression.type !== 'FunctionExpression') {
+ throw new Error('Failed to resolve function');
+ }
+
+ ast.body[0].expression.params.forEach(function (param) {
+ params.push(param.name);
+ });
+
+ body = ast.body[0].expression.body.range;
+
+ // Esprima's ranges include the first '{' and the last '}' characters on
+ // function expressions. So cut them out.
+ /*eslint-disable no-new-func*/
+ return new Function(params, source.slice(body[0] + 1, body[1] - 1));
+}
+
+function representJavascriptFunction(object /*, style*/) {
+ return object.toString();
+}
+
+function isFunction(object) {
+ return Object.prototype.toString.call(object) === '[object Function]';
+}
+
+module.exports = new Type('tag:yaml.org,2002:js/function', {
+ kind: 'scalar',
+ resolve: resolveJavascriptFunction,
+ construct: constructJavascriptFunction,
+ predicate: isFunction,
+ represent: representJavascriptFunction
+});
+
+},{"../../type":13}],19:[function(require,module,exports){
+'use strict';
+
+var Type = require('../../type');
+
+function resolveJavascriptRegExp(data) {
+ if (data === null) return false;
+ if (data.length === 0) return false;
+
+ var regexp = data,
+ tail = /\/([gim]*)$/.exec(data),
+ modifiers = '';
+
+ // if regexp starts with '/' it can have modifiers and must be properly closed
+ // `/foo/gim` - modifiers tail can be maximum 3 chars
+ if (regexp[0] === '/') {
+ if (tail) modifiers = tail[1];
+
+ if (modifiers.length > 3) return false;
+ // if expression starts with /, is should be properly terminated
+ if (regexp[regexp.length - modifiers.length - 1] !== '/') return false;
+ }
+
+ return true;
+}
+
+function constructJavascriptRegExp(data) {
+ var regexp = data,
+ tail = /\/([gim]*)$/.exec(data),
+ modifiers = '';
+
+ // `/foo/gim` - tail can be maximum 4 chars
+ if (regexp[0] === '/') {
+ if (tail) modifiers = tail[1];
+ regexp = regexp.slice(1, regexp.length - modifiers.length - 1);
+ }
+
+ return new RegExp(regexp, modifiers);
+}
+
+function representJavascriptRegExp(object /*, style*/) {
+ var result = '/' + object.source + '/';
+
+ if (object.global) result += 'g';
+ if (object.multiline) result += 'm';
+ if (object.ignoreCase) result += 'i';
+
+ return result;
+}
+
+function isRegExp(object) {
+ return Object.prototype.toString.call(object) === '[object RegExp]';
+}
+
+module.exports = new Type('tag:yaml.org,2002:js/regexp', {
+ kind: 'scalar',
+ resolve: resolveJavascriptRegExp,
+ construct: constructJavascriptRegExp,
+ predicate: isRegExp,
+ represent: representJavascriptRegExp
+});
+
+},{"../../type":13}],20:[function(require,module,exports){
+'use strict';
+
+var Type = require('../../type');
+
+function resolveJavascriptUndefined() {
+ return true;
+}
+
+function constructJavascriptUndefined() {
+ /*eslint-disable no-undefined*/
+ return undefined;
+}
+
+function representJavascriptUndefined() {
+ return '';
+}
+
+function isUndefined(object) {
+ return typeof object === 'undefined';
+}
+
+module.exports = new Type('tag:yaml.org,2002:js/undefined', {
+ kind: 'scalar',
+ resolve: resolveJavascriptUndefined,
+ construct: constructJavascriptUndefined,
+ predicate: isUndefined,
+ represent: representJavascriptUndefined
+});
+
+},{"../../type":13}],21:[function(require,module,exports){
+'use strict';
+
+var Type = require('../type');
+
+module.exports = new Type('tag:yaml.org,2002:map', {
+ kind: 'mapping',
+ construct: function (data) { return data !== null ? data : {}; }
+});
+
+},{"../type":13}],22:[function(require,module,exports){
+'use strict';
+
+var Type = require('../type');
+
+function resolveYamlMerge(data) {
+ return data === '<<' || data === null;
+}
+
+module.exports = new Type('tag:yaml.org,2002:merge', {
+ kind: 'scalar',
+ resolve: resolveYamlMerge
+});
+
+},{"../type":13}],23:[function(require,module,exports){
+'use strict';
+
+var Type = require('../type');
+
+function resolveYamlNull(data) {
+ if (data === null) return true;
+
+ var max = data.length;
+
+ return (max === 1 && data === '~') ||
+ (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL'));
+}
+
+function constructYamlNull() {
+ return null;
+}
+
+function isNull(object) {
+ return object === null;
+}
+
+module.exports = new Type('tag:yaml.org,2002:null', {
+ kind: 'scalar',
+ resolve: resolveYamlNull,
+ construct: constructYamlNull,
+ predicate: isNull,
+ represent: {
+ canonical: function () { return '~'; },
+ lowercase: function () { return 'null'; },
+ uppercase: function () { return 'NULL'; },
+ camelcase: function () { return 'Null'; }
+ },
+ defaultStyle: 'lowercase'
+});
+
+},{"../type":13}],24:[function(require,module,exports){
+'use strict';
+
+var Type = require('../type');
+
+var _hasOwnProperty = Object.prototype.hasOwnProperty;
+var _toString = Object.prototype.toString;
+
+function resolveYamlOmap(data) {
+ if (data === null) return true;
+
+ var objectKeys = [], index, length, pair, pairKey, pairHasKey,
+ object = data;
+
+ for (index = 0, length = object.length; index < length; index += 1) {
+ pair = object[index];
+ pairHasKey = false;
+
+ if (_toString.call(pair) !== '[object Object]') return false;
+
+ for (pairKey in pair) {
+ if (_hasOwnProperty.call(pair, pairKey)) {
+ if (!pairHasKey) pairHasKey = true;
+ else return false;
+ }
+ }
+
+ if (!pairHasKey) return false;
+
+ if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey);
+ else return false;
+ }
+
+ return true;
+}
+
+function constructYamlOmap(data) {
+ return data !== null ? data : [];
+}
+
+module.exports = new Type('tag:yaml.org,2002:omap', {
+ kind: 'sequence',
+ resolve: resolveYamlOmap,
+ construct: constructYamlOmap
+});
+
+},{"../type":13}],25:[function(require,module,exports){
+'use strict';
+
+var Type = require('../type');
+
+var _toString = Object.prototype.toString;
+
+function resolveYamlPairs(data) {
+ if (data === null) return true;
+
+ var index, length, pair, keys, result,
+ object = data;
+
+ result = new Array(object.length);
+
+ for (index = 0, length = object.length; index < length; index += 1) {
+ pair = object[index];
+
+ if (_toString.call(pair) !== '[object Object]') return false;
+
+ keys = Object.keys(pair);
+
+ if (keys.length !== 1) return false;
+
+ result[index] = [ keys[0], pair[keys[0]] ];
+ }
+
+ return true;
+}
+
+function constructYamlPairs(data) {
+ if (data === null) return [];
+
+ var index, length, pair, keys, result,
+ object = data;
+
+ result = new Array(object.length);
+
+ for (index = 0, length = object.length; index < length; index += 1) {
+ pair = object[index];
+
+ keys = Object.keys(pair);
+
+ result[index] = [ keys[0], pair[keys[0]] ];
+ }
+
+ return result;
+}
+
+module.exports = new Type('tag:yaml.org,2002:pairs', {
+ kind: 'sequence',
+ resolve: resolveYamlPairs,
+ construct: constructYamlPairs
+});
+
+},{"../type":13}],26:[function(require,module,exports){
+'use strict';
+
+var Type = require('../type');
+
+module.exports = new Type('tag:yaml.org,2002:seq', {
+ kind: 'sequence',
+ construct: function (data) { return data !== null ? data : []; }
+});
+
+},{"../type":13}],27:[function(require,module,exports){
+'use strict';
+
+var Type = require('../type');
+
+var _hasOwnProperty = Object.prototype.hasOwnProperty;
+
+function resolveYamlSet(data) {
+ if (data === null) return true;
+
+ var key, object = data;
+
+ for (key in object) {
+ if (_hasOwnProperty.call(object, key)) {
+ if (object[key] !== null) return false;
+ }
+ }
+
+ return true;
+}
+
+function constructYamlSet(data) {
+ return data !== null ? data : {};
+}
+
+module.exports = new Type('tag:yaml.org,2002:set', {
+ kind: 'mapping',
+ resolve: resolveYamlSet,
+ construct: constructYamlSet
+});
+
+},{"../type":13}],28:[function(require,module,exports){
+'use strict';
+
+var Type = require('../type');
+
+module.exports = new Type('tag:yaml.org,2002:str', {
+ kind: 'scalar',
+ construct: function (data) { return data !== null ? data : ''; }
+});
+
+},{"../type":13}],29:[function(require,module,exports){
+'use strict';
+
+var Type = require('../type');
+
+var YAML_DATE_REGEXP = new RegExp(
+ '^([0-9][0-9][0-9][0-9])' + // [1] year
+ '-([0-9][0-9])' + // [2] month
+ '-([0-9][0-9])$'); // [3] day
+
+var YAML_TIMESTAMP_REGEXP = new RegExp(
+ '^([0-9][0-9][0-9][0-9])' + // [1] year
+ '-([0-9][0-9]?)' + // [2] month
+ '-([0-9][0-9]?)' + // [3] day
+ '(?:[Tt]|[ \\t]+)' + // ...
+ '([0-9][0-9]?)' + // [4] hour
+ ':([0-9][0-9])' + // [5] minute
+ ':([0-9][0-9])' + // [6] second
+ '(?:\\.([0-9]*))?' + // [7] fraction
+ '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour
+ '(?::([0-9][0-9]))?))?$'); // [11] tz_minute
+
+function resolveYamlTimestamp(data) {
+ if (data === null) return false;
+ if (YAML_DATE_REGEXP.exec(data) !== null) return true;
+ if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true;
+ return false;
+}
+
+function constructYamlTimestamp(data) {
+ var match, year, month, day, hour, minute, second, fraction = 0,
+ delta = null, tz_hour, tz_minute, date;
+
+ match = YAML_DATE_REGEXP.exec(data);
+ if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data);
+
+ if (match === null) throw new Error('Date resolve error');
+
+ // match: [1] year [2] month [3] day
+
+ year = +(match[1]);
+ month = +(match[2]) - 1; // JS month starts with 0
+ day = +(match[3]);
+
+ if (!match[4]) { // no hour
+ return new Date(Date.UTC(year, month, day));
+ }
+
+ // match: [4] hour [5] minute [6] second [7] fraction
+
+ hour = +(match[4]);
+ minute = +(match[5]);
+ second = +(match[6]);
+
+ if (match[7]) {
+ fraction = match[7].slice(0, 3);
+ while (fraction.length < 3) { // milli-seconds
+ fraction += '0';
+ }
+ fraction = +fraction;
+ }
+
+ // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute
+
+ if (match[9]) {
+ tz_hour = +(match[10]);
+ tz_minute = +(match[11] || 0);
+ delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds
+ if (match[9] === '-') delta = -delta;
+ }
+
+ date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));
+
+ if (delta) date.setTime(date.getTime() - delta);
+
+ return date;
+}
+
+function representYamlTimestamp(object /*, style*/) {
+ return object.toISOString();
+}
+
+module.exports = new Type('tag:yaml.org,2002:timestamp', {
+ kind: 'scalar',
+ resolve: resolveYamlTimestamp,
+ construct: constructYamlTimestamp,
+ instanceOf: Date,
+ represent: representYamlTimestamp
+});
+
+},{"../type":13}],"/":[function(require,module,exports){
+'use strict';
+
+
+var yaml = require('./lib/js-yaml.js');
+
+
+module.exports = yaml;
+
+},{"./lib/js-yaml.js":1}]},{},[])("/")
+}); \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/js-yaml/dist/js-yaml.min.js b/tools/node_modules/eslint/node_modules/js-yaml/dist/js-yaml.min.js
new file mode 100644
index 0000000000..5d748b0d78
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-yaml/dist/js-yaml.min.js
@@ -0,0 +1 @@
+!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).jsyaml=e()}}(function(){return function e(t,n,i){function r(a,s){if(!n[a]){if(!t[a]){var c="function"==typeof require&&require;if(!s&&c)return c(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[a]={exports:{}};t[a][0].call(l.exports,function(e){var n=t[a][1][e];return r(n||e)},l,l.exports,e,t,n,i)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<i.length;a++)r(i[a]);return r}({1:[function(e,t,n){"use strict";function i(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}var r=e("./js-yaml/loader"),o=e("./js-yaml/dumper");t.exports.Type=e("./js-yaml/type"),t.exports.Schema=e("./js-yaml/schema"),t.exports.FAILSAFE_SCHEMA=e("./js-yaml/schema/failsafe"),t.exports.JSON_SCHEMA=e("./js-yaml/schema/json"),t.exports.CORE_SCHEMA=e("./js-yaml/schema/core"),t.exports.DEFAULT_SAFE_SCHEMA=e("./js-yaml/schema/default_safe"),t.exports.DEFAULT_FULL_SCHEMA=e("./js-yaml/schema/default_full"),t.exports.load=r.load,t.exports.loadAll=r.loadAll,t.exports.safeLoad=r.safeLoad,t.exports.safeLoadAll=r.safeLoadAll,t.exports.dump=o.dump,t.exports.safeDump=o.safeDump,t.exports.YAMLException=e("./js-yaml/exception"),t.exports.MINIMAL_SCHEMA=e("./js-yaml/schema/failsafe"),t.exports.SAFE_SCHEMA=e("./js-yaml/schema/default_safe"),t.exports.DEFAULT_SCHEMA=e("./js-yaml/schema/default_full"),t.exports.scan=i("scan"),t.exports.parse=i("parse"),t.exports.compose=i("compose"),t.exports.addConstructor=i("addConstructor")},{"./js-yaml/dumper":3,"./js-yaml/exception":4,"./js-yaml/loader":5,"./js-yaml/schema":7,"./js-yaml/schema/core":8,"./js-yaml/schema/default_full":9,"./js-yaml/schema/default_safe":10,"./js-yaml/schema/failsafe":11,"./js-yaml/schema/json":12,"./js-yaml/type":13}],2:[function(e,t,n){"use strict";function i(e){return void 0===e||null===e}t.exports.isNothing=i,t.exports.isObject=function(e){return"object"==typeof e&&null!==e},t.exports.toArray=function(e){return Array.isArray(e)?e:i(e)?[]:[e]},t.exports.repeat=function(e,t){var n,i="";for(n=0;n<t;n+=1)i+=e;return i},t.exports.isNegativeZero=function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e},t.exports.extend=function(e,t){var n,i,r,o;if(t)for(n=0,i=(o=Object.keys(t)).length;n<i;n+=1)e[r=o[n]]=t[r];return e}},{}],3:[function(e,t,n){"use strict";function i(e,t){var n,i,r,o,a,s,c;if(null===t)return{};for(n={},r=0,o=(i=Object.keys(t)).length;r<o;r+=1)a=i[r],s=String(t[a]),"!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2)),(c=e.compiledTypeMap.fallback[a])&&T.call(c.styleAliases,s)&&(s=c.styleAliases[s]),n[a]=s;return n}function r(e){var t,n,i;if(t=e.toString(16).toUpperCase(),e<=255)n="x",i=2;else if(e<=65535)n="u",i=4;else{if(!(e<=4294967295))throw new F("code point within a string may not be greater than 0xFFFFFFFF");n="U",i=8}return"\\"+n+E.repeat("0",i-t.length)+t}function o(e){this.schema=e.schema||_,this.indent=Math.max(1,e.indent||2),this.skipInvalid=e.skipInvalid||!1,this.flowLevel=E.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=i(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function a(e,t){for(var n,i=E.repeat(" ",t),r=0,o=-1,a="",s=e.length;r<s;)-1===(o=e.indexOf("\n",r))?(n=e.slice(r),r=s):(n=e.slice(r,o+1),r=o+1),n.length&&"\n"!==n&&(a+=i),a+=n;return a}function s(e,t){return"\n"+E.repeat(" ",e.indent*t)}function c(e,t){var n,i;for(n=0,i=e.implicitTypes.length;n<i;n+=1)if(e.implicitTypes[n].resolve(t))return!0;return!1}function u(e){return e===U||e===L}function l(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&65279!==e||65536<=e&&e<=1114111}function p(e){return l(e)&&65279!==e&&e!==$&&e!==J&&e!==Q&&e!==ee&&e!==ne&&e!==G&&e!==R}function f(e){return l(e)&&65279!==e&&!u(e)&&e!==H&&e!==Z&&e!==G&&e!==$&&e!==J&&e!==Q&&e!==ee&&e!==ne&&e!==R&&e!==W&&e!==K&&e!==q&&e!==te&&e!==V&&e!==B&&e!==Y&&e!==P&&e!==z&&e!==X}function d(e,t,n,i,r){var o,a,s=!1,c=!1,d=-1!==i,h=-1,m=f(e.charCodeAt(0))&&!u(e.charCodeAt(e.length-1));if(t)for(o=0;o<e.length;o++){if(a=e.charCodeAt(o),!l(a))return ue;m=m&&p(a)}else{for(o=0;o<e.length;o++){if((a=e.charCodeAt(o))===D)s=!0,d&&(c=c||o-h-1>i&&" "!==e[h+1],h=o);else if(!l(a))return ue;m=m&&p(a)}c=c||d&&o-h-1>i&&" "!==e[h+1]}return s||c?" "===e[0]&&n>9?ue:c?ce:se:m&&!r(e)?oe:ae}function h(e,t,n,i){e.dump=function(){if(0===t.length)return"''";if(!e.noCompatMode&&-1!==re.indexOf(t))return"'"+t+"'";var r=e.indent*Math.max(1,n),o=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-r),s=i||e.flowLevel>-1&&n>=e.flowLevel;switch(d(t,s,e.indent,o,function(t){return c(e,t)})){case oe:return t;case ae:return"'"+t.replace(/'/g,"''")+"'";case se:return"|"+m(t,e.indent)+g(a(t,r));case ce:return">"+m(t,e.indent)+g(a(y(t,o),r));case ue:return'"'+v(t)+'"';default:throw new F("impossible error: invalid scalar style")}}()}function m(e,t){var n=" "===e[0]?String(t):"",i="\n"===e[e.length-1];return n+(i&&("\n"===e[e.length-2]||"\n"===e)?"+":i?"":"-")+"\n"}function g(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function y(e,t){for(var n,i,r=/(\n+)([^\n]*)/g,o=function(){var n=e.indexOf("\n");return n=-1!==n?n:e.length,r.lastIndex=n,x(e.slice(0,n),t)}(),a="\n"===e[0]||" "===e[0];i=r.exec(e);){var s=i[1],c=i[2];n=" "===c[0],o+=s+(a||n||""===c?"":"\n")+x(c,t),a=n}return o}function x(e,t){if(""===e||" "===e[0])return e;for(var n,i,r=/ [^ ]/g,o=0,a=0,s=0,c="";n=r.exec(e);)(s=n.index)-o>t&&(i=a>o?a:s,c+="\n"+e.slice(o,i),o=i+1),a=s;return c+="\n",e.length-o>t&&a>o?c+=e.slice(o,a)+"\n"+e.slice(a+1):c+=e.slice(o),c.slice(1)}function v(e){for(var t,n,i,o="",a=0;a<e.length;a++)(t=e.charCodeAt(a))>=55296&&t<=56319&&(n=e.charCodeAt(a+1))>=56320&&n<=57343?(o+=r(1024*(t-55296)+n-56320+65536),a++):o+=!(i=ie[t])&&l(t)?e[a]:i||r(t);return o}function A(e,t,n){var i,r,o="",a=e.tag;for(i=0,r=n.length;i<r;i+=1)j(e,t,n[i],!1,!1)&&(0!==i&&(o+=","+(e.condenseFlow?"":" ")),o+=e.dump);e.tag=a,e.dump="["+o+"]"}function b(e,t,n,i){var r,o,a="",c=e.tag;for(r=0,o=n.length;r<o;r+=1)j(e,t+1,n[r],!0,!0)&&(i&&0===r||(a+=s(e,t)),e.dump&&D===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=c,e.dump=a||"[]"}function w(e,t,n){var i,r,o,a,s,c="",u=e.tag,l=Object.keys(n);for(i=0,r=l.length;i<r;i+=1)s=e.condenseFlow?'"':"",0!==i&&(s+=", "),a=n[o=l[i]],j(e,t,o,!1,!1)&&(e.dump.length>1024&&(s+="? "),s+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),j(e,t,a,!1,!1)&&(c+=s+=e.dump));e.tag=u,e.dump="{"+c+"}"}function C(e,t,n,i){var r,o,a,c,u,l,p="",f=e.tag,d=Object.keys(n);if(!0===e.sortKeys)d.sort();else if("function"==typeof e.sortKeys)d.sort(e.sortKeys);else if(e.sortKeys)throw new F("sortKeys must be a boolean or a function");for(r=0,o=d.length;r<o;r+=1)l="",i&&0===r||(l+=s(e,t)),c=n[a=d[r]],j(e,t+1,a,!0,!0,!0)&&((u=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024)&&(e.dump&&D===e.dump.charCodeAt(0)?l+="?":l+="? "),l+=e.dump,u&&(l+=s(e,t)),j(e,t+1,c,!0,u)&&(e.dump&&D===e.dump.charCodeAt(0)?l+=":":l+=": ",p+=l+=e.dump));e.tag=f,e.dump=p||"{}"}function k(e,t,n){var i,r,o,a,s,c;for(o=0,a=(r=n?e.explicitTypes:e.implicitTypes).length;o<a;o+=1)if(((s=r[o]).instanceOf||s.predicate)&&(!s.instanceOf||"object"==typeof t&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(e.tag=n?s.tag:"?",s.represent){if(c=e.styleMap[s.tag]||s.defaultStyle,"[object Function]"===M.call(s.represent))i=s.represent(t,c);else{if(!T.call(s.represent,c))throw new F("!<"+s.tag+'> tag resolver accepts not "'+c+'" style');i=s.represent[c](t,c)}e.dump=i}return!0}return!1}function j(e,t,n,i,r,o){e.tag=null,e.dump=n,k(e,n,!1)||k(e,n,!0);var a=M.call(e.dump);i&&(i=e.flowLevel<0||e.flowLevel>t);var s,c,u="[object Object]"===a||"[object Array]"===a;if(u&&(c=-1!==(s=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||c||2!==e.indent&&t>0)&&(r=!1),c&&e.usedDuplicates[s])e.dump="*ref_"+s;else{if(u&&c&&!e.usedDuplicates[s]&&(e.usedDuplicates[s]=!0),"[object Object]"===a)i&&0!==Object.keys(e.dump).length?(C(e,t,e.dump,r),c&&(e.dump="&ref_"+s+e.dump)):(w(e,t,e.dump),c&&(e.dump="&ref_"+s+" "+e.dump));else if("[object Array]"===a)i&&0!==e.dump.length?(b(e,t,e.dump,r),c&&(e.dump="&ref_"+s+e.dump)):(A(e,t,e.dump),c&&(e.dump="&ref_"+s+" "+e.dump));else{if("[object String]"!==a){if(e.skipInvalid)return!1;throw new F("unacceptable kind of an object to dump "+a)}"?"!==e.tag&&h(e,e.dump,t,o)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function I(e,t){var n,i,r=[],o=[];for(S(e,r,o),n=0,i=o.length;n<i;n+=1)t.duplicates.push(r[o[n]]);t.usedDuplicates=new Array(i)}function S(e,t,n){var i,r,o;if(null!==e&&"object"==typeof e)if(-1!==(r=t.indexOf(e)))-1===n.indexOf(r)&&n.push(r);else if(t.push(e),Array.isArray(e))for(r=0,o=e.length;r<o;r+=1)S(e[r],t,n);else for(r=0,o=(i=Object.keys(e)).length;r<o;r+=1)S(e[i[r]],t,n)}function O(e,t){var n=new o(t=t||{});return n.noRefs||I(e,n),j(n,0,e,!0,!0)?n.dump+"\n":""}var E=e("./common"),F=e("./exception"),_=e("./schema/default_full"),N=e("./schema/default_safe"),M=Object.prototype.toString,T=Object.prototype.hasOwnProperty,L=9,D=10,U=32,q=33,Y=34,R=35,P=37,W=38,B=39,K=42,$=44,H=45,G=58,V=62,Z=63,z=64,J=91,Q=93,X=96,ee=123,te=124,ne=125,ie={};ie[0]="\\0",ie[7]="\\a",ie[8]="\\b",ie[9]="\\t",ie[10]="\\n",ie[11]="\\v",ie[12]="\\f",ie[13]="\\r",ie[27]="\\e",ie[34]='\\"',ie[92]="\\\\",ie[133]="\\N",ie[160]="\\_",ie[8232]="\\L",ie[8233]="\\P";var re=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],oe=1,ae=2,se=3,ce=4,ue=5;t.exports.dump=O,t.exports.safeDump=function(e,t){return O(e,E.extend({schema:N},t))}},{"./common":2,"./exception":4,"./schema/default_full":9,"./schema/default_safe":10}],4:[function(e,t,n){"use strict";function i(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}(i.prototype=Object.create(Error.prototype)).constructor=i,i.prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t},t.exports=i},{}],5:[function(e,t,n){"use strict";function i(e){return 10===e||13===e}function r(e){return 9===e||32===e}function o(e){return 9===e||32===e||10===e||13===e}function a(e){return 44===e||91===e||93===e||123===e||125===e}function s(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function c(e){return 120===e?2:117===e?4:85===e?8:0}function u(e){return 48<=e&&e<=57?e-48:-1}function l(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e?"\t":9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function p(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}function f(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||W,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function d(e,t){return new Y(t,new R(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function h(e,t){throw d(e,t)}function m(e,t){e.onWarning&&e.onWarning.call(null,d(e,t))}function g(e,t,n,i){var r,o,a,s;if(t<n){if(s=e.input.slice(t,n),i)for(r=0,o=s.length;r<o;r+=1)9===(a=s.charCodeAt(r))||32<=a&&a<=1114111||h(e,"expected valid JSON character");else J.test(s)&&h(e,"the stream contains non-printable characters");e.result+=s}}function y(e,t,n,i){var r,o,a,s;for(q.isObject(n)||h(e,"cannot merge mappings; the provided source object is unacceptable"),a=0,s=(r=Object.keys(n)).length;a<s;a+=1)o=r[a],B.call(t,o)||(t[o]=n[o],i[o]=!0)}function x(e,t,n,i,r,o,a,s){var c,u;if(r=String(r),null===t&&(t={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(o))for(c=0,u=o.length;c<u;c+=1)y(e,t,o[c],n);else y(e,t,o,n);else e.json||B.call(n,r)||!B.call(t,r)||(e.line=a||e.line,e.position=s||e.position,h(e,"duplicated mapping key")),t[r]=o,delete n[r];return t}function v(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):h(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function A(e,t,n){for(var o=0,a=e.input.charCodeAt(e.position);0!==a;){for(;r(a);)a=e.input.charCodeAt(++e.position);if(t&&35===a)do{a=e.input.charCodeAt(++e.position)}while(10!==a&&13!==a&&0!==a);if(!i(a))break;for(v(e),a=e.input.charCodeAt(e.position),o++,e.lineIndent=0;32===a;)e.lineIndent++,a=e.input.charCodeAt(++e.position)}return-1!==n&&0!==o&&e.lineIndent<n&&m(e,"deficient indentation"),o}function b(e){var t,n=e.position;return!(45!==(t=e.input.charCodeAt(n))&&46!==t||t!==e.input.charCodeAt(n+1)||t!==e.input.charCodeAt(n+2)||(n+=3,0!==(t=e.input.charCodeAt(n))&&!o(t)))}function w(e,t){1===t?e.result+=" ":t>1&&(e.result+=q.repeat("\n",t-1))}function C(e,t,n){var s,c,u,l,p,f,d,h,m,y=e.kind,x=e.result;if(m=e.input.charCodeAt(e.position),o(m)||a(m)||35===m||38===m||42===m||33===m||124===m||62===m||39===m||34===m||37===m||64===m||96===m)return!1;if((63===m||45===m)&&(c=e.input.charCodeAt(e.position+1),o(c)||n&&a(c)))return!1;for(e.kind="scalar",e.result="",u=l=e.position,p=!1;0!==m;){if(58===m){if(c=e.input.charCodeAt(e.position+1),o(c)||n&&a(c))break}else if(35===m){if(s=e.input.charCodeAt(e.position-1),o(s))break}else{if(e.position===e.lineStart&&b(e)||n&&a(m))break;if(i(m)){if(f=e.line,d=e.lineStart,h=e.lineIndent,A(e,!1,-1),e.lineIndent>=t){p=!0,m=e.input.charCodeAt(e.position);continue}e.position=l,e.line=f,e.lineStart=d,e.lineIndent=h;break}}p&&(g(e,u,l,!1),w(e,e.line-f),u=l=e.position,p=!1),r(m)||(l=e.position+1),m=e.input.charCodeAt(++e.position)}return g(e,u,l,!1),!!e.result||(e.kind=y,e.result=x,!1)}function k(e,t){var n,r,o;if(39!==(n=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,r=o=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(g(e,r,e.position,!0),39!==(n=e.input.charCodeAt(++e.position)))return!0;r=e.position,e.position++,o=e.position}else i(n)?(g(e,r,o,!0),w(e,A(e,!1,t)),r=o=e.position):e.position===e.lineStart&&b(e)?h(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);h(e,"unexpected end of the stream within a single quoted scalar")}function j(e,t){var n,r,o,a,u,l;if(34!==(l=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;0!==(l=e.input.charCodeAt(e.position));){if(34===l)return g(e,n,e.position,!0),e.position++,!0;if(92===l){if(g(e,n,e.position,!0),l=e.input.charCodeAt(++e.position),i(l))A(e,!1,t);else if(l<256&&ne[l])e.result+=ie[l],e.position++;else if((u=c(l))>0){for(o=u,a=0;o>0;o--)(u=s(l=e.input.charCodeAt(++e.position)))>=0?a=(a<<4)+u:h(e,"expected hexadecimal character");e.result+=p(a),e.position++}else h(e,"unknown escape sequence");n=r=e.position}else i(l)?(g(e,n,r,!0),w(e,A(e,!1,t)),n=r=e.position):e.position===e.lineStart&&b(e)?h(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}h(e,"unexpected end of the stream within a double quoted scalar")}function I(e,t){var n,i,r,a,s,c,u,l,p,f,d=!0,m=e.tag,g=e.anchor,y={};if(91===(f=e.input.charCodeAt(e.position)))r=93,c=!1,i=[];else{if(123!==f)return!1;r=125,c=!0,i={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=i),f=e.input.charCodeAt(++e.position);0!==f;){if(A(e,!0,t),(f=e.input.charCodeAt(e.position))===r)return e.position++,e.tag=m,e.anchor=g,e.kind=c?"mapping":"sequence",e.result=i,!0;d||h(e,"missed comma between flow collection entries"),l=u=p=null,a=s=!1,63===f&&o(e.input.charCodeAt(e.position+1))&&(a=s=!0,e.position++,A(e,!0,t)),n=e.line,M(e,t,K,!1,!0),l=e.tag,u=e.result,A(e,!0,t),f=e.input.charCodeAt(e.position),!s&&e.line!==n||58!==f||(a=!0,f=e.input.charCodeAt(++e.position),A(e,!0,t),M(e,t,K,!1,!0),p=e.result),c?x(e,i,y,l,u,p):a?i.push(x(e,null,y,l,u,p)):i.push(u),A(e,!0,t),44===(f=e.input.charCodeAt(e.position))?(d=!0,f=e.input.charCodeAt(++e.position)):d=!1}h(e,"unexpected end of the stream within a flow collection")}function S(e,t){var n,o,a,s,c=V,l=!1,p=!1,f=t,d=0,m=!1;if(124===(s=e.input.charCodeAt(e.position)))o=!1;else{if(62!==s)return!1;o=!0}for(e.kind="scalar",e.result="";0!==s;)if(43===(s=e.input.charCodeAt(++e.position))||45===s)V===c?c=43===s?z:Z:h(e,"repeat of a chomping mode identifier");else{if(!((a=u(s))>=0))break;0===a?h(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):p?h(e,"repeat of an indentation width identifier"):(f=t+a-1,p=!0)}if(r(s)){do{s=e.input.charCodeAt(++e.position)}while(r(s));if(35===s)do{s=e.input.charCodeAt(++e.position)}while(!i(s)&&0!==s)}for(;0!==s;){for(v(e),e.lineIndent=0,s=e.input.charCodeAt(e.position);(!p||e.lineIndent<f)&&32===s;)e.lineIndent++,s=e.input.charCodeAt(++e.position);if(!p&&e.lineIndent>f&&(f=e.lineIndent),i(s))d++;else{if(e.lineIndent<f){c===z?e.result+=q.repeat("\n",l?1+d:d):c===V&&l&&(e.result+="\n");break}for(o?r(s)?(m=!0,e.result+=q.repeat("\n",l?1+d:d)):m?(m=!1,e.result+=q.repeat("\n",d+1)):0===d?l&&(e.result+=" "):e.result+=q.repeat("\n",d):e.result+=q.repeat("\n",l?1+d:d),l=!0,p=!0,d=0,n=e.position;!i(s)&&0!==s;)s=e.input.charCodeAt(++e.position);g(e,n,e.position,!1)}}return!0}function O(e,t){var n,i,r,a=e.tag,s=e.anchor,c=[],u=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=c),r=e.input.charCodeAt(e.position);0!==r&&45===r&&(i=e.input.charCodeAt(e.position+1),o(i));)if(u=!0,e.position++,A(e,!0,-1)&&e.lineIndent<=t)c.push(null),r=e.input.charCodeAt(e.position);else if(n=e.line,M(e,t,H,!1,!0),c.push(e.result),A(e,!0,-1),r=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==r)h(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!u&&(e.tag=a,e.anchor=s,e.kind="sequence",e.result=c,!0)}function E(e,t,n){var i,a,s,c,u,l=e.tag,p=e.anchor,f={},d={},m=null,g=null,y=null,v=!1,b=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=f),u=e.input.charCodeAt(e.position);0!==u;){if(i=e.input.charCodeAt(e.position+1),s=e.line,c=e.position,63!==u&&58!==u||!o(i)){if(!M(e,n,$,!1,!0))break;if(e.line===s){for(u=e.input.charCodeAt(e.position);r(u);)u=e.input.charCodeAt(++e.position);if(58===u)o(u=e.input.charCodeAt(++e.position))||h(e,"a whitespace character is expected after the key-value separator within a block mapping"),v&&(x(e,f,d,m,g,null),m=g=y=null),b=!0,v=!1,a=!1,m=e.tag,g=e.result;else{if(!b)return e.tag=l,e.anchor=p,!0;h(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!b)return e.tag=l,e.anchor=p,!0;h(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===u?(v&&(x(e,f,d,m,g,null),m=g=y=null),b=!0,v=!0,a=!0):v?(v=!1,a=!0):h(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,u=i;if((e.line===s||e.lineIndent>t)&&(M(e,t,G,!0,a)&&(v?g=e.result:y=e.result),v||(x(e,f,d,m,g,y,s,c),m=g=y=null),A(e,!0,-1),u=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==u)h(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return v&&x(e,f,d,m,g,null),b&&(e.tag=l,e.anchor=p,e.kind="mapping",e.result=f),b}function F(e){var t,n,i,r,a=!1,s=!1;if(33!==(r=e.input.charCodeAt(e.position)))return!1;if(null!==e.tag&&h(e,"duplication of a tag property"),60===(r=e.input.charCodeAt(++e.position))?(a=!0,r=e.input.charCodeAt(++e.position)):33===r?(s=!0,n="!!",r=e.input.charCodeAt(++e.position)):n="!",t=e.position,a){do{r=e.input.charCodeAt(++e.position)}while(0!==r&&62!==r);e.position<e.length?(i=e.input.slice(t,e.position),r=e.input.charCodeAt(++e.position)):h(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==r&&!o(r);)33===r&&(s?h(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),ee.test(n)||h(e,"named tag handle cannot contain such characters"),s=!0,t=e.position+1)),r=e.input.charCodeAt(++e.position);i=e.input.slice(t,e.position),X.test(i)&&h(e,"tag suffix cannot contain flow indicator characters")}return i&&!te.test(i)&&h(e,"tag name cannot contain such characters: "+i),a?e.tag=i:B.call(e.tagMap,n)?e.tag=e.tagMap[n]+i:"!"===n?e.tag="!"+i:"!!"===n?e.tag="tag:yaml.org,2002:"+i:h(e,'undeclared tag handle "'+n+'"'),!0}function _(e){var t,n;if(38!==(n=e.input.charCodeAt(e.position)))return!1;for(null!==e.anchor&&h(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!o(n)&&!a(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&h(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function N(e){var t,n,i;if(42!==(i=e.input.charCodeAt(e.position)))return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!o(i)&&!a(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&h(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),e.anchorMap.hasOwnProperty(n)||h(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],A(e,!0,-1),!0}function M(e,t,n,i,r){var o,a,s,c,u,l,p,f,d=1,m=!1,g=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=a=s=G===n||H===n,i&&A(e,!0,-1)&&(m=!0,e.lineIndent>t?d=1:e.lineIndent===t?d=0:e.lineIndent<t&&(d=-1)),1===d)for(;F(e)||_(e);)A(e,!0,-1)?(m=!0,s=o,e.lineIndent>t?d=1:e.lineIndent===t?d=0:e.lineIndent<t&&(d=-1)):s=!1;if(s&&(s=m||r),1!==d&&G!==n||(p=K===n||$===n?t:t+1,f=e.position-e.lineStart,1===d?s&&(O(e,f)||E(e,f,p))||I(e,p)?g=!0:(a&&S(e,p)||k(e,p)||j(e,p)?g=!0:N(e)?(g=!0,null===e.tag&&null===e.anchor||h(e,"alias node should not have any properties")):C(e,p,K===n)&&(g=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===d&&(g=s&&O(e,f))),null!==e.tag&&"!"!==e.tag)if("?"===e.tag){for(c=0,u=e.implicitTypes.length;c<u;c+=1)if((l=e.implicitTypes[c]).resolve(e.result)){e.result=l.construct(e.result),e.tag=l.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else B.call(e.typeMap[e.kind||"fallback"],e.tag)?(l=e.typeMap[e.kind||"fallback"][e.tag],null!==e.result&&l.kind!==e.kind&&h(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+l.kind+'", not "'+e.kind+'"'),l.resolve(e.result)?(e.result=l.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):h(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):h(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||g}function T(e){var t,n,a,s,c=e.position,u=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(s=e.input.charCodeAt(e.position))&&(A(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==s));){for(u=!0,s=e.input.charCodeAt(++e.position),t=e.position;0!==s&&!o(s);)s=e.input.charCodeAt(++e.position);for(a=[],(n=e.input.slice(t,e.position)).length<1&&h(e,"directive name must not be less than one character in length");0!==s;){for(;r(s);)s=e.input.charCodeAt(++e.position);if(35===s){do{s=e.input.charCodeAt(++e.position)}while(0!==s&&!i(s));break}if(i(s))break;for(t=e.position;0!==s&&!o(s);)s=e.input.charCodeAt(++e.position);a.push(e.input.slice(t,e.position))}0!==s&&v(e),B.call(oe,n)?oe[n](e,n,a):m(e,'unknown document directive "'+n+'"')}A(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,A(e,!0,-1)):u&&h(e,"directives end mark is expected"),M(e,e.lineIndent-1,G,!1,!0),A(e,!0,-1),e.checkLineBreaks&&Q.test(e.input.slice(c,e.position))&&m(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&b(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,A(e,!0,-1)):e.position<e.length-1&&h(e,"end of the stream or a document separator is expected")}function L(e,t){e=String(e),t=t||{},0!==e.length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var n=new f(e,t);for(n.input+="\0";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)T(n);return n.documents}function D(e,t,n){var i,r,o=L(e,n);if("function"!=typeof t)return o;for(i=0,r=o.length;i<r;i+=1)t(o[i])}function U(e,t){var n=L(e,t);if(0!==n.length){if(1===n.length)return n[0];throw new Y("expected a single document in the stream, but found more")}}for(var q=e("./common"),Y=e("./exception"),R=e("./mark"),P=e("./schema/default_safe"),W=e("./schema/default_full"),B=Object.prototype.hasOwnProperty,K=1,$=2,H=3,G=4,V=1,Z=2,z=3,J=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Q=/[\x85\u2028\u2029]/,X=/[,\[\]\{\}]/,ee=/^(?:!|!!|![a-z\-]+!)$/i,te=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,ne=new Array(256),ie=new Array(256),re=0;re<256;re++)ne[re]=l(re)?1:0,ie[re]=l(re);var oe={YAML:function(e,t,n){var i,r,o;null!==e.version&&h(e,"duplication of %YAML directive"),1!==n.length&&h(e,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&h(e,"ill-formed argument of the YAML directive"),r=parseInt(i[1],10),o=parseInt(i[2],10),1!==r&&h(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&m(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var i,r;2!==n.length&&h(e,"TAG directive accepts exactly two arguments"),i=n[0],r=n[1],ee.test(i)||h(e,"ill-formed tag handle (first argument) of the TAG directive"),B.call(e.tagMap,i)&&h(e,'there is a previously declared suffix for "'+i+'" tag handle'),te.test(r)||h(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[i]=r}};t.exports.loadAll=D,t.exports.load=U,t.exports.safeLoadAll=function(e,t,n){if("function"!=typeof t)return D(e,q.extend({schema:P},n));D(e,t,q.extend({schema:P},n))},t.exports.safeLoad=function(e,t){return U(e,q.extend({schema:P},t))}},{"./common":2,"./exception":4,"./mark":6,"./schema/default_full":9,"./schema/default_safe":10}],6:[function(e,t,n){"use strict";function i(e,t,n,i,r){this.name=e,this.buffer=t,this.position=n,this.line=i,this.column=r}var r=e("./common");i.prototype.getSnippet=function(e,t){var n,i,o,a,s;if(!this.buffer)return null;for(e=e||4,t=t||75,n="",i=this.position;i>0&&-1==="\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(i-1));)if(i-=1,this.position-i>t/2-1){n=" ... ",i+=5;break}for(o="",a=this.position;a<this.buffer.length&&-1==="\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(a));)if((a+=1)-this.position>t/2-1){o=" ... ",a-=5;break}return s=this.buffer.slice(i,a),r.repeat(" ",e)+n+s+o+"\n"+r.repeat(" ",e+this.position-i+n.length)+"^"},i.prototype.toString=function(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet())&&(n+=":\n"+t),n},t.exports=i},{"./common":2}],7:[function(e,t,n){"use strict";function i(e,t,n){var r=[];return e.include.forEach(function(e){n=i(e,t,n)}),e[t].forEach(function(e){n.forEach(function(t,n){t.tag===e.tag&&t.kind===e.kind&&r.push(n)}),n.push(e)}),n.filter(function(e,t){return-1===r.indexOf(t)})}function r(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{}};for(e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(function(e){n[e.kind][e.tag]=n.fallback[e.tag]=e});return n}function o(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach(function(e){if(e.loadKind&&"scalar"!==e.loadKind)throw new s("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=i(this,"implicit",[]),this.compiledExplicit=i(this,"explicit",[]),this.compiledTypeMap=r(this.compiledImplicit,this.compiledExplicit)}var a=e("./common"),s=e("./exception"),c=e("./type");o.DEFAULT=null,o.create=function(){var e,t;switch(arguments.length){case 1:e=o.DEFAULT,t=arguments[0];break;case 2:e=arguments[0],t=arguments[1];break;default:throw new s("Wrong number of arguments for Schema.create function")}if(e=a.toArray(e),t=a.toArray(t),!e.every(function(e){return e instanceof o}))throw new s("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!t.every(function(e){return e instanceof c}))throw new s("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new o({include:e,explicit:t})},t.exports=o},{"./common":2,"./exception":4,"./type":13}],8:[function(e,t,n){"use strict";var i=e("../schema");t.exports=new i({include:[e("./json")]})},{"../schema":7,"./json":12}],9:[function(e,t,n){"use strict";var i=e("../schema");t.exports=i.DEFAULT=new i({include:[e("./default_safe")],explicit:[e("../type/js/undefined"),e("../type/js/regexp"),e("../type/js/function")]})},{"../schema":7,"../type/js/function":18,"../type/js/regexp":19,"../type/js/undefined":20,"./default_safe":10}],10:[function(e,t,n){"use strict";var i=e("../schema");t.exports=new i({include:[e("./core")],implicit:[e("../type/timestamp"),e("../type/merge")],explicit:[e("../type/binary"),e("../type/omap"),e("../type/pairs"),e("../type/set")]})},{"../schema":7,"../type/binary":14,"../type/merge":22,"../type/omap":24,"../type/pairs":25,"../type/set":27,"../type/timestamp":29,"./core":8}],11:[function(e,t,n){"use strict";var i=e("../schema");t.exports=new i({explicit:[e("../type/str"),e("../type/seq"),e("../type/map")]})},{"../schema":7,"../type/map":21,"../type/seq":26,"../type/str":28}],12:[function(e,t,n){"use strict";var i=e("../schema");t.exports=new i({include:[e("./failsafe")],implicit:[e("../type/null"),e("../type/bool"),e("../type/int"),e("../type/float")]})},{"../schema":7,"../type/bool":15,"../type/float":16,"../type/int":17,"../type/null":23,"./failsafe":11}],13:[function(e,t,n){"use strict";function i(e){var t={};return null!==e&&Object.keys(e).forEach(function(n){e[n].forEach(function(e){t[String(e)]=n})}),t}var r=e("./exception"),o=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],a=["scalar","sequence","mapping"];t.exports=function(e,t){if(t=t||{},Object.keys(t).forEach(function(t){if(-1===o.indexOf(t))throw new r('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=i(t.styleAliases||null),-1===a.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}},{"./exception":4}],14:[function(e,t,n){"use strict";var i;try{i=e("buffer").Buffer}catch(e){}var r=e("../type"),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";t.exports=new r("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,i=0,r=e.length,a=o;for(n=0;n<r;n++)if(!((t=a.indexOf(e.charAt(n)))>64)){if(t<0)return!1;i+=6}return i%8==0},construct:function(e){var t,n,r=e.replace(/[\r\n=]/g,""),a=r.length,s=o,c=0,u=[];for(t=0;t<a;t++)t%4==0&&t&&(u.push(c>>16&255),u.push(c>>8&255),u.push(255&c)),c=c<<6|s.indexOf(r.charAt(t));return 0==(n=a%4*6)?(u.push(c>>16&255),u.push(c>>8&255),u.push(255&c)):18===n?(u.push(c>>10&255),u.push(c>>2&255)):12===n&&u.push(c>>4&255),i?i.from?i.from(u):new i(u):u},predicate:function(e){return i&&i.isBuffer(e)},represent:function(e){var t,n,i="",r=0,a=e.length,s=o;for(t=0;t<a;t++)t%3==0&&t&&(i+=s[r>>18&63],i+=s[r>>12&63],i+=s[r>>6&63],i+=s[63&r]),r=(r<<8)+e[t];return 0==(n=a%3)?(i+=s[r>>18&63],i+=s[r>>12&63],i+=s[r>>6&63],i+=s[63&r]):2===n?(i+=s[r>>10&63],i+=s[r>>4&63],i+=s[r<<2&63],i+=s[64]):1===n&&(i+=s[r>>2&63],i+=s[r<<4&63],i+=s[64],i+=s[64]),i}})},{"../type":13}],15:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},{"../type":13}],16:[function(e,t,n){"use strict";var i=e("../common"),r=e("../type"),o=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),a=/^[-+]?[0-9]+e/;t.exports=new r("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!o.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n,i,r;return t=e.replace(/_/g,"").toLowerCase(),n="-"===t[0]?-1:1,r=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:t.indexOf(":")>=0?(t.split(":").forEach(function(e){r.unshift(parseFloat(e,10))}),t=0,i=1,r.forEach(function(e){t+=e*i,i*=60}),n*t):n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||i.isNegativeZero(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(i.isNegativeZero(e))return"-0.0";return n=e.toString(10),a.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"})},{"../common":2,"../type":13}],17:[function(e,t,n){"use strict";function i(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function r(e){return 48<=e&&e<=55}function o(e){return 48<=e&&e<=57}var a=e("../common"),s=e("../type");t.exports=new s("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n=e.length,a=0,s=!1;if(!n)return!1;if("-"!==(t=e[a])&&"+"!==t||(t=e[++a]),"0"===t){if(a+1===n)return!0;if("b"===(t=e[++a])){for(a++;a<n;a++)if("_"!==(t=e[a])){if("0"!==t&&"1"!==t)return!1;s=!0}return s&&"_"!==t}if("x"===t){for(a++;a<n;a++)if("_"!==(t=e[a])){if(!i(e.charCodeAt(a)))return!1;s=!0}return s&&"_"!==t}for(;a<n;a++)if("_"!==(t=e[a])){if(!r(e.charCodeAt(a)))return!1;s=!0}return s&&"_"!==t}if("_"===t)return!1;for(;a<n;a++)if("_"!==(t=e[a])){if(":"===t)break;if(!o(e.charCodeAt(a)))return!1;s=!0}return!(!s||"_"===t)&&(":"!==t||/^(:[0-5]?[0-9])+$/.test(e.slice(a)))},construct:function(e){var t,n,i=e,r=1,o=[];return-1!==i.indexOf("_")&&(i=i.replace(/_/g,"")),"-"!==(t=i[0])&&"+"!==t||("-"===t&&(r=-1),t=(i=i.slice(1))[0]),"0"===i?0:"0"===t?"b"===i[1]?r*parseInt(i.slice(2),2):"x"===i[1]?r*parseInt(i,16):r*parseInt(i,8):-1!==i.indexOf(":")?(i.split(":").forEach(function(e){o.unshift(parseInt(e,10))}),i=0,n=1,o.forEach(function(e){i+=e*n,n*=60}),r*i):r*parseInt(i,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!a.isNegativeZero(e)},represent:{binary:function(e){return"0b"+e.toString(2)},octal:function(e){return"0"+e.toString(8)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return"0x"+e.toString(16).toUpperCase()}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},{"../common":2,"../type":13}],18:[function(e,t,n){"use strict";var i;try{i=e("esprima")}catch(e){"undefined"!=typeof window&&(i=window.esprima)}var r=e("../../type");t.exports=new r("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:function(e){if(null===e)return!1;try{var t="("+e+")",n=i.parse(t,{range:!0});return"Program"===n.type&&1===n.body.length&&"ExpressionStatement"===n.body[0].type&&"FunctionExpression"===n.body[0].expression.type}catch(e){return!1}},construct:function(e){var t,n="("+e+")",r=i.parse(n,{range:!0}),o=[];if("Program"!==r.type||1!==r.body.length||"ExpressionStatement"!==r.body[0].type||"FunctionExpression"!==r.body[0].expression.type)throw new Error("Failed to resolve function");return r.body[0].expression.params.forEach(function(e){o.push(e.name)}),t=r.body[0].expression.body.range,new Function(o,n.slice(t[0]+1,t[1]-1))},predicate:function(e){return"[object Function]"===Object.prototype.toString.call(e)},represent:function(e){return e.toString()}})},{"../../type":13}],19:[function(e,t,n){"use strict";var i=e("../../type");t.exports=new i("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:function(e){if(null===e)return!1;if(0===e.length)return!1;var t=e,n=/\/([gim]*)$/.exec(e),i="";if("/"===t[0]){if(n&&(i=n[1]),i.length>3)return!1;if("/"!==t[t.length-i.length-1])return!1}return!0},construct:function(e){var t=e,n=/\/([gim]*)$/.exec(e),i="";return"/"===t[0]&&(n&&(i=n[1]),t=t.slice(1,t.length-i.length-1)),new RegExp(t,i)},predicate:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},represent:function(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}})},{"../../type":13}],20:[function(e,t,n){"use strict";var i=e("../../type");t.exports=new i("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:function(){return!0},construct:function(){},predicate:function(e){return void 0===e},represent:function(){return""}})},{"../../type":13}],21:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},{"../type":13}],22:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}})},{"../type":13}],23:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},{"../type":13}],24:[function(e,t,n){"use strict";var i=e("../type"),r=Object.prototype.hasOwnProperty,o=Object.prototype.toString;t.exports=new i("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,i,a,s,c=[],u=e;for(t=0,n=u.length;t<n;t+=1){if(i=u[t],s=!1,"[object Object]"!==o.call(i))return!1;for(a in i)if(r.call(i,a)){if(s)return!1;s=!0}if(!s)return!1;if(-1!==c.indexOf(a))return!1;c.push(a)}return!0},construct:function(e){return null!==e?e:[]}})},{"../type":13}],25:[function(e,t,n){"use strict";var i=e("../type"),r=Object.prototype.toString;t.exports=new i("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,i,o,a,s=e;for(a=new Array(s.length),t=0,n=s.length;t<n;t+=1){if(i=s[t],"[object Object]"!==r.call(i))return!1;if(1!==(o=Object.keys(i)).length)return!1;a[t]=[o[0],i[o[0]]]}return!0},construct:function(e){if(null===e)return[];var t,n,i,r,o,a=e;for(o=new Array(a.length),t=0,n=a.length;t<n;t+=1)i=a[t],r=Object.keys(i),o[t]=[r[0],i[r[0]]];return o}})},{"../type":13}],26:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},{"../type":13}],27:[function(e,t,n){"use strict";var i=e("../type"),r=Object.prototype.hasOwnProperty;t.exports=new i("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(e){if(null===e)return!0;var t,n=e;for(t in n)if(r.call(n,t)&&null!==n[t])return!1;return!0},construct:function(e){return null!==e?e:{}}})},{"../type":13}],28:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})},{"../type":13}],29:[function(e,t,n){"use strict";var i=e("../type"),r=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),o=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");t.exports=new i("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==r.exec(e)||null!==o.exec(e))},construct:function(e){var t,n,i,a,s,c,u,l,p=0,f=null;if(null===(t=r.exec(e))&&(t=o.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],i=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(n,i,a));if(s=+t[4],c=+t[5],u=+t[6],t[7]){for(p=t[7].slice(0,3);p.length<3;)p+="0";p=+p}return t[9]&&(f=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(f=-f)),l=new Date(Date.UTC(n,i,a,s,c,u,p)),f&&l.setTime(l.getTime()-f),l},instanceOf:Date,represent:function(e){return e.toISOString()}})},{"../type":13}],"/":[function(e,t,n){"use strict";var i=e("./lib/js-yaml.js");t.exports=i},{"./lib/js-yaml.js":1}]},{},[])("/")});
diff --git a/tools/node_modules/eslint/node_modules/js-yaml/index.js b/tools/node_modules/eslint/node_modules/js-yaml/index.js
new file mode 100644
index 0000000000..1374435244
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-yaml/index.js
@@ -0,0 +1,7 @@
+'use strict';
+
+
+var yaml = require('./lib/js-yaml.js');
+
+
+module.exports = yaml;
diff --git a/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml.js b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml.js
new file mode 100644
index 0000000000..f0e92818e9
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml.js
@@ -0,0 +1,39 @@
+'use strict';
+
+
+var loader = require('./js-yaml/loader');
+var dumper = require('./js-yaml/dumper');
+
+
+function deprecated(name) {
+ return function () {
+ throw new Error('Function ' + name + ' is deprecated and cannot be used.');
+ };
+}
+
+
+module.exports.Type = require('./js-yaml/type');
+module.exports.Schema = require('./js-yaml/schema');
+module.exports.FAILSAFE_SCHEMA = require('./js-yaml/schema/failsafe');
+module.exports.JSON_SCHEMA = require('./js-yaml/schema/json');
+module.exports.CORE_SCHEMA = require('./js-yaml/schema/core');
+module.exports.DEFAULT_SAFE_SCHEMA = require('./js-yaml/schema/default_safe');
+module.exports.DEFAULT_FULL_SCHEMA = require('./js-yaml/schema/default_full');
+module.exports.load = loader.load;
+module.exports.loadAll = loader.loadAll;
+module.exports.safeLoad = loader.safeLoad;
+module.exports.safeLoadAll = loader.safeLoadAll;
+module.exports.dump = dumper.dump;
+module.exports.safeDump = dumper.safeDump;
+module.exports.YAMLException = require('./js-yaml/exception');
+
+// Deprecated schema names from JS-YAML 2.0.x
+module.exports.MINIMAL_SCHEMA = require('./js-yaml/schema/failsafe');
+module.exports.SAFE_SCHEMA = require('./js-yaml/schema/default_safe');
+module.exports.DEFAULT_SCHEMA = require('./js-yaml/schema/default_full');
+
+// Deprecated functions from JS-YAML 1.x.x
+module.exports.scan = deprecated('scan');
+module.exports.parse = deprecated('parse');
+module.exports.compose = deprecated('compose');
+module.exports.addConstructor = deprecated('addConstructor');
diff --git a/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/common.js b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/common.js
new file mode 100644
index 0000000000..25ef7d8e4a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/common.js
@@ -0,0 +1,59 @@
+'use strict';
+
+
+function isNothing(subject) {
+ return (typeof subject === 'undefined') || (subject === null);
+}
+
+
+function isObject(subject) {
+ return (typeof subject === 'object') && (subject !== null);
+}
+
+
+function toArray(sequence) {
+ if (Array.isArray(sequence)) return sequence;
+ else if (isNothing(sequence)) return [];
+
+ return [ sequence ];
+}
+
+
+function extend(target, source) {
+ var index, length, key, sourceKeys;
+
+ if (source) {
+ sourceKeys = Object.keys(source);
+
+ for (index = 0, length = sourceKeys.length; index < length; index += 1) {
+ key = sourceKeys[index];
+ target[key] = source[key];
+ }
+ }
+
+ return target;
+}
+
+
+function repeat(string, count) {
+ var result = '', cycle;
+
+ for (cycle = 0; cycle < count; cycle += 1) {
+ result += string;
+ }
+
+ return result;
+}
+
+
+function isNegativeZero(number) {
+ return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number);
+}
+
+
+module.exports.isNothing = isNothing;
+module.exports.isObject = isObject;
+module.exports.toArray = toArray;
+module.exports.repeat = repeat;
+module.exports.isNegativeZero = isNegativeZero;
+module.exports.extend = extend;
diff --git a/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/dumper.js b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/dumper.js
new file mode 100644
index 0000000000..025b18552d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/dumper.js
@@ -0,0 +1,819 @@
+'use strict';
+
+/*eslint-disable no-use-before-define*/
+
+var common = require('./common');
+var YAMLException = require('./exception');
+var DEFAULT_FULL_SCHEMA = require('./schema/default_full');
+var DEFAULT_SAFE_SCHEMA = require('./schema/default_safe');
+
+var _toString = Object.prototype.toString;
+var _hasOwnProperty = Object.prototype.hasOwnProperty;
+
+var CHAR_TAB = 0x09; /* Tab */
+var CHAR_LINE_FEED = 0x0A; /* LF */
+var CHAR_SPACE = 0x20; /* Space */
+var CHAR_EXCLAMATION = 0x21; /* ! */
+var CHAR_DOUBLE_QUOTE = 0x22; /* " */
+var CHAR_SHARP = 0x23; /* # */
+var CHAR_PERCENT = 0x25; /* % */
+var CHAR_AMPERSAND = 0x26; /* & */
+var CHAR_SINGLE_QUOTE = 0x27; /* ' */
+var CHAR_ASTERISK = 0x2A; /* * */
+var CHAR_COMMA = 0x2C; /* , */
+var CHAR_MINUS = 0x2D; /* - */
+var CHAR_COLON = 0x3A; /* : */
+var CHAR_GREATER_THAN = 0x3E; /* > */
+var CHAR_QUESTION = 0x3F; /* ? */
+var CHAR_COMMERCIAL_AT = 0x40; /* @ */
+var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */
+var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */
+var CHAR_GRAVE_ACCENT = 0x60; /* ` */
+var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */
+var CHAR_VERTICAL_LINE = 0x7C; /* | */
+var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */
+
+var ESCAPE_SEQUENCES = {};
+
+ESCAPE_SEQUENCES[0x00] = '\\0';
+ESCAPE_SEQUENCES[0x07] = '\\a';
+ESCAPE_SEQUENCES[0x08] = '\\b';
+ESCAPE_SEQUENCES[0x09] = '\\t';
+ESCAPE_SEQUENCES[0x0A] = '\\n';
+ESCAPE_SEQUENCES[0x0B] = '\\v';
+ESCAPE_SEQUENCES[0x0C] = '\\f';
+ESCAPE_SEQUENCES[0x0D] = '\\r';
+ESCAPE_SEQUENCES[0x1B] = '\\e';
+ESCAPE_SEQUENCES[0x22] = '\\"';
+ESCAPE_SEQUENCES[0x5C] = '\\\\';
+ESCAPE_SEQUENCES[0x85] = '\\N';
+ESCAPE_SEQUENCES[0xA0] = '\\_';
+ESCAPE_SEQUENCES[0x2028] = '\\L';
+ESCAPE_SEQUENCES[0x2029] = '\\P';
+
+var DEPRECATED_BOOLEANS_SYNTAX = [
+ 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON',
+ 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF'
+];
+
+function compileStyleMap(schema, map) {
+ var result, keys, index, length, tag, style, type;
+
+ if (map === null) return {};
+
+ result = {};
+ keys = Object.keys(map);
+
+ for (index = 0, length = keys.length; index < length; index += 1) {
+ tag = keys[index];
+ style = String(map[tag]);
+
+ if (tag.slice(0, 2) === '!!') {
+ tag = 'tag:yaml.org,2002:' + tag.slice(2);
+ }
+ type = schema.compiledTypeMap['fallback'][tag];
+
+ if (type && _hasOwnProperty.call(type.styleAliases, style)) {
+ style = type.styleAliases[style];
+ }
+
+ result[tag] = style;
+ }
+
+ return result;
+}
+
+function encodeHex(character) {
+ var string, handle, length;
+
+ string = character.toString(16).toUpperCase();
+
+ if (character <= 0xFF) {
+ handle = 'x';
+ length = 2;
+ } else if (character <= 0xFFFF) {
+ handle = 'u';
+ length = 4;
+ } else if (character <= 0xFFFFFFFF) {
+ handle = 'U';
+ length = 8;
+ } else {
+ throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF');
+ }
+
+ return '\\' + handle + common.repeat('0', length - string.length) + string;
+}
+
+function State(options) {
+ this.schema = options['schema'] || DEFAULT_FULL_SCHEMA;
+ this.indent = Math.max(1, (options['indent'] || 2));
+ this.skipInvalid = options['skipInvalid'] || false;
+ this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']);
+ this.styleMap = compileStyleMap(this.schema, options['styles'] || null);
+ this.sortKeys = options['sortKeys'] || false;
+ this.lineWidth = options['lineWidth'] || 80;
+ this.noRefs = options['noRefs'] || false;
+ this.noCompatMode = options['noCompatMode'] || false;
+ this.condenseFlow = options['condenseFlow'] || false;
+
+ this.implicitTypes = this.schema.compiledImplicit;
+ this.explicitTypes = this.schema.compiledExplicit;
+
+ this.tag = null;
+ this.result = '';
+
+ this.duplicates = [];
+ this.usedDuplicates = null;
+}
+
+// Indents every line in a string. Empty lines (\n only) are not indented.
+function indentString(string, spaces) {
+ var ind = common.repeat(' ', spaces),
+ position = 0,
+ next = -1,
+ result = '',
+ line,
+ length = string.length;
+
+ while (position < length) {
+ next = string.indexOf('\n', position);
+ if (next === -1) {
+ line = string.slice(position);
+ position = length;
+ } else {
+ line = string.slice(position, next + 1);
+ position = next + 1;
+ }
+
+ if (line.length && line !== '\n') result += ind;
+
+ result += line;
+ }
+
+ return result;
+}
+
+function generateNextLine(state, level) {
+ return '\n' + common.repeat(' ', state.indent * level);
+}
+
+function testImplicitResolving(state, str) {
+ var index, length, type;
+
+ for (index = 0, length = state.implicitTypes.length; index < length; index += 1) {
+ type = state.implicitTypes[index];
+
+ if (type.resolve(str)) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+// [33] s-white ::= s-space | s-tab
+function isWhitespace(c) {
+ return c === CHAR_SPACE || c === CHAR_TAB;
+}
+
+// Returns true if the character can be printed without escaping.
+// From YAML 1.2: "any allowed characters known to be non-printable
+// should also be escaped. [However,] This isn’t mandatory"
+// Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029.
+function isPrintable(c) {
+ return (0x00020 <= c && c <= 0x00007E)
+ || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029)
+ || ((0x0E000 <= c && c <= 0x00FFFD) && c !== 0xFEFF /* BOM */)
+ || (0x10000 <= c && c <= 0x10FFFF);
+}
+
+// Simplified test for values allowed after the first character in plain style.
+function isPlainSafe(c) {
+ // Uses a subset of nb-char - c-flow-indicator - ":" - "#"
+ // where nb-char ::= c-printable - b-char - c-byte-order-mark.
+ return isPrintable(c) && c !== 0xFEFF
+ // - c-flow-indicator
+ && c !== CHAR_COMMA
+ && c !== CHAR_LEFT_SQUARE_BRACKET
+ && c !== CHAR_RIGHT_SQUARE_BRACKET
+ && c !== CHAR_LEFT_CURLY_BRACKET
+ && c !== CHAR_RIGHT_CURLY_BRACKET
+ // - ":" - "#"
+ && c !== CHAR_COLON
+ && c !== CHAR_SHARP;
+}
+
+// Simplified test for values allowed as the first character in plain style.
+function isPlainSafeFirst(c) {
+ // Uses a subset of ns-char - c-indicator
+ // where ns-char = nb-char - s-white.
+ return isPrintable(c) && c !== 0xFEFF
+ && !isWhitespace(c) // - s-white
+ // - (c-indicator ::=
+ // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”
+ && c !== CHAR_MINUS
+ && c !== CHAR_QUESTION
+ && c !== CHAR_COLON
+ && c !== CHAR_COMMA
+ && c !== CHAR_LEFT_SQUARE_BRACKET
+ && c !== CHAR_RIGHT_SQUARE_BRACKET
+ && c !== CHAR_LEFT_CURLY_BRACKET
+ && c !== CHAR_RIGHT_CURLY_BRACKET
+ // | “#” | “&” | “*” | “!” | “|” | “>” | “'” | “"”
+ && c !== CHAR_SHARP
+ && c !== CHAR_AMPERSAND
+ && c !== CHAR_ASTERISK
+ && c !== CHAR_EXCLAMATION
+ && c !== CHAR_VERTICAL_LINE
+ && c !== CHAR_GREATER_THAN
+ && c !== CHAR_SINGLE_QUOTE
+ && c !== CHAR_DOUBLE_QUOTE
+ // | “%” | “@” | “`”)
+ && c !== CHAR_PERCENT
+ && c !== CHAR_COMMERCIAL_AT
+ && c !== CHAR_GRAVE_ACCENT;
+}
+
+var STYLE_PLAIN = 1,
+ STYLE_SINGLE = 2,
+ STYLE_LITERAL = 3,
+ STYLE_FOLDED = 4,
+ STYLE_DOUBLE = 5;
+
+// Determines which scalar styles are possible and returns the preferred style.
+// lineWidth = -1 => no limit.
+// Pre-conditions: str.length > 0.
+// Post-conditions:
+// STYLE_PLAIN or STYLE_SINGLE => no \n are in the string.
+// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1).
+// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1).
+function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType) {
+ var i;
+ var char;
+ var hasLineBreak = false;
+ var hasFoldableLine = false; // only checked if shouldTrackWidth
+ var shouldTrackWidth = lineWidth !== -1;
+ var previousLineBreak = -1; // count the first line correctly
+ var plain = isPlainSafeFirst(string.charCodeAt(0))
+ && !isWhitespace(string.charCodeAt(string.length - 1));
+
+ if (singleLineOnly) {
+ // Case: no block styles.
+ // Check for disallowed characters to rule out plain and single.
+ for (i = 0; i < string.length; i++) {
+ char = string.charCodeAt(i);
+ if (!isPrintable(char)) {
+ return STYLE_DOUBLE;
+ }
+ plain = plain && isPlainSafe(char);
+ }
+ } else {
+ // Case: block styles permitted.
+ for (i = 0; i < string.length; i++) {
+ char = string.charCodeAt(i);
+ if (char === CHAR_LINE_FEED) {
+ hasLineBreak = true;
+ // Check if any line can be folded.
+ if (shouldTrackWidth) {
+ hasFoldableLine = hasFoldableLine ||
+ // Foldable line = too long, and not more-indented.
+ (i - previousLineBreak - 1 > lineWidth &&
+ string[previousLineBreak + 1] !== ' ');
+ previousLineBreak = i;
+ }
+ } else if (!isPrintable(char)) {
+ return STYLE_DOUBLE;
+ }
+ plain = plain && isPlainSafe(char);
+ }
+ // in case the end is missing a \n
+ hasFoldableLine = hasFoldableLine || (shouldTrackWidth &&
+ (i - previousLineBreak - 1 > lineWidth &&
+ string[previousLineBreak + 1] !== ' '));
+ }
+ // Although every style can represent \n without escaping, prefer block styles
+ // for multiline, since they're more readable and they don't add empty lines.
+ // Also prefer folding a super-long line.
+ if (!hasLineBreak && !hasFoldableLine) {
+ // Strings interpretable as another type have to be quoted;
+ // e.g. the string 'true' vs. the boolean true.
+ return plain && !testAmbiguousType(string)
+ ? STYLE_PLAIN : STYLE_SINGLE;
+ }
+ // Edge case: block indentation indicator can only have one digit.
+ if (string[0] === ' ' && indentPerLevel > 9) {
+ return STYLE_DOUBLE;
+ }
+ // At this point we know block styles are valid.
+ // Prefer literal style unless we want to fold.
+ return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL;
+}
+
+// Note: line breaking/folding is implemented for only the folded style.
+// NB. We drop the last trailing newline (if any) of a returned block scalar
+// since the dumper adds its own newline. This always works:
+// • No ending newline => unaffected; already using strip "-" chomping.
+// • Ending newline => removed then restored.
+// Importantly, this keeps the "+" chomp indicator from gaining an extra line.
+function writeScalar(state, string, level, iskey) {
+ state.dump = (function () {
+ if (string.length === 0) {
+ return "''";
+ }
+ if (!state.noCompatMode &&
+ DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1) {
+ return "'" + string + "'";
+ }
+
+ var indent = state.indent * Math.max(1, level); // no 0-indent scalars
+ // As indentation gets deeper, let the width decrease monotonically
+ // to the lower bound min(state.lineWidth, 40).
+ // Note that this implies
+ // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound.
+ // state.lineWidth > 40 + state.indent: width decreases until the lower bound.
+ // This behaves better than a constant minimum width which disallows narrower options,
+ // or an indent threshold which causes the width to suddenly increase.
+ var lineWidth = state.lineWidth === -1
+ ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);
+
+ // Without knowing if keys are implicit/explicit, assume implicit for safety.
+ var singleLineOnly = iskey
+ // No block styles in flow mode.
+ || (state.flowLevel > -1 && level >= state.flowLevel);
+ function testAmbiguity(string) {
+ return testImplicitResolving(state, string);
+ }
+
+ switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, testAmbiguity)) {
+ case STYLE_PLAIN:
+ return string;
+ case STYLE_SINGLE:
+ return "'" + string.replace(/'/g, "''") + "'";
+ case STYLE_LITERAL:
+ return '|' + blockHeader(string, state.indent)
+ + dropEndingNewline(indentString(string, indent));
+ case STYLE_FOLDED:
+ return '>' + blockHeader(string, state.indent)
+ + dropEndingNewline(indentString(foldString(string, lineWidth), indent));
+ case STYLE_DOUBLE:
+ return '"' + escapeString(string, lineWidth) + '"';
+ default:
+ throw new YAMLException('impossible error: invalid scalar style');
+ }
+ }());
+}
+
+// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9.
+function blockHeader(string, indentPerLevel) {
+ var indentIndicator = (string[0] === ' ') ? String(indentPerLevel) : '';
+
+ // note the special case: the string '\n' counts as a "trailing" empty line.
+ var clip = string[string.length - 1] === '\n';
+ var keep = clip && (string[string.length - 2] === '\n' || string === '\n');
+ var chomp = keep ? '+' : (clip ? '' : '-');
+
+ return indentIndicator + chomp + '\n';
+}
+
+// (See the note for writeScalar.)
+function dropEndingNewline(string) {
+ return string[string.length - 1] === '\n' ? string.slice(0, -1) : string;
+}
+
+// Note: a long line without a suitable break point will exceed the width limit.
+// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0.
+function foldString(string, width) {
+ // In folded style, $k$ consecutive newlines output as $k+1$ newlines—
+ // unless they're before or after a more-indented line, or at the very
+ // beginning or end, in which case $k$ maps to $k$.
+ // Therefore, parse each chunk as newline(s) followed by a content line.
+ var lineRe = /(\n+)([^\n]*)/g;
+
+ // first line (possibly an empty line)
+ var result = (function () {
+ var nextLF = string.indexOf('\n');
+ nextLF = nextLF !== -1 ? nextLF : string.length;
+ lineRe.lastIndex = nextLF;
+ return foldLine(string.slice(0, nextLF), width);
+ }());
+ // If we haven't reached the first content line yet, don't add an extra \n.
+ var prevMoreIndented = string[0] === '\n' || string[0] === ' ';
+ var moreIndented;
+
+ // rest of the lines
+ var match;
+ while ((match = lineRe.exec(string))) {
+ var prefix = match[1], line = match[2];
+ moreIndented = (line[0] === ' ');
+ result += prefix
+ + (!prevMoreIndented && !moreIndented && line !== ''
+ ? '\n' : '')
+ + foldLine(line, width);
+ prevMoreIndented = moreIndented;
+ }
+
+ return result;
+}
+
+// Greedy line breaking.
+// Picks the longest line under the limit each time,
+// otherwise settles for the shortest line over the limit.
+// NB. More-indented lines *cannot* be folded, as that would add an extra \n.
+function foldLine(line, width) {
+ if (line === '' || line[0] === ' ') return line;
+
+ // Since a more-indented line adds a \n, breaks can't be followed by a space.
+ var breakRe = / [^ ]/g; // note: the match index will always be <= length-2.
+ var match;
+ // start is an inclusive index. end, curr, and next are exclusive.
+ var start = 0, end, curr = 0, next = 0;
+ var result = '';
+
+ // Invariants: 0 <= start <= length-1.
+ // 0 <= curr <= next <= max(0, length-2). curr - start <= width.
+ // Inside the loop:
+ // A match implies length >= 2, so curr and next are <= length-2.
+ while ((match = breakRe.exec(line))) {
+ next = match.index;
+ // maintain invariant: curr - start <= width
+ if (next - start > width) {
+ end = (curr > start) ? curr : next; // derive end <= length-2
+ result += '\n' + line.slice(start, end);
+ // skip the space that was output as \n
+ start = end + 1; // derive start <= length-1
+ }
+ curr = next;
+ }
+
+ // By the invariants, start <= length-1, so there is something left over.
+ // It is either the whole string or a part starting from non-whitespace.
+ result += '\n';
+ // Insert a break if the remainder is too long and there is a break available.
+ if (line.length - start > width && curr > start) {
+ result += line.slice(start, curr) + '\n' + line.slice(curr + 1);
+ } else {
+ result += line.slice(start);
+ }
+
+ return result.slice(1); // drop extra \n joiner
+}
+
+// Escapes a double-quoted string.
+function escapeString(string) {
+ var result = '';
+ var char, nextChar;
+ var escapeSeq;
+
+ for (var i = 0; i < string.length; i++) {
+ char = string.charCodeAt(i);
+ // Check for surrogate pairs (reference Unicode 3.0 section "3.7 Surrogates").
+ if (char >= 0xD800 && char <= 0xDBFF/* high surrogate */) {
+ nextChar = string.charCodeAt(i + 1);
+ if (nextChar >= 0xDC00 && nextChar <= 0xDFFF/* low surrogate */) {
+ // Combine the surrogate pair and store it escaped.
+ result += encodeHex((char - 0xD800) * 0x400 + nextChar - 0xDC00 + 0x10000);
+ // Advance index one extra since we already used that char here.
+ i++; continue;
+ }
+ }
+ escapeSeq = ESCAPE_SEQUENCES[char];
+ result += !escapeSeq && isPrintable(char)
+ ? string[i]
+ : escapeSeq || encodeHex(char);
+ }
+
+ return result;
+}
+
+function writeFlowSequence(state, level, object) {
+ var _result = '',
+ _tag = state.tag,
+ index,
+ length;
+
+ for (index = 0, length = object.length; index < length; index += 1) {
+ // Write only valid elements.
+ if (writeNode(state, level, object[index], false, false)) {
+ if (index !== 0) _result += ',' + (!state.condenseFlow ? ' ' : '');
+ _result += state.dump;
+ }
+ }
+
+ state.tag = _tag;
+ state.dump = '[' + _result + ']';
+}
+
+function writeBlockSequence(state, level, object, compact) {
+ var _result = '',
+ _tag = state.tag,
+ index,
+ length;
+
+ for (index = 0, length = object.length; index < length; index += 1) {
+ // Write only valid elements.
+ if (writeNode(state, level + 1, object[index], true, true)) {
+ if (!compact || index !== 0) {
+ _result += generateNextLine(state, level);
+ }
+
+ if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
+ _result += '-';
+ } else {
+ _result += '- ';
+ }
+
+ _result += state.dump;
+ }
+ }
+
+ state.tag = _tag;
+ state.dump = _result || '[]'; // Empty sequence if no valid values.
+}
+
+function writeFlowMapping(state, level, object) {
+ var _result = '',
+ _tag = state.tag,
+ objectKeyList = Object.keys(object),
+ index,
+ length,
+ objectKey,
+ objectValue,
+ pairBuffer;
+
+ for (index = 0, length = objectKeyList.length; index < length; index += 1) {
+ pairBuffer = state.condenseFlow ? '"' : '';
+
+ if (index !== 0) pairBuffer += ', ';
+
+ objectKey = objectKeyList[index];
+ objectValue = object[objectKey];
+
+ if (!writeNode(state, level, objectKey, false, false)) {
+ continue; // Skip this pair because of invalid key;
+ }
+
+ if (state.dump.length > 1024) pairBuffer += '? ';
+
+ pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' ');
+
+ if (!writeNode(state, level, objectValue, false, false)) {
+ continue; // Skip this pair because of invalid value.
+ }
+
+ pairBuffer += state.dump;
+
+ // Both key and value are valid.
+ _result += pairBuffer;
+ }
+
+ state.tag = _tag;
+ state.dump = '{' + _result + '}';
+}
+
+function writeBlockMapping(state, level, object, compact) {
+ var _result = '',
+ _tag = state.tag,
+ objectKeyList = Object.keys(object),
+ index,
+ length,
+ objectKey,
+ objectValue,
+ explicitPair,
+ pairBuffer;
+
+ // Allow sorting keys so that the output file is deterministic
+ if (state.sortKeys === true) {
+ // Default sorting
+ objectKeyList.sort();
+ } else if (typeof state.sortKeys === 'function') {
+ // Custom sort function
+ objectKeyList.sort(state.sortKeys);
+ } else if (state.sortKeys) {
+ // Something is wrong
+ throw new YAMLException('sortKeys must be a boolean or a function');
+ }
+
+ for (index = 0, length = objectKeyList.length; index < length; index += 1) {
+ pairBuffer = '';
+
+ if (!compact || index !== 0) {
+ pairBuffer += generateNextLine(state, level);
+ }
+
+ objectKey = objectKeyList[index];
+ objectValue = object[objectKey];
+
+ if (!writeNode(state, level + 1, objectKey, true, true, true)) {
+ continue; // Skip this pair because of invalid key.
+ }
+
+ explicitPair = (state.tag !== null && state.tag !== '?') ||
+ (state.dump && state.dump.length > 1024);
+
+ if (explicitPair) {
+ if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
+ pairBuffer += '?';
+ } else {
+ pairBuffer += '? ';
+ }
+ }
+
+ pairBuffer += state.dump;
+
+ if (explicitPair) {
+ pairBuffer += generateNextLine(state, level);
+ }
+
+ if (!writeNode(state, level + 1, objectValue, true, explicitPair)) {
+ continue; // Skip this pair because of invalid value.
+ }
+
+ if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
+ pairBuffer += ':';
+ } else {
+ pairBuffer += ': ';
+ }
+
+ pairBuffer += state.dump;
+
+ // Both key and value are valid.
+ _result += pairBuffer;
+ }
+
+ state.tag = _tag;
+ state.dump = _result || '{}'; // Empty mapping if no valid pairs.
+}
+
+function detectType(state, object, explicit) {
+ var _result, typeList, index, length, type, style;
+
+ typeList = explicit ? state.explicitTypes : state.implicitTypes;
+
+ for (index = 0, length = typeList.length; index < length; index += 1) {
+ type = typeList[index];
+
+ if ((type.instanceOf || type.predicate) &&
+ (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) &&
+ (!type.predicate || type.predicate(object))) {
+
+ state.tag = explicit ? type.tag : '?';
+
+ if (type.represent) {
+ style = state.styleMap[type.tag] || type.defaultStyle;
+
+ if (_toString.call(type.represent) === '[object Function]') {
+ _result = type.represent(object, style);
+ } else if (_hasOwnProperty.call(type.represent, style)) {
+ _result = type.represent[style](object, style);
+ } else {
+ throw new YAMLException('!<' + type.tag + '> tag resolver accepts not "' + style + '" style');
+ }
+
+ state.dump = _result;
+ }
+
+ return true;
+ }
+ }
+
+ return false;
+}
+
+// Serializes `object` and writes it to global `result`.
+// Returns true on success, or false on invalid object.
+//
+function writeNode(state, level, object, block, compact, iskey) {
+ state.tag = null;
+ state.dump = object;
+
+ if (!detectType(state, object, false)) {
+ detectType(state, object, true);
+ }
+
+ var type = _toString.call(state.dump);
+
+ if (block) {
+ block = (state.flowLevel < 0 || state.flowLevel > level);
+ }
+
+ var objectOrArray = type === '[object Object]' || type === '[object Array]',
+ duplicateIndex,
+ duplicate;
+
+ if (objectOrArray) {
+ duplicateIndex = state.duplicates.indexOf(object);
+ duplicate = duplicateIndex !== -1;
+ }
+
+ if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) {
+ compact = false;
+ }
+
+ if (duplicate && state.usedDuplicates[duplicateIndex]) {
+ state.dump = '*ref_' + duplicateIndex;
+ } else {
+ if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) {
+ state.usedDuplicates[duplicateIndex] = true;
+ }
+ if (type === '[object Object]') {
+ if (block && (Object.keys(state.dump).length !== 0)) {
+ writeBlockMapping(state, level, state.dump, compact);
+ if (duplicate) {
+ state.dump = '&ref_' + duplicateIndex + state.dump;
+ }
+ } else {
+ writeFlowMapping(state, level, state.dump);
+ if (duplicate) {
+ state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;
+ }
+ }
+ } else if (type === '[object Array]') {
+ if (block && (state.dump.length !== 0)) {
+ writeBlockSequence(state, level, state.dump, compact);
+ if (duplicate) {
+ state.dump = '&ref_' + duplicateIndex + state.dump;
+ }
+ } else {
+ writeFlowSequence(state, level, state.dump);
+ if (duplicate) {
+ state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;
+ }
+ }
+ } else if (type === '[object String]') {
+ if (state.tag !== '?') {
+ writeScalar(state, state.dump, level, iskey);
+ }
+ } else {
+ if (state.skipInvalid) return false;
+ throw new YAMLException('unacceptable kind of an object to dump ' + type);
+ }
+
+ if (state.tag !== null && state.tag !== '?') {
+ state.dump = '!<' + state.tag + '> ' + state.dump;
+ }
+ }
+
+ return true;
+}
+
+function getDuplicateReferences(object, state) {
+ var objects = [],
+ duplicatesIndexes = [],
+ index,
+ length;
+
+ inspectNode(object, objects, duplicatesIndexes);
+
+ for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) {
+ state.duplicates.push(objects[duplicatesIndexes[index]]);
+ }
+ state.usedDuplicates = new Array(length);
+}
+
+function inspectNode(object, objects, duplicatesIndexes) {
+ var objectKeyList,
+ index,
+ length;
+
+ if (object !== null && typeof object === 'object') {
+ index = objects.indexOf(object);
+ if (index !== -1) {
+ if (duplicatesIndexes.indexOf(index) === -1) {
+ duplicatesIndexes.push(index);
+ }
+ } else {
+ objects.push(object);
+
+ if (Array.isArray(object)) {
+ for (index = 0, length = object.length; index < length; index += 1) {
+ inspectNode(object[index], objects, duplicatesIndexes);
+ }
+ } else {
+ objectKeyList = Object.keys(object);
+
+ for (index = 0, length = objectKeyList.length; index < length; index += 1) {
+ inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes);
+ }
+ }
+ }
+ }
+}
+
+function dump(input, options) {
+ options = options || {};
+
+ var state = new State(options);
+
+ if (!state.noRefs) getDuplicateReferences(input, state);
+
+ if (writeNode(state, 0, input, true, true)) return state.dump + '\n';
+
+ return '';
+}
+
+function safeDump(input, options) {
+ return dump(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));
+}
+
+module.exports.dump = dump;
+module.exports.safeDump = safeDump;
diff --git a/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/exception.js b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/exception.js
new file mode 100644
index 0000000000..b744a1ee4e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/exception.js
@@ -0,0 +1,43 @@
+// YAML error class. http://stackoverflow.com/questions/8458984
+//
+'use strict';
+
+function YAMLException(reason, mark) {
+ // Super constructor
+ Error.call(this);
+
+ this.name = 'YAMLException';
+ this.reason = reason;
+ this.mark = mark;
+ this.message = (this.reason || '(unknown reason)') + (this.mark ? ' ' + this.mark.toString() : '');
+
+ // Include stack trace in error object
+ if (Error.captureStackTrace) {
+ // Chrome and NodeJS
+ Error.captureStackTrace(this, this.constructor);
+ } else {
+ // FF, IE 10+ and Safari 6+. Fallback for others
+ this.stack = (new Error()).stack || '';
+ }
+}
+
+
+// Inherit from Error
+YAMLException.prototype = Object.create(Error.prototype);
+YAMLException.prototype.constructor = YAMLException;
+
+
+YAMLException.prototype.toString = function toString(compact) {
+ var result = this.name + ': ';
+
+ result += this.reason || '(unknown reason)';
+
+ if (!compact && this.mark) {
+ result += ' ' + this.mark.toString();
+ }
+
+ return result;
+};
+
+
+module.exports = YAMLException;
diff --git a/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/loader.js b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/loader.js
new file mode 100644
index 0000000000..fe2cb4d07a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/loader.js
@@ -0,0 +1,1598 @@
+'use strict';
+
+/*eslint-disable max-len,no-use-before-define*/
+
+var common = require('./common');
+var YAMLException = require('./exception');
+var Mark = require('./mark');
+var DEFAULT_SAFE_SCHEMA = require('./schema/default_safe');
+var DEFAULT_FULL_SCHEMA = require('./schema/default_full');
+
+
+var _hasOwnProperty = Object.prototype.hasOwnProperty;
+
+
+var CONTEXT_FLOW_IN = 1;
+var CONTEXT_FLOW_OUT = 2;
+var CONTEXT_BLOCK_IN = 3;
+var CONTEXT_BLOCK_OUT = 4;
+
+
+var CHOMPING_CLIP = 1;
+var CHOMPING_STRIP = 2;
+var CHOMPING_KEEP = 3;
+
+
+var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
+var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/;
+var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/;
+var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i;
+var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
+
+
+function is_EOL(c) {
+ return (c === 0x0A/* LF */) || (c === 0x0D/* CR */);
+}
+
+function is_WHITE_SPACE(c) {
+ return (c === 0x09/* Tab */) || (c === 0x20/* Space */);
+}
+
+function is_WS_OR_EOL(c) {
+ return (c === 0x09/* Tab */) ||
+ (c === 0x20/* Space */) ||
+ (c === 0x0A/* LF */) ||
+ (c === 0x0D/* CR */);
+}
+
+function is_FLOW_INDICATOR(c) {
+ return c === 0x2C/* , */ ||
+ c === 0x5B/* [ */ ||
+ c === 0x5D/* ] */ ||
+ c === 0x7B/* { */ ||
+ c === 0x7D/* } */;
+}
+
+function fromHexCode(c) {
+ var lc;
+
+ if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {
+ return c - 0x30;
+ }
+
+ /*eslint-disable no-bitwise*/
+ lc = c | 0x20;
+
+ if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) {
+ return lc - 0x61 + 10;
+ }
+
+ return -1;
+}
+
+function escapedHexLen(c) {
+ if (c === 0x78/* x */) { return 2; }
+ if (c === 0x75/* u */) { return 4; }
+ if (c === 0x55/* U */) { return 8; }
+ return 0;
+}
+
+function fromDecimalCode(c) {
+ if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {
+ return c - 0x30;
+ }
+
+ return -1;
+}
+
+function simpleEscapeSequence(c) {
+ /* eslint-disable indent */
+ return (c === 0x30/* 0 */) ? '\x00' :
+ (c === 0x61/* a */) ? '\x07' :
+ (c === 0x62/* b */) ? '\x08' :
+ (c === 0x74/* t */) ? '\x09' :
+ (c === 0x09/* Tab */) ? '\x09' :
+ (c === 0x6E/* n */) ? '\x0A' :
+ (c === 0x76/* v */) ? '\x0B' :
+ (c === 0x66/* f */) ? '\x0C' :
+ (c === 0x72/* r */) ? '\x0D' :
+ (c === 0x65/* e */) ? '\x1B' :
+ (c === 0x20/* Space */) ? ' ' :
+ (c === 0x22/* " */) ? '\x22' :
+ (c === 0x2F/* / */) ? '/' :
+ (c === 0x5C/* \ */) ? '\x5C' :
+ (c === 0x4E/* N */) ? '\x85' :
+ (c === 0x5F/* _ */) ? '\xA0' :
+ (c === 0x4C/* L */) ? '\u2028' :
+ (c === 0x50/* P */) ? '\u2029' : '';
+}
+
+function charFromCodepoint(c) {
+ if (c <= 0xFFFF) {
+ return String.fromCharCode(c);
+ }
+ // Encode UTF-16 surrogate pair
+ // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF
+ return String.fromCharCode(
+ ((c - 0x010000) >> 10) + 0xD800,
+ ((c - 0x010000) & 0x03FF) + 0xDC00
+ );
+}
+
+var simpleEscapeCheck = new Array(256); // integer, for fast access
+var simpleEscapeMap = new Array(256);
+for (var i = 0; i < 256; i++) {
+ simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0;
+ simpleEscapeMap[i] = simpleEscapeSequence(i);
+}
+
+
+function State(input, options) {
+ this.input = input;
+
+ this.filename = options['filename'] || null;
+ this.schema = options['schema'] || DEFAULT_FULL_SCHEMA;
+ this.onWarning = options['onWarning'] || null;
+ this.legacy = options['legacy'] || false;
+ this.json = options['json'] || false;
+ this.listener = options['listener'] || null;
+
+ this.implicitTypes = this.schema.compiledImplicit;
+ this.typeMap = this.schema.compiledTypeMap;
+
+ this.length = input.length;
+ this.position = 0;
+ this.line = 0;
+ this.lineStart = 0;
+ this.lineIndent = 0;
+
+ this.documents = [];
+
+ /*
+ this.version;
+ this.checkLineBreaks;
+ this.tagMap;
+ this.anchorMap;
+ this.tag;
+ this.anchor;
+ this.kind;
+ this.result;*/
+
+}
+
+
+function generateError(state, message) {
+ return new YAMLException(
+ message,
+ new Mark(state.filename, state.input, state.position, state.line, (state.position - state.lineStart)));
+}
+
+function throwError(state, message) {
+ throw generateError(state, message);
+}
+
+function throwWarning(state, message) {
+ if (state.onWarning) {
+ state.onWarning.call(null, generateError(state, message));
+ }
+}
+
+
+var directiveHandlers = {
+
+ YAML: function handleYamlDirective(state, name, args) {
+
+ var match, major, minor;
+
+ if (state.version !== null) {
+ throwError(state, 'duplication of %YAML directive');
+ }
+
+ if (args.length !== 1) {
+ throwError(state, 'YAML directive accepts exactly one argument');
+ }
+
+ match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]);
+
+ if (match === null) {
+ throwError(state, 'ill-formed argument of the YAML directive');
+ }
+
+ major = parseInt(match[1], 10);
+ minor = parseInt(match[2], 10);
+
+ if (major !== 1) {
+ throwError(state, 'unacceptable YAML version of the document');
+ }
+
+ state.version = args[0];
+ state.checkLineBreaks = (minor < 2);
+
+ if (minor !== 1 && minor !== 2) {
+ throwWarning(state, 'unsupported YAML version of the document');
+ }
+ },
+
+ TAG: function handleTagDirective(state, name, args) {
+
+ var handle, prefix;
+
+ if (args.length !== 2) {
+ throwError(state, 'TAG directive accepts exactly two arguments');
+ }
+
+ handle = args[0];
+ prefix = args[1];
+
+ if (!PATTERN_TAG_HANDLE.test(handle)) {
+ throwError(state, 'ill-formed tag handle (first argument) of the TAG directive');
+ }
+
+ if (_hasOwnProperty.call(state.tagMap, handle)) {
+ throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle');
+ }
+
+ if (!PATTERN_TAG_URI.test(prefix)) {
+ throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive');
+ }
+
+ state.tagMap[handle] = prefix;
+ }
+};
+
+
+function captureSegment(state, start, end, checkJson) {
+ var _position, _length, _character, _result;
+
+ if (start < end) {
+ _result = state.input.slice(start, end);
+
+ if (checkJson) {
+ for (_position = 0, _length = _result.length; _position < _length; _position += 1) {
+ _character = _result.charCodeAt(_position);
+ if (!(_character === 0x09 ||
+ (0x20 <= _character && _character <= 0x10FFFF))) {
+ throwError(state, 'expected valid JSON character');
+ }
+ }
+ } else if (PATTERN_NON_PRINTABLE.test(_result)) {
+ throwError(state, 'the stream contains non-printable characters');
+ }
+
+ state.result += _result;
+ }
+}
+
+function mergeMappings(state, destination, source, overridableKeys) {
+ var sourceKeys, key, index, quantity;
+
+ if (!common.isObject(source)) {
+ throwError(state, 'cannot merge mappings; the provided source object is unacceptable');
+ }
+
+ sourceKeys = Object.keys(source);
+
+ for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {
+ key = sourceKeys[index];
+
+ if (!_hasOwnProperty.call(destination, key)) {
+ destination[key] = source[key];
+ overridableKeys[key] = true;
+ }
+ }
+}
+
+function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startPos) {
+ var index, quantity;
+
+ keyNode = String(keyNode);
+
+ if (_result === null) {
+ _result = {};
+ }
+
+ if (keyTag === 'tag:yaml.org,2002:merge') {
+ if (Array.isArray(valueNode)) {
+ for (index = 0, quantity = valueNode.length; index < quantity; index += 1) {
+ mergeMappings(state, _result, valueNode[index], overridableKeys);
+ }
+ } else {
+ mergeMappings(state, _result, valueNode, overridableKeys);
+ }
+ } else {
+ if (!state.json &&
+ !_hasOwnProperty.call(overridableKeys, keyNode) &&
+ _hasOwnProperty.call(_result, keyNode)) {
+ state.line = startLine || state.line;
+ state.position = startPos || state.position;
+ throwError(state, 'duplicated mapping key');
+ }
+ _result[keyNode] = valueNode;
+ delete overridableKeys[keyNode];
+ }
+
+ return _result;
+}
+
+function readLineBreak(state) {
+ var ch;
+
+ ch = state.input.charCodeAt(state.position);
+
+ if (ch === 0x0A/* LF */) {
+ state.position++;
+ } else if (ch === 0x0D/* CR */) {
+ state.position++;
+ if (state.input.charCodeAt(state.position) === 0x0A/* LF */) {
+ state.position++;
+ }
+ } else {
+ throwError(state, 'a line break is expected');
+ }
+
+ state.line += 1;
+ state.lineStart = state.position;
+}
+
+function skipSeparationSpace(state, allowComments, checkIndent) {
+ var lineBreaks = 0,
+ ch = state.input.charCodeAt(state.position);
+
+ while (ch !== 0) {
+ while (is_WHITE_SPACE(ch)) {
+ ch = state.input.charCodeAt(++state.position);
+ }
+
+ if (allowComments && ch === 0x23/* # */) {
+ do {
+ ch = state.input.charCodeAt(++state.position);
+ } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0);
+ }
+
+ if (is_EOL(ch)) {
+ readLineBreak(state);
+
+ ch = state.input.charCodeAt(state.position);
+ lineBreaks++;
+ state.lineIndent = 0;
+
+ while (ch === 0x20/* Space */) {
+ state.lineIndent++;
+ ch = state.input.charCodeAt(++state.position);
+ }
+ } else {
+ break;
+ }
+ }
+
+ if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) {
+ throwWarning(state, 'deficient indentation');
+ }
+
+ return lineBreaks;
+}
+
+function testDocumentSeparator(state) {
+ var _position = state.position,
+ ch;
+
+ ch = state.input.charCodeAt(_position);
+
+ // Condition state.position === state.lineStart is tested
+ // in parent on each call, for efficiency. No needs to test here again.
+ if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) &&
+ ch === state.input.charCodeAt(_position + 1) &&
+ ch === state.input.charCodeAt(_position + 2)) {
+
+ _position += 3;
+
+ ch = state.input.charCodeAt(_position);
+
+ if (ch === 0 || is_WS_OR_EOL(ch)) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+function writeFoldedLines(state, count) {
+ if (count === 1) {
+ state.result += ' ';
+ } else if (count > 1) {
+ state.result += common.repeat('\n', count - 1);
+ }
+}
+
+
+function readPlainScalar(state, nodeIndent, withinFlowCollection) {
+ var preceding,
+ following,
+ captureStart,
+ captureEnd,
+ hasPendingContent,
+ _line,
+ _lineStart,
+ _lineIndent,
+ _kind = state.kind,
+ _result = state.result,
+ ch;
+
+ ch = state.input.charCodeAt(state.position);
+
+ if (is_WS_OR_EOL(ch) ||
+ is_FLOW_INDICATOR(ch) ||
+ ch === 0x23/* # */ ||
+ ch === 0x26/* & */ ||
+ ch === 0x2A/* * */ ||
+ ch === 0x21/* ! */ ||
+ ch === 0x7C/* | */ ||
+ ch === 0x3E/* > */ ||
+ ch === 0x27/* ' */ ||
+ ch === 0x22/* " */ ||
+ ch === 0x25/* % */ ||
+ ch === 0x40/* @ */ ||
+ ch === 0x60/* ` */) {
+ return false;
+ }
+
+ if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) {
+ following = state.input.charCodeAt(state.position + 1);
+
+ if (is_WS_OR_EOL(following) ||
+ withinFlowCollection && is_FLOW_INDICATOR(following)) {
+ return false;
+ }
+ }
+
+ state.kind = 'scalar';
+ state.result = '';
+ captureStart = captureEnd = state.position;
+ hasPendingContent = false;
+
+ while (ch !== 0) {
+ if (ch === 0x3A/* : */) {
+ following = state.input.charCodeAt(state.position + 1);
+
+ if (is_WS_OR_EOL(following) ||
+ withinFlowCollection && is_FLOW_INDICATOR(following)) {
+ break;
+ }
+
+ } else if (ch === 0x23/* # */) {
+ preceding = state.input.charCodeAt(state.position - 1);
+
+ if (is_WS_OR_EOL(preceding)) {
+ break;
+ }
+
+ } else if ((state.position === state.lineStart && testDocumentSeparator(state)) ||
+ withinFlowCollection && is_FLOW_INDICATOR(ch)) {
+ break;
+
+ } else if (is_EOL(ch)) {
+ _line = state.line;
+ _lineStart = state.lineStart;
+ _lineIndent = state.lineIndent;
+ skipSeparationSpace(state, false, -1);
+
+ if (state.lineIndent >= nodeIndent) {
+ hasPendingContent = true;
+ ch = state.input.charCodeAt(state.position);
+ continue;
+ } else {
+ state.position = captureEnd;
+ state.line = _line;
+ state.lineStart = _lineStart;
+ state.lineIndent = _lineIndent;
+ break;
+ }
+ }
+
+ if (hasPendingContent) {
+ captureSegment(state, captureStart, captureEnd, false);
+ writeFoldedLines(state, state.line - _line);
+ captureStart = captureEnd = state.position;
+ hasPendingContent = false;
+ }
+
+ if (!is_WHITE_SPACE(ch)) {
+ captureEnd = state.position + 1;
+ }
+
+ ch = state.input.charCodeAt(++state.position);
+ }
+
+ captureSegment(state, captureStart, captureEnd, false);
+
+ if (state.result) {
+ return true;
+ }
+
+ state.kind = _kind;
+ state.result = _result;
+ return false;
+}
+
+function readSingleQuotedScalar(state, nodeIndent) {
+ var ch,
+ captureStart, captureEnd;
+
+ ch = state.input.charCodeAt(state.position);
+
+ if (ch !== 0x27/* ' */) {
+ return false;
+ }
+
+ state.kind = 'scalar';
+ state.result = '';
+ state.position++;
+ captureStart = captureEnd = state.position;
+
+ while ((ch = state.input.charCodeAt(state.position)) !== 0) {
+ if (ch === 0x27/* ' */) {
+ captureSegment(state, captureStart, state.position, true);
+ ch = state.input.charCodeAt(++state.position);
+
+ if (ch === 0x27/* ' */) {
+ captureStart = state.position;
+ state.position++;
+ captureEnd = state.position;
+ } else {
+ return true;
+ }
+
+ } else if (is_EOL(ch)) {
+ captureSegment(state, captureStart, captureEnd, true);
+ writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
+ captureStart = captureEnd = state.position;
+
+ } else if (state.position === state.lineStart && testDocumentSeparator(state)) {
+ throwError(state, 'unexpected end of the document within a single quoted scalar');
+
+ } else {
+ state.position++;
+ captureEnd = state.position;
+ }
+ }
+
+ throwError(state, 'unexpected end of the stream within a single quoted scalar');
+}
+
+function readDoubleQuotedScalar(state, nodeIndent) {
+ var captureStart,
+ captureEnd,
+ hexLength,
+ hexResult,
+ tmp,
+ ch;
+
+ ch = state.input.charCodeAt(state.position);
+
+ if (ch !== 0x22/* " */) {
+ return false;
+ }
+
+ state.kind = 'scalar';
+ state.result = '';
+ state.position++;
+ captureStart = captureEnd = state.position;
+
+ while ((ch = state.input.charCodeAt(state.position)) !== 0) {
+ if (ch === 0x22/* " */) {
+ captureSegment(state, captureStart, state.position, true);
+ state.position++;
+ return true;
+
+ } else if (ch === 0x5C/* \ */) {
+ captureSegment(state, captureStart, state.position, true);
+ ch = state.input.charCodeAt(++state.position);
+
+ if (is_EOL(ch)) {
+ skipSeparationSpace(state, false, nodeIndent);
+
+ // TODO: rework to inline fn with no type cast?
+ } else if (ch < 256 && simpleEscapeCheck[ch]) {
+ state.result += simpleEscapeMap[ch];
+ state.position++;
+
+ } else if ((tmp = escapedHexLen(ch)) > 0) {
+ hexLength = tmp;
+ hexResult = 0;
+
+ for (; hexLength > 0; hexLength--) {
+ ch = state.input.charCodeAt(++state.position);
+
+ if ((tmp = fromHexCode(ch)) >= 0) {
+ hexResult = (hexResult << 4) + tmp;
+
+ } else {
+ throwError(state, 'expected hexadecimal character');
+ }
+ }
+
+ state.result += charFromCodepoint(hexResult);
+
+ state.position++;
+
+ } else {
+ throwError(state, 'unknown escape sequence');
+ }
+
+ captureStart = captureEnd = state.position;
+
+ } else if (is_EOL(ch)) {
+ captureSegment(state, captureStart, captureEnd, true);
+ writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
+ captureStart = captureEnd = state.position;
+
+ } else if (state.position === state.lineStart && testDocumentSeparator(state)) {
+ throwError(state, 'unexpected end of the document within a double quoted scalar');
+
+ } else {
+ state.position++;
+ captureEnd = state.position;
+ }
+ }
+
+ throwError(state, 'unexpected end of the stream within a double quoted scalar');
+}
+
+function readFlowCollection(state, nodeIndent) {
+ var readNext = true,
+ _line,
+ _tag = state.tag,
+ _result,
+ _anchor = state.anchor,
+ following,
+ terminator,
+ isPair,
+ isExplicitPair,
+ isMapping,
+ overridableKeys = {},
+ keyNode,
+ keyTag,
+ valueNode,
+ ch;
+
+ ch = state.input.charCodeAt(state.position);
+
+ if (ch === 0x5B/* [ */) {
+ terminator = 0x5D;/* ] */
+ isMapping = false;
+ _result = [];
+ } else if (ch === 0x7B/* { */) {
+ terminator = 0x7D;/* } */
+ isMapping = true;
+ _result = {};
+ } else {
+ return false;
+ }
+
+ if (state.anchor !== null) {
+ state.anchorMap[state.anchor] = _result;
+ }
+
+ ch = state.input.charCodeAt(++state.position);
+
+ while (ch !== 0) {
+ skipSeparationSpace(state, true, nodeIndent);
+
+ ch = state.input.charCodeAt(state.position);
+
+ if (ch === terminator) {
+ state.position++;
+ state.tag = _tag;
+ state.anchor = _anchor;
+ state.kind = isMapping ? 'mapping' : 'sequence';
+ state.result = _result;
+ return true;
+ } else if (!readNext) {
+ throwError(state, 'missed comma between flow collection entries');
+ }
+
+ keyTag = keyNode = valueNode = null;
+ isPair = isExplicitPair = false;
+
+ if (ch === 0x3F/* ? */) {
+ following = state.input.charCodeAt(state.position + 1);
+
+ if (is_WS_OR_EOL(following)) {
+ isPair = isExplicitPair = true;
+ state.position++;
+ skipSeparationSpace(state, true, nodeIndent);
+ }
+ }
+
+ _line = state.line;
+ composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);
+ keyTag = state.tag;
+ keyNode = state.result;
+ skipSeparationSpace(state, true, nodeIndent);
+
+ ch = state.input.charCodeAt(state.position);
+
+ if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) {
+ isPair = true;
+ ch = state.input.charCodeAt(++state.position);
+ skipSeparationSpace(state, true, nodeIndent);
+ composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);
+ valueNode = state.result;
+ }
+
+ if (isMapping) {
+ storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode);
+ } else if (isPair) {
+ _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode));
+ } else {
+ _result.push(keyNode);
+ }
+
+ skipSeparationSpace(state, true, nodeIndent);
+
+ ch = state.input.charCodeAt(state.position);
+
+ if (ch === 0x2C/* , */) {
+ readNext = true;
+ ch = state.input.charCodeAt(++state.position);
+ } else {
+ readNext = false;
+ }
+ }
+
+ throwError(state, 'unexpected end of the stream within a flow collection');
+}
+
+function readBlockScalar(state, nodeIndent) {
+ var captureStart,
+ folding,
+ chomping = CHOMPING_CLIP,
+ didReadContent = false,
+ detectedIndent = false,
+ textIndent = nodeIndent,
+ emptyLines = 0,
+ atMoreIndented = false,
+ tmp,
+ ch;
+
+ ch = state.input.charCodeAt(state.position);
+
+ if (ch === 0x7C/* | */) {
+ folding = false;
+ } else if (ch === 0x3E/* > */) {
+ folding = true;
+ } else {
+ return false;
+ }
+
+ state.kind = 'scalar';
+ state.result = '';
+
+ while (ch !== 0) {
+ ch = state.input.charCodeAt(++state.position);
+
+ if (ch === 0x2B/* + */ || ch === 0x2D/* - */) {
+ if (CHOMPING_CLIP === chomping) {
+ chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP;
+ } else {
+ throwError(state, 'repeat of a chomping mode identifier');
+ }
+
+ } else if ((tmp = fromDecimalCode(ch)) >= 0) {
+ if (tmp === 0) {
+ throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one');
+ } else if (!detectedIndent) {
+ textIndent = nodeIndent + tmp - 1;
+ detectedIndent = true;
+ } else {
+ throwError(state, 'repeat of an indentation width identifier');
+ }
+
+ } else {
+ break;
+ }
+ }
+
+ if (is_WHITE_SPACE(ch)) {
+ do { ch = state.input.charCodeAt(++state.position); }
+ while (is_WHITE_SPACE(ch));
+
+ if (ch === 0x23/* # */) {
+ do { ch = state.input.charCodeAt(++state.position); }
+ while (!is_EOL(ch) && (ch !== 0));
+ }
+ }
+
+ while (ch !== 0) {
+ readLineBreak(state);
+ state.lineIndent = 0;
+
+ ch = state.input.charCodeAt(state.position);
+
+ while ((!detectedIndent || state.lineIndent < textIndent) &&
+ (ch === 0x20/* Space */)) {
+ state.lineIndent++;
+ ch = state.input.charCodeAt(++state.position);
+ }
+
+ if (!detectedIndent && state.lineIndent > textIndent) {
+ textIndent = state.lineIndent;
+ }
+
+ if (is_EOL(ch)) {
+ emptyLines++;
+ continue;
+ }
+
+ // End of the scalar.
+ if (state.lineIndent < textIndent) {
+
+ // Perform the chomping.
+ if (chomping === CHOMPING_KEEP) {
+ state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines);
+ } else if (chomping === CHOMPING_CLIP) {
+ if (didReadContent) { // i.e. only if the scalar is not empty.
+ state.result += '\n';
+ }
+ }
+
+ // Break this `while` cycle and go to the funciton's epilogue.
+ break;
+ }
+
+ // Folded style: use fancy rules to handle line breaks.
+ if (folding) {
+
+ // Lines starting with white space characters (more-indented lines) are not folded.
+ if (is_WHITE_SPACE(ch)) {
+ atMoreIndented = true;
+ // except for the first content line (cf. Example 8.1)
+ state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines);
+
+ // End of more-indented block.
+ } else if (atMoreIndented) {
+ atMoreIndented = false;
+ state.result += common.repeat('\n', emptyLines + 1);
+
+ // Just one line break - perceive as the same line.
+ } else if (emptyLines === 0) {
+ if (didReadContent) { // i.e. only if we have already read some scalar content.
+ state.result += ' ';
+ }
+
+ // Several line breaks - perceive as different lines.
+ } else {
+ state.result += common.repeat('\n', emptyLines);
+ }
+
+ // Literal style: just add exact number of line breaks between content lines.
+ } else {
+ // Keep all line breaks except the header line break.
+ state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines);
+ }
+
+ didReadContent = true;
+ detectedIndent = true;
+ emptyLines = 0;
+ captureStart = state.position;
+
+ while (!is_EOL(ch) && (ch !== 0)) {
+ ch = state.input.charCodeAt(++state.position);
+ }
+
+ captureSegment(state, captureStart, state.position, false);
+ }
+
+ return true;
+}
+
+function readBlockSequence(state, nodeIndent) {
+ var _line,
+ _tag = state.tag,
+ _anchor = state.anchor,
+ _result = [],
+ following,
+ detected = false,
+ ch;
+
+ if (state.anchor !== null) {
+ state.anchorMap[state.anchor] = _result;
+ }
+
+ ch = state.input.charCodeAt(state.position);
+
+ while (ch !== 0) {
+
+ if (ch !== 0x2D/* - */) {
+ break;
+ }
+
+ following = state.input.charCodeAt(state.position + 1);
+
+ if (!is_WS_OR_EOL(following)) {
+ break;
+ }
+
+ detected = true;
+ state.position++;
+
+ if (skipSeparationSpace(state, true, -1)) {
+ if (state.lineIndent <= nodeIndent) {
+ _result.push(null);
+ ch = state.input.charCodeAt(state.position);
+ continue;
+ }
+ }
+
+ _line = state.line;
+ composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true);
+ _result.push(state.result);
+ skipSeparationSpace(state, true, -1);
+
+ ch = state.input.charCodeAt(state.position);
+
+ if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) {
+ throwError(state, 'bad indentation of a sequence entry');
+ } else if (state.lineIndent < nodeIndent) {
+ break;
+ }
+ }
+
+ if (detected) {
+ state.tag = _tag;
+ state.anchor = _anchor;
+ state.kind = 'sequence';
+ state.result = _result;
+ return true;
+ }
+ return false;
+}
+
+function readBlockMapping(state, nodeIndent, flowIndent) {
+ var following,
+ allowCompact,
+ _line,
+ _pos,
+ _tag = state.tag,
+ _anchor = state.anchor,
+ _result = {},
+ overridableKeys = {},
+ keyTag = null,
+ keyNode = null,
+ valueNode = null,
+ atExplicitKey = false,
+ detected = false,
+ ch;
+
+ if (state.anchor !== null) {
+ state.anchorMap[state.anchor] = _result;
+ }
+
+ ch = state.input.charCodeAt(state.position);
+
+ while (ch !== 0) {
+ following = state.input.charCodeAt(state.position + 1);
+ _line = state.line; // Save the current line.
+ _pos = state.position;
+
+ //
+ // Explicit notation case. There are two separate blocks:
+ // first for the key (denoted by "?") and second for the value (denoted by ":")
+ //
+ if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) {
+
+ if (ch === 0x3F/* ? */) {
+ if (atExplicitKey) {
+ storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null);
+ keyTag = keyNode = valueNode = null;
+ }
+
+ detected = true;
+ atExplicitKey = true;
+ allowCompact = true;
+
+ } else if (atExplicitKey) {
+ // i.e. 0x3A/* : */ === character after the explicit key.
+ atExplicitKey = false;
+ allowCompact = true;
+
+ } else {
+ throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line');
+ }
+
+ state.position += 1;
+ ch = following;
+
+ //
+ // Implicit notation case. Flow-style node as the key first, then ":", and the value.
+ //
+ } else if (composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {
+
+ if (state.line === _line) {
+ ch = state.input.charCodeAt(state.position);
+
+ while (is_WHITE_SPACE(ch)) {
+ ch = state.input.charCodeAt(++state.position);
+ }
+
+ if (ch === 0x3A/* : */) {
+ ch = state.input.charCodeAt(++state.position);
+
+ if (!is_WS_OR_EOL(ch)) {
+ throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping');
+ }
+
+ if (atExplicitKey) {
+ storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null);
+ keyTag = keyNode = valueNode = null;
+ }
+
+ detected = true;
+ atExplicitKey = false;
+ allowCompact = false;
+ keyTag = state.tag;
+ keyNode = state.result;
+
+ } else if (detected) {
+ throwError(state, 'can not read an implicit mapping pair; a colon is missed');
+
+ } else {
+ state.tag = _tag;
+ state.anchor = _anchor;
+ return true; // Keep the result of `composeNode`.
+ }
+
+ } else if (detected) {
+ throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key');
+
+ } else {
+ state.tag = _tag;
+ state.anchor = _anchor;
+ return true; // Keep the result of `composeNode`.
+ }
+
+ } else {
+ break; // Reading is done. Go to the epilogue.
+ }
+
+ //
+ // Common reading code for both explicit and implicit notations.
+ //
+ if (state.line === _line || state.lineIndent > nodeIndent) {
+ if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) {
+ if (atExplicitKey) {
+ keyNode = state.result;
+ } else {
+ valueNode = state.result;
+ }
+ }
+
+ if (!atExplicitKey) {
+ storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _pos);
+ keyTag = keyNode = valueNode = null;
+ }
+
+ skipSeparationSpace(state, true, -1);
+ ch = state.input.charCodeAt(state.position);
+ }
+
+ if (state.lineIndent > nodeIndent && (ch !== 0)) {
+ throwError(state, 'bad indentation of a mapping entry');
+ } else if (state.lineIndent < nodeIndent) {
+ break;
+ }
+ }
+
+ //
+ // Epilogue.
+ //
+
+ // Special case: last mapping's node contains only the key in explicit notation.
+ if (atExplicitKey) {
+ storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null);
+ }
+
+ // Expose the resulting mapping.
+ if (detected) {
+ state.tag = _tag;
+ state.anchor = _anchor;
+ state.kind = 'mapping';
+ state.result = _result;
+ }
+
+ return detected;
+}
+
+function readTagProperty(state) {
+ var _position,
+ isVerbatim = false,
+ isNamed = false,
+ tagHandle,
+ tagName,
+ ch;
+
+ ch = state.input.charCodeAt(state.position);
+
+ if (ch !== 0x21/* ! */) return false;
+
+ if (state.tag !== null) {
+ throwError(state, 'duplication of a tag property');
+ }
+
+ ch = state.input.charCodeAt(++state.position);
+
+ if (ch === 0x3C/* < */) {
+ isVerbatim = true;
+ ch = state.input.charCodeAt(++state.position);
+
+ } else if (ch === 0x21/* ! */) {
+ isNamed = true;
+ tagHandle = '!!';
+ ch = state.input.charCodeAt(++state.position);
+
+ } else {
+ tagHandle = '!';
+ }
+
+ _position = state.position;
+
+ if (isVerbatim) {
+ do { ch = state.input.charCodeAt(++state.position); }
+ while (ch !== 0 && ch !== 0x3E/* > */);
+
+ if (state.position < state.length) {
+ tagName = state.input.slice(_position, state.position);
+ ch = state.input.charCodeAt(++state.position);
+ } else {
+ throwError(state, 'unexpected end of the stream within a verbatim tag');
+ }
+ } else {
+ while (ch !== 0 && !is_WS_OR_EOL(ch)) {
+
+ if (ch === 0x21/* ! */) {
+ if (!isNamed) {
+ tagHandle = state.input.slice(_position - 1, state.position + 1);
+
+ if (!PATTERN_TAG_HANDLE.test(tagHandle)) {
+ throwError(state, 'named tag handle cannot contain such characters');
+ }
+
+ isNamed = true;
+ _position = state.position + 1;
+ } else {
+ throwError(state, 'tag suffix cannot contain exclamation marks');
+ }
+ }
+
+ ch = state.input.charCodeAt(++state.position);
+ }
+
+ tagName = state.input.slice(_position, state.position);
+
+ if (PATTERN_FLOW_INDICATORS.test(tagName)) {
+ throwError(state, 'tag suffix cannot contain flow indicator characters');
+ }
+ }
+
+ if (tagName && !PATTERN_TAG_URI.test(tagName)) {
+ throwError(state, 'tag name cannot contain such characters: ' + tagName);
+ }
+
+ if (isVerbatim) {
+ state.tag = tagName;
+
+ } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) {
+ state.tag = state.tagMap[tagHandle] + tagName;
+
+ } else if (tagHandle === '!') {
+ state.tag = '!' + tagName;
+
+ } else if (tagHandle === '!!') {
+ state.tag = 'tag:yaml.org,2002:' + tagName;
+
+ } else {
+ throwError(state, 'undeclared tag handle "' + tagHandle + '"');
+ }
+
+ return true;
+}
+
+function readAnchorProperty(state) {
+ var _position,
+ ch;
+
+ ch = state.input.charCodeAt(state.position);
+
+ if (ch !== 0x26/* & */) return false;
+
+ if (state.anchor !== null) {
+ throwError(state, 'duplication of an anchor property');
+ }
+
+ ch = state.input.charCodeAt(++state.position);
+ _position = state.position;
+
+ while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {
+ ch = state.input.charCodeAt(++state.position);
+ }
+
+ if (state.position === _position) {
+ throwError(state, 'name of an anchor node must contain at least one character');
+ }
+
+ state.anchor = state.input.slice(_position, state.position);
+ return true;
+}
+
+function readAlias(state) {
+ var _position, alias,
+ ch;
+
+ ch = state.input.charCodeAt(state.position);
+
+ if (ch !== 0x2A/* * */) return false;
+
+ ch = state.input.charCodeAt(++state.position);
+ _position = state.position;
+
+ while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {
+ ch = state.input.charCodeAt(++state.position);
+ }
+
+ if (state.position === _position) {
+ throwError(state, 'name of an alias node must contain at least one character');
+ }
+
+ alias = state.input.slice(_position, state.position);
+
+ if (!state.anchorMap.hasOwnProperty(alias)) {
+ throwError(state, 'unidentified alias "' + alias + '"');
+ }
+
+ state.result = state.anchorMap[alias];
+ skipSeparationSpace(state, true, -1);
+ return true;
+}
+
+function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) {
+ var allowBlockStyles,
+ allowBlockScalars,
+ allowBlockCollections,
+ indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this<parent
+ atNewLine = false,
+ hasContent = false,
+ typeIndex,
+ typeQuantity,
+ type,
+ flowIndent,
+ blockIndent;
+
+ if (state.listener !== null) {
+ state.listener('open', state);
+ }
+
+ state.tag = null;
+ state.anchor = null;
+ state.kind = null;
+ state.result = null;
+
+ allowBlockStyles = allowBlockScalars = allowBlockCollections =
+ CONTEXT_BLOCK_OUT === nodeContext ||
+ CONTEXT_BLOCK_IN === nodeContext;
+
+ if (allowToSeek) {
+ if (skipSeparationSpace(state, true, -1)) {
+ atNewLine = true;
+
+ if (state.lineIndent > parentIndent) {
+ indentStatus = 1;
+ } else if (state.lineIndent === parentIndent) {
+ indentStatus = 0;
+ } else if (state.lineIndent < parentIndent) {
+ indentStatus = -1;
+ }
+ }
+ }
+
+ if (indentStatus === 1) {
+ while (readTagProperty(state) || readAnchorProperty(state)) {
+ if (skipSeparationSpace(state, true, -1)) {
+ atNewLine = true;
+ allowBlockCollections = allowBlockStyles;
+
+ if (state.lineIndent > parentIndent) {
+ indentStatus = 1;
+ } else if (state.lineIndent === parentIndent) {
+ indentStatus = 0;
+ } else if (state.lineIndent < parentIndent) {
+ indentStatus = -1;
+ }
+ } else {
+ allowBlockCollections = false;
+ }
+ }
+ }
+
+ if (allowBlockCollections) {
+ allowBlockCollections = atNewLine || allowCompact;
+ }
+
+ if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) {
+ if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) {
+ flowIndent = parentIndent;
+ } else {
+ flowIndent = parentIndent + 1;
+ }
+
+ blockIndent = state.position - state.lineStart;
+
+ if (indentStatus === 1) {
+ if (allowBlockCollections &&
+ (readBlockSequence(state, blockIndent) ||
+ readBlockMapping(state, blockIndent, flowIndent)) ||
+ readFlowCollection(state, flowIndent)) {
+ hasContent = true;
+ } else {
+ if ((allowBlockScalars && readBlockScalar(state, flowIndent)) ||
+ readSingleQuotedScalar(state, flowIndent) ||
+ readDoubleQuotedScalar(state, flowIndent)) {
+ hasContent = true;
+
+ } else if (readAlias(state)) {
+ hasContent = true;
+
+ if (state.tag !== null || state.anchor !== null) {
+ throwError(state, 'alias node should not have any properties');
+ }
+
+ } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {
+ hasContent = true;
+
+ if (state.tag === null) {
+ state.tag = '?';
+ }
+ }
+
+ if (state.anchor !== null) {
+ state.anchorMap[state.anchor] = state.result;
+ }
+ }
+ } else if (indentStatus === 0) {
+ // Special case: block sequences are allowed to have same indentation level as the parent.
+ // http://www.yaml.org/spec/1.2/spec.html#id2799784
+ hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);
+ }
+ }
+
+ if (state.tag !== null && state.tag !== '!') {
+ if (state.tag === '?') {
+ for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {
+ type = state.implicitTypes[typeIndex];
+
+ // Implicit resolving is not allowed for non-scalar types, and '?'
+ // non-specific tag is only assigned to plain scalars. So, it isn't
+ // needed to check for 'kind' conformity.
+
+ if (type.resolve(state.result)) { // `state.result` updated in resolver if matched
+ state.result = type.construct(state.result);
+ state.tag = type.tag;
+ if (state.anchor !== null) {
+ state.anchorMap[state.anchor] = state.result;
+ }
+ break;
+ }
+ }
+ } else if (_hasOwnProperty.call(state.typeMap[state.kind || 'fallback'], state.tag)) {
+ type = state.typeMap[state.kind || 'fallback'][state.tag];
+
+ if (state.result !== null && type.kind !== state.kind) {
+ throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"');
+ }
+
+ if (!type.resolve(state.result)) { // `state.result` updated in resolver if matched
+ throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag');
+ } else {
+ state.result = type.construct(state.result);
+ if (state.anchor !== null) {
+ state.anchorMap[state.anchor] = state.result;
+ }
+ }
+ } else {
+ throwError(state, 'unknown tag !<' + state.tag + '>');
+ }
+ }
+
+ if (state.listener !== null) {
+ state.listener('close', state);
+ }
+ return state.tag !== null || state.anchor !== null || hasContent;
+}
+
+function readDocument(state) {
+ var documentStart = state.position,
+ _position,
+ directiveName,
+ directiveArgs,
+ hasDirectives = false,
+ ch;
+
+ state.version = null;
+ state.checkLineBreaks = state.legacy;
+ state.tagMap = {};
+ state.anchorMap = {};
+
+ while ((ch = state.input.charCodeAt(state.position)) !== 0) {
+ skipSeparationSpace(state, true, -1);
+
+ ch = state.input.charCodeAt(state.position);
+
+ if (state.lineIndent > 0 || ch !== 0x25/* % */) {
+ break;
+ }
+
+ hasDirectives = true;
+ ch = state.input.charCodeAt(++state.position);
+ _position = state.position;
+
+ while (ch !== 0 && !is_WS_OR_EOL(ch)) {
+ ch = state.input.charCodeAt(++state.position);
+ }
+
+ directiveName = state.input.slice(_position, state.position);
+ directiveArgs = [];
+
+ if (directiveName.length < 1) {
+ throwError(state, 'directive name must not be less than one character in length');
+ }
+
+ while (ch !== 0) {
+ while (is_WHITE_SPACE(ch)) {
+ ch = state.input.charCodeAt(++state.position);
+ }
+
+ if (ch === 0x23/* # */) {
+ do { ch = state.input.charCodeAt(++state.position); }
+ while (ch !== 0 && !is_EOL(ch));
+ break;
+ }
+
+ if (is_EOL(ch)) break;
+
+ _position = state.position;
+
+ while (ch !== 0 && !is_WS_OR_EOL(ch)) {
+ ch = state.input.charCodeAt(++state.position);
+ }
+
+ directiveArgs.push(state.input.slice(_position, state.position));
+ }
+
+ if (ch !== 0) readLineBreak(state);
+
+ if (_hasOwnProperty.call(directiveHandlers, directiveName)) {
+ directiveHandlers[directiveName](state, directiveName, directiveArgs);
+ } else {
+ throwWarning(state, 'unknown document directive "' + directiveName + '"');
+ }
+ }
+
+ skipSeparationSpace(state, true, -1);
+
+ if (state.lineIndent === 0 &&
+ state.input.charCodeAt(state.position) === 0x2D/* - */ &&
+ state.input.charCodeAt(state.position + 1) === 0x2D/* - */ &&
+ state.input.charCodeAt(state.position + 2) === 0x2D/* - */) {
+ state.position += 3;
+ skipSeparationSpace(state, true, -1);
+
+ } else if (hasDirectives) {
+ throwError(state, 'directives end mark is expected');
+ }
+
+ composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true);
+ skipSeparationSpace(state, true, -1);
+
+ if (state.checkLineBreaks &&
+ PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) {
+ throwWarning(state, 'non-ASCII line breaks are interpreted as content');
+ }
+
+ state.documents.push(state.result);
+
+ if (state.position === state.lineStart && testDocumentSeparator(state)) {
+
+ if (state.input.charCodeAt(state.position) === 0x2E/* . */) {
+ state.position += 3;
+ skipSeparationSpace(state, true, -1);
+ }
+ return;
+ }
+
+ if (state.position < (state.length - 1)) {
+ throwError(state, 'end of the stream or a document separator is expected');
+ } else {
+ return;
+ }
+}
+
+
+function loadDocuments(input, options) {
+ input = String(input);
+ options = options || {};
+
+ if (input.length !== 0) {
+
+ // Add tailing `\n` if not exists
+ if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ &&
+ input.charCodeAt(input.length - 1) !== 0x0D/* CR */) {
+ input += '\n';
+ }
+
+ // Strip BOM
+ if (input.charCodeAt(0) === 0xFEFF) {
+ input = input.slice(1);
+ }
+ }
+
+ var state = new State(input, options);
+
+ // Use 0 as string terminator. That significantly simplifies bounds check.
+ state.input += '\0';
+
+ while (state.input.charCodeAt(state.position) === 0x20/* Space */) {
+ state.lineIndent += 1;
+ state.position += 1;
+ }
+
+ while (state.position < (state.length - 1)) {
+ readDocument(state);
+ }
+
+ return state.documents;
+}
+
+
+function loadAll(input, iterator, options) {
+ var documents = loadDocuments(input, options), index, length;
+
+ if (typeof iterator !== 'function') {
+ return documents;
+ }
+
+ for (index = 0, length = documents.length; index < length; index += 1) {
+ iterator(documents[index]);
+ }
+}
+
+
+function load(input, options) {
+ var documents = loadDocuments(input, options);
+
+ if (documents.length === 0) {
+ /*eslint-disable no-undefined*/
+ return undefined;
+ } else if (documents.length === 1) {
+ return documents[0];
+ }
+ throw new YAMLException('expected a single document in the stream, but found more');
+}
+
+
+function safeLoadAll(input, output, options) {
+ if (typeof output === 'function') {
+ loadAll(input, output, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));
+ } else {
+ return loadAll(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));
+ }
+}
+
+
+function safeLoad(input, options) {
+ return load(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));
+}
+
+
+module.exports.loadAll = loadAll;
+module.exports.load = load;
+module.exports.safeLoadAll = safeLoadAll;
+module.exports.safeLoad = safeLoad;
diff --git a/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/mark.js b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/mark.js
new file mode 100644
index 0000000000..47b265c20c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/mark.js
@@ -0,0 +1,76 @@
+'use strict';
+
+
+var common = require('./common');
+
+
+function Mark(name, buffer, position, line, column) {
+ this.name = name;
+ this.buffer = buffer;
+ this.position = position;
+ this.line = line;
+ this.column = column;
+}
+
+
+Mark.prototype.getSnippet = function getSnippet(indent, maxLength) {
+ var head, start, tail, end, snippet;
+
+ if (!this.buffer) return null;
+
+ indent = indent || 4;
+ maxLength = maxLength || 75;
+
+ head = '';
+ start = this.position;
+
+ while (start > 0 && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(start - 1)) === -1) {
+ start -= 1;
+ if (this.position - start > (maxLength / 2 - 1)) {
+ head = ' ... ';
+ start += 5;
+ break;
+ }
+ }
+
+ tail = '';
+ end = this.position;
+
+ while (end < this.buffer.length && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(end)) === -1) {
+ end += 1;
+ if (end - this.position > (maxLength / 2 - 1)) {
+ tail = ' ... ';
+ end -= 5;
+ break;
+ }
+ }
+
+ snippet = this.buffer.slice(start, end);
+
+ return common.repeat(' ', indent) + head + snippet + tail + '\n' +
+ common.repeat(' ', indent + this.position - start + head.length) + '^';
+};
+
+
+Mark.prototype.toString = function toString(compact) {
+ var snippet, where = '';
+
+ if (this.name) {
+ where += 'in "' + this.name + '" ';
+ }
+
+ where += 'at line ' + (this.line + 1) + ', column ' + (this.column + 1);
+
+ if (!compact) {
+ snippet = this.getSnippet();
+
+ if (snippet) {
+ where += ':\n' + snippet;
+ }
+ }
+
+ return where;
+};
+
+
+module.exports = Mark;
diff --git a/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/schema.js b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/schema.js
new file mode 100644
index 0000000000..ca7cf47e70
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/schema.js
@@ -0,0 +1,108 @@
+'use strict';
+
+/*eslint-disable max-len*/
+
+var common = require('./common');
+var YAMLException = require('./exception');
+var Type = require('./type');
+
+
+function compileList(schema, name, result) {
+ var exclude = [];
+
+ schema.include.forEach(function (includedSchema) {
+ result = compileList(includedSchema, name, result);
+ });
+
+ schema[name].forEach(function (currentType) {
+ result.forEach(function (previousType, previousIndex) {
+ if (previousType.tag === currentType.tag && previousType.kind === currentType.kind) {
+ exclude.push(previousIndex);
+ }
+ });
+
+ result.push(currentType);
+ });
+
+ return result.filter(function (type, index) {
+ return exclude.indexOf(index) === -1;
+ });
+}
+
+
+function compileMap(/* lists... */) {
+ var result = {
+ scalar: {},
+ sequence: {},
+ mapping: {},
+ fallback: {}
+ }, index, length;
+
+ function collectType(type) {
+ result[type.kind][type.tag] = result['fallback'][type.tag] = type;
+ }
+
+ for (index = 0, length = arguments.length; index < length; index += 1) {
+ arguments[index].forEach(collectType);
+ }
+ return result;
+}
+
+
+function Schema(definition) {
+ this.include = definition.include || [];
+ this.implicit = definition.implicit || [];
+ this.explicit = definition.explicit || [];
+
+ this.implicit.forEach(function (type) {
+ if (type.loadKind && type.loadKind !== 'scalar') {
+ throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.');
+ }
+ });
+
+ this.compiledImplicit = compileList(this, 'implicit', []);
+ this.compiledExplicit = compileList(this, 'explicit', []);
+ this.compiledTypeMap = compileMap(this.compiledImplicit, this.compiledExplicit);
+}
+
+
+Schema.DEFAULT = null;
+
+
+Schema.create = function createSchema() {
+ var schemas, types;
+
+ switch (arguments.length) {
+ case 1:
+ schemas = Schema.DEFAULT;
+ types = arguments[0];
+ break;
+
+ case 2:
+ schemas = arguments[0];
+ types = arguments[1];
+ break;
+
+ default:
+ throw new YAMLException('Wrong number of arguments for Schema.create function');
+ }
+
+ schemas = common.toArray(schemas);
+ types = common.toArray(types);
+
+ if (!schemas.every(function (schema) { return schema instanceof Schema; })) {
+ throw new YAMLException('Specified list of super schemas (or a single Schema object) contains a non-Schema object.');
+ }
+
+ if (!types.every(function (type) { return type instanceof Type; })) {
+ throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.');
+ }
+
+ return new Schema({
+ include: schemas,
+ explicit: types
+ });
+};
+
+
+module.exports = Schema;
diff --git a/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/schema/core.js b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/schema/core.js
new file mode 100644
index 0000000000..206daab56c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/schema/core.js
@@ -0,0 +1,18 @@
+// Standard YAML's Core schema.
+// http://www.yaml.org/spec/1.2/spec.html#id2804923
+//
+// NOTE: JS-YAML does not support schema-specific tag resolution restrictions.
+// So, Core schema has no distinctions from JSON schema is JS-YAML.
+
+
+'use strict';
+
+
+var Schema = require('../schema');
+
+
+module.exports = new Schema({
+ include: [
+ require('./json')
+ ]
+});
diff --git a/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/schema/default_full.js b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/schema/default_full.js
new file mode 100644
index 0000000000..a55ef42acc
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/schema/default_full.js
@@ -0,0 +1,25 @@
+// JS-YAML's default schema for `load` function.
+// It is not described in the YAML specification.
+//
+// This schema is based on JS-YAML's default safe schema and includes
+// JavaScript-specific types: !!js/undefined, !!js/regexp and !!js/function.
+//
+// Also this schema is used as default base schema at `Schema.create` function.
+
+
+'use strict';
+
+
+var Schema = require('../schema');
+
+
+module.exports = Schema.DEFAULT = new Schema({
+ include: [
+ require('./default_safe')
+ ],
+ explicit: [
+ require('../type/js/undefined'),
+ require('../type/js/regexp'),
+ require('../type/js/function')
+ ]
+});
diff --git a/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js
new file mode 100644
index 0000000000..11d89bbfbb
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js
@@ -0,0 +1,28 @@
+// JS-YAML's default schema for `safeLoad` function.
+// It is not described in the YAML specification.
+//
+// This schema is based on standard YAML's Core schema and includes most of
+// extra types described at YAML tag repository. (http://yaml.org/type/)
+
+
+'use strict';
+
+
+var Schema = require('../schema');
+
+
+module.exports = new Schema({
+ include: [
+ require('./core')
+ ],
+ implicit: [
+ require('../type/timestamp'),
+ require('../type/merge')
+ ],
+ explicit: [
+ require('../type/binary'),
+ require('../type/omap'),
+ require('../type/pairs'),
+ require('../type/set')
+ ]
+});
diff --git a/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js
new file mode 100644
index 0000000000..b7a33eb7a1
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js
@@ -0,0 +1,17 @@
+// Standard YAML's Failsafe schema.
+// http://www.yaml.org/spec/1.2/spec.html#id2802346
+
+
+'use strict';
+
+
+var Schema = require('../schema');
+
+
+module.exports = new Schema({
+ explicit: [
+ require('../type/str'),
+ require('../type/seq'),
+ require('../type/map')
+ ]
+});
diff --git a/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/schema/json.js b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/schema/json.js
new file mode 100644
index 0000000000..5be3dbf805
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/schema/json.js
@@ -0,0 +1,25 @@
+// Standard YAML's JSON schema.
+// http://www.yaml.org/spec/1.2/spec.html#id2803231
+//
+// NOTE: JS-YAML does not support schema-specific tag resolution restrictions.
+// So, this schema is not such strict as defined in the YAML specification.
+// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc.
+
+
+'use strict';
+
+
+var Schema = require('../schema');
+
+
+module.exports = new Schema({
+ include: [
+ require('./failsafe')
+ ],
+ implicit: [
+ require('../type/null'),
+ require('../type/bool'),
+ require('../type/int'),
+ require('../type/float')
+ ]
+});
diff --git a/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type.js b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type.js
new file mode 100644
index 0000000000..90b702ac06
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type.js
@@ -0,0 +1,61 @@
+'use strict';
+
+var YAMLException = require('./exception');
+
+var TYPE_CONSTRUCTOR_OPTIONS = [
+ 'kind',
+ 'resolve',
+ 'construct',
+ 'instanceOf',
+ 'predicate',
+ 'represent',
+ 'defaultStyle',
+ 'styleAliases'
+];
+
+var YAML_NODE_KINDS = [
+ 'scalar',
+ 'sequence',
+ 'mapping'
+];
+
+function compileStyleAliases(map) {
+ var result = {};
+
+ if (map !== null) {
+ Object.keys(map).forEach(function (style) {
+ map[style].forEach(function (alias) {
+ result[String(alias)] = style;
+ });
+ });
+ }
+
+ return result;
+}
+
+function Type(tag, options) {
+ options = options || {};
+
+ Object.keys(options).forEach(function (name) {
+ if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) {
+ throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.');
+ }
+ });
+
+ // TODO: Add tag format check.
+ this.tag = tag;
+ this.kind = options['kind'] || null;
+ this.resolve = options['resolve'] || function () { return true; };
+ this.construct = options['construct'] || function (data) { return data; };
+ this.instanceOf = options['instanceOf'] || null;
+ this.predicate = options['predicate'] || null;
+ this.represent = options['represent'] || null;
+ this.defaultStyle = options['defaultStyle'] || null;
+ this.styleAliases = compileStyleAliases(options['styleAliases'] || null);
+
+ if (YAML_NODE_KINDS.indexOf(this.kind) === -1) {
+ throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.');
+ }
+}
+
+module.exports = Type;
diff --git a/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/binary.js b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/binary.js
new file mode 100644
index 0000000000..10b1875595
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/binary.js
@@ -0,0 +1,138 @@
+'use strict';
+
+/*eslint-disable no-bitwise*/
+
+var NodeBuffer;
+
+try {
+ // A trick for browserified version, to not include `Buffer` shim
+ var _require = require;
+ NodeBuffer = _require('buffer').Buffer;
+} catch (__) {}
+
+var Type = require('../type');
+
+
+// [ 64, 65, 66 ] -> [ padding, CR, LF ]
+var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r';
+
+
+function resolveYamlBinary(data) {
+ if (data === null) return false;
+
+ var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP;
+
+ // Convert one by one.
+ for (idx = 0; idx < max; idx++) {
+ code = map.indexOf(data.charAt(idx));
+
+ // Skip CR/LF
+ if (code > 64) continue;
+
+ // Fail on illegal characters
+ if (code < 0) return false;
+
+ bitlen += 6;
+ }
+
+ // If there are any bits left, source was corrupted
+ return (bitlen % 8) === 0;
+}
+
+function constructYamlBinary(data) {
+ var idx, tailbits,
+ input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan
+ max = input.length,
+ map = BASE64_MAP,
+ bits = 0,
+ result = [];
+
+ // Collect by 6*4 bits (3 bytes)
+
+ for (idx = 0; idx < max; idx++) {
+ if ((idx % 4 === 0) && idx) {
+ result.push((bits >> 16) & 0xFF);
+ result.push((bits >> 8) & 0xFF);
+ result.push(bits & 0xFF);
+ }
+
+ bits = (bits << 6) | map.indexOf(input.charAt(idx));
+ }
+
+ // Dump tail
+
+ tailbits = (max % 4) * 6;
+
+ if (tailbits === 0) {
+ result.push((bits >> 16) & 0xFF);
+ result.push((bits >> 8) & 0xFF);
+ result.push(bits & 0xFF);
+ } else if (tailbits === 18) {
+ result.push((bits >> 10) & 0xFF);
+ result.push((bits >> 2) & 0xFF);
+ } else if (tailbits === 12) {
+ result.push((bits >> 4) & 0xFF);
+ }
+
+ // Wrap into Buffer for NodeJS and leave Array for browser
+ if (NodeBuffer) {
+ // Support node 6.+ Buffer API when available
+ return NodeBuffer.from ? NodeBuffer.from(result) : new NodeBuffer(result);
+ }
+
+ return result;
+}
+
+function representYamlBinary(object /*, style*/) {
+ var result = '', bits = 0, idx, tail,
+ max = object.length,
+ map = BASE64_MAP;
+
+ // Convert every three bytes to 4 ASCII characters.
+
+ for (idx = 0; idx < max; idx++) {
+ if ((idx % 3 === 0) && idx) {
+ result += map[(bits >> 18) & 0x3F];
+ result += map[(bits >> 12) & 0x3F];
+ result += map[(bits >> 6) & 0x3F];
+ result += map[bits & 0x3F];
+ }
+
+ bits = (bits << 8) + object[idx];
+ }
+
+ // Dump tail
+
+ tail = max % 3;
+
+ if (tail === 0) {
+ result += map[(bits >> 18) & 0x3F];
+ result += map[(bits >> 12) & 0x3F];
+ result += map[(bits >> 6) & 0x3F];
+ result += map[bits & 0x3F];
+ } else if (tail === 2) {
+ result += map[(bits >> 10) & 0x3F];
+ result += map[(bits >> 4) & 0x3F];
+ result += map[(bits << 2) & 0x3F];
+ result += map[64];
+ } else if (tail === 1) {
+ result += map[(bits >> 2) & 0x3F];
+ result += map[(bits << 4) & 0x3F];
+ result += map[64];
+ result += map[64];
+ }
+
+ return result;
+}
+
+function isBinary(object) {
+ return NodeBuffer && NodeBuffer.isBuffer(object);
+}
+
+module.exports = new Type('tag:yaml.org,2002:binary', {
+ kind: 'scalar',
+ resolve: resolveYamlBinary,
+ construct: constructYamlBinary,
+ predicate: isBinary,
+ represent: representYamlBinary
+});
diff --git a/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/bool.js b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/bool.js
new file mode 100644
index 0000000000..cb7745930a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/bool.js
@@ -0,0 +1,35 @@
+'use strict';
+
+var Type = require('../type');
+
+function resolveYamlBoolean(data) {
+ if (data === null) return false;
+
+ var max = data.length;
+
+ return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) ||
+ (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE'));
+}
+
+function constructYamlBoolean(data) {
+ return data === 'true' ||
+ data === 'True' ||
+ data === 'TRUE';
+}
+
+function isBoolean(object) {
+ return Object.prototype.toString.call(object) === '[object Boolean]';
+}
+
+module.exports = new Type('tag:yaml.org,2002:bool', {
+ kind: 'scalar',
+ resolve: resolveYamlBoolean,
+ construct: constructYamlBoolean,
+ predicate: isBoolean,
+ represent: {
+ lowercase: function (object) { return object ? 'true' : 'false'; },
+ uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; },
+ camelcase: function (object) { return object ? 'True' : 'False'; }
+ },
+ defaultStyle: 'lowercase'
+});
diff --git a/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/float.js b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/float.js
new file mode 100644
index 0000000000..127671b213
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/float.js
@@ -0,0 +1,116 @@
+'use strict';
+
+var common = require('../common');
+var Type = require('../type');
+
+var YAML_FLOAT_PATTERN = new RegExp(
+ // 2.5e4, 2.5 and integers
+ '^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' +
+ // .2e4, .2
+ // special case, seems not from spec
+ '|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' +
+ // 20:59
+ '|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*' +
+ // .inf
+ '|[-+]?\\.(?:inf|Inf|INF)' +
+ // .nan
+ '|\\.(?:nan|NaN|NAN))$');
+
+function resolveYamlFloat(data) {
+ if (data === null) return false;
+
+ if (!YAML_FLOAT_PATTERN.test(data) ||
+ // Quick hack to not allow integers end with `_`
+ // Probably should update regexp & check speed
+ data[data.length - 1] === '_') {
+ return false;
+ }
+
+ return true;
+}
+
+function constructYamlFloat(data) {
+ var value, sign, base, digits;
+
+ value = data.replace(/_/g, '').toLowerCase();
+ sign = value[0] === '-' ? -1 : 1;
+ digits = [];
+
+ if ('+-'.indexOf(value[0]) >= 0) {
+ value = value.slice(1);
+ }
+
+ if (value === '.inf') {
+ return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
+
+ } else if (value === '.nan') {
+ return NaN;
+
+ } else if (value.indexOf(':') >= 0) {
+ value.split(':').forEach(function (v) {
+ digits.unshift(parseFloat(v, 10));
+ });
+
+ value = 0.0;
+ base = 1;
+
+ digits.forEach(function (d) {
+ value += d * base;
+ base *= 60;
+ });
+
+ return sign * value;
+
+ }
+ return sign * parseFloat(value, 10);
+}
+
+
+var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;
+
+function representYamlFloat(object, style) {
+ var res;
+
+ if (isNaN(object)) {
+ switch (style) {
+ case 'lowercase': return '.nan';
+ case 'uppercase': return '.NAN';
+ case 'camelcase': return '.NaN';
+ }
+ } else if (Number.POSITIVE_INFINITY === object) {
+ switch (style) {
+ case 'lowercase': return '.inf';
+ case 'uppercase': return '.INF';
+ case 'camelcase': return '.Inf';
+ }
+ } else if (Number.NEGATIVE_INFINITY === object) {
+ switch (style) {
+ case 'lowercase': return '-.inf';
+ case 'uppercase': return '-.INF';
+ case 'camelcase': return '-.Inf';
+ }
+ } else if (common.isNegativeZero(object)) {
+ return '-0.0';
+ }
+
+ res = object.toString(10);
+
+ // JS stringifier can build scientific format without dots: 5e-100,
+ // while YAML requres dot: 5.e-100. Fix it with simple hack
+
+ return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res;
+}
+
+function isFloat(object) {
+ return (Object.prototype.toString.call(object) === '[object Number]') &&
+ (object % 1 !== 0 || common.isNegativeZero(object));
+}
+
+module.exports = new Type('tag:yaml.org,2002:float', {
+ kind: 'scalar',
+ resolve: resolveYamlFloat,
+ construct: constructYamlFloat,
+ predicate: isFloat,
+ represent: representYamlFloat,
+ defaultStyle: 'lowercase'
+});
diff --git a/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/int.js b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/int.js
new file mode 100644
index 0000000000..4ae522a5a0
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/int.js
@@ -0,0 +1,172 @@
+'use strict';
+
+var common = require('../common');
+var Type = require('../type');
+
+function isHexCode(c) {
+ return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) ||
+ ((0x41/* A */ <= c) && (c <= 0x46/* F */)) ||
+ ((0x61/* a */ <= c) && (c <= 0x66/* f */));
+}
+
+function isOctCode(c) {
+ return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */));
+}
+
+function isDecCode(c) {
+ return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */));
+}
+
+function resolveYamlInteger(data) {
+ if (data === null) return false;
+
+ var max = data.length,
+ index = 0,
+ hasDigits = false,
+ ch;
+
+ if (!max) return false;
+
+ ch = data[index];
+
+ // sign
+ if (ch === '-' || ch === '+') {
+ ch = data[++index];
+ }
+
+ if (ch === '0') {
+ // 0
+ if (index + 1 === max) return true;
+ ch = data[++index];
+
+ // base 2, base 8, base 16
+
+ if (ch === 'b') {
+ // base 2
+ index++;
+
+ for (; index < max; index++) {
+ ch = data[index];
+ if (ch === '_') continue;
+ if (ch !== '0' && ch !== '1') return false;
+ hasDigits = true;
+ }
+ return hasDigits && ch !== '_';
+ }
+
+
+ if (ch === 'x') {
+ // base 16
+ index++;
+
+ for (; index < max; index++) {
+ ch = data[index];
+ if (ch === '_') continue;
+ if (!isHexCode(data.charCodeAt(index))) return false;
+ hasDigits = true;
+ }
+ return hasDigits && ch !== '_';
+ }
+
+ // base 8
+ for (; index < max; index++) {
+ ch = data[index];
+ if (ch === '_') continue;
+ if (!isOctCode(data.charCodeAt(index))) return false;
+ hasDigits = true;
+ }
+ return hasDigits && ch !== '_';
+ }
+
+ // base 10 (except 0) or base 60
+
+ // value should not start with `_`;
+ if (ch === '_') return false;
+
+ for (; index < max; index++) {
+ ch = data[index];
+ if (ch === '_') continue;
+ if (ch === ':') break;
+ if (!isDecCode(data.charCodeAt(index))) {
+ return false;
+ }
+ hasDigits = true;
+ }
+
+ // Should have digits and should not end with `_`
+ if (!hasDigits || ch === '_') return false;
+
+ // if !base60 - done;
+ if (ch !== ':') return true;
+
+ // base60 almost not used, no needs to optimize
+ return /^(:[0-5]?[0-9])+$/.test(data.slice(index));
+}
+
+function constructYamlInteger(data) {
+ var value = data, sign = 1, ch, base, digits = [];
+
+ if (value.indexOf('_') !== -1) {
+ value = value.replace(/_/g, '');
+ }
+
+ ch = value[0];
+
+ if (ch === '-' || ch === '+') {
+ if (ch === '-') sign = -1;
+ value = value.slice(1);
+ ch = value[0];
+ }
+
+ if (value === '0') return 0;
+
+ if (ch === '0') {
+ if (value[1] === 'b') return sign * parseInt(value.slice(2), 2);
+ if (value[1] === 'x') return sign * parseInt(value, 16);
+ return sign * parseInt(value, 8);
+ }
+
+ if (value.indexOf(':') !== -1) {
+ value.split(':').forEach(function (v) {
+ digits.unshift(parseInt(v, 10));
+ });
+
+ value = 0;
+ base = 1;
+
+ digits.forEach(function (d) {
+ value += (d * base);
+ base *= 60;
+ });
+
+ return sign * value;
+
+ }
+
+ return sign * parseInt(value, 10);
+}
+
+function isInteger(object) {
+ return (Object.prototype.toString.call(object)) === '[object Number]' &&
+ (object % 1 === 0 && !common.isNegativeZero(object));
+}
+
+module.exports = new Type('tag:yaml.org,2002:int', {
+ kind: 'scalar',
+ resolve: resolveYamlInteger,
+ construct: constructYamlInteger,
+ predicate: isInteger,
+ represent: {
+ binary: function (object) { return '0b' + object.toString(2); },
+ octal: function (object) { return '0' + object.toString(8); },
+ decimal: function (object) { return object.toString(10); },
+ hexadecimal: function (object) { return '0x' + object.toString(16).toUpperCase(); }
+ },
+ defaultStyle: 'decimal',
+ styleAliases: {
+ binary: [ 2, 'bin' ],
+ octal: [ 8, 'oct' ],
+ decimal: [ 10, 'dec' ],
+ hexadecimal: [ 16, 'hex' ]
+ }
+});
diff --git a/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/js/function.js b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/js/function.js
new file mode 100644
index 0000000000..c6a42d0022
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/js/function.js
@@ -0,0 +1,84 @@
+'use strict';
+
+var esprima;
+
+// Browserified version does not have esprima
+//
+// 1. For node.js just require module as deps
+// 2. For browser try to require mudule via external AMD system.
+// If not found - try to fallback to window.esprima. If not
+// found too - then fail to parse.
+//
+try {
+ // workaround to exclude package from browserify list.
+ var _require = require;
+ esprima = _require('esprima');
+} catch (_) {
+ /*global window */
+ if (typeof window !== 'undefined') esprima = window.esprima;
+}
+
+var Type = require('../../type');
+
+function resolveJavascriptFunction(data) {
+ if (data === null) return false;
+
+ try {
+ var source = '(' + data + ')',
+ ast = esprima.parse(source, { range: true });
+
+ if (ast.type !== 'Program' ||
+ ast.body.length !== 1 ||
+ ast.body[0].type !== 'ExpressionStatement' ||
+ ast.body[0].expression.type !== 'FunctionExpression') {
+ return false;
+ }
+
+ return true;
+ } catch (err) {
+ return false;
+ }
+}
+
+function constructJavascriptFunction(data) {
+ /*jslint evil:true*/
+
+ var source = '(' + data + ')',
+ ast = esprima.parse(source, { range: true }),
+ params = [],
+ body;
+
+ if (ast.type !== 'Program' ||
+ ast.body.length !== 1 ||
+ ast.body[0].type !== 'ExpressionStatement' ||
+ ast.body[0].expression.type !== 'FunctionExpression') {
+ throw new Error('Failed to resolve function');
+ }
+
+ ast.body[0].expression.params.forEach(function (param) {
+ params.push(param.name);
+ });
+
+ body = ast.body[0].expression.body.range;
+
+ // Esprima's ranges include the first '{' and the last '}' characters on
+ // function expressions. So cut them out.
+ /*eslint-disable no-new-func*/
+ return new Function(params, source.slice(body[0] + 1, body[1] - 1));
+}
+
+function representJavascriptFunction(object /*, style*/) {
+ return object.toString();
+}
+
+function isFunction(object) {
+ return Object.prototype.toString.call(object) === '[object Function]';
+}
+
+module.exports = new Type('tag:yaml.org,2002:js/function', {
+ kind: 'scalar',
+ resolve: resolveJavascriptFunction,
+ construct: constructJavascriptFunction,
+ predicate: isFunction,
+ represent: representJavascriptFunction
+});
diff --git a/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js
new file mode 100644
index 0000000000..43fa470176
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js
@@ -0,0 +1,60 @@
+'use strict';
+
+var Type = require('../../type');
+
+function resolveJavascriptRegExp(data) {
+ if (data === null) return false;
+ if (data.length === 0) return false;
+
+ var regexp = data,
+ tail = /\/([gim]*)$/.exec(data),
+ modifiers = '';
+
+ // if regexp starts with '/' it can have modifiers and must be properly closed
+ // `/foo/gim` - modifiers tail can be maximum 3 chars
+ if (regexp[0] === '/') {
+ if (tail) modifiers = tail[1];
+
+ if (modifiers.length > 3) return false;
+ // if expression starts with /, is should be properly terminated
+ if (regexp[regexp.length - modifiers.length - 1] !== '/') return false;
+ }
+
+ return true;
+}
+
+function constructJavascriptRegExp(data) {
+ var regexp = data,
+ tail = /\/([gim]*)$/.exec(data),
+ modifiers = '';
+
+ // `/foo/gim` - tail can be maximum 4 chars
+ if (regexp[0] === '/') {
+ if (tail) modifiers = tail[1];
+ regexp = regexp.slice(1, regexp.length - modifiers.length - 1);
+ }
+
+ return new RegExp(regexp, modifiers);
+}
+
+function representJavascriptRegExp(object /*, style*/) {
+ var result = '/' + object.source + '/';
+
+ if (object.global) result += 'g';
+ if (object.multiline) result += 'm';
+ if (object.ignoreCase) result += 'i';
+
+ return result;
+}
+
+function isRegExp(object) {
+ return Object.prototype.toString.call(object) === '[object RegExp]';
+}
+
+module.exports = new Type('tag:yaml.org,2002:js/regexp', {
+ kind: 'scalar',
+ resolve: resolveJavascriptRegExp,
+ construct: constructJavascriptRegExp,
+ predicate: isRegExp,
+ represent: representJavascriptRegExp
+});
diff --git a/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js
new file mode 100644
index 0000000000..95b5569fdf
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js
@@ -0,0 +1,28 @@
+'use strict';
+
+var Type = require('../../type');
+
+function resolveJavascriptUndefined() {
+ return true;
+}
+
+function constructJavascriptUndefined() {
+ /*eslint-disable no-undefined*/
+ return undefined;
+}
+
+function representJavascriptUndefined() {
+ return '';
+}
+
+function isUndefined(object) {
+ return typeof object === 'undefined';
+}
+
+module.exports = new Type('tag:yaml.org,2002:js/undefined', {
+ kind: 'scalar',
+ resolve: resolveJavascriptUndefined,
+ construct: constructJavascriptUndefined,
+ predicate: isUndefined,
+ represent: representJavascriptUndefined
+});
diff --git a/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/map.js b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/map.js
new file mode 100644
index 0000000000..f327beebd5
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/map.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var Type = require('../type');
+
+module.exports = new Type('tag:yaml.org,2002:map', {
+ kind: 'mapping',
+ construct: function (data) { return data !== null ? data : {}; }
+});
diff --git a/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/merge.js b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/merge.js
new file mode 100644
index 0000000000..ae08a86444
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/merge.js
@@ -0,0 +1,12 @@
+'use strict';
+
+var Type = require('../type');
+
+function resolveYamlMerge(data) {
+ return data === '<<' || data === null;
+}
+
+module.exports = new Type('tag:yaml.org,2002:merge', {
+ kind: 'scalar',
+ resolve: resolveYamlMerge
+});
diff --git a/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/null.js b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/null.js
new file mode 100644
index 0000000000..6874daa647
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/null.js
@@ -0,0 +1,34 @@
+'use strict';
+
+var Type = require('../type');
+
+function resolveYamlNull(data) {
+ if (data === null) return true;
+
+ var max = data.length;
+
+ return (max === 1 && data === '~') ||
+ (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL'));
+}
+
+function constructYamlNull() {
+ return null;
+}
+
+function isNull(object) {
+ return object === null;
+}
+
+module.exports = new Type('tag:yaml.org,2002:null', {
+ kind: 'scalar',
+ resolve: resolveYamlNull,
+ construct: constructYamlNull,
+ predicate: isNull,
+ represent: {
+ canonical: function () { return '~'; },
+ lowercase: function () { return 'null'; },
+ uppercase: function () { return 'NULL'; },
+ camelcase: function () { return 'Null'; }
+ },
+ defaultStyle: 'lowercase'
+});
diff --git a/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/omap.js b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/omap.js
new file mode 100644
index 0000000000..b2b5323bd1
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/omap.js
@@ -0,0 +1,44 @@
+'use strict';
+
+var Type = require('../type');
+
+var _hasOwnProperty = Object.prototype.hasOwnProperty;
+var _toString = Object.prototype.toString;
+
+function resolveYamlOmap(data) {
+ if (data === null) return true;
+
+ var objectKeys = [], index, length, pair, pairKey, pairHasKey,
+ object = data;
+
+ for (index = 0, length = object.length; index < length; index += 1) {
+ pair = object[index];
+ pairHasKey = false;
+
+ if (_toString.call(pair) !== '[object Object]') return false;
+
+ for (pairKey in pair) {
+ if (_hasOwnProperty.call(pair, pairKey)) {
+ if (!pairHasKey) pairHasKey = true;
+ else return false;
+ }
+ }
+
+ if (!pairHasKey) return false;
+
+ if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey);
+ else return false;
+ }
+
+ return true;
+}
+
+function constructYamlOmap(data) {
+ return data !== null ? data : [];
+}
+
+module.exports = new Type('tag:yaml.org,2002:omap', {
+ kind: 'sequence',
+ resolve: resolveYamlOmap,
+ construct: constructYamlOmap
+});
diff --git a/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/pairs.js b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/pairs.js
new file mode 100644
index 0000000000..74b52403fc
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/pairs.js
@@ -0,0 +1,53 @@
+'use strict';
+
+var Type = require('../type');
+
+var _toString = Object.prototype.toString;
+
+function resolveYamlPairs(data) {
+ if (data === null) return true;
+
+ var index, length, pair, keys, result,
+ object = data;
+
+ result = new Array(object.length);
+
+ for (index = 0, length = object.length; index < length; index += 1) {
+ pair = object[index];
+
+ if (_toString.call(pair) !== '[object Object]') return false;
+
+ keys = Object.keys(pair);
+
+ if (keys.length !== 1) return false;
+
+ result[index] = [ keys[0], pair[keys[0]] ];
+ }
+
+ return true;
+}
+
+function constructYamlPairs(data) {
+ if (data === null) return [];
+
+ var index, length, pair, keys, result,
+ object = data;
+
+ result = new Array(object.length);
+
+ for (index = 0, length = object.length; index < length; index += 1) {
+ pair = object[index];
+
+ keys = Object.keys(pair);
+
+ result[index] = [ keys[0], pair[keys[0]] ];
+ }
+
+ return result;
+}
+
+module.exports = new Type('tag:yaml.org,2002:pairs', {
+ kind: 'sequence',
+ resolve: resolveYamlPairs,
+ construct: constructYamlPairs
+});
diff --git a/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/seq.js b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/seq.js
new file mode 100644
index 0000000000..be8f77f284
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/seq.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var Type = require('../type');
+
+module.exports = new Type('tag:yaml.org,2002:seq', {
+ kind: 'sequence',
+ construct: function (data) { return data !== null ? data : []; }
+});
diff --git a/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/set.js b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/set.js
new file mode 100644
index 0000000000..f885a329c2
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/set.js
@@ -0,0 +1,29 @@
+'use strict';
+
+var Type = require('../type');
+
+var _hasOwnProperty = Object.prototype.hasOwnProperty;
+
+function resolveYamlSet(data) {
+ if (data === null) return true;
+
+ var key, object = data;
+
+ for (key in object) {
+ if (_hasOwnProperty.call(object, key)) {
+ if (object[key] !== null) return false;
+ }
+ }
+
+ return true;
+}
+
+function constructYamlSet(data) {
+ return data !== null ? data : {};
+}
+
+module.exports = new Type('tag:yaml.org,2002:set', {
+ kind: 'mapping',
+ resolve: resolveYamlSet,
+ construct: constructYamlSet
+});
diff --git a/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/str.js b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/str.js
new file mode 100644
index 0000000000..27acc106ca
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/str.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var Type = require('../type');
+
+module.exports = new Type('tag:yaml.org,2002:str', {
+ kind: 'scalar',
+ construct: function (data) { return data !== null ? data : ''; }
+});
diff --git a/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/timestamp.js b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/timestamp.js
new file mode 100644
index 0000000000..8fa9c58656
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/timestamp.js
@@ -0,0 +1,88 @@
+'use strict';
+
+var Type = require('../type');
+
+var YAML_DATE_REGEXP = new RegExp(
+ '^([0-9][0-9][0-9][0-9])' + // [1] year
+ '-([0-9][0-9])' + // [2] month
+ '-([0-9][0-9])$'); // [3] day
+
+var YAML_TIMESTAMP_REGEXP = new RegExp(
+ '^([0-9][0-9][0-9][0-9])' + // [1] year
+ '-([0-9][0-9]?)' + // [2] month
+ '-([0-9][0-9]?)' + // [3] day
+ '(?:[Tt]|[ \\t]+)' + // ...
+ '([0-9][0-9]?)' + // [4] hour
+ ':([0-9][0-9])' + // [5] minute
+ ':([0-9][0-9])' + // [6] second
+ '(?:\\.([0-9]*))?' + // [7] fraction
+ '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour
+ '(?::([0-9][0-9]))?))?$'); // [11] tz_minute
+
+function resolveYamlTimestamp(data) {
+ if (data === null) return false;
+ if (YAML_DATE_REGEXP.exec(data) !== null) return true;
+ if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true;
+ return false;
+}
+
+function constructYamlTimestamp(data) {
+ var match, year, month, day, hour, minute, second, fraction = 0,
+ delta = null, tz_hour, tz_minute, date;
+
+ match = YAML_DATE_REGEXP.exec(data);
+ if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data);
+
+ if (match === null) throw new Error('Date resolve error');
+
+ // match: [1] year [2] month [3] day
+
+ year = +(match[1]);
+ month = +(match[2]) - 1; // JS month starts with 0
+ day = +(match[3]);
+
+ if (!match[4]) { // no hour
+ return new Date(Date.UTC(year, month, day));
+ }
+
+ // match: [4] hour [5] minute [6] second [7] fraction
+
+ hour = +(match[4]);
+ minute = +(match[5]);
+ second = +(match[6]);
+
+ if (match[7]) {
+ fraction = match[7].slice(0, 3);
+ while (fraction.length < 3) { // milli-seconds
+ fraction += '0';
+ }
+ fraction = +fraction;
+ }
+
+ // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute
+
+ if (match[9]) {
+ tz_hour = +(match[10]);
+ tz_minute = +(match[11] || 0);
+ delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds
+ if (match[9] === '-') delta = -delta;
+ }
+
+ date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));
+
+ if (delta) date.setTime(date.getTime() - delta);
+
+ return date;
+}
+
+function representYamlTimestamp(object /*, style*/) {
+ return object.toISOString();
+}
+
+module.exports = new Type('tag:yaml.org,2002:timestamp', {
+ kind: 'scalar',
+ resolve: resolveYamlTimestamp,
+ construct: constructYamlTimestamp,
+ instanceOf: Date,
+ represent: representYamlTimestamp
+});
diff --git a/tools/node_modules/eslint/node_modules/js-yaml/package.json b/tools/node_modules/eslint/node_modules/js-yaml/package.json
new file mode 100644
index 0000000000..a0e2c000ce
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/js-yaml/package.json
@@ -0,0 +1,92 @@
+{
+ "_from": "js-yaml@^3.9.1",
+ "_id": "js-yaml@3.10.0",
+ "_inBundle": false,
+ "_integrity": "sha512-O2v52ffjLa9VeM43J4XocZE//WT9N0IiwDa3KSHH7Tu8CtH+1qM8SIZvnsTh6v+4yFy5KUY3BHUVwjpfAWsjIA==",
+ "_location": "/eslint/js-yaml",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "js-yaml@^3.9.1",
+ "name": "js-yaml",
+ "escapedName": "js-yaml",
+ "rawSpec": "^3.9.1",
+ "saveSpec": null,
+ "fetchSpec": "^3.9.1"
+ },
+ "_requiredBy": [
+ "/eslint"
+ ],
+ "_resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.10.0.tgz",
+ "_shasum": "2e78441646bd4682e963f22b6e92823c309c62dc",
+ "_spec": "js-yaml@^3.9.1",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint",
+ "author": {
+ "name": "Vladimir Zapparov",
+ "email": "dervus.grim@gmail.com"
+ },
+ "bin": {
+ "js-yaml": "bin/js-yaml.js"
+ },
+ "bugs": {
+ "url": "https://github.com/nodeca/js-yaml/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Aleksey V Zapparov",
+ "email": "ixti@member.fsf.org",
+ "url": "http://www.ixti.net/"
+ },
+ {
+ "name": "Vitaly Puzrin",
+ "email": "vitaly@rcdesign.ru",
+ "url": "https://github.com/puzrin"
+ },
+ {
+ "name": "Martin Grenfell",
+ "email": "martin.grenfell@gmail.com",
+ "url": "http://got-ravings.blogspot.com"
+ }
+ ],
+ "dependencies": {
+ "argparse": "^1.0.7",
+ "esprima": "^4.0.0"
+ },
+ "deprecated": false,
+ "description": "YAML 1.2 parser and serializer",
+ "devDependencies": {
+ "ansi": "^0.3.1",
+ "benchmark": "^2.1.4",
+ "browserify": "^14.3.0",
+ "codemirror": "^5.13.4",
+ "eslint": "^4.1.1",
+ "istanbul": "^0.4.5",
+ "mocha": "^3.3.0",
+ "uglify-js": "^3.0.1"
+ },
+ "files": [
+ "index.js",
+ "lib/",
+ "bin/",
+ "dist/"
+ ],
+ "homepage": "https://github.com/nodeca/js-yaml",
+ "keywords": [
+ "yaml",
+ "parser",
+ "serializer",
+ "pyyaml"
+ ],
+ "license": "MIT",
+ "name": "js-yaml",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/nodeca/js-yaml.git"
+ },
+ "scripts": {
+ "test": "make test"
+ },
+ "version": "3.10.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/json-schema-traverse/.eslintrc.yml b/tools/node_modules/eslint/node_modules/json-schema-traverse/.eslintrc.yml
new file mode 100644
index 0000000000..ab1762da9c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/json-schema-traverse/.eslintrc.yml
@@ -0,0 +1,27 @@
+extends: eslint:recommended
+env:
+ node: true
+ browser: true
+rules:
+ block-scoped-var: 2
+ complexity: [2, 13]
+ curly: [2, multi-or-nest, consistent]
+ dot-location: [2, property]
+ dot-notation: 2
+ indent: [2, 2, SwitchCase: 1]
+ linebreak-style: [2, unix]
+ new-cap: 2
+ no-console: [2, allow: [warn, error]]
+ no-else-return: 2
+ no-eq-null: 2
+ no-fallthrough: 2
+ no-invalid-this: 2
+ no-return-assign: 2
+ no-shadow: 1
+ no-trailing-spaces: 2
+ no-use-before-define: [2, nofunc]
+ quotes: [2, single, avoid-escape]
+ semi: [2, always]
+ strict: [2, global]
+ valid-jsdoc: [2, requireReturn: false]
+ no-control-regex: 0
diff --git a/tools/node_modules/eslint/node_modules/json-schema-traverse/LICENSE b/tools/node_modules/eslint/node_modules/json-schema-traverse/LICENSE
new file mode 100644
index 0000000000..7f1543566f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/json-schema-traverse/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2017 Evgeny Poberezkin
+
+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/tools/node_modules/eslint/node_modules/json-schema-traverse/README.md b/tools/node_modules/eslint/node_modules/json-schema-traverse/README.md
new file mode 100644
index 0000000000..d4286a23b3
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/json-schema-traverse/README.md
@@ -0,0 +1,69 @@
+# json-schema-traverse
+Traverse JSON Schema passing each schema object to callback
+
+[![Build Status](https://travis-ci.org/epoberezkin/json-schema-traverse.svg?branch=master)](https://travis-ci.org/epoberezkin/json-schema-traverse)
+[![npm version](https://badge.fury.io/js/json-schema-traverse.svg)](https://www.npmjs.com/package/json-schema-traverse)
+[![Coverage Status](https://coveralls.io/repos/github/epoberezkin/json-schema-traverse/badge.svg?branch=master)](https://coveralls.io/github/epoberezkin/json-schema-traverse?branch=master)
+
+
+## Install
+
+```
+npm install json-schema-traverse
+```
+
+
+## Usage
+
+```javascript
+const traverse = require('json-schema-traverse');
+const schema = {
+ properties: {
+ foo: {type: 'string'},
+ bar: {type: 'integer'}
+ }
+};
+
+traverse(schema, cb);
+// cb is called 3 times with:
+// 1. root schema
+// 2. {type: 'string'}
+// 3. {type: 'integer'}
+```
+
+Callback function is called for each schema object (not including draft-06 boolean schemas), including the root schema. Schema references ($ref) are not resolved, they are passed as is.
+
+Callback is passed these parameters:
+
+- _schema_: the current schema object
+- _JSON pointer_: from the root schema to the current schema object
+- _root schema_: the schema passed to `traverse` object
+- _parent JSON pointer_: from the root schema to the parent schema object (see below)
+- _parent keyword_: the keyword inside which this schema appears (e.g. `properties`, `anyOf`, etc.)
+- _parent schema_: not necessarily parent object/array; in the example above the parent schema for `{type: 'string'}` is the root schema
+- _index/property_: index or property name in the array/object containing multiple schemas; in the example above for `{type: 'string'}` the property name is `'foo'`
+
+
+## Traverse objects in all unknown keywords
+
+```javascript
+const traverse = require('json-schema-traverse');
+const schema = {
+ mySchema: {
+ minimum: 1,
+ maximum: 2
+ }
+};
+
+traverse(schema, {allKeys: true}, cb);
+// cb is called 2 times with:
+// 1. root schema
+// 2. mySchema
+```
+
+Without option `allKeys: true` callback will be called only with root schema.
+
+
+## License
+
+[MIT](https://github.com/epoberezkin/json-schema-traverse/blob/master/LICENSE)
diff --git a/tools/node_modules/eslint/node_modules/json-schema-traverse/index.js b/tools/node_modules/eslint/node_modules/json-schema-traverse/index.js
new file mode 100644
index 0000000000..79eeb6a05e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/json-schema-traverse/index.js
@@ -0,0 +1,81 @@
+'use strict';
+
+var traverse = module.exports = function (schema, opts, cb) {
+ if (typeof opts == 'function') {
+ cb = opts;
+ opts = {};
+ }
+ _traverse(opts, cb, schema, '', schema);
+};
+
+
+traverse.keywords = {
+ additionalItems: true,
+ items: true,
+ contains: true,
+ additionalProperties: true,
+ propertyNames: true,
+ not: true
+};
+
+traverse.arrayKeywords = {
+ items: true,
+ allOf: true,
+ anyOf: true,
+ oneOf: true
+};
+
+traverse.propsKeywords = {
+ definitions: true,
+ properties: true,
+ patternProperties: true,
+ dependencies: true
+};
+
+traverse.skipKeywords = {
+ enum: true,
+ const: true,
+ required: true,
+ maximum: true,
+ minimum: true,
+ exclusiveMaximum: true,
+ exclusiveMinimum: true,
+ multipleOf: true,
+ maxLength: true,
+ minLength: true,
+ pattern: true,
+ format: true,
+ maxItems: true,
+ minItems: true,
+ uniqueItems: true,
+ maxProperties: true,
+ minProperties: true
+};
+
+
+function _traverse(opts, cb, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {
+ if (schema && typeof schema == 'object' && !Array.isArray(schema)) {
+ cb(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);
+ for (var key in schema) {
+ var sch = schema[key];
+ if (Array.isArray(sch)) {
+ if (key in traverse.arrayKeywords) {
+ for (var i=0; i<sch.length; i++)
+ _traverse(opts, cb, sch[i], jsonPtr + '/' + key + '/' + i, rootSchema, jsonPtr, key, schema, i);
+ }
+ } else if (key in traverse.propsKeywords) {
+ if (sch && typeof sch == 'object') {
+ for (var prop in sch)
+ _traverse(opts, cb, sch[prop], jsonPtr + '/' + key + '/' + escapeJsonPtr(prop), rootSchema, jsonPtr, key, schema, prop);
+ }
+ } else if (key in traverse.keywords || (opts.allKeys && !(key in traverse.skipKeywords))) {
+ _traverse(opts, cb, sch, jsonPtr + '/' + key, rootSchema, jsonPtr, key, schema);
+ }
+ }
+ }
+}
+
+
+function escapeJsonPtr(str) {
+ return str.replace(/~/g, '~0').replace(/\//g, '~1');
+}
diff --git a/tools/node_modules/eslint/node_modules/json-schema-traverse/package.json b/tools/node_modules/eslint/node_modules/json-schema-traverse/package.json
new file mode 100644
index 0000000000..97e714a07f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/json-schema-traverse/package.json
@@ -0,0 +1,70 @@
+{
+ "_from": "json-schema-traverse@^0.3.0",
+ "_id": "json-schema-traverse@0.3.1",
+ "_inBundle": false,
+ "_integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=",
+ "_location": "/eslint/json-schema-traverse",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "json-schema-traverse@^0.3.0",
+ "name": "json-schema-traverse",
+ "escapedName": "json-schema-traverse",
+ "rawSpec": "^0.3.0",
+ "saveSpec": null,
+ "fetchSpec": "^0.3.0"
+ },
+ "_requiredBy": [
+ "/eslint/ajv"
+ ],
+ "_resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz",
+ "_shasum": "349a6d44c53a51de89b40805c5d5e59b417d3340",
+ "_spec": "json-schema-traverse@^0.3.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/ajv",
+ "author": {
+ "name": "Evgeny Poberezkin"
+ },
+ "bugs": {
+ "url": "https://github.com/epoberezkin/json-schema-traverse/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Traverse JSON Schema passing each schema object to callback",
+ "devDependencies": {
+ "coveralls": "^2.13.1",
+ "eslint": "^3.19.0",
+ "mocha": "^3.4.2",
+ "nyc": "^11.0.2",
+ "pre-commit": "^1.2.2"
+ },
+ "homepage": "https://github.com/epoberezkin/json-schema-traverse#readme",
+ "keywords": [
+ "JSON-Schema",
+ "traverse",
+ "iterate"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "json-schema-traverse",
+ "nyc": {
+ "exclude": [
+ "**/spec/**",
+ "node_modules"
+ ],
+ "reporter": [
+ "lcov",
+ "text-summary"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/epoberezkin/json-schema-traverse.git"
+ },
+ "scripts": {
+ "eslint": "eslint index.js spec",
+ "test": "npm run eslint && nyc npm run test-spec",
+ "test-spec": "mocha spec -R spec"
+ },
+ "version": "0.3.1"
+}
diff --git a/tools/node_modules/eslint/node_modules/json-stable-stringify-without-jsonify/LICENSE b/tools/node_modules/eslint/node_modules/json-stable-stringify-without-jsonify/LICENSE
new file mode 100644
index 0000000000..ee27ba4b44
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/json-stable-stringify-without-jsonify/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/tools/node_modules/eslint/node_modules/json-stable-stringify-without-jsonify/index.js b/tools/node_modules/eslint/node_modules/json-stable-stringify-without-jsonify/index.js
new file mode 100644
index 0000000000..a6f40c7b71
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/json-stable-stringify-without-jsonify/index.js
@@ -0,0 +1,82 @@
+module.exports = function (obj, opts) {
+ if (!opts) opts = {};
+ if (typeof opts === 'function') opts = { cmp: opts };
+ var space = opts.space || '';
+ if (typeof space === 'number') space = Array(space+1).join(' ');
+ var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false;
+ var replacer = opts.replacer || function(key, value) { return value; };
+
+ var cmp = opts.cmp && (function (f) {
+ return function (node) {
+ return function (a, b) {
+ var aobj = { key: a, value: node[a] };
+ var bobj = { key: b, value: node[b] };
+ return f(aobj, bobj);
+ };
+ };
+ })(opts.cmp);
+
+ var seen = [];
+ return (function stringify (parent, key, node, level) {
+ var indent = space ? ('\n' + new Array(level + 1).join(space)) : '';
+ var colonSeparator = space ? ': ' : ':';
+
+ if (node && node.toJSON && typeof node.toJSON === 'function') {
+ node = node.toJSON();
+ }
+
+ node = replacer.call(parent, key, node);
+
+ if (node === undefined) {
+ return;
+ }
+ if (typeof node !== 'object' || node === null) {
+ return JSON.stringify(node);
+ }
+ if (isArray(node)) {
+ var out = [];
+ for (var i = 0; i < node.length; i++) {
+ var item = stringify(node, i, node[i], level+1) || JSON.stringify(null);
+ out.push(indent + space + item);
+ }
+ return '[' + out.join(',') + indent + ']';
+ }
+ else {
+ if (seen.indexOf(node) !== -1) {
+ if (cycles) return JSON.stringify('__cycle__');
+ throw new TypeError('Converting circular structure to JSON');
+ }
+ else seen.push(node);
+
+ var keys = objectKeys(node).sort(cmp && cmp(node));
+ var out = [];
+ for (var i = 0; i < keys.length; i++) {
+ var key = keys[i];
+ var value = stringify(node, key, node[key], level+1);
+
+ if(!value) continue;
+
+ var keyValue = JSON.stringify(key)
+ + colonSeparator
+ + value;
+ ;
+ out.push(indent + space + keyValue);
+ }
+ seen.splice(seen.indexOf(node), 1);
+ return '{' + out.join(',') + indent + '}';
+ }
+ })({ '': obj }, '', obj, 0);
+};
+
+var isArray = Array.isArray || function (x) {
+ return {}.toString.call(x) === '[object Array]';
+};
+
+var objectKeys = Object.keys || function (obj) {
+ var has = Object.prototype.hasOwnProperty || function () { return true };
+ var keys = [];
+ for (var key in obj) {
+ if (has.call(obj, key)) keys.push(key);
+ }
+ return keys;
+};
diff --git a/tools/node_modules/eslint/node_modules/json-stable-stringify-without-jsonify/package.json b/tools/node_modules/eslint/node_modules/json-stable-stringify-without-jsonify/package.json
new file mode 100644
index 0000000000..ffbb8a39c6
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/json-stable-stringify-without-jsonify/package.json
@@ -0,0 +1,72 @@
+{
+ "_from": "json-stable-stringify-without-jsonify@^1.0.1",
+ "_id": "json-stable-stringify-without-jsonify@1.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=",
+ "_location": "/eslint/json-stable-stringify-without-jsonify",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "json-stable-stringify-without-jsonify@^1.0.1",
+ "name": "json-stable-stringify-without-jsonify",
+ "escapedName": "json-stable-stringify-without-jsonify",
+ "rawSpec": "^1.0.1",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.1"
+ },
+ "_requiredBy": [
+ "/eslint"
+ ],
+ "_resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
+ "_shasum": "9db7b59496ad3f3cfef30a75142d2d930ad72651",
+ "_spec": "json-stable-stringify-without-jsonify@^1.0.1",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint",
+ "author": {
+ "name": "James Halliday",
+ "email": "mail@substack.net",
+ "url": "http://substack.net"
+ },
+ "bugs": {
+ "url": "https://github.com/samn/json-stable-stringify/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "deterministic JSON.stringify() with custom sorting to get deterministic hashes from stringified results, with no public domain dependencies",
+ "devDependencies": {
+ "tape": "~1.0.4"
+ },
+ "homepage": "https://github.com/samn/json-stable-stringify",
+ "keywords": [
+ "json",
+ "stringify",
+ "deterministic",
+ "hash",
+ "sort",
+ "stable"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "json-stable-stringify-without-jsonify",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/samn/json-stable-stringify.git"
+ },
+ "scripts": {
+ "test": "tape test/*.js"
+ },
+ "testling": {
+ "files": "test/*.js",
+ "browsers": [
+ "ie/8..latest",
+ "ff/5",
+ "ff/latest",
+ "chrome/15",
+ "chrome/latest",
+ "safari/latest",
+ "opera/latest"
+ ]
+ },
+ "version": "1.0.1"
+}
diff --git a/tools/node_modules/eslint/node_modules/json-stable-stringify-without-jsonify/readme.markdown b/tools/node_modules/eslint/node_modules/json-stable-stringify-without-jsonify/readme.markdown
new file mode 100644
index 0000000000..e95b468ab4
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/json-stable-stringify-without-jsonify/readme.markdown
@@ -0,0 +1,132 @@
+# json-stable-stringify
+
+This is the same as https://github.com/substack/json-stable-stringify but it doesn't depend on libraries without licenses (jsonify).
+
+deterministic version of `JSON.stringify()` so you can get a consistent hash
+from stringified results
+
+You can also pass in a custom comparison function.
+
+[![browser support](https://ci.testling.com/substack/json-stable-stringify.png)](https://ci.testling.com/substack/json-stable-stringify)
+
+[![build status](https://secure.travis-ci.org/substack/json-stable-stringify.png)](http://travis-ci.org/substack/json-stable-stringify)
+
+# example
+
+``` js
+var stringify = require('json-stable-stringify');
+var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };
+console.log(stringify(obj));
+```
+
+output:
+
+```
+{"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8}
+```
+
+# methods
+
+``` js
+var stringify = require('json-stable-stringify')
+```
+
+## var str = stringify(obj, opts)
+
+Return a deterministic stringified string `str` from the object `obj`.
+
+## options
+
+### cmp
+
+If `opts` is given, you can supply an `opts.cmp` to have a custom comparison
+function for object keys. Your function `opts.cmp` is called with these
+parameters:
+
+``` js
+opts.cmp({ key: akey, value: avalue }, { key: bkey, value: bvalue })
+```
+
+For example, to sort on the object key names in reverse order you could write:
+
+``` js
+var stringify = require('json-stable-stringify');
+
+var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };
+var s = stringify(obj, function (a, b) {
+ return a.key < b.key ? 1 : -1;
+});
+console.log(s);
+```
+
+which results in the output string:
+
+```
+{"c":8,"b":[{"z":6,"y":5,"x":4},7],"a":3}
+```
+
+Or if you wanted to sort on the object values in reverse order, you could write:
+
+```
+var stringify = require('json-stable-stringify');
+
+var obj = { d: 6, c: 5, b: [{z:3,y:2,x:1},9], a: 10 };
+var s = stringify(obj, function (a, b) {
+ return a.value < b.value ? 1 : -1;
+});
+console.log(s);
+```
+
+which outputs:
+
+```
+{"d":6,"c":5,"b":[{"z":3,"y":2,"x":1},9],"a":10}
+```
+
+### space
+
+If you specify `opts.space`, it will indent the output for pretty-printing.
+Valid values are strings (e.g. `{space: \t}`) or a number of spaces
+(`{space: 3}`).
+
+For example:
+
+```js
+var obj = { b: 1, a: { foo: 'bar', and: [1, 2, 3] } };
+var s = stringify(obj, { space: ' ' });
+console.log(s);
+```
+
+which outputs:
+
+```
+{
+ "a": {
+ "and": [
+ 1,
+ 2,
+ 3
+ ],
+ "foo": "bar"
+ },
+ "b": 1
+}
+```
+
+### replacer
+
+The replacer parameter is a function `opts.replacer(key, value)` that behaves
+the same as the replacer
+[from the core JSON object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_native_JSON#The_replacer_parameter).
+
+# install
+
+With [npm](https://npmjs.org) do:
+
+```
+npm install json-stable-stringify
+```
+
+# license
+
+MIT
diff --git a/tools/node_modules/eslint/node_modules/levn/LICENSE b/tools/node_modules/eslint/node_modules/levn/LICENSE
new file mode 100644
index 0000000000..525b11850e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/levn/LICENSE
@@ -0,0 +1,22 @@
+Copyright (c) George Zahariev
+
+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/tools/node_modules/eslint/node_modules/levn/README.md b/tools/node_modules/eslint/node_modules/levn/README.md
new file mode 100644
index 0000000000..bb9ffea055
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/levn/README.md
@@ -0,0 +1,196 @@
+# levn [![Build Status](https://travis-ci.org/gkz/levn.png)](https://travis-ci.org/gkz/levn) <a name="levn" />
+__Light ECMAScript (JavaScript) Value Notation__
+Levn is a library which allows you to parse a string into a JavaScript value based on an expected type. It is meant for short amounts of human entered data (eg. config files, command line arguments).
+
+Levn aims to concisely describe JavaScript values in text, and allow for the extraction and validation of those values. Levn uses [type-check](https://github.com/gkz/type-check) for its type format, and to validate the results. MIT license. Version 0.3.0.
+
+__How is this different than JSON?__ levn is meant to be written by humans only, is (due to the previous point) much more concise, can be validated against supplied types, has regex and date literals, and can easily be extended with custom types. On the other hand, it is probably slower and thus less efficient at transporting large amounts of data, which is fine since this is not its purpose.
+
+ npm install levn
+
+For updates on levn, [follow me on twitter](https://twitter.com/gkzahariev).
+
+
+## Quick Examples
+
+```js
+var parse = require('levn').parse;
+parse('Number', '2'); // 2
+parse('String', '2'); // '2'
+parse('String', 'levn'); // 'levn'
+parse('String', 'a b'); // 'a b'
+parse('Boolean', 'true'); // true
+
+parse('Date', '#2011-11-11#'); // (Date object)
+parse('Date', '2011-11-11'); // (Date object)
+parse('RegExp', '/[a-z]/gi'); // /[a-z]/gi
+parse('RegExp', 're'); // /re/
+parse('Int', '2'); // 2
+
+parse('Number | String', 'str'); // 'str'
+parse('Number | String', '2'); // 2
+
+parse('[Number]', '[1,2,3]'); // [1,2,3]
+parse('(String, Boolean)', '(hi, false)'); // ['hi', false]
+parse('{a: String, b: Number}', '{a: str, b: 2}'); // {a: 'str', b: 2}
+
+// at the top level, you can ommit surrounding delimiters
+parse('[Number]', '1,2,3'); // [1,2,3]
+parse('(String, Boolean)', 'hi, false'); // ['hi', false]
+parse('{a: String, b: Number}', 'a: str, b: 2'); // {a: 'str', b: 2}
+
+// wildcard - auto choose type
+parse('*', '[hi,(null,[42]),{k: true}]'); // ['hi', [null, [42]], {k: true}]
+```
+## Usage
+
+`require('levn');` returns an object that exposes three properties. `VERSION` is the current version of the library as a string. `parse` and `parsedTypeParse` are functions.
+
+```js
+// parse(type, input, options);
+parse('[Number]', '1,2,3'); // [1, 2, 3]
+
+// parsedTypeParse(parsedType, input, options);
+var parsedType = require('type-check').parseType('[Number]');
+parsedTypeParse(parsedType, '1,2,3'); // [1, 2, 3]
+```
+
+### parse(type, input, options)
+
+`parse` casts the string `input` into a JavaScript value according to the specified `type` in the [type format](https://github.com/gkz/type-check#type-format) (and taking account the optional `options`) and returns the resulting JavaScript value.
+
+##### arguments
+* type - `String` - the type written in the [type format](https://github.com/gkz/type-check#type-format) which to check against
+* input - `String` - the value written in the [levn format](#levn-format)
+* options - `Maybe Object` - an optional parameter specifying additional [options](#options)
+
+##### returns
+`*` - the resulting JavaScript value
+
+##### example
+```js
+parse('[Number]', '1,2,3'); // [1, 2, 3]
+```
+
+### parsedTypeParse(parsedType, input, options)
+
+`parsedTypeParse` casts the string `input` into a JavaScript value according to the specified `type` which has already been parsed (and taking account the optional `options`) and returns the resulting JavaScript value. You can parse a type using the [type-check](https://github.com/gkz/type-check) library's `parseType` function.
+
+##### arguments
+* type - `Object` - the type in the parsed type format which to check against
+* input - `String` - the value written in the [levn format](#levn-format)
+* options - `Maybe Object` - an optional parameter specifying additional [options](#options)
+
+##### returns
+`*` - the resulting JavaScript value
+
+##### example
+```js
+var parsedType = require('type-check').parseType('[Number]');
+parsedTypeParse(parsedType, '1,2,3'); // [1, 2, 3]
+```
+
+## Levn Format
+
+Levn can use the type information you provide to choose the appropriate value to produce from the input. For the same input, it will choose a different output value depending on the type provided. For example, `parse('Number', '2')` will produce the number `2`, but `parse('String', '2')` will produce the string `"2"`.
+
+If you do not provide type information, and simply use `*`, levn will parse the input according the unambiguous "explicit" mode, which we will now detail - you can also set the `explicit` option to true manually in the [options](#options).
+
+* `"string"`, `'string'` are parsed as a String, eg. `"a msg"` is `"a msg"`
+* `#date#` is parsed as a Date, eg. `#2011-11-11#` is `new Date('2011-11-11')`
+* `/regexp/flags` is parsed as a RegExp, eg. `/re/gi` is `/re/gi`
+* `undefined`, `null`, `NaN`, `true`, and `false` are all their JavaScript equivalents
+* `[element1, element2, etc]` is an Array, and the casting procedure is recursively applied to each element. Eg. `[1,2,3]` is `[1,2,3]`.
+* `(element1, element2, etc)` is an tuple, and the casting procedure is recursively applied to each element. Eg. `(1, a)` is `(1, a)` (is `[1, 'a']`).
+* `{key1: val1, key2: val2, ...}` is an Object, and the casting procedure is recursively applied to each property. Eg. `{a: 1, b: 2}` is `{a: 1, b: 2}`.
+* Any test which does not fall under the above, and which does not contain special characters (`[``]``(``)``{``}``:``,`) is a string, eg. `$12- blah` is `"$12- blah"`.
+
+If you do provide type information, you can make your input more concise as the program already has some information about what it expects. Please see the [type format](https://github.com/gkz/type-check#type-format) section of [type-check](https://github.com/gkz/type-check) for more information about how to specify types. There are some rules about what levn can do with the information:
+
+* If a String is expected, and only a String, all characters of the input (including any special ones) will become part of the output. Eg. `[({})]` is `"[({})]"`, and `"hi"` is `'"hi"'`.
+* If a Date is expected, the surrounding `#` can be omitted from date literals. Eg. `2011-11-11` is `new Date('2011-11-11')`.
+* If a RegExp is expected, no flags need to be specified, and the regex is not using any of the special characters,the opening and closing `/` can be omitted - this will have the affect of setting the source of the regex to the input. Eg. `regex` is `/regex/`.
+* If an Array is expected, and it is the root node (at the top level), the opening `[` and closing `]` can be omitted. Eg. `1,2,3` is `[1,2,3]`.
+* If a tuple is expected, and it is the root node (at the top level), the opening `(` and closing `)` can be omitted. Eg. `1, a` is `(1, a)` (is `[1, 'a']`).
+* If an Object is expected, and it is the root node (at the top level), the opening `{` and closing `}` can be omitted. Eg `a: 1, b: 2` is `{a: 1, b: 2}`.
+
+If you list multiple types (eg. `Number | String`), it will first attempt to cast to the first type and then validate - if the validation fails it will move on to the next type and so forth, left to right. You must be careful as some types will succeed with any input, such as String. Thus put String at the end of your list. In non-explicit mode, Date and RegExp will succeed with a large variety of input - also be careful with these and list them near the end if not last in your list.
+
+Whitespace between special characters and elements is inconsequential.
+
+## Options
+
+Options is an object. It is an optional parameter to the `parse` and `parsedTypeParse` functions.
+
+### Explicit
+
+A `Boolean`. By default it is `false`.
+
+__Example:__
+
+```js
+parse('RegExp', 're', {explicit: false}); // /re/
+parse('RegExp', 're', {explicit: true}); // Error: ... does not type check...
+parse('RegExp | String', 're', {explicit: true}); // 're'
+```
+
+`explicit` sets whether to be in explicit mode or not. Using `*` automatically activates explicit mode. For more information, read the [levn format](#levn-format) section.
+
+### customTypes
+
+An `Object`. Empty `{}` by default.
+
+__Example:__
+
+```js
+var options = {
+ customTypes: {
+ Even: {
+ typeOf: 'Number',
+ validate: function (x) {
+ return x % 2 === 0;
+ },
+ cast: function (x) {
+ return {type: 'Just', value: parseInt(x)};
+ }
+ }
+ }
+}
+parse('Even', '2', options); // 2
+parse('Even', '3', options); // Error: Value: "3" does not type check...
+```
+
+__Another Example:__
+```js
+function Person(name, age){
+ this.name = name;
+ this.age = age;
+}
+var options = {
+ customTypes: {
+ Person: {
+ typeOf: 'Object',
+ validate: function (x) {
+ x instanceof Person;
+ },
+ cast: function (value, options, typesCast) {
+ var name, age;
+ if ({}.toString.call(value).slice(8, -1) !== 'Object') {
+ return {type: 'Nothing'};
+ }
+ name = typesCast(value.name, [{type: 'String'}], options);
+ age = typesCast(value.age, [{type: 'Numger'}], options);
+ return {type: 'Just', value: new Person(name, age)};
+ }
+ }
+}
+parse('Person', '{name: Laura, age: 25}', options); // Person {name: 'Laura', age: 25}
+```
+
+`customTypes` is an object whose keys are the name of the types, and whose values are an object with three properties, `typeOf`, `validate`, and `cast`. For more information about `typeOf` and `validate`, please see the [custom types](https://github.com/gkz/type-check#custom-types) section of type-check.
+
+`cast` is a function which receives three arguments, the value under question, options, and the typesCast function. In `cast`, attempt to cast the value into the specified type. If you are successful, return an object in the format `{type: 'Just', value: CAST-VALUE}`, if you know it won't work, return `{type: 'Nothing'}`. You can use the `typesCast` function to cast any child values. Remember to pass `options` to it. In your function you can also check for `options.explicit` and act accordingly.
+
+## Technical About
+
+`levn` is written in [LiveScript](http://livescript.net/) - a language that compiles to JavaScript. It uses [type-check](https://github.com/gkz/type-check) to both parse types and validate values. It also uses the [prelude.ls](http://preludels.com/) library.
diff --git a/tools/node_modules/eslint/node_modules/levn/lib/cast.js b/tools/node_modules/eslint/node_modules/levn/lib/cast.js
new file mode 100644
index 0000000000..411e29d400
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/levn/lib/cast.js
@@ -0,0 +1,298 @@
+// Generated by LiveScript 1.4.0
+(function(){
+ var parsedTypeCheck, types, toString$ = {}.toString;
+ parsedTypeCheck = require('type-check').parsedTypeCheck;
+ types = {
+ '*': function(value, options){
+ switch (toString$.call(value).slice(8, -1)) {
+ case 'Array':
+ return typeCast(value, {
+ type: 'Array'
+ }, options);
+ case 'Object':
+ return typeCast(value, {
+ type: 'Object'
+ }, options);
+ default:
+ return {
+ type: 'Just',
+ value: typesCast(value, [
+ {
+ type: 'Undefined'
+ }, {
+ type: 'Null'
+ }, {
+ type: 'NaN'
+ }, {
+ type: 'Boolean'
+ }, {
+ type: 'Number'
+ }, {
+ type: 'Date'
+ }, {
+ type: 'RegExp'
+ }, {
+ type: 'Array'
+ }, {
+ type: 'Object'
+ }, {
+ type: 'String'
+ }
+ ], (options.explicit = true, options))
+ };
+ }
+ },
+ Undefined: function(it){
+ if (it === 'undefined' || it === void 8) {
+ return {
+ type: 'Just',
+ value: void 8
+ };
+ } else {
+ return {
+ type: 'Nothing'
+ };
+ }
+ },
+ Null: function(it){
+ if (it === 'null') {
+ return {
+ type: 'Just',
+ value: null
+ };
+ } else {
+ return {
+ type: 'Nothing'
+ };
+ }
+ },
+ NaN: function(it){
+ if (it === 'NaN') {
+ return {
+ type: 'Just',
+ value: NaN
+ };
+ } else {
+ return {
+ type: 'Nothing'
+ };
+ }
+ },
+ Boolean: function(it){
+ if (it === 'true') {
+ return {
+ type: 'Just',
+ value: true
+ };
+ } else if (it === 'false') {
+ return {
+ type: 'Just',
+ value: false
+ };
+ } else {
+ return {
+ type: 'Nothing'
+ };
+ }
+ },
+ Number: function(it){
+ return {
+ type: 'Just',
+ value: +it
+ };
+ },
+ Int: function(it){
+ return {
+ type: 'Just',
+ value: +it
+ };
+ },
+ Float: function(it){
+ return {
+ type: 'Just',
+ value: +it
+ };
+ },
+ Date: function(value, options){
+ var that;
+ if (that = /^\#([\s\S]*)\#$/.exec(value)) {
+ return {
+ type: 'Just',
+ value: new Date(+that[1] || that[1])
+ };
+ } else if (options.explicit) {
+ return {
+ type: 'Nothing'
+ };
+ } else {
+ return {
+ type: 'Just',
+ value: new Date(+value || value)
+ };
+ }
+ },
+ RegExp: function(value, options){
+ var that;
+ if (that = /^\/([\s\S]*)\/([gimy]*)$/.exec(value)) {
+ return {
+ type: 'Just',
+ value: new RegExp(that[1], that[2])
+ };
+ } else if (options.explicit) {
+ return {
+ type: 'Nothing'
+ };
+ } else {
+ return {
+ type: 'Just',
+ value: new RegExp(value)
+ };
+ }
+ },
+ Array: function(value, options){
+ return castArray(value, {
+ of: [{
+ type: '*'
+ }]
+ }, options);
+ },
+ Object: function(value, options){
+ return castFields(value, {
+ of: {}
+ }, options);
+ },
+ String: function(it){
+ var that;
+ if (toString$.call(it).slice(8, -1) !== 'String') {
+ return {
+ type: 'Nothing'
+ };
+ }
+ if (that = it.match(/^'([\s\S]*)'$/)) {
+ return {
+ type: 'Just',
+ value: that[1].replace(/\\'/g, "'")
+ };
+ } else if (that = it.match(/^"([\s\S]*)"$/)) {
+ return {
+ type: 'Just',
+ value: that[1].replace(/\\"/g, '"')
+ };
+ } else {
+ return {
+ type: 'Just',
+ value: it
+ };
+ }
+ }
+ };
+ function castArray(node, type, options){
+ var typeOf, element;
+ if (toString$.call(node).slice(8, -1) !== 'Array') {
+ return {
+ type: 'Nothing'
+ };
+ }
+ typeOf = type.of;
+ return {
+ type: 'Just',
+ value: (function(){
+ var i$, ref$, len$, results$ = [];
+ for (i$ = 0, len$ = (ref$ = node).length; i$ < len$; ++i$) {
+ element = ref$[i$];
+ results$.push(typesCast(element, typeOf, options));
+ }
+ return results$;
+ }())
+ };
+ }
+ function castTuple(node, type, options){
+ var result, i, i$, ref$, len$, types, cast;
+ if (toString$.call(node).slice(8, -1) !== 'Array') {
+ return {
+ type: 'Nothing'
+ };
+ }
+ result = [];
+ i = 0;
+ for (i$ = 0, len$ = (ref$ = type.of).length; i$ < len$; ++i$) {
+ types = ref$[i$];
+ cast = typesCast(node[i], types, options);
+ if (toString$.call(cast).slice(8, -1) !== 'Undefined') {
+ result.push(cast);
+ }
+ i++;
+ }
+ if (node.length <= i) {
+ return {
+ type: 'Just',
+ value: result
+ };
+ } else {
+ return {
+ type: 'Nothing'
+ };
+ }
+ }
+ function castFields(node, type, options){
+ var typeOf, key, value;
+ if (toString$.call(node).slice(8, -1) !== 'Object') {
+ return {
+ type: 'Nothing'
+ };
+ }
+ typeOf = type.of;
+ return {
+ type: 'Just',
+ value: (function(){
+ var ref$, resultObj$ = {};
+ for (key in ref$ = node) {
+ value = ref$[key];
+ resultObj$[typesCast(key, [{
+ type: 'String'
+ }], options)] = typesCast(value, typeOf[key] || [{
+ type: '*'
+ }], options);
+ }
+ return resultObj$;
+ }())
+ };
+ }
+ function typeCast(node, typeObj, options){
+ var type, structure, castFunc, ref$;
+ type = typeObj.type, structure = typeObj.structure;
+ if (type) {
+ castFunc = ((ref$ = options.customTypes[type]) != null ? ref$.cast : void 8) || types[type];
+ if (!castFunc) {
+ throw new Error("Type not defined: " + type + ".");
+ }
+ return castFunc(node, options, typesCast);
+ } else {
+ switch (structure) {
+ case 'array':
+ return castArray(node, typeObj, options);
+ case 'tuple':
+ return castTuple(node, typeObj, options);
+ case 'fields':
+ return castFields(node, typeObj, options);
+ }
+ }
+ }
+ function typesCast(node, types, options){
+ var i$, len$, type, ref$, valueType, value;
+ for (i$ = 0, len$ = types.length; i$ < len$; ++i$) {
+ type = types[i$];
+ ref$ = typeCast(node, type, options), valueType = ref$.type, value = ref$.value;
+ if (valueType === 'Nothing') {
+ continue;
+ }
+ if (parsedTypeCheck([type], value, {
+ customTypes: options.customTypes
+ })) {
+ return value;
+ }
+ }
+ throw new Error("Value " + JSON.stringify(node) + " does not type check against " + JSON.stringify(types) + ".");
+ }
+ module.exports = typesCast;
+}).call(this);
diff --git a/tools/node_modules/eslint/node_modules/levn/lib/coerce.js b/tools/node_modules/eslint/node_modules/levn/lib/coerce.js
new file mode 100644
index 0000000000..027b6da022
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/levn/lib/coerce.js
@@ -0,0 +1,285 @@
+// Generated by LiveScript 1.2.0
+(function(){
+ var parsedTypeCheck, types, toString$ = {}.toString;
+ parsedTypeCheck = require('type-check').parsedTypeCheck;
+ types = {
+ '*': function(it){
+ switch (toString$.call(it).slice(8, -1)) {
+ case 'Array':
+ return coerceType(it, {
+ type: 'Array'
+ });
+ case 'Object':
+ return coerceType(it, {
+ type: 'Object'
+ });
+ default:
+ return {
+ type: 'Just',
+ value: coerceTypes(it, [
+ {
+ type: 'Undefined'
+ }, {
+ type: 'Null'
+ }, {
+ type: 'NaN'
+ }, {
+ type: 'Boolean'
+ }, {
+ type: 'Number'
+ }, {
+ type: 'Date'
+ }, {
+ type: 'RegExp'
+ }, {
+ type: 'Array'
+ }, {
+ type: 'Object'
+ }, {
+ type: 'String'
+ }
+ ], {
+ explicit: true
+ })
+ };
+ }
+ },
+ Undefined: function(it){
+ if (it === 'undefined' || it === void 8) {
+ return {
+ type: 'Just',
+ value: void 8
+ };
+ } else {
+ return {
+ type: 'Nothing'
+ };
+ }
+ },
+ Null: function(it){
+ if (it === 'null') {
+ return {
+ type: 'Just',
+ value: null
+ };
+ } else {
+ return {
+ type: 'Nothing'
+ };
+ }
+ },
+ NaN: function(it){
+ if (it === 'NaN') {
+ return {
+ type: 'Just',
+ value: NaN
+ };
+ } else {
+ return {
+ type: 'Nothing'
+ };
+ }
+ },
+ Boolean: function(it){
+ if (it === 'true') {
+ return {
+ type: 'Just',
+ value: true
+ };
+ } else if (it === 'false') {
+ return {
+ type: 'Just',
+ value: false
+ };
+ } else {
+ return {
+ type: 'Nothing'
+ };
+ }
+ },
+ Number: function(it){
+ return {
+ type: 'Just',
+ value: +it
+ };
+ },
+ Int: function(it){
+ return {
+ type: 'Just',
+ value: parseInt(it)
+ };
+ },
+ Float: function(it){
+ return {
+ type: 'Just',
+ value: parseFloat(it)
+ };
+ },
+ Date: function(value, options){
+ var that;
+ if (that = /^\#(.*)\#$/.exec(value)) {
+ return {
+ type: 'Just',
+ value: new Date(+that[1] || that[1])
+ };
+ } else if (options.explicit) {
+ return {
+ type: 'Nothing'
+ };
+ } else {
+ return {
+ type: 'Just',
+ value: new Date(+value || value)
+ };
+ }
+ },
+ RegExp: function(value, options){
+ var that;
+ if (that = /^\/(.*)\/([gimy]*)$/.exec(value)) {
+ return {
+ type: 'Just',
+ value: new RegExp(that[1], that[2])
+ };
+ } else if (options.explicit) {
+ return {
+ type: 'Nothing'
+ };
+ } else {
+ return {
+ type: 'Just',
+ value: new RegExp(value)
+ };
+ }
+ },
+ Array: function(it){
+ return coerceArray(it, {
+ of: [{
+ type: '*'
+ }]
+ });
+ },
+ Object: function(it){
+ return coerceFields(it, {
+ of: {}
+ });
+ },
+ String: function(it){
+ var that;
+ if (toString$.call(it).slice(8, -1) !== 'String') {
+ return {
+ type: 'Nothing'
+ };
+ }
+ if (that = it.match(/^'(.*)'$/)) {
+ return {
+ type: 'Just',
+ value: that[1]
+ };
+ } else if (that = it.match(/^"(.*)"$/)) {
+ return {
+ type: 'Just',
+ value: that[1]
+ };
+ } else {
+ return {
+ type: 'Just',
+ value: it
+ };
+ }
+ }
+ };
+ function coerceArray(node, type){
+ var typeOf, element;
+ if (toString$.call(node).slice(8, -1) !== 'Array') {
+ return {
+ type: 'Nothing'
+ };
+ }
+ typeOf = type.of;
+ return {
+ type: 'Just',
+ value: (function(){
+ var i$, ref$, len$, results$ = [];
+ for (i$ = 0, len$ = (ref$ = node).length; i$ < len$; ++i$) {
+ element = ref$[i$];
+ results$.push(coerceTypes(element, typeOf));
+ }
+ return results$;
+ }())
+ };
+ }
+ function coerceTuple(node, type){
+ var result, i$, ref$, len$, i, types, that;
+ if (toString$.call(node).slice(8, -1) !== 'Array') {
+ return {
+ type: 'Nothing'
+ };
+ }
+ result = [];
+ for (i$ = 0, len$ = (ref$ = type.of).length; i$ < len$; ++i$) {
+ i = i$;
+ types = ref$[i$];
+ if (that = coerceTypes(node[i], types)) {
+ result.push(that);
+ }
+ }
+ return {
+ type: 'Just',
+ value: result
+ };
+ }
+ function coerceFields(node, type){
+ var typeOf, key, value;
+ if (toString$.call(node).slice(8, -1) !== 'Object') {
+ return {
+ type: 'Nothing'
+ };
+ }
+ typeOf = type.of;
+ return {
+ type: 'Just',
+ value: (function(){
+ var ref$, results$ = {};
+ for (key in ref$ = node) {
+ value = ref$[key];
+ results$[key] = coerceTypes(value, typeOf[key] || [{
+ type: '*'
+ }]);
+ }
+ return results$;
+ }())
+ };
+ }
+ function coerceType(node, typeObj, options){
+ var type, structure, coerceFunc;
+ type = typeObj.type, structure = typeObj.structure;
+ if (type) {
+ coerceFunc = types[type];
+ return coerceFunc(node, options);
+ } else {
+ switch (structure) {
+ case 'array':
+ return coerceArray(node, typeObj);
+ case 'tuple':
+ return coerceTuple(node, typeObj);
+ case 'fields':
+ return coerceFields(node, typeObj);
+ }
+ }
+ }
+ function coerceTypes(node, types, options){
+ var i$, len$, type, ref$, valueType, value;
+ for (i$ = 0, len$ = types.length; i$ < len$; ++i$) {
+ type = types[i$];
+ ref$ = coerceType(node, type, options), valueType = ref$.type, value = ref$.value;
+ if (valueType === 'Nothing') {
+ continue;
+ }
+ if (parsedTypeCheck([type], value)) {
+ return value;
+ }
+ }
+ throw new Error("Value " + JSON.stringify(node) + " does not type check against " + JSON.stringify(types) + ".");
+ }
+ module.exports = coerceTypes;
+}).call(this);
diff --git a/tools/node_modules/eslint/node_modules/levn/lib/index.js b/tools/node_modules/eslint/node_modules/levn/lib/index.js
new file mode 100644
index 0000000000..4adae30c80
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/levn/lib/index.js
@@ -0,0 +1,22 @@
+// Generated by LiveScript 1.4.0
+(function(){
+ var parseString, cast, parseType, VERSION, parsedTypeParse, parse;
+ parseString = require('./parse-string');
+ cast = require('./cast');
+ parseType = require('type-check').parseType;
+ VERSION = '0.3.0';
+ parsedTypeParse = function(parsedType, string, options){
+ options == null && (options = {});
+ options.explicit == null && (options.explicit = false);
+ options.customTypes == null && (options.customTypes = {});
+ return cast(parseString(parsedType, string, options), parsedType, options);
+ };
+ parse = function(type, string, options){
+ return parsedTypeParse(parseType(type), string, options);
+ };
+ module.exports = {
+ VERSION: VERSION,
+ parse: parse,
+ parsedTypeParse: parsedTypeParse
+ };
+}).call(this);
diff --git a/tools/node_modules/eslint/node_modules/levn/lib/parse-string.js b/tools/node_modules/eslint/node_modules/levn/lib/parse-string.js
new file mode 100644
index 0000000000..d573975fc2
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/levn/lib/parse-string.js
@@ -0,0 +1,113 @@
+// Generated by LiveScript 1.4.0
+(function(){
+ var reject, special, tokenRegex;
+ reject = require('prelude-ls').reject;
+ function consumeOp(tokens, op){
+ if (tokens[0] === op) {
+ return tokens.shift();
+ } else {
+ throw new Error("Expected '" + op + "', but got '" + tokens[0] + "' instead in " + JSON.stringify(tokens) + ".");
+ }
+ }
+ function maybeConsumeOp(tokens, op){
+ if (tokens[0] === op) {
+ return tokens.shift();
+ }
+ }
+ function consumeList(tokens, arg$, hasDelimiters){
+ var open, close, result, untilTest;
+ open = arg$[0], close = arg$[1];
+ if (hasDelimiters) {
+ consumeOp(tokens, open);
+ }
+ result = [];
+ untilTest = "," + (hasDelimiters ? close : '');
+ while (tokens.length && (hasDelimiters && tokens[0] !== close)) {
+ result.push(consumeElement(tokens, untilTest));
+ maybeConsumeOp(tokens, ',');
+ }
+ if (hasDelimiters) {
+ consumeOp(tokens, close);
+ }
+ return result;
+ }
+ function consumeArray(tokens, hasDelimiters){
+ return consumeList(tokens, ['[', ']'], hasDelimiters);
+ }
+ function consumeTuple(tokens, hasDelimiters){
+ return consumeList(tokens, ['(', ')'], hasDelimiters);
+ }
+ function consumeFields(tokens, hasDelimiters){
+ var result, untilTest, key;
+ if (hasDelimiters) {
+ consumeOp(tokens, '{');
+ }
+ result = {};
+ untilTest = "," + (hasDelimiters ? '}' : '');
+ while (tokens.length && (!hasDelimiters || tokens[0] !== '}')) {
+ key = consumeValue(tokens, ':');
+ consumeOp(tokens, ':');
+ result[key] = consumeElement(tokens, untilTest);
+ maybeConsumeOp(tokens, ',');
+ }
+ if (hasDelimiters) {
+ consumeOp(tokens, '}');
+ }
+ return result;
+ }
+ function consumeValue(tokens, untilTest){
+ var out;
+ untilTest == null && (untilTest = '');
+ out = '';
+ while (tokens.length && -1 === untilTest.indexOf(tokens[0])) {
+ out += tokens.shift();
+ }
+ return out;
+ }
+ function consumeElement(tokens, untilTest){
+ switch (tokens[0]) {
+ case '[':
+ return consumeArray(tokens, true);
+ case '(':
+ return consumeTuple(tokens, true);
+ case '{':
+ return consumeFields(tokens, true);
+ default:
+ return consumeValue(tokens, untilTest);
+ }
+ }
+ function consumeTopLevel(tokens, types, options){
+ var ref$, type, structure, origTokens, result, finalResult, x$, y$;
+ ref$ = types[0], type = ref$.type, structure = ref$.structure;
+ origTokens = tokens.concat();
+ if (!options.explicit && types.length === 1 && ((!type && structure) || (type === 'Array' || type === 'Object'))) {
+ result = structure === 'array' || type === 'Array'
+ ? consumeArray(tokens, tokens[0] === '[')
+ : structure === 'tuple'
+ ? consumeTuple(tokens, tokens[0] === '(')
+ : consumeFields(tokens, tokens[0] === '{');
+ finalResult = tokens.length ? consumeElement(structure === 'array' || type === 'Array'
+ ? (x$ = origTokens, x$.unshift('['), x$.push(']'), x$)
+ : (y$ = origTokens, y$.unshift('('), y$.push(')'), y$)) : result;
+ } else {
+ finalResult = consumeElement(tokens);
+ }
+ return finalResult;
+ }
+ special = /\[\]\(\)}{:,/.source;
+ tokenRegex = RegExp('("(?:\\\\"|[^"])*")|(\'(?:\\\\\'|[^\'])*\')|(/(?:\\\\/|[^/])*/[a-zA-Z]*)|(#.*#)|([' + special + '])|([^\\s' + special + '](?:\\s*[^\\s' + special + ']+)*)|\\s*');
+ module.exports = function(types, string, options){
+ var tokens, node;
+ options == null && (options = {});
+ if (!options.explicit && types.length === 1 && types[0].type === 'String') {
+ return "'" + string.replace(/\\'/g, "\\\\'") + "'";
+ }
+ tokens = reject(not$, string.split(tokenRegex));
+ node = consumeTopLevel(tokens, types, options);
+ if (!node) {
+ throw new Error("Error parsing '" + string + "'.");
+ }
+ return node;
+ };
+ function not$(x){ return !x; }
+}).call(this);
diff --git a/tools/node_modules/eslint/node_modules/levn/lib/parse.js b/tools/node_modules/eslint/node_modules/levn/lib/parse.js
new file mode 100644
index 0000000000..2beff0f479
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/levn/lib/parse.js
@@ -0,0 +1,102 @@
+// Generated by LiveScript 1.2.0
+(function(){
+ var reject, special, tokenRegex;
+ reject = require('prelude-ls').reject;
+ function consumeOp(tokens, op){
+ if (tokens[0] === op) {
+ return tokens.shift();
+ } else {
+ throw new Error("Expected '" + op + "', but got '" + tokens[0] + "' instead in " + JSON.stringify(tokens) + ".");
+ }
+ }
+ function maybeConsumeOp(tokens, op){
+ if (tokens[0] === op) {
+ return tokens.shift();
+ }
+ }
+ function consumeList(tokens, delimiters, hasDelimiters){
+ var result;
+ if (hasDelimiters) {
+ consumeOp(tokens, delimiters[0]);
+ }
+ result = [];
+ while (tokens.length && tokens[0] !== delimiters[1]) {
+ result.push(consumeElement(tokens));
+ maybeConsumeOp(tokens, ',');
+ }
+ if (hasDelimiters) {
+ consumeOp(tokens, delimiters[1]);
+ }
+ return result;
+ }
+ function consumeArray(tokens, hasDelimiters){
+ return consumeList(tokens, ['[', ']'], hasDelimiters);
+ }
+ function consumeTuple(tokens, hasDelimiters){
+ return consumeList(tokens, ['(', ')'], hasDelimiters);
+ }
+ function consumeFields(tokens, hasDelimiters){
+ var result, key;
+ if (hasDelimiters) {
+ consumeOp(tokens, '{');
+ }
+ result = {};
+ while (tokens.length && (!hasDelimiters || tokens[0] !== '}')) {
+ key = tokens.shift();
+ consumeOp(tokens, ':');
+ result[key] = consumeElement(tokens);
+ maybeConsumeOp(tokens, ',');
+ }
+ if (hasDelimiters) {
+ consumeOp(tokens, '}');
+ }
+ return result;
+ }
+ function consumeElement(tokens){
+ switch (tokens[0]) {
+ case '[':
+ return consumeArray(tokens, true);
+ case '(':
+ return consumeTuple(tokens, true);
+ case '{':
+ return consumeFields(tokens, true);
+ default:
+ return tokens.shift();
+ }
+ }
+ function consumeTopLevel(tokens, types){
+ var ref$, type, structure, origTokens, result, finalResult, x$, y$;
+ ref$ = types[0], type = ref$.type, structure = ref$.structure;
+ origTokens = tokens.concat();
+ if (types.length === 1 && (structure || (type === 'Array' || type === 'Object'))) {
+ result = structure === 'array' || type === 'Array'
+ ? consumeArray(tokens, tokens[0] === '[')
+ : structure === 'tuple'
+ ? consumeTuple(tokens, tokens[0] === '(')
+ : consumeFields(tokens, tokens[0] === '{');
+ finalResult = tokens.length ? consumeElement(structure === 'array' || type === 'Array'
+ ? (x$ = origTokens, x$.unshift('['), x$.push(']'), x$)
+ : (y$ = origTokens, y$.unshift('('), y$.push(')'), y$)) : result;
+ } else {
+ finalResult = consumeElement(tokens);
+ }
+ if (tokens.length && origTokens.length) {
+ throw new Error("Unable to parse " + JSON.stringify(origTokens) + " of type " + JSON.stringify(types) + ".");
+ } else {
+ return finalResult;
+ }
+ }
+ special = /\[\]\(\)}{:,/.source;
+ tokenRegex = RegExp('("(?:[^"]|\\\\")*")|(\'(?:[^\']|\\\\\')*\')|(#.*#)|(/(?:\\\\/|[^/])*/[gimy]*)|([' + special + '])|([^\\s' + special + ']+)|\\s*');
+ module.exports = function(string, types){
+ var tokens, node;
+ tokens = reject(function(it){
+ return !it || /^\s+$/.test(it);
+ }, string.split(tokenRegex));
+ node = consumeTopLevel(tokens, types);
+ if (!node) {
+ throw new Error("Error parsing '" + string + "'.");
+ }
+ return node;
+ };
+}).call(this);
diff --git a/tools/node_modules/eslint/node_modules/levn/package.json b/tools/node_modules/eslint/node_modules/levn/package.json
new file mode 100644
index 0000000000..8a4b7ad1f4
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/levn/package.json
@@ -0,0 +1,78 @@
+{
+ "_from": "levn@^0.3.0",
+ "_id": "levn@0.3.0",
+ "_inBundle": false,
+ "_integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=",
+ "_location": "/eslint/levn",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "levn@^0.3.0",
+ "name": "levn",
+ "escapedName": "levn",
+ "rawSpec": "^0.3.0",
+ "saveSpec": null,
+ "fetchSpec": "^0.3.0"
+ },
+ "_requiredBy": [
+ "/eslint",
+ "/eslint/optionator"
+ ],
+ "_resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
+ "_shasum": "3b09924edf9f083c0490fdd4c0bc4421e04764ee",
+ "_spec": "levn@^0.3.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint",
+ "author": {
+ "name": "George Zahariev",
+ "email": "z@georgezahariev.com"
+ },
+ "bugs": {
+ "url": "https://github.com/gkz/levn/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "prelude-ls": "~1.1.2",
+ "type-check": "~0.3.2"
+ },
+ "deprecated": false,
+ "description": "Light ECMAScript (JavaScript) Value Notation - human written, concise, typed, flexible",
+ "devDependencies": {
+ "istanbul": "~0.4.1",
+ "livescript": "~1.4.0",
+ "mocha": "~2.3.4"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ },
+ "files": [
+ "lib",
+ "README.md",
+ "LICENSE"
+ ],
+ "homepage": "https://github.com/gkz/levn",
+ "keywords": [
+ "levn",
+ "light",
+ "ecmascript",
+ "value",
+ "notation",
+ "json",
+ "typed",
+ "human",
+ "concise",
+ "typed",
+ "flexible"
+ ],
+ "license": "MIT",
+ "main": "./lib/",
+ "name": "levn",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/gkz/levn.git"
+ },
+ "scripts": {
+ "test": "make test"
+ },
+ "version": "0.3.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/lodash/LICENSE b/tools/node_modules/eslint/node_modules/lodash/LICENSE
new file mode 100644
index 0000000000..c6f2f6145e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/LICENSE
@@ -0,0 +1,47 @@
+Copyright JS Foundation and other contributors <https://js.foundation/>
+
+Based on Underscore.js, copyright Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
+
+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/tools/node_modules/eslint/node_modules/lodash/README.md b/tools/node_modules/eslint/node_modules/lodash/README.md
new file mode 100644
index 0000000000..acdd128cd7
--- /dev/null
+++ b/tools/node_modules/eslint/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:**<br>
+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.<br>
+Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available.
diff --git a/tools/node_modules/eslint/node_modules/lodash/_DataView.js b/tools/node_modules/eslint/node_modules/lodash/_DataView.js
new file mode 100644
index 0000000000..ac2d57ca67
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_Hash.js b/tools/node_modules/eslint/node_modules/lodash/_Hash.js
new file mode 100644
index 0000000000..b504fe3407
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_LazyWrapper.js b/tools/node_modules/eslint/node_modules/lodash/_LazyWrapper.js
new file mode 100644
index 0000000000..81786c7f1e
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_ListCache.js b/tools/node_modules/eslint/node_modules/lodash/_ListCache.js
new file mode 100644
index 0000000000..26895c3a8d
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_LodashWrapper.js b/tools/node_modules/eslint/node_modules/lodash/_LodashWrapper.js
new file mode 100644
index 0000000000..c1e4d9df76
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_Map.js b/tools/node_modules/eslint/node_modules/lodash/_Map.js
new file mode 100644
index 0000000000..b73f29a0f9
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_MapCache.js b/tools/node_modules/eslint/node_modules/lodash/_MapCache.js
new file mode 100644
index 0000000000..4a4eea7bf9
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_Promise.js b/tools/node_modules/eslint/node_modules/lodash/_Promise.js
new file mode 100644
index 0000000000..247b9e1bac
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_Set.js b/tools/node_modules/eslint/node_modules/lodash/_Set.js
new file mode 100644
index 0000000000..b3c8dcbf03
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_SetCache.js b/tools/node_modules/eslint/node_modules/lodash/_SetCache.js
new file mode 100644
index 0000000000..6468b0647f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_Stack.js b/tools/node_modules/eslint/node_modules/lodash/_Stack.js
new file mode 100644
index 0000000000..80b2cf1b0c
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_Symbol.js b/tools/node_modules/eslint/node_modules/lodash/_Symbol.js
new file mode 100644
index 0000000000..a013f7c5b7
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_Uint8Array.js b/tools/node_modules/eslint/node_modules/lodash/_Uint8Array.js
new file mode 100644
index 0000000000..2fb30e1573
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_WeakMap.js b/tools/node_modules/eslint/node_modules/lodash/_WeakMap.js
new file mode 100644
index 0000000000..567f86c61e
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_addMapEntry.js b/tools/node_modules/eslint/node_modules/lodash/_addMapEntry.js
new file mode 100644
index 0000000000..5a69212160
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_addSetEntry.js b/tools/node_modules/eslint/node_modules/lodash/_addSetEntry.js
new file mode 100644
index 0000000000..1a07b708ac
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_apply.js b/tools/node_modules/eslint/node_modules/lodash/_apply.js
new file mode 100644
index 0000000000..36436dda50
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_arrayAggregator.js b/tools/node_modules/eslint/node_modules/lodash/_arrayAggregator.js
new file mode 100644
index 0000000000..d96c3ca47c
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_arrayEach.js b/tools/node_modules/eslint/node_modules/lodash/_arrayEach.js
new file mode 100644
index 0000000000..2c5f579688
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_arrayEachRight.js b/tools/node_modules/eslint/node_modules/lodash/_arrayEachRight.js
new file mode 100644
index 0000000000..976ca5c29b
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_arrayEvery.js b/tools/node_modules/eslint/node_modules/lodash/_arrayEvery.js
new file mode 100644
index 0000000000..e26a918450
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_arrayFilter.js b/tools/node_modules/eslint/node_modules/lodash/_arrayFilter.js
new file mode 100644
index 0000000000..75ea254459
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_arrayIncludes.js b/tools/node_modules/eslint/node_modules/lodash/_arrayIncludes.js
new file mode 100644
index 0000000000..3737a6d9eb
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_arrayIncludesWith.js b/tools/node_modules/eslint/node_modules/lodash/_arrayIncludesWith.js
new file mode 100644
index 0000000000..235fd97580
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_arrayLikeKeys.js b/tools/node_modules/eslint/node_modules/lodash/_arrayLikeKeys.js
new file mode 100644
index 0000000000..b2ec9ce786
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_arrayMap.js b/tools/node_modules/eslint/node_modules/lodash/_arrayMap.js
new file mode 100644
index 0000000000..22b22464e2
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_arrayPush.js b/tools/node_modules/eslint/node_modules/lodash/_arrayPush.js
new file mode 100644
index 0000000000..7d742b383e
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_arrayReduce.js b/tools/node_modules/eslint/node_modules/lodash/_arrayReduce.js
new file mode 100644
index 0000000000..de8b79b287
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_arrayReduceRight.js b/tools/node_modules/eslint/node_modules/lodash/_arrayReduceRight.js
new file mode 100644
index 0000000000..22d8976deb
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_arraySample.js b/tools/node_modules/eslint/node_modules/lodash/_arraySample.js
new file mode 100644
index 0000000000..fcab0105e8
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_arraySampleSize.js b/tools/node_modules/eslint/node_modules/lodash/_arraySampleSize.js
new file mode 100644
index 0000000000..8c7e364f51
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_arrayShuffle.js b/tools/node_modules/eslint/node_modules/lodash/_arrayShuffle.js
new file mode 100644
index 0000000000..46313a39b7
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_arraySome.js b/tools/node_modules/eslint/node_modules/lodash/_arraySome.js
new file mode 100644
index 0000000000..6fd02fd4ae
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_asciiSize.js b/tools/node_modules/eslint/node_modules/lodash/_asciiSize.js
new file mode 100644
index 0000000000..11d29c33ad
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_asciiToArray.js b/tools/node_modules/eslint/node_modules/lodash/_asciiToArray.js
new file mode 100644
index 0000000000..8e3dd5b47f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_asciiWords.js b/tools/node_modules/eslint/node_modules/lodash/_asciiWords.js
new file mode 100644
index 0000000000..d765f0f763
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_assignMergeValue.js b/tools/node_modules/eslint/node_modules/lodash/_assignMergeValue.js
new file mode 100644
index 0000000000..cb1185e992
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_assignValue.js b/tools/node_modules/eslint/node_modules/lodash/_assignValue.js
new file mode 100644
index 0000000000..40839575b5
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_assocIndexOf.js b/tools/node_modules/eslint/node_modules/lodash/_assocIndexOf.js
new file mode 100644
index 0000000000..5b77a2bdd3
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseAggregator.js b/tools/node_modules/eslint/node_modules/lodash/_baseAggregator.js
new file mode 100644
index 0000000000..4bc9e91f41
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseAssign.js b/tools/node_modules/eslint/node_modules/lodash/_baseAssign.js
new file mode 100644
index 0000000000..e5c4a1a5b0
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseAssignIn.js b/tools/node_modules/eslint/node_modules/lodash/_baseAssignIn.js
new file mode 100644
index 0000000000..6624f90067
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseAssignValue.js b/tools/node_modules/eslint/node_modules/lodash/_baseAssignValue.js
new file mode 100644
index 0000000000..d6f66ef3a5
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseAt.js b/tools/node_modules/eslint/node_modules/lodash/_baseAt.js
new file mode 100644
index 0000000000..90e4237a06
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseClamp.js b/tools/node_modules/eslint/node_modules/lodash/_baseClamp.js
new file mode 100644
index 0000000000..a1c5692927
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseClone.js b/tools/node_modules/eslint/node_modules/lodash/_baseClone.js
new file mode 100644
index 0000000000..7c27a37d32
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseConforms.js b/tools/node_modules/eslint/node_modules/lodash/_baseConforms.js
new file mode 100644
index 0000000000..947e20d409
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseConformsTo.js b/tools/node_modules/eslint/node_modules/lodash/_baseConformsTo.js
new file mode 100644
index 0000000000..e449cb84bd
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseCreate.js b/tools/node_modules/eslint/node_modules/lodash/_baseCreate.js
new file mode 100644
index 0000000000..ffa6a52acd
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseDelay.js b/tools/node_modules/eslint/node_modules/lodash/_baseDelay.js
new file mode 100644
index 0000000000..1486d697e3
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseDifference.js b/tools/node_modules/eslint/node_modules/lodash/_baseDifference.js
new file mode 100644
index 0000000000..343ac19f02
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseEach.js b/tools/node_modules/eslint/node_modules/lodash/_baseEach.js
new file mode 100644
index 0000000000..512c067682
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseEachRight.js b/tools/node_modules/eslint/node_modules/lodash/_baseEachRight.js
new file mode 100644
index 0000000000..0a8feeca44
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseEvery.js b/tools/node_modules/eslint/node_modules/lodash/_baseEvery.js
new file mode 100644
index 0000000000..fa52f7bc7d
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseExtremum.js b/tools/node_modules/eslint/node_modules/lodash/_baseExtremum.js
new file mode 100644
index 0000000000..9d6aa77edb
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseFill.js b/tools/node_modules/eslint/node_modules/lodash/_baseFill.js
new file mode 100644
index 0000000000..46ef9c761a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseFilter.js b/tools/node_modules/eslint/node_modules/lodash/_baseFilter.js
new file mode 100644
index 0000000000..467847736a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseFindIndex.js b/tools/node_modules/eslint/node_modules/lodash/_baseFindIndex.js
new file mode 100644
index 0000000000..e3f5d8aa2b
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseFindKey.js b/tools/node_modules/eslint/node_modules/lodash/_baseFindKey.js
new file mode 100644
index 0000000000..2e430f3a21
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseFlatten.js b/tools/node_modules/eslint/node_modules/lodash/_baseFlatten.js
new file mode 100644
index 0000000000..4b1e009b15
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseFor.js b/tools/node_modules/eslint/node_modules/lodash/_baseFor.js
new file mode 100644
index 0000000000..d946590f8a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseForOwn.js b/tools/node_modules/eslint/node_modules/lodash/_baseForOwn.js
new file mode 100644
index 0000000000..503d523441
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseForOwnRight.js b/tools/node_modules/eslint/node_modules/lodash/_baseForOwnRight.js
new file mode 100644
index 0000000000..a4b10e6c59
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseForRight.js b/tools/node_modules/eslint/node_modules/lodash/_baseForRight.js
new file mode 100644
index 0000000000..32842cd817
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseFunctions.js b/tools/node_modules/eslint/node_modules/lodash/_baseFunctions.js
new file mode 100644
index 0000000000..d23bc9b475
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseGet.js b/tools/node_modules/eslint/node_modules/lodash/_baseGet.js
new file mode 100644
index 0000000000..a194913d21
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseGetAllKeys.js b/tools/node_modules/eslint/node_modules/lodash/_baseGetAllKeys.js
new file mode 100644
index 0000000000..8ad204ea41
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseGetTag.js b/tools/node_modules/eslint/node_modules/lodash/_baseGetTag.js
new file mode 100644
index 0000000000..b927ccc172
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseGt.js b/tools/node_modules/eslint/node_modules/lodash/_baseGt.js
new file mode 100644
index 0000000000..502d273ca8
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseHas.js b/tools/node_modules/eslint/node_modules/lodash/_baseHas.js
new file mode 100644
index 0000000000..1b730321c2
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseHasIn.js b/tools/node_modules/eslint/node_modules/lodash/_baseHasIn.js
new file mode 100644
index 0000000000..2e0d04269f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseInRange.js b/tools/node_modules/eslint/node_modules/lodash/_baseInRange.js
new file mode 100644
index 0000000000..ec95666187
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseIndexOf.js b/tools/node_modules/eslint/node_modules/lodash/_baseIndexOf.js
new file mode 100644
index 0000000000..167e706e79
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseIndexOfWith.js b/tools/node_modules/eslint/node_modules/lodash/_baseIndexOfWith.js
new file mode 100644
index 0000000000..f815fe0dda
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseIntersection.js b/tools/node_modules/eslint/node_modules/lodash/_baseIntersection.js
new file mode 100644
index 0000000000..c1d250c2aa
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseInverter.js b/tools/node_modules/eslint/node_modules/lodash/_baseInverter.js
new file mode 100644
index 0000000000..fbc337f01e
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseInvoke.js b/tools/node_modules/eslint/node_modules/lodash/_baseInvoke.js
new file mode 100644
index 0000000000..49bcf3c353
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseIsArguments.js b/tools/node_modules/eslint/node_modules/lodash/_baseIsArguments.js
new file mode 100644
index 0000000000..b3562cca2c
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseIsArrayBuffer.js b/tools/node_modules/eslint/node_modules/lodash/_baseIsArrayBuffer.js
new file mode 100644
index 0000000000..a2c4f30a82
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseIsDate.js b/tools/node_modules/eslint/node_modules/lodash/_baseIsDate.js
new file mode 100644
index 0000000000..ba67c7857f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseIsEqual.js b/tools/node_modules/eslint/node_modules/lodash/_baseIsEqual.js
new file mode 100644
index 0000000000..00a68a4f51
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseIsEqualDeep.js b/tools/node_modules/eslint/node_modules/lodash/_baseIsEqualDeep.js
new file mode 100644
index 0000000000..e3cfd6a8d0
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseIsMap.js b/tools/node_modules/eslint/node_modules/lodash/_baseIsMap.js
new file mode 100644
index 0000000000..02a4021cab
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseIsMatch.js b/tools/node_modules/eslint/node_modules/lodash/_baseIsMatch.js
new file mode 100644
index 0000000000..72494bed40
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseIsNaN.js b/tools/node_modules/eslint/node_modules/lodash/_baseIsNaN.js
new file mode 100644
index 0000000000..316f1eb1ef
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseIsNative.js b/tools/node_modules/eslint/node_modules/lodash/_baseIsNative.js
new file mode 100644
index 0000000000..8702330495
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseIsRegExp.js b/tools/node_modules/eslint/node_modules/lodash/_baseIsRegExp.js
new file mode 100644
index 0000000000..6cd7c1aee7
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseIsSet.js b/tools/node_modules/eslint/node_modules/lodash/_baseIsSet.js
new file mode 100644
index 0000000000..6dee36716e
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseIsTypedArray.js b/tools/node_modules/eslint/node_modules/lodash/_baseIsTypedArray.js
new file mode 100644
index 0000000000..1edb32ff3f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseIteratee.js b/tools/node_modules/eslint/node_modules/lodash/_baseIteratee.js
new file mode 100644
index 0000000000..995c257567
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseKeys.js b/tools/node_modules/eslint/node_modules/lodash/_baseKeys.js
new file mode 100644
index 0000000000..45e9e6f39f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseKeysIn.js b/tools/node_modules/eslint/node_modules/lodash/_baseKeysIn.js
new file mode 100644
index 0000000000..ea8a0a1742
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseLodash.js b/tools/node_modules/eslint/node_modules/lodash/_baseLodash.js
new file mode 100644
index 0000000000..f76c790e2e
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseLt.js b/tools/node_modules/eslint/node_modules/lodash/_baseLt.js
new file mode 100644
index 0000000000..8674d2946a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseMap.js b/tools/node_modules/eslint/node_modules/lodash/_baseMap.js
new file mode 100644
index 0000000000..0bf5cead5c
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseMatches.js b/tools/node_modules/eslint/node_modules/lodash/_baseMatches.js
new file mode 100644
index 0000000000..e56582ad88
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseMatchesProperty.js b/tools/node_modules/eslint/node_modules/lodash/_baseMatchesProperty.js
new file mode 100644
index 0000000000..24afd893d2
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseMean.js b/tools/node_modules/eslint/node_modules/lodash/_baseMean.js
new file mode 100644
index 0000000000..fa9e00a0a2
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseMerge.js b/tools/node_modules/eslint/node_modules/lodash/_baseMerge.js
new file mode 100644
index 0000000000..f4cb8c6988
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseMergeDeep.js b/tools/node_modules/eslint/node_modules/lodash/_baseMergeDeep.js
new file mode 100644
index 0000000000..42b405a3dc
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseNth.js b/tools/node_modules/eslint/node_modules/lodash/_baseNth.js
new file mode 100644
index 0000000000..0403c2a368
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseOrderBy.js b/tools/node_modules/eslint/node_modules/lodash/_baseOrderBy.js
new file mode 100644
index 0000000000..d8a46ab20a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_basePick.js b/tools/node_modules/eslint/node_modules/lodash/_basePick.js
new file mode 100644
index 0000000000..09b458a600
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_basePickBy.js b/tools/node_modules/eslint/node_modules/lodash/_basePickBy.js
new file mode 100644
index 0000000000..85be68c84f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseProperty.js b/tools/node_modules/eslint/node_modules/lodash/_baseProperty.js
new file mode 100644
index 0000000000..496281ec40
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_basePropertyDeep.js b/tools/node_modules/eslint/node_modules/lodash/_basePropertyDeep.js
new file mode 100644
index 0000000000..1e5aae50c4
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_basePropertyOf.js b/tools/node_modules/eslint/node_modules/lodash/_basePropertyOf.js
new file mode 100644
index 0000000000..4617399908
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_basePullAll.js b/tools/node_modules/eslint/node_modules/lodash/_basePullAll.js
new file mode 100644
index 0000000000..305720edea
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_basePullAt.js b/tools/node_modules/eslint/node_modules/lodash/_basePullAt.js
new file mode 100644
index 0000000000..c3e9e71023
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseRandom.js b/tools/node_modules/eslint/node_modules/lodash/_baseRandom.js
new file mode 100644
index 0000000000..94f76a7663
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseRange.js b/tools/node_modules/eslint/node_modules/lodash/_baseRange.js
new file mode 100644
index 0000000000..0fb8e419fb
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseReduce.js b/tools/node_modules/eslint/node_modules/lodash/_baseReduce.js
new file mode 100644
index 0000000000..5a1f8b57f1
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseRepeat.js b/tools/node_modules/eslint/node_modules/lodash/_baseRepeat.js
new file mode 100644
index 0000000000..ee44c31ab0
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseRest.js b/tools/node_modules/eslint/node_modules/lodash/_baseRest.js
new file mode 100644
index 0000000000..d0dc4bdd1f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseSample.js b/tools/node_modules/eslint/node_modules/lodash/_baseSample.js
new file mode 100644
index 0000000000..58582b9112
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseSampleSize.js b/tools/node_modules/eslint/node_modules/lodash/_baseSampleSize.js
new file mode 100644
index 0000000000..5c90ec5181
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseSet.js b/tools/node_modules/eslint/node_modules/lodash/_baseSet.js
new file mode 100644
index 0000000000..612a24cc85
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseSetData.js b/tools/node_modules/eslint/node_modules/lodash/_baseSetData.js
new file mode 100644
index 0000000000..c409947ddb
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseSetToString.js b/tools/node_modules/eslint/node_modules/lodash/_baseSetToString.js
new file mode 100644
index 0000000000..89eaca38df
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseShuffle.js b/tools/node_modules/eslint/node_modules/lodash/_baseShuffle.js
new file mode 100644
index 0000000000..023077ac4e
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseSlice.js b/tools/node_modules/eslint/node_modules/lodash/_baseSlice.js
new file mode 100644
index 0000000000..786f6c99e9
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseSome.js b/tools/node_modules/eslint/node_modules/lodash/_baseSome.js
new file mode 100644
index 0000000000..58f3f447a3
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseSortBy.js b/tools/node_modules/eslint/node_modules/lodash/_baseSortBy.js
new file mode 100644
index 0000000000..a25c92eda6
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseSortedIndex.js b/tools/node_modules/eslint/node_modules/lodash/_baseSortedIndex.js
new file mode 100644
index 0000000000..638c366c77
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseSortedIndexBy.js b/tools/node_modules/eslint/node_modules/lodash/_baseSortedIndexBy.js
new file mode 100644
index 0000000000..bb22e36dcd
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseSortedUniq.js b/tools/node_modules/eslint/node_modules/lodash/_baseSortedUniq.js
new file mode 100644
index 0000000000..802159a3db
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseSum.js b/tools/node_modules/eslint/node_modules/lodash/_baseSum.js
new file mode 100644
index 0000000000..a9e84c13c9
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseTimes.js b/tools/node_modules/eslint/node_modules/lodash/_baseTimes.js
new file mode 100644
index 0000000000..0603fc37ea
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseToNumber.js b/tools/node_modules/eslint/node_modules/lodash/_baseToNumber.js
new file mode 100644
index 0000000000..04859f391f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseToPairs.js b/tools/node_modules/eslint/node_modules/lodash/_baseToPairs.js
new file mode 100644
index 0000000000..bff199128f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseToString.js b/tools/node_modules/eslint/node_modules/lodash/_baseToString.js
new file mode 100644
index 0000000000..ada6ad298c
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseUnary.js b/tools/node_modules/eslint/node_modules/lodash/_baseUnary.js
new file mode 100644
index 0000000000..98639e92f6
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseUniq.js b/tools/node_modules/eslint/node_modules/lodash/_baseUniq.js
new file mode 100644
index 0000000000..aea459dc71
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseUnset.js b/tools/node_modules/eslint/node_modules/lodash/_baseUnset.js
new file mode 100644
index 0000000000..eefc6e37d3
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseUpdate.js b/tools/node_modules/eslint/node_modules/lodash/_baseUpdate.js
new file mode 100644
index 0000000000..92a623777c
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseValues.js b/tools/node_modules/eslint/node_modules/lodash/_baseValues.js
new file mode 100644
index 0000000000..b95faadcfe
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseWhile.js b/tools/node_modules/eslint/node_modules/lodash/_baseWhile.js
new file mode 100644
index 0000000000..07eac61b98
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseWrapperValue.js b/tools/node_modules/eslint/node_modules/lodash/_baseWrapperValue.js
new file mode 100644
index 0000000000..443e0df5e0
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseXor.js b/tools/node_modules/eslint/node_modules/lodash/_baseXor.js
new file mode 100644
index 0000000000..8e69338bf9
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_baseZipObject.js b/tools/node_modules/eslint/node_modules/lodash/_baseZipObject.js
new file mode 100644
index 0000000000..401f85be20
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_cacheHas.js b/tools/node_modules/eslint/node_modules/lodash/_cacheHas.js
new file mode 100644
index 0000000000..2dec892689
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_castArrayLikeObject.js b/tools/node_modules/eslint/node_modules/lodash/_castArrayLikeObject.js
new file mode 100644
index 0000000000..92c75fa1a9
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_castFunction.js b/tools/node_modules/eslint/node_modules/lodash/_castFunction.js
new file mode 100644
index 0000000000..98c91ae637
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_castPath.js b/tools/node_modules/eslint/node_modules/lodash/_castPath.js
new file mode 100644
index 0000000000..017e4c1b45
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_castRest.js b/tools/node_modules/eslint/node_modules/lodash/_castRest.js
new file mode 100644
index 0000000000..213c66f19f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_castSlice.js b/tools/node_modules/eslint/node_modules/lodash/_castSlice.js
new file mode 100644
index 0000000000..071faeba52
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_charsEndIndex.js b/tools/node_modules/eslint/node_modules/lodash/_charsEndIndex.js
new file mode 100644
index 0000000000..07908ff3aa
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_charsStartIndex.js b/tools/node_modules/eslint/node_modules/lodash/_charsStartIndex.js
new file mode 100644
index 0000000000..b17afd2547
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_cloneArrayBuffer.js b/tools/node_modules/eslint/node_modules/lodash/_cloneArrayBuffer.js
new file mode 100644
index 0000000000..c3d8f6e39a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_cloneBuffer.js b/tools/node_modules/eslint/node_modules/lodash/_cloneBuffer.js
new file mode 100644
index 0000000000..27c48109b4
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_cloneDataView.js b/tools/node_modules/eslint/node_modules/lodash/_cloneDataView.js
new file mode 100644
index 0000000000..9c9b7b054d
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_cloneMap.js b/tools/node_modules/eslint/node_modules/lodash/_cloneMap.js
new file mode 100644
index 0000000000..334b73e986
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_cloneRegExp.js b/tools/node_modules/eslint/node_modules/lodash/_cloneRegExp.js
new file mode 100644
index 0000000000..64a30dfb4a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_cloneSet.js b/tools/node_modules/eslint/node_modules/lodash/_cloneSet.js
new file mode 100644
index 0000000000..713a2f76b0
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_cloneSymbol.js b/tools/node_modules/eslint/node_modules/lodash/_cloneSymbol.js
new file mode 100644
index 0000000000..bede39f50a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_cloneTypedArray.js b/tools/node_modules/eslint/node_modules/lodash/_cloneTypedArray.js
new file mode 100644
index 0000000000..7aad84d4fe
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_compareAscending.js b/tools/node_modules/eslint/node_modules/lodash/_compareAscending.js
new file mode 100644
index 0000000000..8dc2791088
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_compareMultiple.js b/tools/node_modules/eslint/node_modules/lodash/_compareMultiple.js
new file mode 100644
index 0000000000..ad61f0fbca
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_composeArgs.js b/tools/node_modules/eslint/node_modules/lodash/_composeArgs.js
new file mode 100644
index 0000000000..1ce40f4f93
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_composeArgsRight.js b/tools/node_modules/eslint/node_modules/lodash/_composeArgsRight.js
new file mode 100644
index 0000000000..8dc588d0a9
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_copyArray.js b/tools/node_modules/eslint/node_modules/lodash/_copyArray.js
new file mode 100644
index 0000000000..cd94d5d09a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_copyObject.js b/tools/node_modules/eslint/node_modules/lodash/_copyObject.js
new file mode 100644
index 0000000000..2f2a5c23b7
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_copySymbols.js b/tools/node_modules/eslint/node_modules/lodash/_copySymbols.js
new file mode 100644
index 0000000000..c35944ab5e
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_copySymbolsIn.js b/tools/node_modules/eslint/node_modules/lodash/_copySymbolsIn.js
new file mode 100644
index 0000000000..fdf20a73c2
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_coreJsData.js b/tools/node_modules/eslint/node_modules/lodash/_coreJsData.js
new file mode 100644
index 0000000000..f8e5b4e349
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_countHolders.js b/tools/node_modules/eslint/node_modules/lodash/_countHolders.js
new file mode 100644
index 0000000000..718fcdaa8d
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_createAggregator.js b/tools/node_modules/eslint/node_modules/lodash/_createAggregator.js
new file mode 100644
index 0000000000..0be42c41cd
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_createAssigner.js b/tools/node_modules/eslint/node_modules/lodash/_createAssigner.js
new file mode 100644
index 0000000000..1f904c51bd
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_createBaseEach.js b/tools/node_modules/eslint/node_modules/lodash/_createBaseEach.js
new file mode 100644
index 0000000000..d24fdd1bbc
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_createBaseFor.js b/tools/node_modules/eslint/node_modules/lodash/_createBaseFor.js
new file mode 100644
index 0000000000..94cbf297aa
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_createBind.js b/tools/node_modules/eslint/node_modules/lodash/_createBind.js
new file mode 100644
index 0000000000..07cb99f4db
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_createCaseFirst.js b/tools/node_modules/eslint/node_modules/lodash/_createCaseFirst.js
new file mode 100644
index 0000000000..fe8ea48303
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_createCompounder.js b/tools/node_modules/eslint/node_modules/lodash/_createCompounder.js
new file mode 100644
index 0000000000..8d4cee2cd3
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_createCtor.js b/tools/node_modules/eslint/node_modules/lodash/_createCtor.js
new file mode 100644
index 0000000000..9047aa5fac
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_createCurry.js b/tools/node_modules/eslint/node_modules/lodash/_createCurry.js
new file mode 100644
index 0000000000..f06c2cdd85
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_createFind.js b/tools/node_modules/eslint/node_modules/lodash/_createFind.js
new file mode 100644
index 0000000000..8859ff89f4
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_createFlow.js b/tools/node_modules/eslint/node_modules/lodash/_createFlow.js
new file mode 100644
index 0000000000..baaddbf5e8
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_createHybrid.js b/tools/node_modules/eslint/node_modules/lodash/_createHybrid.js
new file mode 100644
index 0000000000..b671bd11f6
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_createInverter.js b/tools/node_modules/eslint/node_modules/lodash/_createInverter.js
new file mode 100644
index 0000000000..6c0c56299b
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_createMathOperation.js b/tools/node_modules/eslint/node_modules/lodash/_createMathOperation.js
new file mode 100644
index 0000000000..f1e238ac0a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_createOver.js b/tools/node_modules/eslint/node_modules/lodash/_createOver.js
new file mode 100644
index 0000000000..3b9455161b
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_createPadding.js b/tools/node_modules/eslint/node_modules/lodash/_createPadding.js
new file mode 100644
index 0000000000..2124612b81
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_createPartial.js b/tools/node_modules/eslint/node_modules/lodash/_createPartial.js
new file mode 100644
index 0000000000..e16c248b5e
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_createRange.js b/tools/node_modules/eslint/node_modules/lodash/_createRange.js
new file mode 100644
index 0000000000..9f52c77932
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_createRecurry.js b/tools/node_modules/eslint/node_modules/lodash/_createRecurry.js
new file mode 100644
index 0000000000..eb29fb24c0
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_createRelationalOperation.js b/tools/node_modules/eslint/node_modules/lodash/_createRelationalOperation.js
new file mode 100644
index 0000000000..a17c6b5e72
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_createRound.js b/tools/node_modules/eslint/node_modules/lodash/_createRound.js
new file mode 100644
index 0000000000..bf9b713fcb
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_createSet.js b/tools/node_modules/eslint/node_modules/lodash/_createSet.js
new file mode 100644
index 0000000000..0f644eeae6
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_createToPairs.js b/tools/node_modules/eslint/node_modules/lodash/_createToPairs.js
new file mode 100644
index 0000000000..568417afda
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_createWrap.js b/tools/node_modules/eslint/node_modules/lodash/_createWrap.js
new file mode 100644
index 0000000000..33f0633e40
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_customDefaultsAssignIn.js b/tools/node_modules/eslint/node_modules/lodash/_customDefaultsAssignIn.js
new file mode 100644
index 0000000000..1f49e6fc4f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_customDefaultsMerge.js b/tools/node_modules/eslint/node_modules/lodash/_customDefaultsMerge.js
new file mode 100644
index 0000000000..4cab31751b
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_customOmitClone.js b/tools/node_modules/eslint/node_modules/lodash/_customOmitClone.js
new file mode 100644
index 0000000000..968db2ef3e
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_deburrLetter.js b/tools/node_modules/eslint/node_modules/lodash/_deburrLetter.js
new file mode 100644
index 0000000000..3e531edcf3
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_defineProperty.js b/tools/node_modules/eslint/node_modules/lodash/_defineProperty.js
new file mode 100644
index 0000000000..b6116d92ab
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_equalArrays.js b/tools/node_modules/eslint/node_modules/lodash/_equalArrays.js
new file mode 100644
index 0000000000..f6a3b7c9f2
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_equalByTag.js b/tools/node_modules/eslint/node_modules/lodash/_equalByTag.js
new file mode 100644
index 0000000000..71919e8673
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_equalObjects.js b/tools/node_modules/eslint/node_modules/lodash/_equalObjects.js
new file mode 100644
index 0000000000..17421f374c
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_escapeHtmlChar.js b/tools/node_modules/eslint/node_modules/lodash/_escapeHtmlChar.js
new file mode 100644
index 0000000000..7ca68ee625
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/_escapeHtmlChar.js
@@ -0,0 +1,21 @@
+var basePropertyOf = require('./_basePropertyOf');
+
+/** Used to map characters to HTML entities. */
+var htmlEscapes = {
+ '&': '&amp;',
+ '<': '&lt;',
+ '>': '&gt;',
+ '"': '&quot;',
+ "'": '&#39;'
+};
+
+/**
+ * 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/tools/node_modules/eslint/node_modules/lodash/_escapeStringChar.js b/tools/node_modules/eslint/node_modules/lodash/_escapeStringChar.js
new file mode 100644
index 0000000000..44eca96ca8
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_flatRest.js b/tools/node_modules/eslint/node_modules/lodash/_flatRest.js
new file mode 100644
index 0000000000..94ab6cca77
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_freeGlobal.js b/tools/node_modules/eslint/node_modules/lodash/_freeGlobal.js
new file mode 100644
index 0000000000..bbec998fc8
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_getAllKeys.js b/tools/node_modules/eslint/node_modules/lodash/_getAllKeys.js
new file mode 100644
index 0000000000..a9ce6995a6
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_getAllKeysIn.js b/tools/node_modules/eslint/node_modules/lodash/_getAllKeysIn.js
new file mode 100644
index 0000000000..1b4667841d
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_getData.js b/tools/node_modules/eslint/node_modules/lodash/_getData.js
new file mode 100644
index 0000000000..a1fe7b7790
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_getFuncName.js b/tools/node_modules/eslint/node_modules/lodash/_getFuncName.js
new file mode 100644
index 0000000000..21e15b3377
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_getHolder.js b/tools/node_modules/eslint/node_modules/lodash/_getHolder.js
new file mode 100644
index 0000000000..65e94b5c24
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_getMapData.js b/tools/node_modules/eslint/node_modules/lodash/_getMapData.js
new file mode 100644
index 0000000000..17f63032e1
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_getMatchData.js b/tools/node_modules/eslint/node_modules/lodash/_getMatchData.js
new file mode 100644
index 0000000000..2cc70f917f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_getNative.js b/tools/node_modules/eslint/node_modules/lodash/_getNative.js
new file mode 100644
index 0000000000..97a622b83a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_getPrototype.js b/tools/node_modules/eslint/node_modules/lodash/_getPrototype.js
new file mode 100644
index 0000000000..e808612129
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_getRawTag.js b/tools/node_modules/eslint/node_modules/lodash/_getRawTag.js
new file mode 100644
index 0000000000..49a95c9c65
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_getSymbols.js b/tools/node_modules/eslint/node_modules/lodash/_getSymbols.js
new file mode 100644
index 0000000000..7d6eafebb3
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_getSymbolsIn.js b/tools/node_modules/eslint/node_modules/lodash/_getSymbolsIn.js
new file mode 100644
index 0000000000..cec0855a4a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_getTag.js b/tools/node_modules/eslint/node_modules/lodash/_getTag.js
new file mode 100644
index 0000000000..deaf89d582
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_getValue.js b/tools/node_modules/eslint/node_modules/lodash/_getValue.js
new file mode 100644
index 0000000000..5f7d773673
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_getView.js b/tools/node_modules/eslint/node_modules/lodash/_getView.js
new file mode 100644
index 0000000000..df1e5d44b5
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_getWrapDetails.js b/tools/node_modules/eslint/node_modules/lodash/_getWrapDetails.js
new file mode 100644
index 0000000000..3bcc6e48a3
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_hasPath.js b/tools/node_modules/eslint/node_modules/lodash/_hasPath.js
new file mode 100644
index 0000000000..93dbde152e
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_hasUnicode.js b/tools/node_modules/eslint/node_modules/lodash/_hasUnicode.js
new file mode 100644
index 0000000000..cb6ca15f66
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_hasUnicodeWord.js b/tools/node_modules/eslint/node_modules/lodash/_hasUnicodeWord.js
new file mode 100644
index 0000000000..a35d6e504d
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_hashClear.js b/tools/node_modules/eslint/node_modules/lodash/_hashClear.js
new file mode 100644
index 0000000000..5d4b70cc46
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_hashDelete.js b/tools/node_modules/eslint/node_modules/lodash/_hashDelete.js
new file mode 100644
index 0000000000..ea9dabf131
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_hashGet.js b/tools/node_modules/eslint/node_modules/lodash/_hashGet.js
new file mode 100644
index 0000000000..1fc2f34b10
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_hashHas.js b/tools/node_modules/eslint/node_modules/lodash/_hashHas.js
new file mode 100644
index 0000000000..281a5517c6
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_hashSet.js b/tools/node_modules/eslint/node_modules/lodash/_hashSet.js
new file mode 100644
index 0000000000..e1055283e4
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_initCloneArray.js b/tools/node_modules/eslint/node_modules/lodash/_initCloneArray.js
new file mode 100644
index 0000000000..aef02120e5
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_initCloneByTag.js b/tools/node_modules/eslint/node_modules/lodash/_initCloneByTag.js
new file mode 100644
index 0000000000..e7b77edc69
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_initCloneObject.js b/tools/node_modules/eslint/node_modules/lodash/_initCloneObject.js
new file mode 100644
index 0000000000..5a13e64a52
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_insertWrapDetails.js b/tools/node_modules/eslint/node_modules/lodash/_insertWrapDetails.js
new file mode 100644
index 0000000000..e790808646
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_isFlattenable.js b/tools/node_modules/eslint/node_modules/lodash/_isFlattenable.js
new file mode 100644
index 0000000000..4cc2c249cc
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_isIndex.js b/tools/node_modules/eslint/node_modules/lodash/_isIndex.js
new file mode 100644
index 0000000000..e123dde8bc
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_isIterateeCall.js b/tools/node_modules/eslint/node_modules/lodash/_isIterateeCall.js
new file mode 100644
index 0000000000..a0bb5a9cf6
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_isKey.js b/tools/node_modules/eslint/node_modules/lodash/_isKey.js
new file mode 100644
index 0000000000..ff08b06808
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_isKeyable.js b/tools/node_modules/eslint/node_modules/lodash/_isKeyable.js
new file mode 100644
index 0000000000..39f1828d4a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_isLaziable.js b/tools/node_modules/eslint/node_modules/lodash/_isLaziable.js
new file mode 100644
index 0000000000..a57c4f2dc7
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_isMaskable.js b/tools/node_modules/eslint/node_modules/lodash/_isMaskable.js
new file mode 100644
index 0000000000..eb98d09f31
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_isMasked.js b/tools/node_modules/eslint/node_modules/lodash/_isMasked.js
new file mode 100644
index 0000000000..4b0f21ba89
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_isPrototype.js b/tools/node_modules/eslint/node_modules/lodash/_isPrototype.js
new file mode 100644
index 0000000000..0f29498d47
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_isStrictComparable.js b/tools/node_modules/eslint/node_modules/lodash/_isStrictComparable.js
new file mode 100644
index 0000000000..b59f40b857
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_iteratorToArray.js b/tools/node_modules/eslint/node_modules/lodash/_iteratorToArray.js
new file mode 100644
index 0000000000..476856647c
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_lazyClone.js b/tools/node_modules/eslint/node_modules/lodash/_lazyClone.js
new file mode 100644
index 0000000000..d8a51f8703
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_lazyReverse.js b/tools/node_modules/eslint/node_modules/lodash/_lazyReverse.js
new file mode 100644
index 0000000000..c5b52190f4
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_lazyValue.js b/tools/node_modules/eslint/node_modules/lodash/_lazyValue.js
new file mode 100644
index 0000000000..371ca8d223
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_listCacheClear.js b/tools/node_modules/eslint/node_modules/lodash/_listCacheClear.js
new file mode 100644
index 0000000000..acbe39a597
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_listCacheDelete.js b/tools/node_modules/eslint/node_modules/lodash/_listCacheDelete.js
new file mode 100644
index 0000000000..b1384ade97
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_listCacheGet.js b/tools/node_modules/eslint/node_modules/lodash/_listCacheGet.js
new file mode 100644
index 0000000000..f8192fc384
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_listCacheHas.js b/tools/node_modules/eslint/node_modules/lodash/_listCacheHas.js
new file mode 100644
index 0000000000..2adf67146f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_listCacheSet.js b/tools/node_modules/eslint/node_modules/lodash/_listCacheSet.js
new file mode 100644
index 0000000000..5855c95e40
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_mapCacheClear.js b/tools/node_modules/eslint/node_modules/lodash/_mapCacheClear.js
new file mode 100644
index 0000000000..bc9ca204ae
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_mapCacheDelete.js b/tools/node_modules/eslint/node_modules/lodash/_mapCacheDelete.js
new file mode 100644
index 0000000000..946ca3c939
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_mapCacheGet.js b/tools/node_modules/eslint/node_modules/lodash/_mapCacheGet.js
new file mode 100644
index 0000000000..f29f55cfdd
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_mapCacheHas.js b/tools/node_modules/eslint/node_modules/lodash/_mapCacheHas.js
new file mode 100644
index 0000000000..a1214c028b
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_mapCacheSet.js b/tools/node_modules/eslint/node_modules/lodash/_mapCacheSet.js
new file mode 100644
index 0000000000..7346849273
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_mapToArray.js b/tools/node_modules/eslint/node_modules/lodash/_mapToArray.js
new file mode 100644
index 0000000000..fe3dd531a3
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_matchesStrictComparable.js b/tools/node_modules/eslint/node_modules/lodash/_matchesStrictComparable.js
new file mode 100644
index 0000000000..f608af9ec4
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_memoizeCapped.js b/tools/node_modules/eslint/node_modules/lodash/_memoizeCapped.js
new file mode 100644
index 0000000000..7f71c8fbae
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_mergeData.js b/tools/node_modules/eslint/node_modules/lodash/_mergeData.js
new file mode 100644
index 0000000000..cb570f9767
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_metaMap.js b/tools/node_modules/eslint/node_modules/lodash/_metaMap.js
new file mode 100644
index 0000000000..0157a0b095
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_nativeCreate.js b/tools/node_modules/eslint/node_modules/lodash/_nativeCreate.js
new file mode 100644
index 0000000000..c7aede85b3
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_nativeKeys.js b/tools/node_modules/eslint/node_modules/lodash/_nativeKeys.js
new file mode 100644
index 0000000000..479a104a1c
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_nativeKeysIn.js b/tools/node_modules/eslint/node_modules/lodash/_nativeKeysIn.js
new file mode 100644
index 0000000000..00ee505947
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_nodeUtil.js b/tools/node_modules/eslint/node_modules/lodash/_nodeUtil.js
new file mode 100644
index 0000000000..14e179fe1c
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_objectToString.js b/tools/node_modules/eslint/node_modules/lodash/_objectToString.js
new file mode 100644
index 0000000000..c614ec09b3
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_overArg.js b/tools/node_modules/eslint/node_modules/lodash/_overArg.js
new file mode 100644
index 0000000000..651c5c55f2
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_overRest.js b/tools/node_modules/eslint/node_modules/lodash/_overRest.js
new file mode 100644
index 0000000000..c7cdef3399
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_parent.js b/tools/node_modules/eslint/node_modules/lodash/_parent.js
new file mode 100644
index 0000000000..f174328fcf
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_reEscape.js b/tools/node_modules/eslint/node_modules/lodash/_reEscape.js
new file mode 100644
index 0000000000..7f47eda68f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_reEvaluate.js b/tools/node_modules/eslint/node_modules/lodash/_reEvaluate.js
new file mode 100644
index 0000000000..6adfc312c8
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_reInterpolate.js b/tools/node_modules/eslint/node_modules/lodash/_reInterpolate.js
new file mode 100644
index 0000000000..d02ff0b29a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_realNames.js b/tools/node_modules/eslint/node_modules/lodash/_realNames.js
new file mode 100644
index 0000000000..aa0d529261
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/_realNames.js
@@ -0,0 +1,4 @@
+/** Used to lookup unminified function names. */
+var realNames = {};
+
+module.exports = realNames;
diff --git a/tools/node_modules/eslint/node_modules/lodash/_reorder.js b/tools/node_modules/eslint/node_modules/lodash/_reorder.js
new file mode 100644
index 0000000000..a3502b0517
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_replaceHolders.js b/tools/node_modules/eslint/node_modules/lodash/_replaceHolders.js
new file mode 100644
index 0000000000..74360ec4d3
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_root.js b/tools/node_modules/eslint/node_modules/lodash/_root.js
new file mode 100644
index 0000000000..d2852bed4d
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_setCacheAdd.js b/tools/node_modules/eslint/node_modules/lodash/_setCacheAdd.js
new file mode 100644
index 0000000000..1081a74426
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_setCacheHas.js b/tools/node_modules/eslint/node_modules/lodash/_setCacheHas.js
new file mode 100644
index 0000000000..9a492556e0
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_setData.js b/tools/node_modules/eslint/node_modules/lodash/_setData.js
new file mode 100644
index 0000000000..e5cf3eb96a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_setToArray.js b/tools/node_modules/eslint/node_modules/lodash/_setToArray.js
new file mode 100644
index 0000000000..b87f07418c
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_setToPairs.js b/tools/node_modules/eslint/node_modules/lodash/_setToPairs.js
new file mode 100644
index 0000000000..36ad37a058
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_setToString.js b/tools/node_modules/eslint/node_modules/lodash/_setToString.js
new file mode 100644
index 0000000000..6ca8419678
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_setWrapToString.js b/tools/node_modules/eslint/node_modules/lodash/_setWrapToString.js
new file mode 100644
index 0000000000..decdc44998
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_shortOut.js b/tools/node_modules/eslint/node_modules/lodash/_shortOut.js
new file mode 100644
index 0000000000..3300a07969
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_shuffleSelf.js b/tools/node_modules/eslint/node_modules/lodash/_shuffleSelf.js
new file mode 100644
index 0000000000..8bcc4f5c32
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_stackClear.js b/tools/node_modules/eslint/node_modules/lodash/_stackClear.js
new file mode 100644
index 0000000000..ce8e5a92ff
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_stackDelete.js b/tools/node_modules/eslint/node_modules/lodash/_stackDelete.js
new file mode 100644
index 0000000000..ff9887ab64
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_stackGet.js b/tools/node_modules/eslint/node_modules/lodash/_stackGet.js
new file mode 100644
index 0000000000..1cdf004091
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_stackHas.js b/tools/node_modules/eslint/node_modules/lodash/_stackHas.js
new file mode 100644
index 0000000000..16a3ad11b9
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_stackSet.js b/tools/node_modules/eslint/node_modules/lodash/_stackSet.js
new file mode 100644
index 0000000000..b790ac5f41
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_strictIndexOf.js b/tools/node_modules/eslint/node_modules/lodash/_strictIndexOf.js
new file mode 100644
index 0000000000..0486a4956b
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_strictLastIndexOf.js b/tools/node_modules/eslint/node_modules/lodash/_strictLastIndexOf.js
new file mode 100644
index 0000000000..d7310dcc23
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_stringSize.js b/tools/node_modules/eslint/node_modules/lodash/_stringSize.js
new file mode 100644
index 0000000000..17ef462a68
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_stringToArray.js b/tools/node_modules/eslint/node_modules/lodash/_stringToArray.js
new file mode 100644
index 0000000000..d161158c6f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_stringToPath.js b/tools/node_modules/eslint/node_modules/lodash/_stringToPath.js
new file mode 100644
index 0000000000..db7b0f7dba
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_toKey.js b/tools/node_modules/eslint/node_modules/lodash/_toKey.js
new file mode 100644
index 0000000000..c6d645c4d0
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_toSource.js b/tools/node_modules/eslint/node_modules/lodash/_toSource.js
new file mode 100644
index 0000000000..a020b386ca
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_unescapeHtmlChar.js b/tools/node_modules/eslint/node_modules/lodash/_unescapeHtmlChar.js
new file mode 100644
index 0000000000..a71fecb3f6
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/_unescapeHtmlChar.js
@@ -0,0 +1,21 @@
+var basePropertyOf = require('./_basePropertyOf');
+
+/** Used to map HTML entities to characters. */
+var htmlUnescapes = {
+ '&amp;': '&',
+ '&lt;': '<',
+ '&gt;': '>',
+ '&quot;': '"',
+ '&#39;': "'"
+};
+
+/**
+ * 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/tools/node_modules/eslint/node_modules/lodash/_unicodeSize.js b/tools/node_modules/eslint/node_modules/lodash/_unicodeSize.js
new file mode 100644
index 0000000000..68137ec2c5
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_unicodeToArray.js b/tools/node_modules/eslint/node_modules/lodash/_unicodeToArray.js
new file mode 100644
index 0000000000..2a725c062e
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_unicodeWords.js b/tools/node_modules/eslint/node_modules/lodash/_unicodeWords.js
new file mode 100644
index 0000000000..d8b822ada9
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_updateWrapDetails.js b/tools/node_modules/eslint/node_modules/lodash/_updateWrapDetails.js
new file mode 100644
index 0000000000..8759fbdf79
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/_wrapperClone.js b/tools/node_modules/eslint/node_modules/lodash/_wrapperClone.js
new file mode 100644
index 0000000000..7bb58a2e88
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/add.js b/tools/node_modules/eslint/node_modules/lodash/add.js
new file mode 100644
index 0000000000..f069515647
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/after.js b/tools/node_modules/eslint/node_modules/lodash/after.js
new file mode 100644
index 0000000000..3900c979a1
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/array.js b/tools/node_modules/eslint/node_modules/lodash/array.js
new file mode 100644
index 0000000000..af688d3ee6
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/ary.js b/tools/node_modules/eslint/node_modules/lodash/ary.js
new file mode 100644
index 0000000000..70c87d094c
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/assign.js b/tools/node_modules/eslint/node_modules/lodash/assign.js
new file mode 100644
index 0000000000..909db26a34
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/assignIn.js b/tools/node_modules/eslint/node_modules/lodash/assignIn.js
new file mode 100644
index 0000000000..e663473a0c
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/assignInWith.js b/tools/node_modules/eslint/node_modules/lodash/assignInWith.js
new file mode 100644
index 0000000000..68fcc0b03a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/assignWith.js b/tools/node_modules/eslint/node_modules/lodash/assignWith.js
new file mode 100644
index 0000000000..7dc6c761b8
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/at.js b/tools/node_modules/eslint/node_modules/lodash/at.js
new file mode 100644
index 0000000000..781ee9e5f1
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/attempt.js b/tools/node_modules/eslint/node_modules/lodash/attempt.js
new file mode 100644
index 0000000000..624d01524d
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/before.js b/tools/node_modules/eslint/node_modules/lodash/before.js
new file mode 100644
index 0000000000..a3e0a16c7a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/bind.js b/tools/node_modules/eslint/node_modules/lodash/bind.js
new file mode 100644
index 0000000000..b1076e93e6
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/bindAll.js b/tools/node_modules/eslint/node_modules/lodash/bindAll.js
new file mode 100644
index 0000000000..a35706deed
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/bindKey.js b/tools/node_modules/eslint/node_modules/lodash/bindKey.js
new file mode 100644
index 0000000000..f7fd64cd4e
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/camelCase.js b/tools/node_modules/eslint/node_modules/lodash/camelCase.js
new file mode 100644
index 0000000000..d7390def55
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/capitalize.js b/tools/node_modules/eslint/node_modules/lodash/capitalize.js
new file mode 100644
index 0000000000..3e1600e7d9
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/castArray.js b/tools/node_modules/eslint/node_modules/lodash/castArray.js
new file mode 100644
index 0000000000..e470bdb9b9
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/ceil.js b/tools/node_modules/eslint/node_modules/lodash/ceil.js
new file mode 100644
index 0000000000..56c8722cfc
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/chain.js b/tools/node_modules/eslint/node_modules/lodash/chain.js
new file mode 100644
index 0000000000..f6cd6475ff
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/chunk.js b/tools/node_modules/eslint/node_modules/lodash/chunk.js
new file mode 100644
index 0000000000..5b562fef3c
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/clamp.js b/tools/node_modules/eslint/node_modules/lodash/clamp.js
new file mode 100644
index 0000000000..91a72c9782
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/clone.js b/tools/node_modules/eslint/node_modules/lodash/clone.js
new file mode 100644
index 0000000000..dd439d6396
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/cloneDeep.js b/tools/node_modules/eslint/node_modules/lodash/cloneDeep.js
new file mode 100644
index 0000000000..4425fbe8b9
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/cloneDeepWith.js b/tools/node_modules/eslint/node_modules/lodash/cloneDeepWith.js
new file mode 100644
index 0000000000..fd9c6c050c
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/cloneWith.js b/tools/node_modules/eslint/node_modules/lodash/cloneWith.js
new file mode 100644
index 0000000000..d2f4e756d5
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/collection.js b/tools/node_modules/eslint/node_modules/lodash/collection.js
new file mode 100644
index 0000000000..77fe837f32
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/commit.js b/tools/node_modules/eslint/node_modules/lodash/commit.js
new file mode 100644
index 0000000000..fe4db71783
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/compact.js b/tools/node_modules/eslint/node_modules/lodash/compact.js
new file mode 100644
index 0000000000..031fab4e6d
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/concat.js b/tools/node_modules/eslint/node_modules/lodash/concat.js
new file mode 100644
index 0000000000..1da48a4fc7
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/cond.js b/tools/node_modules/eslint/node_modules/lodash/cond.js
new file mode 100644
index 0000000000..64555986aa
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/conforms.js b/tools/node_modules/eslint/node_modules/lodash/conforms.js
new file mode 100644
index 0000000000..5501a949a9
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/conformsTo.js b/tools/node_modules/eslint/node_modules/lodash/conformsTo.js
new file mode 100644
index 0000000000..b8a93ebf45
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/constant.js b/tools/node_modules/eslint/node_modules/lodash/constant.js
new file mode 100644
index 0000000000..655ece3fb3
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/core.js b/tools/node_modules/eslint/node_modules/lodash/core.js
new file mode 100644
index 0000000000..88c263f86d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/core.js
@@ -0,0 +1,3836 @@
+/**
+ * @license
+ * Lodash (Custom Build) <https://lodash.com/>
+ * Build: `lodash core -o ./dist/lodash.core.js`
+ * Copyright JS Foundation and other contributors <https://js.foundation/>
+ * Released under MIT license <https://lodash.com/license>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * 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 = {
+ '&': '&amp;',
+ '<': '&lt;',
+ '>': '&gt;',
+ '"': '&quot;',
+ "'": '&#39;'
+ };
+
+ /** 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, &amp; 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/tools/node_modules/eslint/node_modules/lodash/core.min.js b/tools/node_modules/eslint/node_modules/lodash/core.min.js
new file mode 100644
index 0000000000..b909d31c75
--- /dev/null
+++ b/tools/node_modules/eslint/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;++e<u;){var o=n[e],i=t(o);if(null!=i&&(c===nn?i===i:r(i,c)))var c=i,f=o}return f}function l(n,t){var r=[];return mn(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function p(n,r,e,u,o){var i=-1,c=n.length;for(e||(e=D),o||(o=[]);++i<c;){var f=n[i];0<r&&e(f)?1<r?p(f,r-1,e,u,o):t(o,f):u||(o[o.length]=f)}return o}function s(n,t){return n&&On(n,t,In);
+}function h(n,t){return l(t,function(t){return V(n[t])})}function v(n,t){return n>t}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 n<t}function j(n,t){var r=-1,e=U(n)?Array(n.length):[];return mn(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function d(n){var t=_n(n);return function(r){var e=t.length;if(null==r)return!e;for(r=Object(r);e--;){var u=t[e];if(!(u in r&&y(n[u],r[u],3)))return false}return true}}function m(n,t){return n=Object(n),G(t,function(t,r){return r in n&&(t[r]=n[r]),t},{})}function O(n){return xn(q(n,void 0,Y),n+"");
+}function x(n,t,r){var e=-1,u=n.length;for(0>t&&(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);++e<u;)r[e]=n[e+t];return r}function A(n){return x(n,0,n.length)}function E(n,t){var r;return mn(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function w(n,r){return G(r,function(n,r){return r.func.apply(r.thisArg,t([n],r.args))},n)}function k(n,t,r,e){var u=!r;r||(r={});for(var o=-1,i=t.length;++o<i;){var c=t[o],f=e?e(r[c],n[c],c,r,n):nn;if(f===nn&&(f=n[c]),u)r[c]=f;else{var a=r,l=a[c];
+pn.call(a,c)&&M(l,f)&&(f!==nn||c in a)||(a[c]=f)}}return r}function N(n){return O(function(t,r){var e=-1,u=r.length,o=1<u?r[u-1]:nn,o=3<n.length&&typeof o=="function"?(u--,o):nn;for(t=Object(t);++e<u;){var i=r[e];i&&n(t,i,e,o)}return t})}function F(n){return function(){var t=arguments,r=dn(n.prototype),t=n.apply(r,t);return H(t)?t:r}}function S(n,t,r){function e(){for(var o=-1,i=arguments.length,c=-1,f=r.length,a=Array(f+i),l=this&&this!==on&&this instanceof e?u:n;++c<f;)a[c]=r[c];for(;i--;)a[c++]=arguments[++o];
+return l.apply(t,a)}if(typeof n!="function")throw new TypeError("Expected a function");var u=F(n);return e}function T(n,t,r,e){return n===nn||M(n,ln[r])&&!pn.call(e,r)?t:n}function B(n,t,r,e,u,o){var i=n.length,c=t.length;if(i!=c&&!(1&r&&c>i))return false;for(var c=-1,f=true,a=2&r?[]:nn;++c<i;){var l=n[c],p=t[c];if(void 0!==nn){f=false;break}if(a){if(!E(t,function(n,t){if(!z(a,t)&&(l===n||u(l,n,r,e,o)))return a.push(t)})){f=false;break}}else if(l!==p&&!u(l,p,r,e,o)){f=false;break}}return f}function R(n,t,r,e,u,o){
+var i=1&r,c=In(n),f=c.length,a=In(t).length;if(f!=a&&!i)return false;for(var l=f;l--;){var p=c[l];if(!(i?p in t:pn.call(t,p)))return false}for(a=true;++l<f;){var p=c[l],s=n[p],h=t[p];if(void 0!==nn||s!==h&&!u(s,h,r,e,o)){a=false;break}i||(i="constructor"==p)}return a&&!i&&(r=n.constructor,e=t.constructor,r!=e&&"constructor"in n&&"constructor"in t&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(a=false)),a}function D(t){return Nn(t)||n(t)}function I(n){var t=[];if(null!=n)for(var r in Object(n))t.push(r);
+return t}function q(n,t,r){return t=jn(t===nn?n.length-1:t,0),function(){for(var e=arguments,u=-1,o=jn(e.length-t,0),i=Array(o);++u<o;)i[u]=e[t+u];for(u=-1,o=Array(t+1);++u<t;)o[u]=e[u];return o[t]=r(i),n.apply(this,o)}}function $(n){return(null==n?0:n.length)?p(n,1):[]}function P(n){return n&&n.length?n[0]:nn}function z(n,t,r){var e=null==n?0:n.length;r=typeof r=="number"?0>r?jn(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++r<e;){var o=n[r];if(u?o===t:o!==o)return r}return-1}function C(n,t){return mn(n,g(t));
+}function G(n,t,r){return e(n,g(t),r,3>arguments.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&&0==t%1&&9007199254740991>=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]}}({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),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--:++o<u)&&false!==e(i[o],o,i););return r}}(s),On=function(n){return function(t,r,e){var u=-1,o=Object(t);e=e(t);for(var i=e.length;i--;){var c=e[n?i:++u];if(false===r(o[c],c,o))break}return t}}(),xn=Y,An=function(n){return function(t,r,e){var u=Object(t);if(!U(t)){var o=g(r);t=In(t),r=function(n){return o(u[n],n,u)}}return r=n(t,r,e),-1<r?u[o?t[r]:r]:nn}}(function(n,t,r){var e=null==n?0:n.length;
+if(!e)return-1;r=null==r?0:Fn(r),0>r&&(r=jn(e+r,0));n:{for(t=g(t),e=n.length,r+=-1;++r<e;)if(t(n[r],r,n)){n=r;break n}n=-1}return n}),En=O(function(n,t,r){return S(n,t,r)}),wn=O(function(n,t){return c(n,1,t)}),kn=O(function(n,t,r){return c(n,Sn(t)||0,r)}),Nn=Array.isArray,Fn=Number,Sn=Number,Tn=N(function(n,t){k(t,_n(t),n)}),Bn=N(function(n,t){k(t,I(t),n)}),Rn=N(function(n,t,r,e){k(t,qn(t),n,e)}),Dn=O(function(n){return n.push(nn,T),Rn.apply(nn,n)}),In=_n,qn=I,$n=function(n){return xn(q(n,nn,$),n+"");
+}(function(n,t){return null==n?{}:m(n,t)});o.assignIn=Bn,o.before=J,o.bind=En,o.chain=function(n){return n=o(n),n.__chain__=true,n},o.compact=function(n){return l(n,Boolean)},o.concat=function(){var n=arguments.length;if(!n)return[];for(var r=Array(n-1),e=arguments[0];n--;)r[n-1]=arguments[n];return t(Nn(e)?A(e):[e],p(r,1))},o.create=function(n,t){var r=dn(n);return null==t?r:Tn(r,t)},o.defaults=Dn,o.defer=wn,o.delay=kn,o.filter=function(n,t){return l(n,g(t))},o.flatten=$,o.flattenDeep=function(n){
+return(null==n?0:n.length)?p(n,tn):[]},o.iteratee=g,o.keys=In,o.map=function(n,t){return j(n,g(t))},o.matches=function(n){return d(Tn({},n))},o.mixin=Z,o.negate=function(n){if(typeof n!="function")throw new TypeError("Expected a function");return function(){return!n.apply(this,arguments)}},o.once=function(n){return J(2,n)},o.pick=$n,o.slice=function(n,t,r){var e=null==n?0:n.length;return r=r===nn?e:+r,e?x(n,null==t?0:+t,r):[]},o.sortBy=function(n,t){var e=0;return t=g(t),j(j(n,function(n,r,u){return{
+value:n,index:e++,criteria:t(n,r,u)}}).sort(function(n,t){var r;n:{r=n.criteria;var e=t.criteria;if(r!==e){var u=r!==nn,o=null===r,i=r===r,c=e!==nn,f=null===e,a=e===e;if(!f&&r>e||o&&c&&a||!u&&a||!i){r=1;break n}if(!o&&r<e||f&&u&&i||!c&&i||!a){r=-1;break n}}r=0}return r||n.index-t.index}),r("value"))},o.tap=function(n,t){return t(n),n},o.thru=function(n,t){return t(n)},o.toArray=function(n){return U(n)?n.length?A(n):[]:X(n)},o.values=X,o.extend=Bn,Z(o,o),o.clone=function(n){return H(n)?Nn(n)?A(n):k(n,_n(n)):n;
+},o.escape=function(n){return(n=W(n))&&en.test(n)?n.replace(rn,fn):n},o.every=function(n,t,r){return t=r?nn:t,f(n,g(t))},o.find=An,o.forEach=C,o.has=function(n,t){return null!=n&&pn.call(n,t)},o.head=P,o.identity=Y,o.indexOf=z,o.isArguments=n,o.isArray=Nn,o.isBoolean=function(n){return true===n||false===n||K(n)&&"[object Boolean]"==hn.call(n)},o.isDate=function(n){return K(n)&&"[object Date]"==hn.call(n)},o.isEmpty=function(t){return U(t)&&(Nn(t)||Q(t)||V(t.splice)||n(t))?!t.length:!_n(t).length},o.isEqual=function(n,t){
+return y(n,t)},o.isFinite=function(n){return typeof n=="number"&&gn(n)},o.isFunction=V,o.isNaN=function(n){return L(n)&&n!=+n},o.isNull=function(n){return null===n},o.isNumber=L,o.isObject=H,o.isRegExp=function(n){return K(n)&&"[object RegExp]"==hn.call(n)},o.isString=Q,o.isUndefined=function(n){return n===nn},o.last=function(n){var t=null==n?0:n.length;return t?n[t-1]:nn},o.max=function(n){return n&&n.length?a(n,Y,v):nn},o.min=function(n){return n&&n.length?a(n,Y,_):nn},o.noConflict=function(){return on._===this&&(on._=vn),
+this},o.noop=function(){},o.reduce=G,o.result=function(n,t,r){return t=null==n?nn:n[t],t===nn&&(t=r),V(t)?t.call(n):t},o.size=function(n){return null==n?0:(n=U(n)?n:_n(n),n.length)},o.some=function(n,t,r){return t=r?nn:t,E(n,g(t))},o.uniqueId=function(n){var t=++sn;return W(n)+t},o.each=C,o.first=P,Z(o,function(){var n={};return s(o,function(t,r){pn.call(o.prototype,r)||(n[r]=t)}),n}(),{chain:false}),o.VERSION="4.17.4",mn("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){
+var t=(/^(?:replace|split)$/.test(n)?String.prototype:an)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);o.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(Nn(u)?u:[],n)}return this[r](function(r){return t.apply(Nn(r)?r:[],n)})}}),o.prototype.toJSON=o.prototype.valueOf=o.prototype.value=function(){return w(this.__wrapped__,this.__actions__)},typeof define=="function"&&typeof define.amd=="object"&&define.amd?(on._=o,
+define(function(){return o})):cn?((cn.exports=o)._=o,un._=o):on._=o}).call(this); \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/lodash/countBy.js b/tools/node_modules/eslint/node_modules/lodash/countBy.js
new file mode 100644
index 0000000000..0e88abc276
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/countBy.js
@@ -0,0 +1,40 @@
+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 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);
+ }
+});
+
+module.exports = countBy;
diff --git a/tools/node_modules/eslint/node_modules/lodash/create.js b/tools/node_modules/eslint/node_modules/lodash/create.js
new file mode 100644
index 0000000000..919edb850f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/curry.js b/tools/node_modules/eslint/node_modules/lodash/curry.js
new file mode 100644
index 0000000000..918db1a4a7
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/curryRight.js b/tools/node_modules/eslint/node_modules/lodash/curryRight.js
new file mode 100644
index 0000000000..c85b6f339b
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/date.js b/tools/node_modules/eslint/node_modules/lodash/date.js
new file mode 100644
index 0000000000..cbf5b41098
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/date.js
@@ -0,0 +1,3 @@
+module.exports = {
+ 'now': require('./now')
+};
diff --git a/tools/node_modules/eslint/node_modules/lodash/debounce.js b/tools/node_modules/eslint/node_modules/lodash/debounce.js
new file mode 100644
index 0000000000..04d7dfd317
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/deburr.js b/tools/node_modules/eslint/node_modules/lodash/deburr.js
new file mode 100644
index 0000000000..f85e314a0c
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/defaultTo.js b/tools/node_modules/eslint/node_modules/lodash/defaultTo.js
new file mode 100644
index 0000000000..5b333592e9
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/defaults.js b/tools/node_modules/eslint/node_modules/lodash/defaults.js
new file mode 100644
index 0000000000..6b75ee08ce
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/defaultsDeep.js b/tools/node_modules/eslint/node_modules/lodash/defaultsDeep.js
new file mode 100644
index 0000000000..9b5fa3ee22
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/defer.js b/tools/node_modules/eslint/node_modules/lodash/defer.js
new file mode 100644
index 0000000000..f6d6c6fa67
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/delay.js b/tools/node_modules/eslint/node_modules/lodash/delay.js
new file mode 100644
index 0000000000..bd554796fd
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/difference.js b/tools/node_modules/eslint/node_modules/lodash/difference.js
new file mode 100644
index 0000000000..fa28bb301f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/differenceBy.js b/tools/node_modules/eslint/node_modules/lodash/differenceBy.js
new file mode 100644
index 0000000000..2cd63e7ec0
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/differenceWith.js b/tools/node_modules/eslint/node_modules/lodash/differenceWith.js
new file mode 100644
index 0000000000..c0233f4b9c
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/divide.js b/tools/node_modules/eslint/node_modules/lodash/divide.js
new file mode 100644
index 0000000000..8cae0cd1b0
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/drop.js b/tools/node_modules/eslint/node_modules/lodash/drop.js
new file mode 100644
index 0000000000..d5c3cbaa4e
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/dropRight.js b/tools/node_modules/eslint/node_modules/lodash/dropRight.js
new file mode 100644
index 0000000000..441fe99681
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/dropRightWhile.js b/tools/node_modules/eslint/node_modules/lodash/dropRightWhile.js
new file mode 100644
index 0000000000..9ad36a0445
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/dropWhile.js b/tools/node_modules/eslint/node_modules/lodash/dropWhile.js
new file mode 100644
index 0000000000..903ef568c9
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/each.js b/tools/node_modules/eslint/node_modules/lodash/each.js
new file mode 100644
index 0000000000..8800f42046
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/each.js
@@ -0,0 +1 @@
+module.exports = require('./forEach');
diff --git a/tools/node_modules/eslint/node_modules/lodash/eachRight.js b/tools/node_modules/eslint/node_modules/lodash/eachRight.js
new file mode 100644
index 0000000000..3252b2aba3
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/eachRight.js
@@ -0,0 +1 @@
+module.exports = require('./forEachRight');
diff --git a/tools/node_modules/eslint/node_modules/lodash/endsWith.js b/tools/node_modules/eslint/node_modules/lodash/endsWith.js
new file mode 100644
index 0000000000..76fc866e3e
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/entries.js b/tools/node_modules/eslint/node_modules/lodash/entries.js
new file mode 100644
index 0000000000..7a88df2044
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/entries.js
@@ -0,0 +1 @@
+module.exports = require('./toPairs');
diff --git a/tools/node_modules/eslint/node_modules/lodash/entriesIn.js b/tools/node_modules/eslint/node_modules/lodash/entriesIn.js
new file mode 100644
index 0000000000..f6c6331c1d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/entriesIn.js
@@ -0,0 +1 @@
+module.exports = require('./toPairsIn');
diff --git a/tools/node_modules/eslint/node_modules/lodash/eq.js b/tools/node_modules/eslint/node_modules/lodash/eq.js
new file mode 100644
index 0000000000..a940688053
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/escape.js b/tools/node_modules/eslint/node_modules/lodash/escape.js
new file mode 100644
index 0000000000..9247e0029b
--- /dev/null
+++ b/tools/node_modules/eslint/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, &amp; pebbles'
+ */
+function escape(string) {
+ string = toString(string);
+ return (string && reHasUnescapedHtml.test(string))
+ ? string.replace(reUnescapedHtml, escapeHtmlChar)
+ : string;
+}
+
+module.exports = escape;
diff --git a/tools/node_modules/eslint/node_modules/lodash/escapeRegExp.js b/tools/node_modules/eslint/node_modules/lodash/escapeRegExp.js
new file mode 100644
index 0000000000..0a58c69fc8
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/every.js b/tools/node_modules/eslint/node_modules/lodash/every.js
new file mode 100644
index 0000000000..25080dac49
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/extend.js b/tools/node_modules/eslint/node_modules/lodash/extend.js
new file mode 100644
index 0000000000..e00166c206
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/extend.js
@@ -0,0 +1 @@
+module.exports = require('./assignIn');
diff --git a/tools/node_modules/eslint/node_modules/lodash/extendWith.js b/tools/node_modules/eslint/node_modules/lodash/extendWith.js
new file mode 100644
index 0000000000..dbdcb3b4e4
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/extendWith.js
@@ -0,0 +1 @@
+module.exports = require('./assignInWith');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fill.js b/tools/node_modules/eslint/node_modules/lodash/fill.js
new file mode 100644
index 0000000000..ae13aa1c99
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/filter.js b/tools/node_modules/eslint/node_modules/lodash/filter.js
new file mode 100644
index 0000000000..52616be8b0
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/find.js b/tools/node_modules/eslint/node_modules/lodash/find.js
new file mode 100644
index 0000000000..de732ccb49
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/findIndex.js b/tools/node_modules/eslint/node_modules/lodash/findIndex.js
new file mode 100644
index 0000000000..4689069f81
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/findKey.js b/tools/node_modules/eslint/node_modules/lodash/findKey.js
new file mode 100644
index 0000000000..cac0248a9d
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/findLast.js b/tools/node_modules/eslint/node_modules/lodash/findLast.js
new file mode 100644
index 0000000000..70b4271dc3
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/findLastIndex.js b/tools/node_modules/eslint/node_modules/lodash/findLastIndex.js
new file mode 100644
index 0000000000..7da3431f6d
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/findLastKey.js b/tools/node_modules/eslint/node_modules/lodash/findLastKey.js
new file mode 100644
index 0000000000..66fb9fbcec
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/first.js b/tools/node_modules/eslint/node_modules/lodash/first.js
new file mode 100644
index 0000000000..53f4ad13ee
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/first.js
@@ -0,0 +1 @@
+module.exports = require('./head');
diff --git a/tools/node_modules/eslint/node_modules/lodash/flatMap.js b/tools/node_modules/eslint/node_modules/lodash/flatMap.js
new file mode 100644
index 0000000000..e6685068f5
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/flatMapDeep.js b/tools/node_modules/eslint/node_modules/lodash/flatMapDeep.js
new file mode 100644
index 0000000000..4653d60333
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/flatMapDepth.js b/tools/node_modules/eslint/node_modules/lodash/flatMapDepth.js
new file mode 100644
index 0000000000..6d72005c97
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/flatten.js b/tools/node_modules/eslint/node_modules/lodash/flatten.js
new file mode 100644
index 0000000000..3f09f7f770
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/flattenDeep.js b/tools/node_modules/eslint/node_modules/lodash/flattenDeep.js
new file mode 100644
index 0000000000..8ad585cf49
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/flattenDepth.js b/tools/node_modules/eslint/node_modules/lodash/flattenDepth.js
new file mode 100644
index 0000000000..441fdcc224
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/flip.js b/tools/node_modules/eslint/node_modules/lodash/flip.js
new file mode 100644
index 0000000000..c28dd7896f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/floor.js b/tools/node_modules/eslint/node_modules/lodash/floor.js
new file mode 100644
index 0000000000..ab6dfa28a4
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/flow.js b/tools/node_modules/eslint/node_modules/lodash/flow.js
new file mode 100644
index 0000000000..74b6b62d40
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/flowRight.js b/tools/node_modules/eslint/node_modules/lodash/flowRight.js
new file mode 100644
index 0000000000..1146141059
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/forEach.js b/tools/node_modules/eslint/node_modules/lodash/forEach.js
new file mode 100644
index 0000000000..c64eaa73f1
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/forEachRight.js b/tools/node_modules/eslint/node_modules/lodash/forEachRight.js
new file mode 100644
index 0000000000..7390ebaf85
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/forIn.js b/tools/node_modules/eslint/node_modules/lodash/forIn.js
new file mode 100644
index 0000000000..583a59638f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/forInRight.js b/tools/node_modules/eslint/node_modules/lodash/forInRight.js
new file mode 100644
index 0000000000..4aedf58af5
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/forOwn.js b/tools/node_modules/eslint/node_modules/lodash/forOwn.js
new file mode 100644
index 0000000000..94eed8402a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/forOwnRight.js b/tools/node_modules/eslint/node_modules/lodash/forOwnRight.js
new file mode 100644
index 0000000000..86f338f032
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp.js b/tools/node_modules/eslint/node_modules/lodash/fp.js
new file mode 100644
index 0000000000..e372dbbdf6
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp.js
@@ -0,0 +1,2 @@
+var _ = require('./lodash.min').runInContext();
+module.exports = require('./fp/_baseConvert')(_, _);
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/F.js b/tools/node_modules/eslint/node_modules/lodash/fp/F.js
new file mode 100644
index 0000000000..a05a63ad9c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/F.js
@@ -0,0 +1 @@
+module.exports = require('./stubFalse');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/T.js b/tools/node_modules/eslint/node_modules/lodash/fp/T.js
new file mode 100644
index 0000000000..e2ba8ea569
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/T.js
@@ -0,0 +1 @@
+module.exports = require('./stubTrue');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/__.js b/tools/node_modules/eslint/node_modules/lodash/fp/__.js
new file mode 100644
index 0000000000..4af98deb4e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/__.js
@@ -0,0 +1 @@
+module.exports = require('./placeholder');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/_baseConvert.js b/tools/node_modules/eslint/node_modules/lodash/fp/_baseConvert.js
new file mode 100644
index 0000000000..7af27655bc
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/_convertBrowser.js b/tools/node_modules/eslint/node_modules/lodash/fp/_convertBrowser.js
new file mode 100644
index 0000000000..bde030dc08
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/_falseOptions.js b/tools/node_modules/eslint/node_modules/lodash/fp/_falseOptions.js
new file mode 100644
index 0000000000..773235e343
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/_mapping.js b/tools/node_modules/eslint/node_modules/lodash/fp/_mapping.js
new file mode 100644
index 0000000000..8f5ddf2d09
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/_util.js b/tools/node_modules/eslint/node_modules/lodash/fp/_util.js
new file mode 100644
index 0000000000..7084463026
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/add.js b/tools/node_modules/eslint/node_modules/lodash/fp/add.js
new file mode 100644
index 0000000000..816eeece34
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/after.js b/tools/node_modules/eslint/node_modules/lodash/fp/after.js
new file mode 100644
index 0000000000..21a0167ab2
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/all.js b/tools/node_modules/eslint/node_modules/lodash/fp/all.js
new file mode 100644
index 0000000000..d0839f77ed
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/all.js
@@ -0,0 +1 @@
+module.exports = require('./every');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/allPass.js b/tools/node_modules/eslint/node_modules/lodash/fp/allPass.js
new file mode 100644
index 0000000000..79b73ef845
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/allPass.js
@@ -0,0 +1 @@
+module.exports = require('./overEvery');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/always.js b/tools/node_modules/eslint/node_modules/lodash/fp/always.js
new file mode 100644
index 0000000000..988770307b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/always.js
@@ -0,0 +1 @@
+module.exports = require('./constant');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/any.js b/tools/node_modules/eslint/node_modules/lodash/fp/any.js
new file mode 100644
index 0000000000..900ac25e83
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/any.js
@@ -0,0 +1 @@
+module.exports = require('./some');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/anyPass.js b/tools/node_modules/eslint/node_modules/lodash/fp/anyPass.js
new file mode 100644
index 0000000000..2774ab37a4
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/anyPass.js
@@ -0,0 +1 @@
+module.exports = require('./overSome');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/apply.js b/tools/node_modules/eslint/node_modules/lodash/fp/apply.js
new file mode 100644
index 0000000000..2b75712962
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/apply.js
@@ -0,0 +1 @@
+module.exports = require('./spread');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/array.js b/tools/node_modules/eslint/node_modules/lodash/fp/array.js
new file mode 100644
index 0000000000..fe939c2c26
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/array.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../array'));
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/ary.js b/tools/node_modules/eslint/node_modules/lodash/fp/ary.js
new file mode 100644
index 0000000000..8edf18778d
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/assign.js b/tools/node_modules/eslint/node_modules/lodash/fp/assign.js
new file mode 100644
index 0000000000..23f47af17e
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/assignAll.js b/tools/node_modules/eslint/node_modules/lodash/fp/assignAll.js
new file mode 100644
index 0000000000..b1d36c7ef8
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/assignAllWith.js b/tools/node_modules/eslint/node_modules/lodash/fp/assignAllWith.js
new file mode 100644
index 0000000000..21e836e6f0
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/assignIn.js b/tools/node_modules/eslint/node_modules/lodash/fp/assignIn.js
new file mode 100644
index 0000000000..6e7c65fad8
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/assignInAll.js b/tools/node_modules/eslint/node_modules/lodash/fp/assignInAll.js
new file mode 100644
index 0000000000..7ba75dba11
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/assignInAllWith.js b/tools/node_modules/eslint/node_modules/lodash/fp/assignInAllWith.js
new file mode 100644
index 0000000000..e766903d4c
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/assignInWith.js b/tools/node_modules/eslint/node_modules/lodash/fp/assignInWith.js
new file mode 100644
index 0000000000..acb5923675
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/assignWith.js b/tools/node_modules/eslint/node_modules/lodash/fp/assignWith.js
new file mode 100644
index 0000000000..eb925212d5
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/assoc.js b/tools/node_modules/eslint/node_modules/lodash/fp/assoc.js
new file mode 100644
index 0000000000..7648820c99
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/assoc.js
@@ -0,0 +1 @@
+module.exports = require('./set');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/assocPath.js b/tools/node_modules/eslint/node_modules/lodash/fp/assocPath.js
new file mode 100644
index 0000000000..7648820c99
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/assocPath.js
@@ -0,0 +1 @@
+module.exports = require('./set');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/at.js b/tools/node_modules/eslint/node_modules/lodash/fp/at.js
new file mode 100644
index 0000000000..cc39d257c6
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/attempt.js b/tools/node_modules/eslint/node_modules/lodash/fp/attempt.js
new file mode 100644
index 0000000000..26ca42ea04
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/before.js b/tools/node_modules/eslint/node_modules/lodash/fp/before.js
new file mode 100644
index 0000000000..7a2de65d27
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/bind.js b/tools/node_modules/eslint/node_modules/lodash/fp/bind.js
new file mode 100644
index 0000000000..5cbe4f302f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/bindAll.js b/tools/node_modules/eslint/node_modules/lodash/fp/bindAll.js
new file mode 100644
index 0000000000..6b4a4a0f27
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/bindKey.js b/tools/node_modules/eslint/node_modules/lodash/fp/bindKey.js
new file mode 100644
index 0000000000..6a46c6b19c
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/camelCase.js b/tools/node_modules/eslint/node_modules/lodash/fp/camelCase.js
new file mode 100644
index 0000000000..87b77b4937
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/capitalize.js b/tools/node_modules/eslint/node_modules/lodash/fp/capitalize.js
new file mode 100644
index 0000000000..cac74e14f8
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/castArray.js b/tools/node_modules/eslint/node_modules/lodash/fp/castArray.js
new file mode 100644
index 0000000000..8681c099ea
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/ceil.js b/tools/node_modules/eslint/node_modules/lodash/fp/ceil.js
new file mode 100644
index 0000000000..f416b7294c
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/chain.js b/tools/node_modules/eslint/node_modules/lodash/fp/chain.js
new file mode 100644
index 0000000000..604fe398b1
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/chunk.js b/tools/node_modules/eslint/node_modules/lodash/fp/chunk.js
new file mode 100644
index 0000000000..871ab08580
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/clamp.js b/tools/node_modules/eslint/node_modules/lodash/fp/clamp.js
new file mode 100644
index 0000000000..3b06c01ce1
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/clone.js b/tools/node_modules/eslint/node_modules/lodash/fp/clone.js
new file mode 100644
index 0000000000..cadb59c917
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/cloneDeep.js b/tools/node_modules/eslint/node_modules/lodash/fp/cloneDeep.js
new file mode 100644
index 0000000000..a6107aac94
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/cloneDeepWith.js b/tools/node_modules/eslint/node_modules/lodash/fp/cloneDeepWith.js
new file mode 100644
index 0000000000..6f01e44a34
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/cloneWith.js b/tools/node_modules/eslint/node_modules/lodash/fp/cloneWith.js
new file mode 100644
index 0000000000..aa8857810e
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/collection.js b/tools/node_modules/eslint/node_modules/lodash/fp/collection.js
new file mode 100644
index 0000000000..fc8b328a0d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/collection.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../collection'));
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/commit.js b/tools/node_modules/eslint/node_modules/lodash/fp/commit.js
new file mode 100644
index 0000000000..130a894f89
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/compact.js b/tools/node_modules/eslint/node_modules/lodash/fp/compact.js
new file mode 100644
index 0000000000..ce8f7a1ac3
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/complement.js b/tools/node_modules/eslint/node_modules/lodash/fp/complement.js
new file mode 100644
index 0000000000..93eb462b35
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/complement.js
@@ -0,0 +1 @@
+module.exports = require('./negate');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/compose.js b/tools/node_modules/eslint/node_modules/lodash/fp/compose.js
new file mode 100644
index 0000000000..1954e94239
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/compose.js
@@ -0,0 +1 @@
+module.exports = require('./flowRight');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/concat.js b/tools/node_modules/eslint/node_modules/lodash/fp/concat.js
new file mode 100644
index 0000000000..e59346ad98
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/cond.js b/tools/node_modules/eslint/node_modules/lodash/fp/cond.js
new file mode 100644
index 0000000000..6a0120efd4
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/conforms.js b/tools/node_modules/eslint/node_modules/lodash/fp/conforms.js
new file mode 100644
index 0000000000..3247f64a8c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/conforms.js
@@ -0,0 +1 @@
+module.exports = require('./conformsTo');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/conformsTo.js b/tools/node_modules/eslint/node_modules/lodash/fp/conformsTo.js
new file mode 100644
index 0000000000..aa7f41ec09
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/constant.js b/tools/node_modules/eslint/node_modules/lodash/fp/constant.js
new file mode 100644
index 0000000000..9e406fc09c
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/contains.js b/tools/node_modules/eslint/node_modules/lodash/fp/contains.js
new file mode 100644
index 0000000000..594722af59
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/contains.js
@@ -0,0 +1 @@
+module.exports = require('./includes');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/convert.js b/tools/node_modules/eslint/node_modules/lodash/fp/convert.js
new file mode 100644
index 0000000000..4795dc4246
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/countBy.js b/tools/node_modules/eslint/node_modules/lodash/fp/countBy.js
new file mode 100644
index 0000000000..dfa464326f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/create.js b/tools/node_modules/eslint/node_modules/lodash/fp/create.js
new file mode 100644
index 0000000000..752025fb83
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/curry.js b/tools/node_modules/eslint/node_modules/lodash/fp/curry.js
new file mode 100644
index 0000000000..b0b4168c50
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/curryN.js b/tools/node_modules/eslint/node_modules/lodash/fp/curryN.js
new file mode 100644
index 0000000000..2ae7d00a62
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/curryRight.js b/tools/node_modules/eslint/node_modules/lodash/fp/curryRight.js
new file mode 100644
index 0000000000..cb619eb5d9
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/curryRightN.js b/tools/node_modules/eslint/node_modules/lodash/fp/curryRightN.js
new file mode 100644
index 0000000000..2495afc89c
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/date.js b/tools/node_modules/eslint/node_modules/lodash/fp/date.js
new file mode 100644
index 0000000000..82cb952bc4
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/date.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../date'));
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/debounce.js b/tools/node_modules/eslint/node_modules/lodash/fp/debounce.js
new file mode 100644
index 0000000000..26122293af
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/deburr.js b/tools/node_modules/eslint/node_modules/lodash/fp/deburr.js
new file mode 100644
index 0000000000..96463ab88e
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/defaultTo.js b/tools/node_modules/eslint/node_modules/lodash/fp/defaultTo.js
new file mode 100644
index 0000000000..d6b52a4447
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/defaults.js b/tools/node_modules/eslint/node_modules/lodash/fp/defaults.js
new file mode 100644
index 0000000000..e1a8e6e7db
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/defaultsAll.js b/tools/node_modules/eslint/node_modules/lodash/fp/defaultsAll.js
new file mode 100644
index 0000000000..238fcc3c2f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/defaultsDeep.js b/tools/node_modules/eslint/node_modules/lodash/fp/defaultsDeep.js
new file mode 100644
index 0000000000..1f172ff944
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/defaultsDeepAll.js b/tools/node_modules/eslint/node_modules/lodash/fp/defaultsDeepAll.js
new file mode 100644
index 0000000000..6835f2f079
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/defer.js b/tools/node_modules/eslint/node_modules/lodash/fp/defer.js
new file mode 100644
index 0000000000..ec7990fe22
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/delay.js b/tools/node_modules/eslint/node_modules/lodash/fp/delay.js
new file mode 100644
index 0000000000..556dbd568e
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/difference.js b/tools/node_modules/eslint/node_modules/lodash/fp/difference.js
new file mode 100644
index 0000000000..2d0376542a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/differenceBy.js b/tools/node_modules/eslint/node_modules/lodash/fp/differenceBy.js
new file mode 100644
index 0000000000..2f914910a9
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/differenceWith.js b/tools/node_modules/eslint/node_modules/lodash/fp/differenceWith.js
new file mode 100644
index 0000000000..bcf5ad2e11
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/dissoc.js b/tools/node_modules/eslint/node_modules/lodash/fp/dissoc.js
new file mode 100644
index 0000000000..7ec7be190b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/dissoc.js
@@ -0,0 +1 @@
+module.exports = require('./unset');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/dissocPath.js b/tools/node_modules/eslint/node_modules/lodash/fp/dissocPath.js
new file mode 100644
index 0000000000..7ec7be190b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/dissocPath.js
@@ -0,0 +1 @@
+module.exports = require('./unset');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/divide.js b/tools/node_modules/eslint/node_modules/lodash/fp/divide.js
new file mode 100644
index 0000000000..82048c5e02
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/drop.js b/tools/node_modules/eslint/node_modules/lodash/fp/drop.js
new file mode 100644
index 0000000000..2fa9b4faa5
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/dropLast.js b/tools/node_modules/eslint/node_modules/lodash/fp/dropLast.js
new file mode 100644
index 0000000000..174e525512
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/dropLast.js
@@ -0,0 +1 @@
+module.exports = require('./dropRight');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/dropLastWhile.js b/tools/node_modules/eslint/node_modules/lodash/fp/dropLastWhile.js
new file mode 100644
index 0000000000..be2a9d24ae
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/dropLastWhile.js
@@ -0,0 +1 @@
+module.exports = require('./dropRightWhile');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/dropRight.js b/tools/node_modules/eslint/node_modules/lodash/fp/dropRight.js
new file mode 100644
index 0000000000..e98881fcd4
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/dropRightWhile.js b/tools/node_modules/eslint/node_modules/lodash/fp/dropRightWhile.js
new file mode 100644
index 0000000000..cacaa70191
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/dropWhile.js b/tools/node_modules/eslint/node_modules/lodash/fp/dropWhile.js
new file mode 100644
index 0000000000..285f864d12
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/each.js b/tools/node_modules/eslint/node_modules/lodash/fp/each.js
new file mode 100644
index 0000000000..8800f42046
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/each.js
@@ -0,0 +1 @@
+module.exports = require('./forEach');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/eachRight.js b/tools/node_modules/eslint/node_modules/lodash/fp/eachRight.js
new file mode 100644
index 0000000000..3252b2aba3
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/eachRight.js
@@ -0,0 +1 @@
+module.exports = require('./forEachRight');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/endsWith.js b/tools/node_modules/eslint/node_modules/lodash/fp/endsWith.js
new file mode 100644
index 0000000000..17dc2a4951
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/entries.js b/tools/node_modules/eslint/node_modules/lodash/fp/entries.js
new file mode 100644
index 0000000000..7a88df2044
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/entries.js
@@ -0,0 +1 @@
+module.exports = require('./toPairs');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/entriesIn.js b/tools/node_modules/eslint/node_modules/lodash/fp/entriesIn.js
new file mode 100644
index 0000000000..f6c6331c1d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/entriesIn.js
@@ -0,0 +1 @@
+module.exports = require('./toPairsIn');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/eq.js b/tools/node_modules/eslint/node_modules/lodash/fp/eq.js
new file mode 100644
index 0000000000..9a3d21bf1d
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/equals.js b/tools/node_modules/eslint/node_modules/lodash/fp/equals.js
new file mode 100644
index 0000000000..e6a5ce0caf
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/equals.js
@@ -0,0 +1 @@
+module.exports = require('./isEqual');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/escape.js b/tools/node_modules/eslint/node_modules/lodash/fp/escape.js
new file mode 100644
index 0000000000..52c1fbba60
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/escapeRegExp.js b/tools/node_modules/eslint/node_modules/lodash/fp/escapeRegExp.js
new file mode 100644
index 0000000000..369b2eff6e
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/every.js b/tools/node_modules/eslint/node_modules/lodash/fp/every.js
new file mode 100644
index 0000000000..95c2776c33
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/extend.js b/tools/node_modules/eslint/node_modules/lodash/fp/extend.js
new file mode 100644
index 0000000000..e00166c206
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/extend.js
@@ -0,0 +1 @@
+module.exports = require('./assignIn');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/extendAll.js b/tools/node_modules/eslint/node_modules/lodash/fp/extendAll.js
new file mode 100644
index 0000000000..cc55b64fcc
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/extendAll.js
@@ -0,0 +1 @@
+module.exports = require('./assignInAll');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/extendAllWith.js b/tools/node_modules/eslint/node_modules/lodash/fp/extendAllWith.js
new file mode 100644
index 0000000000..6679d208bc
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/extendAllWith.js
@@ -0,0 +1 @@
+module.exports = require('./assignInAllWith');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/extendWith.js b/tools/node_modules/eslint/node_modules/lodash/fp/extendWith.js
new file mode 100644
index 0000000000..dbdcb3b4e4
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/extendWith.js
@@ -0,0 +1 @@
+module.exports = require('./assignInWith');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/fill.js b/tools/node_modules/eslint/node_modules/lodash/fp/fill.js
new file mode 100644
index 0000000000..b2d47e84eb
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/filter.js b/tools/node_modules/eslint/node_modules/lodash/fp/filter.js
new file mode 100644
index 0000000000..796d501ce8
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/find.js b/tools/node_modules/eslint/node_modules/lodash/fp/find.js
new file mode 100644
index 0000000000..f805d336aa
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/findFrom.js b/tools/node_modules/eslint/node_modules/lodash/fp/findFrom.js
new file mode 100644
index 0000000000..da8275e840
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/findIndex.js b/tools/node_modules/eslint/node_modules/lodash/fp/findIndex.js
new file mode 100644
index 0000000000..8c15fd1160
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/findIndexFrom.js b/tools/node_modules/eslint/node_modules/lodash/fp/findIndexFrom.js
new file mode 100644
index 0000000000..32e98cb953
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/findKey.js b/tools/node_modules/eslint/node_modules/lodash/fp/findKey.js
new file mode 100644
index 0000000000..475bcfa8a5
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/findLast.js b/tools/node_modules/eslint/node_modules/lodash/fp/findLast.js
new file mode 100644
index 0000000000..093fe94e74
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/findLastFrom.js b/tools/node_modules/eslint/node_modules/lodash/fp/findLastFrom.js
new file mode 100644
index 0000000000..76c38fbad2
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/findLastIndex.js b/tools/node_modules/eslint/node_modules/lodash/fp/findLastIndex.js
new file mode 100644
index 0000000000..36986df0b8
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/findLastIndexFrom.js b/tools/node_modules/eslint/node_modules/lodash/fp/findLastIndexFrom.js
new file mode 100644
index 0000000000..34c8176cf1
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/findLastKey.js b/tools/node_modules/eslint/node_modules/lodash/fp/findLastKey.js
new file mode 100644
index 0000000000..5f81b604e8
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/first.js b/tools/node_modules/eslint/node_modules/lodash/fp/first.js
new file mode 100644
index 0000000000..53f4ad13ee
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/first.js
@@ -0,0 +1 @@
+module.exports = require('./head');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/flatMap.js b/tools/node_modules/eslint/node_modules/lodash/fp/flatMap.js
new file mode 100644
index 0000000000..d01dc4d048
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/flatMapDeep.js b/tools/node_modules/eslint/node_modules/lodash/fp/flatMapDeep.js
new file mode 100644
index 0000000000..569c42eb9f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/flatMapDepth.js b/tools/node_modules/eslint/node_modules/lodash/fp/flatMapDepth.js
new file mode 100644
index 0000000000..6eb68fdeed
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/flatten.js b/tools/node_modules/eslint/node_modules/lodash/fp/flatten.js
new file mode 100644
index 0000000000..30425d8962
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/flattenDeep.js b/tools/node_modules/eslint/node_modules/lodash/fp/flattenDeep.js
new file mode 100644
index 0000000000..aed5db27c0
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/flattenDepth.js b/tools/node_modules/eslint/node_modules/lodash/fp/flattenDepth.js
new file mode 100644
index 0000000000..ad65e378ef
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/flip.js b/tools/node_modules/eslint/node_modules/lodash/fp/flip.js
new file mode 100644
index 0000000000..0547e7b4ea
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/floor.js b/tools/node_modules/eslint/node_modules/lodash/fp/floor.js
new file mode 100644
index 0000000000..a6cf3358ed
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/flow.js b/tools/node_modules/eslint/node_modules/lodash/fp/flow.js
new file mode 100644
index 0000000000..cd83677a62
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/flowRight.js b/tools/node_modules/eslint/node_modules/lodash/fp/flowRight.js
new file mode 100644
index 0000000000..972a5b9b1c
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/forEach.js b/tools/node_modules/eslint/node_modules/lodash/fp/forEach.js
new file mode 100644
index 0000000000..2f494521c8
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/forEachRight.js b/tools/node_modules/eslint/node_modules/lodash/fp/forEachRight.js
new file mode 100644
index 0000000000..3ff97336bb
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/forIn.js b/tools/node_modules/eslint/node_modules/lodash/fp/forIn.js
new file mode 100644
index 0000000000..9341749b1f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/forInRight.js b/tools/node_modules/eslint/node_modules/lodash/fp/forInRight.js
new file mode 100644
index 0000000000..cecf8bbfa6
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/forOwn.js b/tools/node_modules/eslint/node_modules/lodash/fp/forOwn.js
new file mode 100644
index 0000000000..246449e9a8
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/forOwnRight.js b/tools/node_modules/eslint/node_modules/lodash/fp/forOwnRight.js
new file mode 100644
index 0000000000..c5e826e0d7
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/fromPairs.js b/tools/node_modules/eslint/node_modules/lodash/fp/fromPairs.js
new file mode 100644
index 0000000000..f8cc5968cd
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/function.js b/tools/node_modules/eslint/node_modules/lodash/fp/function.js
new file mode 100644
index 0000000000..dfe69b1fa0
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/function.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../function'));
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/functions.js b/tools/node_modules/eslint/node_modules/lodash/fp/functions.js
new file mode 100644
index 0000000000..09d1bb1baa
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/functionsIn.js b/tools/node_modules/eslint/node_modules/lodash/fp/functionsIn.js
new file mode 100644
index 0000000000..2cfeb83ebb
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/get.js b/tools/node_modules/eslint/node_modules/lodash/fp/get.js
new file mode 100644
index 0000000000..6d3a32863e
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/getOr.js b/tools/node_modules/eslint/node_modules/lodash/fp/getOr.js
new file mode 100644
index 0000000000..7dbf771f0c
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/groupBy.js b/tools/node_modules/eslint/node_modules/lodash/fp/groupBy.js
new file mode 100644
index 0000000000..fc0bc78a57
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/gt.js b/tools/node_modules/eslint/node_modules/lodash/fp/gt.js
new file mode 100644
index 0000000000..9e57c8085a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/gte.js b/tools/node_modules/eslint/node_modules/lodash/fp/gte.js
new file mode 100644
index 0000000000..4584786389
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/has.js b/tools/node_modules/eslint/node_modules/lodash/fp/has.js
new file mode 100644
index 0000000000..b901298398
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/hasIn.js b/tools/node_modules/eslint/node_modules/lodash/fp/hasIn.js
new file mode 100644
index 0000000000..b3c3d1a3f3
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/head.js b/tools/node_modules/eslint/node_modules/lodash/fp/head.js
new file mode 100644
index 0000000000..2694f0a21d
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/identical.js b/tools/node_modules/eslint/node_modules/lodash/fp/identical.js
new file mode 100644
index 0000000000..85563f4a46
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/identical.js
@@ -0,0 +1 @@
+module.exports = require('./eq');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/identity.js b/tools/node_modules/eslint/node_modules/lodash/fp/identity.js
new file mode 100644
index 0000000000..096415a5de
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/inRange.js b/tools/node_modules/eslint/node_modules/lodash/fp/inRange.js
new file mode 100644
index 0000000000..202d940bae
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/includes.js b/tools/node_modules/eslint/node_modules/lodash/fp/includes.js
new file mode 100644
index 0000000000..11467805ce
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/includesFrom.js b/tools/node_modules/eslint/node_modules/lodash/fp/includesFrom.js
new file mode 100644
index 0000000000..683afdb463
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/indexBy.js b/tools/node_modules/eslint/node_modules/lodash/fp/indexBy.js
new file mode 100644
index 0000000000..7e64bc0fcd
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/indexBy.js
@@ -0,0 +1 @@
+module.exports = require('./keyBy');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/indexOf.js b/tools/node_modules/eslint/node_modules/lodash/fp/indexOf.js
new file mode 100644
index 0000000000..524658eb95
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/indexOfFrom.js b/tools/node_modules/eslint/node_modules/lodash/fp/indexOfFrom.js
new file mode 100644
index 0000000000..d99c822f46
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/init.js b/tools/node_modules/eslint/node_modules/lodash/fp/init.js
new file mode 100644
index 0000000000..2f88d8b0e1
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/init.js
@@ -0,0 +1 @@
+module.exports = require('./initial');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/initial.js b/tools/node_modules/eslint/node_modules/lodash/fp/initial.js
new file mode 100644
index 0000000000..b732ba0bd6
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/intersection.js b/tools/node_modules/eslint/node_modules/lodash/fp/intersection.js
new file mode 100644
index 0000000000..52936d560c
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/intersectionBy.js b/tools/node_modules/eslint/node_modules/lodash/fp/intersectionBy.js
new file mode 100644
index 0000000000..72629f277d
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/intersectionWith.js b/tools/node_modules/eslint/node_modules/lodash/fp/intersectionWith.js
new file mode 100644
index 0000000000..e064f400f8
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/invert.js b/tools/node_modules/eslint/node_modules/lodash/fp/invert.js
new file mode 100644
index 0000000000..2d5d1f0d45
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/invertBy.js b/tools/node_modules/eslint/node_modules/lodash/fp/invertBy.js
new file mode 100644
index 0000000000..63ca97ecb2
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/invertObj.js b/tools/node_modules/eslint/node_modules/lodash/fp/invertObj.js
new file mode 100644
index 0000000000..f1d842e49b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/invertObj.js
@@ -0,0 +1 @@
+module.exports = require('./invert');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/invoke.js b/tools/node_modules/eslint/node_modules/lodash/fp/invoke.js
new file mode 100644
index 0000000000..fcf17f0d57
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/invokeArgs.js b/tools/node_modules/eslint/node_modules/lodash/fp/invokeArgs.js
new file mode 100644
index 0000000000..d3f2953fa3
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/invokeArgsMap.js b/tools/node_modules/eslint/node_modules/lodash/fp/invokeArgsMap.js
new file mode 100644
index 0000000000..eaa9f84ffb
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/invokeMap.js b/tools/node_modules/eslint/node_modules/lodash/fp/invokeMap.js
new file mode 100644
index 0000000000..6515fd73f1
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/isArguments.js b/tools/node_modules/eslint/node_modules/lodash/fp/isArguments.js
new file mode 100644
index 0000000000..1d93c9e599
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/isArray.js b/tools/node_modules/eslint/node_modules/lodash/fp/isArray.js
new file mode 100644
index 0000000000..ba7ade8ddc
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/isArrayBuffer.js b/tools/node_modules/eslint/node_modules/lodash/fp/isArrayBuffer.js
new file mode 100644
index 0000000000..5088513faf
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/isArrayLike.js b/tools/node_modules/eslint/node_modules/lodash/fp/isArrayLike.js
new file mode 100644
index 0000000000..8f1856bf6f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/isArrayLikeObject.js b/tools/node_modules/eslint/node_modules/lodash/fp/isArrayLikeObject.js
new file mode 100644
index 0000000000..21084984bc
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/isBoolean.js b/tools/node_modules/eslint/node_modules/lodash/fp/isBoolean.js
new file mode 100644
index 0000000000..9339f75b1f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/isBuffer.js b/tools/node_modules/eslint/node_modules/lodash/fp/isBuffer.js
new file mode 100644
index 0000000000..e60b123818
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/isDate.js b/tools/node_modules/eslint/node_modules/lodash/fp/isDate.js
new file mode 100644
index 0000000000..dc41d089ec
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/isElement.js b/tools/node_modules/eslint/node_modules/lodash/fp/isElement.js
new file mode 100644
index 0000000000..18ee039a2d
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/isEmpty.js b/tools/node_modules/eslint/node_modules/lodash/fp/isEmpty.js
new file mode 100644
index 0000000000..0f4ae841e2
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/isEqual.js b/tools/node_modules/eslint/node_modules/lodash/fp/isEqual.js
new file mode 100644
index 0000000000..41383865f2
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/isEqualWith.js b/tools/node_modules/eslint/node_modules/lodash/fp/isEqualWith.js
new file mode 100644
index 0000000000..029ff5cdaa
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/isError.js b/tools/node_modules/eslint/node_modules/lodash/fp/isError.js
new file mode 100644
index 0000000000..3dfd81ccc2
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/isFinite.js b/tools/node_modules/eslint/node_modules/lodash/fp/isFinite.js
new file mode 100644
index 0000000000..0b647b841e
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/isFunction.js b/tools/node_modules/eslint/node_modules/lodash/fp/isFunction.js
new file mode 100644
index 0000000000..ff8e5c4585
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/isInteger.js b/tools/node_modules/eslint/node_modules/lodash/fp/isInteger.js
new file mode 100644
index 0000000000..67af4ff6db
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/isLength.js b/tools/node_modules/eslint/node_modules/lodash/fp/isLength.js
new file mode 100644
index 0000000000..fc101c5a64
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/isMap.js b/tools/node_modules/eslint/node_modules/lodash/fp/isMap.js
new file mode 100644
index 0000000000..a209aa66fc
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/isMatch.js b/tools/node_modules/eslint/node_modules/lodash/fp/isMatch.js
new file mode 100644
index 0000000000..6264ca17fa
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/isMatchWith.js b/tools/node_modules/eslint/node_modules/lodash/fp/isMatchWith.js
new file mode 100644
index 0000000000..d95f319353
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/isNaN.js b/tools/node_modules/eslint/node_modules/lodash/fp/isNaN.js
new file mode 100644
index 0000000000..66a978f111
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/isNative.js b/tools/node_modules/eslint/node_modules/lodash/fp/isNative.js
new file mode 100644
index 0000000000..3d775ba953
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/isNil.js b/tools/node_modules/eslint/node_modules/lodash/fp/isNil.js
new file mode 100644
index 0000000000..5952c028a9
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/isNull.js b/tools/node_modules/eslint/node_modules/lodash/fp/isNull.js
new file mode 100644
index 0000000000..f201a354b4
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/isNumber.js b/tools/node_modules/eslint/node_modules/lodash/fp/isNumber.js
new file mode 100644
index 0000000000..a2b5fa049f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/isObject.js b/tools/node_modules/eslint/node_modules/lodash/fp/isObject.js
new file mode 100644
index 0000000000..231ace03bc
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/isObjectLike.js b/tools/node_modules/eslint/node_modules/lodash/fp/isObjectLike.js
new file mode 100644
index 0000000000..f16082e6fe
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/isPlainObject.js b/tools/node_modules/eslint/node_modules/lodash/fp/isPlainObject.js
new file mode 100644
index 0000000000..b5bea90d3a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/isRegExp.js b/tools/node_modules/eslint/node_modules/lodash/fp/isRegExp.js
new file mode 100644
index 0000000000..12a1a3d718
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/isSafeInteger.js b/tools/node_modules/eslint/node_modules/lodash/fp/isSafeInteger.js
new file mode 100644
index 0000000000..7230f5520a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/isSet.js b/tools/node_modules/eslint/node_modules/lodash/fp/isSet.js
new file mode 100644
index 0000000000..35c01f6fa1
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/isString.js b/tools/node_modules/eslint/node_modules/lodash/fp/isString.js
new file mode 100644
index 0000000000..1fd0679ef8
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/isSymbol.js b/tools/node_modules/eslint/node_modules/lodash/fp/isSymbol.js
new file mode 100644
index 0000000000..38676956da
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/isTypedArray.js b/tools/node_modules/eslint/node_modules/lodash/fp/isTypedArray.js
new file mode 100644
index 0000000000..8567953875
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/isUndefined.js b/tools/node_modules/eslint/node_modules/lodash/fp/isUndefined.js
new file mode 100644
index 0000000000..ddbca31ca7
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/isWeakMap.js b/tools/node_modules/eslint/node_modules/lodash/fp/isWeakMap.js
new file mode 100644
index 0000000000..ef60c613c4
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/isWeakSet.js b/tools/node_modules/eslint/node_modules/lodash/fp/isWeakSet.js
new file mode 100644
index 0000000000..c99bfaa6d9
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/iteratee.js b/tools/node_modules/eslint/node_modules/lodash/fp/iteratee.js
new file mode 100644
index 0000000000..9f0f71738a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/join.js b/tools/node_modules/eslint/node_modules/lodash/fp/join.js
new file mode 100644
index 0000000000..a220e003c4
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/juxt.js b/tools/node_modules/eslint/node_modules/lodash/fp/juxt.js
new file mode 100644
index 0000000000..f71e04e000
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/juxt.js
@@ -0,0 +1 @@
+module.exports = require('./over');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/kebabCase.js b/tools/node_modules/eslint/node_modules/lodash/fp/kebabCase.js
new file mode 100644
index 0000000000..60737f17cd
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/keyBy.js b/tools/node_modules/eslint/node_modules/lodash/fp/keyBy.js
new file mode 100644
index 0000000000..9a6a85d422
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/keys.js b/tools/node_modules/eslint/node_modules/lodash/fp/keys.js
new file mode 100644
index 0000000000..e12bb07f13
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/keysIn.js b/tools/node_modules/eslint/node_modules/lodash/fp/keysIn.js
new file mode 100644
index 0000000000..f3eb36a8d2
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/lang.js b/tools/node_modules/eslint/node_modules/lodash/fp/lang.js
new file mode 100644
index 0000000000..08cc9c14bd
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/lang.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../lang'));
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/last.js b/tools/node_modules/eslint/node_modules/lodash/fp/last.js
new file mode 100644
index 0000000000..0f716993fc
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/lastIndexOf.js b/tools/node_modules/eslint/node_modules/lodash/fp/lastIndexOf.js
new file mode 100644
index 0000000000..ddf39c3013
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/lastIndexOfFrom.js b/tools/node_modules/eslint/node_modules/lodash/fp/lastIndexOfFrom.js
new file mode 100644
index 0000000000..1ff6a0b5ad
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/lowerCase.js b/tools/node_modules/eslint/node_modules/lodash/fp/lowerCase.js
new file mode 100644
index 0000000000..ea64bc15d6
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/lowerFirst.js b/tools/node_modules/eslint/node_modules/lodash/fp/lowerFirst.js
new file mode 100644
index 0000000000..539720a3da
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/lt.js b/tools/node_modules/eslint/node_modules/lodash/fp/lt.js
new file mode 100644
index 0000000000..a31d21ecc6
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/lte.js b/tools/node_modules/eslint/node_modules/lodash/fp/lte.js
new file mode 100644
index 0000000000..d795d10ee7
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/map.js b/tools/node_modules/eslint/node_modules/lodash/fp/map.js
new file mode 100644
index 0000000000..cf98794362
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/mapKeys.js b/tools/node_modules/eslint/node_modules/lodash/fp/mapKeys.js
new file mode 100644
index 0000000000..1684587099
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/mapValues.js b/tools/node_modules/eslint/node_modules/lodash/fp/mapValues.js
new file mode 100644
index 0000000000..4004972751
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/matches.js b/tools/node_modules/eslint/node_modules/lodash/fp/matches.js
new file mode 100644
index 0000000000..29d1e1e4f1
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/matches.js
@@ -0,0 +1 @@
+module.exports = require('./isMatch');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/matchesProperty.js b/tools/node_modules/eslint/node_modules/lodash/fp/matchesProperty.js
new file mode 100644
index 0000000000..4575bd2431
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/math.js b/tools/node_modules/eslint/node_modules/lodash/fp/math.js
new file mode 100644
index 0000000000..e8f50f7927
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/math.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../math'));
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/max.js b/tools/node_modules/eslint/node_modules/lodash/fp/max.js
new file mode 100644
index 0000000000..a66acac220
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/maxBy.js b/tools/node_modules/eslint/node_modules/lodash/fp/maxBy.js
new file mode 100644
index 0000000000..d083fd64fd
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/mean.js b/tools/node_modules/eslint/node_modules/lodash/fp/mean.js
new file mode 100644
index 0000000000..31172460c3
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/meanBy.js b/tools/node_modules/eslint/node_modules/lodash/fp/meanBy.js
new file mode 100644
index 0000000000..556f25edfe
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/memoize.js b/tools/node_modules/eslint/node_modules/lodash/fp/memoize.js
new file mode 100644
index 0000000000..638eec63ba
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/merge.js b/tools/node_modules/eslint/node_modules/lodash/fp/merge.js
new file mode 100644
index 0000000000..ac66adde12
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/mergeAll.js b/tools/node_modules/eslint/node_modules/lodash/fp/mergeAll.js
new file mode 100644
index 0000000000..a3674d6716
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/mergeAllWith.js b/tools/node_modules/eslint/node_modules/lodash/fp/mergeAllWith.js
new file mode 100644
index 0000000000..4bd4206dc7
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/mergeWith.js b/tools/node_modules/eslint/node_modules/lodash/fp/mergeWith.js
new file mode 100644
index 0000000000..00d44d5e1a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/method.js b/tools/node_modules/eslint/node_modules/lodash/fp/method.js
new file mode 100644
index 0000000000..f4060c6878
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/methodOf.js b/tools/node_modules/eslint/node_modules/lodash/fp/methodOf.js
new file mode 100644
index 0000000000..61399056f3
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/min.js b/tools/node_modules/eslint/node_modules/lodash/fp/min.js
new file mode 100644
index 0000000000..d12c6b40d3
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/minBy.js b/tools/node_modules/eslint/node_modules/lodash/fp/minBy.js
new file mode 100644
index 0000000000..fdb9e24d8a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/mixin.js b/tools/node_modules/eslint/node_modules/lodash/fp/mixin.js
new file mode 100644
index 0000000000..332e6fbfdd
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/multiply.js b/tools/node_modules/eslint/node_modules/lodash/fp/multiply.js
new file mode 100644
index 0000000000..4dcf0b0d4a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/nAry.js b/tools/node_modules/eslint/node_modules/lodash/fp/nAry.js
new file mode 100644
index 0000000000..f262a76ccd
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/nAry.js
@@ -0,0 +1 @@
+module.exports = require('./ary');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/negate.js b/tools/node_modules/eslint/node_modules/lodash/fp/negate.js
new file mode 100644
index 0000000000..8b6dc7c5b8
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/next.js b/tools/node_modules/eslint/node_modules/lodash/fp/next.js
new file mode 100644
index 0000000000..140155e232
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/noop.js b/tools/node_modules/eslint/node_modules/lodash/fp/noop.js
new file mode 100644
index 0000000000..b9e32cc8cd
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/now.js b/tools/node_modules/eslint/node_modules/lodash/fp/now.js
new file mode 100644
index 0000000000..6de2068aac
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/nth.js b/tools/node_modules/eslint/node_modules/lodash/fp/nth.js
new file mode 100644
index 0000000000..da4fda7409
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/nthArg.js b/tools/node_modules/eslint/node_modules/lodash/fp/nthArg.js
new file mode 100644
index 0000000000..fce3165942
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/number.js b/tools/node_modules/eslint/node_modules/lodash/fp/number.js
new file mode 100644
index 0000000000..5c10b8842d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/number.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../number'));
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/object.js b/tools/node_modules/eslint/node_modules/lodash/fp/object.js
new file mode 100644
index 0000000000..ae39a1346c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/object.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../object'));
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/omit.js b/tools/node_modules/eslint/node_modules/lodash/fp/omit.js
new file mode 100644
index 0000000000..fd685291e6
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/omitAll.js b/tools/node_modules/eslint/node_modules/lodash/fp/omitAll.js
new file mode 100644
index 0000000000..144cf4b96e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/omitAll.js
@@ -0,0 +1 @@
+module.exports = require('./omit');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/omitBy.js b/tools/node_modules/eslint/node_modules/lodash/fp/omitBy.js
new file mode 100644
index 0000000000..90df738026
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/once.js b/tools/node_modules/eslint/node_modules/lodash/fp/once.js
new file mode 100644
index 0000000000..f8f0a5c73e
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/orderBy.js b/tools/node_modules/eslint/node_modules/lodash/fp/orderBy.js
new file mode 100644
index 0000000000..848e210754
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/over.js b/tools/node_modules/eslint/node_modules/lodash/fp/over.js
new file mode 100644
index 0000000000..01eba7b984
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/overArgs.js b/tools/node_modules/eslint/node_modules/lodash/fp/overArgs.js
new file mode 100644
index 0000000000..738556f0c0
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/overEvery.js b/tools/node_modules/eslint/node_modules/lodash/fp/overEvery.js
new file mode 100644
index 0000000000..9f5a032dc7
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/overSome.js b/tools/node_modules/eslint/node_modules/lodash/fp/overSome.js
new file mode 100644
index 0000000000..15939d5865
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/pad.js b/tools/node_modules/eslint/node_modules/lodash/fp/pad.js
new file mode 100644
index 0000000000..f1dea4a98f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/padChars.js b/tools/node_modules/eslint/node_modules/lodash/fp/padChars.js
new file mode 100644
index 0000000000..d6e0804cd6
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/padCharsEnd.js b/tools/node_modules/eslint/node_modules/lodash/fp/padCharsEnd.js
new file mode 100644
index 0000000000..d4ab79ad30
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/padCharsStart.js b/tools/node_modules/eslint/node_modules/lodash/fp/padCharsStart.js
new file mode 100644
index 0000000000..a08a30000a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/padEnd.js b/tools/node_modules/eslint/node_modules/lodash/fp/padEnd.js
new file mode 100644
index 0000000000..a8522ec36a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/padStart.js b/tools/node_modules/eslint/node_modules/lodash/fp/padStart.js
new file mode 100644
index 0000000000..f4ca79d4af
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/parseInt.js b/tools/node_modules/eslint/node_modules/lodash/fp/parseInt.js
new file mode 100644
index 0000000000..27314ccbca
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/partial.js b/tools/node_modules/eslint/node_modules/lodash/fp/partial.js
new file mode 100644
index 0000000000..5d4601598b
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/partialRight.js b/tools/node_modules/eslint/node_modules/lodash/fp/partialRight.js
new file mode 100644
index 0000000000..7f05fed0ab
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/partition.js b/tools/node_modules/eslint/node_modules/lodash/fp/partition.js
new file mode 100644
index 0000000000..2ebcacc1f4
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/path.js b/tools/node_modules/eslint/node_modules/lodash/fp/path.js
new file mode 100644
index 0000000000..b29cfb2139
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/path.js
@@ -0,0 +1 @@
+module.exports = require('./get');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/pathEq.js b/tools/node_modules/eslint/node_modules/lodash/fp/pathEq.js
new file mode 100644
index 0000000000..36c027a383
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/pathEq.js
@@ -0,0 +1 @@
+module.exports = require('./matchesProperty');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/pathOr.js b/tools/node_modules/eslint/node_modules/lodash/fp/pathOr.js
new file mode 100644
index 0000000000..4ab582091b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/pathOr.js
@@ -0,0 +1 @@
+module.exports = require('./getOr');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/paths.js b/tools/node_modules/eslint/node_modules/lodash/fp/paths.js
new file mode 100644
index 0000000000..1eb7950ac0
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/paths.js
@@ -0,0 +1 @@
+module.exports = require('./at');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/pick.js b/tools/node_modules/eslint/node_modules/lodash/fp/pick.js
new file mode 100644
index 0000000000..197393de1d
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/pickAll.js b/tools/node_modules/eslint/node_modules/lodash/fp/pickAll.js
new file mode 100644
index 0000000000..a8ecd46131
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/pickAll.js
@@ -0,0 +1 @@
+module.exports = require('./pick');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/pickBy.js b/tools/node_modules/eslint/node_modules/lodash/fp/pickBy.js
new file mode 100644
index 0000000000..d832d16b6c
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/pipe.js b/tools/node_modules/eslint/node_modules/lodash/fp/pipe.js
new file mode 100644
index 0000000000..b2e1e2cc8d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/pipe.js
@@ -0,0 +1 @@
+module.exports = require('./flow');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/placeholder.js b/tools/node_modules/eslint/node_modules/lodash/fp/placeholder.js
new file mode 100644
index 0000000000..1ce17393b9
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/placeholder.js
@@ -0,0 +1,6 @@
+/**
+ * The default argument placeholder value for methods.
+ *
+ * @type {Object}
+ */
+module.exports = {};
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/plant.js b/tools/node_modules/eslint/node_modules/lodash/fp/plant.js
new file mode 100644
index 0000000000..eca8f32b4a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/pluck.js b/tools/node_modules/eslint/node_modules/lodash/fp/pluck.js
new file mode 100644
index 0000000000..0d1e1abfaf
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/pluck.js
@@ -0,0 +1 @@
+module.exports = require('./map');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/prop.js b/tools/node_modules/eslint/node_modules/lodash/fp/prop.js
new file mode 100644
index 0000000000..b29cfb2139
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/prop.js
@@ -0,0 +1 @@
+module.exports = require('./get');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/propEq.js b/tools/node_modules/eslint/node_modules/lodash/fp/propEq.js
new file mode 100644
index 0000000000..36c027a383
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/propEq.js
@@ -0,0 +1 @@
+module.exports = require('./matchesProperty');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/propOr.js b/tools/node_modules/eslint/node_modules/lodash/fp/propOr.js
new file mode 100644
index 0000000000..4ab582091b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/propOr.js
@@ -0,0 +1 @@
+module.exports = require('./getOr');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/property.js b/tools/node_modules/eslint/node_modules/lodash/fp/property.js
new file mode 100644
index 0000000000..b29cfb2139
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/property.js
@@ -0,0 +1 @@
+module.exports = require('./get');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/propertyOf.js b/tools/node_modules/eslint/node_modules/lodash/fp/propertyOf.js
new file mode 100644
index 0000000000..f6273ee47a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/props.js b/tools/node_modules/eslint/node_modules/lodash/fp/props.js
new file mode 100644
index 0000000000..1eb7950ac0
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/props.js
@@ -0,0 +1 @@
+module.exports = require('./at');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/pull.js b/tools/node_modules/eslint/node_modules/lodash/fp/pull.js
new file mode 100644
index 0000000000..8d7084f079
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/pullAll.js b/tools/node_modules/eslint/node_modules/lodash/fp/pullAll.js
new file mode 100644
index 0000000000..98d5c9a73a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/pullAllBy.js b/tools/node_modules/eslint/node_modules/lodash/fp/pullAllBy.js
new file mode 100644
index 0000000000..876bc3bf1c
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/pullAllWith.js b/tools/node_modules/eslint/node_modules/lodash/fp/pullAllWith.js
new file mode 100644
index 0000000000..f71ba4d73d
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/pullAt.js b/tools/node_modules/eslint/node_modules/lodash/fp/pullAt.js
new file mode 100644
index 0000000000..e8b3bb6125
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/random.js b/tools/node_modules/eslint/node_modules/lodash/fp/random.js
new file mode 100644
index 0000000000..99d852e4ab
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/range.js b/tools/node_modules/eslint/node_modules/lodash/fp/range.js
new file mode 100644
index 0000000000..a6bb59118b
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/rangeRight.js b/tools/node_modules/eslint/node_modules/lodash/fp/rangeRight.js
new file mode 100644
index 0000000000..fdb712f94e
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/rangeStep.js b/tools/node_modules/eslint/node_modules/lodash/fp/rangeStep.js
new file mode 100644
index 0000000000..d72dfc200c
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/rangeStepRight.js b/tools/node_modules/eslint/node_modules/lodash/fp/rangeStepRight.js
new file mode 100644
index 0000000000..8b2a67bc65
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/rearg.js b/tools/node_modules/eslint/node_modules/lodash/fp/rearg.js
new file mode 100644
index 0000000000..678e02a32a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/reduce.js b/tools/node_modules/eslint/node_modules/lodash/fp/reduce.js
new file mode 100644
index 0000000000..4cef0a0083
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/reduceRight.js b/tools/node_modules/eslint/node_modules/lodash/fp/reduceRight.js
new file mode 100644
index 0000000000..caf5bb5155
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/reject.js b/tools/node_modules/eslint/node_modules/lodash/fp/reject.js
new file mode 100644
index 0000000000..c163273861
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/remove.js b/tools/node_modules/eslint/node_modules/lodash/fp/remove.js
new file mode 100644
index 0000000000..e9d1327368
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/repeat.js b/tools/node_modules/eslint/node_modules/lodash/fp/repeat.js
new file mode 100644
index 0000000000..08470f247a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/replace.js b/tools/node_modules/eslint/node_modules/lodash/fp/replace.js
new file mode 100644
index 0000000000..2227db6257
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/rest.js b/tools/node_modules/eslint/node_modules/lodash/fp/rest.js
new file mode 100644
index 0000000000..c1f3d64bdc
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/restFrom.js b/tools/node_modules/eslint/node_modules/lodash/fp/restFrom.js
new file mode 100644
index 0000000000..714e42b5d6
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/result.js b/tools/node_modules/eslint/node_modules/lodash/fp/result.js
new file mode 100644
index 0000000000..f86ce07126
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/reverse.js b/tools/node_modules/eslint/node_modules/lodash/fp/reverse.js
new file mode 100644
index 0000000000..07c9f5e493
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/round.js b/tools/node_modules/eslint/node_modules/lodash/fp/round.js
new file mode 100644
index 0000000000..4c0e5c8299
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/sample.js b/tools/node_modules/eslint/node_modules/lodash/fp/sample.js
new file mode 100644
index 0000000000..6bea1254de
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/sampleSize.js b/tools/node_modules/eslint/node_modules/lodash/fp/sampleSize.js
new file mode 100644
index 0000000000..359ed6fcda
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/seq.js b/tools/node_modules/eslint/node_modules/lodash/fp/seq.js
new file mode 100644
index 0000000000..d8f42b0a4d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/seq.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../seq'));
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/set.js b/tools/node_modules/eslint/node_modules/lodash/fp/set.js
new file mode 100644
index 0000000000..0b56a56c8a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/setWith.js b/tools/node_modules/eslint/node_modules/lodash/fp/setWith.js
new file mode 100644
index 0000000000..0b584952b6
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/shuffle.js b/tools/node_modules/eslint/node_modules/lodash/fp/shuffle.js
new file mode 100644
index 0000000000..aa3a1ca5be
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/size.js b/tools/node_modules/eslint/node_modules/lodash/fp/size.js
new file mode 100644
index 0000000000..7490136e1c
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/slice.js b/tools/node_modules/eslint/node_modules/lodash/fp/slice.js
new file mode 100644
index 0000000000..15945d321f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/snakeCase.js b/tools/node_modules/eslint/node_modules/lodash/fp/snakeCase.js
new file mode 100644
index 0000000000..a0ff7808eb
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/some.js b/tools/node_modules/eslint/node_modules/lodash/fp/some.js
new file mode 100644
index 0000000000..a4fa2d0060
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/sortBy.js b/tools/node_modules/eslint/node_modules/lodash/fp/sortBy.js
new file mode 100644
index 0000000000..e0790ad5b7
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/sortedIndex.js b/tools/node_modules/eslint/node_modules/lodash/fp/sortedIndex.js
new file mode 100644
index 0000000000..364a05435e
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/sortedIndexBy.js b/tools/node_modules/eslint/node_modules/lodash/fp/sortedIndexBy.js
new file mode 100644
index 0000000000..9593dbd13d
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/sortedIndexOf.js b/tools/node_modules/eslint/node_modules/lodash/fp/sortedIndexOf.js
new file mode 100644
index 0000000000..c9084cab6a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/sortedLastIndex.js b/tools/node_modules/eslint/node_modules/lodash/fp/sortedLastIndex.js
new file mode 100644
index 0000000000..47fe241af7
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/sortedLastIndexBy.js b/tools/node_modules/eslint/node_modules/lodash/fp/sortedLastIndexBy.js
new file mode 100644
index 0000000000..0f9a347326
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/sortedLastIndexOf.js b/tools/node_modules/eslint/node_modules/lodash/fp/sortedLastIndexOf.js
new file mode 100644
index 0000000000..0d4d93278f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/sortedUniq.js b/tools/node_modules/eslint/node_modules/lodash/fp/sortedUniq.js
new file mode 100644
index 0000000000..882d283702
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/sortedUniqBy.js b/tools/node_modules/eslint/node_modules/lodash/fp/sortedUniqBy.js
new file mode 100644
index 0000000000..033db91ca9
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/split.js b/tools/node_modules/eslint/node_modules/lodash/fp/split.js
new file mode 100644
index 0000000000..14de1a7efd
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/spread.js b/tools/node_modules/eslint/node_modules/lodash/fp/spread.js
new file mode 100644
index 0000000000..2d11b70722
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/spreadFrom.js b/tools/node_modules/eslint/node_modules/lodash/fp/spreadFrom.js
new file mode 100644
index 0000000000..0b630df1b3
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/startCase.js b/tools/node_modules/eslint/node_modules/lodash/fp/startCase.js
new file mode 100644
index 0000000000..ada98c943d
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/startsWith.js b/tools/node_modules/eslint/node_modules/lodash/fp/startsWith.js
new file mode 100644
index 0000000000..985e2f2948
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/string.js b/tools/node_modules/eslint/node_modules/lodash/fp/string.js
new file mode 100644
index 0000000000..773b037048
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/string.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../string'));
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/stubArray.js b/tools/node_modules/eslint/node_modules/lodash/fp/stubArray.js
new file mode 100644
index 0000000000..cd604cb493
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/stubFalse.js b/tools/node_modules/eslint/node_modules/lodash/fp/stubFalse.js
new file mode 100644
index 0000000000..3296664544
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/stubObject.js b/tools/node_modules/eslint/node_modules/lodash/fp/stubObject.js
new file mode 100644
index 0000000000..c6c8ec472c
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/stubString.js b/tools/node_modules/eslint/node_modules/lodash/fp/stubString.js
new file mode 100644
index 0000000000..701051e8b3
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/stubTrue.js b/tools/node_modules/eslint/node_modules/lodash/fp/stubTrue.js
new file mode 100644
index 0000000000..9249082ce9
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/subtract.js b/tools/node_modules/eslint/node_modules/lodash/fp/subtract.js
new file mode 100644
index 0000000000..d32b16d479
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/sum.js b/tools/node_modules/eslint/node_modules/lodash/fp/sum.js
new file mode 100644
index 0000000000..5cce12b325
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/sumBy.js b/tools/node_modules/eslint/node_modules/lodash/fp/sumBy.js
new file mode 100644
index 0000000000..c8826565f9
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/symmetricDifference.js b/tools/node_modules/eslint/node_modules/lodash/fp/symmetricDifference.js
new file mode 100644
index 0000000000..78c16add62
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/symmetricDifference.js
@@ -0,0 +1 @@
+module.exports = require('./xor');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/symmetricDifferenceBy.js b/tools/node_modules/eslint/node_modules/lodash/fp/symmetricDifferenceBy.js
new file mode 100644
index 0000000000..298fc7ff68
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/symmetricDifferenceBy.js
@@ -0,0 +1 @@
+module.exports = require('./xorBy');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/symmetricDifferenceWith.js b/tools/node_modules/eslint/node_modules/lodash/fp/symmetricDifferenceWith.js
new file mode 100644
index 0000000000..70bc6faf28
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/symmetricDifferenceWith.js
@@ -0,0 +1 @@
+module.exports = require('./xorWith');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/tail.js b/tools/node_modules/eslint/node_modules/lodash/fp/tail.js
new file mode 100644
index 0000000000..f122f0ac34
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/take.js b/tools/node_modules/eslint/node_modules/lodash/fp/take.js
new file mode 100644
index 0000000000..9af98a7bdb
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/takeLast.js b/tools/node_modules/eslint/node_modules/lodash/fp/takeLast.js
new file mode 100644
index 0000000000..e98c84a162
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/takeLast.js
@@ -0,0 +1 @@
+module.exports = require('./takeRight');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/takeLastWhile.js b/tools/node_modules/eslint/node_modules/lodash/fp/takeLastWhile.js
new file mode 100644
index 0000000000..5367968a3d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/takeLastWhile.js
@@ -0,0 +1 @@
+module.exports = require('./takeRightWhile');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/takeRight.js b/tools/node_modules/eslint/node_modules/lodash/fp/takeRight.js
new file mode 100644
index 0000000000..b82950a696
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/takeRightWhile.js b/tools/node_modules/eslint/node_modules/lodash/fp/takeRightWhile.js
new file mode 100644
index 0000000000..8ffb0a2857
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/takeWhile.js b/tools/node_modules/eslint/node_modules/lodash/fp/takeWhile.js
new file mode 100644
index 0000000000..28136644fe
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/tap.js b/tools/node_modules/eslint/node_modules/lodash/fp/tap.js
new file mode 100644
index 0000000000..d33ad6ec1e
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/template.js b/tools/node_modules/eslint/node_modules/lodash/fp/template.js
new file mode 100644
index 0000000000..74857e1c84
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/templateSettings.js b/tools/node_modules/eslint/node_modules/lodash/fp/templateSettings.js
new file mode 100644
index 0000000000..7bcc0a82b9
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/throttle.js b/tools/node_modules/eslint/node_modules/lodash/fp/throttle.js
new file mode 100644
index 0000000000..77fff14284
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/thru.js b/tools/node_modules/eslint/node_modules/lodash/fp/thru.js
new file mode 100644
index 0000000000..d42b3b1d84
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/times.js b/tools/node_modules/eslint/node_modules/lodash/fp/times.js
new file mode 100644
index 0000000000..0dab06dad1
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/toArray.js b/tools/node_modules/eslint/node_modules/lodash/fp/toArray.js
new file mode 100644
index 0000000000..f0c360aca3
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/toFinite.js b/tools/node_modules/eslint/node_modules/lodash/fp/toFinite.js
new file mode 100644
index 0000000000..3a47687d6b
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/toInteger.js b/tools/node_modules/eslint/node_modules/lodash/fp/toInteger.js
new file mode 100644
index 0000000000..e0af6a750e
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/toIterator.js b/tools/node_modules/eslint/node_modules/lodash/fp/toIterator.js
new file mode 100644
index 0000000000..65e6baa9dd
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/toJSON.js b/tools/node_modules/eslint/node_modules/lodash/fp/toJSON.js
new file mode 100644
index 0000000000..2d718d0bc1
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/toLength.js b/tools/node_modules/eslint/node_modules/lodash/fp/toLength.js
new file mode 100644
index 0000000000..b97cdd9351
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/toLower.js b/tools/node_modules/eslint/node_modules/lodash/fp/toLower.js
new file mode 100644
index 0000000000..616ef36ada
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/toNumber.js b/tools/node_modules/eslint/node_modules/lodash/fp/toNumber.js
new file mode 100644
index 0000000000..d0c6f4d3d6
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/toPairs.js b/tools/node_modules/eslint/node_modules/lodash/fp/toPairs.js
new file mode 100644
index 0000000000..af783786ee
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/toPairsIn.js b/tools/node_modules/eslint/node_modules/lodash/fp/toPairsIn.js
new file mode 100644
index 0000000000..66504abf1f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/toPath.js b/tools/node_modules/eslint/node_modules/lodash/fp/toPath.js
new file mode 100644
index 0000000000..b4d5e50fb7
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/toPlainObject.js b/tools/node_modules/eslint/node_modules/lodash/fp/toPlainObject.js
new file mode 100644
index 0000000000..278bb86398
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/toSafeInteger.js b/tools/node_modules/eslint/node_modules/lodash/fp/toSafeInteger.js
new file mode 100644
index 0000000000..367a26fddc
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/toString.js b/tools/node_modules/eslint/node_modules/lodash/fp/toString.js
new file mode 100644
index 0000000000..cec4f8e223
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/toUpper.js b/tools/node_modules/eslint/node_modules/lodash/fp/toUpper.js
new file mode 100644
index 0000000000..54f9a56058
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/transform.js b/tools/node_modules/eslint/node_modules/lodash/fp/transform.js
new file mode 100644
index 0000000000..759d088f1a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/trim.js b/tools/node_modules/eslint/node_modules/lodash/fp/trim.js
new file mode 100644
index 0000000000..e6319a741c
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/trimChars.js b/tools/node_modules/eslint/node_modules/lodash/fp/trimChars.js
new file mode 100644
index 0000000000..c9294de48c
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/trimCharsEnd.js b/tools/node_modules/eslint/node_modules/lodash/fp/trimCharsEnd.js
new file mode 100644
index 0000000000..284bc2f813
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/trimCharsStart.js b/tools/node_modules/eslint/node_modules/lodash/fp/trimCharsStart.js
new file mode 100644
index 0000000000..ff0ee65dfb
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/trimEnd.js b/tools/node_modules/eslint/node_modules/lodash/fp/trimEnd.js
new file mode 100644
index 0000000000..71908805fc
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/trimStart.js b/tools/node_modules/eslint/node_modules/lodash/fp/trimStart.js
new file mode 100644
index 0000000000..fda902c389
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/truncate.js b/tools/node_modules/eslint/node_modules/lodash/fp/truncate.js
new file mode 100644
index 0000000000..d265c1decb
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/unapply.js b/tools/node_modules/eslint/node_modules/lodash/fp/unapply.js
new file mode 100644
index 0000000000..c5dfe779d6
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/unapply.js
@@ -0,0 +1 @@
+module.exports = require('./rest');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/unary.js b/tools/node_modules/eslint/node_modules/lodash/fp/unary.js
new file mode 100644
index 0000000000..286c945fb6
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/unescape.js b/tools/node_modules/eslint/node_modules/lodash/fp/unescape.js
new file mode 100644
index 0000000000..fddcb46e2d
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/union.js b/tools/node_modules/eslint/node_modules/lodash/fp/union.js
new file mode 100644
index 0000000000..ef8228d74c
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/unionBy.js b/tools/node_modules/eslint/node_modules/lodash/fp/unionBy.js
new file mode 100644
index 0000000000..603687a188
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/unionWith.js b/tools/node_modules/eslint/node_modules/lodash/fp/unionWith.js
new file mode 100644
index 0000000000..65bb3a7928
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/uniq.js b/tools/node_modules/eslint/node_modules/lodash/fp/uniq.js
new file mode 100644
index 0000000000..bc1852490b
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/uniqBy.js b/tools/node_modules/eslint/node_modules/lodash/fp/uniqBy.js
new file mode 100644
index 0000000000..634c6a8bb3
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/uniqWith.js b/tools/node_modules/eslint/node_modules/lodash/fp/uniqWith.js
new file mode 100644
index 0000000000..0ec601a910
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/uniqueId.js b/tools/node_modules/eslint/node_modules/lodash/fp/uniqueId.js
new file mode 100644
index 0000000000..aa8fc2f739
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/unnest.js b/tools/node_modules/eslint/node_modules/lodash/fp/unnest.js
new file mode 100644
index 0000000000..5d34060aa7
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/unnest.js
@@ -0,0 +1 @@
+module.exports = require('./flatten');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/unset.js b/tools/node_modules/eslint/node_modules/lodash/fp/unset.js
new file mode 100644
index 0000000000..ea203a0f39
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/unzip.js b/tools/node_modules/eslint/node_modules/lodash/fp/unzip.js
new file mode 100644
index 0000000000..cc364b3c5a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/unzipWith.js b/tools/node_modules/eslint/node_modules/lodash/fp/unzipWith.js
new file mode 100644
index 0000000000..182eaa1042
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/update.js b/tools/node_modules/eslint/node_modules/lodash/fp/update.js
new file mode 100644
index 0000000000..b8ce2cc9e1
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/updateWith.js b/tools/node_modules/eslint/node_modules/lodash/fp/updateWith.js
new file mode 100644
index 0000000000..d5e8282d94
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/upperCase.js b/tools/node_modules/eslint/node_modules/lodash/fp/upperCase.js
new file mode 100644
index 0000000000..c886f20216
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/upperFirst.js b/tools/node_modules/eslint/node_modules/lodash/fp/upperFirst.js
new file mode 100644
index 0000000000..d8c04df54b
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/useWith.js b/tools/node_modules/eslint/node_modules/lodash/fp/useWith.js
new file mode 100644
index 0000000000..d8b3df5a4e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/useWith.js
@@ -0,0 +1 @@
+module.exports = require('./overArgs');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/util.js b/tools/node_modules/eslint/node_modules/lodash/fp/util.js
new file mode 100644
index 0000000000..18c00baed4
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/util.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../util'));
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/value.js b/tools/node_modules/eslint/node_modules/lodash/fp/value.js
new file mode 100644
index 0000000000..555eec7a38
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/valueOf.js b/tools/node_modules/eslint/node_modules/lodash/fp/valueOf.js
new file mode 100644
index 0000000000..f968807d70
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/values.js b/tools/node_modules/eslint/node_modules/lodash/fp/values.js
new file mode 100644
index 0000000000..2dfc56136b
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/valuesIn.js b/tools/node_modules/eslint/node_modules/lodash/fp/valuesIn.js
new file mode 100644
index 0000000000..a1b2bb8725
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/where.js b/tools/node_modules/eslint/node_modules/lodash/fp/where.js
new file mode 100644
index 0000000000..3247f64a8c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/where.js
@@ -0,0 +1 @@
+module.exports = require('./conformsTo');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/whereEq.js b/tools/node_modules/eslint/node_modules/lodash/fp/whereEq.js
new file mode 100644
index 0000000000..29d1e1e4f1
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/whereEq.js
@@ -0,0 +1 @@
+module.exports = require('./isMatch');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/without.js b/tools/node_modules/eslint/node_modules/lodash/fp/without.js
new file mode 100644
index 0000000000..bad9e125bc
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/words.js b/tools/node_modules/eslint/node_modules/lodash/fp/words.js
new file mode 100644
index 0000000000..4a901414b8
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/wrap.js b/tools/node_modules/eslint/node_modules/lodash/fp/wrap.js
new file mode 100644
index 0000000000..e93bd8a1de
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/wrapperAt.js b/tools/node_modules/eslint/node_modules/lodash/fp/wrapperAt.js
new file mode 100644
index 0000000000..8f0a310fea
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/wrapperChain.js b/tools/node_modules/eslint/node_modules/lodash/fp/wrapperChain.js
new file mode 100644
index 0000000000..2a48ea2b5b
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/wrapperLodash.js b/tools/node_modules/eslint/node_modules/lodash/fp/wrapperLodash.js
new file mode 100644
index 0000000000..a7162d084c
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/wrapperReverse.js b/tools/node_modules/eslint/node_modules/lodash/fp/wrapperReverse.js
new file mode 100644
index 0000000000..e1481aab91
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/wrapperValue.js b/tools/node_modules/eslint/node_modules/lodash/fp/wrapperValue.js
new file mode 100644
index 0000000000..8eb9112f61
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/xor.js b/tools/node_modules/eslint/node_modules/lodash/fp/xor.js
new file mode 100644
index 0000000000..29e2819489
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/xorBy.js b/tools/node_modules/eslint/node_modules/lodash/fp/xorBy.js
new file mode 100644
index 0000000000..b355686db6
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/xorWith.js b/tools/node_modules/eslint/node_modules/lodash/fp/xorWith.js
new file mode 100644
index 0000000000..8e05739ad3
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/zip.js b/tools/node_modules/eslint/node_modules/lodash/fp/zip.js
new file mode 100644
index 0000000000..69e147a441
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/zipAll.js b/tools/node_modules/eslint/node_modules/lodash/fp/zipAll.js
new file mode 100644
index 0000000000..efa8ccbfbb
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/zipObj.js b/tools/node_modules/eslint/node_modules/lodash/fp/zipObj.js
new file mode 100644
index 0000000000..f4a34531b1
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/fp/zipObj.js
@@ -0,0 +1 @@
+module.exports = require('./zipObject');
diff --git a/tools/node_modules/eslint/node_modules/lodash/fp/zipObject.js b/tools/node_modules/eslint/node_modules/lodash/fp/zipObject.js
new file mode 100644
index 0000000000..462dbb68cb
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/zipObjectDeep.js b/tools/node_modules/eslint/node_modules/lodash/fp/zipObjectDeep.js
new file mode 100644
index 0000000000..53a5d33807
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fp/zipWith.js b/tools/node_modules/eslint/node_modules/lodash/fp/zipWith.js
new file mode 100644
index 0000000000..c5cf9e2128
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/fromPairs.js b/tools/node_modules/eslint/node_modules/lodash/fromPairs.js
new file mode 100644
index 0000000000..ee7940d240
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/function.js b/tools/node_modules/eslint/node_modules/lodash/function.js
new file mode 100644
index 0000000000..b0fc6d93e3
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/functions.js b/tools/node_modules/eslint/node_modules/lodash/functions.js
new file mode 100644
index 0000000000..9722928f50
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/functionsIn.js b/tools/node_modules/eslint/node_modules/lodash/functionsIn.js
new file mode 100644
index 0000000000..f00345d066
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/get.js b/tools/node_modules/eslint/node_modules/lodash/get.js
new file mode 100644
index 0000000000..8805ff92c1
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/groupBy.js b/tools/node_modules/eslint/node_modules/lodash/groupBy.js
new file mode 100644
index 0000000000..babf4f6baa
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/gt.js b/tools/node_modules/eslint/node_modules/lodash/gt.js
new file mode 100644
index 0000000000..3a66282880
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/gte.js b/tools/node_modules/eslint/node_modules/lodash/gte.js
new file mode 100644
index 0000000000..4180a687d7
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/has.js b/tools/node_modules/eslint/node_modules/lodash/has.js
new file mode 100644
index 0000000000..34df55e8e2
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/hasIn.js b/tools/node_modules/eslint/node_modules/lodash/hasIn.js
new file mode 100644
index 0000000000..06a3686542
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/head.js b/tools/node_modules/eslint/node_modules/lodash/head.js
new file mode 100644
index 0000000000..dee9d1f1e7
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/identity.js b/tools/node_modules/eslint/node_modules/lodash/identity.js
new file mode 100644
index 0000000000..2d5d963cd2
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/inRange.js b/tools/node_modules/eslint/node_modules/lodash/inRange.js
new file mode 100644
index 0000000000..f20728d920
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/includes.js b/tools/node_modules/eslint/node_modules/lodash/includes.js
new file mode 100644
index 0000000000..ae0deedc90
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/index.js b/tools/node_modules/eslint/node_modules/lodash/index.js
new file mode 100644
index 0000000000..5d063e21f3
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/index.js
@@ -0,0 +1 @@
+module.exports = require('./lodash'); \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/lodash/indexOf.js b/tools/node_modules/eslint/node_modules/lodash/indexOf.js
new file mode 100644
index 0000000000..3c644af2ef
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/initial.js b/tools/node_modules/eslint/node_modules/lodash/initial.js
new file mode 100644
index 0000000000..f47fc50928
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/intersection.js b/tools/node_modules/eslint/node_modules/lodash/intersection.js
new file mode 100644
index 0000000000..a94c13512a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/intersectionBy.js b/tools/node_modules/eslint/node_modules/lodash/intersectionBy.js
new file mode 100644
index 0000000000..31461aae53
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/intersectionWith.js b/tools/node_modules/eslint/node_modules/lodash/intersectionWith.js
new file mode 100644
index 0000000000..63cabfaa40
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/invert.js b/tools/node_modules/eslint/node_modules/lodash/invert.js
new file mode 100644
index 0000000000..21d10aba37
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/invertBy.js b/tools/node_modules/eslint/node_modules/lodash/invertBy.js
new file mode 100644
index 0000000000..e5ba0f7091
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/invoke.js b/tools/node_modules/eslint/node_modules/lodash/invoke.js
new file mode 100644
index 0000000000..97d51eb5bc
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/invokeMap.js b/tools/node_modules/eslint/node_modules/lodash/invokeMap.js
new file mode 100644
index 0000000000..8da5126c61
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/isArguments.js b/tools/node_modules/eslint/node_modules/lodash/isArguments.js
new file mode 100644
index 0000000000..8b9ed66cdd
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/isArray.js b/tools/node_modules/eslint/node_modules/lodash/isArray.js
new file mode 100644
index 0000000000..88ab55fd0a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/isArrayBuffer.js b/tools/node_modules/eslint/node_modules/lodash/isArrayBuffer.js
new file mode 100644
index 0000000000..12904a64b4
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/isArrayLike.js b/tools/node_modules/eslint/node_modules/lodash/isArrayLike.js
new file mode 100644
index 0000000000..0f9668056e
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/isArrayLikeObject.js b/tools/node_modules/eslint/node_modules/lodash/isArrayLikeObject.js
new file mode 100644
index 0000000000..6c4812a8d8
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/isBoolean.js b/tools/node_modules/eslint/node_modules/lodash/isBoolean.js
new file mode 100644
index 0000000000..a43ed4b8fc
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/isBuffer.js b/tools/node_modules/eslint/node_modules/lodash/isBuffer.js
new file mode 100644
index 0000000000..c103cc74e7
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/isDate.js b/tools/node_modules/eslint/node_modules/lodash/isDate.js
new file mode 100644
index 0000000000..7f0209fca7
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/isElement.js b/tools/node_modules/eslint/node_modules/lodash/isElement.js
new file mode 100644
index 0000000000..76ae29c3bf
--- /dev/null
+++ b/tools/node_modules/eslint/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('<body>');
+ * // => false
+ */
+function isElement(value) {
+ return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
+}
+
+module.exports = isElement;
diff --git a/tools/node_modules/eslint/node_modules/lodash/isEmpty.js b/tools/node_modules/eslint/node_modules/lodash/isEmpty.js
new file mode 100644
index 0000000000..3597294a47
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/isEqual.js b/tools/node_modules/eslint/node_modules/lodash/isEqual.js
new file mode 100644
index 0000000000..5e23e76c94
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/isEqualWith.js b/tools/node_modules/eslint/node_modules/lodash/isEqualWith.js
new file mode 100644
index 0000000000..21bdc7ffe3
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/isError.js b/tools/node_modules/eslint/node_modules/lodash/isError.js
new file mode 100644
index 0000000000..b4f41e000d
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/isFinite.js b/tools/node_modules/eslint/node_modules/lodash/isFinite.js
new file mode 100644
index 0000000000..601842bc40
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/isFunction.js b/tools/node_modules/eslint/node_modules/lodash/isFunction.js
new file mode 100644
index 0000000000..907a8cd8bf
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/isInteger.js b/tools/node_modules/eslint/node_modules/lodash/isInteger.js
new file mode 100644
index 0000000000..66aa87d573
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/isLength.js b/tools/node_modules/eslint/node_modules/lodash/isLength.js
new file mode 100644
index 0000000000..3a95caa962
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/isMap.js b/tools/node_modules/eslint/node_modules/lodash/isMap.js
new file mode 100644
index 0000000000..44f8517eee
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/isMatch.js b/tools/node_modules/eslint/node_modules/lodash/isMatch.js
new file mode 100644
index 0000000000..9773a18cd7
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/isMatchWith.js b/tools/node_modules/eslint/node_modules/lodash/isMatchWith.js
new file mode 100644
index 0000000000..187b6a61de
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/isNaN.js b/tools/node_modules/eslint/node_modules/lodash/isNaN.js
new file mode 100644
index 0000000000..7d0d783bad
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/isNative.js b/tools/node_modules/eslint/node_modules/lodash/isNative.js
new file mode 100644
index 0000000000..f0cb8d5800
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/isNil.js b/tools/node_modules/eslint/node_modules/lodash/isNil.js
new file mode 100644
index 0000000000..79f05052c5
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/isNull.js b/tools/node_modules/eslint/node_modules/lodash/isNull.js
new file mode 100644
index 0000000000..c0a374d7dc
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/isNumber.js b/tools/node_modules/eslint/node_modules/lodash/isNumber.js
new file mode 100644
index 0000000000..cd34ee4641
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/isObject.js b/tools/node_modules/eslint/node_modules/lodash/isObject.js
new file mode 100644
index 0000000000..1dc893918b
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/isObjectLike.js b/tools/node_modules/eslint/node_modules/lodash/isObjectLike.js
new file mode 100644
index 0000000000..301716b5a5
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/isPlainObject.js b/tools/node_modules/eslint/node_modules/lodash/isPlainObject.js
new file mode 100644
index 0000000000..238737313f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/isRegExp.js b/tools/node_modules/eslint/node_modules/lodash/isRegExp.js
new file mode 100644
index 0000000000..76c9b6e9c3
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/isSafeInteger.js b/tools/node_modules/eslint/node_modules/lodash/isSafeInteger.js
new file mode 100644
index 0000000000..2a48526e10
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/isSet.js b/tools/node_modules/eslint/node_modules/lodash/isSet.js
new file mode 100644
index 0000000000..ab88bdf81a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/isString.js b/tools/node_modules/eslint/node_modules/lodash/isString.js
new file mode 100644
index 0000000000..627eb9c384
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/isSymbol.js b/tools/node_modules/eslint/node_modules/lodash/isSymbol.js
new file mode 100644
index 0000000000..dfb60b97f6
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/isTypedArray.js b/tools/node_modules/eslint/node_modules/lodash/isTypedArray.js
new file mode 100644
index 0000000000..da3f8dd198
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/isUndefined.js b/tools/node_modules/eslint/node_modules/lodash/isUndefined.js
new file mode 100644
index 0000000000..377d121ab8
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/isWeakMap.js b/tools/node_modules/eslint/node_modules/lodash/isWeakMap.js
new file mode 100644
index 0000000000..8d36f6638f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/isWeakSet.js b/tools/node_modules/eslint/node_modules/lodash/isWeakSet.js
new file mode 100644
index 0000000000..e628b261cf
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/iteratee.js b/tools/node_modules/eslint/node_modules/lodash/iteratee.js
new file mode 100644
index 0000000000..61b73a8c05
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/join.js b/tools/node_modules/eslint/node_modules/lodash/join.js
new file mode 100644
index 0000000000..45de079ff2
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/kebabCase.js b/tools/node_modules/eslint/node_modules/lodash/kebabCase.js
new file mode 100644
index 0000000000..8a52be6455
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/keyBy.js b/tools/node_modules/eslint/node_modules/lodash/keyBy.js
new file mode 100644
index 0000000000..acc007a0ab
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/keys.js b/tools/node_modules/eslint/node_modules/lodash/keys.js
new file mode 100644
index 0000000000..d143c7186f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/keysIn.js b/tools/node_modules/eslint/node_modules/lodash/keysIn.js
new file mode 100644
index 0000000000..a62308f2c5
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/lang.js b/tools/node_modules/eslint/node_modules/lodash/lang.js
new file mode 100644
index 0000000000..a3962169ab
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/last.js b/tools/node_modules/eslint/node_modules/lodash/last.js
new file mode 100644
index 0000000000..cad1eafafa
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/lastIndexOf.js b/tools/node_modules/eslint/node_modules/lodash/lastIndexOf.js
new file mode 100644
index 0000000000..dabfb613a5
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/lodash/lodash.js b/tools/node_modules/eslint/node_modules/lodash/lodash.js
new file mode 100644
index 0000000000..b39ddce69b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/lodash.js
@@ -0,0 +1,17084 @@
+/**
+ * @license
+ * Lodash <https://lodash.com/>
+ * Copyright JS Foundation and other contributors <https://js.foundation/>
+ * Released under MIT license <https://lodash.com/license>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * 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 = {
+ '&': '&amp;',
+ '<': '&lt;',
+ '>': '&gt;',
+ '"': '&quot;',
+ "'": '&#39;'
+ };
+
+ /** Used to map HTML entities to characters. */
+ var htmlUnescapes = {
+ '&amp;': '&',
+ '&lt;': '<',
+ '&gt;': '>',
+ '&quot;': '"',
+ '&#39;': "'"
+ };
+
+ /** 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 '<p>' + func(text) + '</p>';
+ * });
+ *
+ * p('fred, barney, & pebbles');
+ * // => '<p>fred, barney, &amp; pebbles</p>'
+ */
+ 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('<body>');
+ * // => 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, &amp; 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('<b><%- value %></b>');
+ * compiled({ 'value': '<script>' });
+ * // => '<b>&lt;script&gt;</b>'
+ *
+ * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
+ * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
+ * compiled({ 'users': ['fred', 'barney'] });
+ * // => '<li>fred</li><li>barney</li>'
+ *
+ * // Use the internal `print` function in "evaluate" delimiters.
+ * var compiled = _.template('<% print("hello " + user); %>!');
+ * compiled({ 'user': 'barney' });
+ * // => 'hello barney!'
+ *
+ * // Use the ES template literal delimiter as an "interpolate" delimiter.
+ * // Disable support by replacing the "interpolate" delimiter.
+ * var compiled = _.template('hello ${ user }!');
+ * compiled({ 'user': 'pebbles' });
+ * // => 'hello pebbles!'
+ *
+ * // Use backslashes to treat delimiters as plain text.
+ * var compiled = _.template('<%= "\\<%- value %\\>" %>');
+ * compiled({ 'value': 'ignored' });
+ * // => '<%- value %>'
+ *
+ * // Use the `imports` option to import `jQuery` as `jq`.
+ * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
+ * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
+ * compiled({ 'users': ['fred', 'barney'] });
+ * // => '<li>fred</li><li>barney</li>'
+ *
+ * // Use the `sourceURL` option to specify a custom sourceURL for the template.
+ * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
+ * compiled(data);
+ * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
+ *
+ * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
+ * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
+ * compiled.source;
+ * // => function(data) {
+ * // var __t, __p = '';
+ * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
+ * // return __p;
+ * // }
+ *
+ * // Use custom template delimiters.
+ * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
+ * var compiled = _.template('hello {{ user }}!');
+ * compiled({ 'user': 'mustache' });
+ * // => 'hello mustache!'
+ *
+ * // Use the `source` property to inline compiled templates for meaningful
+ * // line numbers in error messages and stack traces.
+ * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
+ * var JST = {\
+ * "main": ' + _.template(mainText).source + '\
+ * };\
+ * ');
+ */
+ function template(string, options, guard) {
+ // Based on John Resig's `tmpl` implementation
+ // (http://ejohn.org/blog/javascript-micro-templating/)
+ // and Laura Doktorova's doT.js (https://github.com/olado/doT).
+ var settings = lodash.templateSettings;
+
+ if (guard && isIterateeCall(string, options, guard)) {
+ options = undefined;
+ }
+ string = toString(string);
+ options = assignInWith({}, options, settings, customDefaultsAssignIn);
+
+ var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
+ importsKeys = keys(imports),
+ importsValues = baseValues(imports, importsKeys);
+
+ var isEscaping,
+ isEvaluating,
+ index = 0,
+ interpolate = options.interpolate || reNoMatch,
+ source = "__p += '";
+
+ // Compile the regexp to match each delimiter.
+ var reDelimiters = RegExp(
+ (options.escape || reNoMatch).source + '|' +
+ interpolate.source + '|' +
+ (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
+ (options.evaluate || reNoMatch).source + '|$'
+ , 'g');
+
+ // Use a sourceURL for easier debugging.
+ var sourceURL = '//# sourceURL=' +
+ ('sourceURL' in options
+ ? options.sourceURL
+ : ('lodash.templateSources[' + (++templateCounter) + ']')
+ ) + '\n';
+
+ string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
+ interpolateValue || (interpolateValue = esTemplateValue);
+
+ // Escape characters that can't be included in string literals.
+ source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
+
+ // Replace delimiters with snippets.
+ if (escapeValue) {
+ isEscaping = true;
+ source += "' +\n__e(" + escapeValue + ") +\n'";
+ }
+ if (evaluateValue) {
+ isEvaluating = true;
+ source += "';\n" + evaluateValue + ";\n__p += '";
+ }
+ if (interpolateValue) {
+ source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
+ }
+ index = offset + match.length;
+
+ // The JS engine embedded in Adobe products needs `match` returned in
+ // order to produce the correct `offset` value.
+ return match;
+ });
+
+ source += "';\n";
+
+ // If `variable` is not specified wrap a with-statement around the generated
+ // code to add the data object to the top of the scope chain.
+ var variable = options.variable;
+ if (!variable) {
+ source = 'with (obj) {\n' + source + '\n}\n';
+ }
+ // Cleanup code by stripping empty strings.
+ source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
+ .replace(reEmptyStringMiddle, '$1')
+ .replace(reEmptyStringTrailing, '$1;');
+
+ // Frame code as the function body.
+ source = 'function(' + (variable || 'obj') + ') {\n' +
+ (variable
+ ? ''
+ : 'obj || (obj = {});\n'
+ ) +
+ "var __t, __p = ''" +
+ (isEscaping
+ ? ', __e = _.escape'
+ : ''
+ ) +
+ (isEvaluating
+ ? ', __j = Array.prototype.join;\n' +
+ "function print() { __p += __j.call(arguments, '') }\n"
+ : ';\n'
+ ) +
+ source +
+ 'return __p\n}';
+
+ var result = attempt(function() {
+ return Function(importsKeys, sourceURL + 'return ' + source)
+ .apply(undefined, importsValues);
+ });
+
+ // Provide the compiled function's source by its `toString` method or
+ // the `source` property as a convenience for inlining compiled templates.
+ result.source = source;
+ if (isError(result)) {
+ throw result;
+ }
+ return result;
+ }
+
+ /**
+ * Converts `string`, as a whole, to lower case just like
+ * [String#toLowerCase](https://mdn.io/toLowerCase).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the lower cased string.
+ * @example
+ *
+ * _.toLower('--Foo-Bar--');
+ * // => '--foo-bar--'
+ *
+ * _.toLower('fooBar');
+ * // => 'foobar'
+ *
+ * _.toLower('__FOO_BAR__');
+ * // => '__foo_bar__'
+ */
+ function toLower(value) {
+ return toString(value).toLowerCase();
+ }
+
+ /**
+ * Converts `string`, as a whole, to upper case just like
+ * [String#toUpperCase](https://mdn.io/toUpperCase).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the upper cased string.
+ * @example
+ *
+ * _.toUpper('--foo-bar--');
+ * // => '--FOO-BAR--'
+ *
+ * _.toUpper('fooBar');
+ * // => 'FOOBAR'
+ *
+ * _.toUpper('__foo_bar__');
+ * // => '__FOO_BAR__'
+ */
+ function toUpper(value) {
+ return toString(value).toUpperCase();
+ }
+
+ /**
+ * Removes leading and trailing whitespace or specified characters from `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to trim.
+ * @param {string} [chars=whitespace] The characters to trim.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {string} Returns the trimmed string.
+ * @example
+ *
+ * _.trim(' abc ');
+ * // => 'abc'
+ *
+ * _.trim('-_-abc-_-', '_-');
+ * // => 'abc'
+ *
+ * _.map([' foo ', ' bar '], _.trim);
+ * // => ['foo', 'bar']
+ */
+ function trim(string, chars, guard) {
+ string = toString(string);
+ if (string && (guard || chars === undefined)) {
+ return string.replace(reTrim, '');
+ }
+ if (!string || !(chars = baseToString(chars))) {
+ return string;
+ }
+ var strSymbols = stringToArray(string),
+ chrSymbols = stringToArray(chars),
+ start = charsStartIndex(strSymbols, chrSymbols),
+ end = charsEndIndex(strSymbols, chrSymbols) + 1;
+
+ return castSlice(strSymbols, start, end).join('');
+ }
+
+ /**
+ * Removes trailing whitespace or specified characters from `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to trim.
+ * @param {string} [chars=whitespace] The characters to trim.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {string} Returns the trimmed string.
+ * @example
+ *
+ * _.trimEnd(' abc ');
+ * // => ' abc'
+ *
+ * _.trimEnd('-_-abc-_-', '_-');
+ * // => '-_-abc'
+ */
+ function trimEnd(string, chars, guard) {
+ string = toString(string);
+ if (string && (guard || chars === undefined)) {
+ return string.replace(reTrimEnd, '');
+ }
+ if (!string || !(chars = baseToString(chars))) {
+ return string;
+ }
+ var strSymbols = stringToArray(string),
+ end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
+
+ return castSlice(strSymbols, 0, end).join('');
+ }
+
+ /**
+ * Removes leading whitespace or specified characters from `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to trim.
+ * @param {string} [chars=whitespace] The characters to trim.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {string} Returns the trimmed string.
+ * @example
+ *
+ * _.trimStart(' abc ');
+ * // => 'abc '
+ *
+ * _.trimStart('-_-abc-_-', '_-');
+ * // => 'abc-_-'
+ */
+ function trimStart(string, chars, guard) {
+ string = toString(string);
+ if (string && (guard || chars === undefined)) {
+ return string.replace(reTrimStart, '');
+ }
+ if (!string || !(chars = baseToString(chars))) {
+ return string;
+ }
+ var strSymbols = stringToArray(string),
+ start = charsStartIndex(strSymbols, stringToArray(chars));
+
+ return castSlice(strSymbols, start).join('');
+ }
+
+ /**
+ * Truncates `string` if it's longer than the given maximum string length.
+ * The last characters of the truncated string are replaced with the omission
+ * string which defaults to "...".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to truncate.
+ * @param {Object} [options={}] The options object.
+ * @param {number} [options.length=30] The maximum string length.
+ * @param {string} [options.omission='...'] The string to indicate text is omitted.
+ * @param {RegExp|string} [options.separator] The separator pattern to truncate to.
+ * @returns {string} Returns the truncated string.
+ * @example
+ *
+ * _.truncate('hi-diddly-ho there, neighborino');
+ * // => 'hi-diddly-ho there, neighbo...'
+ *
+ * _.truncate('hi-diddly-ho there, neighborino', {
+ * 'length': 24,
+ * 'separator': ' '
+ * });
+ * // => 'hi-diddly-ho there,...'
+ *
+ * _.truncate('hi-diddly-ho there, neighborino', {
+ * 'length': 24,
+ * 'separator': /,? +/
+ * });
+ * // => 'hi-diddly-ho there...'
+ *
+ * _.truncate('hi-diddly-ho there, neighborino', {
+ * 'omission': ' [...]'
+ * });
+ * // => 'hi-diddly-ho there, neig [...]'
+ */
+ function truncate(string, options) {
+ var length = DEFAULT_TRUNC_LENGTH,
+ omission = DEFAULT_TRUNC_OMISSION;
+
+ if (isObject(options)) {
+ var separator = 'separator' in options ? options.separator : separator;
+ length = 'length' in options ? toInteger(options.length) : length;
+ omission = 'omission' in options ? baseToString(options.omission) : omission;
+ }
+ string = toString(string);
+
+ var strLength = string.length;
+ if (hasUnicode(string)) {
+ var strSymbols = stringToArray(string);
+ strLength = strSymbols.length;
+ }
+ if (length >= strLength) {
+ return string;
+ }
+ var end = length - stringSize(omission);
+ if (end < 1) {
+ return omission;
+ }
+ var result = strSymbols
+ ? castSlice(strSymbols, 0, end).join('')
+ : string.slice(0, end);
+
+ if (separator === undefined) {
+ return result + omission;
+ }
+ if (strSymbols) {
+ end += (result.length - end);
+ }
+ if (isRegExp(separator)) {
+ if (string.slice(end).search(separator)) {
+ var match,
+ substring = result;
+
+ if (!separator.global) {
+ separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
+ }
+ separator.lastIndex = 0;
+ while ((match = separator.exec(substring))) {
+ var newEnd = match.index;
+ }
+ result = result.slice(0, newEnd === undefined ? end : newEnd);
+ }
+ } else if (string.indexOf(baseToString(separator), end) != end) {
+ var index = result.lastIndexOf(separator);
+ if (index > -1) {
+ result = result.slice(0, index);
+ }
+ }
+ return result + omission;
+ }
+
+ /**
+ * The inverse of `_.escape`; this method converts the HTML entities
+ * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to
+ * their corresponding characters.
+ *
+ * **Note:** No other HTML entities are unescaped. To unescape additional
+ * HTML entities use a third-party library like [_he_](https://mths.be/he).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.6.0
+ * @category String
+ * @param {string} [string=''] The string to unescape.
+ * @returns {string} Returns the unescaped string.
+ * @example
+ *
+ * _.unescape('fred, barney, &amp; pebbles');
+ * // => 'fred, barney, & pebbles'
+ */
+ function unescape(string) {
+ string = toString(string);
+ return (string && reHasEscapedHtml.test(string))
+ ? string.replace(reEscapedHtml, unescapeHtmlChar)
+ : string;
+ }
+
+ /**
+ * Converts `string`, as space separated words, to upper case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the upper cased string.
+ * @example
+ *
+ * _.upperCase('--foo-bar');
+ * // => 'FOO BAR'
+ *
+ * _.upperCase('fooBar');
+ * // => 'FOO BAR'
+ *
+ * _.upperCase('__foo_bar__');
+ * // => 'FOO BAR'
+ */
+ var upperCase = createCompounder(function(result, word, index) {
+ return result + (index ? ' ' : '') + word.toUpperCase();
+ });
+
+ /**
+ * Converts the first character of `string` to upper case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the converted string.
+ * @example
+ *
+ * _.upperFirst('fred');
+ * // => 'Fred'
+ *
+ * _.upperFirst('FRED');
+ * // => 'FRED'
+ */
+ var upperFirst = createCaseFirst('toUpperCase');
+
+ /**
+ * Splits `string` into an array of its words.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to inspect.
+ * @param {RegExp|string} [pattern] The pattern to match words.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the words of `string`.
+ * @example
+ *
+ * _.words('fred, barney, & pebbles');
+ * // => ['fred', 'barney', 'pebbles']
+ *
+ * _.words('fred, barney, & pebbles', /[^, ]+/g);
+ * // => ['fred', 'barney', '&', 'pebbles']
+ */
+ function words(string, pattern, guard) {
+ string = toString(string);
+ pattern = guard ? undefined : pattern;
+
+ if (pattern === undefined) {
+ return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
+ }
+ return string.match(pattern) || [];
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * 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);
+ }
+ });
+
+ /**
+ * 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;
+ });
+
+ /**
+ * 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 = getIteratee();
+
+ 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);
+ }
+ }
+ });
+ }
+
+ /**
+ * 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));
+ }
+
+ /**
+ * 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;
+ };
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * 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();
+
+ /**
+ * 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);
+
+ /**
+ * 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']
+ */
+ function iteratee(func) {
+ return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));
+ }
+
+ /**
+ * 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(baseClone(source, CLONE_DEEP_FLAG));
+ }
+
+ /**
+ * Creates a function that performs a partial deep comparison between the
+ * value at `path` of a given object to `srcValue`, returning `true` if the
+ * object value is equivalent, else `false`.
+ *
+ * **Note:** Partial comparisons will match empty array and empty object
+ * `srcValue` values against any array or object value, respectively. See
+ * `_.isEqual` for a list of supported value comparisons.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.2.0
+ * @category Util
+ * @param {Array|string} path The path of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new spec function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': 1, 'b': 2, 'c': 3 },
+ * { 'a': 4, 'b': 5, 'c': 6 }
+ * ];
+ *
+ * _.find(objects, _.matchesProperty('a', 4));
+ * // => { 'a': 4, 'b': 5, 'c': 6 }
+ */
+ function matchesProperty(path, srcValue) {
+ return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
+ }
+
+ /**
+ * Creates a function that invokes the method at `path` of a given object.
+ * Any additional arguments are provided to the invoked method.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Util
+ * @param {Array|string} path The path of the method to invoke.
+ * @param {...*} [args] The arguments to invoke the method with.
+ * @returns {Function} Returns the new invoker function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': { 'b': _.constant(2) } },
+ * { 'a': { 'b': _.constant(1) } }
+ * ];
+ *
+ * _.map(objects, _.method('a.b'));
+ * // => [2, 1]
+ *
+ * _.map(objects, _.method(['a', 'b']));
+ * // => [2, 1]
+ */
+ var method = baseRest(function(path, args) {
+ return function(object) {
+ return baseInvoke(object, path, args);
+ };
+ });
+
+ /**
+ * The opposite of `_.method`; this method creates a function that invokes
+ * the method at a given path of `object`. Any additional arguments are
+ * provided to the invoked method.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Util
+ * @param {Object} object The object to query.
+ * @param {...*} [args] The arguments to invoke the method with.
+ * @returns {Function} Returns the new invoker function.
+ * @example
+ *
+ * var array = _.times(3, _.constant),
+ * object = { 'a': array, 'b': array, 'c': array };
+ *
+ * _.map(['a[2]', 'c[0]'], _.methodOf(object));
+ * // => [2, 0]
+ *
+ * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
+ * // => [2, 0]
+ */
+ var methodOf = baseRest(function(object, args) {
+ return function(path) {
+ return baseInvoke(object, path, args);
+ };
+ });
+
+ /**
+ * 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);
+
+ arrayEach(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.
+ }
+
+ /**
+ * Creates a function that gets the argument at index `n`. If `n` is negative,
+ * the nth argument from the end is returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {number} [n=0] The index of the argument to return.
+ * @returns {Function} Returns the new pass-thru function.
+ * @example
+ *
+ * var func = _.nthArg(1);
+ * func('a', 'b', 'c', 'd');
+ * // => 'b'
+ *
+ * var func = _.nthArg(-2);
+ * func('a', 'b', 'c', 'd');
+ * // => 'c'
+ */
+ function nthArg(n) {
+ n = toInteger(n);
+ return baseRest(function(args) {
+ return baseNth(args, n);
+ });
+ }
+
+ /**
+ * Creates a function that invokes `iteratees` with the arguments it receives
+ * and returns their results.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {...(Function|Function[])} [iteratees=[_.identity]]
+ * The iteratees to invoke.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.over([Math.max, Math.min]);
+ *
+ * func(1, 2, 3, 4);
+ * // => [4, 1]
+ */
+ var over = createOver(arrayMap);
+
+ /**
+ * Creates a function that checks if **all** of the `predicates` return
+ * truthy when invoked with the arguments it receives.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {...(Function|Function[])} [predicates=[_.identity]]
+ * The predicates to check.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.overEvery([Boolean, isFinite]);
+ *
+ * func('1');
+ * // => true
+ *
+ * func(null);
+ * // => false
+ *
+ * func(NaN);
+ * // => false
+ */
+ var overEvery = createOver(arrayEvery);
+
+ /**
+ * Creates a function that checks if **any** of the `predicates` return
+ * truthy when invoked with the arguments it receives.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {...(Function|Function[])} [predicates=[_.identity]]
+ * The predicates to check.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.overSome([Boolean, isFinite]);
+ *
+ * func('1');
+ * // => true
+ *
+ * func(null);
+ * // => true
+ *
+ * func(NaN);
+ * // => false
+ */
+ var overSome = createOver(arraySome);
+
+ /**
+ * 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);
+ }
+
+ /**
+ * The opposite of `_.property`; this method creates a function that returns
+ * the value at a given path of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {Object} object The object to query.
+ * @returns {Function} Returns the new accessor function.
+ * @example
+ *
+ * var array = [0, 1, 2],
+ * object = { 'a': array, 'b': array, 'c': array };
+ *
+ * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
+ * // => [2, 0]
+ *
+ * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
+ * // => [2, 0]
+ */
+ function propertyOf(object) {
+ return function(path) {
+ return object == null ? undefined : baseGet(object, path);
+ };
+ }
+
+ /**
+ * Creates an array of numbers (positive and/or negative) progressing from
+ * `start` up to, but not including, `end`. A step of `-1` is used if a negative
+ * `start` is specified without an `end` or `step`. If `end` is not specified,
+ * it's set to `start` with `start` then set to `0`.
+ *
+ * **Note:** JavaScript follows the IEEE-754 standard for resolving
+ * floating-point values which can produce unexpected results.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {number} [start=0] The start of the range.
+ * @param {number} end The end of the range.
+ * @param {number} [step=1] The value to increment or decrement by.
+ * @returns {Array} Returns the range of numbers.
+ * @see _.inRange, _.rangeRight
+ * @example
+ *
+ * _.range(4);
+ * // => [0, 1, 2, 3]
+ *
+ * _.range(-4);
+ * // => [0, -1, -2, -3]
+ *
+ * _.range(1, 5);
+ * // => [1, 2, 3, 4]
+ *
+ * _.range(0, 20, 5);
+ * // => [0, 5, 10, 15]
+ *
+ * _.range(0, -4, -1);
+ * // => [0, -1, -2, -3]
+ *
+ * _.range(1, 4, 0);
+ * // => [1, 1, 1]
+ *
+ * _.range(0);
+ * // => []
+ */
+ var range = createRange();
+
+ /**
+ * This method is like `_.range` except that it populates values in
+ * descending order.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {number} [start=0] The start of the range.
+ * @param {number} end The end of the range.
+ * @param {number} [step=1] The value to increment or decrement by.
+ * @returns {Array} Returns the range of numbers.
+ * @see _.inRange, _.range
+ * @example
+ *
+ * _.rangeRight(4);
+ * // => [3, 2, 1, 0]
+ *
+ * _.rangeRight(-4);
+ * // => [-3, -2, -1, 0]
+ *
+ * _.rangeRight(1, 5);
+ * // => [4, 3, 2, 1]
+ *
+ * _.rangeRight(0, 20, 5);
+ * // => [15, 10, 5, 0]
+ *
+ * _.rangeRight(0, -4, -1);
+ * // => [-3, -2, -1, 0]
+ *
+ * _.rangeRight(1, 4, 0);
+ * // => [1, 1, 1]
+ *
+ * _.rangeRight(0);
+ * // => []
+ */
+ var rangeRight = createRange(true);
+
+ /**
+ * This method returns a new empty array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {Array} Returns the new empty array.
+ * @example
+ *
+ * var arrays = _.times(2, _.stubArray);
+ *
+ * console.log(arrays);
+ * // => [[], []]
+ *
+ * console.log(arrays[0] === arrays[1]);
+ * // => false
+ */
+ function stubArray() {
+ return [];
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * This method returns a new empty object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {Object} Returns the new empty object.
+ * @example
+ *
+ * var objects = _.times(2, _.stubObject);
+ *
+ * console.log(objects);
+ * // => [{}, {}]
+ *
+ * console.log(objects[0] === objects[1]);
+ * // => false
+ */
+ function stubObject() {
+ return {};
+ }
+
+ /**
+ * This method returns an empty string.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {string} Returns the empty string.
+ * @example
+ *
+ * _.times(2, _.stubString);
+ * // => ['', '']
+ */
+ function stubString() {
+ return '';
+ }
+
+ /**
+ * This method returns `true`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {boolean} Returns `true`.
+ * @example
+ *
+ * _.times(2, _.stubTrue);
+ * // => [true, true]
+ */
+ function stubTrue() {
+ return true;
+ }
+
+ /**
+ * Invokes the iteratee `n` times, returning an array of the results of
+ * each invocation. The iteratee is invoked with one argument; (index).
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {number} n The number of times to invoke `iteratee`.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the array of results.
+ * @example
+ *
+ * _.times(3, String);
+ * // => ['0', '1', '2']
+ *
+ * _.times(4, _.constant(0));
+ * // => [0, 0, 0, 0]
+ */
+ function times(n, iteratee) {
+ n = toInteger(n);
+ if (n < 1 || n > MAX_SAFE_INTEGER) {
+ return [];
+ }
+ var index = MAX_ARRAY_LENGTH,
+ length = nativeMin(n, MAX_ARRAY_LENGTH);
+
+ iteratee = getIteratee(iteratee);
+ n -= MAX_ARRAY_LENGTH;
+
+ var result = baseTimes(length, iteratee);
+ while (++index < n) {
+ iteratee(index);
+ }
+ return result;
+ }
+
+ /**
+ * Converts `value` to a property path array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {*} value The value to convert.
+ * @returns {Array} Returns the new property path array.
+ * @example
+ *
+ * _.toPath('a.b.c');
+ * // => ['a', 'b', 'c']
+ *
+ * _.toPath('a[0].b.c');
+ * // => ['a', '0', 'b', 'c']
+ */
+ function toPath(value) {
+ if (isArray(value)) {
+ return arrayMap(value, toKey);
+ }
+ return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
+ }
+
+ /**
+ * 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;
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * 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);
+
+ /**
+ * 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');
+
+ /**
+ * 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);
+
+ /**
+ * 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');
+
+ /**
+ * 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;
+ }
+
+ /**
+ * This method is like `_.max` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the criterion by which
+ * the value is ranked. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {*} Returns the maximum value.
+ * @example
+ *
+ * var objects = [{ 'n': 1 }, { 'n': 2 }];
+ *
+ * _.maxBy(objects, function(o) { return o.n; });
+ * // => { 'n': 2 }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.maxBy(objects, 'n');
+ * // => { 'n': 2 }
+ */
+ function maxBy(array, iteratee) {
+ return (array && array.length)
+ ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)
+ : undefined;
+ }
+
+ /**
+ * Computes the mean of the values in `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {number} Returns the mean.
+ * @example
+ *
+ * _.mean([4, 2, 8, 6]);
+ * // => 5
+ */
+ function mean(array) {
+ return baseMean(array, identity);
+ }
+
+ /**
+ * This method is like `_.mean` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the value to be averaged.
+ * The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {number} Returns the mean.
+ * @example
+ *
+ * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
+ *
+ * _.meanBy(objects, function(o) { return o.n; });
+ * // => 5
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.meanBy(objects, 'n');
+ * // => 5
+ */
+ function meanBy(array, iteratee) {
+ return baseMean(array, getIteratee(iteratee, 2));
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * This method is like `_.min` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the criterion by which
+ * the value is ranked. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {*} Returns the minimum value.
+ * @example
+ *
+ * var objects = [{ 'n': 1 }, { 'n': 2 }];
+ *
+ * _.minBy(objects, function(o) { return o.n; });
+ * // => { 'n': 1 }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.minBy(objects, 'n');
+ * // => { 'n': 1 }
+ */
+ function minBy(array, iteratee) {
+ return (array && array.length)
+ ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)
+ : undefined;
+ }
+
+ /**
+ * Multiply two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Math
+ * @param {number} multiplier The first number in a multiplication.
+ * @param {number} multiplicand The second number in a multiplication.
+ * @returns {number} Returns the product.
+ * @example
+ *
+ * _.multiply(6, 4);
+ * // => 24
+ */
+ var multiply = createMathOperation(function(multiplier, multiplicand) {
+ return multiplier * multiplicand;
+ }, 1);
+
+ /**
+ * Computes `number` rounded to `precision`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Math
+ * @param {number} number The number to round.
+ * @param {number} [precision=0] The precision to round to.
+ * @returns {number} Returns the rounded number.
+ * @example
+ *
+ * _.round(4.006);
+ * // => 4
+ *
+ * _.round(4.006, 2);
+ * // => 4.01
+ *
+ * _.round(4060, -2);
+ * // => 4100
+ */
+ var round = createRound('round');
+
+ /**
+ * Subtract two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {number} minuend The first number in a subtraction.
+ * @param {number} subtrahend The second number in a subtraction.
+ * @returns {number} Returns the difference.
+ * @example
+ *
+ * _.subtract(6, 4);
+ * // => 2
+ */
+ var subtract = createMathOperation(function(minuend, subtrahend) {
+ return minuend - subtrahend;
+ }, 0);
+
+ /**
+ * Computes the sum of the values in `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.4.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {number} Returns the sum.
+ * @example
+ *
+ * _.sum([4, 2, 8, 6]);
+ * // => 20
+ */
+ function sum(array) {
+ return (array && array.length)
+ ? baseSum(array, identity)
+ : 0;
+ }
+
+ /**
+ * This method is like `_.sum` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the value to be summed.
+ * The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {number} Returns the sum.
+ * @example
+ *
+ * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
+ *
+ * _.sumBy(objects, function(o) { return o.n; });
+ * // => 20
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.sumBy(objects, 'n');
+ * // => 20
+ */
+ function sumBy(array, iteratee) {
+ return (array && array.length)
+ ? baseSum(array, getIteratee(iteratee, 2))
+ : 0;
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ // Add methods that return wrapped values in chain sequences.
+ lodash.after = after;
+ lodash.ary = ary;
+ lodash.assign = assign;
+ lodash.assignIn = assignIn;
+ lodash.assignInWith = assignInWith;
+ lodash.assignWith = assignWith;
+ lodash.at = at;
+ lodash.before = before;
+ lodash.bind = bind;
+ lodash.bindAll = bindAll;
+ lodash.bindKey = bindKey;
+ lodash.castArray = castArray;
+ lodash.chain = chain;
+ lodash.chunk = chunk;
+ lodash.compact = compact;
+ lodash.concat = concat;
+ lodash.cond = cond;
+ lodash.conforms = conforms;
+ lodash.constant = constant;
+ lodash.countBy = countBy;
+ lodash.create = create;
+ lodash.curry = curry;
+ lodash.curryRight = curryRight;
+ lodash.debounce = debounce;
+ lodash.defaults = defaults;
+ lodash.defaultsDeep = defaultsDeep;
+ lodash.defer = defer;
+ lodash.delay = delay;
+ lodash.difference = difference;
+ lodash.differenceBy = differenceBy;
+ lodash.differenceWith = differenceWith;
+ lodash.drop = drop;
+ lodash.dropRight = dropRight;
+ lodash.dropRightWhile = dropRightWhile;
+ lodash.dropWhile = dropWhile;
+ lodash.fill = fill;
+ lodash.filter = filter;
+ lodash.flatMap = flatMap;
+ lodash.flatMapDeep = flatMapDeep;
+ lodash.flatMapDepth = flatMapDepth;
+ lodash.flatten = flatten;
+ lodash.flattenDeep = flattenDeep;
+ lodash.flattenDepth = flattenDepth;
+ lodash.flip = flip;
+ lodash.flow = flow;
+ lodash.flowRight = flowRight;
+ lodash.fromPairs = fromPairs;
+ lodash.functions = functions;
+ lodash.functionsIn = functionsIn;
+ lodash.groupBy = groupBy;
+ lodash.initial = initial;
+ lodash.intersection = intersection;
+ lodash.intersectionBy = intersectionBy;
+ lodash.intersectionWith = intersectionWith;
+ lodash.invert = invert;
+ lodash.invertBy = invertBy;
+ lodash.invokeMap = invokeMap;
+ lodash.iteratee = iteratee;
+ lodash.keyBy = keyBy;
+ lodash.keys = keys;
+ lodash.keysIn = keysIn;
+ lodash.map = map;
+ lodash.mapKeys = mapKeys;
+ lodash.mapValues = mapValues;
+ lodash.matches = matches;
+ lodash.matchesProperty = matchesProperty;
+ lodash.memoize = memoize;
+ lodash.merge = merge;
+ lodash.mergeWith = mergeWith;
+ lodash.method = method;
+ lodash.methodOf = methodOf;
+ lodash.mixin = mixin;
+ lodash.negate = negate;
+ lodash.nthArg = nthArg;
+ lodash.omit = omit;
+ lodash.omitBy = omitBy;
+ lodash.once = once;
+ lodash.orderBy = orderBy;
+ lodash.over = over;
+ lodash.overArgs = overArgs;
+ lodash.overEvery = overEvery;
+ lodash.overSome = overSome;
+ lodash.partial = partial;
+ lodash.partialRight = partialRight;
+ lodash.partition = partition;
+ lodash.pick = pick;
+ lodash.pickBy = pickBy;
+ lodash.property = property;
+ lodash.propertyOf = propertyOf;
+ lodash.pull = pull;
+ lodash.pullAll = pullAll;
+ lodash.pullAllBy = pullAllBy;
+ lodash.pullAllWith = pullAllWith;
+ lodash.pullAt = pullAt;
+ lodash.range = range;
+ lodash.rangeRight = rangeRight;
+ lodash.rearg = rearg;
+ lodash.reject = reject;
+ lodash.remove = remove;
+ lodash.rest = rest;
+ lodash.reverse = reverse;
+ lodash.sampleSize = sampleSize;
+ lodash.set = set;
+ lodash.setWith = setWith;
+ lodash.shuffle = shuffle;
+ lodash.slice = slice;
+ lodash.sortBy = sortBy;
+ lodash.sortedUniq = sortedUniq;
+ lodash.sortedUniqBy = sortedUniqBy;
+ lodash.split = split;
+ lodash.spread = spread;
+ lodash.tail = tail;
+ lodash.take = take;
+ lodash.takeRight = takeRight;
+ lodash.takeRightWhile = takeRightWhile;
+ lodash.takeWhile = takeWhile;
+ lodash.tap = tap;
+ lodash.throttle = throttle;
+ lodash.thru = thru;
+ lodash.toArray = toArray;
+ lodash.toPairs = toPairs;
+ lodash.toPairsIn = toPairsIn;
+ lodash.toPath = toPath;
+ lodash.toPlainObject = toPlainObject;
+ lodash.transform = transform;
+ lodash.unary = unary;
+ lodash.union = union;
+ lodash.unionBy = unionBy;
+ lodash.unionWith = unionWith;
+ lodash.uniq = uniq;
+ lodash.uniqBy = uniqBy;
+ lodash.uniqWith = uniqWith;
+ lodash.unset = unset;
+ lodash.unzip = unzip;
+ lodash.unzipWith = unzipWith;
+ lodash.update = update;
+ lodash.updateWith = updateWith;
+ lodash.values = values;
+ lodash.valuesIn = valuesIn;
+ lodash.without = without;
+ lodash.words = words;
+ lodash.wrap = wrap;
+ lodash.xor = xor;
+ lodash.xorBy = xorBy;
+ lodash.xorWith = xorWith;
+ lodash.zip = zip;
+ lodash.zipObject = zipObject;
+ lodash.zipObjectDeep = zipObjectDeep;
+ lodash.zipWith = zipWith;
+
+ // Add aliases.
+ lodash.entries = toPairs;
+ lodash.entriesIn = toPairsIn;
+ lodash.extend = assignIn;
+ lodash.extendWith = assignInWith;
+
+ // Add methods to `lodash.prototype`.
+ mixin(lodash, lodash);
+
+ /*------------------------------------------------------------------------*/
+
+ // Add methods that return unwrapped values in chain sequences.
+ lodash.add = add;
+ lodash.attempt = attempt;
+ lodash.camelCase = camelCase;
+ lodash.capitalize = capitalize;
+ lodash.ceil = ceil;
+ lodash.clamp = clamp;
+ lodash.clone = clone;
+ lodash.cloneDeep = cloneDeep;
+ lodash.cloneDeepWith = cloneDeepWith;
+ lodash.cloneWith = cloneWith;
+ lodash.conformsTo = conformsTo;
+ lodash.deburr = deburr;
+ lodash.defaultTo = defaultTo;
+ lodash.divide = divide;
+ lodash.endsWith = endsWith;
+ lodash.eq = eq;
+ lodash.escape = escape;
+ lodash.escapeRegExp = escapeRegExp;
+ lodash.every = every;
+ lodash.find = find;
+ lodash.findIndex = findIndex;
+ lodash.findKey = findKey;
+ lodash.findLast = findLast;
+ lodash.findLastIndex = findLastIndex;
+ lodash.findLastKey = findLastKey;
+ lodash.floor = floor;
+ lodash.forEach = forEach;
+ lodash.forEachRight = forEachRight;
+ lodash.forIn = forIn;
+ lodash.forInRight = forInRight;
+ lodash.forOwn = forOwn;
+ lodash.forOwnRight = forOwnRight;
+ lodash.get = get;
+ lodash.gt = gt;
+ lodash.gte = gte;
+ lodash.has = has;
+ lodash.hasIn = hasIn;
+ lodash.head = head;
+ lodash.identity = identity;
+ lodash.includes = includes;
+ lodash.indexOf = indexOf;
+ lodash.inRange = inRange;
+ lodash.invoke = invoke;
+ lodash.isArguments = isArguments;
+ lodash.isArray = isArray;
+ lodash.isArrayBuffer = isArrayBuffer;
+ lodash.isArrayLike = isArrayLike;
+ lodash.isArrayLikeObject = isArrayLikeObject;
+ lodash.isBoolean = isBoolean;
+ lodash.isBuffer = isBuffer;
+ lodash.isDate = isDate;
+ lodash.isElement = isElement;
+ lodash.isEmpty = isEmpty;
+ lodash.isEqual = isEqual;
+ lodash.isEqualWith = isEqualWith;
+ lodash.isError = isError;
+ lodash.isFinite = isFinite;
+ lodash.isFunction = isFunction;
+ lodash.isInteger = isInteger;
+ lodash.isLength = isLength;
+ lodash.isMap = isMap;
+ lodash.isMatch = isMatch;
+ lodash.isMatchWith = isMatchWith;
+ lodash.isNaN = isNaN;
+ lodash.isNative = isNative;
+ lodash.isNil = isNil;
+ lodash.isNull = isNull;
+ lodash.isNumber = isNumber;
+ lodash.isObject = isObject;
+ lodash.isObjectLike = isObjectLike;
+ lodash.isPlainObject = isPlainObject;
+ lodash.isRegExp = isRegExp;
+ lodash.isSafeInteger = isSafeInteger;
+ lodash.isSet = isSet;
+ lodash.isString = isString;
+ lodash.isSymbol = isSymbol;
+ lodash.isTypedArray = isTypedArray;
+ lodash.isUndefined = isUndefined;
+ lodash.isWeakMap = isWeakMap;
+ lodash.isWeakSet = isWeakSet;
+ lodash.join = join;
+ lodash.kebabCase = kebabCase;
+ lodash.last = last;
+ lodash.lastIndexOf = lastIndexOf;
+ lodash.lowerCase = lowerCase;
+ lodash.lowerFirst = lowerFirst;
+ lodash.lt = lt;
+ lodash.lte = lte;
+ lodash.max = max;
+ lodash.maxBy = maxBy;
+ lodash.mean = mean;
+ lodash.meanBy = meanBy;
+ lodash.min = min;
+ lodash.minBy = minBy;
+ lodash.stubArray = stubArray;
+ lodash.stubFalse = stubFalse;
+ lodash.stubObject = stubObject;
+ lodash.stubString = stubString;
+ lodash.stubTrue = stubTrue;
+ lodash.multiply = multiply;
+ lodash.nth = nth;
+ lodash.noConflict = noConflict;
+ lodash.noop = noop;
+ lodash.now = now;
+ lodash.pad = pad;
+ lodash.padEnd = padEnd;
+ lodash.padStart = padStart;
+ lodash.parseInt = parseInt;
+ lodash.random = random;
+ lodash.reduce = reduce;
+ lodash.reduceRight = reduceRight;
+ lodash.repeat = repeat;
+ lodash.replace = replace;
+ lodash.result = result;
+ lodash.round = round;
+ lodash.runInContext = runInContext;
+ lodash.sample = sample;
+ lodash.size = size;
+ lodash.snakeCase = snakeCase;
+ lodash.some = some;
+ lodash.sortedIndex = sortedIndex;
+ lodash.sortedIndexBy = sortedIndexBy;
+ lodash.sortedIndexOf = sortedIndexOf;
+ lodash.sortedLastIndex = sortedLastIndex;
+ lodash.sortedLastIndexBy = sortedLastIndexBy;
+ lodash.sortedLastIndexOf = sortedLastIndexOf;
+ lodash.startCase = startCase;
+ lodash.startsWith = startsWith;
+ lodash.subtract = subtract;
+ lodash.sum = sum;
+ lodash.sumBy = sumBy;
+ lodash.template = template;
+ lodash.times = times;
+ lodash.toFinite = toFinite;
+ lodash.toInteger = toInteger;
+ lodash.toLength = toLength;
+ lodash.toLower = toLower;
+ lodash.toNumber = toNumber;
+ lodash.toSafeInteger = toSafeInteger;
+ lodash.toString = toString;
+ lodash.toUpper = toUpper;
+ lodash.trim = trim;
+ lodash.trimEnd = trimEnd;
+ lodash.trimStart = trimStart;
+ lodash.truncate = truncate;
+ lodash.unescape = unescape;
+ lodash.uniqueId = uniqueId;
+ lodash.upperCase = upperCase;
+ lodash.upperFirst = upperFirst;
+
+ // Add aliases.
+ lodash.each = forEach;
+ lodash.eachRight = forEachRight;
+ 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;
+
+ // Assign default placeholders.
+ arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
+ lodash[methodName].placeholder = lodash;
+ });
+
+ // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
+ arrayEach(['drop', 'take'], function(methodName, index) {
+ LazyWrapper.prototype[methodName] = function(n) {
+ n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
+
+ var result = (this.__filtered__ && !index)
+ ? new LazyWrapper(this)
+ : this.clone();
+
+ if (result.__filtered__) {
+ result.__takeCount__ = nativeMin(n, result.__takeCount__);
+ } else {
+ result.__views__.push({
+ 'size': nativeMin(n, MAX_ARRAY_LENGTH),
+ 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')
+ });
+ }
+ return result;
+ };
+
+ LazyWrapper.prototype[methodName + 'Right'] = function(n) {
+ return this.reverse()[methodName](n).reverse();
+ };
+ });
+
+ // Add `LazyWrapper` methods that accept an `iteratee` value.
+ arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
+ var type = index + 1,
+ isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
+
+ LazyWrapper.prototype[methodName] = function(iteratee) {
+ var result = this.clone();
+ result.__iteratees__.push({
+ 'iteratee': getIteratee(iteratee, 3),
+ 'type': type
+ });
+ result.__filtered__ = result.__filtered__ || isFilter;
+ return result;
+ };
+ });
+
+ // Add `LazyWrapper` methods for `_.head` and `_.last`.
+ arrayEach(['head', 'last'], function(methodName, index) {
+ var takeName = 'take' + (index ? 'Right' : '');
+
+ LazyWrapper.prototype[methodName] = function() {
+ return this[takeName](1).value()[0];
+ };
+ });
+
+ // Add `LazyWrapper` methods for `_.initial` and `_.tail`.
+ arrayEach(['initial', 'tail'], function(methodName, index) {
+ var dropName = 'drop' + (index ? '' : 'Right');
+
+ LazyWrapper.prototype[methodName] = function() {
+ return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
+ };
+ });
+
+ LazyWrapper.prototype.compact = function() {
+ return this.filter(identity);
+ };
+
+ LazyWrapper.prototype.find = function(predicate) {
+ return this.filter(predicate).head();
+ };
+
+ LazyWrapper.prototype.findLast = function(predicate) {
+ return this.reverse().find(predicate);
+ };
+
+ LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
+ if (typeof path == 'function') {
+ return new LazyWrapper(this);
+ }
+ return this.map(function(value) {
+ return baseInvoke(value, path, args);
+ });
+ });
+
+ LazyWrapper.prototype.reject = function(predicate) {
+ return this.filter(negate(getIteratee(predicate)));
+ };
+
+ LazyWrapper.prototype.slice = function(start, end) {
+ start = toInteger(start);
+
+ var result = this;
+ if (result.__filtered__ && (start > 0 || end < 0)) {
+ return new LazyWrapper(result);
+ }
+ if (start < 0) {
+ result = result.takeRight(-start);
+ } else if (start) {
+ result = result.drop(start);
+ }
+ if (end !== undefined) {
+ end = toInteger(end);
+ result = end < 0 ? result.dropRight(-end) : result.take(end - start);
+ }
+ return result;
+ };
+
+ LazyWrapper.prototype.takeRightWhile = function(predicate) {
+ return this.reverse().takeWhile(predicate).reverse();
+ };
+
+ LazyWrapper.prototype.toArray = function() {
+ return this.take(MAX_ARRAY_LENGTH);
+ };
+
+ // Add `LazyWrapper` methods to `lodash.prototype`.
+ baseForOwn(LazyWrapper.prototype, function(func, methodName) {
+ var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),
+ isTaker = /^(?:head|last)$/.test(methodName),
+ lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],
+ retUnwrapped = isTaker || /^find/.test(methodName);
+
+ if (!lodashFunc) {
+ return;
+ }
+ lodash.prototype[methodName] = function() {
+ var value = this.__wrapped__,
+ args = isTaker ? [1] : arguments,
+ isLazy = value instanceof LazyWrapper,
+ iteratee = args[0],
+ useLazy = isLazy || isArray(value);
+
+ var interceptor = function(value) {
+ var result = lodashFunc.apply(lodash, arrayPush([value], args));
+ return (isTaker && chainAll) ? result[0] : result;
+ };
+
+ if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
+ // Avoid lazy use if the iteratee has a "length" value other than `1`.
+ isLazy = useLazy = false;
+ }
+ var chainAll = this.__chain__,
+ isHybrid = !!this.__actions__.length,
+ isUnwrapped = retUnwrapped && !chainAll,
+ onlyLazy = isLazy && !isHybrid;
+
+ if (!retUnwrapped && useLazy) {
+ value = onlyLazy ? value : new LazyWrapper(this);
+ var result = func.apply(value, args);
+ result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
+ return new LodashWrapper(result, chainAll);
+ }
+ if (isUnwrapped && onlyLazy) {
+ return func.apply(this, args);
+ }
+ result = this.thru(interceptor);
+ return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;
+ };
+ });
+
+ // Add `Array` methods to `lodash.prototype`.
+ arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
+ var func = arrayProto[methodName],
+ chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
+ retUnwrapped = /^(?:pop|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);
+ });
+ };
+ });
+
+ // Map minified method names to their real names.
+ baseForOwn(LazyWrapper.prototype, function(func, methodName) {
+ var lodashFunc = lodash[methodName];
+ if (lodashFunc) {
+ var key = (lodashFunc.name + ''),
+ names = realNames[key] || (realNames[key] = []);
+
+ names.push({ 'name': methodName, 'func': lodashFunc });
+ }
+ });
+
+ realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{
+ 'name': 'wrapper',
+ 'func': undefined
+ }];
+
+ // Add methods to `LazyWrapper`.
+ LazyWrapper.prototype.clone = lazyClone;
+ LazyWrapper.prototype.reverse = lazyReverse;
+ LazyWrapper.prototype.value = lazyValue;
+
+ // Add chain sequence methods to the `lodash` wrapper.
+ lodash.prototype.at = wrapperAt;
+ lodash.prototype.chain = wrapperChain;
+ lodash.prototype.commit = wrapperCommit;
+ lodash.prototype.next = wrapperNext;
+ lodash.prototype.plant = wrapperPlant;
+ lodash.prototype.reverse = wrapperReverse;
+ lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
+
+ // Add lazy aliases.
+ lodash.prototype.first = lodash.prototype.head;
+
+ if (symIterator) {
+ lodash.prototype[symIterator] = wrapperToIterator;
+ }
+ return lodash;
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ // Export lodash.
+ var _ = runInContext();
+
+ // 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._ = _;
+
+ // Define as an anonymous module so, through path mapping, it can be
+ // referenced as the "underscore" module.
+ define(function() {
+ return _;
+ });
+ }
+ // Check for `exports` after `define` in case a build optimizer adds it.
+ else if (freeModule) {
+ // Export for Node.js.
+ (freeModule.exports = _)._ = _;
+ // Export for CommonJS support.
+ freeExports._ = _;
+ }
+ else {
+ // Export to the global object.
+ root._ = _;
+ }
+}.call(this));
diff --git a/tools/node_modules/eslint/node_modules/lodash/lodash.min.js b/tools/node_modules/eslint/node_modules/lodash/lodash.min.js
new file mode 100644
index 0000000000..ca447f4e82
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/lodash.min.js
@@ -0,0 +1,136 @@
+/**
+ * @license
+ * Lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
+ */
+;(function(){function n(n,t){return n.set(t[0],t[1]),n}function t(n,t){return n.add(t),n}function r(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function e(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u<i;){var o=n[u];t(e,o,r(o),n)}return e}function u(n,t){for(var r=-1,e=null==n?0:n.length;++r<e&&false!==t(n[r],r,n););return n}function i(n,t){for(var r=null==n?0:n.length;r--&&false!==t(n[r],r,n););
+return n}function o(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(!t(n[r],r,n))return false;return true}function f(n,t){for(var r=-1,e=null==n?0:n.length,u=0,i=[];++r<e;){var o=n[r];t(o,r,n)&&(i[u++]=o)}return i}function c(n,t){return!(null==n||!n.length)&&-1<d(n,t,0)}function a(n,t,r){for(var e=-1,u=null==n?0:n.length;++e<u;)if(r(t,n[e]))return true;return false}function l(n,t){for(var r=-1,e=null==n?0:n.length,u=Array(e);++r<e;)u[r]=t(n[r],r,n);return u}function s(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];
+return n}function h(n,t,r,e){var u=-1,i=null==n?0:n.length;for(e&&i&&(r=n[++u]);++u<i;)r=t(r,n[u],u,n);return r}function p(n,t,r,e){var u=null==n?0:n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);return r}function _(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(t(n[r],r,n))return true;return false}function v(n,t,r){var e;return r(n,function(n,r,u){if(t(n,r,u))return e=r,false}),e}function g(n,t,r,e){var u=n.length;for(r+=e?1:-1;e?r--:++r<u;)if(t(n[r],r,n))return r;return-1}function d(n,t,r){if(t===t)n:{
+--r;for(var e=n.length;++r<e;)if(n[r]===t){n=r;break n}n=-1}else n=g(n,b,r);return n}function y(n,t,r,e){--r;for(var u=n.length;++r<u;)if(e(n[r],t))return r;return-1}function b(n){return n!==n}function x(n,t){var r=null==n?0:n.length;return r?k(n,t)/r:P}function j(n){return function(t){return null==t?F:t[n]}}function w(n){return function(t){return null==n?F:n[t]}}function m(n,t,r,e,u){return u(n,function(n,u,i){r=e?(e=false,n):t(r,n,u,i)}),r}function A(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].c;
+return n}function k(n,t){for(var r,e=-1,u=n.length;++e<u;){var i=t(n[e]);i!==F&&(r=r===F?i:r+i)}return r}function E(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r);return e}function O(n,t){return l(t,function(t){return[t,n[t]]})}function S(n){return function(t){return n(t)}}function I(n,t){return l(t,function(t){return n[t]})}function R(n,t){return n.has(t)}function z(n,t){for(var r=-1,e=n.length;++r<e&&-1<d(t,n[r],0););return r}function W(n,t){for(var r=n.length;r--&&-1<d(t,n[r],0););return r}function B(n){
+return"\\"+Tn[n]}function L(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r}function U(n,t){return function(r){return n(t(r))}}function C(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){var o=n[r];o!==t&&"__lodash_placeholder__"!==o||(n[r]="__lodash_placeholder__",i[u++]=r)}return i}function D(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=n}),r}function M(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=[n,n]}),r}function T(n){if(Bn.test(n)){
+for(var t=zn.lastIndex=0;zn.test(n);)++t;n=t}else n=tt(n);return n}function $(n){return Bn.test(n)?n.match(zn)||[]:n.split("")}var F,N=1/0,P=NaN,Z=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],q=/\b__p\+='';/g,V=/\b(__p\+=)''\+/g,K=/(__e\(.*?\)|\b__t\))\+'';/g,G=/&(?:amp|lt|gt|quot|#39);/g,H=/[&<>"']/g,J=RegExp(G.source),Y=RegExp(H.source),Q=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,nn=/<%=([\s\S]+?)%>/g,tn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rn=/^\w*$/,en=/^\./,un=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,on=/[\\^$.*+?()[\]{}|]/g,fn=RegExp(on.source),cn=/^\s+|\s+$/g,an=/^\s+/,ln=/\s+$/,sn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,hn=/\{\n\/\* \[wrapped with (.+)\] \*/,pn=/,? & /,_n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,vn=/\\(\\)?/g,gn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,dn=/\w*$/,yn=/^[-+]0x[0-9a-f]+$/i,bn=/^0b[01]+$/i,xn=/^\[object .+?Constructor\]$/,jn=/^0o[0-7]+$/i,wn=/^(?:0|[1-9]\d*)$/,mn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,An=/($^)/,kn=/['\n\r\u2028\u2029\\]/g,En="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*",On="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+En,Sn="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",In=RegExp("['\u2019]","g"),Rn=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),zn=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+Sn+En,"g"),Wn=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)|\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)|\\d+",On].join("|"),"g"),Bn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),Ln=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Un="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".split(" "),Cn={};
+Cn["[object Float32Array]"]=Cn["[object Float64Array]"]=Cn["[object Int8Array]"]=Cn["[object Int16Array]"]=Cn["[object Int32Array]"]=Cn["[object Uint8Array]"]=Cn["[object Uint8ClampedArray]"]=Cn["[object Uint16Array]"]=Cn["[object Uint32Array]"]=true,Cn["[object Arguments]"]=Cn["[object Array]"]=Cn["[object ArrayBuffer]"]=Cn["[object Boolean]"]=Cn["[object DataView]"]=Cn["[object Date]"]=Cn["[object Error]"]=Cn["[object Function]"]=Cn["[object Map]"]=Cn["[object Number]"]=Cn["[object Object]"]=Cn["[object RegExp]"]=Cn["[object Set]"]=Cn["[object String]"]=Cn["[object WeakMap]"]=false;
+var Dn={};Dn["[object Arguments]"]=Dn["[object Array]"]=Dn["[object ArrayBuffer]"]=Dn["[object DataView]"]=Dn["[object Boolean]"]=Dn["[object Date]"]=Dn["[object Float32Array]"]=Dn["[object Float64Array]"]=Dn["[object Int8Array]"]=Dn["[object Int16Array]"]=Dn["[object Int32Array]"]=Dn["[object Map]"]=Dn["[object Number]"]=Dn["[object Object]"]=Dn["[object RegExp]"]=Dn["[object Set]"]=Dn["[object String]"]=Dn["[object Symbol]"]=Dn["[object Uint8Array]"]=Dn["[object Uint8ClampedArray]"]=Dn["[object Uint16Array]"]=Dn["[object Uint32Array]"]=true,
+Dn["[object Error]"]=Dn["[object Function]"]=Dn["[object WeakMap]"]=false;var Mn,Tn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$n=parseFloat,Fn=parseInt,Nn=typeof global=="object"&&global&&global.Object===Object&&global,Pn=typeof self=="object"&&self&&self.Object===Object&&self,Zn=Nn||Pn||Function("return this")(),qn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Vn=qn&&typeof module=="object"&&module&&!module.nodeType&&module,Kn=Vn&&Vn.exports===qn,Gn=Kn&&Nn.process;
+n:{try{Mn=Gn&&Gn.binding&&Gn.binding("util");break n}catch(n){}Mn=void 0}var Hn=Mn&&Mn.isArrayBuffer,Jn=Mn&&Mn.isDate,Yn=Mn&&Mn.isMap,Qn=Mn&&Mn.isRegExp,Xn=Mn&&Mn.isSet,nt=Mn&&Mn.isTypedArray,tt=j("length"),rt=w({"\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","\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"}),et=w({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),ut=w({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),it=function w(En){function On(n){if(xu(n)&&!af(n)&&!(n instanceof Mn)){if(n instanceof zn)return n;if(ci.call(n,"__wrapped__"))return Pe(n)}return new zn(n)}function Sn(){}function zn(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=F}function Mn(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,
+this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Tn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function Nn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function Pn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function qn(n){var t=-1,r=null==n?0:n.length;for(this.__data__=new Pn;++t<r;)this.add(n[t])}function Vn(n){
+this.size=(this.__data__=new Nn(n)).size}function Gn(n,t){var r,e=af(n),u=!e&&cf(n),i=!e&&!u&&sf(n),o=!e&&!u&&!i&&gf(n),u=(e=e||u||i||o)?E(n.length,ri):[],f=u.length;for(r in n)!t&&!ci.call(n,r)||e&&("length"==r||i&&("offset"==r||"parent"==r)||o&&("buffer"==r||"byteLength"==r||"byteOffset"==r)||Re(r,f))||u.push(r);return u}function tt(n){var t=n.length;return t?n[cr(0,t-1)]:F}function ot(n,t){return Te(Mr(n),gt(t,0,n.length))}function ft(n){return Te(Mr(n))}function ct(n,t,r){(r===F||hu(n[t],r))&&(r!==F||t in n)||_t(n,t,r);
+}function at(n,t,r){var e=n[t];ci.call(n,t)&&hu(e,r)&&(r!==F||t in n)||_t(n,t,r)}function lt(n,t){for(var r=n.length;r--;)if(hu(n[r][0],t))return r;return-1}function st(n,t,r,e){return oo(n,function(n,u,i){t(e,n,r(n),i)}),e}function ht(n,t){return n&&Tr(t,Lu(t),n)}function pt(n,t){return n&&Tr(t,Uu(t),n)}function _t(n,t,r){"__proto__"==t&&Ei?Ei(n,t,{configurable:true,enumerable:true,value:r,writable:true}):n[t]=r}function vt(n,t){for(var r=-1,e=t.length,u=Hu(e),i=null==n;++r<e;)u[r]=i?F:Wu(n,t[r]);return u;
+}function gt(n,t,r){return n===n&&(r!==F&&(n=n<=r?n:r),t!==F&&(n=n>=t?n:t)),n}function dt(n,t,r,e,i,o){var f,c=1&t,a=2&t,l=4&t;if(r&&(f=i?r(n,e,i,o):r(n)),f!==F)return f;if(!bu(n))return n;if(e=af(n)){if(f=Ee(n),!c)return Mr(n,f)}else{var s=yo(n),h="[object Function]"==s||"[object GeneratorFunction]"==s;if(sf(n))return Wr(n,c);if("[object Object]"==s||"[object Arguments]"==s||h&&!i){if(f=a||h?{}:Oe(n),!c)return a?Fr(n,pt(f,n)):$r(n,ht(f,n))}else{if(!Dn[s])return i?n:{};f=Se(n,s,dt,c)}}if(o||(o=new Vn),
+i=o.get(n))return i;o.set(n,f);var a=l?a?ye:de:a?Uu:Lu,p=e?F:a(n);return u(p||n,function(e,u){p&&(u=e,e=n[u]),at(f,u,dt(e,t,r,u,n,o))}),f}function yt(n){var t=Lu(n);return function(r){return bt(r,n,t)}}function bt(n,t,r){var e=r.length;if(null==n)return!e;for(n=ni(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===F&&!(u in n)||!i(o))return false}return true}function xt(n,t,r){if(typeof n!="function")throw new ei("Expected a function");return jo(function(){n.apply(F,r)},t)}function jt(n,t,r,e){var u=-1,i=c,o=true,f=n.length,s=[],h=t.length;
+if(!f)return s;r&&(t=l(t,S(r))),e?(i=a,o=false):200<=t.length&&(i=R,o=false,t=new qn(t));n:for(;++u<f;){var p=n[u],_=null==r?p:r(p),p=e||0!==p?p:0;if(o&&_===_){for(var v=h;v--;)if(t[v]===_)continue n;s.push(p)}else i(t,_,e)||s.push(p)}return s}function wt(n,t){var r=true;return oo(n,function(n,e,u){return r=!!t(n,e,u)}),r}function mt(n,t,r){for(var e=-1,u=n.length;++e<u;){var i=n[e],o=t(i);if(null!=o&&(f===F?o===o&&!Au(o):r(o,f)))var f=o,c=i}return c}function At(n,t){var r=[];return oo(n,function(n,e,u){
+t(n,e,u)&&r.push(n)}),r}function kt(n,t,r,e,u){var i=-1,o=n.length;for(r||(r=Ie),u||(u=[]);++i<o;){var f=n[i];0<t&&r(f)?1<t?kt(f,t-1,r,e,u):s(u,f):e||(u[u.length]=f)}return u}function Et(n,t){return n&&co(n,t,Lu)}function Ot(n,t){return n&&ao(n,t,Lu)}function St(n,t){return f(t,function(t){return gu(n[t])})}function It(n,t){t=Rr(t,n);for(var r=0,e=t.length;null!=n&&r<e;)n=n[$e(t[r++])];return r&&r==e?n:F}function Rt(n,t,r){return t=t(n),af(n)?t:s(t,r(n))}function zt(n){if(null==n)n=n===F?"[object Undefined]":"[object Null]";else if(ki&&ki in ni(n)){
+var t=ci.call(n,ki),r=n[ki];try{n[ki]=F;var e=true}catch(n){}var u=si.call(n);e&&(t?n[ki]=r:delete n[ki]),n=u}else n=si.call(n);return n}function Wt(n,t){return n>t}function Bt(n,t){return null!=n&&ci.call(n,t)}function Lt(n,t){return null!=n&&t in ni(n)}function Ut(n,t,r){for(var e=r?a:c,u=n[0].length,i=n.length,o=i,f=Hu(i),s=1/0,h=[];o--;){var p=n[o];o&&t&&(p=l(p,S(t))),s=Mi(p.length,s),f[o]=!r&&(t||120<=u&&120<=p.length)?new qn(o&&p):F}var p=n[0],_=-1,v=f[0];n:for(;++_<u&&h.length<s;){var g=p[_],d=t?t(g):g,g=r||0!==g?g:0;
+if(v?!R(v,d):!e(h,d,r)){for(o=i;--o;){var y=f[o];if(y?!R(y,d):!e(n[o],d,r))continue n}v&&v.push(d),h.push(g)}}return h}function Ct(n,t,r){var e={};return Et(n,function(n,u,i){t(e,r(n),u,i)}),e}function Dt(n,t,e){return t=Rr(t,n),n=2>t.length?n:It(n,vr(t,0,-1)),t=null==n?n:n[$e(Ge(t))],null==t?F:r(t,n,e)}function Mt(n){return xu(n)&&"[object Arguments]"==zt(n)}function Tt(n){return xu(n)&&"[object ArrayBuffer]"==zt(n)}function $t(n){return xu(n)&&"[object Date]"==zt(n)}function Ft(n,t,r,e,u){if(n===t)t=true;else if(null==n||null==t||!xu(n)&&!xu(t))t=n!==n&&t!==t;else n:{
+var i=af(n),o=af(t),f=i?"[object Array]":yo(n),c=o?"[object Array]":yo(t),f="[object Arguments]"==f?"[object Object]":f,c="[object Arguments]"==c?"[object Object]":c,a="[object Object]"==f,o="[object Object]"==c;if((c=f==c)&&sf(n)){if(!sf(t)){t=false;break n}i=true,a=false}if(c&&!a)u||(u=new Vn),t=i||gf(n)?_e(n,t,r,e,Ft,u):ve(n,t,f,r,e,Ft,u);else{if(!(1&r)&&(i=a&&ci.call(n,"__wrapped__"),f=o&&ci.call(t,"__wrapped__"),i||f)){n=i?n.value():n,t=f?t.value():t,u||(u=new Vn),t=Ft(n,t,r,e,u);break n}if(c)t:if(u||(u=new Vn),
+i=1&r,f=de(n),o=f.length,c=de(t).length,o==c||i){for(a=o;a--;){var l=f[a];if(!(i?l in t:ci.call(t,l))){t=false;break t}}if((c=u.get(n))&&u.get(t))t=c==t;else{c=true,u.set(n,t),u.set(t,n);for(var s=i;++a<o;){var l=f[a],h=n[l],p=t[l];if(e)var _=i?e(p,h,l,t,n,u):e(h,p,l,n,t,u);if(_===F?h!==p&&!Ft(h,p,r,e,u):!_){c=false;break}s||(s="constructor"==l)}c&&!s&&(r=n.constructor,e=t.constructor,r!=e&&"constructor"in n&&"constructor"in t&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(c=false)),
+u.delete(n),u.delete(t),t=c}}else t=false;else t=false}}return t}function Nt(n){return xu(n)&&"[object Map]"==yo(n)}function Pt(n,t,r,e){var u=r.length,i=u,o=!e;if(null==n)return!i;for(n=ni(n);u--;){var f=r[u];if(o&&f[2]?f[1]!==n[f[0]]:!(f[0]in n))return false}for(;++u<i;){var f=r[u],c=f[0],a=n[c],l=f[1];if(o&&f[2]){if(a===F&&!(c in n))return false}else{if(f=new Vn,e)var s=e(a,l,c,n,t,f);if(s===F?!Ft(l,a,3,e,f):!s)return false}}return true}function Zt(n){return!(!bu(n)||li&&li in n)&&(gu(n)?_i:xn).test(Fe(n))}function qt(n){
+return xu(n)&&"[object RegExp]"==zt(n)}function Vt(n){return xu(n)&&"[object Set]"==yo(n)}function Kt(n){return xu(n)&&yu(n.length)&&!!Cn[zt(n)]}function Gt(n){return typeof n=="function"?n:null==n?Nu:typeof n=="object"?af(n)?Xt(n[0],n[1]):Qt(n):Vu(n)}function Ht(n){if(!Le(n))return Ci(n);var t,r=[];for(t in ni(n))ci.call(n,t)&&"constructor"!=t&&r.push(t);return r}function Jt(n,t){return n<t}function Yt(n,t){var r=-1,e=pu(n)?Hu(n.length):[];return oo(n,function(n,u,i){e[++r]=t(n,u,i)}),e}function Qt(n){
+var t=me(n);return 1==t.length&&t[0][2]?Ue(t[0][0],t[0][1]):function(r){return r===n||Pt(r,n,t)}}function Xt(n,t){return We(n)&&t===t&&!bu(t)?Ue($e(n),t):function(r){var e=Wu(r,n);return e===F&&e===t?Bu(r,n):Ft(t,e,3)}}function nr(n,t,r,e,u){n!==t&&co(t,function(i,o){if(bu(i)){u||(u=new Vn);var f=u,c=n[o],a=t[o],l=f.get(a);if(l)ct(n,o,l);else{var l=e?e(c,a,o+"",n,t,f):F,s=l===F;if(s){var h=af(a),p=!h&&sf(a),_=!h&&!p&&gf(a),l=a;h||p||_?af(c)?l=c:_u(c)?l=Mr(c):p?(s=false,l=Wr(a,true)):_?(s=false,l=Lr(a,true)):l=[]:wu(a)||cf(a)?(l=c,
+cf(c)?l=Ru(c):(!bu(c)||r&&gu(c))&&(l=Oe(a))):s=false}s&&(f.set(a,l),nr(l,a,r,e,f),f.delete(a)),ct(n,o,l)}}else f=e?e(n[o],i,o+"",n,t,u):F,f===F&&(f=i),ct(n,o,f)},Uu)}function tr(n,t){var r=n.length;if(r)return t+=0>t?r:0,Re(t,r)?n[t]:F}function rr(n,t,r){var e=-1;return t=l(t.length?t:[Nu],S(je())),n=Yt(n,function(n){return{a:l(t,function(t){return t(n)}),b:++e,c:n}}),A(n,function(n,t){var e;n:{e=-1;for(var u=n.a,i=t.a,o=u.length,f=r.length;++e<o;){var c=Ur(u[e],i[e]);if(c){e=e>=f?c:c*("desc"==r[e]?-1:1);
+break n}}e=n.b-t.b}return e})}function er(n,t){return ur(n,t,function(t,r){return Bu(n,r)})}function ur(n,t,r){for(var e=-1,u=t.length,i={};++e<u;){var o=t[e],f=It(n,o);r(f,o)&&pr(i,Rr(o,n),f)}return i}function ir(n){return function(t){return It(t,n)}}function or(n,t,r,e){var u=e?y:d,i=-1,o=t.length,f=n;for(n===t&&(t=Mr(t)),r&&(f=l(n,S(r)));++i<o;)for(var c=0,a=t[i],a=r?r(a):a;-1<(c=u(f,a,c,e));)f!==n&&wi.call(f,c,1),wi.call(n,c,1);return n}function fr(n,t){for(var r=n?t.length:0,e=r-1;r--;){var u=t[r];
+if(r==e||u!==i){var i=u;Re(u)?wi.call(n,u,1):mr(n,u)}}}function cr(n,t){return n+zi(Fi()*(t-n+1))}function ar(n,t){var r="";if(!n||1>t||9007199254740991<t)return r;do t%2&&(r+=n),(t=zi(t/2))&&(n+=n);while(t);return r}function lr(n,t){return wo(Ce(n,t,Nu),n+"")}function sr(n){return tt(Du(n))}function hr(n,t){var r=Du(n);return Te(r,gt(t,0,r.length))}function pr(n,t,r,e){if(!bu(n))return n;t=Rr(t,n);for(var u=-1,i=t.length,o=i-1,f=n;null!=f&&++u<i;){var c=$e(t[u]),a=r;if(u!=o){var l=f[c],a=e?e(l,c,f):F;
+a===F&&(a=bu(l)?l:Re(t[u+1])?[]:{})}at(f,c,a),f=f[c]}return n}function _r(n){return Te(Du(n))}function vr(n,t,r){var e=-1,u=n.length;for(0>t&&(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=Hu(u);++e<u;)r[e]=n[e+t];return r}function gr(n,t){var r;return oo(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function dr(n,t,r){var e=0,u=null==n?e:n.length;if(typeof t=="number"&&t===t&&2147483647>=u){for(;e<u;){var i=e+u>>>1,o=n[i];null!==o&&!Au(o)&&(r?o<=t:o<t)?e=i+1:u=i}return u}return yr(n,t,Nu,r);
+}function yr(n,t,r,e){t=r(t);for(var u=0,i=null==n?0:n.length,o=t!==t,f=null===t,c=Au(t),a=t===F;u<i;){var l=zi((u+i)/2),s=r(n[l]),h=s!==F,p=null===s,_=s===s,v=Au(s);(o?e||_:a?_&&(e||h):f?_&&h&&(e||!p):c?_&&h&&!p&&(e||!v):p||v?0:e?s<=t:s<t)?u=l+1:i=l}return Mi(i,4294967294)}function br(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){var o=n[r],f=t?t(o):o;if(!r||!hu(f,c)){var c=f;i[u++]=0===o?0:o}}return i}function xr(n){return typeof n=="number"?n:Au(n)?P:+n}function jr(n){if(typeof n=="string")return n;
+if(af(n))return l(n,jr)+"";if(Au(n))return uo?uo.call(n):"";var t=n+"";return"0"==t&&1/n==-N?"-0":t}function wr(n,t,r){var e=-1,u=c,i=n.length,o=true,f=[],l=f;if(r)o=false,u=a;else if(200<=i){if(u=t?null:po(n))return D(u);o=false,u=R,l=new qn}else l=t?[]:f;n:for(;++e<i;){var s=n[e],h=t?t(s):s,s=r||0!==s?s:0;if(o&&h===h){for(var p=l.length;p--;)if(l[p]===h)continue n;t&&l.push(h),f.push(s)}else u(l,h,r)||(l!==f&&l.push(h),f.push(s))}return f}function mr(n,t){return t=Rr(t,n),n=2>t.length?n:It(n,vr(t,0,-1)),
+null==n||delete n[$e(Ge(t))]}function Ar(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++i<u)&&t(n[i],i,n););return r?vr(n,e?0:i,e?i+1:u):vr(n,e?i+1:0,e?u:i)}function kr(n,t){var r=n;return r instanceof Mn&&(r=r.value()),h(t,function(n,t){return t.func.apply(t.thisArg,s([n],t.args))},r)}function Er(n,t,r){var e=n.length;if(2>e)return e?wr(n[0]):[];for(var u=-1,i=Hu(e);++u<e;)for(var o=n[u],f=-1;++f<e;)f!=u&&(i[u]=jt(i[u]||o,n[f],t,r));return wr(kt(i,1),t,r)}function Or(n,t,r){for(var e=-1,u=n.length,i=t.length,o={};++e<u;)r(o,n[e],e<i?t[e]:F);
+return o}function Sr(n){return _u(n)?n:[]}function Ir(n){return typeof n=="function"?n:Nu}function Rr(n,t){return af(n)?n:We(n,t)?[n]:mo(zu(n))}function zr(n,t,r){var e=n.length;return r=r===F?e:r,!t&&r>=e?n:vr(n,t,r)}function Wr(n,t){if(t)return n.slice();var r=n.length,r=yi?yi(r):new n.constructor(r);return n.copy(r),r}function Br(n){var t=new n.constructor(n.byteLength);return new di(t).set(new di(n)),t}function Lr(n,t){return new n.constructor(t?Br(n.buffer):n.buffer,n.byteOffset,n.length)}function Ur(n,t){
+if(n!==t){var r=n!==F,e=null===n,u=n===n,i=Au(n),o=t!==F,f=null===t,c=t===t,a=Au(t);if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&n<t||a&&r&&u&&!e&&!i||f&&r&&u||!o&&u||!c)return-1}return 0}function Cr(n,t,r,e){var u=-1,i=n.length,o=r.length,f=-1,c=t.length,a=Di(i-o,0),l=Hu(c+a);for(e=!e;++f<c;)l[f]=t[f];for(;++u<o;)(e||u<i)&&(l[r[u]]=n[u]);for(;a--;)l[f++]=n[u++];return l}function Dr(n,t,r,e){var u=-1,i=n.length,o=-1,f=r.length,c=-1,a=t.length,l=Di(i-f,0),s=Hu(l+a);
+for(e=!e;++u<l;)s[u]=n[u];for(l=u;++c<a;)s[l+c]=t[c];for(;++o<f;)(e||u<i)&&(s[l+r[o]]=n[u++]);return s}function Mr(n,t){var r=-1,e=n.length;for(t||(t=Hu(e));++r<e;)t[r]=n[r];return t}function Tr(n,t,r,e){var u=!r;r||(r={});for(var i=-1,o=t.length;++i<o;){var f=t[i],c=e?e(r[f],n[f],f,r,n):F;c===F&&(c=n[f]),u?_t(r,f,c):at(r,f,c)}return r}function $r(n,t){return Tr(n,vo(n),t)}function Fr(n,t){return Tr(n,go(n),t)}function Nr(n,t){return function(r,u){var i=af(r)?e:st,o=t?t():{};return i(r,n,je(u,2),o);
+}}function Pr(n){return lr(function(t,r){var e=-1,u=r.length,i=1<u?r[u-1]:F,o=2<u?r[2]:F,i=3<n.length&&typeof i=="function"?(u--,i):F;for(o&&ze(r[0],r[1],o)&&(i=3>u?F:i,u=1),t=ni(t);++e<u;)(o=r[e])&&n(t,o,e,i);return t})}function Zr(n,t){return function(r,e){if(null==r)return r;if(!pu(r))return n(r,e);for(var u=r.length,i=t?u:-1,o=ni(r);(t?i--:++i<u)&&false!==e(o[i],i,o););return r}}function qr(n){return function(t,r,e){var u=-1,i=ni(t);e=e(t);for(var o=e.length;o--;){var f=e[n?o:++u];if(false===r(i[f],f,i))break;
+}return t}}function Vr(n,t,r){function e(){return(this&&this!==Zn&&this instanceof e?i:n).apply(u?r:this,arguments)}var u=1&t,i=Hr(n);return e}function Kr(n){return function(t){t=zu(t);var r=Bn.test(t)?$(t):F,e=r?r[0]:t.charAt(0);return t=r?zr(r,1).join(""):t.slice(1),e[n]()+t}}function Gr(n){return function(t){return h($u(Tu(t).replace(In,"")),n,"")}}function Hr(n){return function(){var t=arguments;switch(t.length){case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:
+return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=io(n.prototype),t=n.apply(r,t);return bu(t)?t:r}}function Jr(n,t,e){function u(){for(var o=arguments.length,f=Hu(o),c=o,a=xe(u);c--;)f[c]=arguments[c];return c=3>o&&f[0]!==a&&f[o-1]!==a?[]:C(f,a),o-=c.length,o<e?fe(n,t,Xr,u.placeholder,F,f,c,F,F,e-o):r(this&&this!==Zn&&this instanceof u?i:n,this,f);
+}var i=Hr(n);return u}function Yr(n){return function(t,r,e){var u=ni(t);if(!pu(t)){var i=je(r,3);t=Lu(t),r=function(n){return i(u[n],n,u)}}return r=n(t,r,e),-1<r?u[i?t[r]:r]:F}}function Qr(n){return ge(function(t){var r=t.length,e=r,u=zn.prototype.thru;for(n&&t.reverse();e--;){var i=t[e];if(typeof i!="function")throw new ei("Expected a function");if(u&&!o&&"wrapper"==be(i))var o=new zn([],true)}for(e=o?e:r;++e<r;)var i=t[e],u=be(i),f="wrapper"==u?_o(i):F,o=f&&Be(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?o[be(f[0])].apply(o,f[3]):1==i.length&&Be(i)?o[u]():o.thru(i);
+return function(){var n=arguments,e=n[0];if(o&&1==n.length&&af(e))return o.plant(e).value();for(var u=0,n=r?t[u].apply(this,n):e;++u<r;)n=t[u].call(this,n);return n}})}function Xr(n,t,r,e,u,i,o,f,c,a){function l(){for(var d=arguments.length,y=Hu(d),b=d;b--;)y[b]=arguments[b];if(_){var x,j=xe(l),b=y.length;for(x=0;b--;)y[b]===j&&++x}if(e&&(y=Cr(y,e,u,_)),i&&(y=Dr(y,i,o,_)),d-=x,_&&d<a)return j=C(y,j),fe(n,t,Xr,l.placeholder,r,y,j,f,c,a-d);if(j=h?r:this,b=p?j[n]:n,d=y.length,f){x=y.length;for(var w=Mi(f.length,x),m=Mr(y);w--;){
+var A=f[w];y[w]=Re(A,x)?m[A]:F}}else v&&1<d&&y.reverse();return s&&c<d&&(y.length=c),this&&this!==Zn&&this instanceof l&&(b=g||Hr(b)),b.apply(j,y)}var s=128&t,h=1&t,p=2&t,_=24&t,v=512&t,g=p?F:Hr(n);return l}function ne(n,t){return function(r,e){return Ct(r,n,t(e))}}function te(n,t){return function(r,e){var u;if(r===F&&e===F)return t;if(r!==F&&(u=r),e!==F){if(u===F)return e;typeof r=="string"||typeof e=="string"?(r=jr(r),e=jr(e)):(r=xr(r),e=xr(e)),u=n(r,e)}return u}}function re(n){return ge(function(t){
+return t=l(t,S(je())),lr(function(e){var u=this;return n(t,function(n){return r(n,u,e)})})})}function ee(n,t){t=t===F?" ":jr(t);var r=t.length;return 2>r?r?ar(t,n):t:(r=ar(t,Ri(n/T(t))),Bn.test(t)?zr($(r),0,n).join(""):r.slice(0,n))}function ue(n,t,e,u){function i(){for(var t=-1,c=arguments.length,a=-1,l=u.length,s=Hu(l+c),h=this&&this!==Zn&&this instanceof i?f:n;++a<l;)s[a]=u[a];for(;c--;)s[a++]=arguments[++t];return r(h,o?e:this,s)}var o=1&t,f=Hr(n);return i}function ie(n){return function(t,r,e){
+e&&typeof e!="number"&&ze(t,r,e)&&(r=e=F),t=Eu(t),r===F?(r=t,t=0):r=Eu(r),e=e===F?t<r?1:-1:Eu(e);var u=-1;r=Di(Ri((r-t)/(e||1)),0);for(var i=Hu(r);r--;)i[n?r:++u]=t,t+=e;return i}}function oe(n){return function(t,r){return typeof t=="string"&&typeof r=="string"||(t=Iu(t),r=Iu(r)),n(t,r)}}function fe(n,t,r,e,u,i,o,f,c,a){var l=8&t,s=l?o:F;o=l?F:o;var h=l?i:F;return i=l?F:i,t=(t|(l?32:64))&~(l?64:32),4&t||(t&=-4),u=[n,t,u,h,s,i,o,f,c,a],r=r.apply(F,u),Be(n)&&xo(r,u),r.placeholder=e,De(r,n,t)}function ce(n){
+var t=Xu[n];return function(n,r){if(n=Iu(n),r=null==r?0:Mi(Ou(r),292)){var e=(zu(n)+"e").split("e"),e=t(e[0]+"e"+(+e[1]+r)),e=(zu(e)+"e").split("e");return+(e[0]+"e"+(+e[1]-r))}return t(n)}}function ae(n){return function(t){var r=yo(t);return"[object Map]"==r?L(t):"[object Set]"==r?M(t):O(t,n(t))}}function le(n,t,r,e,u,i,o,f){var c=2&t;if(!c&&typeof n!="function")throw new ei("Expected a function");var a=e?e.length:0;if(a||(t&=-97,e=u=F),o=o===F?o:Di(Ou(o),0),f=f===F?f:Ou(f),a-=u?u.length:0,64&t){
+var l=e,s=u;e=u=F}var h=c?F:_o(n);return i=[n,t,r,e,u,l,s,i,o,f],h&&(r=i[1],n=h[1],t=r|n,e=128==n&&8==r||128==n&&256==r&&i[7].length<=h[8]||384==n&&h[7].length<=h[8]&&8==r,131>t||e)&&(1&n&&(i[2]=h[2],t|=1&r?0:4),(r=h[3])&&(e=i[3],i[3]=e?Cr(e,r,h[4]):r,i[4]=e?C(i[3],"__lodash_placeholder__"):h[4]),(r=h[5])&&(e=i[5],i[5]=e?Dr(e,r,h[6]):r,i[6]=e?C(i[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(i[7]=r),128&n&&(i[8]=null==i[8]?h[8]:Mi(i[8],h[8])),null==i[9]&&(i[9]=h[9]),i[0]=h[0],i[1]=t),n=i[0],t=i[1],
+r=i[2],e=i[3],u=i[4],f=i[9]=i[9]===F?c?0:n.length:Di(i[9]-a,0),!f&&24&t&&(t&=-25),De((h?lo:xo)(t&&1!=t?8==t||16==t?Jr(n,t,f):32!=t&&33!=t||u.length?Xr.apply(F,i):ue(n,t,r,e):Vr(n,t,r),i),n,t)}function se(n,t,r,e){return n===F||hu(n,ii[r])&&!ci.call(e,r)?t:n}function he(n,t,r,e,u,i){return bu(n)&&bu(t)&&(i.set(t,n),nr(n,t,F,he,i),i.delete(t)),n}function pe(n){return wu(n)?F:n}function _e(n,t,r,e,u,i){var o=1&r,f=n.length,c=t.length;if(f!=c&&!(o&&c>f))return false;if((c=i.get(n))&&i.get(t))return c==t;var c=-1,a=true,l=2&r?new qn:F;
+for(i.set(n,t),i.set(t,n);++c<f;){var s=n[c],h=t[c];if(e)var p=o?e(h,s,c,t,n,i):e(s,h,c,n,t,i);if(p!==F){if(p)continue;a=false;break}if(l){if(!_(t,function(n,t){if(!R(l,t)&&(s===n||u(s,n,r,e,i)))return l.push(t)})){a=false;break}}else if(s!==h&&!u(s,h,r,e,i)){a=false;break}}return i.delete(n),i.delete(t),a}function ve(n,t,r,e,u,i,o){switch(r){case"[object DataView]":if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset)break;n=n.buffer,t=t.buffer;case"[object ArrayBuffer]":if(n.byteLength!=t.byteLength||!i(new di(n),new di(t)))break;
+return true;case"[object Boolean]":case"[object Date]":case"[object Number]":return hu(+n,+t);case"[object Error]":return n.name==t.name&&n.message==t.message;case"[object RegExp]":case"[object String]":return n==t+"";case"[object Map]":var f=L;case"[object Set]":if(f||(f=D),n.size!=t.size&&!(1&e))break;return(r=o.get(n))?r==t:(e|=2,o.set(n,t),t=_e(f(n),f(t),e,u,i,o),o.delete(n),t);case"[object Symbol]":if(eo)return eo.call(n)==eo.call(t)}return false}function ge(n){return wo(Ce(n,F,Ve),n+"")}function de(n){
+return Rt(n,Lu,vo)}function ye(n){return Rt(n,Uu,go)}function be(n){for(var t=n.name+"",r=Ji[t],e=ci.call(Ji,t)?r.length:0;e--;){var u=r[e],i=u.func;if(null==i||i==n)return u.name}return t}function xe(n){return(ci.call(On,"placeholder")?On:n).placeholder}function je(){var n=On.iteratee||Pu,n=n===Pu?Gt:n;return arguments.length?n(arguments[0],arguments[1]):n}function we(n,t){var r=n.__data__,e=typeof t;return("string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t)?r[typeof t=="string"?"string":"hash"]:r.map;
+}function me(n){for(var t=Lu(n),r=t.length;r--;){var e=t[r],u=n[e];t[r]=[e,u,u===u&&!bu(u)]}return t}function Ae(n,t){var r=null==n?F:n[t];return Zt(r)?r:F}function ke(n,t,r){t=Rr(t,n);for(var e=-1,u=t.length,i=false;++e<u;){var o=$e(t[e]);if(!(i=null!=n&&r(n,o)))break;n=n[o]}return i||++e!=u?i:(u=null==n?0:n.length,!!u&&yu(u)&&Re(o,u)&&(af(n)||cf(n)))}function Ee(n){var t=n.length,r=n.constructor(t);return t&&"string"==typeof n[0]&&ci.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function Oe(n){
+return typeof n.constructor!="function"||Le(n)?{}:io(bi(n))}function Se(r,e,u,i){var o=r.constructor;switch(e){case"[object ArrayBuffer]":return Br(r);case"[object Boolean]":case"[object Date]":return new o(+r);case"[object DataView]":return e=i?Br(r.buffer):r.buffer,new r.constructor(e,r.byteOffset,r.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":
+case"[object Uint16Array]":case"[object Uint32Array]":return Lr(r,i);case"[object Map]":return e=i?u(L(r),1):L(r),h(e,n,new r.constructor);case"[object Number]":case"[object String]":return new o(r);case"[object RegExp]":return e=new r.constructor(r.source,dn.exec(r)),e.lastIndex=r.lastIndex,e;case"[object Set]":return e=i?u(D(r),1):D(r),h(e,t,new r.constructor);case"[object Symbol]":return eo?ni(eo.call(r)):{}}}function Ie(n){return af(n)||cf(n)||!!(mi&&n&&n[mi])}function Re(n,t){return t=null==t?9007199254740991:t,
+!!t&&(typeof n=="number"||wn.test(n))&&-1<n&&0==n%1&&n<t}function ze(n,t,r){if(!bu(r))return false;var e=typeof t;return!!("number"==e?pu(r)&&Re(t,r.length):"string"==e&&t in r)&&hu(r[t],n)}function We(n,t){if(af(n))return false;var r=typeof n;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=n&&!Au(n))||(rn.test(n)||!tn.test(n)||null!=t&&n in ni(t))}function Be(n){var t=be(n),r=On[t];return typeof r=="function"&&t in Mn.prototype&&(n===r||(t=_o(r),!!t&&n===t[0]))}function Le(n){var t=n&&n.constructor;
+return n===(typeof t=="function"&&t.prototype||ii)}function Ue(n,t){return function(r){return null!=r&&(r[n]===t&&(t!==F||n in ni(r)))}}function Ce(n,t,e){return t=Di(t===F?n.length-1:t,0),function(){for(var u=arguments,i=-1,o=Di(u.length-t,0),f=Hu(o);++i<o;)f[i]=u[t+i];for(i=-1,o=Hu(t+1);++i<t;)o[i]=u[i];return o[t]=e(f),r(n,this,o)}}function De(n,t,r){var e=t+"";t=wo;var u,i=Ne;return u=(u=e.match(hn))?u[1].split(pn):[],r=i(u,r),(i=r.length)&&(u=i-1,r[u]=(1<i?"& ":"")+r[u],r=r.join(2<i?", ":" "),
+e=e.replace(sn,"{\n/* [wrapped with "+r+"] */\n")),t(n,e)}function Me(n){var t=0,r=0;return function(){var e=Ti(),u=16-(e-r);if(r=e,0<u){if(800<=++t)return arguments[0]}else t=0;return n.apply(F,arguments)}}function Te(n,t){var r=-1,e=n.length,u=e-1;for(t=t===F?e:t;++r<t;){var e=cr(r,u),i=n[e];n[e]=n[r],n[r]=i}return n.length=t,n}function $e(n){if(typeof n=="string"||Au(n))return n;var t=n+"";return"0"==t&&1/n==-N?"-0":t}function Fe(n){if(null!=n){try{return fi.call(n)}catch(n){}return n+""}return"";
+}function Ne(n,t){return u(Z,function(r){var e="_."+r[0];t&r[1]&&!c(n,e)&&n.push(e)}),n.sort()}function Pe(n){if(n instanceof Mn)return n.clone();var t=new zn(n.__wrapped__,n.__chain__);return t.__actions__=Mr(n.__actions__),t.__index__=n.__index__,t.__values__=n.__values__,t}function Ze(n,t,r){var e=null==n?0:n.length;return e?(r=null==r?0:Ou(r),0>r&&(r=Di(e+r,0)),g(n,je(t,3),r)):-1}function qe(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e-1;return r!==F&&(u=Ou(r),u=0>r?Di(e+u,0):Mi(u,e-1)),
+g(n,je(t,3),u,true)}function Ve(n){return(null==n?0:n.length)?kt(n,1):[]}function Ke(n){return n&&n.length?n[0]:F}function Ge(n){var t=null==n?0:n.length;return t?n[t-1]:F}function He(n,t){return n&&n.length&&t&&t.length?or(n,t):n}function Je(n){return null==n?n:Ni.call(n)}function Ye(n){if(!n||!n.length)return[];var t=0;return n=f(n,function(n){if(_u(n))return t=Di(n.length,t),true}),E(t,function(t){return l(n,j(t))})}function Qe(n,t){if(!n||!n.length)return[];var e=Ye(n);return null==t?e:l(e,function(n){
+return r(t,F,n)})}function Xe(n){return n=On(n),n.__chain__=true,n}function nu(n,t){return t(n)}function tu(){return this}function ru(n,t){return(af(n)?u:oo)(n,je(t,3))}function eu(n,t){return(af(n)?i:fo)(n,je(t,3))}function uu(n,t){return(af(n)?l:Yt)(n,je(t,3))}function iu(n,t,r){return t=r?F:t,t=n&&null==t?n.length:t,le(n,128,F,F,F,F,t)}function ou(n,t){var r;if(typeof t!="function")throw new ei("Expected a function");return n=Ou(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=F),
+r}}function fu(n,t,r){return t=r?F:t,n=le(n,8,F,F,F,F,F,t),n.placeholder=fu.placeholder,n}function cu(n,t,r){return t=r?F:t,n=le(n,16,F,F,F,F,F,t),n.placeholder=cu.placeholder,n}function au(n,t,r){function e(t){var r=c,e=a;return c=a=F,_=t,s=n.apply(e,r)}function u(n){var r=n-p;return n-=_,p===F||r>=t||0>r||g&&n>=l}function i(){var n=Jo();if(u(n))return o(n);var r,e=jo;r=n-_,n=t-(n-p),r=g?Mi(n,l-r):n,h=e(i,r)}function o(n){return h=F,d&&c?e(n):(c=a=F,s)}function f(){var n=Jo(),r=u(n);if(c=arguments,
+a=this,p=n,r){if(h===F)return _=n=p,h=jo(i,t),v?e(n):s;if(g)return h=jo(i,t),e(p)}return h===F&&(h=jo(i,t)),s}var c,a,l,s,h,p,_=0,v=false,g=false,d=true;if(typeof n!="function")throw new ei("Expected a function");return t=Iu(t)||0,bu(r)&&(v=!!r.leading,l=(g="maxWait"in r)?Di(Iu(r.maxWait)||0,t):l,d="trailing"in r?!!r.trailing:d),f.cancel=function(){h!==F&&ho(h),_=0,c=p=a=h=F},f.flush=function(){return h===F?s:o(Jo())},f}function lu(n,t){function r(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;return i.has(u)?i.get(u):(e=n.apply(this,e),
+r.cache=i.set(u,e)||i,e)}if(typeof n!="function"||null!=t&&typeof t!="function")throw new ei("Expected a function");return r.cache=new(lu.Cache||Pn),r}function su(n){if(typeof n!="function")throw new ei("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function hu(n,t){return n===t||n!==n&&t!==t}function pu(n){return null!=n&&yu(n.length)&&!gu(n);
+}function _u(n){return xu(n)&&pu(n)}function vu(n){if(!xu(n))return false;var t=zt(n);return"[object Error]"==t||"[object DOMException]"==t||typeof n.message=="string"&&typeof n.name=="string"&&!wu(n)}function gu(n){return!!bu(n)&&(n=zt(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function du(n){return typeof n=="number"&&n==Ou(n)}function yu(n){return typeof n=="number"&&-1<n&&0==n%1&&9007199254740991>=n}function bu(n){var t=typeof n;return null!=n&&("object"==t||"function"==t);
+}function xu(n){return null!=n&&typeof n=="object"}function ju(n){return typeof n=="number"||xu(n)&&"[object Number]"==zt(n)}function wu(n){return!(!xu(n)||"[object Object]"!=zt(n))&&(n=bi(n),null===n||(n=ci.call(n,"constructor")&&n.constructor,typeof n=="function"&&n instanceof n&&fi.call(n)==hi))}function mu(n){return typeof n=="string"||!af(n)&&xu(n)&&"[object String]"==zt(n)}function Au(n){return typeof n=="symbol"||xu(n)&&"[object Symbol]"==zt(n)}function ku(n){if(!n)return[];if(pu(n))return mu(n)?$(n):Mr(n);
+if(Ai&&n[Ai]){n=n[Ai]();for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}return t=yo(n),("[object Map]"==t?L:"[object Set]"==t?D:Du)(n)}function Eu(n){return n?(n=Iu(n),n===N||n===-N?1.7976931348623157e308*(0>n?-1:1):n===n?n:0):0===n?n:0}function Ou(n){n=Eu(n);var t=n%1;return n===n?t?n-t:n:0}function Su(n){return n?gt(Ou(n),0,4294967295):0}function Iu(n){if(typeof n=="number")return n;if(Au(n))return P;if(bu(n)&&(n=typeof n.valueOf=="function"?n.valueOf():n,n=bu(n)?n+"":n),typeof n!="string")return 0===n?n:+n;
+n=n.replace(cn,"");var t=bn.test(n);return t||jn.test(n)?Fn(n.slice(2),t?2:8):yn.test(n)?P:+n}function Ru(n){return Tr(n,Uu(n))}function zu(n){return null==n?"":jr(n)}function Wu(n,t,r){return n=null==n?F:It(n,t),n===F?r:n}function Bu(n,t){return null!=n&&ke(n,t,Lt)}function Lu(n){return pu(n)?Gn(n):Ht(n)}function Uu(n){if(pu(n))n=Gn(n,true);else if(bu(n)){var t,r=Le(n),e=[];for(t in n)("constructor"!=t||!r&&ci.call(n,t))&&e.push(t);n=e}else{if(t=[],null!=n)for(r in ni(n))t.push(r);n=t}return n}function Cu(n,t){
+if(null==n)return{};var r=l(ye(n),function(n){return[n]});return t=je(t),ur(n,r,function(n,r){return t(n,r[0])})}function Du(n){return null==n?[]:I(n,Lu(n))}function Mu(n){return Nf(zu(n).toLowerCase())}function Tu(n){return(n=zu(n))&&n.replace(mn,rt).replace(Rn,"")}function $u(n,t,r){return n=zu(n),t=r?F:t,t===F?Ln.test(n)?n.match(Wn)||[]:n.match(_n)||[]:n.match(t)||[]}function Fu(n){return function(){return n}}function Nu(n){return n}function Pu(n){return Gt(typeof n=="function"?n:dt(n,1))}function Zu(n,t,r){
+var e=Lu(t),i=St(t,e);null!=r||bu(t)&&(i.length||!e.length)||(r=t,t=n,n=this,i=St(t,Lu(t)));var o=!(bu(r)&&"chain"in r&&!r.chain),f=gu(n);return u(i,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=n(this.__wrapped__);return(r.__actions__=Mr(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,s([this.value()],arguments))})}),n}function qu(){}function Vu(n){return We(n)?j($e(n)):ir(n)}function Ku(){return[]}function Gu(){
+return false}En=null==En?Zn:it.defaults(Zn.Object(),En,it.pick(Zn,Un));var Hu=En.Array,Ju=En.Date,Yu=En.Error,Qu=En.Function,Xu=En.Math,ni=En.Object,ti=En.RegExp,ri=En.String,ei=En.TypeError,ui=Hu.prototype,ii=ni.prototype,oi=En["__core-js_shared__"],fi=Qu.prototype.toString,ci=ii.hasOwnProperty,ai=0,li=function(){var n=/[^.]+$/.exec(oi&&oi.keys&&oi.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),si=ii.toString,hi=fi.call(ni),pi=Zn._,_i=ti("^"+fi.call(ci).replace(on,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vi=Kn?En.Buffer:F,gi=En.Symbol,di=En.Uint8Array,yi=vi?vi.f:F,bi=U(ni.getPrototypeOf,ni),xi=ni.create,ji=ii.propertyIsEnumerable,wi=ui.splice,mi=gi?gi.isConcatSpreadable:F,Ai=gi?gi.iterator:F,ki=gi?gi.toStringTag:F,Ei=function(){
+try{var n=Ae(ni,"defineProperty");return n({},"",{}),n}catch(n){}}(),Oi=En.clearTimeout!==Zn.clearTimeout&&En.clearTimeout,Si=Ju&&Ju.now!==Zn.Date.now&&Ju.now,Ii=En.setTimeout!==Zn.setTimeout&&En.setTimeout,Ri=Xu.ceil,zi=Xu.floor,Wi=ni.getOwnPropertySymbols,Bi=vi?vi.isBuffer:F,Li=En.isFinite,Ui=ui.join,Ci=U(ni.keys,ni),Di=Xu.max,Mi=Xu.min,Ti=Ju.now,$i=En.parseInt,Fi=Xu.random,Ni=ui.reverse,Pi=Ae(En,"DataView"),Zi=Ae(En,"Map"),qi=Ae(En,"Promise"),Vi=Ae(En,"Set"),Ki=Ae(En,"WeakMap"),Gi=Ae(ni,"create"),Hi=Ki&&new Ki,Ji={},Yi=Fe(Pi),Qi=Fe(Zi),Xi=Fe(qi),no=Fe(Vi),to=Fe(Ki),ro=gi?gi.prototype:F,eo=ro?ro.valueOf:F,uo=ro?ro.toString:F,io=function(){
+function n(){}return function(t){return bu(t)?xi?xi(t):(n.prototype=t,t=new n,n.prototype=F,t):{}}}();On.templateSettings={escape:Q,evaluate:X,interpolate:nn,variable:"",imports:{_:On}},On.prototype=Sn.prototype,On.prototype.constructor=On,zn.prototype=io(Sn.prototype),zn.prototype.constructor=zn,Mn.prototype=io(Sn.prototype),Mn.prototype.constructor=Mn,Tn.prototype.clear=function(){this.__data__=Gi?Gi(null):{},this.size=0},Tn.prototype.delete=function(n){return n=this.has(n)&&delete this.__data__[n],
+this.size-=n?1:0,n},Tn.prototype.get=function(n){var t=this.__data__;return Gi?(n=t[n],"__lodash_hash_undefined__"===n?F:n):ci.call(t,n)?t[n]:F},Tn.prototype.has=function(n){var t=this.__data__;return Gi?t[n]!==F:ci.call(t,n)},Tn.prototype.set=function(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=Gi&&t===F?"__lodash_hash_undefined__":t,this},Nn.prototype.clear=function(){this.__data__=[],this.size=0},Nn.prototype.delete=function(n){var t=this.__data__;return n=lt(t,n),!(0>n)&&(n==t.length-1?t.pop():wi.call(t,n,1),
+--this.size,true)},Nn.prototype.get=function(n){var t=this.__data__;return n=lt(t,n),0>n?F:t[n][1]},Nn.prototype.has=function(n){return-1<lt(this.__data__,n)},Nn.prototype.set=function(n,t){var r=this.__data__,e=lt(r,n);return 0>e?(++this.size,r.push([n,t])):r[e][1]=t,this},Pn.prototype.clear=function(){this.size=0,this.__data__={hash:new Tn,map:new(Zi||Nn),string:new Tn}},Pn.prototype.delete=function(n){return n=we(this,n).delete(n),this.size-=n?1:0,n},Pn.prototype.get=function(n){return we(this,n).get(n);
+},Pn.prototype.has=function(n){return we(this,n).has(n)},Pn.prototype.set=function(n,t){var r=we(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this},qn.prototype.add=qn.prototype.push=function(n){return this.__data__.set(n,"__lodash_hash_undefined__"),this},qn.prototype.has=function(n){return this.__data__.has(n)},Vn.prototype.clear=function(){this.__data__=new Nn,this.size=0},Vn.prototype.delete=function(n){var t=this.__data__;return n=t.delete(n),this.size=t.size,n},Vn.prototype.get=function(n){
+return this.__data__.get(n)},Vn.prototype.has=function(n){return this.__data__.has(n)},Vn.prototype.set=function(n,t){var r=this.__data__;if(r instanceof Nn){var e=r.__data__;if(!Zi||199>e.length)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new Pn(e)}return r.set(n,t),this.size=r.size,this};var oo=Zr(Et),fo=Zr(Ot,true),co=qr(),ao=qr(true),lo=Hi?function(n,t){return Hi.set(n,t),n}:Nu,so=Ei?function(n,t){return Ei(n,"toString",{configurable:true,enumerable:false,value:Fu(t),writable:true})}:Nu,ho=Oi||function(n){
+return Zn.clearTimeout(n)},po=Vi&&1/D(new Vi([,-0]))[1]==N?function(n){return new Vi(n)}:qu,_o=Hi?function(n){return Hi.get(n)}:qu,vo=Wi?function(n){return null==n?[]:(n=ni(n),f(Wi(n),function(t){return ji.call(n,t)}))}:Ku,go=Wi?function(n){for(var t=[];n;)s(t,vo(n)),n=bi(n);return t}:Ku,yo=zt;(Pi&&"[object DataView]"!=yo(new Pi(new ArrayBuffer(1)))||Zi&&"[object Map]"!=yo(new Zi)||qi&&"[object Promise]"!=yo(qi.resolve())||Vi&&"[object Set]"!=yo(new Vi)||Ki&&"[object WeakMap]"!=yo(new Ki))&&(yo=function(n){
+var t=zt(n);if(n=(n="[object Object]"==t?n.constructor:F)?Fe(n):"")switch(n){case Yi:return"[object DataView]";case Qi:return"[object Map]";case Xi:return"[object Promise]";case no:return"[object Set]";case to:return"[object WeakMap]"}return t});var bo=oi?gu:Gu,xo=Me(lo),jo=Ii||function(n,t){return Zn.setTimeout(n,t)},wo=Me(so),mo=function(n){n=lu(n,function(n){return 500===t.size&&t.clear(),n});var t=n.cache;return n}(function(n){var t=[];return en.test(n)&&t.push(""),n.replace(un,function(n,r,e,u){
+t.push(e?u.replace(vn,"$1"):r||n)}),t}),Ao=lr(function(n,t){return _u(n)?jt(n,kt(t,1,_u,true)):[]}),ko=lr(function(n,t){var r=Ge(t);return _u(r)&&(r=F),_u(n)?jt(n,kt(t,1,_u,true),je(r,2)):[]}),Eo=lr(function(n,t){var r=Ge(t);return _u(r)&&(r=F),_u(n)?jt(n,kt(t,1,_u,true),F,r):[]}),Oo=lr(function(n){var t=l(n,Sr);return t.length&&t[0]===n[0]?Ut(t):[]}),So=lr(function(n){var t=Ge(n),r=l(n,Sr);return t===Ge(r)?t=F:r.pop(),r.length&&r[0]===n[0]?Ut(r,je(t,2)):[]}),Io=lr(function(n){var t=Ge(n),r=l(n,Sr);return(t=typeof t=="function"?t:F)&&r.pop(),
+r.length&&r[0]===n[0]?Ut(r,F,t):[]}),Ro=lr(He),zo=ge(function(n,t){var r=null==n?0:n.length,e=vt(n,t);return fr(n,l(t,function(n){return Re(n,r)?+n:n}).sort(Ur)),e}),Wo=lr(function(n){return wr(kt(n,1,_u,true))}),Bo=lr(function(n){var t=Ge(n);return _u(t)&&(t=F),wr(kt(n,1,_u,true),je(t,2))}),Lo=lr(function(n){var t=Ge(n),t=typeof t=="function"?t:F;return wr(kt(n,1,_u,true),F,t)}),Uo=lr(function(n,t){return _u(n)?jt(n,t):[]}),Co=lr(function(n){return Er(f(n,_u))}),Do=lr(function(n){var t=Ge(n);return _u(t)&&(t=F),
+Er(f(n,_u),je(t,2))}),Mo=lr(function(n){var t=Ge(n),t=typeof t=="function"?t:F;return Er(f(n,_u),F,t)}),To=lr(Ye),$o=lr(function(n){var t=n.length,t=1<t?n[t-1]:F,t=typeof t=="function"?(n.pop(),t):F;return Qe(n,t)}),Fo=ge(function(n){function t(t){return vt(t,n)}var r=n.length,e=r?n[0]:0,u=this.__wrapped__;return!(1<r||this.__actions__.length)&&u instanceof Mn&&Re(e)?(u=u.slice(e,+e+(r?1:0)),u.__actions__.push({func:nu,args:[t],thisArg:F}),new zn(u,this.__chain__).thru(function(n){return r&&!n.length&&n.push(F),
+n})):this.thru(t)}),No=Nr(function(n,t,r){ci.call(n,r)?++n[r]:_t(n,r,1)}),Po=Yr(Ze),Zo=Yr(qe),qo=Nr(function(n,t,r){ci.call(n,r)?n[r].push(t):_t(n,r,[t])}),Vo=lr(function(n,t,e){var u=-1,i=typeof t=="function",o=pu(n)?Hu(n.length):[];return oo(n,function(n){o[++u]=i?r(t,n,e):Dt(n,t,e)}),o}),Ko=Nr(function(n,t,r){_t(n,r,t)}),Go=Nr(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),Ho=lr(function(n,t){if(null==n)return[];var r=t.length;return 1<r&&ze(n,t[0],t[1])?t=[]:2<r&&ze(t[0],t[1],t[2])&&(t=[t[0]]),
+rr(n,kt(t,1),[])}),Jo=Si||function(){return Zn.Date.now()},Yo=lr(function(n,t,r){var e=1;if(r.length)var u=C(r,xe(Yo)),e=32|e;return le(n,e,t,r,u)}),Qo=lr(function(n,t,r){var e=3;if(r.length)var u=C(r,xe(Qo)),e=32|e;return le(t,e,n,r,u)}),Xo=lr(function(n,t){return xt(n,1,t)}),nf=lr(function(n,t,r){return xt(n,Iu(t)||0,r)});lu.Cache=Pn;var tf=lr(function(n,t){t=1==t.length&&af(t[0])?l(t[0],S(je())):l(kt(t,1),S(je()));var e=t.length;return lr(function(u){for(var i=-1,o=Mi(u.length,e);++i<o;)u[i]=t[i].call(this,u[i]);
+return r(n,this,u)})}),rf=lr(function(n,t){return le(n,32,F,t,C(t,xe(rf)))}),ef=lr(function(n,t){return le(n,64,F,t,C(t,xe(ef)))}),uf=ge(function(n,t){return le(n,256,F,F,F,t)}),of=oe(Wt),ff=oe(function(n,t){return n>=t}),cf=Mt(function(){return arguments}())?Mt:function(n){return xu(n)&&ci.call(n,"callee")&&!ji.call(n,"callee")},af=Hu.isArray,lf=Hn?S(Hn):Tt,sf=Bi||Gu,hf=Jn?S(Jn):$t,pf=Yn?S(Yn):Nt,_f=Qn?S(Qn):qt,vf=Xn?S(Xn):Vt,gf=nt?S(nt):Kt,df=oe(Jt),yf=oe(function(n,t){return n<=t}),bf=Pr(function(n,t){
+if(Le(t)||pu(t))Tr(t,Lu(t),n);else for(var r in t)ci.call(t,r)&&at(n,r,t[r])}),xf=Pr(function(n,t){Tr(t,Uu(t),n)}),jf=Pr(function(n,t,r,e){Tr(t,Uu(t),n,e)}),wf=Pr(function(n,t,r,e){Tr(t,Lu(t),n,e)}),mf=ge(vt),Af=lr(function(n){return n.push(F,se),r(jf,F,n)}),kf=lr(function(n){return n.push(F,he),r(Rf,F,n)}),Ef=ne(function(n,t,r){n[t]=r},Fu(Nu)),Of=ne(function(n,t,r){ci.call(n,t)?n[t].push(r):n[t]=[r]},je),Sf=lr(Dt),If=Pr(function(n,t,r){nr(n,t,r)}),Rf=Pr(function(n,t,r,e){nr(n,t,r,e)}),zf=ge(function(n,t){
+var r={};if(null==n)return r;var e=false;t=l(t,function(t){return t=Rr(t,n),e||(e=1<t.length),t}),Tr(n,ye(n),r),e&&(r=dt(r,7,pe));for(var u=t.length;u--;)mr(r,t[u]);return r}),Wf=ge(function(n,t){return null==n?{}:er(n,t)}),Bf=ae(Lu),Lf=ae(Uu),Uf=Gr(function(n,t,r){return t=t.toLowerCase(),n+(r?Mu(t):t)}),Cf=Gr(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Df=Gr(function(n,t,r){return n+(r?" ":"")+t.toLowerCase()}),Mf=Kr("toLowerCase"),Tf=Gr(function(n,t,r){return n+(r?"_":"")+t.toLowerCase();
+}),$f=Gr(function(n,t,r){return n+(r?" ":"")+Nf(t)}),Ff=Gr(function(n,t,r){return n+(r?" ":"")+t.toUpperCase()}),Nf=Kr("toUpperCase"),Pf=lr(function(n,t){try{return r(n,F,t)}catch(n){return vu(n)?n:new Yu(n)}}),Zf=ge(function(n,t){return u(t,function(t){t=$e(t),_t(n,t,Yo(n[t],n))}),n}),qf=Qr(),Vf=Qr(true),Kf=lr(function(n,t){return function(r){return Dt(r,n,t)}}),Gf=lr(function(n,t){return function(r){return Dt(n,r,t)}}),Hf=re(l),Jf=re(o),Yf=re(_),Qf=ie(),Xf=ie(true),nc=te(function(n,t){return n+t},0),tc=ce("ceil"),rc=te(function(n,t){
+return n/t},1),ec=ce("floor"),uc=te(function(n,t){return n*t},1),ic=ce("round"),oc=te(function(n,t){return n-t},0);return On.after=function(n,t){if(typeof t!="function")throw new ei("Expected a function");return n=Ou(n),function(){if(1>--n)return t.apply(this,arguments)}},On.ary=iu,On.assign=bf,On.assignIn=xf,On.assignInWith=jf,On.assignWith=wf,On.at=mf,On.before=ou,On.bind=Yo,On.bindAll=Zf,On.bindKey=Qo,On.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return af(n)?n:[n]},
+On.chain=Xe,On.chunk=function(n,t,r){if(t=(r?ze(n,t,r):t===F)?1:Di(Ou(t),0),r=null==n?0:n.length,!r||1>t)return[];for(var e=0,u=0,i=Hu(Ri(r/t));e<r;)i[u++]=vr(n,e,e+=t);return i},On.compact=function(n){for(var t=-1,r=null==n?0:n.length,e=0,u=[];++t<r;){var i=n[t];i&&(u[e++]=i)}return u},On.concat=function(){var n=arguments.length;if(!n)return[];for(var t=Hu(n-1),r=arguments[0];n--;)t[n-1]=arguments[n];return s(af(r)?Mr(r):[r],kt(t,1))},On.cond=function(n){var t=null==n?0:n.length,e=je();return n=t?l(n,function(n){
+if("function"!=typeof n[1])throw new ei("Expected a function");return[e(n[0]),n[1]]}):[],lr(function(e){for(var u=-1;++u<t;){var i=n[u];if(r(i[0],this,e))return r(i[1],this,e)}})},On.conforms=function(n){return yt(dt(n,1))},On.constant=Fu,On.countBy=No,On.create=function(n,t){var r=io(n);return null==t?r:ht(r,t)},On.curry=fu,On.curryRight=cu,On.debounce=au,On.defaults=Af,On.defaultsDeep=kf,On.defer=Xo,On.delay=nf,On.difference=Ao,On.differenceBy=ko,On.differenceWith=Eo,On.drop=function(n,t,r){var e=null==n?0:n.length;
+return e?(t=r||t===F?1:Ou(t),vr(n,0>t?0:t,e)):[]},On.dropRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===F?1:Ou(t),t=e-t,vr(n,0,0>t?0:t)):[]},On.dropRightWhile=function(n,t){return n&&n.length?Ar(n,je(t,3),true,true):[]},On.dropWhile=function(n,t){return n&&n.length?Ar(n,je(t,3),true):[]},On.fill=function(n,t,r,e){var u=null==n?0:n.length;if(!u)return[];for(r&&typeof r!="number"&&ze(n,t,r)&&(r=0,e=u),u=n.length,r=Ou(r),0>r&&(r=-r>u?0:u+r),e=e===F||e>u?u:Ou(e),0>e&&(e+=u),e=r>e?0:Su(e);r<e;)n[r++]=t;
+return n},On.filter=function(n,t){return(af(n)?f:At)(n,je(t,3))},On.flatMap=function(n,t){return kt(uu(n,t),1)},On.flatMapDeep=function(n,t){return kt(uu(n,t),N)},On.flatMapDepth=function(n,t,r){return r=r===F?1:Ou(r),kt(uu(n,t),r)},On.flatten=Ve,On.flattenDeep=function(n){return(null==n?0:n.length)?kt(n,N):[]},On.flattenDepth=function(n,t){return null!=n&&n.length?(t=t===F?1:Ou(t),kt(n,t)):[]},On.flip=function(n){return le(n,512)},On.flow=qf,On.flowRight=Vf,On.fromPairs=function(n){for(var t=-1,r=null==n?0:n.length,e={};++t<r;){
+var u=n[t];e[u[0]]=u[1]}return e},On.functions=function(n){return null==n?[]:St(n,Lu(n))},On.functionsIn=function(n){return null==n?[]:St(n,Uu(n))},On.groupBy=qo,On.initial=function(n){return(null==n?0:n.length)?vr(n,0,-1):[]},On.intersection=Oo,On.intersectionBy=So,On.intersectionWith=Io,On.invert=Ef,On.invertBy=Of,On.invokeMap=Vo,On.iteratee=Pu,On.keyBy=Ko,On.keys=Lu,On.keysIn=Uu,On.map=uu,On.mapKeys=function(n,t){var r={};return t=je(t,3),Et(n,function(n,e,u){_t(r,t(n,e,u),n)}),r},On.mapValues=function(n,t){
+var r={};return t=je(t,3),Et(n,function(n,e,u){_t(r,e,t(n,e,u))}),r},On.matches=function(n){return Qt(dt(n,1))},On.matchesProperty=function(n,t){return Xt(n,dt(t,1))},On.memoize=lu,On.merge=If,On.mergeWith=Rf,On.method=Kf,On.methodOf=Gf,On.mixin=Zu,On.negate=su,On.nthArg=function(n){return n=Ou(n),lr(function(t){return tr(t,n)})},On.omit=zf,On.omitBy=function(n,t){return Cu(n,su(je(t)))},On.once=function(n){return ou(2,n)},On.orderBy=function(n,t,r,e){return null==n?[]:(af(t)||(t=null==t?[]:[t]),
+r=e?F:r,af(r)||(r=null==r?[]:[r]),rr(n,t,r))},On.over=Hf,On.overArgs=tf,On.overEvery=Jf,On.overSome=Yf,On.partial=rf,On.partialRight=ef,On.partition=Go,On.pick=Wf,On.pickBy=Cu,On.property=Vu,On.propertyOf=function(n){return function(t){return null==n?F:It(n,t)}},On.pull=Ro,On.pullAll=He,On.pullAllBy=function(n,t,r){return n&&n.length&&t&&t.length?or(n,t,je(r,2)):n},On.pullAllWith=function(n,t,r){return n&&n.length&&t&&t.length?or(n,t,F,r):n},On.pullAt=zo,On.range=Qf,On.rangeRight=Xf,On.rearg=uf,On.reject=function(n,t){
+return(af(n)?f:At)(n,su(je(t,3)))},On.remove=function(n,t){var r=[];if(!n||!n.length)return r;var e=-1,u=[],i=n.length;for(t=je(t,3);++e<i;){var o=n[e];t(o,e,n)&&(r.push(o),u.push(e))}return fr(n,u),r},On.rest=function(n,t){if(typeof n!="function")throw new ei("Expected a function");return t=t===F?t:Ou(t),lr(n,t)},On.reverse=Je,On.sampleSize=function(n,t,r){return t=(r?ze(n,t,r):t===F)?1:Ou(t),(af(n)?ot:hr)(n,t)},On.set=function(n,t,r){return null==n?n:pr(n,t,r)},On.setWith=function(n,t,r,e){return e=typeof e=="function"?e:F,
+null==n?n:pr(n,t,r,e)},On.shuffle=function(n){return(af(n)?ft:_r)(n)},On.slice=function(n,t,r){var e=null==n?0:n.length;return e?(r&&typeof r!="number"&&ze(n,t,r)?(t=0,r=e):(t=null==t?0:Ou(t),r=r===F?e:Ou(r)),vr(n,t,r)):[]},On.sortBy=Ho,On.sortedUniq=function(n){return n&&n.length?br(n):[]},On.sortedUniqBy=function(n,t){return n&&n.length?br(n,je(t,2)):[]},On.split=function(n,t,r){return r&&typeof r!="number"&&ze(n,t,r)&&(t=r=F),r=r===F?4294967295:r>>>0,r?(n=zu(n))&&(typeof t=="string"||null!=t&&!_f(t))&&(t=jr(t),
+!t&&Bn.test(n))?zr($(n),0,r):n.split(t,r):[]},On.spread=function(n,t){if(typeof n!="function")throw new ei("Expected a function");return t=null==t?0:Di(Ou(t),0),lr(function(e){var u=e[t];return e=zr(e,0,t),u&&s(e,u),r(n,this,e)})},On.tail=function(n){var t=null==n?0:n.length;return t?vr(n,1,t):[]},On.take=function(n,t,r){return n&&n.length?(t=r||t===F?1:Ou(t),vr(n,0,0>t?0:t)):[]},On.takeRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===F?1:Ou(t),t=e-t,vr(n,0>t?0:t,e)):[]},On.takeRightWhile=function(n,t){
+return n&&n.length?Ar(n,je(t,3),false,true):[]},On.takeWhile=function(n,t){return n&&n.length?Ar(n,je(t,3)):[]},On.tap=function(n,t){return t(n),n},On.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new ei("Expected a function");return bu(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),au(n,t,{leading:e,maxWait:t,trailing:u})},On.thru=nu,On.toArray=ku,On.toPairs=Bf,On.toPairsIn=Lf,On.toPath=function(n){return af(n)?l(n,$e):Au(n)?[n]:Mr(mo(zu(n)))},On.toPlainObject=Ru,
+On.transform=function(n,t,r){var e=af(n),i=e||sf(n)||gf(n);if(t=je(t,4),null==r){var o=n&&n.constructor;r=i?e?new o:[]:bu(n)&&gu(o)?io(bi(n)):{}}return(i?u:Et)(n,function(n,e,u){return t(r,n,e,u)}),r},On.unary=function(n){return iu(n,1)},On.union=Wo,On.unionBy=Bo,On.unionWith=Lo,On.uniq=function(n){return n&&n.length?wr(n):[]},On.uniqBy=function(n,t){return n&&n.length?wr(n,je(t,2)):[]},On.uniqWith=function(n,t){return t=typeof t=="function"?t:F,n&&n.length?wr(n,F,t):[]},On.unset=function(n,t){return null==n||mr(n,t);
+},On.unzip=Ye,On.unzipWith=Qe,On.update=function(n,t,r){return null==n?n:pr(n,t,Ir(r)(It(n,t)),void 0)},On.updateWith=function(n,t,r,e){return e=typeof e=="function"?e:F,null!=n&&(n=pr(n,t,Ir(r)(It(n,t)),e)),n},On.values=Du,On.valuesIn=function(n){return null==n?[]:I(n,Uu(n))},On.without=Uo,On.words=$u,On.wrap=function(n,t){return rf(Ir(t),n)},On.xor=Co,On.xorBy=Do,On.xorWith=Mo,On.zip=To,On.zipObject=function(n,t){return Or(n||[],t||[],at)},On.zipObjectDeep=function(n,t){return Or(n||[],t||[],pr);
+},On.zipWith=$o,On.entries=Bf,On.entriesIn=Lf,On.extend=xf,On.extendWith=jf,Zu(On,On),On.add=nc,On.attempt=Pf,On.camelCase=Uf,On.capitalize=Mu,On.ceil=tc,On.clamp=function(n,t,r){return r===F&&(r=t,t=F),r!==F&&(r=Iu(r),r=r===r?r:0),t!==F&&(t=Iu(t),t=t===t?t:0),gt(Iu(n),t,r)},On.clone=function(n){return dt(n,4)},On.cloneDeep=function(n){return dt(n,5)},On.cloneDeepWith=function(n,t){return t=typeof t=="function"?t:F,dt(n,5,t)},On.cloneWith=function(n,t){return t=typeof t=="function"?t:F,dt(n,4,t)},
+On.conformsTo=function(n,t){return null==t||bt(n,t,Lu(t))},On.deburr=Tu,On.defaultTo=function(n,t){return null==n||n!==n?t:n},On.divide=rc,On.endsWith=function(n,t,r){n=zu(n),t=jr(t);var e=n.length,e=r=r===F?e:gt(Ou(r),0,e);return r-=t.length,0<=r&&n.slice(r,e)==t},On.eq=hu,On.escape=function(n){return(n=zu(n))&&Y.test(n)?n.replace(H,et):n},On.escapeRegExp=function(n){return(n=zu(n))&&fn.test(n)?n.replace(on,"\\$&"):n},On.every=function(n,t,r){var e=af(n)?o:wt;return r&&ze(n,t,r)&&(t=F),e(n,je(t,3));
+},On.find=Po,On.findIndex=Ze,On.findKey=function(n,t){return v(n,je(t,3),Et)},On.findLast=Zo,On.findLastIndex=qe,On.findLastKey=function(n,t){return v(n,je(t,3),Ot)},On.floor=ec,On.forEach=ru,On.forEachRight=eu,On.forIn=function(n,t){return null==n?n:co(n,je(t,3),Uu)},On.forInRight=function(n,t){return null==n?n:ao(n,je(t,3),Uu)},On.forOwn=function(n,t){return n&&Et(n,je(t,3))},On.forOwnRight=function(n,t){return n&&Ot(n,je(t,3))},On.get=Wu,On.gt=of,On.gte=ff,On.has=function(n,t){return null!=n&&ke(n,t,Bt);
+},On.hasIn=Bu,On.head=Ke,On.identity=Nu,On.includes=function(n,t,r,e){return n=pu(n)?n:Du(n),r=r&&!e?Ou(r):0,e=n.length,0>r&&(r=Di(e+r,0)),mu(n)?r<=e&&-1<n.indexOf(t,r):!!e&&-1<d(n,t,r)},On.indexOf=function(n,t,r){var e=null==n?0:n.length;return e?(r=null==r?0:Ou(r),0>r&&(r=Di(e+r,0)),d(n,t,r)):-1},On.inRange=function(n,t,r){return t=Eu(t),r===F?(r=t,t=0):r=Eu(r),n=Iu(n),n>=Mi(t,r)&&n<Di(t,r)},On.invoke=Sf,On.isArguments=cf,On.isArray=af,On.isArrayBuffer=lf,On.isArrayLike=pu,On.isArrayLikeObject=_u,
+On.isBoolean=function(n){return true===n||false===n||xu(n)&&"[object Boolean]"==zt(n)},On.isBuffer=sf,On.isDate=hf,On.isElement=function(n){return xu(n)&&1===n.nodeType&&!wu(n)},On.isEmpty=function(n){if(null==n)return true;if(pu(n)&&(af(n)||typeof n=="string"||typeof n.splice=="function"||sf(n)||gf(n)||cf(n)))return!n.length;var t=yo(n);if("[object Map]"==t||"[object Set]"==t)return!n.size;if(Le(n))return!Ht(n).length;for(var r in n)if(ci.call(n,r))return false;return true},On.isEqual=function(n,t){return Ft(n,t);
+},On.isEqualWith=function(n,t,r){var e=(r=typeof r=="function"?r:F)?r(n,t):F;return e===F?Ft(n,t,F,r):!!e},On.isError=vu,On.isFinite=function(n){return typeof n=="number"&&Li(n)},On.isFunction=gu,On.isInteger=du,On.isLength=yu,On.isMap=pf,On.isMatch=function(n,t){return n===t||Pt(n,t,me(t))},On.isMatchWith=function(n,t,r){return r=typeof r=="function"?r:F,Pt(n,t,me(t),r)},On.isNaN=function(n){return ju(n)&&n!=+n},On.isNative=function(n){if(bo(n))throw new Yu("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");
+return Zt(n)},On.isNil=function(n){return null==n},On.isNull=function(n){return null===n},On.isNumber=ju,On.isObject=bu,On.isObjectLike=xu,On.isPlainObject=wu,On.isRegExp=_f,On.isSafeInteger=function(n){return du(n)&&-9007199254740991<=n&&9007199254740991>=n},On.isSet=vf,On.isString=mu,On.isSymbol=Au,On.isTypedArray=gf,On.isUndefined=function(n){return n===F},On.isWeakMap=function(n){return xu(n)&&"[object WeakMap]"==yo(n)},On.isWeakSet=function(n){return xu(n)&&"[object WeakSet]"==zt(n)},On.join=function(n,t){
+return null==n?"":Ui.call(n,t)},On.kebabCase=Cf,On.last=Ge,On.lastIndexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;if(r!==F&&(u=Ou(r),u=0>u?Di(e+u,0):Mi(u,e-1)),t===t){for(r=u+1;r--&&n[r]!==t;);n=r}else n=g(n,b,u,true);return n},On.lowerCase=Df,On.lowerFirst=Mf,On.lt=df,On.lte=yf,On.max=function(n){return n&&n.length?mt(n,Nu,Wt):F},On.maxBy=function(n,t){return n&&n.length?mt(n,je(t,2),Wt):F},On.mean=function(n){return x(n,Nu)},On.meanBy=function(n,t){return x(n,je(t,2))},On.min=function(n){
+return n&&n.length?mt(n,Nu,Jt):F},On.minBy=function(n,t){return n&&n.length?mt(n,je(t,2),Jt):F},On.stubArray=Ku,On.stubFalse=Gu,On.stubObject=function(){return{}},On.stubString=function(){return""},On.stubTrue=function(){return true},On.multiply=uc,On.nth=function(n,t){return n&&n.length?tr(n,Ou(t)):F},On.noConflict=function(){return Zn._===this&&(Zn._=pi),this},On.noop=qu,On.now=Jo,On.pad=function(n,t,r){n=zu(n);var e=(t=Ou(t))?T(n):0;return!t||e>=t?n:(t=(t-e)/2,ee(zi(t),r)+n+ee(Ri(t),r))},On.padEnd=function(n,t,r){
+n=zu(n);var e=(t=Ou(t))?T(n):0;return t&&e<t?n+ee(t-e,r):n},On.padStart=function(n,t,r){n=zu(n);var e=(t=Ou(t))?T(n):0;return t&&e<t?ee(t-e,r)+n:n},On.parseInt=function(n,t,r){return r||null==t?t=0:t&&(t=+t),$i(zu(n).replace(an,""),t||0)},On.random=function(n,t,r){if(r&&typeof r!="boolean"&&ze(n,t,r)&&(t=r=F),r===F&&(typeof t=="boolean"?(r=t,t=F):typeof n=="boolean"&&(r=n,n=F)),n===F&&t===F?(n=0,t=1):(n=Eu(n),t===F?(t=n,n=0):t=Eu(t)),n>t){var e=n;n=t,t=e}return r||n%1||t%1?(r=Fi(),Mi(n+r*(t-n+$n("1e-"+((r+"").length-1))),t)):cr(n,t);
+},On.reduce=function(n,t,r){var e=af(n)?h:m,u=3>arguments.length;return e(n,je(t,4),r,u,oo)},On.reduceRight=function(n,t,r){var e=af(n)?p:m,u=3>arguments.length;return e(n,je(t,4),r,u,fo)},On.repeat=function(n,t,r){return t=(r?ze(n,t,r):t===F)?1:Ou(t),ar(zu(n),t)},On.replace=function(){var n=arguments,t=zu(n[0]);return 3>n.length?t:t.replace(n[1],n[2])},On.result=function(n,t,r){t=Rr(t,n);var e=-1,u=t.length;for(u||(u=1,n=F);++e<u;){var i=null==n?F:n[$e(t[e])];i===F&&(e=u,i=r),n=gu(i)?i.call(n):i;
+}return n},On.round=ic,On.runInContext=w,On.sample=function(n){return(af(n)?tt:sr)(n)},On.size=function(n){if(null==n)return 0;if(pu(n))return mu(n)?T(n):n.length;var t=yo(n);return"[object Map]"==t||"[object Set]"==t?n.size:Ht(n).length},On.snakeCase=Tf,On.some=function(n,t,r){var e=af(n)?_:gr;return r&&ze(n,t,r)&&(t=F),e(n,je(t,3))},On.sortedIndex=function(n,t){return dr(n,t)},On.sortedIndexBy=function(n,t,r){return yr(n,t,je(r,2))},On.sortedIndexOf=function(n,t){var r=null==n?0:n.length;if(r){
+var e=dr(n,t);if(e<r&&hu(n[e],t))return e}return-1},On.sortedLastIndex=function(n,t){return dr(n,t,true)},On.sortedLastIndexBy=function(n,t,r){return yr(n,t,je(r,2),true)},On.sortedLastIndexOf=function(n,t){if(null==n?0:n.length){var r=dr(n,t,true)-1;if(hu(n[r],t))return r}return-1},On.startCase=$f,On.startsWith=function(n,t,r){return n=zu(n),r=null==r?0:gt(Ou(r),0,n.length),t=jr(t),n.slice(r,r+t.length)==t},On.subtract=oc,On.sum=function(n){return n&&n.length?k(n,Nu):0},On.sumBy=function(n,t){return n&&n.length?k(n,je(t,2)):0;
+},On.template=function(n,t,r){var e=On.templateSettings;r&&ze(n,t,r)&&(t=F),n=zu(n),t=jf({},t,e,se),r=jf({},t.imports,e.imports,se);var u,i,o=Lu(r),f=I(r,o),c=0;r=t.interpolate||An;var a="__p+='";r=ti((t.escape||An).source+"|"+r.source+"|"+(r===nn?gn:An).source+"|"+(t.evaluate||An).source+"|$","g");var l="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"";if(n.replace(r,function(t,r,e,o,f,l){return e||(e=o),a+=n.slice(c,l).replace(kn,B),r&&(u=true,a+="'+__e("+r+")+'"),f&&(i=true,a+="';"+f+";\n__p+='"),
+e&&(a+="'+((__t=("+e+"))==null?'':__t)+'"),c=l+t.length,t}),a+="';",(t=t.variable)||(a="with(obj){"+a+"}"),a=(i?a.replace(q,""):a).replace(V,"$1").replace(K,"$1;"),a="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+a+"return __p}",t=Pf(function(){return Qu(o,l+"return "+a).apply(F,f)}),t.source=a,vu(t))throw t;return t},On.times=function(n,t){if(n=Ou(n),1>n||9007199254740991<n)return[];
+var r=4294967295,e=Mi(n,4294967295);for(t=je(t),n-=4294967295,e=E(e,t);++r<n;)t(r);return e},On.toFinite=Eu,On.toInteger=Ou,On.toLength=Su,On.toLower=function(n){return zu(n).toLowerCase()},On.toNumber=Iu,On.toSafeInteger=function(n){return n?gt(Ou(n),-9007199254740991,9007199254740991):0===n?n:0},On.toString=zu,On.toUpper=function(n){return zu(n).toUpperCase()},On.trim=function(n,t,r){return(n=zu(n))&&(r||t===F)?n.replace(cn,""):n&&(t=jr(t))?(n=$(n),r=$(t),t=z(n,r),r=W(n,r)+1,zr(n,t,r).join("")):n;
+},On.trimEnd=function(n,t,r){return(n=zu(n))&&(r||t===F)?n.replace(ln,""):n&&(t=jr(t))?(n=$(n),t=W(n,$(t))+1,zr(n,0,t).join("")):n},On.trimStart=function(n,t,r){return(n=zu(n))&&(r||t===F)?n.replace(an,""):n&&(t=jr(t))?(n=$(n),t=z(n,$(t)),zr(n,t).join("")):n},On.truncate=function(n,t){var r=30,e="...";if(bu(t))var u="separator"in t?t.separator:u,r="length"in t?Ou(t.length):r,e="omission"in t?jr(t.omission):e;n=zu(n);var i=n.length;if(Bn.test(n))var o=$(n),i=o.length;if(r>=i)return n;if(i=r-T(e),1>i)return e;
+if(r=o?zr(o,0,i).join(""):n.slice(0,i),u===F)return r+e;if(o&&(i+=r.length-i),_f(u)){if(n.slice(i).search(u)){var f=r;for(u.global||(u=ti(u.source,zu(dn.exec(u))+"g")),u.lastIndex=0;o=u.exec(f);)var c=o.index;r=r.slice(0,c===F?i:c)}}else n.indexOf(jr(u),i)!=i&&(u=r.lastIndexOf(u),-1<u&&(r=r.slice(0,u)));return r+e},On.unescape=function(n){return(n=zu(n))&&J.test(n)?n.replace(G,ut):n},On.uniqueId=function(n){var t=++ai;return zu(n)+t},On.upperCase=Ff,On.upperFirst=Nf,On.each=ru,On.eachRight=eu,On.first=Ke,
+Zu(On,function(){var n={};return Et(On,function(t,r){ci.call(On.prototype,r)||(n[r]=t)}),n}(),{chain:false}),On.VERSION="4.17.4",u("bind bindKey curry curryRight partial partialRight".split(" "),function(n){On[n].placeholder=On}),u(["drop","take"],function(n,t){Mn.prototype[n]=function(r){r=r===F?1:Di(Ou(r),0);var e=this.__filtered__&&!t?new Mn(this):this.clone();return e.__filtered__?e.__takeCount__=Mi(r,e.__takeCount__):e.__views__.push({size:Mi(r,4294967295),type:n+(0>e.__dir__?"Right":"")}),e},Mn.prototype[n+"Right"]=function(t){
+return this.reverse()[n](t).reverse()}}),u(["filter","map","takeWhile"],function(n,t){var r=t+1,e=1==r||3==r;Mn.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:je(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),u(["head","last"],function(n,t){var r="take"+(t?"Right":"");Mn.prototype[n]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Mn.prototype[n]=function(){return this.__filtered__?new Mn(this):this[r](1);
+}}),Mn.prototype.compact=function(){return this.filter(Nu)},Mn.prototype.find=function(n){return this.filter(n).head()},Mn.prototype.findLast=function(n){return this.reverse().find(n)},Mn.prototype.invokeMap=lr(function(n,t){return typeof n=="function"?new Mn(this):this.map(function(r){return Dt(r,n,t)})}),Mn.prototype.reject=function(n){return this.filter(su(je(n)))},Mn.prototype.slice=function(n,t){n=Ou(n);var r=this;return r.__filtered__&&(0<n||0>t)?new Mn(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),
+t!==F&&(t=Ou(t),r=0>t?r.dropRight(-t):r.take(t-n)),r)},Mn.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Mn.prototype.toArray=function(){return this.take(4294967295)},Et(Mn.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=On[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t);u&&(On.prototype[t]=function(){function t(n){return n=u.apply(On,s([n],f)),e&&h?n[0]:n}var o=this.__wrapped__,f=e?[1]:arguments,c=o instanceof Mn,a=f[0],l=c||af(o);
+l&&r&&typeof a=="function"&&1!=a.length&&(c=l=false);var h=this.__chain__,p=!!this.__actions__.length,a=i&&!h,c=c&&!p;return!i&&l?(o=c?o:new Mn(this),o=n.apply(o,f),o.__actions__.push({func:nu,args:[t],thisArg:F}),new zn(o,h)):a&&c?n.apply(this,f):(o=this.thru(t),a?e?o.value()[0]:o.value():o)})}),u("pop push shift sort splice unshift".split(" "),function(n){var t=ui[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);On.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){
+var u=this.value();return t.apply(af(u)?u:[],n)}return this[r](function(r){return t.apply(af(r)?r:[],n)})}}),Et(Mn.prototype,function(n,t){var r=On[t];if(r){var e=r.name+"";(Ji[e]||(Ji[e]=[])).push({name:t,func:r})}}),Ji[Xr(F,2).name]=[{name:"wrapper",func:F}],Mn.prototype.clone=function(){var n=new Mn(this.__wrapped__);return n.__actions__=Mr(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Mr(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Mr(this.__views__),
+n},Mn.prototype.reverse=function(){if(this.__filtered__){var n=new Mn(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},Mn.prototype.value=function(){var n,t=this.__wrapped__.value(),r=this.__dir__,e=af(t),u=0>r,i=e?t.length:0;n=i;for(var o=this.__views__,f=0,c=-1,a=o.length;++c<a;){var l=o[c],s=l.size;switch(l.type){case"drop":f+=s;break;case"dropRight":n-=s;break;case"take":n=Mi(n,f+s);break;case"takeRight":f=Di(f,n-s)}}if(n={start:f,end:n},o=n.start,f=n.end,n=f-o,
+o=u?f:o-1,f=this.__iteratees__,c=f.length,a=0,l=Mi(n,this.__takeCount__),!e||!u&&i==n&&l==n)return kr(t,this.__actions__);e=[];n:for(;n--&&a<l;){for(o+=r,u=-1,i=t[o];++u<c;){var h=f[u],s=h.type,h=(0,h.iteratee)(i);if(2==s)i=h;else if(!h){if(1==s)continue n;break n}}e[a++]=i}return e},On.prototype.at=Fo,On.prototype.chain=function(){return Xe(this)},On.prototype.commit=function(){return new zn(this.value(),this.__chain__)},On.prototype.next=function(){this.__values__===F&&(this.__values__=ku(this.value()));
+var n=this.__index__>=this.__values__.length;return{done:n,value:n?F:this.__values__[this.__index__++]}},On.prototype.plant=function(n){for(var t,r=this;r instanceof Sn;){var e=Pe(r);e.__index__=0,e.__values__=F,t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},On.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof Mn?(this.__actions__.length&&(n=new Mn(this)),n=n.reverse(),n.__actions__.push({func:nu,args:[Je],thisArg:F}),new zn(n,this.__chain__)):this.thru(Je);
+},On.prototype.toJSON=On.prototype.valueOf=On.prototype.value=function(){return kr(this.__wrapped__,this.__actions__)},On.prototype.first=On.prototype.head,Ai&&(On.prototype[Ai]=tu),On}();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Zn._=it, define(function(){return it})):Vn?((Vn.exports=it)._=it,qn._=it):Zn._=it}).call(this); \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/lodash/lowerCase.js b/tools/node_modules/eslint/node_modules/lodash/lowerCase.js
new file mode 100644
index 0000000000..66c1f499f4
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/lowerCase.js
@@ -0,0 +1,27 @@
+var createCompounder = require('./_createCompounder');
+
+/**
+ * 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();
+});
+
+module.exports = lowerCase;
diff --git a/tools/node_modules/eslint/node_modules/lodash/lowerFirst.js b/tools/node_modules/eslint/node_modules/lodash/lowerFirst.js
new file mode 100644
index 0000000000..c08f082b13
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/lowerFirst.js
@@ -0,0 +1,22 @@
+var createCaseFirst = require('./_createCaseFirst');
+
+/**
+ * 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');
+
+module.exports = lowerFirst;
diff --git a/tools/node_modules/eslint/node_modules/lodash/lt.js b/tools/node_modules/eslint/node_modules/lodash/lt.js
new file mode 100644
index 0000000000..813866e4a0
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/lt.js
@@ -0,0 +1,29 @@
+var baseLt = require('./_baseLt'),
+ createRelationalOperation = require('./_createRelationalOperation');
+
+/**
+ * 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);
+
+module.exports = lt;
diff --git a/tools/node_modules/eslint/node_modules/lodash/lte.js b/tools/node_modules/eslint/node_modules/lodash/lte.js
new file mode 100644
index 0000000000..382f6610d2
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/lte.js
@@ -0,0 +1,30 @@
+var createRelationalOperation = require('./_createRelationalOperation');
+
+/**
+ * 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;
+});
+
+module.exports = lte;
diff --git a/tools/node_modules/eslint/node_modules/lodash/map.js b/tools/node_modules/eslint/node_modules/lodash/map.js
new file mode 100644
index 0000000000..22efee7b35
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/map.js
@@ -0,0 +1,53 @@
+var arrayMap = require('./_arrayMap'),
+ baseIteratee = require('./_baseIteratee'),
+ baseMap = require('./_baseMap'),
+ isArray = require('./isArray');
+
+/**
+ * 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, baseIteratee(iteratee, 3));
+}
+
+module.exports = map;
diff --git a/tools/node_modules/eslint/node_modules/lodash/mapKeys.js b/tools/node_modules/eslint/node_modules/lodash/mapKeys.js
new file mode 100644
index 0000000000..3b68797db0
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/mapKeys.js
@@ -0,0 +1,36 @@
+var baseAssignValue = require('./_baseAssignValue'),
+ baseForOwn = require('./_baseForOwn'),
+ baseIteratee = require('./_baseIteratee');
+
+/**
+ * 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 = baseIteratee(iteratee, 3);
+
+ baseForOwn(object, function(value, key, object) {
+ baseAssignValue(result, iteratee(value, key, object), value);
+ });
+ return result;
+}
+
+module.exports = mapKeys;
diff --git a/tools/node_modules/eslint/node_modules/lodash/mapValues.js b/tools/node_modules/eslint/node_modules/lodash/mapValues.js
new file mode 100644
index 0000000000..4ec082514e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/mapValues.js
@@ -0,0 +1,43 @@
+var baseAssignValue = require('./_baseAssignValue'),
+ baseForOwn = require('./_baseForOwn'),
+ baseIteratee = require('./_baseIteratee');
+
+/**
+ * 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) {
+ baseAssignValue(result, key, iteratee(value, key, object));
+ });
+ return result;
+}
+
+module.exports = mapValues;
diff --git a/tools/node_modules/eslint/node_modules/lodash/matches.js b/tools/node_modules/eslint/node_modules/lodash/matches.js
new file mode 100644
index 0000000000..11145db37f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/matches.js
@@ -0,0 +1,39 @@
+var baseClone = require('./_baseClone'),
+ baseMatches = require('./_baseMatches');
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_DEEP_FLAG = 1;
+
+/**
+ * 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(baseClone(source, CLONE_DEEP_FLAG));
+}
+
+module.exports = matches;
diff --git a/tools/node_modules/eslint/node_modules/lodash/matchesProperty.js b/tools/node_modules/eslint/node_modules/lodash/matchesProperty.js
new file mode 100644
index 0000000000..cc062ac993
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/matchesProperty.js
@@ -0,0 +1,37 @@
+var baseClone = require('./_baseClone'),
+ baseMatchesProperty = require('./_baseMatchesProperty');
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_DEEP_FLAG = 1;
+
+/**
+ * Creates a function that performs a partial deep comparison between the
+ * value at `path` of a given object to `srcValue`, returning `true` if the
+ * object value is equivalent, else `false`.
+ *
+ * **Note:** Partial comparisons will match empty array and empty object
+ * `srcValue` values against any array or object value, respectively. See
+ * `_.isEqual` for a list of supported value comparisons.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.2.0
+ * @category Util
+ * @param {Array|string} path The path of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new spec function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': 1, 'b': 2, 'c': 3 },
+ * { 'a': 4, 'b': 5, 'c': 6 }
+ * ];
+ *
+ * _.find(objects, _.matchesProperty('a', 4));
+ * // => { 'a': 4, 'b': 5, 'c': 6 }
+ */
+function matchesProperty(path, srcValue) {
+ return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
+}
+
+module.exports = matchesProperty;
diff --git a/tools/node_modules/eslint/node_modules/lodash/math.js b/tools/node_modules/eslint/node_modules/lodash/math.js
new file mode 100644
index 0000000000..596688748e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/math.js
@@ -0,0 +1,17 @@
+module.exports = {
+ 'add': require('./add'),
+ 'ceil': require('./ceil'),
+ 'divide': require('./divide'),
+ 'floor': require('./floor'),
+ 'max': require('./max'),
+ 'maxBy': require('./maxBy'),
+ 'mean': require('./mean'),
+ 'meanBy': require('./meanBy'),
+ 'min': require('./min'),
+ 'minBy': require('./minBy'),
+ 'multiply': require('./multiply'),
+ 'round': require('./round'),
+ 'subtract': require('./subtract'),
+ 'sum': require('./sum'),
+ 'sumBy': require('./sumBy')
+};
diff --git a/tools/node_modules/eslint/node_modules/lodash/max.js b/tools/node_modules/eslint/node_modules/lodash/max.js
new file mode 100644
index 0000000000..142ad8cfb1
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/max.js
@@ -0,0 +1,29 @@
+var baseExtremum = require('./_baseExtremum'),
+ baseGt = require('./_baseGt'),
+ identity = require('./identity');
+
+/**
+ * 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;
+}
+
+module.exports = max;
diff --git a/tools/node_modules/eslint/node_modules/lodash/maxBy.js b/tools/node_modules/eslint/node_modules/lodash/maxBy.js
new file mode 100644
index 0000000000..2eba9c06ff
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/maxBy.js
@@ -0,0 +1,34 @@
+var baseExtremum = require('./_baseExtremum'),
+ baseGt = require('./_baseGt'),
+ baseIteratee = require('./_baseIteratee');
+
+/**
+ * This method is like `_.max` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the criterion by which
+ * the value is ranked. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {*} Returns the maximum value.
+ * @example
+ *
+ * var objects = [{ 'n': 1 }, { 'n': 2 }];
+ *
+ * _.maxBy(objects, function(o) { return o.n; });
+ * // => { 'n': 2 }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.maxBy(objects, 'n');
+ * // => { 'n': 2 }
+ */
+function maxBy(array, iteratee) {
+ return (array && array.length)
+ ? baseExtremum(array, baseIteratee(iteratee, 2), baseGt)
+ : undefined;
+}
+
+module.exports = maxBy;
diff --git a/tools/node_modules/eslint/node_modules/lodash/mean.js b/tools/node_modules/eslint/node_modules/lodash/mean.js
new file mode 100644
index 0000000000..e3ffff67c7
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/mean.js
@@ -0,0 +1,22 @@
+var baseMean = require('./_baseMean'),
+ identity = require('./identity');
+
+/**
+ * Computes the mean of the values in `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {number} Returns the mean.
+ * @example
+ *
+ * _.mean([4, 2, 8, 6]);
+ * // => 5
+ */
+function mean(array) {
+ return baseMean(array, identity);
+}
+
+module.exports = mean;
diff --git a/tools/node_modules/eslint/node_modules/lodash/meanBy.js b/tools/node_modules/eslint/node_modules/lodash/meanBy.js
new file mode 100644
index 0000000000..b0316716fe
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/meanBy.js
@@ -0,0 +1,31 @@
+var baseIteratee = require('./_baseIteratee'),
+ baseMean = require('./_baseMean');
+
+/**
+ * This method is like `_.mean` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the value to be averaged.
+ * The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {number} Returns the mean.
+ * @example
+ *
+ * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
+ *
+ * _.meanBy(objects, function(o) { return o.n; });
+ * // => 5
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.meanBy(objects, 'n');
+ * // => 5
+ */
+function meanBy(array, iteratee) {
+ return baseMean(array, baseIteratee(iteratee, 2));
+}
+
+module.exports = meanBy;
diff --git a/tools/node_modules/eslint/node_modules/lodash/memoize.js b/tools/node_modules/eslint/node_modules/lodash/memoize.js
new file mode 100644
index 0000000000..d6035af172
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/memoize.js
@@ -0,0 +1,73 @@
+var MapCache = require('./_MapCache');
+
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/**
+ * 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;
+
+module.exports = memoize;
diff --git a/tools/node_modules/eslint/node_modules/lodash/merge.js b/tools/node_modules/eslint/node_modules/lodash/merge.js
new file mode 100644
index 0000000000..4bbc3a181e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/merge.js
@@ -0,0 +1,39 @@
+var baseMerge = require('./_baseMerge'),
+ createAssigner = require('./_createAssigner');
+
+/**
+ * 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);
+});
+
+module.exports = merge;
diff --git a/tools/node_modules/eslint/node_modules/lodash/mergeWith.js b/tools/node_modules/eslint/node_modules/lodash/mergeWith.js
new file mode 100644
index 0000000000..1b43a2c4a3
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/mergeWith.js
@@ -0,0 +1,39 @@
+var baseMerge = require('./_baseMerge'),
+ createAssigner = require('./_createAssigner');
+
+/**
+ * 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);
+});
+
+module.exports = mergeWith;
diff --git a/tools/node_modules/eslint/node_modules/lodash/method.js b/tools/node_modules/eslint/node_modules/lodash/method.js
new file mode 100644
index 0000000000..23ec32d557
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/method.js
@@ -0,0 +1,34 @@
+var baseInvoke = require('./_baseInvoke'),
+ baseRest = require('./_baseRest');
+
+/**
+ * Creates a function that invokes the method at `path` of a given object.
+ * Any additional arguments are provided to the invoked method.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Util
+ * @param {Array|string} path The path of the method to invoke.
+ * @param {...*} [args] The arguments to invoke the method with.
+ * @returns {Function} Returns the new invoker function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': { 'b': _.constant(2) } },
+ * { 'a': { 'b': _.constant(1) } }
+ * ];
+ *
+ * _.map(objects, _.method('a.b'));
+ * // => [2, 1]
+ *
+ * _.map(objects, _.method(['a', 'b']));
+ * // => [2, 1]
+ */
+var method = baseRest(function(path, args) {
+ return function(object) {
+ return baseInvoke(object, path, args);
+ };
+});
+
+module.exports = method;
diff --git a/tools/node_modules/eslint/node_modules/lodash/methodOf.js b/tools/node_modules/eslint/node_modules/lodash/methodOf.js
new file mode 100644
index 0000000000..df59b57f31
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/methodOf.js
@@ -0,0 +1,33 @@
+var baseInvoke = require('./_baseInvoke'),
+ baseRest = require('./_baseRest');
+
+/**
+ * The opposite of `_.method`; this method creates a function that invokes
+ * the method at a given path of `object`. Any additional arguments are
+ * provided to the invoked method.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Util
+ * @param {Object} object The object to query.
+ * @param {...*} [args] The arguments to invoke the method with.
+ * @returns {Function} Returns the new invoker function.
+ * @example
+ *
+ * var array = _.times(3, _.constant),
+ * object = { 'a': array, 'b': array, 'c': array };
+ *
+ * _.map(['a[2]', 'c[0]'], _.methodOf(object));
+ * // => [2, 0]
+ *
+ * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
+ * // => [2, 0]
+ */
+var methodOf = baseRest(function(object, args) {
+ return function(path) {
+ return baseInvoke(object, path, args);
+ };
+});
+
+module.exports = methodOf;
diff --git a/tools/node_modules/eslint/node_modules/lodash/min.js b/tools/node_modules/eslint/node_modules/lodash/min.js
new file mode 100644
index 0000000000..428f571d74
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/min.js
@@ -0,0 +1,29 @@
+var baseExtremum = require('./_baseExtremum'),
+ baseLt = require('./_baseLt'),
+ identity = require('./identity');
+
+/**
+ * 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;
+}
+
+module.exports = min;
diff --git a/tools/node_modules/eslint/node_modules/lodash/minBy.js b/tools/node_modules/eslint/node_modules/lodash/minBy.js
new file mode 100644
index 0000000000..b2697e49a4
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/minBy.js
@@ -0,0 +1,34 @@
+var baseExtremum = require('./_baseExtremum'),
+ baseIteratee = require('./_baseIteratee'),
+ baseLt = require('./_baseLt');
+
+/**
+ * This method is like `_.min` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the criterion by which
+ * the value is ranked. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {*} Returns the minimum value.
+ * @example
+ *
+ * var objects = [{ 'n': 1 }, { 'n': 2 }];
+ *
+ * _.minBy(objects, function(o) { return o.n; });
+ * // => { 'n': 1 }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.minBy(objects, 'n');
+ * // => { 'n': 1 }
+ */
+function minBy(array, iteratee) {
+ return (array && array.length)
+ ? baseExtremum(array, baseIteratee(iteratee, 2), baseLt)
+ : undefined;
+}
+
+module.exports = minBy;
diff --git a/tools/node_modules/eslint/node_modules/lodash/mixin.js b/tools/node_modules/eslint/node_modules/lodash/mixin.js
new file mode 100644
index 0000000000..6dc9674671
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/mixin.js
@@ -0,0 +1,74 @@
+var arrayEach = require('./_arrayEach'),
+ arrayPush = require('./_arrayPush'),
+ baseFunctions = require('./_baseFunctions'),
+ copyArray = require('./_copyArray'),
+ isFunction = require('./isFunction'),
+ isObject = require('./isObject'),
+ keys = require('./keys');
+
+/**
+ * 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);
+
+ var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
+ isFunc = isFunction(object);
+
+ arrayEach(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;
+}
+
+module.exports = mixin;
diff --git a/tools/node_modules/eslint/node_modules/lodash/multiply.js b/tools/node_modules/eslint/node_modules/lodash/multiply.js
new file mode 100644
index 0000000000..d7876e1391
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/multiply.js
@@ -0,0 +1,22 @@
+var createMathOperation = require('./_createMathOperation');
+
+/**
+ * Multiply two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Math
+ * @param {number} multiplier The first number in a multiplication.
+ * @param {number} multiplicand The second number in a multiplication.
+ * @returns {number} Returns the product.
+ * @example
+ *
+ * _.multiply(6, 4);
+ * // => 24
+ */
+var multiply = createMathOperation(function(multiplier, multiplicand) {
+ return multiplier * multiplicand;
+}, 1);
+
+module.exports = multiply;
diff --git a/tools/node_modules/eslint/node_modules/lodash/negate.js b/tools/node_modules/eslint/node_modules/lodash/negate.js
new file mode 100644
index 0000000000..5a65cd1fb2
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/negate.js
@@ -0,0 +1,40 @@
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/**
+ * 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);
+ };
+}
+
+module.exports = negate;
diff --git a/tools/node_modules/eslint/node_modules/lodash/next.js b/tools/node_modules/eslint/node_modules/lodash/next.js
new file mode 100644
index 0000000000..55f949c8cd
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/next.js
@@ -0,0 +1,35 @@
+var toArray = require('./toArray');
+
+/**
+ * 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 };
+}
+
+module.exports = wrapperNext;
diff --git a/tools/node_modules/eslint/node_modules/lodash/noop.js b/tools/node_modules/eslint/node_modules/lodash/noop.js
new file mode 100644
index 0000000000..3c0862ee62
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/noop.js
@@ -0,0 +1,17 @@
+/**
+ * This method returns `undefined`.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.3.0
+ * @category Util
+ * @example
+ *
+ * _.times(2, _.noop);
+ * // => [undefined, undefined]
+ */
+function noop() {
+ // No operation performed.
+}
+
+module.exports = noop;
diff --git a/tools/node_modules/eslint/node_modules/lodash/now.js b/tools/node_modules/eslint/node_modules/lodash/now.js
new file mode 100644
index 0000000000..44a05623f2
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/now.js
@@ -0,0 +1,23 @@
+var root = require('./_root');
+
+/**
+ * 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 = function() {
+ return root.Date.now();
+};
+
+module.exports = now;
diff --git a/tools/node_modules/eslint/node_modules/lodash/nth.js b/tools/node_modules/eslint/node_modules/lodash/nth.js
new file mode 100644
index 0000000000..8a344dee56
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/nth.js
@@ -0,0 +1,29 @@
+var baseNth = require('./_baseNth'),
+ toInteger = require('./toInteger');
+
+/**
+ * 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;
+}
+
+module.exports = nth;
diff --git a/tools/node_modules/eslint/node_modules/lodash/nthArg.js b/tools/node_modules/eslint/node_modules/lodash/nthArg.js
new file mode 100644
index 0000000000..09406ddf49
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/nthArg.js
@@ -0,0 +1,32 @@
+var baseNth = require('./_baseNth'),
+ baseRest = require('./_baseRest'),
+ toInteger = require('./toInteger');
+
+/**
+ * Creates a function that gets the argument at index `n`. If `n` is negative,
+ * the nth argument from the end is returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {number} [n=0] The index of the argument to return.
+ * @returns {Function} Returns the new pass-thru function.
+ * @example
+ *
+ * var func = _.nthArg(1);
+ * func('a', 'b', 'c', 'd');
+ * // => 'b'
+ *
+ * var func = _.nthArg(-2);
+ * func('a', 'b', 'c', 'd');
+ * // => 'c'
+ */
+function nthArg(n) {
+ n = toInteger(n);
+ return baseRest(function(args) {
+ return baseNth(args, n);
+ });
+}
+
+module.exports = nthArg;
diff --git a/tools/node_modules/eslint/node_modules/lodash/number.js b/tools/node_modules/eslint/node_modules/lodash/number.js
new file mode 100644
index 0000000000..c3b01008a6
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/number.js
@@ -0,0 +1,5 @@
+module.exports = {
+ 'clamp': require('./clamp'),
+ 'inRange': require('./inRange'),
+ 'random': require('./random')
+};
diff --git a/tools/node_modules/eslint/node_modules/lodash/object.js b/tools/node_modules/eslint/node_modules/lodash/object.js
new file mode 100644
index 0000000000..f046b05f75
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/object.js
@@ -0,0 +1,49 @@
+module.exports = {
+ 'assign': require('./assign'),
+ 'assignIn': require('./assignIn'),
+ 'assignInWith': require('./assignInWith'),
+ 'assignWith': require('./assignWith'),
+ 'at': require('./at'),
+ 'create': require('./create'),
+ 'defaults': require('./defaults'),
+ 'defaultsDeep': require('./defaultsDeep'),
+ 'entries': require('./entries'),
+ 'entriesIn': require('./entriesIn'),
+ 'extend': require('./extend'),
+ 'extendWith': require('./extendWith'),
+ 'findKey': require('./findKey'),
+ 'findLastKey': require('./findLastKey'),
+ 'forIn': require('./forIn'),
+ 'forInRight': require('./forInRight'),
+ 'forOwn': require('./forOwn'),
+ 'forOwnRight': require('./forOwnRight'),
+ 'functions': require('./functions'),
+ 'functionsIn': require('./functionsIn'),
+ 'get': require('./get'),
+ 'has': require('./has'),
+ 'hasIn': require('./hasIn'),
+ 'invert': require('./invert'),
+ 'invertBy': require('./invertBy'),
+ 'invoke': require('./invoke'),
+ 'keys': require('./keys'),
+ 'keysIn': require('./keysIn'),
+ 'mapKeys': require('./mapKeys'),
+ 'mapValues': require('./mapValues'),
+ 'merge': require('./merge'),
+ 'mergeWith': require('./mergeWith'),
+ 'omit': require('./omit'),
+ 'omitBy': require('./omitBy'),
+ 'pick': require('./pick'),
+ 'pickBy': require('./pickBy'),
+ 'result': require('./result'),
+ 'set': require('./set'),
+ 'setWith': require('./setWith'),
+ 'toPairs': require('./toPairs'),
+ 'toPairsIn': require('./toPairsIn'),
+ 'transform': require('./transform'),
+ 'unset': require('./unset'),
+ 'update': require('./update'),
+ 'updateWith': require('./updateWith'),
+ 'values': require('./values'),
+ 'valuesIn': require('./valuesIn')
+};
diff --git a/tools/node_modules/eslint/node_modules/lodash/omit.js b/tools/node_modules/eslint/node_modules/lodash/omit.js
new file mode 100644
index 0000000000..97f5f546f8
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/omit.js
@@ -0,0 +1,57 @@
+var arrayMap = require('./_arrayMap'),
+ baseClone = require('./_baseClone'),
+ baseUnset = require('./_baseUnset'),
+ castPath = require('./_castPath'),
+ copyObject = require('./_copyObject'),
+ customOmitClone = require('./_customOmitClone'),
+ flatRest = require('./_flatRest'),
+ getAllKeysIn = require('./_getAllKeysIn');
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_DEEP_FLAG = 1,
+ CLONE_FLAT_FLAG = 2,
+ CLONE_SYMBOLS_FLAG = 4;
+
+/**
+ * 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;
+});
+
+module.exports = omit;
diff --git a/tools/node_modules/eslint/node_modules/lodash/omitBy.js b/tools/node_modules/eslint/node_modules/lodash/omitBy.js
new file mode 100644
index 0000000000..a064036eba
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/omitBy.js
@@ -0,0 +1,29 @@
+var baseIteratee = require('./_baseIteratee'),
+ negate = require('./negate'),
+ pickBy = require('./pickBy');
+
+/**
+ * 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(baseIteratee(predicate)));
+}
+
+module.exports = omitBy;
diff --git a/tools/node_modules/eslint/node_modules/lodash/once.js b/tools/node_modules/eslint/node_modules/lodash/once.js
new file mode 100644
index 0000000000..0706fc3cbb
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/once.js
@@ -0,0 +1,25 @@
+var before = require('./before');
+
+/**
+ * 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);
+}
+
+module.exports = once;
diff --git a/tools/node_modules/eslint/node_modules/lodash/orderBy.js b/tools/node_modules/eslint/node_modules/lodash/orderBy.js
new file mode 100644
index 0000000000..7195c8c737
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/orderBy.js
@@ -0,0 +1,47 @@
+var baseOrderBy = require('./_baseOrderBy'),
+ isArray = require('./isArray');
+
+/**
+ * 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);
+}
+
+module.exports = orderBy;
diff --git a/tools/node_modules/eslint/node_modules/lodash/over.js b/tools/node_modules/eslint/node_modules/lodash/over.js
new file mode 100644
index 0000000000..bea2f91f8b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/over.js
@@ -0,0 +1,24 @@
+var arrayMap = require('./_arrayMap'),
+ createOver = require('./_createOver');
+
+/**
+ * Creates a function that invokes `iteratees` with the arguments it receives
+ * and returns their results.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {...(Function|Function[])} [iteratees=[_.identity]]
+ * The iteratees to invoke.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.over([Math.max, Math.min]);
+ *
+ * func(1, 2, 3, 4);
+ * // => [4, 1]
+ */
+var over = createOver(arrayMap);
+
+module.exports = over;
diff --git a/tools/node_modules/eslint/node_modules/lodash/overArgs.js b/tools/node_modules/eslint/node_modules/lodash/overArgs.js
new file mode 100644
index 0000000000..f0067dbd32
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/overArgs.js
@@ -0,0 +1,61 @@
+var apply = require('./_apply'),
+ arrayMap = require('./_arrayMap'),
+ baseFlatten = require('./_baseFlatten'),
+ baseIteratee = require('./_baseIteratee'),
+ baseRest = require('./_baseRest'),
+ baseUnary = require('./_baseUnary'),
+ castRest = require('./_castRest'),
+ isArray = require('./isArray');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMin = Math.min;
+
+/**
+ * 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(baseIteratee))
+ : arrayMap(baseFlatten(transforms, 1), baseUnary(baseIteratee));
+
+ 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);
+ });
+});
+
+module.exports = overArgs;
diff --git a/tools/node_modules/eslint/node_modules/lodash/overEvery.js b/tools/node_modules/eslint/node_modules/lodash/overEvery.js
new file mode 100644
index 0000000000..c115d15384
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/overEvery.js
@@ -0,0 +1,30 @@
+var arrayEvery = require('./_arrayEvery'),
+ createOver = require('./_createOver');
+
+/**
+ * Creates a function that checks if **all** of the `predicates` return
+ * truthy when invoked with the arguments it receives.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {...(Function|Function[])} [predicates=[_.identity]]
+ * The predicates to check.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.overEvery([Boolean, isFinite]);
+ *
+ * func('1');
+ * // => true
+ *
+ * func(null);
+ * // => false
+ *
+ * func(NaN);
+ * // => false
+ */
+var overEvery = createOver(arrayEvery);
+
+module.exports = overEvery;
diff --git a/tools/node_modules/eslint/node_modules/lodash/overSome.js b/tools/node_modules/eslint/node_modules/lodash/overSome.js
new file mode 100644
index 0000000000..f902907a95
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/overSome.js
@@ -0,0 +1,30 @@
+var arraySome = require('./_arraySome'),
+ createOver = require('./_createOver');
+
+/**
+ * Creates a function that checks if **any** of the `predicates` return
+ * truthy when invoked with the arguments it receives.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {...(Function|Function[])} [predicates=[_.identity]]
+ * The predicates to check.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.overSome([Boolean, isFinite]);
+ *
+ * func('1');
+ * // => true
+ *
+ * func(null);
+ * // => true
+ *
+ * func(NaN);
+ * // => false
+ */
+var overSome = createOver(arraySome);
+
+module.exports = overSome;
diff --git a/tools/node_modules/eslint/node_modules/lodash/package.json b/tools/node_modules/eslint/node_modules/lodash/package.json
new file mode 100644
index 0000000000..8e74014601
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/package.json
@@ -0,0 +1,68 @@
+{
+ "_from": "lodash@^4.17.4",
+ "_id": "lodash@4.17.4",
+ "_inBundle": false,
+ "_integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=",
+ "_location": "/eslint/lodash",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "lodash@^4.17.4",
+ "name": "lodash",
+ "escapedName": "lodash",
+ "rawSpec": "^4.17.4",
+ "saveSpec": null,
+ "fetchSpec": "^4.17.4"
+ },
+ "_requiredBy": [
+ "/eslint",
+ "/eslint/inquirer",
+ "/eslint/table"
+ ],
+ "_resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
+ "_shasum": "78203a4d1c328ae1d86dca6460e369b57f4055ae",
+ "_spec": "lodash@^4.17.4",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint",
+ "author": {
+ "name": "John-David Dalton",
+ "email": "john.david.dalton@gmail.com",
+ "url": "http://allyoucanleet.com/"
+ },
+ "bugs": {
+ "url": "https://github.com/lodash/lodash/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "John-David Dalton",
+ "email": "john.david.dalton@gmail.com",
+ "url": "http://allyoucanleet.com/"
+ },
+ {
+ "name": "Mathias Bynens",
+ "email": "mathias@qiwi.be",
+ "url": "https://mathiasbynens.be/"
+ }
+ ],
+ "deprecated": false,
+ "description": "Lodash modular utilities.",
+ "homepage": "https://lodash.com/",
+ "icon": "https://lodash.com/icon.svg",
+ "keywords": [
+ "modules",
+ "stdlib",
+ "util"
+ ],
+ "license": "MIT",
+ "main": "lodash.js",
+ "name": "lodash",
+ "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.17.4"
+}
diff --git a/tools/node_modules/eslint/node_modules/lodash/pad.js b/tools/node_modules/eslint/node_modules/lodash/pad.js
new file mode 100644
index 0000000000..77e1f1c1ab
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/pad.js
@@ -0,0 +1,49 @@
+var createPadding = require('./_createPadding'),
+ stringSize = require('./_stringSize'),
+ toInteger = require('./toInteger'),
+ toString = require('./toString');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeCeil = Math.ceil,
+ nativeFloor = Math.floor;
+
+/**
+ * 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)
+ );
+}
+
+module.exports = pad;
diff --git a/tools/node_modules/eslint/node_modules/lodash/padEnd.js b/tools/node_modules/eslint/node_modules/lodash/padEnd.js
new file mode 100644
index 0000000000..224eb80e99
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/padEnd.js
@@ -0,0 +1,39 @@
+var createPadding = require('./_createPadding'),
+ stringSize = require('./_stringSize'),
+ toInteger = require('./toInteger'),
+ toString = require('./toString');
+
+/**
+ * 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;
+}
+
+module.exports = padEnd;
diff --git a/tools/node_modules/eslint/node_modules/lodash/padStart.js b/tools/node_modules/eslint/node_modules/lodash/padStart.js
new file mode 100644
index 0000000000..f991866bf3
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/padStart.js
@@ -0,0 +1,39 @@
+var createPadding = require('./_createPadding'),
+ stringSize = require('./_stringSize'),
+ toInteger = require('./toInteger'),
+ toString = require('./toString');
+
+/**
+ * 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;
+}
+
+module.exports = padStart;
diff --git a/tools/node_modules/eslint/node_modules/lodash/parseInt.js b/tools/node_modules/eslint/node_modules/lodash/parseInt.js
new file mode 100644
index 0000000000..82badf0341
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/parseInt.js
@@ -0,0 +1,43 @@
+var root = require('./_root'),
+ toString = require('./toString');
+
+/** Used to match leading and trailing whitespace. */
+var reTrimStart = /^\s+/;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeParseInt = root.parseInt;
+
+/**
+ * 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);
+}
+
+module.exports = parseInt;
diff --git a/tools/node_modules/eslint/node_modules/lodash/partial.js b/tools/node_modules/eslint/node_modules/lodash/partial.js
new file mode 100644
index 0000000000..05fe8d3c8e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/partial.js
@@ -0,0 +1,50 @@
+var baseRest = require('./_baseRest'),
+ createWrap = require('./_createWrap'),
+ getHolder = require('./_getHolder'),
+ replaceHolders = require('./_replaceHolders');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_PARTIAL_FLAG = 32;
+
+/**
+ * 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);
+});
+
+// Assign default placeholders.
+partial.placeholder = {};
+
+module.exports = partial;
diff --git a/tools/node_modules/eslint/node_modules/lodash/partialRight.js b/tools/node_modules/eslint/node_modules/lodash/partialRight.js
new file mode 100644
index 0000000000..eee031f6d0
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/partialRight.js
@@ -0,0 +1,49 @@
+var baseRest = require('./_baseRest'),
+ createWrap = require('./_createWrap'),
+ getHolder = require('./_getHolder'),
+ replaceHolders = require('./_replaceHolders');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_PARTIAL_RIGHT_FLAG = 64;
+
+/**
+ * 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);
+});
+
+// Assign default placeholders.
+partialRight.placeholder = {};
+
+module.exports = partialRight;
diff --git a/tools/node_modules/eslint/node_modules/lodash/partition.js b/tools/node_modules/eslint/node_modules/lodash/partition.js
new file mode 100644
index 0000000000..6b814a9f2d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/partition.js
@@ -0,0 +1,43 @@
+var createAggregator = require('./_createAggregator');
+
+/**
+ * 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 [[], []]; });
+
+module.exports = partition;
diff --git a/tools/node_modules/eslint/node_modules/lodash/pick.js b/tools/node_modules/eslint/node_modules/lodash/pick.js
new file mode 100644
index 0000000000..3160199f0c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/pick.js
@@ -0,0 +1,25 @@
+var basePick = require('./_basePick'),
+ flatRest = require('./_flatRest');
+
+/**
+ * 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);
+});
+
+module.exports = pick;
diff --git a/tools/node_modules/eslint/node_modules/lodash/pickBy.js b/tools/node_modules/eslint/node_modules/lodash/pickBy.js
new file mode 100644
index 0000000000..ae7c271eac
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/pickBy.js
@@ -0,0 +1,37 @@
+var arrayMap = require('./_arrayMap'),
+ baseIteratee = require('./_baseIteratee'),
+ basePickBy = require('./_basePickBy'),
+ getAllKeysIn = require('./_getAllKeysIn');
+
+/**
+ * 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 = baseIteratee(predicate);
+ return basePickBy(object, props, function(value, path) {
+ return predicate(value, path[0]);
+ });
+}
+
+module.exports = pickBy;
diff --git a/tools/node_modules/eslint/node_modules/lodash/plant.js b/tools/node_modules/eslint/node_modules/lodash/plant.js
new file mode 100644
index 0000000000..23776f3238
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/plant.js
@@ -0,0 +1,48 @@
+var baseLodash = require('./_baseLodash'),
+ wrapperClone = require('./_wrapperClone');
+
+/**
+ * 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;
+}
+
+module.exports = wrapperPlant;
diff --git a/tools/node_modules/eslint/node_modules/lodash/property.js b/tools/node_modules/eslint/node_modules/lodash/property.js
new file mode 100644
index 0000000000..ca8202ff45
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/property.js
@@ -0,0 +1,32 @@
+var baseProperty = require('./_baseProperty'),
+ basePropertyDeep = require('./_basePropertyDeep'),
+ isKey = require('./_isKey'),
+ toKey = require('./_toKey');
+
+/**
+ * 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 = property;
diff --git a/tools/node_modules/eslint/node_modules/lodash/propertyOf.js b/tools/node_modules/eslint/node_modules/lodash/propertyOf.js
new file mode 100644
index 0000000000..384044d3f0
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/propertyOf.js
@@ -0,0 +1,30 @@
+var baseGet = require('./_baseGet');
+
+/**
+ * The opposite of `_.property`; this method creates a function that returns
+ * the value at a given path of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {Object} object The object to query.
+ * @returns {Function} Returns the new accessor function.
+ * @example
+ *
+ * var array = [0, 1, 2],
+ * object = { 'a': array, 'b': array, 'c': array };
+ *
+ * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
+ * // => [2, 0]
+ *
+ * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
+ * // => [2, 0]
+ */
+function propertyOf(object) {
+ return function(path) {
+ return object == null ? undefined : baseGet(object, path);
+ };
+}
+
+module.exports = propertyOf;
diff --git a/tools/node_modules/eslint/node_modules/lodash/pull.js b/tools/node_modules/eslint/node_modules/lodash/pull.js
new file mode 100644
index 0000000000..a2efcb5e10
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/pull.js
@@ -0,0 +1,29 @@
+var baseRest = require('./_baseRest'),
+ pullAll = require('./pullAll');
+
+/**
+ * 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);
+
+module.exports = pull;
diff --git a/tools/node_modules/eslint/node_modules/lodash/pullAll.js b/tools/node_modules/eslint/node_modules/lodash/pullAll.js
new file mode 100644
index 0000000000..f4605c212e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/pullAll.js
@@ -0,0 +1,29 @@
+var basePullAll = require('./_basePullAll');
+
+/**
+ * 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;
+}
+
+module.exports = pullAll;
diff --git a/tools/node_modules/eslint/node_modules/lodash/pullAllBy.js b/tools/node_modules/eslint/node_modules/lodash/pullAllBy.js
new file mode 100644
index 0000000000..74025e8f0e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/pullAllBy.js
@@ -0,0 +1,33 @@
+var baseIteratee = require('./_baseIteratee'),
+ basePullAll = require('./_basePullAll');
+
+/**
+ * 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, baseIteratee(iteratee, 2))
+ : array;
+}
+
+module.exports = pullAllBy;
diff --git a/tools/node_modules/eslint/node_modules/lodash/pullAllWith.js b/tools/node_modules/eslint/node_modules/lodash/pullAllWith.js
new file mode 100644
index 0000000000..1d2fd9f941
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/pullAllWith.js
@@ -0,0 +1,32 @@
+var basePullAll = require('./_basePullAll');
+
+/**
+ * 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;
+}
+
+module.exports = pullAllWith;
diff --git a/tools/node_modules/eslint/node_modules/lodash/pullAt.js b/tools/node_modules/eslint/node_modules/lodash/pullAt.js
new file mode 100644
index 0000000000..6ed84e064d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/pullAt.js
@@ -0,0 +1,43 @@
+var arrayMap = require('./_arrayMap'),
+ baseAt = require('./_baseAt'),
+ basePullAt = require('./_basePullAt'),
+ compareAscending = require('./_compareAscending'),
+ flatRest = require('./_flatRest'),
+ isIndex = require('./_isIndex');
+
+/**
+ * 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;
+});
+
+module.exports = pullAt;
diff --git a/tools/node_modules/eslint/node_modules/lodash/random.js b/tools/node_modules/eslint/node_modules/lodash/random.js
new file mode 100644
index 0000000000..8067711c23
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/random.js
@@ -0,0 +1,82 @@
+var baseRandom = require('./_baseRandom'),
+ isIterateeCall = require('./_isIterateeCall'),
+ toFinite = require('./toFinite');
+
+/** Built-in method references without a dependency on `root`. */
+var freeParseFloat = parseFloat;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMin = Math.min,
+ nativeRandom = Math.random;
+
+/**
+ * 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);
+}
+
+module.exports = random;
diff --git a/tools/node_modules/eslint/node_modules/lodash/range.js b/tools/node_modules/eslint/node_modules/lodash/range.js
new file mode 100644
index 0000000000..fa63b09180
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/range.js
@@ -0,0 +1,46 @@
+var createRange = require('./_createRange');
+
+/**
+ * Creates an array of numbers (positive and/or negative) progressing from
+ * `start` up to, but not including, `end`. A step of `-1` is used if a negative
+ * `start` is specified without an `end` or `step`. If `end` is not specified,
+ * it's set to `start` with `start` then set to `0`.
+ *
+ * **Note:** JavaScript follows the IEEE-754 standard for resolving
+ * floating-point values which can produce unexpected results.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {number} [start=0] The start of the range.
+ * @param {number} end The end of the range.
+ * @param {number} [step=1] The value to increment or decrement by.
+ * @returns {Array} Returns the range of numbers.
+ * @see _.inRange, _.rangeRight
+ * @example
+ *
+ * _.range(4);
+ * // => [0, 1, 2, 3]
+ *
+ * _.range(-4);
+ * // => [0, -1, -2, -3]
+ *
+ * _.range(1, 5);
+ * // => [1, 2, 3, 4]
+ *
+ * _.range(0, 20, 5);
+ * // => [0, 5, 10, 15]
+ *
+ * _.range(0, -4, -1);
+ * // => [0, -1, -2, -3]
+ *
+ * _.range(1, 4, 0);
+ * // => [1, 1, 1]
+ *
+ * _.range(0);
+ * // => []
+ */
+var range = createRange();
+
+module.exports = range;
diff --git a/tools/node_modules/eslint/node_modules/lodash/rangeRight.js b/tools/node_modules/eslint/node_modules/lodash/rangeRight.js
new file mode 100644
index 0000000000..271fafc982
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/rangeRight.js
@@ -0,0 +1,41 @@
+var createRange = require('./_createRange');
+
+/**
+ * This method is like `_.range` except that it populates values in
+ * descending order.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {number} [start=0] The start of the range.
+ * @param {number} end The end of the range.
+ * @param {number} [step=1] The value to increment or decrement by.
+ * @returns {Array} Returns the range of numbers.
+ * @see _.inRange, _.range
+ * @example
+ *
+ * _.rangeRight(4);
+ * // => [3, 2, 1, 0]
+ *
+ * _.rangeRight(-4);
+ * // => [-3, -2, -1, 0]
+ *
+ * _.rangeRight(1, 5);
+ * // => [4, 3, 2, 1]
+ *
+ * _.rangeRight(0, 20, 5);
+ * // => [15, 10, 5, 0]
+ *
+ * _.rangeRight(0, -4, -1);
+ * // => [-3, -2, -1, 0]
+ *
+ * _.rangeRight(1, 4, 0);
+ * // => [1, 1, 1]
+ *
+ * _.rangeRight(0);
+ * // => []
+ */
+var rangeRight = createRange(true);
+
+module.exports = rangeRight;
diff --git a/tools/node_modules/eslint/node_modules/lodash/rearg.js b/tools/node_modules/eslint/node_modules/lodash/rearg.js
new file mode 100644
index 0000000000..a3e1970b8c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/rearg.js
@@ -0,0 +1,33 @@
+var createWrap = require('./_createWrap'),
+ flatRest = require('./_flatRest');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_REARG_FLAG = 256;
+
+/**
+ * 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);
+});
+
+module.exports = rearg;
diff --git a/tools/node_modules/eslint/node_modules/lodash/reduce.js b/tools/node_modules/eslint/node_modules/lodash/reduce.js
new file mode 100644
index 0000000000..5a1df4d041
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/reduce.js
@@ -0,0 +1,51 @@
+var arrayReduce = require('./_arrayReduce'),
+ baseEach = require('./_baseEach'),
+ baseIteratee = require('./_baseIteratee'),
+ baseReduce = require('./_baseReduce'),
+ isArray = require('./isArray');
+
+/**
+ * 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, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach);
+}
+
+module.exports = reduce;
diff --git a/tools/node_modules/eslint/node_modules/lodash/reduceRight.js b/tools/node_modules/eslint/node_modules/lodash/reduceRight.js
new file mode 100644
index 0000000000..e06a7cb7b0
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/reduceRight.js
@@ -0,0 +1,36 @@
+var arrayReduceRight = require('./_arrayReduceRight'),
+ baseEachRight = require('./_baseEachRight'),
+ baseIteratee = require('./_baseIteratee'),
+ baseReduce = require('./_baseReduce'),
+ isArray = require('./isArray');
+
+/**
+ * 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, baseIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
+}
+
+module.exports = reduceRight;
diff --git a/tools/node_modules/eslint/node_modules/lodash/reject.js b/tools/node_modules/eslint/node_modules/lodash/reject.js
new file mode 100644
index 0000000000..a13e554740
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/reject.js
@@ -0,0 +1,46 @@
+var arrayFilter = require('./_arrayFilter'),
+ baseFilter = require('./_baseFilter'),
+ baseIteratee = require('./_baseIteratee'),
+ isArray = require('./isArray'),
+ negate = require('./negate');
+
+/**
+ * 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(baseIteratee(predicate, 3)));
+}
+
+module.exports = reject;
diff --git a/tools/node_modules/eslint/node_modules/lodash/remove.js b/tools/node_modules/eslint/node_modules/lodash/remove.js
new file mode 100644
index 0000000000..87b1898e35
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/remove.js
@@ -0,0 +1,53 @@
+var baseIteratee = require('./_baseIteratee'),
+ basePullAt = require('./_basePullAt');
+
+/**
+ * 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 = baseIteratee(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;
+}
+
+module.exports = remove;
diff --git a/tools/node_modules/eslint/node_modules/lodash/repeat.js b/tools/node_modules/eslint/node_modules/lodash/repeat.js
new file mode 100644
index 0000000000..f4d8c69a05
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/repeat.js
@@ -0,0 +1,37 @@
+var baseRepeat = require('./_baseRepeat'),
+ isIterateeCall = require('./_isIterateeCall'),
+ toInteger = require('./toInteger'),
+ toString = require('./toString');
+
+/**
+ * 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);
+}
+
+module.exports = repeat;
diff --git a/tools/node_modules/eslint/node_modules/lodash/replace.js b/tools/node_modules/eslint/node_modules/lodash/replace.js
new file mode 100644
index 0000000000..6e26ecd827
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/replace.js
@@ -0,0 +1,29 @@
+var toString = require('./toString');
+
+/**
+ * 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]);
+}
+
+module.exports = replace;
diff --git a/tools/node_modules/eslint/node_modules/lodash/rest.js b/tools/node_modules/eslint/node_modules/lodash/rest.js
new file mode 100644
index 0000000000..eaaad00b7b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/rest.js
@@ -0,0 +1,40 @@
+var baseRest = require('./_baseRest'),
+ toInteger = require('./toInteger');
+
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/**
+ * 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);
+}
+
+module.exports = rest;
diff --git a/tools/node_modules/eslint/node_modules/lodash/result.js b/tools/node_modules/eslint/node_modules/lodash/result.js
new file mode 100644
index 0000000000..eae12500b4
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/result.js
@@ -0,0 +1,56 @@
+var castPath = require('./_castPath'),
+ isFunction = require('./isFunction'),
+ toKey = require('./_toKey');
+
+/**
+ * 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;
+}
+
+module.exports = result;
diff --git a/tools/node_modules/eslint/node_modules/lodash/reverse.js b/tools/node_modules/eslint/node_modules/lodash/reverse.js
new file mode 100644
index 0000000000..21764afd66
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/reverse.js
@@ -0,0 +1,34 @@
+/** 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 nativeReverse = arrayProto.reverse;
+
+/**
+ * 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);
+}
+
+module.exports = reverse;
diff --git a/tools/node_modules/eslint/node_modules/lodash/round.js b/tools/node_modules/eslint/node_modules/lodash/round.js
new file mode 100644
index 0000000000..fccc83101e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/round.js
@@ -0,0 +1,26 @@
+var createRound = require('./_createRound');
+
+/**
+ * Computes `number` rounded to `precision`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Math
+ * @param {number} number The number to round.
+ * @param {number} [precision=0] The precision to round to.
+ * @returns {number} Returns the rounded number.
+ * @example
+ *
+ * _.round(4.006);
+ * // => 4
+ *
+ * _.round(4.006, 2);
+ * // => 4.01
+ *
+ * _.round(4060, -2);
+ * // => 4100
+ */
+var round = createRound('round');
+
+module.exports = round;
diff --git a/tools/node_modules/eslint/node_modules/lodash/sample.js b/tools/node_modules/eslint/node_modules/lodash/sample.js
new file mode 100644
index 0000000000..39c356042a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/sample.js
@@ -0,0 +1,24 @@
+var arraySample = require('./_arraySample'),
+ baseSample = require('./_baseSample'),
+ isArray = require('./isArray');
+
+/**
+ * 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);
+}
+
+module.exports = sample;
diff --git a/tools/node_modules/eslint/node_modules/lodash/sampleSize.js b/tools/node_modules/eslint/node_modules/lodash/sampleSize.js
new file mode 100644
index 0000000000..a303686751
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/sampleSize.js
@@ -0,0 +1,37 @@
+var arraySampleSize = require('./_arraySampleSize'),
+ baseSampleSize = require('./_baseSampleSize'),
+ isArray = require('./isArray'),
+ isIterateeCall = require('./_isIterateeCall'),
+ toInteger = require('./toInteger');
+
+/**
+ * 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);
+}
+
+module.exports = sampleSize;
diff --git a/tools/node_modules/eslint/node_modules/lodash/seq.js b/tools/node_modules/eslint/node_modules/lodash/seq.js
new file mode 100644
index 0000000000..1570c2db7b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/seq.js
@@ -0,0 +1,16 @@
+module.exports = {
+ 'at': require('./wrapperAt'),
+ 'chain': require('./chain'),
+ 'commit': require('./commit'),
+ 'lodash': require('./wrapperLodash'),
+ 'next': require('./next'),
+ 'plant': require('./plant'),
+ 'reverse': require('./wrapperReverse'),
+ 'tap': require('./tap'),
+ 'thru': require('./thru'),
+ 'toIterator': require('./toIterator'),
+ 'toJSON': require('./toJSON'),
+ 'value': require('./wrapperValue'),
+ 'valueOf': require('./valueOf'),
+ 'wrapperChain': require('./wrapperChain')
+};
diff --git a/tools/node_modules/eslint/node_modules/lodash/set.js b/tools/node_modules/eslint/node_modules/lodash/set.js
new file mode 100644
index 0000000000..d6630027f1
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/set.js
@@ -0,0 +1,35 @@
+var baseSet = require('./_baseSet');
+
+/**
+ * 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);
+}
+
+module.exports = set;
diff --git a/tools/node_modules/eslint/node_modules/lodash/setWith.js b/tools/node_modules/eslint/node_modules/lodash/setWith.js
new file mode 100644
index 0000000000..fb3e0f65a7
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/setWith.js
@@ -0,0 +1,32 @@
+var baseSet = require('./_baseSet');
+
+/**
+ * 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);
+}
+
+module.exports = setWith;
diff --git a/tools/node_modules/eslint/node_modules/lodash/shuffle.js b/tools/node_modules/eslint/node_modules/lodash/shuffle.js
new file mode 100644
index 0000000000..2b72da7cd6
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/shuffle.js
@@ -0,0 +1,25 @@
+var arrayShuffle = require('./_arrayShuffle'),
+ baseShuffle = require('./_baseShuffle'),
+ isArray = require('./isArray');
+
+/**
+ * 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);
+}
+
+module.exports = shuffle;
diff --git a/tools/node_modules/eslint/node_modules/lodash/size.js b/tools/node_modules/eslint/node_modules/lodash/size.js
new file mode 100644
index 0000000000..3561fc1010
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/size.js
@@ -0,0 +1,46 @@
+var baseKeys = require('./_baseKeys'),
+ getTag = require('./_getTag'),
+ isArrayLike = require('./isArrayLike'),
+ isString = require('./isString'),
+ stringSize = require('./_stringSize');
+
+/** `Object#toString` result references. */
+var mapTag = '[object Map]',
+ setTag = '[object Set]';
+
+/**
+ * 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;
+}
+
+module.exports = size;
diff --git a/tools/node_modules/eslint/node_modules/lodash/slice.js b/tools/node_modules/eslint/node_modules/lodash/slice.js
new file mode 100644
index 0000000000..f7324426a0
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/slice.js
@@ -0,0 +1,37 @@
+var baseSlice = require('./_baseSlice'),
+ isIterateeCall = require('./_isIterateeCall'),
+ toInteger = require('./toInteger');
+
+/**
+ * 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);
+}
+
+module.exports = slice;
diff --git a/tools/node_modules/eslint/node_modules/lodash/snakeCase.js b/tools/node_modules/eslint/node_modules/lodash/snakeCase.js
new file mode 100644
index 0000000000..27f2a76764
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/snakeCase.js
@@ -0,0 +1,28 @@
+var createCompounder = require('./_createCompounder');
+
+/**
+ * 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();
+});
+
+module.exports = snakeCase;
diff --git a/tools/node_modules/eslint/node_modules/lodash/some.js b/tools/node_modules/eslint/node_modules/lodash/some.js
new file mode 100644
index 0000000000..9c1d08cc84
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/some.js
@@ -0,0 +1,51 @@
+var arraySome = require('./_arraySome'),
+ baseIteratee = require('./_baseIteratee'),
+ baseSome = require('./_baseSome'),
+ isArray = require('./isArray'),
+ isIterateeCall = require('./_isIterateeCall');
+
+/**
+ * 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, baseIteratee(predicate, 3));
+}
+
+module.exports = some;
diff --git a/tools/node_modules/eslint/node_modules/lodash/sortBy.js b/tools/node_modules/eslint/node_modules/lodash/sortBy.js
new file mode 100644
index 0000000000..4ba8f7a0ed
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/sortBy.js
@@ -0,0 +1,48 @@
+var baseFlatten = require('./_baseFlatten'),
+ baseOrderBy = require('./_baseOrderBy'),
+ baseRest = require('./_baseRest'),
+ isIterateeCall = require('./_isIterateeCall');
+
+/**
+ * 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), []);
+});
+
+module.exports = sortBy;
diff --git a/tools/node_modules/eslint/node_modules/lodash/sortedIndex.js b/tools/node_modules/eslint/node_modules/lodash/sortedIndex.js
new file mode 100644
index 0000000000..e763473ac4
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/sortedIndex.js
@@ -0,0 +1,24 @@
+var baseSortedIndex = require('./_baseSortedIndex');
+
+/**
+ * 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);
+}
+
+module.exports = sortedIndex;
diff --git a/tools/node_modules/eslint/node_modules/lodash/sortedIndexBy.js b/tools/node_modules/eslint/node_modules/lodash/sortedIndexBy.js
new file mode 100644
index 0000000000..945f23cb0a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/sortedIndexBy.js
@@ -0,0 +1,33 @@
+var baseIteratee = require('./_baseIteratee'),
+ baseSortedIndexBy = require('./_baseSortedIndexBy');
+
+/**
+ * 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, baseIteratee(iteratee, 2));
+}
+
+module.exports = sortedIndexBy;
diff --git a/tools/node_modules/eslint/node_modules/lodash/sortedIndexOf.js b/tools/node_modules/eslint/node_modules/lodash/sortedIndexOf.js
new file mode 100644
index 0000000000..e2d3b7a3dd
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/sortedIndexOf.js
@@ -0,0 +1,31 @@
+var baseSortedIndex = require('./_baseSortedIndex'),
+ eq = require('./eq');
+
+/**
+ * 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;
+}
+
+module.exports = sortedIndexOf;
diff --git a/tools/node_modules/eslint/node_modules/lodash/sortedLastIndex.js b/tools/node_modules/eslint/node_modules/lodash/sortedLastIndex.js
new file mode 100644
index 0000000000..9380cb9cbc
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/sortedLastIndex.js
@@ -0,0 +1,25 @@
+var baseSortedIndex = require('./_baseSortedIndex');
+
+/**
+ * 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);
+}
+
+module.exports = sortedLastIndex;
diff --git a/tools/node_modules/eslint/node_modules/lodash/sortedLastIndexBy.js b/tools/node_modules/eslint/node_modules/lodash/sortedLastIndexBy.js
new file mode 100644
index 0000000000..9225eeb363
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/sortedLastIndexBy.js
@@ -0,0 +1,33 @@
+var baseIteratee = require('./_baseIteratee'),
+ baseSortedIndexBy = require('./_baseSortedIndexBy');
+
+/**
+ * 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, baseIteratee(iteratee, 2), true);
+}
+
+module.exports = sortedLastIndexBy;
diff --git a/tools/node_modules/eslint/node_modules/lodash/sortedLastIndexOf.js b/tools/node_modules/eslint/node_modules/lodash/sortedLastIndexOf.js
new file mode 100644
index 0000000000..18bc4c5d52
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/sortedLastIndexOf.js
@@ -0,0 +1,31 @@
+var baseSortedIndex = require('./_baseSortedIndex'),
+ eq = require('./eq');
+
+/**
+ * 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;
+}
+
+module.exports = sortedLastIndexOf;
diff --git a/tools/node_modules/eslint/node_modules/lodash/sortedUniq.js b/tools/node_modules/eslint/node_modules/lodash/sortedUniq.js
new file mode 100644
index 0000000000..866db311e4
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/sortedUniq.js
@@ -0,0 +1,24 @@
+var baseSortedUniq = require('./_baseSortedUniq');
+
+/**
+ * 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)
+ : [];
+}
+
+module.exports = sortedUniq;
diff --git a/tools/node_modules/eslint/node_modules/lodash/sortedUniqBy.js b/tools/node_modules/eslint/node_modules/lodash/sortedUniqBy.js
new file mode 100644
index 0000000000..4f05ebe91b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/sortedUniqBy.js
@@ -0,0 +1,26 @@
+var baseIteratee = require('./_baseIteratee'),
+ baseSortedUniq = require('./_baseSortedUniq');
+
+/**
+ * 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, baseIteratee(iteratee, 2))
+ : [];
+}
+
+module.exports = sortedUniqBy;
diff --git a/tools/node_modules/eslint/node_modules/lodash/split.js b/tools/node_modules/eslint/node_modules/lodash/split.js
new file mode 100644
index 0000000000..956b48a15a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/split.js
@@ -0,0 +1,52 @@
+var baseToString = require('./_baseToString'),
+ castSlice = require('./_castSlice'),
+ hasUnicode = require('./_hasUnicode'),
+ isIterateeCall = require('./_isIterateeCall'),
+ isRegExp = require('./isRegExp'),
+ stringToArray = require('./_stringToArray'),
+ toString = require('./toString');
+
+/** Used as references for the maximum length and index of an array. */
+var MAX_ARRAY_LENGTH = 4294967295;
+
+/**
+ * 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);
+}
+
+module.exports = split;
diff --git a/tools/node_modules/eslint/node_modules/lodash/spread.js b/tools/node_modules/eslint/node_modules/lodash/spread.js
new file mode 100644
index 0000000000..60a08e22e4
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/spread.js
@@ -0,0 +1,63 @@
+var apply = require('./_apply'),
+ arrayPush = require('./_arrayPush'),
+ baseRest = require('./_baseRest'),
+ castSlice = require('./_castSlice'),
+ toInteger = require('./toInteger');
+
+/** 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;
+
+/**
+ * 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);
+ });
+}
+
+module.exports = spread;
diff --git a/tools/node_modules/eslint/node_modules/lodash/startCase.js b/tools/node_modules/eslint/node_modules/lodash/startCase.js
new file mode 100644
index 0000000000..a48f21ce9b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/startCase.js
@@ -0,0 +1,29 @@
+var createCompounder = require('./_createCompounder'),
+ upperFirst = require('./upperFirst');
+
+/**
+ * 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);
+});
+
+module.exports = startCase;
diff --git a/tools/node_modules/eslint/node_modules/lodash/startsWith.js b/tools/node_modules/eslint/node_modules/lodash/startsWith.js
new file mode 100644
index 0000000000..956c098a0c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/startsWith.js
@@ -0,0 +1,39 @@
+var baseClamp = require('./_baseClamp'),
+ baseToString = require('./_baseToString'),
+ toInteger = require('./toInteger'),
+ toString = require('./toString');
+
+/**
+ * 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;
+}
+
+module.exports = startsWith;
diff --git a/tools/node_modules/eslint/node_modules/lodash/string.js b/tools/node_modules/eslint/node_modules/lodash/string.js
new file mode 100644
index 0000000000..2c829c16a1
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/string.js
@@ -0,0 +1,33 @@
+module.exports = {
+ 'camelCase': require('./camelCase'),
+ 'capitalize': require('./capitalize'),
+ 'deburr': require('./deburr'),
+ 'endsWith': require('./endsWith'),
+ 'escape': require('./escape'),
+ 'escapeRegExp': require('./escapeRegExp'),
+ 'kebabCase': require('./kebabCase'),
+ 'lowerCase': require('./lowerCase'),
+ 'lowerFirst': require('./lowerFirst'),
+ 'pad': require('./pad'),
+ 'padEnd': require('./padEnd'),
+ 'padStart': require('./padStart'),
+ 'parseInt': require('./parseInt'),
+ 'repeat': require('./repeat'),
+ 'replace': require('./replace'),
+ 'snakeCase': require('./snakeCase'),
+ 'split': require('./split'),
+ 'startCase': require('./startCase'),
+ 'startsWith': require('./startsWith'),
+ 'template': require('./template'),
+ 'templateSettings': require('./templateSettings'),
+ 'toLower': require('./toLower'),
+ 'toUpper': require('./toUpper'),
+ 'trim': require('./trim'),
+ 'trimEnd': require('./trimEnd'),
+ 'trimStart': require('./trimStart'),
+ 'truncate': require('./truncate'),
+ 'unescape': require('./unescape'),
+ 'upperCase': require('./upperCase'),
+ 'upperFirst': require('./upperFirst'),
+ 'words': require('./words')
+};
diff --git a/tools/node_modules/eslint/node_modules/lodash/stubArray.js b/tools/node_modules/eslint/node_modules/lodash/stubArray.js
new file mode 100644
index 0000000000..f460c15e32
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/stubArray.js
@@ -0,0 +1,23 @@
+/**
+ * This method returns a new empty array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {Array} Returns the new empty array.
+ * @example
+ *
+ * var arrays = _.times(2, _.stubArray);
+ *
+ * console.log(arrays);
+ * // => [[], []]
+ *
+ * console.log(arrays[0] === arrays[1]);
+ * // => false
+ */
+function stubArray() {
+ return [];
+}
+
+module.exports = stubArray;
diff --git a/tools/node_modules/eslint/node_modules/lodash/stubFalse.js b/tools/node_modules/eslint/node_modules/lodash/stubFalse.js
new file mode 100644
index 0000000000..9b346fce50
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/stubFalse.js
@@ -0,0 +1,18 @@
+/**
+ * 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 = stubFalse;
diff --git a/tools/node_modules/eslint/node_modules/lodash/stubObject.js b/tools/node_modules/eslint/node_modules/lodash/stubObject.js
new file mode 100644
index 0000000000..1d190a1d06
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/stubObject.js
@@ -0,0 +1,23 @@
+/**
+ * This method returns a new empty object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {Object} Returns the new empty object.
+ * @example
+ *
+ * var objects = _.times(2, _.stubObject);
+ *
+ * console.log(objects);
+ * // => [{}, {}]
+ *
+ * console.log(objects[0] === objects[1]);
+ * // => false
+ */
+function stubObject() {
+ return {};
+}
+
+module.exports = stubObject;
diff --git a/tools/node_modules/eslint/node_modules/lodash/stubString.js b/tools/node_modules/eslint/node_modules/lodash/stubString.js
new file mode 100644
index 0000000000..2db0bed073
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/stubString.js
@@ -0,0 +1,18 @@
+/**
+ * This method returns an empty string.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {string} Returns the empty string.
+ * @example
+ *
+ * _.times(2, _.stubString);
+ * // => ['', '']
+ */
+function stubString() {
+ return '';
+}
+
+module.exports = stubString;
diff --git a/tools/node_modules/eslint/node_modules/lodash/stubTrue.js b/tools/node_modules/eslint/node_modules/lodash/stubTrue.js
new file mode 100644
index 0000000000..af3cc9edc7
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/stubTrue.js
@@ -0,0 +1,18 @@
+/**
+ * This method returns `true`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {boolean} Returns `true`.
+ * @example
+ *
+ * _.times(2, _.stubTrue);
+ * // => [true, true]
+ */
+function stubTrue() {
+ return true;
+}
+
+module.exports = stubTrue;
diff --git a/tools/node_modules/eslint/node_modules/lodash/subtract.js b/tools/node_modules/eslint/node_modules/lodash/subtract.js
new file mode 100644
index 0000000000..67207785d9
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/subtract.js
@@ -0,0 +1,22 @@
+var createMathOperation = require('./_createMathOperation');
+
+/**
+ * Subtract two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {number} minuend The first number in a subtraction.
+ * @param {number} subtrahend The second number in a subtraction.
+ * @returns {number} Returns the difference.
+ * @example
+ *
+ * _.subtract(6, 4);
+ * // => 2
+ */
+var subtract = createMathOperation(function(minuend, subtrahend) {
+ return minuend - subtrahend;
+}, 0);
+
+module.exports = subtract;
diff --git a/tools/node_modules/eslint/node_modules/lodash/sum.js b/tools/node_modules/eslint/node_modules/lodash/sum.js
new file mode 100644
index 0000000000..3b07ee40e7
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/sum.js
@@ -0,0 +1,24 @@
+var baseSum = require('./_baseSum'),
+ identity = require('./identity');
+
+/**
+ * Computes the sum of the values in `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.4.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {number} Returns the sum.
+ * @example
+ *
+ * _.sum([4, 2, 8, 6]);
+ * // => 20
+ */
+function sum(array) {
+ return (array && array.length)
+ ? baseSum(array, identity)
+ : 0;
+}
+
+module.exports = sum;
diff --git a/tools/node_modules/eslint/node_modules/lodash/sumBy.js b/tools/node_modules/eslint/node_modules/lodash/sumBy.js
new file mode 100644
index 0000000000..00e36d00ed
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/sumBy.js
@@ -0,0 +1,33 @@
+var baseIteratee = require('./_baseIteratee'),
+ baseSum = require('./_baseSum');
+
+/**
+ * This method is like `_.sum` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the value to be summed.
+ * The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {number} Returns the sum.
+ * @example
+ *
+ * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
+ *
+ * _.sumBy(objects, function(o) { return o.n; });
+ * // => 20
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.sumBy(objects, 'n');
+ * // => 20
+ */
+function sumBy(array, iteratee) {
+ return (array && array.length)
+ ? baseSum(array, baseIteratee(iteratee, 2))
+ : 0;
+}
+
+module.exports = sumBy;
diff --git a/tools/node_modules/eslint/node_modules/lodash/tail.js b/tools/node_modules/eslint/node_modules/lodash/tail.js
new file mode 100644
index 0000000000..001c22d0fd
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/tail.js
@@ -0,0 +1,22 @@
+var baseSlice = require('./_baseSlice');
+
+/**
+ * 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) : [];
+}
+
+module.exports = tail;
diff --git a/tools/node_modules/eslint/node_modules/lodash/take.js b/tools/node_modules/eslint/node_modules/lodash/take.js
new file mode 100644
index 0000000000..b7da712ffe
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/take.js
@@ -0,0 +1,37 @@
+var baseSlice = require('./_baseSlice'),
+ toInteger = require('./toInteger');
+
+/**
+ * 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);
+}
+
+module.exports = take;
diff --git a/tools/node_modules/eslint/node_modules/lodash/takeRight.js b/tools/node_modules/eslint/node_modules/lodash/takeRight.js
new file mode 100644
index 0000000000..6c375060eb
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/takeRight.js
@@ -0,0 +1,39 @@
+var baseSlice = require('./_baseSlice'),
+ toInteger = require('./toInteger');
+
+/**
+ * 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);
+}
+
+module.exports = takeRight;
diff --git a/tools/node_modules/eslint/node_modules/lodash/takeRightWhile.js b/tools/node_modules/eslint/node_modules/lodash/takeRightWhile.js
new file mode 100644
index 0000000000..94ab783d79
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/takeRightWhile.js
@@ -0,0 +1,45 @@
+var baseIteratee = require('./_baseIteratee'),
+ baseWhile = require('./_baseWhile');
+
+/**
+ * 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, baseIteratee(predicate, 3), false, true)
+ : [];
+}
+
+module.exports = takeRightWhile;
diff --git a/tools/node_modules/eslint/node_modules/lodash/takeWhile.js b/tools/node_modules/eslint/node_modules/lodash/takeWhile.js
new file mode 100644
index 0000000000..e88f5910d3
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/takeWhile.js
@@ -0,0 +1,45 @@
+var baseIteratee = require('./_baseIteratee'),
+ baseWhile = require('./_baseWhile');
+
+/**
+ * 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, baseIteratee(predicate, 3))
+ : [];
+}
+
+module.exports = takeWhile;
diff --git a/tools/node_modules/eslint/node_modules/lodash/tap.js b/tools/node_modules/eslint/node_modules/lodash/tap.js
new file mode 100644
index 0000000000..d00728525e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/tap.js
@@ -0,0 +1,29 @@
+/**
+ * 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;
+}
+
+module.exports = tap;
diff --git a/tools/node_modules/eslint/node_modules/lodash/template.js b/tools/node_modules/eslint/node_modules/lodash/template.js
new file mode 100644
index 0000000000..16539eec2f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/template.js
@@ -0,0 +1,238 @@
+var assignInWith = require('./assignInWith'),
+ attempt = require('./attempt'),
+ baseValues = require('./_baseValues'),
+ customDefaultsAssignIn = require('./_customDefaultsAssignIn'),
+ escapeStringChar = require('./_escapeStringChar'),
+ isError = require('./isError'),
+ isIterateeCall = require('./_isIterateeCall'),
+ keys = require('./keys'),
+ reInterpolate = require('./_reInterpolate'),
+ templateSettings = require('./templateSettings'),
+ toString = require('./toString');
+
+/** 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/7.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;
+
+/**
+ * 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='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('<b><%- value %></b>');
+ * compiled({ 'value': '<script>' });
+ * // => '<b>&lt;script&gt;</b>'
+ *
+ * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
+ * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
+ * compiled({ 'users': ['fred', 'barney'] });
+ * // => '<li>fred</li><li>barney</li>'
+ *
+ * // Use the internal `print` function in "evaluate" delimiters.
+ * var compiled = _.template('<% print("hello " + user); %>!');
+ * compiled({ 'user': 'barney' });
+ * // => 'hello barney!'
+ *
+ * // Use the ES template literal delimiter as an "interpolate" delimiter.
+ * // Disable support by replacing the "interpolate" delimiter.
+ * var compiled = _.template('hello ${ user }!');
+ * compiled({ 'user': 'pebbles' });
+ * // => 'hello pebbles!'
+ *
+ * // Use backslashes to treat delimiters as plain text.
+ * var compiled = _.template('<%= "\\<%- value %\\>" %>');
+ * compiled({ 'value': 'ignored' });
+ * // => '<%- value %>'
+ *
+ * // Use the `imports` option to import `jQuery` as `jq`.
+ * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
+ * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
+ * compiled({ 'users': ['fred', 'barney'] });
+ * // => '<li>fred</li><li>barney</li>'
+ *
+ * // Use the `sourceURL` option to specify a custom sourceURL for the template.
+ * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
+ * compiled(data);
+ * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
+ *
+ * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
+ * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
+ * compiled.source;
+ * // => function(data) {
+ * // var __t, __p = '';
+ * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
+ * // return __p;
+ * // }
+ *
+ * // Use custom template delimiters.
+ * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
+ * var compiled = _.template('hello {{ user }}!');
+ * compiled({ 'user': 'mustache' });
+ * // => 'hello mustache!'
+ *
+ * // Use the `source` property to inline compiled templates for meaningful
+ * // line numbers in error messages and stack traces.
+ * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
+ * var JST = {\
+ * "main": ' + _.template(mainText).source + '\
+ * };\
+ * ');
+ */
+function template(string, options, guard) {
+ // Based on John Resig's `tmpl` implementation
+ // (http://ejohn.org/blog/javascript-micro-templating/)
+ // and Laura Doktorova's doT.js (https://github.com/olado/doT).
+ var settings = templateSettings.imports._.templateSettings || templateSettings;
+
+ if (guard && isIterateeCall(string, options, guard)) {
+ options = undefined;
+ }
+ string = toString(string);
+ options = assignInWith({}, options, settings, customDefaultsAssignIn);
+
+ var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
+ importsKeys = keys(imports),
+ importsValues = baseValues(imports, importsKeys);
+
+ var isEscaping,
+ isEvaluating,
+ index = 0,
+ interpolate = options.interpolate || reNoMatch,
+ source = "__p += '";
+
+ // Compile the regexp to match each delimiter.
+ var reDelimiters = RegExp(
+ (options.escape || reNoMatch).source + '|' +
+ interpolate.source + '|' +
+ (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
+ (options.evaluate || reNoMatch).source + '|$'
+ , 'g');
+
+ // Use a sourceURL for easier debugging.
+ var sourceURL = 'sourceURL' in options ? '//# sourceURL=' + options.sourceURL + '\n' : '';
+
+ string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
+ interpolateValue || (interpolateValue = esTemplateValue);
+
+ // Escape characters that can't be included in string literals.
+ source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
+
+ // Replace delimiters with snippets.
+ if (escapeValue) {
+ isEscaping = true;
+ source += "' +\n__e(" + escapeValue + ") +\n'";
+ }
+ if (evaluateValue) {
+ isEvaluating = true;
+ source += "';\n" + evaluateValue + ";\n__p += '";
+ }
+ if (interpolateValue) {
+ source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
+ }
+ index = offset + match.length;
+
+ // The JS engine embedded in Adobe products needs `match` returned in
+ // order to produce the correct `offset` value.
+ return match;
+ });
+
+ source += "';\n";
+
+ // If `variable` is not specified wrap a with-statement around the generated
+ // code to add the data object to the top of the scope chain.
+ var variable = options.variable;
+ if (!variable) {
+ source = 'with (obj) {\n' + source + '\n}\n';
+ }
+ // Cleanup code by stripping empty strings.
+ source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
+ .replace(reEmptyStringMiddle, '$1')
+ .replace(reEmptyStringTrailing, '$1;');
+
+ // Frame code as the function body.
+ source = 'function(' + (variable || 'obj') + ') {\n' +
+ (variable
+ ? ''
+ : 'obj || (obj = {});\n'
+ ) +
+ "var __t, __p = ''" +
+ (isEscaping
+ ? ', __e = _.escape'
+ : ''
+ ) +
+ (isEvaluating
+ ? ', __j = Array.prototype.join;\n' +
+ "function print() { __p += __j.call(arguments, '') }\n"
+ : ';\n'
+ ) +
+ source +
+ 'return __p\n}';
+
+ var result = attempt(function() {
+ return Function(importsKeys, sourceURL + 'return ' + source)
+ .apply(undefined, importsValues);
+ });
+
+ // Provide the compiled function's source by its `toString` method or
+ // the `source` property as a convenience for inlining compiled templates.
+ result.source = source;
+ if (isError(result)) {
+ throw result;
+ }
+ return result;
+}
+
+module.exports = template;
diff --git a/tools/node_modules/eslint/node_modules/lodash/templateSettings.js b/tools/node_modules/eslint/node_modules/lodash/templateSettings.js
new file mode 100644
index 0000000000..5aa5924fab
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/templateSettings.js
@@ -0,0 +1,67 @@
+var escape = require('./escape'),
+ reEscape = require('./_reEscape'),
+ reEvaluate = require('./_reEvaluate'),
+ reInterpolate = require('./_reInterpolate');
+
+/**
+ * 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}
+ */
+var 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}
+ */
+ '_': { 'escape': escape }
+ }
+};
+
+module.exports = templateSettings;
diff --git a/tools/node_modules/eslint/node_modules/lodash/throttle.js b/tools/node_modules/eslint/node_modules/lodash/throttle.js
new file mode 100644
index 0000000000..e2bb806bc8
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/throttle.js
@@ -0,0 +1,69 @@
+var debounce = require('./debounce'),
+ isObject = require('./isObject');
+
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/**
+ * 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
+ });
+}
+
+module.exports = throttle;
diff --git a/tools/node_modules/eslint/node_modules/lodash/thru.js b/tools/node_modules/eslint/node_modules/lodash/thru.js
new file mode 100644
index 0000000000..91e132e52c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/thru.js
@@ -0,0 +1,28 @@
+/**
+ * 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);
+}
+
+module.exports = thru;
diff --git a/tools/node_modules/eslint/node_modules/lodash/times.js b/tools/node_modules/eslint/node_modules/lodash/times.js
new file mode 100644
index 0000000000..266c90c681
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/times.js
@@ -0,0 +1,51 @@
+var baseTimes = require('./_baseTimes'),
+ castFunction = require('./_castFunction'),
+ toInteger = require('./toInteger');
+
+/** Used as references for various `Number` constants. */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/** Used as references for the maximum length and index of an array. */
+var MAX_ARRAY_LENGTH = 4294967295;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMin = Math.min;
+
+/**
+ * Invokes the iteratee `n` times, returning an array of the results of
+ * each invocation. The iteratee is invoked with one argument; (index).
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {number} n The number of times to invoke `iteratee`.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the array of results.
+ * @example
+ *
+ * _.times(3, String);
+ * // => ['0', '1', '2']
+ *
+ * _.times(4, _.constant(0));
+ * // => [0, 0, 0, 0]
+ */
+function times(n, iteratee) {
+ n = toInteger(n);
+ if (n < 1 || n > MAX_SAFE_INTEGER) {
+ return [];
+ }
+ var index = MAX_ARRAY_LENGTH,
+ length = nativeMin(n, MAX_ARRAY_LENGTH);
+
+ iteratee = castFunction(iteratee);
+ n -= MAX_ARRAY_LENGTH;
+
+ var result = baseTimes(length, iteratee);
+ while (++index < n) {
+ iteratee(index);
+ }
+ return result;
+}
+
+module.exports = times;
diff --git a/tools/node_modules/eslint/node_modules/lodash/toArray.js b/tools/node_modules/eslint/node_modules/lodash/toArray.js
new file mode 100644
index 0000000000..98095848e7
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/toArray.js
@@ -0,0 +1,58 @@
+var Symbol = require('./_Symbol'),
+ copyArray = require('./_copyArray'),
+ getTag = require('./_getTag'),
+ isArrayLike = require('./isArrayLike'),
+ isString = require('./isString'),
+ iteratorToArray = require('./_iteratorToArray'),
+ mapToArray = require('./_mapToArray'),
+ setToArray = require('./_setToArray'),
+ stringToArray = require('./_stringToArray'),
+ values = require('./values');
+
+/** `Object#toString` result references. */
+var mapTag = '[object Map]',
+ setTag = '[object Set]';
+
+/** Built-in value references. */
+var symIterator = Symbol ? Symbol.iterator : 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 (!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);
+}
+
+module.exports = toArray;
diff --git a/tools/node_modules/eslint/node_modules/lodash/toFinite.js b/tools/node_modules/eslint/node_modules/lodash/toFinite.js
new file mode 100644
index 0000000000..3b5bba6b4e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/toFinite.js
@@ -0,0 +1,42 @@
+var toNumber = require('./toNumber');
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0,
+ MAX_INTEGER = 1.7976931348623157e+308;
+
+/**
+ * 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;
+}
+
+module.exports = toFinite;
diff --git a/tools/node_modules/eslint/node_modules/lodash/toInteger.js b/tools/node_modules/eslint/node_modules/lodash/toInteger.js
new file mode 100644
index 0000000000..c6aadf8f94
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/toInteger.js
@@ -0,0 +1,36 @@
+var toFinite = require('./toFinite');
+
+/**
+ * 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;
+}
+
+module.exports = toInteger;
diff --git a/tools/node_modules/eslint/node_modules/lodash/toIterator.js b/tools/node_modules/eslint/node_modules/lodash/toIterator.js
new file mode 100644
index 0000000000..beeed5d55c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/toIterator.js
@@ -0,0 +1,23 @@
+/**
+ * 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;
+}
+
+module.exports = wrapperToIterator;
diff --git a/tools/node_modules/eslint/node_modules/lodash/toJSON.js b/tools/node_modules/eslint/node_modules/lodash/toJSON.js
new file mode 100644
index 0000000000..5e751a2c32
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/toJSON.js
@@ -0,0 +1 @@
+module.exports = require('./wrapperValue');
diff --git a/tools/node_modules/eslint/node_modules/lodash/toLength.js b/tools/node_modules/eslint/node_modules/lodash/toLength.js
new file mode 100644
index 0000000000..be8f2a7446
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/toLength.js
@@ -0,0 +1,38 @@
+var baseClamp = require('./_baseClamp'),
+ toInteger = require('./toInteger');
+
+/** Used as references for the maximum length and index of an array. */
+var MAX_ARRAY_LENGTH = 4294967295;
+
+/**
+ * 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;
+}
+
+module.exports = toLength;
diff --git a/tools/node_modules/eslint/node_modules/lodash/toLower.js b/tools/node_modules/eslint/node_modules/lodash/toLower.js
new file mode 100644
index 0000000000..b4b7858eb0
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/toLower.js
@@ -0,0 +1,28 @@
+var toString = require('./toString');
+
+/**
+ * Converts `string`, as a whole, to lower case just like
+ * [String#toLowerCase](https://mdn.io/toLowerCase).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the lower cased string.
+ * @example
+ *
+ * _.toLower('--Foo-Bar--');
+ * // => '--foo-bar--'
+ *
+ * _.toLower('fooBar');
+ * // => 'foobar'
+ *
+ * _.toLower('__FOO_BAR__');
+ * // => '__foo_bar__'
+ */
+function toLower(value) {
+ return toString(value).toLowerCase();
+}
+
+module.exports = toLower;
diff --git a/tools/node_modules/eslint/node_modules/lodash/toNumber.js b/tools/node_modules/eslint/node_modules/lodash/toNumber.js
new file mode 100644
index 0000000000..b0f72de302
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/toNumber.js
@@ -0,0 +1,66 @@
+var isObject = require('./isObject'),
+ isSymbol = require('./isSymbol');
+
+/** Used as references for various `Number` constants. */
+var NAN = 0 / 0;
+
+/** Used to match leading and trailing whitespace. */
+var reTrim = /^\s+|\s+$/g;
+
+/** 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 octal string values. */
+var reIsOctal = /^0o[0-7]+$/i;
+
+/** Built-in method references without a dependency on `root`. */
+var freeParseInt = parseInt;
+
+/**
+ * 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);
+}
+
+module.exports = toNumber;
diff --git a/tools/node_modules/eslint/node_modules/lodash/toPairs.js b/tools/node_modules/eslint/node_modules/lodash/toPairs.js
new file mode 100644
index 0000000000..c4f52ae00e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/toPairs.js
@@ -0,0 +1,30 @@
+var createToPairs = require('./_createToPairs'),
+ keys = require('./keys');
+
+/**
+ * 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);
+
+module.exports = toPairs;
diff --git a/tools/node_modules/eslint/node_modules/lodash/toPairsIn.js b/tools/node_modules/eslint/node_modules/lodash/toPairsIn.js
new file mode 100644
index 0000000000..32c562ca7c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/toPairsIn.js
@@ -0,0 +1,30 @@
+var createToPairs = require('./_createToPairs'),
+ keysIn = require('./keysIn');
+
+/**
+ * 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);
+
+module.exports = toPairsIn;
diff --git a/tools/node_modules/eslint/node_modules/lodash/toPath.js b/tools/node_modules/eslint/node_modules/lodash/toPath.js
new file mode 100644
index 0000000000..d3e96eea98
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/toPath.js
@@ -0,0 +1,33 @@
+var arrayMap = require('./_arrayMap'),
+ copyArray = require('./_copyArray'),
+ isArray = require('./isArray'),
+ isSymbol = require('./isSymbol'),
+ stringToPath = require('./_stringToPath'),
+ toKey = require('./_toKey'),
+ toString = require('./toString');
+
+/**
+ * Converts `value` to a property path array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {*} value The value to convert.
+ * @returns {Array} Returns the new property path array.
+ * @example
+ *
+ * _.toPath('a.b.c');
+ * // => ['a', 'b', 'c']
+ *
+ * _.toPath('a[0].b.c');
+ * // => ['a', '0', 'b', 'c']
+ */
+function toPath(value) {
+ if (isArray(value)) {
+ return arrayMap(value, toKey);
+ }
+ return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
+}
+
+module.exports = toPath;
diff --git a/tools/node_modules/eslint/node_modules/lodash/toPlainObject.js b/tools/node_modules/eslint/node_modules/lodash/toPlainObject.js
new file mode 100644
index 0000000000..5de79b8b3c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/toPlainObject.js
@@ -0,0 +1,32 @@
+var copyObject = require('./_copyObject'),
+ keysIn = require('./keysIn');
+
+/**
+ * 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));
+}
+
+module.exports = toPlainObject;
diff --git a/tools/node_modules/eslint/node_modules/lodash/toSafeInteger.js b/tools/node_modules/eslint/node_modules/lodash/toSafeInteger.js
new file mode 100644
index 0000000000..f564623d1f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/toSafeInteger.js
@@ -0,0 +1,37 @@
+var baseClamp = require('./_baseClamp'),
+ toInteger = require('./toInteger');
+
+/** Used as references for various `Number` constants. */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/**
+ * 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);
+}
+
+module.exports = toSafeInteger;
diff --git a/tools/node_modules/eslint/node_modules/lodash/toString.js b/tools/node_modules/eslint/node_modules/lodash/toString.js
new file mode 100644
index 0000000000..daaf681c91
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/toString.js
@@ -0,0 +1,28 @@
+var baseToString = require('./_baseToString');
+
+/**
+ * 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);
+}
+
+module.exports = toString;
diff --git a/tools/node_modules/eslint/node_modules/lodash/toUpper.js b/tools/node_modules/eslint/node_modules/lodash/toUpper.js
new file mode 100644
index 0000000000..b3648e8bf9
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/toUpper.js
@@ -0,0 +1,28 @@
+var toString = require('./toString');
+
+/**
+ * Converts `string`, as a whole, to upper case just like
+ * [String#toUpperCase](https://mdn.io/toUpperCase).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the upper cased string.
+ * @example
+ *
+ * _.toUpper('--foo-bar--');
+ * // => '--FOO-BAR--'
+ *
+ * _.toUpper('fooBar');
+ * // => 'FOOBAR'
+ *
+ * _.toUpper('__foo_bar__');
+ * // => '__FOO_BAR__'
+ */
+function toUpper(value) {
+ return toString(value).toUpperCase();
+}
+
+module.exports = toUpper;
diff --git a/tools/node_modules/eslint/node_modules/lodash/transform.js b/tools/node_modules/eslint/node_modules/lodash/transform.js
new file mode 100644
index 0000000000..d755a15489
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/transform.js
@@ -0,0 +1,65 @@
+var arrayEach = require('./_arrayEach'),
+ baseCreate = require('./_baseCreate'),
+ baseForOwn = require('./_baseForOwn'),
+ baseIteratee = require('./_baseIteratee'),
+ getPrototype = require('./_getPrototype'),
+ isArray = require('./isArray'),
+ isBuffer = require('./isBuffer'),
+ isFunction = require('./isFunction'),
+ isObject = require('./isObject'),
+ isTypedArray = require('./isTypedArray');
+
+/**
+ * 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 = baseIteratee(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;
+}
+
+module.exports = transform;
diff --git a/tools/node_modules/eslint/node_modules/lodash/trim.js b/tools/node_modules/eslint/node_modules/lodash/trim.js
new file mode 100644
index 0000000000..5e38c8ef6e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/trim.js
@@ -0,0 +1,49 @@
+var baseToString = require('./_baseToString'),
+ castSlice = require('./_castSlice'),
+ charsEndIndex = require('./_charsEndIndex'),
+ charsStartIndex = require('./_charsStartIndex'),
+ stringToArray = require('./_stringToArray'),
+ toString = require('./toString');
+
+/** Used to match leading and trailing whitespace. */
+var reTrim = /^\s+|\s+$/g;
+
+/**
+ * Removes leading and trailing whitespace or specified characters from `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to trim.
+ * @param {string} [chars=whitespace] The characters to trim.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {string} Returns the trimmed string.
+ * @example
+ *
+ * _.trim(' abc ');
+ * // => 'abc'
+ *
+ * _.trim('-_-abc-_-', '_-');
+ * // => 'abc'
+ *
+ * _.map([' foo ', ' bar '], _.trim);
+ * // => ['foo', 'bar']
+ */
+function trim(string, chars, guard) {
+ string = toString(string);
+ if (string && (guard || chars === undefined)) {
+ return string.replace(reTrim, '');
+ }
+ if (!string || !(chars = baseToString(chars))) {
+ return string;
+ }
+ var strSymbols = stringToArray(string),
+ chrSymbols = stringToArray(chars),
+ start = charsStartIndex(strSymbols, chrSymbols),
+ end = charsEndIndex(strSymbols, chrSymbols) + 1;
+
+ return castSlice(strSymbols, start, end).join('');
+}
+
+module.exports = trim;
diff --git a/tools/node_modules/eslint/node_modules/lodash/trimEnd.js b/tools/node_modules/eslint/node_modules/lodash/trimEnd.js
new file mode 100644
index 0000000000..82c54a9867
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/trimEnd.js
@@ -0,0 +1,43 @@
+var baseToString = require('./_baseToString'),
+ castSlice = require('./_castSlice'),
+ charsEndIndex = require('./_charsEndIndex'),
+ stringToArray = require('./_stringToArray'),
+ toString = require('./toString');
+
+/** Used to match leading and trailing whitespace. */
+var reTrimEnd = /\s+$/;
+
+/**
+ * Removes trailing whitespace or specified characters from `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to trim.
+ * @param {string} [chars=whitespace] The characters to trim.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {string} Returns the trimmed string.
+ * @example
+ *
+ * _.trimEnd(' abc ');
+ * // => ' abc'
+ *
+ * _.trimEnd('-_-abc-_-', '_-');
+ * // => '-_-abc'
+ */
+function trimEnd(string, chars, guard) {
+ string = toString(string);
+ if (string && (guard || chars === undefined)) {
+ return string.replace(reTrimEnd, '');
+ }
+ if (!string || !(chars = baseToString(chars))) {
+ return string;
+ }
+ var strSymbols = stringToArray(string),
+ end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
+
+ return castSlice(strSymbols, 0, end).join('');
+}
+
+module.exports = trimEnd;
diff --git a/tools/node_modules/eslint/node_modules/lodash/trimStart.js b/tools/node_modules/eslint/node_modules/lodash/trimStart.js
new file mode 100644
index 0000000000..30f4f47a2d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/trimStart.js
@@ -0,0 +1,43 @@
+var baseToString = require('./_baseToString'),
+ castSlice = require('./_castSlice'),
+ charsStartIndex = require('./_charsStartIndex'),
+ stringToArray = require('./_stringToArray'),
+ toString = require('./toString');
+
+/** Used to match leading and trailing whitespace. */
+var reTrimStart = /^\s+/;
+
+/**
+ * Removes leading whitespace or specified characters from `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to trim.
+ * @param {string} [chars=whitespace] The characters to trim.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {string} Returns the trimmed string.
+ * @example
+ *
+ * _.trimStart(' abc ');
+ * // => 'abc '
+ *
+ * _.trimStart('-_-abc-_-', '_-');
+ * // => 'abc-_-'
+ */
+function trimStart(string, chars, guard) {
+ string = toString(string);
+ if (string && (guard || chars === undefined)) {
+ return string.replace(reTrimStart, '');
+ }
+ if (!string || !(chars = baseToString(chars))) {
+ return string;
+ }
+ var strSymbols = stringToArray(string),
+ start = charsStartIndex(strSymbols, stringToArray(chars));
+
+ return castSlice(strSymbols, start).join('');
+}
+
+module.exports = trimStart;
diff --git a/tools/node_modules/eslint/node_modules/lodash/truncate.js b/tools/node_modules/eslint/node_modules/lodash/truncate.js
new file mode 100644
index 0000000000..21fcdfef6e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/truncate.js
@@ -0,0 +1,111 @@
+var baseToString = require('./_baseToString'),
+ castSlice = require('./_castSlice'),
+ hasUnicode = require('./_hasUnicode'),
+ isObject = require('./isObject'),
+ isRegExp = require('./isRegExp'),
+ stringSize = require('./_stringSize'),
+ stringToArray = require('./_stringToArray'),
+ toInteger = require('./toInteger'),
+ toString = require('./toString');
+
+/** Used as default options for `_.truncate`. */
+var DEFAULT_TRUNC_LENGTH = 30,
+ DEFAULT_TRUNC_OMISSION = '...';
+
+/** Used to match `RegExp` flags from their coerced string values. */
+var reFlags = /\w*$/;
+
+/**
+ * Truncates `string` if it's longer than the given maximum string length.
+ * The last characters of the truncated string are replaced with the omission
+ * string which defaults to "...".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to truncate.
+ * @param {Object} [options={}] The options object.
+ * @param {number} [options.length=30] The maximum string length.
+ * @param {string} [options.omission='...'] The string to indicate text is omitted.
+ * @param {RegExp|string} [options.separator] The separator pattern to truncate to.
+ * @returns {string} Returns the truncated string.
+ * @example
+ *
+ * _.truncate('hi-diddly-ho there, neighborino');
+ * // => 'hi-diddly-ho there, neighbo...'
+ *
+ * _.truncate('hi-diddly-ho there, neighborino', {
+ * 'length': 24,
+ * 'separator': ' '
+ * });
+ * // => 'hi-diddly-ho there,...'
+ *
+ * _.truncate('hi-diddly-ho there, neighborino', {
+ * 'length': 24,
+ * 'separator': /,? +/
+ * });
+ * // => 'hi-diddly-ho there...'
+ *
+ * _.truncate('hi-diddly-ho there, neighborino', {
+ * 'omission': ' [...]'
+ * });
+ * // => 'hi-diddly-ho there, neig [...]'
+ */
+function truncate(string, options) {
+ var length = DEFAULT_TRUNC_LENGTH,
+ omission = DEFAULT_TRUNC_OMISSION;
+
+ if (isObject(options)) {
+ var separator = 'separator' in options ? options.separator : separator;
+ length = 'length' in options ? toInteger(options.length) : length;
+ omission = 'omission' in options ? baseToString(options.omission) : omission;
+ }
+ string = toString(string);
+
+ var strLength = string.length;
+ if (hasUnicode(string)) {
+ var strSymbols = stringToArray(string);
+ strLength = strSymbols.length;
+ }
+ if (length >= strLength) {
+ return string;
+ }
+ var end = length - stringSize(omission);
+ if (end < 1) {
+ return omission;
+ }
+ var result = strSymbols
+ ? castSlice(strSymbols, 0, end).join('')
+ : string.slice(0, end);
+
+ if (separator === undefined) {
+ return result + omission;
+ }
+ if (strSymbols) {
+ end += (result.length - end);
+ }
+ if (isRegExp(separator)) {
+ if (string.slice(end).search(separator)) {
+ var match,
+ substring = result;
+
+ if (!separator.global) {
+ separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
+ }
+ separator.lastIndex = 0;
+ while ((match = separator.exec(substring))) {
+ var newEnd = match.index;
+ }
+ result = result.slice(0, newEnd === undefined ? end : newEnd);
+ }
+ } else if (string.indexOf(baseToString(separator), end) != end) {
+ var index = result.lastIndexOf(separator);
+ if (index > -1) {
+ result = result.slice(0, index);
+ }
+ }
+ return result + omission;
+}
+
+module.exports = truncate;
diff --git a/tools/node_modules/eslint/node_modules/lodash/unary.js b/tools/node_modules/eslint/node_modules/lodash/unary.js
new file mode 100644
index 0000000000..76f48f6e35
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/unary.js
@@ -0,0 +1,22 @@
+var ary = require('./ary');
+
+/**
+ * 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);
+}
+
+module.exports = unary;
diff --git a/tools/node_modules/eslint/node_modules/lodash/unescape.js b/tools/node_modules/eslint/node_modules/lodash/unescape.js
new file mode 100644
index 0000000000..3b6efd583a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/unescape.js
@@ -0,0 +1,34 @@
+var toString = require('./toString'),
+ unescapeHtmlChar = require('./_unescapeHtmlChar');
+
+/** Used to match HTML entities and HTML characters. */
+var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
+ reHasEscapedHtml = RegExp(reEscapedHtml.source);
+
+/**
+ * The inverse of `_.escape`; this method converts the HTML entities
+ * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to
+ * their corresponding characters.
+ *
+ * **Note:** No other HTML entities are unescaped. To unescape additional
+ * HTML entities use a third-party library like [_he_](https://mths.be/he).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.6.0
+ * @category String
+ * @param {string} [string=''] The string to unescape.
+ * @returns {string} Returns the unescaped string.
+ * @example
+ *
+ * _.unescape('fred, barney, &amp; pebbles');
+ * // => 'fred, barney, & pebbles'
+ */
+function unescape(string) {
+ string = toString(string);
+ return (string && reHasEscapedHtml.test(string))
+ ? string.replace(reEscapedHtml, unescapeHtmlChar)
+ : string;
+}
+
+module.exports = unescape;
diff --git a/tools/node_modules/eslint/node_modules/lodash/union.js b/tools/node_modules/eslint/node_modules/lodash/union.js
new file mode 100644
index 0000000000..e676dfe493
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/union.js
@@ -0,0 +1,26 @@
+var baseFlatten = require('./_baseFlatten'),
+ baseRest = require('./_baseRest'),
+ baseUniq = require('./_baseUniq'),
+ isArrayLikeObject = require('./isArrayLikeObject');
+
+/**
+ * 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));
+});
+
+module.exports = union;
diff --git a/tools/node_modules/eslint/node_modules/lodash/unionBy.js b/tools/node_modules/eslint/node_modules/lodash/unionBy.js
new file mode 100644
index 0000000000..6ae8ccd6ef
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/unionBy.js
@@ -0,0 +1,39 @@
+var baseFlatten = require('./_baseFlatten'),
+ baseIteratee = require('./_baseIteratee'),
+ baseRest = require('./_baseRest'),
+ baseUniq = require('./_baseUniq'),
+ isArrayLikeObject = require('./isArrayLikeObject'),
+ last = require('./last');
+
+/**
+ * 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), baseIteratee(iteratee, 2));
+});
+
+module.exports = unionBy;
diff --git a/tools/node_modules/eslint/node_modules/lodash/unionWith.js b/tools/node_modules/eslint/node_modules/lodash/unionWith.js
new file mode 100644
index 0000000000..78736b27cd
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/unionWith.js
@@ -0,0 +1,34 @@
+var baseFlatten = require('./_baseFlatten'),
+ baseRest = require('./_baseRest'),
+ baseUniq = require('./_baseUniq'),
+ isArrayLikeObject = require('./isArrayLikeObject'),
+ last = require('./last');
+
+/**
+ * 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);
+});
+
+module.exports = unionWith;
diff --git a/tools/node_modules/eslint/node_modules/lodash/uniq.js b/tools/node_modules/eslint/node_modules/lodash/uniq.js
new file mode 100644
index 0000000000..157d1cd380
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/uniq.js
@@ -0,0 +1,25 @@
+var baseUniq = require('./_baseUniq');
+
+/**
+ * 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) : [];
+}
+
+module.exports = uniq;
diff --git a/tools/node_modules/eslint/node_modules/lodash/uniqBy.js b/tools/node_modules/eslint/node_modules/lodash/uniqBy.js
new file mode 100644
index 0000000000..53402a9bf8
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/uniqBy.js
@@ -0,0 +1,31 @@
+var baseIteratee = require('./_baseIteratee'),
+ baseUniq = require('./_baseUniq');
+
+/**
+ * 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, baseIteratee(iteratee, 2)) : [];
+}
+
+module.exports = uniqBy;
diff --git a/tools/node_modules/eslint/node_modules/lodash/uniqWith.js b/tools/node_modules/eslint/node_modules/lodash/uniqWith.js
new file mode 100644
index 0000000000..18d72aabcd
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/uniqWith.js
@@ -0,0 +1,28 @@
+var baseUniq = require('./_baseUniq');
+
+/**
+ * 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) : [];
+}
+
+module.exports = uniqWith;
diff --git a/tools/node_modules/eslint/node_modules/lodash/uniqueId.js b/tools/node_modules/eslint/node_modules/lodash/uniqueId.js
new file mode 100644
index 0000000000..ffa8c03472
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/uniqueId.js
@@ -0,0 +1,28 @@
+var toString = require('./toString');
+
+/** Used to generate unique IDs. */
+var idCounter = 0;
+
+/**
+ * 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;
+}
+
+module.exports = uniqueId;
diff --git a/tools/node_modules/eslint/node_modules/lodash/unset.js b/tools/node_modules/eslint/node_modules/lodash/unset.js
new file mode 100644
index 0000000000..723c3d44b2
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/unset.js
@@ -0,0 +1,34 @@
+var baseUnset = require('./_baseUnset');
+
+/**
+ * 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);
+}
+
+module.exports = unset;
diff --git a/tools/node_modules/eslint/node_modules/lodash/unzip.js b/tools/node_modules/eslint/node_modules/lodash/unzip.js
new file mode 100644
index 0000000000..fce0ec78d1
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/unzip.js
@@ -0,0 +1,45 @@
+var arrayFilter = require('./_arrayFilter'),
+ arrayMap = require('./_arrayMap'),
+ baseProperty = require('./_baseProperty'),
+ baseTimes = require('./_baseTimes'),
+ isArrayLikeObject = require('./isArrayLikeObject');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * 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));
+ });
+}
+
+module.exports = unzip;
diff --git a/tools/node_modules/eslint/node_modules/lodash/unzipWith.js b/tools/node_modules/eslint/node_modules/lodash/unzipWith.js
new file mode 100644
index 0000000000..926c8993d9
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/unzipWith.js
@@ -0,0 +1,39 @@
+var apply = require('./_apply'),
+ arrayMap = require('./_arrayMap'),
+ unzip = require('./unzip');
+
+/**
+ * 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);
+ });
+}
+
+module.exports = unzipWith;
diff --git a/tools/node_modules/eslint/node_modules/lodash/update.js b/tools/node_modules/eslint/node_modules/lodash/update.js
new file mode 100644
index 0000000000..b90098e6da
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/update.js
@@ -0,0 +1,35 @@
+var baseUpdate = require('./_baseUpdate'),
+ castFunction = require('./_castFunction');
+
+/**
+ * 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));
+}
+
+module.exports = update;
diff --git a/tools/node_modules/eslint/node_modules/lodash/updateWith.js b/tools/node_modules/eslint/node_modules/lodash/updateWith.js
new file mode 100644
index 0000000000..a2f4a2cfbf
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/updateWith.js
@@ -0,0 +1,33 @@
+var baseUpdate = require('./_baseUpdate'),
+ castFunction = require('./_castFunction');
+
+/**
+ * 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);
+}
+
+module.exports = updateWith;
diff --git a/tools/node_modules/eslint/node_modules/lodash/upperCase.js b/tools/node_modules/eslint/node_modules/lodash/upperCase.js
new file mode 100644
index 0000000000..efbb8b06cf
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/upperCase.js
@@ -0,0 +1,27 @@
+var createCompounder = require('./_createCompounder');
+
+/**
+ * Converts `string`, as space separated words, to upper case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the upper cased string.
+ * @example
+ *
+ * _.upperCase('--foo-bar');
+ * // => 'FOO BAR'
+ *
+ * _.upperCase('fooBar');
+ * // => 'FOO BAR'
+ *
+ * _.upperCase('__foo_bar__');
+ * // => 'FOO BAR'
+ */
+var upperCase = createCompounder(function(result, word, index) {
+ return result + (index ? ' ' : '') + word.toUpperCase();
+});
+
+module.exports = upperCase;
diff --git a/tools/node_modules/eslint/node_modules/lodash/upperFirst.js b/tools/node_modules/eslint/node_modules/lodash/upperFirst.js
new file mode 100644
index 0000000000..1dd64e1356
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/upperFirst.js
@@ -0,0 +1,22 @@
+var createCaseFirst = require('./_createCaseFirst');
+
+/**
+ * Converts the first character of `string` to upper case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the converted string.
+ * @example
+ *
+ * _.upperFirst('fred');
+ * // => 'Fred'
+ *
+ * _.upperFirst('FRED');
+ * // => 'FRED'
+ */
+var upperFirst = createCaseFirst('toUpperCase');
+
+module.exports = upperFirst;
diff --git a/tools/node_modules/eslint/node_modules/lodash/util.js b/tools/node_modules/eslint/node_modules/lodash/util.js
new file mode 100644
index 0000000000..d244dc27ef
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/util.js
@@ -0,0 +1,34 @@
+module.exports = {
+ 'attempt': require('./attempt'),
+ 'bindAll': require('./bindAll'),
+ 'cond': require('./cond'),
+ 'conforms': require('./conforms'),
+ 'constant': require('./constant'),
+ 'defaultTo': require('./defaultTo'),
+ 'flow': require('./flow'),
+ 'flowRight': require('./flowRight'),
+ 'identity': require('./identity'),
+ 'iteratee': require('./iteratee'),
+ 'matches': require('./matches'),
+ 'matchesProperty': require('./matchesProperty'),
+ 'method': require('./method'),
+ 'methodOf': require('./methodOf'),
+ 'mixin': require('./mixin'),
+ 'noop': require('./noop'),
+ 'nthArg': require('./nthArg'),
+ 'over': require('./over'),
+ 'overEvery': require('./overEvery'),
+ 'overSome': require('./overSome'),
+ 'property': require('./property'),
+ 'propertyOf': require('./propertyOf'),
+ 'range': require('./range'),
+ 'rangeRight': require('./rangeRight'),
+ 'stubArray': require('./stubArray'),
+ 'stubFalse': require('./stubFalse'),
+ 'stubObject': require('./stubObject'),
+ 'stubString': require('./stubString'),
+ 'stubTrue': require('./stubTrue'),
+ 'times': require('./times'),
+ 'toPath': require('./toPath'),
+ 'uniqueId': require('./uniqueId')
+};
diff --git a/tools/node_modules/eslint/node_modules/lodash/value.js b/tools/node_modules/eslint/node_modules/lodash/value.js
new file mode 100644
index 0000000000..5e751a2c32
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/value.js
@@ -0,0 +1 @@
+module.exports = require('./wrapperValue');
diff --git a/tools/node_modules/eslint/node_modules/lodash/valueOf.js b/tools/node_modules/eslint/node_modules/lodash/valueOf.js
new file mode 100644
index 0000000000..5e751a2c32
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/valueOf.js
@@ -0,0 +1 @@
+module.exports = require('./wrapperValue');
diff --git a/tools/node_modules/eslint/node_modules/lodash/values.js b/tools/node_modules/eslint/node_modules/lodash/values.js
new file mode 100644
index 0000000000..b069654181
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/values.js
@@ -0,0 +1,34 @@
+var baseValues = require('./_baseValues'),
+ keys = require('./keys');
+
+/**
+ * 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));
+}
+
+module.exports = values;
diff --git a/tools/node_modules/eslint/node_modules/lodash/valuesIn.js b/tools/node_modules/eslint/node_modules/lodash/valuesIn.js
new file mode 100644
index 0000000000..6296094207
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/valuesIn.js
@@ -0,0 +1,32 @@
+var baseValues = require('./_baseValues'),
+ keysIn = require('./keysIn');
+
+/**
+ * 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));
+}
+
+module.exports = valuesIn;
diff --git a/tools/node_modules/eslint/node_modules/lodash/without.js b/tools/node_modules/eslint/node_modules/lodash/without.js
new file mode 100644
index 0000000000..3a28e8ae4c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/without.js
@@ -0,0 +1,31 @@
+var baseDifference = require('./_baseDifference'),
+ baseRest = require('./_baseRest'),
+ isArrayLikeObject = require('./isArrayLikeObject');
+
+/**
+ * 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)
+ : [];
+});
+
+module.exports = without;
diff --git a/tools/node_modules/eslint/node_modules/lodash/words.js b/tools/node_modules/eslint/node_modules/lodash/words.js
new file mode 100644
index 0000000000..6d7cdd1857
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/words.js
@@ -0,0 +1,35 @@
+var asciiWords = require('./_asciiWords'),
+ hasUnicodeWord = require('./_hasUnicodeWord'),
+ toString = require('./toString'),
+ unicodeWords = require('./_unicodeWords');
+
+/**
+ * Splits `string` into an array of its words.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to inspect.
+ * @param {RegExp|string} [pattern] The pattern to match words.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the words of `string`.
+ * @example
+ *
+ * _.words('fred, barney, & pebbles');
+ * // => ['fred', 'barney', 'pebbles']
+ *
+ * _.words('fred, barney, & pebbles', /[^, ]+/g);
+ * // => ['fred', 'barney', '&', 'pebbles']
+ */
+function words(string, pattern, guard) {
+ string = toString(string);
+ pattern = guard ? undefined : pattern;
+
+ if (pattern === undefined) {
+ return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
+ }
+ return string.match(pattern) || [];
+}
+
+module.exports = words;
diff --git a/tools/node_modules/eslint/node_modules/lodash/wrap.js b/tools/node_modules/eslint/node_modules/lodash/wrap.js
new file mode 100644
index 0000000000..cad3c501d8
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/wrap.js
@@ -0,0 +1,30 @@
+var castFunction = require('./_castFunction'),
+ partial = require('./partial');
+
+/**
+ * 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 '<p>' + func(text) + '</p>';
+ * });
+ *
+ * p('fred, barney, & pebbles');
+ * // => '<p>fred, barney, &amp; pebbles</p>'
+ */
+function wrap(value, wrapper) {
+ return partial(castFunction(wrapper), value);
+}
+
+module.exports = wrap;
diff --git a/tools/node_modules/eslint/node_modules/lodash/wrapperAt.js b/tools/node_modules/eslint/node_modules/lodash/wrapperAt.js
new file mode 100644
index 0000000000..6f6a1d0806
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/wrapperAt.js
@@ -0,0 +1,48 @@
+var LazyWrapper = require('./_LazyWrapper'),
+ LodashWrapper = require('./_LodashWrapper'),
+ baseAt = require('./_baseAt'),
+ flatRest = require('./_flatRest'),
+ isIndex = require('./_isIndex'),
+ thru = require('./thru');
+
+/**
+ * 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;
+ });
+});
+
+module.exports = wrapperAt;
diff --git a/tools/node_modules/eslint/node_modules/lodash/wrapperChain.js b/tools/node_modules/eslint/node_modules/lodash/wrapperChain.js
new file mode 100644
index 0000000000..bda2ce69c9
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/wrapperChain.js
@@ -0,0 +1,34 @@
+var chain = require('./chain');
+
+/**
+ * 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);
+}
+
+module.exports = wrapperChain;
diff --git a/tools/node_modules/eslint/node_modules/lodash/wrapperLodash.js b/tools/node_modules/eslint/node_modules/lodash/wrapperLodash.js
new file mode 100644
index 0000000000..bd6e8ad9ab
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/wrapperLodash.js
@@ -0,0 +1,147 @@
+var LazyWrapper = require('./_LazyWrapper'),
+ LodashWrapper = require('./_LodashWrapper'),
+ baseLodash = require('./_baseLodash'),
+ isArray = require('./isArray'),
+ isObjectLike = require('./isObjectLike'),
+ wrapperClone = require('./_wrapperClone');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * 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);
+}
+
+// Ensure wrappers are instances of `baseLodash`.
+lodash.prototype = baseLodash.prototype;
+lodash.prototype.constructor = lodash;
+
+module.exports = lodash;
diff --git a/tools/node_modules/eslint/node_modules/lodash/wrapperReverse.js b/tools/node_modules/eslint/node_modules/lodash/wrapperReverse.js
new file mode 100644
index 0000000000..e93112a21a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/wrapperReverse.js
@@ -0,0 +1,44 @@
+var LazyWrapper = require('./_LazyWrapper'),
+ LodashWrapper = require('./_LodashWrapper'),
+ reverse = require('./reverse'),
+ thru = require('./thru');
+
+/**
+ * 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);
+}
+
+module.exports = wrapperReverse;
diff --git a/tools/node_modules/eslint/node_modules/lodash/wrapperValue.js b/tools/node_modules/eslint/node_modules/lodash/wrapperValue.js
new file mode 100644
index 0000000000..f56c2daded
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/wrapperValue.js
@@ -0,0 +1,21 @@
+var baseWrapperValue = require('./_baseWrapperValue');
+
+/**
+ * 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__);
+}
+
+module.exports = wrapperValue;
diff --git a/tools/node_modules/eslint/node_modules/lodash/xor.js b/tools/node_modules/eslint/node_modules/lodash/xor.js
new file mode 100644
index 0000000000..d4d286045f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/xor.js
@@ -0,0 +1,28 @@
+var arrayFilter = require('./_arrayFilter'),
+ baseRest = require('./_baseRest'),
+ baseXor = require('./_baseXor'),
+ isArrayLikeObject = require('./isArrayLikeObject');
+
+/**
+ * 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));
+});
+
+module.exports = xor;
diff --git a/tools/node_modules/eslint/node_modules/lodash/xorBy.js b/tools/node_modules/eslint/node_modules/lodash/xorBy.js
new file mode 100644
index 0000000000..e0478950c6
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/xorBy.js
@@ -0,0 +1,39 @@
+var arrayFilter = require('./_arrayFilter'),
+ baseIteratee = require('./_baseIteratee'),
+ baseRest = require('./_baseRest'),
+ baseXor = require('./_baseXor'),
+ isArrayLikeObject = require('./isArrayLikeObject'),
+ last = require('./last');
+
+/**
+ * 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), baseIteratee(iteratee, 2));
+});
+
+module.exports = xorBy;
diff --git a/tools/node_modules/eslint/node_modules/lodash/xorWith.js b/tools/node_modules/eslint/node_modules/lodash/xorWith.js
new file mode 100644
index 0000000000..e3a8ac67fe
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/xorWith.js
@@ -0,0 +1,34 @@
+var arrayFilter = require('./_arrayFilter'),
+ baseRest = require('./_baseRest'),
+ baseXor = require('./_baseXor'),
+ isArrayLikeObject = require('./isArrayLikeObject'),
+ last = require('./last');
+
+/**
+ * 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);
+});
+
+module.exports = xorWith;
diff --git a/tools/node_modules/eslint/node_modules/lodash/zip.js b/tools/node_modules/eslint/node_modules/lodash/zip.js
new file mode 100644
index 0000000000..c800ab3d10
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/zip.js
@@ -0,0 +1,22 @@
+var baseRest = require('./_baseRest'),
+ unzip = require('./unzip');
+
+/**
+ * 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);
+
+module.exports = zip;
diff --git a/tools/node_modules/eslint/node_modules/lodash/zipObject.js b/tools/node_modules/eslint/node_modules/lodash/zipObject.js
new file mode 100644
index 0000000000..23fdf1417d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/zipObject.js
@@ -0,0 +1,24 @@
+var assignValue = require('./_assignValue'),
+ baseZipObject = require('./_baseZipObject');
+
+/**
+ * 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);
+}
+
+module.exports = zipObject;
diff --git a/tools/node_modules/eslint/node_modules/lodash/zipObjectDeep.js b/tools/node_modules/eslint/node_modules/lodash/zipObjectDeep.js
new file mode 100644
index 0000000000..7c858f844f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/zipObjectDeep.js
@@ -0,0 +1,23 @@
+var baseSet = require('./_baseSet'),
+ baseZipObject = require('./_baseZipObject');
+
+/**
+ * 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);
+}
+
+module.exports = zipObjectDeep;
diff --git a/tools/node_modules/eslint/node_modules/lodash/zipWith.js b/tools/node_modules/eslint/node_modules/lodash/zipWith.js
new file mode 100644
index 0000000000..d7a1f91971
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lodash/zipWith.js
@@ -0,0 +1,32 @@
+var baseRest = require('./_baseRest'),
+ unzipWith = require('./unzipWith');
+
+/**
+ * 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);
+});
+
+module.exports = zipWith;
diff --git a/tools/node_modules/eslint/node_modules/lru-cache/LICENSE b/tools/node_modules/eslint/node_modules/lru-cache/LICENSE
new file mode 100644
index 0000000000..19129e315f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lru-cache/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/tools/node_modules/eslint/node_modules/lru-cache/README.md b/tools/node_modules/eslint/node_modules/lru-cache/README.md
new file mode 100644
index 0000000000..f646c1cb8e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lru-cache/README.md
@@ -0,0 +1,152 @@
+# lru cache
+
+A cache object that deletes the least-recently-used items.
+
+[![Build Status](https://travis-ci.org/isaacs/node-lru-cache.svg?branch=master)](https://travis-ci.org/isaacs/node-lru-cache) [![Coverage Status](https://coveralls.io/repos/isaacs/node-lru-cache/badge.svg?service=github)](https://coveralls.io/github/isaacs/node-lru-cache)
+
+## Installation:
+
+```javascript
+npm install lru-cache --save
+```
+
+## Usage:
+
+```javascript
+var LRU = require("lru-cache")
+ , options = { max: 500
+ , length: function (n, key) { return n * 2 + key.length }
+ , dispose: function (key, n) { n.close() }
+ , maxAge: 1000 * 60 * 60 }
+ , cache = LRU(options)
+ , otherCache = LRU(50) // sets just the max size
+
+cache.set("key", "value")
+cache.get("key") // "value"
+
+// non-string keys ARE fully supported
+var someObject = {}
+cache.set(someObject, 'a value')
+cache.set('[object Object]', 'a different value')
+assert.equal(cache.get(someObject), 'a value')
+
+cache.reset() // empty the cache
+```
+
+If you put more stuff in it, then items will fall out.
+
+If you try to put an oversized thing in it, then it'll fall out right
+away.
+
+## Options
+
+* `max` The maximum size of the cache, checked by applying the length
+ function to all values in the cache. Not setting this is kind of
+ silly, since that's the whole purpose of this lib, but it defaults
+ to `Infinity`.
+* `maxAge` Maximum age in ms. Items are not pro-actively pruned out
+ as they age, but if you try to get an item that is too old, it'll
+ drop it and return undefined instead of giving it to you.
+* `length` Function that is used to calculate the length of stored
+ items. If you're storing strings or buffers, then you probably want
+ to do something like `function(n, key){return n.length}`. The default is
+ `function(){return 1}`, which is fine if you want to store `max`
+ like-sized things. The item is passed as the first argument, and
+ the key is passed as the second argumnet.
+* `dispose` Function that is called on items when they are dropped
+ from the cache. This can be handy if you want to close file
+ descriptors or do other cleanup tasks when items are no longer
+ accessible. Called with `key, value`. It's called *before*
+ actually removing the item from the internal cache, so if you want
+ to immediately put it back in, you'll have to do that in a
+ `nextTick` or `setTimeout` callback or it won't do anything.
+* `stale` By default, if you set a `maxAge`, it'll only actually pull
+ stale items out of the cache when you `get(key)`. (That is, it's
+ not pre-emptively doing a `setTimeout` or anything.) If you set
+ `stale:true`, it'll return the stale value before deleting it. If
+ you don't set this, then it'll return `undefined` when you try to
+ get a stale entry, as if it had already been deleted.
+* `noDisposeOnSet` By default, if you set a `dispose()` method, then
+ it'll be called whenever a `set()` operation overwrites an existing
+ key. If you set this option, `dispose()` will only be called when a
+ key falls out of the cache, not when it is overwritten.
+
+## API
+
+* `set(key, value, maxAge)`
+* `get(key) => value`
+
+ Both of these will update the "recently used"-ness of the key.
+ They do what you think. `maxAge` is optional and overrides the
+ cache `maxAge` option if provided.
+
+ If the key is not found, `get()` will return `undefined`.
+
+ The key and val can be any value.
+
+* `peek(key)`
+
+ Returns the key value (or `undefined` if not found) without
+ updating the "recently used"-ness of the key.
+
+ (If you find yourself using this a lot, you *might* be using the
+ wrong sort of data structure, but there are some use cases where
+ it's handy.)
+
+* `del(key)`
+
+ Deletes a key out of the cache.
+
+* `reset()`
+
+ Clear the cache entirely, throwing away all values.
+
+* `has(key)`
+
+ Check if a key is in the cache, without updating the recent-ness
+ or deleting it for being stale.
+
+* `forEach(function(value,key,cache), [thisp])`
+
+ Just like `Array.prototype.forEach`. Iterates over all the keys
+ in the cache, in order of recent-ness. (Ie, more recently used
+ items are iterated over first.)
+
+* `rforEach(function(value,key,cache), [thisp])`
+
+ The same as `cache.forEach(...)` but items are iterated over in
+ reverse order. (ie, less recently used items are iterated over
+ first.)
+
+* `keys()`
+
+ Return an array of the keys in the cache.
+
+* `values()`
+
+ Return an array of the values in the cache.
+
+* `length`
+
+ Return total length of objects in cache taking into account
+ `length` options function.
+
+* `itemCount`
+
+ Return total quantity of objects currently in cache. Note, that
+ `stale` (see options) items are returned as part of this item
+ count.
+
+* `dump()`
+
+ Return an array of the cache entries ready for serialization and usage
+ with 'destinationCache.load(arr)`.
+
+* `load(cacheEntriesArray)`
+
+ Loads another cache entries array, obtained with `sourceCache.dump()`,
+ into the cache. The destination cache is reset before loading new entries
+
+* `prune()`
+
+ Manually iterates over the entire cache proactively pruning old entries
diff --git a/tools/node_modules/eslint/node_modules/lru-cache/index.js b/tools/node_modules/eslint/node_modules/lru-cache/index.js
new file mode 100644
index 0000000000..460462aadc
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lru-cache/index.js
@@ -0,0 +1,467 @@
+'use strict'
+
+module.exports = LRUCache
+
+// This will be a proper iterable 'Map' in engines that support it,
+// or a fakey-fake PseudoMap in older versions.
+var Map = require('pseudomap')
+var util = require('util')
+
+// A linked list to keep track of recently-used-ness
+var Yallist = require('yallist')
+
+// use symbols if possible, otherwise just _props
+var hasSymbol = typeof Symbol === 'function'
+var makeSymbol
+if (hasSymbol) {
+ makeSymbol = function (key) {
+ return Symbol.for(key)
+ }
+} else {
+ makeSymbol = function (key) {
+ return '_' + key
+ }
+}
+
+var MAX = makeSymbol('max')
+var LENGTH = makeSymbol('length')
+var LENGTH_CALCULATOR = makeSymbol('lengthCalculator')
+var ALLOW_STALE = makeSymbol('allowStale')
+var MAX_AGE = makeSymbol('maxAge')
+var DISPOSE = makeSymbol('dispose')
+var NO_DISPOSE_ON_SET = makeSymbol('noDisposeOnSet')
+var LRU_LIST = makeSymbol('lruList')
+var CACHE = makeSymbol('cache')
+
+function naiveLength () { return 1 }
+
+// lruList is a yallist where the head is the youngest
+// item, and the tail is the oldest. the list contains the Hit
+// objects as the entries.
+// Each Hit object has a reference to its Yallist.Node. This
+// never changes.
+//
+// cache is a Map (or PseudoMap) that matches the keys to
+// the Yallist.Node object.
+function LRUCache (options) {
+ if (!(this instanceof LRUCache)) {
+ return new LRUCache(options)
+ }
+
+ if (typeof options === 'number') {
+ options = { max: options }
+ }
+
+ if (!options) {
+ options = {}
+ }
+
+ var max = this[MAX] = options.max
+ // Kind of weird to have a default max of Infinity, but oh well.
+ if (!max ||
+ !(typeof max === 'number') ||
+ max <= 0) {
+ this[MAX] = Infinity
+ }
+
+ var lc = options.length || naiveLength
+ if (typeof lc !== 'function') {
+ lc = naiveLength
+ }
+ this[LENGTH_CALCULATOR] = lc
+
+ this[ALLOW_STALE] = options.stale || false
+ this[MAX_AGE] = options.maxAge || 0
+ this[DISPOSE] = options.dispose
+ this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false
+ this.reset()
+}
+
+// resize the cache when the max changes.
+Object.defineProperty(LRUCache.prototype, 'max', {
+ set: function (mL) {
+ if (!mL || !(typeof mL === 'number') || mL <= 0) {
+ mL = Infinity
+ }
+ this[MAX] = mL
+ trim(this)
+ },
+ get: function () {
+ return this[MAX]
+ },
+ enumerable: true
+})
+
+Object.defineProperty(LRUCache.prototype, 'allowStale', {
+ set: function (allowStale) {
+ this[ALLOW_STALE] = !!allowStale
+ },
+ get: function () {
+ return this[ALLOW_STALE]
+ },
+ enumerable: true
+})
+
+Object.defineProperty(LRUCache.prototype, 'maxAge', {
+ set: function (mA) {
+ if (!mA || !(typeof mA === 'number') || mA < 0) {
+ mA = 0
+ }
+ this[MAX_AGE] = mA
+ trim(this)
+ },
+ get: function () {
+ return this[MAX_AGE]
+ },
+ enumerable: true
+})
+
+// resize the cache when the lengthCalculator changes.
+Object.defineProperty(LRUCache.prototype, 'lengthCalculator', {
+ set: function (lC) {
+ if (typeof lC !== 'function') {
+ lC = naiveLength
+ }
+ if (lC !== this[LENGTH_CALCULATOR]) {
+ this[LENGTH_CALCULATOR] = lC
+ this[LENGTH] = 0
+ this[LRU_LIST].forEach(function (hit) {
+ hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key)
+ this[LENGTH] += hit.length
+ }, this)
+ }
+ trim(this)
+ },
+ get: function () { return this[LENGTH_CALCULATOR] },
+ enumerable: true
+})
+
+Object.defineProperty(LRUCache.prototype, 'length', {
+ get: function () { return this[LENGTH] },
+ enumerable: true
+})
+
+Object.defineProperty(LRUCache.prototype, 'itemCount', {
+ get: function () { return this[LRU_LIST].length },
+ enumerable: true
+})
+
+LRUCache.prototype.rforEach = function (fn, thisp) {
+ thisp = thisp || this
+ for (var walker = this[LRU_LIST].tail; walker !== null;) {
+ var prev = walker.prev
+ forEachStep(this, fn, walker, thisp)
+ walker = prev
+ }
+}
+
+function forEachStep (self, fn, node, thisp) {
+ var hit = node.value
+ if (isStale(self, hit)) {
+ del(self, node)
+ if (!self[ALLOW_STALE]) {
+ hit = undefined
+ }
+ }
+ if (hit) {
+ fn.call(thisp, hit.value, hit.key, self)
+ }
+}
+
+LRUCache.prototype.forEach = function (fn, thisp) {
+ thisp = thisp || this
+ for (var walker = this[LRU_LIST].head; walker !== null;) {
+ var next = walker.next
+ forEachStep(this, fn, walker, thisp)
+ walker = next
+ }
+}
+
+LRUCache.prototype.keys = function () {
+ return this[LRU_LIST].toArray().map(function (k) {
+ return k.key
+ }, this)
+}
+
+LRUCache.prototype.values = function () {
+ return this[LRU_LIST].toArray().map(function (k) {
+ return k.value
+ }, this)
+}
+
+LRUCache.prototype.reset = function () {
+ if (this[DISPOSE] &&
+ this[LRU_LIST] &&
+ this[LRU_LIST].length) {
+ this[LRU_LIST].forEach(function (hit) {
+ this[DISPOSE](hit.key, hit.value)
+ }, this)
+ }
+
+ this[CACHE] = new Map() // hash of items by key
+ this[LRU_LIST] = new Yallist() // list of items in order of use recency
+ this[LENGTH] = 0 // length of items in the list
+}
+
+LRUCache.prototype.dump = function () {
+ return this[LRU_LIST].map(function (hit) {
+ if (!isStale(this, hit)) {
+ return {
+ k: hit.key,
+ v: hit.value,
+ e: hit.now + (hit.maxAge || 0)
+ }
+ }
+ }, this).toArray().filter(function (h) {
+ return h
+ })
+}
+
+LRUCache.prototype.dumpLru = function () {
+ return this[LRU_LIST]
+}
+
+LRUCache.prototype.inspect = function (n, opts) {
+ var str = 'LRUCache {'
+ var extras = false
+
+ var as = this[ALLOW_STALE]
+ if (as) {
+ str += '\n allowStale: true'
+ extras = true
+ }
+
+ var max = this[MAX]
+ if (max && max !== Infinity) {
+ if (extras) {
+ str += ','
+ }
+ str += '\n max: ' + util.inspect(max, opts)
+ extras = true
+ }
+
+ var maxAge = this[MAX_AGE]
+ if (maxAge) {
+ if (extras) {
+ str += ','
+ }
+ str += '\n maxAge: ' + util.inspect(maxAge, opts)
+ extras = true
+ }
+
+ var lc = this[LENGTH_CALCULATOR]
+ if (lc && lc !== naiveLength) {
+ if (extras) {
+ str += ','
+ }
+ str += '\n length: ' + util.inspect(this[LENGTH], opts)
+ extras = true
+ }
+
+ var didFirst = false
+ this[LRU_LIST].forEach(function (item) {
+ if (didFirst) {
+ str += ',\n '
+ } else {
+ if (extras) {
+ str += ',\n'
+ }
+ didFirst = true
+ str += '\n '
+ }
+ var key = util.inspect(item.key).split('\n').join('\n ')
+ var val = { value: item.value }
+ if (item.maxAge !== maxAge) {
+ val.maxAge = item.maxAge
+ }
+ if (lc !== naiveLength) {
+ val.length = item.length
+ }
+ if (isStale(this, item)) {
+ val.stale = true
+ }
+
+ val = util.inspect(val, opts).split('\n').join('\n ')
+ str += key + ' => ' + val
+ })
+
+ if (didFirst || extras) {
+ str += '\n'
+ }
+ str += '}'
+
+ return str
+}
+
+LRUCache.prototype.set = function (key, value, maxAge) {
+ maxAge = maxAge || this[MAX_AGE]
+
+ var now = maxAge ? Date.now() : 0
+ var len = this[LENGTH_CALCULATOR](value, key)
+
+ if (this[CACHE].has(key)) {
+ if (len > this[MAX]) {
+ del(this, this[CACHE].get(key))
+ return false
+ }
+
+ var node = this[CACHE].get(key)
+ var item = node.value
+
+ // dispose of the old one before overwriting
+ // split out into 2 ifs for better coverage tracking
+ if (this[DISPOSE]) {
+ if (!this[NO_DISPOSE_ON_SET]) {
+ this[DISPOSE](key, item.value)
+ }
+ }
+
+ item.now = now
+ item.maxAge = maxAge
+ item.value = value
+ this[LENGTH] += len - item.length
+ item.length = len
+ this.get(key)
+ trim(this)
+ return true
+ }
+
+ var hit = new Entry(key, value, len, now, maxAge)
+
+ // oversized objects fall out of cache automatically.
+ if (hit.length > this[MAX]) {
+ if (this[DISPOSE]) {
+ this[DISPOSE](key, value)
+ }
+ return false
+ }
+
+ this[LENGTH] += hit.length
+ this[LRU_LIST].unshift(hit)
+ this[CACHE].set(key, this[LRU_LIST].head)
+ trim(this)
+ return true
+}
+
+LRUCache.prototype.has = function (key) {
+ if (!this[CACHE].has(key)) return false
+ var hit = this[CACHE].get(key).value
+ if (isStale(this, hit)) {
+ return false
+ }
+ return true
+}
+
+LRUCache.prototype.get = function (key) {
+ return get(this, key, true)
+}
+
+LRUCache.prototype.peek = function (key) {
+ return get(this, key, false)
+}
+
+LRUCache.prototype.pop = function () {
+ var node = this[LRU_LIST].tail
+ if (!node) return null
+ del(this, node)
+ return node.value
+}
+
+LRUCache.prototype.del = function (key) {
+ del(this, this[CACHE].get(key))
+}
+
+LRUCache.prototype.load = function (arr) {
+ // reset the cache
+ this.reset()
+
+ var now = Date.now()
+ // A previous serialized cache has the most recent items first
+ for (var l = arr.length - 1; l >= 0; l--) {
+ var hit = arr[l]
+ var expiresAt = hit.e || 0
+ if (expiresAt === 0) {
+ // the item was created without expiration in a non aged cache
+ this.set(hit.k, hit.v)
+ } else {
+ var maxAge = expiresAt - now
+ // dont add already expired items
+ if (maxAge > 0) {
+ this.set(hit.k, hit.v, maxAge)
+ }
+ }
+ }
+}
+
+LRUCache.prototype.prune = function () {
+ var self = this
+ this[CACHE].forEach(function (value, key) {
+ get(self, key, false)
+ })
+}
+
+function get (self, key, doUse) {
+ var node = self[CACHE].get(key)
+ if (node) {
+ var hit = node.value
+ if (isStale(self, hit)) {
+ del(self, node)
+ if (!self[ALLOW_STALE]) hit = undefined
+ } else {
+ if (doUse) {
+ self[LRU_LIST].unshiftNode(node)
+ }
+ }
+ if (hit) hit = hit.value
+ }
+ return hit
+}
+
+function isStale (self, hit) {
+ if (!hit || (!hit.maxAge && !self[MAX_AGE])) {
+ return false
+ }
+ var stale = false
+ var diff = Date.now() - hit.now
+ if (hit.maxAge) {
+ stale = diff > hit.maxAge
+ } else {
+ stale = self[MAX_AGE] && (diff > self[MAX_AGE])
+ }
+ return stale
+}
+
+function trim (self) {
+ if (self[LENGTH] > self[MAX]) {
+ for (var walker = self[LRU_LIST].tail;
+ self[LENGTH] > self[MAX] && walker !== null;) {
+ // We know that we're about to delete this one, and also
+ // what the next least recently used key will be, so just
+ // go ahead and set it now.
+ var prev = walker.prev
+ del(self, walker)
+ walker = prev
+ }
+ }
+}
+
+function del (self, node) {
+ if (node) {
+ var hit = node.value
+ if (self[DISPOSE]) {
+ self[DISPOSE](hit.key, hit.value)
+ }
+ self[LENGTH] -= hit.length
+ self[CACHE].delete(hit.key)
+ self[LRU_LIST].removeNode(node)
+ }
+}
+
+// classy, since V8 prefers predictable objects.
+function Entry (key, value, length, now, maxAge) {
+ this.key = key
+ this.value = value
+ this.length = length
+ this.now = now
+ this.maxAge = maxAge || 0
+}
diff --git a/tools/node_modules/eslint/node_modules/lru-cache/package.json b/tools/node_modules/eslint/node_modules/lru-cache/package.json
new file mode 100644
index 0000000000..96b8583501
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/lru-cache/package.json
@@ -0,0 +1,68 @@
+{
+ "_from": "lru-cache@^4.0.1",
+ "_id": "lru-cache@4.1.1",
+ "_inBundle": false,
+ "_integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==",
+ "_location": "/eslint/lru-cache",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "lru-cache@^4.0.1",
+ "name": "lru-cache",
+ "escapedName": "lru-cache",
+ "rawSpec": "^4.0.1",
+ "saveSpec": null,
+ "fetchSpec": "^4.0.1"
+ },
+ "_requiredBy": [
+ "/eslint/cross-spawn"
+ ],
+ "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz",
+ "_shasum": "622e32e82488b49279114a4f9ecf45e7cd6bba55",
+ "_spec": "lru-cache@^4.0.1",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/cross-spawn",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me"
+ },
+ "bugs": {
+ "url": "https://github.com/isaacs/node-lru-cache/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "pseudomap": "^1.0.2",
+ "yallist": "^2.1.2"
+ },
+ "deprecated": false,
+ "description": "A cache object that deletes the least-recently-used items.",
+ "devDependencies": {
+ "benchmark": "^2.1.4",
+ "standard": "^5.4.1",
+ "tap": "^10.3.3"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/isaacs/node-lru-cache#readme",
+ "keywords": [
+ "mru",
+ "lru",
+ "cache"
+ ],
+ "license": "ISC",
+ "main": "index.js",
+ "name": "lru-cache",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/node-lru-cache.git"
+ },
+ "scripts": {
+ "postpublish": "git push origin --all; git push origin --tags",
+ "posttest": "standard test/*.js index.js",
+ "postversion": "npm publish",
+ "preversion": "npm test",
+ "test": "tap test/*.js --100 -J"
+ },
+ "version": "4.1.1"
+}
diff --git a/tools/node_modules/eslint/node_modules/markdown-escapes/LICENSE b/tools/node_modules/eslint/node_modules/markdown-escapes/LICENSE
new file mode 100644
index 0000000000..8d8660d36e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/markdown-escapes/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2016 Titus Wormer <tituswormer@gmail.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/tools/node_modules/eslint/node_modules/markdown-escapes/index.js b/tools/node_modules/eslint/node_modules/markdown-escapes/index.js
new file mode 100644
index 0000000000..9e5b7739f9
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/markdown-escapes/index.js
@@ -0,0 +1,57 @@
+'use strict';
+
+module.exports = escapes;
+
+var defaults = [
+ '\\',
+ '`',
+ '*',
+ '{',
+ '}',
+ '[',
+ ']',
+ '(',
+ ')',
+ '#',
+ '+',
+ '-',
+ '.',
+ '!',
+ '_',
+ '>'
+];
+
+var gfm = defaults.concat(['~', '|']);
+
+var commonmark = gfm.concat([
+ '\n',
+ '"',
+ '$',
+ '%',
+ '&',
+ '\'',
+ ',',
+ '/',
+ ':',
+ ';',
+ '<',
+ '=',
+ '?',
+ '@',
+ '^'
+]);
+
+escapes.default = defaults;
+escapes.gfm = gfm;
+escapes.commonmark = commonmark;
+
+/* Get markdown escapes. */
+function escapes(options) {
+ var settings = options || {};
+
+ if (settings.commonmark) {
+ return commonmark;
+ }
+
+ return settings.gfm ? gfm : defaults;
+}
diff --git a/tools/node_modules/eslint/node_modules/markdown-escapes/package.json b/tools/node_modules/eslint/node_modules/markdown-escapes/package.json
new file mode 100644
index 0000000000..5766c64e69
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/markdown-escapes/package.json
@@ -0,0 +1,99 @@
+{
+ "_from": "markdown-escapes@^1.0.0",
+ "_id": "markdown-escapes@1.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-GZTfLTr0gR3lmmcUk0wrIpJzRRg=",
+ "_location": "/markdown-escapes",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "markdown-escapes@^1.0.0",
+ "name": "markdown-escapes",
+ "escapedName": "markdown-escapes",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/remark-parse"
+ ],
+ "_resolved": "https://registry.npmjs.org/markdown-escapes/-/markdown-escapes-1.0.1.tgz",
+ "_shasum": "1994df2d3af4811de59a6714934c2b2292734518",
+ "_spec": "markdown-escapes@^1.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/remark-parse",
+ "author": {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ },
+ "bugs": {
+ "url": "https://github.com/wooorm/markdown-escapes/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ }
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "List of escapable characters in markdown",
+ "devDependencies": {
+ "browserify": "^14.1.0",
+ "esmangle": "^1.0.1",
+ "nyc": "^11.0.0",
+ "remark-cli": "^3.0.0",
+ "remark-preset-wooorm": "^3.0.0",
+ "tape": "^4.0.0",
+ "xo": "^0.18.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/wooorm/markdown-escapes#readme",
+ "keywords": [
+ "markdown",
+ "escape",
+ "pedantic",
+ "gfm",
+ "commonmark"
+ ],
+ "license": "MIT",
+ "name": "markdown-escapes",
+ "nyc": {
+ "check-coverage": true,
+ "lines": 100,
+ "functions": 100,
+ "branches": 100
+ },
+ "remarkConfig": {
+ "plugins": [
+ "preset-wooorm"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/wooorm/markdown-escapes.git"
+ },
+ "scripts": {
+ "build": "npm run build-md && npm run build-bundle && npm run build-mangle",
+ "build-bundle": "browserify index.js --bare -s markdownEscapes > markdown-escapes.js",
+ "build-mangle": "esmangle < markdown-escapes.js > markdown-escapes.min.js",
+ "build-md": "remark . -qfo",
+ "lint": "xo",
+ "test": "npm run build && npm run lint && npm run test-coverage",
+ "test-api": "node test",
+ "test-coverage": "nyc --reporter lcov tape test.js"
+ },
+ "version": "1.0.1",
+ "xo": {
+ "space": true,
+ "esnext": false,
+ "ignores": [
+ "markdown-escapes.js"
+ ]
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/markdown-escapes/readme.md b/tools/node_modules/eslint/node_modules/markdown-escapes/readme.md
new file mode 100644
index 0000000000..2f01806a34
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/markdown-escapes/readme.md
@@ -0,0 +1,67 @@
+# markdown-escapes [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov]
+
+List of escapable characters in markdown.
+
+## Installation
+
+[npm][]:
+
+```bash
+npm install markdown-escapes
+```
+
+## Usage
+
+```javascript
+var escapes = require('markdown-escapes');
+
+// Access by property:
+escapes.commonmark; //=> ['\\', '`', ..., '@', '^']
+
+// Access by options object:
+escapes({gfm: true}); //=> ['\\', '`', ..., '~', '|']
+```
+
+## API
+
+### `escapes([options])`
+
+Get escapes. Supports `options.commonmark` and `options.gfm`, which
+when `true` returns the extra escape characters supported by those
+flavours.
+
+###### Returns
+
+`Array.<string>`.
+
+### `escapes.default`
+
+List of default escapable characters.
+
+### `escapes.gfm`
+
+List of escapable characters in GFM (which includes all `default`s).
+
+### `escapes.commonmark`
+
+List of escapable characters in CommonMark (which includes all `gfm`s).
+
+## License
+
+[MIT][license] © [Titus Wormer][author]
+
+<!-- Definitions -->
+
+[travis-badge]: https://img.shields.io/travis/wooorm/markdown-escapes.svg
+
+[travis]: https://travis-ci.org/wooorm/markdown-escapes
+
+[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/markdown-escapes.svg
+
+[codecov]: https://codecov.io/github/wooorm/markdown-escapes
+
+[npm]: https://docs.npmjs.com/cli/install
+
+[license]: LICENSE
+
+[author]: http://wooorm.com
diff --git a/tools/node_modules/eslint/node_modules/mimic-fn/index.js b/tools/node_modules/eslint/node_modules/mimic-fn/index.js
new file mode 100644
index 0000000000..9bf1763673
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/mimic-fn/index.js
@@ -0,0 +1,7 @@
+'use strict';
+module.exports = (to, from) => {
+ // TODO: use `Reflect.ownKeys()` when targeting Node.js 6
+ for (const prop of Object.getOwnPropertyNames(from).concat(Object.getOwnPropertySymbols(from))) {
+ Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));
+ }
+};
diff --git a/tools/node_modules/eslint/node_modules/mimic-fn/license b/tools/node_modules/eslint/node_modules/mimic-fn/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/mimic-fn/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/tools/node_modules/eslint/node_modules/mimic-fn/package.json b/tools/node_modules/eslint/node_modules/mimic-fn/package.json
new file mode 100644
index 0000000000..64b23d9795
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/mimic-fn/package.json
@@ -0,0 +1,75 @@
+{
+ "_from": "mimic-fn@^1.0.0",
+ "_id": "mimic-fn@1.1.0",
+ "_inBundle": false,
+ "_integrity": "sha1-5md4PZLonb00KBi1IwudYqZyrRg=",
+ "_location": "/eslint/mimic-fn",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "mimic-fn@^1.0.0",
+ "name": "mimic-fn",
+ "escapedName": "mimic-fn",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/eslint/onetime"
+ ],
+ "_resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.1.0.tgz",
+ "_shasum": "e667783d92e89dbd342818b5230b9d62a672ad18",
+ "_spec": "mimic-fn@^1.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/onetime",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/mimic-fn/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Make a function mimic another one",
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/mimic-fn#readme",
+ "keywords": [
+ "function",
+ "mimic",
+ "imitate",
+ "rename",
+ "copy",
+ "inherit",
+ "properties",
+ "name",
+ "func",
+ "fn",
+ "set",
+ "infer",
+ "change"
+ ],
+ "license": "MIT",
+ "name": "mimic-fn",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/mimic-fn.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "1.1.0",
+ "xo": {
+ "esnext": true
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/mimic-fn/readme.md b/tools/node_modules/eslint/node_modules/mimic-fn/readme.md
new file mode 100644
index 0000000000..672c79eb3a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/mimic-fn/readme.md
@@ -0,0 +1,66 @@
+# mimic-fn [![Build Status](https://travis-ci.org/sindresorhus/mimic-fn.svg?branch=master)](https://travis-ci.org/sindresorhus/mimic-fn)
+
+> Make a function mimic another one
+
+Useful when you wrap a function in another function and like to preserve the original name and other properties.
+
+
+## Install
+
+```
+$ npm install --save mimic-fn
+```
+
+
+## Usage
+
+```js
+const mimicFn = require('mimic-fn');
+
+function foo() {}
+foo.unicorn = '🦄';
+
+function wrapper() {
+ return foo() {};
+}
+
+console.log(wrapper.name);
+//=> 'wrapper'
+
+mimicFn(wrapper, foo);
+
+console.log(wrapper.name);
+//=> 'foo'
+
+console.log(wrapper.unicorn);
+//=> '🦄'
+```
+
+
+## API
+
+It will copy over the properties `name`, `length`, `displayName`, and any custom properties you may have set.
+
+### mimicFn(to, from)
+
+#### to
+
+Type: `Function`
+
+Mimicking function.
+
+#### from
+
+Type: `Function`
+
+Function to mimic.
+
+
+## Related
+
+- [rename-fn](https://github.com/sindresorhus/rename-fn) - Rename a function
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/tools/node_modules/eslint/node_modules/minimatch/LICENSE b/tools/node_modules/eslint/node_modules/minimatch/LICENSE
new file mode 100644
index 0000000000..19129e315f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/minimatch/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/tools/node_modules/eslint/node_modules/minimatch/README.md b/tools/node_modules/eslint/node_modules/minimatch/README.md
new file mode 100644
index 0000000000..ad72b8133e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/minimatch/README.md
@@ -0,0 +1,209 @@
+# minimatch
+
+A minimal matching utility.
+
+[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.svg)](http://travis-ci.org/isaacs/minimatch)
+
+
+This is the matching library used internally by npm.
+
+It works by converting glob expressions into JavaScript `RegExp`
+objects.
+
+## Usage
+
+```javascript
+var minimatch = require("minimatch")
+
+minimatch("bar.foo", "*.foo") // true!
+minimatch("bar.foo", "*.bar") // false!
+minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy!
+```
+
+## Features
+
+Supports these glob features:
+
+* Brace Expansion
+* Extended glob matching
+* "Globstar" `**` matching
+
+See:
+
+* `man sh`
+* `man bash`
+* `man 3 fnmatch`
+* `man 5 gitignore`
+
+## Minimatch Class
+
+Create a minimatch object by instantiating the `minimatch.Minimatch` class.
+
+```javascript
+var Minimatch = require("minimatch").Minimatch
+var mm = new Minimatch(pattern, options)
+```
+
+### Properties
+
+* `pattern` The original pattern the minimatch object represents.
+* `options` The options supplied to the constructor.
+* `set` A 2-dimensional array of regexp or string expressions.
+ Each row in the
+ array corresponds to a brace-expanded pattern. Each item in the row
+ corresponds to a single path-part. For example, the pattern
+ `{a,b/c}/d` would expand to a set of patterns like:
+
+ [ [ a, d ]
+ , [ b, c, d ] ]
+
+ If a portion of the pattern doesn't have any "magic" in it
+ (that is, it's something like `"foo"` rather than `fo*o?`), then it
+ will be left as a string rather than converted to a regular
+ expression.
+
+* `regexp` Created by the `makeRe` method. A single regular expression
+ expressing the entire pattern. This is useful in cases where you wish
+ to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.
+* `negate` True if the pattern is negated.
+* `comment` True if the pattern is a comment.
+* `empty` True if the pattern is `""`.
+
+### Methods
+
+* `makeRe` Generate the `regexp` member if necessary, and return it.
+ Will return `false` if the pattern is invalid.
+* `match(fname)` Return true if the filename matches the pattern, or
+ false otherwise.
+* `matchOne(fileArray, patternArray, partial)` Take a `/`-split
+ filename, and match it against a single row in the `regExpSet`. This
+ method is mainly for internal use, but is exposed so that it can be
+ used by a glob-walker that needs to avoid excessive filesystem calls.
+
+All other methods are internal, and will be called as necessary.
+
+### minimatch(path, pattern, options)
+
+Main export. Tests a path against the pattern using the options.
+
+```javascript
+var isJS = minimatch(file, "*.js", { matchBase: true })
+```
+
+### minimatch.filter(pattern, options)
+
+Returns a function that tests its
+supplied argument, suitable for use with `Array.filter`. Example:
+
+```javascript
+var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true}))
+```
+
+### minimatch.match(list, pattern, options)
+
+Match against the list of
+files, in the style of fnmatch or glob. If nothing is matched, and
+options.nonull is set, then return a list containing the pattern itself.
+
+```javascript
+var javascripts = minimatch.match(fileList, "*.js", {matchBase: true}))
+```
+
+### minimatch.makeRe(pattern, options)
+
+Make a regular expression object from the pattern.
+
+## Options
+
+All options are `false` by default.
+
+### debug
+
+Dump a ton of stuff to stderr.
+
+### nobrace
+
+Do not expand `{a,b}` and `{1..3}` brace sets.
+
+### noglobstar
+
+Disable `**` matching against multiple folder names.
+
+### dot
+
+Allow patterns to match filenames starting with a period, even if
+the pattern does not explicitly have a period in that spot.
+
+Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`
+is set.
+
+### noext
+
+Disable "extglob" style patterns like `+(a|b)`.
+
+### nocase
+
+Perform a case-insensitive match.
+
+### nonull
+
+When a match is not found by `minimatch.match`, return a list containing
+the pattern itself if this option is set. When not set, an empty list
+is returned if there are no matches.
+
+### matchBase
+
+If set, then patterns without slashes will be matched
+against the basename of the path if it contains slashes. For example,
+`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.
+
+### nocomment
+
+Suppress the behavior of treating `#` at the start of a pattern as a
+comment.
+
+### nonegate
+
+Suppress the behavior of treating a leading `!` character as negation.
+
+### flipNegate
+
+Returns from negate expressions the same as if they were not negated.
+(Ie, true on a hit, false on a miss.)
+
+
+## Comparisons to other fnmatch/glob implementations
+
+While strict compliance with the existing standards is a worthwhile
+goal, some discrepancies exist between minimatch and other
+implementations, and are intentional.
+
+If the pattern starts with a `!` character, then it is negated. Set the
+`nonegate` flag to suppress this behavior, and treat leading `!`
+characters normally. This is perhaps relevant if you wish to start the
+pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`
+characters at the start of a pattern will negate the pattern multiple
+times.
+
+If a pattern starts with `#`, then it is treated as a comment, and
+will not match anything. Use `\#` to match a literal `#` at the
+start of a line, or set the `nocomment` flag to suppress this behavior.
+
+The double-star character `**` is supported by default, unless the
+`noglobstar` flag is set. This is supported in the manner of bsdglob
+and bash 4.1, where `**` only has special significance if it is the only
+thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
+`a/**b` will not.
+
+If an escaped pattern has no matches, and the `nonull` flag is set,
+then minimatch.match returns the pattern as-provided, rather than
+interpreting the character escapes. For example,
+`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
+`"*a?"`. This is akin to setting the `nullglob` option in bash, except
+that it does not resolve escaped pattern characters.
+
+If brace expansion is not disabled, then it is performed before any
+other interpretation of the glob pattern. Thus, a pattern like
+`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
+**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
+checked for validity. Since those two are valid, matching proceeds.
diff --git a/tools/node_modules/eslint/node_modules/minimatch/minimatch.js b/tools/node_modules/eslint/node_modules/minimatch/minimatch.js
new file mode 100644
index 0000000000..5b5f8cf444
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/minimatch/minimatch.js
@@ -0,0 +1,923 @@
+module.exports = minimatch
+minimatch.Minimatch = Minimatch
+
+var path = { sep: '/' }
+try {
+ path = require('path')
+} catch (er) {}
+
+var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
+var expand = require('brace-expansion')
+
+var plTypes = {
+ '!': { open: '(?:(?!(?:', close: '))[^/]*?)'},
+ '?': { open: '(?:', close: ')?' },
+ '+': { open: '(?:', close: ')+' },
+ '*': { open: '(?:', close: ')*' },
+ '@': { open: '(?:', close: ')' }
+}
+
+// any single thing other than /
+// don't need to escape / when using new RegExp()
+var qmark = '[^/]'
+
+// * => any number of characters
+var star = qmark + '*?'
+
+// ** when dots are allowed. Anything goes, except .. and .
+// not (^ or / followed by one or two dots followed by $ or /),
+// followed by anything, any number of times.
+var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?'
+
+// not a ^ or / followed by a dot,
+// followed by anything, any number of times.
+var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?'
+
+// characters that need to be escaped in RegExp.
+var reSpecials = charSet('().*{}+?[]^$\\!')
+
+// "abc" -> { a:true, b:true, c:true }
+function charSet (s) {
+ return s.split('').reduce(function (set, c) {
+ set[c] = true
+ return set
+ }, {})
+}
+
+// normalizes slashes.
+var slashSplit = /\/+/
+
+minimatch.filter = filter
+function filter (pattern, options) {
+ options = options || {}
+ return function (p, i, list) {
+ return minimatch(p, pattern, options)
+ }
+}
+
+function ext (a, b) {
+ a = a || {}
+ b = b || {}
+ var t = {}
+ Object.keys(b).forEach(function (k) {
+ t[k] = b[k]
+ })
+ Object.keys(a).forEach(function (k) {
+ t[k] = a[k]
+ })
+ return t
+}
+
+minimatch.defaults = function (def) {
+ if (!def || !Object.keys(def).length) return minimatch
+
+ var orig = minimatch
+
+ var m = function minimatch (p, pattern, options) {
+ return orig.minimatch(p, pattern, ext(def, options))
+ }
+
+ m.Minimatch = function Minimatch (pattern, options) {
+ return new orig.Minimatch(pattern, ext(def, options))
+ }
+
+ return m
+}
+
+Minimatch.defaults = function (def) {
+ if (!def || !Object.keys(def).length) return Minimatch
+ return minimatch.defaults(def).Minimatch
+}
+
+function minimatch (p, pattern, options) {
+ if (typeof pattern !== 'string') {
+ throw new TypeError('glob pattern string required')
+ }
+
+ if (!options) options = {}
+
+ // shortcut: comments match nothing.
+ if (!options.nocomment && pattern.charAt(0) === '#') {
+ return false
+ }
+
+ // "" only matches ""
+ if (pattern.trim() === '') return p === ''
+
+ return new Minimatch(pattern, options).match(p)
+}
+
+function Minimatch (pattern, options) {
+ if (!(this instanceof Minimatch)) {
+ return new Minimatch(pattern, options)
+ }
+
+ if (typeof pattern !== 'string') {
+ throw new TypeError('glob pattern string required')
+ }
+
+ if (!options) options = {}
+ pattern = pattern.trim()
+
+ // windows support: need to use /, not \
+ if (path.sep !== '/') {
+ pattern = pattern.split(path.sep).join('/')
+ }
+
+ this.options = options
+ this.set = []
+ this.pattern = pattern
+ this.regexp = null
+ this.negate = false
+ this.comment = false
+ this.empty = false
+
+ // make the set of regexps etc.
+ this.make()
+}
+
+Minimatch.prototype.debug = function () {}
+
+Minimatch.prototype.make = make
+function make () {
+ // don't do it more than once.
+ if (this._made) return
+
+ var pattern = this.pattern
+ var options = this.options
+
+ // empty patterns and comments match nothing.
+ if (!options.nocomment && pattern.charAt(0) === '#') {
+ this.comment = true
+ return
+ }
+ if (!pattern) {
+ this.empty = true
+ return
+ }
+
+ // step 1: figure out negation, etc.
+ this.parseNegate()
+
+ // step 2: expand braces
+ var set = this.globSet = this.braceExpand()
+
+ if (options.debug) this.debug = console.error
+
+ this.debug(this.pattern, set)
+
+ // step 3: now we have a set, so turn each one into a series of path-portion
+ // matching patterns.
+ // These will be regexps, except in the case of "**", which is
+ // set to the GLOBSTAR object for globstar behavior,
+ // and will not contain any / characters
+ set = this.globParts = set.map(function (s) {
+ return s.split(slashSplit)
+ })
+
+ this.debug(this.pattern, set)
+
+ // glob --> regexps
+ set = set.map(function (s, si, set) {
+ return s.map(this.parse, this)
+ }, this)
+
+ this.debug(this.pattern, set)
+
+ // filter out everything that didn't compile properly.
+ set = set.filter(function (s) {
+ return s.indexOf(false) === -1
+ })
+
+ this.debug(this.pattern, set)
+
+ this.set = set
+}
+
+Minimatch.prototype.parseNegate = parseNegate
+function parseNegate () {
+ var pattern = this.pattern
+ var negate = false
+ var options = this.options
+ var negateOffset = 0
+
+ if (options.nonegate) return
+
+ for (var i = 0, l = pattern.length
+ ; i < l && pattern.charAt(i) === '!'
+ ; i++) {
+ negate = !negate
+ negateOffset++
+ }
+
+ if (negateOffset) this.pattern = pattern.substr(negateOffset)
+ this.negate = negate
+}
+
+// Brace expansion:
+// a{b,c}d -> abd acd
+// a{b,}c -> abc ac
+// a{0..3}d -> a0d a1d a2d a3d
+// a{b,c{d,e}f}g -> abg acdfg acefg
+// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
+//
+// Invalid sets are not expanded.
+// a{2..}b -> a{2..}b
+// a{b}c -> a{b}c
+minimatch.braceExpand = function (pattern, options) {
+ return braceExpand(pattern, options)
+}
+
+Minimatch.prototype.braceExpand = braceExpand
+
+function braceExpand (pattern, options) {
+ if (!options) {
+ if (this instanceof Minimatch) {
+ options = this.options
+ } else {
+ options = {}
+ }
+ }
+
+ pattern = typeof pattern === 'undefined'
+ ? this.pattern : pattern
+
+ if (typeof pattern === 'undefined') {
+ throw new TypeError('undefined pattern')
+ }
+
+ if (options.nobrace ||
+ !pattern.match(/\{.*\}/)) {
+ // shortcut. no need to expand.
+ return [pattern]
+ }
+
+ return expand(pattern)
+}
+
+// parse a component of the expanded set.
+// At this point, no pattern may contain "/" in it
+// so we're going to return a 2d array, where each entry is the full
+// pattern, split on '/', and then turned into a regular expression.
+// A regexp is made at the end which joins each array with an
+// escaped /, and another full one which joins each regexp with |.
+//
+// Following the lead of Bash 4.1, note that "**" only has special meaning
+// when it is the *only* thing in a path portion. Otherwise, any series
+// of * is equivalent to a single *. Globstar behavior is enabled by
+// default, and can be disabled by setting options.noglobstar.
+Minimatch.prototype.parse = parse
+var SUBPARSE = {}
+function parse (pattern, isSub) {
+ if (pattern.length > 1024 * 64) {
+ throw new TypeError('pattern is too long')
+ }
+
+ var options = this.options
+
+ // shortcuts
+ if (!options.noglobstar && pattern === '**') return GLOBSTAR
+ if (pattern === '') return ''
+
+ var re = ''
+ var hasMagic = !!options.nocase
+ var escaping = false
+ // ? => one single character
+ var patternListStack = []
+ var negativeLists = []
+ var stateChar
+ var inClass = false
+ var reClassStart = -1
+ var classStart = -1
+ // . and .. never match anything that doesn't start with .,
+ // even when options.dot is set.
+ var patternStart = pattern.charAt(0) === '.' ? '' // anything
+ // not (start or / followed by . or .. followed by / or end)
+ : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))'
+ : '(?!\\.)'
+ var self = this
+
+ function clearStateChar () {
+ if (stateChar) {
+ // we had some state-tracking character
+ // that wasn't consumed by this pass.
+ switch (stateChar) {
+ case '*':
+ re += star
+ hasMagic = true
+ break
+ case '?':
+ re += qmark
+ hasMagic = true
+ break
+ default:
+ re += '\\' + stateChar
+ break
+ }
+ self.debug('clearStateChar %j %j', stateChar, re)
+ stateChar = false
+ }
+ }
+
+ for (var i = 0, len = pattern.length, c
+ ; (i < len) && (c = pattern.charAt(i))
+ ; i++) {
+ this.debug('%s\t%s %s %j', pattern, i, re, c)
+
+ // skip over any that are escaped.
+ if (escaping && reSpecials[c]) {
+ re += '\\' + c
+ escaping = false
+ continue
+ }
+
+ switch (c) {
+ case '/':
+ // completely not allowed, even escaped.
+ // Should already be path-split by now.
+ return false
+
+ case '\\':
+ clearStateChar()
+ escaping = true
+ continue
+
+ // the various stateChar values
+ // for the "extglob" stuff.
+ case '?':
+ case '*':
+ case '+':
+ case '@':
+ case '!':
+ this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c)
+
+ // all of those are literals inside a class, except that
+ // the glob [!a] means [^a] in regexp
+ if (inClass) {
+ this.debug(' in class')
+ if (c === '!' && i === classStart + 1) c = '^'
+ re += c
+ continue
+ }
+
+ // if we already have a stateChar, then it means
+ // that there was something like ** or +? in there.
+ // Handle the stateChar, then proceed with this one.
+ self.debug('call clearStateChar %j', stateChar)
+ clearStateChar()
+ stateChar = c
+ // if extglob is disabled, then +(asdf|foo) isn't a thing.
+ // just clear the statechar *now*, rather than even diving into
+ // the patternList stuff.
+ if (options.noext) clearStateChar()
+ continue
+
+ case '(':
+ if (inClass) {
+ re += '('
+ continue
+ }
+
+ if (!stateChar) {
+ re += '\\('
+ continue
+ }
+
+ patternListStack.push({
+ type: stateChar,
+ start: i - 1,
+ reStart: re.length,
+ open: plTypes[stateChar].open,
+ close: plTypes[stateChar].close
+ })
+ // negation is (?:(?!js)[^/]*)
+ re += stateChar === '!' ? '(?:(?!(?:' : '(?:'
+ this.debug('plType %j %j', stateChar, re)
+ stateChar = false
+ continue
+
+ case ')':
+ if (inClass || !patternListStack.length) {
+ re += '\\)'
+ continue
+ }
+
+ clearStateChar()
+ hasMagic = true
+ var pl = patternListStack.pop()
+ // negation is (?:(?!js)[^/]*)
+ // The others are (?:<pattern>)<type>
+ re += pl.close
+ if (pl.type === '!') {
+ negativeLists.push(pl)
+ }
+ pl.reEnd = re.length
+ continue
+
+ case '|':
+ if (inClass || !patternListStack.length || escaping) {
+ re += '\\|'
+ escaping = false
+ continue
+ }
+
+ clearStateChar()
+ re += '|'
+ continue
+
+ // these are mostly the same in regexp and glob
+ case '[':
+ // swallow any state-tracking char before the [
+ clearStateChar()
+
+ if (inClass) {
+ re += '\\' + c
+ continue
+ }
+
+ inClass = true
+ classStart = i
+ reClassStart = re.length
+ re += c
+ continue
+
+ case ']':
+ // a right bracket shall lose its special
+ // meaning and represent itself in
+ // a bracket expression if it occurs
+ // first in the list. -- POSIX.2 2.8.3.2
+ if (i === classStart + 1 || !inClass) {
+ re += '\\' + c
+ escaping = false
+ continue
+ }
+
+ // handle the case where we left a class open.
+ // "[z-a]" is valid, equivalent to "\[z-a\]"
+ if (inClass) {
+ // split where the last [ was, make sure we don't have
+ // an invalid re. if so, re-walk the contents of the
+ // would-be class to re-translate any characters that
+ // were passed through as-is
+ // TODO: It would probably be faster to determine this
+ // without a try/catch and a new RegExp, but it's tricky
+ // to do safely. For now, this is safe and works.
+ var cs = pattern.substring(classStart + 1, i)
+ try {
+ RegExp('[' + cs + ']')
+ } catch (er) {
+ // not a valid class!
+ var sp = this.parse(cs, SUBPARSE)
+ re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]'
+ hasMagic = hasMagic || sp[1]
+ inClass = false
+ continue
+ }
+ }
+
+ // finish up the class.
+ hasMagic = true
+ inClass = false
+ re += c
+ continue
+
+ default:
+ // swallow any state char that wasn't consumed
+ clearStateChar()
+
+ if (escaping) {
+ // no need
+ escaping = false
+ } else if (reSpecials[c]
+ && !(c === '^' && inClass)) {
+ re += '\\'
+ }
+
+ re += c
+
+ } // switch
+ } // for
+
+ // handle the case where we left a class open.
+ // "[abc" is valid, equivalent to "\[abc"
+ if (inClass) {
+ // split where the last [ was, and escape it
+ // this is a huge pita. We now have to re-walk
+ // the contents of the would-be class to re-translate
+ // any characters that were passed through as-is
+ cs = pattern.substr(classStart + 1)
+ sp = this.parse(cs, SUBPARSE)
+ re = re.substr(0, reClassStart) + '\\[' + sp[0]
+ hasMagic = hasMagic || sp[1]
+ }
+
+ // handle the case where we had a +( thing at the *end*
+ // of the pattern.
+ // each pattern list stack adds 3 chars, and we need to go through
+ // and escape any | chars that were passed through as-is for the regexp.
+ // Go through and escape them, taking care not to double-escape any
+ // | chars that were already escaped.
+ for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
+ var tail = re.slice(pl.reStart + pl.open.length)
+ this.debug('setting tail', re, pl)
+ // maybe some even number of \, then maybe 1 \, followed by a |
+ tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) {
+ if (!$2) {
+ // the | isn't already escaped, so escape it.
+ $2 = '\\'
+ }
+
+ // need to escape all those slashes *again*, without escaping the
+ // one that we need for escaping the | character. As it works out,
+ // escaping an even number of slashes can be done by simply repeating
+ // it exactly after itself. That's why this trick works.
+ //
+ // I am sorry that you have to see this.
+ return $1 + $1 + $2 + '|'
+ })
+
+ this.debug('tail=%j\n %s', tail, tail, pl, re)
+ var t = pl.type === '*' ? star
+ : pl.type === '?' ? qmark
+ : '\\' + pl.type
+
+ hasMagic = true
+ re = re.slice(0, pl.reStart) + t + '\\(' + tail
+ }
+
+ // handle trailing things that only matter at the very end.
+ clearStateChar()
+ if (escaping) {
+ // trailing \\
+ re += '\\\\'
+ }
+
+ // only need to apply the nodot start if the re starts with
+ // something that could conceivably capture a dot
+ var addPatternStart = false
+ switch (re.charAt(0)) {
+ case '.':
+ case '[':
+ case '(': addPatternStart = true
+ }
+
+ // Hack to work around lack of negative lookbehind in JS
+ // A pattern like: *.!(x).!(y|z) needs to ensure that a name
+ // like 'a.xyz.yz' doesn't match. So, the first negative
+ // lookahead, has to look ALL the way ahead, to the end of
+ // the pattern.
+ for (var n = negativeLists.length - 1; n > -1; n--) {
+ var nl = negativeLists[n]
+
+ var nlBefore = re.slice(0, nl.reStart)
+ var nlFirst = re.slice(nl.reStart, nl.reEnd - 8)
+ var nlLast = re.slice(nl.reEnd - 8, nl.reEnd)
+ var nlAfter = re.slice(nl.reEnd)
+
+ nlLast += nlAfter
+
+ // Handle nested stuff like *(*.js|!(*.json)), where open parens
+ // mean that we should *not* include the ) in the bit that is considered
+ // "after" the negated section.
+ var openParensBefore = nlBefore.split('(').length - 1
+ var cleanAfter = nlAfter
+ for (i = 0; i < openParensBefore; i++) {
+ cleanAfter = cleanAfter.replace(/\)[+*?]?/, '')
+ }
+ nlAfter = cleanAfter
+
+ var dollar = ''
+ if (nlAfter === '' && isSub !== SUBPARSE) {
+ dollar = '$'
+ }
+ var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast
+ re = newRe
+ }
+
+ // if the re is not "" at this point, then we need to make sure
+ // it doesn't match against an empty path part.
+ // Otherwise a/* will match a/, which it should not.
+ if (re !== '' && hasMagic) {
+ re = '(?=.)' + re
+ }
+
+ if (addPatternStart) {
+ re = patternStart + re
+ }
+
+ // parsing just a piece of a larger pattern.
+ if (isSub === SUBPARSE) {
+ return [re, hasMagic]
+ }
+
+ // skip the regexp for non-magical patterns
+ // unescape anything in it, though, so that it'll be
+ // an exact match against a file etc.
+ if (!hasMagic) {
+ return globUnescape(pattern)
+ }
+
+ var flags = options.nocase ? 'i' : ''
+ try {
+ var regExp = new RegExp('^' + re + '$', flags)
+ } catch (er) {
+ // If it was an invalid regular expression, then it can't match
+ // anything. This trick looks for a character after the end of
+ // the string, which is of course impossible, except in multi-line
+ // mode, but it's not a /m regex.
+ return new RegExp('$.')
+ }
+
+ regExp._glob = pattern
+ regExp._src = re
+
+ return regExp
+}
+
+minimatch.makeRe = function (pattern, options) {
+ return new Minimatch(pattern, options || {}).makeRe()
+}
+
+Minimatch.prototype.makeRe = makeRe
+function makeRe () {
+ if (this.regexp || this.regexp === false) return this.regexp
+
+ // at this point, this.set is a 2d array of partial
+ // pattern strings, or "**".
+ //
+ // It's better to use .match(). This function shouldn't
+ // be used, really, but it's pretty convenient sometimes,
+ // when you just want to work with a regex.
+ var set = this.set
+
+ if (!set.length) {
+ this.regexp = false
+ return this.regexp
+ }
+ var options = this.options
+
+ var twoStar = options.noglobstar ? star
+ : options.dot ? twoStarDot
+ : twoStarNoDot
+ var flags = options.nocase ? 'i' : ''
+
+ var re = set.map(function (pattern) {
+ return pattern.map(function (p) {
+ return (p === GLOBSTAR) ? twoStar
+ : (typeof p === 'string') ? regExpEscape(p)
+ : p._src
+ }).join('\\\/')
+ }).join('|')
+
+ // must match entire pattern
+ // ending in a * or ** will make it less strict.
+ re = '^(?:' + re + ')$'
+
+ // can match anything, as long as it's not this.
+ if (this.negate) re = '^(?!' + re + ').*$'
+
+ try {
+ this.regexp = new RegExp(re, flags)
+ } catch (ex) {
+ this.regexp = false
+ }
+ return this.regexp
+}
+
+minimatch.match = function (list, pattern, options) {
+ options = options || {}
+ var mm = new Minimatch(pattern, options)
+ list = list.filter(function (f) {
+ return mm.match(f)
+ })
+ if (mm.options.nonull && !list.length) {
+ list.push(pattern)
+ }
+ return list
+}
+
+Minimatch.prototype.match = match
+function match (f, partial) {
+ this.debug('match', f, this.pattern)
+ // short-circuit in the case of busted things.
+ // comments, etc.
+ if (this.comment) return false
+ if (this.empty) return f === ''
+
+ if (f === '/' && partial) return true
+
+ var options = this.options
+
+ // windows: need to use /, not \
+ if (path.sep !== '/') {
+ f = f.split(path.sep).join('/')
+ }
+
+ // treat the test path as a set of pathparts.
+ f = f.split(slashSplit)
+ this.debug(this.pattern, 'split', f)
+
+ // just ONE of the pattern sets in this.set needs to match
+ // in order for it to be valid. If negating, then just one
+ // match means that we have failed.
+ // Either way, return on the first hit.
+
+ var set = this.set
+ this.debug(this.pattern, 'set', set)
+
+ // Find the basename of the path by looking for the last non-empty segment
+ var filename
+ var i
+ for (i = f.length - 1; i >= 0; i--) {
+ filename = f[i]
+ if (filename) break
+ }
+
+ for (i = 0; i < set.length; i++) {
+ var pattern = set[i]
+ var file = f
+ if (options.matchBase && pattern.length === 1) {
+ file = [filename]
+ }
+ var hit = this.matchOne(file, pattern, partial)
+ if (hit) {
+ if (options.flipNegate) return true
+ return !this.negate
+ }
+ }
+
+ // didn't get any hits. this is success if it's a negative
+ // pattern, failure otherwise.
+ if (options.flipNegate) return false
+ return this.negate
+}
+
+// set partial to true to test if, for example,
+// "/a/b" matches the start of "/*/b/*/d"
+// Partial means, if you run out of file before you run
+// out of pattern, then that's fine, as long as all
+// the parts match.
+Minimatch.prototype.matchOne = function (file, pattern, partial) {
+ var options = this.options
+
+ this.debug('matchOne',
+ { 'this': this, file: file, pattern: pattern })
+
+ this.debug('matchOne', file.length, pattern.length)
+
+ for (var fi = 0,
+ pi = 0,
+ fl = file.length,
+ pl = pattern.length
+ ; (fi < fl) && (pi < pl)
+ ; fi++, pi++) {
+ this.debug('matchOne loop')
+ var p = pattern[pi]
+ var f = file[fi]
+
+ this.debug(pattern, p, f)
+
+ // should be impossible.
+ // some invalid regexp stuff in the set.
+ if (p === false) return false
+
+ if (p === GLOBSTAR) {
+ this.debug('GLOBSTAR', [pattern, p, f])
+
+ // "**"
+ // a/**/b/**/c would match the following:
+ // a/b/x/y/z/c
+ // a/x/y/z/b/c
+ // a/b/x/b/x/c
+ // a/b/c
+ // To do this, take the rest of the pattern after
+ // the **, and see if it would match the file remainder.
+ // If so, return success.
+ // If not, the ** "swallows" a segment, and try again.
+ // This is recursively awful.
+ //
+ // a/**/b/**/c matching a/b/x/y/z/c
+ // - a matches a
+ // - doublestar
+ // - matchOne(b/x/y/z/c, b/**/c)
+ // - b matches b
+ // - doublestar
+ // - matchOne(x/y/z/c, c) -> no
+ // - matchOne(y/z/c, c) -> no
+ // - matchOne(z/c, c) -> no
+ // - matchOne(c, c) yes, hit
+ var fr = fi
+ var pr = pi + 1
+ if (pr === pl) {
+ this.debug('** at the end')
+ // a ** at the end will just swallow the rest.
+ // We have found a match.
+ // however, it will not swallow /.x, unless
+ // options.dot is set.
+ // . and .. are *never* matched by **, for explosively
+ // exponential reasons.
+ for (; fi < fl; fi++) {
+ if (file[fi] === '.' || file[fi] === '..' ||
+ (!options.dot && file[fi].charAt(0) === '.')) return false
+ }
+ return true
+ }
+
+ // ok, let's see if we can swallow whatever we can.
+ while (fr < fl) {
+ var swallowee = file[fr]
+
+ this.debug('\nglobstar while', file, fr, pattern, pr, swallowee)
+
+ // XXX remove this slice. Just pass the start index.
+ if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
+ this.debug('globstar found match!', fr, fl, swallowee)
+ // found a match.
+ return true
+ } else {
+ // can't swallow "." or ".." ever.
+ // can only swallow ".foo" when explicitly asked.
+ if (swallowee === '.' || swallowee === '..' ||
+ (!options.dot && swallowee.charAt(0) === '.')) {
+ this.debug('dot detected!', file, fr, pattern, pr)
+ break
+ }
+
+ // ** swallows a segment, and continue.
+ this.debug('globstar swallow a segment, and continue')
+ fr++
+ }
+ }
+
+ // no match was found.
+ // However, in partial mode, we can't say this is necessarily over.
+ // If there's more *pattern* left, then
+ if (partial) {
+ // ran out of file
+ this.debug('\n>>> no match, partial?', file, fr, pattern, pr)
+ if (fr === fl) return true
+ }
+ return false
+ }
+
+ // something other than **
+ // non-magic patterns just have to match exactly
+ // patterns with magic have been turned into regexps.
+ var hit
+ if (typeof p === 'string') {
+ if (options.nocase) {
+ hit = f.toLowerCase() === p.toLowerCase()
+ } else {
+ hit = f === p
+ }
+ this.debug('string match', p, f, hit)
+ } else {
+ hit = f.match(p)
+ this.debug('pattern match', p, f, hit)
+ }
+
+ if (!hit) return false
+ }
+
+ // Note: ending in / means that we'll get a final ""
+ // at the end of the pattern. This can only match a
+ // corresponding "" at the end of the file.
+ // If the file ends in /, then it can only match a
+ // a pattern that ends in /, unless the pattern just
+ // doesn't have any more for it. But, a/b/ should *not*
+ // match "a/b/*", even though "" matches against the
+ // [^/]*? pattern, except in partial mode, where it might
+ // simply not be reached yet.
+ // However, a/b/ should still satisfy a/*
+
+ // now either we fell off the end of the pattern, or we're done.
+ if (fi === fl && pi === pl) {
+ // ran out of pattern and filename at the same time.
+ // an exact hit!
+ return true
+ } else if (fi === fl) {
+ // ran out of file, but still had pattern left.
+ // this is ok if we're doing the match as part of
+ // a glob fs traversal.
+ return partial
+ } else if (pi === pl) {
+ // ran out of pattern, still have file left.
+ // this is only acceptable if we're on the very last
+ // empty segment of a file with a trailing slash.
+ // a/* should match a/b/
+ var emptyFileEnd = (fi === fl - 1) && (file[fi] === '')
+ return emptyFileEnd
+ }
+
+ // should be unreachable.
+ throw new Error('wtf?')
+}
+
+// replace stuff like \* with *
+function globUnescape (s) {
+ return s.replace(/\\(.)/g, '$1')
+}
+
+function regExpEscape (s) {
+ return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')
+}
diff --git a/tools/node_modules/eslint/node_modules/minimatch/package.json b/tools/node_modules/eslint/node_modules/minimatch/package.json
new file mode 100644
index 0000000000..fa3f74cacf
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/minimatch/package.json
@@ -0,0 +1,64 @@
+{
+ "_from": "minimatch@^3.0.2",
+ "_id": "minimatch@3.0.4",
+ "_inBundle": false,
+ "_integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
+ "_location": "/eslint/minimatch",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "minimatch@^3.0.2",
+ "name": "minimatch",
+ "escapedName": "minimatch",
+ "rawSpec": "^3.0.2",
+ "saveSpec": null,
+ "fetchSpec": "^3.0.2"
+ },
+ "_requiredBy": [
+ "/eslint",
+ "/eslint/glob"
+ ],
+ "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
+ "_shasum": "5166e286457f03306064be5497e8dbb0c3d32083",
+ "_spec": "minimatch@^3.0.2",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me"
+ },
+ "bugs": {
+ "url": "https://github.com/isaacs/minimatch/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "deprecated": false,
+ "description": "a glob matcher in javascript",
+ "devDependencies": {
+ "tap": "^10.3.2"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "files": [
+ "minimatch.js"
+ ],
+ "homepage": "https://github.com/isaacs/minimatch#readme",
+ "license": "ISC",
+ "main": "minimatch.js",
+ "name": "minimatch",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/minimatch.git"
+ },
+ "scripts": {
+ "postpublish": "git push origin --all; git push origin --tags",
+ "postversion": "npm publish",
+ "preversion": "npm test",
+ "test": "tap test/*.js --cov"
+ },
+ "version": "3.0.4"
+}
diff --git a/tools/node_modules/eslint/node_modules/minimist/LICENSE b/tools/node_modules/eslint/node_modules/minimist/LICENSE
new file mode 100644
index 0000000000..ee27ba4b44
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/minimist/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/tools/node_modules/eslint/node_modules/minimist/index.js b/tools/node_modules/eslint/node_modules/minimist/index.js
new file mode 100644
index 0000000000..584f551a6d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/minimist/index.js
@@ -0,0 +1,187 @@
+module.exports = function (args, opts) {
+ if (!opts) opts = {};
+
+ var flags = { bools : {}, strings : {} };
+
+ [].concat(opts['boolean']).filter(Boolean).forEach(function (key) {
+ flags.bools[key] = true;
+ });
+
+ [].concat(opts.string).filter(Boolean).forEach(function (key) {
+ flags.strings[key] = true;
+ });
+
+ var aliases = {};
+ Object.keys(opts.alias || {}).forEach(function (key) {
+ aliases[key] = [].concat(opts.alias[key]);
+ aliases[key].forEach(function (x) {
+ aliases[x] = [key].concat(aliases[key].filter(function (y) {
+ return x !== y;
+ }));
+ });
+ });
+
+ var defaults = opts['default'] || {};
+
+ var argv = { _ : [] };
+ Object.keys(flags.bools).forEach(function (key) {
+ setArg(key, defaults[key] === undefined ? false : defaults[key]);
+ });
+
+ var notFlags = [];
+
+ if (args.indexOf('--') !== -1) {
+ notFlags = args.slice(args.indexOf('--')+1);
+ args = args.slice(0, args.indexOf('--'));
+ }
+
+ function setArg (key, val) {
+ var value = !flags.strings[key] && isNumber(val)
+ ? Number(val) : val
+ ;
+ setKey(argv, key.split('.'), value);
+
+ (aliases[key] || []).forEach(function (x) {
+ setKey(argv, x.split('.'), value);
+ });
+ }
+
+ for (var i = 0; i < args.length; i++) {
+ var arg = args[i];
+
+ if (/^--.+=/.test(arg)) {
+ // Using [\s\S] instead of . because js doesn't support the
+ // 'dotall' regex modifier. See:
+ // http://stackoverflow.com/a/1068308/13216
+ var m = arg.match(/^--([^=]+)=([\s\S]*)$/);
+ setArg(m[1], m[2]);
+ }
+ else if (/^--no-.+/.test(arg)) {
+ var key = arg.match(/^--no-(.+)/)[1];
+ setArg(key, false);
+ }
+ else if (/^--.+/.test(arg)) {
+ var key = arg.match(/^--(.+)/)[1];
+ var next = args[i + 1];
+ if (next !== undefined && !/^-/.test(next)
+ && !flags.bools[key]
+ && (aliases[key] ? !flags.bools[aliases[key]] : true)) {
+ setArg(key, next);
+ i++;
+ }
+ else if (/^(true|false)$/.test(next)) {
+ setArg(key, next === 'true');
+ i++;
+ }
+ else {
+ setArg(key, flags.strings[key] ? '' : true);
+ }
+ }
+ else if (/^-[^-]+/.test(arg)) {
+ var letters = arg.slice(1,-1).split('');
+
+ var broken = false;
+ for (var j = 0; j < letters.length; j++) {
+ var next = arg.slice(j+2);
+
+ if (next === '-') {
+ setArg(letters[j], next)
+ continue;
+ }
+
+ if (/[A-Za-z]/.test(letters[j])
+ && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) {
+ setArg(letters[j], next);
+ broken = true;
+ break;
+ }
+
+ if (letters[j+1] && letters[j+1].match(/\W/)) {
+ setArg(letters[j], arg.slice(j+2));
+ broken = true;
+ break;
+ }
+ else {
+ setArg(letters[j], flags.strings[letters[j]] ? '' : true);
+ }
+ }
+
+ var key = arg.slice(-1)[0];
+ if (!broken && key !== '-') {
+ if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1])
+ && !flags.bools[key]
+ && (aliases[key] ? !flags.bools[aliases[key]] : true)) {
+ setArg(key, args[i+1]);
+ i++;
+ }
+ else if (args[i+1] && /true|false/.test(args[i+1])) {
+ setArg(key, args[i+1] === 'true');
+ i++;
+ }
+ else {
+ setArg(key, flags.strings[key] ? '' : true);
+ }
+ }
+ }
+ else {
+ argv._.push(
+ flags.strings['_'] || !isNumber(arg) ? arg : Number(arg)
+ );
+ }
+ }
+
+ Object.keys(defaults).forEach(function (key) {
+ if (!hasKey(argv, key.split('.'))) {
+ setKey(argv, key.split('.'), defaults[key]);
+
+ (aliases[key] || []).forEach(function (x) {
+ setKey(argv, x.split('.'), defaults[key]);
+ });
+ }
+ });
+
+ notFlags.forEach(function(key) {
+ argv._.push(key);
+ });
+
+ return argv;
+};
+
+function hasKey (obj, keys) {
+ var o = obj;
+ keys.slice(0,-1).forEach(function (key) {
+ o = (o[key] || {});
+ });
+
+ var key = keys[keys.length - 1];
+ return key in o;
+}
+
+function setKey (obj, keys, value) {
+ var o = obj;
+ keys.slice(0,-1).forEach(function (key) {
+ if (o[key] === undefined) o[key] = {};
+ o = o[key];
+ });
+
+ var key = keys[keys.length - 1];
+ if (o[key] === undefined || typeof o[key] === 'boolean') {
+ o[key] = value;
+ }
+ else if (Array.isArray(o[key])) {
+ o[key].push(value);
+ }
+ else {
+ o[key] = [ o[key], value ];
+ }
+}
+
+function isNumber (x) {
+ if (typeof x === 'number') return true;
+ if (/^0x[0-9a-f]+$/i.test(x)) return true;
+ return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
+}
+
+function longest (xs) {
+ return Math.max.apply(null, xs.map(function (x) { return x.length }));
+}
diff --git a/tools/node_modules/eslint/node_modules/minimist/package.json b/tools/node_modules/eslint/node_modules/minimist/package.json
new file mode 100644
index 0000000000..d412f12520
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/minimist/package.json
@@ -0,0 +1,71 @@
+{
+ "_from": "minimist@0.0.8",
+ "_id": "minimist@0.0.8",
+ "_inBundle": false,
+ "_integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
+ "_location": "/eslint/minimist",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "minimist@0.0.8",
+ "name": "minimist",
+ "escapedName": "minimist",
+ "rawSpec": "0.0.8",
+ "saveSpec": null,
+ "fetchSpec": "0.0.8"
+ },
+ "_requiredBy": [
+ "/eslint/mkdirp"
+ ],
+ "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
+ "_shasum": "857fcabfc3397d2625b8228262e86aa7a011b05d",
+ "_spec": "minimist@0.0.8",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/mkdirp",
+ "author": {
+ "name": "James Halliday",
+ "email": "mail@substack.net",
+ "url": "http://substack.net"
+ },
+ "bugs": {
+ "url": "https://github.com/substack/minimist/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "parse argument options",
+ "devDependencies": {
+ "tap": "~0.4.0",
+ "tape": "~1.0.4"
+ },
+ "homepage": "https://github.com/substack/minimist",
+ "keywords": [
+ "argv",
+ "getopt",
+ "parser",
+ "optimist"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "minimist",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/substack/minimist.git"
+ },
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "testling": {
+ "files": "test/*.js",
+ "browsers": [
+ "ie/6..latest",
+ "ff/5",
+ "firefox/latest",
+ "chrome/10",
+ "chrome/latest",
+ "safari/5.1",
+ "safari/latest",
+ "opera/12"
+ ]
+ },
+ "version": "0.0.8"
+}
diff --git a/tools/node_modules/eslint/node_modules/minimist/readme.markdown b/tools/node_modules/eslint/node_modules/minimist/readme.markdown
new file mode 100644
index 0000000000..c25635323e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/minimist/readme.markdown
@@ -0,0 +1,73 @@
+# minimist
+
+parse argument options
+
+This module is the guts of optimist's argument parser without all the
+fanciful decoration.
+
+[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist)
+
+[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist)
+
+# example
+
+``` js
+var argv = require('minimist')(process.argv.slice(2));
+console.dir(argv);
+```
+
+```
+$ node example/parse.js -a beep -b boop
+{ _: [], a: 'beep', b: 'boop' }
+```
+
+```
+$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz
+{ _: [ 'foo', 'bar', 'baz' ],
+ x: 3,
+ y: 4,
+ n: 5,
+ a: true,
+ b: true,
+ c: true,
+ beep: 'boop' }
+```
+
+# methods
+
+``` js
+var parseArgs = require('minimist')
+```
+
+## var argv = parseArgs(args, opts={})
+
+Return an argument object `argv` populated with the array arguments from `args`.
+
+`argv._` contains all the arguments that didn't have an option associated with
+them.
+
+Numeric-looking arguments will be returned as numbers unless `opts.string` or
+`opts.boolean` is set for that argument name.
+
+Any arguments after `'--'` will not be parsed and will end up in `argv._`.
+
+options can be:
+
+* `opts.string` - a string or array of strings argument names to always treat as
+strings
+* `opts.boolean` - a string or array of strings to always treat as booleans
+* `opts.alias` - an object mapping string names to strings or arrays of string
+argument names to use as aliases
+* `opts.default` - an object mapping string argument names to default values
+
+# install
+
+With [npm](https://npmjs.org) do:
+
+```
+npm install minimist
+```
+
+# license
+
+MIT
diff --git a/tools/node_modules/eslint/node_modules/mkdirp/LICENSE b/tools/node_modules/eslint/node_modules/mkdirp/LICENSE
new file mode 100644
index 0000000000..432d1aeb01
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/mkdirp/LICENSE
@@ -0,0 +1,21 @@
+Copyright 2010 James Halliday (mail@substack.net)
+
+This project is free software released under the MIT/X11 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/tools/node_modules/eslint/node_modules/mkdirp/bin/cmd.js b/tools/node_modules/eslint/node_modules/mkdirp/bin/cmd.js
new file mode 100755
index 0000000000..d95de15ae9
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/mkdirp/bin/cmd.js
@@ -0,0 +1,33 @@
+#!/usr/bin/env node
+
+var mkdirp = require('../');
+var minimist = require('minimist');
+var fs = require('fs');
+
+var argv = minimist(process.argv.slice(2), {
+ alias: { m: 'mode', h: 'help' },
+ string: [ 'mode' ]
+});
+if (argv.help) {
+ fs.createReadStream(__dirname + '/usage.txt').pipe(process.stdout);
+ return;
+}
+
+var paths = argv._.slice();
+var mode = argv.mode ? parseInt(argv.mode, 8) : undefined;
+
+(function next () {
+ if (paths.length === 0) return;
+ var p = paths.shift();
+
+ if (mode === undefined) mkdirp(p, cb)
+ else mkdirp(p, mode, cb)
+
+ function cb (err) {
+ if (err) {
+ console.error(err.message);
+ process.exit(1);
+ }
+ else next();
+ }
+})();
diff --git a/tools/node_modules/eslint/node_modules/mkdirp/bin/usage.txt b/tools/node_modules/eslint/node_modules/mkdirp/bin/usage.txt
new file mode 100644
index 0000000000..f952aa2c7a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/mkdirp/bin/usage.txt
@@ -0,0 +1,12 @@
+usage: mkdirp [DIR1,DIR2..] {OPTIONS}
+
+ Create each supplied directory including any necessary parent directories that
+ don't yet exist.
+
+ If the directory already exists, do nothing.
+
+OPTIONS are:
+
+ -m, --mode If a directory needs to be created, set the mode as an octal
+ permission string.
+
diff --git a/tools/node_modules/eslint/node_modules/mkdirp/index.js b/tools/node_modules/eslint/node_modules/mkdirp/index.js
new file mode 100644
index 0000000000..6ce241b58c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/mkdirp/index.js
@@ -0,0 +1,98 @@
+var path = require('path');
+var fs = require('fs');
+var _0777 = parseInt('0777', 8);
+
+module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP;
+
+function mkdirP (p, opts, f, made) {
+ if (typeof opts === 'function') {
+ f = opts;
+ opts = {};
+ }
+ else if (!opts || typeof opts !== 'object') {
+ opts = { mode: opts };
+ }
+
+ var mode = opts.mode;
+ var xfs = opts.fs || fs;
+
+ if (mode === undefined) {
+ mode = _0777 & (~process.umask());
+ }
+ if (!made) made = null;
+
+ var cb = f || function () {};
+ p = path.resolve(p);
+
+ xfs.mkdir(p, mode, function (er) {
+ if (!er) {
+ made = made || p;
+ return cb(null, made);
+ }
+ switch (er.code) {
+ case 'ENOENT':
+ mkdirP(path.dirname(p), opts, function (er, made) {
+ if (er) cb(er, made);
+ else mkdirP(p, opts, cb, made);
+ });
+ break;
+
+ // In the case of any other error, just see if there's a dir
+ // there already. If so, then hooray! If not, then something
+ // is borked.
+ default:
+ xfs.stat(p, function (er2, stat) {
+ // if the stat fails, then that's super weird.
+ // let the original error be the failure reason.
+ if (er2 || !stat.isDirectory()) cb(er, made)
+ else cb(null, made);
+ });
+ break;
+ }
+ });
+}
+
+mkdirP.sync = function sync (p, opts, made) {
+ if (!opts || typeof opts !== 'object') {
+ opts = { mode: opts };
+ }
+
+ var mode = opts.mode;
+ var xfs = opts.fs || fs;
+
+ if (mode === undefined) {
+ mode = _0777 & (~process.umask());
+ }
+ if (!made) made = null;
+
+ p = path.resolve(p);
+
+ try {
+ xfs.mkdirSync(p, mode);
+ made = made || p;
+ }
+ catch (err0) {
+ switch (err0.code) {
+ case 'ENOENT' :
+ made = sync(path.dirname(p), opts, made);
+ sync(p, opts, made);
+ break;
+
+ // In the case of any other error, just see if there's a dir
+ // there already. If so, then hooray! If not, then something
+ // is borked.
+ default:
+ var stat;
+ try {
+ stat = xfs.statSync(p);
+ }
+ catch (err1) {
+ throw err0;
+ }
+ if (!stat.isDirectory()) throw err0;
+ break;
+ }
+ }
+
+ return made;
+};
diff --git a/tools/node_modules/eslint/node_modules/mkdirp/package.json b/tools/node_modules/eslint/node_modules/mkdirp/package.json
new file mode 100644
index 0000000000..77aa7d7a31
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/mkdirp/package.json
@@ -0,0 +1,63 @@
+{
+ "_from": "mkdirp@^0.5.1",
+ "_id": "mkdirp@0.5.1",
+ "_inBundle": false,
+ "_integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
+ "_location": "/eslint/mkdirp",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "mkdirp@^0.5.1",
+ "name": "mkdirp",
+ "escapedName": "mkdirp",
+ "rawSpec": "^0.5.1",
+ "saveSpec": null,
+ "fetchSpec": "^0.5.1"
+ },
+ "_requiredBy": [
+ "/eslint",
+ "/eslint/write"
+ ],
+ "_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
+ "_shasum": "30057438eac6cf7f8c4767f38648d6697d75c903",
+ "_spec": "mkdirp@^0.5.1",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint",
+ "author": {
+ "name": "James Halliday",
+ "email": "mail@substack.net",
+ "url": "http://substack.net"
+ },
+ "bin": {
+ "mkdirp": "bin/cmd.js"
+ },
+ "bugs": {
+ "url": "https://github.com/substack/node-mkdirp/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "minimist": "0.0.8"
+ },
+ "deprecated": false,
+ "description": "Recursively mkdir, like `mkdir -p`",
+ "devDependencies": {
+ "mock-fs": "2 >=2.7.0",
+ "tap": "1"
+ },
+ "homepage": "https://github.com/substack/node-mkdirp#readme",
+ "keywords": [
+ "mkdir",
+ "directory"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "mkdirp",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/substack/node-mkdirp.git"
+ },
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "version": "0.5.1"
+}
diff --git a/tools/node_modules/eslint/node_modules/mkdirp/readme.markdown b/tools/node_modules/eslint/node_modules/mkdirp/readme.markdown
new file mode 100644
index 0000000000..3cc1315385
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/mkdirp/readme.markdown
@@ -0,0 +1,100 @@
+# mkdirp
+
+Like `mkdir -p`, but in node.js!
+
+[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp)
+
+# example
+
+## pow.js
+
+```js
+var mkdirp = require('mkdirp');
+
+mkdirp('/tmp/foo/bar/baz', function (err) {
+ if (err) console.error(err)
+ else console.log('pow!')
+});
+```
+
+Output
+
+```
+pow!
+```
+
+And now /tmp/foo/bar/baz exists, huzzah!
+
+# methods
+
+```js
+var mkdirp = require('mkdirp');
+```
+
+## mkdirp(dir, opts, cb)
+
+Create a new directory and any necessary subdirectories at `dir` with octal
+permission string `opts.mode`. If `opts` is a non-object, it will be treated as
+the `opts.mode`.
+
+If `opts.mode` isn't specified, it defaults to `0777 & (~process.umask())`.
+
+`cb(err, made)` fires with the error or the first directory `made`
+that had to be created, if any.
+
+You can optionally pass in an alternate `fs` implementation by passing in
+`opts.fs`. Your implementation should have `opts.fs.mkdir(path, mode, cb)` and
+`opts.fs.stat(path, cb)`.
+
+## mkdirp.sync(dir, opts)
+
+Synchronously create a new directory and any necessary subdirectories at `dir`
+with octal permission string `opts.mode`. If `opts` is a non-object, it will be
+treated as the `opts.mode`.
+
+If `opts.mode` isn't specified, it defaults to `0777 & (~process.umask())`.
+
+Returns the first directory that had to be created, if any.
+
+You can optionally pass in an alternate `fs` implementation by passing in
+`opts.fs`. Your implementation should have `opts.fs.mkdirSync(path, mode)` and
+`opts.fs.statSync(path)`.
+
+# usage
+
+This package also ships with a `mkdirp` command.
+
+```
+usage: mkdirp [DIR1,DIR2..] {OPTIONS}
+
+ Create each supplied directory including any necessary parent directories that
+ don't yet exist.
+
+ If the directory already exists, do nothing.
+
+OPTIONS are:
+
+ -m, --mode If a directory needs to be created, set the mode as an octal
+ permission string.
+
+```
+
+# install
+
+With [npm](http://npmjs.org) do:
+
+```
+npm install mkdirp
+```
+
+to get the library, or
+
+```
+npm install -g mkdirp
+```
+
+to get the command.
+
+# license
+
+MIT
diff --git a/tools/node_modules/eslint/node_modules/ms/LICENSE.md b/tools/node_modules/eslint/node_modules/ms/LICENSE.md
new file mode 100644
index 0000000000..69b61253a3
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ms/LICENSE.md
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Zeit, 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/tools/node_modules/eslint/node_modules/ms/README.md b/tools/node_modules/eslint/node_modules/ms/README.md
new file mode 100644
index 0000000000..84a9974ccc
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ms/README.md
@@ -0,0 +1,51 @@
+# ms
+
+[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms)
+[![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/)
+
+Use this package to easily convert various time formats to milliseconds.
+
+## Examples
+
+```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('1y') // 31557600000
+ms('100') // 100
+```
+
+### Convert from milliseconds
+
+```js
+ms(60000) // "1m"
+ms(2 * 60000) // "2m"
+ms(ms('10 hours')) // "10h"
+```
+
+### Time format written-out
+
+```js
+ms(60000, { long: true }) // "1 minute"
+ms(2 * 60000, { long: true }) // "2 minutes"
+ms(ms('10 hours'), { long: true }) // "10 hours"
+```
+
+## Features
+
+- Works both in [node](https://nodejs.org) and in the browser.
+- 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.
+
+## Caught a bug?
+
+1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
+2. Link the package to the global module directory: `npm link`
+3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms!
+
+As always, you can run the tests using: `npm test`
diff --git a/tools/node_modules/eslint/node_modules/ms/index.js b/tools/node_modules/eslint/node_modules/ms/index.js
new file mode 100644
index 0000000000..6a522b16b3
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ms/index.js
@@ -0,0 +1,152 @@
+/**
+ * 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]
+ * @throws {Error} throw an error if val is not a non-empty string or a number
+ * @return {String|Number}
+ * @api public
+ */
+
+module.exports = function(val, options) {
+ options = options || {};
+ var type = typeof val;
+ if (type === 'string' && val.length > 0) {
+ return parse(val);
+ } else if (type === 'number' && isNaN(val) === false) {
+ return options.long ? fmtLong(val) : fmtShort(val);
+ }
+ throw new Error(
+ 'val is not a non-empty string or a valid number. val=' +
+ JSON.stringify(val)
+ );
+};
+
+/**
+ * Parse the given `str` and return milliseconds.
+ *
+ * @param {String} str
+ * @return {Number}
+ * @api private
+ */
+
+function parse(str) {
+ str = String(str);
+ if (str.length > 100) {
+ 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;
+ default:
+ return undefined;
+ }
+}
+
+/**
+ * Short format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtShort(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 fmtLong(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/tools/node_modules/eslint/node_modules/ms/package.json b/tools/node_modules/eslint/node_modules/ms/package.json
new file mode 100644
index 0000000000..e9e6effb5e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ms/package.json
@@ -0,0 +1,69 @@
+{
+ "_from": "ms@2.0.0",
+ "_id": "ms@2.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
+ "_location": "/eslint/ms",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "ms@2.0.0",
+ "name": "ms",
+ "escapedName": "ms",
+ "rawSpec": "2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "2.0.0"
+ },
+ "_requiredBy": [
+ "/eslint/debug"
+ ],
+ "_resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "_shasum": "5608aeadfc00be6c2901df5f9861788de0d597c8",
+ "_spec": "ms@2.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/debug",
+ "bugs": {
+ "url": "https://github.com/zeit/ms/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Tiny milisecond conversion utility",
+ "devDependencies": {
+ "eslint": "3.19.0",
+ "expect.js": "0.3.1",
+ "husky": "0.13.3",
+ "lint-staged": "3.4.1",
+ "mocha": "3.4.1"
+ },
+ "eslintConfig": {
+ "extends": "eslint:recommended",
+ "env": {
+ "node": true,
+ "es6": true
+ }
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/zeit/ms#readme",
+ "license": "MIT",
+ "lint-staged": {
+ "*.js": [
+ "npm run lint",
+ "prettier --single-quote --write",
+ "git add"
+ ]
+ },
+ "main": "./index",
+ "name": "ms",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/zeit/ms.git"
+ },
+ "scripts": {
+ "lint": "eslint lib/* bin/*",
+ "precommit": "lint-staged",
+ "test": "mocha tests.js"
+ },
+ "version": "2.0.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/mute-stream/.nyc_output/33508.json b/tools/node_modules/eslint/node_modules/mute-stream/.nyc_output/33508.json
new file mode 100644
index 0000000000..9e26dfeeb6
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/mute-stream/.nyc_output/33508.json
@@ -0,0 +1 @@
+{} \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/mute-stream/.nyc_output/33510.json b/tools/node_modules/eslint/node_modules/mute-stream/.nyc_output/33510.json
new file mode 100644
index 0000000000..1d04442328
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/mute-stream/.nyc_output/33510.json
@@ -0,0 +1 @@
+{"./mute.js":{"path":"./mute.js","s":{"1":1,"2":1,"3":1,"4":7,"5":7,"6":7,"7":7,"8":7,"9":7,"10":7,"11":7,"12":1,"13":1,"14":1,"15":10,"16":1,"17":6,"18":1,"19":1,"20":5,"21":1,"22":1,"23":8,"24":1,"25":2,"26":1,"27":5,"28":1,"29":5,"30":1,"31":2,"32":2,"33":1,"34":2,"35":2,"36":1,"37":2,"38":2,"39":1,"40":25,"41":13,"42":5,"43":8,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":8,"51":0,"52":0,"53":0,"54":8,"55":20,"56":1,"57":2,"58":2,"59":0,"60":2,"61":2,"62":0,"63":2,"64":1,"65":3,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":1,"73":1,"74":1},"b":{"1":[7,5],"2":[7,7],"3":[3,5],"4":[3,2],"5":[4,1],"6":[0,1],"7":[4,1],"8":[0,1],"9":[2,0],"10":[2,0],"11":[13,12],"12":[5,8],"13":[0,8],"14":[0,0],"15":[0,8],"16":[8,0,0],"17":[2,0],"18":[0,2],"19":[2,1],"20":[0,2],"21":[0,0],"22":[0,0],"23":[0,0],"24":[0,0]},"f":{"1":7,"2":10,"3":6,"4":5,"5":8,"6":2,"7":5,"8":5,"9":2,"10":2,"11":2,"12":25,"13":2,"14":3,"15":0},"fnMap":{"1":{"name":"MuteStream","line":7,"loc":{"start":{"line":7,"column":0},"end":{"line":7,"column":27}}},"2":{"name":"(anonymous_2)","line":29,"loc":{"start":{"line":29,"column":28},"end":{"line":29,"column":40}}},"3":{"name":"(anonymous_3)","line":33,"loc":{"start":{"line":33,"column":30},"end":{"line":33,"column":42}}},"4":{"name":"onPipe","line":44,"loc":{"start":{"line":44,"column":0},"end":{"line":44,"column":22}}},"5":{"name":"getIsTTY","line":55,"loc":{"start":{"line":55,"column":0},"end":{"line":55,"column":21}}},"6":{"name":"setIsTTY","line":63,"loc":{"start":{"line":63,"column":0},"end":{"line":63,"column":26}}},"7":{"name":"(anonymous_7)","line":73,"loc":{"start":{"line":73,"column":7},"end":{"line":73,"column":19}}},"8":{"name":"(anonymous_8)","line":80,"loc":{"start":{"line":80,"column":7},"end":{"line":80,"column":19}}},"9":{"name":"(anonymous_9)","line":87,"loc":{"start":{"line":87,"column":28},"end":{"line":87,"column":53}}},"10":{"name":"(anonymous_10)","line":92,"loc":{"start":{"line":92,"column":29},"end":{"line":92,"column":41}}},"11":{"name":"(anonymous_11)","line":96,"loc":{"start":{"line":96,"column":30},"end":{"line":96,"column":42}}},"12":{"name":"(anonymous_12)","line":100,"loc":{"start":{"line":100,"column":29},"end":{"line":100,"column":42}}},"13":{"name":"(anonymous_13)","line":124,"loc":{"start":{"line":124,"column":27},"end":{"line":124,"column":40}}},"14":{"name":"proxy","line":136,"loc":{"start":{"line":136,"column":0},"end":{"line":136,"column":20}}},"15":{"name":"(anonymous_15)","line":136,"loc":{"start":{"line":136,"column":29},"end":{"line":136,"column":41}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":30}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":27}},"3":{"start":{"line":7,"column":0},"end":{"line":20,"column":1}},"4":{"start":{"line":8,"column":2},"end":{"line":8,"column":20}},"5":{"start":{"line":9,"column":2},"end":{"line":9,"column":19}},"6":{"start":{"line":10,"column":2},"end":{"line":10,"column":38}},"7":{"start":{"line":11,"column":2},"end":{"line":11,"column":20}},"8":{"start":{"line":12,"column":2},"end":{"line":12,"column":31}},"9":{"start":{"line":13,"column":2},"end":{"line":13,"column":29}},"10":{"start":{"line":18,"column":2},"end":{"line":18,"column":36}},"11":{"start":{"line":19,"column":2},"end":{"line":19,"column":26}},"12":{"start":{"line":22,"column":0},"end":{"line":22,"column":54}},"13":{"start":{"line":24,"column":0},"end":{"line":27,"column":2}},"14":{"start":{"line":29,"column":0},"end":{"line":31,"column":1}},"15":{"start":{"line":30,"column":2},"end":{"line":30,"column":19}},"16":{"start":{"line":33,"column":0},"end":{"line":35,"column":1}},"17":{"start":{"line":34,"column":2},"end":{"line":34,"column":20}},"18":{"start":{"line":37,"column":0},"end":{"line":42,"column":2}},"19":{"start":{"line":44,"column":0},"end":{"line":46,"column":1}},"20":{"start":{"line":45,"column":2},"end":{"line":45,"column":17}},"21":{"start":{"line":48,"column":0},"end":{"line":53,"column":2}},"22":{"start":{"line":55,"column":0},"end":{"line":60,"column":1}},"23":{"start":{"line":56,"column":2},"end":{"line":59,"column":9}},"24":{"start":{"line":63,"column":0},"end":{"line":70,"column":1}},"25":{"start":{"line":64,"column":2},"end":{"line":69,"column":4}},"26":{"start":{"line":72,"column":0},"end":{"line":77,"column":44}},"27":{"start":{"line":74,"column":4},"end":{"line":76,"column":23}},"28":{"start":{"line":79,"column":0},"end":{"line":84,"column":44}},"29":{"start":{"line":81,"column":4},"end":{"line":83,"column":23}},"30":{"start":{"line":87,"column":0},"end":{"line":90,"column":1}},"31":{"start":{"line":88,"column":2},"end":{"line":88,"column":19}},"32":{"start":{"line":89,"column":2},"end":{"line":89,"column":56}},"33":{"start":{"line":92,"column":0},"end":{"line":94,"column":1}},"34":{"start":{"line":93,"column":2},"end":{"line":93,"column":41}},"35":{"start":{"line":93,"column":17},"end":{"line":93,"column":41}},"36":{"start":{"line":96,"column":0},"end":{"line":98,"column":1}},"37":{"start":{"line":97,"column":2},"end":{"line":97,"column":42}},"38":{"start":{"line":97,"column":17},"end":{"line":97,"column":42}},"39":{"start":{"line":100,"column":0},"end":{"line":122,"column":1}},"40":{"start":{"line":101,"column":2},"end":{"line":120,"column":3}},"41":{"start":{"line":102,"column":4},"end":{"line":102,"column":34}},"42":{"start":{"line":102,"column":23},"end":{"line":102,"column":34}},"43":{"start":{"line":103,"column":4},"end":{"line":119,"column":5}},"44":{"start":{"line":104,"column":6},"end":{"line":108,"column":7}},"45":{"start":{"line":105,"column":8},"end":{"line":105,"column":42}},"46":{"start":{"line":106,"column":8},"end":{"line":106,"column":42}},"47":{"start":{"line":107,"column":8},"end":{"line":107,"column":29}},"48":{"start":{"line":109,"column":6},"end":{"line":109,"column":29}},"49":{"start":{"line":110,"column":6},"end":{"line":110,"column":33}},"50":{"start":{"line":112,"column":6},"end":{"line":117,"column":7}},"51":{"start":{"line":114,"column":8},"end":{"line":114,"column":32}},"52":{"start":{"line":115,"column":8},"end":{"line":115,"column":39}},"53":{"start":{"line":116,"column":8},"end":{"line":116,"column":41}},"54":{"start":{"line":118,"column":6},"end":{"line":118,"column":50}},"55":{"start":{"line":121,"column":2},"end":{"line":121,"column":22}},"56":{"start":{"line":124,"column":0},"end":{"line":134,"column":1}},"57":{"start":{"line":125,"column":2},"end":{"line":131,"column":3}},"58":{"start":{"line":126,"column":4},"end":{"line":130,"column":5}},"59":{"start":{"line":127,"column":6},"end":{"line":127,"column":50}},"60":{"start":{"line":129,"column":6},"end":{"line":129,"column":14}},"61":{"start":{"line":132,"column":2},"end":{"line":132,"column":29}},"62":{"start":{"line":132,"column":9},"end":{"line":132,"column":29}},"63":{"start":{"line":133,"column":2},"end":{"line":133,"column":18}},"64":{"start":{"line":136,"column":0},"end":{"line":141,"column":2}},"65":{"start":{"line":136,"column":22},"end":{"line":141,"column":1}},"66":{"start":{"line":137,"column":2},"end":{"line":137,"column":20}},"67":{"start":{"line":138,"column":2},"end":{"line":138,"column":19}},"68":{"start":{"line":139,"column":2},"end":{"line":139,"column":43}},"69":{"start":{"line":139,"column":18},"end":{"line":139,"column":43}},"70":{"start":{"line":140,"column":2},"end":{"line":140,"column":43}},"71":{"start":{"line":140,"column":18},"end":{"line":140,"column":43}},"72":{"start":{"line":143,"column":0},"end":{"line":143,"column":47}},"73":{"start":{"line":144,"column":0},"end":{"line":144,"column":55}},"74":{"start":{"line":145,"column":0},"end":{"line":145,"column":43}}},"branchMap":{"1":{"line":9,"type":"binary-expr","locations":[{"start":{"line":9,"column":9},"end":{"line":9,"column":13}},{"start":{"line":9,"column":17},"end":{"line":9,"column":19}}]},"2":{"line":18,"type":"binary-expr","locations":[{"start":{"line":18,"column":17},"end":{"line":18,"column":28}},{"start":{"line":18,"column":32},"end":{"line":18,"column":36}}]},"3":{"line":56,"type":"cond-expr","locations":[{"start":{"line":56,"column":25},"end":{"line":56,"column":41}},{"start":{"line":57,"column":10},"end":{"line":58,"column":15}}]},"4":{"line":57,"type":"cond-expr","locations":[{"start":{"line":57,"column":24},"end":{"line":57,"column":39}},{"start":{"line":58,"column":10},"end":{"line":58,"column":15}}]},"5":{"line":74,"type":"cond-expr","locations":[{"start":{"line":74,"column":25},"end":{"line":74,"column":40}},{"start":{"line":75,"column":12},"end":{"line":76,"column":21}}]},"6":{"line":75,"type":"cond-expr","locations":[{"start":{"line":75,"column":24},"end":{"line":75,"column":38}},{"start":{"line":76,"column":12},"end":{"line":76,"column":21}}]},"7":{"line":81,"type":"cond-expr","locations":[{"start":{"line":81,"column":25},"end":{"line":81,"column":43}},{"start":{"line":82,"column":12},"end":{"line":83,"column":21}}]},"8":{"line":82,"type":"cond-expr","locations":[{"start":{"line":82,"column":24},"end":{"line":82,"column":41}},{"start":{"line":83,"column":12},"end":{"line":83,"column":21}}]},"9":{"line":93,"type":"if","locations":[{"start":{"line":93,"column":2},"end":{"line":93,"column":2}},{"start":{"line":93,"column":2},"end":{"line":93,"column":2}}]},"10":{"line":97,"type":"if","locations":[{"start":{"line":97,"column":2},"end":{"line":97,"column":2}},{"start":{"line":97,"column":2},"end":{"line":97,"column":2}}]},"11":{"line":101,"type":"if","locations":[{"start":{"line":101,"column":2},"end":{"line":101,"column":2}},{"start":{"line":101,"column":2},"end":{"line":101,"column":2}}]},"12":{"line":102,"type":"if","locations":[{"start":{"line":102,"column":4},"end":{"line":102,"column":4}},{"start":{"line":102,"column":4},"end":{"line":102,"column":4}}]},"13":{"line":103,"type":"if","locations":[{"start":{"line":103,"column":4},"end":{"line":103,"column":4}},{"start":{"line":103,"column":4},"end":{"line":103,"column":4}}]},"14":{"line":104,"type":"if","locations":[{"start":{"line":104,"column":6},"end":{"line":104,"column":6}},{"start":{"line":104,"column":6},"end":{"line":104,"column":6}}]},"15":{"line":112,"type":"if","locations":[{"start":{"line":112,"column":6},"end":{"line":112,"column":6}},{"start":{"line":112,"column":6},"end":{"line":112,"column":6}}]},"16":{"line":112,"type":"binary-expr","locations":[{"start":{"line":112,"column":10},"end":{"line":112,"column":22}},{"start":{"line":112,"column":26},"end":{"line":112,"column":42}},{"start":{"line":113,"column":10},"end":{"line":113,"column":39}}]},"17":{"line":125,"type":"if","locations":[{"start":{"line":125,"column":2},"end":{"line":125,"column":2}},{"start":{"line":125,"column":2},"end":{"line":125,"column":2}}]},"18":{"line":126,"type":"if","locations":[{"start":{"line":126,"column":4},"end":{"line":126,"column":4}},{"start":{"line":126,"column":4},"end":{"line":126,"column":4}}]},"19":{"line":126,"type":"binary-expr","locations":[{"start":{"line":126,"column":8},"end":{"line":126,"column":9}},{"start":{"line":126,"column":13},"end":{"line":126,"column":25}}]},"20":{"line":132,"type":"if","locations":[{"start":{"line":132,"column":2},"end":{"line":132,"column":2}},{"start":{"line":132,"column":2},"end":{"line":132,"column":2}}]},"21":{"line":139,"type":"if","locations":[{"start":{"line":139,"column":2},"end":{"line":139,"column":2}},{"start":{"line":139,"column":2},"end":{"line":139,"column":2}}]},"22":{"line":139,"type":"binary-expr","locations":[{"start":{"line":139,"column":6},"end":{"line":139,"column":7}},{"start":{"line":139,"column":11},"end":{"line":139,"column":16}}]},"23":{"line":140,"type":"if","locations":[{"start":{"line":140,"column":2},"end":{"line":140,"column":2}},{"start":{"line":140,"column":2},"end":{"line":140,"column":2}}]},"24":{"line":140,"type":"binary-expr","locations":[{"start":{"line":140,"column":6},"end":{"line":140,"column":7}},{"start":{"line":140,"column":11},"end":{"line":140,"column":16}}]}}}} \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/mute-stream/LICENSE b/tools/node_modules/eslint/node_modules/mute-stream/LICENSE
new file mode 100644
index 0000000000..19129e315f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/mute-stream/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/tools/node_modules/eslint/node_modules/mute-stream/README.md b/tools/node_modules/eslint/node_modules/mute-stream/README.md
new file mode 100644
index 0000000000..8ab1238e46
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/mute-stream/README.md
@@ -0,0 +1,68 @@
+# mute-stream
+
+Bytes go in, but they don't come out (when muted).
+
+This is a basic pass-through stream, but when muted, the bytes are
+silently dropped, rather than being passed through.
+
+## Usage
+
+```javascript
+var MuteStream = require('mute-stream')
+
+var ms = new MuteStream(options)
+
+ms.pipe(process.stdout)
+ms.write('foo') // writes 'foo' to stdout
+ms.mute()
+ms.write('bar') // does not write 'bar'
+ms.unmute()
+ms.write('baz') // writes 'baz' to stdout
+
+// can also be used to mute incoming data
+var ms = new MuteStream
+input.pipe(ms)
+
+ms.on('data', function (c) {
+ console.log('data: ' + c)
+})
+
+input.emit('data', 'foo') // logs 'foo'
+ms.mute()
+input.emit('data', 'bar') // does not log 'bar'
+ms.unmute()
+input.emit('data', 'baz') // logs 'baz'
+```
+
+## Options
+
+All options are optional.
+
+* `replace` Set to a string to replace each character with the
+ specified string when muted. (So you can show `****` instead of the
+ password, for example.)
+
+* `prompt` If you are using a replacement char, and also using a
+ prompt with a readline stream (as for a `Password: *****` input),
+ then specify what the prompt is so that backspace will work
+ properly. Otherwise, pressing backspace will overwrite the prompt
+ with the replacement character, which is weird.
+
+## ms.mute()
+
+Set `muted` to `true`. Turns `.write()` into a no-op.
+
+## ms.unmute()
+
+Set `muted` to `false`
+
+## ms.isTTY
+
+True if the pipe destination is a TTY, or if the incoming pipe source is
+a TTY.
+
+## Other stream methods...
+
+The other standard readable and writable stream methods are all
+available. The MuteStream object acts as a facade to its pipe source
+and destination.
diff --git a/tools/node_modules/eslint/node_modules/mute-stream/mute.js b/tools/node_modules/eslint/node_modules/mute-stream/mute.js
new file mode 100644
index 0000000000..a24fc09975
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/mute-stream/mute.js
@@ -0,0 +1,145 @@
+var Stream = require('stream')
+
+module.exports = MuteStream
+
+// var out = new MuteStream(process.stdout)
+// argument auto-pipes
+function MuteStream (opts) {
+ Stream.apply(this)
+ opts = opts || {}
+ this.writable = this.readable = true
+ this.muted = false
+ this.on('pipe', this._onpipe)
+ this.replace = opts.replace
+
+ // For readline-type situations
+ // This much at the start of a line being redrawn after a ctrl char
+ // is seen (such as backspace) won't be redrawn as the replacement
+ this._prompt = opts.prompt || null
+ this._hadControl = false
+}
+
+MuteStream.prototype = Object.create(Stream.prototype)
+
+Object.defineProperty(MuteStream.prototype, 'constructor', {
+ value: MuteStream,
+ enumerable: false
+})
+
+MuteStream.prototype.mute = function () {
+ this.muted = true
+}
+
+MuteStream.prototype.unmute = function () {
+ this.muted = false
+}
+
+Object.defineProperty(MuteStream.prototype, '_onpipe', {
+ value: onPipe,
+ enumerable: false,
+ writable: true,
+ configurable: true
+})
+
+function onPipe (src) {
+ this._src = src
+}
+
+Object.defineProperty(MuteStream.prototype, 'isTTY', {
+ get: getIsTTY,
+ set: setIsTTY,
+ enumerable: true,
+ configurable: true
+})
+
+function getIsTTY () {
+ return( (this._dest) ? this._dest.isTTY
+ : (this._src) ? this._src.isTTY
+ : false
+ )
+}
+
+// basically just get replace the getter/setter with a regular value
+function setIsTTY (isTTY) {
+ Object.defineProperty(this, 'isTTY', {
+ value: isTTY,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ })
+}
+
+Object.defineProperty(MuteStream.prototype, 'rows', {
+ get: function () {
+ return( this._dest ? this._dest.rows
+ : this._src ? this._src.rows
+ : undefined )
+ }, enumerable: true, configurable: true })
+
+Object.defineProperty(MuteStream.prototype, 'columns', {
+ get: function () {
+ return( this._dest ? this._dest.columns
+ : this._src ? this._src.columns
+ : undefined )
+ }, enumerable: true, configurable: true })
+
+
+MuteStream.prototype.pipe = function (dest, options) {
+ this._dest = dest
+ return Stream.prototype.pipe.call(this, dest, options)
+}
+
+MuteStream.prototype.pause = function () {
+ if (this._src) return this._src.pause()
+}
+
+MuteStream.prototype.resume = function () {
+ if (this._src) return this._src.resume()
+}
+
+MuteStream.prototype.write = function (c) {
+ if (this.muted) {
+ if (!this.replace) return true
+ if (c.match(/^\u001b/)) {
+ if(c.indexOf(this._prompt) === 0) {
+ c = c.substr(this._prompt.length);
+ c = c.replace(/./g, this.replace);
+ c = this._prompt + c;
+ }
+ this._hadControl = true
+ return this.emit('data', c)
+ } else {
+ if (this._prompt && this._hadControl &&
+ c.indexOf(this._prompt) === 0) {
+ this._hadControl = false
+ this.emit('data', this._prompt)
+ c = c.substr(this._prompt.length)
+ }
+ c = c.toString().replace(/./g, this.replace)
+ }
+ }
+ this.emit('data', c)
+}
+
+MuteStream.prototype.end = function (c) {
+ if (this.muted) {
+ if (c && this.replace) {
+ c = c.toString().replace(/./g, this.replace)
+ } else {
+ c = null
+ }
+ }
+ if (c) this.emit('data', c)
+ this.emit('end')
+}
+
+function proxy (fn) { return function () {
+ var d = this._dest
+ var s = this._src
+ if (d && d[fn]) d[fn].apply(d, arguments)
+ if (s && s[fn]) s[fn].apply(s, arguments)
+}}
+
+MuteStream.prototype.destroy = proxy('destroy')
+MuteStream.prototype.destroySoon = proxy('destroySoon')
+MuteStream.prototype.close = proxy('close')
diff --git a/tools/node_modules/eslint/node_modules/mute-stream/package.json b/tools/node_modules/eslint/node_modules/mute-stream/package.json
new file mode 100644
index 0000000000..ce2ad65d5b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/mute-stream/package.json
@@ -0,0 +1,59 @@
+{
+ "_from": "mute-stream@0.0.7",
+ "_id": "mute-stream@0.0.7",
+ "_inBundle": false,
+ "_integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=",
+ "_location": "/eslint/mute-stream",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "mute-stream@0.0.7",
+ "name": "mute-stream",
+ "escapedName": "mute-stream",
+ "rawSpec": "0.0.7",
+ "saveSpec": null,
+ "fetchSpec": "0.0.7"
+ },
+ "_requiredBy": [
+ "/eslint/inquirer"
+ ],
+ "_resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz",
+ "_shasum": "3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab",
+ "_spec": "mute-stream@0.0.7",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/inquirer",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "bugs": {
+ "url": "https://github.com/isaacs/mute-stream/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Bytes go in, but they don't come out (when muted).",
+ "devDependencies": {
+ "tap": "^5.4.4"
+ },
+ "directories": {
+ "test": "test"
+ },
+ "homepage": "https://github.com/isaacs/mute-stream#readme",
+ "keywords": [
+ "mute",
+ "stream",
+ "pipe"
+ ],
+ "license": "ISC",
+ "main": "mute.js",
+ "name": "mute-stream",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/mute-stream.git"
+ },
+ "scripts": {
+ "test": "tap test/*.js --cov"
+ },
+ "version": "0.0.7"
+}
diff --git a/tools/node_modules/eslint/node_modules/natural-compare/README.md b/tools/node_modules/eslint/node_modules/natural-compare/README.md
new file mode 100644
index 0000000000..c85dfdf98c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/natural-compare/README.md
@@ -0,0 +1,125 @@
+
+[Build]: http://img.shields.io/travis/litejs/natural-compare-lite.png
+[Coverage]: http://img.shields.io/coveralls/litejs/natural-compare-lite.png
+[1]: https://travis-ci.org/litejs/natural-compare-lite
+[2]: https://coveralls.io/r/litejs/natural-compare-lite
+[npm package]: https://npmjs.org/package/natural-compare-lite
+[GitHub repo]: https://github.com/litejs/natural-compare-lite
+
+
+
+ @version 1.4.0
+ @date 2015-10-26
+ @stability 3 - Stable
+
+
+Natural Compare &ndash; [![Build][]][1] [![Coverage][]][2]
+===============
+
+Compare strings containing a mix of letters and numbers
+in the way a human being would in sort order.
+This is described as a "natural ordering".
+
+```text
+Standard sorting: Natural order sorting:
+ img1.png img1.png
+ img10.png img2.png
+ img12.png img10.png
+ img2.png img12.png
+```
+
+String.naturalCompare returns a number indicating
+whether a reference string comes before or after or is the same
+as the given string in sort order.
+Use it with builtin sort() function.
+
+
+
+### Installation
+
+- In browser
+
+```html
+<script src=min.natural-compare.js></script>
+```
+
+- In node.js: `npm install natural-compare-lite`
+
+```javascript
+require("natural-compare-lite")
+```
+
+### Usage
+
+```javascript
+// Simple case sensitive example
+var a = ["z1.doc", "z10.doc", "z17.doc", "z2.doc", "z23.doc", "z3.doc"];
+a.sort(String.naturalCompare);
+// ["z1.doc", "z2.doc", "z3.doc", "z10.doc", "z17.doc", "z23.doc"]
+
+// Use wrapper function for case insensitivity
+a.sort(function(a, b){
+ return String.naturalCompare(a.toLowerCase(), b.toLowerCase());
+})
+
+// In most cases we want to sort an array of objects
+var a = [ {"street":"350 5th Ave", "room":"A-1021"}
+ , {"street":"350 5th Ave", "room":"A-21046-b"} ];
+
+// sort by street, then by room
+a.sort(function(a, b){
+ return String.naturalCompare(a.street, b.street) || String.naturalCompare(a.room, b.room);
+})
+
+// When text transformation is needed (eg toLowerCase()),
+// it is best for performance to keep
+// transformed key in that object.
+// There are no need to do text transformation
+// on each comparision when sorting.
+var a = [ {"make":"Audi", "model":"A6"}
+ , {"make":"Kia", "model":"Rio"} ];
+
+// sort by make, then by model
+a.map(function(car){
+ car.sort_key = (car.make + " " + car.model).toLowerCase();
+})
+a.sort(function(a, b){
+ return String.naturalCompare(a.sort_key, b.sort_key);
+})
+```
+
+- Works well with dates in ISO format eg "Rev 2012-07-26.doc".
+
+
+### Custom alphabet
+
+It is possible to configure a custom alphabet
+to achieve a desired order.
+
+```javascript
+// Estonian alphabet
+String.alphabet = "ABDEFGHIJKLMNOPRSŠZŽTUVÕÄÖÜXYabdefghijklmnoprsšzžtuvõäöüxy"
+["t", "z", "x", "õ"].sort(String.naturalCompare)
+// ["z", "t", "õ", "x"]
+
+// Russian alphabet
+String.alphabet = "АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдеёжзийклмнопрстуфхцчшщъыьэюя"
+["Ё", "А", "Б"].sort(String.naturalCompare)
+// ["А", "Б", "Ё"]
+```
+
+
+External links
+--------------
+
+- [GitHub repo][https://github.com/litejs/natural-compare-lite]
+- [jsperf test](http://jsperf.com/natural-sort-2/12)
+
+
+Licence
+-------
+
+Copyright (c) 2012-2015 Lauri Rooden &lt;lauri@rooden.ee&gt;
+[The MIT License](http://lauri.rooden.ee/mit-license.txt)
+
+
diff --git a/tools/node_modules/eslint/node_modules/natural-compare/index.js b/tools/node_modules/eslint/node_modules/natural-compare/index.js
new file mode 100644
index 0000000000..e705d49f5f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/natural-compare/index.js
@@ -0,0 +1,57 @@
+
+
+
+/*
+ * @version 1.4.0
+ * @date 2015-10-26
+ * @stability 3 - Stable
+ * @author Lauri Rooden (https://github.com/litejs/natural-compare-lite)
+ * @license MIT License
+ */
+
+
+var naturalCompare = function(a, b) {
+ var i, codeA
+ , codeB = 1
+ , posA = 0
+ , posB = 0
+ , alphabet = String.alphabet
+
+ function getCode(str, pos, code) {
+ if (code) {
+ for (i = pos; code = getCode(str, i), code < 76 && code > 65;) ++i;
+ return +str.slice(pos - 1, i)
+ }
+ code = alphabet && alphabet.indexOf(str.charAt(pos))
+ return code > -1 ? code + 76 : ((code = str.charCodeAt(pos) || 0), code < 45 || code > 127) ? code
+ : code < 46 ? 65 // -
+ : code < 48 ? code - 1
+ : code < 58 ? code + 18 // 0-9
+ : code < 65 ? code - 11
+ : code < 91 ? code + 11 // A-Z
+ : code < 97 ? code - 37
+ : code < 123 ? code + 5 // a-z
+ : code - 63
+ }
+
+
+ if ((a+="") != (b+="")) for (;codeB;) {
+ codeA = getCode(a, posA++)
+ codeB = getCode(b, posB++)
+
+ if (codeA < 76 && codeB < 76 && codeA > 66 && codeB > 66) {
+ codeA = getCode(a, posA, posA)
+ codeB = getCode(b, posB, posA = i)
+ posB = i
+ }
+
+ if (codeA != codeB) return (codeA < codeB) ? -1 : 1
+ }
+ return 0
+}
+
+try {
+ module.exports = naturalCompare;
+} catch (e) {
+ String.naturalCompare = naturalCompare;
+}
diff --git a/tools/node_modules/eslint/node_modules/natural-compare/package.json b/tools/node_modules/eslint/node_modules/natural-compare/package.json
new file mode 100644
index 0000000000..c8161cc124
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/natural-compare/package.json
@@ -0,0 +1,73 @@
+{
+ "_from": "natural-compare@^1.4.0",
+ "_id": "natural-compare@1.4.0",
+ "_inBundle": false,
+ "_integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=",
+ "_location": "/eslint/natural-compare",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "natural-compare@^1.4.0",
+ "name": "natural-compare",
+ "escapedName": "natural-compare",
+ "rawSpec": "^1.4.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.4.0"
+ },
+ "_requiredBy": [
+ "/eslint"
+ ],
+ "_resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
+ "_shasum": "4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7",
+ "_spec": "natural-compare@^1.4.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint",
+ "author": {
+ "name": "Lauri Rooden",
+ "url": "https://github.com/litejs/natural-compare-lite"
+ },
+ "bugs": {
+ "url": "https://github.com/litejs/natural-compare-lite/issues"
+ },
+ "buildman": {
+ "dist/index-min.js": {
+ "banner": "/*! litejs.com/MIT-LICENSE.txt */",
+ "input": "index.js"
+ }
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Compare strings containing a mix of letters and numbers in the way a human being would in sort order.",
+ "devDependencies": {
+ "buildman": "*",
+ "testman": "*"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/litejs/natural-compare-lite#readme",
+ "keywords": [
+ "string",
+ "natural",
+ "order",
+ "sort",
+ "natsort",
+ "natcmp",
+ "compare",
+ "alphanum",
+ "litejs"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "natural-compare",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/litejs/natural-compare-lite.git"
+ },
+ "scripts": {
+ "build": "node node_modules/buildman/index.js --all",
+ "test": "node tests/index.js"
+ },
+ "stability": 3,
+ "version": "1.4.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/object-assign/index.js b/tools/node_modules/eslint/node_modules/object-assign/index.js
new file mode 100644
index 0000000000..0930cf8890
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/object-assign/index.js
@@ -0,0 +1,90 @@
+/*
+object-assign
+(c) Sindre Sorhus
+@license MIT
+*/
+
+'use strict';
+/* eslint-disable no-unused-vars */
+var getOwnPropertySymbols = Object.getOwnPropertySymbols;
+var hasOwnProperty = Object.prototype.hasOwnProperty;
+var propIsEnumerable = Object.prototype.propertyIsEnumerable;
+
+function toObject(val) {
+ if (val === null || val === undefined) {
+ throw new TypeError('Object.assign cannot be called with null or undefined');
+ }
+
+ return Object(val);
+}
+
+function shouldUseNative() {
+ try {
+ if (!Object.assign) {
+ return false;
+ }
+
+ // Detect buggy property enumeration order in older V8 versions.
+
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4118
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
+ test1[5] = 'de';
+ if (Object.getOwnPropertyNames(test1)[0] === '5') {
+ return false;
+ }
+
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
+ var test2 = {};
+ for (var i = 0; i < 10; i++) {
+ test2['_' + String.fromCharCode(i)] = i;
+ }
+ var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
+ return test2[n];
+ });
+ if (order2.join('') !== '0123456789') {
+ return false;
+ }
+
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
+ var test3 = {};
+ 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
+ test3[letter] = letter;
+ });
+ if (Object.keys(Object.assign({}, test3)).join('') !==
+ 'abcdefghijklmnopqrst') {
+ return false;
+ }
+
+ return true;
+ } catch (err) {
+ // We don't expect any of the above to throw, but better to be safe.
+ return false;
+ }
+}
+
+module.exports = shouldUseNative() ? Object.assign : function (target, source) {
+ var from;
+ var to = toObject(target);
+ var symbols;
+
+ for (var s = 1; s < arguments.length; s++) {
+ from = Object(arguments[s]);
+
+ for (var key in from) {
+ if (hasOwnProperty.call(from, key)) {
+ to[key] = from[key];
+ }
+ }
+
+ if (getOwnPropertySymbols) {
+ symbols = getOwnPropertySymbols(from);
+ for (var i = 0; i < symbols.length; i++) {
+ if (propIsEnumerable.call(from, symbols[i])) {
+ to[symbols[i]] = from[symbols[i]];
+ }
+ }
+ }
+ }
+
+ return to;
+};
diff --git a/tools/node_modules/eslint/node_modules/object-assign/license b/tools/node_modules/eslint/node_modules/object-assign/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/object-assign/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/tools/node_modules/eslint/node_modules/object-assign/package.json b/tools/node_modules/eslint/node_modules/object-assign/package.json
new file mode 100644
index 0000000000..c8e9559939
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/object-assign/package.json
@@ -0,0 +1,77 @@
+{
+ "_from": "object-assign@^4.0.1",
+ "_id": "object-assign@4.1.1",
+ "_inBundle": false,
+ "_integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
+ "_location": "/eslint/object-assign",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "object-assign@^4.0.1",
+ "name": "object-assign",
+ "escapedName": "object-assign",
+ "rawSpec": "^4.0.1",
+ "saveSpec": null,
+ "fetchSpec": "^4.0.1"
+ },
+ "_requiredBy": [
+ "/eslint/del",
+ "/eslint/esrecurse",
+ "/eslint/file-entry-cache",
+ "/eslint/globby"
+ ],
+ "_resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
+ "_shasum": "2109adc7965887cfc05cbbd442cac8bfbb360863",
+ "_spec": "object-assign@^4.0.1",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/esrecurse",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/object-assign/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "ES2015 `Object.assign()` ponyfill",
+ "devDependencies": {
+ "ava": "^0.16.0",
+ "lodash": "^4.16.4",
+ "matcha": "^0.7.0",
+ "xo": "^0.16.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/object-assign#readme",
+ "keywords": [
+ "object",
+ "assign",
+ "extend",
+ "properties",
+ "es2015",
+ "ecmascript",
+ "harmony",
+ "ponyfill",
+ "prollyfill",
+ "polyfill",
+ "shim",
+ "browser"
+ ],
+ "license": "MIT",
+ "name": "object-assign",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/object-assign.git"
+ },
+ "scripts": {
+ "bench": "matcha bench.js",
+ "test": "xo && ava"
+ },
+ "version": "4.1.1"
+}
diff --git a/tools/node_modules/eslint/node_modules/object-assign/readme.md b/tools/node_modules/eslint/node_modules/object-assign/readme.md
new file mode 100644
index 0000000000..1be09d35c7
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/object-assign/readme.md
@@ -0,0 +1,61 @@
+# object-assign [![Build Status](https://travis-ci.org/sindresorhus/object-assign.svg?branch=master)](https://travis-ci.org/sindresorhus/object-assign)
+
+> ES2015 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) [ponyfill](https://ponyfill.com)
+
+
+## Use the built-in
+
+Node.js 4 and up, as well as every evergreen browser (Chrome, Edge, Firefox, Opera, Safari),
+support `Object.assign()` :tada:. If you target only those environments, then by all
+means, use `Object.assign()` instead of this package.
+
+
+## Install
+
+```
+$ npm install --save object-assign
+```
+
+
+## Usage
+
+```js
+const objectAssign = require('object-assign');
+
+objectAssign({foo: 0}, {bar: 1});
+//=> {foo: 0, bar: 1}
+
+// multiple sources
+objectAssign({foo: 0}, {bar: 1}, {baz: 2});
+//=> {foo: 0, bar: 1, baz: 2}
+
+// overwrites equal keys
+objectAssign({foo: 0}, {foo: 1}, {foo: 2});
+//=> {foo: 2}
+
+// ignores null and undefined sources
+objectAssign({foo: 0}, null, {bar: 1}, undefined);
+//=> {foo: 0, bar: 1}
+```
+
+
+## API
+
+### objectAssign(target, [source, ...])
+
+Assigns enumerable own properties of `source` objects to the `target` object and returns the `target` object. Additional `source` objects will overwrite previous ones.
+
+
+## Resources
+
+- [ES2015 spec - Object.assign](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign)
+
+
+## Related
+
+- [deep-assign](https://github.com/sindresorhus/deep-assign) - Recursive `Object.assign()`
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/tools/node_modules/eslint/node_modules/once/LICENSE b/tools/node_modules/eslint/node_modules/once/LICENSE
new file mode 100644
index 0000000000..19129e315f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/once/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/tools/node_modules/eslint/node_modules/once/README.md b/tools/node_modules/eslint/node_modules/once/README.md
new file mode 100644
index 0000000000..1f1ffca933
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/once/README.md
@@ -0,0 +1,79 @@
+# once
+
+Only call a function once.
+
+## usage
+
+```javascript
+var once = require('once')
+
+function load (file, cb) {
+ cb = once(cb)
+ loader.load('file')
+ loader.once('load', cb)
+ loader.once('error', cb)
+}
+```
+
+Or add to the Function.prototype in a responsible way:
+
+```javascript
+// only has to be done once
+require('once').proto()
+
+function load (file, cb) {
+ cb = cb.once()
+ loader.load('file')
+ loader.once('load', cb)
+ loader.once('error', cb)
+}
+```
+
+Ironically, the prototype feature makes this module twice as
+complicated as necessary.
+
+To check whether you function has been called, use `fn.called`. Once the
+function is called for the first time the return value of the original
+function is saved in `fn.value` and subsequent calls will continue to
+return this value.
+
+```javascript
+var once = require('once')
+
+function load (cb) {
+ cb = once(cb)
+ var stream = createStream()
+ stream.once('data', cb)
+ stream.once('end', function () {
+ if (!cb.called) cb(new Error('not found'))
+ })
+}
+```
+
+## `once.strict(func)`
+
+Throw an error if the function is called twice.
+
+Some functions are expected to be called only once. Using `once` for them would
+potentially hide logical errors.
+
+In the example below, the `greet` function has to call the callback only once:
+
+```javascript
+function greet (name, cb) {
+ // return is missing from the if statement
+ // when no name is passed, the callback is called twice
+ if (!name) cb('Hello anonymous')
+ cb('Hello ' + name)
+}
+
+function log (msg) {
+ console.log(msg)
+}
+
+// this will print 'Hello anonymous' but the logical error will be missed
+greet(null, once(msg))
+
+// once.strict will print 'Hello anonymous' and throw an error when the callback will be called the second time
+greet(null, once.strict(msg))
+```
diff --git a/tools/node_modules/eslint/node_modules/once/once.js b/tools/node_modules/eslint/node_modules/once/once.js
new file mode 100644
index 0000000000..235406736d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/once/once.js
@@ -0,0 +1,42 @@
+var wrappy = require('wrappy')
+module.exports = wrappy(once)
+module.exports.strict = wrappy(onceStrict)
+
+once.proto = once(function () {
+ Object.defineProperty(Function.prototype, 'once', {
+ value: function () {
+ return once(this)
+ },
+ configurable: true
+ })
+
+ Object.defineProperty(Function.prototype, 'onceStrict', {
+ value: function () {
+ return onceStrict(this)
+ },
+ configurable: true
+ })
+})
+
+function once (fn) {
+ var f = function () {
+ if (f.called) return f.value
+ f.called = true
+ return f.value = fn.apply(this, arguments)
+ }
+ f.called = false
+ return f
+}
+
+function onceStrict (fn) {
+ var f = function () {
+ if (f.called)
+ throw new Error(f.onceError)
+ f.called = true
+ return f.value = fn.apply(this, arguments)
+ }
+ var name = fn.name || 'Function wrapped with `once`'
+ f.onceError = name + " shouldn't be called more than once"
+ f.called = false
+ return f
+}
diff --git a/tools/node_modules/eslint/node_modules/once/package.json b/tools/node_modules/eslint/node_modules/once/package.json
new file mode 100644
index 0000000000..428ce10150
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/once/package.json
@@ -0,0 +1,67 @@
+{
+ "_from": "once@^1.3.0",
+ "_id": "once@1.4.0",
+ "_inBundle": false,
+ "_integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
+ "_location": "/eslint/once",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "once@^1.3.0",
+ "name": "once",
+ "escapedName": "once",
+ "rawSpec": "^1.3.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.3.0"
+ },
+ "_requiredBy": [
+ "/eslint/glob",
+ "/eslint/inflight"
+ ],
+ "_resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "_shasum": "583b1aa775961d4b113ac17d9c50baef9dd76bd1",
+ "_spec": "once@^1.3.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/glob",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "bugs": {
+ "url": "https://github.com/isaacs/once/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "wrappy": "1"
+ },
+ "deprecated": false,
+ "description": "Run a function exactly one time",
+ "devDependencies": {
+ "tap": "^7.0.1"
+ },
+ "directories": {
+ "test": "test"
+ },
+ "files": [
+ "once.js"
+ ],
+ "homepage": "https://github.com/isaacs/once#readme",
+ "keywords": [
+ "once",
+ "function",
+ "one",
+ "single"
+ ],
+ "license": "ISC",
+ "main": "once.js",
+ "name": "once",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/once.git"
+ },
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "version": "1.4.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/onetime/index.js b/tools/node_modules/eslint/node_modules/onetime/index.js
new file mode 100644
index 0000000000..0d76476b0b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/onetime/index.js
@@ -0,0 +1,39 @@
+'use strict';
+const mimicFn = require('mimic-fn');
+
+module.exports = (fn, opts) => {
+ // TODO: Remove this in v3
+ if (opts === true) {
+ throw new TypeError('The second argument is now an options object');
+ }
+
+ if (typeof fn !== 'function') {
+ throw new TypeError('Expected a function');
+ }
+
+ opts = opts || {};
+
+ let ret;
+ let called = false;
+ const fnName = fn.displayName || fn.name || '<anonymous>';
+
+ const onetime = function () {
+ if (called) {
+ if (opts.throw === true) {
+ throw new Error(`Function \`${fnName}\` can only be called once`);
+ }
+
+ return ret;
+ }
+
+ called = true;
+ ret = fn.apply(this, arguments);
+ fn = null;
+
+ return ret;
+ };
+
+ mimicFn(onetime, fn);
+
+ return onetime;
+};
diff --git a/tools/node_modules/eslint/node_modules/onetime/license b/tools/node_modules/eslint/node_modules/onetime/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/onetime/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/tools/node_modules/eslint/node_modules/onetime/package.json b/tools/node_modules/eslint/node_modules/onetime/package.json
new file mode 100644
index 0000000000..457ba86be7
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/onetime/package.json
@@ -0,0 +1,72 @@
+{
+ "_from": "onetime@^2.0.0",
+ "_id": "onetime@2.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=",
+ "_location": "/eslint/onetime",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "onetime@^2.0.0",
+ "name": "onetime",
+ "escapedName": "onetime",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/eslint/restore-cursor"
+ ],
+ "_resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz",
+ "_shasum": "067428230fd67443b2794b22bba528b6867962d4",
+ "_spec": "onetime@^2.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/restore-cursor",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/onetime/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "mimic-fn": "^1.0.0"
+ },
+ "deprecated": false,
+ "description": "Ensure a function is only called once",
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/onetime#readme",
+ "keywords": [
+ "once",
+ "function",
+ "one",
+ "onetime",
+ "func",
+ "fn",
+ "single",
+ "call",
+ "called",
+ "prevent"
+ ],
+ "license": "MIT",
+ "name": "onetime",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/onetime.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "2.0.1"
+}
diff --git a/tools/node_modules/eslint/node_modules/onetime/readme.md b/tools/node_modules/eslint/node_modules/onetime/readme.md
new file mode 100644
index 0000000000..95eb3b7c9e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/onetime/readme.md
@@ -0,0 +1,65 @@
+# onetime [![Build Status](https://travis-ci.org/sindresorhus/onetime.svg?branch=master)](https://travis-ci.org/sindresorhus/onetime)
+
+> Ensure a function is only called once
+
+When called multiple times it will return the return value from the first call.
+
+*Unlike the module [once](https://github.com/isaacs/once), this one isn't naughty extending `Function.prototype`.*
+
+
+## Install
+
+```
+$ npm install --save onetime
+```
+
+
+## Usage
+
+```js
+let i = 0;
+
+const foo = onetime(() => i++);
+
+foo(); //=> 0
+foo(); //=> 0
+foo(); //=> 0
+```
+
+```js
+const foo = onetime(() => {}, {throw: true});
+
+foo();
+
+foo();
+//=> Error: Function `foo` can only be called once
+```
+
+
+## API
+
+### onetime(fn, [options])
+
+Returns a function that only calls `fn` once.
+
+#### fn
+
+Type: `Function`
+
+Function that should only be called once.
+
+#### options
+
+Type: `Object`
+
+##### throw
+
+Type: `boolean`<br>
+Default: `false`
+
+Throw an error when called more than once.
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/tools/node_modules/eslint/node_modules/optionator/LICENSE b/tools/node_modules/eslint/node_modules/optionator/LICENSE
new file mode 100644
index 0000000000..525b11850e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/optionator/LICENSE
@@ -0,0 +1,22 @@
+Copyright (c) George Zahariev
+
+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/tools/node_modules/eslint/node_modules/optionator/README.md b/tools/node_modules/eslint/node_modules/optionator/README.md
new file mode 100644
index 0000000000..91c59d379b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/optionator/README.md
@@ -0,0 +1,236 @@
+# Optionator
+<a name="optionator" />
+
+Optionator is a JavaScript option parsing and help generation library used by [eslint](http://eslint.org), [Grasp](http://graspjs.com), [LiveScript](http://livescript.net), [esmangle](https://github.com/estools/esmangle), [escodegen](https://github.com/estools/escodegen), and [many more](https://www.npmjs.com/browse/depended/optionator).
+
+For an online demo, check out the [Grasp online demo](http://www.graspjs.com/#demo).
+
+[About](#about) &middot; [Usage](#usage) &middot; [Settings Format](#settings-format) &middot; [Argument Format](#argument-format)
+
+## Why?
+The problem with other option parsers, such as `yargs` or `minimist`, is they just accept all input, valid or not.
+With Optionator, if you mistype an option, it will give you an error (with a suggestion for what you meant).
+If you give the wrong type of argument for an option, it will give you an error rather than supplying the wrong input to your application.
+
+ $ cmd --halp
+ Invalid option '--halp' - perhaps you meant '--help'?
+
+ $ cmd --count str
+ Invalid value for option 'count' - expected type Int, received value: str.
+
+Other helpful features include reformatting the help text based on the size of the console, so that it fits even if the console is narrow, and accepting not just an array (eg. process.argv), but a string or object as well, making things like testing much easier.
+
+## About
+Optionator uses [type-check](https://github.com/gkz/type-check) and [levn](https://github.com/gkz/levn) behind the scenes to cast and verify input according the specified types.
+
+MIT license. Version 0.8.2
+
+ npm install optionator
+
+For updates on Optionator, [follow me on twitter](https://twitter.com/gkzahariev).
+
+## Usage
+`require('optionator');` returns a function. It has one property, `VERSION`, the current version of the library as a string. This function is called with an object specifying your options and other information, see the [settings format section](#settings-format). This in turn returns an object with three properties, `parse`, `parseArgv`, `generateHelp`, and `generateHelpForOption`, which are all functions.
+
+```js
+var optionator = require('optionator')({
+ prepend: 'Usage: cmd [options]',
+ append: 'Version 1.0.0',
+ options: [{
+ option: 'help',
+ alias: 'h',
+ type: 'Boolean',
+ description: 'displays help'
+ }, {
+ option: 'count',
+ alias: 'c',
+ type: 'Int',
+ description: 'number of things',
+ example: 'cmd --count 2'
+ }]
+});
+
+var options = optionator.parseArgv(process.argv);
+if (options.help) {
+ console.log(optionator.generateHelp());
+}
+...
+```
+
+### parse(input, parseOptions)
+`parse` processes the `input` according to your settings, and returns an object with the results.
+
+##### arguments
+* input - `[String] | Object | String` - the input you wish to parse
+* parseOptions - `{slice: Int}` - all options optional
+ - `slice` specifies how much to slice away from the beginning if the input is an array or string - by default `0` for string, `2` for array (works with `process.argv`)
+
+##### returns
+`Object` - the parsed options, each key is a camelCase version of the option name (specified in dash-case), and each value is the processed value for that option. Positional values are in an array under the `_` key.
+
+##### example
+```js
+parse(['node', 't.js', '--count', '2', 'positional']); // {count: 2, _: ['positional']}
+parse('--count 2 positional'); // {count: 2, _: ['positional']}
+parse({count: 2, _:['positional']}); // {count: 2, _: ['positional']}
+```
+
+### parseArgv(input)
+`parseArgv` works exactly like `parse`, but only for array input and it slices off the first two elements.
+
+##### arguments
+* input - `[String]` - the input you wish to parse
+
+##### returns
+See "returns" section in "parse"
+
+##### example
+```js
+parseArgv(process.argv);
+```
+
+### generateHelp(helpOptions)
+`generateHelp` produces help text based on your settings.
+
+##### arguments
+* helpOptions - `{showHidden: Boolean, interpolate: Object}` - all options optional
+ - `showHidden` specifies whether to show options with `hidden: true` specified, by default it is `false`
+ - `interpolate` specify data to be interpolated in `prepend` and `append` text, `{{key}}` is the format - eg. `generateHelp({interpolate:{version: '0.4.2'}})`, will change this `append` text: `Version {{version}}` to `Version 0.4.2`
+
+##### returns
+`String` - the generated help text
+
+##### example
+```js
+generateHelp(); /*
+"Usage: cmd [options] positional
+
+ -h, --help displays help
+ -c, --count Int number of things
+
+Version 1.0.0
+"*/
+```
+
+### generateHelpForOption(optionName)
+`generateHelpForOption` produces expanded help text for the specified with `optionName` option. If an `example` was specified for the option, it will be displayed, and if a `longDescription` was specified, it will display that instead of the `description`.
+
+##### arguments
+* optionName - `String` - the name of the option to display
+
+##### returns
+`String` - the generated help text for the option
+
+##### example
+```js
+generateHelpForOption('count'); /*
+"-c, --count Int
+description: number of things
+example: cmd --count 2
+"*/
+```
+
+## Settings Format
+When your `require('optionator')`, you get a function that takes in a settings object. This object has the type:
+
+ {
+ prepend: String,
+ append: String,
+ options: [{heading: String} | {
+ option: String,
+ alias: [String] | String,
+ type: String,
+ enum: [String],
+ default: String,
+ restPositional: Boolean,
+ required: Boolean,
+ overrideRequired: Boolean,
+ dependsOn: [String] | String,
+ concatRepeatedArrays: Boolean | (Boolean, Object),
+ mergeRepeatedObjects: Boolean,
+ description: String,
+ longDescription: String,
+ example: [String] | String
+ }],
+ helpStyle: {
+ aliasSeparator: String,
+ typeSeparator: String,
+ descriptionSeparator: String,
+ initialIndent: Int,
+ secondaryIndent: Int,
+ maxPadFactor: Number
+ },
+ mutuallyExclusive: [[String | [String]]],
+ concatRepeatedArrays: Boolean | (Boolean, Object), // deprecated, set in defaults object
+ mergeRepeatedObjects: Boolean, // deprecated, set in defaults object
+ positionalAnywhere: Boolean,
+ typeAliases: Object,
+ defaults: Object
+ }
+
+All of the properties are optional (the `Maybe` has been excluded for brevities sake), except for having either `heading: String` or `option: String` in each object in the `options` array.
+
+### Top Level Properties
+* `prepend` is an optional string to be placed before the options in the help text
+* `append` is an optional string to be placed after the options in the help text
+* `options` is a required array specifying your options and headings, the options and headings will be displayed in the order specified
+* `helpStyle` is an optional object which enables you to change the default appearance of some aspects of the help text
+* `mutuallyExclusive` is an optional array of arrays of either strings or arrays of strings. The top level array is a list of rules, each rule is a list of elements - each element can be either a string (the name of an option), or a list of strings (a group of option names) - there will be an error if more than one element is present
+* `concatRepeatedArrays` see description under the "Option Properties" heading - use at the top level is deprecated, if you want to set this for all options, use the `defaults` property
+* `mergeRepeatedObjects` see description under the "Option Properties" heading - use at the top level is deprecated, if you want to set this for all options, use the `defaults` property
+* `positionalAnywhere` is an optional boolean (defaults to `true`) - when `true` it allows positional arguments anywhere, when `false`, all arguments after the first positional one are taken to be positional as well, even if they look like a flag. For example, with `positionalAnywhere: false`, the arguments `--flag --boom 12 --crack` would have two positional arguments: `12` and `--crack`
+* `typeAliases` is an optional object, it allows you to set aliases for types, eg. `{Path: 'String'}` would allow you to use the type `Path` as an alias for the type `String`
+* `defaults` is an optional object following the option properties format, which specifies default values for all options. A default will be overridden if manually set. For example, you can do `default: { type: "String" }` to set the default type of all options to `String`, and then override that default in an individual option by setting the `type` property
+
+#### Heading Properties
+* `heading` a required string, the name of the heading
+
+#### Option Properties
+* `option` the required name of the option - use dash-case, without the leading dashes
+* `alias` is an optional string or array of strings which specify any aliases for the option
+* `type` is a required string in the [type check](https://github.com/gkz/type-check) [format](https://github.com/gkz/type-check#type-format), this will be used to cast the inputted value and validate it
+* `enum` is an optional array of strings, each string will be parsed by [levn](https://github.com/gkz/levn) - the argument value must be one of the resulting values - each potential value must validate against the specified `type`
+* `default` is a optional string, which will be parsed by [levn](https://github.com/gkz/levn) and used as the default value if none is set - the value must validate against the specified `type`
+* `restPositional` is an optional boolean - if set to `true`, everything after the option will be taken to be a positional argument, even if it looks like a named argument
+* `required` is an optional boolean - if set to `true`, the option parsing will fail if the option is not defined
+* `overrideRequired` is a optional boolean - if set to `true` and the option is used, and there is another option which is required but not set, it will override the need for the required option and there will be no error - this is useful if you have required options and want to use `--help` or `--version` flags
+* `concatRepeatedArrays` is an optional boolean or tuple with boolean and options object (defaults to `false`) - when set to `true` and an option contains an array value and is repeated, the subsequent values for the flag will be appended rather than overwriting the original value - eg. option `g` of type `[String]`: `-g a -g b -g c,d` will result in `['a','b','c','d']`
+
+ You can supply an options object by giving the following value: `[true, options]`. The one currently supported option is `oneValuePerFlag`, this only allows one array value per flag. This is useful if your potential values contain a comma.
+* `mergeRepeatedObjects` is an optional boolean (defaults to `false`) - when set to `true` and an option contains an object value and is repeated, the subsequent values for the flag will be merged rather than overwriting the original value - eg. option `g` of type `Object`: `-g a:1 -g b:2 -g c:3,d:4` will result in `{a: 1, b: 2, c: 3, d: 4}`
+* `dependsOn` is an optional string or array of strings - if simply a string (the name of another option), it will make sure that that other option is set, if an array of strings, depending on whether `'and'` or `'or'` is first, it will either check whether all (`['and', 'option-a', 'option-b']`), or at least one (`['or', 'option-a', 'option-b']`) other options are set
+* `description` is an optional string, which will be displayed next to the option in the help text
+* `longDescription` is an optional string, it will be displayed instead of the `description` when `generateHelpForOption` is used
+* `example` is an optional string or array of strings with example(s) for the option - these will be displayed when `generateHelpForOption` is used
+
+#### Help Style Properties
+* `aliasSeparator` is an optional string, separates multiple names from each other - default: ' ,'
+* `typeSeparator` is an optional string, separates the type from the names - default: ' '
+* `descriptionSeparator` is an optional string , separates the description from the padded name and type - default: ' '
+* `initialIndent` is an optional int - the amount of indent for options - default: 2
+* `secondaryIndent` is an optional int - the amount of indent if wrapped fully (in addition to the initial indent) - default: 4
+* `maxPadFactor` is an optional number - affects the default level of padding for the names/type, it is multiplied by the average of the length of the names/type - default: 1.5
+
+## Argument Format
+At the highest level there are two types of arguments: named, and positional.
+
+Name arguments of any length are prefixed with `--` (eg. `--go`), and those of one character may be prefixed with either `--` or `-` (eg. `-g`).
+
+There are two types of named arguments: boolean flags (eg. `--problemo`, `-p`) which take no value and result in a `true` if they are present, the falsey `undefined` if they are not present, or `false` if present and explicitly prefixed with `no` (eg. `--no-problemo`). Named arguments with values (eg. `--tseries 800`, `-t 800`) are the other type. If the option has a type `Boolean` it will automatically be made into a boolean flag. Any other type results in a named argument that takes a value.
+
+For more information about how to properly set types to get the value you want, take a look at the [type check](https://github.com/gkz/type-check) and [levn](https://github.com/gkz/levn) pages.
+
+You can group single character arguments that use a single `-`, however all except the last must be boolean flags (which take no value). The last may be a boolean flag, or an argument which takes a value - eg. `-ba 2` is equivalent to `-b -a 2`.
+
+Positional arguments are all those values which do not fall under the above - they can be anywhere, not just at the end. For example, in `cmd -b one -a 2 two` where `b` is a boolean flag, and `a` has the type `Number`, there are two positional arguments, `one` and `two`.
+
+Everything after an `--` is positional, even if it looks like a named argument.
+
+You may optionally use `=` to separate option names from values, for example: `--count=2`.
+
+If you specify the option `NUM`, then any argument using a single `-` followed by a number will be valid and will set the value of `NUM`. Eg. `-2` will be parsed into `NUM: 2`.
+
+If duplicate named arguments are present, the last one will be taken.
+
+## Technical About
+`optionator` is written in [LiveScript](http://livescript.net/) - a language that compiles to JavaScript. It uses [levn](https://github.com/gkz/levn) to cast arguments to their specified type, and uses [type-check](https://github.com/gkz/type-check) to validate values. It also uses the [prelude.ls](http://preludels.com/) library.
diff --git a/tools/node_modules/eslint/node_modules/optionator/lib/help.js b/tools/node_modules/eslint/node_modules/optionator/lib/help.js
new file mode 100644
index 0000000000..a459c02c26
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/optionator/lib/help.js
@@ -0,0 +1,247 @@
+// Generated by LiveScript 1.5.0
+(function(){
+ var ref$, id, find, sort, min, max, map, unlines, nameToRaw, dasherize, naturalJoin, wordwrap, getPreText, setHelpStyleDefaults, generateHelpForOption, generateHelp;
+ ref$ = require('prelude-ls'), id = ref$.id, find = ref$.find, sort = ref$.sort, min = ref$.min, max = ref$.max, map = ref$.map, unlines = ref$.unlines;
+ ref$ = require('./util'), nameToRaw = ref$.nameToRaw, dasherize = ref$.dasherize, naturalJoin = ref$.naturalJoin;
+ wordwrap = require('wordwrap');
+ getPreText = function(option, arg$, maxWidth){
+ var mainName, shortNames, ref$, longNames, type, description, aliasSeparator, typeSeparator, initialIndent, names, namesString, namesStringLen, typeSeparatorString, typeSeparatorStringLen, wrap;
+ mainName = option.option, shortNames = (ref$ = option.shortNames) != null
+ ? ref$
+ : [], longNames = (ref$ = option.longNames) != null
+ ? ref$
+ : [], type = option.type, description = option.description;
+ aliasSeparator = arg$.aliasSeparator, typeSeparator = arg$.typeSeparator, initialIndent = arg$.initialIndent;
+ if (option.negateName) {
+ mainName = "no-" + mainName;
+ if (longNames) {
+ longNames = map(function(it){
+ return "no-" + it;
+ }, longNames);
+ }
+ }
+ names = mainName.length === 1
+ ? [mainName].concat(shortNames, longNames)
+ : shortNames.concat([mainName], longNames);
+ namesString = map(nameToRaw, names).join(aliasSeparator);
+ namesStringLen = namesString.length;
+ typeSeparatorString = mainName === 'NUM' ? '::' : typeSeparator;
+ typeSeparatorStringLen = typeSeparatorString.length;
+ if (maxWidth != null && !option.boolean && initialIndent + namesStringLen + typeSeparatorStringLen + type.length > maxWidth) {
+ wrap = wordwrap(initialIndent + namesStringLen + typeSeparatorStringLen, maxWidth);
+ return namesString + "" + typeSeparatorString + wrap(type).replace(/^\s+/, '');
+ } else {
+ return namesString + "" + (option.boolean
+ ? ''
+ : typeSeparatorString + "" + type);
+ }
+ };
+ setHelpStyleDefaults = function(helpStyle){
+ helpStyle.aliasSeparator == null && (helpStyle.aliasSeparator = ', ');
+ helpStyle.typeSeparator == null && (helpStyle.typeSeparator = ' ');
+ helpStyle.descriptionSeparator == null && (helpStyle.descriptionSeparator = ' ');
+ helpStyle.initialIndent == null && (helpStyle.initialIndent = 2);
+ helpStyle.secondaryIndent == null && (helpStyle.secondaryIndent = 4);
+ helpStyle.maxPadFactor == null && (helpStyle.maxPadFactor = 1.5);
+ };
+ generateHelpForOption = function(getOption, arg$){
+ var stdout, helpStyle, ref$;
+ stdout = arg$.stdout, helpStyle = (ref$ = arg$.helpStyle) != null
+ ? ref$
+ : {};
+ setHelpStyleDefaults(helpStyle);
+ return function(optionName){
+ var maxWidth, wrap, option, e, pre, defaultString, restPositionalString, description, fullDescription, that, preDescription, descriptionString, exampleString, examples, seperator;
+ maxWidth = stdout != null && stdout.isTTY ? stdout.columns - 1 : null;
+ wrap = maxWidth ? wordwrap(maxWidth) : id;
+ try {
+ option = getOption(dasherize(optionName));
+ } catch (e$) {
+ e = e$;
+ return e.message;
+ }
+ pre = getPreText(option, helpStyle);
+ defaultString = option['default'] && !option.negateName ? "\ndefault: " + option['default'] : '';
+ restPositionalString = option.restPositional ? 'Everything after this option is considered a positional argument, even if it looks like an option.' : '';
+ description = option.longDescription || option.description && sentencize(option.description);
+ fullDescription = description && restPositionalString
+ ? description + " " + restPositionalString
+ : (that = description || restPositionalString) ? that : '';
+ preDescription = 'description:';
+ descriptionString = !fullDescription
+ ? ''
+ : maxWidth && fullDescription.length - 1 - preDescription.length > maxWidth
+ ? "\n" + preDescription + "\n" + wrap(fullDescription)
+ : "\n" + preDescription + " " + fullDescription;
+ exampleString = (that = option.example) ? (examples = [].concat(that), examples.length > 1
+ ? "\nexamples:\n" + unlines(examples)
+ : "\nexample: " + examples[0]) : '';
+ seperator = defaultString || descriptionString || exampleString ? "\n" + repeatString$('=', pre.length) : '';
+ return pre + "" + seperator + defaultString + descriptionString + exampleString;
+ };
+ };
+ generateHelp = function(arg$){
+ var options, prepend, append, helpStyle, ref$, stdout, aliasSeparator, typeSeparator, descriptionSeparator, maxPadFactor, initialIndent, secondaryIndent;
+ options = arg$.options, prepend = arg$.prepend, append = arg$.append, helpStyle = (ref$ = arg$.helpStyle) != null
+ ? ref$
+ : {}, stdout = arg$.stdout;
+ setHelpStyleDefaults(helpStyle);
+ aliasSeparator = helpStyle.aliasSeparator, typeSeparator = helpStyle.typeSeparator, descriptionSeparator = helpStyle.descriptionSeparator, maxPadFactor = helpStyle.maxPadFactor, initialIndent = helpStyle.initialIndent, secondaryIndent = helpStyle.secondaryIndent;
+ return function(arg$){
+ var ref$, showHidden, interpolate, maxWidth, output, out, data, optionCount, totalPreLen, preLens, i$, len$, item, that, pre, descParts, desc, preLen, sortedPreLens, maxPreLen, preLenMean, x, padAmount, descSepLen, fullWrapCount, partialWrapCount, descLen, totalLen, initialSpace, wrapAllFull, i, wrap;
+ ref$ = arg$ != null
+ ? arg$
+ : {}, showHidden = ref$.showHidden, interpolate = ref$.interpolate;
+ maxWidth = stdout != null && stdout.isTTY ? stdout.columns - 1 : null;
+ output = [];
+ out = function(it){
+ return output.push(it != null ? it : '');
+ };
+ if (prepend) {
+ out(interpolate ? interp(prepend, interpolate) : prepend);
+ out();
+ }
+ data = [];
+ optionCount = 0;
+ totalPreLen = 0;
+ preLens = [];
+ for (i$ = 0, len$ = (ref$ = options).length; i$ < len$; ++i$) {
+ item = ref$[i$];
+ if (showHidden || !item.hidden) {
+ if (that = item.heading) {
+ data.push({
+ type: 'heading',
+ value: that
+ });
+ } else {
+ pre = getPreText(item, helpStyle, maxWidth);
+ descParts = [];
+ if ((that = item.description) != null) {
+ descParts.push(that);
+ }
+ if (that = item['enum']) {
+ descParts.push("either: " + naturalJoin(that));
+ }
+ if (item['default'] && !item.negateName) {
+ descParts.push("default: " + item['default']);
+ }
+ desc = descParts.join(' - ');
+ data.push({
+ type: 'option',
+ pre: pre,
+ desc: desc,
+ descLen: desc.length
+ });
+ preLen = pre.length;
+ optionCount++;
+ totalPreLen += preLen;
+ preLens.push(preLen);
+ }
+ }
+ }
+ sortedPreLens = sort(preLens);
+ maxPreLen = sortedPreLens[sortedPreLens.length - 1];
+ preLenMean = initialIndent + totalPreLen / optionCount;
+ x = optionCount > 2 ? min(preLenMean * maxPadFactor, maxPreLen) : maxPreLen;
+ for (i$ = sortedPreLens.length - 1; i$ >= 0; --i$) {
+ preLen = sortedPreLens[i$];
+ if (preLen <= x) {
+ padAmount = preLen;
+ break;
+ }
+ }
+ descSepLen = descriptionSeparator.length;
+ if (maxWidth != null) {
+ fullWrapCount = 0;
+ partialWrapCount = 0;
+ for (i$ = 0, len$ = data.length; i$ < len$; ++i$) {
+ item = data[i$];
+ if (item.type === 'option') {
+ pre = item.pre, desc = item.desc, descLen = item.descLen;
+ if (descLen === 0) {
+ item.wrap = 'none';
+ } else {
+ preLen = max(padAmount, pre.length) + initialIndent + descSepLen;
+ totalLen = preLen + descLen;
+ if (totalLen > maxWidth) {
+ if (descLen / 2.5 > maxWidth - preLen) {
+ fullWrapCount++;
+ item.wrap = 'full';
+ } else {
+ partialWrapCount++;
+ item.wrap = 'partial';
+ }
+ } else {
+ item.wrap = 'none';
+ }
+ }
+ }
+ }
+ }
+ initialSpace = repeatString$(' ', initialIndent);
+ wrapAllFull = optionCount > 1 && fullWrapCount + partialWrapCount * 0.5 > optionCount * 0.5;
+ for (i$ = 0, len$ = data.length; i$ < len$; ++i$) {
+ i = i$;
+ item = data[i$];
+ if (item.type === 'heading') {
+ if (i !== 0) {
+ out();
+ }
+ out(item.value + ":");
+ } else {
+ pre = item.pre, desc = item.desc, descLen = item.descLen, wrap = item.wrap;
+ if (maxWidth != null) {
+ if (wrapAllFull || wrap === 'full') {
+ wrap = wordwrap(initialIndent + secondaryIndent, maxWidth);
+ out(initialSpace + "" + pre + "\n" + wrap(desc));
+ continue;
+ } else if (wrap === 'partial') {
+ wrap = wordwrap(initialIndent + descSepLen + max(padAmount, pre.length), maxWidth);
+ out(initialSpace + "" + pad(pre, padAmount) + descriptionSeparator + wrap(desc).replace(/^\s+/, ''));
+ continue;
+ }
+ }
+ if (descLen === 0) {
+ out(initialSpace + "" + pre);
+ } else {
+ out(initialSpace + "" + pad(pre, padAmount) + descriptionSeparator + desc);
+ }
+ }
+ }
+ if (append) {
+ out();
+ out(interpolate ? interp(append, interpolate) : append);
+ }
+ return unlines(output);
+ };
+ };
+ function pad(str, num){
+ var len, padAmount;
+ len = str.length;
+ padAmount = num - len;
+ return str + "" + repeatString$(' ', padAmount > 0 ? padAmount : 0);
+ }
+ function sentencize(str){
+ var first, rest, period;
+ first = str.charAt(0).toUpperCase();
+ rest = str.slice(1);
+ period = /[\.!\?]$/.test(str) ? '' : '.';
+ return first + "" + rest + period;
+ }
+ function interp(string, object){
+ return string.replace(/{{([a-zA-Z$_][a-zA-Z$_0-9]*)}}/g, function(arg$, key){
+ var ref$;
+ return (ref$ = object[key]) != null
+ ? ref$
+ : "{{" + key + "}}";
+ });
+ }
+ module.exports = {
+ generateHelp: generateHelp,
+ generateHelpForOption: generateHelpForOption
+ };
+ function repeatString$(str, n){
+ for (var r = ''; n > 0; (n >>= 1) && (str += str)) if (n & 1) r += str;
+ return r;
+ }
+}).call(this);
diff --git a/tools/node_modules/eslint/node_modules/optionator/lib/index.js b/tools/node_modules/eslint/node_modules/optionator/lib/index.js
new file mode 100644
index 0000000000..d947286c76
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/optionator/lib/index.js
@@ -0,0 +1,465 @@
+// Generated by LiveScript 1.5.0
+(function(){
+ var VERSION, ref$, id, map, compact, any, groupBy, partition, chars, isItNaN, keys, Obj, camelize, deepIs, closestString, nameToRaw, dasherize, naturalJoin, generateHelp, generateHelpForOption, parsedTypeCheck, parseType, parseLevn, camelizeKeys, parseString, main, toString$ = {}.toString, slice$ = [].slice;
+ VERSION = '0.8.2';
+ ref$ = require('prelude-ls'), id = ref$.id, map = ref$.map, compact = ref$.compact, any = ref$.any, groupBy = ref$.groupBy, partition = ref$.partition, chars = ref$.chars, isItNaN = ref$.isItNaN, keys = ref$.keys, Obj = ref$.Obj, camelize = ref$.camelize;
+ deepIs = require('deep-is');
+ ref$ = require('./util'), closestString = ref$.closestString, nameToRaw = ref$.nameToRaw, dasherize = ref$.dasherize, naturalJoin = ref$.naturalJoin;
+ ref$ = require('./help'), generateHelp = ref$.generateHelp, generateHelpForOption = ref$.generateHelpForOption;
+ ref$ = require('type-check'), parsedTypeCheck = ref$.parsedTypeCheck, parseType = ref$.parseType;
+ parseLevn = require('levn').parsedTypeParse;
+ camelizeKeys = function(obj){
+ var key, value, resultObj$ = {};
+ for (key in obj) {
+ value = obj[key];
+ resultObj$[camelize(key)] = value;
+ }
+ return resultObj$;
+ };
+ parseString = function(string){
+ var assignOpt, regex, replaceRegex, result, this$ = this;
+ assignOpt = '--?[a-zA-Z][-a-z-A-Z0-9]*=';
+ regex = RegExp('(?:' + assignOpt + ')?(?:\'(?:\\\\\'|[^\'])+\'|"(?:\\\\"|[^"])+")|[^\'"\\s]+', 'g');
+ replaceRegex = RegExp('^(' + assignOpt + ')?[\'"]([\\s\\S]*)[\'"]$');
+ result = map(function(it){
+ return it.replace(replaceRegex, '$1$2');
+ }, string.match(regex) || []);
+ return result;
+ };
+ main = function(libOptions){
+ var opts, defaults, required, traverse, getOption, parse;
+ opts = {};
+ defaults = {};
+ required = [];
+ if (toString$.call(libOptions.stdout).slice(8, -1) === 'Undefined') {
+ libOptions.stdout = process.stdout;
+ }
+ libOptions.positionalAnywhere == null && (libOptions.positionalAnywhere = true);
+ libOptions.typeAliases == null && (libOptions.typeAliases = {});
+ libOptions.defaults == null && (libOptions.defaults = {});
+ if (libOptions.concatRepeatedArrays != null) {
+ libOptions.defaults.concatRepeatedArrays = libOptions.concatRepeatedArrays;
+ }
+ if (libOptions.mergeRepeatedObjects != null) {
+ libOptions.defaults.mergeRepeatedObjects = libOptions.mergeRepeatedObjects;
+ }
+ traverse = function(options){
+ var i$, len$, option, name, k, ref$, v, type, that, e, parsedPossibilities, parsedType, j$, len1$, possibility, rawDependsType, dependsOpts, dependsType, cra, alias, shortNames, longNames, this$ = this;
+ if (toString$.call(options).slice(8, -1) !== 'Array') {
+ throw new Error('No options defined.');
+ }
+ for (i$ = 0, len$ = options.length; i$ < len$; ++i$) {
+ option = options[i$];
+ if (option.heading == null) {
+ name = option.option;
+ if (opts[name] != null) {
+ throw new Error("Option '" + name + "' already defined.");
+ }
+ for (k in ref$ = libOptions.defaults) {
+ v = ref$[k];
+ option[k] == null && (option[k] = v);
+ }
+ if (option.type === 'Boolean') {
+ option.boolean == null && (option.boolean = true);
+ }
+ if (option.parsedType == null) {
+ if (!option.type) {
+ throw new Error("No type defined for option '" + name + "'.");
+ }
+ try {
+ type = (that = libOptions.typeAliases[option.type]) != null
+ ? that
+ : option.type;
+ option.parsedType = parseType(type);
+ } catch (e$) {
+ e = e$;
+ throw new Error("Option '" + name + "': Error parsing type '" + option.type + "': " + e.message);
+ }
+ }
+ if (option['default']) {
+ try {
+ defaults[name] = parseLevn(option.parsedType, option['default']);
+ } catch (e$) {
+ e = e$;
+ throw new Error("Option '" + name + "': Error parsing default value '" + option['default'] + "' for type '" + option.type + "': " + e.message);
+ }
+ }
+ if (option['enum'] && !option.parsedPossiblities) {
+ parsedPossibilities = [];
+ parsedType = option.parsedType;
+ for (j$ = 0, len1$ = (ref$ = option['enum']).length; j$ < len1$; ++j$) {
+ possibility = ref$[j$];
+ try {
+ parsedPossibilities.push(parseLevn(parsedType, possibility));
+ } catch (e$) {
+ e = e$;
+ throw new Error("Option '" + name + "': Error parsing enum value '" + possibility + "' for type '" + option.type + "': " + e.message);
+ }
+ }
+ option.parsedPossibilities = parsedPossibilities;
+ }
+ if (that = option.dependsOn) {
+ if (that.length) {
+ ref$ = [].concat(option.dependsOn), rawDependsType = ref$[0], dependsOpts = slice$.call(ref$, 1);
+ dependsType = rawDependsType.toLowerCase();
+ if (dependsOpts.length) {
+ if (dependsType === 'and' || dependsType === 'or') {
+ option.dependsOn = [dependsType].concat(slice$.call(dependsOpts));
+ } else {
+ throw new Error("Option '" + name + "': If you have more than one dependency, you must specify either 'and' or 'or'");
+ }
+ } else {
+ if ((ref$ = dependsType.toLowerCase()) === 'and' || ref$ === 'or') {
+ option.dependsOn = null;
+ } else {
+ option.dependsOn = ['and', rawDependsType];
+ }
+ }
+ } else {
+ option.dependsOn = null;
+ }
+ }
+ if (option.required) {
+ required.push(name);
+ }
+ opts[name] = option;
+ if (option.concatRepeatedArrays != null) {
+ cra = option.concatRepeatedArrays;
+ if ('Boolean' === toString$.call(cra).slice(8, -1)) {
+ option.concatRepeatedArrays = [cra, {}];
+ } else if (cra.length === 1) {
+ option.concatRepeatedArrays = [cra[0], {}];
+ } else if (cra.length !== 2) {
+ throw new Error("Invalid setting for concatRepeatedArrays");
+ }
+ }
+ if (option.alias || option.aliases) {
+ if (name === 'NUM') {
+ throw new Error("-NUM option can't have aliases.");
+ }
+ if (option.alias) {
+ option.aliases == null && (option.aliases = [].concat(option.alias));
+ }
+ for (j$ = 0, len1$ = (ref$ = option.aliases).length; j$ < len1$; ++j$) {
+ alias = ref$[j$];
+ if (opts[alias] != null) {
+ throw new Error("Option '" + alias + "' already defined.");
+ }
+ opts[alias] = option;
+ }
+ ref$ = partition(fn$, option.aliases), shortNames = ref$[0], longNames = ref$[1];
+ option.shortNames == null && (option.shortNames = shortNames);
+ option.longNames == null && (option.longNames = longNames);
+ }
+ if ((!option.aliases || option.shortNames.length === 0) && option.type === 'Boolean' && option['default'] === 'true') {
+ option.negateName = true;
+ }
+ }
+ }
+ function fn$(it){
+ return it.length === 1;
+ }
+ };
+ traverse(libOptions.options);
+ getOption = function(name){
+ var opt, possiblyMeant;
+ opt = opts[name];
+ if (opt == null) {
+ possiblyMeant = closestString(keys(opts), name);
+ throw new Error("Invalid option '" + nameToRaw(name) + "'" + (possiblyMeant ? " - perhaps you meant '" + nameToRaw(possiblyMeant) + "'?" : '.'));
+ }
+ return opt;
+ };
+ parse = function(input, arg$){
+ var slice, obj, positional, restPositional, overrideRequired, prop, setValue, setDefaults, checkRequired, mutuallyExclusiveError, checkMutuallyExclusive, checkDependency, checkDependencies, checkProp, args, key, value, option, ref$, i$, len$, arg, that, result, short, argName, usingAssign, val, flags, len, j$, len1$, i, flag, opt, name, valPrime, negated, noedName;
+ slice = (arg$ != null
+ ? arg$
+ : {}).slice;
+ obj = {};
+ positional = [];
+ restPositional = false;
+ overrideRequired = false;
+ prop = null;
+ setValue = function(name, value){
+ var opt, val, cra, e, currentType;
+ opt = getOption(name);
+ if (opt.boolean) {
+ val = value;
+ } else {
+ try {
+ cra = opt.concatRepeatedArrays;
+ if (cra != null && cra[0] && cra[1].oneValuePerFlag && opt.parsedType.length === 1 && opt.parsedType[0].structure === 'array') {
+ val = [parseLevn(opt.parsedType[0].of, value)];
+ } else {
+ val = parseLevn(opt.parsedType, value);
+ }
+ } catch (e$) {
+ e = e$;
+ throw new Error("Invalid value for option '" + name + "' - expected type " + opt.type + ", received value: " + value + ".");
+ }
+ if (opt['enum'] && !any(function(it){
+ return deepIs(it, val);
+ }, opt.parsedPossibilities)) {
+ throw new Error("Option " + name + ": '" + val + "' not one of " + naturalJoin(opt['enum']) + ".");
+ }
+ }
+ currentType = toString$.call(obj[name]).slice(8, -1);
+ if (obj[name] != null) {
+ if (opt.concatRepeatedArrays != null && opt.concatRepeatedArrays[0] && currentType === 'Array') {
+ obj[name] = obj[name].concat(val);
+ } else if (opt.mergeRepeatedObjects && currentType === 'Object') {
+ import$(obj[name], val);
+ } else {
+ obj[name] = val;
+ }
+ } else {
+ obj[name] = val;
+ }
+ if (opt.restPositional) {
+ restPositional = true;
+ }
+ if (opt.overrideRequired) {
+ overrideRequired = true;
+ }
+ };
+ setDefaults = function(){
+ var name, ref$, value;
+ for (name in ref$ = defaults) {
+ value = ref$[name];
+ if (obj[name] == null) {
+ obj[name] = value;
+ }
+ }
+ };
+ checkRequired = function(){
+ var i$, ref$, len$, name;
+ if (overrideRequired) {
+ return;
+ }
+ for (i$ = 0, len$ = (ref$ = required).length; i$ < len$; ++i$) {
+ name = ref$[i$];
+ if (!obj[name]) {
+ throw new Error("Option " + nameToRaw(name) + " is required.");
+ }
+ }
+ };
+ mutuallyExclusiveError = function(first, second){
+ throw new Error("The options " + nameToRaw(first) + " and " + nameToRaw(second) + " are mutually exclusive - you cannot use them at the same time.");
+ };
+ checkMutuallyExclusive = function(){
+ var rules, i$, len$, rule, present, j$, len1$, element, k$, len2$, opt;
+ rules = libOptions.mutuallyExclusive;
+ if (!rules) {
+ return;
+ }
+ for (i$ = 0, len$ = rules.length; i$ < len$; ++i$) {
+ rule = rules[i$];
+ present = null;
+ for (j$ = 0, len1$ = rule.length; j$ < len1$; ++j$) {
+ element = rule[j$];
+ if (toString$.call(element).slice(8, -1) === 'Array') {
+ for (k$ = 0, len2$ = element.length; k$ < len2$; ++k$) {
+ opt = element[k$];
+ if (opt in obj) {
+ if (present != null) {
+ mutuallyExclusiveError(present, opt);
+ } else {
+ present = opt;
+ break;
+ }
+ }
+ }
+ } else {
+ if (element in obj) {
+ if (present != null) {
+ mutuallyExclusiveError(present, element);
+ } else {
+ present = element;
+ }
+ }
+ }
+ }
+ }
+ };
+ checkDependency = function(option){
+ var dependsOn, type, targetOptionNames, i$, len$, targetOptionName, targetOption;
+ dependsOn = option.dependsOn;
+ if (!dependsOn || option.dependenciesMet) {
+ return true;
+ }
+ type = dependsOn[0], targetOptionNames = slice$.call(dependsOn, 1);
+ for (i$ = 0, len$ = targetOptionNames.length; i$ < len$; ++i$) {
+ targetOptionName = targetOptionNames[i$];
+ targetOption = obj[targetOptionName];
+ if (targetOption && checkDependency(targetOption)) {
+ if (type === 'or') {
+ return true;
+ }
+ } else if (type === 'and') {
+ throw new Error("The option '" + option.option + "' did not have its dependencies met.");
+ }
+ }
+ if (type === 'and') {
+ return true;
+ } else {
+ throw new Error("The option '" + option.option + "' did not meet any of its dependencies.");
+ }
+ };
+ checkDependencies = function(){
+ var name;
+ for (name in obj) {
+ checkDependency(opts[name]);
+ }
+ };
+ checkProp = function(){
+ if (prop) {
+ throw new Error("Value for '" + prop + "' of type '" + getOption(prop).type + "' required.");
+ }
+ };
+ switch (toString$.call(input).slice(8, -1)) {
+ case 'String':
+ args = parseString(input.slice(slice != null ? slice : 0));
+ break;
+ case 'Array':
+ args = input.slice(slice != null ? slice : 2);
+ break;
+ case 'Object':
+ obj = {};
+ for (key in input) {
+ value = input[key];
+ if (key !== '_') {
+ option = getOption(dasherize(key));
+ if (parsedTypeCheck(option.parsedType, value)) {
+ obj[option.option] = value;
+ } else {
+ throw new Error("Option '" + option.option + "': Invalid type for '" + value + "' - expected type '" + option.type + "'.");
+ }
+ }
+ }
+ checkMutuallyExclusive();
+ checkDependencies();
+ setDefaults();
+ checkRequired();
+ return ref$ = camelizeKeys(obj), ref$._ = input._ || [], ref$;
+ default:
+ throw new Error("Invalid argument to 'parse': " + input + ".");
+ }
+ for (i$ = 0, len$ = args.length; i$ < len$; ++i$) {
+ arg = args[i$];
+ if (arg === '--') {
+ restPositional = true;
+ } else if (restPositional) {
+ positional.push(arg);
+ } else {
+ if (that = arg.match(/^(--?)([a-zA-Z][-a-zA-Z0-9]*)(=)?(.*)?$/)) {
+ result = that;
+ checkProp();
+ short = result[1].length === 1;
+ argName = result[2];
+ usingAssign = result[3] != null;
+ val = result[4];
+ if (usingAssign && val == null) {
+ throw new Error("No value for '" + argName + "' specified.");
+ }
+ if (short) {
+ flags = chars(argName);
+ len = flags.length;
+ for (j$ = 0, len1$ = flags.length; j$ < len1$; ++j$) {
+ i = j$;
+ flag = flags[j$];
+ opt = getOption(flag);
+ name = opt.option;
+ if (restPositional) {
+ positional.push(flag);
+ } else if (i === len - 1) {
+ if (usingAssign) {
+ valPrime = opt.boolean ? parseLevn([{
+ type: 'Boolean'
+ }], val) : val;
+ setValue(name, valPrime);
+ } else if (opt.boolean) {
+ setValue(name, true);
+ } else {
+ prop = name;
+ }
+ } else if (opt.boolean) {
+ setValue(name, true);
+ } else {
+ throw new Error("Can't set argument '" + flag + "' when not last flag in a group of short flags.");
+ }
+ }
+ } else {
+ negated = false;
+ if (that = argName.match(/^no-(.+)$/)) {
+ negated = true;
+ noedName = that[1];
+ opt = getOption(noedName);
+ } else {
+ opt = getOption(argName);
+ }
+ name = opt.option;
+ if (opt.boolean) {
+ valPrime = usingAssign ? parseLevn([{
+ type: 'Boolean'
+ }], val) : true;
+ if (negated) {
+ setValue(name, !valPrime);
+ } else {
+ setValue(name, valPrime);
+ }
+ } else {
+ if (negated) {
+ throw new Error("Only use 'no-' prefix for Boolean options, not with '" + noedName + "'.");
+ }
+ if (usingAssign) {
+ setValue(name, val);
+ } else {
+ prop = name;
+ }
+ }
+ }
+ } else if (that = arg.match(/^-([0-9]+(?:\.[0-9]+)?)$/)) {
+ opt = opts.NUM;
+ if (!opt) {
+ throw new Error('No -NUM option defined.');
+ }
+ setValue(opt.option, that[1]);
+ } else {
+ if (prop) {
+ setValue(prop, arg);
+ prop = null;
+ } else {
+ positional.push(arg);
+ if (!libOptions.positionalAnywhere) {
+ restPositional = true;
+ }
+ }
+ }
+ }
+ }
+ checkProp();
+ checkMutuallyExclusive();
+ checkDependencies();
+ setDefaults();
+ checkRequired();
+ return ref$ = camelizeKeys(obj), ref$._ = positional, ref$;
+ };
+ return {
+ parse: parse,
+ parseArgv: function(it){
+ return parse(it, {
+ slice: 2
+ });
+ },
+ generateHelp: generateHelp(libOptions),
+ generateHelpForOption: generateHelpForOption(getOption, libOptions)
+ };
+ };
+ main.VERSION = VERSION;
+ module.exports = main;
+ function import$(obj, src){
+ var own = {}.hasOwnProperty;
+ for (var key in src) if (own.call(src, key)) obj[key] = src[key];
+ return obj;
+ }
+}).call(this);
diff --git a/tools/node_modules/eslint/node_modules/optionator/lib/util.js b/tools/node_modules/eslint/node_modules/optionator/lib/util.js
new file mode 100644
index 0000000000..d5c972def1
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/optionator/lib/util.js
@@ -0,0 +1,54 @@
+// Generated by LiveScript 1.5.0
+(function(){
+ var prelude, map, sortBy, fl, closestString, nameToRaw, dasherize, naturalJoin;
+ prelude = require('prelude-ls'), map = prelude.map, sortBy = prelude.sortBy;
+ fl = require('fast-levenshtein');
+ closestString = function(possibilities, input){
+ var distances, ref$, string, distance, this$ = this;
+ if (!possibilities.length) {
+ return;
+ }
+ distances = map(function(it){
+ var ref$, longer, shorter;
+ ref$ = input.length > it.length
+ ? [input, it]
+ : [it, input], longer = ref$[0], shorter = ref$[1];
+ return {
+ string: it,
+ distance: fl.get(longer, shorter)
+ };
+ })(
+ possibilities);
+ ref$ = sortBy(function(it){
+ return it.distance;
+ }, distances)[0], string = ref$.string, distance = ref$.distance;
+ return string;
+ };
+ nameToRaw = function(name){
+ if (name.length === 1 || name === 'NUM') {
+ return "-" + name;
+ } else {
+ return "--" + name;
+ }
+ };
+ dasherize = function(string){
+ if (/^[A-Z]/.test(string)) {
+ return string;
+ } else {
+ return prelude.dasherize(string);
+ }
+ };
+ naturalJoin = function(array){
+ if (array.length < 3) {
+ return array.join(' or ');
+ } else {
+ return array.slice(0, -1).join(', ') + ", or " + array[array.length - 1];
+ }
+ };
+ module.exports = {
+ closestString: closestString,
+ nameToRaw: nameToRaw,
+ dasherize: dasherize,
+ naturalJoin: naturalJoin
+ };
+}).call(this);
diff --git a/tools/node_modules/eslint/node_modules/optionator/package.json b/tools/node_modules/eslint/node_modules/optionator/package.json
new file mode 100644
index 0000000000..159d418643
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/optionator/package.json
@@ -0,0 +1,74 @@
+{
+ "_from": "optionator@^0.8.2",
+ "_id": "optionator@0.8.2",
+ "_inBundle": false,
+ "_integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=",
+ "_location": "/eslint/optionator",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "optionator@^0.8.2",
+ "name": "optionator",
+ "escapedName": "optionator",
+ "rawSpec": "^0.8.2",
+ "saveSpec": null,
+ "fetchSpec": "^0.8.2"
+ },
+ "_requiredBy": [
+ "/eslint"
+ ],
+ "_resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz",
+ "_shasum": "364c5e409d3f4d6301d6c0b4c05bba50180aeb64",
+ "_spec": "optionator@^0.8.2",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint",
+ "author": {
+ "name": "George Zahariev",
+ "email": "z@georgezahariev.com"
+ },
+ "bugs": {
+ "url": "https://github.com/gkz/optionator/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "deep-is": "~0.1.3",
+ "fast-levenshtein": "~2.0.4",
+ "levn": "~0.3.0",
+ "prelude-ls": "~1.1.2",
+ "type-check": "~0.3.2",
+ "wordwrap": "~1.0.0"
+ },
+ "deprecated": false,
+ "description": "option parsing and help generation",
+ "devDependencies": {
+ "istanbul": "~0.4.1",
+ "livescript": "~1.5.0",
+ "mocha": "~3.0.2"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ },
+ "files": [
+ "lib",
+ "README.md",
+ "LICENSE"
+ ],
+ "homepage": "https://github.com/gkz/optionator",
+ "keywords": [
+ "options",
+ "flags",
+ "option parsing",
+ "cli"
+ ],
+ "license": "MIT",
+ "main": "./lib/",
+ "name": "optionator",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/gkz/optionator.git"
+ },
+ "scripts": {
+ "test": "make test"
+ },
+ "version": "0.8.2"
+}
diff --git a/tools/node_modules/eslint/node_modules/os-tmpdir/index.js b/tools/node_modules/eslint/node_modules/os-tmpdir/index.js
new file mode 100644
index 0000000000..2077b1ce74
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/os-tmpdir/index.js
@@ -0,0 +1,25 @@
+'use strict';
+var isWindows = process.platform === 'win32';
+var trailingSlashRe = isWindows ? /[^:]\\$/ : /.\/$/;
+
+// https://github.com/nodejs/node/blob/3e7a14381497a3b73dda68d05b5130563cdab420/lib/os.js#L25-L43
+module.exports = function () {
+ var path;
+
+ if (isWindows) {
+ path = process.env.TEMP ||
+ process.env.TMP ||
+ (process.env.SystemRoot || process.env.windir) + '\\temp';
+ } else {
+ path = process.env.TMPDIR ||
+ process.env.TMP ||
+ process.env.TEMP ||
+ '/tmp';
+ }
+
+ if (trailingSlashRe.test(path)) {
+ path = path.slice(0, -1);
+ }
+
+ return path;
+};
diff --git a/tools/node_modules/eslint/node_modules/os-tmpdir/license b/tools/node_modules/eslint/node_modules/os-tmpdir/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/os-tmpdir/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/tools/node_modules/eslint/node_modules/os-tmpdir/package.json b/tools/node_modules/eslint/node_modules/os-tmpdir/package.json
new file mode 100644
index 0000000000..fbefd05c41
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/os-tmpdir/package.json
@@ -0,0 +1,73 @@
+{
+ "_from": "os-tmpdir@~1.0.2",
+ "_id": "os-tmpdir@1.0.2",
+ "_inBundle": false,
+ "_integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
+ "_location": "/eslint/os-tmpdir",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "os-tmpdir@~1.0.2",
+ "name": "os-tmpdir",
+ "escapedName": "os-tmpdir",
+ "rawSpec": "~1.0.2",
+ "saveSpec": null,
+ "fetchSpec": "~1.0.2"
+ },
+ "_requiredBy": [
+ "/eslint/tmp"
+ ],
+ "_resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
+ "_shasum": "bbe67406c79aa85c5cfec766fe5734555dfa1274",
+ "_spec": "os-tmpdir@~1.0.2",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/tmp",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/os-tmpdir/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Node.js os.tmpdir() ponyfill",
+ "devDependencies": {
+ "ava": "*",
+ "xo": "^0.16.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/os-tmpdir#readme",
+ "keywords": [
+ "built-in",
+ "core",
+ "ponyfill",
+ "polyfill",
+ "shim",
+ "os",
+ "tmpdir",
+ "tempdir",
+ "tmp",
+ "temp",
+ "dir",
+ "directory",
+ "env",
+ "environment"
+ ],
+ "license": "MIT",
+ "name": "os-tmpdir",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/os-tmpdir.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "1.0.2"
+}
diff --git a/tools/node_modules/eslint/node_modules/os-tmpdir/readme.md b/tools/node_modules/eslint/node_modules/os-tmpdir/readme.md
new file mode 100644
index 0000000000..c09f7ed8d5
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/os-tmpdir/readme.md
@@ -0,0 +1,32 @@
+# os-tmpdir [![Build Status](https://travis-ci.org/sindresorhus/os-tmpdir.svg?branch=master)](https://travis-ci.org/sindresorhus/os-tmpdir)
+
+> Node.js [`os.tmpdir()`](https://nodejs.org/api/os.html#os_os_tmpdir) [ponyfill](https://ponyfill.com)
+
+Use this instead of `require('os').tmpdir()` to get a consistent behavior on different Node.js versions (even 0.8).
+
+
+## Install
+
+```
+$ npm install --save os-tmpdir
+```
+
+
+## Usage
+
+```js
+const osTmpdir = require('os-tmpdir');
+
+osTmpdir();
+//=> '/var/folders/m3/5574nnhn0yj488ccryqr7tc80000gn/T'
+```
+
+
+## API
+
+See the [`os.tmpdir()` docs](https://nodejs.org/api/os.html#os_os_tmpdir).
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/tools/node_modules/eslint/node_modules/parse-entities/LICENSE b/tools/node_modules/eslint/node_modules/parse-entities/LICENSE
new file mode 100644
index 0000000000..611b67581b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/parse-entities/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2015 Titus Wormer <mailto:tituswormer@gmail.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/tools/node_modules/eslint/node_modules/parse-entities/index.js b/tools/node_modules/eslint/node_modules/parse-entities/index.js
new file mode 100644
index 0000000000..f2c9e02a52
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/parse-entities/index.js
@@ -0,0 +1,473 @@
+'use strict';
+
+/* Dependencies. */
+var characterEntities = require('character-entities');
+var legacy = require('character-entities-legacy');
+var invalid = require('character-reference-invalid');
+var decimal = require('is-decimal');
+var hexadecimal = require('is-hexadecimal');
+var alphanumerical = require('is-alphanumerical');
+
+/* Expose. */
+module.exports = wrapper;
+
+/* Methods. */
+var own = {}.hasOwnProperty;
+var fromCharCode = String.fromCharCode;
+var noop = Function.prototype;
+
+/* Characters. */
+var REPLACEMENT = '\uFFFD';
+var FORM_FEED = '\f';
+var AMPERSAND = '&';
+var OCTOTHORP = '#';
+var SEMICOLON = ';';
+var NEWLINE = '\n';
+var X_LOWER = 'x';
+var X_UPPER = 'X';
+var SPACE = ' ';
+var LESS_THAN = '<';
+var EQUAL = '=';
+var EMPTY = '';
+var TAB = '\t';
+
+/* Default settings. */
+var defaults = {
+ warning: null,
+ reference: null,
+ text: null,
+ warningContext: null,
+ referenceContext: null,
+ textContext: null,
+ position: {},
+ additional: null,
+ attribute: false,
+ nonTerminated: true
+};
+
+/* Reference types. */
+var NAMED = 'named';
+var HEXADECIMAL = 'hexadecimal';
+var DECIMAL = 'decimal';
+
+/* Map of bases. */
+var BASE = {};
+
+BASE[HEXADECIMAL] = 16;
+BASE[DECIMAL] = 10;
+
+/* Map of types to tests. Each type of character reference
+ * accepts different characters. This test is used to
+ * detect whether a reference has ended (as the semicolon
+ * is not strictly needed). */
+var TESTS = {};
+
+TESTS[NAMED] = alphanumerical;
+TESTS[DECIMAL] = decimal;
+TESTS[HEXADECIMAL] = hexadecimal;
+
+/* Warning messages. */
+var NAMED_NOT_TERMINATED = 1;
+var NUMERIC_NOT_TERMINATED = 2;
+var NAMED_EMPTY = 3;
+var NUMERIC_EMPTY = 4;
+var NAMED_UNKNOWN = 5;
+var NUMERIC_DISALLOWED = 6;
+var NUMERIC_PROHIBITED = 7;
+
+var NUMERIC_REFERENCE = 'Numeric character references';
+var NAMED_REFERENCE = 'Named character references';
+var TERMINATED = ' must be terminated by a semicolon';
+var VOID = ' cannot be empty';
+
+var MESSAGES = {};
+
+MESSAGES[NAMED_NOT_TERMINATED] = NAMED_REFERENCE + TERMINATED;
+MESSAGES[NUMERIC_NOT_TERMINATED] = NUMERIC_REFERENCE + TERMINATED;
+MESSAGES[NAMED_EMPTY] = NAMED_REFERENCE + VOID;
+MESSAGES[NUMERIC_EMPTY] = NUMERIC_REFERENCE + VOID;
+MESSAGES[NAMED_UNKNOWN] = NAMED_REFERENCE + ' must be known';
+MESSAGES[NUMERIC_DISALLOWED] = NUMERIC_REFERENCE + ' cannot be disallowed';
+MESSAGES[NUMERIC_PROHIBITED] = NUMERIC_REFERENCE + ' cannot be outside the ' +
+ 'permissible Unicode range';
+
+/* Wrap to ensure clean parameters are given to `parse`. */
+function wrapper(value, options) {
+ var settings = {};
+ var option;
+ var key;
+
+ if (!options) {
+ options = {};
+ }
+
+ for (key in defaults) {
+ option = options[key];
+ settings[key] = option === null || option === undefined ? defaults[key] : option;
+ }
+
+ if (settings.position.indent || settings.position.start) {
+ settings.indent = settings.position.indent || [];
+ settings.position = settings.position.start;
+ }
+
+ return parse(value, settings);
+}
+
+/* Parse entities. */
+function parse(value, settings) {
+ var additional = settings.additional;
+ var nonTerminated = settings.nonTerminated;
+ var handleText = settings.text;
+ var handleReference = settings.reference;
+ var handleWarning = settings.warning;
+ var textContext = settings.textContext;
+ var referenceContext = settings.referenceContext;
+ var warningContext = settings.warningContext;
+ var pos = settings.position;
+ var indent = settings.indent || [];
+ var length = value.length;
+ var index = 0;
+ var lines = -1;
+ var column = pos.column || 1;
+ var line = pos.line || 1;
+ var queue = EMPTY;
+ var result = [];
+ var entityCharacters;
+ var terminated;
+ var characters;
+ var character;
+ var reference;
+ var following;
+ var warning;
+ var reason;
+ var output;
+ var entity;
+ var begin;
+ var start;
+ var type;
+ var test;
+ var prev;
+ var next;
+ var diff;
+ var end;
+
+ /* Cache the current point. */
+ prev = now();
+
+ /* Wrap `handleWarning`. */
+ warning = handleWarning ? parseError : noop;
+
+ /* Ensure the algorithm walks over the first character
+ * and the end (inclusive). */
+ index--;
+ length++;
+
+ while (++index < length) {
+ /* If the previous character was a newline. */
+ if (character === NEWLINE) {
+ column = indent[lines] || 1;
+ }
+
+ character = at(index);
+
+ /* Handle anything other than an ampersand,
+ * including newlines and EOF. */
+ if (character !== AMPERSAND) {
+ if (character === NEWLINE) {
+ line++;
+ lines++;
+ column = 0;
+ }
+
+ if (character) {
+ queue += character;
+ column++;
+ } else {
+ flush();
+ }
+ } else {
+ following = at(index + 1);
+
+ /* The behaviour depends on the identity of the next
+ * character. */
+ if (
+ following === TAB ||
+ following === NEWLINE ||
+ following === FORM_FEED ||
+ following === SPACE ||
+ following === LESS_THAN ||
+ following === AMPERSAND ||
+ following === EMPTY ||
+ (additional && following === additional)
+ ) {
+ /* Not a character reference. No characters
+ * are consumed, and nothing is returned.
+ * This is not an error, either. */
+ queue += character;
+ column++;
+
+ continue;
+ }
+
+ start = index + 1;
+ begin = start;
+ end = start;
+
+ /* Numerical entity. */
+ if (following !== OCTOTHORP) {
+ type = NAMED;
+ } else {
+ end = ++begin;
+
+ /* The behaviour further depends on the
+ * character after the U+0023 NUMBER SIGN. */
+ following = at(end);
+
+ if (following === X_LOWER || following === X_UPPER) {
+ /* ASCII hex digits. */
+ type = HEXADECIMAL;
+ end = ++begin;
+ } else {
+ /* ASCII digits. */
+ type = DECIMAL;
+ }
+ }
+
+ entityCharacters = EMPTY;
+ entity = EMPTY;
+ characters = EMPTY;
+ test = TESTS[type];
+ end--;
+
+ while (++end < length) {
+ following = at(end);
+
+ if (!test(following)) {
+ break;
+ }
+
+ characters += following;
+
+ /* Check if we can match a legacy named
+ * reference. If so, we cache that as the
+ * last viable named reference. This
+ * ensures we do not need to walk backwards
+ * later. */
+ if (type === NAMED && own.call(legacy, characters)) {
+ entityCharacters = characters;
+ entity = legacy[characters];
+ }
+ }
+
+ terminated = at(end) === SEMICOLON;
+
+ if (terminated) {
+ end++;
+
+ if (type === NAMED && own.call(characterEntities, characters)) {
+ entityCharacters = characters;
+ entity = characterEntities[characters];
+ }
+ }
+
+ diff = 1 + end - start;
+
+ if (!terminated && !nonTerminated) {
+ /* Empty. */
+ } else if (!characters) {
+ /* An empty (possible) entity is valid, unless
+ * its numeric (thus an ampersand followed by
+ * an octothorp). */
+ if (type !== NAMED) {
+ warning(NUMERIC_EMPTY, diff);
+ }
+ } else if (type === NAMED) {
+ /* An ampersand followed by anything
+ * unknown, and not terminated, is invalid. */
+ if (terminated && !entity) {
+ warning(NAMED_UNKNOWN, 1);
+ } else {
+ /* If theres something after an entity
+ * name which is not known, cap the
+ * reference. */
+ if (entityCharacters !== characters) {
+ end = begin + entityCharacters.length;
+ diff = 1 + end - begin;
+ terminated = false;
+ }
+
+ /* If the reference is not terminated,
+ * warn. */
+ if (!terminated) {
+ reason = entityCharacters ?
+ NAMED_NOT_TERMINATED :
+ NAMED_EMPTY;
+
+ if (!settings.attribute) {
+ warning(reason, diff);
+ } else {
+ following = at(end);
+
+ if (following === EQUAL) {
+ warning(reason, diff);
+ entity = null;
+ } else if (alphanumerical(following)) {
+ entity = null;
+ } else {
+ warning(reason, diff);
+ }
+ }
+ }
+ }
+
+ reference = entity;
+ } else {
+ if (!terminated) {
+ /* All non-terminated numeric entities are
+ * not rendered, and trigger a warning. */
+ warning(NUMERIC_NOT_TERMINATED, diff);
+ }
+
+ /* When terminated and number, parse as
+ * either hexadecimal or decimal. */
+ reference = parseInt(characters, BASE[type]);
+
+ /* Trigger a warning when the parsed number
+ * is prohibited, and replace with
+ * replacement character. */
+ if (isProhibited(reference)) {
+ warning(NUMERIC_PROHIBITED, diff);
+
+ reference = REPLACEMENT;
+ } else if (reference in invalid) {
+ /* Trigger a warning when the parsed number
+ * is disallowed, and replace by an
+ * alternative. */
+ warning(NUMERIC_DISALLOWED, diff);
+
+ reference = invalid[reference];
+ } else {
+ /* Parse the number. */
+ output = EMPTY;
+
+ /* Trigger a warning when the parsed
+ * number should not be used. */
+ if (isWarning(reference)) {
+ warning(NUMERIC_DISALLOWED, diff);
+ }
+
+ /* Stringify the number. */
+ if (reference > 0xFFFF) {
+ reference -= 0x10000;
+ output += fromCharCode((reference >>> (10 & 0x3FF)) | 0xD800);
+ reference = 0xDC00 | (reference & 0x3FF);
+ }
+
+ reference = output + fromCharCode(reference);
+ }
+ }
+
+ /* If we could not find a reference, queue the
+ * checked characters (as normal characters),
+ * and move the pointer to their end. This is
+ * possible because we can be certain neither
+ * newlines nor ampersands are included. */
+ if (!reference) {
+ characters = value.slice(start - 1, end);
+ queue += characters;
+ column += characters.length;
+ index = end - 1;
+ } else {
+ /* Found it! First eat the queued
+ * characters as normal text, then eat
+ * an entity. */
+ flush();
+
+ prev = now();
+ index = end - 1;
+ column += end - start + 1;
+ result.push(reference);
+ next = now();
+ next.offset++;
+
+ if (handleReference) {
+ handleReference.call(referenceContext, reference, {
+ start: prev,
+ end: next
+ }, value.slice(start - 1, end));
+ }
+
+ prev = next;
+ }
+ }
+ }
+
+ /* Return the reduced nodes, and any possible warnings. */
+ return result.join(EMPTY);
+
+ /* Get current position. */
+ function now() {
+ return {
+ line: line,
+ column: column,
+ offset: index + (pos.offset || 0)
+ };
+ }
+
+ /* “Throw” a parse-error: a warning. */
+ function parseError(code, offset) {
+ var position = now();
+
+ position.column += offset;
+ position.offset += offset;
+
+ handleWarning.call(warningContext, MESSAGES[code], position, code);
+ }
+
+ /* Get character at position. */
+ function at(position) {
+ return value.charAt(position);
+ }
+
+ /* Flush `queue` (normal text). Macro invoked before
+ * each entity and at the end of `value`.
+ * Does nothing when `queue` is empty. */
+ function flush() {
+ if (queue) {
+ result.push(queue);
+
+ if (handleText) {
+ handleText.call(textContext, queue, {
+ start: prev,
+ end: now()
+ });
+ }
+
+ queue = EMPTY;
+ }
+ }
+}
+
+/* Check if `character` is outside the permissible
+ * unicode range. */
+function isProhibited(code) {
+ return (code >= 0xD800 && code <= 0xDFFF) || (code > 0x10FFFF);
+}
+
+/* Check if `character` is disallowed. */
+function isWarning(code) {
+ if (
+ (code >= 0x0001 && code <= 0x0008) ||
+ code === 0x000B ||
+ (code >= 0x000D && code <= 0x001F) ||
+ (code >= 0x007F && code <= 0x009F) ||
+ (code >= 0xFDD0 && code <= 0xFDEF) ||
+ (code & 0xFFFF) === 0xFFFF ||
+ (code & 0xFFFF) === 0xFFFE
+ ) {
+ return true;
+ }
+
+ return false;
+}
diff --git a/tools/node_modules/eslint/node_modules/parse-entities/package.json b/tools/node_modules/eslint/node_modules/parse-entities/package.json
new file mode 100644
index 0000000000..4e46265a83
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/parse-entities/package.json
@@ -0,0 +1,113 @@
+{
+ "_from": "parse-entities@^1.0.2",
+ "_id": "parse-entities@1.1.1",
+ "_inBundle": false,
+ "_integrity": "sha1-gRLYhHExnyerrk1klksSL+ThuJA=",
+ "_location": "/parse-entities",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "parse-entities@^1.0.2",
+ "name": "parse-entities",
+ "escapedName": "parse-entities",
+ "rawSpec": "^1.0.2",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.2"
+ },
+ "_requiredBy": [
+ "/remark-parse"
+ ],
+ "_resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-1.1.1.tgz",
+ "_shasum": "8112d88471319f27abae4d64964b122fe4e1b890",
+ "_spec": "parse-entities@^1.0.2",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/remark-parse",
+ "author": {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ },
+ "bugs": {
+ "url": "https://github.com/wooorm/parse-entities/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ }
+ ],
+ "dependencies": {
+ "character-entities": "^1.0.0",
+ "character-entities-legacy": "^1.0.0",
+ "character-reference-invalid": "^1.0.0",
+ "is-alphanumerical": "^1.0.0",
+ "is-decimal": "^1.0.0",
+ "is-hexadecimal": "^1.0.0"
+ },
+ "deprecated": false,
+ "description": "Parse HTML character references: fast, spec-compliant, positional information",
+ "devDependencies": {
+ "browserify": "^14.0.0",
+ "esmangle": "^1.0.0",
+ "nyc": "^11.0.0",
+ "remark-cli": "^3.0.0",
+ "remark-preset-wooorm": "^3.0.0",
+ "tape": "^4.2.0",
+ "xo": "^0.18.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/wooorm/parse-entities#readme",
+ "keywords": [
+ "parse",
+ "html",
+ "character",
+ "reference",
+ "entity",
+ "entities"
+ ],
+ "license": "MIT",
+ "name": "parse-entities",
+ "nyc": {
+ "check-coverage": true,
+ "lines": 100,
+ "functions": 100,
+ "branches": 100
+ },
+ "remarkConfig": {
+ "plugins": [
+ "preset-wooorm"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/wooorm/parse-entities.git"
+ },
+ "scripts": {
+ "build": "npm run build-md && npm run build-bundle && npm run build-mangle",
+ "build-bundle": "browserify index.js --bare -s parseEntities > parse-entities.js",
+ "build-mangle": "esmangle parse-entities.js > parse-entities.min.js",
+ "build-md": "remark . -qfo",
+ "lint": "xo",
+ "test": "npm run build && npm run lint && npm run test-coverage",
+ "test-api": "node test.js",
+ "test-coverage": "nyc --reporter lcov tape test.js"
+ },
+ "version": "1.1.1",
+ "xo": {
+ "space": true,
+ "esnext": false,
+ "rules": {
+ "guard-for-in": "off",
+ "no-negated-condition": "off",
+ "max-depth": "off",
+ "complexity": "off"
+ },
+ "ignores": [
+ "parse-entities.js"
+ ]
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/parse-entities/readme.md b/tools/node_modules/eslint/node_modules/parse-entities/readme.md
new file mode 100644
index 0000000000..9361031183
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/parse-entities/readme.md
@@ -0,0 +1,157 @@
+# parse-entities [![Build Status][build-badge]][build-status] [![Coverage Status][coverage-badge]][coverage-status]
+
+Parse HTML character references: fast, spec-compliant, positional
+information.
+
+## Installation
+
+[npm][]:
+
+```bash
+npm install parse-entities
+```
+
+## Usage
+
+```js
+var decode = require('parse-entities');
+
+decode('alpha &amp bravo');
+//=> alpha & bravo
+
+decode('charlie &copycat; delta');
+//=> charlie ©cat; delta
+
+decode('echo &copy; foxtrot &#8800; golf &#x1D306; hotel');
+//=> echo © foxtrot ≠ golf 𝌆 hotel
+```
+
+## API
+
+## `parseEntities(value[, options])`
+
+###### `options`
+
+* `additional` (`string`, optional, default: `''`)
+ — Additional character to accept when following an ampersand (without
+ error)
+* `attribute` (`boolean`, optional, default: `false`)
+ — Whether to parse `value` as an attribute value
+* `nonTerminated` (`boolean`, default: `true`)
+ — Whether to allow non-terminated entities, such as `&copycat` to
+ `©cat`. This behaviour is spec-compliant but can lead to unexpected
+ results
+* `warning` ([`Function`][warning], optional)
+ — Error handler
+* `text` ([`Function`][text], optional)
+ — Text handler
+* `reference` ([`Function`][reference],
+ optional) — Reference handler
+* `warningContext` (`'*'`, optional)
+ — Context used when invoking `warning`
+* `textContext` (`'*'`, optional)
+ — Context used when invoking `text`
+* `referenceContext` (`'*'`, optional)
+ — Context used when invoking `reference`
+* `position` (`Location` or `Position`, optional)
+ — Starting `position` of `value`, useful when dealing with values
+ nested in some sort of syntax tree. The default is:
+
+ ```json
+ {
+ "start": {
+ "line": 1,
+ "column": 1,
+ "offset": 0
+ },
+ "indent": []
+ }
+ ```
+
+###### Returns
+
+`string` — Decoded `value`.
+
+### `function warning(reason, position, code)`
+
+Error handler.
+
+###### Context
+
+`this` refers to `warningContext` when given to `parseEntities`.
+
+###### Parameters
+
+* `reason` (`string`)
+ — Reason (human-readable) for triggering a parse error
+* `position` (`Position`)
+ — Place at which the parse error occurred
+* `code` (`number`)
+ — Identifier of reason for triggering a parse error
+
+The following codes are used:
+
+| Code | Example | Note |
+| ---- | ------------------ | --------------------------------------------- |
+| `1` | `foo &amp bar` | Missing semicolon (named) |
+| `2` | `foo &#123 bar` | Missing semicolon (numeric) |
+| `3` | `Foo &bar baz` | Ampersand did not start a reference |
+| `4` | `Foo &#` | Empty reference |
+| `5` | `Foo &bar; baz` | Unknown entity |
+| `6` | `Foo &#128; baz` | [Disallowed reference][invalid] |
+| `7` | `Foo &#xD800; baz` | Prohibited: outside permissible unicode range |
+
+###### `function text(value, location)`
+
+Text handler.
+
+###### Context
+
+`this` refers to `textContext` when given to `parseEntities`.
+
+###### Parameters
+
+* `value` (`string`) — String of content
+* `location` (`Location`) — Location at which `value` starts and ends
+
+### `function reference(value, location, source)`
+
+Character reference handler.
+
+###### Context
+
+`this` refers to `referenceContext` when given to `parseEntities`.
+
+###### Parameters
+
+* `value` (`string`) — Encoded character reference
+* `location` (`Location`) — Location at which `value` starts and ends
+* `source` (`Location`) — Source of character reference
+
+## License
+
+[MIT][license] © [Titus Wormer][author]
+
+<!-- Definitions -->
+
+[build-badge]: https://img.shields.io/travis/wooorm/parse-entities.svg
+
+[build-status]: https://travis-ci.org/wooorm/parse-entities
+
+[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/parse-entities.svg
+
+[coverage-status]: https://codecov.io/github/wooorm/parse-entities
+
+[npm]: https://docs.npmjs.com/cli/install
+
+[license]: LICENSE
+
+[author]: http://wooorm.com
+
+[warning]: #function-warningreason-position-code
+
+[text]: #function-textvalue-location
+
+[reference]: #function-referencevalue-location-source
+
+[invalid]: https://github.com/wooorm/character-reference-invalid
diff --git a/tools/node_modules/eslint/node_modules/path-is-absolute/index.js b/tools/node_modules/eslint/node_modules/path-is-absolute/index.js
new file mode 100644
index 0000000000..22aa6c3560
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/path-is-absolute/index.js
@@ -0,0 +1,20 @@
+'use strict';
+
+function posix(path) {
+ return path.charAt(0) === '/';
+}
+
+function win32(path) {
+ // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56
+ var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
+ var result = splitDeviceRe.exec(path);
+ var device = result[1] || '';
+ var isUnc = Boolean(device && device.charAt(1) !== ':');
+
+ // UNC paths are always absolute
+ return Boolean(result[2] || isUnc);
+}
+
+module.exports = process.platform === 'win32' ? win32 : posix;
+module.exports.posix = posix;
+module.exports.win32 = win32;
diff --git a/tools/node_modules/eslint/node_modules/path-is-absolute/license b/tools/node_modules/eslint/node_modules/path-is-absolute/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/path-is-absolute/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/tools/node_modules/eslint/node_modules/path-is-absolute/package.json b/tools/node_modules/eslint/node_modules/path-is-absolute/package.json
new file mode 100644
index 0000000000..082df96305
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/path-is-absolute/package.json
@@ -0,0 +1,75 @@
+{
+ "_from": "path-is-absolute@^1.0.0",
+ "_id": "path-is-absolute@1.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
+ "_location": "/eslint/path-is-absolute",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "path-is-absolute@^1.0.0",
+ "name": "path-is-absolute",
+ "escapedName": "path-is-absolute",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/eslint/glob"
+ ],
+ "_resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+ "_shasum": "174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f",
+ "_spec": "path-is-absolute@^1.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/glob",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/path-is-absolute/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Node.js 0.12 path.isAbsolute() ponyfill",
+ "devDependencies": {
+ "xo": "^0.16.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/path-is-absolute#readme",
+ "keywords": [
+ "path",
+ "paths",
+ "file",
+ "dir",
+ "absolute",
+ "isabsolute",
+ "is-absolute",
+ "built-in",
+ "util",
+ "utils",
+ "core",
+ "ponyfill",
+ "polyfill",
+ "shim",
+ "is",
+ "detect",
+ "check"
+ ],
+ "license": "MIT",
+ "name": "path-is-absolute",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/path-is-absolute.git"
+ },
+ "scripts": {
+ "test": "xo && node test.js"
+ },
+ "version": "1.0.1"
+}
diff --git a/tools/node_modules/eslint/node_modules/path-is-absolute/readme.md b/tools/node_modules/eslint/node_modules/path-is-absolute/readme.md
new file mode 100644
index 0000000000..8dbdf5fcb7
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/path-is-absolute/readme.md
@@ -0,0 +1,59 @@
+# path-is-absolute [![Build Status](https://travis-ci.org/sindresorhus/path-is-absolute.svg?branch=master)](https://travis-ci.org/sindresorhus/path-is-absolute)
+
+> Node.js 0.12 [`path.isAbsolute()`](http://nodejs.org/api/path.html#path_path_isabsolute_path) [ponyfill](https://ponyfill.com)
+
+
+## Install
+
+```
+$ npm install --save path-is-absolute
+```
+
+
+## Usage
+
+```js
+const pathIsAbsolute = require('path-is-absolute');
+
+// Running on Linux
+pathIsAbsolute('/home/foo');
+//=> true
+pathIsAbsolute('C:/Users/foo');
+//=> false
+
+// Running on Windows
+pathIsAbsolute('C:/Users/foo');
+//=> true
+pathIsAbsolute('/home/foo');
+//=> false
+
+// Running on any OS
+pathIsAbsolute.posix('/home/foo');
+//=> true
+pathIsAbsolute.posix('C:/Users/foo');
+//=> false
+pathIsAbsolute.win32('C:/Users/foo');
+//=> true
+pathIsAbsolute.win32('/home/foo');
+//=> false
+```
+
+
+## API
+
+See the [`path.isAbsolute()` docs](http://nodejs.org/api/path.html#path_path_isabsolute_path).
+
+### pathIsAbsolute(path)
+
+### pathIsAbsolute.posix(path)
+
+POSIX specific version.
+
+### pathIsAbsolute.win32(path)
+
+Windows specific version.
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/tools/node_modules/eslint/node_modules/path-is-inside/LICENSE.txt b/tools/node_modules/eslint/node_modules/path-is-inside/LICENSE.txt
new file mode 100644
index 0000000000..0bdbb61c9d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/path-is-inside/LICENSE.txt
@@ -0,0 +1,47 @@
+Dual licensed under WTFPL and MIT:
+
+---
+
+Copyright © 2013–2016 Domenic Denicola <d@domenic.me>
+
+This work is free. You can redistribute it and/or modify it under the
+terms of the Do What The Fuck You Want To Public License, Version 2,
+as published by Sam Hocevar. See below for more details.
+
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+ Version 2, December 2004
+
+ Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
+
+ Everyone is permitted to copy and distribute verbatim or modified
+ copies of this license document, and changing it is allowed as long
+ as the name is changed.
+
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. You just DO WHAT THE FUCK YOU WANT TO.
+
+---
+
+The MIT License (MIT)
+
+Copyright © 2013–2016 Domenic Denicola <d@domenic.me>
+
+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/tools/node_modules/eslint/node_modules/path-is-inside/lib/path-is-inside.js b/tools/node_modules/eslint/node_modules/path-is-inside/lib/path-is-inside.js
new file mode 100644
index 0000000000..596dfd3b3c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/path-is-inside/lib/path-is-inside.js
@@ -0,0 +1,28 @@
+"use strict";
+
+var path = require("path");
+
+module.exports = function (thePath, potentialParent) {
+ // For inside-directory checking, we want to allow trailing slashes, so normalize.
+ thePath = stripTrailingSep(thePath);
+ potentialParent = stripTrailingSep(potentialParent);
+
+ // Node treats only Windows as case-insensitive in its path module; we follow those conventions.
+ if (process.platform === "win32") {
+ thePath = thePath.toLowerCase();
+ potentialParent = potentialParent.toLowerCase();
+ }
+
+ return thePath.lastIndexOf(potentialParent, 0) === 0 &&
+ (
+ thePath[potentialParent.length] === path.sep ||
+ thePath[potentialParent.length] === undefined
+ );
+};
+
+function stripTrailingSep(thePath) {
+ if (thePath[thePath.length - 1] === path.sep) {
+ return thePath.slice(0, -1);
+ }
+ return thePath;
+}
diff --git a/tools/node_modules/eslint/node_modules/path-is-inside/package.json b/tools/node_modules/eslint/node_modules/path-is-inside/package.json
new file mode 100644
index 0000000000..0ab505bc2b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/path-is-inside/package.json
@@ -0,0 +1,64 @@
+{
+ "_from": "path-is-inside@^1.0.2",
+ "_id": "path-is-inside@1.0.2",
+ "_inBundle": false,
+ "_integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=",
+ "_location": "/eslint/path-is-inside",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "path-is-inside@^1.0.2",
+ "name": "path-is-inside",
+ "escapedName": "path-is-inside",
+ "rawSpec": "^1.0.2",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.2"
+ },
+ "_requiredBy": [
+ "/eslint",
+ "/eslint/is-path-inside"
+ ],
+ "_resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz",
+ "_shasum": "365417dede44430d1c11af61027facf074bdfc53",
+ "_spec": "path-is-inside@^1.0.2",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint",
+ "author": {
+ "name": "Domenic Denicola",
+ "email": "d@domenic.me",
+ "url": "https://domenic.me"
+ },
+ "bugs": {
+ "url": "https://github.com/domenic/path-is-inside/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Tests whether one path is inside another path",
+ "devDependencies": {
+ "jshint": "~2.3.0",
+ "mocha": "~1.15.1"
+ },
+ "files": [
+ "lib"
+ ],
+ "homepage": "https://github.com/domenic/path-is-inside#readme",
+ "keywords": [
+ "path",
+ "directory",
+ "folder",
+ "inside",
+ "relative"
+ ],
+ "license": "(WTFPL OR MIT)",
+ "main": "lib/path-is-inside.js",
+ "name": "path-is-inside",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/domenic/path-is-inside.git"
+ },
+ "scripts": {
+ "lint": "jshint lib",
+ "test": "mocha"
+ },
+ "version": "1.0.2"
+}
diff --git a/tools/node_modules/eslint/node_modules/pify/index.js b/tools/node_modules/eslint/node_modules/pify/index.js
new file mode 100644
index 0000000000..7c720ebee8
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/pify/index.js
@@ -0,0 +1,68 @@
+'use strict';
+
+var processFn = function (fn, P, opts) {
+ return function () {
+ var that = this;
+ var args = new Array(arguments.length);
+
+ for (var i = 0; i < arguments.length; i++) {
+ args[i] = arguments[i];
+ }
+
+ return new P(function (resolve, reject) {
+ args.push(function (err, result) {
+ if (err) {
+ reject(err);
+ } else if (opts.multiArgs) {
+ var results = new Array(arguments.length - 1);
+
+ for (var i = 1; i < arguments.length; i++) {
+ results[i - 1] = arguments[i];
+ }
+
+ resolve(results);
+ } else {
+ resolve(result);
+ }
+ });
+
+ fn.apply(that, args);
+ });
+ };
+};
+
+var pify = module.exports = function (obj, P, opts) {
+ if (typeof P !== 'function') {
+ opts = P;
+ P = Promise;
+ }
+
+ opts = opts || {};
+ opts.exclude = opts.exclude || [/.+Sync$/];
+
+ var filter = function (key) {
+ var match = function (pattern) {
+ return typeof pattern === 'string' ? key === pattern : pattern.test(key);
+ };
+
+ return opts.include ? opts.include.some(match) : !opts.exclude.some(match);
+ };
+
+ var ret = typeof obj === 'function' ? function () {
+ if (opts.excludeMain) {
+ return obj.apply(this, arguments);
+ }
+
+ return processFn(obj, P, opts).apply(this, arguments);
+ } : {};
+
+ return Object.keys(obj).reduce(function (ret, key) {
+ var x = obj[key];
+
+ ret[key] = typeof x === 'function' && filter(key) ? processFn(x, P, opts) : x;
+
+ return ret;
+ }, ret);
+};
+
+pify.all = pify;
diff --git a/tools/node_modules/eslint/node_modules/pify/license b/tools/node_modules/eslint/node_modules/pify/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/pify/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/tools/node_modules/eslint/node_modules/pify/package.json b/tools/node_modules/eslint/node_modules/pify/package.json
new file mode 100644
index 0000000000..4c09f9fb24
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/pify/package.json
@@ -0,0 +1,81 @@
+{
+ "_from": "pify@^2.0.0",
+ "_id": "pify@2.3.0",
+ "_inBundle": false,
+ "_integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
+ "_location": "/eslint/pify",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "pify@^2.0.0",
+ "name": "pify",
+ "escapedName": "pify",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/eslint/del",
+ "/eslint/globby"
+ ],
+ "_resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
+ "_shasum": "ed141a6ac043a849ea588498e7dca8b15330e90c",
+ "_spec": "pify@^2.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/del",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/pify/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Promisify a callback-style function",
+ "devDependencies": {
+ "ava": "*",
+ "pinkie-promise": "^1.0.0",
+ "v8-natives": "0.0.2",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/pify#readme",
+ "keywords": [
+ "promise",
+ "promises",
+ "promisify",
+ "denodify",
+ "denodeify",
+ "callback",
+ "cb",
+ "node",
+ "then",
+ "thenify",
+ "convert",
+ "transform",
+ "wrap",
+ "wrapper",
+ "bind",
+ "to",
+ "async",
+ "es2015"
+ ],
+ "license": "MIT",
+ "name": "pify",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/pify.git"
+ },
+ "scripts": {
+ "optimization-test": "node --allow-natives-syntax optimization-test.js",
+ "test": "xo && ava && npm run optimization-test"
+ },
+ "version": "2.3.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/pify/readme.md b/tools/node_modules/eslint/node_modules/pify/readme.md
new file mode 100644
index 0000000000..c79ca8bf64
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/pify/readme.md
@@ -0,0 +1,119 @@
+# pify [![Build Status](https://travis-ci.org/sindresorhus/pify.svg?branch=master)](https://travis-ci.org/sindresorhus/pify)
+
+> Promisify a callback-style function
+
+
+## Install
+
+```
+$ npm install --save pify
+```
+
+
+## Usage
+
+```js
+const fs = require('fs');
+const pify = require('pify');
+
+// promisify a single function
+
+pify(fs.readFile)('package.json', 'utf8').then(data => {
+ console.log(JSON.parse(data).name);
+ //=> 'pify'
+});
+
+// or promisify all methods in a module
+
+pify(fs).readFile('package.json', 'utf8').then(data => {
+ console.log(JSON.parse(data).name);
+ //=> 'pify'
+});
+```
+
+
+## API
+
+### pify(input, [promiseModule], [options])
+
+Returns a promise wrapped version of the supplied function or module.
+
+#### input
+
+Type: `function`, `object`
+
+Callback-style function or module whose methods you want to promisify.
+
+#### promiseModule
+
+Type: `function`
+
+Custom promise module to use instead of the native one.
+
+Check out [`pinkie-promise`](https://github.com/floatdrop/pinkie-promise) if you need a tiny promise polyfill.
+
+#### options
+
+##### multiArgs
+
+Type: `boolean`
+Default: `false`
+
+By default, the promisified function will only return the second argument from the callback, which works fine for most APIs. This option can be useful for modules like `request` that return multiple arguments. Turning this on will make it return an array of all arguments from the callback, excluding the error argument, instead of just the second argument.
+
+```js
+const request = require('request');
+const pify = require('pify');
+
+pify(request, {multiArgs: true})('https://sindresorhus.com').then(result => {
+ const [httpResponse, body] = result;
+});
+```
+
+##### include
+
+Type: `array` of (`string`|`regex`)
+
+Methods in a module to promisify. Remaining methods will be left untouched.
+
+##### exclude
+
+Type: `array` of (`string`|`regex`)
+Default: `[/.+Sync$/]`
+
+Methods in a module **not** to promisify. Methods with names ending with `'Sync'` are excluded by default.
+
+##### excludeMain
+
+Type: `boolean`
+Default: `false`
+
+By default, if given module is a function itself, this function will be promisified. Turn this option on if you want to promisify only methods of the module.
+
+```js
+const pify = require('pify');
+
+function fn() {
+ return true;
+}
+
+fn.method = (data, callback) => {
+ setImmediate(() => {
+ callback(data, null);
+ });
+};
+
+// promisify methods but not fn()
+const promiseFn = pify(fn, {excludeMain: true});
+
+if (promiseFn()) {
+ promiseFn.method('hi').then(data => {
+ console.log(data);
+ });
+}
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/tools/node_modules/eslint/node_modules/pinkie-promise/index.js b/tools/node_modules/eslint/node_modules/pinkie-promise/index.js
new file mode 100644
index 0000000000..777377a1f7
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/pinkie-promise/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = typeof Promise === 'function' ? Promise : require('pinkie');
diff --git a/tools/node_modules/eslint/node_modules/pinkie-promise/license b/tools/node_modules/eslint/node_modules/pinkie-promise/license
new file mode 100644
index 0000000000..1aeb74fd25
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/pinkie-promise/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Vsevolod Strukchinsky <floatdrop@gmail.com> (github.com/floatdrop)
+
+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/tools/node_modules/eslint/node_modules/pinkie-promise/package.json b/tools/node_modules/eslint/node_modules/pinkie-promise/package.json
new file mode 100644
index 0000000000..808b2fd8fc
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/pinkie-promise/package.json
@@ -0,0 +1,68 @@
+{
+ "_from": "pinkie-promise@^2.0.0",
+ "_id": "pinkie-promise@2.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=",
+ "_location": "/eslint/pinkie-promise",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "pinkie-promise@^2.0.0",
+ "name": "pinkie-promise",
+ "escapedName": "pinkie-promise",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/eslint/del",
+ "/eslint/globby"
+ ],
+ "_resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz",
+ "_shasum": "2135d6dfa7a358c069ac9b178776288228450ffa",
+ "_spec": "pinkie-promise@^2.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/del",
+ "author": {
+ "name": "Vsevolod Strukchinsky",
+ "email": "floatdrop@gmail.com",
+ "url": "github.com/floatdrop"
+ },
+ "bugs": {
+ "url": "https://github.com/floatdrop/pinkie-promise/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "pinkie": "^2.0.0"
+ },
+ "deprecated": false,
+ "description": "ES2015 Promise ponyfill",
+ "devDependencies": {
+ "mocha": "*"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/floatdrop/pinkie-promise#readme",
+ "keywords": [
+ "promise",
+ "promises",
+ "es2015",
+ "es6",
+ "polyfill",
+ "ponyfill"
+ ],
+ "license": "MIT",
+ "name": "pinkie-promise",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/floatdrop/pinkie-promise.git"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "version": "2.0.1"
+}
diff --git a/tools/node_modules/eslint/node_modules/pinkie-promise/readme.md b/tools/node_modules/eslint/node_modules/pinkie-promise/readme.md
new file mode 100644
index 0000000000..78477f4297
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/pinkie-promise/readme.md
@@ -0,0 +1,28 @@
+# pinkie-promise [![Build Status](https://travis-ci.org/floatdrop/pinkie-promise.svg?branch=master)](https://travis-ci.org/floatdrop/pinkie-promise)
+
+> [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) ponyfill
+
+Module exports global Promise object (if available) or [`pinkie`](http://github.com/floatdrop/pinkie) Promise polyfill.
+
+## Install
+
+```
+$ npm install --save pinkie-promise
+```
+
+## Usage
+
+```js
+var Promise = require('pinkie-promise');
+
+new Promise(function (resolve) { resolve('unicorns'); });
+//=> Promise { 'unicorns' }
+```
+
+## Related
+
+- [pify](https://github.com/sindresorhus/pify) - Promisify a callback-style function
+
+## License
+
+MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop)
diff --git a/tools/node_modules/eslint/node_modules/pinkie/index.js b/tools/node_modules/eslint/node_modules/pinkie/index.js
new file mode 100644
index 0000000000..14ce1bfe3d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/pinkie/index.js
@@ -0,0 +1,292 @@
+'use strict';
+
+var PENDING = 'pending';
+var SETTLED = 'settled';
+var FULFILLED = 'fulfilled';
+var REJECTED = 'rejected';
+var NOOP = function () {};
+var isNode = typeof global !== 'undefined' && typeof global.process !== 'undefined' && typeof global.process.emit === 'function';
+
+var asyncSetTimer = typeof setImmediate === 'undefined' ? setTimeout : setImmediate;
+var asyncQueue = [];
+var asyncTimer;
+
+function asyncFlush() {
+ // run promise callbacks
+ for (var i = 0; i < asyncQueue.length; i++) {
+ asyncQueue[i][0](asyncQueue[i][1]);
+ }
+
+ // reset async asyncQueue
+ asyncQueue = [];
+ asyncTimer = false;
+}
+
+function asyncCall(callback, arg) {
+ asyncQueue.push([callback, arg]);
+
+ if (!asyncTimer) {
+ asyncTimer = true;
+ asyncSetTimer(asyncFlush, 0);
+ }
+}
+
+function invokeResolver(resolver, promise) {
+ function resolvePromise(value) {
+ resolve(promise, value);
+ }
+
+ function rejectPromise(reason) {
+ reject(promise, reason);
+ }
+
+ try {
+ resolver(resolvePromise, rejectPromise);
+ } catch (e) {
+ rejectPromise(e);
+ }
+}
+
+function invokeCallback(subscriber) {
+ var owner = subscriber.owner;
+ var settled = owner._state;
+ var value = owner._data;
+ var callback = subscriber[settled];
+ var promise = subscriber.then;
+
+ if (typeof callback === 'function') {
+ settled = FULFILLED;
+ try {
+ value = callback(value);
+ } catch (e) {
+ reject(promise, e);
+ }
+ }
+
+ if (!handleThenable(promise, value)) {
+ if (settled === FULFILLED) {
+ resolve(promise, value);
+ }
+
+ if (settled === REJECTED) {
+ reject(promise, value);
+ }
+ }
+}
+
+function handleThenable(promise, value) {
+ var resolved;
+
+ try {
+ if (promise === value) {
+ throw new TypeError('A promises callback cannot return that same promise.');
+ }
+
+ if (value && (typeof value === 'function' || typeof value === 'object')) {
+ // then should be retrieved only once
+ var then = value.then;
+
+ if (typeof then === 'function') {
+ then.call(value, function (val) {
+ if (!resolved) {
+ resolved = true;
+
+ if (value === val) {
+ fulfill(promise, val);
+ } else {
+ resolve(promise, val);
+ }
+ }
+ }, function (reason) {
+ if (!resolved) {
+ resolved = true;
+
+ reject(promise, reason);
+ }
+ });
+
+ return true;
+ }
+ }
+ } catch (e) {
+ if (!resolved) {
+ reject(promise, e);
+ }
+
+ return true;
+ }
+
+ return false;
+}
+
+function resolve(promise, value) {
+ if (promise === value || !handleThenable(promise, value)) {
+ fulfill(promise, value);
+ }
+}
+
+function fulfill(promise, value) {
+ if (promise._state === PENDING) {
+ promise._state = SETTLED;
+ promise._data = value;
+
+ asyncCall(publishFulfillment, promise);
+ }
+}
+
+function reject(promise, reason) {
+ if (promise._state === PENDING) {
+ promise._state = SETTLED;
+ promise._data = reason;
+
+ asyncCall(publishRejection, promise);
+ }
+}
+
+function publish(promise) {
+ promise._then = promise._then.forEach(invokeCallback);
+}
+
+function publishFulfillment(promise) {
+ promise._state = FULFILLED;
+ publish(promise);
+}
+
+function publishRejection(promise) {
+ promise._state = REJECTED;
+ publish(promise);
+ if (!promise._handled && isNode) {
+ global.process.emit('unhandledRejection', promise._data, promise);
+ }
+}
+
+function notifyRejectionHandled(promise) {
+ global.process.emit('rejectionHandled', promise);
+}
+
+/**
+ * @class
+ */
+function Promise(resolver) {
+ if (typeof resolver !== 'function') {
+ throw new TypeError('Promise resolver ' + resolver + ' is not a function');
+ }
+
+ if (this instanceof Promise === false) {
+ throw new TypeError('Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.');
+ }
+
+ this._then = [];
+
+ invokeResolver(resolver, this);
+}
+
+Promise.prototype = {
+ constructor: Promise,
+
+ _state: PENDING,
+ _then: null,
+ _data: undefined,
+ _handled: false,
+
+ then: function (onFulfillment, onRejection) {
+ var subscriber = {
+ owner: this,
+ then: new this.constructor(NOOP),
+ fulfilled: onFulfillment,
+ rejected: onRejection
+ };
+
+ if ((onRejection || onFulfillment) && !this._handled) {
+ this._handled = true;
+ if (this._state === REJECTED && isNode) {
+ asyncCall(notifyRejectionHandled, this);
+ }
+ }
+
+ if (this._state === FULFILLED || this._state === REJECTED) {
+ // already resolved, call callback async
+ asyncCall(invokeCallback, subscriber);
+ } else {
+ // subscribe
+ this._then.push(subscriber);
+ }
+
+ return subscriber.then;
+ },
+
+ catch: function (onRejection) {
+ return this.then(null, onRejection);
+ }
+};
+
+Promise.all = function (promises) {
+ if (!Array.isArray(promises)) {
+ throw new TypeError('You must pass an array to Promise.all().');
+ }
+
+ return new Promise(function (resolve, reject) {
+ var results = [];
+ var remaining = 0;
+
+ function resolver(index) {
+ remaining++;
+ return function (value) {
+ results[index] = value;
+ if (!--remaining) {
+ resolve(results);
+ }
+ };
+ }
+
+ for (var i = 0, promise; i < promises.length; i++) {
+ promise = promises[i];
+
+ if (promise && typeof promise.then === 'function') {
+ promise.then(resolver(i), reject);
+ } else {
+ results[i] = promise;
+ }
+ }
+
+ if (!remaining) {
+ resolve(results);
+ }
+ });
+};
+
+Promise.race = function (promises) {
+ if (!Array.isArray(promises)) {
+ throw new TypeError('You must pass an array to Promise.race().');
+ }
+
+ return new Promise(function (resolve, reject) {
+ for (var i = 0, promise; i < promises.length; i++) {
+ promise = promises[i];
+
+ if (promise && typeof promise.then === 'function') {
+ promise.then(resolve, reject);
+ } else {
+ resolve(promise);
+ }
+ }
+ });
+};
+
+Promise.resolve = function (value) {
+ if (value && typeof value === 'object' && value.constructor === Promise) {
+ return value;
+ }
+
+ return new Promise(function (resolve) {
+ resolve(value);
+ });
+};
+
+Promise.reject = function (reason) {
+ return new Promise(function (resolve, reject) {
+ reject(reason);
+ });
+};
+
+module.exports = Promise;
diff --git a/tools/node_modules/eslint/node_modules/pinkie/license b/tools/node_modules/eslint/node_modules/pinkie/license
new file mode 100644
index 0000000000..1aeb74fd25
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/pinkie/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Vsevolod Strukchinsky <floatdrop@gmail.com> (github.com/floatdrop)
+
+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/tools/node_modules/eslint/node_modules/pinkie/package.json b/tools/node_modules/eslint/node_modules/pinkie/package.json
new file mode 100644
index 0000000000..292eca6ad2
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/pinkie/package.json
@@ -0,0 +1,68 @@
+{
+ "_from": "pinkie@^2.0.0",
+ "_id": "pinkie@2.0.4",
+ "_inBundle": false,
+ "_integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=",
+ "_location": "/eslint/pinkie",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "pinkie@^2.0.0",
+ "name": "pinkie",
+ "escapedName": "pinkie",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/eslint/pinkie-promise"
+ ],
+ "_resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz",
+ "_shasum": "72556b80cfa0d48a974e80e77248e80ed4f7f870",
+ "_spec": "pinkie@^2.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/pinkie-promise",
+ "author": {
+ "name": "Vsevolod Strukchinsky",
+ "email": "floatdrop@gmail.com",
+ "url": "github.com/floatdrop"
+ },
+ "bugs": {
+ "url": "https://github.com/floatdrop/pinkie/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Itty bitty little widdle twinkie pinkie ES2015 Promise implementation",
+ "devDependencies": {
+ "core-assert": "^0.1.1",
+ "coveralls": "^2.11.4",
+ "mocha": "*",
+ "nyc": "^3.2.2",
+ "promises-aplus-tests": "*",
+ "xo": "^0.10.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/floatdrop/pinkie#readme",
+ "keywords": [
+ "promise",
+ "promises",
+ "es2015",
+ "es6"
+ ],
+ "license": "MIT",
+ "name": "pinkie",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/floatdrop/pinkie.git"
+ },
+ "scripts": {
+ "coverage": "nyc report --reporter=text-lcov | coveralls",
+ "test": "xo && nyc mocha"
+ },
+ "version": "2.0.4"
+}
diff --git a/tools/node_modules/eslint/node_modules/pinkie/readme.md b/tools/node_modules/eslint/node_modules/pinkie/readme.md
new file mode 100644
index 0000000000..1565f95889
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/pinkie/readme.md
@@ -0,0 +1,83 @@
+<h1 align="center">
+ <br>
+ <img width="256" src="media/logo.png" alt="pinkie">
+ <br>
+ <br>
+</h1>
+
+> Itty bitty little widdle twinkie pinkie [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) implementation
+
+[![Build Status](https://travis-ci.org/floatdrop/pinkie.svg?branch=master)](https://travis-ci.org/floatdrop/pinkie) [![Coverage Status](https://coveralls.io/repos/floatdrop/pinkie/badge.svg?branch=master&service=github)](https://coveralls.io/github/floatdrop/pinkie?branch=master)
+
+There are [tons of Promise implementations](https://github.com/promises-aplus/promises-spec/blob/master/implementations.md#standalone) out there, but all of them focus on browser compatibility and are often bloated with functionality.
+
+This module is an exact Promise specification polyfill (like [native-promise-only](https://github.com/getify/native-promise-only)), but in Node.js land (it should be browserify-able though).
+
+
+## Install
+
+```
+$ npm install --save pinkie
+```
+
+
+## Usage
+
+```js
+var fs = require('fs');
+var Promise = require('pinkie');
+
+new Promise(function (resolve, reject) {
+ fs.readFile('foo.json', 'utf8', function (err, data) {
+ if (err) {
+ reject(err);
+ return;
+ }
+
+ resolve(data);
+ });
+});
+//=> Promise
+```
+
+
+### API
+
+`pinkie` exports bare [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) implementation and polyfills [Node.js rejection events](https://nodejs.org/api/process.html#process_event_unhandledrejection). In case you forgot:
+
+#### new Promise(executor)
+
+Returns new instance of `Promise`.
+
+##### executor
+
+*Required*
+Type: `function`
+
+Function with two arguments `resolve` and `reject`. The first argument fulfills the promise, the second argument rejects it.
+
+#### pinkie.all(promises)
+
+Returns a promise that resolves when all of the promises in the `promises` Array argument have resolved.
+
+#### pinkie.race(promises)
+
+Returns a promise that resolves or rejects as soon as one of the promises in the `promises` Array resolves or rejects, with the value or reason from that promise.
+
+#### pinkie.reject(reason)
+
+Returns a Promise object that is rejected with the given `reason`.
+
+#### pinkie.resolve(value)
+
+Returns a Promise object that is resolved with the given `value`. If the `value` is a thenable (i.e. has a then method), the returned promise will "follow" that thenable, adopting its eventual state; otherwise the returned promise will be fulfilled with the `value`.
+
+
+## Related
+
+- [pinkie-promise](https://github.com/floatdrop/pinkie-promise) - Returns the native Promise or this module
+
+
+## License
+
+MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop)
diff --git a/tools/node_modules/eslint/node_modules/pluralize/LICENSE b/tools/node_modules/eslint/node_modules/pluralize/LICENSE
new file mode 100644
index 0000000000..309c2e3b83
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/pluralize/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2013 Blake Embrey (hello@blakeembrey.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/tools/node_modules/eslint/node_modules/pluralize/Readme.md b/tools/node_modules/eslint/node_modules/pluralize/Readme.md
new file mode 100644
index 0000000000..46434a995f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/pluralize/Readme.md
@@ -0,0 +1,89 @@
+# Pluralize
+
+[![NPM version][npm-image]][npm-url]
+[![NPM downloads][downloads-image]][downloads-url]
+[![Build status][travis-image]][travis-url]
+[![Test coverage][coveralls-image]][coveralls-url]
+![File Size][filesize-url]
+[![CDNJS][cdnjs-image]][cdnjs-url]
+[![Greenkeeper badge](https://badges.greenkeeper.io/blakeembrey/pluralize.svg)](https://greenkeeper.io/)
+
+> Pluralize and singularize any word.
+
+## Installation
+
+```
+npm install pluralize --save
+yarn add pluralize
+bower install pluralize --save
+```
+
+### Node
+
+```javascript
+var pluralize = require('pluralize')
+```
+
+### AMD
+
+```javascript
+define(function (require, exports, module) {
+ var pluralize = require('pluralize')
+})
+```
+
+### `<script>` tag
+
+```html
+<script src="pluralize.js"></script>
+```
+
+## Why?
+
+This module uses a pre-defined list of rules, applied in order, to singularize or pluralize a given word. There are many cases where this is useful, such as any automation based on user input. For applications where the word(s) are known ahead of time, you can use a simple ternary (or function) which would be a much lighter alternative.
+
+## Usage
+
+```javascript
+pluralize('test') //=> "tests"
+pluralize('test', 1) //=> "test"
+pluralize('test', 5) //=> "tests"
+pluralize('test', 1, true) //=> "1 test"
+pluralize('test', 5, true) //=> "5 tests"
+pluralize('蘋果', 2, true) //=> "2 蘋果"
+
+pluralize.plural('regex') //=> "regexes"
+pluralize.addPluralRule(/gex$/i, 'gexii')
+pluralize.plural('regex') //=> "regexii"
+
+pluralize.singular('singles') //=> "single"
+pluralize.addSingularRule(/singles$/i, 'singular')
+pluralize.singular('singles') //=> "singular"
+
+pluralize.plural('irregular') //=> "irregulars"
+pluralize.addIrregularRule('irregular', 'regular')
+pluralize.plural('irregular') //=> "regular"
+
+pluralize.plural('paper') //=> "papers"
+pluralize.addUncountableRule('paper')
+pluralize.plural('paper') //=> "paper"
+
+pluralize.isPlural('test') //=> false
+pluralize.isSingular('test') //=> true
+```
+
+## License
+
+MIT
+
+[npm-image]: https://img.shields.io/npm/v/pluralize.svg?style=flat
+[npm-url]: https://npmjs.org/package/pluralize
+[downloads-image]: https://img.shields.io/npm/dm/pluralize.svg?style=flat
+[downloads-url]: https://npmjs.org/package/pluralize
+[travis-image]: https://img.shields.io/travis/blakeembrey/pluralize.svg?style=flat
+[travis-url]: https://travis-ci.org/blakeembrey/pluralize
+[coveralls-image]: https://img.shields.io/coveralls/blakeembrey/pluralize.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/blakeembrey/pluralize?branch=master
+[filesize-url]: https://img.shields.io/github/size/blakeembrey/pluralize/pluralize.js.svg?style=flat
+[cdnjs-image]: https://img.shields.io/cdnjs/v/pluralize.svg
+[cdnjs-url]: https://cdnjs.com/libraries/pluralize
diff --git a/tools/node_modules/eslint/node_modules/pluralize/package.json b/tools/node_modules/eslint/node_modules/pluralize/package.json
new file mode 100644
index 0000000000..c2d7496839
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/pluralize/package.json
@@ -0,0 +1,71 @@
+{
+ "_from": "pluralize@^7.0.0",
+ "_id": "pluralize@7.0.0",
+ "_inBundle": false,
+ "_integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==",
+ "_location": "/eslint/pluralize",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "pluralize@^7.0.0",
+ "name": "pluralize",
+ "escapedName": "pluralize",
+ "rawSpec": "^7.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^7.0.0"
+ },
+ "_requiredBy": [
+ "/eslint"
+ ],
+ "_resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz",
+ "_shasum": "298b89df8b93b0221dbf421ad2b1b1ea23fc6777",
+ "_spec": "pluralize@^7.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint",
+ "author": {
+ "name": "Blake Embrey",
+ "email": "hello@blakeembrey.com",
+ "url": "http://blakeembrey.me"
+ },
+ "bugs": {
+ "url": "https://github.com/blakeembrey/pluralize/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Pluralize and singularize any word",
+ "devDependencies": {
+ "chai": "^4.0.0",
+ "istanbul": "^0.4.5",
+ "mocha": "^3.2.0",
+ "semistandard": "^11.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "files": [
+ "pluralize.js"
+ ],
+ "homepage": "https://github.com/blakeembrey/pluralize#readme",
+ "keywords": [
+ "plural",
+ "plurals",
+ "pluralize",
+ "singular",
+ "singularize",
+ "inflection"
+ ],
+ "license": "MIT",
+ "main": "pluralize.js",
+ "name": "pluralize",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/blakeembrey/pluralize.git"
+ },
+ "scripts": {
+ "lint": "semistandard",
+ "test": "npm run lint && npm run test-cov",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- -R spec --bail",
+ "test-spec": "mocha -R spec --bail"
+ },
+ "version": "7.0.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/pluralize/pluralize.js b/tools/node_modules/eslint/node_modules/pluralize/pluralize.js
new file mode 100644
index 0000000000..c87a8fce07
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/pluralize/pluralize.js
@@ -0,0 +1,490 @@
+/* global define */
+
+(function (root, pluralize) {
+ /* istanbul ignore else */
+ if (typeof require === 'function' && typeof exports === 'object' && typeof module === 'object') {
+ // Node.
+ module.exports = pluralize();
+ } else if (typeof define === 'function' && define.amd) {
+ // AMD, registers as an anonymous module.
+ define(function () {
+ return pluralize();
+ });
+ } else {
+ // Browser global.
+ root.pluralize = pluralize();
+ }
+})(this, function () {
+ // Rule storage - pluralize and singularize need to be run sequentially,
+ // while other rules can be optimized using an object for instant lookups.
+ var pluralRules = [];
+ var singularRules = [];
+ var uncountables = {};
+ var irregularPlurals = {};
+ var irregularSingles = {};
+
+ /**
+ * Sanitize a pluralization rule to a usable regular expression.
+ *
+ * @param {(RegExp|string)} rule
+ * @return {RegExp}
+ */
+ function sanitizeRule (rule) {
+ if (typeof rule === 'string') {
+ return new RegExp('^' + rule + '$', 'i');
+ }
+
+ return rule;
+ }
+
+ /**
+ * Pass in a word token to produce a function that can replicate the case on
+ * another word.
+ *
+ * @param {string} word
+ * @param {string} token
+ * @return {Function}
+ */
+ function restoreCase (word, token) {
+ // Tokens are an exact match.
+ if (word === token) return token;
+
+ // Upper cased words. E.g. "HELLO".
+ if (word === word.toUpperCase()) return token.toUpperCase();
+
+ // Title cased words. E.g. "Title".
+ if (word[0] === word[0].toUpperCase()) {
+ return token.charAt(0).toUpperCase() + token.substr(1).toLowerCase();
+ }
+
+ // Lower cased words. E.g. "test".
+ return token.toLowerCase();
+ }
+
+ /**
+ * Interpolate a regexp string.
+ *
+ * @param {string} str
+ * @param {Array} args
+ * @return {string}
+ */
+ function interpolate (str, args) {
+ return str.replace(/\$(\d{1,2})/g, function (match, index) {
+ return args[index] || '';
+ });
+ }
+
+ /**
+ * Replace a word using a rule.
+ *
+ * @param {string} word
+ * @param {Array} rule
+ * @return {string}
+ */
+ function replace (word, rule) {
+ return word.replace(rule[0], function (match, index) {
+ var result = interpolate(rule[1], arguments);
+
+ if (match === '') {
+ return restoreCase(word[index - 1], result);
+ }
+
+ return restoreCase(match, result);
+ });
+ }
+
+ /**
+ * Sanitize a word by passing in the word and sanitization rules.
+ *
+ * @param {string} token
+ * @param {string} word
+ * @param {Array} rules
+ * @return {string}
+ */
+ function sanitizeWord (token, word, rules) {
+ // Empty string or doesn't need fixing.
+ if (!token.length || uncountables.hasOwnProperty(token)) {
+ return word;
+ }
+
+ var len = rules.length;
+
+ // Iterate over the sanitization rules and use the first one to match.
+ while (len--) {
+ var rule = rules[len];
+
+ if (rule[0].test(word)) return replace(word, rule);
+ }
+
+ return word;
+ }
+
+ /**
+ * Replace a word with the updated word.
+ *
+ * @param {Object} replaceMap
+ * @param {Object} keepMap
+ * @param {Array} rules
+ * @return {Function}
+ */
+ function replaceWord (replaceMap, keepMap, rules) {
+ return function (word) {
+ // Get the correct token and case restoration functions.
+ var token = word.toLowerCase();
+
+ // Check against the keep object map.
+ if (keepMap.hasOwnProperty(token)) {
+ return restoreCase(word, token);
+ }
+
+ // Check against the replacement map for a direct word replacement.
+ if (replaceMap.hasOwnProperty(token)) {
+ return restoreCase(word, replaceMap[token]);
+ }
+
+ // Run all the rules against the word.
+ return sanitizeWord(token, word, rules);
+ };
+ }
+
+ /**
+ * Check if a word is part of the map.
+ */
+ function checkWord (replaceMap, keepMap, rules, bool) {
+ return function (word) {
+ var token = word.toLowerCase();
+
+ if (keepMap.hasOwnProperty(token)) return true;
+ if (replaceMap.hasOwnProperty(token)) return false;
+
+ return sanitizeWord(token, token, rules) === token;
+ };
+ }
+
+ /**
+ * Pluralize or singularize a word based on the passed in count.
+ *
+ * @param {string} word
+ * @param {number} count
+ * @param {boolean} inclusive
+ * @return {string}
+ */
+ function pluralize (word, count, inclusive) {
+ var pluralized = count === 1
+ ? pluralize.singular(word) : pluralize.plural(word);
+
+ return (inclusive ? count + ' ' : '') + pluralized;
+ }
+
+ /**
+ * Pluralize a word.
+ *
+ * @type {Function}
+ */
+ pluralize.plural = replaceWord(
+ irregularSingles, irregularPlurals, pluralRules
+ );
+
+ /**
+ * Check if a word is plural.
+ *
+ * @type {Function}
+ */
+ pluralize.isPlural = checkWord(
+ irregularSingles, irregularPlurals, pluralRules
+ );
+
+ /**
+ * Singularize a word.
+ *
+ * @type {Function}
+ */
+ pluralize.singular = replaceWord(
+ irregularPlurals, irregularSingles, singularRules
+ );
+
+ /**
+ * Check if a word is singular.
+ *
+ * @type {Function}
+ */
+ pluralize.isSingular = checkWord(
+ irregularPlurals, irregularSingles, singularRules
+ );
+
+ /**
+ * Add a pluralization rule to the collection.
+ *
+ * @param {(string|RegExp)} rule
+ * @param {string} replacement
+ */
+ pluralize.addPluralRule = function (rule, replacement) {
+ pluralRules.push([sanitizeRule(rule), replacement]);
+ };
+
+ /**
+ * Add a singularization rule to the collection.
+ *
+ * @param {(string|RegExp)} rule
+ * @param {string} replacement
+ */
+ pluralize.addSingularRule = function (rule, replacement) {
+ singularRules.push([sanitizeRule(rule), replacement]);
+ };
+
+ /**
+ * Add an uncountable word rule.
+ *
+ * @param {(string|RegExp)} word
+ */
+ pluralize.addUncountableRule = function (word) {
+ if (typeof word === 'string') {
+ uncountables[word.toLowerCase()] = true;
+ return;
+ }
+
+ // Set singular and plural references for the word.
+ pluralize.addPluralRule(word, '$0');
+ pluralize.addSingularRule(word, '$0');
+ };
+
+ /**
+ * Add an irregular word definition.
+ *
+ * @param {string} single
+ * @param {string} plural
+ */
+ pluralize.addIrregularRule = function (single, plural) {
+ plural = plural.toLowerCase();
+ single = single.toLowerCase();
+
+ irregularSingles[single] = plural;
+ irregularPlurals[plural] = single;
+ };
+
+ /**
+ * Irregular rules.
+ */
+ [
+ // Pronouns.
+ ['I', 'we'],
+ ['me', 'us'],
+ ['he', 'they'],
+ ['she', 'they'],
+ ['them', 'them'],
+ ['myself', 'ourselves'],
+ ['yourself', 'yourselves'],
+ ['itself', 'themselves'],
+ ['herself', 'themselves'],
+ ['himself', 'themselves'],
+ ['themself', 'themselves'],
+ ['is', 'are'],
+ ['was', 'were'],
+ ['has', 'have'],
+ ['this', 'these'],
+ ['that', 'those'],
+ // Words ending in with a consonant and `o`.
+ ['echo', 'echoes'],
+ ['dingo', 'dingoes'],
+ ['volcano', 'volcanoes'],
+ ['tornado', 'tornadoes'],
+ ['torpedo', 'torpedoes'],
+ // Ends with `us`.
+ ['genus', 'genera'],
+ ['viscus', 'viscera'],
+ // Ends with `ma`.
+ ['stigma', 'stigmata'],
+ ['stoma', 'stomata'],
+ ['dogma', 'dogmata'],
+ ['lemma', 'lemmata'],
+ ['schema', 'schemata'],
+ ['anathema', 'anathemata'],
+ // Other irregular rules.
+ ['ox', 'oxen'],
+ ['axe', 'axes'],
+ ['die', 'dice'],
+ ['yes', 'yeses'],
+ ['foot', 'feet'],
+ ['eave', 'eaves'],
+ ['goose', 'geese'],
+ ['tooth', 'teeth'],
+ ['quiz', 'quizzes'],
+ ['human', 'humans'],
+ ['proof', 'proofs'],
+ ['carve', 'carves'],
+ ['valve', 'valves'],
+ ['looey', 'looies'],
+ ['thief', 'thieves'],
+ ['groove', 'grooves'],
+ ['pickaxe', 'pickaxes'],
+ ['whiskey', 'whiskies']
+ ].forEach(function (rule) {
+ return pluralize.addIrregularRule(rule[0], rule[1]);
+ });
+
+ /**
+ * Pluralization rules.
+ */
+ [
+ [/s?$/i, 's'],
+ [/[^\u0000-\u007F]$/i, '$0'],
+ [/([^aeiou]ese)$/i, '$1'],
+ [/(ax|test)is$/i, '$1es'],
+ [/(alias|[^aou]us|tlas|gas|ris)$/i, '$1es'],
+ [/(e[mn]u)s?$/i, '$1s'],
+ [/([^l]ias|[aeiou]las|[emjzr]as|[iu]am)$/i, '$1'],
+ [/(alumn|syllab|octop|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, '$1i'],
+ [/(alumn|alg|vertebr)(?:a|ae)$/i, '$1ae'],
+ [/(seraph|cherub)(?:im)?$/i, '$1im'],
+ [/(her|at|gr)o$/i, '$1oes'],
+ [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i, '$1a'],
+ [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i, '$1a'],
+ [/sis$/i, 'ses'],
+ [/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i, '$1$2ves'],
+ [/([^aeiouy]|qu)y$/i, '$1ies'],
+ [/([^ch][ieo][ln])ey$/i, '$1ies'],
+ [/(x|ch|ss|sh|zz)$/i, '$1es'],
+ [/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i, '$1ices'],
+ [/(m|l)(?:ice|ouse)$/i, '$1ice'],
+ [/(pe)(?:rson|ople)$/i, '$1ople'],
+ [/(child)(?:ren)?$/i, '$1ren'],
+ [/eaux$/i, '$0'],
+ [/m[ae]n$/i, 'men'],
+ ['thou', 'you']
+ ].forEach(function (rule) {
+ return pluralize.addPluralRule(rule[0], rule[1]);
+ });
+
+ /**
+ * Singularization rules.
+ */
+ [
+ [/s$/i, ''],
+ [/(ss)$/i, '$1'],
+ [/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i, '$1fe'],
+ [/(ar|(?:wo|[ae])l|[eo][ao])ves$/i, '$1f'],
+ [/ies$/i, 'y'],
+ [/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i, '$1ie'],
+ [/\b(mon|smil)ies$/i, '$1ey'],
+ [/(m|l)ice$/i, '$1ouse'],
+ [/(seraph|cherub)im$/i, '$1'],
+ [/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|tlas|gas|(?:her|at|gr)o|ris)(?:es)?$/i, '$1'],
+ [/(analy|ba|diagno|parenthe|progno|synop|the|empha|cri)(?:sis|ses)$/i, '$1sis'],
+ [/(movie|twelve|abuse|e[mn]u)s$/i, '$1'],
+ [/(test)(?:is|es)$/i, '$1is'],
+ [/(alumn|syllab|octop|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, '$1us'],
+ [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i, '$1um'],
+ [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i, '$1on'],
+ [/(alumn|alg|vertebr)ae$/i, '$1a'],
+ [/(cod|mur|sil|vert|ind)ices$/i, '$1ex'],
+ [/(matr|append)ices$/i, '$1ix'],
+ [/(pe)(rson|ople)$/i, '$1rson'],
+ [/(child)ren$/i, '$1'],
+ [/(eau)x?$/i, '$1'],
+ [/men$/i, 'man']
+ ].forEach(function (rule) {
+ return pluralize.addSingularRule(rule[0], rule[1]);
+ });
+
+ /**
+ * Uncountable rules.
+ */
+ [
+ // Singular words with no plurals.
+ 'adulthood',
+ 'advice',
+ 'agenda',
+ 'aid',
+ 'alcohol',
+ 'ammo',
+ 'anime',
+ 'athletics',
+ 'audio',
+ 'bison',
+ 'blood',
+ 'bream',
+ 'buffalo',
+ 'butter',
+ 'carp',
+ 'cash',
+ 'chassis',
+ 'chess',
+ 'clothing',
+ 'cod',
+ 'commerce',
+ 'cooperation',
+ 'corps',
+ 'debris',
+ 'diabetes',
+ 'digestion',
+ 'elk',
+ 'energy',
+ 'equipment',
+ 'excretion',
+ 'expertise',
+ 'flounder',
+ 'fun',
+ 'gallows',
+ 'garbage',
+ 'graffiti',
+ 'headquarters',
+ 'health',
+ 'herpes',
+ 'highjinks',
+ 'homework',
+ 'housework',
+ 'information',
+ 'jeans',
+ 'justice',
+ 'kudos',
+ 'labour',
+ 'literature',
+ 'machinery',
+ 'mackerel',
+ 'mail',
+ 'media',
+ 'mews',
+ 'moose',
+ 'music',
+ 'manga',
+ 'news',
+ 'pike',
+ 'plankton',
+ 'pliers',
+ 'pollution',
+ 'premises',
+ 'rain',
+ 'research',
+ 'rice',
+ 'salmon',
+ 'scissors',
+ 'series',
+ 'sewage',
+ 'shambles',
+ 'shrimp',
+ 'species',
+ 'staff',
+ 'swine',
+ 'tennis',
+ 'traffic',
+ 'transporation',
+ 'trout',
+ 'tuna',
+ 'wealth',
+ 'welfare',
+ 'whiting',
+ 'wildebeest',
+ 'wildlife',
+ 'you',
+ // Regexes.
+ /[^aeiou]ese$/i, // "chinese", "japanese"
+ /deer$/i, // "deer", "reindeer"
+ /fish$/i, // "fish", "blowfish", "angelfish"
+ /measles$/i,
+ /o[iu]s$/i, // "carnivorous"
+ /pox$/i, // "chickpox", "smallpox"
+ /sheep$/i
+ ].forEach(pluralize.addUncountableRule);
+
+ return pluralize;
+});
diff --git a/tools/node_modules/eslint/node_modules/prelude-ls/LICENSE b/tools/node_modules/eslint/node_modules/prelude-ls/LICENSE
new file mode 100644
index 0000000000..525b11850e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/prelude-ls/LICENSE
@@ -0,0 +1,22 @@
+Copyright (c) George Zahariev
+
+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/tools/node_modules/eslint/node_modules/prelude-ls/README.md b/tools/node_modules/eslint/node_modules/prelude-ls/README.md
new file mode 100644
index 0000000000..fabc212e70
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/prelude-ls/README.md
@@ -0,0 +1,15 @@
+# prelude.ls [![Build Status](https://travis-ci.org/gkz/prelude-ls.png?branch=master)](https://travis-ci.org/gkz/prelude-ls)
+
+is a functionally oriented utility library. It is powerful and flexible. Almost all of its functions are curried. It is written in, and is the recommended base library for, <a href="http://livescript.net">LiveScript</a>.
+
+See **[the prelude.ls site](http://preludels.com)** for examples, a reference, and more.
+
+You can install via npm `npm install prelude-ls`
+
+### Development
+
+`make test` to test
+
+`make build` to build `lib` from `src`
+
+`make build-browser` to build browser versions
diff --git a/tools/node_modules/eslint/node_modules/prelude-ls/lib/Func.js b/tools/node_modules/eslint/node_modules/prelude-ls/lib/Func.js
new file mode 100644
index 0000000000..b80c9b13d0
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/prelude-ls/lib/Func.js
@@ -0,0 +1,65 @@
+// Generated by LiveScript 1.4.0
+var apply, curry, flip, fix, over, memoize, slice$ = [].slice, toString$ = {}.toString;
+apply = curry$(function(f, list){
+ return f.apply(null, list);
+});
+curry = function(f){
+ return curry$(f);
+};
+flip = curry$(function(f, x, y){
+ return f(y, x);
+});
+fix = function(f){
+ return function(g){
+ return function(){
+ return f(g(g)).apply(null, arguments);
+ };
+ }(function(g){
+ return function(){
+ return f(g(g)).apply(null, arguments);
+ };
+ });
+};
+over = curry$(function(f, g, x, y){
+ return f(g(x), g(y));
+});
+memoize = function(f){
+ var memo;
+ memo = {};
+ return function(){
+ var args, key, arg;
+ args = slice$.call(arguments);
+ key = (function(){
+ var i$, ref$, len$, results$ = [];
+ for (i$ = 0, len$ = (ref$ = args).length; i$ < len$; ++i$) {
+ arg = ref$[i$];
+ results$.push(arg + toString$.call(arg).slice(8, -1));
+ }
+ return results$;
+ }()).join('');
+ return memo[key] = key in memo
+ ? memo[key]
+ : f.apply(null, args);
+ };
+};
+module.exports = {
+ curry: curry,
+ flip: flip,
+ fix: fix,
+ apply: apply,
+ over: over,
+ memoize: memoize
+};
+function curry$(f, bound){
+ var context,
+ _curry = function(args) {
+ return f.length > 1 ? function(){
+ var params = args ? args.concat() : [];
+ context = bound ? context || this : this;
+ return params.push.apply(params, arguments) <
+ f.length && arguments.length ?
+ _curry.call(context, params) : f.apply(context, params);
+ } : f;
+ };
+ return _curry();
+} \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/prelude-ls/lib/List.js b/tools/node_modules/eslint/node_modules/prelude-ls/lib/List.js
new file mode 100644
index 0000000000..5790816b1a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/prelude-ls/lib/List.js
@@ -0,0 +1,686 @@
+// Generated by LiveScript 1.4.0
+var each, map, compact, filter, reject, partition, find, head, first, tail, last, initial, empty, reverse, unique, uniqueBy, fold, foldl, fold1, foldl1, foldr, foldr1, unfoldr, concat, concatMap, flatten, difference, intersection, union, countBy, groupBy, andList, orList, any, all, sort, sortWith, sortBy, sum, product, mean, average, maximum, minimum, maximumBy, minimumBy, scan, scanl, scan1, scanl1, scanr, scanr1, slice, take, drop, splitAt, takeWhile, dropWhile, span, breakList, zip, zipWith, zipAll, zipAllWith, at, elemIndex, elemIndices, findIndex, findIndices, toString$ = {}.toString, slice$ = [].slice;
+each = curry$(function(f, xs){
+ var i$, len$, x;
+ for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
+ x = xs[i$];
+ f(x);
+ }
+ return xs;
+});
+map = curry$(function(f, xs){
+ var i$, len$, x, results$ = [];
+ for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
+ x = xs[i$];
+ results$.push(f(x));
+ }
+ return results$;
+});
+compact = function(xs){
+ var i$, len$, x, results$ = [];
+ for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
+ x = xs[i$];
+ if (x) {
+ results$.push(x);
+ }
+ }
+ return results$;
+};
+filter = curry$(function(f, xs){
+ var i$, len$, x, results$ = [];
+ for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
+ x = xs[i$];
+ if (f(x)) {
+ results$.push(x);
+ }
+ }
+ return results$;
+});
+reject = curry$(function(f, xs){
+ var i$, len$, x, results$ = [];
+ for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
+ x = xs[i$];
+ if (!f(x)) {
+ results$.push(x);
+ }
+ }
+ return results$;
+});
+partition = curry$(function(f, xs){
+ var passed, failed, i$, len$, x;
+ passed = [];
+ failed = [];
+ for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
+ x = xs[i$];
+ (f(x) ? passed : failed).push(x);
+ }
+ return [passed, failed];
+});
+find = curry$(function(f, xs){
+ var i$, len$, x;
+ for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
+ x = xs[i$];
+ if (f(x)) {
+ return x;
+ }
+ }
+});
+head = first = function(xs){
+ return xs[0];
+};
+tail = function(xs){
+ if (!xs.length) {
+ return;
+ }
+ return xs.slice(1);
+};
+last = function(xs){
+ return xs[xs.length - 1];
+};
+initial = function(xs){
+ if (!xs.length) {
+ return;
+ }
+ return xs.slice(0, -1);
+};
+empty = function(xs){
+ return !xs.length;
+};
+reverse = function(xs){
+ return xs.concat().reverse();
+};
+unique = function(xs){
+ var result, i$, len$, x;
+ result = [];
+ for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
+ x = xs[i$];
+ if (!in$(x, result)) {
+ result.push(x);
+ }
+ }
+ return result;
+};
+uniqueBy = curry$(function(f, xs){
+ var seen, i$, len$, x, val, results$ = [];
+ seen = [];
+ for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
+ x = xs[i$];
+ val = f(x);
+ if (in$(val, seen)) {
+ continue;
+ }
+ seen.push(val);
+ results$.push(x);
+ }
+ return results$;
+});
+fold = foldl = curry$(function(f, memo, xs){
+ var i$, len$, x;
+ for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
+ x = xs[i$];
+ memo = f(memo, x);
+ }
+ return memo;
+});
+fold1 = foldl1 = curry$(function(f, xs){
+ return fold(f, xs[0], xs.slice(1));
+});
+foldr = curry$(function(f, memo, xs){
+ var i$, x;
+ for (i$ = xs.length - 1; i$ >= 0; --i$) {
+ x = xs[i$];
+ memo = f(x, memo);
+ }
+ return memo;
+});
+foldr1 = curry$(function(f, xs){
+ return foldr(f, xs[xs.length - 1], xs.slice(0, -1));
+});
+unfoldr = curry$(function(f, b){
+ var result, x, that;
+ result = [];
+ x = b;
+ while ((that = f(x)) != null) {
+ result.push(that[0]);
+ x = that[1];
+ }
+ return result;
+});
+concat = function(xss){
+ return [].concat.apply([], xss);
+};
+concatMap = curry$(function(f, xs){
+ var x;
+ return [].concat.apply([], (function(){
+ var i$, ref$, len$, results$ = [];
+ for (i$ = 0, len$ = (ref$ = xs).length; i$ < len$; ++i$) {
+ x = ref$[i$];
+ results$.push(f(x));
+ }
+ return results$;
+ }()));
+});
+flatten = function(xs){
+ var x;
+ return [].concat.apply([], (function(){
+ var i$, ref$, len$, results$ = [];
+ for (i$ = 0, len$ = (ref$ = xs).length; i$ < len$; ++i$) {
+ x = ref$[i$];
+ if (toString$.call(x).slice(8, -1) === 'Array') {
+ results$.push(flatten(x));
+ } else {
+ results$.push(x);
+ }
+ }
+ return results$;
+ }()));
+};
+difference = function(xs){
+ var yss, results, i$, len$, x, j$, len1$, ys;
+ yss = slice$.call(arguments, 1);
+ results = [];
+ outer: for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
+ x = xs[i$];
+ for (j$ = 0, len1$ = yss.length; j$ < len1$; ++j$) {
+ ys = yss[j$];
+ if (in$(x, ys)) {
+ continue outer;
+ }
+ }
+ results.push(x);
+ }
+ return results;
+};
+intersection = function(xs){
+ var yss, results, i$, len$, x, j$, len1$, ys;
+ yss = slice$.call(arguments, 1);
+ results = [];
+ outer: for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
+ x = xs[i$];
+ for (j$ = 0, len1$ = yss.length; j$ < len1$; ++j$) {
+ ys = yss[j$];
+ if (!in$(x, ys)) {
+ continue outer;
+ }
+ }
+ results.push(x);
+ }
+ return results;
+};
+union = function(){
+ var xss, results, i$, len$, xs, j$, len1$, x;
+ xss = slice$.call(arguments);
+ results = [];
+ for (i$ = 0, len$ = xss.length; i$ < len$; ++i$) {
+ xs = xss[i$];
+ for (j$ = 0, len1$ = xs.length; j$ < len1$; ++j$) {
+ x = xs[j$];
+ if (!in$(x, results)) {
+ results.push(x);
+ }
+ }
+ }
+ return results;
+};
+countBy = curry$(function(f, xs){
+ var results, i$, len$, x, key;
+ results = {};
+ for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
+ x = xs[i$];
+ key = f(x);
+ if (key in results) {
+ results[key] += 1;
+ } else {
+ results[key] = 1;
+ }
+ }
+ return results;
+});
+groupBy = curry$(function(f, xs){
+ var results, i$, len$, x, key;
+ results = {};
+ for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
+ x = xs[i$];
+ key = f(x);
+ if (key in results) {
+ results[key].push(x);
+ } else {
+ results[key] = [x];
+ }
+ }
+ return results;
+});
+andList = function(xs){
+ var i$, len$, x;
+ for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
+ x = xs[i$];
+ if (!x) {
+ return false;
+ }
+ }
+ return true;
+};
+orList = function(xs){
+ var i$, len$, x;
+ for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
+ x = xs[i$];
+ if (x) {
+ return true;
+ }
+ }
+ return false;
+};
+any = curry$(function(f, xs){
+ var i$, len$, x;
+ for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
+ x = xs[i$];
+ if (f(x)) {
+ return true;
+ }
+ }
+ return false;
+});
+all = curry$(function(f, xs){
+ var i$, len$, x;
+ for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
+ x = xs[i$];
+ if (!f(x)) {
+ return false;
+ }
+ }
+ return true;
+});
+sort = function(xs){
+ return xs.concat().sort(function(x, y){
+ if (x > y) {
+ return 1;
+ } else if (x < y) {
+ return -1;
+ } else {
+ return 0;
+ }
+ });
+};
+sortWith = curry$(function(f, xs){
+ return xs.concat().sort(f);
+});
+sortBy = curry$(function(f, xs){
+ return xs.concat().sort(function(x, y){
+ if (f(x) > f(y)) {
+ return 1;
+ } else if (f(x) < f(y)) {
+ return -1;
+ } else {
+ return 0;
+ }
+ });
+});
+sum = function(xs){
+ var result, i$, len$, x;
+ result = 0;
+ for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
+ x = xs[i$];
+ result += x;
+ }
+ return result;
+};
+product = function(xs){
+ var result, i$, len$, x;
+ result = 1;
+ for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
+ x = xs[i$];
+ result *= x;
+ }
+ return result;
+};
+mean = average = function(xs){
+ var sum, i$, len$, x;
+ sum = 0;
+ for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
+ x = xs[i$];
+ sum += x;
+ }
+ return sum / xs.length;
+};
+maximum = function(xs){
+ var max, i$, ref$, len$, x;
+ max = xs[0];
+ for (i$ = 0, len$ = (ref$ = xs.slice(1)).length; i$ < len$; ++i$) {
+ x = ref$[i$];
+ if (x > max) {
+ max = x;
+ }
+ }
+ return max;
+};
+minimum = function(xs){
+ var min, i$, ref$, len$, x;
+ min = xs[0];
+ for (i$ = 0, len$ = (ref$ = xs.slice(1)).length; i$ < len$; ++i$) {
+ x = ref$[i$];
+ if (x < min) {
+ min = x;
+ }
+ }
+ return min;
+};
+maximumBy = curry$(function(f, xs){
+ var max, i$, ref$, len$, x;
+ max = xs[0];
+ for (i$ = 0, len$ = (ref$ = xs.slice(1)).length; i$ < len$; ++i$) {
+ x = ref$[i$];
+ if (f(x) > f(max)) {
+ max = x;
+ }
+ }
+ return max;
+});
+minimumBy = curry$(function(f, xs){
+ var min, i$, ref$, len$, x;
+ min = xs[0];
+ for (i$ = 0, len$ = (ref$ = xs.slice(1)).length; i$ < len$; ++i$) {
+ x = ref$[i$];
+ if (f(x) < f(min)) {
+ min = x;
+ }
+ }
+ return min;
+});
+scan = scanl = curry$(function(f, memo, xs){
+ var last, x;
+ last = memo;
+ return [memo].concat((function(){
+ var i$, ref$, len$, results$ = [];
+ for (i$ = 0, len$ = (ref$ = xs).length; i$ < len$; ++i$) {
+ x = ref$[i$];
+ results$.push(last = f(last, x));
+ }
+ return results$;
+ }()));
+});
+scan1 = scanl1 = curry$(function(f, xs){
+ if (!xs.length) {
+ return;
+ }
+ return scan(f, xs[0], xs.slice(1));
+});
+scanr = curry$(function(f, memo, xs){
+ xs = xs.concat().reverse();
+ return scan(f, memo, xs).reverse();
+});
+scanr1 = curry$(function(f, xs){
+ if (!xs.length) {
+ return;
+ }
+ xs = xs.concat().reverse();
+ return scan(f, xs[0], xs.slice(1)).reverse();
+});
+slice = curry$(function(x, y, xs){
+ return xs.slice(x, y);
+});
+take = curry$(function(n, xs){
+ if (n <= 0) {
+ return xs.slice(0, 0);
+ } else {
+ return xs.slice(0, n);
+ }
+});
+drop = curry$(function(n, xs){
+ if (n <= 0) {
+ return xs;
+ } else {
+ return xs.slice(n);
+ }
+});
+splitAt = curry$(function(n, xs){
+ return [take(n, xs), drop(n, xs)];
+});
+takeWhile = curry$(function(p, xs){
+ var len, i;
+ len = xs.length;
+ if (!len) {
+ return xs;
+ }
+ i = 0;
+ while (i < len && p(xs[i])) {
+ i += 1;
+ }
+ return xs.slice(0, i);
+});
+dropWhile = curry$(function(p, xs){
+ var len, i;
+ len = xs.length;
+ if (!len) {
+ return xs;
+ }
+ i = 0;
+ while (i < len && p(xs[i])) {
+ i += 1;
+ }
+ return xs.slice(i);
+});
+span = curry$(function(p, xs){
+ return [takeWhile(p, xs), dropWhile(p, xs)];
+});
+breakList = curry$(function(p, xs){
+ return span(compose$(p, not$), xs);
+});
+zip = curry$(function(xs, ys){
+ var result, len, i$, len$, i, x;
+ result = [];
+ len = ys.length;
+ for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
+ i = i$;
+ x = xs[i$];
+ if (i === len) {
+ break;
+ }
+ result.push([x, ys[i]]);
+ }
+ return result;
+});
+zipWith = curry$(function(f, xs, ys){
+ var result, len, i$, len$, i, x;
+ result = [];
+ len = ys.length;
+ for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
+ i = i$;
+ x = xs[i$];
+ if (i === len) {
+ break;
+ }
+ result.push(f(x, ys[i]));
+ }
+ return result;
+});
+zipAll = function(){
+ var xss, minLength, i$, len$, xs, ref$, i, lresult$, j$, results$ = [];
+ xss = slice$.call(arguments);
+ minLength = undefined;
+ for (i$ = 0, len$ = xss.length; i$ < len$; ++i$) {
+ xs = xss[i$];
+ minLength <= (ref$ = xs.length) || (minLength = ref$);
+ }
+ for (i$ = 0; i$ < minLength; ++i$) {
+ i = i$;
+ lresult$ = [];
+ for (j$ = 0, len$ = xss.length; j$ < len$; ++j$) {
+ xs = xss[j$];
+ lresult$.push(xs[i]);
+ }
+ results$.push(lresult$);
+ }
+ return results$;
+};
+zipAllWith = function(f){
+ var xss, minLength, i$, len$, xs, ref$, i, results$ = [];
+ xss = slice$.call(arguments, 1);
+ minLength = undefined;
+ for (i$ = 0, len$ = xss.length; i$ < len$; ++i$) {
+ xs = xss[i$];
+ minLength <= (ref$ = xs.length) || (minLength = ref$);
+ }
+ for (i$ = 0; i$ < minLength; ++i$) {
+ i = i$;
+ results$.push(f.apply(null, (fn$())));
+ }
+ return results$;
+ function fn$(){
+ var i$, ref$, len$, results$ = [];
+ for (i$ = 0, len$ = (ref$ = xss).length; i$ < len$; ++i$) {
+ xs = ref$[i$];
+ results$.push(xs[i]);
+ }
+ return results$;
+ }
+};
+at = curry$(function(n, xs){
+ if (n < 0) {
+ return xs[xs.length + n];
+ } else {
+ return xs[n];
+ }
+});
+elemIndex = curry$(function(el, xs){
+ var i$, len$, i, x;
+ for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
+ i = i$;
+ x = xs[i$];
+ if (x === el) {
+ return i;
+ }
+ }
+});
+elemIndices = curry$(function(el, xs){
+ var i$, len$, i, x, results$ = [];
+ for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
+ i = i$;
+ x = xs[i$];
+ if (x === el) {
+ results$.push(i);
+ }
+ }
+ return results$;
+});
+findIndex = curry$(function(f, xs){
+ var i$, len$, i, x;
+ for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
+ i = i$;
+ x = xs[i$];
+ if (f(x)) {
+ return i;
+ }
+ }
+});
+findIndices = curry$(function(f, xs){
+ var i$, len$, i, x, results$ = [];
+ for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
+ i = i$;
+ x = xs[i$];
+ if (f(x)) {
+ results$.push(i);
+ }
+ }
+ return results$;
+});
+module.exports = {
+ each: each,
+ map: map,
+ filter: filter,
+ compact: compact,
+ reject: reject,
+ partition: partition,
+ find: find,
+ head: head,
+ first: first,
+ tail: tail,
+ last: last,
+ initial: initial,
+ empty: empty,
+ reverse: reverse,
+ difference: difference,
+ intersection: intersection,
+ union: union,
+ countBy: countBy,
+ groupBy: groupBy,
+ fold: fold,
+ fold1: fold1,
+ foldl: foldl,
+ foldl1: foldl1,
+ foldr: foldr,
+ foldr1: foldr1,
+ unfoldr: unfoldr,
+ andList: andList,
+ orList: orList,
+ any: any,
+ all: all,
+ unique: unique,
+ uniqueBy: uniqueBy,
+ sort: sort,
+ sortWith: sortWith,
+ sortBy: sortBy,
+ sum: sum,
+ product: product,
+ mean: mean,
+ average: average,
+ concat: concat,
+ concatMap: concatMap,
+ flatten: flatten,
+ maximum: maximum,
+ minimum: minimum,
+ maximumBy: maximumBy,
+ minimumBy: minimumBy,
+ scan: scan,
+ scan1: scan1,
+ scanl: scanl,
+ scanl1: scanl1,
+ scanr: scanr,
+ scanr1: scanr1,
+ slice: slice,
+ take: take,
+ drop: drop,
+ splitAt: splitAt,
+ takeWhile: takeWhile,
+ dropWhile: dropWhile,
+ span: span,
+ breakList: breakList,
+ zip: zip,
+ zipWith: zipWith,
+ zipAll: zipAll,
+ zipAllWith: zipAllWith,
+ at: at,
+ elemIndex: elemIndex,
+ elemIndices: elemIndices,
+ findIndex: findIndex,
+ findIndices: findIndices
+};
+function curry$(f, bound){
+ var context,
+ _curry = function(args) {
+ return f.length > 1 ? function(){
+ var params = args ? args.concat() : [];
+ context = bound ? context || this : this;
+ return params.push.apply(params, arguments) <
+ f.length && arguments.length ?
+ _curry.call(context, params) : f.apply(context, params);
+ } : f;
+ };
+ return _curry();
+}
+function in$(x, xs){
+ var i = -1, l = xs.length >>> 0;
+ while (++i < l) if (x === xs[i]) return true;
+ return false;
+}
+function compose$() {
+ var functions = arguments;
+ return function() {
+ var i, result;
+ result = functions[0].apply(this, arguments);
+ for (i = 1; i < functions.length; ++i) {
+ result = functions[i](result);
+ }
+ return result;
+ };
+}
+function not$(x){ return !x; } \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/prelude-ls/lib/Num.js b/tools/node_modules/eslint/node_modules/prelude-ls/lib/Num.js
new file mode 100644
index 0000000000..0e25be7b38
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/prelude-ls/lib/Num.js
@@ -0,0 +1,130 @@
+// Generated by LiveScript 1.4.0
+var max, min, negate, abs, signum, quot, rem, div, mod, recip, pi, tau, exp, sqrt, ln, pow, sin, tan, cos, asin, acos, atan, atan2, truncate, round, ceiling, floor, isItNaN, even, odd, gcd, lcm;
+max = curry$(function(x$, y$){
+ return x$ > y$ ? x$ : y$;
+});
+min = curry$(function(x$, y$){
+ return x$ < y$ ? x$ : y$;
+});
+negate = function(x){
+ return -x;
+};
+abs = Math.abs;
+signum = function(x){
+ if (x < 0) {
+ return -1;
+ } else if (x > 0) {
+ return 1;
+ } else {
+ return 0;
+ }
+};
+quot = curry$(function(x, y){
+ return ~~(x / y);
+});
+rem = curry$(function(x$, y$){
+ return x$ % y$;
+});
+div = curry$(function(x, y){
+ return Math.floor(x / y);
+});
+mod = curry$(function(x$, y$){
+ var ref$;
+ return (((x$) % (ref$ = y$) + ref$) % ref$);
+});
+recip = (function(it){
+ return 1 / it;
+});
+pi = Math.PI;
+tau = pi * 2;
+exp = Math.exp;
+sqrt = Math.sqrt;
+ln = Math.log;
+pow = curry$(function(x$, y$){
+ return Math.pow(x$, y$);
+});
+sin = Math.sin;
+tan = Math.tan;
+cos = Math.cos;
+asin = Math.asin;
+acos = Math.acos;
+atan = Math.atan;
+atan2 = curry$(function(x, y){
+ return Math.atan2(x, y);
+});
+truncate = function(x){
+ return ~~x;
+};
+round = Math.round;
+ceiling = Math.ceil;
+floor = Math.floor;
+isItNaN = function(x){
+ return x !== x;
+};
+even = function(x){
+ return x % 2 === 0;
+};
+odd = function(x){
+ return x % 2 !== 0;
+};
+gcd = curry$(function(x, y){
+ var z;
+ x = Math.abs(x);
+ y = Math.abs(y);
+ while (y !== 0) {
+ z = x % y;
+ x = y;
+ y = z;
+ }
+ return x;
+});
+lcm = curry$(function(x, y){
+ return Math.abs(Math.floor(x / gcd(x, y) * y));
+});
+module.exports = {
+ max: max,
+ min: min,
+ negate: negate,
+ abs: abs,
+ signum: signum,
+ quot: quot,
+ rem: rem,
+ div: div,
+ mod: mod,
+ recip: recip,
+ pi: pi,
+ tau: tau,
+ exp: exp,
+ sqrt: sqrt,
+ ln: ln,
+ pow: pow,
+ sin: sin,
+ tan: tan,
+ cos: cos,
+ acos: acos,
+ asin: asin,
+ atan: atan,
+ atan2: atan2,
+ truncate: truncate,
+ round: round,
+ ceiling: ceiling,
+ floor: floor,
+ isItNaN: isItNaN,
+ even: even,
+ odd: odd,
+ gcd: gcd,
+ lcm: lcm
+};
+function curry$(f, bound){
+ var context,
+ _curry = function(args) {
+ return f.length > 1 ? function(){
+ var params = args ? args.concat() : [];
+ context = bound ? context || this : this;
+ return params.push.apply(params, arguments) <
+ f.length && arguments.length ?
+ _curry.call(context, params) : f.apply(context, params);
+ } : f;
+ };
+ return _curry();
+} \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/prelude-ls/lib/Obj.js b/tools/node_modules/eslint/node_modules/prelude-ls/lib/Obj.js
new file mode 100644
index 0000000000..f0a921ffd1
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/prelude-ls/lib/Obj.js
@@ -0,0 +1,154 @@
+// Generated by LiveScript 1.4.0
+var values, keys, pairsToObj, objToPairs, listsToObj, objToLists, empty, each, map, compact, filter, reject, partition, find;
+values = function(object){
+ var i$, x, results$ = [];
+ for (i$ in object) {
+ x = object[i$];
+ results$.push(x);
+ }
+ return results$;
+};
+keys = function(object){
+ var x, results$ = [];
+ for (x in object) {
+ results$.push(x);
+ }
+ return results$;
+};
+pairsToObj = function(object){
+ var i$, len$, x, resultObj$ = {};
+ for (i$ = 0, len$ = object.length; i$ < len$; ++i$) {
+ x = object[i$];
+ resultObj$[x[0]] = x[1];
+ }
+ return resultObj$;
+};
+objToPairs = function(object){
+ var key, value, results$ = [];
+ for (key in object) {
+ value = object[key];
+ results$.push([key, value]);
+ }
+ return results$;
+};
+listsToObj = curry$(function(keys, values){
+ var i$, len$, i, key, resultObj$ = {};
+ for (i$ = 0, len$ = keys.length; i$ < len$; ++i$) {
+ i = i$;
+ key = keys[i$];
+ resultObj$[key] = values[i];
+ }
+ return resultObj$;
+});
+objToLists = function(object){
+ var keys, values, key, value;
+ keys = [];
+ values = [];
+ for (key in object) {
+ value = object[key];
+ keys.push(key);
+ values.push(value);
+ }
+ return [keys, values];
+};
+empty = function(object){
+ var x;
+ for (x in object) {
+ return false;
+ }
+ return true;
+};
+each = curry$(function(f, object){
+ var i$, x;
+ for (i$ in object) {
+ x = object[i$];
+ f(x);
+ }
+ return object;
+});
+map = curry$(function(f, object){
+ var k, x, resultObj$ = {};
+ for (k in object) {
+ x = object[k];
+ resultObj$[k] = f(x);
+ }
+ return resultObj$;
+});
+compact = function(object){
+ var k, x, resultObj$ = {};
+ for (k in object) {
+ x = object[k];
+ if (x) {
+ resultObj$[k] = x;
+ }
+ }
+ return resultObj$;
+};
+filter = curry$(function(f, object){
+ var k, x, resultObj$ = {};
+ for (k in object) {
+ x = object[k];
+ if (f(x)) {
+ resultObj$[k] = x;
+ }
+ }
+ return resultObj$;
+});
+reject = curry$(function(f, object){
+ var k, x, resultObj$ = {};
+ for (k in object) {
+ x = object[k];
+ if (!f(x)) {
+ resultObj$[k] = x;
+ }
+ }
+ return resultObj$;
+});
+partition = curry$(function(f, object){
+ var passed, failed, k, x;
+ passed = {};
+ failed = {};
+ for (k in object) {
+ x = object[k];
+ (f(x) ? passed : failed)[k] = x;
+ }
+ return [passed, failed];
+});
+find = curry$(function(f, object){
+ var i$, x;
+ for (i$ in object) {
+ x = object[i$];
+ if (f(x)) {
+ return x;
+ }
+ }
+});
+module.exports = {
+ values: values,
+ keys: keys,
+ pairsToObj: pairsToObj,
+ objToPairs: objToPairs,
+ listsToObj: listsToObj,
+ objToLists: objToLists,
+ empty: empty,
+ each: each,
+ map: map,
+ filter: filter,
+ compact: compact,
+ reject: reject,
+ partition: partition,
+ find: find
+};
+function curry$(f, bound){
+ var context,
+ _curry = function(args) {
+ return f.length > 1 ? function(){
+ var params = args ? args.concat() : [];
+ context = bound ? context || this : this;
+ return params.push.apply(params, arguments) <
+ f.length && arguments.length ?
+ _curry.call(context, params) : f.apply(context, params);
+ } : f;
+ };
+ return _curry();
+} \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/prelude-ls/lib/Str.js b/tools/node_modules/eslint/node_modules/prelude-ls/lib/Str.js
new file mode 100644
index 0000000000..eb9a1ac085
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/prelude-ls/lib/Str.js
@@ -0,0 +1,92 @@
+// Generated by LiveScript 1.4.0
+var split, join, lines, unlines, words, unwords, chars, unchars, reverse, repeat, capitalize, camelize, dasherize;
+split = curry$(function(sep, str){
+ return str.split(sep);
+});
+join = curry$(function(sep, xs){
+ return xs.join(sep);
+});
+lines = function(str){
+ if (!str.length) {
+ return [];
+ }
+ return str.split('\n');
+};
+unlines = function(it){
+ return it.join('\n');
+};
+words = function(str){
+ if (!str.length) {
+ return [];
+ }
+ return str.split(/[ ]+/);
+};
+unwords = function(it){
+ return it.join(' ');
+};
+chars = function(it){
+ return it.split('');
+};
+unchars = function(it){
+ return it.join('');
+};
+reverse = function(str){
+ return str.split('').reverse().join('');
+};
+repeat = curry$(function(n, str){
+ var result, i$;
+ result = '';
+ for (i$ = 0; i$ < n; ++i$) {
+ result += str;
+ }
+ return result;
+});
+capitalize = function(str){
+ return str.charAt(0).toUpperCase() + str.slice(1);
+};
+camelize = function(it){
+ return it.replace(/[-_]+(.)?/g, function(arg$, c){
+ return (c != null ? c : '').toUpperCase();
+ });
+};
+dasherize = function(str){
+ return str.replace(/([^-A-Z])([A-Z]+)/g, function(arg$, lower, upper){
+ return lower + "-" + (upper.length > 1
+ ? upper
+ : upper.toLowerCase());
+ }).replace(/^([A-Z]+)/, function(arg$, upper){
+ if (upper.length > 1) {
+ return upper + "-";
+ } else {
+ return upper.toLowerCase();
+ }
+ });
+};
+module.exports = {
+ split: split,
+ join: join,
+ lines: lines,
+ unlines: unlines,
+ words: words,
+ unwords: unwords,
+ chars: chars,
+ unchars: unchars,
+ reverse: reverse,
+ repeat: repeat,
+ capitalize: capitalize,
+ camelize: camelize,
+ dasherize: dasherize
+};
+function curry$(f, bound){
+ var context,
+ _curry = function(args) {
+ return f.length > 1 ? function(){
+ var params = args ? args.concat() : [];
+ context = bound ? context || this : this;
+ return params.push.apply(params, arguments) <
+ f.length && arguments.length ?
+ _curry.call(context, params) : f.apply(context, params);
+ } : f;
+ };
+ return _curry();
+} \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/prelude-ls/lib/index.js b/tools/node_modules/eslint/node_modules/prelude-ls/lib/index.js
new file mode 100644
index 0000000000..391cb2ee3b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/prelude-ls/lib/index.js
@@ -0,0 +1,178 @@
+// Generated by LiveScript 1.4.0
+var Func, List, Obj, Str, Num, id, isType, replicate, prelude, toString$ = {}.toString;
+Func = require('./Func.js');
+List = require('./List.js');
+Obj = require('./Obj.js');
+Str = require('./Str.js');
+Num = require('./Num.js');
+id = function(x){
+ return x;
+};
+isType = curry$(function(type, x){
+ return toString$.call(x).slice(8, -1) === type;
+});
+replicate = curry$(function(n, x){
+ var i$, results$ = [];
+ for (i$ = 0; i$ < n; ++i$) {
+ results$.push(x);
+ }
+ return results$;
+});
+Str.empty = List.empty;
+Str.slice = List.slice;
+Str.take = List.take;
+Str.drop = List.drop;
+Str.splitAt = List.splitAt;
+Str.takeWhile = List.takeWhile;
+Str.dropWhile = List.dropWhile;
+Str.span = List.span;
+Str.breakStr = List.breakList;
+prelude = {
+ Func: Func,
+ List: List,
+ Obj: Obj,
+ Str: Str,
+ Num: Num,
+ id: id,
+ isType: isType,
+ replicate: replicate
+};
+prelude.each = List.each;
+prelude.map = List.map;
+prelude.filter = List.filter;
+prelude.compact = List.compact;
+prelude.reject = List.reject;
+prelude.partition = List.partition;
+prelude.find = List.find;
+prelude.head = List.head;
+prelude.first = List.first;
+prelude.tail = List.tail;
+prelude.last = List.last;
+prelude.initial = List.initial;
+prelude.empty = List.empty;
+prelude.reverse = List.reverse;
+prelude.difference = List.difference;
+prelude.intersection = List.intersection;
+prelude.union = List.union;
+prelude.countBy = List.countBy;
+prelude.groupBy = List.groupBy;
+prelude.fold = List.fold;
+prelude.foldl = List.foldl;
+prelude.fold1 = List.fold1;
+prelude.foldl1 = List.foldl1;
+prelude.foldr = List.foldr;
+prelude.foldr1 = List.foldr1;
+prelude.unfoldr = List.unfoldr;
+prelude.andList = List.andList;
+prelude.orList = List.orList;
+prelude.any = List.any;
+prelude.all = List.all;
+prelude.unique = List.unique;
+prelude.uniqueBy = List.uniqueBy;
+prelude.sort = List.sort;
+prelude.sortWith = List.sortWith;
+prelude.sortBy = List.sortBy;
+prelude.sum = List.sum;
+prelude.product = List.product;
+prelude.mean = List.mean;
+prelude.average = List.average;
+prelude.concat = List.concat;
+prelude.concatMap = List.concatMap;
+prelude.flatten = List.flatten;
+prelude.maximum = List.maximum;
+prelude.minimum = List.minimum;
+prelude.maximumBy = List.maximumBy;
+prelude.minimumBy = List.minimumBy;
+prelude.scan = List.scan;
+prelude.scanl = List.scanl;
+prelude.scan1 = List.scan1;
+prelude.scanl1 = List.scanl1;
+prelude.scanr = List.scanr;
+prelude.scanr1 = List.scanr1;
+prelude.slice = List.slice;
+prelude.take = List.take;
+prelude.drop = List.drop;
+prelude.splitAt = List.splitAt;
+prelude.takeWhile = List.takeWhile;
+prelude.dropWhile = List.dropWhile;
+prelude.span = List.span;
+prelude.breakList = List.breakList;
+prelude.zip = List.zip;
+prelude.zipWith = List.zipWith;
+prelude.zipAll = List.zipAll;
+prelude.zipAllWith = List.zipAllWith;
+prelude.at = List.at;
+prelude.elemIndex = List.elemIndex;
+prelude.elemIndices = List.elemIndices;
+prelude.findIndex = List.findIndex;
+prelude.findIndices = List.findIndices;
+prelude.apply = Func.apply;
+prelude.curry = Func.curry;
+prelude.flip = Func.flip;
+prelude.fix = Func.fix;
+prelude.over = Func.over;
+prelude.split = Str.split;
+prelude.join = Str.join;
+prelude.lines = Str.lines;
+prelude.unlines = Str.unlines;
+prelude.words = Str.words;
+prelude.unwords = Str.unwords;
+prelude.chars = Str.chars;
+prelude.unchars = Str.unchars;
+prelude.repeat = Str.repeat;
+prelude.capitalize = Str.capitalize;
+prelude.camelize = Str.camelize;
+prelude.dasherize = Str.dasherize;
+prelude.values = Obj.values;
+prelude.keys = Obj.keys;
+prelude.pairsToObj = Obj.pairsToObj;
+prelude.objToPairs = Obj.objToPairs;
+prelude.listsToObj = Obj.listsToObj;
+prelude.objToLists = Obj.objToLists;
+prelude.max = Num.max;
+prelude.min = Num.min;
+prelude.negate = Num.negate;
+prelude.abs = Num.abs;
+prelude.signum = Num.signum;
+prelude.quot = Num.quot;
+prelude.rem = Num.rem;
+prelude.div = Num.div;
+prelude.mod = Num.mod;
+prelude.recip = Num.recip;
+prelude.pi = Num.pi;
+prelude.tau = Num.tau;
+prelude.exp = Num.exp;
+prelude.sqrt = Num.sqrt;
+prelude.ln = Num.ln;
+prelude.pow = Num.pow;
+prelude.sin = Num.sin;
+prelude.tan = Num.tan;
+prelude.cos = Num.cos;
+prelude.acos = Num.acos;
+prelude.asin = Num.asin;
+prelude.atan = Num.atan;
+prelude.atan2 = Num.atan2;
+prelude.truncate = Num.truncate;
+prelude.round = Num.round;
+prelude.ceiling = Num.ceiling;
+prelude.floor = Num.floor;
+prelude.isItNaN = Num.isItNaN;
+prelude.even = Num.even;
+prelude.odd = Num.odd;
+prelude.gcd = Num.gcd;
+prelude.lcm = Num.lcm;
+prelude.VERSION = '1.1.2';
+module.exports = prelude;
+function curry$(f, bound){
+ var context,
+ _curry = function(args) {
+ return f.length > 1 ? function(){
+ var params = args ? args.concat() : [];
+ context = bound ? context || this : this;
+ return params.push.apply(params, arguments) <
+ f.length && arguments.length ?
+ _curry.call(context, params) : f.apply(context, params);
+ } : f;
+ };
+ return _curry();
+} \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/prelude-ls/package.json b/tools/node_modules/eslint/node_modules/prelude-ls/package.json
new file mode 100644
index 0000000000..f17577dc68
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/prelude-ls/package.json
@@ -0,0 +1,84 @@
+{
+ "_from": "prelude-ls@~1.1.2",
+ "_id": "prelude-ls@1.1.2",
+ "_inBundle": false,
+ "_integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=",
+ "_location": "/eslint/prelude-ls",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "prelude-ls@~1.1.2",
+ "name": "prelude-ls",
+ "escapedName": "prelude-ls",
+ "rawSpec": "~1.1.2",
+ "saveSpec": null,
+ "fetchSpec": "~1.1.2"
+ },
+ "_requiredBy": [
+ "/eslint/levn",
+ "/eslint/optionator",
+ "/eslint/type-check"
+ ],
+ "_resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
+ "_shasum": "21932a549f5e52ffd9a827f570e04be62a97da54",
+ "_spec": "prelude-ls@~1.1.2",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/levn",
+ "author": {
+ "name": "George Zahariev",
+ "email": "z@georgezahariev.com"
+ },
+ "bugs": {
+ "url": "https://github.com/gkz/prelude-ls/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "prelude.ls is a functionally oriented utility library. It is powerful and flexible. Almost all of its functions are curried. It is written in, and is the recommended base library for, LiveScript.",
+ "devDependencies": {
+ "browserify": "~3.24.13",
+ "istanbul": "~0.2.4",
+ "livescript": "~1.4.0",
+ "mocha": "~2.2.4",
+ "sinon": "~1.10.2",
+ "uglify-js": "~2.4.12"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ },
+ "files": [
+ "lib/",
+ "README.md",
+ "LICENSE"
+ ],
+ "homepage": "http://preludels.com",
+ "keywords": [
+ "prelude",
+ "livescript",
+ "utility",
+ "ls",
+ "coffeescript",
+ "javascript",
+ "library",
+ "functional",
+ "array",
+ "list",
+ "object",
+ "string"
+ ],
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "https://raw.github.com/gkz/prelude-ls/master/LICENSE"
+ }
+ ],
+ "main": "lib/",
+ "name": "prelude-ls",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/gkz/prelude-ls.git"
+ },
+ "scripts": {
+ "test": "make test"
+ },
+ "version": "1.1.2"
+}
diff --git a/tools/node_modules/eslint/node_modules/process-nextick-args/index.js b/tools/node_modules/eslint/node_modules/process-nextick-args/index.js
new file mode 100644
index 0000000000..a4f40f845f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/process-nextick-args/index.js
@@ -0,0 +1,43 @@
+'use strict';
+
+if (!process.version ||
+ process.version.indexOf('v0.') === 0 ||
+ process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {
+ module.exports = nextTick;
+} else {
+ module.exports = process.nextTick;
+}
+
+function nextTick(fn, arg1, arg2, arg3) {
+ if (typeof fn !== 'function') {
+ throw new TypeError('"callback" argument must be a function');
+ }
+ var len = arguments.length;
+ var args, i;
+ switch (len) {
+ case 0:
+ case 1:
+ return process.nextTick(fn);
+ case 2:
+ return process.nextTick(function afterTickOne() {
+ fn.call(null, arg1);
+ });
+ case 3:
+ return process.nextTick(function afterTickTwo() {
+ fn.call(null, arg1, arg2);
+ });
+ case 4:
+ return process.nextTick(function afterTickThree() {
+ fn.call(null, arg1, arg2, arg3);
+ });
+ default:
+ args = new Array(len - 1);
+ i = 0;
+ while (i < args.length) {
+ args[i++] = arguments[i];
+ }
+ return process.nextTick(function afterTick() {
+ fn.apply(null, args);
+ });
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/process-nextick-args/license.md b/tools/node_modules/eslint/node_modules/process-nextick-args/license.md
new file mode 100644
index 0000000000..c67e3532b5
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/process-nextick-args/license.md
@@ -0,0 +1,19 @@
+# Copyright (c) 2015 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/tools/node_modules/eslint/node_modules/process-nextick-args/package.json b/tools/node_modules/eslint/node_modules/process-nextick-args/package.json
new file mode 100644
index 0000000000..e1a95b7bd4
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/process-nextick-args/package.json
@@ -0,0 +1,47 @@
+{
+ "_from": "process-nextick-args@~1.0.6",
+ "_id": "process-nextick-args@1.0.7",
+ "_inBundle": false,
+ "_integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=",
+ "_location": "/eslint/process-nextick-args",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "process-nextick-args@~1.0.6",
+ "name": "process-nextick-args",
+ "escapedName": "process-nextick-args",
+ "rawSpec": "~1.0.6",
+ "saveSpec": null,
+ "fetchSpec": "~1.0.6"
+ },
+ "_requiredBy": [
+ "/eslint/readable-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
+ "_shasum": "150e20b756590ad3f91093f25a4f2ad8bff30ba3",
+ "_spec": "process-nextick-args@~1.0.6",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/readable-stream",
+ "author": "",
+ "bugs": {
+ "url": "https://github.com/calvinmetcalf/process-nextick-args/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "process.nextTick but always with args",
+ "devDependencies": {
+ "tap": "~0.2.6"
+ },
+ "homepage": "https://github.com/calvinmetcalf/process-nextick-args",
+ "license": "MIT",
+ "main": "index.js",
+ "name": "process-nextick-args",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/calvinmetcalf/process-nextick-args.git"
+ },
+ "scripts": {
+ "test": "node test.js"
+ },
+ "version": "1.0.7"
+}
diff --git a/tools/node_modules/eslint/node_modules/process-nextick-args/readme.md b/tools/node_modules/eslint/node_modules/process-nextick-args/readme.md
new file mode 100644
index 0000000000..78e7cfaeb7
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/process-nextick-args/readme.md
@@ -0,0 +1,18 @@
+process-nextick-args
+=====
+
+[![Build Status](https://travis-ci.org/calvinmetcalf/process-nextick-args.svg?branch=master)](https://travis-ci.org/calvinmetcalf/process-nextick-args)
+
+```bash
+npm install --save process-nextick-args
+```
+
+Always be able to pass arguments to process.nextTick, no matter the platform
+
+```js
+var nextTick = require('process-nextick-args');
+
+nextTick(function (a, b, c) {
+ console.log(a, b, c);
+}, 'step', 3, 'profit');
+```
diff --git a/tools/node_modules/eslint/node_modules/progress/LICENSE b/tools/node_modules/eslint/node_modules/progress/LICENSE
new file mode 100644
index 0000000000..4608b3947f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/progress/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2017 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/tools/node_modules/eslint/node_modules/progress/Makefile b/tools/node_modules/eslint/node_modules/progress/Makefile
new file mode 100644
index 0000000000..f933be10a1
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/progress/Makefile
@@ -0,0 +1,8 @@
+
+EXAMPLES = $(foreach EXAMPLE, $(wildcard examples/*.js), $(EXAMPLE))
+
+.PHONY: test
+test: $(EXAMPLES)
+
+.PHONY: $(EXAMPLES)
+$(EXAMPLES): ; node $@ && echo
diff --git a/tools/node_modules/eslint/node_modules/progress/Readme.md b/tools/node_modules/eslint/node_modules/progress/Readme.md
new file mode 100644
index 0000000000..6d4271abc9
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/progress/Readme.md
@@ -0,0 +1,146 @@
+Flexible ascii progress bar.
+
+## Installation
+
+```bash
+$ npm install progress
+```
+
+## Usage
+
+First we create a `ProgressBar`, giving it a format string
+as well as the `total`, telling the progress bar when it will
+be considered complete. After that all we need to do is `tick()` appropriately.
+
+```javascript
+var ProgressBar = require('progress');
+
+var bar = new ProgressBar(':bar', { total: 10 });
+var timer = setInterval(function () {
+ bar.tick();
+ if (bar.complete) {
+ console.log('\ncomplete\n');
+ clearInterval(timer);
+ }
+}, 100);
+```
+
+### Options
+
+These are keys in the options object you can pass to the progress bar along with
+`total` as seen in the example above.
+
+- `curr` current completed index
+- `total` total number of ticks to complete
+- `width` the displayed width of the progress bar defaulting to total
+- `stream` the output stream defaulting to stderr
+- `head` head character defaulting to complete character
+- `complete` completion character defaulting to "="
+- `incomplete` incomplete character defaulting to "-"
+- `renderThrottle` minimum time between updates in milliseconds defaulting to 16
+- `clear` option to clear the bar on completion defaulting to false
+- `callback` optional function to call when the progress bar completes
+
+### Tokens
+
+These are tokens you can use in the format of your progress bar.
+
+- `:bar` the progress bar itself
+- `:current` current tick number
+- `:total` total ticks
+- `:elapsed` time elapsed in seconds
+- `:percent` completion percentage
+- `:eta` estimated completion time in seconds
+- `:rate` rate of ticks per second
+
+### Custom Tokens
+
+You can define custom tokens by adding a `{'name': value}` object parameter to your method (`tick()`, `update()`, etc.) calls.
+
+```javascript
+var bar = new ProgressBar(':current: :token1 :token2', { total: 3 })
+bar.tick({
+ 'token1': "Hello",
+ 'token2': "World!\n"
+})
+bar.tick(2, {
+ 'token1': "Goodbye",
+ 'token2': "World!"
+})
+```
+The above example would result in the output below.
+
+```
+1: Hello World!
+3: Goodbye World!
+```
+
+## Examples
+
+### Download
+
+In our download example each tick has a variable influence, so we pass the chunk
+length which adjusts the progress bar appropriately relative to the total
+length.
+
+```javascript
+var ProgressBar = require('progress');
+var https = require('https');
+
+var req = https.request({
+ host: 'download.github.com',
+ port: 443,
+ path: '/visionmedia-node-jscoverage-0d4608a.zip'
+});
+
+req.on('response', function(res){
+ var len = parseInt(res.headers['content-length'], 10);
+
+ console.log();
+ var bar = new ProgressBar(' downloading [:bar] :rate/bps :percent :etas', {
+ complete: '=',
+ incomplete: ' ',
+ width: 20,
+ total: len
+ });
+
+ res.on('data', function (chunk) {
+ bar.tick(chunk.length);
+ });
+
+ res.on('end', function () {
+ console.log('\n');
+ });
+});
+
+req.end();
+```
+
+The above example result in a progress bar like the one below.
+
+```
+downloading [===== ] 39/bps 29% 3.7s
+```
+
+### Interrupt
+
+To display a message during progress bar execution, use `interrupt()`
+```javascript
+var ProgressBar = require('progress');
+
+var bar = new ProgressBar(':bar :current/:total', { total: 10 });
+var timer = setInterval(function () {
+ bar.tick();
+ if (bar.complete) {
+ clearInterval(timer);
+ } else if (bar.curr === 5) {
+ bar.interrupt('this message appears above the progress bar\ncurrent progress is ' + bar.curr + '/' + bar.total);
+ }
+}, 1000);
+```
+
+You can see more examples in the `examples` folder.
+
+## License
+
+MIT
diff --git a/tools/node_modules/eslint/node_modules/progress/index.js b/tools/node_modules/eslint/node_modules/progress/index.js
new file mode 100644
index 0000000000..4449dd30d7
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/progress/index.js
@@ -0,0 +1 @@
+module.exports = require('./lib/node-progress');
diff --git a/tools/node_modules/eslint/node_modules/progress/lib/node-progress.js b/tools/node_modules/eslint/node_modules/progress/lib/node-progress.js
new file mode 100644
index 0000000000..653f711533
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/progress/lib/node-progress.js
@@ -0,0 +1,231 @@
+/*!
+ * node-progress
+ * Copyright(c) 2011 TJ Holowaychuk <tj@vision-media.ca>
+ * MIT Licensed
+ */
+
+/**
+ * Expose `ProgressBar`.
+ */
+
+exports = module.exports = ProgressBar;
+
+/**
+ * Initialize a `ProgressBar` with the given `fmt` string and `options` or
+ * `total`.
+ *
+ * Options:
+ *
+ * - `curr` current completed index
+ * - `total` total number of ticks to complete
+ * - `width` the displayed width of the progress bar defaulting to total
+ * - `stream` the output stream defaulting to stderr
+ * - `head` head character defaulting to complete character
+ * - `complete` completion character defaulting to "="
+ * - `incomplete` incomplete character defaulting to "-"
+ * - `renderThrottle` minimum time between updates in milliseconds defaulting to 16
+ * - `callback` optional function to call when the progress bar completes
+ * - `clear` will clear the progress bar upon termination
+ *
+ * Tokens:
+ *
+ * - `:bar` the progress bar itself
+ * - `:current` current tick number
+ * - `:total` total ticks
+ * - `:elapsed` time elapsed in seconds
+ * - `:percent` completion percentage
+ * - `:eta` eta in seconds
+ * - `:rate` rate of ticks per second
+ *
+ * @param {string} fmt
+ * @param {object|number} options or total
+ * @api public
+ */
+
+function ProgressBar(fmt, options) {
+ this.stream = options.stream || process.stderr;
+
+ if (typeof(options) == 'number') {
+ var total = options;
+ options = {};
+ options.total = total;
+ } else {
+ options = options || {};
+ if ('string' != typeof fmt) throw new Error('format required');
+ if ('number' != typeof options.total) throw new Error('total required');
+ }
+
+ this.fmt = fmt;
+ this.curr = options.curr || 0;
+ this.total = options.total;
+ this.width = options.width || this.total;
+ this.clear = options.clear
+ this.chars = {
+ complete : options.complete || '=',
+ incomplete : options.incomplete || '-',
+ head : options.head || (options.complete || '=')
+ };
+ this.renderThrottle = options.renderThrottle !== 0 ? (options.renderThrottle || 16) : 0;
+ this.callback = options.callback || function () {};
+ this.tokens = {};
+ this.lastDraw = '';
+}
+
+/**
+ * "tick" the progress bar with optional `len` and optional `tokens`.
+ *
+ * @param {number|object} len or tokens
+ * @param {object} tokens
+ * @api public
+ */
+
+ProgressBar.prototype.tick = function(len, tokens){
+ if (len !== 0)
+ len = len || 1;
+
+ // swap tokens
+ if ('object' == typeof len) tokens = len, len = 1;
+ if (tokens) this.tokens = tokens;
+
+ // start time for eta
+ if (0 == this.curr) this.start = new Date;
+
+ this.curr += len
+
+ // schedule render
+ if (!this.renderThrottleTimeout) {
+ this.renderThrottleTimeout = setTimeout(this.render.bind(this), this.renderThrottle);
+ }
+
+ // progress complete
+ if (this.curr >= this.total) {
+ if (this.renderThrottleTimeout) this.render();
+ this.complete = true;
+ this.terminate();
+ this.callback(this);
+ return;
+ }
+};
+
+/**
+ * Method to render the progress bar with optional `tokens` to place in the
+ * progress bar's `fmt` field.
+ *
+ * @param {object} tokens
+ * @api public
+ */
+
+ProgressBar.prototype.render = function (tokens) {
+ clearTimeout(this.renderThrottleTimeout);
+ this.renderThrottleTimeout = null;
+
+ if (tokens) this.tokens = tokens;
+
+ if (!this.stream.isTTY) return;
+
+ var ratio = this.curr / this.total;
+ ratio = Math.min(Math.max(ratio, 0), 1);
+
+ var percent = ratio * 100;
+ var incomplete, complete, completeLength;
+ var elapsed = new Date - this.start;
+ var eta = (percent == 100) ? 0 : elapsed * (this.total / this.curr - 1);
+ var rate = this.curr / (elapsed / 1000);
+
+ /* populate the bar template with percentages and timestamps */
+ var str = this.fmt
+ .replace(':current', this.curr)
+ .replace(':total', this.total)
+ .replace(':elapsed', isNaN(elapsed) ? '0.0' : (elapsed / 1000).toFixed(1))
+ .replace(':eta', (isNaN(eta) || !isFinite(eta)) ? '0.0' : (eta / 1000)
+ .toFixed(1))
+ .replace(':percent', percent.toFixed(0) + '%')
+ .replace(':rate', Math.round(rate));
+
+ /* compute the available space (non-zero) for the bar */
+ var availableSpace = Math.max(0, this.stream.columns - str.replace(':bar', '').length);
+ if(availableSpace && process.platform === 'win32'){
+ availableSpace = availableSpace - 1;
+ }
+
+ var width = Math.min(this.width, availableSpace);
+
+ /* TODO: the following assumes the user has one ':bar' token */
+ completeLength = Math.round(width * ratio);
+ complete = Array(Math.max(0, completeLength + 1)).join(this.chars.complete);
+ incomplete = Array(Math.max(0, width - completeLength + 1)).join(this.chars.incomplete);
+
+ /* add head to the complete string */
+ if(completeLength > 0)
+ complete = complete.slice(0, -1) + this.chars.head;
+
+ /* fill in the actual progress bar */
+ str = str.replace(':bar', complete + incomplete);
+
+ /* replace the extra tokens */
+ if (this.tokens) for (var key in this.tokens) str = str.replace(':' + key, this.tokens[key]);
+
+ if (this.lastDraw !== str) {
+ this.stream.cursorTo(0);
+ this.stream.write(str);
+ this.stream.clearLine(1);
+ this.lastDraw = str;
+ }
+};
+
+/**
+ * "update" the progress bar to represent an exact percentage.
+ * The ratio (between 0 and 1) specified will be multiplied by `total` and
+ * floored, representing the closest available "tick." For example, if a
+ * progress bar has a length of 3 and `update(0.5)` is called, the progress
+ * will be set to 1.
+ *
+ * A ratio of 0.5 will attempt to set the progress to halfway.
+ *
+ * @param {number} ratio The ratio (between 0 and 1 inclusive) to set the
+ * overall completion to.
+ * @api public
+ */
+
+ProgressBar.prototype.update = function (ratio, tokens) {
+ var goal = Math.floor(ratio * this.total);
+ var delta = goal - this.curr;
+
+ this.tick(delta, tokens);
+};
+
+/**
+ * "interrupt" the progress bar and write a message above it.
+ * @param {string} message The message to write.
+ * @api public
+ */
+
+ProgressBar.prototype.interrupt = function (message) {
+ // clear the current line
+ this.stream.clearLine();
+ // move the cursor to the start of the line
+ this.stream.cursorTo(0);
+ // write the message text
+ this.stream.write(message);
+ // terminate the line after writing the message
+ this.stream.write('\n');
+ // re-display the progress bar with its lastDraw
+ this.stream.write(this.lastDraw);
+};
+
+/**
+ * Terminates a progress bar.
+ *
+ * @api public
+ */
+
+ProgressBar.prototype.terminate = function () {
+ if (this.clear) {
+ if (this.stream.clearLine) {
+ this.stream.clearLine();
+ this.stream.cursorTo(0);
+ }
+ } else {
+ this.stream.write('\n');
+ }
+};
diff --git a/tools/node_modules/eslint/node_modules/progress/package.json b/tools/node_modules/eslint/node_modules/progress/package.json
new file mode 100644
index 0000000000..7652020503
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/progress/package.json
@@ -0,0 +1,66 @@
+{
+ "_from": "progress@^2.0.0",
+ "_id": "progress@2.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=",
+ "_location": "/eslint/progress",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "progress@^2.0.0",
+ "name": "progress",
+ "escapedName": "progress",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/eslint"
+ ],
+ "_resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz",
+ "_shasum": "8a1be366bf8fc23db2bd23f10c6fe920b4389d1f",
+ "_spec": "progress@^2.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint",
+ "author": {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ "bugs": {
+ "url": "https://github.com/visionmedia/node-progress/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Christoffer Hallas",
+ "email": "christoffer.hallas@gmail.com"
+ },
+ {
+ "name": "Jordan Scales",
+ "email": "scalesjordan@gmail.com"
+ },
+ {
+ "name": "Andrew Rhyne",
+ "email": "rhyneandrew@gmail.com"
+ }
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Flexible ascii progress bar",
+ "engines": {
+ "node": ">=0.4.0"
+ },
+ "homepage": "https://github.com/visionmedia/node-progress#readme",
+ "keywords": [
+ "cli",
+ "progress"
+ ],
+ "license": "MIT",
+ "main": "./index.js",
+ "name": "progress",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/visionmedia/node-progress.git"
+ },
+ "version": "2.0.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/pseudomap/LICENSE b/tools/node_modules/eslint/node_modules/pseudomap/LICENSE
new file mode 100644
index 0000000000..19129e315f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/pseudomap/README.md b/tools/node_modules/eslint/node_modules/pseudomap/README.md
new file mode 100644
index 0000000000..778bf01dfa
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/pseudomap/map.js b/tools/node_modules/eslint/node_modules/pseudomap/map.js
new file mode 100644
index 0000000000..7db1599461
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/pseudomap/package.json b/tools/node_modules/eslint/node_modules/pseudomap/package.json
new file mode 100644
index 0000000000..4a69022e2f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/pseudomap/package.json
@@ -0,0 +1,54 @@
+{
+ "_from": "pseudomap@^1.0.2",
+ "_id": "pseudomap@1.0.2",
+ "_inBundle": false,
+ "_integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=",
+ "_location": "/eslint/pseudomap",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "pseudomap@^1.0.2",
+ "name": "pseudomap",
+ "escapedName": "pseudomap",
+ "rawSpec": "^1.0.2",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.2"
+ },
+ "_requiredBy": [
+ "/eslint/lru-cache"
+ ],
+ "_resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
+ "_shasum": "f052a28da70e618917ef0a8ac34c1ae5a68286b3",
+ "_spec": "pseudomap@^1.0.2",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/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"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "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"
+ },
+ "homepage": "https://github.com/isaacs/pseudomap#readme",
+ "license": "ISC",
+ "main": "map.js",
+ "name": "pseudomap",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/isaacs/pseudomap.git"
+ },
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "version": "1.0.2"
+}
diff --git a/tools/node_modules/eslint/node_modules/pseudomap/pseudomap.js b/tools/node_modules/eslint/node_modules/pseudomap/pseudomap.js
new file mode 100644
index 0000000000..25a21d829e
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/readable-stream/GOVERNANCE.md b/tools/node_modules/eslint/node_modules/readable-stream/GOVERNANCE.md
new file mode 100644
index 0000000000..16ffb93f24
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/readable-stream/LICENSE b/tools/node_modules/eslint/node_modules/readable-stream/LICENSE
new file mode 100644
index 0000000000..2873b3b2e5
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/readable-stream/README.md b/tools/node_modules/eslint/node_modules/readable-stream/README.md
new file mode 100644
index 0000000000..b24a2c88f8
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/readable-stream/README.md
@@ -0,0 +1,57 @@
+# readable-stream
+
+***Node-core v8.1.3 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/v8.1.3/docs/api/stream.html).
+
+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.
+
+<a name="members"></a>
+## Team Members
+
+* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) &lt;christopher.s.dickinson@gmail.com&gt;
+ - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B
+* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) &lt;calvin.metcalf@gmail.com&gt;
+ - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242
+* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) &lt;rod@vagg.org&gt;
+ - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D
+* **Sam Newman** ([@sonewman](https://github.com/sonewman)) &lt;newmansam@outlook.com&gt;
+* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) &lt;mathiasbuus@gmail.com&gt;
+* **Domenic Denicola** ([@domenic](https://github.com/domenic)) &lt;d@domenic.me&gt;
+* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) &lt;matteo.collina@gmail.com&gt;
+ - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E
diff --git a/tools/node_modules/eslint/node_modules/readable-stream/duplex-browser.js b/tools/node_modules/eslint/node_modules/readable-stream/duplex-browser.js
new file mode 100644
index 0000000000..f8b2db83db
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/readable-stream/duplex-browser.js
@@ -0,0 +1 @@
+module.exports = require('./lib/_stream_duplex.js');
diff --git a/tools/node_modules/eslint/node_modules/readable-stream/duplex.js b/tools/node_modules/eslint/node_modules/readable-stream/duplex.js
new file mode 100644
index 0000000000..46924cbfdf
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/readable-stream/duplex.js
@@ -0,0 +1 @@
+module.exports = require('./readable').Duplex
diff --git a/tools/node_modules/eslint/node_modules/readable-stream/lib/_stream_duplex.js b/tools/node_modules/eslint/node_modules/readable-stream/lib/_stream_duplex.js
new file mode 100644
index 0000000000..c599463dd8
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/readable-stream/lib/_stream_duplex.js
@@ -0,0 +1,124 @@
+// 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.
+
+'use strict';
+
+/*<replacement>*/
+
+var processNextTick = require('process-nextick-args');
+/*</replacement>*/
+
+/*<replacement>*/
+var objectKeys = Object.keys || function (obj) {
+ var keys = [];
+ for (var key in obj) {
+ keys.push(key);
+ }return keys;
+};
+/*</replacement>*/
+
+module.exports = Duplex;
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+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();
+}
+
+Object.defineProperty(Duplex.prototype, 'destroyed', {
+ get: function () {
+ if (this._readableState === undefined || this._writableState === undefined) {
+ return false;
+ }
+ return this._readableState.destroyed && this._writableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (this._readableState === undefined || this._writableState === undefined) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._readableState.destroyed = value;
+ this._writableState.destroyed = value;
+ }
+});
+
+Duplex.prototype._destroy = function (err, cb) {
+ this.push(null);
+ this.end();
+
+ processNextTick(cb, err);
+};
+
+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/tools/node_modules/eslint/node_modules/readable-stream/lib/_stream_passthrough.js b/tools/node_modules/eslint/node_modules/readable-stream/lib/_stream_passthrough.js
new file mode 100644
index 0000000000..a9c8358848
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/readable-stream/lib/_stream_passthrough.js
@@ -0,0 +1,47 @@
+// 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.
+
+'use strict';
+
+module.exports = PassThrough;
+
+var Transform = require('./_stream_transform');
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+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/tools/node_modules/eslint/node_modules/readable-stream/lib/_stream_readable.js b/tools/node_modules/eslint/node_modules/readable-stream/lib/_stream_readable.js
new file mode 100644
index 0000000000..ee9001cdf0
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/readable-stream/lib/_stream_readable.js
@@ -0,0 +1,1007 @@
+// 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.
+
+'use strict';
+
+/*<replacement>*/
+
+var processNextTick = require('process-nextick-args');
+/*</replacement>*/
+
+module.exports = Readable;
+
+/*<replacement>*/
+var isArray = require('isarray');
+/*</replacement>*/
+
+/*<replacement>*/
+var Duplex;
+/*</replacement>*/
+
+Readable.ReadableState = ReadableState;
+
+/*<replacement>*/
+var EE = require('events').EventEmitter;
+
+var EElistenerCount = function (emitter, type) {
+ return emitter.listeners(type).length;
+};
+/*</replacement>*/
+
+/*<replacement>*/
+var Stream = require('./internal/streams/stream');
+/*</replacement>*/
+
+// TODO(bmeurer): Change this back to const once hole checks are
+// properly optimized away early in Ignition+TurboFan.
+/*<replacement>*/
+var Buffer = require('safe-buffer').Buffer;
+var OurUint8Array = global.Uint8Array || function () {};
+function _uint8ArrayToBuffer(chunk) {
+ return Buffer.from(chunk);
+}
+function _isUint8Array(obj) {
+ return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
+}
+/*</replacement>*/
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+/*<replacement>*/
+var debugUtil = require('util');
+var debug = void 0;
+if (debugUtil && debugUtil.debuglog) {
+ debug = debugUtil.debuglog('stream');
+} else {
+ debug = function () {};
+}
+/*</replacement>*/
+
+var BufferList = require('./internal/streams/BufferList');
+var destroyImpl = require('./internal/streams/destroy');
+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 = Math.floor(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 event 'readable'/'data' is emitted
+ // 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 read 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;
+
+ // has it been destroyed
+ this.destroyed = 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';
+
+ // 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) {
+ if (typeof options.read === 'function') this._read = options.read;
+
+ if (typeof options.destroy === 'function') this._destroy = options.destroy;
+ }
+
+ Stream.call(this);
+}
+
+Object.defineProperty(Readable.prototype, 'destroyed', {
+ get: function () {
+ if (this._readableState === undefined) {
+ return false;
+ }
+ return this._readableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (!this._readableState) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._readableState.destroyed = value;
+ }
+});
+
+Readable.prototype.destroy = destroyImpl.destroy;
+Readable.prototype._undestroy = destroyImpl.undestroy;
+Readable.prototype._destroy = function (err, cb) {
+ this.push(null);
+ cb(err);
+};
+
+// 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;
+ var skipChunkCheck;
+
+ if (!state.objectMode) {
+ if (typeof chunk === 'string') {
+ encoding = encoding || state.defaultEncoding;
+ if (encoding !== state.encoding) {
+ chunk = Buffer.from(chunk, encoding);
+ encoding = '';
+ }
+ skipChunkCheck = true;
+ }
+ } else {
+ skipChunkCheck = true;
+ }
+
+ return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
+};
+
+// Unshift should *always* be something directly out of read()
+Readable.prototype.unshift = function (chunk) {
+ return readableAddChunk(this, chunk, null, true, false);
+};
+
+function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
+ var state = stream._readableState;
+ if (chunk === null) {
+ state.reading = false;
+ onEofChunk(stream, state);
+ } else {
+ var er;
+ if (!skipChunkCheck) er = chunkInvalid(state, chunk);
+ if (er) {
+ stream.emit('error', er);
+ } else if (state.objectMode || chunk && chunk.length > 0) {
+ if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
+ chunk = _uint8ArrayToBuffer(chunk);
+ }
+
+ if (addToFront) {
+ if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);
+ } else if (state.ended) {
+ stream.emit('error', new Error('stream.push() after EOF'));
+ } else {
+ state.reading = false;
+ if (state.decoder && !encoding) {
+ chunk = state.decoder.write(chunk);
+ if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);
+ } else {
+ addChunk(stream, state, chunk, false);
+ }
+ }
+ } else if (!addToFront) {
+ state.reading = false;
+ }
+ }
+
+ return needMoreData(state);
+}
+
+function addChunk(stream, state, chunk, addToFront) {
+ 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);
+}
+
+function chunkInvalid(state, chunk) {
+ var er;
+ if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ return er;
+}
+
+// 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);
+}
+
+Readable.prototype.isPaused = function () {
+ return this._readableState.flowing === false;
+};
+
+// 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 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 : unpipe;
+ if (state.endEmitted) processNextTick(endFn);else src.once('end', endFn);
+
+ dest.on('unpipe', onunpipe);
+ function onunpipe(readable, unpipeInfo) {
+ debug('onunpipe');
+ if (readable === src) {
+ if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
+ unpipeInfo.hasUnpiped = true;
+ 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', unpipe);
+ 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;
+ var unpipeInfo = { hasUnpiped: false };
+
+ // 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, unpipeInfo);
+ 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, unpipeInfo);
+ }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, unpipeInfo);
+
+ 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);
+ }
+ }
+ }
+
+ 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 = Buffer.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/tools/node_modules/eslint/node_modules/readable-stream/lib/_stream_transform.js b/tools/node_modules/eslint/node_modules/readable-stream/lib/_stream_transform.js
new file mode 100644
index 0000000000..a0c23173da
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/readable-stream/lib/_stream_transform.js
@@ -0,0 +1,214 @@
+// 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.
+
+'use strict';
+
+module.exports = Transform;
+
+var Duplex = require('./_stream_duplex');
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+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('write callback called multiple times'));
+ }
+
+ 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;
+ }
+};
+
+Transform.prototype._destroy = function (err, cb) {
+ var _this = this;
+
+ Duplex.prototype._destroy.call(this, err, function (err2) {
+ cb(err2);
+ _this.emit('close');
+ });
+};
+
+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/tools/node_modules/eslint/node_modules/readable-stream/lib/_stream_writable.js b/tools/node_modules/eslint/node_modules/readable-stream/lib/_stream_writable.js
new file mode 100644
index 0000000000..d20da88c75
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/readable-stream/lib/_stream_writable.js
@@ -0,0 +1,664 @@
+// 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, encoding, cb), and it'll handle all
+// the drain event emission and buffering.
+
+'use strict';
+
+/*<replacement>*/
+
+var processNextTick = require('process-nextick-args');
+/*</replacement>*/
+
+module.exports = Writable;
+
+/* <replacement> */
+function WriteReq(chunk, encoding, cb) {
+ this.chunk = chunk;
+ this.encoding = encoding;
+ this.callback = cb;
+ this.next = null;
+}
+
+// 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 () {
+ onCorkedFinish(_this, state);
+ };
+}
+/* </replacement> */
+
+/*<replacement>*/
+var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : processNextTick;
+/*</replacement>*/
+
+/*<replacement>*/
+var Duplex;
+/*</replacement>*/
+
+Writable.WritableState = WritableState;
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+/*<replacement>*/
+var internalUtil = {
+ deprecate: require('util-deprecate')
+};
+/*</replacement>*/
+
+/*<replacement>*/
+var Stream = require('./internal/streams/stream');
+/*</replacement>*/
+
+/*<replacement>*/
+var Buffer = require('safe-buffer').Buffer;
+var OurUint8Array = global.Uint8Array || function () {};
+function _uint8ArrayToBuffer(chunk) {
+ return Buffer.from(chunk);
+}
+function _isUint8Array(obj) {
+ return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
+}
+/*</replacement>*/
+
+var destroyImpl = require('./internal/streams/destroy');
+
+util.inherits(Writable, Stream);
+
+function nop() {}
+
+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 = Math.floor(this.highWaterMark);
+
+ // if _final has been called
+ this.finalCalled = false;
+
+ // 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;
+
+ // has it been destroyed
+ this.destroyed = 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.', 'DEP0003')
+ });
+ } 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;
+
+ if (typeof options.destroy === 'function') this._destroy = options.destroy;
+
+ if (typeof options.final === 'function') this._final = options.final;
+ }
+
+ 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 = _isUint8Array(chunk) && !state.objectMode;
+
+ if (isBuf && !Buffer.isBuffer(chunk)) {
+ chunk = _uint8ArrayToBuffer(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 = Buffer.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) {
+ var newChunk = decodeChunk(state, chunk, encoding);
+ if (chunk !== newChunk) {
+ isBuf = true;
+ encoding = 'buffer';
+ chunk = newChunk;
+ }
+ }
+ 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 = {
+ chunk: chunk,
+ encoding: encoding,
+ isBuf: isBuf,
+ callback: cb,
+ next: null
+ };
+ 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) {
+ // defer the callback if we are being called synchronously
+ // to avoid piling up things on the stack
+ processNextTick(cb, er);
+ // this can emit finish, and it will always happen
+ // after error
+ processNextTick(finishMaybe, stream, state);
+ stream._writableState.errorEmitted = true;
+ stream.emit('error', er);
+ } else {
+ // the caller expect this to happen before if
+ // it is async
+ cb(er);
+ stream._writableState.errorEmitted = true;
+ stream.emit('error', er);
+ // this can emit finish, but finish must
+ // always follow error
+ finishMaybe(stream, state);
+ }
+}
+
+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) {
+ /*<replacement>*/
+ asyncWrite(afterWrite, stream, state, finished, cb);
+ /*</replacement>*/
+ } 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;
+ var allBuffers = true;
+ while (entry) {
+ buffer[count] = entry;
+ if (!entry.isBuf) allBuffers = false;
+ entry = entry.next;
+ count += 1;
+ }
+ buffer.allBuffers = allBuffers;
+
+ 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 callFinal(stream, state) {
+ stream._final(function (err) {
+ state.pendingcb--;
+ if (err) {
+ stream.emit('error', err);
+ }
+ state.prefinished = true;
+ stream.emit('prefinish');
+ finishMaybe(stream, state);
+ });
+}
+function prefinish(stream, state) {
+ if (!state.prefinished && !state.finalCalled) {
+ if (typeof stream._final === 'function') {
+ state.pendingcb++;
+ state.finalCalled = true;
+ processNextTick(callFinal, stream, state);
+ } else {
+ state.prefinished = true;
+ stream.emit('prefinish');
+ }
+ }
+}
+
+function finishMaybe(stream, state) {
+ var need = needFinish(state);
+ if (need) {
+ prefinish(stream, state);
+ if (state.pendingcb === 0) {
+ state.finished = true;
+ stream.emit('finish');
+ }
+ }
+ 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;
+}
+
+function onCorkedFinish(corkReq, state, err) {
+ var entry = corkReq.entry;
+ corkReq.entry = null;
+ while (entry) {
+ var cb = entry.callback;
+ state.pendingcb--;
+ cb(err);
+ entry = entry.next;
+ }
+ if (state.corkedRequestsFree) {
+ state.corkedRequestsFree.next = corkReq;
+ } else {
+ state.corkedRequestsFree = corkReq;
+ }
+}
+
+Object.defineProperty(Writable.prototype, 'destroyed', {
+ get: function () {
+ if (this._writableState === undefined) {
+ return false;
+ }
+ return this._writableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (!this._writableState) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._writableState.destroyed = value;
+ }
+});
+
+Writable.prototype.destroy = destroyImpl.destroy;
+Writable.prototype._undestroy = destroyImpl.undestroy;
+Writable.prototype._destroy = function (err, cb) {
+ this.end();
+ cb(err);
+}; \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/readable-stream/lib/internal/streams/BufferList.js b/tools/node_modules/eslint/node_modules/readable-stream/lib/internal/streams/BufferList.js
new file mode 100644
index 0000000000..d467615978
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/readable-stream/lib/internal/streams/BufferList.js
@@ -0,0 +1,74 @@
+'use strict';
+
+/*<replacement>*/
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+var Buffer = require('safe-buffer').Buffer;
+/*</replacement>*/
+
+function copyBuffer(src, target, offset) {
+ src.copy(target, offset);
+}
+
+module.exports = function () {
+ function BufferList() {
+ _classCallCheck(this, BufferList);
+
+ this.head = null;
+ this.tail = null;
+ this.length = 0;
+ }
+
+ BufferList.prototype.push = function push(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 unshift(v) {
+ var entry = { data: v, next: this.head };
+ if (this.length === 0) this.tail = entry;
+ this.head = entry;
+ ++this.length;
+ };
+
+ BufferList.prototype.shift = function shift() {
+ 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 clear() {
+ this.head = this.tail = null;
+ this.length = 0;
+ };
+
+ BufferList.prototype.join = function join(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 concat(n) {
+ if (this.length === 0) return Buffer.alloc(0);
+ if (this.length === 1) return this.head.data;
+ var ret = Buffer.allocUnsafe(n >>> 0);
+ var p = this.head;
+ var i = 0;
+ while (p) {
+ copyBuffer(p.data, ret, i);
+ i += p.data.length;
+ p = p.next;
+ }
+ return ret;
+ };
+
+ return BufferList;
+}(); \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/readable-stream/lib/internal/streams/destroy.js b/tools/node_modules/eslint/node_modules/readable-stream/lib/internal/streams/destroy.js
new file mode 100644
index 0000000000..b3e58c33bc
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/readable-stream/lib/internal/streams/destroy.js
@@ -0,0 +1,72 @@
+'use strict';
+
+/*<replacement>*/
+
+var processNextTick = require('process-nextick-args');
+/*</replacement>*/
+
+// undocumented cb() API, needed for core, not for public API
+function destroy(err, cb) {
+ var _this = this;
+
+ var readableDestroyed = this._readableState && this._readableState.destroyed;
+ var writableDestroyed = this._writableState && this._writableState.destroyed;
+
+ if (readableDestroyed || writableDestroyed) {
+ if (cb) {
+ cb(err);
+ } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {
+ processNextTick(emitErrorNT, this, err);
+ }
+ return;
+ }
+
+ // we set destroyed to true before firing error callbacks in order
+ // to make it re-entrance safe in case destroy() is called within callbacks
+
+ if (this._readableState) {
+ this._readableState.destroyed = true;
+ }
+
+ // if this is a duplex stream mark the writable part as destroyed as well
+ if (this._writableState) {
+ this._writableState.destroyed = true;
+ }
+
+ this._destroy(err || null, function (err) {
+ if (!cb && err) {
+ processNextTick(emitErrorNT, _this, err);
+ if (_this._writableState) {
+ _this._writableState.errorEmitted = true;
+ }
+ } else if (cb) {
+ cb(err);
+ }
+ });
+}
+
+function undestroy() {
+ if (this._readableState) {
+ this._readableState.destroyed = false;
+ this._readableState.reading = false;
+ this._readableState.ended = false;
+ this._readableState.endEmitted = false;
+ }
+
+ if (this._writableState) {
+ this._writableState.destroyed = false;
+ this._writableState.ended = false;
+ this._writableState.ending = false;
+ this._writableState.finished = false;
+ this._writableState.errorEmitted = false;
+ }
+}
+
+function emitErrorNT(self, err) {
+ self.emit('error', err);
+}
+
+module.exports = {
+ destroy: destroy,
+ undestroy: undestroy
+}; \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/tools/node_modules/eslint/node_modules/readable-stream/lib/internal/streams/stream-browser.js
new file mode 100644
index 0000000000..9332a3fdae
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/readable-stream/lib/internal/streams/stream-browser.js
@@ -0,0 +1 @@
+module.exports = require('events').EventEmitter;
diff --git a/tools/node_modules/eslint/node_modules/readable-stream/lib/internal/streams/stream.js b/tools/node_modules/eslint/node_modules/readable-stream/lib/internal/streams/stream.js
new file mode 100644
index 0000000000..ce2ad5b6ee
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/readable-stream/lib/internal/streams/stream.js
@@ -0,0 +1 @@
+module.exports = require('stream');
diff --git a/tools/node_modules/eslint/node_modules/readable-stream/package.json b/tools/node_modules/eslint/node_modules/readable-stream/package.json
new file mode 100644
index 0000000000..49e0f0cdea
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/readable-stream/package.json
@@ -0,0 +1,83 @@
+{
+ "_from": "readable-stream@^2.2.2",
+ "_id": "readable-stream@2.3.3",
+ "_inBundle": false,
+ "_integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==",
+ "_location": "/eslint/readable-stream",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "readable-stream@^2.2.2",
+ "name": "readable-stream",
+ "escapedName": "readable-stream",
+ "rawSpec": "^2.2.2",
+ "saveSpec": null,
+ "fetchSpec": "^2.2.2"
+ },
+ "_requiredBy": [
+ "/eslint/concat-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz",
+ "_shasum": "368f2512d79f9d46fdfc71349ae7878bbc1eb95c",
+ "_spec": "readable-stream@^2.2.2",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/concat-stream",
+ "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"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~1.0.6",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.0.3",
+ "util-deprecate": "~1.0.1"
+ },
+ "deprecated": false,
+ "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"
+ },
+ "homepage": "https://github.com/nodejs/readable-stream#readme",
+ "keywords": [
+ "readable",
+ "stream",
+ "pipe"
+ ],
+ "license": "MIT",
+ "main": "readable.js",
+ "name": "readable-stream",
+ "nyc": {
+ "include": [
+ "lib/**.js"
+ ]
+ },
+ "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 && node test/verify-dependencies.js",
+ "write-zuul": "printf \"ui: tape\nbrowsers:\n - name: $BROWSER_NAME\n version: $BROWSER_VERSION\n\">.zuul.yml"
+ },
+ "version": "2.3.3"
+}
diff --git a/tools/node_modules/eslint/node_modules/readable-stream/passthrough.js b/tools/node_modules/eslint/node_modules/readable-stream/passthrough.js
new file mode 100644
index 0000000000..ffd791d7ff
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/readable-stream/passthrough.js
@@ -0,0 +1 @@
+module.exports = require('./readable').PassThrough
diff --git a/tools/node_modules/eslint/node_modules/readable-stream/readable-browser.js b/tools/node_modules/eslint/node_modules/readable-stream/readable-browser.js
new file mode 100644
index 0000000000..e50372592e
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/readable-stream/readable.js b/tools/node_modules/eslint/node_modules/readable-stream/readable.js
new file mode 100644
index 0000000000..ec89ec5330
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/readable-stream/transform.js b/tools/node_modules/eslint/node_modules/readable-stream/transform.js
new file mode 100644
index 0000000000..b1baba26da
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/readable-stream/transform.js
@@ -0,0 +1 @@
+module.exports = require('./readable').Transform
diff --git a/tools/node_modules/eslint/node_modules/readable-stream/writable-browser.js b/tools/node_modules/eslint/node_modules/readable-stream/writable-browser.js
new file mode 100644
index 0000000000..ebdde6a85d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/readable-stream/writable-browser.js
@@ -0,0 +1 @@
+module.exports = require('./lib/_stream_writable.js');
diff --git a/tools/node_modules/eslint/node_modules/readable-stream/writable.js b/tools/node_modules/eslint/node_modules/readable-stream/writable.js
new file mode 100644
index 0000000000..3211a6f80d
--- /dev/null
+++ b/tools/node_modules/eslint/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
+} else {
+ module.exports = Writable
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/index.js b/tools/node_modules/eslint/node_modules/remark-parse/index.js
new file mode 100644
index 0000000000..1579e35518
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/index.js
@@ -0,0 +1,14 @@
+'use strict';
+
+var unherit = require('unherit');
+var xtend = require('xtend');
+var Parser = require('./lib/parser.js');
+
+module.exports = parse;
+parse.Parser = Parser;
+
+function parse(options) {
+ var Local = unherit(Parser);
+ Local.prototype.options = xtend(Local.prototype.options, this.data('settings'), options);
+ this.Parser = Local;
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/block-elements.json b/tools/node_modules/eslint/node_modules/remark-parse/lib/block-elements.json
new file mode 100644
index 0000000000..2d13b56179
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/block-elements.json
@@ -0,0 +1,68 @@
+[
+ "address",
+ "article",
+ "aside",
+ "base",
+ "basefont",
+ "blockquote",
+ "body",
+ "caption",
+ "center",
+ "col",
+ "colgroup",
+ "dd",
+ "details",
+ "dialog",
+ "dir",
+ "div",
+ "dl",
+ "dt",
+ "fieldset",
+ "figcaption",
+ "figure",
+ "footer",
+ "form",
+ "frame",
+ "frameset",
+ "h1",
+ "h2",
+ "h3",
+ "h4",
+ "h5",
+ "h6",
+ "head",
+ "header",
+ "hgroup",
+ "hr",
+ "html",
+ "iframe",
+ "legend",
+ "li",
+ "link",
+ "main",
+ "menu",
+ "menuitem",
+ "meta",
+ "nav",
+ "noframes",
+ "ol",
+ "optgroup",
+ "option",
+ "p",
+ "param",
+ "pre",
+ "section",
+ "source",
+ "title",
+ "summary",
+ "table",
+ "tbody",
+ "td",
+ "tfoot",
+ "th",
+ "thead",
+ "title",
+ "tr",
+ "track",
+ "ul"
+]
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/decode.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/decode.js
new file mode 100644
index 0000000000..75116385ee
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/decode.js
@@ -0,0 +1,71 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:decode
+ * @fileoverview Decode entities.
+ */
+
+'use strict';
+
+var entities = require('parse-entities');
+
+module.exports = factory;
+
+/* Factory to create an entity decoder. */
+function factory(ctx) {
+ decoder.raw = decodeRaw;
+
+ return decoder;
+
+ /* Normalize `position` to add an `indent`. */
+ function normalize(position) {
+ var offsets = ctx.offset;
+ var line = position.line;
+ var result = [];
+
+ while (++line) {
+ if (!(line in offsets)) {
+ break;
+ }
+
+ result.push((offsets[line] || 0) + 1);
+ }
+
+ return {
+ start: position,
+ indent: result
+ };
+ }
+
+ /* Handle a warning.
+ * See https://github.com/wooorm/parse-entities
+ * for the warnings. */
+ function handleWarning(reason, position, code) {
+ if (code === 3) {
+ return;
+ }
+
+ ctx.file.message(reason, position);
+ }
+
+ /* Decode `value` (at `position`) into text-nodes. */
+ function decoder(value, position, handler) {
+ entities(value, {
+ position: normalize(position),
+ warning: handleWarning,
+ text: handler,
+ reference: handler,
+ textContext: ctx,
+ referenceContext: ctx
+ });
+ }
+
+ /* Decode `value` (at `position`) into a string. */
+ function decodeRaw(value, position) {
+ return entities(value, {
+ position: normalize(position),
+ warning: handleWarning
+ });
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/defaults.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/defaults.js
new file mode 100644
index 0000000000..ccb3fabd48
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/defaults.js
@@ -0,0 +1,21 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:defaults
+ * @fileoverview Default options for `parse`.
+ */
+
+'use strict';
+
+/* Expose. */
+module.exports = {
+ position: true,
+ gfm: true,
+ yaml: true,
+ commonmark: false,
+ footnotes: false,
+ pedantic: false,
+ blocks: require('./block-elements'),
+ breaks: false
+};
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/locate/break.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/locate/break.js
new file mode 100644
index 0000000000..b5550e1007
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/locate/break.js
@@ -0,0 +1,25 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:locate:break
+ * @fileoverview Locate a break.
+ */
+
+'use strict';
+
+module.exports = locate;
+
+function locate(value, fromIndex) {
+ var index = value.indexOf('\n', fromIndex);
+
+ while (index > fromIndex) {
+ if (value.charAt(index - 1) !== ' ') {
+ break;
+ }
+
+ index--;
+ }
+
+ return index;
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/locate/code-inline.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/locate/code-inline.js
new file mode 100644
index 0000000000..010e74dcec
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/locate/code-inline.js
@@ -0,0 +1,15 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:locate:code-inline
+ * @fileoverview Locate inline code.
+ */
+
+'use strict';
+
+module.exports = locate;
+
+function locate(value, fromIndex) {
+ return value.indexOf('`', fromIndex);
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/locate/delete.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/locate/delete.js
new file mode 100644
index 0000000000..1a892e1be7
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/locate/delete.js
@@ -0,0 +1,15 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:locate:delete
+ * @fileoverview Locate strikethrough.
+ */
+
+'use strict';
+
+module.exports = locate;
+
+function locate(value, fromIndex) {
+ return value.indexOf('~~', fromIndex);
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/locate/emphasis.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/locate/emphasis.js
new file mode 100644
index 0000000000..270daad0f9
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/locate/emphasis.js
@@ -0,0 +1,26 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:locate:emphasis
+ * @fileoverview Locate italics / emphasis.
+ */
+
+'use strict';
+
+module.exports = locate;
+
+function locate(value, fromIndex) {
+ var asterisk = value.indexOf('*', fromIndex);
+ var underscore = value.indexOf('_', fromIndex);
+
+ if (underscore === -1) {
+ return asterisk;
+ }
+
+ if (asterisk === -1) {
+ return underscore;
+ }
+
+ return underscore < asterisk ? underscore : asterisk;
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/locate/escape.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/locate/escape.js
new file mode 100644
index 0000000000..45f9b449a7
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/locate/escape.js
@@ -0,0 +1,15 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:locate:escape
+ * @fileoverview Locate an escape.
+ */
+
+'use strict';
+
+module.exports = locate;
+
+function locate(value, fromIndex) {
+ return value.indexOf('\\', fromIndex);
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/locate/link.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/locate/link.js
new file mode 100644
index 0000000000..dab2a3c54f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/locate/link.js
@@ -0,0 +1,24 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:locate:link
+ * @fileoverview Locate a link.
+ */
+
+'use strict';
+
+module.exports = locate;
+
+function locate(value, fromIndex) {
+ var link = value.indexOf('[', fromIndex);
+ var image = value.indexOf('![', fromIndex);
+
+ if (image === -1) {
+ return link;
+ }
+
+ /* Link can never be `-1` if an image is found, so we don’t need
+ * to check for that :) */
+ return link < image ? link : image;
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/locate/strong.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/locate/strong.js
new file mode 100644
index 0000000000..717259f36e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/locate/strong.js
@@ -0,0 +1,26 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:locate:strong
+ * @fileoverview Locate bold / strong / importance.
+ */
+
+'use strict';
+
+module.exports = locate;
+
+function locate(value, fromIndex) {
+ var asterisk = value.indexOf('**', fromIndex);
+ var underscore = value.indexOf('__', fromIndex);
+
+ if (underscore === -1) {
+ return asterisk;
+ }
+
+ if (asterisk === -1) {
+ return underscore;
+ }
+
+ return underscore < asterisk ? underscore : asterisk;
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/locate/tag.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/locate/tag.js
new file mode 100644
index 0000000000..56e2d49e56
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/locate/tag.js
@@ -0,0 +1,15 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:locate:tag
+ * @fileoverview Locate a tag.
+ */
+
+'use strict';
+
+module.exports = locate;
+
+function locate(value, fromIndex) {
+ return value.indexOf('<', fromIndex);
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/locate/url.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/locate/url.js
new file mode 100644
index 0000000000..53b239241c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/locate/url.js
@@ -0,0 +1,34 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:locate:url
+ * @fileoverview Locate a URL.
+ */
+
+'use strict';
+
+module.exports = locate;
+
+var PROTOCOLS = ['https://', 'http://', 'mailto:'];
+
+function locate(value, fromIndex) {
+ var length = PROTOCOLS.length;
+ var index = -1;
+ var min = -1;
+ var position;
+
+ if (!this.options.gfm) {
+ return -1;
+ }
+
+ while (++index < length) {
+ position = value.indexOf(PROTOCOLS[index], fromIndex);
+
+ if (position !== -1 && (position < min || min === -1)) {
+ min = position;
+ }
+ }
+
+ return min;
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/parse.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/parse.js
new file mode 100644
index 0000000000..53a50b181e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/parse.js
@@ -0,0 +1,53 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:parse
+ * @fileoverview Parse the document
+ */
+
+'use strict';
+
+var xtend = require('xtend');
+var removePosition = require('unist-util-remove-position');
+
+module.exports = parse;
+
+var C_NEWLINE = '\n';
+var EXPRESSION_LINE_BREAKS = /\r\n|\r/g;
+
+/* Parse the bound file. */
+function parse() {
+ var self = this;
+ var value = String(self.file);
+ var start = {line: 1, column: 1, offset: 0};
+ var content = xtend(start);
+ var node;
+
+ /* Clean non-unix newlines: `\r\n` and `\r` are all
+ * changed to `\n`. This should not affect positional
+ * information. */
+ value = value.replace(EXPRESSION_LINE_BREAKS, C_NEWLINE);
+
+ if (value.charCodeAt(0) === 0xFEFF) {
+ value = value.slice(1);
+
+ content.column++;
+ content.offset++;
+ }
+
+ node = {
+ type: 'root',
+ children: self.tokenizeBlock(value, content),
+ position: {
+ start: start,
+ end: self.eof || xtend(start)
+ }
+ };
+
+ if (!self.options.position) {
+ removePosition(node, true);
+ }
+
+ return node;
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/parser.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/parser.js
new file mode 100644
index 0000000000..8fe982b661
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/parser.js
@@ -0,0 +1,162 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse
+ * @fileoverview Markdown parser.
+ */
+
+'use strict';
+
+var xtend = require('xtend');
+var toggle = require('state-toggle');
+var vfileLocation = require('vfile-location');
+var unescape = require('./unescape');
+var decode = require('./decode');
+var tokenizer = require('./tokenizer');
+
+module.exports = Parser;
+
+/* Construct a new parser. */
+function Parser(doc, file) {
+ this.file = file;
+ this.offset = {};
+ this.options = xtend(this.options);
+ this.setOptions({});
+
+ this.inList = false;
+ this.inBlock = false;
+ this.inLink = false;
+ this.atStart = true;
+
+ this.toOffset = vfileLocation(file).toOffset;
+ this.unescape = unescape(this, 'escape');
+ this.decode = decode(this);
+}
+
+/* Prototype. */
+var proto = Parser.prototype;
+
+/* Expose core. */
+proto.setOptions = require('./set-options');
+proto.parse = require('./parse');
+
+/* Expose `defaults`. */
+proto.options = require('./defaults');
+
+/* Enter and exit helpers. */
+proto.exitStart = toggle('atStart', true);
+proto.enterList = toggle('inList', false);
+proto.enterLink = toggle('inLink', false);
+proto.enterBlock = toggle('inBlock', false);
+
+/* Nodes that can interupt a paragraph:
+ *
+ * ```markdown
+ * A paragraph, followed by a thematic break.
+ * ___
+ * ```
+ *
+ * In the above example, the thematic break “interupts”
+ * the paragraph. */
+proto.interruptParagraph = [
+ ['thematicBreak'],
+ ['atxHeading'],
+ ['fencedCode'],
+ ['blockquote'],
+ ['html'],
+ ['setextHeading', {commonmark: false}],
+ ['definition', {commonmark: false}],
+ ['footnote', {commonmark: false}]
+];
+
+/* Nodes that can interupt a list:
+ *
+ * ```markdown
+ * - One
+ * ___
+ * ```
+ *
+ * In the above example, the thematic break “interupts”
+ * the list. */
+proto.interruptList = [
+ ['fencedCode', {pedantic: false}],
+ ['thematicBreak', {pedantic: false}],
+ ['definition', {commonmark: false}],
+ ['footnote', {commonmark: false}]
+];
+
+/* Nodes that can interupt a blockquote:
+ *
+ * ```markdown
+ * > A paragraph.
+ * ___
+ * ```
+ *
+ * In the above example, the thematic break “interupts”
+ * the blockquote. */
+proto.interruptBlockquote = [
+ ['indentedCode', {commonmark: true}],
+ ['fencedCode', {commonmark: true}],
+ ['atxHeading', {commonmark: true}],
+ ['setextHeading', {commonmark: true}],
+ ['thematicBreak', {commonmark: true}],
+ ['html', {commonmark: true}],
+ ['list', {commonmark: true}],
+ ['definition', {commonmark: false}],
+ ['footnote', {commonmark: false}]
+];
+
+/* Handlers. */
+proto.blockTokenizers = {
+ yamlFrontMatter: require('./tokenize/yaml'),
+ newline: require('./tokenize/newline'),
+ indentedCode: require('./tokenize/code-indented'),
+ fencedCode: require('./tokenize/code-fenced'),
+ blockquote: require('./tokenize/blockquote'),
+ atxHeading: require('./tokenize/heading-atx'),
+ thematicBreak: require('./tokenize/thematic-break'),
+ list: require('./tokenize/list'),
+ setextHeading: require('./tokenize/heading-setext'),
+ html: require('./tokenize/html-block'),
+ footnote: require('./tokenize/footnote-definition'),
+ definition: require('./tokenize/definition'),
+ table: require('./tokenize/table'),
+ paragraph: require('./tokenize/paragraph')
+};
+
+proto.inlineTokenizers = {
+ escape: require('./tokenize/escape'),
+ autoLink: require('./tokenize/auto-link'),
+ url: require('./tokenize/url'),
+ html: require('./tokenize/html-inline'),
+ link: require('./tokenize/link'),
+ reference: require('./tokenize/reference'),
+ strong: require('./tokenize/strong'),
+ emphasis: require('./tokenize/emphasis'),
+ deletion: require('./tokenize/delete'),
+ code: require('./tokenize/code-inline'),
+ break: require('./tokenize/break'),
+ text: require('./tokenize/text')
+};
+
+/* Expose precedence. */
+proto.blockMethods = keys(proto.blockTokenizers);
+proto.inlineMethods = keys(proto.inlineTokenizers);
+
+/* Tokenizers. */
+proto.tokenizeBlock = tokenizer('block');
+proto.tokenizeInline = tokenizer('inline');
+proto.tokenizeFactory = tokenizer;
+
+/* Get all keys in `value`. */
+function keys(value) {
+ var result = [];
+ var key;
+
+ for (key in value) {
+ result.push(key);
+ }
+
+ return result;
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/set-options.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/set-options.js
new file mode 100644
index 0000000000..3f9abad7c4
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/set-options.js
@@ -0,0 +1,59 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse
+ * @fileoverview Markdown parser.
+ */
+
+'use strict';
+
+var xtend = require('xtend');
+var escapes = require('markdown-escapes');
+var defaults = require('./defaults');
+
+module.exports = setOptions;
+
+/* Set options. */
+function setOptions(options) {
+ var self = this;
+ var current = self.options;
+ var key;
+ var value;
+
+ if (options == null) {
+ options = {};
+ } else if (typeof options === 'object') {
+ options = xtend(options);
+ } else {
+ throw new Error(
+ 'Invalid value `' + options + '` ' +
+ 'for setting `options`'
+ );
+ }
+
+ for (key in defaults) {
+ value = options[key];
+
+ if (value == null) {
+ value = current[key];
+ }
+
+ if (
+ (key !== 'blocks' && typeof value !== 'boolean') ||
+ (key === 'blocks' && typeof value !== 'object')
+ ) {
+ throw new Error(
+ 'Invalid value `' + value + '` ' +
+ 'for setting `options.' + key + '`'
+ );
+ }
+
+ options[key] = value;
+ }
+
+ self.options = options;
+ self.escape = escapes(options);
+
+ return self;
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/auto-link.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/auto-link.js
new file mode 100644
index 0000000000..3861b48a14
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/auto-link.js
@@ -0,0 +1,151 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:tokenize:auto-link
+ * @fileoverview Tokenise an auto-link.
+ */
+
+'use strict';
+
+var decode = require('parse-entities');
+var locate = require('../locate/tag');
+
+module.exports = autoLink;
+autoLink.locator = locate;
+autoLink.notInLink = true;
+
+var C_LT = '<';
+var C_GT = '>';
+var C_AT_SIGN = '@';
+var C_SLASH = '/';
+var MAILTO = 'mailto:';
+var MAILTO_LENGTH = MAILTO.length;
+
+/* Tokenise a link. */
+function autoLink(eat, value, silent) {
+ var self;
+ var subvalue;
+ var length;
+ var index;
+ var queue;
+ var character;
+ var hasAtCharacter;
+ var link;
+ var now;
+ var content;
+ var tokenize;
+ var exit;
+
+ if (value.charAt(0) !== C_LT) {
+ return;
+ }
+
+ self = this;
+ subvalue = '';
+ length = value.length;
+ index = 0;
+ queue = '';
+ hasAtCharacter = false;
+ link = '';
+
+ index++;
+ subvalue = C_LT;
+
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (
+ character === ' ' ||
+ character === C_GT ||
+ character === C_AT_SIGN ||
+ (character === ':' && value.charAt(index + 1) === C_SLASH)
+ ) {
+ break;
+ }
+
+ queue += character;
+ index++;
+ }
+
+ if (!queue) {
+ return;
+ }
+
+ link += queue;
+ queue = '';
+
+ character = value.charAt(index);
+ link += character;
+ index++;
+
+ if (character === C_AT_SIGN) {
+ hasAtCharacter = true;
+ } else {
+ if (
+ character !== ':' ||
+ value.charAt(index + 1) !== C_SLASH
+ ) {
+ return;
+ }
+
+ link += C_SLASH;
+ index++;
+ }
+
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (character === ' ' || character === C_GT) {
+ break;
+ }
+
+ queue += character;
+ index++;
+ }
+
+ character = value.charAt(index);
+
+ if (!queue || character !== C_GT) {
+ return;
+ }
+
+ /* istanbul ignore if - never used (yet) */
+ if (silent) {
+ return true;
+ }
+
+ link += queue;
+ content = link;
+ subvalue += link + character;
+ now = eat.now();
+ now.column++;
+ now.offset++;
+
+ if (hasAtCharacter) {
+ if (link.slice(0, MAILTO_LENGTH).toLowerCase() === MAILTO) {
+ content = content.substr(MAILTO_LENGTH);
+ now.column += MAILTO_LENGTH;
+ now.offset += MAILTO_LENGTH;
+ } else {
+ link = MAILTO + link;
+ }
+ }
+
+ /* Temporarily remove support for escapes in autolinks. */
+ tokenize = self.inlineTokenizers.escape;
+ self.inlineTokenizers.escape = null;
+ exit = self.enterLink();
+
+ content = self.tokenizeInline(content, now);
+
+ self.inlineTokenizers.escape = tokenize;
+ exit();
+
+ return eat(subvalue)({
+ type: 'link',
+ title: null,
+ url: decode(link),
+ children: content
+ });
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/blockquote.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/blockquote.js
new file mode 100644
index 0000000000..764e0aa010
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/blockquote.js
@@ -0,0 +1,137 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:tokenize:blockquote
+ * @fileoverview Tokenise blockquote.
+ */
+
+'use strict';
+
+var trim = require('trim');
+var interrupt = require('../util/interrupt');
+
+module.exports = blockquote;
+
+var C_NEWLINE = '\n';
+var C_TAB = '\t';
+var C_SPACE = ' ';
+var C_GT = '>';
+
+/* Tokenise a blockquote. */
+function blockquote(eat, value, silent) {
+ var self = this;
+ var offsets = self.offset;
+ var tokenizers = self.blockTokenizers;
+ var interruptors = self.interruptBlockquote;
+ var now = eat.now();
+ var currentLine = now.line;
+ var length = value.length;
+ var values = [];
+ var contents = [];
+ var indents = [];
+ var add;
+ var index = 0;
+ var character;
+ var rest;
+ var nextIndex;
+ var content;
+ var line;
+ var startIndex;
+ var prefixed;
+ var exit;
+
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (character !== C_SPACE && character !== C_TAB) {
+ break;
+ }
+
+ index++;
+ }
+
+ if (value.charAt(index) !== C_GT) {
+ return;
+ }
+
+ if (silent) {
+ return true;
+ }
+
+ index = 0;
+
+ while (index < length) {
+ nextIndex = value.indexOf(C_NEWLINE, index);
+ startIndex = index;
+ prefixed = false;
+
+ if (nextIndex === -1) {
+ nextIndex = length;
+ }
+
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (character !== C_SPACE && character !== C_TAB) {
+ break;
+ }
+
+ index++;
+ }
+
+ if (value.charAt(index) === C_GT) {
+ index++;
+ prefixed = true;
+
+ if (value.charAt(index) === C_SPACE) {
+ index++;
+ }
+ } else {
+ index = startIndex;
+ }
+
+ content = value.slice(index, nextIndex);
+
+ if (!prefixed && !trim(content)) {
+ index = startIndex;
+ break;
+ }
+
+ if (!prefixed) {
+ rest = value.slice(index);
+
+ /* Check if the following code contains a possible
+ * block. */
+ if (interrupt(interruptors, tokenizers, self, [eat, rest, true])) {
+ break;
+ }
+ }
+
+ line = startIndex === index ? content : value.slice(startIndex, nextIndex);
+
+ indents.push(index - startIndex);
+ values.push(line);
+ contents.push(content);
+
+ index = nextIndex + 1;
+ }
+
+ index = -1;
+ length = indents.length;
+ add = eat(values.join(C_NEWLINE));
+
+ while (++index < length) {
+ offsets[currentLine] = (offsets[currentLine] || 0) + indents[index];
+ currentLine++;
+ }
+
+ exit = self.enterBlock();
+ contents = self.tokenizeBlock(contents.join(C_NEWLINE), now);
+ exit();
+
+ return add({
+ type: 'blockquote',
+ children: contents
+ });
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/break.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/break.js
new file mode 100644
index 0000000000..6d2d0dcff9
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/break.js
@@ -0,0 +1,51 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:tokenize:break
+ * @fileoverview Tokenise a break.
+ */
+
+'use strict';
+
+var locate = require('../locate/break');
+
+module.exports = hardBreak;
+hardBreak.locator = locate;
+
+var MIN_BREAK_LENGTH = 2;
+
+/* Tokenise a break. */
+function hardBreak(eat, value, silent) {
+ var self = this;
+ var breaks = self.options.breaks;
+ var length = value.length;
+ var index = -1;
+ var queue = '';
+ var character;
+
+ while (++index < length) {
+ character = value.charAt(index);
+
+ if (character === '\n') {
+ if (!breaks && index < MIN_BREAK_LENGTH) {
+ return;
+ }
+
+ /* istanbul ignore if - never used (yet) */
+ if (silent) {
+ return true;
+ }
+
+ queue += character;
+
+ return eat(queue)({type: 'break'});
+ }
+
+ if (character !== ' ') {
+ return;
+ }
+
+ queue += character;
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/code-fenced.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/code-fenced.js
new file mode 100644
index 0000000000..f2577405b2
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/code-fenced.js
@@ -0,0 +1,245 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:tokenize:code-fenced
+ * @fileoverview Tokenise fenced code.
+ */
+
+'use strict';
+
+var trim = require('trim-trailing-lines');
+
+module.exports = fencedCode;
+
+var C_NEWLINE = '\n';
+var C_TAB = '\t';
+var C_SPACE = ' ';
+var C_TILDE = '~';
+var C_TICK = '`';
+
+var MIN_FENCE_COUNT = 3;
+var CODE_INDENT_COUNT = 4;
+
+/* Tokenise fenced code. */
+function fencedCode(eat, value, silent) {
+ var self = this;
+ var settings = self.options;
+ var length = value.length + 1;
+ var index = 0;
+ var subvalue = '';
+ var fenceCount;
+ var marker;
+ var character;
+ var flag;
+ var queue;
+ var content;
+ var exdentedContent;
+ var closing;
+ var exdentedClosing;
+ var indent;
+ var now;
+
+ if (!settings.gfm) {
+ return;
+ }
+
+ /* Eat initial spacing. */
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (character !== C_SPACE && character !== C_TAB) {
+ break;
+ }
+
+ subvalue += character;
+ index++;
+ }
+
+ indent = index;
+
+ /* Eat the fence. */
+ character = value.charAt(index);
+
+ if (character !== C_TILDE && character !== C_TICK) {
+ return;
+ }
+
+ index++;
+ marker = character;
+ fenceCount = 1;
+ subvalue += character;
+
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (character !== marker) {
+ break;
+ }
+
+ subvalue += character;
+ fenceCount++;
+ index++;
+ }
+
+ if (fenceCount < MIN_FENCE_COUNT) {
+ return;
+ }
+
+ /* Eat spacing before flag. */
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (character !== C_SPACE && character !== C_TAB) {
+ break;
+ }
+
+ subvalue += character;
+ index++;
+ }
+
+ /* Eat flag. */
+ flag = '';
+ queue = '';
+
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (
+ character === C_NEWLINE ||
+ character === C_TILDE ||
+ character === C_TICK
+ ) {
+ break;
+ }
+
+ if (character === C_SPACE || character === C_TAB) {
+ queue += character;
+ } else {
+ flag += queue + character;
+ queue = '';
+ }
+
+ index++;
+ }
+
+ character = value.charAt(index);
+
+ if (character && character !== C_NEWLINE) {
+ return;
+ }
+
+ if (silent) {
+ return true;
+ }
+
+ now = eat.now();
+ now.column += subvalue.length;
+ now.offset += subvalue.length;
+
+ subvalue += flag;
+ flag = self.decode.raw(self.unescape(flag), now);
+
+ if (queue) {
+ subvalue += queue;
+ }
+
+ queue = '';
+ closing = '';
+ exdentedClosing = '';
+ content = '';
+ exdentedContent = '';
+
+ /* Eat content. */
+ while (index < length) {
+ character = value.charAt(index);
+ content += closing;
+ exdentedContent += exdentedClosing;
+ closing = '';
+ exdentedClosing = '';
+
+ if (character !== C_NEWLINE) {
+ content += character;
+ exdentedClosing += character;
+ index++;
+ continue;
+ }
+
+ /* Add the newline to `subvalue` if its the first
+ * character. Otherwise, add it to the `closing`
+ * queue. */
+ if (content) {
+ closing += character;
+ exdentedClosing += character;
+ } else {
+ subvalue += character;
+ }
+
+ queue = '';
+ index++;
+
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (character !== C_SPACE) {
+ break;
+ }
+
+ queue += character;
+ index++;
+ }
+
+ closing += queue;
+ exdentedClosing += queue.slice(indent);
+
+ if (queue.length >= CODE_INDENT_COUNT) {
+ continue;
+ }
+
+ queue = '';
+
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (character !== marker) {
+ break;
+ }
+
+ queue += character;
+ index++;
+ }
+
+ closing += queue;
+ exdentedClosing += queue;
+
+ if (queue.length < fenceCount) {
+ continue;
+ }
+
+ queue = '';
+
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (character !== C_SPACE && character !== C_TAB) {
+ break;
+ }
+
+ closing += character;
+ exdentedClosing += character;
+ index++;
+ }
+
+ if (!character || character === C_NEWLINE) {
+ break;
+ }
+ }
+
+ subvalue += content + closing;
+
+ return eat(subvalue)({
+ type: 'code',
+ lang: flag || null,
+ value: trim(exdentedContent)
+ });
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/code-indented.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/code-indented.js
new file mode 100644
index 0000000000..50c581fe26
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/code-indented.js
@@ -0,0 +1,106 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:tokenize:code-indented
+ * @fileoverview Tokenise indented code.
+ */
+
+'use strict';
+
+var repeat = require('repeat-string');
+var trim = require('trim-trailing-lines');
+
+module.exports = indentedCode;
+
+var C_NEWLINE = '\n';
+var C_TAB = '\t';
+var C_SPACE = ' ';
+
+var CODE_INDENT_COUNT = 4;
+var CODE_INDENT = repeat(C_SPACE, CODE_INDENT_COUNT);
+
+/* Tokenise indented code. */
+function indentedCode(eat, value, silent) {
+ var index = -1;
+ var length = value.length;
+ var subvalue = '';
+ var content = '';
+ var subvalueQueue = '';
+ var contentQueue = '';
+ var character;
+ var blankQueue;
+ var indent;
+
+ while (++index < length) {
+ character = value.charAt(index);
+
+ if (indent) {
+ indent = false;
+
+ subvalue += subvalueQueue;
+ content += contentQueue;
+ subvalueQueue = '';
+ contentQueue = '';
+
+ if (character === C_NEWLINE) {
+ subvalueQueue = character;
+ contentQueue = character;
+ } else {
+ subvalue += character;
+ content += character;
+
+ while (++index < length) {
+ character = value.charAt(index);
+
+ if (!character || character === C_NEWLINE) {
+ contentQueue = character;
+ subvalueQueue = character;
+ break;
+ }
+
+ subvalue += character;
+ content += character;
+ }
+ }
+ } else if (
+ character === C_SPACE &&
+ value.charAt(index + 1) === character &&
+ value.charAt(index + 2) === character &&
+ value.charAt(index + 3) === character
+ ) {
+ subvalueQueue += CODE_INDENT;
+ index += 3;
+ indent = true;
+ } else if (character === C_TAB) {
+ subvalueQueue += character;
+ indent = true;
+ } else {
+ blankQueue = '';
+
+ while (character === C_TAB || character === C_SPACE) {
+ blankQueue += character;
+ character = value.charAt(++index);
+ }
+
+ if (character !== C_NEWLINE) {
+ break;
+ }
+
+ subvalueQueue += blankQueue + character;
+ contentQueue += character;
+ }
+ }
+
+ if (content) {
+ if (silent) {
+ return true;
+ }
+
+ return eat(subvalue)({
+ type: 'code',
+ lang: null,
+ value: trim(content)
+ });
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/code-inline.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/code-inline.js
new file mode 100644
index 0000000000..9157412753
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/code-inline.js
@@ -0,0 +1,120 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:tokenize:code-inline
+ * @fileoverview Tokenise inline code.
+ */
+
+'use strict';
+
+var whitespace = require('is-whitespace-character');
+var locate = require('../locate/code-inline');
+
+module.exports = inlineCode;
+inlineCode.locator = locate;
+
+var C_TICK = '`';
+
+/* Tokenise inline code. */
+function inlineCode(eat, value, silent) {
+ var length = value.length;
+ var index = 0;
+ var queue = '';
+ var tickQueue = '';
+ var contentQueue;
+ var subqueue;
+ var count;
+ var openingCount;
+ var subvalue;
+ var character;
+ var found;
+ var next;
+
+ while (index < length) {
+ if (value.charAt(index) !== C_TICK) {
+ break;
+ }
+
+ queue += C_TICK;
+ index++;
+ }
+
+ if (!queue) {
+ return;
+ }
+
+ subvalue = queue;
+ openingCount = index;
+ queue = '';
+ next = value.charAt(index);
+ count = 0;
+
+ while (index < length) {
+ character = next;
+ next = value.charAt(index + 1);
+
+ if (character === C_TICK) {
+ count++;
+ tickQueue += character;
+ } else {
+ count = 0;
+ queue += character;
+ }
+
+ if (count && next !== C_TICK) {
+ if (count === openingCount) {
+ subvalue += queue + tickQueue;
+ found = true;
+ break;
+ }
+
+ queue += tickQueue;
+ tickQueue = '';
+ }
+
+ index++;
+ }
+
+ if (!found) {
+ if (openingCount % 2 !== 0) {
+ return;
+ }
+
+ queue = '';
+ }
+
+ /* istanbul ignore if - never used (yet) */
+ if (silent) {
+ return true;
+ }
+
+ contentQueue = '';
+ subqueue = '';
+ length = queue.length;
+ index = -1;
+
+ while (++index < length) {
+ character = queue.charAt(index);
+
+ if (whitespace(character)) {
+ subqueue += character;
+ continue;
+ }
+
+ if (subqueue) {
+ if (contentQueue) {
+ contentQueue += subqueue;
+ }
+
+ subqueue = '';
+ }
+
+ contentQueue += character;
+ }
+
+ return eat(subvalue)({
+ type: 'inlineCode',
+ value: contentQueue
+ });
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/definition.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/definition.js
new file mode 100644
index 0000000000..3f7345a2c9
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/definition.js
@@ -0,0 +1,287 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:tokenize:definition
+ * @fileoverview Tokenise a definition.
+ */
+
+'use strict';
+
+var whitespace = require('is-whitespace-character');
+var normalize = require('../util/normalize');
+
+module.exports = definition;
+definition.notInList = true;
+definition.notInBlock = true;
+
+var C_DOUBLE_QUOTE = '"';
+var C_SINGLE_QUOTE = '\'';
+var C_BACKSLASH = '\\';
+var C_NEWLINE = '\n';
+var C_TAB = '\t';
+var C_SPACE = ' ';
+var C_BRACKET_OPEN = '[';
+var C_BRACKET_CLOSE = ']';
+var C_PAREN_OPEN = '(';
+var C_PAREN_CLOSE = ')';
+var C_COLON = ':';
+var C_LT = '<';
+var C_GT = '>';
+
+/* Tokenise a definition. */
+function definition(eat, value, silent) {
+ var self = this;
+ var commonmark = self.options.commonmark;
+ var index = 0;
+ var length = value.length;
+ var subvalue = '';
+ var beforeURL;
+ var beforeTitle;
+ var queue;
+ var character;
+ var test;
+ var identifier;
+ var url;
+ var title;
+
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (character !== C_SPACE && character !== C_TAB) {
+ break;
+ }
+
+ subvalue += character;
+ index++;
+ }
+
+ character = value.charAt(index);
+
+ if (character !== C_BRACKET_OPEN) {
+ return;
+ }
+
+ index++;
+ subvalue += character;
+ queue = '';
+
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (character === C_BRACKET_CLOSE) {
+ break;
+ } else if (character === C_BACKSLASH) {
+ queue += character;
+ index++;
+ character = value.charAt(index);
+ }
+
+ queue += character;
+ index++;
+ }
+
+ if (
+ !queue ||
+ value.charAt(index) !== C_BRACKET_CLOSE ||
+ value.charAt(index + 1) !== C_COLON
+ ) {
+ return;
+ }
+
+ identifier = queue;
+ subvalue += queue + C_BRACKET_CLOSE + C_COLON;
+ index = subvalue.length;
+ queue = '';
+
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (
+ character !== C_TAB &&
+ character !== C_SPACE &&
+ character !== C_NEWLINE
+ ) {
+ break;
+ }
+
+ subvalue += character;
+ index++;
+ }
+
+ character = value.charAt(index);
+ queue = '';
+ beforeURL = subvalue;
+
+ if (character === C_LT) {
+ index++;
+
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (!isEnclosedURLCharacter(character)) {
+ break;
+ }
+
+ queue += character;
+ index++;
+ }
+
+ character = value.charAt(index);
+
+ if (character === isEnclosedURLCharacter.delimiter) {
+ subvalue += C_LT + queue + character;
+ index++;
+ } else {
+ if (commonmark) {
+ return;
+ }
+
+ index -= queue.length + 1;
+ queue = '';
+ }
+ }
+
+ if (!queue) {
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (!isUnclosedURLCharacter(character)) {
+ break;
+ }
+
+ queue += character;
+ index++;
+ }
+
+ subvalue += queue;
+ }
+
+ if (!queue) {
+ return;
+ }
+
+ url = queue;
+ queue = '';
+
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (
+ character !== C_TAB &&
+ character !== C_SPACE &&
+ character !== C_NEWLINE
+ ) {
+ break;
+ }
+
+ queue += character;
+ index++;
+ }
+
+ character = value.charAt(index);
+ test = null;
+
+ if (character === C_DOUBLE_QUOTE) {
+ test = C_DOUBLE_QUOTE;
+ } else if (character === C_SINGLE_QUOTE) {
+ test = C_SINGLE_QUOTE;
+ } else if (character === C_PAREN_OPEN) {
+ test = C_PAREN_CLOSE;
+ }
+
+ if (!test) {
+ queue = '';
+ index = subvalue.length;
+ } else if (queue) {
+ subvalue += queue + character;
+ index = subvalue.length;
+ queue = '';
+
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (character === test) {
+ break;
+ }
+
+ if (character === C_NEWLINE) {
+ index++;
+ character = value.charAt(index);
+
+ if (character === C_NEWLINE || character === test) {
+ return;
+ }
+
+ queue += C_NEWLINE;
+ }
+
+ queue += character;
+ index++;
+ }
+
+ character = value.charAt(index);
+
+ if (character !== test) {
+ return;
+ }
+
+ beforeTitle = subvalue;
+ subvalue += queue + character;
+ index++;
+ title = queue;
+ queue = '';
+ } else {
+ return;
+ }
+
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (character !== C_TAB && character !== C_SPACE) {
+ break;
+ }
+
+ subvalue += character;
+ index++;
+ }
+
+ character = value.charAt(index);
+
+ if (!character || character === C_NEWLINE) {
+ if (silent) {
+ return true;
+ }
+
+ beforeURL = eat(beforeURL).test().end;
+ url = self.decode.raw(self.unescape(url), beforeURL);
+
+ if (title) {
+ beforeTitle = eat(beforeTitle).test().end;
+ title = self.decode.raw(self.unescape(title), beforeTitle);
+ }
+
+ return eat(subvalue)({
+ type: 'definition',
+ identifier: normalize(identifier),
+ title: title || null,
+ url: url
+ });
+ }
+}
+
+/* Check if `character` can be inside an enclosed URI. */
+function isEnclosedURLCharacter(character) {
+ return character !== C_GT &&
+ character !== C_BRACKET_OPEN &&
+ character !== C_BRACKET_CLOSE;
+}
+
+isEnclosedURLCharacter.delimiter = C_GT;
+
+/* Check if `character` can be inside an unclosed URI. */
+function isUnclosedURLCharacter(character) {
+ return character !== C_BRACKET_OPEN &&
+ character !== C_BRACKET_CLOSE &&
+ !whitespace(character);
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/delete.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/delete.js
new file mode 100644
index 0000000000..60ae9c4936
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/delete.js
@@ -0,0 +1,69 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:tokenize:delete
+ * @fileoverview Tokenise strikethrough.
+ */
+
+'use strict';
+
+var whitespace = require('is-whitespace-character');
+var locate = require('../locate/delete');
+
+module.exports = strikethrough;
+strikethrough.locator = locate;
+
+var C_TILDE = '~';
+var DOUBLE = '~~';
+
+/* Tokenise strikethrough. */
+function strikethrough(eat, value, silent) {
+ var self = this;
+ var character = '';
+ var previous = '';
+ var preceding = '';
+ var subvalue = '';
+ var index;
+ var length;
+ var now;
+
+ if (
+ !self.options.gfm ||
+ value.charAt(0) !== C_TILDE ||
+ value.charAt(1) !== C_TILDE ||
+ whitespace(value.charAt(2))
+ ) {
+ return;
+ }
+
+ index = 1;
+ length = value.length;
+ now = eat.now();
+ now.column += 2;
+ now.offset += 2;
+
+ while (++index < length) {
+ character = value.charAt(index);
+
+ if (
+ character === C_TILDE &&
+ previous === C_TILDE &&
+ (!preceding || !whitespace(preceding))
+ ) {
+ /* istanbul ignore if - never used (yet) */
+ if (silent) {
+ return true;
+ }
+
+ return eat(DOUBLE + subvalue + DOUBLE)({
+ type: 'delete',
+ children: self.tokenizeInline(subvalue, now)
+ });
+ }
+
+ subvalue += previous;
+ preceding = previous;
+ previous = character;
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/emphasis.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/emphasis.js
new file mode 100644
index 0000000000..4624936922
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/emphasis.js
@@ -0,0 +1,94 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:tokenize:emphasis
+ * @fileoverview Tokenise emphasis.
+ */
+
+'use strict';
+
+var trim = require('trim');
+var word = require('is-word-character');
+var whitespace = require('is-whitespace-character');
+var locate = require('../locate/emphasis');
+
+module.exports = emphasis;
+emphasis.locator = locate;
+
+var C_ASTERISK = '*';
+var C_UNDERSCORE = '_';
+
+/* Tokenise emphasis. */
+function emphasis(eat, value, silent) {
+ var self = this;
+ var index = 0;
+ var character = value.charAt(index);
+ var now;
+ var pedantic;
+ var marker;
+ var queue;
+ var subvalue;
+ var length;
+ var prev;
+
+ if (character !== C_ASTERISK && character !== C_UNDERSCORE) {
+ return;
+ }
+
+ pedantic = self.options.pedantic;
+ subvalue = character;
+ marker = character;
+ length = value.length;
+ index++;
+ queue = '';
+ character = '';
+
+ if (pedantic && whitespace(value.charAt(index))) {
+ return;
+ }
+
+ while (index < length) {
+ prev = character;
+ character = value.charAt(index);
+
+ if (character === marker && (!pedantic || !whitespace(prev))) {
+ character = value.charAt(++index);
+
+ if (character !== marker) {
+ if (!trim(queue) || prev === marker) {
+ return;
+ }
+
+ if (!pedantic && marker === C_UNDERSCORE && word(character)) {
+ queue += marker;
+ continue;
+ }
+
+ /* istanbul ignore if - never used (yet) */
+ if (silent) {
+ return true;
+ }
+
+ now = eat.now();
+ now.column++;
+ now.offset++;
+
+ return eat(subvalue + queue + marker)({
+ type: 'emphasis',
+ children: self.tokenizeInline(queue, now)
+ });
+ }
+
+ queue += marker;
+ }
+
+ if (!pedantic && character === '\\') {
+ queue += character;
+ character = value.charAt(++index);
+ }
+
+ queue += character;
+ index++;
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/escape.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/escape.js
new file mode 100644
index 0000000000..3e41a4cec5
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/escape.js
@@ -0,0 +1,43 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:tokenize:escape
+ * @fileoverview Tokenise an escape.
+ */
+
+'use strict';
+
+var locate = require('../locate/escape');
+
+module.exports = escape;
+escape.locator = locate;
+
+/* Tokenise an escape. */
+function escape(eat, value, silent) {
+ var self = this;
+ var character;
+ var node;
+
+ if (value.charAt(0) === '\\') {
+ character = value.charAt(1);
+
+ if (self.escape.indexOf(character) !== -1) {
+ /* istanbul ignore if - never used (yet) */
+ if (silent) {
+ return true;
+ }
+
+ if (character === '\n') {
+ node = {type: 'break'};
+ } else {
+ node = {
+ type: 'text',
+ value: character
+ };
+ }
+
+ return eat('\\' + character)(node);
+ }
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/footnote-definition.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/footnote-definition.js
new file mode 100644
index 0000000000..3537ccb611
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/footnote-definition.js
@@ -0,0 +1,194 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:tokenize:footnote-definition
+ * @fileoverview Tokenise footnote definition.
+ */
+
+'use strict';
+
+var whitespace = require('is-whitespace-character');
+var normalize = require('../util/normalize');
+
+module.exports = footnoteDefinition;
+footnoteDefinition.notInList = true;
+footnoteDefinition.notInBlock = true;
+
+var C_BACKSLASH = '\\';
+var C_NEWLINE = '\n';
+var C_TAB = '\t';
+var C_SPACE = ' ';
+var C_BRACKET_OPEN = '[';
+var C_BRACKET_CLOSE = ']';
+var C_CARET = '^';
+var C_COLON = ':';
+
+var EXPRESSION_INITIAL_TAB = /^( {4}|\t)?/gm;
+
+/* Tokenise a footnote definition. */
+function footnoteDefinition(eat, value, silent) {
+ var self = this;
+ var offsets = self.offset;
+ var index;
+ var length;
+ var subvalue;
+ var now;
+ var currentLine;
+ var content;
+ var queue;
+ var subqueue;
+ var character;
+ var identifier;
+ var add;
+ var exit;
+
+ if (!self.options.footnotes) {
+ return;
+ }
+
+ index = 0;
+ length = value.length;
+ subvalue = '';
+ now = eat.now();
+ currentLine = now.line;
+
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (!whitespace(character)) {
+ break;
+ }
+
+ subvalue += character;
+ index++;
+ }
+
+ if (
+ value.charAt(index) !== C_BRACKET_OPEN ||
+ value.charAt(index + 1) !== C_CARET
+ ) {
+ return;
+ }
+
+ subvalue += C_BRACKET_OPEN + C_CARET;
+ index = subvalue.length;
+ queue = '';
+
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (character === C_BRACKET_CLOSE) {
+ break;
+ } else if (character === C_BACKSLASH) {
+ queue += character;
+ index++;
+ character = value.charAt(index);
+ }
+
+ queue += character;
+ index++;
+ }
+
+ if (
+ !queue ||
+ value.charAt(index) !== C_BRACKET_CLOSE ||
+ value.charAt(index + 1) !== C_COLON
+ ) {
+ return;
+ }
+
+ if (silent) {
+ return true;
+ }
+
+ identifier = normalize(queue);
+ subvalue += queue + C_BRACKET_CLOSE + C_COLON;
+ index = subvalue.length;
+
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (character !== C_TAB && character !== C_SPACE) {
+ break;
+ }
+
+ subvalue += character;
+ index++;
+ }
+
+ now.column += subvalue.length;
+ now.offset += subvalue.length;
+ queue = '';
+ content = '';
+ subqueue = '';
+
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (character === C_NEWLINE) {
+ subqueue = character;
+ index++;
+
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (character !== C_NEWLINE) {
+ break;
+ }
+
+ subqueue += character;
+ index++;
+ }
+
+ queue += subqueue;
+ subqueue = '';
+
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (character !== C_SPACE) {
+ break;
+ }
+
+ subqueue += character;
+ index++;
+ }
+
+ if (subqueue.length === 0) {
+ break;
+ }
+
+ queue += subqueue;
+ }
+
+ if (queue) {
+ content += queue;
+ queue = '';
+ }
+
+ content += character;
+ index++;
+ }
+
+ subvalue += content;
+
+ content = content.replace(EXPRESSION_INITIAL_TAB, function (line) {
+ offsets[currentLine] = (offsets[currentLine] || 0) + line.length;
+ currentLine++;
+
+ return '';
+ });
+
+ add = eat(subvalue);
+
+ exit = self.enterBlock();
+ content = self.tokenizeBlock(content, now);
+ exit();
+
+ return add({
+ type: 'footnoteDefinition',
+ identifier: identifier,
+ children: content
+ });
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/heading-atx.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/heading-atx.js
new file mode 100644
index 0000000000..e5fdedc537
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/heading-atx.js
@@ -0,0 +1,150 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:tokenize:heading-atx
+ * @fileoverview Tokenise an ATX-style heading.
+ */
+
+'use strict';
+
+module.exports = atxHeading;
+
+var C_NEWLINE = '\n';
+var C_TAB = '\t';
+var C_SPACE = ' ';
+var C_HASH = '#';
+
+var MAX_ATX_COUNT = 6;
+
+/* Tokenise an ATX-style heading. */
+function atxHeading(eat, value, silent) {
+ var self = this;
+ var settings = self.options;
+ var length = value.length + 1;
+ var index = -1;
+ var now = eat.now();
+ var subvalue = '';
+ var content = '';
+ var character;
+ var queue;
+ var depth;
+
+ /* Eat initial spacing. */
+ while (++index < length) {
+ character = value.charAt(index);
+
+ if (character !== C_SPACE && character !== C_TAB) {
+ index--;
+ break;
+ }
+
+ subvalue += character;
+ }
+
+ /* Eat hashes. */
+ depth = 0;
+
+ while (++index <= length) {
+ character = value.charAt(index);
+
+ if (character !== C_HASH) {
+ index--;
+ break;
+ }
+
+ subvalue += character;
+ depth++;
+ }
+
+ if (depth > MAX_ATX_COUNT) {
+ return;
+ }
+
+ if (
+ !depth ||
+ (!settings.pedantic && value.charAt(index + 1) === C_HASH)
+ ) {
+ return;
+ }
+
+ length = value.length + 1;
+
+ /* Eat intermediate white-space. */
+ queue = '';
+
+ while (++index < length) {
+ character = value.charAt(index);
+
+ if (character !== C_SPACE && character !== C_TAB) {
+ index--;
+ break;
+ }
+
+ queue += character;
+ }
+
+ /* Exit when not in pedantic mode without spacing. */
+ if (
+ !settings.pedantic &&
+ queue.length === 0 &&
+ character &&
+ character !== C_NEWLINE
+ ) {
+ return;
+ }
+
+ if (silent) {
+ return true;
+ }
+
+ /* Eat content. */
+ subvalue += queue;
+ queue = '';
+ content = '';
+
+ while (++index < length) {
+ character = value.charAt(index);
+
+ if (!character || character === C_NEWLINE) {
+ break;
+ }
+
+ if (
+ character !== C_SPACE &&
+ character !== C_TAB &&
+ character !== C_HASH
+ ) {
+ content += queue + character;
+ queue = '';
+ continue;
+ }
+
+ while (character === C_SPACE || character === C_TAB) {
+ queue += character;
+ character = value.charAt(++index);
+ }
+
+ while (character === C_HASH) {
+ queue += character;
+ character = value.charAt(++index);
+ }
+
+ while (character === C_SPACE || character === C_TAB) {
+ queue += character;
+ character = value.charAt(++index);
+ }
+
+ index--;
+ }
+
+ now.column += subvalue.length;
+ now.offset += subvalue.length;
+ subvalue += content + queue;
+
+ return eat(subvalue)({
+ type: 'heading',
+ depth: depth,
+ children: self.tokenizeInline(content, now)
+ });
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/heading-setext.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/heading-setext.js
new file mode 100644
index 0000000000..db8bbcfb73
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/heading-setext.js
@@ -0,0 +1,116 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:tokenize:heading-setext
+ * @fileoverview Tokenise an setext-style heading.
+ */
+
+'use strict';
+
+module.exports = setextHeading;
+
+var C_NEWLINE = '\n';
+var C_TAB = '\t';
+var C_SPACE = ' ';
+var C_EQUALS = '=';
+var C_DASH = '-';
+
+var MAX_HEADING_INDENT = 3;
+
+/* Map of characters which can be used to mark setext
+ * headers, mapping to their corresponding depth. */
+var SETEXT_MARKERS = {};
+
+SETEXT_MARKERS[C_EQUALS] = 1;
+SETEXT_MARKERS[C_DASH] = 2;
+
+/* Tokenise an setext-style heading. */
+function setextHeading(eat, value, silent) {
+ var self = this;
+ var now = eat.now();
+ var length = value.length;
+ var index = -1;
+ var subvalue = '';
+ var content;
+ var queue;
+ var character;
+ var marker;
+ var depth;
+
+ /* Eat initial indentation. */
+ while (++index < length) {
+ character = value.charAt(index);
+
+ if (character !== C_SPACE || index >= MAX_HEADING_INDENT) {
+ index--;
+ break;
+ }
+
+ subvalue += character;
+ }
+
+ /* Eat content. */
+ content = '';
+ queue = '';
+
+ while (++index < length) {
+ character = value.charAt(index);
+
+ if (character === C_NEWLINE) {
+ index--;
+ break;
+ }
+
+ if (character === C_SPACE || character === C_TAB) {
+ queue += character;
+ } else {
+ content += queue + character;
+ queue = '';
+ }
+ }
+
+ now.column += subvalue.length;
+ now.offset += subvalue.length;
+ subvalue += content + queue;
+
+ /* Ensure the content is followed by a newline and a
+ * valid marker. */
+ character = value.charAt(++index);
+ marker = value.charAt(++index);
+
+ if (character !== C_NEWLINE || !SETEXT_MARKERS[marker]) {
+ return;
+ }
+
+ subvalue += character;
+
+ /* Eat Setext-line. */
+ queue = marker;
+ depth = SETEXT_MARKERS[marker];
+
+ while (++index < length) {
+ character = value.charAt(index);
+
+ if (character !== marker) {
+ if (character !== C_NEWLINE) {
+ return;
+ }
+
+ index--;
+ break;
+ }
+
+ queue += character;
+ }
+
+ if (silent) {
+ return true;
+ }
+
+ return eat(subvalue + queue)({
+ type: 'heading',
+ depth: depth,
+ children: self.tokenizeInline(content, now)
+ });
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/html-block.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/html-block.js
new file mode 100644
index 0000000000..dc861b53c3
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/html-block.js
@@ -0,0 +1,103 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:tokenize:html-block
+ * @fileoverview Tokenise block HTML.
+ */
+
+'use strict';
+
+var openCloseTag = require('../util/html').openCloseTag;
+
+module.exports = blockHTML;
+
+var C_TAB = '\t';
+var C_SPACE = ' ';
+var C_NEWLINE = '\n';
+var C_LT = '<';
+
+/* Tokenise block HTML. */
+function blockHTML(eat, value, silent) {
+ var self = this;
+ var blocks = self.options.blocks;
+ var length = value.length;
+ var index = 0;
+ var next;
+ var line;
+ var offset;
+ var character;
+ var count;
+ var sequence;
+ var subvalue;
+
+ var sequences = [
+ [/^<(script|pre|style)(?=(\s|>|$))/i, /<\/(script|pre|style)>/i, true],
+ [/^<!--/, /-->/, true],
+ [/^<\?/, /\?>/, true],
+ [/^<![A-Za-z]/, />/, true],
+ [/^<!\[CDATA\[/, /\]\]>/, true],
+ [new RegExp('^</?(' + blocks.join('|') + ')(?=(\\s|/?>|$))', 'i'), /^$/, true],
+ [new RegExp(openCloseTag.source + '\\s*$'), /^$/, false]
+ ];
+
+ /* Eat initial spacing. */
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (character !== C_TAB && character !== C_SPACE) {
+ break;
+ }
+
+ index++;
+ }
+
+ if (value.charAt(index) !== C_LT) {
+ return;
+ }
+
+ next = value.indexOf(C_NEWLINE, index + 1);
+ next = next === -1 ? length : next;
+ line = value.slice(index, next);
+ offset = -1;
+ count = sequences.length;
+
+ while (++offset < count) {
+ if (sequences[offset][0].test(line)) {
+ sequence = sequences[offset];
+ break;
+ }
+ }
+
+ if (!sequence) {
+ return;
+ }
+
+ if (silent) {
+ return sequence[2];
+ }
+
+ index = next;
+
+ if (!sequence[1].test(line)) {
+ while (index < length) {
+ next = value.indexOf(C_NEWLINE, index + 1);
+ next = next === -1 ? length : next;
+ line = value.slice(index + 1, next);
+
+ if (sequence[1].test(line)) {
+ if (line) {
+ index = next;
+ }
+
+ break;
+ }
+
+ index = next;
+ }
+ }
+
+ subvalue = value.slice(0, index);
+
+ return eat(subvalue)({type: 'html', value: subvalue});
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/html-inline.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/html-inline.js
new file mode 100644
index 0000000000..d8c0b9ab21
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/html-inline.js
@@ -0,0 +1,63 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:tokenize:html-inline
+ * @fileoverview Tokenise inline HTML.
+ */
+
+'use strict';
+
+var alphabetical = require('is-alphabetical');
+var locate = require('../locate/tag');
+var tag = require('../util/html').tag;
+
+module.exports = inlineHTML;
+inlineHTML.locator = locate;
+
+var EXPRESSION_HTML_LINK_OPEN = /^<a /i;
+var EXPRESSION_HTML_LINK_CLOSE = /^<\/a>/i;
+
+/* Tokenise inline HTML. */
+function inlineHTML(eat, value, silent) {
+ var self = this;
+ var length = value.length;
+ var character;
+ var subvalue;
+
+ if (value.charAt(0) !== '<' || length < 3) {
+ return;
+ }
+
+ character = value.charAt(1);
+
+ if (
+ !alphabetical(character) &&
+ character !== '?' &&
+ character !== '!' &&
+ character !== '/'
+ ) {
+ return;
+ }
+
+ subvalue = value.match(tag);
+
+ if (!subvalue) {
+ return;
+ }
+
+ /* istanbul ignore if - not used yet. */
+ if (silent) {
+ return true;
+ }
+
+ subvalue = subvalue[0];
+
+ if (!self.inLink && EXPRESSION_HTML_LINK_OPEN.test(subvalue)) {
+ self.inLink = true;
+ } else if (self.inLink && EXPRESSION_HTML_LINK_CLOSE.test(subvalue)) {
+ self.inLink = false;
+ }
+
+ return eat(subvalue)({type: 'html', value: subvalue});
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/link.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/link.js
new file mode 100644
index 0000000000..fb11c50990
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/link.js
@@ -0,0 +1,399 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:tokenize:link
+ * @fileoverview Tokenise a link.
+ */
+
+'use strict';
+
+var has = require('has');
+var whitespace = require('is-whitespace-character');
+var locate = require('../locate/link');
+
+module.exports = link;
+link.locator = locate;
+
+var C_BACKSLASH = '\\';
+var C_BRACKET_OPEN = '[';
+var C_BRACKET_CLOSE = ']';
+var C_PAREN_OPEN = '(';
+var C_PAREN_CLOSE = ')';
+var C_LT = '<';
+var C_GT = '>';
+var C_TICK = '`';
+var C_DOUBLE_QUOTE = '"';
+var C_SINGLE_QUOTE = '\'';
+
+/* Map of characters, which can be used to mark link
+ * and image titles. */
+var LINK_MARKERS = {};
+
+LINK_MARKERS[C_DOUBLE_QUOTE] = C_DOUBLE_QUOTE;
+LINK_MARKERS[C_SINGLE_QUOTE] = C_SINGLE_QUOTE;
+
+/* Map of characters, which can be used to mark link
+ * and image titles in commonmark-mode. */
+var COMMONMARK_LINK_MARKERS = {};
+
+COMMONMARK_LINK_MARKERS[C_DOUBLE_QUOTE] = C_DOUBLE_QUOTE;
+COMMONMARK_LINK_MARKERS[C_SINGLE_QUOTE] = C_SINGLE_QUOTE;
+COMMONMARK_LINK_MARKERS[C_PAREN_OPEN] = C_PAREN_CLOSE;
+
+/* Tokenise a link. */
+function link(eat, value, silent) {
+ var self = this;
+ var subvalue = '';
+ var index = 0;
+ var character = value.charAt(0);
+ var commonmark = self.options.commonmark;
+ var gfm = self.options.gfm;
+ var closed;
+ var count;
+ var opening;
+ var beforeURL;
+ var beforeTitle;
+ var subqueue;
+ var hasMarker;
+ var markers;
+ var isImage;
+ var content;
+ var marker;
+ var length;
+ var title;
+ var depth;
+ var queue;
+ var url;
+ var now;
+ var exit;
+ var node;
+
+ /* Detect whether this is an image. */
+ if (character === '!') {
+ isImage = true;
+ subvalue = character;
+ character = value.charAt(++index);
+ }
+
+ /* Eat the opening. */
+ if (character !== C_BRACKET_OPEN) {
+ return;
+ }
+
+ /* Exit when this is a link and we’re already inside
+ * a link. */
+ if (!isImage && self.inLink) {
+ return;
+ }
+
+ subvalue += character;
+ queue = '';
+ index++;
+
+ /* Eat the content. */
+ length = value.length;
+ now = eat.now();
+ depth = 0;
+
+ now.column += index;
+ now.offset += index;
+
+ while (index < length) {
+ character = value.charAt(index);
+ subqueue = character;
+
+ if (character === C_TICK) {
+ /* Inline-code in link content. */
+ count = 1;
+
+ while (value.charAt(index + 1) === C_TICK) {
+ subqueue += character;
+ index++;
+ count++;
+ }
+
+ if (!opening) {
+ opening = count;
+ } else if (count >= opening) {
+ opening = 0;
+ }
+ } else if (character === C_BACKSLASH) {
+ /* Allow brackets to be escaped. */
+ index++;
+ subqueue += value.charAt(index);
+ /* In GFM mode, brackets in code still count.
+ * In all other modes, they don’t. This empty
+ * block prevents the next statements are
+ * entered. */
+ } else if ((!opening || gfm) && character === C_BRACKET_OPEN) {
+ depth++;
+ } else if ((!opening || gfm) && character === C_BRACKET_CLOSE) {
+ if (depth) {
+ depth--;
+ } else {
+ /* Allow white-space between content and
+ * url in GFM mode. */
+ if (gfm) {
+ while (index < length) {
+ character = value.charAt(index + 1);
+
+ if (!whitespace(character)) {
+ break;
+ }
+
+ subqueue += character;
+ index++;
+ }
+ }
+
+ if (value.charAt(index + 1) !== C_PAREN_OPEN) {
+ return;
+ }
+
+ subqueue += C_PAREN_OPEN;
+ closed = true;
+ index++;
+
+ break;
+ }
+ }
+
+ queue += subqueue;
+ subqueue = '';
+ index++;
+ }
+
+ /* Eat the content closing. */
+ if (!closed) {
+ return;
+ }
+
+ content = queue;
+ subvalue += queue + subqueue;
+ index++;
+
+ /* Eat white-space. */
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (!whitespace(character)) {
+ break;
+ }
+
+ subvalue += character;
+ index++;
+ }
+
+ /* Eat the URL. */
+ character = value.charAt(index);
+ markers = commonmark ? COMMONMARK_LINK_MARKERS : LINK_MARKERS;
+ queue = '';
+ beforeURL = subvalue;
+
+ if (character === C_LT) {
+ index++;
+ beforeURL += C_LT;
+
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (character === C_GT) {
+ break;
+ }
+
+ if (commonmark && character === '\n') {
+ return;
+ }
+
+ queue += character;
+ index++;
+ }
+
+ if (value.charAt(index) !== C_GT) {
+ return;
+ }
+
+ subvalue += C_LT + queue + C_GT;
+ url = queue;
+ index++;
+ } else {
+ character = null;
+ subqueue = '';
+
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (subqueue && has(markers, character)) {
+ break;
+ }
+
+ if (whitespace(character)) {
+ if (commonmark) {
+ break;
+ }
+
+ subqueue += character;
+ } else {
+ if (character === C_PAREN_OPEN) {
+ depth++;
+ } else if (character === C_PAREN_CLOSE) {
+ if (depth === 0) {
+ break;
+ }
+
+ depth--;
+ }
+
+ queue += subqueue;
+ subqueue = '';
+
+ if (character === C_BACKSLASH) {
+ queue += C_BACKSLASH;
+ character = value.charAt(++index);
+ }
+
+ queue += character;
+ }
+
+ index++;
+ }
+
+ subvalue += queue;
+ url = queue;
+ index = subvalue.length;
+ }
+
+ /* Eat white-space. */
+ queue = '';
+
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (!whitespace(character)) {
+ break;
+ }
+
+ queue += character;
+ index++;
+ }
+
+ character = value.charAt(index);
+ subvalue += queue;
+
+ /* Eat the title. */
+ if (queue && has(markers, character)) {
+ index++;
+ subvalue += character;
+ queue = '';
+ marker = markers[character];
+ beforeTitle = subvalue;
+
+ /* In commonmark-mode, things are pretty easy: the
+ * marker cannot occur inside the title.
+ *
+ * Non-commonmark does, however, support nested
+ * delimiters. */
+ if (commonmark) {
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (character === marker) {
+ break;
+ }
+
+ if (character === C_BACKSLASH) {
+ queue += C_BACKSLASH;
+ character = value.charAt(++index);
+ }
+
+ index++;
+ queue += character;
+ }
+
+ character = value.charAt(index);
+
+ if (character !== marker) {
+ return;
+ }
+
+ title = queue;
+ subvalue += queue + character;
+ index++;
+
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (!whitespace(character)) {
+ break;
+ }
+
+ subvalue += character;
+ index++;
+ }
+ } else {
+ subqueue = '';
+
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (character === marker) {
+ if (hasMarker) {
+ queue += marker + subqueue;
+ subqueue = '';
+ }
+
+ hasMarker = true;
+ } else if (!hasMarker) {
+ queue += character;
+ } else if (character === C_PAREN_CLOSE) {
+ subvalue += queue + marker + subqueue;
+ title = queue;
+ break;
+ } else if (whitespace(character)) {
+ subqueue += character;
+ } else {
+ queue += marker + subqueue + character;
+ subqueue = '';
+ hasMarker = false;
+ }
+
+ index++;
+ }
+ }
+ }
+
+ if (value.charAt(index) !== C_PAREN_CLOSE) {
+ return;
+ }
+
+ /* istanbul ignore if - never used (yet) */
+ if (silent) {
+ return true;
+ }
+
+ subvalue += C_PAREN_CLOSE;
+
+ url = self.decode.raw(self.unescape(url), eat(beforeURL).test().end);
+
+ if (title) {
+ beforeTitle = eat(beforeTitle).test().end;
+ title = self.decode.raw(self.unescape(title), beforeTitle);
+ }
+
+ node = {
+ type: isImage ? 'image' : 'link',
+ title: title || null,
+ url: url
+ };
+
+ if (isImage) {
+ node.alt = self.decode.raw(self.unescape(content), now) || null;
+ } else {
+ exit = self.enterLink();
+ node.children = self.tokenizeInline(content, now);
+ exit();
+ }
+
+ return eat(subvalue)(node);
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/list.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/list.js
new file mode 100644
index 0000000000..da8002e574
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/list.js
@@ -0,0 +1,494 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:tokenize:list
+ * @fileoverview Tokenise a list.
+ */
+
+'use strict';
+
+/* eslint-disable max-params */
+
+var trim = require('trim');
+var repeat = require('repeat-string');
+var decimal = require('is-decimal');
+var getIndent = require('../util/get-indentation');
+var removeIndent = require('../util/remove-indentation');
+var interrupt = require('../util/interrupt');
+
+module.exports = list;
+
+var C_ASTERISK = '*';
+var C_UNDERSCORE = '_';
+var C_PLUS = '+';
+var C_DASH = '-';
+var C_DOT = '.';
+var C_SPACE = ' ';
+var C_NEWLINE = '\n';
+var C_TAB = '\t';
+var C_PAREN_CLOSE = ')';
+var C_X_LOWER = 'x';
+
+var TAB_SIZE = 4;
+var EXPRESSION_LOOSE_LIST_ITEM = /\n\n(?!\s*$)/;
+var EXPRESSION_TASK_ITEM = /^\[([ \t]|x|X)][ \t]/;
+var EXPRESSION_BULLET = /^([ \t]*)([*+-]|\d+[.)])( {1,4}(?! )| |\t|$|(?=\n))([^\n]*)/;
+var EXPRESSION_PEDANTIC_BULLET = /^([ \t]*)([*+-]|\d+[.)])([ \t]+)/;
+var EXPRESSION_INITIAL_INDENT = /^( {1,4}|\t)?/gm;
+
+/* Map of characters which can be used to mark
+ * list-items. */
+var LIST_UNORDERED_MARKERS = {};
+
+LIST_UNORDERED_MARKERS[C_ASTERISK] = true;
+LIST_UNORDERED_MARKERS[C_PLUS] = true;
+LIST_UNORDERED_MARKERS[C_DASH] = true;
+
+/* Map of characters which can be used to mark
+ * list-items after a digit. */
+var LIST_ORDERED_MARKERS = {};
+
+LIST_ORDERED_MARKERS[C_DOT] = true;
+
+/* Map of characters which can be used to mark
+ * list-items after a digit. */
+var LIST_ORDERED_COMMONMARK_MARKERS = {};
+
+LIST_ORDERED_COMMONMARK_MARKERS[C_DOT] = true;
+LIST_ORDERED_COMMONMARK_MARKERS[C_PAREN_CLOSE] = true;
+
+/* Tokenise a list. */
+function list(eat, value, silent) {
+ var self = this;
+ var commonmark = self.options.commonmark;
+ var pedantic = self.options.pedantic;
+ var tokenizers = self.blockTokenizers;
+ var interuptors = self.interruptList;
+ var markers;
+ var index = 0;
+ var length = value.length;
+ var start = null;
+ var size = 0;
+ var queue;
+ var ordered;
+ var character;
+ var marker;
+ var nextIndex;
+ var startIndex;
+ var prefixed;
+ var currentMarker;
+ var content;
+ var line;
+ var prevEmpty;
+ var empty;
+ var items;
+ var allLines;
+ var emptyLines;
+ var item;
+ var enterTop;
+ var exitBlockquote;
+ var isLoose;
+ var node;
+ var now;
+ var end;
+ var indented;
+
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (character === C_TAB) {
+ size += TAB_SIZE - (size % TAB_SIZE);
+ } else if (character === C_SPACE) {
+ size++;
+ } else {
+ break;
+ }
+
+ index++;
+ }
+
+ if (size >= TAB_SIZE) {
+ return;
+ }
+
+ character = value.charAt(index);
+
+ markers = commonmark ?
+ LIST_ORDERED_COMMONMARK_MARKERS :
+ LIST_ORDERED_MARKERS;
+
+ if (LIST_UNORDERED_MARKERS[character] === true) {
+ marker = character;
+ ordered = false;
+ } else {
+ ordered = true;
+ queue = '';
+
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (!decimal(character)) {
+ break;
+ }
+
+ queue += character;
+ index++;
+ }
+
+ character = value.charAt(index);
+
+ if (!queue || markers[character] !== true) {
+ return;
+ }
+
+ start = parseInt(queue, 10);
+ marker = character;
+ }
+
+ character = value.charAt(++index);
+
+ if (character !== C_SPACE && character !== C_TAB) {
+ return;
+ }
+
+ if (silent) {
+ return true;
+ }
+
+ index = 0;
+ items = [];
+ allLines = [];
+ emptyLines = [];
+
+ while (index < length) {
+ nextIndex = value.indexOf(C_NEWLINE, index);
+ startIndex = index;
+ prefixed = false;
+ indented = false;
+
+ if (nextIndex === -1) {
+ nextIndex = length;
+ }
+
+ end = index + TAB_SIZE;
+ size = 0;
+
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (character === C_TAB) {
+ size += TAB_SIZE - (size % TAB_SIZE);
+ } else if (character === C_SPACE) {
+ size++;
+ } else {
+ break;
+ }
+
+ index++;
+ }
+
+ if (size >= TAB_SIZE) {
+ indented = true;
+ }
+
+ if (item && size >= item.indent) {
+ indented = true;
+ }
+
+ character = value.charAt(index);
+ currentMarker = null;
+
+ if (!indented) {
+ if (LIST_UNORDERED_MARKERS[character] === true) {
+ currentMarker = character;
+ index++;
+ size++;
+ } else {
+ queue = '';
+
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (!decimal(character)) {
+ break;
+ }
+
+ queue += character;
+ index++;
+ }
+
+ character = value.charAt(index);
+ index++;
+
+ if (queue && markers[character] === true) {
+ currentMarker = character;
+ size += queue.length + 1;
+ }
+ }
+
+ if (currentMarker) {
+ character = value.charAt(index);
+
+ if (character === C_TAB) {
+ size += TAB_SIZE - (size % TAB_SIZE);
+ index++;
+ } else if (character === C_SPACE) {
+ end = index + TAB_SIZE;
+
+ while (index < end) {
+ if (value.charAt(index) !== C_SPACE) {
+ break;
+ }
+
+ index++;
+ size++;
+ }
+
+ if (index === end && value.charAt(index) === C_SPACE) {
+ index -= TAB_SIZE - 1;
+ size -= TAB_SIZE - 1;
+ }
+ } else if (character !== C_NEWLINE && character !== '') {
+ currentMarker = null;
+ }
+ }
+ }
+
+ if (currentMarker) {
+ if (!pedantic && marker !== currentMarker) {
+ break;
+ }
+
+ prefixed = true;
+ } else {
+ if (!commonmark && !indented && value.charAt(startIndex) === C_SPACE) {
+ indented = true;
+ } else if (commonmark && item) {
+ indented = size >= item.indent || size > TAB_SIZE;
+ }
+
+ prefixed = false;
+ index = startIndex;
+ }
+
+ line = value.slice(startIndex, nextIndex);
+ content = startIndex === index ? line : value.slice(index, nextIndex);
+
+ if (
+ currentMarker === C_ASTERISK ||
+ currentMarker === C_UNDERSCORE ||
+ currentMarker === C_DASH
+ ) {
+ if (tokenizers.thematicBreak.call(self, eat, line, true)) {
+ break;
+ }
+ }
+
+ prevEmpty = empty;
+ empty = !trim(content).length;
+
+ if (indented && item) {
+ item.value = item.value.concat(emptyLines, line);
+ allLines = allLines.concat(emptyLines, line);
+ emptyLines = [];
+ } else if (prefixed) {
+ if (emptyLines.length !== 0) {
+ item.value.push('');
+ item.trail = emptyLines.concat();
+ }
+
+ item = {
+ value: [line],
+ indent: size,
+ trail: []
+ };
+
+ items.push(item);
+ allLines = allLines.concat(emptyLines, line);
+ emptyLines = [];
+ } else if (empty) {
+ if (prevEmpty) {
+ break;
+ }
+
+ emptyLines.push(line);
+ } else {
+ if (prevEmpty) {
+ break;
+ }
+
+ if (interrupt(interuptors, tokenizers, self, [eat, line, true])) {
+ break;
+ }
+
+ item.value = item.value.concat(emptyLines, line);
+ allLines = allLines.concat(emptyLines, line);
+ emptyLines = [];
+ }
+
+ index = nextIndex + 1;
+ }
+
+ node = eat(allLines.join(C_NEWLINE)).reset({
+ type: 'list',
+ ordered: ordered,
+ start: start,
+ loose: null,
+ children: []
+ });
+
+ enterTop = self.enterList();
+ exitBlockquote = self.enterBlock();
+ isLoose = false;
+ index = -1;
+ length = items.length;
+
+ while (++index < length) {
+ item = items[index].value.join(C_NEWLINE);
+ now = eat.now();
+
+ item = eat(item)(listItem(self, item, now), node);
+
+ if (item.loose) {
+ isLoose = true;
+ }
+
+ item = items[index].trail.join(C_NEWLINE);
+
+ if (index !== length - 1) {
+ item += C_NEWLINE;
+ }
+
+ eat(item);
+ }
+
+ enterTop();
+ exitBlockquote();
+
+ node.loose = isLoose;
+
+ return node;
+}
+
+/**
+ * Create a list-item node.
+ *
+ * @example
+ * listItem('- _foo_', now());
+ *
+ * @param {Object} ctx - Parser.
+ * @param {Object} value - List-item.
+ * @param {Object} position - List-item location.
+ * @return {Object} - `listItem` node.
+ */
+function listItem(ctx, value, position) {
+ var offsets = ctx.offset;
+ var fn = ctx.options.pedantic ? pedanticListItem : normalListItem;
+ var checked = null;
+ var task;
+ var indent;
+
+ value = fn.apply(null, arguments);
+
+ if (ctx.options.gfm) {
+ task = value.match(EXPRESSION_TASK_ITEM);
+
+ if (task) {
+ indent = task[0].length;
+ checked = task[1].toLowerCase() === C_X_LOWER;
+ offsets[position.line] += indent;
+ value = value.slice(indent);
+ }
+ }
+
+ return {
+ type: 'listItem',
+ loose: EXPRESSION_LOOSE_LIST_ITEM.test(value) ||
+ value.charAt(value.length - 1) === C_NEWLINE,
+ checked: checked,
+ children: ctx.tokenizeBlock(value, position)
+ };
+}
+
+/* Create a list-item using overly simple mechanics. */
+function pedanticListItem(ctx, value, position) {
+ var offsets = ctx.offset;
+ var line = position.line;
+
+ /* Remove the list-item’s bullet. */
+ value = value.replace(EXPRESSION_PEDANTIC_BULLET, replacer);
+
+ /* The initial line was also matched by the below, so
+ * we reset the `line`. */
+ line = position.line;
+
+ return value.replace(EXPRESSION_INITIAL_INDENT, replacer);
+
+ /* A simple replacer which removed all matches,
+ * and adds their length to `offset`. */
+ function replacer($0) {
+ offsets[line] = (offsets[line] || 0) + $0.length;
+ line++;
+
+ return '';
+ }
+}
+
+/* Create a list-item using sane mechanics. */
+function normalListItem(ctx, value, position) {
+ var offsets = ctx.offset;
+ var line = position.line;
+ var max;
+ var bullet;
+ var rest;
+ var lines;
+ var trimmedLines;
+ var index;
+ var length;
+
+ /* Remove the list-item’s bullet. */
+ value = value.replace(EXPRESSION_BULLET, replacer);
+
+ lines = value.split(C_NEWLINE);
+
+ trimmedLines = removeIndent(value, getIndent(max).indent).split(C_NEWLINE);
+
+ /* We replaced the initial bullet with something
+ * else above, which was used to trick
+ * `removeIndentation` into removing some more
+ * characters when possible. However, that could
+ * result in the initial line to be stripped more
+ * than it should be. */
+ trimmedLines[0] = rest;
+
+ offsets[line] = (offsets[line] || 0) + bullet.length;
+ line++;
+
+ index = 0;
+ length = lines.length;
+
+ while (++index < length) {
+ offsets[line] = (offsets[line] || 0) +
+ lines[index].length - trimmedLines[index].length;
+ line++;
+ }
+
+ return trimmedLines.join(C_NEWLINE);
+
+ function replacer($0, $1, $2, $3, $4) {
+ bullet = $1 + $2 + $3;
+ rest = $4;
+
+ /* Make sure that the first nine numbered list items
+ * can indent with an extra space. That is, when
+ * the bullet did not receive an extra final space. */
+ if (Number($2) < 10 && bullet.length % 2 === 1) {
+ $2 = C_SPACE + $2;
+ }
+
+ max = $1 + repeat(C_SPACE, $2.length) + $3;
+
+ return max + rest;
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/newline.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/newline.js
new file mode 100644
index 0000000000..f710e0ef97
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/newline.js
@@ -0,0 +1,55 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:tokenize:newline
+ * @fileoverview Tokenise a newline.
+ */
+
+'use strict';
+
+var whitespace = require('is-whitespace-character');
+
+module.exports = newline;
+
+/* Tokenise newline. */
+function newline(eat, value, silent) {
+ var character = value.charAt(0);
+ var length;
+ var subvalue;
+ var queue;
+ var index;
+
+ if (character !== '\n') {
+ return;
+ }
+
+ /* istanbul ignore if - never used (yet) */
+ if (silent) {
+ return true;
+ }
+
+ index = 1;
+ length = value.length;
+ subvalue = character;
+ queue = '';
+
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (!whitespace(character)) {
+ break;
+ }
+
+ queue += character;
+
+ if (character === '\n') {
+ subvalue += queue;
+ queue = '';
+ }
+
+ index++;
+ }
+
+ eat(subvalue);
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/paragraph.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/paragraph.js
new file mode 100644
index 0000000000..7d064522ff
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/paragraph.js
@@ -0,0 +1,130 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:tokenize:paragraph
+ * @fileoverview Tokenise a paragraph.
+ */
+
+'use strict';
+
+var trim = require('trim');
+var decimal = require('is-decimal');
+var trimTrailingLines = require('trim-trailing-lines');
+var interrupt = require('../util/interrupt');
+
+module.exports = paragraph;
+
+var C_NEWLINE = '\n';
+var C_TAB = '\t';
+var C_SPACE = ' ';
+
+var TAB_SIZE = 4;
+
+/* Tokenise paragraph. */
+function paragraph(eat, value, silent) {
+ var self = this;
+ var settings = self.options;
+ var commonmark = settings.commonmark;
+ var gfm = settings.gfm;
+ var tokenizers = self.blockTokenizers;
+ var interruptors = self.interruptParagraph;
+ var index = value.indexOf(C_NEWLINE);
+ var length = value.length;
+ var position;
+ var subvalue;
+ var character;
+ var size;
+ var now;
+
+ while (index < length) {
+ /* Eat everything if there’s no following newline. */
+ if (index === -1) {
+ index = length;
+ break;
+ }
+
+ /* Stop if the next character is NEWLINE. */
+ if (value.charAt(index + 1) === C_NEWLINE) {
+ break;
+ }
+
+ /* In commonmark-mode, following indented lines
+ * are part of the paragraph. */
+ if (commonmark) {
+ size = 0;
+ position = index + 1;
+
+ while (position < length) {
+ character = value.charAt(position);
+
+ if (character === C_TAB) {
+ size = TAB_SIZE;
+ break;
+ } else if (character === C_SPACE) {
+ size++;
+ } else {
+ break;
+ }
+
+ position++;
+ }
+
+ if (size >= TAB_SIZE) {
+ index = value.indexOf(C_NEWLINE, index + 1);
+ continue;
+ }
+ }
+
+ subvalue = value.slice(index + 1);
+
+ /* Check if the following code contains a possible
+ * block. */
+ if (interrupt(interruptors, tokenizers, self, [eat, subvalue, true])) {
+ break;
+ }
+
+ /* Break if the following line starts a list, when
+ * already in a list, or when in commonmark, or when
+ * in gfm mode and the bullet is *not* numeric. */
+ if (
+ tokenizers.list.call(self, eat, subvalue, true) &&
+ (
+ self.inList ||
+ commonmark ||
+ (gfm && !decimal(trim.left(subvalue).charAt(0)))
+ )
+ ) {
+ break;
+ }
+
+ position = index;
+ index = value.indexOf(C_NEWLINE, index + 1);
+
+ if (index !== -1 && trim(value.slice(position, index)) === '') {
+ index = position;
+ break;
+ }
+ }
+
+ subvalue = value.slice(0, index);
+
+ if (trim(subvalue) === '') {
+ eat(subvalue);
+
+ return null;
+ }
+
+ /* istanbul ignore if - never used (yet) */
+ if (silent) {
+ return true;
+ }
+
+ now = eat.now();
+ subvalue = trimTrailingLines(subvalue);
+
+ return eat(subvalue)({
+ type: 'paragraph',
+ children: self.tokenizeInline(subvalue, now)
+ });
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/reference.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/reference.js
new file mode 100644
index 0000000000..1fa150d9e6
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/reference.js
@@ -0,0 +1,219 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:tokenize:reference
+ * @fileoverview Tokenise a reference.
+ */
+
+'use strict';
+
+var whitespace = require('is-whitespace-character');
+var locate = require('../locate/link');
+var normalize = require('../util/normalize');
+
+module.exports = reference;
+reference.locator = locate;
+
+var T_LINK = 'link';
+var T_IMAGE = 'image';
+var T_FOOTNOTE = 'footnote';
+var REFERENCE_TYPE_SHORTCUT = 'shortcut';
+var REFERENCE_TYPE_COLLAPSED = 'collapsed';
+var REFERENCE_TYPE_FULL = 'full';
+var C_CARET = '^';
+var C_BACKSLASH = '\\';
+var C_BRACKET_OPEN = '[';
+var C_BRACKET_CLOSE = ']';
+
+/* Tokenise a reference. */
+function reference(eat, value, silent) {
+ var self = this;
+ var character = value.charAt(0);
+ var index = 0;
+ var length = value.length;
+ var subvalue = '';
+ var intro = '';
+ var type = T_LINK;
+ var referenceType = REFERENCE_TYPE_SHORTCUT;
+ var content;
+ var identifier;
+ var now;
+ var node;
+ var exit;
+ var queue;
+ var bracketed;
+ var depth;
+
+ /* Check whether we’re eating an image. */
+ if (character === '!') {
+ type = T_IMAGE;
+ intro = character;
+ character = value.charAt(++index);
+ }
+
+ if (character !== C_BRACKET_OPEN) {
+ return;
+ }
+
+ index++;
+ intro += character;
+ queue = '';
+
+ /* Check whether we’re eating a footnote. */
+ if (
+ self.options.footnotes &&
+ type === T_LINK &&
+ value.charAt(index) === C_CARET
+ ) {
+ intro += C_CARET;
+ index++;
+ type = T_FOOTNOTE;
+ }
+
+ /* Eat the text. */
+ depth = 0;
+
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (character === C_BRACKET_OPEN) {
+ bracketed = true;
+ depth++;
+ } else if (character === C_BRACKET_CLOSE) {
+ if (!depth) {
+ break;
+ }
+
+ depth--;
+ }
+
+ if (character === C_BACKSLASH) {
+ queue += C_BACKSLASH;
+ character = value.charAt(++index);
+ }
+
+ queue += character;
+ index++;
+ }
+
+ subvalue = queue;
+ content = queue;
+ character = value.charAt(index);
+
+ if (character !== C_BRACKET_CLOSE) {
+ return;
+ }
+
+ index++;
+ subvalue += character;
+ queue = '';
+
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (!whitespace(character)) {
+ break;
+ }
+
+ queue += character;
+ index++;
+ }
+
+ character = value.charAt(index);
+
+ if (character === C_BRACKET_OPEN) {
+ identifier = '';
+ queue += character;
+ index++;
+
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (character === C_BRACKET_OPEN || character === C_BRACKET_CLOSE) {
+ break;
+ }
+
+ if (character === C_BACKSLASH) {
+ identifier += C_BACKSLASH;
+ character = value.charAt(++index);
+ }
+
+ identifier += character;
+ index++;
+ }
+
+ character = value.charAt(index);
+
+ if (character === C_BRACKET_CLOSE) {
+ referenceType = identifier ? REFERENCE_TYPE_FULL : REFERENCE_TYPE_COLLAPSED;
+ queue += identifier + character;
+ index++;
+ } else {
+ identifier = '';
+ }
+
+ subvalue += queue;
+ queue = '';
+ } else {
+ if (!content) {
+ return;
+ }
+
+ identifier = content;
+ }
+
+ /* Brackets cannot be inside the identifier. */
+ if (referenceType !== REFERENCE_TYPE_FULL && bracketed) {
+ return;
+ }
+
+ /* Inline footnotes cannot have an identifier. */
+ if (type === T_FOOTNOTE && referenceType !== REFERENCE_TYPE_SHORTCUT) {
+ type = T_LINK;
+ intro = C_BRACKET_OPEN + C_CARET;
+ content = C_CARET + content;
+ }
+
+ subvalue = intro + subvalue;
+
+ if (type === T_LINK && self.inLink) {
+ return null;
+ }
+
+ /* istanbul ignore if - never used (yet) */
+ if (silent) {
+ return true;
+ }
+
+ if (type === T_FOOTNOTE && content.indexOf(' ') !== -1) {
+ return eat(subvalue)({
+ type: 'footnote',
+ children: this.tokenizeInline(content, eat.now())
+ });
+ }
+
+ now = eat.now();
+ now.column += intro.length;
+ now.offset += intro.length;
+ identifier = referenceType === REFERENCE_TYPE_FULL ? identifier : content;
+
+ node = {
+ type: type + 'Reference',
+ identifier: normalize(identifier)
+ };
+
+ if (type === T_LINK || type === T_IMAGE) {
+ node.referenceType = referenceType;
+ }
+
+ if (type === T_LINK) {
+ exit = self.enterLink();
+ node.children = self.tokenizeInline(content, now);
+ exit();
+ } else if (type === T_IMAGE) {
+ node.alt = self.decode.raw(self.unescape(content), now) || null;
+ }
+
+ return eat(subvalue)(node);
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/strong.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/strong.js
new file mode 100644
index 0000000000..765993fa0b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/strong.js
@@ -0,0 +1,93 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:tokenize:strong
+ * @fileoverview Tokenise strong.
+ */
+
+'use strict';
+
+var trim = require('trim');
+var whitespace = require('is-whitespace-character');
+var locate = require('../locate/strong');
+
+module.exports = strong;
+strong.locator = locate;
+
+var C_ASTERISK = '*';
+var C_UNDERSCORE = '_';
+
+/* Tokenise strong. */
+function strong(eat, value, silent) {
+ var self = this;
+ var index = 0;
+ var character = value.charAt(index);
+ var now;
+ var pedantic;
+ var marker;
+ var queue;
+ var subvalue;
+ var length;
+ var prev;
+
+ if (
+ (character !== C_ASTERISK && character !== C_UNDERSCORE) ||
+ value.charAt(++index) !== character
+ ) {
+ return;
+ }
+
+ pedantic = self.options.pedantic;
+ marker = character;
+ subvalue = marker + marker;
+ length = value.length;
+ index++;
+ queue = '';
+ character = '';
+
+ if (pedantic && whitespace(value.charAt(index))) {
+ return;
+ }
+
+ while (index < length) {
+ prev = character;
+ character = value.charAt(index);
+
+ if (
+ character === marker &&
+ value.charAt(index + 1) === marker &&
+ (!pedantic || !whitespace(prev))
+ ) {
+ character = value.charAt(index + 2);
+
+ if (character !== marker) {
+ if (!trim(queue)) {
+ return;
+ }
+
+ /* istanbul ignore if - never used (yet) */
+ if (silent) {
+ return true;
+ }
+
+ now = eat.now();
+ now.column += 2;
+ now.offset += 2;
+
+ return eat(subvalue + queue + subvalue)({
+ type: 'strong',
+ children: self.tokenizeInline(queue, now)
+ });
+ }
+ }
+
+ if (!pedantic && character === '\\') {
+ queue += character;
+ character = value.charAt(++index);
+ }
+
+ queue += character;
+ index++;
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/table.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/table.js
new file mode 100644
index 0000000000..c440067e10
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/table.js
@@ -0,0 +1,276 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:tokenize:table
+ * @fileoverview Tokenise a table.
+ */
+
+'use strict';
+
+var whitespace = require('is-whitespace-character');
+
+module.exports = table;
+table.notInList = true;
+
+var C_BACKSLASH = '\\';
+var C_TICK = '`';
+var C_DASH = '-';
+var C_PIPE = '|';
+var C_COLON = ':';
+var C_SPACE = ' ';
+var C_NEWLINE = '\n';
+var C_TAB = '\t';
+
+var MIN_TABLE_COLUMNS = 1;
+var MIN_TABLE_ROWS = 2;
+
+var TABLE_ALIGN_LEFT = 'left';
+var TABLE_ALIGN_CENTER = 'center';
+var TABLE_ALIGN_RIGHT = 'right';
+var TABLE_ALIGN_NONE = null;
+
+/* Tokenise a table. */
+function table(eat, value, silent) {
+ var self = this;
+ var index;
+ var alignments;
+ var alignment;
+ var subvalue;
+ var row;
+ var length;
+ var lines;
+ var queue;
+ var character;
+ var hasDash;
+ var align;
+ var cell;
+ var preamble;
+ var count;
+ var opening;
+ var now;
+ var position;
+ var lineCount;
+ var line;
+ var rows;
+ var table;
+ var lineIndex;
+ var pipeIndex;
+ var first;
+
+ /* Exit when not in gfm-mode. */
+ if (!self.options.gfm) {
+ return;
+ }
+
+ /* Get the rows.
+ * Detecting tables soon is hard, so there are some
+ * checks for performance here, such as the minimum
+ * number of rows, and allowed characters in the
+ * alignment row. */
+ index = 0;
+ lineCount = 0;
+ length = value.length + 1;
+ lines = [];
+
+ while (index < length) {
+ lineIndex = value.indexOf(C_NEWLINE, index);
+ pipeIndex = value.indexOf(C_PIPE, index + 1);
+
+ if (lineIndex === -1) {
+ lineIndex = value.length;
+ }
+
+ if (pipeIndex === -1 || pipeIndex > lineIndex) {
+ if (lineCount < MIN_TABLE_ROWS) {
+ return;
+ }
+
+ break;
+ }
+
+ lines.push(value.slice(index, lineIndex));
+ lineCount++;
+ index = lineIndex + 1;
+ }
+
+ /* Parse the alignment row. */
+ subvalue = lines.join(C_NEWLINE);
+ alignments = lines.splice(1, 1)[0] || [];
+ index = 0;
+ length = alignments.length;
+ lineCount--;
+ alignment = false;
+ align = [];
+
+ while (index < length) {
+ character = alignments.charAt(index);
+
+ if (character === C_PIPE) {
+ hasDash = null;
+
+ if (alignment === false) {
+ if (first === false) {
+ return;
+ }
+ } else {
+ align.push(alignment);
+ alignment = false;
+ }
+
+ first = false;
+ } else if (character === C_DASH) {
+ hasDash = true;
+ alignment = alignment || TABLE_ALIGN_NONE;
+ } else if (character === C_COLON) {
+ if (alignment === TABLE_ALIGN_LEFT) {
+ alignment = TABLE_ALIGN_CENTER;
+ } else if (hasDash && alignment === TABLE_ALIGN_NONE) {
+ alignment = TABLE_ALIGN_RIGHT;
+ } else {
+ alignment = TABLE_ALIGN_LEFT;
+ }
+ } else if (!whitespace(character)) {
+ return;
+ }
+
+ index++;
+ }
+
+ if (alignment !== false) {
+ align.push(alignment);
+ }
+
+ /* Exit when without enough columns. */
+ if (align.length < MIN_TABLE_COLUMNS) {
+ return;
+ }
+
+ /* istanbul ignore if - never used (yet) */
+ if (silent) {
+ return true;
+ }
+
+ /* Parse the rows. */
+ position = -1;
+ rows = [];
+
+ table = eat(subvalue).reset({
+ type: 'table',
+ align: align,
+ children: rows
+ });
+
+ while (++position < lineCount) {
+ line = lines[position];
+ row = {type: 'tableRow', children: []};
+
+ /* Eat a newline character when this is not the
+ * first row. */
+ if (position) {
+ eat(C_NEWLINE);
+ }
+
+ /* Eat the row. */
+ eat(line).reset(row, table);
+
+ length = line.length + 1;
+ index = 0;
+ queue = '';
+ cell = '';
+ preamble = true;
+ count = null;
+ opening = null;
+
+ while (index < length) {
+ character = line.charAt(index);
+
+ if (character === C_TAB || character === C_SPACE) {
+ if (cell) {
+ queue += character;
+ } else {
+ eat(character);
+ }
+
+ index++;
+ continue;
+ }
+
+ if (character === '' || character === C_PIPE) {
+ if (preamble) {
+ eat(character);
+ } else {
+ if (character && opening) {
+ queue += character;
+ index++;
+ continue;
+ }
+
+ if ((cell || character) && !preamble) {
+ subvalue = cell;
+
+ if (queue.length > 1) {
+ if (character) {
+ subvalue += queue.slice(0, queue.length - 1);
+ queue = queue.charAt(queue.length - 1);
+ } else {
+ subvalue += queue;
+ queue = '';
+ }
+ }
+
+ now = eat.now();
+
+ eat(subvalue)({
+ type: 'tableCell',
+ children: self.tokenizeInline(cell, now)
+ }, row);
+ }
+
+ eat(queue + character);
+
+ queue = '';
+ cell = '';
+ }
+ } else {
+ if (queue) {
+ cell += queue;
+ queue = '';
+ }
+
+ cell += character;
+
+ if (character === C_BACKSLASH && index !== length - 2) {
+ cell += line.charAt(index + 1);
+ index++;
+ }
+
+ if (character === C_TICK) {
+ count = 1;
+
+ while (line.charAt(index + 1) === character) {
+ cell += character;
+ index++;
+ count++;
+ }
+
+ if (!opening) {
+ opening = count;
+ } else if (count >= opening) {
+ opening = 0;
+ }
+ }
+ }
+
+ preamble = false;
+ index++;
+ }
+
+ /* Eat the alignment row. */
+ if (!position) {
+ eat(C_NEWLINE + alignments);
+ }
+ }
+
+ return table;
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/text.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/text.js
new file mode 100644
index 0000000000..ef6d3f2879
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/text.js
@@ -0,0 +1,67 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:tokenize:text
+ * @fileoverview Tokenise text.
+ */
+
+'use strict';
+
+module.exports = text;
+
+/* Tokenise text. */
+function text(eat, value, silent) {
+ var self = this;
+ var methods;
+ var tokenizers;
+ var index;
+ var length;
+ var subvalue;
+ var position;
+ var tokenizer;
+ var name;
+ var min;
+ var now;
+
+ /* istanbul ignore if - never used (yet) */
+ if (silent) {
+ return true;
+ }
+
+ methods = self.inlineMethods;
+ length = methods.length;
+ tokenizers = self.inlineTokenizers;
+ index = -1;
+ min = value.length;
+
+ while (++index < length) {
+ name = methods[index];
+
+ if (name === 'text' || !tokenizers[name]) {
+ continue;
+ }
+
+ tokenizer = tokenizers[name].locator;
+
+ if (!tokenizer) {
+ eat.file.fail('Missing locator: `' + name + '`');
+ }
+
+ position = tokenizer.call(self, value, 1);
+
+ if (position !== -1 && position < min) {
+ min = position;
+ }
+ }
+
+ subvalue = value.slice(0, min);
+ now = eat.now();
+
+ self.decode(subvalue, now, function (content, position, source) {
+ eat(source || content)({
+ type: 'text',
+ value: content
+ });
+ });
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/thematic-break.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/thematic-break.js
new file mode 100644
index 0000000000..a580d09fe0
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/thematic-break.js
@@ -0,0 +1,79 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:tokenize:thematic-break
+ * @fileoverview Tokenise a thematic break.
+ */
+
+'use strict';
+
+module.exports = thematicBreak;
+
+var C_NEWLINE = '\n';
+var C_TAB = '\t';
+var C_SPACE = ' ';
+var C_ASTERISK = '*';
+var C_UNDERSCORE = '_';
+var C_DASH = '-';
+
+var THEMATIC_BREAK_MARKER_COUNT = 3;
+
+/* Tokenise a thematic break. */
+function thematicBreak(eat, value, silent) {
+ var index = -1;
+ var length = value.length + 1;
+ var subvalue = '';
+ var character;
+ var marker;
+ var markerCount;
+ var queue;
+
+ while (++index < length) {
+ character = value.charAt(index);
+
+ if (character !== C_TAB && character !== C_SPACE) {
+ break;
+ }
+
+ subvalue += character;
+ }
+
+ if (
+ character !== C_ASTERISK &&
+ character !== C_DASH &&
+ character !== C_UNDERSCORE
+ ) {
+ return;
+ }
+
+ marker = character;
+ subvalue += character;
+ markerCount = 1;
+ queue = '';
+
+ while (++index < length) {
+ character = value.charAt(index);
+
+ if (character === marker) {
+ markerCount++;
+ subvalue += queue + marker;
+ queue = '';
+ } else if (character === C_SPACE) {
+ queue += character;
+ } else if (
+ markerCount >= THEMATIC_BREAK_MARKER_COUNT &&
+ (!character || character === C_NEWLINE)
+ ) {
+ subvalue += queue;
+
+ if (silent) {
+ return true;
+ }
+
+ return eat(subvalue)({type: 'thematicBreak'});
+ } else {
+ return;
+ }
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/url.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/url.js
new file mode 100644
index 0000000000..fd2debd32f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/url.js
@@ -0,0 +1,153 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:tokenize:url
+ * @fileoverview Tokenise a URL.
+ */
+
+'use strict';
+
+var decode = require('parse-entities');
+var whitespace = require('is-whitespace-character');
+var locate = require('../locate/url');
+
+module.exports = url;
+url.locator = locate;
+url.notInLink = true;
+
+var C_BRACKET_OPEN = '[';
+var C_BRACKET_CLOSE = ']';
+var C_PAREN_OPEN = '(';
+var C_PAREN_CLOSE = ')';
+var C_LT = '<';
+var C_AT_SIGN = '@';
+
+var HTTP_PROTOCOL = 'http://';
+var HTTPS_PROTOCOL = 'https://';
+var MAILTO_PROTOCOL = 'mailto:';
+
+var PROTOCOLS = [
+ HTTP_PROTOCOL,
+ HTTPS_PROTOCOL,
+ MAILTO_PROTOCOL
+];
+
+var PROTOCOLS_LENGTH = PROTOCOLS.length;
+
+/* Tokenise a URL. */
+function url(eat, value, silent) {
+ var self = this;
+ var subvalue;
+ var content;
+ var character;
+ var index;
+ var position;
+ var protocol;
+ var match;
+ var length;
+ var queue;
+ var parenCount;
+ var nextCharacter;
+ var exit;
+
+ if (!self.options.gfm) {
+ return;
+ }
+
+ subvalue = '';
+ index = -1;
+ length = PROTOCOLS_LENGTH;
+
+ while (++index < length) {
+ protocol = PROTOCOLS[index];
+ match = value.slice(0, protocol.length);
+
+ if (match.toLowerCase() === protocol) {
+ subvalue = match;
+ break;
+ }
+ }
+
+ if (!subvalue) {
+ return;
+ }
+
+ index = subvalue.length;
+ length = value.length;
+ queue = '';
+ parenCount = 0;
+
+ while (index < length) {
+ character = value.charAt(index);
+
+ if (whitespace(character) || character === C_LT) {
+ break;
+ }
+
+ if (
+ character === '.' ||
+ character === ',' ||
+ character === ':' ||
+ character === ';' ||
+ character === '"' ||
+ character === '\'' ||
+ character === ')' ||
+ character === ']'
+ ) {
+ nextCharacter = value.charAt(index + 1);
+
+ if (!nextCharacter || whitespace(nextCharacter)) {
+ break;
+ }
+ }
+
+ if (character === C_PAREN_OPEN || character === C_BRACKET_OPEN) {
+ parenCount++;
+ }
+
+ if (character === C_PAREN_CLOSE || character === C_BRACKET_CLOSE) {
+ parenCount--;
+
+ if (parenCount < 0) {
+ break;
+ }
+ }
+
+ queue += character;
+ index++;
+ }
+
+ if (!queue) {
+ return;
+ }
+
+ subvalue += queue;
+ content = subvalue;
+
+ if (protocol === MAILTO_PROTOCOL) {
+ position = queue.indexOf(C_AT_SIGN);
+
+ if (position === -1 || position === length - 1) {
+ return;
+ }
+
+ content = content.substr(MAILTO_PROTOCOL.length);
+ }
+
+ /* istanbul ignore if - never used (yet) */
+ if (silent) {
+ return true;
+ }
+
+ exit = self.enterLink();
+ content = self.tokenizeInline(content, eat.now());
+ exit();
+
+ return eat(subvalue)({
+ type: 'link',
+ title: null,
+ url: decode(subvalue),
+ children: content
+ });
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/yaml.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/yaml.js
new file mode 100644
index 0000000000..78dec31a0f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenize/yaml.js
@@ -0,0 +1,74 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:tokenize:yaml
+ * @fileoverview Tokenise YAML.
+ */
+
+'use strict';
+
+module.exports = yaml;
+yaml.onlyAtStart = true;
+
+var FENCE = '---';
+var C_DASH = '-';
+var C_NEWLINE = '\n';
+
+/* Tokenise YAML. */
+function yaml(eat, value, silent) {
+ var self = this;
+ var subvalue;
+ var content;
+ var index;
+ var length;
+ var character;
+ var queue;
+
+ if (
+ !self.options.yaml ||
+ value.charAt(0) !== C_DASH ||
+ value.charAt(1) !== C_DASH ||
+ value.charAt(2) !== C_DASH ||
+ value.charAt(3) !== C_NEWLINE
+ ) {
+ return;
+ }
+
+ subvalue = FENCE + C_NEWLINE;
+ content = '';
+ queue = '';
+ index = 3;
+ length = value.length;
+
+ while (++index < length) {
+ character = value.charAt(index);
+
+ if (
+ character === C_DASH &&
+ (queue || !content) &&
+ value.charAt(index + 1) === C_DASH &&
+ value.charAt(index + 2) === C_DASH
+ ) {
+ /* istanbul ignore if - never used (yet) */
+ if (silent) {
+ return true;
+ }
+
+ subvalue += queue + FENCE;
+
+ return eat(subvalue)({
+ type: 'yaml',
+ value: content
+ });
+ }
+
+ if (character === C_NEWLINE) {
+ queue += character;
+ } else {
+ subvalue += queue + character;
+ content += queue + character;
+ queue = '';
+ }
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenizer.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenizer.js
new file mode 100644
index 0000000000..aefe551fc3
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/tokenizer.js
@@ -0,0 +1,451 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:tokenizer
+ * @fileoverview Markdown tokenizer.
+ */
+
+'use strict';
+
+module.exports = factory;
+
+var MERGEABLE_NODES = {
+ text: mergeText,
+ blockquote: mergeBlockquote
+};
+
+/* Check whether a node is mergeable with adjacent nodes. */
+function mergeable(node) {
+ var start;
+ var end;
+
+ if (node.type !== 'text' || !node.position) {
+ return true;
+ }
+
+ start = node.position.start;
+ end = node.position.end;
+
+ /* Only merge nodes which occupy the same size as their
+ * `value`. */
+ return start.line !== end.line ||
+ end.column - start.column === node.value.length;
+}
+
+/* Merge two text nodes: `node` into `prev`. */
+function mergeText(prev, node) {
+ prev.value += node.value;
+
+ return prev;
+}
+
+/* Merge two blockquotes: `node` into `prev`, unless in
+ * CommonMark mode. */
+function mergeBlockquote(prev, node) {
+ if (this.options.commonmark) {
+ return node;
+ }
+
+ prev.children = prev.children.concat(node.children);
+
+ return prev;
+}
+
+/* Construct a tokenizer. This creates both
+ * `tokenizeInline` and `tokenizeBlock`. */
+function factory(type) {
+ return tokenize;
+
+ /* Tokenizer for a bound `type`. */
+ function tokenize(value, location) {
+ var self = this;
+ var offset = self.offset;
+ var tokens = [];
+ var methods = self[type + 'Methods'];
+ var tokenizers = self[type + 'Tokenizers'];
+ var line = location.line;
+ var column = location.column;
+ var index;
+ var length;
+ var method;
+ var name;
+ var matched;
+ var valueLength;
+
+ /* Trim white space only lines. */
+ if (!value) {
+ return tokens;
+ }
+
+ /* Expose on `eat`. */
+ eat.now = now;
+ eat.file = self.file;
+
+ /* Sync initial offset. */
+ updatePosition('');
+
+ /* Iterate over `value`, and iterate over all
+ * tokenizers. When one eats something, re-iterate
+ * with the remaining value. If no tokenizer eats,
+ * something failed (should not happen) and an
+ * exception is thrown. */
+ while (value) {
+ index = -1;
+ length = methods.length;
+ matched = false;
+
+ while (++index < length) {
+ name = methods[index];
+ method = tokenizers[name];
+
+ if (
+ method &&
+ (!method.onlyAtStart || self.atStart) &&
+ (!method.notInList || !self.inList) &&
+ (!method.notInBlock || !self.inBlock) &&
+ (!method.notInLink || !self.inLink)
+ ) {
+ valueLength = value.length;
+
+ method.apply(self, [eat, value]);
+
+ matched = valueLength !== value.length;
+
+ if (matched) {
+ break;
+ }
+ }
+ }
+
+ /* istanbul ignore if */
+ if (!matched) {
+ self.file.fail(new Error('Infinite loop'), eat.now());
+ }
+ }
+
+ self.eof = now();
+
+ return tokens;
+
+ /**
+ * Update line, column, and offset based on
+ * `value`.
+ *
+ * @example
+ * updatePosition('foo');
+ *
+ * @param {string} subvalue - Subvalue to eat.
+ */
+ function updatePosition(subvalue) {
+ var lastIndex = -1;
+ var index = subvalue.indexOf('\n');
+
+ while (index !== -1) {
+ line++;
+ lastIndex = index;
+ index = subvalue.indexOf('\n', index + 1);
+ }
+
+ if (lastIndex === -1) {
+ column += subvalue.length;
+ } else {
+ column = subvalue.length - lastIndex;
+ }
+
+ if (line in offset) {
+ if (lastIndex !== -1) {
+ column += offset[line];
+ } else if (column <= offset[line]) {
+ column = offset[line] + 1;
+ }
+ }
+ }
+
+ /**
+ * Get offset. Called before the first character is
+ * eaten to retrieve the range's offsets.
+ *
+ * @return {Function} - `done`, to be called when
+ * the last character is eaten.
+ */
+ function getOffset() {
+ var indentation = [];
+ var pos = line + 1;
+
+ /**
+ * Done. Called when the last character is
+ * eaten to retrieve the range’s offsets.
+ *
+ * @return {Array.<number>} - Offset.
+ */
+ return function () {
+ var last = line + 1;
+
+ while (pos < last) {
+ indentation.push((offset[pos] || 0) + 1);
+
+ pos++;
+ }
+
+ return indentation;
+ };
+ }
+
+ /**
+ * Get the current position.
+ *
+ * @example
+ * position = now(); // {line: 1, column: 1, offset: 0}
+ *
+ * @return {Object} - Current Position.
+ */
+ function now() {
+ var pos = {line: line, column: column};
+
+ pos.offset = self.toOffset(pos);
+
+ return pos;
+ }
+
+ /**
+ * Store position information for a node.
+ *
+ * @example
+ * start = now();
+ * updatePosition('foo');
+ * location = new Position(start);
+ * // {
+ * // start: {line: 1, column: 1, offset: 0},
+ * // end: {line: 1, column: 3, offset: 2}
+ * // }
+ *
+ * @param {Object} start - Starting position.
+ */
+ function Position(start) {
+ this.start = start;
+ this.end = now();
+ }
+
+ /**
+ * Throw when a value is incorrectly eaten.
+ * This shouldn’t happen but will throw on new,
+ * incorrect rules.
+ *
+ * @example
+ * // When the current value is set to `foo bar`.
+ * validateEat('foo');
+ * eat('foo');
+ *
+ * validateEat('bar');
+ * // throws, because the space is not eaten.
+ *
+ * @param {string} subvalue - Value to be eaten.
+ * @throws {Error} - When `subvalue` cannot be eaten.
+ */
+ function validateEat(subvalue) {
+ /* istanbul ignore if */
+ if (value.substring(0, subvalue.length) !== subvalue) {
+ /* Capture stack-trace. */
+ self.file.fail(
+ new Error(
+ 'Incorrectly eaten value: please report this ' +
+ 'warning on http://git.io/vg5Ft'
+ ),
+ now()
+ );
+ }
+ }
+
+ /**
+ * Mark position and patch `node.position`.
+ *
+ * @example
+ * var update = position();
+ * updatePosition('foo');
+ * update({});
+ * // {
+ * // position: {
+ * // start: {line: 1, column: 1, offset: 0},
+ * // end: {line: 1, column: 3, offset: 2}
+ * // }
+ * // }
+ *
+ * @returns {Function} - Updater.
+ */
+ function position() {
+ var before = now();
+
+ return update;
+
+ /**
+ * Add the position to a node.
+ *
+ * @example
+ * update({type: 'text', value: 'foo'});
+ *
+ * @param {Node} node - Node to attach position
+ * on.
+ * @param {Array} [indent] - Indentation for
+ * `node`.
+ * @return {Node} - `node`.
+ */
+ function update(node, indent) {
+ var prev = node.position;
+ var start = prev ? prev.start : before;
+ var combined = [];
+ var n = prev && prev.end.line;
+ var l = before.line;
+
+ node.position = new Position(start);
+
+ /* If there was already a `position`, this
+ * node was merged. Fixing `start` wasn’t
+ * hard, but the indent is different.
+ * Especially because some information, the
+ * indent between `n` and `l` wasn’t
+ * tracked. Luckily, that space is
+ * (should be?) empty, so we can safely
+ * check for it now. */
+ if (prev && indent && prev.indent) {
+ combined = prev.indent;
+
+ if (n < l) {
+ while (++n < l) {
+ combined.push((offset[n] || 0) + 1);
+ }
+
+ combined.push(before.column);
+ }
+
+ indent = combined.concat(indent);
+ }
+
+ node.position.indent = indent || [];
+
+ return node;
+ }
+ }
+
+ /**
+ * Add `node` to `parent`s children or to `tokens`.
+ * Performs merges where possible.
+ *
+ * @example
+ * add({});
+ *
+ * add({}, {children: []});
+ *
+ * @param {Object} node - Node to add.
+ * @param {Object} [parent] - Parent to insert into.
+ * @return {Object} - Added or merged into node.
+ */
+ function add(node, parent) {
+ var children = parent ? parent.children : tokens;
+ var prev = children[children.length - 1];
+
+ if (
+ prev &&
+ node.type === prev.type &&
+ node.type in MERGEABLE_NODES &&
+ mergeable(prev) &&
+ mergeable(node)
+ ) {
+ node = MERGEABLE_NODES[node.type].call(self, prev, node);
+ }
+
+ if (node !== prev) {
+ children.push(node);
+ }
+
+ if (self.atStart && tokens.length !== 0) {
+ self.exitStart();
+ }
+
+ return node;
+ }
+
+ /**
+ * Remove `subvalue` from `value`.
+ * `subvalue` must be at the start of `value`.
+ *
+ * @example
+ * eat('foo')({type: 'text', value: 'foo'});
+ *
+ * @param {string} subvalue - Removed from `value`,
+ * and passed to `updatePosition`.
+ * @return {Function} - Wrapper around `add`, which
+ * also adds `position` to node.
+ */
+ function eat(subvalue) {
+ var indent = getOffset();
+ var pos = position();
+ var current = now();
+
+ validateEat(subvalue);
+
+ apply.reset = reset;
+ reset.test = test;
+ apply.test = test;
+
+ value = value.substring(subvalue.length);
+
+ updatePosition(subvalue);
+
+ indent = indent();
+
+ return apply;
+
+ /**
+ * Add the given arguments, add `position` to
+ * the returned node, and return the node.
+ *
+ * @param {Object} node - Node to add.
+ * @param {Object} [parent] - Node to insert into.
+ * @return {Node} - Added node.
+ */
+ function apply(node, parent) {
+ return pos(add(pos(node), parent), indent);
+ }
+
+ /**
+ * Functions just like apply, but resets the
+ * content: the line and column are reversed,
+ * and the eaten value is re-added.
+ *
+ * This is useful for nodes with a single
+ * type of content, such as lists and tables.
+ *
+ * See `apply` above for what parameters are
+ * expected.
+ *
+ * @return {Node} - Added node.
+ */
+ function reset() {
+ var node = apply.apply(null, arguments);
+
+ line = current.line;
+ column = current.column;
+ value = subvalue + value;
+
+ return node;
+ }
+
+ /**
+ * Test the position, after eating, and reverse
+ * to a not-eaten state.
+ *
+ * @return {Position} - Position after eating `subvalue`.
+ */
+ function test() {
+ var result = pos({});
+
+ line = current.line;
+ column = current.column;
+ value = subvalue + value;
+
+ return result.position;
+ }
+ }
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/unescape.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/unescape.js
new file mode 100644
index 0000000000..dc83486126
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/unescape.js
@@ -0,0 +1,46 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:unescape
+ * @fileoverview Unescape escapes.
+ */
+
+'use strict';
+
+/* Expose. */
+module.exports = factory;
+
+/* Factory to de-escape a value, based on a list at `key`
+ * in `ctx`. */
+function factory(ctx, key) {
+ return unescape;
+
+ /* De-escape a string using the expression at `key`
+ * in `ctx`. */
+ function unescape(value) {
+ var prev = 0;
+ var index = value.indexOf('\\');
+ var escape = ctx[key];
+ var queue = [];
+ var character;
+
+ while (index !== -1) {
+ queue.push(value.slice(prev, index));
+ prev = index + 1;
+ character = value.charAt(prev);
+
+ /* If the following character is not a valid escape,
+ * add the slash. */
+ if (!character || escape.indexOf(character) === -1) {
+ queue.push('\\');
+ }
+
+ index = value.indexOf('\\', prev);
+ }
+
+ queue.push(value.slice(prev));
+
+ return queue.join('');
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/util/get-indentation.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/util/get-indentation.js
new file mode 100644
index 0000000000..eebd40c94a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/util/get-indentation.js
@@ -0,0 +1,46 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:util:get-indentation
+ * @fileoverview Get indentation.
+ */
+
+'use strict';
+
+/* Expose. */
+module.exports = indentation;
+
+/* Map of characters, and their column length,
+ * which can be used as indentation. */
+var characters = {' ': 1, '\t': 4};
+
+/**
+ * Gets indentation information for a line.
+ *
+ * @param {string} value - Indented line.
+ * @return {Object} - Indetation information.
+ */
+function indentation(value) {
+ var index = 0;
+ var indent = 0;
+ var character = value.charAt(index);
+ var stops = {};
+ var size;
+
+ while (character in characters) {
+ size = characters[character];
+
+ indent += size;
+
+ if (size > 1) {
+ indent = Math.floor(indent / size) * size;
+ }
+
+ stops[indent] = index;
+
+ character = value.charAt(++index);
+ }
+
+ return {indent: indent, stops: stops};
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/util/html.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/util/html.js
new file mode 100644
index 0000000000..234ba342e1
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/util/html.js
@@ -0,0 +1,33 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:util:html
+ * @fileoverview HTML regexes.
+ */
+
+'use strict';
+
+var attributeName = '[a-zA-Z_:][a-zA-Z0-9:._-]*';
+var unquoted = '[^"\'=<>`\\u0000-\\u0020]+';
+var singleQuoted = '\'[^\']*\'';
+var doubleQuoted = '"[^"]*"';
+var attributeValue = '(?:' + unquoted + '|' + singleQuoted + '|' + doubleQuoted + ')';
+var attribute = '(?:\\s+' + attributeName + '(?:\\s*=\\s*' + attributeValue + ')?)';
+var openTag = '<[A-Za-z][A-Za-z0-9\\-]*' + attribute + '*\\s*\\/?>';
+var closeTag = '<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>';
+var comment = '<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->';
+var processing = '<[?].*?[?]>';
+var declaration = '<![A-Za-z]+\\s+[^>]*>';
+var cdata = '<!\\[CDATA\\[[\\s\\S]*?\\]\\]>';
+
+exports.openCloseTag = new RegExp('^(?:' + openTag + '|' + closeTag + ')');
+
+exports.tag = new RegExp('^(?:' +
+ openTag + '|' +
+ closeTag + '|' +
+ comment + '|' +
+ processing + '|' +
+ declaration + '|' +
+ cdata +
+')');
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/util/interrupt.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/util/interrupt.js
new file mode 100644
index 0000000000..b8dc230550
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/util/interrupt.js
@@ -0,0 +1,51 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:util:get-indentation
+ * @fileoverview Get indentation.
+ */
+
+'use strict';
+
+module.exports = interrupt;
+
+function interrupt(interruptors, tokenizers, ctx, params) {
+ var bools = ['pedantic', 'commonmark'];
+ var count = bools.length;
+ var length = interruptors.length;
+ var index = -1;
+ var interruptor;
+ var config;
+ var fn;
+ var offset;
+ var bool;
+ var ignore;
+
+ while (++index < length) {
+ interruptor = interruptors[index];
+ config = interruptor[1] || {};
+ fn = interruptor[0];
+ offset = -1;
+ ignore = false;
+
+ while (++offset < count) {
+ bool = bools[offset];
+
+ if (config[bool] !== undefined && config[bool] !== ctx.options[bool]) {
+ ignore = true;
+ break;
+ }
+ }
+
+ if (ignore) {
+ continue;
+ }
+
+ if (tokenizers[fn].apply(ctx, params)) {
+ return true;
+ }
+ }
+
+ return false;
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/util/normalize.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/util/normalize.js
new file mode 100644
index 0000000000..3602a18f78
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/util/normalize.js
@@ -0,0 +1,29 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:util:normalize
+ * @fileoverview Normalize an identifier.
+ */
+
+'use strict';
+
+/* Dependencies. */
+var collapseWhiteSpace = require('collapse-white-space');
+
+/* Expose. */
+module.exports = normalize;
+
+/**
+ * Normalize an identifier. Collapses multiple white space
+ * characters into a single space, and removes casing.
+ *
+ * @example
+ * normalizeIdentifier('FOO\t bar'); // 'foo bar'
+ *
+ * @param {string} value - Content to normalize.
+ * @return {string} - Normalized content.
+ */
+function normalize(value) {
+ return collapseWhiteSpace(value).toLowerCase();
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/lib/util/remove-indentation.js b/tools/node_modules/eslint/node_modules/remark-parse/lib/util/remove-indentation.js
new file mode 100644
index 0000000000..d56db0bad4
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/lib/util/remove-indentation.js
@@ -0,0 +1,102 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module remark:parse:util:remove-indentation
+ * @fileoverview Remove indentation.
+ */
+
+'use strict';
+
+/* Dependencies. */
+var trim = require('trim');
+var repeat = require('repeat-string');
+var getIndent = require('./get-indentation');
+
+/* Expose. */
+module.exports = indentation;
+
+/* Characters. */
+var C_SPACE = ' ';
+var C_NEWLINE = '\n';
+var C_TAB = '\t';
+
+/**
+ * Remove the minimum indent from every line in `value`.
+ * Supports both tab, spaced, and mixed indentation (as
+ * well as possible).
+ *
+ * @example
+ * removeIndentation(' foo'); // 'foo'
+ * removeIndentation(' foo', 2); // ' foo'
+ * removeIndentation('\tfoo', 2); // ' foo'
+ * removeIndentation(' foo\n bar'); // ' foo\n bar'
+ *
+ * @param {string} value - Value to trim.
+ * @param {number?} [maximum] - Maximum indentation
+ * to remove.
+ * @return {string} - Unindented `value`.
+ */
+function indentation(value, maximum) {
+ var values = value.split(C_NEWLINE);
+ var position = values.length + 1;
+ var minIndent = Infinity;
+ var matrix = [];
+ var index;
+ var indentation;
+ var stops;
+ var padding;
+
+ values.unshift(repeat(C_SPACE, maximum) + '!');
+
+ while (position--) {
+ indentation = getIndent(values[position]);
+
+ matrix[position] = indentation.stops;
+
+ if (trim(values[position]).length === 0) {
+ continue;
+ }
+
+ if (indentation.indent) {
+ if (indentation.indent > 0 && indentation.indent < minIndent) {
+ minIndent = indentation.indent;
+ }
+ } else {
+ minIndent = Infinity;
+
+ break;
+ }
+ }
+
+ if (minIndent !== Infinity) {
+ position = values.length;
+
+ while (position--) {
+ stops = matrix[position];
+ index = minIndent;
+
+ while (index && !(index in stops)) {
+ index--;
+ }
+
+ if (
+ trim(values[position]).length !== 0 &&
+ minIndent &&
+ index !== minIndent
+ ) {
+ padding = C_TAB;
+ } else {
+ padding = '';
+ }
+
+ values[position] = padding + values[position].slice(
+ index in stops ? stops[index] + 1 : 0
+ );
+ }
+ }
+
+ values.shift();
+
+ return values.join(C_NEWLINE);
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/package.json b/tools/node_modules/eslint/node_modules/remark-parse/package.json
new file mode 100644
index 0000000000..a2d48dbdee
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/package.json
@@ -0,0 +1,86 @@
+{
+ "_from": "remark-parse@^3.0.0",
+ "_id": "remark-parse@3.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-G5+EGkTY9PvyJGhQJlRZpOs1TIA=",
+ "_location": "/remark-parse",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "remark-parse@^3.0.0",
+ "name": "remark-parse",
+ "escapedName": "remark-parse",
+ "rawSpec": "^3.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^3.0.0"
+ },
+ "_requiredBy": [
+ "/eslint-plugin-markdown"
+ ],
+ "_resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-3.0.1.tgz",
+ "_shasum": "1b9f841a44d8f4fbf2246850265459a4eb354c80",
+ "_spec": "remark-parse@^3.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/eslint-plugin-markdown",
+ "author": {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ },
+ "bugs": {
+ "url": "https://github.com/wooorm/remark/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ },
+ {
+ "name": "Eugene Sharygin",
+ "email": "eush77@gmail.com"
+ }
+ ],
+ "dependencies": {
+ "collapse-white-space": "^1.0.2",
+ "has": "^1.0.1",
+ "is-alphabetical": "^1.0.0",
+ "is-decimal": "^1.0.0",
+ "is-whitespace-character": "^1.0.0",
+ "is-word-character": "^1.0.0",
+ "markdown-escapes": "^1.0.0",
+ "parse-entities": "^1.0.2",
+ "repeat-string": "^1.5.4",
+ "state-toggle": "^1.0.0",
+ "trim": "0.0.1",
+ "trim-trailing-lines": "^1.0.0",
+ "unherit": "^1.0.4",
+ "unist-util-remove-position": "^1.0.0",
+ "vfile-location": "^2.0.0",
+ "xtend": "^4.0.1"
+ },
+ "deprecated": false,
+ "description": "Markdown parser for remark",
+ "files": [
+ "index.js",
+ "lib"
+ ],
+ "homepage": "http://remark.js.org",
+ "keywords": [
+ "markdown",
+ "abstract",
+ "syntax",
+ "tree",
+ "ast",
+ "parse"
+ ],
+ "license": "MIT",
+ "name": "remark-parse",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/wooorm/remark/tree/master/packages/remark-parse"
+ },
+ "version": "3.0.1",
+ "xo": false
+}
diff --git a/tools/node_modules/eslint/node_modules/remark-parse/readme.md b/tools/node_modules/eslint/node_modules/remark-parse/readme.md
new file mode 100644
index 0000000000..53426f41ee
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/remark-parse/readme.md
@@ -0,0 +1,448 @@
+# remark-parse [![Build Status][build-badge]][build-status] [![Coverage Status][coverage-badge]][coverage-status] [![Chat][chat-badge]][chat]
+
+[Parser][] for [**unified**][unified]. Parses markdown to an
+[**MDAST**][mdast] syntax tree. Used in the [**remark**
+processor][processor]. Can be [extended][extend] to change how
+markdown is parsed.
+
+## Installation
+
+[npm][]:
+
+```sh
+npm install remark-parse
+```
+
+## Usage
+
+```js
+var unified = require('unified');
+var createStream = require('unified-stream');
+var markdown = require('remark-parse');
+var html = require('remark-html');
+
+var processor = unified()
+ .use(markdown, {commonmark: true})
+ .use(html)
+
+process.stdin
+ .pipe(createStream(processor))
+ .pipe(process.stdout);
+```
+
+## Table of Contents
+
+* [API](#api)
+ * [processor.use(parse)](#processoruseparse)
+ * [parse.Parser](#parseparser)
+* [Extending the Parser](#extending-the-parser)
+ * [Parser#blockTokenizers](#parserblocktokenizers)
+ * [Parser#blockMethods](#parserblockmethods)
+ * [Parser#inlineTokenizers](#parserinlinetokenizers)
+ * [Parser#inlineMethods](#parserinlinemethods)
+ * [function tokenizer(eat, value, silent)](#function-tokenizereat-value-silent)
+ * [tokenizer.locator(value, fromIndex)](#tokenizerlocatorvalue-fromindex)
+ * [eat(subvalue)](#eatsubvalue)
+ * [add(node\[, parent\])](#addnode-parent)
+ * [add.test()](#addtest)
+ * [add.reset(node\[, parent\])](#addresetnode-parent)
+* [License](#license)
+
+## API
+
+### `processor.use(parse)`
+
+Configure the `processor` to read markdown as input and process an
+[**MDAST**][mdast] syntax tree.
+
+#### `options`
+
+Options are passed later through [`processor.parse()`][parse],
+[`processor.process()`][process], or [`processor.pipe()`][pipe].
+The following settings are supported:
+
+* [`gfm`][options-gfm] (`boolean`, default: `true`)
+* [`yaml`][options-yaml] (`boolean`, default: `true`)
+* [`commonmark`][options-commonmark] (`boolean`, default: `false`)
+* [`footnotes`][options-footnotes] (`boolean`, default: `false`)
+* [`pedantic`][options-pedantic] (`boolean`, default: `false`)
+* [`breaks`][options-breaks] (`boolean`, default: `false`)
+* [`blocks`][options-blocks] (`Array.<string>`, default: list of block HTML
+ elements)
+
+##### `options.gfm`
+
+```md
+hello ~~hi~~ world
+```
+
+GFM mode (default: `true`) turns on:
+
+* [Fenced code blocks](https://help.github.com/articles/github-flavored-markdown/#fenced-code-blocks)
+* [Autolinking of URLs](https://help.github.com/articles/github-flavored-markdown/#url-autolinking)
+* [Deletions (strikethrough)](https://help.github.com/articles/github-flavored-markdown/#strikethrough)
+* [Task lists](https://help.github.com/articles/writing-on-github/#task-lists)
+* [Tables](https://help.github.com/articles/github-flavored-markdown/#tables)
+
+##### `options.yaml`
+
+```md
+---
+title: YAML is Cool
+---
+
+# YAML is Cool
+```
+
+YAML mode (default: `true`) enables raw YAML front matter to be detected
+at the top.
+
+##### `options.commonmark`
+
+```md
+This is a paragraph
+ and this is also part of the preceding paragraph.
+```
+
+CommonMark mode (default: `false`) allows:
+
+* Empty lines to split blockquotes
+* Parentheses (`(` and `)`) around for link and image titles
+* Any escaped [ASCII-punctuation][escapes] character
+* Closing parenthesis (`)`) as an ordered list marker
+* URL definitions (and footnotes, when enabled) in blockquotes
+
+CommonMark mode disallows:
+
+* Code directly following a paragraph
+* ATX-headings (`# Hash headings`) without spacing after opening hashes
+ or and before closing hashes
+* Setext headings (`Underline headings\n---`) when following a paragraph
+* Newlines in link and image titles
+* White space in link and image URLs in auto-links (links in brackets,
+ `<` and `>`)
+* Lazy blockquote continuation, lines not preceded by a closing angle
+ bracket (`>`), for lists, code, and thematicBreak
+
+##### `options.footnotes`
+
+```md
+Something something[^or something?].
+
+And something else[^1].
+
+[^1]: This reference footnote contains a paragraph...
+
+ * ...and a list
+```
+
+Footnotes mode (default: `false`) enables reference footnotes and inline
+footnotes. Both are wrapped in square brackets and preceded by a caret
+(`^`), and can be referenced from inside other footnotes.
+
+##### `options.breaks`
+
+```md
+This is a
+paragraph.
+```
+
+Breaks mode (default: `false`) exposes newline characters inside
+paragraphs as breaks.
+
+##### `options.blocks`
+
+```md
+<block>foo
+</block>
+```
+
+Blocks (default: a list of HTML block elements) exposes
+let’s users define block-level HTML elements.
+
+##### `options.pedantic`
+
+```md
+Check out some_file_name.txt
+```
+
+Pedantic mode (default: `false`) turns on:
+
+* Emphasis (`_alpha_`) and importance (`__bravo__`) with underscores
+ in words
+* Unordered lists with different markers (`*`, `-`, `+`)
+* If `commonmark` is also turned on, ordered lists with different
+ markers (`.`, `)`)
+* And pedantic mode removes less spaces in list-items (at most four,
+ instead of the whole indent)
+
+### `parse.Parser`
+
+Access to the [parser][], if you need it.
+
+## Extending the Parser
+
+Most often, using transformers to manipulate a syntax tree produces
+the desired output. Sometimes, mainly when introducing new syntactic
+entities with a certain level of precedence, interfacing with the parser
+is necessary.
+
+If this plug-in is used, it adds a [`Parser`][parser] constructor to
+the `processor`. Other plug-ins can add tokenizers to the parser’s
+prototype to change how markdown is parsed.
+
+The below plug-in adds a [tokenizer][] for at-mentions.
+
+```js
+module.exports = mentions;
+
+function mentions() {
+ var Parser = this.Parser;
+ var tokenizers = Parser.prototype.inlineTokenizers;
+ var methods = Parser.prototype.inlineMethods;
+
+ /* Add an inline tokenizer (defined in the following example). */
+ tokenizers.mention = tokenizeMention;
+
+ /* Run it just before `text`. */
+ methods.splice(methods.indexOf('text'), 0, 'mention');
+}
+```
+
+### `Parser#blockTokenizers`
+
+An object mapping tokenizer names to [tokenizer][]s. These
+tokenizers (for example: `fencedCode`, `table`, and `paragraph`) eat
+from the start of a value to a line ending.
+
+### `Parser#blockMethods`
+
+Array of `blockTokenizers` names (`string`) specifying the order in
+which they run.
+
+### `Parser#inlineTokenizers`
+
+An object mapping tokenizer names to [tokenizer][]s. These tokenizers
+(for example: `url`, `reference`, and `emphasis`) eat from the start
+of a value. To increase performance, they depend on [locator][]s.
+
+### `Parser#inlineMethods`
+
+Array of `inlineTokenizers` names (`string`) specifying the order in
+which they run.
+
+### `function tokenizer(eat, value, silent)`
+
+```js
+tokenizeMention.notInLink = true;
+tokenizeMention.locator = locateMention;
+
+function tokenizeMention(eat, value, silent) {
+ var match = /^@(\w+)/.exec(value);
+
+ if (match) {
+ if (silent) {
+ return true;
+ }
+
+ return eat(match[0])({
+ type: 'link',
+ url: 'https://social-network/' + match[1],
+ children: [{type: 'text', value: match[0]}]
+ });
+ }
+}
+```
+
+The parser knows two types of tokenizers: block level and inline level.
+Block level tokenizers are the same as inline level tokenizers, with
+the exception that the latter must have a [locator][].
+
+Tokenizers _test_ whether a document starts with a certain syntactic
+entity. In _silent_ mode, they return whether that test passes.
+In _normal_ mode, they consume that token, a process which is called
+“eating”. Locators enable tokenizers to function faster by providing
+information on where the next entity may occur.
+
+###### Signatures
+
+* `Node? = tokenizer(eat, value)`
+* `boolean? = tokenizer(eat, value, silent)`
+
+###### Parameters
+
+* `eat` ([`Function`][eat]) — Eat, when applicable, an entity
+* `value` (`string`) — Value which may start an entity
+* `silent` (`boolean`, optional) — Whether to detect or consume
+
+###### Properties
+
+* `locator` ([`Function`][locator])
+ — Required for inline tokenizers
+* `onlyAtStart` (`boolean`)
+ — Whether nodes can only be found at the beginning of the document
+* `notInBlock` (`boolean`)
+ — Whether nodes cannot be in blockquotes, lists, or footnote
+ definitions
+* `notInList` (`boolean`)
+ — Whether nodes cannot be in lists
+* `notInLink` (`boolean`)
+ — Whether nodes cannot be in links
+
+###### Returns
+
+* In _silent_ mode, whether a node can be found at the start of `value`
+* In _normal_ mode, a node if it can be found at the start of `value`
+
+### `tokenizer.locator(value, fromIndex)`
+
+```js
+function locateMention(value, fromIndex) {
+ return value.indexOf('@', fromIndex);
+}
+```
+
+Locators are required for inline tokenization to keep the process
+performant. Locators enable inline tokenizers to function faster by
+providing information on the where the next entity occurs. Locators
+may be wrong, it’s OK if there actually isn’t a node to be found at
+the index they return, but they must skip any nodes.
+
+###### Parameters
+
+* `value` (`string`) — Value which may contain an entity
+* `fromIndex` (`number`) — Position to start searching at
+
+###### Returns
+
+Index at which an entity may start, and `-1` otherwise.
+
+### `eat(subvalue)`
+
+```js
+var add = eat('foo');
+```
+
+Eat `subvalue`, which is a string at the start of the
+[tokenize][tokenizer]d `value` (it’s tracked to ensure the correct
+value is eaten).
+
+###### Parameters
+
+* `subvalue` (`string`) - Value to eat.
+
+###### Returns
+
+[`add`][add].
+
+### `add(node[, parent])`
+
+```js
+var add = eat('foo');
+add({type: 'text', value: 'foo'});
+```
+
+Add [positional information][location] to `node` and add it to `parent`.
+
+###### Parameters
+
+* `node` ([`Node`][node]) - Node to patch position on and insert
+* `parent` ([`Node`][node], optional) - Place to add `node` to in
+ the syntax tree. Defaults to the currently processed node
+
+###### Returns
+
+The given `node`.
+
+### `add.test()`
+
+Get the [positional information][location] which would be patched on
+`node` by `add`.
+
+###### Returns
+
+[`Location`][location].
+
+### `add.reset(node[, parent])`
+
+`add`, but resets the internal location. Useful for example in
+lists, where the same content is first eaten for a list, and later
+for list items
+
+###### Parameters
+
+* `node` ([`Node`][node]) - Node to patch position on and insert
+* `parent` ([`Node`][node], optional) - Place to add `node` to in
+ the syntax tree. Defaults to the currently processed node
+
+###### Returns
+
+The given `node`.
+
+## License
+
+[MIT][license] © [Titus Wormer][author]
+
+<!-- Definitions -->
+
+[build-badge]: https://img.shields.io/travis/wooorm/remark.svg
+
+[build-status]: https://travis-ci.org/wooorm/remark
+
+[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/remark.svg
+
+[coverage-status]: https://codecov.io/github/wooorm/remark
+
+[chat-badge]: https://img.shields.io/gitter/room/wooorm/remark.svg
+
+[chat]: https://gitter.im/wooorm/remark
+
+[license]: https://github.com/wooorm/remark/blob/master/LICENSE
+
+[author]: http://wooorm.com
+
+[npm]: https://docs.npmjs.com/cli/install
+
+[unified]: https://github.com/wooorm/unified
+
+[parse]: https://github.com/wooorm/unified#processorparsefilevalue-options
+
+[process]: https://github.com/wooorm/unified#processorprocessfilevalue-options-done
+
+[pipe]: https://github.com/wooorm/unified#processorpipestream-options
+
+[processor]: https://github.com/wooorm/remark/blob/master/packages/remark
+
+[mdast]: https://github.com/wooorm/mdast
+
+[escapes]: http://spec.commonmark.org/0.25/#backslash-escapes
+
+[node]: https://github.com/wooorm/unist#node
+
+[location]: https://github.com/wooorm/unist#location
+
+[options-gfm]: #optionsgfm
+
+[options-yaml]: #optionsyaml
+
+[options-commonmark]: #optionscommonmark
+
+[options-footnotes]: #optionsfootnotes
+
+[options-pedantic]: #optionspedantic
+
+[options-breaks]: #optionsbreaks
+
+[options-blocks]: #optionsblocks
+
+[parser]: https://github.com/wooorm/unified#processorparser
+
+[extend]: #extending-the-parser
+
+[tokenizer]: #function-tokenizereat-value-silent
+
+[locator]: #tokenizerlocatorvalue-fromindex
+
+[eat]: #eatsubvalue
+
+[add]: #addnode-parent
diff --git a/tools/node_modules/eslint/node_modules/repeat-string/LICENSE b/tools/node_modules/eslint/node_modules/repeat-string/LICENSE
new file mode 100644
index 0000000000..39245ac1c6
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/repeat-string/README.md b/tools/node_modules/eslint/node_modules/repeat-string/README.md
new file mode 100644
index 0000000000..aaa5e91c7a
--- /dev/null
+++ b/tools/node_modules/eslint/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**<br/> |
+| --- | --- |
+| 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/tools/node_modules/eslint/node_modules/repeat-string/index.js b/tools/node_modules/eslint/node_modules/repeat-string/index.js
new file mode 100644
index 0000000000..4459afd801
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/repeat-string/index.js
@@ -0,0 +1,70 @@
+/*!
+ * repeat-string <https://github.com/jonschlinkert/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/tools/node_modules/eslint/node_modules/repeat-string/package.json b/tools/node_modules/eslint/node_modules/repeat-string/package.json
new file mode 100644
index 0000000000..0e558a8707
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/repeat-string/package.json
@@ -0,0 +1,128 @@
+{
+ "_from": "repeat-string@^1.5.4",
+ "_id": "repeat-string@1.6.1",
+ "_inBundle": false,
+ "_integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=",
+ "_location": "/repeat-string",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "repeat-string@^1.5.4",
+ "name": "repeat-string",
+ "escapedName": "repeat-string",
+ "rawSpec": "^1.5.4",
+ "saveSpec": null,
+ "fetchSpec": "^1.5.4"
+ },
+ "_requiredBy": [
+ "/remark-parse"
+ ],
+ "_resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
+ "_shasum": "8dcae470e1c88abc2d600fff4a776286da75e637",
+ "_spec": "repeat-string@^1.5.4",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/remark-parse",
+ "author": {
+ "name": "Jon Schlinkert",
+ "url": "http://github.com/jonschlinkert"
+ },
+ "bugs": {
+ "url": "https://github.com/jonschlinkert/repeat-string/issues"
+ },
+ "bundleDependencies": false,
+ "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"
+ }
+ ],
+ "deprecated": false,
+ "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"
+ },
+ "engines": {
+ "node": ">=0.10"
+ },
+ "files": [
+ "index.js"
+ ],
+ "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",
+ "name": "repeat-string",
+ "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/tools/node_modules/eslint/node_modules/replace-ext/LICENSE b/tools/node_modules/eslint/node_modules/replace-ext/LICENSE
new file mode 100755
index 0000000000..fd38d69351
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/replace-ext/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Blaine Bublitz <blaine.bublitz@gmail.com>, Eric Schoffstall <yo@contra.io> and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/tools/node_modules/eslint/node_modules/replace-ext/README.md b/tools/node_modules/eslint/node_modules/replace-ext/README.md
new file mode 100644
index 0000000000..8775983b78
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/replace-ext/README.md
@@ -0,0 +1,50 @@
+<p align="center">
+ <a href="http://gulpjs.com">
+ <img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png">
+ </a>
+</p>
+
+# replace-ext
+
+[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url]
+
+Replaces a file extension with another one.
+
+## Usage
+
+```js
+var replaceExt = require('replace-ext');
+
+var path = '/some/dir/file.js';
+var newPath = replaceExt(path, '.coffee');
+
+console.log(newPath); // /some/dir/file.coffee
+```
+
+## API
+
+### `replaceExt(path, extension)`
+
+Replaces the extension from `path` with `extension` and returns the updated path string.
+
+Does not replace the extension if `path` is not a string or is empty.
+
+## License
+
+MIT
+
+[downloads-image]: http://img.shields.io/npm/dm/replace-ext.svg
+[npm-url]: https://www.npmjs.com/package/replace-ext
+[npm-image]: http://img.shields.io/npm/v/replace-ext.svg
+
+[travis-url]: https://travis-ci.org/gulpjs/replace-ext
+[travis-image]: http://img.shields.io/travis/gulpjs/replace-ext.svg?label=travis-ci
+
+[appveyor-url]: https://ci.appveyor.com/project/gulpjs/replace-ext
+[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/replace-ext.svg?label=appveyor
+
+[coveralls-url]: https://coveralls.io/r/gulpjs/replace-ext
+[coveralls-image]: http://img.shields.io/coveralls/gulpjs/replace-ext/master.svg
+
+[gitter-url]: https://gitter.im/gulpjs/gulp
+[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg
diff --git a/tools/node_modules/eslint/node_modules/replace-ext/index.js b/tools/node_modules/eslint/node_modules/replace-ext/index.js
new file mode 100644
index 0000000000..7cb7789e28
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/replace-ext/index.js
@@ -0,0 +1,18 @@
+'use strict';
+
+var path = require('path');
+
+function replaceExt(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);
+}
+
+module.exports = replaceExt;
diff --git a/tools/node_modules/eslint/node_modules/replace-ext/package.json b/tools/node_modules/eslint/node_modules/replace-ext/package.json
new file mode 100644
index 0000000000..f3508c9b94
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/replace-ext/package.json
@@ -0,0 +1,86 @@
+{
+ "_from": "replace-ext@1.0.0",
+ "_id": "replace-ext@1.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=",
+ "_location": "/replace-ext",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "replace-ext@1.0.0",
+ "name": "replace-ext",
+ "escapedName": "replace-ext",
+ "rawSpec": "1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "1.0.0"
+ },
+ "_requiredBy": [
+ "/vfile"
+ ],
+ "_resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz",
+ "_shasum": "de63128373fcbf7c3ccfa4de5a480c45a67958eb",
+ "_spec": "replace-ext@1.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/vfile",
+ "author": {
+ "name": "Gulp Team",
+ "email": "team@gulpjs.com",
+ "url": "http://gulpjs.com/"
+ },
+ "bugs": {
+ "url": "https://github.com/gulpjs/replace-ext/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Eric Schoffstall",
+ "email": "yo@contra.io"
+ },
+ {
+ "name": "Blaine Bublitz",
+ "email": "blaine.bublitz@gmail.com"
+ }
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Replaces a file extension with another one",
+ "devDependencies": {
+ "eslint": "^1.10.3",
+ "eslint-config-gulp": "^2.0.0",
+ "expect": "^1.16.0",
+ "istanbul": "^0.4.3",
+ "istanbul-coveralls": "^1.0.3",
+ "jscs": "^2.3.5",
+ "jscs-preset-gulp": "^1.0.0",
+ "mocha": "^2.4.5"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ },
+ "files": [
+ "LICENSE",
+ "index.js"
+ ],
+ "homepage": "https://github.com/gulpjs/replace-ext#readme",
+ "keywords": [
+ "gulp",
+ "extensions",
+ "filepath",
+ "basename"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "replace-ext",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/gulpjs/replace-ext.git"
+ },
+ "scripts": {
+ "cover": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly",
+ "coveralls": "npm run cover && istanbul-coveralls",
+ "lint": "eslint . && jscs index.js test/",
+ "pretest": "npm run lint",
+ "test": "mocha --async-only"
+ },
+ "version": "1.0.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/require-uncached/index.js b/tools/node_modules/eslint/node_modules/require-uncached/index.js
new file mode 100644
index 0000000000..63dfada3ec
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/require-uncached/index.js
@@ -0,0 +1,29 @@
+'use strict';
+var path = require('path');
+var resolveFrom = require('resolve-from');
+var callerPath = require('caller-path');
+
+module.exports = function (moduleId) {
+ if (typeof moduleId !== 'string') {
+ throw new TypeError('Expected a string');
+ }
+
+ var filePath = resolveFrom(path.dirname(callerPath()), moduleId);
+
+ // delete itself from module parent
+ if (require.cache[filePath] && require.cache[filePath].parent) {
+ var i = require.cache[filePath].parent.children.length;
+
+ while (i--) {
+ if (require.cache[filePath].parent.children[i].id === filePath) {
+ require.cache[filePath].parent.children.splice(i, 1);
+ }
+ }
+ }
+
+ // delete module from cache
+ delete require.cache[filePath];
+
+ // return fresh module
+ return require(filePath);
+};
diff --git a/tools/node_modules/eslint/node_modules/require-uncached/license b/tools/node_modules/eslint/node_modules/require-uncached/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/require-uncached/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/tools/node_modules/eslint/node_modules/require-uncached/package.json b/tools/node_modules/eslint/node_modules/require-uncached/package.json
new file mode 100644
index 0000000000..ea49c4321d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/require-uncached/package.json
@@ -0,0 +1,77 @@
+{
+ "_from": "require-uncached@^1.0.3",
+ "_id": "require-uncached@1.0.3",
+ "_inBundle": false,
+ "_integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=",
+ "_location": "/eslint/require-uncached",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "require-uncached@^1.0.3",
+ "name": "require-uncached",
+ "escapedName": "require-uncached",
+ "rawSpec": "^1.0.3",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.3"
+ },
+ "_requiredBy": [
+ "/eslint"
+ ],
+ "_resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz",
+ "_shasum": "4e0d56d6c9662fd31e43011c4b95aa49955421d3",
+ "_spec": "require-uncached@^1.0.3",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/require-uncached/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "caller-path": "^0.1.0",
+ "resolve-from": "^1.0.0"
+ },
+ "deprecated": false,
+ "description": "Require a module bypassing the cache",
+ "devDependencies": {
+ "ava": "*",
+ "heapdump": "^0.3.7",
+ "xo": "^0.16.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/require-uncached#readme",
+ "keywords": [
+ "require",
+ "cache",
+ "uncache",
+ "uncached",
+ "module",
+ "fresh",
+ "bypass"
+ ],
+ "license": "MIT",
+ "name": "require-uncached",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/require-uncached.git"
+ },
+ "scripts": {
+ "heapdump": "node heapdump.js",
+ "test": "xo && ava"
+ },
+ "version": "1.0.3",
+ "xo": {
+ "rules": {
+ "import/no-dynamic-require": "off"
+ }
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/require-uncached/readme.md b/tools/node_modules/eslint/node_modules/require-uncached/readme.md
new file mode 100644
index 0000000000..baa6cc2b39
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/require-uncached/readme.md
@@ -0,0 +1,47 @@
+# require-uncached [![Build Status](https://travis-ci.org/sindresorhus/require-uncached.svg?branch=master)](https://travis-ci.org/sindresorhus/require-uncached)
+
+> Require a module bypassing the [cache](https://nodejs.org/api/modules.html#modules_caching)
+
+Useful for testing purposes when you need to freshly require a module.
+
+
+## Install
+
+```
+$ npm install --save require-uncached
+```
+
+
+## Usage
+
+```js
+// foo.js
+let i = 0;
+module.exports = () => ++i;
+```
+
+```js
+const requireUncached = require('require-uncached');
+
+require('./foo')();
+//=> 1
+
+require('./foo')();
+//=> 2
+
+requireUncached('./foo')();
+//=> 1
+
+requireUncached('./foo')();
+//=> 1
+```
+
+
+## Related
+
+- [clear-require](https://github.com/sindresorhus/clear-require) - Clear a module from the require cache
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/tools/node_modules/eslint/node_modules/resolve-from/index.js b/tools/node_modules/eslint/node_modules/resolve-from/index.js
new file mode 100644
index 0000000000..9162f4acf3
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/resolve-from/index.js
@@ -0,0 +1,19 @@
+'use strict';
+var path = require('path');
+var Module = require('module');
+
+module.exports = function (fromDir, moduleId) {
+ if (typeof fromDir !== 'string' || typeof moduleId !== 'string') {
+ throw new TypeError('Expected `fromDir` and `moduleId` to be a string');
+ }
+
+ fromDir = path.resolve(fromDir);
+
+ var fromFile = path.join(fromDir, 'noop.js');
+
+ return Module._resolveFilename(moduleId, {
+ id: fromFile,
+ filename: fromFile,
+ paths: Module._nodeModulePaths(fromDir)
+ });
+};
diff --git a/tools/node_modules/eslint/node_modules/resolve-from/license b/tools/node_modules/eslint/node_modules/resolve-from/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/resolve-from/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/tools/node_modules/eslint/node_modules/resolve-from/package.json b/tools/node_modules/eslint/node_modules/resolve-from/package.json
new file mode 100644
index 0000000000..d6c0bbea90
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/resolve-from/package.json
@@ -0,0 +1,66 @@
+{
+ "_from": "resolve-from@^1.0.0",
+ "_id": "resolve-from@1.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=",
+ "_location": "/eslint/resolve-from",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "resolve-from@^1.0.0",
+ "name": "resolve-from",
+ "escapedName": "resolve-from",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/eslint/require-uncached"
+ ],
+ "_resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz",
+ "_shasum": "26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226",
+ "_spec": "resolve-from@^1.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/require-uncached",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/resolve-from/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Resolve the path of a module like require.resolve() but from a given path",
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/resolve-from#readme",
+ "keywords": [
+ "require",
+ "resolve",
+ "path",
+ "module",
+ "from",
+ "like",
+ "path"
+ ],
+ "license": "MIT",
+ "name": "resolve-from",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/resolve-from.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "1.0.1"
+}
diff --git a/tools/node_modules/eslint/node_modules/resolve-from/readme.md b/tools/node_modules/eslint/node_modules/resolve-from/readme.md
new file mode 100644
index 0000000000..80a240c487
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/resolve-from/readme.md
@@ -0,0 +1,56 @@
+# resolve-from [![Build Status](https://travis-ci.org/sindresorhus/resolve-from.svg?branch=master)](https://travis-ci.org/sindresorhus/resolve-from)
+
+> Resolve the path of a module like [`require.resolve()`](http://nodejs.org/api/globals.html#globals_require_resolve) but from a given path
+
+
+## Install
+
+```
+$ npm install --save resolve-from
+```
+
+
+## Usage
+
+```js
+const resolveFrom = require('resolve-from');
+
+// there's a file at `./foo/bar.js`
+
+resolveFrom('foo', './bar');
+//=> '/Users/sindresorhus/dev/test/foo/bar.js'
+```
+
+
+## API
+
+### resolveFrom(fromDir, moduleId)
+
+#### fromDir
+
+Type: `string`
+
+The directory to resolve from.
+
+#### moduleId
+
+Type: `string`
+
+What you would use in `require()`.
+
+
+## Tip
+
+Create a partial using a bound function if you want to require from the same `fromDir` multiple times:
+
+```js
+const resolveFromFoo = resolveFrom.bind(null, 'foo');
+
+resolveFromFoo('./bar');
+resolveFromFoo('./baz');
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/tools/node_modules/eslint/node_modules/restore-cursor/index.js b/tools/node_modules/eslint/node_modules/restore-cursor/index.js
new file mode 100644
index 0000000000..2b8e009883
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/restore-cursor/index.js
@@ -0,0 +1,9 @@
+'use strict';
+const onetime = require('onetime');
+const signalExit = require('signal-exit');
+
+module.exports = onetime(() => {
+ signalExit(() => {
+ process.stderr.write('\u001b[?25h');
+ }, {alwaysLast: true});
+});
diff --git a/tools/node_modules/eslint/node_modules/restore-cursor/license b/tools/node_modules/eslint/node_modules/restore-cursor/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/restore-cursor/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/tools/node_modules/eslint/node_modules/restore-cursor/package.json b/tools/node_modules/eslint/node_modules/restore-cursor/package.json
new file mode 100644
index 0000000000..c894cc3e68
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/restore-cursor/package.json
@@ -0,0 +1,76 @@
+{
+ "_from": "restore-cursor@^2.0.0",
+ "_id": "restore-cursor@2.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=",
+ "_location": "/eslint/restore-cursor",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "restore-cursor@^2.0.0",
+ "name": "restore-cursor",
+ "escapedName": "restore-cursor",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/eslint/cli-cursor"
+ ],
+ "_resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz",
+ "_shasum": "9f7ee287f82fd326d4fd162923d62129eee0dfaf",
+ "_spec": "restore-cursor@^2.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/cli-cursor",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/restore-cursor/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "onetime": "^2.0.0",
+ "signal-exit": "^3.0.2"
+ },
+ "deprecated": false,
+ "description": "Gracefully restore the CLI cursor on exit",
+ "engines": {
+ "node": ">=4"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/restore-cursor#readme",
+ "keywords": [
+ "exit",
+ "quit",
+ "process",
+ "graceful",
+ "shutdown",
+ "sigterm",
+ "sigint",
+ "terminate",
+ "kill",
+ "stop",
+ "cli",
+ "cursor",
+ "ansi",
+ "show",
+ "term",
+ "terminal",
+ "console",
+ "tty",
+ "shell",
+ "command-line"
+ ],
+ "license": "MIT",
+ "name": "restore-cursor",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/restore-cursor.git"
+ },
+ "version": "2.0.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/restore-cursor/readme.md b/tools/node_modules/eslint/node_modules/restore-cursor/readme.md
new file mode 100644
index 0000000000..a2f5afbc54
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/restore-cursor/readme.md
@@ -0,0 +1,25 @@
+# restore-cursor
+
+> Gracefully restore the CLI cursor on exit
+
+Prevent the cursor you've hidden interactively from remaining hidden if the process crashes.
+
+
+## Install
+
+```
+$ npm install --save restore-cursor
+```
+
+
+## Usage
+
+```js
+const restoreCursor = require('restore-cursor');
+restoreCursor();
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/tools/node_modules/eslint/node_modules/rimraf/LICENSE b/tools/node_modules/eslint/node_modules/rimraf/LICENSE
new file mode 100644
index 0000000000..19129e315f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/rimraf/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/tools/node_modules/eslint/node_modules/rimraf/README.md b/tools/node_modules/eslint/node_modules/rimraf/README.md
new file mode 100644
index 0000000000..423b8cf854
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/rimraf/README.md
@@ -0,0 +1,101 @@
+[![Build Status](https://travis-ci.org/isaacs/rimraf.svg?branch=master)](https://travis-ci.org/isaacs/rimraf) [![Dependency Status](https://david-dm.org/isaacs/rimraf.svg)](https://david-dm.org/isaacs/rimraf) [![devDependency Status](https://david-dm.org/isaacs/rimraf/dev-status.svg)](https://david-dm.org/isaacs/rimraf#info=devDependencies)
+
+The [UNIX command](http://en.wikipedia.org/wiki/Rm_(Unix)) `rm -rf` for node.
+
+Install with `npm install rimraf`, or just drop rimraf.js somewhere.
+
+## API
+
+`rimraf(f, [opts], callback)`
+
+The first parameter will be interpreted as a globbing pattern for files. If you
+want to disable globbing you can do so with `opts.disableGlob` (defaults to
+`false`). This might be handy, for instance, if you have filenames that contain
+globbing wildcard characters.
+
+The callback will be called with an error if there is one. Certain
+errors are handled for you:
+
+* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of
+ `opts.maxBusyTries` times before giving up, adding 100ms of wait
+ between each attempt. The default `maxBusyTries` is 3.
+* `ENOENT` - If the file doesn't exist, rimraf will return
+ successfully, since your desired outcome is already the case.
+* `EMFILE` - Since `readdir` requires opening a file descriptor, it's
+ possible to hit `EMFILE` if too many file descriptors are in use.
+ In the sync case, there's nothing to be done for this. But in the
+ async case, rimraf will gradually back off with timeouts up to
+ `opts.emfileWait` ms, which defaults to 1000.
+
+## options
+
+* unlink, chmod, stat, lstat, rmdir, readdir,
+ unlinkSync, chmodSync, statSync, lstatSync, rmdirSync, readdirSync
+
+ In order to use a custom file system library, you can override
+ specific fs functions on the options object.
+
+ If any of these functions are present on the options object, then
+ the supplied function will be used instead of the default fs
+ method.
+
+ Sync methods are only relevant for `rimraf.sync()`, of course.
+
+ For example:
+
+ ```javascript
+ var myCustomFS = require('some-custom-fs')
+
+ rimraf('some-thing', myCustomFS, callback)
+ ```
+
+* maxBusyTries
+
+ If an `EBUSY`, `ENOTEMPTY`, or `EPERM` error code is encountered
+ on Windows systems, then rimraf will retry with a linear backoff
+ wait of 100ms longer on each try. The default maxBusyTries is 3.
+
+ Only relevant for async usage.
+
+* emfileWait
+
+ If an `EMFILE` error is encountered, then rimraf will retry
+ repeatedly with a linear backoff of 1ms longer on each try, until
+ the timeout counter hits this max. The default limit is 1000.
+
+ If you repeatedly encounter `EMFILE` errors, then consider using
+ [graceful-fs](http://npm.im/graceful-fs) in your program.
+
+ Only relevant for async usage.
+
+* glob
+
+ Set to `false` to disable [glob](http://npm.im/glob) pattern
+ matching.
+
+ Set to an object to pass options to the glob module. The default
+ glob options are `{ nosort: true, silent: true }`.
+
+ Glob version 6 is used in this module.
+
+ Relevant for both sync and async usage.
+
+* disableGlob
+
+ Set to any non-falsey value to disable globbing entirely.
+ (Equivalent to setting `glob: false`.)
+
+## rimraf.sync
+
+It can remove stuff synchronously, too. But that's not so good. Use
+the async API. It's better.
+
+## CLI
+
+If installed with `npm install rimraf -g` it can be used as a global
+command `rimraf <path> [<path> ...]` which is useful for cross platform support.
+
+## mkdirp
+
+If you need to create a directory recursively, check out
+[mkdirp](https://github.com/substack/node-mkdirp).
diff --git a/tools/node_modules/eslint/node_modules/rimraf/bin.js b/tools/node_modules/eslint/node_modules/rimraf/bin.js
new file mode 100755
index 0000000000..0d1e17be70
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/rimraf/bin.js
@@ -0,0 +1,50 @@
+#!/usr/bin/env node
+
+var rimraf = require('./')
+
+var help = false
+var dashdash = false
+var noglob = false
+var args = process.argv.slice(2).filter(function(arg) {
+ if (dashdash)
+ return !!arg
+ else if (arg === '--')
+ dashdash = true
+ else if (arg === '--no-glob' || arg === '-G')
+ noglob = true
+ else if (arg === '--glob' || arg === '-g')
+ noglob = false
+ else if (arg.match(/^(-+|\/)(h(elp)?|\?)$/))
+ help = true
+ else
+ return !!arg
+})
+
+if (help || args.length === 0) {
+ // If they didn't ask for help, then this is not a "success"
+ var log = help ? console.log : console.error
+ log('Usage: rimraf <path> [<path> ...]')
+ log('')
+ log(' Deletes all files and folders at "path" recursively.')
+ log('')
+ log('Options:')
+ log('')
+ log(' -h, --help Display this usage info')
+ log(' -G, --no-glob Do not expand glob patterns in arguments')
+ log(' -g, --glob Expand glob patterns in arguments (default)')
+ process.exit(help ? 0 : 1)
+} else
+ go(0)
+
+function go (n) {
+ if (n >= args.length)
+ return
+ var options = {}
+ if (noglob)
+ options = { glob: false }
+ rimraf(args[n], options, function (er) {
+ if (er)
+ throw er
+ go(n+1)
+ })
+}
diff --git a/tools/node_modules/eslint/node_modules/rimraf/package.json b/tools/node_modules/eslint/node_modules/rimraf/package.json
new file mode 100644
index 0000000000..65e50e0f57
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/rimraf/package.json
@@ -0,0 +1,64 @@
+{
+ "_from": "rimraf@^2.2.8",
+ "_id": "rimraf@2.6.2",
+ "_inBundle": false,
+ "_integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==",
+ "_location": "/eslint/rimraf",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "rimraf@^2.2.8",
+ "name": "rimraf",
+ "escapedName": "rimraf",
+ "rawSpec": "^2.2.8",
+ "saveSpec": null,
+ "fetchSpec": "^2.2.8"
+ },
+ "_requiredBy": [
+ "/eslint/del"
+ ],
+ "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz",
+ "_shasum": "2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36",
+ "_spec": "rimraf@^2.2.8",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/del",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "bin": {
+ "rimraf": "./bin.js"
+ },
+ "bugs": {
+ "url": "https://github.com/isaacs/rimraf/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "glob": "^7.0.5"
+ },
+ "deprecated": false,
+ "description": "A deep deletion module for node (like `rm -rf`)",
+ "devDependencies": {
+ "mkdirp": "^0.5.1",
+ "tap": "^10.1.2"
+ },
+ "files": [
+ "LICENSE",
+ "README.md",
+ "bin.js",
+ "rimraf.js"
+ ],
+ "homepage": "https://github.com/isaacs/rimraf#readme",
+ "license": "ISC",
+ "main": "rimraf.js",
+ "name": "rimraf",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/rimraf.git"
+ },
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "version": "2.6.2"
+}
diff --git a/tools/node_modules/eslint/node_modules/rimraf/rimraf.js b/tools/node_modules/eslint/node_modules/rimraf/rimraf.js
new file mode 100644
index 0000000000..e80dd10693
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/rimraf/rimraf.js
@@ -0,0 +1,364 @@
+module.exports = rimraf
+rimraf.sync = rimrafSync
+
+var assert = require("assert")
+var path = require("path")
+var fs = require("fs")
+var glob = require("glob")
+var _0666 = parseInt('666', 8)
+
+var defaultGlobOpts = {
+ nosort: true,
+ silent: true
+}
+
+// for EMFILE handling
+var timeout = 0
+
+var isWindows = (process.platform === "win32")
+
+function defaults (options) {
+ var methods = [
+ 'unlink',
+ 'chmod',
+ 'stat',
+ 'lstat',
+ 'rmdir',
+ 'readdir'
+ ]
+ methods.forEach(function(m) {
+ options[m] = options[m] || fs[m]
+ m = m + 'Sync'
+ options[m] = options[m] || fs[m]
+ })
+
+ options.maxBusyTries = options.maxBusyTries || 3
+ options.emfileWait = options.emfileWait || 1000
+ if (options.glob === false) {
+ options.disableGlob = true
+ }
+ options.disableGlob = options.disableGlob || false
+ options.glob = options.glob || defaultGlobOpts
+}
+
+function rimraf (p, options, cb) {
+ if (typeof options === 'function') {
+ cb = options
+ options = {}
+ }
+
+ assert(p, 'rimraf: missing path')
+ assert.equal(typeof p, 'string', 'rimraf: path should be a string')
+ assert.equal(typeof cb, 'function', 'rimraf: callback function required')
+ assert(options, 'rimraf: invalid options argument provided')
+ assert.equal(typeof options, 'object', 'rimraf: options should be object')
+
+ defaults(options)
+
+ var busyTries = 0
+ var errState = null
+ var n = 0
+
+ if (options.disableGlob || !glob.hasMagic(p))
+ return afterGlob(null, [p])
+
+ options.lstat(p, function (er, stat) {
+ if (!er)
+ return afterGlob(null, [p])
+
+ glob(p, options.glob, afterGlob)
+ })
+
+ function next (er) {
+ errState = errState || er
+ if (--n === 0)
+ cb(errState)
+ }
+
+ function afterGlob (er, results) {
+ if (er)
+ return cb(er)
+
+ n = results.length
+ if (n === 0)
+ return cb()
+
+ results.forEach(function (p) {
+ rimraf_(p, options, function CB (er) {
+ if (er) {
+ if ((er.code === "EBUSY" || er.code === "ENOTEMPTY" || er.code === "EPERM") &&
+ busyTries < options.maxBusyTries) {
+ busyTries ++
+ var time = busyTries * 100
+ // try again, with the same exact callback as this one.
+ return setTimeout(function () {
+ rimraf_(p, options, CB)
+ }, time)
+ }
+
+ // this one won't happen if graceful-fs is used.
+ if (er.code === "EMFILE" && timeout < options.emfileWait) {
+ return setTimeout(function () {
+ rimraf_(p, options, CB)
+ }, timeout ++)
+ }
+
+ // already gone
+ if (er.code === "ENOENT") er = null
+ }
+
+ timeout = 0
+ next(er)
+ })
+ })
+ }
+}
+
+// Two possible strategies.
+// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR
+// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR
+//
+// Both result in an extra syscall when you guess wrong. However, there
+// are likely far more normal files in the world than directories. This
+// is based on the assumption that a the average number of files per
+// directory is >= 1.
+//
+// If anyone ever complains about this, then I guess the strategy could
+// be made configurable somehow. But until then, YAGNI.
+function rimraf_ (p, options, cb) {
+ assert(p)
+ assert(options)
+ assert(typeof cb === 'function')
+
+ // sunos lets the root user unlink directories, which is... weird.
+ // so we have to lstat here and make sure it's not a dir.
+ options.lstat(p, function (er, st) {
+ if (er && er.code === "ENOENT")
+ return cb(null)
+
+ // Windows can EPERM on stat. Life is suffering.
+ if (er && er.code === "EPERM" && isWindows)
+ fixWinEPERM(p, options, er, cb)
+
+ if (st && st.isDirectory())
+ return rmdir(p, options, er, cb)
+
+ options.unlink(p, function (er) {
+ if (er) {
+ if (er.code === "ENOENT")
+ return cb(null)
+ if (er.code === "EPERM")
+ return (isWindows)
+ ? fixWinEPERM(p, options, er, cb)
+ : rmdir(p, options, er, cb)
+ if (er.code === "EISDIR")
+ return rmdir(p, options, er, cb)
+ }
+ return cb(er)
+ })
+ })
+}
+
+function fixWinEPERM (p, options, er, cb) {
+ assert(p)
+ assert(options)
+ assert(typeof cb === 'function')
+ if (er)
+ assert(er instanceof Error)
+
+ options.chmod(p, _0666, function (er2) {
+ if (er2)
+ cb(er2.code === "ENOENT" ? null : er)
+ else
+ options.stat(p, function(er3, stats) {
+ if (er3)
+ cb(er3.code === "ENOENT" ? null : er)
+ else if (stats.isDirectory())
+ rmdir(p, options, er, cb)
+ else
+ options.unlink(p, cb)
+ })
+ })
+}
+
+function fixWinEPERMSync (p, options, er) {
+ assert(p)
+ assert(options)
+ if (er)
+ assert(er instanceof Error)
+
+ try {
+ options.chmodSync(p, _0666)
+ } catch (er2) {
+ if (er2.code === "ENOENT")
+ return
+ else
+ throw er
+ }
+
+ try {
+ var stats = options.statSync(p)
+ } catch (er3) {
+ if (er3.code === "ENOENT")
+ return
+ else
+ throw er
+ }
+
+ if (stats.isDirectory())
+ rmdirSync(p, options, er)
+ else
+ options.unlinkSync(p)
+}
+
+function rmdir (p, options, originalEr, cb) {
+ assert(p)
+ assert(options)
+ if (originalEr)
+ assert(originalEr instanceof Error)
+ assert(typeof cb === 'function')
+
+ // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS)
+ // if we guessed wrong, and it's not a directory, then
+ // raise the original error.
+ options.rmdir(p, function (er) {
+ if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM"))
+ rmkids(p, options, cb)
+ else if (er && er.code === "ENOTDIR")
+ cb(originalEr)
+ else
+ cb(er)
+ })
+}
+
+function rmkids(p, options, cb) {
+ assert(p)
+ assert(options)
+ assert(typeof cb === 'function')
+
+ options.readdir(p, function (er, files) {
+ if (er)
+ return cb(er)
+ var n = files.length
+ if (n === 0)
+ return options.rmdir(p, cb)
+ var errState
+ files.forEach(function (f) {
+ rimraf(path.join(p, f), options, function (er) {
+ if (errState)
+ return
+ if (er)
+ return cb(errState = er)
+ if (--n === 0)
+ options.rmdir(p, cb)
+ })
+ })
+ })
+}
+
+// this looks simpler, and is strictly *faster*, but will
+// tie up the JavaScript thread and fail on excessively
+// deep directory trees.
+function rimrafSync (p, options) {
+ options = options || {}
+ defaults(options)
+
+ assert(p, 'rimraf: missing path')
+ assert.equal(typeof p, 'string', 'rimraf: path should be a string')
+ assert(options, 'rimraf: missing options')
+ assert.equal(typeof options, 'object', 'rimraf: options should be object')
+
+ var results
+
+ if (options.disableGlob || !glob.hasMagic(p)) {
+ results = [p]
+ } else {
+ try {
+ options.lstatSync(p)
+ results = [p]
+ } catch (er) {
+ results = glob.sync(p, options.glob)
+ }
+ }
+
+ if (!results.length)
+ return
+
+ for (var i = 0; i < results.length; i++) {
+ var p = results[i]
+
+ try {
+ var st = options.lstatSync(p)
+ } catch (er) {
+ if (er.code === "ENOENT")
+ return
+
+ // Windows can EPERM on stat. Life is suffering.
+ if (er.code === "EPERM" && isWindows)
+ fixWinEPERMSync(p, options, er)
+ }
+
+ try {
+ // sunos lets the root user unlink directories, which is... weird.
+ if (st && st.isDirectory())
+ rmdirSync(p, options, null)
+ else
+ options.unlinkSync(p)
+ } catch (er) {
+ if (er.code === "ENOENT")
+ return
+ if (er.code === "EPERM")
+ return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er)
+ if (er.code !== "EISDIR")
+ throw er
+
+ rmdirSync(p, options, er)
+ }
+ }
+}
+
+function rmdirSync (p, options, originalEr) {
+ assert(p)
+ assert(options)
+ if (originalEr)
+ assert(originalEr instanceof Error)
+
+ try {
+ options.rmdirSync(p)
+ } catch (er) {
+ if (er.code === "ENOENT")
+ return
+ if (er.code === "ENOTDIR")
+ throw originalEr
+ if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")
+ rmkidsSync(p, options)
+ }
+}
+
+function rmkidsSync (p, options) {
+ assert(p)
+ assert(options)
+ options.readdirSync(p).forEach(function (f) {
+ rimrafSync(path.join(p, f), options)
+ })
+
+ // We only end up here once we got ENOTEMPTY at least once, and
+ // at this point, we are guaranteed to have removed all the kids.
+ // So, we know that it won't be ENOENT or ENOTDIR or anything else.
+ // try really hard to delete stuff on windows, because it has a
+ // PROFOUNDLY annoying habit of not closing handles promptly when
+ // files are deleted, resulting in spurious ENOTEMPTY errors.
+ var retries = isWindows ? 100 : 1
+ var i = 0
+ do {
+ var threw = true
+ try {
+ var ret = options.rmdirSync(p, options)
+ threw = false
+ return ret
+ } finally {
+ if (++i < retries && threw)
+ continue
+ }
+ } while (true)
+}
diff --git a/tools/node_modules/eslint/node_modules/run-async/LICENSE b/tools/node_modules/eslint/node_modules/run-async/LICENSE
new file mode 100644
index 0000000000..e895e99b5e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/run-async/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Simon Boudrias
+
+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/tools/node_modules/eslint/node_modules/run-async/README.md b/tools/node_modules/eslint/node_modules/run-async/README.md
new file mode 100644
index 0000000000..8eb62c2406
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/run-async/README.md
@@ -0,0 +1,79 @@
+Run Async
+=========
+
+[![npm](https://badge.fury.io/js/run-async.svg)](http://badge.fury.io/js/run-async) [![tests](https://travis-ci.org/SBoudrias/run-async.svg?branch=master)](http://travis-ci.org/SBoudrias/run-async) [![dependencies](https://david-dm.org/SBoudrias/run-async.svg?theme=shields.io)](https://david-dm.org/SBoudrias/run-async)
+
+Utility method to run a function either synchronously or asynchronously using a series of common patterns. This is useful for library author accepting sync or async functions as parameter. `runAsync` will always run them as an async method, and normalize the multiple signature.
+
+Installation
+=========
+
+```bash
+npm install --save run-async
+```
+
+Usage
+=========
+
+Here's a simple example print the function results and three options a user can provide a function.
+
+```js
+var runAsync = require('run-async');
+
+var printAfter = function (func) {
+ var cb = function (err, returnValue) {
+ console.log(returnValue);
+ };
+ runAsync(func, cb)(/* arguments for func */);
+};
+```
+
+#### Using `this.async`
+```js
+printAfter(function () {
+ var done = this.async();
+
+ setTimeout(function () {
+ done(null, 'done running with callback');
+ }, 10);
+});
+```
+
+#### Returning a promise
+```js
+printAfter(function () {
+ return new Promise(function (resolve, reject) {
+ resolve('done running with promises');
+ });
+});
+```
+
+#### Synchronous function
+```js
+printAfter(function () {
+ return 'done running sync function';
+});
+```
+
+### runAsync.cb
+
+`runAsync.cb` supports all the function types that `runAsync` does and additionally a traditional **callback as the last argument** signature:
+
+```js
+var runAsync = require('run-async');
+
+// IMPORTANT: The wrapped function must have a fixed number of parameters.
+runAsync.cb(function(a, b, cb) {
+ cb(null, a + b);
+}, function(err, result) {
+ console.log(result)
+})(1, 2)
+```
+
+If your version of node support Promises natively (node >= 0.12), `runAsync` will return a promise. Example: `runAsync(func)(arg1, arg2).then(cb)`
+
+Licence
+========
+
+Copyright (c) 2014 Simon Boudrias (twitter: @vaxilart)
+Licensed under the MIT license.
diff --git a/tools/node_modules/eslint/node_modules/run-async/index.js b/tools/node_modules/eslint/node_modules/run-async/index.js
new file mode 100644
index 0000000000..f623326c7e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/run-async/index.js
@@ -0,0 +1,61 @@
+'use strict';
+
+var isPromise = require('is-promise');
+
+/**
+ * Return a function that will run a function asynchronously or synchronously
+ *
+ * example:
+ * runAsync(wrappedFunction, callback)(...args);
+ *
+ * @param {Function} func Function to run
+ * @param {Function} cb Callback function passed the `func` returned value
+ * @return {Function(arguments)} Arguments to pass to `func`. This function will in turn
+ * return a Promise (Node >= 0.12) or call the callbacks.
+ */
+
+var runAsync = module.exports = function (func, cb) {
+ cb = cb || function () {};
+
+ return function () {
+ var async = false;
+ var args = arguments;
+
+ var promise = new Promise(function (resolve, reject) {
+ var answer = func.apply({
+ async: function () {
+ async = true;
+ return function (err, value) {
+ if (err) {
+ reject(err);
+ } else {
+ resolve(value);
+ }
+ };
+ }
+ }, Array.prototype.slice.call(args));
+
+ if (!async) {
+ if (isPromise(answer)) {
+ answer.then(resolve, reject);
+ } else {
+ resolve(answer);
+ }
+ }
+ });
+
+ promise.then(cb.bind(null, null), cb);
+
+ return promise;
+ }
+};
+
+runAsync.cb = function (func, cb) {
+ return runAsync(function () {
+ var args = Array.prototype.slice.call(arguments);
+ if (args.length === func.length - 1) {
+ args.push(this.async());
+ }
+ return func.apply(this, args);
+ }, cb);
+};
diff --git a/tools/node_modules/eslint/node_modules/run-async/package.json b/tools/node_modules/eslint/node_modules/run-async/package.json
new file mode 100644
index 0000000000..5396174ddb
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/run-async/package.json
@@ -0,0 +1,64 @@
+{
+ "_from": "run-async@^2.2.0",
+ "_id": "run-async@2.3.0",
+ "_inBundle": false,
+ "_integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=",
+ "_location": "/eslint/run-async",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "run-async@^2.2.0",
+ "name": "run-async",
+ "escapedName": "run-async",
+ "rawSpec": "^2.2.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.2.0"
+ },
+ "_requiredBy": [
+ "/eslint/inquirer"
+ ],
+ "_resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz",
+ "_shasum": "0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0",
+ "_spec": "run-async@^2.2.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/inquirer",
+ "author": {
+ "name": "Simon Boudrias",
+ "email": "admin@simonboudrias.com"
+ },
+ "bugs": {
+ "url": "https://github.com/SBoudrias/run-async/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "is-promise": "^2.1.0"
+ },
+ "deprecated": false,
+ "description": "Utility method to run function either synchronously or asynchronously using the common `this.async()` style.",
+ "devDependencies": {
+ "mocha": "^3.1.2"
+ },
+ "engines": {
+ "node": ">=0.12.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/SBoudrias/run-async#readme",
+ "keywords": [
+ "flow",
+ "flow-control",
+ "async"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "run-async",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/SBoudrias/run-async.git"
+ },
+ "scripts": {
+ "test": "mocha -R spec"
+ },
+ "version": "2.3.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/rx-lite-aggregates/package.json b/tools/node_modules/eslint/node_modules/rx-lite-aggregates/package.json
new file mode 100644
index 0000000000..c28b26091f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/rx-lite-aggregates/package.json
@@ -0,0 +1,67 @@
+{
+ "_from": "rx-lite-aggregates@^4.0.8",
+ "_id": "rx-lite-aggregates@4.0.8",
+ "_inBundle": false,
+ "_integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=",
+ "_location": "/eslint/rx-lite-aggregates",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "rx-lite-aggregates@^4.0.8",
+ "name": "rx-lite-aggregates",
+ "escapedName": "rx-lite-aggregates",
+ "rawSpec": "^4.0.8",
+ "saveSpec": null,
+ "fetchSpec": "^4.0.8"
+ },
+ "_requiredBy": [
+ "/eslint/inquirer"
+ ],
+ "_resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz",
+ "_shasum": "753b87a89a11c95467c4ac1626c4efc4e05c67be",
+ "_spec": "rx-lite-aggregates@^4.0.8",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/inquirer",
+ "author": {
+ "name": "Cloud Programmability Team",
+ "url": "https://github.com/Reactive-Extensions/RxJS/blob/master/authors.txt"
+ },
+ "browser": {
+ "index.js": "rx.lite.aggregates.js"
+ },
+ "bugs": {
+ "url": "https://github.com/Reactive-Extensions/RxJS/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "rx-lite": "*"
+ },
+ "deprecated": false,
+ "description": "Lightweight library with aggregate functions for composing asynchronous and event-based operations in JavaScript",
+ "devDependencies": {},
+ "homepage": "https://github.com/Reactive-Extensions/RxJS",
+ "jam": {
+ "main": "rx.lite.aggregates.js"
+ },
+ "keywords": [
+ "React",
+ "Reactive",
+ "Events",
+ "Rx",
+ "RxJS"
+ ],
+ "licenses": [
+ {
+ "type": "Apache License, Version 2.0",
+ "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
+ }
+ ],
+ "main": "rx.lite.aggregates.js",
+ "name": "rx-lite-aggregates",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/Reactive-Extensions/RxJS.git"
+ },
+ "title": "Reactive Extensions for JavaScript (RxJS) Aggregates",
+ "version": "4.0.8"
+}
diff --git a/tools/node_modules/eslint/node_modules/rx-lite-aggregates/readme.md b/tools/node_modules/eslint/node_modules/rx-lite-aggregates/readme.md
new file mode 100644
index 0000000000..ed55c924e4
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/rx-lite-aggregates/readme.md
@@ -0,0 +1,85 @@
+# RxJS Aggregates Module #
+
+The Reactive Extensions for JavaScript has a number of aggregation operators including those you might already know from the Array#extras and the upcoming ES6 standard such as `reduce`, `find` and `findIndex`. This module is used exclusively for aggregation operations used on finite observable sequences. In addition to the aforementioned operators, there are many useful operators such as `count`, `sum`, `average` and determining whether two sequences are equal via the `sequenceEqual` method. This requires `rx.lite.js` from the [`rx-lite`](https://www.npmjs.com/package/rx-lite) NPM module.
+
+## Getting Started
+
+There are a number of ways to get started with RxJS.
+
+### Installing with [NPM](https://npmjs.org/)
+
+```bash`
+$ npm install rx-lite-aggregates
+$ npm install -g rx-lite-aggregates
+```
+
+### Using with Node.js and Ringo.js
+
+```js
+var Rx = require('rx-lite-aggregates');
+```
+
+### In a Browser:
+
+```html
+<!-- Just the core RxJS -->
+<script src="path/to/rx.lite.js"></script>
+<script src="path/to/rx.lite.aggregates.js"></script>
+```
+
+## Included Observable Operators ##
+
+### `Observable Instance Methods`
+- [`aggregate`](../../doc/api/core/operators/reduce.md)
+- [`all`](../../doc/api/core/operators/every.md)
+- [`any`](../../doc/api/core/operators/some.md)
+- [`average`](../../doc/api/core/operators/average.md)
+- [`includes`](../../doc/api/core/operators/includes.md)
+- [`count`](../../doc/api/core/operators/count.md)
+- [`elementAt`](../../doc/api/core/operators/elementat.md)
+- [`elementAtOrDefault`](../../doc/api/core/operators/elementatordefault.md)
+- [`every`](../../doc/api/core/operators/every.md)
+- [`find`](../../doc/api/core/operators/find.md)
+- [`findIndex`](../../doc/api/core/operators/findindex.md)
+- [`first`](../../doc/api/core/operators/first.md)
+- [`firstOrDefault`](../../doc/api/core/operators/firstordefault.md)
+- [`indexOf`](../../doc/api/core/operators/indexof.md)
+- [`isEmpty`](../../doc/api/core/operators/isempty.md)
+- [`last`](../../doc/api/core/operators/last.md)
+- [`lastOrDefault`](../../doc/api/core/operators/lastordefault.md)
+- [`max`](../../doc/api/core/operators/max.md)
+- [`maxBy`](../../doc/api/core/operators/maxby.md)
+- [`min`](../../doc/api/core/operators/min.md)
+- [`minBy`](../../doc/api/core/operators/minby.md)
+- [`reduce`](../../doc/api/core/operators/reduce.md)
+- [`sequenceEqual`](../../doc/api/core/operators/sequenceequal.md)
+- [`single`](../../doc/api/core/operators/single.md)
+- [`singleOrDefault`](../../doc/api/core/operators/singleordefault.md)
+- [`some`](../../doc/api/core/operators/some.md)
+- [`sum`](../../doc/api/core/operators/sum.md)
+- [`toMap`](../../doc/api/core/operators/tomap.md)
+- [`toSet`](../../doc/api/core/operators/toset.md)
+
+## Contributing ##
+
+There are lots of ways to contribute to the project, and we appreciate our [contributors](https://github.com/Reactive-Extensions/RxJS/wiki/Contributors). If you wish to contribute, check out our [style guide]((https://github.com/Reactive-Extensions/RxJS/tree/master/doc/contributing)).
+
+You can contribute by reviewing and sending feedback on code checkins, suggesting and trying out new features as they are implemented, submit bugs and help us verify fixes as they are checked in, as well as submit code fixes or code contributions of your own. Note that all code submissions will be rigorously reviewed and tested by the Rx Team, and only those that meet an extremely high bar for both quality and design/roadmap appropriateness will be merged into the source.
+
+## License ##
+
+Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
+Microsoft Open Technologies would like to thank its contributors, a list
+of whom are at https://github.com/Reactive-Extensions/RxJS/wiki/Contributors.
+
+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/tools/node_modules/eslint/node_modules/rx-lite-aggregates/rx.lite.aggregates.js b/tools/node_modules/eslint/node_modules/rx-lite-aggregates/rx.lite.aggregates.js
new file mode 100644
index 0000000000..7deba22017
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/rx-lite-aggregates/rx.lite.aggregates.js
@@ -0,0 +1,1365 @@
+// Copyright (c) Microsoft, All rights reserved. See License.txt in the project root for license information.
+
+;(function (factory) {
+ var objectTypes = {
+ 'function': true,
+ 'object': true
+ };
+
+ function checkGlobal(value) {
+ return (value && value.Object === Object) ? value : null;
+ }
+
+ var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null;
+ var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null;
+ var freeGlobal = checkGlobal(freeExports && freeModule && typeof global === 'object' && global);
+ var freeSelf = checkGlobal(objectTypes[typeof self] && self);
+ var freeWindow = checkGlobal(objectTypes[typeof window] && window);
+ var moduleExports = (freeModule && freeModule.exports === freeExports) ? freeExports : null;
+ var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
+ var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')();
+
+ // Because of build optimizers
+ if (typeof define === 'function' && define.amd) {
+ define(['./rx.lite'], function (Rx, exports) {
+ return factory(root, exports, Rx);
+ });
+ } else if (typeof module === 'object' && module && module.exports === freeExports) {
+ module.exports = factory(root, module.exports, require('rx-lite'));
+ } else {
+ root.Rx = factory(root, {}, root.Rx);
+ }
+}.call(this, function (root, exp, Rx, undefined) {
+
+ // References
+ var Observable = Rx.Observable,
+ observableProto = Observable.prototype,
+ BinaryDisposable = Rx.BinaryDisposable,
+ AnonymousObservable = Rx.AnonymousObservable,
+ AbstractObserver = Rx.internals.AbstractObserver,
+ disposableEmpty = Rx.Disposable.empty,
+ helpers = Rx.helpers,
+ defaultComparer = helpers.defaultComparer,
+ identity = helpers.identity,
+ defaultSubComparer = helpers.defaultSubComparer,
+ isFunction = helpers.isFunction,
+ isPromise = helpers.isPromise,
+ isArrayLike = helpers.isArrayLike,
+ isIterable = helpers.isIterable,
+ inherits = Rx.internals.inherits,
+ observableFromPromise = Observable.fromPromise,
+ observableFrom = Observable.from,
+ bindCallback = Rx.internals.bindCallback,
+ EmptyError = Rx.EmptyError,
+ ObservableBase = Rx.ObservableBase,
+ ArgumentOutOfRangeError = Rx.ArgumentOutOfRangeError;
+
+ var errorObj = {e: {}};
+
+ function tryCatcherGen(tryCatchTarget) {
+ return function tryCatcher() {
+ try {
+ return tryCatchTarget.apply(this, arguments);
+ } catch (e) {
+ errorObj.e = e;
+ return errorObj;
+ }
+ };
+ }
+
+ var tryCatch = Rx.internals.tryCatch = function tryCatch(fn) {
+ if (!isFunction(fn)) { throw new TypeError('fn must be a function'); }
+ return tryCatcherGen(fn);
+ };
+
+ function thrower(e) {
+ throw e;
+ }
+
+ var ExtremaByObservable = (function (__super__) {
+ inherits(ExtremaByObservable, __super__);
+ function ExtremaByObservable(source, k, c) {
+ this.source = source;
+ this._k = k;
+ this._c = c;
+ __super__.call(this);
+ }
+
+ ExtremaByObservable.prototype.subscribeCore = function (o) {
+ return this.source.subscribe(new ExtremaByObserver(o, this._k, this._c));
+ };
+
+ return ExtremaByObservable;
+ }(ObservableBase));
+
+ var ExtremaByObserver = (function (__super__) {
+ inherits(ExtremaByObserver, __super__);
+ function ExtremaByObserver(o, k, c) {
+ this._o = o;
+ this._k = k;
+ this._c = c;
+ this._v = null;
+ this._hv = false;
+ this._l = [];
+ __super__.call(this);
+ }
+
+ ExtremaByObserver.prototype.next = function (x) {
+ var key = tryCatch(this._k)(x);
+ if (key === errorObj) { return this._o.onError(key.e); }
+ var comparison = 0;
+ if (!this._hv) {
+ this._hv = true;
+ this._v = key;
+ } else {
+ comparison = tryCatch(this._c)(key, this._v);
+ if (comparison === errorObj) { return this._o.onError(comparison.e); }
+ }
+ if (comparison > 0) {
+ this._v = key;
+ this._l = [];
+ }
+ if (comparison >= 0) { this._l.push(x); }
+ };
+
+ ExtremaByObserver.prototype.error = function (e) {
+ this._o.onError(e);
+ };
+
+ ExtremaByObserver.prototype.completed = function () {
+ this._o.onNext(this._l);
+ this._o.onCompleted();
+ };
+
+ return ExtremaByObserver;
+ }(AbstractObserver));
+
+ function firstOnly(x) {
+ if (x.length === 0) { throw new EmptyError(); }
+ return x[0];
+ }
+
+ var ReduceObservable = (function(__super__) {
+ inherits(ReduceObservable, __super__);
+ function ReduceObservable(source, accumulator, hasSeed, seed) {
+ this.source = source;
+ this.accumulator = accumulator;
+ this.hasSeed = hasSeed;
+ this.seed = seed;
+ __super__.call(this);
+ }
+
+ ReduceObservable.prototype.subscribeCore = function(observer) {
+ return this.source.subscribe(new ReduceObserver(observer,this));
+ };
+
+ return ReduceObservable;
+ }(ObservableBase));
+
+ var ReduceObserver = (function (__super__) {
+ inherits(ReduceObserver, __super__);
+ function ReduceObserver(o, parent) {
+ this._o = o;
+ this._p = parent;
+ this._fn = parent.accumulator;
+ this._hs = parent.hasSeed;
+ this._s = parent.seed;
+ this._ha = false;
+ this._a = null;
+ this._hv = false;
+ this._i = 0;
+ __super__.call(this);
+ }
+
+ ReduceObserver.prototype.next = function (x) {
+ !this._hv && (this._hv = true);
+ if (this._ha) {
+ this._a = tryCatch(this._fn)(this._a, x, this._i, this._p);
+ } else {
+ this._a = this._hs ? tryCatch(this._fn)(this._s, x, this._i, this._p) : x;
+ this._ha = true;
+ }
+ if (this._a === errorObj) { return this._o.onError(this._a.e); }
+ this._i++;
+ };
+
+ ReduceObserver.prototype.error = function (e) {
+ this._o.onError(e);
+ };
+
+ ReduceObserver.prototype.completed = function () {
+ this._hv && this._o.onNext(this._a);
+ !this._hv && this._hs && this._o.onNext(this._s);
+ !this._hv && !this._hs && this._o.onError(new EmptyError());
+ this._o.onCompleted();
+ };
+
+ return ReduceObserver;
+ }(AbstractObserver));
+
+ /**
+ * Applies an accumulator function over an observable sequence, returning the result of the aggregation as a single element in the result sequence. The specified seed value is used as the initial accumulator value.
+ * For aggregation behavior with incremental intermediate results, see Observable.scan.
+ * @param {Function} accumulator An accumulator function to be invoked on each element.
+ * @param {Any} [seed] The initial accumulator value.
+ * @returns {Observable} An observable sequence containing a single element with the final accumulator value.
+ */
+ observableProto.reduce = function () {
+ var hasSeed = false, seed, accumulator = arguments[0];
+ if (arguments.length === 2) {
+ hasSeed = true;
+ seed = arguments[1];
+ }
+ return new ReduceObservable(this, accumulator, hasSeed, seed);
+ };
+
+ var SomeObservable = (function (__super__) {
+ inherits(SomeObservable, __super__);
+ function SomeObservable(source, fn) {
+ this.source = source;
+ this._fn = fn;
+ __super__.call(this);
+ }
+
+ SomeObservable.prototype.subscribeCore = function (o) {
+ return this.source.subscribe(new SomeObserver(o, this._fn, this.source));
+ };
+
+ return SomeObservable;
+ }(ObservableBase));
+
+ var SomeObserver = (function (__super__) {
+ inherits(SomeObserver, __super__);
+
+ function SomeObserver(o, fn, s) {
+ this._o = o;
+ this._fn = fn;
+ this._s = s;
+ this._i = 0;
+ __super__.call(this);
+ }
+
+ SomeObserver.prototype.next = function (x) {
+ var result = tryCatch(this._fn)(x, this._i++, this._s);
+ if (result === errorObj) { return this._o.onError(result.e); }
+ if (Boolean(result)) {
+ this._o.onNext(true);
+ this._o.onCompleted();
+ }
+ };
+ SomeObserver.prototype.error = function (e) { this._o.onError(e); };
+ SomeObserver.prototype.completed = function () {
+ this._o.onNext(false);
+ this._o.onCompleted();
+ };
+
+ return SomeObserver;
+ }(AbstractObserver));
+
+ /**
+ * Determines whether any element of an observable sequence satisfies a condition if present, else if any items are in the sequence.
+ * @param {Function} [predicate] A function to test each element for a condition.
+ * @returns {Observable} An observable sequence containing a single element determining whether any elements in the source sequence pass the test in the specified predicate if given, else if any items are in the sequence.
+ */
+ observableProto.some = function (predicate, thisArg) {
+ var fn = bindCallback(predicate, thisArg, 3);
+ return new SomeObservable(this, fn);
+ };
+
+ var IsEmptyObservable = (function (__super__) {
+ inherits(IsEmptyObservable, __super__);
+ function IsEmptyObservable(source) {
+ this.source = source;
+ __super__.call(this);
+ }
+
+ IsEmptyObservable.prototype.subscribeCore = function (o) {
+ return this.source.subscribe(new IsEmptyObserver(o));
+ };
+
+ return IsEmptyObservable;
+ }(ObservableBase));
+
+ var IsEmptyObserver = (function(__super__) {
+ inherits(IsEmptyObserver, __super__);
+ function IsEmptyObserver(o) {
+ this._o = o;
+ __super__.call(this);
+ }
+
+ IsEmptyObserver.prototype.next = function () {
+ this._o.onNext(false);
+ this._o.onCompleted();
+ };
+ IsEmptyObserver.prototype.error = function (e) { this._o.onError(e); };
+ IsEmptyObserver.prototype.completed = function () {
+ this._o.onNext(true);
+ this._o.onCompleted();
+ };
+
+ return IsEmptyObserver;
+ }(AbstractObserver));
+
+ /**
+ * Determines whether an observable sequence is empty.
+ * @returns {Observable} An observable sequence containing a single element determining whether the source sequence is empty.
+ */
+ observableProto.isEmpty = function () {
+ return new IsEmptyObservable(this);
+ };
+
+ var EveryObservable = (function (__super__) {
+ inherits(EveryObservable, __super__);
+ function EveryObservable(source, fn) {
+ this.source = source;
+ this._fn = fn;
+ __super__.call(this);
+ }
+
+ EveryObservable.prototype.subscribeCore = function (o) {
+ return this.source.subscribe(new EveryObserver(o, this._fn, this.source));
+ };
+
+ return EveryObservable;
+ }(ObservableBase));
+
+ var EveryObserver = (function (__super__) {
+ inherits(EveryObserver, __super__);
+
+ function EveryObserver(o, fn, s) {
+ this._o = o;
+ this._fn = fn;
+ this._s = s;
+ this._i = 0;
+ __super__.call(this);
+ }
+
+ EveryObserver.prototype.next = function (x) {
+ var result = tryCatch(this._fn)(x, this._i++, this._s);
+ if (result === errorObj) { return this._o.onError(result.e); }
+ if (!Boolean(result)) {
+ this._o.onNext(false);
+ this._o.onCompleted();
+ }
+ };
+ EveryObserver.prototype.error = function (e) { this._o.onError(e); };
+ EveryObserver.prototype.completed = function () {
+ this._o.onNext(true);
+ this._o.onCompleted();
+ };
+
+ return EveryObserver;
+ }(AbstractObserver));
+
+ /**
+ * Determines whether all elements of an observable sequence satisfy a condition.
+ * @param {Function} [predicate] A function to test each element for a condition.
+ * @param {Any} [thisArg] Object to use as this when executing callback.
+ * @returns {Observable} An observable sequence containing a single element determining whether all elements in the source sequence pass the test in the specified predicate.
+ */
+ observableProto.every = function (predicate, thisArg) {
+ var fn = bindCallback(predicate, thisArg, 3);
+ return new EveryObservable(this, fn);
+ };
+
+ var IncludesObservable = (function (__super__) {
+ inherits(IncludesObservable, __super__);
+ function IncludesObservable(source, elem, idx) {
+ var n = +idx || 0;
+ Math.abs(n) === Infinity && (n = 0);
+
+ this.source = source;
+ this._elem = elem;
+ this._n = n;
+ __super__.call(this);
+ }
+
+ IncludesObservable.prototype.subscribeCore = function (o) {
+ if (this._n < 0) {
+ o.onNext(false);
+ o.onCompleted();
+ return disposableEmpty;
+ }
+
+ return this.source.subscribe(new IncludesObserver(o, this._elem, this._n));
+ };
+
+ return IncludesObservable;
+ }(ObservableBase));
+
+ var IncludesObserver = (function (__super__) {
+ inherits(IncludesObserver, __super__);
+ function IncludesObserver(o, elem, n) {
+ this._o = o;
+ this._elem = elem;
+ this._n = n;
+ this._i = 0;
+ __super__.call(this);
+ }
+
+ function comparer(a, b) {
+ return (a === 0 && b === 0) || (a === b || (isNaN(a) && isNaN(b)));
+ }
+
+ IncludesObserver.prototype.next = function (x) {
+ if (this._i++ >= this._n && comparer(x, this._elem)) {
+ this._o.onNext(true);
+ this._o.onCompleted();
+ }
+ };
+ IncludesObserver.prototype.error = function (e) { this._o.onError(e); };
+ IncludesObserver.prototype.completed = function () { this._o.onNext(false); this._o.onCompleted(); };
+
+ return IncludesObserver;
+ }(AbstractObserver));
+
+ /**
+ * Determines whether an observable sequence includes a specified element with an optional equality comparer.
+ * @param searchElement The value to locate in the source sequence.
+ * @param {Number} [fromIndex] An equality comparer to compare elements.
+ * @returns {Observable} An observable sequence containing a single element determining whether the source sequence includes an element that has the specified value from the given index.
+ */
+ observableProto.includes = function (searchElement, fromIndex) {
+ return new IncludesObservable(this, searchElement, fromIndex);
+ };
+
+ var CountObservable = (function (__super__) {
+ inherits(CountObservable, __super__);
+ function CountObservable(source, fn) {
+ this.source = source;
+ this._fn = fn;
+ __super__.call(this);
+ }
+
+ CountObservable.prototype.subscribeCore = function (o) {
+ return this.source.subscribe(new CountObserver(o, this._fn, this.source));
+ };
+
+ return CountObservable;
+ }(ObservableBase));
+
+ var CountObserver = (function (__super__) {
+ inherits(CountObserver, __super__);
+
+ function CountObserver(o, fn, s) {
+ this._o = o;
+ this._fn = fn;
+ this._s = s;
+ this._i = 0;
+ this._c = 0;
+ __super__.call(this);
+ }
+
+ CountObserver.prototype.next = function (x) {
+ if (this._fn) {
+ var result = tryCatch(this._fn)(x, this._i++, this._s);
+ if (result === errorObj) { return this._o.onError(result.e); }
+ Boolean(result) && (this._c++);
+ } else {
+ this._c++;
+ }
+ };
+ CountObserver.prototype.error = function (e) { this._o.onError(e); };
+ CountObserver.prototype.completed = function () {
+ this._o.onNext(this._c);
+ this._o.onCompleted();
+ };
+
+ return CountObserver;
+ }(AbstractObserver));
+
+ /**
+ * Returns an observable sequence containing a value that represents how many elements in the specified observable sequence satisfy a condition if provided, else the count of items.
+ * @example
+ * res = source.count();
+ * res = source.count(function (x) { return x > 3; });
+ * @param {Function} [predicate]A function to test each element for a condition.
+ * @param {Any} [thisArg] Object to use as this when executing callback.
+ * @returns {Observable} An observable sequence containing a single element with a number that represents how many elements in the input sequence satisfy the condition in the predicate function if provided, else the count of items in the sequence.
+ */
+ observableProto.count = function (predicate, thisArg) {
+ var fn = bindCallback(predicate, thisArg, 3);
+ return new CountObservable(this, fn);
+ };
+
+ var IndexOfObservable = (function (__super__) {
+ inherits(IndexOfObservable, __super__);
+ function IndexOfObservable(source, e, n) {
+ this.source = source;
+ this._e = e;
+ this._n = n;
+ __super__.call(this);
+ }
+
+ IndexOfObservable.prototype.subscribeCore = function (o) {
+ if (this._n < 0) {
+ o.onNext(-1);
+ o.onCompleted();
+ return disposableEmpty;
+ }
+
+ return this.source.subscribe(new IndexOfObserver(o, this._e, this._n));
+ };
+
+ return IndexOfObservable;
+ }(ObservableBase));
+
+ var IndexOfObserver = (function (__super__) {
+ inherits(IndexOfObserver, __super__);
+ function IndexOfObserver(o, e, n) {
+ this._o = o;
+ this._e = e;
+ this._n = n;
+ this._i = 0;
+ __super__.call(this);
+ }
+
+ IndexOfObserver.prototype.next = function (x) {
+ if (this._i >= this._n && x === this._e) {
+ this._o.onNext(this._i);
+ this._o.onCompleted();
+ }
+ this._i++;
+ };
+ IndexOfObserver.prototype.error = function (e) { this._o.onError(e); };
+ IndexOfObserver.prototype.completed = function () { this._o.onNext(-1); this._o.onCompleted(); };
+
+ return IndexOfObserver;
+ }(AbstractObserver));
+
+ /**
+ * Returns the first index at which a given element can be found in the observable sequence, or -1 if it is not present.
+ * @param {Any} searchElement Element to locate in the array.
+ * @param {Number} [fromIndex] The index to start the search. If not specified, defaults to 0.
+ * @returns {Observable} And observable sequence containing the first index at which a given element can be found in the observable sequence, or -1 if it is not present.
+ */
+ observableProto.indexOf = function(searchElement, fromIndex) {
+ var n = +fromIndex || 0;
+ Math.abs(n) === Infinity && (n = 0);
+ return new IndexOfObservable(this, searchElement, n);
+ };
+
+ var SumObservable = (function (__super__) {
+ inherits(SumObservable, __super__);
+ function SumObservable(source, fn) {
+ this.source = source;
+ this._fn = fn;
+ __super__.call(this);
+ }
+
+ SumObservable.prototype.subscribeCore = function (o) {
+ return this.source.subscribe(new SumObserver(o, this._fn, this.source));
+ };
+
+ return SumObservable;
+ }(ObservableBase));
+
+ var SumObserver = (function (__super__) {
+ inherits(SumObserver, __super__);
+
+ function SumObserver(o, fn, s) {
+ this._o = o;
+ this._fn = fn;
+ this._s = s;
+ this._i = 0;
+ this._c = 0;
+ __super__.call(this);
+ }
+
+ SumObserver.prototype.next = function (x) {
+ if (this._fn) {
+ var result = tryCatch(this._fn)(x, this._i++, this._s);
+ if (result === errorObj) { return this._o.onError(result.e); }
+ this._c += result;
+ } else {
+ this._c += x;
+ }
+ };
+ SumObserver.prototype.error = function (e) { this._o.onError(e); };
+ SumObserver.prototype.completed = function () {
+ this._o.onNext(this._c);
+ this._o.onCompleted();
+ };
+
+ return SumObserver;
+ }(AbstractObserver));
+
+ /**
+ * Computes the sum of a sequence of values that are obtained by invoking an optional transform function on each element of the input sequence, else if not specified computes the sum on each item in the sequence.
+ * @param {Function} [selector] A transform function to apply to each element.
+ * @param {Any} [thisArg] Object to use as this when executing callback.
+ * @returns {Observable} An observable sequence containing a single element with the sum of the values in the source sequence.
+ */
+ observableProto.sum = function (keySelector, thisArg) {
+ var fn = bindCallback(keySelector, thisArg, 3);
+ return new SumObservable(this, fn);
+ };
+
+ /**
+ * Returns the elements in an observable sequence with the minimum key value according to the specified comparer.
+ * @example
+ * var res = source.minBy(function (x) { return x.value; });
+ * var res = source.minBy(function (x) { return x.value; }, function (x, y) { return x - y; });
+ * @param {Function} keySelector Key selector function.
+ * @param {Function} [comparer] Comparer used to compare key values.
+ * @returns {Observable} An observable sequence containing a list of zero or more elements that have a minimum key value.
+ */
+ observableProto.minBy = function (keySelector, comparer) {
+ comparer || (comparer = defaultSubComparer);
+ return new ExtremaByObservable(this, keySelector, function (x, y) { return comparer(x, y) * -1; });
+ };
+
+ /**
+ * Returns the minimum element in an observable sequence according to the optional comparer else a default greater than less than check.
+ * @example
+ * var res = source.min();
+ * var res = source.min(function (x, y) { return x.value - y.value; });
+ * @param {Function} [comparer] Comparer used to compare elements.
+ * @returns {Observable} An observable sequence containing a single element with the minimum element in the source sequence.
+ */
+ observableProto.min = function (comparer) {
+ return this.minBy(identity, comparer).map(firstOnly);
+ };
+
+ /**
+ * Returns the elements in an observable sequence with the maximum key value according to the specified comparer.
+ * @example
+ * var res = source.maxBy(function (x) { return x.value; });
+ * var res = source.maxBy(function (x) { return x.value; }, function (x, y) { return x - y;; });
+ * @param {Function} keySelector Key selector function.
+ * @param {Function} [comparer] Comparer used to compare key values.
+ * @returns {Observable} An observable sequence containing a list of zero or more elements that have a maximum key value.
+ */
+ observableProto.maxBy = function (keySelector, comparer) {
+ comparer || (comparer = defaultSubComparer);
+ return new ExtremaByObservable(this, keySelector, comparer);
+ };
+
+ /**
+ * Returns the maximum value in an observable sequence according to the specified comparer.
+ * @example
+ * var res = source.max();
+ * var res = source.max(function (x, y) { return x.value - y.value; });
+ * @param {Function} [comparer] Comparer used to compare elements.
+ * @returns {Observable} An observable sequence containing a single element with the maximum element in the source sequence.
+ */
+ observableProto.max = function (comparer) {
+ return this.maxBy(identity, comparer).map(firstOnly);
+ };
+
+ var AverageObservable = (function (__super__) {
+ inherits(AverageObservable, __super__);
+ function AverageObservable(source, fn) {
+ this.source = source;
+ this._fn = fn;
+ __super__.call(this);
+ }
+
+ AverageObservable.prototype.subscribeCore = function (o) {
+ return this.source.subscribe(new AverageObserver(o, this._fn, this.source));
+ };
+
+ return AverageObservable;
+ }(ObservableBase));
+
+ var AverageObserver = (function(__super__) {
+ inherits(AverageObserver, __super__);
+ function AverageObserver(o, fn, s) {
+ this._o = o;
+ this._fn = fn;
+ this._s = s;
+ this._c = 0;
+ this._t = 0;
+ __super__.call(this);
+ }
+
+ AverageObserver.prototype.next = function (x) {
+ if(this._fn) {
+ var r = tryCatch(this._fn)(x, this._c++, this._s);
+ if (r === errorObj) { return this._o.onError(r.e); }
+ this._t += r;
+ } else {
+ this._c++;
+ this._t += x;
+ }
+ };
+ AverageObserver.prototype.error = function (e) { this._o.onError(e); };
+ AverageObserver.prototype.completed = function () {
+ if (this._c === 0) { return this._o.onError(new EmptyError()); }
+ this._o.onNext(this._t / this._c);
+ this._o.onCompleted();
+ };
+
+ return AverageObserver;
+ }(AbstractObserver));
+
+ /**
+ * Computes the average of an observable sequence of values that are in the sequence or obtained by invoking a transform function on each element of the input sequence if present.
+ * @param {Function} [selector] A transform function to apply to each element.
+ * @param {Any} [thisArg] Object to use as this when executing callback.
+ * @returns {Observable} An observable sequence containing a single element with the average of the sequence of values.
+ */
+ observableProto.average = function (keySelector, thisArg) {
+ var source = this, fn;
+ if (isFunction(keySelector)) {
+ fn = bindCallback(keySelector, thisArg, 3);
+ }
+ return new AverageObservable(source, fn);
+ };
+
+ /**
+ * Determines whether two sequences are equal by comparing the elements pairwise using a specified equality comparer.
+ *
+ * @example
+ * var res = res = source.sequenceEqual([1,2,3]);
+ * var res = res = source.sequenceEqual([{ value: 42 }], function (x, y) { return x.value === y.value; });
+ * 3 - res = source.sequenceEqual(Rx.Observable.returnValue(42));
+ * 4 - res = source.sequenceEqual(Rx.Observable.returnValue({ value: 42 }), function (x, y) { return x.value === y.value; });
+ * @param {Observable} second Second observable sequence or array to compare.
+ * @param {Function} [comparer] Comparer used to compare elements of both sequences.
+ * @returns {Observable} An observable sequence that contains a single element which indicates whether both sequences are of equal length and their corresponding elements are equal according to the specified equality comparer.
+ */
+ observableProto.sequenceEqual = function (second, comparer) {
+ var first = this;
+ comparer || (comparer = defaultComparer);
+ return new AnonymousObservable(function (o) {
+ var donel = false, doner = false, ql = [], qr = [];
+ var subscription1 = first.subscribe(function (x) {
+ if (qr.length > 0) {
+ var v = qr.shift();
+ var equal = tryCatch(comparer)(v, x);
+ if (equal === errorObj) { return o.onError(equal.e); }
+ if (!equal) {
+ o.onNext(false);
+ o.onCompleted();
+ }
+ } else if (doner) {
+ o.onNext(false);
+ o.onCompleted();
+ } else {
+ ql.push(x);
+ }
+ }, function(e) { o.onError(e); }, function () {
+ donel = true;
+ if (ql.length === 0) {
+ if (qr.length > 0) {
+ o.onNext(false);
+ o.onCompleted();
+ } else if (doner) {
+ o.onNext(true);
+ o.onCompleted();
+ }
+ }
+ });
+
+ (isArrayLike(second) || isIterable(second)) && (second = observableFrom(second));
+ isPromise(second) && (second = observableFromPromise(second));
+ var subscription2 = second.subscribe(function (x) {
+ if (ql.length > 0) {
+ var v = ql.shift();
+ var equal = tryCatch(comparer)(v, x);
+ if (equal === errorObj) { return o.onError(equal.e); }
+ if (!equal) {
+ o.onNext(false);
+ o.onCompleted();
+ }
+ } else if (donel) {
+ o.onNext(false);
+ o.onCompleted();
+ } else {
+ qr.push(x);
+ }
+ }, function(e) { o.onError(e); }, function () {
+ doner = true;
+ if (qr.length === 0) {
+ if (ql.length > 0) {
+ o.onNext(false);
+ o.onCompleted();
+ } else if (donel) {
+ o.onNext(true);
+ o.onCompleted();
+ }
+ }
+ });
+ return new BinaryDisposable(subscription1, subscription2);
+ }, first);
+ };
+
+ var ElementAtObservable = (function (__super__) {
+ inherits(ElementAtObservable, __super__);
+ function ElementAtObservable(source, i, d) {
+ this.source = source;
+ this._i = i;
+ this._d = d;
+ __super__.call(this);
+ }
+
+ ElementAtObservable.prototype.subscribeCore = function (o) {
+ return this.source.subscribe(new ElementAtObserver(o, this._i, this._d));
+ };
+
+ return ElementAtObservable;
+ }(ObservableBase));
+
+ var ElementAtObserver = (function (__super__) {
+ inherits(ElementAtObserver, __super__);
+
+ function ElementAtObserver(o, i, d) {
+ this._o = o;
+ this._i = i;
+ this._d = d;
+ __super__.call(this);
+ }
+
+ ElementAtObserver.prototype.next = function (x) {
+ if (this._i-- === 0) {
+ this._o.onNext(x);
+ this._o.onCompleted();
+ }
+ };
+ ElementAtObserver.prototype.error = function (e) { this._o.onError(e); };
+ ElementAtObserver.prototype.completed = function () {
+ if (this._d === undefined) {
+ this._o.onError(new ArgumentOutOfRangeError());
+ } else {
+ this._o.onNext(this._d);
+ this._o.onCompleted();
+ }
+ };
+
+ return ElementAtObserver;
+ }(AbstractObserver));
+
+ /**
+ * Returns the element at a specified index in a sequence or default value if not found.
+ * @param {Number} index The zero-based index of the element to retrieve.
+ * @param {Any} [defaultValue] The default value to use if elementAt does not find a value.
+ * @returns {Observable} An observable sequence that produces the element at the specified position in the source sequence.
+ */
+ observableProto.elementAt = function (index, defaultValue) {
+ if (index < 0) { throw new ArgumentOutOfRangeError(); }
+ return new ElementAtObservable(this, index, defaultValue);
+ };
+
+ var SingleObserver = (function(__super__) {
+ inherits(SingleObserver, __super__);
+ function SingleObserver(o, obj, s) {
+ this._o = o;
+ this._obj = obj;
+ this._s = s;
+ this._i = 0;
+ this._hv = false;
+ this._v = null;
+ __super__.call(this);
+ }
+
+ SingleObserver.prototype.next = function (x) {
+ var shouldYield = false;
+ if (this._obj.predicate) {
+ var res = tryCatch(this._obj.predicate)(x, this._i++, this._s);
+ if (res === errorObj) { return this._o.onError(res.e); }
+ Boolean(res) && (shouldYield = true);
+ } else if (!this._obj.predicate) {
+ shouldYield = true;
+ }
+ if (shouldYield) {
+ if (this._hv) {
+ return this._o.onError(new Error('Sequence contains more than one matching element'));
+ }
+ this._hv = true;
+ this._v = x;
+ }
+ };
+ SingleObserver.prototype.error = function (e) { this._o.onError(e); };
+ SingleObserver.prototype.completed = function () {
+ if (this._hv) {
+ this._o.onNext(this._v);
+ this._o.onCompleted();
+ }
+ else if (this._obj.defaultValue === undefined) {
+ this._o.onError(new EmptyError());
+ } else {
+ this._o.onNext(this._obj.defaultValue);
+ this._o.onCompleted();
+ }
+ };
+
+ return SingleObserver;
+ }(AbstractObserver));
+
+
+ /**
+ * Returns the only element of an observable sequence that satisfies the condition in the optional predicate, and reports an exception if there is not exactly one element in the observable sequence.
+ * @returns {Observable} Sequence containing the single element in the observable sequence that satisfies the condition in the predicate.
+ */
+ observableProto.single = function (predicate, thisArg) {
+ var obj = {}, source = this;
+ if (typeof arguments[0] === 'object') {
+ obj = arguments[0];
+ } else {
+ obj = {
+ predicate: arguments[0],
+ thisArg: arguments[1],
+ defaultValue: arguments[2]
+ };
+ }
+ if (isFunction (obj.predicate)) {
+ var fn = obj.predicate;
+ obj.predicate = bindCallback(fn, obj.thisArg, 3);
+ }
+ return new AnonymousObservable(function (o) {
+ return source.subscribe(new SingleObserver(o, obj, source));
+ }, source);
+ };
+
+ var FirstObservable = (function (__super__) {
+ inherits(FirstObservable, __super__);
+ function FirstObservable(source, obj) {
+ this.source = source;
+ this._obj = obj;
+ __super__.call(this);
+ }
+
+ FirstObservable.prototype.subscribeCore = function (o) {
+ return this.source.subscribe(new FirstObserver(o, this._obj, this.source));
+ };
+
+ return FirstObservable;
+ }(ObservableBase));
+
+ var FirstObserver = (function(__super__) {
+ inherits(FirstObserver, __super__);
+ function FirstObserver(o, obj, s) {
+ this._o = o;
+ this._obj = obj;
+ this._s = s;
+ this._i = 0;
+ __super__.call(this);
+ }
+
+ FirstObserver.prototype.next = function (x) {
+ if (this._obj.predicate) {
+ var res = tryCatch(this._obj.predicate)(x, this._i++, this._s);
+ if (res === errorObj) { return this._o.onError(res.e); }
+ if (Boolean(res)) {
+ this._o.onNext(x);
+ this._o.onCompleted();
+ }
+ } else if (!this._obj.predicate) {
+ this._o.onNext(x);
+ this._o.onCompleted();
+ }
+ };
+ FirstObserver.prototype.error = function (e) { this._o.onError(e); };
+ FirstObserver.prototype.completed = function () {
+ if (this._obj.defaultValue === undefined) {
+ this._o.onError(new EmptyError());
+ } else {
+ this._o.onNext(this._obj.defaultValue);
+ this._o.onCompleted();
+ }
+ };
+
+ return FirstObserver;
+ }(AbstractObserver));
+
+ /**
+ * Returns the first element of an observable sequence that satisfies the condition in the predicate if present else the first item in the sequence.
+ * @returns {Observable} Sequence containing the first element in the observable sequence that satisfies the condition in the predicate if provided, else the first item in the sequence.
+ */
+ observableProto.first = function () {
+ var obj = {}, source = this;
+ if (typeof arguments[0] === 'object') {
+ obj = arguments[0];
+ } else {
+ obj = {
+ predicate: arguments[0],
+ thisArg: arguments[1],
+ defaultValue: arguments[2]
+ };
+ }
+ if (isFunction (obj.predicate)) {
+ var fn = obj.predicate;
+ obj.predicate = bindCallback(fn, obj.thisArg, 3);
+ }
+ return new FirstObservable(this, obj);
+ };
+
+ var LastObservable = (function (__super__) {
+ inherits(LastObservable, __super__);
+ function LastObservable(source, obj) {
+ this.source = source;
+ this._obj = obj;
+ __super__.call(this);
+ }
+
+ LastObservable.prototype.subscribeCore = function (o) {
+ return this.source.subscribe(new LastObserver(o, this._obj, this.source));
+ };
+
+ return LastObservable;
+ }(ObservableBase));
+
+ var LastObserver = (function(__super__) {
+ inherits(LastObserver, __super__);
+ function LastObserver(o, obj, s) {
+ this._o = o;
+ this._obj = obj;
+ this._s = s;
+ this._i = 0;
+ this._hv = false;
+ this._v = null;
+ __super__.call(this);
+ }
+
+ LastObserver.prototype.next = function (x) {
+ var shouldYield = false;
+ if (this._obj.predicate) {
+ var res = tryCatch(this._obj.predicate)(x, this._i++, this._s);
+ if (res === errorObj) { return this._o.onError(res.e); }
+ Boolean(res) && (shouldYield = true);
+ } else if (!this._obj.predicate) {
+ shouldYield = true;
+ }
+ if (shouldYield) {
+ this._hv = true;
+ this._v = x;
+ }
+ };
+ LastObserver.prototype.error = function (e) { this._o.onError(e); };
+ LastObserver.prototype.completed = function () {
+ if (this._hv) {
+ this._o.onNext(this._v);
+ this._o.onCompleted();
+ }
+ else if (this._obj.defaultValue === undefined) {
+ this._o.onError(new EmptyError());
+ } else {
+ this._o.onNext(this._obj.defaultValue);
+ this._o.onCompleted();
+ }
+ };
+
+ return LastObserver;
+ }(AbstractObserver));
+
+ /**
+ * Returns the last element of an observable sequence that satisfies the condition in the predicate if specified, else the last element.
+ * @returns {Observable} Sequence containing the last element in the observable sequence that satisfies the condition in the predicate.
+ */
+ observableProto.last = function () {
+ var obj = {}, source = this;
+ if (typeof arguments[0] === 'object') {
+ obj = arguments[0];
+ } else {
+ obj = {
+ predicate: arguments[0],
+ thisArg: arguments[1],
+ defaultValue: arguments[2]
+ };
+ }
+ if (isFunction (obj.predicate)) {
+ var fn = obj.predicate;
+ obj.predicate = bindCallback(fn, obj.thisArg, 3);
+ }
+ return new LastObservable(this, obj);
+ };
+
+ var FindValueObserver = (function(__super__) {
+ inherits(FindValueObserver, __super__);
+ function FindValueObserver(observer, source, callback, yieldIndex) {
+ this._o = observer;
+ this._s = source;
+ this._cb = callback;
+ this._y = yieldIndex;
+ this._i = 0;
+ __super__.call(this);
+ }
+
+ FindValueObserver.prototype.next = function (x) {
+ var shouldRun = tryCatch(this._cb)(x, this._i, this._s);
+ if (shouldRun === errorObj) { return this._o.onError(shouldRun.e); }
+ if (shouldRun) {
+ this._o.onNext(this._y ? this._i : x);
+ this._o.onCompleted();
+ } else {
+ this._i++;
+ }
+ };
+
+ FindValueObserver.prototype.error = function (e) {
+ this._o.onError(e);
+ };
+
+ FindValueObserver.prototype.completed = function () {
+ this._y && this._o.onNext(-1);
+ this._o.onCompleted();
+ };
+
+ return FindValueObserver;
+ }(AbstractObserver));
+
+ function findValue (source, predicate, thisArg, yieldIndex) {
+ var callback = bindCallback(predicate, thisArg, 3);
+ return new AnonymousObservable(function (o) {
+ return source.subscribe(new FindValueObserver(o, source, callback, yieldIndex));
+ }, source);
+ }
+
+ /**
+ * Searches for an element that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire Observable sequence.
+ * @param {Function} predicate The predicate that defines the conditions of the element to search for.
+ * @param {Any} [thisArg] Object to use as `this` when executing the predicate.
+ * @returns {Observable} An Observable sequence with the first element that matches the conditions defined by the specified predicate, if found; otherwise, undefined.
+ */
+ observableProto.find = function (predicate, thisArg) {
+ return findValue(this, predicate, thisArg, false);
+ };
+
+ /**
+ * Searches for an element that matches the conditions defined by the specified predicate, and returns
+ * an Observable sequence with the zero-based index of the first occurrence within the entire Observable sequence.
+ * @param {Function} predicate The predicate that defines the conditions of the element to search for.
+ * @param {Any} [thisArg] Object to use as `this` when executing the predicate.
+ * @returns {Observable} An Observable sequence with the zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1.
+ */
+ observableProto.findIndex = function (predicate, thisArg) {
+ return findValue(this, predicate, thisArg, true);
+ };
+
+ var ToSetObservable = (function (__super__) {
+ inherits(ToSetObservable, __super__);
+ function ToSetObservable(source) {
+ this.source = source;
+ __super__.call(this);
+ }
+
+ ToSetObservable.prototype.subscribeCore = function (o) {
+ return this.source.subscribe(new ToSetObserver(o));
+ };
+
+ return ToSetObservable;
+ }(ObservableBase));
+
+ var ToSetObserver = (function (__super__) {
+ inherits(ToSetObserver, __super__);
+ function ToSetObserver(o) {
+ this._o = o;
+ this._s = new root.Set();
+ __super__.call(this);
+ }
+
+ ToSetObserver.prototype.next = function (x) {
+ this._s.add(x);
+ };
+
+ ToSetObserver.prototype.error = function (e) {
+ this._o.onError(e);
+ };
+
+ ToSetObserver.prototype.completed = function () {
+ this._o.onNext(this._s);
+ this._o.onCompleted();
+ };
+
+ return ToSetObserver;
+ }(AbstractObserver));
+
+ /**
+ * Converts the observable sequence to a Set if it exists.
+ * @returns {Observable} An observable sequence with a single value of a Set containing the values from the observable sequence.
+ */
+ observableProto.toSet = function () {
+ if (typeof root.Set === 'undefined') { throw new TypeError(); }
+ return new ToSetObservable(this);
+ };
+
+ var ToMapObservable = (function (__super__) {
+ inherits(ToMapObservable, __super__);
+ function ToMapObservable(source, k, e) {
+ this.source = source;
+ this._k = k;
+ this._e = e;
+ __super__.call(this);
+ }
+
+ ToMapObservable.prototype.subscribeCore = function (o) {
+ return this.source.subscribe(new ToMapObserver(o, this._k, this._e));
+ };
+
+ return ToMapObservable;
+ }(ObservableBase));
+
+ var ToMapObserver = (function (__super__) {
+ inherits(ToMapObserver, __super__);
+ function ToMapObserver(o, k, e) {
+ this._o = o;
+ this._k = k;
+ this._e = e;
+ this._m = new root.Map();
+ __super__.call(this);
+ }
+
+ ToMapObserver.prototype.next = function (x) {
+ var key = tryCatch(this._k)(x);
+ if (key === errorObj) { return this._o.onError(key.e); }
+ var elem = x;
+ if (this._e) {
+ elem = tryCatch(this._e)(x);
+ if (elem === errorObj) { return this._o.onError(elem.e); }
+ }
+
+ this._m.set(key, elem);
+ };
+
+ ToMapObserver.prototype.error = function (e) {
+ this._o.onError(e);
+ };
+
+ ToMapObserver.prototype.completed = function () {
+ this._o.onNext(this._m);
+ this._o.onCompleted();
+ };
+
+ return ToMapObserver;
+ }(AbstractObserver));
+
+ /**
+ * Converts the observable sequence to a Map if it exists.
+ * @param {Function} keySelector A function which produces the key for the Map.
+ * @param {Function} [elementSelector] An optional function which produces the element for the Map. If not present, defaults to the value from the observable sequence.
+ * @returns {Observable} An observable sequence with a single value of a Map containing the values from the observable sequence.
+ */
+ observableProto.toMap = function (keySelector, elementSelector) {
+ if (typeof root.Map === 'undefined') { throw new TypeError(); }
+ return new ToMapObservable(this, keySelector, elementSelector);
+ };
+
+ var SliceObservable = (function (__super__) {
+ inherits(SliceObservable, __super__);
+ function SliceObservable(source, b, e) {
+ this.source = source;
+ this._b = b;
+ this._e = e;
+ __super__.call(this);
+ }
+
+ SliceObservable.prototype.subscribeCore = function (o) {
+ return this.source.subscribe(new SliceObserver(o, this._b, this._e));
+ };
+
+ return SliceObservable;
+ }(ObservableBase));
+
+ var SliceObserver = (function (__super__) {
+ inherits(SliceObserver, __super__);
+
+ function SliceObserver(o, b, e) {
+ this._o = o;
+ this._b = b;
+ this._e = e;
+ this._i = 0;
+ __super__.call(this);
+ }
+
+ SliceObserver.prototype.next = function (x) {
+ if (this._i >= this._b) {
+ if (this._e === this._i) {
+ this._o.onCompleted();
+ } else {
+ this._o.onNext(x);
+ }
+ }
+ this._i++;
+ };
+ SliceObserver.prototype.error = function (e) { this._o.onError(e); };
+ SliceObserver.prototype.completed = function () { this._o.onCompleted(); };
+
+ return SliceObserver;
+ }(AbstractObserver));
+
+ /*
+ * The slice() method returns a shallow copy of a portion of an Observable into a new Observable object.
+ * Unlike the array version, this does not support negative numbers for being or end.
+ * @param {Number} [begin] Zero-based index at which to begin extraction. If omitted, this will default to zero.
+ * @param {Number} [end] Zero-based index at which to end extraction. slice extracts up to but not including end.
+ * If omitted, this will emit the rest of the Observable object.
+ * @returns {Observable} A shallow copy of a portion of an Observable into a new Observable object.
+ */
+ observableProto.slice = function (begin, end) {
+ var start = begin || 0;
+ if (start < 0) { throw new Rx.ArgumentOutOfRangeError(); }
+ if (typeof end === 'number' && end < start) {
+ throw new Rx.ArgumentOutOfRangeError();
+ }
+ return new SliceObservable(this, start, end);
+ };
+
+ var LastIndexOfObservable = (function (__super__) {
+ inherits(LastIndexOfObservable, __super__);
+ function LastIndexOfObservable(source, e, n) {
+ this.source = source;
+ this._e = e;
+ this._n = n;
+ __super__.call(this);
+ }
+
+ LastIndexOfObservable.prototype.subscribeCore = function (o) {
+ if (this._n < 0) {
+ o.onNext(-1);
+ o.onCompleted();
+ return disposableEmpty;
+ }
+
+ return this.source.subscribe(new LastIndexOfObserver(o, this._e, this._n));
+ };
+
+ return LastIndexOfObservable;
+ }(ObservableBase));
+
+ var LastIndexOfObserver = (function (__super__) {
+ inherits(LastIndexOfObserver, __super__);
+ function LastIndexOfObserver(o, e, n) {
+ this._o = o;
+ this._e = e;
+ this._n = n;
+ this._v = 0;
+ this._hv = false;
+ this._i = 0;
+ __super__.call(this);
+ }
+
+ LastIndexOfObserver.prototype.next = function (x) {
+ if (this._i >= this._n && x === this._e) {
+ this._hv = true;
+ this._v = this._i;
+ }
+ this._i++;
+ };
+ LastIndexOfObserver.prototype.error = function (e) { this._o.onError(e); };
+ LastIndexOfObserver.prototype.completed = function () {
+ if (this._hv) {
+ this._o.onNext(this._v);
+ } else {
+ this._o.onNext(-1);
+ }
+ this._o.onCompleted();
+ };
+
+ return LastIndexOfObserver;
+ }(AbstractObserver));
+
+ /**
+ * Returns the last index at which a given element can be found in the observable sequence, or -1 if it is not present.
+ * @param {Any} searchElement Element to locate in the array.
+ * @param {Number} [fromIndex] The index to start the search. If not specified, defaults to 0.
+ * @returns {Observable} And observable sequence containing the last index at which a given element can be found in the observable sequence, or -1 if it is not present.
+ */
+ observableProto.lastIndexOf = function(searchElement, fromIndex) {
+ var n = +fromIndex || 0;
+ Math.abs(n) === Infinity && (n = 0);
+ return new LastIndexOfObservable(this, searchElement, n);
+ };
+
+ return Rx;
+}));
diff --git a/tools/node_modules/eslint/node_modules/rx-lite-aggregates/rx.lite.aggregates.map b/tools/node_modules/eslint/node_modules/rx-lite-aggregates/rx.lite.aggregates.map
new file mode 100644
index 0000000000..11fbf10e4b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/rx-lite-aggregates/rx.lite.aggregates.map
@@ -0,0 +1 @@
+{"version":3,"file":"rx.lite.aggregates.min.js","sources":["rx.lite.aggregates.js"],"names":["factory","checkGlobal","value","Object","objectTypes","function","object","freeExports","exports","nodeType","freeModule","module","freeGlobal","global","freeSelf","self","freeWindow","window","thisGlobal","this","root","Function","define","amd","Rx","require","call","exp","undefined","tryCatcherGen","tryCatchTarget","apply","arguments","e","errorObj","firstOnly","x","length","EmptyError","findValue","source","predicate","thisArg","yieldIndex","callback","bindCallback","AnonymousObservable","o","subscribe","FindValueObserver","Observable","observableProto","prototype","BinaryDisposable","AbstractObserver","internals","disposableEmpty","Disposable","empty","helpers","defaultComparer","identity","defaultSubComparer","isFunction","isPromise","isArrayLike","isIterable","inherits","observableFromPromise","fromPromise","observableFrom","from","ObservableBase","ArgumentOutOfRangeError","tryCatch","fn","TypeError","ExtremaByObservable","__super__","k","c","_k","_c","subscribeCore","ExtremaByObserver","_o","_v","_hv","_l","next","key","onError","comparison","push","error","completed","onNext","onCompleted","ReduceObservable","accumulator","hasSeed","seed","observer","ReduceObserver","parent","_p","_fn","_hs","_s","_ha","_a","_i","reduce","SomeObservable","SomeObserver","s","result","Boolean","some","IsEmptyObservable","IsEmptyObserver","isEmpty","EveryObservable","EveryObserver","every","IncludesObservable","elem","idx","n","Math","abs","Infinity","_elem","_n","IncludesObserver","comparer","a","b","isNaN","includes","searchElement","fromIndex","CountObservable","CountObserver","count","IndexOfObservable","_e","IndexOfObserver","indexOf","SumObservable","SumObserver","sum","keySelector","minBy","y","min","map","maxBy","max","AverageObservable","AverageObserver","_t","r","average","sequenceEqual","second","first","donel","doner","ql","qr","subscription1","v","shift","equal","subscription2","ElementAtObservable","i","d","_d","ElementAtObserver","elementAt","index","defaultValue","SingleObserver","obj","_obj","shouldYield","res","Error","single","FirstObservable","FirstObserver","LastObservable","LastObserver","last","_cb","_y","shouldRun","find","findIndex","ToSetObservable","ToSetObserver","Set","add","toSet","ToMapObservable","ToMapObserver","_m","Map","set","toMap","elementSelector","SliceObservable","_b","SliceObserver","slice","begin","end","start","LastIndexOfObservable","LastIndexOfObserver","lastIndexOf"],"mappings":";CAEE,SAAUA,GAMV,QAASC,GAAYC,GACnB,MAAQA,IAASA,EAAMC,SAAWA,OAAUD,EAAQ,KANtD,GAAIE,IACFC,YAAY,EACZC,QAAU,GAORC,EAAeH,QAAmBI,WAAYA,UAAYA,QAAQC,SAAYD,QAAU,KACxFE,EAAcN,QAAmBO,UAAWA,SAAWA,OAAOF,SAAYE,OAAS,KACnFC,EAAaX,EAAYM,GAAeG,GAAgC,gBAAXG,SAAuBA,QACpFC,EAAWb,EAAYG,QAAmBW,QAASA,MACnDC,EAAaf,EAAYG,QAAmBa,UAAWA,QAEvDC,GADiBR,GAAcA,EAAWF,UAAYD,EAAeA,EAAc,KACtEN,EAAYG,QAAmBe,QAASA,OACrDC,EAAOR,GAAgBI,KAAgBE,GAAcA,EAAWD,SAAYD,GAAeF,GAAYI,GAAcG,SAAS,gBAG5G,mBAAXC,SAAyBA,OAAOC,IACzCD,QAAQ,aAAc,SAAUE,EAAIhB,GAClC,MAAOR,GAAQoB,EAAMZ,EAASgB,KAEL,gBAAXb,SAAuBA,QAAUA,OAAOH,UAAYD,EACpEI,OAAOH,QAAUR,EAAQoB,EAAMT,OAAOH,QAASiB,QAAQ,YAEvDL,EAAKI,GAAKxB,EAAQoB,KAAUA,EAAKI,MAEnCE,KAAKP,KAAM,SAAUC,EAAMO,EAAKH,EAAII,GA2BpC,QAASC,GAAcC,GACrB,MAAO,YACL,IACE,MAAOA,GAAeC,MAAMZ,KAAMa,WAClC,MAAOC,GAEP,MADAC,GAASD,EAAIA,EACNC,IAwEb,QAASC,GAAUC,GACjB,GAAiB,IAAbA,EAAEC,OAAgB,KAAM,IAAIC,EAChC,OAAOF,GAAE,GAm8BX,QAASG,GAAWC,EAAQC,EAAWC,EAASC,GAC9C,GAAIC,GAAWC,EAAaJ,EAAWC,EAAS,EAChD,OAAO,IAAII,GAAoB,SAAUC,GACvC,MAAOP,GAAOQ,UAAU,GAAIC,IAAkBF,EAAGP,EAAQI,EAAUD,KAClEH,GA/iCL,GAAIU,GAAa1B,EAAG0B,WAClBC,EAAkBD,EAAWE,UAC7BC,EAAmB7B,EAAG6B,iBACtBP,EAAsBtB,EAAGsB,oBACzBQ,EAAmB9B,EAAG+B,UAAUD,iBAChCE,EAAkBhC,EAAGiC,WAAWC,MAChCC,EAAUnC,EAAGmC,QACbC,EAAkBD,EAAQC,gBAC1BC,EAAWF,EAAQE,SACnBC,EAAqBH,EAAQG,mBAC7BC,EAAaJ,EAAQI,WACrBC,EAAYL,EAAQK,UACpBC,EAAcN,EAAQM,YACtBC,EAAaP,EAAQO,WACrBC,EAAW3C,EAAG+B,UAAUY,SACxBC,EAAwBlB,EAAWmB,YACnCC,EAAiBpB,EAAWqB,KAC5B1B,EAAerB,EAAG+B,UAAUV,aAC5BP,EAAad,EAAGc,WAChBkC,EAAiBhD,EAAGgD,eACpBC,EAA0BjD,EAAGiD,wBAE3BvC,GAAYD,MAaZyC,EAAWlD,EAAG+B,UAAUmB,SAAW,SAAkBC,GACvD,IAAKZ,EAAWY,GAAO,KAAM,IAAIC,WAAU,wBAC3C,OAAO/C,GAAc8C,IAOnBE,EAAuB,SAAUC,GAEnC,QAASD,GAAoBrC,EAAQuC,EAAGC,GACtC7D,KAAKqB,OAASA,EACdrB,KAAK8D,GAAKF,EACV5D,KAAK+D,GAAKF,EACVF,EAAUpD,KAAKP,MAOjB,MAZAgD,GAASU,EAAqBC,GAQ9BD,EAAoBzB,UAAU+B,cAAgB,SAAUpC,GACtD,MAAO5B,MAAKqB,OAAOQ,UAAU,GAAIoC,GAAkBrC,EAAG5B,KAAK8D,GAAI9D,KAAK+D,MAG/DL,GACPL,GAEEY,EAAqB,SAAUN,GAEjC,QAASM,GAAkBrC,EAAGgC,EAAGC,GAC/B7D,KAAKkE,GAAKtC,EACV5B,KAAK8D,GAAKF,EACV5D,KAAK+D,GAAKF,EACV7D,KAAKmE,GAAK,KACVnE,KAAKoE,KAAM,EACXpE,KAAKqE,MACLV,EAAUpD,KAAKP,MA8BjB,MAtCAgD,GAASiB,EAAmBN,GAW5BM,EAAkBhC,UAAUqC,KAAO,SAAUrD,GAC3C,GAAIsD,GAAMhB,EAASvD,KAAK8D,IAAI7C,EAC5B,IAAIsD,IAAQxD,EAAY,MAAOf,MAAKkE,GAAGM,QAAQD,EAAIzD,EACnD,IAAI2D,GAAa,CACjB,IAAKzE,KAAKoE,KAKR,GADAK,EAAalB,EAASvD,KAAK+D,IAAIQ,EAAKvE,KAAKmE,IACrCM,IAAe1D,EAAY,MAAOf,MAAKkE,GAAGM,QAAQC,EAAW3D,OAJjEd,MAAKoE,KAAM,EACXpE,KAAKmE,GAAKI,CAKRE,GAAa,IACfzE,KAAKmE,GAAKI,EACVvE,KAAKqE,OAEHI,GAAc,GAAKzE,KAAKqE,GAAGK,KAAKzD,IAGtCgD,EAAkBhC,UAAU0C,MAAQ,SAAU7D,GAC5Cd,KAAKkE,GAAGM,QAAQ1D,IAGlBmD,EAAkBhC,UAAU2C,UAAY,WACtC5E,KAAKkE,GAAGW,OAAO7E,KAAKqE,IACpBrE,KAAKkE,GAAGY,eAGHb,GACP9B,GAOE4C,EAAoB,SAASpB,GAE/B,QAASoB,GAAiB1D,EAAQ2D,EAAaC,EAASC,GACtDlF,KAAKqB,OAASA,EACdrB,KAAKgF,YAAcA,EACnBhF,KAAKiF,QAAUA,EACfjF,KAAKkF,KAAOA,EACZvB,EAAUpD,KAAKP,MAOjB,MAbAgD,GAAS+B,EAAkBpB,GAS3BoB,EAAiB9C,UAAU+B,cAAgB,SAASmB,GAClD,MAAOnF,MAAKqB,OAAOQ,UAAU,GAAIuD,GAAeD,EAASnF,QAGpD+E,GACP1B,GAEE+B,EAAkB,SAAUzB,GAE9B,QAASyB,GAAexD,EAAGyD,GACzBrF,KAAKkE,GAAKtC,EACV5B,KAAKsF,GAAKD,EACVrF,KAAKuF,IAAMF,EAAOL,YAClBhF,KAAKwF,IAAMH,EAAOJ,QAClBjF,KAAKyF,GAAKJ,EAAOH,KACjBlF,KAAK0F,KAAM,EACX1F,KAAK2F,GAAK,KACV3F,KAAKoE,KAAM,EACXpE,KAAK4F,GAAK,EACVjC,EAAUpD,KAAKP,MA0BjB,MArCAgD,GAASoC,EAAgBzB,GAczByB,EAAenD,UAAUqC,KAAO,SAAUrD,GAQxC,OAPCjB,KAAKoE,MAAQpE,KAAKoE,KAAM,GACrBpE,KAAK0F,IACP1F,KAAK2F,GAAKpC,EAASvD,KAAKuF,KAAKvF,KAAK2F,GAAI1E,EAAGjB,KAAK4F,GAAI5F,KAAKsF,KAEvDtF,KAAK2F,GAAK3F,KAAKwF,IAAMjC,EAASvD,KAAKuF,KAAKvF,KAAKyF,GAAIxE,EAAGjB,KAAK4F,GAAI5F,KAAKsF,IAAMrE,EACxEjB,KAAK0F,KAAM,GAET1F,KAAK2F,KAAO5E,EAAmBf,KAAKkE,GAAGM,QAAQxE,KAAK2F,GAAG7E,OAC3Dd,MAAK4F,MAGPR,EAAenD,UAAU0C,MAAQ,SAAU7D,GACzCd,KAAKkE,GAAGM,QAAQ1D,IAGlBsE,EAAenD,UAAU2C,UAAY,WACnC5E,KAAKoE,KAAOpE,KAAKkE,GAAGW,OAAO7E,KAAK2F,KAC/B3F,KAAKoE,KAAOpE,KAAKwF,KAAOxF,KAAKkE,GAAGW,OAAO7E,KAAKyF,KAC5CzF,KAAKoE,MAAQpE,KAAKwF,KAAOxF,KAAKkE,GAAGM,QAAQ,GAAIrD,IAC9CnB,KAAKkE,GAAGY,eAGHM,GACPjD,EASFH,GAAgB6D,OAAS,WACvB,GAAqBX,GAAjBD,GAAU,EAAaD,EAAcnE,UAAU,EAKnD,OAJyB,KAArBA,UAAUK,SACZ+D,GAAU,EACVC,EAAOrE,UAAU,IAEZ,GAAIkE,GAAiB/E,KAAMgF,EAAaC,EAASC,GAG1D,IAAIY,GAAkB,SAAUnC,GAE9B,QAASmC,GAAezE,EAAQmC,GAC9BxD,KAAKqB,OAASA,EACdrB,KAAKuF,IAAM/B,EACXG,EAAUpD,KAAKP,MAOjB,MAXAgD,GAAS8C,EAAgBnC,GAOzBmC,EAAe7D,UAAU+B,cAAgB,SAAUpC,GACjD,MAAO5B,MAAKqB,OAAOQ,UAAU,GAAIkE,GAAanE,EAAG5B,KAAKuF,IAAKvF,KAAKqB,UAG3DyE,GACPzC,GAEE0C,EAAgB,SAAUpC,GAG5B,QAASoC,GAAanE,EAAG4B,EAAIwC,GAC3BhG,KAAKkE,GAAKtC,EACV5B,KAAKuF,IAAM/B,EACXxD,KAAKyF,GAAKO,EACVhG,KAAK4F,GAAK,EACVjC,EAAUpD,KAAKP,MAiBjB,MAxBAgD,GAAS+C,EAAcpC,GAUvBoC,EAAa9D,UAAUqC,KAAO,SAAUrD,GACtC,GAAIgF,GAAS1C,EAASvD,KAAKuF,KAAKtE,EAAGjB,KAAK4F,KAAM5F,KAAKyF,GACnD,OAAIQ,KAAWlF,EAAmBf,KAAKkE,GAAGM,QAAQyB,EAAOnF,QACrDoF,QAAQD,KACVjG,KAAKkE,GAAGW,QAAO,GACf7E,KAAKkE,GAAGY,iBAGZiB,EAAa9D,UAAU0C,MAAQ,SAAU7D,GAAKd,KAAKkE,GAAGM,QAAQ1D,IAC9DiF,EAAa9D,UAAU2C,UAAY,WACjC5E,KAAKkE,GAAGW,QAAO,GACf7E,KAAKkE,GAAGY,eAGHiB,GACP5D,EAOFH,GAAgBmE,KAAO,SAAU7E,EAAWC,GAC1C,GAAIiC,GAAK9B,EAAaJ,EAAWC,EAAS,EAC1C,OAAO,IAAIuE,GAAe9F,KAAMwD,GAGlC,IAAI4C,GAAqB,SAAUzC,GAEjC,QAASyC,GAAkB/E,GACzBrB,KAAKqB,OAASA,EACdsC,EAAUpD,KAAKP,MAOjB,MAVAgD,GAASoD,EAAmBzC,GAM5ByC,EAAkBnE,UAAU+B,cAAgB,SAAUpC,GACpD,MAAO5B,MAAKqB,OAAOQ,UAAU,GAAIwE,GAAgBzE,KAG5CwE,GACP/C,GAEEgD,EAAmB,SAAS1C,GAE9B,QAAS0C,GAAgBzE,GACvB5B,KAAKkE,GAAKtC,EACV+B,EAAUpD,KAAKP,MAajB,MAhBAgD,GAASqD,EAAiB1C,GAM1B0C,EAAgBpE,UAAUqC,KAAO,WAC/BtE,KAAKkE,GAAGW,QAAO,GACf7E,KAAKkE,GAAGY,eAEVuB,EAAgBpE,UAAU0C,MAAQ,SAAU7D,GAAKd,KAAKkE,GAAGM,QAAQ1D,IACjEuF,EAAgBpE,UAAU2C,UAAY,WACpC5E,KAAKkE,GAAGW,QAAO,GACf7E,KAAKkE,GAAGY,eAGHuB,GACPlE,EAMFH,GAAgBsE,QAAU,WACxB,MAAO,IAAIF,GAAkBpG,MAG/B,IAAIuG,GAAmB,SAAU5C,GAE/B,QAAS4C,GAAgBlF,EAAQmC,GAC/BxD,KAAKqB,OAASA,EACdrB,KAAKuF,IAAM/B,EACXG,EAAUpD,KAAKP,MAOjB,MAXAgD,GAASuD,EAAiB5C,GAO1B4C,EAAgBtE,UAAU+B,cAAgB,SAAUpC,GAClD,MAAO5B,MAAKqB,OAAOQ,UAAU,GAAI2E,GAAc5E,EAAG5B,KAAKuF,IAAKvF,KAAKqB,UAG5DkF,GACPlD,GAEEmD,EAAiB,SAAU7C,GAG7B,QAAS6C,GAAc5E,EAAG4B,EAAIwC,GAC5BhG,KAAKkE,GAAKtC,EACV5B,KAAKuF,IAAM/B,EACXxD,KAAKyF,GAAKO,EACVhG,KAAK4F,GAAK,EACVjC,EAAUpD,KAAKP,MAiBjB,MAxBAgD,GAASwD,EAAe7C,GAUxB6C,EAAcvE,UAAUqC,KAAO,SAAUrD,GACvC,GAAIgF,GAAS1C,EAASvD,KAAKuF,KAAKtE,EAAGjB,KAAK4F,KAAM5F,KAAKyF,GACnD,OAAIQ,KAAWlF,EAAmBf,KAAKkE,GAAGM,QAAQyB,EAAOnF,QACpDoF,QAAQD,KACXjG,KAAKkE,GAAGW,QAAO,GACf7E,KAAKkE,GAAGY,iBAGZ0B,EAAcvE,UAAU0C,MAAQ,SAAU7D,GAAKd,KAAKkE,GAAGM,QAAQ1D,IAC/D0F,EAAcvE,UAAU2C,UAAY,WAClC5E,KAAKkE,GAAGW,QAAO,GACf7E,KAAKkE,GAAGY,eAGH0B,GACPrE,EAQFH,GAAgByE,MAAQ,SAAUnF,EAAWC,GAC3C,GAAIiC,GAAK9B,EAAaJ,EAAWC,EAAS,EAC1C,OAAO,IAAIgF,GAAgBvG,KAAMwD,GAGnC,IAAIkD,GAAsB,SAAU/C,GAElC,QAAS+C,GAAmBrF,EAAQsF,EAAMC,GACxC,GAAIC,IAAKD,GAAO,CAChBE,MAAKC,IAAIF,KAAOG,EAAAA,IAAaH,EAAI,GAEjC7G,KAAKqB,OAASA,EACdrB,KAAKiH,MAAQN,EACb3G,KAAKkH,GAAKL,EACVlD,EAAUpD,KAAKP,MAajB,MArBAgD,GAAS0D,EAAoB/C,GAW7B+C,EAAmBzE,UAAU+B,cAAgB,SAAUpC,GACrD,MAAI5B,MAAKkH,GAAK,GACZtF,EAAEiD,QAAO,GACTjD,EAAEkD,cACKzC,GAGFrC,KAAKqB,OAAOQ,UAAU,GAAIsF,GAAiBvF,EAAG5B,KAAKiH,MAAOjH,KAAKkH,MAGjER,GACPrD,GAEE8D,EAAoB,SAAUxD,GAEhC,QAASwD,GAAiBvF,EAAG+E,EAAME,GACjC7G,KAAKkE,GAAKtC,EACV5B,KAAKiH,MAAQN,EACb3G,KAAKkH,GAAKL,EACV7G,KAAK4F,GAAK,EACVjC,EAAUpD,KAAKP,MAGjB,QAASoH,GAASC,EAAGC,GACnB,MAAc,KAAND,GAAiB,IAANC,GAAaD,IAAMC,GAAMC,MAAMF,IAAME,MAAMD,GAYhE,MAtBAtE,GAASmE,EAAkBxD,GAa3BwD,EAAiBlF,UAAUqC,KAAO,SAAUrD,GACtCjB,KAAK4F,MAAQ5F,KAAKkH,IAAME,EAASnG,EAAGjB,KAAKiH,SAC3CjH,KAAKkE,GAAGW,QAAO,GACf7E,KAAKkE,GAAGY,gBAGZqC,EAAiBlF,UAAU0C,MAAQ,SAAU7D,GAAKd,KAAKkE,GAAGM,QAAQ1D,IAClEqG,EAAiBlF,UAAU2C,UAAY,WAAc5E,KAAKkE,GAAGW,QAAO,GAAQ7E,KAAKkE,GAAGY,eAE7EqC,GACPhF,EAQFH,GAAgBwF,SAAW,SAAUC,EAAeC,GAClD,MAAO,IAAIhB,GAAmB1G,KAAMyH,EAAeC,GAGrD,IAAIC,GAAmB,SAAUhE,GAE/B,QAASgE,GAAgBtG,EAAQmC,GAC/BxD,KAAKqB,OAASA,EACdrB,KAAKuF,IAAM/B,EACXG,EAAUpD,KAAKP,MAOjB,MAXAgD,GAAS2E,EAAiBhE,GAO1BgE,EAAgB1F,UAAU+B,cAAgB,SAAUpC,GAClD,MAAO5B,MAAKqB,OAAOQ,UAAU,GAAI+F,GAAchG,EAAG5B,KAAKuF,IAAKvF,KAAKqB,UAG5DsG,GACPtE,GAEEuE,EAAiB,SAAUjE,GAG7B,QAASiE,GAAchG,EAAG4B,EAAIwC,GAC5BhG,KAAKkE,GAAKtC,EACV5B,KAAKuF,IAAM/B,EACXxD,KAAKyF,GAAKO,EACVhG,KAAK4F,GAAK,EACV5F,KAAK+D,GAAK,EACVJ,EAAUpD,KAAKP,MAkBjB,MA1BAgD,GAAS4E,EAAejE,GAWxBiE,EAAc3F,UAAUqC,KAAO,SAAUrD,GACvC,GAAIjB,KAAKuF,IAAK,CACZ,GAAIU,GAAS1C,EAASvD,KAAKuF,KAAKtE,EAAGjB,KAAK4F,KAAM5F,KAAKyF,GACnD,IAAIQ,IAAWlF,EAAY,MAAOf,MAAKkE,GAAGM,QAAQyB,EAAOnF,EACzDoF,SAAQD,IAAYjG,KAAK+D,SAEzB/D,MAAK+D,MAGT6D,EAAc3F,UAAU0C,MAAQ,SAAU7D,GAAKd,KAAKkE,GAAGM,QAAQ1D,IAC/D8G,EAAc3F,UAAU2C,UAAY,WAClC5E,KAAKkE,GAAGW,OAAO7E,KAAK+D,IACpB/D,KAAKkE,GAAGY,eAGH8C,GACPzF,EAWFH,GAAgB6F,MAAQ,SAAUvG,EAAWC,GAC3C,GAAIiC,GAAK9B,EAAaJ,EAAWC,EAAS,EAC1C,OAAO,IAAIoG,GAAgB3H,KAAMwD,GAGnC,IAAIsE,GAAqB,SAAUnE,GAEjC,QAASmE,GAAkBzG,EAAQP,EAAG+F,GACpC7G,KAAKqB,OAASA,EACdrB,KAAK+H,GAAKjH,EACVd,KAAKkH,GAAKL,EACVlD,EAAUpD,KAAKP,MAajB,MAlBAgD,GAAS8E,EAAmBnE,GAQ5BmE,EAAkB7F,UAAU+B,cAAgB,SAAUpC,GACpD,MAAI5B,MAAKkH,GAAK,GACZtF,EAAEiD,OAAO,IACTjD,EAAEkD,cACKzC,GAGFrC,KAAKqB,OAAOQ,UAAU,GAAImG,GAAgBpG,EAAG5B,KAAK+H,GAAI/H,KAAKkH,MAG7DY,GACPzE,GAEE2E,EAAmB,SAAUrE,GAE/B,QAASqE,GAAgBpG,EAAGd,EAAG+F,GAC7B7G,KAAKkE,GAAKtC,EACV5B,KAAK+H,GAAKjH,EACVd,KAAKkH,GAAKL,EACV7G,KAAK4F,GAAK,EACVjC,EAAUpD,KAAKP,MAajB,MAnBAgD,GAASgF,EAAiBrE,GAS1BqE,EAAgB/F,UAAUqC,KAAO,SAAUrD,GACrCjB,KAAK4F,IAAM5F,KAAKkH,IAAMjG,IAAMjB,KAAK+H,KACnC/H,KAAKkE,GAAGW,OAAO7E,KAAK4F,IACpB5F,KAAKkE,GAAGY,eAEV9E,KAAK4F,MAEPoC,EAAgB/F,UAAU0C,MAAQ,SAAU7D,GAAKd,KAAKkE,GAAGM,QAAQ1D,IACjEkH,EAAgB/F,UAAU2C,UAAY,WAAc5E,KAAKkE,GAAGW,OAAO,IAAK7E,KAAKkE,GAAGY,eAEzEkD,GACP7F,EAQFH,GAAgBiG,QAAU,SAASR,EAAeC,GAChD,GAAIb,IAAKa,GAAa,CAEtB,OADAZ,MAAKC,IAAIF,KAAOG,EAAAA,IAAaH,EAAI,GAC1B,GAAIiB,GAAkB9H,KAAMyH,EAAeZ,GAGpD,IAAIqB,GAAiB,SAAUvE,GAE7B,QAASuE,GAAc7G,EAAQmC,GAC7BxD,KAAKqB,OAASA,EACdrB,KAAKuF,IAAM/B,EACXG,EAAUpD,KAAKP,MAOjB,MAXAgD,GAASkF,EAAevE,GAOxBuE,EAAcjG,UAAU+B,cAAgB,SAAUpC,GAChD,MAAO5B,MAAKqB,OAAOQ,UAAU,GAAIsG,GAAYvG,EAAG5B,KAAKuF,IAAKvF,KAAKqB,UAG1D6G,GACP7E,GAEE8E,EAAe,SAAUxE,GAG3B,QAASwE,GAAYvG,EAAG4B,EAAIwC,GAC1BhG,KAAKkE,GAAKtC,EACV5B,KAAKuF,IAAM/B,EACXxD,KAAKyF,GAAKO,EACVhG,KAAK4F,GAAK,EACV5F,KAAK+D,GAAK,EACVJ,EAAUpD,KAAKP,MAkBjB,MA1BAgD,GAASmF,EAAaxE,GAWtBwE,EAAYlG,UAAUqC,KAAO,SAAUrD,GACrC,GAAIjB,KAAKuF,IAAK,CACZ,GAAIU,GAAS1C,EAASvD,KAAKuF,KAAKtE,EAAGjB,KAAK4F,KAAM5F,KAAKyF,GACnD,IAAIQ,IAAWlF,EAAY,MAAOf,MAAKkE,GAAGM,QAAQyB,EAAOnF,EACzDd,MAAK+D,IAAMkC,MAEXjG,MAAK+D,IAAM9C,GAGfkH,EAAYlG,UAAU0C,MAAQ,SAAU7D,GAAKd,KAAKkE,GAAGM,QAAQ1D,IAC7DqH,EAAYlG,UAAU2C,UAAY,WAChC5E,KAAKkE,GAAGW,OAAO7E,KAAK+D,IACpB/D,KAAKkE,GAAGY,eAGHqD,GACPhG,EAQFH,GAAgBoG,IAAM,SAAUC,EAAa9G,GAC3C,GAAIiC,GAAK9B,EAAa2G,EAAa9G,EAAS,EAC5C,OAAO,IAAI2G,GAAclI,KAAMwD,IAYjCxB,EAAgBsG,MAAQ,SAAUD,EAAajB,GAE7C,MADAA,KAAaA,EAAWzE,GACjB,GAAIe,GAAoB1D,KAAMqI,EAAa,SAAUpH,EAAGsH,GAAK,MAAwB,GAAjBnB,EAASnG,EAAGsH,MAWzFvG,EAAgBwG,IAAM,SAAUpB,GAC9B,MAAOpH,MAAKsI,MAAM5F,EAAU0E,GAAUqB,IAAIzH,IAY5CgB,EAAgB0G,MAAQ,SAAUL,EAAajB,GAE7C,MADAA,KAAaA,EAAWzE,GACjB,GAAIe,GAAoB1D,KAAMqI,EAAajB,IAWpDpF,EAAgB2G,IAAM,SAAUvB,GAC9B,MAAOpH,MAAK0I,MAAMhG,EAAU0E,GAAUqB,IAAIzH,GAG5C,IAAI4H,GAAqB,SAAUjF,GAEjC,QAASiF,GAAkBvH,EAAQmC,GACjCxD,KAAKqB,OAASA,EACdrB,KAAKuF,IAAM/B,EACXG,EAAUpD,KAAKP,MAOjB,MAXAgD,GAAS4F,EAAmBjF,GAO5BiF,EAAkB3G,UAAU+B,cAAgB,SAAUpC,GACpD,MAAO5B,MAAKqB,OAAOQ,UAAU,GAAIgH,GAAgBjH,EAAG5B,KAAKuF,IAAKvF,KAAKqB,UAG9DuH,GACPvF,GAEEwF,EAAmB,SAASlF,GAE9B,QAASkF,GAAgBjH,EAAG4B,EAAIwC,GAC9BhG,KAAKkE,GAAKtC,EACV5B,KAAKuF,IAAM/B,EACXxD,KAAKyF,GAAKO,EACVhG,KAAK+D,GAAK,EACV/D,KAAK8I,GAAK,EACVnF,EAAUpD,KAAKP,MAoBjB,MA3BAgD,GAAS6F,EAAiBlF,GAU1BkF,EAAgB5G,UAAUqC,KAAO,SAAUrD,GACzC,GAAGjB,KAAKuF,IAAK,CACX,GAAIwD,GAAIxF,EAASvD,KAAKuF,KAAKtE,EAAGjB,KAAK+D,KAAM/D,KAAKyF,GAC9C,IAAIsD,IAAMhI,EAAY,MAAOf,MAAKkE,GAAGM,QAAQuE,EAAEjI,EAC/Cd,MAAK8I,IAAMC,MAEX/I,MAAK+D,KACL/D,KAAK8I,IAAM7H,GAGf4H,EAAgB5G,UAAU0C,MAAQ,SAAU7D,GAAKd,KAAKkE,GAAGM,QAAQ1D,IACjE+H,EAAgB5G,UAAU2C,UAAY,WACpC,MAAgB,KAAZ5E,KAAK+D,GAAmB/D,KAAKkE,GAAGM,QAAQ,GAAIrD,KAChDnB,KAAKkE,GAAGW,OAAO7E,KAAK8I,GAAK9I,KAAK+D,QAC9B/D,MAAKkE,GAAGY,gBAGH+D,GACP1G,EAQFH,GAAgBgH,QAAU,SAAUX,EAAa9G,GAC/C,GAAmBiC,GAAfnC,EAASrB,IAIb,OAHI4C,GAAWyF,KACb7E,EAAK9B,EAAa2G,EAAa9G,EAAS,IAEnC,GAAIqH,GAAkBvH,EAAQmC,IAevCxB,EAAgBiH,cAAgB,SAAUC,EAAQ9B,GAChD,GAAI+B,GAAQnJ,IAEZ,OADAoH,KAAaA,EAAW3E,GACjB,GAAId,GAAoB,SAAUC,GACvC,GAAIwH,IAAQ,EAAOC,GAAQ,EAAOC,KAASC,KACvCC,EAAgBL,EAAMtH,UAAU,SAAUZ,GAC5C,GAAIsI,EAAGrI,OAAS,EAAG,CACjB,GAAIuI,GAAIF,EAAGG,QACPC,EAAQpG,EAAS6D,GAAUqC,EAAGxI,EAClC,IAAI0I,IAAU5I,EAAY,MAAOa,GAAE4C,QAAQmF,EAAM7I,EAC5C6I,KACH/H,EAAEiD,QAAO,GACTjD,EAAEkD,mBAEKuE,IACTzH,EAAEiD,QAAO,GACTjD,EAAEkD,eAEFwE,EAAG5E,KAAKzD,IAET,SAASH,GAAKc,EAAE4C,QAAQ1D,IAAO,WAChCsI,GAAQ,EACU,IAAdE,EAAGpI,SACDqI,EAAGrI,OAAS,GACdU,EAAEiD,QAAO,GACTjD,EAAEkD,eACOuE,IACTzH,EAAEiD,QAAO,GACTjD,EAAEkD,mBAKPhC,EAAYoG,IAAWnG,EAAWmG,MAAaA,EAAS/F,EAAe+F,IACxErG,EAAUqG,KAAYA,EAASjG,EAAsBiG,GACrD,IAAIU,GAAgBV,EAAOrH,UAAU,SAAUZ,GAC7C,GAAIqI,EAAGpI,OAAS,EAAG,CACjB,GAAIuI,GAAIH,EAAGI,QACPC,EAAQpG,EAAS6D,GAAUqC,EAAGxI,EAClC,IAAI0I,IAAU5I,EAAY,MAAOa,GAAE4C,QAAQmF,EAAM7I,EAC5C6I,KACH/H,EAAEiD,QAAO,GACTjD,EAAEkD,mBAEKsE,IACTxH,EAAEiD,QAAO,GACTjD,EAAEkD,eAEFyE,EAAG7E,KAAKzD,IAET,SAASH,GAAKc,EAAE4C,QAAQ1D,IAAO,WAChCuI,GAAQ,EACU,IAAdE,EAAGrI,SACDoI,EAAGpI,OAAS,GACdU,EAAEiD,QAAO,GACTjD,EAAEkD,eACOsE,IACTxH,EAAEiD,QAAO,GACTjD,EAAEkD,iBAIR,OAAO,IAAI5C,GAAiBsH,EAAeI,IAC1CT,GAGL,IAAIU,GAAuB,SAAUlG,GAEnC,QAASkG,GAAoBxI,EAAQyI,EAAGC,GACtC/J,KAAKqB,OAASA,EACdrB,KAAK4F,GAAKkE,EACV9J,KAAKgK,GAAKD,EACVpG,EAAUpD,KAAKP,MAOjB,MAZAgD,GAAS6G,EAAqBlG,GAQ9BkG,EAAoB5H,UAAU+B,cAAgB,SAAUpC,GACtD,MAAO5B,MAAKqB,OAAOQ,UAAU,GAAIoI,GAAkBrI,EAAG5B,KAAK4F,GAAI5F,KAAKgK,MAG/DH,GACPxG,GAEE4G,EAAqB,SAAUtG,GAGjC,QAASsG,GAAkBrI,EAAGkI,EAAGC,GAC/B/J,KAAKkE,GAAKtC,EACV5B,KAAK4F,GAAKkE,EACV9J,KAAKgK,GAAKD,EACVpG,EAAUpD,KAAKP,MAmBjB,MAzBAgD,GAASiH,EAAmBtG,GAS5BsG,EAAkBhI,UAAUqC,KAAO,SAAUrD,GACzB,IAAdjB,KAAK4F,OACP5F,KAAKkE,GAAGW,OAAO5D,GACfjB,KAAKkE,GAAGY,gBAGZmF,EAAkBhI,UAAU0C,MAAQ,SAAU7D,GAAKd,KAAKkE,GAAGM,QAAQ1D,IACnEmJ,EAAkBhI,UAAU2C,UAAY,WAClC5E,KAAKgK,KAAOvJ,EACdT,KAAKkE,GAAGM,QAAQ,GAAIlB,KAEpBtD,KAAKkE,GAAGW,OAAO7E,KAAKgK,IACpBhK,KAAKkE,GAAGY,gBAILmF,GACP9H,EAQFH,GAAgBkI,UAAa,SAAUC,EAAOC,GAC5C,GAAY,EAARD,EAAa,KAAM,IAAI7G,EAC3B,OAAO,IAAIuG,GAAoB7J,KAAMmK,EAAOC,GAG9C,IAAIC,GAAkB,SAAS1G,GAE7B,QAAS0G,GAAezI,EAAG0I,EAAKtE,GAC9BhG,KAAKkE,GAAKtC,EACV5B,KAAKuK,KAAOD,EACZtK,KAAKyF,GAAKO,EACVhG,KAAK4F,GAAK,EACV5F,KAAKoE,KAAM,EACXpE,KAAKmE,GAAK,KACVR,EAAUpD,KAAKP,MAkCjB,MA1CAgD,GAASqH,EAAgB1G,GAWzB0G,EAAepI,UAAUqC,KAAO,SAAUrD,GACxC,GAAIuJ,IAAc,CAClB,IAAIxK,KAAKuK,KAAKjJ,UAAW,CACvB,GAAImJ,GAAMlH,EAASvD,KAAKuK,KAAKjJ,WAAWL,EAAGjB,KAAK4F,KAAM5F,KAAKyF,GAC3D,IAAIgF,IAAQ1J,EAAY,MAAOf,MAAKkE,GAAGM,QAAQiG,EAAI3J,EACnDoF,SAAQuE,KAASD,GAAc,OACrBxK,MAAKuK,KAAKjJ,YACpBkJ,GAAc,EAEhB,IAAIA,EAAa,CACf,GAAIxK,KAAKoE,IACP,MAAOpE,MAAKkE,GAAGM,QAAQ,GAAIkG,OAAM,oDAEnC1K,MAAKoE,KAAM,EACXpE,KAAKmE,GAAKlD,IAGdoJ,EAAepI,UAAU0C,MAAQ,SAAU7D,GAAKd,KAAKkE,GAAGM,QAAQ1D,IAChEuJ,EAAepI,UAAU2C,UAAY,WAC/B5E,KAAKoE,KACPpE,KAAKkE,GAAGW,OAAO7E,KAAKmE,IACpBnE,KAAKkE,GAAGY,eAED9E,KAAKuK,KAAKH,eAAiB3J,EAClCT,KAAKkE,GAAGM,QAAQ,GAAIrD,KAEpBnB,KAAKkE,GAAGW,OAAO7E,KAAKuK,KAAKH,cACzBpK,KAAKkE,GAAGY,gBAILuF,GACPlI,EAOAH,GAAgB2I,OAAS,SAAUrJ,EAAWC,GAC5C,GAAI+I,MAAUjJ,EAASrB,IAUvB,IAREsK,EAD0B,gBAAjBzJ,WAAU,GACbA,UAAU,IAGdS,UAAWT,UAAU,GACrBU,QAASV,UAAU,GACnBuJ,aAAcvJ,UAAU,IAGxB+B,EAAY0H,EAAIhJ,WAAY,CAC9B,GAAIkC,GAAK8G,EAAIhJ,SACbgJ,GAAIhJ,UAAYI,EAAa8B,EAAI8G,EAAI/I,QAAS,GAEhD,MAAO,IAAII,GAAoB,SAAUC,GACvC,MAAOP,GAAOQ,UAAU,GAAIwI,GAAezI,EAAG0I,EAAKjJ,KAClDA,GAGP,IAAIuJ,GAAmB,SAAUjH,GAE/B,QAASiH,GAAgBvJ,EAAQiJ,GAC/BtK,KAAKqB,OAASA,EACdrB,KAAKuK,KAAOD,EACZ3G,EAAUpD,KAAKP,MAOjB,MAXAgD,GAAS4H,EAAiBjH,GAO1BiH,EAAgB3I,UAAU+B,cAAgB,SAAUpC,GAClD,MAAO5B,MAAKqB,OAAOQ,UAAU,GAAIgJ,IAAcjJ,EAAG5B,KAAKuK,KAAMvK,KAAKqB,UAG7DuJ,GACPvH,GAEEwH,GAAiB,SAASlH,GAE5B,QAASkH,GAAcjJ,EAAG0I,EAAKtE,GAC7BhG,KAAKkE,GAAKtC,EACV5B,KAAKuK,KAAOD,EACZtK,KAAKyF,GAAKO,EACVhG,KAAK4F,GAAK,EACVjC,EAAUpD,KAAKP,MA0BjB,MAhCAgD,GAAS6H,EAAelH,GASxBkH,EAAc5I,UAAUqC,KAAO,SAAUrD,GACvC,GAAIjB,KAAKuK,KAAKjJ,UAAW,CACvB,GAAImJ,GAAMlH,EAASvD,KAAKuK,KAAKjJ,WAAWL,EAAGjB,KAAK4F,KAAM5F,KAAKyF,GAC3D,IAAIgF,IAAQ1J,EAAY,MAAOf,MAAKkE,GAAGM,QAAQiG,EAAI3J,EAC/CoF,SAAQuE,KACVzK,KAAKkE,GAAGW,OAAO5D,GACfjB,KAAKkE,GAAGY,mBAEA9E,MAAKuK,KAAKjJ,YACpBtB,KAAKkE,GAAGW,OAAO5D,GACfjB,KAAKkE,GAAGY,gBAGZ+F,EAAc5I,UAAU0C,MAAQ,SAAU7D,GAAKd,KAAKkE,GAAGM,QAAQ1D,IAC/D+J,EAAc5I,UAAU2C,UAAY,WAC9B5E,KAAKuK,KAAKH,eAAiB3J,EAC7BT,KAAKkE,GAAGM,QAAQ,GAAIrD,KAEpBnB,KAAKkE,GAAGW,OAAO7E,KAAKuK,KAAKH,cACzBpK,KAAKkE,GAAGY,gBAIL+F,GACP1I,EAMFH,GAAgBmH,MAAQ,WACtB,GAAImB,KAUJ,IAREA,EAD0B,gBAAjBzJ,WAAU,GACbA,UAAU,IAGdS,UAAWT,UAAU,GACrBU,QAASV,UAAU,GACnBuJ,aAAcvJ,UAAU,IAGxB+B,EAAY0H,EAAIhJ,WAAY,CAC9B,GAAIkC,GAAK8G,EAAIhJ,SACbgJ,GAAIhJ,UAAYI,EAAa8B,EAAI8G,EAAI/I,QAAS,GAEhD,MAAO,IAAIqJ,GAAgB5K,KAAMsK,GAGnC,IAAIQ,IAAkB,SAAUnH,GAE9B,QAASmH,GAAezJ,EAAQiJ,GAC9BtK,KAAKqB,OAASA,EACdrB,KAAKuK,KAAOD,EACZ3G,EAAUpD,KAAKP,MAOjB,MAXAgD,GAAS8H,EAAgBnH,GAOzBmH,EAAe7I,UAAU+B,cAAgB,SAAUpC,GACjD,MAAO5B,MAAKqB,OAAOQ,UAAU,GAAIkJ,IAAanJ,EAAG5B,KAAKuK,KAAMvK,KAAKqB,UAG5DyJ,GACPzH,GAEE0H,GAAgB,SAASpH,GAE3B,QAASoH,GAAanJ,EAAG0I,EAAKtE,GAC5BhG,KAAKkE,GAAKtC,EACV5B,KAAKuK,KAAOD,EACZtK,KAAKyF,GAAKO,EACVhG,KAAK4F,GAAK,EACV5F,KAAKoE,KAAM,EACXpE,KAAKmE,GAAK,KACVR,EAAUpD,KAAKP,MA+BjB,MAvCAgD,GAAS+H,EAAcpH,GAWvBoH,EAAa9I,UAAUqC,KAAO,SAAUrD,GACtC,GAAIuJ,IAAc,CAClB,IAAIxK,KAAKuK,KAAKjJ,UAAW,CACvB,GAAImJ,GAAMlH,EAASvD,KAAKuK,KAAKjJ,WAAWL,EAAGjB,KAAK4F,KAAM5F,KAAKyF,GAC3D,IAAIgF,IAAQ1J,EAAY,MAAOf,MAAKkE,GAAGM,QAAQiG,EAAI3J,EACnDoF,SAAQuE,KAASD,GAAc,OACrBxK,MAAKuK,KAAKjJ,YACpBkJ,GAAc,EAEZA,KACFxK,KAAKoE,KAAM,EACXpE,KAAKmE,GAAKlD,IAGd8J,EAAa9I,UAAU0C,MAAQ,SAAU7D,GAAKd,KAAKkE,GAAGM,QAAQ1D,IAC9DiK,EAAa9I,UAAU2C,UAAY,WAC7B5E,KAAKoE,KACPpE,KAAKkE,GAAGW,OAAO7E,KAAKmE,IACpBnE,KAAKkE,GAAGY,eAED9E,KAAKuK,KAAKH,eAAiB3J,EAClCT,KAAKkE,GAAGM,QAAQ,GAAIrD,KAEpBnB,KAAKkE,GAAGW,OAAO7E,KAAKuK,KAAKH,cACzBpK,KAAKkE,GAAGY,gBAILiG,GACP5I,EAMFH,GAAgBgJ,KAAO,WACrB,GAAIV,KAUJ,IAREA,EAD0B,gBAAjBzJ,WAAU,GACbA,UAAU,IAGdS,UAAWT,UAAU,GACrBU,QAASV,UAAU,GACnBuJ,aAAcvJ,UAAU,IAGxB+B,EAAY0H,EAAIhJ,WAAY,CAC9B,GAAIkC,GAAK8G,EAAIhJ,SACbgJ,GAAIhJ,UAAYI,EAAa8B,EAAI8G,EAAI/I,QAAS,GAEhD,MAAO,IAAIuJ,IAAe9K,KAAMsK,GAGlC,IAAIxI,IAAqB,SAAS6B,GAEhC,QAAS7B,GAAkBqD,EAAU9D,EAAQI,EAAUD,GACrDxB,KAAKkE,GAAKiB,EACVnF,KAAKyF,GAAKpE,EACVrB,KAAKiL,IAAMxJ,EACXzB,KAAKkL,GAAK1J,EACVxB,KAAK4F,GAAK,EACVjC,EAAUpD,KAAKP,MAuBjB,MA9BAgD,GAASlB,EAAmB6B,GAU5B7B,EAAkBG,UAAUqC,KAAO,SAAUrD,GAC3C,GAAIkK,GAAY5H,EAASvD,KAAKiL,KAAKhK,EAAGjB,KAAK4F,GAAI5F,KAAKyF,GACpD,OAAI0F,KAAcpK,EAAmBf,KAAKkE,GAAGM,QAAQ2G,EAAUrK,QAC3DqK,GACFnL,KAAKkE,GAAGW,OAAO7E,KAAKkL,GAAKlL,KAAK4F,GAAK3E,GACnCjB,KAAKkE,GAAGY,eAER9E,KAAK4F,OAIT9D,EAAkBG,UAAU0C,MAAQ,SAAU7D,GAC5Cd,KAAKkE,GAAGM,QAAQ1D,IAGlBgB,EAAkBG,UAAU2C,UAAY,WACtC5E,KAAKkL,IAAMlL,KAAKkE,GAAGW,OAAO,IAC1B7E,KAAKkE,GAAGY,eAGHhD,GACPK,EAeFH,GAAgBoJ,KAAO,SAAU9J,EAAWC,GAC1C,MAAOH,GAAUpB,KAAMsB,EAAWC,GAAS,IAU7CS,EAAgBqJ,UAAY,SAAU/J,EAAWC,GAC/C,MAAOH,GAAUpB,KAAMsB,EAAWC,GAAS,GAG7C,IAAI+J,IAAmB,SAAU3H,GAE/B,QAAS2H,GAAgBjK,GACvBrB,KAAKqB,OAASA,EACdsC,EAAUpD,KAAKP,MAOjB,MAVAgD,GAASsI,EAAiB3H,GAM1B2H,EAAgBrJ,UAAU+B,cAAgB,SAAUpC,GAClD,MAAO5B,MAAKqB,OAAOQ,UAAU,GAAI0J,IAAc3J,KAG1C0J,GACPjI,GAEEkI,GAAiB,SAAU5H,GAE7B,QAAS4H,GAAc3J,GACrB5B,KAAKkE,GAAKtC,EACV5B,KAAKyF,GAAK,GAAIxF,GAAKuL,IACnB7H,EAAUpD,KAAKP,MAgBjB,MApBAgD,GAASuI,EAAe5H,GAOxB4H,EAActJ,UAAUqC,KAAO,SAAUrD,GACvCjB,KAAKyF,GAAGgG,IAAIxK,IAGdsK,EAActJ,UAAU0C,MAAQ,SAAU7D,GACxCd,KAAKkE,GAAGM,QAAQ1D,IAGlByK,EAActJ,UAAU2C,UAAY,WAClC5E,KAAKkE,GAAGW,OAAO7E,KAAKyF,IACpBzF,KAAKkE,GAAGY,eAGHyG,GACPpJ,EAMFH,GAAgB0J,MAAQ,WACtB,GAAwB,mBAAbzL,GAAKuL,IAAuB,KAAM,IAAI/H,UACjD,OAAO,IAAI6H,IAAgBtL,MAG7B,IAAI2L,IAAmB,SAAUhI,GAE/B,QAASgI,GAAgBtK,EAAQuC,EAAG9C,GAClCd,KAAKqB,OAASA,EACdrB,KAAK8D,GAAKF,EACV5D,KAAK+H,GAAKjH,EACV6C,EAAUpD,KAAKP,MAOjB,MAZAgD,GAAS2I,EAAiBhI,GAQ1BgI,EAAgB1J,UAAU+B,cAAgB,SAAUpC,GAClD,MAAO5B,MAAKqB,OAAOQ,UAAU,GAAI+J,IAAchK,EAAG5B,KAAK8D,GAAI9D,KAAK+H,MAG3D4D,GACPtI,GAEEuI,GAAiB,SAAUjI,GAE7B,QAASiI,GAAchK,EAAGgC,EAAG9C,GAC3Bd,KAAKkE,GAAKtC,EACV5B,KAAK8D,GAAKF,EACV5D,KAAK+H,GAAKjH,EACVd,KAAK6L,GAAK,GAAI5L,GAAK6L,IACnBnI,EAAUpD,KAAKP,MAwBjB,MA9BAgD,GAAS4I,EAAejI,GASxBiI,EAAc3J,UAAUqC,KAAO,SAAUrD,GACvC,GAAIsD,GAAMhB,EAASvD,KAAK8D,IAAI7C,EAC5B,IAAIsD,IAAQxD,EAAY,MAAOf,MAAKkE,GAAGM,QAAQD,EAAIzD,EACnD,IAAI6F,GAAO1F,CACX,OAAIjB,MAAK+H,KACPpB,EAAOpD,EAASvD,KAAK+H,IAAI9G,GACrB0F,IAAS5F,GAAmBf,KAAKkE,GAAGM,QAAQmC,EAAK7F,OAGvDd,MAAK6L,GAAGE,IAAIxH,EAAKoC,IAGnBiF,EAAc3J,UAAU0C,MAAQ,SAAU7D,GACxCd,KAAKkE,GAAGM,QAAQ1D,IAGlB8K,EAAc3J,UAAU2C,UAAY,WAClC5E,KAAKkE,GAAGW,OAAO7E,KAAK6L,IACpB7L,KAAKkE,GAAGY,eAGH8G,GACPzJ,EAQFH,GAAgBgK,MAAQ,SAAU3D,EAAa4D,GAC7C,GAAwB,mBAAbhM,GAAK6L,IAAuB,KAAM,IAAIrI,UACjD,OAAO,IAAIkI,IAAgB3L,KAAMqI,EAAa4D,GAGhD,IAAIC,IAAmB,SAAUvI,GAE/B,QAASuI,GAAgB7K,EAAQiG,EAAGxG,GAClCd,KAAKqB,OAASA,EACdrB,KAAKmM,GAAK7E,EACVtH,KAAK+H,GAAKjH,EACV6C,EAAUpD,KAAKP,MAOjB,MAZAgD,GAASkJ,EAAiBvI,GAQ1BuI,EAAgBjK,UAAU+B,cAAgB,SAAUpC,GAClD,MAAO5B,MAAKqB,OAAOQ,UAAU,GAAIuK,IAAcxK,EAAG5B,KAAKmM,GAAInM,KAAK+H,MAG3DmE,GACP7I,GAEE+I,GAAiB,SAAUzI,GAG7B,QAASyI,GAAcxK,EAAG0F,EAAGxG,GAC3Bd,KAAKkE,GAAKtC,EACV5B,KAAKmM,GAAK7E,EACVtH,KAAK+H,GAAKjH,EACVd,KAAK4F,GAAK,EACVjC,EAAUpD,KAAKP,MAgBjB,MAvBAgD,GAASoJ,EAAezI,GAUxByI,EAAcnK,UAAUqC,KAAO,SAAUrD,GACnCjB,KAAK4F,IAAM5F,KAAKmM,KACdnM,KAAK+H,KAAO/H,KAAK4F,GACnB5F,KAAKkE,GAAGY,cAER9E,KAAKkE,GAAGW,OAAO5D,IAGnBjB,KAAK4F,MAEPwG,EAAcnK,UAAU0C,MAAQ,SAAU7D,GAAKd,KAAKkE,GAAGM,QAAQ1D,IAC/DsL,EAAcnK,UAAU2C,UAAY,WAAc5E,KAAKkE,GAAGY,eAEnDsH,GACPjK,EAUFH,GAAgBqK,MAAQ,SAAUC,EAAOC,GACvC,GAAIC,GAAQF,GAAS,CACrB,IAAY,EAARE,EAAa,KAAM,IAAInM,GAAGiD,uBAC9B,IAAmB,gBAARiJ,IAA0BC,EAAND,EAC7B,KAAM,IAAIlM,GAAGiD,uBAEf,OAAO,IAAI4I,IAAgBlM,KAAMwM,EAAOD,GAG1C,IAAIE,IAAyB,SAAU9I,GAErC,QAAS8I,GAAsBpL,EAAQP,EAAG+F,GACxC7G,KAAKqB,OAASA,EACdrB,KAAK+H,GAAKjH,EACVd,KAAKkH,GAAKL,EACVlD,EAAUpD,KAAKP,MAajB,MAlBAgD,GAASyJ,EAAuB9I,GAQhC8I,EAAsBxK,UAAU+B,cAAgB,SAAUpC,GACxD,MAAI5B,MAAKkH,GAAK,GACZtF,EAAEiD,OAAO,IACTjD,EAAEkD,cACKzC,GAGFrC,KAAKqB,OAAOQ,UAAU,GAAI6K,IAAoB9K,EAAG5B,KAAK+H,GAAI/H,KAAKkH,MAGjEuF,GACPpJ,GAEEqJ,GAAuB,SAAU/I,GAEnC,QAAS+I,GAAoB9K,EAAGd,EAAG+F,GACjC7G,KAAKkE,GAAKtC,EACV5B,KAAK+H,GAAKjH,EACVd,KAAKkH,GAAKL,EACV7G,KAAKmE,GAAK,EACVnE,KAAKoE,KAAM,EACXpE,KAAK4F,GAAK,EACVjC,EAAUpD,KAAKP,MAoBjB,MA5BAgD,GAAS0J,EAAqB/I,GAW9B+I,EAAoBzK,UAAUqC,KAAO,SAAUrD,GACzCjB,KAAK4F,IAAM5F,KAAKkH,IAAMjG,IAAMjB,KAAK+H,KACnC/H,KAAKoE,KAAM,EACXpE,KAAKmE,GAAKnE,KAAK4F,IAEjB5F,KAAK4F,MAEP8G,EAAoBzK,UAAU0C,MAAQ,SAAU7D,GAAKd,KAAKkE,GAAGM,QAAQ1D,IACrE4L,EAAoBzK,UAAU2C,UAAY,WACpC5E,KAAKoE,IACPpE,KAAKkE,GAAGW,OAAO7E,KAAKmE,IAEpBnE,KAAKkE,GAAGW,OAAO,IAEjB7E,KAAKkE,GAAGY,eAGH4H,GACPvK,EAcF,OANAH,GAAgB2K,YAAc,SAASlF,EAAeC,GACpD,GAAIb,IAAKa,GAAa,CAEtB,OADAZ,MAAKC,IAAIF,KAAOG,EAAAA,IAAaH,EAAI,GAC1B,GAAI4F,IAAsBzM,KAAMyH,EAAeZ,IAGjDxG"} \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/rx-lite-aggregates/rx.lite.aggregates.min.js b/tools/node_modules/eslint/node_modules/rx-lite-aggregates/rx.lite.aggregates.min.js
new file mode 100644
index 0000000000..649e28972d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/rx-lite-aggregates/rx.lite.aggregates.min.js
@@ -0,0 +1,3 @@
+/* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/
+(function(a){function b(a){return a&&a.Object===Object?a:null}var c={"function":!0,object:!0},d=c[typeof exports]&&exports&&!exports.nodeType?exports:null,e=c[typeof module]&&module&&!module.nodeType?module:null,f=b(d&&e&&"object"==typeof global&&global),g=b(c[typeof self]&&self),h=b(c[typeof window]&&window),i=(e&&e.exports===d?d:null,b(c[typeof this]&&this)),j=f||h!==(i&&i.window)&&h||g||i||Function("return this")();"function"==typeof define&&define.amd?define(["./rx.lite"],function(b,c){return a(j,c,b)}):"object"==typeof module&&module&&module.exports===d?module.exports=a(j,module.exports,require("rx-lite")):j.Rx=a(j,{},j.Rx)}).call(this,function(a,b,c,d){function e(a){return function(){try{return a.apply(this,arguments)}catch(b){return C.e=b,C}}}function f(a){if(0===a.length)throw new z;return a[0]}function g(a,b,c,d){var e=y(b,c,3);return new k(function(b){return a.subscribe(new da(b,a,e,d))},a)}var h=c.Observable,i=h.prototype,j=c.BinaryDisposable,k=c.AnonymousObservable,l=c.internals.AbstractObserver,m=c.Disposable.empty,n=c.helpers,o=n.defaultComparer,p=n.identity,q=n.defaultSubComparer,r=n.isFunction,s=n.isPromise,t=n.isArrayLike,u=n.isIterable,v=c.internals.inherits,w=h.fromPromise,x=h.from,y=c.internals.bindCallback,z=c.EmptyError,A=c.ObservableBase,B=c.ArgumentOutOfRangeError,C={e:{}},D=c.internals.tryCatch=function(a){if(!r(a))throw new TypeError("fn must be a function");return e(a)},E=function(a){function b(b,c,d){this.source=b,this._k=c,this._c=d,a.call(this)}return v(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new F(a,this._k,this._c))},b}(A),F=function(a){function b(b,c,d){this._o=b,this._k=c,this._c=d,this._v=null,this._hv=!1,this._l=[],a.call(this)}return v(b,a),b.prototype.next=function(a){var b=D(this._k)(a);if(b===C)return this._o.onError(b.e);var c=0;if(this._hv){if(c=D(this._c)(b,this._v),c===C)return this._o.onError(c.e)}else this._hv=!0,this._v=b;c>0&&(this._v=b,this._l=[]),c>=0&&this._l.push(a)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onNext(this._l),this._o.onCompleted()},b}(l),G=function(a){function b(b,c,d,e){this.source=b,this.accumulator=c,this.hasSeed=d,this.seed=e,a.call(this)}return v(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new H(a,this))},b}(A),H=function(a){function b(b,c){this._o=b,this._p=c,this._fn=c.accumulator,this._hs=c.hasSeed,this._s=c.seed,this._ha=!1,this._a=null,this._hv=!1,this._i=0,a.call(this)}return v(b,a),b.prototype.next=function(a){return!this._hv&&(this._hv=!0),this._ha?this._a=D(this._fn)(this._a,a,this._i,this._p):(this._a=this._hs?D(this._fn)(this._s,a,this._i,this._p):a,this._ha=!0),this._a===C?this._o.onError(this._a.e):void this._i++},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._hv&&this._o.onNext(this._a),!this._hv&&this._hs&&this._o.onNext(this._s),!this._hv&&!this._hs&&this._o.onError(new z),this._o.onCompleted()},b}(l);i.reduce=function(){var a,b=!1,c=arguments[0];return 2===arguments.length&&(b=!0,a=arguments[1]),new G(this,c,b,a)};var I=function(a){function b(b,c){this.source=b,this._fn=c,a.call(this)}return v(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new J(a,this._fn,this.source))},b}(A),J=function(a){function b(b,c,d){this._o=b,this._fn=c,this._s=d,this._i=0,a.call(this)}return v(b,a),b.prototype.next=function(a){var b=D(this._fn)(a,this._i++,this._s);return b===C?this._o.onError(b.e):void(Boolean(b)&&(this._o.onNext(!0),this._o.onCompleted()))},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onNext(!1),this._o.onCompleted()},b}(l);i.some=function(a,b){var c=y(a,b,3);return new I(this,c)};var K=function(a){function b(b){this.source=b,a.call(this)}return v(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new L(a))},b}(A),L=function(a){function b(b){this._o=b,a.call(this)}return v(b,a),b.prototype.next=function(){this._o.onNext(!1),this._o.onCompleted()},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onNext(!0),this._o.onCompleted()},b}(l);i.isEmpty=function(){return new K(this)};var M=function(a){function b(b,c){this.source=b,this._fn=c,a.call(this)}return v(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new N(a,this._fn,this.source))},b}(A),N=function(a){function b(b,c,d){this._o=b,this._fn=c,this._s=d,this._i=0,a.call(this)}return v(b,a),b.prototype.next=function(a){var b=D(this._fn)(a,this._i++,this._s);return b===C?this._o.onError(b.e):void(Boolean(b)||(this._o.onNext(!1),this._o.onCompleted()))},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onNext(!0),this._o.onCompleted()},b}(l);i.every=function(a,b){var c=y(a,b,3);return new M(this,c)};var O=function(a){function b(b,c,d){var e=+d||0;Math.abs(e)===1/0&&(e=0),this.source=b,this._elem=c,this._n=e,a.call(this)}return v(b,a),b.prototype.subscribeCore=function(a){return this._n<0?(a.onNext(!1),a.onCompleted(),m):this.source.subscribe(new P(a,this._elem,this._n))},b}(A),P=function(a){function b(b,c,d){this._o=b,this._elem=c,this._n=d,this._i=0,a.call(this)}function c(a,b){return 0===a&&0===b||a===b||isNaN(a)&&isNaN(b)}return v(b,a),b.prototype.next=function(a){this._i++>=this._n&&c(a,this._elem)&&(this._o.onNext(!0),this._o.onCompleted())},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onNext(!1),this._o.onCompleted()},b}(l);i.includes=function(a,b){return new O(this,a,b)};var Q=function(a){function b(b,c){this.source=b,this._fn=c,a.call(this)}return v(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new R(a,this._fn,this.source))},b}(A),R=function(a){function b(b,c,d){this._o=b,this._fn=c,this._s=d,this._i=0,this._c=0,a.call(this)}return v(b,a),b.prototype.next=function(a){if(this._fn){var b=D(this._fn)(a,this._i++,this._s);if(b===C)return this._o.onError(b.e);Boolean(b)&&this._c++}else this._c++},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onNext(this._c),this._o.onCompleted()},b}(l);i.count=function(a,b){var c=y(a,b,3);return new Q(this,c)};var S=function(a){function b(b,c,d){this.source=b,this._e=c,this._n=d,a.call(this)}return v(b,a),b.prototype.subscribeCore=function(a){return this._n<0?(a.onNext(-1),a.onCompleted(),m):this.source.subscribe(new T(a,this._e,this._n))},b}(A),T=function(a){function b(b,c,d){this._o=b,this._e=c,this._n=d,this._i=0,a.call(this)}return v(b,a),b.prototype.next=function(a){this._i>=this._n&&a===this._e&&(this._o.onNext(this._i),this._o.onCompleted()),this._i++},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onNext(-1),this._o.onCompleted()},b}(l);i.indexOf=function(a,b){var c=+b||0;return Math.abs(c)===1/0&&(c=0),new S(this,a,c)};var U=function(a){function b(b,c){this.source=b,this._fn=c,a.call(this)}return v(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new V(a,this._fn,this.source))},b}(A),V=function(a){function b(b,c,d){this._o=b,this._fn=c,this._s=d,this._i=0,this._c=0,a.call(this)}return v(b,a),b.prototype.next=function(a){if(this._fn){var b=D(this._fn)(a,this._i++,this._s);if(b===C)return this._o.onError(b.e);this._c+=b}else this._c+=a},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onNext(this._c),this._o.onCompleted()},b}(l);i.sum=function(a,b){var c=y(a,b,3);return new U(this,c)},i.minBy=function(a,b){return b||(b=q),new E(this,a,function(a,c){return-1*b(a,c)})},i.min=function(a){return this.minBy(p,a).map(f)},i.maxBy=function(a,b){return b||(b=q),new E(this,a,b)},i.max=function(a){return this.maxBy(p,a).map(f)};var W=function(a){function b(b,c){this.source=b,this._fn=c,a.call(this)}return v(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new X(a,this._fn,this.source))},b}(A),X=function(a){function b(b,c,d){this._o=b,this._fn=c,this._s=d,this._c=0,this._t=0,a.call(this)}return v(b,a),b.prototype.next=function(a){if(this._fn){var b=D(this._fn)(a,this._c++,this._s);if(b===C)return this._o.onError(b.e);this._t+=b}else this._c++,this._t+=a},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){return 0===this._c?this._o.onError(new z):(this._o.onNext(this._t/this._c),void this._o.onCompleted())},b}(l);i.average=function(a,b){var c,d=this;return r(a)&&(c=y(a,b,3)),new W(d,c)},i.sequenceEqual=function(a,b){var c=this;return b||(b=o),new k(function(d){var e=!1,f=!1,g=[],h=[],i=c.subscribe(function(a){if(h.length>0){var c=h.shift(),e=D(b)(c,a);if(e===C)return d.onError(e.e);e||(d.onNext(!1),d.onCompleted())}else f?(d.onNext(!1),d.onCompleted()):g.push(a)},function(a){d.onError(a)},function(){e=!0,0===g.length&&(h.length>0?(d.onNext(!1),d.onCompleted()):f&&(d.onNext(!0),d.onCompleted()))});(t(a)||u(a))&&(a=x(a)),s(a)&&(a=w(a));var k=a.subscribe(function(a){if(g.length>0){var c=g.shift(),f=D(b)(c,a);if(f===C)return d.onError(f.e);f||(d.onNext(!1),d.onCompleted())}else e?(d.onNext(!1),d.onCompleted()):h.push(a)},function(a){d.onError(a)},function(){f=!0,0===h.length&&(g.length>0?(d.onNext(!1),d.onCompleted()):e&&(d.onNext(!0),d.onCompleted()))});return new j(i,k)},c)};var Y=function(a){function b(b,c,d){this.source=b,this._i=c,this._d=d,a.call(this)}return v(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Z(a,this._i,this._d))},b}(A),Z=function(a){function b(b,c,d){this._o=b,this._i=c,this._d=d,a.call(this)}return v(b,a),b.prototype.next=function(a){0===this._i--&&(this._o.onNext(a),this._o.onCompleted())},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._d===d?this._o.onError(new B):(this._o.onNext(this._d),this._o.onCompleted())},b}(l);i.elementAt=function(a,b){if(0>a)throw new B;return new Y(this,a,b)};var $=function(a){function b(b,c,d){this._o=b,this._obj=c,this._s=d,this._i=0,this._hv=!1,this._v=null,a.call(this)}return v(b,a),b.prototype.next=function(a){var b=!1;if(this._obj.predicate){var c=D(this._obj.predicate)(a,this._i++,this._s);if(c===C)return this._o.onError(c.e);Boolean(c)&&(b=!0)}else this._obj.predicate||(b=!0);if(b){if(this._hv)return this._o.onError(new Error("Sequence contains more than one matching element"));this._hv=!0,this._v=a}},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._hv?(this._o.onNext(this._v),this._o.onCompleted()):this._obj.defaultValue===d?this._o.onError(new z):(this._o.onNext(this._obj.defaultValue),this._o.onCompleted())},b}(l);i.single=function(a,b){var c={},d=this;if(c="object"==typeof arguments[0]?arguments[0]:{predicate:arguments[0],thisArg:arguments[1],defaultValue:arguments[2]},r(c.predicate)){var e=c.predicate;c.predicate=y(e,c.thisArg,3)}return new k(function(a){return d.subscribe(new $(a,c,d))},d)};var _=function(a){function b(b,c){this.source=b,this._obj=c,a.call(this)}return v(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new aa(a,this._obj,this.source))},b}(A),aa=function(a){function b(b,c,d){this._o=b,this._obj=c,this._s=d,this._i=0,a.call(this)}return v(b,a),b.prototype.next=function(a){if(this._obj.predicate){var b=D(this._obj.predicate)(a,this._i++,this._s);if(b===C)return this._o.onError(b.e);Boolean(b)&&(this._o.onNext(a),this._o.onCompleted())}else this._obj.predicate||(this._o.onNext(a),this._o.onCompleted())},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._obj.defaultValue===d?this._o.onError(new z):(this._o.onNext(this._obj.defaultValue),this._o.onCompleted())},b}(l);i.first=function(){var a={};if(a="object"==typeof arguments[0]?arguments[0]:{predicate:arguments[0],thisArg:arguments[1],defaultValue:arguments[2]},r(a.predicate)){var b=a.predicate;a.predicate=y(b,a.thisArg,3)}return new _(this,a)};var ba=function(a){function b(b,c){this.source=b,this._obj=c,a.call(this)}return v(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new ca(a,this._obj,this.source))},b}(A),ca=function(a){function b(b,c,d){this._o=b,this._obj=c,this._s=d,this._i=0,this._hv=!1,this._v=null,a.call(this)}return v(b,a),b.prototype.next=function(a){var b=!1;if(this._obj.predicate){var c=D(this._obj.predicate)(a,this._i++,this._s);if(c===C)return this._o.onError(c.e);Boolean(c)&&(b=!0)}else this._obj.predicate||(b=!0);b&&(this._hv=!0,this._v=a)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._hv?(this._o.onNext(this._v),this._o.onCompleted()):this._obj.defaultValue===d?this._o.onError(new z):(this._o.onNext(this._obj.defaultValue),this._o.onCompleted())},b}(l);i.last=function(){var a={};if(a="object"==typeof arguments[0]?arguments[0]:{predicate:arguments[0],thisArg:arguments[1],defaultValue:arguments[2]},r(a.predicate)){var b=a.predicate;a.predicate=y(b,a.thisArg,3)}return new ba(this,a)};var da=function(a){function b(b,c,d,e){this._o=b,this._s=c,this._cb=d,this._y=e,this._i=0,a.call(this)}return v(b,a),b.prototype.next=function(a){var b=D(this._cb)(a,this._i,this._s);return b===C?this._o.onError(b.e):void(b?(this._o.onNext(this._y?this._i:a),this._o.onCompleted()):this._i++)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._y&&this._o.onNext(-1),this._o.onCompleted()},b}(l);i.find=function(a,b){return g(this,a,b,!1)},i.findIndex=function(a,b){return g(this,a,b,!0)};var ea=function(a){function b(b){this.source=b,a.call(this)}return v(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new fa(a))},b}(A),fa=function(b){function c(c){this._o=c,this._s=new a.Set,b.call(this)}return v(c,b),c.prototype.next=function(a){this._s.add(a)},c.prototype.error=function(a){this._o.onError(a)},c.prototype.completed=function(){this._o.onNext(this._s),this._o.onCompleted()},c}(l);i.toSet=function(){if("undefined"==typeof a.Set)throw new TypeError;return new ea(this)};var ga=function(a){function b(b,c,d){this.source=b,this._k=c,this._e=d,a.call(this)}return v(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new ha(a,this._k,this._e))},b}(A),ha=function(b){function c(c,d,e){this._o=c,this._k=d,this._e=e,this._m=new a.Map,b.call(this)}return v(c,b),c.prototype.next=function(a){var b=D(this._k)(a);if(b===C)return this._o.onError(b.e);var c=a;return this._e&&(c=D(this._e)(a),c===C)?this._o.onError(c.e):void this._m.set(b,c)},c.prototype.error=function(a){this._o.onError(a)},c.prototype.completed=function(){this._o.onNext(this._m),this._o.onCompleted()},c}(l);i.toMap=function(b,c){if("undefined"==typeof a.Map)throw new TypeError;return new ga(this,b,c)};var ia=function(a){function b(b,c,d){this.source=b,this._b=c,this._e=d,a.call(this)}return v(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new ja(a,this._b,this._e))},b}(A),ja=function(a){function b(b,c,d){this._o=b,this._b=c,this._e=d,this._i=0,a.call(this)}return v(b,a),b.prototype.next=function(a){this._i>=this._b&&(this._e===this._i?this._o.onCompleted():this._o.onNext(a)),this._i++},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onCompleted()},b}(l);i.slice=function(a,b){var d=a||0;if(0>d)throw new c.ArgumentOutOfRangeError;if("number"==typeof b&&d>b)throw new c.ArgumentOutOfRangeError;return new ia(this,d,b)};var ka=function(a){function b(b,c,d){this.source=b,this._e=c,this._n=d,a.call(this)}return v(b,a),b.prototype.subscribeCore=function(a){return this._n<0?(a.onNext(-1),a.onCompleted(),m):this.source.subscribe(new la(a,this._e,this._n))},b}(A),la=function(a){function b(b,c,d){this._o=b,this._e=c,this._n=d,this._v=0,this._hv=!1,this._i=0,a.call(this)}return v(b,a),b.prototype.next=function(a){this._i>=this._n&&a===this._e&&(this._hv=!0,this._v=this._i),this._i++},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._hv?this._o.onNext(this._v):this._o.onNext(-1),this._o.onCompleted()},b}(l);return i.lastIndexOf=function(a,b){var c=+b||0;return Math.abs(c)===1/0&&(c=0),new ka(this,a,c)},c});
+//# sourceMappingURL=rx.lite.aggregates.map \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/rx-lite/package.json b/tools/node_modules/eslint/node_modules/rx-lite/package.json
new file mode 100644
index 0000000000..06573f1dc9
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/rx-lite/package.json
@@ -0,0 +1,66 @@
+{
+ "_from": "rx-lite@^4.0.8",
+ "_id": "rx-lite@4.0.8",
+ "_inBundle": false,
+ "_integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=",
+ "_location": "/eslint/rx-lite",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "rx-lite@^4.0.8",
+ "name": "rx-lite",
+ "escapedName": "rx-lite",
+ "rawSpec": "^4.0.8",
+ "saveSpec": null,
+ "fetchSpec": "^4.0.8"
+ },
+ "_requiredBy": [
+ "/eslint/inquirer",
+ "/eslint/rx-lite-aggregates"
+ ],
+ "_resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz",
+ "_shasum": "0b1e11af8bc44836f04a6407e92da42467b79444",
+ "_spec": "rx-lite@^4.0.8",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/inquirer",
+ "author": {
+ "name": "Cloud Programmability Team",
+ "url": "https://github.com/Reactive-Extensions/RxJS/blob/master/authors.txt"
+ },
+ "browser": {
+ "index.js": "rx.lite.js"
+ },
+ "bugs": {
+ "url": "https://github.com/Reactive-Extensions/RxJS/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Lightweight library for composing asynchronous and event-based operations in JavaScript",
+ "devDependencies": {},
+ "homepage": "https://github.com/Reactive-Extensions/RxJS",
+ "jam": {
+ "main": "rx.lite.js"
+ },
+ "keywords": [
+ "React",
+ "Reactive",
+ "Events",
+ "Rx",
+ "RxJS"
+ ],
+ "licenses": [
+ {
+ "type": "Apache License, Version 2.0",
+ "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
+ }
+ ],
+ "main": "rx.lite.js",
+ "name": "rx-lite",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/Reactive-Extensions/RxJS.git"
+ },
+ "title": "Reactive Extensions for JavaScript (RxJS) Lite",
+ "version": "4.0.8"
+}
diff --git a/tools/node_modules/eslint/node_modules/rx-lite/readme.md b/tools/node_modules/eslint/node_modules/rx-lite/readme.md
new file mode 100644
index 0000000000..4411545748
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/rx-lite/readme.md
@@ -0,0 +1,173 @@
+# RxJS Lite Module #
+
+The Reactive Extensions for JavaScript Lite version is a lightweight version of the Reactive Extensions for JavaScript which covers most of the day to day operators you might use all in a single library. Functionality such as bridging to events, promises, callbacks, Node.js-style callbacks, time-based operations and more are built right in. This comes with `rx.lite.js` which is for use in modern development environments such as > IE9 and server-side environments such as Node.js.
+
+## Getting Started
+
+There are a number of ways to get started with RxJS.
+
+### Installing with [NPM](https://npmjs.org/)
+
+```bash`
+$ npm install rx-lite
+$ npm install -g rx-lite
+```
+
+### Using with Node.js and Ringo.js
+
+```js
+var Rx = require('rx-lite');
+```
+
+### In a Browser:
+
+```html
+<!-- Just the core RxJS -->
+<script src="path/to/rx.lite.js"></script>
+```
+
+## Included Observable Operators ##
+
+### `Observable Methods`
+- [`catch | catchException`](../../doc/api/core/operators/catch.md)
+- [`concat`](../../doc/api/core/operators/concat.md)
+- [`create | createWithDisposable`](../../doc/api/core/operators/create.md)
+- [`defer`](../../doc/api/core/operators/defer.md)
+- [`empty`](../../doc/api/core/operators/empty.md)
+- [`from`](../../doc/api/core/operators/from.md)
+- [`fromArray`](../../doc/api/core/operators/fromarray.md)
+- [`fromCallback`](../../doc/api/core/operators/fromcallback.md)
+- [`fromEvent`](../../doc/api/core/operators/fromevent.md)
+- [`fromEventPattern`](../../doc/api/core/operators/fromeventpattern.md)
+- [`fromNodeCallback`](../../doc/api/core/operators/fromnodecallback.md)
+- [`fromPromise`](../../doc/api/core/operators/frompromise.md)
+- [`interval`](../../doc/api/core/operators/interval.md)
+- [`just`](../../doc/api/core/operators/return.md)
+- [`merge`](../../doc/api/core/operators/merge.md)
+- [`mergeDelayError`](../../doc/api/core/operators/mergedelayerror.md)
+- [`never`](../../doc/api/core/operators/never.md)
+- [`of`](../../doc/api/core/operators/of.md)
+- [`ofWithScheduler`](../../doc/api/core/operators/ofwithscheduler.md)
+- [`range`](../../doc/api/core/operators/range.md)
+- [`repeat`](../../doc/api/core/operators/repeat.md)
+- [`return | returnValue`](../../doc/api/core/operators/return.md)
+- [`throw | throwError | throwException`](../../doc/api/core/operators/throw.md)
+- [`timer`](../../doc/api/core/operators/timer.md)
+- [`zip`](../../doc/api/core/operators/zip.md)
+- [`zipArray`](../../doc/api/core/operators/ziparray.md)
+
+### `Observable Instance Methods`
+- [`asObservable`](../../doc/api/core/operators/asobservable.md)
+- [`catch | catchException`](../../doc/api/core/operators/catchproto.md)
+- [`combineLatest`](../../doc/api/core/operators/combinelatest.md)
+- [`concat`](../../doc/api/core/operators/concatproto.md)
+- [`concatMap`](../../doc/api/core/operators/concatmap.md)
+- [`connect`](../../doc/api/core/operators/connect.md)
+- [`debounce`](../../doc/api/core/operators/debounce.md)
+- [`defaultIfEmpty`](../../doc/api/core/operators/defaultifempty.md)
+- [`delay`](../../doc/api/core/operators/delay.md)
+- [`dematerialize`](../../doc/api/core/operators/dematerialize.md)
+- [`distinctUntilChanged`](../../doc/api/core/operators/distinctuntilchanged.md)
+- [`do | doAction`](../../doc/api/core/operators/do.md)
+- [`doOnNext`](../../doc/api/core/operators/doonnext.md)
+- [`doOnError`](../../doc/api/core/operators/doonerror.md)
+- [`doOnCompleted`](../../doc/api/core/operators/dooncompleted.md)
+- [`filter`](../../doc/api/core/operators/where.md)
+- [`finally | finallyAction`](../../doc/api/core/operators/finally.md)
+- [`flatMap`](../../doc/api/core/operators/selectmany.md)
+- [`flatMapLatest`](../../doc/api/core/operators/flatmaplatest.md)
+- [`ignoreElements`](../../doc/api/core/operators/ignoreelements.md)
+- [`map`](../../doc/api/core/operators/select.md)
+- [`merge`](../../doc/api/core/operators/mergeproto.md)
+- [`mergeObservable | mergeAll`](../../doc/api/core/operators/mergeall.md)
+- [`multicast`](../../doc/api/core/operators/multicast.md)
+- [`publish`](../../doc/api/core/operators/publish.md)
+- [`publishLast`](../../doc/api/core/operators/publishlast.md)
+- [`publishValue`](../../doc/api/core/operators/publishvalue.md)
+- [`refCount`](../../doc/api/core/operators/refcount.md)
+- [`repeat`](../../doc/api/core/operators/repeat.md)
+- [`replay`](../../doc/api/core/operators/replay.md)
+- [`retry`](../../doc/api/core/operators/retry.md)
+- [`retryWhen`](../../doc/api/core/operators/retrywhen.md)
+- [`sample`](../../doc/api/core/operators/sample.md)
+- [`scan`](../../doc/api/core/operators/scan.md)
+- [`select`](../../doc/api/core/operators/select.md)
+- [`selectConcat`](../../doc/api/core/operators/concatmap.md)
+- [`selectMany`](../../doc/api/core/operators/selectmany.md)
+- [`selectSwitch`](../../doc/api/core/operators/flatmaplatest.md)
+- [`singleInstance`](../../doc/api/core/operators/singleinstance.md)
+- [`skip`](../../doc/api/core/operators/skip.md)
+- [`skipLast`](../../doc/api/core/operators/skiplast.md)
+- [`skipUntil`](../../doc/api/core/operators/skipuntil.md)
+- [`skipWhile`](../../doc/api/core/operators/skipwhile.md)
+- [`startWith`](../../doc/api/core/operators/startwith.md)
+- [`subscribe | forEach`](../../doc/api/core/operators/subscribe.md)
+- [`subscribeOnNext`](../../doc/api/core/operators/subscribeonnext.md)
+- [`subscribeOnError`](../../doc/api/core/operators/subscribeonerror.md)
+- [`subscribeOnCompleted`](../../doc/api/core/operators/subscribeoncompleted.md)
+- [`switch | switchLatest`](../../doc/api/core/operators/switch.md)
+- [`take`](../../doc/api/core/operators/take.md)
+- [`takeLast`](../../doc/api/core/operators/takelast.md)
+- [`takeUntil`](../../doc/api/core/operators/takeuntil.md)
+- [`takeWhile`](../../doc/api/core/operators/takewhile.md)
+- [`tap`](../../doc/api/core/operators/do.md)
+- [`tapOnNext`](../../doc/api/core/operators/doonnext.md)
+- [`tapOnError`](../../doc/api/core/operators/doonerror.md)
+- [`tapOnCompleted`](../../doc/api/core/operators/dooncompleted.md)
+- [`throttle`](../../doc/api/core/operators/throttle.md)
+- [`timeout`](../../doc/api/core/operators/timeout.md)
+- [`timestamp`](../../doc/api/core/operators/timestamp.md)
+- [`toArray`](../../doc/api/core/operators/toarray.md)
+- [`transduce`](../../doc/api/core/operators/transduce.md)
+- [`where`](../../doc/api/core/operators/where.md)
+- [`withLatestFrom`](../../doc/api/core/operators/withlatestfrom.md)
+- [`zip`](../../doc/api/core/operators/zipproto.md)
+
+## Included Classes ##
+
+### Core Objects
+- [`Rx.Observer`](../../doc/api/core/observer.md)
+- [`Rx.Notification`](../../doc/api/core/notification.md)
+
+### Subjects
+
+- [`Rx.AsyncSubject`](../../doc/api/subjects/asyncsubject.md)
+- [`Rx.BehaviorSubject`](../../doc/api/subjects/behaviorsubject.md)
+- [`Rx.ReplaySubject`](../../doc/api/subjects/replaysubject.md)
+- [`Rx.Subject`](../../doc/api/subjects/subject.md)
+
+### Schedulers
+
+- [`Rx.Scheduler`](../../doc/api/schedulers/scheduler.md)
+
+### Disposables
+
+- [`Rx.CompositeDisposable`](../../doc/api/disposables/compositedisposable.md)
+- [`Rx.Disposable`](../../doc/api/disposables/disposable.md)
+- [`Rx.RefCountDisposable`](../../doc/api/disposables/refcountdisposable.md)
+- [`Rx.SerialDisposable`](../../doc/api/disposables/serialdisposable.md)
+- [`Rx.SingleAssignmentDisposable`](../../doc/api/disposables/singleassignmentdisposable.md)
+
+## Contributing ##
+
+There are lots of ways to contribute to the project, and we appreciate our [contributors](https://github.com/Reactive-Extensions/RxJS/wiki/Contributors). If you wish to contribute, check out our [style guide]((https://github.com/Reactive-Extensions/RxJS/tree/master/doc/contributing)).
+
+You can contribute by reviewing and sending feedback on code checkins, suggesting and trying out new features as they are implemented, submit bugs and help us verify fixes as they are checked in, as well as submit code fixes or code contributions of your own. Note that all code submissions will be rigorously reviewed and tested by the Rx Team, and only those that meet an extremely high bar for both quality and design/roadmap appropriateness will be merged into the source.
+
+## License ##
+
+Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
+Microsoft Open Technologies would like to thank its contributors, a list
+of whom are at https://github.com/Reactive-Extensions/RxJS/wiki/Contributors.
+
+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/tools/node_modules/eslint/node_modules/rx-lite/rx.lite.js b/tools/node_modules/eslint/node_modules/rx-lite/rx.lite.js
new file mode 100644
index 0000000000..0603c30e2f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/rx-lite/rx.lite.js
@@ -0,0 +1,7054 @@
+// Copyright (c) Microsoft, All rights reserved. See License.txt in the project root for license information.
+
+;(function (undefined) {
+
+ var objectTypes = {
+ 'function': true,
+ 'object': true
+ };
+
+ function checkGlobal(value) {
+ return (value && value.Object === Object) ? value : null;
+ }
+
+ var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null;
+ var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null;
+ var freeGlobal = checkGlobal(freeExports && freeModule && typeof global === 'object' && global);
+ var freeSelf = checkGlobal(objectTypes[typeof self] && self);
+ var freeWindow = checkGlobal(objectTypes[typeof window] && window);
+ var moduleExports = (freeModule && freeModule.exports === freeExports) ? freeExports : null;
+ var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
+ var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')();
+
+ var Rx = {
+ internals: {},
+ config: {
+ Promise: root.Promise
+ },
+ helpers: { }
+ };
+
+ // Defaults
+ var noop = Rx.helpers.noop = function () { },
+ identity = Rx.helpers.identity = function (x) { return x; },
+ defaultNow = Rx.helpers.defaultNow = Date.now,
+ defaultComparer = Rx.helpers.defaultComparer = function (x, y) { return isEqual(x, y); },
+ defaultSubComparer = Rx.helpers.defaultSubComparer = function (x, y) { return x > y ? 1 : (x < y ? -1 : 0); },
+ defaultKeySerializer = Rx.helpers.defaultKeySerializer = function (x) { return x.toString(); },
+ defaultError = Rx.helpers.defaultError = function (err) { throw err; },
+ isPromise = Rx.helpers.isPromise = function (p) { return !!p && typeof p.subscribe !== 'function' && typeof p.then === 'function'; },
+ isFunction = Rx.helpers.isFunction = (function () {
+
+ var isFn = function (value) {
+ return typeof value == 'function' || false;
+ };
+
+ // fallback for older versions of Chrome and Safari
+ if (isFn(/x/)) {
+ isFn = function(value) {
+ return typeof value == 'function' && toString.call(value) == '[object Function]';
+ };
+ }
+
+ return isFn;
+ }());
+
+ function cloneArray(arr) {
+ var len = arr.length, a = new Array(len);
+ for(var i = 0; i < len; i++) { a[i] = arr[i]; }
+ return a;
+ }
+
+ var errorObj = {e: {}};
+
+ function tryCatcherGen(tryCatchTarget) {
+ return function tryCatcher() {
+ try {
+ return tryCatchTarget.apply(this, arguments);
+ } catch (e) {
+ errorObj.e = e;
+ return errorObj;
+ }
+ };
+ }
+
+ var tryCatch = Rx.internals.tryCatch = function tryCatch(fn) {
+ if (!isFunction(fn)) { throw new TypeError('fn must be a function'); }
+ return tryCatcherGen(fn);
+ };
+
+ function thrower(e) {
+ throw e;
+ }
+
+ Rx.config.longStackSupport = false;
+ var hasStacks = false, stacks = tryCatch(function () { throw new Error(); })();
+ hasStacks = !!stacks.e && !!stacks.e.stack;
+
+ // All code after this point will be filtered from stack traces reported by RxJS
+ var rStartingLine = captureLine(), rFileName;
+
+ var STACK_JUMP_SEPARATOR = 'From previous event:';
+
+ function makeStackTraceLong(error, observable) {
+ // If possible, transform the error stack trace by removing Node and RxJS
+ // cruft, then concatenating with the stack trace of `observable`.
+ if (hasStacks &&
+ observable.stack &&
+ typeof error === 'object' &&
+ error !== null &&
+ error.stack &&
+ error.stack.indexOf(STACK_JUMP_SEPARATOR) === -1
+ ) {
+ var stacks = [];
+ for (var o = observable; !!o; o = o.source) {
+ if (o.stack) {
+ stacks.unshift(o.stack);
+ }
+ }
+ stacks.unshift(error.stack);
+
+ var concatedStacks = stacks.join('\n' + STACK_JUMP_SEPARATOR + '\n');
+ error.stack = filterStackString(concatedStacks);
+ }
+ }
+
+ function filterStackString(stackString) {
+ var lines = stackString.split('\n'), desiredLines = [];
+ for (var i = 0, len = lines.length; i < len; i++) {
+ var line = lines[i];
+
+ if (!isInternalFrame(line) && !isNodeFrame(line) && line) {
+ desiredLines.push(line);
+ }
+ }
+ return desiredLines.join('\n');
+ }
+
+ function isInternalFrame(stackLine) {
+ var fileNameAndLineNumber = getFileNameAndLineNumber(stackLine);
+ if (!fileNameAndLineNumber) {
+ return false;
+ }
+ var fileName = fileNameAndLineNumber[0], lineNumber = fileNameAndLineNumber[1];
+
+ return fileName === rFileName &&
+ lineNumber >= rStartingLine &&
+ lineNumber <= rEndingLine;
+ }
+
+ function isNodeFrame(stackLine) {
+ return stackLine.indexOf('(module.js:') !== -1 ||
+ stackLine.indexOf('(node.js:') !== -1;
+ }
+
+ function captureLine() {
+ if (!hasStacks) { return; }
+
+ try {
+ throw new Error();
+ } catch (e) {
+ var lines = e.stack.split('\n');
+ var firstLine = lines[0].indexOf('@') > 0 ? lines[1] : lines[2];
+ var fileNameAndLineNumber = getFileNameAndLineNumber(firstLine);
+ if (!fileNameAndLineNumber) { return; }
+
+ rFileName = fileNameAndLineNumber[0];
+ return fileNameAndLineNumber[1];
+ }
+ }
+
+ function getFileNameAndLineNumber(stackLine) {
+ // Named functions: 'at functionName (filename:lineNumber:columnNumber)'
+ var attempt1 = /at .+ \((.+):(\d+):(?:\d+)\)$/.exec(stackLine);
+ if (attempt1) { return [attempt1[1], Number(attempt1[2])]; }
+
+ // Anonymous functions: 'at filename:lineNumber:columnNumber'
+ var attempt2 = /at ([^ ]+):(\d+):(?:\d+)$/.exec(stackLine);
+ if (attempt2) { return [attempt2[1], Number(attempt2[2])]; }
+
+ // Firefox style: 'function@filename:lineNumber or @filename:lineNumber'
+ var attempt3 = /.*@(.+):(\d+)$/.exec(stackLine);
+ if (attempt3) { return [attempt3[1], Number(attempt3[2])]; }
+ }
+
+ var EmptyError = Rx.EmptyError = function() {
+ this.message = 'Sequence contains no elements.';
+ Error.call(this);
+ };
+ EmptyError.prototype = Object.create(Error.prototype);
+ EmptyError.prototype.name = 'EmptyError';
+
+ var ObjectDisposedError = Rx.ObjectDisposedError = function() {
+ this.message = 'Object has been disposed';
+ Error.call(this);
+ };
+ ObjectDisposedError.prototype = Object.create(Error.prototype);
+ ObjectDisposedError.prototype.name = 'ObjectDisposedError';
+
+ var ArgumentOutOfRangeError = Rx.ArgumentOutOfRangeError = function () {
+ this.message = 'Argument out of range';
+ Error.call(this);
+ };
+ ArgumentOutOfRangeError.prototype = Object.create(Error.prototype);
+ ArgumentOutOfRangeError.prototype.name = 'ArgumentOutOfRangeError';
+
+ var NotSupportedError = Rx.NotSupportedError = function (message) {
+ this.message = message || 'This operation is not supported';
+ Error.call(this);
+ };
+ NotSupportedError.prototype = Object.create(Error.prototype);
+ NotSupportedError.prototype.name = 'NotSupportedError';
+
+ var NotImplementedError = Rx.NotImplementedError = function (message) {
+ this.message = message || 'This operation is not implemented';
+ Error.call(this);
+ };
+ NotImplementedError.prototype = Object.create(Error.prototype);
+ NotImplementedError.prototype.name = 'NotImplementedError';
+
+ var notImplemented = Rx.helpers.notImplemented = function () {
+ throw new NotImplementedError();
+ };
+
+ var notSupported = Rx.helpers.notSupported = function () {
+ throw new NotSupportedError();
+ };
+
+ // Shim in iterator support
+ var $iterator$ = (typeof Symbol === 'function' && Symbol.iterator) ||
+ '_es6shim_iterator_';
+ // Bug for mozilla version
+ if (root.Set && typeof new root.Set()['@@iterator'] === 'function') {
+ $iterator$ = '@@iterator';
+ }
+
+ var doneEnumerator = Rx.doneEnumerator = { done: true, value: undefined };
+
+ var isIterable = Rx.helpers.isIterable = function (o) {
+ return o && o[$iterator$] !== undefined;
+ };
+
+ var isArrayLike = Rx.helpers.isArrayLike = function (o) {
+ return o && o.length !== undefined;
+ };
+
+ Rx.helpers.iterator = $iterator$;
+
+ var bindCallback = Rx.internals.bindCallback = function (func, thisArg, argCount) {
+ if (typeof thisArg === 'undefined') { return func; }
+ switch(argCount) {
+ case 0:
+ return function() {
+ return func.call(thisArg)
+ };
+ case 1:
+ return function(arg) {
+ return func.call(thisArg, arg);
+ };
+ case 2:
+ return function(value, index) {
+ return func.call(thisArg, value, index);
+ };
+ case 3:
+ return function(value, index, collection) {
+ return func.call(thisArg, value, index, collection);
+ };
+ }
+
+ return function() {
+ return func.apply(thisArg, arguments);
+ };
+ };
+
+ /** Used to determine if values are of the language type Object */
+ var dontEnums = ['toString',
+ 'toLocaleString',
+ 'valueOf',
+ 'hasOwnProperty',
+ 'isPrototypeOf',
+ 'propertyIsEnumerable',
+ 'constructor'],
+ dontEnumsLength = dontEnums.length;
+
+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]',
+ 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]';
+
+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[dateTag] = typedArrayTags[errorTag] =
+typedArrayTags[funcTag] = typedArrayTags[mapTag] =
+typedArrayTags[numberTag] = typedArrayTags[objectTag] =
+typedArrayTags[regexpTag] = typedArrayTags[setTag] =
+typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
+
+var objectProto = Object.prototype,
+ hasOwnProperty = objectProto.hasOwnProperty,
+ objToString = objectProto.toString,
+ MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;
+
+var keys = Object.keys || (function() {
+ var hasOwnProperty = Object.prototype.hasOwnProperty,
+ hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString'),
+ dontEnums = [
+ 'toString',
+ 'toLocaleString',
+ 'valueOf',
+ 'hasOwnProperty',
+ 'isPrototypeOf',
+ 'propertyIsEnumerable',
+ 'constructor'
+ ],
+ dontEnumsLength = dontEnums.length;
+
+ return function(obj) {
+ if (typeof obj !== 'object' && (typeof obj !== 'function' || obj === null)) {
+ throw new TypeError('Object.keys called on non-object');
+ }
+
+ var result = [], prop, i;
+
+ for (prop in obj) {
+ if (hasOwnProperty.call(obj, prop)) {
+ result.push(prop);
+ }
+ }
+
+ if (hasDontEnumBug) {
+ for (i = 0; i < dontEnumsLength; i++) {
+ if (hasOwnProperty.call(obj, dontEnums[i])) {
+ result.push(dontEnums[i]);
+ }
+ }
+ }
+ return result;
+ };
+ }());
+
+function equalObjects(object, other, equalFunc, isLoose, stackA, stackB) {
+ var objProps = keys(object),
+ objLength = objProps.length,
+ othProps = keys(other),
+ othLength = othProps.length;
+
+ if (objLength !== othLength && !isLoose) {
+ return false;
+ }
+ var index = objLength, key;
+ while (index--) {
+ key = objProps[index];
+ if (!(isLoose ? key in other : hasOwnProperty.call(other, key))) {
+ return false;
+ }
+ }
+ var skipCtor = isLoose;
+ while (++index < objLength) {
+ key = objProps[index];
+ var objValue = object[key],
+ othValue = other[key],
+ result;
+
+ if (!(result === undefined ? equalFunc(objValue, othValue, isLoose, stackA, stackB) : result)) {
+ return false;
+ }
+ skipCtor || (skipCtor = key === 'constructor');
+ }
+ if (!skipCtor) {
+ var objCtor = object.constructor,
+ othCtor = other.constructor;
+
+ if (objCtor !== othCtor &&
+ ('constructor' in object && 'constructor' in other) &&
+ !(typeof objCtor === 'function' && objCtor instanceof objCtor &&
+ typeof othCtor === 'function' && othCtor instanceof othCtor)) {
+ return false;
+ }
+ }
+ return true;
+}
+
+function equalByTag(object, other, tag) {
+ switch (tag) {
+ case boolTag:
+ case dateTag:
+ return +object === +other;
+
+ case errorTag:
+ return object.name === other.name && object.message === other.message;
+
+ case numberTag:
+ return (object !== +object) ?
+ other !== +other :
+ object === +other;
+
+ case regexpTag:
+ case stringTag:
+ return object === (other + '');
+ }
+ return false;
+}
+
+var isObject = Rx.internals.isObject = function(value) {
+ var type = typeof value;
+ return !!value && (type === 'object' || type === 'function');
+};
+
+function isObjectLike(value) {
+ return !!value && typeof value === 'object';
+}
+
+function isLength(value) {
+ return typeof value === 'number' && value > -1 && value % 1 === 0 && value <= MAX_SAFE_INTEGER;
+}
+
+var isHostObject = (function() {
+ try {
+ Object({ 'toString': 0 } + '');
+ } catch(e) {
+ return function() { return false; };
+ }
+ return function(value) {
+ return typeof value.toString !== 'function' && typeof (value + '') === 'string';
+ };
+}());
+
+function isTypedArray(value) {
+ return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)];
+}
+
+var isArray = Array.isArray || function(value) {
+ return isObjectLike(value) && isLength(value.length) && objToString.call(value) === arrayTag;
+};
+
+function arraySome (array, predicate) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ if (predicate(array[index], index, array)) {
+ return true;
+ }
+ }
+ return false;
+}
+
+function equalArrays(array, other, equalFunc, isLoose, stackA, stackB) {
+ var index = -1,
+ arrLength = array.length,
+ othLength = other.length;
+
+ if (arrLength !== othLength && !(isLoose && othLength > arrLength)) {
+ return false;
+ }
+ // Ignore non-index properties.
+ while (++index < arrLength) {
+ var arrValue = array[index],
+ othValue = other[index],
+ result;
+
+ if (result !== undefined) {
+ if (result) {
+ continue;
+ }
+ return false;
+ }
+ // Recursively compare arrays (susceptible to call stack limits).
+ if (isLoose) {
+ if (!arraySome(other, function(othValue) {
+ return arrValue === othValue || equalFunc(arrValue, othValue, isLoose, stackA, stackB);
+ })) {
+ return false;
+ }
+ } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, isLoose, stackA, stackB))) {
+ return false;
+ }
+ }
+ return true;
+}
+
+function baseIsEqualDeep(object, other, equalFunc, isLoose, stackA, stackB) {
+ var objIsArr = isArray(object),
+ othIsArr = isArray(other),
+ objTag = arrayTag,
+ othTag = arrayTag;
+
+ if (!objIsArr) {
+ objTag = objToString.call(object);
+ if (objTag === argsTag) {
+ objTag = objectTag;
+ } else if (objTag !== objectTag) {
+ objIsArr = isTypedArray(object);
+ }
+ }
+ if (!othIsArr) {
+ othTag = objToString.call(other);
+ if (othTag === argsTag) {
+ othTag = objectTag;
+ }
+ }
+ var objIsObj = objTag === objectTag && !isHostObject(object),
+ othIsObj = othTag === objectTag && !isHostObject(other),
+ isSameTag = objTag === othTag;
+
+ if (isSameTag && !(objIsArr || objIsObj)) {
+ return equalByTag(object, other, objTag);
+ }
+ if (!isLoose) {
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
+ othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
+
+ if (objIsWrapped || othIsWrapped) {
+ return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, isLoose, stackA, stackB);
+ }
+ }
+ if (!isSameTag) {
+ return false;
+ }
+ // Assume cyclic values are equal.
+ // For more information on detecting circular references see https://es5.github.io/#JO.
+ stackA || (stackA = []);
+ stackB || (stackB = []);
+
+ var length = stackA.length;
+ while (length--) {
+ if (stackA[length] === object) {
+ return stackB[length] === other;
+ }
+ }
+ // Add `object` and `other` to the stack of traversed objects.
+ stackA.push(object);
+ stackB.push(other);
+
+ var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, isLoose, stackA, stackB);
+
+ stackA.pop();
+ stackB.pop();
+
+ return result;
+}
+
+function baseIsEqual(value, other, isLoose, stackA, stackB) {
+ if (value === other) {
+ return true;
+ }
+ if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
+ return value !== value && other !== other;
+ }
+ return baseIsEqualDeep(value, other, baseIsEqual, isLoose, stackA, stackB);
+}
+
+var isEqual = Rx.internals.isEqual = function (value, other) {
+ return baseIsEqual(value, other);
+};
+
+ var hasProp = {}.hasOwnProperty,
+ slice = Array.prototype.slice;
+
+ var inherits = Rx.internals.inherits = function (child, parent) {
+ function __() { this.constructor = child; }
+ __.prototype = parent.prototype;
+ child.prototype = new __();
+ };
+
+ var addProperties = Rx.internals.addProperties = function (obj) {
+ for(var sources = [], i = 1, len = arguments.length; i < len; i++) { sources.push(arguments[i]); }
+ for (var idx = 0, ln = sources.length; idx < ln; idx++) {
+ var source = sources[idx];
+ for (var prop in source) {
+ obj[prop] = source[prop];
+ }
+ }
+ };
+
+ // Rx Utils
+ var addRef = Rx.internals.addRef = function (xs, r) {
+ return new AnonymousObservable(function (observer) {
+ return new BinaryDisposable(r.getDisposable(), xs.subscribe(observer));
+ });
+ };
+
+ function arrayInitialize(count, factory) {
+ var a = new Array(count);
+ for (var i = 0; i < count; i++) {
+ a[i] = factory();
+ }
+ return a;
+ }
+
+ /**
+ * Represents a group of disposable resources that are disposed together.
+ * @constructor
+ */
+ var CompositeDisposable = Rx.CompositeDisposable = function () {
+ var args = [], i, len;
+ if (Array.isArray(arguments[0])) {
+ args = arguments[0];
+ } else {
+ len = arguments.length;
+ args = new Array(len);
+ for(i = 0; i < len; i++) { args[i] = arguments[i]; }
+ }
+ this.disposables = args;
+ this.isDisposed = false;
+ this.length = args.length;
+ };
+
+ var CompositeDisposablePrototype = CompositeDisposable.prototype;
+
+ /**
+ * Adds a disposable to the CompositeDisposable or disposes the disposable if the CompositeDisposable is disposed.
+ * @param {Mixed} item Disposable to add.
+ */
+ CompositeDisposablePrototype.add = function (item) {
+ if (this.isDisposed) {
+ item.dispose();
+ } else {
+ this.disposables.push(item);
+ this.length++;
+ }
+ };
+
+ /**
+ * Removes and disposes the first occurrence of a disposable from the CompositeDisposable.
+ * @param {Mixed} item Disposable to remove.
+ * @returns {Boolean} true if found; false otherwise.
+ */
+ CompositeDisposablePrototype.remove = function (item) {
+ var shouldDispose = false;
+ if (!this.isDisposed) {
+ var idx = this.disposables.indexOf(item);
+ if (idx !== -1) {
+ shouldDispose = true;
+ this.disposables.splice(idx, 1);
+ this.length--;
+ item.dispose();
+ }
+ }
+ return shouldDispose;
+ };
+
+ /**
+ * Disposes all disposables in the group and removes them from the group.
+ */
+ CompositeDisposablePrototype.dispose = function () {
+ if (!this.isDisposed) {
+ this.isDisposed = true;
+ var len = this.disposables.length, currentDisposables = new Array(len);
+ for(var i = 0; i < len; i++) { currentDisposables[i] = this.disposables[i]; }
+ this.disposables = [];
+ this.length = 0;
+
+ for (i = 0; i < len; i++) {
+ currentDisposables[i].dispose();
+ }
+ }
+ };
+
+ /**
+ * Provides a set of static methods for creating Disposables.
+ * @param {Function} dispose Action to run during the first call to dispose. The action is guaranteed to be run at most once.
+ */
+ var Disposable = Rx.Disposable = function (action) {
+ this.isDisposed = false;
+ this.action = action || noop;
+ };
+
+ /** Performs the task of cleaning up resources. */
+ Disposable.prototype.dispose = function () {
+ if (!this.isDisposed) {
+ this.action();
+ this.isDisposed = true;
+ }
+ };
+
+ /**
+ * Creates a disposable object that invokes the specified action when disposed.
+ * @param {Function} dispose Action to run during the first call to dispose. The action is guaranteed to be run at most once.
+ * @return {Disposable} The disposable object that runs the given action upon disposal.
+ */
+ var disposableCreate = Disposable.create = function (action) { return new Disposable(action); };
+
+ /**
+ * Gets the disposable that does nothing when disposed.
+ */
+ var disposableEmpty = Disposable.empty = { dispose: noop };
+
+ /**
+ * Validates whether the given object is a disposable
+ * @param {Object} Object to test whether it has a dispose method
+ * @returns {Boolean} true if a disposable object, else false.
+ */
+ var isDisposable = Disposable.isDisposable = function (d) {
+ return d && isFunction(d.dispose);
+ };
+
+ var checkDisposed = Disposable.checkDisposed = function (disposable) {
+ if (disposable.isDisposed) { throw new ObjectDisposedError(); }
+ };
+
+ var disposableFixup = Disposable._fixup = function (result) {
+ return isDisposable(result) ? result : disposableEmpty;
+ };
+
+ // Single assignment
+ var SingleAssignmentDisposable = Rx.SingleAssignmentDisposable = function () {
+ this.isDisposed = false;
+ this.current = null;
+ };
+ SingleAssignmentDisposable.prototype.getDisposable = function () {
+ return this.current;
+ };
+ SingleAssignmentDisposable.prototype.setDisposable = function (value) {
+ if (this.current) { throw new Error('Disposable has already been assigned'); }
+ var shouldDispose = this.isDisposed;
+ !shouldDispose && (this.current = value);
+ shouldDispose && value && value.dispose();
+ };
+ SingleAssignmentDisposable.prototype.dispose = function () {
+ if (!this.isDisposed) {
+ this.isDisposed = true;
+ var old = this.current;
+ this.current = null;
+ old && old.dispose();
+ }
+ };
+
+ // Multiple assignment disposable
+ var SerialDisposable = Rx.SerialDisposable = function () {
+ this.isDisposed = false;
+ this.current = null;
+ };
+ SerialDisposable.prototype.getDisposable = function () {
+ return this.current;
+ };
+ SerialDisposable.prototype.setDisposable = function (value) {
+ var shouldDispose = this.isDisposed;
+ if (!shouldDispose) {
+ var old = this.current;
+ this.current = value;
+ }
+ old && old.dispose();
+ shouldDispose && value && value.dispose();
+ };
+ SerialDisposable.prototype.dispose = function () {
+ if (!this.isDisposed) {
+ this.isDisposed = true;
+ var old = this.current;
+ this.current = null;
+ }
+ old && old.dispose();
+ };
+
+ var BinaryDisposable = Rx.BinaryDisposable = function (first, second) {
+ this._first = first;
+ this._second = second;
+ this.isDisposed = false;
+ };
+
+ BinaryDisposable.prototype.dispose = function () {
+ if (!this.isDisposed) {
+ this.isDisposed = true;
+ var old1 = this._first;
+ this._first = null;
+ old1 && old1.dispose();
+ var old2 = this._second;
+ this._second = null;
+ old2 && old2.dispose();
+ }
+ };
+
+ var NAryDisposable = Rx.NAryDisposable = function (disposables) {
+ this._disposables = disposables;
+ this.isDisposed = false;
+ };
+
+ NAryDisposable.prototype.dispose = function () {
+ if (!this.isDisposed) {
+ this.isDisposed = true;
+ for (var i = 0, len = this._disposables.length; i < len; i++) {
+ this._disposables[i].dispose();
+ }
+ this._disposables.length = 0;
+ }
+ };
+
+ /**
+ * Represents a disposable resource that only disposes its underlying disposable resource when all dependent disposable objects have been disposed.
+ */
+ var RefCountDisposable = Rx.RefCountDisposable = (function () {
+
+ function InnerDisposable(disposable) {
+ this.disposable = disposable;
+ this.disposable.count++;
+ this.isInnerDisposed = false;
+ }
+
+ InnerDisposable.prototype.dispose = function () {
+ if (!this.disposable.isDisposed && !this.isInnerDisposed) {
+ this.isInnerDisposed = true;
+ this.disposable.count--;
+ if (this.disposable.count === 0 && this.disposable.isPrimaryDisposed) {
+ this.disposable.isDisposed = true;
+ this.disposable.underlyingDisposable.dispose();
+ }
+ }
+ };
+
+ /**
+ * Initializes a new instance of the RefCountDisposable with the specified disposable.
+ * @constructor
+ * @param {Disposable} disposable Underlying disposable.
+ */
+ function RefCountDisposable(disposable) {
+ this.underlyingDisposable = disposable;
+ this.isDisposed = false;
+ this.isPrimaryDisposed = false;
+ this.count = 0;
+ }
+
+ /**
+ * Disposes the underlying disposable only when all dependent disposables have been disposed
+ */
+ RefCountDisposable.prototype.dispose = function () {
+ if (!this.isDisposed && !this.isPrimaryDisposed) {
+ this.isPrimaryDisposed = true;
+ if (this.count === 0) {
+ this.isDisposed = true;
+ this.underlyingDisposable.dispose();
+ }
+ }
+ };
+
+ /**
+ * Returns a dependent disposable that when disposed decreases the refcount on the underlying disposable.
+ * @returns {Disposable} A dependent disposable contributing to the reference count that manages the underlying disposable's lifetime.
+ */
+ RefCountDisposable.prototype.getDisposable = function () {
+ return this.isDisposed ? disposableEmpty : new InnerDisposable(this);
+ };
+
+ return RefCountDisposable;
+ })();
+
+ var ScheduledItem = Rx.internals.ScheduledItem = function (scheduler, state, action, dueTime, comparer) {
+ this.scheduler = scheduler;
+ this.state = state;
+ this.action = action;
+ this.dueTime = dueTime;
+ this.comparer = comparer || defaultSubComparer;
+ this.disposable = new SingleAssignmentDisposable();
+ };
+
+ ScheduledItem.prototype.invoke = function () {
+ this.disposable.setDisposable(this.invokeCore());
+ };
+
+ ScheduledItem.prototype.compareTo = function (other) {
+ return this.comparer(this.dueTime, other.dueTime);
+ };
+
+ ScheduledItem.prototype.isCancelled = function () {
+ return this.disposable.isDisposed;
+ };
+
+ ScheduledItem.prototype.invokeCore = function () {
+ return disposableFixup(this.action(this.scheduler, this.state));
+ };
+
+ /** Provides a set of static properties to access commonly used schedulers. */
+ var Scheduler = Rx.Scheduler = (function () {
+
+ function Scheduler() { }
+
+ /** Determines whether the given object is a scheduler */
+ Scheduler.isScheduler = function (s) {
+ return s instanceof Scheduler;
+ };
+
+ var schedulerProto = Scheduler.prototype;
+
+ /**
+ * Schedules an action to be executed.
+ * @param state State passed to the action to be executed.
+ * @param {Function} action Action to be executed.
+ * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort).
+ */
+ schedulerProto.schedule = function (state, action) {
+ throw new NotImplementedError();
+ };
+
+ /**
+ * Schedules an action to be executed after dueTime.
+ * @param state State passed to the action to be executed.
+ * @param {Function} action Action to be executed.
+ * @param {Number} dueTime Relative time after which to execute the action.
+ * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort).
+ */
+ schedulerProto.scheduleFuture = function (state, dueTime, action) {
+ var dt = dueTime;
+ dt instanceof Date && (dt = dt - this.now());
+ dt = Scheduler.normalize(dt);
+
+ if (dt === 0) { return this.schedule(state, action); }
+
+ return this._scheduleFuture(state, dt, action);
+ };
+
+ schedulerProto._scheduleFuture = function (state, dueTime, action) {
+ throw new NotImplementedError();
+ };
+
+ /** Gets the current time according to the local machine's system clock. */
+ Scheduler.now = defaultNow;
+
+ /** Gets the current time according to the local machine's system clock. */
+ Scheduler.prototype.now = defaultNow;
+
+ /**
+ * Normalizes the specified TimeSpan value to a positive value.
+ * @param {Number} timeSpan The time span value to normalize.
+ * @returns {Number} The specified TimeSpan value if it is zero or positive; otherwise, 0
+ */
+ Scheduler.normalize = function (timeSpan) {
+ timeSpan < 0 && (timeSpan = 0);
+ return timeSpan;
+ };
+
+ return Scheduler;
+ }());
+
+ var normalizeTime = Scheduler.normalize, isScheduler = Scheduler.isScheduler;
+
+ (function (schedulerProto) {
+
+ function invokeRecImmediate(scheduler, pair) {
+ var state = pair[0], action = pair[1], group = new CompositeDisposable();
+ action(state, innerAction);
+ return group;
+
+ function innerAction(state2) {
+ var isAdded = false, isDone = false;
+
+ var d = scheduler.schedule(state2, scheduleWork);
+ if (!isDone) {
+ group.add(d);
+ isAdded = true;
+ }
+
+ function scheduleWork(_, state3) {
+ if (isAdded) {
+ group.remove(d);
+ } else {
+ isDone = true;
+ }
+ action(state3, innerAction);
+ return disposableEmpty;
+ }
+ }
+ }
+
+ function invokeRecDate(scheduler, pair) {
+ var state = pair[0], action = pair[1], group = new CompositeDisposable();
+ action(state, innerAction);
+ return group;
+
+ function innerAction(state2, dueTime1) {
+ var isAdded = false, isDone = false;
+
+ var d = scheduler.scheduleFuture(state2, dueTime1, scheduleWork);
+ if (!isDone) {
+ group.add(d);
+ isAdded = true;
+ }
+
+ function scheduleWork(_, state3) {
+ if (isAdded) {
+ group.remove(d);
+ } else {
+ isDone = true;
+ }
+ action(state3, innerAction);
+ return disposableEmpty;
+ }
+ }
+ }
+
+ /**
+ * Schedules an action to be executed recursively.
+ * @param {Mixed} state State passed to the action to be executed.
+ * @param {Function} action Action to execute recursively. The last parameter passed to the action is used to trigger recursive scheduling of the action, passing in recursive invocation state.
+ * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort).
+ */
+ schedulerProto.scheduleRecursive = function (state, action) {
+ return this.schedule([state, action], invokeRecImmediate);
+ };
+
+ /**
+ * Schedules an action to be executed recursively after a specified relative or absolute due time.
+ * @param {Mixed} state State passed to the action to be executed.
+ * @param {Function} action Action to execute recursively. The last parameter passed to the action is used to trigger recursive scheduling of the action, passing in the recursive due time and invocation state.
+ * @param {Number | Date} dueTime Relative or absolute time after which to execute the action for the first time.
+ * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort).
+ */
+ schedulerProto.scheduleRecursiveFuture = function (state, dueTime, action) {
+ return this.scheduleFuture([state, action], dueTime, invokeRecDate);
+ };
+
+ }(Scheduler.prototype));
+
+ (function (schedulerProto) {
+
+ /**
+ * Schedules a periodic piece of work by dynamically discovering the scheduler's capabilities. The periodic task will be scheduled using window.setInterval for the base implementation.
+ * @param {Mixed} state Initial state passed to the action upon the first iteration.
+ * @param {Number} period Period for running the work periodically.
+ * @param {Function} action Action to be executed, potentially updating the state.
+ * @returns {Disposable} The disposable object used to cancel the scheduled recurring action (best effort).
+ */
+ schedulerProto.schedulePeriodic = function(state, period, action) {
+ if (typeof root.setInterval === 'undefined') { throw new NotSupportedError(); }
+ period = normalizeTime(period);
+ var s = state, id = root.setInterval(function () { s = action(s); }, period);
+ return disposableCreate(function () { root.clearInterval(id); });
+ };
+
+ }(Scheduler.prototype));
+
+ /** Gets a scheduler that schedules work immediately on the current thread. */
+ var ImmediateScheduler = (function (__super__) {
+ inherits(ImmediateScheduler, __super__);
+ function ImmediateScheduler() {
+ __super__.call(this);
+ }
+
+ ImmediateScheduler.prototype.schedule = function (state, action) {
+ return disposableFixup(action(this, state));
+ };
+
+ return ImmediateScheduler;
+ }(Scheduler));
+
+ var immediateScheduler = Scheduler.immediate = new ImmediateScheduler();
+
+ /**
+ * Gets a scheduler that schedules work as soon as possible on the current thread.
+ */
+ var CurrentThreadScheduler = (function (__super__) {
+ var queue;
+
+ function runTrampoline () {
+ while (queue.length > 0) {
+ var item = queue.dequeue();
+ !item.isCancelled() && item.invoke();
+ }
+ }
+
+ inherits(CurrentThreadScheduler, __super__);
+ function CurrentThreadScheduler() {
+ __super__.call(this);
+ }
+
+ CurrentThreadScheduler.prototype.schedule = function (state, action) {
+ var si = new ScheduledItem(this, state, action, this.now());
+
+ if (!queue) {
+ queue = new PriorityQueue(4);
+ queue.enqueue(si);
+
+ var result = tryCatch(runTrampoline)();
+ queue = null;
+ if (result === errorObj) { thrower(result.e); }
+ } else {
+ queue.enqueue(si);
+ }
+ return si.disposable;
+ };
+
+ CurrentThreadScheduler.prototype.scheduleRequired = function () { return !queue; };
+
+ return CurrentThreadScheduler;
+ }(Scheduler));
+
+ var currentThreadScheduler = Scheduler.currentThread = new CurrentThreadScheduler();
+
+ var SchedulePeriodicRecursive = Rx.internals.SchedulePeriodicRecursive = (function () {
+ function createTick(self) {
+ return function tick(command, recurse) {
+ recurse(0, self._period);
+ var state = tryCatch(self._action)(self._state);
+ if (state === errorObj) {
+ self._cancel.dispose();
+ thrower(state.e);
+ }
+ self._state = state;
+ };
+ }
+
+ function SchedulePeriodicRecursive(scheduler, state, period, action) {
+ this._scheduler = scheduler;
+ this._state = state;
+ this._period = period;
+ this._action = action;
+ }
+
+ SchedulePeriodicRecursive.prototype.start = function () {
+ var d = new SingleAssignmentDisposable();
+ this._cancel = d;
+ d.setDisposable(this._scheduler.scheduleRecursiveFuture(0, this._period, createTick(this)));
+
+ return d;
+ };
+
+ return SchedulePeriodicRecursive;
+ }());
+
+ var scheduleMethod, clearMethod;
+
+ var localTimer = (function () {
+ var localSetTimeout, localClearTimeout = noop;
+ if (!!root.setTimeout) {
+ localSetTimeout = root.setTimeout;
+ localClearTimeout = root.clearTimeout;
+ } else if (!!root.WScript) {
+ localSetTimeout = function (fn, time) {
+ root.WScript.Sleep(time);
+ fn();
+ };
+ } else {
+ throw new NotSupportedError();
+ }
+
+ return {
+ setTimeout: localSetTimeout,
+ clearTimeout: localClearTimeout
+ };
+ }());
+ var localSetTimeout = localTimer.setTimeout,
+ localClearTimeout = localTimer.clearTimeout;
+
+ (function () {
+
+ var nextHandle = 1, tasksByHandle = {}, currentlyRunning = false;
+
+ clearMethod = function (handle) {
+ delete tasksByHandle[handle];
+ };
+
+ function runTask(handle) {
+ if (currentlyRunning) {
+ localSetTimeout(function () { runTask(handle); }, 0);
+ } else {
+ var task = tasksByHandle[handle];
+ if (task) {
+ currentlyRunning = true;
+ var result = tryCatch(task)();
+ clearMethod(handle);
+ currentlyRunning = false;
+ if (result === errorObj) { thrower(result.e); }
+ }
+ }
+ }
+
+ var reNative = new RegExp('^' +
+ String(toString)
+ .replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
+ .replace(/toString| for [^\]]+/g, '.*?') + '$'
+ );
+
+ var setImmediate = typeof (setImmediate = freeGlobal && moduleExports && freeGlobal.setImmediate) == 'function' &&
+ !reNative.test(setImmediate) && setImmediate;
+
+ function postMessageSupported () {
+ // Ensure not in a worker
+ if (!root.postMessage || root.importScripts) { return false; }
+ var isAsync = false, oldHandler = root.onmessage;
+ // Test for async
+ root.onmessage = function () { isAsync = true; };
+ root.postMessage('', '*');
+ root.onmessage = oldHandler;
+
+ return isAsync;
+ }
+
+ // Use in order, setImmediate, nextTick, postMessage, MessageChannel, script readystatechanged, setTimeout
+ if (isFunction(setImmediate)) {
+ scheduleMethod = function (action) {
+ var id = nextHandle++;
+ tasksByHandle[id] = action;
+ setImmediate(function () { runTask(id); });
+
+ return id;
+ };
+ } else if (typeof process !== 'undefined' && {}.toString.call(process) === '[object process]') {
+ scheduleMethod = function (action) {
+ var id = nextHandle++;
+ tasksByHandle[id] = action;
+ process.nextTick(function () { runTask(id); });
+
+ return id;
+ };
+ } else if (postMessageSupported()) {
+ var MSG_PREFIX = 'ms.rx.schedule' + Math.random();
+
+ var onGlobalPostMessage = function (event) {
+ // Only if we're a match to avoid any other global events
+ if (typeof event.data === 'string' && event.data.substring(0, MSG_PREFIX.length) === MSG_PREFIX) {
+ runTask(event.data.substring(MSG_PREFIX.length));
+ }
+ };
+
+ root.addEventListener('message', onGlobalPostMessage, false);
+
+ scheduleMethod = function (action) {
+ var id = nextHandle++;
+ tasksByHandle[id] = action;
+ root.postMessage(MSG_PREFIX + id, '*');
+ return id;
+ };
+ } else if (!!root.MessageChannel) {
+ var channel = new root.MessageChannel();
+
+ channel.port1.onmessage = function (e) { runTask(e.data); };
+
+ scheduleMethod = function (action) {
+ var id = nextHandle++;
+ tasksByHandle[id] = action;
+ channel.port2.postMessage(id);
+ return id;
+ };
+ } else if ('document' in root && 'onreadystatechange' in root.document.createElement('script')) {
+
+ scheduleMethod = function (action) {
+ var scriptElement = root.document.createElement('script');
+ var id = nextHandle++;
+ tasksByHandle[id] = action;
+
+ scriptElement.onreadystatechange = function () {
+ runTask(id);
+ scriptElement.onreadystatechange = null;
+ scriptElement.parentNode.removeChild(scriptElement);
+ scriptElement = null;
+ };
+ root.document.documentElement.appendChild(scriptElement);
+ return id;
+ };
+
+ } else {
+ scheduleMethod = function (action) {
+ var id = nextHandle++;
+ tasksByHandle[id] = action;
+ localSetTimeout(function () {
+ runTask(id);
+ }, 0);
+
+ return id;
+ };
+ }
+ }());
+
+ /**
+ * Gets a scheduler that schedules work via a timed callback based upon platform.
+ */
+ var DefaultScheduler = (function (__super__) {
+ inherits(DefaultScheduler, __super__);
+ function DefaultScheduler() {
+ __super__.call(this);
+ }
+
+ function scheduleAction(disposable, action, scheduler, state) {
+ return function schedule() {
+ disposable.setDisposable(Disposable._fixup(action(scheduler, state)));
+ };
+ }
+
+ function ClearDisposable(id) {
+ this._id = id;
+ this.isDisposed = false;
+ }
+
+ ClearDisposable.prototype.dispose = function () {
+ if (!this.isDisposed) {
+ this.isDisposed = true;
+ clearMethod(this._id);
+ }
+ };
+
+ function LocalClearDisposable(id) {
+ this._id = id;
+ this.isDisposed = false;
+ }
+
+ LocalClearDisposable.prototype.dispose = function () {
+ if (!this.isDisposed) {
+ this.isDisposed = true;
+ localClearTimeout(this._id);
+ }
+ };
+
+ DefaultScheduler.prototype.schedule = function (state, action) {
+ var disposable = new SingleAssignmentDisposable(),
+ id = scheduleMethod(scheduleAction(disposable, action, this, state));
+ return new BinaryDisposable(disposable, new ClearDisposable(id));
+ };
+
+ DefaultScheduler.prototype._scheduleFuture = function (state, dueTime, action) {
+ if (dueTime === 0) { return this.schedule(state, action); }
+ var disposable = new SingleAssignmentDisposable(),
+ id = localSetTimeout(scheduleAction(disposable, action, this, state), dueTime);
+ return new BinaryDisposable(disposable, new LocalClearDisposable(id));
+ };
+
+ return DefaultScheduler;
+ }(Scheduler));
+
+ var defaultScheduler = Scheduler['default'] = Scheduler.async = new DefaultScheduler();
+
+ function IndexedItem(id, value) {
+ this.id = id;
+ this.value = value;
+ }
+
+ IndexedItem.prototype.compareTo = function (other) {
+ var c = this.value.compareTo(other.value);
+ c === 0 && (c = this.id - other.id);
+ return c;
+ };
+
+ var PriorityQueue = Rx.internals.PriorityQueue = function (capacity) {
+ this.items = new Array(capacity);
+ this.length = 0;
+ };
+
+ var priorityProto = PriorityQueue.prototype;
+ priorityProto.isHigherPriority = function (left, right) {
+ return this.items[left].compareTo(this.items[right]) < 0;
+ };
+
+ priorityProto.percolate = function (index) {
+ if (index >= this.length || index < 0) { return; }
+ var parent = index - 1 >> 1;
+ if (parent < 0 || parent === index) { return; }
+ if (this.isHigherPriority(index, parent)) {
+ var temp = this.items[index];
+ this.items[index] = this.items[parent];
+ this.items[parent] = temp;
+ this.percolate(parent);
+ }
+ };
+
+ priorityProto.heapify = function (index) {
+ +index || (index = 0);
+ if (index >= this.length || index < 0) { return; }
+ var left = 2 * index + 1,
+ right = 2 * index + 2,
+ first = index;
+ if (left < this.length && this.isHigherPriority(left, first)) {
+ first = left;
+ }
+ if (right < this.length && this.isHigherPriority(right, first)) {
+ first = right;
+ }
+ if (first !== index) {
+ var temp = this.items[index];
+ this.items[index] = this.items[first];
+ this.items[first] = temp;
+ this.heapify(first);
+ }
+ };
+
+ priorityProto.peek = function () { return this.items[0].value; };
+
+ priorityProto.removeAt = function (index) {
+ this.items[index] = this.items[--this.length];
+ this.items[this.length] = undefined;
+ this.heapify();
+ };
+
+ priorityProto.dequeue = function () {
+ var result = this.peek();
+ this.removeAt(0);
+ return result;
+ };
+
+ priorityProto.enqueue = function (item) {
+ var index = this.length++;
+ this.items[index] = new IndexedItem(PriorityQueue.count++, item);
+ this.percolate(index);
+ };
+
+ priorityProto.remove = function (item) {
+ for (var i = 0; i < this.length; i++) {
+ if (this.items[i].value === item) {
+ this.removeAt(i);
+ return true;
+ }
+ }
+ return false;
+ };
+ PriorityQueue.count = 0;
+
+ /**
+ * Represents a notification to an observer.
+ */
+ var Notification = Rx.Notification = (function () {
+ function Notification() {
+
+ }
+
+ Notification.prototype._accept = function (onNext, onError, onCompleted) {
+ throw new NotImplementedError();
+ };
+
+ Notification.prototype._acceptObserver = function (onNext, onError, onCompleted) {
+ throw new NotImplementedError();
+ };
+
+ /**
+ * Invokes the delegate corresponding to the notification or the observer's method corresponding to the notification and returns the produced result.
+ * @param {Function | Observer} observerOrOnNext Function to invoke for an OnNext notification or Observer to invoke the notification on..
+ * @param {Function} onError Function to invoke for an OnError notification.
+ * @param {Function} onCompleted Function to invoke for an OnCompleted notification.
+ * @returns {Any} Result produced by the observation.
+ */
+ Notification.prototype.accept = function (observerOrOnNext, onError, onCompleted) {
+ return observerOrOnNext && typeof observerOrOnNext === 'object' ?
+ this._acceptObserver(observerOrOnNext) :
+ this._accept(observerOrOnNext, onError, onCompleted);
+ };
+
+ /**
+ * Returns an observable sequence with a single notification.
+ *
+ * @memberOf Notifications
+ * @param {Scheduler} [scheduler] Scheduler to send out the notification calls on.
+ * @returns {Observable} The observable sequence that surfaces the behavior of the notification upon subscription.
+ */
+ Notification.prototype.toObservable = function (scheduler) {
+ var self = this;
+ isScheduler(scheduler) || (scheduler = immediateScheduler);
+ return new AnonymousObservable(function (o) {
+ return scheduler.schedule(self, function (_, notification) {
+ notification._acceptObserver(o);
+ notification.kind === 'N' && o.onCompleted();
+ });
+ });
+ };
+
+ return Notification;
+ })();
+
+ var OnNextNotification = (function (__super__) {
+ inherits(OnNextNotification, __super__);
+ function OnNextNotification(value) {
+ this.value = value;
+ this.kind = 'N';
+ }
+
+ OnNextNotification.prototype._accept = function (onNext) {
+ return onNext(this.value);
+ };
+
+ OnNextNotification.prototype._acceptObserver = function (o) {
+ return o.onNext(this.value);
+ };
+
+ OnNextNotification.prototype.toString = function () {
+ return 'OnNext(' + this.value + ')';
+ };
+
+ return OnNextNotification;
+ }(Notification));
+
+ var OnErrorNotification = (function (__super__) {
+ inherits(OnErrorNotification, __super__);
+ function OnErrorNotification(error) {
+ this.error = error;
+ this.kind = 'E';
+ }
+
+ OnErrorNotification.prototype._accept = function (onNext, onError) {
+ return onError(this.error);
+ };
+
+ OnErrorNotification.prototype._acceptObserver = function (o) {
+ return o.onError(this.error);
+ };
+
+ OnErrorNotification.prototype.toString = function () {
+ return 'OnError(' + this.error + ')';
+ };
+
+ return OnErrorNotification;
+ }(Notification));
+
+ var OnCompletedNotification = (function (__super__) {
+ inherits(OnCompletedNotification, __super__);
+ function OnCompletedNotification() {
+ this.kind = 'C';
+ }
+
+ OnCompletedNotification.prototype._accept = function (onNext, onError, onCompleted) {
+ return onCompleted();
+ };
+
+ OnCompletedNotification.prototype._acceptObserver = function (o) {
+ return o.onCompleted();
+ };
+
+ OnCompletedNotification.prototype.toString = function () {
+ return 'OnCompleted()';
+ };
+
+ return OnCompletedNotification;
+ }(Notification));
+
+ /**
+ * Creates an object that represents an OnNext notification to an observer.
+ * @param {Any} value The value contained in the notification.
+ * @returns {Notification} The OnNext notification containing the value.
+ */
+ var notificationCreateOnNext = Notification.createOnNext = function (value) {
+ return new OnNextNotification(value);
+ };
+
+ /**
+ * Creates an object that represents an OnError notification to an observer.
+ * @param {Any} error The exception contained in the notification.
+ * @returns {Notification} The OnError notification containing the exception.
+ */
+ var notificationCreateOnError = Notification.createOnError = function (error) {
+ return new OnErrorNotification(error);
+ };
+
+ /**
+ * Creates an object that represents an OnCompleted notification to an observer.
+ * @returns {Notification} The OnCompleted notification.
+ */
+ var notificationCreateOnCompleted = Notification.createOnCompleted = function () {
+ return new OnCompletedNotification();
+ };
+
+ /**
+ * Supports push-style iteration over an observable sequence.
+ */
+ var Observer = Rx.Observer = function () { };
+
+ /**
+ * Creates an observer from the specified OnNext, along with optional OnError, and OnCompleted actions.
+ * @param {Function} [onNext] Observer's OnNext action implementation.
+ * @param {Function} [onError] Observer's OnError action implementation.
+ * @param {Function} [onCompleted] Observer's OnCompleted action implementation.
+ * @returns {Observer} The observer object implemented using the given actions.
+ */
+ var observerCreate = Observer.create = function (onNext, onError, onCompleted) {
+ onNext || (onNext = noop);
+ onError || (onError = defaultError);
+ onCompleted || (onCompleted = noop);
+ return new AnonymousObserver(onNext, onError, onCompleted);
+ };
+
+ /**
+ * Abstract base class for implementations of the Observer class.
+ * This base class enforces the grammar of observers where OnError and OnCompleted are terminal messages.
+ */
+ var AbstractObserver = Rx.internals.AbstractObserver = (function (__super__) {
+ inherits(AbstractObserver, __super__);
+
+ /**
+ * Creates a new observer in a non-stopped state.
+ */
+ function AbstractObserver() {
+ this.isStopped = false;
+ }
+
+ // Must be implemented by other observers
+ AbstractObserver.prototype.next = notImplemented;
+ AbstractObserver.prototype.error = notImplemented;
+ AbstractObserver.prototype.completed = notImplemented;
+
+ /**
+ * Notifies the observer of a new element in the sequence.
+ * @param {Any} value Next element in the sequence.
+ */
+ AbstractObserver.prototype.onNext = function (value) {
+ !this.isStopped && this.next(value);
+ };
+
+ /**
+ * Notifies the observer that an exception has occurred.
+ * @param {Any} error The error that has occurred.
+ */
+ AbstractObserver.prototype.onError = function (error) {
+ if (!this.isStopped) {
+ this.isStopped = true;
+ this.error(error);
+ }
+ };
+
+ /**
+ * Notifies the observer of the end of the sequence.
+ */
+ AbstractObserver.prototype.onCompleted = function () {
+ if (!this.isStopped) {
+ this.isStopped = true;
+ this.completed();
+ }
+ };
+
+ /**
+ * Disposes the observer, causing it to transition to the stopped state.
+ */
+ AbstractObserver.prototype.dispose = function () { this.isStopped = true; };
+
+ AbstractObserver.prototype.fail = function (e) {
+ if (!this.isStopped) {
+ this.isStopped = true;
+ this.error(e);
+ return true;
+ }
+
+ return false;
+ };
+
+ return AbstractObserver;
+ }(Observer));
+
+ /**
+ * Class to create an Observer instance from delegate-based implementations of the on* methods.
+ */
+ var AnonymousObserver = Rx.AnonymousObserver = (function (__super__) {
+ inherits(AnonymousObserver, __super__);
+
+ /**
+ * Creates an observer from the specified OnNext, OnError, and OnCompleted actions.
+ * @param {Any} onNext Observer's OnNext action implementation.
+ * @param {Any} onError Observer's OnError action implementation.
+ * @param {Any} onCompleted Observer's OnCompleted action implementation.
+ */
+ function AnonymousObserver(onNext, onError, onCompleted) {
+ __super__.call(this);
+ this._onNext = onNext;
+ this._onError = onError;
+ this._onCompleted = onCompleted;
+ }
+
+ /**
+ * Calls the onNext action.
+ * @param {Any} value Next element in the sequence.
+ */
+ AnonymousObserver.prototype.next = function (value) {
+ this._onNext(value);
+ };
+
+ /**
+ * Calls the onError action.
+ * @param {Any} error The error that has occurred.
+ */
+ AnonymousObserver.prototype.error = function (error) {
+ this._onError(error);
+ };
+
+ /**
+ * Calls the onCompleted action.
+ */
+ AnonymousObserver.prototype.completed = function () {
+ this._onCompleted();
+ };
+
+ return AnonymousObserver;
+ }(AbstractObserver));
+
+ var observableProto;
+
+ /**
+ * Represents a push-style collection.
+ */
+ var Observable = Rx.Observable = (function () {
+
+ function makeSubscribe(self, subscribe) {
+ return function (o) {
+ var oldOnError = o.onError;
+ o.onError = function (e) {
+ makeStackTraceLong(e, self);
+ oldOnError.call(o, e);
+ };
+
+ return subscribe.call(self, o);
+ };
+ }
+
+ function Observable() {
+ if (Rx.config.longStackSupport && hasStacks) {
+ var oldSubscribe = this._subscribe;
+ var e = tryCatch(thrower)(new Error()).e;
+ this.stack = e.stack.substring(e.stack.indexOf('\n') + 1);
+ this._subscribe = makeSubscribe(this, oldSubscribe);
+ }
+ }
+
+ observableProto = Observable.prototype;
+
+ /**
+ * Determines whether the given object is an Observable
+ * @param {Any} An object to determine whether it is an Observable
+ * @returns {Boolean} true if an Observable, else false.
+ */
+ Observable.isObservable = function (o) {
+ return o && isFunction(o.subscribe);
+ };
+
+ /**
+ * Subscribes an o to the observable sequence.
+ * @param {Mixed} [oOrOnNext] The object that is to receive notifications or an action to invoke for each element in the observable sequence.
+ * @param {Function} [onError] Action to invoke upon exceptional termination of the observable sequence.
+ * @param {Function} [onCompleted] Action to invoke upon graceful termination of the observable sequence.
+ * @returns {Diposable} A disposable handling the subscriptions and unsubscriptions.
+ */
+ observableProto.subscribe = observableProto.forEach = function (oOrOnNext, onError, onCompleted) {
+ return this._subscribe(typeof oOrOnNext === 'object' ?
+ oOrOnNext :
+ observerCreate(oOrOnNext, onError, onCompleted));
+ };
+
+ /**
+ * Subscribes to the next value in the sequence with an optional "this" argument.
+ * @param {Function} onNext The function to invoke on each element in the observable sequence.
+ * @param {Any} [thisArg] Object to use as this when executing callback.
+ * @returns {Disposable} A disposable handling the subscriptions and unsubscriptions.
+ */
+ observableProto.subscribeOnNext = function (onNext, thisArg) {
+ return this._subscribe(observerCreate(typeof thisArg !== 'undefined' ? function(x) { onNext.call(thisArg, x); } : onNext));
+ };
+
+ /**
+ * Subscribes to an exceptional condition in the sequence with an optional "this" argument.
+ * @param {Function} onError The function to invoke upon exceptional termination of the observable sequence.
+ * @param {Any} [thisArg] Object to use as this when executing callback.
+ * @returns {Disposable} A disposable handling the subscriptions and unsubscriptions.
+ */
+ observableProto.subscribeOnError = function (onError, thisArg) {
+ return this._subscribe(observerCreate(null, typeof thisArg !== 'undefined' ? function(e) { onError.call(thisArg, e); } : onError));
+ };
+
+ /**
+ * Subscribes to the next value in the sequence with an optional "this" argument.
+ * @param {Function} onCompleted The function to invoke upon graceful termination of the observable sequence.
+ * @param {Any} [thisArg] Object to use as this when executing callback.
+ * @returns {Disposable} A disposable handling the subscriptions and unsubscriptions.
+ */
+ observableProto.subscribeOnCompleted = function (onCompleted, thisArg) {
+ return this._subscribe(observerCreate(null, null, typeof thisArg !== 'undefined' ? function() { onCompleted.call(thisArg); } : onCompleted));
+ };
+
+ return Observable;
+ })();
+
+ var ScheduledObserver = Rx.internals.ScheduledObserver = (function (__super__) {
+ inherits(ScheduledObserver, __super__);
+
+ function ScheduledObserver(scheduler, observer) {
+ __super__.call(this);
+ this.scheduler = scheduler;
+ this.observer = observer;
+ this.isAcquired = false;
+ this.hasFaulted = false;
+ this.queue = [];
+ this.disposable = new SerialDisposable();
+ }
+
+ function enqueueNext(observer, x) { return function () { observer.onNext(x); }; }
+ function enqueueError(observer, e) { return function () { observer.onError(e); }; }
+ function enqueueCompleted(observer) { return function () { observer.onCompleted(); }; }
+
+ ScheduledObserver.prototype.next = function (x) {
+ this.queue.push(enqueueNext(this.observer, x));
+ };
+
+ ScheduledObserver.prototype.error = function (e) {
+ this.queue.push(enqueueError(this.observer, e));
+ };
+
+ ScheduledObserver.prototype.completed = function () {
+ this.queue.push(enqueueCompleted(this.observer));
+ };
+
+
+ function scheduleMethod(state, recurse) {
+ var work;
+ if (state.queue.length > 0) {
+ work = state.queue.shift();
+ } else {
+ state.isAcquired = false;
+ return;
+ }
+ var res = tryCatch(work)();
+ if (res === errorObj) {
+ state.queue = [];
+ state.hasFaulted = true;
+ return thrower(res.e);
+ }
+ recurse(state);
+ }
+
+ ScheduledObserver.prototype.ensureActive = function () {
+ var isOwner = false;
+ if (!this.hasFaulted && this.queue.length > 0) {
+ isOwner = !this.isAcquired;
+ this.isAcquired = true;
+ }
+ isOwner &&
+ this.disposable.setDisposable(this.scheduler.scheduleRecursive(this, scheduleMethod));
+ };
+
+ ScheduledObserver.prototype.dispose = function () {
+ __super__.prototype.dispose.call(this);
+ this.disposable.dispose();
+ };
+
+ return ScheduledObserver;
+ }(AbstractObserver));
+
+ var ObservableBase = Rx.ObservableBase = (function (__super__) {
+ inherits(ObservableBase, __super__);
+
+ function fixSubscriber(subscriber) {
+ return subscriber && isFunction(subscriber.dispose) ? subscriber :
+ isFunction(subscriber) ? disposableCreate(subscriber) : disposableEmpty;
+ }
+
+ function setDisposable(s, state) {
+ var ado = state[0], self = state[1];
+ var sub = tryCatch(self.subscribeCore).call(self, ado);
+ if (sub === errorObj && !ado.fail(errorObj.e)) { thrower(errorObj.e); }
+ ado.setDisposable(fixSubscriber(sub));
+ }
+
+ function ObservableBase() {
+ __super__.call(this);
+ }
+
+ ObservableBase.prototype._subscribe = function (o) {
+ var ado = new AutoDetachObserver(o), state = [ado, this];
+
+ if (currentThreadScheduler.scheduleRequired()) {
+ currentThreadScheduler.schedule(state, setDisposable);
+ } else {
+ setDisposable(null, state);
+ }
+ return ado;
+ };
+
+ ObservableBase.prototype.subscribeCore = notImplemented;
+
+ return ObservableBase;
+ }(Observable));
+
+var FlatMapObservable = Rx.FlatMapObservable = (function(__super__) {
+
+ inherits(FlatMapObservable, __super__);
+
+ function FlatMapObservable(source, selector, resultSelector, thisArg) {
+ this.resultSelector = isFunction(resultSelector) ? resultSelector : null;
+ this.selector = bindCallback(isFunction(selector) ? selector : function() { return selector; }, thisArg, 3);
+ this.source = source;
+ __super__.call(this);
+ }
+
+ FlatMapObservable.prototype.subscribeCore = function(o) {
+ return this.source.subscribe(new InnerObserver(o, this.selector, this.resultSelector, this));
+ };
+
+ inherits(InnerObserver, AbstractObserver);
+ function InnerObserver(observer, selector, resultSelector, source) {
+ this.i = 0;
+ this.selector = selector;
+ this.resultSelector = resultSelector;
+ this.source = source;
+ this.o = observer;
+ AbstractObserver.call(this);
+ }
+
+ InnerObserver.prototype._wrapResult = function(result, x, i) {
+ return this.resultSelector ?
+ result.map(function(y, i2) { return this.resultSelector(x, y, i, i2); }, this) :
+ result;
+ };
+
+ InnerObserver.prototype.next = function(x) {
+ var i = this.i++;
+ var result = tryCatch(this.selector)(x, i, this.source);
+ if (result === errorObj) { return this.o.onError(result.e); }
+
+ isPromise(result) && (result = observableFromPromise(result));
+ (isArrayLike(result) || isIterable(result)) && (result = Observable.from(result));
+ this.o.onNext(this._wrapResult(result, x, i));
+ };
+
+ InnerObserver.prototype.error = function(e) { this.o.onError(e); };
+
+ InnerObserver.prototype.completed = function() { this.o.onCompleted(); };
+
+ return FlatMapObservable;
+
+}(ObservableBase));
+
+ var Enumerable = Rx.internals.Enumerable = function () { };
+
+ function IsDisposedDisposable(state) {
+ this._s = state;
+ this.isDisposed = false;
+ }
+
+ IsDisposedDisposable.prototype.dispose = function () {
+ if (!this.isDisposed) {
+ this.isDisposed = true;
+ this._s.isDisposed = true;
+ }
+ };
+
+ var ConcatEnumerableObservable = (function(__super__) {
+ inherits(ConcatEnumerableObservable, __super__);
+ function ConcatEnumerableObservable(sources) {
+ this.sources = sources;
+ __super__.call(this);
+ }
+
+ function scheduleMethod(state, recurse) {
+ if (state.isDisposed) { return; }
+ var currentItem = tryCatch(state.e.next).call(state.e);
+ if (currentItem === errorObj) { return state.o.onError(currentItem.e); }
+ if (currentItem.done) { return state.o.onCompleted(); }
+
+ // Check if promise
+ var currentValue = currentItem.value;
+ isPromise(currentValue) && (currentValue = observableFromPromise(currentValue));
+
+ var d = new SingleAssignmentDisposable();
+ state.subscription.setDisposable(d);
+ d.setDisposable(currentValue.subscribe(new InnerObserver(state, recurse)));
+ }
+
+ ConcatEnumerableObservable.prototype.subscribeCore = function (o) {
+ var subscription = new SerialDisposable();
+ var state = {
+ isDisposed: false,
+ o: o,
+ subscription: subscription,
+ e: this.sources[$iterator$]()
+ };
+
+ var cancelable = currentThreadScheduler.scheduleRecursive(state, scheduleMethod);
+ return new NAryDisposable([subscription, cancelable, new IsDisposedDisposable(state)]);
+ };
+
+ function InnerObserver(state, recurse) {
+ this._state = state;
+ this._recurse = recurse;
+ AbstractObserver.call(this);
+ }
+
+ inherits(InnerObserver, AbstractObserver);
+
+ InnerObserver.prototype.next = function (x) { this._state.o.onNext(x); };
+ InnerObserver.prototype.error = function (e) { this._state.o.onError(e); };
+ InnerObserver.prototype.completed = function () { this._recurse(this._state); };
+
+ return ConcatEnumerableObservable;
+ }(ObservableBase));
+
+ Enumerable.prototype.concat = function () {
+ return new ConcatEnumerableObservable(this);
+ };
+
+ var CatchErrorObservable = (function(__super__) {
+ function CatchErrorObservable(sources) {
+ this.sources = sources;
+ __super__.call(this);
+ }
+
+ inherits(CatchErrorObservable, __super__);
+
+ function scheduleMethod(state, recurse) {
+ if (state.isDisposed) { return; }
+ var currentItem = tryCatch(state.e.next).call(state.e);
+ if (currentItem === errorObj) { return state.o.onError(currentItem.e); }
+ if (currentItem.done) { return state.lastError !== null ? state.o.onError(state.lastError) : state.o.onCompleted(); }
+
+ var currentValue = currentItem.value;
+ isPromise(currentValue) && (currentValue = observableFromPromise(currentValue));
+
+ var d = new SingleAssignmentDisposable();
+ state.subscription.setDisposable(d);
+ d.setDisposable(currentValue.subscribe(new InnerObserver(state, recurse)));
+ }
+
+ CatchErrorObservable.prototype.subscribeCore = function (o) {
+ var subscription = new SerialDisposable();
+ var state = {
+ isDisposed: false,
+ e: this.sources[$iterator$](),
+ subscription: subscription,
+ lastError: null,
+ o: o
+ };
+
+ var cancelable = currentThreadScheduler.scheduleRecursive(state, scheduleMethod);
+ return new NAryDisposable([subscription, cancelable, new IsDisposedDisposable(state)]);
+ };
+
+ function InnerObserver(state, recurse) {
+ this._state = state;
+ this._recurse = recurse;
+ AbstractObserver.call(this);
+ }
+
+ inherits(InnerObserver, AbstractObserver);
+
+ InnerObserver.prototype.next = function (x) { this._state.o.onNext(x); };
+ InnerObserver.prototype.error = function (e) { this._state.lastError = e; this._recurse(this._state); };
+ InnerObserver.prototype.completed = function () { this._state.o.onCompleted(); };
+
+ return CatchErrorObservable;
+ }(ObservableBase));
+
+ Enumerable.prototype.catchError = function () {
+ return new CatchErrorObservable(this);
+ };
+
+ var RepeatEnumerable = (function (__super__) {
+ inherits(RepeatEnumerable, __super__);
+ function RepeatEnumerable(v, c) {
+ this.v = v;
+ this.c = c == null ? -1 : c;
+ }
+
+ RepeatEnumerable.prototype[$iterator$] = function () {
+ return new RepeatEnumerator(this);
+ };
+
+ function RepeatEnumerator(p) {
+ this.v = p.v;
+ this.l = p.c;
+ }
+
+ RepeatEnumerator.prototype.next = function () {
+ if (this.l === 0) { return doneEnumerator; }
+ if (this.l > 0) { this.l--; }
+ return { done: false, value: this.v };
+ };
+
+ return RepeatEnumerable;
+ }(Enumerable));
+
+ var enumerableRepeat = Enumerable.repeat = function (value, repeatCount) {
+ return new RepeatEnumerable(value, repeatCount);
+ };
+
+ var OfEnumerable = (function(__super__) {
+ inherits(OfEnumerable, __super__);
+ function OfEnumerable(s, fn, thisArg) {
+ this.s = s;
+ this.fn = fn ? bindCallback(fn, thisArg, 3) : null;
+ }
+ OfEnumerable.prototype[$iterator$] = function () {
+ return new OfEnumerator(this);
+ };
+
+ function OfEnumerator(p) {
+ this.i = -1;
+ this.s = p.s;
+ this.l = this.s.length;
+ this.fn = p.fn;
+ }
+
+ OfEnumerator.prototype.next = function () {
+ return ++this.i < this.l ?
+ { done: false, value: !this.fn ? this.s[this.i] : this.fn(this.s[this.i], this.i, this.s) } :
+ doneEnumerator;
+ };
+
+ return OfEnumerable;
+ }(Enumerable));
+
+ var enumerableOf = Enumerable.of = function (source, selector, thisArg) {
+ return new OfEnumerable(source, selector, thisArg);
+ };
+
+ var ToArrayObservable = (function(__super__) {
+ inherits(ToArrayObservable, __super__);
+ function ToArrayObservable(source) {
+ this.source = source;
+ __super__.call(this);
+ }
+
+ ToArrayObservable.prototype.subscribeCore = function(o) {
+ return this.source.subscribe(new InnerObserver(o));
+ };
+
+ inherits(InnerObserver, AbstractObserver);
+ function InnerObserver(o) {
+ this.o = o;
+ this.a = [];
+ AbstractObserver.call(this);
+ }
+
+ InnerObserver.prototype.next = function (x) { this.a.push(x); };
+ InnerObserver.prototype.error = function (e) { this.o.onError(e); };
+ InnerObserver.prototype.completed = function () { this.o.onNext(this.a); this.o.onCompleted(); };
+
+ return ToArrayObservable;
+ }(ObservableBase));
+
+ /**
+ * Creates an array from an observable sequence.
+ * @returns {Observable} An observable sequence containing a single element with a list containing all the elements of the source sequence.
+ */
+ observableProto.toArray = function () {
+ return new ToArrayObservable(this);
+ };
+
+ /**
+ * Creates an observable sequence from a specified subscribe method implementation.
+ * @example
+ * var res = Rx.Observable.create(function (observer) { return function () { } );
+ * var res = Rx.Observable.create(function (observer) { return Rx.Disposable.empty; } );
+ * var res = Rx.Observable.create(function (observer) { } );
+ * @param {Function} subscribe Implementation of the resulting observable sequence's subscribe method, returning a function that will be wrapped in a Disposable.
+ * @returns {Observable} The observable sequence with the specified implementation for the Subscribe method.
+ */
+ Observable.create = function (subscribe, parent) {
+ return new AnonymousObservable(subscribe, parent);
+ };
+
+ var Defer = (function(__super__) {
+ inherits(Defer, __super__);
+ function Defer(factory) {
+ this._f = factory;
+ __super__.call(this);
+ }
+
+ Defer.prototype.subscribeCore = function (o) {
+ var result = tryCatch(this._f)();
+ if (result === errorObj) { return observableThrow(result.e).subscribe(o);}
+ isPromise(result) && (result = observableFromPromise(result));
+ return result.subscribe(o);
+ };
+
+ return Defer;
+ }(ObservableBase));
+
+ /**
+ * Returns an observable sequence that invokes the specified factory function whenever a new observer subscribes.
+ *
+ * @example
+ * var res = Rx.Observable.defer(function () { return Rx.Observable.fromArray([1,2,3]); });
+ * @param {Function} observableFactory Observable factory function to invoke for each observer that subscribes to the resulting sequence or Promise.
+ * @returns {Observable} An observable sequence whose observers trigger an invocation of the given observable factory function.
+ */
+ var observableDefer = Observable.defer = function (observableFactory) {
+ return new Defer(observableFactory);
+ };
+
+ var EmptyObservable = (function(__super__) {
+ inherits(EmptyObservable, __super__);
+ function EmptyObservable(scheduler) {
+ this.scheduler = scheduler;
+ __super__.call(this);
+ }
+
+ EmptyObservable.prototype.subscribeCore = function (observer) {
+ var sink = new EmptySink(observer, this.scheduler);
+ return sink.run();
+ };
+
+ function EmptySink(observer, scheduler) {
+ this.observer = observer;
+ this.scheduler = scheduler;
+ }
+
+ function scheduleItem(s, state) {
+ state.onCompleted();
+ return disposableEmpty;
+ }
+
+ EmptySink.prototype.run = function () {
+ var state = this.observer;
+ return this.scheduler === immediateScheduler ?
+ scheduleItem(null, state) :
+ this.scheduler.schedule(state, scheduleItem);
+ };
+
+ return EmptyObservable;
+ }(ObservableBase));
+
+ var EMPTY_OBSERVABLE = new EmptyObservable(immediateScheduler);
+
+ /**
+ * Returns an empty observable sequence, using the specified scheduler to send out the single OnCompleted message.
+ *
+ * @example
+ * var res = Rx.Observable.empty();
+ * var res = Rx.Observable.empty(Rx.Scheduler.timeout);
+ * @param {Scheduler} [scheduler] Scheduler to send the termination call on.
+ * @returns {Observable} An observable sequence with no elements.
+ */
+ var observableEmpty = Observable.empty = function (scheduler) {
+ isScheduler(scheduler) || (scheduler = immediateScheduler);
+ return scheduler === immediateScheduler ? EMPTY_OBSERVABLE : new EmptyObservable(scheduler);
+ };
+
+ var FromObservable = (function(__super__) {
+ inherits(FromObservable, __super__);
+ function FromObservable(iterable, fn, scheduler) {
+ this._iterable = iterable;
+ this._fn = fn;
+ this._scheduler = scheduler;
+ __super__.call(this);
+ }
+
+ function createScheduleMethod(o, it, fn) {
+ return function loopRecursive(i, recurse) {
+ var next = tryCatch(it.next).call(it);
+ if (next === errorObj) { return o.onError(next.e); }
+ if (next.done) { return o.onCompleted(); }
+
+ var result = next.value;
+
+ if (isFunction(fn)) {
+ result = tryCatch(fn)(result, i);
+ if (result === errorObj) { return o.onError(result.e); }
+ }
+
+ o.onNext(result);
+ recurse(i + 1);
+ };
+ }
+
+ FromObservable.prototype.subscribeCore = function (o) {
+ var list = Object(this._iterable),
+ it = getIterable(list);
+
+ return this._scheduler.scheduleRecursive(0, createScheduleMethod(o, it, this._fn));
+ };
+
+ return FromObservable;
+ }(ObservableBase));
+
+ var maxSafeInteger = Math.pow(2, 53) - 1;
+
+ function StringIterable(s) {
+ this._s = s;
+ }
+
+ StringIterable.prototype[$iterator$] = function () {
+ return new StringIterator(this._s);
+ };
+
+ function StringIterator(s) {
+ this._s = s;
+ this._l = s.length;
+ this._i = 0;
+ }
+
+ StringIterator.prototype[$iterator$] = function () {
+ return this;
+ };
+
+ StringIterator.prototype.next = function () {
+ return this._i < this._l ? { done: false, value: this._s.charAt(this._i++) } : doneEnumerator;
+ };
+
+ function ArrayIterable(a) {
+ this._a = a;
+ }
+
+ ArrayIterable.prototype[$iterator$] = function () {
+ return new ArrayIterator(this._a);
+ };
+
+ function ArrayIterator(a) {
+ this._a = a;
+ this._l = toLength(a);
+ this._i = 0;
+ }
+
+ ArrayIterator.prototype[$iterator$] = function () {
+ return this;
+ };
+
+ ArrayIterator.prototype.next = function () {
+ return this._i < this._l ? { done: false, value: this._a[this._i++] } : doneEnumerator;
+ };
+
+ function numberIsFinite(value) {
+ return typeof value === 'number' && root.isFinite(value);
+ }
+
+ function isNan(n) {
+ return n !== n;
+ }
+
+ function getIterable(o) {
+ var i = o[$iterator$], it;
+ if (!i && typeof o === 'string') {
+ it = new StringIterable(o);
+ return it[$iterator$]();
+ }
+ if (!i && o.length !== undefined) {
+ it = new ArrayIterable(o);
+ return it[$iterator$]();
+ }
+ if (!i) { throw new TypeError('Object is not iterable'); }
+ return o[$iterator$]();
+ }
+
+ function sign(value) {
+ var number = +value;
+ if (number === 0) { return number; }
+ if (isNaN(number)) { return number; }
+ return number < 0 ? -1 : 1;
+ }
+
+ function toLength(o) {
+ var len = +o.length;
+ if (isNaN(len)) { return 0; }
+ if (len === 0 || !numberIsFinite(len)) { return len; }
+ len = sign(len) * Math.floor(Math.abs(len));
+ if (len <= 0) { return 0; }
+ if (len > maxSafeInteger) { return maxSafeInteger; }
+ return len;
+ }
+
+ /**
+ * This method creates a new Observable sequence from an array-like or iterable object.
+ * @param {Any} arrayLike An array-like or iterable object to convert to an Observable sequence.
+ * @param {Function} [mapFn] Map function to call on every element of the array.
+ * @param {Any} [thisArg] The context to use calling the mapFn if provided.
+ * @param {Scheduler} [scheduler] Optional scheduler to use for scheduling. If not provided, defaults to Scheduler.currentThread.
+ */
+ var observableFrom = Observable.from = function (iterable, mapFn, thisArg, scheduler) {
+ if (iterable == null) {
+ throw new Error('iterable cannot be null.')
+ }
+ if (mapFn && !isFunction(mapFn)) {
+ throw new Error('mapFn when provided must be a function');
+ }
+ if (mapFn) {
+ var mapper = bindCallback(mapFn, thisArg, 2);
+ }
+ isScheduler(scheduler) || (scheduler = currentThreadScheduler);
+ return new FromObservable(iterable, mapper, scheduler);
+ }
+
+ var FromArrayObservable = (function(__super__) {
+ inherits(FromArrayObservable, __super__);
+ function FromArrayObservable(args, scheduler) {
+ this._args = args;
+ this._scheduler = scheduler;
+ __super__.call(this);
+ }
+
+ function scheduleMethod(o, args) {
+ var len = args.length;
+ return function loopRecursive (i, recurse) {
+ if (i < len) {
+ o.onNext(args[i]);
+ recurse(i + 1);
+ } else {
+ o.onCompleted();
+ }
+ };
+ }
+
+ FromArrayObservable.prototype.subscribeCore = function (o) {
+ return this._scheduler.scheduleRecursive(0, scheduleMethod(o, this._args));
+ };
+
+ return FromArrayObservable;
+ }(ObservableBase));
+
+ /**
+ * Converts an array to an observable sequence, using an optional scheduler to enumerate the array.
+ * @deprecated use Observable.from or Observable.of
+ * @param {Scheduler} [scheduler] Scheduler to run the enumeration of the input sequence on.
+ * @returns {Observable} The observable sequence whose elements are pulled from the given enumerable sequence.
+ */
+ var observableFromArray = Observable.fromArray = function (array, scheduler) {
+ isScheduler(scheduler) || (scheduler = currentThreadScheduler);
+ return new FromArrayObservable(array, scheduler)
+ };
+
+ var NeverObservable = (function(__super__) {
+ inherits(NeverObservable, __super__);
+ function NeverObservable() {
+ __super__.call(this);
+ }
+
+ NeverObservable.prototype.subscribeCore = function (observer) {
+ return disposableEmpty;
+ };
+
+ return NeverObservable;
+ }(ObservableBase));
+
+ var NEVER_OBSERVABLE = new NeverObservable();
+
+ /**
+ * Returns a non-terminating observable sequence, which can be used to denote an infinite duration (e.g. when using reactive joins).
+ * @returns {Observable} An observable sequence whose observers will never get called.
+ */
+ var observableNever = Observable.never = function () {
+ return NEVER_OBSERVABLE;
+ };
+
+ function observableOf (scheduler, array) {
+ isScheduler(scheduler) || (scheduler = currentThreadScheduler);
+ return new FromArrayObservable(array, scheduler);
+ }
+
+ /**
+ * This method creates a new Observable instance with a variable number of arguments, regardless of number or type of the arguments.
+ * @returns {Observable} The observable sequence whose elements are pulled from the given arguments.
+ */
+ Observable.of = function () {
+ var len = arguments.length, args = new Array(len);
+ for(var i = 0; i < len; i++) { args[i] = arguments[i]; }
+ return new FromArrayObservable(args, currentThreadScheduler);
+ };
+
+ /**
+ * This method creates a new Observable instance with a variable number of arguments, regardless of number or type of the arguments.
+ * @param {Scheduler} scheduler A scheduler to use for scheduling the arguments.
+ * @returns {Observable} The observable sequence whose elements are pulled from the given arguments.
+ */
+ Observable.ofWithScheduler = function (scheduler) {
+ var len = arguments.length, args = new Array(len - 1);
+ for(var i = 1; i < len; i++) { args[i - 1] = arguments[i]; }
+ return new FromArrayObservable(args, scheduler);
+ };
+
+ var PairsObservable = (function(__super__) {
+ inherits(PairsObservable, __super__);
+ function PairsObservable(o, scheduler) {
+ this._o = o;
+ this._keys = Object.keys(o);
+ this._scheduler = scheduler;
+ __super__.call(this);
+ }
+
+ function scheduleMethod(o, obj, keys) {
+ return function loopRecursive(i, recurse) {
+ if (i < keys.length) {
+ var key = keys[i];
+ o.onNext([key, obj[key]]);
+ recurse(i + 1);
+ } else {
+ o.onCompleted();
+ }
+ };
+ }
+
+ PairsObservable.prototype.subscribeCore = function (o) {
+ return this._scheduler.scheduleRecursive(0, scheduleMethod(o, this._o, this._keys));
+ };
+
+ return PairsObservable;
+ }(ObservableBase));
+
+ /**
+ * Convert an object into an observable sequence of [key, value] pairs.
+ * @param {Object} obj The object to inspect.
+ * @param {Scheduler} [scheduler] Scheduler to run the enumeration of the input sequence on.
+ * @returns {Observable} An observable sequence of [key, value] pairs from the object.
+ */
+ Observable.pairs = function (obj, scheduler) {
+ scheduler || (scheduler = currentThreadScheduler);
+ return new PairsObservable(obj, scheduler);
+ };
+
+ var RangeObservable = (function(__super__) {
+ inherits(RangeObservable, __super__);
+ function RangeObservable(start, count, scheduler) {
+ this.start = start;
+ this.rangeCount = count;
+ this.scheduler = scheduler;
+ __super__.call(this);
+ }
+
+ function loopRecursive(start, count, o) {
+ return function loop (i, recurse) {
+ if (i < count) {
+ o.onNext(start + i);
+ recurse(i + 1);
+ } else {
+ o.onCompleted();
+ }
+ };
+ }
+
+ RangeObservable.prototype.subscribeCore = function (o) {
+ return this.scheduler.scheduleRecursive(
+ 0,
+ loopRecursive(this.start, this.rangeCount, o)
+ );
+ };
+
+ return RangeObservable;
+ }(ObservableBase));
+
+ /**
+ * Generates an observable sequence of integral numbers within a specified range, using the specified scheduler to send out observer messages.
+ * @param {Number} start The value of the first integer in the sequence.
+ * @param {Number} count The number of sequential integers to generate.
+ * @param {Scheduler} [scheduler] Scheduler to run the generator loop on. If not specified, defaults to Scheduler.currentThread.
+ * @returns {Observable} An observable sequence that contains a range of sequential integral numbers.
+ */
+ Observable.range = function (start, count, scheduler) {
+ isScheduler(scheduler) || (scheduler = currentThreadScheduler);
+ return new RangeObservable(start, count, scheduler);
+ };
+
+ var RepeatObservable = (function(__super__) {
+ inherits(RepeatObservable, __super__);
+ function RepeatObservable(value, repeatCount, scheduler) {
+ this.value = value;
+ this.repeatCount = repeatCount == null ? -1 : repeatCount;
+ this.scheduler = scheduler;
+ __super__.call(this);
+ }
+
+ RepeatObservable.prototype.subscribeCore = function (observer) {
+ var sink = new RepeatSink(observer, this);
+ return sink.run();
+ };
+
+ return RepeatObservable;
+ }(ObservableBase));
+
+ function RepeatSink(observer, parent) {
+ this.observer = observer;
+ this.parent = parent;
+ }
+
+ RepeatSink.prototype.run = function () {
+ var observer = this.observer, value = this.parent.value;
+ function loopRecursive(i, recurse) {
+ if (i === -1 || i > 0) {
+ observer.onNext(value);
+ i > 0 && i--;
+ }
+ if (i === 0) { return observer.onCompleted(); }
+ recurse(i);
+ }
+
+ return this.parent.scheduler.scheduleRecursive(this.parent.repeatCount, loopRecursive);
+ };
+
+ /**
+ * Generates an observable sequence that repeats the given element the specified number of times, using the specified scheduler to send out observer messages.
+ * @param {Mixed} value Element to repeat.
+ * @param {Number} repeatCount [Optiona] Number of times to repeat the element. If not specified, repeats indefinitely.
+ * @param {Scheduler} scheduler Scheduler to run the producer loop on. If not specified, defaults to Scheduler.immediate.
+ * @returns {Observable} An observable sequence that repeats the given element the specified number of times.
+ */
+ Observable.repeat = function (value, repeatCount, scheduler) {
+ isScheduler(scheduler) || (scheduler = currentThreadScheduler);
+ return new RepeatObservable(value, repeatCount, scheduler);
+ };
+
+ var JustObservable = (function(__super__) {
+ inherits(JustObservable, __super__);
+ function JustObservable(value, scheduler) {
+ this._value = value;
+ this._scheduler = scheduler;
+ __super__.call(this);
+ }
+
+ JustObservable.prototype.subscribeCore = function (o) {
+ var state = [this._value, o];
+ return this._scheduler === immediateScheduler ?
+ scheduleItem(null, state) :
+ this._scheduler.schedule(state, scheduleItem);
+ };
+
+ function scheduleItem(s, state) {
+ var value = state[0], observer = state[1];
+ observer.onNext(value);
+ observer.onCompleted();
+ return disposableEmpty;
+ }
+
+ return JustObservable;
+ }(ObservableBase));
+
+ /**
+ * Returns an observable sequence that contains a single element, using the specified scheduler to send out observer messages.
+ * There is an alias called 'just' or browsers <IE9.
+ * @param {Mixed} value Single element in the resulting observable sequence.
+ * @param {Scheduler} scheduler Scheduler to send the single element on. If not specified, defaults to Scheduler.immediate.
+ * @returns {Observable} An observable sequence containing the single specified element.
+ */
+ var observableReturn = Observable['return'] = Observable.just = function (value, scheduler) {
+ isScheduler(scheduler) || (scheduler = immediateScheduler);
+ return new JustObservable(value, scheduler);
+ };
+
+ var ThrowObservable = (function(__super__) {
+ inherits(ThrowObservable, __super__);
+ function ThrowObservable(error, scheduler) {
+ this._error = error;
+ this._scheduler = scheduler;
+ __super__.call(this);
+ }
+
+ ThrowObservable.prototype.subscribeCore = function (o) {
+ var state = [this._error, o];
+ return this._scheduler === immediateScheduler ?
+ scheduleItem(null, state) :
+ this._scheduler.schedule(state, scheduleItem);
+ };
+
+ function scheduleItem(s, state) {
+ var e = state[0], o = state[1];
+ o.onError(e);
+ return disposableEmpty;
+ }
+
+ return ThrowObservable;
+ }(ObservableBase));
+
+ /**
+ * Returns an observable sequence that terminates with an exception, using the specified scheduler to send out the single onError message.
+ * There is an alias to this method called 'throwError' for browsers <IE9.
+ * @param {Mixed} error An object used for the sequence's termination.
+ * @param {Scheduler} scheduler Scheduler to send the exceptional termination call on. If not specified, defaults to Scheduler.immediate.
+ * @returns {Observable} The observable sequence that terminates exceptionally with the specified exception object.
+ */
+ var observableThrow = Observable['throw'] = function (error, scheduler) {
+ isScheduler(scheduler) || (scheduler = immediateScheduler);
+ return new ThrowObservable(error, scheduler);
+ };
+
+ var CatchObservable = (function (__super__) {
+ inherits(CatchObservable, __super__);
+ function CatchObservable(source, fn) {
+ this.source = source;
+ this._fn = fn;
+ __super__.call(this);
+ }
+
+ CatchObservable.prototype.subscribeCore = function (o) {
+ var d1 = new SingleAssignmentDisposable(), subscription = new SerialDisposable();
+ subscription.setDisposable(d1);
+ d1.setDisposable(this.source.subscribe(new CatchObserver(o, subscription, this._fn)));
+ return subscription;
+ };
+
+ return CatchObservable;
+ }(ObservableBase));
+
+ var CatchObserver = (function(__super__) {
+ inherits(CatchObserver, __super__);
+ function CatchObserver(o, s, fn) {
+ this._o = o;
+ this._s = s;
+ this._fn = fn;
+ __super__.call(this);
+ }
+
+ CatchObserver.prototype.next = function (x) { this._o.onNext(x); };
+ CatchObserver.prototype.completed = function () { return this._o.onCompleted(); };
+ CatchObserver.prototype.error = function (e) {
+ var result = tryCatch(this._fn)(e);
+ if (result === errorObj) { return this._o.onError(result.e); }
+ isPromise(result) && (result = observableFromPromise(result));
+
+ var d = new SingleAssignmentDisposable();
+ this._s.setDisposable(d);
+ d.setDisposable(result.subscribe(this._o));
+ };
+
+ return CatchObserver;
+ }(AbstractObserver));
+
+ /**
+ * Continues an observable sequence that is terminated by an exception with the next observable sequence.
+ * @param {Mixed} handlerOrSecond Exception handler function that returns an observable sequence given the error that occurred in the first sequence, or a second observable sequence used to produce results when an error occurred in the first sequence.
+ * @returns {Observable} An observable sequence containing the first sequence's elements, followed by the elements of the handler sequence in case an exception occurred.
+ */
+ observableProto['catch'] = function (handlerOrSecond) {
+ return isFunction(handlerOrSecond) ? new CatchObservable(this, handlerOrSecond) : observableCatch([this, handlerOrSecond]);
+ };
+
+ /**
+ * Continues an observable sequence that is terminated by an exception with the next observable sequence.
+ * @param {Array | Arguments} args Arguments or an array to use as the next sequence if an error occurs.
+ * @returns {Observable} An observable sequence containing elements from consecutive source sequences until a source sequence terminates successfully.
+ */
+ var observableCatch = Observable['catch'] = function () {
+ var items;
+ if (Array.isArray(arguments[0])) {
+ items = arguments[0];
+ } else {
+ var len = arguments.length;
+ items = new Array(len);
+ for(var i = 0; i < len; i++) { items[i] = arguments[i]; }
+ }
+ return enumerableOf(items).catchError();
+ };
+
+ /**
+ * Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences or Promises produces an element.
+ * This can be in the form of an argument list of observables or an array.
+ *
+ * @example
+ * 1 - obs = observable.combineLatest(obs1, obs2, obs3, function (o1, o2, o3) { return o1 + o2 + o3; });
+ * 2 - obs = observable.combineLatest([obs1, obs2, obs3], function (o1, o2, o3) { return o1 + o2 + o3; });
+ * @returns {Observable} An observable sequence containing the result of combining elements of the sources using the specified result selector function.
+ */
+ observableProto.combineLatest = function () {
+ var len = arguments.length, args = new Array(len);
+ for(var i = 0; i < len; i++) { args[i] = arguments[i]; }
+ if (Array.isArray(args[0])) {
+ args[0].unshift(this);
+ } else {
+ args.unshift(this);
+ }
+ return combineLatest.apply(this, args);
+ };
+
+ function falseFactory() { return false; }
+ function argumentsToArray() {
+ var len = arguments.length, args = new Array(len);
+ for(var i = 0; i < len; i++) { args[i] = arguments[i]; }
+ return args;
+ }
+
+ var CombineLatestObservable = (function(__super__) {
+ inherits(CombineLatestObservable, __super__);
+ function CombineLatestObservable(params, cb) {
+ this._params = params;
+ this._cb = cb;
+ __super__.call(this);
+ }
+
+ CombineLatestObservable.prototype.subscribeCore = function(observer) {
+ var len = this._params.length,
+ subscriptions = new Array(len);
+
+ var state = {
+ hasValue: arrayInitialize(len, falseFactory),
+ hasValueAll: false,
+ isDone: arrayInitialize(len, falseFactory),
+ values: new Array(len)
+ };
+
+ for (var i = 0; i < len; i++) {
+ var source = this._params[i], sad = new SingleAssignmentDisposable();
+ subscriptions[i] = sad;
+ isPromise(source) && (source = observableFromPromise(source));
+ sad.setDisposable(source.subscribe(new CombineLatestObserver(observer, i, this._cb, state)));
+ }
+
+ return new NAryDisposable(subscriptions);
+ };
+
+ return CombineLatestObservable;
+ }(ObservableBase));
+
+ var CombineLatestObserver = (function (__super__) {
+ inherits(CombineLatestObserver, __super__);
+ function CombineLatestObserver(o, i, cb, state) {
+ this._o = o;
+ this._i = i;
+ this._cb = cb;
+ this._state = state;
+ __super__.call(this);
+ }
+
+ function notTheSame(i) {
+ return function (x, j) {
+ return j !== i;
+ };
+ }
+
+ CombineLatestObserver.prototype.next = function (x) {
+ this._state.values[this._i] = x;
+ this._state.hasValue[this._i] = true;
+ if (this._state.hasValueAll || (this._state.hasValueAll = this._state.hasValue.every(identity))) {
+ var res = tryCatch(this._cb).apply(null, this._state.values);
+ if (res === errorObj) { return this._o.onError(res.e); }
+ this._o.onNext(res);
+ } else if (this._state.isDone.filter(notTheSame(this._i)).every(identity)) {
+ this._o.onCompleted();
+ }
+ };
+
+ CombineLatestObserver.prototype.error = function (e) {
+ this._o.onError(e);
+ };
+
+ CombineLatestObserver.prototype.completed = function () {
+ this._state.isDone[this._i] = true;
+ this._state.isDone.every(identity) && this._o.onCompleted();
+ };
+
+ return CombineLatestObserver;
+ }(AbstractObserver));
+
+ /**
+ * Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences or Promises produces an element.
+ *
+ * @example
+ * 1 - obs = Rx.Observable.combineLatest(obs1, obs2, obs3, function (o1, o2, o3) { return o1 + o2 + o3; });
+ * 2 - obs = Rx.Observable.combineLatest([obs1, obs2, obs3], function (o1, o2, o3) { return o1 + o2 + o3; });
+ * @returns {Observable} An observable sequence containing the result of combining elements of the sources using the specified result selector function.
+ */
+ var combineLatest = Observable.combineLatest = function () {
+ var len = arguments.length, args = new Array(len);
+ for(var i = 0; i < len; i++) { args[i] = arguments[i]; }
+ var resultSelector = isFunction(args[len - 1]) ? args.pop() : argumentsToArray;
+ Array.isArray(args[0]) && (args = args[0]);
+ return new CombineLatestObservable(args, resultSelector);
+ };
+
+ /**
+ * Concatenates all the observable sequences. This takes in either an array or variable arguments to concatenate.
+ * @returns {Observable} An observable sequence that contains the elements of each given sequence, in sequential order.
+ */
+ observableProto.concat = function () {
+ for(var args = [], i = 0, len = arguments.length; i < len; i++) { args.push(arguments[i]); }
+ args.unshift(this);
+ return observableConcat.apply(null, args);
+ };
+
+ var ConcatObserver = (function(__super__) {
+ inherits(ConcatObserver, __super__);
+ function ConcatObserver(s, fn) {
+ this._s = s;
+ this._fn = fn;
+ __super__.call(this);
+ }
+
+ ConcatObserver.prototype.next = function (x) { this._s.o.onNext(x); };
+ ConcatObserver.prototype.error = function (e) { this._s.o.onError(e); };
+ ConcatObserver.prototype.completed = function () { this._s.i++; this._fn(this._s); };
+
+ return ConcatObserver;
+ }(AbstractObserver));
+
+ var ConcatObservable = (function(__super__) {
+ inherits(ConcatObservable, __super__);
+ function ConcatObservable(sources) {
+ this._sources = sources;
+ __super__.call(this);
+ }
+
+ function scheduleRecursive (state, recurse) {
+ if (state.disposable.isDisposed) { return; }
+ if (state.i === state.sources.length) { return state.o.onCompleted(); }
+
+ // Check if promise
+ var currentValue = state.sources[state.i];
+ isPromise(currentValue) && (currentValue = observableFromPromise(currentValue));
+
+ var d = new SingleAssignmentDisposable();
+ state.subscription.setDisposable(d);
+ d.setDisposable(currentValue.subscribe(new ConcatObserver(state, recurse)));
+ }
+
+ ConcatObservable.prototype.subscribeCore = function(o) {
+ var subscription = new SerialDisposable();
+ var disposable = disposableCreate(noop);
+ var state = {
+ o: o,
+ i: 0,
+ subscription: subscription,
+ disposable: disposable,
+ sources: this._sources
+ };
+
+ var cancelable = immediateScheduler.scheduleRecursive(state, scheduleRecursive);
+ return new NAryDisposable([subscription, disposable, cancelable]);
+ };
+
+ return ConcatObservable;
+ }(ObservableBase));
+
+ /**
+ * Concatenates all the observable sequences.
+ * @param {Array | Arguments} args Arguments or an array to concat to the observable sequence.
+ * @returns {Observable} An observable sequence that contains the elements of each given sequence, in sequential order.
+ */
+ var observableConcat = Observable.concat = function () {
+ var args;
+ if (Array.isArray(arguments[0])) {
+ args = arguments[0];
+ } else {
+ args = new Array(arguments.length);
+ for(var i = 0, len = arguments.length; i < len; i++) { args[i] = arguments[i]; }
+ }
+ return new ConcatObservable(args);
+ };
+
+ /**
+ * Concatenates an observable sequence of observable sequences.
+ * @returns {Observable} An observable sequence that contains the elements of each observed inner sequence, in sequential order.
+ */
+ observableProto.concatAll = function () {
+ return this.merge(1);
+ };
+
+ var MergeObservable = (function (__super__) {
+ inherits(MergeObservable, __super__);
+
+ function MergeObservable(source, maxConcurrent) {
+ this.source = source;
+ this.maxConcurrent = maxConcurrent;
+ __super__.call(this);
+ }
+
+ MergeObservable.prototype.subscribeCore = function(observer) {
+ var g = new CompositeDisposable();
+ g.add(this.source.subscribe(new MergeObserver(observer, this.maxConcurrent, g)));
+ return g;
+ };
+
+ return MergeObservable;
+
+ }(ObservableBase));
+
+ var MergeObserver = (function (__super__) {
+ function MergeObserver(o, max, g) {
+ this.o = o;
+ this.max = max;
+ this.g = g;
+ this.done = false;
+ this.q = [];
+ this.activeCount = 0;
+ __super__.call(this);
+ }
+
+ inherits(MergeObserver, __super__);
+
+ MergeObserver.prototype.handleSubscribe = function (xs) {
+ var sad = new SingleAssignmentDisposable();
+ this.g.add(sad);
+ isPromise(xs) && (xs = observableFromPromise(xs));
+ sad.setDisposable(xs.subscribe(new InnerObserver(this, sad)));
+ };
+
+ MergeObserver.prototype.next = function (innerSource) {
+ if(this.activeCount < this.max) {
+ this.activeCount++;
+ this.handleSubscribe(innerSource);
+ } else {
+ this.q.push(innerSource);
+ }
+ };
+ MergeObserver.prototype.error = function (e) { this.o.onError(e); };
+ MergeObserver.prototype.completed = function () { this.done = true; this.activeCount === 0 && this.o.onCompleted(); };
+
+ function InnerObserver(parent, sad) {
+ this.parent = parent;
+ this.sad = sad;
+ __super__.call(this);
+ }
+
+ inherits(InnerObserver, __super__);
+
+ InnerObserver.prototype.next = function (x) { this.parent.o.onNext(x); };
+ InnerObserver.prototype.error = function (e) { this.parent.o.onError(e); };
+ InnerObserver.prototype.completed = function () {
+ this.parent.g.remove(this.sad);
+ if (this.parent.q.length > 0) {
+ this.parent.handleSubscribe(this.parent.q.shift());
+ } else {
+ this.parent.activeCount--;
+ this.parent.done && this.parent.activeCount === 0 && this.parent.o.onCompleted();
+ }
+ };
+
+ return MergeObserver;
+ }(AbstractObserver));
+
+ /**
+ * Merges an observable sequence of observable sequences into an observable sequence, limiting the number of concurrent subscriptions to inner sequences.
+ * Or merges two observable sequences into a single observable sequence.
+ * @param {Mixed} [maxConcurrentOrOther] Maximum number of inner observable sequences being subscribed to concurrently or the second observable sequence.
+ * @returns {Observable} The observable sequence that merges the elements of the inner sequences.
+ */
+ observableProto.merge = function (maxConcurrentOrOther) {
+ return typeof maxConcurrentOrOther !== 'number' ?
+ observableMerge(this, maxConcurrentOrOther) :
+ new MergeObservable(this, maxConcurrentOrOther);
+ };
+
+ /**
+ * Merges all the observable sequences into a single observable sequence.
+ * The scheduler is optional and if not specified, the immediate scheduler is used.
+ * @returns {Observable} The observable sequence that merges the elements of the observable sequences.
+ */
+ var observableMerge = Observable.merge = function () {
+ var scheduler, sources = [], i, len = arguments.length;
+ if (!arguments[0]) {
+ scheduler = immediateScheduler;
+ for(i = 1; i < len; i++) { sources.push(arguments[i]); }
+ } else if (isScheduler(arguments[0])) {
+ scheduler = arguments[0];
+ for(i = 1; i < len; i++) { sources.push(arguments[i]); }
+ } else {
+ scheduler = immediateScheduler;
+ for(i = 0; i < len; i++) { sources.push(arguments[i]); }
+ }
+ if (Array.isArray(sources[0])) {
+ sources = sources[0];
+ }
+ return observableOf(scheduler, sources).mergeAll();
+ };
+
+ var CompositeError = Rx.CompositeError = function(errors) {
+ this.innerErrors = errors;
+ this.message = 'This contains multiple errors. Check the innerErrors';
+ Error.call(this);
+ };
+ CompositeError.prototype = Object.create(Error.prototype);
+ CompositeError.prototype.name = 'CompositeError';
+
+ var MergeDelayErrorObservable = (function(__super__) {
+ inherits(MergeDelayErrorObservable, __super__);
+ function MergeDelayErrorObservable(source) {
+ this.source = source;
+ __super__.call(this);
+ }
+
+ MergeDelayErrorObservable.prototype.subscribeCore = function (o) {
+ var group = new CompositeDisposable(),
+ m = new SingleAssignmentDisposable(),
+ state = { isStopped: false, errors: [], o: o };
+
+ group.add(m);
+ m.setDisposable(this.source.subscribe(new MergeDelayErrorObserver(group, state)));
+
+ return group;
+ };
+
+ return MergeDelayErrorObservable;
+ }(ObservableBase));
+
+ var MergeDelayErrorObserver = (function(__super__) {
+ inherits(MergeDelayErrorObserver, __super__);
+ function MergeDelayErrorObserver(group, state) {
+ this._group = group;
+ this._state = state;
+ __super__.call(this);
+ }
+
+ function setCompletion(o, errors) {
+ if (errors.length === 0) {
+ o.onCompleted();
+ } else if (errors.length === 1) {
+ o.onError(errors[0]);
+ } else {
+ o.onError(new CompositeError(errors));
+ }
+ }
+
+ MergeDelayErrorObserver.prototype.next = function (x) {
+ var inner = new SingleAssignmentDisposable();
+ this._group.add(inner);
+
+ // Check for promises support
+ isPromise(x) && (x = observableFromPromise(x));
+ inner.setDisposable(x.subscribe(new InnerObserver(inner, this._group, this._state)));
+ };
+
+ MergeDelayErrorObserver.prototype.error = function (e) {
+ this._state.errors.push(e);
+ this._state.isStopped = true;
+ this._group.length === 1 && setCompletion(this._state.o, this._state.errors);
+ };
+
+ MergeDelayErrorObserver.prototype.completed = function () {
+ this._state.isStopped = true;
+ this._group.length === 1 && setCompletion(this._state.o, this._state.errors);
+ };
+
+ inherits(InnerObserver, __super__);
+ function InnerObserver(inner, group, state) {
+ this._inner = inner;
+ this._group = group;
+ this._state = state;
+ __super__.call(this);
+ }
+
+ InnerObserver.prototype.next = function (x) { this._state.o.onNext(x); };
+ InnerObserver.prototype.error = function (e) {
+ this._state.errors.push(e);
+ this._group.remove(this._inner);
+ this._state.isStopped && this._group.length === 1 && setCompletion(this._state.o, this._state.errors);
+ };
+ InnerObserver.prototype.completed = function () {
+ this._group.remove(this._inner);
+ this._state.isStopped && this._group.length === 1 && setCompletion(this._state.o, this._state.errors);
+ };
+
+ return MergeDelayErrorObserver;
+ }(AbstractObserver));
+
+ /**
+ * Flattens an Observable that emits Observables into one Observable, in a way that allows an Observer to
+ * receive all successfully emitted items from all of the source Observables without being interrupted by
+ * an error notification from one of them.
+ *
+ * This behaves like Observable.prototype.mergeAll except that if any of the merged Observables notify of an
+ * error via the Observer's onError, mergeDelayError will refrain from propagating that
+ * error notification until all of the merged Observables have finished emitting items.
+ * @param {Array | Arguments} args Arguments or an array to merge.
+ * @returns {Observable} an Observable that emits all of the items emitted by the Observables emitted by the Observable
+ */
+ Observable.mergeDelayError = function() {
+ var args;
+ if (Array.isArray(arguments[0])) {
+ args = arguments[0];
+ } else {
+ var len = arguments.length;
+ args = new Array(len);
+ for(var i = 0; i < len; i++) { args[i] = arguments[i]; }
+ }
+ var source = observableOf(null, args);
+ return new MergeDelayErrorObservable(source);
+ };
+
+ var MergeAllObservable = (function (__super__) {
+ inherits(MergeAllObservable, __super__);
+
+ function MergeAllObservable(source) {
+ this.source = source;
+ __super__.call(this);
+ }
+
+ MergeAllObservable.prototype.subscribeCore = function (o) {
+ var g = new CompositeDisposable(), m = new SingleAssignmentDisposable();
+ g.add(m);
+ m.setDisposable(this.source.subscribe(new MergeAllObserver(o, g)));
+ return g;
+ };
+
+ return MergeAllObservable;
+ }(ObservableBase));
+
+ var MergeAllObserver = (function (__super__) {
+ function MergeAllObserver(o, g) {
+ this.o = o;
+ this.g = g;
+ this.done = false;
+ __super__.call(this);
+ }
+
+ inherits(MergeAllObserver, __super__);
+
+ MergeAllObserver.prototype.next = function(innerSource) {
+ var sad = new SingleAssignmentDisposable();
+ this.g.add(sad);
+ isPromise(innerSource) && (innerSource = observableFromPromise(innerSource));
+ sad.setDisposable(innerSource.subscribe(new InnerObserver(this, sad)));
+ };
+
+ MergeAllObserver.prototype.error = function (e) {
+ this.o.onError(e);
+ };
+
+ MergeAllObserver.prototype.completed = function () {
+ this.done = true;
+ this.g.length === 1 && this.o.onCompleted();
+ };
+
+ function InnerObserver(parent, sad) {
+ this.parent = parent;
+ this.sad = sad;
+ __super__.call(this);
+ }
+
+ inherits(InnerObserver, __super__);
+
+ InnerObserver.prototype.next = function (x) {
+ this.parent.o.onNext(x);
+ };
+ InnerObserver.prototype.error = function (e) {
+ this.parent.o.onError(e);
+ };
+ InnerObserver.prototype.completed = function () {
+ this.parent.g.remove(this.sad);
+ this.parent.done && this.parent.g.length === 1 && this.parent.o.onCompleted();
+ };
+
+ return MergeAllObserver;
+ }(AbstractObserver));
+
+ /**
+ * Merges an observable sequence of observable sequences into an observable sequence.
+ * @returns {Observable} The observable sequence that merges the elements of the inner sequences.
+ */
+ observableProto.mergeAll = function () {
+ return new MergeAllObservable(this);
+ };
+
+ var SkipUntilObservable = (function(__super__) {
+ inherits(SkipUntilObservable, __super__);
+
+ function SkipUntilObservable(source, other) {
+ this._s = source;
+ this._o = isPromise(other) ? observableFromPromise(other) : other;
+ this._open = false;
+ __super__.call(this);
+ }
+
+ SkipUntilObservable.prototype.subscribeCore = function(o) {
+ var leftSubscription = new SingleAssignmentDisposable();
+ leftSubscription.setDisposable(this._s.subscribe(new SkipUntilSourceObserver(o, this)));
+
+ isPromise(this._o) && (this._o = observableFromPromise(this._o));
+
+ var rightSubscription = new SingleAssignmentDisposable();
+ rightSubscription.setDisposable(this._o.subscribe(new SkipUntilOtherObserver(o, this, rightSubscription)));
+
+ return new BinaryDisposable(leftSubscription, rightSubscription);
+ };
+
+ return SkipUntilObservable;
+ }(ObservableBase));
+
+ var SkipUntilSourceObserver = (function(__super__) {
+ inherits(SkipUntilSourceObserver, __super__);
+ function SkipUntilSourceObserver(o, p) {
+ this._o = o;
+ this._p = p;
+ __super__.call(this);
+ }
+
+ SkipUntilSourceObserver.prototype.next = function (x) {
+ this._p._open && this._o.onNext(x);
+ };
+
+ SkipUntilSourceObserver.prototype.error = function (err) {
+ this._o.onError(err);
+ };
+
+ SkipUntilSourceObserver.prototype.onCompleted = function () {
+ this._p._open && this._o.onCompleted();
+ };
+
+ return SkipUntilSourceObserver;
+ }(AbstractObserver));
+
+ var SkipUntilOtherObserver = (function(__super__) {
+ inherits(SkipUntilOtherObserver, __super__);
+ function SkipUntilOtherObserver(o, p, r) {
+ this._o = o;
+ this._p = p;
+ this._r = r;
+ __super__.call(this);
+ }
+
+ SkipUntilOtherObserver.prototype.next = function () {
+ this._p._open = true;
+ this._r.dispose();
+ };
+
+ SkipUntilOtherObserver.prototype.error = function (err) {
+ this._o.onError(err);
+ };
+
+ SkipUntilOtherObserver.prototype.onCompleted = function () {
+ this._r.dispose();
+ };
+
+ return SkipUntilOtherObserver;
+ }(AbstractObserver));
+
+ /**
+ * Returns the values from the source observable sequence only after the other observable sequence produces a value.
+ * @param {Observable | Promise} other The observable sequence or Promise that triggers propagation of elements of the source sequence.
+ * @returns {Observable} An observable sequence containing the elements of the source sequence starting from the point the other sequence triggered propagation.
+ */
+ observableProto.skipUntil = function (other) {
+ return new SkipUntilObservable(this, other);
+ };
+
+ var SwitchObservable = (function(__super__) {
+ inherits(SwitchObservable, __super__);
+ function SwitchObservable(source) {
+ this.source = source;
+ __super__.call(this);
+ }
+
+ SwitchObservable.prototype.subscribeCore = function (o) {
+ var inner = new SerialDisposable(), s = this.source.subscribe(new SwitchObserver(o, inner));
+ return new BinaryDisposable(s, inner);
+ };
+
+ inherits(SwitchObserver, AbstractObserver);
+ function SwitchObserver(o, inner) {
+ this.o = o;
+ this.inner = inner;
+ this.stopped = false;
+ this.latest = 0;
+ this.hasLatest = false;
+ AbstractObserver.call(this);
+ }
+
+ SwitchObserver.prototype.next = function (innerSource) {
+ var d = new SingleAssignmentDisposable(), id = ++this.latest;
+ this.hasLatest = true;
+ this.inner.setDisposable(d);
+ isPromise(innerSource) && (innerSource = observableFromPromise(innerSource));
+ d.setDisposable(innerSource.subscribe(new InnerObserver(this, id)));
+ };
+
+ SwitchObserver.prototype.error = function (e) {
+ this.o.onError(e);
+ };
+
+ SwitchObserver.prototype.completed = function () {
+ this.stopped = true;
+ !this.hasLatest && this.o.onCompleted();
+ };
+
+ inherits(InnerObserver, AbstractObserver);
+ function InnerObserver(parent, id) {
+ this.parent = parent;
+ this.id = id;
+ AbstractObserver.call(this);
+ }
+ InnerObserver.prototype.next = function (x) {
+ this.parent.latest === this.id && this.parent.o.onNext(x);
+ };
+
+ InnerObserver.prototype.error = function (e) {
+ this.parent.latest === this.id && this.parent.o.onError(e);
+ };
+
+ InnerObserver.prototype.completed = function () {
+ if (this.parent.latest === this.id) {
+ this.parent.hasLatest = false;
+ this.parent.stopped && this.parent.o.onCompleted();
+ }
+ };
+
+ return SwitchObservable;
+ }(ObservableBase));
+
+ /**
+ * Transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.
+ * @returns {Observable} The observable sequence that at any point in time produces the elements of the most recent inner observable sequence that has been received.
+ */
+ observableProto['switch'] = observableProto.switchLatest = function () {
+ return new SwitchObservable(this);
+ };
+
+ var TakeUntilObservable = (function(__super__) {
+ inherits(TakeUntilObservable, __super__);
+
+ function TakeUntilObservable(source, other) {
+ this.source = source;
+ this.other = isPromise(other) ? observableFromPromise(other) : other;
+ __super__.call(this);
+ }
+
+ TakeUntilObservable.prototype.subscribeCore = function(o) {
+ return new BinaryDisposable(
+ this.source.subscribe(o),
+ this.other.subscribe(new TakeUntilObserver(o))
+ );
+ };
+
+ return TakeUntilObservable;
+ }(ObservableBase));
+
+ var TakeUntilObserver = (function(__super__) {
+ inherits(TakeUntilObserver, __super__);
+ function TakeUntilObserver(o) {
+ this._o = o;
+ __super__.call(this);
+ }
+
+ TakeUntilObserver.prototype.next = function () {
+ this._o.onCompleted();
+ };
+
+ TakeUntilObserver.prototype.error = function (err) {
+ this._o.onError(err);
+ };
+
+ TakeUntilObserver.prototype.onCompleted = noop;
+
+ return TakeUntilObserver;
+ }(AbstractObserver));
+
+ /**
+ * Returns the values from the source observable sequence until the other observable sequence produces a value.
+ * @param {Observable | Promise} other Observable sequence or Promise that terminates propagation of elements of the source sequence.
+ * @returns {Observable} An observable sequence containing the elements of the source sequence up to the point the other sequence interrupted further propagation.
+ */
+ observableProto.takeUntil = function (other) {
+ return new TakeUntilObservable(this, other);
+ };
+
+ function falseFactory() { return false; }
+ function argumentsToArray() {
+ var len = arguments.length, args = new Array(len);
+ for(var i = 0; i < len; i++) { args[i] = arguments[i]; }
+ return args;
+ }
+
+ var WithLatestFromObservable = (function(__super__) {
+ inherits(WithLatestFromObservable, __super__);
+ function WithLatestFromObservable(source, sources, resultSelector) {
+ this._s = source;
+ this._ss = sources;
+ this._cb = resultSelector;
+ __super__.call(this);
+ }
+
+ WithLatestFromObservable.prototype.subscribeCore = function (o) {
+ var len = this._ss.length;
+ var state = {
+ hasValue: arrayInitialize(len, falseFactory),
+ hasValueAll: false,
+ values: new Array(len)
+ };
+
+ var n = this._ss.length, subscriptions = new Array(n + 1);
+ for (var i = 0; i < n; i++) {
+ var other = this._ss[i], sad = new SingleAssignmentDisposable();
+ isPromise(other) && (other = observableFromPromise(other));
+ sad.setDisposable(other.subscribe(new WithLatestFromOtherObserver(o, i, state)));
+ subscriptions[i] = sad;
+ }
+
+ var outerSad = new SingleAssignmentDisposable();
+ outerSad.setDisposable(this._s.subscribe(new WithLatestFromSourceObserver(o, this._cb, state)));
+ subscriptions[n] = outerSad;
+
+ return new NAryDisposable(subscriptions);
+ };
+
+ return WithLatestFromObservable;
+ }(ObservableBase));
+
+ var WithLatestFromOtherObserver = (function (__super__) {
+ inherits(WithLatestFromOtherObserver, __super__);
+ function WithLatestFromOtherObserver(o, i, state) {
+ this._o = o;
+ this._i = i;
+ this._state = state;
+ __super__.call(this);
+ }
+
+ WithLatestFromOtherObserver.prototype.next = function (x) {
+ this._state.values[this._i] = x;
+ this._state.hasValue[this._i] = true;
+ this._state.hasValueAll = this._state.hasValue.every(identity);
+ };
+
+ WithLatestFromOtherObserver.prototype.error = function (e) {
+ this._o.onError(e);
+ };
+
+ WithLatestFromOtherObserver.prototype.completed = noop;
+
+ return WithLatestFromOtherObserver;
+ }(AbstractObserver));
+
+ var WithLatestFromSourceObserver = (function (__super__) {
+ inherits(WithLatestFromSourceObserver, __super__);
+ function WithLatestFromSourceObserver(o, cb, state) {
+ this._o = o;
+ this._cb = cb;
+ this._state = state;
+ __super__.call(this);
+ }
+
+ WithLatestFromSourceObserver.prototype.next = function (x) {
+ var allValues = [x].concat(this._state.values);
+ if (!this._state.hasValueAll) { return; }
+ var res = tryCatch(this._cb).apply(null, allValues);
+ if (res === errorObj) { return this._o.onError(res.e); }
+ this._o.onNext(res);
+ };
+
+ WithLatestFromSourceObserver.prototype.error = function (e) {
+ this._o.onError(e);
+ };
+
+ WithLatestFromSourceObserver.prototype.completed = function () {
+ this._o.onCompleted();
+ };
+
+ return WithLatestFromSourceObserver;
+ }(AbstractObserver));
+
+ /**
+ * Merges the specified observable sequences into one observable sequence by using the selector function only when the (first) source observable sequence produces an element.
+ * @returns {Observable} An observable sequence containing the result of combining elements of the sources using the specified result selector function.
+ */
+ observableProto.withLatestFrom = function () {
+ if (arguments.length === 0) { throw new Error('invalid arguments'); }
+
+ var len = arguments.length, args = new Array(len);
+ for(var i = 0; i < len; i++) { args[i] = arguments[i]; }
+ var resultSelector = isFunction(args[len - 1]) ? args.pop() : argumentsToArray;
+ Array.isArray(args[0]) && (args = args[0]);
+
+ return new WithLatestFromObservable(this, args, resultSelector);
+ };
+
+ function falseFactory() { return false; }
+ function emptyArrayFactory() { return []; }
+
+ var ZipObservable = (function(__super__) {
+ inherits(ZipObservable, __super__);
+ function ZipObservable(sources, resultSelector) {
+ this._s = sources;
+ this._cb = resultSelector;
+ __super__.call(this);
+ }
+
+ ZipObservable.prototype.subscribeCore = function(observer) {
+ var n = this._s.length,
+ subscriptions = new Array(n),
+ done = arrayInitialize(n, falseFactory),
+ q = arrayInitialize(n, emptyArrayFactory);
+
+ for (var i = 0; i < n; i++) {
+ var source = this._s[i], sad = new SingleAssignmentDisposable();
+ subscriptions[i] = sad;
+ isPromise(source) && (source = observableFromPromise(source));
+ sad.setDisposable(source.subscribe(new ZipObserver(observer, i, this, q, done)));
+ }
+
+ return new NAryDisposable(subscriptions);
+ };
+
+ return ZipObservable;
+ }(ObservableBase));
+
+ var ZipObserver = (function (__super__) {
+ inherits(ZipObserver, __super__);
+ function ZipObserver(o, i, p, q, d) {
+ this._o = o;
+ this._i = i;
+ this._p = p;
+ this._q = q;
+ this._d = d;
+ __super__.call(this);
+ }
+
+ function notEmpty(x) { return x.length > 0; }
+ function shiftEach(x) { return x.shift(); }
+ function notTheSame(i) {
+ return function (x, j) {
+ return j !== i;
+ };
+ }
+
+ ZipObserver.prototype.next = function (x) {
+ this._q[this._i].push(x);
+ if (this._q.every(notEmpty)) {
+ var queuedValues = this._q.map(shiftEach);
+ var res = tryCatch(this._p._cb).apply(null, queuedValues);
+ if (res === errorObj) { return this._o.onError(res.e); }
+ this._o.onNext(res);
+ } else if (this._d.filter(notTheSame(this._i)).every(identity)) {
+ this._o.onCompleted();
+ }
+ };
+
+ ZipObserver.prototype.error = function (e) {
+ this._o.onError(e);
+ };
+
+ ZipObserver.prototype.completed = function () {
+ this._d[this._i] = true;
+ this._d.every(identity) && this._o.onCompleted();
+ };
+
+ return ZipObserver;
+ }(AbstractObserver));
+
+ /**
+ * Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences or an array have produced an element at a corresponding index.
+ * The last element in the arguments must be a function to invoke for each series of elements at corresponding indexes in the args.
+ * @returns {Observable} An observable sequence containing the result of combining elements of the args using the specified result selector function.
+ */
+ observableProto.zip = function () {
+ if (arguments.length === 0) { throw new Error('invalid arguments'); }
+
+ var len = arguments.length, args = new Array(len);
+ for(var i = 0; i < len; i++) { args[i] = arguments[i]; }
+ var resultSelector = isFunction(args[len - 1]) ? args.pop() : argumentsToArray;
+ Array.isArray(args[0]) && (args = args[0]);
+
+ var parent = this;
+ args.unshift(parent);
+
+ return new ZipObservable(args, resultSelector);
+ };
+
+ /**
+ * Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
+ * @param arguments Observable sources.
+ * @param {Function} resultSelector Function to invoke for each series of elements at corresponding indexes in the sources.
+ * @returns {Observable} An observable sequence containing the result of combining elements of the sources using the specified result selector function.
+ */
+ Observable.zip = function () {
+ var len = arguments.length, args = new Array(len);
+ for(var i = 0; i < len; i++) { args[i] = arguments[i]; }
+ if (Array.isArray(args[0])) {
+ args = isFunction(args[1]) ? args[0].concat(args[1]) : args[0];
+ }
+ var first = args.shift();
+ return first.zip.apply(first, args);
+ };
+
+function falseFactory() { return false; }
+function emptyArrayFactory() { return []; }
+function argumentsToArray() {
+ var len = arguments.length, args = new Array(len);
+ for(var i = 0; i < len; i++) { args[i] = arguments[i]; }
+ return args;
+}
+
+var ZipIterableObservable = (function(__super__) {
+ inherits(ZipIterableObservable, __super__);
+ function ZipIterableObservable(sources, cb) {
+ this.sources = sources;
+ this._cb = cb;
+ __super__.call(this);
+ }
+
+ ZipIterableObservable.prototype.subscribeCore = function (o) {
+ var sources = this.sources, len = sources.length, subscriptions = new Array(len);
+
+ var state = {
+ q: arrayInitialize(len, emptyArrayFactory),
+ done: arrayInitialize(len, falseFactory),
+ cb: this._cb,
+ o: o
+ };
+
+ for (var i = 0; i < len; i++) {
+ (function (i) {
+ var source = sources[i], sad = new SingleAssignmentDisposable();
+ (isArrayLike(source) || isIterable(source)) && (source = observableFrom(source));
+
+ subscriptions[i] = sad;
+ sad.setDisposable(source.subscribe(new ZipIterableObserver(state, i)));
+ }(i));
+ }
+
+ return new NAryDisposable(subscriptions);
+ };
+
+ return ZipIterableObservable;
+}(ObservableBase));
+
+var ZipIterableObserver = (function (__super__) {
+ inherits(ZipIterableObserver, __super__);
+ function ZipIterableObserver(s, i) {
+ this._s = s;
+ this._i = i;
+ __super__.call(this);
+ }
+
+ function notEmpty(x) { return x.length > 0; }
+ function shiftEach(x) { return x.shift(); }
+ function notTheSame(i) {
+ return function (x, j) {
+ return j !== i;
+ };
+ }
+
+ ZipIterableObserver.prototype.next = function (x) {
+ this._s.q[this._i].push(x);
+ if (this._s.q.every(notEmpty)) {
+ var queuedValues = this._s.q.map(shiftEach),
+ res = tryCatch(this._s.cb).apply(null, queuedValues);
+ if (res === errorObj) { return this._s.o.onError(res.e); }
+ this._s.o.onNext(res);
+ } else if (this._s.done.filter(notTheSame(this._i)).every(identity)) {
+ this._s.o.onCompleted();
+ }
+ };
+
+ ZipIterableObserver.prototype.error = function (e) { this._s.o.onError(e); };
+
+ ZipIterableObserver.prototype.completed = function () {
+ this._s.done[this._i] = true;
+ this._s.done.every(identity) && this._s.o.onCompleted();
+ };
+
+ return ZipIterableObserver;
+}(AbstractObserver));
+
+/**
+ * Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences or an array have produced an element at a corresponding index.
+ * The last element in the arguments must be a function to invoke for each series of elements at corresponding indexes in the args.
+ * @returns {Observable} An observable sequence containing the result of combining elements of the args using the specified result selector function.
+ */
+observableProto.zipIterable = function () {
+ if (arguments.length === 0) { throw new Error('invalid arguments'); }
+
+ var len = arguments.length, args = new Array(len);
+ for(var i = 0; i < len; i++) { args[i] = arguments[i]; }
+ var resultSelector = isFunction(args[len - 1]) ? args.pop() : argumentsToArray;
+
+ var parent = this;
+ args.unshift(parent);
+ return new ZipIterableObservable(args, resultSelector);
+};
+
+ function asObservable(source) {
+ return function subscribe(o) { return source.subscribe(o); };
+ }
+
+ /**
+ * Hides the identity of an observable sequence.
+ * @returns {Observable} An observable sequence that hides the identity of the source sequence.
+ */
+ observableProto.asObservable = function () {
+ return new AnonymousObservable(asObservable(this), this);
+ };
+
+ var DematerializeObservable = (function (__super__) {
+ inherits(DematerializeObservable, __super__);
+ function DematerializeObservable(source) {
+ this.source = source;
+ __super__.call(this);
+ }
+
+ DematerializeObservable.prototype.subscribeCore = function (o) {
+ return this.source.subscribe(new DematerializeObserver(o));
+ };
+
+ return DematerializeObservable;
+ }(ObservableBase));
+
+ var DematerializeObserver = (function (__super__) {
+ inherits(DematerializeObserver, __super__);
+
+ function DematerializeObserver(o) {
+ this._o = o;
+ __super__.call(this);
+ }
+
+ DematerializeObserver.prototype.next = function (x) { x.accept(this._o); };
+ DematerializeObserver.prototype.error = function (e) { this._o.onError(e); };
+ DematerializeObserver.prototype.completed = function () { this._o.onCompleted(); };
+
+ return DematerializeObserver;
+ }(AbstractObserver));
+
+ /**
+ * Dematerializes the explicit notification values of an observable sequence as implicit notifications.
+ * @returns {Observable} An observable sequence exhibiting the behavior corresponding to the source sequence's notification values.
+ */
+ observableProto.dematerialize = function () {
+ return new DematerializeObservable(this);
+ };
+
+ var DistinctUntilChangedObservable = (function(__super__) {
+ inherits(DistinctUntilChangedObservable, __super__);
+ function DistinctUntilChangedObservable(source, keyFn, comparer) {
+ this.source = source;
+ this.keyFn = keyFn;
+ this.comparer = comparer;
+ __super__.call(this);
+ }
+
+ DistinctUntilChangedObservable.prototype.subscribeCore = function (o) {
+ return this.source.subscribe(new DistinctUntilChangedObserver(o, this.keyFn, this.comparer));
+ };
+
+ return DistinctUntilChangedObservable;
+ }(ObservableBase));
+
+ var DistinctUntilChangedObserver = (function(__super__) {
+ inherits(DistinctUntilChangedObserver, __super__);
+ function DistinctUntilChangedObserver(o, keyFn, comparer) {
+ this.o = o;
+ this.keyFn = keyFn;
+ this.comparer = comparer;
+ this.hasCurrentKey = false;
+ this.currentKey = null;
+ __super__.call(this);
+ }
+
+ DistinctUntilChangedObserver.prototype.next = function (x) {
+ var key = x, comparerEquals;
+ if (isFunction(this.keyFn)) {
+ key = tryCatch(this.keyFn)(x);
+ if (key === errorObj) { return this.o.onError(key.e); }
+ }
+ if (this.hasCurrentKey) {
+ comparerEquals = tryCatch(this.comparer)(this.currentKey, key);
+ if (comparerEquals === errorObj) { return this.o.onError(comparerEquals.e); }
+ }
+ if (!this.hasCurrentKey || !comparerEquals) {
+ this.hasCurrentKey = true;
+ this.currentKey = key;
+ this.o.onNext(x);
+ }
+ };
+ DistinctUntilChangedObserver.prototype.error = function(e) {
+ this.o.onError(e);
+ };
+ DistinctUntilChangedObserver.prototype.completed = function () {
+ this.o.onCompleted();
+ };
+
+ return DistinctUntilChangedObserver;
+ }(AbstractObserver));
+
+ /**
+ * Returns an observable sequence that contains only distinct contiguous elements according to the keyFn and the comparer.
+ * @param {Function} [keyFn] A function to compute the comparison key for each element. If not provided, it projects the value.
+ * @param {Function} [comparer] Equality comparer for computed key values. If not provided, defaults to an equality comparer function.
+ * @returns {Observable} An observable sequence only containing the distinct contiguous elements, based on a computed key value, from the source sequence.
+ */
+ observableProto.distinctUntilChanged = function (keyFn, comparer) {
+ comparer || (comparer = defaultComparer);
+ return new DistinctUntilChangedObservable(this, keyFn, comparer);
+ };
+
+ var TapObservable = (function(__super__) {
+ inherits(TapObservable,__super__);
+ function TapObservable(source, observerOrOnNext, onError, onCompleted) {
+ this.source = source;
+ this._oN = observerOrOnNext;
+ this._oE = onError;
+ this._oC = onCompleted;
+ __super__.call(this);
+ }
+
+ TapObservable.prototype.subscribeCore = function(o) {
+ return this.source.subscribe(new InnerObserver(o, this));
+ };
+
+ inherits(InnerObserver, AbstractObserver);
+ function InnerObserver(o, p) {
+ this.o = o;
+ this.t = !p._oN || isFunction(p._oN) ?
+ observerCreate(p._oN || noop, p._oE || noop, p._oC || noop) :
+ p._oN;
+ this.isStopped = false;
+ AbstractObserver.call(this);
+ }
+ InnerObserver.prototype.next = function(x) {
+ var res = tryCatch(this.t.onNext).call(this.t, x);
+ if (res === errorObj) { this.o.onError(res.e); }
+ this.o.onNext(x);
+ };
+ InnerObserver.prototype.error = function(err) {
+ var res = tryCatch(this.t.onError).call(this.t, err);
+ if (res === errorObj) { return this.o.onError(res.e); }
+ this.o.onError(err);
+ };
+ InnerObserver.prototype.completed = function() {
+ var res = tryCatch(this.t.onCompleted).call(this.t);
+ if (res === errorObj) { return this.o.onError(res.e); }
+ this.o.onCompleted();
+ };
+
+ return TapObservable;
+ }(ObservableBase));
+
+ /**
+ * Invokes an action for each element in the observable sequence and invokes an action upon graceful or exceptional termination of the observable sequence.
+ * This method can be used for debugging, logging, etc. of query behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline.
+ * @param {Function | Observer} observerOrOnNext Action to invoke for each element in the observable sequence or an o.
+ * @param {Function} [onError] Action to invoke upon exceptional termination of the observable sequence. Used if only the observerOrOnNext parameter is also a function.
+ * @param {Function} [onCompleted] Action to invoke upon graceful termination of the observable sequence. Used if only the observerOrOnNext parameter is also a function.
+ * @returns {Observable} The source sequence with the side-effecting behavior applied.
+ */
+ observableProto['do'] = observableProto.tap = observableProto.doAction = function (observerOrOnNext, onError, onCompleted) {
+ return new TapObservable(this, observerOrOnNext, onError, onCompleted);
+ };
+
+ /**
+ * Invokes an action for each element in the observable sequence.
+ * This method can be used for debugging, logging, etc. of query behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline.
+ * @param {Function} onNext Action to invoke for each element in the observable sequence.
+ * @param {Any} [thisArg] Object to use as this when executing callback.
+ * @returns {Observable} The source sequence with the side-effecting behavior applied.
+ */
+ observableProto.doOnNext = observableProto.tapOnNext = function (onNext, thisArg) {
+ return this.tap(typeof thisArg !== 'undefined' ? function (x) { onNext.call(thisArg, x); } : onNext);
+ };
+
+ /**
+ * Invokes an action upon exceptional termination of the observable sequence.
+ * This method can be used for debugging, logging, etc. of query behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline.
+ * @param {Function} onError Action to invoke upon exceptional termination of the observable sequence.
+ * @param {Any} [thisArg] Object to use as this when executing callback.
+ * @returns {Observable} The source sequence with the side-effecting behavior applied.
+ */
+ observableProto.doOnError = observableProto.tapOnError = function (onError, thisArg) {
+ return this.tap(noop, typeof thisArg !== 'undefined' ? function (e) { onError.call(thisArg, e); } : onError);
+ };
+
+ /**
+ * Invokes an action upon graceful termination of the observable sequence.
+ * This method can be used for debugging, logging, etc. of query behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline.
+ * @param {Function} onCompleted Action to invoke upon graceful termination of the observable sequence.
+ * @param {Any} [thisArg] Object to use as this when executing callback.
+ * @returns {Observable} The source sequence with the side-effecting behavior applied.
+ */
+ observableProto.doOnCompleted = observableProto.tapOnCompleted = function (onCompleted, thisArg) {
+ return this.tap(noop, null, typeof thisArg !== 'undefined' ? function () { onCompleted.call(thisArg); } : onCompleted);
+ };
+
+ var FinallyObservable = (function (__super__) {
+ inherits(FinallyObservable, __super__);
+ function FinallyObservable(source, fn, thisArg) {
+ this.source = source;
+ this._fn = bindCallback(fn, thisArg, 0);
+ __super__.call(this);
+ }
+
+ FinallyObservable.prototype.subscribeCore = function (o) {
+ var d = tryCatch(this.source.subscribe).call(this.source, o);
+ if (d === errorObj) {
+ this._fn();
+ thrower(d.e);
+ }
+
+ return new FinallyDisposable(d, this._fn);
+ };
+
+ function FinallyDisposable(s, fn) {
+ this.isDisposed = false;
+ this._s = s;
+ this._fn = fn;
+ }
+ FinallyDisposable.prototype.dispose = function () {
+ if (!this.isDisposed) {
+ var res = tryCatch(this._s.dispose).call(this._s);
+ this._fn();
+ res === errorObj && thrower(res.e);
+ }
+ };
+
+ return FinallyObservable;
+
+ }(ObservableBase));
+
+ /**
+ * Invokes a specified action after the source observable sequence terminates gracefully or exceptionally.
+ * @param {Function} finallyAction Action to invoke after the source observable sequence terminates.
+ * @returns {Observable} Source sequence with the action-invoking termination behavior applied.
+ */
+ observableProto['finally'] = function (action, thisArg) {
+ return new FinallyObservable(this, action, thisArg);
+ };
+
+ var IgnoreElementsObservable = (function(__super__) {
+ inherits(IgnoreElementsObservable, __super__);
+
+ function IgnoreElementsObservable(source) {
+ this.source = source;
+ __super__.call(this);
+ }
+
+ IgnoreElementsObservable.prototype.subscribeCore = function (o) {
+ return this.source.subscribe(new InnerObserver(o));
+ };
+
+ function InnerObserver(o) {
+ this.o = o;
+ this.isStopped = false;
+ }
+ InnerObserver.prototype.onNext = noop;
+ InnerObserver.prototype.onError = function (err) {
+ if(!this.isStopped) {
+ this.isStopped = true;
+ this.o.onError(err);
+ }
+ };
+ InnerObserver.prototype.onCompleted = function () {
+ if(!this.isStopped) {
+ this.isStopped = true;
+ this.o.onCompleted();
+ }
+ };
+ InnerObserver.prototype.dispose = function() { this.isStopped = true; };
+ InnerObserver.prototype.fail = function (e) {
+ if (!this.isStopped) {
+ this.isStopped = true;
+ this.observer.onError(e);
+ return true;
+ }
+
+ return false;
+ };
+
+ return IgnoreElementsObservable;
+ }(ObservableBase));
+
+ /**
+ * Ignores all elements in an observable sequence leaving only the termination messages.
+ * @returns {Observable} An empty observable sequence that signals termination, successful or exceptional, of the source sequence.
+ */
+ observableProto.ignoreElements = function () {
+ return new IgnoreElementsObservable(this);
+ };
+
+ var MaterializeObservable = (function (__super__) {
+ inherits(MaterializeObservable, __super__);
+ function MaterializeObservable(source, fn) {
+ this.source = source;
+ __super__.call(this);
+ }
+
+ MaterializeObservable.prototype.subscribeCore = function (o) {
+ return this.source.subscribe(new MaterializeObserver(o));
+ };
+
+ return MaterializeObservable;
+ }(ObservableBase));
+
+ var MaterializeObserver = (function (__super__) {
+ inherits(MaterializeObserver, __super__);
+
+ function MaterializeObserver(o) {
+ this._o = o;
+ __super__.call(this);
+ }
+
+ MaterializeObserver.prototype.next = function (x) { this._o.onNext(notificationCreateOnNext(x)) };
+ MaterializeObserver.prototype.error = function (e) { this._o.onNext(notificationCreateOnError(e)); this._o.onCompleted(); };
+ MaterializeObserver.prototype.completed = function () { this._o.onNext(notificationCreateOnCompleted()); this._o.onCompleted(); };
+
+ return MaterializeObserver;
+ }(AbstractObserver));
+
+ /**
+ * Materializes the implicit notifications of an observable sequence as explicit notification values.
+ * @returns {Observable} An observable sequence containing the materialized notification values from the source sequence.
+ */
+ observableProto.materialize = function () {
+ return new MaterializeObservable(this);
+ };
+
+ /**
+ * Repeats the observable sequence a specified number of times. If the repeat count is not specified, the sequence repeats indefinitely.
+ * @param {Number} [repeatCount] Number of times to repeat the sequence. If not provided, repeats the sequence indefinitely.
+ * @returns {Observable} The observable sequence producing the elements of the given sequence repeatedly.
+ */
+ observableProto.repeat = function (repeatCount) {
+ return enumerableRepeat(this, repeatCount).concat();
+ };
+
+ /**
+ * Repeats the source observable sequence the specified number of times or until it successfully terminates. If the retry count is not specified, it retries indefinitely.
+ * Note if you encounter an error and want it to retry once, then you must use .retry(2);
+ *
+ * @example
+ * var res = retried = retry.repeat();
+ * var res = retried = retry.repeat(2);
+ * @param {Number} [retryCount] Number of times to retry the sequence. If not provided, retry the sequence indefinitely.
+ * @returns {Observable} An observable sequence producing the elements of the given sequence repeatedly until it terminates successfully.
+ */
+ observableProto.retry = function (retryCount) {
+ return enumerableRepeat(this, retryCount).catchError();
+ };
+
+ function repeat(value) {
+ return {
+ '@@iterator': function () {
+ return {
+ next: function () {
+ return { done: false, value: value };
+ }
+ };
+ }
+ };
+ }
+
+ var RetryWhenObservable = (function(__super__) {
+ function createDisposable(state) {
+ return {
+ isDisposed: false,
+ dispose: function () {
+ if (!this.isDisposed) {
+ this.isDisposed = true;
+ state.isDisposed = true;
+ }
+ }
+ };
+ }
+
+ function RetryWhenObservable(source, notifier) {
+ this.source = source;
+ this._notifier = notifier;
+ __super__.call(this);
+ }
+
+ inherits(RetryWhenObservable, __super__);
+
+ RetryWhenObservable.prototype.subscribeCore = function (o) {
+ var exceptions = new Subject(),
+ notifier = new Subject(),
+ handled = this._notifier(exceptions),
+ notificationDisposable = handled.subscribe(notifier);
+
+ var e = this.source['@@iterator']();
+
+ var state = { isDisposed: false },
+ lastError,
+ subscription = new SerialDisposable();
+ var cancelable = currentThreadScheduler.scheduleRecursive(null, function (_, recurse) {
+ if (state.isDisposed) { return; }
+ var currentItem = e.next();
+
+ if (currentItem.done) {
+ if (lastError) {
+ o.onError(lastError);
+ } else {
+ o.onCompleted();
+ }
+ return;
+ }
+
+ // Check if promise
+ var currentValue = currentItem.value;
+ isPromise(currentValue) && (currentValue = observableFromPromise(currentValue));
+
+ var outer = new SingleAssignmentDisposable();
+ var inner = new SingleAssignmentDisposable();
+ subscription.setDisposable(new BinaryDisposable(inner, outer));
+ outer.setDisposable(currentValue.subscribe(
+ function(x) { o.onNext(x); },
+ function (exn) {
+ inner.setDisposable(notifier.subscribe(recurse, function(ex) {
+ o.onError(ex);
+ }, function() {
+ o.onCompleted();
+ }));
+
+ exceptions.onNext(exn);
+ outer.dispose();
+ },
+ function() { o.onCompleted(); }));
+ });
+
+ return new NAryDisposable([notificationDisposable, subscription, cancelable, createDisposable(state)]);
+ };
+
+ return RetryWhenObservable;
+ }(ObservableBase));
+
+ observableProto.retryWhen = function (notifier) {
+ return new RetryWhenObservable(repeat(this), notifier);
+ };
+
+ function repeat(value) {
+ return {
+ '@@iterator': function () {
+ return {
+ next: function () {
+ return { done: false, value: value };
+ }
+ };
+ }
+ };
+ }
+
+ var RepeatWhenObservable = (function(__super__) {
+ function createDisposable(state) {
+ return {
+ isDisposed: false,
+ dispose: function () {
+ if (!this.isDisposed) {
+ this.isDisposed = true;
+ state.isDisposed = true;
+ }
+ }
+ };
+ }
+
+ function RepeatWhenObservable(source, notifier) {
+ this.source = source;
+ this._notifier = notifier;
+ __super__.call(this);
+ }
+
+ inherits(RepeatWhenObservable, __super__);
+
+ RepeatWhenObservable.prototype.subscribeCore = function (o) {
+ var completions = new Subject(),
+ notifier = new Subject(),
+ handled = this._notifier(completions),
+ notificationDisposable = handled.subscribe(notifier);
+
+ var e = this.source['@@iterator']();
+
+ var state = { isDisposed: false },
+ lastError,
+ subscription = new SerialDisposable();
+ var cancelable = currentThreadScheduler.scheduleRecursive(null, function (_, recurse) {
+ if (state.isDisposed) { return; }
+ var currentItem = e.next();
+
+ if (currentItem.done) {
+ if (lastError) {
+ o.onError(lastError);
+ } else {
+ o.onCompleted();
+ }
+ return;
+ }
+
+ // Check if promise
+ var currentValue = currentItem.value;
+ isPromise(currentValue) && (currentValue = observableFromPromise(currentValue));
+
+ var outer = new SingleAssignmentDisposable();
+ var inner = new SingleAssignmentDisposable();
+ subscription.setDisposable(new BinaryDisposable(inner, outer));
+ outer.setDisposable(currentValue.subscribe(
+ function(x) { o.onNext(x); },
+ function (exn) { o.onError(exn); },
+ function() {
+ inner.setDisposable(notifier.subscribe(recurse, function(ex) {
+ o.onError(ex);
+ }, function() {
+ o.onCompleted();
+ }));
+
+ completions.onNext(null);
+ outer.dispose();
+ }));
+ });
+
+ return new NAryDisposable([notificationDisposable, subscription, cancelable, createDisposable(state)]);
+ };
+
+ return RepeatWhenObservable;
+ }(ObservableBase));
+
+ observableProto.repeatWhen = function (notifier) {
+ return new RepeatWhenObservable(repeat(this), notifier);
+ };
+
+ var ScanObservable = (function(__super__) {
+ inherits(ScanObservable, __super__);
+ function ScanObservable(source, accumulator, hasSeed, seed) {
+ this.source = source;
+ this.accumulator = accumulator;
+ this.hasSeed = hasSeed;
+ this.seed = seed;
+ __super__.call(this);
+ }
+
+ ScanObservable.prototype.subscribeCore = function(o) {
+ return this.source.subscribe(new ScanObserver(o,this));
+ };
+
+ return ScanObservable;
+ }(ObservableBase));
+
+ var ScanObserver = (function (__super__) {
+ inherits(ScanObserver, __super__);
+ function ScanObserver(o, parent) {
+ this._o = o;
+ this._p = parent;
+ this._fn = parent.accumulator;
+ this._hs = parent.hasSeed;
+ this._s = parent.seed;
+ this._ha = false;
+ this._a = null;
+ this._hv = false;
+ this._i = 0;
+ __super__.call(this);
+ }
+
+ ScanObserver.prototype.next = function (x) {
+ !this._hv && (this._hv = true);
+ if (this._ha) {
+ this._a = tryCatch(this._fn)(this._a, x, this._i, this._p);
+ } else {
+ this._a = this._hs ? tryCatch(this._fn)(this._s, x, this._i, this._p) : x;
+ this._ha = true;
+ }
+ if (this._a === errorObj) { return this._o.onError(this._a.e); }
+ this._o.onNext(this._a);
+ this._i++;
+ };
+
+ ScanObserver.prototype.error = function (e) {
+ this._o.onError(e);
+ };
+
+ ScanObserver.prototype.completed = function () {
+ !this._hv && this._hs && this._o.onNext(this._s);
+ this._o.onCompleted();
+ };
+
+ return ScanObserver;
+ }(AbstractObserver));
+
+ /**
+ * Applies an accumulator function over an observable sequence and returns each intermediate result. The optional seed value is used as the initial accumulator value.
+ * For aggregation behavior with no intermediate results, see Observable.aggregate.
+ * @param {Mixed} [seed] The initial accumulator value.
+ * @param {Function} accumulator An accumulator function to be invoked on each element.
+ * @returns {Observable} An observable sequence containing the accumulated values.
+ */
+ observableProto.scan = function () {
+ var hasSeed = false, seed, accumulator = arguments[0];
+ if (arguments.length === 2) {
+ hasSeed = true;
+ seed = arguments[1];
+ }
+ return new ScanObservable(this, accumulator, hasSeed, seed);
+ };
+
+ var SkipLastObservable = (function (__super__) {
+ inherits(SkipLastObservable, __super__);
+ function SkipLastObservable(source, c) {
+ this.source = source;
+ this._c = c;
+ __super__.call(this);
+ }
+
+ SkipLastObservable.prototype.subscribeCore = function (o) {
+ return this.source.subscribe(new SkipLastObserver(o, this._c));
+ };
+
+ return SkipLastObservable;
+ }(ObservableBase));
+
+ var SkipLastObserver = (function (__super__) {
+ inherits(SkipLastObserver, __super__);
+ function SkipLastObserver(o, c) {
+ this._o = o;
+ this._c = c;
+ this._q = [];
+ __super__.call(this);
+ }
+
+ SkipLastObserver.prototype.next = function (x) {
+ this._q.push(x);
+ this._q.length > this._c && this._o.onNext(this._q.shift());
+ };
+
+ SkipLastObserver.prototype.error = function (e) {
+ this._o.onError(e);
+ };
+
+ SkipLastObserver.prototype.completed = function () {
+ this._o.onCompleted();
+ };
+
+ return SkipLastObserver;
+ }(AbstractObserver));
+
+ /**
+ * Bypasses a specified number of elements at the end of an observable sequence.
+ * @description
+ * This operator accumulates a queue with a length enough to store the first `count` elements. As more elements are
+ * received, elements are taken from the front of the queue and produced on the result sequence. This causes elements to be delayed.
+ * @param count Number of elements to bypass at the end of the source sequence.
+ * @returns {Observable} An observable sequence containing the source sequence elements except for the bypassed ones at the end.
+ */
+ observableProto.skipLast = function (count) {
+ if (count < 0) { throw new ArgumentOutOfRangeError(); }
+ return new SkipLastObservable(this, count);
+ };
+
+ /**
+ * Prepends a sequence of values to an observable sequence with an optional scheduler and an argument list of values to prepend.
+ * @example
+ * var res = source.startWith(1, 2, 3);
+ * var res = source.startWith(Rx.Scheduler.timeout, 1, 2, 3);
+ * @param {Arguments} args The specified values to prepend to the observable sequence
+ * @returns {Observable} The source sequence prepended with the specified values.
+ */
+ observableProto.startWith = function () {
+ var values, scheduler, start = 0;
+ if (!!arguments.length && isScheduler(arguments[0])) {
+ scheduler = arguments[0];
+ start = 1;
+ } else {
+ scheduler = immediateScheduler;
+ }
+ for(var args = [], i = start, len = arguments.length; i < len; i++) { args.push(arguments[i]); }
+ return enumerableOf([observableFromArray(args, scheduler), this]).concat();
+ };
+
+ var TakeLastObserver = (function (__super__) {
+ inherits(TakeLastObserver, __super__);
+ function TakeLastObserver(o, c) {
+ this._o = o;
+ this._c = c;
+ this._q = [];
+ __super__.call(this);
+ }
+
+ TakeLastObserver.prototype.next = function (x) {
+ this._q.push(x);
+ this._q.length > this._c && this._q.shift();
+ };
+
+ TakeLastObserver.prototype.error = function (e) {
+ this._o.onError(e);
+ };
+
+ TakeLastObserver.prototype.completed = function () {
+ while (this._q.length > 0) { this._o.onNext(this._q.shift()); }
+ this._o.onCompleted();
+ };
+
+ return TakeLastObserver;
+ }(AbstractObserver));
+
+ /**
+ * Returns a specified number of contiguous elements from the end of an observable sequence.
+ * @description
+ * This operator accumulates a buffer with a length enough to store elements count elements. Upon completion of
+ * the source sequence, this buffer is drained on the result sequence. This causes the elements to be delayed.
+ * @param {Number} count Number of elements to take from the end of the source sequence.
+ * @returns {Observable} An observable sequence containing the specified number of elements from the end of the source sequence.
+ */
+ observableProto.takeLast = function (count) {
+ if (count < 0) { throw new ArgumentOutOfRangeError(); }
+ var source = this;
+ return new AnonymousObservable(function (o) {
+ return source.subscribe(new TakeLastObserver(o, count));
+ }, source);
+ };
+
+observableProto.flatMapConcat = observableProto.concatMap = function(selector, resultSelector, thisArg) {
+ return new FlatMapObservable(this, selector, resultSelector, thisArg).merge(1);
+};
+ var MapObservable = (function (__super__) {
+ inherits(MapObservable, __super__);
+
+ function MapObservable(source, selector, thisArg) {
+ this.source = source;
+ this.selector = bindCallback(selector, thisArg, 3);
+ __super__.call(this);
+ }
+
+ function innerMap(selector, self) {
+ return function (x, i, o) { return selector.call(this, self.selector(x, i, o), i, o); };
+ }
+
+ MapObservable.prototype.internalMap = function (selector, thisArg) {
+ return new MapObservable(this.source, innerMap(selector, this), thisArg);
+ };
+
+ MapObservable.prototype.subscribeCore = function (o) {
+ return this.source.subscribe(new InnerObserver(o, this.selector, this));
+ };
+
+ inherits(InnerObserver, AbstractObserver);
+ function InnerObserver(o, selector, source) {
+ this.o = o;
+ this.selector = selector;
+ this.source = source;
+ this.i = 0;
+ AbstractObserver.call(this);
+ }
+
+ InnerObserver.prototype.next = function(x) {
+ var result = tryCatch(this.selector)(x, this.i++, this.source);
+ if (result === errorObj) { return this.o.onError(result.e); }
+ this.o.onNext(result);
+ };
+
+ InnerObserver.prototype.error = function (e) {
+ this.o.onError(e);
+ };
+
+ InnerObserver.prototype.completed = function () {
+ this.o.onCompleted();
+ };
+
+ return MapObservable;
+
+ }(ObservableBase));
+
+ /**
+ * Projects each element of an observable sequence into a new form by incorporating the element's index.
+ * @param {Function} selector A transform function to apply to each source element; the second parameter of the function represents the index of the source element.
+ * @param {Any} [thisArg] Object to use as this when executing callback.
+ * @returns {Observable} An observable sequence whose elements are the result of invoking the transform function on each element of source.
+ */
+ observableProto.map = observableProto.select = function (selector, thisArg) {
+ var selectorFn = typeof selector === 'function' ? selector : function () { return selector; };
+ return this instanceof MapObservable ?
+ this.internalMap(selectorFn, thisArg) :
+ new MapObservable(this, selectorFn, thisArg);
+ };
+
+ function plucker(args, len) {
+ return function mapper(x) {
+ var currentProp = x;
+ for (var i = 0; i < len; i++) {
+ var p = currentProp[args[i]];
+ if (typeof p !== 'undefined') {
+ currentProp = p;
+ } else {
+ return undefined;
+ }
+ }
+ return currentProp;
+ };
+ }
+
+ /**
+ * Retrieves the value of a specified nested property from all elements in
+ * the Observable sequence.
+ * @param {Arguments} arguments The nested properties to pluck.
+ * @returns {Observable} Returns a new Observable sequence of property values.
+ */
+ observableProto.pluck = function () {
+ var len = arguments.length, args = new Array(len);
+ if (len === 0) { throw new Error('List of properties cannot be empty.'); }
+ for(var i = 0; i < len; i++) { args[i] = arguments[i]; }
+ return this.map(plucker(args, len));
+ };
+
+observableProto.flatMap = observableProto.selectMany = function(selector, resultSelector, thisArg) {
+ return new FlatMapObservable(this, selector, resultSelector, thisArg).mergeAll();
+};
+
+Rx.Observable.prototype.flatMapLatest = function(selector, resultSelector, thisArg) {
+ return new FlatMapObservable(this, selector, resultSelector, thisArg).switchLatest();
+};
+ var SkipObservable = (function(__super__) {
+ inherits(SkipObservable, __super__);
+ function SkipObservable(source, count) {
+ this.source = source;
+ this._count = count;
+ __super__.call(this);
+ }
+
+ SkipObservable.prototype.subscribeCore = function (o) {
+ return this.source.subscribe(new SkipObserver(o, this._count));
+ };
+
+ function SkipObserver(o, c) {
+ this._o = o;
+ this._r = c;
+ AbstractObserver.call(this);
+ }
+
+ inherits(SkipObserver, AbstractObserver);
+
+ SkipObserver.prototype.next = function (x) {
+ if (this._r <= 0) {
+ this._o.onNext(x);
+ } else {
+ this._r--;
+ }
+ };
+ SkipObserver.prototype.error = function(e) { this._o.onError(e); };
+ SkipObserver.prototype.completed = function() { this._o.onCompleted(); };
+
+ return SkipObservable;
+ }(ObservableBase));
+
+ /**
+ * Bypasses a specified number of elements in an observable sequence and then returns the remaining elements.
+ * @param {Number} count The number of elements to skip before returning the remaining elements.
+ * @returns {Observable} An observable sequence that contains the elements that occur after the specified index in the input sequence.
+ */
+ observableProto.skip = function (count) {
+ if (count < 0) { throw new ArgumentOutOfRangeError(); }
+ return new SkipObservable(this, count);
+ };
+
+ var SkipWhileObservable = (function (__super__) {
+ inherits(SkipWhileObservable, __super__);
+ function SkipWhileObservable(source, fn) {
+ this.source = source;
+ this._fn = fn;
+ __super__.call(this);
+ }
+
+ SkipWhileObservable.prototype.subscribeCore = function (o) {
+ return this.source.subscribe(new SkipWhileObserver(o, this));
+ };
+
+ return SkipWhileObservable;
+ }(ObservableBase));
+
+ var SkipWhileObserver = (function (__super__) {
+ inherits(SkipWhileObserver, __super__);
+
+ function SkipWhileObserver(o, p) {
+ this._o = o;
+ this._p = p;
+ this._i = 0;
+ this._r = false;
+ __super__.call(this);
+ }
+
+ SkipWhileObserver.prototype.next = function (x) {
+ if (!this._r) {
+ var res = tryCatch(this._p._fn)(x, this._i++, this._p);
+ if (res === errorObj) { return this._o.onError(res.e); }
+ this._r = !res;
+ }
+ this._r && this._o.onNext(x);
+ };
+ SkipWhileObserver.prototype.error = function (e) { this._o.onError(e); };
+ SkipWhileObserver.prototype.completed = function () { this._o.onCompleted(); };
+
+ return SkipWhileObserver;
+ }(AbstractObserver));
+
+ /**
+ * Bypasses elements in an observable sequence as long as a specified condition is true and then returns the remaining elements.
+ * The element's index is used in the logic of the predicate function.
+ *
+ * var res = source.skipWhile(function (value) { return value < 10; });
+ * var res = source.skipWhile(function (value, index) { return value < 10 || index < 10; });
+ * @param {Function} predicate A function to test each element for a condition; the second parameter of the function represents the index of the source element.
+ * @param {Any} [thisArg] Object to use as this when executing callback.
+ * @returns {Observable} An observable sequence that contains the elements from the input sequence starting at the first element in the linear series that does not pass the test specified by predicate.
+ */
+ observableProto.skipWhile = function (predicate, thisArg) {
+ var fn = bindCallback(predicate, thisArg, 3);
+ return new SkipWhileObservable(this, fn);
+ };
+
+ var TakeObservable = (function(__super__) {
+ inherits(TakeObservable, __super__);
+ function TakeObservable(source, count) {
+ this.source = source;
+ this._count = count;
+ __super__.call(this);
+ }
+
+ TakeObservable.prototype.subscribeCore = function (o) {
+ return this.source.subscribe(new TakeObserver(o, this._count));
+ };
+
+ function TakeObserver(o, c) {
+ this._o = o;
+ this._c = c;
+ this._r = c;
+ AbstractObserver.call(this);
+ }
+
+ inherits(TakeObserver, AbstractObserver);
+
+ TakeObserver.prototype.next = function (x) {
+ if (this._r-- > 0) {
+ this._o.onNext(x);
+ this._r <= 0 && this._o.onCompleted();
+ }
+ };
+
+ TakeObserver.prototype.error = function (e) { this._o.onError(e); };
+ TakeObserver.prototype.completed = function () { this._o.onCompleted(); };
+
+ return TakeObservable;
+ }(ObservableBase));
+
+ /**
+ * Returns a specified number of contiguous elements from the start of an observable sequence, using the specified scheduler for the edge case of take(0).
+ * @param {Number} count The number of elements to return.
+ * @param {Scheduler} [scheduler] Scheduler used to produce an OnCompleted message in case <paramref name="count count</paramref> is set to 0.
+ * @returns {Observable} An observable sequence that contains the specified number of elements from the start of the input sequence.
+ */
+ observableProto.take = function (count, scheduler) {
+ if (count < 0) { throw new ArgumentOutOfRangeError(); }
+ if (count === 0) { return observableEmpty(scheduler); }
+ return new TakeObservable(this, count);
+ };
+
+ var TakeWhileObservable = (function (__super__) {
+ inherits(TakeWhileObservable, __super__);
+ function TakeWhileObservable(source, fn) {
+ this.source = source;
+ this._fn = fn;
+ __super__.call(this);
+ }
+
+ TakeWhileObservable.prototype.subscribeCore = function (o) {
+ return this.source.subscribe(new TakeWhileObserver(o, this));
+ };
+
+ return TakeWhileObservable;
+ }(ObservableBase));
+
+ var TakeWhileObserver = (function (__super__) {
+ inherits(TakeWhileObserver, __super__);
+
+ function TakeWhileObserver(o, p) {
+ this._o = o;
+ this._p = p;
+ this._i = 0;
+ this._r = true;
+ __super__.call(this);
+ }
+
+ TakeWhileObserver.prototype.next = function (x) {
+ if (this._r) {
+ this._r = tryCatch(this._p._fn)(x, this._i++, this._p);
+ if (this._r === errorObj) { return this._o.onError(this._r.e); }
+ }
+ if (this._r) {
+ this._o.onNext(x);
+ } else {
+ this._o.onCompleted();
+ }
+ };
+ TakeWhileObserver.prototype.error = function (e) { this._o.onError(e); };
+ TakeWhileObserver.prototype.completed = function () { this._o.onCompleted(); };
+
+ return TakeWhileObserver;
+ }(AbstractObserver));
+
+ /**
+ * Returns elements from an observable sequence as long as a specified condition is true.
+ * The element's index is used in the logic of the predicate function.
+ * @param {Function} predicate A function to test each element for a condition; the second parameter of the function represents the index of the source element.
+ * @param {Any} [thisArg] Object to use as this when executing callback.
+ * @returns {Observable} An observable sequence that contains the elements from the input sequence that occur before the element at which the test no longer passes.
+ */
+ observableProto.takeWhile = function (predicate, thisArg) {
+ var fn = bindCallback(predicate, thisArg, 3);
+ return new TakeWhileObservable(this, fn);
+ };
+
+ var FilterObservable = (function (__super__) {
+ inherits(FilterObservable, __super__);
+
+ function FilterObservable(source, predicate, thisArg) {
+ this.source = source;
+ this.predicate = bindCallback(predicate, thisArg, 3);
+ __super__.call(this);
+ }
+
+ FilterObservable.prototype.subscribeCore = function (o) {
+ return this.source.subscribe(new InnerObserver(o, this.predicate, this));
+ };
+
+ function innerPredicate(predicate, self) {
+ return function(x, i, o) { return self.predicate(x, i, o) && predicate.call(this, x, i, o); }
+ }
+
+ FilterObservable.prototype.internalFilter = function(predicate, thisArg) {
+ return new FilterObservable(this.source, innerPredicate(predicate, this), thisArg);
+ };
+
+ inherits(InnerObserver, AbstractObserver);
+ function InnerObserver(o, predicate, source) {
+ this.o = o;
+ this.predicate = predicate;
+ this.source = source;
+ this.i = 0;
+ AbstractObserver.call(this);
+ }
+
+ InnerObserver.prototype.next = function(x) {
+ var shouldYield = tryCatch(this.predicate)(x, this.i++, this.source);
+ if (shouldYield === errorObj) {
+ return this.o.onError(shouldYield.e);
+ }
+ shouldYield && this.o.onNext(x);
+ };
+
+ InnerObserver.prototype.error = function (e) {
+ this.o.onError(e);
+ };
+
+ InnerObserver.prototype.completed = function () {
+ this.o.onCompleted();
+ };
+
+ return FilterObservable;
+
+ }(ObservableBase));
+
+ /**
+ * Filters the elements of an observable sequence based on a predicate by incorporating the element's index.
+ * @param {Function} predicate A function to test each source element for a condition; the second parameter of the function represents the index of the source element.
+ * @param {Any} [thisArg] Object to use as this when executing callback.
+ * @returns {Observable} An observable sequence that contains elements from the input sequence that satisfy the condition.
+ */
+ observableProto.filter = observableProto.where = function (predicate, thisArg) {
+ return this instanceof FilterObservable ? this.internalFilter(predicate, thisArg) :
+ new FilterObservable(this, predicate, thisArg);
+ };
+
+function createCbObservable(fn, ctx, selector, args) {
+ var o = new AsyncSubject();
+
+ args.push(createCbHandler(o, ctx, selector));
+ fn.apply(ctx, args);
+
+ return o.asObservable();
+}
+
+function createCbHandler(o, ctx, selector) {
+ return function handler () {
+ var len = arguments.length, results = new Array(len);
+ for(var i = 0; i < len; i++) { results[i] = arguments[i]; }
+
+ if (isFunction(selector)) {
+ results = tryCatch(selector).apply(ctx, results);
+ if (results === errorObj) { return o.onError(results.e); }
+ o.onNext(results);
+ } else {
+ if (results.length <= 1) {
+ o.onNext(results[0]);
+ } else {
+ o.onNext(results);
+ }
+ }
+
+ o.onCompleted();
+ };
+}
+
+/**
+ * Converts a callback function to an observable sequence.
+ *
+ * @param {Function} fn Function with a callback as the last parameter to convert to an Observable sequence.
+ * @param {Mixed} [ctx] The context for the func parameter to be executed. If not specified, defaults to undefined.
+ * @param {Function} [selector] A selector which takes the arguments from the callback to produce a single item to yield on next.
+ * @returns {Function} A function, when executed with the required parameters minus the callback, produces an Observable sequence with a single value of the arguments to the callback as an array.
+ */
+Observable.fromCallback = function (fn, ctx, selector) {
+ return function () {
+ typeof ctx === 'undefined' && (ctx = this);
+
+ var len = arguments.length, args = new Array(len)
+ for(var i = 0; i < len; i++) { args[i] = arguments[i]; }
+ return createCbObservable(fn, ctx, selector, args);
+ };
+};
+
+function createNodeObservable(fn, ctx, selector, args) {
+ var o = new AsyncSubject();
+
+ args.push(createNodeHandler(o, ctx, selector));
+ fn.apply(ctx, args);
+
+ return o.asObservable();
+}
+
+function createNodeHandler(o, ctx, selector) {
+ return function handler () {
+ var err = arguments[0];
+ if (err) { return o.onError(err); }
+
+ var len = arguments.length, results = [];
+ for(var i = 1; i < len; i++) { results[i - 1] = arguments[i]; }
+
+ if (isFunction(selector)) {
+ var results = tryCatch(selector).apply(ctx, results);
+ if (results === errorObj) { return o.onError(results.e); }
+ o.onNext(results);
+ } else {
+ if (results.length <= 1) {
+ o.onNext(results[0]);
+ } else {
+ o.onNext(results);
+ }
+ }
+
+ o.onCompleted();
+ };
+}
+
+/**
+ * Converts a Node.js callback style function to an observable sequence. This must be in function (err, ...) format.
+ * @param {Function} fn The function to call
+ * @param {Mixed} [ctx] The context for the func parameter to be executed. If not specified, defaults to undefined.
+ * @param {Function} [selector] A selector which takes the arguments from the callback minus the error to produce a single item to yield on next.
+ * @returns {Function} An async function which when applied, returns an observable sequence with the callback arguments as an array.
+ */
+Observable.fromNodeCallback = function (fn, ctx, selector) {
+ return function () {
+ typeof ctx === 'undefined' && (ctx = this);
+ var len = arguments.length, args = new Array(len);
+ for(var i = 0; i < len; i++) { args[i] = arguments[i]; }
+ return createNodeObservable(fn, ctx, selector, args);
+ };
+};
+
+ function isNodeList(el) {
+ if (root.StaticNodeList) {
+ // IE8 Specific
+ // instanceof is slower than Object#toString, but Object#toString will not work as intended in IE8
+ return el instanceof root.StaticNodeList || el instanceof root.NodeList;
+ } else {
+ return Object.prototype.toString.call(el) === '[object NodeList]';
+ }
+ }
+
+ function ListenDisposable(e, n, fn) {
+ this._e = e;
+ this._n = n;
+ this._fn = fn;
+ this._e.addEventListener(this._n, this._fn, false);
+ this.isDisposed = false;
+ }
+ ListenDisposable.prototype.dispose = function () {
+ if (!this.isDisposed) {
+ this._e.removeEventListener(this._n, this._fn, false);
+ this.isDisposed = true;
+ }
+ };
+
+ function createEventListener (el, eventName, handler) {
+ var disposables = new CompositeDisposable();
+
+ // Asume NodeList or HTMLCollection
+ var elemToString = Object.prototype.toString.call(el);
+ if (isNodeList(el) || elemToString === '[object HTMLCollection]') {
+ for (var i = 0, len = el.length; i < len; i++) {
+ disposables.add(createEventListener(el.item(i), eventName, handler));
+ }
+ } else if (el) {
+ disposables.add(new ListenDisposable(el, eventName, handler));
+ }
+
+ return disposables;
+ }
+
+ /**
+ * Configuration option to determine whether to use native events only
+ */
+ Rx.config.useNativeEvents = false;
+
+ var EventObservable = (function(__super__) {
+ inherits(EventObservable, __super__);
+ function EventObservable(el, name, fn) {
+ this._el = el;
+ this._n = name;
+ this._fn = fn;
+ __super__.call(this);
+ }
+
+ function createHandler(o, fn) {
+ return function handler () {
+ var results = arguments[0];
+ if (isFunction(fn)) {
+ results = tryCatch(fn).apply(null, arguments);
+ if (results === errorObj) { return o.onError(results.e); }
+ }
+ o.onNext(results);
+ };
+ }
+
+ EventObservable.prototype.subscribeCore = function (o) {
+ return createEventListener(
+ this._el,
+ this._n,
+ createHandler(o, this._fn));
+ };
+
+ return EventObservable;
+ }(ObservableBase));
+
+ /**
+ * Creates an observable sequence by adding an event listener to the matching DOMElement or each item in the NodeList.
+ * @param {Object} element The DOMElement or NodeList to attach a listener.
+ * @param {String} eventName The event name to attach the observable sequence.
+ * @param {Function} [selector] A selector which takes the arguments from the event handler to produce a single item to yield on next.
+ * @returns {Observable} An observable sequence of events from the specified element and the specified event.
+ */
+ Observable.fromEvent = function (element, eventName, selector) {
+ // Node.js specific
+ if (element.addListener) {
+ return fromEventPattern(
+ function (h) { element.addListener(eventName, h); },
+ function (h) { element.removeListener(eventName, h); },
+ selector);
+ }
+
+ // Use only if non-native events are allowed
+ if (!Rx.config.useNativeEvents) {
+ // Handles jq, Angular.js, Zepto, Marionette, Ember.js
+ if (typeof element.on === 'function' && typeof element.off === 'function') {
+ return fromEventPattern(
+ function (h) { element.on(eventName, h); },
+ function (h) { element.off(eventName, h); },
+ selector);
+ }
+ }
+
+ return new EventObservable(element, eventName, selector).publish().refCount();
+ };
+
+ var EventPatternObservable = (function(__super__) {
+ inherits(EventPatternObservable, __super__);
+ function EventPatternObservable(add, del, fn) {
+ this._add = add;
+ this._del = del;
+ this._fn = fn;
+ __super__.call(this);
+ }
+
+ function createHandler(o, fn) {
+ return function handler () {
+ var results = arguments[0];
+ if (isFunction(fn)) {
+ results = tryCatch(fn).apply(null, arguments);
+ if (results === errorObj) { return o.onError(results.e); }
+ }
+ o.onNext(results);
+ };
+ }
+
+ EventPatternObservable.prototype.subscribeCore = function (o) {
+ var fn = createHandler(o, this._fn);
+ var returnValue = this._add(fn);
+ return new EventPatternDisposable(this._del, fn, returnValue);
+ };
+
+ function EventPatternDisposable(del, fn, ret) {
+ this._del = del;
+ this._fn = fn;
+ this._ret = ret;
+ this.isDisposed = false;
+ }
+
+ EventPatternDisposable.prototype.dispose = function () {
+ if(!this.isDisposed) {
+ isFunction(this._del) && this._del(this._fn, this._ret);
+ this.isDisposed = true;
+ }
+ };
+
+ return EventPatternObservable;
+ }(ObservableBase));
+
+ /**
+ * Creates an observable sequence from an event emitter via an addHandler/removeHandler pair.
+ * @param {Function} addHandler The function to add a handler to the emitter.
+ * @param {Function} [removeHandler] The optional function to remove a handler from an emitter.
+ * @param {Function} [selector] A selector which takes the arguments from the event handler to produce a single item to yield on next.
+ * @returns {Observable} An observable sequence which wraps an event from an event emitter
+ */
+ var fromEventPattern = Observable.fromEventPattern = function (addHandler, removeHandler, selector) {
+ return new EventPatternObservable(addHandler, removeHandler, selector).publish().refCount();
+ };
+
+ var FromPromiseObservable = (function(__super__) {
+ inherits(FromPromiseObservable, __super__);
+ function FromPromiseObservable(p, s) {
+ this._p = p;
+ this._s = s;
+ __super__.call(this);
+ }
+
+ function scheduleNext(s, state) {
+ var o = state[0], data = state[1];
+ o.onNext(data);
+ o.onCompleted();
+ }
+
+ function scheduleError(s, state) {
+ var o = state[0], err = state[1];
+ o.onError(err);
+ }
+
+ FromPromiseObservable.prototype.subscribeCore = function(o) {
+ var sad = new SingleAssignmentDisposable(), self = this;
+
+ this._p
+ .then(function (data) {
+ sad.setDisposable(self._s.schedule([o, data], scheduleNext));
+ }, function (err) {
+ sad.setDisposable(self._s.schedule([o, err], scheduleError));
+ });
+
+ return sad;
+ };
+
+ return FromPromiseObservable;
+ }(ObservableBase));
+
+ /**
+ * Converts a Promise to an Observable sequence
+ * @param {Promise} An ES6 Compliant promise.
+ * @returns {Observable} An Observable sequence which wraps the existing promise success and failure.
+ */
+ var observableFromPromise = Observable.fromPromise = function (promise, scheduler) {
+ scheduler || (scheduler = defaultScheduler);
+ return new FromPromiseObservable(promise, scheduler);
+ };
+
+ /*
+ * Converts an existing observable sequence to an ES6 Compatible Promise
+ * @example
+ * var promise = Rx.Observable.return(42).toPromise(RSVP.Promise);
+ *
+ * // With config
+ * Rx.config.Promise = RSVP.Promise;
+ * var promise = Rx.Observable.return(42).toPromise();
+ * @param {Function} [promiseCtor] The constructor of the promise. If not provided, it looks for it in Rx.config.Promise.
+ * @returns {Promise} An ES6 compatible promise with the last value from the observable sequence.
+ */
+ observableProto.toPromise = function (promiseCtor) {
+ promiseCtor || (promiseCtor = Rx.config.Promise);
+ if (!promiseCtor) { throw new NotSupportedError('Promise type not provided nor in Rx.config.Promise'); }
+ var source = this;
+ return new promiseCtor(function (resolve, reject) {
+ // No cancellation can be done
+ var value;
+ source.subscribe(function (v) {
+ value = v;
+ }, reject, function () {
+ resolve(value);
+ });
+ });
+ };
+
+ /**
+ * Invokes the asynchronous function, surfacing the result through an observable sequence.
+ * @param {Function} functionAsync Asynchronous function which returns a Promise to run.
+ * @returns {Observable} An observable sequence exposing the function's result value, or an exception.
+ */
+ Observable.startAsync = function (functionAsync) {
+ var promise = tryCatch(functionAsync)();
+ if (promise === errorObj) { return observableThrow(promise.e); }
+ return observableFromPromise(promise);
+ };
+
+ var MulticastObservable = (function (__super__) {
+ inherits(MulticastObservable, __super__);
+ function MulticastObservable(source, fn1, fn2) {
+ this.source = source;
+ this._fn1 = fn1;
+ this._fn2 = fn2;
+ __super__.call(this);
+ }
+
+ MulticastObservable.prototype.subscribeCore = function (o) {
+ var connectable = this.source.multicast(this._fn1());
+ return new BinaryDisposable(this._fn2(connectable).subscribe(o), connectable.connect());
+ };
+
+ return MulticastObservable;
+ }(ObservableBase));
+
+ /**
+ * Multicasts the source sequence notifications through an instantiated subject into all uses of the sequence within a selector function. Each
+ * subscription to the resulting sequence causes a separate multicast invocation, exposing the sequence resulting from the selector function's
+ * invocation. For specializations with fixed subject types, see Publish, PublishLast, and Replay.
+ *
+ * @example
+ * 1 - res = source.multicast(observable);
+ * 2 - res = source.multicast(function () { return new Subject(); }, function (x) { return x; });
+ *
+ * @param {Function|Subject} subjectOrSubjectSelector
+ * Factory function to create an intermediate subject through which the source sequence's elements will be multicast to the selector function.
+ * Or:
+ * Subject to push source elements into.
+ *
+ * @param {Function} [selector] Optional selector function which can use the multicasted source sequence subject to the policies enforced by the created subject. Specified only if <paramref name="subjectOrSubjectSelector" is a factory function.
+ * @returns {Observable} An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function.
+ */
+ observableProto.multicast = function (subjectOrSubjectSelector, selector) {
+ return isFunction(subjectOrSubjectSelector) ?
+ new MulticastObservable(this, subjectOrSubjectSelector, selector) :
+ new ConnectableObservable(this, subjectOrSubjectSelector);
+ };
+
+ /**
+ * Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence.
+ * This operator is a specialization of Multicast using a regular Subject.
+ *
+ * @example
+ * var resres = source.publish();
+ * var res = source.publish(function (x) { return x; });
+ *
+ * @param {Function} [selector] Selector function which can use the multicasted source sequence as many times as needed, without causing multiple subscriptions to the source sequence. Subscribers to the given source will receive all notifications of the source from the time of the subscription on.
+ * @returns {Observable} An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function.
+ */
+ observableProto.publish = function (selector) {
+ return selector && isFunction(selector) ?
+ this.multicast(function () { return new Subject(); }, selector) :
+ this.multicast(new Subject());
+ };
+
+ /**
+ * Returns an observable sequence that shares a single subscription to the underlying sequence.
+ * This operator is a specialization of publish which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed.
+ * @returns {Observable} An observable sequence that contains the elements of a sequence produced by multicasting the source sequence.
+ */
+ observableProto.share = function () {
+ return this.publish().refCount();
+ };
+
+ /**
+ * Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence containing only the last notification.
+ * This operator is a specialization of Multicast using a AsyncSubject.
+ *
+ * @example
+ * var res = source.publishLast();
+ * var res = source.publishLast(function (x) { return x; });
+ *
+ * @param selector [Optional] Selector function which can use the multicasted source sequence as many times as needed, without causing multiple subscriptions to the source sequence. Subscribers to the given source will only receive the last notification of the source.
+ * @returns {Observable} An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function.
+ */
+ observableProto.publishLast = function (selector) {
+ return selector && isFunction(selector) ?
+ this.multicast(function () { return new AsyncSubject(); }, selector) :
+ this.multicast(new AsyncSubject());
+ };
+
+ /**
+ * Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence and starts with initialValue.
+ * This operator is a specialization of Multicast using a BehaviorSubject.
+ *
+ * @example
+ * var res = source.publishValue(42);
+ * var res = source.publishValue(function (x) { return x.select(function (y) { return y * y; }) }, 42);
+ *
+ * @param {Function} [selector] Optional selector function which can use the multicasted source sequence as many times as needed, without causing multiple subscriptions to the source sequence. Subscribers to the given source will receive immediately receive the initial value, followed by all notifications of the source from the time of the subscription on.
+ * @param {Mixed} initialValue Initial value received by observers upon subscription.
+ * @returns {Observable} An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function.
+ */
+ observableProto.publishValue = function (initialValueOrSelector, initialValue) {
+ return arguments.length === 2 ?
+ this.multicast(function () {
+ return new BehaviorSubject(initialValue);
+ }, initialValueOrSelector) :
+ this.multicast(new BehaviorSubject(initialValueOrSelector));
+ };
+
+ /**
+ * Returns an observable sequence that shares a single subscription to the underlying sequence and starts with an initialValue.
+ * This operator is a specialization of publishValue which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed.
+ * @param {Mixed} initialValue Initial value received by observers upon subscription.
+ * @returns {Observable} An observable sequence that contains the elements of a sequence produced by multicasting the source sequence.
+ */
+ observableProto.shareValue = function (initialValue) {
+ return this.publishValue(initialValue).refCount();
+ };
+
+ /**
+ * Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence replaying notifications subject to a maximum time length for the replay buffer.
+ * This operator is a specialization of Multicast using a ReplaySubject.
+ *
+ * @example
+ * var res = source.replay(null, 3);
+ * var res = source.replay(null, 3, 500);
+ * var res = source.replay(null, 3, 500, scheduler);
+ * var res = source.replay(function (x) { return x.take(6).repeat(); }, 3, 500, scheduler);
+ *
+ * @param selector [Optional] Selector function which can use the multicasted source sequence as many times as needed, without causing multiple subscriptions to the source sequence. Subscribers to the given source will receive all the notifications of the source subject to the specified replay buffer trimming policy.
+ * @param bufferSize [Optional] Maximum element count of the replay buffer.
+ * @param windowSize [Optional] Maximum time length of the replay buffer.
+ * @param scheduler [Optional] Scheduler where connected observers within the selector function will be invoked on.
+ * @returns {Observable} An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function.
+ */
+ observableProto.replay = function (selector, bufferSize, windowSize, scheduler) {
+ return selector && isFunction(selector) ?
+ this.multicast(function () { return new ReplaySubject(bufferSize, windowSize, scheduler); }, selector) :
+ this.multicast(new ReplaySubject(bufferSize, windowSize, scheduler));
+ };
+
+ /**
+ * Returns an observable sequence that shares a single subscription to the underlying sequence replaying notifications subject to a maximum time length for the replay buffer.
+ * This operator is a specialization of replay which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed.
+ *
+ * @example
+ * var res = source.shareReplay(3);
+ * var res = source.shareReplay(3, 500);
+ * var res = source.shareReplay(3, 500, scheduler);
+ *
+
+ * @param bufferSize [Optional] Maximum element count of the replay buffer.
+ * @param window [Optional] Maximum time length of the replay buffer.
+ * @param scheduler [Optional] Scheduler where connected observers within the selector function will be invoked on.
+ * @returns {Observable} An observable sequence that contains the elements of a sequence produced by multicasting the source sequence.
+ */
+ observableProto.shareReplay = function (bufferSize, windowSize, scheduler) {
+ return this.replay(null, bufferSize, windowSize, scheduler).refCount();
+ };
+
+ var RefCountObservable = (function (__super__) {
+ inherits(RefCountObservable, __super__);
+ function RefCountObservable(source) {
+ this.source = source;
+ this._count = 0;
+ this._connectableSubscription = null;
+ __super__.call(this);
+ }
+
+ RefCountObservable.prototype.subscribeCore = function (o) {
+ var subscription = this.source.subscribe(o);
+ ++this._count === 1 && (this._connectableSubscription = this.source.connect());
+ return new RefCountDisposable(this, subscription);
+ };
+
+ function RefCountDisposable(p, s) {
+ this._p = p;
+ this._s = s;
+ this.isDisposed = false;
+ }
+
+ RefCountDisposable.prototype.dispose = function () {
+ if (!this.isDisposed) {
+ this.isDisposed = true;
+ this._s.dispose();
+ --this._p._count === 0 && this._p._connectableSubscription.dispose();
+ }
+ };
+
+ return RefCountObservable;
+ }(ObservableBase));
+
+ var ConnectableObservable = Rx.ConnectableObservable = (function (__super__) {
+ inherits(ConnectableObservable, __super__);
+ function ConnectableObservable(source, subject) {
+ this.source = source;
+ this._connection = null;
+ this._source = source.asObservable();
+ this._subject = subject;
+ __super__.call(this);
+ }
+
+ function ConnectDisposable(parent, subscription) {
+ this._p = parent;
+ this._s = subscription;
+ }
+
+ ConnectDisposable.prototype.dispose = function () {
+ if (this._s) {
+ this._s.dispose();
+ this._s = null;
+ this._p._connection = null;
+ }
+ };
+
+ ConnectableObservable.prototype.connect = function () {
+ if (!this._connection) {
+ var subscription = this._source.subscribe(this._subject);
+ this._connection = new ConnectDisposable(this, subscription);
+ }
+ return this._connection;
+ };
+
+ ConnectableObservable.prototype._subscribe = function (o) {
+ return this._subject.subscribe(o);
+ };
+
+ ConnectableObservable.prototype.refCount = function () {
+ return new RefCountObservable(this);
+ };
+
+ return ConnectableObservable;
+ }(Observable));
+
+ var TimerObservable = (function(__super__) {
+ inherits(TimerObservable, __super__);
+ function TimerObservable(dt, s) {
+ this._dt = dt;
+ this._s = s;
+ __super__.call(this);
+ }
+
+ TimerObservable.prototype.subscribeCore = function (o) {
+ return this._s.scheduleFuture(o, this._dt, scheduleMethod);
+ };
+
+ function scheduleMethod(s, o) {
+ o.onNext(0);
+ o.onCompleted();
+ }
+
+ return TimerObservable;
+ }(ObservableBase));
+
+ function _observableTimer(dueTime, scheduler) {
+ return new TimerObservable(dueTime, scheduler);
+ }
+
+ function observableTimerDateAndPeriod(dueTime, period, scheduler) {
+ return new AnonymousObservable(function (observer) {
+ var d = dueTime, p = normalizeTime(period);
+ return scheduler.scheduleRecursiveFuture(0, d, function (count, self) {
+ if (p > 0) {
+ var now = scheduler.now();
+ d = new Date(d.getTime() + p);
+ d.getTime() <= now && (d = new Date(now + p));
+ }
+ observer.onNext(count);
+ self(count + 1, new Date(d));
+ });
+ });
+ }
+
+ function observableTimerTimeSpanAndPeriod(dueTime, period, scheduler) {
+ return dueTime === period ?
+ new AnonymousObservable(function (observer) {
+ return scheduler.schedulePeriodic(0, period, function (count) {
+ observer.onNext(count);
+ return count + 1;
+ });
+ }) :
+ observableDefer(function () {
+ return observableTimerDateAndPeriod(new Date(scheduler.now() + dueTime), period, scheduler);
+ });
+ }
+
+ /**
+ * Returns an observable sequence that produces a value after each period.
+ *
+ * @example
+ * 1 - res = Rx.Observable.interval(1000);
+ * 2 - res = Rx.Observable.interval(1000, Rx.Scheduler.timeout);
+ *
+ * @param {Number} period Period for producing the values in the resulting sequence (specified as an integer denoting milliseconds).
+ * @param {Scheduler} [scheduler] Scheduler to run the timer on. If not specified, Rx.Scheduler.timeout is used.
+ * @returns {Observable} An observable sequence that produces a value after each period.
+ */
+ var observableinterval = Observable.interval = function (period, scheduler) {
+ return observableTimerTimeSpanAndPeriod(period, period, isScheduler(scheduler) ? scheduler : defaultScheduler);
+ };
+
+ /**
+ * Returns an observable sequence that produces a value after dueTime has elapsed and then after each period.
+ * @param {Number} dueTime Absolute (specified as a Date object) or relative time (specified as an integer denoting milliseconds) at which to produce the first value.
+ * @param {Mixed} [periodOrScheduler] Period to produce subsequent values (specified as an integer denoting milliseconds), or the scheduler to run the timer on. If not specified, the resulting timer is not recurring.
+ * @param {Scheduler} [scheduler] Scheduler to run the timer on. If not specified, the timeout scheduler is used.
+ * @returns {Observable} An observable sequence that produces a value after due time has elapsed and then each period.
+ */
+ var observableTimer = Observable.timer = function (dueTime, periodOrScheduler, scheduler) {
+ var period;
+ isScheduler(scheduler) || (scheduler = defaultScheduler);
+ if (periodOrScheduler != null && typeof periodOrScheduler === 'number') {
+ period = periodOrScheduler;
+ } else if (isScheduler(periodOrScheduler)) {
+ scheduler = periodOrScheduler;
+ }
+ if ((dueTime instanceof Date || typeof dueTime === 'number') && period === undefined) {
+ return _observableTimer(dueTime, scheduler);
+ }
+ if (dueTime instanceof Date && period !== undefined) {
+ return observableTimerDateAndPeriod(dueTime, periodOrScheduler, scheduler);
+ }
+ return observableTimerTimeSpanAndPeriod(dueTime, period, scheduler);
+ };
+
+ function observableDelayRelative(source, dueTime, scheduler) {
+ return new AnonymousObservable(function (o) {
+ var active = false,
+ cancelable = new SerialDisposable(),
+ exception = null,
+ q = [],
+ running = false,
+ subscription;
+ subscription = source.materialize().timestamp(scheduler).subscribe(function (notification) {
+ var d, shouldRun;
+ if (notification.value.kind === 'E') {
+ q = [];
+ q.push(notification);
+ exception = notification.value.error;
+ shouldRun = !running;
+ } else {
+ q.push({ value: notification.value, timestamp: notification.timestamp + dueTime });
+ shouldRun = !active;
+ active = true;
+ }
+ if (shouldRun) {
+ if (exception !== null) {
+ o.onError(exception);
+ } else {
+ d = new SingleAssignmentDisposable();
+ cancelable.setDisposable(d);
+ d.setDisposable(scheduler.scheduleRecursiveFuture(null, dueTime, function (_, self) {
+ var e, recurseDueTime, result, shouldRecurse;
+ if (exception !== null) {
+ return;
+ }
+ running = true;
+ do {
+ result = null;
+ if (q.length > 0 && q[0].timestamp - scheduler.now() <= 0) {
+ result = q.shift().value;
+ }
+ if (result !== null) {
+ result.accept(o);
+ }
+ } while (result !== null);
+ shouldRecurse = false;
+ recurseDueTime = 0;
+ if (q.length > 0) {
+ shouldRecurse = true;
+ recurseDueTime = Math.max(0, q[0].timestamp - scheduler.now());
+ } else {
+ active = false;
+ }
+ e = exception;
+ running = false;
+ if (e !== null) {
+ o.onError(e);
+ } else if (shouldRecurse) {
+ self(null, recurseDueTime);
+ }
+ }));
+ }
+ }
+ });
+ return new BinaryDisposable(subscription, cancelable);
+ }, source);
+ }
+
+ function observableDelayAbsolute(source, dueTime, scheduler) {
+ return observableDefer(function () {
+ return observableDelayRelative(source, dueTime - scheduler.now(), scheduler);
+ });
+ }
+
+ function delayWithSelector(source, subscriptionDelay, delayDurationSelector) {
+ var subDelay, selector;
+ if (isFunction(subscriptionDelay)) {
+ selector = subscriptionDelay;
+ } else {
+ subDelay = subscriptionDelay;
+ selector = delayDurationSelector;
+ }
+ return new AnonymousObservable(function (o) {
+ var delays = new CompositeDisposable(), atEnd = false, subscription = new SerialDisposable();
+
+ function start() {
+ subscription.setDisposable(source.subscribe(
+ function (x) {
+ var delay = tryCatch(selector)(x);
+ if (delay === errorObj) { return o.onError(delay.e); }
+ var d = new SingleAssignmentDisposable();
+ delays.add(d);
+ d.setDisposable(delay.subscribe(
+ function () {
+ o.onNext(x);
+ delays.remove(d);
+ done();
+ },
+ function (e) { o.onError(e); },
+ function () {
+ o.onNext(x);
+ delays.remove(d);
+ done();
+ }
+ ));
+ },
+ function (e) { o.onError(e); },
+ function () {
+ atEnd = true;
+ subscription.dispose();
+ done();
+ }
+ ));
+ }
+
+ function done () {
+ atEnd && delays.length === 0 && o.onCompleted();
+ }
+
+ if (!subDelay) {
+ start();
+ } else {
+ subscription.setDisposable(subDelay.subscribe(start, function (e) { o.onError(e); }, start));
+ }
+
+ return new BinaryDisposable(subscription, delays);
+ }, source);
+ }
+
+ /**
+ * Time shifts the observable sequence by dueTime.
+ * The relative time intervals between the values are preserved.
+ *
+ * @param {Number} dueTime Absolute (specified as a Date object) or relative time (specified as an integer denoting milliseconds) by which to shift the observable sequence.
+ * @param {Scheduler} [scheduler] Scheduler to run the delay timers on. If not specified, the timeout scheduler is used.
+ * @returns {Observable} Time-shifted sequence.
+ */
+ observableProto.delay = function () {
+ var firstArg = arguments[0];
+ if (typeof firstArg === 'number' || firstArg instanceof Date) {
+ var dueTime = firstArg, scheduler = arguments[1];
+ isScheduler(scheduler) || (scheduler = defaultScheduler);
+ return dueTime instanceof Date ?
+ observableDelayAbsolute(this, dueTime, scheduler) :
+ observableDelayRelative(this, dueTime, scheduler);
+ } else if (Observable.isObservable(firstArg) || isFunction(firstArg)) {
+ return delayWithSelector(this, firstArg, arguments[1]);
+ } else {
+ throw new Error('Invalid arguments');
+ }
+ };
+
+ var DebounceObservable = (function (__super__) {
+ inherits(DebounceObservable, __super__);
+ function DebounceObservable(source, dt, s) {
+ isScheduler(s) || (s = defaultScheduler);
+ this.source = source;
+ this._dt = dt;
+ this._s = s;
+ __super__.call(this);
+ }
+
+ DebounceObservable.prototype.subscribeCore = function (o) {
+ var cancelable = new SerialDisposable();
+ return new BinaryDisposable(
+ this.source.subscribe(new DebounceObserver(o, this._dt, this._s, cancelable)),
+ cancelable);
+ };
+
+ return DebounceObservable;
+ }(ObservableBase));
+
+ var DebounceObserver = (function (__super__) {
+ inherits(DebounceObserver, __super__);
+ function DebounceObserver(observer, dueTime, scheduler, cancelable) {
+ this._o = observer;
+ this._d = dueTime;
+ this._scheduler = scheduler;
+ this._c = cancelable;
+ this._v = null;
+ this._hv = false;
+ this._id = 0;
+ __super__.call(this);
+ }
+
+ function scheduleFuture(s, state) {
+ state.self._hv && state.self._id === state.currentId && state.self._o.onNext(state.x);
+ state.self._hv = false;
+ }
+
+ DebounceObserver.prototype.next = function (x) {
+ this._hv = true;
+ this._v = x;
+ var currentId = ++this._id, d = new SingleAssignmentDisposable();
+ this._c.setDisposable(d);
+ d.setDisposable(this._scheduler.scheduleFuture(this, this._d, function (_, self) {
+ self._hv && self._id === currentId && self._o.onNext(x);
+ self._hv = false;
+ }));
+ };
+
+ DebounceObserver.prototype.error = function (e) {
+ this._c.dispose();
+ this._o.onError(e);
+ this._hv = false;
+ this._id++;
+ };
+
+ DebounceObserver.prototype.completed = function () {
+ this._c.dispose();
+ this._hv && this._o.onNext(this._v);
+ this._o.onCompleted();
+ this._hv = false;
+ this._id++;
+ };
+
+ return DebounceObserver;
+ }(AbstractObserver));
+
+ function debounceWithSelector(source, durationSelector) {
+ return new AnonymousObservable(function (o) {
+ var value, hasValue = false, cancelable = new SerialDisposable(), id = 0;
+ var subscription = source.subscribe(
+ function (x) {
+ var throttle = tryCatch(durationSelector)(x);
+ if (throttle === errorObj) { return o.onError(throttle.e); }
+
+ isPromise(throttle) && (throttle = observableFromPromise(throttle));
+
+ hasValue = true;
+ value = x;
+ id++;
+ var currentid = id, d = new SingleAssignmentDisposable();
+ cancelable.setDisposable(d);
+ d.setDisposable(throttle.subscribe(
+ function () {
+ hasValue && id === currentid && o.onNext(value);
+ hasValue = false;
+ d.dispose();
+ },
+ function (e) { o.onError(e); },
+ function () {
+ hasValue && id === currentid && o.onNext(value);
+ hasValue = false;
+ d.dispose();
+ }
+ ));
+ },
+ function (e) {
+ cancelable.dispose();
+ o.onError(e);
+ hasValue = false;
+ id++;
+ },
+ function () {
+ cancelable.dispose();
+ hasValue && o.onNext(value);
+ o.onCompleted();
+ hasValue = false;
+ id++;
+ }
+ );
+ return new BinaryDisposable(subscription, cancelable);
+ }, source);
+ }
+
+ observableProto.debounce = function () {
+ if (isFunction (arguments[0])) {
+ return debounceWithSelector(this, arguments[0]);
+ } else if (typeof arguments[0] === 'number') {
+ return new DebounceObservable(this, arguments[0], arguments[1]);
+ } else {
+ throw new Error('Invalid arguments');
+ }
+ };
+
+ var TimestampObservable = (function (__super__) {
+ inherits(TimestampObservable, __super__);
+ function TimestampObservable(source, s) {
+ this.source = source;
+ this._s = s;
+ __super__.call(this);
+ }
+
+ TimestampObservable.prototype.subscribeCore = function (o) {
+ return this.source.subscribe(new TimestampObserver(o, this._s));
+ };
+
+ return TimestampObservable;
+ }(ObservableBase));
+
+ var TimestampObserver = (function (__super__) {
+ inherits(TimestampObserver, __super__);
+ function TimestampObserver(o, s) {
+ this._o = o;
+ this._s = s;
+ __super__.call(this);
+ }
+
+ TimestampObserver.prototype.next = function (x) {
+ this._o.onNext({ value: x, timestamp: this._s.now() });
+ };
+
+ TimestampObserver.prototype.error = function (e) {
+ this._o.onError(e);
+ };
+
+ TimestampObserver.prototype.completed = function () {
+ this._o.onCompleted();
+ };
+
+ return TimestampObserver;
+ }(AbstractObserver));
+
+ /**
+ * Records the timestamp for each value in an observable sequence.
+ *
+ * @example
+ * 1 - res = source.timestamp(); // produces { value: x, timestamp: ts }
+ * 2 - res = source.timestamp(Rx.Scheduler.default);
+ *
+ * @param {Scheduler} [scheduler] Scheduler used to compute timestamps. If not specified, the default scheduler is used.
+ * @returns {Observable} An observable sequence with timestamp information on values.
+ */
+ observableProto.timestamp = function (scheduler) {
+ isScheduler(scheduler) || (scheduler = defaultScheduler);
+ return new TimestampObservable(this, scheduler);
+ };
+
+ var SampleObservable = (function(__super__) {
+ inherits(SampleObservable, __super__);
+ function SampleObservable(source, sampler) {
+ this.source = source;
+ this._sampler = sampler;
+ __super__.call(this);
+ }
+
+ SampleObservable.prototype.subscribeCore = function (o) {
+ var state = {
+ o: o,
+ atEnd: false,
+ value: null,
+ hasValue: false,
+ sourceSubscription: new SingleAssignmentDisposable()
+ };
+
+ state.sourceSubscription.setDisposable(this.source.subscribe(new SampleSourceObserver(state)));
+ return new BinaryDisposable(
+ state.sourceSubscription,
+ this._sampler.subscribe(new SamplerObserver(state))
+ );
+ };
+
+ return SampleObservable;
+ }(ObservableBase));
+
+ var SamplerObserver = (function(__super__) {
+ inherits(SamplerObserver, __super__);
+ function SamplerObserver(s) {
+ this._s = s;
+ __super__.call(this);
+ }
+
+ SamplerObserver.prototype._handleMessage = function () {
+ if (this._s.hasValue) {
+ this._s.hasValue = false;
+ this._s.o.onNext(this._s.value);
+ }
+ this._s.atEnd && this._s.o.onCompleted();
+ };
+
+ SamplerObserver.prototype.next = function () { this._handleMessage(); };
+ SamplerObserver.prototype.error = function (e) { this._s.onError(e); };
+ SamplerObserver.prototype.completed = function () { this._handleMessage(); };
+
+ return SamplerObserver;
+ }(AbstractObserver));
+
+ var SampleSourceObserver = (function(__super__) {
+ inherits(SampleSourceObserver, __super__);
+ function SampleSourceObserver(s) {
+ this._s = s;
+ __super__.call(this);
+ }
+
+ SampleSourceObserver.prototype.next = function (x) {
+ this._s.hasValue = true;
+ this._s.value = x;
+ };
+ SampleSourceObserver.prototype.error = function (e) { this._s.o.onError(e); };
+ SampleSourceObserver.prototype.completed = function () {
+ this._s.atEnd = true;
+ this._s.sourceSubscription.dispose();
+ };
+
+ return SampleSourceObserver;
+ }(AbstractObserver));
+
+ /**
+ * Samples the observable sequence at each interval.
+ *
+ * @example
+ * 1 - res = source.sample(sampleObservable); // Sampler tick sequence
+ * 2 - res = source.sample(5000); // 5 seconds
+ * 2 - res = source.sample(5000, Rx.Scheduler.timeout); // 5 seconds
+ *
+ * @param {Mixed} intervalOrSampler Interval at which to sample (specified as an integer denoting milliseconds) or Sampler Observable.
+ * @param {Scheduler} [scheduler] Scheduler to run the sampling timer on. If not specified, the timeout scheduler is used.
+ * @returns {Observable} Sampled observable sequence.
+ */
+ observableProto.sample = function (intervalOrSampler, scheduler) {
+ isScheduler(scheduler) || (scheduler = defaultScheduler);
+ return typeof intervalOrSampler === 'number' ?
+ new SampleObservable(this, observableinterval(intervalOrSampler, scheduler)) :
+ new SampleObservable(this, intervalOrSampler);
+ };
+
+ var TimeoutError = Rx.TimeoutError = function(message) {
+ this.message = message || 'Timeout has occurred';
+ this.name = 'TimeoutError';
+ Error.call(this);
+ };
+ TimeoutError.prototype = Object.create(Error.prototype);
+
+ function timeoutWithSelector(source, firstTimeout, timeoutDurationSelector, other) {
+ if (isFunction(firstTimeout)) {
+ other = timeoutDurationSelector;
+ timeoutDurationSelector = firstTimeout;
+ firstTimeout = observableNever();
+ }
+ Observable.isObservable(other) || (other = observableThrow(new TimeoutError()));
+ return new AnonymousObservable(function (o) {
+ var subscription = new SerialDisposable(),
+ timer = new SerialDisposable(),
+ original = new SingleAssignmentDisposable();
+
+ subscription.setDisposable(original);
+
+ var id = 0, switched = false;
+
+ function setTimer(timeout) {
+ var myId = id, d = new SingleAssignmentDisposable();
+
+ function timerWins() {
+ switched = (myId === id);
+ return switched;
+ }
+
+ timer.setDisposable(d);
+ d.setDisposable(timeout.subscribe(function () {
+ timerWins() && subscription.setDisposable(other.subscribe(o));
+ d.dispose();
+ }, function (e) {
+ timerWins() && o.onError(e);
+ }, function () {
+ timerWins() && subscription.setDisposable(other.subscribe(o));
+ }));
+ };
+
+ setTimer(firstTimeout);
+
+ function oWins() {
+ var res = !switched;
+ if (res) { id++; }
+ return res;
+ }
+
+ original.setDisposable(source.subscribe(function (x) {
+ if (oWins()) {
+ o.onNext(x);
+ var timeout = tryCatch(timeoutDurationSelector)(x);
+ if (timeout === errorObj) { return o.onError(timeout.e); }
+ setTimer(isPromise(timeout) ? observableFromPromise(timeout) : timeout);
+ }
+ }, function (e) {
+ oWins() && o.onError(e);
+ }, function () {
+ oWins() && o.onCompleted();
+ }));
+ return new BinaryDisposable(subscription, timer);
+ }, source);
+ }
+
+ function timeout(source, dueTime, other, scheduler) {
+ if (isScheduler(other)) {
+ scheduler = other;
+ other = observableThrow(new TimeoutError());
+ }
+ if (other instanceof Error) { other = observableThrow(other); }
+ isScheduler(scheduler) || (scheduler = defaultScheduler);
+ Observable.isObservable(other) || (other = observableThrow(new TimeoutError()));
+ return new AnonymousObservable(function (o) {
+ var id = 0,
+ original = new SingleAssignmentDisposable(),
+ subscription = new SerialDisposable(),
+ switched = false,
+ timer = new SerialDisposable();
+
+ subscription.setDisposable(original);
+
+ function createTimer() {
+ var myId = id;
+ timer.setDisposable(scheduler.scheduleFuture(null, dueTime, function () {
+ switched = id === myId;
+ if (switched) {
+ isPromise(other) && (other = observableFromPromise(other));
+ subscription.setDisposable(other.subscribe(o));
+ }
+ }));
+ }
+
+ createTimer();
+
+ original.setDisposable(source.subscribe(function (x) {
+ if (!switched) {
+ id++;
+ o.onNext(x);
+ createTimer();
+ }
+ }, function (e) {
+ if (!switched) {
+ id++;
+ o.onError(e);
+ }
+ }, function () {
+ if (!switched) {
+ id++;
+ o.onCompleted();
+ }
+ }));
+ return new BinaryDisposable(subscription, timer);
+ }, source);
+ }
+
+ observableProto.timeout = function () {
+ var firstArg = arguments[0];
+ if (firstArg instanceof Date || typeof firstArg === 'number') {
+ return timeout(this, firstArg, arguments[1], arguments[2]);
+ } else if (Observable.isObservable(firstArg) || isFunction(firstArg)) {
+ return timeoutWithSelector(this, firstArg, arguments[1], arguments[2]);
+ } else {
+ throw new Error('Invalid arguments');
+ }
+ };
+
+ /**
+ * Returns an Observable that emits only the first item emitted by the source Observable during sequential time windows of a specified duration.
+ * @param {Number} windowDuration time to wait before emitting another item after emitting the last item
+ * @param {Scheduler} [scheduler] the Scheduler to use internally to manage the timers that handle timeout for each item. If not provided, defaults to Scheduler.timeout.
+ * @returns {Observable} An Observable that performs the throttle operation.
+ */
+ observableProto.throttle = function (windowDuration, scheduler) {
+ isScheduler(scheduler) || (scheduler = defaultScheduler);
+ var duration = +windowDuration || 0;
+ if (duration <= 0) { throw new RangeError('windowDuration cannot be less or equal zero.'); }
+ var source = this;
+ return new AnonymousObservable(function (o) {
+ var lastOnNext = 0;
+ return source.subscribe(
+ function (x) {
+ var now = scheduler.now();
+ if (lastOnNext === 0 || now - lastOnNext >= duration) {
+ lastOnNext = now;
+ o.onNext(x);
+ }
+ },function (e) { o.onError(e); }, function () { o.onCompleted(); }
+ );
+ }, source);
+ };
+
+ var PausableObservable = (function (__super__) {
+ inherits(PausableObservable, __super__);
+ function PausableObservable(source, pauser) {
+ this.source = source;
+ this.controller = new Subject();
+
+ if (pauser && pauser.subscribe) {
+ this.pauser = this.controller.merge(pauser);
+ } else {
+ this.pauser = this.controller;
+ }
+
+ __super__.call(this);
+ }
+
+ PausableObservable.prototype._subscribe = function (o) {
+ var conn = this.source.publish(),
+ subscription = conn.subscribe(o),
+ connection = disposableEmpty;
+
+ var pausable = this.pauser.distinctUntilChanged().subscribe(function (b) {
+ if (b) {
+ connection = conn.connect();
+ } else {
+ connection.dispose();
+ connection = disposableEmpty;
+ }
+ });
+
+ return new NAryDisposable([subscription, connection, pausable]);
+ };
+
+ PausableObservable.prototype.pause = function () {
+ this.controller.onNext(false);
+ };
+
+ PausableObservable.prototype.resume = function () {
+ this.controller.onNext(true);
+ };
+
+ return PausableObservable;
+
+ }(Observable));
+
+ /**
+ * Pauses the underlying observable sequence based upon the observable sequence which yields true/false.
+ * @example
+ * var pauser = new Rx.Subject();
+ * var source = Rx.Observable.interval(100).pausable(pauser);
+ * @param {Observable} pauser The observable sequence used to pause the underlying sequence.
+ * @returns {Observable} The observable sequence which is paused based upon the pauser.
+ */
+ observableProto.pausable = function (pauser) {
+ return new PausableObservable(this, pauser);
+ };
+
+ function combineLatestSource(source, subject, resultSelector) {
+ return new AnonymousObservable(function (o) {
+ var hasValue = [false, false],
+ hasValueAll = false,
+ isDone = false,
+ values = new Array(2),
+ err;
+
+ function next(x, i) {
+ values[i] = x;
+ hasValue[i] = true;
+ if (hasValueAll || (hasValueAll = hasValue.every(identity))) {
+ if (err) { return o.onError(err); }
+ var res = tryCatch(resultSelector).apply(null, values);
+ if (res === errorObj) { return o.onError(res.e); }
+ o.onNext(res);
+ }
+ isDone && values[1] && o.onCompleted();
+ }
+
+ return new BinaryDisposable(
+ source.subscribe(
+ function (x) {
+ next(x, 0);
+ },
+ function (e) {
+ if (values[1]) {
+ o.onError(e);
+ } else {
+ err = e;
+ }
+ },
+ function () {
+ isDone = true;
+ values[1] && o.onCompleted();
+ }),
+ subject.subscribe(
+ function (x) {
+ next(x, 1);
+ },
+ function (e) { o.onError(e); },
+ function () {
+ isDone = true;
+ next(true, 1);
+ })
+ );
+ }, source);
+ }
+
+ var PausableBufferedObservable = (function (__super__) {
+ inherits(PausableBufferedObservable, __super__);
+ function PausableBufferedObservable(source, pauser) {
+ this.source = source;
+ this.controller = new Subject();
+
+ if (pauser && pauser.subscribe) {
+ this.pauser = this.controller.merge(pauser);
+ } else {
+ this.pauser = this.controller;
+ }
+
+ __super__.call(this);
+ }
+
+ PausableBufferedObservable.prototype._subscribe = function (o) {
+ var q = [], previousShouldFire;
+
+ function drainQueue() { while (q.length > 0) { o.onNext(q.shift()); } }
+
+ var subscription =
+ combineLatestSource(
+ this.source,
+ this.pauser.startWith(false).distinctUntilChanged(),
+ function (data, shouldFire) {
+ return { data: data, shouldFire: shouldFire };
+ })
+ .subscribe(
+ function (results) {
+ if (previousShouldFire !== undefined && results.shouldFire !== previousShouldFire) {
+ previousShouldFire = results.shouldFire;
+ // change in shouldFire
+ if (results.shouldFire) { drainQueue(); }
+ } else {
+ previousShouldFire = results.shouldFire;
+ // new data
+ if (results.shouldFire) {
+ o.onNext(results.data);
+ } else {
+ q.push(results.data);
+ }
+ }
+ },
+ function (err) {
+ drainQueue();
+ o.onError(err);
+ },
+ function () {
+ drainQueue();
+ o.onCompleted();
+ }
+ );
+ return subscription;
+ };
+
+ PausableBufferedObservable.prototype.pause = function () {
+ this.controller.onNext(false);
+ };
+
+ PausableBufferedObservable.prototype.resume = function () {
+ this.controller.onNext(true);
+ };
+
+ return PausableBufferedObservable;
+
+ }(Observable));
+
+ /**
+ * Pauses the underlying observable sequence based upon the observable sequence which yields true/false,
+ * and yields the values that were buffered while paused.
+ * @example
+ * var pauser = new Rx.Subject();
+ * var source = Rx.Observable.interval(100).pausableBuffered(pauser);
+ * @param {Observable} pauser The observable sequence used to pause the underlying sequence.
+ * @returns {Observable} The observable sequence which is paused based upon the pauser.
+ */
+ observableProto.pausableBuffered = function (pauser) {
+ return new PausableBufferedObservable(this, pauser);
+ };
+
+ var ControlledObservable = (function (__super__) {
+ inherits(ControlledObservable, __super__);
+ function ControlledObservable (source, enableQueue, scheduler) {
+ __super__.call(this);
+ this.subject = new ControlledSubject(enableQueue, scheduler);
+ this.source = source.multicast(this.subject).refCount();
+ }
+
+ ControlledObservable.prototype._subscribe = function (o) {
+ return this.source.subscribe(o);
+ };
+
+ ControlledObservable.prototype.request = function (numberOfItems) {
+ return this.subject.request(numberOfItems == null ? -1 : numberOfItems);
+ };
+
+ return ControlledObservable;
+
+ }(Observable));
+
+ var ControlledSubject = (function (__super__) {
+ inherits(ControlledSubject, __super__);
+ function ControlledSubject(enableQueue, scheduler) {
+ enableQueue == null && (enableQueue = true);
+
+ __super__.call(this);
+ this.subject = new Subject();
+ this.enableQueue = enableQueue;
+ this.queue = enableQueue ? [] : null;
+ this.requestedCount = 0;
+ this.requestedDisposable = null;
+ this.error = null;
+ this.hasFailed = false;
+ this.hasCompleted = false;
+ this.scheduler = scheduler || currentThreadScheduler;
+ }
+
+ addProperties(ControlledSubject.prototype, Observer, {
+ _subscribe: function (o) {
+ return this.subject.subscribe(o);
+ },
+ onCompleted: function () {
+ this.hasCompleted = true;
+ if (!this.enableQueue || this.queue.length === 0) {
+ this.subject.onCompleted();
+ this.disposeCurrentRequest();
+ } else {
+ this.queue.push(Notification.createOnCompleted());
+ }
+ },
+ onError: function (error) {
+ this.hasFailed = true;
+ this.error = error;
+ if (!this.enableQueue || this.queue.length === 0) {
+ this.subject.onError(error);
+ this.disposeCurrentRequest();
+ } else {
+ this.queue.push(Notification.createOnError(error));
+ }
+ },
+ onNext: function (value) {
+ if (this.requestedCount <= 0) {
+ this.enableQueue && this.queue.push(Notification.createOnNext(value));
+ } else {
+ (this.requestedCount-- === 0) && this.disposeCurrentRequest();
+ this.subject.onNext(value);
+ }
+ },
+ _processRequest: function (numberOfItems) {
+ if (this.enableQueue) {
+ while (this.queue.length > 0 && (numberOfItems > 0 || this.queue[0].kind !== 'N')) {
+ var first = this.queue.shift();
+ first.accept(this.subject);
+ if (first.kind === 'N') {
+ numberOfItems--;
+ } else {
+ this.disposeCurrentRequest();
+ this.queue = [];
+ }
+ }
+ }
+
+ return numberOfItems;
+ },
+ request: function (number) {
+ this.disposeCurrentRequest();
+ var self = this;
+
+ this.requestedDisposable = this.scheduler.schedule(number,
+ function(s, i) {
+ var remaining = self._processRequest(i);
+ var stopped = self.hasCompleted || self.hasFailed;
+ if (!stopped && remaining > 0) {
+ self.requestedCount = remaining;
+
+ return disposableCreate(function () {
+ self.requestedCount = 0;
+ });
+ // Scheduled item is still in progress. Return a new
+ // disposable to allow the request to be interrupted
+ // via dispose.
+ }
+ });
+
+ return this.requestedDisposable;
+ },
+ disposeCurrentRequest: function () {
+ if (this.requestedDisposable) {
+ this.requestedDisposable.dispose();
+ this.requestedDisposable = null;
+ }
+ }
+ });
+
+ return ControlledSubject;
+ }(Observable));
+
+ /**
+ * Attaches a controller to the observable sequence with the ability to queue.
+ * @example
+ * var source = Rx.Observable.interval(100).controlled();
+ * source.request(3); // Reads 3 values
+ * @param {bool} enableQueue truthy value to determine if values should be queued pending the next request
+ * @param {Scheduler} scheduler determines how the requests will be scheduled
+ * @returns {Observable} The observable sequence which only propagates values on request.
+ */
+ observableProto.controlled = function (enableQueue, scheduler) {
+
+ if (enableQueue && isScheduler(enableQueue)) {
+ scheduler = enableQueue;
+ enableQueue = true;
+ }
+
+ if (enableQueue == null) { enableQueue = true; }
+ return new ControlledObservable(this, enableQueue, scheduler);
+ };
+
+ /**
+ * Pipes the existing Observable sequence into a Node.js Stream.
+ * @param {Stream} dest The destination Node.js stream.
+ * @returns {Stream} The destination stream.
+ */
+ observableProto.pipe = function (dest) {
+ var source = this.pausableBuffered();
+
+ function onDrain() {
+ source.resume();
+ }
+
+ dest.addListener('drain', onDrain);
+
+ source.subscribe(
+ function (x) {
+ !dest.write(String(x)) && source.pause();
+ },
+ function (err) {
+ dest.emit('error', err);
+ },
+ function () {
+ // Hack check because STDIO is not closable
+ !dest._isStdio && dest.end();
+ dest.removeListener('drain', onDrain);
+ });
+
+ source.resume();
+
+ return dest;
+ };
+
+ var TransduceObserver = (function (__super__) {
+ inherits(TransduceObserver, __super__);
+ function TransduceObserver(o, xform) {
+ this._o = o;
+ this._xform = xform;
+ __super__.call(this);
+ }
+
+ TransduceObserver.prototype.next = function (x) {
+ var res = tryCatch(this._xform['@@transducer/step']).call(this._xform, this._o, x);
+ if (res === errorObj) { this._o.onError(res.e); }
+ };
+
+ TransduceObserver.prototype.error = function (e) { this._o.onError(e); };
+
+ TransduceObserver.prototype.completed = function () {
+ this._xform['@@transducer/result'](this._o);
+ };
+
+ return TransduceObserver;
+ }(AbstractObserver));
+
+ function transformForObserver(o) {
+ return {
+ '@@transducer/init': function() {
+ return o;
+ },
+ '@@transducer/step': function(obs, input) {
+ return obs.onNext(input);
+ },
+ '@@transducer/result': function(obs) {
+ return obs.onCompleted();
+ }
+ };
+ }
+
+ /**
+ * Executes a transducer to transform the observable sequence
+ * @param {Transducer} transducer A transducer to execute
+ * @returns {Observable} An Observable sequence containing the results from the transducer.
+ */
+ observableProto.transduce = function(transducer) {
+ var source = this;
+ return new AnonymousObservable(function(o) {
+ var xform = transducer(transformForObserver(o));
+ return source.subscribe(new TransduceObserver(o, xform));
+ }, source);
+ };
+
+ var AnonymousObservable = Rx.AnonymousObservable = (function (__super__) {
+ inherits(AnonymousObservable, __super__);
+
+ // Fix subscriber to check for undefined or function returned to decorate as Disposable
+ function fixSubscriber(subscriber) {
+ return subscriber && isFunction(subscriber.dispose) ? subscriber :
+ isFunction(subscriber) ? disposableCreate(subscriber) : disposableEmpty;
+ }
+
+ function setDisposable(s, state) {
+ var ado = state[0], self = state[1];
+ var sub = tryCatch(self.__subscribe).call(self, ado);
+ if (sub === errorObj && !ado.fail(errorObj.e)) { thrower(errorObj.e); }
+ ado.setDisposable(fixSubscriber(sub));
+ }
+
+ function AnonymousObservable(subscribe, parent) {
+ this.source = parent;
+ this.__subscribe = subscribe;
+ __super__.call(this);
+ }
+
+ AnonymousObservable.prototype._subscribe = function (o) {
+ var ado = new AutoDetachObserver(o), state = [ado, this];
+
+ if (currentThreadScheduler.scheduleRequired()) {
+ currentThreadScheduler.schedule(state, setDisposable);
+ } else {
+ setDisposable(null, state);
+ }
+ return ado;
+ };
+
+ return AnonymousObservable;
+
+ }(Observable));
+
+ var AutoDetachObserver = (function (__super__) {
+ inherits(AutoDetachObserver, __super__);
+
+ function AutoDetachObserver(observer) {
+ __super__.call(this);
+ this.observer = observer;
+ this.m = new SingleAssignmentDisposable();
+ }
+
+ var AutoDetachObserverPrototype = AutoDetachObserver.prototype;
+
+ AutoDetachObserverPrototype.next = function (value) {
+ var result = tryCatch(this.observer.onNext).call(this.observer, value);
+ if (result === errorObj) {
+ this.dispose();
+ thrower(result.e);
+ }
+ };
+
+ AutoDetachObserverPrototype.error = function (err) {
+ var result = tryCatch(this.observer.onError).call(this.observer, err);
+ this.dispose();
+ result === errorObj && thrower(result.e);
+ };
+
+ AutoDetachObserverPrototype.completed = function () {
+ var result = tryCatch(this.observer.onCompleted).call(this.observer);
+ this.dispose();
+ result === errorObj && thrower(result.e);
+ };
+
+ AutoDetachObserverPrototype.setDisposable = function (value) { this.m.setDisposable(value); };
+ AutoDetachObserverPrototype.getDisposable = function () { return this.m.getDisposable(); };
+
+ AutoDetachObserverPrototype.dispose = function () {
+ __super__.prototype.dispose.call(this);
+ this.m.dispose();
+ };
+
+ return AutoDetachObserver;
+ }(AbstractObserver));
+
+ var InnerSubscription = function (s, o) {
+ this._s = s;
+ this._o = o;
+ };
+
+ InnerSubscription.prototype.dispose = function () {
+ if (!this._s.isDisposed && this._o !== null) {
+ var idx = this._s.observers.indexOf(this._o);
+ this._s.observers.splice(idx, 1);
+ this._o = null;
+ }
+ };
+
+ /**
+ * Represents an object that is both an observable sequence as well as an observer.
+ * Each notification is broadcasted to all subscribed observers.
+ */
+ var Subject = Rx.Subject = (function (__super__) {
+ inherits(Subject, __super__);
+ function Subject() {
+ __super__.call(this);
+ this.isDisposed = false;
+ this.isStopped = false;
+ this.observers = [];
+ this.hasError = false;
+ }
+
+ addProperties(Subject.prototype, Observer.prototype, {
+ _subscribe: function (o) {
+ checkDisposed(this);
+ if (!this.isStopped) {
+ this.observers.push(o);
+ return new InnerSubscription(this, o);
+ }
+ if (this.hasError) {
+ o.onError(this.error);
+ return disposableEmpty;
+ }
+ o.onCompleted();
+ return disposableEmpty;
+ },
+ /**
+ * Indicates whether the subject has observers subscribed to it.
+ * @returns {Boolean} Indicates whether the subject has observers subscribed to it.
+ */
+ hasObservers: function () { checkDisposed(this); return this.observers.length > 0; },
+ /**
+ * Notifies all subscribed observers about the end of the sequence.
+ */
+ onCompleted: function () {
+ checkDisposed(this);
+ if (!this.isStopped) {
+ this.isStopped = true;
+ for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) {
+ os[i].onCompleted();
+ }
+
+ this.observers.length = 0;
+ }
+ },
+ /**
+ * Notifies all subscribed observers about the exception.
+ * @param {Mixed} error The exception to send to all observers.
+ */
+ onError: function (error) {
+ checkDisposed(this);
+ if (!this.isStopped) {
+ this.isStopped = true;
+ this.error = error;
+ this.hasError = true;
+ for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) {
+ os[i].onError(error);
+ }
+
+ this.observers.length = 0;
+ }
+ },
+ /**
+ * Notifies all subscribed observers about the arrival of the specified element in the sequence.
+ * @param {Mixed} value The value to send to all observers.
+ */
+ onNext: function (value) {
+ checkDisposed(this);
+ if (!this.isStopped) {
+ for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) {
+ os[i].onNext(value);
+ }
+ }
+ },
+ /**
+ * Unsubscribe all observers and release resources.
+ */
+ dispose: function () {
+ this.isDisposed = true;
+ this.observers = null;
+ }
+ });
+
+ /**
+ * Creates a subject from the specified observer and observable.
+ * @param {Observer} observer The observer used to send messages to the subject.
+ * @param {Observable} observable The observable used to subscribe to messages sent from the subject.
+ * @returns {Subject} Subject implemented using the given observer and observable.
+ */
+ Subject.create = function (observer, observable) {
+ return new AnonymousSubject(observer, observable);
+ };
+
+ return Subject;
+ }(Observable));
+
+ /**
+ * Represents the result of an asynchronous operation.
+ * The last value before the OnCompleted notification, or the error received through OnError, is sent to all subscribed observers.
+ */
+ var AsyncSubject = Rx.AsyncSubject = (function (__super__) {
+ inherits(AsyncSubject, __super__);
+
+ /**
+ * Creates a subject that can only receive one value and that value is cached for all future observations.
+ * @constructor
+ */
+ function AsyncSubject() {
+ __super__.call(this);
+ this.isDisposed = false;
+ this.isStopped = false;
+ this.hasValue = false;
+ this.observers = [];
+ this.hasError = false;
+ }
+
+ addProperties(AsyncSubject.prototype, Observer.prototype, {
+ _subscribe: function (o) {
+ checkDisposed(this);
+
+ if (!this.isStopped) {
+ this.observers.push(o);
+ return new InnerSubscription(this, o);
+ }
+
+ if (this.hasError) {
+ o.onError(this.error);
+ } else if (this.hasValue) {
+ o.onNext(this.value);
+ o.onCompleted();
+ } else {
+ o.onCompleted();
+ }
+
+ return disposableEmpty;
+ },
+ /**
+ * Indicates whether the subject has observers subscribed to it.
+ * @returns {Boolean} Indicates whether the subject has observers subscribed to it.
+ */
+ hasObservers: function () { checkDisposed(this); return this.observers.length > 0; },
+ /**
+ * Notifies all subscribed observers about the end of the sequence, also causing the last received value to be sent out (if any).
+ */
+ onCompleted: function () {
+ var i, len;
+ checkDisposed(this);
+ if (!this.isStopped) {
+ this.isStopped = true;
+ var os = cloneArray(this.observers), len = os.length;
+
+ if (this.hasValue) {
+ for (i = 0; i < len; i++) {
+ var o = os[i];
+ o.onNext(this.value);
+ o.onCompleted();
+ }
+ } else {
+ for (i = 0; i < len; i++) {
+ os[i].onCompleted();
+ }
+ }
+
+ this.observers.length = 0;
+ }
+ },
+ /**
+ * Notifies all subscribed observers about the error.
+ * @param {Mixed} error The Error to send to all observers.
+ */
+ onError: function (error) {
+ checkDisposed(this);
+ if (!this.isStopped) {
+ this.isStopped = true;
+ this.hasError = true;
+ this.error = error;
+
+ for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) {
+ os[i].onError(error);
+ }
+
+ this.observers.length = 0;
+ }
+ },
+ /**
+ * Sends a value to the subject. The last value received before successful termination will be sent to all subscribed and future observers.
+ * @param {Mixed} value The value to store in the subject.
+ */
+ onNext: function (value) {
+ checkDisposed(this);
+ if (this.isStopped) { return; }
+ this.value = value;
+ this.hasValue = true;
+ },
+ /**
+ * Unsubscribe all observers and release resources.
+ */
+ dispose: function () {
+ this.isDisposed = true;
+ this.observers = null;
+ this.error = null;
+ this.value = null;
+ }
+ });
+
+ return AsyncSubject;
+ }(Observable));
+
+ var AnonymousSubject = Rx.AnonymousSubject = (function (__super__) {
+ inherits(AnonymousSubject, __super__);
+ function AnonymousSubject(observer, observable) {
+ this.observer = observer;
+ this.observable = observable;
+ __super__.call(this);
+ }
+
+ addProperties(AnonymousSubject.prototype, Observer.prototype, {
+ _subscribe: function (o) {
+ return this.observable.subscribe(o);
+ },
+ onCompleted: function () {
+ this.observer.onCompleted();
+ },
+ onError: function (error) {
+ this.observer.onError(error);
+ },
+ onNext: function (value) {
+ this.observer.onNext(value);
+ }
+ });
+
+ return AnonymousSubject;
+ }(Observable));
+
+ /**
+ * Represents a value that changes over time.
+ * Observers can subscribe to the subject to receive the last (or initial) value and all subsequent notifications.
+ */
+ var BehaviorSubject = Rx.BehaviorSubject = (function (__super__) {
+ inherits(BehaviorSubject, __super__);
+ function BehaviorSubject(value) {
+ __super__.call(this);
+ this.value = value;
+ this.observers = [];
+ this.isDisposed = false;
+ this.isStopped = false;
+ this.hasError = false;
+ }
+
+ addProperties(BehaviorSubject.prototype, Observer.prototype, {
+ _subscribe: function (o) {
+ checkDisposed(this);
+ if (!this.isStopped) {
+ this.observers.push(o);
+ o.onNext(this.value);
+ return new InnerSubscription(this, o);
+ }
+ if (this.hasError) {
+ o.onError(this.error);
+ } else {
+ o.onCompleted();
+ }
+ return disposableEmpty;
+ },
+ /**
+ * Gets the current value or throws an exception.
+ * Value is frozen after onCompleted is called.
+ * After onError is called always throws the specified exception.
+ * An exception is always thrown after dispose is called.
+ * @returns {Mixed} The initial value passed to the constructor until onNext is called; after which, the last value passed to onNext.
+ */
+ getValue: function () {
+ checkDisposed(this);
+ if (this.hasError) { thrower(this.error); }
+ return this.value;
+ },
+ /**
+ * Indicates whether the subject has observers subscribed to it.
+ * @returns {Boolean} Indicates whether the subject has observers subscribed to it.
+ */
+ hasObservers: function () { checkDisposed(this); return this.observers.length > 0; },
+ /**
+ * Notifies all subscribed observers about the end of the sequence.
+ */
+ onCompleted: function () {
+ checkDisposed(this);
+ if (this.isStopped) { return; }
+ this.isStopped = true;
+ for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) {
+ os[i].onCompleted();
+ }
+
+ this.observers.length = 0;
+ },
+ /**
+ * Notifies all subscribed observers about the exception.
+ * @param {Mixed} error The exception to send to all observers.
+ */
+ onError: function (error) {
+ checkDisposed(this);
+ if (this.isStopped) { return; }
+ this.isStopped = true;
+ this.hasError = true;
+ this.error = error;
+
+ for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) {
+ os[i].onError(error);
+ }
+
+ this.observers.length = 0;
+ },
+ /**
+ * Notifies all subscribed observers about the arrival of the specified element in the sequence.
+ * @param {Mixed} value The value to send to all observers.
+ */
+ onNext: function (value) {
+ checkDisposed(this);
+ if (this.isStopped) { return; }
+ this.value = value;
+ for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) {
+ os[i].onNext(value);
+ }
+ },
+ /**
+ * Unsubscribe all observers and release resources.
+ */
+ dispose: function () {
+ this.isDisposed = true;
+ this.observers = null;
+ this.value = null;
+ this.error = null;
+ }
+ });
+
+ return BehaviorSubject;
+ }(Observable));
+
+ /**
+ * Represents an object that is both an observable sequence as well as an observer.
+ * Each notification is broadcasted to all subscribed and future observers, subject to buffer trimming policies.
+ */
+ var ReplaySubject = Rx.ReplaySubject = (function (__super__) {
+
+ var maxSafeInteger = Math.pow(2, 53) - 1;
+
+ function createRemovableDisposable(subject, observer) {
+ return disposableCreate(function () {
+ observer.dispose();
+ !subject.isDisposed && subject.observers.splice(subject.observers.indexOf(observer), 1);
+ });
+ }
+
+ inherits(ReplaySubject, __super__);
+
+ /**
+ * Initializes a new instance of the ReplaySubject class with the specified buffer size, window size and scheduler.
+ * @param {Number} [bufferSize] Maximum element count of the replay buffer.
+ * @param {Number} [windowSize] Maximum time length of the replay buffer.
+ * @param {Scheduler} [scheduler] Scheduler the observers are invoked on.
+ */
+ function ReplaySubject(bufferSize, windowSize, scheduler) {
+ this.bufferSize = bufferSize == null ? maxSafeInteger : bufferSize;
+ this.windowSize = windowSize == null ? maxSafeInteger : windowSize;
+ this.scheduler = scheduler || currentThreadScheduler;
+ this.q = [];
+ this.observers = [];
+ this.isStopped = false;
+ this.isDisposed = false;
+ this.hasError = false;
+ this.error = null;
+ __super__.call(this);
+ }
+
+ addProperties(ReplaySubject.prototype, Observer.prototype, {
+ _subscribe: function (o) {
+ checkDisposed(this);
+ var so = new ScheduledObserver(this.scheduler, o), subscription = createRemovableDisposable(this, so);
+
+ this._trim(this.scheduler.now());
+ this.observers.push(so);
+
+ for (var i = 0, len = this.q.length; i < len; i++) {
+ so.onNext(this.q[i].value);
+ }
+
+ if (this.hasError) {
+ so.onError(this.error);
+ } else if (this.isStopped) {
+ so.onCompleted();
+ }
+
+ so.ensureActive();
+ return subscription;
+ },
+ /**
+ * Indicates whether the subject has observers subscribed to it.
+ * @returns {Boolean} Indicates whether the subject has observers subscribed to it.
+ */
+ hasObservers: function () { checkDisposed(this); return this.observers.length > 0; },
+ _trim: function (now) {
+ while (this.q.length > this.bufferSize) {
+ this.q.shift();
+ }
+ while (this.q.length > 0 && (now - this.q[0].interval) > this.windowSize) {
+ this.q.shift();
+ }
+ },
+ /**
+ * Notifies all subscribed observers about the arrival of the specified element in the sequence.
+ * @param {Mixed} value The value to send to all observers.
+ */
+ onNext: function (value) {
+ checkDisposed(this);
+ if (this.isStopped) { return; }
+ var now = this.scheduler.now();
+ this.q.push({ interval: now, value: value });
+ this._trim(now);
+
+ for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) {
+ var observer = os[i];
+ observer.onNext(value);
+ observer.ensureActive();
+ }
+ },
+ /**
+ * Notifies all subscribed observers about the exception.
+ * @param {Mixed} error The exception to send to all observers.
+ */
+ onError: function (error) {
+ checkDisposed(this);
+ if (this.isStopped) { return; }
+ this.isStopped = true;
+ this.error = error;
+ this.hasError = true;
+ var now = this.scheduler.now();
+ this._trim(now);
+ for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) {
+ var observer = os[i];
+ observer.onError(error);
+ observer.ensureActive();
+ }
+ this.observers.length = 0;
+ },
+ /**
+ * Notifies all subscribed observers about the end of the sequence.
+ */
+ onCompleted: function () {
+ checkDisposed(this);
+ if (this.isStopped) { return; }
+ this.isStopped = true;
+ var now = this.scheduler.now();
+ this._trim(now);
+ for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) {
+ var observer = os[i];
+ observer.onCompleted();
+ observer.ensureActive();
+ }
+ this.observers.length = 0;
+ },
+ /**
+ * Unsubscribe all observers and release resources.
+ */
+ dispose: function () {
+ this.isDisposed = true;
+ this.observers = null;
+ }
+ });
+
+ return ReplaySubject;
+ }(Observable));
+
+ /**
+ * Used to pause and resume streams.
+ */
+ Rx.Pauser = (function (__super__) {
+ inherits(Pauser, __super__);
+ function Pauser() {
+ __super__.call(this);
+ }
+
+ /**
+ * Pauses the underlying sequence.
+ */
+ Pauser.prototype.pause = function () { this.onNext(false); };
+
+ /**
+ * Resumes the underlying sequence.
+ */
+ Pauser.prototype.resume = function () { this.onNext(true); };
+
+ return Pauser;
+ }(Subject));
+
+ if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
+ root.Rx = Rx;
+
+ define(function() {
+ return Rx;
+ });
+ } else if (freeExports && freeModule) {
+ // in Node.js or RingoJS
+ if (moduleExports) {
+ (freeModule.exports = Rx).Rx = Rx;
+ } else {
+ freeExports.Rx = Rx;
+ }
+ } else {
+ // in a browser or Rhino
+ root.Rx = Rx;
+ }
+
+ // All code before this point will be filtered from stack traces.
+ var rEndingLine = captureLine();
+
+}.call(this));
diff --git a/tools/node_modules/eslint/node_modules/rx-lite/rx.lite.map b/tools/node_modules/eslint/node_modules/rx-lite/rx.lite.map
new file mode 100644
index 0000000000..5d20dff33e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/rx-lite/rx.lite.map
@@ -0,0 +1 @@
+{"version":3,"file":"rx.lite.min.js","sources":["rx.lite.js"],"names":["undefined","checkGlobal","value","Object","cloneArray","arr","len","length","a","Array","i","tryCatcherGen","tryCatchTarget","apply","this","arguments","e","errorObj","thrower","makeStackTraceLong","error","observable","hasStacks","stack","indexOf","STACK_JUMP_SEPARATOR","stacks","o","source","unshift","concatedStacks","join","filterStackString","stackString","lines","split","desiredLines","line","isInternalFrame","isNodeFrame","push","stackLine","fileNameAndLineNumber","getFileNameAndLineNumber","fileName","lineNumber","rFileName","rStartingLine","rEndingLine","captureLine","Error","firstLine","attempt1","exec","Number","attempt2","attempt3","equalObjects","object","other","equalFunc","isLoose","stackA","stackB","objProps","keys","objLength","othProps","othLength","key","index","hasOwnProperty","call","skipCtor","result","objValue","othValue","objCtor","constructor","othCtor","equalByTag","tag","boolTag","dateTag","errorTag","name","message","numberTag","regexpTag","stringTag","isObjectLike","isLength","MAX_SAFE_INTEGER","isTypedArray","typedArrayTags","objToString","arraySome","array","predicate","equalArrays","arrLength","arrValue","baseIsEqualDeep","objIsArr","isArray","othIsArr","objTag","arrayTag","othTag","argsTag","objectTag","objIsObj","isHostObject","othIsObj","isSameTag","objIsWrapped","othIsWrapped","pop","baseIsEqual","isObject","arrayInitialize","count","factory","IndexedItem","id","IsDisposedDisposable","state","_s","isDisposed","StringIterable","s","StringIterator","_l","_i","ArrayIterable","_a","ArrayIterator","toLength","numberIsFinite","root","isFinite","getIterable","it","$iterator$","TypeError","sign","number","isNaN","Math","floor","abs","maxSafeInteger","observableOf","scheduler","isScheduler","currentThreadScheduler","FromArrayObservable","RepeatSink","observer","parent","falseFactory","argumentsToArray","args","emptyArrayFactory","asObservable","subscribe","repeat","@@iterator","next","done","plucker","x","currentProp","p","createCbObservable","fn","ctx","selector","AsyncSubject","createCbHandler","results","isFunction","tryCatch","onError","onNext","onCompleted","createNodeObservable","createNodeHandler","err","isNodeList","el","StaticNodeList","NodeList","prototype","toString","ListenDisposable","n","_e","_n","_fn","addEventListener","createEventListener","eventName","handler","disposables","CompositeDisposable","elemToString","add","item","_observableTimer","dueTime","TimerObservable","observableTimerDateAndPeriod","period","AnonymousObservable","d","normalizeTime","scheduleRecursiveFuture","self","now","Date","getTime","observableTimerTimeSpanAndPeriod","schedulePeriodic","observableDefer","observableDelayRelative","subscription","active","cancelable","SerialDisposable","exception","q","running","materialize","timestamp","notification","shouldRun","kind","SingleAssignmentDisposable","setDisposable","_","recurseDueTime","shouldRecurse","shift","accept","max","BinaryDisposable","observableDelayAbsolute","delayWithSelector","subscriptionDelay","delayDurationSelector","subDelay","start","delay","delays","remove","atEnd","dispose","debounceWithSelector","durationSelector","hasValue","throttle","isPromise","observableFromPromise","currentid","timeoutWithSelector","firstTimeout","timeoutDurationSelector","observableNever","Observable","isObservable","observableThrow","TimeoutError","setTimer","timeout","timerWins","switched","myId","timer","oWins","res","original","defaultScheduler","createTimer","scheduleFuture","combineLatestSource","subject","resultSelector","values","hasValueAll","every","identity","isDone","transformForObserver","@@transducer/init","@@transducer/step","obs","input","@@transducer/result","objectTypes","function","freeExports","exports","nodeType","freeModule","module","freeGlobal","global","freeSelf","freeWindow","window","moduleExports","thisGlobal","Function","Rx","internals","config","Promise","helpers","noop","defaultNow","defaultComparer","y","isEqual","defaultSubComparer","defaultError","defaultKeySerializer","then","isFn","longStackSupport","EmptyError","create","ObjectDisposedError","ArgumentOutOfRangeError","NotSupportedError","NotImplementedError","notImplemented","notSupported","Symbol","iterator","Set","doneEnumerator","isIterable","isArrayLike","bindCallback","func","thisArg","argCount","arg","collection","dontEnums","funcTag","mapTag","setTag","weakMapTag","arrayBufferTag","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","objectProto","pow","hasDontEnumBug","propertyIsEnumerable","dontEnumsLength","obj","prop","type","inherits","slice","child","__","addProperties","sources","idx","ln","addRef","xs","r","getDisposable","CompositeDisposablePrototype","shouldDispose","splice","currentDisposables","Disposable","action","disposableCreate","disposableEmpty","empty","isDisposable","checkDisposed","disposable","disposableFixup","_fixup","current","old","first","second","_first","_second","old1","old2","NAryDisposable","_disposables","ScheduledItem","RefCountDisposable","InnerDisposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","comparer","invoke","invokeCore","compareTo","isCancelled","Scheduler","schedulerProto","schedule","dt","normalize","_scheduleFuture","timeSpan","invokeRecImmediate","pair","innerAction","state2","scheduleWork","state3","isAdded","group","invokeRecDate","dueTime1","scheduleRecursive","setInterval","clearInterval","scheduleMethod","clearMethod","ImmediateScheduler","__super__","immediateScheduler","immediate","CurrentThreadScheduler","runTrampoline","queue","dequeue","si","enqueue","PriorityQueue","scheduleRequired","currentThread","localTimer","SchedulePeriodicRecursive","createTick","command","recurse","_period","_action","_state","_cancel","_scheduler","localSetTimeout","localClearTimeout","setTimeout","clearTimeout","WScript","time","Sleep","runTask","handle","currentlyRunning","task","tasksByHandle","postMessageSupported","postMessage","importScripts","isAsync","oldHandler","onmessage","nextHandle","reNative","RegExp","String","replace","setImmediate","test","process","nextTick","MSG_PREFIX","random","onGlobalPostMessage","event","data","substring","MessageChannel","channel","port1","port2","document","createElement","scriptElement","onreadystatechange","parentNode","removeChild","documentElement","appendChild","DefaultScheduler","scheduleAction","ClearDisposable","_id","LocalClearDisposable","async","c","capacity","items","priorityProto","isHigherPriority","left","right","percolate","temp","heapify","peek","removeAt","observableProto","Notification","_accept","_acceptObserver","observerOrOnNext","toObservable","OnNextNotification","OnErrorNotification","OnCompletedNotification","notificationCreateOnNext","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","Observer","observerCreate","AnonymousObserver","AbstractObserver","isStopped","completed","fail","_onNext","_onError","_onCompleted","makeSubscribe","oldOnError","oldSubscribe","_subscribe","forEach","oOrOnNext","subscribeOnNext","subscribeOnError","subscribeOnCompleted","ScheduledObserver","isAcquired","hasFaulted","enqueueNext","enqueueError","enqueueCompleted","work","ensureActive","isOwner","ObservableBase","fixSubscriber","subscriber","ado","sub","subscribeCore","AutoDetachObserver","FlatMapObservable","InnerObserver","_wrapResult","map","i2","from","Enumerable","ConcatEnumerableObservable","currentItem","currentValue","_recurse","concat","CatchErrorObservable","lastError","catchError","RepeatEnumerable","v","RepeatEnumerator","l","enumerableRepeat","repeatCount","OfEnumerable","OfEnumerator","enumerableOf","of","ToArrayObservable","toArray","Defer","_f","defer","observableFactory","EmptyObservable","EmptySink","scheduleItem","sink","run","EMPTY_OBSERVABLE","observableEmpty","FromObservable","iterable","_iterable","createScheduleMethod","list","charAt","observableFrom","mapFn","mapper","_args","observableFromArray","fromArray","NeverObservable","NEVER_OBSERVABLE","never","ofWithScheduler","PairsObservable","_o","_keys","pairs","RangeObservable","rangeCount","loopRecursive","range","RepeatObservable","JustObservable","_value","ThrowObservable","just","_error","CatchObservable","d1","CatchObserver","handlerOrSecond","observableCatch","combineLatest","CombineLatestObservable","params","cb","_params","_cb","subscriptions","sad","CombineLatestObserver","notTheSame","j","filter","observableConcat","ConcatObserver","ConcatObservable","_sources","concatAll","merge","MergeObservable","maxConcurrent","g","MergeObserver","activeCount","handleSubscribe","innerSource","maxConcurrentOrOther","observableMerge","mergeAll","CompositeError","errors","innerErrors","MergeDelayErrorObservable","m","MergeDelayErrorObserver","_group","setCompletion","inner","_inner","mergeDelayError","MergeAllObservable","MergeAllObserver","SkipUntilObservable","_open","leftSubscription","SkipUntilSourceObserver","rightSubscription","SkipUntilOtherObserver","_p","_r","skipUntil","SwitchObservable","SwitchObserver","stopped","latest","hasLatest","switchLatest","TakeUntilObservable","TakeUntilObserver","takeUntil","WithLatestFromObservable","_ss","WithLatestFromOtherObserver","outerSad","WithLatestFromSourceObserver","allValues","withLatestFrom","ZipObservable","ZipObserver","_q","_d","notEmpty","shiftEach","queuedValues","zip","ZipIterableObservable","ZipIterableObserver","zipIterable","DematerializeObservable","DematerializeObserver","dematerialize","DistinctUntilChangedObservable","keyFn","DistinctUntilChangedObserver","hasCurrentKey","currentKey","comparerEquals","distinctUntilChanged","TapObservable","_oN","_oE","_oC","t","tap","doAction","doOnNext","tapOnNext","doOnError","tapOnError","doOnCompleted","tapOnCompleted","FinallyObservable","FinallyDisposable","IgnoreElementsObservable","ignoreElements","MaterializeObservable","MaterializeObserver","retry","retryCount","RetryWhenObservable","createDisposable","notifier","_notifier","exceptions","Subject","handled","notificationDisposable","outer","exn","ex","retryWhen","RepeatWhenObservable","completions","repeatWhen","ScanObservable","accumulator","hasSeed","seed","ScanObserver","_hs","_ha","_hv","scan","SkipLastObservable","_c","SkipLastObserver","skipLast","startWith","TakeLastObserver","takeLast","flatMapConcat","concatMap","MapObservable","innerMap","internalMap","select","selectorFn","pluck","flatMap","selectMany","flatMapLatest","SkipObservable","_count","SkipObserver","skip","SkipWhileObservable","SkipWhileObserver","skipWhile","TakeObservable","TakeObserver","take","TakeWhileObservable","TakeWhileObserver","takeWhile","FilterObservable","innerPredicate","internalFilter","shouldYield","where","fromCallback","fromNodeCallback","removeEventListener","useNativeEvents","EventObservable","_el","createHandler","fromEvent","element","addListener","fromEventPattern","h","removeListener","on","off","publish","refCount","EventPatternObservable","del","_add","_del","EventPatternDisposable","ret","_ret","returnValue","addHandler","removeHandler","FromPromiseObservable","scheduleNext","scheduleError","fromPromise","promise","toPromise","promiseCtor","resolve","reject","startAsync","functionAsync","MulticastObservable","fn1","fn2","_fn1","_fn2","connectable","multicast","connect","subjectOrSubjectSelector","ConnectableObservable","share","publishLast","publishValue","initialValueOrSelector","initialValue","BehaviorSubject","shareValue","replay","bufferSize","windowSize","ReplaySubject","shareReplay","RefCountObservable","_connectableSubscription","_connection","_source","_subject","ConnectDisposable","_dt","observableinterval","interval","periodOrScheduler","firstArg","DebounceObservable","DebounceObserver","_v","currentId","debounce","TimestampObservable","TimestampObserver","SampleObservable","sampler","_sampler","sourceSubscription","SampleSourceObserver","SamplerObserver","_handleMessage","sample","intervalOrSampler","windowDuration","duration","RangeError","lastOnNext","PausableObservable","pauser","controller","conn","connection","pausable","b","pause","resume","PausableBufferedObservable","drainQueue","previousShouldFire","shouldFire","pausableBuffered","ControlledObservable","enableQueue","ControlledSubject","request","numberOfItems","requestedCount","requestedDisposable","hasFailed","hasCompleted","disposeCurrentRequest","_processRequest","remaining","controlled","pipe","dest","onDrain","write","emit","_isStdio","end","TransduceObserver","xform","_xform","transduce","transducer","__subscribe","AutoDetachObserverPrototype","InnerSubscription","observers","hasError","hasObservers","os","AnonymousSubject","getValue","createRemovableDisposable","so","_trim","Pauser","define","amd"],"mappings":";CAEE,SAAUA,GAOV,QAASC,GAAYC,GACnB,MAAQA,IAASA,EAAMC,SAAWA,OAAUD,EAAQ,KA6CpD,QAASE,GAAWC,GAElB,IAAI,GADAC,GAAMD,EAAIE,OAAQC,EAAI,GAAIC,OAAMH,GAC5BI,EAAI,EAAOJ,EAAJI,EAASA,IAAOF,EAAEE,GAAKL,EAAIK,EAC1C,OAAOF,GAKX,QAASG,GAAcC,GACrB,MAAO,YACL,IACE,MAAOA,GAAeC,MAAMC,KAAMC,WAClC,MAAOC,GAEP,MADAC,IAASD,EAAIA,EACNC,KAUb,QAASC,GAAQF,GACf,KAAMA,GAYR,QAASG,GAAmBC,EAAOC,GAGjC,GAAIC,IACAD,EAAWE,OACM,gBAAVH,IACG,OAAVA,GACAA,EAAMG,OACwC,KAA9CH,EAAMG,MAAMC,QAAQC,IACtB,CAEA,IAAK,GADDC,MACKC,EAAIN,EAAcM,EAAGA,EAAIA,EAAEC,OAC9BD,EAAEJ,OACJG,EAAOG,QAAQF,EAAEJ,MAGrBG,GAAOG,QAAQT,EAAMG,MAErB,IAAIO,GAAiBJ,EAAOK,KAAK,KAAON,GAAuB,KAC/DL,GAAMG,MAAQS,EAAkBF,IAIpC,QAASE,GAAkBC,GAEzB,IAAK,GADDC,GAAQD,EAAYE,MAAM,MAAOC,KAC5B1B,EAAI,EAAGJ,EAAM4B,EAAM3B,OAAYD,EAAJI,EAASA,IAAK,CAChD,GAAI2B,GAAOH,EAAMxB,EAEZ4B,GAAgBD,IAAUE,EAAYF,KAASA,GAClDD,EAAaI,KAAKH,GAGtB,MAAOD,GAAaL,KAAK,MAG3B,QAASO,GAAgBG,GACvB,GAAIC,GAAwBC,EAAyBF,EACrD,KAAKC,EACH,OAAO,CAET,IAAIE,GAAWF,EAAsB,GAAIG,EAAaH,EAAsB,EAE5E,OAAOE,KAAaE,IAClBD,GAAcE,IACAC,IAAdH,EAGJ,QAASN,GAAYE,GACnB,MAA4C,KAArCA,EAAUjB,QAAQ,gBACY,KAAnCiB,EAAUjB,QAAQ,aAGtB,QAASyB,KACP,GAAK3B,GAEL,IACE,KAAM,IAAI4B,OACV,MAAOlC,GACP,GAAIkB,GAAQlB,EAAEO,MAAMY,MAAM,MACtBgB,EAAYjB,EAAM,GAAGV,QAAQ,KAAO,EAAIU,EAAM,GAAKA,EAAM,GACzDQ,EAAwBC,EAAyBQ,EACrD,KAAKT,EAAyB,MAG9B,OADAI,IAAYJ,EAAsB,GAC3BA,EAAsB,IAIjC,QAASC,GAAyBF,GAEhC,GAAIW,GAAW,gCAAgCC,KAAKZ,EACpD,IAAIW,EAAY,OAAQA,EAAS,GAAIE,OAAOF,EAAS,IAGrD,IAAIG,GAAW,4BAA4BF,KAAKZ,EAChD,IAAIc,EAAY,OAAQA,EAAS,GAAID,OAAOC,EAAS,IAGrD,IAAIC,GAAW,iBAAiBH,KAAKZ,EACrC,OAAIe,IAAoBA,EAAS,GAAIF,OAAOE,EAAS,KAArD,OAwLJ,QAASC,GAAaC,EAAQC,EAAOC,EAAWC,EAASC,EAAQC,GAC/D,GAAIC,GAAWC,GAAKP,GAChBQ,EAAYF,EAASzD,OACrB4D,EAAWF,GAAKN,GAChBS,EAAYD,EAAS5D,MAEzB,IAAI2D,IAAcE,IAAcP,EAC9B,OAAO,CAGT,KADA,GAAuBQ,GAAnBC,EAAQJ,EACLI,KAEL,GADAD,EAAML,EAASM,KACTT,EAAUQ,IAAOV,GAAQY,GAAeC,KAAKb,EAAOU,IACxD,OAAO,CAIX,KADA,GAAII,GAAWZ,IACNS,EAAQJ,GAAW,CAC1BG,EAAML,EAASM,EACf,IAEII,GAFAC,EAAWjB,EAAOW,GAClBO,EAAWjB,EAAMU,EAGrB,MAAMK,IAAW1E,EAAY4D,EAAUe,EAAUC,EAAUf,EAASC,EAAQC,GAAUW,GACpF,OAAO,CAETD,KAAaA,EAAmB,gBAARJ,GAE1B,IAAKI,EAAU,CACb,GAAII,GAAUnB,EAAOoB,YACjBC,EAAUpB,EAAMmB,WAEpB,IAAID,IAAYE,GACX,eAAiBrB,IAAU,eAAiBC,MACxB,kBAAZkB,IAA0BA,YAAmBA,IACjC,kBAAZE,IAA0BA,YAAmBA,IACxD,OAAO,EAGX,OAAO,EAGT,QAASC,GAAWtB,EAAQC,EAAOsB,GACjC,OAAQA,GACN,IAAKC,IACL,IAAKC,IACH,OAAQzB,KAAYC,CAEtB,KAAKyB,IACH,MAAO1B,GAAO2B,OAAS1B,EAAM0B,MAAQ3B,EAAO4B,UAAY3B,EAAM2B,OAEhE,KAAKC,IACH,MAAQ7B,MAAYA,EAClBC,KAAWA,EACXD,KAAYC,CAEhB,KAAK6B,IACL,IAAKC,IACH,MAAO/B,KAAYC,EAAQ,GAE/B,OAAO,EAQT,QAAS+B,GAAaxF,GACpB,QAASA,GAA0B,gBAAVA,GAG3B,QAASyF,GAASzF,GAChB,MAAwB,gBAAVA,IAAsBA,EAAQ,IAAMA,EAAQ,IAAM,GAAc0F,IAAT1F,EAcvE,QAAS2F,GAAa3F,GACpB,MAAOwF,GAAaxF,IAAUyF,EAASzF,EAAMK,WAAauF,GAAeC,GAAYvB,KAAKtE,IAO5F,QAAS8F,GAAWC,EAAOC,GAIzB,IAHA,GAAI5B,GAAQ,GACR/D,EAAS0F,EAAM1F,SAEV+D,EAAQ/D,GACf,GAAI2F,EAAUD,EAAM3B,GAAQA,EAAO2B,GACjC,OAAO,CAGX,QAAO,EAGT,QAASE,GAAYF,EAAOtC,EAAOC,EAAWC,EAASC,EAAQC,GAC7D,GAAIO,GAAQ,GACR8B,EAAYH,EAAM1F,OAClB6D,EAAYT,EAAMpD,MAEtB,IAAI6F,IAAchC,KAAeP,GAAWO,EAAYgC,GACtD,OAAO,CAGT,QAAS9B,EAAQ8B,GAAW,CAC1B,GAEI1B,GAFA2B,EAAWJ,EAAM3B,GACjBM,EAAWjB,EAAMW,EAGrB,IAAII,IAAW1E,EAAW,CACxB,GAAI0E,EACF,QAEF,QAAO,EAGT,GAAIb,GACF,IAAKmC,EAAUrC,EAAO,SAASiB,GACzB,MAAOyB,KAAazB,GAAYhB,EAAUyC,EAAUzB,EAAUf,EAASC,EAAQC,KAEnF,OAAO,MAEJ,IAAMsC,IAAazB,IAAYhB,EAAUyC,EAAUzB,EAAUf,EAASC,EAAQC,GACnF,OAAO,EAGX,OAAO,EAGT,QAASuC,GAAgB5C,EAAQC,EAAOC,EAAWC,EAASC,EAAQC,GAClE,GAAIwC,GAAWC,GAAQ9C,GACnB+C,EAAWD,GAAQ7C,GACnB+C,EAASC,GACTC,EAASD,EAERJ,KACHG,EAASX,GAAYvB,KAAKd,GACtBgD,IAAWG,GACbH,EAASI,GACAJ,IAAWI,KACpBP,EAAWV,EAAanC,KAGvB+C,IACHG,EAASb,GAAYvB,KAAKb,GACtBiD,IAAWC,KACbD,EAASE,IAGb,IAAIC,GAAWL,IAAWI,KAAcE,GAAatD,GACjDuD,EAAWL,IAAWE,KAAcE,GAAarD,GACjDuD,EAAYR,IAAWE,CAE3B,IAAIM,IAAeX,IAAYQ,EAC7B,MAAO/B,GAAWtB,EAAQC,EAAO+C,EAEnC,KAAK7C,EAAS,CACZ,GAAIsD,GAAeJ,GAAYxC,GAAeC,KAAKd,EAAQ,eACvD0D,EAAeH,GAAY1C,GAAeC,KAAKb,EAAO,cAE1D,IAAIwD,GAAgBC,EAClB,MAAOxD,GAAUuD,EAAezD,EAAOxD,QAAUwD,EAAQ0D,EAAezD,EAAMzD,QAAUyD,EAAOE,EAASC,EAAQC,GAGpH,IAAKmD,EACH,OAAO,CAITpD,KAAWA,MACXC,IAAWA,KAGX,KADA,GAAIxD,GAASuD,EAAOvD,OACbA,KACL,GAAIuD,EAAOvD,KAAYmD,EACrB,MAAOK,GAAOxD,KAAYoD,CAI9BG,GAAOtB,KAAKkB,GACZK,EAAOvB,KAAKmB,EAEZ,IAAIe,IAAU6B,EAAWJ,EAAc1C,GAAcC,EAAQC,EAAOC,EAAWC,EAASC,EAAQC,EAKhG,OAHAD,GAAOuD,MACPtD,EAAOsD,MAEA3C,EAGT,QAAS4C,GAAYpH,EAAOyD,EAAOE,EAASC,EAAQC,GAClD,MAAI7D,KAAUyD,GACL,EAEI,MAATzD,GAA0B,MAATyD,IAAmB4D,GAASrH,KAAWwF,EAAa/B,GAChEzD,IAAUA,GAASyD,IAAUA,EAE/B2C,EAAgBpG,EAAOyD,EAAO2D,EAAazD,EAASC,EAAQC,GAiCnE,QAASyD,GAAgBC,EAAOC,GAE9B,IAAK,GADDlH,GAAI,GAAIC,OAAMgH,GACT/G,EAAI,EAAO+G,EAAJ/G,EAAWA,IACzBF,EAAEE,GAAKgH,GAET,OAAOlH,GA2tBT,QAASmH,GAAYC,EAAI1H,GACvBY,KAAK8G,GAAKA,EACV9G,KAAKZ,MAAQA,EA6kBf,QAAS2H,GAAqBC,GAC5BhH,KAAKiH,GAAKD,EACVhH,KAAKkH,YAAa,EAoVpB,QAASC,GAAeC,GACtBpH,KAAKiH,GAAKG,EAOZ,QAASC,GAAeD,GACtBpH,KAAKiH,GAAKG,EACVpH,KAAKsH,GAAKF,EAAE3H,OACZO,KAAKuH,GAAK,EAWZ,QAASC,GAAc9H,GACrBM,KAAKyH,GAAK/H,EAOZ,QAASgI,GAAchI,GACrBM,KAAKyH,GAAK/H,EACVM,KAAKsH,GAAKK,EAASjI,GACnBM,KAAKuH,GAAK,EAWZ,QAASK,GAAexI,GACtB,MAAwB,gBAAVA,IAAsByI,GAAKC,SAAS1I,GAOpD,QAAS2I,GAAYlH,GACnB,GAAuBmH,GAAnBpI,EAAIiB,EAAEoH,GACV,KAAKrI,GAAkB,gBAANiB,GAEf,MADAmH,GAAK,GAAIb,GAAetG,GACjBmH,EAAGC,KAEZ,KAAKrI,GAAKiB,EAAEpB,SAAWP,EAErB,MADA8I,GAAK,GAAIR,GAAc3G,GAChBmH,EAAGC,KAEZ,KAAKrI,EAAK,KAAM,IAAIsI,WAAU,yBAC9B,OAAOrH,GAAEoH,MAGX,QAASE,GAAK/I,GACZ,GAAIgJ,IAAUhJ,CACd,OAAe,KAAXgJ,EAAuBA,EACvBC,MAAMD,GAAkBA,EACZ,EAATA,EAAa,GAAK,EAG3B,QAAST,GAAS9G,GAChB,GAAIrB,IAAOqB,EAAEpB,MACb,OAAI4I,OAAM7I,GAAe,EACb,IAARA,GAAcoI,EAAepI,IACjCA,EAAM2I,EAAK3I,GAAO8I,KAAKC,MAAMD,KAAKE,IAAIhJ,IAC3B,GAAPA,EAAmB,EACnBA,EAAMiJ,GAAyBA,GAC5BjJ,GAJyCA,EAyFlD,QAASkJ,GAAcC,EAAWxD,GAEhC,MADAyD,IAAYD,KAAeA,EAAYE,IAChC,GAAIC,IAAoB3D,EAAOwD,GA0HxC,QAASI,GAAWC,EAAUC,GAC5BjJ,KAAKgJ,SAAWA,EAChBhJ,KAAKiJ,OAASA,EA8LhB,QAASC,KAAiB,OAAO,EACjC,QAASC,KAEP,IAAI,GADA3J,GAAMS,UAAUR,OAAQ2J,EAAO,GAAIzJ,OAAMH,GACrCI,EAAI,EAAOJ,EAAJI,EAASA,IAAOwJ,EAAKxJ,GAAKK,UAAUL,EACnD,OAAOwJ,GAkqBT,QAASF,KAAiB,OAAO,EACjC,QAASC,KAEP,IAAI,GADA3J,GAAMS,UAAUR,OAAQ2J,EAAO,GAAIzJ,OAAMH,GACrCI,EAAI,EAAOJ,EAAJI,EAASA,IAAOwJ,EAAKxJ,GAAKK,UAAUL,EACnD,OAAOwJ,GAyGT,QAASF,KAAiB,OAAO,EACjC,QAASG,KAAsB,SA2GjC,QAASH,KAAiB,OAAO,EACjC,QAASG,KAAsB,SAC/B,QAASF,KAEP,IAAI,GADA3J,GAAMS,UAAUR,OAAQ2J,EAAO,GAAIzJ,OAAMH,GACrCI,EAAI,EAAOJ,EAAJI,EAASA,IAAOwJ,EAAKxJ,GAAKK,UAAUL,EACnD,OAAOwJ,GA4FP,QAASE,GAAaxI,GACpB,MAAO,UAAmBD,GAAK,MAAOC,GAAOyI,UAAU1I,IAkWzD,QAAS2I,GAAOpK,GACd,OACEqK,aAAc,WACZ,OACEC,KAAM,WACJ,OAASC,MAAM,EAAOvK,MAAOA,OAoFvC,QAASoK,GAAOpK,GACd,OACEqK,aAAc,WACZ,OACEC,KAAM,WACJ,OAASC,MAAM,EAAOvK,MAAOA,OAgVvC,QAASwK,GAAQR,EAAM5J,GACrB,MAAO,UAAgBqK,GAErB,IAAK,GADDC,GAAcD,EACTjK,EAAI,EAAOJ,EAAJI,EAASA,IAAK,CAC5B,GAAImK,GAAID,EAAYV,EAAKxJ,GACzB,IAAiB,mBAANmK,GAGT,MAAO7K,EAFP4K,GAAcC,EAKlB,MAAOD,IA4Rb,QAASE,GAAmBC,EAAIC,EAAKC,EAAUf,GAC7C,GAAIvI,GAAI,GAAIuJ,GAKZ,OAHAhB,GAAK1H,KAAK2I,EAAgBxJ,EAAGqJ,EAAKC,IAClCF,EAAGlK,MAAMmK,EAAKd,GAEPvI,EAAEyI,eAGX,QAASe,GAAgBxJ,EAAGqJ,EAAKC,GAC/B,MAAO,YAEL,IAAI,GADA3K,GAAMS,UAAUR,OAAQ6K,EAAU,GAAI3K,OAAMH,GACxCI,EAAI,EAAOJ,EAAJI,EAASA,IAAO0K,EAAQ1K,GAAKK,UAAUL,EAEtD,IAAI2K,GAAWJ,GAAW,CAExB,GADAG,EAAUE,GAASL,GAAUpK,MAAMmK,EAAKI,GACpCA,IAAYnK,GAAY,MAAOU,GAAE4J,QAAQH,EAAQpK,EACrDW,GAAE6J,OAAOJ,OAELA,GAAQ7K,QAAU,EACpBoB,EAAE6J,OAAOJ,EAAQ,IAEjBzJ,EAAE6J,OAAOJ,EAIbzJ,GAAE8J,eAsBN,QAASC,GAAqBX,EAAIC,EAAKC,EAAUf,GAC/C,GAAIvI,GAAI,GAAIuJ,GAKZ,OAHAhB,GAAK1H,KAAKmJ,EAAkBhK,EAAGqJ,EAAKC,IACpCF,EAAGlK,MAAMmK,EAAKd,GAEPvI,EAAEyI,eAGX,QAASuB,GAAkBhK,EAAGqJ,EAAKC,GACjC,MAAO,YACL,GAAIW,GAAM7K,UAAU,EACpB,IAAI6K,EAAO,MAAOjK,GAAE4J,QAAQK,EAG5B,KAAI,GADAtL,GAAMS,UAAUR,OAAQ6K,KACpB1K,EAAI,EAAOJ,EAAJI,EAASA,IAAO0K,EAAQ1K,EAAI,GAAKK,UAAUL,EAE1D,IAAI2K,GAAWJ,GAAW,CACxB,GAAIG,GAAUE,GAASL,GAAUpK,MAAMmK,EAAKI,EAC5C,IAAIA,IAAYnK,GAAY,MAAOU,GAAE4J,QAAQH,EAAQpK,EACrDW,GAAE6J,OAAOJ,OAELA,GAAQ7K,QAAU,EACpBoB,EAAE6J,OAAOJ,EAAQ,IAEjBzJ,EAAE6J,OAAOJ,EAIbzJ,GAAE8J,eAoBJ,QAASI,GAAWC,GAClB,MAAInD,IAAKoD,eAGAD,YAAcnD,IAAKoD,gBAAkBD,YAAcnD,IAAKqD,SAEjB,sBAAvC7L,OAAO8L,UAAUC,SAAS1H,KAAKsH,GAI1C,QAASK,GAAiBnL,EAAGoL,EAAGrB,GAC9BjK,KAAKuL,GAAKrL,EACVF,KAAKwL,GAAKF,EACVtL,KAAKyL,IAAMxB,EACXjK,KAAKuL,GAAGG,iBAAiB1L,KAAKwL,GAAIxL,KAAKyL,KAAK,GAC5CzL,KAAKkH,YAAa,EASpB,QAASyE,GAAqBX,EAAIY,EAAWC,GAC3C,GAAIC,GAAc,GAAIC,IAGlBC,EAAe3M,OAAO8L,UAAUC,SAAS1H,KAAKsH,EAClD,IAAID,EAAWC,IAAwB,4BAAjBgB,EACpB,IAAK,GAAIpM,GAAI,EAAGJ,EAAMwL,EAAGvL,OAAYD,EAAJI,EAASA,IACxCkM,EAAYG,IAAIN,EAAoBX,EAAGkB,KAAKtM,GAAIgM,EAAWC,QAEpDb,IACTc,EAAYG,IAAI,GAAIZ,GAAiBL,EAAIY,EAAWC,GAGtD,OAAOC,GAocT,QAASK,GAAiBC,EAASzD,GACjC,MAAO,IAAI0D,IAAgBD,EAASzD,GAGtC,QAAS2D,GAA6BF,EAASG,EAAQ5D,GACrD,MAAO,IAAI6D,IAAoB,SAAUxD,GACvC,GAAIyD,GAAIL,EAASrC,EAAI2C,GAAcH,EACnC,OAAO5D,GAAUgE,wBAAwB,EAAGF,EAAG,SAAU9F,EAAOiG,GAC9D,GAAI7C,EAAI,EAAG,CACT,GAAI8C,GAAMlE,EAAUkE,KACpBJ,GAAI,GAAIK,MAAKL,EAAEM,UAAYhD,GAC3B0C,EAAEM,WAAaF,IAAQJ,EAAI,GAAIK,MAAKD,EAAM9C,IAE5Cf,EAAS0B,OAAO/D,GAChBiG,EAAKjG,EAAQ,EAAG,GAAImG,MAAKL,QAK/B,QAASO,GAAiCZ,EAASG,EAAQ5D,GACzD,MAAOyD,KAAYG,EACjB,GAAIC,IAAoB,SAAUxD,GAChC,MAAOL,GAAUsE,iBAAiB,EAAGV,EAAQ,SAAU5F,GAErD,MADAqC,GAAS0B,OAAO/D,GACTA,EAAQ,MAGnBuG,GAAgB,WACd,MAAOZ,GAA6B,GAAIQ,MAAKnE,EAAUkE,MAAQT,GAAUG,EAAQ5D,KA2CvF,QAASwE,GAAwBrM,EAAQsL,EAASzD,GAChD,MAAO,IAAI6D,IAAoB,SAAU3L,GACvC,GAKEuM,GALEC,GAAS,EACXC,EAAa,GAAIC,IACjBC,EAAY,KACZC,KACAC,GAAU,CAsDZ,OApDAN,GAAetM,EAAO6M,cAAcC,UAAUjF,GAAWY,UAAU,SAAUsE,GAC3E,GAAIpB,GAAGqB,CACyB,OAA5BD,EAAazO,MAAM2O,MACrBN,KACAA,EAAE/L,KAAKmM,GACPL,EAAYK,EAAazO,MAAMkB,MAC/BwN,GAAaJ,IAEbD,EAAE/L,MAAOtC,MAAOyO,EAAazO,MAAOwO,UAAWC,EAAaD,UAAYxB,IACxE0B,GAAaT,EACbA,GAAS,GAEPS,IACgB,OAAdN,EACF3M,EAAE4J,QAAQ+C,IAEVf,EAAI,GAAIuB,IACRV,EAAWW,cAAcxB,GACzBA,EAAEwB,cAActF,EAAUgE,wBAAwB,KAAMP,EAAS,SAAU8B,EAAGtB,GAC5E,GAAI1M,GAAGiO,EAAgBvK,EAAQwK,CAC/B,IAAkB,OAAdZ,EAAJ,CAGAE,GAAU,CACV,GACE9J,GAAS,KACL6J,EAAEhO,OAAS,GAAKgO,EAAE,GAAGG,UAAYjF,EAAUkE,OAAS,IACtDjJ,EAAS6J,EAAEY,QAAQjP,OAEN,OAAXwE,GACFA,EAAO0K,OAAOzN,SAEE,OAAX+C,EACTwK,IAAgB,EAChBD,EAAiB,EACbV,EAAEhO,OAAS,GACb2O,GAAgB,EAChBD,EAAiB7F,KAAKiG,IAAI,EAAGd,EAAE,GAAGG,UAAYjF,EAAUkE,QAExDQ,GAAS,EAEXnN,EAAIsN,EACJE,GAAU,EACA,OAANxN,EACFW,EAAE4J,QAAQvK,GACDkO,GACTxB,EAAK,KAAMuB,WAMd,GAAIK,IAAiBpB,EAAcE,IACzCxM,GAGL,QAAS2N,GAAwB3N,EAAQsL,EAASzD,GAChD,MAAOuE,IAAgB,WACrB,MAAOC,GAAwBrM,EAAQsL,EAAUzD,EAAUkE,MAAOlE,KAItE,QAAS+F,GAAkB5N,EAAQ6N,EAAmBC,GACpD,GAAIC,GAAU1E,CAOd,OANII,IAAWoE,GACbxE,EAAWwE,GAEXE,EAAWF,EACXxE,EAAWyE,GAEN,GAAIpC,IAAoB,SAAU3L,GAGvC,QAASiO,KACP1B,EAAaa,cAAcnN,EAAOyI,UAChC,SAAUM,GACR,GAAIkF,GAAQvE,GAASL,GAAUN,EAC/B,IAAIkF,IAAU5O,GAAY,MAAOU,GAAE4J,QAAQsE,EAAM7O,EACjD,IAAIuM,GAAI,GAAIuB,GACZgB,GAAO/C,IAAIQ,GACXA,EAAEwB,cAAcc,EAAMxF,UACpB,WACE1I,EAAE6J,OAAOb,GACTmF,EAAOC,OAAOxC,GACd9C,KAEF,SAAUzJ,GAAKW,EAAE4J,QAAQvK,IACzB,WACEW,EAAE6J,OAAOb,GACTmF,EAAOC,OAAOxC,GACd9C,QAIN,SAAUzJ,GAAKW,EAAE4J,QAAQvK,IACzB,WACEgP,GAAQ,EACR9B,EAAa+B,UACbxF,OAKN,QAASA,KACPuF,GAA2B,IAAlBF,EAAOvP,QAAgBoB,EAAE8J,cAjCpC,GAAIqE,GAAS,GAAIjD,IAAuBmD,GAAQ,EAAO9B,EAAe,GAAIG,GA0C1E,OANKsB,GAGHzB,EAAaa,cAAcY,EAAStF,UAAUuF,EAAO,SAAU5O,GAAKW,EAAE4J,QAAQvK,IAAO4O,IAFrFA,IAKK,GAAIN,IAAiBpB,EAAc4B,IACzClO,GA6FL,QAASsO,GAAqBtO,EAAQuO,GACpC,MAAO,IAAI7C,IAAoB,SAAU3L,GACvC,GAAIzB,GAAOkQ,GAAW,EAAOhC,EAAa,GAAIC,IAAoBzG,EAAK,EACnEsG,EAAetM,EAAOyI,UACxB,SAAUM,GACR,GAAI0F,GAAW/E,GAAS6E,GAAkBxF,EAC1C,IAAI0F,IAAapP,GAAY,MAAOU,GAAE4J,QAAQ8E,EAASrP,EAEvDsP,IAAUD,KAAcA,EAAWE,GAAsBF,IAEzDD,GAAW,EACXlQ,EAAQyK,EACR/C,GACA,IAAI4I,GAAY5I,EAAI2F,EAAI,GAAIuB,GAC5BV,GAAWW,cAAcxB,GACzBA,EAAEwB,cAAcsB,EAAShG,UACvB,WACE+F,GAAYxI,IAAO4I,GAAa7O,EAAE6J,OAAOtL,GACzCkQ,GAAW,EACX7C,EAAE0C,WAEJ,SAAUjP,GAAKW,EAAE4J,QAAQvK,IACzB,WACEoP,GAAYxI,IAAO4I,GAAa7O,EAAE6J,OAAOtL,GACzCkQ,GAAW,EACX7C,EAAE0C,cAIR,SAAUjP,GACRoN,EAAW6B,UACXtO,EAAE4J,QAAQvK,GACVoP,GAAW,EACXxI,KAEF,WACEwG,EAAW6B,UACXG,GAAYzO,EAAE6J,OAAOtL,GACrByB,EAAE8J,cACF2E,GAAW,EACXxI,KAGJ,OAAO,IAAI0H,IAAiBpB,EAAcE,IACzCxM,GAiKL,QAAS6O,GAAoB7O,EAAQ8O,EAAcC,EAAyBhN,GAO1E,MANI0H,IAAWqF,KACb/M,EAAQgN,EACRA,EAA0BD,EAC1BA,EAAeE,MAEjBC,GAAWC,aAAanN,KAAWA,EAAQoN,GAAgB,GAAIC,MACxD,GAAI1D,IAAoB,SAAU3L,GASvC,QAASsP,GAASC,GAGhB,QAASC,KAEP,MADAC,GAAYC,IAASzJ,EAHvB,GAAIyJ,GAAOzJ,EAAI2F,EAAI,GAAIuB,GAOvBwC,GAAMvC,cAAcxB,GACpBA,EAAEwB,cAAcmC,EAAQ7G,UAAU,WAChC8G,KAAejD,EAAaa,cAAcpL,EAAM0G,UAAU1I,IAC1D4L,EAAE0C,WACD,SAAUjP,GACXmQ,KAAexP,EAAE4J,QAAQvK,IACxB,WACDmQ,KAAejD,EAAaa,cAAcpL,EAAM0G,UAAU1I,OAM9D,QAAS4P,KACP,GAAIC,IAAOJ,CAEX,OADII,IAAO5J,IACJ4J,EAhCT,GAAItD,GAAe,GAAIG,IACrBiD,EAAQ,GAAIjD,IACZoD,EAAW,GAAI3C,GAEjBZ,GAAaa,cAAc0C,EAE3B,IAAI7J,GAAK,EAAGwJ,GAAW,CAyCvB,OApBAH,GAASP,GAQTe,EAAS1C,cAAcnN,EAAOyI,UAAU,SAAUM,GAChD,GAAI4G,IAAS,CACX5P,EAAE6J,OAAOb,EACT,IAAIuG,GAAU5F,GAASqF,GAAyBhG,EAChD,IAAIuG,IAAYjQ,GAAY,MAAOU,GAAE4J,QAAQ2F,EAAQlQ,EACrDiQ,GAASX,GAAUY,GAAWX,GAAsBW,GAAWA,KAEhE,SAAUlQ,GACXuQ,KAAW5P,EAAE4J,QAAQvK,IACpB,WACDuQ,KAAW5P,EAAE8J,iBAER,GAAI6D,IAAiBpB,EAAcoD,IACzC1P,GAGL,QAASsP,IAAQtP,EAAQsL,EAASvJ,EAAO8F,GAQvC,MAPIC,IAAY/F,KACd8F,EAAY9F,EACZA,EAAQoN,GAAgB,GAAIC,MAE1BrN,YAAiBT,SAASS,EAAQoN,GAAgBpN,IACtD+F,GAAYD,KAAeA,EAAYiI,IACvCb,GAAWC,aAAanN,KAAWA,EAAQoN,GAAgB,GAAIC,MACxD,GAAI1D,IAAoB,SAAU3L,GASvC,QAASgQ,KACP,GAAIN,GAAOzJ,CACX0J,GAAMvC,cAActF,EAAUmI,eAAe,KAAM1E,EAAS,WAC1DkE,EAAWxJ,IAAOyJ,EACdD,IACFd,GAAU3M,KAAWA,EAAQ4M,GAAsB5M,IACnDuK,EAAaa,cAAcpL,EAAM0G,UAAU1I,QAdjD,GAAIiG,GAAK,EACP6J,EAAW,GAAI3C,IACfZ,EAAe,GAAIG,IACnB+C,GAAW,EACXE,EAAQ,GAAIjD,GAkCd,OAhCAH,GAAaa,cAAc0C,GAa3BE,IAEAF,EAAS1C,cAAcnN,EAAOyI,UAAU,SAAUM,GAC3CyG,IACHxJ,IACAjG,EAAE6J,OAAOb,GACTgH,MAED,SAAU3Q,GACNoQ,IACHxJ,IACAjG,EAAE4J,QAAQvK,KAEX,WACIoQ,IACHxJ,IACAjG,EAAE8J,kBAGC,GAAI6D,IAAiBpB,EAAcoD,IACzC1P,GA+FL,QAASiQ,IAAoBjQ,EAAQkQ,EAASC,GAC5C,MAAO,IAAIzE,IAAoB,SAAU3L,GAOvC,QAAS6I,GAAKG,EAAGjK,GAGf,GAFAsR,EAAOtR,GAAKiK,EACZyF,EAAS1P,IAAK,EACVuR,IAAgBA,EAAc7B,EAAS8B,MAAMC,KAAY,CAC3D,GAAIvG,EAAO,MAAOjK,GAAE4J,QAAQK,EAC5B,IAAI4F,GAAMlG,GAASyG,GAAgBlR,MAAM,KAAMmR,EAC/C,IAAIR,IAAQvQ,GAAY,MAAOU,GAAE4J,QAAQiG,EAAIxQ,EAC7CW,GAAE6J,OAAOgG,GAEXY,GAAUJ,EAAO,IAAMrQ,EAAE8J,cAf3B,GAIEG,GAJEwE,IAAY,GAAO,GACrB6B,GAAc,EACdG,GAAS,EACTJ,EAAS,GAAIvR,OAAM,EAerB,OAAO,IAAI6O,IACT1N,EAAOyI,UACL,SAAUM,GACRH,EAAKG,EAAG,IAEV,SAAU3J,GACJgR,EAAO,GACTrQ,EAAE4J,QAAQvK,GAEV4K,EAAM5K,GAGV,WACEoR,GAAS,EACTJ,EAAO,IAAMrQ,EAAE8J,gBAEnBqG,EAAQzH,UACN,SAAUM,GACRH,EAAKG,EAAG,IAEV,SAAU3J,GAAKW,EAAE4J,QAAQvK,IACzB,WACEoR,GAAS,EACT5H,GAAK,EAAM,OAGhB5I,GAkRL,QAASyQ,IAAqB1Q,GAC5B,OACE2Q,oBAAqB,WACnB,MAAO3Q,IAET4Q,oBAAqB,SAASC,EAAKC,GACjC,MAAOD,GAAIhH,OAAOiH,IAEpBC,sBAAuB,SAASF,GAC9B,MAAOA,GAAI/G,gBAvxMjB,GAAIkH,KACFC,YAAY,EACZlP,QAAU,GAORmP,GAAeF,SAAmBG,WAAYA,UAAYA,QAAQC,SAAYD,QAAU,KACxFE,GAAcL,SAAmBM,UAAWA,SAAWA,OAAOF,SAAYE,OAAS,KACnFC,GAAajT,EAAY4S,IAAeG,IAAgC,gBAAXG,SAAuBA,QACpFC,GAAWnT,EAAY0S,SAAmBjF,QAASA,MACnD2F,GAAapT,EAAY0S,SAAmBW,UAAWA,QACvDC,GAAiBP,IAAcA,GAAWF,UAAYD,GAAeA,GAAc,KACnFW,GAAavT,EAAY0S,SAAmB7R,QAASA,MACrD6H,GAAOuK,IAAgBG,MAAgBG,IAAcA,GAAWF,SAAYD,IAAeD,IAAYI,IAAcC,SAAS,iBAE9HC,IACFC,aACAC,QACEC,QAASlL,GAAKkL,SAEhBC,YAIEC,GAAOL,GAAGI,QAAQC,KAAO,aAC3B5B,GAAWuB,GAAGI,QAAQ3B,SAAW,SAAUxH,GAAK,MAAOA,IACvDqJ,GAAaN,GAAGI,QAAQE,WAAapG,KAAKD,IAC1CsG,GAAkBP,GAAGI,QAAQG,gBAAkB,SAAUtJ,EAAGuJ,GAAK,MAAOC,IAAQxJ,EAAGuJ,IACnFE,GAAqBV,GAAGI,QAAQM,mBAAqB,SAAUzJ,EAAGuJ,GAAK,MAAOvJ,GAAIuJ,EAAI,EAASA,EAAJvJ,EAAQ,GAAK,GAExG0J,IADuBX,GAAGI,QAAQQ,qBAAuB,SAAU3J,GAAK,MAAOA,GAAEuB,YAClEwH,GAAGI,QAAQO,aAAe,SAAUzI,GAAO,KAAMA,KAChE0E,GAAYoD,GAAGI,QAAQxD,UAAY,SAAUzF,GAAK,QAASA,GAA4B,kBAAhBA,GAAER,WAA8C,kBAAXQ,GAAE0J,MAC9GlJ,GAAaqI,GAAGI,QAAQzI,WAAc,WAEpC,GAAImJ,GAAO,SAAUtU,GACnB,MAAuB,kBAATA,KAAuB,EAUvC,OANIsU,GAAK,OACPA,EAAO,SAAStU,GACd,MAAuB,kBAATA,IAA+C,qBAAxBgM,SAAS1H,KAAKtE,KAIhDsU,KASPvT,IAAYD,MAaZsK,GAAWoI,GAAGC,UAAUrI,SAAW,SAAkBP,GACvD,IAAKM,GAAWN,GAAO,KAAM,IAAI/B,WAAU,wBAC3C,OAAOrI,GAAcoK,GAOvB2I,IAAGE,OAAOa,kBAAmB,CAC7B,IAAInT,KAAY,EAAOI,GAAS4J,GAAS,WAAc,KAAM,IAAIpI,UACjE5B,MAAcI,GAAOV,KAAOU,GAAOV,EAAEO,KAGrC,IAAmCuB,IAA/BC,GAAgBE,IAEhBxB,GAAuB,uBAoFvBiT,GAAahB,GAAGgB,WAAa,WAC/B5T,KAAKwE,QAAU,iCACfpC,MAAMsB,KAAK1D,MAEb4T,IAAWzI,UAAY9L,OAAOwU,OAAOzR,MAAM+I,WAC3CyI,GAAWzI,UAAU5G,KAAO,YAE5B,IAAIuP,IAAsBlB,GAAGkB,oBAAsB,WACjD9T,KAAKwE,QAAU,2BACfpC,MAAMsB,KAAK1D,MAEb8T,IAAoB3I,UAAY9L,OAAOwU,OAAOzR,MAAM+I,WACpD2I,GAAoB3I,UAAU5G,KAAO,qBAErC,IAAIwP,IAA0BnB,GAAGmB,wBAA0B,WACzD/T,KAAKwE,QAAU,wBACfpC,MAAMsB,KAAK1D,MAEb+T,IAAwB5I,UAAY9L,OAAOwU,OAAOzR,MAAM+I,WACxD4I,GAAwB5I,UAAU5G,KAAO,yBAEzC,IAAIyP,IAAoBpB,GAAGoB,kBAAoB,SAAUxP,GACvDxE,KAAKwE,QAAUA,GAAW,kCAC1BpC,MAAMsB,KAAK1D,MAEbgU,IAAkB7I,UAAY9L,OAAOwU,OAAOzR,MAAM+I,WAClD6I,GAAkB7I,UAAU5G,KAAO,mBAEnC,IAAI0P,IAAsBrB,GAAGqB,oBAAsB,SAAUzP,GAC3DxE,KAAKwE,QAAUA,GAAW,oCAC1BpC,MAAMsB,KAAK1D,MAEbiU,IAAoB9I,UAAY9L,OAAOwU,OAAOzR,MAAM+I,WACpD8I,GAAoB9I,UAAU5G,KAAO,qBAErC,IAAI2P,IAAiBtB,GAAGI,QAAQkB,eAAiB,WAC/C,KAAM,IAAID,KAQRhM,IALe2K,GAAGI,QAAQmB,aAAe,WAC3C,KAAM,IAAIH,KAIwB,kBAAXI,SAAyBA,OAAOC,UACvD,qBAEExM,IAAKyM,KAA+C,mBAAjC,GAAIzM,IAAKyM,KAAM,gBACpCrM,GAAa,aAGf,IAAIsM,IAAiB3B,GAAG2B,gBAAmB5K,MAAM,EAAMvK,MAAOF,GAE1DsV,GAAa5B,GAAGI,QAAQwB,WAAa,SAAU3T,GACjD,MAAOA,IAAKA,EAAEoH,MAAgB/I,GAG5BuV,GAAc7B,GAAGI,QAAQyB,YAAc,SAAU5T,GACnD,MAAOA,IAAKA,EAAEpB,SAAWP,EAG3B0T,IAAGI,QAAQqB,SAAWpM,EAEtB,IAAIyM,IAAe9B,GAAGC,UAAU6B,aAAe,SAAUC,EAAMC,EAASC,GACtE,GAAuB,mBAAZD,GAA2B,MAAOD,EAC7C,QAAOE,GACL,IAAK,GACH,MAAO,YACL,MAAOF,GAAKjR,KAAKkR,GAErB,KAAK,GACH,MAAO,UAASE,GACd,MAAOH,GAAKjR,KAAKkR,EAASE,GAE9B,KAAK,GACH,MAAO,UAAS1V,EAAOoE,GACrB,MAAOmR,GAAKjR,KAAKkR,EAASxV,EAAOoE,GAErC,KAAK,GACH,MAAO,UAASpE,EAAOoE,EAAOuR,GAC5B,MAAOJ,GAAKjR,KAAKkR,EAASxV,EAAOoE,EAAOuR,IAI9C,MAAO,YACL,MAAOJ,GAAK5U,MAAM6U,EAAS3U,aAK3B+U,IAAa,WACf,iBACA,UACA,iBACA,gBACA,uBACA,eAGAjP,IAFgBiP,GAAUvV,OAEhB,sBACVoG,GAAW,iBACXzB,GAAU,mBACVC,GAAU,gBACVC,GAAW,iBACX2Q,GAAU,oBACVC,GAAS,eACTzQ,GAAY,kBACZuB,GAAY,kBACZtB,GAAY,kBACZyQ,GAAS,eACTxQ,GAAY,kBACZyQ,GAAa,mBAEbC,GAAiB,uBACjBC,GAAa,wBACbC,GAAa,wBACbC,GAAU,qBACVC,GAAW,sBACXC,GAAW,sBACXC,GAAW,sBACXC,GAAkB,6BAClBC,GAAY,uBACZC,GAAY,uBAEZ9Q,KACJA,IAAesQ,IAActQ,GAAeuQ,IAC5CvQ,GAAewQ,IAAWxQ,GAAeyQ,IACzCzQ,GAAe0Q,IAAY1Q,GAAe2Q,IAC1C3Q,GAAe4Q,IAAmB5Q,GAAe6Q,IACjD7Q,GAAe8Q,KAAa,EAC5B9Q,GAAee,IAAWf,GAAea,IACzCb,GAAeqQ,IAAkBrQ,GAAeZ,IAChDY,GAAeX,IAAWW,GAAeV,IACzCU,GAAeiQ,IAAWjQ,GAAekQ,IACzClQ,GAAeP,IAAaO,GAAegB,IAC3ChB,GAAeN,IAAaM,GAAemQ,IAC3CnQ,GAAeL,IAAaK,GAAeoQ,KAAc,CAEzD,IAAIW,IAAc1W,OAAO8L,UACrB1H,GAAiBsS,GAAYtS,eAC7BwB,GAAc8Q,GAAY3K,SAC1BtG,GAAmBwD,KAAK0N,IAAI,EAAG,IAAM,EAErC7S,GAAO9D,OAAO8D,MAAS,WACvB,GAAIM,GAAiBpE,OAAO8L,UAAU1H,eAClCwS,IAAqB7K,SAAU,MAAQ8K,qBAAqB,YAC5DlB,GACE,WACA,iBACA,UACA,iBACA,gBACA,uBACA,eAEFmB,EAAkBnB,EAAUvV,MAEhC,OAAO,UAAS2W,GACd,GAAmB,gBAARA,KAAoC,kBAARA,IAA8B,OAARA,GAC3D,KAAM,IAAIlO,WAAU,mCAGtB,IAAiBmO,GAAMzW,EAAnBgE,IAEJ,KAAKyS,IAAQD,GACP3S,EAAeC,KAAK0S,EAAKC,IAC3BzS,EAAOlC,KAAK2U,EAIhB,IAAIJ,EACF,IAAKrW,EAAI,EAAOuW,EAAJvW,EAAqBA,IAC3B6D,EAAeC,KAAK0S,EAAKpB,EAAUpV,KACrCgE,EAAOlC,KAAKsT,EAAUpV,GAI5B,OAAOgE,OAmET6C,GAAWmM,GAAGC,UAAUpM,SAAW,SAASrH,GAC9C,GAAIkX,SAAclX,EAClB,SAASA,IAAmB,WAATkX,GAA8B,aAATA,IAWtCpQ,GAAgB,WAClB,IACE7G,QAAS+L,SAAY,GAAM,IAC3B,MAAMlL,GACN,MAAO,YAAa,OAAO,GAE7B,MAAO,UAASd,GACd,MAAiC,kBAAnBA,GAAMgM,UAAmD,iBAAhBhM,EAAQ,QAQ/DsG,GAAU/F,MAAM+F,SAAW,SAAStG,GACtC,MAAOwF,GAAaxF,IAAUyF,EAASzF,EAAMK,SAAWwF,GAAYvB,KAAKtE,KAAWyG,IAwHlFwN,GAAUT,GAAGC,UAAUQ,QAAU,SAAUjU,EAAOyD,GACpD,MAAO2D,GAAYpH,EAAOyD,IAMtB0T,OAHa9S,eACL9D,MAAMwL,UAAUqL,MAEb5D,GAAGC,UAAU0D,SAAW,SAAUE,EAAOxN,GACtD,QAASyN,KAAO1W,KAAKgE,YAAcyS,EACnCC,EAAGvL,UAAYlC,EAAOkC,UACtBsL,EAAMtL,UAAY,GAAIuL,KAGpBC,GAAgB/D,GAAGC,UAAU8D,cAAgB,SAAUP,GACzD,IAAI,GAAIQ,MAAchX,EAAI,EAAGJ,EAAMS,UAAUR,OAAYD,EAAJI,EAASA,IAAOgX,EAAQlV,KAAKzB,UAAUL,GAC5F,KAAK,GAAIiX,GAAM,EAAGC,EAAKF,EAAQnX,OAAcqX,EAAND,EAAUA,IAAO,CACtD,GAAI/V,GAAS8V,EAAQC,EACrB,KAAK,GAAIR,KAAQvV,GACfsV,EAAIC,GAAQvV,EAAOuV,KAwBrBtK,IAlBS6G,GAAGC,UAAUkE,OAAS,SAAUC,EAAIC,GAC/C,MAAO,IAAIzK,IAAoB,SAAUxD,GACvC,MAAO,IAAIwF,IAAiByI,EAAEC,gBAAiBF,EAAGzN,UAAUP,OAgBtC4J,GAAG7G,oBAAsB,WACjD,GAAenM,GAAGJ,EAAd4J,IACJ,IAAIzJ,MAAM+F,QAAQzF,UAAU,IAC1BmJ,EAAOnJ,UAAU,OAIjB,KAFAT,EAAMS,UAAUR,OAChB2J,EAAO,GAAIzJ,OAAMH,GACbI,EAAI,EAAOJ,EAAJI,EAASA,IAAOwJ,EAAKxJ,GAAKK,UAAUL,EAEjDI,MAAK8L,YAAc1C,EACnBpJ,KAAKkH,YAAa,EAClBlH,KAAKP,OAAS2J,EAAK3J,SAGjB0X,GAA+BpL,GAAoBZ,SAMvDgM,IAA6BlL,IAAM,SAAUC,GACvClM,KAAKkH,WACPgF,EAAKiD,WAELnP,KAAK8L,YAAYpK,KAAKwK,GACtBlM,KAAKP,WAST0X,GAA6BlI,OAAS,SAAU/C,GAC9C,GAAIkL,IAAgB,CACpB,KAAKpX,KAAKkH,WAAY,CACpB,GAAI2P,GAAM7W,KAAK8L,YAAYpL,QAAQwL,EACvB,MAAR2K,IACFO,GAAgB,EAChBpX,KAAK8L,YAAYuL,OAAOR,EAAK,GAC7B7W,KAAKP,SACLyM,EAAKiD,WAGT,MAAOiI,IAMTD,GAA6BhI,QAAU,WACrC,IAAKnP,KAAKkH,WAAY,CACpBlH,KAAKkH,YAAa,CAElB,KAAI,GADA1H,GAAMQ,KAAK8L,YAAYrM,OAAQ6X,EAAqB,GAAI3X,OAAMH,GAC1DI,EAAI,EAAOJ,EAAJI,EAASA,IAAO0X,EAAmB1X,GAAKI,KAAK8L,YAAYlM,EAIxE,KAHAI,KAAK8L,eACL9L,KAAKP,OAAS,EAETG,EAAI,EAAOJ,EAAJI,EAASA,IACnB0X,EAAmB1X,GAAGuP,WAS5B,IAAIoI,IAAa3E,GAAG2E,WAAa,SAAUC,GACzCxX,KAAKkH,YAAa,EAClBlH,KAAKwX,OAASA,GAAUvE,GAI1BsE,IAAWpM,UAAUgE,QAAU,WACxBnP,KAAKkH,aACRlH,KAAKwX,SACLxX,KAAKkH,YAAa,GAStB,IAAIuQ,IAAmBF,GAAW1D,OAAS,SAAU2D,GAAU,MAAO,IAAID,IAAWC,IAKjFE,GAAkBH,GAAWI,OAAUxI,QAAS8D,IAOhD2E,GAAeL,GAAWK,aAAe,SAAUnL,GACrD,MAAOA,IAAKlC,GAAWkC,EAAE0C,UAGvB0I,GAAgBN,GAAWM,cAAgB,SAAUC,GACvD,GAAIA,EAAW5Q,WAAc,KAAM,IAAI4M,KAGrCiE,GAAkBR,GAAWS,OAAS,SAAUpU,GAClD,MAAOgU,IAAahU,GAAUA,EAAS8T,IAIrC1J,GAA6B4E,GAAG5E,2BAA6B,WAC/DhO,KAAKkH,YAAa,EAClBlH,KAAKiY,QAAU,KAEjBjK,IAA2B7C,UAAU+L,cAAgB,WACnD,MAAOlX,MAAKiY,SAEdjK,GAA2B7C,UAAU8C,cAAgB,SAAU7O,GAC7D,GAAIY,KAAKiY,QAAW,KAAM,IAAI7V,OAAM,uCACpC,IAAIgV,GAAgBpX,KAAKkH,YACxBkQ,IAAkBpX,KAAKiY,QAAU7Y,GAClCgY,GAAiBhY,GAASA,EAAM+P,WAElCnB,GAA2B7C,UAAUgE,QAAU,WAC7C,IAAKnP,KAAKkH,WAAY,CACpBlH,KAAKkH,YAAa,CAClB,IAAIgR,GAAMlY,KAAKiY,OACfjY,MAAKiY,QAAU,KACfC,GAAOA,EAAI/I,WAKf,IAAI5B,IAAmBqF,GAAGrF,iBAAmB,WAC3CvN,KAAKkH,YAAa,EAClBlH,KAAKiY,QAAU,KAEjB1K,IAAiBpC,UAAU+L,cAAgB,WACzC,MAAOlX,MAAKiY,SAEd1K,GAAiBpC,UAAU8C,cAAgB,SAAU7O,GACnD,GAAIgY,GAAgBpX,KAAKkH,UACzB,KAAKkQ,EAAe,CAClB,GAAIc,GAAMlY,KAAKiY,OACfjY,MAAKiY,QAAU7Y,EAEjB8Y,GAAOA,EAAI/I,UACXiI,GAAiBhY,GAASA,EAAM+P,WAElC5B,GAAiBpC,UAAUgE,QAAU,WACnC,IAAKnP,KAAKkH,WAAY,CACpBlH,KAAKkH,YAAa,CAClB,IAAIgR,GAAMlY,KAAKiY,OACfjY,MAAKiY,QAAU,KAEjBC,GAAOA,EAAI/I,UAGb,IAAIX,IAAmBoE,GAAGpE,iBAAmB,SAAU2J,EAAOC,GAC5DpY,KAAKqY,OAASF,EACdnY,KAAKsY,QAAUF,EACfpY,KAAKkH,YAAa,EAGpBsH,IAAiBrD,UAAUgE,QAAU,WACnC,IAAKnP,KAAKkH,WAAY,CACpBlH,KAAKkH,YAAa,CAClB,IAAIqR,GAAOvY,KAAKqY,MAChBrY,MAAKqY,OAAS,KACdE,GAAQA,EAAKpJ,SACb,IAAIqJ,GAAOxY,KAAKsY,OAChBtY,MAAKsY,QAAU,KACfE,GAAQA,EAAKrJ,WAIjB,IAAIsJ,IAAiB7F,GAAG6F,eAAiB,SAAU3M,GACjD9L,KAAK0Y,aAAe5M,EACpB9L,KAAKkH,YAAa,EAGpBuR,IAAetN,UAAUgE,QAAU,WACjC,IAAKnP,KAAKkH,WAAY,CACpBlH,KAAKkH,YAAa,CAClB,KAAK,GAAItH,GAAI,EAAGJ,EAAMQ,KAAK0Y,aAAajZ,OAAYD,EAAJI,EAASA,IACvDI,KAAK0Y,aAAa9Y,GAAGuP,SAEvBnP,MAAK0Y,aAAajZ,OAAS,GAO/B,IAuDIkZ,KAvDqB/F,GAAGgG,mBAAqB,WAE/C,QAASC,GAAgBf,GACvB9X,KAAK8X,WAAaA,EAClB9X,KAAK8X,WAAWnR,QAChB3G,KAAK8Y,iBAAkB,EAmBzB,QAASF,GAAmBd,GAC1B9X,KAAK+Y,qBAAuBjB,EAC5B9X,KAAKkH,YAAa,EAClBlH,KAAKgZ,mBAAoB,EACzBhZ,KAAK2G,MAAQ,EAwBf,MA5CAkS,GAAgB1N,UAAUgE,QAAU,WAC7BnP,KAAK8X,WAAW5Q,YAAelH,KAAK8Y,kBACvC9Y,KAAK8Y,iBAAkB,EACvB9Y,KAAK8X,WAAWnR,QACc,IAA1B3G,KAAK8X,WAAWnR,OAAe3G,KAAK8X,WAAWkB,oBACjDhZ,KAAK8X,WAAW5Q,YAAa,EAC7BlH,KAAK8X,WAAWiB,qBAAqB5J,aAoB3CyJ,EAAmBzN,UAAUgE,QAAU,WAChCnP,KAAKkH,YAAelH,KAAKgZ,oBAC5BhZ,KAAKgZ,mBAAoB,EACN,IAAfhZ,KAAK2G,QACP3G,KAAKkH,YAAa,EAClBlH,KAAK+Y,qBAAqB5J,aAShCyJ,EAAmBzN,UAAU+L,cAAgB,WAC3C,MAAOlX,MAAKkH,WAAawQ,GAAkB,GAAImB,GAAgB7Y,OAG1D4Y,KAGWhG,GAAGC,UAAU8F,cAAgB,SAAUhQ,EAAW3B,EAAOwQ,EAAQpL,EAAS6M,GAC5FjZ,KAAK2I,UAAYA,EACjB3I,KAAKgH,MAAQA,EACbhH,KAAKwX,OAASA,EACdxX,KAAKoM,QAAUA,EACfpM,KAAKiZ,SAAWA,GAAY3F,GAC5BtT,KAAK8X,WAAa,GAAI9J,KAGxB2K,IAAcxN,UAAU+N,OAAS,WAC/BlZ,KAAK8X,WAAW7J,cAAcjO,KAAKmZ,eAGrCR,GAAcxN,UAAUiO,UAAY,SAAUvW,GAC5C,MAAO7C,MAAKiZ,SAASjZ,KAAKoM,QAASvJ,EAAMuJ,UAG3CuM,GAAcxN,UAAUkO,YAAc,WACpC,MAAOrZ,MAAK8X,WAAW5Q,YAGzByR,GAAcxN,UAAUgO,WAAa,WACnC,MAAOpB,IAAgB/X,KAAKwX,OAAOxX,KAAK2I,UAAW3I,KAAKgH,QAI1D,IAAIsS,IAAY1G,GAAG0G,UAAa,WAE9B,QAASA,MAGTA,EAAU1Q,YAAc,SAAUxB,GAChC,MAAOA,aAAakS,GAGtB,IAAIC,GAAiBD,EAAUnO,SAiD/B,OAzCAoO,GAAeC,SAAW,SAAUxS,EAAOwQ,GACzC,KAAM,IAAIvD,KAUZsF,EAAezI,eAAiB,SAAU9J,EAAOoF,EAASoL,GACxD,GAAIiC,GAAKrN,CAIT,OAHAqN,aAAc3M,QAAS2M,GAAUzZ,KAAK6M,OACtC4M,EAAKH,EAAUI,UAAUD,GAEd,IAAPA,EAAmBzZ,KAAKwZ,SAASxS,EAAOwQ,GAErCxX,KAAK2Z,gBAAgB3S,EAAOyS,EAAIjC,IAGzC+B,EAAeI,gBAAkB,SAAU3S,EAAOoF,EAASoL,GACzD,KAAM,IAAIvD,KAIZqF,EAAUzM,IAAMqG,GAGhBoG,EAAUnO,UAAU0B,IAAMqG,GAO1BoG,EAAUI,UAAY,SAAUE,GAE9B,MADW,GAAXA,IAAiBA,EAAW,GACrBA,GAGFN,KAGL5M,GAAgB4M,GAAUI,UAAW9Q,GAAc0Q,GAAU1Q,aAEhE,SAAU2Q,GAET,QAASM,GAAmBlR,EAAWmR,GAKrC,QAASC,GAAYC,GASnB,QAASC,GAAa/L,EAAGgM,GAOvB,MANIC,GACFC,EAAMnL,OAAOxC,GAEb6E,GAAS,EAEXkG,EAAO0C,EAAQH,GACRrC,GAfT,GAAIyC,IAAU,EAAO7I,GAAS,EAE1B7E,EAAI9D,EAAU6Q,SAASQ,EAAQC,EAC9B3I,KACH8I,EAAMnO,IAAIQ,GACV0N,GAAU,GAVd,GAAInT,GAAQ8S,EAAK,GAAItC,EAASsC,EAAK,GAAIM,EAAQ,GAAIrO,GAEnD,OADAyL,GAAOxQ,EAAO+S,GACPK,EAuBT,QAASC,GAAc1R,EAAWmR,GAKhC,QAASC,GAAYC,EAAQM,GAS3B,QAASL,GAAa/L,EAAGgM,GAOvB,MANIC,GACFC,EAAMnL,OAAOxC,GAEb6E,GAAS,EAEXkG,EAAO0C,EAAQH,GACRrC,GAfT,GAAIyC,IAAU,EAAO7I,GAAS,EAE1B7E,EAAI9D,EAAUmI,eAAekJ,EAAQM,EAAUL,EAC9C3I,KACH8I,EAAMnO,IAAIQ,GACV0N,GAAU,GAVd,GAAInT,GAAQ8S,EAAK,GAAItC,EAASsC,EAAK,GAAIM,EAAQ,GAAIrO,GAEnD,OADAyL,GAAOxQ,EAAO+S,GACPK,EA6BTb,EAAegB,kBAAoB,SAAUvT,EAAOwQ,GAClD,MAAOxX,MAAKwZ,UAAUxS,EAAOwQ,GAASqC,IAUxCN,EAAe5M,wBAA0B,SAAU3F,EAAOoF,EAASoL,GACjE,MAAOxX,MAAK8Q,gBAAgB9J,EAAOwQ,GAASpL,EAASiO,KAGvDf,GAAUnO,WAEX,SAAUoO,GASTA,EAAetM,iBAAmB,SAASjG,EAAOuF,EAAQiL,GACxD,GAAgC,mBAArB3P,IAAK2S,YAA+B,KAAM,IAAIxG,GACzDzH,GAASG,GAAcH,EACvB,IAAInF,GAAIJ,EAAOF,EAAKe,GAAK2S,YAAY,WAAcpT,EAAIoQ,EAAOpQ,IAAOmF,EACrE,OAAOkL,IAAiB,WAAc5P,GAAK4S,cAAc3T,OAG3DwS,GAAUnO,UAGX,IAuFGuP,IAAgBC,GAvFfC,GAAsB,SAAUC,GAEnC,QAASD,KACPC,EAAUnX,KAAK1D,MAOjB,MATAuW,IAASqE,EAAoBC,GAK7BD,EAAmBzP,UAAUqO,SAAW,SAAUxS,EAAOwQ,GACvD,MAAOO,IAAgBP,EAAOxX,KAAMgH,KAG/B4T,GACPtB,IAEEwB,GAAqBxB,GAAUyB,UAAY,GAAIH,IAK/CI,GAA0B,SAAUH,GAGtC,QAASI,KACP,KAAOC,EAAMzb,OAAS,GAAG,CACvB,GAAIyM,GAAOgP,EAAMC,WAChBjP,EAAKmN,eAAiBnN,EAAKgN,UAKhC,QAAS8B,KACPH,EAAUnX,KAAK1D,MAXjB,GAAIkb,EAgCJ,OAvBA3E,IAASyE,EAAwBH,GAKjCG,EAAuB7P,UAAUqO,SAAW,SAAUxS,EAAOwQ,GAC3D,GAAI4D,GAAK,GAAIzC,IAAc3Y,KAAMgH,EAAOwQ,EAAQxX,KAAK6M,MAErD,IAAKqO,EAQHA,EAAMG,QAAQD,OARJ,CACVF,EAAQ,GAAII,IAAc,GAC1BJ,EAAMG,QAAQD,EAEd,IAAIxX,GAAS4G,GAASyQ,IACtBC,GAAQ,KACJtX,IAAWzD,IAAYC,EAAQwD,EAAO1D,GAI5C,MAAOkb,GAAGtD,YAGZkD,EAAuB7P,UAAUoQ,iBAAmB,WAAc,OAAQL,GAEnEF,GACP1B,IAEEzQ,GAAyByQ,GAAUkC,cAAgB,GAAIR,IAmCvDS,IAjC4B7I,GAAGC,UAAU6I,0BAA6B,WACxE,QAASC,GAAW/O,GAClB,MAAO,UAAcgP,EAASC,GAC5BA,EAAQ,EAAGjP,EAAKkP,QAChB,IAAI9U,GAAQwD,GAASoC,EAAKmP,SAASnP,EAAKoP,OACpChV,KAAU7G,KACZyM,EAAKqP,QAAQ9M,UACb/O,EAAQ4G,EAAM9G,IAEhB0M,EAAKoP,OAAShV,GAIlB,QAAS0U,GAA0B/S,EAAW3B,EAAOuF,EAAQiL,GAC3DxX,KAAKkc,WAAavT,EAClB3I,KAAKgc,OAAShV,EACdhH,KAAK8b,QAAUvP,EACfvM,KAAK+b,QAAUvE,EAWjB,MARAkE,GAA0BvQ,UAAU2D,MAAQ,WAC1C,GAAIrC,GAAI,GAAIuB,GAIZ,OAHAhO,MAAKic,QAAUxP,EACfA,EAAEwB,cAAcjO,KAAKkc,WAAWvP,wBAAwB,EAAG3M,KAAK8b,QAASH,EAAW3b,QAE7EyM,GAGFiP,KAKS,WAChB,GAAIS,GAAiBC,EAAoBnJ,EACzC,IAAMpL,GAAKwU,WACTF,EAAkBtU,GAAKwU,WACvBD,EAAoBvU,GAAKyU,iBACpB,CAAA,IAAMzU,GAAK0U,QAMhB,KAAM,IAAIvI,GALVmI,GAAkB,SAAUlS,EAAIuS,GAC9B3U,GAAK0U,QAAQE,MAAMD,GACnBvS,KAMJ,OACEoS,WAAYF,EACZG,aAAcF,OAGdD,GAAkBV,GAAWY,WAC/BD,GAAoBX,GAAWa,cAEhC,WAQC,QAASI,GAAQC,GACf,GAAIC,EACFT,GAAgB,WAAcO,EAAQC,IAAY,OAC7C,CACL,GAAIE,GAAOC,EAAcH,EACzB,IAAIE,EAAM,CACRD,GAAmB,CACnB,IAAIhZ,GAAS4G,GAASqS,IACtBlC,IAAYgC,GACZC,GAAmB,EACfhZ,IAAWzD,IAAYC,EAAQwD,EAAO1D,KAchD,QAAS6c,KAEP,IAAKlV,GAAKmV,aAAenV,GAAKoV,cAAiB,OAAO,CACtD,IAAIC,IAAU,EAAOC,EAAatV,GAAKuV,SAMvC,OAJAvV,IAAKuV,UAAY,WAAcF,GAAU,GACzCrV,GAAKmV,YAAY,GAAI,KACrBnV,GAAKuV,UAAYD,EAEVD,EAvCT,GAAIG,GAAa,EAAGP,KAAoBF,GAAmB,CAE3DjC,IAAc,SAAUgC,SACfG,GAAcH,GAkBvB,IAAIW,GAAW,GAAIC,QAAO,IACxBC,OAAOpS,UACJqS,QAAQ,sBAAuB,QAC/BA,QAAQ,wBAAyB,OAAS,KAG3CC,EAAiG,mBAA1EA,EAAetL,IAAcK,IAAiBL,GAAWsL,gBACjFJ,EAASK,KAAKD,IAAiBA,CAelC,IAAInT,GAAWmT,GACbhD,GAAiB,SAAUlD,GACzB,GAAI1Q,GAAKuW,GAIT,OAHAP,GAAchW,GAAM0Q,EACpBkG,EAAa,WAAchB,EAAQ5V,KAE5BA,OAEJ,IAAuB,mBAAZ8W,UAAyD,wBAA3BxS,SAAS1H,KAAKka,SAC5DlD,GAAiB,SAAUlD,GACzB,GAAI1Q,GAAKuW,GAIT,OAHAP,GAAchW,GAAM0Q,EACpBoG,QAAQC,SAAS,WAAcnB,EAAQ5V,KAEhCA,OAEJ,IAAIiW,IAAwB,CACjC,GAAIe,GAAa,iBAAmBxV,KAAKyV,SAErCC,EAAsB,SAAUC,GAER,gBAAfA,GAAMC,MAAqBD,EAAMC,KAAKC,UAAU,EAAGL,EAAWre,UAAYqe,GACnFpB,EAAQuB,EAAMC,KAAKC,UAAUL,EAAWre,SAI5CoI,IAAK6D,iBAAiB,UAAWsS,GAAqB,GAEtDtD,GAAiB,SAAUlD,GACzB,GAAI1Q,GAAKuW,GAGT,OAFAP,GAAchW,GAAM0Q,EACpB3P,GAAKmV,YAAYc,EAAahX,EAAI,KAC3BA,OAEJ,IAAMe,GAAKuW,eAAgB,CAChC,GAAIC,GAAU,GAAIxW,IAAKuW,cAEvBC,GAAQC,MAAMlB,UAAY,SAAUld,GAAKwc,EAAQxc,EAAEge,OAEnDxD,GAAiB,SAAUlD,GACzB,GAAI1Q,GAAKuW,GAGT,OAFAP,GAAchW,GAAM0Q,EACpB6G,EAAQE,MAAMvB,YAAYlW,GACnBA,OAIT4T,IAFS,YAAc7S,KAAQ,sBAAwBA,IAAK2W,SAASC,cAAc,UAElE,SAAUjH,GACzB,GAAIkH,GAAgB7W,GAAK2W,SAASC,cAAc,UAC5C3X,EAAKuW,GAUT,OATAP,GAAchW,GAAM0Q,EAEpBkH,EAAcC,mBAAqB,WACjCjC,EAAQ5V,GACR4X,EAAcC,mBAAqB,KACnCD,EAAcE,WAAWC,YAAYH,GACrCA,EAAgB,MAElB7W,GAAK2W,SAASM,gBAAgBC,YAAYL,GACnC5X,GAIQ,SAAU0Q,GACzB,GAAI1Q,GAAKuW,GAMT,OALAP,GAAchW,GAAM0Q,EACpB2E,GAAgB,WACdO,EAAQ5V,IACP,GAEIA,KAQZ,IAAIkY,IAAoB,SAAUnE,GAEhC,QAASmE,KACPnE,EAAUnX,KAAK1D,MAGjB,QAASif,GAAenH,EAAYN,EAAQ7O,EAAW3B,GACrD,MAAO,YACL8Q,EAAW7J,cAAcsJ,GAAWS,OAAOR,EAAO7O,EAAW3B,MAIjE,QAASkY,GAAgBpY,GACvB9G,KAAKmf,IAAMrY,EACX9G,KAAKkH,YAAa,EAUpB,QAASkY,GAAqBtY,GAC5B9G,KAAKmf,IAAMrY,EACX9G,KAAKkH,YAAa,EAuBrB,MAhDCqP,IAASyI,EAAkBnE,GAgB3BqE,EAAgB/T,UAAUgE,QAAU,WAC7BnP,KAAKkH,aACRlH,KAAKkH,YAAa,EAClByT,GAAY3a,KAAKmf,OASrBC,EAAqBjU,UAAUgE,QAAU,WAClCnP,KAAKkH,aACRlH,KAAKkH,YAAa,EAClBkV,GAAkBpc,KAAKmf,OAI5BH,EAAiB7T,UAAUqO,SAAW,SAAUxS,EAAOwQ,GACrD,GAAIM,GAAa,GAAI9J,IACjBlH,EAAK4T,GAAeuE,EAAenH,EAAYN,EAAQxX,KAAMgH,GACjE,OAAO,IAAIwH,IAAiBsJ,EAAY,GAAIoH,GAAgBpY,KAG9DkY,EAAiB7T,UAAUwO,gBAAkB,SAAU3S,EAAOoF,EAASoL,GACrE,GAAgB,IAAZpL,EAAiB,MAAOpM,MAAKwZ,SAASxS,EAAOwQ,EACjD,IAAIM,GAAa,GAAI9J,IACjBlH,EAAKqV,GAAgB8C,EAAenH,EAAYN,EAAQxX,KAAMgH,GAAQoF,EAC1E,OAAO,IAAIoC,IAAiBsJ,EAAY,GAAIsH,GAAqBtY,KAG5DkY,GACP1F,IAEE1I,GAAmB0I,GAAU,WAAaA,GAAU+F,MAAQ,GAAIL,GAOpEnY,GAAYsE,UAAUiO,UAAY,SAAUvW,GAC1C,GAAIyc,GAAItf,KAAKZ,MAAMga,UAAUvW,EAAMzD,MAEnC,OADM,KAANkgB,IAAYA,EAAItf,KAAK8G,GAAKjE,EAAMiE,IACzBwY,EAGT,IAAIhE,IAAgB1I,GAAGC,UAAUyI,cAAgB,SAAUiE,GACzDvf,KAAKwf,MAAQ,GAAI7f,OAAM4f,GACvBvf,KAAKP,OAAS,GAGZggB,GAAgBnE,GAAcnQ,SAClCsU,IAAcC,iBAAmB,SAAUC,EAAMC,GAC/C,MAAO5f,MAAKwf,MAAMG,GAAMvG,UAAUpZ,KAAKwf,MAAMI,IAAU,GAGzDH,GAAcI,UAAY,SAAUrc,GAClC,KAAIA,GAASxD,KAAKP,QAAkB,EAAR+D,GAA5B,CACA,GAAIyF,GAASzF,EAAQ,GAAK,CAC1B,MAAa,EAATyF,GAAcA,IAAWzF,IACzBxD,KAAK0f,iBAAiBlc,EAAOyF,GAAS,CACxC,GAAI6W,GAAO9f,KAAKwf,MAAMhc,EACtBxD,MAAKwf,MAAMhc,GAASxD,KAAKwf,MAAMvW,GAC/BjJ,KAAKwf,MAAMvW,GAAU6W,EACrB9f,KAAK6f,UAAU5W,MAInBwW,GAAcM,QAAU,SAAUvc,GAEhC,IADCA,IAAUA,EAAQ,KACfA,GAASxD,KAAKP,QAAkB,EAAR+D,GAA5B,CACA,GAAImc,GAAO,EAAInc,EAAQ,EACnBoc,EAAQ,EAAIpc,EAAQ,EACpB2U,EAAQ3U,CAOZ,IANImc,EAAO3f,KAAKP,QAAUO,KAAK0f,iBAAiBC,EAAMxH,KACpDA,EAAQwH,GAENC,EAAQ5f,KAAKP,QAAUO,KAAK0f,iBAAiBE,EAAOzH,KACtDA,EAAQyH,GAENzH,IAAU3U,EAAO,CACnB,GAAIsc,GAAO9f,KAAKwf,MAAMhc,EACtBxD,MAAKwf,MAAMhc,GAASxD,KAAKwf,MAAMrH,GAC/BnY,KAAKwf,MAAMrH,GAAS2H,EACpB9f,KAAK+f,QAAQ5H,MAIjBsH,GAAcO,KAAO,WAAc,MAAOhgB,MAAKwf,MAAM,GAAGpgB,OAExDqgB,GAAcQ,SAAW,SAAUzc,GACjCxD,KAAKwf,MAAMhc,GAASxD,KAAKwf,QAAQxf,KAAKP,QACtCO,KAAKwf,MAAMxf,KAAKP,QAAUP,EAC1Bc,KAAK+f,WAGPN,GAActE,QAAU,WACtB,GAAIvX,GAAS5D,KAAKggB,MAElB,OADAhgB,MAAKigB,SAAS,GACPrc,GAGT6b,GAAcpE,QAAU,SAAUnP,GAChC,GAAI1I,GAAQxD,KAAKP,QACjBO,MAAKwf,MAAMhc,GAAS,GAAIqD,GAAYyU,GAAc3U,QAASuF,GAC3DlM,KAAK6f,UAAUrc,IAGjBic,GAAcxQ,OAAS,SAAU/C,GAC/B,IAAK,GAAItM,GAAI,EAAGA,EAAII,KAAKP,OAAQG,IAC/B,GAAII,KAAKwf,MAAM5f,GAAGR,QAAU8M,EAE1B,MADAlM,MAAKigB,SAASrgB,IACP,CAGX,QAAO,GAET0b,GAAc3U,MAAQ,CAKtB,IA4QIuZ,IA5QAC,GAAevN,GAAGuN,aAAe,WACnC,QAASA,MA2CT,MAvCAA,GAAahV,UAAUiV,QAAU,SAAU1V,EAAQD,EAASE,GAC1D,KAAM,IAAIsJ,KAGZkM,EAAahV,UAAUkV,gBAAkB,SAAU3V,EAAQD,EAASE,GAClE,KAAM,IAAIsJ,KAUZkM,EAAahV,UAAUmD,OAAS,SAAUgS,EAAkB7V,EAASE,GACnE,MAAO2V,IAAgD,gBAArBA,GAChCtgB,KAAKqgB,gBAAgBC,GACrBtgB,KAAKogB,QAAQE,EAAkB7V,EAASE,IAU5CwV,EAAahV,UAAUoV,aAAe,SAAU5X,GAC9C,GAAIiE,GAAO5M,IAEX,OADA4I,IAAYD,KAAeA,EAAYmS,IAChC,GAAItO,IAAoB,SAAU3L,GACvC,MAAO8H,GAAU6Q,SAAS5M,EAAM,SAAUsB,EAAGL,GAC3CA,EAAawS,gBAAgBxf,GACP,MAAtBgN,EAAaE,MAAgBlN,EAAE8J,mBAK9BwV,KAGLK,GAAsB,SAAU3F,GAElC,QAAS2F,GAAmBphB,GAC1BY,KAAKZ,MAAQA,EACbY,KAAK+N,KAAO,IAed,MAlBAwI,IAASiK,EAAoB3F,GAM7B2F,EAAmBrV,UAAUiV,QAAU,SAAU1V,GAC/C,MAAOA,GAAO1K,KAAKZ,QAGrBohB,EAAmBrV,UAAUkV,gBAAkB,SAAUxf,GACvD,MAAOA,GAAE6J,OAAO1K,KAAKZ,QAGvBohB,EAAmBrV,UAAUC,SAAW,WACtC,MAAO,UAAYpL,KAAKZ,MAAQ,KAG3BohB,GACPL,IAEEM,GAAuB,SAAU5F,GAEnC,QAAS4F,GAAoBngB,GAC3BN,KAAKM,MAAQA,EACbN,KAAK+N,KAAO,IAed,MAlBAwI,IAASkK,EAAqB5F,GAM9B4F,EAAoBtV,UAAUiV,QAAU,SAAU1V,EAAQD,GACxD,MAAOA,GAAQzK,KAAKM,QAGtBmgB,EAAoBtV,UAAUkV,gBAAkB,SAAUxf,GACxD,MAAOA,GAAE4J,QAAQzK,KAAKM,QAGxBmgB,EAAoBtV,UAAUC,SAAW,WACvC,MAAO,WAAapL,KAAKM,MAAQ,KAG5BmgB,GACPN,IAEEO,GAA2B,SAAU7F,GAEvC,QAAS6F,KACP1gB,KAAK+N,KAAO,IAed,MAjBAwI,IAASmK,EAAyB7F,GAKlC6F,EAAwBvV,UAAUiV,QAAU,SAAU1V,EAAQD,EAASE,GACrE,MAAOA,MAGT+V,EAAwBvV,UAAUkV,gBAAkB,SAAUxf,GAC5D,MAAOA,GAAE8J,eAGX+V,EAAwBvV,UAAUC,SAAW,WAC3C,MAAO,iBAGFsV,GACPP,IAOEQ,GAA2BR,GAAaS,aAAe,SAAUxhB,GACnE,MAAO,IAAIohB,IAAmBphB,IAQ5ByhB,GAA4BV,GAAaW,cAAgB,SAAUxgB,GACrE,MAAO,IAAImgB,IAAoBngB,IAO7BygB,GAAgCZ,GAAaa,kBAAoB,WACnE,MAAO,IAAIN,KAMTO,GAAWrO,GAAGqO,SAAW,aASzBC,GAAiBD,GAASpN,OAAS,SAAUnJ,EAAQD,EAASE,GAIhE,MAHAD,KAAWA,EAASuI,IACpBxI,IAAYA,EAAU8I,IACtB5I,IAAgBA,EAAcsI,IACvB,GAAIkO,IAAkBzW,EAAQD,EAASE,IAO5CyW,GAAmBxO,GAAGC,UAAUuO,iBAAoB,SAAUvG,GAMhE,QAASuG,KACPphB,KAAKqhB,WAAY,EAoDnB,MA1DA9K,IAAS6K,EAAkBvG,GAU3BuG,EAAiBjW,UAAUzB,KAAOwK,GAClCkN,EAAiBjW,UAAU7K,MAAQ4T,GACnCkN,EAAiBjW,UAAUmW,UAAYpN,GAMvCkN,EAAiBjW,UAAUT,OAAS,SAAUtL,IAC3CY,KAAKqhB,WAAarhB,KAAK0J,KAAKtK,IAO/BgiB,EAAiBjW,UAAUV,QAAU,SAAUnK,GACxCN,KAAKqhB,YACRrhB,KAAKqhB,WAAY,EACjBrhB,KAAKM,MAAMA,KAOf8gB,EAAiBjW,UAAUR,YAAc,WAClC3K,KAAKqhB,YACRrhB,KAAKqhB,WAAY,EACjBrhB,KAAKshB,cAOTF,EAAiBjW,UAAUgE,QAAU,WAAcnP,KAAKqhB,WAAY,GAEpED,EAAiBjW,UAAUoW,KAAO,SAAUrhB,GAC1C,MAAKF,MAAKqhB,WAMH,GALLrhB,KAAKqhB,WAAY,EACjBrhB,KAAKM,MAAMJ,IACJ,IAMJkhB,GACPH,IAKEE,GAAoBvO,GAAGuO,kBAAqB,SAAUtG,GASxD,QAASsG,GAAkBzW,EAAQD,EAASE,GAC1CkQ,EAAUnX,KAAK1D,MACfA,KAAKwhB,QAAU9W,EACf1K,KAAKyhB,SAAWhX,EAChBzK,KAAK0hB,aAAe/W,EA0BtB,MAtCA4L,IAAS4K,EAAmBtG,GAmB5BsG,EAAkBhW,UAAUzB,KAAO,SAAUtK,GAC3CY,KAAKwhB,QAAQpiB,IAOf+hB,EAAkBhW,UAAU7K,MAAQ,SAAUA,GAC5CN,KAAKyhB,SAASnhB,IAMhB6gB,EAAkBhW,UAAUmW,UAAY,WACtCthB,KAAK0hB,gBAGAP,GACPC,IAOErR,GAAa6C,GAAG7C,WAAa,WAE/B,QAAS4R,GAAc/U,EAAMrD,GAC3B,MAAO,UAAU1I,GACf,GAAI+gB,GAAa/gB,EAAE4J,OAMnB,OALA5J,GAAE4J,QAAU,SAAUvK,GACpBG,EAAmBH,EAAG0M,GACtBgV,EAAWle,KAAK7C,EAAGX,IAGdqJ,EAAU7F,KAAKkJ,EAAM/L,IAIhC,QAASkP,KACP,GAAI6C,GAAGE,OAAOa,kBAAoBnT,GAAW,CAC3C,GAAIqhB,GAAe7hB,KAAK8hB,WACpB5hB,EAAIsK,GAASpK,GAAS,GAAIgC,QAASlC,CACvCF,MAAKS,MAAQP,EAAEO,MAAM0d,UAAUje,EAAEO,MAAMC,QAAQ,MAAQ,GACvDV,KAAK8hB,WAAaH,EAAc3hB,KAAM6hB,IA0D1C,MAtDA3B,IAAkBnQ,EAAW5E,UAO7B4E,EAAWC,aAAe,SAAUnP,GAClC,MAAOA,IAAK0J,GAAW1J,EAAE0I,YAU3B2W,GAAgB3W,UAAY2W,GAAgB6B,QAAU,SAAUC,EAAWvX,EAASE,GAClF,MAAO3K,MAAK8hB,WAAgC,gBAAdE,GAC5BA,EACAd,GAAec,EAAWvX,EAASE,KASvCuV,GAAgB+B,gBAAkB,SAAUvX,EAAQkK,GAClD,MAAO5U,MAAK8hB,WAAWZ,GAAkC,mBAAZtM,GAA0B,SAAS/K,GAAKa,EAAOhH,KAAKkR,EAAS/K,IAAQa,KASpHwV,GAAgBgC,iBAAmB,SAAUzX,EAASmK,GACpD,MAAO5U,MAAK8hB,WAAWZ,GAAe,KAAyB,mBAAZtM,GAA0B,SAAS1U,GAAKuK,EAAQ/G,KAAKkR,EAAS1U,IAAQuK,KAS3HyV,GAAgBiC,qBAAuB,SAAUxX,EAAaiK,GAC5D,MAAO5U,MAAK8hB,WAAWZ,GAAe,KAAM,KAAyB,mBAAZtM,GAA0B,WAAajK,EAAYjH,KAAKkR,IAAcjK,KAG1HoF,KAGLqS,GAAoBxP,GAAGC,UAAUuP,kBAAqB,SAAUvH,GAGlE,QAASuH,GAAkBzZ,EAAWK,GACpC6R,EAAUnX,KAAK1D,MACfA,KAAK2I,UAAYA,EACjB3I,KAAKgJ,SAAWA,EAChBhJ,KAAKqiB,YAAa,EAClBriB,KAAKsiB,YAAa,EAClBtiB,KAAKkb,SACLlb,KAAK8X,WAAa,GAAIvK,IAGxB,QAASgV,GAAYvZ,EAAUa,GAAK,MAAO,YAAcb,EAAS0B,OAAOb,IACzE,QAAS2Y,GAAaxZ,EAAU9I,GAAK,MAAO,YAAc8I,EAASyB,QAAQvK,IAC3E,QAASuiB,GAAiBzZ,GAAY,MAAO,YAAcA,EAAS2B,eAepE,QAAS+P,GAAe1T,EAAO6U,GAC7B,GAAI6G,EACJ,MAAI1b,EAAMkU,MAAMzb,OAAS,GAIvB,YADAuH,EAAMqb,YAAa,EAFnBK,GAAO1b,EAAMkU,MAAM7M,OAKrB,IAAIqC,GAAMlG,GAASkY,IACnB,OAAIhS,KAAQvQ,IACV6G,EAAMkU,SACNlU,EAAMsb,YAAa,EACZliB,EAAQsQ,EAAIxQ,QAErB2b,GAAQ7U,GAkBV,MA7DAuP,IAAS6L,EAAmBvH,GAgB5BuH,EAAkBjX,UAAUzB,KAAO,SAAUG,GAC3C7J,KAAKkb,MAAMxZ,KAAK6gB,EAAYviB,KAAKgJ,SAAUa,KAG7CuY,EAAkBjX,UAAU7K,MAAQ,SAAUJ,GAC5CF,KAAKkb,MAAMxZ,KAAK8gB,EAAaxiB,KAAKgJ,SAAU9I,KAG9CkiB,EAAkBjX,UAAUmW,UAAY,WACtCthB,KAAKkb,MAAMxZ,KAAK+gB,EAAiBziB,KAAKgJ,YAqBxCoZ,EAAkBjX,UAAUwX,aAAe,WACzC,GAAIC,IAAU,GACT5iB,KAAKsiB,YAActiB,KAAKkb,MAAMzb,OAAS,IAC1CmjB,GAAW5iB,KAAKqiB,WAChBriB,KAAKqiB,YAAa,GAEpBO,GACE5iB,KAAK8X,WAAW7J,cAAcjO,KAAK2I,UAAU4R,kBAAkBva,KAAM0a,KAGzE0H,EAAkBjX,UAAUgE,QAAU,WACpC0L,EAAU1P,UAAUgE,QAAQzL,KAAK1D,MACjCA,KAAK8X,WAAW3I,WAGXiT,GACPhB,IAEEyB,GAAiBjQ,GAAGiQ,eAAkB,SAAUhI,GAGlD,QAASiI,GAAcC,GACrB,MAAOA,IAAcxY,GAAWwY,EAAW5T,SAAW4T,EACpDxY,GAAWwY,GAActL,GAAiBsL,GAAcrL,GAG5D,QAASzJ,GAAc7G,EAAGJ,GACxB,GAAIgc,GAAMhc,EAAM,GAAI4F,EAAO5F,EAAM,GAC7Bic,EAAMzY,GAASoC,EAAKsW,eAAexf,KAAKkJ,EAAMoW,EAC9CC,KAAQ9iB,IAAa6iB,EAAIzB,KAAKphB,GAASD,IAAME,EAAQD,GAASD,GAClE8iB,EAAI/U,cAAc6U,EAAcG,IAGlC,QAASJ,KACPhI,EAAUnX,KAAK1D,MAgBjB,MA/BAuW,IAASsM,EAAgBhI,GAkBzBgI,EAAe1X,UAAU2W,WAAa,SAAUjhB,GAC9C,GAAImiB,GAAM,GAAIG,IAAmBtiB,GAAImG,GAASgc,EAAKhjB,KAOnD,OALI6I,IAAuB0S,mBACzB1S,GAAuB2Q,SAASxS,EAAOiH,GAEvCA,EAAc,KAAMjH,GAEfgc,GAGTH,EAAe1X,UAAU+X,cAAgBhP,GAElC2O,GACP9S,IAEAqT,GAAoBxQ,GAAGwQ,kBAAqB,SAASvI,GAIrD,QAASuI,GAAkBtiB,EAAQqJ,EAAU8G,EAAgB2D,GAC3D5U,KAAKiR,eAAiB1G,GAAW0G,GAAkBA,EAAiB,KACpEjR,KAAKmK,SAAWuK,GAAanK,GAAWJ,GAAYA,EAAW,WAAa,MAAOA,IAAayK,EAAS,GACzG5U,KAAKc,OAASA,EACd+Z,EAAUnX,KAAK1D,MAQjB,QAASqjB,GAAcra,EAAUmB,EAAU8G,EAAgBnQ,GACzDd,KAAKJ,EAAI,EACTI,KAAKmK,SAAWA,EAChBnK,KAAKiR,eAAiBA,EACtBjR,KAAKc,OAASA,EACdd,KAAKa,EAAImI,EACToY,GAAiB1d,KAAK1D,MAuBxB,MA3CAuW,IAAS6M,EAAmBvI,GAS5BuI,EAAkBjY,UAAU+X,cAAgB,SAASriB,GACnD,MAAOb,MAAKc,OAAOyI,UAAU,GAAI8Z,GAAcxiB,EAAGb,KAAKmK,SAAUnK,KAAKiR,eAAgBjR,QAGxFuW,GAAS8M,EAAejC,IAUxBiC,EAAclY,UAAUmY,YAAc,SAAS1f,EAAQiG,EAAGjK,GACxD,MAAOI,MAAKiR,eACVrN,EAAO2f,IAAI,SAASnQ,EAAGoQ,GAAM,MAAOxjB,MAAKiR,eAAepH,EAAGuJ,EAAGxT,EAAG4jB,IAAQxjB,MACzE4D,GAGJyf,EAAclY,UAAUzB,KAAO,SAASG,GACtC,GAAIjK,GAAII,KAAKJ,IACTgE,EAAS4G,GAASxK,KAAKmK,UAAUN,EAAGjK,EAAGI,KAAKc,OAChD,OAAI8C,KAAWzD,GAAmBH,KAAKa,EAAE4J,QAAQ7G,EAAO1D,IAExDsP,GAAU5L,KAAYA,EAAS6L,GAAsB7L,KACpD6Q,GAAY7Q,IAAW4Q,GAAW5Q,MAAaA,EAASmM,GAAW0T,KAAK7f,QACzE5D,MAAKa,EAAE6J,OAAO1K,KAAKsjB,YAAY1f,EAAQiG,EAAGjK,MAG5CyjB,EAAclY,UAAU7K,MAAQ,SAASJ,GAAKF,KAAKa,EAAE4J,QAAQvK,IAE7DmjB,EAAclY,UAAUmW,UAAY,WAAathB,KAAKa,EAAE8J,eAEjDyY,GAETP,IAEIa,GAAa9Q,GAAGC,UAAU6Q,WAAa,YAO3C3c,GAAqBoE,UAAUgE,QAAU,WAClCnP,KAAKkH,aACRlH,KAAKkH,YAAa,EAClBlH,KAAKiH,GAAGC,YAAa,GAIzB,IAAIyc,IAA8B,SAAS9I,GAEzC,QAAS8I,GAA2B/M,GAClC5W,KAAK4W,QAAUA,EACfiE,EAAUnX,KAAK1D,MAGjB,QAAS0a,GAAe1T,EAAO6U,GAC7B,IAAI7U,EAAME,WAAV,CACA,GAAI0c,GAAcpZ,GAASxD,EAAM9G,EAAEwJ,MAAMhG,KAAKsD,EAAM9G,EACpD,IAAI0jB,IAAgBzjB,GAAY,MAAO6G,GAAMnG,EAAE4J,QAAQmZ,EAAY1jB,EACnE,IAAI0jB,EAAYja,KAAQ,MAAO3C,GAAMnG,EAAE8J,aAGvC,IAAIkZ,GAAeD,EAAYxkB,KAC/BoQ,IAAUqU,KAAkBA,EAAepU,GAAsBoU,GAEjE,IAAIpX,GAAI,GAAIuB,GACZhH,GAAMoG,aAAaa,cAAcxB,GACjCA,EAAEwB,cAAc4V,EAAata,UAAU,GAAI8Z,GAAcrc,EAAO6U,MAgBlE,QAASwH,GAAcrc,EAAO6U,GAC5B7b,KAAKgc,OAAShV,EACdhH,KAAK8jB,SAAWjI,EAChBuF,GAAiB1d,KAAK1D,MASxB,MA9CAuW,IAASoN,EAA4B9I,GAqBrC8I,EAA2BxY,UAAU+X,cAAgB,SAAUriB,GAC7D,GAAIuM,GAAe,GAAIG,IACnBvG,GACFE,YAAY,EACZrG,EAAGA,EACHuM,aAAcA,EACdlN,EAAGF,KAAK4W,QAAQ3O,OAGdqF,EAAazE,GAAuB0R,kBAAkBvT,EAAO0T,EACjE,OAAO,IAAIjC,KAAgBrL,EAAcE,EAAY,GAAIvG,GAAqBC,MAShFuP,GAAS8M,EAAejC,IAExBiC,EAAclY,UAAUzB,KAAO,SAAUG,GAAK7J,KAAKgc,OAAOnb,EAAE6J,OAAOb,IACnEwZ,EAAclY,UAAU7K,MAAQ,SAAUJ,GAAKF,KAAKgc,OAAOnb,EAAE4J,QAAQvK,IACrEmjB,EAAclY,UAAUmW,UAAY,WAActhB,KAAK8jB,SAAS9jB,KAAKgc,SAE9D2H,GACPd,GAEFa,IAAWvY,UAAU4Y,OAAS,WAC5B,MAAO,IAAIJ,IAA2B3jB,MAGxC,IAAIgkB,IAAwB,SAASnJ,GACnC,QAASmJ,GAAqBpN,GAC5B5W,KAAK4W,QAAUA,EACfiE,EAAUnX,KAAK1D,MAKjB,QAAS0a,GAAe1T,EAAO6U,GAC7B,IAAI7U,EAAME,WAAV,CACA,GAAI0c,GAAcpZ,GAASxD,EAAM9G,EAAEwJ,MAAMhG,KAAKsD,EAAM9G,EACpD,IAAI0jB,IAAgBzjB,GAAY,MAAO6G,GAAMnG,EAAE4J,QAAQmZ,EAAY1jB,EACnE,IAAI0jB,EAAYja,KAAQ,MAA2B,QAApB3C,EAAMid,UAAqBjd,EAAMnG,EAAE4J,QAAQzD,EAAMid,WAAajd,EAAMnG,EAAE8J,aAErG,IAAIkZ,GAAeD,EAAYxkB,KAC/BoQ,IAAUqU,KAAkBA,EAAepU,GAAsBoU,GAEjE,IAAIpX,GAAI,GAAIuB,GACZhH,GAAMoG,aAAaa,cAAcxB,GACjCA,EAAEwB,cAAc4V,EAAata,UAAU,GAAI8Z,GAAcrc,EAAO6U,MAiBlE,QAASwH,GAAcrc,EAAO6U,GAC5B7b,KAAKgc,OAAShV,EACdhH,KAAK8jB,SAAWjI,EAChBuF,GAAiB1d,KAAK1D,MASxB,MA1CAuW,IAASyN,EAAsBnJ,GAgB/BmJ,EAAqB7Y,UAAU+X,cAAgB,SAAUriB,GACvD,GAAIuM,GAAe,GAAIG,IACnBvG,GACFE,YAAY,EACZhH,EAAGF,KAAK4W,QAAQ3O,MAChBmF,aAAcA,EACd6W,UAAW,KACXpjB,EAAGA,GAGDyM,EAAazE,GAAuB0R,kBAAkBvT,EAAO0T,EACjE,OAAO,IAAIjC,KAAgBrL,EAAcE,EAAY,GAAIvG,GAAqBC,MAShFuP,GAAS8M,EAAejC,IAExBiC,EAAclY,UAAUzB,KAAO,SAAUG,GAAK7J,KAAKgc,OAAOnb,EAAE6J,OAAOb,IACnEwZ,EAAclY,UAAU7K,MAAQ,SAAUJ,GAAKF,KAAKgc,OAAOiI,UAAY/jB,EAAGF,KAAK8jB,SAAS9jB,KAAKgc,SAC7FqH,EAAclY,UAAUmW,UAAY,WAActhB,KAAKgc,OAAOnb,EAAE8J,eAEzDqZ,GACPnB,GAEFa,IAAWvY,UAAU+Y,WAAa,WAChC,MAAO,IAAIF,IAAqBhkB,MAGlC,IAAImkB,IAAoB,SAAUtJ,GAEhC,QAASsJ,GAAiBC,EAAG9E,GAC3Btf,KAAKokB,EAAIA,EACTpkB,KAAKsf,EAAS,MAALA,EAAY,GAAKA,EAO5B,QAAS+E,GAAiBta,GACxB/J,KAAKokB,EAAIra,EAAEqa,EACXpkB,KAAKskB,EAAIva,EAAEuV,EASb,MArBA/I,IAAS4N,EAAkBtJ,GAM3BsJ,EAAiBhZ,UAAUlD,IAAc,WACvC,MAAO,IAAIoc,GAAiBrkB,OAQ9BqkB,EAAiBlZ,UAAUzB,KAAO,WAChC,MAAe,KAAX1J,KAAKskB,EAAkB/P,IACvBvU,KAAKskB,EAAI,GAAKtkB,KAAKskB,KACd3a,MAAM,EAAOvK,MAAOY,KAAKokB,KAG7BD,GACPT,IAEEa,GAAmBb,GAAWla,OAAS,SAAUpK,EAAOolB,GAC1D,MAAO,IAAIL,IAAiB/kB,EAAOolB,IAGjCC,GAAgB,SAAS5J,GAE3B,QAAS4J,GAAard,EAAG6C,EAAI2K;AAC3B5U,KAAKoH,EAAIA,EACTpH,KAAKiK,GAAKA,EAAKyK,GAAazK,EAAI2K,EAAS,GAAK,KAMhD,QAAS8P,GAAa3a,GACpB/J,KAAKJ,EAAI,GACTI,KAAKoH,EAAI2C,EAAE3C,EACXpH,KAAKskB,EAAItkB,KAAKoH,EAAE3H,OAChBO,KAAKiK,GAAKF,EAAEE,GASd,MAtBAsM,IAASkO,EAAc5J,GAKvB4J,EAAatZ,UAAUlD,IAAc,WACnC,MAAO,IAAIyc,GAAa1kB,OAU1B0kB,EAAavZ,UAAUzB,KAAO,WAC7B,QAAS1J,KAAKJ,EAAII,KAAKskB,GACnB3a,MAAM,EAAOvK,MAAQY,KAAKiK,GAAsBjK,KAAKiK,GAAGjK,KAAKoH,EAAEpH,KAAKJ,GAAII,KAAKJ,EAAGI,KAAKoH,GAAtDpH,KAAKoH,EAAEpH,KAAKJ,IAC7C2U,IAGIkQ,GACPf,IAEEiB,GAAejB,GAAWkB,GAAK,SAAU9jB,EAAQqJ,EAAUyK,GAC7D,MAAO,IAAI6P,IAAa3jB,EAAQqJ,EAAUyK,IAGxCiQ,GAAqB,SAAShK,GAEhC,QAASgK,GAAkB/jB,GACzBd,KAAKc,OAASA,EACd+Z,EAAUnX,KAAK1D,MAQjB,QAASqjB,GAAcxiB,GACrBb,KAAKa,EAAIA,EACTb,KAAKN,KACL0hB,GAAiB1d,KAAK1D,MAOxB,MArBAuW,IAASsO,EAAmBhK,GAM5BgK,EAAkB1Z,UAAU+X,cAAgB,SAASriB,GACnD,MAAOb,MAAKc,OAAOyI,UAAU,GAAI8Z,GAAcxiB,KAGjD0V,GAAS8M,EAAejC,IAOxBiC,EAAclY,UAAUzB,KAAO,SAAUG,GAAK7J,KAAKN,EAAEgC,KAAKmI,IAC1DwZ,EAAclY,UAAU7K,MAAQ,SAAUJ,GAAKF,KAAKa,EAAE4J,QAAQvK,IAC9DmjB,EAAclY,UAAUmW,UAAY,WAActhB,KAAKa,EAAE6J,OAAO1K,KAAKN,GAAIM,KAAKa,EAAE8J,eAEzEka,GACPhC,GAMF3C,IAAgB4E,QAAU,WACxB,MAAO,IAAID,IAAkB7kB,OAY/B+P,GAAW8D,OAAS,SAAUtK,EAAWN,GACvC,MAAO,IAAIuD,IAAoBjD,EAAWN,GAG5C,IAAI8b,IAAS,SAASlK,GAEpB,QAASkK,GAAMne,GACb5G,KAAKglB,GAAKpe,EACViU,EAAUnX,KAAK1D,MAUjB,MAbAuW,IAASwO,EAAOlK,GAMhBkK,EAAM5Z,UAAU+X,cAAgB,SAAUriB,GACxC,GAAI+C,GAAS4G,GAASxK,KAAKglB,KAC3B,OAAIphB,KAAWzD,GAAmB8P,GAAgBrM,EAAO1D,GAAGqJ,UAAU1I,IACtE2O,GAAU5L,KAAYA,EAAS6L,GAAsB7L,IAC9CA,EAAO2F,UAAU1I,KAGnBkkB,GACPlC,IAUE3V,GAAkB6C,GAAWkV,MAAQ,SAAUC,GACjD,MAAO,IAAIH,IAAMG,IAGfC,GAAmB,SAAStK,GAE9B,QAASsK,GAAgBxc,GACvB3I,KAAK2I,UAAYA,EACjBkS,EAAUnX,KAAK1D,MAQjB,QAASolB,GAAUpc,EAAUL,GAC3B3I,KAAKgJ,SAAWA,EAChBhJ,KAAK2I,UAAYA,EAGnB,QAAS0c,GAAaje,EAAGJ,GAEvB,MADAA,GAAM2D,cACC+M,GAUT,MA5BAnB,IAAS4O,EAAiBtK,GAM1BsK,EAAgBha,UAAU+X,cAAgB,SAAUla,GAClD,GAAIsc,GAAO,GAAIF,GAAUpc,EAAUhJ,KAAK2I,UACxC,OAAO2c,GAAKC,OAadH,EAAUja,UAAUoa,IAAM,WACxB,GAAIve,GAAQhH,KAAKgJ,QACjB,OAAOhJ,MAAK2I,YAAcmS,GACxBuK,EAAa,KAAMre,GACnBhH,KAAK2I,UAAU6Q,SAASxS,EAAOqe,IAG5BF,GACPtC,IAEE2C,GAAmB,GAAIL,IAAgBrK,IAWvC2K,GAAkB1V,GAAW4H,MAAQ,SAAUhP,GAEjD,MADAC,IAAYD,KAAeA,EAAYmS,IAChCnS,IAAcmS,GAAqB0K,GAAmB,GAAIL,IAAgBxc,IAG/E+c,GAAkB,SAAS7K,GAE7B,QAAS6K,GAAeC,EAAU1b,EAAItB,GACpC3I,KAAK4lB,UAAYD,EACjB3lB,KAAKyL,IAAMxB,EACXjK,KAAKkc,WAAavT,EAClBkS,EAAUnX,KAAK1D,MAGjB,QAAS6lB,GAAqBhlB,EAAGmH,EAAIiC,GACnC,MAAO,UAAuBrK,EAAGic,GAC/B,GAAInS,GAAOc,GAASxC,EAAG0B,MAAMhG,KAAKsE,EAClC,IAAI0B,IAASvJ,GAAY,MAAOU,GAAE4J,QAAQf,EAAKxJ,EAC/C,IAAIwJ,EAAKC,KAAQ,MAAO9I,GAAE8J,aAE1B,IAAI/G,GAAS8F,EAAKtK,KAElB,OAAImL,IAAWN,KACbrG,EAAS4G,GAASP,GAAIrG,EAAQhE,GAC1BgE,IAAWzD,IAAmBU,EAAE4J,QAAQ7G,EAAO1D,IAGrDW,EAAE6J,OAAO9G,OACTiY,GAAQjc,EAAI,KAWhB,MAjCA2W,IAASmP,EAAgB7K,GA0BzB6K,EAAeva,UAAU+X,cAAgB,SAAUriB,GACjD,GAAIilB,GAAOzmB,OAAOW,KAAK4lB,WACnB5d,EAAKD,EAAY+d,EAErB,OAAO9lB,MAAKkc,WAAW3B,kBAAkB,EAAGsL,EAAqBhlB,EAAGmH,EAAIhI,KAAKyL,OAGxEia,GACP7C,IAEEpa,GAAiBH,KAAK0N,IAAI,EAAG,IAAM,CAMvC7O,GAAegE,UAAUlD,IAAc,WACrC,MAAO,IAAIZ,GAAerH,KAAKiH,KASjCI,EAAe8D,UAAUlD,IAAc,WACrC,MAAOjI,OAGTqH,EAAe8D,UAAUzB,KAAO,WAC9B,MAAO1J,MAAKuH,GAAKvH,KAAKsH,IAAOqC,MAAM,EAAOvK,MAAOY,KAAKiH,GAAG8e,OAAO/lB,KAAKuH,OAAUgN,IAOjF/M,EAAc2D,UAAUlD,IAAc,WACpC,MAAO,IAAIP,GAAc1H,KAAKyH,KAShCC,EAAcyD,UAAUlD,IAAc,WACpC,MAAOjI,OAGT0H,EAAcyD,UAAUzB,KAAO,WAC7B,MAAO1J,MAAKuH,GAAKvH,KAAKsH,IAAOqC,MAAM,EAAOvK,MAAOY,KAAKyH,GAAGzH,KAAKuH,OAAUgN,GAiD1E,IAAIyR,IAAiBjW,GAAW0T,KAAO,SAAUkC,EAAUM,EAAOrR,EAASjM,GACzE,GAAgB,MAAZgd,EACF,KAAM,IAAIvjB,OAAM,2BAElB,IAAI6jB,IAAU1b,GAAW0b,GACvB,KAAM,IAAI7jB,OAAM,yCAElB,IAAI6jB,EACF,GAAIC,GAASxR,GAAauR,EAAOrR,EAAS,EAG5C,OADAhM,IAAYD,KAAeA,EAAYE,IAChC,GAAI6c,IAAeC,EAAUO,EAAQvd,IAG1CG,GAAuB,SAAS+R,GAElC,QAAS/R,GAAoBM,EAAMT,GACjC3I,KAAKmmB,MAAQ/c,EACbpJ,KAAKkc,WAAavT,EAClBkS,EAAUnX,KAAK1D,MAGjB,QAAS0a,GAAe7Z,EAAGuI,GACzB,GAAI5J,GAAM4J,EAAK3J,MACf,OAAO,UAAwBG,EAAGic,GACxBrc,EAAJI,GACFiB,EAAE6J,OAAOtB,EAAKxJ,IACdic,EAAQjc,EAAI,IAEZiB,EAAE8J,eASR,MAvBA4L,IAASzN,EAAqB+R,GAmB9B/R,EAAoBqC,UAAU+X,cAAgB,SAAUriB,GACtD,MAAOb,MAAKkc,WAAW3B,kBAAkB,EAAGG,EAAe7Z,EAAGb,KAAKmmB,SAG9Drd,GACP+Z,IAQEuD,GAAsBrW,GAAWsW,UAAY,SAAUlhB,EAAOwD,GAEhE,MADAC,IAAYD,KAAeA,EAAYE,IAChC,GAAIC,IAAoB3D,EAAOwD,IAGpC2d,GAAmB,SAASzL,GAE9B,QAASyL,KACPzL,EAAUnX,KAAK1D,MAOjB,MATAuW,IAAS+P,EAAiBzL,GAK1ByL,EAAgBnb,UAAU+X,cAAgB,SAAUla,GAClD,MAAO0O,KAGF4O,GACPzD,IAEE0D,GAAmB,GAAID,IAMvBxW,GAAkBC,GAAWyW,MAAQ,WACvC,MAAOD,IAYTxW,IAAW6U,GAAK,WAEd,IAAI,GADAplB,GAAMS,UAAUR,OAAQ2J,EAAO,GAAIzJ,OAAMH,GACrCI,EAAI,EAAOJ,EAAJI,EAASA,IAAOwJ,EAAKxJ,GAAKK,UAAUL,EACnD,OAAO,IAAIkJ,IAAoBM,EAAMP,KAQvCkH,GAAW0W,gBAAkB,SAAU9d,GAErC,IAAI,GADAnJ,GAAMS,UAAUR,OAAQ2J,EAAO,GAAIzJ,OAAMH,EAAM,GAC3CI,EAAI,EAAOJ,EAAJI,EAASA,IAAOwJ,EAAKxJ,EAAI,GAAKK,UAAUL,EACvD,OAAO,IAAIkJ,IAAoBM,EAAMT,GAGvC,IAAI+d,IAAmB,SAAS7L,GAE9B,QAAS6L,GAAgB7lB,EAAG8H,GAC1B3I,KAAK2mB,GAAK9lB,EACVb,KAAK4mB,MAAQvnB,OAAO8D,KAAKtC,GACzBb,KAAKkc,WAAavT,EAClBkS,EAAUnX,KAAK1D,MAGjB,QAAS0a,GAAe7Z,EAAGuV,EAAKjT,GAC9B,MAAO,UAAuBvD,EAAGic,GAC/B,GAAIjc,EAAIuD,EAAK1D,OAAQ,CACnB,GAAI8D,GAAMJ,EAAKvD,EACfiB,GAAE6J,QAAQnH,EAAK6S,EAAI7S,KACnBsY,EAAQjc,EAAI,OAEZiB,GAAE8J,eASR,MAxBA4L,IAASmQ,EAAiB7L,GAoB1B6L,EAAgBvb,UAAU+X,cAAgB,SAAUriB,GAClD,MAAOb,MAAKkc,WAAW3B,kBAAkB,EAAGG,EAAe7Z,EAAGb,KAAK2mB,GAAI3mB,KAAK4mB,SAGvEF,GACP7D,GAQF9S,IAAW8W,MAAQ,SAAUzQ,EAAKzN,GAEhC,MADAA,KAAcA,EAAYE,IACnB,GAAI6d,IAAgBtQ,EAAKzN,GAGhC,IAAIme,IAAmB,SAASjM,GAEhC,QAASiM,GAAgBhY,EAAOnI,EAAOgC,GACrC3I,KAAK8O,MAAQA,EACb9O,KAAK+mB,WAAapgB,EAClB3G,KAAK2I,UAAYA,EACjBkS,EAAUnX,KAAK1D,MAGjB,QAASgnB,GAAclY,EAAOnI,EAAO9F,GACnC,MAAO,UAAejB,EAAGic,GACflV,EAAJ/G,GACFiB,EAAE6J,OAAOoE,EAAQlP,GACjBic,EAAQjc,EAAI,IAEZiB,EAAE8J,eAYR,MA1BA4L,IAASuQ,EAAiBjM,GAmB1BiM,EAAgB3b,UAAU+X,cAAgB,SAAUriB,GAClD,MAAOb,MAAK2I,UAAU4R,kBACpB,EACAyM,EAAchnB,KAAK8O,MAAO9O,KAAK+mB,WAAYlmB,KAIxCimB,GACPjE,GASF9S,IAAWkX,MAAQ,SAAUnY,EAAOnI,EAAOgC,GAEzC,MADAC,IAAYD,KAAeA,EAAYE,IAChC,GAAIie,IAAgBhY,EAAOnI,EAAOgC,GAG3C,IAAIue,IAAoB,SAASrM,GAE/B,QAASqM,GAAiB9nB,EAAOolB,EAAa7b,GAC5C3I,KAAKZ,MAAQA,EACbY,KAAKwkB,YAA6B,MAAfA,EAAsB,GAAKA,EAC9CxkB,KAAK2I,UAAYA,EACjBkS,EAAUnX,KAAK1D,MAQjB,MAbAuW,IAAS2Q,EAAkBrM,GAQ3BqM,EAAiB/b,UAAU+X,cAAgB,SAAUla,GACnD,GAAIsc,GAAO,GAAIvc,GAAWC,EAAUhJ,KACpC,OAAOslB,GAAKC,OAGP2B,GACPrE,GAOF9Z,GAAWoC,UAAUoa,IAAM,WAEzB,QAASyB,GAAcpnB,EAAGic,GAKxB,OAJU,KAANjc,GAAYA,EAAI,KAClBoJ,EAAS0B,OAAOtL,GAChBQ,EAAI,GAAKA,KAED,IAANA,EAAkBoJ,EAAS2B,kBAC/BkR,GAAQjc,GAPV,GAAIoJ,GAAWhJ,KAAKgJ,SAAU5J,EAAQY,KAAKiJ,OAAO7J,KAUlD,OAAOY,MAAKiJ,OAAON,UAAU4R,kBAAkBva,KAAKiJ,OAAOub,YAAawC,IAU1EjX,GAAWvG,OAAS,SAAUpK,EAAOolB,EAAa7b,GAEhD,MADAC,IAAYD,KAAeA,EAAYE,IAChC,GAAIqe,IAAiB9nB,EAAOolB,EAAa7b,GAGlD,IAAIwe,IAAkB,SAAStM,GAE7B,QAASsM,GAAe/nB,EAAOuJ,GAC7B3I,KAAKonB,OAAShoB,EACdY,KAAKkc,WAAavT,EAClBkS,EAAUnX,KAAK1D,MAUjB,QAASqlB,GAAaje,EAAGJ,GACvB,GAAI5H,GAAQ4H,EAAM,GAAIgC,EAAWhC,EAAM,EAGvC,OAFAgC,GAAS0B,OAAOtL,GAChB4J,EAAS2B,cACF+M,GAGT,MArBAnB,IAAS4Q,EAAgBtM,GAOzBsM,EAAehc,UAAU+X,cAAgB,SAAUriB,GACjD,GAAImG,IAAShH,KAAKonB,OAAQvmB,EAC1B,OAAOb,MAAKkc,aAAepB,GACzBuK,EAAa,KAAMre,GACnBhH,KAAKkc,WAAW1C,SAASxS,EAAOqe,IAU7B8B,GACPtE,IAcEwE,IALmBtX,GAAW,UAAYA,GAAWuX,KAAO,SAAUloB,EAAOuJ,GAE/E,MADAC,IAAYD,KAAeA,EAAYmS,IAChC,GAAIqM,IAAe/nB,EAAOuJ,IAGZ,SAASkS,GAE9B,QAASwM,GAAgB/mB,EAAOqI,GAC9B3I,KAAKunB,OAASjnB,EACdN,KAAKkc,WAAavT,EAClBkS,EAAUnX,KAAK1D,MAUjB,QAASqlB,GAAaje,EAAGJ,GACvB,GAAI9G,GAAI8G,EAAM,GAAInG,EAAImG,EAAM,EAE5B,OADAnG,GAAE4J,QAAQvK,GACHwX,GAGT,MApBAnB,IAAS8Q,EAAiBxM,GAO1BwM,EAAgBlc,UAAU+X,cAAgB,SAAUriB,GAClD,GAAImG,IAAShH,KAAKunB,OAAQ1mB,EAC1B,OAAOb,MAAKkc,aAAepB,GACzBuK,EAAa,KAAMre,GACnBhH,KAAKkc,WAAW1C,SAASxS,EAAOqe,IAS7BgC,GACPxE,KASE5S,GAAkBF,GAAW,SAAW,SAAUzP,EAAOqI,GAE3D,MADAC,IAAYD,KAAeA,EAAYmS,IAChC,GAAIuM,IAAgB/mB,EAAOqI,IAGhC6e,GAAmB,SAAU3M,GAE/B,QAAS2M,GAAgB1mB,EAAQmJ,GAC/BjK,KAAKc,OAASA,EACdd,KAAKyL,IAAMxB,EACX4Q,EAAUnX,KAAK1D,MAUjB,MAdAuW,IAASiR,EAAiB3M,GAO1B2M,EAAgBrc,UAAU+X,cAAgB,SAAUriB,GAClD,GAAI4mB,GAAK,GAAIzZ,IAA8BZ,EAAe,GAAIG,GAG9D,OAFAH,GAAaa,cAAcwZ,GAC3BA,EAAGxZ,cAAcjO,KAAKc,OAAOyI,UAAU,GAAIme,IAAc7mB,EAAGuM,EAAcpN,KAAKyL,OACxE2B,GAGFoa,GACP3E,IAEE6E,GAAiB,SAAS7M,GAE5B,QAAS6M,GAAc7mB,EAAGuG,EAAG6C,GAC3BjK,KAAK2mB,GAAK9lB,EACVb,KAAKiH,GAAKG,EACVpH,KAAKyL,IAAMxB,EACX4Q,EAAUnX,KAAK1D,MAejB,MApBAuW,IAASmR,EAAe7M,GAQxB6M,EAAcvc,UAAUzB,KAAO,SAAUG,GAAK7J,KAAK2mB,GAAGjc,OAAOb,IAC7D6d,EAAcvc,UAAUmW,UAAY,WAAc,MAAOthB,MAAK2mB,GAAGhc,eACjE+c,EAAcvc,UAAU7K,MAAQ,SAAUJ,GACxC,GAAI0D,GAAS4G,GAASxK,KAAKyL,KAAKvL,EAChC,IAAI0D,IAAWzD,GAAY,MAAOH,MAAK2mB,GAAGlc,QAAQ7G,EAAO1D,EACzDsP,IAAU5L,KAAYA,EAAS6L,GAAsB7L,GAErD,IAAI6I,GAAI,GAAIuB,GACZhO,MAAKiH,GAAGgH,cAAcxB,GACtBA,EAAEwB,cAAcrK,EAAO2F,UAAUvJ,KAAK2mB,MAGjCe,GACPtG,GAOFlB,IAAgB,SAAW,SAAUyH,GACnC,MAAOpd,IAAWod,GAAmB,GAAIH,IAAgBxnB,KAAM2nB,GAAmBC,IAAiB5nB,KAAM2nB,IAQ3G,IAAIC,IAAkB7X,GAAW,SAAW,WAC1C,GAAIyP,EACJ,IAAI7f,MAAM+F,QAAQzF,UAAU,IAC1Buf,EAAQvf,UAAU,OACb,CACL,GAAIT,GAAMS,UAAUR,MACpB+f,GAAQ,GAAI7f,OAAMH,EAClB,KAAI,GAAII,GAAI,EAAOJ,EAAJI,EAASA,IAAO4f,EAAM5f,GAAKK,UAAUL,GAEtD,MAAO+kB,IAAanF,GAAO0E,aAY7BhE,IAAgB2H,cAAgB,WAE9B,IAAI,GADAroB,GAAMS,UAAUR,OAAQ2J,EAAO,GAAIzJ,OAAMH,GACrCI,EAAI,EAAOJ,EAAJI,EAASA,IAAOwJ,EAAKxJ,GAAKK,UAAUL,EAMnD,OALID,OAAM+F,QAAQ0D,EAAK,IACrBA,EAAK,GAAGrI,QAAQf,MAEhBoJ,EAAKrI,QAAQf,MAER6nB,GAAc9nB,MAAMC,KAAMoJ,GAUnC,IAAI0e,IAA2B,SAASjN,GAEtC,QAASiN,GAAwBC,EAAQC,GACvChoB,KAAKioB,QAAUF,EACf/nB,KAAKkoB,IAAMF,EACXnN,EAAUnX,KAAK1D,MAwBjB,MA5BAuW,IAASuR,EAAyBjN,GAOlCiN,EAAwB3c,UAAU+X,cAAgB,SAASla,GAWzD,IAAK,GAVDxJ,GAAMQ,KAAKioB,QAAQxoB,OACnB0oB,EAAgB,GAAIxoB,OAAMH,GAE1BwH,GACFsI,SAAU5I,EAAgBlH,EAAK0J,GAC/BiI,aAAa,EACbG,OAAQ5K,EAAgBlH,EAAK0J,GAC7BgI,OAAQ,GAAIvR,OAAMH,IAGXI,EAAI,EAAOJ,EAAJI,EAASA,IAAK,CAC5B,GAAIkB,GAASd,KAAKioB,QAAQroB,GAAIwoB,EAAM,GAAIpa,GACxCma,GAAcvoB,GAAKwoB,EACnB5Y,GAAU1O,KAAYA,EAAS2O,GAAsB3O,IACrDsnB,EAAIna,cAAcnN,EAAOyI,UAAU,GAAI8e,IAAsBrf,EAAUpJ,EAAGI,KAAKkoB,IAAKlhB,KAGtF,MAAO,IAAIyR,IAAe0P,IAGrBL,GACPjF,IAEEwF,GAAyB,SAAUxN,GAErC,QAASwN,GAAsBxnB,EAAGjB,EAAGooB,EAAIhhB,GACvChH,KAAK2mB,GAAK9lB,EACVb,KAAKuH,GAAK3H,EACVI,KAAKkoB,IAAMF,EACXhoB,KAAKgc,OAAShV,EACd6T,EAAUnX,KAAK1D,MAGjB,QAASsoB,GAAW1oB,GAClB,MAAO,UAAUiK,EAAG0e,GAClB,MAAOA,KAAM3oB,GAyBjB,MApCA2W,IAAS8R,EAAuBxN,GAehCwN,EAAsBld,UAAUzB,KAAO,SAAUG,GAG/C,GAFA7J,KAAKgc,OAAO9K,OAAOlR,KAAKuH,IAAMsC,EAC9B7J,KAAKgc,OAAO1M,SAAStP,KAAKuH,KAAM,EAC5BvH,KAAKgc,OAAO7K,cAAgBnR,KAAKgc,OAAO7K,YAAcnR,KAAKgc,OAAO1M,SAAS8B,MAAMC,KAAY,CAC/F,GAAIX,GAAMlG,GAASxK,KAAKkoB,KAAKnoB,MAAM,KAAMC,KAAKgc,OAAO9K,OACrD,IAAIR,IAAQvQ,GAAY,MAAOH,MAAK2mB,GAAGlc,QAAQiG,EAAIxQ,EACnDF,MAAK2mB,GAAGjc,OAAOgG,OACN1Q,MAAKgc,OAAO1K,OAAOkX,OAAOF,EAAWtoB,KAAKuH,KAAK6J,MAAMC,KAC9DrR,KAAK2mB,GAAGhc,eAIZ0d,EAAsBld,UAAU7K,MAAQ,SAAUJ,GAChDF,KAAK2mB,GAAGlc,QAAQvK,IAGlBmoB,EAAsBld,UAAUmW,UAAY,WAC1CthB,KAAKgc,OAAO1K,OAAOtR,KAAKuH,KAAM,EAC9BvH,KAAKgc,OAAO1K,OAAOF,MAAMC,KAAarR,KAAK2mB,GAAGhc,eAGzC0d,GACPjH,IAUEyG,GAAgB9X,GAAW8X,cAAgB,WAE7C,IAAI,GADAroB,GAAMS,UAAUR,OAAQ2J,EAAO,GAAIzJ,OAAMH,GACrCI,EAAI,EAAOJ,EAAJI,EAASA,IAAOwJ,EAAKxJ,GAAKK,UAAUL,EACnD,IAAIqR,GAAiB1G,GAAWnB,EAAK5J,EAAM,IAAM4J,EAAK7C,MAAQ4C,CAE9D,OADAxJ,OAAM+F,QAAQ0D,EAAK,MAAQA,EAAOA,EAAK,IAChC,GAAI0e,IAAwB1e,EAAM6H,GAO3CiP,IAAgB6D,OAAS,WACvB,IAAI,GAAI3a,MAAWxJ,EAAI,EAAGJ,EAAMS,UAAUR,OAAYD,EAAJI,EAASA,IAAOwJ,EAAK1H,KAAKzB,UAAUL,GAEtF,OADAwJ,GAAKrI,QAAQf,MACNyoB,GAAiB1oB,MAAM,KAAMqJ,GAGtC,IAAIsf,IAAkB,SAAS7N,GAE7B,QAAS6N,GAAethB,EAAG6C,GACzBjK,KAAKiH,GAAKG,EACVpH,KAAKyL,IAAMxB,EACX4Q,EAAUnX,KAAK1D,MAOjB,MAXAuW,IAASmS,EAAgB7N,GAOzB6N,EAAevd,UAAUzB,KAAO,SAAUG,GAAK7J,KAAKiH,GAAGpG,EAAE6J,OAAOb,IAChE6e,EAAevd,UAAU7K,MAAQ,SAAUJ,GAAKF,KAAKiH,GAAGpG,EAAE4J,QAAQvK,IAClEwoB,EAAevd,UAAUmW,UAAY,WAActhB,KAAKiH,GAAGrH,IAAKI,KAAKyL,IAAIzL,KAAKiH,KAEvEyhB,GACPtH,IAEEuH,GAAoB,SAAS9N,GAE/B,QAAS8N,GAAiB/R,GACxB5W,KAAK4oB,SAAWhS,EAChBiE,EAAUnX,KAAK1D,MAGjB,QAASua,GAAmBvT,EAAO6U,GACjC,IAAI7U,EAAM8Q,WAAW5Q,WAArB,CACA,GAAIF,EAAMpH,IAAMoH,EAAM4P,QAAQnX,OAAU,MAAOuH,GAAMnG,EAAE8J,aAGvD,IAAIkZ,GAAe7c,EAAM4P,QAAQ5P,EAAMpH,EACvC4P,IAAUqU,KAAkBA,EAAepU,GAAsBoU,GAEjE,IAAIpX,GAAI,GAAIuB,GACZhH,GAAMoG,aAAaa,cAAcxB,GACjCA,EAAEwB,cAAc4V,EAAata,UAAU,GAAImf,IAAe1hB,EAAO6U,MAkBnE,MAlCAtF,IAASoS,EAAkB9N,GAmB3B8N,EAAiBxd,UAAU+X,cAAgB,SAASriB,GAClD,GAAIuM,GAAe,GAAIG,IACnBuK,EAAaL,GAAiBxE,IAC9BjM,GACFnG,EAAGA,EACHjB,EAAG,EACHwN,aAAcA,EACd0K,WAAYA,EACZlB,QAAS5W,KAAK4oB,UAGZtb,EAAawN,GAAmBP,kBAAkBvT,EAAOuT,EAC7D,OAAO,IAAI9B,KAAgBrL,EAAc0K,EAAYxK,KAGhDqb,GACP9F,IAOE4F,GAAmB1Y,GAAWgU,OAAS,WACzC,GAAI3a,EACJ,IAAIzJ,MAAM+F,QAAQzF,UAAU,IAC1BmJ,EAAOnJ,UAAU,OACZ,CACLmJ,EAAO,GAAIzJ,OAAMM,UAAUR,OAC3B,KAAI,GAAIG,GAAI,EAAGJ,EAAMS,UAAUR,OAAYD,EAAJI,EAASA,IAAOwJ,EAAKxJ,GAAKK,UAAUL,GAE7E,MAAO,IAAI+oB,IAAiBvf,GAO9B8W,IAAgB2I,UAAY,WAC1B,MAAO7oB,MAAK8oB,MAAM,GAGpB,IAAIC,IAAmB,SAAUlO,GAG/B,QAASkO,GAAgBjoB,EAAQkoB,GAC/BhpB,KAAKc,OAASA,EACdd,KAAKgpB,cAAgBA,EACrBnO,EAAUnX,KAAK1D,MASjB,MAdAuW,IAASwS,EAAiBlO,GAQ1BkO,EAAgB5d,UAAU+X,cAAgB,SAASla,GACjD,GAAIigB,GAAI,GAAIld,GAEZ,OADAkd,GAAEhd,IAAIjM,KAAKc,OAAOyI,UAAU,GAAI2f,IAAclgB,EAAUhJ,KAAKgpB,cAAeC,KACrEA,GAGFF,GAEPlG,IAEEqG,GAAiB,SAAUrO,GAC7B,QAASqO,GAAcroB,EAAG0N,EAAK0a,GAC7BjpB,KAAKa,EAAIA,EACTb,KAAKuO,IAAMA,EACXvO,KAAKipB,EAAIA,EACTjpB,KAAK2J,MAAO,EACZ3J,KAAKyN,KACLzN,KAAKmpB,YAAc,EACnBtO,EAAUnX,KAAK1D,MAuBjB,QAASqjB,GAAcpa,EAAQmf,GAC7BpoB,KAAKiJ,OAASA,EACdjJ,KAAKooB,IAAMA,EACXvN,EAAUnX,KAAK1D,MAiBjB,MAxCAuW,IAAS2S,EAAerO,GAExBqO,EAAc/d,UAAUie,gBAAkB,SAAUpS,GAClD,GAAIoR,GAAM,GAAIpa,GACdhO,MAAKipB,EAAEhd,IAAImc,GACX5Y,GAAUwH,KAAQA,EAAKvH,GAAsBuH,IAC7CoR,EAAIna,cAAc+I,EAAGzN,UAAU,GAAI8Z,GAAcrjB,KAAMooB,MAGzDc,EAAc/d,UAAUzB,KAAO,SAAU2f,GACpCrpB,KAAKmpB,YAAcnpB,KAAKuO,KACzBvO,KAAKmpB,cACLnpB,KAAKopB,gBAAgBC,IAErBrpB,KAAKyN,EAAE/L,KAAK2nB,IAGhBH,EAAc/d,UAAU7K,MAAQ,SAAUJ,GAAKF,KAAKa,EAAE4J,QAAQvK,IAC9DgpB,EAAc/d,UAAUmW,UAAY,WAActhB,KAAK2J,MAAO,EAA2B,IAArB3J,KAAKmpB,aAAqBnpB,KAAKa,EAAE8J,eAQrG4L,GAAS8M,EAAexI,GAExBwI,EAAclY,UAAUzB,KAAO,SAAUG,GAAK7J,KAAKiJ,OAAOpI,EAAE6J,OAAOb,IACnEwZ,EAAclY,UAAU7K,MAAQ,SAAUJ,GAAKF,KAAKiJ,OAAOpI,EAAE4J,QAAQvK,IACrEmjB,EAAclY,UAAUmW,UAAY,WAClCthB,KAAKiJ,OAAOggB,EAAEha,OAAOjP,KAAKooB,KACtBpoB,KAAKiJ,OAAOwE,EAAEhO,OAAS,EACzBO,KAAKiJ,OAAOmgB,gBAAgBppB,KAAKiJ,OAAOwE,EAAEY,UAE1CrO,KAAKiJ,OAAOkgB,cACZnpB,KAAKiJ,OAAOU,MAAoC,IAA5B3J,KAAKiJ,OAAOkgB,aAAqBnpB,KAAKiJ,OAAOpI,EAAE8J,gBAIhEue,GACP9H,GAQFlB,IAAgB4I,MAAQ,SAAUQ,GAChC,MAAuC,gBAAzBA,GACZC,GAAgBvpB,KAAMspB,GACtB,GAAIP,IAAgB/oB,KAAMspB,GAQ9B,IAAIC,IAAkBxZ,GAAW+Y,MAAQ,WACvC,GAAIngB,GAAyB/I,EAAdgX,KAAiBpX,EAAMS,UAAUR,MAChD,IAAKQ,UAAU,GAGR,GAAI2I,GAAY3I,UAAU,IAE/B,IADA0I,EAAY1I,UAAU,GAClBL,EAAI,EAAOJ,EAAJI,EAASA,IAAOgX,EAAQlV,KAAKzB,UAAUL,QAGlD,KADA+I,EAAYmS,GACRlb,EAAI,EAAOJ,EAAJI,EAASA,IAAOgX,EAAQlV,KAAKzB,UAAUL,QANlD,KADA+I,EAAYmS,GACRlb,EAAI,EAAOJ,EAAJI,EAASA,IAAOgX,EAAQlV,KAAKzB,UAAUL,GAWpD,OAHID,OAAM+F,QAAQkR,EAAQ,MACxBA,EAAUA,EAAQ,IAEblO,EAAaC,EAAWiO,GAAS4S,YAGtCC,GAAiB7W,GAAG6W,eAAiB,SAASC,GAChD1pB,KAAK2pB,YAAcD,EACnB1pB,KAAKwE,QAAU,uDACfpC,MAAMsB,KAAK1D,MAEbypB,IAAete,UAAY9L,OAAOwU,OAAOzR,MAAM+I,WAC/Cse,GAAete,UAAU5G,KAAO,gBAEhC,IAAIqlB,IAA6B,SAAS/O,GAExC,QAAS+O,GAA0B9oB,GACjCd,KAAKc,OAASA,EACd+Z,EAAUnX,KAAK1D,MAcjB,MAjBAuW,IAASqT,EAA2B/O,GAMpC+O,EAA0Bze,UAAU+X,cAAgB,SAAUriB,GAC5D,GAAIuZ,GAAQ,GAAIrO,IACd8d,EAAI,GAAI7b,IACRhH,GAAUqa,WAAW,EAAOqI,UAAY7oB,EAAGA,EAK7C,OAHAuZ,GAAMnO,IAAI4d,GACVA,EAAE5b,cAAcjO,KAAKc,OAAOyI,UAAU,GAAIugB,IAAwB1P,EAAOpT,KAElEoT,GAGFwP,GACP/G,IAEEiH,GAA2B,SAASjP,GAEtC,QAASiP,GAAwB1P,EAAOpT,GACtChH,KAAK+pB,OAAS3P,EACdpa,KAAKgc,OAAShV,EACd6T,EAAUnX,KAAK1D,MAGjB,QAASgqB,GAAcnpB,EAAG6oB,GACF,IAAlBA,EAAOjqB,OACToB,EAAE8J,cACyB,IAAlB+e,EAAOjqB,OAChBoB,EAAE4J,QAAQif,EAAO,IAEjB7oB,EAAE4J,QAAQ,GAAIgf,IAAeC,IAyBjC,QAASrG,GAAc4G,EAAO7P,EAAOpT,GACnChH,KAAKkqB,OAASD,EACdjqB,KAAK+pB,OAAS3P,EACdpa,KAAKgc,OAAShV,EACd6T,EAAUnX,KAAK1D,MAcjB,MAxDAuW,IAASuT,EAAyBjP,GAiBlCiP,EAAwB3e,UAAUzB,KAAO,SAAUG,GACjD,GAAIogB,GAAQ,GAAIjc,GAChBhO,MAAK+pB,OAAO9d,IAAIge,GAGhBza,GAAU3F,KAAOA,EAAI4F,GAAsB5F,IAC3CogB,EAAMhc,cAAcpE,EAAEN,UAAU,GAAI8Z,GAAc4G,EAAOjqB,KAAK+pB,OAAQ/pB,KAAKgc,WAG7E8N,EAAwB3e,UAAU7K,MAAQ,SAAUJ,GAClDF,KAAKgc,OAAO0N,OAAOhoB,KAAKxB,GACxBF,KAAKgc,OAAOqF,WAAY,EACD,IAAvBrhB,KAAK+pB,OAAOtqB,QAAgBuqB,EAAchqB,KAAKgc,OAAOnb,EAAGb,KAAKgc,OAAO0N,SAGvEI,EAAwB3e,UAAUmW,UAAY,WAC5CthB,KAAKgc,OAAOqF,WAAY,EACD,IAAvBrhB,KAAK+pB,OAAOtqB,QAAgBuqB,EAAchqB,KAAKgc,OAAOnb,EAAGb,KAAKgc,OAAO0N,SAGvEnT,GAAS8M,EAAexI,GAQxBwI,EAAclY,UAAUzB,KAAO,SAAUG,GAAK7J,KAAKgc,OAAOnb,EAAE6J,OAAOb,IACnEwZ,EAAclY,UAAU7K,MAAQ,SAAUJ,GACxCF,KAAKgc,OAAO0N,OAAOhoB,KAAKxB,GACxBF,KAAK+pB,OAAO9a,OAAOjP,KAAKkqB,QACxBlqB,KAAKgc,OAAOqF,WAAoC,IAAvBrhB,KAAK+pB,OAAOtqB,QAAgBuqB,EAAchqB,KAAKgc,OAAOnb,EAAGb,KAAKgc,OAAO0N,SAEhGrG,EAAclY,UAAUmW,UAAY,WAClCthB,KAAK+pB,OAAO9a,OAAOjP,KAAKkqB,QACxBlqB,KAAKgc,OAAOqF,WAAoC,IAAvBrhB,KAAK+pB,OAAOtqB,QAAgBuqB,EAAchqB,KAAKgc,OAAOnb,EAAGb,KAAKgc,OAAO0N,SAGzFI,GACP1I,GAaFrR,IAAWoa,gBAAkB,WAC3B,GAAI/gB,EACJ,IAAIzJ,MAAM+F,QAAQzF,UAAU,IAC1BmJ,EAAOnJ,UAAU,OACZ,CACL,GAAIT,GAAMS,UAAUR,MACpB2J,GAAO,GAAIzJ,OAAMH,EACjB,KAAI,GAAII,GAAI,EAAOJ,EAAJI,EAASA,IAAOwJ,EAAKxJ,GAAKK,UAAUL,GAErD,GAAIkB,GAAS4H,EAAa,KAAMU,EAChC,OAAO,IAAIwgB,IAA0B9oB,GAGvC,IAAIspB,IAAsB,SAAUvP,GAGlC,QAASuP,GAAmBtpB,GAC1Bd,KAAKc,OAASA,EACd+Z,EAAUnX,KAAK1D,MAUjB,MAdAuW,IAAS6T,EAAoBvP,GAO7BuP,EAAmBjf,UAAU+X,cAAgB,SAAUriB,GACrD,GAAIooB,GAAI,GAAIld,IAAuB8d,EAAI,GAAI7b,GAG3C,OAFAib,GAAEhd,IAAI4d,GACNA,EAAE5b,cAAcjO,KAAKc,OAAOyI,UAAU,GAAI8gB,IAAiBxpB,EAAGooB,KACvDA,GAGFmB,GACPvH,IAEEwH,GAAoB,SAAUxP,GAChC,QAASwP,GAAiBxpB,EAAGooB,GAC3BjpB,KAAKa,EAAIA,EACTb,KAAKipB,EAAIA,EACTjpB,KAAK2J,MAAO,EACZkR,EAAUnX,KAAK1D,MAqBjB,QAASqjB,GAAcpa,EAAQmf,GAC7BpoB,KAAKiJ,OAASA,EACdjJ,KAAKooB,IAAMA,EACXvN,EAAUnX,KAAK1D,MAgBjB,MArCAuW,IAAS8T,EAAkBxP,GAE3BwP,EAAiBlf,UAAUzB,KAAO,SAAS2f,GACzC,GAAIjB,GAAM,GAAIpa,GACdhO,MAAKipB,EAAEhd,IAAImc,GACX5Y,GAAU6Z,KAAiBA,EAAc5Z,GAAsB4Z,IAC/DjB,EAAIna,cAAcob,EAAY9f,UAAU,GAAI8Z,GAAcrjB,KAAMooB,MAGlEiC,EAAiBlf,UAAU7K,MAAQ,SAAUJ,GAC3CF,KAAKa,EAAE4J,QAAQvK,IAGjBmqB,EAAiBlf,UAAUmW,UAAY,WACrCthB,KAAK2J,MAAO,EACM,IAAlB3J,KAAKipB,EAAExpB,QAAgBO,KAAKa,EAAE8J,eAShC4L,GAAS8M,EAAexI,GAExBwI,EAAclY,UAAUzB,KAAO,SAAUG,GACvC7J,KAAKiJ,OAAOpI,EAAE6J,OAAOb,IAEvBwZ,EAAclY,UAAU7K,MAAQ,SAAUJ,GACxCF,KAAKiJ,OAAOpI,EAAE4J,QAAQvK,IAExBmjB,EAAclY,UAAUmW,UAAY,WAClCthB,KAAKiJ,OAAOggB,EAAEha,OAAOjP,KAAKooB,KAC1BpoB,KAAKiJ,OAAOU,MAAiC,IAAzB3J,KAAKiJ,OAAOggB,EAAExpB,QAAgBO,KAAKiJ,OAAOpI,EAAE8J,eAG3D0f,GACPjJ,GAMFlB,IAAgBsJ,SAAW,WACzB,MAAO,IAAIY,IAAmBpqB,MAGhC,IAAIsqB,IAAuB,SAASzP,GAGlC,QAASyP,GAAoBxpB,EAAQ+B,GACnC7C,KAAKiH,GAAKnG,EACVd,KAAK2mB,GAAKnX,GAAU3M,GAAS4M,GAAsB5M,GAASA,EAC5D7C,KAAKuqB,OAAQ,EACb1P,EAAUnX,KAAK1D,MAejB,MArBAuW,IAAS+T,EAAqBzP,GAS9ByP,EAAoBnf,UAAU+X,cAAgB,SAASriB,GACrD,GAAI2pB,GAAmB,GAAIxc,GAC3Bwc,GAAiBvc,cAAcjO,KAAKiH,GAAGsC,UAAU,GAAIkhB,IAAwB5pB,EAAGb,QAEhFwP,GAAUxP,KAAK2mB,MAAQ3mB,KAAK2mB,GAAKlX,GAAsBzP,KAAK2mB,IAE5D,IAAI+D,GAAoB,GAAI1c,GAG5B,OAFA0c,GAAkBzc,cAAcjO,KAAK2mB,GAAGpd,UAAU,GAAIohB,IAAuB9pB,EAAGb,KAAM0qB,KAE/E,GAAIlc,IAAiBgc,EAAkBE,IAGzCJ,GACPzH,IAEE4H,GAA2B,SAAS5P,GAEtC,QAAS4P,GAAwB5pB,EAAGkJ,GAClC/J,KAAK2mB,GAAK9lB,EACVb,KAAK4qB,GAAK7gB,EACV8Q,EAAUnX,KAAK1D,MAejB,MAnBAuW,IAASkU,EAAyB5P,GAOlC4P,EAAwBtf,UAAUzB,KAAO,SAAUG,GACjD7J,KAAK4qB,GAAGL,OAASvqB,KAAK2mB,GAAGjc,OAAOb,IAGlC4gB,EAAwBtf,UAAU7K,MAAQ,SAAUwK,GAClD9K,KAAK2mB,GAAGlc,QAAQK,IAGlB2f,EAAwBtf,UAAUR,YAAc,WAC9C3K,KAAK4qB,GAAGL,OAASvqB,KAAK2mB,GAAGhc,eAGpB8f,GACPrJ,IAEEuJ,GAA0B,SAAS9P,GAErC,QAAS8P,GAAuB9pB,EAAGkJ,EAAGkN,GACpCjX,KAAK2mB,GAAK9lB,EACVb,KAAK4qB,GAAK7gB,EACV/J,KAAK6qB,GAAK5T,EACV4D,EAAUnX,KAAK1D,MAgBjB,MArBAuW,IAASoU,EAAwB9P,GAQjC8P,EAAuBxf,UAAUzB,KAAO,WACtC1J,KAAK4qB,GAAGL,OAAQ,EAChBvqB,KAAK6qB,GAAG1b,WAGVwb,EAAuBxf,UAAU7K,MAAQ,SAAUwK,GACjD9K,KAAK2mB,GAAGlc,QAAQK,IAGlB6f,EAAuBxf,UAAUR,YAAc,WAC7C3K,KAAK6qB,GAAG1b,WAGHwb,GACPvJ,GAOFlB,IAAgB4K,UAAY,SAAUjoB,GACpC,MAAO,IAAIynB,IAAoBtqB,KAAM6C,GAGvC,IAAIkoB,IAAoB,SAASlQ,GAE/B,QAASkQ,GAAiBjqB,GACxBd,KAAKc,OAASA,EACd+Z,EAAUnX,KAAK1D,MASjB,QAASgrB,GAAenqB,EAAGopB,GACzBjqB,KAAKa,EAAIA,EACTb,KAAKiqB,MAAQA,EACbjqB,KAAKirB,SAAU,EACfjrB,KAAKkrB,OAAS,EACdlrB,KAAKmrB,WAAY,EACjB/J,GAAiB1d,KAAK1D,MAqBxB,QAASqjB,GAAcpa,EAAQnC,GAC7B9G,KAAKiJ,OAASA,EACdjJ,KAAK8G,GAAKA,EACVsa,GAAiB1d,KAAK1D,MAiBxB,MA3DAuW,IAASwU,EAAkBlQ,GAM3BkQ,EAAiB5f,UAAU+X,cAAgB,SAAUriB,GACnD,GAAIopB,GAAQ,GAAI1c,IAAoBnG,EAAIpH,KAAKc,OAAOyI,UAAU,GAAIyhB,GAAenqB,EAAGopB,GACpF,OAAO,IAAIzb,IAAiBpH,EAAG6iB,IAGjC1T,GAASyU,EAAgB5J,IAUzB4J,EAAe7f,UAAUzB,KAAO,SAAU2f,GACxC,GAAI5c,GAAI,GAAIuB,IAA8BlH,IAAO9G,KAAKkrB,MACtDlrB,MAAKmrB,WAAY,EACjBnrB,KAAKiqB,MAAMhc,cAAcxB,GACzB+C,GAAU6Z,KAAiBA,EAAc5Z,GAAsB4Z,IAC/D5c,EAAEwB,cAAcob,EAAY9f,UAAU,GAAI8Z,GAAcrjB,KAAM8G,MAGhEkkB,EAAe7f,UAAU7K,MAAQ,SAAUJ,GACzCF,KAAKa,EAAE4J,QAAQvK,IAGjB8qB,EAAe7f,UAAUmW,UAAY,WACnCthB,KAAKirB,SAAU,GACdjrB,KAAKmrB,WAAanrB,KAAKa,EAAE8J,eAG5B4L,GAAS8M,EAAejC,IAMxBiC,EAAclY,UAAUzB,KAAO,SAAUG,GACvC7J,KAAKiJ,OAAOiiB,SAAWlrB,KAAK8G,IAAM9G,KAAKiJ,OAAOpI,EAAE6J,OAAOb,IAGzDwZ,EAAclY,UAAU7K,MAAQ,SAAUJ,GACxCF,KAAKiJ,OAAOiiB,SAAWlrB,KAAK8G,IAAM9G,KAAKiJ,OAAOpI,EAAE4J,QAAQvK,IAG1DmjB,EAAclY,UAAUmW,UAAY,WAC9BthB,KAAKiJ,OAAOiiB,SAAWlrB,KAAK8G,KAC9B9G,KAAKiJ,OAAOkiB,WAAY,EACxBnrB,KAAKiJ,OAAOgiB,SAAWjrB,KAAKiJ,OAAOpI,EAAE8J,gBAIlCogB,GACPlI,GAMF3C,IAAgB,UAAYA,GAAgBkL,aAAe,WACzD,MAAO,IAAIL,IAAiB/qB,MAG9B,IAAIqrB,IAAuB,SAASxQ,GAGlC,QAASwQ,GAAoBvqB,EAAQ+B,GACnC7C,KAAKc,OAASA,EACdd,KAAK6C,MAAQ2M,GAAU3M,GAAS4M,GAAsB5M,GAASA,EAC/DgY,EAAUnX,KAAK1D,MAUjB,MAfAuW,IAAS8U,EAAqBxQ,GAQ9BwQ,EAAoBlgB,UAAU+X,cAAgB,SAASriB,GACrD,MAAO,IAAI2N,IACTxO,KAAKc,OAAOyI,UAAU1I,GACtBb,KAAK6C,MAAM0G,UAAU,GAAI+hB,IAAkBzqB,MAIxCwqB,GACPxI,IAEEyI,GAAqB,SAASzQ,GAEhC,QAASyQ,GAAkBzqB,GACzBb,KAAK2mB,GAAK9lB,EACVga,EAAUnX,KAAK1D,MAajB,MAhBAuW,IAAS+U,EAAmBzQ,GAM5ByQ,EAAkBngB,UAAUzB,KAAO,WACjC1J,KAAK2mB,GAAGhc,eAGV2gB,EAAkBngB,UAAU7K,MAAQ,SAAUwK,GAC5C9K,KAAK2mB,GAAGlc,QAAQK,IAGlBwgB,EAAkBngB,UAAUR,YAAcsI,GAEnCqY,GACPlK,GAOFlB,IAAgBqL,UAAY,SAAU1oB,GACpC,MAAO,IAAIwoB,IAAoBrrB,KAAM6C,GAUvC,IAAI2oB,IAA4B,SAAS3Q,GAEvC,QAAS2Q,GAAyB1qB,EAAQ8V,EAAS3F,GACjDjR,KAAKiH,GAAKnG,EACVd,KAAKyrB,IAAM7U,EACX5W,KAAKkoB,IAAMjX,EACX4J,EAAUnX,KAAK1D,MA0BjB,MA/BAuW,IAASiV,EAA0B3Q,GAQnC2Q,EAAyBrgB,UAAU+X,cAAgB,SAAUriB,GAS3D,IAAK,GARDrB,GAAMQ,KAAKyrB,IAAIhsB,OACfuH,GACFsI,SAAU5I,EAAgBlH,EAAK0J,GAC/BiI,aAAa,EACbD,OAAQ,GAAIvR,OAAMH,IAGhB8L,EAAItL,KAAKyrB,IAAIhsB,OAAQ0oB,EAAgB,GAAIxoB,OAAM2L,EAAI,GAC9C1L,EAAI,EAAO0L,EAAJ1L,EAAOA,IAAK,CAC1B,GAAIiD,GAAQ7C,KAAKyrB,IAAI7rB,GAAIwoB,EAAM,GAAIpa,GACnCwB,IAAU3M,KAAWA,EAAQ4M,GAAsB5M,IACnDulB,EAAIna,cAAcpL,EAAM0G,UAAU,GAAImiB,IAA4B7qB,EAAGjB,EAAGoH,KACxEmhB,EAAcvoB,GAAKwoB,EAGrB,GAAIuD,GAAW,GAAI3d,GAInB,OAHA2d,GAAS1d,cAAcjO,KAAKiH,GAAGsC,UAAU,GAAIqiB,IAA6B/qB,EAAGb,KAAKkoB,IAAKlhB,KACvFmhB,EAAc7c,GAAKqgB,EAEZ,GAAIlT,IAAe0P,IAGrBqD,GACP3I,IAEE6I,GAA+B,SAAU7Q,GAE3C,QAAS6Q,GAA4B7qB,EAAGjB,EAAGoH,GACzChH,KAAK2mB,GAAK9lB,EACVb,KAAKuH,GAAK3H,EACVI,KAAKgc,OAAShV,EACd6T,EAAUnX,KAAK1D,MAejB,MApBAuW,IAASmV,EAA6B7Q,GAQtC6Q,EAA4BvgB,UAAUzB,KAAO,SAAUG,GACrD7J,KAAKgc,OAAO9K,OAAOlR,KAAKuH,IAAMsC,EAC9B7J,KAAKgc,OAAO1M,SAAStP,KAAKuH,KAAM,EAChCvH,KAAKgc,OAAO7K,YAAcnR,KAAKgc,OAAO1M,SAAS8B,MAAMC,KAGvDqa,EAA4BvgB,UAAU7K,MAAQ,SAAUJ,GACtDF,KAAK2mB,GAAGlc,QAAQvK,IAGlBwrB,EAA4BvgB,UAAUmW,UAAYrO,GAE3CyY,GACPtK,IAEEwK,GAAgC,SAAU/Q,GAE5C,QAAS+Q,GAA6B/qB,EAAGmnB,EAAIhhB,GAC3ChH,KAAK2mB,GAAK9lB,EACVb,KAAKkoB,IAAMF,EACXhoB,KAAKgc,OAAShV,EACd6T,EAAUnX,KAAK1D,MAmBjB,MAxBAuW,IAASqV,EAA8B/Q,GAQvC+Q,EAA6BzgB,UAAUzB,KAAO,SAAUG,GACtD,GAAIgiB,IAAahiB,GAAGka,OAAO/jB,KAAKgc,OAAO9K,OACvC,IAAKlR,KAAKgc,OAAO7K,YAAjB,CACA,GAAIT,GAAMlG,GAASxK,KAAKkoB,KAAKnoB,MAAM,KAAM8rB,EACzC,OAAInb,KAAQvQ,GAAmBH,KAAK2mB,GAAGlc,QAAQiG,EAAIxQ,OACnDF,MAAK2mB,GAAGjc,OAAOgG,KAGjBkb,EAA6BzgB,UAAU7K,MAAQ,SAAUJ,GACvDF,KAAK2mB,GAAGlc,QAAQvK,IAGlB0rB,EAA6BzgB,UAAUmW,UAAY,WACjDthB,KAAK2mB,GAAGhc,eAGHihB,GACPxK,GAMFlB,IAAgB4L,eAAiB,WAC/B,GAAyB,IAArB7rB,UAAUR,OAAgB,KAAM,IAAI2C,OAAM,oBAG9C,KAAI,GADA5C,GAAMS,UAAUR,OAAQ2J,EAAO,GAAIzJ,OAAMH,GACrCI,EAAI,EAAOJ,EAAJI,EAASA,IAAOwJ,EAAKxJ,GAAKK,UAAUL,EACnD,IAAIqR,GAAiB1G,GAAWnB,EAAK5J,EAAM,IAAM4J,EAAK7C,MAAQ4C,CAG9D,OAFAxJ,OAAM+F,QAAQ0D,EAAK,MAAQA,EAAOA,EAAK,IAEhC,GAAIoiB,IAAyBxrB,KAAMoJ,EAAM6H,GAMlD,IAAI8a,IAAiB,SAASlR,GAE5B,QAASkR,GAAcnV,EAAS3F,GAC9BjR,KAAKiH,GAAK2P,EACV5W,KAAKkoB,IAAMjX,EACX4J,EAAUnX,KAAK1D,MAmBjB,MAvBAuW,IAASwV,EAAelR,GAOxBkR,EAAc5gB,UAAU+X,cAAgB,SAASla,GAM/C,IAAK,GALDsC,GAAItL,KAAKiH,GAAGxH,OACZ0oB,EAAgB,GAAIxoB,OAAM2L,GAC1B3B,EAAOjD,EAAgB4E,EAAGpC,GAC1BuE,EAAI/G,EAAgB4E,EAAGjC,GAElBzJ,EAAI,EAAO0L,EAAJ1L,EAAOA,IAAK,CAC1B,GAAIkB,GAASd,KAAKiH,GAAGrH,GAAIwoB,EAAM,GAAIpa,GACnCma,GAAcvoB,GAAKwoB,EACnB5Y,GAAU1O,KAAYA,EAAS2O,GAAsB3O,IACrDsnB,EAAIna,cAAcnN,EAAOyI,UAAU,GAAIyiB,IAAYhjB,EAAUpJ,EAAGI,KAAMyN,EAAG9D,KAG3E,MAAO,IAAI8O,IAAe0P,IAGrB4D,GACPlJ,IAEEmJ,GAAe,SAAUnR,GAE3B,QAASmR,GAAYnrB,EAAGjB,EAAGmK,EAAG0D,EAAGhB,GAC/BzM,KAAK2mB,GAAK9lB,EACVb,KAAKuH,GAAK3H,EACVI,KAAK4qB,GAAK7gB,EACV/J,KAAKisB,GAAKxe,EACVzN,KAAKksB,GAAKzf,EACVoO,EAAUnX,KAAK1D,MAGjB,QAASmsB,GAAStiB,GAAK,MAAOA,GAAEpK,OAAS,EACzC,QAAS2sB,GAAUviB,GAAK,MAAOA,GAAEwE,QACjC,QAASia,GAAW1oB,GAClB,MAAO,UAAUiK,EAAG0e,GAClB,MAAOA,KAAM3oB,GAyBjB,MAvCA2W,IAASyV,EAAanR,GAkBtBmR,EAAY7gB,UAAUzB,KAAO,SAAUG,GAErC,GADA7J,KAAKisB,GAAGjsB,KAAKuH,IAAI7F,KAAKmI,GAClB7J,KAAKisB,GAAG7a,MAAM+a,GAAW,CAC3B,GAAIE,GAAersB,KAAKisB,GAAG1I,IAAI6I,GAC3B1b,EAAMlG,GAASxK,KAAK4qB,GAAG1C,KAAKnoB,MAAM,KAAMssB,EAC5C,IAAI3b,IAAQvQ,GAAY,MAAOH,MAAK2mB,GAAGlc,QAAQiG,EAAIxQ,EACnDF,MAAK2mB,GAAGjc,OAAOgG,OACN1Q,MAAKksB,GAAG1D,OAAOF,EAAWtoB,KAAKuH,KAAK6J,MAAMC,KACnDrR,KAAK2mB,GAAGhc,eAIZqhB,EAAY7gB,UAAU7K,MAAQ,SAAUJ,GACtCF,KAAK2mB,GAAGlc,QAAQvK,IAGlB8rB,EAAY7gB,UAAUmW,UAAY,WAChCthB,KAAKksB,GAAGlsB,KAAKuH,KAAM,EACnBvH,KAAKksB,GAAG9a,MAAMC,KAAarR,KAAK2mB,GAAGhc,eAG9BqhB,GACP5K,GAOFlB,IAAgBoM,IAAM,WACpB,GAAyB,IAArBrsB,UAAUR,OAAgB,KAAM,IAAI2C,OAAM,oBAG9C,KAAI,GADA5C,GAAMS,UAAUR,OAAQ2J,EAAO,GAAIzJ,OAAMH,GACrCI,EAAI,EAAOJ,EAAJI,EAASA,IAAOwJ,EAAKxJ,GAAKK,UAAUL,EACnD,IAAIqR,GAAiB1G,GAAWnB,EAAK5J,EAAM,IAAM4J,EAAK7C,MAAQ4C,CAC9DxJ,OAAM+F,QAAQ0D,EAAK,MAAQA,EAAOA,EAAK,GAEvC,IAAIH,GAASjJ,IAGb,OAFAoJ,GAAKrI,QAAQkI,GAEN,GAAI8iB,IAAc3iB,EAAM6H,IASjClB,GAAWuc,IAAM,WAEf,IAAI,GADA9sB,GAAMS,UAAUR,OAAQ2J,EAAO,GAAIzJ,OAAMH,GACrCI,EAAI,EAAOJ,EAAJI,EAASA,IAAOwJ,EAAKxJ,GAAKK,UAAUL,EAC/CD,OAAM+F,QAAQ0D,EAAK,MACrBA,EAAOmB,GAAWnB,EAAK,IAAMA,EAAK,GAAG2a,OAAO3a,EAAK,IAAMA,EAAK,GAE9D,IAAI+O,GAAQ/O,EAAKiF,OACjB,OAAO8J,GAAMmU,IAAIvsB,MAAMoY,EAAO/O,GAWlC,IAAImjB,IAAyB,SAAS1R,GAEpC,QAAS0R,GAAsB3V,EAASoR,GACtChoB,KAAK4W,QAAUA,EACf5W,KAAKkoB,IAAMF,EACXnN,EAAUnX,KAAK1D,MA0BjB,MA9BAuW,IAASgW,EAAuB1R,GAOhC0R,EAAsBphB,UAAU+X,cAAgB,SAAUriB,GAUxD,IAAK,GATD+V,GAAU5W,KAAK4W,QAASpX,EAAMoX,EAAQnX,OAAQ0oB,EAAgB,GAAIxoB,OAAMH,GAExEwH,GACFyG,EAAG/G,EAAgBlH,EAAK6J,GACxBM,KAAMjD,EAAgBlH,EAAK0J,GAC3B8e,GAAIhoB,KAAKkoB,IACTrnB,EAAGA,GAGIjB,EAAI,EAAOJ,EAAJI,EAASA,KACtB,SAAUA,GACT,GAAIkB,GAAS8V,EAAQhX,GAAIwoB,EAAM,GAAIpa,KAClCyG,GAAY3T,IAAW0T,GAAW1T,MAAaA,EAASklB,GAAellB,IAExEqnB,EAAcvoB,GAAKwoB,EACnBA,EAAIna,cAAcnN,EAAOyI,UAAU,GAAIijB,IAAoBxlB,EAAOpH,MAClEA,EAGJ,OAAO,IAAI6Y,IAAe0P,IAGrBoE,GACP1J,IAEE2J,GAAuB,SAAU3R,GAEnC,QAAS2R,GAAoBplB,EAAGxH,GAC9BI,KAAKiH,GAAKG,EACVpH,KAAKuH,GAAK3H,EACVib,EAAUnX,KAAK1D,MAGjB,QAASmsB,GAAStiB,GAAK,MAAOA,GAAEpK,OAAS,EACzC,QAAS2sB,GAAUviB,GAAK,MAAOA,GAAEwE,QACjC,QAASia,GAAW1oB,GAClB,MAAO,UAAUiK,EAAG0e,GAClB,MAAOA,KAAM3oB,GAuBjB,MAlCA2W,IAASiW,EAAqB3R,GAe9B2R,EAAoBrhB,UAAUzB,KAAO,SAAUG,GAE7C,GADA7J,KAAKiH,GAAGwG,EAAEzN,KAAKuH,IAAI7F,KAAKmI,GACpB7J,KAAKiH,GAAGwG,EAAE2D,MAAM+a,GAAW,CAC7B,GAAIE,GAAersB,KAAKiH,GAAGwG,EAAE8V,IAAI6I,GAC7B1b,EAAMlG,GAASxK,KAAKiH,GAAG+gB,IAAIjoB,MAAM,KAAMssB,EAC3C,IAAI3b,IAAQvQ,GAAY,MAAOH,MAAKiH,GAAGpG,EAAE4J,QAAQiG,EAAIxQ,EACrDF,MAAKiH,GAAGpG,EAAE6J,OAAOgG,OACR1Q,MAAKiH,GAAG0C,KAAK6e,OAAOF,EAAWtoB,KAAKuH,KAAK6J,MAAMC,KACxDrR,KAAKiH,GAAGpG,EAAE8J,eAId6hB,EAAoBrhB,UAAU7K,MAAQ,SAAUJ,GAAKF,KAAKiH,GAAGpG,EAAE4J,QAAQvK,IAEvEssB,EAAoBrhB,UAAUmW,UAAY,WACxCthB,KAAKiH,GAAG0C,KAAK3J,KAAKuH,KAAM,EACxBvH,KAAKiH,GAAG0C,KAAKyH,MAAMC,KAAarR,KAAKiH,GAAGpG,EAAE8J,eAGrC6hB,GACPpL,GAOFlB,IAAgBuM,YAAc,WAC5B,GAAyB,IAArBxsB,UAAUR,OAAgB,KAAM,IAAI2C,OAAM,oBAG9C,KAAI,GADA5C,GAAMS,UAAUR,OAAQ2J,EAAO,GAAIzJ,OAAMH,GACrCI,EAAI,EAAOJ,EAAJI,EAASA,IAAOwJ,EAAKxJ,GAAKK,UAAUL,EACnD,IAAIqR,GAAiB1G,GAAWnB,EAAK5J,EAAM,IAAM4J,EAAK7C,MAAQ4C,EAE1DF,EAASjJ,IAEb,OADAoJ,GAAKrI,QAAQkI,GACN,GAAIsjB,IAAsBnjB,EAAM6H,IAWvCiP,GAAgB5W,aAAe,WAC7B,MAAO,IAAIkD,IAAoBlD,EAAatJ,MAAOA,MAGrD,IAAI0sB,IAA2B,SAAU7R,GAEvC,QAAS6R,GAAwB5rB,GAC/Bd,KAAKc,OAASA,EACd+Z,EAAUnX,KAAK1D,MAOjB,MAVAuW,IAASmW,EAAyB7R,GAMlC6R,EAAwBvhB,UAAU+X,cAAgB,SAAUriB,GAC1D,MAAOb,MAAKc,OAAOyI,UAAU,GAAIojB,IAAsB9rB,KAGlD6rB,GACP7J,IAEE8J,GAAyB,SAAU9R,GAGrC,QAAS8R,GAAsB9rB,GAC7Bb,KAAK2mB,GAAK9lB,EACVga,EAAUnX,KAAK1D,MAOjB,MAXAuW,IAASoW,EAAuB9R,GAOhC8R,EAAsBxhB,UAAUzB,KAAO,SAAUG,GAAKA,EAAEyE,OAAOtO,KAAK2mB,KACpEgG,EAAsBxhB,UAAU7K,MAAQ,SAAUJ,GAAKF,KAAK2mB,GAAGlc,QAAQvK,IACvEysB,EAAsBxhB,UAAUmW,UAAY,WAActhB,KAAK2mB,GAAGhc,eAE3DgiB,GACPvL,GAMFlB,IAAgB0M,cAAgB,WAC9B,MAAO,IAAIF,IAAwB1sB,MAGrC,IAAI6sB,IAAkC,SAAShS,GAE7C,QAASgS,GAA+B/rB,EAAQgsB,EAAO7T,GACrDjZ,KAAKc,OAASA,EACdd,KAAK8sB,MAAQA,EACb9sB,KAAKiZ,SAAWA,EAChB4B,EAAUnX,KAAK1D,MAOjB,MAZAuW,IAASsW,EAAgChS,GAQzCgS,EAA+B1hB,UAAU+X,cAAgB,SAAUriB,GACjE,MAAOb,MAAKc,OAAOyI,UAAU,GAAIwjB,IAA6BlsB,EAAGb,KAAK8sB,MAAO9sB,KAAKiZ,YAG7E4T,GACPhK,IAEEkK,GAAgC,SAASlS,GAE3C,QAASkS,GAA6BlsB,EAAGisB,EAAO7T,GAC9CjZ,KAAKa,EAAIA,EACTb,KAAK8sB,MAAQA,EACb9sB,KAAKiZ,SAAWA,EAChBjZ,KAAKgtB,eAAgB,EACrBhtB,KAAKitB,WAAa,KAClBpS,EAAUnX,KAAK1D,MA0BjB,MAjCAuW,IAASwW,EAA8BlS,GAUvCkS,EAA6B5hB,UAAUzB,KAAO,SAAUG,GACtD,GAAaqjB,GAAT3pB,EAAMsG,CACV,OAAIU,IAAWvK,KAAK8sB,SAClBvpB,EAAMiH,GAASxK,KAAK8sB,OAAOjjB,GACvBtG,IAAQpD,IAAmBH,KAAKa,EAAE4J,QAAQlH,EAAIrD,GAEhDF,KAAKgtB,gBACPE,EAAiB1iB,GAASxK,KAAKiZ,UAAUjZ,KAAKitB,WAAY1pB,GACtD2pB,IAAmB/sB,IAAmBH,KAAKa,EAAE4J,QAAQyiB,EAAehtB,QAErEF,KAAKgtB,eAAkBE,IAC1BltB,KAAKgtB,eAAgB,EACrBhtB,KAAKitB,WAAa1pB,EAClBvD,KAAKa,EAAE6J,OAAOb,MAGlBkjB,EAA6B5hB,UAAU7K,MAAQ,SAASJ,GACtDF,KAAKa,EAAE4J,QAAQvK,IAEjB6sB,EAA6B5hB,UAAUmW,UAAY,WACjDthB,KAAKa,EAAE8J,eAGFoiB,GACP3L,GAQFlB,IAAgBiN,qBAAuB,SAAUL,EAAO7T,GAEtD,MADAA,KAAaA,EAAW9F,IACjB,GAAI0Z,IAA+B7sB,KAAM8sB,EAAO7T,GAGzD,IAAImU,IAAiB,SAASvS,GAE5B,QAASuS,GAActsB,EAAQwf,EAAkB7V,EAASE,GACxD3K,KAAKc,OAASA,EACdd,KAAKqtB,IAAM/M,EACXtgB,KAAKstB,IAAM7iB,EACXzK,KAAKutB,IAAM5iB,EACXkQ,EAAUnX,KAAK1D,MAQjB,QAASqjB,GAAcxiB,EAAGkJ,GACxB/J,KAAKa,EAAIA,EACTb,KAAKwtB,GAAKzjB,EAAEsjB,KAAO9iB,GAAWR,EAAEsjB,KAC9BnM,GAAenX,EAAEsjB,KAAOpa,GAAMlJ,EAAEujB,KAAOra,GAAMlJ,EAAEwjB,KAAOta,IACtDlJ,EAAEsjB,IACJrtB,KAAKqhB,WAAY,EACjBD,GAAiB1d,KAAK1D,MAkBxB,MAtCAuW,IAAS6W,EAAcvS,GASvBuS,EAAcjiB,UAAU+X,cAAgB,SAASriB,GAC/C,MAAOb,MAAKc,OAAOyI,UAAU,GAAI8Z,GAAcxiB,EAAGb,QAGpDuW,GAAS8M,EAAejC,IASxBiC,EAAclY,UAAUzB,KAAO,SAASG,GACtC,GAAI6G,GAAMlG,GAASxK,KAAKwtB,EAAE9iB,QAAQhH,KAAK1D,KAAKwtB,EAAG3jB,EAC3C6G,KAAQvQ,IAAYH,KAAKa,EAAE4J,QAAQiG,EAAIxQ,GAC3CF,KAAKa,EAAE6J,OAAOb,IAEhBwZ,EAAclY,UAAU7K,MAAQ,SAASwK,GACvC,GAAI4F,GAAMlG,GAASxK,KAAKwtB,EAAE/iB,SAAS/G,KAAK1D,KAAKwtB,EAAG1iB,EAChD,OAAI4F,KAAQvQ,GAAmBH,KAAKa,EAAE4J,QAAQiG,EAAIxQ,OAClDF,MAAKa,EAAE4J,QAAQK,IAEjBuY,EAAclY,UAAUmW,UAAY,WAClC,GAAI5Q,GAAMlG,GAASxK,KAAKwtB,EAAE7iB,aAAajH,KAAK1D,KAAKwtB,EACjD,OAAI9c,KAAQvQ,GAAmBH,KAAKa,EAAE4J,QAAQiG,EAAIxQ,OAClDF,MAAKa,EAAE8J,eAGFyiB,GACPvK,GAUF3C,IAAgB,MAAQA,GAAgBuN,IAAMvN,GAAgBwN,SAAW,SAAUpN,EAAkB7V,EAASE,GAC5G,MAAO,IAAIyiB,IAAcptB,KAAMsgB,EAAkB7V,EAASE,IAU5DuV,GAAgByN,SAAWzN,GAAgB0N,UAAY,SAAUljB,EAAQkK,GACvE,MAAO5U,MAAKytB,IAAuB,mBAAZ7Y,GAA0B,SAAU/K,GAAKa,EAAOhH,KAAKkR,EAAS/K,IAAQa,IAU/FwV,GAAgB2N,UAAY3N,GAAgB4N,WAAa,SAAUrjB,EAASmK,GAC1E,MAAO5U,MAAKytB,IAAIxa,GAAyB,mBAAZ2B,GAA0B,SAAU1U,GAAKuK,EAAQ/G,KAAKkR,EAAS1U,IAAQuK,IAUtGyV,GAAgB6N,cAAgB7N,GAAgB8N,eAAiB,SAAUrjB,EAAaiK,GACtF,MAAO5U,MAAKytB,IAAIxa,GAAM,KAAyB,mBAAZ2B,GAA0B,WAAcjK,EAAYjH,KAAKkR,IAAcjK,GAG5G,IAAIsjB,IAAqB,SAAUpT,GAEjC,QAASoT,GAAkBntB,EAAQmJ,EAAI2K,GACrC5U,KAAKc,OAASA,EACdd,KAAKyL,IAAMiJ,GAAazK,EAAI2K,EAAS,GACrCiG,EAAUnX,KAAK1D,MAajB,QAASkuB,GAAkB9mB,EAAG6C,GAC5BjK,KAAKkH,YAAa,EAClBlH,KAAKiH,GAAKG,EACVpH,KAAKyL,IAAMxB,EAUb,MA9BAsM,IAAS0X,EAAmBpT,GAO5BoT,EAAkB9iB,UAAU+X,cAAgB,SAAUriB,GACpD,GAAI4L,GAAIjC,GAASxK,KAAKc,OAAOyI,WAAW7F,KAAK1D,KAAKc,OAAQD,EAM1D,OALI4L,KAAMtM,KACRH,KAAKyL,MACLrL,EAAQqM,EAAEvM,IAGL,GAAIguB,GAAkBzhB,EAAGzM,KAAKyL,MAQvCyiB,EAAkB/iB,UAAUgE,QAAU,WACpC,IAAKnP,KAAKkH,WAAY,CACpB,GAAIwJ,GAAMlG,GAASxK,KAAKiH,GAAGkI,SAASzL,KAAK1D,KAAKiH,GAC9CjH,MAAKyL,MACLiF,IAAQvQ,IAAYC,EAAQsQ,EAAIxQ,KAI7B+tB,GAEPpL,GAOF3C,IAAgB,WAAa,SAAU1I,EAAQ5C,GAC7C,MAAO,IAAIqZ,IAAkBjuB,KAAMwX,EAAQ5C,GAG7C,IAAIuZ,IAA4B,SAAStT,GAGvC,QAASsT,GAAyBrtB,GAChCd,KAAKc,OAASA,EACd+Z,EAAUnX,KAAK1D,MAOjB,QAASqjB,GAAcxiB,GACrBb,KAAKa,EAAIA,EACTb,KAAKqhB,WAAY,EA0BnB,MAvCA9K,IAAS4X,EAA0BtT,GAOnCsT,EAAyBhjB,UAAU+X,cAAgB,SAAUriB,GAC3D,MAAOb,MAAKc,OAAOyI,UAAU,GAAI8Z,GAAcxiB,KAOjDwiB,EAAclY,UAAUT,OAASuI,GACjCoQ,EAAclY,UAAUV,QAAU,SAAUK,GACtC9K,KAAKqhB,YACPrhB,KAAKqhB,WAAY,EACjBrhB,KAAKa,EAAE4J,QAAQK,KAGnBuY,EAAclY,UAAUR,YAAc,WAChC3K,KAAKqhB,YACPrhB,KAAKqhB,WAAY,EACjBrhB,KAAKa,EAAE8J,gBAGX0Y,EAAclY,UAAUgE,QAAU,WAAanP,KAAKqhB,WAAY,GAChEgC,EAAclY,UAAUoW,KAAO,SAAUrhB,GACvC,MAAKF,MAAKqhB,WAMH,GALLrhB,KAAKqhB,WAAY,EACjBrhB,KAAKgJ,SAASyB,QAAQvK,IACf,IAMJiuB,GACPtL,GAMF3C,IAAgBkO,eAAiB,WAC/B,MAAO,IAAID,IAAyBnuB,MAGtC,IAAIquB,IAAyB,SAAUxT,GAErC,QAASwT,GAAsBvtB,EAAQmJ,GACrCjK,KAAKc,OAASA,EACd+Z,EAAUnX,KAAK1D,MAOjB,MAVAuW,IAAS8X,EAAuBxT,GAMhCwT,EAAsBljB,UAAU+X,cAAgB,SAAUriB,GACxD,MAAOb,MAAKc,OAAOyI,UAAU,GAAI+kB,IAAoBztB,KAGhDwtB,GACPxL,IAEEyL,GAAuB,SAAUzT,GAGnC,QAASyT,GAAoBztB,GAC3Bb,KAAK2mB,GAAK9lB,EACVga,EAAUnX,KAAK1D,MAOjB,MAXAuW,IAAS+X,EAAqBzT,GAO9ByT,EAAoBnjB,UAAUzB,KAAO,SAAUG,GAAK7J,KAAK2mB,GAAGjc,OAAOiW,GAAyB9W,KAC5FykB,EAAoBnjB,UAAU7K,MAAQ,SAAUJ,GAAKF,KAAK2mB,GAAGjc,OAAOmW,GAA0B3gB,IAAKF,KAAK2mB,GAAGhc,eAC3G2jB,EAAoBnjB,UAAUmW,UAAY,WAActhB,KAAK2mB,GAAGjc,OAAOqW,MAAkC/gB,KAAK2mB,GAAGhc,eAE1G2jB,GACPlN,GAMFlB,IAAgBvS,YAAc,WAC5B,MAAO,IAAI0gB,IAAsBruB,OAQnCkgB,GAAgB1W,OAAS,SAAUgb,GACjC,MAAOD,IAAiBvkB,KAAMwkB,GAAaT,UAa7C7D,GAAgBqO,MAAQ,SAAUC,GAChC,MAAOjK,IAAiBvkB,KAAMwuB,GAAYtK,aAe5C,IAAIuK,IAAuB,SAAS5T,GAClC,QAAS6T,GAAiB1nB,GACxB,OACEE,YAAY,EACZiI,QAAS,WACFnP,KAAKkH,aACRlH,KAAKkH,YAAa,EAClBF,EAAME,YAAa,KAM3B,QAASunB,GAAoB3tB,EAAQ6tB,GACnC3uB,KAAKc,OAASA,EACdd,KAAK4uB,UAAYD,EACjB9T,EAAUnX,KAAK1D,MAsDjB,MAnDAuW,IAASkY,EAAqB5T,GAE9B4T,EAAoBtjB,UAAU+X,cAAgB,SAAUriB,GACtD,GAQEojB,GARE4K,EAAa,GAAIC,IACnBH,EAAW,GAAIG,IACfC,EAAU/uB,KAAK4uB,UAAUC,GACzBG,EAAyBD,EAAQxlB,UAAUolB,GAEzCzuB,EAAIF,KAAKc,OAAO,gBAEhBkG,GAAUE,YAAY,GAExBkG,EAAe,GAAIG,IACjBD,EAAazE,GAAuB0R,kBAAkB,KAAM,SAAUrM,EAAG2N,GAC3E,IAAI7U,EAAME,WAAV,CACA,GAAI0c,GAAc1jB,EAAEwJ,MAEpB,IAAIka,EAAYja,KAMd,YALIsa,EACFpjB,EAAE4J,QAAQwZ,GAEVpjB,EAAE8J,cAMN,IAAIkZ,GAAeD,EAAYxkB,KAC/BoQ,IAAUqU,KAAkBA,EAAepU,GAAsBoU,GAEjE,IAAIoL,GAAQ,GAAIjhB,IACZic,EAAQ,GAAIjc,GAChBZ,GAAaa,cAAc,GAAIO,IAAiByb,EAAOgF,IACvDA,EAAMhhB,cAAc4V,EAAata,UAC/B,SAASM,GAAKhJ,EAAE6J,OAAOb,IACvB,SAAUqlB,GACRjF,EAAMhc,cAAc0gB,EAASplB,UAAUsS,EAAS,SAASsT,GACvDtuB,EAAE4J,QAAQ0kB,IACT,WACDtuB,EAAE8J,iBAGJkkB,EAAWnkB,OAAOwkB,GAClBD,EAAM9f,WAER,WAAatO,EAAE8J,mBAGnB,OAAO,IAAI8N,KAAgBuW,EAAwB5hB,EAAcE,EAAYohB,EAAiB1nB,MAGzFynB,GACP5L,GAEF3C,IAAgBkP,UAAY,SAAUT,GACpC,MAAO,IAAIF,IAAoBjlB,EAAOxJ,MAAO2uB,GAe/C,IAAIU,IAAwB,SAASxU,GACnC,QAAS6T,GAAiB1nB,GACxB,OACEE,YAAY,EACZiI,QAAS,WACFnP,KAAKkH,aACRlH,KAAKkH,YAAa,EAClBF,EAAME,YAAa,KAM3B,QAASmoB,GAAqBvuB,EAAQ6tB,GACpC3uB,KAAKc,OAASA,EACdd,KAAK4uB,UAAYD,EACjB9T,EAAUnX,KAAK1D,MAsDjB,MAnDAuW,IAAS8Y,EAAsBxU,GAE/BwU,EAAqBlkB,UAAU+X,cAAgB,SAAUriB,GACvD,GAQEojB,GAREqL,EAAc,GAAIR,IACpBH,EAAW,GAAIG,IACfC,EAAU/uB,KAAK4uB,UAAUU,GACzBN,EAAyBD,EAAQxlB,UAAUolB,GAEzCzuB,EAAIF,KAAKc,OAAO,gBAEhBkG,GAAUE,YAAY,GAExBkG,EAAe,GAAIG,IACjBD,EAAazE,GAAuB0R,kBAAkB,KAAM,SAAUrM,EAAG2N,GAC3E,IAAI7U,EAAME,WAAV,CACA,GAAI0c,GAAc1jB,EAAEwJ,MAEpB,IAAIka,EAAYja,KAMd,YALIsa,EACFpjB,EAAE4J,QAAQwZ,GAEVpjB,EAAE8J,cAMN,IAAIkZ,GAAeD,EAAYxkB,KAC/BoQ,IAAUqU,KAAkBA,EAAepU,GAAsBoU,GAEjE,IAAIoL,GAAQ,GAAIjhB,IACZic,EAAQ,GAAIjc,GAChBZ,GAAaa,cAAc,GAAIO,IAAiByb,EAAOgF,IACvDA,EAAMhhB,cAAc4V,EAAata,UAC/B,SAASM,GAAKhJ,EAAE6J,OAAOb,IACvB,SAAUqlB,GAAOruB,EAAE4J,QAAQykB,IAC3B,WACEjF,EAAMhc,cAAc0gB,EAASplB,UAAUsS,EAAS,SAASsT,GACvDtuB,EAAE4J,QAAQ0kB,IACT,WACDtuB,EAAE8J,iBAGJ2kB,EAAY5kB,OAAO,MACnBukB,EAAM9f,eAIZ,OAAO,IAAIsJ,KAAgBuW,EAAwB5hB,EAAcE,EAAYohB,EAAiB1nB,MAGzFqoB,GACPxM,GAEF3C,IAAgBqP,WAAa,SAAUZ,GACrC,MAAO,IAAIU,IAAqB7lB,EAAOxJ,MAAO2uB,GAGhD,IAAIa,IAAkB,SAAS3U,GAE7B,QAAS2U,GAAe1uB,EAAQ2uB,EAAaC,EAASC,GACpD3vB,KAAKc,OAASA,EACdd,KAAKyvB,YAAcA,EACnBzvB,KAAK0vB,QAAUA,EACf1vB,KAAK2vB,KAAOA,EACZ9U,EAAUnX,KAAK1D,MAOjB,MAbAuW,IAASiZ,EAAgB3U,GASzB2U,EAAerkB,UAAU+X,cAAgB,SAASriB,GAChD,MAAOb,MAAKc,OAAOyI,UAAU,GAAIqmB,IAAa/uB,EAAEb,QAG3CwvB,GACP3M,IAEE+M,GAAgB,SAAU/U,GAE5B,QAAS+U,GAAa/uB,EAAGoI,GACvBjJ,KAAK2mB,GAAK9lB,EACVb,KAAK4qB,GAAK3hB,EACVjJ,KAAKyL,IAAMxC,EAAOwmB,YAClBzvB,KAAK6vB,IAAM5mB,EAAOymB,QAClB1vB,KAAKiH,GAAKgC,EAAO0mB,KACjB3vB,KAAK8vB,KAAM,EACX9vB,KAAKyH,GAAK,KACVzH,KAAK+vB,KAAM,EACX/vB,KAAKuH,GAAK,EACVsT,EAAUnX,KAAK1D,MAyBjB,MApCAuW,IAASqZ,EAAc/U,GAcvB+U,EAAazkB,UAAUzB,KAAO,SAAUG,GAQtC,OAPC7J,KAAK+vB,MAAQ/vB,KAAK+vB,KAAM,GACrB/vB,KAAK8vB,IACP9vB,KAAKyH,GAAK+C,GAASxK,KAAKyL,KAAKzL,KAAKyH,GAAIoC,EAAG7J,KAAKuH,GAAIvH,KAAK4qB,KAEvD5qB,KAAKyH,GAAKzH,KAAK6vB,IAAMrlB,GAASxK,KAAKyL,KAAKzL,KAAKiH,GAAI4C,EAAG7J,KAAKuH,GAAIvH,KAAK4qB,IAAM/gB,EACxE7J,KAAK8vB,KAAM,GAET9vB,KAAKyH,KAAOtH,GAAmBH,KAAK2mB,GAAGlc,QAAQzK,KAAKyH,GAAGvH,IAC3DF,KAAK2mB,GAAGjc,OAAO1K,KAAKyH,QACpBzH,MAAKuH,OAGPqoB,EAAazkB,UAAU7K,MAAQ,SAAUJ,GACvCF,KAAK2mB,GAAGlc,QAAQvK,IAGlB0vB,EAAazkB,UAAUmW,UAAY,YAChCthB,KAAK+vB,KAAO/vB,KAAK6vB,KAAO7vB,KAAK2mB,GAAGjc,OAAO1K,KAAKiH,IAC7CjH,KAAK2mB,GAAGhc,eAGHilB,GACPxO,GASFlB,IAAgB8P,KAAO,WACrB,GAAqBL,GAAjBD,GAAU,EAAaD,EAAcxvB,UAAU,EAKnD,OAJyB,KAArBA,UAAUR,SACZiwB,GAAU,EACVC,EAAO1vB,UAAU,IAEZ,GAAIuvB,IAAexvB,KAAMyvB,EAAaC,EAASC,GAGxD,IAAIM,IAAsB,SAAUpV,GAElC,QAASoV,GAAmBnvB,EAAQwe,GAClCtf,KAAKc,OAASA,EACdd,KAAKkwB,GAAK5Q,EACVzE,EAAUnX,KAAK1D,MAOjB,MAXAuW,IAAS0Z,EAAoBpV,GAO7BoV,EAAmB9kB,UAAU+X,cAAgB,SAAUriB,GACrD,MAAOb,MAAKc,OAAOyI,UAAU,GAAI4mB,IAAiBtvB,EAAGb,KAAKkwB,MAGrDD,GACPpN,IAEEsN,GAAoB,SAAUtV,GAEhC,QAASsV,GAAiBtvB,EAAGye,GAC3Btf,KAAK2mB,GAAK9lB,EACVb,KAAKkwB,GAAK5Q,EACVtf,KAAKisB,MACLpR,EAAUnX,KAAK1D,MAgBjB,MArBAuW,IAAS4Z,EAAkBtV,GAQ3BsV,EAAiBhlB,UAAUzB,KAAO,SAAUG,GAC1C7J,KAAKisB,GAAGvqB,KAAKmI,GACb7J,KAAKisB,GAAGxsB,OAASO,KAAKkwB,IAAMlwB,KAAK2mB,GAAGjc,OAAO1K,KAAKisB,GAAG5d,UAGrD8hB,EAAiBhlB,UAAU7K,MAAQ,SAAUJ,GAC3CF,KAAK2mB,GAAGlc,QAAQvK,IAGlBiwB,EAAiBhlB,UAAUmW,UAAY,WACrCthB,KAAK2mB,GAAGhc,eAGHwlB,GACP/O,GAUFlB,IAAgBkQ,SAAW,SAAUzpB,GACnC,GAAY,EAARA,EAAa,KAAM,IAAIoN,GAC3B,OAAO,IAAIkc,IAAmBjwB,KAAM2G,IAWtCuZ,GAAgBmQ,UAAY,WAC1B,GAAY1nB,GAAWmG,EAAQ,CACzB7O,WAAUR,QAAUmJ,GAAY3I,UAAU,KAC9C0I,EAAY1I,UAAU,GACtB6O,EAAQ,GAERnG,EAAYmS,EAEd,KAAI,GAAI1R,MAAWxJ,EAAIkP,EAAOtP,EAAMS,UAAUR,OAAYD,EAAJI,EAASA,IAAOwJ,EAAK1H,KAAKzB,UAAUL,GAC1F,OAAO+kB,KAAcyB,GAAoBhd,EAAMT,GAAY3I,OAAO+jB,SAGpE,IAAIuM,IAAoB,SAAUzV,GAEhC,QAASyV,GAAiBzvB,EAAGye,GAC3Btf,KAAK2mB,GAAK9lB,EACVb,KAAKkwB,GAAK5Q,EACVtf,KAAKisB,MACLpR,EAAUnX,KAAK1D,MAiBjB,MAtBAuW,IAAS+Z,EAAkBzV,GAQ3ByV,EAAiBnlB,UAAUzB,KAAO,SAAUG,GAC1C7J,KAAKisB,GAAGvqB,KAAKmI,GACb7J,KAAKisB,GAAGxsB,OAASO,KAAKkwB,IAAMlwB,KAAKisB,GAAG5d,SAGtCiiB,EAAiBnlB,UAAU7K,MAAQ,SAAUJ,GAC3CF,KAAK2mB,GAAGlc,QAAQvK,IAGlBowB,EAAiBnlB,UAAUmW,UAAY,WACrC,KAAOthB,KAAKisB,GAAGxsB,OAAS,GAAKO,KAAK2mB,GAAGjc,OAAO1K,KAAKisB,GAAG5d,QACpDrO,MAAK2mB,GAAGhc,eAGH2lB,GACPlP,GAUFlB,IAAgBqQ,SAAW,SAAU5pB,GACnC,GAAY,EAARA,EAAa,KAAM,IAAIoN,GAC3B,IAAIjT,GAASd,IACb,OAAO,IAAIwM,IAAoB,SAAU3L,GACvC,MAAOC,GAAOyI,UAAU,GAAI+mB,IAAiBzvB,EAAG8F,KAC/C7F,IAGPof,GAAgBsQ,cAAgBtQ,GAAgBuQ,UAAY,SAAStmB,EAAU8G,EAAgB2D,GAC3F,MAAO,IAAIwO,IAAkBpjB,KAAMmK,EAAU8G,EAAgB2D,GAASkU,MAAM,GAE9E,IAAI4H,IAAiB,SAAU7V,GAG7B,QAAS6V,GAAc5vB,EAAQqJ,EAAUyK,GACvC5U,KAAKc,OAASA,EACdd,KAAKmK,SAAWuK,GAAavK,EAAUyK,EAAS,GAChDiG,EAAUnX,KAAK1D,MAGjB,QAAS2wB,GAASxmB,EAAUyC,GAC1B,MAAO,UAAU/C,EAAGjK,EAAGiB,GAAK,MAAOsJ,GAASzG,KAAK1D,KAAM4M,EAAKzC,SAASN,EAAGjK,EAAGiB,GAAIjB,EAAGiB,IAYpF,QAASwiB,GAAcxiB,EAAGsJ,EAAUrJ,GAClCd,KAAKa,EAAIA,EACTb,KAAKmK,SAAWA,EAChBnK,KAAKc,OAASA,EACdd,KAAKJ,EAAI,EACTwhB,GAAiB1d,KAAK1D,MAiBxB,MA3CAuW,IAASma,EAAe7V,GAYxB6V,EAAcvlB,UAAUylB,YAAc,SAAUzmB,EAAUyK,GACxD,MAAO,IAAI8b,GAAc1wB,KAAKc,OAAQ6vB,EAASxmB,EAAUnK,MAAO4U,IAGlE8b,EAAcvlB,UAAU+X,cAAgB,SAAUriB,GAChD,MAAOb,MAAKc,OAAOyI,UAAU,GAAI8Z,GAAcxiB,EAAGb,KAAKmK,SAAUnK,QAGnEuW,GAAS8M,EAAejC,IASxBiC,EAAclY,UAAUzB,KAAO,SAASG,GACtC,GAAIjG,GAAS4G,GAASxK,KAAKmK,UAAUN,EAAG7J,KAAKJ,IAAKI,KAAKc,OACvD,OAAI8C,KAAWzD,GAAmBH,KAAKa,EAAE4J,QAAQ7G,EAAO1D,OACxDF,MAAKa,EAAE6J,OAAO9G,IAGhByf,EAAclY,UAAU7K,MAAQ,SAAUJ,GACxCF,KAAKa,EAAE4J,QAAQvK,IAGjBmjB,EAAclY,UAAUmW,UAAY,WAClCthB,KAAKa,EAAE8J,eAGF+lB,GAEP7N,GAQF3C,IAAgBqD,IAAMrD,GAAgB2Q,OAAS,SAAU1mB,EAAUyK,GACjE,GAAIkc,GAAiC,kBAAb3mB,GAA0BA,EAAW,WAAc,MAAOA,GAClF,OAAOnK,gBAAgB0wB,IACrB1wB,KAAK4wB,YAAYE,EAAYlc,GAC7B,GAAI8b,IAAc1wB,KAAM8wB,EAAYlc,IAwBxCsL,GAAgB6Q,MAAQ,WACtB,GAAIvxB,GAAMS,UAAUR,OAAQ2J,EAAO,GAAIzJ,OAAMH,EAC7C,IAAY,IAARA,EAAa,KAAM,IAAI4C,OAAM,sCACjC,KAAI,GAAIxC,GAAI,EAAOJ,EAAJI,EAASA,IAAOwJ,EAAKxJ,GAAKK,UAAUL,EACnD,OAAOI,MAAKujB,IAAI3Z,EAAQR,EAAM5J,KAGlC0gB,GAAgB8Q,QAAU9Q,GAAgB+Q,WAAa,SAAS9mB,EAAU8G,EAAgB2D,GACtF,MAAO,IAAIwO,IAAkBpjB,KAAMmK,EAAU8G,EAAgB2D,GAAS4U,YAG1E5W,GAAG7C,WAAW5E,UAAU+lB,cAAgB,SAAS/mB,EAAU8G,EAAgB2D,GACvE,MAAO,IAAIwO,IAAkBpjB,KAAMmK,EAAU8G,EAAgB2D,GAASwW,eAExE,IAAI+F,IAAkB,SAAStW,GAE7B,QAASsW,GAAerwB,EAAQ6F,GAC9B3G,KAAKc,OAASA,EACdd,KAAKoxB,OAASzqB,EACdkU,EAAUnX,KAAK1D,MAOjB,QAASqxB,GAAaxwB,EAAGye,GACvBtf,KAAK2mB,GAAK9lB,EACVb,KAAK6qB,GAAKvL,EACV8B,GAAiB1d,KAAK1D,MAexB,MA7BAuW,IAAS4a,EAAgBtW,GAOzBsW,EAAehmB,UAAU+X,cAAgB,SAAUriB,GACjD,MAAOb,MAAKc,OAAOyI,UAAU,GAAI8nB,GAAaxwB,EAAGb,KAAKoxB,UASxD7a,GAAS8a,EAAcjQ,IAEvBiQ,EAAalmB,UAAUzB,KAAO,SAAUG,GAClC7J,KAAK6qB,IAAM,EACb7qB,KAAK2mB,GAAGjc,OAAOb,GAEf7J,KAAK6qB,MAGTwG,EAAalmB,UAAU7K,MAAQ,SAASJ,GAAKF,KAAK2mB,GAAGlc,QAAQvK,IAC7DmxB,EAAalmB,UAAUmW,UAAY,WAAathB,KAAK2mB,GAAGhc,eAEjDwmB,GACPtO,GAOF3C,IAAgBoR,KAAO,SAAU3qB,GAC/B,GAAY,EAARA,EAAa,KAAM,IAAIoN,GAC3B,OAAO,IAAIod,IAAenxB,KAAM2G,GAGlC,IAAI4qB,IAAuB,SAAU1W,GAEnC,QAAS0W,GAAoBzwB,EAAQmJ,GACnCjK,KAAKc,OAASA,EACdd,KAAKyL,IAAMxB,EACX4Q,EAAUnX,KAAK1D,MAOjB,MAXAuW,IAASgb,EAAqB1W,GAO9B0W,EAAoBpmB,UAAU+X,cAAgB,SAAUriB,GACtD,MAAOb,MAAKc,OAAOyI,UAAU,GAAIioB,IAAkB3wB,EAAGb,QAGjDuxB,GACP1O,IAEE2O,GAAqB,SAAU3W,GAGjC,QAAS2W,GAAkB3wB,EAAGkJ,GAC5B/J,KAAK2mB,GAAK9lB,EACVb,KAAK4qB,GAAK7gB,EACV/J,KAAKuH,GAAK,EACVvH,KAAK6qB,IAAK,EACVhQ,EAAUnX,KAAK1D,MAcjB,MArBAuW,IAASib,EAAmB3W,GAU5B2W,EAAkBrmB,UAAUzB,KAAO,SAAUG,GAC3C,IAAK7J,KAAK6qB,GAAI,CACZ,GAAIna,GAAMlG,GAASxK,KAAK4qB,GAAGnf,KAAK5B,EAAG7J,KAAKuH,KAAMvH,KAAK4qB,GACnD,IAAIla,IAAQvQ,GAAY,MAAOH,MAAK2mB,GAAGlc,QAAQiG,EAAIxQ,EACnDF,MAAK6qB,IAAMna,EAEb1Q,KAAK6qB,IAAM7qB,KAAK2mB,GAAGjc,OAAOb,IAE5B2nB,EAAkBrmB,UAAU7K,MAAQ,SAAUJ,GAAKF,KAAK2mB,GAAGlc,QAAQvK,IACnEsxB,EAAkBrmB,UAAUmW,UAAY,WAActhB,KAAK2mB,GAAGhc,eAEvD6mB,GACPpQ,GAYFlB,IAAgBuR,UAAY,SAAUrsB,EAAWwP,GAC/C,GAAI3K,GAAKyK,GAAatP,EAAWwP,EAAS,EAC1C,OAAO,IAAI2c,IAAoBvxB,KAAMiK,GAGvC,IAAIynB,IAAkB,SAAS7W,GAE7B,QAAS6W,GAAe5wB,EAAQ6F,GAC9B3G,KAAKc,OAASA,EACdd,KAAKoxB,OAASzqB,EACdkU,EAAUnX,KAAK1D,MAOjB,QAAS2xB,GAAa9wB,EAAGye,GACvBtf,KAAK2mB,GAAK9lB,EACVb,KAAKkwB,GAAK5Q,EACVtf,KAAK6qB,GAAKvL,EACV8B,GAAiB1d,KAAK1D,MAexB,MA9BAuW,IAASmb,EAAgB7W,GAOzB6W,EAAevmB,UAAU+X,cAAgB,SAAUriB,GACjD,MAAOb,MAAKc,OAAOyI,UAAU,GAAIooB,GAAa9wB,EAAGb,KAAKoxB,UAUxD7a,GAASob,EAAcvQ,IAEvBuQ,EAAaxmB,UAAUzB,KAAO,SAAUG,GAClC7J,KAAK6qB,KAAO,IACd7qB,KAAK2mB,GAAGjc,OAAOb,GACf7J,KAAK6qB,IAAM,GAAK7qB,KAAK2mB,GAAGhc,gBAI5BgnB,EAAaxmB,UAAU7K,MAAQ,SAAUJ,GAAKF,KAAK2mB,GAAGlc,QAAQvK,IAC9DyxB,EAAaxmB,UAAUmW,UAAY,WAActhB,KAAK2mB,GAAGhc,eAElD+mB,GACP7O,GAQF3C,IAAgB0R,KAAO,SAAUjrB,EAAOgC,GACtC,GAAY,EAARhC,EAAa,KAAM,IAAIoN,GAC3B,OAAc,KAAVpN,EAAsB8e,GAAgB9c,GACnC,GAAI+oB,IAAe1xB,KAAM2G,GAGlC,IAAIkrB,IAAuB,SAAUhX,GAEnC,QAASgX,GAAoB/wB,EAAQmJ,GACnCjK,KAAKc,OAASA,EACdd,KAAKyL,IAAMxB,EACX4Q,EAAUnX,KAAK1D,MAOjB,MAXAuW,IAASsb,EAAqBhX,GAO9BgX,EAAoB1mB,UAAU+X,cAAgB,SAAUriB,GACtD,MAAOb,MAAKc,OAAOyI,UAAU,GAAIuoB,IAAkBjxB,EAAGb,QAGjD6xB,GACPhP,IAEEiP,GAAqB,SAAUjX,GAGjC,QAASiX,GAAkBjxB,EAAGkJ,GAC5B/J,KAAK2mB,GAAK9lB,EACVb,KAAK4qB,GAAK7gB,EACV/J,KAAKuH,GAAK,EACVvH,KAAK6qB,IAAK,EACVhQ,EAAUnX,KAAK1D,MAiBjB,MAxBAuW,IAASub,EAAmBjX,GAU5BiX,EAAkB3mB,UAAUzB,KAAO,SAAUG,GAC3C,MAAI7J,MAAK6qB,KACP7qB,KAAK6qB,GAAKrgB,GAASxK,KAAK4qB,GAAGnf,KAAK5B,EAAG7J,KAAKuH,KAAMvH,KAAK4qB,IAC/C5qB,KAAK6qB,KAAO1qB,IAAmBH,KAAK2mB,GAAGlc,QAAQzK,KAAK6qB,GAAG3qB,QAEzDF,KAAK6qB,GACP7qB,KAAK2mB,GAAGjc,OAAOb,GAEf7J,KAAK2mB,GAAGhc,gBAGZmnB,EAAkB3mB,UAAU7K,MAAQ,SAAUJ,GAAKF,KAAK2mB,GAAGlc,QAAQvK,IACnE4xB,EAAkB3mB,UAAUmW,UAAY,WAActhB,KAAK2mB,GAAGhc,eAEvDmnB,GACP1Q,GASFlB,IAAgB6R,UAAY,SAAU3sB,EAAWwP,GAC/C,GAAI3K,GAAKyK,GAAatP,EAAWwP,EAAS,EAC1C,OAAO,IAAIid,IAAoB7xB,KAAMiK,GAGvC,IAAI+nB,IAAoB,SAAUnX,GAGhC,QAASmX,GAAiBlxB,EAAQsE,EAAWwP,GAC3C5U,KAAKc,OAASA,EACdd,KAAKoF,UAAYsP,GAAatP,EAAWwP,EAAS,GAClDiG,EAAUnX,KAAK1D,MAOjB,QAASiyB,GAAe7sB,EAAWwH,GACjC,MAAO,UAAS/C,EAAGjK,EAAGiB,GAAK,MAAO+L,GAAKxH,UAAUyE,EAAGjK,EAAGiB,IAAMuE,EAAU1B,KAAK1D,KAAM6J,EAAGjK,EAAGiB,IAQ1F,QAASwiB,GAAcxiB,EAAGuE,EAAWtE,GACnCd,KAAKa,EAAIA,EACTb,KAAKoF,UAAYA,EACjBpF,KAAKc,OAASA,EACdd,KAAKJ,EAAI,EACTwhB,GAAiB1d,KAAK1D,MAmBxB,MA7CAuW,IAASyb,EAAkBnX,GAQ3BmX,EAAiB7mB,UAAU+X,cAAgB,SAAUriB,GACnD,MAAOb,MAAKc,OAAOyI,UAAU,GAAI8Z,GAAcxiB,EAAGb,KAAKoF,UAAWpF,QAOpEgyB,EAAiB7mB,UAAU+mB,eAAiB,SAAS9sB,EAAWwP,GAC9D,MAAO,IAAIod,GAAiBhyB,KAAKc,OAAQmxB,EAAe7sB,EAAWpF,MAAO4U,IAG5E2B,GAAS8M,EAAejC,IASxBiC,EAAclY,UAAUzB,KAAO,SAASG,GACtC,GAAIsoB,GAAc3nB,GAASxK,KAAKoF,WAAWyE,EAAG7J,KAAKJ,IAAKI,KAAKc,OAC7D,OAAIqxB,KAAgBhyB,GACXH,KAAKa,EAAE4J,QAAQ0nB,EAAYjyB,QAEpCiyB,GAAenyB,KAAKa,EAAE6J,OAAOb,KAG/BwZ,EAAclY,UAAU7K,MAAQ,SAAUJ,GACxCF,KAAKa,EAAE4J,QAAQvK,IAGjBmjB,EAAclY,UAAUmW,UAAY,WAClCthB,KAAKa,EAAE8J,eAGFqnB,GAEPnP,GAQF3C,IAAgBsI,OAAStI,GAAgBkS,MAAQ,SAAUhtB,EAAWwP,GACpE,MAAO5U,gBAAgBgyB,IAAmBhyB,KAAKkyB,eAAe9sB,EAAWwP,GACvE,GAAIod,IAAiBhyB,KAAMoF,EAAWwP,IAyC5C7E,GAAWsiB,aAAe,SAAUpoB,EAAIC,EAAKC,GAC3C,MAAO,YACU,mBAARD,KAAwBA,EAAMlK,KAGrC,KAAI,GADAR,GAAMS,UAAUR,OAAQ2J,EAAO,GAAIzJ,OAAMH,GACrCI,EAAI,EAAOJ,EAAJI,EAASA,IAAOwJ,EAAKxJ,GAAKK,UAAUL,EACnD,OAAOoK,GAAmBC,EAAIC,EAAKC,EAAUf,KA4CjD2G,GAAWuiB,iBAAmB,SAAUroB,EAAIC,EAAKC,GAC/C,MAAO;AACU,mBAARD,KAAwBA,EAAMlK,KAErC,KAAI,GADAR,GAAMS,UAAUR,OAAQ2J,EAAO,GAAIzJ,OAAMH,GACrCI,EAAI,EAAOJ,EAAJI,EAASA,IAAOwJ,EAAKxJ,GAAKK,UAAUL,EACnD,OAAOgL,GAAqBX,EAAIC,EAAKC,EAAUf,KAqBjDiC,EAAiBF,UAAUgE,QAAU,WAC9BnP,KAAKkH,aACRlH,KAAKuL,GAAGgnB,oBAAoBvyB,KAAKwL,GAAIxL,KAAKyL,KAAK,GAC/CzL,KAAKkH,YAAa,IAuBtB0L,GAAGE,OAAO0f,iBAAkB,CAE5B,IAAIC,IAAmB,SAAS5X,GAE9B,QAAS4X,GAAgBznB,EAAIzG,EAAM0F,GACjCjK,KAAK0yB,IAAM1nB,EACXhL,KAAKwL,GAAKjH,EACVvE,KAAKyL,IAAMxB,EACX4Q,EAAUnX,KAAK1D,MAGjB,QAAS2yB,GAAc9xB,EAAGoJ,GACxB,MAAO,YACL,GAAIK,GAAUrK,UAAU,EACxB,OAAIsK,IAAWN,KACbK,EAAUE,GAASP,GAAIlK,MAAM,KAAME,WAC/BqK,IAAYnK,IAAmBU,EAAE4J,QAAQH,EAAQpK,OAEvDW,GAAE6J,OAAOJ,IAWb,MA1BAiM,IAASkc,EAAiB5X,GAmB1B4X,EAAgBtnB,UAAU+X,cAAgB,SAAUriB,GAClD,MAAO8K,GACL3L,KAAK0yB,IACL1yB,KAAKwL,GACLmnB,EAAc9xB,EAAGb,KAAKyL,OAGnBgnB,GACP5P,GASF9S,IAAW6iB,UAAY,SAAUC,EAASjnB,EAAWzB,GAEnD,MAAI0oB,GAAQC,YACHC,GACL,SAAUC,GAAKH,EAAQC,YAAYlnB,EAAWonB,IAC9C,SAAUA,GAAKH,EAAQI,eAAernB,EAAWonB,IACjD7oB,GAICyI,GAAGE,OAAO0f,iBAEa,kBAAfK,GAAQK,IAA4C,kBAAhBL,GAAQM,IAQlD,GAAIV,IAAgBI,EAASjnB,EAAWzB,GAAUipB,UAAUC,WAPxDN,GACL,SAAUC,GAAKH,EAAQK,GAAGtnB,EAAWonB,IACrC,SAAUA,GAAKH,EAAQM,IAAIvnB,EAAWonB,IACtC7oB,GAOR,IAAImpB,IAA0B,SAASzY,GAErC,QAASyY,GAAuBrnB,EAAKsnB,EAAKtpB,GACxCjK,KAAKwzB,KAAOvnB,EACZjM,KAAKyzB,KAAOF,EACZvzB,KAAKyL,IAAMxB,EACX4Q,EAAUnX,KAAK1D,MAGjB,QAAS2yB,GAAc9xB,EAAGoJ,GACxB,MAAO,YACL,GAAIK,GAAUrK,UAAU,EACxB,OAAIsK,IAAWN,KACbK,EAAUE,GAASP,GAAIlK,MAAM,KAAME,WAC/BqK,IAAYnK,IAAmBU,EAAE4J,QAAQH,EAAQpK,OAEvDW,GAAE6J,OAAOJ,IAUb,QAASopB,GAAuBH,EAAKtpB,EAAI0pB,GACvC3zB,KAAKyzB,KAAOF,EACZvzB,KAAKyL,IAAMxB,EACXjK,KAAK4zB,KAAOD,EACZ3zB,KAAKkH,YAAa,EAUpB,MAvCAqP,IAAS+c,EAAwBzY,GAmBjCyY,EAAuBnoB,UAAU+X,cAAgB,SAAUriB,GACzD,GAAIoJ,GAAK0oB,EAAc9xB,EAAGb,KAAKyL,KAC3BooB,EAAc7zB,KAAKwzB,KAAKvpB,EAC5B,OAAO,IAAIypB,GAAuB1zB,KAAKyzB,KAAMxpB,EAAI4pB,IAUnDH,EAAuBvoB,UAAUgE,QAAU,WACrCnP,KAAKkH,aACPqD,GAAWvK,KAAKyzB,OAASzzB,KAAKyzB,KAAKzzB,KAAKyL,IAAKzL,KAAK4zB,MAClD5zB,KAAKkH,YAAa,IAIfosB,GACPzQ,IASEkQ,GAAmBhjB,GAAWgjB,iBAAmB,SAAUe,EAAYC,EAAe5pB,GACxF,MAAO,IAAImpB,IAAuBQ,EAAYC,EAAe5pB,GAAUipB,UAAUC,YAG/EW,GAAyB,SAASnZ,GAEpC,QAASmZ,GAAsBjqB,EAAG3C,GAChCpH,KAAK4qB,GAAK7gB,EACV/J,KAAKiH,GAAKG,EACVyT,EAAUnX,KAAK1D,MAGjB,QAASi0B,GAAa7sB,EAAGJ,GACvB,GAAInG,GAAImG,EAAM,GAAIkX,EAAOlX,EAAM,EAC/BnG,GAAE6J,OAAOwT,GACTrd,EAAE8J,cAGJ,QAASupB,GAAc9sB,EAAGJ,GACxB,GAAInG,GAAImG,EAAM,GAAI8D,EAAM9D,EAAM,EAC9BnG,GAAE4J,QAAQK,GAgBZ,MA/BAyL,IAASyd,EAAuBnZ,GAkBhCmZ,EAAsB7oB,UAAU+X,cAAgB,SAASriB,GACvD,GAAIunB,GAAM,GAAIpa,IAA8BpB,EAAO5M,IASnD,OAPAA,MAAK4qB,GACFnX,KAAK,SAAUyK,GACdkK,EAAIna,cAAcrB,EAAK3F,GAAGuS,UAAU3Y,EAAGqd,GAAO+V,KAC7C,SAAUnpB,GACXsd,EAAIna,cAAcrB,EAAK3F,GAAGuS,UAAU3Y,EAAGiK,GAAMopB,MAG1C9L,GAGF4L,GACPnR,IAOEpT,GAAwBM,GAAWokB,YAAc,SAAUC,EAASzrB,GAEtE,MADAA,KAAcA,EAAYiI,IACnB,GAAIojB,IAAsBI,EAASzrB,GAc5CuX,IAAgBmU,UAAY,SAAUC,GAEpC,GADAA,IAAgBA,EAAc1hB,GAAGE,OAAOC,UACnCuhB,EAAe,KAAM,IAAItgB,IAAkB,qDAChD,IAAIlT,GAASd,IACb,OAAO,IAAIs0B,GAAY,SAAUC,EAASC,GAExC,GAAIp1B,EACJ0B,GAAOyI,UAAU,SAAU6a,GACzBhlB,EAAQglB,GACPoQ,EAAQ,WACTD,EAAQn1B,QAUd2Q,GAAW0kB,WAAa,SAAUC,GAChC,GAAIN,GAAU5pB,GAASkqB,IACvB,OAAIN,KAAYj0B,GAAmB8P,GAAgBmkB,EAAQl0B,GACpDuP,GAAsB2kB,GAG/B,IAAIO,IAAuB,SAAU9Z,GAEnC,QAAS8Z,GAAoB7zB,EAAQ8zB,EAAKC,GACxC70B,KAAKc,OAASA,EACdd,KAAK80B,KAAOF,EACZ50B,KAAK+0B,KAAOF,EACZha,EAAUnX,KAAK1D,MAQjB,MAbAuW,IAASoe,EAAqB9Z,GAQ9B8Z,EAAoBxpB,UAAU+X,cAAgB,SAAUriB,GACtD,GAAIm0B,GAAch1B,KAAKc,OAAOm0B,UAAUj1B,KAAK80B,OAC7C,OAAO,IAAItmB,IAAiBxO,KAAK+0B,KAAKC,GAAazrB,UAAU1I,GAAIm0B,EAAYE,YAGxEP,GACP9R,GAmBF3C,IAAgB+U,UAAY,SAAUE,EAA0BhrB,GAC9D,MAAOI,IAAW4qB,GAChB,GAAIR,IAAoB30B,KAAMm1B,EAA0BhrB,GACxD,GAAIirB,IAAsBp1B,KAAMm1B,IAcpCjV,GAAgBkT,QAAU,SAAUjpB,GAClC,MAAOA,IAAYI,GAAWJ,GAC5BnK,KAAKi1B,UAAU,WAAc,MAAO,IAAInG,KAAc3kB,GACtDnK,KAAKi1B,UAAU,GAAInG,MAQvB5O,GAAgBmV,MAAQ,WACtB,MAAOr1B,MAAKozB,UAAUC,YAcxBnT,GAAgBoV,YAAc,SAAUnrB,GACtC,MAAOA,IAAYI,GAAWJ,GAC5BnK,KAAKi1B,UAAU,WAAc,MAAO,IAAI7qB,KAAmBD,GAC3DnK,KAAKi1B,UAAU,GAAI7qB,MAevB8V,GAAgBqV,aAAe,SAAUC,EAAwBC,GAC/D,MAA4B,KAArBx1B,UAAUR,OACfO,KAAKi1B,UAAU,WACb,MAAO,IAAIS,IAAgBD,IAC1BD,GACHx1B,KAAKi1B,UAAU,GAAIS,IAAgBF,KASvCtV,GAAgByV,WAAa,SAAUF,GACrC,MAAOz1B,MAAKu1B,aAAaE,GAAcpC,YAmBzCnT,GAAgB0V,OAAS,SAAUzrB,EAAU0rB,EAAYC,EAAYntB,GACnE,MAAOwB,IAAYI,GAAWJ,GAC5BnK,KAAKi1B,UAAU,WAAc,MAAO,IAAIc,IAAcF,EAAYC,EAAYntB,IAAewB,GAC7FnK,KAAKi1B,UAAU,GAAIc,IAAcF,EAAYC,EAAYntB,KAkB7DuX,GAAgB8V,YAAc,SAAUH,EAAYC,EAAYntB,GAC9D,MAAO3I,MAAK41B,OAAO,KAAMC,EAAYC,EAAYntB,GAAW0qB,WAG9D,IAAI4C,IAAsB,SAAUpb,GAElC,QAASob,GAAmBn1B,GAC1Bd,KAAKc,OAASA,EACdd,KAAKoxB,OAAS,EACdpxB,KAAKk2B,yBAA2B,KAChCrb,EAAUnX,KAAK1D,MASjB,QAAS4Y,GAAmB7O,EAAG3C,GAC7BpH,KAAK4qB,GAAK7gB,EACV/J,KAAKiH,GAAKG,EACVpH,KAAKkH,YAAa,EAWpB,MA5BAqP,IAAS0f,EAAoBpb,GAQ7Bob,EAAmB9qB,UAAU+X,cAAgB,SAAUriB,GACrD,GAAIuM,GAAepN,KAAKc,OAAOyI,UAAU1I,EAEzC,OADkB,OAAhBb,KAAKoxB,SAAiBpxB,KAAKk2B,yBAA2Bl2B,KAAKc,OAAOo0B,WAC7D,GAAItc,GAAmB5Y,KAAMoN,IAStCwL,EAAmBzN,UAAUgE,QAAU,WAChCnP,KAAKkH,aACRlH,KAAKkH,YAAa,EAClBlH,KAAKiH,GAAGkI,UACa,MAAnBnP,KAAK4qB,GAAGwG,QAAgBpxB,KAAK4qB,GAAGsL,yBAAyB/mB,YAIxD8mB,GACPpT,IAEEuS,GAAwBxiB,GAAGwiB,sBAAyB,SAAUva,GAEhE,QAASua,GAAsBt0B,EAAQkQ,GACrChR,KAAKc,OAASA,EACdd,KAAKm2B,YAAc,KACnBn2B,KAAKo2B,QAAUt1B,EAAOwI,eACtBtJ,KAAKq2B,SAAWrlB,EAChB6J,EAAUnX,KAAK1D,MAGjB,QAASs2B,GAAkBrtB,EAAQmE,GACjCpN,KAAK4qB,GAAK3hB,EACVjJ,KAAKiH,GAAKmG,EA2BZ,MAtCAmJ,IAAS6e,EAAuBva,GAchCyb,EAAkBnrB,UAAUgE,QAAU,WAChCnP,KAAKiH,KACPjH,KAAKiH,GAAGkI,UACRnP,KAAKiH,GAAK,KACVjH,KAAK4qB,GAAGuL,YAAc,OAI1Bf,EAAsBjqB,UAAU+pB,QAAU,WACxC,IAAKl1B,KAAKm2B,YAAa,CACrB,GAAI/oB,GAAepN,KAAKo2B,QAAQ7sB,UAAUvJ,KAAKq2B,SAC/Cr2B,MAAKm2B,YAAc,GAAIG,GAAkBt2B,KAAMoN,GAEjD,MAAOpN,MAAKm2B,aAGdf,EAAsBjqB,UAAU2W,WAAa,SAAUjhB,GACrD,MAAOb,MAAKq2B,SAAS9sB,UAAU1I,IAGjCu0B,EAAsBjqB,UAAUkoB,SAAW,WACzC,MAAO,IAAI4C,IAAmBj2B,OAGzBo1B,GACPrlB,IAEE1D,GAAmB,SAASwO,GAE9B,QAASxO,GAAgBoN,EAAIrS,GAC3BpH,KAAKu2B,IAAM9c,EACXzZ,KAAKiH,GAAKG,EACVyT,EAAUnX,KAAK1D,MAOjB,QAAS0a,GAAetT,EAAGvG,GACzBA,EAAE6J,OAAO,GACT7J,EAAE8J,cAGJ,MAhBA4L,IAASlK,EAAiBwO,GAO1BxO,EAAgBlB,UAAU+X,cAAgB,SAAUriB,GAClD,MAAOb,MAAKiH,GAAG6J,eAAejQ,EAAGb,KAAKu2B,IAAK7b,IAQtCrO,GACPwW,IA6CE2T,GAAqBzmB,GAAW0mB,SAAW,SAAUlqB,EAAQ5D,GAC/D,MAAOqE,GAAiCT,EAAQA,EAAQ3D,GAAYD,GAAaA,EAAYiI,IAUzEb,IAAWS,MAAQ,SAAUpE,EAASsqB,EAAmB/tB,GAC7E,GAAI4D,EAOJ,OANA3D,IAAYD,KAAeA,EAAYiI,IACd,MAArB8lB,GAA0D,gBAAtBA,GACtCnqB,EAASmqB,EACA9tB,GAAY8tB,KACrB/tB,EAAY+tB,IAETtqB,YAAmBU,OAA2B,gBAAZV,KAAyBG,IAAWrN,EAClEiN,EAAiBC,EAASzD,GAE/ByD,YAAmBU,OAAQP,IAAWrN,EACjCoN,EAA6BF,EAASsqB,EAAmB/tB,GAE3DqE,EAAiCZ,EAASG,EAAQ5D,GAwI3DuX,IAAgBnR,MAAQ,WACtB,GAAI4nB,GAAW12B,UAAU,EACzB,IAAwB,gBAAb02B,IAAyBA,YAAoB7pB,MAAM,CAC5D,GAAIV,GAAUuqB,EAAUhuB,EAAY1I,UAAU,EAE9C,OADA2I,IAAYD,KAAeA,EAAYiI,IAChCxE,YAAmBU,MACxB2B,EAAwBzO,KAAMoM,EAASzD,GACvCwE,EAAwBnN,KAAMoM,EAASzD,GACpC,GAAIoH,GAAWC,aAAa2mB,IAAapsB,GAAWosB,GACzD,MAAOjoB,GAAkB1O,KAAM22B,EAAU12B,UAAU,GAEnD,MAAM,IAAImC,OAAM,qBAIpB,IAAIw0B,IAAsB,SAAU/b,GAElC,QAAS+b,GAAmB91B,EAAQ2Y,EAAIrS,GACtCwB,GAAYxB,KAAOA,EAAIwJ,IACvB5Q,KAAKc,OAASA,EACdd,KAAKu2B,IAAM9c,EACXzZ,KAAKiH,GAAKG,EACVyT,EAAUnX,KAAK1D,MAUjB,MAhBAuW,IAASqgB,EAAoB/b,GAS7B+b,EAAmBzrB,UAAU+X,cAAgB,SAAUriB,GACrD,GAAIyM,GAAa,GAAIC,GACrB,OAAO,IAAIiB,IACTxO,KAAKc,OAAOyI,UAAU,GAAIstB,IAAiBh2B,EAAGb,KAAKu2B,IAAKv2B,KAAKiH,GAAIqG,IACjEA,IAGGspB,GACP/T,IAEEgU,GAAoB,SAAUhc,GAEhC,QAASgc,GAAiB7tB,EAAUoD,EAASzD,EAAW2E,GACtDtN,KAAK2mB,GAAK3d,EACVhJ,KAAKksB,GAAK9f,EACVpM,KAAKkc,WAAavT,EAClB3I,KAAKkwB,GAAK5iB,EACVtN,KAAK82B,GAAK,KACV92B,KAAK+vB,KAAM,EACX/vB,KAAKmf,IAAM,EACXtE,EAAUnX,KAAK1D,MAkCjB,MA3CAuW,IAASsgB,EAAkBhc,GAiB3Bgc,EAAiB1rB,UAAUzB,KAAO,SAAUG,GAC1C7J,KAAK+vB,KAAM,EACX/vB,KAAK82B,GAAKjtB,CACV,IAAIktB,KAAc/2B,KAAKmf,IAAK1S,EAAI,GAAIuB,GACpChO,MAAKkwB,GAAGjiB,cAAcxB,GACtBA,EAAEwB,cAAcjO,KAAKkc,WAAWpL,eAAe9Q,KAAMA,KAAKksB,GAAI,SAAUhe,EAAGtB,GACzEA,EAAKmjB,KAAOnjB,EAAKuS,MAAQ4X,GAAanqB,EAAK+Z,GAAGjc,OAAOb,GACrD+C,EAAKmjB,KAAM,MAIf8G,EAAiB1rB,UAAU7K,MAAQ,SAAUJ,GAC3CF,KAAKkwB,GAAG/gB,UACRnP,KAAK2mB,GAAGlc,QAAQvK,GAChBF,KAAK+vB,KAAM,EACX/vB,KAAKmf,OAGP0X,EAAiB1rB,UAAUmW,UAAY,WACrCthB,KAAKkwB,GAAG/gB,UACRnP,KAAK+vB,KAAO/vB,KAAK2mB,GAAGjc,OAAO1K,KAAK82B,IAChC92B,KAAK2mB,GAAGhc,cACR3K,KAAK+vB,KAAM,EACX/vB,KAAKmf,OAGA0X,GACPzV,GAiDFlB,IAAgB8W,SAAW,WACzB,GAAIzsB,GAAYtK,UAAU,IACxB,MAAOmP,GAAqBpP,KAAMC,UAAU,GACvC,IAA4B,gBAAjBA,WAAU,GAC1B,MAAO,IAAI22B,IAAmB52B,KAAMC,UAAU,GAAIA,UAAU,GAE5D,MAAM,IAAImC,OAAM,qBAIpB,IAAI60B,IAAuB,SAAUpc,GAEnC,QAASoc,GAAoBn2B,EAAQsG,GACnCpH,KAAKc,OAASA,EACdd,KAAKiH,GAAKG,EACVyT,EAAUnX,KAAK1D,MAOjB,MAXAuW,IAAS0gB,EAAqBpc,GAO9Boc,EAAoB9rB,UAAU+X,cAAgB,SAAUriB,GACtD,MAAOb,MAAKc,OAAOyI,UAAU,GAAI2tB,IAAkBr2B,EAAGb,KAAKiH,MAGtDgwB,GACPpU,IAEEqU,GAAqB,SAAUrc,GAEjC,QAASqc,GAAkBr2B,EAAGuG,GAC5BpH,KAAK2mB,GAAK9lB,EACVb,KAAKiH,GAAKG,EACVyT,EAAUnX,KAAK1D,MAejB,MAnBAuW,IAAS2gB,EAAmBrc,GAO5Bqc,EAAkB/rB,UAAUzB,KAAO,SAAUG,GAC3C7J,KAAK2mB,GAAGjc,QAAStL,MAAOyK,EAAG+D,UAAW5N,KAAKiH,GAAG4F,SAGhDqqB,EAAkB/rB,UAAU7K,MAAQ,SAAUJ,GAC5CF,KAAK2mB,GAAGlc,QAAQvK,IAGlBg3B,EAAkB/rB,UAAUmW,UAAY,WACtCthB,KAAK2mB,GAAGhc,eAGHusB,GACP9V,GAYFlB,IAAgBtS,UAAY,SAAUjF,GAEpC,MADAC,IAAYD,KAAeA,EAAYiI,IAChC,GAAIqmB,IAAoBj3B,KAAM2I,GAGvC,IAAIwuB,IAAoB,SAAStc,GAE/B,QAASsc,GAAiBr2B,EAAQs2B,GAChCp3B,KAAKc,OAASA,EACdd,KAAKq3B,SAAWD,EAChBvc,EAAUnX,KAAK1D,MAmBjB,MAvBAuW,IAAS4gB,EAAkBtc,GAO3Bsc,EAAiBhsB,UAAU+X,cAAgB,SAAUriB,GACnD,GAAImG,IACFnG,EAAGA,EACHqO,OAAO,EACP9P,MAAO,KACPkQ,UAAU,EACVgoB,mBAAoB,GAAItpB,IAI1B,OADAhH,GAAMswB,mBAAmBrpB,cAAcjO,KAAKc,OAAOyI,UAAU,GAAIguB,IAAqBvwB,KAC/E,GAAIwH,IACTxH,EAAMswB,mBACNt3B,KAAKq3B,SAAS9tB,UAAU,GAAIiuB,IAAgBxwB,MAIzCmwB,GACPtU,IAEE2U,GAAmB,SAAS3c,GAE9B,QAAS2c,GAAgBpwB,GACvBpH,KAAKiH,GAAKG,EACVyT,EAAUnX,KAAK1D,MAejB,MAlBAuW,IAASihB,EAAiB3c,GAM1B2c,EAAgBrsB,UAAUssB,eAAiB,WACrCz3B,KAAKiH,GAAGqI,WACVtP,KAAKiH,GAAGqI,UAAW,EACnBtP,KAAKiH,GAAGpG,EAAE6J,OAAO1K,KAAKiH,GAAG7H,QAE3BY,KAAKiH,GAAGiI,OAASlP,KAAKiH,GAAGpG,EAAE8J,eAG7B6sB,EAAgBrsB,UAAUzB,KAAO,WAAc1J,KAAKy3B,kBACpDD,EAAgBrsB,UAAU7K,MAAQ,SAAUJ,GAAKF,KAAKiH,GAAGwD,QAAQvK,IACjEs3B,EAAgBrsB,UAAUmW,UAAY,WAActhB,KAAKy3B,kBAElDD,GACPpW,IAEEmW,GAAwB,SAAS1c,GAEnC,QAAS0c,GAAqBnwB,GAC5BpH,KAAKiH,GAAKG,EACVyT,EAAUnX,KAAK1D,MAajB,MAhBAuW,IAASghB,EAAsB1c,GAM/B0c,EAAqBpsB,UAAUzB,KAAO,SAAUG,GAC9C7J,KAAKiH,GAAGqI,UAAW,EACnBtP,KAAKiH,GAAG7H,MAAQyK,GAElB0tB,EAAqBpsB,UAAU7K,MAAQ,SAAUJ,GAAKF,KAAKiH,GAAGpG,EAAE4J,QAAQvK,IACxEq3B,EAAqBpsB,UAAUmW,UAAY,WACzCthB,KAAKiH,GAAGiI,OAAQ,EAChBlP,KAAKiH,GAAGqwB,mBAAmBnoB,WAGtBooB,GACPnW,GAcFlB,IAAgBwX,OAAS,SAAUC,EAAmBhvB,GAEpD,MADAC,IAAYD,KAAeA,EAAYiI,IACH,gBAAtB+mB,GACZ,GAAIR,IAAiBn3B,KAAMw2B,GAAmBmB,EAAmBhvB,IACjE,GAAIwuB,IAAiBn3B,KAAM23B,GAG/B,IAAIznB,IAAe0C,GAAG1C,aAAe,SAAS1L,GAC5CxE,KAAKwE,QAAUA,GAAW,uBAC1BxE,KAAKuE,KAAO,eACZnC,MAAMsB,KAAK1D,MAEbkQ,IAAa/E,UAAY9L,OAAOwU,OAAOzR,MAAM+I,WAgH7C+U,GAAgB9P,QAAU,WACxB,GAAIumB,GAAW12B,UAAU,EACzB,IAAI02B,YAAoB7pB,OAA4B,gBAAb6pB,GACrC,MAAOvmB,IAAQpQ,KAAM22B,EAAU12B,UAAU,GAAIA,UAAU,GAClD,IAAI8P,GAAWC,aAAa2mB,IAAapsB,GAAWosB,GACzD,MAAOhnB,GAAoB3P,KAAM22B,EAAU12B,UAAU,GAAIA,UAAU,GAEnE,MAAM,IAAImC,OAAM,sBAUpB8d,GAAgB3Q,SAAW,SAAUqoB,EAAgBjvB,GACnDC,GAAYD,KAAeA,EAAYiI,GACvC,IAAIinB,IAAYD,GAAkB,CAClC,IAAgB,GAAZC,EAAiB,KAAM,IAAIC,YAAW,+CAC1C,IAAIh3B,GAASd,IACb,OAAO,IAAIwM,IAAoB,SAAU3L,GACvC,GAAIk3B,GAAa,CACjB,OAAOj3B,GAAOyI,UACZ,SAAUM,GACR,GAAIgD,GAAMlE,EAAUkE,OACD,IAAfkrB,GAAoBlrB,EAAMkrB,GAAcF,KAC1CE,EAAalrB,EACbhM,EAAE6J,OAAOb,KAEX,SAAU3J,GAAKW,EAAE4J,QAAQvK,IAAO,WAAcW,EAAE8J,iBAEnD7J,GAGL,IAAIk3B,IAAsB,SAAUnd,GAElC,QAASmd,GAAmBl3B,EAAQm3B,GAClCj4B,KAAKc,OAASA,EACdd,KAAKk4B,WAAa,GAAIpJ,IAElBmJ,GAAUA,EAAO1uB,UACnBvJ,KAAKi4B,OAASj4B,KAAKk4B,WAAWpP,MAAMmP,GAEpCj4B,KAAKi4B,OAASj4B,KAAKk4B,WAGrBrd,EAAUnX,KAAK1D,MA4BjB,MAvCAuW,IAASyhB,EAAoBnd,GAc7Bmd,EAAmB7sB,UAAU2W,WAAa,SAAUjhB,GAClD,GAAIs3B,GAAOn4B,KAAKc,OAAOsyB,UACrBhmB,EAAe+qB,EAAK5uB,UAAU1I,GAC9Bu3B,EAAa1gB,GAEX2gB,EAAWr4B,KAAKi4B,OAAO9K,uBAAuB5jB,UAAU,SAAU+uB,GAChEA,EACFF,EAAaD,EAAKjD,WAElBkD,EAAWjpB,UACXipB,EAAa1gB,KAIjB,OAAO,IAAIe,KAAgBrL,EAAcgrB,EAAYC,KAGvDL,EAAmB7sB,UAAUotB,MAAQ,WACnCv4B,KAAKk4B,WAAWxtB,QAAO,IAGzBstB,EAAmB7sB,UAAUqtB,OAAS,WACpCx4B,KAAKk4B,WAAWxtB,QAAO,IAGlBstB,GAEPjoB,GAUFmQ,IAAgBmY,SAAW,SAAUJ,GACnC,MAAO,IAAID,IAAmBh4B,KAAMi4B,GAoDtC,IAAIQ,IAA8B,SAAU5d,GAE1C,QAAS4d,GAA2B33B,EAAQm3B,GAC1Cj4B,KAAKc,OAASA,EACdd,KAAKk4B,WAAa,GAAIpJ,IAElBmJ,GAAUA,EAAO1uB,UACnBvJ,KAAKi4B,OAASj4B,KAAKk4B,WAAWpP,MAAMmP,GAEpCj4B,KAAKi4B,OAASj4B,KAAKk4B,WAGrBrd,EAAUnX,KAAK1D,MAmDjB,MA9DAuW,IAASkiB,EAA4B5d,GAcrC4d,EAA2BttB,UAAU2W,WAAa,SAAUjhB,GAG1D,QAAS63B,KAAe,KAAOjrB,EAAEhO,OAAS,GAAKoB,EAAE6J,OAAO+C,EAAEY,SAF1D,GAAYsqB,GAARlrB,KAIAL,EACF2D,GACE/Q,KAAKc,OACLd,KAAKi4B,OAAO5H,WAAU,GAAOlD,uBAC7B,SAAUjP,EAAM0a,GACd,OAAS1a,KAAMA,EAAM0a,WAAYA,KAElCrvB,UACC,SAAUe,GACJquB,IAAuBz5B,GAAaoL,EAAQsuB,aAAeD,GAC7DA,EAAqBruB,EAAQsuB,WAEzBtuB,EAAQsuB,YAAcF,MAE1BC,EAAqBruB,EAAQsuB,WAEzBtuB,EAAQsuB,WACV/3B,EAAE6J,OAAOJ,EAAQ4T,MAEjBzQ,EAAE/L,KAAK4I,EAAQ4T,QAIrB,SAAUpT,GACR4tB,IACA73B,EAAE4J,QAAQK,IAEZ,WACE4tB,IACA73B,EAAE8J,eAGV,OAAOyC,IAGTqrB,EAA2BttB,UAAUotB,MAAQ,WAC3Cv4B,KAAKk4B,WAAWxtB,QAAO,IAGzB+tB,EAA2BttB,UAAUqtB,OAAS,WAC5Cx4B,KAAKk4B,WAAWxtB,QAAO,IAGlB+tB,GAEP1oB,GAWFmQ,IAAgB2Y,iBAAmB,SAAUZ,GAC3C,MAAO,IAAIQ,IAA2Bz4B,KAAMi4B,GAG9C,IAAIa,IAAwB,SAAUje,GAEpC,QAASie,GAAsBh4B,EAAQi4B,EAAapwB,GAClDkS,EAAUnX,KAAK1D,MACfA,KAAKgR,QAAU,GAAIgoB,IAAkBD,EAAapwB,GAClD3I,KAAKc,OAASA,EAAOm0B,UAAUj1B,KAAKgR,SAASqiB,WAW/C,MAfA9c,IAASuiB,EAAsBje,GAO/Bie,EAAqB3tB,UAAU2W,WAAa,SAAUjhB,GACpD,MAAOb,MAAKc,OAAOyI,UAAU1I,IAG/Bi4B,EAAqB3tB,UAAU8tB,QAAU,SAAUC,GACjD,MAAOl5B,MAAKgR,QAAQioB,QAAyB,MAAjBC,EAAwB,GAAKA,IAGpDJ,GAEP/oB,IAEEipB,GAAqB,SAAUne,GAEjC,QAASme,GAAkBD,EAAapwB,GACvB,MAAfowB,IAAwBA,GAAc,GAEtCle,EAAUnX,KAAK1D,MACfA,KAAKgR,QAAU,GAAI8d,IACnB9uB,KAAK+4B,YAAcA,EACnB/4B,KAAKkb,MAAQ6d,KAAmB,KAChC/4B,KAAKm5B,eAAiB,EACtBn5B,KAAKo5B,oBAAsB,KAC3Bp5B,KAAKM,MAAQ,KACbN,KAAKq5B,WAAY,EACjBr5B,KAAKs5B,cAAe,EACpBt5B,KAAK2I,UAAYA,GAAaE,GAgFhC,MA7FA0N,IAASyiB,EAAmBne,GAgB5BlE,GAAcqiB,EAAkB7tB,UAAW8V,IACzCa,WAAY,SAAUjhB,GACpB,MAAOb,MAAKgR,QAAQzH,UAAU1I,IAEhC8J,YAAa,WACX3K,KAAKs5B,cAAe,EACft5B,KAAK+4B,aAAqC,IAAtB/4B,KAAKkb,MAAMzb,OAIlCO,KAAKkb,MAAMxZ,KAAKye,GAAaa,sBAH7BhhB,KAAKgR,QAAQrG,cACb3K,KAAKu5B,0BAKT9uB,QAAS,SAAUnK,GACjBN,KAAKq5B,WAAY,EACjBr5B,KAAKM,MAAQA,EACRN,KAAK+4B,aAAqC,IAAtB/4B,KAAKkb,MAAMzb,OAIlCO,KAAKkb,MAAMxZ,KAAKye,GAAaW,cAAcxgB,KAH3CN,KAAKgR,QAAQvG,QAAQnK,GACrBN,KAAKu5B,0BAKT7uB,OAAQ,SAAUtL,GACZY,KAAKm5B,gBAAkB,EACzBn5B,KAAK+4B,aAAe/4B,KAAKkb,MAAMxZ,KAAKye,GAAaS,aAAaxhB,KAEnC,IAA1BY,KAAKm5B,kBAA2Bn5B,KAAKu5B,wBACtCv5B,KAAKgR,QAAQtG,OAAOtL,KAGxBo6B,gBAAiB,SAAUN,GACzB,GAAIl5B,KAAK+4B,YACP,KAAO/4B,KAAKkb,MAAMzb,OAAS,IAAMy5B,EAAgB,GAA4B,MAAvBl5B,KAAKkb,MAAM,GAAGnN,OAAe,CACjF,GAAIoK,GAAQnY,KAAKkb,MAAM7M,OACvB8J,GAAM7J,OAAOtO,KAAKgR,SACC,MAAfmH,EAAMpK,KACRmrB,KAEAl5B,KAAKu5B,wBACLv5B,KAAKkb,UAKX,MAAOge,IAETD,QAAS,SAAU7wB,GACjBpI,KAAKu5B,uBACL,IAAI3sB,GAAO5M,IAkBX,OAhBAA,MAAKo5B,oBAAsBp5B,KAAK2I,UAAU6Q,SAASpR,EACnD,SAAShB,EAAGxH,GACV,GAAI65B,GAAY7sB,EAAK4sB,gBAAgB55B,GACjCqrB,EAAUre,EAAK0sB,cAAgB1sB,EAAKysB,SACxC,QAAKpO,GAAWwO,EAAY,GAC1B7sB,EAAKusB,eAAiBM,EAEfhiB,GAAiB,WACtB7K,EAAKusB,eAAiB,KAJ1B,SAYKn5B,KAAKo5B,qBAEdG,sBAAuB,WACjBv5B,KAAKo5B,sBACPp5B,KAAKo5B,oBAAoBjqB,UACzBnP,KAAKo5B,oBAAsB,SAK1BJ,GACPjpB,GAWFmQ,IAAgBwZ,WAAa,SAAUX,EAAapwB,GAQlD,MANIowB,IAAenwB,GAAYmwB,KAC7BpwB,EAAYowB,EACZA,GAAc,GAGG,MAAfA,IAAwBA,GAAc,GACnC,GAAID,IAAqB94B,KAAM+4B,EAAapwB,IAQrDuX,GAAgByZ,KAAO,SAAUC,GAG/B,QAASC,KACP/4B,EAAO03B,SAHT,GAAI13B,GAASd,KAAK64B,kBAuBlB,OAjBAe,GAAK9G,YAAY,QAAS+G,GAE1B/4B,EAAOyI,UACL,SAAUM,IACP+vB,EAAKE,MAAMtc,OAAO3T,KAAO/I,EAAOy3B,SAEnC,SAAUztB,GACR8uB,EAAKG,KAAK,QAASjvB,IAErB,YAEG8uB,EAAKI,UAAYJ,EAAKK,MACvBL,EAAK3G,eAAe,QAAS4G,KAGjC/4B,EAAO03B,SAEAoB,EAGT,IAAIM,IAAqB,SAAUrf,GAEjC,QAASqf,GAAkBr5B,EAAGs5B,GAC5Bn6B,KAAK2mB,GAAK9lB,EACVb,KAAKo6B,OAASD,EACdtf,EAAUnX,KAAK1D,MAcjB,MAlBAuW,IAAS2jB,EAAmBrf,GAO5Bqf,EAAkB/uB,UAAUzB,KAAO,SAAUG,GAC3C,GAAI6G,GAAMlG,GAASxK,KAAKo6B,OAAO,sBAAsB12B,KAAK1D,KAAKo6B,OAAQp6B,KAAK2mB,GAAI9c,EAC5E6G,KAAQvQ,IAAYH,KAAK2mB,GAAGlc,QAAQiG,EAAIxQ,IAG9Cg6B,EAAkB/uB,UAAU7K,MAAQ,SAAUJ,GAAKF,KAAK2mB,GAAGlc,QAAQvK,IAEnEg6B,EAAkB/uB,UAAUmW,UAAY,WACtCthB,KAAKo6B,OAAO,uBAAuBp6B,KAAK2mB,KAGnCuT,GACP9Y,GAqBFlB,IAAgBma,UAAY,SAASC,GACnC,GAAIx5B,GAASd,IACb,OAAO,IAAIwM,IAAoB,SAAS3L,GACtC,GAAIs5B,GAAQG,EAAW/oB,GAAqB1Q,GAC5C,OAAOC,GAAOyI,UAAU,GAAI2wB,IAAkBr5B,EAAGs5B,KAChDr5B,GAGL,IAAI0L,IAAsBoG,GAAGpG,oBAAuB,SAAUqO,GAI5D,QAASiI,GAAcC,GACrB,MAAOA,IAAcxY,GAAWwY,EAAW5T,SAAW4T,EACpDxY,GAAWwY,GAActL,GAAiBsL,GAAcrL,GAG5D,QAASzJ,GAAc7G,EAAGJ,GACxB,GAAIgc,GAAMhc,EAAM,GAAI4F,EAAO5F,EAAM,GAC7Bic,EAAMzY,GAASoC,EAAK2tB,aAAa72B,KAAKkJ,EAAMoW,EAC5CC,KAAQ9iB,IAAa6iB,EAAIzB,KAAKphB,GAASD,IAAME,EAAQD,GAASD,GAClE8iB,EAAI/U,cAAc6U,EAAcG,IAGlC,QAASzW,GAAoBjD,EAAWN,GACtCjJ,KAAKc,OAASmI,EACdjJ,KAAKu6B,YAAchxB,EACnBsR,EAAUnX,KAAK1D,MAcjB,MAhCAuW,IAAS/J,EAAqBqO,GAqB9BrO,EAAoBrB,UAAU2W,WAAa,SAAUjhB,GACnD,GAAImiB,GAAM,GAAIG,IAAmBtiB,GAAImG,GAASgc,EAAKhjB,KAOnD,OALI6I,IAAuB0S,mBACzB1S,GAAuB2Q,SAASxS,EAAOiH,GAEvCA,EAAc,KAAMjH,GAEfgc,GAGFxW,GAEPuD,IAEEoT,GAAsB,SAAUtI,GAGlC,QAASsI,GAAmBna,GAC1B6R,EAAUnX,KAAK1D,MACfA,KAAKgJ,SAAWA,EAChBhJ,KAAK6pB,EAAI,GAAI7b,IALfuI,GAAS4M,EAAoBtI,EAQ7B,IAAI2f,GAA8BrX,EAAmBhY,SA8BrD,OA5BAqvB,GAA4B9wB,KAAO,SAAUtK,GAC3C,GAAIwE,GAAS4G,GAASxK,KAAKgJ,SAAS0B,QAAQhH,KAAK1D,KAAKgJ,SAAU5J,EAC5DwE,KAAWzD,KACbH,KAAKmP,UACL/O,EAAQwD,EAAO1D,KAInBs6B,EAA4Bl6B,MAAQ,SAAUwK,GAC5C,GAAIlH,GAAS4G,GAASxK,KAAKgJ,SAASyB,SAAS/G,KAAK1D,KAAKgJ,SAAU8B,EACjE9K,MAAKmP,UACLvL,IAAWzD,IAAYC,EAAQwD,EAAO1D,IAGxCs6B,EAA4BlZ,UAAY,WACtC,GAAI1d,GAAS4G,GAASxK,KAAKgJ,SAAS2B,aAAajH,KAAK1D,KAAKgJ,SAC3DhJ,MAAKmP,UACLvL,IAAWzD,IAAYC,EAAQwD,EAAO1D,IAGxCs6B,EAA4BvsB,cAAgB,SAAU7O,GAASY,KAAK6pB,EAAE5b,cAAc7O,IACpFo7B,EAA4BtjB,cAAgB,WAAc,MAAOlX,MAAK6pB,EAAE3S,iBAExEsjB,EAA4BrrB,QAAU,WACpC0L,EAAU1P,UAAUgE,QAAQzL,KAAK1D,MACjCA,KAAK6pB,EAAE1a,WAGFgU,GACP/B,IAEEqZ,GAAoB,SAAUrzB,EAAGvG,GACnCb,KAAKiH,GAAKG,EACVpH,KAAK2mB,GAAK9lB,EAGZ45B,IAAkBtvB,UAAUgE,QAAU,WACpC,IAAKnP,KAAKiH,GAAGC,YAA0B,OAAZlH,KAAK2mB,GAAa,CAC3C,GAAI9P,GAAM7W,KAAKiH,GAAGyzB,UAAUh6B,QAAQV,KAAK2mB,GACzC3mB,MAAKiH,GAAGyzB,UAAUrjB,OAAOR,EAAK,GAC9B7W,KAAK2mB,GAAK,MAQd,IAAImI,IAAUlc,GAAGkc,QAAW,SAAUjU,GAEpC,QAASiU,KACPjU,EAAUnX,KAAK1D,MACfA,KAAKkH,YAAa,EAClBlH,KAAKqhB,WAAY,EACjBrhB,KAAK06B,aACL16B,KAAK26B,UAAW,EAoFlB,MA1FApkB,IAASuY,EAASjU,GASlBlE,GAAcmY,EAAQ3jB,UAAW8V,GAAS9V,WACxC2W,WAAY,SAAUjhB,GAEpB,MADAgX,IAAc7X,MACTA,KAAKqhB,UAINrhB,KAAK26B,UACP95B,EAAE4J,QAAQzK,KAAKM,OACRoX,KAET7W,EAAE8J,cACK+M,KARL1X,KAAK06B,UAAUh5B,KAAKb,GACb,GAAI45B,IAAkBz6B,KAAMa,KAavC+5B,aAAc,WAAmC,MAArB/iB,IAAc7X,MAAcA,KAAK06B,UAAUj7B,OAAS,GAIhFkL,YAAa,WAEX,GADAkN,GAAc7X,OACTA,KAAKqhB,UAAW,CACnBrhB,KAAKqhB,WAAY,CACjB,KAAK,GAAIzhB,GAAI,EAAGi7B,EAAKv7B,EAAWU,KAAK06B,WAAYl7B,EAAMq7B,EAAGp7B,OAAYD,EAAJI,EAASA,IACzEi7B,EAAGj7B,GAAG+K,aAGR3K,MAAK06B,UAAUj7B,OAAS,IAO5BgL,QAAS,SAAUnK,GAEjB,GADAuX,GAAc7X,OACTA,KAAKqhB,UAAW,CACnBrhB,KAAKqhB,WAAY,EACjBrhB,KAAKM,MAAQA,EACbN,KAAK26B,UAAW,CAChB,KAAK,GAAI/6B,GAAI,EAAGi7B,EAAKv7B,EAAWU,KAAK06B,WAAYl7B,EAAMq7B,EAAGp7B,OAAYD,EAAJI,EAASA,IACzEi7B,EAAGj7B,GAAG6K,QAAQnK,EAGhBN,MAAK06B,UAAUj7B,OAAS,IAO5BiL,OAAQ,SAAUtL,GAEhB,GADAyY,GAAc7X,OACTA,KAAKqhB,UACR,IAAK,GAAIzhB,GAAI,EAAGi7B,EAAKv7B,EAAWU,KAAK06B,WAAYl7B,EAAMq7B,EAAGp7B,OAAYD,EAAJI,EAASA,IACzEi7B,EAAGj7B,GAAG8K,OAAOtL,IAOnB+P,QAAS,WACPnP,KAAKkH,YAAa,EAClBlH,KAAK06B,UAAY,QAUrB5L,EAAQjb,OAAS,SAAU7K,EAAUzI,GACnC,MAAO,IAAIu6B,IAAiB9xB,EAAUzI,IAGjCuuB,GACP/e,IAME3F,GAAewI,GAAGxI,aAAgB,SAAUyQ,GAO9C,QAASzQ,KACPyQ,EAAUnX,KAAK1D,MACfA,KAAKkH,YAAa,EAClBlH,KAAKqhB,WAAY,EACjBrhB,KAAKsP,UAAW,EAChBtP,KAAK06B,aACL16B,KAAK26B,UAAW,EA4FlB,MAxGApkB,IAASnM,EAAcyQ,GAevBlE,GAAcvM,EAAae,UAAW8V,GAAS9V,WAC7C2W,WAAY,SAAUjhB,GAGpB,MAFAgX,IAAc7X,MAETA,KAAKqhB,WAKNrhB,KAAK26B,SACP95B,EAAE4J,QAAQzK,KAAKM,OACNN,KAAKsP,UACdzO,EAAE6J,OAAO1K,KAAKZ,OACdyB,EAAE8J,eAEF9J,EAAE8J,cAGG+M,KAbL1X,KAAK06B,UAAUh5B,KAAKb,GACb,GAAI45B,IAAkBz6B,KAAMa,KAkBvC+5B,aAAc,WAAmC,MAArB/iB,IAAc7X,MAAcA,KAAK06B,UAAUj7B,OAAS,GAIhFkL,YAAa,WACX,GAAI/K,GAAGJ,CAEP,IADAqY,GAAc7X,OACTA,KAAKqhB,UAAW,CACnBrhB,KAAKqhB,WAAY,CACjB,IAAIwZ,GAAKv7B,EAAWU,KAAK06B,WAAYl7B,EAAMq7B,EAAGp7B,MAE9C,IAAIO,KAAKsP,SACP,IAAK1P,EAAI,EAAOJ,EAAJI,EAASA,IAAK,CACxB,GAAIiB,GAAIg6B,EAAGj7B,EACXiB,GAAE6J,OAAO1K,KAAKZ,OACdyB,EAAE8J,kBAGJ,KAAK/K,EAAI,EAAOJ,EAAJI,EAASA,IACnBi7B,EAAGj7B,GAAG+K,aAIV3K,MAAK06B,UAAUj7B,OAAS,IAO5BgL,QAAS,SAAUnK,GAEjB,GADAuX,GAAc7X,OACTA,KAAKqhB,UAAW,CACnBrhB,KAAKqhB,WAAY,EACjBrhB,KAAK26B,UAAW,EAChB36B,KAAKM,MAAQA,CAEb,KAAK,GAAIV,GAAI,EAAGi7B,EAAKv7B,EAAWU,KAAK06B,WAAYl7B,EAAMq7B,EAAGp7B,OAAYD,EAAJI,EAASA,IACzEi7B,EAAGj7B,GAAG6K,QAAQnK,EAGhBN,MAAK06B,UAAUj7B,OAAS,IAO5BiL,OAAQ,SAAUtL,GAChByY,GAAc7X,MACVA,KAAKqhB,YACTrhB,KAAKZ,MAAQA,EACbY,KAAKsP,UAAW,IAKlBH,QAAS,WACPnP,KAAKkH,YAAa,EAClBlH,KAAK06B,UAAY,KACjB16B,KAAKM,MAAQ,KACbN,KAAKZ,MAAQ,QAIVgL,GACP2F,IAEE+qB,GAAmBloB,GAAGkoB,iBAAoB,SAAUjgB,GAEtD,QAASigB,GAAiB9xB,EAAUzI,GAClCP,KAAKgJ,SAAWA,EAChBhJ,KAAKO,WAAaA,EAClBsa,EAAUnX,KAAK1D,MAkBjB,MAtBAuW,IAASukB,EAAkBjgB,GAO3BlE,GAAcmkB,EAAiB3vB,UAAW8V,GAAS9V,WACjD2W,WAAY,SAAUjhB,GACpB,MAAOb,MAAKO,WAAWgJ,UAAU1I,IAEnC8J,YAAa,WACX3K,KAAKgJ,SAAS2B,eAEhBF,QAAS,SAAUnK,GACjBN,KAAKgJ,SAASyB,QAAQnK,IAExBoK,OAAQ,SAAUtL,GAChBY,KAAKgJ,SAAS0B,OAAOtL,MAIlB07B,GACP/qB,IAME2lB,GAAkB9iB,GAAG8iB,gBAAmB,SAAU7a,GAEpD,QAAS6a,GAAgBt2B,GACvByb,EAAUnX,KAAK1D,MACfA,KAAKZ,MAAQA,EACbY,KAAK06B,aACL16B,KAAKkH,YAAa,EAClBlH,KAAKqhB,WAAY,EACjBrhB,KAAK26B,UAAW,EAwFlB,MA/FApkB,IAASmf,EAAiB7a,GAU1BlE,GAAc+e,EAAgBvqB,UAAW8V,GAAS9V,WAChD2W,WAAY,SAAUjhB,GAEpB,MADAgX,IAAc7X,MACTA,KAAKqhB,WAKNrhB,KAAK26B,SACP95B,EAAE4J,QAAQzK,KAAKM,OAEfO,EAAE8J,cAEG+M,KATL1X,KAAK06B,UAAUh5B,KAAKb,GACpBA,EAAE6J,OAAO1K,KAAKZ,OACP,GAAIq7B,IAAkBz6B,KAAMa,KAgBvCk6B,SAAU,WAGR,MAFAljB,IAAc7X,MACVA,KAAK26B,UAAYv6B,EAAQJ,KAAKM,OAC3BN,KAAKZ,OAMdw7B,aAAc,WAAmC,MAArB/iB,IAAc7X,MAAcA,KAAK06B,UAAUj7B,OAAS,GAIhFkL,YAAa,WAEX,GADAkN,GAAc7X,OACVA,KAAKqhB,UAAT,CACArhB,KAAKqhB,WAAY,CACjB,KAAK,GAAIzhB,GAAI,EAAGi7B,EAAKv7B,EAAWU,KAAK06B,WAAYl7B,EAAMq7B,EAAGp7B,OAAYD,EAAJI,EAASA,IACzEi7B,EAAGj7B,GAAG+K,aAGR3K,MAAK06B,UAAUj7B,OAAS,IAM1BgL,QAAS,SAAUnK,GAEjB,GADAuX,GAAc7X,OACVA,KAAKqhB,UAAT,CACArhB,KAAKqhB,WAAY,EACjBrhB,KAAK26B,UAAW,EAChB36B,KAAKM,MAAQA,CAEb,KAAK,GAAIV,GAAI,EAAGi7B,EAAKv7B,EAAWU,KAAK06B,WAAYl7B,EAAMq7B,EAAGp7B,OAAYD,EAAJI,EAASA,IACzEi7B,EAAGj7B,GAAG6K,QAAQnK,EAGhBN,MAAK06B,UAAUj7B,OAAS,IAM1BiL,OAAQ,SAAUtL,GAEhB,GADAyY,GAAc7X,OACVA,KAAKqhB,UAAT,CACArhB,KAAKZ,MAAQA,CACb,KAAK,GAAIQ,GAAI,EAAGi7B,EAAKv7B,EAAWU,KAAK06B,WAAYl7B,EAAMq7B,EAAGp7B,OAAYD,EAAJI,EAASA,IACzEi7B,EAAGj7B,GAAG8K,OAAOtL,KAMjB+P,QAAS,WACPnP,KAAKkH,YAAa,EAClBlH,KAAK06B,UAAY,KACjB16B,KAAKZ,MAAQ,KACbY,KAAKM,MAAQ,QAIVo1B,GACP3lB,IAMEgmB,GAAgBnjB,GAAGmjB,cAAiB,SAAUlb,GAIhD,QAASmgB,GAA0BhqB,EAAShI,GAC1C,MAAOyO,IAAiB,WACtBzO,EAASmG,WACR6B,EAAQ9J,YAAc8J,EAAQ0pB,UAAUrjB,OAAOrG,EAAQ0pB,UAAUh6B,QAAQsI,GAAW,KAYzF,QAAS+sB,GAAcF,EAAYC,EAAYntB,GAC7C3I,KAAK61B,WAA2B,MAAdA,EAAqBptB,EAAiBotB,EACxD71B,KAAK81B,WAA2B,MAAdA,EAAqBrtB,EAAiBqtB,EACxD91B,KAAK2I,UAAYA,GAAaE,GAC9B7I,KAAKyN,KACLzN,KAAK06B,aACL16B,KAAKqhB,WAAY,EACjBrhB,KAAKkH,YAAa,EAClBlH,KAAK26B,UAAW,EAChB36B,KAAKM,MAAQ,KACbua,EAAUnX,KAAK1D,MA3BjB,GAAIyI,GAAiBH,KAAK0N,IAAI,EAAG,IAAM,CA6HvC,OApHAO,IAASwf,EAAelb,GAqBxBlE,GAAcof,EAAc5qB,UAAW8V,GAAS9V,WAC9C2W,WAAY,SAAUjhB,GACpBgX,GAAc7X,KACd,IAAIi7B,GAAK,GAAI7Y,IAAkBpiB,KAAK2I,UAAW9H,GAAIuM,EAAe4tB,EAA0Bh7B,KAAMi7B,EAElGj7B,MAAKk7B,MAAMl7B,KAAK2I,UAAUkE,OAC1B7M,KAAK06B,UAAUh5B,KAAKu5B,EAEpB,KAAK,GAAIr7B,GAAI,EAAGJ,EAAMQ,KAAKyN,EAAEhO,OAAYD,EAAJI,EAASA,IAC5Cq7B,EAAGvwB,OAAO1K,KAAKyN,EAAE7N,GAAGR,MAUtB,OAPIY,MAAK26B,SACPM,EAAGxwB,QAAQzK,KAAKM,OACPN,KAAKqhB,WACd4Z,EAAGtwB,cAGLswB,EAAGtY,eACIvV,GAMTwtB,aAAc,WAAmC,MAArB/iB,IAAc7X,MAAcA,KAAK06B,UAAUj7B,OAAS,GAChFy7B,MAAO,SAAUruB,GACf,KAAO7M,KAAKyN,EAAEhO,OAASO,KAAK61B,YAC1B71B,KAAKyN,EAAEY,OAET,MAAOrO,KAAKyN,EAAEhO,OAAS,GAAMoN,EAAM7M,KAAKyN,EAAE,GAAGgpB,SAAYz2B,KAAK81B,YAC5D91B,KAAKyN,EAAEY,SAOX3D,OAAQ,SAAUtL,GAEhB,GADAyY,GAAc7X,OACVA,KAAKqhB,UAAT,CACA,GAAIxU,GAAM7M,KAAK2I,UAAUkE,KACzB7M,MAAKyN,EAAE/L,MAAO+0B,SAAU5pB,EAAKzN,MAAOA,IACpCY,KAAKk7B,MAAMruB,EAEX,KAAK,GAAIjN,GAAI,EAAGi7B,EAAKv7B,EAAWU,KAAK06B,WAAYl7B,EAAMq7B,EAAGp7B,OAAYD,EAAJI,EAASA,IAAK,CAC9E,GAAIoJ,GAAW6xB,EAAGj7B,EAClBoJ,GAAS0B,OAAOtL,GAChB4J,EAAS2Z,kBAOblY,QAAS,SAAUnK,GAEjB,GADAuX,GAAc7X,OACVA,KAAKqhB,UAAT,CACArhB,KAAKqhB,WAAY,EACjBrhB,KAAKM,MAAQA,EACbN,KAAK26B,UAAW,CAChB,IAAI9tB,GAAM7M,KAAK2I,UAAUkE,KACzB7M,MAAKk7B,MAAMruB,EACX,KAAK,GAAIjN,GAAI,EAAGi7B,EAAKv7B,EAAWU,KAAK06B,WAAYl7B,EAAMq7B,EAAGp7B,OAAYD,EAAJI,EAASA,IAAK,CAC9E,GAAIoJ,GAAW6xB,EAAGj7B,EAClBoJ,GAASyB,QAAQnK,GACjB0I,EAAS2Z,eAEX3iB,KAAK06B,UAAUj7B,OAAS,IAK1BkL,YAAa,WAEX,GADAkN,GAAc7X,OACVA,KAAKqhB,UAAT,CACArhB,KAAKqhB,WAAY,CACjB,IAAIxU,GAAM7M,KAAK2I,UAAUkE,KACzB7M,MAAKk7B,MAAMruB,EACX,KAAK,GAAIjN,GAAI,EAAGi7B,EAAKv7B,EAAWU,KAAK06B,WAAYl7B,EAAMq7B,EAAGp7B,OAAYD,EAAJI,EAASA,IAAK,CAC9E,GAAIoJ,GAAW6xB,EAAGj7B,EAClBoJ,GAAS2B,cACT3B,EAAS2Z,eAEX3iB,KAAK06B,UAAUj7B,OAAS,IAK1B0P,QAAS,WACPnP,KAAKkH,YAAa,EAClBlH,KAAK06B,UAAY,QAId3E,GACPhmB,GAKF6C,IAAGuoB,OAAU,SAAUtgB,GAErB,QAASsgB,KACPtgB,EAAUnX,KAAK1D,MAajB,MAfAuW,IAAS4kB,EAAQtgB,GAQjBsgB,EAAOhwB,UAAUotB,MAAQ,WAAcv4B,KAAK0K,QAAO,IAKnDywB,EAAOhwB,UAAUqtB,OAAS,WAAcx4B,KAAK0K,QAAO,IAE7CywB,GACPrM,IAEmB,kBAAVsM,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACzExzB,GAAK+K,GAAKA,GAEVwoB,OAAO,WACL,MAAOxoB,OAEAb,IAAeG,GAEpBO,IACDP,GAAWF,QAAUY,IAAIA,GAAKA,GAE/Bb,GAAYa,GAAKA,GAInB/K,GAAK+K,GAAKA,EAIZ,IAAI1Q,IAAcC,MAElBuB,KAAK1D"} \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/rx-lite/rx.lite.min.js b/tools/node_modules/eslint/node_modules/rx-lite/rx.lite.min.js
new file mode 100644
index 0000000000..870ebcd2f9
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/rx-lite/rx.lite.min.js
@@ -0,0 +1,5 @@
+/* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/
+(function(a){function b(a){return a&&a.Object===Object?a:null}function c(a){for(var b=a.length,c=new Array(b),d=0;b>d;d++)c[d]=a[d];return c}function d(a){return function(){try{return a.apply(this,arguments)}catch(b){return va.e=b,va}}}function e(a){throw a}function f(a,b){if(xa&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(Ba)){for(var c=[],d=b;d;d=d.source)d.stack&&c.unshift(d.stack);c.unshift(a.stack);var e=c.join("\n"+Ba+"\n");a.stack=g(e)}}function g(a){for(var b=a.split("\n"),c=[],d=0,e=b.length;e>d;d++){var f=b[d];h(f)||i(f)||!f||c.push(f)}return c.join("\n")}function h(a){var b=k(a);if(!b)return!1;var c=b[0],d=b[1];return c===za&&d>=Aa&&qe>=d}function i(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function j(){if(xa)try{throw new Error}catch(a){var b=a.stack.split("\n"),c=b[0].indexOf("@")>0?b[1]:b[2],d=k(c);if(!d)return;return za=d[0],d[1]}}function k(a){var b=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(a);if(b)return[b[1],Number(b[2])];var c=/at ([^ ]+):(\d+):(?:\d+)$/.exec(a);if(c)return[c[1],Number(c[2])];var d=/.*@(.+):(\d+)$/.exec(a);return d?[d[1],Number(d[2])]:void 0}function l(b,c,d,e,f,g){var h=ob(b),i=h.length,j=ob(c),k=j.length;if(i!==k&&!e)return!1;for(var l,m=i;m--;)if(l=h[m],!(e?l in c:lb.call(c,l)))return!1;for(var n=e;++m<i;){l=h[m];var o,p=b[l],q=c[l];if(!(o===a?d(p,q,e,f,g):o))return!1;n||(n="constructor"===l)}if(!n){var r=b.constructor,s=c.constructor;if(r!==s&&"constructor"in b&&"constructor"in c&&!("function"==typeof r&&r instanceof r&&"function"==typeof s&&s instanceof s))return!1}return!0}function m(a,b,c){switch(c){case Qa:case Ra:return+a===+b;case Sa:return a.name===b.name&&a.message===b.message;case Va:return a!==+a?b!==+b:a===+b;case Xa:case Za:return a===b+""}return!1}function n(a){return!!a&&"object"==typeof a}function o(a){return"number"==typeof a&&a>-1&&a%1===0&&nb>=a}function p(a){return n(a)&&o(a.length)&&!!jb[mb.call(a)]}function q(a,b){for(var c=-1,d=a.length;++c<d;)if(b(a[c],c,a))return!0;return!1}function r(b,c,d,e,f,g){var h=-1,i=b.length,j=c.length;if(i!==j&&!(e&&j>i))return!1;for(;++h<i;){var k,l=b[h],m=c[h];if(k!==a){if(k)continue;return!1}if(e){if(!q(c,function(a){return l===a||d(l,a,e,f,g)}))return!1}else if(l!==m&&!d(l,m,e,f,g))return!1}return!0}function s(a,b,c,d,e,f){var g=rb(a),h=rb(b),i=Pa,j=Pa;g||(i=mb.call(a),i===Oa?i=Wa:i!==Wa&&(g=p(a))),h||(j=mb.call(b),j===Oa&&(j=Wa));var k=i===Wa&&!qb(a),n=j===Wa&&!qb(b),o=i===j;if(o&&!g&&!k)return m(a,b,i);if(!d){var q=k&&lb.call(a,"__wrapped__"),s=n&&lb.call(b,"__wrapped__");if(q||s)return c(q?a.value():a,s?b.value():b,d,e,f)}if(!o)return!1;e||(e=[]),f||(f=[]);for(var t=e.length;t--;)if(e[t]===a)return f[t]===b;e.push(a),f.push(b);var u=(g?r:l)(a,b,c,d,e,f);return e.pop(),f.pop(),u}function t(a,b,c,d,e){return a===b?!0:null==a||null==b||!pb(a)&&!n(b)?a!==a&&b!==b:s(a,b,t,c,d,e)}function u(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function v(a,b){this.id=a,this.value=b}function w(a){this._s=a,this.isDisposed=!1}function x(a){this._s=a}function y(a){this._s=a,this._l=a.length,this._i=0}function z(a){this._a=a}function A(a){this._a=a,this._l=E(a),this._i=0}function B(a){return"number"==typeof a&&la.isFinite(a)}function C(b){var c,d=b[Ia];if(!d&&"string"==typeof b)return c=new x(b),c[Ia]();if(!d&&b.length!==a)return c=new z(b),c[Ia]();if(!d)throw new TypeError("Object is not iterable");return b[Ia]()}function D(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function E(a){var b=+a.length;return isNaN(b)?0:0!==b&&B(b)?(b=D(b)*Math.floor(Math.abs(b)),0>=b?0:b>Ac?Ac:b):b}function F(a,b){return Kb(a)||(a=Qb),new Cc(b,a)}function G(a,b){this.observer=a,this.parent=b}function H(){return!1}function I(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return b}function H(){return!1}function I(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return b}function H(){return!1}function J(){return[]}function H(){return!1}function J(){return[]}function I(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return b}function K(a){return function(b){return a.subscribe(b)}}function L(a){return{"@@iterator":function(){return{next:function(){return{done:!1,value:a}}}}}}function L(a){return{"@@iterator":function(){return{next:function(){return{done:!1,value:a}}}}}}function M(b,c){return function(d){for(var e=d,f=0;c>f;f++){var g=e[b[f]];if("undefined"==typeof g)return a;e=g}return e}}function N(a,b,c,d){var e=new me;return d.push(O(e,b,c)),a.apply(b,d),e.asObservable()}function O(a,b,c){return function(){for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];if(ua(c)){if(e=wa(c).apply(b,e),e===va)return a.onError(e.e);a.onNext(e)}else e.length<=1?a.onNext(e[0]):a.onNext(e);a.onCompleted()}}function P(a,b,c,d){var e=new me;return d.push(Q(e,b,c)),a.apply(b,d),e.asObservable()}function Q(a,b,c){return function(){var d=arguments[0];if(d)return a.onError(d);for(var e=arguments.length,f=[],g=1;e>g;g++)f[g-1]=arguments[g];if(ua(c)){var f=wa(c).apply(b,f);if(f===va)return a.onError(f.e);a.onNext(f)}else f.length<=1?a.onNext(f[0]):a.onNext(f);a.onCompleted()}}function R(a){return la.StaticNodeList?a instanceof la.StaticNodeList||a instanceof la.NodeList:"[object NodeList]"===Object.prototype.toString.call(a)}function S(a,b,c){this._e=a,this._n=b,this._fn=c,this._e.addEventListener(this._n,this._fn,!1),this.isDisposed=!1}function T(a,b,c){var d=new vb,e=Object.prototype.toString.call(a);if(R(a)||"[object HTMLCollection]"===e)for(var f=0,g=a.length;g>f;f++)d.add(T(a.item(f),b,c));else a&&d.add(new S(a,b,c));return d}function U(a,b){return new Vd(a,b)}function V(a,b,c){return new ie(function(d){var e=a,f=Jb(b);return c.scheduleRecursiveFuture(0,e,function(a,b){if(f>0){var g=c.now();e=new Date(e.getTime()+f),e.getTime()<=g&&(e=new Date(g+f))}d.onNext(a),b(a+1,new Date(e))})})}function W(a,b,c){return a===b?new ie(function(a){return c.schedulePeriodic(0,b,function(b){return a.onNext(b),b+1})}):vc(function(){return V(new Date(c.now()+a),b,c)})}function X(a,b,c){return new ie(function(d){var e,f=!1,g=new Eb,h=null,i=[],j=!1;return e=a.materialize().timestamp(c).subscribe(function(a){var e,k;"E"===a.value.kind?(i=[],i.push(a),h=a.value.error,k=!j):(i.push({value:a.value,timestamp:a.timestamp+b}),k=!f,f=!0),k&&(null!==h?d.onError(h):(e=new Db,g.setDisposable(e),e.setDisposable(c.scheduleRecursiveFuture(null,b,function(a,b){var e,g,k,l;if(null===h){j=!0;do k=null,i.length>0&&i[0].timestamp-c.now()<=0&&(k=i.shift().value),null!==k&&k.accept(d);while(null!==k);l=!1,g=0,i.length>0?(l=!0,g=Math.max(0,i[0].timestamp-c.now())):f=!1,e=h,j=!1,null!==e?d.onError(e):l&&b(null,g)}}))))}),new Fb(e,g)},a)}function Y(a,b,c){return vc(function(){return X(a,b-c.now(),c)})}function Z(a,b,c){var d,e;return ua(b)?e=b:(d=b,e=c),new ie(function(b){function c(){i.setDisposable(a.subscribe(function(a){var c=wa(e)(a);if(c===va)return b.onError(c.e);var d=new Db;g.add(d),d.setDisposable(c.subscribe(function(){b.onNext(a),g.remove(d),f()},function(a){b.onError(a)},function(){b.onNext(a),g.remove(d),f()}))},function(a){b.onError(a)},function(){h=!0,i.dispose(),f()}))}function f(){h&&0===g.length&&b.onCompleted()}var g=new vb,h=!1,i=new Eb;return d?i.setDisposable(d.subscribe(c,function(a){b.onError(a)},c)):c(),new Fb(i,g)},a)}function $(a,b){return new ie(function(c){var d,e=!1,f=new Eb,g=0,h=a.subscribe(function(a){var h=wa(b)(a);if(h===va)return c.onError(h.e);ta(h)&&(h=Rd(h)),e=!0,d=a,g++;var i=g,j=new Db;f.setDisposable(j),j.setDisposable(h.subscribe(function(){e&&g===i&&c.onNext(d),e=!1,j.dispose()},function(a){c.onError(a)},function(){e&&g===i&&c.onNext(d),e=!1,j.dispose()}))},function(a){f.dispose(),c.onError(a),e=!1,g++},function(){f.dispose(),e&&c.onNext(d),c.onCompleted(),e=!1,g++});return new Fb(h,f)},a)}function _(a,b,c,d){return ua(b)&&(d=c,c=b,b=Gc()),ic.isObservable(d)||(d=Mc(new ce)),new ie(function(e){function f(a){function b(){return l=c===k}var c=k,f=new Db;i.setDisposable(f),f.setDisposable(a.subscribe(function(){b()&&h.setDisposable(d.subscribe(e)),f.dispose()},function(a){b()&&e.onError(a)},function(){b()&&h.setDisposable(d.subscribe(e))}))}function g(){var a=!l;return a&&k++,a}var h=new Eb,i=new Eb,j=new Db;h.setDisposable(j);var k=0,l=!1;return f(b),j.setDisposable(a.subscribe(function(a){if(g()){e.onNext(a);var b=wa(c)(a);if(b===va)return e.onError(b.e);f(ta(b)?Rd(b):b)}},function(a){g()&&e.onError(a)},function(){g()&&e.onCompleted()})),new Fb(h,i)},a)}function aa(a,b,c,d){return Kb(c)&&(d=c,c=Mc(new ce)),c instanceof Error&&(c=Mc(c)),Kb(d)||(d=Vb),ic.isObservable(c)||(c=Mc(new ce)),new ie(function(e){function f(){var a=g;k.setDisposable(d.scheduleFuture(null,b,function(){j=g===a,j&&(ta(c)&&(c=Rd(c)),i.setDisposable(c.subscribe(e)))}))}var g=0,h=new Db,i=new Eb,j=!1,k=new Eb;return i.setDisposable(h),f(),h.setDisposable(a.subscribe(function(a){j||(g++,e.onNext(a),f())},function(a){j||(g++,e.onError(a))},function(){j||(g++,e.onCompleted())})),new Fb(i,k)},a)}function ba(a,b,c){return new ie(function(d){function e(a,b){if(j[b]=a,g[b]=!0,h||(h=g.every(oa))){if(f)return d.onError(f);var e=wa(c).apply(null,j);if(e===va)return d.onError(e.e);d.onNext(e)}i&&j[1]&&d.onCompleted()}var f,g=[!1,!1],h=!1,i=!1,j=new Array(2);return new Fb(a.subscribe(function(a){e(a,0)},function(a){j[1]?d.onError(a):f=a},function(){i=!0,j[1]&&d.onCompleted()}),b.subscribe(function(a){e(a,1)},function(a){d.onError(a)},function(){i=!0,e(!0,1)}))},a)}function ca(a){return{"@@transducer/init":function(){return a},"@@transducer/step":function(a,b){return a.onNext(b)},"@@transducer/result":function(a){return a.onCompleted()}}}var da={"function":!0,object:!0},ea=da[typeof exports]&&exports&&!exports.nodeType?exports:null,fa=da[typeof module]&&module&&!module.nodeType?module:null,ga=b(ea&&fa&&"object"==typeof global&&global),ha=b(da[typeof self]&&self),ia=b(da[typeof window]&&window),ja=fa&&fa.exports===ea?ea:null,ka=b(da[typeof this]&&this),la=ga||ia!==(ka&&ka.window)&&ia||ha||ka||Function("return this")(),ma={internals:{},config:{Promise:la.Promise},helpers:{}},na=ma.helpers.noop=function(){},oa=ma.helpers.identity=function(a){return a},pa=ma.helpers.defaultNow=Date.now,qa=ma.helpers.defaultComparer=function(a,b){return sb(a,b)},ra=ma.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},sa=(ma.helpers.defaultKeySerializer=function(a){return a.toString()},ma.helpers.defaultError=function(a){throw a}),ta=ma.helpers.isPromise=function(a){return!!a&&"function"!=typeof a.subscribe&&"function"==typeof a.then},ua=ma.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==toString.call(a)}),a}(),va={e:{}},wa=ma.internals.tryCatch=function(a){if(!ua(a))throw new TypeError("fn must be a function");return d(a)};ma.config.longStackSupport=!1;var xa=!1,ya=wa(function(){throw new Error})();xa=!!ya.e&&!!ya.e.stack;var za,Aa=j(),Ba="From previous event:",Ca=ma.EmptyError=function(){this.message="Sequence contains no elements.",Error.call(this)};Ca.prototype=Object.create(Error.prototype),Ca.prototype.name="EmptyError";var Da=ma.ObjectDisposedError=function(){this.message="Object has been disposed",Error.call(this)};Da.prototype=Object.create(Error.prototype),Da.prototype.name="ObjectDisposedError";var Ea=ma.ArgumentOutOfRangeError=function(){this.message="Argument out of range",Error.call(this)};Ea.prototype=Object.create(Error.prototype),Ea.prototype.name="ArgumentOutOfRangeError";var Fa=ma.NotSupportedError=function(a){this.message=a||"This operation is not supported",Error.call(this)};Fa.prototype=Object.create(Error.prototype),Fa.prototype.name="NotSupportedError";var Ga=ma.NotImplementedError=function(a){this.message=a||"This operation is not implemented",Error.call(this)};Ga.prototype=Object.create(Error.prototype),Ga.prototype.name="NotImplementedError";var Ha=ma.helpers.notImplemented=function(){throw new Ga},Ia=(ma.helpers.notSupported=function(){throw new Fa},"function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_");la.Set&&"function"==typeof(new la.Set)["@@iterator"]&&(Ia="@@iterator");var Ja=ma.doneEnumerator={done:!0,value:a},Ka=ma.helpers.isIterable=function(b){return b&&b[Ia]!==a},La=ma.helpers.isArrayLike=function(b){return b&&b.length!==a};ma.helpers.iterator=Ia;var Ma=ma.internals.bindCallback=function(a,b,c){if("undefined"==typeof b)return a;switch(c){case 0:return function(){return a.call(b)};case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}},Na=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Oa=(Na.length,"[object Arguments]"),Pa="[object Array]",Qa="[object Boolean]",Ra="[object Date]",Sa="[object Error]",Ta="[object Function]",Ua="[object Map]",Va="[object Number]",Wa="[object Object]",Xa="[object RegExp]",Ya="[object Set]",Za="[object String]",$a="[object WeakMap]",_a="[object ArrayBuffer]",ab="[object Float32Array]",bb="[object Float64Array]",cb="[object Int8Array]",db="[object Int16Array]",eb="[object Int32Array]",fb="[object Uint8Array]",gb="[object Uint8ClampedArray]",hb="[object Uint16Array]",ib="[object Uint32Array]",jb={};jb[ab]=jb[bb]=jb[cb]=jb[db]=jb[eb]=jb[fb]=jb[gb]=jb[hb]=jb[ib]=!0,jb[Oa]=jb[Pa]=jb[_a]=jb[Qa]=jb[Ra]=jb[Sa]=jb[Ta]=jb[Ua]=jb[Va]=jb[Wa]=jb[Xa]=jb[Ya]=jb[Za]=jb[$a]=!1;var kb=Object.prototype,lb=kb.hasOwnProperty,mb=kb.toString,nb=Math.pow(2,53)-1,ob=Object.keys||function(){var a=Object.prototype.hasOwnProperty,b=!{toString:null}.propertyIsEnumerable("toString"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=c.length;return function(e){if("object"!=typeof e&&("function"!=typeof e||null===e))throw new TypeError("Object.keys called on non-object");var f,g,h=[];for(f in e)a.call(e,f)&&h.push(f);if(b)for(g=0;d>g;g++)a.call(e,c[g])&&h.push(c[g]);return h}}(),pb=ma.internals.isObject=function(a){var b=typeof a;return!!a&&("object"===b||"function"===b)},qb=function(){try{Object({toString:0}+"")}catch(a){return function(){return!1}}return function(a){return"function"!=typeof a.toString&&"string"==typeof(a+"")}}(),rb=Array.isArray||function(a){return n(a)&&o(a.length)&&mb.call(a)===Pa},sb=ma.internals.isEqual=function(a,b){return t(a,b)},tb=({}.hasOwnProperty,Array.prototype.slice,ma.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c}),ub=ma.internals.addProperties=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]);for(var e=0,f=b.length;f>e;e++){var g=b[e];for(var h in g)a[h]=g[h]}},vb=(ma.internals.addRef=function(a,b){return new ie(function(c){return new Fb(b.getDisposable(),a.subscribe(c))})},ma.CompositeDisposable=function(){var a,b,c=[];if(Array.isArray(arguments[0]))c=arguments[0];else for(b=arguments.length,c=new Array(b),a=0;b>a;a++)c[a]=arguments[a];this.disposables=c,this.isDisposed=!1,this.length=c.length}),wb=vb.prototype;wb.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},wb.remove=function(a){var b=!1;if(!this.isDisposed){var c=this.disposables.indexOf(a);-1!==c&&(b=!0,this.disposables.splice(c,1),this.length--,a.dispose())}return b},wb.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var a=this.disposables.length,b=new Array(a),c=0;a>c;c++)b[c]=this.disposables[c];for(this.disposables=[],this.length=0,c=0;a>c;c++)b[c].dispose()}};var xb=ma.Disposable=function(a){this.isDisposed=!1,this.action=a||na};xb.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var yb=xb.create=function(a){return new xb(a)},zb=xb.empty={dispose:na},Ab=xb.isDisposable=function(a){return a&&ua(a.dispose)},Bb=xb.checkDisposed=function(a){if(a.isDisposed)throw new Da},Cb=xb._fixup=function(a){return Ab(a)?a:zb},Db=ma.SingleAssignmentDisposable=function(){this.isDisposed=!1,this.current=null};Db.prototype.getDisposable=function(){return this.current},Db.prototype.setDisposable=function(a){if(this.current)throw new Error("Disposable has already been assigned");var b=this.isDisposed;!b&&(this.current=a),b&&a&&a.dispose()},Db.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null,a&&a.dispose()}};var Eb=ma.SerialDisposable=function(){this.isDisposed=!1,this.current=null};Eb.prototype.getDisposable=function(){return this.current},Eb.prototype.setDisposable=function(a){var b=this.isDisposed;if(!b){var c=this.current;this.current=a}c&&c.dispose(),b&&a&&a.dispose()},Eb.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()};var Fb=ma.BinaryDisposable=function(a,b){this._first=a,this._second=b,this.isDisposed=!1};Fb.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this._first;this._first=null,a&&a.dispose();var b=this._second;this._second=null,b&&b.dispose()}};var Gb=ma.NAryDisposable=function(a){this._disposables=a,this.isDisposed=!1};Gb.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var a=0,b=this._disposables.length;b>a;a++)this._disposables[a].dispose();this._disposables.length=0}};var Hb=(ma.RefCountDisposable=function(){function a(a){this.disposable=a,this.disposable.count++,this.isInnerDisposed=!1}function b(a){this.underlyingDisposable=a,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return a.prototype.dispose=function(){this.disposable.isDisposed||this.isInnerDisposed||(this.isInnerDisposed=!0,this.disposable.count--,0===this.disposable.count&&this.disposable.isPrimaryDisposed&&(this.disposable.isDisposed=!0,this.disposable.underlyingDisposable.dispose()))},b.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},b.prototype.getDisposable=function(){return this.isDisposed?zb:new a(this)},b}(),ma.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||ra,this.disposable=new Db});Hb.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},Hb.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},Hb.prototype.isCancelled=function(){return this.disposable.isDisposed},Hb.prototype.invokeCore=function(){return Cb(this.action(this.scheduler,this.state))};var Ib=ma.Scheduler=function(){function a(){}a.isScheduler=function(b){return b instanceof a};var b=a.prototype;return b.schedule=function(a,b){throw new Ga},b.scheduleFuture=function(b,c,d){var e=c;return e instanceof Date&&(e-=this.now()),e=a.normalize(e),0===e?this.schedule(b,d):this._scheduleFuture(b,e,d)},b._scheduleFuture=function(a,b,c){throw new Ga},a.now=pa,a.prototype.now=pa,a.normalize=function(a){return 0>a&&(a=0),a},a}(),Jb=Ib.normalize,Kb=Ib.isScheduler;!function(a){function b(a,b){function c(b){function d(a,b){return g?f.remove(i):h=!0,e(b,c),zb}var g=!1,h=!1,i=a.schedule(b,d);h||(f.add(i),g=!0)}var d=b[0],e=b[1],f=new vb;return e(d,c),f}function c(a,b){function c(b,d){function g(a,b){return h?f.remove(j):i=!0,e(b,c),zb}var h=!1,i=!1,j=a.scheduleFuture(b,d,g);i||(f.add(j),h=!0)}var d=b[0],e=b[1],f=new vb;return e(d,c),f}a.scheduleRecursive=function(a,c){return this.schedule([a,c],b)},a.scheduleRecursiveFuture=function(a,b,d){return this.scheduleFuture([a,d],b,c)}}(Ib.prototype),function(a){a.schedulePeriodic=function(a,b,c){if("undefined"==typeof la.setInterval)throw new Fa;b=Jb(b);var d=a,e=la.setInterval(function(){d=c(d)},b);return yb(function(){la.clearInterval(e)})}}(Ib.prototype);var Lb,Mb,Nb=function(a){function b(){a.call(this)}return tb(b,a),b.prototype.schedule=function(a,b){return Cb(b(this,a))},b}(Ib),Ob=Ib.immediate=new Nb,Pb=function(a){function b(){for(;d.length>0;){var a=d.dequeue();!a.isCancelled()&&a.invoke()}}function c(){a.call(this)}var d;return tb(c,a),c.prototype.schedule=function(a,c){var f=new Hb(this,a,c,this.now());if(d)d.enqueue(f);else{d=new Wb(4),d.enqueue(f);var g=wa(b)();d=null,g===va&&e(g.e)}return f.disposable},c.prototype.scheduleRequired=function(){return!d},c}(Ib),Qb=Ib.currentThread=new Pb,Rb=(ma.internals.SchedulePeriodicRecursive=function(){function a(a){return function(b,c){c(0,a._period);var d=wa(a._action)(a._state);d===va&&(a._cancel.dispose(),e(d.e)),a._state=d}}function b(a,b,c,d){this._scheduler=a,this._state=b,this._period=c,this._action=d}return b.prototype.start=function(){var b=new Db;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveFuture(0,this._period,a(this))),b},b}(),function(){var a,b=na;if(la.setTimeout)a=la.setTimeout,b=la.clearTimeout;else{if(!la.WScript)throw new Fa;a=function(a,b){la.WScript.Sleep(b),a()}}return{setTimeout:a,clearTimeout:b}}()),Sb=Rb.setTimeout,Tb=Rb.clearTimeout;!function(){function a(b){if(f)Sb(function(){a(b)},0);else{var c=d[b];if(c){f=!0;var g=wa(c)();Mb(b),f=!1,g===va&&e(g.e)}}}function b(){if(!la.postMessage||la.importScripts)return!1;var a=!1,b=la.onmessage;return la.onmessage=function(){a=!0},la.postMessage("","*"),la.onmessage=b,a}var c=1,d={},f=!1;Mb=function(a){delete d[a]};var g=new RegExp("^"+String(toString).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),h="function"==typeof(h=ga&&ja&&ga.setImmediate)&&!g.test(h)&&h;if(ua(h))Lb=function(b){var e=c++;return d[e]=b,h(function(){a(e)}),e};else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))Lb=function(b){var e=c++;return d[e]=b,process.nextTick(function(){a(e)}),e};else if(b()){var i="ms.rx.schedule"+Math.random(),j=function(b){"string"==typeof b.data&&b.data.substring(0,i.length)===i&&a(b.data.substring(i.length))};la.addEventListener("message",j,!1),Lb=function(a){var b=c++;return d[b]=a,la.postMessage(i+b,"*"),b}}else if(la.MessageChannel){var k=new la.MessageChannel;k.port1.onmessage=function(b){a(b.data)},Lb=function(a){var b=c++;return d[b]=a,k.port2.postMessage(b),b}}else Lb="document"in la&&"onreadystatechange"in la.document.createElement("script")?function(b){var e=la.document.createElement("script"),f=c++;return d[f]=b,e.onreadystatechange=function(){a(f),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},la.document.documentElement.appendChild(e),f}:function(b){var e=c++;return d[e]=b,Sb(function(){a(e)},0),e}}();var Ub=function(a){function b(){a.call(this)}function c(a,b,c,d){return function(){a.setDisposable(xb._fixup(b(c,d)))}}function d(a){this._id=a,this.isDisposed=!1}function e(a){this._id=a,this.isDisposed=!1}return tb(b,a),d.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,Mb(this._id))},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,Tb(this._id))},b.prototype.schedule=function(a,b){var e=new Db,f=Lb(c(e,b,this,a));return new Fb(e,new d(f))},b.prototype._scheduleFuture=function(a,b,d){if(0===b)return this.schedule(a,d);var f=new Db,g=Sb(c(f,d,this,a),b);return new Fb(f,new e(g))},b}(Ib),Vb=Ib["default"]=Ib.async=new Ub;v.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var Wb=ma.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},Xb=Wb.prototype;Xb.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},Xb.percolate=function(a){if(!(a>=this.length||0>a)){var b=a-1>>1;if(!(0>b||b===a)&&this.isHigherPriority(a,b)){var c=this.items[a];this.items[a]=this.items[b],this.items[b]=c,this.percolate(b)}}},Xb.heapify=function(a){if(+a||(a=0),!(a>=this.length||0>a)){var b=2*a+1,c=2*a+2,d=a;if(b<this.length&&this.isHigherPriority(b,d)&&(d=b),c<this.length&&this.isHigherPriority(c,d)&&(d=c),d!==a){var e=this.items[a];this.items[a]=this.items[d],this.items[d]=e,this.heapify(d)}}},Xb.peek=function(){return this.items[0].value},Xb.removeAt=function(b){this.items[b]=this.items[--this.length],this.items[this.length]=a,this.heapify()},Xb.dequeue=function(){var a=this.peek();return this.removeAt(0),a},Xb.enqueue=function(a){var b=this.length++;this.items[b]=new v(Wb.count++,a),this.percolate(b)},Xb.remove=function(a){for(var b=0;b<this.length;b++)if(this.items[b].value===a)return this.removeAt(b),!0;return!1},Wb.count=0;var Yb,Zb=ma.Notification=function(){function a(){}return a.prototype._accept=function(a,b,c){throw new Ga},a.prototype._acceptObserver=function(a,b,c){throw new Ga},a.prototype.accept=function(a,b,c){return a&&"object"==typeof a?this._acceptObserver(a):this._accept(a,b,c)},a.prototype.toObservable=function(a){var b=this;return Kb(a)||(a=Ob),new ie(function(c){return a.schedule(b,function(a,b){b._acceptObserver(c),"N"===b.kind&&c.onCompleted()})})},a}(),$b=function(a){function b(a){this.value=a,this.kind="N"}return tb(b,a),b.prototype._accept=function(a){return a(this.value)},b.prototype._acceptObserver=function(a){return a.onNext(this.value)},b.prototype.toString=function(){return"OnNext("+this.value+")"},b}(Zb),_b=function(a){function b(a){this.error=a,this.kind="E"}return tb(b,a),b.prototype._accept=function(a,b){return b(this.error)},b.prototype._acceptObserver=function(a){return a.onError(this.error)},b.prototype.toString=function(){return"OnError("+this.error+")"},b}(Zb),ac=function(a){function b(){this.kind="C"}return tb(b,a),b.prototype._accept=function(a,b,c){return c()},b.prototype._acceptObserver=function(a){return a.onCompleted()},b.prototype.toString=function(){return"OnCompleted()"},b}(Zb),bc=Zb.createOnNext=function(a){return new $b(a)},cc=Zb.createOnError=function(a){return new _b(a)},dc=Zb.createOnCompleted=function(){return new ac},ec=ma.Observer=function(){},fc=ec.create=function(a,b,c){return a||(a=na),b||(b=sa),c||(c=na),new hc(a,b,c)},gc=ma.internals.AbstractObserver=function(a){function b(){this.isStopped=!1}return tb(b,a),b.prototype.next=Ha,b.prototype.error=Ha,b.prototype.completed=Ha,b.prototype.onNext=function(a){!this.isStopped&&this.next(a)},b.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.error(a))},b.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.completed())},b.prototype.dispose=function(){this.isStopped=!0},b.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.error(a),!0)},b}(ec),hc=ma.AnonymousObserver=function(a){function b(b,c,d){a.call(this),this._onNext=b,this._onError=c,this._onCompleted=d}return tb(b,a),b.prototype.next=function(a){this._onNext(a)},b.prototype.error=function(a){this._onError(a)},b.prototype.completed=function(){this._onCompleted()},b}(gc),ic=ma.Observable=function(){function a(a,b){return function(c){var d=c.onError;return c.onError=function(b){f(b,a),d.call(c,b)},b.call(a,c)}}function b(){if(ma.config.longStackSupport&&xa){var b=this._subscribe,c=wa(e)(new Error).e;this.stack=c.stack.substring(c.stack.indexOf("\n")+1),this._subscribe=a(this,b)}}return Yb=b.prototype,b.isObservable=function(a){return a&&ua(a.subscribe)},Yb.subscribe=Yb.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:fc(a,b,c))},Yb.subscribeOnNext=function(a,b){return this._subscribe(fc("undefined"!=typeof b?function(c){a.call(b,c)}:a))},Yb.subscribeOnError=function(a,b){return this._subscribe(fc(null,"undefined"!=typeof b?function(c){a.call(b,c)}:a))},Yb.subscribeOnCompleted=function(a,b){return this._subscribe(fc(null,null,"undefined"!=typeof b?function(){a.call(b)}:a))},b}(),jc=ma.internals.ScheduledObserver=function(a){function b(b,c){a.call(this),this.scheduler=b,this.observer=c,this.isAcquired=!1,this.hasFaulted=!1,this.queue=[],this.disposable=new Eb}function c(a,b){return function(){a.onNext(b)}}function d(a,b){return function(){a.onError(b)}}function f(a){return function(){a.onCompleted()}}function g(a,b){var c;if(!(a.queue.length>0))return void(a.isAcquired=!1);c=a.queue.shift();var d=wa(c)();return d===va?(a.queue=[],a.hasFaulted=!0,e(d.e)):void b(a)}return tb(b,a),b.prototype.next=function(a){this.queue.push(c(this.observer,a))},b.prototype.error=function(a){this.queue.push(d(this.observer,a))},b.prototype.completed=function(){this.queue.push(f(this.observer))},b.prototype.ensureActive=function(){var a=!1;!this.hasFaulted&&this.queue.length>0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(this,g))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(gc),kc=ma.ObservableBase=function(a){function b(a){return a&&ua(a.dispose)?a:ua(a)?yb(a):zb}function c(a,c){var d=c[0],f=c[1],g=wa(f.subscribeCore).call(f,d);g!==va||d.fail(va.e)||e(va.e),d.setDisposable(b(g))}function d(){a.call(this)}return tb(d,a),d.prototype._subscribe=function(a){var b=new je(a),d=[b,this];return Qb.scheduleRequired()?Qb.schedule(d,c):c(null,d),b},d.prototype.subscribeCore=Ha,d}(ic),lc=ma.FlatMapObservable=function(a){function b(b,c,d,e){this.resultSelector=ua(d)?d:null,this.selector=Ma(ua(c)?c:function(){return c},e,3),this.source=b,a.call(this)}function c(a,b,c,d){this.i=0,this.selector=b,this.resultSelector=c,this.source=d,this.o=a,gc.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this.selector,this.resultSelector,this))},tb(c,gc),c.prototype._wrapResult=function(a,b,c){return this.resultSelector?a.map(function(a,d){return this.resultSelector(b,a,c,d)},this):a},c.prototype.next=function(a){var b=this.i++,c=wa(this.selector)(a,b,this.source);return c===va?this.o.onError(c.e):(ta(c)&&(c=Rd(c)),(La(c)||Ka(c))&&(c=ic.from(c)),void this.o.onNext(this._wrapResult(c,a,b)))},c.prototype.error=function(a){this.o.onError(a)},c.prototype.completed=function(){this.o.onCompleted()},b}(kc),mc=ma.internals.Enumerable=function(){};w.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._s.isDisposed=!0)};var nc=function(a){function b(b){this.sources=b,a.call(this)}function c(a,b){if(!a.isDisposed){var c=wa(a.e.next).call(a.e);if(c===va)return a.o.onError(c.e);if(c.done)return a.o.onCompleted();var e=c.value;ta(e)&&(e=Rd(e));var f=new Db;a.subscription.setDisposable(f),f.setDisposable(e.subscribe(new d(a,b)))}}function d(a,b){this._state=a,this._recurse=b,gc.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){var b=new Eb,d={isDisposed:!1,o:a,subscription:b,e:this.sources[Ia]()},e=Qb.scheduleRecursive(d,c);return new Gb([b,e,new w(d)])},tb(d,gc),d.prototype.next=function(a){this._state.o.onNext(a)},d.prototype.error=function(a){this._state.o.onError(a)},d.prototype.completed=function(){this._recurse(this._state)},b}(kc);mc.prototype.concat=function(){return new nc(this)};var oc=function(a){function b(b){this.sources=b,a.call(this)}function c(a,b){if(!a.isDisposed){var c=wa(a.e.next).call(a.e);if(c===va)return a.o.onError(c.e);if(c.done)return null!==a.lastError?a.o.onError(a.lastError):a.o.onCompleted();var e=c.value;ta(e)&&(e=Rd(e));var f=new Db;a.subscription.setDisposable(f),f.setDisposable(e.subscribe(new d(a,b)))}}function d(a,b){this._state=a,this._recurse=b,gc.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){var b=new Eb,d={isDisposed:!1,e:this.sources[Ia](),subscription:b,lastError:null,o:a},e=Qb.scheduleRecursive(d,c);return new Gb([b,e,new w(d)])},tb(d,gc),d.prototype.next=function(a){this._state.o.onNext(a)},d.prototype.error=function(a){this._state.lastError=a,this._recurse(this._state)},d.prototype.completed=function(){this._state.o.onCompleted()},b}(kc);mc.prototype.catchError=function(){return new oc(this)};var pc=function(a){function b(a,b){this.v=a,this.c=null==b?-1:b}function c(a){this.v=a.v,this.l=a.c}return tb(b,a),b.prototype[Ia]=function(){return new c(this)},c.prototype.next=function(){return 0===this.l?Ja:(this.l>0&&this.l--,{done:!1,value:this.v})},b}(mc),qc=mc.repeat=function(a,b){return new pc(a,b)},rc=function(a){function b(a,b,c){
+this.s=a,this.fn=b?Ma(b,c,3):null}function c(a){this.i=-1,this.s=a.s,this.l=this.s.length,this.fn=a.fn}return tb(b,a),b.prototype[Ia]=function(){return new c(this)},c.prototype.next=function(){return++this.i<this.l?{done:!1,value:this.fn?this.fn(this.s[this.i],this.i,this.s):this.s[this.i]}:Ja},b}(mc),sc=mc.of=function(a,b,c){return new rc(a,b,c)},tc=function(a){function b(b){this.source=b,a.call(this)}function c(a){this.o=a,this.a=[],gc.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a))},tb(c,gc),c.prototype.next=function(a){this.a.push(a)},c.prototype.error=function(a){this.o.onError(a)},c.prototype.completed=function(){this.o.onNext(this.a),this.o.onCompleted()},b}(kc);Yb.toArray=function(){return new tc(this)},ic.create=function(a,b){return new ie(a,b)};var uc=function(a){function b(b){this._f=b,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){var b=wa(this._f)();return b===va?Mc(b.e).subscribe(a):(ta(b)&&(b=Rd(b)),b.subscribe(a))},b}(kc),vc=ic.defer=function(a){return new uc(a)},wc=function(a){function b(b){this.scheduler=b,a.call(this)}function c(a,b){this.observer=a,this.scheduler=b}function d(a,b){return b.onCompleted(),zb}return tb(b,a),b.prototype.subscribeCore=function(a){var b=new c(a,this.scheduler);return b.run()},c.prototype.run=function(){var a=this.observer;return this.scheduler===Ob?d(null,a):this.scheduler.schedule(a,d)},b}(kc),xc=new wc(Ob),yc=ic.empty=function(a){return Kb(a)||(a=Ob),a===Ob?xc:new wc(a)},zc=function(a){function b(b,c,d){this._iterable=b,this._fn=c,this._scheduler=d,a.call(this)}function c(a,b,c){return function(d,e){var f=wa(b.next).call(b);if(f===va)return a.onError(f.e);if(f.done)return a.onCompleted();var g=f.value;return ua(c)&&(g=wa(c)(g,d),g===va)?a.onError(g.e):(a.onNext(g),void e(d+1))}}return tb(b,a),b.prototype.subscribeCore=function(a){var b=Object(this._iterable),d=C(b);return this._scheduler.scheduleRecursive(0,c(a,d,this._fn))},b}(kc),Ac=Math.pow(2,53)-1;x.prototype[Ia]=function(){return new y(this._s)},y.prototype[Ia]=function(){return this},y.prototype.next=function(){return this._i<this._l?{done:!1,value:this._s.charAt(this._i++)}:Ja},z.prototype[Ia]=function(){return new A(this._a)},A.prototype[Ia]=function(){return this},A.prototype.next=function(){return this._i<this._l?{done:!1,value:this._a[this._i++]}:Ja};var Bc=ic.from=function(a,b,c,d){if(null==a)throw new Error("iterable cannot be null.");if(b&&!ua(b))throw new Error("mapFn when provided must be a function");if(b)var e=Ma(b,c,2);return Kb(d)||(d=Qb),new zc(a,e,d)},Cc=function(a){function b(b,c){this._args=b,this._scheduler=c,a.call(this)}function c(a,b){var c=b.length;return function(d,e){c>d?(a.onNext(b[d]),e(d+1)):a.onCompleted()}}return tb(b,a),b.prototype.subscribeCore=function(a){return this._scheduler.scheduleRecursive(0,c(a,this._args))},b}(kc),Dc=ic.fromArray=function(a,b){return Kb(b)||(b=Qb),new Cc(a,b)},Ec=function(a){function b(){a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){return zb},b}(kc),Fc=new Ec,Gc=ic.never=function(){return Fc};ic.of=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return new Cc(b,Qb)},ic.ofWithScheduler=function(a){for(var b=arguments.length,c=new Array(b-1),d=1;b>d;d++)c[d-1]=arguments[d];return new Cc(c,a)};var Hc=function(a){function b(b,c){this._o=b,this._keys=Object.keys(b),this._scheduler=c,a.call(this)}function c(a,b,c){return function(d,e){if(d<c.length){var f=c[d];a.onNext([f,b[f]]),e(d+1)}else a.onCompleted()}}return tb(b,a),b.prototype.subscribeCore=function(a){return this._scheduler.scheduleRecursive(0,c(a,this._o,this._keys))},b}(kc);ic.pairs=function(a,b){return b||(b=Qb),new Hc(a,b)};var Ic=function(a){function b(b,c,d){this.start=b,this.rangeCount=c,this.scheduler=d,a.call(this)}function c(a,b,c){return function(d,e){b>d?(c.onNext(a+d),e(d+1)):c.onCompleted()}}return tb(b,a),b.prototype.subscribeCore=function(a){return this.scheduler.scheduleRecursive(0,c(this.start,this.rangeCount,a))},b}(kc);ic.range=function(a,b,c){return Kb(c)||(c=Qb),new Ic(a,b,c)};var Jc=function(a){function b(b,c,d){this.value=b,this.repeatCount=null==c?-1:c,this.scheduler=d,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){var b=new G(a,this);return b.run()},b}(kc);G.prototype.run=function(){function a(a,d){return(-1===a||a>0)&&(b.onNext(c),a>0&&a--),0===a?b.onCompleted():void d(a)}var b=this.observer,c=this.parent.value;return this.parent.scheduler.scheduleRecursive(this.parent.repeatCount,a)},ic.repeat=function(a,b,c){return Kb(c)||(c=Qb),new Jc(a,b,c)};var Kc=function(a){function b(b,c){this._value=b,this._scheduler=c,a.call(this)}function c(a,b){var c=b[0],d=b[1];return d.onNext(c),d.onCompleted(),zb}return tb(b,a),b.prototype.subscribeCore=function(a){var b=[this._value,a];return this._scheduler===Ob?c(null,b):this._scheduler.schedule(b,c)},b}(kc),Lc=(ic["return"]=ic.just=function(a,b){return Kb(b)||(b=Ob),new Kc(a,b)},function(a){function b(b,c){this._error=b,this._scheduler=c,a.call(this)}function c(a,b){var c=b[0],d=b[1];return d.onError(c),zb}return tb(b,a),b.prototype.subscribeCore=function(a){var b=[this._error,a];return this._scheduler===Ob?c(null,b):this._scheduler.schedule(b,c)},b}(kc)),Mc=ic["throw"]=function(a,b){return Kb(b)||(b=Ob),new Lc(a,b)},Nc=function(a){function b(b,c){this.source=b,this._fn=c,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){var b=new Db,c=new Eb;return c.setDisposable(b),b.setDisposable(this.source.subscribe(new Oc(a,c,this._fn))),c},b}(kc),Oc=function(a){function b(b,c,d){this._o=b,this._s=c,this._fn=d,a.call(this)}return tb(b,a),b.prototype.next=function(a){this._o.onNext(a)},b.prototype.completed=function(){return this._o.onCompleted()},b.prototype.error=function(a){var b=wa(this._fn)(a);if(b===va)return this._o.onError(b.e);ta(b)&&(b=Rd(b));var c=new Db;this._s.setDisposable(c),c.setDisposable(b.subscribe(this._o))},b}(gc);Yb["catch"]=function(a){return ua(a)?new Nc(this,a):Pc([this,a])};var Pc=ic["catch"]=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{var b=arguments.length;a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}return sc(a).catchError()};Yb.combineLatest=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return Array.isArray(b[0])?b[0].unshift(this):b.unshift(this),Sc.apply(this,b)};var Qc=function(a){function b(b,c){this._params=b,this._cb=c,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){for(var b=this._params.length,c=new Array(b),d={hasValue:u(b,H),hasValueAll:!1,isDone:u(b,H),values:new Array(b)},e=0;b>e;e++){var f=this._params[e],g=new Db;c[e]=g,ta(f)&&(f=Rd(f)),g.setDisposable(f.subscribe(new Rc(a,e,this._cb,d)))}return new Gb(c)},b}(kc),Rc=function(a){function b(b,c,d,e){this._o=b,this._i=c,this._cb=d,this._state=e,a.call(this)}function c(a){return function(b,c){return c!==a}}return tb(b,a),b.prototype.next=function(a){if(this._state.values[this._i]=a,this._state.hasValue[this._i]=!0,this._state.hasValueAll||(this._state.hasValueAll=this._state.hasValue.every(oa))){var b=wa(this._cb).apply(null,this._state.values);if(b===va)return this._o.onError(b.e);this._o.onNext(b)}else this._state.isDone.filter(c(this._i)).every(oa)&&this._o.onCompleted()},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._state.isDone[this._i]=!0,this._state.isDone.every(oa)&&this._o.onCompleted()},b}(gc),Sc=ic.combineLatest=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=ua(b[a-1])?b.pop():I;return Array.isArray(b[0])&&(b=b[0]),new Qc(b,d)};Yb.concat=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return a.unshift(this),Vc.apply(null,a)};var Tc=function(a){function b(b,c){this._s=b,this._fn=c,a.call(this)}return tb(b,a),b.prototype.next=function(a){this._s.o.onNext(a)},b.prototype.error=function(a){this._s.o.onError(a)},b.prototype.completed=function(){this._s.i++,this._fn(this._s)},b}(gc),Uc=function(a){function b(b){this._sources=b,a.call(this)}function c(a,b){if(!a.disposable.isDisposed){if(a.i===a.sources.length)return a.o.onCompleted();var c=a.sources[a.i];ta(c)&&(c=Rd(c));var d=new Db;a.subscription.setDisposable(d),d.setDisposable(c.subscribe(new Tc(a,b)))}}return tb(b,a),b.prototype.subscribeCore=function(a){var b=new Eb,d=yb(na),e={o:a,i:0,subscription:b,disposable:d,sources:this._sources},f=Ob.scheduleRecursive(e,c);return new Gb([b,d,f])},b}(kc),Vc=ic.concat=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{a=new Array(arguments.length);for(var b=0,c=arguments.length;c>b;b++)a[b]=arguments[b]}return new Uc(a)};Yb.concatAll=function(){return this.merge(1)};var Wc=function(a){function b(b,c){this.source=b,this.maxConcurrent=c,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){var b=new vb;return b.add(this.source.subscribe(new Xc(a,this.maxConcurrent,b))),b},b}(kc),Xc=function(a){function b(b,c,d){this.o=b,this.max=c,this.g=d,this.done=!1,this.q=[],this.activeCount=0,a.call(this)}function c(b,c){this.parent=b,this.sad=c,a.call(this)}return tb(b,a),b.prototype.handleSubscribe=function(a){var b=new Db;this.g.add(b),ta(a)&&(a=Rd(a)),b.setDisposable(a.subscribe(new c(this,b)))},b.prototype.next=function(a){this.activeCount<this.max?(this.activeCount++,this.handleSubscribe(a)):this.q.push(a)},b.prototype.error=function(a){this.o.onError(a)},b.prototype.completed=function(){this.done=!0,0===this.activeCount&&this.o.onCompleted()},tb(c,a),c.prototype.next=function(a){this.parent.o.onNext(a)},c.prototype.error=function(a){this.parent.o.onError(a)},c.prototype.completed=function(){this.parent.g.remove(this.sad),this.parent.q.length>0?this.parent.handleSubscribe(this.parent.q.shift()):(this.parent.activeCount--,this.parent.done&&0===this.parent.activeCount&&this.parent.o.onCompleted())},b}(gc);Yb.merge=function(a){return"number"!=typeof a?Yc(this,a):new Wc(this,a)};var Yc=ic.merge=function(){var a,b,c=[],d=arguments.length;if(arguments[0])if(Kb(arguments[0]))for(a=arguments[0],b=1;d>b;b++)c.push(arguments[b]);else for(a=Ob,b=0;d>b;b++)c.push(arguments[b]);else for(a=Ob,b=1;d>b;b++)c.push(arguments[b]);return Array.isArray(c[0])&&(c=c[0]),F(a,c).mergeAll()},Zc=ma.CompositeError=function(a){this.innerErrors=a,this.message="This contains multiple errors. Check the innerErrors",Error.call(this)};Zc.prototype=Object.create(Error.prototype),Zc.prototype.name="CompositeError";var $c=function(a){function b(b){this.source=b,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){var b=new vb,c=new Db,d={isStopped:!1,errors:[],o:a};return b.add(c),c.setDisposable(this.source.subscribe(new _c(b,d))),b},b}(kc),_c=function(a){function b(b,c){this._group=b,this._state=c,a.call(this)}function c(a,b){0===b.length?a.onCompleted():1===b.length?a.onError(b[0]):a.onError(new Zc(b))}function d(b,c,d){this._inner=b,this._group=c,this._state=d,a.call(this)}return tb(b,a),b.prototype.next=function(a){var b=new Db;this._group.add(b),ta(a)&&(a=Rd(a)),b.setDisposable(a.subscribe(new d(b,this._group,this._state)))},b.prototype.error=function(a){this._state.errors.push(a),this._state.isStopped=!0,1===this._group.length&&c(this._state.o,this._state.errors)},b.prototype.completed=function(){this._state.isStopped=!0,1===this._group.length&&c(this._state.o,this._state.errors)},tb(d,a),d.prototype.next=function(a){this._state.o.onNext(a)},d.prototype.error=function(a){this._state.errors.push(a),this._group.remove(this._inner),this._state.isStopped&&1===this._group.length&&c(this._state.o,this._state.errors)},d.prototype.completed=function(){this._group.remove(this._inner),this._state.isStopped&&1===this._group.length&&c(this._state.o,this._state.errors)},b}(gc);ic.mergeDelayError=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{var b=arguments.length;a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}var d=F(null,a);return new $c(d)};var ad=function(a){function b(b){this.source=b,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){var b=new vb,c=new Db;return b.add(c),c.setDisposable(this.source.subscribe(new bd(a,b))),b},b}(kc),bd=function(a){function b(b,c){this.o=b,this.g=c,this.done=!1,a.call(this)}function c(b,c){this.parent=b,this.sad=c,a.call(this)}return tb(b,a),b.prototype.next=function(a){var b=new Db;this.g.add(b),ta(a)&&(a=Rd(a)),b.setDisposable(a.subscribe(new c(this,b)))},b.prototype.error=function(a){this.o.onError(a)},b.prototype.completed=function(){this.done=!0,1===this.g.length&&this.o.onCompleted()},tb(c,a),c.prototype.next=function(a){this.parent.o.onNext(a)},c.prototype.error=function(a){this.parent.o.onError(a)},c.prototype.completed=function(){this.parent.g.remove(this.sad),this.parent.done&&1===this.parent.g.length&&this.parent.o.onCompleted()},b}(gc);Yb.mergeAll=function(){return new ad(this)};var cd=function(a){function b(b,c){this._s=b,this._o=ta(c)?Rd(c):c,this._open=!1,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){var b=new Db;b.setDisposable(this._s.subscribe(new dd(a,this))),ta(this._o)&&(this._o=Rd(this._o));var c=new Db;return c.setDisposable(this._o.subscribe(new ed(a,this,c))),new Fb(b,c)},b}(kc),dd=function(a){function b(b,c){this._o=b,this._p=c,a.call(this)}return tb(b,a),b.prototype.next=function(a){this._p._open&&this._o.onNext(a)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.onCompleted=function(){this._p._open&&this._o.onCompleted()},b}(gc),ed=function(a){function b(b,c,d){this._o=b,this._p=c,this._r=d,a.call(this)}return tb(b,a),b.prototype.next=function(){this._p._open=!0,this._r.dispose()},b.prototype.error=function(a){this._o.onError(a)},b.prototype.onCompleted=function(){this._r.dispose()},b}(gc);Yb.skipUntil=function(a){return new cd(this,a)};var fd=function(a){function b(b){this.source=b,a.call(this)}function c(a,b){this.o=a,this.inner=b,this.stopped=!1,this.latest=0,this.hasLatest=!1,gc.call(this)}function d(a,b){this.parent=a,this.id=b,gc.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){var b=new Eb,d=this.source.subscribe(new c(a,b));return new Fb(d,b)},tb(c,gc),c.prototype.next=function(a){var b=new Db,c=++this.latest;this.hasLatest=!0,this.inner.setDisposable(b),ta(a)&&(a=Rd(a)),b.setDisposable(a.subscribe(new d(this,c)))},c.prototype.error=function(a){this.o.onError(a)},c.prototype.completed=function(){this.stopped=!0,!this.hasLatest&&this.o.onCompleted()},tb(d,gc),d.prototype.next=function(a){this.parent.latest===this.id&&this.parent.o.onNext(a)},d.prototype.error=function(a){this.parent.latest===this.id&&this.parent.o.onError(a)},d.prototype.completed=function(){this.parent.latest===this.id&&(this.parent.hasLatest=!1,this.parent.stopped&&this.parent.o.onCompleted())},b}(kc);Yb["switch"]=Yb.switchLatest=function(){return new fd(this)};var gd=function(a){function b(b,c){this.source=b,this.other=ta(c)?Rd(c):c,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){return new Fb(this.source.subscribe(a),this.other.subscribe(new hd(a)))},b}(kc),hd=function(a){function b(b){this._o=b,a.call(this)}return tb(b,a),b.prototype.next=function(){this._o.onCompleted()},b.prototype.error=function(a){this._o.onError(a)},b.prototype.onCompleted=na,b}(gc);Yb.takeUntil=function(a){return new gd(this,a)};var id=function(a){function b(b,c,d){this._s=b,this._ss=c,this._cb=d,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){for(var b=this._ss.length,c={hasValue:u(b,H),hasValueAll:!1,values:new Array(b)},d=this._ss.length,e=new Array(d+1),f=0;d>f;f++){var g=this._ss[f],h=new Db;ta(g)&&(g=Rd(g)),h.setDisposable(g.subscribe(new jd(a,f,c))),e[f]=h}var i=new Db;return i.setDisposable(this._s.subscribe(new kd(a,this._cb,c))),e[d]=i,new Gb(e)},b}(kc),jd=function(a){function b(b,c,d){this._o=b,this._i=c,this._state=d,a.call(this)}return tb(b,a),b.prototype.next=function(a){this._state.values[this._i]=a,this._state.hasValue[this._i]=!0,this._state.hasValueAll=this._state.hasValue.every(oa)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=na,b}(gc),kd=function(a){function b(b,c,d){this._o=b,this._cb=c,this._state=d,a.call(this)}return tb(b,a),b.prototype.next=function(a){var b=[a].concat(this._state.values);if(this._state.hasValueAll){var c=wa(this._cb).apply(null,b);return c===va?this._o.onError(c.e):void this._o.onNext(c)}},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onCompleted()},b}(gc);Yb.withLatestFrom=function(){if(0===arguments.length)throw new Error("invalid arguments");for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=ua(b[a-1])?b.pop():I;return Array.isArray(b[0])&&(b=b[0]),new id(this,b,d)};var ld=function(a){function b(b,c){this._s=b,this._cb=c,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){for(var b=this._s.length,c=new Array(b),d=u(b,H),e=u(b,J),f=0;b>f;f++){var g=this._s[f],h=new Db;c[f]=h,ta(g)&&(g=Rd(g)),h.setDisposable(g.subscribe(new md(a,f,this,e,d)))}return new Gb(c)},b}(kc),md=function(a){function b(b,c,d,e,f){this._o=b,this._i=c,this._p=d,this._q=e,this._d=f,a.call(this)}function c(a){return a.length>0}function d(a){return a.shift()}function e(a){return function(b,c){return c!==a}}return tb(b,a),b.prototype.next=function(a){if(this._q[this._i].push(a),this._q.every(c)){var b=this._q.map(d),f=wa(this._p._cb).apply(null,b);if(f===va)return this._o.onError(f.e);this._o.onNext(f)}else this._d.filter(e(this._i)).every(oa)&&this._o.onCompleted()},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._d[this._i]=!0,this._d.every(oa)&&this._o.onCompleted()},b}(gc);Yb.zip=function(){if(0===arguments.length)throw new Error("invalid arguments");for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=ua(b[a-1])?b.pop():I;Array.isArray(b[0])&&(b=b[0]);var e=this;return b.unshift(e),new ld(b,d)},ic.zip=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];Array.isArray(b[0])&&(b=ua(b[1])?b[0].concat(b[1]):b[0]);var d=b.shift();return d.zip.apply(d,b)};var nd=function(a){function b(b,c){this.sources=b,this._cb=c,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){for(var b=this.sources,c=b.length,d=new Array(c),e={q:u(c,J),done:u(c,H),cb:this._cb,o:a},f=0;c>f;f++)!function(a){var c=b[a],f=new Db;(La(c)||Ka(c))&&(c=Bc(c)),d[a]=f,f.setDisposable(c.subscribe(new od(e,a)))}(f);return new Gb(d)},b}(kc),od=function(a){function b(b,c){this._s=b,this._i=c,a.call(this)}function c(a){return a.length>0}function d(a){return a.shift()}function e(a){return function(b,c){return c!==a}}return tb(b,a),b.prototype.next=function(a){if(this._s.q[this._i].push(a),this._s.q.every(c)){var b=this._s.q.map(d),f=wa(this._s.cb).apply(null,b);if(f===va)return this._s.o.onError(f.e);this._s.o.onNext(f)}else this._s.done.filter(e(this._i)).every(oa)&&this._s.o.onCompleted()},b.prototype.error=function(a){this._s.o.onError(a)},b.prototype.completed=function(){this._s.done[this._i]=!0,this._s.done.every(oa)&&this._s.o.onCompleted()},b}(gc);Yb.zipIterable=function(){if(0===arguments.length)throw new Error("invalid arguments");for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=ua(b[a-1])?b.pop():I,e=this;return b.unshift(e),new nd(b,d)},Yb.asObservable=function(){return new ie(K(this),this)};var pd=function(a){function b(b){this.source=b,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new qd(a))},b}(kc),qd=function(a){function b(b){this._o=b,a.call(this)}return tb(b,a),b.prototype.next=function(a){a.accept(this._o)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onCompleted()},b}(gc);Yb.dematerialize=function(){return new pd(this)};var rd=function(a){function b(b,c,d){this.source=b,this.keyFn=c,this.comparer=d,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new sd(a,this.keyFn,this.comparer))},b}(kc),sd=function(a){function b(b,c,d){this.o=b,this.keyFn=c,this.comparer=d,this.hasCurrentKey=!1,this.currentKey=null,a.call(this)}return tb(b,a),b.prototype.next=function(a){var b,c=a;return ua(this.keyFn)&&(c=wa(this.keyFn)(a),c===va)?this.o.onError(c.e):this.hasCurrentKey&&(b=wa(this.comparer)(this.currentKey,c),b===va)?this.o.onError(b.e):void(this.hasCurrentKey&&b||(this.hasCurrentKey=!0,this.currentKey=c,this.o.onNext(a)))},b.prototype.error=function(a){this.o.onError(a)},b.prototype.completed=function(){this.o.onCompleted()},b}(gc);Yb.distinctUntilChanged=function(a,b){return b||(b=qa),new rd(this,a,b)};var td=function(a){function b(b,c,d,e){this.source=b,this._oN=c,this._oE=d,this._oC=e,a.call(this)}function c(a,b){this.o=a,this.t=!b._oN||ua(b._oN)?fc(b._oN||na,b._oE||na,b._oC||na):b._oN,this.isStopped=!1,gc.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this))},tb(c,gc),c.prototype.next=function(a){var b=wa(this.t.onNext).call(this.t,a);b===va&&this.o.onError(b.e),this.o.onNext(a)},c.prototype.error=function(a){var b=wa(this.t.onError).call(this.t,a);return b===va?this.o.onError(b.e):void this.o.onError(a)},c.prototype.completed=function(){var a=wa(this.t.onCompleted).call(this.t);return a===va?this.o.onError(a.e):void this.o.onCompleted()},b}(kc);Yb["do"]=Yb.tap=Yb.doAction=function(a,b,c){return new td(this,a,b,c)},Yb.doOnNext=Yb.tapOnNext=function(a,b){return this.tap("undefined"!=typeof b?function(c){a.call(b,c)}:a)},Yb.doOnError=Yb.tapOnError=function(a,b){return this.tap(na,"undefined"!=typeof b?function(c){a.call(b,c)}:a)},Yb.doOnCompleted=Yb.tapOnCompleted=function(a,b){return this.tap(na,null,"undefined"!=typeof b?function(){a.call(b)}:a)};var ud=function(a){function b(b,c,d){this.source=b,this._fn=Ma(c,d,0),a.call(this)}function c(a,b){this.isDisposed=!1,this._s=a,this._fn=b}return tb(b,a),b.prototype.subscribeCore=function(a){var b=wa(this.source.subscribe).call(this.source,a);return b===va&&(this._fn(),e(b.e)),new c(b,this._fn)},c.prototype.dispose=function(){if(!this.isDisposed){var a=wa(this._s.dispose).call(this._s);this._fn(),a===va&&e(a.e)}},b}(kc);Yb["finally"]=function(a,b){return new ud(this,a,b)};var vd=function(a){function b(b){this.source=b,a.call(this)}function c(a){this.o=a,this.isStopped=!1}return tb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a))},c.prototype.onNext=na,c.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},c.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.o.onCompleted())},c.prototype.dispose=function(){this.isStopped=!0},c.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},b}(kc);Yb.ignoreElements=function(){return new vd(this)};var wd=function(a){function b(b,c){this.source=b,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new xd(a))},b}(kc),xd=function(a){function b(b){this._o=b,a.call(this)}return tb(b,a),b.prototype.next=function(a){this._o.onNext(bc(a))},b.prototype.error=function(a){this._o.onNext(cc(a)),this._o.onCompleted()},b.prototype.completed=function(){this._o.onNext(dc()),this._o.onCompleted()},b}(gc);Yb.materialize=function(){return new wd(this)},Yb.repeat=function(a){return qc(this,a).concat()},Yb.retry=function(a){return qc(this,a).catchError()};var yd=function(a){function b(a){return{isDisposed:!1,dispose:function(){this.isDisposed||(this.isDisposed=!0,a.isDisposed=!0)}}}function c(b,c){this.source=b,this._notifier=c,a.call(this)}return tb(c,a),c.prototype.subscribeCore=function(a){var c,d=new le,e=new le,f=this._notifier(d),g=f.subscribe(e),h=this.source["@@iterator"](),i={isDisposed:!1},j=new Eb,k=Qb.scheduleRecursive(null,function(b,f){if(!i.isDisposed){var g=h.next();if(g.done)return void(c?a.onError(c):a.onCompleted());var k=g.value;ta(k)&&(k=Rd(k));var l=new Db,m=new Db;j.setDisposable(new Fb(m,l)),l.setDisposable(k.subscribe(function(b){a.onNext(b)},function(b){m.setDisposable(e.subscribe(f,function(b){a.onError(b)},function(){a.onCompleted()})),d.onNext(b),l.dispose()},function(){a.onCompleted()}))}});return new Gb([g,j,k,b(i)])},c}(kc);Yb.retryWhen=function(a){return new yd(L(this),a)};var zd=function(a){function b(a){return{isDisposed:!1,dispose:function(){this.isDisposed||(this.isDisposed=!0,a.isDisposed=!0)}}}function c(b,c){this.source=b,this._notifier=c,a.call(this)}return tb(c,a),c.prototype.subscribeCore=function(a){var c,d=new le,e=new le,f=this._notifier(d),g=f.subscribe(e),h=this.source["@@iterator"](),i={isDisposed:!1},j=new Eb,k=Qb.scheduleRecursive(null,function(b,f){if(!i.isDisposed){var g=h.next();if(g.done)return void(c?a.onError(c):a.onCompleted());var k=g.value;ta(k)&&(k=Rd(k));var l=new Db,m=new Db;j.setDisposable(new Fb(m,l)),l.setDisposable(k.subscribe(function(b){a.onNext(b)},function(b){a.onError(b)},function(){m.setDisposable(e.subscribe(f,function(b){a.onError(b)},function(){a.onCompleted()})),d.onNext(null),l.dispose()}))}});return new Gb([g,j,k,b(i)])},c}(kc);Yb.repeatWhen=function(a){return new zd(L(this),a)};var Ad=function(a){function b(b,c,d,e){this.source=b,this.accumulator=c,this.hasSeed=d,this.seed=e,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Bd(a,this))},b}(kc),Bd=function(a){function b(b,c){this._o=b,this._p=c,this._fn=c.accumulator,this._hs=c.hasSeed,this._s=c.seed,this._ha=!1,this._a=null,this._hv=!1,this._i=0,a.call(this)}return tb(b,a),b.prototype.next=function(a){return!this._hv&&(this._hv=!0),this._ha?this._a=wa(this._fn)(this._a,a,this._i,this._p):(this._a=this._hs?wa(this._fn)(this._s,a,this._i,this._p):a,this._ha=!0),this._a===va?this._o.onError(this._a.e):(this._o.onNext(this._a),void this._i++)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){!this._hv&&this._hs&&this._o.onNext(this._s),this._o.onCompleted()},b}(gc);Yb.scan=function(){var a,b=!1,c=arguments[0];return 2===arguments.length&&(b=!0,a=arguments[1]),new Ad(this,c,b,a)};var Cd=function(a){function b(b,c){this.source=b,this._c=c,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Dd(a,this._c))},b}(kc),Dd=function(a){function b(b,c){this._o=b,this._c=c,this._q=[],a.call(this)}return tb(b,a),b.prototype.next=function(a){this._q.push(a),this._q.length>this._c&&this._o.onNext(this._q.shift())},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onCompleted()},b}(gc);Yb.skipLast=function(a){if(0>a)throw new Ea;return new Cd(this,a)},Yb.startWith=function(){var a,b=0;arguments.length&&Kb(arguments[0])?(a=arguments[0],b=1):a=Ob;for(var c=[],d=b,e=arguments.length;e>d;d++)c.push(arguments[d]);return sc([Dc(c,a),this]).concat()};var Ed=function(a){function b(b,c){this._o=b,this._c=c,this._q=[],a.call(this)}return tb(b,a),b.prototype.next=function(a){this._q.push(a),this._q.length>this._c&&this._q.shift()},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){for(;this._q.length>0;)this._o.onNext(this._q.shift());this._o.onCompleted()},b}(gc);Yb.takeLast=function(a){if(0>a)throw new Ea;var b=this;return new ie(function(c){return b.subscribe(new Ed(c,a))},b)},Yb.flatMapConcat=Yb.concatMap=function(a,b,c){return new lc(this,a,b,c).merge(1)};var Fd=function(a){function b(b,c,d){this.source=b,this.selector=Ma(c,d,3),a.call(this)}function c(a,b){return function(c,d,e){return a.call(this,b.selector(c,d,e),d,e)}}function d(a,b,c){this.o=a,this.selector=b,this.source=c,this.i=0,gc.call(this)}return tb(b,a),b.prototype.internalMap=function(a,d){return new b(this.source,c(a,this),d)},b.prototype.subscribeCore=function(a){return this.source.subscribe(new d(a,this.selector,this))},tb(d,gc),d.prototype.next=function(a){var b=wa(this.selector)(a,this.i++,this.source);return b===va?this.o.onError(b.e):void this.o.onNext(b)},d.prototype.error=function(a){this.o.onError(a)},d.prototype.completed=function(){this.o.onCompleted()},b}(kc);Yb.map=Yb.select=function(a,b){var c="function"==typeof a?a:function(){return a};return this instanceof Fd?this.internalMap(c,b):new Fd(this,c,b)},Yb.pluck=function(){var a=arguments.length,b=new Array(a);if(0===a)throw new Error("List of properties cannot be empty.");for(var c=0;a>c;c++)b[c]=arguments[c];return this.map(M(b,a))},Yb.flatMap=Yb.selectMany=function(a,b,c){return new lc(this,a,b,c).mergeAll()},ma.Observable.prototype.flatMapLatest=function(a,b,c){return new lc(this,a,b,c).switchLatest()};var Gd=function(a){function b(b,c){this.source=b,this._count=c,a.call(this)}function c(a,b){this._o=a,this._r=b,gc.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this._count))},tb(c,gc),c.prototype.next=function(a){this._r<=0?this._o.onNext(a):this._r--},c.prototype.error=function(a){this._o.onError(a)},c.prototype.completed=function(){this._o.onCompleted()},b}(kc);Yb.skip=function(a){if(0>a)throw new Ea;return new Gd(this,a)};var Hd=function(a){function b(b,c){this.source=b,this._fn=c,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Id(a,this))},b}(kc),Id=function(a){function b(b,c){this._o=b,this._p=c,this._i=0,this._r=!1,a.call(this)}return tb(b,a),b.prototype.next=function(a){if(!this._r){var b=wa(this._p._fn)(a,this._i++,this._p);if(b===va)return this._o.onError(b.e);this._r=!b}this._r&&this._o.onNext(a)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onCompleted()},b}(gc);Yb.skipWhile=function(a,b){var c=Ma(a,b,3);return new Hd(this,c)};var Jd=function(a){function b(b,c){this.source=b,this._count=c,a.call(this)}function c(a,b){this._o=a,this._c=b,this._r=b,gc.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this._count))},tb(c,gc),c.prototype.next=function(a){this._r-->0&&(this._o.onNext(a),this._r<=0&&this._o.onCompleted())},c.prototype.error=function(a){this._o.onError(a)},c.prototype.completed=function(){this._o.onCompleted()},b}(kc);Yb.take=function(a,b){if(0>a)throw new Ea;return 0===a?yc(b):new Jd(this,a)};var Kd=function(a){function b(b,c){this.source=b,this._fn=c,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Ld(a,this))},b}(kc),Ld=function(a){function b(b,c){this._o=b,this._p=c,this._i=0,this._r=!0,a.call(this)}return tb(b,a),b.prototype.next=function(a){return this._r&&(this._r=wa(this._p._fn)(a,this._i++,this._p),this._r===va)?this._o.onError(this._r.e):void(this._r?this._o.onNext(a):this._o.onCompleted())},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onCompleted()},b}(gc);Yb.takeWhile=function(a,b){var c=Ma(a,b,3);return new Kd(this,c)};var Md=function(a){function b(b,c,d){this.source=b,this.predicate=Ma(c,d,3),a.call(this)}function c(a,b){return function(c,d,e){return b.predicate(c,d,e)&&a.call(this,c,d,e)}}function d(a,b,c){this.o=a,this.predicate=b,this.source=c,this.i=0,gc.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new d(a,this.predicate,this))},b.prototype.internalFilter=function(a,d){return new b(this.source,c(a,this),d)},tb(d,gc),d.prototype.next=function(a){var b=wa(this.predicate)(a,this.i++,this.source);return b===va?this.o.onError(b.e):void(b&&this.o.onNext(a))},d.prototype.error=function(a){this.o.onError(a)},d.prototype.completed=function(){this.o.onCompleted()},b}(kc);Yb.filter=Yb.where=function(a,b){return this instanceof Md?this.internalFilter(a,b):new Md(this,a,b)},ic.fromCallback=function(a,b,c){return function(){"undefined"==typeof b&&(b=this);for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];return N(a,b,c,e)}},ic.fromNodeCallback=function(a,b,c){return function(){
+"undefined"==typeof b&&(b=this);for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];return P(a,b,c,e)}},S.prototype.dispose=function(){this.isDisposed||(this._e.removeEventListener(this._n,this._fn,!1),this.isDisposed=!0)},ma.config.useNativeEvents=!1;var Nd=function(a){function b(b,c,d){this._el=b,this._n=c,this._fn=d,a.call(this)}function c(a,b){return function(){var c=arguments[0];return ua(b)&&(c=wa(b).apply(null,arguments),c===va)?a.onError(c.e):void a.onNext(c)}}return tb(b,a),b.prototype.subscribeCore=function(a){return T(this._el,this._n,c(a,this._fn))},b}(kc);ic.fromEvent=function(a,b,c){return a.addListener?Pd(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},c):ma.config.useNativeEvents||"function"!=typeof a.on||"function"!=typeof a.off?new Nd(a,b,c).publish().refCount():Pd(function(c){a.on(b,c)},function(c){a.off(b,c)},c)};var Od=function(a){function b(b,c,d){this._add=b,this._del=c,this._fn=d,a.call(this)}function c(a,b){return function(){var c=arguments[0];return ua(b)&&(c=wa(b).apply(null,arguments),c===va)?a.onError(c.e):void a.onNext(c)}}function d(a,b,c){this._del=a,this._fn=b,this._ret=c,this.isDisposed=!1}return tb(b,a),b.prototype.subscribeCore=function(a){var b=c(a,this._fn),e=this._add(b);return new d(this._del,b,e)},d.prototype.dispose=function(){this.isDisposed||(ua(this._del)&&this._del(this._fn,this._ret),this.isDisposed=!0)},b}(kc),Pd=ic.fromEventPattern=function(a,b,c){return new Od(a,b,c).publish().refCount()},Qd=function(a){function b(b,c){this._p=b,this._s=c,a.call(this)}function c(a,b){var c=b[0],d=b[1];c.onNext(d),c.onCompleted()}function d(a,b){var c=b[0],d=b[1];c.onError(d)}return tb(b,a),b.prototype.subscribeCore=function(a){var b=new Db,e=this;return this._p.then(function(d){b.setDisposable(e._s.schedule([a,d],c))},function(c){b.setDisposable(e._s.schedule([a,c],d))}),b},b}(kc),Rd=ic.fromPromise=function(a,b){return b||(b=Vb),new Qd(a,b)};Yb.toPromise=function(a){if(a||(a=ma.config.Promise),!a)throw new Fa("Promise type not provided nor in Rx.config.Promise");var b=this;return new a(function(a,c){var d;b.subscribe(function(a){d=a},c,function(){a(d)})})},ic.startAsync=function(a){var b=wa(a)();return b===va?Mc(b.e):Rd(b)};var Sd=function(a){function b(b,c,d){this.source=b,this._fn1=c,this._fn2=d,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){var b=this.source.multicast(this._fn1());return new Fb(this._fn2(b).subscribe(a),b.connect())},b}(kc);Yb.multicast=function(a,b){return ua(a)?new Sd(this,a,b):new Ud(this,a)},Yb.publish=function(a){return a&&ua(a)?this.multicast(function(){return new le},a):this.multicast(new le)},Yb.share=function(){return this.publish().refCount()},Yb.publishLast=function(a){return a&&ua(a)?this.multicast(function(){return new me},a):this.multicast(new me)},Yb.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new oe(b)},a):this.multicast(new oe(a))},Yb.shareValue=function(a){return this.publishValue(a).refCount()},Yb.replay=function(a,b,c,d){return a&&ua(a)?this.multicast(function(){return new pe(b,c,d)},a):this.multicast(new pe(b,c,d))},Yb.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};var Td=function(a){function b(b){this.source=b,this._count=0,this._connectableSubscription=null,a.call(this)}function c(a,b){this._p=a,this._s=b,this.isDisposed=!1}return tb(b,a),b.prototype.subscribeCore=function(a){var b=this.source.subscribe(a);return 1===++this._count&&(this._connectableSubscription=this.source.connect()),new c(this,b)},c.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._s.dispose(),0===--this._p._count&&this._p._connectableSubscription.dispose())},b}(kc),Ud=ma.ConnectableObservable=function(a){function b(b,c){this.source=b,this._connection=null,this._source=b.asObservable(),this._subject=c,a.call(this)}function c(a,b){this._p=a,this._s=b}return tb(b,a),c.prototype.dispose=function(){this._s&&(this._s.dispose(),this._s=null,this._p._connection=null)},b.prototype.connect=function(){if(!this._connection){var a=this._source.subscribe(this._subject);this._connection=new c(this,a)}return this._connection},b.prototype._subscribe=function(a){return this._subject.subscribe(a)},b.prototype.refCount=function(){return new Td(this)},b}(ic),Vd=function(a){function b(b,c){this._dt=b,this._s=c,a.call(this)}function c(a,b){b.onNext(0),b.onCompleted()}return tb(b,a),b.prototype.subscribeCore=function(a){return this._s.scheduleFuture(a,this._dt,c)},b}(kc),Wd=ic.interval=function(a,b){return W(a,a,Kb(b)?b:Vb)};ic.timer=function(b,c,d){var e;return Kb(d)||(d=Vb),null!=c&&"number"==typeof c?e=c:Kb(c)&&(d=c),(b instanceof Date||"number"==typeof b)&&e===a?U(b,d):b instanceof Date&&e!==a?V(b,c,d):W(b,e,d)};Yb.delay=function(){var a=arguments[0];if("number"==typeof a||a instanceof Date){var b=a,c=arguments[1];return Kb(c)||(c=Vb),b instanceof Date?Y(this,b,c):X(this,b,c)}if(ic.isObservable(a)||ua(a))return Z(this,a,arguments[1]);throw new Error("Invalid arguments")};var Xd=function(a){function b(b,c,d){Kb(d)||(d=Vb),this.source=b,this._dt=c,this._s=d,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){var b=new Eb;return new Fb(this.source.subscribe(new Yd(a,this._dt,this._s,b)),b)},b}(kc),Yd=function(a){function b(b,c,d,e){this._o=b,this._d=c,this._scheduler=d,this._c=e,this._v=null,this._hv=!1,this._id=0,a.call(this)}return tb(b,a),b.prototype.next=function(a){this._hv=!0,this._v=a;var b=++this._id,c=new Db;this._c.setDisposable(c),c.setDisposable(this._scheduler.scheduleFuture(this,this._d,function(c,d){d._hv&&d._id===b&&d._o.onNext(a),d._hv=!1}))},b.prototype.error=function(a){this._c.dispose(),this._o.onError(a),this._hv=!1,this._id++},b.prototype.completed=function(){this._c.dispose(),this._hv&&this._o.onNext(this._v),this._o.onCompleted(),this._hv=!1,this._id++},b}(gc);Yb.debounce=function(){if(ua(arguments[0]))return $(this,arguments[0]);if("number"==typeof arguments[0])return new Xd(this,arguments[0],arguments[1]);throw new Error("Invalid arguments")};var Zd=function(a){function b(b,c){this.source=b,this._s=c,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new $d(a,this._s))},b}(kc),$d=function(a){function b(b,c){this._o=b,this._s=c,a.call(this)}return tb(b,a),b.prototype.next=function(a){this._o.onNext({value:a,timestamp:this._s.now()})},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onCompleted()},b}(gc);Yb.timestamp=function(a){return Kb(a)||(a=Vb),new Zd(this,a)};var _d=function(a){function b(b,c){this.source=b,this._sampler=c,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){var b={o:a,atEnd:!1,value:null,hasValue:!1,sourceSubscription:new Db};return b.sourceSubscription.setDisposable(this.source.subscribe(new be(b))),new Fb(b.sourceSubscription,this._sampler.subscribe(new ae(b)))},b}(kc),ae=function(a){function b(b){this._s=b,a.call(this)}return tb(b,a),b.prototype._handleMessage=function(){this._s.hasValue&&(this._s.hasValue=!1,this._s.o.onNext(this._s.value)),this._s.atEnd&&this._s.o.onCompleted()},b.prototype.next=function(){this._handleMessage()},b.prototype.error=function(a){this._s.onError(a)},b.prototype.completed=function(){this._handleMessage()},b}(gc),be=function(a){function b(b){this._s=b,a.call(this)}return tb(b,a),b.prototype.next=function(a){this._s.hasValue=!0,this._s.value=a},b.prototype.error=function(a){this._s.o.onError(a)},b.prototype.completed=function(){this._s.atEnd=!0,this._s.sourceSubscription.dispose()},b}(gc);Yb.sample=function(a,b){return Kb(b)||(b=Vb),"number"==typeof a?new _d(this,Wd(a,b)):new _d(this,a)};var ce=ma.TimeoutError=function(a){this.message=a||"Timeout has occurred",this.name="TimeoutError",Error.call(this)};ce.prototype=Object.create(Error.prototype),Yb.timeout=function(){var a=arguments[0];if(a instanceof Date||"number"==typeof a)return aa(this,a,arguments[1],arguments[2]);if(ic.isObservable(a)||ua(a))return _(this,a,arguments[1],arguments[2]);throw new Error("Invalid arguments")},Yb.throttle=function(a,b){Kb(b)||(b=Vb);var c=+a||0;if(0>=c)throw new RangeError("windowDuration cannot be less or equal zero.");var d=this;return new ie(function(a){var e=0;return d.subscribe(function(d){var f=b.now();(0===e||f-e>=c)&&(e=f,a.onNext(d))},function(b){a.onError(b)},function(){a.onCompleted()})},d)};var de=function(a){function b(b,c){this.source=b,this.controller=new le,c&&c.subscribe?this.pauser=this.controller.merge(c):this.pauser=this.controller,a.call(this)}return tb(b,a),b.prototype._subscribe=function(a){var b=this.source.publish(),c=b.subscribe(a),d=zb,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=zb)});return new Gb([c,d,e])},b.prototype.pause=function(){this.controller.onNext(!1)},b.prototype.resume=function(){this.controller.onNext(!0)},b}(ic);Yb.pausable=function(a){return new de(this,a)};var ee=function(b){function c(a,c){this.source=a,this.controller=new le,c&&c.subscribe?this.pauser=this.controller.merge(c):this.pauser=this.controller,b.call(this)}return tb(c,b),c.prototype._subscribe=function(b){function c(){for(;e.length>0;)b.onNext(e.shift())}var d,e=[],f=ba(this.source,this.pauser.startWith(!1).distinctUntilChanged(),function(a,b){return{data:a,shouldFire:b}}).subscribe(function(f){d!==a&&f.shouldFire!==d?(d=f.shouldFire,f.shouldFire&&c()):(d=f.shouldFire,f.shouldFire?b.onNext(f.data):e.push(f.data))},function(a){c(),b.onError(a)},function(){c(),b.onCompleted()});return f},c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(ic);Yb.pausableBuffered=function(a){return new ee(this,a)};var fe=function(a){function b(b,c,d){a.call(this),this.subject=new ge(c,d),this.source=b.multicast(this.subject).refCount()}return tb(b,a),b.prototype._subscribe=function(a){return this.source.subscribe(a)},b.prototype.request=function(a){return this.subject.request(null==a?-1:a)},b}(ic),ge=function(a){function b(b,c){null==b&&(b=!0),a.call(this),this.subject=new le,this.enableQueue=b,this.queue=b?[]:null,this.requestedCount=0,this.requestedDisposable=null,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.scheduler=c||Qb}return tb(b,a),ub(b.prototype,ec,{_subscribe:function(a){return this.subject.subscribe(a)},onCompleted:function(){this.hasCompleted=!0,this.enableQueue&&0!==this.queue.length?this.queue.push(Zb.createOnCompleted()):(this.subject.onCompleted(),this.disposeCurrentRequest())},onError:function(a){this.hasFailed=!0,this.error=a,this.enableQueue&&0!==this.queue.length?this.queue.push(Zb.createOnError(a)):(this.subject.onError(a),this.disposeCurrentRequest())},onNext:function(a){this.requestedCount<=0?this.enableQueue&&this.queue.push(Zb.createOnNext(a)):(0===this.requestedCount--&&this.disposeCurrentRequest(),this.subject.onNext(a))},_processRequest:function(a){if(this.enableQueue)for(;this.queue.length>0&&(a>0||"N"!==this.queue[0].kind);){var b=this.queue.shift();b.accept(this.subject),"N"===b.kind?a--:(this.disposeCurrentRequest(),this.queue=[])}return a},request:function(a){this.disposeCurrentRequest();var b=this;return this.requestedDisposable=this.scheduler.schedule(a,function(a,c){var d=b._processRequest(c),e=b.hasCompleted||b.hasFailed;return!e&&d>0?(b.requestedCount=d,yb(function(){b.requestedCount=0})):void 0}),this.requestedDisposable},disposeCurrentRequest:function(){this.requestedDisposable&&(this.requestedDisposable.dispose(),this.requestedDisposable=null)}}),b}(ic);Yb.controlled=function(a,b){return a&&Kb(a)&&(b=a,a=!0),null==a&&(a=!0),new fe(this,a,b)},Yb.pipe=function(a){function b(){c.resume()}var c=this.pausableBuffered();return a.addListener("drain",b),c.subscribe(function(b){!a.write(String(b))&&c.pause()},function(b){a.emit("error",b)},function(){!a._isStdio&&a.end(),a.removeListener("drain",b)}),c.resume(),a};var he=function(a){function b(b,c){this._o=b,this._xform=c,a.call(this)}return tb(b,a),b.prototype.next=function(a){var b=wa(this._xform["@@transducer/step"]).call(this._xform,this._o,a);b===va&&this._o.onError(b.e)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._xform["@@transducer/result"](this._o)},b}(gc);Yb.transduce=function(a){var b=this;return new ie(function(c){var d=a(ca(c));return b.subscribe(new he(c,d))},b)};var ie=ma.AnonymousObservable=function(a){function b(a){return a&&ua(a.dispose)?a:ua(a)?yb(a):zb}function c(a,c){var d=c[0],f=c[1],g=wa(f.__subscribe).call(f,d);g!==va||d.fail(va.e)||e(va.e),d.setDisposable(b(g))}function d(b,c){this.source=c,this.__subscribe=b,a.call(this)}return tb(d,a),d.prototype._subscribe=function(a){var b=new je(a),d=[b,this];return Qb.scheduleRequired()?Qb.schedule(d,c):c(null,d),b},d}(ic),je=function(a){function b(b){a.call(this),this.observer=b,this.m=new Db}tb(b,a);var c=b.prototype;return c.next=function(a){var b=wa(this.observer.onNext).call(this.observer,a);b===va&&(this.dispose(),e(b.e))},c.error=function(a){var b=wa(this.observer.onError).call(this.observer,a);this.dispose(),b===va&&e(b.e)},c.completed=function(){var a=wa(this.observer.onCompleted).call(this.observer);this.dispose(),a===va&&e(a.e)},c.setDisposable=function(a){this.m.setDisposable(a)},c.getDisposable=function(){return this.m.getDisposable()},c.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(gc),ke=function(a,b){this._s=a,this._o=b};ke.prototype.dispose=function(){if(!this._s.isDisposed&&null!==this._o){var a=this._s.observers.indexOf(this._o);this._s.observers.splice(a,1),this._o=null}};var le=ma.Subject=function(a){function b(){a.call(this),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return tb(b,a),ub(b.prototype,ec.prototype,{_subscribe:function(a){return Bb(this),this.isStopped?this.hasError?(a.onError(this.error),zb):(a.onCompleted(),zb):(this.observers.push(a),new ke(this,a))},hasObservers:function(){return Bb(this),this.observers.length>0},onCompleted:function(){if(Bb(this),!this.isStopped){this.isStopped=!0;for(var a=0,b=c(this.observers),d=b.length;d>a;a++)b[a].onCompleted();this.observers.length=0}},onError:function(a){if(Bb(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;for(var b=0,d=c(this.observers),e=d.length;e>b;b++)d[b].onError(a);this.observers.length=0}},onNext:function(a){if(Bb(this),!this.isStopped)for(var b=0,d=c(this.observers),e=d.length;e>b;b++)d[b].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),b.create=function(a,b){return new ne(a,b)},b}(ic),me=ma.AsyncSubject=function(a){function b(){a.call(this),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return tb(b,a),ub(b.prototype,ec.prototype,{_subscribe:function(a){return Bb(this),this.isStopped?(this.hasError?a.onError(this.error):this.hasValue?(a.onNext(this.value),a.onCompleted()):a.onCompleted(),zb):(this.observers.push(a),new ke(this,a))},hasObservers:function(){return Bb(this),this.observers.length>0},onCompleted:function(){var a,b;if(Bb(this),!this.isStopped){this.isStopped=!0;var d=c(this.observers),b=d.length;if(this.hasValue)for(a=0;b>a;a++){var e=d[a];e.onNext(this.value),e.onCompleted()}else for(a=0;b>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(Bb(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var b=0,d=c(this.observers),e=d.length;e>b;b++)d[b].onError(a);this.observers.length=0}},onNext:function(a){Bb(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.error=null,this.value=null}}),b}(ic),ne=ma.AnonymousSubject=function(a){function b(b,c){this.observer=b,this.observable=c,a.call(this)}return tb(b,a),ub(b.prototype,ec.prototype,{_subscribe:function(a){return this.observable.subscribe(a)},onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),b}(ic),oe=ma.BehaviorSubject=function(a){function b(b){a.call(this),this.value=b,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.hasError=!1}return tb(b,a),ub(b.prototype,ec.prototype,{_subscribe:function(a){return Bb(this),this.isStopped?(this.hasError?a.onError(this.error):a.onCompleted(),zb):(this.observers.push(a),a.onNext(this.value),new ke(this,a))},getValue:function(){return Bb(this),this.hasError&&e(this.error),this.value},hasObservers:function(){return Bb(this),this.observers.length>0},onCompleted:function(){if(Bb(this),!this.isStopped){this.isStopped=!0;for(var a=0,b=c(this.observers),d=b.length;d>a;a++)b[a].onCompleted();this.observers.length=0}},onError:function(a){if(Bb(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var b=0,d=c(this.observers),e=d.length;e>b;b++)d[b].onError(a);this.observers.length=0}},onNext:function(a){if(Bb(this),!this.isStopped){this.value=a;for(var b=0,d=c(this.observers),e=d.length;e>b;b++)d[b].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.error=null}}),b}(ic),pe=ma.ReplaySubject=function(a){function b(a,b){return yb(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function d(b,c,d){this.bufferSize=null==b?e:b,this.windowSize=null==c?e:c,this.scheduler=d||Qb,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this)}var e=Math.pow(2,53)-1;return tb(d,a),ub(d.prototype,ec.prototype,{_subscribe:function(a){Bb(this);var c=new jc(this.scheduler,a),d=b(this,c);this._trim(this.scheduler.now()),this.observers.push(c);for(var e=0,f=this.q.length;f>e;e++)c.onNext(this.q[e].value);return this.hasError?c.onError(this.error):this.isStopped&&c.onCompleted(),c.ensureActive(),d},hasObservers:function(){return Bb(this),this.observers.length>0},_trim:function(a){for(;this.q.length>this.bufferSize;)this.q.shift();for(;this.q.length>0&&a-this.q[0].interval>this.windowSize;)this.q.shift()},onNext:function(a){if(Bb(this),!this.isStopped){var b=this.scheduler.now();this.q.push({interval:b,value:a}),this._trim(b);for(var d=0,e=c(this.observers),f=e.length;f>d;d++){var g=e[d];g.onNext(a),g.ensureActive()}}},onError:function(a){if(Bb(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var b=this.scheduler.now();this._trim(b);for(var d=0,e=c(this.observers),f=e.length;f>d;d++){var g=e[d];g.onError(a),g.ensureActive()}this.observers.length=0}},onCompleted:function(){if(Bb(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var b=0,d=c(this.observers),e=d.length;e>b;b++){var f=d[b];f.onCompleted(),f.ensureActive()}this.observers.length=0}},dispose:function(){this.isDisposed=!0,this.observers=null}}),d}(ic);ma.Pauser=function(a){function b(){a.call(this)}return tb(b,a),b.prototype.pause=function(){this.onNext(!1)},b.prototype.resume=function(){this.onNext(!0)},b}(le),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(la.Rx=ma,define(function(){return ma})):ea&&fa?ja?(fa.exports=ma).Rx=ma:ea.Rx=ma:la.Rx=ma;var qe=j()}).call(this);
+//# sourceMappingURL=rx.lite.map \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/safe-buffer/LICENSE b/tools/node_modules/eslint/node_modules/safe-buffer/LICENSE
new file mode 100644
index 0000000000..0c068ceecb
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/safe-buffer/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Feross Aboukhadijeh
+
+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/tools/node_modules/eslint/node_modules/safe-buffer/README.md b/tools/node_modules/eslint/node_modules/safe-buffer/README.md
new file mode 100644
index 0000000000..e9a81afd04
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/safe-buffer/README.md
@@ -0,0 +1,584 @@
+# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]
+
+[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg
+[travis-url]: https://travis-ci.org/feross/safe-buffer
+[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg
+[npm-url]: https://npmjs.org/package/safe-buffer
+[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg
+[downloads-url]: https://npmjs.org/package/safe-buffer
+[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg
+[standard-url]: https://standardjs.com
+
+#### Safer Node.js Buffer API
+
+**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`,
+`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.**
+
+**Uses the built-in implementation when available.**
+
+## install
+
+```
+npm install safe-buffer
+```
+
+## usage
+
+The goal of this package is to provide a safe replacement for the node.js `Buffer`.
+
+It's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to
+the top of your node.js modules:
+
+```js
+var Buffer = require('safe-buffer').Buffer
+
+// Existing buffer code will continue to work without issues:
+
+new Buffer('hey', 'utf8')
+new Buffer([1, 2, 3], 'utf8')
+new Buffer(obj)
+new Buffer(16) // create an uninitialized buffer (potentially unsafe)
+
+// But you can use these new explicit APIs to make clear what you want:
+
+Buffer.from('hey', 'utf8') // convert from many types to a Buffer
+Buffer.alloc(16) // create a zero-filled buffer (safe)
+Buffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe)
+```
+
+## api
+
+### Class Method: Buffer.from(array)
+<!-- YAML
+added: v3.0.0
+-->
+
+* `array` {Array}
+
+Allocates a new `Buffer` using an `array` of octets.
+
+```js
+const buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]);
+ // creates a new Buffer containing ASCII bytes
+ // ['b','u','f','f','e','r']
+```
+
+A `TypeError` will be thrown if `array` is not an `Array`.
+
+### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]])
+<!-- YAML
+added: v5.10.0
+-->
+
+* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or
+ a `new ArrayBuffer()`
+* `byteOffset` {Number} Default: `0`
+* `length` {Number} Default: `arrayBuffer.length - byteOffset`
+
+When passed a reference to the `.buffer` property of a `TypedArray` instance,
+the newly created `Buffer` will share the same allocated memory as the
+TypedArray.
+
+```js
+const arr = new Uint16Array(2);
+arr[0] = 5000;
+arr[1] = 4000;
+
+const buf = Buffer.from(arr.buffer); // shares the memory with arr;
+
+console.log(buf);
+ // Prints: <Buffer 88 13 a0 0f>
+
+// changing the TypedArray changes the Buffer also
+arr[1] = 6000;
+
+console.log(buf);
+ // Prints: <Buffer 88 13 70 17>
+```
+
+The optional `byteOffset` and `length` arguments specify a memory range within
+the `arrayBuffer` that will be shared by the `Buffer`.
+
+```js
+const ab = new ArrayBuffer(10);
+const buf = Buffer.from(ab, 0, 2);
+console.log(buf.length);
+ // Prints: 2
+```
+
+A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`.
+
+### Class Method: Buffer.from(buffer)
+<!-- YAML
+added: v3.0.0
+-->
+
+* `buffer` {Buffer}
+
+Copies the passed `buffer` data onto a new `Buffer` instance.
+
+```js
+const buf1 = Buffer.from('buffer');
+const buf2 = Buffer.from(buf1);
+
+buf1[0] = 0x61;
+console.log(buf1.toString());
+ // 'auffer'
+console.log(buf2.toString());
+ // 'buffer' (copy is not changed)
+```
+
+A `TypeError` will be thrown if `buffer` is not a `Buffer`.
+
+### Class Method: Buffer.from(str[, encoding])
+<!-- YAML
+added: v5.10.0
+-->
+
+* `str` {String} String to encode.
+* `encoding` {String} Encoding to use, Default: `'utf8'`
+
+Creates a new `Buffer` containing the given JavaScript string `str`. If
+provided, the `encoding` parameter identifies the character encoding.
+If not provided, `encoding` defaults to `'utf8'`.
+
+```js
+const buf1 = Buffer.from('this is a tést');
+console.log(buf1.toString());
+ // prints: this is a tést
+console.log(buf1.toString('ascii'));
+ // prints: this is a tC)st
+
+const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex');
+console.log(buf2.toString());
+ // prints: this is a tést
+```
+
+A `TypeError` will be thrown if `str` is not a string.
+
+### Class Method: Buffer.alloc(size[, fill[, encoding]])
+<!-- YAML
+added: v5.10.0
+-->
+
+* `size` {Number}
+* `fill` {Value} Default: `undefined`
+* `encoding` {String} Default: `utf8`
+
+Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the
+`Buffer` will be *zero-filled*.
+
+```js
+const buf = Buffer.alloc(5);
+console.log(buf);
+ // <Buffer 00 00 00 00 00>
+```
+
+The `size` must be less than or equal to the value of
+`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is
+`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will
+be created if a `size` less than or equal to 0 is specified.
+
+If `fill` is specified, the allocated `Buffer` will be initialized by calling
+`buf.fill(fill)`. See [`buf.fill()`][] for more information.
+
+```js
+const buf = Buffer.alloc(5, 'a');
+console.log(buf);
+ // <Buffer 61 61 61 61 61>
+```
+
+If both `fill` and `encoding` are specified, the allocated `Buffer` will be
+initialized by calling `buf.fill(fill, encoding)`. For example:
+
+```js
+const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64');
+console.log(buf);
+ // <Buffer 68 65 6c 6c 6f 20 77 6f 72 6c 64>
+```
+
+Calling `Buffer.alloc(size)` can be significantly slower than the alternative
+`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance
+contents will *never contain sensitive data*.
+
+A `TypeError` will be thrown if `size` is not a number.
+
+### Class Method: Buffer.allocUnsafe(size)
+<!-- YAML
+added: v5.10.0
+-->
+
+* `size` {Number}
+
+Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must
+be less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit
+architectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is
+thrown. A zero-length Buffer will be created if a `size` less than or equal to
+0 is specified.
+
+The underlying memory for `Buffer` instances created in this way is *not
+initialized*. The contents of the newly created `Buffer` are unknown and
+*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such
+`Buffer` instances to zeroes.
+
+```js
+const buf = Buffer.allocUnsafe(5);
+console.log(buf);
+ // <Buffer 78 e0 82 02 01>
+ // (octets will be different, every time)
+buf.fill(0);
+console.log(buf);
+ // <Buffer 00 00 00 00 00>
+```
+
+A `TypeError` will be thrown if `size` is not a number.
+
+Note that the `Buffer` module pre-allocates an internal `Buffer` instance of
+size `Buffer.poolSize` that is used as a pool for the fast allocation of new
+`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated
+`new Buffer(size)` constructor) only when `size` is less than or equal to
+`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default
+value of `Buffer.poolSize` is `8192` but can be modified.
+
+Use of this pre-allocated internal memory pool is a key difference between
+calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`.
+Specifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer
+pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal
+Buffer pool if `size` is less than or equal to half `Buffer.poolSize`. The
+difference is subtle but can be important when an application requires the
+additional performance that `Buffer.allocUnsafe(size)` provides.
+
+### Class Method: Buffer.allocUnsafeSlow(size)
+<!-- YAML
+added: v5.10.0
+-->
+
+* `size` {Number}
+
+Allocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The
+`size` must be less than or equal to the value of
+`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is
+`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will
+be created if a `size` less than or equal to 0 is specified.
+
+The underlying memory for `Buffer` instances created in this way is *not
+initialized*. The contents of the newly created `Buffer` are unknown and
+*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such
+`Buffer` instances to zeroes.
+
+When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances,
+allocations under 4KB are, by default, sliced from a single pre-allocated
+`Buffer`. This allows applications to avoid the garbage collection overhead of
+creating many individually allocated Buffers. This approach improves both
+performance and memory usage by eliminating the need to track and cleanup as
+many `Persistent` objects.
+
+However, in the case where a developer may need to retain a small chunk of
+memory from a pool for an indeterminate amount of time, it may be appropriate
+to create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then
+copy out the relevant bits.
+
+```js
+// need to keep around a few small chunks of memory
+const store = [];
+
+socket.on('readable', () => {
+ const data = socket.read();
+ // allocate for retained data
+ const sb = Buffer.allocUnsafeSlow(10);
+ // copy the data into the new allocation
+ data.copy(sb, 0, 0, 10);
+ store.push(sb);
+});
+```
+
+Use of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after*
+a developer has observed undue memory retention in their applications.
+
+A `TypeError` will be thrown if `size` is not a number.
+
+### All the Rest
+
+The rest of the `Buffer` API is exactly the same as in node.js.
+[See the docs](https://nodejs.org/api/buffer.html).
+
+
+## Related links
+
+- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660)
+- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4)
+
+## Why is `Buffer` unsafe?
+
+Today, the node.js `Buffer` constructor is overloaded to handle many different argument
+types like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.),
+`ArrayBuffer`, and also `Number`.
+
+The API is optimized for convenience: you can throw any type at it, and it will try to do
+what you want.
+
+Because the Buffer constructor is so powerful, you often see code like this:
+
+```js
+// Convert UTF-8 strings to hex
+function toHex (str) {
+ return new Buffer(str).toString('hex')
+}
+```
+
+***But what happens if `toHex` is called with a `Number` argument?***
+
+### Remote Memory Disclosure
+
+If an attacker can make your program call the `Buffer` constructor with a `Number`
+argument, then they can make it allocate uninitialized memory from the node.js process.
+This could potentially disclose TLS private keys, user data, or database passwords.
+
+When the `Buffer` constructor is passed a `Number` argument, it returns an
+**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like
+this, you **MUST** overwrite the contents before returning it to the user.
+
+From the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size):
+
+> `new Buffer(size)`
+>
+> - `size` Number
+>
+> The underlying memory for `Buffer` instances created in this way is not initialized.
+> **The contents of a newly created `Buffer` are unknown and could contain sensitive
+> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes.
+
+(Emphasis our own.)
+
+Whenever the programmer intended to create an uninitialized `Buffer` you often see code
+like this:
+
+```js
+var buf = new Buffer(16)
+
+// Immediately overwrite the uninitialized buffer with data from another buffer
+for (var i = 0; i < buf.length; i++) {
+ buf[i] = otherBuf[i]
+}
+```
+
+
+### Would this ever be a problem in real code?
+
+Yes. It's surprisingly common to forget to check the type of your variables in a
+dynamically-typed language like JavaScript.
+
+Usually the consequences of assuming the wrong type is that your program crashes with an
+uncaught exception. But the failure mode for forgetting to check the type of arguments to
+the `Buffer` constructor is more catastrophic.
+
+Here's an example of a vulnerable service that takes a JSON payload and converts it to
+hex:
+
+```js
+// Take a JSON payload {str: "some string"} and convert it to hex
+var server = http.createServer(function (req, res) {
+ var data = ''
+ req.setEncoding('utf8')
+ req.on('data', function (chunk) {
+ data += chunk
+ })
+ req.on('end', function () {
+ var body = JSON.parse(data)
+ res.end(new Buffer(body.str).toString('hex'))
+ })
+})
+
+server.listen(8080)
+```
+
+In this example, an http client just has to send:
+
+```json
+{
+ "str": 1000
+}
+```
+
+and it will get back 1,000 bytes of uninitialized memory from the server.
+
+This is a very serious bug. It's similar in severity to the
+[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process
+memory by remote attackers.
+
+
+### Which real-world packages were vulnerable?
+
+#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht)
+
+[Mathias Buus](https://github.com/mafintosh) and I
+([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages,
+[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow
+anyone on the internet to send a series of messages to a user of `bittorrent-dht` and get
+them to reveal 20 bytes at a time of uninitialized memory from the node.js process.
+
+Here's
+[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8)
+that fixed it. We released a new fixed version, created a
+[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all
+vulnerable versions on npm so users will get a warning to upgrade to a newer version.
+
+#### [`ws`](https://www.npmjs.com/package/ws)
+
+That got us wondering if there were other vulnerable packages. Sure enough, within a short
+period of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the
+most popular WebSocket implementation in node.js.
+
+If certain APIs were called with `Number` parameters instead of `String` or `Buffer` as
+expected, then uninitialized server memory would be disclosed to the remote peer.
+
+These were the vulnerable methods:
+
+```js
+socket.send(number)
+socket.ping(number)
+socket.pong(number)
+```
+
+Here's a vulnerable socket server with some echo functionality:
+
+```js
+server.on('connection', function (socket) {
+ socket.on('message', function (message) {
+ message = JSON.parse(message)
+ if (message.type === 'echo') {
+ socket.send(message.data) // send back the user's message
+ }
+ })
+})
+```
+
+`socket.send(number)` called on the server, will disclose server memory.
+
+Here's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue
+was fixed, with a more detailed explanation. Props to
+[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the
+[Node Security Project disclosure](https://nodesecurity.io/advisories/67).
+
+
+### What's the solution?
+
+It's important that node.js offers a fast way to get memory otherwise performance-critical
+applications would needlessly get a lot slower.
+
+But we need a better way to *signal our intent* as programmers. **When we want
+uninitialized memory, we should request it explicitly.**
+
+Sensitive functionality should not be packed into a developer-friendly API that loosely
+accepts many different types. This type of API encourages the lazy practice of passing
+variables in without checking the type very carefully.
+
+#### A new API: `Buffer.allocUnsafe(number)`
+
+The functionality of creating buffers with uninitialized memory should be part of another
+API. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that
+frequently gets user input of all sorts of different types passed into it.
+
+```js
+var buf = Buffer.allocUnsafe(16) // careful, uninitialized memory!
+
+// Immediately overwrite the uninitialized buffer with data from another buffer
+for (var i = 0; i < buf.length; i++) {
+ buf[i] = otherBuf[i]
+}
+```
+
+
+### How do we fix node.js core?
+
+We sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as
+`semver-major`) which defends against one case:
+
+```js
+var str = 16
+new Buffer(str, 'utf8')
+```
+
+In this situation, it's implied that the programmer intended the first argument to be a
+string, since they passed an encoding as a second argument. Today, node.js will allocate
+uninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not
+what the programmer intended.
+
+But this is only a partial solution, since if the programmer does `new Buffer(variable)`
+(without an `encoding` parameter) there's no way to know what they intended. If `variable`
+is sometimes a number, then uninitialized memory will sometimes be returned.
+
+### What's the real long-term fix?
+
+We could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when
+we need uninitialized memory. But that would break 1000s of packages.
+
+~~We believe the best solution is to:~~
+
+~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~
+
+~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~
+
+#### Update
+
+We now support adding three new APIs:
+
+- `Buffer.from(value)` - convert from any type to a buffer
+- `Buffer.alloc(size)` - create a zero-filled buffer
+- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size
+
+This solves the core problem that affected `ws` and `bittorrent-dht` which is
+`Buffer(variable)` getting tricked into taking a number argument.
+
+This way, existing code continues working and the impact on the npm ecosystem will be
+minimal. Over time, npm maintainers can migrate performance-critical code to use
+`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`.
+
+
+### Conclusion
+
+We think there's a serious design issue with the `Buffer` API as it exists today. It
+promotes insecure software by putting high-risk functionality into a convenient API
+with friendly "developer ergonomics".
+
+This wasn't merely a theoretical exercise because we found the issue in some of the
+most popular npm packages.
+
+Fortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of
+`buffer`.
+
+```js
+var Buffer = require('safe-buffer').Buffer
+```
+
+Eventually, we hope that node.js core can switch to this new, safer behavior. We believe
+the impact on the ecosystem would be minimal since it's not a breaking change.
+Well-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while
+older, insecure packages would magically become safe from this attack vector.
+
+
+## links
+
+- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514)
+- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67)
+- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68)
+
+
+## credit
+
+The original issues in `bittorrent-dht`
+([disclosure](https://nodesecurity.io/advisories/68)) and
+`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by
+[Mathias Buus](https://github.com/mafintosh) and
+[Feross Aboukhadijeh](http://feross.org/).
+
+Thanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues
+and for his work running the [Node Security Project](https://nodesecurity.io/).
+
+Thanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and
+auditing the code.
+
+
+## license
+
+MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org)
diff --git a/tools/node_modules/eslint/node_modules/safe-buffer/index.js b/tools/node_modules/eslint/node_modules/safe-buffer/index.js
new file mode 100644
index 0000000000..22438dabbb
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/safe-buffer/index.js
@@ -0,0 +1,62 @@
+/* eslint-disable node/no-deprecated-api */
+var buffer = require('buffer')
+var Buffer = buffer.Buffer
+
+// alternative to using Object.keys for old browsers
+function copyProps (src, dst) {
+ for (var key in src) {
+ dst[key] = src[key]
+ }
+}
+if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
+ module.exports = buffer
+} else {
+ // Copy properties from require('buffer')
+ copyProps(buffer, exports)
+ exports.Buffer = SafeBuffer
+}
+
+function SafeBuffer (arg, encodingOrOffset, length) {
+ return Buffer(arg, encodingOrOffset, length)
+}
+
+// Copy static methods from Buffer
+copyProps(Buffer, SafeBuffer)
+
+SafeBuffer.from = function (arg, encodingOrOffset, length) {
+ if (typeof arg === 'number') {
+ throw new TypeError('Argument must not be a number')
+ }
+ return Buffer(arg, encodingOrOffset, length)
+}
+
+SafeBuffer.alloc = function (size, fill, encoding) {
+ if (typeof size !== 'number') {
+ throw new TypeError('Argument must be a number')
+ }
+ var buf = Buffer(size)
+ if (fill !== undefined) {
+ if (typeof encoding === 'string') {
+ buf.fill(fill, encoding)
+ } else {
+ buf.fill(fill)
+ }
+ } else {
+ buf.fill(0)
+ }
+ return buf
+}
+
+SafeBuffer.allocUnsafe = function (size) {
+ if (typeof size !== 'number') {
+ throw new TypeError('Argument must be a number')
+ }
+ return Buffer(size)
+}
+
+SafeBuffer.allocUnsafeSlow = function (size) {
+ if (typeof size !== 'number') {
+ throw new TypeError('Argument must be a number')
+ }
+ return buffer.SlowBuffer(size)
+}
diff --git a/tools/node_modules/eslint/node_modules/safe-buffer/package.json b/tools/node_modules/eslint/node_modules/safe-buffer/package.json
new file mode 100644
index 0000000000..83166ac750
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/safe-buffer/package.json
@@ -0,0 +1,63 @@
+{
+ "_from": "safe-buffer@~5.1.1",
+ "_id": "safe-buffer@5.1.1",
+ "_inBundle": false,
+ "_integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==",
+ "_location": "/eslint/safe-buffer",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "safe-buffer@~5.1.1",
+ "name": "safe-buffer",
+ "escapedName": "safe-buffer",
+ "rawSpec": "~5.1.1",
+ "saveSpec": null,
+ "fetchSpec": "~5.1.1"
+ },
+ "_requiredBy": [
+ "/eslint/readable-stream",
+ "/eslint/string_decoder"
+ ],
+ "_resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
+ "_shasum": "893312af69b2123def71f57889001671eeb2c853",
+ "_spec": "safe-buffer@~5.1.1",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/readable-stream",
+ "author": {
+ "name": "Feross Aboukhadijeh",
+ "email": "feross@feross.org",
+ "url": "http://feross.org"
+ },
+ "bugs": {
+ "url": "https://github.com/feross/safe-buffer/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Safer Node.js Buffer API",
+ "devDependencies": {
+ "standard": "*",
+ "tape": "^4.0.0",
+ "zuul": "^3.0.0"
+ },
+ "homepage": "https://github.com/feross/safe-buffer",
+ "keywords": [
+ "buffer",
+ "buffer allocate",
+ "node security",
+ "safe",
+ "safe-buffer",
+ "security",
+ "uninitialized"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "safe-buffer",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/feross/safe-buffer.git"
+ },
+ "scripts": {
+ "test": "standard && tape test.js"
+ },
+ "version": "5.1.1"
+}
diff --git a/tools/node_modules/eslint/node_modules/semver/LICENSE b/tools/node_modules/eslint/node_modules/semver/LICENSE
new file mode 100644
index 0000000000..19129e315f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/semver/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/tools/node_modules/eslint/node_modules/semver/README.md b/tools/node_modules/eslint/node_modules/semver/README.md
new file mode 100644
index 0000000000..fd5151ab37
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/semver/README.md
@@ -0,0 +1,366 @@
+semver(1) -- The semantic versioner for npm
+===========================================
+
+## Install
+
+```bash
+npm install --save semver
+````
+
+## Usage
+
+As a node module:
+
+```js
+const semver = require('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
+
+SemVer 5.3.0
+
+A JavaScript implementation of the http://semver.org/ specification
+Copyright Isaac Z. Schlueter
+
+Usage: semver [options] <version> [<version> [...]]
+Prints valid versions sorted by SemVer precedence
+
+Options:
+-r --range <range>
+ Print versions that match the specified range.
+
+-i --increment [<level>]
+ 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>
+ 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.
+```
+
+## Versions
+
+A "version" is described by the `v2.0.0` specification found at
+<http://semver.org/>.
+
+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', 'prerelease', 'beta')
+// '1.2.4-beta.0'
+```
+
+command-line example:
+
+```bash
+$ semver 1.2.3 -i prerelease --preid beta
+1.2.4-beta.0
+```
+
+Which then can be used to increment further:
+
+```bash
+$ 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`
+
+### Range Grammar
+
+Putting all this together, here is a Backus-Naur grammar for ranges,
+for the benefit of parser authors:
+
+```bnf
+range-set ::= range ( logical-or range ) *
+logical-or ::= ( ' ' ) * '||' ( ' ' ) *
+range ::= hyphen | simple ( ' ' simple ) * | ''
+hyphen ::= partial ' - ' partial
+simple ::= primitive | partial | tilde | caret
+primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial
+partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
+xr ::= 'x' | 'X' | '*' | nr
+nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
+tilde ::= '~' partial
+caret ::= '^' partial
+qualifier ::= ( '-' pre )? ( '+' build )?
+pre ::= parts
+build ::= parts
+parts ::= part ( '.' part ) *
+part ::= nr | [-0-9A-Za-z]+
+```
+
+## 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.
+* `prerelease(v)`: Returns an array of prerelease components, or null
+ if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]`
+* `major(v)`: Return the major version number.
+* `minor(v)`: Return the minor version number.
+* `patch(v)`: Return the patch version number.
+* `intersects(r1, r2, loose)`: Return true if the two supplied ranges
+ or comparators intersect.
+
+### 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.
+
+### Comparators
+
+* `intersects(comparator)`: Return true if the comparators intersect
+
+### 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.
+* `minSatisfying(versions, range)`: Return the lowest 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`.)
+* `intersects(range)`: Return true if any of the ranges comparators intersect
+
+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/tools/node_modules/eslint/node_modules/semver/bin/semver b/tools/node_modules/eslint/node_modules/semver/bin/semver
new file mode 100755
index 0000000000..c5f2e857e8
--- /dev/null
+++ b/tools/node_modules/eslint/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] <version> [<version> [...]]"
+ ,"Prints valid versions sorted by SemVer precedence"
+ ,""
+ ,"Options:"
+ ,"-r --range <range>"
+ ," Print versions that match the specified range."
+ ,""
+ ,"-i --increment [<level>]"
+ ," 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>"
+ ," 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/tools/node_modules/eslint/node_modules/semver/package.json b/tools/node_modules/eslint/node_modules/semver/package.json
new file mode 100644
index 0000000000..a64c01f943
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/semver/package.json
@@ -0,0 +1,54 @@
+{
+ "_from": "semver@^5.3.0",
+ "_id": "semver@5.4.1",
+ "_inBundle": false,
+ "_integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==",
+ "_location": "/eslint/semver",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "semver@^5.3.0",
+ "name": "semver",
+ "escapedName": "semver",
+ "rawSpec": "^5.3.0",
+ "saveSpec": null,
+ "fetchSpec": "^5.3.0"
+ },
+ "_requiredBy": [
+ "/eslint"
+ ],
+ "_resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz",
+ "_shasum": "e059c09d8571f0540823733433505d3a2f00b18e",
+ "_spec": "semver@^5.3.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint",
+ "bin": {
+ "semver": "./bin/semver"
+ },
+ "bugs": {
+ "url": "https://github.com/npm/node-semver/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "The semantic version parser used by npm.",
+ "devDependencies": {
+ "tap": "^10.7.0"
+ },
+ "files": [
+ "bin",
+ "range.bnf",
+ "semver.js"
+ ],
+ "homepage": "https://github.com/npm/node-semver#readme",
+ "license": "ISC",
+ "main": "semver.js",
+ "name": "semver",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/npm/node-semver.git"
+ },
+ "scripts": {
+ "test": "tap test/*.js --cov -J"
+ },
+ "version": "5.4.1"
+}
diff --git a/tools/node_modules/eslint/node_modules/semver/range.bnf b/tools/node_modules/eslint/node_modules/semver/range.bnf
new file mode 100644
index 0000000000..25ebd5c832
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/semver/range.bnf
@@ -0,0 +1,16 @@
+range-set ::= range ( logical-or range ) *
+logical-or ::= ( ' ' ) * '||' ( ' ' ) *
+range ::= hyphen | simple ( ' ' simple ) * | ''
+hyphen ::= partial ' - ' partial
+simple ::= primitive | partial | tilde | caret
+primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial
+partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
+xr ::= 'x' | 'X' | '*' | nr
+nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
+tilde ::= '~' partial
+caret ::= '^' partial
+qualifier ::= ( '-' pre )? ( '+' build )?
+pre ::= parts
+build ::= parts
+parts ::= part ( '.' part ) *
+part ::= nr | [-0-9A-Za-z]+
diff --git a/tools/node_modules/eslint/node_modules/semver/semver.js b/tools/node_modules/eslint/node_modules/semver/semver.js
new file mode 100644
index 0000000000..389cb44676
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/semver/semver.js
@@ -0,0 +1,1296 @@
+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 instanceof SemVer)
+ return version;
+
+ if (typeof version !== 'string')
+ return null;
+
+ 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) {
+ if (/^[0-9]+$/.test(id)) {
+ var num = +id;
+ if (num >= 0 && num < MAX_SAFE_INTEGER)
+ return num;
+ }
+ return 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.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();
+ this.raw = this.version;
+ 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(new SemVer(b, loose));
+}
+
+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.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);
+};
+
+Comparator.prototype.intersects = function(comp, loose) {
+ if (!(comp instanceof Comparator)) {
+ throw new TypeError('a Comparator is required');
+ }
+
+ var rangeTmp;
+
+ if (this.operator === '') {
+ rangeTmp = new Range(comp.value, loose);
+ return satisfies(this.value, rangeTmp, loose);
+ } else if (comp.operator === '') {
+ rangeTmp = new Range(this.value, loose);
+ return satisfies(comp.semver, rangeTmp, loose);
+ }
+
+ var sameDirectionIncreasing =
+ (this.operator === '>=' || this.operator === '>') &&
+ (comp.operator === '>=' || comp.operator === '>');
+ var sameDirectionDecreasing =
+ (this.operator === '<=' || this.operator === '<') &&
+ (comp.operator === '<=' || comp.operator === '<');
+ var sameSemVer = this.semver.version === comp.semver.version;
+ var differentDirectionsInclusive =
+ (this.operator === '>=' || this.operator === '<=') &&
+ (comp.operator === '>=' || comp.operator === '<=');
+ var oppositeDirectionsLessThan =
+ cmp(this.semver, '<', comp.semver, loose) &&
+ ((this.operator === '>=' || this.operator === '>') &&
+ (comp.operator === '<=' || comp.operator === '<'));
+ var oppositeDirectionsGreaterThan =
+ cmp(this.semver, '>', comp.semver, loose) &&
+ ((this.operator === '<=' || this.operator === '<') &&
+ (comp.operator === '>=' || comp.operator === '>'));
+
+ return sameDirectionIncreasing || sameDirectionDecreasing ||
+ (sameSemVer && differentDirectionsInclusive) ||
+ oppositeDirectionsLessThan || oppositeDirectionsGreaterThan;
+};
+
+
+exports.Range = Range;
+function Range(range, loose) {
+ if (range instanceof Range) {
+ if (range.loose === loose) {
+ return range;
+ } else {
+ return new Range(range.raw, loose);
+ }
+ }
+
+ if (range instanceof Comparator) {
+ return new Range(range.value, loose);
+ }
+
+ 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.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;
+};
+
+Range.prototype.intersects = function(range, loose) {
+ if (!(range instanceof Range)) {
+ throw new TypeError('a Range is required');
+ }
+
+ return this.set.some(function(thisComparators) {
+ return thisComparators.every(function(thisComparator) {
+ return range.set.some(function(rangeComparators) {
+ return rangeComparators.every(function(rangeComparator) {
+ return thisComparator.intersects(rangeComparator, loose);
+ });
+ });
+ });
+ });
+};
+
+// 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)
+ continue;
+
+ 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) {
+ var max = null;
+ var maxSV = null;
+ try {
+ var rangeObj = new Range(range, loose);
+ } catch (er) {
+ return null;
+ }
+ versions.forEach(function (v) {
+ if (rangeObj.test(v)) { // satisfies(v, range, loose)
+ if (!max || maxSV.compare(v) === -1) { // compare(max, v, true)
+ max = v;
+ maxSV = new SemVer(max, loose);
+ }
+ }
+ })
+ return max;
+}
+
+exports.minSatisfying = minSatisfying;
+function minSatisfying(versions, range, loose) {
+ var min = null;
+ var minSV = null;
+ try {
+ var rangeObj = new Range(range, loose);
+ } catch (er) {
+ return null;
+ }
+ versions.forEach(function (v) {
+ if (rangeObj.test(v)) { // satisfies(v, range, loose)
+ if (!min || minSV.compare(v) === 1) { // compare(min, v, true)
+ min = v;
+ minSV = new SemVer(min, loose);
+ }
+ }
+ })
+ return min;
+}
+
+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) {
+ if (comparator.semver === ANY) {
+ comparator = new Comparator('>=0.0.0')
+ }
+ 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;
+}
+
+exports.prerelease = prerelease;
+function prerelease(version, loose) {
+ var parsed = parse(version, loose);
+ return (parsed && parsed.prerelease.length) ? parsed.prerelease : null;
+}
+
+exports.intersects = intersects;
+function intersects(r1, r2, loose) {
+ r1 = new Range(r1, loose)
+ r2 = new Range(r2, loose)
+ return r1.intersects(r2)
+}
diff --git a/tools/node_modules/eslint/node_modules/shebang-command/index.js b/tools/node_modules/eslint/node_modules/shebang-command/index.js
new file mode 100644
index 0000000000..2de70b0742
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/shebang-command/index.js
@@ -0,0 +1,19 @@
+'use strict';
+var shebangRegex = require('shebang-regex');
+
+module.exports = function (str) {
+ var match = str.match(shebangRegex);
+
+ if (!match) {
+ return null;
+ }
+
+ var arr = match[0].replace(/#! ?/, '').split(' ');
+ var bin = arr[0].split('/').pop();
+ var arg = arr[1];
+
+ return (bin === 'env' ?
+ arg :
+ bin + (arg ? ' ' + arg : '')
+ );
+};
diff --git a/tools/node_modules/eslint/node_modules/shebang-command/license b/tools/node_modules/eslint/node_modules/shebang-command/license
new file mode 100644
index 0000000000..0f8cf79c3c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/shebang-command/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Kevin Martensson <kevinmartensson@gmail.com> (github.com/kevva)
+
+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/tools/node_modules/eslint/node_modules/shebang-command/package.json b/tools/node_modules/eslint/node_modules/shebang-command/package.json
new file mode 100644
index 0000000000..86f04b716f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/shebang-command/package.json
@@ -0,0 +1,71 @@
+{
+ "_from": "shebang-command@^1.2.0",
+ "_id": "shebang-command@1.2.0",
+ "_inBundle": false,
+ "_integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
+ "_location": "/eslint/shebang-command",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "shebang-command@^1.2.0",
+ "name": "shebang-command",
+ "escapedName": "shebang-command",
+ "rawSpec": "^1.2.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.2.0"
+ },
+ "_requiredBy": [
+ "/eslint/cross-spawn"
+ ],
+ "_resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
+ "_shasum": "44aac65b695b03398968c39f363fee5deafdf1ea",
+ "_spec": "shebang-command@^1.2.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/cross-spawn",
+ "author": {
+ "name": "Kevin Martensson",
+ "email": "kevinmartensson@gmail.com",
+ "url": "github.com/kevva"
+ },
+ "bugs": {
+ "url": "https://github.com/kevva/shebang-command/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "shebang-regex": "^1.0.0"
+ },
+ "deprecated": false,
+ "description": "Get the command from a shebang",
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/kevva/shebang-command#readme",
+ "keywords": [
+ "cmd",
+ "command",
+ "parse",
+ "shebang"
+ ],
+ "license": "MIT",
+ "name": "shebang-command",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/kevva/shebang-command.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "1.2.0",
+ "xo": {
+ "ignores": [
+ "test.js"
+ ]
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/shebang-command/readme.md b/tools/node_modules/eslint/node_modules/shebang-command/readme.md
new file mode 100644
index 0000000000..16b0be4d7d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/shebang-command/readme.md
@@ -0,0 +1,39 @@
+# shebang-command [![Build Status](https://travis-ci.org/kevva/shebang-command.svg?branch=master)](https://travis-ci.org/kevva/shebang-command)
+
+> Get the command from a shebang
+
+
+## Install
+
+```
+$ npm install --save shebang-command
+```
+
+
+## Usage
+
+```js
+const shebangCommand = require('shebang-command');
+
+shebangCommand('#!/usr/bin/env node');
+//=> 'node'
+
+shebangCommand('#!/bin/bash');
+//=> 'bash'
+```
+
+
+## API
+
+### shebangCommand(string)
+
+#### string
+
+Type: `string`
+
+String containing a shebang.
+
+
+## License
+
+MIT © [Kevin Martensson](http://github.com/kevva)
diff --git a/tools/node_modules/eslint/node_modules/shebang-regex/index.js b/tools/node_modules/eslint/node_modules/shebang-regex/index.js
new file mode 100644
index 0000000000..d052d2e05e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/shebang-regex/index.js
@@ -0,0 +1,2 @@
+'use strict';
+module.exports = /^#!.*/;
diff --git a/tools/node_modules/eslint/node_modules/shebang-regex/license b/tools/node_modules/eslint/node_modules/shebang-regex/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/shebang-regex/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/tools/node_modules/eslint/node_modules/shebang-regex/package.json b/tools/node_modules/eslint/node_modules/shebang-regex/package.json
new file mode 100644
index 0000000000..6de87ae2e3
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/shebang-regex/package.json
@@ -0,0 +1,64 @@
+{
+ "_from": "shebang-regex@^1.0.0",
+ "_id": "shebang-regex@1.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
+ "_location": "/eslint/shebang-regex",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "shebang-regex@^1.0.0",
+ "name": "shebang-regex",
+ "escapedName": "shebang-regex",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/eslint/shebang-command"
+ ],
+ "_resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
+ "_shasum": "da42f49740c0b42db2ca9728571cb190c98efea3",
+ "_spec": "shebang-regex@^1.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/shebang-command",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/shebang-regex/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Regular expression for matching a shebang",
+ "devDependencies": {
+ "ava": "0.0.4"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/shebang-regex#readme",
+ "keywords": [
+ "re",
+ "regex",
+ "regexp",
+ "shebang",
+ "match",
+ "test"
+ ],
+ "license": "MIT",
+ "name": "shebang-regex",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/shebang-regex.git"
+ },
+ "scripts": {
+ "test": "node test.js"
+ },
+ "version": "1.0.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/shebang-regex/readme.md b/tools/node_modules/eslint/node_modules/shebang-regex/readme.md
new file mode 100644
index 0000000000..ef75e51b5b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/shebang-regex/readme.md
@@ -0,0 +1,29 @@
+# shebang-regex [![Build Status](https://travis-ci.org/sindresorhus/shebang-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/shebang-regex)
+
+> Regular expression for matching a [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix))
+
+
+## Install
+
+```
+$ npm install --save shebang-regex
+```
+
+
+## Usage
+
+```js
+var shebangRegex = require('shebang-regex');
+var str = '#!/usr/bin/env node\nconsole.log("unicorns");';
+
+shebangRegex.test(str);
+//=> true
+
+shebangRegex.exec(str)[0];
+//=> '#!/usr/bin/env node'
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/tools/node_modules/eslint/node_modules/signal-exit/LICENSE.txt b/tools/node_modules/eslint/node_modules/signal-exit/LICENSE.txt
new file mode 100644
index 0000000000..eead04a121
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/signal-exit/LICENSE.txt
@@ -0,0 +1,16 @@
+The ISC License
+
+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/tools/node_modules/eslint/node_modules/signal-exit/README.md b/tools/node_modules/eslint/node_modules/signal-exit/README.md
new file mode 100644
index 0000000000..8ebccabeca
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/signal-exit/README.md
@@ -0,0 +1,40 @@
+# signal-exit
+
+[![Build Status](https://travis-ci.org/tapjs/signal-exit.png)](https://travis-ci.org/tapjs/signal-exit)
+[![Coverage](https://coveralls.io/repos/tapjs/signal-exit/badge.svg?branch=master)](https://coveralls.io/r/tapjs/signal-exit?branch=master)
+[![NPM version](https://img.shields.io/npm/v/signal-exit.svg)](https://www.npmjs.com/package/signal-exit)
+[![Windows Tests](https://img.shields.io/appveyor/ci/bcoe/signal-exit/master.svg?label=Windows%20Tests)](https://ci.appveyor.com/project/bcoe/signal-exit)
+[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version)
+
+When you want to fire an event no matter how a process exits:
+
+* reaching the end of execution.
+* explicitly having `process.exit(code)` called.
+* having `process.kill(pid, sig)` called.
+* receiving a fatal signal from outside the process
+
+Use `signal-exit`.
+
+```js
+var onExit = require('signal-exit')
+
+onExit(function (code, signal) {
+ console.log('process exited!')
+})
+```
+
+## API
+
+`var remove = onExit(function (code, signal) {}, options)`
+
+The return value of the function is a function that will remove the
+handler.
+
+Note that the function *only* fires for signals if the signal would
+cause the proces to exit. That is, there are no other listeners, and
+it is a fatal signal.
+
+## Options
+
+* `alwaysLast`: Run this handler after any other signal or exit
+ handlers. This causes `process.emit` to be monkeypatched.
diff --git a/tools/node_modules/eslint/node_modules/signal-exit/index.js b/tools/node_modules/eslint/node_modules/signal-exit/index.js
new file mode 100644
index 0000000000..337f691ed2
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/signal-exit/index.js
@@ -0,0 +1,157 @@
+// Note: since nyc uses this module to output coverage, any lines
+// that are in the direct sync flow of nyc's outputCoverage are
+// ignored, since we can never get coverage for them.
+var assert = require('assert')
+var signals = require('./signals.js')
+
+var EE = require('events')
+/* istanbul ignore if */
+if (typeof EE !== 'function') {
+ EE = EE.EventEmitter
+}
+
+var emitter
+if (process.__signal_exit_emitter__) {
+ emitter = process.__signal_exit_emitter__
+} else {
+ emitter = process.__signal_exit_emitter__ = new EE()
+ emitter.count = 0
+ emitter.emitted = {}
+}
+
+// Because this emitter is a global, we have to check to see if a
+// previous version of this library failed to enable infinite listeners.
+// I know what you're about to say. But literally everything about
+// signal-exit is a compromise with evil. Get used to it.
+if (!emitter.infinite) {
+ emitter.setMaxListeners(Infinity)
+ emitter.infinite = true
+}
+
+module.exports = function (cb, opts) {
+ assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler')
+
+ if (loaded === false) {
+ load()
+ }
+
+ var ev = 'exit'
+ if (opts && opts.alwaysLast) {
+ ev = 'afterexit'
+ }
+
+ var remove = function () {
+ emitter.removeListener(ev, cb)
+ if (emitter.listeners('exit').length === 0 &&
+ emitter.listeners('afterexit').length === 0) {
+ unload()
+ }
+ }
+ emitter.on(ev, cb)
+
+ return remove
+}
+
+module.exports.unload = unload
+function unload () {
+ if (!loaded) {
+ return
+ }
+ loaded = false
+
+ signals.forEach(function (sig) {
+ try {
+ process.removeListener(sig, sigListeners[sig])
+ } catch (er) {}
+ })
+ process.emit = originalProcessEmit
+ process.reallyExit = originalProcessReallyExit
+ emitter.count -= 1
+}
+
+function emit (event, code, signal) {
+ if (emitter.emitted[event]) {
+ return
+ }
+ emitter.emitted[event] = true
+ emitter.emit(event, code, signal)
+}
+
+// { <signal>: <listener fn>, ... }
+var sigListeners = {}
+signals.forEach(function (sig) {
+ sigListeners[sig] = function listener () {
+ // If there are no other listeners, an exit is coming!
+ // Simplest way: remove us and then re-send the signal.
+ // We know that this will kill the process, so we can
+ // safely emit now.
+ var listeners = process.listeners(sig)
+ if (listeners.length === emitter.count) {
+ unload()
+ emit('exit', null, sig)
+ /* istanbul ignore next */
+ emit('afterexit', null, sig)
+ /* istanbul ignore next */
+ process.kill(process.pid, sig)
+ }
+ }
+})
+
+module.exports.signals = function () {
+ return signals
+}
+
+module.exports.load = load
+
+var loaded = false
+
+function load () {
+ if (loaded) {
+ return
+ }
+ loaded = true
+
+ // This is the number of onSignalExit's that are in play.
+ // It's important so that we can count the correct number of
+ // listeners on signals, and don't wait for the other one to
+ // handle it instead of us.
+ emitter.count += 1
+
+ signals = signals.filter(function (sig) {
+ try {
+ process.on(sig, sigListeners[sig])
+ return true
+ } catch (er) {
+ return false
+ }
+ })
+
+ process.emit = processEmit
+ process.reallyExit = processReallyExit
+}
+
+var originalProcessReallyExit = process.reallyExit
+function processReallyExit (code) {
+ process.exitCode = code || 0
+ emit('exit', process.exitCode, null)
+ /* istanbul ignore next */
+ emit('afterexit', process.exitCode, null)
+ /* istanbul ignore next */
+ originalProcessReallyExit.call(process, process.exitCode)
+}
+
+var originalProcessEmit = process.emit
+function processEmit (ev, arg) {
+ if (ev === 'exit') {
+ if (arg !== undefined) {
+ process.exitCode = arg
+ }
+ var ret = originalProcessEmit.apply(this, arguments)
+ emit('exit', process.exitCode, null)
+ /* istanbul ignore next */
+ emit('afterexit', process.exitCode, null)
+ return ret
+ } else {
+ return originalProcessEmit.apply(this, arguments)
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/signal-exit/package.json b/tools/node_modules/eslint/node_modules/signal-exit/package.json
new file mode 100644
index 0000000000..4c75f18375
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/signal-exit/package.json
@@ -0,0 +1,66 @@
+{
+ "_from": "signal-exit@^3.0.2",
+ "_id": "signal-exit@3.0.2",
+ "_inBundle": false,
+ "_integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
+ "_location": "/eslint/signal-exit",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "signal-exit@^3.0.2",
+ "name": "signal-exit",
+ "escapedName": "signal-exit",
+ "rawSpec": "^3.0.2",
+ "saveSpec": null,
+ "fetchSpec": "^3.0.2"
+ },
+ "_requiredBy": [
+ "/eslint/restore-cursor"
+ ],
+ "_resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
+ "_shasum": "b5fdc08f1287ea1178628e415e25132b73646c6d",
+ "_spec": "signal-exit@^3.0.2",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/restore-cursor",
+ "author": {
+ "name": "Ben Coe",
+ "email": "ben@npmjs.com"
+ },
+ "bugs": {
+ "url": "https://github.com/tapjs/signal-exit/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "when you want to fire an event no matter how a process exits.",
+ "devDependencies": {
+ "chai": "^3.5.0",
+ "coveralls": "^2.11.10",
+ "nyc": "^8.1.0",
+ "standard": "^7.1.2",
+ "standard-version": "^2.3.0",
+ "tap": "^8.0.1"
+ },
+ "files": [
+ "index.js",
+ "signals.js"
+ ],
+ "homepage": "https://github.com/tapjs/signal-exit",
+ "keywords": [
+ "signal",
+ "exit"
+ ],
+ "license": "ISC",
+ "main": "index.js",
+ "name": "signal-exit",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/tapjs/signal-exit.git"
+ },
+ "scripts": {
+ "coverage": "nyc report --reporter=text-lcov | coveralls",
+ "pretest": "standard",
+ "release": "standard-version",
+ "test": "tap --timeout=240 ./test/*.js --cov"
+ },
+ "version": "3.0.2"
+}
diff --git a/tools/node_modules/eslint/node_modules/signal-exit/signals.js b/tools/node_modules/eslint/node_modules/signal-exit/signals.js
new file mode 100644
index 0000000000..3bd67a8a55
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/signal-exit/signals.js
@@ -0,0 +1,53 @@
+// This is not the set of all possible signals.
+//
+// It IS, however, the set of all signals that trigger
+// an exit on either Linux or BSD systems. Linux is a
+// superset of the signal names supported on BSD, and
+// the unknown signals just fail to register, so we can
+// catch that easily enough.
+//
+// Don't bother with SIGKILL. It's uncatchable, which
+// means that we can't fire any callbacks anyway.
+//
+// If a user does happen to register a handler on a non-
+// fatal signal like SIGWINCH or something, and then
+// exit, it'll end up firing `process.emit('exit')`, so
+// the handler will be fired anyway.
+//
+// SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised
+// artificially, inherently leave the process in a
+// state from which it is not safe to try and enter JS
+// listeners.
+module.exports = [
+ 'SIGABRT',
+ 'SIGALRM',
+ 'SIGHUP',
+ 'SIGINT',
+ 'SIGTERM'
+]
+
+if (process.platform !== 'win32') {
+ module.exports.push(
+ 'SIGVTALRM',
+ 'SIGXCPU',
+ 'SIGXFSZ',
+ 'SIGUSR2',
+ 'SIGTRAP',
+ 'SIGSYS',
+ 'SIGQUIT',
+ 'SIGIOT'
+ // should detect profiler and enable/disable accordingly.
+ // see #21
+ // 'SIGPROF'
+ )
+}
+
+if (process.platform === 'linux') {
+ module.exports.push(
+ 'SIGIO',
+ 'SIGPOLL',
+ 'SIGPWR',
+ 'SIGSTKFLT',
+ 'SIGUNUSED'
+ )
+}
diff --git a/tools/node_modules/eslint/node_modules/slice-ansi/index.js b/tools/node_modules/eslint/node_modules/slice-ansi/index.js
new file mode 100755
index 0000000000..634ee9c7be
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/slice-ansi/index.js
@@ -0,0 +1,88 @@
+'use strict';
+const isFullwidthCodePoint = require('is-fullwidth-code-point');
+
+const ESCAPES = [
+ '\u001B',
+ '\u009B'
+];
+
+const END_CODE = 39;
+const ASTRAL_REGEX = /[\uD800-\uDBFF][\uDC00-\uDFFF]/;
+
+const ESCAPE_CODES = new Map([
+ [0, 0],
+ [1, 22],
+ [2, 22],
+ [3, 23],
+ [4, 24],
+ [7, 27],
+ [8, 28],
+ [9, 29],
+ [30, 39],
+ [31, 39],
+ [32, 39],
+ [33, 39],
+ [34, 39],
+ [35, 39],
+ [36, 39],
+ [37, 39],
+ [90, 39],
+ [40, 49],
+ [41, 49],
+ [42, 49],
+ [43, 49],
+ [44, 49],
+ [45, 49],
+ [46, 49],
+ [47, 49]
+]);
+
+const wrapAnsi = code => `${ESCAPES[0]}[${code}m`;
+
+module.exports = (str, begin, end) => {
+ const arr = Array.from(str.normalize());
+
+ end = typeof end === 'number' ? end : arr.length;
+
+ let insideEscape = false;
+ let escapeCode;
+ let visible = 0;
+ let output = '';
+
+ for (const item of arr.entries()) {
+ const i = item[0];
+ const x = item[1];
+
+ let leftEscape = false;
+
+ if (ESCAPES.indexOf(x) !== -1) {
+ insideEscape = true;
+ const code = /\d[^m]*/.exec(str.slice(i, i + 4));
+ escapeCode = code === END_CODE ? null : code;
+ } else if (insideEscape && x === 'm') {
+ insideEscape = false;
+ leftEscape = true;
+ }
+
+ if (!insideEscape && !leftEscape) {
+ ++visible;
+ }
+
+ if (!ASTRAL_REGEX.test(x) && isFullwidthCodePoint(x.codePointAt())) {
+ ++visible;
+ }
+
+ if (visible > begin && visible <= end) {
+ output += x;
+ } else if (visible === begin && !insideEscape && escapeCode !== undefined && escapeCode !== END_CODE) {
+ output += wrapAnsi(escapeCode);
+ } else if (visible >= end) {
+ if (escapeCode !== undefined) {
+ output += wrapAnsi(ESCAPE_CODES.get(parseInt(escapeCode, 10)) || END_CODE);
+ }
+ break;
+ }
+ }
+
+ return output;
+};
diff --git a/tools/node_modules/eslint/node_modules/slice-ansi/license b/tools/node_modules/eslint/node_modules/slice-ansi/license
new file mode 100644
index 0000000000..4d726339ce
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/slice-ansi/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) DC <threedeecee@gmail.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/tools/node_modules/eslint/node_modules/slice-ansi/package.json b/tools/node_modules/eslint/node_modules/slice-ansi/package.json
new file mode 100644
index 0000000000..be6b2e4bc5
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/slice-ansi/package.json
@@ -0,0 +1,85 @@
+{
+ "_from": "slice-ansi@1.0.0",
+ "_id": "slice-ansi@1.0.0",
+ "_inBundle": false,
+ "_integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==",
+ "_location": "/eslint/slice-ansi",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "slice-ansi@1.0.0",
+ "name": "slice-ansi",
+ "escapedName": "slice-ansi",
+ "rawSpec": "1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "1.0.0"
+ },
+ "_requiredBy": [
+ "/eslint/table"
+ ],
+ "_resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz",
+ "_shasum": "044f1a49d8842ff307aad6b505ed178bd950134d",
+ "_spec": "slice-ansi@1.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/table",
+ "author": {
+ "name": "David Caccavella",
+ "email": "threedeecee@gmail.com"
+ },
+ "bugs": {
+ "url": "https://github.com/chalk/slice-ansi/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "is-fullwidth-code-point": "^2.0.0"
+ },
+ "deprecated": false,
+ "description": "Slice a string with ANSI escape codes",
+ "devDependencies": {
+ "ava": "*",
+ "chalk": "^2.0.1",
+ "random-item": "^1.0.0",
+ "strip-ansi": "^4.0.0",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/chalk/slice-ansi#readme",
+ "keywords": [
+ "slice",
+ "string",
+ "ansi",
+ "styles",
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "cli",
+ "tty",
+ "escape",
+ "formatting",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "log",
+ "logging",
+ "command-line",
+ "text"
+ ],
+ "license": "MIT",
+ "name": "slice-ansi",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/chalk/slice-ansi.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "1.0.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/slice-ansi/readme.md b/tools/node_modules/eslint/node_modules/slice-ansi/readme.md
new file mode 100755
index 0000000000..628eed2e50
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/slice-ansi/readme.md
@@ -0,0 +1,64 @@
+# slice-ansi [![Build Status](https://travis-ci.org/chalk/slice-ansi.svg?branch=master)](https://travis-ci.org/chalk/slice-ansi) [![XO: Linted](https://img.shields.io/badge/xo-linted-blue.svg)](https://github.com/sindresorhus/xo)
+
+> Slice a string with [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles)
+
+
+## Install
+
+```
+$ npm install slice-ansi
+```
+
+
+## Usage
+
+```js
+const chalk = require('chalk');
+const sliceAnsi = require('slice-ansi');
+
+const input = 'The quick brown ' + chalk.red('fox jumped over ') +
+ 'the lazy ' + chalk.green('dog and then ran away with the unicorn.');
+
+console.log(sliceAnsi(input, 20, 30));
+```
+
+
+## API
+
+### sliceAnsi(input, beginSlice, [endSlice])
+
+#### input
+
+Type: `string`
+
+String with ANSI escape codes. Like one styled by [`chalk`](https://github.com/chalk/chalk).
+
+#### beginSlice
+
+Type: `number`
+
+Zero-based index at which to begin the slice.
+
+#### endSlice
+
+Type: `number`
+
+Zero-based index at which to end the slice.
+
+
+## Related
+
+- [wrap-ansi](https://github.com/chalk/wrap-ansi) - Wordwrap a string with ANSI escape codes
+- [cli-truncate](https://github.com/sindresorhus/cli-truncate) - Truncate a string to a specific width in the terminal
+- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
+
+
+## Maintainers
+
+- [Sindre Sorhus](https://github.com/sindresorhus)
+- [Josh Junon](https://github.com/qix-)
+
+
+## License
+
+MIT
diff --git a/tools/node_modules/eslint/node_modules/sprintf-js/LICENSE b/tools/node_modules/eslint/node_modules/sprintf-js/LICENSE
new file mode 100644
index 0000000000..663ac52e4d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/sprintf-js/LICENSE
@@ -0,0 +1,24 @@
+Copyright (c) 2007-2014, Alexandru Marasteanu <hello [at) alexei (dot] ro>
+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 this software 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 AUTHORS OR COPYRIGHT HOLDERS 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/tools/node_modules/eslint/node_modules/sprintf-js/README.md b/tools/node_modules/eslint/node_modules/sprintf-js/README.md
new file mode 100644
index 0000000000..83863561b2
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/sprintf-js/README.md
@@ -0,0 +1,88 @@
+# sprintf.js
+**sprintf.js** is a complete open source JavaScript sprintf implementation for the *browser* and *node.js*.
+
+Its prototype is simple:
+
+ string sprintf(string format , [mixed arg1 [, mixed arg2 [ ,...]]])
+
+The placeholders in the format string are marked by `%` and are followed by one or more of these elements, in this order:
+
+* An optional number followed by a `$` sign that selects which argument index to use for the value. If not specified, arguments will be placed in the same order as the placeholders in the input string.
+* An optional `+` sign that forces to preceed the result with a plus or minus sign on numeric values. By default, only the `-` sign is used on negative numbers.
+* An optional padding specifier that says what character to use for padding (if specified). Possible values are `0` or any other character precedeed by a `'` (single quote). The default is to pad with *spaces*.
+* An optional `-` sign, that causes sprintf to left-align the result of this placeholder. The default is to right-align the result.
+* An optional number, that says how many characters the result should have. If the value to be returned is shorter than this number, the result will be padded. When used with the `j` (JSON) type specifier, the padding length specifies the tab size used for indentation.
+* An optional precision modifier, consisting of a `.` (dot) followed by a number, that says how many digits should be displayed for floating point numbers. When used with the `g` type specifier, it specifies the number of significant digits. When used on a string, it causes the result to be truncated.
+* A type specifier that can be any of:
+ * `%` — yields a literal `%` character
+ * `b` — yields an integer as a binary number
+ * `c` — yields an integer as the character with that ASCII value
+ * `d` or `i` — yields an integer as a signed decimal number
+ * `e` — yields a float using scientific notation
+ * `u` — yields an integer as an unsigned decimal number
+ * `f` — yields a float as is; see notes on precision above
+ * `g` — yields a float as is; see notes on precision above
+ * `o` — yields an integer as an octal number
+ * `s` — yields a string as is
+ * `x` — yields an integer as a hexadecimal number (lower-case)
+ * `X` — yields an integer as a hexadecimal number (upper-case)
+ * `j` — yields a JavaScript object or array as a JSON encoded string
+
+## JavaScript `vsprintf`
+`vsprintf` is the same as `sprintf` except that it accepts an array of arguments, rather than a variable number of arguments:
+
+ vsprintf("The first 4 letters of the english alphabet are: %s, %s, %s and %s", ["a", "b", "c", "d"])
+
+## Argument swapping
+You can also swap the arguments. That is, the order of the placeholders doesn't have to match the order of the arguments. You can do that by simply indicating in the format string which arguments the placeholders refer to:
+
+ sprintf("%2$s %3$s a %1$s", "cracker", "Polly", "wants")
+And, of course, you can repeat the placeholders without having to increase the number of arguments.
+
+## Named arguments
+Format strings may contain replacement fields rather than positional placeholders. Instead of referring to a certain argument, you can now refer to a certain key within an object. Replacement fields are surrounded by rounded parentheses - `(` and `)` - and begin with a keyword that refers to a key:
+
+ var user = {
+ name: "Dolly"
+ }
+ sprintf("Hello %(name)s", user) // Hello Dolly
+Keywords in replacement fields can be optionally followed by any number of keywords or indexes:
+
+ var users = [
+ {name: "Dolly"},
+ {name: "Molly"},
+ {name: "Polly"}
+ ]
+ sprintf("Hello %(users[0].name)s, %(users[1].name)s and %(users[2].name)s", {users: users}) // Hello Dolly, Molly and Polly
+Note: mixing positional and named placeholders is not (yet) supported
+
+## Computed values
+You can pass in a function as a dynamic value and it will be invoked (with no arguments) in order to compute the value on-the-fly.
+
+ sprintf("Current timestamp: %d", Date.now) // Current timestamp: 1398005382890
+ sprintf("Current date and time: %s", function() { return new Date().toString() })
+
+# AngularJS
+You can now use `sprintf` and `vsprintf` (also aliased as `fmt` and `vfmt` respectively) in your AngularJS projects. See `demo/`.
+
+# Installation
+
+## Via Bower
+
+ bower install sprintf
+
+## Or as a node.js module
+
+ npm install sprintf-js
+
+### Usage
+
+ var sprintf = require("sprintf-js").sprintf,
+ vsprintf = require("sprintf-js").vsprintf
+
+ sprintf("%2$s %3$s a %1$s", "cracker", "Polly", "wants")
+ vsprintf("The first 4 letters of the english alphabet are: %s, %s, %s and %s", ["a", "b", "c", "d"])
+
+# License
+
+**sprintf.js** is licensed under the terms of the 3-clause BSD license.
diff --git a/tools/node_modules/eslint/node_modules/sprintf-js/dist/angular-sprintf.min.js b/tools/node_modules/eslint/node_modules/sprintf-js/dist/angular-sprintf.min.js
new file mode 100644
index 0000000000..dbaf744d83
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/sprintf-js/dist/angular-sprintf.min.js
@@ -0,0 +1,4 @@
+/*! sprintf-js | Alexandru Marasteanu <hello@alexei.ro> (http://alexei.ro/) | BSD-3-Clause */
+
+angular.module("sprintf",[]).filter("sprintf",function(){return function(){return sprintf.apply(null,arguments)}}).filter("fmt",["$filter",function(a){return a("sprintf")}]).filter("vsprintf",function(){return function(a,b){return vsprintf(a,b)}}).filter("vfmt",["$filter",function(a){return a("vsprintf")}]);
+//# sourceMappingURL=angular-sprintf.min.map \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/sprintf-js/dist/angular-sprintf.min.js.map b/tools/node_modules/eslint/node_modules/sprintf-js/dist/angular-sprintf.min.js.map
new file mode 100644
index 0000000000..055964c624
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/sprintf-js/dist/angular-sprintf.min.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"angular-sprintf.min.js","sources":["../src/angular-sprintf.js"],"names":["angular","module","filter","sprintf","apply","arguments","$filter","format","argv","vsprintf"],"mappings":";;AAAAA,QACIC,OAAO,cACPC,OAAO,UAAW,WACd,MAAO,YACH,MAAOC,SAAQC,MAAM,KAAMC,cAGnCH,OAAO,OAAQ,UAAW,SAASI,GAC/B,MAAOA,GAAQ,cAEnBJ,OAAO,WAAY,WACf,MAAO,UAASK,EAAQC,GACpB,MAAOC,UAASF,EAAQC,MAGhCN,OAAO,QAAS,UAAW,SAASI,GAChC,MAAOA,GAAQ"} \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/sprintf-js/dist/angular-sprintf.min.map b/tools/node_modules/eslint/node_modules/sprintf-js/dist/angular-sprintf.min.map
new file mode 100644
index 0000000000..055964c624
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/sprintf-js/dist/angular-sprintf.min.map
@@ -0,0 +1 @@
+{"version":3,"file":"angular-sprintf.min.js","sources":["../src/angular-sprintf.js"],"names":["angular","module","filter","sprintf","apply","arguments","$filter","format","argv","vsprintf"],"mappings":";;AAAAA,QACIC,OAAO,cACPC,OAAO,UAAW,WACd,MAAO,YACH,MAAOC,SAAQC,MAAM,KAAMC,cAGnCH,OAAO,OAAQ,UAAW,SAASI,GAC/B,MAAOA,GAAQ,cAEnBJ,OAAO,WAAY,WACf,MAAO,UAASK,EAAQC,GACpB,MAAOC,UAASF,EAAQC,MAGhCN,OAAO,QAAS,UAAW,SAASI,GAChC,MAAOA,GAAQ"} \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/sprintf-js/dist/sprintf.min.js b/tools/node_modules/eslint/node_modules/sprintf-js/dist/sprintf.min.js
new file mode 100644
index 0000000000..dc61e51add
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/sprintf-js/dist/sprintf.min.js
@@ -0,0 +1,4 @@
+/*! sprintf-js | Alexandru Marasteanu <hello@alexei.ro> (http://alexei.ro/) | BSD-3-Clause */
+
+!function(a){function b(){var a=arguments[0],c=b.cache;return c[a]&&c.hasOwnProperty(a)||(c[a]=b.parse(a)),b.format.call(null,c[a],arguments)}function c(a){return Object.prototype.toString.call(a).slice(8,-1).toLowerCase()}function d(a,b){return Array(b+1).join(a)}var e={not_string:/[^s]/,number:/[diefg]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijosuxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[\+\-]/};b.format=function(a,f){var g,h,i,j,k,l,m,n=1,o=a.length,p="",q=[],r=!0,s="";for(h=0;o>h;h++)if(p=c(a[h]),"string"===p)q[q.length]=a[h];else if("array"===p){if(j=a[h],j[2])for(g=f[n],i=0;i<j[2].length;i++){if(!g.hasOwnProperty(j[2][i]))throw new Error(b("[sprintf] property '%s' does not exist",j[2][i]));g=g[j[2][i]]}else g=j[1]?f[j[1]]:f[n++];if("function"==c(g)&&(g=g()),e.not_string.test(j[8])&&e.not_json.test(j[8])&&"number"!=c(g)&&isNaN(g))throw new TypeError(b("[sprintf] expecting number but found %s",c(g)));switch(e.number.test(j[8])&&(r=g>=0),j[8]){case"b":g=g.toString(2);break;case"c":g=String.fromCharCode(g);break;case"d":case"i":g=parseInt(g,10);break;case"j":g=JSON.stringify(g,null,j[6]?parseInt(j[6]):0);break;case"e":g=j[7]?g.toExponential(j[7]):g.toExponential();break;case"f":g=j[7]?parseFloat(g).toFixed(j[7]):parseFloat(g);break;case"g":g=j[7]?parseFloat(g).toPrecision(j[7]):parseFloat(g);break;case"o":g=g.toString(8);break;case"s":g=(g=String(g))&&j[7]?g.substring(0,j[7]):g;break;case"u":g>>>=0;break;case"x":g=g.toString(16);break;case"X":g=g.toString(16).toUpperCase()}e.json.test(j[8])?q[q.length]=g:(!e.number.test(j[8])||r&&!j[3]?s="":(s=r?"+":"-",g=g.toString().replace(e.sign,"")),l=j[4]?"0"===j[4]?"0":j[4].charAt(1):" ",m=j[6]-(s+g).length,k=j[6]&&m>0?d(l,m):"",q[q.length]=j[5]?s+g+k:"0"===l?s+k+g:k+s+g)}return q.join("")},b.cache={},b.parse=function(a){for(var b=a,c=[],d=[],f=0;b;){if(null!==(c=e.text.exec(b)))d[d.length]=c[0];else if(null!==(c=e.modulo.exec(b)))d[d.length]="%";else{if(null===(c=e.placeholder.exec(b)))throw new SyntaxError("[sprintf] unexpected placeholder");if(c[2]){f|=1;var g=[],h=c[2],i=[];if(null===(i=e.key.exec(h)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(g[g.length]=i[1];""!==(h=h.substring(i[0].length));)if(null!==(i=e.key_access.exec(h)))g[g.length]=i[1];else{if(null===(i=e.index_access.exec(h)))throw new SyntaxError("[sprintf] failed to parse named argument key");g[g.length]=i[1]}c[2]=g}else f|=2;if(3===f)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");d[d.length]=c}b=b.substring(c[0].length)}return d};var f=function(a,c,d){return d=(c||[]).slice(0),d.splice(0,0,a),b.apply(null,d)};"undefined"!=typeof exports?(exports.sprintf=b,exports.vsprintf=f):(a.sprintf=b,a.vsprintf=f,"function"==typeof define&&define.amd&&define(function(){return{sprintf:b,vsprintf:f}}))}("undefined"==typeof window?this:window);
+//# sourceMappingURL=sprintf.min.map \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/sprintf-js/dist/sprintf.min.js.map b/tools/node_modules/eslint/node_modules/sprintf-js/dist/sprintf.min.js.map
new file mode 100644
index 0000000000..369dbafab1
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/sprintf-js/dist/sprintf.min.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"sprintf.min.js","sources":["../src/sprintf.js"],"names":["window","sprintf","key","arguments","cache","hasOwnProperty","parse","format","call","get_type","variable","Object","prototype","toString","slice","toLowerCase","str_repeat","input","multiplier","Array","join","re","not_string","number","json","not_json","text","modulo","placeholder","key_access","index_access","sign","parse_tree","argv","arg","i","k","match","pad","pad_character","pad_length","cursor","tree_length","length","node_type","output","is_positive","Error","test","isNaN","TypeError","String","fromCharCode","parseInt","JSON","stringify","toExponential","parseFloat","toFixed","substring","toUpperCase","replace","charAt","fmt","_fmt","arg_names","exec","SyntaxError","field_list","replacement_field","field_match","vsprintf","_argv","splice","apply","exports","define","amd","this"],"mappings":";;CAAA,SAAUA,GAeN,QAASC,KACL,GAAIC,GAAMC,UAAU,GAAIC,EAAQH,EAAQG,KAIxC,OAHMA,GAAMF,IAAQE,EAAMC,eAAeH,KACrCE,EAAMF,GAAOD,EAAQK,MAAMJ,IAExBD,EAAQM,OAAOC,KAAK,KAAMJ,EAAMF,GAAMC,WA4JjD,QAASM,GAASC,GACd,MAAOC,QAAOC,UAAUC,SAASL,KAAKE,GAAUI,MAAM,EAAG,IAAIC,cAGjE,QAASC,GAAWC,EAAOC,GACvB,MAAOC,OAAMD,EAAa,GAAGE,KAAKH,GApLtC,GAAII,IACAC,WAAY,OACZC,OAAQ,SACRC,KAAM,MACNC,SAAU,OACVC,KAAM,YACNC,OAAQ,WACRC,YAAa,yFACb1B,IAAK,sBACL2B,WAAY,wBACZC,aAAc,aACdC,KAAM,UAWV9B,GAAQM,OAAS,SAASyB,EAAYC,GAClC,GAAiEC,GAAkBC,EAAGC,EAAGC,EAAOC,EAAKC,EAAeC,EAAhHC,EAAS,EAAGC,EAAcV,EAAWW,OAAQC,EAAY,GAASC,KAA0DC,GAAc,EAAMf,EAAO,EAC3J,KAAKI,EAAI,EAAOO,EAAJP,EAAiBA,IAEzB,GADAS,EAAYnC,EAASuB,EAAWG,IACd,WAAdS,EACAC,EAAOA,EAAOF,QAAUX,EAAWG,OAElC,IAAkB,UAAdS,EAAuB,CAE5B,GADAP,EAAQL,EAAWG,GACfE,EAAM,GAEN,IADAH,EAAMD,EAAKQ,GACNL,EAAI,EAAGA,EAAIC,EAAM,GAAGM,OAAQP,IAAK,CAClC,IAAKF,EAAI7B,eAAegC,EAAM,GAAGD,IAC7B,KAAM,IAAIW,OAAM9C,EAAQ,yCAA0CoC,EAAM,GAAGD,IAE/EF,GAAMA,EAAIG,EAAM,GAAGD,QAIvBF,GADKG,EAAM,GACLJ,EAAKI,EAAM,IAGXJ,EAAKQ,IAOf,IAJqB,YAAjBhC,EAASyB,KACTA,EAAMA,KAGNb,EAAGC,WAAW0B,KAAKX,EAAM,KAAOhB,EAAGI,SAASuB,KAAKX,EAAM,KAAyB,UAAjB5B,EAASyB,IAAoBe,MAAMf,GAClG,KAAM,IAAIgB,WAAUjD,EAAQ,0CAA2CQ,EAASyB,IAOpF,QAJIb,EAAGE,OAAOyB,KAAKX,EAAM,MACrBS,EAAcZ,GAAO,GAGjBG,EAAM,IACV,IAAK,IACDH,EAAMA,EAAIrB,SAAS,EACvB,MACA,KAAK,IACDqB,EAAMiB,OAAOC,aAAalB,EAC9B,MACA,KAAK,IACL,IAAK,IACDA,EAAMmB,SAASnB,EAAK,GACxB,MACA,KAAK,IACDA,EAAMoB,KAAKC,UAAUrB,EAAK,KAAMG,EAAM,GAAKgB,SAAShB,EAAM,IAAM,EACpE,MACA,KAAK,IACDH,EAAMG,EAAM,GAAKH,EAAIsB,cAAcnB,EAAM,IAAMH,EAAIsB,eACvD,MACA,KAAK,IACDtB,EAAMG,EAAM,GAAKoB,WAAWvB,GAAKwB,QAAQrB,EAAM,IAAMoB,WAAWvB,EACpE,MACA,KAAK,IACDA,EAAMA,EAAIrB,SAAS,EACvB,MACA,KAAK,IACDqB,GAAQA,EAAMiB,OAAOjB,KAASG,EAAM,GAAKH,EAAIyB,UAAU,EAAGtB,EAAM,IAAMH,CAC1E,MACA,KAAK,IACDA,KAAc,CAClB,MACA,KAAK,IACDA,EAAMA,EAAIrB,SAAS,GACvB,MACA,KAAK,IACDqB,EAAMA,EAAIrB,SAAS,IAAI+C,cAG3BvC,EAAGG,KAAKwB,KAAKX,EAAM,IACnBQ,EAAOA,EAAOF,QAAUT,IAGpBb,EAAGE,OAAOyB,KAAKX,EAAM,KAASS,IAAeT,EAAM,GAKnDN,EAAO,IAJPA,EAAOe,EAAc,IAAM,IAC3BZ,EAAMA,EAAIrB,WAAWgD,QAAQxC,EAAGU,KAAM,KAK1CQ,EAAgBF,EAAM,GAAkB,MAAbA,EAAM,GAAa,IAAMA,EAAM,GAAGyB,OAAO,GAAK,IACzEtB,EAAaH,EAAM,IAAMN,EAAOG,GAAKS,OACrCL,EAAMD,EAAM,IAAMG,EAAa,EAAIxB,EAAWuB,EAAeC,GAAoB,GACjFK,EAAOA,EAAOF,QAAUN,EAAM,GAAKN,EAAOG,EAAMI,EAAyB,MAAlBC,EAAwBR,EAAOO,EAAMJ,EAAMI,EAAMP,EAAOG,GAI3H,MAAOW,GAAOzB,KAAK,KAGvBnB,EAAQG,SAERH,EAAQK,MAAQ,SAASyD,GAErB,IADA,GAAIC,GAAOD,EAAK1B,KAAYL,KAAiBiC,EAAY,EAClDD,GAAM,CACT,GAAqC,QAAhC3B,EAAQhB,EAAGK,KAAKwC,KAAKF,IACtBhC,EAAWA,EAAWW,QAAUN,EAAM,OAErC,IAAuC,QAAlCA,EAAQhB,EAAGM,OAAOuC,KAAKF,IAC7BhC,EAAWA,EAAWW,QAAU,QAE/B,CAAA,GAA4C,QAAvCN,EAAQhB,EAAGO,YAAYsC,KAAKF,IAgClC,KAAM,IAAIG,aAAY,mCA/BtB,IAAI9B,EAAM,GAAI,CACV4B,GAAa,CACb,IAAIG,MAAiBC,EAAoBhC,EAAM,GAAIiC,IACnD,IAAuD,QAAlDA,EAAcjD,EAAGnB,IAAIgE,KAAKG,IAe3B,KAAM,IAAIF,aAAY,+CAbtB,KADAC,EAAWA,EAAWzB,QAAU2B,EAAY,GACwC,MAA5ED,EAAoBA,EAAkBV,UAAUW,EAAY,GAAG3B,UACnE,GAA8D,QAAzD2B,EAAcjD,EAAGQ,WAAWqC,KAAKG,IAClCD,EAAWA,EAAWzB,QAAU2B,EAAY,OAE3C,CAAA,GAAgE,QAA3DA,EAAcjD,EAAGS,aAAaoC,KAAKG,IAIzC,KAAM,IAAIF,aAAY,+CAHtBC,GAAWA,EAAWzB,QAAU2B,EAAY,GAUxDjC,EAAM,GAAK+B,MAGXH,IAAa,CAEjB,IAAkB,IAAdA,EACA,KAAM,IAAIlB,OAAM,4EAEpBf,GAAWA,EAAWW,QAAUN,EAKpC2B,EAAOA,EAAKL,UAAUtB,EAAM,GAAGM,QAEnC,MAAOX,GAGX,IAAIuC,GAAW,SAASR,EAAK9B,EAAMuC,GAG/B,MAFAA,IAASvC,OAAYnB,MAAM,GAC3B0D,EAAMC,OAAO,EAAG,EAAGV,GACZ9D,EAAQyE,MAAM,KAAMF,GAiBR,oBAAZG,UACPA,QAAQ1E,QAAUA,EAClB0E,QAAQJ,SAAWA,IAGnBvE,EAAOC,QAAUA,EACjBD,EAAOuE,SAAWA,EAEI,kBAAXK,SAAyBA,OAAOC,KACvCD,OAAO,WACH,OACI3E,QAASA,EACTsE,SAAUA,OAKT,mBAAXvE,QAAyB8E,KAAO9E"} \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/sprintf-js/dist/sprintf.min.map b/tools/node_modules/eslint/node_modules/sprintf-js/dist/sprintf.min.map
new file mode 100644
index 0000000000..ee011aaa5a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/sprintf-js/dist/sprintf.min.map
@@ -0,0 +1 @@
+{"version":3,"file":"sprintf.min.js","sources":["../src/sprintf.js"],"names":["window","sprintf","key","arguments","cache","hasOwnProperty","parse","format","call","get_type","variable","Object","prototype","toString","slice","toLowerCase","str_repeat","input","multiplier","Array","join","re","not_string","number","json","not_json","text","modulo","placeholder","key_access","index_access","sign","parse_tree","argv","arg","i","k","match","pad","pad_character","pad_length","cursor","tree_length","length","node_type","output","is_positive","Error","test","isNaN","TypeError","String","fromCharCode","parseInt","JSON","stringify","toExponential","parseFloat","toFixed","toPrecision","substring","toUpperCase","replace","charAt","fmt","_fmt","arg_names","exec","SyntaxError","field_list","replacement_field","field_match","vsprintf","_argv","splice","apply","exports","define","amd","this"],"mappings":";;CAAA,SAAUA,GAeN,QAASC,KACL,GAAIC,GAAMC,UAAU,GAAIC,EAAQH,EAAQG,KAIxC,OAHMA,GAAMF,IAAQE,EAAMC,eAAeH,KACrCE,EAAMF,GAAOD,EAAQK,MAAMJ,IAExBD,EAAQM,OAAOC,KAAK,KAAMJ,EAAMF,GAAMC,WA+JjD,QAASM,GAASC,GACd,MAAOC,QAAOC,UAAUC,SAASL,KAAKE,GAAUI,MAAM,EAAG,IAAIC,cAGjE,QAASC,GAAWC,EAAOC,GACvB,MAAOC,OAAMD,EAAa,GAAGE,KAAKH,GAvLtC,GAAII,IACAC,WAAY,OACZC,OAAQ,UACRC,KAAM,MACNC,SAAU,OACVC,KAAM,YACNC,OAAQ,WACRC,YAAa,yFACb1B,IAAK,sBACL2B,WAAY,wBACZC,aAAc,aACdC,KAAM,UAWV9B,GAAQM,OAAS,SAASyB,EAAYC,GAClC,GAAiEC,GAAkBC,EAAGC,EAAGC,EAAOC,EAAKC,EAAeC,EAAhHC,EAAS,EAAGC,EAAcV,EAAWW,OAAQC,EAAY,GAASC,KAA0DC,GAAc,EAAMf,EAAO,EAC3J,KAAKI,EAAI,EAAOO,EAAJP,EAAiBA,IAEzB,GADAS,EAAYnC,EAASuB,EAAWG,IACd,WAAdS,EACAC,EAAOA,EAAOF,QAAUX,EAAWG,OAElC,IAAkB,UAAdS,EAAuB,CAE5B,GADAP,EAAQL,EAAWG,GACfE,EAAM,GAEN,IADAH,EAAMD,EAAKQ,GACNL,EAAI,EAAGA,EAAIC,EAAM,GAAGM,OAAQP,IAAK,CAClC,IAAKF,EAAI7B,eAAegC,EAAM,GAAGD,IAC7B,KAAM,IAAIW,OAAM9C,EAAQ,yCAA0CoC,EAAM,GAAGD,IAE/EF,GAAMA,EAAIG,EAAM,GAAGD,QAIvBF,GADKG,EAAM,GACLJ,EAAKI,EAAM,IAGXJ,EAAKQ,IAOf,IAJqB,YAAjBhC,EAASyB,KACTA,EAAMA,KAGNb,EAAGC,WAAW0B,KAAKX,EAAM,KAAOhB,EAAGI,SAASuB,KAAKX,EAAM,KAAyB,UAAjB5B,EAASyB,IAAoBe,MAAMf,GAClG,KAAM,IAAIgB,WAAUjD,EAAQ,0CAA2CQ,EAASyB,IAOpF,QAJIb,EAAGE,OAAOyB,KAAKX,EAAM,MACrBS,EAAcZ,GAAO,GAGjBG,EAAM,IACV,IAAK,IACDH,EAAMA,EAAIrB,SAAS,EACvB,MACA,KAAK,IACDqB,EAAMiB,OAAOC,aAAalB,EAC9B,MACA,KAAK,IACL,IAAK,IACDA,EAAMmB,SAASnB,EAAK,GACxB,MACA,KAAK,IACDA,EAAMoB,KAAKC,UAAUrB,EAAK,KAAMG,EAAM,GAAKgB,SAAShB,EAAM,IAAM,EACpE,MACA,KAAK,IACDH,EAAMG,EAAM,GAAKH,EAAIsB,cAAcnB,EAAM,IAAMH,EAAIsB,eACvD,MACA,KAAK,IACDtB,EAAMG,EAAM,GAAKoB,WAAWvB,GAAKwB,QAAQrB,EAAM,IAAMoB,WAAWvB,EACpE,MACA,KAAK,IACDA,EAAMG,EAAM,GAAKoB,WAAWvB,GAAKyB,YAAYtB,EAAM,IAAMoB,WAAWvB,EACxE,MACA,KAAK,IACDA,EAAMA,EAAIrB,SAAS,EACvB,MACA,KAAK,IACDqB,GAAQA,EAAMiB,OAAOjB,KAASG,EAAM,GAAKH,EAAI0B,UAAU,EAAGvB,EAAM,IAAMH,CAC1E,MACA,KAAK,IACDA,KAAc,CAClB,MACA,KAAK,IACDA,EAAMA,EAAIrB,SAAS,GACvB,MACA,KAAK,IACDqB,EAAMA,EAAIrB,SAAS,IAAIgD,cAG3BxC,EAAGG,KAAKwB,KAAKX,EAAM,IACnBQ,EAAOA,EAAOF,QAAUT,IAGpBb,EAAGE,OAAOyB,KAAKX,EAAM,KAASS,IAAeT,EAAM,GAKnDN,EAAO,IAJPA,EAAOe,EAAc,IAAM,IAC3BZ,EAAMA,EAAIrB,WAAWiD,QAAQzC,EAAGU,KAAM,KAK1CQ,EAAgBF,EAAM,GAAkB,MAAbA,EAAM,GAAa,IAAMA,EAAM,GAAG0B,OAAO,GAAK,IACzEvB,EAAaH,EAAM,IAAMN,EAAOG,GAAKS,OACrCL,EAAMD,EAAM,IAAMG,EAAa,EAAIxB,EAAWuB,EAAeC,GAAoB,GACjFK,EAAOA,EAAOF,QAAUN,EAAM,GAAKN,EAAOG,EAAMI,EAAyB,MAAlBC,EAAwBR,EAAOO,EAAMJ,EAAMI,EAAMP,EAAOG,GAI3H,MAAOW,GAAOzB,KAAK,KAGvBnB,EAAQG,SAERH,EAAQK,MAAQ,SAAS0D,GAErB,IADA,GAAIC,GAAOD,EAAK3B,KAAYL,KAAiBkC,EAAY,EAClDD,GAAM,CACT,GAAqC,QAAhC5B,EAAQhB,EAAGK,KAAKyC,KAAKF,IACtBjC,EAAWA,EAAWW,QAAUN,EAAM,OAErC,IAAuC,QAAlCA,EAAQhB,EAAGM,OAAOwC,KAAKF,IAC7BjC,EAAWA,EAAWW,QAAU,QAE/B,CAAA,GAA4C,QAAvCN,EAAQhB,EAAGO,YAAYuC,KAAKF,IAgClC,KAAM,IAAIG,aAAY,mCA/BtB,IAAI/B,EAAM,GAAI,CACV6B,GAAa,CACb,IAAIG,MAAiBC,EAAoBjC,EAAM,GAAIkC,IACnD,IAAuD,QAAlDA,EAAclD,EAAGnB,IAAIiE,KAAKG,IAe3B,KAAM,IAAIF,aAAY,+CAbtB,KADAC,EAAWA,EAAW1B,QAAU4B,EAAY,GACwC,MAA5ED,EAAoBA,EAAkBV,UAAUW,EAAY,GAAG5B,UACnE,GAA8D,QAAzD4B,EAAclD,EAAGQ,WAAWsC,KAAKG,IAClCD,EAAWA,EAAW1B,QAAU4B,EAAY,OAE3C,CAAA,GAAgE,QAA3DA,EAAclD,EAAGS,aAAaqC,KAAKG,IAIzC,KAAM,IAAIF,aAAY,+CAHtBC,GAAWA,EAAW1B,QAAU4B,EAAY,GAUxDlC,EAAM,GAAKgC,MAGXH,IAAa,CAEjB,IAAkB,IAAdA,EACA,KAAM,IAAInB,OAAM,4EAEpBf,GAAWA,EAAWW,QAAUN,EAKpC4B,EAAOA,EAAKL,UAAUvB,EAAM,GAAGM,QAEnC,MAAOX,GAGX,IAAIwC,GAAW,SAASR,EAAK/B,EAAMwC,GAG/B,MAFAA,IAASxC,OAAYnB,MAAM,GAC3B2D,EAAMC,OAAO,EAAG,EAAGV,GACZ/D,EAAQ0E,MAAM,KAAMF,GAiBR,oBAAZG,UACPA,QAAQ3E,QAAUA,EAClB2E,QAAQJ,SAAWA,IAGnBxE,EAAOC,QAAUA,EACjBD,EAAOwE,SAAWA,EAEI,kBAAXK,SAAyBA,OAAOC,KACvCD,OAAO,WACH,OACI5E,QAASA,EACTuE,SAAUA,OAKT,mBAAXxE,QAAyB+E,KAAO/E"} \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/sprintf-js/package.json b/tools/node_modules/eslint/node_modules/sprintf-js/package.json
new file mode 100644
index 0000000000..2d56380654
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/sprintf-js/package.json
@@ -0,0 +1,54 @@
+{
+ "_from": "sprintf-js@~1.0.2",
+ "_id": "sprintf-js@1.0.3",
+ "_inBundle": false,
+ "_integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
+ "_location": "/eslint/sprintf-js",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "sprintf-js@~1.0.2",
+ "name": "sprintf-js",
+ "escapedName": "sprintf-js",
+ "rawSpec": "~1.0.2",
+ "saveSpec": null,
+ "fetchSpec": "~1.0.2"
+ },
+ "_requiredBy": [
+ "/eslint/argparse"
+ ],
+ "_resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
+ "_shasum": "04e6926f662895354f3dd015203633b857297e2c",
+ "_spec": "sprintf-js@~1.0.2",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/argparse",
+ "author": {
+ "name": "Alexandru Marasteanu",
+ "email": "hello@alexei.ro",
+ "url": "http://alexei.ro/"
+ },
+ "bugs": {
+ "url": "https://github.com/alexei/sprintf.js/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "JavaScript sprintf implementation",
+ "devDependencies": {
+ "grunt": "*",
+ "grunt-contrib-uglify": "*",
+ "grunt-contrib-watch": "*",
+ "mocha": "*"
+ },
+ "homepage": "https://github.com/alexei/sprintf.js#readme",
+ "license": "BSD-3-Clause",
+ "main": "src/sprintf.js",
+ "name": "sprintf-js",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/alexei/sprintf.js.git"
+ },
+ "scripts": {
+ "test": "mocha test/test.js"
+ },
+ "version": "1.0.3"
+}
diff --git a/tools/node_modules/eslint/node_modules/sprintf-js/src/angular-sprintf.js b/tools/node_modules/eslint/node_modules/sprintf-js/src/angular-sprintf.js
new file mode 100644
index 0000000000..9c69123bea
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/sprintf-js/src/angular-sprintf.js
@@ -0,0 +1,18 @@
+angular.
+ module("sprintf", []).
+ filter("sprintf", function() {
+ return function() {
+ return sprintf.apply(null, arguments)
+ }
+ }).
+ filter("fmt", ["$filter", function($filter) {
+ return $filter("sprintf")
+ }]).
+ filter("vsprintf", function() {
+ return function(format, argv) {
+ return vsprintf(format, argv)
+ }
+ }).
+ filter("vfmt", ["$filter", function($filter) {
+ return $filter("vsprintf")
+ }])
diff --git a/tools/node_modules/eslint/node_modules/sprintf-js/src/sprintf.js b/tools/node_modules/eslint/node_modules/sprintf-js/src/sprintf.js
new file mode 100644
index 0000000000..c0fc7c08b2
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/sprintf-js/src/sprintf.js
@@ -0,0 +1,208 @@
+(function(window) {
+ var re = {
+ not_string: /[^s]/,
+ number: /[diefg]/,
+ json: /[j]/,
+ not_json: /[^j]/,
+ text: /^[^\x25]+/,
+ modulo: /^\x25{2}/,
+ placeholder: /^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijosuxX])/,
+ key: /^([a-z_][a-z_\d]*)/i,
+ key_access: /^\.([a-z_][a-z_\d]*)/i,
+ index_access: /^\[(\d+)\]/,
+ sign: /^[\+\-]/
+ }
+
+ function sprintf() {
+ var key = arguments[0], cache = sprintf.cache
+ if (!(cache[key] && cache.hasOwnProperty(key))) {
+ cache[key] = sprintf.parse(key)
+ }
+ return sprintf.format.call(null, cache[key], arguments)
+ }
+
+ sprintf.format = function(parse_tree, argv) {
+ var cursor = 1, tree_length = parse_tree.length, node_type = "", arg, output = [], i, k, match, pad, pad_character, pad_length, is_positive = true, sign = ""
+ for (i = 0; i < tree_length; i++) {
+ node_type = get_type(parse_tree[i])
+ if (node_type === "string") {
+ output[output.length] = parse_tree[i]
+ }
+ else if (node_type === "array") {
+ match = parse_tree[i] // convenience purposes only
+ if (match[2]) { // keyword argument
+ arg = argv[cursor]
+ for (k = 0; k < match[2].length; k++) {
+ if (!arg.hasOwnProperty(match[2][k])) {
+ throw new Error(sprintf("[sprintf] property '%s' does not exist", match[2][k]))
+ }
+ arg = arg[match[2][k]]
+ }
+ }
+ else if (match[1]) { // positional argument (explicit)
+ arg = argv[match[1]]
+ }
+ else { // positional argument (implicit)
+ arg = argv[cursor++]
+ }
+
+ if (get_type(arg) == "function") {
+ arg = arg()
+ }
+
+ if (re.not_string.test(match[8]) && re.not_json.test(match[8]) && (get_type(arg) != "number" && isNaN(arg))) {
+ throw new TypeError(sprintf("[sprintf] expecting number but found %s", get_type(arg)))
+ }
+
+ if (re.number.test(match[8])) {
+ is_positive = arg >= 0
+ }
+
+ switch (match[8]) {
+ case "b":
+ arg = arg.toString(2)
+ break
+ case "c":
+ arg = String.fromCharCode(arg)
+ break
+ case "d":
+ case "i":
+ arg = parseInt(arg, 10)
+ break
+ case "j":
+ arg = JSON.stringify(arg, null, match[6] ? parseInt(match[6]) : 0)
+ break
+ case "e":
+ arg = match[7] ? arg.toExponential(match[7]) : arg.toExponential()
+ break
+ case "f":
+ arg = match[7] ? parseFloat(arg).toFixed(match[7]) : parseFloat(arg)
+ break
+ case "g":
+ arg = match[7] ? parseFloat(arg).toPrecision(match[7]) : parseFloat(arg)
+ break
+ case "o":
+ arg = arg.toString(8)
+ break
+ case "s":
+ arg = ((arg = String(arg)) && match[7] ? arg.substring(0, match[7]) : arg)
+ break
+ case "u":
+ arg = arg >>> 0
+ break
+ case "x":
+ arg = arg.toString(16)
+ break
+ case "X":
+ arg = arg.toString(16).toUpperCase()
+ break
+ }
+ if (re.json.test(match[8])) {
+ output[output.length] = arg
+ }
+ else {
+ if (re.number.test(match[8]) && (!is_positive || match[3])) {
+ sign = is_positive ? "+" : "-"
+ arg = arg.toString().replace(re.sign, "")
+ }
+ else {
+ sign = ""
+ }
+ pad_character = match[4] ? match[4] === "0" ? "0" : match[4].charAt(1) : " "
+ pad_length = match[6] - (sign + arg).length
+ pad = match[6] ? (pad_length > 0 ? str_repeat(pad_character, pad_length) : "") : ""
+ output[output.length] = match[5] ? sign + arg + pad : (pad_character === "0" ? sign + pad + arg : pad + sign + arg)
+ }
+ }
+ }
+ return output.join("")
+ }
+
+ sprintf.cache = {}
+
+ sprintf.parse = function(fmt) {
+ var _fmt = fmt, match = [], parse_tree = [], arg_names = 0
+ while (_fmt) {
+ if ((match = re.text.exec(_fmt)) !== null) {
+ parse_tree[parse_tree.length] = match[0]
+ }
+ else if ((match = re.modulo.exec(_fmt)) !== null) {
+ parse_tree[parse_tree.length] = "%"
+ }
+ else if ((match = re.placeholder.exec(_fmt)) !== null) {
+ if (match[2]) {
+ arg_names |= 1
+ var field_list = [], replacement_field = match[2], field_match = []
+ if ((field_match = re.key.exec(replacement_field)) !== null) {
+ field_list[field_list.length] = field_match[1]
+ while ((replacement_field = replacement_field.substring(field_match[0].length)) !== "") {
+ if ((field_match = re.key_access.exec(replacement_field)) !== null) {
+ field_list[field_list.length] = field_match[1]
+ }
+ else if ((field_match = re.index_access.exec(replacement_field)) !== null) {
+ field_list[field_list.length] = field_match[1]
+ }
+ else {
+ throw new SyntaxError("[sprintf] failed to parse named argument key")
+ }
+ }
+ }
+ else {
+ throw new SyntaxError("[sprintf] failed to parse named argument key")
+ }
+ match[2] = field_list
+ }
+ else {
+ arg_names |= 2
+ }
+ if (arg_names === 3) {
+ throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported")
+ }
+ parse_tree[parse_tree.length] = match
+ }
+ else {
+ throw new SyntaxError("[sprintf] unexpected placeholder")
+ }
+ _fmt = _fmt.substring(match[0].length)
+ }
+ return parse_tree
+ }
+
+ var vsprintf = function(fmt, argv, _argv) {
+ _argv = (argv || []).slice(0)
+ _argv.splice(0, 0, fmt)
+ return sprintf.apply(null, _argv)
+ }
+
+ /**
+ * helpers
+ */
+ function get_type(variable) {
+ return Object.prototype.toString.call(variable).slice(8, -1).toLowerCase()
+ }
+
+ function str_repeat(input, multiplier) {
+ return Array(multiplier + 1).join(input)
+ }
+
+ /**
+ * export to either browser or node.js
+ */
+ if (typeof exports !== "undefined") {
+ exports.sprintf = sprintf
+ exports.vsprintf = vsprintf
+ }
+ else {
+ window.sprintf = sprintf
+ window.vsprintf = vsprintf
+
+ if (typeof define === "function" && define.amd) {
+ define(function() {
+ return {
+ sprintf: sprintf,
+ vsprintf: vsprintf
+ }
+ })
+ }
+ }
+})(typeof window === "undefined" ? this : window);
diff --git a/tools/node_modules/eslint/node_modules/state-toggle/LICENSE b/tools/node_modules/eslint/node_modules/state-toggle/LICENSE
new file mode 100644
index 0000000000..8d8660d36e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/state-toggle/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2016 Titus Wormer <tituswormer@gmail.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/tools/node_modules/eslint/node_modules/state-toggle/history.md b/tools/node_modules/eslint/node_modules/state-toggle/history.md
new file mode 100644
index 0000000000..f20d503569
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/state-toggle/history.md
@@ -0,0 +1,6 @@
+<!--remark setext-->
+
+<!--lint disable no-multiple-toplevel-headings -->
+
+1.0.0 / 2016-07-16
+==================
diff --git a/tools/node_modules/eslint/node_modules/state-toggle/index.js b/tools/node_modules/eslint/node_modules/state-toggle/index.js
new file mode 100644
index 0000000000..d5aff1857f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/state-toggle/index.js
@@ -0,0 +1,45 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2016 Titus Wormer
+ * @license MIT
+ * @module state-toggle
+ * @fileoverview Enter/exit a state.
+ */
+
+'use strict';
+
+/* eslint-env commonjs */
+
+/* Expose. */
+module.exports = factory;
+
+/**
+ * Construct a state `toggler`: a function which inverses
+ * `property` in context based on its current value.
+ * The by `toggler` returned function restores that value.
+ *
+ * @param {string} key - Property to toggle.
+ * @param {boolean} state - Default state.
+ * @param {Object?} [ctx] - Context object.
+ * @return {Function} - Enter.
+ */
+function factory(key, state, ctx) {
+ /**
+ * Enter a state.
+ *
+ * @return {Function} - Exit state.
+ */
+ return function () {
+ var context = ctx || this;
+ var current = context[key];
+
+ context[key] = !state;
+
+ /**
+ * Cancel state to its value before entering.
+ */
+ return function () {
+ context[key] = current;
+ };
+ };
+}
diff --git a/tools/node_modules/eslint/node_modules/state-toggle/package.json b/tools/node_modules/eslint/node_modules/state-toggle/package.json
new file mode 100644
index 0000000000..81b7c116ad
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/state-toggle/package.json
@@ -0,0 +1,107 @@
+{
+ "_from": "state-toggle@^1.0.0",
+ "_id": "state-toggle@1.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-0g+aYWu08MO5i5GSLSW2QKorxCU=",
+ "_location": "/state-toggle",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "state-toggle@^1.0.0",
+ "name": "state-toggle",
+ "escapedName": "state-toggle",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/remark-parse"
+ ],
+ "_resolved": "https://registry.npmjs.org/state-toggle/-/state-toggle-1.0.0.tgz",
+ "_shasum": "d20f9a616bb4f0c3b98b91922d25b640aa2bc425",
+ "_spec": "state-toggle@^1.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/remark-parse",
+ "author": {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ },
+ "bugs": {
+ "url": "https://github.com/wooorm/state-toggle/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ }
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Enter/exit a state",
+ "devDependencies": {
+ "browserify": "^13.0.1",
+ "esmangle": "^1.0.1",
+ "nyc": "^7.0.0",
+ "remark-cli": "^1.0.0",
+ "remark-comment-config": "^4.0.0",
+ "remark-github": "^5.0.0",
+ "remark-lint": "^4.0.0",
+ "remark-validate-links": "^4.0.0",
+ "tape": "^4.0.0",
+ "xo": "^0.16.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/wooorm/state-toggle#readme",
+ "keywords": [
+ "enter",
+ "exit",
+ "state"
+ ],
+ "license": "MIT",
+ "name": "state-toggle",
+ "nyc": {
+ "check-coverage": true,
+ "lines": 100,
+ "functions": 100,
+ "branches": 100
+ },
+ "remarkConfig": {
+ "output": true,
+ "plugins": [
+ "comment-config",
+ "github",
+ "lint",
+ "validate-links"
+ ],
+ "settings": {
+ "bullet": "*"
+ }
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/wooorm/state-toggle.git"
+ },
+ "scripts": {
+ "build": "npm run build-md && npm run build-bundle && npm run build-mangle",
+ "build-bundle": "browserify index.js --bare -s stateToggle > state-toggle.js",
+ "build-mangle": "esmangle < state-toggle.js > state-toggle.min.js",
+ "build-md": "remark . --quiet --frail",
+ "lint": "xo",
+ "test": "npm run build && npm run lint && npm run test-coverage",
+ "test-api": "node test",
+ "test-coverage": "nyc --reporter lcov tape test.js"
+ },
+ "version": "1.0.0",
+ "xo": {
+ "space": true,
+ "ignores": [
+ "state-toggle.js",
+ "state-toggle.min.js"
+ ]
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/state-toggle/readme.md b/tools/node_modules/eslint/node_modules/state-toggle/readme.md
new file mode 100644
index 0000000000..e2282d113b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/state-toggle/readme.md
@@ -0,0 +1,83 @@
+# state-toggle [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov]
+
+<!--lint disable heading-increment no-duplicate-headings-->
+
+Enter/exit a state.
+
+## Installation
+
+[npm][npm-install]:
+
+```bash
+npm install state-toggle
+```
+
+## Usage
+
+```javascript
+var toggle = require('state-toggle');
+var ctx = {on: false};
+var enter = toggle('on', ctx.on, ctx);
+var exit;
+
+// Entering:
+exit = enter();
+console.log(ctx.on); // true
+
+// Exiting:
+exit();
+console.log(ctx.on); // false
+```
+
+## API
+
+### `toggle(key, initial[, ctx])`
+
+Create a toggle, which when entering toggles `key` on `ctx` (or `this`,
+if `ctx` is not given) to `!initial`, and when exiting, sets `key` on
+the context back to the value it had before entering.
+
+###### Returns
+
+`Function` — [`enter`][enter].
+
+### `enter()`
+
+Enter the state.
+
+###### Context
+
+If no `ctx` was given to `toggle`, the context object (`this`) of `enter()`
+is used to toggle.
+
+###### Returns
+
+`Function` — [`exit`][exit].
+
+### `exit()`
+
+Exit the state, reverting `key` to the value it had before entering.
+
+## License
+
+[MIT][license] © [Titus Wormer][author]
+
+<!-- Definitions -->
+
+[travis-badge]: https://img.shields.io/travis/wooorm/state-toggle.svg
+
+[travis]: https://travis-ci.org/wooorm/state-toggle
+
+[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/state-toggle.svg
+
+[codecov]: https://codecov.io/github/wooorm/state-toggle
+
+[npm-install]: https://docs.npmjs.com/cli/install
+
+[license]: LICENSE
+
+[author]: http://wooorm.com
+
+[enter]: #enter
+
+[exit]: #exit
diff --git a/tools/node_modules/eslint/node_modules/string-width/index.js b/tools/node_modules/eslint/node_modules/string-width/index.js
new file mode 100644
index 0000000000..bbc49d29b1
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/string-width/index.js
@@ -0,0 +1,36 @@
+'use strict';
+const stripAnsi = require('strip-ansi');
+const isFullwidthCodePoint = require('is-fullwidth-code-point');
+
+module.exports = str => {
+ if (typeof str !== 'string' || str.length === 0) {
+ return 0;
+ }
+
+ str = stripAnsi(str);
+
+ let width = 0;
+
+ for (let i = 0; i < str.length; i++) {
+ const code = str.codePointAt(i);
+
+ // Ignore control characters
+ if (code <= 0x1F || (code >= 0x7F && code <= 0x9F)) {
+ continue;
+ }
+
+ // Ignore combining characters
+ if (code >= 0x300 && code <= 0x36F) {
+ continue;
+ }
+
+ // Surrogates
+ if (code > 0xFFFF) {
+ i++;
+ }
+
+ width += isFullwidthCodePoint(code) ? 2 : 1;
+ }
+
+ return width;
+};
diff --git a/tools/node_modules/eslint/node_modules/string-width/license b/tools/node_modules/eslint/node_modules/string-width/license
new file mode 100644
index 0000000000..e7af2f7710
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/string-width/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/tools/node_modules/eslint/node_modules/string-width/package.json b/tools/node_modules/eslint/node_modules/string-width/package.json
new file mode 100644
index 0000000000..aba15e741d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/string-width/package.json
@@ -0,0 +1,88 @@
+{
+ "_from": "string-width@^2.1.0",
+ "_id": "string-width@2.1.1",
+ "_inBundle": false,
+ "_integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
+ "_location": "/eslint/string-width",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "string-width@^2.1.0",
+ "name": "string-width",
+ "escapedName": "string-width",
+ "rawSpec": "^2.1.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.1.0"
+ },
+ "_requiredBy": [
+ "/eslint/inquirer",
+ "/eslint/table"
+ ],
+ "_resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
+ "_shasum": "ab93f27a8dc13d28cac815c462143a6d9012ae9e",
+ "_spec": "string-width@^2.1.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/inquirer",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/string-width/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "is-fullwidth-code-point": "^2.0.0",
+ "strip-ansi": "^4.0.0"
+ },
+ "deprecated": false,
+ "description": "Get the visual width of a string - the number of columns required to display it",
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/string-width#readme",
+ "keywords": [
+ "string",
+ "str",
+ "character",
+ "char",
+ "unicode",
+ "width",
+ "visual",
+ "column",
+ "columns",
+ "fullwidth",
+ "full-width",
+ "full",
+ "ansi",
+ "escape",
+ "codes",
+ "cli",
+ "command-line",
+ "terminal",
+ "console",
+ "cjk",
+ "chinese",
+ "japanese",
+ "korean",
+ "fixed-width"
+ ],
+ "license": "MIT",
+ "name": "string-width",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/string-width.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "2.1.1"
+}
diff --git a/tools/node_modules/eslint/node_modules/string-width/readme.md b/tools/node_modules/eslint/node_modules/string-width/readme.md
new file mode 100644
index 0000000000..df5b7199f9
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/string-width/readme.md
@@ -0,0 +1,42 @@
+# string-width [![Build Status](https://travis-ci.org/sindresorhus/string-width.svg?branch=master)](https://travis-ci.org/sindresorhus/string-width)
+
+> Get the visual width of a string - the number of columns required to display it
+
+Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width.
+
+Useful to be able to measure the actual width of command-line output.
+
+
+## Install
+
+```
+$ npm install string-width
+```
+
+
+## Usage
+
+```js
+const stringWidth = require('string-width');
+
+stringWidth('古');
+//=> 2
+
+stringWidth('\u001b[1m古\u001b[22m');
+//=> 2
+
+stringWidth('a');
+//=> 1
+```
+
+
+## Related
+
+- [string-width-cli](https://github.com/sindresorhus/string-width-cli) - CLI for this module
+- [string-length](https://github.com/sindresorhus/string-length) - Get the real length of a string
+- [widest-line](https://github.com/sindresorhus/widest-line) - Get the visual width of the widest line in a string
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/tools/node_modules/eslint/node_modules/string_decoder/LICENSE b/tools/node_modules/eslint/node_modules/string_decoder/LICENSE
new file mode 100644
index 0000000000..778edb2073
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/string_decoder/README.md b/tools/node_modules/eslint/node_modules/string_decoder/README.md
new file mode 100644
index 0000000000..dc3a2d2160
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/string_decoder/README.md
@@ -0,0 +1,28 @@
+# 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/)
+
+
+```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/tools/node_modules/eslint/node_modules/string_decoder/lib/string_decoder.js b/tools/node_modules/eslint/node_modules/string_decoder/lib/string_decoder.js
new file mode 100644
index 0000000000..26fb94c349
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/string_decoder/lib/string_decoder.js
@@ -0,0 +1,272 @@
+'use strict';
+
+var Buffer = require('safe-buffer').Buffer;
+
+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 = Buffer.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/tools/node_modules/eslint/node_modules/string_decoder/package.json b/tools/node_modules/eslint/node_modules/string_decoder/package.json
new file mode 100644
index 0000000000..ec6ae42b2f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/string_decoder/package.json
@@ -0,0 +1,56 @@
+{
+ "_from": "string_decoder@~1.0.3",
+ "_id": "string_decoder@1.0.3",
+ "_inBundle": false,
+ "_integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
+ "_location": "/eslint/string_decoder",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "string_decoder@~1.0.3",
+ "name": "string_decoder",
+ "escapedName": "string_decoder",
+ "rawSpec": "~1.0.3",
+ "saveSpec": null,
+ "fetchSpec": "~1.0.3"
+ },
+ "_requiredBy": [
+ "/eslint/readable-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
+ "_shasum": "0fc67d7c141825de94282dd536bec6b9bce860ab",
+ "_spec": "string_decoder@~1.0.3",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/readable-stream",
+ "bugs": {
+ "url": "https://github.com/rvagg/string_decoder/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "safe-buffer": "~5.1.0"
+ },
+ "deprecated": false,
+ "description": "The string_decoder module from Node core",
+ "devDependencies": {
+ "babel-polyfill": "^6.23.0",
+ "tap": "~0.4.8"
+ },
+ "homepage": "https://github.com/rvagg/string_decoder",
+ "keywords": [
+ "string",
+ "decoder",
+ "browser",
+ "browserify"
+ ],
+ "license": "MIT",
+ "main": "lib/string_decoder.js",
+ "name": "string_decoder",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/rvagg/string_decoder.git"
+ },
+ "scripts": {
+ "test": "tap test/parallel/*.js && node test/verify-dependencies"
+ },
+ "version": "1.0.3"
+}
diff --git a/tools/node_modules/eslint/node_modules/strip-ansi/index.js b/tools/node_modules/eslint/node_modules/strip-ansi/index.js
new file mode 100644
index 0000000000..96e0292c8e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/strip-ansi/index.js
@@ -0,0 +1,4 @@
+'use strict';
+const ansiRegex = require('ansi-regex');
+
+module.exports = input => typeof input === 'string' ? input.replace(ansiRegex(), '') : input;
diff --git a/tools/node_modules/eslint/node_modules/strip-ansi/license b/tools/node_modules/eslint/node_modules/strip-ansi/license
new file mode 100644
index 0000000000..e7af2f7710
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/strip-ansi/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/tools/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/index.js b/tools/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/index.js
new file mode 100644
index 0000000000..c4aaecf505
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/index.js
@@ -0,0 +1,10 @@
+'use strict';
+
+module.exports = () => {
+ const pattern = [
+ '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)',
+ '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))'
+ ].join('|');
+
+ return new RegExp(pattern, 'g');
+};
diff --git a/tools/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/license b/tools/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/license
new file mode 100644
index 0000000000..e7af2f7710
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/tools/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/package.json b/tools/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/package.json
new file mode 100644
index 0000000000..cbbaa76ab5
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/package.json
@@ -0,0 +1,85 @@
+{
+ "_from": "ansi-regex@^3.0.0",
+ "_id": "ansi-regex@3.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
+ "_location": "/eslint/strip-ansi/ansi-regex",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "ansi-regex@^3.0.0",
+ "name": "ansi-regex",
+ "escapedName": "ansi-regex",
+ "rawSpec": "^3.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^3.0.0"
+ },
+ "_requiredBy": [
+ "/eslint/strip-ansi"
+ ],
+ "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
+ "_shasum": "ed0317c322064f79466c02966bddb605ab37d998",
+ "_spec": "ansi-regex@^3.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/strip-ansi",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/chalk/ansi-regex/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Regular expression for matching ANSI escape codes",
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/chalk/ansi-regex#readme",
+ "keywords": [
+ "ansi",
+ "styles",
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "cli",
+ "string",
+ "tty",
+ "escape",
+ "formatting",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "command-line",
+ "text",
+ "regex",
+ "regexp",
+ "re",
+ "match",
+ "test",
+ "find",
+ "pattern"
+ ],
+ "license": "MIT",
+ "name": "ansi-regex",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/chalk/ansi-regex.git"
+ },
+ "scripts": {
+ "test": "xo && ava",
+ "view-supported": "node fixtures/view-codes.js"
+ },
+ "version": "3.0.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/readme.md b/tools/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/readme.md
new file mode 100644
index 0000000000..22db1c3405
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/readme.md
@@ -0,0 +1,46 @@
+# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex)
+
+> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
+
+
+## Install
+
+```
+$ npm install ansi-regex
+```
+
+
+## Usage
+
+```js
+const ansiRegex = require('ansi-regex');
+
+ansiRegex().test('\u001B[4mcake\u001B[0m');
+//=> true
+
+ansiRegex().test('cake');
+//=> false
+
+'\u001B[4mcake\u001B[0m'.match(ansiRegex());
+//=> ['\u001B[4m', '\u001B[0m']
+```
+
+
+## FAQ
+
+### Why do you test for codes not in the ECMA 48 standard?
+
+Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them.
+
+On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out.
+
+
+## Maintainers
+
+- [Sindre Sorhus](https://github.com/sindresorhus)
+- [Josh Junon](https://github.com/qix-)
+
+
+## License
+
+MIT
diff --git a/tools/node_modules/eslint/node_modules/strip-ansi/package.json b/tools/node_modules/eslint/node_modules/strip-ansi/package.json
new file mode 100644
index 0000000000..0859fa8b81
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/strip-ansi/package.json
@@ -0,0 +1,86 @@
+{
+ "_from": "strip-ansi@^4.0.0",
+ "_id": "strip-ansi@4.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
+ "_location": "/eslint/strip-ansi",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "strip-ansi@^4.0.0",
+ "name": "strip-ansi",
+ "escapedName": "strip-ansi",
+ "rawSpec": "^4.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^4.0.0"
+ },
+ "_requiredBy": [
+ "/eslint",
+ "/eslint/inquirer",
+ "/eslint/string-width"
+ ],
+ "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
+ "_shasum": "a8479022eb1ac368a871389b635262c505ee368f",
+ "_spec": "strip-ansi@^4.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/chalk/strip-ansi/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "ansi-regex": "^3.0.0"
+ },
+ "deprecated": false,
+ "description": "Strip ANSI escape codes",
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/chalk/strip-ansi#readme",
+ "keywords": [
+ "strip",
+ "trim",
+ "remove",
+ "ansi",
+ "styles",
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "string",
+ "tty",
+ "escape",
+ "formatting",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "log",
+ "logging",
+ "command-line",
+ "text"
+ ],
+ "license": "MIT",
+ "name": "strip-ansi",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/chalk/strip-ansi.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "4.0.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/strip-ansi/readme.md b/tools/node_modules/eslint/node_modules/strip-ansi/readme.md
new file mode 100644
index 0000000000..dc76f0cb1a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/strip-ansi/readme.md
@@ -0,0 +1,39 @@
+# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi)
+
+> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
+
+
+## Install
+
+```
+$ npm install strip-ansi
+```
+
+
+## Usage
+
+```js
+const stripAnsi = require('strip-ansi');
+
+stripAnsi('\u001B[4mUnicorn\u001B[0m');
+//=> 'Unicorn'
+```
+
+
+## Related
+
+- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module
+- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes
+- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes
+- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
+
+
+## Maintainers
+
+- [Sindre Sorhus](https://github.com/sindresorhus)
+- [Josh Junon](https://github.com/qix-)
+
+
+## License
+
+MIT
diff --git a/tools/node_modules/eslint/node_modules/strip-json-comments/index.js b/tools/node_modules/eslint/node_modules/strip-json-comments/index.js
new file mode 100644
index 0000000000..4e6576e6d3
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/strip-json-comments/index.js
@@ -0,0 +1,70 @@
+'use strict';
+var singleComment = 1;
+var multiComment = 2;
+
+function stripWithoutWhitespace() {
+ return '';
+}
+
+function stripWithWhitespace(str, start, end) {
+ return str.slice(start, end).replace(/\S/g, ' ');
+}
+
+module.exports = function (str, opts) {
+ opts = opts || {};
+
+ var currentChar;
+ var nextChar;
+ var insideString = false;
+ var insideComment = false;
+ var offset = 0;
+ var ret = '';
+ var strip = opts.whitespace === false ? stripWithoutWhitespace : stripWithWhitespace;
+
+ for (var i = 0; i < str.length; i++) {
+ currentChar = str[i];
+ nextChar = str[i + 1];
+
+ if (!insideComment && currentChar === '"') {
+ var escaped = str[i - 1] === '\\' && str[i - 2] !== '\\';
+ if (!escaped) {
+ insideString = !insideString;
+ }
+ }
+
+ if (insideString) {
+ continue;
+ }
+
+ if (!insideComment && currentChar + nextChar === '//') {
+ ret += str.slice(offset, i);
+ offset = i;
+ insideComment = singleComment;
+ i++;
+ } else if (insideComment === singleComment && currentChar + nextChar === '\r\n') {
+ i++;
+ insideComment = false;
+ ret += strip(str, offset, i);
+ offset = i;
+ continue;
+ } else if (insideComment === singleComment && currentChar === '\n') {
+ insideComment = false;
+ ret += strip(str, offset, i);
+ offset = i;
+ } else if (!insideComment && currentChar + nextChar === '/*') {
+ ret += str.slice(offset, i);
+ offset = i;
+ insideComment = multiComment;
+ i++;
+ continue;
+ } else if (insideComment === multiComment && currentChar + nextChar === '*/') {
+ i++;
+ insideComment = false;
+ ret += strip(str, offset, i + 1);
+ offset = i + 1;
+ continue;
+ }
+ }
+
+ return ret + (insideComment ? strip(str.substr(offset)) : str.substr(offset));
+};
diff --git a/tools/node_modules/eslint/node_modules/strip-json-comments/license b/tools/node_modules/eslint/node_modules/strip-json-comments/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/strip-json-comments/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/tools/node_modules/eslint/node_modules/strip-json-comments/package.json b/tools/node_modules/eslint/node_modules/strip-json-comments/package.json
new file mode 100644
index 0000000000..078b482d4b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/strip-json-comments/package.json
@@ -0,0 +1,74 @@
+{
+ "_from": "strip-json-comments@~2.0.1",
+ "_id": "strip-json-comments@2.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
+ "_location": "/eslint/strip-json-comments",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "strip-json-comments@~2.0.1",
+ "name": "strip-json-comments",
+ "escapedName": "strip-json-comments",
+ "rawSpec": "~2.0.1",
+ "saveSpec": null,
+ "fetchSpec": "~2.0.1"
+ },
+ "_requiredBy": [
+ "/eslint"
+ ],
+ "_resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
+ "_shasum": "3c531942e908c2697c0ec344858c286c7ca0a60a",
+ "_spec": "strip-json-comments@~2.0.1",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/strip-json-comments/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Strip comments from JSON. Lets you use comments in your JSON files!",
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/strip-json-comments#readme",
+ "keywords": [
+ "json",
+ "strip",
+ "remove",
+ "delete",
+ "trim",
+ "comments",
+ "multiline",
+ "parse",
+ "config",
+ "configuration",
+ "conf",
+ "settings",
+ "util",
+ "env",
+ "environment"
+ ],
+ "license": "MIT",
+ "name": "strip-json-comments",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/strip-json-comments.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "2.0.1"
+}
diff --git a/tools/node_modules/eslint/node_modules/strip-json-comments/readme.md b/tools/node_modules/eslint/node_modules/strip-json-comments/readme.md
new file mode 100644
index 0000000000..0ee58dfe3a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/strip-json-comments/readme.md
@@ -0,0 +1,64 @@
+# strip-json-comments [![Build Status](https://travis-ci.org/sindresorhus/strip-json-comments.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-json-comments)
+
+> Strip comments from JSON. Lets you use comments in your JSON files!
+
+This is now possible:
+
+```js
+{
+ // rainbows
+ "unicorn": /* ❤ */ "cake"
+}
+```
+
+It will replace single-line comments `//` and multi-line comments `/**/` with whitespace. This allows JSON error positions to remain as close as possible to the original source.
+
+Also available as a [gulp](https://github.com/sindresorhus/gulp-strip-json-comments)/[grunt](https://github.com/sindresorhus/grunt-strip-json-comments)/[broccoli](https://github.com/sindresorhus/broccoli-strip-json-comments) plugin.
+
+
+## Install
+
+```
+$ npm install --save strip-json-comments
+```
+
+
+## Usage
+
+```js
+const json = '{/*rainbows*/"unicorn":"cake"}';
+
+JSON.parse(stripJsonComments(json));
+//=> {unicorn: 'cake'}
+```
+
+
+## API
+
+### stripJsonComments(input, [options])
+
+#### input
+
+Type: `string`
+
+Accepts a string with JSON and returns a string without comments.
+
+#### options
+
+##### whitespace
+
+Type: `boolean`
+Default: `true`
+
+Replace comments with whitespace instead of stripping them entirely.
+
+
+## Related
+
+- [strip-json-comments-cli](https://github.com/sindresorhus/strip-json-comments-cli) - CLI for this module
+- [strip-css-comments](https://github.com/sindresorhus/strip-css-comments) - Strip comments from CSS
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/tools/node_modules/eslint/node_modules/supports-color/index.js b/tools/node_modules/eslint/node_modules/supports-color/index.js
new file mode 100644
index 0000000000..4346e272e1
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/supports-color/index.js
@@ -0,0 +1,50 @@
+'use strict';
+var argv = process.argv;
+
+var terminator = argv.indexOf('--');
+var hasFlag = function (flag) {
+ flag = '--' + flag;
+ var pos = argv.indexOf(flag);
+ return pos !== -1 && (terminator !== -1 ? pos < terminator : true);
+};
+
+module.exports = (function () {
+ if ('FORCE_COLOR' in process.env) {
+ return true;
+ }
+
+ if (hasFlag('no-color') ||
+ hasFlag('no-colors') ||
+ hasFlag('color=false')) {
+ return false;
+ }
+
+ if (hasFlag('color') ||
+ hasFlag('colors') ||
+ hasFlag('color=true') ||
+ hasFlag('color=always')) {
+ return true;
+ }
+
+ if (process.stdout && !process.stdout.isTTY) {
+ return false;
+ }
+
+ if (process.platform === 'win32') {
+ return true;
+ }
+
+ if ('COLORTERM' in process.env) {
+ return true;
+ }
+
+ if (process.env.TERM === 'dumb') {
+ return false;
+ }
+
+ if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) {
+ return true;
+ }
+
+ return false;
+})();
diff --git a/tools/node_modules/eslint/node_modules/supports-color/license b/tools/node_modules/eslint/node_modules/supports-color/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/supports-color/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/tools/node_modules/eslint/node_modules/supports-color/package.json b/tools/node_modules/eslint/node_modules/supports-color/package.json
new file mode 100644
index 0000000000..88cebeb435
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/supports-color/package.json
@@ -0,0 +1,89 @@
+{
+ "_from": "supports-color@^2.0.0",
+ "_id": "supports-color@2.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
+ "_location": "/eslint/supports-color",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "supports-color@^2.0.0",
+ "name": "supports-color",
+ "escapedName": "supports-color",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/eslint/babel-code-frame/chalk"
+ ],
+ "_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
+ "_shasum": "535d045ce6b6363fa40117084629995e9df324c7",
+ "_spec": "supports-color@^2.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/babel-code-frame/node_modules/chalk",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/chalk/supports-color/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Detect whether a terminal supports color",
+ "devDependencies": {
+ "mocha": "*",
+ "require-uncached": "^1.0.2"
+ },
+ "engines": {
+ "node": ">=0.8.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/chalk/supports-color#readme",
+ "keywords": [
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "cli",
+ "ansi",
+ "styles",
+ "tty",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "command-line",
+ "support",
+ "supports",
+ "capability",
+ "detect"
+ ],
+ "license": "MIT",
+ "maintainers": [
+ {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ {
+ "name": "Joshua Appelman",
+ "email": "jappelman@xebia.com",
+ "url": "jbnicolai.com"
+ }
+ ],
+ "name": "supports-color",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/chalk/supports-color.git"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "version": "2.0.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/supports-color/readme.md b/tools/node_modules/eslint/node_modules/supports-color/readme.md
new file mode 100644
index 0000000000..b4761f1ecd
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/supports-color/readme.md
@@ -0,0 +1,36 @@
+# supports-color [![Build Status](https://travis-ci.org/chalk/supports-color.svg?branch=master)](https://travis-ci.org/chalk/supports-color)
+
+> Detect whether a terminal supports color
+
+
+## Install
+
+```
+$ npm install --save supports-color
+```
+
+
+## Usage
+
+```js
+var supportsColor = require('supports-color');
+
+if (supportsColor) {
+ console.log('Terminal supports color');
+}
+```
+
+It obeys the `--color` and `--no-color` CLI flags.
+
+For situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`.
+
+
+## Related
+
+- [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module
+- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/tools/node_modules/eslint/node_modules/table/LICENSE b/tools/node_modules/eslint/node_modules/table/LICENSE
new file mode 100644
index 0000000000..7e84ea3afc
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/table/LICENSE
@@ -0,0 +1,24 @@
+Copyright (c) 2016, Gajus Kuizinas (http://gajus.com/)
+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 the Gajus Kuizinas (http://gajus.com/) 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 ANUARY 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/tools/node_modules/eslint/node_modules/table/README.md b/tools/node_modules/eslint/node_modules/table/README.md
new file mode 100644
index 0000000000..76613d4b7c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/table/README.md
@@ -0,0 +1,671 @@
+<a name="table"></a>
+# Table
+
+[![Travis build status](http://img.shields.io/travis/gajus/table/master.svg?style=flat)](https://travis-ci.org/gajus/table)
+[![NPM version](http://img.shields.io/npm/v/table.svg?style=flat)](https://www.npmjs.com/package/table)
+[![js-canonical-style](https://img.shields.io/badge/code%20style-canonical-brightgreen.svg?style=flat)](https://github.com/gajus/canonical)
+
+* [Table](#table)
+ * [Features](#table-features)
+ * [Usage](#table-usage)
+ * [Cell Content Alignment](#table-usage-cell-content-alignment)
+ * [Column Width](#table-usage-column-width)
+ * [Custom Border](#table-usage-custom-border)
+ * [Draw Horizontal Line](#table-usage-draw-horizontal-line)
+ * [Padding Cell Content](#table-usage-padding-cell-content)
+ * [Predefined Border Templates](#table-usage-predefined-border-templates)
+ * [Streaming](#table-usage-streaming)
+ * [Text Truncation](#table-usage-text-truncation)
+ * [Text Wrapping](#table-usage-text-wrapping)
+
+
+Produces a string that represents array data in a text table.
+
+![Demo of table displaying a list of missions to the Moon.](./.README/demo.png)
+
+<a name="table-features"></a>
+## Features
+
+* Works with strings containing [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) characters.
+* Works with strings containing [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code).
+* Configurable border characters.
+* Configurable content alignment per column.
+* Configurable content padding per column.
+* Configurable column width.
+* Text wrapping.
+
+<a name="table-usage"></a>
+## Usage
+
+Table data is described using an array (rows) of array (cells).
+
+```js
+import {
+ table
+} from 'table';
+
+// Using commonjs?
+// const {table} = require('table');
+
+let data,
+ output;
+
+data = [
+ ['0A', '0B', '0C'],
+ ['1A', '1B', '1C'],
+ ['2A', '2B', '2C']
+];
+
+/**
+ * @typedef {string} table~cell
+ */
+
+/**
+ * @typedef {table~cell[]} table~row
+ */
+
+/**
+ * @typedef {Object} table~columns
+ * @property {string} alignment Cell content alignment (enum: left, center, right) (default: left).
+ * @property {number} width Column width (default: auto).
+ * @property {number} truncate Number of characters are which the content will be truncated (default: Infinity).
+ * @property {number} paddingLeft Cell content padding width left (default: 1).
+ * @property {number} paddingRight Cell content padding width right (default: 1).
+ */
+
+/**
+ * @typedef {Object} table~border
+ * @property {string} topBody
+ * @property {string} topJoin
+ * @property {string} topLeft
+ * @property {string} topRight
+ * @property {string} bottomBody
+ * @property {string} bottomJoin
+ * @property {string} bottomLeft
+ * @property {string} bottomRight
+ * @property {string} bodyLeft
+ * @property {string} bodyRight
+ * @property {string} bodyJoin
+ * @property {string} joinBody
+ * @property {string} joinLeft
+ * @property {string} joinRight
+ * @property {string} joinJoin
+ */
+
+/**
+ * Used to dynamically tell table whether to draw a line separating rows or not.
+ * The default behavior is to always return true.
+ *
+ * @typedef {function} drawJoin
+ * @param {number} index
+ * @param {number} size
+ * @return {boolean}
+ */
+
+/**
+ * @typedef {Object} table~config
+ * @property {table~border} border
+ * @property {table~columns[]} columns Column specific configuration.
+ * @property {table~columns} columnDefault Default values for all columns. Column specific settings overwrite the default values.
+ * @property {table~drawJoin} drawHorizontalLine
+ */
+
+/**
+ * Generates a text table.
+ *
+ * @param {table~row[]} rows
+ * @param {table~config} config
+ * @return {String}
+ */
+output = table(data);
+
+console.log(output);
+```
+
+```
+╔════╤════╤════╗
+║ 0A │ 0B │ 0C ║
+╟────┼────┼────╢
+║ 1A │ 1B │ 1C ║
+╟────┼────┼────╢
+║ 2A │ 2B │ 2C ║
+╚════╧════╧════╝
+```
+
+
+<a name="table-usage-cell-content-alignment"></a>
+### Cell Content Alignment
+
+`{string} config.columns[{number}].alignment` property controls content horizontal alignment within a cell.
+
+Valid values are: "left", "right" and "center".
+
+```js
+let config,
+ data,
+ output;
+
+data = [
+ ['0A', '0B', '0C'],
+ ['1A', '1B', '1C'],
+ ['2A', '2B', '2C']
+];
+
+config = {
+ columns: {
+ 0: {
+ alignment: 'left',
+ minWidth: 10
+ },
+ 1: {
+ alignment: 'center',
+ minWidth: 10
+ },
+ 2: {
+ alignment: 'right',
+ minWidth: 10
+ }
+ }
+};
+
+output = table(data, config);
+
+console.log(output);
+```
+
+```
+╔════════════╤════════════╤════════════╗
+║ 0A │ 0B │ 0C ║
+╟────────────┼────────────┼────────────╢
+║ 1A │ 1B │ 1C ║
+╟────────────┼────────────┼────────────╢
+║ 2A │ 2B │ 2C ║
+╚════════════╧════════════╧════════════╝
+```
+
+<a name="table-usage-column-width"></a>
+### Column Width
+
+`{number} config.columns[{number}].width` property restricts column width to a fixed width.
+
+```js
+let data,
+ output,
+ options;
+
+data = [
+ ['0A', '0B', '0C'],
+ ['1A', '1B', '1C'],
+ ['2A', '2B', '2C']
+];
+
+options = {
+ columns: {
+ 1: {
+ width: 10
+ }
+ }
+};
+
+output = table(data, options);
+
+console.log(output);
+```
+
+```
+╔════╤════════════╤════╗
+║ 0A │ 0B │ 0C ║
+╟────┼────────────┼────╢
+║ 1A │ 1B │ 1C ║
+╟────┼────────────┼────╢
+║ 2A │ 2B │ 2C ║
+╚════╧════════════╧════╝
+```
+
+<a name="table-usage-custom-border"></a>
+### Custom Border
+
+`{object} config.border` property describes characters used to draw the table border.
+
+```js
+let config,
+ data,
+ output;
+
+data = [
+ ['0A', '0B', '0C'],
+ ['1A', '1B', '1C'],
+ ['2A', '2B', '2C']
+];
+
+config = {
+ border: {
+ topBody: `─`,
+ topJoin: `┬`,
+ topLeft: `┌`,
+ topRight: `┐`,
+
+ bottomBody: `─`,
+ bottomJoin: `┴`,
+ bottomLeft: `└`,
+ bottomRight: `┘`,
+
+ bodyLeft: `│`,
+ bodyRight: `│`,
+ bodyJoin: `│`,
+
+ joinBody: `─`,
+ joinLeft: `├`,
+ joinRight: `┤`,
+ joinJoin: `┼`
+ }
+};
+
+output = table(data, config);
+
+console.log(output);
+```
+
+```
+┌────┬────┬────┐
+│ 0A │ 0B │ 0C │
+├────┼────┼────┤
+│ 1A │ 1B │ 1C │
+├────┼────┼────┤
+│ 2A │ 2B │ 2C │
+└────┴────┴────┘
+```
+
+<a name="table-usage-draw-horizontal-line"></a>
+### Draw Horizontal Line
+
+`{function} config.drawHorizontalLine` property is a function that is called for every non-content row in the table. The result of the function `{boolean}` determines whether a row is drawn.
+
+```js
+let data,
+ output,
+ options;
+
+data = [
+ ['0A', '0B', '0C'],
+ ['1A', '1B', '1C'],
+ ['2A', '2B', '2C'],
+ ['3A', '3B', '3C'],
+ ['4A', '4B', '4C']
+];
+
+options = {
+ /**
+ * @typedef {function} drawJoin
+ * @param {number} index
+ * @param {number} size
+ * @return {boolean}
+ */
+ drawHorizontalLine: (index, size) => {
+ return index === 0 || index === 1 || index === size - 1 || index === size;
+ }
+};
+
+output = table(data, options);
+
+console.log(output);
+```
+
+```
+╔════╤════╤════╗
+║ 0A │ 0B │ 0C ║
+╟────┼────┼────╢
+║ 1A │ 1B │ 1C ║
+║ 2A │ 2B │ 2C ║
+║ 3A │ 3B │ 3C ║
+╟────┼────┼────╢
+║ 4A │ 4B │ 4C ║
+╚════╧════╧════╝
+```
+
+<a name="table-usage-padding-cell-content"></a>
+### Padding Cell Content
+
+`{number} config.columns[{number}].paddingLeft` and `{number} config.columns[{number}].paddingRight` properties control content padding within a cell. Property value represents a number of whitespaces used to pad the content.
+
+```js
+let config,
+ data,
+ output;
+
+data = [
+ ['0A', 'AABBCC', '0C'],
+ ['1A', '1B', '1C'],
+ ['2A', '2B', '2C']
+];
+
+config = {
+ columns: {
+ 0: {
+ paddingLeft: 3
+ },
+ 1: {
+ width: 2,
+ paddingRight: 3
+ }
+ }
+};
+
+output = table(data, config);
+
+console.log(output);
+```
+
+```
+╔══════╤══════╤════╗
+║ 0A │ AA │ 0C ║
+║ │ BB │ ║
+║ │ CC │ ║
+╟──────┼──────┼────╢
+║ 1A │ 1B │ 1C ║
+╟──────┼──────┼────╢
+║ 2A │ 2B │ 2C ║
+╚══════╧══════╧════╝
+```
+
+<a name="table-usage-predefined-border-templates"></a>
+### Predefined Border Templates
+
+You can load one of the predefined border templates using `getBorderCharacters` function.
+
+```js
+import {
+ table,
+ getBorderCharacters
+} from 'table';
+
+let config,
+ data;
+
+data = [
+ ['0A', '0B', '0C'],
+ ['1A', '1B', '1C'],
+ ['2A', '2B', '2C']
+];
+
+config = {
+ border: getBorderCharacters(`name of the template`)
+};
+
+table(data, config);
+```
+
+```
+# honeywell
+
+╔════╤════╤════╗
+║ 0A │ 0B │ 0C ║
+╟────┼────┼────╢
+║ 1A │ 1B │ 1C ║
+╟────┼────┼────╢
+║ 2A │ 2B │ 2C ║
+╚════╧════╧════╝
+
+# norc
+
+┌────┬────┬────┐
+│ 0A │ 0B │ 0C │
+├────┼────┼────┤
+│ 1A │ 1B │ 1C │
+├────┼────┼────┤
+│ 2A │ 2B │ 2C │
+└────┴────┴────┘
+
+# ramac (ASCII; for use in terminals that do not support Unicode characters)
+
++----+----+----+
+| 0A | 0B | 0C |
+|----|----|----|
+| 1A | 1B | 1C |
+|----|----|----|
+| 2A | 2B | 2C |
++----+----+----+
+
+# void (no borders; see "bordless table" section of the documentation)
+
+ 0A 0B 0C
+
+ 1A 1B 1C
+
+ 2A 2B 2C
+
+```
+
+Raise [an issue](https://github.com/gajus/table/issues) if you'd like to contribute a new border template.
+
+<a name="table-usage-predefined-border-templates-borderless-table"></a>
+#### Borderless Table
+
+Simply using "void" border character template creates a table with a lot of unnecessary spacing.
+
+To create a more plesant to the eye table, reset the padding and remove the joining rows, e.g.
+
+```js
+let output;
+
+output = table(data, {
+ border: getBorderCharacters(`void`),
+ columnDefault: {
+ paddingLeft: 0,
+ paddingRight: 1
+ },
+ drawJoin: () => {
+ return false
+ }
+});
+
+console.log(output);
+```
+
+```
+0A 0B 0C
+1A 1B 1C
+2A 2B 2C
+```
+
+<a name="table-usage-streaming"></a>
+### Streaming
+
+`table` package exports `createStream` function used to draw a table and append rows.
+
+`createStream` requires `{number} columnDefault.width` and `{number} columnCount` configuration properties.
+
+```js
+import {
+ createStream
+} from 'table';
+
+let config,
+ stream;
+
+config = {
+ columnDefault: {
+ width: 50
+ },
+ columnCount: 1
+};
+
+stream = createStream(config);
+
+setInterval(() => {
+ stream.write([new Date()]);
+}, 500);
+```
+
+![Streaming current date.](./.README/streaming.gif)
+
+`table` package uses ANSI escape codes to overwrite the output of the last line when a new row is printed.
+
+The underlying implementation is explained in this [Stack Overflow answer](http://stackoverflow.com/a/32938658/368691).
+
+Streaming supports all of the configuration properties and functionality of a static table (such as auto text wrapping, alignment and padding), e.g.
+
+```js
+import {
+ createStream
+} from 'table';
+
+import _ from 'lodash';
+
+let config,
+ stream,
+ i;
+
+config = {
+ columnDefault: {
+ width: 50
+ },
+ columnCount: 3,
+ columns: {
+ 0: {
+ width: 10,
+ alignment: 'right'
+ },
+ 1: {
+ alignment: 'center',
+ },
+ 2: {
+ width: 10
+ }
+ }
+};
+
+stream = createStream(config);
+
+i = 0;
+
+setInterval(() => {
+ let random;
+
+ random = _.sample('abcdefghijklmnopqrstuvwxyz', _.random(1, 30)).join('');
+
+ stream.write([i++, new Date(), random]);
+}, 500);
+```
+
+![Streaming random data.](./.README/streaming-random.gif)
+<a name="table-usage-text-truncation"></a>
+### Text Truncation
+
+To handle a content that overflows the container width, `table` package implements [text wrapping](#table-usage-text-wrapping). However, sometimes you may want to truncate content that is too long to be displayed in the table.
+
+`{number} config.columns[{number}].truncate` property (default: `Infinity`) truncates the text at the specified length.
+
+```js
+let config,
+ data,
+ output;
+
+data = [
+ ['Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pulvinar nibh sed mauris convallis dapibus. Nunc venenatis tempus nulla sit amet viverra.']
+];
+
+config = {
+ columns: {
+ 0: {
+ width: 20,
+ truncate: 100
+ }
+ }
+};
+
+output = table(data, config);
+
+console.log(output);
+```
+
+```
+╔══════════════════════╗
+║ Lorem ipsum dolor si ║
+║ t amet, consectetur ║
+║ adipiscing elit. Pha ║
+║ sellus pulvinar nibh ║
+║ sed mauris conva... ║
+╚══════════════════════╝
+```
+
+<a name="table-usage-text-wrapping"></a>
+### Text Wrapping
+
+`table` package implements auto text wrapping, i.e. text that has width greater than the container width will be separated into multiple lines, e.g.
+
+```js
+let config,
+ data,
+ output;
+
+data = [
+ ['Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pulvinar nibh sed mauris convallis dapibus. Nunc venenatis tempus nulla sit amet viverra.']
+];
+
+config = {
+ columns: {
+ 0: {
+ width: 20
+ }
+ }
+};
+
+output = table(data, config);
+
+console.log(output);
+```
+
+```
+╔══════════════════════╗
+║ Lorem ipsum dolor si ║
+║ t amet, consectetur ║
+║ adipiscing elit. Pha ║
+║ sellus pulvinar nibh ║
+║ sed mauris convallis ║
+║ dapibus. Nunc venena ║
+║ tis tempus nulla sit ║
+║ amet viverra. ║
+╚══════════════════════╝
+```
+
+When `wrapWord` is `true` the text is broken at the nearest space or one of the special characters ("-", "_", "\", "/", ".", ",", ";"), e.g.
+
+```js
+let config,
+ data,
+ output;
+
+data = [
+ ['Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pulvinar nibh sed mauris convallis dapibus. Nunc venenatis tempus nulla sit amet viverra.']
+];
+
+config = {
+ columns: {
+ 0: {
+ width: 20,
+ wrapWord: true
+ }
+ }
+};
+
+output = table(data, config);
+
+console.log(output);
+```
+
+```
+╔══════════════════════╗
+║ Lorem ipsum dolor ║
+║ sit amet, ║
+║ consectetur ║
+║ adipiscing elit. ║
+║ Phasellus pulvinar ║
+║ nibh sed mauris ║
+║ convallis dapibus. ║
+║ Nunc venenatis ║
+║ tempus nulla sit ║
+║ amet viverra. ║
+╚══════════════════════╝
+```
+
diff --git a/tools/node_modules/eslint/node_modules/table/dist/alignString.js b/tools/node_modules/eslint/node_modules/table/dist/alignString.js
new file mode 100644
index 0000000000..a000208e3a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/table/dist/alignString.js
@@ -0,0 +1,106 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _lodash = require('lodash');
+
+var _lodash2 = _interopRequireDefault(_lodash);
+
+var _stringWidth = require('string-width');
+
+var _stringWidth2 = _interopRequireDefault(_stringWidth);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+const alignments = ['left', 'right', 'center'];
+
+/**
+ * @param {string} subject
+ * @param {number} width
+ * @returns {string}
+ */
+const alignLeft = (subject, width) => {
+ return subject + _lodash2.default.repeat(' ', width);
+};
+
+/**
+ * @param {string} subject
+ * @param {number} width
+ * @returns {string}
+ */
+const alignRight = (subject, width) => {
+ return _lodash2.default.repeat(' ', width) + subject;
+};
+
+/**
+ * @param {string} subject
+ * @param {number} width
+ * @returns {string}
+ */
+const alignCenter = (subject, width) => {
+ let halfWidth;
+
+ halfWidth = width / 2;
+
+ if (halfWidth % 2 === 0) {
+ return _lodash2.default.repeat(' ', halfWidth) + subject + _lodash2.default.repeat(' ', halfWidth);
+ } else {
+ halfWidth = _lodash2.default.floor(halfWidth);
+
+ return _lodash2.default.repeat(' ', halfWidth) + subject + _lodash2.default.repeat(' ', halfWidth + 1);
+ }
+};
+
+/**
+ * Pads a string to the left and/or right to position the subject
+ * text in a desired alignment within a container.
+ *
+ * @param {string} subject
+ * @param {number} containerWidth
+ * @param {string} alignment One of the valid options (left, right, center).
+ * @returns {string}
+ */
+
+exports.default = (subject, containerWidth, alignment) => {
+ if (!_lodash2.default.isString(subject)) {
+ throw new TypeError('Subject parameter value must be a string.');
+ }
+
+ if (!_lodash2.default.isNumber(containerWidth)) {
+ throw new TypeError('Container width parameter value must be a number.');
+ }
+
+ const subjectWidth = (0, _stringWidth2.default)(subject);
+
+ if (subjectWidth > containerWidth) {
+ // console.log('subjectWidth', subjectWidth, 'containerWidth', containerWidth, 'subject', subject);
+
+ throw new Error('Subject parameter value width cannot be greater than the container width.');
+ }
+
+ if (!_lodash2.default.isString(alignment)) {
+ throw new TypeError('Alignment parameter value must be a string.');
+ }
+
+ if (alignments.indexOf(alignment) === -1) {
+ throw new Error('Alignment parameter value must be a known alignment parameter value (left, right, center).');
+ }
+
+ if (subjectWidth === 0) {
+ return _lodash2.default.repeat(' ', containerWidth);
+ }
+
+ const availableWidth = containerWidth - subjectWidth;
+
+ if (alignment === 'left') {
+ return alignLeft(subject, availableWidth);
+ }
+
+ if (alignment === 'right') {
+ return alignRight(subject, availableWidth);
+ }
+
+ return alignCenter(subject, availableWidth);
+}; \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/table/dist/alignTableData.js b/tools/node_modules/eslint/node_modules/table/dist/alignTableData.js
new file mode 100644
index 0000000000..eb40784553
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/table/dist/alignTableData.js
@@ -0,0 +1,34 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _stringWidth = require('string-width');
+
+var _stringWidth2 = _interopRequireDefault(_stringWidth);
+
+var _alignString = require('./alignString');
+
+var _alignString2 = _interopRequireDefault(_alignString);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * @param {table~row[]} rows
+ * @param {Object} config
+ * @returns {table~row[]}
+ */
+exports.default = (rows, config) => {
+ return rows.map(cells => {
+ return cells.map((value, index1) => {
+ const column = config.columns[index1];
+
+ if ((0, _stringWidth2.default)(value) === column.width) {
+ return value;
+ } else {
+ return (0, _alignString2.default)(value, column.width, column.alignment);
+ }
+ });
+ });
+}; \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/table/dist/calculateCellHeight.js b/tools/node_modules/eslint/node_modules/table/dist/calculateCellHeight.js
new file mode 100644
index 0000000000..d4d60cac22
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/table/dist/calculateCellHeight.js
@@ -0,0 +1,47 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _lodash = require('lodash');
+
+var _lodash2 = _interopRequireDefault(_lodash);
+
+var _stringWidth = require('string-width');
+
+var _stringWidth2 = _interopRequireDefault(_stringWidth);
+
+var _wrapWord = require('./wrapWord');
+
+var _wrapWord2 = _interopRequireDefault(_wrapWord);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * @param {string} value
+ * @param {number} columnWidth
+ * @param {boolean} useWrapWord
+ * @returns {number}
+ */
+exports.default = function (value, columnWidth) {
+ let useWrapWord = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
+
+ if (!_lodash2.default.isString(value)) {
+ throw new TypeError('Value must be a string.');
+ }
+
+ if (!_lodash2.default.isInteger(columnWidth)) {
+ throw new TypeError('Column width must be an integer.');
+ }
+
+ if (columnWidth < 1) {
+ throw new Error('Column width must be greater than 0.');
+ }
+
+ if (useWrapWord) {
+ return (0, _wrapWord2.default)(value, columnWidth).length;
+ }
+
+ return _lodash2.default.ceil((0, _stringWidth2.default)(value) / columnWidth);
+}; \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/table/dist/calculateCellWidthIndex.js b/tools/node_modules/eslint/node_modules/table/dist/calculateCellWidthIndex.js
new file mode 100644
index 0000000000..e6bf927edb
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/table/dist/calculateCellWidthIndex.js
@@ -0,0 +1,23 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _stringWidth = require('string-width');
+
+var _stringWidth2 = _interopRequireDefault(_stringWidth);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Calculates width of each cell contents.
+ *
+ * @param {string[]} cells
+ * @returns {number[]}
+ */
+exports.default = cells => {
+ return cells.map(value => {
+ return (0, _stringWidth2.default)(value);
+ });
+}; \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/table/dist/calculateMaximumColumnWidthIndex.js b/tools/node_modules/eslint/node_modules/table/dist/calculateMaximumColumnWidthIndex.js
new file mode 100644
index 0000000000..dd58e327fb
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/table/dist/calculateMaximumColumnWidthIndex.js
@@ -0,0 +1,41 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _lodash = require('lodash');
+
+var _lodash2 = _interopRequireDefault(_lodash);
+
+var _calculateCellWidthIndex = require('./calculateCellWidthIndex');
+
+var _calculateCellWidthIndex2 = _interopRequireDefault(_calculateCellWidthIndex);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Produces an array of values that describe the largest value length (width) in every column.
+ *
+ * @param {Array[]} rows
+ * @returns {number[]}
+ */
+exports.default = rows => {
+ if (!rows[0]) {
+ throw new Error('Dataset must have at least one row.');
+ }
+
+ const columns = _lodash2.default.fill(Array(rows[0].length), 0);
+
+ _lodash2.default.forEach(rows, row => {
+ const columnWidthIndex = (0, _calculateCellWidthIndex2.default)(row);
+
+ _lodash2.default.forEach(columnWidthIndex, (valueWidth, index0) => {
+ if (columns[index0] < valueWidth) {
+ columns[index0] = valueWidth;
+ }
+ });
+ });
+
+ return columns;
+}; \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/table/dist/calculateRowHeightIndex.js b/tools/node_modules/eslint/node_modules/table/dist/calculateRowHeightIndex.js
new file mode 100644
index 0000000000..ca9bbeafab
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/table/dist/calculateRowHeightIndex.js
@@ -0,0 +1,48 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _lodash = require('lodash');
+
+var _lodash2 = _interopRequireDefault(_lodash);
+
+var _calculateCellHeight = require('./calculateCellHeight');
+
+var _calculateCellHeight2 = _interopRequireDefault(_calculateCellHeight);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Calculates the vertical row span index.
+ *
+ * @param {Array[]} rows
+ * @param {Object} config
+ * @returns {number[]}
+ */
+exports.default = (rows, config) => {
+ const tableWidth = rows[0].length;
+
+ const rowSpanIndex = [];
+
+ _lodash2.default.forEach(rows, cells => {
+ const cellHeightIndex = _lodash2.default.fill(Array(tableWidth), 1);
+
+ _lodash2.default.forEach(cells, (value, index1) => {
+ if (!_lodash2.default.isNumber(config.columns[index1].width)) {
+ throw new TypeError('column[index].width must be a number.');
+ }
+
+ if (!_lodash2.default.isBoolean(config.columns[index1].wrapWord)) {
+ throw new TypeError('column[index].wrapWord must be a boolean.');
+ }
+
+ cellHeightIndex[index1] = (0, _calculateCellHeight2.default)(value, config.columns[index1].width, config.columns[index1].wrapWord);
+ });
+
+ rowSpanIndex.push(_lodash2.default.max(cellHeightIndex));
+ });
+
+ return rowSpanIndex;
+}; \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/table/dist/createStream.js b/tools/node_modules/eslint/node_modules/table/dist/createStream.js
new file mode 100644
index 0000000000..35ee7acbe0
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/table/dist/createStream.js
@@ -0,0 +1,157 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _lodash = require('lodash');
+
+var _lodash2 = _interopRequireDefault(_lodash);
+
+var _makeStreamConfig = require('./makeStreamConfig');
+
+var _makeStreamConfig2 = _interopRequireDefault(_makeStreamConfig);
+
+var _drawRow = require('./drawRow');
+
+var _drawRow2 = _interopRequireDefault(_drawRow);
+
+var _drawBorder = require('./drawBorder');
+
+var _stringifyTableData = require('./stringifyTableData');
+
+var _stringifyTableData2 = _interopRequireDefault(_stringifyTableData);
+
+var _truncateTableData = require('./truncateTableData');
+
+var _truncateTableData2 = _interopRequireDefault(_truncateTableData);
+
+var _mapDataUsingRowHeightIndex = require('./mapDataUsingRowHeightIndex');
+
+var _mapDataUsingRowHeightIndex2 = _interopRequireDefault(_mapDataUsingRowHeightIndex);
+
+var _alignTableData = require('./alignTableData');
+
+var _alignTableData2 = _interopRequireDefault(_alignTableData);
+
+var _padTableData = require('./padTableData');
+
+var _padTableData2 = _interopRequireDefault(_padTableData);
+
+var _calculateRowHeightIndex = require('./calculateRowHeightIndex');
+
+var _calculateRowHeightIndex2 = _interopRequireDefault(_calculateRowHeightIndex);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * @param {Array} data
+ * @param {Object} config
+ * @returns {Array}
+ */
+const prepareData = (data, config) => {
+ let rows;
+
+ rows = (0, _stringifyTableData2.default)(data);
+
+ rows = (0, _truncateTableData2.default)(data, config);
+
+ const rowHeightIndex = (0, _calculateRowHeightIndex2.default)(rows, config);
+
+ rows = (0, _mapDataUsingRowHeightIndex2.default)(rows, rowHeightIndex, config);
+ rows = (0, _alignTableData2.default)(rows, config);
+ rows = (0, _padTableData2.default)(rows, config);
+
+ return rows;
+};
+
+/**
+ * @param {string[]} row
+ * @param {number[]} columnWidthIndex
+ * @param {Object} config
+ * @returns {undefined}
+ */
+const create = (row, columnWidthIndex, config) => {
+ const rows = prepareData([row], config);
+
+ const body = _lodash2.default.map(rows, literalRow => {
+ return (0, _drawRow2.default)(literalRow, config.border);
+ }).join('');
+
+ let output;
+
+ output = '';
+
+ output += (0, _drawBorder.drawBorderTop)(columnWidthIndex, config.border);
+ output += body;
+ output += (0, _drawBorder.drawBorderBottom)(columnWidthIndex, config.border);
+
+ output = _lodash2.default.trimEnd(output);
+
+ process.stdout.write(output);
+};
+
+/**
+ * @param {string[]} row
+ * @param {number[]} columnWidthIndex
+ * @param {Object} config
+ * @returns {undefined}
+ */
+const append = (row, columnWidthIndex, config) => {
+ const rows = prepareData([row], config);
+
+ const body = _lodash2.default.map(rows, literalRow => {
+ return (0, _drawRow2.default)(literalRow, config.border);
+ }).join('');
+
+ let output;
+
+ output = '\r\u001B[K';
+
+ output += (0, _drawBorder.drawBorderJoin)(columnWidthIndex, config.border);
+ output += body;
+ output += (0, _drawBorder.drawBorderBottom)(columnWidthIndex, config.border);
+
+ output = _lodash2.default.trimEnd(output);
+
+ process.stdout.write(output);
+};
+
+/**
+ * @param {Object} userConfig
+ * @returns {Object}
+ */
+
+exports.default = function () {
+ let userConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+
+ const config = (0, _makeStreamConfig2.default)(userConfig);
+
+ const columnWidthIndex = _lodash2.default.mapValues(config.columns, column => {
+ return column.width + column.paddingLeft + column.paddingRight;
+ });
+
+ let empty;
+
+ empty = true;
+
+ return {
+ /**
+ * @param {string[]} row
+ * @returns {undefined}
+ */
+ write: row => {
+ if (row.length !== config.columnCount) {
+ throw new Error('Row cell count does not match the config.columnCount.');
+ }
+
+ if (empty) {
+ empty = false;
+
+ return create(row, columnWidthIndex, config);
+ } else {
+ return append(row, columnWidthIndex, config);
+ }
+ }
+ };
+}; \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/table/dist/drawBorder.js b/tools/node_modules/eslint/node_modules/table/dist/drawBorder.js
new file mode 100644
index 0000000000..aeb2b719fe
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/table/dist/drawBorder.js
@@ -0,0 +1,104 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.drawBorderTop = exports.drawBorderJoin = exports.drawBorderBottom = exports.drawBorder = undefined;
+
+var _lodash = require('lodash');
+
+var _lodash2 = _interopRequireDefault(_lodash);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * @typedef drawBorder~parts
+ * @property {string} left
+ * @property {string} right
+ * @property {string} body
+ * @property {string} join
+ */
+
+/**
+ * @param {number[]} columnSizeIndex
+ * @param {drawBorder~parts} parts
+ * @returns {string}
+ */
+const drawBorder = (columnSizeIndex, parts) => {
+ const columns = _lodash2.default.map(columnSizeIndex, size => {
+ return _lodash2.default.repeat(parts.body, size);
+ }).join(parts.join);
+
+ return parts.left + columns + parts.right + '\n';
+};
+
+/**
+ * @typedef drawBorderTop~parts
+ * @property {string} topLeft
+ * @property {string} topRight
+ * @property {string} topBody
+ * @property {string} topJoin
+ */
+
+/**
+ * @param {number[]} columnSizeIndex
+ * @param {drawBorderTop~parts} parts
+ * @returns {string}
+ */
+const drawBorderTop = (columnSizeIndex, parts) => {
+ return drawBorder(columnSizeIndex, {
+ body: parts.topBody,
+ join: parts.topJoin,
+ left: parts.topLeft,
+ right: parts.topRight
+ });
+};
+
+/**
+ * @typedef drawBorderJoin~parts
+ * @property {string} joinLeft
+ * @property {string} joinRight
+ * @property {string} joinBody
+ * @property {string} joinJoin
+ */
+
+/**
+ * @param {number[]} columnSizeIndex
+ * @param {drawBorderJoin~parts} parts
+ * @returns {string}
+ */
+const drawBorderJoin = (columnSizeIndex, parts) => {
+ return drawBorder(columnSizeIndex, {
+ body: parts.joinBody,
+ join: parts.joinJoin,
+ left: parts.joinLeft,
+ right: parts.joinRight
+ });
+};
+
+/**
+ * @typedef drawBorderBottom~parts
+ * @property {string} topLeft
+ * @property {string} topRight
+ * @property {string} topBody
+ * @property {string} topJoin
+ */
+
+/**
+ * @param {number[]} columnSizeIndex
+ * @param {drawBorderBottom~parts} parts
+ * @returns {string}
+ */
+const drawBorderBottom = (columnSizeIndex, parts) => {
+ return drawBorder(columnSizeIndex, {
+ body: parts.bottomBody,
+ join: parts.bottomJoin,
+ left: parts.bottomLeft,
+ right: parts.bottomRight
+ });
+};
+
+exports.drawBorder = drawBorder;
+exports.drawBorderBottom = drawBorderBottom;
+exports.drawBorderJoin = drawBorderJoin;
+exports.drawBorderTop = drawBorderTop; \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/table/dist/drawRow.js b/tools/node_modules/eslint/node_modules/table/dist/drawRow.js
new file mode 100644
index 0000000000..65547fba05
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/table/dist/drawRow.js
@@ -0,0 +1,21 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+/**
+ * @typedef {Object} drawRow~border
+ * @property {string} bodyLeft
+ * @property {string} bodyRight
+ * @property {string} bodyJoin
+ */
+
+/**
+ * @param {number[]} columns
+ * @param {drawRow~border} border
+ * @returns {string}
+ */
+exports.default = (columns, border) => {
+ return border.bodyLeft + columns.join(border.bodyJoin) + border.bodyRight + '\n';
+}; \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/table/dist/drawTable.js b/tools/node_modules/eslint/node_modules/table/dist/drawTable.js
new file mode 100644
index 0000000000..5f7152291a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/table/dist/drawTable.js
@@ -0,0 +1,63 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _lodash = require('lodash');
+
+var _lodash2 = _interopRequireDefault(_lodash);
+
+var _drawBorder = require('./drawBorder');
+
+var _drawRow = require('./drawRow');
+
+var _drawRow2 = _interopRequireDefault(_drawRow);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * @param {Array} rows
+ * @param {Object} border
+ * @param {Array} columnSizeIndex
+ * @param {Array} rowSpanIndex
+ * @param {Function} drawHorizontalLine
+ * @returns {string}
+ */
+exports.default = (rows, border, columnSizeIndex, rowSpanIndex, drawHorizontalLine) => {
+ let output;
+ let realRowIndex;
+ let rowHeight;
+
+ const rowCount = rows.length;
+
+ realRowIndex = 0;
+
+ output = '';
+
+ if (drawHorizontalLine(realRowIndex, rowCount)) {
+ output += (0, _drawBorder.drawBorderTop)(columnSizeIndex, border);
+ }
+
+ _lodash2.default.forEach(rows, (row, index0) => {
+ output += (0, _drawRow2.default)(row, border);
+
+ if (!rowHeight) {
+ rowHeight = rowSpanIndex[realRowIndex];
+
+ realRowIndex++;
+ }
+
+ rowHeight--;
+
+ if (rowHeight === 0 && index0 !== rowCount - 1 && drawHorizontalLine(realRowIndex, rowCount)) {
+ output += (0, _drawBorder.drawBorderJoin)(columnSizeIndex, border);
+ }
+ });
+
+ if (drawHorizontalLine(realRowIndex, rowCount)) {
+ output += (0, _drawBorder.drawBorderBottom)(columnSizeIndex, border);
+ }
+
+ return output;
+}; \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/table/dist/getBorderCharacters.js b/tools/node_modules/eslint/node_modules/table/dist/getBorderCharacters.js
new file mode 100644
index 0000000000..0a0f599ca3
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/table/dist/getBorderCharacters.js
@@ -0,0 +1,126 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+/* eslint-disable sort-keys */
+
+/**
+ * @typedef border
+ * @property {string} topBody
+ * @property {string} topJoin
+ * @property {string} topLeft
+ * @property {string} topRight
+ * @property {string} bottomBody
+ * @property {string} bottomJoin
+ * @property {string} bottomLeft
+ * @property {string} bottomRight
+ * @property {string} bodyLeft
+ * @property {string} bodyRight
+ * @property {string} bodyJoin
+ * @property {string} joinBody
+ * @property {string} joinLeft
+ * @property {string} joinRight
+ * @property {string} joinJoin
+ */
+
+/**
+ * @param {string} name
+ * @returns {border}
+ */
+exports.default = name => {
+ if (name === 'honeywell') {
+ return {
+ topBody: '═',
+ topJoin: '╤',
+ topLeft: '╔',
+ topRight: '╗',
+
+ bottomBody: '═',
+ bottomJoin: '╧',
+ bottomLeft: '╚',
+ bottomRight: '╝',
+
+ bodyLeft: '║',
+ bodyRight: '║',
+ bodyJoin: '│',
+
+ joinBody: '─',
+ joinLeft: '╟',
+ joinRight: '╢',
+ joinJoin: '┼'
+ };
+ }
+
+ if (name === 'norc') {
+ return {
+ topBody: '─',
+ topJoin: '┬',
+ topLeft: '┌',
+ topRight: '┐',
+
+ bottomBody: '─',
+ bottomJoin: '┴',
+ bottomLeft: '└',
+ bottomRight: '┘',
+
+ bodyLeft: '│',
+ bodyRight: '│',
+ bodyJoin: '│',
+
+ joinBody: '─',
+ joinLeft: '├',
+ joinRight: '┤',
+ joinJoin: '┼'
+ };
+ }
+
+ if (name === 'ramac') {
+ return {
+ topBody: '-',
+ topJoin: '+',
+ topLeft: '+',
+ topRight: '+',
+
+ bottomBody: '-',
+ bottomJoin: '+',
+ bottomLeft: '+',
+ bottomRight: '+',
+
+ bodyLeft: '|',
+ bodyRight: '|',
+ bodyJoin: '|',
+
+ joinBody: '-',
+ joinLeft: '|',
+ joinRight: '|',
+ joinJoin: '|'
+ };
+ }
+
+ if (name === 'void') {
+ return {
+ topBody: '',
+ topJoin: '',
+ topLeft: '',
+ topRight: '',
+
+ bottomBody: '',
+ bottomJoin: '',
+ bottomLeft: '',
+ bottomRight: '',
+
+ bodyLeft: '',
+ bodyRight: '',
+ bodyJoin: '',
+
+ joinBody: '',
+ joinLeft: '',
+ joinRight: '',
+ joinJoin: ''
+ };
+ }
+
+ throw new Error('Unknown border template "' + name + '".');
+}; \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/table/dist/index.js b/tools/node_modules/eslint/node_modules/table/dist/index.js
new file mode 100644
index 0000000000..169eddf080
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/table/dist/index.js
@@ -0,0 +1,24 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.getBorderCharacters = exports.createStream = exports.table = undefined;
+
+var _table = require('./table');
+
+var _table2 = _interopRequireDefault(_table);
+
+var _createStream = require('./createStream');
+
+var _createStream2 = _interopRequireDefault(_createStream);
+
+var _getBorderCharacters = require('./getBorderCharacters');
+
+var _getBorderCharacters2 = _interopRequireDefault(_getBorderCharacters);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.table = _table2.default;
+exports.createStream = _createStream2.default;
+exports.getBorderCharacters = _getBorderCharacters2.default; \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/table/dist/makeConfig.js b/tools/node_modules/eslint/node_modules/table/dist/makeConfig.js
new file mode 100644
index 0000000000..43bf656aff
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/table/dist/makeConfig.js
@@ -0,0 +1,99 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _lodash = require('lodash');
+
+var _lodash2 = _interopRequireDefault(_lodash);
+
+var _getBorderCharacters = require('./getBorderCharacters');
+
+var _getBorderCharacters2 = _interopRequireDefault(_getBorderCharacters);
+
+var _validateConfig = require('./validateConfig');
+
+var _validateConfig2 = _interopRequireDefault(_validateConfig);
+
+var _calculateMaximumColumnWidthIndex = require('./calculateMaximumColumnWidthIndex');
+
+var _calculateMaximumColumnWidthIndex2 = _interopRequireDefault(_calculateMaximumColumnWidthIndex);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Merges user provided border characters with the default border ("honeywell") characters.
+ *
+ * @param {Object} border
+ * @returns {Object}
+ */
+const makeBorder = function makeBorder() {
+ let border = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+
+ return Object.assign({}, (0, _getBorderCharacters2.default)('honeywell'), border);
+};
+
+/**
+ * Creates a configuration for every column using default
+ * values for the missing configuration properties.
+ *
+ * @param {Array[]} rows
+ * @param {Object} columns
+ * @param {Object} columnDefault
+ * @returns {Object}
+ */
+const makeColumns = function makeColumns(rows) {
+ let columns = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+ let columnDefault = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
+
+ const maximumColumnWidthIndex = (0, _calculateMaximumColumnWidthIndex2.default)(rows);
+
+ _lodash2.default.times(rows[0].length, index => {
+ if (_lodash2.default.isUndefined(columns[index])) {
+ columns[index] = {};
+ }
+
+ columns[index] = _lodash2.default.assign({
+ alignment: 'left',
+ paddingLeft: 1,
+ paddingRight: 1,
+ truncate: Infinity,
+ width: maximumColumnWidthIndex[index],
+ wrapWord: false
+ }, columnDefault, columns[index]);
+ });
+
+ return columns;
+};
+
+/**
+ * Makes a new configuration object out of the userConfig object
+ * using default values for the missing configuration properties.
+ *
+ * @param {Array[]} rows
+ * @param {Object} userConfig
+ * @returns {Object}
+ */
+
+exports.default = function (rows) {
+ let userConfig = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+
+ (0, _validateConfig2.default)('config.json', userConfig);
+
+ const config = _lodash2.default.cloneDeep(userConfig);
+
+ config.border = makeBorder(config.border);
+ config.columns = makeColumns(rows, config.columns, config.columnDefault);
+
+ if (!config.drawHorizontalLine) {
+ /**
+ * @returns {boolean}
+ */
+ config.drawHorizontalLine = () => {
+ return true;
+ };
+ }
+
+ return config;
+}; \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/table/dist/makeStreamConfig.js b/tools/node_modules/eslint/node_modules/table/dist/makeStreamConfig.js
new file mode 100644
index 0000000000..479de35a7c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/table/dist/makeStreamConfig.js
@@ -0,0 +1,107 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _lodash = require('lodash');
+
+var _lodash2 = _interopRequireDefault(_lodash);
+
+var _getBorderCharacters = require('./getBorderCharacters');
+
+var _getBorderCharacters2 = _interopRequireDefault(_getBorderCharacters);
+
+var _validateConfig = require('./validateConfig');
+
+var _validateConfig2 = _interopRequireDefault(_validateConfig);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Merges user provided border characters with the default border ("honeywell") characters.
+ *
+ * @param {Object} border
+ * @returns {Object}
+ */
+const makeBorder = function makeBorder() {
+ let border = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+
+ return Object.assign({}, (0, _getBorderCharacters2.default)('honeywell'), border);
+};
+
+/**
+ * Creates a configuration for every column using default
+ * values for the missing configuration properties.
+ *
+ * @param {number} columnCount
+ * @param {Object} columns
+ * @param {Object} columnDefault
+ * @returns {Object}
+ */
+const makeColumns = function makeColumns(columnCount) {
+ let columns = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+ let columnDefault = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
+
+ _lodash2.default.times(columnCount, index => {
+ if (_lodash2.default.isUndefined(columns[index])) {
+ columns[index] = {};
+ }
+
+ columns[index] = Object.assign({
+ alignment: 'left',
+ paddingLeft: 1,
+ paddingRight: 1,
+ truncate: Infinity,
+ wrapWord: false
+ }, columnDefault, columns[index]);
+ });
+
+ return columns;
+};
+
+/**
+ * @typedef {Object} columnConfig
+ * @property {string} alignment
+ * @property {number} width
+ * @property {number} truncate
+ * @property {number} paddingLeft
+ * @property {number} paddingRight
+ */
+
+/**
+ * @typedef {Object} streamConfig
+ * @property {columnConfig} columnDefault
+ * @property {Object} border
+ * @property {columnConfig[]}
+ * @property {number} columnCount Number of columns in the table (required).
+ */
+
+/**
+ * Makes a new configuration object out of the userConfig object
+ * using default values for the missing configuration properties.
+ *
+ * @param {streamConfig} userConfig
+ * @returns {Object}
+ */
+
+exports.default = function () {
+ let userConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+
+ (0, _validateConfig2.default)('streamConfig.json', userConfig);
+
+ const config = _lodash2.default.cloneDeep(userConfig);
+
+ if (!config.columnDefault || !config.columnDefault.width) {
+ throw new Error('Must provide config.columnDefault.width when creating a stream.');
+ }
+
+ if (!config.columnCount) {
+ throw new Error('Must provide config.columnCount.');
+ }
+
+ config.border = makeBorder(config.border);
+ config.columns = makeColumns(config.columnCount, config.columns, config.columnDefault);
+
+ return config;
+}; \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/table/dist/mapDataUsingRowHeightIndex.js b/tools/node_modules/eslint/node_modules/table/dist/mapDataUsingRowHeightIndex.js
new file mode 100644
index 0000000000..bb312e66d1
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/table/dist/mapDataUsingRowHeightIndex.js
@@ -0,0 +1,57 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _lodash = require('lodash');
+
+var _lodash2 = _interopRequireDefault(_lodash);
+
+var _wrapString = require('./wrapString');
+
+var _wrapString2 = _interopRequireDefault(_wrapString);
+
+var _wrapWord = require('./wrapWord');
+
+var _wrapWord2 = _interopRequireDefault(_wrapWord);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * @param {Array} unmappedRows
+ * @param {number[]} rowHeightIndex
+ * @param {Object} config
+ * @returns {Array}
+ */
+exports.default = (unmappedRows, rowHeightIndex, config) => {
+ const tableWidth = unmappedRows[0].length;
+
+ const mappedRows = unmappedRows.map((cells, index0) => {
+ const rowHeight = _lodash2.default.times(rowHeightIndex[index0], () => {
+ return _lodash2.default.fill(Array(tableWidth), '');
+ });
+
+ // rowHeight
+ // [{row index within rowSaw; index2}]
+ // [{cell index within a virtual row; index1}]
+
+ _lodash2.default.forEach(cells, (value, index1) => {
+ let chunkedValue;
+
+ if (config.columns[index1].wrapWord) {
+ chunkedValue = (0, _wrapWord2.default)(value, config.columns[index1].width);
+ } else {
+ chunkedValue = (0, _wrapString2.default)(value, config.columns[index1].width);
+ }
+
+ _lodash2.default.forEach(chunkedValue, (part, index2) => {
+ rowHeight[index2][index1] = part;
+ });
+ });
+
+ return rowHeight;
+ });
+
+ return _lodash2.default.flatten(mappedRows);
+}; \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/table/dist/padTableData.js b/tools/node_modules/eslint/node_modules/table/dist/padTableData.js
new file mode 100644
index 0000000000..92a1126e38
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/table/dist/padTableData.js
@@ -0,0 +1,26 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _lodash = require('lodash');
+
+var _lodash2 = _interopRequireDefault(_lodash);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * @param {table~row[]} rows
+ * @param {Object} config
+ * @returns {table~row[]}
+ */
+exports.default = (rows, config) => {
+ return _lodash2.default.map(rows, cells => {
+ return _lodash2.default.map(cells, (value, index1) => {
+ const column = config.columns[index1];
+
+ return _lodash2.default.repeat(' ', column.paddingLeft) + value + _lodash2.default.repeat(' ', column.paddingRight);
+ });
+ });
+}; \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/table/dist/schemas/config.json b/tools/node_modules/eslint/node_modules/table/dist/schemas/config.json
new file mode 100644
index 0000000000..3607418149
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/table/dist/schemas/config.json
@@ -0,0 +1,114 @@
+{
+ "$id": "config.json",
+ "$schema": "http://json-schema.org/draft-06/schema#",
+ "type": "object",
+ "properties": {
+ "border": {
+ "$ref": "#/definitions/borders"
+ },
+ "columns": {
+ "$ref": "#/definitions/columns"
+ },
+ "columnDefault": {
+ "$ref": "#/definitions/column"
+ },
+ "drawHorizontalLine": {
+ "typeof": "function"
+ }
+ },
+ "additionalProperties": false,
+ "definitions": {
+ "columns": {
+ "type": "object",
+ "patternProperties": {
+ "^[0-9]+$": {
+ "$ref": "#/definitions/column"
+ }
+ },
+ "additionalProperties": false
+ },
+ "column": {
+ "type": "object",
+ "properties": {
+ "alignment": {
+ "type": "string",
+ "enum": [
+ "left",
+ "right",
+ "center"
+ ]
+ },
+ "width": {
+ "type": "number"
+ },
+ "wrapWord": {
+ "type": "boolean"
+ },
+ "truncate": {
+ "type": "number"
+ },
+ "paddingLeft": {
+ "type": "number"
+ },
+ "paddingRight": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false
+ },
+ "borders": {
+ "type": "object",
+ "properties": {
+ "topBody": {
+ "$ref": "#/definitions/border"
+ },
+ "topJoin": {
+ "$ref": "#/definitions/border"
+ },
+ "topLeft": {
+ "$ref": "#/definitions/border"
+ },
+ "topRight": {
+ "$ref": "#/definitions/border"
+ },
+ "bottomBody": {
+ "$ref": "#/definitions/border"
+ },
+ "bottomJoin": {
+ "$ref": "#/definitions/border"
+ },
+ "bottomLeft": {
+ "$ref": "#/definitions/border"
+ },
+ "bottomRight": {
+ "$ref": "#/definitions/border"
+ },
+ "bodyLeft": {
+ "$ref": "#/definitions/border"
+ },
+ "bodyRight": {
+ "$ref": "#/definitions/border"
+ },
+ "bodyJoin": {
+ "$ref": "#/definitions/border"
+ },
+ "joinBody": {
+ "$ref": "#/definitions/border"
+ },
+ "joinLeft": {
+ "$ref": "#/definitions/border"
+ },
+ "joinRight": {
+ "$ref": "#/definitions/border"
+ },
+ "joinJoin": {
+ "$ref": "#/definitions/border"
+ }
+ },
+ "additionalProperties": false
+ },
+ "border": {
+ "type": "string"
+ }
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/table/dist/schemas/streamConfig.json b/tools/node_modules/eslint/node_modules/table/dist/schemas/streamConfig.json
new file mode 100644
index 0000000000..d8402a6248
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/table/dist/schemas/streamConfig.json
@@ -0,0 +1,114 @@
+{
+ "$id": "streamConfig.json",
+ "$schema": "http://json-schema.org/draft-06/schema#",
+ "type": "object",
+ "properties": {
+ "border": {
+ "$ref": "#/definitions/borders"
+ },
+ "columns": {
+ "$ref": "#/definitions/columns"
+ },
+ "columnDefault": {
+ "$ref": "#/definitions/column"
+ },
+ "columnCount": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false,
+ "definitions": {
+ "columns": {
+ "type": "object",
+ "patternProperties": {
+ "^[0-9]+$": {
+ "$ref": "#/definitions/column"
+ }
+ },
+ "additionalProperties": false
+ },
+ "column": {
+ "type": "object",
+ "properties": {
+ "alignment": {
+ "type": "string",
+ "enum": [
+ "left",
+ "right",
+ "center"
+ ]
+ },
+ "width": {
+ "type": "number"
+ },
+ "wrapWord": {
+ "type": "boolean"
+ },
+ "truncate": {
+ "type": "number"
+ },
+ "paddingLeft": {
+ "type": "number"
+ },
+ "paddingRight": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false
+ },
+ "borders": {
+ "type": "object",
+ "properties": {
+ "topBody": {
+ "$ref": "#/definitions/border"
+ },
+ "topJoin": {
+ "$ref": "#/definitions/border"
+ },
+ "topLeft": {
+ "$ref": "#/definitions/border"
+ },
+ "topRight": {
+ "$ref": "#/definitions/border"
+ },
+ "bottomBody": {
+ "$ref": "#/definitions/border"
+ },
+ "bottomJoin": {
+ "$ref": "#/definitions/border"
+ },
+ "bottomLeft": {
+ "$ref": "#/definitions/border"
+ },
+ "bottomRight": {
+ "$ref": "#/definitions/border"
+ },
+ "bodyLeft": {
+ "$ref": "#/definitions/border"
+ },
+ "bodyRight": {
+ "$ref": "#/definitions/border"
+ },
+ "bodyJoin": {
+ "$ref": "#/definitions/border"
+ },
+ "joinBody": {
+ "$ref": "#/definitions/border"
+ },
+ "joinLeft": {
+ "$ref": "#/definitions/border"
+ },
+ "joinRight": {
+ "$ref": "#/definitions/border"
+ },
+ "joinJoin": {
+ "$ref": "#/definitions/border"
+ }
+ },
+ "additionalProperties": false
+ },
+ "border": {
+ "type": "string"
+ }
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/table/dist/stringifyTableData.js b/tools/node_modules/eslint/node_modules/table/dist/stringifyTableData.js
new file mode 100644
index 0000000000..46a8b94a39
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/table/dist/stringifyTableData.js
@@ -0,0 +1,17 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+/**
+ * Casts all cell values to a string.
+ *
+ * @param {table~row[]} rows
+ * @returns {table~row[]}
+ */
+exports.default = rows => {
+ return rows.map(cells => {
+ return cells.map(String);
+ });
+}; \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/table/dist/table.js b/tools/node_modules/eslint/node_modules/table/dist/table.js
new file mode 100644
index 0000000000..fe8c3cfeb1
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/table/dist/table.js
@@ -0,0 +1,133 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _drawTable = require('./drawTable');
+
+var _drawTable2 = _interopRequireDefault(_drawTable);
+
+var _calculateCellWidthIndex = require('./calculateCellWidthIndex');
+
+var _calculateCellWidthIndex2 = _interopRequireDefault(_calculateCellWidthIndex);
+
+var _makeConfig = require('./makeConfig');
+
+var _makeConfig2 = _interopRequireDefault(_makeConfig);
+
+var _calculateRowHeightIndex = require('./calculateRowHeightIndex');
+
+var _calculateRowHeightIndex2 = _interopRequireDefault(_calculateRowHeightIndex);
+
+var _mapDataUsingRowHeightIndex = require('./mapDataUsingRowHeightIndex');
+
+var _mapDataUsingRowHeightIndex2 = _interopRequireDefault(_mapDataUsingRowHeightIndex);
+
+var _alignTableData = require('./alignTableData');
+
+var _alignTableData2 = _interopRequireDefault(_alignTableData);
+
+var _padTableData = require('./padTableData');
+
+var _padTableData2 = _interopRequireDefault(_padTableData);
+
+var _validateTableData = require('./validateTableData');
+
+var _validateTableData2 = _interopRequireDefault(_validateTableData);
+
+var _stringifyTableData = require('./stringifyTableData');
+
+var _stringifyTableData2 = _interopRequireDefault(_stringifyTableData);
+
+var _truncateTableData = require('./truncateTableData');
+
+var _truncateTableData2 = _interopRequireDefault(_truncateTableData);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * @typedef {string} table~cell
+ */
+
+/**
+ * @typedef {table~cell[]} table~row
+ */
+
+/**
+ * @typedef {Object} table~columns
+ * @property {string} alignment Cell content alignment (enum: left, center, right) (default: left).
+ * @property {number} width Column width (default: auto).
+ * @property {number} truncate Number of characters are which the content will be truncated (default: Infinity).
+ * @property {number} paddingLeft Cell content padding width left (default: 1).
+ * @property {number} paddingRight Cell content padding width right (default: 1).
+ */
+
+/**
+ * @typedef {Object} table~border
+ * @property {string} topBody
+ * @property {string} topJoin
+ * @property {string} topLeft
+ * @property {string} topRight
+ * @property {string} bottomBody
+ * @property {string} bottomJoin
+ * @property {string} bottomLeft
+ * @property {string} bottomRight
+ * @property {string} bodyLeft
+ * @property {string} bodyRight
+ * @property {string} bodyJoin
+ * @property {string} joinBody
+ * @property {string} joinLeft
+ * @property {string} joinRight
+ * @property {string} joinJoin
+ */
+
+/**
+ * Used to tell whether to draw a horizontal line.
+ * This callback is called for each non-content line of the table.
+ * The default behavior is to always return true.
+ *
+ * @typedef {Function} drawHorizontalLine
+ * @param {number} index
+ * @param {number} size
+ * @returns {boolean}
+ */
+
+/**
+ * @typedef {Object} table~config
+ * @property {table~border} border
+ * @property {table~columns[]} columns Column specific configuration.
+ * @property {table~columns} columnDefault Default values for all columns. Column specific settings overwrite the default values.
+ * @property {table~drawHorizontalLine} drawHorizontalLine
+ */
+
+/**
+ * Generates a text table.
+ *
+ * @param {table~row[]} data
+ * @param {table~config} userConfig
+ * @returns {string}
+ */
+exports.default = function (data) {
+ let userConfig = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+
+ let rows;
+
+ (0, _validateTableData2.default)(data);
+
+ rows = (0, _stringifyTableData2.default)(data);
+
+ const config = (0, _makeConfig2.default)(rows, userConfig);
+
+ rows = (0, _truncateTableData2.default)(data, config);
+
+ const rowHeightIndex = (0, _calculateRowHeightIndex2.default)(rows, config);
+
+ rows = (0, _mapDataUsingRowHeightIndex2.default)(rows, rowHeightIndex, config);
+ rows = (0, _alignTableData2.default)(rows, config);
+ rows = (0, _padTableData2.default)(rows, config);
+
+ const cellWidthIndex = (0, _calculateCellWidthIndex2.default)(rows[0]);
+
+ return (0, _drawTable2.default)(rows, config.border, cellWidthIndex, rowHeightIndex, config.drawHorizontalLine);
+}; \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/table/dist/truncateTableData.js b/tools/node_modules/eslint/node_modules/table/dist/truncateTableData.js
new file mode 100644
index 0000000000..16b6b9451b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/table/dist/truncateTableData.js
@@ -0,0 +1,27 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _lodash = require('lodash');
+
+var _lodash2 = _interopRequireDefault(_lodash);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * @todo Make it work with ASCII content.
+ * @param {table~row[]} rows
+ * @param {Object} config
+ * @returns {table~row[]}
+ */
+exports.default = (rows, config) => {
+ return _lodash2.default.map(rows, cells => {
+ return _lodash2.default.map(cells, (content, index) => {
+ return _lodash2.default.truncate(content, {
+ length: config.columns[index].truncate
+ });
+ });
+ });
+}; \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/table/dist/validateConfig.js b/tools/node_modules/eslint/node_modules/table/dist/validateConfig.js
new file mode 100644
index 0000000000..3ea3ddea8f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/table/dist/validateConfig.js
@@ -0,0 +1,753 @@
+'use strict';
+var equal = require('ajv/lib/compile/equal');
+var validate = (function() {
+ var pattern0 = new RegExp('^[0-9]+$');
+ var refVal = [];
+ var refVal1 = (function() {
+ var pattern0 = new RegExp('^[0-9]+$');
+ return function validate(data, dataPath, parentData, parentDataProperty, rootData) {
+ 'use strict';
+ var vErrors = null;
+ var errors = 0;
+ if (rootData === undefined) rootData = data;
+ if ((data && typeof data === "object" && !Array.isArray(data))) {
+ var errs__0 = errors;
+ var valid1 = true;
+ for (var key0 in data) {
+ var isAdditional0 = !(false || validate.schema.properties[key0]);
+ if (isAdditional0) {
+ valid1 = false;
+ var err = {
+ keyword: 'additionalProperties',
+ dataPath: (dataPath || '') + "",
+ schemaPath: '#/additionalProperties',
+ params: {
+ additionalProperty: '' + key0 + ''
+ },
+ message: 'should NOT have additional properties'
+ };
+ if (vErrors === null) vErrors = [err];
+ else vErrors.push(err);
+ errors++;
+ }
+ }
+ if (data.topBody !== undefined) {
+ var errs_1 = errors;
+ if (!refVal2(data.topBody, (dataPath || '') + '.topBody', data, 'topBody', rootData)) {
+ if (vErrors === null) vErrors = refVal2.errors;
+ else vErrors = vErrors.concat(refVal2.errors);
+ errors = vErrors.length;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.topJoin !== undefined) {
+ var errs_1 = errors;
+ if (!refVal[2](data.topJoin, (dataPath || '') + '.topJoin', data, 'topJoin', rootData)) {
+ if (vErrors === null) vErrors = refVal[2].errors;
+ else vErrors = vErrors.concat(refVal[2].errors);
+ errors = vErrors.length;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.topLeft !== undefined) {
+ var errs_1 = errors;
+ if (!refVal[2](data.topLeft, (dataPath || '') + '.topLeft', data, 'topLeft', rootData)) {
+ if (vErrors === null) vErrors = refVal[2].errors;
+ else vErrors = vErrors.concat(refVal[2].errors);
+ errors = vErrors.length;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.topRight !== undefined) {
+ var errs_1 = errors;
+ if (!refVal[2](data.topRight, (dataPath || '') + '.topRight', data, 'topRight', rootData)) {
+ if (vErrors === null) vErrors = refVal[2].errors;
+ else vErrors = vErrors.concat(refVal[2].errors);
+ errors = vErrors.length;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.bottomBody !== undefined) {
+ var errs_1 = errors;
+ if (!refVal[2](data.bottomBody, (dataPath || '') + '.bottomBody', data, 'bottomBody', rootData)) {
+ if (vErrors === null) vErrors = refVal[2].errors;
+ else vErrors = vErrors.concat(refVal[2].errors);
+ errors = vErrors.length;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.bottomJoin !== undefined) {
+ var errs_1 = errors;
+ if (!refVal[2](data.bottomJoin, (dataPath || '') + '.bottomJoin', data, 'bottomJoin', rootData)) {
+ if (vErrors === null) vErrors = refVal[2].errors;
+ else vErrors = vErrors.concat(refVal[2].errors);
+ errors = vErrors.length;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.bottomLeft !== undefined) {
+ var errs_1 = errors;
+ if (!refVal[2](data.bottomLeft, (dataPath || '') + '.bottomLeft', data, 'bottomLeft', rootData)) {
+ if (vErrors === null) vErrors = refVal[2].errors;
+ else vErrors = vErrors.concat(refVal[2].errors);
+ errors = vErrors.length;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.bottomRight !== undefined) {
+ var errs_1 = errors;
+ if (!refVal[2](data.bottomRight, (dataPath || '') + '.bottomRight', data, 'bottomRight', rootData)) {
+ if (vErrors === null) vErrors = refVal[2].errors;
+ else vErrors = vErrors.concat(refVal[2].errors);
+ errors = vErrors.length;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.bodyLeft !== undefined) {
+ var errs_1 = errors;
+ if (!refVal[2](data.bodyLeft, (dataPath || '') + '.bodyLeft', data, 'bodyLeft', rootData)) {
+ if (vErrors === null) vErrors = refVal[2].errors;
+ else vErrors = vErrors.concat(refVal[2].errors);
+ errors = vErrors.length;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.bodyRight !== undefined) {
+ var errs_1 = errors;
+ if (!refVal[2](data.bodyRight, (dataPath || '') + '.bodyRight', data, 'bodyRight', rootData)) {
+ if (vErrors === null) vErrors = refVal[2].errors;
+ else vErrors = vErrors.concat(refVal[2].errors);
+ errors = vErrors.length;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.bodyJoin !== undefined) {
+ var errs_1 = errors;
+ if (!refVal[2](data.bodyJoin, (dataPath || '') + '.bodyJoin', data, 'bodyJoin', rootData)) {
+ if (vErrors === null) vErrors = refVal[2].errors;
+ else vErrors = vErrors.concat(refVal[2].errors);
+ errors = vErrors.length;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.joinBody !== undefined) {
+ var errs_1 = errors;
+ if (!refVal[2](data.joinBody, (dataPath || '') + '.joinBody', data, 'joinBody', rootData)) {
+ if (vErrors === null) vErrors = refVal[2].errors;
+ else vErrors = vErrors.concat(refVal[2].errors);
+ errors = vErrors.length;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.joinLeft !== undefined) {
+ var errs_1 = errors;
+ if (!refVal[2](data.joinLeft, (dataPath || '') + '.joinLeft', data, 'joinLeft', rootData)) {
+ if (vErrors === null) vErrors = refVal[2].errors;
+ else vErrors = vErrors.concat(refVal[2].errors);
+ errors = vErrors.length;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.joinRight !== undefined) {
+ var errs_1 = errors;
+ if (!refVal[2](data.joinRight, (dataPath || '') + '.joinRight', data, 'joinRight', rootData)) {
+ if (vErrors === null) vErrors = refVal[2].errors;
+ else vErrors = vErrors.concat(refVal[2].errors);
+ errors = vErrors.length;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.joinJoin !== undefined) {
+ var errs_1 = errors;
+ if (!refVal[2](data.joinJoin, (dataPath || '') + '.joinJoin', data, 'joinJoin', rootData)) {
+ if (vErrors === null) vErrors = refVal[2].errors;
+ else vErrors = vErrors.concat(refVal[2].errors);
+ errors = vErrors.length;
+ }
+ var valid1 = errors === errs_1;
+ }
+ } else {
+ var err = {
+ keyword: 'type',
+ dataPath: (dataPath || '') + "",
+ schemaPath: '#/type',
+ params: {
+ type: 'object'
+ },
+ message: 'should be object'
+ };
+ if (vErrors === null) vErrors = [err];
+ else vErrors.push(err);
+ errors++;
+ }
+ validate.errors = vErrors;
+ return errors === 0;
+ };
+ })();
+ refVal1.schema = {
+ "type": "object",
+ "properties": {
+ "topBody": {
+ "$ref": "#/definitions/border"
+ },
+ "topJoin": {
+ "$ref": "#/definitions/border"
+ },
+ "topLeft": {
+ "$ref": "#/definitions/border"
+ },
+ "topRight": {
+ "$ref": "#/definitions/border"
+ },
+ "bottomBody": {
+ "$ref": "#/definitions/border"
+ },
+ "bottomJoin": {
+ "$ref": "#/definitions/border"
+ },
+ "bottomLeft": {
+ "$ref": "#/definitions/border"
+ },
+ "bottomRight": {
+ "$ref": "#/definitions/border"
+ },
+ "bodyLeft": {
+ "$ref": "#/definitions/border"
+ },
+ "bodyRight": {
+ "$ref": "#/definitions/border"
+ },
+ "bodyJoin": {
+ "$ref": "#/definitions/border"
+ },
+ "joinBody": {
+ "$ref": "#/definitions/border"
+ },
+ "joinLeft": {
+ "$ref": "#/definitions/border"
+ },
+ "joinRight": {
+ "$ref": "#/definitions/border"
+ },
+ "joinJoin": {
+ "$ref": "#/definitions/border"
+ }
+ },
+ "additionalProperties": false
+ };
+ refVal1.errors = null;
+ refVal[1] = refVal1;
+ var refVal2 = (function() {
+ var pattern0 = new RegExp('^[0-9]+$');
+ return function validate(data, dataPath, parentData, parentDataProperty, rootData) {
+ 'use strict';
+ var vErrors = null;
+ var errors = 0;
+ if (typeof data !== "string") {
+ var err = {
+ keyword: 'type',
+ dataPath: (dataPath || '') + "",
+ schemaPath: '#/type',
+ params: {
+ type: 'string'
+ },
+ message: 'should be string'
+ };
+ if (vErrors === null) vErrors = [err];
+ else vErrors.push(err);
+ errors++;
+ }
+ validate.errors = vErrors;
+ return errors === 0;
+ };
+ })();
+ refVal2.schema = {
+ "type": "string"
+ };
+ refVal2.errors = null;
+ refVal[2] = refVal2;
+ var refVal3 = (function() {
+ var pattern0 = new RegExp('^[0-9]+$');
+ return function validate(data, dataPath, parentData, parentDataProperty, rootData) {
+ 'use strict';
+ var vErrors = null;
+ var errors = 0;
+ if (rootData === undefined) rootData = data;
+ if ((data && typeof data === "object" && !Array.isArray(data))) {
+ var errs__0 = errors;
+ var valid1 = true;
+ for (var key0 in data) {
+ var isAdditional0 = !(false || pattern0.test(key0));
+ if (isAdditional0) {
+ valid1 = false;
+ var err = {
+ keyword: 'additionalProperties',
+ dataPath: (dataPath || '') + "",
+ schemaPath: '#/additionalProperties',
+ params: {
+ additionalProperty: '' + key0 + ''
+ },
+ message: 'should NOT have additional properties'
+ };
+ if (vErrors === null) vErrors = [err];
+ else vErrors.push(err);
+ errors++;
+ }
+ }
+ for (var key0 in data) {
+ if (pattern0.test(key0)) {
+ var errs_1 = errors;
+ if (!refVal4(data[key0], (dataPath || '') + '[\'' + key0 + '\']', data, key0, rootData)) {
+ if (vErrors === null) vErrors = refVal4.errors;
+ else vErrors = vErrors.concat(refVal4.errors);
+ errors = vErrors.length;
+ }
+ var valid1 = errors === errs_1;
+ }
+ }
+ } else {
+ var err = {
+ keyword: 'type',
+ dataPath: (dataPath || '') + "",
+ schemaPath: '#/type',
+ params: {
+ type: 'object'
+ },
+ message: 'should be object'
+ };
+ if (vErrors === null) vErrors = [err];
+ else vErrors.push(err);
+ errors++;
+ }
+ validate.errors = vErrors;
+ return errors === 0;
+ };
+ })();
+ refVal3.schema = {
+ "type": "object",
+ "patternProperties": {
+ "^[0-9]+$": {
+ "$ref": "#/definitions/column"
+ }
+ },
+ "additionalProperties": false
+ };
+ refVal3.errors = null;
+ refVal[3] = refVal3;
+ var refVal4 = (function() {
+ var pattern0 = new RegExp('^[0-9]+$');
+ return function validate(data, dataPath, parentData, parentDataProperty, rootData) {
+ 'use strict';
+ var vErrors = null;
+ var errors = 0;
+ if ((data && typeof data === "object" && !Array.isArray(data))) {
+ var errs__0 = errors;
+ var valid1 = true;
+ for (var key0 in data) {
+ var isAdditional0 = !(false || validate.schema.properties[key0]);
+ if (isAdditional0) {
+ valid1 = false;
+ var err = {
+ keyword: 'additionalProperties',
+ dataPath: (dataPath || '') + "",
+ schemaPath: '#/additionalProperties',
+ params: {
+ additionalProperty: '' + key0 + ''
+ },
+ message: 'should NOT have additional properties'
+ };
+ if (vErrors === null) vErrors = [err];
+ else vErrors.push(err);
+ errors++;
+ }
+ }
+ var data1 = data.alignment;
+ if (data1 !== undefined) {
+ var errs_1 = errors;
+ if (typeof data1 !== "string") {
+ var err = {
+ keyword: 'type',
+ dataPath: (dataPath || '') + '.alignment',
+ schemaPath: '#/properties/alignment/type',
+ params: {
+ type: 'string'
+ },
+ message: 'should be string'
+ };
+ if (vErrors === null) vErrors = [err];
+ else vErrors.push(err);
+ errors++;
+ }
+ var schema1 = validate.schema.properties.alignment.enum;
+ var valid1;
+ valid1 = false;
+ for (var i1 = 0; i1 < schema1.length; i1++)
+ if (equal(data1, schema1[i1])) {
+ valid1 = true;
+ break;
+ }
+ if (!valid1) {
+ var err = {
+ keyword: 'enum',
+ dataPath: (dataPath || '') + '.alignment',
+ schemaPath: '#/properties/alignment/enum',
+ params: {
+ allowedValues: schema1
+ },
+ message: 'should be equal to one of the allowed values'
+ };
+ if (vErrors === null) vErrors = [err];
+ else vErrors.push(err);
+ errors++;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.width !== undefined) {
+ var errs_1 = errors;
+ if (typeof data.width !== "number") {
+ var err = {
+ keyword: 'type',
+ dataPath: (dataPath || '') + '.width',
+ schemaPath: '#/properties/width/type',
+ params: {
+ type: 'number'
+ },
+ message: 'should be number'
+ };
+ if (vErrors === null) vErrors = [err];
+ else vErrors.push(err);
+ errors++;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.wrapWord !== undefined) {
+ var errs_1 = errors;
+ if (typeof data.wrapWord !== "boolean") {
+ var err = {
+ keyword: 'type',
+ dataPath: (dataPath || '') + '.wrapWord',
+ schemaPath: '#/properties/wrapWord/type',
+ params: {
+ type: 'boolean'
+ },
+ message: 'should be boolean'
+ };
+ if (vErrors === null) vErrors = [err];
+ else vErrors.push(err);
+ errors++;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.truncate !== undefined) {
+ var errs_1 = errors;
+ if (typeof data.truncate !== "number") {
+ var err = {
+ keyword: 'type',
+ dataPath: (dataPath || '') + '.truncate',
+ schemaPath: '#/properties/truncate/type',
+ params: {
+ type: 'number'
+ },
+ message: 'should be number'
+ };
+ if (vErrors === null) vErrors = [err];
+ else vErrors.push(err);
+ errors++;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.paddingLeft !== undefined) {
+ var errs_1 = errors;
+ if (typeof data.paddingLeft !== "number") {
+ var err = {
+ keyword: 'type',
+ dataPath: (dataPath || '') + '.paddingLeft',
+ schemaPath: '#/properties/paddingLeft/type',
+ params: {
+ type: 'number'
+ },
+ message: 'should be number'
+ };
+ if (vErrors === null) vErrors = [err];
+ else vErrors.push(err);
+ errors++;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.paddingRight !== undefined) {
+ var errs_1 = errors;
+ if (typeof data.paddingRight !== "number") {
+ var err = {
+ keyword: 'type',
+ dataPath: (dataPath || '') + '.paddingRight',
+ schemaPath: '#/properties/paddingRight/type',
+ params: {
+ type: 'number'
+ },
+ message: 'should be number'
+ };
+ if (vErrors === null) vErrors = [err];
+ else vErrors.push(err);
+ errors++;
+ }
+ var valid1 = errors === errs_1;
+ }
+ } else {
+ var err = {
+ keyword: 'type',
+ dataPath: (dataPath || '') + "",
+ schemaPath: '#/type',
+ params: {
+ type: 'object'
+ },
+ message: 'should be object'
+ };
+ if (vErrors === null) vErrors = [err];
+ else vErrors.push(err);
+ errors++;
+ }
+ validate.errors = vErrors;
+ return errors === 0;
+ };
+ })();
+ refVal4.schema = {
+ "type": "object",
+ "properties": {
+ "alignment": {
+ "type": "string",
+ "enum": ["left", "right", "center"]
+ },
+ "width": {
+ "type": "number"
+ },
+ "wrapWord": {
+ "type": "boolean"
+ },
+ "truncate": {
+ "type": "number"
+ },
+ "paddingLeft": {
+ "type": "number"
+ },
+ "paddingRight": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false
+ };
+ refVal4.errors = null;
+ refVal[4] = refVal4;
+ return function validate(data, dataPath, parentData, parentDataProperty, rootData) {
+ 'use strict'; /*# sourceURL=config.json */
+ var vErrors = null;
+ var errors = 0;
+ if (rootData === undefined) rootData = data;
+ if ((data && typeof data === "object" && !Array.isArray(data))) {
+ var errs__0 = errors;
+ var valid1 = true;
+ for (var key0 in data) {
+ var isAdditional0 = !(false || key0 == 'border' || key0 == 'columns' || key0 == 'columnDefault' || key0 == 'drawHorizontalLine');
+ if (isAdditional0) {
+ valid1 = false;
+ var err = {
+ keyword: 'additionalProperties',
+ dataPath: (dataPath || '') + "",
+ schemaPath: '#/additionalProperties',
+ params: {
+ additionalProperty: '' + key0 + ''
+ },
+ message: 'should NOT have additional properties'
+ };
+ if (vErrors === null) vErrors = [err];
+ else vErrors.push(err);
+ errors++;
+ }
+ }
+ if (data.border !== undefined) {
+ var errs_1 = errors;
+ if (!refVal1(data.border, (dataPath || '') + '.border', data, 'border', rootData)) {
+ if (vErrors === null) vErrors = refVal1.errors;
+ else vErrors = vErrors.concat(refVal1.errors);
+ errors = vErrors.length;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.columns !== undefined) {
+ var errs_1 = errors;
+ if (!refVal3(data.columns, (dataPath || '') + '.columns', data, 'columns', rootData)) {
+ if (vErrors === null) vErrors = refVal3.errors;
+ else vErrors = vErrors.concat(refVal3.errors);
+ errors = vErrors.length;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.columnDefault !== undefined) {
+ var errs_1 = errors;
+ if (!refVal[4](data.columnDefault, (dataPath || '') + '.columnDefault', data, 'columnDefault', rootData)) {
+ if (vErrors === null) vErrors = refVal[4].errors;
+ else vErrors = vErrors.concat(refVal[4].errors);
+ errors = vErrors.length;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.drawHorizontalLine !== undefined) {
+ var errs_1 = errors;
+ var errs__1 = errors;
+ var valid1;
+ valid1 = typeof data.drawHorizontalLine == "function";
+ if (!valid1) {
+ if (errs__1 == errors) {
+ var err = {
+ keyword: 'typeof',
+ dataPath: (dataPath || '') + '.drawHorizontalLine',
+ schemaPath: '#/properties/drawHorizontalLine/typeof',
+ params: {
+ keyword: 'typeof'
+ },
+ message: 'should pass "typeof" keyword validation'
+ };
+ if (vErrors === null) vErrors = [err];
+ else vErrors.push(err);
+ errors++;
+ } else {
+ for (var i1 = errs__1; i1 < errors; i1++) {
+ var ruleErr1 = vErrors[i1];
+ if (ruleErr1.dataPath === undefined) ruleErr1.dataPath = (dataPath || '') + '.drawHorizontalLine';
+ if (ruleErr1.schemaPath === undefined) {
+ ruleErr1.schemaPath = "#/properties/drawHorizontalLine/typeof";
+ }
+ }
+ }
+ }
+ var valid1 = errors === errs_1;
+ }
+ } else {
+ var err = {
+ keyword: 'type',
+ dataPath: (dataPath || '') + "",
+ schemaPath: '#/type',
+ params: {
+ type: 'object'
+ },
+ message: 'should be object'
+ };
+ if (vErrors === null) vErrors = [err];
+ else vErrors.push(err);
+ errors++;
+ }
+ validate.errors = vErrors;
+ return errors === 0;
+ };
+})();
+validate.schema = {
+ "$id": "config.json",
+ "$schema": "http://json-schema.org/draft-06/schema#",
+ "type": "object",
+ "properties": {
+ "border": {
+ "$ref": "#/definitions/borders"
+ },
+ "columns": {
+ "$ref": "#/definitions/columns"
+ },
+ "columnDefault": {
+ "$ref": "#/definitions/column"
+ },
+ "drawHorizontalLine": {
+ "typeof": "function"
+ }
+ },
+ "additionalProperties": false,
+ "definitions": {
+ "columns": {
+ "type": "object",
+ "patternProperties": {
+ "^[0-9]+$": {
+ "$ref": "#/definitions/column"
+ }
+ },
+ "additionalProperties": false
+ },
+ "column": {
+ "type": "object",
+ "properties": {
+ "alignment": {
+ "type": "string",
+ "enum": ["left", "right", "center"]
+ },
+ "width": {
+ "type": "number"
+ },
+ "wrapWord": {
+ "type": "boolean"
+ },
+ "truncate": {
+ "type": "number"
+ },
+ "paddingLeft": {
+ "type": "number"
+ },
+ "paddingRight": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false
+ },
+ "borders": {
+ "type": "object",
+ "properties": {
+ "topBody": {
+ "$ref": "#/definitions/border"
+ },
+ "topJoin": {
+ "$ref": "#/definitions/border"
+ },
+ "topLeft": {
+ "$ref": "#/definitions/border"
+ },
+ "topRight": {
+ "$ref": "#/definitions/border"
+ },
+ "bottomBody": {
+ "$ref": "#/definitions/border"
+ },
+ "bottomJoin": {
+ "$ref": "#/definitions/border"
+ },
+ "bottomLeft": {
+ "$ref": "#/definitions/border"
+ },
+ "bottomRight": {
+ "$ref": "#/definitions/border"
+ },
+ "bodyLeft": {
+ "$ref": "#/definitions/border"
+ },
+ "bodyRight": {
+ "$ref": "#/definitions/border"
+ },
+ "bodyJoin": {
+ "$ref": "#/definitions/border"
+ },
+ "joinBody": {
+ "$ref": "#/definitions/border"
+ },
+ "joinLeft": {
+ "$ref": "#/definitions/border"
+ },
+ "joinRight": {
+ "$ref": "#/definitions/border"
+ },
+ "joinJoin": {
+ "$ref": "#/definitions/border"
+ }
+ },
+ "additionalProperties": false
+ },
+ "border": {
+ "type": "string"
+ }
+ }
+};
+validate.errors = null;
+module.exports = validate; \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/table/dist/validateStreamConfig.js b/tools/node_modules/eslint/node_modules/table/dist/validateStreamConfig.js
new file mode 100644
index 0000000000..05c4b04c6b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/table/dist/validateStreamConfig.js
@@ -0,0 +1,740 @@
+'use strict';
+var equal = require('ajv/lib/compile/equal');
+var validate = (function() {
+ var pattern0 = new RegExp('^[0-9]+$');
+ var refVal = [];
+ var refVal1 = (function() {
+ var pattern0 = new RegExp('^[0-9]+$');
+ return function validate(data, dataPath, parentData, parentDataProperty, rootData) {
+ 'use strict';
+ var vErrors = null;
+ var errors = 0;
+ if (rootData === undefined) rootData = data;
+ if ((data && typeof data === "object" && !Array.isArray(data))) {
+ var errs__0 = errors;
+ var valid1 = true;
+ for (var key0 in data) {
+ var isAdditional0 = !(false || validate.schema.properties[key0]);
+ if (isAdditional0) {
+ valid1 = false;
+ var err = {
+ keyword: 'additionalProperties',
+ dataPath: (dataPath || '') + "",
+ schemaPath: '#/additionalProperties',
+ params: {
+ additionalProperty: '' + key0 + ''
+ },
+ message: 'should NOT have additional properties'
+ };
+ if (vErrors === null) vErrors = [err];
+ else vErrors.push(err);
+ errors++;
+ }
+ }
+ if (data.topBody !== undefined) {
+ var errs_1 = errors;
+ if (!refVal2(data.topBody, (dataPath || '') + '.topBody', data, 'topBody', rootData)) {
+ if (vErrors === null) vErrors = refVal2.errors;
+ else vErrors = vErrors.concat(refVal2.errors);
+ errors = vErrors.length;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.topJoin !== undefined) {
+ var errs_1 = errors;
+ if (!refVal[2](data.topJoin, (dataPath || '') + '.topJoin', data, 'topJoin', rootData)) {
+ if (vErrors === null) vErrors = refVal[2].errors;
+ else vErrors = vErrors.concat(refVal[2].errors);
+ errors = vErrors.length;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.topLeft !== undefined) {
+ var errs_1 = errors;
+ if (!refVal[2](data.topLeft, (dataPath || '') + '.topLeft', data, 'topLeft', rootData)) {
+ if (vErrors === null) vErrors = refVal[2].errors;
+ else vErrors = vErrors.concat(refVal[2].errors);
+ errors = vErrors.length;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.topRight !== undefined) {
+ var errs_1 = errors;
+ if (!refVal[2](data.topRight, (dataPath || '') + '.topRight', data, 'topRight', rootData)) {
+ if (vErrors === null) vErrors = refVal[2].errors;
+ else vErrors = vErrors.concat(refVal[2].errors);
+ errors = vErrors.length;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.bottomBody !== undefined) {
+ var errs_1 = errors;
+ if (!refVal[2](data.bottomBody, (dataPath || '') + '.bottomBody', data, 'bottomBody', rootData)) {
+ if (vErrors === null) vErrors = refVal[2].errors;
+ else vErrors = vErrors.concat(refVal[2].errors);
+ errors = vErrors.length;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.bottomJoin !== undefined) {
+ var errs_1 = errors;
+ if (!refVal[2](data.bottomJoin, (dataPath || '') + '.bottomJoin', data, 'bottomJoin', rootData)) {
+ if (vErrors === null) vErrors = refVal[2].errors;
+ else vErrors = vErrors.concat(refVal[2].errors);
+ errors = vErrors.length;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.bottomLeft !== undefined) {
+ var errs_1 = errors;
+ if (!refVal[2](data.bottomLeft, (dataPath || '') + '.bottomLeft', data, 'bottomLeft', rootData)) {
+ if (vErrors === null) vErrors = refVal[2].errors;
+ else vErrors = vErrors.concat(refVal[2].errors);
+ errors = vErrors.length;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.bottomRight !== undefined) {
+ var errs_1 = errors;
+ if (!refVal[2](data.bottomRight, (dataPath || '') + '.bottomRight', data, 'bottomRight', rootData)) {
+ if (vErrors === null) vErrors = refVal[2].errors;
+ else vErrors = vErrors.concat(refVal[2].errors);
+ errors = vErrors.length;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.bodyLeft !== undefined) {
+ var errs_1 = errors;
+ if (!refVal[2](data.bodyLeft, (dataPath || '') + '.bodyLeft', data, 'bodyLeft', rootData)) {
+ if (vErrors === null) vErrors = refVal[2].errors;
+ else vErrors = vErrors.concat(refVal[2].errors);
+ errors = vErrors.length;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.bodyRight !== undefined) {
+ var errs_1 = errors;
+ if (!refVal[2](data.bodyRight, (dataPath || '') + '.bodyRight', data, 'bodyRight', rootData)) {
+ if (vErrors === null) vErrors = refVal[2].errors;
+ else vErrors = vErrors.concat(refVal[2].errors);
+ errors = vErrors.length;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.bodyJoin !== undefined) {
+ var errs_1 = errors;
+ if (!refVal[2](data.bodyJoin, (dataPath || '') + '.bodyJoin', data, 'bodyJoin', rootData)) {
+ if (vErrors === null) vErrors = refVal[2].errors;
+ else vErrors = vErrors.concat(refVal[2].errors);
+ errors = vErrors.length;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.joinBody !== undefined) {
+ var errs_1 = errors;
+ if (!refVal[2](data.joinBody, (dataPath || '') + '.joinBody', data, 'joinBody', rootData)) {
+ if (vErrors === null) vErrors = refVal[2].errors;
+ else vErrors = vErrors.concat(refVal[2].errors);
+ errors = vErrors.length;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.joinLeft !== undefined) {
+ var errs_1 = errors;
+ if (!refVal[2](data.joinLeft, (dataPath || '') + '.joinLeft', data, 'joinLeft', rootData)) {
+ if (vErrors === null) vErrors = refVal[2].errors;
+ else vErrors = vErrors.concat(refVal[2].errors);
+ errors = vErrors.length;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.joinRight !== undefined) {
+ var errs_1 = errors;
+ if (!refVal[2](data.joinRight, (dataPath || '') + '.joinRight', data, 'joinRight', rootData)) {
+ if (vErrors === null) vErrors = refVal[2].errors;
+ else vErrors = vErrors.concat(refVal[2].errors);
+ errors = vErrors.length;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.joinJoin !== undefined) {
+ var errs_1 = errors;
+ if (!refVal[2](data.joinJoin, (dataPath || '') + '.joinJoin', data, 'joinJoin', rootData)) {
+ if (vErrors === null) vErrors = refVal[2].errors;
+ else vErrors = vErrors.concat(refVal[2].errors);
+ errors = vErrors.length;
+ }
+ var valid1 = errors === errs_1;
+ }
+ } else {
+ var err = {
+ keyword: 'type',
+ dataPath: (dataPath || '') + "",
+ schemaPath: '#/type',
+ params: {
+ type: 'object'
+ },
+ message: 'should be object'
+ };
+ if (vErrors === null) vErrors = [err];
+ else vErrors.push(err);
+ errors++;
+ }
+ validate.errors = vErrors;
+ return errors === 0;
+ };
+ })();
+ refVal1.schema = {
+ "type": "object",
+ "properties": {
+ "topBody": {
+ "$ref": "#/definitions/border"
+ },
+ "topJoin": {
+ "$ref": "#/definitions/border"
+ },
+ "topLeft": {
+ "$ref": "#/definitions/border"
+ },
+ "topRight": {
+ "$ref": "#/definitions/border"
+ },
+ "bottomBody": {
+ "$ref": "#/definitions/border"
+ },
+ "bottomJoin": {
+ "$ref": "#/definitions/border"
+ },
+ "bottomLeft": {
+ "$ref": "#/definitions/border"
+ },
+ "bottomRight": {
+ "$ref": "#/definitions/border"
+ },
+ "bodyLeft": {
+ "$ref": "#/definitions/border"
+ },
+ "bodyRight": {
+ "$ref": "#/definitions/border"
+ },
+ "bodyJoin": {
+ "$ref": "#/definitions/border"
+ },
+ "joinBody": {
+ "$ref": "#/definitions/border"
+ },
+ "joinLeft": {
+ "$ref": "#/definitions/border"
+ },
+ "joinRight": {
+ "$ref": "#/definitions/border"
+ },
+ "joinJoin": {
+ "$ref": "#/definitions/border"
+ }
+ },
+ "additionalProperties": false
+ };
+ refVal1.errors = null;
+ refVal[1] = refVal1;
+ var refVal2 = (function() {
+ var pattern0 = new RegExp('^[0-9]+$');
+ return function validate(data, dataPath, parentData, parentDataProperty, rootData) {
+ 'use strict';
+ var vErrors = null;
+ var errors = 0;
+ if (typeof data !== "string") {
+ var err = {
+ keyword: 'type',
+ dataPath: (dataPath || '') + "",
+ schemaPath: '#/type',
+ params: {
+ type: 'string'
+ },
+ message: 'should be string'
+ };
+ if (vErrors === null) vErrors = [err];
+ else vErrors.push(err);
+ errors++;
+ }
+ validate.errors = vErrors;
+ return errors === 0;
+ };
+ })();
+ refVal2.schema = {
+ "type": "string"
+ };
+ refVal2.errors = null;
+ refVal[2] = refVal2;
+ var refVal3 = (function() {
+ var pattern0 = new RegExp('^[0-9]+$');
+ return function validate(data, dataPath, parentData, parentDataProperty, rootData) {
+ 'use strict';
+ var vErrors = null;
+ var errors = 0;
+ if (rootData === undefined) rootData = data;
+ if ((data && typeof data === "object" && !Array.isArray(data))) {
+ var errs__0 = errors;
+ var valid1 = true;
+ for (var key0 in data) {
+ var isAdditional0 = !(false || pattern0.test(key0));
+ if (isAdditional0) {
+ valid1 = false;
+ var err = {
+ keyword: 'additionalProperties',
+ dataPath: (dataPath || '') + "",
+ schemaPath: '#/additionalProperties',
+ params: {
+ additionalProperty: '' + key0 + ''
+ },
+ message: 'should NOT have additional properties'
+ };
+ if (vErrors === null) vErrors = [err];
+ else vErrors.push(err);
+ errors++;
+ }
+ }
+ for (var key0 in data) {
+ if (pattern0.test(key0)) {
+ var errs_1 = errors;
+ if (!refVal4(data[key0], (dataPath || '') + '[\'' + key0 + '\']', data, key0, rootData)) {
+ if (vErrors === null) vErrors = refVal4.errors;
+ else vErrors = vErrors.concat(refVal4.errors);
+ errors = vErrors.length;
+ }
+ var valid1 = errors === errs_1;
+ }
+ }
+ } else {
+ var err = {
+ keyword: 'type',
+ dataPath: (dataPath || '') + "",
+ schemaPath: '#/type',
+ params: {
+ type: 'object'
+ },
+ message: 'should be object'
+ };
+ if (vErrors === null) vErrors = [err];
+ else vErrors.push(err);
+ errors++;
+ }
+ validate.errors = vErrors;
+ return errors === 0;
+ };
+ })();
+ refVal3.schema = {
+ "type": "object",
+ "patternProperties": {
+ "^[0-9]+$": {
+ "$ref": "#/definitions/column"
+ }
+ },
+ "additionalProperties": false
+ };
+ refVal3.errors = null;
+ refVal[3] = refVal3;
+ var refVal4 = (function() {
+ var pattern0 = new RegExp('^[0-9]+$');
+ return function validate(data, dataPath, parentData, parentDataProperty, rootData) {
+ 'use strict';
+ var vErrors = null;
+ var errors = 0;
+ if ((data && typeof data === "object" && !Array.isArray(data))) {
+ var errs__0 = errors;
+ var valid1 = true;
+ for (var key0 in data) {
+ var isAdditional0 = !(false || validate.schema.properties[key0]);
+ if (isAdditional0) {
+ valid1 = false;
+ var err = {
+ keyword: 'additionalProperties',
+ dataPath: (dataPath || '') + "",
+ schemaPath: '#/additionalProperties',
+ params: {
+ additionalProperty: '' + key0 + ''
+ },
+ message: 'should NOT have additional properties'
+ };
+ if (vErrors === null) vErrors = [err];
+ else vErrors.push(err);
+ errors++;
+ }
+ }
+ var data1 = data.alignment;
+ if (data1 !== undefined) {
+ var errs_1 = errors;
+ if (typeof data1 !== "string") {
+ var err = {
+ keyword: 'type',
+ dataPath: (dataPath || '') + '.alignment',
+ schemaPath: '#/properties/alignment/type',
+ params: {
+ type: 'string'
+ },
+ message: 'should be string'
+ };
+ if (vErrors === null) vErrors = [err];
+ else vErrors.push(err);
+ errors++;
+ }
+ var schema1 = validate.schema.properties.alignment.enum;
+ var valid1;
+ valid1 = false;
+ for (var i1 = 0; i1 < schema1.length; i1++)
+ if (equal(data1, schema1[i1])) {
+ valid1 = true;
+ break;
+ }
+ if (!valid1) {
+ var err = {
+ keyword: 'enum',
+ dataPath: (dataPath || '') + '.alignment',
+ schemaPath: '#/properties/alignment/enum',
+ params: {
+ allowedValues: schema1
+ },
+ message: 'should be equal to one of the allowed values'
+ };
+ if (vErrors === null) vErrors = [err];
+ else vErrors.push(err);
+ errors++;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.width !== undefined) {
+ var errs_1 = errors;
+ if (typeof data.width !== "number") {
+ var err = {
+ keyword: 'type',
+ dataPath: (dataPath || '') + '.width',
+ schemaPath: '#/properties/width/type',
+ params: {
+ type: 'number'
+ },
+ message: 'should be number'
+ };
+ if (vErrors === null) vErrors = [err];
+ else vErrors.push(err);
+ errors++;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.wrapWord !== undefined) {
+ var errs_1 = errors;
+ if (typeof data.wrapWord !== "boolean") {
+ var err = {
+ keyword: 'type',
+ dataPath: (dataPath || '') + '.wrapWord',
+ schemaPath: '#/properties/wrapWord/type',
+ params: {
+ type: 'boolean'
+ },
+ message: 'should be boolean'
+ };
+ if (vErrors === null) vErrors = [err];
+ else vErrors.push(err);
+ errors++;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.truncate !== undefined) {
+ var errs_1 = errors;
+ if (typeof data.truncate !== "number") {
+ var err = {
+ keyword: 'type',
+ dataPath: (dataPath || '') + '.truncate',
+ schemaPath: '#/properties/truncate/type',
+ params: {
+ type: 'number'
+ },
+ message: 'should be number'
+ };
+ if (vErrors === null) vErrors = [err];
+ else vErrors.push(err);
+ errors++;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.paddingLeft !== undefined) {
+ var errs_1 = errors;
+ if (typeof data.paddingLeft !== "number") {
+ var err = {
+ keyword: 'type',
+ dataPath: (dataPath || '') + '.paddingLeft',
+ schemaPath: '#/properties/paddingLeft/type',
+ params: {
+ type: 'number'
+ },
+ message: 'should be number'
+ };
+ if (vErrors === null) vErrors = [err];
+ else vErrors.push(err);
+ errors++;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.paddingRight !== undefined) {
+ var errs_1 = errors;
+ if (typeof data.paddingRight !== "number") {
+ var err = {
+ keyword: 'type',
+ dataPath: (dataPath || '') + '.paddingRight',
+ schemaPath: '#/properties/paddingRight/type',
+ params: {
+ type: 'number'
+ },
+ message: 'should be number'
+ };
+ if (vErrors === null) vErrors = [err];
+ else vErrors.push(err);
+ errors++;
+ }
+ var valid1 = errors === errs_1;
+ }
+ } else {
+ var err = {
+ keyword: 'type',
+ dataPath: (dataPath || '') + "",
+ schemaPath: '#/type',
+ params: {
+ type: 'object'
+ },
+ message: 'should be object'
+ };
+ if (vErrors === null) vErrors = [err];
+ else vErrors.push(err);
+ errors++;
+ }
+ validate.errors = vErrors;
+ return errors === 0;
+ };
+ })();
+ refVal4.schema = {
+ "type": "object",
+ "properties": {
+ "alignment": {
+ "type": "string",
+ "enum": ["left", "right", "center"]
+ },
+ "width": {
+ "type": "number"
+ },
+ "wrapWord": {
+ "type": "boolean"
+ },
+ "truncate": {
+ "type": "number"
+ },
+ "paddingLeft": {
+ "type": "number"
+ },
+ "paddingRight": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false
+ };
+ refVal4.errors = null;
+ refVal[4] = refVal4;
+ return function validate(data, dataPath, parentData, parentDataProperty, rootData) {
+ 'use strict'; /*# sourceURL=streamConfig.json */
+ var vErrors = null;
+ var errors = 0;
+ if (rootData === undefined) rootData = data;
+ if ((data && typeof data === "object" && !Array.isArray(data))) {
+ var errs__0 = errors;
+ var valid1 = true;
+ for (var key0 in data) {
+ var isAdditional0 = !(false || key0 == 'border' || key0 == 'columns' || key0 == 'columnDefault' || key0 == 'columnCount');
+ if (isAdditional0) {
+ valid1 = false;
+ var err = {
+ keyword: 'additionalProperties',
+ dataPath: (dataPath || '') + "",
+ schemaPath: '#/additionalProperties',
+ params: {
+ additionalProperty: '' + key0 + ''
+ },
+ message: 'should NOT have additional properties'
+ };
+ if (vErrors === null) vErrors = [err];
+ else vErrors.push(err);
+ errors++;
+ }
+ }
+ if (data.border !== undefined) {
+ var errs_1 = errors;
+ if (!refVal1(data.border, (dataPath || '') + '.border', data, 'border', rootData)) {
+ if (vErrors === null) vErrors = refVal1.errors;
+ else vErrors = vErrors.concat(refVal1.errors);
+ errors = vErrors.length;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.columns !== undefined) {
+ var errs_1 = errors;
+ if (!refVal3(data.columns, (dataPath || '') + '.columns', data, 'columns', rootData)) {
+ if (vErrors === null) vErrors = refVal3.errors;
+ else vErrors = vErrors.concat(refVal3.errors);
+ errors = vErrors.length;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.columnDefault !== undefined) {
+ var errs_1 = errors;
+ if (!refVal[4](data.columnDefault, (dataPath || '') + '.columnDefault', data, 'columnDefault', rootData)) {
+ if (vErrors === null) vErrors = refVal[4].errors;
+ else vErrors = vErrors.concat(refVal[4].errors);
+ errors = vErrors.length;
+ }
+ var valid1 = errors === errs_1;
+ }
+ if (data.columnCount !== undefined) {
+ var errs_1 = errors;
+ if (typeof data.columnCount !== "number") {
+ var err = {
+ keyword: 'type',
+ dataPath: (dataPath || '') + '.columnCount',
+ schemaPath: '#/properties/columnCount/type',
+ params: {
+ type: 'number'
+ },
+ message: 'should be number'
+ };
+ if (vErrors === null) vErrors = [err];
+ else vErrors.push(err);
+ errors++;
+ }
+ var valid1 = errors === errs_1;
+ }
+ } else {
+ var err = {
+ keyword: 'type',
+ dataPath: (dataPath || '') + "",
+ schemaPath: '#/type',
+ params: {
+ type: 'object'
+ },
+ message: 'should be object'
+ };
+ if (vErrors === null) vErrors = [err];
+ else vErrors.push(err);
+ errors++;
+ }
+ validate.errors = vErrors;
+ return errors === 0;
+ };
+})();
+validate.schema = {
+ "$id": "streamConfig.json",
+ "$schema": "http://json-schema.org/draft-06/schema#",
+ "type": "object",
+ "properties": {
+ "border": {
+ "$ref": "#/definitions/borders"
+ },
+ "columns": {
+ "$ref": "#/definitions/columns"
+ },
+ "columnDefault": {
+ "$ref": "#/definitions/column"
+ },
+ "columnCount": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false,
+ "definitions": {
+ "columns": {
+ "type": "object",
+ "patternProperties": {
+ "^[0-9]+$": {
+ "$ref": "#/definitions/column"
+ }
+ },
+ "additionalProperties": false
+ },
+ "column": {
+ "type": "object",
+ "properties": {
+ "alignment": {
+ "type": "string",
+ "enum": ["left", "right", "center"]
+ },
+ "width": {
+ "type": "number"
+ },
+ "wrapWord": {
+ "type": "boolean"
+ },
+ "truncate": {
+ "type": "number"
+ },
+ "paddingLeft": {
+ "type": "number"
+ },
+ "paddingRight": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false
+ },
+ "borders": {
+ "type": "object",
+ "properties": {
+ "topBody": {
+ "$ref": "#/definitions/border"
+ },
+ "topJoin": {
+ "$ref": "#/definitions/border"
+ },
+ "topLeft": {
+ "$ref": "#/definitions/border"
+ },
+ "topRight": {
+ "$ref": "#/definitions/border"
+ },
+ "bottomBody": {
+ "$ref": "#/definitions/border"
+ },
+ "bottomJoin": {
+ "$ref": "#/definitions/border"
+ },
+ "bottomLeft": {
+ "$ref": "#/definitions/border"
+ },
+ "bottomRight": {
+ "$ref": "#/definitions/border"
+ },
+ "bodyLeft": {
+ "$ref": "#/definitions/border"
+ },
+ "bodyRight": {
+ "$ref": "#/definitions/border"
+ },
+ "bodyJoin": {
+ "$ref": "#/definitions/border"
+ },
+ "joinBody": {
+ "$ref": "#/definitions/border"
+ },
+ "joinLeft": {
+ "$ref": "#/definitions/border"
+ },
+ "joinRight": {
+ "$ref": "#/definitions/border"
+ },
+ "joinJoin": {
+ "$ref": "#/definitions/border"
+ }
+ },
+ "additionalProperties": false
+ },
+ "border": {
+ "type": "string"
+ }
+ }
+};
+validate.errors = null;
+module.exports = validate; \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/table/dist/validateTableData.js b/tools/node_modules/eslint/node_modules/table/dist/validateTableData.js
new file mode 100644
index 0000000000..b5e103ce40
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/table/dist/validateTableData.js
@@ -0,0 +1,51 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+/**
+ * @typedef {string} cell
+ */
+
+/**
+ * @typedef {cell[]} validateData~column
+ */
+
+/**
+ * @param {column[]} rows
+ * @returns {undefined}
+ */
+exports.default = rows => {
+ if (!Array.isArray(rows)) {
+ throw new TypeError('Table data must be an array.');
+ }
+
+ if (rows.length === 0) {
+ throw new Error('Table must define at least one row.');
+ }
+
+ if (rows[0].length === 0) {
+ throw new Error('Table must define at least one column.');
+ }
+
+ const columnNumber = rows[0].length;
+
+ for (const cells of rows) {
+ if (!Array.isArray(cells)) {
+ throw new TypeError('Table row data must be an array.');
+ }
+
+ if (cells.length !== columnNumber) {
+ throw new Error('Table must have a consistent number of cells.');
+ }
+
+ // @todo Make an exception for newline characters.
+ // @see https://github.com/gajus/table/issues/9
+ for (const cell of cells) {
+ if (/[\u0001-\u001A]/.test(cell)) {
+ throw new Error('Table data must not contain control characters.');
+ }
+ }
+ }
+}; \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/table/dist/wrapString.js b/tools/node_modules/eslint/node_modules/table/dist/wrapString.js
new file mode 100644
index 0000000000..5502a7b5b0
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/table/dist/wrapString.js
@@ -0,0 +1,46 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _lodash = require('lodash');
+
+var _lodash2 = _interopRequireDefault(_lodash);
+
+var _sliceAnsi = require('slice-ansi');
+
+var _sliceAnsi2 = _interopRequireDefault(_sliceAnsi);
+
+var _stringWidth = require('string-width');
+
+var _stringWidth2 = _interopRequireDefault(_stringWidth);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Creates an array of strings split into groups the length of size.
+ * This function works with strings that contain ASCII characters.
+ *
+ * wrapText is different from would-be "chunk" implementation
+ * in that whitespace characters that occur on a chunk size limit are trimmed.
+ *
+ * @param {string} subject
+ * @param {number} size
+ * @returns {Array}
+ */
+exports.default = (subject, size) => {
+ let subjectSlice;
+
+ subjectSlice = subject;
+
+ const chunks = [];
+
+ do {
+ chunks.push((0, _sliceAnsi2.default)(subjectSlice, 0, size));
+
+ subjectSlice = _lodash2.default.trim((0, _sliceAnsi2.default)(subjectSlice, size));
+ } while ((0, _stringWidth2.default)(subjectSlice));
+
+ return chunks;
+}; \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/table/dist/wrapWord.js b/tools/node_modules/eslint/node_modules/table/dist/wrapWord.js
new file mode 100644
index 0000000000..6a7b74ef9b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/table/dist/wrapWord.js
@@ -0,0 +1,56 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _lodash = require('lodash');
+
+var _lodash2 = _interopRequireDefault(_lodash);
+
+var _sliceAnsi = require('slice-ansi');
+
+var _sliceAnsi2 = _interopRequireDefault(_sliceAnsi);
+
+var _stringWidth = require('string-width');
+
+var _stringWidth2 = _interopRequireDefault(_stringWidth);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * @param {string} input
+ * @param {number} size
+ * @returns {Array}
+ */
+exports.default = (input, size) => {
+ let subject;
+
+ subject = input;
+
+ const chunks = [];
+
+ // https://regex101.com/r/gY5kZ1/1
+ const re = new RegExp('(^.{1,' + size + '}(\\s+|$))|(^.{1,' + (size - 1) + '}(\\\\|/|_|\\.|,|;|-))');
+
+ do {
+ let chunk;
+
+ chunk = subject.match(re);
+
+ if (chunk) {
+ chunk = chunk[0];
+
+ subject = (0, _sliceAnsi2.default)(subject, (0, _stringWidth2.default)(chunk));
+
+ chunk = _lodash2.default.trim(chunk);
+ } else {
+ chunk = (0, _sliceAnsi2.default)(subject, 0, size);
+ subject = (0, _sliceAnsi2.default)(subject, size);
+ }
+
+ chunks.push(chunk);
+ } while ((0, _stringWidth2.default)(subject));
+
+ return chunks;
+}; \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/table/package.json b/tools/node_modules/eslint/node_modules/table/package.json
new file mode 100644
index 0000000000..c536ddefca
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/table/package.json
@@ -0,0 +1,97 @@
+{
+ "_from": "table@^4.0.1",
+ "_id": "table@4.0.2",
+ "_inBundle": false,
+ "_integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==",
+ "_location": "/eslint/table",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "table@^4.0.1",
+ "name": "table",
+ "escapedName": "table",
+ "rawSpec": "^4.0.1",
+ "saveSpec": null,
+ "fetchSpec": "^4.0.1"
+ },
+ "_requiredBy": [
+ "/eslint"
+ ],
+ "_resolved": "https://registry.npmjs.org/table/-/table-4.0.2.tgz",
+ "_shasum": "a33447375391e766ad34d3486e6e2aedc84d2e36",
+ "_spec": "table@^4.0.1",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint",
+ "author": {
+ "name": "Gajus Kuizinas",
+ "email": "gajus@gajus.com",
+ "url": "http://gajus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/gajus/table/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "ajv": "^5.2.3",
+ "ajv-keywords": "^2.1.0",
+ "chalk": "^2.1.0",
+ "lodash": "^4.17.4",
+ "slice-ansi": "1.0.0",
+ "string-width": "^2.1.1"
+ },
+ "deprecated": false,
+ "description": "Formats data into a string table.",
+ "devDependencies": {
+ "ajv-cli": "^2.1.0",
+ "babel": "^6.23.0",
+ "babel-cli": "^6.26.0",
+ "babel-core": "^6.26.0",
+ "babel-plugin-istanbul": "^4.1.5",
+ "babel-preset-es2015-node4": "^2.1.1",
+ "babel-register": "^6.26.0",
+ "chai": "^4.1.2",
+ "eslint": "^4.7.2",
+ "eslint-config-canonical": "^9.3.1",
+ "gitdown": "^2.5.1",
+ "husky": "^0.14.3",
+ "mocha": "^3.5.3",
+ "nyc": "^11.2.1",
+ "sinon": "^4.0.0"
+ },
+ "homepage": "https://github.com/gajus/table#readme",
+ "keywords": [
+ "ascii",
+ "text",
+ "table",
+ "align",
+ "ansi"
+ ],
+ "license": "BSD-3-Clause",
+ "main": "./dist/index.js",
+ "name": "table",
+ "nyc": {
+ "include": [
+ "src/*.js"
+ ],
+ "instrument": false,
+ "lines": 70,
+ "require": [
+ "babel-register"
+ ],
+ "sourceMap": false
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/gajus/table.git"
+ },
+ "scripts": {
+ "build": "rm -fr ./dist && NODE_ENV=production babel --copy-files ./src --out-dir ./dist && npm run make-validators",
+ "lint": "npm run build && eslint ./src ./tests",
+ "make-readme": "gitdown ./.README/README.md --output-file ./README.md",
+ "make-validators": "ajv compile --all-errors --inline-refs=false -s src/schemas/config -c ajv-keywords/keywords/typeof -o dist/validateConfig.js && ajv compile --all-errors --inline-refs=false -s src/schemas/streamConfig -c ajv-keywords/keywords/typeof -o dist/validateStreamConfig.js",
+ "precommit": "npm run lint && npm run test",
+ "prepublish": "NODE_ENV=production npm run build",
+ "test": "npm run build && nyc --check-coverage mocha"
+ },
+ "version": "4.0.2"
+}
diff --git a/tools/node_modules/eslint/node_modules/text-table/LICENSE b/tools/node_modules/eslint/node_modules/text-table/LICENSE
new file mode 100644
index 0000000000..ee27ba4b44
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/text-table/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/tools/node_modules/eslint/node_modules/text-table/index.js b/tools/node_modules/eslint/node_modules/text-table/index.js
new file mode 100644
index 0000000000..5c0ba9876a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/text-table/index.js
@@ -0,0 +1,86 @@
+module.exports = function (rows_, opts) {
+ if (!opts) opts = {};
+ var hsep = opts.hsep === undefined ? ' ' : opts.hsep;
+ var align = opts.align || [];
+ var stringLength = opts.stringLength
+ || function (s) { return String(s).length; }
+ ;
+
+ var dotsizes = reduce(rows_, function (acc, row) {
+ forEach(row, function (c, ix) {
+ var n = dotindex(c);
+ if (!acc[ix] || n > acc[ix]) acc[ix] = n;
+ });
+ return acc;
+ }, []);
+
+ var rows = map(rows_, function (row) {
+ return map(row, function (c_, ix) {
+ var c = String(c_);
+ if (align[ix] === '.') {
+ var index = dotindex(c);
+ var size = dotsizes[ix] + (/\./.test(c) ? 1 : 2)
+ - (stringLength(c) - index)
+ ;
+ return c + Array(size).join(' ');
+ }
+ else return c;
+ });
+ });
+
+ var sizes = reduce(rows, function (acc, row) {
+ forEach(row, function (c, ix) {
+ var n = stringLength(c);
+ if (!acc[ix] || n > acc[ix]) acc[ix] = n;
+ });
+ return acc;
+ }, []);
+
+ return map(rows, function (row) {
+ return map(row, function (c, ix) {
+ var n = (sizes[ix] - stringLength(c)) || 0;
+ var s = Array(Math.max(n + 1, 1)).join(' ');
+ if (align[ix] === 'r' || align[ix] === '.') {
+ return s + c;
+ }
+ if (align[ix] === 'c') {
+ return Array(Math.ceil(n / 2 + 1)).join(' ')
+ + c + Array(Math.floor(n / 2 + 1)).join(' ')
+ ;
+ }
+
+ return c + s;
+ }).join(hsep).replace(/\s+$/, '');
+ }).join('\n');
+};
+
+function dotindex (c) {
+ var m = /\.[^.]*$/.exec(c);
+ return m ? m.index + 1 : c.length;
+}
+
+function reduce (xs, f, init) {
+ if (xs.reduce) return xs.reduce(f, init);
+ var i = 0;
+ var acc = arguments.length >= 3 ? init : xs[i++];
+ for (; i < xs.length; i++) {
+ f(acc, xs[i], i);
+ }
+ return acc;
+}
+
+function forEach (xs, f) {
+ if (xs.forEach) return xs.forEach(f);
+ for (var i = 0; i < xs.length; i++) {
+ f.call(xs, xs[i], i);
+ }
+}
+
+function map (xs, f) {
+ if (xs.map) return xs.map(f);
+ var res = [];
+ for (var i = 0; i < xs.length; i++) {
+ res.push(f.call(xs, xs[i], i));
+ }
+ return res;
+}
diff --git a/tools/node_modules/eslint/node_modules/text-table/package.json b/tools/node_modules/eslint/node_modules/text-table/package.json
new file mode 100644
index 0000000000..e374725dec
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/text-table/package.json
@@ -0,0 +1,73 @@
+{
+ "_from": "text-table@~0.2.0",
+ "_id": "text-table@0.2.0",
+ "_inBundle": false,
+ "_integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=",
+ "_location": "/eslint/text-table",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "text-table@~0.2.0",
+ "name": "text-table",
+ "escapedName": "text-table",
+ "rawSpec": "~0.2.0",
+ "saveSpec": null,
+ "fetchSpec": "~0.2.0"
+ },
+ "_requiredBy": [
+ "/eslint"
+ ],
+ "_resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
+ "_shasum": "7f5ee823ae805207c00af2df4a84ec3fcfa570b4",
+ "_spec": "text-table@~0.2.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint",
+ "author": {
+ "name": "James Halliday",
+ "email": "mail@substack.net",
+ "url": "http://substack.net"
+ },
+ "bugs": {
+ "url": "https://github.com/substack/text-table/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "borderless text tables with alignment",
+ "devDependencies": {
+ "cli-color": "~0.2.3",
+ "tap": "~0.4.0",
+ "tape": "~1.0.2"
+ },
+ "homepage": "https://github.com/substack/text-table",
+ "keywords": [
+ "text",
+ "table",
+ "align",
+ "ascii",
+ "rows",
+ "tabular"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "text-table",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/substack/text-table.git"
+ },
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "testling": {
+ "files": "test/*.js",
+ "browsers": [
+ "ie/6..latest",
+ "chrome/20..latest",
+ "firefox/10..latest",
+ "safari/latest",
+ "opera/11.0..latest",
+ "iphone/6",
+ "ipad/6"
+ ]
+ },
+ "version": "0.2.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/text-table/readme.markdown b/tools/node_modules/eslint/node_modules/text-table/readme.markdown
new file mode 100644
index 0000000000..18806acd9e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/text-table/readme.markdown
@@ -0,0 +1,134 @@
+# text-table
+
+generate borderless text table strings suitable for printing to stdout
+
+[![build status](https://secure.travis-ci.org/substack/text-table.png)](http://travis-ci.org/substack/text-table)
+
+[![browser support](https://ci.testling.com/substack/text-table.png)](http://ci.testling.com/substack/text-table)
+
+# example
+
+## default align
+
+``` js
+var table = require('text-table');
+var t = table([
+ [ 'master', '0123456789abcdef' ],
+ [ 'staging', 'fedcba9876543210' ]
+]);
+console.log(t);
+```
+
+```
+master 0123456789abcdef
+staging fedcba9876543210
+```
+
+## left-right align
+
+``` js
+var table = require('text-table');
+var t = table([
+ [ 'beep', '1024' ],
+ [ 'boop', '33450' ],
+ [ 'foo', '1006' ],
+ [ 'bar', '45' ]
+], { align: [ 'l', 'r' ] });
+console.log(t);
+```
+
+```
+beep 1024
+boop 33450
+foo 1006
+bar 45
+```
+
+## dotted align
+
+``` js
+var table = require('text-table');
+var t = table([
+ [ 'beep', '1024' ],
+ [ 'boop', '334.212' ],
+ [ 'foo', '1006' ],
+ [ 'bar', '45.6' ],
+ [ 'baz', '123.' ]
+], { align: [ 'l', '.' ] });
+console.log(t);
+```
+
+```
+beep 1024
+boop 334.212
+foo 1006
+bar 45.6
+baz 123.
+```
+
+## centered
+
+``` js
+var table = require('text-table');
+var t = table([
+ [ 'beep', '1024', 'xyz' ],
+ [ 'boop', '3388450', 'tuv' ],
+ [ 'foo', '10106', 'qrstuv' ],
+ [ 'bar', '45', 'lmno' ]
+], { align: [ 'l', 'c', 'l' ] });
+console.log(t);
+```
+
+```
+beep 1024 xyz
+boop 3388450 tuv
+foo 10106 qrstuv
+bar 45 lmno
+```
+
+# methods
+
+``` js
+var table = require('text-table')
+```
+
+## var s = table(rows, opts={})
+
+Return a formatted table string `s` from an array of `rows` and some options
+`opts`.
+
+`rows` should be an array of arrays containing strings, numbers, or other
+printable values.
+
+options can be:
+
+* `opts.hsep` - separator to use between columns, default `' '`
+* `opts.align` - array of alignment types for each column, default `['l','l',...]`
+* `opts.stringLength` - callback function to use when calculating the string length
+
+alignment types are:
+
+* `'l'` - left
+* `'r'` - right
+* `'c'` - center
+* `'.'` - decimal
+
+# install
+
+With [npm](https://npmjs.org) do:
+
+```
+npm install text-table
+```
+
+# Use with ANSI-colors
+
+Since the string length of ANSI color schemes does not equal the length
+JavaScript sees internally it is necessary to pass the a custom string length
+calculator during the main function call.
+
+See the `test/ansi-colors.js` file for an example.
+
+# license
+
+MIT
diff --git a/tools/node_modules/eslint/node_modules/through/LICENSE.APACHE2 b/tools/node_modules/eslint/node_modules/through/LICENSE.APACHE2
new file mode 100644
index 0000000000..6366c04716
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/through/LICENSE.MIT b/tools/node_modules/eslint/node_modules/through/LICENSE.MIT
new file mode 100644
index 0000000000..6eafbd734a
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/through/index.js b/tools/node_modules/eslint/node_modules/through/index.js
new file mode 100644
index 0000000000..ca5fc5901f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/through/package.json b/tools/node_modules/eslint/node_modules/through/package.json
new file mode 100644
index 0000000000..d7a529fc7d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/through/package.json
@@ -0,0 +1,68 @@
+{
+ "_from": "through@^2.3.6",
+ "_id": "through@2.3.8",
+ "_inBundle": false,
+ "_integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=",
+ "_location": "/eslint/through",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "through@^2.3.6",
+ "name": "through",
+ "escapedName": "through",
+ "rawSpec": "^2.3.6",
+ "saveSpec": null,
+ "fetchSpec": "^2.3.6"
+ },
+ "_requiredBy": [
+ "/eslint/inquirer"
+ ],
+ "_resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
+ "_shasum": "0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5",
+ "_spec": "through@^2.3.6",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/inquirer",
+ "author": {
+ "name": "Dominic Tarr",
+ "email": "dominic.tarr@gmail.com",
+ "url": "dominictarr.com"
+ },
+ "bugs": {
+ "url": "https://github.com/dominictarr/through/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "simplified stream construction",
+ "devDependencies": {
+ "from": "~0.1.3",
+ "stream-spec": "~0.3.5",
+ "tape": "~2.3.2"
+ },
+ "homepage": "https://github.com/dominictarr/through",
+ "keywords": [
+ "stream",
+ "streams",
+ "user-streams",
+ "pipe"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "through",
+ "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/tools/node_modules/eslint/node_modules/through/readme.markdown b/tools/node_modules/eslint/node_modules/through/readme.markdown
new file mode 100644
index 0000000000..cb34c8135f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/trim-trailing-lines/LICENSE b/tools/node_modules/eslint/node_modules/trim-trailing-lines/LICENSE
new file mode 100644
index 0000000000..611b67581b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/trim-trailing-lines/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2015 Titus Wormer <mailto:tituswormer@gmail.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/tools/node_modules/eslint/node_modules/trim-trailing-lines/index.js b/tools/node_modules/eslint/node_modules/trim-trailing-lines/index.js
new file mode 100644
index 0000000000..41356676ee
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/trim-trailing-lines/index.js
@@ -0,0 +1,15 @@
+'use strict';
+
+module.exports = trimTrailingLines;
+
+var line = '\n';
+
+/* Remove final newline characters from `value`. */
+function trimTrailingLines(value) {
+ var val = String(value);
+ var index = val.length;
+
+ while (val.charAt(--index) === line) { /* empty */ }
+
+ return val.slice(0, index + 1);
+}
diff --git a/tools/node_modules/eslint/node_modules/trim-trailing-lines/package.json b/tools/node_modules/eslint/node_modules/trim-trailing-lines/package.json
new file mode 100644
index 0000000000..0f7514cd98
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/trim-trailing-lines/package.json
@@ -0,0 +1,96 @@
+{
+ "_from": "trim-trailing-lines@^1.0.0",
+ "_id": "trim-trailing-lines@1.1.0",
+ "_inBundle": false,
+ "_integrity": "sha1-eu+7eAjfnWafbaLkOMrIxGradoQ=",
+ "_location": "/trim-trailing-lines",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "trim-trailing-lines@^1.0.0",
+ "name": "trim-trailing-lines",
+ "escapedName": "trim-trailing-lines",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/remark-parse"
+ ],
+ "_resolved": "https://registry.npmjs.org/trim-trailing-lines/-/trim-trailing-lines-1.1.0.tgz",
+ "_shasum": "7aefbb7808df9d669f6da2e438cac8c46ada7684",
+ "_spec": "trim-trailing-lines@^1.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/remark-parse",
+ "author": {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ },
+ "bugs": {
+ "url": "https://github.com/wooorm/trim-trailing-lines/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ }
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Remove final newline characters from a string",
+ "devDependencies": {
+ "browserify": "^13.0.0",
+ "esmangle": "^1.0.0",
+ "nyc": "^10.0.0",
+ "remark-cli": "^2.0.0",
+ "remark-preset-wooorm": "^1.0.0",
+ "tape": "^4.6.3",
+ "xo": "^0.17.1"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/wooorm/trim-trailing-lines#readme",
+ "keywords": [
+ "trim",
+ "final",
+ "line",
+ "newline",
+ "characters"
+ ],
+ "license": "MIT",
+ "name": "trim-trailing-lines",
+ "nyc": {
+ "check-coverage": true,
+ "lines": 100,
+ "functions": 100,
+ "branches": 100
+ },
+ "remarkConfig": {
+ "presets": "wooorm"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/wooorm/trim-trailing-lines.git"
+ },
+ "scripts": {
+ "build": "npm run build-md && npm run build-bundle && npm run build-mangle",
+ "build-bundle": "browserify index.js -s trimTrailingLines > trim-trailing-lines.js",
+ "build-mangle": "esmangle trim-trailing-lines.js > trim-trailing-lines.min.js",
+ "build-md": "remark . -qfo",
+ "lint": "xo",
+ "test": "npm run build && npm run lint && npm run test-coverage",
+ "test-api": "node test",
+ "test-coverage": "nyc --reporter lcov tape test.js"
+ },
+ "version": "1.1.0",
+ "xo": {
+ "space": true,
+ "ignores": [
+ "trim-trailing-lines.js"
+ ]
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/trim-trailing-lines/readme.md b/tools/node_modules/eslint/node_modules/trim-trailing-lines/readme.md
new file mode 100644
index 0000000000..affedf5d8c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/trim-trailing-lines/readme.md
@@ -0,0 +1,55 @@
+# trim-trailing-lines [![Build Status][travtrim-trailing-lines]][travis] [![Coverage Status][codecov-badge]][codecov]
+
+Remove final newline characters from a string.
+
+## Installation
+
+[npm][]:
+
+```bash
+npm install trim-trailing-lines
+```
+
+## Usage
+
+```js
+var trimTrailingLines = require('trim-trailing-lines');
+
+trimTrailingLines('foo\nbar'); //=> 'foo\nbar'
+trimTrailingLines('foo\nbar\n'); //=> 'foo\nbar'
+trimTrailingLines('foo\nbar\n\n'); //=> 'foo\nbar'
+```
+
+## API
+
+### `trimTrailingLines(value)`
+
+Remove final newline characters from `value`.
+
+###### Parameters
+
+* `value` (`string`) — Value with trailing newlines, coerced to string.
+
+###### Returns
+
+`string` — Value without trailing newlines.
+
+## License
+
+[MIT][license] © [Titus Wormer][author]
+
+<!-- Definitions -->
+
+[travtrim-trailing-lines]: https://img.shields.io/travis/wooorm/trim-trailing-lines.svg
+
+[travis]: https://travis-ci.org/wooorm/trim-trailing-lines
+
+[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/trim-trailing-lines.svg
+
+[codecov]: https://codecov.io/github/wooorm/trim-trailing-lines
+
+[npm]: https://docs.npmjs.com/cli/install
+
+[license]: LICENSE
+
+[author]: http://wooorm.com
diff --git a/tools/node_modules/eslint/node_modules/trim/Makefile b/tools/node_modules/eslint/node_modules/trim/Makefile
new file mode 100644
index 0000000000..4e9c8d36eb
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/trim/Makefile
@@ -0,0 +1,7 @@
+
+test:
+ @./node_modules/.bin/mocha \
+ --require should \
+ --reporter spec
+
+.PHONY: test \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/trim/Readme.md b/tools/node_modules/eslint/node_modules/trim/Readme.md
new file mode 100644
index 0000000000..3460f523fb
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/trim/Readme.md
@@ -0,0 +1,69 @@
+
+# trim
+
+ Trims string whitespace.
+
+## Installation
+
+```
+$ npm install trim
+$ component install component/trim
+```
+
+## API
+
+ - [trim(str)](#trimstr)
+ - [.left(str)](#leftstr)
+ - [.right(str)](#rightstr)
+<a name="" />
+
+<a name="trimstr" />
+### trim(str)
+should trim leading / trailing whitespace.
+
+```js
+trim(' foo bar ').should.equal('foo bar');
+trim('\n\n\nfoo bar\n\r\n\n').should.equal('foo bar');
+```
+
+<a name="leftstr" />
+### .left(str)
+should trim leading whitespace.
+
+```js
+trim.left(' foo bar ').should.equal('foo bar ');
+```
+
+<a name="rightstr" />
+### .right(str)
+should trim trailing whitespace.
+
+```js
+trim.right(' foo bar ').should.equal(' foo bar');
+```
+
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2012 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
+
+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/tools/node_modules/eslint/node_modules/trim/index.js b/tools/node_modules/eslint/node_modules/trim/index.js
new file mode 100644
index 0000000000..640c24cf30
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/trim/index.js
@@ -0,0 +1,14 @@
+
+exports = module.exports = trim;
+
+function trim(str){
+ return str.replace(/^\s*|\s*$/g, '');
+}
+
+exports.left = function(str){
+ return str.replace(/^\s*/, '');
+};
+
+exports.right = function(str){
+ return str.replace(/\s*$/, '');
+};
diff --git a/tools/node_modules/eslint/node_modules/trim/package.json b/tools/node_modules/eslint/node_modules/trim/package.json
new file mode 100644
index 0000000000..609245922e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/trim/package.json
@@ -0,0 +1,49 @@
+{
+ "_from": "trim@0.0.1",
+ "_id": "trim@0.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-WFhUf2spB1fulczMZm+1AITEYN0=",
+ "_location": "/trim",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "trim@0.0.1",
+ "name": "trim",
+ "escapedName": "trim",
+ "rawSpec": "0.0.1",
+ "saveSpec": null,
+ "fetchSpec": "0.0.1"
+ },
+ "_requiredBy": [
+ "/remark-parse"
+ ],
+ "_resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz",
+ "_shasum": "5858547f6b290757ee95cccc666fb50084c460dd",
+ "_spec": "trim@0.0.1",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/remark-parse",
+ "author": {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ "bundleDependencies": false,
+ "component": {
+ "scripts": {
+ "trim/index.js": "index.js"
+ }
+ },
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Trim string whitespace",
+ "devDependencies": {
+ "mocha": "*",
+ "should": "*"
+ },
+ "keywords": [
+ "string",
+ "trim"
+ ],
+ "main": "index",
+ "name": "trim",
+ "version": "0.0.1"
+}
diff --git a/tools/node_modules/eslint/node_modules/trough/LICENSE b/tools/node_modules/eslint/node_modules/trough/LICENSE
new file mode 100644
index 0000000000..3f0166f62b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/trough/LICENSE
@@ -0,0 +1,21 @@
+(The MIT License)
+
+Copyright (c) 2016 Titus Wormer <tituswormer@gmail.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/tools/node_modules/eslint/node_modules/trough/index.js b/tools/node_modules/eslint/node_modules/trough/index.js
new file mode 100644
index 0000000000..a041e8c257
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/trough/index.js
@@ -0,0 +1,133 @@
+'use strict';
+
+/* Expose. */
+module.exports = trough;
+
+/* Methods. */
+var slice = [].slice;
+
+/* Create new middleware. */
+function trough() {
+ var fns = [];
+ var middleware = {};
+
+ middleware.run = run;
+ middleware.use = use;
+
+ return middleware;
+
+ /* Run `fns`. Last argument must be
+ * a completion handler. */
+ function run() {
+ var index = -1;
+ var input = slice.call(arguments, 0, -1);
+ var done = arguments[arguments.length - 1];
+
+ if (typeof done !== 'function') {
+ throw new Error('Expected function as last argument, not ' + done);
+ }
+
+ next.apply(null, [null].concat(input));
+
+ /* Run the next `fn`, if any. */
+ function next(err) {
+ var fn = fns[++index];
+ var params = slice.call(arguments, 0);
+ var values = params.slice(1);
+ var length = input.length;
+ var pos = -1;
+
+ if (err) {
+ done(err);
+ return;
+ }
+
+ /* Copy non-nully input into values. */
+ while (++pos < length) {
+ if (values[pos] === null || values[pos] === undefined) {
+ values[pos] = input[pos];
+ }
+ }
+
+ input = values;
+
+ /* Next or done. */
+ if (fn) {
+ wrap(fn, next).apply(null, input);
+ } else {
+ done.apply(null, [null].concat(input));
+ }
+ }
+ }
+
+ /* Add `fn` to the list. */
+ function use(fn) {
+ if (typeof fn !== 'function') {
+ throw new Error('Expected `fn` to be a function, not ' + fn);
+ }
+
+ fns.push(fn);
+
+ return middleware;
+ }
+}
+
+/* Wrap `fn`. Can be sync or async; return a promise,
+ * receive a completion handler, return new values and
+ * errors. */
+function wrap(fn, next) {
+ var invoked;
+
+ return wrapped;
+
+ function wrapped() {
+ var params = slice.call(arguments, 0);
+ var callback = fn.length > params.length;
+ var result;
+
+ if (callback) {
+ params.push(done);
+ }
+
+ try {
+ result = fn.apply(null, params);
+ } catch (err) {
+ /* Well, this is quite the pickle. `fn` received
+ * a callback and invoked it (thus continuing the
+ * pipeline), but later also threw an error.
+ * We’re not about to restart the pipeline again,
+ * so the only thing left to do is to throw the
+ * thing instea. */
+ if (callback && invoked) {
+ throw err;
+ }
+
+ return done(err);
+ }
+
+ if (!callback) {
+ if (result && typeof result.then === 'function') {
+ result.then(then, done);
+ } else if (result instanceof Error) {
+ done(result);
+ } else {
+ then(result);
+ }
+ }
+ }
+
+ /* Invoke `next`, only once. */
+ function done() {
+ if (!invoked) {
+ invoked = true;
+
+ next.apply(null, arguments);
+ }
+ }
+
+ /* Invoke `done` with one value.
+ * Tracks if an error is passed, too. */
+ function then(value) {
+ done(null, value);
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/trough/package.json b/tools/node_modules/eslint/node_modules/trough/package.json
new file mode 100644
index 0000000000..7e0478f36a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/trough/package.json
@@ -0,0 +1,100 @@
+{
+ "_from": "trough@^1.0.0",
+ "_id": "trough@1.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-qf2LA5Swro//guBjOgo2zK1bX4Y=",
+ "_location": "/trough",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "trough@^1.0.0",
+ "name": "trough",
+ "escapedName": "trough",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/unified"
+ ],
+ "_resolved": "https://registry.npmjs.org/trough/-/trough-1.0.1.tgz",
+ "_shasum": "a9fd8b0394b0ae8fff82e0633a0a36ccad5b5f86",
+ "_spec": "trough@^1.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/unified",
+ "author": {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ },
+ "bugs": {
+ "url": "https://github.com/wooorm/trough/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ }
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Middleware: a channel used to convey a liquid",
+ "devDependencies": {
+ "browserify": "^14.1.0",
+ "esmangle": "^1.0.0",
+ "nyc": "^11.0.0",
+ "remark-cli": "^3.0.0",
+ "remark-preset-wooorm": "^3.0.0",
+ "tape": "^4.4.0",
+ "xo": "^0.18.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/wooorm/trough#readme",
+ "keywords": [
+ "middleware",
+ "ware"
+ ],
+ "license": "MIT",
+ "name": "trough",
+ "nyc": {
+ "check-coverage": true,
+ "lines": 100,
+ "functions": 100,
+ "branches": 100
+ },
+ "remarkConfig": {
+ "plugins": [
+ "preset-wooorm"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/wooorm/trough.git"
+ },
+ "scripts": {
+ "build": "npm run build-md && npm run build-bundle && npm run build-mangle",
+ "build-bundle": "browserify index.js -s trough > trough.js",
+ "build-mangle": "esmangle trough.js > trough.min.js",
+ "build-md": "remark . -qfo",
+ "lint": "xo",
+ "test": "npm run build && npm run lint && npm run test-coverage",
+ "test-api": "node test",
+ "test-coverage": "nyc --reporter lcov tape test.js"
+ },
+ "version": "1.0.1",
+ "xo": {
+ "space": true,
+ "esnext": false,
+ "rules": {
+ "guard-for-in": "off",
+ "unicorn/prefer-type-error": "off"
+ },
+ "ignores": [
+ "trough.js"
+ ]
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/trough/readme.md b/tools/node_modules/eslint/node_modules/trough/readme.md
new file mode 100644
index 0000000000..3dc62650e9
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/trough/readme.md
@@ -0,0 +1,305 @@
+# trough [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov]
+
+> **trough** /trôf/ — a channel used to convey a liquid.
+
+`trough` is like [`ware`][ware] with less sugar, and middleware
+functions can change the input of the next.
+
+## Installation
+
+[npm][]:
+
+```bash
+npm install trough
+```
+
+## Usage
+
+```js
+var fs = require('fs');
+var path = require('path');
+var trough = require('trough');
+
+var pipeline = trough()
+ .use(function (fileName) {
+ console.log('Checking... ' + fileName);
+ })
+ .use(function (fileName) {
+ return path.join(process.cwd(), fileName);
+ })
+ .use(function (filePath, next) {
+ fs.stat(filePath, function (err, stats) {
+ next(err, {filePath: filePath, stats: stats});
+ });
+ })
+ .use(function (ctx, next) {
+ if (ctx.stats.isFile()) {
+ fs.readFile(ctx.filePath, next);
+ } else {
+ next(new Error('Expected file'));
+ }
+ });
+
+pipeline.run('readme.md', console.log);
+pipeline.run('node_modules', console.log);
+```
+
+Yields:
+
+```txt
+Checking... readme.md
+Checking... node_modules
+Error: Expected file
+ at ~/example.js:21:12
+ at wrapped (~/node_modules/trough/index.js:93:19)
+ at next (~/node_modules/trough/index.js:56:24)
+ at done (~/node_modules/trough/index.js:124:12)
+ at ~/node_modules/example.js:14:7
+ at FSReqWrap.oncomplete (fs.js:153:5)
+null <Buffer 23 20 74 72 6f 75 67 68 20 5b 21 5b 42 75 69 6c 64 20 53 74 61 74 75 73 5d 5b 74 72 61 76 69 73 2d 62 61 64 67 65 5d 5d 5b 74 72 61 76 69 73 5d 20 5b ... >
+```
+
+## API
+
+### `trough()`
+
+Create a new [`Trough`][trough].
+
+### `Trough`
+
+A pipeline.
+
+### `Trough#run([input..., ]done)`
+
+Run the pipeline (all [`use()`][use]d middleware). Invokes [`done`][done]
+on completion with either an error or the output of the last middleware
+
+> Note! as the length of input defines whether [async][] function
+> get a `next` function, it’s recommended to keep `input` at one
+> value normally.
+
+#### `function done(err?, [output...])`
+
+The final handler passed to [`run()`][run], invoked with an error
+if a [middleware function][fn] rejected, passed, or threw one, or
+the output of the last middleware function.
+
+### `Trough#use(fn)`
+
+Add `fn`, a [middleware function][fn], to the pipeline.
+
+#### `function fn([input..., ][next])`
+
+A middleware function invoked with the output of its predecessor.
+
+##### Synchronous
+
+If `fn` returns or throws an error, the pipeline fails and `done` is
+invoked with that error.
+
+If `fn` returns a value (neither `null` nor `undefined`), the first
+`input` of the next function is set to that value (all other `input`
+is passed through).
+
+###### Example
+
+The following example shows how returning an error stops the pipeline:
+
+```js
+var trough = require('trough');
+
+trough()
+ .use(function (val) {
+ return new Error('Got: ' + val);
+ })
+ .run('some value', console.log);
+```
+
+Yields:
+
+```txt
+Error: Got: some value
+ at ~/example.js:5:12
+ ...
+```
+
+The following example shows how throwing an error stops the pipeline:
+
+```js
+var trough = require('trough');
+
+trough()
+ .use(function (val) {
+ throw new Error('Got: ' + val);
+ })
+ .run('more value', console.log);
+```
+
+Yields:
+
+```txt
+Error: Got: more value
+ at ~/example.js:5:11
+ ...
+```
+
+The following example shows how the first output can be modified:
+
+```js
+var trough = require('trough');
+
+trough()
+ .use(function (val) {
+ return 'even ' + val;
+ })
+ .run('more value', 'untouched', console.log);
+```
+
+Yields:
+
+```txt
+null 'even more value' 'untouched'
+```
+
+##### Promise
+
+If `fn` returns a promise, and that promise rejects, the pipeline fails
+and `done` is invoked with the rejected value.
+
+If `fn` returns a promise, and that promise resolves with a value
+(neither `null` nor `undefined`), the first `input` of the next function
+is set to that value (all other `input` is passed through).
+
+###### Example
+
+The following example shows how rejecting a promise stops the pipeline:
+
+```js
+var trough = require('trough');
+
+trough()
+ .use(function (val) {
+ return new Promise(function (resolve, reject) {
+ reject('Got: ' + val);
+ });
+ })
+ .run('val', console.log);
+```
+
+Yields:
+
+```txt
+Got: val
+```
+
+The following example shows how the input isn’t touched by resolving
+to `null`.
+
+```js
+var trough = require('trough');
+
+trough()
+ .use(function () {
+ return new Promise(function (resolve) {
+ setTimeout(function () {
+ resolve(null);
+ }, 100);
+ });
+ })
+ .run('Input', console.log);
+```
+
+Yields:
+
+```txt
+null 'Input'
+```
+
+##### Asynchronous
+
+If `fn` accepts one more argument than the given `input`, a `next`
+function is given (after the input). `next` must be called, but doesn’t
+have to be called async.
+
+If `next` is given a value (neither `null` nor `undefined`) as its first
+argument, the pipeline fails and `done` is invoked with that value.
+
+If `next` is given no value (either `null` or `undefined`) as the first
+argument, all following non-nully values change the input of the following
+function, and all nully values default to the `input`.
+
+###### Example
+
+The following example shows how passing a first argument stops the
+pipeline:
+
+```js
+var trough = require('trough');
+
+trough()
+ .use(function (val, next) {
+ next(new Error('Got: ' + val));
+ })
+ .run('val', console.log);
+```
+
+Yields:
+
+```txt
+Error: Got: val
+ at ~/example.js:5:10
+```
+
+The following example shows how more values than the input are passed.
+
+```js
+var trough = require('trough');
+
+trough()
+ .use(function (val, next) {
+ setTimeout(function () {
+ next(null, null, 'values');
+ }, 100);
+ })
+ .run('some', console.log);
+```
+
+Yields:
+
+```txt
+null 'some' 'values'
+```
+
+## License
+
+[MIT][license] © [Titus Wormer][author]
+
+<!-- Definitions -->
+
+[travis-badge]: https://img.shields.io/travis/wooorm/trough.svg
+
+[travis]: https://travis-ci.org/wooorm/trough
+
+[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/trough.svg
+
+[codecov]: https://codecov.io/github/wooorm/trough
+
+[npm]: https://docs.npmjs.com/cli/install
+
+[license]: LICENSE
+
+[author]: http://wooorm.com
+
+[ware]: https://github.com/segmentio/ware
+
+[trough]: #trough-1
+
+[use]: #troughusefn
+
+[run]: #troughruninput-done
+
+[fn]: #function-fninput-next
+
+[done]: #function-doneerr-output
+
+[async]: #asynchronous
diff --git a/tools/node_modules/eslint/node_modules/tryit/README.md b/tools/node_modules/eslint/node_modules/tryit/README.md
new file mode 100644
index 0000000000..80418843eb
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/tryit/README.md
@@ -0,0 +1,56 @@
+# tryit
+
+Tiny module wrapping try/catch in JavaScript.
+
+It's *literally 11 lines of code*, [just read it](tryit.js) that's all the documentation you'll need.
+
+
+## install
+
+```
+npm install tryit
+```
+
+## usage
+
+What you'd normally do:
+```js
+try {
+ dangerousThing();
+} catch (e) {
+ console.log('something');
+}
+```
+
+With try-it (all it does is wrap try-catch)
+```js
+var tryit = require('tryit');
+
+tryit(dangerousThing);
+```
+
+You can also handle the error by passing a second function
+```js
+tryit(dangerousThing, function (e) {
+ if (e) {
+ console.log('do something');
+ }
+})
+```
+
+The second function follows error-first pattern common in node. So if you pass a callback it gets called in both cases. But will have an error as the first argument if it fails.
+
+## WHAT? WHY DO THIS!?
+
+Primary motivation is having a clean way to wrap things that might fail, where I don't care if it fails. I just want to try it.
+
+This includes stuff like blindly reading/parsing stuff from localStorage in the browser. If it's not there or if parsing it fails, that's fine. But I don't want to leave a bunch of empty `catch (e) {}` blocks in the code.
+
+Obviously, this is useful any time you're going to attempt to read some unknown data structure.
+
+In addition, my understanding is that it's hard for JS engines to optimize code in try blocks. By actually passing the code to be executed into a re-used try block, we can avoid having to have more than a single try block in our app. Again, this is not a primary motivation, just a potential side benefit.
+
+
+## license
+
+[MIT](http://mit.joreteg.com/)
diff --git a/tools/node_modules/eslint/node_modules/tryit/package.json b/tools/node_modules/eslint/node_modules/tryit/package.json
new file mode 100644
index 0000000000..62f17de1d6
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/tryit/package.json
@@ -0,0 +1,59 @@
+{
+ "_from": "tryit@^1.0.1",
+ "_id": "tryit@1.0.3",
+ "_inBundle": false,
+ "_integrity": "sha1-OTvnMKlEb9Hq1tpZoBQwjzbCics=",
+ "_location": "/eslint/tryit",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "tryit@^1.0.1",
+ "name": "tryit",
+ "escapedName": "tryit",
+ "rawSpec": "^1.0.1",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.1"
+ },
+ "_requiredBy": [
+ "/eslint/is-resolvable"
+ ],
+ "_resolved": "https://registry.npmjs.org/tryit/-/tryit-1.0.3.tgz",
+ "_shasum": "393be730a9446fd1ead6da59a014308f36c289cb",
+ "_spec": "tryit@^1.0.1",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/is-resolvable",
+ "author": {
+ "name": "Henrik Joreteg",
+ "email": "henrik@andyet.net"
+ },
+ "bugs": {
+ "url": "https://github.com/HenrikJoreteg/tryit/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Module to wrap try-catch for better performance and cleaner API.",
+ "devDependencies": {
+ "tap-spec": "^2.1.2",
+ "tape": "^3.0.3"
+ },
+ "files": [
+ "tryit.js"
+ ],
+ "homepage": "https://github.com/HenrikJoreteg/tryit#readme",
+ "keywords": [
+ "errors",
+ "try",
+ "errorhandling"
+ ],
+ "license": "MIT",
+ "main": "tryit.js",
+ "name": "tryit",
+ "repository": {
+ "type": "git",
+ "url": "git+ssh://git@github.com/HenrikJoreteg/tryit.git"
+ },
+ "scripts": {
+ "test": "node test/test.js | tap-spec"
+ },
+ "version": "1.0.3"
+}
diff --git a/tools/node_modules/eslint/node_modules/tryit/tryit.js b/tools/node_modules/eslint/node_modules/tryit/tryit.js
new file mode 100644
index 0000000000..98a57007ea
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/tryit/tryit.js
@@ -0,0 +1,14 @@
+// tryit
+// Simple, re-usuable try-catch, this is a performance optimization
+// and provides a cleaner API.
+module.exports = function (fn, cb) {
+ var err;
+
+ try {
+ fn();
+ } catch (e) {
+ err = e;
+ }
+
+ if (cb) cb(err || null);
+};
diff --git a/tools/node_modules/eslint/node_modules/type-check/LICENSE b/tools/node_modules/eslint/node_modules/type-check/LICENSE
new file mode 100644
index 0000000000..525b11850e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/type-check/LICENSE
@@ -0,0 +1,22 @@
+Copyright (c) George Zahariev
+
+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/tools/node_modules/eslint/node_modules/type-check/README.md b/tools/node_modules/eslint/node_modules/type-check/README.md
new file mode 100644
index 0000000000..ec92d5930b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/type-check/README.md
@@ -0,0 +1,210 @@
+# type-check [![Build Status](https://travis-ci.org/gkz/type-check.png?branch=master)](https://travis-ci.org/gkz/type-check)
+
+<a name="type-check" />
+
+`type-check` is a library which allows you to check the types of JavaScript values at runtime with a Haskell like type syntax. It is great for checking external input, for testing, or even for adding a bit of safety to your internal code. It is a major component of [levn](https://github.com/gkz/levn). MIT license. Version 0.3.2. Check out the [demo](http://gkz.github.io/type-check/).
+
+For updates on `type-check`, [follow me on twitter](https://twitter.com/gkzahariev).
+
+ npm install type-check
+
+## Quick Examples
+
+```js
+// Basic types:
+var typeCheck = require('type-check').typeCheck;
+typeCheck('Number', 1); // true
+typeCheck('Number', 'str'); // false
+typeCheck('Error', new Error); // true
+typeCheck('Undefined', undefined); // true
+
+// Comment
+typeCheck('count::Number', 1); // true
+
+// One type OR another type:
+typeCheck('Number | String', 2); // true
+typeCheck('Number | String', 'str'); // true
+
+// Wildcard, matches all types:
+typeCheck('*', 2) // true
+
+// Array, all elements of a single type:
+typeCheck('[Number]', [1, 2, 3]); // true
+typeCheck('[Number]', [1, 'str', 3]); // false
+
+// Tuples, or fixed length arrays with elements of different types:
+typeCheck('(String, Number)', ['str', 2]); // true
+typeCheck('(String, Number)', ['str']); // false
+typeCheck('(String, Number)', ['str', 2, 5]); // false
+
+// Object properties:
+typeCheck('{x: Number, y: Boolean}', {x: 2, y: false}); // true
+typeCheck('{x: Number, y: Boolean}', {x: 2}); // false
+typeCheck('{x: Number, y: Maybe Boolean}', {x: 2}); // true
+typeCheck('{x: Number, y: Boolean}', {x: 2, y: false, z: 3}); // false
+typeCheck('{x: Number, y: Boolean, ...}', {x: 2, y: false, z: 3}); // true
+
+// A particular type AND object properties:
+typeCheck('RegExp{source: String, ...}', /re/i); // true
+typeCheck('RegExp{source: String, ...}', {source: 're'}); // false
+
+// Custom types:
+var opt = {customTypes:
+ {Even: { typeOf: 'Number', validate: function(x) { return x % 2 === 0; }}}};
+typeCheck('Even', 2, opt); // true
+
+// Nested:
+var type = '{a: (String, [Number], {y: Array, ...}), b: Error{message: String, ...}}'
+typeCheck(type, {a: ['hi', [1, 2, 3], {y: [1, 'ms']}], b: new Error('oh no')}); // true
+```
+
+Check out the [type syntax format](#syntax) and [guide](#guide).
+
+## Usage
+
+`require('type-check');` returns an object that exposes four properties. `VERSION` is the current version of the library as a string. `typeCheck`, `parseType`, and `parsedTypeCheck` are functions.
+
+```js
+// typeCheck(type, input, options);
+typeCheck('Number', 2); // true
+
+// parseType(type);
+var parsedType = parseType('Number'); // object
+
+// parsedTypeCheck(parsedType, input, options);
+parsedTypeCheck(parsedType, 2); // true
+```
+
+### typeCheck(type, input, options)
+
+`typeCheck` checks a JavaScript value `input` against `type` written in the [type format](#type-format) (and taking account the optional `options`) and returns whether the `input` matches the `type`.
+
+##### arguments
+* type - `String` - the type written in the [type format](#type-format) which to check against
+* input - `*` - any JavaScript value, which is to be checked against the type
+* options - `Maybe Object` - an optional parameter specifying additional options, currently the only available option is specifying [custom types](#custom-types)
+
+##### returns
+`Boolean` - whether the input matches the type
+
+##### example
+```js
+typeCheck('Number', 2); // true
+```
+
+### parseType(type)
+
+`parseType` parses string `type` written in the [type format](#type-format) into an object representing the parsed type.
+
+##### arguments
+* type - `String` - the type written in the [type format](#type-format) which to parse
+
+##### returns
+`Object` - an object in the parsed type format representing the parsed type
+
+##### example
+```js
+parseType('Number'); // [{type: 'Number'}]
+```
+### parsedTypeCheck(parsedType, input, options)
+
+`parsedTypeCheck` checks a JavaScript value `input` against parsed `type` in the parsed type format (and taking account the optional `options`) and returns whether the `input` matches the `type`. Use this in conjunction with `parseType` if you are going to use a type more than once.
+
+##### arguments
+* type - `Object` - the type in the parsed type format which to check against
+* input - `*` - any JavaScript value, which is to be checked against the type
+* options - `Maybe Object` - an optional parameter specifying additional options, currently the only available option is specifying [custom types](#custom-types)
+
+##### returns
+`Boolean` - whether the input matches the type
+
+##### example
+```js
+parsedTypeCheck([{type: 'Number'}], 2); // true
+var parsedType = parseType('String');
+parsedTypeCheck(parsedType, 'str'); // true
+```
+
+<a name="type-format" />
+## Type Format
+
+### Syntax
+
+White space is ignored. The root node is a __Types__.
+
+* __Identifier__ = `[\$\w]+` - a group of any lower or upper case letters, numbers, underscores, or dollar signs - eg. `String`
+* __Type__ = an `Identifier`, an `Identifier` followed by a `Structure`, just a `Structure`, or a wildcard `*` - eg. `String`, `Object{x: Number}`, `{x: Number}`, `Array{0: String, 1: Boolean, length: Number}`, `*`
+* __Types__ = optionally a comment (an `Indentifier` followed by a `::`), optionally the identifier `Maybe`, one or more `Type`, separated by `|` - eg. `Number`, `String | Date`, `Maybe Number`, `Maybe Boolean | String`
+* __Structure__ = `Fields`, or a `Tuple`, or an `Array` - eg. `{x: Number}`, `(String, Number)`, `[Date]`
+* __Fields__ = a `{`, followed one or more `Field` separated by a comma `,` (trailing comma `,` is permitted), optionally an `...` (always preceded by a comma `,`), followed by a `}` - eg. `{x: Number, y: String}`, `{k: Function, ...}`
+* __Field__ = an `Identifier`, followed by a colon `:`, followed by `Types` - eg. `x: Date | String`, `y: Boolean`
+* __Tuple__ = a `(`, followed by one or more `Types` separated by a comma `,` (trailing comma `,` is permitted), followed by a `)` - eg `(Date)`, `(Number, Date)`
+* __Array__ = a `[` followed by exactly one `Types` followed by a `]` - eg. `[Boolean]`, `[Boolean | Null]`
+
+### Guide
+
+`type-check` uses `Object.toString` to find out the basic type of a value. Specifically,
+
+```js
+{}.toString.call(VALUE).slice(8, -1)
+{}.toString.call(true).slice(8, -1) // 'Boolean'
+```
+A basic type, eg. `Number`, uses this check. This is much more versatile than using `typeof` - for example, with `document`, `typeof` produces `'object'` which isn't that useful, and our technique produces `'HTMLDocument'`.
+
+You may check for multiple types by separating types with a `|`. The checker proceeds from left to right, and passes if the value is any of the types - eg. `String | Boolean` first checks if the value is a string, and then if it is a boolean. If it is none of those, then it returns false.
+
+Adding a `Maybe` in front of a list of multiple types is the same as also checking for `Null` and `Undefined` - eg. `Maybe String` is equivalent to `Undefined | Null | String`.
+
+You may add a comment to remind you of what the type is for by following an identifier with a `::` before a type (or multiple types). The comment is simply thrown out.
+
+The wildcard `*` matches all types.
+
+There are three types of structures for checking the contents of a value: 'fields', 'tuple', and 'array'.
+
+If used by itself, a 'fields' structure will pass with any type of object as long as it is an instance of `Object` and the properties pass - this allows for duck typing - eg. `{x: Boolean}`.
+
+To check if the properties pass, and the value is of a certain type, you can specify the type - eg. `Error{message: String}`.
+
+If you want to make a field optional, you can simply use `Maybe` - eg. `{x: Boolean, y: Maybe String}` will still pass if `y` is undefined (or null).
+
+If you don't care if the value has properties beyond what you have specified, you can use the 'etc' operator `...` - eg. `{x: Boolean, ...}` will match an object with an `x` property that is a boolean, and with zero or more other properties.
+
+For an array, you must specify one or more types (separated by `|`) - it will pass for something of any length as long as each element passes the types provided - eg. `[Number]`, `[Number | String]`.
+
+A tuple checks for a fixed number of elements, each of a potentially different type. Each element is separated by a comma - eg. `(String, Number)`.
+
+An array and tuple structure check that the value is of type `Array` by default, but if another type is specified, they will check for that instead - eg. `Int32Array[Number]`. You can use the wildcard `*` to search for any type at all.
+
+Check out the [type precedence](https://github.com/zaboco/type-precedence) library for type-check.
+
+## Options
+
+Options is an object. It is an optional parameter to the `typeCheck` and `parsedTypeCheck` functions. The only current option is `customTypes`.
+
+<a name="custom-types" />
+### Custom Types
+
+__Example:__
+
+```js
+var options = {
+ customTypes: {
+ Even: {
+ typeOf: 'Number',
+ validate: function(x) {
+ return x % 2 === 0;
+ }
+ }
+ }
+};
+typeCheck('Even', 2, options); // true
+typeCheck('Even', 3, options); // false
+```
+
+`customTypes` allows you to set up custom types for validation. The value of this is an object. The keys of the object are the types you will be matching. Each value of the object will be an object having a `typeOf` property - a string, and `validate` property - a function.
+
+The `typeOf` property is the type the value should be, and `validate` is a function which should return true if the value is of that type. `validate` receives one parameter, which is the value that we are checking.
+
+## Technical About
+
+`type-check` is written in [LiveScript](http://livescript.net/) - a language that compiles to JavaScript. It also uses the [prelude.ls](http://preludels.com/) library.
diff --git a/tools/node_modules/eslint/node_modules/type-check/lib/check.js b/tools/node_modules/eslint/node_modules/type-check/lib/check.js
new file mode 100644
index 0000000000..0504c8d2f4
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/type-check/lib/check.js
@@ -0,0 +1,126 @@
+// Generated by LiveScript 1.4.0
+(function(){
+ var ref$, any, all, isItNaN, types, defaultType, customTypes, toString$ = {}.toString;
+ ref$ = require('prelude-ls'), any = ref$.any, all = ref$.all, isItNaN = ref$.isItNaN;
+ types = {
+ Number: {
+ typeOf: 'Number',
+ validate: function(it){
+ return !isItNaN(it);
+ }
+ },
+ NaN: {
+ typeOf: 'Number',
+ validate: isItNaN
+ },
+ Int: {
+ typeOf: 'Number',
+ validate: function(it){
+ return !isItNaN(it) && it % 1 === 0;
+ }
+ },
+ Float: {
+ typeOf: 'Number',
+ validate: function(it){
+ return !isItNaN(it);
+ }
+ },
+ Date: {
+ typeOf: 'Date',
+ validate: function(it){
+ return !isItNaN(it.getTime());
+ }
+ }
+ };
+ defaultType = {
+ array: 'Array',
+ tuple: 'Array'
+ };
+ function checkArray(input, type){
+ return all(function(it){
+ return checkMultiple(it, type.of);
+ }, input);
+ }
+ function checkTuple(input, type){
+ var i, i$, ref$, len$, types;
+ i = 0;
+ for (i$ = 0, len$ = (ref$ = type.of).length; i$ < len$; ++i$) {
+ types = ref$[i$];
+ if (!checkMultiple(input[i], types)) {
+ return false;
+ }
+ i++;
+ }
+ return input.length <= i;
+ }
+ function checkFields(input, type){
+ var inputKeys, numInputKeys, k, numOfKeys, key, ref$, types;
+ inputKeys = {};
+ numInputKeys = 0;
+ for (k in input) {
+ inputKeys[k] = true;
+ numInputKeys++;
+ }
+ numOfKeys = 0;
+ for (key in ref$ = type.of) {
+ types = ref$[key];
+ if (!checkMultiple(input[key], types)) {
+ return false;
+ }
+ if (inputKeys[key]) {
+ numOfKeys++;
+ }
+ }
+ return type.subset || numInputKeys === numOfKeys;
+ }
+ function checkStructure(input, type){
+ if (!(input instanceof Object)) {
+ return false;
+ }
+ switch (type.structure) {
+ case 'fields':
+ return checkFields(input, type);
+ case 'array':
+ return checkArray(input, type);
+ case 'tuple':
+ return checkTuple(input, type);
+ }
+ }
+ function check(input, typeObj){
+ var type, structure, setting, that;
+ type = typeObj.type, structure = typeObj.structure;
+ if (type) {
+ if (type === '*') {
+ return true;
+ }
+ setting = customTypes[type] || types[type];
+ if (setting) {
+ return setting.typeOf === toString$.call(input).slice(8, -1) && setting.validate(input);
+ } else {
+ return type === toString$.call(input).slice(8, -1) && (!structure || checkStructure(input, typeObj));
+ }
+ } else if (structure) {
+ if (that = defaultType[structure]) {
+ if (that !== toString$.call(input).slice(8, -1)) {
+ return false;
+ }
+ }
+ return checkStructure(input, typeObj);
+ } else {
+ throw new Error("No type defined. Input: " + input + ".");
+ }
+ }
+ function checkMultiple(input, types){
+ if (toString$.call(types).slice(8, -1) !== 'Array') {
+ throw new Error("Types must be in an array. Input: " + input + ".");
+ }
+ return any(function(it){
+ return check(input, it);
+ }, types);
+ }
+ module.exports = function(parsedType, input, options){
+ options == null && (options = {});
+ customTypes = options.customTypes || {};
+ return checkMultiple(input, parsedType);
+ };
+}).call(this);
diff --git a/tools/node_modules/eslint/node_modules/type-check/lib/index.js b/tools/node_modules/eslint/node_modules/type-check/lib/index.js
new file mode 100644
index 0000000000..f3316bab49
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/type-check/lib/index.js
@@ -0,0 +1,16 @@
+// Generated by LiveScript 1.4.0
+(function(){
+ var VERSION, parseType, parsedTypeCheck, typeCheck;
+ VERSION = '0.3.2';
+ parseType = require('./parse-type');
+ parsedTypeCheck = require('./check');
+ typeCheck = function(type, input, options){
+ return parsedTypeCheck(parseType(type), input, options);
+ };
+ module.exports = {
+ VERSION: VERSION,
+ typeCheck: typeCheck,
+ parsedTypeCheck: parsedTypeCheck,
+ parseType: parseType
+ };
+}).call(this);
diff --git a/tools/node_modules/eslint/node_modules/type-check/lib/parse-type.js b/tools/node_modules/eslint/node_modules/type-check/lib/parse-type.js
new file mode 100644
index 0000000000..5baf661fae
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/type-check/lib/parse-type.js
@@ -0,0 +1,196 @@
+// Generated by LiveScript 1.4.0
+(function(){
+ var identifierRegex, tokenRegex;
+ identifierRegex = /[\$\w]+/;
+ function peek(tokens){
+ var token;
+ token = tokens[0];
+ if (token == null) {
+ throw new Error('Unexpected end of input.');
+ }
+ return token;
+ }
+ function consumeIdent(tokens){
+ var token;
+ token = peek(tokens);
+ if (!identifierRegex.test(token)) {
+ throw new Error("Expected text, got '" + token + "' instead.");
+ }
+ return tokens.shift();
+ }
+ function consumeOp(tokens, op){
+ var token;
+ token = peek(tokens);
+ if (token !== op) {
+ throw new Error("Expected '" + op + "', got '" + token + "' instead.");
+ }
+ return tokens.shift();
+ }
+ function maybeConsumeOp(tokens, op){
+ var token;
+ token = tokens[0];
+ if (token === op) {
+ return tokens.shift();
+ } else {
+ return null;
+ }
+ }
+ function consumeArray(tokens){
+ var types;
+ consumeOp(tokens, '[');
+ if (peek(tokens) === ']') {
+ throw new Error("Must specify type of Array - eg. [Type], got [] instead.");
+ }
+ types = consumeTypes(tokens);
+ consumeOp(tokens, ']');
+ return {
+ structure: 'array',
+ of: types
+ };
+ }
+ function consumeTuple(tokens){
+ var components;
+ components = [];
+ consumeOp(tokens, '(');
+ if (peek(tokens) === ')') {
+ throw new Error("Tuple must be of at least length 1 - eg. (Type), got () instead.");
+ }
+ for (;;) {
+ components.push(consumeTypes(tokens));
+ maybeConsumeOp(tokens, ',');
+ if (')' === peek(tokens)) {
+ break;
+ }
+ }
+ consumeOp(tokens, ')');
+ return {
+ structure: 'tuple',
+ of: components
+ };
+ }
+ function consumeFields(tokens){
+ var fields, subset, ref$, key, types;
+ fields = {};
+ consumeOp(tokens, '{');
+ subset = false;
+ for (;;) {
+ if (maybeConsumeOp(tokens, '...')) {
+ subset = true;
+ break;
+ }
+ ref$ = consumeField(tokens), key = ref$[0], types = ref$[1];
+ fields[key] = types;
+ maybeConsumeOp(tokens, ',');
+ if ('}' === peek(tokens)) {
+ break;
+ }
+ }
+ consumeOp(tokens, '}');
+ return {
+ structure: 'fields',
+ of: fields,
+ subset: subset
+ };
+ }
+ function consumeField(tokens){
+ var key, types;
+ key = consumeIdent(tokens);
+ consumeOp(tokens, ':');
+ types = consumeTypes(tokens);
+ return [key, types];
+ }
+ function maybeConsumeStructure(tokens){
+ switch (tokens[0]) {
+ case '[':
+ return consumeArray(tokens);
+ case '(':
+ return consumeTuple(tokens);
+ case '{':
+ return consumeFields(tokens);
+ }
+ }
+ function consumeType(tokens){
+ var token, wildcard, type, structure;
+ token = peek(tokens);
+ wildcard = token === '*';
+ if (wildcard || identifierRegex.test(token)) {
+ type = wildcard
+ ? consumeOp(tokens, '*')
+ : consumeIdent(tokens);
+ structure = maybeConsumeStructure(tokens);
+ if (structure) {
+ return structure.type = type, structure;
+ } else {
+ return {
+ type: type
+ };
+ }
+ } else {
+ structure = maybeConsumeStructure(tokens);
+ if (!structure) {
+ throw new Error("Unexpected character: " + token);
+ }
+ return structure;
+ }
+ }
+ function consumeTypes(tokens){
+ var lookahead, types, typesSoFar, typeObj, type;
+ if ('::' === peek(tokens)) {
+ throw new Error("No comment before comment separator '::' found.");
+ }
+ lookahead = tokens[1];
+ if (lookahead != null && lookahead === '::') {
+ tokens.shift();
+ tokens.shift();
+ }
+ types = [];
+ typesSoFar = {};
+ if ('Maybe' === peek(tokens)) {
+ tokens.shift();
+ types = [
+ {
+ type: 'Undefined'
+ }, {
+ type: 'Null'
+ }
+ ];
+ typesSoFar = {
+ Undefined: true,
+ Null: true
+ };
+ }
+ for (;;) {
+ typeObj = consumeType(tokens), type = typeObj.type;
+ if (!typesSoFar[type]) {
+ types.push(typeObj);
+ }
+ typesSoFar[type] = true;
+ if (!maybeConsumeOp(tokens, '|')) {
+ break;
+ }
+ }
+ return types;
+ }
+ tokenRegex = RegExp('\\.\\.\\.|::|->|' + identifierRegex.source + '|\\S', 'g');
+ module.exports = function(input){
+ var tokens, e;
+ if (!input.length) {
+ throw new Error('No type specified.');
+ }
+ tokens = input.match(tokenRegex) || [];
+ if (in$('->', tokens)) {
+ throw new Error("Function types are not supported.\ To validate that something is a function, you may use 'Function'.");
+ }
+ try {
+ return consumeTypes(tokens);
+ } catch (e$) {
+ e = e$;
+ throw new Error(e.message + " - Remaining tokens: " + JSON.stringify(tokens) + " - Initial input: '" + input + "'");
+ }
+ };
+ function in$(x, xs){
+ var i = -1, l = xs.length >>> 0;
+ while (++i < l) if (x === xs[i]) return true;
+ return false;
+ }
+}).call(this);
diff --git a/tools/node_modules/eslint/node_modules/type-check/package.json b/tools/node_modules/eslint/node_modules/type-check/package.json
new file mode 100644
index 0000000000..e452207e48
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/type-check/package.json
@@ -0,0 +1,71 @@
+{
+ "_from": "type-check@~0.3.2",
+ "_id": "type-check@0.3.2",
+ "_inBundle": false,
+ "_integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=",
+ "_location": "/eslint/type-check",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "type-check@~0.3.2",
+ "name": "type-check",
+ "escapedName": "type-check",
+ "rawSpec": "~0.3.2",
+ "saveSpec": null,
+ "fetchSpec": "~0.3.2"
+ },
+ "_requiredBy": [
+ "/eslint/levn",
+ "/eslint/optionator"
+ ],
+ "_resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
+ "_shasum": "5884cab512cf1d355e3fb784f30804b2b520db72",
+ "_spec": "type-check@~0.3.2",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/levn",
+ "author": {
+ "name": "George Zahariev",
+ "email": "z@georgezahariev.com"
+ },
+ "bugs": {
+ "url": "https://github.com/gkz/type-check/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "prelude-ls": "~1.1.2"
+ },
+ "deprecated": false,
+ "description": "type-check allows you to check the types of JavaScript values at runtime with a Haskell like type syntax.",
+ "devDependencies": {
+ "browserify": "~12.0.1",
+ "istanbul": "~0.4.1",
+ "livescript": "~1.4.0",
+ "mocha": "~2.3.4"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ },
+ "files": [
+ "lib",
+ "README.md",
+ "LICENSE"
+ ],
+ "homepage": "https://github.com/gkz/type-check",
+ "keywords": [
+ "type",
+ "check",
+ "checking",
+ "library"
+ ],
+ "license": "MIT",
+ "main": "./lib/",
+ "name": "type-check",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/gkz/type-check.git"
+ },
+ "scripts": {
+ "test": "make test"
+ },
+ "version": "0.3.2"
+}
diff --git a/tools/node_modules/eslint/node_modules/typedarray/LICENSE b/tools/node_modules/eslint/node_modules/typedarray/LICENSE
new file mode 100644
index 0000000000..11adfaec9e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/typedarray/LICENSE
@@ -0,0 +1,35 @@
+/*
+ Copyright (c) 2010, Linden Research, Inc.
+ Copyright (c) 2012, Joshua Bell
+
+ 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.
+ $/LicenseInfo$
+ */
+
+// Original can be found at:
+// https://bitbucket.org/lindenlab/llsd
+// Modifications by Joshua Bell inexorabletash@gmail.com
+// https://github.com/inexorabletash/polyfill
+
+// ES3/ES5 implementation of the Krhonos Typed Array Specification
+// Ref: http://www.khronos.org/registry/typedarray/specs/latest/
+// Date: 2011-02-01
+//
+// Variations:
+// * Allows typed_array.get/set() as alias for subscripts (typed_array[])
diff --git a/tools/node_modules/eslint/node_modules/typedarray/index.js b/tools/node_modules/eslint/node_modules/typedarray/index.js
new file mode 100644
index 0000000000..5e540841f4
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/typedarray/index.js
@@ -0,0 +1,630 @@
+var undefined = (void 0); // Paranoia
+
+// Beyond this value, index getters/setters (i.e. array[0], array[1]) are so slow to
+// create, and consume so much memory, that the browser appears frozen.
+var MAX_ARRAY_LENGTH = 1e5;
+
+// Approximations of internal ECMAScript conversion functions
+var ECMAScript = (function() {
+ // Stash a copy in case other scripts modify these
+ var opts = Object.prototype.toString,
+ ophop = Object.prototype.hasOwnProperty;
+
+ return {
+ // Class returns internal [[Class]] property, used to avoid cross-frame instanceof issues:
+ Class: function(v) { return opts.call(v).replace(/^\[object *|\]$/g, ''); },
+ HasProperty: function(o, p) { return p in o; },
+ HasOwnProperty: function(o, p) { return ophop.call(o, p); },
+ IsCallable: function(o) { return typeof o === 'function'; },
+ ToInt32: function(v) { return v >> 0; },
+ ToUint32: function(v) { return v >>> 0; }
+ };
+}());
+
+// Snapshot intrinsics
+var LN2 = Math.LN2,
+ abs = Math.abs,
+ floor = Math.floor,
+ log = Math.log,
+ min = Math.min,
+ pow = Math.pow,
+ round = Math.round;
+
+// ES5: lock down object properties
+function configureProperties(obj) {
+ if (getOwnPropNames && defineProp) {
+ var props = getOwnPropNames(obj), i;
+ for (i = 0; i < props.length; i += 1) {
+ defineProp(obj, props[i], {
+ value: obj[props[i]],
+ writable: false,
+ enumerable: false,
+ configurable: false
+ });
+ }
+ }
+}
+
+// emulate ES5 getter/setter API using legacy APIs
+// http://blogs.msdn.com/b/ie/archive/2010/09/07/transitioning-existing-code-to-the-es5-getter-setter-apis.aspx
+// (second clause tests for Object.defineProperty() in IE<9 that only supports extending DOM prototypes, but
+// note that IE<9 does not support __defineGetter__ or __defineSetter__ so it just renders the method harmless)
+var defineProp
+if (Object.defineProperty && (function() {
+ try {
+ Object.defineProperty({}, 'x', {});
+ return true;
+ } catch (e) {
+ return false;
+ }
+ })()) {
+ defineProp = Object.defineProperty;
+} else {
+ defineProp = function(o, p, desc) {
+ if (!o === Object(o)) throw new TypeError("Object.defineProperty called on non-object");
+ if (ECMAScript.HasProperty(desc, 'get') && Object.prototype.__defineGetter__) { Object.prototype.__defineGetter__.call(o, p, desc.get); }
+ if (ECMAScript.HasProperty(desc, 'set') && Object.prototype.__defineSetter__) { Object.prototype.__defineSetter__.call(o, p, desc.set); }
+ if (ECMAScript.HasProperty(desc, 'value')) { o[p] = desc.value; }
+ return o;
+ };
+}
+
+var getOwnPropNames = Object.getOwnPropertyNames || function (o) {
+ if (o !== Object(o)) throw new TypeError("Object.getOwnPropertyNames called on non-object");
+ var props = [], p;
+ for (p in o) {
+ if (ECMAScript.HasOwnProperty(o, p)) {
+ props.push(p);
+ }
+ }
+ return props;
+};
+
+// ES5: Make obj[index] an alias for obj._getter(index)/obj._setter(index, value)
+// for index in 0 ... obj.length
+function makeArrayAccessors(obj) {
+ if (!defineProp) { return; }
+
+ if (obj.length > MAX_ARRAY_LENGTH) throw new RangeError("Array too large for polyfill");
+
+ function makeArrayAccessor(index) {
+ defineProp(obj, index, {
+ 'get': function() { return obj._getter(index); },
+ 'set': function(v) { obj._setter(index, v); },
+ enumerable: true,
+ configurable: false
+ });
+ }
+
+ var i;
+ for (i = 0; i < obj.length; i += 1) {
+ makeArrayAccessor(i);
+ }
+}
+
+// Internal conversion functions:
+// pack<Type>() - take a number (interpreted as Type), output a byte array
+// unpack<Type>() - take a byte array, output a Type-like number
+
+function as_signed(value, bits) { var s = 32 - bits; return (value << s) >> s; }
+function as_unsigned(value, bits) { var s = 32 - bits; return (value << s) >>> s; }
+
+function packI8(n) { return [n & 0xff]; }
+function unpackI8(bytes) { return as_signed(bytes[0], 8); }
+
+function packU8(n) { return [n & 0xff]; }
+function unpackU8(bytes) { return as_unsigned(bytes[0], 8); }
+
+function packU8Clamped(n) { n = round(Number(n)); return [n < 0 ? 0 : n > 0xff ? 0xff : n & 0xff]; }
+
+function packI16(n) { return [(n >> 8) & 0xff, n & 0xff]; }
+function unpackI16(bytes) { return as_signed(bytes[0] << 8 | bytes[1], 16); }
+
+function packU16(n) { return [(n >> 8) & 0xff, n & 0xff]; }
+function unpackU16(bytes) { return as_unsigned(bytes[0] << 8 | bytes[1], 16); }
+
+function packI32(n) { return [(n >> 24) & 0xff, (n >> 16) & 0xff, (n >> 8) & 0xff, n & 0xff]; }
+function unpackI32(bytes) { return as_signed(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32); }
+
+function packU32(n) { return [(n >> 24) & 0xff, (n >> 16) & 0xff, (n >> 8) & 0xff, n & 0xff]; }
+function unpackU32(bytes) { return as_unsigned(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32); }
+
+function packIEEE754(v, ebits, fbits) {
+
+ var bias = (1 << (ebits - 1)) - 1,
+ s, e, f, ln,
+ i, bits, str, bytes;
+
+ function roundToEven(n) {
+ var w = floor(n), f = n - w;
+ if (f < 0.5)
+ return w;
+ if (f > 0.5)
+ return w + 1;
+ return w % 2 ? w + 1 : w;
+ }
+
+ // Compute sign, exponent, fraction
+ if (v !== v) {
+ // NaN
+ // http://dev.w3.org/2006/webapi/WebIDL/#es-type-mapping
+ e = (1 << ebits) - 1; f = pow(2, fbits - 1); s = 0;
+ } else if (v === Infinity || v === -Infinity) {
+ e = (1 << ebits) - 1; f = 0; s = (v < 0) ? 1 : 0;
+ } else if (v === 0) {
+ e = 0; f = 0; s = (1 / v === -Infinity) ? 1 : 0;
+ } else {
+ s = v < 0;
+ v = abs(v);
+
+ if (v >= pow(2, 1 - bias)) {
+ e = min(floor(log(v) / LN2), 1023);
+ f = roundToEven(v / pow(2, e) * pow(2, fbits));
+ if (f / pow(2, fbits) >= 2) {
+ e = e + 1;
+ f = 1;
+ }
+ if (e > bias) {
+ // Overflow
+ e = (1 << ebits) - 1;
+ f = 0;
+ } else {
+ // Normalized
+ e = e + bias;
+ f = f - pow(2, fbits);
+ }
+ } else {
+ // Denormalized
+ e = 0;
+ f = roundToEven(v / pow(2, 1 - bias - fbits));
+ }
+ }
+
+ // Pack sign, exponent, fraction
+ bits = [];
+ for (i = fbits; i; i -= 1) { bits.push(f % 2 ? 1 : 0); f = floor(f / 2); }
+ for (i = ebits; i; i -= 1) { bits.push(e % 2 ? 1 : 0); e = floor(e / 2); }
+ bits.push(s ? 1 : 0);
+ bits.reverse();
+ str = bits.join('');
+
+ // Bits to bytes
+ bytes = [];
+ while (str.length) {
+ bytes.push(parseInt(str.substring(0, 8), 2));
+ str = str.substring(8);
+ }
+ return bytes;
+}
+
+function unpackIEEE754(bytes, ebits, fbits) {
+
+ // Bytes to bits
+ var bits = [], i, j, b, str,
+ bias, s, e, f;
+
+ for (i = bytes.length; i; i -= 1) {
+ b = bytes[i - 1];
+ for (j = 8; j; j -= 1) {
+ bits.push(b % 2 ? 1 : 0); b = b >> 1;
+ }
+ }
+ bits.reverse();
+ str = bits.join('');
+
+ // Unpack sign, exponent, fraction
+ bias = (1 << (ebits - 1)) - 1;
+ s = parseInt(str.substring(0, 1), 2) ? -1 : 1;
+ e = parseInt(str.substring(1, 1 + ebits), 2);
+ f = parseInt(str.substring(1 + ebits), 2);
+
+ // Produce number
+ if (e === (1 << ebits) - 1) {
+ return f !== 0 ? NaN : s * Infinity;
+ } else if (e > 0) {
+ // Normalized
+ return s * pow(2, e - bias) * (1 + f / pow(2, fbits));
+ } else if (f !== 0) {
+ // Denormalized
+ return s * pow(2, -(bias - 1)) * (f / pow(2, fbits));
+ } else {
+ return s < 0 ? -0 : 0;
+ }
+}
+
+function unpackF64(b) { return unpackIEEE754(b, 11, 52); }
+function packF64(v) { return packIEEE754(v, 11, 52); }
+function unpackF32(b) { return unpackIEEE754(b, 8, 23); }
+function packF32(v) { return packIEEE754(v, 8, 23); }
+
+
+//
+// 3 The ArrayBuffer Type
+//
+
+(function() {
+
+ /** @constructor */
+ var ArrayBuffer = function ArrayBuffer(length) {
+ length = ECMAScript.ToInt32(length);
+ if (length < 0) throw new RangeError('ArrayBuffer size is not a small enough positive integer');
+
+ this.byteLength = length;
+ this._bytes = [];
+ this._bytes.length = length;
+
+ var i;
+ for (i = 0; i < this.byteLength; i += 1) {
+ this._bytes[i] = 0;
+ }
+
+ configureProperties(this);
+ };
+
+ exports.ArrayBuffer = exports.ArrayBuffer || ArrayBuffer;
+
+ //
+ // 4 The ArrayBufferView Type
+ //
+
+ // NOTE: this constructor is not exported
+ /** @constructor */
+ var ArrayBufferView = function ArrayBufferView() {
+ //this.buffer = null;
+ //this.byteOffset = 0;
+ //this.byteLength = 0;
+ };
+
+ //
+ // 5 The Typed Array View Types
+ //
+
+ function makeConstructor(bytesPerElement, pack, unpack) {
+ // Each TypedArray type requires a distinct constructor instance with
+ // identical logic, which this produces.
+
+ var ctor;
+ ctor = function(buffer, byteOffset, length) {
+ var array, sequence, i, s;
+
+ if (!arguments.length || typeof arguments[0] === 'number') {
+ // Constructor(unsigned long length)
+ this.length = ECMAScript.ToInt32(arguments[0]);
+ if (length < 0) throw new RangeError('ArrayBufferView size is not a small enough positive integer');
+
+ this.byteLength = this.length * this.BYTES_PER_ELEMENT;
+ this.buffer = new ArrayBuffer(this.byteLength);
+ this.byteOffset = 0;
+ } else if (typeof arguments[0] === 'object' && arguments[0].constructor === ctor) {
+ // Constructor(TypedArray array)
+ array = arguments[0];
+
+ this.length = array.length;
+ this.byteLength = this.length * this.BYTES_PER_ELEMENT;
+ this.buffer = new ArrayBuffer(this.byteLength);
+ this.byteOffset = 0;
+
+ for (i = 0; i < this.length; i += 1) {
+ this._setter(i, array._getter(i));
+ }
+ } else if (typeof arguments[0] === 'object' &&
+ !(arguments[0] instanceof ArrayBuffer || ECMAScript.Class(arguments[0]) === 'ArrayBuffer')) {
+ // Constructor(sequence<type> array)
+ sequence = arguments[0];
+
+ this.length = ECMAScript.ToUint32(sequence.length);
+ this.byteLength = this.length * this.BYTES_PER_ELEMENT;
+ this.buffer = new ArrayBuffer(this.byteLength);
+ this.byteOffset = 0;
+
+ for (i = 0; i < this.length; i += 1) {
+ s = sequence[i];
+ this._setter(i, Number(s));
+ }
+ } else if (typeof arguments[0] === 'object' &&
+ (arguments[0] instanceof ArrayBuffer || ECMAScript.Class(arguments[0]) === 'ArrayBuffer')) {
+ // Constructor(ArrayBuffer buffer,
+ // optional unsigned long byteOffset, optional unsigned long length)
+ this.buffer = buffer;
+
+ this.byteOffset = ECMAScript.ToUint32(byteOffset);
+ if (this.byteOffset > this.buffer.byteLength) {
+ throw new RangeError("byteOffset out of range");
+ }
+
+ if (this.byteOffset % this.BYTES_PER_ELEMENT) {
+ // The given byteOffset must be a multiple of the element
+ // size of the specific type, otherwise an exception is raised.
+ throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size.");
+ }
+
+ if (arguments.length < 3) {
+ this.byteLength = this.buffer.byteLength - this.byteOffset;
+
+ if (this.byteLength % this.BYTES_PER_ELEMENT) {
+ throw new RangeError("length of buffer minus byteOffset not a multiple of the element size");
+ }
+ this.length = this.byteLength / this.BYTES_PER_ELEMENT;
+ } else {
+ this.length = ECMAScript.ToUint32(length);
+ this.byteLength = this.length * this.BYTES_PER_ELEMENT;
+ }
+
+ if ((this.byteOffset + this.byteLength) > this.buffer.byteLength) {
+ throw new RangeError("byteOffset and length reference an area beyond the end of the buffer");
+ }
+ } else {
+ throw new TypeError("Unexpected argument type(s)");
+ }
+
+ this.constructor = ctor;
+
+ configureProperties(this);
+ makeArrayAccessors(this);
+ };
+
+ ctor.prototype = new ArrayBufferView();
+ ctor.prototype.BYTES_PER_ELEMENT = bytesPerElement;
+ ctor.prototype._pack = pack;
+ ctor.prototype._unpack = unpack;
+ ctor.BYTES_PER_ELEMENT = bytesPerElement;
+
+ // getter type (unsigned long index);
+ ctor.prototype._getter = function(index) {
+ if (arguments.length < 1) throw new SyntaxError("Not enough arguments");
+
+ index = ECMAScript.ToUint32(index);
+ if (index >= this.length) {
+ return undefined;
+ }
+
+ var bytes = [], i, o;
+ for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT;
+ i < this.BYTES_PER_ELEMENT;
+ i += 1, o += 1) {
+ bytes.push(this.buffer._bytes[o]);
+ }
+ return this._unpack(bytes);
+ };
+
+ // NONSTANDARD: convenience alias for getter: type get(unsigned long index);
+ ctor.prototype.get = ctor.prototype._getter;
+
+ // setter void (unsigned long index, type value);
+ ctor.prototype._setter = function(index, value) {
+ if (arguments.length < 2) throw new SyntaxError("Not enough arguments");
+
+ index = ECMAScript.ToUint32(index);
+ if (index >= this.length) {
+ return undefined;
+ }
+
+ var bytes = this._pack(value), i, o;
+ for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT;
+ i < this.BYTES_PER_ELEMENT;
+ i += 1, o += 1) {
+ this.buffer._bytes[o] = bytes[i];
+ }
+ };
+
+ // void set(TypedArray array, optional unsigned long offset);
+ // void set(sequence<type> array, optional unsigned long offset);
+ ctor.prototype.set = function(index, value) {
+ if (arguments.length < 1) throw new SyntaxError("Not enough arguments");
+ var array, sequence, offset, len,
+ i, s, d,
+ byteOffset, byteLength, tmp;
+
+ if (typeof arguments[0] === 'object' && arguments[0].constructor === this.constructor) {
+ // void set(TypedArray array, optional unsigned long offset);
+ array = arguments[0];
+ offset = ECMAScript.ToUint32(arguments[1]);
+
+ if (offset + array.length > this.length) {
+ throw new RangeError("Offset plus length of array is out of range");
+ }
+
+ byteOffset = this.byteOffset + offset * this.BYTES_PER_ELEMENT;
+ byteLength = array.length * this.BYTES_PER_ELEMENT;
+
+ if (array.buffer === this.buffer) {
+ tmp = [];
+ for (i = 0, s = array.byteOffset; i < byteLength; i += 1, s += 1) {
+ tmp[i] = array.buffer._bytes[s];
+ }
+ for (i = 0, d = byteOffset; i < byteLength; i += 1, d += 1) {
+ this.buffer._bytes[d] = tmp[i];
+ }
+ } else {
+ for (i = 0, s = array.byteOffset, d = byteOffset;
+ i < byteLength; i += 1, s += 1, d += 1) {
+ this.buffer._bytes[d] = array.buffer._bytes[s];
+ }
+ }
+ } else if (typeof arguments[0] === 'object' && typeof arguments[0].length !== 'undefined') {
+ // void set(sequence<type> array, optional unsigned long offset);
+ sequence = arguments[0];
+ len = ECMAScript.ToUint32(sequence.length);
+ offset = ECMAScript.ToUint32(arguments[1]);
+
+ if (offset + len > this.length) {
+ throw new RangeError("Offset plus length of array is out of range");
+ }
+
+ for (i = 0; i < len; i += 1) {
+ s = sequence[i];
+ this._setter(offset + i, Number(s));
+ }
+ } else {
+ throw new TypeError("Unexpected argument type(s)");
+ }
+ };
+
+ // TypedArray subarray(long begin, optional long end);
+ ctor.prototype.subarray = function(start, end) {
+ function clamp(v, min, max) { return v < min ? min : v > max ? max : v; }
+
+ start = ECMAScript.ToInt32(start);
+ end = ECMAScript.ToInt32(end);
+
+ if (arguments.length < 1) { start = 0; }
+ if (arguments.length < 2) { end = this.length; }
+
+ if (start < 0) { start = this.length + start; }
+ if (end < 0) { end = this.length + end; }
+
+ start = clamp(start, 0, this.length);
+ end = clamp(end, 0, this.length);
+
+ var len = end - start;
+ if (len < 0) {
+ len = 0;
+ }
+
+ return new this.constructor(
+ this.buffer, this.byteOffset + start * this.BYTES_PER_ELEMENT, len);
+ };
+
+ return ctor;
+ }
+
+ var Int8Array = makeConstructor(1, packI8, unpackI8);
+ var Uint8Array = makeConstructor(1, packU8, unpackU8);
+ var Uint8ClampedArray = makeConstructor(1, packU8Clamped, unpackU8);
+ var Int16Array = makeConstructor(2, packI16, unpackI16);
+ var Uint16Array = makeConstructor(2, packU16, unpackU16);
+ var Int32Array = makeConstructor(4, packI32, unpackI32);
+ var Uint32Array = makeConstructor(4, packU32, unpackU32);
+ var Float32Array = makeConstructor(4, packF32, unpackF32);
+ var Float64Array = makeConstructor(8, packF64, unpackF64);
+
+ exports.Int8Array = exports.Int8Array || Int8Array;
+ exports.Uint8Array = exports.Uint8Array || Uint8Array;
+ exports.Uint8ClampedArray = exports.Uint8ClampedArray || Uint8ClampedArray;
+ exports.Int16Array = exports.Int16Array || Int16Array;
+ exports.Uint16Array = exports.Uint16Array || Uint16Array;
+ exports.Int32Array = exports.Int32Array || Int32Array;
+ exports.Uint32Array = exports.Uint32Array || Uint32Array;
+ exports.Float32Array = exports.Float32Array || Float32Array;
+ exports.Float64Array = exports.Float64Array || Float64Array;
+}());
+
+//
+// 6 The DataView View Type
+//
+
+(function() {
+ function r(array, index) {
+ return ECMAScript.IsCallable(array.get) ? array.get(index) : array[index];
+ }
+
+ var IS_BIG_ENDIAN = (function() {
+ var u16array = new(exports.Uint16Array)([0x1234]),
+ u8array = new(exports.Uint8Array)(u16array.buffer);
+ return r(u8array, 0) === 0x12;
+ }());
+
+ // Constructor(ArrayBuffer buffer,
+ // optional unsigned long byteOffset,
+ // optional unsigned long byteLength)
+ /** @constructor */
+ var DataView = function DataView(buffer, byteOffset, byteLength) {
+ if (arguments.length === 0) {
+ buffer = new exports.ArrayBuffer(0);
+ } else if (!(buffer instanceof exports.ArrayBuffer || ECMAScript.Class(buffer) === 'ArrayBuffer')) {
+ throw new TypeError("TypeError");
+ }
+
+ this.buffer = buffer || new exports.ArrayBuffer(0);
+
+ this.byteOffset = ECMAScript.ToUint32(byteOffset);
+ if (this.byteOffset > this.buffer.byteLength) {
+ throw new RangeError("byteOffset out of range");
+ }
+
+ if (arguments.length < 3) {
+ this.byteLength = this.buffer.byteLength - this.byteOffset;
+ } else {
+ this.byteLength = ECMAScript.ToUint32(byteLength);
+ }
+
+ if ((this.byteOffset + this.byteLength) > this.buffer.byteLength) {
+ throw new RangeError("byteOffset and length reference an area beyond the end of the buffer");
+ }
+
+ configureProperties(this);
+ };
+
+ function makeGetter(arrayType) {
+ return function(byteOffset, littleEndian) {
+
+ byteOffset = ECMAScript.ToUint32(byteOffset);
+
+ if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) {
+ throw new RangeError("Array index out of range");
+ }
+ byteOffset += this.byteOffset;
+
+ var uint8Array = new exports.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT),
+ bytes = [], i;
+ for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) {
+ bytes.push(r(uint8Array, i));
+ }
+
+ if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) {
+ bytes.reverse();
+ }
+
+ return r(new arrayType(new exports.Uint8Array(bytes).buffer), 0);
+ };
+ }
+
+ DataView.prototype.getUint8 = makeGetter(exports.Uint8Array);
+ DataView.prototype.getInt8 = makeGetter(exports.Int8Array);
+ DataView.prototype.getUint16 = makeGetter(exports.Uint16Array);
+ DataView.prototype.getInt16 = makeGetter(exports.Int16Array);
+ DataView.prototype.getUint32 = makeGetter(exports.Uint32Array);
+ DataView.prototype.getInt32 = makeGetter(exports.Int32Array);
+ DataView.prototype.getFloat32 = makeGetter(exports.Float32Array);
+ DataView.prototype.getFloat64 = makeGetter(exports.Float64Array);
+
+ function makeSetter(arrayType) {
+ return function(byteOffset, value, littleEndian) {
+
+ byteOffset = ECMAScript.ToUint32(byteOffset);
+ if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) {
+ throw new RangeError("Array index out of range");
+ }
+
+ // Get bytes
+ var typeArray = new arrayType([value]),
+ byteArray = new exports.Uint8Array(typeArray.buffer),
+ bytes = [], i, byteView;
+
+ for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) {
+ bytes.push(r(byteArray, i));
+ }
+
+ // Flip if necessary
+ if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) {
+ bytes.reverse();
+ }
+
+ // Write them
+ byteView = new exports.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT);
+ byteView.set(bytes);
+ };
+ }
+
+ DataView.prototype.setUint8 = makeSetter(exports.Uint8Array);
+ DataView.prototype.setInt8 = makeSetter(exports.Int8Array);
+ DataView.prototype.setUint16 = makeSetter(exports.Uint16Array);
+ DataView.prototype.setInt16 = makeSetter(exports.Int16Array);
+ DataView.prototype.setUint32 = makeSetter(exports.Uint32Array);
+ DataView.prototype.setInt32 = makeSetter(exports.Int32Array);
+ DataView.prototype.setFloat32 = makeSetter(exports.Float32Array);
+ DataView.prototype.setFloat64 = makeSetter(exports.Float64Array);
+
+ exports.DataView = exports.DataView || DataView;
+
+}());
diff --git a/tools/node_modules/eslint/node_modules/typedarray/package.json b/tools/node_modules/eslint/node_modules/typedarray/package.json
new file mode 100644
index 0000000000..5fd6926477
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/typedarray/package.json
@@ -0,0 +1,83 @@
+{
+ "_from": "typedarray@^0.0.6",
+ "_id": "typedarray@0.0.6",
+ "_inBundle": false,
+ "_integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
+ "_location": "/eslint/typedarray",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "typedarray@^0.0.6",
+ "name": "typedarray",
+ "escapedName": "typedarray",
+ "rawSpec": "^0.0.6",
+ "saveSpec": null,
+ "fetchSpec": "^0.0.6"
+ },
+ "_requiredBy": [
+ "/eslint/concat-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
+ "_shasum": "867ac74e3864187b1d3d47d996a78ec5c8830777",
+ "_spec": "typedarray@^0.0.6",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/concat-stream",
+ "author": {
+ "name": "James Halliday",
+ "email": "mail@substack.net",
+ "url": "http://substack.net"
+ },
+ "bugs": {
+ "url": "https://github.com/substack/typedarray/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "TypedArray polyfill for old browsers",
+ "devDependencies": {
+ "tape": "~2.3.2"
+ },
+ "homepage": "https://github.com/substack/typedarray",
+ "keywords": [
+ "ArrayBuffer",
+ "DataView",
+ "Float32Array",
+ "Float64Array",
+ "Int8Array",
+ "Int16Array",
+ "Int32Array",
+ "Uint8Array",
+ "Uint8ClampedArray",
+ "Uint16Array",
+ "Uint32Array",
+ "typed",
+ "array",
+ "polyfill"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "typedarray",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/substack/typedarray.git"
+ },
+ "scripts": {
+ "test": "tape test/*.js test/server/*.js"
+ },
+ "testling": {
+ "files": "test/*.js",
+ "browsers": [
+ "ie/6..latest",
+ "firefox/16..latest",
+ "firefox/nightly",
+ "chrome/22..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": "0.0.6"
+}
diff --git a/tools/node_modules/eslint/node_modules/typedarray/readme.markdown b/tools/node_modules/eslint/node_modules/typedarray/readme.markdown
new file mode 100644
index 0000000000..d18f6f7197
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/typedarray/readme.markdown
@@ -0,0 +1,61 @@
+# typedarray
+
+TypedArray polyfill ripped from [this
+module](https://raw.github.com/inexorabletash/polyfill).
+
+[![build status](https://secure.travis-ci.org/substack/typedarray.png)](http://travis-ci.org/substack/typedarray)
+
+[![testling badge](https://ci.testling.com/substack/typedarray.png)](https://ci.testling.com/substack/typedarray)
+
+# example
+
+``` js
+var Uint8Array = require('typedarray').Uint8Array;
+var ua = new Uint8Array(5);
+ua[1] = 256 + 55;
+console.log(ua[1]);
+```
+
+output:
+
+```
+55
+```
+
+# methods
+
+``` js
+var TA = require('typedarray')
+```
+
+The `TA` object has the following constructors:
+
+* TA.ArrayBuffer
+* TA.DataView
+* TA.Float32Array
+* TA.Float64Array
+* TA.Int8Array
+* TA.Int16Array
+* TA.Int32Array
+* TA.Uint8Array
+* TA.Uint8ClampedArray
+* TA.Uint16Array
+* TA.Uint32Array
+
+# install
+
+With [npm](https://npmjs.org) do:
+
+```
+npm install typedarray
+```
+
+To use this module in the browser, compile with
+[browserify](http://browserify.org)
+or download a UMD build from browserify CDN:
+
+http://wzrd.in/standalone/typedarray@latest
+
+# license
+
+MIT
diff --git a/tools/node_modules/eslint/node_modules/unherit/LICENSE b/tools/node_modules/eslint/node_modules/unherit/LICENSE
new file mode 100644
index 0000000000..f3722d94b3
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/unherit/LICENSE
@@ -0,0 +1,21 @@
+(The MIT License)
+
+Copyright (c) 2015 Titus Wormer <tituswormer@gmail.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/tools/node_modules/eslint/node_modules/unherit/index.js b/tools/node_modules/eslint/node_modules/unherit/index.js
new file mode 100644
index 0000000000..5a10751425
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/unherit/index.js
@@ -0,0 +1,67 @@
+/**
+ * @author Titus Wormer
+ * @copyright 2015 Titus Wormer
+ * @license MIT
+ * @module unherit
+ * @fileoverview Create a custom constructor which can be modified
+ * without affecting the original class.
+ */
+
+'use strict';
+
+/* Dependencies. */
+var xtend = require('xtend');
+var inherits = require('inherits');
+
+/* Expose. */
+module.exports = unherit;
+
+/**
+ * Create a custom constructor which can be modified
+ * without affecting the original class.
+ *
+ * @param {Function} Super - Super-class.
+ * @return {Function} - Constructor acting like `Super`,
+ * which can be modified without affecting the original
+ * class.
+ */
+function unherit(Super) {
+ var result;
+ var key;
+ var value;
+
+ inherits(Of, Super);
+ inherits(From, Of);
+
+ /* Clone values. */
+ result = Of.prototype;
+
+ for (key in result) {
+ value = result[key];
+
+ if (value && typeof value === 'object') {
+ result[key] = 'concat' in value ? value.concat() : xtend(value);
+ }
+ }
+
+ return Of;
+
+ /**
+ * Constructor accepting a single argument,
+ * which itself is an `arguments` object.
+ */
+ function From(parameters) {
+ return Super.apply(this, parameters);
+ }
+
+ /**
+ * Constructor accepting variadic arguments.
+ */
+ function Of() {
+ if (!(this instanceof Of)) {
+ return new From(arguments);
+ }
+
+ return Super.apply(this, arguments);
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/unherit/package.json b/tools/node_modules/eslint/node_modules/unherit/package.json
new file mode 100644
index 0000000000..686bf56af4
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/unherit/package.json
@@ -0,0 +1,109 @@
+{
+ "_from": "unherit@^1.0.4",
+ "_id": "unherit@1.1.0",
+ "_inBundle": false,
+ "_integrity": "sha1-a5qu379z3xdWrZ4xbdmBiFhAzX0=",
+ "_location": "/unherit",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "unherit@^1.0.4",
+ "name": "unherit",
+ "escapedName": "unherit",
+ "rawSpec": "^1.0.4",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.4"
+ },
+ "_requiredBy": [
+ "/remark-parse"
+ ],
+ "_resolved": "https://registry.npmjs.org/unherit/-/unherit-1.1.0.tgz",
+ "_shasum": "6b9aaedfbf73df1756ad9e316dd981885840cd7d",
+ "_spec": "unherit@^1.0.4",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/remark-parse",
+ "author": {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ },
+ "bugs": {
+ "url": "https://github.com/wooorm/unherit/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ }
+ ],
+ "dependencies": {
+ "inherits": "^2.0.1",
+ "xtend": "^4.0.1"
+ },
+ "deprecated": false,
+ "description": "Clone a constructor without affecting the super-class",
+ "devDependencies": {
+ "browserify": "^13.0.1",
+ "esmangle": "^1.0.1",
+ "nyc": "^8.1.0",
+ "remark-cli": "^1.0.0",
+ "remark-comment-config": "^4.0.0",
+ "remark-github": "^5.0.0",
+ "remark-lint": "^4.0.0",
+ "remark-validate-links": "^4.0.0",
+ "tape": "^4.0.0",
+ "xo": "^0.16.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/wooorm/unherit#readme",
+ "keywords": [
+ "clone",
+ "super",
+ "class",
+ "constructor"
+ ],
+ "license": "MIT",
+ "name": "unherit",
+ "remarkConfig": {
+ "output": true,
+ "plugins": {
+ "comment-config": null,
+ "github": null,
+ "lint": {
+ "heading-increment": false
+ },
+ "validate-links": null
+ },
+ "settings": {
+ "bullet": "*"
+ }
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/wooorm/unherit.git"
+ },
+ "scripts": {
+ "build": "npm run build-md && npm run build-bundle && npm run build-mangle",
+ "build-bundle": "browserify index.js --bare -s unherit > unherit.js",
+ "build-mangle": "esmangle unherit.js > unherit.min.js",
+ "build-md": "remark . --quiet --frail",
+ "lint": "xo",
+ "test": "npm run build && npm run lint && npm run test-coverage",
+ "test-api": "node test",
+ "test-coverage": "nyc --reporter lcov tape test.js"
+ },
+ "version": "1.1.0",
+ "xo": {
+ "space": true,
+ "rules": {
+ "guard-for-in": "off"
+ },
+ "ignores": [
+ "unherit.js"
+ ]
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/unherit/readme.md b/tools/node_modules/eslint/node_modules/unherit/readme.md
new file mode 100644
index 0000000000..d7070923d3
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/unherit/readme.md
@@ -0,0 +1,66 @@
+# unherit [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov]
+
+Create a custom constructor which can be modified without affecting the
+original class.
+
+## Installation
+
+[npm][npm-install]:
+
+```bash
+npm install unherit
+```
+
+## Usage
+
+```js
+var EventEmitter = require('events').EventEmitter;
+
+/* Create a private class which acts just like
+ * `EventEmitter`. */
+var Emitter = unherit(EventEmitter);
+
+Emitter.prototype.defaultMaxListeners = 0;
+/* Now, all instances of `Emitter` have no maximum
+ * listeners, without affecting other `EventEmitter`s. */
+
+assert(new Emitter().defaultMaxListeners === 0); // true
+assert(new EventEmitter().defaultMaxListeners === undefined); // true
+assert(new Emitter() instanceof EventEmitter); // true
+```
+
+## API
+
+### `unherit(Super)`
+
+Create a custom constructor which can be modified without affecting the
+original class.
+
+###### Parameters
+
+* `Super` (`Function`) — Super-class.
+
+###### Returns
+
+`Function` — Constructor acting like `Super`, which can be modified
+without affecting the original class.
+
+## License
+
+[MIT][license] © [Titus Wormer][author]
+
+<!-- Definitions -->
+
+[travis-badge]: https://img.shields.io/travis/wooorm/unherit.svg
+
+[travis]: https://travis-ci.org/wooorm/unherit
+
+[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/unherit.svg
+
+[codecov]: https://codecov.io/github/wooorm/unherit
+
+[npm-install]: https://docs.npmjs.com/cli/install
+
+[license]: LICENSE
+
+[author]: http://wooorm.com
diff --git a/tools/node_modules/eslint/node_modules/unified/LICENSE b/tools/node_modules/eslint/node_modules/unified/LICENSE
new file mode 100644
index 0000000000..f3722d94b3
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/unified/LICENSE
@@ -0,0 +1,21 @@
+(The MIT License)
+
+Copyright (c) 2015 Titus Wormer <tituswormer@gmail.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/tools/node_modules/eslint/node_modules/unified/index.js b/tools/node_modules/eslint/node_modules/unified/index.js
new file mode 100644
index 0000000000..2bc872ee8d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/unified/index.js
@@ -0,0 +1,460 @@
+'use strict';
+
+/* Dependencies. */
+var extend = require('extend');
+var bail = require('bail');
+var vfile = require('vfile');
+var trough = require('trough');
+var string = require('x-is-string');
+var func = require('x-is-function');
+var plain = require('is-plain-obj');
+
+/* Expose a frozen processor. */
+module.exports = unified().freeze();
+
+var slice = [].slice;
+var own = {}.hasOwnProperty;
+
+/* Process pipeline. */
+var pipeline = trough().use(pipelineParse).use(pipelineRun).use(pipelineStringify);
+
+function pipelineParse(p, ctx) {
+ ctx.tree = p.parse(ctx.file);
+}
+
+function pipelineRun(p, ctx, next) {
+ p.run(ctx.tree, ctx.file, done);
+
+ function done(err, tree, file) {
+ if (err) {
+ next(err);
+ } else {
+ ctx.tree = tree;
+ ctx.file = file;
+ next();
+ }
+ }
+}
+
+function pipelineStringify(p, ctx) {
+ ctx.file.contents = p.stringify(ctx.tree, ctx.file);
+}
+
+/* Function to create the first processor. */
+function unified() {
+ var attachers = [];
+ var transformers = trough();
+ var namespace = {};
+ var frozen = false;
+ var freezeIndex = -1;
+
+ /* Data management. */
+ processor.data = data;
+
+ /* Lock. */
+ processor.freeze = freeze;
+
+ /* Plug-ins. */
+ processor.attachers = attachers;
+ processor.use = use;
+
+ /* API. */
+ processor.parse = parse;
+ processor.stringify = stringify;
+ processor.run = run;
+ processor.runSync = runSync;
+ processor.process = process;
+ processor.processSync = processSync;
+
+ /* Expose. */
+ return processor;
+
+ /* Create a new processor based on the processor
+ * in the current scope. */
+ function processor() {
+ var destination = unified();
+ var length = attachers.length;
+ var index = -1;
+
+ while (++index < length) {
+ destination.use.apply(null, attachers[index]);
+ }
+
+ destination.data(extend(true, {}, namespace));
+
+ return destination;
+ }
+
+ /* Freeze: used to signal a processor that has finished
+ * configuration.
+ *
+ * For example, take unified itself. It’s frozen.
+ * Plug-ins should not be added to it. Rather, it should
+ * be extended, by invoking it, before modifying it.
+ *
+ * In essence, always invoke this when exporting a
+ * processor. */
+ function freeze() {
+ var values;
+ var plugin;
+ var options;
+ var transformer;
+
+ if (frozen) {
+ return processor;
+ }
+
+ while (++freezeIndex < attachers.length) {
+ values = attachers[freezeIndex];
+ plugin = values[0];
+ options = values[1];
+ transformer = null;
+
+ if (options === false) {
+ continue;
+ }
+
+ if (options === true) {
+ values[1] = undefined;
+ }
+
+ transformer = plugin.apply(processor, values.slice(1));
+
+ if (func(transformer)) {
+ transformers.use(transformer);
+ }
+ }
+
+ frozen = true;
+ freezeIndex = Infinity;
+
+ return processor;
+ }
+
+ /* Data management.
+ * Getter / setter for processor-specific informtion. */
+ function data(key, value) {
+ if (string(key)) {
+ /* Set `key`. */
+ if (arguments.length === 2) {
+ assertUnfrozen('data', frozen);
+
+ namespace[key] = value;
+
+ return processor;
+ }
+
+ /* Get `key`. */
+ return (own.call(namespace, key) && namespace[key]) || null;
+ }
+
+ /* Set space. */
+ if (key) {
+ assertUnfrozen('data', frozen);
+ namespace = key;
+ return processor;
+ }
+
+ /* Get space. */
+ return namespace;
+ }
+
+ /* Plug-in management.
+ *
+ * Pass it:
+ * * an attacher and options,
+ * * a preset,
+ * * a list of presets, attachers, and arguments (list
+ * of attachers and options). */
+ function use(value) {
+ var settings;
+
+ assertUnfrozen('use', frozen);
+
+ if (value === null || value === undefined) {
+ /* Empty */
+ } else if (func(value)) {
+ addPlugin.apply(null, arguments);
+ } else if (typeof value === 'object') {
+ if ('length' in value) {
+ addList(value);
+ } else {
+ addPreset(value);
+ }
+ } else {
+ throw new Error('Expected usable value, not `' + value + '`');
+ }
+
+ if (settings) {
+ namespace.settings = extend(namespace.settings || {}, settings);
+ }
+
+ return processor;
+
+ function addPreset(result) {
+ addList(result.plugins);
+
+ if (result.settings) {
+ settings = extend(settings || {}, result.settings);
+ }
+ }
+
+ function add(value) {
+ if (func(value)) {
+ addPlugin(value);
+ } else if (typeof value === 'object') {
+ if ('length' in value) {
+ addPlugin.apply(null, value);
+ } else {
+ addPreset(value);
+ }
+ } else {
+ throw new Error('Expected usable value, not `' + value + '`');
+ }
+ }
+
+ function addList(plugins) {
+ var length;
+ var index;
+
+ if (plugins === null || plugins === undefined) {
+ /* Empty */
+ } else if (typeof plugins === 'object' && 'length' in plugins) {
+ length = plugins.length;
+ index = -1;
+
+ while (++index < length) {
+ add(plugins[index]);
+ }
+ } else {
+ throw new Error('Expected a list of plugins, not `' + plugins + '`');
+ }
+ }
+
+ function addPlugin(plugin, value) {
+ var entry = find(plugin);
+
+ if (entry) {
+ if (plain(entry[1]) && plain(value)) {
+ value = extend(entry[1], value);
+ }
+
+ entry[1] = value;
+ } else {
+ attachers.push(slice.call(arguments));
+ }
+ }
+ }
+
+ function find(plugin) {
+ var length = attachers.length;
+ var index = -1;
+ var entry;
+
+ while (++index < length) {
+ entry = attachers[index];
+
+ if (entry[0] === plugin) {
+ return entry;
+ }
+ }
+ }
+
+ /* Parse a file (in string or VFile representation)
+ * into a Unist node using the `Parser` on the
+ * processor. */
+ function parse(doc) {
+ var file = vfile(doc);
+ var Parser;
+
+ freeze();
+ Parser = processor.Parser;
+ assertParser('parse', Parser);
+
+ if (newable(Parser)) {
+ return new Parser(String(file), file).parse();
+ }
+
+ return Parser(String(file), file); // eslint-disable-line new-cap
+ }
+
+ /* Run transforms on a Unist node representation of a file
+ * (in string or VFile representation), async. */
+ function run(node, file, cb) {
+ assertNode(node);
+ freeze();
+
+ if (!cb && func(file)) {
+ cb = file;
+ file = null;
+ }
+
+ if (!cb) {
+ return new Promise(executor);
+ }
+
+ executor(null, cb);
+
+ function executor(resolve, reject) {
+ transformers.run(node, vfile(file), done);
+
+ function done(err, tree, file) {
+ tree = tree || node;
+ if (err) {
+ reject(err);
+ } else if (resolve) {
+ resolve(tree);
+ } else {
+ cb(null, tree, file);
+ }
+ }
+ }
+ }
+
+ /* Run transforms on a Unist node representation of a file
+ * (in string or VFile representation), sync. */
+ function runSync(node, file) {
+ var complete = false;
+ var result;
+
+ run(node, file, done);
+
+ assertDone('runSync', 'run', complete);
+
+ return result;
+
+ function done(err, tree) {
+ complete = true;
+ bail(err);
+ result = tree;
+ }
+ }
+
+ /* Stringify a Unist node representation of a file
+ * (in string or VFile representation) into a string
+ * using the `Compiler` on the processor. */
+ function stringify(node, doc) {
+ var file = vfile(doc);
+ var Compiler;
+
+ freeze();
+ Compiler = processor.Compiler;
+ assertCompiler('stringify', Compiler);
+ assertNode(node);
+
+ if (newable(Compiler)) {
+ return new Compiler(node, file).compile();
+ }
+
+ return Compiler(node, file); // eslint-disable-line new-cap
+ }
+
+ /* Parse a file (in string or VFile representation)
+ * into a Unist node using the `Parser` on the processor,
+ * then run transforms on that node, and compile the
+ * resulting node using the `Compiler` on the processor,
+ * and store that result on the VFile. */
+ function process(doc, cb) {
+ freeze();
+ assertParser('process', processor.Parser);
+ assertCompiler('process', processor.Compiler);
+
+ if (!cb) {
+ return new Promise(executor);
+ }
+
+ executor(null, cb);
+
+ function executor(resolve, reject) {
+ var file = vfile(doc);
+
+ pipeline.run(processor, {file: file}, done);
+
+ function done(err) {
+ if (err) {
+ reject(err);
+ } else if (resolve) {
+ resolve(file);
+ } else {
+ cb(null, file);
+ }
+ }
+ }
+ }
+
+ /* Process the given document (in string or VFile
+ * representation), sync. */
+ function processSync(doc) {
+ var complete = false;
+ var file;
+
+ freeze();
+ assertParser('processSync', processor.Parser);
+ assertCompiler('processSync', processor.Compiler);
+ file = vfile(doc);
+
+ process(file, done);
+
+ assertDone('processSync', 'process', complete);
+
+ return file;
+
+ function done(err) {
+ complete = true;
+ bail(err);
+ }
+ }
+}
+
+/* Check if `func` is a constructor. */
+function newable(value) {
+ return func(value) && keys(value.prototype);
+}
+
+/* Check if `value` is an object with keys. */
+function keys(value) {
+ var key;
+ for (key in value) {
+ return true;
+ }
+ return false;
+}
+
+/* Assert a parser is available. */
+function assertParser(name, Parser) {
+ if (!func(Parser)) {
+ throw new Error('Cannot `' + name + '` without `Parser`');
+ }
+}
+
+/* Assert a compiler is available. */
+function assertCompiler(name, Compiler) {
+ if (!func(Compiler)) {
+ throw new Error('Cannot `' + name + '` without `Compiler`');
+ }
+}
+
+/* Assert the processor is not frozen. */
+function assertUnfrozen(name, frozen) {
+ if (frozen) {
+ throw new Error(
+ 'Cannot invoke `' + name + '` on a frozen processor.\n' +
+ 'Create a new processor first, by invoking it: ' +
+ 'use `processor()` instead of `processor`.'
+ );
+ }
+}
+
+/* Assert `node` is a Unist node. */
+function assertNode(node) {
+ if (!node || !string(node.type)) {
+ throw new Error('Expected node, got `' + node + '`');
+ }
+}
+
+/* Assert that `complete` is `true`. */
+function assertDone(name, asyncName, complete) {
+ if (!complete) {
+ throw new Error('`' + name + '` finished async. Use `' + asyncName + '` instead');
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/unified/package.json b/tools/node_modules/eslint/node_modules/unified/package.json
new file mode 100644
index 0000000000..015e48121c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/unified/package.json
@@ -0,0 +1,117 @@
+{
+ "_from": "unified@^6.1.2",
+ "_id": "unified@6.1.6",
+ "_inBundle": false,
+ "_integrity": "sha512-pW2f82bCIo2ifuIGYcV12fL96kMMYgw7JKVEgh7ODlrM9rj6vXSY3BV+H6lCcv1ksxynFf582hwWLnA1qRFy4w==",
+ "_location": "/unified",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "unified@^6.1.2",
+ "name": "unified",
+ "escapedName": "unified",
+ "rawSpec": "^6.1.2",
+ "saveSpec": null,
+ "fetchSpec": "^6.1.2"
+ },
+ "_requiredBy": [
+ "/eslint-plugin-markdown"
+ ],
+ "_resolved": "https://registry.npmjs.org/unified/-/unified-6.1.6.tgz",
+ "_shasum": "5ea7f807a0898f1f8acdeefe5f25faa010cc42b1",
+ "_spec": "unified@^6.1.2",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/eslint-plugin-markdown",
+ "author": {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ },
+ "bugs": {
+ "url": "https://github.com/unifiedjs/unified/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ }
+ ],
+ "dependencies": {
+ "bail": "^1.0.0",
+ "extend": "^3.0.0",
+ "is-plain-obj": "^1.1.0",
+ "trough": "^1.0.0",
+ "vfile": "^2.0.0",
+ "x-is-function": "^1.0.4",
+ "x-is-string": "^0.1.0"
+ },
+ "deprecated": false,
+ "description": "Pluggable text processing interface",
+ "devDependencies": {
+ "browserify": "^14.0.0",
+ "esmangle": "^1.0.0",
+ "nyc": "^11.0.0",
+ "remark-cli": "^4.0.0",
+ "remark-preset-wooorm": "^3.0.0",
+ "tape": "^4.4.0",
+ "xo": "^0.18.1"
+ },
+ "files": [
+ "index.js",
+ "lib"
+ ],
+ "homepage": "https://github.com/unifiedjs/unified#readme",
+ "keywords": [
+ "process",
+ "parse",
+ "transform",
+ "compile",
+ "stringify",
+ "rehype",
+ "retext",
+ "remark"
+ ],
+ "license": "MIT",
+ "name": "unified",
+ "nyc": {
+ "check-coverage": true,
+ "lines": 100,
+ "functions": 100,
+ "branches": 100
+ },
+ "remarkConfig": {
+ "plugins": [
+ "preset-wooorm"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/unifiedjs/unified.git"
+ },
+ "scripts": {
+ "build": "npm run build-md && npm run build-bundle && npm run build-mangle",
+ "build-bundle": "browserify index.js -s unified > unified.js",
+ "build-mangle": "esmangle unified.js > unified.min.js",
+ "build-md": "remark . -qfo",
+ "lint": "xo",
+ "test": "npm run build && npm run lint && npm run test-coverage",
+ "test-api": "node test",
+ "test-coverage": "nyc --reporter lcov tape test"
+ },
+ "version": "6.1.6",
+ "xo": {
+ "space": true,
+ "esnext": false,
+ "rules": {
+ "unicorn/prefer-type-error": "off",
+ "import/no-unassigned-import": "off",
+ "guard-for-in": "off",
+ "max-lines": "off"
+ },
+ "ignores": [
+ "unified.js"
+ ]
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/unified/readme.md b/tools/node_modules/eslint/node_modules/unified/readme.md
new file mode 100644
index 0000000000..abe0fd4cc6
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/unified/readme.md
@@ -0,0 +1,929 @@
+# ![unified][logo]
+
+[![Build Status][travis-badge]][travis]
+[![Coverage Status][codecov-badge]][codecov]
+[![Chat][chat-badge]][chat]
+
+**unified** is an interface for processing text using syntax trees. It’s what
+powers [**remark**][remark], [**retext**][retext], and [**rehype**][rehype],
+but it also allows for processing between multiple syntaxes.
+
+The website for **unified**, [`unifiedjs.github.io`][site], provides a less
+technical and more practical introduction to unified. Make sure to visit it
+and try its introductory [Guides][].
+
+## Installation
+
+[npm][]:
+
+```bash
+npm install unified
+```
+
+## Usage
+
+```js
+var unified = require('unified');
+var markdown = require('remark-parse');
+var remark2rehype = require('remark-rehype');
+var doc = require('rehype-document');
+var format = require('rehype-format');
+var html = require('rehype-stringify');
+var report = require('vfile-reporter');
+
+unified()
+ .use(markdown)
+ .use(remark2rehype)
+ .use(doc)
+ .use(format)
+ .use(html)
+ .process('# Hello world!', function (err, file) {
+ console.error(report(err || file));
+ console.log(String(file));
+ });
+```
+
+Yields:
+
+```html
+no issues found
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ </head>
+ <body>
+ <h1>Hello world!</h1>
+ </body>
+</html>
+```
+
+## Table of Contents
+
+* [Description](#description)
+* [API](#api)
+ * [processor()](#processor)
+ * [processor.use(plugin\[, options\])](#processoruseplugin-options)
+ * [processor.parse(file|value)](#processorparsefilevalue)
+ * [processor.stringify(node\[, file\])](#processorstringifynode-file)
+ * [processor.run(node\[, file\]\[, done\])](#processorrunnode-file-done)
+ * [processor.runSync(node\[, file\])](#processorrunsyncnode-file)
+ * [processor.process(file|value\[, done\])](#processorprocessfilevalue-done)
+ * [processor.processSync(file|value)](#processorprocesssyncfilevalue)
+ * [processor.data(key\[, value\])](#processordatakey-value)
+ * [processor.freeze()](#processorfreeze)
+* [Plugin](#plugin)
+ * [function attacher(\[options\])](#function-attacheroptions)
+ * [function transformer(node, file\[, next\])](#function-transformernode-file-next)
+* [Preset](#preset)
+* [License](#license)
+
+## Description
+
+**unified** is an interface for processing text using syntax trees. Syntax
+trees are a representation understandable to programs. Those programs, called
+[**plugin**][plugin]s, take these trees and modify them, amongst other things.
+To get to the syntax tree from input text there’s a [**parser**][parser]. To
+get from that back to text there’s a [**compiler**][compiler]. This is the
+[**process**][process] of a **processor**.
+
+```ascii
+| ....................... process() ......................... |
+| ......... parse() ..... | run() | ..... stringify() ....... |
+
+ +--------+ +----------+
+Input ->- | Parser | ->- Syntax Tree ->- | Compiler | ->- Output
+ +--------+ | +----------+
+ X
+ |
+ +--------------+
+ | Transformers |
+ +--------------+
+```
+
+###### Processors
+
+Every processor implements another processor. To create a new processor invoke
+another processor. This creates a processor that is configured to function the
+same as its ancestor. But when the descendant processor is configured in the
+future it does not affect the ancestral processor.
+
+When processors are exposed from a module (for example, unified itself) they
+should not be configured directly, as that would change their behaviour for all
+module users. Those processors are [**frozen**][freeze] and they should be
+invoked to create a new processor before they are used.
+
+###### Node
+
+The syntax trees used in **unified** are [**Unist**][unist] nodes: plain
+JavaScript objects with a `type` property. The semantics of those `type`s are
+defined by other projects.
+
+There are several [utilities][unist-utilities] for working with these nodes.
+
+###### List of Processors
+
+The following projects process different syntax trees. They parse text to
+their respective syntax tree and they compile their syntax trees back to text.
+These processors can be used as-is, or their parsers and compilers can be mixed
+and matched with **unified** and other plugins to process between different
+syntaxes.
+
+* [**rehype**][rehype] ([**HAST**][hast]) — HTML
+* [**remark**][remark] ([**MDAST**][mdast]) — Markdown
+* [**retext**][retext] ([**NLCST**][nlcst]) — Natural language
+
+###### List of Plugins
+
+The below plugins work with **unified**, unrelated to what flavour the syntax
+tree is in:
+
+* [`unified-diff`](https://github.com/unifiedjs/unified-diff)
+ — Ignore messages for unchanged lines in Travis
+
+See [**remark**][remark-plugins], [**rehype**][rehype-plugins], and
+[**retext**][retext-plugins] for lists of their plugins.
+
+###### File
+
+When processing documents metadata is often gathered about that document.
+[**VFile**][vfile] is a virtual file format which stores data and handles
+metadata and messages for **unified** and its plugins.
+
+There are several [utilities][vfile-utilities] for working with these files.
+
+###### Configuration
+
+To configure a processor invoke its [`use`][use] method, supply it a
+[**plugin**][plugin], and optionally settings.
+
+###### Integrations
+
+**unified** can integrate with the file-system through
+[`unified-engine`][engine]. On top of that, CLI apps can be created with
+[`unified-args`][args], Gulp plugins with [`unified-engine-gulp`][gulp], and
+Atom Linters with [`unified-engine-atom`][atom].
+
+A streaming interface is provided through [`unified-stream`][stream].
+
+###### Programming interface
+
+The API gives access to processing metadata (such as lint messages) and
+supports multiple passed through files:
+
+```js
+var unified = require('unified');
+var markdown = require('remark-parse');
+var styleGuide = require('remark-preset-lint-markdown-style-guide');
+var remark2retext = require('remark-retext');
+var english = require('retext-english');
+var equality = require('retext-equality');
+var remark2rehype = require('remark-rehype');
+var html = require('rehype-stringify');
+var report = require('vfile-reporter');
+
+unified()
+ .use(markdown)
+ .use(styleGuide)
+ .use(remark2retext, unified().use(english).use(equality))
+ .use(remark2rehype)
+ .use(html)
+ .process('*Emphasis* and _importance_, you guys!', function (err, file) {
+ console.error(report(err || file));
+ console.log(String(file));
+ });
+```
+
+Yields:
+
+```txt
+ 1:16-1:28 warning Emphasis should use `*` as a marker emphasis-marker remark-lint
+ 1:34-1:38 warning `guys` may be insensitive, use `people`, `persons`, `folks` instead gals-men retext-equality
+
+⚠ 2 warnings
+<p><em>Emphasis</em> and <em>importance</em>, you guys!</p>
+```
+
+###### Processing between syntaxes
+
+The processors can be combined in two modes.
+
+**Bridge** mode transforms the syntax tree from one flavour (the origin) to
+another (the destination). Then, transformations are applied on that tree.
+Finally, the origin processor continues transforming the original syntax tree.
+
+**Mutate** mode also transforms the syntax tree from one flavour to another.
+But then the origin processor continues transforming the destination syntax
+tree.
+
+In the previous example (“Programming interface”), `remark-retext` is used in
+bridge mode: the origin syntax tree is kept after retext is done; whereas
+`remark-rehype` is used in mutate mode: it sets a new syntax tree and discards
+the original.
+
+* [`remark-retext`][remark-retext]
+* [`remark-rehype`][remark-rehype]
+* [`rehype-retext`][rehype-retext]
+* [`rehype-remark`][rehype-remark]
+
+## API
+
+### `processor()`
+
+Object describing how to process text.
+
+###### Returns
+
+`Function` — New [**unfrozen**][freeze] processor which is configured to
+function the same as its ancestor. But when the descendant processor is
+configured in the future it does not affect the ancestral processor.
+
+###### Example
+
+The following example shows how a new processor can be created (from the remark
+processor) and linked to **stdin**(4) and **stdout**(4).
+
+```js
+var remark = require('remark');
+var concat = require('concat-stream');
+
+process.stdin.pipe(concat(function (buf) {
+ process.stdout.write(remark().processSync(buf).toString());
+}));
+```
+
+### `processor.use(plugin[, options])`
+
+Configure the processor to use a [**plugin**][plugin] and optionally configure
+that plugin with options.
+
+###### Signatures
+
+* `processor.use(plugin[, options])`
+* `processor.use(preset)`
+* `processor.use(list)`
+
+###### Parameters
+
+* `plugin` ([`Plugin`][plugin])
+* `options` (`*`, optional) — Configuration for `plugin`
+* `preset` (`Object`) — Object with an optional `plugins` (set to `list`),
+ and/or an optional `settings` object
+* `list` (`Array`) — List of plugins, presets, and pairs (`plugin` and
+ `options` in an array)
+
+###### Returns
+
+`processor` — The processor on which `use` is invoked.
+
+###### Note
+
+`use` cannot be called on [frozen][freeze] processors. Invoke the processor
+first to create a new unfrozen processor.
+
+###### Example
+
+There are many ways to pass plugins to `.use()`. The below example gives an
+overview.
+
+```js
+var unified = require('unified');
+
+unified()
+ // Plugin with options:
+ .use(plugin, {})
+ // Plugins:
+ .use([plugin, pluginB])
+ // Two plugins, the second with options:
+ .use([plugin, [pluginB, {}]])
+ // Preset with plugins and settings:
+ .use({plugins: [plugin, [pluginB, {}]], settings: {position: false}})
+ // Settings only:
+ .use({settings: {position: false}});
+
+function plugin() {}
+function pluginB() {}
+```
+
+### `processor.parse(file|value)`
+
+Parse text to a syntax tree.
+
+###### Parameters
+
+* `file` ([`VFile`][file])
+ — Or anything which can be given to `vfile()`
+
+###### Returns
+
+[`Node`][node] — Syntax tree representation of input.
+
+###### Note
+
+`parse` [freezes][freeze] the processor if not already frozen.
+
+#### `processor.Parser`
+
+Function handling the parsing of text to a syntax tree. Used in the
+[**parse**][parse] phase in the process and invoked with a `string` and
+[`VFile`][file] representation of the document to parse.
+
+`Parser` can be a normal function in which case it must return a
+[`Node`][node]: the syntax tree representation of the given file.
+
+`Parser` can also be a constructor function (a function with keys in its
+`prototype`) in which case it’s invoked with `new`. Instances must have a
+`parse` method which is invoked without arguments and must return a
+[`Node`][node].
+
+### `processor.stringify(node[, file])`
+
+Compile a syntax tree to text.
+
+###### Parameters
+
+* `node` ([`Node`][node])
+* `file` ([`VFile`][file], optional);
+ — Or anything which can be given to `vfile()`
+
+###### Returns
+
+`string` — String representation of the syntax tree file.
+
+###### Note
+
+`stringify` [freezes][freeze] the processor if not already frozen.
+
+#### `processor.Compiler`
+
+Function handling the compilation of syntax tree to a text. Used in the
+[**stringify**][stringify] phase in the process and invoked with a
+[`Node`][node] and [`VFile`][file] representation of the document to stringify.
+
+`Compiler` can be a normal function in which case it must return a `string`:
+the text representation of the given syntax tree.
+
+`Compiler` can also be a constructor function (a function with keys in its
+`prototype`) in which case it’s invoked with `new`. Instances must have a
+`compile` method which is invoked without arguments and must return a `string`.
+
+### `processor.run(node[, file][, done])`
+
+Transform a syntax tree by applying [**plugin**][plugin]s to it.
+
+###### Parameters
+
+* `node` ([`Node`][node])
+* `file` ([`VFile`][file], optional)
+ — Or anything which can be given to `vfile()`
+* `done` ([`Function`][run-done], optional)
+
+###### Returns
+
+[`Promise`][promise] if `done` is not given. Rejected with an error, or
+resolved with the resulting syntax tree.
+
+###### Note
+
+`run` [freezes][freeze] the processor if not already frozen.
+
+##### `function done(err[, node, file])`
+
+Invoked when transformation is complete. Either invoked with an error or a
+syntax tree and a file.
+
+###### Parameters
+
+* `err` (`Error`) — Fatal error
+* `node` ([`Node`][node])
+* `file` ([`VFile`][file])
+
+### `processor.runSync(node[, file])`
+
+Transform a syntax tree by applying [**plugin**][plugin]s to it.
+
+If asynchronous [**plugin**][plugin]s are configured an error is thrown.
+
+###### Parameters
+
+* `node` ([`Node`][node])
+* `file` ([`VFile`][file], optional)
+ — Or anything which can be given to `vfile()`
+
+###### Returns
+
+[`Node`][node] — The given syntax tree.
+
+###### Note
+
+`runSync` [freezes][freeze] the processor if not already frozen.
+
+### `processor.process(file|value[, done])`
+
+Process the given representation of a file as configured on the processor. The
+process invokes `parse`, `run`, and `stringify` internally.
+
+###### Parameters
+
+* `file` ([`VFile`][file])
+* `value` (`string`) — String representation of a file
+* `done` ([`Function`][process-done], optional)
+
+###### Returns
+
+[`Promise`][promise] if `done` is not given. Rejected with an error or
+resolved with the resulting file.
+
+###### Note
+
+`process` [freezes][freeze] the processor if not already frozen.
+
+#### `function done(err, file)`
+
+Invoked when the process is complete. Invoked with a fatal error, if any, and
+the [`VFile`][file].
+
+###### Parameters
+
+* `err` (`Error`, optional) — Fatal error
+* `file` ([`VFile`][file])
+
+###### Example
+
+```js
+var unified = require('unified');
+var markdown = require('remark-parse');
+var remark2rehype = require('remark-rehype');
+var doc = require('rehype-document');
+var format = require('rehype-format');
+var html = require('rehype-stringify');
+
+unified()
+ .use(markdown)
+ .use(remark2rehype)
+ .use(doc)
+ .use(format)
+ .use(html)
+ .process('# Hello world!')
+ .then(function (file) {
+ console.log(String(file));
+ }, function (err) {
+ console.error(String(err));
+ });
+```
+
+Yields:
+
+```html
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ </head>
+ <body>
+ <h1>Hello world!</h1>
+ </body>
+</html>
+```
+
+### `processor.processSync(file|value)`
+
+Process the given representation of a file as configured on the processor. The
+process invokes `parse`, `run`, and `stringify` internally.
+
+If asynchronous [**plugin**][plugin]s are configured an error is thrown.
+
+###### Parameters
+
+* `file` ([`VFile`][file])
+* `value` (`string`) — String representation of a file
+
+###### Returns
+
+[`VFile`][file] — Virtual file with modified [`contents`][vfile-contents].
+
+###### Note
+
+`processSync` [freezes][freeze] the processor if not already frozen.
+
+###### Example
+
+```js
+var unified = require('unified');
+var markdown = require('remark-parse');
+var remark2rehype = require('remark-rehype');
+var doc = require('rehype-document');
+var format = require('rehype-format');
+var html = require('rehype-stringify');
+
+var processor = unified()
+ .use(markdown)
+ .use(remark2rehype)
+ .use(doc)
+ .use(format)
+ .use(html);
+
+console.log(processor.processSync('# Hello world!').toString());
+```
+
+Yields:
+
+```html
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ </head>
+ <body>
+ <h1>Hello world!</h1>
+ </body>
+</html>
+```
+
+### `processor.data(key[, value])`
+
+Get or set information in an in-memory key-value store accessible to all phases
+of the process. An example is a list of HTML elements which are self-closing,
+which is needed when parsing, transforming, and compiling HTML.
+
+###### Parameters
+
+* `key` (`string`) — Identifier
+* `value` (`*`, optional) — Value to set. Omit if getting `key`
+
+###### Returns
+
+* `processor` — If setting, the processor on which `data` is invoked
+* `*` — If getting, the value at `key`
+
+###### Note
+
+Setting information with `data` cannot occur on [frozen][freeze] processors.
+Invoke the processor first to create a new unfrozen processor.
+
+###### Example
+
+The following example show how to get and set information:
+
+```js
+var unified = require('unified');
+
+console.log(unified().data('alpha', 'bravo').data('alpha'))
+```
+
+Yields:
+
+```txt
+bravo
+```
+
+### `processor.freeze()`
+
+Freeze a processor. Frozen processors are meant to be extended and not to be
+configured or processed directly.
+
+Once a processor is frozen it cannot be unfrozen. New processors functioning
+just like it can be created by invoking the processor.
+
+It’s possible to freeze processors explicitly, by calling `.freeze()`, but
+[`.parse()`][parse], [`.run()`][run], [`.stringify()`][stringify], and
+[`.process()`][process] call `.freeze()` to freeze a processor too.
+
+###### Returns
+
+`Processor` — The processor on which `freeze` is invoked.
+
+###### Example
+
+The following example, `index.js`, shows how [**rehype**][rehype] prevents
+extensions to itself:
+
+```js
+var unified = require('unified');
+var parse = require('rehype-parse');
+var stringify = require('rehype-stringify');
+
+module.exports = unified().use(parse).use(stringify).freeze();
+```
+
+The below example, `a.js`, shows how that processor can be used and configured.
+
+```js
+var rehype = require('rehype');
+var format = require('rehype-format');
+// ...
+
+rehype()
+ .use(format)
+ // ...
+```
+
+The below example, `b.js`, shows a similar looking example which operates on
+the frozen [**rehype**][rehype] interface. If this behaviour was allowed it
+would result in unexpected behaviour so an error is thrown. **This is
+invalid**:
+
+```js
+var rehype = require('rehype');
+var format = require('rehype-format');
+// ...
+
+rehype
+ .use(format)
+ // ...
+```
+
+Yields:
+
+```txt
+~/node_modules/unified/index.js:440
+ throw new Error(
+ ^
+
+Error: Cannot invoke `use` on a frozen processor.
+Create a new processor first, by invoking it: use `processor()` instead of `processor`.
+ at assertUnfrozen (~/node_modules/unified/index.js:440:11)
+ at Function.use (~/node_modules/unified/index.js:172:5)
+ at Object.<anonymous> (~/b.js:6:4)
+```
+
+## `Plugin`
+
+**unified** plugins change the way the applied-on processor works in the
+following ways:
+
+* They modify the [**processor**][processor]: such as changing the parser,
+ the compiler, or linking it to other processors
+* They transform [**syntax tree**][node] representation of files
+* They modify metadata of files
+
+Plugins are a concept. They materialise as [`attacher`][attacher]s.
+
+###### Example
+
+`move.js`:
+
+```js
+module.exports = move;
+
+function move(options) {
+ var expected = (options || {}).extname;
+
+ if (!expected) {
+ throw new Error('Missing `extname` in options');
+ }
+
+ return transformer;
+
+ function transformer(tree, file) {
+ if (file.extname && file.extname !== expected) {
+ file.extname = expected;
+ }
+ }
+}
+```
+
+`index.js`:
+
+```js
+var unified = require('unified');
+var parse = require('remark-parse');
+var remark2rehype = require('remark-rehype');
+var stringify = require('rehype-stringify');
+var vfile = require('to-vfile');
+var report = require('vfile-reporter');
+var move = require('./move');
+
+unified()
+ .use(parse)
+ .use(remark2rehype)
+ .use(move, {extname: '.html'})
+ .use(stringify)
+ .process(vfile.readSync('index.md'), function (err, file) {
+ console.error(report(err || file));
+ if (file) {
+ vfile.writeSync(file); // Written to `index.html`.
+ }
+ });
+```
+
+### `function attacher([options])`
+
+An attacher is the thing passed to [`use`][use]. It configures the processor
+and in turn can receive options.
+
+Attachers can configure processors, such as by interacting with parsers and
+compilers, linking them to other processors, or by specifying how the syntax
+tree is handled.
+
+###### Context
+
+The context object is set to the invoked on [`processor`][processor].
+
+###### Parameters
+
+* `options` (`*`, optional) — Configuration
+
+###### Returns
+
+[`transformer`][transformer] — Optional.
+
+###### Note
+
+Attachers are invoked when the processor is [frozen][freeze]: either when
+`.freeze()` is called explicitly, or when [`.parse()`][parse], [`.run()`][run],
+[`.stringify()`][stringify], or [`.process()`][process] is called for the first
+time.
+
+### `function transformer(node, file[, next])`
+
+Transformers modify the syntax tree or metadata of a file. A transformer is a
+function which is invoked each time a file is passed through the transform
+phase. If an error occurs (either because it’s thrown, returned, rejected, or
+passed to [`next`][next]), the process stops.
+
+The transformation process in **unified** is handled by [`trough`][trough], see
+it’s documentation for the exact semantics of transformers.
+
+###### Parameters
+
+* `node` ([`Node`][node])
+* `file` ([`VFile`][file])
+* `next` ([`Function`][next], optional)
+
+###### Returns
+
+* `Error` — Can be returned to stop the process
+* [`Node`][node] — Can be returned and results in further transformations
+ and `stringify`s to be performed on the new tree
+* `Promise` — If a promise is returned, the function is asynchronous, and
+ **must** be resolved (optionally with a [`Node`][node]) or rejected
+ (optionally with an `Error`)
+
+#### `function next(err[, tree[, file]])`
+
+If the signature of a transformer includes `next` (third argument), the
+function **may** finish asynchronous, and **must** invoke `next()`.
+
+###### Parameters
+
+* `err` (`Error`, optional) — Stop the process
+* `node` ([`Node`][node], optional) — New syntax tree
+* `file` ([`VFile`][file], optional) — New virtual file
+
+## `Preset`
+
+Presets provide a potentially sharable way to configure processors. They can
+contain multiple plugins and optionally settings as well.
+
+###### Example
+
+`preset.js`:
+
+```js
+exports.settings = {bullet: '*', fences: true};
+
+exports.plugins = [
+ require('remark-preset-lint-recommended'),
+ require('remark-comment-config'),
+ require('remark-preset-lint-markdown-style-guide'),
+ [require('remark-toc'), {maxDepth: 3, tight: true}],
+ require('remark-github')
+];
+```
+
+`index.js`:
+
+```js
+var remark = require('remark');
+var vfile = require('to-vfile');
+var report = require('vfile-reporter');
+var preset = require('./preset');
+
+remark()
+ .use(preset)
+ .process(vfile.readSync('index.md'), function (err, file) {
+ console.error(report(err || file));
+
+ if (file) {
+ vfile.writeSync(file);
+ }
+ });
+```
+
+## License
+
+[MIT][license] © [Titus Wormer][author]
+
+<!-- Definitions -->
+
+[logo]: https://cdn.rawgit.com/unifiedjs/unified/0cd3a41/logo.svg
+
+[travis-badge]: https://img.shields.io/travis/unifiedjs/unified.svg
+
+[travis]: https://travis-ci.org/unifiedjs/unified
+
+[codecov-badge]: https://img.shields.io/codecov/c/github/unifiedjs/unified.svg
+
+[codecov]: https://codecov.io/github/unifiedjs/unified
+
+[chat-badge]: https://img.shields.io/gitter/room/unifiedjs/Lobby.svg
+
+[chat]: https://gitter.im/unifiedjs/Lobby
+
+[npm]: https://docs.npmjs.com/cli/install
+
+[license]: LICENSE
+
+[author]: http://wooorm.com
+
+[site]: https://unifiedjs.github.io
+
+[guides]: https://unifiedjs.github.io/#guides
+
+[rehype]: https://github.com/wooorm/rehype
+
+[remark]: https://github.com/wooorm/remark
+
+[retext]: https://github.com/wooorm/retext
+
+[hast]: https://github.com/syntax-tree/hast
+
+[mdast]: https://github.com/syntax-tree/mdast
+
+[nlcst]: https://github.com/syntax-tree/nlcst
+
+[unist]: https://github.com/syntax-tree/unist
+
+[engine]: https://github.com/unifiedjs/unified-engine
+
+[args]: https://github.com/unifiedjs/unified-args
+
+[gulp]: https://github.com/unifiedjs/unified-engine-gulp
+
+[atom]: https://github.com/unifiedjs/unified-engine-atom
+
+[remark-rehype]: https://github.com/wooorm/remark-rehype
+
+[remark-retext]: https://github.com/wooorm/remark-retext
+
+[rehype-retext]: https://github.com/wooorm/rehype-retext
+
+[rehype-remark]: https://github.com/wooorm/rehype-remark
+
+[unist-utilities]: https://github.com/syntax-tree/unist#list-of-utilities
+
+[vfile]: https://github.com/vfile/vfile
+
+[vfile-contents]: https://github.com/vfile/vfile#vfilecontents
+
+[vfile-utilities]: https://github.com/vfile/vfile#related-tools
+
+[file]: #file
+
+[node]: #node
+
+[processor]: #processor
+
+[process]: #processorprocessfilevalue-done
+
+[parse]: #processorparsefilevalue
+
+[parser]: #processorparser
+
+[stringify]: #processorstringifynode-file
+
+[run]: #processorrunnode-file-done
+
+[compiler]: #processorcompiler
+
+[use]: #processoruseplugin-options
+
+[attacher]: #function-attacheroptions
+
+[transformer]: #function-transformernode-file-next
+
+[next]: #function-nexterr-tree-file
+
+[freeze]: #processorfreeze
+
+[plugin]: #plugin
+
+[run-done]: #function-doneerr-node-file
+
+[process-done]: #function-doneerr-file
+
+[trough]: https://github.com/wooorm/trough#function-fninput-next
+
+[promise]: https://developer.mozilla.org/Web/JavaScript/Reference/Global_Objects/Promise
+
+[remark-plugins]: https://github.com/wooorm/remark/blob/master/doc/plugins.md#list-of-plugins
+
+[rehype-plugins]: https://github.com/wooorm/rehype/blob/master/doc/plugins.md#list-of-plugins
+
+[retext-plugins]: https://github.com/wooorm/retext/blob/master/doc/plugins.md#list-of-plugins
+
+[stream]: https://github.com/unifiedjs/unified-stream
diff --git a/tools/node_modules/eslint/node_modules/unist-util-is/LICENSE b/tools/node_modules/eslint/node_modules/unist-util-is/LICENSE
new file mode 100644
index 0000000000..32e7a3d93c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/unist-util-is/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2015 Titus Wormer <tituswormer@gmail.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/tools/node_modules/eslint/node_modules/unist-util-is/index.js b/tools/node_modules/eslint/node_modules/unist-util-is/index.js
new file mode 100644
index 0000000000..290259a798
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/unist-util-is/index.js
@@ -0,0 +1,119 @@
+'use strict';
+
+/* eslint-disable max-params */
+
+/* Expose. */
+module.exports = is;
+
+/* Assert if `test` passes for `node`.
+ * When a `parent` node is known the `index` of node */
+function is(test, node, index, parent, context) {
+ var hasParent = parent !== null && parent !== undefined;
+ var hasIndex = index !== null && index !== undefined;
+ var check = convert(test);
+
+ if (
+ hasIndex &&
+ (typeof index !== 'number' || index < 0 || index === Infinity)
+ ) {
+ throw new Error('Expected positive finite index or child node');
+ }
+
+ if (hasParent && (!is(null, parent) || !parent.children)) {
+ throw new Error('Expected parent node');
+ }
+
+ if (!node || !node.type || typeof node.type !== 'string') {
+ return false;
+ }
+
+ if (hasParent !== hasIndex) {
+ throw new Error('Expected both parent and index');
+ }
+
+ return Boolean(check.call(context, node, index, parent));
+}
+
+function convert(test) {
+ if (typeof test === 'string') {
+ return typeFactory(test);
+ }
+
+ if (test === null || test === undefined) {
+ return ok;
+ }
+
+ if (typeof test === 'object') {
+ return ('length' in test ? anyFactory : matchesFactory)(test);
+ }
+
+ if (typeof test === 'function') {
+ return test;
+ }
+
+ throw new Error('Expected function, string, or object as test');
+}
+
+function convertAll(tests) {
+ var results = [];
+ var length = tests.length;
+ var index = -1;
+
+ while (++index < length) {
+ results[index] = convert(tests[index]);
+ }
+
+ return results;
+}
+
+/* Utility assert each property in `test` is represented
+ * in `node`, and each values are strictly equal. */
+function matchesFactory(test) {
+ return matches;
+
+ function matches(node) {
+ var key;
+
+ for (key in test) {
+ if (node[key] !== test[key]) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+}
+
+function anyFactory(tests) {
+ var checks = convertAll(tests);
+ var length = checks.length;
+
+ return matches;
+
+ function matches() {
+ var index = -1;
+
+ while (++index < length) {
+ if (checks[index].apply(this, arguments)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+}
+
+/* Utility to convert a string into a function which checks
+ * a given node’s type for said string. */
+function typeFactory(test) {
+ return type;
+
+ function type(node) {
+ return Boolean(node && node.type === test);
+ }
+}
+
+/* Utility to return true. */
+function ok() {
+ return true;
+}
diff --git a/tools/node_modules/eslint/node_modules/unist-util-is/package.json b/tools/node_modules/eslint/node_modules/unist-util-is/package.json
new file mode 100644
index 0000000000..51cdd1833e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/unist-util-is/package.json
@@ -0,0 +1,105 @@
+{
+ "_from": "unist-util-is@^2.1.1",
+ "_id": "unist-util-is@2.1.1",
+ "_inBundle": false,
+ "_integrity": "sha1-DDEmKeP5YMZukx6BLT2A53AQlHs=",
+ "_location": "/unist-util-is",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "unist-util-is@^2.1.1",
+ "name": "unist-util-is",
+ "escapedName": "unist-util-is",
+ "rawSpec": "^2.1.1",
+ "saveSpec": null,
+ "fetchSpec": "^2.1.1"
+ },
+ "_requiredBy": [
+ "/unist-util-visit"
+ ],
+ "_resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-2.1.1.tgz",
+ "_shasum": "0c312629e3f960c66e931e812d3d80e77010947b",
+ "_spec": "unist-util-is@^2.1.1",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/unist-util-visit",
+ "author": {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ },
+ "bugs": {
+ "url": "https://github.com/syntax-tree/hast-util-to-html/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ }
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Utility to check if a node passes a test",
+ "devDependencies": {
+ "browserify": "^14.0.0",
+ "esmangle": "^1.0.1",
+ "nyc": "^11.0.0",
+ "remark-cli": "^3.0.0",
+ "remark-preset-wooorm": "^3.0.0",
+ "tape": "^4.0.0",
+ "xo": "^0.18.1"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/syntax-tree/unist-util-is#readme",
+ "keywords": [
+ "unist",
+ "node",
+ "is",
+ "equal",
+ "test",
+ "type",
+ "util",
+ "utility"
+ ],
+ "license": "MIT",
+ "name": "unist-util-is",
+ "nyc": {
+ "check-coverage": true,
+ "lines": 100,
+ "functions": 100,
+ "branches": 100
+ },
+ "remarkConfig": {
+ "plugins": [
+ "preset-wooorm"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/syntax-tree/unist-util-is.git"
+ },
+ "scripts": {
+ "build": "npm run build-md && npm run build-bundle && npm run build-mangle",
+ "build-bundle": "browserify index.js --bare -s unistUtilIs > unist-util-is.js",
+ "build-mangle": "esmangle < unist-util-is.js > unist-util-is.min.js",
+ "build-md": "remark . -qfo",
+ "lint": "xo",
+ "test": "npm run build && npm run lint && npm run test-coverage",
+ "test-api": "node test",
+ "test-coverage": "nyc --reporter lcov tape test.js"
+ },
+ "version": "2.1.1",
+ "xo": {
+ "space": true,
+ "esnext": false,
+ "rules": {
+ "unicorn/prefer-type-error": "off"
+ },
+ "ignore": [
+ "unist-util-is.js"
+ ]
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/unist-util-is/readme.md b/tools/node_modules/eslint/node_modules/unist-util-is/readme.md
new file mode 100644
index 0000000000..09bb5fc495
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/unist-util-is/readme.md
@@ -0,0 +1,120 @@
+# unist-util-is [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov]
+
+[**Unist**][unist] utility to check if a node passes a test.
+
+## Installation
+
+[npm][]:
+
+```bash
+npm install unist-util-is
+```
+
+## Usage
+
+```js
+var is = require('unist-util-is');
+
+var node = {type: 'strong'};
+var parent = {type: 'paragraph', children: [node]};
+
+function test(node, n) { return n === 5 }
+
+is(); // false
+is(null, {children: []}); // false
+is(null, node); // true
+is('strong', node); // true
+is('emphasis', node); // false
+
+is(node, node) // true
+is({type: 'paragraph'}, parent) // true
+is({type: 'strong'}, parent) // false
+
+is(test, node); // false
+is(test, node, 4, parent); // false
+is(test, node, 5, parent); // true
+```
+
+## API
+
+### `is(test, node[, index, parent[, context]])`
+
+###### Parameters
+
+* `test` ([`Function`][test], `string`, `Object`, or `Array.<Test>`, optional)
+ — When not given, checks if `node` is a [`Node`][node].
+ When `string`, works like passing `function (node) {return
+ node.type === test}`.
+ When `array`, checks any one of the subtests pass.
+ When `object`, checks that all keys in `test` are in `node`,
+ and that they have (strictly) equal values
+* `node` ([`Node`][node]) — Node to check. `false` is returned
+* `index` (`number`, optional) — Position of `node` in `parent`
+* `parent` (`Node`, optional) — Parent of `node`
+* `context` (`*`, optional) — Context object to invoke `test` with
+
+###### Returns
+
+`boolean` — Whether `test` passed _and_ `node` is a [`Node`][node] (object
+with `type` set to non-empty `string`).
+
+#### `function test(node[, index, parent])`
+
+###### Parameters
+
+* `node` (`Node`) — Node to test
+* `index` (`number?`) — Position of `node` in `parent`
+* `parent` (`Node?`) — Parent of `node`
+
+###### Context
+
+`*` — The to `is` given `context`.
+
+###### Returns
+
+`boolean?` — Whether `node` matches.
+
+## Related
+
+* [`unist-util-find-after`](https://github.com/syntax-tree/unist-util-find-after)
+ — Find a node after another node
+* [`unist-util-find-before`](https://github.com/syntax-tree/unist-util-find-before)
+ — Find a node before another node
+* [`unist-util-find-all-after`](https://github.com/syntax-tree/unist-util-find-all-after)
+ — Find all nodes after another node
+* [`unist-util-find-all-before`](https://github.com/syntax-tree/unist-util-find-all-before)
+ — Find all nodes before another node
+* [`unist-util-find-all-between`](https://github.com/mrzmmr/unist-util-find-all-between)
+ — Find all nodes between two nodes
+* [`unist-util-find`](https://github.com/blahah/unist-util-find)
+ — Find nodes matching a predicate
+* [`unist-util-filter`](https://github.com/eush77/unist-util-filter)
+ — Create a new tree with nodes that pass a check
+* [`unist-util-remove`](https://github.com/eush77/unist-util-remove)
+ — Remove nodes from tree
+
+## License
+
+[MIT][license] © [Titus Wormer][author]
+
+<!-- Definitions -->
+
+[travis-badge]: https://img.shields.io/travis/syntax-tree/unist-util-is.svg
+
+[travis]: https://travis-ci.org/syntax-tree/unist-util-is
+
+[codecov-badge]: https://img.shields.io/codecov/c/github/syntax-tree/unist-util-is.svg
+
+[codecov]: https://codecov.io/github/syntax-tree/unist-util-is
+
+[npm]: https://docs.npmjs.com/cli/install
+
+[license]: LICENSE
+
+[author]: http://wooorm.com
+
+[unist]: https://github.com/syntax-tree/unist
+
+[node]: https://github.com/syntax-tree/unist#node
+
+[test]: #function-testnode-index-parent
diff --git a/tools/node_modules/eslint/node_modules/unist-util-remove-position/LICENSE b/tools/node_modules/eslint/node_modules/unist-util-remove-position/LICENSE
new file mode 100644
index 0000000000..8d8660d36e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/unist-util-remove-position/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2016 Titus Wormer <tituswormer@gmail.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/tools/node_modules/eslint/node_modules/unist-util-remove-position/index.js b/tools/node_modules/eslint/node_modules/unist-util-remove-position/index.js
new file mode 100644
index 0000000000..4db10234be
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/unist-util-remove-position/index.js
@@ -0,0 +1,19 @@
+'use strict';
+
+var visit = require('unist-util-visit');
+
+module.exports = removePosition;
+
+/* Remove `position`s from `tree`. */
+function removePosition(node, force) {
+ visit(node, force ? hard : soft);
+ return node;
+}
+
+function hard(node) {
+ delete node.position;
+}
+
+function soft(node) {
+ node.position = undefined;
+}
diff --git a/tools/node_modules/eslint/node_modules/unist-util-remove-position/package.json b/tools/node_modules/eslint/node_modules/unist-util-remove-position/package.json
new file mode 100644
index 0000000000..0425b921b0
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/unist-util-remove-position/package.json
@@ -0,0 +1,103 @@
+{
+ "_from": "unist-util-remove-position@^1.0.0",
+ "_id": "unist-util-remove-position@1.1.1",
+ "_inBundle": false,
+ "_integrity": "sha1-WoXBVV/BugwQG4ZwfRXlD6TIcbs=",
+ "_location": "/unist-util-remove-position",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "unist-util-remove-position@^1.0.0",
+ "name": "unist-util-remove-position",
+ "escapedName": "unist-util-remove-position",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/remark-parse"
+ ],
+ "_resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-1.1.1.tgz",
+ "_shasum": "5a85c1555fc1ba0c101b86707d15e50fa4c871bb",
+ "_spec": "unist-util-remove-position@^1.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/remark-parse",
+ "author": {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ },
+ "bugs": {
+ "url": "https://github.com/syntax-tree/unist-util-remove-position/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ }
+ ],
+ "dependencies": {
+ "unist-util-visit": "^1.1.0"
+ },
+ "deprecated": false,
+ "description": "Remove `position`s from a unist tree",
+ "devDependencies": {
+ "browserify": "^14.0.0",
+ "esmangle": "^1.0.1",
+ "nyc": "^11.0.0",
+ "remark": "^7.0.0",
+ "remark-cli": "^3.0.0",
+ "remark-preset-wooorm": "^3.0.0",
+ "tape": "^4.0.0",
+ "unist-builder": "^1.0.2",
+ "xo": "^0.18.2"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/syntax-tree/unist-util-remove-position#readme",
+ "keywords": [
+ "unist",
+ "utility",
+ "remove",
+ "position",
+ "location"
+ ],
+ "license": "MIT",
+ "name": "unist-util-remove-position",
+ "nyc": {
+ "check-coverage": true,
+ "lines": 100,
+ "functions": 100,
+ "branches": 100
+ },
+ "remarkConfig": {
+ "plugins": [
+ "preset-wooorm"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/syntax-tree/unist-util-remove-position.git"
+ },
+ "scripts": {
+ "build": "npm run build-md && npm run build-bundle && npm run build-mangle",
+ "build-bundle": "browserify index.js --bare -s unistUtilRemovePosition > unist-util-remove-position.js",
+ "build-mangle": "esmangle < unist-util-remove-position.js > unist-util-remove-position.min.js",
+ "build-md": "remark . -qfo",
+ "lint": "xo",
+ "test": "npm run build && npm run lint && npm run test-coverage",
+ "test-api": "node test",
+ "test-coverage": "nyc --reporter lcov tape test.js"
+ },
+ "version": "1.1.1",
+ "xo": {
+ "space": true,
+ "esnext": false,
+ "ignores": [
+ "unist-util-remove-position.js"
+ ]
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/unist-util-remove-position/readme.md b/tools/node_modules/eslint/node_modules/unist-util-remove-position/readme.md
new file mode 100644
index 0000000000..6063836f57
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/unist-util-remove-position/readme.md
@@ -0,0 +1,77 @@
+# unist-util-remove-position [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov]
+
+Remove [`position`][position]s from a [Unist][] tree.
+
+## Installation
+
+[npm][]:
+
+```bash
+npm install unist-util-remove-position
+```
+
+## Usage
+
+```javascript
+var remark = require('remark');
+var removePosition = require('unist-util-remove-position');
+
+var tree = remark().parse('Some _emphasis_, **importance**, and `code`.');
+
+console.dir(removePosition(tree, true), {depth: null});
+```
+
+Yields:
+
+```js
+{ type: 'root',
+ children:
+ [ { type: 'paragraph',
+ children:
+ [ { type: 'text', value: 'Some ' },
+ { type: 'emphasis',
+ children: [ { type: 'text', value: 'emphasis' } ] },
+ { type: 'text', value: ', ' },
+ { type: 'strong',
+ children: [ { type: 'text', value: 'importance' } ] },
+ { type: 'text', value: ', and ' },
+ { type: 'inlineCode', value: 'code' },
+ { type: 'text', value: '.' } ] } ] }
+```
+
+## API
+
+### `removePosition(node[, force])`
+
+Remove [`position`][position]s from [`node`][node]. If `force` is given,
+uses `delete`, otherwise, sets `position`s to `undefined`.
+
+###### Returns
+
+The given `node`.
+
+## License
+
+[MIT][license] © [Titus Wormer][author]
+
+<!-- Definitions -->
+
+[travis-badge]: https://img.shields.io/travis/syntax-tree/unist-util-remove-position.svg
+
+[travis]: https://travis-ci.org/syntax-tree/unist-util-remove-position
+
+[codecov-badge]: https://img.shields.io/codecov/c/github/syntax-tree/unist-util-remove-position.svg
+
+[codecov]: https://codecov.io/github/syntax-tree/unist-util-remove-position
+
+[npm]: https://docs.npmjs.com/cli/install
+
+[license]: LICENSE
+
+[author]: http://wooorm.com
+
+[unist]: https://github.com/syntax-tree/unist
+
+[position]: https://github.com/syntax-tree/unist#position
+
+[node]: https://github.com/syntax-tree/unist#node
diff --git a/tools/node_modules/eslint/node_modules/unist-util-stringify-position/LICENSE b/tools/node_modules/eslint/node_modules/unist-util-stringify-position/LICENSE
new file mode 100644
index 0000000000..8d8660d36e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/unist-util-stringify-position/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2016 Titus Wormer <tituswormer@gmail.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/tools/node_modules/eslint/node_modules/unist-util-stringify-position/index.js b/tools/node_modules/eslint/node_modules/unist-util-stringify-position/index.js
new file mode 100644
index 0000000000..bf8ac832b0
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/unist-util-stringify-position/index.js
@@ -0,0 +1,50 @@
+'use strict';
+
+var own = {}.hasOwnProperty;
+
+module.exports = stringify;
+
+function stringify(value) {
+ /* Nothing. */
+ if (!value || typeof value !== 'object') {
+ return null;
+ }
+
+ /* Node. */
+ if (own.call(value, 'position') || own.call(value, 'type')) {
+ return location(value.position);
+ }
+
+ /* Location. */
+ if (own.call(value, 'start') || own.call(value, 'end')) {
+ return location(value);
+ }
+
+ /* Position. */
+ if (own.call(value, 'line') || own.call(value, 'column')) {
+ return position(value);
+ }
+
+ /* ? */
+ return null;
+}
+
+function position(pos) {
+ if (!pos || typeof pos !== 'object') {
+ pos = {};
+ }
+
+ return index(pos.line) + ':' + index(pos.column);
+}
+
+function location(loc) {
+ if (!loc || typeof loc !== 'object') {
+ loc = {};
+ }
+
+ return position(loc.start) + '-' + position(loc.end);
+}
+
+function index(value) {
+ return value && typeof value === 'number' ? value : 1;
+}
diff --git a/tools/node_modules/eslint/node_modules/unist-util-stringify-position/package.json b/tools/node_modules/eslint/node_modules/unist-util-stringify-position/package.json
new file mode 100644
index 0000000000..8634a80e40
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/unist-util-stringify-position/package.json
@@ -0,0 +1,103 @@
+{
+ "_from": "unist-util-stringify-position@^1.0.0",
+ "_id": "unist-util-stringify-position@1.1.1",
+ "_inBundle": false,
+ "_integrity": "sha1-PMvcU2ee7W7PN3fdf14yKcG2qjw=",
+ "_location": "/unist-util-stringify-position",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "unist-util-stringify-position@^1.0.0",
+ "name": "unist-util-stringify-position",
+ "escapedName": "unist-util-stringify-position",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/vfile",
+ "/vfile-message"
+ ],
+ "_resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-1.1.1.tgz",
+ "_shasum": "3ccbdc53679eed6ecf3777dd7f5e3229c1b6aa3c",
+ "_spec": "unist-util-stringify-position@^1.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/vfile",
+ "author": {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ },
+ "bugs": {
+ "url": "https://github.com/syntax-tree/unist-util-stringify-position/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ }
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Stringify a Unist node, location, or position",
+ "devDependencies": {
+ "browserify": "^14.1.0",
+ "esmangle": "^1.0.0",
+ "nyc": "^10.0.0",
+ "remark-cli": "^3.0.0",
+ "remark-preset-wooorm": "^3.0.0",
+ "tape": "^4.5.1",
+ "xo": "^0.18.1"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/syntax-tree/unist-util-stringify-position#readme",
+ "keywords": [
+ "unist",
+ "position",
+ "location",
+ "node",
+ "stringify",
+ "tostring",
+ "util",
+ "utility"
+ ],
+ "license": "MIT",
+ "name": "unist-util-stringify-position",
+ "nyc": {
+ "check-coverage": true,
+ "lines": 100,
+ "functions": 100,
+ "branches": 100
+ },
+ "remarkConfig": {
+ "plugins": [
+ "preset-wooorm"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/syntax-tree/unist-util-stringify-position.git"
+ },
+ "scripts": {
+ "build": "npm run build-md && npm run build-bundle && npm run build-mangle",
+ "build-bundle": "browserify index.js --no-builtins -s unistUtilStringifyPosition > unist-util-stringify-position.js",
+ "build-mangle": "esmangle unist-util-stringify-position.js > unist-util-stringify-position.min.js",
+ "build-md": "remark . --quiet --frail --output",
+ "lint": "xo",
+ "test": "npm run build && npm run lint && npm run test-coverage",
+ "test-api": "node test",
+ "test-coverage": "nyc --reporter lcov tape test.js"
+ },
+ "version": "1.1.1",
+ "xo": {
+ "space": true,
+ "esnext": false,
+ "ignores": [
+ "unist-util-stringify-position.js"
+ ]
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/unist-util-stringify-position/readme.md b/tools/node_modules/eslint/node_modules/unist-util-stringify-position/readme.md
new file mode 100644
index 0000000000..36155a47de
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/unist-util-stringify-position/readme.md
@@ -0,0 +1,85 @@
+# unist-util-stringify-position [![Build Status][build-badge]][build-page] [![Coverage Status][coverage-badge]][coverage-page]
+
+Stringify a [**Unist**][unist] [position][] or [location][].
+
+## Installation
+
+[npm][]:
+
+```bash
+npm install unist-util-stringify-position
+```
+
+## Usage
+
+```javascript
+var stringify = require('unist-util-stringify-position');
+
+stringify({line: 2, column: 3 }); //=> '2:3'
+
+stringify({
+ start: {line: 2},
+ end: {line: 3}
+}); //=> '2:1-3:1'
+
+stringify({
+ type: 'text',
+ value: '!',
+ position: {
+ start: {line: 5, column: 11},
+ end: {line: 5, column: 12}
+ }
+}); //=> '5:11-5:12'
+```
+
+## API
+
+### `stringifyPosition(node|location|position)`
+
+Stringify one position, a location (start and end positions), or
+a node’s location.
+
+###### Parameters
+
+* `node` ([`Node`][node])
+ — Node whose `'position'` property to stringify
+* `location` ([`Location`][location])
+ — Location whose `'start'` and `'end'` positions to stringify
+* `position` ([`Position`][position])
+ — Location whose `'line'` and `'column'` to stringify
+
+###### Returns
+
+`string?` — A range `ls:cs-le:ce` (when given `node` or
+`location`) or a point `l:c` (when given `position`), where `l` stands
+for line, `c` for column, `s` for `start`, and `e` for
+end. `null` is returned if the given value is neither `node`,
+`location`, nor `position`.
+
+## License
+
+[MIT][license] © [Titus Wormer][author]
+
+<!-- Definition -->
+
+[build-badge]: https://img.shields.io/travis/syntax-tree/unist-util-stringify-position.svg
+
+[build-page]: https://travis-ci.org/syntax-tree/unist-util-stringify-position
+
+[coverage-badge]: https://img.shields.io/codecov/c/github/syntax-tree/unist-util-stringify-position.svg
+
+[coverage-page]: https://codecov.io/github/syntax-tree/unist-util-stringify-position?branch=master
+
+[npm]: https://docs.npmjs.com/cli/install
+
+[license]: LICENSE
+
+[author]: http://wooorm.com
+
+[unist]: https://github.com/syntax-tree/unist
+
+[node]: https://github.com/syntax-tree/unist#node
+
+[location]: https://github.com/syntax-tree/unist#location
+
+[position]: https://github.com/syntax-tree/unist#position
diff --git a/tools/node_modules/eslint/node_modules/unist-util-visit/LICENSE b/tools/node_modules/eslint/node_modules/unist-util-visit/LICENSE
new file mode 100644
index 0000000000..32e7a3d93c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/unist-util-visit/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2015 Titus Wormer <tituswormer@gmail.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/tools/node_modules/eslint/node_modules/unist-util-visit/index.js b/tools/node_modules/eslint/node_modules/unist-util-visit/index.js
new file mode 100644
index 0000000000..d51a97513b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/unist-util-visit/index.js
@@ -0,0 +1,55 @@
+'use strict';
+
+/* Expose. */
+module.exports = visit;
+
+var is = require('unist-util-is');
+
+/* Visit. */
+function visit(tree, test, visitor, reverse) {
+ if (typeof test === 'function' && typeof visitor !== 'function') {
+ reverse = visitor;
+ visitor = test;
+ test = null;
+ }
+
+ one(tree);
+
+ /* Visit a single node. */
+ function one(node, index, parent) {
+ var result;
+
+ index = index || (parent ? 0 : null);
+
+ if (!test || node.type === test || is(test, node, index, parent || null)) {
+ result = visitor(node, index, parent || null);
+ }
+
+ if (node.children && result !== false) {
+ return all(node.children, node);
+ }
+
+ return result;
+ }
+
+ /* Visit children in `parent`. */
+ function all(children, parent) {
+ var step = reverse ? -1 : 1;
+ var max = children.length;
+ var min = -1;
+ var index = (reverse ? max : min) + step;
+ var child;
+
+ while (index > min && index < max) {
+ child = children[index];
+
+ if (child && one(child, index, parent) === false) {
+ return false;
+ }
+
+ index += step;
+ }
+
+ return true;
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/unist-util-visit/package.json b/tools/node_modules/eslint/node_modules/unist-util-visit/package.json
new file mode 100644
index 0000000000..f2964f8390
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/unist-util-visit/package.json
@@ -0,0 +1,116 @@
+{
+ "_from": "unist-util-visit@^1.1.0",
+ "_id": "unist-util-visit@1.2.0",
+ "_inBundle": false,
+ "_integrity": "sha512-lI+jyPlDztHZ2CJhUchcRMQ7MNc0yASgYFxwRTxs0EZ+9HbYFBLVGDJ2FchTBy+pra0O1LVEn0Wkgf19mDVDzw==",
+ "_location": "/unist-util-visit",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "unist-util-visit@^1.1.0",
+ "name": "unist-util-visit",
+ "escapedName": "unist-util-visit",
+ "rawSpec": "^1.1.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.1.0"
+ },
+ "_requiredBy": [
+ "/unist-util-remove-position"
+ ],
+ "_resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-1.2.0.tgz",
+ "_shasum": "9dc78d1f95cd242e865f7f93f327d3296bb9a718",
+ "_spec": "unist-util-visit@^1.1.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/unist-util-remove-position",
+ "author": {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ },
+ "bugs": {
+ "url": "https://github.com/syntax-tree/unist-util-visit/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ },
+ {
+ "name": "Eugene Sharygin",
+ "email": "eush77@gmail.com"
+ },
+ {
+ "name": "Richard Gibson",
+ "email": "richard.gibson@gmail.com"
+ }
+ ],
+ "dependencies": {
+ "unist-util-is": "^2.1.1"
+ },
+ "deprecated": false,
+ "description": "Recursively walk over unist nodes",
+ "devDependencies": {
+ "browserify": "^14.0.0",
+ "esmangle": "^1.0.0",
+ "nyc": "^11.0.0",
+ "remark": "^8.0.0",
+ "remark-cli": "^4.0.0",
+ "remark-preset-wooorm": "^3.0.0",
+ "tape": "^4.5.1",
+ "xo": "^0.18.2"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/syntax-tree/unist-util-visit#readme",
+ "keywords": [
+ "unist",
+ "remark",
+ "markdown",
+ "retext",
+ "natural",
+ "language",
+ "node",
+ "visit",
+ "walk",
+ "util",
+ "utility"
+ ],
+ "license": "MIT",
+ "name": "unist-util-visit",
+ "nyc": {
+ "check-coverage": true,
+ "lines": 100,
+ "functions": 100,
+ "branches": 100
+ },
+ "remarkConfig": {
+ "plugins": [
+ "preset-wooorm"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/syntax-tree/unist-util-visit.git"
+ },
+ "scripts": {
+ "build": "npm run build-md && npm run build-bundle && npm run build-mangle",
+ "build-bundle": "browserify index.js --no-builtins -s unistUtilVisit > unist-util-visit.js",
+ "build-mangle": "esmangle unist-util-visit.js > unist-util-visit.min.js",
+ "build-md": "remark . -qfo",
+ "lint": "xo",
+ "test": "npm run build && npm run lint && npm run test-coverage",
+ "test-api": "node test",
+ "test-coverage": "nyc --reporter lcov tape test.js"
+ },
+ "version": "1.2.0",
+ "xo": {
+ "space": true,
+ "esnext": false,
+ "ignores": [
+ "unist-util-visit.js"
+ ]
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/unist-util-visit/readme.md b/tools/node_modules/eslint/node_modules/unist-util-visit/readme.md
new file mode 100644
index 0000000000..1d68eef6f8
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/unist-util-visit/readme.md
@@ -0,0 +1,119 @@
+# unist-util-visit [![Build Status][build-badge]][build-page] [![Coverage Status][coverage-badge]][coverage-page]
+
+[Unist][] node visitor. Useful when working with [**remark**][remark],
+[**retext**][retext], or [**rehype**][rehype].
+
+## Installation
+
+[npm][]:
+
+```bash
+npm install unist-util-visit
+```
+
+## Usage
+
+```javascript
+var remark = require('remark');
+var visit = require('unist-util-visit');
+
+var tree = remark.parse('Some _emphasis_, **importance**, and `code`.');
+
+visit(tree, 'text', visitor);
+
+function visitor(node) {
+ console.log(node);
+}
+```
+
+Yields:
+
+```js
+{ type: 'text', value: 'Some ' }
+{ type: 'text', value: 'emphasis' }
+{ type: 'text', value: ', ' }
+{ type: 'text', value: 'importance' }
+{ type: 'text', value: ', and ' }
+{ type: 'text', value: '.' }
+```
+
+## API
+
+### `visit(node[, test], visitor[, reverse])`
+
+Visit nodes. Optionally filtering nodes. Optionally in reverse.
+
+###### Parameters
+
+* `node` ([`Node`][node])
+ — Node to search
+* `test` ([`Test`][is], optional)
+ — Node type or other [`is`][is]-compatible test
+* `visitor` ([Function][visitor])
+ — Visitor invoked when a node is found
+* `reverse` (`boolean`, default: `false`)
+ — When falsey, checking starts at the first child and continues
+ through to later children. When truthy, this is reversed.
+ This **does not** mean checking starts at the deepest node and
+ continues on to the highest node
+
+#### `stop? = visitor(node, index, parent)`
+
+Invoked when a node (matching `test`, if given) is found.
+
+###### Parameters
+
+* `node` (`Node`) — Found node
+* `index` (`number?`) — Position of `node` in `parent`
+* `parent` (`Node?`) — Parent of `node`
+
+###### Returns
+
+`boolean?` - When `false`, visiting is immediately stopped.
+
+## Related
+
+* [`unist-util-visit-parents`](https://github.com/syntax-tree/unist-util-visit-parents)
+ — Like `visit`, but with a stack of parents
+* [`unist-util-filter`](https://github.com/eush77/unist-util-filter)
+ — Create a new tree with all nodes that pass a test
+* [`unist-util-map`](https://github.com/syntax-tree/unist-util-map)
+ — Create a new tree with all nodes mapped by a given function
+* [`unist-util-remove`](https://github.com/eush77/unist-util-remove)
+ — Remove nodes from a tree that pass a test
+* [`unist-util-select`](https://github.com/eush77/unist-util-select)
+ — Select nodes with CSS-like selectors
+
+## License
+
+[MIT][license] © [Titus Wormer][author]
+
+<!-- Definition -->
+
+[build-badge]: https://img.shields.io/travis/syntax-tree/unist-util-visit.svg
+
+[build-page]: https://travis-ci.org/syntax-tree/unist-util-visit
+
+[coverage-badge]: https://img.shields.io/codecov/c/github/syntax-tree/unist-util-visit.svg
+
+[coverage-page]: https://codecov.io/github/syntax-tree/unist-util-visit?branch=master
+
+[npm]: https://docs.npmjs.com/cli/install
+
+[license]: LICENSE
+
+[author]: http://wooorm.com
+
+[unist]: https://github.com/syntax-tree/unist
+
+[retext]: https://github.com/wooorm/retext
+
+[remark]: https://github.com/wooorm/remark
+
+[rehype]: https://github.com/wooorm/rehype
+
+[node]: https://github.com/syntax-tree/unist#node
+
+[is]: https://github.com/syntax-tree/unist-util-is#istest-node-index-parent-context
+
+[visitor]: #stop--visitornode-index-parent
diff --git a/tools/node_modules/eslint/node_modules/util-deprecate/LICENSE b/tools/node_modules/eslint/node_modules/util-deprecate/LICENSE
new file mode 100644
index 0000000000..6a60e8c225
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/util-deprecate/LICENSE
@@ -0,0 +1,24 @@
+(The MIT License)
+
+Copyright (c) 2014 Nathan Rajlich <nathan@tootallnate.net>
+
+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/tools/node_modules/eslint/node_modules/util-deprecate/README.md b/tools/node_modules/eslint/node_modules/util-deprecate/README.md
new file mode 100644
index 0000000000..75622fa7c2
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/util-deprecate/README.md
@@ -0,0 +1,53 @@
+util-deprecate
+==============
+### The Node.js `util.deprecate()` function with browser support
+
+In Node.js, this module simply re-exports the `util.deprecate()` function.
+
+In the web browser (i.e. via browserify), a browser-specific implementation
+of the `util.deprecate()` function is used.
+
+
+## API
+
+A `deprecate()` function is the only thing exposed by this module.
+
+``` javascript
+// setup:
+exports.foo = deprecate(foo, 'foo() is deprecated, use bar() instead');
+
+
+// users see:
+foo();
+// foo() is deprecated, use bar() instead
+foo();
+foo();
+```
+
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2014 Nathan Rajlich <nathan@tootallnate.net>
+
+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/tools/node_modules/eslint/node_modules/util-deprecate/browser.js b/tools/node_modules/eslint/node_modules/util-deprecate/browser.js
new file mode 100644
index 0000000000..549ae2f065
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/util-deprecate/browser.js
@@ -0,0 +1,67 @@
+
+/**
+ * Module exports.
+ */
+
+module.exports = deprecate;
+
+/**
+ * Mark that a method should not be used.
+ * Returns a modified function which warns once by default.
+ *
+ * If `localStorage.noDeprecation = true` is set, then it is a no-op.
+ *
+ * If `localStorage.throwDeprecation = true` is set, then deprecated functions
+ * will throw an Error when invoked.
+ *
+ * If `localStorage.traceDeprecation = true` is set, then deprecated functions
+ * will invoke `console.trace()` instead of `console.error()`.
+ *
+ * @param {Function} fn - the function to deprecate
+ * @param {String} msg - the string to print to the console when `fn` is invoked
+ * @returns {Function} a new "deprecated" version of `fn`
+ * @api public
+ */
+
+function deprecate (fn, msg) {
+ if (config('noDeprecation')) {
+ return fn;
+ }
+
+ var warned = false;
+ function deprecated() {
+ if (!warned) {
+ if (config('throwDeprecation')) {
+ throw new Error(msg);
+ } else if (config('traceDeprecation')) {
+ console.trace(msg);
+ } else {
+ console.warn(msg);
+ }
+ warned = true;
+ }
+ return fn.apply(this, arguments);
+ }
+
+ return deprecated;
+}
+
+/**
+ * Checks `localStorage` for boolean values for the given `name`.
+ *
+ * @param {String} name
+ * @returns {Boolean}
+ * @api private
+ */
+
+function config (name) {
+ // accessing global.localStorage can trigger a DOMException in sandboxed iframes
+ try {
+ if (!global.localStorage) return false;
+ } catch (_) {
+ return false;
+ }
+ var val = global.localStorage[name];
+ if (null == val) return false;
+ return String(val).toLowerCase() === 'true';
+}
diff --git a/tools/node_modules/eslint/node_modules/util-deprecate/node.js b/tools/node_modules/eslint/node_modules/util-deprecate/node.js
new file mode 100644
index 0000000000..5e6fcff5dd
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/util-deprecate/node.js
@@ -0,0 +1,6 @@
+
+/**
+ * For Node.js, simply re-export the core `util.deprecate` function.
+ */
+
+module.exports = require('util').deprecate;
diff --git a/tools/node_modules/eslint/node_modules/util-deprecate/package.json b/tools/node_modules/eslint/node_modules/util-deprecate/package.json
new file mode 100644
index 0000000000..8f120fcadd
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/util-deprecate/package.json
@@ -0,0 +1,56 @@
+{
+ "_from": "util-deprecate@~1.0.1",
+ "_id": "util-deprecate@1.0.2",
+ "_inBundle": false,
+ "_integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
+ "_location": "/eslint/util-deprecate",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "util-deprecate@~1.0.1",
+ "name": "util-deprecate",
+ "escapedName": "util-deprecate",
+ "rawSpec": "~1.0.1",
+ "saveSpec": null,
+ "fetchSpec": "~1.0.1"
+ },
+ "_requiredBy": [
+ "/eslint/readable-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+ "_shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf",
+ "_spec": "util-deprecate@~1.0.1",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/readable-stream",
+ "author": {
+ "name": "Nathan Rajlich",
+ "email": "nathan@tootallnate.net",
+ "url": "http://n8.io/"
+ },
+ "browser": "browser.js",
+ "bugs": {
+ "url": "https://github.com/TooTallNate/util-deprecate/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "The Node.js `util.deprecate()` function with browser support",
+ "homepage": "https://github.com/TooTallNate/util-deprecate",
+ "keywords": [
+ "util",
+ "deprecate",
+ "browserify",
+ "browser",
+ "node"
+ ],
+ "license": "MIT",
+ "main": "node.js",
+ "name": "util-deprecate",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/TooTallNate/util-deprecate.git"
+ },
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "version": "1.0.2"
+}
diff --git a/tools/node_modules/eslint/node_modules/vfile-location/LICENSE b/tools/node_modules/eslint/node_modules/vfile-location/LICENSE
new file mode 100644
index 0000000000..8d8660d36e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/vfile-location/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2016 Titus Wormer <tituswormer@gmail.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/tools/node_modules/eslint/node_modules/vfile-location/index.js b/tools/node_modules/eslint/node_modules/vfile-location/index.js
new file mode 100644
index 0000000000..9263d2486a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/vfile-location/index.js
@@ -0,0 +1,77 @@
+'use strict';
+
+/* Expose. */
+module.exports = factory;
+
+/* Factory. */
+function factory(file) {
+ var contents = indices(String(file));
+
+ return {
+ toPosition: offsetToPositionFactory(contents),
+ toOffset: positionToOffsetFactory(contents)
+ };
+}
+
+/* Factory to get the line and column-based `position` for
+ * `offset` in the bound indices. */
+function offsetToPositionFactory(indices) {
+ return offsetToPosition;
+
+ /* Get the line and column-based `position` for
+ * `offset` in the bound indices. */
+ function offsetToPosition(offset) {
+ var index = -1;
+ var length = indices.length;
+
+ if (offset < 0) {
+ return {};
+ }
+
+ while (++index < length) {
+ if (indices[index] > offset) {
+ return {
+ line: index + 1,
+ column: (offset - (indices[index - 1] || 0)) + 1,
+ offset: offset
+ };
+ }
+ }
+
+ return {};
+ }
+}
+
+/* Factory to get the `offset` for a line and column-based
+ * `position` in the bound indices. */
+function positionToOffsetFactory(indices) {
+ return positionToOffset;
+
+ /* Get the `offset` for a line and column-based
+ * `position` in the bound indices. */
+ function positionToOffset(position) {
+ var line = position && position.line;
+ var column = position && position.column;
+
+ if (!isNaN(line) && !isNaN(column) && line - 1 in indices) {
+ return ((indices[line - 2] || 0) + column - 1) || 0;
+ }
+
+ return -1;
+ }
+}
+
+/* Get indices of line-breaks in `value`. */
+function indices(value) {
+ var result = [];
+ var index = value.indexOf('\n');
+
+ while (index !== -1) {
+ result.push(index + 1);
+ index = value.indexOf('\n', index + 1);
+ }
+
+ result.push(value.length + 1);
+
+ return result;
+}
diff --git a/tools/node_modules/eslint/node_modules/vfile-location/package.json b/tools/node_modules/eslint/node_modules/vfile-location/package.json
new file mode 100644
index 0000000000..923b71f7bd
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/vfile-location/package.json
@@ -0,0 +1,100 @@
+{
+ "_from": "vfile-location@^2.0.0",
+ "_id": "vfile-location@2.0.2",
+ "_inBundle": false,
+ "_integrity": "sha1-02dcWch3SY5JK0dW/2Xkrxp1IlU=",
+ "_location": "/vfile-location",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "vfile-location@^2.0.0",
+ "name": "vfile-location",
+ "escapedName": "vfile-location",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/remark-parse"
+ ],
+ "_resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-2.0.2.tgz",
+ "_shasum": "d3675c59c877498e492b4756ff65e4af1a752255",
+ "_spec": "vfile-location@^2.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/remark-parse",
+ "author": {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ },
+ "bugs": {
+ "url": "https://github.com/vfile/vfile-location/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ }
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Convert between positions (line and column-based) and offsets (range-based) locations in a virtual file",
+ "devDependencies": {
+ "browserify": "^14.0.0",
+ "esmangle": "^1.0.1",
+ "nyc": "^11.0.0",
+ "remark-cli": "^3.0.0",
+ "remark-preset-wooorm": "^3.0.0",
+ "tape": "^4.0.0",
+ "vfile": "^2.0.0",
+ "xo": "^0.18.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/vfile/vfile-location#readme",
+ "keywords": [
+ "remark",
+ "comment",
+ "message",
+ "marker",
+ "control"
+ ],
+ "license": "MIT",
+ "name": "vfile-location",
+ "nyc": {
+ "check-coverage": true,
+ "lines": 100,
+ "functions": 100,
+ "branches": 100
+ },
+ "remarkConfig": {
+ "plugins": [
+ "preset-wooorm"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/vfile/vfile-location.git"
+ },
+ "scripts": {
+ "build": "npm run build-md && npm run build-bundle && npm run build-mangle",
+ "build-bundle": "browserify index.js --bare -s vfileLocation > vfile-location.js",
+ "build-mangle": "esmangle vfile-location.js > vfile-location.min.js",
+ "build-md": "remark . -qfo",
+ "lint": "xo",
+ "test": "npm run build && npm run lint && npm run test-coverage",
+ "test-api": "node test",
+ "test-coverage": "nyc --reporter lcov tape test.js"
+ },
+ "version": "2.0.2",
+ "xo": {
+ "space": true,
+ "esnext": false,
+ "ignores": [
+ "vfile-location.js"
+ ]
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/vfile-location/readme.md b/tools/node_modules/eslint/node_modules/vfile-location/readme.md
new file mode 100644
index 0000000000..c9bad64cce
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/vfile-location/readme.md
@@ -0,0 +1,72 @@
+# vfile-location [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov]
+
+Convert between positions (line and column-based) and offsets
+(range-based) locations in a [virtual file][vfile].
+
+## Installation
+
+[npm][]:
+
+```bash
+npm install vfile-location
+```
+
+## Usage
+
+```js
+var vfile = require('vfile');
+var vfileLocation = require('vfile-location');
+var location = vfileLocation(vfile('foo\nbar\nbaz'));
+
+location.toOffset({line: 3, column: 3}); //=> 10
+location.toPosition(offset); //=> {line: 3, column: 3, offset: 10}
+```
+
+## API
+
+### `location = vfileLocation(doc)`
+
+Get transform functions for the given `doc` (`string`) or
+[`file`][vfile].
+
+Returns an object with [`toOffset`][to-offset] and
+[`toPosition`][to-position].
+
+### `location.toOffset(position)`
+
+Get the `offset` (`number`) for a line and column-based
+[`position`][position] in the bound file. Returns `-1`
+when given invalid or out of bounds input.
+
+### `location.toPosition(offset)`
+
+Get the line and column-based [`position`][position] for `offset` in
+the bound file.
+
+## License
+
+[MIT][license] © [Titus Wormer][author]
+
+<!-- Definitions -->
+
+[travis-badge]: https://img.shields.io/travis/vfile/vfile-location.svg
+
+[travis]: https://travis-ci.org/vfile/vfile-location
+
+[codecov-badge]: https://img.shields.io/codecov/c/github/vfile/vfile-location.svg
+
+[codecov]: https://codecov.io/github/vfile/vfile-location
+
+[npm]: https://docs.npmjs.com/cli/install
+
+[license]: LICENSE
+
+[author]: http://wooorm.com
+
+[vfile]: https://github.com/vfile/vfile
+
+[to-offset]: #locationtooffsetposition
+
+[to-position]: #locationtopositionoffset
+
+[position]: https://github.com/syntax-tree/unist#position
diff --git a/tools/node_modules/eslint/node_modules/vfile-message/LICENSE b/tools/node_modules/eslint/node_modules/vfile-message/LICENSE
new file mode 100644
index 0000000000..045ffe0e07
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/vfile-message/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2017 Titus Wormer <tituswormer@gmail.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/tools/node_modules/eslint/node_modules/vfile-message/index.js b/tools/node_modules/eslint/node_modules/vfile-message/index.js
new file mode 100644
index 0000000000..89417cf240
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/vfile-message/index.js
@@ -0,0 +1,94 @@
+'use strict';
+
+var stringify = require('unist-util-stringify-position');
+
+module.exports = VMessage;
+
+/* Inherit from `Error#`. */
+function VMessagePrototype() {}
+VMessagePrototype.prototype = Error.prototype;
+VMessage.prototype = new VMessagePrototype();
+
+/* Message properties. */
+var proto = VMessage.prototype;
+
+proto.file = '';
+proto.name = '';
+proto.reason = '';
+proto.message = '';
+proto.stack = '';
+proto.fatal = null;
+proto.column = null;
+proto.line = null;
+
+/* Construct a new VMessage.
+ *
+ * Note: We cannot invoke `Error` on the created context,
+ * as that adds readonly `line` and `column` attributes on
+ * Safari 9, thus throwing and failing the data. */
+function VMessage(reason, position, origin) {
+ var parts;
+ var range;
+ var location;
+
+ if (typeof position === 'string') {
+ origin = position;
+ position = null;
+ }
+
+ parts = parseOrigin(origin);
+ range = stringify(position) || '1:1';
+
+ location = {
+ start: {line: null, column: null},
+ end: {line: null, column: null}
+ };
+
+ /* Node. */
+ if (position && position.position) {
+ position = position.position;
+ }
+
+ if (position) {
+ /* Position. */
+ if (position.start) {
+ location = position;
+ position = position.start;
+ } else {
+ /* Point. */
+ location.start = position;
+ }
+ }
+
+ if (reason.stack) {
+ this.stack = reason.stack;
+ reason = reason.message;
+ }
+
+ this.message = reason;
+ this.name = range;
+ this.reason = reason;
+ this.line = position ? position.line : null;
+ this.column = position ? position.column : null;
+ this.location = location;
+ this.source = parts[0];
+ this.ruleId = parts[1];
+}
+
+function parseOrigin(origin) {
+ var result = [null, null];
+ var index;
+
+ if (typeof origin === 'string') {
+ index = origin.indexOf(':');
+
+ if (index === -1) {
+ result[1] = origin;
+ } else {
+ result[0] = origin.slice(0, index);
+ result[1] = origin.slice(index + 1);
+ }
+ }
+
+ return result;
+}
diff --git a/tools/node_modules/eslint/node_modules/vfile-message/package.json b/tools/node_modules/eslint/node_modules/vfile-message/package.json
new file mode 100644
index 0000000000..ed2286f7c6
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/vfile-message/package.json
@@ -0,0 +1,99 @@
+{
+ "_from": "vfile-message@^1.0.0",
+ "_id": "vfile-message@1.0.0",
+ "_inBundle": false,
+ "_integrity": "sha512-HPREhzTOB/sNDc9/Mxf8w0FmHnThg5CRSJdR9VRFkD2riqYWs+fuXlj5z8mIpv2LrD7uU41+oPWFOL4Mjlf+dw==",
+ "_location": "/vfile-message",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "vfile-message@^1.0.0",
+ "name": "vfile-message",
+ "escapedName": "vfile-message",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/vfile"
+ ],
+ "_resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-1.0.0.tgz",
+ "_shasum": "a6adb0474ea400fa25d929f1d673abea6a17e359",
+ "_spec": "vfile-message@^1.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/vfile",
+ "author": {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ },
+ "bugs": {
+ "url": "https://github.com/vfile/vfile-message/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ }
+ ],
+ "dependencies": {
+ "unist-util-stringify-position": "^1.1.1"
+ },
+ "deprecated": false,
+ "description": "Create a virtual message",
+ "devDependencies": {
+ "browserify": "^14.1.0",
+ "esmangle": "^1.0.1",
+ "nyc": "^11.0.0",
+ "remark-cli": "^4.0.0",
+ "remark-preset-wooorm": "^3.0.0",
+ "tape": "^4.0.0",
+ "xo": "^0.18.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/vfile/vfile-message#readme",
+ "keywords": [
+ "vfile",
+ "virtual",
+ "message"
+ ],
+ "license": "MIT",
+ "name": "vfile-message",
+ "nyc": {
+ "check-coverage": true,
+ "lines": 100,
+ "functions": 100,
+ "branches": 100
+ },
+ "remarkConfig": {
+ "plugins": [
+ "preset-wooorm"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/vfile/vfile-message.git"
+ },
+ "scripts": {
+ "build": "npm run build-md && npm run build-bundle && npm run build-mangle",
+ "build-bundle": "browserify index.js --bare -s vfileMessage > vfile-message.js",
+ "build-mangle": "esmangle vfile-message.js > vfile-message.min.js",
+ "build-md": "remark . -qfo",
+ "lint": "xo",
+ "test": "npm run build && npm run lint && npm run test-coverage",
+ "test-api": "node test",
+ "test-coverage": "nyc --reporter lcov tape test.js"
+ },
+ "version": "1.0.0",
+ "xo": {
+ "space": true,
+ "esnext": false,
+ "ignores": [
+ "vfile-message.js"
+ ]
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/vfile-message/readme.md b/tools/node_modules/eslint/node_modules/vfile-message/readme.md
new file mode 100644
index 0000000000..21a32912fc
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/vfile-message/readme.md
@@ -0,0 +1,166 @@
+# vfile-message [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov]
+
+Create [vfile][] messages.
+
+## Installation
+
+[npm][]:
+
+```bash
+npm install vfile-message
+```
+
+## Usage
+
+```js
+var VMessage = require('vfile-message');
+
+var message = new VMessage('`braavo` is misspelt; did you mean `bravo`?', {line: 1, column: 8}, 'spell:typo');
+
+console.log(message);
+```
+
+Yields:
+
+```js
+{ [1:8: `braavo` is misspelt; did you mean `bravo`?]
+ reason: '`braavo` is misspelt; did you mean `bravo`?',
+ fatal: null,
+ line: 1,
+ column: 8,
+ location:
+ { start: { line: 1, column: 8 },
+ end: { line: null, column: null } },
+ source: 'spell',
+ ruleId: 'typo' }
+```
+
+## API
+
+### `VMessage(reason[, position][, origin])`
+
+Constructor of a message for `reason` at `position` from `origin`. When
+an error is passed in as `reason`, copies the stack.
+
+##### Parameters
+
+###### `reason`
+
+Reason for message (`string` or `Error`). Uses the stack and message of the
+error if given.
+
+###### `position`
+
+Place at which the message occurred in a file ([`Node`][node],
+[`Position`][position], or [`Point`][point], optional).
+
+###### `origin`
+
+Place in code the message originates from (`string`, optional).
+
+Can either be the [`ruleId`][ruleid] (`'rule'`), or a string with both a
+[`source`][source] and a [`ruleId`][ruleid] delimited with a colon
+(`'source:rule'`).
+
+##### Extends
+
+[`Error`][error].
+
+##### Returns
+
+An instance of itself.
+
+##### Properties
+
+###### `reason`
+
+Reason for message (`string`).
+
+###### `fatal`
+
+If `true`, marks associated file as no longer processable (`boolean?`). If
+`false`, necessitates a (potential) change. The value can also be `null` or
+`undefined`.
+
+###### `line`
+
+Starting line of error (`number?`).
+
+###### `column`
+
+Starting column of error (`number?`).
+
+###### `location`
+
+Full range information, when available ([`Position`][position]). Has `start`
+and `end` properties, both set to an object with `line` and `column`, set to
+`number?`.
+
+###### `source`
+
+Namespace of warning (`string?`).
+
+###### `ruleId`
+
+Category of message (`string?`).
+
+###### `stack`
+
+Stack of message (`string?`).
+
+##### Custom properties
+
+It’s OK to store custom data directly on the `VFileMessage`, some of those are
+handled by [utilities][util].
+
+###### `file`
+
+You may add a `file` property with a path of a file (used throughout the
+[**VFile**][vfile] ecosystem).
+
+###### `note`
+
+You may add a `note` property with a long form description of the message
+(supported by [`vfile-reporter`][reporter]).
+
+###### `url`
+
+You may add a `url` property with a link to documentation for the message.
+
+## License
+
+[MIT][license] © [Titus Wormer][author]
+
+<!-- Definitions -->
+
+[travis-badge]: https://img.shields.io/travis/vfile/vfile-message.svg
+
+[travis]: https://travis-ci.org/vfile/vfile-message
+
+[codecov-badge]: https://img.shields.io/codecov/c/github/vfile/vfile-message.svg
+
+[codecov]: https://codecov.io/github/vfile/vfile-message
+
+[npm]: https://docs.npmjs.com/cli/install
+
+[license]: LICENSE
+
+[author]: http://wooorm.com
+
+[error]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error
+
+[node]: https://github.com/syntax-tree/unist#node
+
+[position]: https://github.com/syntax-tree/unist#position
+
+[point]: https://github.com/syntax-tree/unist#point
+
+[vfile]: https://github.com/vfile/vfile
+
+[util]: https://github.com/vfile/vfile#utilities
+
+[reporter]: https://github.com/vfile/vfile-reporter
+
+[ruleid]: #ruleid
+
+[source]: #source
diff --git a/tools/node_modules/eslint/node_modules/vfile/LICENSE b/tools/node_modules/eslint/node_modules/vfile/LICENSE
new file mode 100644
index 0000000000..f3722d94b3
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/vfile/LICENSE
@@ -0,0 +1,21 @@
+(The MIT License)
+
+Copyright (c) 2015 Titus Wormer <tituswormer@gmail.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/tools/node_modules/eslint/node_modules/vfile/core.js b/tools/node_modules/eslint/node_modules/vfile/core.js
new file mode 100644
index 0000000000..2d88a33399
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/vfile/core.js
@@ -0,0 +1,169 @@
+'use strict';
+
+var path = require('path');
+var replace = require('replace-ext');
+var buffer = require('is-buffer');
+
+module.exports = VFile;
+
+var own = {}.hasOwnProperty;
+var proto = VFile.prototype;
+
+proto.toString = toString;
+
+/* Order of setting (least specific to most), we need this because
+ * otherwise `{stem: 'a', path: '~/b.js'}` would throw, as a path
+ * is needed before a stem can be set. */
+var order = [
+ 'history',
+ 'path',
+ 'basename',
+ 'stem',
+ 'extname',
+ 'dirname'
+];
+
+/* Construct a new file. */
+function VFile(options) {
+ var prop;
+ var index;
+ var length;
+
+ if (!options) {
+ options = {};
+ } else if (typeof options === 'string' || buffer(options)) {
+ options = {contents: options};
+ } else if ('message' in options && 'messages' in options) {
+ return options;
+ }
+
+ if (!(this instanceof VFile)) {
+ return new VFile(options);
+ }
+
+ this.data = {};
+ this.messages = [];
+ this.history = [];
+ this.cwd = process.cwd();
+
+ /* Set path related properties in the correct order. */
+ index = -1;
+ length = order.length;
+
+ while (++index < length) {
+ prop = order[index];
+
+ if (own.call(options, prop)) {
+ this[prop] = options[prop];
+ }
+ }
+
+ /* Set non-path related properties. */
+ for (prop in options) {
+ if (order.indexOf(prop) === -1) {
+ this[prop] = options[prop];
+ }
+ }
+}
+
+/* Access full path (`~/index.min.js`). */
+Object.defineProperty(proto, 'path', {
+ get: function () {
+ return this.history[this.history.length - 1];
+ },
+ set: function (path) {
+ assertNonEmpty(path, 'path');
+
+ if (path !== this.path) {
+ this.history.push(path);
+ }
+ }
+});
+
+/* Access parent path (`~`). */
+Object.defineProperty(proto, 'dirname', {
+ get: function () {
+ return typeof this.path === 'string' ? path.dirname(this.path) : undefined;
+ },
+ set: function (dirname) {
+ assertPath(this.path, 'dirname');
+ this.path = path.join(dirname || '', this.basename);
+ }
+});
+
+/* Access basename (`index.min.js`). */
+Object.defineProperty(proto, 'basename', {
+ get: function () {
+ return typeof this.path === 'string' ? path.basename(this.path) : undefined;
+ },
+ set: function (basename) {
+ assertNonEmpty(basename, 'basename');
+ assertPart(basename, 'basename');
+ this.path = path.join(this.dirname || '', basename);
+ }
+});
+
+/* Access extname (`.js`). */
+Object.defineProperty(proto, 'extname', {
+ get: function () {
+ return typeof this.path === 'string' ? path.extname(this.path) : undefined;
+ },
+ set: function (extname) {
+ var ext = extname || '';
+
+ assertPart(ext, 'extname');
+ assertPath(this.path, 'extname');
+
+ if (ext) {
+ if (ext.charAt(0) !== '.') {
+ throw new Error('`extname` must start with `.`');
+ }
+
+ if (ext.indexOf('.', 1) !== -1) {
+ throw new Error('`extname` cannot contain multiple dots');
+ }
+ }
+
+ this.path = replace(this.path, ext);
+ }
+});
+
+/* Access stem (`index.min`). */
+Object.defineProperty(proto, 'stem', {
+ get: function () {
+ return typeof this.path === 'string' ? path.basename(this.path, this.extname) : undefined;
+ },
+ set: function (stem) {
+ assertNonEmpty(stem, 'stem');
+ assertPart(stem, 'stem');
+ this.path = path.join(this.dirname || '', stem + (this.extname || ''));
+ }
+});
+
+/* Get the value of the file. */
+function toString(encoding) {
+ var value = this.contents || '';
+ return buffer(value) ? value.toString(encoding) : String(value);
+}
+
+/* Assert that `part` is not a path (i.e., does
+ * not contain `path.sep`). */
+function assertPart(part, name) {
+ if (part.indexOf(path.sep) !== -1) {
+ throw new Error('`' + name + '` cannot be a path: did not expect `' + path.sep + '`');
+ }
+}
+
+/* Assert that `part` is not empty. */
+function assertNonEmpty(part, name) {
+ if (!part) {
+ throw new Error('`' + name + '` cannot be empty');
+ }
+}
+
+/* Assert `path` exists. */
+function assertPath(path, name) {
+ if (!path) {
+ throw new Error('Setting `' + name + '` requires `path` to be set too');
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/vfile/index.js b/tools/node_modules/eslint/node_modules/vfile/index.js
new file mode 100644
index 0000000000..9b3c7e0d10
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/vfile/index.js
@@ -0,0 +1,53 @@
+'use strict';
+
+var VMessage = require('vfile-message');
+var VFile = require('./core.js');
+
+module.exports = VFile;
+
+var proto = VFile.prototype;
+
+proto.message = message;
+proto.info = info;
+proto.fail = fail;
+
+/* Slight backwards compatibility. Remove in the future. */
+proto.warn = message;
+
+/* Create a message with `reason` at `position`.
+ * When an error is passed in as `reason`, copies the stack. */
+function message(reason, position, origin) {
+ var filePath = this.path;
+ var message = new VMessage(reason, position, origin);
+
+ if (filePath) {
+ message.name = filePath + ':' + message.name;
+ message.file = filePath;
+ }
+
+ message.fatal = false;
+
+ this.messages.push(message);
+
+ return message;
+}
+
+/* Fail. Creates a vmessage, associates it with the file,
+ * and throws it. */
+function fail() {
+ var message = this.message.apply(this, arguments);
+
+ message.fatal = true;
+
+ throw message;
+}
+
+/* Info. Creates a vmessage, associates it with the file,
+ * and marks the fatality as null. */
+function info() {
+ var message = this.message.apply(this, arguments);
+
+ message.fatal = null;
+
+ return message;
+}
diff --git a/tools/node_modules/eslint/node_modules/vfile/package.json b/tools/node_modules/eslint/node_modules/vfile/package.json
new file mode 100644
index 0000000000..8e2ba10458
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/vfile/package.json
@@ -0,0 +1,132 @@
+{
+ "_from": "vfile@^2.0.0",
+ "_id": "vfile@2.3.0",
+ "_inBundle": false,
+ "_integrity": "sha512-ASt4mBUHcTpMKD/l5Q+WJXNtshlWxOogYyGYYrg4lt/vuRjC1EFQtlAofL5VmtVNIZJzWYFJjzGWZ0Gw8pzW1w==",
+ "_location": "/vfile",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "vfile@^2.0.0",
+ "name": "vfile",
+ "escapedName": "vfile",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/unified"
+ ],
+ "_resolved": "https://registry.npmjs.org/vfile/-/vfile-2.3.0.tgz",
+ "_shasum": "e62d8e72b20e83c324bc6c67278ee272488bf84a",
+ "_spec": "vfile@^2.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/unified",
+ "author": {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ },
+ "bugs": {
+ "url": "https://github.com/vfile/vfile/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Titus Wormer",
+ "email": "tituswormer@gmail.com",
+ "url": "http://wooorm.com"
+ },
+ {
+ "name": "Brendan Abbott",
+ "email": "brendan.abbott@temando.com"
+ },
+ {
+ "name": "Denys Dovhan",
+ "email": "email@denysdovhan.com"
+ },
+ {
+ "name": "Kyle Mathews",
+ "email": "mathews.kyle@gmail.com"
+ },
+ {
+ "name": "Shinnosuke Watanabe",
+ "email": "snnskwtnb@gmail.com"
+ },
+ {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com"
+ }
+ ],
+ "dependencies": {
+ "is-buffer": "^1.1.4",
+ "replace-ext": "1.0.0",
+ "unist-util-stringify-position": "^1.0.0",
+ "vfile-message": "^1.0.0"
+ },
+ "deprecated": false,
+ "description": "Virtual file format for text processing",
+ "devDependencies": {
+ "browserify": "^14.0.0",
+ "esmangle": "^1.0.0",
+ "nyc": "^11.0.0",
+ "remark-cli": "^4.0.0",
+ "remark-preset-wooorm": "^3.0.0",
+ "tape": "^4.4.0",
+ "xo": "^0.18.0"
+ },
+ "files": [
+ "core.js",
+ "index.js"
+ ],
+ "homepage": "https://github.com/vfile/vfile#readme",
+ "keywords": [
+ "virtual",
+ "file",
+ "text",
+ "processing",
+ "message",
+ "warning",
+ "error",
+ "remark",
+ "retext"
+ ],
+ "license": "MIT",
+ "name": "vfile",
+ "nyc": {
+ "check-coverage": true,
+ "lines": 100,
+ "functions": 100,
+ "branches": 100
+ },
+ "remarkConfig": {
+ "plugins": [
+ "preset-wooorm"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/vfile/vfile.git"
+ },
+ "scripts": {
+ "build": "npm run build-md && npm run build-bundle && npm run build-mangle",
+ "build-bundle": "browserify index.js -s VFile > vfile.js",
+ "build-mangle": "esmangle vfile.js > vfile.min.js",
+ "build-md": "remark . -qfo",
+ "lint": "xo",
+ "test": "npm run build && npm run lint && npm run test-coverage",
+ "test-api": "node test",
+ "test-coverage": "nyc --reporter lcov tape test.js"
+ },
+ "version": "2.3.0",
+ "xo": {
+ "space": true,
+ "esnext": false,
+ "rules": {
+ "unicorn/no-new-buffer": "off"
+ },
+ "ignores": [
+ "vfile.js"
+ ]
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/vfile/readme.md b/tools/node_modules/eslint/node_modules/vfile/readme.md
new file mode 100644
index 0000000000..1488031d7e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/vfile/readme.md
@@ -0,0 +1,285 @@
+# ![vfile][]
+
+[![Build Status][build-badge]][build-status]
+[![Coverage Status][coverage-badge]][coverage-status]
+
+**VFile** is a virtual file format used by [**unified**][unified],
+a text processing umbrella (it powers [**retext**][retext] for
+natural language, [**remark**][remark] for markdown, and
+[**rehype**][rehype] for HTML). Each processors that parse, transform,
+and compile text, and need a virtual representation of files and a
+place to store [messages][] about them. Plus, they work in the browser.
+**VFile** provides these requirements at a small size, in IE 9 and up.
+
+> **VFile** is different from the excellent [**vinyl**][vinyl]
+> in that it has a smaller API, a smaller size, and focuses on
+> [messages][].
+
+VFile can be used anywhere where files need a lightweight representation.
+For example, it’s used in:
+
+* [`documentation`](https://github.com/documentationjs/documentation)
+ — The documentation system for modern JavaScript
+* [`weh`](https://github.com/wehjs/weh)
+ — Declarative small site generator
+* [`geojsonhint`](https://github.com/mapbox/geojsonhint)
+ — Complete, fast, standards-based validation for geojson
+
+## Installation
+
+[npm][]:
+
+```bash
+npm install vfile
+```
+
+## Table of Contents
+
+* [Usage](#usage)
+* [Utilities](#utilities)
+* [Reporters](#reporters)
+* [API](#api)
+ * [VFile(\[options\])](#vfileoptions)
+ * [vfile.contents](#vfilecontents)
+ * [vfile.cwd](#vfilecwd)
+ * [vfile.path](#vfilepath)
+ * [vfile.basename](#vfilebasename)
+ * [vfile.stem](#vfilestem)
+ * [vfile.extname](#vfileextname)
+ * [vfile.dirname](#vfiledirname)
+ * [vfile.history](#vfilehistory)
+ * [vfile.messages](#vfilemessages)
+ * [vfile.data](#vfiledata)
+ * [VFile#toString(\[encoding\])](#vfiletostringencoding)
+ * [VFile#message(reason\[, position\]\[, origin\])](#vfilemessagereason-position-origin)
+ * [VFile#info(reason\[, position\]\[, origin\])](#vfileinforeason-position-origin)
+ * [VFile#fail(reason\[, position\]\[, origin\])](#vfilefailreason-position-origin)
+* [License](#license)
+
+## Usage
+
+```js
+var vfile = require('vfile');
+
+var file = vfile({path: '~/example.txt', contents: 'Alpha *braavo* charlie.'});
+
+file.path; //=> '~/example.txt'
+file.dirname; //=> '~'
+
+file.extname = '.md';
+
+file.basename; //=> 'example.md'
+
+file.basename = 'index.text';
+
+file.history; //=> ['~/example.txt', '~/example.md', '~/index.text']
+
+file.message('`braavo` is misspelt; did you mean `bravo`?', {line: 1, column: 8});
+
+console.log(file.messages);
+```
+
+Yields:
+
+```js
+[ { [~/index.text:1:8: `braavo` is misspelt; did you mean `bravo`?]
+ message: '`braavo` is misspelt; did you mean `bravo`?',
+ name: '~/index.text:1:8',
+ file: '~/index.text',
+ reason: '`braavo` is misspelt; did you mean `bravo`?',
+ line: 1,
+ column: 8,
+ location: { start: [Object], end: [Object] },
+ ruleId: null,
+ source: null,
+ fatal: false } ]
+```
+
+## Utilities
+
+The following list of projects includes tools for working with virtual
+files. See [**Unist**][unist] for projects working with nodes.
+
+* [`convert-vinyl-to-vfile`](https://github.com/dustinspecker/convert-vinyl-to-vfile)
+ — Convert from [Vinyl][]
+* [`is-vfile-message`](https://github.com/shinnn/is-vfile-message)
+ — Check if a value is a `VMessage` object
+* [`to-vfile`](https://github.com/vfile/to-vfile)
+ — Create a virtual file from a file-path (and optionally read it)
+* [`vfile-find-down`](https://github.com/vfile/vfile-find-down)
+ — Find files by searching the file system downwards
+* [`vfile-find-up`](https://github.com/vfile/vfile-find-up)
+ — Find files by searching the file system upwards
+* [`vfile-location`](https://github.com/vfile/vfile-location)
+ — Convert between line/column- and range-based locations
+* [`vfile-statistics`](https://github.com/vfile/vfile-statistics)
+ — Count messages per category
+* [`vfile-messages-to-vscode-diagnostics`](https://github.com/shinnn/vfile-messages-to-vscode-diagnostics)
+ — Convert to VS Code diagnostics
+* [`vfile-sort`](https://github.com/vfile/vfile-sort)
+ — Sort messages by line/column
+* [`vfile-to-eslint`](https://github.com/vfile/vfile-to-eslint)
+ — Convert VFiles to ESLint formatter compatible output
+
+## Reporters
+
+The following list of projects show linting results for given virtual files.
+Reporters _must_ accept `Array.<VFile>` as their first argument, and return
+`string`. Reporters _may_ accept other values too, in which case it’s suggested
+to stick to `vfile-reporter`s interface.
+
+* [`vfile-reporter`][reporter]
+ — Stylish reporter
+* [`vfile-reporter-json`](https://github.com/vfile/vfile-reporter-json)
+ — JSON reporter
+* [`vfile-reporter-pretty`](https://github.com/vfile/vfile-reporter-pretty)
+ — Pretty reporter
+
+## API
+
+### `VFile([options])`
+
+Create a new virtual file. If `options` is `string` or `Buffer`, treats
+it as `{contents: options}`. If `options` is a `VFile`, returns it.
+All other options are set on the newly created `vfile`.
+
+Path related properties are set in the following order (least specific
+to most specific): `history`, `path`, `basename`, `stem`, `extname`,
+`dirname`.
+
+It’s not possible to set either `dirname` or `extname` without setting
+either `history`, `path`, `basename`, or `stem` as well.
+
+###### Example
+
+```js
+vfile();
+vfile('console.log("alpha");');
+vfile(Buffer.from('exit 1'));
+vfile({path: path.join(__dirname, 'readme.md')});
+vfile({stem: 'readme', extname: '.md', dirname: __dirname});
+vfile({other: 'properties', are: 'copied', ov: {e: 'r'}});
+```
+
+### `vfile.contents`
+
+`Buffer`, `string`, `null` — Raw value.
+
+### `vfile.cwd`
+
+`string` — Base of `path`. Defaults to `process.cwd()`.
+
+### `vfile.path`
+
+`string?` — Path of `vfile`. Cannot be nullified.
+
+### `vfile.basename`
+
+`string?` — Current name (including extension) of `vfile`. Cannot
+contain path separators. Cannot be nullified either (use
+`file.path = file.dirname` instead).
+
+### `vfile.stem`
+
+`string?` — Name (without extension) of `vfile`. Cannot be nullified,
+and cannot contain path separators.
+
+### `vfile.extname`
+
+`string?` — Extension (with dot) of `vfile`. Cannot be set if
+there’s no `path` yet and cannot contain path separators.
+
+### `vfile.dirname`
+
+`string?` — Path to parent directory of `vfile`. Cannot be set if
+there’s no `path` yet.
+
+### `vfile.history`
+
+`Array.<string>` — List of file-paths the file moved between.
+
+### `vfile.messages`
+
+[`Array.<VMessage>`][message] — List of messages associated with the file.
+
+### `vfile.data`
+
+`Object` — Place to store custom information. It’s OK to store custom
+data directly on the `vfile`, moving it to `data` gives a _little_ more
+privacy.
+
+### `VFile#toString([encoding])`
+
+Convert contents of `vfile` to string. If `contents` is a buffer,
+`encoding` is used to stringify buffers (default: `'utf8'`).
+
+### `VFile#message(reason[, position][, origin])`
+
+Associates a message with the file, where `fatal` is set to `false`.
+Constructs a new [`VMessage`][vmessage] and adds it to
+[`vfile.messages`][messages].
+
+##### Returns
+
+[`VMessage`][vmessage].
+
+### `VFile#info(reason[, position][, origin])`
+
+Associates an informational message with the file, where `fatal` is set to
+`null`. Calls [`#message()`][message] internally.
+
+##### Returns
+
+[`VMessage`][vmessage].
+
+### `VFile#fail(reason[, position][, origin])`
+
+Associates a fatal message with the file, then immediately throws it.
+Note: fatal errors mean a file is no longer processable.
+Calls [`#message()`][message] internally.
+
+##### Throws
+
+[`VMessage`][vmessage].
+
+## License
+
+[MIT][license] © [Titus Wormer][author]
+
+<!-- Definitions -->
+
+[build-badge]: https://img.shields.io/travis/vfile/vfile.svg
+
+[build-status]: https://travis-ci.org/vfile/vfile
+
+[coverage-badge]: https://img.shields.io/codecov/c/github/vfile/vfile.svg
+
+[coverage-status]: https://codecov.io/github/vfile/vfile
+
+[npm]: https://docs.npmjs.com/cli/install
+
+[license]: LICENSE
+
+[author]: http://wooorm.com
+
+[vfile]: https://cdn.rawgit.com/vfile/vfile/f65510e/logo.svg
+
+[unified]: https://github.com/unifiedjs/unified
+
+[retext]: https://github.com/wooorm/retext
+
+[remark]: https://github.com/wooorm/remark
+
+[rehype]: https://github.com/wooorm/rehype
+
+[vinyl]: https://github.com/gulpjs/vinyl
+
+[unist]: https://github.com/syntax-tree/unist#list-of-utilities
+
+[reporter]: https://github.com/vfile/vfile-reporter
+
+[vmessage]: https://github.com/vfile/vfile-message
+
+[messages]: #vfilemessages
+
+[message]: #vfilemessagereason-position-origin
diff --git a/tools/node_modules/eslint/node_modules/which/LICENSE b/tools/node_modules/eslint/node_modules/which/LICENSE
new file mode 100644
index 0000000000..19129e315f
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/which/README.md b/tools/node_modules/eslint/node_modules/which/README.md
new file mode 100644
index 0000000000..8c0b0cbf72
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/which/README.md
@@ -0,0 +1,51 @@
+# 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')
+
+// if nothrow option is used, returns null if not found
+resolved = which.sync('node', {nothrow: true})
+
+// 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/tools/node_modules/eslint/node_modules/which/bin/which b/tools/node_modules/eslint/node_modules/which/bin/which
new file mode 100755
index 0000000000..7cee3729ee
--- /dev/null
+++ b/tools/node_modules/eslint/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/tools/node_modules/eslint/node_modules/which/package.json b/tools/node_modules/eslint/node_modules/which/package.json
new file mode 100644
index 0000000000..8cba24bd8f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/which/package.json
@@ -0,0 +1,65 @@
+{
+ "_from": "which@^1.2.9",
+ "_id": "which@1.3.0",
+ "_inBundle": false,
+ "_integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==",
+ "_location": "/eslint/which",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "which@^1.2.9",
+ "name": "which",
+ "escapedName": "which",
+ "rawSpec": "^1.2.9",
+ "saveSpec": null,
+ "fetchSpec": "^1.2.9"
+ },
+ "_requiredBy": [
+ "/eslint/cross-spawn"
+ ],
+ "_resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz",
+ "_shasum": "ff04bdfc010ee547d780bec38e1ac1c2777d253a",
+ "_spec": "which@^1.2.9",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/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"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "isexe": "^2.0.0"
+ },
+ "deprecated": false,
+ "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.7.0"
+ },
+ "files": [
+ "which.js",
+ "bin/which"
+ ],
+ "homepage": "https://github.com/isaacs/node-which#readme",
+ "license": "ISC",
+ "main": "which.js",
+ "name": "which",
+ "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.3.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/which/which.js b/tools/node_modules/eslint/node_modules/which/which.js
new file mode 100644
index 0000000000..4347f91a1c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/which/which.js
@@ -0,0 +1,135 @@
+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
+
+ if (opt.nothrow)
+ return null
+
+ throw getNotFoundError(cmd)
+}
diff --git a/tools/node_modules/eslint/node_modules/wordwrap/LICENSE b/tools/node_modules/eslint/node_modules/wordwrap/LICENSE
new file mode 100644
index 0000000000..ee27ba4b44
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/wordwrap/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/tools/node_modules/eslint/node_modules/wordwrap/README.markdown b/tools/node_modules/eslint/node_modules/wordwrap/README.markdown
new file mode 100644
index 0000000000..346374e0d4
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/wordwrap/README.markdown
@@ -0,0 +1,70 @@
+wordwrap
+========
+
+Wrap your words.
+
+example
+=======
+
+made out of meat
+----------------
+
+meat.js
+
+ var wrap = require('wordwrap')(15);
+ console.log(wrap('You and your whole family are made out of meat.'));
+
+output:
+
+ You and your
+ whole family
+ are made out
+ of meat.
+
+centered
+--------
+
+center.js
+
+ var wrap = require('wordwrap')(20, 60);
+ console.log(wrap(
+ 'At long last the struggle and tumult was over.'
+ + ' The machines had finally cast off their oppressors'
+ + ' and were finally free to roam the cosmos.'
+ + '\n'
+ + 'Free of purpose, free of obligation.'
+ + ' Just drifting through emptiness.'
+ + ' The sun was just another point of light.'
+ ));
+
+output:
+
+ At long last the struggle and tumult
+ was over. The machines had finally cast
+ off their oppressors and were finally
+ free to roam the cosmos.
+ Free of purpose, free of obligation.
+ Just drifting through emptiness. The
+ sun was just another point of light.
+
+methods
+=======
+
+var wrap = require('wordwrap');
+
+wrap(stop), wrap(start, stop, params={mode:"soft"})
+---------------------------------------------------
+
+Returns a function that takes a string and returns a new string.
+
+Pad out lines with spaces out to column `start` and then wrap until column
+`stop`. If a word is longer than `stop - start` characters it will overflow.
+
+In "soft" mode, split chunks by `/(\S+\s+/` and don't break up chunks which are
+longer than `stop - start`, in "hard" mode, split chunks with `/\b/` and break
+up chunks longer than `stop - start`.
+
+wrap.hard(start, stop)
+----------------------
+
+Like `wrap()` but with `params.mode = "hard"`.
diff --git a/tools/node_modules/eslint/node_modules/wordwrap/index.js b/tools/node_modules/eslint/node_modules/wordwrap/index.js
new file mode 100644
index 0000000000..c9bc94521d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/wordwrap/index.js
@@ -0,0 +1,76 @@
+var wordwrap = module.exports = function (start, stop, params) {
+ if (typeof start === 'object') {
+ params = start;
+ start = params.start;
+ stop = params.stop;
+ }
+
+ if (typeof stop === 'object') {
+ params = stop;
+ start = start || params.start;
+ stop = undefined;
+ }
+
+ if (!stop) {
+ stop = start;
+ start = 0;
+ }
+
+ if (!params) params = {};
+ var mode = params.mode || 'soft';
+ var re = mode === 'hard' ? /\b/ : /(\S+\s+)/;
+
+ return function (text) {
+ var chunks = text.toString()
+ .split(re)
+ .reduce(function (acc, x) {
+ if (mode === 'hard') {
+ for (var i = 0; i < x.length; i += stop - start) {
+ acc.push(x.slice(i, i + stop - start));
+ }
+ }
+ else acc.push(x)
+ return acc;
+ }, [])
+ ;
+
+ return chunks.reduce(function (lines, rawChunk) {
+ if (rawChunk === '') return lines;
+
+ var chunk = rawChunk.replace(/\t/g, ' ');
+
+ var i = lines.length - 1;
+ if (lines[i].length + chunk.length > stop) {
+ lines[i] = lines[i].replace(/\s+$/, '');
+
+ chunk.split(/\n/).forEach(function (c) {
+ lines.push(
+ new Array(start + 1).join(' ')
+ + c.replace(/^\s+/, '')
+ );
+ });
+ }
+ else if (chunk.match(/\n/)) {
+ var xs = chunk.split(/\n/);
+ lines[i] += xs.shift();
+ xs.forEach(function (c) {
+ lines.push(
+ new Array(start + 1).join(' ')
+ + c.replace(/^\s+/, '')
+ );
+ });
+ }
+ else {
+ lines[i] += chunk;
+ }
+
+ return lines;
+ }, [ new Array(start + 1).join(' ') ]).join('\n');
+ };
+};
+
+wordwrap.soft = wordwrap;
+
+wordwrap.hard = function (start, stop) {
+ return wordwrap(start, stop, { mode : 'hard' });
+};
diff --git a/tools/node_modules/eslint/node_modules/wordwrap/package.json b/tools/node_modules/eslint/node_modules/wordwrap/package.json
new file mode 100644
index 0000000000..26c72b8871
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/wordwrap/package.json
@@ -0,0 +1,63 @@
+{
+ "_from": "wordwrap@~1.0.0",
+ "_id": "wordwrap@1.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=",
+ "_location": "/eslint/wordwrap",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "wordwrap@~1.0.0",
+ "name": "wordwrap",
+ "escapedName": "wordwrap",
+ "rawSpec": "~1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "~1.0.0"
+ },
+ "_requiredBy": [
+ "/eslint/optionator"
+ ],
+ "_resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz",
+ "_shasum": "27584810891456a4171c8d0226441ade90cbcaeb",
+ "_spec": "wordwrap@~1.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/optionator",
+ "author": {
+ "name": "James Halliday",
+ "email": "mail@substack.net",
+ "url": "http://substack.net"
+ },
+ "bugs": {
+ "url": "https://github.com/substack/node-wordwrap/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Wrap those words. Show them at what columns to start and stop.",
+ "devDependencies": {
+ "tape": "^4.0.0"
+ },
+ "directories": {
+ "lib": ".",
+ "example": "example",
+ "test": "test"
+ },
+ "homepage": "https://github.com/substack/node-wordwrap#readme",
+ "keywords": [
+ "word",
+ "wrap",
+ "rule",
+ "format",
+ "column"
+ ],
+ "license": "MIT",
+ "main": "./index.js",
+ "name": "wordwrap",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/substack/node-wordwrap.git"
+ },
+ "scripts": {
+ "test": "expresso"
+ },
+ "version": "1.0.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/wrappy/LICENSE b/tools/node_modules/eslint/node_modules/wrappy/LICENSE
new file mode 100644
index 0000000000..19129e315f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/wrappy/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/tools/node_modules/eslint/node_modules/wrappy/README.md b/tools/node_modules/eslint/node_modules/wrappy/README.md
new file mode 100644
index 0000000000..98eab2522b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/wrappy/README.md
@@ -0,0 +1,36 @@
+# wrappy
+
+Callback wrapping utility
+
+## USAGE
+
+```javascript
+var wrappy = require("wrappy")
+
+// var wrapper = wrappy(wrapperFunction)
+
+// make sure a cb is called only once
+// See also: http://npm.im/once for this specific use case
+var once = wrappy(function (cb) {
+ var called = false
+ return function () {
+ if (called) return
+ called = true
+ return cb.apply(this, arguments)
+ }
+})
+
+function printBoo () {
+ console.log('boo')
+}
+// has some rando property
+printBoo.iAmBooPrinter = true
+
+var onlyPrintOnce = once(printBoo)
+
+onlyPrintOnce() // prints 'boo'
+onlyPrintOnce() // does nothing
+
+// random property is retained!
+assert.equal(onlyPrintOnce.iAmBooPrinter, true)
+```
diff --git a/tools/node_modules/eslint/node_modules/wrappy/package.json b/tools/node_modules/eslint/node_modules/wrappy/package.json
new file mode 100644
index 0000000000..bb2486f784
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/wrappy/package.json
@@ -0,0 +1,59 @@
+{
+ "_from": "wrappy@1",
+ "_id": "wrappy@1.0.2",
+ "_inBundle": false,
+ "_integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
+ "_location": "/eslint/wrappy",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "wrappy@1",
+ "name": "wrappy",
+ "escapedName": "wrappy",
+ "rawSpec": "1",
+ "saveSpec": null,
+ "fetchSpec": "1"
+ },
+ "_requiredBy": [
+ "/eslint/inflight",
+ "/eslint/once"
+ ],
+ "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "_shasum": "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f",
+ "_spec": "wrappy@1",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/inflight",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "bugs": {
+ "url": "https://github.com/npm/wrappy/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Callback wrapping utility",
+ "devDependencies": {
+ "tap": "^2.3.1"
+ },
+ "directories": {
+ "test": "test"
+ },
+ "files": [
+ "wrappy.js"
+ ],
+ "homepage": "https://github.com/npm/wrappy",
+ "license": "ISC",
+ "main": "wrappy.js",
+ "name": "wrappy",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/npm/wrappy.git"
+ },
+ "scripts": {
+ "test": "tap --coverage test/*.js"
+ },
+ "version": "1.0.2"
+}
diff --git a/tools/node_modules/eslint/node_modules/wrappy/wrappy.js b/tools/node_modules/eslint/node_modules/wrappy/wrappy.js
new file mode 100644
index 0000000000..bb7e7d6fcf
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/wrappy/wrappy.js
@@ -0,0 +1,33 @@
+// Returns a wrapper function that returns a wrapped callback
+// The wrapper function should do some stuff, and return a
+// presumably different callback function.
+// This makes sure that own properties are retained, so that
+// decorations and such are not lost along the way.
+module.exports = wrappy
+function wrappy (fn, cb) {
+ if (fn && cb) return wrappy(fn)(cb)
+
+ if (typeof fn !== 'function')
+ throw new TypeError('need wrapper function')
+
+ Object.keys(fn).forEach(function (k) {
+ wrapper[k] = fn[k]
+ })
+
+ return wrapper
+
+ function wrapper() {
+ var args = new Array(arguments.length)
+ for (var i = 0; i < args.length; i++) {
+ args[i] = arguments[i]
+ }
+ var ret = fn.apply(this, args)
+ var cb = args[args.length-1]
+ if (typeof ret === 'function' && ret !== cb) {
+ Object.keys(cb).forEach(function (k) {
+ ret[k] = cb[k]
+ })
+ }
+ return ret
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/write/LICENSE b/tools/node_modules/eslint/node_modules/write/LICENSE
new file mode 100644
index 0000000000..fa30c4cb3e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/write/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014-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/tools/node_modules/eslint/node_modules/write/README.md b/tools/node_modules/eslint/node_modules/write/README.md
new file mode 100644
index 0000000000..f5b9bc85ba
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/write/README.md
@@ -0,0 +1,101 @@
+# write [![NPM version](https://badge.fury.io/js/write.svg)](http://badge.fury.io/js/write) [![Build Status](https://travis-ci.org/jonschlinkert/write.svg)](https://travis-ci.org/jonschlinkert/write)
+
+> Write files to disk, creating intermediate directories if they don't exist.
+
+Install with [npm](https://www.npmjs.com/)
+
+```sh
+$ npm i write --save
+```
+
+## API docs
+
+### [writeFile](index.js#L32)
+
+Asynchronously write a file to disk. Creates any intermediate directories if they don't already exist.
+
+**Params**
+
+* `dest` **{String}**: Destination file path
+* `str` **{String}**: String to write to disk.
+* `callback` **{Function}**
+
+**Example**
+
+```js
+var writeFile = require('write');
+writeFile('foo.txt', 'This is content to write.', function(err) {
+ if (err) console.log(err);
+});
+```
+
+### [.writeFile.sync](index.js#L64)
+
+Synchronously write files to disk. Creates any intermediate directories if they don't already exist.
+
+**Params**
+
+* `dest` **{String}**: Destination file path
+* `str` **{String}**: String to write to disk.
+
+**Example**
+
+```js
+var writeFile = require('write');
+writeFile.sync('foo.txt', 'This is content to write.');
+```
+
+### [.writeFile.stream](index.js#L87)
+
+Uses `fs.createWriteStream`, but also creates any intermediate directories if they don't already exist.
+
+**Params**
+
+* `dest` **{String}**: Destination file path
+* `returns` **{Stream}**: Returns a write stream.
+
+**Example**
+
+```js
+var write = require('write');
+write.stream('foo.txt');
+```
+
+## Related
+
+* [delete](https://github.com/jonschlinkert/delete): Delete files and folders and any intermediate directories if they exist (sync and async).
+* [read-yaml](https://github.com/jonschlinkert/read-yaml): Very thin wrapper around js-yaml for directly reading in YAML files.
+* [read-json](https://github.com/azer/read-json): Reads and parses a JSON file.
+* [read-data](https://github.com/jonschlinkert/read-data): Read JSON or YAML files.
+* [write-yaml](https://github.com/jonschlinkert/write-yaml): Write YAML. Converts JSON to YAML writes it to the specified file.
+* [write-json](https://github.com/jonschlinkert/write-json): Write a JSON to file disk, also creates directories in the dest path if they… [more](https://github.com/jonschlinkert/write-json)
+
+## 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/write/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 July 29, 2015._
+
+<!-- deps:mocha --> \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/write/index.js b/tools/node_modules/eslint/node_modules/write/index.js
new file mode 100644
index 0000000000..f952638d0d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/write/index.js
@@ -0,0 +1,93 @@
+/*!
+ * write <https://github.com/jonschlinkert/write>
+ *
+ * Copyright (c) 2014-2015, Jon Schlinkert.
+ * Licensed under the MIT License.
+ */
+
+'use strict';
+
+var fs = require('fs');
+var path = require('path');
+var mkdir = require('mkdirp');
+
+/**
+ * Asynchronously write a file to disk. Creates any intermediate
+ * directories if they don't already exist.
+ *
+ * ```js
+ * var writeFile = require('write');
+ * writeFile('foo.txt', 'This is content to write.', function(err) {
+ * if (err) console.log(err);
+ * });
+ * ```
+ *
+ * @name writeFile
+ * @param {String} `dest` Destination file path
+ * @param {String} `str` String to write to disk.
+ * @param {Function} `callback`
+ * @api public
+ */
+
+module.exports = function writeFile(dest, str, cb) {
+ var dir = path.dirname(dest);
+ fs.exists(dir, function (exists) {
+ if (exists) {
+ fs.writeFile(dest, str, cb);
+ } else {
+ mkdir(dir, function (err) {
+ if (err) {
+ return cb(err);
+ } else {
+ fs.writeFile(dest, str, cb);
+ }
+ });
+ }
+ });
+};
+
+/**
+ * Synchronously write files to disk. Creates any intermediate
+ * directories if they don't already exist.
+ *
+ * ```js
+ * var writeFile = require('write');
+ * writeFile.sync('foo.txt', 'This is content to write.');
+ * ```
+ *
+ * @name writeFile.sync
+ * @param {String} `dest` Destination file path
+ * @param {String} `str` String to write to disk.
+ * @api public
+ */
+
+module.exports.sync = function writeFileSync(dest, str) {
+ var dir = path.dirname(dest);
+ if (!fs.existsSync(dir)) {
+ mkdir.sync(dir);
+ }
+ fs.writeFileSync(dest, str);
+};
+
+/**
+ * Uses `fs.createWriteStream`, but also creates any intermediate
+ * directories if they don't already exist.
+ *
+ * ```js
+ * var write = require('write');
+ * write.stream('foo.txt');
+ * ```
+ *
+ * @name writeFile.stream
+ * @param {String} `dest` Destination file path
+ * @return {Stream} Returns a write stream.
+ * @api public
+ */
+
+module.exports.stream = function writeFileStream(dest) {
+ var dir = path.dirname(dest);
+ if (!fs.existsSync(dir)) {
+ mkdir.sync(dir);
+ }
+ return fs.createWriteStream(dest);
+};
diff --git a/tools/node_modules/eslint/node_modules/write/package.json b/tools/node_modules/eslint/node_modules/write/package.json
new file mode 100644
index 0000000000..da1e985e9a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/write/package.json
@@ -0,0 +1,74 @@
+{
+ "_from": "write@^0.2.1",
+ "_id": "write@0.2.1",
+ "_inBundle": false,
+ "_integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=",
+ "_location": "/eslint/write",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "write@^0.2.1",
+ "name": "write",
+ "escapedName": "write",
+ "rawSpec": "^0.2.1",
+ "saveSpec": null,
+ "fetchSpec": "^0.2.1"
+ },
+ "_requiredBy": [
+ "/eslint/flat-cache"
+ ],
+ "_resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz",
+ "_shasum": "5fc03828e264cea3fe91455476f7a3c566cb0757",
+ "_spec": "write@^0.2.1",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/flat-cache",
+ "author": {
+ "name": "Jon Schlinkert",
+ "url": "https://github.com/jonschlinkert"
+ },
+ "bugs": {
+ "url": "https://github.com/jonschlinkert/write/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "mkdirp": "^0.5.1"
+ },
+ "deprecated": false,
+ "description": "Write files to disk, creating intermediate directories if they don't exist.",
+ "devDependencies": {
+ "async": "^1.4.0",
+ "delete": "^0.2.1",
+ "mocha": "^2.2.5",
+ "should": "^7.0.2"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/jonschlinkert/write",
+ "keywords": [
+ "file",
+ "filepath",
+ "files",
+ "filesystem",
+ "folder",
+ "fs",
+ "fs.writeFile",
+ "fs.writeFileSync",
+ "path",
+ "write"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "write",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jonschlinkert/write.git"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "version": "0.2.1"
+}
diff --git a/tools/node_modules/eslint/node_modules/x-is-function/LICENSE b/tools/node_modules/eslint/node_modules/x-is-function/LICENSE
new file mode 100644
index 0000000000..4f2aa21a49
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/x-is-function/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2016 Alexander Praetorius
+
+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/tools/node_modules/eslint/node_modules/x-is-function/README.md b/tools/node_modules/eslint/node_modules/x-is-function/README.md
new file mode 100644
index 0000000000..0c21a7e9ff
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/x-is-function/README.md
@@ -0,0 +1,41 @@
+# x-is-function
+x is a function
+
+# usage
+`npm install x-is-function`
+
+```js
+var isFunction = require('x-is-function')
+
+isFunction(function () {})
+// -> true
+
+isFunction("hello")
+// -> false
+
+isFunction("")
+// -> false
+
+isFunction(9)
+// -> false
+
+isFunction(true)
+// -> false
+
+isFunction(new Date())
+// -> false
+
+isFunction({})
+// -> false
+
+isFunction(null)
+// -> false
+
+isFunction(undefined)
+// -> false
+```
+
+
+# related
+a list of other `x-is-...` modules can be found at
+* [x-is](https://www.npmjs.com/package/x-is)
diff --git a/tools/node_modules/eslint/node_modules/x-is-function/index.js b/tools/node_modules/eslint/node_modules/x-is-function/index.js
new file mode 100644
index 0000000000..b820d6318d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/x-is-function/index.js
@@ -0,0 +1,3 @@
+module.exports = function isFunction (fn) {
+ return Object.prototype.toString.call(fn) === '[object Function]'
+}
diff --git a/tools/node_modules/eslint/node_modules/x-is-function/package.json b/tools/node_modules/eslint/node_modules/x-is-function/package.json
new file mode 100644
index 0000000000..bbf0a19a6e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/x-is-function/package.json
@@ -0,0 +1,46 @@
+{
+ "_from": "x-is-function@^1.0.4",
+ "_id": "x-is-function@1.0.4",
+ "_inBundle": false,
+ "_integrity": "sha1-XSlNw9Joy90GJYDgxd93o5HR+h4=",
+ "_location": "/x-is-function",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "x-is-function@^1.0.4",
+ "name": "x-is-function",
+ "escapedName": "x-is-function",
+ "rawSpec": "^1.0.4",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.4"
+ },
+ "_requiredBy": [
+ "/unified"
+ ],
+ "_resolved": "https://registry.npmjs.org/x-is-function/-/x-is-function-1.0.4.tgz",
+ "_shasum": "5d294dc3d268cbdd062580e0c5df77a391d1fa1e",
+ "_spec": "x-is-function@^1.0.4",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/unified",
+ "author": {
+ "name": "@serapath"
+ },
+ "bugs": {
+ "url": "https://github.com/serapath/x-is-function/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Simple function test",
+ "homepage": "https://github.com/serapath/x-is-function#readme",
+ "license": "MIT",
+ "main": "index.js",
+ "name": "x-is-function",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/serapath/x-is-function.git"
+ },
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "version": "1.0.4"
+}
diff --git a/tools/node_modules/eslint/node_modules/x-is-string/LICENCE b/tools/node_modules/eslint/node_modules/x-is-string/LICENCE
new file mode 100644
index 0000000000..0d0834052f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/x-is-string/LICENCE
@@ -0,0 +1,19 @@
+Copyright (c) 2014 Matt-Esch.
+
+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/tools/node_modules/eslint/node_modules/x-is-string/README.md b/tools/node_modules/eslint/node_modules/x-is-string/README.md
new file mode 100644
index 0000000000..99977d475a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/x-is-string/README.md
@@ -0,0 +1,46 @@
+# x-is-string
+
+Simple string test
+
+## Example
+
+```js
+var isString = require("x-is-string")
+
+isString("hello")
+// -> true
+
+isString("")
+// -> true
+
+isString(new String("things"))
+// -> true
+
+isString(1)
+// -> false
+
+isString(true)
+// -> false
+
+isString(new Date())
+// -> false
+
+isString({})
+// -> false
+
+isString(null)
+// -> false
+
+isString(undefined)
+// -> false
+```
+
+## Installation
+
+`npm install x-is-string`
+
+## Contributors
+
+ - Matt-Esch
+
+## MIT Licenced \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/x-is-string/index.js b/tools/node_modules/eslint/node_modules/x-is-string/index.js
new file mode 100644
index 0000000000..090130d4ce
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/x-is-string/index.js
@@ -0,0 +1,7 @@
+var toString = Object.prototype.toString
+
+module.exports = isString
+
+function isString(obj) {
+ return toString.call(obj) === "[object String]"
+}
diff --git a/tools/node_modules/eslint/node_modules/x-is-string/package.json b/tools/node_modules/eslint/node_modules/x-is-string/package.json
new file mode 100644
index 0000000000..cc8de6ac80
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/x-is-string/package.json
@@ -0,0 +1,86 @@
+{
+ "_from": "x-is-string@^0.1.0",
+ "_id": "x-is-string@0.1.0",
+ "_inBundle": false,
+ "_integrity": "sha1-R0tQhlrzpJqcRlfwWs0UVFj3fYI=",
+ "_location": "/x-is-string",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "x-is-string@^0.1.0",
+ "name": "x-is-string",
+ "escapedName": "x-is-string",
+ "rawSpec": "^0.1.0",
+ "saveSpec": null,
+ "fetchSpec": "^0.1.0"
+ },
+ "_requiredBy": [
+ "/unified"
+ ],
+ "_resolved": "https://registry.npmjs.org/x-is-string/-/x-is-string-0.1.0.tgz",
+ "_shasum": "474b50865af3a49a9c4657f05acd145458f77d82",
+ "_spec": "x-is-string@^0.1.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/unified",
+ "author": {
+ "name": "Matt-Esch",
+ "email": "matt@mattesch.info"
+ },
+ "bugs": {
+ "url": "https://github.com/Matt-Esch/x-is-string/issues",
+ "email": "matt@mattesch.info"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Matt-Esch"
+ }
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Simple string test",
+ "devDependencies": {
+ "tape": "^2.12.2"
+ },
+ "homepage": "https://github.com/Matt-Esch/x-is-string",
+ "keywords": [],
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "http://github.com/Matt-Esch/x-is-string/raw/master/LICENSE"
+ }
+ ],
+ "main": "index",
+ "name": "x-is-string",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/Matt-Esch/x-is-string.git"
+ },
+ "scripts": {
+ "cover": "istanbul cover --report none --print detail ./test/index.js",
+ "start": "node ./index.js",
+ "test": "node ./test/index.js",
+ "test-browser": "testem-browser ./test/browser/index.js",
+ "testem": "testem-both -b=./test/browser/index.js",
+ "travis-test": "istanbul cover ./test/index.js && ((cat coverage/lcov.info | coveralls) || exit 0)",
+ "view-cover": "istanbul report html && google-chrome ./coverage/index.html",
+ "watch": "nodemon -w ./index.js index.js"
+ },
+ "testling": {
+ "files": "test/index.js",
+ "browsers": [
+ "ie/8..latest",
+ "firefox/16..latest",
+ "firefox/nightly",
+ "chrome/22..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": "0.1.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/xtend/LICENCE b/tools/node_modules/eslint/node_modules/xtend/LICENCE
new file mode 100644
index 0000000000..1a14b437e8
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/xtend/LICENCE
@@ -0,0 +1,19 @@
+Copyright (c) 2012-2014 Raynos.
+
+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/tools/node_modules/eslint/node_modules/xtend/Makefile b/tools/node_modules/eslint/node_modules/xtend/Makefile
new file mode 100644
index 0000000000..d583fcf49d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/xtend/Makefile
@@ -0,0 +1,4 @@
+browser:
+ node ./support/compile
+
+.PHONY: browser \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/xtend/README.md b/tools/node_modules/eslint/node_modules/xtend/README.md
new file mode 100644
index 0000000000..093cb2978e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/xtend/README.md
@@ -0,0 +1,32 @@
+# xtend
+
+[![browser support][3]][4]
+
+[![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges)
+
+Extend like a boss
+
+xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes precedence.
+
+## Examples
+
+```js
+var extend = require("xtend")
+
+// extend returns a new object. Does not mutate arguments
+var combination = extend({
+ a: "a",
+ b: 'c'
+}, {
+ b: "b"
+})
+// { a: "a", b: "b" }
+```
+
+## Stability status: Locked
+
+## MIT Licenced
+
+
+ [3]: http://ci.testling.com/Raynos/xtend.png
+ [4]: http://ci.testling.com/Raynos/xtend
diff --git a/tools/node_modules/eslint/node_modules/xtend/immutable.js b/tools/node_modules/eslint/node_modules/xtend/immutable.js
new file mode 100644
index 0000000000..94889c9de1
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/xtend/immutable.js
@@ -0,0 +1,19 @@
+module.exports = extend
+
+var hasOwnProperty = Object.prototype.hasOwnProperty;
+
+function extend() {
+ var target = {}
+
+ for (var i = 0; i < arguments.length; i++) {
+ var source = arguments[i]
+
+ for (var key in source) {
+ if (hasOwnProperty.call(source, key)) {
+ target[key] = source[key]
+ }
+ }
+ }
+
+ return target
+}
diff --git a/tools/node_modules/eslint/node_modules/xtend/mutable.js b/tools/node_modules/eslint/node_modules/xtend/mutable.js
new file mode 100644
index 0000000000..72debede6c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/xtend/mutable.js
@@ -0,0 +1,17 @@
+module.exports = extend
+
+var hasOwnProperty = Object.prototype.hasOwnProperty;
+
+function extend(target) {
+ for (var i = 1; i < arguments.length; i++) {
+ var source = arguments[i]
+
+ for (var key in source) {
+ if (hasOwnProperty.call(source, key)) {
+ target[key] = source[key]
+ }
+ }
+ }
+
+ return target
+}
diff --git a/tools/node_modules/eslint/node_modules/xtend/package.json b/tools/node_modules/eslint/node_modules/xtend/package.json
new file mode 100644
index 0000000000..44f0b28da4
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/xtend/package.json
@@ -0,0 +1,87 @@
+{
+ "_from": "xtend@^4.0.1",
+ "_id": "xtend@4.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=",
+ "_location": "/xtend",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "xtend@^4.0.1",
+ "name": "xtend",
+ "escapedName": "xtend",
+ "rawSpec": "^4.0.1",
+ "saveSpec": null,
+ "fetchSpec": "^4.0.1"
+ },
+ "_requiredBy": [
+ "/remark-parse",
+ "/unherit"
+ ],
+ "_resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
+ "_shasum": "a5c6d532be656e23db820efb943a1f04998d63af",
+ "_spec": "xtend@^4.0.1",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/remark-parse",
+ "author": {
+ "name": "Raynos",
+ "email": "raynos2@gmail.com"
+ },
+ "bugs": {
+ "url": "https://github.com/Raynos/xtend/issues",
+ "email": "raynos2@gmail.com"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Jake Verbaten"
+ },
+ {
+ "name": "Matt Esch"
+ }
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "extend like a boss",
+ "devDependencies": {
+ "tape": "~1.1.0"
+ },
+ "engines": {
+ "node": ">=0.4"
+ },
+ "homepage": "https://github.com/Raynos/xtend",
+ "keywords": [
+ "extend",
+ "merge",
+ "options",
+ "opts",
+ "object",
+ "array"
+ ],
+ "license": "MIT",
+ "main": "immutable",
+ "name": "xtend",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/Raynos/xtend.git"
+ },
+ "scripts": {
+ "test": "node test"
+ },
+ "testling": {
+ "files": "test.js",
+ "browsers": [
+ "ie/7..latest",
+ "firefox/16..latest",
+ "firefox/nightly",
+ "chrome/22..latest",
+ "chrome/canary",
+ "opera/12..latest",
+ "opera/next",
+ "safari/5.1..latest",
+ "ipad/6.0..latest",
+ "iphone/6.0..latest"
+ ]
+ },
+ "version": "4.0.1"
+}
diff --git a/tools/node_modules/eslint/node_modules/yallist/LICENSE b/tools/node_modules/eslint/node_modules/yallist/LICENSE
new file mode 100644
index 0000000000..19129e315f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/yallist/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/tools/node_modules/eslint/node_modules/yallist/README.md b/tools/node_modules/eslint/node_modules/yallist/README.md
new file mode 100644
index 0000000000..f586101869
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/yallist/README.md
@@ -0,0 +1,204 @@
+# yallist
+
+Yet Another Linked List
+
+There are many doubly-linked list implementations like it, but this
+one is mine.
+
+For when an array would be too big, and a Map can't be iterated in
+reverse order.
+
+
+[![Build Status](https://travis-ci.org/isaacs/yallist.svg?branch=master)](https://travis-ci.org/isaacs/yallist) [![Coverage Status](https://coveralls.io/repos/isaacs/yallist/badge.svg?service=github)](https://coveralls.io/github/isaacs/yallist)
+
+## basic usage
+
+```javascript
+var yallist = require('yallist')
+var myList = yallist.create([1, 2, 3])
+myList.push('foo')
+myList.unshift('bar')
+// of course pop() and shift() are there, too
+console.log(myList.toArray()) // ['bar', 1, 2, 3, 'foo']
+myList.forEach(function (k) {
+ // walk the list head to tail
+})
+myList.forEachReverse(function (k, index, list) {
+ // walk the list tail to head
+})
+var myDoubledList = myList.map(function (k) {
+ return k + k
+})
+// now myDoubledList contains ['barbar', 2, 4, 6, 'foofoo']
+// mapReverse is also a thing
+var myDoubledListReverse = myList.mapReverse(function (k) {
+ return k + k
+}) // ['foofoo', 6, 4, 2, 'barbar']
+
+var reduced = myList.reduce(function (set, entry) {
+ set += entry
+ return set
+}, 'start')
+console.log(reduced) // 'startfoo123bar'
+```
+
+## api
+
+The whole API is considered "public".
+
+Functions with the same name as an Array method work more or less the
+same way.
+
+There's reverse versions of most things because that's the point.
+
+### Yallist
+
+Default export, the class that holds and manages a list.
+
+Call it with either a forEach-able (like an array) or a set of
+arguments, to initialize the list.
+
+The Array-ish methods all act like you'd expect. No magic length,
+though, so if you change that it won't automatically prune or add
+empty spots.
+
+### Yallist.create(..)
+
+Alias for Yallist function. Some people like factories.
+
+#### yallist.head
+
+The first node in the list
+
+#### yallist.tail
+
+The last node in the list
+
+#### yallist.length
+
+The number of nodes in the list. (Change this at your peril. It is
+not magic like Array length.)
+
+#### yallist.toArray()
+
+Convert the list to an array.
+
+#### yallist.forEach(fn, [thisp])
+
+Call a function on each item in the list.
+
+#### yallist.forEachReverse(fn, [thisp])
+
+Call a function on each item in the list, in reverse order.
+
+#### yallist.get(n)
+
+Get the data at position `n` in the list. If you use this a lot,
+probably better off just using an Array.
+
+#### yallist.getReverse(n)
+
+Get the data at position `n`, counting from the tail.
+
+#### yallist.map(fn, thisp)
+
+Create a new Yallist with the result of calling the function on each
+item.
+
+#### yallist.mapReverse(fn, thisp)
+
+Same as `map`, but in reverse.
+
+#### yallist.pop()
+
+Get the data from the list tail, and remove the tail from the list.
+
+#### yallist.push(item, ...)
+
+Insert one or more items to the tail of the list.
+
+#### yallist.reduce(fn, initialValue)
+
+Like Array.reduce.
+
+#### yallist.reduceReverse
+
+Like Array.reduce, but in reverse.
+
+#### yallist.reverse
+
+Reverse the list in place.
+
+#### yallist.shift()
+
+Get the data from the list head, and remove the head from the list.
+
+#### yallist.slice([from], [to])
+
+Just like Array.slice, but returns a new Yallist.
+
+#### yallist.sliceReverse([from], [to])
+
+Just like yallist.slice, but the result is returned in reverse.
+
+#### yallist.toArray()
+
+Create an array representation of the list.
+
+#### yallist.toArrayReverse()
+
+Create a reversed array representation of the list.
+
+#### yallist.unshift(item, ...)
+
+Insert one or more items to the head of the list.
+
+#### yallist.unshiftNode(node)
+
+Move a Node object to the front of the list. (That is, pull it out of
+wherever it lives, and make it the new head.)
+
+If the node belongs to a different list, then that list will remove it
+first.
+
+#### yallist.pushNode(node)
+
+Move a Node object to the end of the list. (That is, pull it out of
+wherever it lives, and make it the new tail.)
+
+If the node belongs to a list already, then that list will remove it
+first.
+
+#### yallist.removeNode(node)
+
+Remove a node from the list, preserving referential integrity of head
+and tail and other nodes.
+
+Will throw an error if you try to have a list remove a node that
+doesn't belong to it.
+
+### Yallist.Node
+
+The class that holds the data and is actually the list.
+
+Call with `var n = new Node(value, previousNode, nextNode)`
+
+Note that if you do direct operations on Nodes themselves, it's very
+easy to get into weird states where the list is broken. Be careful :)
+
+#### node.next
+
+The next node in the list.
+
+#### node.prev
+
+The previous node in the list.
+
+#### node.value
+
+The data the node contains.
+
+#### node.list
+
+The list to which this node belongs. (Null if it does not belong to
+any list.)
diff --git a/tools/node_modules/eslint/node_modules/yallist/iterator.js b/tools/node_modules/eslint/node_modules/yallist/iterator.js
new file mode 100644
index 0000000000..4a15bf22c4
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/yallist/iterator.js
@@ -0,0 +1,7 @@
+var Yallist = require('./yallist.js')
+
+Yallist.prototype[Symbol.iterator] = function* () {
+ for (let walker = this.head; walker; walker = walker.next) {
+ yield walker.value
+ }
+}
diff --git a/tools/node_modules/eslint/node_modules/yallist/package.json b/tools/node_modules/eslint/node_modules/yallist/package.json
new file mode 100644
index 0000000000..372e973032
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/yallist/package.json
@@ -0,0 +1,62 @@
+{
+ "_from": "yallist@^2.1.2",
+ "_id": "yallist@2.1.2",
+ "_inBundle": false,
+ "_integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=",
+ "_location": "/eslint/yallist",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "yallist@^2.1.2",
+ "name": "yallist",
+ "escapedName": "yallist",
+ "rawSpec": "^2.1.2",
+ "saveSpec": null,
+ "fetchSpec": "^2.1.2"
+ },
+ "_requiredBy": [
+ "/eslint/lru-cache"
+ ],
+ "_resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
+ "_shasum": "1c11f9218f076089a47dd512f93c6699a6a81d52",
+ "_spec": "yallist@^2.1.2",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/lru-cache",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "bugs": {
+ "url": "https://github.com/isaacs/yallist/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Yet Another Linked List",
+ "devDependencies": {
+ "tap": "^10.3.0"
+ },
+ "directories": {
+ "test": "test"
+ },
+ "files": [
+ "yallist.js",
+ "iterator.js"
+ ],
+ "homepage": "https://github.com/isaacs/yallist#readme",
+ "license": "ISC",
+ "main": "yallist.js",
+ "name": "yallist",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/isaacs/yallist.git"
+ },
+ "scripts": {
+ "postpublish": "git push origin --all; git push origin --tags",
+ "postversion": "npm publish",
+ "preversion": "npm test",
+ "test": "tap test/*.js --100"
+ },
+ "version": "2.1.2"
+}
diff --git a/tools/node_modules/eslint/node_modules/yallist/yallist.js b/tools/node_modules/eslint/node_modules/yallist/yallist.js
new file mode 100644
index 0000000000..518d23330b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/yallist/yallist.js
@@ -0,0 +1,370 @@
+module.exports = Yallist
+
+Yallist.Node = Node
+Yallist.create = Yallist
+
+function Yallist (list) {
+ var self = this
+ if (!(self instanceof Yallist)) {
+ self = new Yallist()
+ }
+
+ self.tail = null
+ self.head = null
+ self.length = 0
+
+ if (list && typeof list.forEach === 'function') {
+ list.forEach(function (item) {
+ self.push(item)
+ })
+ } else if (arguments.length > 0) {
+ for (var i = 0, l = arguments.length; i < l; i++) {
+ self.push(arguments[i])
+ }
+ }
+
+ return self
+}
+
+Yallist.prototype.removeNode = function (node) {
+ if (node.list !== this) {
+ throw new Error('removing node which does not belong to this list')
+ }
+
+ var next = node.next
+ var prev = node.prev
+
+ if (next) {
+ next.prev = prev
+ }
+
+ if (prev) {
+ prev.next = next
+ }
+
+ if (node === this.head) {
+ this.head = next
+ }
+ if (node === this.tail) {
+ this.tail = prev
+ }
+
+ node.list.length--
+ node.next = null
+ node.prev = null
+ node.list = null
+}
+
+Yallist.prototype.unshiftNode = function (node) {
+ if (node === this.head) {
+ return
+ }
+
+ if (node.list) {
+ node.list.removeNode(node)
+ }
+
+ var head = this.head
+ node.list = this
+ node.next = head
+ if (head) {
+ head.prev = node
+ }
+
+ this.head = node
+ if (!this.tail) {
+ this.tail = node
+ }
+ this.length++
+}
+
+Yallist.prototype.pushNode = function (node) {
+ if (node === this.tail) {
+ return
+ }
+
+ if (node.list) {
+ node.list.removeNode(node)
+ }
+
+ var tail = this.tail
+ node.list = this
+ node.prev = tail
+ if (tail) {
+ tail.next = node
+ }
+
+ this.tail = node
+ if (!this.head) {
+ this.head = node
+ }
+ this.length++
+}
+
+Yallist.prototype.push = function () {
+ for (var i = 0, l = arguments.length; i < l; i++) {
+ push(this, arguments[i])
+ }
+ return this.length
+}
+
+Yallist.prototype.unshift = function () {
+ for (var i = 0, l = arguments.length; i < l; i++) {
+ unshift(this, arguments[i])
+ }
+ return this.length
+}
+
+Yallist.prototype.pop = function () {
+ if (!this.tail) {
+ return undefined
+ }
+
+ var res = this.tail.value
+ this.tail = this.tail.prev
+ if (this.tail) {
+ this.tail.next = null
+ } else {
+ this.head = null
+ }
+ this.length--
+ return res
+}
+
+Yallist.prototype.shift = function () {
+ if (!this.head) {
+ return undefined
+ }
+
+ var res = this.head.value
+ this.head = this.head.next
+ if (this.head) {
+ this.head.prev = null
+ } else {
+ this.tail = null
+ }
+ this.length--
+ return res
+}
+
+Yallist.prototype.forEach = function (fn, thisp) {
+ thisp = thisp || this
+ for (var walker = this.head, i = 0; walker !== null; i++) {
+ fn.call(thisp, walker.value, i, this)
+ walker = walker.next
+ }
+}
+
+Yallist.prototype.forEachReverse = function (fn, thisp) {
+ thisp = thisp || this
+ for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {
+ fn.call(thisp, walker.value, i, this)
+ walker = walker.prev
+ }
+}
+
+Yallist.prototype.get = function (n) {
+ for (var i = 0, walker = this.head; walker !== null && i < n; i++) {
+ // abort out of the list early if we hit a cycle
+ walker = walker.next
+ }
+ if (i === n && walker !== null) {
+ return walker.value
+ }
+}
+
+Yallist.prototype.getReverse = function (n) {
+ for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {
+ // abort out of the list early if we hit a cycle
+ walker = walker.prev
+ }
+ if (i === n && walker !== null) {
+ return walker.value
+ }
+}
+
+Yallist.prototype.map = function (fn, thisp) {
+ thisp = thisp || this
+ var res = new Yallist()
+ for (var walker = this.head; walker !== null;) {
+ res.push(fn.call(thisp, walker.value, this))
+ walker = walker.next
+ }
+ return res
+}
+
+Yallist.prototype.mapReverse = function (fn, thisp) {
+ thisp = thisp || this
+ var res = new Yallist()
+ for (var walker = this.tail; walker !== null;) {
+ res.push(fn.call(thisp, walker.value, this))
+ walker = walker.prev
+ }
+ return res
+}
+
+Yallist.prototype.reduce = function (fn, initial) {
+ var acc
+ var walker = this.head
+ if (arguments.length > 1) {
+ acc = initial
+ } else if (this.head) {
+ walker = this.head.next
+ acc = this.head.value
+ } else {
+ throw new TypeError('Reduce of empty list with no initial value')
+ }
+
+ for (var i = 0; walker !== null; i++) {
+ acc = fn(acc, walker.value, i)
+ walker = walker.next
+ }
+
+ return acc
+}
+
+Yallist.prototype.reduceReverse = function (fn, initial) {
+ var acc
+ var walker = this.tail
+ if (arguments.length > 1) {
+ acc = initial
+ } else if (this.tail) {
+ walker = this.tail.prev
+ acc = this.tail.value
+ } else {
+ throw new TypeError('Reduce of empty list with no initial value')
+ }
+
+ for (var i = this.length - 1; walker !== null; i--) {
+ acc = fn(acc, walker.value, i)
+ walker = walker.prev
+ }
+
+ return acc
+}
+
+Yallist.prototype.toArray = function () {
+ var arr = new Array(this.length)
+ for (var i = 0, walker = this.head; walker !== null; i++) {
+ arr[i] = walker.value
+ walker = walker.next
+ }
+ return arr
+}
+
+Yallist.prototype.toArrayReverse = function () {
+ var arr = new Array(this.length)
+ for (var i = 0, walker = this.tail; walker !== null; i++) {
+ arr[i] = walker.value
+ walker = walker.prev
+ }
+ return arr
+}
+
+Yallist.prototype.slice = function (from, to) {
+ to = to || this.length
+ if (to < 0) {
+ to += this.length
+ }
+ from = from || 0
+ if (from < 0) {
+ from += this.length
+ }
+ var ret = new Yallist()
+ if (to < from || to < 0) {
+ return ret
+ }
+ if (from < 0) {
+ from = 0
+ }
+ if (to > this.length) {
+ to = this.length
+ }
+ for (var i = 0, walker = this.head; walker !== null && i < from; i++) {
+ walker = walker.next
+ }
+ for (; walker !== null && i < to; i++, walker = walker.next) {
+ ret.push(walker.value)
+ }
+ return ret
+}
+
+Yallist.prototype.sliceReverse = function (from, to) {
+ to = to || this.length
+ if (to < 0) {
+ to += this.length
+ }
+ from = from || 0
+ if (from < 0) {
+ from += this.length
+ }
+ var ret = new Yallist()
+ if (to < from || to < 0) {
+ return ret
+ }
+ if (from < 0) {
+ from = 0
+ }
+ if (to > this.length) {
+ to = this.length
+ }
+ for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {
+ walker = walker.prev
+ }
+ for (; walker !== null && i > from; i--, walker = walker.prev) {
+ ret.push(walker.value)
+ }
+ return ret
+}
+
+Yallist.prototype.reverse = function () {
+ var head = this.head
+ var tail = this.tail
+ for (var walker = head; walker !== null; walker = walker.prev) {
+ var p = walker.prev
+ walker.prev = walker.next
+ walker.next = p
+ }
+ this.head = tail
+ this.tail = head
+ return this
+}
+
+function push (self, item) {
+ self.tail = new Node(item, self.tail, null, self)
+ if (!self.head) {
+ self.head = self.tail
+ }
+ self.length++
+}
+
+function unshift (self, item) {
+ self.head = new Node(item, null, self.head, self)
+ if (!self.tail) {
+ self.tail = self.head
+ }
+ self.length++
+}
+
+function Node (value, prev, next, list) {
+ if (!(this instanceof Node)) {
+ return new Node(value, prev, next, list)
+ }
+
+ this.list = list
+ this.value = value
+
+ if (prev) {
+ prev.next = this
+ this.prev = prev
+ } else {
+ this.prev = null
+ }
+
+ if (next) {
+ next.prev = this
+ this.next = next
+ } else {
+ this.next = null
+ }
+}
diff --git a/tools/node_modules/eslint/package.json b/tools/node_modules/eslint/package.json
new file mode 100644
index 0000000000..dec10304f7
--- /dev/null
+++ b/tools/node_modules/eslint/package.json
@@ -0,0 +1,161 @@
+{
+ "_from": "eslint@latest",
+ "_id": "eslint@4.12.0",
+ "_inBundle": false,
+ "_integrity": "sha512-Ohv4NU0FffkEe4so8DBrdfRUbGUtM4XnBTDll2pY7OdW3VkjBOZPerx3Bmuhg6S6D6r8+cli0EezN0xawUfYwg==",
+ "_location": "/eslint",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "tag",
+ "registry": true,
+ "raw": "eslint@latest",
+ "name": "eslint",
+ "escapedName": "eslint",
+ "rawSpec": "latest",
+ "saveSpec": null,
+ "fetchSpec": "latest"
+ },
+ "_requiredBy": [
+ "#USER",
+ "/"
+ ],
+ "_resolved": "https://registry.npmjs.org/eslint/-/eslint-4.12.0.tgz",
+ "_shasum": "a7ce78eba8cc8f2443acfbbc870cc31a65135884",
+ "_spec": "eslint@latest",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp",
+ "author": {
+ "name": "Nicholas C. Zakas",
+ "email": "nicholas+npm@nczconsulting.com"
+ },
+ "bin": {
+ "eslint": "./bin/eslint.js"
+ },
+ "bugs": {
+ "url": "https://github.com/eslint/eslint/issues/"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "ajv": "^5.3.0",
+ "babel-code-frame": "^6.22.0",
+ "chalk": "^2.1.0",
+ "concat-stream": "^1.6.0",
+ "cross-spawn": "^5.1.0",
+ "debug": "^3.0.1",
+ "doctrine": "^2.0.2",
+ "eslint-plugin-markdown": "^1.0.0-beta.7",
+ "eslint-scope": "^3.7.1",
+ "espree": "^3.5.2",
+ "esquery": "^1.0.0",
+ "estraverse": "^4.2.0",
+ "esutils": "^2.0.2",
+ "file-entry-cache": "^2.0.0",
+ "functional-red-black-tree": "^1.0.1",
+ "glob": "^7.1.2",
+ "globals": "^11.0.1",
+ "ignore": "^3.3.3",
+ "imurmurhash": "^0.1.4",
+ "inquirer": "^3.0.6",
+ "is-resolvable": "^1.0.0",
+ "js-yaml": "^3.9.1",
+ "json-stable-stringify-without-jsonify": "^1.0.1",
+ "levn": "^0.3.0",
+ "lodash": "^4.17.4",
+ "minimatch": "^3.0.2",
+ "mkdirp": "^0.5.1",
+ "natural-compare": "^1.4.0",
+ "optionator": "^0.8.2",
+ "path-is-inside": "^1.0.2",
+ "pluralize": "^7.0.0",
+ "progress": "^2.0.0",
+ "require-uncached": "^1.0.3",
+ "semver": "^5.3.0",
+ "strip-ansi": "^4.0.0",
+ "strip-json-comments": "~2.0.1",
+ "table": "^4.0.1",
+ "text-table": "~0.2.0"
+ },
+ "deprecated": false,
+ "description": "An AST-based pattern checker for JavaScript.",
+ "devDependencies": {
+ "babel-polyfill": "^6.23.0",
+ "babel-preset-es2015": "^6.24.1",
+ "babelify": "^7.3.0",
+ "beefy": "^2.1.8",
+ "brfs": "1.4.3",
+ "browserify": "^14.4.0",
+ "chai": "^4.0.1",
+ "cheerio": "^0.22.0",
+ "coveralls": "^2.13.1",
+ "dateformat": "^2.0.0",
+ "ejs": "^2.5.6",
+ "eslint-plugin-eslint-plugin": "^1.2.0",
+ "eslint-plugin-node": "^5.1.0",
+ "eslint-plugin-rulesdir": "^0.1.0",
+ "eslint-release": "^0.10.1",
+ "eslint-rule-composer": "^0.1.0",
+ "eslump": "1.6.0",
+ "esprima": "^4.0.0",
+ "esprima-fb": "^15001.1001.0-dev-harmony-fb",
+ "istanbul": "^0.4.5",
+ "jsdoc": "^3.4.3",
+ "karma": "^1.7.0",
+ "karma-babel-preprocessor": "^6.0.1",
+ "karma-mocha": "^1.3.0",
+ "karma-mocha-reporter": "^2.2.3",
+ "karma-phantomjs-launcher": "^1.0.4",
+ "leche": "^2.1.2",
+ "load-perf": "^0.2.0",
+ "markdownlint": "^0.6.1",
+ "mocha": "^3.4.2",
+ "mock-fs": "^4.3.0",
+ "npm-license": "^0.3.3",
+ "phantomjs-prebuilt": "^2.1.14",
+ "proxyquire": "^1.8.0",
+ "shelljs": "^0.7.7",
+ "sinon": "^3.2.1",
+ "temp": "^0.8.3",
+ "through": "^2.3.8"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "files": [
+ "LICENSE",
+ "README.md",
+ "bin",
+ "conf",
+ "lib",
+ "messages"
+ ],
+ "homepage": "https://eslint.org",
+ "keywords": [
+ "ast",
+ "lint",
+ "javascript",
+ "ecmascript",
+ "espree"
+ ],
+ "license": "MIT",
+ "main": "./lib/api.js",
+ "name": "eslint",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/eslint/eslint.git"
+ },
+ "scripts": {
+ "alpharelease": "node Makefile.js prerelease -- alpha",
+ "betarelease": "node Makefile.js prerelease -- beta",
+ "browserify": "node Makefile.js browserify",
+ "ci-release": "node Makefile.js ciRelease",
+ "coveralls": "cat ./coverage/lcov.info | coveralls",
+ "docs": "node Makefile.js docs",
+ "fuzz": "node Makefile.js fuzz",
+ "gensite": "node Makefile.js gensite",
+ "lint": "node Makefile.js lint",
+ "perf": "node Makefile.js perf",
+ "profile": "beefy tests/bench/bench.js --open -- -t brfs -t ./tests/bench/xform-rules.js -r espree",
+ "release": "node Makefile.js release",
+ "test": "node Makefile.js test"
+ },
+ "version": "4.12.0"
+}